@northflank/js-client 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api-client.d.ts +1528 -1094
- package/dist/cjs/api-client.js +1 -1
- package/dist/esm/api-client.d.ts +1528 -1094
- package/dist/esm/api-client.js +1 -1
- package/package.json +1 -1
package/dist/esm/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t,{EventEmitter as e}from"events";import{execSync as n,spawn as r}from"child_process";import*as i from"stream";import o,{Transform as s}from"stream";import a from"http";import c,{fileURLToPath as u}from"url";import d from"punycode";import l from"https";import*as h from"zlib";import p from"zlib";import f from"os";import*as m from"net";import v,{Socket as b}from"net";import g,{mkdir as y,stat as w,statSync as I,mkdirSync as E}from"fs";import R,{parse as j,dirname as _,resolve as S}from"path";import C from"tls";import U from"crypto";import A,{Buffer as P}from"buffer";import O from"dgram";import{EventEmitter as k}from"node:events";import x from"node:stream";import{StringDecoder as T}from"node:string_decoder";import D,{posix as L,basename as N,win32 as q,join as B}from"node:path";import F from"node:fs";import M from"assert";import G from"node:assert";import{randomBytes as z}from"node:crypto";var J=function(t,e){return J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},J(t,e)};function W(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}J(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var $=function(){return $=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},$.apply(this,arguments)};function H(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))}function V(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function Z(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var Y="object"==typeof global&&global&&global.Object===Object&&global,K="object"==typeof self&&self&&self.Object===Object&&self,X=Y||K||Function("return this")(),Q=X.Symbol,tt=Object.prototype,et=tt.hasOwnProperty,nt=tt.toString,rt=Q?Q.toStringTag:void 0;var it=Object.prototype.toString;var ot=Q?Q.toStringTag:void 0;function st(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":ot&&ot in Object(t)?function(t){var e=et.call(t,rt),n=t[rt];try{t[rt]=void 0;var r=!0}catch(t){}var i=nt.call(t);return r&&(e?t[rt]=n:delete t[rt]),i}(t):function(t){return it.call(t)}(t)}function at(t){return null!=t&&"object"==typeof t}function ct(t){return"symbol"==typeof t||at(t)&&"[object Symbol]"==st(t)}function ut(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var dt=Array.isArray,lt=Q?Q.prototype:void 0,ht=lt?lt.toString:void 0;function pt(t){if("string"==typeof t)return t;if(dt(t))return ut(t,pt)+"";if(ct(t))return ht?ht.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ft(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function mt(t){return t}function vt(t){if(!ft(t))return!1;var e=st(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var bt,gt=X["__core-js_shared__"],yt=(bt=/[^.]+$/.exec(gt&>.keys&>.keys.IE_PROTO||""))?"Symbol(src)_1."+bt:"";var wt=Function.prototype.toString;function It(t){if(null!=t){try{return wt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Et=/^\[object .+?Constructor\]$/,Rt=Function.prototype,jt=Object.prototype,_t=Rt.toString,St=jt.hasOwnProperty,Ct=RegExp("^"+_t.call(St).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ut(t){return!(!ft(t)||(e=t,yt&&yt in e))&&(vt(t)?Ct:Et).test(It(t));var e}function At(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Ut(n)?n:void 0}var Pt=At(X,"WeakMap"),Ot=Object.create,kt=function(){function t(){}return function(e){if(!ft(e))return{};if(Ot)return Ot(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var xt=Date.now;var Tt,Dt,Lt,Nt=function(){try{var t=At(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),qt=Nt,Bt=qt?function(t,e){return qt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:mt,Ft=(Tt=Bt,Dt=0,Lt=0,function(){var t=xt(),e=16-(t-Lt);if(Lt=t,e>0){if(++Dt>=800)return arguments[0]}else Dt=0;return Tt.apply(void 0,arguments)}),Mt=/^(?:0|[1-9]\d*)$/;function Gt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Mt.test(t))&&t>-1&&t%1==0&&t<e}function zt(t,e,n){"__proto__"==e&&qt?qt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Jt(t,e){return t===e||t!=t&&e!=e}var Wt=Object.prototype.hasOwnProperty;function $t(t,e,n){var r=t[e];Wt.call(t,e)&&Jt(r,n)&&(void 0!==n||e in t)||zt(t,e,n)}var Ht=Math.max;function Vt(t,e){return Ft(function(t,e,n){return e=Ht(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Ht(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,a)}}(t,e,mt),t+"")}function Zt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Yt(t){return null!=t&&Zt(t.length)&&!vt(t)}var Kt=Object.prototype;function Xt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Kt)}function Qt(t){return at(t)&&"[object Arguments]"==st(t)}var te=Object.prototype,ee=te.hasOwnProperty,ne=te.propertyIsEnumerable,re=Qt(function(){return arguments}())?Qt:function(t){return at(t)&&ee.call(t,"callee")&&!ne.call(t,"callee")};var ie="object"==typeof exports&&exports&&!exports.nodeType&&exports,oe=ie&&"object"==typeof module&&module&&!module.nodeType&&module,se=oe&&oe.exports===ie?X.Buffer:void 0,ae=(se?se.isBuffer:void 0)||function(){return!1},ce={};ce["[object Float32Array]"]=ce["[object Float64Array]"]=ce["[object Int8Array]"]=ce["[object Int16Array]"]=ce["[object Int32Array]"]=ce["[object Uint8Array]"]=ce["[object Uint8ClampedArray]"]=ce["[object Uint16Array]"]=ce["[object Uint32Array]"]=!0,ce["[object Arguments]"]=ce["[object Array]"]=ce["[object ArrayBuffer]"]=ce["[object Boolean]"]=ce["[object DataView]"]=ce["[object Date]"]=ce["[object Error]"]=ce["[object Function]"]=ce["[object Map]"]=ce["[object Number]"]=ce["[object Object]"]=ce["[object RegExp]"]=ce["[object Set]"]=ce["[object String]"]=ce["[object WeakMap]"]=!1;var ue="object"==typeof exports&&exports&&!exports.nodeType&&exports,de=ue&&"object"==typeof module&&module&&!module.nodeType&&module,le=de&&de.exports===ue&&Y.process,he=function(){try{var t=de&&de.require&&de.require("util").types;return t||le&&le.binding&&le.binding("util")}catch(t){}}(),pe=he&&he.isTypedArray,fe=pe?function(t){return function(e){return t(e)}}(pe):function(t){return at(t)&&Zt(t.length)&&!!ce[st(t)]},me=fe,ve=Object.prototype.hasOwnProperty;function be(t,e){var n=dt(t),r=!n&&re(t),i=!n&&!r&&ae(t),o=!n&&!r&&!i&&me(t),s=n||r||i||o,a=s?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],c=a.length;for(var u in t)!e&&!ve.call(t,u)||s&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Gt(u,c))||a.push(u);return a}function ge(t,e){return function(n){return t(e(n))}}var ye=ge(Object.keys,Object),we=Object.prototype.hasOwnProperty;function Ie(t){return Yt(t)?be(t):function(t){if(!Xt(t))return ye(t);var e=[];for(var n in Object(t))we.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Ee=Object.prototype.hasOwnProperty;function Re(t){if(!ft(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Xt(t),n=[];for(var r in t)("constructor"!=r||!e&&Ee.call(t,r))&&n.push(r);return n}function je(t){return Yt(t)?be(t,!0):Re(t)}var _e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Se=/^\w*$/;function Ce(t,e){if(dt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!ct(t))||(Se.test(t)||!_e.test(t)||null!=e&&t in Object(e))}var Ue=At(Object,"create");var Ae=Object.prototype.hasOwnProperty;var Pe=Object.prototype.hasOwnProperty;function Oe(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function ke(t,e){for(var n=t.length;n--;)if(Jt(t[n][0],e))return n;return-1}Oe.prototype.clear=function(){this.__data__=Ue?Ue(null):{},this.size=0},Oe.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Oe.prototype.get=function(t){var e=this.__data__;if(Ue){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Ae.call(e,t)?e[t]:void 0},Oe.prototype.has=function(t){var e=this.__data__;return Ue?void 0!==e[t]:Pe.call(e,t)},Oe.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ue&&void 0===e?"__lodash_hash_undefined__":e,this};var xe=Array.prototype.splice;function Te(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Te.prototype.clear=function(){this.__data__=[],this.size=0},Te.prototype.delete=function(t){var e=this.__data__,n=ke(e,t);return!(n<0)&&(n==e.length-1?e.pop():xe.call(e,n,1),--this.size,!0)},Te.prototype.get=function(t){var e=this.__data__,n=ke(e,t);return n<0?void 0:e[n][1]},Te.prototype.has=function(t){return ke(this.__data__,t)>-1},Te.prototype.set=function(t,e){var n=this.__data__,r=ke(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var De=At(X,"Map");function Le(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Ne(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ne.prototype.clear=function(){this.size=0,this.__data__={hash:new Oe,map:new(De||Te),string:new Oe}},Ne.prototype.delete=function(t){var e=Le(this,t).delete(t);return this.size-=e?1:0,e},Ne.prototype.get=function(t){return Le(this,t).get(t)},Ne.prototype.has=function(t){return Le(this,t).has(t)},Ne.prototype.set=function(t,e){var n=Le(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function qe(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(qe.Cache||Ne),n}qe.Cache=Ne;var Be=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fe=/\\(\\)?/g,Me=function(t){var e=qe(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Be,(function(t,n,r,i){e.push(r?i.replace(Fe,"$1"):n||t)})),e})),Ge=Me;function ze(t){return null==t?"":pt(t)}function Je(t,e){return dt(t)?t:Ce(t,e)?[t]:Ge(ze(t))}function We(t){if("string"==typeof t||ct(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function $e(t,e){for(var n=0,r=(e=Je(e,t)).length;null!=t&&n<r;)t=t[We(e[n++])];return n&&n==r?t:void 0}function He(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Ve=Q?Q.isConcatSpreadable:void 0;function Ze(t){return dt(t)||re(t)||!!(Ve&&t&&t[Ve])}function Ye(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=Ze),i||(i=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?Ye(a,e-1,n,r,i):He(i,a):r||(i[i.length]=a)}return i}var Ke=ge(Object.getPrototypeOf,Object),Xe=Function.prototype,Qe=Object.prototype,tn=Xe.toString,en=Qe.hasOwnProperty,nn=tn.call(Object);function rn(t){var e=this.__data__=new Te(t);this.size=e.size}rn.prototype.clear=function(){this.__data__=new Te,this.size=0},rn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},rn.prototype.get=function(t){return this.__data__.get(t)},rn.prototype.has=function(t){return this.__data__.has(t)},rn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Te){var r=n.__data__;if(!De||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ne(r)}return n.set(t,e),this.size=n.size,this};var on="object"==typeof exports&&exports&&!exports.nodeType&&exports,sn=on&&"object"==typeof module&&module&&!module.nodeType&&module,an=sn&&sn.exports===on?X.Buffer:void 0,cn=an?an.allocUnsafe:void 0;var un=Object.prototype.propertyIsEnumerable,dn=Object.getOwnPropertySymbols,ln=dn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}(dn(t),(function(e){return un.call(t,e)})))}:function(){return[]};function hn(t){return function(t,e,n){var r=e(t);return dt(t)?r:He(r,n(t))}(t,Ie,ln)}var pn=At(X,"DataView"),fn=At(X,"Promise"),mn=At(X,"Set"),vn="[object Map]",bn="[object Promise]",gn="[object Set]",yn="[object WeakMap]",wn="[object DataView]",In=It(pn),En=It(De),Rn=It(fn),jn=It(mn),_n=It(Pt),Sn=st;(pn&&Sn(new pn(new ArrayBuffer(1)))!=wn||De&&Sn(new De)!=vn||fn&&Sn(fn.resolve())!=bn||mn&&Sn(new mn)!=gn||Pt&&Sn(new Pt)!=yn)&&(Sn=function(t){var e=st(t),n="[object Object]"==e?t.constructor:void 0,r=n?It(n):"";if(r)switch(r){case In:return wn;case En:return vn;case Rn:return bn;case jn:return gn;case _n:return yn}return e});var Cn=Sn,Un=X.Uint8Array;function An(t,e){var n,r,i=e?(n=t.buffer,r=new n.constructor(n.byteLength),new Un(r).set(new Un(n)),r):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function Pn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Ne;++e<n;)this.add(t[e])}function On(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}Pn.prototype.add=Pn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Pn.prototype.has=function(t){return this.__data__.has(t)};function kn(t,e,n,r,i,o){var s=1&n,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var u=o.get(t),d=o.get(e);if(u&&d)return u==e&&d==t;var l=-1,h=!0,p=2&n?new Pn:void 0;for(o.set(t,e),o.set(e,t);++l<a;){var f=t[l],m=e[l];if(r)var v=s?r(m,f,l,e,t,o):r(f,m,l,t,e,o);if(void 0!==v){if(v)continue;h=!1;break}if(p){if(!On(e,(function(t,e){if(s=e,!p.has(s)&&(f===t||i(f,t,n,r,o)))return p.push(e);var s}))){h=!1;break}}else if(f!==m&&!i(f,m,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function xn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Tn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Dn=Q?Q.prototype:void 0,Ln=Dn?Dn.valueOf:void 0;var Nn=Object.prototype.hasOwnProperty;var qn="[object Arguments]",Bn="[object Array]",Fn="[object Object]",Mn=Object.prototype.hasOwnProperty;function Gn(t,e,n,r,i,o){var s=dt(t),a=dt(e),c=s?Bn:Cn(t),u=a?Bn:Cn(e),d=(c=c==qn?Fn:c)==Fn,l=(u=u==qn?Fn:u)==Fn,h=c==u;if(h&&ae(t)){if(!ae(e))return!1;s=!0,d=!1}if(h&&!d)return o||(o=new rn),s||me(t)?kn(t,e,n,r,i,o):function(t,e,n,r,i,o,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new Un(t),new Un(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Jt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=xn;case"[object Set]":var c=1&r;if(a||(a=Tn),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;r|=2,s.set(t,e);var d=kn(a(t),a(e),r,i,o,s);return s.delete(t),d;case"[object Symbol]":if(Ln)return Ln.call(t)==Ln.call(e)}return!1}(t,e,c,n,r,i,o);if(!(1&n)){var p=d&&Mn.call(t,"__wrapped__"),f=l&&Mn.call(e,"__wrapped__");if(p||f){var m=p?t.value():t,v=f?e.value():e;return o||(o=new rn),i(m,v,n,r,o)}}return!!h&&(o||(o=new rn),function(t,e,n,r,i,o){var s=1&n,a=hn(t),c=a.length;if(c!=hn(e).length&&!s)return!1;for(var u=c;u--;){var d=a[u];if(!(s?d in e:Nn.call(e,d)))return!1}var l=o.get(t),h=o.get(e);if(l&&h)return l==e&&h==t;var p=!0;o.set(t,e),o.set(e,t);for(var f=s;++u<c;){var m=t[d=a[u]],v=e[d];if(r)var b=s?r(v,m,d,e,t,o):r(m,v,d,t,e,o);if(!(void 0===b?m===v||i(m,v,n,r,o):b)){p=!1;break}f||(f="constructor"==d)}if(p&&!f){var g=t.constructor,y=e.constructor;g==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof y&&y instanceof y||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,i,o))}function zn(t,e,n,r,i){return t===e||(null==t||null==e||!at(t)&&!at(e)?t!=t&&e!=e:Gn(t,e,n,r,zn,i))}function Jn(t){return t==t&&!ft(t)}function Wn(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function $n(t){var e=function(t){for(var e=Ie(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Jn(i)]}return e}(t);return 1==e.length&&e[0][2]?Wn(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,s=!r;if(null==t)return!o;for(t=Object(t);i--;){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){var c=(a=n[i])[0],u=t[c],d=a[1];if(s&&a[2]){if(void 0===u&&!(c in t))return!1}else{var l=new rn;if(r)var h=r(u,d,c,t,e,l);if(!(void 0===h?zn(d,u,3,r,l):h))return!1}}return!0}(n,t,e)}}function Hn(t,e){return null!=t&&e in Object(t)}function Vn(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Je(e,t)).length,o=!1;++r<i;){var s=We(e[r]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Zt(i)&&Gt(s,i)&&(dt(t)||re(t))}(t,e,Hn)}function Zn(t,e){return Ce(t)&&Jn(e)?Wn(We(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:$e(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Vn(n,t):zn(e,r,3)}}function Yn(t){return Ce(t)?(e=We(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return $e(e,t)}}(t);var e}function Kn(t){return"function"==typeof t?t:null==t?mt:"object"==typeof t?dt(t)?Zn(t[0],t[1]):$n(t):Yn(t)}var Xn,Qn=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),s=o.length;s--;){var a=o[Xn?s:++r];if(!1===e(i[a],a,i))break}return t};var tr=function(t,e){return function(n,r){if(null==n)return n;if(!Yt(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=Object(n);(e?o--:++o<i)&&!1!==r(s[o],o,s););return n}}((function(t,e){return t&&Qn(t,e,Ie)})),er=tr;function nr(t,e,n){(void 0!==n&&!Jt(t[e],n)||void 0===n&&!(e in t))&&zt(t,e,n)}function rr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function ir(t){return function(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],c=r?r(n[a],t[a],a,n,t):void 0;void 0===c&&(c=t[a]),i?zt(n,a,c):$t(n,a,c)}return n}(t,je(t))}function or(t,e,n,r,i,o,s){var a=rr(t,n),c=rr(e,n),u=s.get(c);if(u)nr(t,n,u);else{var d,l=o?o(a,c,n+"",t,e,s):void 0,h=void 0===l;if(h){var p=dt(c),f=!p&&ae(c),m=!p&&!f&&me(c);l=c,p||f||m?dt(a)?l=a:at(d=a)&&Yt(d)?l=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}(a):f?(h=!1,l=function(t,e){if(e)return t.slice();var n=t.length,r=cn?cn(n):new t.constructor(n);return t.copy(r),r}(c,!0)):m?(h=!1,l=An(c,!0)):l=[]:function(t){if(!at(t)||"[object Object]"!=st(t))return!1;var e=Ke(t);if(null===e)return!0;var n=en.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&tn.call(n)==nn}(c)||re(c)?(l=a,re(a)?l=ir(a):ft(a)&&!vt(a)||(l=function(t){return"function"!=typeof t.constructor||Xt(t)?{}:kt(Ke(t))}(c))):h=!1}h&&(s.set(c,l),i(l,c,r,o,s),s.delete(c)),nr(t,n,l)}}function sr(t,e,n,r,i){t!==e&&Qn(e,(function(o,s){if(i||(i=new rn),ft(o))or(t,e,s,n,sr,r,i);else{var a=r?r(rr(t,s),o,s+"",t,e,i):void 0;void 0===a&&(a=o),nr(t,s,a)}}),je)}var ar=/[\\^$.*+?()[\]{}|]/g,cr=RegExp(ar.source);function ur(t,e){var n=-1,r=Yt(t)?Array(t.length):[];return er(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function dr(t,e){return Ye(function(t,e){return(dt(t)?ut:ur)(t,Kn(e))}(t,e),1)}var lr=1/0;function hr(t,e){return t>e}function pr(t){return"string"==typeof t||!dt(t)&&at(t)&&"[object String]"==st(t)}function fr(t,e){return t&&t.length?function(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],s=e(o);if(null!=s&&(void 0===a?s==s&&!ct(s):n(s,a)))var a=s,c=o}return c}(t,Kn(e),hr):void 0}var mr,vr=(mr=function(t,e,n){sr(t,e,n)},Vt((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=mr.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!ft(n))return!1;var r=typeof e;return!!("number"==r?Yt(n)&&Gt(e,n.length):"string"==r&&e in n)&&Jt(n[e],t)}(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var s=e[n];s&&mr(t,s,n,i)}return t})));function br(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function gr(t,e){return t(e={exports:{}},e.exports),e.exports}var yr={},wr=yr;function Ir(t){return t<0?-1:1}function Er(t,e){e.unsigned||--t;const n=e.unsigned?0:-Math.pow(2,t),r=Math.pow(2,t)-1,i=e.moduloBitLength?Math.pow(2,e.moduloBitLength):Math.pow(2,t),o=e.moduloBitLength?Math.pow(2,e.moduloBitLength-1):Math.pow(2,t-1);return function(t,s){s||(s={});let a=+t;if(s.enforceRange){if(!Number.isFinite(a))throw new TypeError("Argument is not a finite number");if(a=Ir(a)*Math.floor(Math.abs(a)),a<n||a>r)throw new TypeError("Argument is not in byte range");return a}if(!isNaN(a)&&s.clamp)return a=function(t){return t%1!=.5||1&t?Math.round(t):Math.floor(t)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=Ir(a)*Math.floor(Math.abs(a)),a%=i,!e.unsigned&&a>=o)return a-i;if(e.unsigned)if(a<0)a+=i;else if(-0===a)return 0;return a}}yr.void=function(){},yr.boolean=function(t){return!!t},yr.byte=Er(8,{unsigned:!1}),yr.octet=Er(8,{unsigned:!0}),yr.short=Er(16,{unsigned:!1}),yr["unsigned short"]=Er(16,{unsigned:!0}),yr.long=Er(32,{unsigned:!1}),yr["unsigned long"]=Er(32,{unsigned:!0}),yr["long long"]=Er(32,{unsigned:!1,moduloBitLength:64}),yr["unsigned long long"]=Er(32,{unsigned:!0,moduloBitLength:64}),yr.double=function(t){const e=+t;if(!Number.isFinite(e))throw new TypeError("Argument is not a finite floating-point value");return e},yr["unrestricted double"]=function(t){const e=+t;if(isNaN(e))throw new TypeError("Argument is NaN");return e},yr.float=yr.double,yr["unrestricted float"]=yr["unrestricted double"],yr.DOMString=function(t,e){return e||(e={}),e.treatNullAsEmptyString&&null===t?"":String(t)},yr.ByteString=function(t,e){const n=String(t);let r;for(let t=0;void 0!==(r=n.codePointAt(t));++t)if(r>255)throw new TypeError("Argument is not a valid bytestring");return n},yr.USVString=function(t){const e=String(t),n=e.length,r=[];for(let t=0;t<n;++t){const i=e.charCodeAt(t);if(i<55296||i>57343)r.push(String.fromCodePoint(i));else if(56320<=i&&i<=57343)r.push(String.fromCodePoint(65533));else if(t===n-1)r.push(String.fromCodePoint(65533));else{const n=e.charCodeAt(t+1);if(56320<=n&&n<=57343){const e=1023&i,o=1023&n;r.push(String.fromCodePoint(65536+1024*e+o)),++t}else r.push(String.fromCodePoint(65533))}}return r.join("")},yr.Date=function(t,e){if(!(t instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(t))return t},yr.RegExp=function(t,e){return t instanceof RegExp||(t=new RegExp(t)),t};var Rr=gr((function(t){t.exports.mixin=function(t,e){const n=Object.getOwnPropertyNames(e);for(let r=0;r<n.length;++r)Object.defineProperty(t,n[r],Object.getOwnPropertyDescriptor(e,n[r]))},t.exports.wrapperSymbol=Symbol("wrapper"),t.exports.implSymbol=Symbol("impl"),t.exports.wrapperForImpl=function(e){return e[t.exports.wrapperSymbol]},t.exports.implForWrapper=function(e){return e[t.exports.implSymbol]}}));Rr.mixin,Rr.wrapperSymbol,Rr.implSymbol,Rr.wrapperForImpl,Rr.implForWrapper;var jr,_r=(jr=Object.freeze({__proto__:null}))&&jr.default||jr,Sr={TRANSITIONAL:0,NONTRANSITIONAL:1};function Cr(t){return t.split("\0").map((function(t){return t.normalize("NFC")})).join("\0")}function Ur(t){for(var e=0,n=_r.length-1;e<=n;){var r=Math.floor((e+n)/2),i=_r[r];if(i[0][0]<=t&&i[0][1]>=t)return i;i[0][0]>t?n=r-1:e=r+1}return null}var Ar=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function Pr(t){return t.replace(Ar,"_").length}var Or=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;function kr(t,e){"xn--"===t.substr(0,4)&&(t=d.toUnicode(t));var n=!1;(Cr(t)!==t||"-"===t[3]&&"-"===t[4]||"-"===t[0]||"-"===t[t.length-1]||-1!==t.indexOf(".")||0===t.search(Or))&&(n=!0);for(var r=Pr(t),i=0;i<r;++i){var o=Ur(t.codePointAt(i));if(xr===Sr.TRANSITIONAL&&"valid"!==o[1]||xr===Sr.NONTRANSITIONAL&&"valid"!==o[1]&&"deviation"!==o[1]){n=!0;break}}return{label:t,error:n}}function xr(t,e,n){var r=function(t,e,n){for(var r=!1,i="",o=Pr(t),s=0;s<o;++s){var a=t.codePointAt(s),c=Ur(a);switch(c[1]){case"disallowed":r=!0,i+=String.fromCodePoint(a);break;case"ignored":break;case"mapped":i+=String.fromCodePoint.apply(String,c[2]);break;case"deviation":i+=n===Sr.TRANSITIONAL?String.fromCodePoint.apply(String,c[2]):String.fromCodePoint(a);break;case"valid":i+=String.fromCodePoint(a);break;case"disallowed_STD3_mapped":e?(r=!0,i+=String.fromCodePoint(a)):i+=String.fromCodePoint.apply(String,c[2]);break;case"disallowed_STD3_valid":e&&(r=!0),i+=String.fromCodePoint(a)}}return{string:i,error:r}}(t,e,n);r.string=Cr(r.string);for(var i=r.string.split("."),o=0;o<i.length;++o)try{var s=kr(i[o]);i[o]=s.label,r.error=r.error||s.error}catch(t){r.error=!0}return{string:i.join("."),error:r.error}}var Tr={toASCII:function(t,e,n,r){var i=xr(t,e,n),o=i.string.split(".");if(o=o.map((function(t){try{return d.toASCII(t)}catch(e){return i.error=!0,t}})),r){var s=o.slice(0,o.length-1).join(".").length;(s.length>253||0===s.length)&&(i.error=!0);for(var a=0;a<o.length;++a)if(o.length>63||0===o.length){i.error=!0;break}}return i.error?null:o.join(".")},toUnicode:function(t,e){var n=xr(t,e,Sr.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:Sr},Dr=gr((function(t){const e={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},n=Symbol("failure");function r(t){return d.ucs2.decode(t).length}function i(t,e){const n=t[e];return isNaN(n)?void 0:String.fromCodePoint(n)}function o(t){return t>=48&&t<=57}function s(t){return t>=65&&t<=90||t>=97&&t<=122}function a(t){return o(t)||t>=65&&t<=70||t>=97&&t<=102}function c(t){return"."===t||"%2e"===t.toLowerCase()}function u(t){return 2===t.length&&s(t.codePointAt(0))&&(":"===t[1]||"|"===t[1])}function l(t){return void 0!==e[t]}function h(t){return l(t.scheme)}function p(t){let e=t.toString(16).toUpperCase();return 1===e.length&&(e="0"+e),"%"+e}function f(t){return t<=31||t>126}const m=new Set([32,34,35,60,62,63,96,123,125]);function v(t){return f(t)||m.has(t)}const b=new Set([47,58,59,61,64,91,92,93,94,124]);function g(t){return v(t)||b.has(t)}function y(t,e){const n=String.fromCodePoint(t);return e(t)?function(t){const e=new Buffer(t);let n="";for(let t=0;t<e.length;++t)n+=p(e[t]);return n}(n):n}function w(t){let e=10;if(t.length>=2&&"0"===t.charAt(0)&&"x"===t.charAt(1).toLowerCase()?(t=t.substring(2),e=16):t.length>=2&&"0"===t.charAt(0)&&(t=t.substring(1),e=8),""===t)return 0;return(10===e?/[^0-9]/:16===e?/[^0-9A-Fa-f]/:/[^0-7]/).test(t)?n:parseInt(t,e)}function I(t,e){if("["===t[0])return"]"!==t[t.length-1]?n:function(t){const e=[0,0,0,0,0,0,0,0];let r=0,s=null,c=0;if(58===(t=d.ucs2.decode(t))[c]){if(58!==t[c+1])return n;c+=2,++r,s=r}for(;c<t.length;){if(8===r)return n;if(58===t[c]){if(null!==s)return n;++c,++r,s=r;continue}let u=0,d=0;for(;d<4&&a(t[c]);)u=16*u+parseInt(i(t,c),16),++c,++d;if(46===t[c]){if(0===d)return n;if(c-=d,r>6)return n;let s=0;for(;void 0!==t[c];){let a=null;if(s>0){if(!(46===t[c]&&s<4))return n;++c}if(!o(t[c]))return n;for(;o(t[c]);){const e=parseInt(i(t,c));if(null===a)a=e;else{if(0===a)return n;a=10*a+e}if(a>255)return n;++c}e[r]=256*e[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===t[c]){if(++c,void 0===t[c])return n}else if(void 0!==t[c])return n;e[r]=u,++r}if(null!==s){let t=r-s;for(r=7;0!==r&&t>0;){const n=e[s+t-1];e[s+t-1]=e[r],e[r]=n,--r,--t}}else if(null===s&&8!==r)return n;return e}(t.substring(1,t.length-1));if(!e)return function(t){if(e=t,-1!==e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return n;var e;let r="";const i=d.ucs2.decode(t);for(let t=0;t<i.length;++t)r+=y(i[t],f);return r}(t);const r=function(t){const e=new Buffer(t),n=[];for(let t=0;t<e.length;++t)37!==e[t]?n.push(e[t]):37===e[t]&&a(e[t+1])&&a(e[t+2])?(n.push(parseInt(e.slice(t+1,t+3).toString(),16)),t+=2):n.push(e[t]);return new Buffer(n).toString()}(t),s=Tr.toASCII(r,!1,Tr.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const c=function(t){const e=t.split(".");if(""===e[e.length-1]&&e.length>1&&e.pop(),e.length>4)return t;const r=[];for(const i of e){if(""===i)return t;const e=w(i);if(e===n)return t;r.push(e)}for(let t=0;t<r.length-1;++t)if(r[t]>255)return n;if(r[r.length-1]>=Math.pow(256,5-r.length))return n;let i=r.pop(),o=0;for(const t of r)i+=t*Math.pow(256,3-o),++o;return i}(s);return"number"==typeof c||c===n?c:s}function E(t){return"number"==typeof t?function(t){let e="",n=t;for(let t=1;t<=4;++t)e=String(n%256)+e,4!==t&&(e="."+e),n=Math.floor(n/256);return e}(t):t instanceof Array?"["+function(t){let e="";const n=function(t){let e=null,n=1,r=null,i=0;for(let o=0;o<t.length;++o)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),{idx:e,len:n}}(t).idx;let r=!1;for(let i=0;i<=7;++i)r&&0===t[i]||(r&&(r=!1),n!==i?(e+=t[i].toString(16),7!==i&&(e+=":")):(e+=0===i?"::":":",r=!0));return e}(t)+"]":t}function R(t){const e=t.path;var n;0!==e.length&&("file"===t.scheme&&1===e.length&&(n=e[0],/^[A-Za-z]:$/.test(n))||e.pop())}function j(t){return""!==t.username||""!==t.password}function _(t,e,r,i,o){if(this.pointer=0,this.input=t,this.base=e||null,this.encodingOverride=r||"utf-8",this.stateOverride=o,this.url=i,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const t=function(t){return t.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);t!==this.input&&(this.parseError=!0),this.input=t}const s=function(t){return t.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=o||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=d.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const t=this.input[this.pointer],e=isNaN(t)?void 0:String.fromCodePoint(t),r=this["parse "+this.state](t,e);if(!r)break;if(r===n){this.failure=!0;break}}}_.prototype["parse scheme start"]=function(t,e){if(s(t))this.buffer+=e.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,n;this.state="no scheme",--this.pointer}return!0},_.prototype["parse scheme"]=function(t,e){if(function(t){return s(t)||o(t)}(t)||43===t||45===t||46===t)this.buffer+=e.toLowerCase();else if(58===t){if(this.stateOverride){if(h(this.url)&&!l(this.buffer))return!1;if(!h(this.url)&&l(this.buffer))return!1;if((j(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):h(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":h(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,n;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},_.prototype["parse no scheme"]=function(t){return null===this.base||this.base.cannotBeABaseURL&&35!==t?n:(this.base.cannotBeABaseURL&&35===t?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},_.prototype["parse special relative or authority"]=function(t){return 47===t&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},_.prototype["parse path or authority"]=function(t){return 47===t?this.state="authority":(this.state="path",--this.pointer),!0},_.prototype["parse relative"]=function(t){return this.url.scheme=this.base.scheme,isNaN(t)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===t?this.state="relative slash":63===t?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===t?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):h(this.url)&&92===t?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},_.prototype["parse relative slash"]=function(t){return!h(this.url)||47!==t&&92!==t?47===t?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===t&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},_.prototype["parse special authority slashes"]=function(t){return 47===t&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},_.prototype["parse special authority ignore slashes"]=function(t){return 47!==t&&92!==t?(this.state="authority",--this.pointer):this.parseError=!0,!0},_.prototype["parse authority"]=function(t,e){if(64===t){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const t=r(this.buffer);for(let e=0;e<t;++e){const t=this.buffer.codePointAt(e);if(58===t&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=y(t,g);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(t)||47===t||63===t||35===t||h(this.url)&&92===t){if(this.atFlag&&""===this.buffer)return this.parseError=!0,n;this.pointer-=r(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=e;return!0},_.prototype["parse hostname"]=_.prototype["parse host"]=function(t,e){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==t||this.arrFlag)if(isNaN(t)||47===t||63===t||35===t||h(this.url)&&92===t){if(--this.pointer,h(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(j(this.url)||null!==this.url.port))return this.parseError=!0,!1;const t=I(this.buffer,h(this.url));if(t===n)return n;if(this.url.host=t,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===t?this.arrFlag=!0:93===t&&(this.arrFlag=!1),this.buffer+=e;else{if(""===this.buffer)return this.parseError=!0,n;const t=I(this.buffer,h(this.url));if(t===n)return n;if(this.url.host=t,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},_.prototype["parse port"]=function(t,r){if(o(t))this.buffer+=r;else{if(!(isNaN(t)||47===t||63===t||35===t||h(this.url)&&92===t||this.stateOverride))return this.parseError=!0,n;if(""!==this.buffer){const t=parseInt(this.buffer);if(t>Math.pow(2,16)-1)return this.parseError=!0,n;this.url.port=t===(i=this.url.scheme,e[i])?null:t,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var i;return!0};const S=new Set([47,92,63,35]);_.prototype["parse file"]=function(t){var e,n;return this.url.scheme="file",47===t||92===t?(92===t&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(t)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===t?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===t?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(e=t,n=this.input[this.pointer+1],!s(e)||58!==n&&124!==n)||this.input.length-this.pointer-1>=2&&!S.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),R(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},_.prototype["parse file slash"]=function(t){var e;return 47===t||92===t?(92===t&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(e=this.base.path[0]).length&&s(e.codePointAt(0))&&":"===e[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},_.prototype["parse file host"]=function(t,e){if(isNaN(t)||47===t||92===t||63===t||35===t)if(--this.pointer,!this.stateOverride&&u(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let t=I(this.buffer,h(this.url));if(t===n)return n;if("localhost"===t&&(t=""),this.url.host=t,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=e;return!0},_.prototype["parse path start"]=function(t){return h(this.url)?(92===t&&(this.parseError=!0),this.state="path",47!==t&&92!==t&&--this.pointer):this.stateOverride||63!==t?this.stateOverride||35!==t?void 0!==t&&(this.state="path",47!==t&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},_.prototype["parse path"]=function(t){if(isNaN(t)||47===t||h(this.url)&&92===t||!this.stateOverride&&(63===t||35===t)){if(h(this.url)&&92===t&&(this.parseError=!0),!function(t){return".."===(t=t.toLowerCase())||"%2e."===t||".%2e"===t||"%2e%2e"===t}(this.buffer)?!c(this.buffer)||47===t||h(this.url)&&92===t?c(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&u(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""):(R(this.url),47===t||h(this.url)&&92===t||this.url.path.push("")),this.buffer="","file"===this.url.scheme&&(void 0===t||63===t||35===t))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===t&&(this.url.query="",this.state="query"),35===t&&(this.url.fragment="",this.state="fragment")}else 37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=y(t,v);return!0},_.prototype["parse cannot-be-a-base-URL path"]=function(t){return 63===t?(this.url.query="",this.state="query"):35===t?(this.url.fragment="",this.state="fragment"):(isNaN(t)||37===t||(this.parseError=!0),37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),isNaN(t)||(this.url.path[0]=this.url.path[0]+y(t,f))),!0},_.prototype["parse query"]=function(t,e){if(isNaN(t)||!this.stateOverride&&35===t){h(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const e=new Buffer(this.buffer);for(let t=0;t<e.length;++t)e[t]<33||e[t]>126||34===e[t]||35===e[t]||60===e[t]||62===e[t]?this.url.query+=p(e[t]):this.url.query+=String.fromCodePoint(e[t]);this.buffer="",35===t&&(this.url.fragment="",this.state="fragment")}else 37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=e;return!0},_.prototype["parse fragment"]=function(t){return isNaN(t)||(0===t?this.parseError=!0:(37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=y(t,f))),!0},t.exports.serializeURL=function(t,e){let n=t.scheme+":";if(null!==t.host?(n+="//",""===t.username&&""===t.password||(n+=t.username,""!==t.password&&(n+=":"+t.password),n+="@"),n+=E(t.host),null!==t.port&&(n+=":"+t.port)):null===t.host&&"file"===t.scheme&&(n+="//"),t.cannotBeABaseURL)n+=t.path[0];else for(const e of t.path)n+="/"+e;return null!==t.query&&(n+="?"+t.query),e||null===t.fragment||(n+="#"+t.fragment),n},t.exports.serializeURLOrigin=function(e){switch(e.scheme){case"blob":try{return t.exports.serializeURLOrigin(t.exports.parseURL(e.path[0]))}catch(t){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t){let e=t.scheme+"://";return e+=E(t.host),null!==t.port&&(e+=":"+t.port),e}({scheme:e.scheme,host:e.host,port:e.port});case"file":return"file://";default:return"null"}},t.exports.basicURLParse=function(t,e){void 0===e&&(e={});const n=new _(t,e.baseURL,e.encodingOverride,e.url,e.stateOverride);return n.failure?"failure":n.url},t.exports.setTheUsername=function(t,e){t.username="";const n=d.ucs2.decode(e);for(let e=0;e<n.length;++e)t.username+=y(n[e],g)},t.exports.setThePassword=function(t,e){t.password="";const n=d.ucs2.decode(e);for(let e=0;e<n.length;++e)t.password+=y(n[e],g)},t.exports.serializeHost=E,t.exports.cannotHaveAUsernamePasswordPort=function(t){return null===t.host||""===t.host||t.cannotBeABaseURL||"file"===t.scheme},t.exports.serializeInteger=function(t){return String(t)},t.exports.parseURL=function(e,n){return void 0===n&&(n={}),t.exports.basicURLParse(e,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}}));Dr.serializeURL,Dr.serializeURLOrigin,Dr.basicURLParse,Dr.setTheUsername,Dr.setThePassword,Dr.serializeHost,Dr.cannotHaveAUsernamePasswordPort,Dr.serializeInteger,Dr.parseURL;var Lr=class{constructor(t){const e=t[0],n=t[1];let r=null;if(void 0!==n&&(r=Dr.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const i=Dr.basicURLParse(e,{baseURL:r});if("failure"===i)throw new TypeError("Invalid URL");this._url=i}get href(){return Dr.serializeURL(this._url)}set href(t){const e=Dr.basicURLParse(t);if("failure"===e)throw new TypeError("Invalid URL");this._url=e}get origin(){return Dr.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(t){Dr.basicURLParse(t+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(t){Dr.cannotHaveAUsernamePasswordPort(this._url)||Dr.setTheUsername(this._url,t)}get password(){return this._url.password}set password(t){Dr.cannotHaveAUsernamePasswordPort(this._url)||Dr.setThePassword(this._url,t)}get host(){const t=this._url;return null===t.host?"":null===t.port?Dr.serializeHost(t.host):Dr.serializeHost(t.host)+":"+Dr.serializeInteger(t.port)}set host(t){this._url.cannotBeABaseURL||Dr.basicURLParse(t,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":Dr.serializeHost(this._url.host)}set hostname(t){this._url.cannotBeABaseURL||Dr.basicURLParse(t,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":Dr.serializeInteger(this._url.port)}set port(t){Dr.cannotHaveAUsernamePasswordPort(this._url)||(""===t?this._url.port=null:Dr.basicURLParse(t,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(t){this._url.cannotBeABaseURL||(this._url.path=[],Dr.basicURLParse(t,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(t){const e=this._url;if(""===t)return void(e.query=null);const n="?"===t[0]?t.substring(1):t;e.query="",Dr.basicURLParse(n,{url:e,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(t){if(""===t)return void(this._url.fragment=null);const e="#"===t[0]?t.substring(1):t;this._url.fragment="",Dr.basicURLParse(e,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},Nr=gr((function(t){const e=Rr.implSymbol;function n(r){if(!this||this[e]||!(this instanceof n))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const i=[];for(let t=0;t<arguments.length&&t<2;++t)i[t]=arguments[t];i[0]=wr.USVString(i[0]),void 0!==i[1]&&(i[1]=wr.USVString(i[1])),t.exports.setup(this,i)}n.prototype.toJSON=function(){if(!this||!t.exports.is(this))throw new TypeError("Illegal invocation");const n=[];for(let t=0;t<arguments.length&&t<0;++t)n[t]=arguments[t];return this[e].toJSON.apply(this[e],n)},Object.defineProperty(n.prototype,"href",{get(){return this[e].href},set(t){t=wr.USVString(t),this[e].href=t},enumerable:!0,configurable:!0}),n.prototype.toString=function(){if(!this||!t.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(n.prototype,"origin",{get(){return this[e].origin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get(){return this[e].protocol},set(t){t=wr.USVString(t),this[e].protocol=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[e].username},set(t){t=wr.USVString(t),this[e].username=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[e].password},set(t){t=wr.USVString(t),this[e].password=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[e].host},set(t){t=wr.USVString(t),this[e].host=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[e].hostname},set(t){t=wr.USVString(t),this[e].hostname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[e].port},set(t){t=wr.USVString(t),this[e].port=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[e].pathname},set(t){t=wr.USVString(t),this[e].pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[e].search},set(t){t=wr.USVString(t),this[e].search=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[e].hash},set(t){t=wr.USVString(t),this[e].hash=t},enumerable:!0,configurable:!0}),t.exports={is:t=>!!t&&t[e]instanceof Lr,create(t,e){let r=Object.create(n.prototype);return this.setup(r,t,e),r},setup(t,n,r){r||(r={}),r.wrapper=t,t[e]=new Lr(n,r),t[e][Rr.wrapperSymbol]=t},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));Nr.is,Nr.create,Nr.setup,Nr.expose;var qr={URL:Nr.interface,serializeURL:Dr.serializeURL,serializeURLOrigin:Dr.serializeURLOrigin,basicURLParse:Dr.basicURLParse,setTheUsername:Dr.setTheUsername,setThePassword:Dr.setThePassword,serializeHost:Dr.serializeHost,serializeInteger:Dr.serializeInteger,parseURL:Dr.parseURL};const Br=o.Readable,Fr=Symbol("buffer"),Mr=Symbol("type");class Gr{constructor(){this[Mr]="";const t=arguments[0],e=arguments[1],n=[];let r=0;if(t){const e=t,i=Number(e.length);for(let t=0;t<i;t++){const i=e[t];let o;o=i instanceof Buffer?i:ArrayBuffer.isView(i)?Buffer.from(i.buffer,i.byteOffset,i.byteLength):i instanceof ArrayBuffer?Buffer.from(i):i instanceof Gr?i[Fr]:Buffer.from("string"==typeof i?i:String(i)),r+=o.length,n.push(o)}}this[Fr]=Buffer.concat(n);let i=e&&void 0!==e.type&&String(e.type).toLowerCase();i&&!/[^\u0020-\u007E]/.test(i)&&(this[Mr]=i)}get size(){return this[Fr].length}get type(){return this[Mr]}text(){return Promise.resolve(this[Fr].toString())}arrayBuffer(){const t=this[Fr],e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(e)}stream(){const t=new Br;return t._read=function(){},t.push(this[Fr]),t.push(null),t}toString(){return"[object Blob]"}slice(){const t=this.size,e=arguments[0],n=arguments[1];let r,i;r=void 0===e?0:e<0?Math.max(t+e,0):Math.min(e,t),i=void 0===n?t:n<0?Math.max(t+n,0):Math.min(n,t);const o=Math.max(i-r,0),s=this[Fr].slice(r,r+o),a=new Gr([],{type:arguments[2]});return a[Fr]=s,a}}function zr(t,e,n){Error.call(this,t),this.message=t,this.type=e,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let Jr;Object.defineProperties(Gr.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(Gr.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),zr.prototype=Object.create(Error.prototype),zr.prototype.constructor=zr,zr.prototype.name="FetchError";try{Jr=require("encoding").convert}catch(t){}const Wr=Symbol("Body internals"),$r=o.PassThrough;function Hr(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.size;let i=void 0===r?0:r;var s=n.timeout;let a=void 0===s?0:s;null==t?t=null:Zr(t)?t=Buffer.from(t.toString()):Yr(t)||Buffer.isBuffer(t)||("[object ArrayBuffer]"===Object.prototype.toString.call(t)?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof o||(t=Buffer.from(String(t)))),this[Wr]={body:t,disturbed:!1,error:null},this.size=i,this.timeout=a,t instanceof o&&t.on("error",(function(t){const n="AbortError"===t.name?t:new zr(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[Wr].error=n}))}function Vr(){var t=this;if(this[Wr].disturbed)return Hr.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[Wr].disturbed=!0,this[Wr].error)return Hr.Promise.reject(this[Wr].error);let e=this.body;if(null===e)return Hr.Promise.resolve(Buffer.alloc(0));if(Yr(e)&&(e=e.stream()),Buffer.isBuffer(e))return Hr.Promise.resolve(e);if(!(e instanceof o))return Hr.Promise.resolve(Buffer.alloc(0));let n=[],r=0,i=!1;return new Hr.Promise((function(o,s){let a;t.timeout&&(a=setTimeout((function(){i=!0,s(new zr(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))}),t.timeout)),e.on("error",(function(e){"AbortError"===e.name?(i=!0,s(e)):s(new zr(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e))})),e.on("data",(function(e){if(!i&&null!==e){if(t.size&&r+e.length>t.size)return i=!0,void s(new zr(`content size at ${t.url} over limit: ${t.size}`,"max-size"));r+=e.length,n.push(e)}})),e.on("end",(function(){if(!i){clearTimeout(a);try{o(Buffer.concat(n,r))}catch(e){s(new zr(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}}))}))}function Zr(t){return"object"==typeof t&&"function"==typeof t.append&&"function"==typeof t.delete&&"function"==typeof t.get&&"function"==typeof t.getAll&&"function"==typeof t.has&&"function"==typeof t.set&&("URLSearchParams"===t.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(t)||"function"==typeof t.sort)}function Yr(t){return"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}function Kr(t){let e,n,r=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof o&&"function"!=typeof r.getBoundary&&(e=new $r,n=new $r,r.pipe(e),r.pipe(n),t[Wr].body=e,r=n),r}function Xr(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":Zr(t)?"application/x-www-form-urlencoded;charset=UTF-8":Yr(t)?t.type||null:Buffer.isBuffer(t)||"[object ArrayBuffer]"===Object.prototype.toString.call(t)||ArrayBuffer.isView(t)?null:"function"==typeof t.getBoundary?`multipart/form-data;boundary=${t.getBoundary()}`:t instanceof o?null:"text/plain;charset=UTF-8"}function Qr(t){const e=t.body;return null===e?0:Yr(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}Hr.prototype={get body(){return this[Wr].body},get bodyUsed(){return this[Wr].disturbed},arrayBuffer(){return Vr.call(this).then((function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}))},blob(){let t=this.headers&&this.headers.get("content-type")||"";return Vr.call(this).then((function(e){return Object.assign(new Gr([],{type:t.toLowerCase()}),{[Fr]:e})}))},json(){var t=this;return Vr.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return Hr.Promise.reject(new zr(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return Vr.call(this).then((function(t){return t.toString()}))},buffer(){return Vr.call(this)},textConverted(){var t=this;return Vr.call(this).then((function(e){return function(t,e){if("function"!=typeof Jr)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=e.get("content-type");let r,i,o="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));i=t.slice(0,1024).toString(),!r&&i&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(i));!r&&i&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(i),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(i),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop())));!r&&i&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(i));r&&(o=r.pop(),"gb2312"!==o&&"gbk"!==o||(o="gb18030"));return Jr(t,"UTF-8",o).toString()}(e,t.headers)}))}},Object.defineProperties(Hr.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),Hr.mixIn=function(t){for(const e of Object.getOwnPropertyNames(Hr.prototype))if(!(e in t)){const n=Object.getOwnPropertyDescriptor(Hr.prototype,e);Object.defineProperty(t,e,n)}},Hr.Promise=global.Promise;const ti=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,ei=/[^\t\x20-\x7e\x80-\xff]/;function ni(t){if(t=`${t}`,ti.test(t)||""===t)throw new TypeError(`${t} is not a legal HTTP header name`)}function ri(t){if(t=`${t}`,ei.test(t))throw new TypeError(`${t} is not a legal HTTP header value`)}function ii(t,e){e=e.toLowerCase();for(const n in t)if(n.toLowerCase()===e)return n}const oi=Symbol("map");class si{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[oi]=Object.create(null),t instanceof si){const e=t.raw(),n=Object.keys(e);for(const t of n)for(const n of e[t])this.append(t,n)}else if(null==t);else{if("object"!=typeof t)throw new TypeError("Provided initializer must be an object");{const e=t[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const n=[];for(const e of t){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(e))}for(const t of n){if(2!==t.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(t[0],t[1])}}else for(const e of Object.keys(t)){const n=t[e];this.append(e,n)}}}}get(t){ni(t=`${t}`);const e=ii(this[oi],t);return void 0===e?null:this[oi][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=ai(this),r=0;for(;r<n.length;){var i=n[r];const o=i[0],s=i[1];t.call(e,s,o,this),n=ai(this),r++}}set(t,e){e=`${e}`,ni(t=`${t}`),ri(e);const n=ii(this[oi],t);this[oi][void 0!==n?n:t]=[e]}append(t,e){e=`${e}`,ni(t=`${t}`),ri(e);const n=ii(this[oi],t);void 0!==n?this[oi][n].push(e):this[oi][t]=[e]}has(t){return ni(t=`${t}`),void 0!==ii(this[oi],t)}delete(t){ni(t=`${t}`);const e=ii(this[oi],t);void 0!==e&&delete this[oi][e]}raw(){return this[oi]}keys(){return ui(this,"key")}values(){return ui(this,"value")}[Symbol.iterator](){return ui(this,"key+value")}}function ai(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(t[oi]).sort().map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[oi][e].join(", ")}:function(e){return[e.toLowerCase(),t[oi][e].join(", ")]})}si.prototype.entries=si.prototype[Symbol.iterator],Object.defineProperty(si.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(si.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const ci=Symbol("internal");function ui(t,e){const n=Object.create(di);return n[ci]={target:t,kind:e,index:0},n}const di=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==di)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[ci];const e=t.target,n=t.kind,r=t.index,i=ai(e,n);return r>=i.length?{value:void 0,done:!0}:(this[ci].index=r+1,{value:i[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function li(t){const e=Object.assign({__proto__:null},t[oi]),n=ii(t[oi],"Host");return void 0!==n&&(e[n]=e[n][0]),e}Object.defineProperty(di,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const hi=Symbol("Response internals"),pi=a.STATUS_CODES;class fi{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Hr.call(this,t,e);const n=e.status||200,r=new si(e.headers);if(null!=t&&!r.has("Content-Type")){const e=Xr(t);e&&r.append("Content-Type",e)}this[hi]={url:e.url,status:n,statusText:e.statusText||pi[n],headers:r,counter:e.counter}}get url(){return this[hi].url||""}get status(){return this[hi].status}get ok(){return this[hi].status>=200&&this[hi].status<300}get redirected(){return this[hi].counter>0}get statusText(){return this[hi].statusText}get headers(){return this[hi].headers}clone(){return new fi(Kr(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Hr.mixIn(fi.prototype),Object.defineProperties(fi.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(fi.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const mi=Symbol("Request internals"),vi=c.URL||qr.URL,bi=c.parse,gi=c.format;function yi(t){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(t)&&(t=new vi(t).toString()),bi(t)}const wi="destroy"in o.Readable.prototype;function Ii(t){return"object"==typeof t&&"object"==typeof t[mi]}class Ei{constructor(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ii(t)?e=yi(t.url):(e=t&&t.href?yi(t.href):yi(`${t}`),t={});let r=n.method||t.method||"GET";if(r=r.toUpperCase(),(null!=n.body||Ii(t)&&null!==t.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let i=null!=n.body?n.body:Ii(t)&&null!==t.body?Kr(t):null;Hr.call(this,i,{timeout:n.timeout||t.timeout||0,size:n.size||t.size||0});const o=new si(n.headers||t.headers||{});if(null!=i&&!o.has("Content-Type")){const t=Xr(i);t&&o.append("Content-Type",t)}let s=Ii(t)?t.signal:null;if("signal"in n&&(s=n.signal),null!=s&&!function(t){const e=t&&"object"==typeof t&&Object.getPrototypeOf(t);return!(!e||"AbortSignal"!==e.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[mi]={method:r,redirect:n.redirect||t.redirect||"follow",headers:o,parsedURL:e,signal:s},this.follow=void 0!==n.follow?n.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===t.compress||t.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent}get method(){return this[mi].method}get url(){return gi(this[mi].parsedURL)}get headers(){return this[mi].headers}get redirect(){return this[mi].redirect}get signal(){return this[mi].signal}clone(){return new Ei(this)}}function Ri(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}Hr.mixIn(Ei.prototype),Object.defineProperty(Ei.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Ei.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Ri.prototype=Object.create(Error.prototype),Ri.prototype.constructor=Ri,Ri.prototype.name="AbortError";const ji=c.URL||qr.URL,_i=o.PassThrough;function Si(t,e){if(!Si.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return Hr.Promise=Si.Promise,new Si.Promise((function(n,r){const i=new Ei(t,e),s=function(t){const e=t[mi].parsedURL,n=new si(t[mi].headers);if(n.has("Accept")||n.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(t.signal&&t.body instanceof o.Readable&&!wi)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let r=null;if(null==t.body&&/^(POST|PUT)$/i.test(t.method)&&(r="0"),null!=t.body){const e=Qr(t);"number"==typeof e&&(r=String(e))}r&&n.set("Content-Length",r),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),t.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let i=t.agent;return"function"==typeof i&&(i=i(e)),n.has("Connection")||i||n.set("Connection","close"),Object.assign({},e,{method:t.method,headers:li(n),agent:i})}(i),c=("https:"===s.protocol?l:a).request,u=i.signal;let d=null;const h=function(){let t=new Ri("The user aborted a request.");r(t),i.body&&i.body instanceof o.Readable&&i.body.destroy(t),d&&d.body&&d.body.emit("error",t)};if(u&&u.aborted)return void h();const f=function(){h(),b()},m=c(s);let v;function b(){m.abort(),u&&u.removeEventListener("abort",f),clearTimeout(v)}u&&u.addEventListener("abort",f),i.timeout&&m.once("socket",(function(t){v=setTimeout((function(){r(new zr(`network timeout at: ${i.url}`,"request-timeout")),b()}),i.timeout)})),m.on("error",(function(t){r(new zr(`request to ${i.url} failed, reason: ${t.message}`,"system",t)),b()})),m.on("response",(function(t){clearTimeout(v);const e=function(t){const e=new si;for(const n of Object.keys(t))if(!ti.test(n))if(Array.isArray(t[n]))for(const r of t[n])ei.test(r)||(void 0===e[oi][n]?e[oi][n]=[r]:e[oi][n].push(r));else ei.test(t[n])||(e[oi][n]=[t[n]]);return e}(t.headers);if(Si.isRedirect(t.statusCode)){const o=e.get("Location");let s=null;try{s=null===o?null:new ji(o,i.url).toString()}catch(t){if("manual"!==i.redirect)return r(new zr(`uri requested responds with an invalid redirect URL: ${o}`,"invalid-redirect")),void b()}switch(i.redirect){case"error":return r(new zr(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),void b();case"manual":if(null!==s)try{e.set("Location",s)}catch(t){r(t)}break;case"follow":if(null===s)break;if(i.counter>=i.follow)return r(new zr(`maximum redirect reached at: ${i.url}`,"max-redirect")),void b();const o={headers:new si(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:i.body,signal:i.signal,timeout:i.timeout,size:i.size};if(!function(t,e){const n=new ji(e).hostname,r=new ji(t).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(i.url,s))for(const t of["authorization","www-authenticate","cookie","cookie2"])o.headers.delete(t);return 303!==t.statusCode&&i.body&&null===Qr(i)?(r(new zr("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void b()):(303!==t.statusCode&&(301!==t.statusCode&&302!==t.statusCode||"POST"!==i.method)||(o.method="GET",o.body=void 0,o.headers.delete("content-length")),n(Si(new Ei(s,o))),void b())}}t.once("end",(function(){u&&u.removeEventListener("abort",f)}));let o=t.pipe(new _i);const s={url:i.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:i.size,timeout:i.timeout,counter:i.counter},a=e.get("Content-Encoding");if(!i.compress||"HEAD"===i.method||null===a||204===t.statusCode||304===t.statusCode)return d=new fi(o,s),void n(d);const c={flush:p.Z_SYNC_FLUSH,finishFlush:p.Z_SYNC_FLUSH};if("gzip"==a||"x-gzip"==a)return o=o.pipe(p.createGunzip(c)),d=new fi(o,s),void n(d);if("deflate"!=a&&"x-deflate"!=a){if("br"==a&&"function"==typeof p.createBrotliDecompress)return o=o.pipe(p.createBrotliDecompress()),d=new fi(o,s),void n(d);d=new fi(o,s),n(d)}else{t.pipe(new _i).once("data",(function(t){o=8==(15&t[0])?o.pipe(p.createInflate()):o.pipe(p.createInflateRaw()),d=new fi(o,s),n(d)}))}})),function(t,e){const n=e.body;null===n?t.end():Yr(n)?n.stream().pipe(t):Buffer.isBuffer(n)?(t.write(n),t.end()):n.pipe(t)}(m,i)}))}Si.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},Si.Promise=global.Promise;var Ci="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,Ui=Ci?Si:window.fetch;var Ai=function(t){return Array.isArray(t)?t:[t]},Pi=function(t,e){return H(void 0,void 0,void 0,(function(){var n;return V(this,(function(r){return n=Promise.resolve([]),[2,t.reduce((function(t,n){return t.then((function(t){return e(n).then((function(e){return t.push(e),t}))}))}),n)]}))}))},Oi=function(t){function e(e){void 0===e&&(e=8192);var n=t.call(this)||this;return n.bufferDefaultSize=e,n._size=0,n.buffer=Buffer.alloc(n.bufferDefaultSize),n}return W(e,t),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.getContentsAsString=function(t,e){void 0===t&&(t="utf8");var n=this.buffer.toString(t,0,Math.min(e||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},e.prototype.adaptBuffer=function(t){if(this.buffer.length-this.size<t){var e=Math.ceil((t-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*e);this.buffer.copy(n,0,0,this.size),this.buffer=n}},e.prototype._write=function(t,e,n){this.adaptBuffer(t.length),t.copy(this.buffer,this.size,0),this._size+=t.length,n()},e}(o.Writable),ki=function(){function t(t,e){this.contextProvider=t,this.agent=e}return t.prototype.getServiceDetails=function(t,e){return H(this,void 0,void 0,(function(){return V(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/services/").concat(e))]}))}))},t.prototype.getAddonDetails=function(t,e){return H(this,void 0,void 0,(function(){return V(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/addons/").concat(e))]}))}))},t.prototype.fetch=function(t,e){return H(this,void 0,void 0,(function(){var n,r,i,o,s,a=this;return V(this,(function(c){switch(c.label){case 0:return n="Error while trying to connect, please try again.",r=vr({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},$($({},e),{agent:this.agent})),[4,nc(2)((function(){return H(a,void 0,void 0,(function(){return V(this,(function(e){return[2,Ui(t,r)]}))}))})).catch((function(){throw new Error(n)}))];case 1:return(i=c.sent()).ok?[3,3]:[4,i.text()];case 2:o=c.sent(),s=n;try{s=JSON.parse(o)}catch(t){s=null!=o?o:n}finally{throw new Error(JSON.stringify(s))}case 3:return[4,i.json()];case 4:return[2,c.sent()]}}))}))},t}(),xi=function(t,e,n){return H(void 0,void 0,void 0,(function(){var r,i,o,s,a;return V(this,(function(c){switch(c.label){case 0:if(r=Li(e||"127.0.0.1"),(i=Li(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===f.platform()&&(o=function(t){return H(void 0,void 0,void 0,(function(){var e;return V(this,(function(n){switch(n.label){case 0:return e="lo0 alias ".concat(t," up"),[4,Di.apply(void 0,e.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,c.label=1;case 1:return s<=i?(a=Ni(s),[4,Ti(t,a)]):[3,6];case 2:return c.sent()?o?[4,o(a)]:[3,4]:[3,5];case 3:c.sent(),c.label=4;case 4:return[2,a];case 5:return s+=1,[3,1];case 6:throw new Error("Not possible to assign port '".concat(t,"' to an IP address on this machine. Please check if there is already a service running with this port which binds to the wildcard host address (0.0.0.0) and stop this service."))}}))}))},Ti=function(t,e){return new Promise((function(n){var r=new b,i=!1;r.on("connect",(function(){i=!0,r.destroy()})),r.setTimeout(400),r.on("timeout",(function(){i=!1,r.destroy()})),r.on("error",(function(){i=!1})),r.on("close",(function(){n(!i)})),e?r.connect(t,e):r.connect(t)}))},Di=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return H(void 0,void 0,void 0,(function(){return V(this,(function(e){switch(e.label){case 0:return[4,qi("/sbin/ifconfig",t).resultPromise];case 1:return[2,e.sent()]}}))}))},Li=function(t){var e=t.split(".").reverse();if(4!==e.length)throw new Error("Invalid ip address: ".concat(t));for(var n=0,r=0;r<4;r+=1){var i=Number.parseInt(e[r],10);if(i<0||i>255)throw new Error("Invalid ip address: ".concat(t));n+=i<<8*r}return n},Ni=function(t){if(!Number.isSafeInteger(t))throw new Error("Number is not an integer");if(t<0||t>4294967295)throw new Error("Number is out of range 0x0-0xffffffff");for(var e=[],n=0;n<4;n+=1)e.push(t>>8*n&255);return e.reverse().join(".")},qi=function(t,e,n){var i=r(t,e,$({windowsHide:!0},n)),o=new Promise((function(r,o){var s="",a="";(null===(null==n?void 0:n.stdio)||void 0===(null==n?void 0:n.stdio))&&(i.stdout&&i.stdout.on("data",(function(t){s+=t})),i.stderr&&i.stderr.on("data",(function(t){a+=t}))),i.on("close",(function(n){var i={code:n,stdout:s,stderr:a};if(0!==n){var c="Error during execution of command '".concat(t," ").concat(e.join(" "),"': ").concat(a);o({message:c,result:i})}else r(i)}))}));return{process:i,resultPromise:o}},Bi=function(t,e,n){return H(void 0,void 0,void 0,(function(){var r,i;return V(this,(function(o){switch(o.label){case 0:return r=Fi(t,10),[4,g.promises.writeFile(r,e,n)];case 1:o.sent(),o.label=2;case 2:return o.trys.push([2,4,,6]),[4,g.promises.rename(r,t)];case 3:return o.sent(),[3,6];case 4:return i=o.sent(),[4,g.promises.unlink(r).catch((function(){}))];case 5:throw o.sent(),i;case 6:return[2]}}))}))},Fi=function(t,e){for(var n,r=R.dirname(t),i=R.basename(t),o=0;null===(n=o<e)||void 0===n||n;o+=1){var s=Z([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(i),c=R.join(r,a);if(!g.existsSync(c))return c}throw new Error("Could not write file to file '".concat(t,"'."))},Mi="win32"===process.platform?"\r\n":"\n",Gi=function(){function t(t,e){this.nodes=t,this.config=e}return t.prototype.add=function(t,e,n){var r=this;if(0===e.length)return this;var i=this.findOrCreateEntry(t,n);return e.forEach((function(t){if(!i.hosts.find((function(e){return e.host===t}))){var e=1;0===i.hosts.length&&(e=r.config.indent-"".concat(i.ipPrefixWhitespace).concat(i.ip).length),i.hosts.push({whitespace:" ".repeat(e<1?1:e),host:t})}})),this},t.prototype.remove=function(t,e){var n=this;return this.findEntries(t).forEach((function(t){e.forEach((function(e){var r=t.hosts.findIndex((function(t){return t.host===e}));r<0||(0===r&&void 0!==t.hosts[1]&&(t.hosts[1].whitespace=t.hosts[0].whitespace),t.hosts.splice(r,1),0===t.hosts.length&&n.removeEntry(t))}))})),this},t.prototype.removeHosts=function(t){var e=this;Zi(this.nodes,"entry").forEach((function(n){e.remove(n.ip,t)}))},t.prototype.removeIps=function(t){var e=this;return t.forEach((function(t){e.findEntries(t).forEach((function(t){return e.removeEntry(t)}))})),this},t.prototype.resolveHosts=function(t){return dr(this.findEntries(t),(function(t){return t.hosts.map((function(t){return t.host}))}))},t.prototype.resolveIps=function(t){return Zi(this.nodes,"entry").filter((function(e){return e.hosts.some((function(e){return e.host===t}))})).map((function(t){return t.ip}))},t.prototype.toString=function(){return $i(this.nodes,this.config.eol)},t.prototype.removeEntry=function(t){var e,n="number"==typeof(e=t)||at(e)&&"[object Number]"==st(e)?t:this.nodes.findIndex((function(e){return e===t}));n<0||this.nodes.splice(n,1)},t.prototype.findEntries=function(t){return Zi(this.nodes,"entry").filter((function(e){return e.ip===t}))},t.prototype.findOrCreateEntry=function(t,e){var n=this.findEntries(t)[0];if(n)return n;var r=this.makeEntry(t);if(e){var i=Wi(e),o=this.nodes.findIndex((function(t){return"comment"===t.type&&t.line===i}));if(o>=0)this.insertAt(o+1,r);else{var s="blank"!==this.nodes[this.nodes.length-1].type?[zi(),Ji(i),r]:[Ji(i),r];this.insertAt.apply(this,Z([this.nodes.length],s,!1))}}else this.insertAt(this.nodes.length,r);return r},t.prototype.insertAt=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(e=this.nodes).splice.apply(e,Z([t,0],n,!1))},t.prototype.makeEntry=function(t,e){var n=this.config.ipPrefixWhitespace;return $({type:"entry",ip:t,ipPrefixWhitespace:n,hosts:[]},e)},t.fromNodes=function(e,n){var r,i;return new t(e.filter((function(t){return"eol"!==t.type})),{eol:null!==(r=null==n?void 0:n.eol)&&void 0!==r?r:function(){var t,n=Zi(e,"eol").map((function(t){return t.line}));return null!==(t=Yi(n))&&void 0!==t?t:Mi}(),indent:null!==(i=null==n?void 0:n.indent)&&void 0!==i?i:function(){var t,n=dr(Zi(e,"entry"),(function(t){var e=t.ipPrefixWhitespace,n=t.ip,r=t.hosts[0];return r?["".concat(e).concat(n).concat(r.whitespace).length]:[]}));return null!==(t=Yi(n))&&void 0!==t?t:17}(),ipPrefixWhitespace:""})},t.parse=function(t,e){return this.fromNodes(Hi(t),e)},t}(),zi=function(){return{type:"blank",line:""}},Ji=function(t){return{type:"comment",line:Wi(t)}},Wi=function(t){return t.startsWith("#")?t:"# ".concat(t)},$i=function(t,e){var n=t.map((function(t){switch(t.type){case"entry":var e=t.hosts.map((function(t){var e=t.whitespace,n=t.host;return"".concat(e).concat(n)})).join("");return"".concat(t.ipPrefixWhitespace).concat(t.ip).concat(e);case"blank":case"comment":case"invalid":return t.line;default:return""}}));return n.join(null!=e?e:Mi)},Hi=function(t){return t.split(/(\r?\n)/).map((function(t){return function(t){return t.match(/^\s*#.*$/)}(t)?{type:"comment",line:t}:function(t){return t.match(/^(\r?\n)$/)}(t)?{type:"eol",line:t}:function(t){return t.match(/^\s*$/)}(t)?{type:"blank",line:t}:Vi(t)}))},Vi=function(t){var e=t.match(/^(\s*)(\S+)(.+)?$/);if(!e)return{type:"invalid",line:t};var n=e[1],r=e[2],i=e.slice(3),o=!1,s=dr(i.filter((function(t){return void 0!==t})),(function(t){var e=t.match(/(\s+)(\S+)/g);return e?e.map((function(t){var e=t.match(/^(\s+)(\S+)$/);e||(o=!0);var n=null!=e?e:[];return{whitespace:n[1],host:n[2]}})):(o=!0,[])}));return o?{type:"invalid",line:t}:{type:"entry",ipPrefixWhitespace:n,ip:r,hosts:s}},Zi=function(t,e){return t.filter((function(t){return t.type===e}))},Yi=function(t){var e=new Map;t.forEach((function(t){var n;e.set(t,(null!==(n=e.get(t))&&void 0!==n?n:0)+1)}));var n=fr(Array.from(e.entries()),(function(t){return t[1]}));if(n)return n[0]},Ki="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",Xi=function(){function t(t){this.ast=Gi.fromNodes([]);var e={writeMode:"atomic",hostsFile:Ki};this.config=$($({},e),t)}return t.prototype.add=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!pr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!pr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.add(t,e,this.config.header),this},t.prototype.remove=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!pr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!pr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.remove(t,e),this},t.prototype.removeHosts=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach((function(t){if(!pr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.removeHosts(t),this},t.prototype.removeIps=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach((function(t){if(!pr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."))})),this.ast.removeIps(t),this},t.prototype.read=function(){return H(this,void 0,void 0,(function(){var t;return V(this,(function(e){switch(e.label){case 0:return[4,g.promises.readFile(this.config.hostsFile)];case 1:return t=e.sent(),this.ast=Gi.parse(t.toString(),this.config),[2,this]}}))}))},t.prototype.write=function(t){return H(this,void 0,void 0,(function(){var e,n,r,i;return V(this,(function(o){switch(o.label){case 0:switch(e=$($({},this.config),t),n=e.hostsFile,r=e.writeMode,i=this.ast.toString(),r){case void 0:case"atomic":return[3,1];case"standard":return[3,3];case"disabled":return[3,5]}return[3,5];case 1:return[4,Bi(n,i)];case 2:case 4:return o.sent(),[3,6];case 3:return[4,g.promises.writeFile(n,i)];case 5:return[3,6];case 6:return[2,this]}}))}))},t.prototype.backup=function(t){return H(this,void 0,void 0,(function(){var e,n,r,i;return V(this,(function(o){switch(o.label){case 0:return g.existsSync(this.config.hostsFile)?(e=R.dirname(this.config.hostsFile),n=R.basename(this.config.hostsFile),r="".concat(n).concat(t.suffix),i=R.resolve(e,r),g.existsSync(i)&&!t.rewrite?[3,2]:[4,g.promises.copyFile(this.config.hostsFile,i)]):[2];case 1:o.sent(),o.label=2;case 2:return[2]}}))}))},t.load=function(e){return H(this,void 0,void 0,(function(){return V(this,(function(n){switch(n.label){case 0:return[4,new t(e).read()];case 1:return[2,n.sent()]}}))}))},t}(),Qi=function(){function t(){this.previousPromise=Promise.resolve(),this._queueLength=0}return Object.defineProperty(t.prototype,"queueLength",{get:function(){return this._queueLength},enumerable:!1,configurable:!0}),t.prototype.enter=function(t){return H(this,void 0,void 0,(function(){var e,n=this;return V(this,(function(r){return this._queueLength+=1,e=this.previousPromise.then((function(){return n._queueLength-=1,t()}),(function(){return n._queueLength-=1,t()})),this.previousPromise=e,[2,e]}))}))},t}(),to=function t(e,n){if(e&&n)return t(e)(n);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){r[t]=e[t]})),r;function r(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];var r=e.apply(this,t),i=t[t.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(t){r[t]=i[t]})),r}};var eo=to(ro),no=to(io);function ro(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function io(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return e.onceError=n+" shouldn't be called more than once",e.called=!1,e}ro.proto=ro((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return ro(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return io(this)},configurable:!0})})),eo.strict=no;var oo,so=function(){},ao=function(t,e,n){if("function"==typeof e)return ao(t,null,e);e||(e={}),n=eo(n||so);var r=t._writableState,i=t._readableState,o=e.readable||!1!==e.readable&&t.readable,s=e.writable||!1!==e.writable&&t.writable,a=!1,c=function(){t.writable||u()},u=function(){s=!1,o||n.call(t)},d=function(){o=!1,s||n.call(t)},l=function(e){n.call(t,e?new Error("exited with error code: "+e):null)},h=function(e){n.call(t,e)},p=function(){process.nextTick(f)},f=function(){if(!a)return(!o||i&&i.ended&&!i.destroyed)&&(!s||r&&r.ended&&!r.destroyed)?void 0:n.call(t,new Error("premature close"))},m=function(){t.req.on("finish",u)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?s&&!r&&(t.on("end",c),t.on("close",c)):(t.on("complete",u),t.on("abort",p),t.req?m():t.on("request",m)),function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length}(t)&&t.on("exit",l),t.on("end",d),t.on("finish",u),!1!==e.error&&t.on("error",h),t.on("close",p),function(){a=!0,t.removeListener("complete",u),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",u),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("exit",l),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",p)}},co=ao;try{oo=g}catch(t){}var uo=function(){},lo=/^v?\.0/.test(process.version),ho=function(t){return"function"==typeof t},po=function(t,e,n,r){r=eo(r);var i=!1;t.on("close",(function(){i=!0})),co(t,{readable:e,writable:n},(function(t){if(t)return r(t);i=!0,r()}));var o=!1;return function(e){if(!i&&!o)return o=!0,function(t){return!!lo&&!!oo&&(t instanceof(oo.ReadStream||uo)||t instanceof(oo.WriteStream||uo))&&ho(t.close)}(t)?t.close(uo):function(t){return t.setHeader&&ho(t.abort)}(t)?t.abort():ho(t.destroy)?t.destroy():void r(e||new Error("stream was destroyed"))}},fo=function(t){t()},mo=function(t,e){return t.pipe(e)},vo=function(){var t,e=Array.prototype.slice.call(arguments),n=ho(e[e.length-1]||uo)&&e.pop()||uo;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r=e.map((function(i,o){var s=o<e.length-1;return po(i,s,o>0,(function(e){t||(t=e),e&&r.forEach(fo),s||(r.forEach(fo),n(t))}))}));return e.reduce(mo)};const bo=["nodebuffer","arraybuffer","fragments"],go="undefined"!=typeof Blob;go&&bo.push("blob");var yo={BINARY_TYPES:bo,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:go,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},wo="function"==typeof __webpack_require__?__non_webpack_require__:br,Io=process.config&&process.config.variables||{},Eo=!!process.env.PREBUILDS_ONLY,Ro=process.versions.modules,jo=!(!process.versions||!process.versions.electron)||!!process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",_o=process.env.npm_config_arch||f.arch(),So=process.env.npm_config_platform||f.platform(),Co=process.env.LIBC||(function(t){return"linux"===t&&g.existsSync("/etc/alpine-release")}(So)?"musl":"glibc"),Uo=process.env.ARM_VERSION||("arm64"===_o?"8":Io.arm_version)||"",Ao=(process.versions.uv||"").split(".")[0],Po=Oo;function Oo(t){return wo(Oo.resolve(t))}function ko(t){try{return g.readdirSync(t)}catch(t){return[]}}function xo(t,e){var n=ko(t).filter(e);return n[0]&&R.join(t,n[0])}function To(t){return/\.node$/.test(t)}function Do(t){var e=t.split("-");if(2===e.length){var n=e[0],r=e[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:t,platform:n,architectures:r}}}function Lo(t,e){return function(n){return null!=n&&(n.platform===t&&n.architectures.includes(e))}}function No(t,e){return t.architectures.length-e.architectures.length}function qo(t){var e=t.split("."),n={file:t,specificity:0};if("node"===e.pop()){for(var r=0;r<e.length;r++){var i=e[r];if("node"===i||"electron"===i||"node-webkit"===i)n.runtime=i;else if("napi"===i)n.napi=!0;else if("abi"===i.slice(0,3))n.abi=i.slice(3);else if("uv"===i.slice(0,2))n.uv=i.slice(2);else if("armv"===i.slice(0,4))n.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;n.libc=i}n.specificity++}return n}}function Bo(t,e){return function(n){return null!=n&&(!(n.runtime&&n.runtime!==t&&!function(t){return"node"===t.runtime&&t.napi}(n))&&(!(n.abi&&n.abi!==e&&!n.napi)&&((!n.uv||n.uv===Ao)&&((!n.armv||n.armv===Uo)&&(!n.libc||n.libc===Co)))))}}function Fo(t){return function(e,n){return e.runtime!==n.runtime?e.runtime===t?-1:1:e.abi!==n.abi?e.abi?-1:1:e.specificity!==n.specificity?e.specificity>n.specificity?-1:1:0}}Oo.resolve=Oo.path=function(t){t=R.resolve(t||".");try{var e=wo(R.join(t,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[e+"_PREBUILD"]&&(t=process.env[e+"_PREBUILD"])}catch(t){}if(!Eo){var n=xo(R.join(t,"build/Release"),To);if(n)return n;var r=xo(R.join(t,"build/Debug"),To);if(r)return r}var i=a(t);if(i)return i;var o=a(R.dirname(process.execPath));if(o)return o;var s=["platform="+So,"arch="+_o,"runtime="+jo,"abi="+Ro,"uv="+Ao,Uo?"armv="+Uo:"","libc="+Co,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+s+"\n loaded from: "+t+"\n");function a(t){var e=ko(R.join(t,"prebuilds")).map(Do).filter(Lo(So,_o)).sort(No)[0];if(e){var n=R.join(t,"prebuilds",e.name),r=ko(n).map(qo).filter(Bo(jo,Ro)).sort(Fo(jo))[0];return r?R.join(n,r.file):void 0}}},Oo.parseTags=qo,Oo.matchTags=Bo,Oo.compareTags=Fo,Oo.parseTuple=Do,Oo.matchTuple=Lo,Oo.compareTuples=No;var Mo=gr((function(t){const e="function"==typeof __webpack_require__?__non_webpack_require__:br;"function"==typeof e.addon?t.exports=e.addon.bind(e):t.exports=Po}));var Go={mask:(t,e,n,r,i)=>{for(var o=0;o<i;o++)n[r+o]=t[o]^e[3&o]},unmask:(t,e)=>{const n=t.length;for(var r=0;r<n;r++)t[r]^=e[3&r]}},zo=gr((function(t){try{t.exports=Mo(__dirname)}catch(e){t.exports=Go}})),Jo=gr((function(t){const{EMPTY_BUFFER:e}=yo,n=Buffer[Symbol.species];function r(t,e,n,r,i){for(let o=0;o<i;o++)n[r+o]=t[o]^e[3&o]}function i(t,e){for(let n=0;n<t.length;n++)t[n]^=e[3&n]}if(t.exports={concat:function(t,r){if(0===t.length)return e;if(1===t.length)return t[0];const i=Buffer.allocUnsafe(r);let o=0;for(let e=0;e<t.length;e++){const n=t[e];i.set(n,o),o+=n.length}return o<r?new n(i.buffer,i.byteOffset,o):i},mask:r,toArrayBuffer:function(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)},toBuffer:function t(e){if(t.readOnly=!0,Buffer.isBuffer(e))return e;let r;return e instanceof ArrayBuffer?r=new n(e):ArrayBuffer.isView(e)?r=new n(e.buffer,e.byteOffset,e.byteLength):(r=Buffer.from(e),t.readOnly=!1),r},unmask:i},!process.env.WS_NO_BUFFER_UTIL)try{const e=zo;t.exports.mask=function(t,n,i,o,s){s<48?r(t,n,i,o,s):e.mask(t,n,i,o,s)},t.exports.unmask=function(t,n){t.length<32?i(t,n):e.unmask(t,n)}}catch(t){}}));Jo.concat,Jo.mask,Jo.toArrayBuffer,Jo.toBuffer,Jo.unmask;const Wo=Symbol("kDone"),$o=Symbol("kRun");var Ho=class{constructor(t){this[Wo]=()=>{this.pending--,this[$o]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[$o]()}[$o](){if(this.pending!==this.concurrency&&this.jobs.length){const t=this.jobs.shift();this.pending++,t(this[Wo])}}};const{kStatusCode:Vo}=yo,Zo=Buffer[Symbol.species],Yo=Buffer.from([0,0,255,255]),Ko=Symbol("permessage-deflate"),Xo=Symbol("total-length"),Qo=Symbol("callback"),ts=Symbol("buffers"),es=Symbol("error");let ns;var rs=class{constructor(t,e,n){if(this._maxPayload=0|n,this._options=t||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!e,this._deflate=null,this._inflate=null,this.params=null,!ns){const t=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;ns=new Ho(t)}}static get extensionName(){return"permessage-deflate"}offer(){const t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const t=this._deflate[Qo];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){const e=this._options,n=t.find((t=>!(!1===e.serverNoContextTakeover&&t.server_no_context_takeover||t.server_max_window_bits&&(!1===e.serverMaxWindowBits||"number"==typeof e.serverMaxWindowBits&&e.serverMaxWindowBits>t.server_max_window_bits)||"number"==typeof e.clientMaxWindowBits&&!t.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return e.serverNoContextTakeover&&(n.server_no_context_takeover=!0),e.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof e.serverMaxWindowBits&&(n.server_max_window_bits=e.serverMaxWindowBits),"number"==typeof e.clientMaxWindowBits?n.client_max_window_bits=e.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==e.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(t){const e=t[0];if(!1===this._options.clientNoContextTakeover&&e.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(e.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&e.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(e.client_max_window_bits=this._options.clientMaxWindowBits);return e}normalizeParams(t){return t.forEach((t=>{Object.keys(t).forEach((e=>{let n=t[e];if(n.length>1)throw new Error(`Parameter "${e}" must have only a single value`);if(n=n[0],"client_max_window_bits"===e){if(!0!==n){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}else if("server_max_window_bits"===e){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else{if("client_no_context_takeover"!==e&&"server_no_context_takeover"!==e)throw new Error(`Unknown parameter "${e}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}t[e]=n}))})),t}decompress(t,e,n){ns.add((r=>{this._decompress(t,e,((t,e)=>{r(),n(t,e)}))}))}compress(t,e,n){ns.add((r=>{this._compress(t,e,((t,e)=>{r(),n(t,e)}))}))}_decompress(t,e,n){const r=this._isServer?"client":"server";if(!this._inflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?p.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=p.createInflateRaw({...this._options.zlibInflateOptions,windowBits:e}),this._inflate[Ko]=this,this._inflate[Xo]=0,this._inflate[ts]=[],this._inflate.on("error",ss),this._inflate.on("data",os)}this._inflate[Qo]=n,this._inflate.write(t),e&&this._inflate.write(Yo),this._inflate.flush((()=>{const t=this._inflate[es];if(t)return this._inflate.close(),this._inflate=null,void n(t);const i=Jo.concat(this._inflate[ts],this._inflate[Xo]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Xo]=0,this._inflate[ts]=[],e&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,i)}))}_compress(t,e,n){const r=this._isServer?"server":"client";if(!this._deflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?p.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=p.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:e}),this._deflate[Xo]=0,this._deflate[ts]=[],this._deflate.on("data",is)}this._deflate[Qo]=n,this._deflate.write(t),this._deflate.flush(p.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let t=Jo.concat(this._deflate[ts],this._deflate[Xo]);e&&(t=new Zo(t.buffer,t.byteOffset,t.length-4)),this._deflate[Qo]=null,this._deflate[Xo]=0,this._deflate[ts]=[],e&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,t)}))}};function is(t){this[ts].push(t),this[Xo]+=t.length}function os(t){this[Xo]+=t.length,this[Ko]._maxPayload<1||this[Xo]<=this[Ko]._maxPayload?this[ts].push(t):(this[es]=new RangeError("Max payload size exceeded"),this[es].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[es][Vo]=1009,this.removeListener("data",os),this.reset())}function ss(t){this[Ko]._inflate=null,this[es]?this[Qo](this[es]):(t[Vo]=1007,this[Qo](t))}var as=function(t){const e=t.length;let n=0;for(;n<e;)if(128&t[n])if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}else n++;return!0},cs=gr((function(t){try{t.exports=Mo(__dirname)}catch(e){t.exports=as}})),us=gr((function(t){const{isUtf8:e}=A,{hasBlob:n}=yo;function r(t){const e=t.length;let n=0;for(;n<e;)if(128&t[n])if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}else n++;return!0}if(t.exports={isBlob:function(t){return n&&"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&("Blob"===t[Symbol.toStringTag]||"File"===t[Symbol.toStringTag])},isValidStatusCode:function(t){return t>=1e3&&t<=1014&&1004!==t&&1005!==t&&1006!==t||t>=3e3&&t<=4999},isValidUTF8:r,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},e)t.exports.isValidUTF8=function(t){return t.length<24?r(t):e(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const e=cs;t.exports.isValidUTF8=function(t){return t.length<32?r(t):e(t)}}catch(t){}}));us.isBlob,us.isValidStatusCode,us.isValidUTF8,us.tokenChars;const{Writable:ds}=o,{BINARY_TYPES:ls,EMPTY_BUFFER:hs,kStatusCode:ps,kWebSocket:fs}=yo,{concat:ms,toArrayBuffer:vs,unmask:bs}=Jo,{isValidStatusCode:gs,isValidUTF8:ys}=us,ws=Buffer[Symbol.species];var Is=class extends ds{constructor(t={}){super(),this._allowSynchronousEvents=void 0===t.allowSynchronousEvents||t.allowSynchronousEvents,this._binaryType=t.binaryType||ls[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=0|t.maxPayload,this._skipUTF8Validation=!!t.skipUTF8Validation,this[fs]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(t,e,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(n)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){const e=this._buffers[0];return this._buffers[0]=new ws(e.buffer,e.byteOffset+t,e.length-t),new ws(e.buffer,e.byteOffset,t)}const e=Buffer.allocUnsafe(t);do{const n=this._buffers[0],r=e.length-t;t>=n.length?e.set(this._buffers.shift(),r):(e.set(new Uint8Array(n.buffer,n.byteOffset,t),r),this._buffers[0]=new ws(n.buffer,n.byteOffset+t,n.length-t)),t-=n.length}while(t>0);return e}startLoop(t){this._loop=!0;do{switch(this._state){case 0:this.getInfo(t);break;case 1:this.getPayloadLength16(t);break;case 2:this.getPayloadLength64(t);break;case 3:this.getMask();break;case 4:this.getData(t);break;case 5:case 6:return void(this._loop=!1)}}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2)return void(this._loop=!1);const e=this.consume(2);if(48&e[0]){return void t(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"))}const n=!(64&~e[0]);if(!n||this._extensions[rs.extensionName]){if(this._fin=!(128&~e[0]),this._opcode=15&e[0],this._payloadLength=127&e[1],0===this._opcode){if(n){return void t(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(!this._fragmented){return void t(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"))}this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented){return void t(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}this._compressed=n}else{if(!(this._opcode>7&&this._opcode<11)){return void t(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}if(!this._fin){return void t(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"))}if(n){return void t(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength){return void t(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=!(128&~e[1]),this._isServer){if(!this._masked){return void t(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}}else if(this._masked){return void t(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"))}126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(t)}else{t(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}}getPayloadLength16(t){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t))}getPayloadLength64(t){if(this._bufferedBytes<8)return void(this._loop=!1);const e=this.consume(8),n=e.readUInt32BE(0);if(n>Math.pow(2,21)-1){t(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"))}else this._payloadLength=n*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){t(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"))}else this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(t){let e=hs;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);e=this.consume(this._payloadLength),this._masked&&0!==(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])&&bs(e,this._mask)}if(this._opcode>7)this.controlMessage(e,t);else{if(this._compressed)return this._state=5,void this.decompress(e,t);e.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(e)),this.dataMessage(t)}}decompress(t,e){this._extensions[rs.extensionName].decompress(t,this._fin,((t,n)=>{if(t)return e(t);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){const t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");return void e(t)}this._fragments.push(n)}this.dataMessage(e),0===this._state&&this.startLoop(e)}))}dataMessage(t){if(!this._fin)return void(this._state=0);const e=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?ms(n,e):"arraybuffer"===this._binaryType?vs(ms(n,e)):"blob"===this._binaryType?new Blob(n):n,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!0),this._state=0,this.startLoop(t)})))}else{const r=ms(n,e);if(!this._skipUTF8Validation&&!ys(r)){const e=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void t(e)}5===this._state||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!1),this._state=0,this.startLoop(t)})))}}controlMessage(t,e){if(8!==this._opcode)this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",t),this._state=0):(this._state=6,setImmediate((()=>{this.emit(9===this._opcode?"ping":"pong",t),this._state=0,this.startLoop(e)})));else{if(0===t.length)this._loop=!1,this.emit("conclude",1005,hs),this.end();else{const n=t.readUInt16BE(0);if(!gs(n)){const t=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void e(t)}const r=new ws(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!ys(r)){const t=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void e(t)}this._loop=!1,this.emit("conclude",n,r),this.end()}this._state=0}}createError(t,e,n,r,i){this._loop=!1,this._errored=!0;const o=new t(n?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(o,this.createError),o.code=i,o[ps]=r,o}};const{randomFillSync:Es}=U,{EMPTY_BUFFER:Rs,kWebSocket:js,NOOP:_s}=yo,{isBlob:Ss,isValidStatusCode:Cs}=us,{mask:Us,toBuffer:As}=Jo,Ps=Symbol("kByteLength"),Os=Buffer.alloc(4),ks=8192;let xs,Ts=ks;class Ds{constructor(t,e,n){this._extensions=e||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=_s,this[js]=void 0}static frame(t,e){let n,r,i=!1,o=2,s=!1;e.mask&&(n=e.maskBuffer||Os,e.generateMask?e.generateMask(n):(Ts===ks&&(void 0===xs&&(xs=Buffer.alloc(ks)),Es(xs,0,ks),Ts=0),n[0]=xs[Ts++],n[1]=xs[Ts++],n[2]=xs[Ts++],n[3]=xs[Ts++]),s=0===(n[0]|n[1]|n[2]|n[3]),o=6),"string"==typeof t?r=e.mask&&!s||void 0===e[Ps]?(t=Buffer.from(t)).length:e[Ps]:(r=t.length,i=e.mask&&e.readOnly&&!s);let a=r;r>=65536?(o+=8,a=127):r>125&&(o+=2,a=126);const c=Buffer.allocUnsafe(i?r+o:o);return c[0]=e.fin?128|e.opcode:e.opcode,e.rsv1&&(c[0]|=64),c[1]=a,126===a?c.writeUInt16BE(r,2):127===a&&(c[2]=c[3]=0,c.writeUIntBE(r,4,6)),e.mask?(c[1]|=128,c[o-4]=n[0],c[o-3]=n[1],c[o-2]=n[2],c[o-1]=n[3],s?[c,t]:i?(Us(t,n,c,o,r),[c]):(Us(t,n,t,0,r),[c,t])):[c,t]}close(t,e,n,r){let i;if(void 0===t)i=Rs;else{if("number"!=typeof t||!Cs(t))throw new TypeError("First argument must be a valid error code number");if(void 0!==e&&e.length){const n=Buffer.byteLength(e);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");i=Buffer.allocUnsafe(2+n),i.writeUInt16BE(t,0),"string"==typeof e?i.write(e,2):i.set(e,2)}else i=Buffer.allocUnsafe(2),i.writeUInt16BE(t,0)}const o={[Ps]:i.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,i,!1,o,r]):this.sendFrame(Ds.frame(i,o),r)}ping(t,e,n){let r,i;if("string"==typeof t?(r=Buffer.byteLength(t),i=!1):Ss(t)?(r=t.size,i=!1):(r=(t=As(t)).length,i=As.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[Ps]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:!1};Ss(t)?0!==this._state?this.enqueue([this.getBlobData,t,!1,o,n]):this.getBlobData(t,!1,o,n):0!==this._state?this.enqueue([this.dispatch,t,!1,o,n]):this.sendFrame(Ds.frame(t,o),n)}pong(t,e,n){let r,i;if("string"==typeof t?(r=Buffer.byteLength(t),i=!1):Ss(t)?(r=t.size,i=!1):(r=(t=As(t)).length,i=As.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[Ps]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:!1};Ss(t)?0!==this._state?this.enqueue([this.getBlobData,t,!1,o,n]):this.getBlobData(t,!1,o,n):0!==this._state?this.enqueue([this.dispatch,t,!1,o,n]):this.sendFrame(Ds.frame(t,o),n)}send(t,e,n){const r=this._extensions[rs.extensionName];let i,o,s=e.binary?2:1,a=e.compress;"string"==typeof t?(i=Buffer.byteLength(t),o=!1):Ss(t)?(i=t.size,o=!1):(i=(t=As(t)).length,o=As.readOnly),this._firstFragment?(this._firstFragment=!1,a&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=i>=r._threshold),this._compress=a):(a=!1,s=0),e.fin&&(this._firstFragment=!0);const c={[Ps]:i,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:o,rsv1:a};Ss(t)?0!==this._state?this.enqueue([this.getBlobData,t,this._compress,c,n]):this.getBlobData(t,this._compress,c,n):0!==this._state?this.enqueue([this.dispatch,t,this._compress,c,n]):this.dispatch(t,this._compress,c,n)}getBlobData(t,e,n,r){this._bufferedBytes+=n[Ps],this._state=2,t.arrayBuffer().then((t=>{if(this._socket.destroyed){const t=new Error("The socket was closed while the blob was being read");return void process.nextTick(Ns,this,t,r)}this._bufferedBytes-=n[Ps];const i=As(t);e?this.dispatch(i,e,n,r):(this._state=0,this.sendFrame(Ds.frame(i,n),r),this.dequeue())})).catch((t=>{process.nextTick(qs,this,t,r)}))}dispatch(t,e,n,r){if(!e)return void this.sendFrame(Ds.frame(t,n),r);const i=this._extensions[rs.extensionName];this._bufferedBytes+=n[Ps],this._state=1,i.compress(t,n.fin,((t,e)=>{if(this._socket.destroyed){Ns(this,new Error("The socket was closed while data was being compressed"),r)}else this._bufferedBytes-=n[Ps],this._state=0,n.readOnly=!1,this.sendFrame(Ds.frame(e,n),r),this.dequeue()}))}dequeue(){for(;0===this._state&&this._queue.length;){const t=this._queue.shift();this._bufferedBytes-=t[3][Ps],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][Ps],this._queue.push(t)}sendFrame(t,e){2===t.length?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],e),this._socket.uncork()):this._socket.write(t[0],e)}}var Ls=Ds;function Ns(t,e,n){"function"==typeof n&&n(e);for(let n=0;n<t._queue.length;n++){const r=t._queue[n],i=r[r.length-1];"function"==typeof i&&i(e)}}function qs(t,e,n){Ns(t,e,n),t.onerror(e)}const{kForOnEventAttribute:Bs,kListener:Fs}=yo,Ms=Symbol("kCode"),Gs=Symbol("kData"),zs=Symbol("kError"),Js=Symbol("kMessage"),Ws=Symbol("kReason"),$s=Symbol("kTarget"),Hs=Symbol("kType"),Vs=Symbol("kWasClean");class Zs{constructor(t){this[$s]=null,this[Hs]=t}get target(){return this[$s]}get type(){return this[Hs]}}Object.defineProperty(Zs.prototype,"target",{enumerable:!0}),Object.defineProperty(Zs.prototype,"type",{enumerable:!0});class Ys extends Zs{constructor(t,e={}){super(t),this[Ms]=void 0===e.code?0:e.code,this[Ws]=void 0===e.reason?"":e.reason,this[Vs]=void 0!==e.wasClean&&e.wasClean}get code(){return this[Ms]}get reason(){return this[Ws]}get wasClean(){return this[Vs]}}Object.defineProperty(Ys.prototype,"code",{enumerable:!0}),Object.defineProperty(Ys.prototype,"reason",{enumerable:!0}),Object.defineProperty(Ys.prototype,"wasClean",{enumerable:!0});class Ks extends Zs{constructor(t,e={}){super(t),this[zs]=void 0===e.error?null:e.error,this[Js]=void 0===e.message?"":e.message}get error(){return this[zs]}get message(){return this[Js]}}Object.defineProperty(Ks.prototype,"error",{enumerable:!0}),Object.defineProperty(Ks.prototype,"message",{enumerable:!0});class Xs extends Zs{constructor(t,e={}){super(t),this[Gs]=void 0===e.data?null:e.data}get data(){return this[Gs]}}Object.defineProperty(Xs.prototype,"data",{enumerable:!0});const Qs={addEventListener(t,e,n={}){for(const r of this.listeners(t))if(!n[Bs]&&r[Fs]===e&&!r[Bs])return;let r;if("message"===t)r=function(t,n){const r=new Xs("message",{data:n?t:t.toString()});r[$s]=this,ea(e,this,r)};else if("close"===t)r=function(t,n){const r=new Ys("close",{code:t,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[$s]=this,ea(e,this,r)};else if("error"===t)r=function(t){const n=new Ks("error",{error:t,message:t.message});n[$s]=this,ea(e,this,n)};else{if("open"!==t)return;r=function(){const t=new Zs("open");t[$s]=this,ea(e,this,t)}}r[Bs]=!!n[Bs],r[Fs]=e,n.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(const n of this.listeners(t))if(n[Fs]===e&&!n[Bs]){this.removeListener(t,n);break}}};var ta={CloseEvent:Ys,ErrorEvent:Ks,Event:Zs,EventTarget:Qs,MessageEvent:Xs};function ea(t,e,n){"object"==typeof t&&t.handleEvent?t.handleEvent.call(t,n):t.call(e,n)}const{tokenChars:na}=us;function ra(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var ia={format:function(t){return Object.keys(t).map((e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map((t=>[e].concat(Object.keys(t).map((e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map((t=>!0===t?e:`${e}=${t}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(t){const e=Object.create(null);let n,r,i=Object.create(null),o=!1,s=!1,a=!1,c=-1,u=-1,d=-1,l=0;for(;l<t.length;l++)if(u=t.charCodeAt(l),void 0===n)if(-1===d&&1===na[u])-1===c&&(c=l);else if(0===l||32!==u&&9!==u){if(59!==u&&44!==u)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=t.slice(c,d);44===u?(ra(e,r,i),i=Object.create(null)):n=r,c=d=-1}}else-1===d&&-1!==c&&(d=l);else if(void 0===r)if(-1===d&&1===na[u])-1===c&&(c=l);else if(32===u||9===u)-1===d&&-1!==c&&(d=l);else if(59===u||44===u){if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),ra(i,t.slice(c,d),!0),44===u&&(ra(e,n,i),i=Object.create(null),n=void 0),c=d=-1}else{if(61!==u||-1===c||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=t.slice(c,l),c=d=-1}else if(s){if(1!==na[u])throw new SyntaxError(`Unexpected character at index ${l}`);-1===c?c=l:o||(o=!0),s=!1}else if(a)if(1===na[u])-1===c&&(c=l);else if(34===u&&-1!==c)a=!1,d=l;else{if(92!==u)throw new SyntaxError(`Unexpected character at index ${l}`);s=!0}else if(34===u&&61===t.charCodeAt(l-1))a=!0;else if(-1===d&&1===na[u])-1===c&&(c=l);else if(-1===c||32!==u&&9!==u){if(59!==u&&44!==u)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let s=t.slice(c,d);o&&(s=s.replace(/\\/g,""),o=!1),ra(i,r,s),44===u&&(ra(e,n,i),i=Object.create(null),n=void 0),r=void 0,c=d=-1}}else-1===d&&(d=l);if(-1===c||a||32===u||9===u)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const h=t.slice(c,d);return void 0===n?ra(e,h,i):(void 0===r?ra(i,h,!0):ra(i,r,o?h.replace(/\\/g,""):h),ra(e,n,i)),e}};const{randomBytes:oa,createHash:sa}=U,{URL:aa}=c,{isBlob:ca}=us,{BINARY_TYPES:ua,EMPTY_BUFFER:da,GUID:la,kForOnEventAttribute:ha,kListener:pa,kStatusCode:fa,kWebSocket:ma,NOOP:va}=yo,{EventTarget:{addEventListener:ba,removeEventListener:ga}}=ta,{format:ya,parse:wa}=ia,{toBuffer:Ia}=Jo,Ea=Symbol("kAborted"),Ra=[8,13],ja=["CONNECTING","OPEN","CLOSING","CLOSED"],_a=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Sa extends t{constructor(t,e,n){super(),this._binaryType=ua[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=da,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Sa.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==t?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===e?e=[]:Array.isArray(e)||("object"==typeof e&&null!==e?(n=e,e=[]):e=[e]),Ua(this,t,e,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){ua.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,e,n){const r=new Is({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),i=new Ls(t,this._extensions,n.generateMask);this._receiver=r,this._sender=i,this._socket=t,r[ma]=this,i[ma]=this,t[ma]=this,r.on("conclude",Ta),r.on("drain",Da),r.on("error",La),r.on("message",qa),r.on("ping",Ba),r.on("pong",Fa),i.onerror=Ga,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),e.length>0&&t.unshift(e),t.on("close",Ja),t.on("data",Wa),t.on("end",$a),t.on("error",Ha),this._readyState=Sa.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Sa.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[rs.extensionName]&&this._extensions[rs.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Sa.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,e){if(this.readyState!==Sa.CLOSED)if(this.readyState!==Sa.CONNECTING)this.readyState!==Sa.CLOSING?(this._readyState=Sa.CLOSING,this._sender.close(t,e,!this._isServer,(t=>{t||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),za(this)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const t="WebSocket was closed before the connection was established";ka(this,this._req,t)}}pause(){this.readyState!==Sa.CONNECTING&&this.readyState!==Sa.CLOSED&&(this._paused=!0,this._socket.pause())}ping(t,e,n){if(this.readyState===Sa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Sa.OPEN?(void 0===e&&(e=!this._isServer),this._sender.ping(t||da,e,n)):xa(this,t,n)}pong(t,e,n){if(this.readyState===Sa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Sa.OPEN?(void 0===e&&(e=!this._isServer),this._sender.pong(t||da,e,n)):xa(this,t,n)}resume(){this.readyState!==Sa.CONNECTING&&this.readyState!==Sa.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,e,n){if(this.readyState===Sa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof e&&(n=e,e={}),"number"==typeof t&&(t=t.toString()),this.readyState!==Sa.OPEN)return void xa(this,t,n);const r={binary:"string"!=typeof t,mask:!this._isServer,compress:!0,fin:!0,...e};this._extensions[rs.extensionName]||(r.compress=!1),this._sender.send(t||da,r,n)}terminate(){if(this.readyState!==Sa.CLOSED)if(this.readyState!==Sa.CONNECTING)this._socket&&(this._readyState=Sa.CLOSING,this._socket.destroy());else{const t="WebSocket was closed before the connection was established";ka(this,this._req,t)}}}Object.defineProperty(Sa,"CONNECTING",{enumerable:!0,value:ja.indexOf("CONNECTING")}),Object.defineProperty(Sa.prototype,"CONNECTING",{enumerable:!0,value:ja.indexOf("CONNECTING")}),Object.defineProperty(Sa,"OPEN",{enumerable:!0,value:ja.indexOf("OPEN")}),Object.defineProperty(Sa.prototype,"OPEN",{enumerable:!0,value:ja.indexOf("OPEN")}),Object.defineProperty(Sa,"CLOSING",{enumerable:!0,value:ja.indexOf("CLOSING")}),Object.defineProperty(Sa.prototype,"CLOSING",{enumerable:!0,value:ja.indexOf("CLOSING")}),Object.defineProperty(Sa,"CLOSED",{enumerable:!0,value:ja.indexOf("CLOSED")}),Object.defineProperty(Sa.prototype,"CLOSED",{enumerable:!0,value:ja.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((t=>{Object.defineProperty(Sa.prototype,t,{enumerable:!0})})),["open","error","close","message"].forEach((t=>{Object.defineProperty(Sa.prototype,`on${t}`,{enumerable:!0,get(){for(const e of this.listeners(t))if(e[ha])return e[pa];return null},set(e){for(const e of this.listeners(t))if(e[ha]){this.removeListener(t,e);break}"function"==typeof e&&this.addEventListener(t,e,{[ha]:!0})}})})),Sa.prototype.addEventListener=ba,Sa.prototype.removeEventListener=ga;var Ca=Sa;function Ua(t,e,n,r){const i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Ra[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,!Ra.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Ra.join(", ")})`);let o;if(e instanceof aa)o=e;else try{o=new aa(e)}catch(t){throw new SyntaxError(`Invalid URL: ${e}`)}"http:"===o.protocol?o.protocol="ws:":"https:"===o.protocol&&(o.protocol="wss:"),t._url=o.href;const s="wss:"===o.protocol,c="ws+unix:"===o.protocol;let u;if("ws:"===o.protocol||s||c?c&&!o.pathname?u="The URL's pathname is empty":o.hash&&(u="The URL contains a fragment identifier"):u='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',u){const e=new SyntaxError(u);if(0===t._redirects)throw e;return void Aa(t,e)}const d=s?443:80,h=oa(16).toString("base64"),p=s?l.request:a.request,f=new Set;let m,v;if(i.createConnection=i.createConnection||(s?Oa:Pa),i.defaultPort=i.defaultPort||d,i.port=o.port||d,i.host=o.hostname.startsWith("[")?o.hostname.slice(1,-1):o.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":h,Connection:"Upgrade",Upgrade:"websocket"},i.path=o.pathname+o.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(m=new rs(!0!==i.perMessageDeflate?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=ya({[rs.extensionName]:m.offer()})),n.length){for(const t of n){if("string"!=typeof t||!_a.test(t)||f.has(t))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(t)}i.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(o.username||o.password)&&(i.auth=`${o.username}:${o.password}`),c){const t=i.path.split(":");i.socketPath=t[0],i.path=t[1]}if(i.followRedirects){if(0===t._redirects){t._originalIpc=c,t._originalSecure=s,t._originalHostOrSocketPath=c?i.socketPath:o.host;const e=r&&r.headers;if(r={...r,headers:{}},e)for(const[t,n]of Object.entries(e))r.headers[t.toLowerCase()]=n}else if(0===t.listenerCount("redirect")){const e=c?!!t._originalIpc&&i.socketPath===t._originalHostOrSocketPath:!t._originalIpc&&o.host===t._originalHostOrSocketPath;(!e||t._originalSecure&&!s)&&(delete i.headers.authorization,delete i.headers.cookie,e||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),v=t._req=p(i),t._redirects&&t.emit("redirect",t.url,v)}else v=t._req=p(i);i.timeout&&v.on("timeout",(()=>{ka(t,v,"Opening handshake has timed out")})),v.on("error",(e=>{null===v||v[Ea]||(v=t._req=null,Aa(t,e))})),v.on("response",(o=>{const s=o.headers.location,a=o.statusCode;if(s&&i.followRedirects&&a>=300&&a<400){if(++t._redirects>i.maxRedirects)return void ka(t,v,"Maximum redirects exceeded");let o;v.abort();try{o=new aa(s,e)}catch(e){const n=new SyntaxError(`Invalid URL: ${s}`);return void Aa(t,n)}Ua(t,o,n,r)}else t.emit("unexpected-response",v,o)||ka(t,v,`Unexpected server response: ${o.statusCode}`)})),v.on("upgrade",((e,n,r)=>{if(t.emit("upgrade",e),t.readyState!==Sa.CONNECTING)return;v=t._req=null;const o=e.headers.upgrade;if(void 0===o||"websocket"!==o.toLowerCase())return void ka(t,n,"Invalid Upgrade header");const s=sa("sha1").update(h+la).digest("base64");if(e.headers["sec-websocket-accept"]!==s)return void ka(t,n,"Invalid Sec-WebSocket-Accept header");const a=e.headers["sec-websocket-protocol"];let c;if(void 0!==a?f.size?f.has(a)||(c="Server sent an invalid subprotocol"):c="Server sent a subprotocol but none was requested":f.size&&(c="Server sent no subprotocol"),c)return void ka(t,n,c);a&&(t._protocol=a);const u=e.headers["sec-websocket-extensions"];if(void 0!==u){if(!m){return void ka(t,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let e;try{e=wa(u)}catch(e){return void ka(t,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(e);if(1!==r.length||r[0]!==rs.extensionName){return void ka(t,n,"Server indicated an extension that was not requested")}try{m.accept(e[rs.extensionName])}catch(e){return void ka(t,n,"Invalid Sec-WebSocket-Extensions header")}t._extensions[rs.extensionName]=m}t.setSocket(n,r,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})})),i.finishRequest?i.finishRequest(v,t):v.end()}function Aa(t,e){t._readyState=Sa.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function Pa(t){return t.path=t.socketPath,v.connect(t)}function Oa(t){return t.path=void 0,t.servername||""===t.servername||(t.servername=v.isIP(t.host)?"":t.host),C.connect(t)}function ka(t,e,n){t._readyState=Sa.CLOSING;const r=new Error(n);Error.captureStackTrace(r,ka),e.setHeader?(e[Ea]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Aa,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function xa(t,e,n){if(e){const n=ca(e)?e.size:Ia(e).length;t._socket?t._sender._bufferedBytes+=n:t._bufferedAmount+=n}if(n){const e=new Error(`WebSocket is not open: readyState ${t.readyState} (${ja[t.readyState]})`);process.nextTick(n,e)}}function Ta(t,e){const n=this[ma];n._closeFrameReceived=!0,n._closeMessage=e,n._closeCode=t,void 0!==n._socket[ma]&&(n._socket.removeListener("data",Wa),process.nextTick(Ma,n._socket),1005===t?n.close():n.close(t,e))}function Da(){const t=this[ma];t.isPaused||t._socket.resume()}function La(t){const e=this[ma];void 0!==e._socket[ma]&&(e._socket.removeListener("data",Wa),process.nextTick(Ma,e._socket),e.close(t[fa])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function Na(){this[ma].emitClose()}function qa(t,e){this[ma].emit("message",t,e)}function Ba(t){const e=this[ma];e._autoPong&&e.pong(t,!this._isServer,va),e.emit("ping",t)}function Fa(t){this[ma].emit("pong",t)}function Ma(t){t.resume()}function Ga(t){const e=this[ma];e.readyState!==Sa.CLOSED&&(e.readyState===Sa.OPEN&&(e._readyState=Sa.CLOSING,za(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function za(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),3e4)}function Ja(){const t=this[ma];let e;this.removeListener("close",Ja),this.removeListener("data",Wa),this.removeListener("end",$a),t._readyState=Sa.CLOSING,this._readableState.endEmitted||t._closeFrameReceived||t._receiver._writableState.errorEmitted||null===(e=t._socket.read())||t._receiver.write(e),t._receiver.end(),this[ma]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",Na),t._receiver.on("finish",Na))}function Wa(t){this[ma]._receiver.write(t)||this.pause()}function $a(){const t=this[ma];t._readyState=Sa.CLOSING,t._receiver.end(),this.end()}function Ha(){const t=this[ma];this.removeListener("error",Ha),this.on("error",va),t&&(t._readyState=Sa.CLOSING,this.destroy())}const{Duplex:Va}=o;function Za(t){t.emit("close")}function Ya(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ka(t){this.removeListener("error",Ka),this.destroy(),0===this.listenerCount("error")&&this.emit("error",t)}var Xa=function(t,e){let n=!0;const r=new Va({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",(function(e,n){const i=!n&&r._readableState.objectMode?e.toString():e;r.push(i)||t.pause()})),t.once("error",(function(t){r.destroyed||(n=!1,r.destroy(t))})),t.once("close",(function(){r.destroyed||r.push(null)})),r._destroy=function(e,i){if(t.readyState===t.CLOSED)return i(e),void process.nextTick(Za,r);let o=!1;t.once("error",(function(t){o=!0,i(t)})),t.once("close",(function(){o||i(e),process.nextTick(Za,r)})),n&&t.terminate()},r._final=function(e){t.readyState!==t.CONNECTING?null!==t._socket&&(t._socket._writableState.finished?(e(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",(function(){e()})),t.close())):t.once("open",(function(){r._final(e)}))},r._read=function(){t.isPaused&&t.resume()},r._write=function(e,n,i){t.readyState!==t.CONNECTING?t.send(e,i):t.once("open",(function(){r._write(e,n,i)}))},r.on("end",Ya),r.on("error",Ka),r},Qa=function(t){function e(e,n,r,i,o,s){void 0===s&&(s=5e3);var a=t.call(this)||this;a.endpoint=e,a.headers=n,a.rewriteHostHeader=r,a.bindToAssign=i,a.agent=o,a.closeTimeout=s,a.protocol="TCP",a.openConnections=new Set,a.tcpServer=m.createServer(a.handleConnection.bind(a));var c=null==r?void 0:r.altHostnames.map((function(t){return(e=ze(e=t))&&cr.test(e)?e.replace(ar,"\\$&"):e;var e})).join("|");return a.hostRegex=new RegExp("Host: (?:".concat(c,")(:.*$|$)"),"im"),a}return W(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return H(this,void 0,void 0,(function(){var t=this;return V(this,(function(e){return[2,new Promise((function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,i=n.address;t.tcpServer.listen(r,i,(function(){t.emit("tunnel-open",{address:i,port:r}),e({address:i,port:r})}))}else t.tcpServer.listen(0,(function(){var n=t.tcpServer.address(),r=n.address,i=n.port,o="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:o,port:i},t.emit("tunnel-open",t.boundTo),e(t.boundTo)}))}))]}))}))},e.prototype.close=function(){return H(this,void 0,void 0,(function(){var t,e=this;return V(this,(function(n){switch(n.label){case 0:return t=!1,[4,Promise.race([new Promise((function(n){e.tcpServer.close((function(){t=!0,e.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(t){return setTimeout(t,e.closeTimeout)})).then((function(){t||(e.openConnections.forEach((function(t){t.destroy(),e.openConnections.delete(t)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},e.prototype.handleConnection=function(t){var e=this;this.openConnections.add(t);var n=this.endpoint.replace("https:","wss:"),r=new Ca(n,{headers:this.headers,agent:this.agent}),i=Xa(r),o=this.getHeaderTransform();this.rewriteHostHeader&&o?vo(t,o,i):vo(t,i),vo(i,t),r.on("close",(function(t,n,r){e.emit("connection-close",t,n,r)})),i.on("error",(function(t){e.emit("connection-error",t)})),t.on("error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var t=this.rewriteHostHeader.targetHostname,e=this.hostRegex;return new s({transform:function(n,r,i){var o=n.toString();if(o.split("\n",1)[0].includes("HTTP")){var s=o.replace(e,"Host: ".concat(t));i(null,Buffer.from(s))}else i(null,n)}})}},e}(e),tc=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.endpoint=e,o.headers=n,o.bindToAssign=r,o.agent=i,o.protocol="UDP",o.udpSocket=O.createSocket("udp4"),o.handleConnection(),o}return W(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return H(this,void 0,void 0,(function(){var t=this;return V(this,(function(e){return[2,new Promise((function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,i=n.address;t.udpSocket.bind(r,i,(function(){t.emit("tunnel-open",{address:i,port:r}),e({address:i,port:r})}))}else t.udpSocket.bind(0,(function(){var n=t.udpSocket.address(),r=n.address,i=n.port,o="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:o,port:i},t.emit("tunnel-open",t.boundTo),e(t.boundTo)}))}))]}))}))},e.prototype.close=function(){return H(this,void 0,void 0,(function(){var t=this;return V(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){t.udpSocket.close((function(){t.emit("tunnel-close"),e()}))}))];case 1:return e.sent(),[2]}}))}))},e.prototype.handleConnection=function(){var t,e=this,n=this.endpoint.replace("https:","wss:"),r=new Ca(n,{headers:this.headers,agent:this.agent}),i=Xa(r);this.udpSocket.on("message",(function(e,n){t=n,i.write(e)})),i.on("data",(function(n){t&&e.udpSocket.send(n,t.port,t.address,(function(t){t&&e.emit("connection-error",t)}))})),this.udpSocket.on("error",(function(t){e.emit("connection-error",t)})),i.on("error",(function(t){e.emit("connection-error",t)})),r.on("connection-close",(function(t,n,r){e.emit("connection-close",t,n,r)})),r.on("connection-error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e}(e),ec=function(t){function e(e,r,i,o){var s=t.call(this)||this;return s.contextProvider=e,s.listServices=r,s.listAddons=i,s.agent=o,s.connections=[],s.hostsFileMutex=new Qi,s.ipAllocationMutex=new Qi,s.stopForwarding=function(t){return H(s,void 0,void 0,(function(){var e,n,r,i,o,s,a;return V(this,(function(c){switch(c.label){case 0:return[4,t.tunnel.close()];case 1:return c.sent(),e=t.forwardingContext,n=e.projectId,r=e.type,i=e.id,o=e.hostnames,s=e.ipOnly,o.length>0&&!s?[4,this.unregisterHostnames(null===(a=t.tunnel.bindTo)||void 0===a?void 0:a.address,o)]:[3,3];case 2:c.sent(),c.label=3;case 3:return this.connections.splice(this.connections.findIndex((function(t){var e=t.forwardingContext,o=e.type,s=e.id,a=e.projectId;return s===i&&a===n&&o===r})),1),[2]}}))}))},s.canExecuteWithHostnames=function(){return"win32"!==process.platform?process.getuid&&0!==process.getuid()?{error:!0,message:"You are not running this command with sufficient privileges (uid=".concat(null===(t=null===process||void 0===process?void 0:process.getuid)||void 0===t?void 0:t.call(process),"). Try running with 'sudo -E'.")}:{error:!1,type:"unix-admin"}:function(){try{return n("fsutil dirty query %systemdrive%"),!0}catch(t){if("ENOENT"===t.code)try{return n("fltmc"),!0}catch(t){return!1}return!1}}()?{error:!1,type:"windows-admin"}:{error:!0,message:"You are not running this command as administrator. Please start command line with admin rights."};var t},s.assertStartedWithNodejs=function(){if(!Ci)throw new Error("Port forwarding only possible when started with nodejs")},s.proxyApiClient=new ki(e,o),s}return W(e,t),e.prototype.withProjectForwarding=function(t,e,n){return void 0===n&&(n=!0),H(this,void 0,void 0,(function(){var r;return V(this,(function(i){switch(i.label){case 0:return[4,this.forwardProject(t,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopProjectForwarding(t)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},e.prototype.forwardProject=function(t,e){return void 0===e&&(e=!0),H(this,void 0,void 0,(function(){var n,r,i,o,s,a=this;return V(this,(function(c){switch(c.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,[4,this.listServices.all({parameters:{projectId:n}})];case 1:return r=c.sent(),[4,this.listAddons.all({parameters:{projectId:n}})];case 2:return i=c.sent(),[4,Promise.all(r.data.services.map((function(t){return H(a,void 0,void 0,(function(){return V(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:t.id},e)]}))}))})))];case 3:return o=c.sent(),[4,Promise.all(i.data.addons.map((function(t){return H(a,void 0,void 0,(function(){return V(this,(function(r){switch(r.label){case 0:return[4,this.forwardAddon({projectId:n,addonId:t.id},e)];case 1:return[2,r.sent()]}}))}))})))];case 4:return s=c.sent(),[2,{services:o,addons:s}]}}))}))},e.prototype.withServiceForwarding=function(t,e,n){return void 0===n&&(n=!0),H(this,void 0,void 0,(function(){var r;return V(this,(function(i){switch(i.label){case 0:return[4,this.forwardService(t,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopServiceForwarding(t)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},e.prototype.forwardService=function(t,e){return void 0===e&&(e=!0),H(this,void 0,void 0,(function(){var n,r,i,o,s,a,c,u=this;return V(this,(function(d){switch(d.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,r=t.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return i=d.sent(),o=i.namespace,s=i.targetDomain,a=i.instances,c=i.ports,0===a.length?[2,[]]:[4,Pi(c,(function(t){var i,c="https://".concat(s,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(a[0].podName,"/port/").concat(t.internalPort),d="".concat(r,".").concat(o,".svc.cluster.local"),l=["".concat(r)];t.name&&l.push("".concat(t.name,".").concat(r)),"HTTP"===t.protocol&&(i={altHostnames:l,targetHostname:d});var h=Z([d],l,!0);return u.forwardPort(c,t,h,"service",r,n,e,i)}))];case 2:return[2,d.sent()]}}))}))},e.prototype.withAddonForwarding=function(t,e,n){return void 0===n&&(n=!0),H(this,void 0,void 0,(function(){var r;return V(this,(function(i){switch(i.label){case 0:return[4,this.forwardAddon(t,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopAddonForwarding(t)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},e.prototype.forwardAddon=function(t,e){return void 0===e&&(e=!0),H(this,void 0,void 0,(function(){var n,r,i,o,s=this;return V(this,(function(a){switch(a.label){case 0:return this.assertStartedWithNodejs(),n=t.addonId,r=t.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return i=a.sent(),o=i.instances.map((function(t){var e=t.podName,n=t.internalHostname;return t.ports.map((function(t){return{podName:e,internalHostname:n,port:t}}))})),[4,Pi((c=o,null!=c&&c.length?Ye(c,lr):[]),(function(t){var o=t.podName,a=t.internalHostname,c=t.port;return H(s,void 0,void 0,(function(){var t;return V(this,(function(s){return t="https://".concat(i.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(o,"/port/").concat(c.internalPort),[2,this.forwardPort(t,c,[a],"addon",n,r,e)]}))}))}))];case 2:return[2,a.sent()]}var c}))}))},e.prototype.allocateIpAddress=function(t){return H(this,void 0,void 0,(function(){var e=this;return V(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return H(e,void 0,void 0,(function(){var e,n,r,i,o;return V(this,(function(s){switch(s.label){case 0:return e="127.24.1.1",n="127.24.255.255",r=null!==(o=this.nextIpAddress)&&void 0!==o?o:e,[4,xi(t,r,n)];case 1:return i=s.sent(),this.nextIpAddress=Ni(Li(i)+1),Li(this.nextIpAddress)>Li(n)&&(this.nextIpAddress=e),[2,i]}}))}))}))]}))}))},e.prototype.forwardPort=function(t,e,n,r,i,o,s,a){var c;return void 0===s&&(s=!0),H(this,void 0,void 0,(function(){var u,d,l,h,p,f,m=this;return V(this,(function(v){switch(v.label){case 0:if(u={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!s&&(d=this.canExecuteWithHostnames()).error)throw new Error("".concat(d.message," Alternatively, you can use the ipOnly mode when port-forwarding (apiClient.forwarding.forwardAddon({ projectId, addonId }, true))"));return[4,this.determineSocketAddress(o,i,n,r,e,s)];case 1:return l=v.sent(),h="UDP"===e.protocol?new tc(t,u,l,this.agent):new Qa(t,u,a,l,this.agent),s?[3,3]:[4,this.registerHostnames(null===(c=h.bindTo)||void 0===c?void 0:c.address,n)];case 2:v.sent(),v.label=3;case 3:return h.on("connection-accept",(function(){return m.emit("connection-accept",h)})),h.on("connection-close",(function(){return H(m,void 0,void 0,(function(){return V(this,(function(t){return[2,this.emit("connection-close",h)]}))}))})),[4,h.open()];case 4:return p=v.sent(),f={projectId:o,id:i,type:r,hostnames:n,ipOnly:s,port:p.port,address:p.address,protocol:e.protocol,portName:e.name},this.emit("tunnel-open",h,f),h.on("connection-error",(function(t){return m.emit("connection-error",h,f,t)})),h.on("tunnel-close",(function(){return m.emit("tunnel-close",h,f)})),this.connections.push({tunnel:h,forwardingContext:f}),[2,{data:f}]}}))}))},e.prototype.determineSocketAddress=function(t,e,n,r,i,o){return H(this,void 0,void 0,(function(){var s,a,c;return V(this,(function(u){switch(u.label){case 0:return o&&"darwin"===f.platform()?[2,void 0]:(s=this.connections.filter((function(n){return n.forwardingContext.projectId===t&&n.forwardingContext.id===e&&n.forwardingContext.type===r})),(a=null==s?void 0:s.find((function(t){return n.find((function(e){return t.forwardingContext.hostnames.includes(e)}))})))?[2,{address:null==a?void 0:a.forwardingContext.address,port:i.internalPort}]:(c={},[4,this.allocateIpAddress(i.internalPort)]));case 1:return[2,(c.address=u.sent(),c.port=i.internalPort,c)]}}))}))},e.prototype.registerHostnames=function(t,e){return H(this,void 0,void 0,(function(){return V(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,e),n.add.apply(n,Z([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.unregisterHostnames=function(t,e){return H(this,void 0,void 0,(function(){return V(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,Z([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.modifyHostsFile=function(t){return H(this,void 0,void 0,(function(){var e=this;return V(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return H(e,void 0,void 0,(function(){var e,n=this;return V(this,(function(r){switch(r.label){case 0:return[4,Xi.load({header:"Northflank Proxy"})];case 1:return e=r.sent(),t(e),[4,e.backup({suffix:".backup-pre-northflank"})];case 2:r.sent(),r.label=3;case 3:return r.trys.push([3,5,,7]),[4,nc(5)((function(){return H(n,void 0,void 0,(function(){return V(this,(function(t){switch(t.label){case 0:return[4,e.write({writeMode:"atomic"})];case 1:return t.sent(),[2]}}))}))}))];case 4:return r.sent(),[3,7];case 5:return r.sent(),[4,nc(5)((function(){return H(n,void 0,void 0,(function(){return V(this,(function(t){switch(t.label){case 0:return[4,e.write({writeMode:"standard"})];case 1:return t.sent(),[2]}}))}))}))];case 6:return r.sent(),[3,7];case 7:return[2]}}))}))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.stopProjectForwarding=function(t){return H(this,void 0,void 0,(function(){var e=this;return V(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return e.forwardingContext.projectId===t.projectId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.stopServiceForwarding=function(t){return H(this,void 0,void 0,(function(){var e=this;return V(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return"service"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.serviceId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.stopAddonForwarding=function(t){return H(this,void 0,void 0,(function(){var e=this;return V(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return"addon"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.addonId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.stop=function(){return H(this,void 0,void 0,(function(){var t=this;return V(this,(function(e){switch(e.label){case 0:return[4,Promise.all(this.connections.map((function(e){return H(t,void 0,void 0,(function(){return V(this,(function(t){return[2,this.stopForwarding(e)]}))}))})))];case 1:return e.sent(),[2]}}))}))},e}(e),nc=function(t,e){return void 0===e&&(e=50),function(n){var r=t,i=function(){return H(void 0,void 0,void 0,(function(){var t;return V(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,4]),[4,n()];case 1:return[2,o.sent()];case 2:if(t=o.sent(),r<=0)throw t;return r-=1,[4,new Promise((function(t){return setTimeout((function(){return t()}),e)}))];case 3:return o.sent(),[2,i()];case 4:return[2]}}))}))};return i()}},rc=function(t){function e(e,n,r,o,s,a,c){void 0===s&&(s=new i.PassThrough),void 0===a&&(a=new i.PassThrough),void 0===c&&(c=new i.PassThrough);var u=t.call(this)||this;return u.baseUrl=e,u.execConfig=n,u.token=r,u.agent=o,u.stdOut=s,u.stdErr=a,u.stdIn=c,u.waitForCommandResult=function(){return H(u,void 0,void 0,(function(){return V(this,(function(t){switch(t.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,t.sent()]}}))}))},u.sendInputToCurrentCommand=function(t){return H(u,void 0,void 0,(function(){var e;return V(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(e=this.duplex)||void 0===e||e.write(this.constructPayloadPacket(t)),[2]}))}))},u.resizeTerminal=function(t){return H(u,void 0,void 0,(function(){var e;return V(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running, can't resize terminal");return null===(e=this.duplex)||void 0===e||e.write(JSON.stringify({type:"resize",data:{ttyRows:null==t?void 0:t.rows,ttyColumns:null==t?void 0:t.columns}})),[2]}))}))},u.constructPayloadPacket=function(t){return JSON.stringify({type:"payload",data:t.toString()})},u.stdInEndPacket=JSON.stringify({type:"stdInEnd"}),u}return W(e,t),Object.defineProperty(e.prototype,"execEndpoint",{get:function(){var t=this.execConfig,e=t.entityId,n=t.entityType,r=t.projectId,i="".concat(this.baseUrl,"/v1/command-exec/projects/").concat(r,"/");return"".concat(i).concat(function(){switch(n){case"service":return"services/".concat(e);case"job":return"jobs/".concat(e);case"addon":return"addons/".concat(e);case"build":return"builds/".concat(e);default:throw new Error("Unexpected Northflank entity type received in command exec endpoint generation: ".concat(n))}}())},enumerable:!1,configurable:!0}),e.prototype.start=function(){return H(this,void 0,void 0,(function(){var t=this;return V(this,(function(e){if(void 0!==this.currentCommand)throw new Error("Command is already running");return this.currentCommand=new Promise((function(e,n){var r,i,o;void 0!==t.remote&&n(Error("Command is already running"));var s,a=t.execEndpoint.replace("https:","wss:").replace("http:","ws:");t.remote=new Ca(a,{agent:t.agent});try{t.duplex=Xa(t.remote)}catch(t){throw new Error("Failed to establish connection to command execution proxy: ".concat(t.message))}t.initialAuth(),t.stdIn.on("data",(function(e){var n,r;(null===(n=t.duplex)||void 0===n?void 0:n.writable)&&(null===(r=t.duplex)||void 0===r||r.write(t.constructPayloadPacket(e)))})),t.stdIn.on("end",(function(){var e,n;(null===(e=t.duplex)||void 0===e?void 0:e.writable)&&(null===(n=t.duplex)||void 0===n||n.write(t.stdInEndPacket))})),null===(r=t.duplex)||void 0===r||r.on("data",(function(e){var n,r,i,o,a,u=JSON.parse(e.toString());switch(null==u?void 0:u.type){case"init":var d=u.data;"successful"!==d.auth?c("Command initialization failed: ".concat(null!==(n=null==d?void 0:d.message)&&void 0!==n?n:"Reason unknown")):t.emit("auth-success",s);break;case"completion":s=u.data,t.emit("command-result",s),null===(r=t.duplex)||void 0===r||r.end();break;case"stdOut":t.emit("std-out-data",u.data),t.stdOut.write(u.data,null===(i=t.execConfig)||void 0===i?void 0:i.encoding);break;case"stdErr":t.emit("std-err-data",u.data),t.stdErr.write(u.data,null===(o=t.execConfig)||void 0===o?void 0:o.encoding);break;case"error":c(null===(a=u.data)||void 0===a?void 0:a.message);break;default:var l="unable to parse message: ".concat(JSON.stringify(u));c(l)}})),null===(i=t.duplex)||void 0===i||i.on("end",(function(){t.emit("command-completed"),t.reset(),e(s)})),null===(o=t.duplex)||void 0===o||o.on("error",(function(n){t.emit("error",n),t.emit("command-completed"),t.reset(),e(s)}));var c=function(e){t.emit("error",e),t.reset(),n(new Error(e))};t.emit("command-started")})),[2,this.currentCommand]}))}))},e.prototype.initialAuth=function(){var t,e=this.execConfig,n=e.command,r=e.containerName,i=e.shell,o=e.user,s=e.group,a=e.encoding,c=e.tty,u=e.ttyColumns,d=e.ttyRows,l={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:i,user:o,group:s,encoding:a,tty:c,ttyColumns:u,ttyRows:d}}};null===(t=this.duplex)||void 0===t||t.write(JSON.stringify(l))},e.prototype.reset=function(){var t;this.remote=void 0,this.currentCommand=void 0,null===(t=this.duplex)||void 0===t||t.destroy(),this.duplex=void 0},e}(e),ic=function(){function t(t,e){this.contextProvider=t,this.agent=e,this.assertStartedWithNodejs=function(){if(!Ci)throw new Error("Command exec only possible when started with nodejs")}}return t.prototype.execServiceCommand=function(t,e){return H(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){return n=t.serviceId,r=t.projectId,i=$({projectId:r,entityId:n,entityType:"service"},e),[2,this.execCommand(i)]}))}))},t.prototype.execServiceSession=function(t,e){return H(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:return n=t.serviceId,r=t.projectId,i=$({projectId:r,entityId:n,entityType:"service"},e),[4,this.shellSession(i)];case 1:return[2,o.sent()]}}))}))},t.prototype.execJobCommand=function(t,e){return H(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){return n=t.jobId,r=t.projectId,i=$({projectId:r,entityId:n,entityType:"job"},e),[2,this.execCommand(i)]}))}))},t.prototype.execJobSession=function(t,e){return H(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:return n=t.jobId,r=t.projectId,i=$({projectId:r,entityId:n,entityType:"job"},e),[4,this.shellSession(i)];case 1:return[2,o.sent()]}}))}))},t.prototype.execCommand=function(t){return H(this,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){switch(i.label){case 0:return this.assertStartedWithNodejs(),e=this.getCommandRunner($({shell:"none"},t)),n=new Oi,r=new Oi,e.stdOut.pipe(n),e.stdErr.pipe(r),e.on("error",(function(t){throw new Error(t)})),[4,e.start()];case 1:return[2,{commandResult:i.sent(),stdOut:n.getContentsAsString(),stdErr:r.getContentsAsString()}]}}))}))},t.prototype.shellSession=function(t){return H(this,void 0,void 0,(function(){var e,n;return V(this,(function(r){switch(r.label){case 0:return this.assertStartedWithNodejs(),e=this.getCommandRunner(t),n=new Promise((function(t){e.on("auth-success",(function(){t()}))})),e.start(),[4,n];case 1:return r.sent(),[2,e]}}))}))},t.prototype.getCommandRunner=function(t){var e=this.contextProvider.getCurrentBaseUrl(!0),n=this.contextProvider.getCurrentToken();if(!n)throw Error("API token not found");return new rc(e,t,n,this.agent)},t}();const oc="object"==typeof process&&process?process:{stdout:null,stderr:null},sc=t=>!!t&&"object"==typeof t&&(t instanceof Jc||t instanceof x||ac(t)||cc(t)),ac=t=>!!t&&"object"==typeof t&&t instanceof k&&"function"==typeof t.pipe&&t.pipe!==x.Writable.prototype.pipe,cc=t=>!!t&&"object"==typeof t&&t instanceof k&&"function"==typeof t.write&&"function"==typeof t.end,uc=Symbol("EOF"),dc=Symbol("maybeEmitEnd"),lc=Symbol("emittedEnd"),hc=Symbol("emittingEnd"),pc=Symbol("emittedError"),fc=Symbol("closed"),mc=Symbol("read"),vc=Symbol("flush"),bc=Symbol("flushChunk"),gc=Symbol("encoding"),yc=Symbol("decoder"),wc=Symbol("flowing"),Ic=Symbol("paused"),Ec=Symbol("resume"),Rc=Symbol("buffer"),jc=Symbol("pipes"),_c=Symbol("bufferLength"),Sc=Symbol("bufferPush"),Cc=Symbol("bufferShift"),Uc=Symbol("objectMode"),Ac=Symbol("destroyed"),Pc=Symbol("error"),Oc=Symbol("emitData"),kc=Symbol("emitEnd"),xc=Symbol("emitEnd2"),Tc=Symbol("async"),Dc=Symbol("abort"),Lc=Symbol("aborted"),Nc=Symbol("signal"),qc=Symbol("dataListeners"),Bc=Symbol("discarded"),Fc=t=>Promise.resolve().then(t),Mc=t=>t();class Gc{src;dest;opts;ondrain;constructor(t,e,n){this.src=t,this.dest=e,this.opts=n,this.ondrain=()=>t[Ec](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class zc extends Gc{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,n){super(t,e,n),this.proxyErrors=t=>e.emit("error",t),t.on("error",this.proxyErrors)}}class Jc extends k{[wc]=!1;[Ic]=!1;[jc]=[];[Rc]=[];[Uc];[gc];[Tc];[yc];[uc]=!1;[lc]=!1;[hc]=!1;[fc]=!1;[pc]=null;[_c]=0;[Ac]=!1;[Nc];[Lc]=!1;[qc]=0;[Bc]=!1;writable=!0;readable=!0;constructor(...t){const e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw new TypeError("Encoding and objectMode may not be used together");e.objectMode?(this[Uc]=!0,this[gc]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[gc]=e.encoding,this[Uc]=!1):(this[Uc]=!1,this[gc]=null),this[Tc]=!!e.async,this[yc]=this[gc]?new T(this[gc]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[Rc]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[jc]});const{signal:n}=e;n&&(this[Nc]=n,n.aborted?this[Dc]():n.addEventListener("abort",(()=>this[Dc]())))}get bufferLength(){return this[_c]}get encoding(){return this[gc]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Uc]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Tc]}set async(t){this[Tc]=this[Tc]||!!t}[Dc](){this[Lc]=!0,this.emit("abort",this[Nc]?.reason),this.destroy(this[Nc]?.reason)}get aborted(){return this[Lc]}set aborted(t){}write(t,e,n){if(this[Lc])return!1;if(this[uc])throw new Error("write after end");if(this[Ac])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(n=e,e="utf8"),e||(e="utf8");const r=this[Tc]?Fc:Mc;if(!this[Uc]&&!Buffer.isBuffer(t))if(i=t,!Buffer.isBuffer(i)&&ArrayBuffer.isView(i))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if((t=>t instanceof ArrayBuffer||!!t&&"object"==typeof t&&t.constructor&&"ArrayBuffer"===t.constructor.name&&t.byteLength>=0)(t))t=Buffer.from(t);else if("string"!=typeof t)throw new Error("Non-contiguous data written to non-objectMode stream");var i;return this[Uc]?(this[wc]&&0!==this[_c]&&this[vc](!0),this[wc]?this.emit("data",t):this[Sc](t),0!==this[_c]&&this.emit("readable"),n&&r(n),this[wc]):t.length?("string"!=typeof t||e===this[gc]&&!this[yc]?.lastNeed||(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[gc]&&(t=this[yc].write(t)),this[wc]&&0!==this[_c]&&this[vc](!0),this[wc]?this.emit("data",t):this[Sc](t),0!==this[_c]&&this.emit("readable"),n&&r(n),this[wc]):(0!==this[_c]&&this.emit("readable"),n&&r(n),this[wc])}read(t){if(this[Ac])return null;if(this[Bc]=!1,0===this[_c]||0===t||t&&t>this[_c])return this[dc](),null;this[Uc]&&(t=null),this[Rc].length>1&&!this[Uc]&&(this[Rc]=[this[gc]?this[Rc].join(""):Buffer.concat(this[Rc],this[_c])]);const e=this[mc](t||null,this[Rc][0]);return this[dc](),e}[mc](t,e){if(this[Uc])this[Cc]();else{const n=e;t===n.length||null===t?this[Cc]():"string"==typeof n?(this[Rc][0]=n.slice(t),e=n.slice(0,t),this[_c]-=t):(this[Rc][0]=n.subarray(t),e=n.subarray(0,t),this[_c]-=t)}return this.emit("data",e),this[Rc].length||this[uc]||this.emit("drain"),e}end(t,e,n){return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e="utf8"),void 0!==t&&this.write(t,e),n&&this.once("end",n),this[uc]=!0,this.writable=!1,!this[wc]&&this[Ic]||this[dc](),this}[Ec](){this[Ac]||(this[qc]||this[jc].length||(this[Bc]=!0),this[Ic]=!1,this[wc]=!0,this.emit("resume"),this[Rc].length?this[vc]():this[uc]?this[dc]():this.emit("drain"))}resume(){return this[Ec]()}pause(){this[wc]=!1,this[Ic]=!0,this[Bc]=!1}get destroyed(){return this[Ac]}get flowing(){return this[wc]}get paused(){return this[Ic]}[Sc](t){this[Uc]?this[_c]+=1:this[_c]+=t.length,this[Rc].push(t)}[Cc](){return this[Uc]?this[_c]-=1:this[_c]-=this[Rc][0].length,this[Rc].shift()}[vc](t=!1){do{}while(this[bc](this[Cc]())&&this[Rc].length);t||this[Rc].length||this[uc]||this.emit("drain")}[bc](t){return this.emit("data",t),this[wc]}pipe(t,e){if(this[Ac])return t;this[Bc]=!1;const n=this[lc];return e=e||{},t===oc.stdout||t===oc.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,n?e.end&&t.end():(this[jc].push(e.proxyErrors?new zc(this,t,e):new Gc(this,t,e)),this[Tc]?Fc((()=>this[Ec]())):this[Ec]()),t}unpipe(t){const e=this[jc].find((e=>e.dest===t));e&&(1===this[jc].length?(this[wc]&&0===this[qc]&&(this[wc]=!1),this[jc]=[]):this[jc].splice(this[jc].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){const n=super.on(t,e);if("data"===t)this[Bc]=!1,this[qc]++,this[jc].length||this[wc]||this[Ec]();else if("readable"===t&&0!==this[_c])super.emit("readable");else if((t=>"end"===t||"finish"===t||"prefinish"===t)(t)&&this[lc])super.emit(t),this.removeAllListeners(t);else if("error"===t&&this[pc]){const t=e;this[Tc]?Fc((()=>t.call(this,this[pc]))):t.call(this,this[pc])}return n}removeListener(t,e){return this.off(t,e)}off(t,e){const n=super.off(t,e);return"data"===t&&(this[qc]=this.listeners("data").length,0!==this[qc]||this[Bc]||this[jc].length||(this[wc]=!1)),n}removeAllListeners(t){const e=super.removeAllListeners(t);return"data"!==t&&void 0!==t||(this[qc]=0,this[Bc]||this[jc].length||(this[wc]=!1)),e}get emittedEnd(){return this[lc]}[dc](){this[hc]||this[lc]||this[Ac]||0!==this[Rc].length||!this[uc]||(this[hc]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[fc]&&this.emit("close"),this[hc]=!1)}emit(t,...e){const n=e[0];if("error"!==t&&"close"!==t&&t!==Ac&&this[Ac])return!1;if("data"===t)return!(!this[Uc]&&!n)&&(this[Tc]?(Fc((()=>this[Oc](n))),!0):this[Oc](n));if("end"===t)return this[kc]();if("close"===t){if(this[fc]=!0,!this[lc]&&!this[Ac])return!1;const t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[pc]=n,super.emit(Pc,n);const t=!(this[Nc]&&!this.listeners("error").length)&&super.emit("error",n);return this[dc](),t}if("resume"===t){const t=super.emit("resume");return this[dc](),t}if("finish"===t||"prefinish"===t){const e=super.emit(t);return this.removeAllListeners(t),e}const r=super.emit(t,...e);return this[dc](),r}[Oc](t){for(const e of this[jc])!1===e.dest.write(t)&&this.pause();const e=!this[Bc]&&super.emit("data",t);return this[dc](),e}[kc](){return!this[lc]&&(this[lc]=!0,this.readable=!1,this[Tc]?(Fc((()=>this[xc]())),!0):this[xc]())}[xc](){if(this[yc]){const t=this[yc].end();if(t){for(const e of this[jc])e.dest.write(t);this[Bc]||super.emit("data",t)}}for(const t of this[jc])t.end();const t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){const t=Object.assign([],{dataLength:0});this[Uc]||(t.dataLength=0);const e=this.promise();return this.on("data",(e=>{t.push(e),this[Uc]||(t.dataLength+=e.length)})),await e,t}async concat(){if(this[Uc])throw new Error("cannot concat in objectMode");const t=await this.collect();return this[gc]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(Ac,(()=>e(new Error("stream destroyed")))),this.on("error",(t=>e(t))),this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[Bc]=!1;let t=!1;const e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[uc])return e();let r,i;const o=t=>{this.off("data",s),this.off("end",a),this.off(Ac,c),e(),i(t)},s=t=>{this.off("error",o),this.off("end",a),this.off(Ac,c),this.pause(),r({value:t,done:!!this[uc]})},a=()=>{this.off("error",o),this.off("data",s),this.off(Ac,c),e(),r({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise(((t,e)=>{i=e,r=t,this.once(Ac,c),this.once("error",o),this.once("end",a),this.once("data",s)}))},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Bc]=!1;let t=!1;const e=()=>(this.pause(),this.off(Pc,e),this.off(Ac,e),this.off("end",e),t=!0,{done:!0,value:void 0});return this.once("end",e),this.once(Pc,e),this.once(Ac,e),{next:()=>{if(t)return e();const n=this.read();return null===n?e():{done:!1,value:n}},throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[Ac])return t?this.emit("error",t):this.emit(Ac),this;this[Ac]=!0,this[Bc]=!0,this[Rc].length=0,this[_c]=0;return"function"!=typeof this.close||this[fc]||this.close(),t?this.emit("error",t):this.emit(Ac),this}static get isStream(){return sc}}const Wc=g.writev,$c=Symbol("_autoClose"),Hc=Symbol("_close"),Vc=Symbol("_ended"),Zc=Symbol("_fd"),Yc=Symbol("_finished"),Kc=Symbol("_flags"),Xc=Symbol("_flush"),Qc=Symbol("_handleChunk"),tu=Symbol("_makeBuf"),eu=Symbol("_mode"),nu=Symbol("_needDrain"),ru=Symbol("_onerror"),iu=Symbol("_onopen"),ou=Symbol("_onread"),su=Symbol("_onwrite"),au=Symbol("_open"),cu=Symbol("_path"),uu=Symbol("_pos"),du=Symbol("_queue"),lu=Symbol("_read"),hu=Symbol("_readSize"),pu=Symbol("_reading"),fu=Symbol("_remain"),mu=Symbol("_size"),vu=Symbol("_write"),bu=Symbol("_writing"),gu=Symbol("_defaultFlag"),yu=Symbol("_errored");class wu extends Jc{[yu]=!1;[Zc];[cu];[hu];[pu]=!1;[mu];[fu];[$c];constructor(t,e){if(super(e=e||{}),this.readable=!0,this.writable=!1,"string"!=typeof t)throw new TypeError("path must be a string");this[yu]=!1,this[Zc]="number"==typeof e.fd?e.fd:void 0,this[cu]=t,this[hu]=e.readSize||16777216,this[pu]=!1,this[mu]="number"==typeof e.size?e.size:1/0,this[fu]=this[mu],this[$c]="boolean"!=typeof e.autoClose||e.autoClose,"number"==typeof this[Zc]?this[lu]():this[au]()}get fd(){return this[Zc]}get path(){return this[cu]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[au](){g.open(this[cu],"r",((t,e)=>this[iu](t,e)))}[iu](t,e){t?this[ru](t):(this[Zc]=e,this.emit("open",e),this[lu]())}[tu](){return Buffer.allocUnsafe(Math.min(this[hu],this[fu]))}[lu](){if(!this[pu]){this[pu]=!0;const t=this[tu]();if(0===t.length)return process.nextTick((()=>this[ou](null,0,t)));g.read(this[Zc],t,0,t.length,null,((t,e,n)=>this[ou](t,e,n)))}}[ou](t,e,n){this[pu]=!1,t?this[ru](t):this[Qc](e,n)&&this[lu]()}[Hc](){if(this[$c]&&"number"==typeof this[Zc]){const t=this[Zc];this[Zc]=void 0,g.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}[ru](t){this[pu]=!0,this[Hc](),this.emit("error",t)}[Qc](t,e){let n=!1;return this[fu]-=t,t>0&&(n=super.write(t<e.length?e.subarray(0,t):e)),(0===t||this[fu]<=0)&&(n=!1,this[Hc](),super.end()),n}emit(t,...e){switch(t){case"prefinish":case"finish":return!1;case"drain":return"number"==typeof this[Zc]&&this[lu](),!1;case"error":return!this[yu]&&(this[yu]=!0,super.emit(t,...e));default:return super.emit(t,...e)}}}class Iu extends wu{[au](){let t=!0;try{this[iu](null,g.openSync(this[cu],"r")),t=!1}finally{t&&this[Hc]()}}[lu](){let t=!0;try{if(!this[pu]){for(this[pu]=!0;;){const t=this[tu](),e=0===t.length?0:g.readSync(this[Zc],t,0,t.length,null);if(!this[Qc](e,t))break}this[pu]=!1}t=!1}finally{t&&this[Hc]()}}[Hc](){if(this[$c]&&"number"==typeof this[Zc]){const t=this[Zc];this[Zc]=void 0,g.closeSync(t),this.emit("close")}}}class Eu extends t{readable=!1;writable=!0;[yu]=!1;[bu]=!1;[Vc]=!1;[du]=[];[nu]=!1;[cu];[eu];[$c];[Zc];[gu];[Kc];[Yc]=!1;[uu];constructor(t,e){super(e=e||{}),this[cu]=t,this[Zc]="number"==typeof e.fd?e.fd:void 0,this[eu]=void 0===e.mode?438:e.mode,this[uu]="number"==typeof e.start?e.start:void 0,this[$c]="boolean"!=typeof e.autoClose||e.autoClose;const n=void 0!==this[uu]?"r+":"w";this[gu]=void 0===e.flags,this[Kc]=void 0===e.flags?n:e.flags,void 0===this[Zc]&&this[au]()}emit(t,...e){if("error"===t){if(this[yu])return!1;this[yu]=!0}return super.emit(t,...e)}get fd(){return this[Zc]}get path(){return this[cu]}[ru](t){this[Hc](),this[bu]=!0,this.emit("error",t)}[au](){g.open(this[cu],this[Kc],this[eu],((t,e)=>this[iu](t,e)))}[iu](t,e){this[gu]&&"r+"===this[Kc]&&t&&"ENOENT"===t.code?(this[Kc]="w",this[au]()):t?this[ru](t):(this[Zc]=e,this.emit("open",e),this[bu]||this[Xc]())}end(t,e){return t&&this.write(t,e),this[Vc]=!0,this[bu]||this[du].length||"number"!=typeof this[Zc]||this[su](null,0),this}write(t,e){return"string"==typeof t&&(t=Buffer.from(t,e)),this[Vc]?(this.emit("error",new Error("write() after end()")),!1):void 0===this[Zc]||this[bu]||this[du].length?(this[du].push(t),this[nu]=!0,!1):(this[bu]=!0,this[vu](t),!0)}[vu](t){g.write(this[Zc],t,0,t.length,this[uu],((t,e)=>this[su](t,e)))}[su](t,e){t?this[ru](t):(void 0!==this[uu]&&"number"==typeof e&&(this[uu]+=e),this[du].length?this[Xc]():(this[bu]=!1,this[Vc]&&!this[Yc]?(this[Yc]=!0,this[Hc](),this.emit("finish")):this[nu]&&(this[nu]=!1,this.emit("drain"))))}[Xc](){if(0===this[du].length)this[Vc]&&this[su](null,0);else if(1===this[du].length)this[vu](this[du].pop());else{const t=this[du];this[du]=[],Wc(this[Zc],t,this[uu],((t,e)=>this[su](t,e)))}}[Hc](){if(this[$c]&&"number"==typeof this[Zc]){const t=this[Zc];this[Zc]=void 0,g.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}}class Ru extends Eu{[au](){let t;if(this[gu]&&"r+"===this[Kc])try{t=g.openSync(this[cu],this[Kc],this[eu])}catch(t){if("ENOENT"===t?.code)return this[Kc]="w",this[au]();throw t}else t=g.openSync(this[cu],this[Kc],this[eu]);this[iu](null,t)}[Hc](){if(this[$c]&&"number"==typeof this[Zc]){const t=this[Zc];this[Zc]=void 0,g.closeSync(t),this.emit("close")}}[vu](t){let e=!0;try{this[su](null,g.writeSync(this[Zc],t,0,t.length,this[uu])),e=!1}finally{if(e)try{this[Hc]()}catch{}}}}const ju=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),_u=t=>{const e=ju.get(t);return e||t},Su=(t={})=>{if(!t)return{};const e={};for(const[n,r]of Object.entries(t)){e[_u(n)]=r}return void 0===e.chmod&&!1===e.noChmod&&(e.chmod=!0),delete e.noChmod,e},Cu=(t,e,n,r,i)=>Object.assign(((o=[],s,a)=>{Array.isArray(o)&&(s=o,o={}),"function"==typeof s&&(a=s,s=void 0),s=s?Array.from(s):[];const c=Su(o);if(i?.(c,s),(u=c).sync&&u.file){if("function"==typeof a)throw new TypeError("callback not supported for sync tar functions");return t(c,s)}if((t=>!t.sync&&!!t.file)(c)){const t=e(c,s),n=a||void 0;return n?t.then((()=>n()),n):t}if((t=>!!t.sync&&!t.file)(c)){if("function"==typeof a)throw new TypeError("callback not supported for sync tar functions");return n(c,s)}if((t=>!t.sync&&!t.file)(c)){if("function"==typeof a)throw new TypeError("callback only supported with file option");return r(c,s)}throw new Error("impossible options??");var u}),{syncFile:t,asyncFile:e,syncNoFile:n,asyncNoFile:r,validate:i}),Uu="object"==typeof process&&process?process:{stdout:null,stderr:null},Au=t=>!!t&&"object"==typeof t&&(t instanceof pd||t instanceof x||Pu(t)||Ou(t)),Pu=t=>!!t&&"object"==typeof t&&t instanceof k&&"function"==typeof t.pipe&&t.pipe!==x.Writable.prototype.pipe,Ou=t=>!!t&&"object"==typeof t&&t instanceof k&&"function"==typeof t.write&&"function"==typeof t.end,ku=Symbol("EOF"),xu=Symbol("maybeEmitEnd"),Tu=Symbol("emittedEnd"),Du=Symbol("emittingEnd"),Lu=Symbol("emittedError"),Nu=Symbol("closed"),qu=Symbol("read"),Bu=Symbol("flush"),Fu=Symbol("flushChunk"),Mu=Symbol("encoding"),Gu=Symbol("decoder"),zu=Symbol("flowing"),Ju=Symbol("paused"),Wu=Symbol("resume"),$u=Symbol("buffer"),Hu=Symbol("pipes"),Vu=Symbol("bufferLength"),Zu=Symbol("bufferPush"),Yu=Symbol("bufferShift"),Ku=Symbol("objectMode"),Xu=Symbol("destroyed"),Qu=Symbol("error"),td=Symbol("emitData"),ed=Symbol("emitEnd"),nd=Symbol("emitEnd2"),rd=Symbol("async"),id=Symbol("abort"),od=Symbol("aborted"),sd=Symbol("signal"),ad=Symbol("dataListeners"),cd=Symbol("discarded"),ud=t=>Promise.resolve().then(t),dd=t=>t();class ld{src;dest;opts;ondrain;constructor(t,e,n){this.src=t,this.dest=e,this.opts=n,this.ondrain=()=>t[Wu](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class hd extends ld{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,n){super(t,e,n),this.proxyErrors=t=>e.emit("error",t),t.on("error",this.proxyErrors)}}class pd extends k{[zu]=!1;[Ju]=!1;[Hu]=[];[$u]=[];[Ku];[Mu];[rd];[Gu];[ku]=!1;[Tu]=!1;[Du]=!1;[Nu]=!1;[Lu]=null;[Vu]=0;[Xu]=!1;[sd];[od]=!1;[ad]=0;[cd]=!1;writable=!0;readable=!0;constructor(...t){const e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw new TypeError("Encoding and objectMode may not be used together");e.objectMode?(this[Ku]=!0,this[Mu]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[Mu]=e.encoding,this[Ku]=!1):(this[Ku]=!1,this[Mu]=null),this[rd]=!!e.async,this[Gu]=this[Mu]?new T(this[Mu]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[$u]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[Hu]});const{signal:n}=e;n&&(this[sd]=n,n.aborted?this[id]():n.addEventListener("abort",(()=>this[id]())))}get bufferLength(){return this[Vu]}get encoding(){return this[Mu]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Ku]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[rd]}set async(t){this[rd]=this[rd]||!!t}[id](){this[od]=!0,this.emit("abort",this[sd]?.reason),this.destroy(this[sd]?.reason)}get aborted(){return this[od]}set aborted(t){}write(t,e,n){if(this[od])return!1;if(this[ku])throw new Error("write after end");if(this[Xu])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(n=e,e="utf8"),e||(e="utf8");const r=this[rd]?ud:dd;if(!this[Ku]&&!Buffer.isBuffer(t))if(i=t,!Buffer.isBuffer(i)&&ArrayBuffer.isView(i))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if((t=>t instanceof ArrayBuffer||!!t&&"object"==typeof t&&t.constructor&&"ArrayBuffer"===t.constructor.name&&t.byteLength>=0)(t))t=Buffer.from(t);else if("string"!=typeof t)throw new Error("Non-contiguous data written to non-objectMode stream");var i;return this[Ku]?(this[zu]&&0!==this[Vu]&&this[Bu](!0),this[zu]?this.emit("data",t):this[Zu](t),0!==this[Vu]&&this.emit("readable"),n&&r(n),this[zu]):t.length?("string"!=typeof t||e===this[Mu]&&!this[Gu]?.lastNeed||(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[Mu]&&(t=this[Gu].write(t)),this[zu]&&0!==this[Vu]&&this[Bu](!0),this[zu]?this.emit("data",t):this[Zu](t),0!==this[Vu]&&this.emit("readable"),n&&r(n),this[zu]):(0!==this[Vu]&&this.emit("readable"),n&&r(n),this[zu])}read(t){if(this[Xu])return null;if(this[cd]=!1,0===this[Vu]||0===t||t&&t>this[Vu])return this[xu](),null;this[Ku]&&(t=null),this[$u].length>1&&!this[Ku]&&(this[$u]=[this[Mu]?this[$u].join(""):Buffer.concat(this[$u],this[Vu])]);const e=this[qu](t||null,this[$u][0]);return this[xu](),e}[qu](t,e){if(this[Ku])this[Yu]();else{const n=e;t===n.length||null===t?this[Yu]():"string"==typeof n?(this[$u][0]=n.slice(t),e=n.slice(0,t),this[Vu]-=t):(this[$u][0]=n.subarray(t),e=n.subarray(0,t),this[Vu]-=t)}return this.emit("data",e),this[$u].length||this[ku]||this.emit("drain"),e}end(t,e,n){return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e="utf8"),void 0!==t&&this.write(t,e),n&&this.once("end",n),this[ku]=!0,this.writable=!1,!this[zu]&&this[Ju]||this[xu](),this}[Wu](){this[Xu]||(this[ad]||this[Hu].length||(this[cd]=!0),this[Ju]=!1,this[zu]=!0,this.emit("resume"),this[$u].length?this[Bu]():this[ku]?this[xu]():this.emit("drain"))}resume(){return this[Wu]()}pause(){this[zu]=!1,this[Ju]=!0,this[cd]=!1}get destroyed(){return this[Xu]}get flowing(){return this[zu]}get paused(){return this[Ju]}[Zu](t){this[Ku]?this[Vu]+=1:this[Vu]+=t.length,this[$u].push(t)}[Yu](){return this[Ku]?this[Vu]-=1:this[Vu]-=this[$u][0].length,this[$u].shift()}[Bu](t=!1){do{}while(this[Fu](this[Yu]())&&this[$u].length);t||this[$u].length||this[ku]||this.emit("drain")}[Fu](t){return this.emit("data",t),this[zu]}pipe(t,e){if(this[Xu])return t;this[cd]=!1;const n=this[Tu];return e=e||{},t===Uu.stdout||t===Uu.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,n?e.end&&t.end():(this[Hu].push(e.proxyErrors?new hd(this,t,e):new ld(this,t,e)),this[rd]?ud((()=>this[Wu]())):this[Wu]()),t}unpipe(t){const e=this[Hu].find((e=>e.dest===t));e&&(1===this[Hu].length?(this[zu]&&0===this[ad]&&(this[zu]=!1),this[Hu]=[]):this[Hu].splice(this[Hu].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){const n=super.on(t,e);if("data"===t)this[cd]=!1,this[ad]++,this[Hu].length||this[zu]||this[Wu]();else if("readable"===t&&0!==this[Vu])super.emit("readable");else if((t=>"end"===t||"finish"===t||"prefinish"===t)(t)&&this[Tu])super.emit(t),this.removeAllListeners(t);else if("error"===t&&this[Lu]){const t=e;this[rd]?ud((()=>t.call(this,this[Lu]))):t.call(this,this[Lu])}return n}removeListener(t,e){return this.off(t,e)}off(t,e){const n=super.off(t,e);return"data"===t&&(this[ad]=this.listeners("data").length,0!==this[ad]||this[cd]||this[Hu].length||(this[zu]=!1)),n}removeAllListeners(t){const e=super.removeAllListeners(t);return"data"!==t&&void 0!==t||(this[ad]=0,this[cd]||this[Hu].length||(this[zu]=!1)),e}get emittedEnd(){return this[Tu]}[xu](){this[Du]||this[Tu]||this[Xu]||0!==this[$u].length||!this[ku]||(this[Du]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Nu]&&this.emit("close"),this[Du]=!1)}emit(t,...e){const n=e[0];if("error"!==t&&"close"!==t&&t!==Xu&&this[Xu])return!1;if("data"===t)return!(!this[Ku]&&!n)&&(this[rd]?(ud((()=>this[td](n))),!0):this[td](n));if("end"===t)return this[ed]();if("close"===t){if(this[Nu]=!0,!this[Tu]&&!this[Xu])return!1;const t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[Lu]=n,super.emit(Qu,n);const t=!(this[sd]&&!this.listeners("error").length)&&super.emit("error",n);return this[xu](),t}if("resume"===t){const t=super.emit("resume");return this[xu](),t}if("finish"===t||"prefinish"===t){const e=super.emit(t);return this.removeAllListeners(t),e}const r=super.emit(t,...e);return this[xu](),r}[td](t){for(const e of this[Hu])!1===e.dest.write(t)&&this.pause();const e=!this[cd]&&super.emit("data",t);return this[xu](),e}[ed](){return!this[Tu]&&(this[Tu]=!0,this.readable=!1,this[rd]?(ud((()=>this[nd]())),!0):this[nd]())}[nd](){if(this[Gu]){const t=this[Gu].end();if(t){for(const e of this[Hu])e.dest.write(t);this[cd]||super.emit("data",t)}}for(const t of this[Hu])t.end();const t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){const t=Object.assign([],{dataLength:0});this[Ku]||(t.dataLength=0);const e=this.promise();return this.on("data",(e=>{t.push(e),this[Ku]||(t.dataLength+=e.length)})),await e,t}async concat(){if(this[Ku])throw new Error("cannot concat in objectMode");const t=await this.collect();return this[Mu]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(Xu,(()=>e(new Error("stream destroyed")))),this.on("error",(t=>e(t))),this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[cd]=!1;let t=!1;const e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[ku])return e();let r,i;const o=t=>{this.off("data",s),this.off("end",a),this.off(Xu,c),e(),i(t)},s=t=>{this.off("error",o),this.off("end",a),this.off(Xu,c),this.pause(),r({value:t,done:!!this[ku]})},a=()=>{this.off("error",o),this.off("data",s),this.off(Xu,c),e(),r({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise(((t,e)=>{i=e,r=t,this.once(Xu,c),this.once("error",o),this.once("end",a),this.once("data",s)}))},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[cd]=!1;let t=!1;const e=()=>(this.pause(),this.off(Qu,e),this.off(Xu,e),this.off("end",e),t=!0,{done:!0,value:void 0});return this.once("end",e),this.once(Qu,e),this.once(Xu,e),{next:()=>{if(t)return e();const n=this.read();return null===n?e():{done:!1,value:n}},throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[Xu])return t?this.emit("error",t):this.emit(Xu),this;this[Xu]=!0,this[cd]=!0,this[$u].length=0,this[Vu]=0;return"function"!=typeof this.close||this[Nu]||this.close(),t?this.emit("error",t):this.emit(Xu),this}static get isStream(){return Au}}const fd=p.constants||{ZLIB_VERNUM:4736},md=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},fd)),vd=P.concat,bd=Object.getOwnPropertyDescriptor(P,"concat"),gd=t=>t,yd=!0===bd?.writable||void 0!==bd?.set?t=>{P.concat=t?gd:vd}:t=>{},wd=Symbol("_superWrite");class Id extends Error{code;errno;constructor(t){super("zlib: "+t.message),this.code=t.code,this.errno=t.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+t.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const Ed=Symbol("flushFlag");class Rd extends pd{#t=!1;#e=!1;#n;#r;#i;#o;#s;get sawError(){return this.#t}get handle(){return this.#o}get flushFlag(){return this.#n}constructor(t,e){if(!t||"object"!=typeof t)throw new TypeError("invalid options for ZlibBase constructor");super(t),this.#n=t.flush??0,this.#r=t.finishFlush??0,this.#i=t.fullFlushFlag??0;try{this.#o=new h[e](t)}catch(t){throw new Id(t)}this.#s=t=>{this.#t||(this.#t=!0,this.close(),this.emit("error",t))},this.#o?.on("error",(t=>this.#s(new Id(t)))),this.once("end",(()=>this.close))}close(){this.#o&&(this.#o.close(),this.#o=void 0,this.emit("close"))}reset(){if(!this.#t)return M(this.#o,"zlib binding closed"),this.#o.reset?.()}flush(t){this.ended||("number"!=typeof t&&(t=this.#i),this.write(Object.assign(P.alloc(0),{[Ed]:t})))}end(t,e,n){return"function"==typeof t&&(n=t,e=void 0,t=void 0),"function"==typeof e&&(n=e,e=void 0),t&&(e?this.write(t,e):this.write(t)),this.flush(this.#r),this.#e=!0,super.end(n)}get ended(){return this.#e}[wd](t){return super.write(t)}write(t,e,n){if("function"==typeof e&&(n=e,e="utf8"),"string"==typeof t&&(t=P.from(t,e)),this.#t)return;M(this.#o,"zlib binding closed");const r=this.#o._handle,i=r.close;r.close=()=>{};const o=this.#o.close;let s,a;this.#o.close=()=>{},yd(!0);try{const e="number"==typeof t[Ed]?t[Ed]:this.#n;s=this.#o._processChunk(t,e),yd(!1)}catch(t){yd(!1),this.#s(new Id(t))}finally{this.#o&&(this.#o._handle=r,r.close=i,this.#o.close=o,this.#o.removeAllListeners("error"))}if(this.#o&&this.#o.on("error",(t=>this.#s(new Id(t)))),s)if(Array.isArray(s)&&s.length>0){const t=s[0];a=this[wd](P.from(t));for(let t=1;t<s.length;t++)a=this[wd](s[t])}else a=this[wd](P.from(s));return n&&n(),a}}class jd extends Rd{#a;#c;constructor(t,e){(t=t||{}).flush=t.flush||md.Z_NO_FLUSH,t.finishFlush=t.finishFlush||md.Z_FINISH,t.fullFlushFlag=md.Z_FULL_FLUSH,super(t,e),this.#a=t.level,this.#c=t.strategy}params(t,e){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#a!==t||this.#c!==e){this.flush(md.Z_SYNC_FLUSH),M(this.handle,"zlib binding closed");const n=this.handle.flush;this.handle.flush=(t,e)=>{"function"==typeof t&&(e=t,t=this.flushFlag),this.flush(t),e?.()};try{this.handle.params(t,e)}finally{this.handle.flush=n}this.handle&&(this.#a=t,this.#c=e)}}}}class _d extends jd{#u;constructor(t){super(t,"Gzip"),this.#u=t&&!!t.portable}[wd](t){return this.#u?(this.#u=!1,t[9]=255,super[wd](t)):super[wd](t)}}class Sd extends jd{constructor(t){super(t,"Unzip")}}class Cd extends Rd{constructor(t,e){(t=t||{}).flush=t.flush||md.BROTLI_OPERATION_PROCESS,t.finishFlush=t.finishFlush||md.BROTLI_OPERATION_FINISH,t.fullFlushFlag=md.BROTLI_OPERATION_FLUSH,super(t,e)}}class Ud extends Cd{constructor(t){super(t,"BrotliCompress")}}class Ad extends Cd{constructor(t){super(t,"BrotliDecompress")}}class Pd{tail;head;length=0;static create(t=[]){return new Pd(t)}constructor(t=[]){for(const e of t)this.push(e)}*[Symbol.iterator](){for(let t=this.head;t;t=t.next)yield t.value}removeNode(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");const e=t.next,n=t.prev;return e&&(e.prev=n),n&&(n.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=n),this.length--,t.next=void 0,t.prev=void 0,t.list=void 0,e}unshiftNode(t){if(t===this.head)return;t.list&&t.list.removeNode(t);const e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}pushNode(t){if(t===this.tail)return;t.list&&t.list.removeNode(t);const e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}push(...t){for(let e=0,n=t.length;e<n;e++)kd(this,t[e]);return this.length}unshift(...t){for(var e=0,n=t.length;e<n;e++)xd(this,t[e]);return this.length}pop(){if(!this.tail)return;const t=this.tail.value,e=this.tail;return this.tail=this.tail.prev,this.tail?this.tail.next=void 0:this.head=void 0,e.list=void 0,this.length--,t}shift(){if(!this.head)return;const t=this.head.value,e=this.head;return this.head=this.head.next,this.head?this.head.prev=void 0:this.tail=void 0,e.list=void 0,this.length--,t}forEach(t,e){e=e||this;for(let n=this.head,r=0;n;r++)t.call(e,n.value,r,this),n=n.next}forEachReverse(t,e){e=e||this;for(let n=this.tail,r=this.length-1;n;r--)t.call(e,n.value,r,this),n=n.prev}get(t){let e=0,n=this.head;for(;n&&e<t;e++)n=n.next;if(e===t&&n)return n.value}getReverse(t){let e=0,n=this.tail;for(;n&&e<t;e++)n=n.prev;if(e===t&&n)return n.value}map(t,e){e=e||this;const n=new Pd;for(let r=this.head;r;)n.push(t.call(e,r.value,this)),r=r.next;return n}mapReverse(t,e){e=e||this;var n=new Pd;for(let r=this.tail;r;)n.push(t.call(e,r.value,this)),r=r.prev;return n}reduce(t,e){let n,r=this.head;if(arguments.length>1)n=e;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;r;i++)n=t(n,r.value,i),r=r.next;return n}reduceReverse(t,e){let n,r=this.tail;if(arguments.length>1)n=e;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(let e=this.length-1;r;e--)n=t(n,r.value,e),r=r.prev;return n}toArray(){const t=new Array(this.length);for(let e=0,n=this.head;n;e++)t[e]=n.value,n=n.next;return t}toArrayReverse(){const t=new Array(this.length);for(let e=0,n=this.tail;n;e++)t[e]=n.value,n=n.prev;return t}slice(t=0,e=this.length){e<0&&(e+=this.length),t<0&&(t+=this.length);const n=new Pd;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);let r=this.head,i=0;for(i=0;r&&i<t;i++)r=r.next;for(;r&&i<e;i++,r=r.next)n.push(r.value);return n}sliceReverse(t=0,e=this.length){e<0&&(e+=this.length),t<0&&(t+=this.length);const n=new Pd;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);let r=this.length,i=this.tail;for(;i&&r>e;r--)i=i.prev;for(;i&&r>t;r--,i=i.prev)n.push(i.value);return n}splice(t,e=0,...n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);let r=this.head;for(let e=0;r&&e<t;e++)r=r.next;const i=[];for(let t=0;r&&t<e;t++)i.push(r.value),r=this.removeNode(r);r?r!==this.tail&&(r=r.prev):r=this.tail;for(const t of n)r=Od(this,r,t);return i}reverse(){const t=this.head,e=this.tail;for(let e=t;e;e=e.prev){const t=e.prev;e.prev=e.next,e.next=t}return this.head=e,this.tail=t,this}}function Od(t,e,n){const r=e,i=e?e.next:t.head,o=new Td(n,r,i,t);return void 0===o.next&&(t.tail=o),void 0===o.prev&&(t.head=o),t.length++,o}function kd(t,e){t.tail=new Td(e,t.tail,void 0,t),t.head||(t.head=t.tail),t.length++}function xd(t,e){t.head=new Td(e,void 0,t.head,t),t.tail||(t.tail=t.head),t.length++}class Td{list;next;prev;value;constructor(t,e,n,r){this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=void 0,n?(n.prev=this,this.next=n):this.next=void 0}}const Dd=(t,e)=>{e[0]=128;for(var n=e.length;n>1;n--)e[n-1]=255&t,t=Math.floor(t/256)},Ld=(t,e)=>{e[0]=255;var n=!1;t*=-1;for(var r=e.length;r>1;r--){var i=255&t;t=Math.floor(t/256),n?e[r-1]=Bd(i):0===i?e[r-1]=0:(n=!0,e[r-1]=Fd(i))}},Nd=t=>{for(var e=t.length,n=0,r=!1,i=e-1;i>-1;i--){var o,s=Number(t[i]);r?o=Bd(s):0===s?o=s:(r=!0,o=Fd(s)),0!==o&&(n-=o*Math.pow(256,e-i-1))}return n},qd=t=>{for(var e=t.length,n=0,r=e-1;r>-1;r--){var i=Number(t[r]);0!==i&&(n+=i*Math.pow(256,e-r-1))}return n},Bd=t=>255&(255^t),Fd=t=>1+(255^t)&255,Md=t=>Gd.has(t),Gd=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),zd=new Map(Array.from(Gd).map((t=>[t[1],t[0]])));class Jd{cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#d="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(t,e=0,n,r){Buffer.isBuffer(t)?this.decode(t,e||0,n,r):t&&this.#l(t)}decode(t,e,n,r){if(e||(e=0),!(t&&t.length>=e+512))throw new Error("need 512 bytes for header");this.path=$d(t,e,100),this.mode=Zd(t,e+100,8),this.uid=Zd(t,e+108,8),this.gid=Zd(t,e+116,8),this.size=Zd(t,e+124,12),this.mtime=Hd(t,e+136,12),this.cksum=Zd(t,e+148,12),r&&this.#l(r,!0),n&&this.#l(n);const i=$d(t,e+156,1);if(Md(i)&&(this.#d=i||"0"),"0"===this.#d&&"/"===this.path.slice(-1)&&(this.#d="5"),"5"===this.#d&&(this.size=0),this.linkpath=$d(t,e+157,100),"ustar\x0000"===t.subarray(e+257,e+265).toString())if(this.uname=$d(t,e+265,32),this.gname=$d(t,e+297,32),this.devmaj=Zd(t,e+329,8)??0,this.devmin=Zd(t,e+337,8)??0,0!==t[e+475]){const n=$d(t,e+345,155);this.path=n+"/"+this.path}else{const n=$d(t,e+345,130);n&&(this.path=n+"/"+this.path),this.atime=Hd(t,e+476,12),this.ctime=Hd(t,e+488,12)}let o=256;for(let n=e;n<e+148;n++)o+=t[n];for(let n=e+156;n<e+512;n++)o+=t[n];this.cksumValid=o===this.cksum,void 0===this.cksum&&256===o&&(this.nullBlock=!0)}#l(t,e=!1){Object.assign(this,Object.fromEntries(Object.entries(t).filter((([t,n])=>!(null==n||"path"===t&&e||"linkpath"===t&&e||"global"===t)))))}encode(t,e=0){if(t||(t=this.block=Buffer.alloc(512)),"Unsupported"===this.#d&&(this.#d="0"),!(t.length>=e+512))throw new Error("need 512 bytes for header");const n=this.ctime||this.atime?130:155,r=Wd(this.path||"",n),i=r[0],o=r[1];this.needPax=!!r[2],this.needPax=il(t,e,100,i)||this.needPax,this.needPax=Xd(t,e+100,8,this.mode)||this.needPax,this.needPax=Xd(t,e+108,8,this.uid)||this.needPax,this.needPax=Xd(t,e+116,8,this.gid)||this.needPax,this.needPax=Xd(t,e+124,12,this.size)||this.needPax,this.needPax=nl(t,e+136,12,this.mtime)||this.needPax,t[e+156]=this.#d.charCodeAt(0),this.needPax=il(t,e+157,100,this.linkpath)||this.needPax,t.write("ustar\x0000",e+257,8),this.needPax=il(t,e+265,32,this.uname)||this.needPax,this.needPax=il(t,e+297,32,this.gname)||this.needPax,this.needPax=Xd(t,e+329,8,this.devmaj)||this.needPax,this.needPax=Xd(t,e+337,8,this.devmin)||this.needPax,this.needPax=il(t,e+345,n,o)||this.needPax,0!==t[e+475]?this.needPax=il(t,e+345,155,o)||this.needPax:(this.needPax=il(t,e+345,130,o)||this.needPax,this.needPax=nl(t,e+476,12,this.atime)||this.needPax,this.needPax=nl(t,e+488,12,this.ctime)||this.needPax);let s=256;for(let n=e;n<e+148;n++)s+=t[n];for(let n=e+156;n<e+512;n++)s+=t[n];return this.cksum=s,Xd(t,e+148,8,this.cksum),this.cksumValid=!0,this.needPax}get type(){return"Unsupported"===this.#d?this.#d:Gd.get(this.#d)}get typeKey(){return this.#d}set type(t){const e=String(zd.get(t));if(Md(e)||"Unsupported"===e)this.#d=e;else{if(!Md(t))throw new TypeError("invalid entry type: "+t);this.#d=t}}}const Wd=(t,e)=>{const n=100;let r,i=t,o="";const s=L.parse(t).root||".";if(Buffer.byteLength(i)<n)r=[i,o,!1];else{o=L.dirname(i),i=L.basename(i);do{Buffer.byteLength(i)<=n&&Buffer.byteLength(o)<=e?r=[i,o,!1]:Buffer.byteLength(i)>n&&Buffer.byteLength(o)<=e?r=[i.slice(0,99),o,!0]:(i=L.join(L.basename(o),i),o=L.dirname(o))}while(o!==s&&void 0===r);r||(r=[t.slice(0,99),"",!0])}return r},$d=(t,e,n)=>t.subarray(e,e+n).toString("utf8").replace(/\0.*/,""),Hd=(t,e,n)=>Vd(Zd(t,e,n)),Vd=t=>void 0===t?void 0:new Date(1e3*t),Zd=(t,e,n)=>128&Number(t[e])?(t=>{const e=t[0],n=128===e?qd(t.subarray(1,t.length)):255===e?Nd(t):null;if(null===n)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(n))throw Error("parsed number outside of javascript safe integer range");return n})(t.subarray(e,e+n)):Yd(t,e,n),Yd=(t,e,n)=>{return r=parseInt(t.subarray(e,e+n).toString("utf8").replace(/\0.*$/,"").trim(),8),isNaN(r)?void 0:r;var r},Kd={12:8589934591,8:2097151},Xd=(t,e,n,r)=>void 0!==r&&(r>Kd[n]||r<0?(((t,e)=>{if(!Number.isSafeInteger(t))throw Error("cannot encode number outside of javascript safe integer range");t<0?Ld(t,e):Dd(t,e)})(r,t.subarray(e,e+n)),!0):(Qd(t,e,n,r),!1)),Qd=(t,e,n,r)=>t.write(tl(r,n),e,n,"ascii"),tl=(t,e)=>el(Math.floor(t).toString(8),e),el=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",nl=(t,e,n,r)=>void 0!==r&&Xd(t,e,n,r.getTime()/1e3),rl=new Array(156).join("\0"),il=(t,e,n,r)=>void 0!==r&&(t.write(r+rl,e,n,"utf8"),r.length!==Buffer.byteLength(r)||r.length>n);class ol{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(t,e=!1){this.atime=t.atime,this.charset=t.charset,this.comment=t.comment,this.ctime=t.ctime,this.dev=t.dev,this.gid=t.gid,this.global=e,this.gname=t.gname,this.ino=t.ino,this.linkpath=t.linkpath,this.mtime=t.mtime,this.nlink=t.nlink,this.path=t.path,this.size=t.size,this.uid=t.uid,this.uname=t.uname}encode(){const t=this.encodeBody();if(""===t)return Buffer.allocUnsafe(0);const e=Buffer.byteLength(t),n=512*Math.ceil(1+e/512),r=Buffer.allocUnsafe(n);for(let t=0;t<512;t++)r[t]=0;new Jd({path:("PaxHeader/"+N(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:e,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(r),r.write(t,512,e,"utf8");for(let t=e+512;t<r.length;t++)r[t]=0;return r}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(t){if(void 0===this[t])return"";const e=this[t],n=" "+("dev"===t||"ino"===t||"nlink"===t?"SCHILY.":"")+t+"="+(e instanceof Date?e.getTime()/1e3:e)+"\n",r=Buffer.byteLength(n);let i=Math.floor(Math.log(r)/Math.log(10))+1;r+i>=Math.pow(10,i)&&(i+=1);return i+r+n}static parse(t,e,n=!1){return new ol(sl(al(t),e),n)}}const sl=(t,e)=>e?Object.assign({},e,t):t,al=t=>t.replace(/\n$/,"").split("\n").reduce(cl,Object.create(null)),cl=(t,e)=>{const n=parseInt(e,10);if(n!==Buffer.byteLength(e)+1)return t;const r=(e=e.slice((n+" ").length)).split("="),i=r.shift();if(!i)return t;const o=i.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),s=r.join("=");return t[o]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(o)?new Date(1e3*Number(s)):/^[0-9]+$/.test(s)?+s:s,t},ul="win32"!==(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform)?t=>t:t=>t&&t.replace(/\\/g,"/");class dl extends pd{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(t,e,n){switch(super({}),this.pause(),this.extended=e,this.globalExtended=n,this.header=t,this.remain=t.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=t.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!t.path)throw new Error("no path provided for tar.ReadEntry");this.path=ul(t.path),this.mode=t.mode,this.mode&&(this.mode=4095&this.mode),this.uid=t.uid,this.gid=t.gid,this.uname=t.uname,this.gname=t.gname,this.size=this.remain,this.mtime=t.mtime,this.atime=t.atime,this.ctime=t.ctime,this.linkpath=t.linkpath?ul(t.linkpath):void 0,this.uname=t.uname,this.gname=t.gname,e&&this.#l(e),n&&this.#l(n,!0)}write(t){const e=t.length;if(e>this.blockRemain)throw new Error("writing more to entry than is appropriate");const n=this.remain,r=this.blockRemain;return this.remain=Math.max(0,n-e),this.blockRemain=Math.max(0,r-e),!!this.ignore||(n>=e?super.write(t):super.write(t.subarray(0,n)))}#l(t,e=!1){t.path&&(t.path=ul(t.path)),t.linkpath&&(t.linkpath=ul(t.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(t).filter((([t,n])=>!(null==n||"path"===t&&e)))))}}const ll=(t,e,n,r={})=>{t.file&&(r.file=t.file),t.cwd&&(r.cwd=t.cwd),r.code=n instanceof Error&&n.code||e,r.tarCode=e,t.strict||!1===r.recoverable?n instanceof Error?t.emit("error",Object.assign(n,r)):t.emit("error",Object.assign(new Error(`${e}: ${n}`),r)):(n instanceof Error&&(r=Object.assign(n,r),n=n.message),t.emit("warn",e,n,r))},hl=Buffer.from([31,139]),pl=Symbol("state"),fl=Symbol("writeEntry"),ml=Symbol("readEntry"),vl=Symbol("nextEntry"),bl=Symbol("processEntry"),gl=Symbol("extendedHeader"),yl=Symbol("globalExtendedHeader"),wl=Symbol("meta"),Il=Symbol("emitMeta"),El=Symbol("buffer"),Rl=Symbol("queue"),jl=Symbol("ended"),_l=Symbol("emittedEnd"),Sl=Symbol("emit"),Cl=Symbol("unzip"),Ul=Symbol("consumeChunk"),Al=Symbol("consumeChunkSub"),Pl=Symbol("consumeBody"),Ol=Symbol("consumeMeta"),kl=Symbol("consumeHeader"),xl=Symbol("consuming"),Tl=Symbol("bufferConcat"),Dl=Symbol("maybeEnd"),Ll=Symbol("writing"),Nl=Symbol("aborted"),ql=Symbol("onDone"),Bl=Symbol("sawValidEntry"),Fl=Symbol("sawNullBlock"),Ml=Symbol("sawEOF"),Gl=Symbol("closeStream"),zl=()=>!0;class Jl extends e{file;strict;maxMetaEntrySize;filter;brotli;writable=!0;readable=!1;[Rl]=new Pd;[El];[ml];[fl];[pl]="begin";[wl]="";[gl];[yl];[jl]=!1;[Cl];[Nl]=!1;[Bl];[Fl]=!1;[Ml]=!1;[Ll]=!1;[xl]=!1;[_l]=!1;constructor(t={}){super(),this.file=t.file||"",this.on(ql,(()=>{"begin"!==this[pl]&&!1!==this[Bl]||this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")})),t.ondone?this.on(ql,t.ondone):this.on(ql,(()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")})),this.strict=!!t.strict,this.maxMetaEntrySize=t.maxMetaEntrySize||1048576,this.filter="function"==typeof t.filter?t.filter:zl;const e=t.file&&(t.file.endsWith(".tar.br")||t.file.endsWith(".tbr"));this.brotli=t.gzip||void 0===t.brotli?!!e&&void 0:t.brotli,this.on("end",(()=>this[Gl]())),"function"==typeof t.onwarn&&this.on("warn",t.onwarn),"function"==typeof t.onReadEntry&&this.on("entry",t.onReadEntry)}warn(t,e,n={}){ll(this,t,e,n)}[kl](t,e){let n;void 0===this[Bl]&&(this[Bl]=!1);try{n=new Jd(t,e,this[gl],this[yl])}catch(t){return this.warn("TAR_ENTRY_INVALID",t)}if(n.nullBlock)this[Fl]?(this[Ml]=!0,"begin"===this[pl]&&(this[pl]="header"),this[Sl]("eof")):(this[Fl]=!0,this[Sl]("nullBlock"));else if(this[Fl]=!1,n.cksumValid)if(n.path){const t=n.type;if(/^(Symbolic)?Link$/.test(t)&&!n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:n});else if(/^(Symbolic)?Link$/.test(t)||/^(Global)?ExtendedHeader$/.test(t)||!n.linkpath){const t=this[fl]=new dl(n,this[gl],this[yl]);if(!this[Bl])if(t.remain){const e=()=>{t.invalid||(this[Bl]=!0)};t.on("end",e)}else this[Bl]=!0;t.meta?t.size>this.maxMetaEntrySize?(t.ignore=!0,this[Sl]("ignoredEntry",t),this[pl]="ignore",t.resume()):t.size>0&&(this[wl]="",t.on("data",(t=>this[wl]+=t)),this[pl]="meta"):(this[gl]=void 0,t.ignore=t.ignore||!this.filter(t.path,t),t.ignore?(this[Sl]("ignoredEntry",t),this[pl]=t.remain?"ignore":"header",t.resume()):(t.remain?this[pl]="body":(this[pl]="header",t.end()),this[ml]?this[Rl].push(t):(this[Rl].push(t),this[vl]())))}else this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:n})}else this.warn("TAR_ENTRY_INVALID","path is required",{header:n});else this.warn("TAR_ENTRY_INVALID","checksum failure",{header:n})}[Gl](){queueMicrotask((()=>this.emit("close")))}[bl](t){let e=!0;if(t)if(Array.isArray(t)){const[e,...n]=t;this.emit(e,...n)}else this[ml]=t,this.emit("entry",t),t.emittedEnd||(t.on("end",(()=>this[vl]())),e=!1);else this[ml]=void 0,e=!1;return e}[vl](){do{}while(this[bl](this[Rl].shift()));if(!this[Rl].length){const t=this[ml];!t||t.flowing||t.size===t.remain?this[Ll]||this.emit("drain"):t.once("drain",(()=>this.emit("drain")))}}[Pl](t,e){const n=this[fl];if(!n)throw new Error("attempt to consume body without entry??");const r=n.blockRemain??0,i=r>=t.length&&0===e?t:t.subarray(e,e+r);return n.write(i),n.blockRemain||(this[pl]="header",this[fl]=void 0,n.end()),i.length}[Ol](t,e){const n=this[fl],r=this[Pl](t,e);return!this[fl]&&n&&this[Il](n),r}[Sl](t,e,n){this[Rl].length||this[ml]?this[Rl].push([t,e,n]):this.emit(t,e,n)}[Il](t){switch(this[Sl]("meta",this[wl]),t.type){case"ExtendedHeader":case"OldExtendedHeader":this[gl]=ol.parse(this[wl],this[gl],!1);break;case"GlobalExtendedHeader":this[yl]=ol.parse(this[wl],this[yl],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{const t=this[gl]??Object.create(null);this[gl]=t,t.path=this[wl].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{const t=this[gl]||Object.create(null);this[gl]=t,t.linkpath=this[wl].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+t.type)}}abort(t){this[Nl]=!0,this.emit("abort",t),this.warn("TAR_ABORT",t,{recoverable:!1})}write(t,e,n){if("function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8")),this[Nl])return n?.(),!1;if((void 0===this[Cl]||void 0===this.brotli&&!1===this[Cl])&&t){if(this[El]&&(t=Buffer.concat([this[El],t]),this[El]=void 0),t.length<hl.length)return this[El]=t,n?.(),!0;for(let e=0;void 0===this[Cl]&&e<hl.length;e++)t[e]!==hl[e]&&(this[Cl]=!1);const e=void 0===this.brotli;if(!1===this[Cl]&&e)if(t.length<512){if(!this[jl])return this[El]=t,n?.(),!0;this.brotli=!0}else try{new Jd(t.subarray(0,512)),this.brotli=!1}catch(t){this.brotli=!0}if(void 0===this[Cl]||!1===this[Cl]&&this.brotli){const e=this[jl];this[jl]=!1,this[Cl]=void 0===this[Cl]?new Sd({}):new Ad({}),this[Cl].on("data",(t=>this[Ul](t))),this[Cl].on("error",(t=>this.abort(t))),this[Cl].on("end",(()=>{this[jl]=!0,this[Ul]()})),this[Ll]=!0;const r=!!this[Cl][e?"end":"write"](t);return this[Ll]=!1,n?.(),r}}this[Ll]=!0,this[Cl]?this[Cl].write(t):this[Ul](t),this[Ll]=!1;const r=!this[Rl].length&&(!this[ml]||this[ml].flowing);return r||this[Rl].length||this[ml]?.once("drain",(()=>this.emit("drain"))),n?.(),r}[Tl](t){t&&!this[Nl]&&(this[El]=this[El]?Buffer.concat([this[El],t]):t)}[Dl](){if(this[jl]&&!this[_l]&&!this[Nl]&&!this[xl]){this[_l]=!0;const t=this[fl];if(t&&t.blockRemain){const e=this[El]?this[El].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`,{entry:t}),this[El]&&t.write(this[El]),t.end()}this[Sl](ql)}}[Ul](t){if(this[xl]&&t)this[Tl](t);else if(t||this[El]){if(t){if(this[xl]=!0,this[El]){this[Tl](t);const e=this[El];this[El]=void 0,this[Al](e)}else this[Al](t);for(;this[El]&&this[El]?.length>=512&&!this[Nl]&&!this[Ml];){const t=this[El];this[El]=void 0,this[Al](t)}this[xl]=!1}}else this[Dl]();this[El]&&!this[jl]||this[Dl]()}[Al](t){let e=0;const n=t.length;for(;e+512<=n&&!this[Nl]&&!this[Ml];)switch(this[pl]){case"begin":case"header":this[kl](t,e),e+=512;break;case"ignore":case"body":e+=this[Pl](t,e);break;case"meta":e+=this[Ol](t,e);break;default:throw new Error("invalid state: "+this[pl])}e<n&&(this[El]?this[El]=Buffer.concat([t.subarray(e),this[El]]):this[El]=t.subarray(e))}end(t,e,n){return"function"==typeof t&&(n=t,e=void 0,t=void 0),"function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,e)),n&&this.once("finish",n),this[Nl]||(this[Cl]?(t&&this[Cl].write(t),this[Cl].end()):(this[jl]=!0,void 0===this.brotli&&(t=t||Buffer.alloc(0)),t&&this.write(t),this[Dl]())),this}}const Wl=t=>{let e=t.length-1,n=-1;for(;e>-1&&"/"===t.charAt(e);)n=e,e--;return-1===n?t:t.slice(0,n)},$l=(t,e)=>{const n=new Map(e.map((t=>[Wl(t),!0]))),r=t.filter,i=(t,e="")=>{const r=e||j(t).root||".";let o;if(t===r)o=!1;else{const e=n.get(t);o=void 0!==e?e:i(_(t),r)}return n.set(t,o),o};t.filter=r?(t,e)=>r(t,e)&&i(Wl(t)):t=>i(Wl(t))},Hl=Cu((t=>{const e=new Jl(t),n=t.file;let r;try{const i=F.statSync(n),o=t.maxReadSize||16777216;if(i.size<o)e.end(F.readFileSync(n));else{let t=0;const s=Buffer.allocUnsafe(o);for(r=F.openSync(n,"r");t<i.size;){const n=F.readSync(r,s,0,o,t);t+=n,e.write(s.subarray(0,n))}e.end()}}finally{if("number"==typeof r)try{F.closeSync(r)}catch(t){}}}),((t,e)=>{const n=new Jl(t),r=t.maxReadSize||16777216,i=t.file,o=new Promise(((t,e)=>{n.on("error",e),n.on("end",t),F.stat(i,((t,o)=>{if(t)e(t);else{const t=new wu(i,{readSize:r,size:o.size});t.on("error",e),t.pipe(n)}}))}));return o}),(t=>new Jl(t)),(t=>new Jl(t)),((t,e)=>{e?.length&&$l(t,e),t.noResume||(t=>{const e=t.onReadEntry;t.onReadEntry=e?t=>{e(t),t.resume()}:t=>t.resume()})(t)})),Vl=(t,e,n)=>(t&=4095,n&&(t=-19&t|384),e&&(256&t&&(t|=64),32&t&&(t|=8),4&t&&(t|=1)),t),{isAbsolute:Zl,parse:Yl}=q,Kl=t=>{let e="",n=Yl(t);for(;Zl(t)||n.root;){const r="/"===t.charAt(0)&&"//?/"!==t.slice(0,4)?"/":n.root;t=t.slice(r.length),e+=r,n=Yl(t)}return[e,t]},Xl=["|","<",">","?",":"],Ql=Xl.map((t=>String.fromCharCode(61440+t.charCodeAt(0)))),th=new Map(Xl.map(((t,e)=>[t,Ql[e]]))),eh=new Map(Ql.map(((t,e)=>[t,Xl[e]]))),nh=t=>Xl.reduce(((t,e)=>t.split(e).join(th.get(e))),t),rh=(t,e)=>e?(t=ul(t).replace(/^\.(\/|$)/,""),Wl(e)+"/"+t):ul(t),ih=Symbol("process"),oh=Symbol("file"),sh=Symbol("directory"),ah=Symbol("symlink"),ch=Symbol("hardlink"),uh=Symbol("header"),dh=Symbol("read"),lh=Symbol("lstat"),hh=Symbol("onlstat"),ph=Symbol("onread"),fh=Symbol("onreadlink"),mh=Symbol("openfile"),vh=Symbol("onopenfile"),bh=Symbol("close"),gh=Symbol("mode"),yh=Symbol("awaitDrain"),wh=Symbol("ondrain"),Ih=Symbol("prefix");class Eh extends pd{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#h=!1;constructor(t,e={}){const n=Su(e);super(),this.path=ul(t),this.portable=!!n.portable,this.maxReadSize=n.maxReadSize||16777216,this.linkCache=n.linkCache||new Map,this.statCache=n.statCache||new Map,this.preservePaths=!!n.preservePaths,this.cwd=ul(n.cwd||process.cwd()),this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.mtime=n.mtime,this.prefix=n.prefix?ul(n.prefix):void 0,this.onWriteEntry=n.onWriteEntry,"function"==typeof n.onwarn&&this.on("warn",n.onwarn);let r=!1;if(!this.preservePaths){const[t,e]=Kl(this.path);t&&"string"==typeof e&&(this.path=e,r=t)}var i;this.win32=!!n.win32||"win32"===process.platform,this.win32&&(this.path=(i=this.path.replace(/\\/g,"/"),Ql.reduce(((t,e)=>t.split(e).join(eh.get(e))),i)),t=t.replace(/\\/g,"/")),this.absolute=ul(n.absolute||R.resolve(this.cwd,t)),""===this.path&&(this.path="./"),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path});const o=this.statCache.get(this.absolute);o?this[hh](o):this[lh]()}warn(t,e,n={}){return ll(this,t,e,n)}emit(t,...e){return"error"===t&&(this.#h=!0),super.emit(t,...e)}[lh](){g.lstat(this.absolute,((t,e)=>{if(t)return this.emit("error",t);this[hh](e)}))}[hh](t){this.statCache.set(this.absolute,t),this.stat=t,t.isFile()||(t.size=0),this.type=_h(t),this.emit("stat",t),this[ih]()}[ih](){switch(this.type){case"File":return this[oh]();case"Directory":return this[sh]();case"SymbolicLink":return this[ah]();default:return this.end()}}[gh](t){return Vl(t,"Directory"===this.type,this.portable)}[Ih](t){return rh(t,this.prefix)}[uh](){if(!this.stat)throw new Error("cannot write header before stat");"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new Jd({path:this[Ih](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[Ih](this.linkpath):this.linkpath,mode:this[gh](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:"Unsupported"===this.type?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new ol({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[Ih](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[Ih](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());const t=this.header?.block;if(!t)throw new Error("failed to encode header");super.write(t)}[sh](){if(!this.stat)throw new Error("cannot create directory entry without stat");"/"!==this.path.slice(-1)&&(this.path+="/"),this.stat.size=0,this[uh](),this.end()}[ah](){g.readlink(this.absolute,((t,e)=>{if(t)return this.emit("error",t);this[fh](e)}))}[fh](t){this.linkpath=ul(t),this[uh](),this.end()}[ch](t){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=ul(R.relative(this.cwd,t)),this.stat.size=0,this[uh](),this.end()}[oh](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){const t=`${this.stat.dev}:${this.stat.ino}`,e=this.linkCache.get(t);if(0===e?.indexOf(this.cwd))return this[ch](e);this.linkCache.set(t,this.absolute)}if(this[uh](),0===this.stat.size)return this.end();this[mh]()}[mh](){g.open(this.absolute,"r",((t,e)=>{if(t)return this.emit("error",t);this[vh](e)}))}[vh](t){if(this.fd=t,this.#h)return this[bh]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;const e=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(e),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[dh]()}[dh](){const{fd:t,buf:e,offset:n,length:r,pos:i}=this;if(void 0===t||void 0===e)throw new Error("cannot read file without first opening");g.read(t,e,n,r,i,((t,e)=>{if(t)return this[bh]((()=>this.emit("error",t)));this[ph](e)}))}[bh](t=()=>{}){void 0!==this.fd&&g.close(this.fd,t)}[ph](t){if(t<=0&&this.remain>0){const t=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[bh]((()=>this.emit("error",t)))}if(t>this.remain){const t=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[bh]((()=>this.emit("error",t)))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(t===this.remain)for(let e=t;e<this.length&&t<this.blockRemain;e++)this.buf[e+this.offset]=0,t++,this.remain++;const e=0===this.offset&&t===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+t);this.write(e)?this[wh]():this[yh]((()=>this[wh]()))}[yh](t){this.once("drain",t)}write(t,e,n){if("function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8")),this.blockRemain<t.length){const t=Object.assign(new Error("writing more data than expected"),{path:this.absolute});return this.emit("error",t)}return this.remain-=t.length,this.blockRemain-=t.length,this.pos+=t.length,this.offset+=t.length,super.write(t,null,n)}[wh](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[bh]((t=>t?this.emit("error",t):this.end()));if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[dh]()}}class Rh extends Eh{sync=!0;[lh](){this[hh](g.lstatSync(this.absolute))}[ah](){this[fh](g.readlinkSync(this.absolute))}[mh](){this[vh](g.openSync(this.absolute,"r"))}[dh](){let t=!0;try{const{fd:e,buf:n,offset:r,length:i,pos:o}=this;if(void 0===e||void 0===n)throw new Error("fd and buf must be set in READ method");const s=g.readSync(e,n,r,i,o);this[ph](s),t=!1}finally{if(t)try{this[bh]((()=>{}))}catch(t){}}}[yh](t){t()}[bh](t=()=>{}){void 0!==this.fd&&g.closeSync(this.fd),t()}}class jh extends pd{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(t,e,n={}){return ll(this,t,e,n)}constructor(t,e={}){const n=Su(e);super(),this.preservePaths=!!n.preservePaths,this.portable=!!n.portable,this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.onWriteEntry=n.onWriteEntry,this.readEntry=t;const{type:r}=t;if("Unsupported"===r)throw new Error("writing entry that should be ignored");this.type=r,"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.prefix=n.prefix,this.path=ul(t.path),this.mode=void 0!==t.mode?this[gh](t.mode):void 0,this.uid=this.portable?void 0:t.uid,this.gid=this.portable?void 0:t.gid,this.uname=this.portable?void 0:t.uname,this.gname=this.portable?void 0:t.gname,this.size=t.size,this.mtime=this.noMtime?void 0:n.mtime||t.mtime,this.atime=this.portable?void 0:t.atime,this.ctime=this.portable?void 0:t.ctime,this.linkpath=void 0!==t.linkpath?ul(t.linkpath):void 0,"function"==typeof n.onwarn&&this.on("warn",n.onwarn);let i=!1;if(!this.preservePaths){const[t,e]=Kl(this.path);t&&"string"==typeof e&&(this.path=e,i=t)}this.remain=t.size,this.blockRemain=t.startBlockSize,this.onWriteEntry?.(this),this.header=new Jd({path:this[Ih](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[Ih](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.header.encode()&&!this.noPax&&super.write(new ol({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[Ih](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[Ih](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());const o=this.header?.block;if(!o)throw new Error("failed to encode header");super.write(o),t.pipe(this)}[Ih](t){return rh(t,this.prefix)}[gh](t){return Vl(t,"Directory"===this.type,this.portable)}write(t,e,n){"function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8"));const r=t.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(t,n)}end(t,e,n){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),"function"==typeof t&&(n=t,e=void 0,t=void 0),"function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,e??"utf8")),n&&this.once("finish",n),t?super.end(t,n):super.end(n),this}}const _h=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";class Sh{path;absolute;entry;stat;readdir;pending=!1;ignore=!1;piped=!1;constructor(t,e){this.path=t||"./",this.absolute=e}}const Ch=Buffer.alloc(1024),Uh=Symbol("onStat"),Ah=Symbol("ended"),Ph=Symbol("queue"),Oh=Symbol("current"),kh=Symbol("process"),xh=Symbol("processing"),Th=Symbol("processJob"),Dh=Symbol("jobs"),Lh=Symbol("jobDone"),Nh=Symbol("addFSEntry"),qh=Symbol("addTarEntry"),Bh=Symbol("stat"),Fh=Symbol("readdir"),Mh=Symbol("onreaddir"),Gh=Symbol("pipe"),zh=Symbol("entry"),Jh=Symbol("entryOpt"),Wh=Symbol("writeEntryClass"),$h=Symbol("write"),Hh=Symbol("ondrain");class Vh extends pd{opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[Wh];onWriteEntry;[Ph];[Dh]=0;[xh]=!1;[Ah]=!1;constructor(t={}){if(super(),this.opt=t,this.file=t.file||"",this.cwd=t.cwd||process.cwd(),this.maxReadSize=t.maxReadSize,this.preservePaths=!!t.preservePaths,this.strict=!!t.strict,this.noPax=!!t.noPax,this.prefix=ul(t.prefix||""),this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.readdirCache=t.readdirCache||new Map,this.onWriteEntry=t.onWriteEntry,this[Wh]=Eh,"function"==typeof t.onwarn&&this.on("warn",t.onwarn),this.portable=!!t.portable,t.gzip||t.brotli){if(t.gzip&&t.brotli)throw new TypeError("gzip and brotli are mutually exclusive");if(t.gzip&&("object"!=typeof t.gzip&&(t.gzip={}),this.portable&&(t.gzip.portable=!0),this.zip=new _d(t.gzip)),t.brotli&&("object"!=typeof t.brotli&&(t.brotli={}),this.zip=new Ud(t.brotli)),!this.zip)throw new Error("impossible");const e=this.zip;e.on("data",(t=>super.write(t))),e.on("end",(()=>super.end())),e.on("drain",(()=>this[Hh]())),this.on("resume",(()=>e.resume()))}else this.on("drain",this[Hh]);this.noDirRecurse=!!t.noDirRecurse,this.follow=!!t.follow,this.noMtime=!!t.noMtime,t.mtime&&(this.mtime=t.mtime),this.filter="function"==typeof t.filter?t.filter:()=>!0,this[Ph]=new Pd,this[Dh]=0,this.jobs=Number(t.jobs)||4,this[xh]=!1,this[Ah]=!1}[$h](t){return super.write(t)}add(t){return this.write(t),this}end(t,e,n){return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e=void 0),t&&this.add(t),this[Ah]=!0,this[kh](),n&&n(),this}write(t){if(this[Ah])throw new Error("write after end");return t instanceof dl?this[qh](t):this[Nh](t),this.flowing}[qh](t){const e=ul(R.resolve(this.cwd,t.path));if(this.filter(t.path,t)){const n=new Sh(t.path,e);n.entry=new jh(t,this[Jh](n)),n.entry.on("end",(()=>this[Lh](n))),this[Dh]+=1,this[Ph].push(n)}else t.resume();this[kh]()}[Nh](t){const e=ul(R.resolve(this.cwd,t));this[Ph].push(new Sh(t,e)),this[kh]()}[Bh](t){t.pending=!0,this[Dh]+=1;const e=this.follow?"stat":"lstat";g[e](t.absolute,((e,n)=>{t.pending=!1,this[Dh]-=1,e?this.emit("error",e):this[Uh](t,n)}))}[Uh](t,e){this.statCache.set(t.absolute,e),t.stat=e,this.filter(t.path,e)||(t.ignore=!0),this[kh]()}[Fh](t){t.pending=!0,this[Dh]+=1,g.readdir(t.absolute,((e,n)=>{if(t.pending=!1,this[Dh]-=1,e)return this.emit("error",e);this[Mh](t,n)}))}[Mh](t,e){this.readdirCache.set(t.absolute,e),t.readdir=e,this[kh]()}[kh](){if(!this[xh]){this[xh]=!0;for(let t=this[Ph].head;t&&this[Dh]<this.jobs;t=t.next)if(this[Th](t.value),t.value.ignore){const e=t.next;this[Ph].removeNode(t),t.next=e}this[xh]=!1,this[Ah]&&!this[Ph].length&&0===this[Dh]&&(this.zip?this.zip.end(Ch):(super.write(Ch),super.end()))}}get[Oh](){return this[Ph]&&this[Ph].head&&this[Ph].head.value}[Lh](t){this[Ph].shift(),this[Dh]-=1,this[kh]()}[Th](t){if(!t.pending)if(t.entry)t!==this[Oh]||t.piped||this[Gh](t);else{if(!t.stat){const e=this.statCache.get(t.absolute);e?this[Uh](t,e):this[Bh](t)}if(t.stat&&!t.ignore){if(!this.noDirRecurse&&t.stat.isDirectory()&&!t.readdir){const e=this.readdirCache.get(t.absolute);if(e?this[Mh](t,e):this[Fh](t),!t.readdir)return}t.entry=this[zh](t),t.entry?t!==this[Oh]||t.piped||this[Gh](t):t.ignore=!0}}}[Jh](t){return{onwarn:(t,e,n)=>this.warn(t,e,n),noPax:this.noPax,cwd:this.cwd,absolute:t.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[zh](t){this[Dh]+=1;try{return new this[Wh](t.path,this[Jh](t)).on("end",(()=>this[Lh](t))).on("error",(t=>this.emit("error",t)))}catch(t){this.emit("error",t)}}[Hh](){this[Oh]&&this[Oh].entry&&this[Oh].entry.resume()}[Gh](t){t.piped=!0,t.readdir&&t.readdir.forEach((e=>{const n=t.path,r="./"===n?"":n.replace(/\/*$/,"/");this[Nh](r+e)}));const e=t.entry,n=this.zip;if(!e)throw new Error("cannot pipe without source");n?e.on("data",(t=>{n.write(t)||e.pause()})):e.on("data",(t=>{super.write(t)||e.pause()}))}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(t,e,n={}){ll(this,t,e,n)}}class Zh extends Vh{sync=!0;constructor(t){super(t),this[Wh]=Rh}pause(){}resume(){}[Bh](t){const e=this.follow?"statSync":"lstatSync";this[Uh](t,g[e](t.absolute))}[Fh](t){this[Mh](t,g.readdirSync(t.absolute))}[Gh](t){const e=t.entry,n=this.zip;if(t.readdir&&t.readdir.forEach((e=>{const n=t.path,r="./"===n?"":n.replace(/\/*$/,"/");this[Nh](r+e)})),!e)throw new Error("Cannot pipe without source");n?e.on("data",(t=>{n.write(t)})):e.on("data",(t=>{super[$h](t)}))}}const Yh=(t,e)=>{e.forEach((e=>{"@"===e.charAt(0)?Hl({file:D.resolve(t.cwd,e.slice(1)),sync:!0,noResume:!0,onReadEntry:e=>t.add(e)}):t.add(e)})),t.end()},Kh=async(t,e)=>{for(let n=0;n<e.length;n++){const r=String(e[n]);"@"===r.charAt(0)?await Hl({file:D.resolve(String(t.cwd),r.slice(1)),noResume:!0,onReadEntry:e=>{t.add(e)}}):t.add(r)}t.end()},Xh=Cu(((t,e)=>{const n=new Zh(t),r=new Ru(t.file,{mode:t.mode||438});n.pipe(r),Yh(n,e)}),((t,e)=>{const n=new Vh(t),r=new Eu(t.file,{mode:t.mode||438});n.pipe(r);const i=new Promise(((t,e)=>{r.on("error",e),r.on("close",t),n.on("error",e)}));return Kh(n,e),i}),((t,e)=>{const n=new Zh(t);return Yh(n,e),n}),((t,e)=>{const n=new Vh(t);return Kh(n,e),n}),((t,e)=>{if(!e?.length)throw new TypeError("no paths specified to add to archive")})),Qh="win32"===(process.env.__FAKE_PLATFORM__||process.platform),{O_CREAT:tp,O_TRUNC:ep,O_WRONLY:np}=g.constants,rp=Number(process.env.__FAKE_FS_O_FILENAME__)||g.constants.UV_FS_O_FILEMAP||0,ip=rp|ep|tp|np,op=Qh&&!!rp?t=>t<524288?ip:"w":()=>"w",sp=(t,e,n)=>{try{return F.lchownSync(t,e,n)}catch(t){if("ENOENT"!==t?.code)throw t}},ap=(t,e,n,r)=>{F.lchown(t,e,n,(t=>{r(t&&"ENOENT"!==t?.code?t:null)}))},cp=(t,e,n,r,i)=>{if(e.isDirectory())up(D.resolve(t,e.name),n,r,(o=>{if(o)return i(o);const s=D.resolve(t,e.name);ap(s,n,r,i)}));else{const o=D.resolve(t,e.name);ap(o,n,r,i)}},up=(t,e,n,r)=>{F.readdir(t,{withFileTypes:!0},((i,o)=>{if(i){if("ENOENT"===i.code)return r();if("ENOTDIR"!==i.code&&"ENOTSUP"!==i.code)return r(i)}if(i||!o.length)return ap(t,e,n,r);let s=o.length,a=null;const c=i=>{if(!a)return i?r(a=i):0===--s?ap(t,e,n,r):void 0};for(const r of o)cp(t,r,e,n,c)}))},dp=(t,e,n,r)=>{e.isDirectory()&&lp(D.resolve(t,e.name),n,r),sp(D.resolve(t,e.name),n,r)},lp=(t,e,n)=>{let r;try{r=F.readdirSync(t,{withFileTypes:!0})}catch(r){const i=r;if("ENOENT"===i?.code)return;if("ENOTDIR"===i?.code||"ENOTSUP"===i?.code)return sp(t,e,n);throw i}for(const i of r)dp(t,i,e,n);return sp(t,e,n)},hp=t=>{if(t)if("object"==typeof t)t={mode:511,...t};else if("number"==typeof t)t={mode:t};else{if("string"!=typeof t)throw new TypeError("invalid options argument");t={mode:parseInt(t,8)}}else t={mode:511};const e=t,n=t.fs||{};return t.mkdir=t.mkdir||n.mkdir||y,t.mkdirAsync=t.mkdirAsync?t.mkdirAsync:async(t,n)=>new Promise(((r,i)=>e.mkdir(t,n,((t,e)=>t?i(t):r(e))))),t.stat=t.stat||n.stat||w,t.statAsync=t.statAsync?t.statAsync:async t=>new Promise(((n,r)=>e.stat(t,((t,e)=>t?r(t):n(e))))),t.statSync=t.statSync||n.statSync||I,t.mkdirSync=t.mkdirSync||n.mkdirSync||E,e},pp=(t,e,n)=>{const r=_(t),i={...hp(e),recursive:!1};if(r===t)try{return i.mkdirSync(t,i)}catch(t){if(t&&"EISDIR"!==t.code)throw t;return}try{return i.mkdirSync(t,i),n||t}catch(e){const o=e;if(o&&"ENOENT"===o.code)return pp(t,i,pp(r,i,n));if(o&&"EEXIST"!==o.code&&o&&"EROFS"!==o.code)throw e;try{if(!i.statSync(t).isDirectory())throw e}catch(t){throw e}}},fp=Object.assign((async(t,e,n)=>{const r=hp(e);r.recursive=!1;const i=_(t);return i===t?r.mkdirAsync(t,r).catch((t=>{if(t&&"EISDIR"!==t.code)throw t})):r.mkdirAsync(t,r).then((()=>n||t),(async e=>{const o=e;if(o&&"ENOENT"===o.code)return fp(i,r).then((e=>fp(t,r,e)));if(o&&"EEXIST"!==o.code&&"EROFS"!==o.code)throw e;return r.statAsync(t).then((t=>{if(t.isDirectory())return n;throw e}),(()=>{throw e}))}))}),{sync:pp}),mp=async(t,e,n)=>{if(n!==e)return t.statAsync(e).then((t=>t.isDirectory()?n:void 0),(n=>n&&"ENOENT"===n.code?mp(t,_(e),e):void 0))},vp=(t,e,n)=>{if(n!==e)try{return t.statSync(e).isDirectory()?n:void 0}catch(n){return n&&"ENOENT"===n.code?vp(t,_(e),e):void 0}},bp=(t,e)=>{const n=hp(e);n.recursive=!0;if(_(t)===t)return n.mkdirSync(t,n);const r=vp(n,t);try{return n.mkdirSync(t,n),r}catch(e){if(e&&"ENOENT"===e.code)return pp(t,n);throw e}},gp=Object.assign((async(t,e)=>{const n={...hp(e),recursive:!0};return _(t)===t?await n.mkdirAsync(t,n):mp(n,t).then((e=>n.mkdirAsync(t,n).then((t=>e||t)).catch((e=>{if(e&&"ENOENT"===e.code)return fp(t,n);throw e}))))}),{sync:bp}),yp=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,wp=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=S(t),"win32"===yp){const e=/[*|"<>?:]/,{root:n}=j(t);if(e.test(t.substring(n.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t},Ip=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),Ep=+Ip[0]>10||10===+Ip[0]&&+Ip[1]>=12,Rp=Ep?t=>hp(t).mkdirSync===E:()=>!1,jp=Object.assign(Ep?t=>hp(t).mkdir===y:()=>!1,{sync:Rp}),_p=(t,e)=>{t=wp(t);const n=hp(e);return Rp(n)?bp(t,n):pp(t,n)},Sp=Object.assign((async(t,e)=>{t=wp(t);const n=hp(e);return jp(n)?gp(t,n):fp(t,n)}),{mkdirpSync:_p,mkdirpNative:gp,mkdirpNativeSync:bp,mkdirpManual:fp,mkdirpManualSync:pp,sync:_p,native:gp,nativeSync:bp,manual:fp,manualSync:pp,useNative:jp,useNativeSync:Rp});class Cp extends Error{path;code;syscall="chdir";constructor(t,e){super(`${e}: Cannot cd into '${t}'`),this.path=t,this.code=e}get name(){return"CwdError"}}class Up extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(t,e){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=t,this.path=e}get name(){return"SymlinkError"}}const Ap=(t,e)=>t.get(ul(e)),Pp=(t,e,n)=>t.set(ul(e),n),Op=(t,e,n)=>{t=ul(t);const r=e.umask??18,i=448|e.mode,o=0!==(i&r),s=e.uid,a=e.gid,c="number"==typeof s&&"number"==typeof a&&(s!==e.processUid||a!==e.processGid),u=e.preserve,d=e.unlink,l=e.cache,h=ul(e.cwd),p=(e,r)=>{e?n(e):(Pp(l,t,!0),r&&c?up(r,s,a,(t=>p(t))):o?g.chmod(t,i,n):n())};if(l&&!0===Ap(l,t))return p();if(t===h)return((t,e)=>{g.stat(t,((n,r)=>{!n&&r.isDirectory()||(n=new Cp(t,n?.code||"ENOTDIR")),e(n)}))})(t,p);if(u)return Sp(t,{mode:i}).then((t=>p(null,t??void 0)),p);const f=ul(D.relative(h,t)).split("/");kp(h,f,i,l,d,h,void 0,p)},kp=(t,e,n,r,i,o,s,a)=>{if(!e.length)return a(null,s);const c=e.shift(),u=ul(D.resolve(t+"/"+c));if(Ap(r,u))return kp(u,e,n,r,i,o,s,a);g.mkdir(u,n,xp(u,e,n,r,i,o,s,a))},xp=(t,e,n,r,i,o,s,a)=>c=>{c?g.lstat(t,((u,d)=>{if(u)u.path=u.path&&ul(u.path),a(u);else if(d.isDirectory())kp(t,e,n,r,i,o,s,a);else if(i)g.unlink(t,(c=>{if(c)return a(c);g.mkdir(t,n,xp(t,e,n,r,i,o,s,a))}));else{if(d.isSymbolicLink())return a(new Up(t,t+"/"+e.join("/")));a(c)}})):kp(t,e,n,r,i,o,s=s||t,a)},Tp=(t,e)=>{t=ul(t);const n=e.umask??18,r=448|e.mode,i=0!==(r&n),o=e.uid,s=e.gid,a="number"==typeof o&&"number"==typeof s&&(o!==e.processUid||s!==e.processGid),c=e.preserve,u=e.unlink,d=e.cache,l=ul(e.cwd),h=e=>{Pp(d,t,!0),e&&a&&lp(e,o,s),i&&g.chmodSync(t,r)};if(d&&!0===Ap(d,t))return h();if(t===l)return(t=>{let e,n=!1;try{n=g.statSync(t).isDirectory()}catch(t){e=t?.code}finally{if(!n)throw new Cp(t,e??"ENOTDIR")}})(l),h();if(c)return h(_p(t,r)??void 0);const p=ul(D.relative(l,t)).split("/");let f;for(let t=p.shift(),e=l;t&&(e+="/"+t);t=p.shift())if(e=ul(D.resolve(e)),!Ap(d,e))try{g.mkdirSync(e,r),f=f||e,Pp(d,e,!0)}catch(t){const n=g.lstatSync(e);if(n.isDirectory()){Pp(d,e,!0);continue}if(u){g.unlinkSync(e),g.mkdirSync(e,r),f=f||e,Pp(d,e,!0);continue}if(n.isSymbolicLink())return new Up(e,e+"/"+p.join("/"))}return h(f)},Dp=Object.create(null),{hasOwnProperty:Lp}=Object.prototype,Np=t=>(Lp.call(Dp,t)||(Dp[t]=t.normalize("NFD")),Dp[t]),qp="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform);class Bp{#p=new Map;#f=new Map;#m=new Set;reserve(t,e){t=qp?["win32 parallelization disabled"]:t.map((t=>Wl(B(Np(t))).toLowerCase()));const n=new Set(t.map((t=>(t=>{const e=t.split("/").slice(0,-1).reduce(((t,e)=>{const n=t[t.length-1];return void 0!==n&&(e=B(n,e)),t.push(e||"/"),t}),[]);return e})(t))).reduce(((t,e)=>t.concat(e))));this.#f.set(e,{dirs:n,paths:t});for(const n of t){const t=this.#p.get(n);t?t.push(e):this.#p.set(n,[e])}for(const t of n){const n=this.#p.get(t);if(n){const t=n[n.length-1];t instanceof Set?t.add(e):n.push(new Set([e]))}else this.#p.set(t,[new Set([e])])}return this.#v(e)}#b(t){const e=this.#f.get(t);if(!e)throw new Error("function does not have any path reservations");return{paths:e.paths.map((t=>this.#p.get(t))),dirs:[...e.dirs].map((t=>this.#p.get(t)))}}check(t){const{paths:e,dirs:n}=this.#b(t);return e.every((e=>e&&e[0]===t))&&n.every((e=>e&&e[0]instanceof Set&&e[0].has(t)))}#v(t){return!(this.#m.has(t)||!this.check(t))&&(this.#m.add(t),t((()=>this.#g(t))),!0)}#g(t){if(!this.#m.has(t))return!1;const e=this.#f.get(t);if(!e)throw new Error("invalid reservation");const{paths:n,dirs:r}=e,i=new Set;for(const e of n){const n=this.#p.get(e);if(!n||n?.[0]!==t)continue;const r=n[1];if(r)if(n.shift(),"function"==typeof r)i.add(r);else for(const t of r)i.add(t);else this.#p.delete(e)}for(const e of r){const n=this.#p.get(e),r=n?.[0];if(n&&r instanceof Set)if(1!==r.size||1!==n.length)if(1===r.size){n.shift();const t=n[0];"function"==typeof t&&i.add(t)}else r.delete(t);else this.#p.delete(e)}return this.#m.delete(t),i.forEach((t=>this.#v(t))),!0}}const Fp=Symbol("onEntry"),Mp=Symbol("checkFs"),Gp=Symbol("checkFs2"),zp=Symbol("pruneCache"),Jp=Symbol("isReusable"),Wp=Symbol("makeFs"),$p=Symbol("file"),Hp=Symbol("directory"),Vp=Symbol("link"),Zp=Symbol("symlink"),Yp=Symbol("hardlink"),Kp=Symbol("unsupported"),Xp=Symbol("checkPath"),Qp=Symbol("mkdir"),tf=Symbol("onError"),ef=Symbol("pending"),nf=Symbol("pend"),rf=Symbol("unpend"),of=Symbol("ended"),sf=Symbol("maybeClose"),af=Symbol("skip"),cf=Symbol("doChown"),uf=Symbol("uid"),df=Symbol("gid"),lf=Symbol("checkedCwd"),hf="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform),pf=(t,e,n)=>void 0!==t&&t===t>>>0?t:void 0!==e&&e===e>>>0?e:n,ff=t=>Wl(ul(Np(t))).toLowerCase();class mf extends Jl{[of]=!1;[lf]=!1;[ef]=0;reservations=new Bp;transform;writable=!0;readable=!1;dirCache;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(t={}){if(t.ondone=()=>{this[of]=!0,this[sf]()},super(t),this.transform=t.transform,this.dirCache=t.dirCache||new Map,this.chmod=!!t.chmod,"number"==typeof t.uid||"number"==typeof t.gid){if("number"!=typeof t.uid||"number"!=typeof t.gid)throw new TypeError("cannot set owner without number uid and gid");if(t.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=t.uid,this.gid=t.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;void 0===t.preserveOwner&&"number"!=typeof t.uid?this.preserveOwner=!(!process.getuid||0!==process.getuid()):this.preserveOwner=!!t.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth="number"==typeof t.maxDepth?t.maxDepth:1024,this.forceChown=!0===t.forceChown,this.win32=!!t.win32||hf,this.newer=!!t.newer,this.keep=!!t.keep,this.noMtime=!!t.noMtime,this.preservePaths=!!t.preservePaths,this.unlink=!!t.unlink,this.cwd=ul(D.resolve(t.cwd||process.cwd())),this.strip=Number(t.strip)||0,this.processUmask=this.chmod?"number"==typeof t.processUmask?t.processUmask:process.umask():0,this.umask="number"==typeof t.umask?t.umask:this.processUmask,this.dmode=t.dmode||511&~this.umask,this.fmode=t.fmode||438&~this.umask,this.on("entry",(t=>this[Fp](t)))}warn(t,e,n={}){return"TAR_BAD_ARCHIVE"!==t&&"TAR_ABORT"!==t||(n.recoverable=!1),super.warn(t,e,n)}[sf](){this[of]&&0===this[ef]&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[Xp](t){const e=ul(t.path),n=e.split("/");if(this.strip){if(n.length<this.strip)return!1;if("Link"===t.type){const e=ul(String(t.linkpath)).split("/");if(!(e.length>=this.strip))return!1;t.linkpath=e.slice(this.strip).join("/")}n.splice(0,this.strip),t.path=n.join("/")}if(isFinite(this.maxDepth)&&n.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:t,path:e,depth:n.length,maxDepth:this.maxDepth}),!1;if(!this.preservePaths){if(n.includes("..")||hf&&/^[a-z]:\.\.$/i.test(n[0]??""))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:t,path:e}),!1;const[r,i]=Kl(e);r&&(t.path=String(i),this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:t,path:e}))}if(D.isAbsolute(t.path)?t.absolute=ul(D.resolve(t.path)):t.absolute=ul(D.resolve(this.cwd,t.path)),!this.preservePaths&&"string"==typeof t.absolute&&0!==t.absolute.indexOf(this.cwd+"/")&&t.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:t,path:ul(t.path),resolvedPath:t.absolute,cwd:this.cwd}),!1;if(t.absolute===this.cwd&&"Directory"!==t.type&&"GNUDumpDir"!==t.type)return!1;if(this.win32){const{root:e}=D.win32.parse(String(t.absolute));t.absolute=e+nh(String(t.absolute).slice(e.length));const{root:n}=D.win32.parse(t.path);t.path=n+nh(t.path.slice(n.length))}return!0}[Fp](t){if(!this[Xp](t))return t.resume();switch(G.equal(typeof t.absolute,"string"),t.type){case"Directory":case"GNUDumpDir":t.mode&&(t.mode=448|t.mode);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Mp](t);default:return this[Kp](t)}}[tf](t,e){"CwdError"===t.name?this.emit("error",t):(this.warn("TAR_ENTRY_ERROR",t,{entry:e}),this[rf](),e.resume())}[Qp](t,e,n){Op(ul(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:e},n)}[cf](t){return this.forceChown||this.preserveOwner&&("number"==typeof t.uid&&t.uid!==this.processUid||"number"==typeof t.gid&&t.gid!==this.processGid)||"number"==typeof this.uid&&this.uid!==this.processUid||"number"==typeof this.gid&&this.gid!==this.processGid}[uf](t){return pf(this.uid,t.uid,this.processUid)}[df](t){return pf(this.gid,t.gid,this.processGid)}[$p](t,e){const n="number"==typeof t.mode?4095&t.mode:this.fmode,r=new Eu(String(t.absolute),{flags:op(t.size),mode:n,autoClose:!1});r.on("error",(n=>{r.fd&&F.close(r.fd,(()=>{})),r.write=()=>!0,this[tf](n,t),e()}));let i=1;const o=n=>{if(n)return r.fd&&F.close(r.fd,(()=>{})),this[tf](n,t),void e();0===--i&&void 0!==r.fd&&F.close(r.fd,(n=>{n?this[tf](n,t):this[rf](),e()}))};r.on("finish",(()=>{const e=String(t.absolute),n=r.fd;if("number"==typeof n&&t.mtime&&!this.noMtime){i++;const r=t.atime||new Date,s=t.mtime;F.futimes(n,r,s,(t=>t?F.utimes(e,r,s,(e=>o(e&&t))):o()))}if("number"==typeof n&&this[cf](t)){i++;const r=this[uf](t),s=this[df](t);"number"==typeof r&&"number"==typeof s&&F.fchown(n,r,s,(t=>t?F.chown(e,r,s,(e=>o(e&&t))):o()))}o()}));const s=this.transform&&this.transform(t)||t;s!==t&&(s.on("error",(n=>{this[tf](n,t),e()})),t.pipe(s)),s.pipe(r)}[Hp](t,e){const n="number"==typeof t.mode?4095&t.mode:this.dmode;this[Qp](String(t.absolute),n,(n=>{if(n)return this[tf](n,t),void e();let r=1;const i=()=>{0===--r&&(e(),this[rf](),t.resume())};t.mtime&&!this.noMtime&&(r++,F.utimes(String(t.absolute),t.atime||new Date,t.mtime,i)),this[cf](t)&&(r++,F.chown(String(t.absolute),Number(this[uf](t)),Number(this[df](t)),i)),i()}))}[Kp](t){t.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${t.type}`,{entry:t}),t.resume()}[Zp](t,e){this[Vp](t,String(t.linkpath),"symlink",e)}[Yp](t,e){const n=ul(D.resolve(this.cwd,String(t.linkpath)));this[Vp](t,n,"link",e)}[nf](){this[ef]++}[rf](){this[ef]--,this[sf]()}[af](t){this[rf](),t.resume()}[Jp](t,e){return"File"===t.type&&!this.unlink&&e.isFile()&&e.nlink<=1&&!hf}[Mp](t){this[nf]();const e=[t.path];t.linkpath&&e.push(t.linkpath),this.reservations.reserve(e,(e=>this[Gp](t,e)))}[zp](t){"SymbolicLink"===t.type?(t=>{for(const e of t.keys())t.delete(e)})(this.dirCache):"Directory"!==t.type&&((t,e)=>{e=ff(e);for(const n of t.keys()){const r=ff(n);r!==e&&0!==r.indexOf(e+"/")||t.delete(n)}})(this.dirCache,String(t.absolute))}[Gp](t,e){this[zp](t);const n=n=>{this[zp](t),e(n)},r=()=>{this[Qp](this.cwd,this.dmode,(e=>{if(e)return this[tf](e,t),void n();this[lf]=!0,i()}))},i=()=>{if(t.absolute!==this.cwd){const e=ul(D.dirname(String(t.absolute)));if(e!==this.cwd)return this[Qp](e,this.dmode,(e=>{if(e)return this[tf](e,t),void n();o()}))}o()},o=()=>{F.lstat(String(t.absolute),((e,r)=>{if(r&&(this.keep||this.newer&&r.mtime>(t.mtime??r.mtime)))return this[af](t),void n();if(e||this[Jp](t,r))return this[Wp](null,t,n);if(r.isDirectory()){if("Directory"===t.type){const e=e=>this[Wp](e??null,t,n);return this.chmod&&t.mode&&(4095&r.mode)!==t.mode?F.chmod(String(t.absolute),Number(t.mode),e):e()}if(t.absolute!==this.cwd)return F.rmdir(String(t.absolute),(e=>this[Wp](e??null,t,n)))}if(t.absolute===this.cwd)return this[Wp](null,t,n);((t,e)=>{if(!hf)return F.unlink(t,e);const n=t+".DELETE."+z(16).toString("hex");F.rename(t,n,(t=>{if(t)return e(t);F.unlink(n,e)}))})(String(t.absolute),(e=>this[Wp](e??null,t,n)))}))};this[lf]?i():r()}[Wp](t,e,n){if(t)return this[tf](t,e),void n();switch(e.type){case"File":case"OldFile":case"ContiguousFile":return this[$p](e,n);case"Link":return this[Yp](e,n);case"SymbolicLink":return this[Zp](e,n);case"Directory":case"GNUDumpDir":return this[Hp](e,n)}}[Vp](t,e,n,r){F[n](e,String(t.absolute),(e=>{e?this[tf](e,t):(this[rf](),t.resume()),r()}))}}const vf=t=>{try{return[null,t()]}catch(t){return[t,null]}};class bf extends mf{sync=!0;[Wp](t,e){return super[Wp](t,e,(()=>{}))}[Mp](t){if(this[zp](t),!this[lf]){const e=this[Qp](this.cwd,this.dmode);if(e)return this[tf](e,t);this[lf]=!0}if(t.absolute!==this.cwd){const e=ul(D.dirname(String(t.absolute)));if(e!==this.cwd){const n=this[Qp](e,this.dmode);if(n)return this[tf](n,t)}}const[e,n]=vf((()=>F.lstatSync(String(t.absolute))));if(n&&(this.keep||this.newer&&n.mtime>(t.mtime??n.mtime)))return this[af](t);if(e||this[Jp](t,n))return this[Wp](null,t);if(n.isDirectory()){if("Directory"===t.type){const e=this.chmod&&t.mode&&(4095&n.mode)!==t.mode,[r]=e?vf((()=>{F.chmodSync(String(t.absolute),Number(t.mode))})):[];return this[Wp](r,t)}const[e]=vf((()=>F.rmdirSync(String(t.absolute))));this[Wp](e,t)}const[r]=t.absolute===this.cwd?[]:vf((()=>(t=>{if(!hf)return F.unlinkSync(t);const e=t+".DELETE."+z(16).toString("hex");F.renameSync(t,e),F.unlinkSync(e)})(String(t.absolute))));this[Wp](r,t)}[$p](t,e){const n="number"==typeof t.mode?4095&t.mode:this.fmode,r=n=>{let r;try{F.closeSync(i)}catch(t){r=t}(n||r)&&this[tf](n||r,t),e()};let i;try{i=F.openSync(String(t.absolute),op(t.size),n)}catch(t){return r(t)}const o=this.transform&&this.transform(t)||t;o!==t&&(o.on("error",(e=>this[tf](e,t))),t.pipe(o)),o.on("data",(t=>{try{F.writeSync(i,t,0,t.length)}catch(t){r(t)}})),o.on("end",(()=>{let e=null;if(t.mtime&&!this.noMtime){const n=t.atime||new Date,r=t.mtime;try{F.futimesSync(i,n,r)}catch(i){try{F.utimesSync(String(t.absolute),n,r)}catch(t){e=i}}}if(this[cf](t)){const n=this[uf](t),r=this[df](t);try{F.fchownSync(i,Number(n),Number(r))}catch(i){try{F.chownSync(String(t.absolute),Number(n),Number(r))}catch(t){e=e||i}}}r(e)}))}[Hp](t,e){const n="number"==typeof t.mode?4095&t.mode:this.dmode,r=this[Qp](String(t.absolute),n);if(r)return this[tf](r,t),void e();if(t.mtime&&!this.noMtime)try{F.utimesSync(String(t.absolute),t.atime||new Date,t.mtime)}catch(r){}if(this[cf](t))try{F.chownSync(String(t.absolute),Number(this[uf](t)),Number(this[df](t)))}catch(r){}e(),t.resume()}[Qp](t,e){try{return Tp(ul(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:e})}catch(t){return t}}[Vp](t,e,n,r){const i=`${n}Sync`;try{F[i](e,String(t.absolute)),r(),t.resume()}catch(e){return this[tf](e,t)}}}const gf=Cu((t=>{const e=new bf(t),n=t.file,r=F.statSync(n),i=t.maxReadSize||16777216;new Iu(n,{readSize:i,size:r.size}).pipe(e)}),((t,e)=>{const n=new mf(t),r=t.maxReadSize||16777216,i=t.file,o=new Promise(((t,e)=>{n.on("error",e),n.on("close",t),F.stat(i,((t,o)=>{if(t)e(t);else{const t=new wu(i,{readSize:r,size:o.size});t.on("error",e),t.pipe(n)}}))}));return o}),(t=>new bf(t)),(t=>new mf(t)),((t,e)=>{e?.length&&$l(t,e)})),yf=(t,e,n,r,i)=>{const o=new Ru(t.file,{fd:r,start:n});e.pipe(o),wf(e,i)},wf=(t,e)=>{e.forEach((e=>{"@"===e.charAt(0)?Hl({file:D.resolve(t.cwd,e.slice(1)),sync:!0,noResume:!0,onReadEntry:e=>t.add(e)}):t.add(e)})),t.end()},If=async(t,e)=>{for(let n=0;n<e.length;n++){const r=String(e[n]);"@"===r.charAt(0)?await Hl({file:D.resolve(String(t.cwd),r.slice(1)),noResume:!0,onReadEntry:e=>t.add(e)}):t.add(r)}t.end()},Ef=Cu(((t,e)=>{const n=new Zh(t);let r,i,o=!0;try{try{r=F.openSync(t.file,"r+")}catch(e){if("ENOENT"!==e?.code)throw e;r=F.openSync(t.file,"w+")}const s=F.fstatSync(r),a=Buffer.alloc(512);t:for(i=0;i<s.size;i+=512){for(let t=0,e=0;t<512;t+=e){if(e=F.readSync(r,a,t,a.length-t,i+t),0===i&&31===a[0]&&139===a[1])throw new Error("cannot append to compressed archives");if(!e)break t}const e=new Jd(a);if(!e.cksumValid)break;const n=512*Math.ceil((e.size||0)/512);if(i+n+512>s.size)break;i+=n,t.mtimeCache&&e.mtime&&t.mtimeCache.set(String(e.path),e.mtime)}o=!1,yf(t,n,i,r,e)}finally{if(o)try{F.closeSync(r)}catch(t){}}}),((t,e)=>{e=Array.from(e);const n=new Vh(t),r=new Promise(((r,i)=>{n.on("error",i);let o="r+";const s=(a,c)=>a&&"ENOENT"===a.code&&"r+"===o?(o="w+",F.open(t.file,o,s)):a||!c?i(a):void F.fstat(c,((o,s)=>{if(o)return F.close(c,(()=>i(o)));((e,n,r)=>{const i=(t,n)=>{t?F.close(e,(e=>r(t))):r(null,n)};let o=0;if(0===n)return i(null,0);let s=0;const a=Buffer.alloc(512),c=(r,u)=>{if(r||void 0===u)return i(r);if(s+=u,s<512&&u)return F.read(e,a,s,a.length-s,o+s,c);if(0===o&&31===a[0]&&139===a[1])return i(new Error("cannot append to compressed archives"));if(s<512)return i(null,o);const d=new Jd(a);if(!d.cksumValid)return i(null,o);const l=512*Math.ceil((d.size??0)/512);return o+l+512>n?i(null,o):(o+=l+512,o>=n?i(null,o):(t.mtimeCache&&d.mtime&&t.mtimeCache.set(String(d.path),d.mtime),s=0,void F.read(e,a,0,512,o,c)))};F.read(e,a,0,512,o,c)})(c,s.size,((o,s)=>{if(o)return i(o);const a=new Eu(t.file,{fd:c,start:s});n.pipe(a),a.on("error",i),a.on("close",r),If(n,e)}))}));F.open(t.file,o,s)}));return r}),(()=>{throw new TypeError("file is required")}),(()=>{throw new TypeError("file is required")}),((t,e)=>{if(!t.file)throw new TypeError("file is required");if(t.gzip||t.brotli||t.file.endsWith(".br")||t.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!e?.length)throw new TypeError("no paths specified to add/replace")}));Cu(Ef.syncFile,Ef.asyncFile,Ef.syncNoFile,Ef.asyncNoFile,((t,e=[])=>{Ef.validate?.(t,e),Rf(t)}));const Rf=t=>{const e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(n,r)=>e(n,r)&&!((t.mtimeCache?.get(n)??r.mtime??0)>(r.mtime??0)):(e,n)=>!((t.mtimeCache?.get(e)??n.mtime??0)>(n.mtime??0))};function jf(t){return Array.isArray(t)?t:[t]}const _f=/^\s+$/,Sf=/(?:[^\\]|^)\\$/,Cf=/^\\!/,Uf=/^\\#/,Af=/\r?\n/g,Pf=/^\.*\/|^\.+$/;let Of="node-ignore";"undefined"!=typeof Symbol&&(Of=Symbol.for("node-ignore"));const kf=Of,xf=/([0-z])-([0-z])/g,Tf=()=>!1,Df=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(t,e,n)=>e+(0===n.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(t,e)=>{const{length:n}=e;return e.slice(0,n-n%2)+" "}],[/[\\$.|*+(){^]/g,t=>`\\${t}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,n)=>e+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(t,e,n)=>e+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(t,e,n,r,i)=>"\\"===e?`\\[${n}${(t=>{const{length:e}=t;return t.slice(0,e-e%2)})(r)}${i}`:"]"===i&&r.length%2==0?`[${(t=>t.replace(xf,((t,e,n)=>e.charCodeAt(0)<=n.charCodeAt(0)?t:"")))(n)}${r}]`:"[]"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(t,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`]],Lf=Object.create(null),Nf=t=>"string"==typeof t;class qf{constructor(t,e,n,r){this.origin=t,this.pattern=e,this.negative=n,this.regex=r}}const Bf=(t,e)=>{const n=t;let r=!1;0===t.indexOf("!")&&(r=!0,t=t.substr(1));const i=((t,e)=>{let n=Lf[t];return n||(n=Df.reduce(((e,[n,r])=>e.replace(n,r.bind(t))),t),Lf[t]=n),e?new RegExp(n,"i"):new RegExp(n)})(t=t.replace(Cf,"!").replace(Uf,"#"),e);return new qf(n,t,r,i)},Ff=(t,e)=>{throw new e(t)},Mf=(t,e,n)=>{if(!Nf(t))return n(`path must be a string, but got \`${e}\``,TypeError);if(!t)return n("path must not be empty",TypeError);if(Mf.isNotRelative(t)){return n(`path should be a ${"`path.relative()`d"} string, but got "${e}"`,RangeError)}return!0},Gf=t=>Pf.test(t);Mf.isNotRelative=Gf,Mf.convert=t=>t;class zf{constructor({ignorecase:t=!0,ignoreCase:e=t,allowRelativePaths:n=!1}={}){var r,i,o;r=this,i=kf,o=!0,Object.defineProperty(r,i,{value:o}),this._rules=[],this._ignoreCase=e,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[kf])return this._rules=this._rules.concat(t._rules),void(this._added=!0);if((t=>t&&Nf(t)&&!_f.test(t)&&!Sf.test(t)&&0!==t.indexOf("#"))(t)){const e=Bf(t,this._ignoreCase);this._added=!0,this._rules.push(e)}}add(t){return this._added=!1,jf(Nf(t)?(t=>t.split(Af))(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,e){let n=!1,r=!1;return this._rules.forEach((i=>{const{negative:o}=i;if(r===o&&n!==r||o&&!n&&!r&&!e)return;i.regex.test(t)&&(n=!o,r=o)})),{ignored:n,unignored:r}}_test(t,e,n,r){const i=t&&Mf.convert(t);return Mf(i,t,this._allowRelativePaths?Tf:Ff),this._t(i,e,n,r)}_t(t,e,n,r){if(t in e)return e[t];if(r||(r=t.split("/")),r.pop(),!r.length)return e[t]=this._testOne(t,n);const i=this._t(r.join("/")+"/",e,n,r);return e[t]=i.ignored?i:this._testOne(t,n)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return jf(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}}const Jf=t=>new zf(t);Jf.isPathValid=t=>Mf(t&&Mf.convert(t),t,Tf),Jf.default=Jf;var Wf=Jf;if("undefined"!=typeof process&&(process.env&&process.env.IGNORE_TEST_WIN32||"win32"===process.platform)){const t=t=>/^\\\\\?\\/.test(t)||/["<>|\u0000-\u001F]+/u.test(t)?t:t.replace(/\\/g,"/");Mf.convert=t;const e=/^[a-z]:\//i;Mf.isNotRelative=t=>e.test(t)||Gf(t)}var $f,Hf=function(){function t(t,e){var n=this;if(this.exec=t,this.parameters=e,this.defaultEncoding="base64",this.getFileIgnoreFilter=function(t){if(void 0!==t){var e=Wf({allowRelativePaths:!0}).add(t);return function(t){return!e.ignores(t)}}},this.getTarTransformFn=function(t,e){return function(n){n.path=n.path.replace(t,e)}},this.ensureDirRemote=function(t){return H(n,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){switch(i.label){case 0:return e=["mkdir","-p",t],[4,this.runCommand(e)];case 1:if(n=i.sent(),"Success"!==(null===(r=null==n?void 0:n.commandResult)||void 0===r?void 0:r.status))throw new Error("Failed creating remote directory.");return[2]}}))}))},this.ensureTarCmd=function(){return H(n,void 0,void 0,(function(){var t,e,n;return V(this,(function(r){switch(r.label){case 0:return t=["tar","--version"],[4,this.runCommand(t)];case 1:if(e=r.sent(),"Success"!==(null===(n=null==e?void 0:e.commandResult)||void 0===n?void 0:n.status))throw new Error("Tar command not found on remote container. Required for file copy.");return[2]}}))}))},this.pathExistsRemote=function(t){return H(n,void 0,void 0,(function(){var e;return V(this,(function(n){switch(n.label){case 0:return e=["test","-e",t],[4,this.runCommand(e)];case 1:return[2,0===n.sent().commandResult.exitCode]}}))}))},this.checkIsDirRemote=function(t){return H(n,void 0,void 0,(function(){var e;return V(this,(function(n){switch(n.label){case 0:return e=["test","-d",t],[4,this.runCommand(e)];case 1:return[2,0===n.sent().commandResult.exitCode]}}))}))},this.runCommand=function(t){return H(n,void 0,void 0,(function(){var e,n,r,i,o,s,a,c,u;return V(this,(function(d){switch(d.label){case 0:return n=(e=this).exec,r=e.parameters,i=r.projectId,o=r.resourceId,s=r.resourceType,a=r.containerName,c={command:t,shell:"none",containerName:a},"service"!==s?[3,2]:[4,n.execServiceCommand({projectId:i,serviceId:o},c)];case 1:return u=d.sent(),[3,4];case 2:return[4,n.execJobCommand({projectId:i,jobId:o},c)];case 3:u=d.sent(),d.label=4;case 4:return[2,u]}}))}))},this.runSession=function(t){return H(n,void 0,void 0,(function(){var e,n,r,i,o,s,a,c,u;return V(this,(function(d){switch(d.label){case 0:return n=(e=this).exec,r=e.parameters,i=r.projectId,o=r.resourceId,s=r.resourceType,a=r.containerName,c={command:t,shell:"none",tty:!1,encoding:this.defaultEncoding,containerName:a},"service"!==s?[3,2]:[4,n.execServiceSession({projectId:i,serviceId:o},c)];case 1:return u=d.sent(),[3,4];case 2:return[4,n.execJobSession({projectId:i,jobId:o},c)];case 3:u=d.sent(),d.label=4;case 4:return[2,u]}}))}))},!["service","job"].includes(e.resourceType))throw new Error("Invalid resource type: ".concat(e.resourceType,", only 'service' and 'job' supported"))}return t.prototype.uploadFiles=function(t,e,n){return H(this,void 0,void 0,(function(){var r,i,o,s,a,c,u,d,l,h,p,f;return V(this,(function(m){switch(m.label){case 0:if(void 0===t||!g.existsSync(t))throw new Error("Local path '".concat(t,"' does not exists but is required for uploads."));return r=g.lstatSync(t).isFile(),i=r?R.dirname(t):t,o=r?R.basename(t):".",s=r&&void 0!==e&&""!==R.extname(e),a=s?R.dirname(e):null!=e?e:i,c=void 0!==e?R.basename(e):o,u=Xh({gzip:{encoding:this.defaultEncoding},cwd:i,filter:this.getFileIgnoreFilter(n),preservePaths:!0,onWriteEntry:s?this.getTarTransformFn(o,c):void 0},Ai(o)),[4,this.ensureTarCmd()];case 1:return m.sent(),[4,this.ensureDirRemote(a)];case 2:return m.sent(),d=Z(Z(["tar","-xzvf","-"],["--no-same-owner"],!0),["-C",a],!1),[4,this.runSession(d)];case 3:return l=m.sent(),h=new Oi,p=new Oi,l.stdErr.pipe(h),l.stdOut.pipe(p),u.pipe(l.stdIn),[4,l.waitForCommandResult()];case 4:if("Success"!==(null==(f=m.sent())?void 0:f.status))throw new Error("Failed to upload file to container: ".concat(null==f?void 0:f.message,", error details: ").concat(h.getContentsAsString(),"; ").concat(p.getContentsAsString()));return r?[2,{type:$f.FILE_UPLOAD,sourceDirectory:i,sourceFile:o,targetDirectory:a,targetFile:c}]:[2,{type:$f.DIRECTORY_UPLOAD,sourceDirectory:i,targetDirectory:a}]}}))}))},t.prototype.downloadFiles=function(t,e,n){return H(this,void 0,void 0,(function(){var r,i,o,s,a,c,u,d,l,h,p,f,m,v;return V(this,(function(b){switch(b.label){case 0:return(r=void 0===t)?[3,2]:[4,this.pathExistsRemote(t)];case 1:r=!b.sent(),b.label=2;case 2:if(r)throw new Error("Remote path '".concat(t,"' does not exists but is required for downloads."));return[4,this.checkIsDirRemote(t)];case 3:return i=b.sent(),o=i?t:R.dirname(t),s=i?".":R.basename(t),a=void 0!==e&&""!==R.extname(e),c=!i&&a?R.basename(e):s,(u=void 0!==e?a?R.dirname(e):e:".")&&g.mkdirSync(u,{recursive:!0}),d=Ai(null!=n?n:[]).map((function(t){return"--exclude=".concat(t)})),l=Z(Z(["tar","-zcf","-"],["--no-same-owner"],!0),d,!0),h=Z(Z([],l,!0),["-C",o,s],!1),[4,this.runSession(h)];case 4:return p=b.sent(),f=gf({cwd:u,gzip:{encoding:this.defaultEncoding},onReadEntry:c?this.getTarTransformFn(s,c):void 0}),m=new Oi,p.stdErr.pipe(m),p.stdOut.pipe(f),[4,p.waitForCommandResult()];case 5:if("Success"!==(null==(v=b.sent())?void 0:v.status))throw new Error("Failed to download file from container: ".concat(null==v?void 0:v.message,", error details: ").concat(m.getContentsAsString()));return i?[2,{type:$f.DIRECTORY_DOWNLOAD,sourceDirectory:o,targetDirectory:u}]:[2,{type:$f.FILE_DOWNLOAD,sourceDirectory:o,sourceFile:s,targetDirectory:u,targetFile:c}]}}))}))},t}();!function(t){t.DIRECTORY_UPLOAD="directory-upload",t.FILE_UPLOAD="file-upload",t.DIRECTORY_DOWNLOAD="directory-download",t.FILE_DOWNLOAD="file-download"}($f||($f={}));var Vf,Zf=function(){function t(t,e){this.exec=t,this.stdIgnoreList=["*.*~"],e&&(this.stdIgnoreList=e)}return t.prototype.downloadServiceFiles=function(t,e){return H(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:return n=t.serviceId,r=t.projectId,i={projectId:r,resourceId:n,resourceType:"service"},[4,this.copy(i,e,"download")];case 1:return[2,o.sent()]}}))}))},t.prototype.uploadServiceFiles=function(t,e){return H(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:return n=t.serviceId,r=t.projectId,i={projectId:r,resourceId:n,resourceType:"service"},[4,this.copy(i,e,"upload")];case 1:return[2,o.sent()]}}))}))},t.prototype.downloadJobFiles=function(t,e){return H(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:return n=t.jobId,r=t.projectId,i={projectId:r,resourceId:n,resourceType:"job"},[4,this.copy(i,e,"download")];case 1:return[2,o.sent()]}}))}))},t.prototype.uploadJobFiles=function(t,e){return H(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:return n=t.jobId,r=t.projectId,i={projectId:r,resourceId:n,resourceType:"job"},[4,this.copy(i,e,"upload")];case 1:return[2,o.sent()]}}))}))},t.prototype.copy=function(t,e,n){var r;return H(this,void 0,void 0,(function(){var i,o;return V(this,(function(s){switch(s.label){case 0:switch(i=new Hf(this.exec,$($({},t),{containerName:e.containerName})),o=Z(Z([],null!==(r=e.ignoreList)&&void 0!==r?r:[],!0),this.stdIgnoreList,!0),n){case"download":return[3,1];case"upload":return[3,3]}return[3,5];case 1:return[4,i.downloadFiles(e.remotePath,e.localPath,o)];case 2:case 4:return[2,s.sent()];case 3:return[4,i.uploadFiles(e.localPath,e.remotePath,o)];case 5:return[2]}}))}))},t}(),Yf=function(t){function e(e){var n=this.constructor,r=t.call(this,e.message)||this;r.name="NorthflankApiCallError",r.message=e.message,r.status=e.status,r.id=e.id,r.details=e.details;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=i,r}return W(e,t),e}(Error),Kf=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.baseUrl=e,o.logsConfig=n,o.token=r,o.agent=i,o.stop=function(){return H(o,void 0,void 0,(function(){var t;return V(this,(function(e){if(void 0===this.logSession)throw new Error("No command is running");return null===(t=this.remote)||void 0===t||t.close(),[2]}))}))},o}return W(e,t),e.getLogsEndpoint=function(t){var e=t.containerName,n=t.types,r=t.entityId,i=t.entityType,o=t.buildId,s=t.runId,a=t.backupId,c=t.restoreId,u=t.deploymentId,d=t.isBuild,l=t.lineLimit,h=t.projectId,p=t.queryType,f=t.startTime,m=t.endTime,v=t.duration,b=t.direction,g=t.textIncludes,y=t.textNotIncludes,w=t.regexIncludes,I=t.regexNotIncludes,E="/v1/projects/".concat(h,"/"),R=new URLSearchParams;return R.append("queryType",p),void 0!==f&&R.append("startTime",f.toISOString()),void 0!==m&&R.append("endTime",m.toISOString()),void 0!==l&&R.append("lineLimit",l.toString()),void 0!==e&&R.append("containerName",e),void 0!==u&&R.append("deploymentId",u),void 0!==s&&R.append("runId",s),void 0!==o&&R.append("buildId",o),void 0!==g&&R.append("textIncludes",g),void 0!==y&&R.append("textNotIncludes",y),void 0!==w&&R.append("regexIncludes",w),void 0!==I&&R.append("regexNotIncludes",I),void 0!==b&&R.append("direction",b),void 0!==v&&R.append("duration",v.toString()),void 0!==n&&n.forEach((function(t){return R.append("type",t)})),"".concat(E).concat(function(){var t=d?"/build-logs":"/logs";switch(i){case"service":return"services/".concat(r).concat(t);case"job":return"jobs/".concat(r).concat(t);case"addon":return"addons/".concat(r).concat(t);case"addonBackup":return"addons/".concat(r,"/backups/").concat(a).concat(t);case"addonRestore":return"addons/".concat(r,"/backups/").concat(a,"/restores/").concat(c).concat(t);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(i))}}(),"?").concat(R.toString())},Object.defineProperty(e.prototype,"logsEndpoint",{get:function(){return"".concat(this.baseUrl).concat(e.getLogsEndpoint(this.logsConfig))},enumerable:!1,configurable:!0}),e.prototype.start=function(){return H(this,void 0,void 0,(function(){var t=this;return V(this,(function(e){switch(e.label){case 0:if(void 0!==this.logSession)throw new Error("Command is already running");return this.logSession=new Promise((function(e,n){var r,i,o,s;void 0!==t.remote&&n(Error("Command is already running"));var a=t.logsEndpoint.replace("https:","wss:").replace("http:","ws:");t.remote=new Ca(a,{agent:t.agent}),null===(r=t.remote)||void 0===r||r.on("message",(function(e){var n,r,i=JSON.parse(e.toString());switch(null==i?void 0:i.type){case"init":var o=i.data;"successful"!==o.auth&&c("Log tail initialization failed: ".concat(null!==(n=null==o?void 0:o.message)&&void 0!==n?n:"Reason unknown"));break;case"log-lines":var s=i.data;t.emit("logs-received",s.map(dm));break;case"error":c(null===(r=i.data)||void 0===r?void 0:r.message);break;default:var a="unable to parse message: ".concat(JSON.stringify(i));c(a)}})),null===(i=t.remote)||void 0===i||i.on("close",(function(){t.emit("close"),t.reset(),e()})),null===(o=t.remote)||void 0===o||o.on("open",(function(){t.emit("open")})),null===(s=t.remote)||void 0===s||s.on("error",(function(n){t.emit("error",n),t.reset(),e()}));var c=function(e){t.emit("error",{message:e}),t.reset(),n(new Error(e))}})),[4,new Promise((function(e){var n;t.remote.on("open",(function(){return e()})),null===(n=t.remote)||void 0===n||n.on("error",(function(){e()}))}))];case 1:return e.sent(),this.initialAuth(),[2,this.logSession]}}))}))},e.prototype.initialAuth=function(){var t,e={type:"init",data:{auth:{type:"apiToken",apiToken:this.token}}};null===(t=this.remote)||void 0===t||t.send(JSON.stringify(e))},e.prototype.reset=function(){this.remote=void 0,this.logSession=void 0},e}(e),Xf=function(){if(Ci)try{return JSON.parse(g.readFileSync(R.join(R.dirname(u(import.meta.url)),"../../package.json")).toString())}catch(t){return{}}return{}},Qf=function(){function t(t,e){var n=this;this.opts=e,this.call=function(t){return H(n,void 0,void 0,(function(){return V(this,(function(e){return[2,this.executeCall(t)]}))}))},this.contextProvider=t}return t.prototype.getDefaultHeaders=function(){var t,e,n=this.contextProvider.getCurrentToken(),r=(null===(t=this.opts)||void 0===t?void 0:t.customUserAgent)?" (".concat(this.opts.customUserAgent,")"):"";return{Authorization:this.withAuth?"Bearer ".concat(n):void 0,"Content-Type":"application/json","User-Agent":"northflank-js-client/".concat(null===(e=Xf())||void 0===e?void 0:e.version).concat(r)}},t.prototype.executeCall=function(t){var e;return H(this,void 0,void 0,(function(){var n,r,i,o,s,a,c,u,d,l,h,p,f=this;return V(this,(function(m){switch(m.label){case 0:if(n=this.method,r=this.opts.agent,i={method:n,headers:this.getDefaultHeaders(),agent:r},!(o=null===(e=this.contextProvider)||void 0===e?void 0:e.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return s="".concat(o).concat(this.endpointUrl(t)),a=this.body(t),c=$($({url:s},i),{body:a}),[4,am(s,$($({},i),{body:a}))];case 1:return[4,(u=m.sent()).text()];case 2:return d=m.sent(),l=function(){if(200!==u.status){var t=null==h?void 0:h.error,e=(null==t?void 0:t.message)||"",n={status:u.status,message:e,id:null==t?void 0:t.id,details:null==t?void 0:t.details};if(f.opts.throwErrorOnHttpErrorCode)throw new Yf(n);return n}},h=function(){try{return JSON.parse(d)}catch(t){throw Error("Failed reading api request result: \n\tStatus: ".concat(u.statusText," (").concat(u.status,")\n\tMessage: ").concat(d))}}(),p=l(),[2,{data:null==h?void 0:h.data,rawResponse:u,request:c,error:p,pagination:null==h?void 0:h.pagination}]}}))}))},t}(),tm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="get",e.body=function(){},e}return W(e,t),e}(Qf),em=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.all=function(t){return H(e,void 0,void 0,(function(){return V(this,(function(e){return[2,new sm(this,t).getAll()]}))}))},e.call=function(n){return H(e,void 0,void 0,(function(){var e,r=this;return V(this,(function(i){switch(i.label){case 0:return[4,t.prototype.executeCall.call(this,n)];case 1:return e=i.sent(),[2,$($({},e),{pagination:$($({},e.pagination),{getNextPage:function(){return H(r,void 0,void 0,(function(){var t,r,i,o,s,a,c,u=this;return V(this,(function(d){return void 0===(null===(a=e.pagination)||void 0===a?void 0:a.cursor)?(t=Object.keys(e.data),r=1===t.length?((s={})[t[0]]=[],s):{},i=$($({},e),{pagination:$($({},e.pagination),{count:0}),data:r}),[2,(o=function(t){return $($({},t),{pagination:$($({},t.pagination),{getNextPage:function(){return H(u,void 0,void 0,(function(){return V(this,(function(e){return[2,o(t)]}))}))}})})})(i)]):[2,new sm(this,n,null===(c=e.pagination)||void 0===c?void 0:c.cursor).getNext()]}))}))}})})]}}))}))},e}return W(e,t),e}(tm),nm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="post",e}return W(e,t),e}(Qf),rm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="delete",e.body=function(){},e}return W(e,t),e}(Qf),im=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="put",e}return W(e,t),e}(Qf),om=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="patch",e}return W(e,t),e}(Qf),sm=function(){function t(t,e,n){void 0===n&&(n=null);var r=this;this.endpoint=t,this.opts=e,this._currentOffset=0,this.hasNext=function(){return void 0!==r.cursor},this.cursor=n}return Object.defineProperty(t.prototype,"currentOffset",{get:function(){return this._currentOffset},enumerable:!1,configurable:!0}),t.prototype.getNext=function(){var t,e,n;return H(this,void 0,void 0,(function(){var r,i,o,s,a,c;return V(this,(function(u){switch(u.label){case 0:return[4,this.endpoint.call($($({},this.opts),{options:$($({},null===(t=this.opts)||void 0===t?void 0:t.options),{cursor:null!==(e=this.cursor)&&void 0!==e?e:void 0})}))];case 1:return r=u.sent(),i=r.data,o=r.request,s=r.error,a=r.pagination,c=r.rawResponse,this.cursor=null==a?void 0:a.cursor,this._currentOffset+=null!==(n=null==a?void 0:a.count)&&void 0!==n?n:0,[2,{data:i,request:o,error:s,pagination:a,rawResponse:c}]}}))}))},t.prototype.getAll=function(){var t,e;return H(this,void 0,void 0,(function(){var n,r,i,o,s;return V(this,(function(a){switch(a.label){case 0:n=[],a.label=1;case 1:return this.hasNext()?[4,this.getNext()]:[3,3];case 2:return(r=a.sent()).error?[2,r]:(n.push(r),[3,1]);case 3:return o=n.flatMap((function(t){var e=Object.keys(t.data);return 1===e.length?(i=e[0],t.data[e[0]]):t.data})),[2,{data:void 0===i?o:(s={},s[i]=o,s),request:null===(t=n[0])||void 0===t?void 0:t.request,rawResponse:null===(e=n[0])||void 0===e?void 0:e.rawResponse}]}}))}))},t}(),am=function(t,e,n,r){return void 0===e&&(e={}),void 0===n&&(n=3),void 0===r&&(r=500),new Promise((function(i,o){var s=function(n){return Ui(t,e).then((function(t){i(t)})).catch((function(t){return H(void 0,void 0,void 0,(function(){return V(this,(function(e){switch(e.label){case 0:return n>0?[4,(i=r,new Promise((function(t){setTimeout((function(){t()}),i)})))]:[3,2];case 1:return e.sent(),[2,s(n-1)];case 2:return[2,o(t)]}var i}))}))}))};return s(n)}))},cm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetch log lines over a specific time span",e.withAuth=!0,e.requiredPermissions="Account > Service | Job | Addon > General > Read",e.endpointUrl=function(t){return Kf.getLogsEndpoint(t)},e.body=function(){},e}return W(e,t),e}(tm);!function(t){t.CDN="cdn",t.Mesh="mesh",t.Ingress="ingress",t.Runtime="runtime"}(Vf||(Vf={}));var um,dm=function(t){return{containerId:t.containerId,log:t.log,ts:new Date(t.ts)}},lm=function(t,e){void 0===e&&(e={});var n=this;this.contextProvider=t,this.clientOpts=e,this.getServiceLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r,i,o;return V(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,i=e.serviceId,o={entityId:i,projectId:r},[2,this.logRange(o,$($({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r,i,o;return V(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,i=e.jobId,o={entityId:i,projectId:r},[2,this.logRange(o,$($({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"addon")]}))}))},this.getAddonBackupLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logRange(r,$($({},n),{backupId:e.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r,i;return V(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},i={backupId:e.backupId,restoreId:e.restoreId},[2,this.logRange(r,$($({},n),i),"addonRestore")]}))}))},this.logRange=function(t,e,r){return H(n,void 0,void 0,(function(){var n,i,o,s,a;return V(this,(function(c){switch(c.label){case 0:return n=t.entityId,i=t.projectId,o=$($({projectId:i,entityId:n,entityType:r},e),{queryType:"range"}),[4,new cm(this.contextProvider,this.clientOpts).call(o)];case 1:return(s=c.sent()).error?[2,s]:[2,$($({},s),{data:null===(a=null==s?void 0:s.data)||void 0===a?void 0:a.map(dm)})]}}))}))},this.tailServiceLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"service")]}))}))},this.tailServiceBuildLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r,i,o;return V(this,(function(s){return e=t.parameters,n=t.options,r=e.serviceId,i=e.projectId,o={entityId:r,projectId:i},[2,this.logTail(o,$($({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"job")]}))}))},this.tailJobBuildLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r,i,o;return V(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,i=e.jobId,o={entityId:i,projectId:r},[2,this.logTail(o,$($({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"addon")]}))}))},this.tailAddonBackupLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logTail(r,$($({},n),{backupId:e.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(t){return H(n,void 0,void 0,(function(){var e,n,r,i;return V(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},i={backupId:e.backupId,restoreId:e.restoreId},[2,this.logTail(r,$($({},n),i),"addonRestore")]}))}))},this.logTail=function(t,e,r){return H(n,void 0,void 0,(function(){var n,i,o,s,a;return V(this,(function(c){if(n=t.entityId,i=t.projectId,o=$({queryType:"tail",projectId:i,entityId:n,entityType:r},e),this.assertStartedWithNodejs(),s=this.contextProvider.getCurrentBaseUrl(!0),!(a=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new Kf(s,o,a,this.clientOpts.agent)]}))}))},this.assertStartedWithNodejs=function(){if(!Ci)throw new Error("Command exec only possible when started with nodejs")}},hm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetch metrics entries over a specific time span",e.withAuth=!0,e.requiredPermissions="Account > Service | Job | Addon > General > Read",e.endpointUrl=function(t){var e=t.projectId,n=t.entityId,r=t.entityType,i=t.deploymentId,o=t.runId,s=t.buildId,a=t.isBuild,c=t.queryType,u=t.metricTypes,d=t.startTime,l=t.endTime,h=t.duration,p=t.containerName,f=t.timestamp,m="/v1/projects/".concat(e,"/");var v=new URLSearchParams;return v.append("queryType",c),void 0!==d&&v.append("startTime",d.toISOString()),void 0!==l&&v.append("endTime",l.toISOString()),void 0!==p&&v.append("containerName",p),void 0!==i&&v.append("deploymentId",i),void 0!==o&&v.append("runId",o),void 0!==s&&v.append("buildId",s),void 0!==f&&v.append("timestamp",f.toISOString()),void 0!==h&&v.append("duration",h.toString()),void 0!==u&&u.forEach((function(t){return v.append("metricTypes",t)})),"".concat(m).concat(function(){var t=a?"/build-metrics":"/metrics";switch(r){case"service":return"services/".concat(n).concat(t);case"job":return"jobs/".concat(n).concat(t);case"addon":return"addons/".concat(n).concat(t);default:throw new Error("Unexpected Northflank entity type received in metrics endpoint generation: ".concat(r))}}(),"?").concat(v.toString())},e.body=function(){},e}return W(e,t),e}(tm),pm=function(t){return{metadata:t.metadata,data:t.data.map((function(t){return{value:t.value,ts:new Date(t.ts)}}))}};!function(t){t.Cpu="cpu",t.Memory="memory",t.NetworkIngress="networkIngress",t.NetworkEgress="networkEgress",t.TcpConnectionOpen="tcpConnectionsOpen",t.PvcUsage="diskUsage",t.Requests="requests",t.Http4xxResponses="http4xxResponses",t.Http5xxResponses="http5xxResponses",t.Bandwidth="bandwidth",t.BandwidthVolume="bandwidthVolume"}(um||(um={}));var fm=function(t){var e=this;this.contextProvider=t,this.getServiceMetrics=function(t){return H(e,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetrics=function(t){return H(e,void 0,void 0,(function(){var e,n,r,i,o;return V(this,(function(s){return e=t.parameters,n=t.options,r=e.serviceId,i=e.projectId,o={entityId:r,projectId:i},[2,this.metricsSingle(o,$($({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(t){return H(e,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetrics=function(t){return H(e,void 0,void 0,(function(){var e,n,r,i,o;return V(this,(function(s){return e=t.parameters,n=t.options,r=e.jobId,i=e.projectId,o={entityId:r,projectId:i},[2,this.metricsSingle(o,$($({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(t){return H(e,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"addon")]}))}))},this.metricsSingle=function(t,n,r){return H(e,void 0,void 0,(function(){var e,i,o;return V(this,(function(s){return e=t.entityId,i=t.projectId,o=$($({projectId:i,entityId:e,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(o)]}))}))},this.getServiceMetricsRange=function(t){return H(e,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetricsRange=function(t){return H(e,void 0,void 0,(function(){var e,n,r,i,o;return V(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,i=e.serviceId,o={entityId:i,projectId:r},[2,this.metricsRange(o,$($({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(t){return H(e,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetricsRange=function(t){return H(e,void 0,void 0,(function(){var e,n,r,i,o;return V(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,i=e.jobId,o={entityId:i,projectId:r},[2,this.metricsRange(o,$($({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(t){return H(e,void 0,void 0,(function(){var e,n,r;return V(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"addon")]}))}))},this.metricsRange=function(t,n,r){return H(e,void 0,void 0,(function(){var e,i,o;return V(this,(function(s){return e=t.entityId,i=t.projectId,o=$($({projectId:i,entityId:e,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(o)]}))}))},this.getMetrics=function(t){return H(e,void 0,void 0,(function(){var e;return V(this,(function(n){switch(n.label){case 0:return[4,new hm(this.contextProvider,{}).call(t)];case 1:return(e=n.sent()).error?[2,e]:[2,$($({},e),{data:Object.fromEntries(Object.entries(e.data).map((function(t){var e=t[0],n=t[1];return[e,$($({},n),{values:n.values.map(pm)})]})))})]}}))}))}},mm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the available addon types",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/addon-types"},e.body=function(){},e}return W(e,t),e}(tm),vm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the backup destinations saved to this account. Does not display secrets.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/backup-destinations".concat(r)},e.body=function(){},e}return W(e,t),e}(em),bm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new backup destination to this account.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Create",e.endpointUrl=function(t){return"/v1/backup-destinations"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),gm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a backup destination, including secrets.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Read",e.endpointUrl=function(t){return["backupDestinationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId))},e.body=function(){},e}return W(e,t),e}(tm),ym=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a backup destination.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Update",e.endpointUrl=function(t){return["backupDestinationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),wm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a backup destination.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Delete",e.endpointUrl=function(t){return["backupDestinationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId))},e.body=function(){},e}return W(e,t),e}(rm),Im=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the backups associated with a backup destinations.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Read",e.endpointUrl=function(t){var e;["backupDestinationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId),"/backups").concat(r)},e.body=function(){},e}return W(e,t),e}(em),Em=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of past invoices",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/billing/invoices".concat(r)},e.body=function(){},e}return W(e,t),e}(em),Rm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about an invoice. If `timestamp` is passed in as a query parameter, this endpoint returns details about the invoice containing that timestamp. Otherwise, returns a preview invoice displaying billing data from after the most recent invoice.",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/billing/invoices/details".concat(r)},e.body=function(){},e}return W(e,t),e}(tm),jm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud providers",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/cloud-providers"},e.body=function(){},e}return W(e,t),e}(tm),_m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists clusters for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/clusters".concat(r)},e.body=function(){},e}return W(e,t),e}(em),Sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Cm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or update a cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(im),Um=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given cluster",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){return["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId))},e.body=function(){},e}return W(e,t),e}(tm),Am=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),Pm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given cluster. Fails if the cluster has associated projects.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Delete",e.endpointUrl=function(t){return["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId))},e.body=function(){},e}return W(e,t),e}(rm),Om=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of nodes for the given cluster",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){var e;["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes").concat(r)},e.body=function(){},e}return W(e,t),e}(em),km=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Cordon a node on the cluster to prevent new pods from scheduling on it.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId","nodeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes/").concat(encodeURIComponent(t.parameters.nodeId),"/cordon")},e.body=function(){},e}return W(e,t),e}(nm),xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Drain a node by evicting all running pods.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId","nodeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes/").concat(encodeURIComponent(t.parameters.nodeId),"/drain")},e.body=function(){},e}return W(e,t),e}(nm),Tm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Uncordon a node on the cluster if it was previously cordoned.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId","nodeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes/").concat(encodeURIComponent(t.parameters.nodeId),"/uncordon")},e.body=function(){},e}return W(e,t),e}(nm),Dm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists docker registries for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/docker-registries".concat(r)},e.body=function(){},e}return W(e,t),e}(em),Lm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new docker registry.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/docker-registries"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Nm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a docker registry.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Create",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(im),qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given docker registry",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Read",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(t.parameters.registryId))},e.body=function(){},e}return W(e,t),e}(tm),Bm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a docker registry.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Update",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(t.parameters.registryId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),Fm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given docker registry. Fails if the docker registry is associated with existing clusters.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Delete",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(t.parameters.registryId))},e.body=function(){},e}return W(e,t),e}(rm),Mm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists integrations for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/integrations".concat(r)},e.body=function(){},e}return W(e,t),e}(em),Gm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),zm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Create",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(im),Jm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given integration",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(t.parameters.integrationId))},e.body=function(){},e}return W(e,t),e}(tm),Wm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Update",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(t.parameters.integrationId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),$m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given integration. Fails if the integration is associated with existing clusters.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Delete",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(t.parameters.integrationId))},e.body=function(){},e}return W(e,t),e}(rm),Hm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud provider node types",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/node-types".concat(r)},e.body=function(){},e}return W(e,t),e}(em),Vm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud provider regions",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/regions".concat(r)},e.body=function(){},e}return W(e,t),e}(em),Zm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the partially random string used when generating host names for the authenticated account.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return"/v1/dns-id"},e.body=function(){},e}return W(e,t),e}(tm),Ym=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available domains",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/domains".concat(r)},e.body=function(){},e}return W(e,t),e}(em),Km=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Registers a new domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return"/v1/domains"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain))},e.body=function(){},e}return W(e,t),e}(tm),Qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a domain and each of its registered subdomains.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Delete",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain))},e.body=function(){},e}return W(e,t),e}(rm),tv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Retrieve certificate data for a domain to verify its contents.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/certificate")},e.body=function(){},e}return W(e,t),e}(tm),ev=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Import a certificate for the domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),nv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new subdomain to the domain.",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),rv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Read",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain))},e.body=function(){},e}return W(e,t),e}(tm),iv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from a domain.",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain))},e.body=function(){},e}return W(e,t),e}(rm),ov=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Assigns a service port to the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/assign")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from its assigned service",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){var e;["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/assign").concat(r)},e.body=function(){},e}return W(e,t),e}(rm),av=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes the CDN integration from the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/cdn/disable")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),cv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Enables a CDN integration on the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/cdn/enable")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new path to the subdomain.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Create",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),dv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="List paths for a given subdomain.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Read",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths")},e.body=function(){},e}return W(e,t),e}(tm),lv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get subdomain path details.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Read",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath))},e.body=function(){},e}return W(e,t),e}(tm),hv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a path.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath))},e.body=function(){},e}return W(e,t),e}(rm),pv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a subdomain path.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),fv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Assign a subdomain path to a port.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath),"/assign")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),mv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Unassign a subdomain path to a port.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath),"/assign")},e.body=function(){},e}return W(e,t),e}(rm),vv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/verify")},e.body=function(){},e}return W(e,t),e}(nm),bv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attempts to verify the domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/verify")},e.body=function(){},e}return W(e,t),e}(nm),gv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of log sinks added to this account.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/log-sinks".concat(r)},e.body=function(){},e}return W(e,t),e}(em),yv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Create",e.endpointUrl=function(t){return"/v1/integrations/log-sinks"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),wv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Read",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId))},e.body=function(){},e}return W(e,t),e}(tm),Iv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Delete",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId))},e.body=function(){},e}return W(e,t),e}(rm),Ev=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pauses a given log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId),"/pause")},e.body=function(){},e}return W(e,t),e}(nm),Rv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes a paused log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId),"/resume")},e.body=function(){},e}return W(e,t),e}(nm),jv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the settings for a log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId),"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),_v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists notification integrations for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/notifications".concat(r)},e.body=function(){},e}return W(e,t),e}(em),Sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a new notification integration.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Cv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a notification integration.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Read",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(t.parameters.notificationId))},e.body=function(){},e}return W(e,t),e}(tm),Uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a notification integration",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(t.parameters.notificationId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Av=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a notification integration",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(t.parameters.notificationId))},e.body=function(){},e}return W(e,t),e}(rm),Pv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the container registry credentials saved to this account. Does not display secrets.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/registries".concat(r)},e.body=function(){},e}return W(e,t),e}(em),Ov=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new set of container registry credentials to this account.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Create",e.endpointUrl=function(t){return"/v1/integrations/registries"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),kv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Views a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read Encrypted",e.endpointUrl=function(t){return["credentialId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(t.parameters.credentialId))},e.body=function(){},e}return W(e,t),e}(tm),xv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Delete",e.endpointUrl=function(t){return["credentialId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(t.parameters.credentialId))},e.body=function(){},e}return W(e,t),e}(rm),Tv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Update",e.endpointUrl=function(t){return["credentialId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(t.parameters.credentialId),"/modify")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Dv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists linked version control providers",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){return"/v1/integrations/vcs"},e.body=function(){},e}return W(e,t),e}(tm),Lv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Generate a token for a specific VCS link.",e.withAuth=!0,e.requiredPermissions="Account > Git > Tokens > Read",e.endpointUrl=function(t){var e;["customVCSId","vcsLinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/custom/".concat(encodeURIComponent(t.parameters.customVCSId),"/token/").concat(encodeURIComponent(t.parameters.vcsLinkId)).concat(r)},e.body=function(){},e}return W(e,t),e}(nm),Nv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of repositories accessible to this account",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/repos".concat(r)},e.body=function(){},e}return W(e,t),e}(em),qv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of branches for the repo",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e;["vcsService","repositoryOwner","repositoryName"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/repos/".concat(encodeURIComponent(t.parameters.vcsService),"/").concat(encodeURIComponent(t.parameters.repositoryOwner),"/").concat(encodeURIComponent(t.parameters.repositoryName),"/branches").concat(r)},e.body=function(){},e}return W(e,t),e}(em),Bv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available billing plans",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/plans"},e.body=function(){},e}return W(e,t),e}(tm),Fv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists projects for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects".concat(r)},e.body=function(){},e}return W(e,t),e}(em),Mv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Create",e.endpointUrl=function(t){return"/v1/projects"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Gv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Create",e.endpointUrl=function(t){return"/v1/projects"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(im),zv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Update",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),Jv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given project",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId))},e.body=function(){},e}return W(e,t),e}(tm),Wv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given project. Fails if the project isn't empty.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Delete",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId)).concat(r)},e.body=function(){},e}return W(e,t),e}(rm),$v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of addons belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons").concat(r)},e.body=function(){},e}return W(e,t),e}(em),Hv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Vv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates an addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(im),Zv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return W(e,t),e}(tm),Yv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates an addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),Kv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Delete",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return W(e,t),e}(rm),Xv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about an addon's backup schedules",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backup-schedules").concat(r)},e.body=function(){},e}return W(e,t),e}(em),Qv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a new backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backup-schedules")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),tb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","scheduleId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backup-schedules/").concat(encodeURIComponent(t.parameters.scheduleId))},e.body=function(){},e}return W(e,t),e}(rm),eb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns a list of backups for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups").concat(r)},e.body=function(){},e}return W(e,t),e}(em),nb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Initiates a backup for the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),rb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId))},e.body=function(){},e}return W(e,t),e}(tm),ib=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a given backup",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId))},e.body=function(){},e}return W(e,t),e}(rm),ob=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the in progress backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/abort")},e.body=function(){},e}return W(e,t),e}(nm),sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts an in-progress backup restore.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/abort-restore").concat(r)},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),ab=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Generates a temporary download link for downloading the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/download-link")},e.body=function(){},e}return W(e,t),e}(tm),cb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restores the given addon to the given backup state.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/restore").concat(r)},e.body=function(){},e}return W(e,t),e}(nm),ub=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of restores for the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/restores").concat(r)},e.body=function(){},e}return W(e,t),e}(em),db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/retain")},e.body=function(){},e}return W(e,t),e}(nm),lb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > Deployment > View Instances",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/containers").concat(r)},e.body=function(){},e}return W(e,t),e}(em),hb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the credentials for connecting to the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/credentials")},e.body=function(){},e}return W(e,t),e}(tm),pb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Imports a database from an external archive or existing live database.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),fb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the network settings for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/network-settings")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),mb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/pause")},e.body=function(){},e}return W(e,t),e}(nm),vb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Reset the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Delete",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/reset")},e.body=function(){},e}return W(e,t),e}(nm),bb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restart the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/restart")},e.body=function(){},e}return W(e,t),e}(nm),gb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns a list of restores for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/restores").concat(r)},e.body=function(){},e}return W(e,t),e}(em),yb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resume the given addon if it is paused.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/resume")},e.body=function(){},e}return W(e,t),e}(nm),wb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the allocated resources for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Ib=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the security rules for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/security")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Eb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the current addon version including available upgrades and upgrade history.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/version")},e.body=function(){},e}return W(e,t),e}(tm),Rb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Upgrades the addon to a new version.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/version")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),jb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of jobs belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs").concat(r)},e.body=function(){},e}return W(e,t),e}(em),_b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(im),Cb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/cron/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),Ub=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Ab=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(im),Pb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/manual/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),Ob=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(){},e}return W(e,t),e}(tm),kb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Delete",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(){},e}return W(e,t),e}(rm),xb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/branches").concat(r)},e.body=function(){},e}return W(e,t),e}(em),Tb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists builds for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build").concat(r)},e.body=function(){},e}return W(e,t),e}(em),Db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given job. Given a commit sha, it will build that commit.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Lb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the build arguments of the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-arguments").concat(r)},e.body=function(){},e}return W(e,t),e}(tm),Nb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets build arguments for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),qb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-arguments/details")},e.body=function(){},e}return W(e,t),e}(tm),Bb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Fb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Mb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return W(e,t),e}(tm),Gb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job build",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return W(e,t),e}(rm),zb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/containers").concat(r)},e.body=function(){},e}return W(e,t),e}(em),Jb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/deployment")},e.body=function(){},e}return W(e,t),e}(tm),Wb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),$b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/health-checks")},e.body=function(){},e}return W(e,t),e}(tm),Hb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Vb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/pause")},e.body=function(){},e}return W(e,t),e}(nm),Zb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/pull-requests").concat(r)},e.body=function(){},e}return W(e,t),e}(em),Yb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Kb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetches run history for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs").concat(r)},e.body=function(){},e}return W(e,t),e}(em),Xb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Starts a new job run for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Qb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns data about the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs/").concat(encodeURIComponent(t.parameters.runId))},e.body=function(){},e}return W(e,t),e}(tm),tg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs/").concat(encodeURIComponent(t.parameters.runId))},e.body=function(){},e}return W(e,t),e}(rm),eg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runtime-environment").concat(r)},e.body=function(){},e}return W(e,t),e}(tm),ng=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),rg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runtime-environment/details")},e.body=function(){},e}return W(e,t),e}(tm),ig=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Scale Job",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),og=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates settings for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modify cron job to toggle suspending of its schedule.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/suspend")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),ag=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists all pipelines for a project",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines").concat(r)},e.body=function(){},e}return W(e,t),e}(em),cg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a pipeline",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId))},e.body=function(){},e}return W(e,t),e}(tm),ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs").concat(r)},e.body=function(){},e}return W(e,t),e}(em),dg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a given preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Create",e.endpointUrl=function(t){return["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),lg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of active preview environments for a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/previews").concat(r)},e.body=function(){},e}return W(e,t),e}(em),hg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a preview environment generated by a preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Delete",e.endpointUrl=function(t){return["projectId","pipelineId","previewId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/previews/").concat(encodeURIComponent(t.parameters.previewId))},e.body=function(){},e}return W(e,t),e}(rm),pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of preview template runs",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/runs").concat(r)},e.body=function(){},e}return W(e,t),e}(em),fg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given preview template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","templateRunId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/runs/").concat(encodeURIComponent(t.parameters.templateRunId))},e.body=function(){},e}return W(e,t),e}(tm),mg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage))},e.body=function(){},e}return W(e,t),e}(tm),vg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),bg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Runs a given release flow with given arguments. This endpoint can be used as part of a CI pipeline to automatically trigger a release process.",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),gg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists runs of a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs").concat(r)},e.body=function(){},e}return W(e,t),e}(em),yg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given release flow run",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","stage","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs/").concat(encodeURIComponent(t.parameters.runId))},e.body=function(){},e}return W(e,t),e}(tm),wg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Abort the given release flow run",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs/").concat(encodeURIComponent(t.parameters.runId),"/abort")},e.body=function(){},e}return W(e,t),e}(nm),Ig=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of secrets belonging to the project",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets").concat(r)},e.body=function(){},e}return W(e,t),e}(em),Eg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Rg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(im),jg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),_g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret including its contents",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e;["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId)).concat(r)},e.body=function(){},e}return W(e,t),e}(tm),Sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a secret",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId))},e.body=function(){},e}return W(e,t),e}(rm),Cg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a secret",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Link an addon to the secret group or edit the settings of the linked addon.",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Ag=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a given addon link.",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return W(e,t),e}(tm),Pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Unlinks an addon from the secret group.",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return W(e,t),e}(rm),Og=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret with details about its linked addons",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/details")},e.body=function(){},e}return W(e,t),e}(tm),kg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of services belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services").concat(r)},e.body=function(){},e}return W(e,t),e}(em),xg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Tg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(im),Dg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/build/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),Lg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Ng=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(im),qg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/combined/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),Bg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Fg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(im),Mg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/deployment/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),Gg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(){},e}return W(e,t),e}(tm),zg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Delete",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId)).concat(r)},e.body=function(){},e}return W(e,t),e}(rm),Jg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/branches").concat(r)},e.body=function(){},e}return W(e,t),e}(em),Wg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the builds for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build").concat(r)},e.body=function(){},e}return W(e,t),e}(em),$g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Hg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the build arguments of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-arguments").concat(r)},e.body=function(){},e}return W(e,t),e}(tm),Vg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the build arguments for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Zg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-arguments/details")},e.body=function(){},e}return W(e,t),e}(tm),Yg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Kg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given build or combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Xg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return W(e,t),e}(tm),Qg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given service build",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","serviceId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return W(e,t),e}(rm),ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/containers").concat(r)},e.body=function(){},e}return W(e,t),e}(em),ey=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/deployment")},e.body=function(){},e}return W(e,t),e}(tm),ny=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),ry=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/health-checks")},e.body=function(){},e}return W(e,t),e}(tm),iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),oy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/pause")},e.body=function(){},e}return W(e,t),e}(nm),sy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/ports")},e.body=function(){},e}return W(e,t),e}(tm),ay=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the list of ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/ports")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),cy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/pull-requests").concat(r)},e.body=function(){},e}return W(e,t),e}(em),uy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restarts the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/restart")},e.body=function(){},e}return W(e,t),e}(nm),dy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),ly=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the runtime environment of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/runtime-environment").concat(r)},e.body=function(){},e}return W(e,t),e}(tm),hy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),py=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/runtime-environment/details")},e.body=function(){},e}return W(e,t),e}(tm),fy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Scale Service",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),my=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of volumes belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes")},e.body=function(){},e}return W(e,t),e}(tm),vy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a volume with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),by=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Retrieve a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId))},e.body=function(){},e}return W(e,t),e}(tm),gy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update volume mounts and storage size",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),yy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes this volume and its associated data.",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Delete",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId))},e.body=function(){},e}return W(e,t),e}(rm),wy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId),"/attach")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Detach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId),"/detach")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Ey=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available project regions",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/regions"},e.body=function(){},e}return W(e,t),e}(tm),Ry=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="List the resource tags for this entity.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/tags".concat(r)},e.body=function(){},e}return W(e,t),e}(em),jy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Add a new resource tag for this entity.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Create",e.endpointUrl=function(t){return"/v1/tags"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),_y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update or create a resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Update",e.endpointUrl=function(t){return["resourceTagId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/tags"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(im),Sy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View details for a given resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Read",e.endpointUrl=function(t){return["resourceTagId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/tags/".concat(encodeURIComponent(t.parameters.resourceTagId))},e.body=function(){},e}return W(e,t),e}(tm),Cy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Patch a resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Update",e.endpointUrl=function(t){return["resourceTagId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/tags/".concat(encodeURIComponent(t.parameters.resourceTagId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(om),Uy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Delete",e.endpointUrl=function(t){return["resourceTagId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/tags/".concat(encodeURIComponent(t.parameters.resourceTagId))},e.body=function(){},e}return W(e,t),e}(rm),Ay=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of templates",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates".concat(r)},e.body=function(){},e}return W(e,t),e}(em),Py=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Create",e.endpointUrl=function(t){return"/v1/templates"},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Oy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId)).concat(r)},e.body=function(){},e}return W(e,t),e}(em),ky=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Update",e.endpointUrl=function(t){return["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId))},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),xy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Delete",e.endpointUrl=function(t){return["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId))},e.body=function(){},e}return W(e,t),e}(rm),Ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Run a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Run",e.endpointUrl=function(t){return["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return W(e,t),e}(nm),Dy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of template runs",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs").concat(r)},e.body=function(){},e}return W(e,t),e}(em),Ly=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){return["templateId","templateRunId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs/").concat(encodeURIComponent(t.parameters.templateRunId))},e.body=function(){},e}return W(e,t),e}(tm),Ny=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Abort the given template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > Runs > Abort",e.endpointUrl=function(t){return["templateId","templateRunId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs/").concat(encodeURIComponent(t.parameters.templateRunId),"/abort")},e.body=function(){},e}return W(e,t),e}(nm),qy=function(){function t(){this.loadContext()}return t.prototype.loadContext=function(){this.contextWrapper=this.loadContextWrapper()},t.prototype.getInfo=function(){return""},t.prototype.storeContext=function(t){return H(this,void 0,void 0,(function(){return V(this,(function(e){switch(e.label){case 0:return[4,this.writeContext(t)];case 1:return e.sent(),this.contextWrapper=t,[2]}}))}))},t.prototype.addContext=function(t,e){return void 0===e&&(e=!0),H(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:if(e||void 0===this.findContext(t.name))return[3,1];throw new Error("Context with name ".concat(t.name," already exists"));case 1:return[4,this.removeContext(t.name)];case 2:o.sent(),o.label=3;case 3:return n=$({host:"https://api.northflank.com"},t),r=this.contextWrapper,i={current:n.name,contexts:Z(Z([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(i)];case 4:return o.sent(),[2]}}))}))},t.prototype.removeContext=function(t){return H(this,void 0,void 0,(function(){var e,n,r,i;return V(this,(function(o){switch(o.label){case 0:return e=this.contextWrapper,n=e.contexts.filter((function(e){return e.name!==t})),r=e.current===t?void 0:e.current,i={current:r,contexts:Z([],n,!0),lastUpdateCheck:e.lastUpdateCheck},[4,this.storeContext(i)];case 1:return o.sent(),[2]}}))}))},t.prototype.getCurrentContext=function(){var t=this.contextWrapper.current;return void 0===t?t:this.findContext(t)},t.prototype.findContext=function(t){return this.contextWrapper.contexts.find((function(e){return e.name===t}))},t.prototype.getCurrentBaseUrl=function(t){var e=this.getCurrentContext();if(!0===t&&!(null==e?void 0:e.host))throw new Error("Context (".concat(null==e?void 0:e.name,") doesn't have a target API host. Please login again."));return null==e?void 0:e.host},t.prototype.getCurrentProjectName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.project},t.prototype.getCurrentName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.name},t.prototype.getCurrentToken=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.token},t.prototype.getCurrentServiceName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.service},t.prototype.getCurrentJobName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.job},t.prototype.getCurrentPlanId=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.plan},t.prototype.getCurrentRegion=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.region},t.prototype.useContext=function(t){return H(this,void 0,void 0,(function(){var e,n;return V(this,(function(r){switch(r.label){case 0:if(!this.findContext(t))throw new Error("Context with name ".concat(t," doesn't exist"));return e=this.contextWrapper,n=$($({},e),{current:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.updateToken=function(t,e){return H(this,void 0,void 0,(function(){var n,r,i,o,s;return V(this,(function(a){switch(a.label){case 0:if(n=null!=e?e:this.getCurrentName(),!(r=this.findContext(n)))throw new Error("Context with name ".concat(e," doesn't exist"));return i=this.contextWrapper,o=i.contexts.map((function(e){return e.name===n?$($({},r),{token:t}):e})),s=$($({},i),{contexts:o}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},t.prototype.useProjectId=function(t){return H(this,void 0,void 0,(function(){var e,n;return V(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set project id to current context, current context not defined");return n=$($({},e),{project:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useServiceId=function(t){return H(this,void 0,void 0,(function(){var e,n;return V(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set service id to current context, current context not defined");return n=$($({},e),{service:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useJobId=function(t){return H(this,void 0,void 0,(function(){var e,n;return V(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set job id to current context, current context not defined");return n=$($({},e),{job:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.usePlanId=function(t){return H(this,void 0,void 0,(function(){var e,n;return V(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set plan id to current context, current context not defined");return n=$($({},e),{plan:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useRegion=function(t){return H(this,void 0,void 0,(function(){var e,n;return V(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set region id to current context, current context not defined");return n=$($({},e),{region:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.getLastUpdateCheck=function(){return this.contextWrapper.lastUpdateCheck||new Date},t.prototype.setLastUpdateCheck=function(t){return H(this,void 0,void 0,(function(){var e,n;return V(this,(function(r){switch(r.label){case 0:return e=this.contextWrapper,n=$($({},e),{lastUpdateCheck:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t}(),By=function(t){function e(e){var n=t.call(this)||this;return n.assertDir=function(t){return H(n,void 0,void 0,(function(){var e;return V(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),g.existsSync(t)?[3,2]:[4,g.promises.mkdir(t,{recursive:!0})];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:throw e=n.sent(),console.log("Failed to login, local files could not be created: ".concat(t,", error: ").concat(e.message)),e;case 4:return[2]}}))}))},n.configPath=e||"".concat(f.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return W(e,t),e.prototype.loadContextWrapper=function(){try{return JSON.parse(g.readFileSync(this.configFile,"utf8"))}catch(t){return{contexts:[],lastUpdateCheck:new Date(0)}}},e.prototype.writeContext=function(t){return H(this,void 0,void 0,(function(){var e;return V(this,(function(n){switch(n.label){case 0:return[4,this.assertConfigDir()];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,g.promises.writeFile(this.configFile,JSON.stringify(t,null,"\t"),{mode:416})];case 3:return n.sent(),[3,5];case 4:throw e=n.sent(),console.log("Failed to persist api context, local files could not be created, error: ".concat(e.message)),e;case 5:return[2]}}))}))},e.prototype.assertConfigDir=function(){return H(this,void 0,void 0,(function(){return V(this,(function(t){switch(t.label){case 0:return[4,this.assertDir(this.configPath)];case 1:return t.sent(),[2]}}))}))},e.prototype.getInfo=function(){return"Cli config stored in: ".concat(this.configPath)},e}(qy),Fy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},e}return W(e,t),e.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},e.prototype.writeContext=function(t){return H(this,void 0,void 0,(function(){return V(this,(function(e){return this.inMemoryContextWrapper=t,[2]}))}))},e}(qy),My=function(t,e){void 0===e&&(e={});var n,r,i,o=this;this.baseUrl=function(){return o.contextProvider.getCurrentBaseUrl()},this.contextProvider=t,this.forwarding=new ec(t,new kg(t,e),new $v(t,e),e.agent),this.exec=new ic(t,e.agent),this.logs=new lm(t,e),this.metrics=new fm(t),this.fileCopy=new Zf(this.exec),this.endpoints={get:(i={},i.addon=((r=new Zv(t,e)).types=new mm(t,e),r.backupSchedules=new Xv(t,e),r.backups=new eb(t,e),r.backup=((n=new rb(t,e)).download=new ab(t,e),n.restores=new ub(t,e),n),r.containers=new lb(t,e),r.credentials=new hb(t,e),r.restores=new gb(t,e),r.version=new Eb(t,e),r),i.backupDestination=new gm(t,e),i.invoice=function(){var n={};return n.details=new Rm(t,e),n}(),i.cloud=function(){var n={};return n.cluster=new Um(t,e),n.dockerRegistry=new qm(t,e),n.integration=new Jm(t,e),n}(),i.dnsId=new Zm(t,e),i.domain=new Xm(t,e),i.domainCertificate=new tv(t,e),i.subdomain=function(){var n=new rv(t,e);return n.path=new lv(t,e),n}(),i.logSink=new wv(t,e),i.notification=new Cv(t,e),i.registryCredentials=new kv(t,e),i.project=new Jv(t,e),i.job=function(){var n=new Ob(t,e);return n.branches=new xb(t,e),n.builds=new Tb(t,e),n.buildArguments=new Lb(t,e),n.buildArgumentDetails=new qb(t,e),n.build=new Mb(t,e),n.containers=new zb(t,e),n.deployment=new Jb(t,e),n.healthChecks=new $b(t,e),n.pullRequests=new Zb(t,e),n.runs=new Kb(t,e),n.run=new Qb(t,e),n.runtimeEnvironment=new eg(t,e),n.runtimeEnvironmentDetails=new rg(t,e),n}(),i.pipeline=new cg(t,e),i.previewTemplate=new ug(t,e),i.previewTemplateRun=new fg(t,e),i.releaseFlow=new mg(t,e),i.releaseFlowRun=new yg(t,e),i.secret=new _g(t,e),i.secretLink=new Ag(t,e),i.secretDetails=new Og(t,e),i.service=function(){var n=new Gg(t,e);return n.branches=new Jg(t,e),n.builds=new Wg(t,e),n.buildArguments=new Hg(t,e),n.buildArgumentDetails=new Zg(t,e),n.build=new Xg(t,e),n.containers=new ty(t,e),n.deployment=new ey(t,e),n.healthChecks=new ry(t,e),n.ports=new sy(t,e),n.pullRequests=new cy(t,e),n.runtimeEnvironment=new ly(t,e),n.runtimeEnvironmentDetails=new py(t,e),n}(),i.volume=new by(t,e),i.tag=new Sy(t,e),i.template=new Oy(t,e),i.templateRun=new Ly(t,e),i),list:function(){var n={};return n.backupDestinations=new vm(t,e),n.backupDestinationsBackups=new Im(t,e),n.invoices=new Em(t,e),n.cloud=function(){var n={};return n.providers=new jm(t,e),n.clusters=new _m(t,e),n.cluster=function(){var n={};return n.nodes=new Om(t,e),n}(),n.dockerRegistry=new Dm(t,e),n.integrations=new Mm(t,e),n.nodeTypes=new Hm(t,e),n.regions=new Vm(t,e),n}(),n.domains=new Ym(t,e),n.subdomain=function(){var n={};return n.path=new dv(t,e),n}(),n.logSinks=new gv(t,e),n.notifications=new _v(t,e),n.registryCredentials=new Pv(t,e),n.vcs=new Dv(t,e),n.repos=new Nv(t,e),n.branches=new qv(t,e),n.plans=new Bv(t,e),n.projects=new Fv(t,e),n.addons=new $v(t,e),n.jobs=new jb(t,e),n.pipelines=new ag(t,e),n.previewTemplatePreviews=new lg(t,e),n.previewTemplateRuns=new pg(t,e),n.releaseFlowRuns=new gg(t,e),n.secrets=new Ig(t,e),n.services=new kg(t,e),n.volumes=new my(t,e),n.regions=new Ey(t,e),n.tags=new Ry(t,e),n.templates=new Ay(t,e),n.templateRuns=new Dy(t,e),n}(),add:function(){var n={};return n.backupDestination=new bm(t,e),n.domain=function(){var n={};return n.subdomain=new nv(t,e),n}(),n.subdomain=function(){var n={};return n.path=new uv(t,e),n}(),n.registryCredentials=new Ov(t,e),n.tag=new jy(t,e),n}(),patch:function(){var n={};return n.backupDestination=new ym(t,e),n.cloud=function(){var n={};return n.cluster=new Am(t,e),n.dockerRegistry=new Bm(t,e),n.integration=new Wm(t,e),n}(),n.project=new zv(t,e),n.addon=new Yv(t,e),n.job=function(){var n={};return n.cron=new Cb(t,e),n.manual=new Pb(t,e),n}(),n.secret=new jg(t,e),n.service=function(){var n={};return n.build=new Dg(t,e),n.combined=new qg(t,e),n.deployment=new Mg(t,e),n}(),n.tag=new Cy(t,e),n}(),delete:function(){var n={};return n.backupDestination=new wm(t,e),n.cloud=function(){var n={};return n.cluster=new Pm(t,e),n.dockerRegistry=new Fm(t,e),n.integration=new $m(t,e),n}(),n.domain=new Qm(t,e),n.subdomain=function(){var n=new iv(t,e);return n.path=new hv(t,e),n}(),n.logSink=new Iv(t,e),n.notification=new Av(t,e),n.registryCredentials=new xv(t,e),n.project=new Wv(t,e),n.addon=function(){var n=new Kv(t,e);return n.backupSchedule=new tb(t,e),n}(),n.backup=new ib(t,e),n.job=new kb(t,e),n.previewTemplatePreview=new hg(t,e),n.secret=new Sg(t,e),n.secretLink=new Pg(t,e),n.service=new zg(t,e),n.volume=new yy(t,e),n.tag=new Uy(t,e),n.template=new xy(t,e),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Sm(t,e),n.dockerRegistry=new Lm(t,e),n.integration=new Gm(t,e),n}(),n.domain=new Km(t,e),n.logSink=new yv(t,e),n.notification=new Sv(t,e),n.customVcs=function(){var n={};return n.token=new Lv(t,e),n}(),n.project=new Mv(t,e),n.addon=function(){var n=new Hv(t,e);return n.backupSchedule=new Qv(t,e),n}(),n.job=function(){var n={};return n.cron=new _b(t,e),n.manual=new Ub(t,e),n}(),n.secret=new Eg(t,e),n.service=function(){var n={};return n.build=new xg(t,e),n.combined=new Lg(t,e),n.deployment=new Bg(t,e),n}(),n.volume=new vy(t,e),n.template=new Py(t,e),n}(),put:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Cm(t,e),n.dockerRegistry=new Nm(t,e),n.integration=new zm(t,e),n}(),n.project=new Gv(t,e),n.addon=new Vv(t,e),n.job=function(){var n={};return n.cron=new Sb(t,e),n.manual=new Ab(t,e),n}(),n.secret=new Rg(t,e),n.service=function(){var n={};return n.build=new Tg(t,e),n.combined=new Ng(t,e),n.deployment=new Fg(t,e),n}(),n.tag=new _y(t,e),n}(),cordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new km(t,e),n}(),n}(),n}(),drain:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new xm(t,e),n}(),n}(),n}(),uncordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Tm(t,e),n}(),n}(),n}(),import:function(){var n={};return n.domainCertificate=new ev(t,e),n.addon=function(){var n={};return n.backup=new pb(t,e),n}(),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new ov(t,e),n.path=new fv(t,e),n}(),n}(),unassign:function(){var n={};return n.subdomain=function(){var n=new sv(t,e);return n.path=new mv(t,e),n}(),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new av(t,e),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new cv(t,e),n}(),n}(),update:function(){var n={};return n.subdomain=function(){var n={};return n.path=new pv(t,e),n}(),n.logSink=new jv(t,e),n.notification=new Uv(t,e),n.registryCredentials=new Tv(t,e),n.addon=function(){var n={};return n.networkSettings=new fb(t,e),n.security=new Ib(t,e),n.version=new Rb(t,e),n}(),n.job=function(){var n={};return n.buildArguments=new Nb(t,e),n.buildOptions=new Bb(t,e),n.buildSource=new Fb(t,e),n.deployment=new Wb(t,e),n.healthChecks=new Hb(t,e),n.runtimeEnvironment=new ng(t,e),n.settings=new og(t,e),n}(),n.previewTemplate=new dg(t,e),n.releaseFlow=new vg(t,e),n.secret=new Cg(t,e),n.secretLink=new Ug(t,e),n.service=function(){var n={};return n.buildArguments=new Vg(t,e),n.buildOptions=new Yg(t,e),n.buildSource=new Kg(t,e),n.deployment=new ny(t,e),n.healthChecks=new iy(t,e),n.ports=new ay(t,e),n.runtimeEnvironment=new hy(t,e),n}(),n.volume=new gy(t,e),n.template=new ky(t,e),n}(),verify:function(){var n={};return n.subdomain=new vv(t,e),n.domain=new bv(t,e),n}(),pause:function(){var n={};return n.logSink=new Ev(t,e),n.addon=new mb(t,e),n.job=new Vb(t,e),n.service=new oy(t,e),n}(),resume:function(){var n={};return n.logSink=new Rv(t,e),n.addon=new yb(t,e),n.job=new Yb(t,e),n.service=new dy(t,e),n}(),backup:function(){var n={};return n.addon=new nb(t,e),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new ob(t,e),n.restore=new sb(t,e),n}(),n.job=function(){var n={};return n.build=new Gb(t,e),n.run=new tg(t,e),n}(),n.releaseFlowRun=new wg(t,e),n.service=function(){var n={};return n.build=new Qg(t,e),n}(),n.templateRun=new Ny(t,e),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new cb(t,e),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new db(t,e),n}(),n}(),reset:function(){var n={};return n.addon=new vb(t,e),n}(),restart:function(){var n={};return n.addon=new bb(t,e),n.service=new uy(t,e),n}(),scale:function(){var n={};return n.addon=new wb(t,e),n.job=new ig(t,e),n.service=new fy(t,e),n}(),start:function(){var n={};return n.job=function(){var n={};return n.build=new Db(t,e),n.run=new Xb(t,e),n}(),n.service=function(){var n={};return n.build=new $g(t,e),n}(),n}(),suspend:function(){var n={};return n.job=new sg(t,e),n}(),run:function(){var n={};return n.releaseFlow=new bg(t,e),n.template=new Ty(t,e),n}(),attach:function(){var n={};return n.volume=new wy(t,e),n}(),detach:function(){var n={};return n.volume=new Iy(t,e),n}(),download:function(){var t={};return t.service=function(){var t={};return t.files=o.fileCopy.downloadServiceFiles.bind(o.fileCopy),t}(),t.job=function(){var t={};return t.files=o.fileCopy.downloadJobFiles.bind(o.fileCopy),t}(),t}(),upload:function(){var t={};return t.service=function(){var t={};return t.files=o.fileCopy.uploadServiceFiles.bind(o.fileCopy),t}(),t.job=function(){var t={};return t.files=o.fileCopy.uploadJobFiles.bind(o.fileCopy),t}(),t}()},this.download=function(){var t={};return t.service=function(){var t={};return t.files=o.endpoints.download.service.files,t}(),t.job=function(){var t={};return t.files=o.endpoints.download.job.files,t}(),t}(),this.upload=function(){var t={};return t.service=function(){var t={};return t.files=o.endpoints.upload.service.files,t}(),t.job=function(){var t={};return t.files=o.endpoints.upload.job.files,t}(),t}(),this.get=function(){var t={};return t.addon=function(){var t=o.endpoints.get.addon.call;return t.types=o.endpoints.get.addon.types.call,t.backupSchedules=function(){var t=o.endpoints.get.addon.backupSchedules.call;return t.all=o.endpoints.get.addon.backupSchedules.all,t}(),t.backups=function(){var t=o.endpoints.get.addon.backups.call;return t.all=o.endpoints.get.addon.backups.all,t}(),t.backup=function(){var t=o.endpoints.get.addon.backup.call;return t.download=o.endpoints.get.addon.backup.download.call,t.restores=function(){var t=o.endpoints.get.addon.backup.restores.call;return t.all=o.endpoints.get.addon.backup.restores.all,t}(),t.logs=o.logs.getAddonBackupLogs,t.logTail=o.logs.tailAddonBackupLogs,t}(),t.containers=function(){var t=o.endpoints.get.addon.containers.call;return t.all=o.endpoints.get.addon.containers.all,t}(),t.credentials=o.endpoints.get.addon.credentials.call,t.restores=function(){var t=function(){var t=o.endpoints.get.addon.restores.call;return t.all=o.endpoints.get.addon.restores.all,t}();return t.logs=o.logs.getAddonRestoresLogs,t.logTail=o.logs.tailAddonRestoresLogs,t}(),t.version=o.endpoints.get.addon.version.call,t.logs=o.logs.getAddonLogs,t.logTail=o.logs.tailAddonLogs,t.metrics=o.metrics.getAddonMetrics,t.metricsRange=o.metrics.getAddonMetricsRange,t}(),t.backupDestination=o.endpoints.get.backupDestination.call,t.invoice=function(){var t={};return t.details=o.endpoints.get.invoice.details.call,t}(),t.cloud=function(){var t={};return t.cluster=o.endpoints.get.cloud.cluster.call,t.dockerRegistry=o.endpoints.get.cloud.dockerRegistry.call,t.integration=o.endpoints.get.cloud.integration.call,t}(),t.dnsId=o.endpoints.get.dnsId.call,t.domain=o.endpoints.get.domain.call,t.domainCertificate=o.endpoints.get.domainCertificate.call,t.subdomain=function(){var t=o.endpoints.get.subdomain.call;return t.path=o.endpoints.get.subdomain.path.call,t}(),t.logSink=o.endpoints.get.logSink.call,t.notification=o.endpoints.get.notification.call,t.registryCredentials=o.endpoints.get.registryCredentials.call,t.project=o.endpoints.get.project.call,t.job=function(){var t=o.endpoints.get.job.call;return t.branches=function(){var t=o.endpoints.get.job.branches.call;return t.all=o.endpoints.get.job.branches.all,t}(),t.builds=function(){var t=o.endpoints.get.job.builds.call;return t.all=o.endpoints.get.job.builds.all,t}(),t.buildArguments=o.endpoints.get.job.buildArguments.call,t.buildArgumentDetails=o.endpoints.get.job.buildArgumentDetails.call,t.build=o.endpoints.get.job.build.call,t.containers=function(){var t=o.endpoints.get.job.containers.call;return t.all=o.endpoints.get.job.containers.all,t}(),t.deployment=o.endpoints.get.job.deployment.call,t.healthChecks=o.endpoints.get.job.healthChecks.call,t.pullRequests=function(){var t=o.endpoints.get.job.pullRequests.call;return t.all=o.endpoints.get.job.pullRequests.all,t}(),t.runs=function(){var t=o.endpoints.get.job.runs.call;return t.all=o.endpoints.get.job.runs.all,t}(),t.run=o.endpoints.get.job.run.call,t.runtimeEnvironment=o.endpoints.get.job.runtimeEnvironment.call,t.runtimeEnvironmentDetails=o.endpoints.get.job.runtimeEnvironmentDetails.call,t.logs=o.logs.getJobLogs,t.buildLogs=o.logs.getJobBuildLogs,t.logTail=o.logs.tailJobLogs,t.buildLogTail=o.logs.tailJobBuildLogs,t.metrics=o.metrics.getJobMetrics,t.buildMetrics=o.metrics.getJobBuildMetrics,t.metricsRange=o.metrics.getJobMetricsRange,t.buildMetricsRange=o.metrics.getJobBuildMetricsRange,t}(),t.pipeline=o.endpoints.get.pipeline.call,t.previewTemplate=function(){var t=o.endpoints.get.previewTemplate.call;return t.all=o.endpoints.get.previewTemplate.all,t}(),t.previewTemplateRun=o.endpoints.get.previewTemplateRun.call,t.releaseFlow=o.endpoints.get.releaseFlow.call,t.releaseFlowRun=o.endpoints.get.releaseFlowRun.call,t.secret=o.endpoints.get.secret.call,t.secretLink=o.endpoints.get.secretLink.call,t.secretDetails=o.endpoints.get.secretDetails.call,t.service=function(){var t=o.endpoints.get.service.call;return t.branches=function(){var t=o.endpoints.get.service.branches.call;return t.all=o.endpoints.get.service.branches.all,t}(),t.builds=function(){var t=o.endpoints.get.service.builds.call;return t.all=o.endpoints.get.service.builds.all,t}(),t.buildArguments=o.endpoints.get.service.buildArguments.call,t.buildArgumentDetails=o.endpoints.get.service.buildArgumentDetails.call,t.build=o.endpoints.get.service.build.call,t.containers=function(){var t=o.endpoints.get.service.containers.call;return t.all=o.endpoints.get.service.containers.all,t}(),t.deployment=o.endpoints.get.service.deployment.call,t.healthChecks=o.endpoints.get.service.healthChecks.call,t.ports=o.endpoints.get.service.ports.call,t.pullRequests=function(){var t=o.endpoints.get.service.pullRequests.call;return t.all=o.endpoints.get.service.pullRequests.all,t}(),t.runtimeEnvironment=o.endpoints.get.service.runtimeEnvironment.call,t.runtimeEnvironmentDetails=o.endpoints.get.service.runtimeEnvironmentDetails.call,t.logs=o.logs.getServiceLogs,t.buildLogs=o.logs.getServiceBuildLogs,t.logTail=o.logs.tailServiceLogs,t.buildLogTail=o.logs.tailServiceBuildLogs,t.metrics=o.metrics.getServiceMetrics,t.buildMetrics=o.metrics.getServiceBuildMetrics,t.metricsRange=o.metrics.getServiceMetricsRange,t.buildMetricsRange=o.metrics.getServiceBuildMetricsRange,t}(),t.volume=o.endpoints.get.volume.call,t.tag=o.endpoints.get.tag.call,t.template=function(){var t=o.endpoints.get.template.call;return t.all=o.endpoints.get.template.all,t}(),t.templateRun=o.endpoints.get.templateRun.call,t}(),this.list=function(){var t={};return t.backupDestinations=function(){var t=o.endpoints.list.backupDestinations.call;return t.all=o.endpoints.list.backupDestinations.all,t}(),t.backupDestinationsBackups=function(){var t=o.endpoints.list.backupDestinationsBackups.call;return t.all=o.endpoints.list.backupDestinationsBackups.all,t}(),t.invoices=function(){var t=o.endpoints.list.invoices.call;return t.all=o.endpoints.list.invoices.all,t}(),t.cloud=function(){var t={};return t.providers=o.endpoints.list.cloud.providers.call,t.clusters=function(){var t=o.endpoints.list.cloud.clusters.call;return t.all=o.endpoints.list.cloud.clusters.all,t}(),t.cluster=function(){var t={};return t.nodes=function(){var t=o.endpoints.list.cloud.cluster.nodes.call;return t.all=o.endpoints.list.cloud.cluster.nodes.all,t}(),t}(),t.dockerRegistry=function(){var t=o.endpoints.list.cloud.dockerRegistry.call;return t.all=o.endpoints.list.cloud.dockerRegistry.all,t}(),t.integrations=function(){var t=o.endpoints.list.cloud.integrations.call;return t.all=o.endpoints.list.cloud.integrations.all,t}(),t.nodeTypes=function(){var t=o.endpoints.list.cloud.nodeTypes.call;return t.all=o.endpoints.list.cloud.nodeTypes.all,t}(),t.regions=function(){var t=o.endpoints.list.cloud.regions.call;return t.all=o.endpoints.list.cloud.regions.all,t}(),t}(),t.domains=function(){var t=o.endpoints.list.domains.call;return t.all=o.endpoints.list.domains.all,t}(),t.subdomain=function(){var t={};return t.path=o.endpoints.list.subdomain.path.call,t}(),t.logSinks=function(){var t=o.endpoints.list.logSinks.call;return t.all=o.endpoints.list.logSinks.all,t}(),t.notifications=function(){var t=o.endpoints.list.notifications.call;return t.all=o.endpoints.list.notifications.all,t}(),t.registryCredentials=function(){var t=o.endpoints.list.registryCredentials.call;return t.all=o.endpoints.list.registryCredentials.all,t}(),t.vcs=o.endpoints.list.vcs.call,t.repos=function(){var t=o.endpoints.list.repos.call;return t.all=o.endpoints.list.repos.all,t}(),t.branches=function(){var t=o.endpoints.list.branches.call;return t.all=o.endpoints.list.branches.all,t}(),t.plans=o.endpoints.list.plans.call,t.projects=function(){var t=o.endpoints.list.projects.call;return t.all=o.endpoints.list.projects.all,t}(),t.addons=function(){var t=o.endpoints.list.addons.call;return t.all=o.endpoints.list.addons.all,t}(),t.jobs=function(){var t=o.endpoints.list.jobs.call;return t.all=o.endpoints.list.jobs.all,t}(),t.pipelines=function(){var t=o.endpoints.list.pipelines.call;return t.all=o.endpoints.list.pipelines.all,t}(),t.previewTemplatePreviews=function(){var t=o.endpoints.list.previewTemplatePreviews.call;return t.all=o.endpoints.list.previewTemplatePreviews.all,t}(),t.previewTemplateRuns=function(){var t=o.endpoints.list.previewTemplateRuns.call;return t.all=o.endpoints.list.previewTemplateRuns.all,t}(),t.releaseFlowRuns=function(){var t=o.endpoints.list.releaseFlowRuns.call;return t.all=o.endpoints.list.releaseFlowRuns.all,t}(),t.secrets=function(){var t=o.endpoints.list.secrets.call;return t.all=o.endpoints.list.secrets.all,t}(),t.services=function(){var t=o.endpoints.list.services.call;return t.all=o.endpoints.list.services.all,t}(),t.volumes=o.endpoints.list.volumes.call,t.regions=o.endpoints.list.regions.call,t.tags=function(){var t=o.endpoints.list.tags.call;return t.all=o.endpoints.list.tags.all,t}(),t.templates=function(){var t=o.endpoints.list.templates.call;return t.all=o.endpoints.list.templates.all,t}(),t.templateRuns=function(){var t=o.endpoints.list.templateRuns.call;return t.all=o.endpoints.list.templateRuns.all,t}(),t}(),this.add=function(){var t={};return t.backupDestination=o.endpoints.add.backupDestination.call,t.domain=function(){var t={};return t.subdomain=o.endpoints.add.domain.subdomain.call,t}(),t.subdomain=function(){var t={};return t.path=o.endpoints.add.subdomain.path.call,t}(),t.registryCredentials=o.endpoints.add.registryCredentials.call,t.tag=o.endpoints.add.tag.call,t}(),this.patch=function(){var t={};return t.backupDestination=o.endpoints.patch.backupDestination.call,t.cloud=function(){var t={};return t.cluster=o.endpoints.patch.cloud.cluster.call,t.dockerRegistry=o.endpoints.patch.cloud.dockerRegistry.call,t.integration=o.endpoints.patch.cloud.integration.call,t}(),t.project=o.endpoints.patch.project.call,t.addon=o.endpoints.patch.addon.call,t.job=function(){var t={};return t.cron=o.endpoints.patch.job.cron.call,t.manual=o.endpoints.patch.job.manual.call,t}(),t.secret=o.endpoints.patch.secret.call,t.service=function(){var t={};return t.build=o.endpoints.patch.service.build.call,t.combined=o.endpoints.patch.service.combined.call,t.deployment=o.endpoints.patch.service.deployment.call,t}(),t.tag=o.endpoints.patch.tag.call,t}(),this.delete=function(){var t={};return t.backupDestination=o.endpoints.delete.backupDestination.call,t.cloud=function(){var t={};return t.cluster=o.endpoints.delete.cloud.cluster.call,t.dockerRegistry=o.endpoints.delete.cloud.dockerRegistry.call,t.integration=o.endpoints.delete.cloud.integration.call,t}(),t.domain=o.endpoints.delete.domain.call,t.subdomain=function(){var t=o.endpoints.delete.subdomain.call;return t.path=o.endpoints.delete.subdomain.path.call,t}(),t.logSink=o.endpoints.delete.logSink.call,t.notification=o.endpoints.delete.notification.call,t.registryCredentials=o.endpoints.delete.registryCredentials.call,t.project=o.endpoints.delete.project.call,t.addon=function(){var t=o.endpoints.delete.addon.call;return t.backupSchedule=o.endpoints.delete.addon.backupSchedule.call,t}(),t.backup=o.endpoints.delete.backup.call,t.job=o.endpoints.delete.job.call,t.previewTemplatePreview=o.endpoints.delete.previewTemplatePreview.call,t.secret=o.endpoints.delete.secret.call,t.secretLink=o.endpoints.delete.secretLink.call,t.service=o.endpoints.delete.service.call,t.volume=o.endpoints.delete.volume.call,t.tag=o.endpoints.delete.tag.call,t.template=o.endpoints.delete.template.call,t}(),this.create=function(){var t={};return t.cloud=function(){var t={};return t.cluster=o.endpoints.create.cloud.cluster.call,t.dockerRegistry=o.endpoints.create.cloud.dockerRegistry.call,t.integration=o.endpoints.create.cloud.integration.call,t}(),t.domain=o.endpoints.create.domain.call,t.logSink=o.endpoints.create.logSink.call,t.notification=o.endpoints.create.notification.call,t.customVcs=function(){var t={};return t.token=o.endpoints.create.customVcs.token.call,t}(),t.project=o.endpoints.create.project.call,t.addon=function(){var t=o.endpoints.create.addon.call;return t.backupSchedule=o.endpoints.create.addon.backupSchedule.call,t}(),t.job=function(){var t={};return t.cron=o.endpoints.create.job.cron.call,t.manual=o.endpoints.create.job.manual.call,t}(),t.secret=o.endpoints.create.secret.call,t.service=function(){var t={};return t.build=o.endpoints.create.service.build.call,t.combined=o.endpoints.create.service.combined.call,t.deployment=o.endpoints.create.service.deployment.call,t}(),t.volume=o.endpoints.create.volume.call,t.template=o.endpoints.create.template.call,t}(),this.put=function(){var t={};return t.cloud=function(){var t={};return t.cluster=o.endpoints.put.cloud.cluster.call,t.dockerRegistry=o.endpoints.put.cloud.dockerRegistry.call,t.integration=o.endpoints.put.cloud.integration.call,t}(),t.project=o.endpoints.put.project.call,t.addon=o.endpoints.put.addon.call,t.job=function(){var t={};return t.cron=o.endpoints.put.job.cron.call,t.manual=o.endpoints.put.job.manual.call,t}(),t.secret=o.endpoints.put.secret.call,t.service=function(){var t={};return t.build=o.endpoints.put.service.build.call,t.combined=o.endpoints.put.service.combined.call,t.deployment=o.endpoints.put.service.deployment.call,t}(),t.tag=o.endpoints.put.tag.call,t}(),this.cordon=function(){var t={};return t.cloud=function(){var t={};return t.cluster=function(){var t={};return t.node=o.endpoints.cordon.cloud.cluster.node.call,t}(),t}(),t}(),this.drain=function(){var t={};return t.cloud=function(){var t={};return t.cluster=function(){var t={};return t.node=o.endpoints.drain.cloud.cluster.node.call,t}(),t}(),t}(),this.uncordon=function(){var t={};return t.cloud=function(){var t={};return t.cluster=function(){var t={};return t.node=o.endpoints.uncordon.cloud.cluster.node.call,t}(),t}(),t}(),this.import=function(){var t={};return t.domainCertificate=o.endpoints.import.domainCertificate.call,t.addon=function(){var t={};return t.backup=o.endpoints.import.addon.backup.call,t}(),t}(),this.assign=function(){var t={};return t.subdomain=function(){var t={};return t.service=o.endpoints.assign.subdomain.service.call,t.path=o.endpoints.assign.subdomain.path.call,t}(),t}(),this.unassign=function(){var t={};return t.subdomain=function(){var t=o.endpoints.unassign.subdomain.call;return t.path=o.endpoints.unassign.subdomain.path.call,t}(),t}(),this.disable=function(){var t={};return t.subdomain=function(){var t={};return t.cdn=o.endpoints.disable.subdomain.cdn.call,t}(),t}(),this.enable=function(){var t={};return t.subdomain=function(){var t={};return t.cdn=o.endpoints.enable.subdomain.cdn.call,t}(),t}(),this.update=function(){var t={};return t.subdomain=function(){var t={};return t.path=o.endpoints.update.subdomain.path.call,t}(),t.logSink=o.endpoints.update.logSink.call,t.notification=o.endpoints.update.notification.call,t.registryCredentials=o.endpoints.update.registryCredentials.call,t.addon=function(){var t={};return t.networkSettings=o.endpoints.update.addon.networkSettings.call,t.security=o.endpoints.update.addon.security.call,t.version=o.endpoints.update.addon.version.call,t}(),t.job=function(){var t={};return t.buildArguments=o.endpoints.update.job.buildArguments.call,t.buildOptions=o.endpoints.update.job.buildOptions.call,t.buildSource=o.endpoints.update.job.buildSource.call,t.deployment=o.endpoints.update.job.deployment.call,t.healthChecks=o.endpoints.update.job.healthChecks.call,t.runtimeEnvironment=o.endpoints.update.job.runtimeEnvironment.call,t.settings=o.endpoints.update.job.settings.call,t}(),t.previewTemplate=o.endpoints.update.previewTemplate.call,t.releaseFlow=o.endpoints.update.releaseFlow.call,t.secret=o.endpoints.update.secret.call,t.secretLink=o.endpoints.update.secretLink.call,t.service=function(){var t={};return t.buildArguments=o.endpoints.update.service.buildArguments.call,t.buildOptions=o.endpoints.update.service.buildOptions.call,t.buildSource=o.endpoints.update.service.buildSource.call,t.deployment=o.endpoints.update.service.deployment.call,t.healthChecks=o.endpoints.update.service.healthChecks.call,t.ports=o.endpoints.update.service.ports.call,t.runtimeEnvironment=o.endpoints.update.service.runtimeEnvironment.call,t}(),t.volume=o.endpoints.update.volume.call,t.template=o.endpoints.update.template.call,t}(),this.verify=function(){var t={};return t.subdomain=o.endpoints.verify.subdomain.call,t.domain=o.endpoints.verify.domain.call,t}(),this.pause=function(){var t={};return t.logSink=o.endpoints.pause.logSink.call,t.addon=o.endpoints.pause.addon.call,t.job=o.endpoints.pause.job.call,t.service=o.endpoints.pause.service.call,t}(),this.resume=function(){var t={};return t.logSink=o.endpoints.resume.logSink.call,t.addon=o.endpoints.resume.addon.call,t.job=o.endpoints.resume.job.call,t.service=o.endpoints.resume.service.call,t}(),this.backup=function(){var t={};return t.addon=o.endpoints.backup.addon.call,t}(),this.abort=function(){var t={};return t.addon=function(){var t={};return t.backup=o.endpoints.abort.addon.backup.call,t.restore=o.endpoints.abort.addon.restore.call,t}(),t.job=function(){var t={};return t.build=o.endpoints.abort.job.build.call,t.run=o.endpoints.abort.job.run.call,t}(),t.releaseFlowRun=o.endpoints.abort.releaseFlowRun.call,t.service=function(){var t={};return t.build=o.endpoints.abort.service.build.call,t}(),t.templateRun=o.endpoints.abort.templateRun.call,t}(),this.restore=function(){var t={};return t.addon=function(){var t={};return t.backup=o.endpoints.restore.addon.backup.call,t}(),t}(),this.retain=function(){var t={};return t.addon=function(){var t={};return t.backup=o.endpoints.retain.addon.backup.call,t}(),t}(),this.reset=function(){var t={};return t.addon=o.endpoints.reset.addon.call,t}(),this.restart=function(){var t={};return t.addon=o.endpoints.restart.addon.call,t.service=o.endpoints.restart.service.call,t}(),this.scale=function(){var t={};return t.addon=o.endpoints.scale.addon.call,t.job=o.endpoints.scale.job.call,t.service=o.endpoints.scale.service.call,t}(),this.start=function(){var t={};return t.job=function(){var t={};return t.build=o.endpoints.start.job.build.call,t.run=o.endpoints.start.job.run.call,t}(),t.service=function(){var t={};return t.build=o.endpoints.start.service.build.call,t}(),t}(),this.suspend=function(){var t={};return t.job=o.endpoints.suspend.job.call,t}(),this.run=function(){var t={};return t.releaseFlow=o.endpoints.run.releaseFlow.call,t.template=o.endpoints.run.template.call,t}(),this.attach=function(){var t={};return t.volume=o.endpoints.attach.volume.call,t}(),this.detach=function(){var t={};return t.volume=o.endpoints.detach.volume.call,t}()};export{ob as AbortAddonBackupEndpoint,sb as AbortAddonRestoreEndpoint,Gb as AbortJobBuildEndpoint,tg as AbortJobRunEndpoint,wg as AbortReleaseflowrunEndpoint,Qg as AbortServiceBuildEndpoint,Ny as AbortTemplaterunEndpoint,bm as AddBackupdestinationEndpoint,nv as AddDomainSubdomainEndpoint,Ov as AddRegistrycredentialsEndpoint,uv as AddSubdomainPathEndpoint,jy as AddTagEndpoint,My as ApiClient,qy as ApiClientContextProvider,By as ApiClientFileContextProvider,Fy as ApiClientInMemoryContextProvider,Qf as ApiEndpoint,fv as AssignSubdomainPathEndpoint,ov as AssignSubdomainServiceEndpoint,wy as AttachVolumeEndpoint,nb as BackupAddonEndpoint,$f as CopyType,km as CordonCloudClusterNodeEndpoint,Qv as CreateAddonBackupscheduleEndpoint,Hv as CreateAddonEndpoint,Sm as CreateCloudClusterEndpoint,Lm as CreateCloudDockerregistryEndpoint,Gm as CreateCloudIntegrationEndpoint,Lv as CreateCustomvcsTokenEndpoint,Km as CreateDomainEndpoint,_b as CreateJobCronEndpoint,Ub as CreateJobManualEndpoint,yv as CreateLogsinkEndpoint,Sv as CreateNotificationEndpoint,Mv as CreateProjectEndpoint,Eg as CreateSecretEndpoint,xg as CreateServiceBuildEndpoint,Lg as CreateServiceCombinedEndpoint,Bg as CreateServiceDeploymentEndpoint,Py as CreateTemplateEndpoint,vy as CreateVolumeEndpoint,tb as DeleteAddonBackupscheduleEndpoint,Kv as DeleteAddonEndpoint,rm as DeleteApiEndpoint,ib as DeleteBackupEndpoint,wm as DeleteBackupdestinationEndpoint,Pm as DeleteCloudClusterEndpoint,Fm as DeleteCloudDockerregistryEndpoint,$m as DeleteCloudIntegrationEndpoint,Qm as DeleteDomainEndpoint,kb as DeleteJobEndpoint,Iv as DeleteLogsinkEndpoint,Av as DeleteNotificationEndpoint,hg as DeletePreviewtemplatepreviewEndpoint,Wv as DeleteProjectEndpoint,xv as DeleteRegistrycredentialsEndpoint,Sg as DeleteSecretEndpoint,Pg as DeleteSecretlinkEndpoint,zg as DeleteServiceEndpoint,iv as DeleteSubdomainEndpoint,hv as DeleteSubdomainPathEndpoint,Uy as DeleteTagEndpoint,xy as DeleteTemplateEndpoint,yy as DeleteVolumeEndpoint,Iy as DetachVolumeEndpoint,av as DisableSubdomainCdnEndpoint,xm as DrainCloudClusterNodeEndpoint,cv as EnableSubdomainCdnEndpoint,rc as ExecCommandStandard,ab as GetAddonBackupDownloadEndpoint,rb as GetAddonBackupEndpoint,ub as GetAddonBackupRestoresEndpoint,eb as GetAddonBackupsEndpoint,Xv as GetAddonBackupschedulesEndpoint,lb as GetAddonContainersEndpoint,hb as GetAddonCredentialsEndpoint,Zv as GetAddonEndpoint,gb as GetAddonRestoresEndpoint,mm as GetAddonTypesEndpoint,Eb as GetAddonVersionEndpoint,tm as GetApiEndpoint,em as GetApiEndpointPaginated,gm as GetBackupdestinationEndpoint,Um as GetCloudClusterEndpoint,qm as GetCloudDockerregistryEndpoint,Jm as GetCloudIntegrationEndpoint,Zm as GetDnsidEndpoint,Xm as GetDomainEndpoint,tv as GetDomaincertificateEndpoint,Rm as GetInvoiceDetailsEndpoint,xb as GetJobBranchesEndpoint,Mb as GetJobBuildEndpoint,qb as GetJobBuildargumentdetailsEndpoint,Lb as GetJobBuildargumentsEndpoint,Tb as GetJobBuildsEndpoint,zb as GetJobContainersEndpoint,Jb as GetJobDeploymentEndpoint,Ob as GetJobEndpoint,$b as GetJobHealthchecksEndpoint,Zb as GetJobPullrequestsEndpoint,Qb as GetJobRunEndpoint,Kb as GetJobRunsEndpoint,eg as GetJobRuntimeenvironmentEndpoint,rg as GetJobRuntimeenvironmentdetailsEndpoint,wv as GetLogsinkEndpoint,Cv as GetNotificationEndpoint,cg as GetPipelineEndpoint,ug as GetPreviewtemplateEndpoint,fg as GetPreviewtemplaterunEndpoint,Jv as GetProjectEndpoint,kv as GetRegistrycredentialsEndpoint,mg as GetReleaseflowEndpoint,yg as GetReleaseflowrunEndpoint,_g as GetSecretEndpoint,Og as GetSecretdetailsEndpoint,Ag as GetSecretlinkEndpoint,Jg as GetServiceBranchesEndpoint,Xg as GetServiceBuildEndpoint,Zg as GetServiceBuildargumentdetailsEndpoint,Hg as GetServiceBuildargumentsEndpoint,Wg as GetServiceBuildsEndpoint,ty as GetServiceContainersEndpoint,ey as GetServiceDeploymentEndpoint,Gg as GetServiceEndpoint,ry as GetServiceHealthchecksEndpoint,sy as GetServicePortsEndpoint,cy as GetServicePullrequestsEndpoint,ly as GetServiceRuntimeenvironmentEndpoint,py as GetServiceRuntimeenvironmentdetailsEndpoint,rv as GetSubdomainEndpoint,lv as GetSubdomainPathEndpoint,Sy as GetTagEndpoint,Oy as GetTemplateEndpoint,Ly as GetTemplaterunEndpoint,by as GetVolumeEndpoint,pb as ImportAddonBackupEndpoint,ev as ImportDomaincertificateEndpoint,$v as ListAddonsEndpoint,vm as ListBackupdestinationsEndpoint,Im as ListBackupdestinationsbackupsEndpoint,qv as ListBranchesEndpoint,Om as ListCloudClusterNodesEndpoint,_m as ListCloudClustersEndpoint,Dm as ListCloudDockerregistryEndpoint,Mm as ListCloudIntegrationsEndpoint,Hm as ListCloudNodetypesEndpoint,jm as ListCloudProvidersEndpoint,Vm as ListCloudRegionsEndpoint,Ym as ListDomainsEndpoint,Em as ListInvoicesEndpoint,jb as ListJobsEndpoint,gv as ListLogsinksEndpoint,_v as ListNotificationsEndpoint,ag as ListPipelinesEndpoint,Bv as ListPlansEndpoint,lg as ListPreviewtemplatepreviewsEndpoint,pg as ListPreviewtemplaterunsEndpoint,Fv as ListProjectsEndpoint,Ey as ListRegionsEndpoint,Pv as ListRegistrycredentialsEndpoint,gg as ListReleaseflowrunsEndpoint,Nv as ListReposEndpoint,Ig as ListSecretsEndpoint,kg as ListServicesEndpoint,dv as ListSubdomainPathEndpoint,Ry as ListTagsEndpoint,Dy as ListTemplaterunsEndpoint,Ay as ListTemplatesEndpoint,Dv as ListVcsEndpoint,my as ListVolumesEndpoint,Vf as LogType,um as MetricType,Yf as NorthflankApiCallError,ic as NorthflankExecCommand,Zf as NorthflankFileCopy,lm as NorthflankLogFetch,fm as NorthflankMetricFetch,ec as NorthflankPortForwarder,Yv as PatchAddonEndpoint,om as PatchApiEndpoint,ym as PatchBackupdestinationEndpoint,Am as PatchCloudClusterEndpoint,Bm as PatchCloudDockerregistryEndpoint,Wm as PatchCloudIntegrationEndpoint,Cb as PatchJobCronEndpoint,Pb as PatchJobManualEndpoint,zv as PatchProjectEndpoint,jg as PatchSecretEndpoint,Dg as PatchServiceBuildEndpoint,qg as PatchServiceCombinedEndpoint,Mg as PatchServiceDeploymentEndpoint,Cy as PatchTagEndpoint,mb as PauseAddonEndpoint,Vb as PauseJobEndpoint,Ev as PauseLogsinkEndpoint,oy as PauseServiceEndpoint,nm as PostApiEndpoint,Vv as PutAddonEndpoint,im as PutApiEndpoint,Cm as PutCloudClusterEndpoint,Nm as PutCloudDockerregistryEndpoint,zm as PutCloudIntegrationEndpoint,Sb as PutJobCronEndpoint,Ab as PutJobManualEndpoint,Gv as PutProjectEndpoint,Rg as PutSecretEndpoint,Tg as PutServiceBuildEndpoint,Ng as PutServiceCombinedEndpoint,Fg as PutServiceDeploymentEndpoint,_y as PutTagEndpoint,vb as ResetAddonEndpoint,bb as RestartAddonEndpoint,uy as RestartServiceEndpoint,cb as RestoreAddonBackupEndpoint,yb as ResumeAddonEndpoint,Yb as ResumeJobEndpoint,Rv as ResumeLogsinkEndpoint,dy as ResumeServiceEndpoint,db as RetainAddonBackupEndpoint,bg as RunReleaseflowEndpoint,Ty as RunTemplateEndpoint,wb as ScaleAddonEndpoint,ig as ScaleJobEndpoint,fy as ScaleServiceEndpoint,Db as StartJobBuildEndpoint,Xb as StartJobRunEndpoint,$g as StartServiceBuildEndpoint,sg as SuspendJobEndpoint,sv as UnassignSubdomainEndpoint,mv as UnassignSubdomainPathEndpoint,Tm as UncordonCloudClusterNodeEndpoint,fb as UpdateAddonNetworksettingsEndpoint,Ib as UpdateAddonSecurityEndpoint,Rb as UpdateAddonVersionEndpoint,Nb as UpdateJobBuildargumentsEndpoint,Bb as UpdateJobBuildoptionsEndpoint,Fb as UpdateJobBuildsourceEndpoint,Wb as UpdateJobDeploymentEndpoint,Hb as UpdateJobHealthchecksEndpoint,ng as UpdateJobRuntimeenvironmentEndpoint,og as UpdateJobSettingsEndpoint,jv as UpdateLogsinkEndpoint,Uv as UpdateNotificationEndpoint,dg as UpdatePreviewtemplateEndpoint,Tv as UpdateRegistrycredentialsEndpoint,vg as UpdateReleaseflowEndpoint,Cg as UpdateSecretEndpoint,Ug as UpdateSecretlinkEndpoint,Vg as UpdateServiceBuildargumentsEndpoint,Yg as UpdateServiceBuildoptionsEndpoint,Kg as UpdateServiceBuildsourceEndpoint,ny as UpdateServiceDeploymentEndpoint,iy as UpdateServiceHealthchecksEndpoint,ay as UpdateServicePortsEndpoint,hy as UpdateServiceRuntimeenvironmentEndpoint,pv as UpdateSubdomainPathEndpoint,ky as UpdateTemplateEndpoint,gy as UpdateVolumeEndpoint,bv as VerifyDomainEndpoint,vv as VerifySubdomainEndpoint};
|
|
1
|
+
import t,{EventEmitter as e}from"events";import{execSync as n,spawn as r}from"child_process";import*as u from"stream";import o,{Transform as i}from"stream";import s from"http";import a,{fileURLToPath as c}from"url";import d from"https";import*as l from"zlib";import h from"zlib";import p from"os";import*as f from"net";import m,{Socket as v}from"net";import E,{mkdir as A,stat as b,statSync as y,mkdirSync as g}from"fs";import C,{parse as F,dirname as w,resolve as D}from"path";import B from"tls";import I from"crypto";import R,{Buffer as j}from"buffer";import S from"dgram";import{EventEmitter as _}from"node:events";import U from"node:stream";import{StringDecoder as P}from"node:string_decoder";import O,{posix as k,basename as x,win32 as T,join as L}from"node:path";import N from"node:fs";import q from"assert";import M from"node:assert";import{randomBytes as G}from"node:crypto";var z=function(t,e){return z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},z(t,e)};function $(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}z(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var W=function(){return W=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var u in e=arguments[n])Object.prototype.hasOwnProperty.call(e,u)&&(t[u]=e[u]);return t},W.apply(this,arguments)};function J(t,e,n,r){return new(n||(n=Promise))(function(u,o){function i(t){try{a(r.next(t))}catch(t){o(t)}}function s(t){try{a(r.throw(t))}catch(t){o(t)}}function a(t){var e;t.done?u(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(i,s)}a((r=r.apply(t,e||[])).next())})}function V(t,e){var n,r,u,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(u=2&s[0]?r.return:s[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,s[1])).done)return u;switch(r=0,u&&(s=[2&s[0],u.value]),s[0]){case 0:case 1:u=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(u=o.trys,(u=u.length>0&&u[u.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!u||s[1]>u[0]&&s[1]<u[3])){o.label=s[1];break}if(6===s[0]&&o.label<u[1]){o.label=u[1],u=s;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(s);break}u[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=u=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function H(t,e,n){if(n||2===arguments.length)for(var r,u=0,o=e.length;u<o;u++)!r&&u in e||(r||(r=Array.prototype.slice.call(e,0,u)),r[u]=e[u]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var Z="object"==typeof global&&global&&global.Object===Object&&global,Y="object"==typeof self&&self&&self.Object===Object&&self,K=Z||Y||Function("return this")(),X=K.Symbol,Q=Object.prototype,tt=Q.hasOwnProperty,et=Q.toString,nt=X?X.toStringTag:void 0;var rt=Object.prototype.toString;var ut=X?X.toStringTag:void 0;function ot(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":ut&&ut in Object(t)?function(t){var e=tt.call(t,nt),n=t[nt];try{t[nt]=void 0;var r=!0}catch(t){}var u=et.call(t);return r&&(e?t[nt]=n:delete t[nt]),u}(t):function(t){return rt.call(t)}(t)}function it(t){return null!=t&&"object"==typeof t}function st(t){return"symbol"==typeof t||it(t)&&"[object Symbol]"==ot(t)}function at(t,e){for(var n=-1,r=null==t?0:t.length,u=Array(r);++n<r;)u[n]=e(t[n],n,t);return u}var ct=Array.isArray,dt=X?X.prototype:void 0,lt=dt?dt.toString:void 0;function ht(t){if("string"==typeof t)return t;if(ct(t))return at(t,ht)+"";if(st(t))return lt?lt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function pt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ft(t){return t}function mt(t){if(!pt(t))return!1;var e=ot(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var vt,Et=K["__core-js_shared__"],At=(vt=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||""))?"Symbol(src)_1."+vt:"";var bt=Function.prototype.toString;function yt(t){if(null!=t){try{return bt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var gt=/^\[object .+?Constructor\]$/,Ct=Function.prototype,Ft=Object.prototype,wt=Ct.toString,Dt=Ft.hasOwnProperty,Bt=RegExp("^"+wt.call(Dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function It(t){return!(!pt(t)||(e=t,At&&At in e))&&(mt(t)?Bt:gt).test(yt(t));var e}function Rt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return It(n)?n:void 0}var jt=Rt(K,"WeakMap"),St=Object.create,_t=function(){function t(){}return function(e){if(!pt(e))return{};if(St)return St(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var Ut=Date.now;var Pt,Ot,kt,xt=function(){try{var t=Rt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Tt=xt,Lt=Tt?function(t,e){return Tt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:ft,Nt=(Pt=Lt,Ot=0,kt=0,function(){var t=Ut(),e=16-(t-kt);if(kt=t,e>0){if(++Ot>=800)return arguments[0]}else Ot=0;return Pt.apply(void 0,arguments)}),qt=/^(?:0|[1-9]\d*)$/;function Mt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&qt.test(t))&&t>-1&&t%1==0&&t<e}function Gt(t,e,n){"__proto__"==e&&Tt?Tt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function zt(t,e){return t===e||t!=t&&e!=e}var $t=Object.prototype.hasOwnProperty;function Wt(t,e,n){var r=t[e];$t.call(t,e)&&zt(r,n)&&(void 0!==n||e in t)||Gt(t,e,n)}var Jt=Math.max;function Vt(t,e){return Nt(function(t,e,n){return e=Jt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,u=-1,o=Jt(r.length-e,0),i=Array(o);++u<o;)i[u]=r[e+u];u=-1;for(var s=Array(e+1);++u<e;)s[u]=r[u];return s[e]=n(i),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,s)}}(t,e,ft),t+"")}function Ht(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Zt(t){return null!=t&&Ht(t.length)&&!mt(t)}var Yt=Object.prototype;function Kt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Yt)}function Xt(t){return it(t)&&"[object Arguments]"==ot(t)}var Qt=Object.prototype,te=Qt.hasOwnProperty,ee=Qt.propertyIsEnumerable,ne=Xt(function(){return arguments}())?Xt:function(t){return it(t)&&te.call(t,"callee")&&!ee.call(t,"callee")};var re="object"==typeof exports&&exports&&!exports.nodeType&&exports,ue=re&&"object"==typeof module&&module&&!module.nodeType&&module,oe=ue&&ue.exports===re?K.Buffer:void 0,ie=(oe?oe.isBuffer:void 0)||function(){return!1},se={};se["[object Float32Array]"]=se["[object Float64Array]"]=se["[object Int8Array]"]=se["[object Int16Array]"]=se["[object Int32Array]"]=se["[object Uint8Array]"]=se["[object Uint8ClampedArray]"]=se["[object Uint16Array]"]=se["[object Uint32Array]"]=!0,se["[object Arguments]"]=se["[object Array]"]=se["[object ArrayBuffer]"]=se["[object Boolean]"]=se["[object DataView]"]=se["[object Date]"]=se["[object Error]"]=se["[object Function]"]=se["[object Map]"]=se["[object Number]"]=se["[object Object]"]=se["[object RegExp]"]=se["[object Set]"]=se["[object String]"]=se["[object WeakMap]"]=!1;var ae="object"==typeof exports&&exports&&!exports.nodeType&&exports,ce=ae&&"object"==typeof module&&module&&!module.nodeType&&module,de=ce&&ce.exports===ae&&Z.process,le=function(){try{var t=ce&&ce.require&&ce.require("util").types;return t||de&&de.binding&&de.binding("util")}catch(t){}}(),he=le&&le.isTypedArray,pe=he?function(t){return function(e){return t(e)}}(he):function(t){return it(t)&&Ht(t.length)&&!!se[ot(t)]},fe=pe,me=Object.prototype.hasOwnProperty;function ve(t,e){var n=ct(t),r=!n&&ne(t),u=!n&&!r&&ie(t),o=!n&&!r&&!u&&fe(t),i=n||r||u||o,s=i?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],a=s.length;for(var c in t)!e&&!me.call(t,c)||i&&("length"==c||u&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Mt(c,a))||s.push(c);return s}function Ee(t,e){return function(n){return t(e(n))}}var Ae=Ee(Object.keys,Object),be=Object.prototype.hasOwnProperty;function ye(t){return Zt(t)?ve(t):function(t){if(!Kt(t))return Ae(t);var e=[];for(var n in Object(t))be.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var ge=Object.prototype.hasOwnProperty;function Ce(t){if(!pt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Kt(t),n=[];for(var r in t)("constructor"!=r||!e&&ge.call(t,r))&&n.push(r);return n}function Fe(t){return Zt(t)?ve(t,!0):Ce(t)}var we=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,De=/^\w*$/;function Be(t,e){if(ct(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!st(t))||(De.test(t)||!we.test(t)||null!=e&&t in Object(e))}var Ie=Rt(Object,"create");var Re=Object.prototype.hasOwnProperty;var je=Object.prototype.hasOwnProperty;function Se(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _e(t,e){for(var n=t.length;n--;)if(zt(t[n][0],e))return n;return-1}Se.prototype.clear=function(){this.__data__=Ie?Ie(null):{},this.size=0},Se.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Se.prototype.get=function(t){var e=this.__data__;if(Ie){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Re.call(e,t)?e[t]:void 0},Se.prototype.has=function(t){var e=this.__data__;return Ie?void 0!==e[t]:je.call(e,t)},Se.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ie&&void 0===e?"__lodash_hash_undefined__":e,this};var Ue=Array.prototype.splice;function Pe(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Pe.prototype.clear=function(){this.__data__=[],this.size=0},Pe.prototype.delete=function(t){var e=this.__data__,n=_e(e,t);return!(n<0)&&(n==e.length-1?e.pop():Ue.call(e,n,1),--this.size,!0)},Pe.prototype.get=function(t){var e=this.__data__,n=_e(e,t);return n<0?void 0:e[n][1]},Pe.prototype.has=function(t){return _e(this.__data__,t)>-1},Pe.prototype.set=function(t,e){var n=this.__data__,r=_e(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Oe=Rt(K,"Map");function ke(t,e){var n,r,u=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?u["string"==typeof e?"string":"hash"]:u.map}function xe(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}xe.prototype.clear=function(){this.size=0,this.__data__={hash:new Se,map:new(Oe||Pe),string:new Se}},xe.prototype.delete=function(t){var e=ke(this,t).delete(t);return this.size-=e?1:0,e},xe.prototype.get=function(t){return ke(this,t).get(t)},xe.prototype.has=function(t){return ke(this,t).has(t)},xe.prototype.set=function(t,e){var n=ke(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Te(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,u=e?e.apply(this,r):r[0],o=n.cache;if(o.has(u))return o.get(u);var i=t.apply(this,r);return n.cache=o.set(u,i)||o,i};return n.cache=new(Te.Cache||xe),n}Te.Cache=xe;var Le=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/\\(\\)?/g,qe=function(t){var e=Te(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Le,function(t,n,r,u){e.push(r?u.replace(Ne,"$1"):n||t)}),e}),Me=qe;function Ge(t){return null==t?"":ht(t)}function ze(t,e){return ct(t)?t:Be(t,e)?[t]:Me(Ge(t))}function $e(t){if("string"==typeof t||st(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function We(t,e){for(var n=0,r=(e=ze(e,t)).length;null!=t&&n<r;)t=t[$e(e[n++])];return n&&n==r?t:void 0}function Je(t,e){for(var n=-1,r=e.length,u=t.length;++n<r;)t[u+n]=e[n];return t}var Ve=X?X.isConcatSpreadable:void 0;function He(t){return ct(t)||ne(t)||!!(Ve&&t&&t[Ve])}function Ze(t,e,n,r,u){var o=-1,i=t.length;for(n||(n=He),u||(u=[]);++o<i;){var s=t[o];e>0&&n(s)?e>1?Ze(s,e-1,n,r,u):Je(u,s):r||(u[u.length]=s)}return u}var Ye=Ee(Object.getPrototypeOf,Object),Ke=Function.prototype,Xe=Object.prototype,Qe=Ke.toString,tn=Xe.hasOwnProperty,en=Qe.call(Object);function nn(t){var e=this.__data__=new Pe(t);this.size=e.size}nn.prototype.clear=function(){this.__data__=new Pe,this.size=0},nn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},nn.prototype.get=function(t){return this.__data__.get(t)},nn.prototype.has=function(t){return this.__data__.has(t)},nn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Pe){var r=n.__data__;if(!Oe||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xe(r)}return n.set(t,e),this.size=n.size,this};var rn="object"==typeof exports&&exports&&!exports.nodeType&&exports,un=rn&&"object"==typeof module&&module&&!module.nodeType&&module,on=un&&un.exports===rn?K.Buffer:void 0,sn=on?on.allocUnsafe:void 0;var an=Object.prototype.propertyIsEnumerable,cn=Object.getOwnPropertySymbols,dn=cn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,u=0,o=[];++n<r;){var i=t[n];e(i,n,t)&&(o[u++]=i)}return o}(cn(t),function(e){return an.call(t,e)}))}:function(){return[]};function ln(t){return function(t,e,n){var r=e(t);return ct(t)?r:Je(r,n(t))}(t,ye,dn)}var hn=Rt(K,"DataView"),pn=Rt(K,"Promise"),fn=Rt(K,"Set"),mn="[object Map]",vn="[object Promise]",En="[object Set]",An="[object WeakMap]",bn="[object DataView]",yn=yt(hn),gn=yt(Oe),Cn=yt(pn),Fn=yt(fn),wn=yt(jt),Dn=ot;(hn&&Dn(new hn(new ArrayBuffer(1)))!=bn||Oe&&Dn(new Oe)!=mn||pn&&Dn(pn.resolve())!=vn||fn&&Dn(new fn)!=En||jt&&Dn(new jt)!=An)&&(Dn=function(t){var e=ot(t),n="[object Object]"==e?t.constructor:void 0,r=n?yt(n):"";if(r)switch(r){case yn:return bn;case gn:return mn;case Cn:return vn;case Fn:return En;case wn:return An}return e});var Bn=Dn,In=K.Uint8Array;function Rn(t,e){var n,r,u=e?(n=t.buffer,r=new n.constructor(n.byteLength),new In(r).set(new In(n)),r):t.buffer;return new t.constructor(u,t.byteOffset,t.length)}function jn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xe;++e<n;)this.add(t[e])}function Sn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}jn.prototype.add=jn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},jn.prototype.has=function(t){return this.__data__.has(t)};function _n(t,e,n,r,u,o){var i=1&n,s=t.length,a=e.length;if(s!=a&&!(i&&a>s))return!1;var c=o.get(t),d=o.get(e);if(c&&d)return c==e&&d==t;var l=-1,h=!0,p=2&n?new jn:void 0;for(o.set(t,e),o.set(e,t);++l<s;){var f=t[l],m=e[l];if(r)var v=i?r(m,f,l,e,t,o):r(f,m,l,t,e,o);if(void 0!==v){if(v)continue;h=!1;break}if(p){if(!Sn(e,function(t,e){if(i=e,!p.has(i)&&(f===t||u(f,t,n,r,o)))return p.push(e);var i})){h=!1;break}}else if(f!==m&&!u(f,m,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function Un(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}var On=X?X.prototype:void 0,kn=On?On.valueOf:void 0;var xn=Object.prototype.hasOwnProperty;var Tn="[object Arguments]",Ln="[object Array]",Nn="[object Object]",qn=Object.prototype.hasOwnProperty;function Mn(t,e,n,r,u,o){var i=ct(t),s=ct(e),a=i?Ln:Bn(t),c=s?Ln:Bn(e),d=(a=a==Tn?Nn:a)==Nn,l=(c=c==Tn?Nn:c)==Nn,h=a==c;if(h&&ie(t)){if(!ie(e))return!1;i=!0,d=!1}if(h&&!d)return o||(o=new nn),i||fe(t)?_n(t,e,n,r,u,o):function(t,e,n,r,u,o,i){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new In(t),new In(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return zt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=Un;case"[object Set]":var a=1&r;if(s||(s=Pn),t.size!=e.size&&!a)return!1;var c=i.get(t);if(c)return c==e;r|=2,i.set(t,e);var d=_n(s(t),s(e),r,u,o,i);return i.delete(t),d;case"[object Symbol]":if(kn)return kn.call(t)==kn.call(e)}return!1}(t,e,a,n,r,u,o);if(!(1&n)){var p=d&&qn.call(t,"__wrapped__"),f=l&&qn.call(e,"__wrapped__");if(p||f){var m=p?t.value():t,v=f?e.value():e;return o||(o=new nn),u(m,v,n,r,o)}}return!!h&&(o||(o=new nn),function(t,e,n,r,u,o){var i=1&n,s=ln(t),a=s.length;if(a!=ln(e).length&&!i)return!1;for(var c=a;c--;){var d=s[c];if(!(i?d in e:xn.call(e,d)))return!1}var l=o.get(t),h=o.get(e);if(l&&h)return l==e&&h==t;var p=!0;o.set(t,e),o.set(e,t);for(var f=i;++c<a;){var m=t[d=s[c]],v=e[d];if(r)var E=i?r(v,m,d,e,t,o):r(m,v,d,t,e,o);if(!(void 0===E?m===v||u(m,v,n,r,o):E)){p=!1;break}f||(f="constructor"==d)}if(p&&!f){var A=t.constructor,b=e.constructor;A==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof A&&A instanceof A&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,u,o))}function Gn(t,e,n,r,u){return t===e||(null==t||null==e||!it(t)&&!it(e)?t!=t&&e!=e:Mn(t,e,n,r,Gn,u))}function zn(t){return t==t&&!pt(t)}function $n(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Wn(t){var e=function(t){for(var e=ye(t),n=e.length;n--;){var r=e[n],u=t[r];e[n]=[r,u,zn(u)]}return e}(t);return 1==e.length&&e[0][2]?$n(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var u=n.length,o=u,i=!r;if(null==t)return!o;for(t=Object(t);u--;){var s=n[u];if(i&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++u<o;){var a=(s=n[u])[0],c=t[a],d=s[1];if(i&&s[2]){if(void 0===c&&!(a in t))return!1}else{var l=new nn;if(r)var h=r(c,d,a,t,e,l);if(!(void 0===h?Gn(d,c,3,r,l):h))return!1}}return!0}(n,t,e)}}function Jn(t,e){return null!=t&&e in Object(t)}function Vn(t,e){return null!=t&&function(t,e,n){for(var r=-1,u=(e=ze(e,t)).length,o=!1;++r<u;){var i=$e(e[r]);if(!(o=null!=t&&n(t,i)))break;t=t[i]}return o||++r!=u?o:!!(u=null==t?0:t.length)&&Ht(u)&&Mt(i,u)&&(ct(t)||ne(t))}(t,e,Jn)}function Hn(t,e){return Be(t)&&zn(e)?$n($e(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:We(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Vn(n,t):Gn(e,r,3)}}function Zn(t){return Be(t)?(e=$e(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return We(e,t)}}(t);var e}function Yn(t){return"function"==typeof t?t:null==t?ft:"object"==typeof t?ct(t)?Hn(t[0],t[1]):Wn(t):Zn(t)}var Kn,Xn=function(t,e,n){for(var r=-1,u=Object(t),o=n(t),i=o.length;i--;){var s=o[Kn?i:++r];if(!1===e(u[s],s,u))break}return t};var Qn=function(t,e){return function(n,r){if(null==n)return n;if(!Zt(n))return t(n,r);for(var u=n.length,o=e?u:-1,i=Object(n);(e?o--:++o<u)&&!1!==r(i[o],o,i););return n}}(function(t,e){return t&&Xn(t,e,ye)}),tr=Qn;function er(t,e,n){(void 0!==n&&!zt(t[e],n)||void 0===n&&!(e in t))&&Gt(t,e,n)}function nr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function rr(t){return function(t,e,n,r){var u=!n;n||(n={});for(var o=-1,i=e.length;++o<i;){var s=e[o],a=r?r(n[s],t[s],s,n,t):void 0;void 0===a&&(a=t[s]),u?Gt(n,s,a):Wt(n,s,a)}return n}(t,Fe(t))}function ur(t,e,n,r,u,o,i){var s=nr(t,n),a=nr(e,n),c=i.get(a);if(c)er(t,n,c);else{var d,l=o?o(s,a,n+"",t,e,i):void 0,h=void 0===l;if(h){var p=ct(a),f=!p&&ie(a),m=!p&&!f&&fe(a);l=a,p||f||m?ct(s)?l=s:it(d=s)&&Zt(d)?l=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}(s):f?(h=!1,l=function(t,e){if(e)return t.slice();var n=t.length,r=sn?sn(n):new t.constructor(n);return t.copy(r),r}(a,!0)):m?(h=!1,l=Rn(a,!0)):l=[]:function(t){if(!it(t)||"[object Object]"!=ot(t))return!1;var e=Ye(t);if(null===e)return!0;var n=tn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Qe.call(n)==en}(a)||ne(a)?(l=s,ne(s)?l=rr(s):pt(s)&&!mt(s)||(l=function(t){return"function"!=typeof t.constructor||Kt(t)?{}:_t(Ye(t))}(a))):h=!1}h&&(i.set(a,l),u(l,a,r,o,i),i.delete(a)),er(t,n,l)}}function or(t,e,n,r,u){t!==e&&Xn(e,function(o,i){if(u||(u=new nn),pt(o))ur(t,e,i,n,or,r,u);else{var s=r?r(nr(t,i),o,i+"",t,e,u):void 0;void 0===s&&(s=o),er(t,i,s)}},Fe)}var ir=/[\\^$.*+?()[\]{}|]/g,sr=RegExp(ir.source);function ar(t,e){var n=-1,r=Zt(t)?Array(t.length):[];return tr(t,function(t,u,o){r[++n]=e(t,u,o)}),r}function cr(t,e){return Ze(function(t,e){return(ct(t)?at:ar)(t,Yn(e))}(t,e),1)}var dr=1/0;function lr(t,e){return t>e}function hr(t){return"string"==typeof t||!ct(t)&&it(t)&&"[object String]"==ot(t)}function pr(t,e){return t&&t.length?function(t,e,n){for(var r=-1,u=t.length;++r<u;){var o=t[r],i=e(o);if(null!=i&&(void 0===s?i==i&&!st(i):n(i,s)))var s=i,a=o}return a}(t,Yn(e),lr):void 0}var fr,mr=(fr=function(t,e,n){or(t,e,n)},Vt(function(t,e){var n=-1,r=e.length,u=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(u=fr.length>3&&"function"==typeof u?(r--,u):void 0,o&&function(t,e,n){if(!pt(n))return!1;var r=typeof e;return!!("number"==r?Zt(n)&&Mt(e,n.length):"string"==r&&e in n)&&zt(n[e],t)}(e[0],e[1],o)&&(u=r<3?void 0:u,r=1),t=Object(t);++n<r;){var i=e[n];i&&fr(t,i,n,u)}return t})),vr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Er(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Ar(t,e){return t(e={exports:{}},e.exports),e.exports}var br=Ar(function(t,e){function n(t,e,n){return n.globals&&(t=n.globals[t.name]),new t(`${n.context?n.context:"Value"} ${e}.`)}function r(t,e){if("bigint"==typeof t)throw n(TypeError,"is a BigInt which cannot be converted to a number",e);return e.globals?e.globals.Number(t):Number(t)}function u(t){return s(t>0&&t%1==.5&&!(1&t)||t<0&&t%1==-.5&&!(1&~t)?Math.floor(t):Math.round(t))}function o(t){return s(Math.trunc(t))}function i(t){return t<0?-1:1}function s(t){return 0===t?0:t}function a(t,{unsigned:e}){let a,c;e?(a=0,c=2**t-1):(a=-(2**(t-1)),c=2**(t-1)-1);const d=2**t,l=2**(t-1);return(t,h={})=>{let p=r(t,h);if(p=s(p),h.enforceRange){if(!Number.isFinite(p))throw n(TypeError,"is not a finite number",h);if(p=o(p),p<a||p>c)throw n(TypeError,`is outside the accepted range of ${a} to ${c}, inclusive`,h);return p}return!Number.isNaN(p)&&h.clamp?(p=Math.min(Math.max(p,a),c),p=u(p),p):Number.isFinite(p)&&0!==p?(p=o(p),p>=a&&p<=c?p:(p=function(t,e){const n=t%e;return i(e)!==i(n)?n+e:n}(p,d),!e&&p>=l?p-d:p)):0}}function c(t,{unsigned:e}){const i=Number.MAX_SAFE_INTEGER,a=e?0:Number.MIN_SAFE_INTEGER,c=e?BigInt.asUintN:BigInt.asIntN;return(e,d={})=>{let l=r(e,d);if(l=s(l),d.enforceRange){if(!Number.isFinite(l))throw n(TypeError,"is not a finite number",d);if(l=o(l),l<a||l>i)throw n(TypeError,`is outside the accepted range of ${a} to ${i}, inclusive`,d);return l}if(!Number.isNaN(l)&&d.clamp)return l=Math.min(Math.max(l,a),i),l=u(l),l;if(!Number.isFinite(l)||0===l)return 0;let h=BigInt(o(l));return h=c(t,h),Number(h)}}e.any=t=>t,e.undefined=()=>{},e.boolean=t=>Boolean(t),e.byte=a(8,{unsigned:!1}),e.octet=a(8,{unsigned:!0}),e.short=a(16,{unsigned:!1}),e["unsigned short"]=a(16,{unsigned:!0}),e.long=a(32,{unsigned:!1}),e["unsigned long"]=a(32,{unsigned:!0}),e["long long"]=c(64,{unsigned:!1}),e["unsigned long long"]=c(64,{unsigned:!0}),e.double=(t,e={})=>{const u=r(t,e);if(!Number.isFinite(u))throw n(TypeError,"is not a finite floating-point value",e);return u},e["unrestricted double"]=(t,e={})=>r(t,e),e.float=(t,e={})=>{const u=r(t,e);if(!Number.isFinite(u))throw n(TypeError,"is not a finite floating-point value",e);if(Object.is(u,-0))return u;const o=Math.fround(u);if(!Number.isFinite(o))throw n(TypeError,"is outside the range of a single-precision floating-point value",e);return o},e["unrestricted float"]=(t,e={})=>{const n=r(t,e);return isNaN(n)||Object.is(n,-0)?n:Math.fround(n)},e.DOMString=(t,e={})=>{if(e.treatNullAsEmptyString&&null===t)return"";if("symbol"==typeof t)throw n(TypeError,"is a symbol, which cannot be converted to a string",e);return(e.globals?e.globals.String:String)(t)},e.ByteString=(t,r={})=>{const u=e.DOMString(t,r);let o;for(let t=0;void 0!==(o=u.codePointAt(t));++t)if(o>255)throw n(TypeError,"is not a valid ByteString",r);return u},e.USVString=(t,n={})=>{const r=e.DOMString(t,n),u=r.length,o=[];for(let t=0;t<u;++t){const e=r.charCodeAt(t);if(e<55296||e>57343)o.push(String.fromCodePoint(e));else if(56320<=e&&e<=57343)o.push(String.fromCodePoint(65533));else if(t===u-1)o.push(String.fromCodePoint(65533));else{const n=r.charCodeAt(t+1);if(56320<=n&&n<=57343){const r=1023&e,u=1023&n;o.push(String.fromCodePoint(65536+1024*r+u)),++t}else o.push(String.fromCodePoint(65533))}}return o.join("")},e.object=(t,e={})=>{if(null===t||"object"!=typeof t&&"function"!=typeof t)throw n(TypeError,"is not an object",e);return t};const d=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,l="function"==typeof SharedArrayBuffer?Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,"byteLength").get:null;function h(t){try{return d.call(t),!0}catch{return!1}}function p(t){try{return l.call(t),!0}catch{return!1}}function f(t){try{return new Uint8Array(t),!1}catch{return!0}}e.ArrayBuffer=(t,e={})=>{if(!h(t)){if(e.allowShared&&!p(t))throw n(TypeError,"is not an ArrayBuffer or SharedArrayBuffer",e);throw n(TypeError,"is not an ArrayBuffer",e)}if(f(t))throw n(TypeError,"is a detached ArrayBuffer",e);return t};const m=Object.getOwnPropertyDescriptor(DataView.prototype,"byteLength").get;e.DataView=(t,e={})=>{try{m.call(t)}catch(t){throw n(TypeError,"is not a DataView",e)}if(!e.allowShared&&p(t.buffer))throw n(TypeError,"is backed by a SharedArrayBuffer, which is not allowed",e);if(f(t.buffer))throw n(TypeError,"is backed by a detached ArrayBuffer",e);return t};const v=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array).prototype,Symbol.toStringTag).get;[Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Uint8ClampedArray,Float32Array,Float64Array].forEach(t=>{const{name:r}=t,u=/^[AEIOU]/u.test(r)?"an":"a";e[r]=(t,e={})=>{if(!ArrayBuffer.isView(t)||v.call(t)!==r)throw n(TypeError,`is not ${u} ${r} object`,e);if(!e.allowShared&&p(t.buffer))throw n(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",e);if(f(t.buffer))throw n(TypeError,"is a view on a detached ArrayBuffer",e);return t}}),e.ArrayBufferView=(t,e={})=>{if(!ArrayBuffer.isView(t))throw n(TypeError,"is not a view on an ArrayBuffer or SharedArrayBuffer",e);if(!e.allowShared&&p(t.buffer))throw n(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",e);if(f(t.buffer))throw n(TypeError,"is a view on a detached ArrayBuffer",e);return t},e.BufferSource=(t,e={})=>{if(ArrayBuffer.isView(t)){if(!e.allowShared&&p(t.buffer))throw n(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",e);if(f(t.buffer))throw n(TypeError,"is a view on a detached ArrayBuffer",e);return t}if(!e.allowShared&&!h(t))throw n(TypeError,"is not an ArrayBuffer or a view on one",e);if(e.allowShared&&!p(t)&&!h(t))throw n(TypeError,"is not an ArrayBuffer, SharedArrayBuffer, or a view on one",e);if(f(t))throw n(TypeError,"is a detached ArrayBuffer",e);return t},e.DOMTimeStamp=e["unsigned long long"]});br.any,br.undefined,br.octet,br.DOMString,br.ByteString,br.USVString,br.object,br.ArrayBuffer,br.DataView,br.ArrayBufferView,br.BufferSource,br.DOMTimeStamp;var yr=Ar(function(t,e){const n=Function.prototype.call.bind(Object.prototype.hasOwnProperty);const r=Symbol("wrapper"),u=Symbol("impl"),o=Symbol("SameObject caches"),i=Symbol.for("[webidl2js] constructor registry"),s=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);function a(t){if(n(t,i))return t[i];const e=Object.create(null);e["%Object.prototype%"]=t.Object.prototype,e["%IteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf((new t.Array)[Symbol.iterator]()));try{e["%AsyncIteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(t.eval("(async function* () {})").prototype))}catch{e["%AsyncIteratorPrototype%"]=s}return t[i]=e,e}function c(t){return t?t[r]:null}function d(t){return t?t[u]:null}const l=Symbol("internal");const h=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get;const p=Symbol("supports property index"),f=Symbol("supported property indices"),m=Symbol("supports property name"),v=Symbol("supported property names"),E=Symbol("indexed property get"),A=Symbol("indexed property set new"),b=Symbol("indexed property set existing"),y=Symbol("named property get"),g=Symbol("named property set new"),C=Symbol("named property set existing"),F=Symbol("named property delete"),w=Symbol("async iterator get the next iteration result"),D=Symbol("async iterator return steps"),B=Symbol("async iterator initialization steps"),I=Symbol("async iterator end of iteration");t.exports={isObject:function(t){return"object"==typeof t&&null!==t||"function"==typeof t},hasOwn:n,define:function(t,e){for(const n of Reflect.ownKeys(e)){const r=Reflect.getOwnPropertyDescriptor(e,n);if(r&&!Reflect.defineProperty(t,n,r))throw new TypeError(`Cannot redefine property: ${String(n)}`)}},newObjectInRealm:function(t,e){const n=a(t);return Object.defineProperties(Object.create(n["%Object.prototype%"]),Object.getOwnPropertyDescriptors(e))},wrapperSymbol:r,implSymbol:u,getSameObject:function(t,e,n){return t[o]||(t[o]=Object.create(null)),e in t[o]||(t[o][e]=n()),t[o][e]},ctorRegistrySymbol:i,initCtorRegistry:a,wrapperForImpl:c,implForWrapper:d,tryWrapperForImpl:function(t){const e=c(t);return e||t},tryImplForWrapper:function(t){const e=d(t);return e||t},iterInternalSymbol:l,isArrayBuffer:function(t){try{return h.call(t),!0}catch(t){return!1}},isArrayIndexPropName:function(t){if("string"!=typeof t)return!1;const e=t>>>0;return e!==2**32-1&&t===`${e}`},supportsPropertyIndex:p,supportedPropertyIndices:f,supportsPropertyName:m,supportedPropertyNames:v,indexedGet:E,indexedSetNew:A,indexedSetExisting:b,namedGet:y,namedSetNew:g,namedSetExisting:C,namedDelete:F,asyncIteratorNext:w,asyncIteratorReturn:D,asyncIteratorInit:B,asyncIteratorEOI:I,iteratorResult:function([t,e],n){let r;switch(n){case"key":r=t;break;case"value":r=e;break;case"key+value":r=[t,e]}return{value:r,done:!1}}}});const gr=2147483647,Cr=36,Fr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},wr=Math.floor,Dr=String.fromCharCode;function Br(t){throw new RangeError(Fr[t])}function Ir(t){const e=[];let n=0;const r=t.length;for(;n<r;){const u=t.charCodeAt(n++);if(u>=55296&&u<=56319&&n<r){const r=t.charCodeAt(n++);56320==(64512&r)?e.push(((1023&u)<<10)+(1023&r)+65536):(e.push(u),n--)}else e.push(u)}return e}const Rr=function(t){return t>=48&&t<58?t-48+26:t>=65&&t<91?t-65:t>=97&&t<123?t-97:Cr},jr=function(t,e){return t+22+75*(t<26)-((0!=e)<<5)},Sr=function(t,e,n){let r=0;for(t=n?wr(t/700):t>>1,t+=wr(t/e);t>455;r+=Cr)t=wr(t/35);return wr(r+36*t/(t+38))},_r=function(t){const e=[],n=t.length;let r=0,u=128,o=72,i=t.lastIndexOf("-");i<0&&(i=0);for(let n=0;n<i;++n)t.charCodeAt(n)>=128&&Br("not-basic"),e.push(t.charCodeAt(n));for(let s=i>0?i+1:0;s<n;){const i=r;for(let e=1,u=Cr;;u+=Cr){s>=n&&Br("invalid-input");const i=Rr(t.charCodeAt(s++));i>=Cr&&Br("invalid-input"),i>wr((gr-r)/e)&&Br("overflow"),r+=i*e;const a=u<=o?1:u>=o+26?26:u-o;if(i<a)break;const c=Cr-a;e>wr(gr/c)&&Br("overflow"),e*=c}const a=e.length+1;o=Sr(r-i,a,0==i),wr(r/a)>gr-u&&Br("overflow"),u+=wr(r/a),r%=a,e.splice(r++,0,u)}return String.fromCodePoint(...e)},Ur=function(t){const e=[],n=(t=Ir(t)).length;let r=128,u=0,o=72;for(const n of t)n<128&&e.push(Dr(n));const i=e.length;let s=i;for(i&&e.push("-");s<n;){let n=gr;for(const e of t)e>=r&&e<n&&(n=e);const a=s+1;n-r>wr((gr-u)/a)&&Br("overflow"),u+=(n-r)*a,r=n;for(const n of t)if(n<r&&++u>gr&&Br("overflow"),n===r){let t=u;for(let n=Cr;;n+=Cr){const r=n<=o?1:n>=o+26?26:n-o;if(t<r)break;const u=t-r,i=Cr-r;e.push(Dr(jr(r+u%i,0))),t=wr(u/i)}e.push(Dr(jr(t,0))),o=Sr(u,a,s===i),u=0,++s}++u,++r}return e.join("")},Pr=_r,Or=Ur;var kr,xr={combiningMarks:/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11000}-\u{11002}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11082}\u{110B0}-\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{11134}\u{11145}\u{11146}\u{11173}\u{11180}-\u{11182}\u{111B3}-\u{111C0}\u{111C9}-\u{111CC}\u{111CE}\u{111CF}\u{1122C}-\u{11237}\u{1123E}\u{11241}\u{112DF}-\u{112EA}\u{11300}-\u{11303}\u{1133B}\u{1133C}\u{1133E}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11357}\u{11362}\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113B8}-\u{113C0}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}-\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11435}-\u{11446}\u{1145E}\u{114B0}-\u{114C3}\u{115AF}-\u{115B5}\u{115B8}-\u{115C0}\u{115DC}\u{115DD}\u{11630}-\u{11640}\u{116AB}-\u{116B7}\u{1171D}-\u{1172B}\u{1182C}-\u{1183A}\u{11930}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{1193E}\u{11940}\u{11942}\u{11943}\u{119D1}-\u{119D7}\u{119DA}-\u{119E0}\u{119E4}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A39}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A5B}\u{11A8A}-\u{11A99}\u{11C2F}-\u{11C36}\u{11C38}-\u{11C3F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D8A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D97}\u{11EF3}-\u{11EF6}\u{11F00}\u{11F01}\u{11F03}\u{11F34}-\u{11F3A}\u{11F3E}-\u{11F42}\u{11F5A}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F51}-\u{16F87}\u{16F8F}-\u{16F92}\u{16FE4}\u{16FF0}\u{16FF1}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D165}-\u{1D169}\u{1D16D}-\u{1D172}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]/u,combiningClassVirama:/[\u094D\u09CD\u0A4D\u0ACD\u0B4D\u0BCD\u0C4D\u0CCD\u0D3B\u0D3C\u0D4D\u0DCA\u0E3A\u0EBA\u0F84\u1039\u103A\u1714\u1715\u1734\u17D2\u1A60\u1B44\u1BAA\u1BAB\u1BF2\u1BF3\u2D7F\uA806\uA82C\uA8C4\uA953\uA9C0\uAAF6\uABED\u{10A3F}\u{11046}\u{11070}\u{1107F}\u{110B9}\u{11133}\u{11134}\u{111C0}\u{11235}\u{112EA}\u{1134D}\u{113CE}-\u{113D0}\u{11442}\u{114C2}\u{115BF}\u{1163F}\u{116B6}\u{1172B}\u{11839}\u{1193D}\u{1193E}\u{119E0}\u{11A34}\u{11A47}\u{11A99}\u{11C3F}\u{11D44}\u{11D45}\u{11D97}\u{11F41}\u{11F42}\u{1612F}]/u,validZWNJ:/[\u0620\u0626\u0628\u062A-\u062E\u0633-\u063F\u0641-\u0647\u0649\u064A\u066E\u066F\u0678-\u0687\u069A-\u06BF\u06C1\u06C2\u06CC\u06CE\u06D0\u06D1\u06FA-\u06FC\u06FF\u0712-\u0714\u071A-\u071D\u071F-\u0727\u0729\u072B\u072D\u072E\u074E-\u0758\u075C-\u076A\u076D-\u0770\u0772\u0775-\u0777\u077A-\u077F\u07CA-\u07EA\u0841-\u0845\u0848\u084A-\u0853\u0855\u0860\u0862-\u0865\u0868\u0886\u0889-\u088D\u08A0-\u08A9\u08AF\u08B0\u08B3-\u08B8\u08BA-\u08C8\u1807\u1820-\u1878\u1887-\u18A8\u18AA\uA840-\uA872\u{10AC0}-\u{10AC4}\u{10ACD}\u{10AD3}-\u{10ADC}\u{10ADE}-\u{10AE0}\u{10AEB}-\u{10AEE}\u{10B80}\u{10B82}\u{10B86}-\u{10B88}\u{10B8A}\u{10B8B}\u{10B8D}\u{10B90}\u{10BAD}\u{10BAE}\u{10D00}-\u{10D21}\u{10D23}\u{10EC3}\u{10EC4}\u{10F30}-\u{10F32}\u{10F34}-\u{10F44}\u{10F51}-\u{10F53}\u{10F70}-\u{10F73}\u{10F76}-\u{10F81}\u{10FB0}\u{10FB2}\u{10FB3}\u{10FB8}\u{10FBB}\u{10FBC}\u{10FBE}\u{10FBF}\u{10FC1}\u{10FC4}\u{10FCA}\u{10FCB}\u{1E900}-\u{1E943}][\xAD\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u061C\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFEFF\uFFF9-\uFFFB\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C3F}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13430}-\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94B}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*\u200C[\xAD\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u061C\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFEFF\uFFF9-\uFFFB\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C3F}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13430}-\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94B}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*[\u0620\u0622-\u063F\u0641-\u064A\u066E\u066F\u0671-\u0673\u0675-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u077F\u07CA-\u07EA\u0840-\u0858\u0860\u0862-\u0865\u0867-\u086A\u0870-\u0882\u0886\u0889-\u088E\u08A0-\u08AC\u08AE-\u08C8\u1807\u1820-\u1878\u1887-\u18A8\u18AA\uA840-\uA871\u{10AC0}-\u{10AC5}\u{10AC7}\u{10AC9}\u{10ACA}\u{10ACE}-\u{10AD6}\u{10AD8}-\u{10AE1}\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B80}-\u{10B91}\u{10BA9}-\u{10BAE}\u{10D01}-\u{10D23}\u{10EC2}-\u{10EC4}\u{10F30}-\u{10F44}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}\u{10FB2}-\u{10FB6}\u{10FB8}-\u{10FBF}\u{10FC1}-\u{10FC4}\u{10FC9}\u{10FCA}\u{1E900}-\u{1E943}]/u,bidiDomain:/[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0605\u0608\u060B\u060D\u061B-\u064A\u0660-\u0669\u066B-\u066F\u0671-\u06D5\u06DD\u06E5\u06E6\u06EE\u06EF\u06FA-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u08A0-\u08C9\u08E2\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}]/u,bidiS1LTR:/[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u0589\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u09FC\u09FD\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A76\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C77\u0C7F\u0C80\u0C82-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D02-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D4F\u0D54-\u0D61\u0D66-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u1711\u1715\u171F-\u1731\u1734-\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4C\u1B4E-\u1B6A\u1B74-\u1B7F\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u249C-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31BF\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB69\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1013F}\u{1018D}\u{1018E}\u{101D0}-\u{101FC}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{11000}\u{11002}-\u{11037}\u{11047}-\u{1104D}\u{11066}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11082}-\u{110B2}\u{110B7}\u{110B8}\u{110BB}-\u{110C1}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{1112C}\u{11136}-\u{11147}\u{11150}-\u{11172}\u{11174}-\u{11176}\u{11182}-\u{111B5}\u{111BF}-\u{111C8}\u{111CD}\u{111CE}\u{111D0}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122E}\u{11232}\u{11233}\u{11235}\u{11238}-\u{1123D}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112DE}\u{112E0}-\u{112E2}\u{112F0}-\u{112F9}\u{11302}\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}-\u{1133F}\u{11341}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113BA}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}\u{113CD}\u{113CF}\u{113D1}\u{113D3}-\u{113D5}\u{113D7}\u{113D8}\u{11400}-\u{11437}\u{11440}\u{11441}\u{11445}\u{11447}-\u{1145B}\u{1145D}\u{1145F}-\u{11461}\u{11480}-\u{114B2}\u{114B9}\u{114BB}-\u{114BE}\u{114C1}\u{114C4}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B1}\u{115B8}-\u{115BB}\u{115BE}\u{115C1}-\u{115DB}\u{11600}-\u{11632}\u{1163B}\u{1163C}\u{1163E}\u{11641}-\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116AC}\u{116AE}\u{116AF}\u{116B6}\u{116B8}\u{116B9}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171E}\u{11720}\u{11721}\u{11726}\u{11730}-\u{11746}\u{11800}-\u{1182E}\u{11838}\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193D}\u{1193F}-\u{11942}\u{11944}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D3}\u{119DC}-\u{119DF}\u{119E1}-\u{119E4}\u{11A00}\u{11A07}\u{11A08}\u{11A0B}-\u{11A32}\u{11A39}\u{11A3A}\u{11A3F}-\u{11A46}\u{11A50}\u{11A57}\u{11A58}\u{11A5C}-\u{11A89}\u{11A97}\u{11A9A}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11BC0}-\u{11BE1}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2F}\u{11C3E}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11CA9}\u{11CB1}\u{11CB4}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D93}\u{11D94}\u{11D96}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11EF5}-\u{11EF8}\u{11F02}-\u{11F10}\u{11F12}-\u{11F35}\u{11F3E}\u{11F3F}\u{11F41}\u{11F43}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{1343F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{1612A}-\u{1612C}\u{16130}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF5}\u{16B00}-\u{16B2F}\u{16B37}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D79}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F50}-\u{16F87}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}\u{1BC9F}\u{1CCD6}-\u{1CCEF}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D166}\u{1D16A}-\u{1D172}\u{1D183}\u{1D184}\u{1D18C}-\u{1D1A9}\u{1D1AE}-\u{1D1E8}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D800}-\u{1D9FF}\u{1DA37}-\u{1DA3A}\u{1DA6D}-\u{1DA74}\u{1DA76}-\u{1DA83}\u{1DA85}-\u{1DA8B}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E5FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F169}\u{1F170}-\u{1F1AC}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]/u,bidiS1RTL:/[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D4A}-\u{10D65}\u{10D6F}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}]/u,bidiS2:/^[\0-\x08\x0E-\x1B!-@\[-`\{-\x84\x86-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02B9\u02BA\u02C2-\u02CF\u02D2-\u02DF\u02E5-\u02ED\u02EF-\u036F\u0374\u0375\u037E\u0384\u0385\u0387\u03F6\u0483-\u0489\u058A\u058D-\u058F\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\u0600-\u070D\u070F-\u074A\u074D-\u07B1\u07C0-\u07FA\u07FD-\u082D\u0830-\u083E\u0840-\u085B\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u0897-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09F2\u09F3\u09FB\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AF1\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0BF3-\u0BFA\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C78-\u0C7E\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E3F\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39-\u0F3D\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1390-\u1399\u1400\u169B\u169C\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DB\u17DD\u17F0-\u17F9\u1800-\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1940\u1944\u1945\u19DE-\u19FF\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u200B-\u200D\u200F-\u2027\u202F-\u205E\u2060-\u2064\u206A-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20C0\u20D0-\u20F0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u2150-\u215F\u2189-\u218B\u2190-\u2335\u237B-\u2394\u2396-\u2429\u2440-\u244A\u2460-\u249B\u24EA-\u26AB\u26AD-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF9-\u2CFF\u2D7F\u2DE0-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u302A-\u302D\u3030\u3036\u3037\u303D-\u303F\u3099-\u309C\u30A0\u30FB\u31C0-\u31E5\u31EF\u321D\u321E\u3250-\u325F\u327C-\u327E\u32B1-\u32BF\u32CC-\u32CF\u3377-\u337A\u33DE\u33DF\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA60D-\uA60F\uA66F-\uA67F\uA69E\uA69F\uA6F0\uA6F1\uA700-\uA721\uA788\uA802\uA806\uA80B\uA825\uA826\uA828-\uA82C\uA838\uA839\uA874-\uA877\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uAB6A\uAB6B\uABE5\uABE8\uABED\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFE19\uFE20-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFE70-\uFE74\uFE76-\uFEFC\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD\u{10101}\u{10140}-\u{1018C}\u{10190}-\u{1019C}\u{101A0}\u{101FD}\u{102E0}-\u{102FB}\u{10376}-\u{1037A}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{1091F}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A38}-\u{10A3A}\u{10A3F}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE6}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B39}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D27}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D69}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAB}-\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10EFC}-\u{10F27}\u{10F30}-\u{10F59}\u{10F70}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11001}\u{11038}-\u{11046}\u{11052}-\u{11065}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{11660}-\u{1166C}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{11FD5}-\u{11FF1}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE2}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CC00}-\u{1CCD5}\u{1CCF0}-\u{1CCF9}\u{1CD00}-\u{1CEB3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D1E9}\u{1D1EA}\u{1D200}-\u{1D245}\u{1D300}-\u{1D356}\u{1D6C1}\u{1D6DB}\u{1D6FB}\u{1D715}\u{1D735}\u{1D74F}\u{1D76F}\u{1D789}\u{1D7A9}\u{1D7C3}\u{1D7CE}-\u{1D7FF}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E2FF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8D6}\u{1E900}-\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1EEF0}\u{1EEF1}\u{1F000}-\u{1F02B}\u{1F030}-\u{1F093}\u{1F0A0}-\u{1F0AE}\u{1F0B1}-\u{1F0BF}\u{1F0C1}-\u{1F0CF}\u{1F0D1}-\u{1F0F5}\u{1F100}-\u{1F10F}\u{1F12F}\u{1F16A}-\u{1F16F}\u{1F1AD}\u{1F260}-\u{1F265}\u{1F300}-\u{1F6D7}\u{1F6DC}-\u{1F6EC}\u{1F6F0}-\u{1F6FC}\u{1F700}-\u{1F776}\u{1F77B}-\u{1F7D9}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F800}-\u{1F80B}\u{1F810}-\u{1F847}\u{1F850}-\u{1F859}\u{1F860}-\u{1F887}\u{1F890}-\u{1F8AD}\u{1F8B0}-\u{1F8BB}\u{1F8C0}\u{1F8C1}\u{1F900}-\u{1FA53}\u{1FA60}-\u{1FA6D}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA89}\u{1FA8F}-\u{1FAC6}\u{1FACE}-\u{1FADC}\u{1FADF}-\u{1FAE9}\u{1FAF0}-\u{1FAF8}\u{1FB00}-\u{1FB92}\u{1FB94}-\u{1FBF9}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*$/u,bidiS3:/[0-9\xB2\xB3\xB9\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0605\u0608\u060B\u060D\u061B-\u064A\u0660-\u0669\u066B-\u066F\u0671-\u06D5\u06DD\u06E5\u06E6\u06EE-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u08A0-\u08C9\u08E2\u200F\u2070\u2074-\u2079\u2080-\u2089\u2488-\u249B\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\u{102E1}-\u{102FB}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1CCF0}-\u{1CCF9}\u{1D7CE}-\u{1D7FF}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10A}\u{1FBF0}-\u{1FBF9}][\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]*$/u,bidiS4EN:/[0-9\xB2\xB3\xB9\u06F0-\u06F9\u2070\u2074-\u2079\u2080-\u2089\u2488-\u249B\uFF10-\uFF19\u{102E1}-\u{102FB}\u{1CCF0}-\u{1CCF9}\u{1D7CE}-\u{1D7FF}\u{1F100}-\u{1F10A}\u{1FBF0}-\u{1FBF9}]/u,bidiS4AN:/[\u0600-\u0605\u0660-\u0669\u066B\u066C\u06DD\u0890\u0891\u08E2\u{10D30}-\u{10D39}\u{10D40}-\u{10D49}\u{10E60}-\u{10E7E}]/u,bidiS5:/^[\0-\x08\x0E-\x1B!-\x84\x86-\u0377\u037A-\u037F\u0384-\u038A\u038C\u038E-\u03A1\u03A3-\u052F\u0531-\u0556\u0559-\u058A\u058D-\u058F\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0606\u0607\u0609\u060A\u060C\u060E-\u061A\u064B-\u065F\u066A\u0670\u06D6-\u06DC\u06DE-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07F6-\u07F9\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4F\u0D54-\u0D63\u0D66-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E3A\u0E3F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FDA\u1000-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u13A0-\u13F5\u13F8-\u13FD\u1400-\u167F\u1681-\u169C\u16A0-\u16F8\u1700-\u1715\u171F-\u1736\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u1800-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1940\u1944-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u19DE-\u1A1B\u1A1E-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1AB0-\u1ACE\u1B00-\u1B4C\u1B4E-\u1BF3\u1BFC-\u1C37\u1C3B-\u1C49\u1C4D-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD0-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u200B-\u200E\u2010-\u2027\u202F-\u205E\u2060-\u2064\u206A-\u2071\u2074-\u208E\u2090-\u209C\u20A0-\u20C0\u20D0-\u20F0\u2100-\u218B\u2190-\u2429\u2440-\u244A\u2460-\u2B73\u2B76-\u2B95\u2B97-\u2CF3\u2CF9-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u303F\u3041-\u3096\u3099-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31E5\u31EF-\u321E\u3220-\uA48C\uA490-\uA4C6\uA4D0-\uA62B\uA640-\uA6F7\uA700-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA82C\uA830-\uA839\uA840-\uA877\uA880-\uA8C5\uA8CE-\uA8D9\uA8E0-\uA953\uA95F-\uA97C\uA980-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAAC2\uAADB-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB6B\uAB70-\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1E\uFB29\uFD3E-\uFD4F\uFDCF\uFDFD-\uFE19\uFE20-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}-\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1018E}\u{10190}-\u{1019C}\u{101A0}\u{101D0}-\u{101FD}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E0}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{1037A}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{1091F}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10B39}-\u{10B3F}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6E}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11000}-\u{1104D}\u{11052}-\u{11075}\u{1107F}-\u{110C2}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11100}-\u{11134}\u{11136}-\u{11147}\u{11150}-\u{11176}\u{11180}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{11241}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112EA}\u{112F0}-\u{112F9}\u{11300}-\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133B}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113C0}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}-\u{113D5}\u{113D7}\u{113D8}\u{113E1}\u{113E2}\u{11400}-\u{1145B}\u{1145D}-\u{11461}\u{11480}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B5}\u{115B8}-\u{115DD}\u{11600}-\u{11644}\u{11650}-\u{11659}\u{11660}-\u{1166C}\u{11680}-\u{116B9}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171D}-\u{1172B}\u{11730}-\u{11746}\u{11800}-\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D7}\u{119DA}-\u{119E4}\u{11A00}-\u{11A47}\u{11A50}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11BC0}-\u{11BE1}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C36}\u{11C38}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D47}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF8}\u{11F00}-\u{11F10}\u{11F12}-\u{11F3A}\u{11F3E}-\u{11F5A}\u{11FB0}\u{11FC0}-\u{11FF1}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{13455}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF0}-\u{16AF5}\u{16B00}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D79}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F4F}-\u{16F87}\u{16F8F}-\u{16F9F}\u{16FE0}-\u{16FE4}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}-\u{1BCA3}\u{1CC00}-\u{1CCF9}\u{1CD00}-\u{1CEB3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D1EA}\u{1D200}-\u{1D245}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D300}-\u{1D356}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D7CB}\u{1D7CE}-\u{1DA8B}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E030}-\u{1E06D}\u{1E08F}\u{1E100}-\u{1E12C}\u{1E130}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AE}\u{1E2C0}-\u{1E2F9}\u{1E2FF}\u{1E4D0}-\u{1E4F9}\u{1E5D0}-\u{1E5FA}\u{1E5FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{1EEF0}\u{1EEF1}\u{1F000}-\u{1F02B}\u{1F030}-\u{1F093}\u{1F0A0}-\u{1F0AE}\u{1F0B1}-\u{1F0BF}\u{1F0C1}-\u{1F0CF}\u{1F0D1}-\u{1F0F5}\u{1F100}-\u{1F1AD}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{1F260}-\u{1F265}\u{1F300}-\u{1F6D7}\u{1F6DC}-\u{1F6EC}\u{1F6F0}-\u{1F6FC}\u{1F700}-\u{1F776}\u{1F77B}-\u{1F7D9}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F800}-\u{1F80B}\u{1F810}-\u{1F847}\u{1F850}-\u{1F859}\u{1F860}-\u{1F887}\u{1F890}-\u{1F8AD}\u{1F8B0}-\u{1F8BB}\u{1F8C0}\u{1F8C1}\u{1F900}-\u{1FA53}\u{1FA60}-\u{1FA6D}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA89}\u{1FA8F}-\u{1FAC6}\u{1FACE}-\u{1FADC}\u{1FADF}-\u{1FAE9}\u{1FAF0}-\u{1FAF8}\u{1FB00}-\u{1FB92}\u{1FB94}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]*$/u,bidiS6:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u0589\u06F0-\u06F9\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u09FC\u09FD\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A76\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C77\u0C7F\u0C80\u0C82-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D02-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D4F\u0D54-\u0D61\u0D66-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u1711\u1715\u171F-\u1731\u1734-\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4C\u1B4E-\u1B6A\u1B74-\u1B7F\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u2488-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31BF\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB69\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1013F}\u{1018D}\u{1018E}\u{101D0}-\u{101FC}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{11000}\u{11002}-\u{11037}\u{11047}-\u{1104D}\u{11066}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11082}-\u{110B2}\u{110B7}\u{110B8}\u{110BB}-\u{110C1}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{1112C}\u{11136}-\u{11147}\u{11150}-\u{11172}\u{11174}-\u{11176}\u{11182}-\u{111B5}\u{111BF}-\u{111C8}\u{111CD}\u{111CE}\u{111D0}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122E}\u{11232}\u{11233}\u{11235}\u{11238}-\u{1123D}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112DE}\u{112E0}-\u{112E2}\u{112F0}-\u{112F9}\u{11302}\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}-\u{1133F}\u{11341}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113BA}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}\u{113CD}\u{113CF}\u{113D1}\u{113D3}-\u{113D5}\u{113D7}\u{113D8}\u{11400}-\u{11437}\u{11440}\u{11441}\u{11445}\u{11447}-\u{1145B}\u{1145D}\u{1145F}-\u{11461}\u{11480}-\u{114B2}\u{114B9}\u{114BB}-\u{114BE}\u{114C1}\u{114C4}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B1}\u{115B8}-\u{115BB}\u{115BE}\u{115C1}-\u{115DB}\u{11600}-\u{11632}\u{1163B}\u{1163C}\u{1163E}\u{11641}-\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116AC}\u{116AE}\u{116AF}\u{116B6}\u{116B8}\u{116B9}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171E}\u{11720}\u{11721}\u{11726}\u{11730}-\u{11746}\u{11800}-\u{1182E}\u{11838}\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193D}\u{1193F}-\u{11942}\u{11944}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D3}\u{119DC}-\u{119DF}\u{119E1}-\u{119E4}\u{11A00}\u{11A07}\u{11A08}\u{11A0B}-\u{11A32}\u{11A39}\u{11A3A}\u{11A3F}-\u{11A46}\u{11A50}\u{11A57}\u{11A58}\u{11A5C}-\u{11A89}\u{11A97}\u{11A9A}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11BC0}-\u{11BE1}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2F}\u{11C3E}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11CA9}\u{11CB1}\u{11CB4}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D93}\u{11D94}\u{11D96}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11EF5}-\u{11EF8}\u{11F02}-\u{11F10}\u{11F12}-\u{11F35}\u{11F3E}\u{11F3F}\u{11F41}\u{11F43}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{1343F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{1612A}-\u{1612C}\u{16130}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF5}\u{16B00}-\u{16B2F}\u{16B37}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D79}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F50}-\u{16F87}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}\u{1BC9F}\u{1CCD6}-\u{1CCF9}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D166}\u{1D16A}-\u{1D172}\u{1D183}\u{1D184}\u{1D18C}-\u{1D1A9}\u{1D1AE}-\u{1D1E8}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D9FF}\u{1DA37}-\u{1DA3A}\u{1DA6D}-\u{1DA74}\u{1DA76}-\u{1DA83}\u{1DA85}-\u{1DA8B}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E5FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1F100}-\u{1F10A}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F169}\u{1F170}-\u{1F1AC}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}][\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]*$/u},Tr={STATUS_MAPPING:{mapped:1,valid:2,disallowed:3,deviation:6,ignored:7}},Lr=(kr=Object.freeze({__proto__:null}))&&kr.default||kr;const{STATUS_MAPPING:Nr}=Tr;function qr(t){return/[^\x00-\x7F]/u.test(t)}function Mr(t){let e=0,n=Lr.length-1;for(;e<=n;){const r=Math.floor((e+n)/2),u=Lr[r],o=Array.isArray(u[0])?u[0][0]:u[0],i=Array.isArray(u[0])?u[0][1]:u[0];if(o<=t&&i>=t)return u.slice(1);o>t?n=r-1:e=r+1}return null}function Gr(t,{checkHyphens:e,checkBidi:n,checkJoiners:r,transitionalProcessing:u,useSTD3ASCIIRules:o,isBidi:i}){if(0===t.length)return!0;if(t.normalize("NFC")!==t)return!1;const s=Array.from(t);if(e&&("-"===s[2]&&"-"===s[3]||t.startsWith("-")||t.endsWith("-")))return!1;if(!e&&t.startsWith("xn--"))return!1;if(t.includes("."))return!1;if(xr.combiningMarks.test(s[0]))return!1;for(const t of s){const e=t.codePointAt(0),[n]=Mr(e);if(u){if(n!==Nr.valid)return!1}else if(n!==Nr.valid&&n!==Nr.deviation)return!1;if(o&&e<=127&&!/^(?:[a-z]|[0-9]|-)$/u.test(t))return!1}if(r){let t=0;for(const[e,n]of s.entries())if(""===n||""===n){if(e>0){if(xr.combiningClassVirama.test(s[e-1]))continue;if(""===n){const n=s.indexOf("",e+1),r=n<0?s.slice(t):s.slice(t,n);if(xr.validZWNJ.test(r.join(""))){t=e+1;continue}}}return!1}}if(n&&i){let e;if(xr.bidiS1LTR.test(s[0]))e=!1;else{if(!xr.bidiS1RTL.test(s[0]))return!1;e=!0}if(e){if(!xr.bidiS2.test(t)||!xr.bidiS3.test(t)||xr.bidiS4EN.test(t)&&xr.bidiS4AN.test(t))return!1}else if(!xr.bidiS5.test(t)||!xr.bidiS6.test(t))return!1}return!0}function zr(t,e){let n=function(t,{transitionalProcessing:e}){let n="";for(const r of t){const[t,u]=Mr(r.codePointAt(0));switch(t){case Nr.disallowed:n+=r;break;case Nr.ignored:break;case Nr.mapped:n+=e&&"ẞ"===r?"ss":u;break;case Nr.deviation:n+=e?u:r;break;case Nr.valid:n+=r}}return n}(t,e);n=n.normalize("NFC");const r=n.split("."),u=function(t){const e=t.map(t=>{if(t.startsWith("xn--"))try{return Pr(t.substring(4))}catch{return""}return t}).join(".");return xr.bidiDomain.test(e)}(r);let o=!1;for(const[t,n]of r.entries()){let i=n,s=e.transitionalProcessing;if(i.startsWith("xn--")){if(qr(i)){o=!0;continue}try{i=Pr(i.substring(4))}catch{if(!e.ignoreInvalidPunycode){o=!0;continue}}r[t]=i,""!==i&&qr(i)||(o=!0),s=!1}if(o)continue;Gr(i,{...e,transitionalProcessing:s,isBidi:u})||(o=!0)}return{string:r.join("."),error:o}}var $r={toASCII:function(t,{checkHyphens:e=!1,checkBidi:n=!1,checkJoiners:r=!1,useSTD3ASCIIRules:u=!1,verifyDNSLength:o=!1,transitionalProcessing:i=!1,ignoreInvalidPunycode:s=!1}={}){const a=zr(t,{checkHyphens:e,checkBidi:n,checkJoiners:r,useSTD3ASCIIRules:u,transitionalProcessing:i,ignoreInvalidPunycode:s});let c=a.string.split(".");if(c=c.map(t=>{if(qr(t))try{return`xn--${Or(t)}`}catch{a.error=!0}return t}),o){const t=c.join(".").length;(t>253||0===t)&&(a.error=!0);for(let t=0;t<c.length;++t)if(c[t].length>63||0===c[t].length){a.error=!0;break}}return a.error?null:c.join(".")},toUnicode:function(t,{checkHyphens:e=!1,checkBidi:n=!1,checkJoiners:r=!1,useSTD3ASCIIRules:u=!1,transitionalProcessing:o=!1,ignoreInvalidPunycode:i=!1}={}){const s=zr(t,{checkHyphens:e,checkBidi:n,checkJoiners:r,useSTD3ASCIIRules:u,transitionalProcessing:o,ignoreInvalidPunycode:i});return{domain:s.string,error:s.error}}};function Wr(t){return t>=48&&t<=57}function Jr(t){return t>=65&&t<=90||t>=97&&t<=122}var Vr={isASCIIDigit:Wr,isASCIIAlpha:Jr,isASCIIAlphanumeric:function(t){return Jr(t)||Wr(t)},isASCIIHex:function(t){return Wr(t)||t>=65&&t<=70||t>=97&&t<=102}};const Hr=new TextEncoder,Zr=new TextDecoder("utf-8",{ignoreBOM:!0});var Yr={utf8Encode:function(t){return Hr.encode(t)},utf8DecodeWithoutBOM:function(t){return Zr.decode(t)}};const{isASCIIHex:Kr}=Vr,{utf8Encode:Xr}=Yr;function Qr(t){return t.codePointAt(0)}function tu(t){let e=t.toString(16).toUpperCase();return 1===e.length&&(e=`0${e}`),`%${e}`}function eu(t){const e=new Uint8Array(t.byteLength);let n=0;for(let r=0;r<t.byteLength;++r){const u=t[r];if(37!==u)e[n++]=u;else if(37!==u||Kr(t[r+1])&&Kr(t[r+2])){const u=parseInt(String.fromCodePoint(t[r+1],t[r+2]),16);e[n++]=u,r+=2}else e[n++]=u}return e.slice(0,n)}function nu(t){return t<=31||t>126}const ru=new Set([Qr(" "),Qr('"'),Qr("<"),Qr(">"),Qr("`")]);const uu=new Set([Qr(" "),Qr('"'),Qr("#"),Qr("<"),Qr(">")]);function ou(t){return nu(t)||uu.has(t)}const iu=new Set([Qr("?"),Qr("`"),Qr("{"),Qr("}"),Qr("^")]);function su(t){return ou(t)||iu.has(t)}const au=new Set([Qr("/"),Qr(":"),Qr(";"),Qr("="),Qr("@"),Qr("["),Qr("\\"),Qr("]"),Qr("|")]);function cu(t){return su(t)||au.has(t)}const du=new Set([Qr("$"),Qr("%"),Qr("&"),Qr("+"),Qr(",")]);const lu=new Set([Qr("!"),Qr("'"),Qr("("),Qr(")"),Qr("~")]);function hu(t,e){const n=Xr(t);let r="";for(const t of n)e(t)?r+=tu(t):r+=String.fromCharCode(t);return r}var pu={isC0ControlPercentEncode:nu,isFragmentPercentEncode:function(t){return nu(t)||ru.has(t)},isQueryPercentEncode:ou,isSpecialQueryPercentEncode:function(t){return ou(t)||t===Qr("'")},isPathPercentEncode:su,isUserinfoPercentEncode:cu,isURLEncodedPercentEncode:function(t){return function(t){return cu(t)||du.has(t)}(t)||lu.has(t)},percentDecodeString:function(t){return eu(Xr(t))},percentDecodeBytes:eu,utf8PercentEncodeString:function(t,e,n=!1){let r="";for(const u of t)r+=n&&" "===u?"+":hu(u,e);return r},utf8PercentEncodeCodePoint:function(t,e){return hu(String.fromCodePoint(t),e)}},fu=Ar(function(t){const{utf8DecodeWithoutBOM:e}=Yr,{percentDecodeString:n,utf8PercentEncodeCodePoint:r,utf8PercentEncodeString:u,isC0ControlPercentEncode:o,isFragmentPercentEncode:i,isQueryPercentEncode:s,isSpecialQueryPercentEncode:a,isPathPercentEncode:c,isUserinfoPercentEncode:d}=pu;function l(t){return t.codePointAt(0)}const h={ftp:21,file:null,http:80,https:443,ws:80,wss:443},p=Symbol("failure");function f(t){return[...t].length}function m(t,e){const n=t[e];return isNaN(n)?void 0:String.fromCodePoint(n)}function v(t){return"."===t||"%2e"===t.toLowerCase()}function E(t){return 2===t.length&&Vr.isASCIIAlpha(t.codePointAt(0))&&(":"===t[1]||"|"===t[1])}function A(t){return-1!==t.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/u)}function b(t){return void 0!==h[t]}function y(t){return b(t.scheme)}function g(t){return!b(t.scheme)}function C(t){return h[t]}function F(t){if(""===t)return p;let e=10;if(t.length>=2&&"0"===t.charAt(0)&&"x"===t.charAt(1).toLowerCase()?(t=t.substring(2),e=16):t.length>=2&&"0"===t.charAt(0)&&(t=t.substring(1),e=8),""===t)return 0;let n=/[^0-7]/u;return 10===e&&(n=/[^0-9]/u),16===e&&(n=/[^0-9A-Fa-f]/u),n.test(t)?p:parseInt(t,e)}function w(t,r=!1){if("["===t[0])return"]"!==t[t.length-1]?p:function(t){const e=[0,0,0,0,0,0,0,0];let n=0,r=null,u=0;if((t=Array.from(t,t=>t.codePointAt(0)))[u]===l(":")){if(t[u+1]!==l(":"))return p;u+=2,++n,r=n}for(;u<t.length;){if(8===n)return p;if(t[u]===l(":")){if(null!==r)return p;++u,++n,r=n;continue}let o=0,i=0;for(;i<4&&Vr.isASCIIHex(t[u]);)o=16*o+parseInt(m(t,u),16),++u,++i;if(t[u]===l(".")){if(0===i)return p;if(u-=i,n>6)return p;let r=0;for(;void 0!==t[u];){let o=null;if(r>0){if(!(t[u]===l(".")&&r<4))return p;++u}if(!Vr.isASCIIDigit(t[u]))return p;for(;Vr.isASCIIDigit(t[u]);){const e=parseInt(m(t,u));if(null===o)o=e;else{if(0===o)return p;o=10*o+e}if(o>255)return p;++u}e[n]=256*e[n]+o,++r,2!==r&&4!==r||++n}if(4!==r)return p;break}if(t[u]===l(":")){if(++u,void 0===t[u])return p}else if(void 0!==t[u])return p;e[n]=o,++n}if(null!==r){let t=n-r;for(n=7;0!==n&&t>0;){const u=e[r+t-1];e[r+t-1]=e[n],e[n]=u,--n,--t}}else if(null===r&&8!==n)return p;return e}(t.substring(1,t.length-1));if(r)return function(t){if(A(t))return p;return u(t,o)}(t);const i=function(t,e=!1){const n=$r.toASCII(t,{checkHyphens:e,checkBidi:!0,checkJoiners:!0,useSTD3ASCIIRules:e,transitionalProcessing:!1,verifyDNSLength:e,ignoreInvalidPunycode:!1});if(null===n)return p;if(!e){if(""===n)return p;if(A(r=n)||-1!==r.search(/[\u0000-\u001F]|%|\u007F/u))return p}var r;return n}(e(n(t)));return i===p?p:function(t){const e=t.split(".");if(""===e[e.length-1]){if(1===e.length)return!1;e.pop()}const n=e[e.length-1];if(F(n)!==p)return!0;if(/^[0-9]+$/u.test(n))return!0;return!1}(i)?function(t){const e=t.split(".");if(""===e[e.length-1]&&e.length>1&&e.pop(),e.length>4)return p;const n=[];for(const t of e){const e=F(t);if(e===p)return p;n.push(e)}for(let t=0;t<n.length-1;++t)if(n[t]>255)return p;if(n[n.length-1]>=256**(5-n.length))return p;let r=n.pop(),u=0;for(const t of n)r+=t*256**(3-u),++u;return r}(i):i}function D(t){return"number"==typeof t?function(t){let e="",n=t;for(let t=1;t<=4;++t)e=String(n%256)+e,4!==t&&(e=`.${e}`),n=Math.floor(n/256);return e}(t):t instanceof Array?`[${function(t){let e="";const n=function(t){let e=null,n=1,r=null,u=0;for(let o=0;o<t.length;++o)0!==t[o]?(u>n&&(e=r,n=u),r=null,u=0):(null===r&&(r=o),++u);return u>n?r:e}(t);let r=!1;for(let u=0;u<=7;++u)if(!r||0!==t[u]){if(r&&(r=!1),n===u){e+=0===u?"::":":",r=!0;continue}e+=t[u].toString(16),7!==u&&(e+=":")}return e}(t)}]`:t}function B(t){const{path:e}=t;var n;0!==e.length&&("file"===t.scheme&&1===e.length&&(n=e[0],/^[A-Za-z]:$/u.test(n))||e.pop())}function I(t){return""!==t.username||""!==t.password}function R(t){return"string"==typeof t.path}function j(t,e,n,r,u){if(this.pointer=0,this.input=t,this.base=e||null,this.encodingOverride=n||"utf-8",this.stateOverride=u,this.url=r,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null};const t=function(t){let e=0,n=t.length;for(;e<n&&!(t.charCodeAt(e)>32);++e);for(;n>e&&!(t.charCodeAt(n-1)>32);--n);return t.substring(e,n)}(this.input);t!==this.input&&(this.parseError=!0),this.input=t}const o=function(t){return t.replace(/\u0009|\u000A|\u000D/gu,"")}(this.input);for(o!==this.input&&(this.parseError=!0),this.input=o,this.state=u||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=Array.from(this.input,t=>t.codePointAt(0));this.pointer<=this.input.length;++this.pointer){const t=this.input[this.pointer],e=isNaN(t)?void 0:String.fromCodePoint(t),n=this[`parse ${this.state}`](t,e);if(!n)break;if(n===p){this.failure=!0;break}}}j.prototype["parse scheme start"]=function(t,e){if(Vr.isASCIIAlpha(t))this.buffer+=e.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,p;this.state="no scheme",--this.pointer}return!0},j.prototype["parse scheme"]=function(t,e){if(Vr.isASCIIAlphanumeric(t)||t===l("+")||t===l("-")||t===l("."))this.buffer+=e.toLowerCase();else if(t===l(":")){if(this.stateOverride){if(y(this.url)&&!b(this.buffer))return!1;if(!y(this.url)&&b(this.buffer))return!1;if((I(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&""===this.url.host)return!1}if(this.url.scheme=this.buffer,this.stateOverride)return this.url.port===C(this.url.scheme)&&(this.url.port=null),!1;this.buffer="","file"===this.url.scheme?(this.input[this.pointer+1]===l("/")&&this.input[this.pointer+2]===l("/")||(this.parseError=!0),this.state="file"):y(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":y(this.url)?this.state="special authority slashes":this.input[this.pointer+1]===l("/")?(this.state="path or authority",++this.pointer):(this.url.path="",this.state="opaque path")}else{if(this.stateOverride)return this.parseError=!0,p;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},j.prototype["parse no scheme"]=function(t){return null===this.base||R(this.base)&&t!==l("#")?p:(R(this.base)&&t===l("#")?(this.url.scheme=this.base.scheme,this.url.path=this.base.path,this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},j.prototype["parse special relative or authority"]=function(t){return t===l("/")&&this.input[this.pointer+1]===l("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},j.prototype["parse path or authority"]=function(t){return t===l("/")?this.state="authority":(this.state="path",--this.pointer),!0},j.prototype["parse relative"]=function(t){return this.url.scheme=this.base.scheme,t===l("/")?this.state="relative slash":y(this.url)&&t===l("\\")?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,t===l("?")?(this.url.query="",this.state="query"):t===l("#")?(this.url.fragment="",this.state="fragment"):isNaN(t)||(this.url.query=null,this.url.path.pop(),this.state="path",--this.pointer)),!0},j.prototype["parse relative slash"]=function(t){return!y(this.url)||t!==l("/")&&t!==l("\\")?t===l("/")?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(t===l("\\")&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},j.prototype["parse special authority slashes"]=function(t){return t===l("/")&&this.input[this.pointer+1]===l("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},j.prototype["parse special authority ignore slashes"]=function(t){return t!==l("/")&&t!==l("\\")?(this.state="authority",--this.pointer):this.parseError=!0,!0},j.prototype["parse authority"]=function(t,e){if(t===l("@")){this.parseError=!0,this.atFlag&&(this.buffer=`%40${this.buffer}`),this.atFlag=!0;const t=f(this.buffer);for(let e=0;e<t;++e){const t=this.buffer.codePointAt(e);if(t===l(":")&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=r(t,d);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(t)||t===l("/")||t===l("?")||t===l("#")||y(this.url)&&t===l("\\")){if(this.atFlag&&""===this.buffer)return this.parseError=!0,p;this.pointer-=f(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=e;return!0},j.prototype["parse hostname"]=j.prototype["parse host"]=function(t,e){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(t!==l(":")||this.arrFlag)if(isNaN(t)||t===l("/")||t===l("?")||t===l("#")||y(this.url)&&t===l("\\")){if(--this.pointer,y(this.url)&&""===this.buffer)return this.parseError=!0,p;if(this.stateOverride&&""===this.buffer&&(I(this.url)||null!==this.url.port))return this.parseError=!0,!1;const t=w(this.buffer,g(this.url));if(t===p)return p;if(this.url.host=t,this.buffer="",this.state="path start",this.stateOverride)return!1}else t===l("[")?this.arrFlag=!0:t===l("]")&&(this.arrFlag=!1),this.buffer+=e;else{if(""===this.buffer)return this.parseError=!0,p;if("hostname"===this.stateOverride)return!1;const t=w(this.buffer,g(this.url));if(t===p)return p;this.url.host=t,this.buffer="",this.state="port"}return!0},j.prototype["parse port"]=function(t,e){if(Vr.isASCIIDigit(t))this.buffer+=e;else{if(!(isNaN(t)||t===l("/")||t===l("?")||t===l("#")||y(this.url)&&t===l("\\")||this.stateOverride))return this.parseError=!0,p;if(""!==this.buffer){const t=parseInt(this.buffer);if(t>65535)return this.parseError=!0,p;this.url.port=t===C(this.url.scheme)?null:t,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}return!0};const S=new Set([l("/"),l("\\"),l("?"),l("#")]);function _(t,e){const n=t.length-e;return n>=2&&(r=t[e],u=t[e+1],Vr.isASCIIAlpha(r)&&(u===l(":")||u===l("|")))&&(2===n||S.has(t[e+2]));var r,u}function U(t){if(R(t))return t.path;let e="";for(const n of t.path)e+=`/${n}`;return e}j.prototype["parse file"]=function(t){return this.url.scheme="file",this.url.host="",t===l("/")||t===l("\\")?(t===l("\\")&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,t===l("?")?(this.url.query="",this.state="query"):t===l("#")?(this.url.fragment="",this.state="fragment"):isNaN(t)||(this.url.query=null,_(this.input,this.pointer)?(this.parseError=!0,this.url.path=[]):B(this.url),this.state="path",--this.pointer)):(this.state="path",--this.pointer),!0},j.prototype["parse file slash"]=function(t){var e;return t===l("/")||t===l("\\")?(t===l("\\")&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(!_(this.input,this.pointer)&&(2===(e=this.base.path[0]).length&&Vr.isASCIIAlpha(e.codePointAt(0))&&":"===e[1])&&this.url.path.push(this.base.path[0]),this.url.host=this.base.host),this.state="path",--this.pointer),!0},j.prototype["parse file host"]=function(t,e){if(isNaN(t)||t===l("/")||t===l("\\")||t===l("?")||t===l("#"))if(--this.pointer,!this.stateOverride&&E(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let t=w(this.buffer,g(this.url));if(t===p)return p;if("localhost"===t&&(t=""),this.url.host=t,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=e;return!0},j.prototype["parse path start"]=function(t){return y(this.url)?(t===l("\\")&&(this.parseError=!0),this.state="path",t!==l("/")&&t!==l("\\")&&--this.pointer):this.stateOverride||t!==l("?")?this.stateOverride||t!==l("#")?void 0!==t?(this.state="path",t!==l("/")&&--this.pointer):this.stateOverride&&null===this.url.host&&this.url.path.push(""):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},j.prototype["parse path"]=function(t){return isNaN(t)||t===l("/")||y(this.url)&&t===l("\\")||!this.stateOverride&&(t===l("?")||t===l("#"))?(y(this.url)&&t===l("\\")&&(this.parseError=!0),!function(t){return".."===(t=t.toLowerCase())||"%2e."===t||".%2e"===t||"%2e%2e"===t}(this.buffer)?!v(this.buffer)||t===l("/")||y(this.url)&&t===l("\\")?v(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&E(this.buffer)&&(this.buffer=`${this.buffer[0]}:`),this.url.path.push(this.buffer)):this.url.path.push(""):(B(this.url),t===l("/")||y(this.url)&&t===l("\\")||this.url.path.push("")),this.buffer="",t===l("?")&&(this.url.query="",this.state="query"),t===l("#")&&(this.url.fragment="",this.state="fragment")):(t!==l("%")||Vr.isASCIIHex(this.input[this.pointer+1])&&Vr.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=r(t,c)),!0},j.prototype["parse opaque path"]=function(t){if(t===l("?"))this.url.query="",this.state="query";else if(t===l("#"))this.url.fragment="",this.state="fragment";else if(t===l(" ")){const t=this.input[this.pointer+1];t===l("?")||t===l("#")?this.url.path+="%20":this.url.path+=" "}else isNaN(t)||t===l("%")||(this.parseError=!0),t!==l("%")||Vr.isASCIIHex(this.input[this.pointer+1])&&Vr.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),isNaN(t)||(this.url.path+=r(t,o));return!0},j.prototype["parse query"]=function(t,e){if(y(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8"),!this.stateOverride&&t===l("#")||isNaN(t)){const e=y(this.url)?a:s;this.url.query+=u(this.buffer,e),this.buffer="",t===l("#")&&(this.url.fragment="",this.state="fragment")}else isNaN(t)||(t!==l("%")||Vr.isASCIIHex(this.input[this.pointer+1])&&Vr.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=e);return!0},j.prototype["parse fragment"]=function(t){return isNaN(t)||(t!==l("%")||Vr.isASCIIHex(this.input[this.pointer+1])&&Vr.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=r(t,i)),!0},t.exports.serializeURL=function(t,e){let n=`${t.scheme}:`;return null!==t.host&&(n+="//",""===t.username&&""===t.password||(n+=t.username,""!==t.password&&(n+=`:${t.password}`),n+="@"),n+=D(t.host),null!==t.port&&(n+=`:${t.port}`)),null===t.host&&!R(t)&&t.path.length>1&&""===t.path[0]&&(n+="/."),n+=U(t),null!==t.query&&(n+=`?${t.query}`),e||null===t.fragment||(n+=`#${t.fragment}`),n},t.exports.serializePath=U,t.exports.serializeURLOrigin=function(e){switch(e.scheme){case"blob":{const n=t.exports.parseURL(U(e));return null===n||"http"!==n.scheme&&"https"!==n.scheme?"null":t.exports.serializeURLOrigin(n)}case"ftp":case"http":case"https":case"ws":case"wss":return function(t){let e=`${t.scheme}://`;return e+=D(t.host),null!==t.port&&(e+=`:${t.port}`),e}({scheme:e.scheme,host:e.host,port:e.port});default:return"null"}},t.exports.basicURLParse=function(t,e){void 0===e&&(e={});const n=new j(t,e.baseURL,e.encodingOverride,e.url,e.stateOverride);return n.failure?null:n.url},t.exports.setTheUsername=function(t,e){t.username=u(e,d)},t.exports.setThePassword=function(t,e){t.password=u(e,d)},t.exports.serializeHost=D,t.exports.cannotHaveAUsernamePasswordPort=function(t){return null===t.host||""===t.host||"file"===t.scheme},t.exports.hasAnOpaquePath=R,t.exports.serializeInteger=function(t){return String(t)},t.exports.parseURL=function(e,n){return void 0===n&&(n={}),t.exports.basicURLParse(e,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}});fu.serializeURL,fu.serializePath,fu.serializeURLOrigin,fu.basicURLParse,fu.setTheUsername,fu.setThePassword,fu.serializeHost,fu.cannotHaveAUsernamePasswordPort,fu.hasAnOpaquePath,fu.serializeInteger,fu.parseURL;const{utf8Encode:mu,utf8DecodeWithoutBOM:vu}=Yr,{percentDecodeBytes:Eu,utf8PercentEncodeString:Au,isURLEncodedPercentEncode:bu}=pu;function yu(t){return t.codePointAt(0)}function gu(t,e,n){let r=t.indexOf(e);for(;r>=0;)t[r]=n,r=t.indexOf(e,r+1);return t}var Cu={parseUrlencodedString:function(t){return function(t){const e=function(t,e){const n=[];let r=0,u=t.indexOf(e);for(;u>=0;)n.push(t.slice(r,u)),r=u+1,u=t.indexOf(e,r);return r!==t.length&&n.push(t.slice(r)),n}(t,yu("&")),n=[];for(const t of e){if(0===t.length)continue;let e,r;const u=t.indexOf(yu("="));u>=0?(e=t.slice(0,u),r=t.slice(u+1)):(e=t,r=new Uint8Array(0)),e=gu(e,43,32),r=gu(r,43,32);const o=vu(Eu(e)),i=vu(Eu(r));n.push([o,i])}return n}(mu(t))},serializeUrlencoded:function(t){let e="";for(const[n,r]of t.entries()){0!==n&&(e+="&"),e+=`${Au(r[0],bu,!0)}=${Au(r[1],bu,!0)}`}return e}},Fu=(t,e,{context:n="The provided value"}={})=>{if("function"!=typeof e)throw new t.TypeError(n+" is not a function");function r(...r){const u=yr.tryWrapperForImpl(this);let o;for(let t=0;t<r.length;t++)r[t]=yr.tryWrapperForImpl(r[t]);return o=Reflect.apply(e,u,r),o=br.any(o,{context:n,globals:t}),o}return r.construct=(...r)=>{for(let t=0;t<r.length;t++)r[t]=yr.tryWrapperForImpl(r[t]);let u=Reflect.construct(e,r);return u=br.any(u,{context:n,globals:t}),u},r[yr.wrapperSymbol]=e,r.objectReference=e,r},wu=class{constructor(t,e,{doNotStripQMark:n=!1}){let r=e[0];if(this._list=[],this._url=null,n||"string"!=typeof r||"?"!==r[0]||(r=r.slice(1)),Array.isArray(r))for(const t of r){if(2!==t.length)throw new TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element does not contain exactly two elements.");this._list.push([t[0],t[1]])}else if("object"==typeof r&&null===Object.getPrototypeOf(r))for(const t of Object.keys(r)){const e=r[t];this._list.push([t,e])}else this._list=Cu.parseUrlencodedString(r)}_updateSteps(){if(null!==this._url){let t=Cu.serializeUrlencoded(this._list);""===t&&(t=null),this._url._url.query=t}}get size(){return this._list.length}append(t,e){this._list.push([t,e]),this._updateSteps()}delete(t,e){let n=0;for(;n<this._list.length;)this._list[n][0]!==t||void 0!==e&&this._list[n][1]!==e?n++:this._list.splice(n,1);this._updateSteps()}get(t){for(const e of this._list)if(e[0]===t)return e[1];return null}getAll(t){const e=[];for(const n of this._list)n[0]===t&&e.push(n[1]);return e}has(t,e){for(const n of this._list)if(n[0]===t&&(void 0===e||n[1]===e))return!0;return!1}set(t,e){let n=!1,r=0;for(;r<this._list.length;)this._list[r][0]===t?n?this._list.splice(r,1):(n=!0,this._list[r][1]=e,r++):r++;n||this._list.push([t,e]),this._updateSteps()}sort(){this._list.sort((t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0),this._updateSteps()}[Symbol.iterator](){return this._list[Symbol.iterator]()}toString(){return Cu.serializeUrlencoded(this._list)}},Du={implementation:wu},Bu=Ar(function(t,e){const n=yr.newObjectInRealm,r=yr.implSymbol,u=yr.ctorRegistrySymbol,o="URLSearchParams";function i(t,e){let n;return void 0!==e&&(n=e.prototype),yr.isObject(n)||(n=t[u].URLSearchParams.prototype),Object.create(n)}e.is=t=>yr.isObject(t)&&yr.hasOwn(t,r)&&t[r]instanceof Du.implementation,e.isImpl=t=>yr.isObject(t)&&t instanceof Du.implementation,e.convert=(t,n,{context:r="The provided value"}={})=>{if(e.is(n))return yr.implForWrapper(n);throw new t.TypeError(`${r} is not of type 'URLSearchParams'.`)},e.createDefaultIterator=(t,e,n)=>{const r=t[u]["URLSearchParams Iterator"],o=Object.create(r);return Object.defineProperty(o,yr.iterInternalSymbol,{value:{target:e,kind:n,index:0},configurable:!0}),o},e.create=(t,n,r)=>{const u=i(t);return e.setup(u,t,n,r)},e.createImpl=(t,n,r)=>{const u=e.create(t,n,r);return yr.implForWrapper(u)},e._internalSetup=(t,e)=>{},e.setup=(t,n,u=[],o={})=>(o.wrapper=t,e._internalSetup(t,n),Object.defineProperty(t,r,{value:new Du.implementation(n,u,o),configurable:!0}),t[r][yr.wrapperSymbol]=t,Du.init&&Du.init(t[r]),t),e.new=(t,n)=>{const u=i(t,n);return e._internalSetup(u,t),Object.defineProperty(u,r,{value:Object.create(Du.implementation.prototype),configurable:!0}),u[r][yr.wrapperSymbol]=u,Du.init&&Du.init(u[r]),u[r]};const s=new Set(["Window","Worker"]);e.install=(t,u)=>{if(!u.some(t=>s.has(t)))return;const i=yr.initCtorRegistry(t);class a{constructor(){const n=[];{let e=arguments[0];if(void 0!==e)if(yr.isObject(e))if(void 0!==e[Symbol.iterator]){if(!yr.isObject(e))throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence is not an iterable object.");{const n=[],r=e;for(let e of r){if(!yr.isObject(e))throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object.");{const n=[],r=e;for(let e of r)e=br.USVString(e,{context:"Failed to construct 'URLSearchParams': parameter 1 sequence's element's element",globals:t}),n.push(e);e=n}n.push(e)}e=n}}else{if(!yr.isObject(e))throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 record is not an object.");{const n=Object.create(null);for(const r of Reflect.ownKeys(e)){const u=Object.getOwnPropertyDescriptor(e,r);if(u&&u.enumerable){let u=r;u=br.USVString(u,{context:"Failed to construct 'URLSearchParams': parameter 1 record's key",globals:t});let o=e[r];o=br.USVString(o,{context:"Failed to construct 'URLSearchParams': parameter 1 record's value",globals:t}),n[u]=o}}e=n}}else e=br.USVString(e,{context:"Failed to construct 'URLSearchParams': parameter 1",globals:t});else e="";n.push(e)}return e.setup(Object.create(new.target.prototype),t,n)}append(n,u){const o=null!=this?this:t;if(!e.is(o))throw new t.TypeError("'append' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new t.TypeError(`Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`);const i=[];{let e=arguments[0];e=br.USVString(e,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 1",globals:t}),i.push(e)}{let e=arguments[1];e=br.USVString(e,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 2",globals:t}),i.push(e)}return yr.tryWrapperForImpl(o[r].append(...i))}delete(n){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'delete' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError(`Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);const o=[];{let e=arguments[0];e=br.USVString(e,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 1",globals:t}),o.push(e)}{let e=arguments[1];void 0!==e&&(e=br.USVString(e,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 2",globals:t})),o.push(e)}return yr.tryWrapperForImpl(u[r].delete(...o))}get(n){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'get' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError(`Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);const o=[];{let e=arguments[0];e=br.USVString(e,{context:"Failed to execute 'get' on 'URLSearchParams': parameter 1",globals:t}),o.push(e)}return u[r].get(...o)}getAll(n){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'getAll' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError(`Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);const o=[];{let e=arguments[0];e=br.USVString(e,{context:"Failed to execute 'getAll' on 'URLSearchParams': parameter 1",globals:t}),o.push(e)}return yr.tryWrapperForImpl(u[r].getAll(...o))}has(n){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'has' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError(`Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);const o=[];{let e=arguments[0];e=br.USVString(e,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 1",globals:t}),o.push(e)}{let e=arguments[1];void 0!==e&&(e=br.USVString(e,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 2",globals:t})),o.push(e)}return u[r].has(...o)}set(n,u){const o=null!=this?this:t;if(!e.is(o))throw new t.TypeError("'set' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new t.TypeError(`Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`);const i=[];{let e=arguments[0];e=br.USVString(e,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 1",globals:t}),i.push(e)}{let e=arguments[1];e=br.USVString(e,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 2",globals:t}),i.push(e)}return yr.tryWrapperForImpl(o[r].set(...i))}sort(){const n=null!=this?this:t;if(!e.is(n))throw new t.TypeError("'sort' called on an object that is not a valid instance of URLSearchParams.");return yr.tryWrapperForImpl(n[r].sort())}toString(){const n=null!=this?this:t;if(!e.is(n))throw new t.TypeError("'toString' called on an object that is not a valid instance of URLSearchParams.");return n[r].toString()}keys(){if(!e.is(this))throw new t.TypeError("'keys' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(t,this,"key")}values(){if(!e.is(this))throw new t.TypeError("'values' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(t,this,"value")}entries(){if(!e.is(this))throw new t.TypeError("'entries' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(t,this,"key+value")}forEach(n){if(!e.is(this))throw new t.TypeError("'forEach' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present.");n=Fu(t,n,{context:"Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1"});const u=arguments[1];let o=Array.from(this[r]),i=0;for(;i<o.length;){const[t,e]=o[i].map(yr.tryWrapperForImpl);n.call(u,e,t,this),o=Array.from(this[r]),i++}}get size(){const n=null!=this?this:t;if(!e.is(n))throw new t.TypeError("'get size' called on an object that is not a valid instance of URLSearchParams.");return n[r].size}}Object.defineProperties(a.prototype,{append:{enumerable:!0},delete:{enumerable:!0},get:{enumerable:!0},getAll:{enumerable:!0},has:{enumerable:!0},set:{enumerable:!0},sort:{enumerable:!0},toString:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0},forEach:{enumerable:!0},size:{enumerable:!0},[Symbol.toStringTag]:{value:"URLSearchParams",configurable:!0},[Symbol.iterator]:{value:a.prototype.entries,configurable:!0,writable:!0}}),i[o]=a,i["URLSearchParams Iterator"]=Object.create(i["%IteratorPrototype%"],{[Symbol.toStringTag]:{configurable:!0,value:"URLSearchParams Iterator"}}),yr.define(i["URLSearchParams Iterator"],{next(){const e=this&&this[yr.iterInternalSymbol];if(!e)throw new t.TypeError("next() called on a value that is not a URLSearchParams iterator object");const{target:u,kind:o,index:i}=e,s=Array.from(u[r]);if(i>=s.length)return n(t,{value:void 0,done:!0});const a=s[i];return e.index=i+1,n(t,yr.iteratorResult(a.map(yr.tryWrapperForImpl),o))}}),Object.defineProperty(t,o,{configurable:!0,writable:!0,value:a})}});Bu.is,Bu.isImpl,Bu.convert,Bu.createDefaultIterator,Bu.create,Bu.createImpl,Bu._internalSetup,Bu.setup,Bu.install;var Iu={implementation:class t{constructor(t,[e,n]){let r=null;if(void 0!==n&&(r=fu.basicURLParse(n),null===r))throw new TypeError(`Invalid base URL: ${n}`);const u=fu.basicURLParse(e,{baseURL:r});if(null===u)throw new TypeError(`Invalid URL: ${e}`);const o=null!==u.query?u.query:"";this._url=u,this._query=Bu.createImpl(t,[o],{doNotStripQMark:!0}),this._query._url=this}static parse(e,n,r){try{return new t(e,[n,r])}catch{return null}}static canParse(t,e){let n=null;if(void 0!==e&&(n=fu.basicURLParse(e),null===n))return!1;return null!==fu.basicURLParse(t,{baseURL:n})}get href(){return fu.serializeURL(this._url)}set href(t){const e=fu.basicURLParse(t);if(null===e)throw new TypeError(`Invalid URL: ${t}`);this._url=e,this._query._list.splice(0);const{query:n}=e;null!==n&&(this._query._list=Cu.parseUrlencodedString(n))}get origin(){return fu.serializeURLOrigin(this._url)}get protocol(){return`${this._url.scheme}:`}set protocol(t){fu.basicURLParse(`${t}:`,{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(t){fu.cannotHaveAUsernamePasswordPort(this._url)||fu.setTheUsername(this._url,t)}get password(){return this._url.password}set password(t){fu.cannotHaveAUsernamePasswordPort(this._url)||fu.setThePassword(this._url,t)}get host(){const t=this._url;return null===t.host?"":null===t.port?fu.serializeHost(t.host):`${fu.serializeHost(t.host)}:${fu.serializeInteger(t.port)}`}set host(t){fu.hasAnOpaquePath(this._url)||fu.basicURLParse(t,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":fu.serializeHost(this._url.host)}set hostname(t){fu.hasAnOpaquePath(this._url)||fu.basicURLParse(t,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":fu.serializeInteger(this._url.port)}set port(t){fu.cannotHaveAUsernamePasswordPort(this._url)||(""===t?this._url.port=null:fu.basicURLParse(t,{url:this._url,stateOverride:"port"}))}get pathname(){return fu.serializePath(this._url)}set pathname(t){fu.hasAnOpaquePath(this._url)||(this._url.path=[],fu.basicURLParse(t,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":`?${this._url.query}`}set search(t){const e=this._url;if(""===t)return e.query=null,void(this._query._list=[]);const n="?"===t[0]?t.substring(1):t;e.query="",fu.basicURLParse(n,{url:e,stateOverride:"query"}),this._query._list=Cu.parseUrlencodedString(n)}get searchParams(){return this._query}get hash(){return null===this._url.fragment||""===this._url.fragment?"":`#${this._url.fragment}`}set hash(t){if(""===t)return void(this._url.fragment=null);const e="#"===t[0]?t.substring(1):t;this._url.fragment="",fu.basicURLParse(e,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}}},Ru=Ar(function(t,e){const n=yr.implSymbol,r=yr.ctorRegistrySymbol;function u(t,e){let n;return void 0!==e&&(n=e.prototype),yr.isObject(n)||(n=t[r].URL.prototype),Object.create(n)}e.is=t=>yr.isObject(t)&&yr.hasOwn(t,n)&&t[n]instanceof Iu.implementation,e.isImpl=t=>yr.isObject(t)&&t instanceof Iu.implementation,e.convert=(t,n,{context:r="The provided value"}={})=>{if(e.is(n))return yr.implForWrapper(n);throw new t.TypeError(`${r} is not of type 'URL'.`)},e.create=(t,n,r)=>{const o=u(t);return e.setup(o,t,n,r)},e.createImpl=(t,n,r)=>{const u=e.create(t,n,r);return yr.implForWrapper(u)},e._internalSetup=(t,e)=>{},e.setup=(t,r,u=[],o={})=>(o.wrapper=t,e._internalSetup(t,r),Object.defineProperty(t,n,{value:new Iu.implementation(r,u,o),configurable:!0}),t[n][yr.wrapperSymbol]=t,Iu.init&&Iu.init(t[n]),t),e.new=(t,r)=>{const o=u(t,r);return e._internalSetup(o,t),Object.defineProperty(o,n,{value:Object.create(Iu.implementation.prototype),configurable:!0}),o[n][yr.wrapperSymbol]=o,Iu.init&&Iu.init(o[n]),o[n]};const o=new Set(["Window","Worker"]);e.install=(t,r)=>{if(!r.some(t=>o.has(t)))return;const u=yr.initCtorRegistry(t);class i{constructor(n){if(arguments.length<1)throw new t.TypeError(`Failed to construct 'URL': 1 argument required, but only ${arguments.length} present.`);const r=[];{let e=arguments[0];e=br.USVString(e,{context:"Failed to construct 'URL': parameter 1",globals:t}),r.push(e)}{let e=arguments[1];void 0!==e&&(e=br.USVString(e,{context:"Failed to construct 'URL': parameter 2",globals:t})),r.push(e)}return e.setup(Object.create(new.target.prototype),t,r)}toJSON(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'toJSON' called on an object that is not a valid instance of URL.");return r[n].toJSON()}get href(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get href' called on an object that is not a valid instance of URL.");return r[n].href}set href(r){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'set href' called on an object that is not a valid instance of URL.");r=br.USVString(r,{context:"Failed to set the 'href' property on 'URL': The provided value",globals:t}),u[n].href=r}toString(){if(!e.is(this))throw new t.TypeError("'toString' called on an object that is not a valid instance of URL.");return this[n].href}get origin(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get origin' called on an object that is not a valid instance of URL.");return r[n].origin}get protocol(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get protocol' called on an object that is not a valid instance of URL.");return r[n].protocol}set protocol(r){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'set protocol' called on an object that is not a valid instance of URL.");r=br.USVString(r,{context:"Failed to set the 'protocol' property on 'URL': The provided value",globals:t}),u[n].protocol=r}get username(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get username' called on an object that is not a valid instance of URL.");return r[n].username}set username(r){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'set username' called on an object that is not a valid instance of URL.");r=br.USVString(r,{context:"Failed to set the 'username' property on 'URL': The provided value",globals:t}),u[n].username=r}get password(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get password' called on an object that is not a valid instance of URL.");return r[n].password}set password(r){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'set password' called on an object that is not a valid instance of URL.");r=br.USVString(r,{context:"Failed to set the 'password' property on 'URL': The provided value",globals:t}),u[n].password=r}get host(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get host' called on an object that is not a valid instance of URL.");return r[n].host}set host(r){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'set host' called on an object that is not a valid instance of URL.");r=br.USVString(r,{context:"Failed to set the 'host' property on 'URL': The provided value",globals:t}),u[n].host=r}get hostname(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get hostname' called on an object that is not a valid instance of URL.");return r[n].hostname}set hostname(r){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'set hostname' called on an object that is not a valid instance of URL.");r=br.USVString(r,{context:"Failed to set the 'hostname' property on 'URL': The provided value",globals:t}),u[n].hostname=r}get port(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get port' called on an object that is not a valid instance of URL.");return r[n].port}set port(r){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'set port' called on an object that is not a valid instance of URL.");r=br.USVString(r,{context:"Failed to set the 'port' property on 'URL': The provided value",globals:t}),u[n].port=r}get pathname(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get pathname' called on an object that is not a valid instance of URL.");return r[n].pathname}set pathname(r){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'set pathname' called on an object that is not a valid instance of URL.");r=br.USVString(r,{context:"Failed to set the 'pathname' property on 'URL': The provided value",globals:t}),u[n].pathname=r}get search(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get search' called on an object that is not a valid instance of URL.");return r[n].search}set search(r){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'set search' called on an object that is not a valid instance of URL.");r=br.USVString(r,{context:"Failed to set the 'search' property on 'URL': The provided value",globals:t}),u[n].search=r}get searchParams(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get searchParams' called on an object that is not a valid instance of URL.");return yr.getSameObject(this,"searchParams",()=>yr.tryWrapperForImpl(r[n].searchParams))}get hash(){const r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get hash' called on an object that is not a valid instance of URL.");return r[n].hash}set hash(r){const u=null!=this?this:t;if(!e.is(u))throw new t.TypeError("'set hash' called on an object that is not a valid instance of URL.");r=br.USVString(r,{context:"Failed to set the 'hash' property on 'URL': The provided value",globals:t}),u[n].hash=r}static parse(e){if(arguments.length<1)throw new t.TypeError(`Failed to execute 'parse' on 'URL': 1 argument required, but only ${arguments.length} present.`);const n=[];{let e=arguments[0];e=br.USVString(e,{context:"Failed to execute 'parse' on 'URL': parameter 1",globals:t}),n.push(e)}{let e=arguments[1];void 0!==e&&(e=br.USVString(e,{context:"Failed to execute 'parse' on 'URL': parameter 2",globals:t})),n.push(e)}return yr.tryWrapperForImpl(Iu.implementation.parse(t,...n))}static canParse(e){if(arguments.length<1)throw new t.TypeError(`Failed to execute 'canParse' on 'URL': 1 argument required, but only ${arguments.length} present.`);const n=[];{let e=arguments[0];e=br.USVString(e,{context:"Failed to execute 'canParse' on 'URL': parameter 1",globals:t}),n.push(e)}{let e=arguments[1];void 0!==e&&(e=br.USVString(e,{context:"Failed to execute 'canParse' on 'URL': parameter 2",globals:t})),n.push(e)}return Iu.implementation.canParse(...n)}}Object.defineProperties(i.prototype,{toJSON:{enumerable:!0},href:{enumerable:!0},toString:{enumerable:!0},origin:{enumerable:!0},protocol:{enumerable:!0},username:{enumerable:!0},password:{enumerable:!0},host:{enumerable:!0},hostname:{enumerable:!0},port:{enumerable:!0},pathname:{enumerable:!0},search:{enumerable:!0},searchParams:{enumerable:!0},hash:{enumerable:!0},[Symbol.toStringTag]:{value:"URL",configurable:!0}}),Object.defineProperties(i,{parse:{enumerable:!0},canParse:{enumerable:!0}}),u.URL=i,Object.defineProperty(t,"URL",{configurable:!0,writable:!0,value:i}),r.includes("Window")&&Object.defineProperty(t,"webkitURL",{configurable:!0,writable:!0,value:i})}});Ru.is,Ru.isImpl,Ru.convert,Ru.create,Ru.createImpl,Ru._internalSetup,Ru.setup,Ru.install;var ju={URL:Ru,URLSearchParams:Bu};const{URL:Su,URLSearchParams:_u}=ju,Uu={Array:Array,Object:Object,Promise:Promise,String:String,TypeError:TypeError};Su.install(Uu,["Window"]),_u.install(Uu,["Window"]);var Pu={URL:Uu.URL,URLSearchParams:Uu.URLSearchParams,parseURL:fu.parseURL,basicURLParse:fu.basicURLParse,serializeURL:fu.serializeURL,serializePath:fu.serializePath,serializeHost:fu.serializeHost,serializeInteger:fu.serializeInteger,serializeURLOrigin:fu.serializeURLOrigin,setTheUsername:fu.setTheUsername,setThePassword:fu.setThePassword,cannotHaveAUsernamePasswordPort:fu.cannotHaveAUsernamePasswordPort,hasAnOpaquePath:fu.hasAnOpaquePath,percentDecodeString:pu.percentDecodeString,percentDecodeBytes:pu.percentDecodeBytes};const Ou=o.Readable,ku=Symbol("buffer"),xu=Symbol("type");class Tu{constructor(){this[xu]="";const t=arguments[0],e=arguments[1],n=[];let r=0;if(t){const e=t,u=Number(e.length);for(let t=0;t<u;t++){const u=e[t];let o;o=u instanceof Buffer?u:ArrayBuffer.isView(u)?Buffer.from(u.buffer,u.byteOffset,u.byteLength):u instanceof ArrayBuffer?Buffer.from(u):u instanceof Tu?u[ku]:Buffer.from("string"==typeof u?u:String(u)),r+=o.length,n.push(o)}}this[ku]=Buffer.concat(n);let u=e&&void 0!==e.type&&String(e.type).toLowerCase();u&&!/[^\u0020-\u007E]/.test(u)&&(this[xu]=u)}get size(){return this[ku].length}get type(){return this[xu]}text(){return Promise.resolve(this[ku].toString())}arrayBuffer(){const t=this[ku],e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(e)}stream(){const t=new Ou;return t._read=function(){},t.push(this[ku]),t.push(null),t}toString(){return"[object Blob]"}slice(){const t=this.size,e=arguments[0],n=arguments[1];let r,u;r=void 0===e?0:e<0?Math.max(t+e,0):Math.min(e,t),u=void 0===n?t:n<0?Math.max(t+n,0):Math.min(n,t);const o=Math.max(u-r,0),i=this[ku].slice(r,r+o),s=new Tu([],{type:arguments[2]});return s[ku]=i,s}}function Lu(t,e,n){Error.call(this,t),this.message=t,this.type=e,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let Nu;Object.defineProperties(Tu.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(Tu.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),Lu.prototype=Object.create(Error.prototype),Lu.prototype.constructor=Lu,Lu.prototype.name="FetchError";try{Nu=require("encoding").convert}catch(t){}const qu=Symbol("Body internals"),Mu=o.PassThrough;function Gu(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.size;let u=void 0===r?0:r;var i=n.timeout;let s=void 0===i?0:i;null==t?t=null:$u(t)?t=Buffer.from(t.toString()):Wu(t)||Buffer.isBuffer(t)||("[object ArrayBuffer]"===Object.prototype.toString.call(t)?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof o||(t=Buffer.from(String(t)))),this[qu]={body:t,disturbed:!1,error:null},this.size=u,this.timeout=s,t instanceof o&&t.on("error",function(t){const n="AbortError"===t.name?t:new Lu(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[qu].error=n})}function zu(){var t=this;if(this[qu].disturbed)return Gu.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[qu].disturbed=!0,this[qu].error)return Gu.Promise.reject(this[qu].error);let e=this.body;if(null===e)return Gu.Promise.resolve(Buffer.alloc(0));if(Wu(e)&&(e=e.stream()),Buffer.isBuffer(e))return Gu.Promise.resolve(e);if(!(e instanceof o))return Gu.Promise.resolve(Buffer.alloc(0));let n=[],r=0,u=!1;return new Gu.Promise(function(o,i){let s;t.timeout&&(s=setTimeout(function(){u=!0,i(new Lu(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))},t.timeout)),e.on("error",function(e){"AbortError"===e.name?(u=!0,i(e)):i(new Lu(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e))}),e.on("data",function(e){if(!u&&null!==e){if(t.size&&r+e.length>t.size)return u=!0,void i(new Lu(`content size at ${t.url} over limit: ${t.size}`,"max-size"));r+=e.length,n.push(e)}}),e.on("end",function(){if(!u){clearTimeout(s);try{o(Buffer.concat(n,r))}catch(e){i(new Lu(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}})})}function $u(t){return"object"==typeof t&&"function"==typeof t.append&&"function"==typeof t.delete&&"function"==typeof t.get&&"function"==typeof t.getAll&&"function"==typeof t.has&&"function"==typeof t.set&&("URLSearchParams"===t.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(t)||"function"==typeof t.sort)}function Wu(t){return"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}function Ju(t){let e,n,r=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof o&&"function"!=typeof r.getBoundary&&(e=new Mu,n=new Mu,r.pipe(e),r.pipe(n),t[qu].body=e,r=n),r}function Vu(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":$u(t)?"application/x-www-form-urlencoded;charset=UTF-8":Wu(t)?t.type||null:Buffer.isBuffer(t)||"[object ArrayBuffer]"===Object.prototype.toString.call(t)||ArrayBuffer.isView(t)?null:"function"==typeof t.getBoundary?`multipart/form-data;boundary=${t.getBoundary()}`:t instanceof o?null:"text/plain;charset=UTF-8"}function Hu(t){const e=t.body;return null===e?0:Wu(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}Gu.prototype={get body(){return this[qu].body},get bodyUsed(){return this[qu].disturbed},arrayBuffer(){return zu.call(this).then(function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)})},blob(){let t=this.headers&&this.headers.get("content-type")||"";return zu.call(this).then(function(e){return Object.assign(new Tu([],{type:t.toLowerCase()}),{[ku]:e})})},json(){var t=this;return zu.call(this).then(function(e){try{return JSON.parse(e.toString())}catch(e){return Gu.Promise.reject(new Lu(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}})},text(){return zu.call(this).then(function(t){return t.toString()})},buffer(){return zu.call(this)},textConverted(){var t=this;return zu.call(this).then(function(e){return function(t,e){if("function"!=typeof Nu)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=e.get("content-type");let r,u,o="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));u=t.slice(0,1024).toString(),!r&&u&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(u));!r&&u&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(u),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(u),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop())));!r&&u&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(u));r&&(o=r.pop(),"gb2312"!==o&&"gbk"!==o||(o="gb18030"));return Nu(t,"UTF-8",o).toString()}(e,t.headers)})}},Object.defineProperties(Gu.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),Gu.mixIn=function(t){for(const e of Object.getOwnPropertyNames(Gu.prototype))if(!(e in t)){const n=Object.getOwnPropertyDescriptor(Gu.prototype,e);Object.defineProperty(t,e,n)}},Gu.Promise=global.Promise;const Zu=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,Yu=/[^\t\x20-\x7e\x80-\xff]/;function Ku(t){if(t=`${t}`,Zu.test(t)||""===t)throw new TypeError(`${t} is not a legal HTTP header name`)}function Xu(t){if(t=`${t}`,Yu.test(t))throw new TypeError(`${t} is not a legal HTTP header value`)}function Qu(t,e){e=e.toLowerCase();for(const n in t)if(n.toLowerCase()===e)return n}const to=Symbol("map");class eo{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[to]=Object.create(null),t instanceof eo){const e=t.raw(),n=Object.keys(e);for(const t of n)for(const n of e[t])this.append(t,n);return}if(null==t);else{if("object"!=typeof t)throw new TypeError("Provided initializer must be an object");{const e=t[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const n=[];for(const e of t){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(e))}for(const t of n){if(2!==t.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(t[0],t[1])}}else for(const e of Object.keys(t)){const n=t[e];this.append(e,n)}}}}get(t){Ku(t=`${t}`);const e=Qu(this[to],t);return void 0===e?null:this[to][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=no(this),r=0;for(;r<n.length;){var u=n[r];const o=u[0],i=u[1];t.call(e,i,o,this),n=no(this),r++}}set(t,e){e=`${e}`,Ku(t=`${t}`),Xu(e);const n=Qu(this[to],t);this[to][void 0!==n?n:t]=[e]}append(t,e){e=`${e}`,Ku(t=`${t}`),Xu(e);const n=Qu(this[to],t);void 0!==n?this[to][n].push(e):this[to][t]=[e]}has(t){return Ku(t=`${t}`),void 0!==Qu(this[to],t)}delete(t){Ku(t=`${t}`);const e=Qu(this[to],t);void 0!==e&&delete this[to][e]}raw(){return this[to]}keys(){return uo(this,"key")}values(){return uo(this,"value")}[Symbol.iterator](){return uo(this,"key+value")}}function no(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(t[to]).sort().map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[to][e].join(", ")}:function(e){return[e.toLowerCase(),t[to][e].join(", ")]})}eo.prototype.entries=eo.prototype[Symbol.iterator],Object.defineProperty(eo.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(eo.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const ro=Symbol("internal");function uo(t,e){const n=Object.create(oo);return n[ro]={target:t,kind:e,index:0},n}const oo=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==oo)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[ro];const e=t.target,n=t.kind,r=t.index,u=no(e,n);return r>=u.length?{value:void 0,done:!0}:(this[ro].index=r+1,{value:u[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function io(t){const e=Object.assign({__proto__:null},t[to]),n=Qu(t[to],"Host");return void 0!==n&&(e[n]=e[n][0]),e}Object.defineProperty(oo,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const so=Symbol("Response internals"),ao=s.STATUS_CODES;class co{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Gu.call(this,t,e);const n=e.status||200,r=new eo(e.headers);if(null!=t&&!r.has("Content-Type")){const e=Vu(t);e&&r.append("Content-Type",e)}this[so]={url:e.url,status:n,statusText:e.statusText||ao[n],headers:r,counter:e.counter}}get url(){return this[so].url||""}get status(){return this[so].status}get ok(){return this[so].status>=200&&this[so].status<300}get redirected(){return this[so].counter>0}get statusText(){return this[so].statusText}get headers(){return this[so].headers}clone(){return new co(Ju(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Gu.mixIn(co.prototype),Object.defineProperties(co.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(co.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const lo=Symbol("Request internals"),ho=a.URL||Pu.URL,po=a.parse,fo=a.format;function mo(t){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(t)&&(t=new ho(t).toString()),po(t)}const vo="destroy"in o.Readable.prototype;function Eo(t){return"object"==typeof t&&"object"==typeof t[lo]}class Ao{constructor(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Eo(t)?e=mo(t.url):(e=t&&t.href?mo(t.href):mo(`${t}`),t={});let r=n.method||t.method||"GET";if(r=r.toUpperCase(),(null!=n.body||Eo(t)&&null!==t.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let u=null!=n.body?n.body:Eo(t)&&null!==t.body?Ju(t):null;Gu.call(this,u,{timeout:n.timeout||t.timeout||0,size:n.size||t.size||0});const o=new eo(n.headers||t.headers||{});if(null!=u&&!o.has("Content-Type")){const t=Vu(u);t&&o.append("Content-Type",t)}let i=Eo(t)?t.signal:null;if("signal"in n&&(i=n.signal),null!=i&&!function(t){const e=t&&"object"==typeof t&&Object.getPrototypeOf(t);return!(!e||"AbortSignal"!==e.constructor.name)}(i))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[lo]={method:r,redirect:n.redirect||t.redirect||"follow",headers:o,parsedURL:e,signal:i},this.follow=void 0!==n.follow?n.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===t.compress||t.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent}get method(){return this[lo].method}get url(){return fo(this[lo].parsedURL)}get headers(){return this[lo].headers}get redirect(){return this[lo].redirect}get signal(){return this[lo].signal}clone(){return new Ao(this)}}function bo(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}Gu.mixIn(Ao.prototype),Object.defineProperty(Ao.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Ao.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),bo.prototype=Object.create(Error.prototype),bo.prototype.constructor=bo,bo.prototype.name="AbortError";const yo=a.URL||Pu.URL,go=o.PassThrough;function Co(t,e){if(!Co.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return Gu.Promise=Co.Promise,new Co.Promise(function(n,r){const u=new Ao(t,e),i=function(t){const e=t[lo].parsedURL,n=new eo(t[lo].headers);if(n.has("Accept")||n.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(t.signal&&t.body instanceof o.Readable&&!vo)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let r=null;if(null==t.body&&/^(POST|PUT)$/i.test(t.method)&&(r="0"),null!=t.body){const e=Hu(t);"number"==typeof e&&(r=String(e))}r&&n.set("Content-Length",r),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),t.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let u=t.agent;return"function"==typeof u&&(u=u(e)),n.has("Connection")||u||n.set("Connection","close"),Object.assign({},e,{method:t.method,headers:io(n),agent:u})}(u),a=("https:"===i.protocol?d:s).request,c=u.signal;let l=null;const p=function(){let t=new bo("The user aborted a request.");r(t),u.body&&u.body instanceof o.Readable&&u.body.destroy(t),l&&l.body&&l.body.emit("error",t)};if(c&&c.aborted)return void p();const f=function(){p(),E()},m=a(i);let v;function E(){m.abort(),c&&c.removeEventListener("abort",f),clearTimeout(v)}c&&c.addEventListener("abort",f),u.timeout&&m.once("socket",function(t){v=setTimeout(function(){r(new Lu(`network timeout at: ${u.url}`,"request-timeout")),E()},u.timeout)}),m.on("error",function(t){r(new Lu(`request to ${u.url} failed, reason: ${t.message}`,"system",t)),E()}),m.on("response",function(t){clearTimeout(v);const e=function(t){const e=new eo;for(const n of Object.keys(t))if(!Zu.test(n))if(Array.isArray(t[n]))for(const r of t[n])Yu.test(r)||(void 0===e[to][n]?e[to][n]=[r]:e[to][n].push(r));else Yu.test(t[n])||(e[to][n]=[t[n]]);return e}(t.headers);if(Co.isRedirect(t.statusCode)){const o=e.get("Location");let i=null;try{i=null===o?null:new yo(o,u.url).toString()}catch(t){if("manual"!==u.redirect)return r(new Lu(`uri requested responds with an invalid redirect URL: ${o}`,"invalid-redirect")),void E()}switch(u.redirect){case"error":return r(new Lu(`uri requested responds with a redirect, redirect mode is set to error: ${u.url}`,"no-redirect")),void E();case"manual":if(null!==i)try{e.set("Location",i)}catch(t){r(t)}break;case"follow":if(null===i)break;if(u.counter>=u.follow)return r(new Lu(`maximum redirect reached at: ${u.url}`,"max-redirect")),void E();const o={headers:new eo(u.headers),follow:u.follow,counter:u.counter+1,agent:u.agent,compress:u.compress,method:u.method,body:u.body,signal:u.signal,timeout:u.timeout,size:u.size};if(!function(t,e){const n=new yo(e).hostname,r=new yo(t).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(u.url,i))for(const t of["authorization","www-authenticate","cookie","cookie2"])o.headers.delete(t);return 303!==t.statusCode&&u.body&&null===Hu(u)?(r(new Lu("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void E()):(303!==t.statusCode&&(301!==t.statusCode&&302!==t.statusCode||"POST"!==u.method)||(o.method="GET",o.body=void 0,o.headers.delete("content-length")),n(Co(new Ao(i,o))),void E())}}t.once("end",function(){c&&c.removeEventListener("abort",f)});let o=t.pipe(new go);const i={url:u.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:u.size,timeout:u.timeout,counter:u.counter},s=e.get("Content-Encoding");if(!u.compress||"HEAD"===u.method||null===s||204===t.statusCode||304===t.statusCode)return l=new co(o,i),void n(l);const a={flush:h.Z_SYNC_FLUSH,finishFlush:h.Z_SYNC_FLUSH};if("gzip"==s||"x-gzip"==s)return o=o.pipe(h.createGunzip(a)),l=new co(o,i),void n(l);if("deflate"==s||"x-deflate"==s){return void t.pipe(new go).once("data",function(t){o=8==(15&t[0])?o.pipe(h.createInflate()):o.pipe(h.createInflateRaw()),l=new co(o,i),n(l)})}if("br"==s&&"function"==typeof h.createBrotliDecompress)return o=o.pipe(h.createBrotliDecompress()),l=new co(o,i),void n(l);l=new co(o,i),n(l)}),function(t,e){const n=e.body;null===n?t.end():Wu(n)?n.stream().pipe(t):Buffer.isBuffer(n)?(t.write(n),t.end()):n.pipe(t)}(m,u)})}Co.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},Co.Promise=global.Promise;var Fo="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,wo=Fo?Co:window.fetch;var Do=function(t){return Array.isArray(t)?t:[t]},Bo=function(t,e){return J(void 0,void 0,void 0,function(){var n;return V(this,function(r){return n=Promise.resolve([]),[2,t.reduce(function(t,n){return t.then(function(t){return e(n).then(function(e){return t.push(e),t})})},n)]})})},Io=function(t){function e(e){void 0===e&&(e=8192);var n=t.call(this)||this;return n.bufferDefaultSize=e,n._size=0,n.buffer=Buffer.alloc(n.bufferDefaultSize),n}return $(e,t),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.getContentsAsString=function(t,e){void 0===t&&(t="utf8");var n=this.buffer.toString(t,0,Math.min(e||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},e.prototype.adaptBuffer=function(t){if(this.buffer.length-this.size<t){var e=Math.ceil((t-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*e);this.buffer.copy(n,0,0,this.size),this.buffer=n}},e.prototype._write=function(t,e,n){this.adaptBuffer(t.length),t.copy(this.buffer,this.size,0),this._size+=t.length,n()},e}(o.Writable),Ro=function(){function t(t,e){this.contextProvider=t,this.agent=e}return t.prototype.getServiceDetails=function(t,e){return J(this,void 0,void 0,function(){return V(this,function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/services/").concat(e))]})})},t.prototype.getAddonDetails=function(t,e){return J(this,void 0,void 0,function(){return V(this,function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/addons/").concat(e))]})})},t.prototype.fetch=function(t,e){return J(this,void 0,void 0,function(){var n,r,u,o,i,s=this;return V(this,function(a){switch(a.label){case 0:return n="Error while trying to connect, please try again.",r=mr({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},W(W({},e),{agent:this.agent})),[4,Xa(2)(function(){return J(s,void 0,void 0,function(){return V(this,function(e){return[2,wo(t,r)]})})}).catch(function(){throw new Error(n)})];case 1:return(u=a.sent()).ok?[3,3]:[4,u.text()];case 2:o=a.sent(),i=n;try{i=JSON.parse(o)}catch(t){i=null!=o?o:n}finally{throw new Error(JSON.stringify(i))}case 3:return[4,u.json()];case 4:return[2,a.sent()]}})})},t}(),jo=function(t,e,n){return J(void 0,void 0,void 0,function(){var r,u,o,i,s;return V(this,function(a){switch(a.label){case 0:if(r=Uo(e||"127.0.0.1"),(u=Uo(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===p.platform()&&(o=function(t){return J(void 0,void 0,void 0,function(){var e;return V(this,function(n){switch(n.label){case 0:return e="lo0 alias ".concat(t," up"),[4,_o.apply(void 0,e.split(" "))];case 1:return n.sent(),[2]}})})}),i=r,a.label=1;case 1:return i<=u?(s=Po(i),[4,So(t,s)]):[3,6];case 2:return a.sent()?o?[4,o(s)]:[3,4]:[3,5];case 3:a.sent(),a.label=4;case 4:return[2,s];case 5:return i+=1,[3,1];case 6:throw new Error("Not possible to assign port '".concat(t,"' to an IP address on this machine. Please check if there is already a service running with this port which binds to the wildcard host address (0.0.0.0) and stop this service."))}})})},So=function(t,e){return new Promise(function(n){var r=new v,u=!1;r.on("connect",function(){u=!0,r.destroy()}),r.setTimeout(400),r.on("timeout",function(){u=!1,r.destroy()}),r.on("error",function(){u=!1}),r.on("close",function(){n(!u)}),e?r.connect(t,e):r.connect(t)})},_o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return J(void 0,void 0,void 0,function(){return V(this,function(e){switch(e.label){case 0:return[4,Oo("/sbin/ifconfig",t).resultPromise];case 1:return[2,e.sent()]}})})},Uo=function(t){var e=t.split(".").reverse();if(4!==e.length)throw new Error("Invalid ip address: ".concat(t));for(var n=0,r=0;r<4;r+=1){var u=Number.parseInt(e[r],10);if(u<0||u>255)throw new Error("Invalid ip address: ".concat(t));n+=u<<8*r}return n},Po=function(t){if(!Number.isSafeInteger(t))throw new Error("Number is not an integer");if(t<0||t>4294967295)throw new Error("Number is out of range 0x0-0xffffffff");for(var e=[],n=0;n<4;n+=1)e.push(t>>8*n&255);return e.reverse().join(".")},Oo=function(t,e,n){var u=r(t,e,W({windowsHide:!0},n)),o=new Promise(function(r,o){var i="",s="";(null===(null==n?void 0:n.stdio)||void 0===(null==n?void 0:n.stdio))&&(u.stdout&&u.stdout.on("data",function(t){i+=t}),u.stderr&&u.stderr.on("data",function(t){s+=t})),u.on("close",function(n){var u={code:n,stdout:i,stderr:s};if(0!==n){var a="Error during execution of command '".concat(t," ").concat(e.join(" "),"': ").concat(s);o({message:a,result:u})}else r(u)})});return{process:u,resultPromise:o}},ko=function(t,e,n){return J(void 0,void 0,void 0,function(){var r,u;return V(this,function(o){switch(o.label){case 0:return r=xo(t,10),[4,E.promises.writeFile(r,e,n)];case 1:o.sent(),o.label=2;case 2:return o.trys.push([2,4,,6]),[4,E.promises.rename(r,t)];case 3:return o.sent(),[3,6];case 4:return u=o.sent(),[4,E.promises.unlink(r).catch(function(){})];case 5:throw o.sent(),u;case 6:return[2]}})})},xo=function(t,e){for(var n,r=function(t){return H([],Array(t),!0).map(function(){return Math.floor(16*Math.random()).toString(16)}).join("")},u=C.dirname(t),o=C.basename(t),i=0;null===(n=i<e)||void 0===n||n;i+=1){var s=r(16),a=".".concat(s,".").concat(o),c=C.join(u,a);if(!E.existsSync(c))return c}throw new Error("Could not write file to file '".concat(t,"'."))},To="win32"===process.platform?"\r\n":"\n",Lo=function(){function t(t,e){this.nodes=t,this.config=e}return t.prototype.add=function(t,e,n){var r=this;if(0===e.length)return this;var u=this.findOrCreateEntry(t,n);return e.forEach(function(t){if(!u.hosts.find(function(e){return e.host===t})){var e=1;0===u.hosts.length&&(e=r.config.indent-"".concat(u.ipPrefixWhitespace).concat(u.ip).length),u.hosts.push({whitespace:" ".repeat(e<1?1:e),host:t})}}),this},t.prototype.remove=function(t,e){var n=this;return this.findEntries(t).forEach(function(t){e.forEach(function(e){var r=t.hosts.findIndex(function(t){return t.host===e});r<0||(0===r&&void 0!==t.hosts[1]&&(t.hosts[1].whitespace=t.hosts[0].whitespace),t.hosts.splice(r,1),0===t.hosts.length&&n.removeEntry(t))})}),this},t.prototype.removeHosts=function(t){var e=this;Wo(this.nodes,"entry").forEach(function(n){e.remove(n.ip,t)})},t.prototype.removeIps=function(t){var e=this;return t.forEach(function(t){e.findEntries(t).forEach(function(t){return e.removeEntry(t)})}),this},t.prototype.resolveHosts=function(t){return cr(this.findEntries(t),function(t){return t.hosts.map(function(t){return t.host})})},t.prototype.resolveIps=function(t){return Wo(this.nodes,"entry").filter(function(e){return e.hosts.some(function(e){return e.host===t})}).map(function(t){return t.ip})},t.prototype.toString=function(){return Go(this.nodes,this.config.eol)},t.prototype.removeEntry=function(t){var e,n="number"==typeof(e=t)||it(e)&&"[object Number]"==ot(e)?t:this.nodes.findIndex(function(e){return e===t});n<0||this.nodes.splice(n,1)},t.prototype.findEntries=function(t){return Wo(this.nodes,"entry").filter(function(e){return e.ip===t})},t.prototype.findOrCreateEntry=function(t,e){var n=this.findEntries(t)[0];if(n)return n;var r=this.makeEntry(t);if(e){var u=Mo(e),o=this.nodes.findIndex(function(t){return"comment"===t.type&&t.line===u});if(o>=0)this.insertAt(o+1,r);else{var i="blank"!==this.nodes[this.nodes.length-1].type?[No(),qo(u),r]:[qo(u),r];this.insertAt.apply(this,H([this.nodes.length],i,!1))}}else this.insertAt(this.nodes.length,r);return r},t.prototype.insertAt=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(e=this.nodes).splice.apply(e,H([t,0],n,!1))},t.prototype.makeEntry=function(t,e){var n=this.config.ipPrefixWhitespace;return W({type:"entry",ip:t,ipPrefixWhitespace:n,hosts:[]},e)},t.fromNodes=function(e,n){var r,u;return new t(e.filter(function(t){return"eol"!==t.type}),{eol:null!==(r=null==n?void 0:n.eol)&&void 0!==r?r:function(){var t,n=Wo(e,"eol").map(function(t){return t.line});return null!==(t=Jo(n))&&void 0!==t?t:To}(),indent:null!==(u=null==n?void 0:n.indent)&&void 0!==u?u:function(){var t,n=cr(Wo(e,"entry"),function(t){var e=t.ipPrefixWhitespace,n=t.ip,r=t.hosts[0];return r?["".concat(e).concat(n).concat(r.whitespace).length]:[]});return null!==(t=Jo(n))&&void 0!==t?t:17}(),ipPrefixWhitespace:""})},t.parse=function(t,e){return this.fromNodes(zo(t),e)},t}(),No=function(){return{type:"blank",line:""}},qo=function(t){return{type:"comment",line:Mo(t)}},Mo=function(t){return t.startsWith("#")?t:"# ".concat(t)},Go=function(t,e){var n=t.map(function(t){switch(t.type){case"entry":var e=t.hosts.map(function(t){var e=t.whitespace,n=t.host;return"".concat(e).concat(n)}).join("");return"".concat(t.ipPrefixWhitespace).concat(t.ip).concat(e);case"blank":case"comment":case"invalid":return t.line;default:return""}});return n.join(null!=e?e:To)},zo=function(t){return t.split(/(\r?\n)/).map(function(t){return function(t){return t.match(/^\s*#.*$/)}(t)?{type:"comment",line:t}:function(t){return t.match(/^(\r?\n)$/)}(t)?{type:"eol",line:t}:function(t){return t.match(/^\s*$/)}(t)?{type:"blank",line:t}:$o(t)})},$o=function(t){var e=t.match(/^(\s*)(\S+)(.+)?$/);if(!e)return{type:"invalid",line:t};var n=e[1],r=e[2],u=e.slice(3),o=!1,i=cr(u.filter(function(t){return void 0!==t}),function(t){var e=t.match(/(\s+)(\S+)/g);return e?e.map(function(t){var e=t.match(/^(\s+)(\S+)$/);e||(o=!0);var n=null!=e?e:[];return{whitespace:n[1],host:n[2]}}):(o=!0,[])});return o?{type:"invalid",line:t}:{type:"entry",ipPrefixWhitespace:n,ip:r,hosts:i}},Wo=function(t,e){return t.filter(function(t){return t.type===e})},Jo=function(t){var e=new Map;t.forEach(function(t){var n;e.set(t,(null!==(n=e.get(t))&&void 0!==n?n:0)+1)});var n=pr(Array.from(e.entries()),function(t){return t[1]});if(n)return n[0]},Vo="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",Ho=function(){function t(t){this.ast=Lo.fromNodes([]);var e={writeMode:"atomic",hostsFile:Vo};this.config=W(W({},e),t)}return t.prototype.add=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!hr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach(function(t){if(!hr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))}),this.ast.add(t,e,this.config.header),this},t.prototype.remove=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!hr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach(function(t){if(!hr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))}),this.ast.remove(t,e),this},t.prototype.removeHosts=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach(function(t){if(!hr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))}),this.ast.removeHosts(t),this},t.prototype.removeIps=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach(function(t){if(!hr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."))}),this.ast.removeIps(t),this},t.prototype.read=function(){return J(this,void 0,void 0,function(){var t;return V(this,function(e){switch(e.label){case 0:return[4,E.promises.readFile(this.config.hostsFile)];case 1:return t=e.sent(),this.ast=Lo.parse(t.toString(),this.config),[2,this]}})})},t.prototype.write=function(t){return J(this,void 0,void 0,function(){var e,n,r,u;return V(this,function(o){switch(o.label){case 0:switch(e=W(W({},this.config),t),n=e.hostsFile,r=e.writeMode,u=this.ast.toString(),r){case void 0:case"atomic":return[3,1];case"standard":return[3,3];case"disabled":return[3,5]}return[3,5];case 1:return[4,ko(n,u)];case 2:case 4:return o.sent(),[3,6];case 3:return[4,E.promises.writeFile(n,u)];case 5:return[3,6];case 6:return[2,this]}})})},t.prototype.backup=function(t){return J(this,void 0,void 0,function(){var e,n,r,u;return V(this,function(o){switch(o.label){case 0:return E.existsSync(this.config.hostsFile)?(e=C.dirname(this.config.hostsFile),n=C.basename(this.config.hostsFile),r="".concat(n).concat(t.suffix),u=C.resolve(e,r),E.existsSync(u)&&!t.rewrite?[3,2]:[4,E.promises.copyFile(this.config.hostsFile,u)]):[2];case 1:o.sent(),o.label=2;case 2:return[2]}})})},t.load=function(e){return J(this,void 0,void 0,function(){return V(this,function(n){switch(n.label){case 0:return[4,new t(e).read()];case 1:return[2,n.sent()]}})})},t}(),Zo=function(){function t(){this.previousPromise=Promise.resolve(),this._queueLength=0}return Object.defineProperty(t.prototype,"queueLength",{get:function(){return this._queueLength},enumerable:!1,configurable:!0}),t.prototype.enter=function(t){return J(this,void 0,void 0,function(){var e,n=this;return V(this,function(r){return this._queueLength+=1,e=this.previousPromise.then(function(){return n._queueLength-=1,t()},function(){return n._queueLength-=1,t()}),this.previousPromise=e,[2,e]})})},t}(),Yo=function t(e,n){if(e&&n)return t(e)(n);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(t){r[t]=e[t]}),r;function r(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];var r=e.apply(this,t),u=t[t.length-1];return"function"==typeof r&&r!==u&&Object.keys(u).forEach(function(t){r[t]=u[t]}),r}};var Ko=Yo(Qo),Xo=Yo(ti);function Qo(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function ti(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return e.onceError=n+" shouldn't be called more than once",e.called=!1,e}Qo.proto=Qo(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Qo(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return ti(this)},configurable:!0})}),Ko.strict=Xo;var ei,ni=function(){},ri=vr.Bare?queueMicrotask:process.nextTick.bind(process),ui=function(t,e,n){if("function"==typeof e)return ui(t,null,e);e||(e={}),n=Ko(n||ni);var r=t._writableState,u=t._readableState,o=e.readable||!1!==e.readable&&t.readable,i=e.writable||!1!==e.writable&&t.writable,s=!1,a=function(){t.writable||c()},c=function(){i=!1,o||n.call(t)},d=function(){o=!1,i||n.call(t)},l=function(e){n.call(t,e?new Error("exited with error code: "+e):null)},h=function(e){n.call(t,e)},p=function(){ri(f)},f=function(){if(!s)return(!o||u&&u.ended&&!u.destroyed)&&(!i||r&&r.ended&&!r.destroyed)?void 0:n.call(t,new Error("premature close"))},m=function(){t.req.on("finish",c)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?i&&!r&&(t.on("end",a),t.on("close",a)):(t.on("complete",c),t.on("abort",p),t.req?m():t.on("request",m)),function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length}(t)&&t.on("exit",l),t.on("end",d),t.on("finish",c),!1!==e.error&&t.on("error",h),t.on("close",p),function(){s=!0,t.removeListener("complete",c),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",c),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",c),t.removeListener("exit",l),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",p)}},oi=ui;try{ei=E}catch(t){}var ii=function(){},si="undefined"!=typeof process&&/^v?\.0/.test(process.version),ai=function(t){return"function"==typeof t},ci=function(t,e,n,r){r=Ko(r);var u=!1;t.on("close",function(){u=!0}),oi(t,{readable:e,writable:n},function(t){if(t)return r(t);u=!0,r()});var o=!1;return function(e){if(!u&&!o)return o=!0,function(t){return!!si&&!!ei&&(t instanceof(ei.ReadStream||ii)||t instanceof(ei.WriteStream||ii))&&ai(t.close)}(t)?t.close(ii):function(t){return t.setHeader&&ai(t.abort)}(t)?t.abort():ai(t.destroy)?t.destroy():void r(e||new Error("stream was destroyed"))}},di=function(t){t()},li=function(t,e){return t.pipe(e)},hi=function(){var t,e=Array.prototype.slice.call(arguments),n=ai(e[e.length-1]||ii)&&e.pop()||ii;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r=e.map(function(u,o){var i=o<e.length-1;return ci(u,i,o>0,function(e){t||(t=e),e&&r.forEach(di),i||(r.forEach(di),n(t))})});return e.reduce(li)};const pi=["nodebuffer","arraybuffer","fragments"],fi="undefined"!=typeof Blob;fi&&pi.push("blob");var mi={BINARY_TYPES:pi,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:fi,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},vi="function"==typeof __webpack_require__?__non_webpack_require__:Er,Ei=process.config&&process.config.variables||{},Ai=!!process.env.PREBUILDS_ONLY,bi=process.versions.modules,yi=!(!process.versions||!process.versions.electron)||!!process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",gi=process.env.npm_config_arch||p.arch(),Ci=process.env.npm_config_platform||p.platform(),Fi=process.env.LIBC||(function(t){return"linux"===t&&E.existsSync("/etc/alpine-release")}(Ci)?"musl":"glibc"),wi=process.env.ARM_VERSION||("arm64"===gi?"8":Ei.arm_version)||"",Di=(process.versions.uv||"").split(".")[0],Bi=Ii;function Ii(t){return vi(Ii.resolve(t))}function Ri(t){try{return E.readdirSync(t)}catch(t){return[]}}function ji(t,e){var n=Ri(t).filter(e);return n[0]&&C.join(t,n[0])}function Si(t){return/\.node$/.test(t)}function _i(t){var e=t.split("-");if(2===e.length){var n=e[0],r=e[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:t,platform:n,architectures:r}}}function Ui(t,e){return function(n){return null!=n&&(n.platform===t&&n.architectures.includes(e))}}function Pi(t,e){return t.architectures.length-e.architectures.length}function Oi(t){var e=t.split("."),n={file:t,specificity:0};if("node"===e.pop()){for(var r=0;r<e.length;r++){var u=e[r];if("node"===u||"electron"===u||"node-webkit"===u)n.runtime=u;else if("napi"===u)n.napi=!0;else if("abi"===u.slice(0,3))n.abi=u.slice(3);else if("uv"===u.slice(0,2))n.uv=u.slice(2);else if("armv"===u.slice(0,4))n.armv=u.slice(4);else{if("glibc"!==u&&"musl"!==u)continue;n.libc=u}n.specificity++}return n}}function ki(t,e){return function(n){return null!=n&&(!(n.runtime&&n.runtime!==t&&!function(t){return"node"===t.runtime&&t.napi}(n))&&(!(n.abi&&n.abi!==e&&!n.napi)&&((!n.uv||n.uv===Di)&&((!n.armv||n.armv===wi)&&(!n.libc||n.libc===Fi)))))}}function xi(t){return function(e,n){return e.runtime!==n.runtime?e.runtime===t?-1:1:e.abi!==n.abi?e.abi?-1:1:e.specificity!==n.specificity?e.specificity>n.specificity?-1:1:0}}Ii.resolve=Ii.path=function(t){t=C.resolve(t||".");try{var e=vi(C.join(t,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[e+"_PREBUILD"]&&(t=process.env[e+"_PREBUILD"])}catch(t){}if(!Ai){var n=ji(C.join(t,"build/Release"),Si);if(n)return n;var r=ji(C.join(t,"build/Debug"),Si);if(r)return r}var u=s(t);if(u)return u;var o=s(C.dirname(process.execPath));if(o)return o;var i=["platform="+Ci,"arch="+gi,"runtime="+yi,"abi="+bi,"uv="+Di,wi?"armv="+wi:"","libc="+Fi,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+i+"\n loaded from: "+t+"\n");function s(t){var e=Ri(C.join(t,"prebuilds")).map(_i).filter(Ui(Ci,gi)).sort(Pi)[0];if(e){var n=C.join(t,"prebuilds",e.name),r=Ri(n).map(Oi).filter(ki(yi,bi)).sort(xi(yi))[0];return r?C.join(n,r.file):void 0}}},Ii.parseTags=Oi,Ii.matchTags=ki,Ii.compareTags=xi,Ii.parseTuple=_i,Ii.matchTuple=Ui,Ii.compareTuples=Pi;var Ti=Ar(function(t){const e="function"==typeof __webpack_require__?__non_webpack_require__:Er;"function"==typeof e.addon?t.exports=e.addon.bind(e):t.exports=Bi});var Li={mask:(t,e,n,r,u)=>{for(var o=0;o<u;o++)n[r+o]=t[o]^e[3&o]},unmask:(t,e)=>{const n=t.length;for(var r=0;r<n;r++)t[r]^=e[3&r]}},Ni=Ar(function(t){try{t.exports=Ti(__dirname)}catch(e){t.exports=Li}}),qi=Ar(function(t){const{EMPTY_BUFFER:e}=mi,n=Buffer[Symbol.species];function r(t,e,n,r,u){for(let o=0;o<u;o++)n[r+o]=t[o]^e[3&o]}function u(t,e){for(let n=0;n<t.length;n++)t[n]^=e[3&n]}if(t.exports={concat:function(t,r){if(0===t.length)return e;if(1===t.length)return t[0];const u=Buffer.allocUnsafe(r);let o=0;for(let e=0;e<t.length;e++){const n=t[e];u.set(n,o),o+=n.length}return o<r?new n(u.buffer,u.byteOffset,o):u},mask:r,toArrayBuffer:function(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)},toBuffer:function t(e){if(t.readOnly=!0,Buffer.isBuffer(e))return e;let r;return e instanceof ArrayBuffer?r=new n(e):ArrayBuffer.isView(e)?r=new n(e.buffer,e.byteOffset,e.byteLength):(r=Buffer.from(e),t.readOnly=!1),r},unmask:u},!process.env.WS_NO_BUFFER_UTIL)try{const e=Ni;t.exports.mask=function(t,n,u,o,i){i<48?r(t,n,u,o,i):e.mask(t,n,u,o,i)},t.exports.unmask=function(t,n){t.length<32?u(t,n):e.unmask(t,n)}}catch(t){}});qi.concat,qi.mask,qi.toArrayBuffer,qi.toBuffer,qi.unmask;const Mi=Symbol("kDone"),Gi=Symbol("kRun");var zi=class{constructor(t){this[Mi]=()=>{this.pending--,this[Gi]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[Gi]()}[Gi](){if(this.pending!==this.concurrency&&this.jobs.length){const t=this.jobs.shift();this.pending++,t(this[Mi])}}};const{kStatusCode:$i}=mi,Wi=Buffer[Symbol.species],Ji=Buffer.from([0,0,255,255]),Vi=Symbol("permessage-deflate"),Hi=Symbol("total-length"),Zi=Symbol("callback"),Yi=Symbol("buffers"),Ki=Symbol("error");let Xi;var Qi=class{constructor(t,e,n){if(this._maxPayload=0|n,this._options=t||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!e,this._deflate=null,this._inflate=null,this.params=null,!Xi){const t=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;Xi=new zi(t)}}static get extensionName(){return"permessage-deflate"}offer(){const t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const t=this._deflate[Zi];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){const e=this._options,n=t.find(t=>!(!1===e.serverNoContextTakeover&&t.server_no_context_takeover||t.server_max_window_bits&&(!1===e.serverMaxWindowBits||"number"==typeof e.serverMaxWindowBits&&e.serverMaxWindowBits>t.server_max_window_bits)||"number"==typeof e.clientMaxWindowBits&&!t.client_max_window_bits));if(!n)throw new Error("None of the extension offers can be accepted");return e.serverNoContextTakeover&&(n.server_no_context_takeover=!0),e.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof e.serverMaxWindowBits&&(n.server_max_window_bits=e.serverMaxWindowBits),"number"==typeof e.clientMaxWindowBits?n.client_max_window_bits=e.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==e.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(t){const e=t[0];if(!1===this._options.clientNoContextTakeover&&e.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(e.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&e.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(e.client_max_window_bits=this._options.clientMaxWindowBits);return e}normalizeParams(t){return t.forEach(t=>{Object.keys(t).forEach(e=>{let n=t[e];if(n.length>1)throw new Error(`Parameter "${e}" must have only a single value`);if(n=n[0],"client_max_window_bits"===e){if(!0!==n){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}else if("server_max_window_bits"===e){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else{if("client_no_context_takeover"!==e&&"server_no_context_takeover"!==e)throw new Error(`Unknown parameter "${e}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}t[e]=n})}),t}decompress(t,e,n){Xi.add(r=>{this._decompress(t,e,(t,e)=>{r(),n(t,e)})})}compress(t,e,n){Xi.add(r=>{this._compress(t,e,(t,e)=>{r(),n(t,e)})})}_decompress(t,e,n){const r=this._isServer?"client":"server";if(!this._inflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?h.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=h.createInflateRaw({...this._options.zlibInflateOptions,windowBits:e}),this._inflate[Vi]=this,this._inflate[Hi]=0,this._inflate[Yi]=[],this._inflate.on("error",ns),this._inflate.on("data",es)}this._inflate[Zi]=n,this._inflate.write(t),e&&this._inflate.write(Ji),this._inflate.flush(()=>{const t=this._inflate[Ki];if(t)return this._inflate.close(),this._inflate=null,void n(t);const u=qi.concat(this._inflate[Yi],this._inflate[Hi]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Hi]=0,this._inflate[Yi]=[],e&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,u)})}_compress(t,e,n){const r=this._isServer?"server":"client";if(!this._deflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?h.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=h.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:e}),this._deflate[Hi]=0,this._deflate[Yi]=[],this._deflate.on("data",ts)}this._deflate[Zi]=n,this._deflate.write(t),this._deflate.flush(h.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let t=qi.concat(this._deflate[Yi],this._deflate[Hi]);e&&(t=new Wi(t.buffer,t.byteOffset,t.length-4)),this._deflate[Zi]=null,this._deflate[Hi]=0,this._deflate[Yi]=[],e&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,t)})}};function ts(t){this[Yi].push(t),this[Hi]+=t.length}function es(t){this[Hi]+=t.length,this[Vi]._maxPayload<1||this[Hi]<=this[Vi]._maxPayload?this[Yi].push(t):(this[Ki]=new RangeError("Max payload size exceeded"),this[Ki].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Ki][$i]=1009,this.removeListener("data",es),this.reset())}function ns(t){this[Vi]._inflate=null,this[Ki]?this[Zi](this[Ki]):(t[$i]=1007,this[Zi](t))}var rs=function(t){const e=t.length;let n=0;for(;n<e;)if(128&t[n])if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}else n++;return!0},us=Ar(function(t){try{t.exports=Ti(__dirname)}catch(e){t.exports=rs}}),os=Ar(function(t){const{isUtf8:e}=R,{hasBlob:n}=mi;function r(t){const e=t.length;let n=0;for(;n<e;)if(128&t[n])if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}else n++;return!0}if(t.exports={isBlob:function(t){return n&&"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&("Blob"===t[Symbol.toStringTag]||"File"===t[Symbol.toStringTag])},isValidStatusCode:function(t){return t>=1e3&&t<=1014&&1004!==t&&1005!==t&&1006!==t||t>=3e3&&t<=4999},isValidUTF8:r,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},e)t.exports.isValidUTF8=function(t){return t.length<24?r(t):e(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const e=us;t.exports.isValidUTF8=function(t){return t.length<32?r(t):e(t)}}catch(t){}});os.isBlob,os.isValidStatusCode,os.isValidUTF8,os.tokenChars;const{Writable:is}=o,{BINARY_TYPES:ss,EMPTY_BUFFER:as,kStatusCode:cs,kWebSocket:ds}=mi,{concat:ls,toArrayBuffer:hs,unmask:ps}=qi,{isValidStatusCode:fs,isValidUTF8:ms}=os,vs=Buffer[Symbol.species];var Es=class extends is{constructor(t={}){super(),this._allowSynchronousEvents=void 0===t.allowSynchronousEvents||t.allowSynchronousEvents,this._binaryType=t.binaryType||ss[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=0|t.maxPayload,this._skipUTF8Validation=!!t.skipUTF8Validation,this[ds]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(t,e,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(n)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){const e=this._buffers[0];return this._buffers[0]=new vs(e.buffer,e.byteOffset+t,e.length-t),new vs(e.buffer,e.byteOffset,t)}const e=Buffer.allocUnsafe(t);do{const n=this._buffers[0],r=e.length-t;t>=n.length?e.set(this._buffers.shift(),r):(e.set(new Uint8Array(n.buffer,n.byteOffset,t),r),this._buffers[0]=new vs(n.buffer,n.byteOffset+t,n.length-t)),t-=n.length}while(t>0);return e}startLoop(t){this._loop=!0;do{switch(this._state){case 0:this.getInfo(t);break;case 1:this.getPayloadLength16(t);break;case 2:this.getPayloadLength64(t);break;case 3:this.getMask();break;case 4:this.getData(t);break;case 5:case 6:return void(this._loop=!1)}}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2)return void(this._loop=!1);const e=this.consume(2);if(48&e[0]){return void t(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"))}const n=!(64&~e[0]);if(n&&!this._extensions[Qi.extensionName]){return void t(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(this._fin=!(128&~e[0]),this._opcode=15&e[0],this._payloadLength=127&e[1],0===this._opcode){if(n){return void t(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(!this._fragmented){return void t(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"))}this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented){return void t(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}this._compressed=n}else{if(!(this._opcode>7&&this._opcode<11)){return void t(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}if(!this._fin){return void t(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"))}if(n){return void t(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength){return void t(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=!(128&~e[1]),this._isServer){if(!this._masked){return void t(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}}else if(this._masked){return void t(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"))}126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(t)}getPayloadLength16(t){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t))}getPayloadLength64(t){if(this._bufferedBytes<8)return void(this._loop=!1);const e=this.consume(8),n=e.readUInt32BE(0);if(n>Math.pow(2,21)-1){return void t(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"))}this._payloadLength=n*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){return void t(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"))}this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(t){let e=as;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);e=this.consume(this._payloadLength),this._masked&&0!==(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])&&ps(e,this._mask)}if(this._opcode>7)this.controlMessage(e,t);else{if(this._compressed)return this._state=5,void this.decompress(e,t);e.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(e)),this.dataMessage(t)}}decompress(t,e){this._extensions[Qi.extensionName].decompress(t,this._fin,(t,n)=>{if(t)return e(t);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){const t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");return void e(t)}this._fragments.push(n)}this.dataMessage(e),0===this._state&&this.startLoop(e)})}dataMessage(t){if(!this._fin)return void(this._state=0);const e=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?ls(n,e):"arraybuffer"===this._binaryType?hs(ls(n,e)):"blob"===this._binaryType?new Blob(n):n,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",r,!0),this._state=0,this.startLoop(t)}))}else{const r=ls(n,e);if(!this._skipUTF8Validation&&!ms(r)){const e=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void t(e)}5===this._state||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",r,!1),this._state=0,this.startLoop(t)}))}}controlMessage(t,e){if(8!==this._opcode)this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",t),this._state=0):(this._state=6,setImmediate(()=>{this.emit(9===this._opcode?"ping":"pong",t),this._state=0,this.startLoop(e)}));else{if(0===t.length)this._loop=!1,this.emit("conclude",1005,as),this.end();else{const n=t.readUInt16BE(0);if(!fs(n)){const t=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void e(t)}const r=new vs(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!ms(r)){const t=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void e(t)}this._loop=!1,this.emit("conclude",n,r),this.end()}this._state=0}}createError(t,e,n,r,u){this._loop=!1,this._errored=!0;const o=new t(n?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(o,this.createError),o.code=u,o[cs]=r,o}};const{randomFillSync:As}=I,{EMPTY_BUFFER:bs,kWebSocket:ys,NOOP:gs}=mi,{isBlob:Cs,isValidStatusCode:Fs}=os,{mask:ws,toBuffer:Ds}=qi,Bs=Symbol("kByteLength"),Is=Buffer.alloc(4),Rs=8192;let js,Ss=Rs;class _s{constructor(t,e,n){this._extensions=e||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=gs,this[ys]=void 0}static frame(t,e){let n,r,u=!1,o=2,i=!1;e.mask&&(n=e.maskBuffer||Is,e.generateMask?e.generateMask(n):(Ss===Rs&&(void 0===js&&(js=Buffer.alloc(Rs)),As(js,0,Rs),Ss=0),n[0]=js[Ss++],n[1]=js[Ss++],n[2]=js[Ss++],n[3]=js[Ss++]),i=0===(n[0]|n[1]|n[2]|n[3]),o=6),"string"==typeof t?r=e.mask&&!i||void 0===e[Bs]?(t=Buffer.from(t)).length:e[Bs]:(r=t.length,u=e.mask&&e.readOnly&&!i);let s=r;r>=65536?(o+=8,s=127):r>125&&(o+=2,s=126);const a=Buffer.allocUnsafe(u?r+o:o);return a[0]=e.fin?128|e.opcode:e.opcode,e.rsv1&&(a[0]|=64),a[1]=s,126===s?a.writeUInt16BE(r,2):127===s&&(a[2]=a[3]=0,a.writeUIntBE(r,4,6)),e.mask?(a[1]|=128,a[o-4]=n[0],a[o-3]=n[1],a[o-2]=n[2],a[o-1]=n[3],i?[a,t]:u?(ws(t,n,a,o,r),[a]):(ws(t,n,t,0,r),[a,t])):[a,t]}close(t,e,n,r){let u;if(void 0===t)u=bs;else{if("number"!=typeof t||!Fs(t))throw new TypeError("First argument must be a valid error code number");if(void 0!==e&&e.length){const n=Buffer.byteLength(e);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");u=Buffer.allocUnsafe(2+n),u.writeUInt16BE(t,0),"string"==typeof e?u.write(e,2):u.set(e,2)}else u=Buffer.allocUnsafe(2),u.writeUInt16BE(t,0)}const o={[Bs]:u.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,u,!1,o,r]):this.sendFrame(_s.frame(u,o),r)}ping(t,e,n){let r,u;if("string"==typeof t?(r=Buffer.byteLength(t),u=!1):Cs(t)?(r=t.size,u=!1):(r=(t=Ds(t)).length,u=Ds.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[Bs]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:9,readOnly:u,rsv1:!1};Cs(t)?0!==this._state?this.enqueue([this.getBlobData,t,!1,o,n]):this.getBlobData(t,!1,o,n):0!==this._state?this.enqueue([this.dispatch,t,!1,o,n]):this.sendFrame(_s.frame(t,o),n)}pong(t,e,n){let r,u;if("string"==typeof t?(r=Buffer.byteLength(t),u=!1):Cs(t)?(r=t.size,u=!1):(r=(t=Ds(t)).length,u=Ds.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[Bs]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:10,readOnly:u,rsv1:!1};Cs(t)?0!==this._state?this.enqueue([this.getBlobData,t,!1,o,n]):this.getBlobData(t,!1,o,n):0!==this._state?this.enqueue([this.dispatch,t,!1,o,n]):this.sendFrame(_s.frame(t,o),n)}send(t,e,n){const r=this._extensions[Qi.extensionName];let u,o,i=e.binary?2:1,s=e.compress;"string"==typeof t?(u=Buffer.byteLength(t),o=!1):Cs(t)?(u=t.size,o=!1):(u=(t=Ds(t)).length,o=Ds.readOnly),this._firstFragment?(this._firstFragment=!1,s&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(s=u>=r._threshold),this._compress=s):(s=!1,i=0),e.fin&&(this._firstFragment=!0);const a={[Bs]:u,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:o,rsv1:s};Cs(t)?0!==this._state?this.enqueue([this.getBlobData,t,this._compress,a,n]):this.getBlobData(t,this._compress,a,n):0!==this._state?this.enqueue([this.dispatch,t,this._compress,a,n]):this.dispatch(t,this._compress,a,n)}getBlobData(t,e,n,r){this._bufferedBytes+=n[Bs],this._state=2,t.arrayBuffer().then(t=>{if(this._socket.destroyed){const t=new Error("The socket was closed while the blob was being read");return void process.nextTick(Ps,this,t,r)}this._bufferedBytes-=n[Bs];const u=Ds(t);e?this.dispatch(u,e,n,r):(this._state=0,this.sendFrame(_s.frame(u,n),r),this.dequeue())}).catch(t=>{process.nextTick(Os,this,t,r)})}dispatch(t,e,n,r){if(!e)return void this.sendFrame(_s.frame(t,n),r);const u=this._extensions[Qi.extensionName];this._bufferedBytes+=n[Bs],this._state=1,u.compress(t,n.fin,(t,e)=>{if(this._socket.destroyed){return void Ps(this,new Error("The socket was closed while data was being compressed"),r)}this._bufferedBytes-=n[Bs],this._state=0,n.readOnly=!1,this.sendFrame(_s.frame(e,n),r),this.dequeue()})}dequeue(){for(;0===this._state&&this._queue.length;){const t=this._queue.shift();this._bufferedBytes-=t[3][Bs],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][Bs],this._queue.push(t)}sendFrame(t,e){2===t.length?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],e),this._socket.uncork()):this._socket.write(t[0],e)}}var Us=_s;function Ps(t,e,n){"function"==typeof n&&n(e);for(let n=0;n<t._queue.length;n++){const r=t._queue[n],u=r[r.length-1];"function"==typeof u&&u(e)}}function Os(t,e,n){Ps(t,e,n),t.onerror(e)}const{kForOnEventAttribute:ks,kListener:xs}=mi,Ts=Symbol("kCode"),Ls=Symbol("kData"),Ns=Symbol("kError"),qs=Symbol("kMessage"),Ms=Symbol("kReason"),Gs=Symbol("kTarget"),zs=Symbol("kType"),$s=Symbol("kWasClean");class Ws{constructor(t){this[Gs]=null,this[zs]=t}get target(){return this[Gs]}get type(){return this[zs]}}Object.defineProperty(Ws.prototype,"target",{enumerable:!0}),Object.defineProperty(Ws.prototype,"type",{enumerable:!0});class Js extends Ws{constructor(t,e={}){super(t),this[Ts]=void 0===e.code?0:e.code,this[Ms]=void 0===e.reason?"":e.reason,this[$s]=void 0!==e.wasClean&&e.wasClean}get code(){return this[Ts]}get reason(){return this[Ms]}get wasClean(){return this[$s]}}Object.defineProperty(Js.prototype,"code",{enumerable:!0}),Object.defineProperty(Js.prototype,"reason",{enumerable:!0}),Object.defineProperty(Js.prototype,"wasClean",{enumerable:!0});class Vs extends Ws{constructor(t,e={}){super(t),this[Ns]=void 0===e.error?null:e.error,this[qs]=void 0===e.message?"":e.message}get error(){return this[Ns]}get message(){return this[qs]}}Object.defineProperty(Vs.prototype,"error",{enumerable:!0}),Object.defineProperty(Vs.prototype,"message",{enumerable:!0});class Hs extends Ws{constructor(t,e={}){super(t),this[Ls]=void 0===e.data?null:e.data}get data(){return this[Ls]}}Object.defineProperty(Hs.prototype,"data",{enumerable:!0});const Zs={addEventListener(t,e,n={}){for(const r of this.listeners(t))if(!n[ks]&&r[xs]===e&&!r[ks])return;let r;if("message"===t)r=function(t,n){const r=new Hs("message",{data:n?t:t.toString()});r[Gs]=this,Ks(e,this,r)};else if("close"===t)r=function(t,n){const r=new Js("close",{code:t,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Gs]=this,Ks(e,this,r)};else if("error"===t)r=function(t){const n=new Vs("error",{error:t,message:t.message});n[Gs]=this,Ks(e,this,n)};else{if("open"!==t)return;r=function(){const t=new Ws("open");t[Gs]=this,Ks(e,this,t)}}r[ks]=!!n[ks],r[xs]=e,n.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(const n of this.listeners(t))if(n[xs]===e&&!n[ks]){this.removeListener(t,n);break}}};var Ys={CloseEvent:Js,ErrorEvent:Vs,Event:Ws,EventTarget:Zs,MessageEvent:Hs};function Ks(t,e,n){"object"==typeof t&&t.handleEvent?t.handleEvent.call(t,n):t.call(e,n)}const{tokenChars:Xs}=os;function Qs(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var ta={format:function(t){return Object.keys(t).map(e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map(t=>[e].concat(Object.keys(t).map(e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map(t=>!0===t?e:`${e}=${t}`).join("; ")})).join("; ")).join(", ")}).join(", ")},parse:function(t){const e=Object.create(null);let n,r,u=Object.create(null),o=!1,i=!1,s=!1,a=-1,c=-1,d=-1,l=0;for(;l<t.length;l++)if(c=t.charCodeAt(l),void 0===n)if(-1===d&&1===Xs[c])-1===a&&(a=l);else if(0===l||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===a)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=t.slice(a,d);44===c?(Qs(e,r,u),u=Object.create(null)):n=r,a=d=-1}}else-1===d&&-1!==a&&(d=l);else if(void 0===r)if(-1===d&&1===Xs[c])-1===a&&(a=l);else if(32===c||9===c)-1===d&&-1!==a&&(d=l);else if(59===c||44===c){if(-1===a)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),Qs(u,t.slice(a,d),!0),44===c&&(Qs(e,n,u),u=Object.create(null),n=void 0),a=d=-1}else{if(61!==c||-1===a||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=t.slice(a,l),a=d=-1}else if(i){if(1!==Xs[c])throw new SyntaxError(`Unexpected character at index ${l}`);-1===a?a=l:o||(o=!0),i=!1}else if(s)if(1===Xs[c])-1===a&&(a=l);else if(34===c&&-1!==a)s=!1,d=l;else{if(92!==c)throw new SyntaxError(`Unexpected character at index ${l}`);i=!0}else if(34===c&&61===t.charCodeAt(l-1))s=!0;else if(-1===d&&1===Xs[c])-1===a&&(a=l);else if(-1===a||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===a)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let i=t.slice(a,d);o&&(i=i.replace(/\\/g,""),o=!1),Qs(u,r,i),44===c&&(Qs(e,n,u),u=Object.create(null),n=void 0),r=void 0,a=d=-1}}else-1===d&&(d=l);if(-1===a||s||32===c||9===c)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const h=t.slice(a,d);return void 0===n?Qs(e,h,u):(void 0===r?Qs(u,h,!0):Qs(u,r,o?h.replace(/\\/g,""):h),Qs(e,n,u)),e}};const{randomBytes:ea,createHash:na}=I,{URL:ra}=a,{isBlob:ua}=os,{BINARY_TYPES:oa,EMPTY_BUFFER:ia,GUID:sa,kForOnEventAttribute:aa,kListener:ca,kStatusCode:da,kWebSocket:la,NOOP:ha}=mi,{EventTarget:{addEventListener:pa,removeEventListener:fa}}=Ys,{format:ma,parse:va}=ta,{toBuffer:Ea}=qi,Aa=Symbol("kAborted"),ba=[8,13],ya=["CONNECTING","OPEN","CLOSING","CLOSED"],ga=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Ca extends t{constructor(t,e,n){super(),this._binaryType=oa[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ia,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Ca.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==t?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===e?e=[]:Array.isArray(e)||("object"==typeof e&&null!==e?(n=e,e=[]):e=[e]),wa(this,t,e,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){oa.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,e,n){const r=new Es({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),u=new Us(t,this._extensions,n.generateMask);this._receiver=r,this._sender=u,this._socket=t,r[la]=this,u[la]=this,t[la]=this,r.on("conclude",Sa),r.on("drain",_a),r.on("error",Ua),r.on("message",Oa),r.on("ping",ka),r.on("pong",xa),u.onerror=La,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),e.length>0&&t.unshift(e),t.on("close",qa),t.on("data",Ma),t.on("end",Ga),t.on("error",za),this._readyState=Ca.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Ca.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[Qi.extensionName]&&this._extensions[Qi.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Ca.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,e){if(this.readyState!==Ca.CLOSED){if(this.readyState===Ca.CONNECTING){const t="WebSocket was closed before the connection was established";return void Ra(this,this._req,t)}this.readyState!==Ca.CLOSING?(this._readyState=Ca.CLOSING,this._sender.close(t,e,!this._isServer,t=>{t||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Na(this)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end()}}pause(){this.readyState!==Ca.CONNECTING&&this.readyState!==Ca.CLOSED&&(this._paused=!0,this._socket.pause())}ping(t,e,n){if(this.readyState===Ca.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Ca.OPEN?(void 0===e&&(e=!this._isServer),this._sender.ping(t||ia,e,n)):ja(this,t,n)}pong(t,e,n){if(this.readyState===Ca.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Ca.OPEN?(void 0===e&&(e=!this._isServer),this._sender.pong(t||ia,e,n)):ja(this,t,n)}resume(){this.readyState!==Ca.CONNECTING&&this.readyState!==Ca.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,e,n){if(this.readyState===Ca.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof e&&(n=e,e={}),"number"==typeof t&&(t=t.toString()),this.readyState!==Ca.OPEN)return void ja(this,t,n);const r={binary:"string"!=typeof t,mask:!this._isServer,compress:!0,fin:!0,...e};this._extensions[Qi.extensionName]||(r.compress=!1),this._sender.send(t||ia,r,n)}terminate(){if(this.readyState!==Ca.CLOSED){if(this.readyState===Ca.CONNECTING){const t="WebSocket was closed before the connection was established";return void Ra(this,this._req,t)}this._socket&&(this._readyState=Ca.CLOSING,this._socket.destroy())}}}Object.defineProperty(Ca,"CONNECTING",{enumerable:!0,value:ya.indexOf("CONNECTING")}),Object.defineProperty(Ca.prototype,"CONNECTING",{enumerable:!0,value:ya.indexOf("CONNECTING")}),Object.defineProperty(Ca,"OPEN",{enumerable:!0,value:ya.indexOf("OPEN")}),Object.defineProperty(Ca.prototype,"OPEN",{enumerable:!0,value:ya.indexOf("OPEN")}),Object.defineProperty(Ca,"CLOSING",{enumerable:!0,value:ya.indexOf("CLOSING")}),Object.defineProperty(Ca.prototype,"CLOSING",{enumerable:!0,value:ya.indexOf("CLOSING")}),Object.defineProperty(Ca,"CLOSED",{enumerable:!0,value:ya.indexOf("CLOSED")}),Object.defineProperty(Ca.prototype,"CLOSED",{enumerable:!0,value:ya.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(Ca.prototype,t,{enumerable:!0})}),["open","error","close","message"].forEach(t=>{Object.defineProperty(Ca.prototype,`on${t}`,{enumerable:!0,get(){for(const e of this.listeners(t))if(e[aa])return e[ca];return null},set(e){for(const e of this.listeners(t))if(e[aa]){this.removeListener(t,e);break}"function"==typeof e&&this.addEventListener(t,e,{[aa]:!0})}})}),Ca.prototype.addEventListener=pa,Ca.prototype.removeEventListener=fa;var Fa=Ca;function wa(t,e,n,r){const u={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:ba[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=u.autoPong,!ba.includes(u.protocolVersion))throw new RangeError(`Unsupported protocol version: ${u.protocolVersion} (supported versions: ${ba.join(", ")})`);let o;if(e instanceof ra)o=e;else try{o=new ra(e)}catch(t){throw new SyntaxError(`Invalid URL: ${e}`)}"http:"===o.protocol?o.protocol="ws:":"https:"===o.protocol&&(o.protocol="wss:"),t._url=o.href;const i="wss:"===o.protocol,a="ws+unix:"===o.protocol;let c;if("ws:"===o.protocol||i||a?a&&!o.pathname?c="The URL's pathname is empty":o.hash&&(c="The URL contains a fragment identifier"):c='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',c){const e=new SyntaxError(c);if(0===t._redirects)throw e;return void Da(t,e)}const l=i?443:80,h=ea(16).toString("base64"),p=i?d.request:s.request,f=new Set;let m,v;if(u.createConnection=u.createConnection||(i?Ia:Ba),u.defaultPort=u.defaultPort||l,u.port=o.port||l,u.host=o.hostname.startsWith("[")?o.hostname.slice(1,-1):o.hostname,u.headers={...u.headers,"Sec-WebSocket-Version":u.protocolVersion,"Sec-WebSocket-Key":h,Connection:"Upgrade",Upgrade:"websocket"},u.path=o.pathname+o.search,u.timeout=u.handshakeTimeout,u.perMessageDeflate&&(m=new Qi(!0!==u.perMessageDeflate?u.perMessageDeflate:{},!1,u.maxPayload),u.headers["Sec-WebSocket-Extensions"]=ma({[Qi.extensionName]:m.offer()})),n.length){for(const t of n){if("string"!=typeof t||!ga.test(t)||f.has(t))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(t)}u.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(u.origin&&(u.protocolVersion<13?u.headers["Sec-WebSocket-Origin"]=u.origin:u.headers.Origin=u.origin),(o.username||o.password)&&(u.auth=`${o.username}:${o.password}`),a){const t=u.path.split(":");u.socketPath=t[0],u.path=t[1]}if(u.followRedirects){if(0===t._redirects){t._originalIpc=a,t._originalSecure=i,t._originalHostOrSocketPath=a?u.socketPath:o.host;const e=r&&r.headers;if(r={...r,headers:{}},e)for(const[t,n]of Object.entries(e))r.headers[t.toLowerCase()]=n}else if(0===t.listenerCount("redirect")){const e=a?!!t._originalIpc&&u.socketPath===t._originalHostOrSocketPath:!t._originalIpc&&o.host===t._originalHostOrSocketPath;(!e||t._originalSecure&&!i)&&(delete u.headers.authorization,delete u.headers.cookie,e||delete u.headers.host,u.auth=void 0)}u.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(u.auth).toString("base64")),v=t._req=p(u),t._redirects&&t.emit("redirect",t.url,v)}else v=t._req=p(u);u.timeout&&v.on("timeout",()=>{Ra(t,v,"Opening handshake has timed out")}),v.on("error",e=>{null===v||v[Aa]||(v=t._req=null,Da(t,e))}),v.on("response",o=>{const i=o.headers.location,s=o.statusCode;if(i&&u.followRedirects&&s>=300&&s<400){if(++t._redirects>u.maxRedirects)return void Ra(t,v,"Maximum redirects exceeded");let o;v.abort();try{o=new ra(i,e)}catch(e){const n=new SyntaxError(`Invalid URL: ${i}`);return void Da(t,n)}wa(t,o,n,r)}else t.emit("unexpected-response",v,o)||Ra(t,v,`Unexpected server response: ${o.statusCode}`)}),v.on("upgrade",(e,n,r)=>{if(t.emit("upgrade",e),t.readyState!==Ca.CONNECTING)return;v=t._req=null;const o=e.headers.upgrade;if(void 0===o||"websocket"!==o.toLowerCase())return void Ra(t,n,"Invalid Upgrade header");const i=na("sha1").update(h+sa).digest("base64");if(e.headers["sec-websocket-accept"]!==i)return void Ra(t,n,"Invalid Sec-WebSocket-Accept header");const s=e.headers["sec-websocket-protocol"];let a;if(void 0!==s?f.size?f.has(s)||(a="Server sent an invalid subprotocol"):a="Server sent a subprotocol but none was requested":f.size&&(a="Server sent no subprotocol"),a)return void Ra(t,n,a);s&&(t._protocol=s);const c=e.headers["sec-websocket-extensions"];if(void 0!==c){if(!m){return void Ra(t,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let e;try{e=va(c)}catch(e){return void Ra(t,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(e);if(1!==r.length||r[0]!==Qi.extensionName){return void Ra(t,n,"Server indicated an extension that was not requested")}try{m.accept(e[Qi.extensionName])}catch(e){return void Ra(t,n,"Invalid Sec-WebSocket-Extensions header")}t._extensions[Qi.extensionName]=m}t.setSocket(n,r,{allowSynchronousEvents:u.allowSynchronousEvents,generateMask:u.generateMask,maxPayload:u.maxPayload,skipUTF8Validation:u.skipUTF8Validation})}),u.finishRequest?u.finishRequest(v,t):v.end()}function Da(t,e){t._readyState=Ca.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function Ba(t){return t.path=t.socketPath,m.connect(t)}function Ia(t){return t.path=void 0,t.servername||""===t.servername||(t.servername=m.isIP(t.host)?"":t.host),B.connect(t)}function Ra(t,e,n){t._readyState=Ca.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Ra),e.setHeader?(e[Aa]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Da,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function ja(t,e,n){if(e){const n=ua(e)?e.size:Ea(e).length;t._socket?t._sender._bufferedBytes+=n:t._bufferedAmount+=n}if(n){const e=new Error(`WebSocket is not open: readyState ${t.readyState} (${ya[t.readyState]})`);process.nextTick(n,e)}}function Sa(t,e){const n=this[la];n._closeFrameReceived=!0,n._closeMessage=e,n._closeCode=t,void 0!==n._socket[la]&&(n._socket.removeListener("data",Ma),process.nextTick(Ta,n._socket),1005===t?n.close():n.close(t,e))}function _a(){const t=this[la];t.isPaused||t._socket.resume()}function Ua(t){const e=this[la];void 0!==e._socket[la]&&(e._socket.removeListener("data",Ma),process.nextTick(Ta,e._socket),e.close(t[da])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function Pa(){this[la].emitClose()}function Oa(t,e){this[la].emit("message",t,e)}function ka(t){const e=this[la];e._autoPong&&e.pong(t,!this._isServer,ha),e.emit("ping",t)}function xa(t){this[la].emit("pong",t)}function Ta(t){t.resume()}function La(t){const e=this[la];e.readyState!==Ca.CLOSED&&(e.readyState===Ca.OPEN&&(e._readyState=Ca.CLOSING,Na(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Na(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),3e4)}function qa(){const t=this[la];let e;this.removeListener("close",qa),this.removeListener("data",Ma),this.removeListener("end",Ga),t._readyState=Ca.CLOSING,this._readableState.endEmitted||t._closeFrameReceived||t._receiver._writableState.errorEmitted||null===(e=t._socket.read())||t._receiver.write(e),t._receiver.end(),this[la]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",Pa),t._receiver.on("finish",Pa))}function Ma(t){this[la]._receiver.write(t)||this.pause()}function Ga(){const t=this[la];t._readyState=Ca.CLOSING,t._receiver.end(),this.end()}function za(){const t=this[la];this.removeListener("error",za),this.on("error",ha),t&&(t._readyState=Ca.CLOSING,this.destroy())}const{Duplex:$a}=o;function Wa(t){t.emit("close")}function Ja(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Va(t){this.removeListener("error",Va),this.destroy(),0===this.listenerCount("error")&&this.emit("error",t)}var Ha=function(t,e){let n=!0;const r=new $a({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(e,n){const u=!n&&r._readableState.objectMode?e.toString():e;r.push(u)||t.pause()}),t.once("error",function(t){r.destroyed||(n=!1,r.destroy(t))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(e,u){if(t.readyState===t.CLOSED)return u(e),void process.nextTick(Wa,r);let o=!1;t.once("error",function(t){o=!0,u(t)}),t.once("close",function(){o||u(e),process.nextTick(Wa,r)}),n&&t.terminate()},r._final=function(e){t.readyState!==t.CONNECTING?null!==t._socket&&(t._socket._writableState.finished?(e(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){e()}),t.close())):t.once("open",function(){r._final(e)})},r._read=function(){t.isPaused&&t.resume()},r._write=function(e,n,u){t.readyState!==t.CONNECTING?t.send(e,u):t.once("open",function(){r._write(e,n,u)})},r.on("end",Ja),r.on("error",Va),r},Za=function(t){function e(e,n,r,u,o,i){void 0===i&&(i=5e3);var s=t.call(this)||this;s.endpoint=e,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=u,s.agent=o,s.closeTimeout=i,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=f.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map(function(t){return(e=Ge(e=t))&&sr.test(e)?e.replace(ir,"\\$&"):e;var e}).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return $(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return J(this,void 0,void 0,function(){var t=this;return V(this,function(e){return[2,new Promise(function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,u=n.address;t.tcpServer.listen(r,u,function(){t.emit("tunnel-open",{address:u,port:r}),e({address:u,port:r})})}else t.tcpServer.listen(0,function(){var n=t.tcpServer.address(),r=n.address,u=n.port,o="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:o,port:u},t.emit("tunnel-open",t.boundTo),e(t.boundTo)})})]})})},e.prototype.close=function(){return J(this,void 0,void 0,function(){var t,e=this;return V(this,function(n){switch(n.label){case 0:return t=!1,[4,Promise.race([new Promise(function(n){e.tcpServer.close(function(){t=!0,e.emit("tunnel-close"),n()})}),new Promise(function(n){new Promise(function(t){return setTimeout(t,e.closeTimeout)}).then(function(){t||(e.openConnections.forEach(function(t){t.destroy(),e.openConnections.delete(t)}),n())})})])];case 1:return n.sent(),[2]}})})},e.prototype.handleConnection=function(t){var e=this;this.openConnections.add(t);var n=this.endpoint.replace("https:","wss:"),r=new Fa(n,{headers:this.headers,agent:this.agent}),u=Ha(r),o=this.getHeaderTransform();this.rewriteHostHeader&&o?hi(t,o,u):hi(t,u),hi(u,t),r.on("close",function(t,n,r){e.emit("connection-close",t,n,r)}),u.on("error",function(t){e.emit("connection-error",t)}),t.on("error",function(t){e.emit("connection-error",t)}),this.emit("connection-accept")},e.prototype.getHeaderTransform=function(){var t=function(t,e,n){var r=Buffer.from(n),u=Buffer.from(t);return e.forEach(function(t){u=function(t,e,n){var r=Buffer.from(e),u=t.indexOf(r);if(-1===u)return t;var o=t.subarray(0,u),i=t.subarray(u+r.length);return Buffer.concat([o,n,i])}(u,t,r)}),u};if(this.rewriteHostHeader){var e=this.rewriteHostHeader,n=e.targetHostname,r=e.altHostnames,u=this.hostRegex;return new i({transform:function(e,o,i){var s=e.toString();if(s.split("\n",1)[0].includes("HTTP")&&u.test(s)){var a=r.map(function(t){return"Host: ".concat(t)});i(null,t(e,a,"Host: ".concat(n)))}else i(null,e)}})}},e}(e),Ya=function(t){function e(e,n,r,u){var o=t.call(this)||this;return o.endpoint=e,o.headers=n,o.bindToAssign=r,o.agent=u,o.protocol="UDP",o.udpSocket=S.createSocket("udp4"),o.handleConnection(),o}return $(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return J(this,void 0,void 0,function(){var t=this;return V(this,function(e){return[2,new Promise(function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,u=n.address;t.udpSocket.bind(r,u,function(){t.emit("tunnel-open",{address:u,port:r}),e({address:u,port:r})})}else t.udpSocket.bind(0,function(){var n=t.udpSocket.address(),r=n.address,u=n.port,o="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:o,port:u},t.emit("tunnel-open",t.boundTo),e(t.boundTo)})})]})})},e.prototype.close=function(){return J(this,void 0,void 0,function(){var t=this;return V(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e){t.udpSocket.close(function(){t.emit("tunnel-close"),e()})})];case 1:return e.sent(),[2]}})})},e.prototype.handleConnection=function(){var t,e=this,n=this.endpoint.replace("https:","wss:"),r=new Fa(n,{headers:this.headers,agent:this.agent}),u=Ha(r);this.udpSocket.on("message",function(e,n){t=n,u.write(e)}),u.on("data",function(n){t&&e.udpSocket.send(n,t.port,t.address,function(t){t&&e.emit("connection-error",t)})}),this.udpSocket.on("error",function(t){e.emit("connection-error",t)}),u.on("error",function(t){e.emit("connection-error",t)}),r.on("connection-close",function(t,n,r){e.emit("connection-close",t,n,r)}),r.on("connection-error",function(t){e.emit("connection-error",t)}),this.emit("connection-accept")},e}(e),Ka=function(t){function e(e,r,u,o){var i=t.call(this)||this;return i.contextProvider=e,i.listServices=r,i.listAddons=u,i.agent=o,i.connections=[],i.hostsFileMutex=new Zo,i.ipAllocationMutex=new Zo,i.stopForwarding=function(t){return J(i,void 0,void 0,function(){var e,n,r,u,o,i,s;return V(this,function(a){switch(a.label){case 0:return[4,t.tunnel.close()];case 1:return a.sent(),e=t.forwardingContext,n=e.projectId,r=e.type,u=e.id,o=e.hostnames,i=e.ipOnly,o.length>0&&!i?[4,this.unregisterHostnames(null===(s=t.tunnel.bindTo)||void 0===s?void 0:s.address,o)]:[3,3];case 2:a.sent(),a.label=3;case 3:return this.connections.splice(this.connections.findIndex(function(t){var e=t.forwardingContext,o=e.type,i=e.id,s=e.projectId;return i===u&&s===n&&o===r}),1),[2]}})})},i.canExecuteWithHostnames=function(){return"win32"!==process.platform?process.getuid&&0!==process.getuid()?{error:!0,message:"You are not running this command with sufficient privileges (uid=".concat(null===(t=null===process||void 0===process?void 0:process.getuid)||void 0===t?void 0:t.call(process),"). Try running with 'sudo -E'.")}:{error:!1,type:"unix-admin"}:function(){try{return n("fsutil dirty query %systemdrive%"),!0}catch(t){if("ENOENT"===t.code)try{return n("fltmc"),!0}catch(t){return!1}return!1}}()?{error:!1,type:"windows-admin"}:{error:!0,message:"You are not running this command as administrator. Please start command line with admin rights."};var t},i.assertStartedWithNodejs=function(){if(!Fo)throw new Error("Port forwarding only possible when started with nodejs")},i.proxyApiClient=new Ro(e,o),i}return $(e,t),e.prototype.withProjectForwarding=function(t,e,n){return void 0===n&&(n=!0),J(this,void 0,void 0,function(){var r;return V(this,function(u){switch(u.label){case 0:return[4,this.forwardProject(t,n)];case 1:r=u.sent(),u.label=2;case 2:return u.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,u.sent()];case 4:return[4,this.stopProjectForwarding(t)];case 5:return u.sent(),[7];case 6:return[2]}})})},e.prototype.forwardProject=function(t,e){return void 0===e&&(e=!0),J(this,void 0,void 0,function(){var n,r,u,o,i,s=this;return V(this,function(a){switch(a.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,[4,this.listServices.all({parameters:{projectId:n}})];case 1:return r=a.sent(),[4,this.listAddons.all({parameters:{projectId:n}})];case 2:return u=a.sent(),[4,Promise.all(r.data.services.map(function(t){return J(s,void 0,void 0,function(){return V(this,function(r){return[2,this.forwardService({projectId:n,serviceId:t.id},e)]})})}))];case 3:return o=a.sent(),[4,Promise.all(u.data.addons.map(function(t){return J(s,void 0,void 0,function(){return V(this,function(r){switch(r.label){case 0:return[4,this.forwardAddon({projectId:n,addonId:t.id},e)];case 1:return[2,r.sent()]}})})}))];case 4:return i=a.sent(),[2,{services:o,addons:i}]}})})},e.prototype.withServiceForwarding=function(t,e,n){return void 0===n&&(n=!0),J(this,void 0,void 0,function(){var r;return V(this,function(u){switch(u.label){case 0:return[4,this.forwardService(t,n)];case 1:r=u.sent(),u.label=2;case 2:return u.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,u.sent()];case 4:return[4,this.stopServiceForwarding(t)];case 5:return u.sent(),[7];case 6:return[2]}})})},e.prototype.forwardService=function(t,e){return void 0===e&&(e=!0),J(this,void 0,void 0,function(){var n,r,u,o,i,s,a,c=this;return V(this,function(d){switch(d.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,r=t.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return u=d.sent(),o=u.namespace,i=u.targetDomain,s=u.instances,a=u.ports,0===s.length?[2,[]]:[4,Bo(a,function(t){var u,a="https://".concat(i,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(s[0].podName,"/port/").concat(t.internalPort),d="".concat(r,".").concat(o,".svc.cluster.local"),l=["".concat(r)];t.name&&l.push("".concat(t.name,".").concat(r)),"HTTP"===t.protocol&&(u={altHostnames:l,targetHostname:d});var h=H([d],l,!0);return c.forwardPort(a,t,h,"service",r,n,e,u)})];case 2:return[2,d.sent()]}})})},e.prototype.withAddonForwarding=function(t,e,n){return void 0===n&&(n=!0),J(this,void 0,void 0,function(){var r;return V(this,function(u){switch(u.label){case 0:return[4,this.forwardAddon(t,n)];case 1:r=u.sent(),u.label=2;case 2:return u.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,u.sent()];case 4:return[4,this.stopAddonForwarding(t)];case 5:return u.sent(),[7];case 6:return[2]}})})},e.prototype.forwardAddon=function(t,e){return void 0===e&&(e=!0),J(this,void 0,void 0,function(){var n,r,u,o,i=this;return V(this,function(s){switch(s.label){case 0:return this.assertStartedWithNodejs(),n=t.addonId,r=t.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return u=s.sent(),o=u.instances.map(function(t){var e=t.podName,n=t.internalHostname;return t.ports.map(function(t){return{podName:e,internalHostname:n,port:t}})}),[4,Bo((a=o,null!=a&&a.length?Ze(a,dr):[]),function(t){var o=t.podName,s=t.internalHostname,a=t.port;return J(i,void 0,void 0,function(){var t;return V(this,function(i){return t="https://".concat(u.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(o,"/port/").concat(a.internalPort),[2,this.forwardPort(t,a,[s],"addon",n,r,e)]})})})];case 2:return[2,s.sent()]}var a})})},e.prototype.allocateIpAddress=function(t){return J(this,void 0,void 0,function(){var e=this;return V(this,function(n){return[2,this.ipAllocationMutex.enter(function(){return J(e,void 0,void 0,function(){var e,n,r,u,o;return V(this,function(i){switch(i.label){case 0:return e="127.24.1.1",n="127.24.255.255",r=null!==(o=this.nextIpAddress)&&void 0!==o?o:e,[4,jo(t,r,n)];case 1:return u=i.sent(),this.nextIpAddress=Po(Uo(u)+1),Uo(this.nextIpAddress)>Uo(n)&&(this.nextIpAddress=e),[2,u]}})})})]})})},e.prototype.forwardPort=function(t,e,n,r,u,o,i,s){var a;return void 0===i&&(i=!0),J(this,void 0,void 0,function(){var c,d,l,h,p,f,m=this;return V(this,function(v){switch(v.label){case 0:if(c={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!i&&(d=this.canExecuteWithHostnames()).error)throw new Error("".concat(d.message," Alternatively, you can use the ipOnly mode when port-forwarding (apiClient.forwarding.forwardAddon({ projectId, addonId }, true))"));return[4,this.determineSocketAddress(o,u,n,r,e,i)];case 1:return l=v.sent(),h="UDP"===e.protocol?new Ya(t,c,l,this.agent):new Za(t,c,s,l,this.agent),i?[3,3]:[4,this.registerHostnames(null===(a=h.bindTo)||void 0===a?void 0:a.address,n)];case 2:v.sent(),v.label=3;case 3:return h.on("connection-accept",function(){return m.emit("connection-accept",h)}),h.on("connection-close",function(){return J(m,void 0,void 0,function(){return V(this,function(t){return[2,this.emit("connection-close",h)]})})}),[4,h.open()];case 4:return p=v.sent(),f={projectId:o,id:u,type:r,hostnames:n,ipOnly:i,port:p.port,address:p.address,protocol:e.protocol,portName:e.name},this.emit("tunnel-open",h,f),h.on("connection-error",function(t){return m.emit("connection-error",h,f,t)}),h.on("tunnel-close",function(){return m.emit("tunnel-close",h,f)}),this.connections.push({tunnel:h,forwardingContext:f}),[2,{data:f}]}})})},e.prototype.determineSocketAddress=function(t,e,n,r,u,o){return J(this,void 0,void 0,function(){var i,s,a;return V(this,function(c){switch(c.label){case 0:return o&&"darwin"===p.platform()?[2,void 0]:(i=this.connections.filter(function(n){return n.forwardingContext.projectId===t&&n.forwardingContext.id===e&&n.forwardingContext.type===r}),(s=null==i?void 0:i.find(function(t){return n.find(function(e){return t.forwardingContext.hostnames.includes(e)})}))?[2,{address:null==s?void 0:s.forwardingContext.address,port:u.internalPort}]:(a={},[4,this.allocateIpAddress(u.internalPort)]));case 1:return[2,(a.address=c.sent(),a.port=u.internalPort,a)]}})})},e.prototype.registerHostnames=function(t,e){return J(this,void 0,void 0,function(){return V(this,function(n){switch(n.label){case 0:return[4,this.modifyHostsFile(function(n){n.removeHosts.apply(n,e),n.add.apply(n,H([t],e,!1))})];case 1:return n.sent(),[2]}})})},e.prototype.unregisterHostnames=function(t,e){return J(this,void 0,void 0,function(){return V(this,function(n){switch(n.label){case 0:return[4,this.modifyHostsFile(function(n){n.remove.apply(n,H([t],e,!1))})];case 1:return n.sent(),[2]}})})},e.prototype.modifyHostsFile=function(t){return J(this,void 0,void 0,function(){var e=this;return V(this,function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter(function(){return J(e,void 0,void 0,function(){var e,n=this;return V(this,function(r){switch(r.label){case 0:return[4,Ho.load({header:"Northflank Proxy"})];case 1:return e=r.sent(),t(e),[4,e.backup({suffix:".backup-pre-northflank"})];case 2:r.sent(),r.label=3;case 3:return r.trys.push([3,5,,7]),[4,Xa(5)(function(){return J(n,void 0,void 0,function(){return V(this,function(t){switch(t.label){case 0:return[4,e.write({writeMode:"atomic"})];case 1:return t.sent(),[2]}})})})];case 4:return r.sent(),[3,7];case 5:return r.sent(),[4,Xa(5)(function(){return J(n,void 0,void 0,function(){return V(this,function(t){switch(t.label){case 0:return[4,e.write({writeMode:"standard"})];case 1:return t.sent(),[2]}})})})];case 6:return r.sent(),[3,7];case 7:return[2]}})})})];case 1:return n.sent(),[2]}})})},e.prototype.stopProjectForwarding=function(t){return J(this,void 0,void 0,function(){var e=this;return V(this,function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter(function(e){return e.forwardingContext.projectId===t.projectId}).map(function(t){return e.stopForwarding(t)}))];case 1:return n.sent(),[2]}})})},e.prototype.stopServiceForwarding=function(t){return J(this,void 0,void 0,function(){var e=this;return V(this,function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter(function(e){return"service"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.serviceId}).map(function(t){return e.stopForwarding(t)}))];case 1:return n.sent(),[2]}})})},e.prototype.stopAddonForwarding=function(t){return J(this,void 0,void 0,function(){var e=this;return V(this,function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter(function(e){return"addon"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.addonId}).map(function(t){return e.stopForwarding(t)}))];case 1:return n.sent(),[2]}})})},e.prototype.stop=function(){return J(this,void 0,void 0,function(){var t=this;return V(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.connections.map(function(e){return J(t,void 0,void 0,function(){return V(this,function(t){return[2,this.stopForwarding(e)]})})}))];case 1:return e.sent(),[2]}})})},e}(e),Xa=function(t,e){return void 0===e&&(e=50),function(n){var r=t,u=function(){return J(void 0,void 0,void 0,function(){var t;return V(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,4]),[4,n()];case 1:return[2,o.sent()];case 2:if(t=o.sent(),r<=0)throw t;return r-=1,[4,new Promise(function(t){return setTimeout(function(){return t()},e)})];case 3:return o.sent(),[2,u()];case 4:return[2]}})})};return u()}},Qa=function(t){function e(e,n,r,o,i,s,a){void 0===i&&(i=new u.PassThrough),void 0===s&&(s=new u.PassThrough),void 0===a&&(a=new u.PassThrough);var c=t.call(this)||this;return c.baseUrl=e,c.execConfig=n,c.token=r,c.agent=o,c.stdOut=i,c.stdErr=s,c.stdIn=a,c.waitForCommandResult=function(){return J(c,void 0,void 0,function(){return V(this,function(t){switch(t.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,t.sent()]}})})},c.sendInputToCurrentCommand=function(t){return J(c,void 0,void 0,function(){var e;return V(this,function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(e=this.duplex)||void 0===e||e.write(this.constructPayloadPacket(t)),[2]})})},c.resizeTerminal=function(t){return J(c,void 0,void 0,function(){var e;return V(this,function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running, can't resize terminal");return null===(e=this.duplex)||void 0===e||e.write(JSON.stringify({type:"resize",data:{ttyRows:null==t?void 0:t.rows,ttyColumns:null==t?void 0:t.columns}})),[2]})})},c.constructPayloadPacket=function(t){return JSON.stringify({type:"payload",data:t.toString()})},c.stdInEndPacket=JSON.stringify({type:"stdInEnd"}),c}return $(e,t),Object.defineProperty(e.prototype,"execEndpoint",{get:function(){var t=this.execConfig,e=t.entityId,n=t.entityType,r=t.projectId,u="".concat(this.baseUrl,"/v1/command-exec/projects/").concat(r,"/");return"".concat(u).concat(function(){switch(n){case"service":return"services/".concat(e);case"job":return"jobs/".concat(e);case"addon":return"addons/".concat(e);case"build":return"builds/".concat(e);default:throw new Error("Unexpected Northflank entity type received in command exec endpoint generation: ".concat(n))}}())},enumerable:!1,configurable:!0}),e.prototype.start=function(){return J(this,void 0,void 0,function(){var t=this;return V(this,function(e){if(void 0!==this.currentCommand)throw new Error("Command is already running");return this.currentCommand=new Promise(function(e,n){var r,u,o;void 0!==t.remote&&n(Error("Command is already running"));var i,s=t.execEndpoint.replace("https:","wss:").replace("http:","ws:");t.remote=new Fa(s,{agent:t.agent});try{t.duplex=Ha(t.remote)}catch(t){throw new Error("Failed to establish connection to command execution proxy: ".concat(t.message))}t.initialAuth(),t.stdIn.on("data",function(e){var n,r;(null===(n=t.duplex)||void 0===n?void 0:n.writable)&&(null===(r=t.duplex)||void 0===r||r.write(t.constructPayloadPacket(e)))}),t.stdIn.on("end",function(){var e,n;(null===(e=t.duplex)||void 0===e?void 0:e.writable)&&(null===(n=t.duplex)||void 0===n||n.write(t.stdInEndPacket))}),null===(r=t.duplex)||void 0===r||r.on("data",function(e){var n,r,u,o,s,c=JSON.parse(e.toString());switch(null==c?void 0:c.type){case"init":var d=c.data;"successful"!==d.auth?a("Command initialization failed: ".concat(null!==(n=null==d?void 0:d.message)&&void 0!==n?n:"Reason unknown")):t.emit("auth-success",d);break;case"completion":i=c.data,t.emit("command-result",i),null===(r=t.duplex)||void 0===r||r.end();break;case"stdOut":t.emit("std-out-data",c.data),t.stdOut.write(c.data,null===(u=t.execConfig)||void 0===u?void 0:u.encoding);break;case"stdErr":t.emit("std-err-data",c.data),t.stdErr.write(c.data,null===(o=t.execConfig)||void 0===o?void 0:o.encoding);break;case"error":a(null===(s=c.data)||void 0===s?void 0:s.message);break;default:var l="unable to parse message: ".concat(JSON.stringify(c));a(l)}}),null===(u=t.duplex)||void 0===u||u.on("end",function(){t.emit("command-completed"),t.reset(),e(i)}),null===(o=t.duplex)||void 0===o||o.on("error",function(n){t.emit("error",n),t.emit("command-completed"),t.reset(),e(i)});var a=function(e){t.emit("error",e),t.reset(),n(new Error(e))};t.emit("command-started")}),[2,this.currentCommand]})})},e.prototype.initialAuth=function(){var t,e=this.execConfig,n=e.command,r=e.containerName,u=e.instanceName,o=e.shell,i=e.user,s=this.execConfig,a=s.group,c=s.encoding,d=s.tty,l=s.ttyColumns,h=s.ttyRows,p={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{instanceName:u,containerName:r,command:n,shell:o,user:i,group:a,encoding:c,tty:d,ttyColumns:l,ttyRows:h}}};null===(t=this.duplex)||void 0===t||t.write(JSON.stringify(p))},e.prototype.reset=function(){var t;this.remote=void 0,this.currentCommand=void 0,null===(t=this.duplex)||void 0===t||t.destroy(),this.duplex=void 0},e}(e),tc=function(){function t(t,e){this.contextProvider=t,this.agent=e,this.assertStartedWithNodejs=function(){if(!Fo)throw new Error("Command exec only possible when started with nodejs")}}return t.prototype.execServiceCommand=function(t,e){return J(this,void 0,void 0,function(){var n,r,u;return V(this,function(o){return n=t.serviceId,r=t.projectId,u=W({projectId:r,entityId:n,entityType:"service"},e),[2,this.execCommand(u)]})})},t.prototype.execServiceSession=function(t,e,n){return J(this,void 0,void 0,function(){var r,u,o;return V(this,function(i){switch(i.label){case 0:return r=t.serviceId,u=t.projectId,o=W({projectId:u,entityId:r,entityType:"service"},e),[4,this.shellSession(o,n)];case 1:return[2,i.sent()]}})})},t.prototype.execJobCommand=function(t,e){return J(this,void 0,void 0,function(){var n,r,u;return V(this,function(o){return n=t.jobId,r=t.projectId,u=W({projectId:r,entityId:n,entityType:"job"},e),[2,this.execCommand(u)]})})},t.prototype.execJobSession=function(t,e,n){return J(this,void 0,void 0,function(){var r,u,o;return V(this,function(i){switch(i.label){case 0:return r=t.jobId,u=t.projectId,o=W({projectId:u,entityId:r,entityType:"job"},e),[4,this.shellSession(o,n)];case 1:return[2,i.sent()]}})})},t.prototype.execAddonCommand=function(t,e){return J(this,void 0,void 0,function(){var n,r,u;return V(this,function(o){return n=t.addonId,r=t.projectId,u=W({projectId:r,entityId:n,entityType:"addon"},e),[2,this.execCommand(u)]})})},t.prototype.execAddonSession=function(t,e,n){return J(this,void 0,void 0,function(){var r,u,o;return V(this,function(i){switch(i.label){case 0:return r=t.addonId,u=t.projectId,o=W({projectId:u,entityId:r,entityType:"addon"},e),[4,this.shellSession(o,n)];case 1:return[2,i.sent()]}})})},t.prototype.execCommand=function(t){return J(this,void 0,void 0,function(){var e,n,r;return V(this,function(u){switch(u.label){case 0:return this.assertStartedWithNodejs(),e=this.getCommandRunner(W({shell:"none"},t)),n=new Io,r=new Io,e.stdOut.pipe(n),e.stdErr.pipe(r),e.on("error",function(t){throw new Error(t)}),[4,e.start()];case 1:return[2,{commandResult:u.sent(),stdOut:n.getContentsAsString(),stdErr:r.getContentsAsString()}]}})})},t.prototype.shellSession=function(t,e){return J(this,void 0,void 0,function(){var n,r;return V(this,function(u){switch(u.label){case 0:return this.assertStartedWithNodejs(),n=this.getCommandRunner(t),r=new Promise(function(t){n.on("auth-success",function(n){null==e||e(null==n?void 0:n.context),t()})}),n.start(),[4,r];case 1:return u.sent(),[2,n]}})})},t.prototype.getCommandRunner=function(t){var e=this.contextProvider.getCurrentBaseUrl(!0),n=this.contextProvider.getCurrentToken();if(!n)throw Error("API token not found");return new Qa(e,t,n,this.agent)},t}();const ec="object"==typeof process&&process?process:{stdout:null,stderr:null},nc=t=>!!t&&"object"==typeof t&&(t instanceof qc||t instanceof U||rc(t)||uc(t)),rc=t=>!!t&&"object"==typeof t&&t instanceof _&&"function"==typeof t.pipe&&t.pipe!==U.Writable.prototype.pipe,uc=t=>!!t&&"object"==typeof t&&t instanceof _&&"function"==typeof t.write&&"function"==typeof t.end,oc=Symbol("EOF"),ic=Symbol("maybeEmitEnd"),sc=Symbol("emittedEnd"),ac=Symbol("emittingEnd"),cc=Symbol("emittedError"),dc=Symbol("closed"),lc=Symbol("read"),hc=Symbol("flush"),pc=Symbol("flushChunk"),fc=Symbol("encoding"),mc=Symbol("decoder"),vc=Symbol("flowing"),Ec=Symbol("paused"),Ac=Symbol("resume"),bc=Symbol("buffer"),yc=Symbol("pipes"),gc=Symbol("bufferLength"),Cc=Symbol("bufferPush"),Fc=Symbol("bufferShift"),wc=Symbol("objectMode"),Dc=Symbol("destroyed"),Bc=Symbol("error"),Ic=Symbol("emitData"),Rc=Symbol("emitEnd"),jc=Symbol("emitEnd2"),Sc=Symbol("async"),_c=Symbol("abort"),Uc=Symbol("aborted"),Pc=Symbol("signal"),Oc=Symbol("dataListeners"),kc=Symbol("discarded"),xc=t=>Promise.resolve().then(t),Tc=t=>t();class Lc{src;dest;opts;ondrain;constructor(t,e,n){this.src=t,this.dest=e,this.opts=n,this.ondrain=()=>t[Ac](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class Nc extends Lc{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,n){super(t,e,n),this.proxyErrors=t=>e.emit("error",t),t.on("error",this.proxyErrors)}}class qc extends _{[vc]=!1;[Ec]=!1;[yc]=[];[bc]=[];[wc];[fc];[Sc];[mc];[oc]=!1;[sc]=!1;[ac]=!1;[dc]=!1;[cc]=null;[gc]=0;[Dc]=!1;[Pc];[Uc]=!1;[Oc]=0;[kc]=!1;writable=!0;readable=!0;constructor(...t){const e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw new TypeError("Encoding and objectMode may not be used together");e.objectMode?(this[wc]=!0,this[fc]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[fc]=e.encoding,this[wc]=!1):(this[wc]=!1,this[fc]=null),this[Sc]=!!e.async,this[mc]=this[fc]?new P(this[fc]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[bc]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[yc]});const{signal:n}=e;n&&(this[Pc]=n,n.aborted?this[_c]():n.addEventListener("abort",()=>this[_c]()))}get bufferLength(){return this[gc]}get encoding(){return this[fc]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[wc]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Sc]}set async(t){this[Sc]=this[Sc]||!!t}[_c](){this[Uc]=!0,this.emit("abort",this[Pc]?.reason),this.destroy(this[Pc]?.reason)}get aborted(){return this[Uc]}set aborted(t){}write(t,e,n){if(this[Uc])return!1;if(this[oc])throw new Error("write after end");if(this[Dc])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(n=e,e="utf8"),e||(e="utf8");const r=this[Sc]?xc:Tc;if(!this[wc]&&!Buffer.isBuffer(t))if(u=t,!Buffer.isBuffer(u)&&ArrayBuffer.isView(u))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if((t=>t instanceof ArrayBuffer||!!t&&"object"==typeof t&&t.constructor&&"ArrayBuffer"===t.constructor.name&&t.byteLength>=0)(t))t=Buffer.from(t);else if("string"!=typeof t)throw new Error("Non-contiguous data written to non-objectMode stream");var u;return this[wc]?(this[vc]&&0!==this[gc]&&this[hc](!0),this[vc]?this.emit("data",t):this[Cc](t),0!==this[gc]&&this.emit("readable"),n&&r(n),this[vc]):t.length?("string"!=typeof t||e===this[fc]&&!this[mc]?.lastNeed||(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[fc]&&(t=this[mc].write(t)),this[vc]&&0!==this[gc]&&this[hc](!0),this[vc]?this.emit("data",t):this[Cc](t),0!==this[gc]&&this.emit("readable"),n&&r(n),this[vc]):(0!==this[gc]&&this.emit("readable"),n&&r(n),this[vc])}read(t){if(this[Dc])return null;if(this[kc]=!1,0===this[gc]||0===t||t&&t>this[gc])return this[ic](),null;this[wc]&&(t=null),this[bc].length>1&&!this[wc]&&(this[bc]=[this[fc]?this[bc].join(""):Buffer.concat(this[bc],this[gc])]);const e=this[lc](t||null,this[bc][0]);return this[ic](),e}[lc](t,e){if(this[wc])this[Fc]();else{const n=e;t===n.length||null===t?this[Fc]():"string"==typeof n?(this[bc][0]=n.slice(t),e=n.slice(0,t),this[gc]-=t):(this[bc][0]=n.subarray(t),e=n.subarray(0,t),this[gc]-=t)}return this.emit("data",e),this[bc].length||this[oc]||this.emit("drain"),e}end(t,e,n){return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e="utf8"),void 0!==t&&this.write(t,e),n&&this.once("end",n),this[oc]=!0,this.writable=!1,!this[vc]&&this[Ec]||this[ic](),this}[Ac](){this[Dc]||(this[Oc]||this[yc].length||(this[kc]=!0),this[Ec]=!1,this[vc]=!0,this.emit("resume"),this[bc].length?this[hc]():this[oc]?this[ic]():this.emit("drain"))}resume(){return this[Ac]()}pause(){this[vc]=!1,this[Ec]=!0,this[kc]=!1}get destroyed(){return this[Dc]}get flowing(){return this[vc]}get paused(){return this[Ec]}[Cc](t){this[wc]?this[gc]+=1:this[gc]+=t.length,this[bc].push(t)}[Fc](){return this[wc]?this[gc]-=1:this[gc]-=this[bc][0].length,this[bc].shift()}[hc](t=!1){do{}while(this[pc](this[Fc]())&&this[bc].length);t||this[bc].length||this[oc]||this.emit("drain")}[pc](t){return this.emit("data",t),this[vc]}pipe(t,e){if(this[Dc])return t;this[kc]=!1;const n=this[sc];return e=e||{},t===ec.stdout||t===ec.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,n?e.end&&t.end():(this[yc].push(e.proxyErrors?new Nc(this,t,e):new Lc(this,t,e)),this[Sc]?xc(()=>this[Ac]()):this[Ac]()),t}unpipe(t){const e=this[yc].find(e=>e.dest===t);e&&(1===this[yc].length?(this[vc]&&0===this[Oc]&&(this[vc]=!1),this[yc]=[]):this[yc].splice(this[yc].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){const n=super.on(t,e);if("data"===t)this[kc]=!1,this[Oc]++,this[yc].length||this[vc]||this[Ac]();else if("readable"===t&&0!==this[gc])super.emit("readable");else if((t=>"end"===t||"finish"===t||"prefinish"===t)(t)&&this[sc])super.emit(t),this.removeAllListeners(t);else if("error"===t&&this[cc]){const t=e;this[Sc]?xc(()=>t.call(this,this[cc])):t.call(this,this[cc])}return n}removeListener(t,e){return this.off(t,e)}off(t,e){const n=super.off(t,e);return"data"===t&&(this[Oc]=this.listeners("data").length,0!==this[Oc]||this[kc]||this[yc].length||(this[vc]=!1)),n}removeAllListeners(t){const e=super.removeAllListeners(t);return"data"!==t&&void 0!==t||(this[Oc]=0,this[kc]||this[yc].length||(this[vc]=!1)),e}get emittedEnd(){return this[sc]}[ic](){this[ac]||this[sc]||this[Dc]||0!==this[bc].length||!this[oc]||(this[ac]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[dc]&&this.emit("close"),this[ac]=!1)}emit(t,...e){const n=e[0];if("error"!==t&&"close"!==t&&t!==Dc&&this[Dc])return!1;if("data"===t)return!(!this[wc]&&!n)&&(this[Sc]?(xc(()=>this[Ic](n)),!0):this[Ic](n));if("end"===t)return this[Rc]();if("close"===t){if(this[dc]=!0,!this[sc]&&!this[Dc])return!1;const t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[cc]=n,super.emit(Bc,n);const t=!(this[Pc]&&!this.listeners("error").length)&&super.emit("error",n);return this[ic](),t}if("resume"===t){const t=super.emit("resume");return this[ic](),t}if("finish"===t||"prefinish"===t){const e=super.emit(t);return this.removeAllListeners(t),e}const r=super.emit(t,...e);return this[ic](),r}[Ic](t){for(const e of this[yc])!1===e.dest.write(t)&&this.pause();const e=!this[kc]&&super.emit("data",t);return this[ic](),e}[Rc](){return!this[sc]&&(this[sc]=!0,this.readable=!1,this[Sc]?(xc(()=>this[jc]()),!0):this[jc]())}[jc](){if(this[mc]){const t=this[mc].end();if(t){for(const e of this[yc])e.dest.write(t);this[kc]||super.emit("data",t)}}for(const t of this[yc])t.end();const t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){const t=Object.assign([],{dataLength:0});this[wc]||(t.dataLength=0);const e=this.promise();return this.on("data",e=>{t.push(e),this[wc]||(t.dataLength+=e.length)}),await e,t}async concat(){if(this[wc])throw new Error("cannot concat in objectMode");const t=await this.collect();return this[fc]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(Dc,()=>e(new Error("stream destroyed"))),this.on("error",t=>e(t)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[kc]=!1;let t=!1;const e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[oc])return e();let r,u;const o=t=>{this.off("data",i),this.off("end",s),this.off(Dc,a),e(),u(t)},i=t=>{this.off("error",o),this.off("end",s),this.off(Dc,a),this.pause(),r({value:t,done:!!this[oc]})},s=()=>{this.off("error",o),this.off("data",i),this.off(Dc,a),e(),r({done:!0,value:void 0})},a=()=>o(new Error("stream destroyed"));return new Promise((t,e)=>{u=e,r=t,this.once(Dc,a),this.once("error",o),this.once("end",s),this.once("data",i)})},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[kc]=!1;let t=!1;const e=()=>(this.pause(),this.off(Bc,e),this.off(Dc,e),this.off("end",e),t=!0,{done:!0,value:void 0});return this.once("end",e),this.once(Bc,e),this.once(Dc,e),{next:()=>{if(t)return e();const n=this.read();return null===n?e():{done:!1,value:n}},throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[Dc])return t?this.emit("error",t):this.emit(Dc),this;this[Dc]=!0,this[kc]=!0,this[bc].length=0,this[gc]=0;return"function"!=typeof this.close||this[dc]||this.close(),t?this.emit("error",t):this.emit(Dc),this}static get isStream(){return nc}}const Mc=E.writev,Gc=Symbol("_autoClose"),zc=Symbol("_close"),$c=Symbol("_ended"),Wc=Symbol("_fd"),Jc=Symbol("_finished"),Vc=Symbol("_flags"),Hc=Symbol("_flush"),Zc=Symbol("_handleChunk"),Yc=Symbol("_makeBuf"),Kc=Symbol("_mode"),Xc=Symbol("_needDrain"),Qc=Symbol("_onerror"),td=Symbol("_onopen"),ed=Symbol("_onread"),nd=Symbol("_onwrite"),rd=Symbol("_open"),ud=Symbol("_path"),od=Symbol("_pos"),id=Symbol("_queue"),sd=Symbol("_read"),ad=Symbol("_readSize"),cd=Symbol("_reading"),dd=Symbol("_remain"),ld=Symbol("_size"),hd=Symbol("_write"),pd=Symbol("_writing"),fd=Symbol("_defaultFlag"),md=Symbol("_errored");class vd extends qc{[md]=!1;[Wc];[ud];[ad];[cd]=!1;[ld];[dd];[Gc];constructor(t,e){if(super(e=e||{}),this.readable=!0,this.writable=!1,"string"!=typeof t)throw new TypeError("path must be a string");this[md]=!1,this[Wc]="number"==typeof e.fd?e.fd:void 0,this[ud]=t,this[ad]=e.readSize||16777216,this[cd]=!1,this[ld]="number"==typeof e.size?e.size:1/0,this[dd]=this[ld],this[Gc]="boolean"!=typeof e.autoClose||e.autoClose,"number"==typeof this[Wc]?this[sd]():this[rd]()}get fd(){return this[Wc]}get path(){return this[ud]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[rd](){E.open(this[ud],"r",(t,e)=>this[td](t,e))}[td](t,e){t?this[Qc](t):(this[Wc]=e,this.emit("open",e),this[sd]())}[Yc](){return Buffer.allocUnsafe(Math.min(this[ad],this[dd]))}[sd](){if(!this[cd]){this[cd]=!0;const t=this[Yc]();if(0===t.length)return process.nextTick(()=>this[ed](null,0,t));E.read(this[Wc],t,0,t.length,null,(t,e,n)=>this[ed](t,e,n))}}[ed](t,e,n){this[cd]=!1,t?this[Qc](t):this[Zc](e,n)&&this[sd]()}[zc](){if(this[Gc]&&"number"==typeof this[Wc]){const t=this[Wc];this[Wc]=void 0,E.close(t,t=>t?this.emit("error",t):this.emit("close"))}}[Qc](t){this[cd]=!0,this[zc](),this.emit("error",t)}[Zc](t,e){let n=!1;return this[dd]-=t,t>0&&(n=super.write(t<e.length?e.subarray(0,t):e)),(0===t||this[dd]<=0)&&(n=!1,this[zc](),super.end()),n}emit(t,...e){switch(t){case"prefinish":case"finish":return!1;case"drain":return"number"==typeof this[Wc]&&this[sd](),!1;case"error":return!this[md]&&(this[md]=!0,super.emit(t,...e));default:return super.emit(t,...e)}}}class Ed extends vd{[rd](){let t=!0;try{this[td](null,E.openSync(this[ud],"r")),t=!1}finally{t&&this[zc]()}}[sd](){let t=!0;try{if(!this[cd]){for(this[cd]=!0;;){const t=this[Yc](),e=0===t.length?0:E.readSync(this[Wc],t,0,t.length,null);if(!this[Zc](e,t))break}this[cd]=!1}t=!1}finally{t&&this[zc]()}}[zc](){if(this[Gc]&&"number"==typeof this[Wc]){const t=this[Wc];this[Wc]=void 0,E.closeSync(t),this.emit("close")}}}class Ad extends t{readable=!1;writable=!0;[md]=!1;[pd]=!1;[$c]=!1;[id]=[];[Xc]=!1;[ud];[Kc];[Gc];[Wc];[fd];[Vc];[Jc]=!1;[od];constructor(t,e){super(e=e||{}),this[ud]=t,this[Wc]="number"==typeof e.fd?e.fd:void 0,this[Kc]=void 0===e.mode?438:e.mode,this[od]="number"==typeof e.start?e.start:void 0,this[Gc]="boolean"!=typeof e.autoClose||e.autoClose;const n=void 0!==this[od]?"r+":"w";this[fd]=void 0===e.flags,this[Vc]=void 0===e.flags?n:e.flags,void 0===this[Wc]&&this[rd]()}emit(t,...e){if("error"===t){if(this[md])return!1;this[md]=!0}return super.emit(t,...e)}get fd(){return this[Wc]}get path(){return this[ud]}[Qc](t){this[zc](),this[pd]=!0,this.emit("error",t)}[rd](){E.open(this[ud],this[Vc],this[Kc],(t,e)=>this[td](t,e))}[td](t,e){this[fd]&&"r+"===this[Vc]&&t&&"ENOENT"===t.code?(this[Vc]="w",this[rd]()):t?this[Qc](t):(this[Wc]=e,this.emit("open",e),this[pd]||this[Hc]())}end(t,e){return t&&this.write(t,e),this[$c]=!0,this[pd]||this[id].length||"number"!=typeof this[Wc]||this[nd](null,0),this}write(t,e){return"string"==typeof t&&(t=Buffer.from(t,e)),this[$c]?(this.emit("error",new Error("write() after end()")),!1):void 0===this[Wc]||this[pd]||this[id].length?(this[id].push(t),this[Xc]=!0,!1):(this[pd]=!0,this[hd](t),!0)}[hd](t){E.write(this[Wc],t,0,t.length,this[od],(t,e)=>this[nd](t,e))}[nd](t,e){t?this[Qc](t):(void 0!==this[od]&&"number"==typeof e&&(this[od]+=e),this[id].length?this[Hc]():(this[pd]=!1,this[$c]&&!this[Jc]?(this[Jc]=!0,this[zc](),this.emit("finish")):this[Xc]&&(this[Xc]=!1,this.emit("drain"))))}[Hc](){if(0===this[id].length)this[$c]&&this[nd](null,0);else if(1===this[id].length)this[hd](this[id].pop());else{const t=this[id];this[id]=[],Mc(this[Wc],t,this[od],(t,e)=>this[nd](t,e))}}[zc](){if(this[Gc]&&"number"==typeof this[Wc]){const t=this[Wc];this[Wc]=void 0,E.close(t,t=>t?this.emit("error",t):this.emit("close"))}}}class bd extends Ad{[rd](){let t;if(this[fd]&&"r+"===this[Vc])try{t=E.openSync(this[ud],this[Vc],this[Kc])}catch(t){if("ENOENT"===t?.code)return this[Vc]="w",this[rd]();throw t}else t=E.openSync(this[ud],this[Vc],this[Kc]);this[td](null,t)}[zc](){if(this[Gc]&&"number"==typeof this[Wc]){const t=this[Wc];this[Wc]=void 0,E.closeSync(t),this.emit("close")}}[hd](t){let e=!0;try{this[nd](null,E.writeSync(this[Wc],t,0,t.length,this[od])),e=!1}finally{if(e)try{this[zc]()}catch{}}}}const yd=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),gd=t=>{const e=yd.get(t);return e||t},Cd=(t={})=>{if(!t)return{};const e={};for(const[n,r]of Object.entries(t)){e[gd(n)]=r}return void 0===e.chmod&&!1===e.noChmod&&(e.chmod=!0),delete e.noChmod,e},Fd=(t,e,n,r,u)=>Object.assign((o=[],i,s)=>{Array.isArray(o)&&(i=o,o={}),"function"==typeof i&&(s=i,i=void 0),i=i?Array.from(i):[];const a=Cd(o);if(u?.(a,i),(c=a).sync&&c.file){if("function"==typeof s)throw new TypeError("callback not supported for sync tar functions");return t(a,i)}if((t=>!t.sync&&!!t.file)(a)){const t=e(a,i),n=s||void 0;return n?t.then(()=>n(),n):t}if((t=>!!t.sync&&!t.file)(a)){if("function"==typeof s)throw new TypeError("callback not supported for sync tar functions");return n(a,i)}if((t=>!t.sync&&!t.file)(a)){if("function"==typeof s)throw new TypeError("callback only supported with file option");return r(a,i)}throw new Error("impossible options??");var c},{syncFile:t,asyncFile:e,syncNoFile:n,asyncNoFile:r,validate:u}),wd="object"==typeof process&&process?process:{stdout:null,stderr:null},Dd=t=>!!t&&"object"==typeof t&&(t instanceof cl||t instanceof U||Bd(t)||Id(t)),Bd=t=>!!t&&"object"==typeof t&&t instanceof _&&"function"==typeof t.pipe&&t.pipe!==U.Writable.prototype.pipe,Id=t=>!!t&&"object"==typeof t&&t instanceof _&&"function"==typeof t.write&&"function"==typeof t.end,Rd=Symbol("EOF"),jd=Symbol("maybeEmitEnd"),Sd=Symbol("emittedEnd"),_d=Symbol("emittingEnd"),Ud=Symbol("emittedError"),Pd=Symbol("closed"),Od=Symbol("read"),kd=Symbol("flush"),xd=Symbol("flushChunk"),Td=Symbol("encoding"),Ld=Symbol("decoder"),Nd=Symbol("flowing"),qd=Symbol("paused"),Md=Symbol("resume"),Gd=Symbol("buffer"),zd=Symbol("pipes"),$d=Symbol("bufferLength"),Wd=Symbol("bufferPush"),Jd=Symbol("bufferShift"),Vd=Symbol("objectMode"),Hd=Symbol("destroyed"),Zd=Symbol("error"),Yd=Symbol("emitData"),Kd=Symbol("emitEnd"),Xd=Symbol("emitEnd2"),Qd=Symbol("async"),tl=Symbol("abort"),el=Symbol("aborted"),nl=Symbol("signal"),rl=Symbol("dataListeners"),ul=Symbol("discarded"),ol=t=>Promise.resolve().then(t),il=t=>t();class sl{src;dest;opts;ondrain;constructor(t,e,n){this.src=t,this.dest=e,this.opts=n,this.ondrain=()=>t[Md](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class al extends sl{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,n){super(t,e,n),this.proxyErrors=t=>e.emit("error",t),t.on("error",this.proxyErrors)}}class cl extends _{[Nd]=!1;[qd]=!1;[zd]=[];[Gd]=[];[Vd];[Td];[Qd];[Ld];[Rd]=!1;[Sd]=!1;[_d]=!1;[Pd]=!1;[Ud]=null;[$d]=0;[Hd]=!1;[nl];[el]=!1;[rl]=0;[ul]=!1;writable=!0;readable=!0;constructor(...t){const e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw new TypeError("Encoding and objectMode may not be used together");e.objectMode?(this[Vd]=!0,this[Td]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[Td]=e.encoding,this[Vd]=!1):(this[Vd]=!1,this[Td]=null),this[Qd]=!!e.async,this[Ld]=this[Td]?new P(this[Td]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[Gd]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[zd]});const{signal:n}=e;n&&(this[nl]=n,n.aborted?this[tl]():n.addEventListener("abort",()=>this[tl]()))}get bufferLength(){return this[$d]}get encoding(){return this[Td]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Vd]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Qd]}set async(t){this[Qd]=this[Qd]||!!t}[tl](){this[el]=!0,this.emit("abort",this[nl]?.reason),this.destroy(this[nl]?.reason)}get aborted(){return this[el]}set aborted(t){}write(t,e,n){if(this[el])return!1;if(this[Rd])throw new Error("write after end");if(this[Hd])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(n=e,e="utf8"),e||(e="utf8");const r=this[Qd]?ol:il;if(!this[Vd]&&!Buffer.isBuffer(t))if(u=t,!Buffer.isBuffer(u)&&ArrayBuffer.isView(u))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if((t=>t instanceof ArrayBuffer||!!t&&"object"==typeof t&&t.constructor&&"ArrayBuffer"===t.constructor.name&&t.byteLength>=0)(t))t=Buffer.from(t);else if("string"!=typeof t)throw new Error("Non-contiguous data written to non-objectMode stream");var u;return this[Vd]?(this[Nd]&&0!==this[$d]&&this[kd](!0),this[Nd]?this.emit("data",t):this[Wd](t),0!==this[$d]&&this.emit("readable"),n&&r(n),this[Nd]):t.length?("string"!=typeof t||e===this[Td]&&!this[Ld]?.lastNeed||(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[Td]&&(t=this[Ld].write(t)),this[Nd]&&0!==this[$d]&&this[kd](!0),this[Nd]?this.emit("data",t):this[Wd](t),0!==this[$d]&&this.emit("readable"),n&&r(n),this[Nd]):(0!==this[$d]&&this.emit("readable"),n&&r(n),this[Nd])}read(t){if(this[Hd])return null;if(this[ul]=!1,0===this[$d]||0===t||t&&t>this[$d])return this[jd](),null;this[Vd]&&(t=null),this[Gd].length>1&&!this[Vd]&&(this[Gd]=[this[Td]?this[Gd].join(""):Buffer.concat(this[Gd],this[$d])]);const e=this[Od](t||null,this[Gd][0]);return this[jd](),e}[Od](t,e){if(this[Vd])this[Jd]();else{const n=e;t===n.length||null===t?this[Jd]():"string"==typeof n?(this[Gd][0]=n.slice(t),e=n.slice(0,t),this[$d]-=t):(this[Gd][0]=n.subarray(t),e=n.subarray(0,t),this[$d]-=t)}return this.emit("data",e),this[Gd].length||this[Rd]||this.emit("drain"),e}end(t,e,n){return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e="utf8"),void 0!==t&&this.write(t,e),n&&this.once("end",n),this[Rd]=!0,this.writable=!1,!this[Nd]&&this[qd]||this[jd](),this}[Md](){this[Hd]||(this[rl]||this[zd].length||(this[ul]=!0),this[qd]=!1,this[Nd]=!0,this.emit("resume"),this[Gd].length?this[kd]():this[Rd]?this[jd]():this.emit("drain"))}resume(){return this[Md]()}pause(){this[Nd]=!1,this[qd]=!0,this[ul]=!1}get destroyed(){return this[Hd]}get flowing(){return this[Nd]}get paused(){return this[qd]}[Wd](t){this[Vd]?this[$d]+=1:this[$d]+=t.length,this[Gd].push(t)}[Jd](){return this[Vd]?this[$d]-=1:this[$d]-=this[Gd][0].length,this[Gd].shift()}[kd](t=!1){do{}while(this[xd](this[Jd]())&&this[Gd].length);t||this[Gd].length||this[Rd]||this.emit("drain")}[xd](t){return this.emit("data",t),this[Nd]}pipe(t,e){if(this[Hd])return t;this[ul]=!1;const n=this[Sd];return e=e||{},t===wd.stdout||t===wd.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,n?e.end&&t.end():(this[zd].push(e.proxyErrors?new al(this,t,e):new sl(this,t,e)),this[Qd]?ol(()=>this[Md]()):this[Md]()),t}unpipe(t){const e=this[zd].find(e=>e.dest===t);e&&(1===this[zd].length?(this[Nd]&&0===this[rl]&&(this[Nd]=!1),this[zd]=[]):this[zd].splice(this[zd].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){const n=super.on(t,e);if("data"===t)this[ul]=!1,this[rl]++,this[zd].length||this[Nd]||this[Md]();else if("readable"===t&&0!==this[$d])super.emit("readable");else if((t=>"end"===t||"finish"===t||"prefinish"===t)(t)&&this[Sd])super.emit(t),this.removeAllListeners(t);else if("error"===t&&this[Ud]){const t=e;this[Qd]?ol(()=>t.call(this,this[Ud])):t.call(this,this[Ud])}return n}removeListener(t,e){return this.off(t,e)}off(t,e){const n=super.off(t,e);return"data"===t&&(this[rl]=this.listeners("data").length,0!==this[rl]||this[ul]||this[zd].length||(this[Nd]=!1)),n}removeAllListeners(t){const e=super.removeAllListeners(t);return"data"!==t&&void 0!==t||(this[rl]=0,this[ul]||this[zd].length||(this[Nd]=!1)),e}get emittedEnd(){return this[Sd]}[jd](){this[_d]||this[Sd]||this[Hd]||0!==this[Gd].length||!this[Rd]||(this[_d]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Pd]&&this.emit("close"),this[_d]=!1)}emit(t,...e){const n=e[0];if("error"!==t&&"close"!==t&&t!==Hd&&this[Hd])return!1;if("data"===t)return!(!this[Vd]&&!n)&&(this[Qd]?(ol(()=>this[Yd](n)),!0):this[Yd](n));if("end"===t)return this[Kd]();if("close"===t){if(this[Pd]=!0,!this[Sd]&&!this[Hd])return!1;const t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[Ud]=n,super.emit(Zd,n);const t=!(this[nl]&&!this.listeners("error").length)&&super.emit("error",n);return this[jd](),t}if("resume"===t){const t=super.emit("resume");return this[jd](),t}if("finish"===t||"prefinish"===t){const e=super.emit(t);return this.removeAllListeners(t),e}const r=super.emit(t,...e);return this[jd](),r}[Yd](t){for(const e of this[zd])!1===e.dest.write(t)&&this.pause();const e=!this[ul]&&super.emit("data",t);return this[jd](),e}[Kd](){return!this[Sd]&&(this[Sd]=!0,this.readable=!1,this[Qd]?(ol(()=>this[Xd]()),!0):this[Xd]())}[Xd](){if(this[Ld]){const t=this[Ld].end();if(t){for(const e of this[zd])e.dest.write(t);this[ul]||super.emit("data",t)}}for(const t of this[zd])t.end();const t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){const t=Object.assign([],{dataLength:0});this[Vd]||(t.dataLength=0);const e=this.promise();return this.on("data",e=>{t.push(e),this[Vd]||(t.dataLength+=e.length)}),await e,t}async concat(){if(this[Vd])throw new Error("cannot concat in objectMode");const t=await this.collect();return this[Td]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(Hd,()=>e(new Error("stream destroyed"))),this.on("error",t=>e(t)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[ul]=!1;let t=!1;const e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[Rd])return e();let r,u;const o=t=>{this.off("data",i),this.off("end",s),this.off(Hd,a),e(),u(t)},i=t=>{this.off("error",o),this.off("end",s),this.off(Hd,a),this.pause(),r({value:t,done:!!this[Rd]})},s=()=>{this.off("error",o),this.off("data",i),this.off(Hd,a),e(),r({done:!0,value:void 0})},a=()=>o(new Error("stream destroyed"));return new Promise((t,e)=>{u=e,r=t,this.once(Hd,a),this.once("error",o),this.once("end",s),this.once("data",i)})},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ul]=!1;let t=!1;const e=()=>(this.pause(),this.off(Zd,e),this.off(Hd,e),this.off("end",e),t=!0,{done:!0,value:void 0});return this.once("end",e),this.once(Zd,e),this.once(Hd,e),{next:()=>{if(t)return e();const n=this.read();return null===n?e():{done:!1,value:n}},throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[Hd])return t?this.emit("error",t):this.emit(Hd),this;this[Hd]=!0,this[ul]=!0,this[Gd].length=0,this[$d]=0;return"function"!=typeof this.close||this[Pd]||this.close(),t?this.emit("error",t):this.emit(Hd),this}static get isStream(){return Dd}}const dl=h.constants||{ZLIB_VERNUM:4736},ll=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},dl)),hl=j.concat,pl=Object.getOwnPropertyDescriptor(j,"concat"),fl=t=>t,ml=!0===pl?.writable||void 0!==pl?.set?t=>{j.concat=t?fl:hl}:t=>{},vl=Symbol("_superWrite");class El extends Error{code;errno;constructor(t){super("zlib: "+t.message),this.code=t.code,this.errno=t.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+t.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const Al=Symbol("flushFlag");class bl extends cl{#t=!1;#e=!1;#n;#r;#u;#o;#i;get sawError(){return this.#t}get handle(){return this.#o}get flushFlag(){return this.#n}constructor(t,e){if(!t||"object"!=typeof t)throw new TypeError("invalid options for ZlibBase constructor");super(t),this.#n=t.flush??0,this.#r=t.finishFlush??0,this.#u=t.fullFlushFlag??0;try{this.#o=new l[e](t)}catch(t){throw new El(t)}this.#i=t=>{this.#t||(this.#t=!0,this.close(),this.emit("error",t))},this.#o?.on("error",t=>this.#i(new El(t))),this.once("end",()=>this.close)}close(){this.#o&&(this.#o.close(),this.#o=void 0,this.emit("close"))}reset(){if(!this.#t)return q(this.#o,"zlib binding closed"),this.#o.reset?.()}flush(t){this.ended||("number"!=typeof t&&(t=this.#u),this.write(Object.assign(j.alloc(0),{[Al]:t})))}end(t,e,n){return"function"==typeof t&&(n=t,e=void 0,t=void 0),"function"==typeof e&&(n=e,e=void 0),t&&(e?this.write(t,e):this.write(t)),this.flush(this.#r),this.#e=!0,super.end(n)}get ended(){return this.#e}[vl](t){return super.write(t)}write(t,e,n){if("function"==typeof e&&(n=e,e="utf8"),"string"==typeof t&&(t=j.from(t,e)),this.#t)return;q(this.#o,"zlib binding closed");const r=this.#o._handle,u=r.close;r.close=()=>{};const o=this.#o.close;let i,s;this.#o.close=()=>{},ml(!0);try{const e="number"==typeof t[Al]?t[Al]:this.#n;i=this.#o._processChunk(t,e),ml(!1)}catch(t){ml(!1),this.#i(new El(t))}finally{this.#o&&(this.#o._handle=r,r.close=u,this.#o.close=o,this.#o.removeAllListeners("error"))}if(this.#o&&this.#o.on("error",t=>this.#i(new El(t))),i)if(Array.isArray(i)&&i.length>0){const t=i[0];s=this[vl](j.from(t));for(let t=1;t<i.length;t++)s=this[vl](i[t])}else s=this[vl](j.from(i));return n&&n(),s}}class yl extends bl{#s;#a;constructor(t,e){(t=t||{}).flush=t.flush||ll.Z_NO_FLUSH,t.finishFlush=t.finishFlush||ll.Z_FINISH,t.fullFlushFlag=ll.Z_FULL_FLUSH,super(t,e),this.#s=t.level,this.#a=t.strategy}params(t,e){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#s!==t||this.#a!==e){this.flush(ll.Z_SYNC_FLUSH),q(this.handle,"zlib binding closed");const n=this.handle.flush;this.handle.flush=(t,e)=>{"function"==typeof t&&(e=t,t=this.flushFlag),this.flush(t),e?.()};try{this.handle.params(t,e)}finally{this.handle.flush=n}this.handle&&(this.#s=t,this.#a=e)}}}}class gl extends yl{#c;constructor(t){super(t,"Gzip"),this.#c=t&&!!t.portable}[vl](t){return this.#c?(this.#c=!1,t[9]=255,super[vl](t)):super[vl](t)}}class Cl extends yl{constructor(t){super(t,"Unzip")}}class Fl extends bl{constructor(t,e){(t=t||{}).flush=t.flush||ll.BROTLI_OPERATION_PROCESS,t.finishFlush=t.finishFlush||ll.BROTLI_OPERATION_FINISH,t.fullFlushFlag=ll.BROTLI_OPERATION_FLUSH,super(t,e)}}class wl extends Fl{constructor(t){super(t,"BrotliCompress")}}class Dl extends Fl{constructor(t){super(t,"BrotliDecompress")}}class Bl{tail;head;length=0;static create(t=[]){return new Bl(t)}constructor(t=[]){for(const e of t)this.push(e)}*[Symbol.iterator](){for(let t=this.head;t;t=t.next)yield t.value}removeNode(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");const e=t.next,n=t.prev;return e&&(e.prev=n),n&&(n.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=n),this.length--,t.next=void 0,t.prev=void 0,t.list=void 0,e}unshiftNode(t){if(t===this.head)return;t.list&&t.list.removeNode(t);const e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}pushNode(t){if(t===this.tail)return;t.list&&t.list.removeNode(t);const e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}push(...t){for(let e=0,n=t.length;e<n;e++)Rl(this,t[e]);return this.length}unshift(...t){for(var e=0,n=t.length;e<n;e++)jl(this,t[e]);return this.length}pop(){if(!this.tail)return;const t=this.tail.value,e=this.tail;return this.tail=this.tail.prev,this.tail?this.tail.next=void 0:this.head=void 0,e.list=void 0,this.length--,t}shift(){if(!this.head)return;const t=this.head.value,e=this.head;return this.head=this.head.next,this.head?this.head.prev=void 0:this.tail=void 0,e.list=void 0,this.length--,t}forEach(t,e){e=e||this;for(let n=this.head,r=0;n;r++)t.call(e,n.value,r,this),n=n.next}forEachReverse(t,e){e=e||this;for(let n=this.tail,r=this.length-1;n;r--)t.call(e,n.value,r,this),n=n.prev}get(t){let e=0,n=this.head;for(;n&&e<t;e++)n=n.next;if(e===t&&n)return n.value}getReverse(t){let e=0,n=this.tail;for(;n&&e<t;e++)n=n.prev;if(e===t&&n)return n.value}map(t,e){e=e||this;const n=new Bl;for(let r=this.head;r;)n.push(t.call(e,r.value,this)),r=r.next;return n}mapReverse(t,e){e=e||this;var n=new Bl;for(let r=this.tail;r;)n.push(t.call(e,r.value,this)),r=r.prev;return n}reduce(t,e){let n,r=this.head;if(arguments.length>1)n=e;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var u=0;r;u++)n=t(n,r.value,u),r=r.next;return n}reduceReverse(t,e){let n,r=this.tail;if(arguments.length>1)n=e;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(let e=this.length-1;r;e--)n=t(n,r.value,e),r=r.prev;return n}toArray(){const t=new Array(this.length);for(let e=0,n=this.head;n;e++)t[e]=n.value,n=n.next;return t}toArrayReverse(){const t=new Array(this.length);for(let e=0,n=this.tail;n;e++)t[e]=n.value,n=n.prev;return t}slice(t=0,e=this.length){e<0&&(e+=this.length),t<0&&(t+=this.length);const n=new Bl;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);let r=this.head,u=0;for(u=0;r&&u<t;u++)r=r.next;for(;r&&u<e;u++,r=r.next)n.push(r.value);return n}sliceReverse(t=0,e=this.length){e<0&&(e+=this.length),t<0&&(t+=this.length);const n=new Bl;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);let r=this.length,u=this.tail;for(;u&&r>e;r--)u=u.prev;for(;u&&r>t;r--,u=u.prev)n.push(u.value);return n}splice(t,e=0,...n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);let r=this.head;for(let e=0;r&&e<t;e++)r=r.next;const u=[];for(let t=0;r&&t<e;t++)u.push(r.value),r=this.removeNode(r);r?r!==this.tail&&(r=r.prev):r=this.tail;for(const t of n)r=Il(this,r,t);return u}reverse(){const t=this.head,e=this.tail;for(let e=t;e;e=e.prev){const t=e.prev;e.prev=e.next,e.next=t}return this.head=e,this.tail=t,this}}function Il(t,e,n){const r=e,u=e?e.next:t.head,o=new Sl(n,r,u,t);return void 0===o.next&&(t.tail=o),void 0===o.prev&&(t.head=o),t.length++,o}function Rl(t,e){t.tail=new Sl(e,t.tail,void 0,t),t.head||(t.head=t.tail),t.length++}function jl(t,e){t.head=new Sl(e,void 0,t.head,t),t.tail||(t.tail=t.head),t.length++}class Sl{list;next;prev;value;constructor(t,e,n,r){this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=void 0,n?(n.prev=this,this.next=n):this.next=void 0}}const _l=(t,e)=>{e[0]=128;for(var n=e.length;n>1;n--)e[n-1]=255&t,t=Math.floor(t/256)},Ul=(t,e)=>{e[0]=255;var n=!1;t*=-1;for(var r=e.length;r>1;r--){var u=255&t;t=Math.floor(t/256),n?e[r-1]=kl(u):0===u?e[r-1]=0:(n=!0,e[r-1]=xl(u))}},Pl=t=>{for(var e=t.length,n=0,r=!1,u=e-1;u>-1;u--){var o,i=Number(t[u]);r?o=kl(i):0===i?o=i:(r=!0,o=xl(i)),0!==o&&(n-=o*Math.pow(256,e-u-1))}return n},Ol=t=>{for(var e=t.length,n=0,r=e-1;r>-1;r--){var u=Number(t[r]);0!==u&&(n+=u*Math.pow(256,e-r-1))}return n},kl=t=>255&(255^t),xl=t=>1+(255^t)&255,Tl=t=>Ll.has(t),Ll=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),Nl=new Map(Array.from(Ll).map(t=>[t[1],t[0]]));class ql{cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#d="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(t,e=0,n,r){Buffer.isBuffer(t)?this.decode(t,e||0,n,r):t&&this.#l(t)}decode(t,e,n,r){if(e||(e=0),!(t&&t.length>=e+512))throw new Error("need 512 bytes for header");this.path=Gl(t,e,100),this.mode=Wl(t,e+100,8),this.uid=Wl(t,e+108,8),this.gid=Wl(t,e+116,8),this.size=Wl(t,e+124,12),this.mtime=zl(t,e+136,12),this.cksum=Wl(t,e+148,12),r&&this.#l(r,!0),n&&this.#l(n);const u=Gl(t,e+156,1);if(Tl(u)&&(this.#d=u||"0"),"0"===this.#d&&"/"===this.path.slice(-1)&&(this.#d="5"),"5"===this.#d&&(this.size=0),this.linkpath=Gl(t,e+157,100),"ustar\x0000"===t.subarray(e+257,e+265).toString())if(this.uname=Gl(t,e+265,32),this.gname=Gl(t,e+297,32),this.devmaj=Wl(t,e+329,8)??0,this.devmin=Wl(t,e+337,8)??0,0!==t[e+475]){const n=Gl(t,e+345,155);this.path=n+"/"+this.path}else{const n=Gl(t,e+345,130);n&&(this.path=n+"/"+this.path),this.atime=zl(t,e+476,12),this.ctime=zl(t,e+488,12)}let o=256;for(let n=e;n<e+148;n++)o+=t[n];for(let n=e+156;n<e+512;n++)o+=t[n];this.cksumValid=o===this.cksum,void 0===this.cksum&&256===o&&(this.nullBlock=!0)}#l(t,e=!1){Object.assign(this,Object.fromEntries(Object.entries(t).filter(([t,n])=>!(null==n||"path"===t&&e||"linkpath"===t&&e||"global"===t))))}encode(t,e=0){if(t||(t=this.block=Buffer.alloc(512)),"Unsupported"===this.#d&&(this.#d="0"),!(t.length>=e+512))throw new Error("need 512 bytes for header");const n=this.ctime||this.atime?130:155,r=Ml(this.path||"",n),u=r[0],o=r[1];this.needPax=!!r[2],this.needPax=th(t,e,100,u)||this.needPax,this.needPax=Hl(t,e+100,8,this.mode)||this.needPax,this.needPax=Hl(t,e+108,8,this.uid)||this.needPax,this.needPax=Hl(t,e+116,8,this.gid)||this.needPax,this.needPax=Hl(t,e+124,12,this.size)||this.needPax,this.needPax=Xl(t,e+136,12,this.mtime)||this.needPax,t[e+156]=this.#d.charCodeAt(0),this.needPax=th(t,e+157,100,this.linkpath)||this.needPax,t.write("ustar\x0000",e+257,8),this.needPax=th(t,e+265,32,this.uname)||this.needPax,this.needPax=th(t,e+297,32,this.gname)||this.needPax,this.needPax=Hl(t,e+329,8,this.devmaj)||this.needPax,this.needPax=Hl(t,e+337,8,this.devmin)||this.needPax,this.needPax=th(t,e+345,n,o)||this.needPax,0!==t[e+475]?this.needPax=th(t,e+345,155,o)||this.needPax:(this.needPax=th(t,e+345,130,o)||this.needPax,this.needPax=Xl(t,e+476,12,this.atime)||this.needPax,this.needPax=Xl(t,e+488,12,this.ctime)||this.needPax);let i=256;for(let n=e;n<e+148;n++)i+=t[n];for(let n=e+156;n<e+512;n++)i+=t[n];return this.cksum=i,Hl(t,e+148,8,this.cksum),this.cksumValid=!0,this.needPax}get type(){return"Unsupported"===this.#d?this.#d:Ll.get(this.#d)}get typeKey(){return this.#d}set type(t){const e=String(Nl.get(t));if(Tl(e)||"Unsupported"===e)this.#d=e;else{if(!Tl(t))throw new TypeError("invalid entry type: "+t);this.#d=t}}}const Ml=(t,e)=>{const n=100;let r,u=t,o="";const i=k.parse(t).root||".";if(Buffer.byteLength(u)<n)r=[u,o,!1];else{o=k.dirname(u),u=k.basename(u);do{Buffer.byteLength(u)<=n&&Buffer.byteLength(o)<=e?r=[u,o,!1]:Buffer.byteLength(u)>n&&Buffer.byteLength(o)<=e?r=[u.slice(0,99),o,!0]:(u=k.join(k.basename(o),u),o=k.dirname(o))}while(o!==i&&void 0===r);r||(r=[t.slice(0,99),"",!0])}return r},Gl=(t,e,n)=>t.subarray(e,e+n).toString("utf8").replace(/\0.*/,""),zl=(t,e,n)=>$l(Wl(t,e,n)),$l=t=>void 0===t?void 0:new Date(1e3*t),Wl=(t,e,n)=>128&Number(t[e])?(t=>{const e=t[0],n=128===e?Ol(t.subarray(1,t.length)):255===e?Pl(t):null;if(null===n)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(n))throw Error("parsed number outside of javascript safe integer range");return n})(t.subarray(e,e+n)):Jl(t,e,n),Jl=(t,e,n)=>{return r=parseInt(t.subarray(e,e+n).toString("utf8").replace(/\0.*$/,"").trim(),8),isNaN(r)?void 0:r;var r},Vl={12:8589934591,8:2097151},Hl=(t,e,n,r)=>void 0!==r&&(r>Vl[n]||r<0?(((t,e)=>{if(!Number.isSafeInteger(t))throw Error("cannot encode number outside of javascript safe integer range");t<0?Ul(t,e):_l(t,e)})(r,t.subarray(e,e+n)),!0):(Zl(t,e,n,r),!1)),Zl=(t,e,n,r)=>t.write(Yl(r,n),e,n,"ascii"),Yl=(t,e)=>Kl(Math.floor(t).toString(8),e),Kl=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",Xl=(t,e,n,r)=>void 0!==r&&Hl(t,e,n,r.getTime()/1e3),Ql=new Array(156).join("\0"),th=(t,e,n,r)=>void 0!==r&&(t.write(r+Ql,e,n,"utf8"),r.length!==Buffer.byteLength(r)||r.length>n);class eh{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(t,e=!1){this.atime=t.atime,this.charset=t.charset,this.comment=t.comment,this.ctime=t.ctime,this.dev=t.dev,this.gid=t.gid,this.global=e,this.gname=t.gname,this.ino=t.ino,this.linkpath=t.linkpath,this.mtime=t.mtime,this.nlink=t.nlink,this.path=t.path,this.size=t.size,this.uid=t.uid,this.uname=t.uname}encode(){const t=this.encodeBody();if(""===t)return Buffer.allocUnsafe(0);const e=Buffer.byteLength(t),n=512*Math.ceil(1+e/512),r=Buffer.allocUnsafe(n);for(let t=0;t<512;t++)r[t]=0;new ql({path:("PaxHeader/"+x(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:e,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(r),r.write(t,512,e,"utf8");for(let t=e+512;t<r.length;t++)r[t]=0;return r}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(t){if(void 0===this[t])return"";const e=this[t],n=" "+("dev"===t||"ino"===t||"nlink"===t?"SCHILY.":"")+t+"="+(e instanceof Date?e.getTime()/1e3:e)+"\n",r=Buffer.byteLength(n);let u=Math.floor(Math.log(r)/Math.log(10))+1;r+u>=Math.pow(10,u)&&(u+=1);return u+r+n}static parse(t,e,n=!1){return new eh(nh(rh(t),e),n)}}const nh=(t,e)=>e?Object.assign({},e,t):t,rh=t=>t.replace(/\n$/,"").split("\n").reduce(uh,Object.create(null)),uh=(t,e)=>{const n=parseInt(e,10);if(n!==Buffer.byteLength(e)+1)return t;const r=(e=e.slice((n+" ").length)).split("="),u=r.shift();if(!u)return t;const o=u.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),i=r.join("=");return t[o]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(o)?new Date(1e3*Number(i)):/^[0-9]+$/.test(i)?+i:i,t},oh="win32"!==(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform)?t=>t:t=>t&&t.replace(/\\/g,"/");class ih extends cl{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(t,e,n){switch(super({}),this.pause(),this.extended=e,this.globalExtended=n,this.header=t,this.remain=t.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=t.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!t.path)throw new Error("no path provided for tar.ReadEntry");this.path=oh(t.path),this.mode=t.mode,this.mode&&(this.mode=4095&this.mode),this.uid=t.uid,this.gid=t.gid,this.uname=t.uname,this.gname=t.gname,this.size=this.remain,this.mtime=t.mtime,this.atime=t.atime,this.ctime=t.ctime,this.linkpath=t.linkpath?oh(t.linkpath):void 0,this.uname=t.uname,this.gname=t.gname,e&&this.#l(e),n&&this.#l(n,!0)}write(t){const e=t.length;if(e>this.blockRemain)throw new Error("writing more to entry than is appropriate");const n=this.remain,r=this.blockRemain;return this.remain=Math.max(0,n-e),this.blockRemain=Math.max(0,r-e),!!this.ignore||(n>=e?super.write(t):super.write(t.subarray(0,n)))}#l(t,e=!1){t.path&&(t.path=oh(t.path)),t.linkpath&&(t.linkpath=oh(t.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(t).filter(([t,n])=>!(null==n||"path"===t&&e))))}}const sh=(t,e,n,r={})=>{t.file&&(r.file=t.file),t.cwd&&(r.cwd=t.cwd),r.code=n instanceof Error&&n.code||e,r.tarCode=e,t.strict||!1===r.recoverable?n instanceof Error?t.emit("error",Object.assign(n,r)):t.emit("error",Object.assign(new Error(`${e}: ${n}`),r)):(n instanceof Error&&(r=Object.assign(n,r),n=n.message),t.emit("warn",e,n,r))},ah=Buffer.from([31,139]),ch=Symbol("state"),dh=Symbol("writeEntry"),lh=Symbol("readEntry"),hh=Symbol("nextEntry"),ph=Symbol("processEntry"),fh=Symbol("extendedHeader"),mh=Symbol("globalExtendedHeader"),vh=Symbol("meta"),Eh=Symbol("emitMeta"),Ah=Symbol("buffer"),bh=Symbol("queue"),yh=Symbol("ended"),gh=Symbol("emittedEnd"),Ch=Symbol("emit"),Fh=Symbol("unzip"),wh=Symbol("consumeChunk"),Dh=Symbol("consumeChunkSub"),Bh=Symbol("consumeBody"),Ih=Symbol("consumeMeta"),Rh=Symbol("consumeHeader"),jh=Symbol("consuming"),Sh=Symbol("bufferConcat"),_h=Symbol("maybeEnd"),Uh=Symbol("writing"),Ph=Symbol("aborted"),Oh=Symbol("onDone"),kh=Symbol("sawValidEntry"),xh=Symbol("sawNullBlock"),Th=Symbol("sawEOF"),Lh=Symbol("closeStream"),Nh=()=>!0;class qh extends e{file;strict;maxMetaEntrySize;filter;brotli;writable=!0;readable=!1;[bh]=new Bl;[Ah];[lh];[dh];[ch]="begin";[vh]="";[fh];[mh];[yh]=!1;[Fh];[Ph]=!1;[kh];[xh]=!1;[Th]=!1;[Uh]=!1;[jh]=!1;[gh]=!1;constructor(t={}){super(),this.file=t.file||"",this.on(Oh,()=>{"begin"!==this[ch]&&!1!==this[kh]||this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),t.ondone?this.on(Oh,t.ondone):this.on(Oh,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!t.strict,this.maxMetaEntrySize=t.maxMetaEntrySize||1048576,this.filter="function"==typeof t.filter?t.filter:Nh;const e=t.file&&(t.file.endsWith(".tar.br")||t.file.endsWith(".tbr"));this.brotli=t.gzip||void 0===t.brotli?!!e&&void 0:t.brotli,this.on("end",()=>this[Lh]()),"function"==typeof t.onwarn&&this.on("warn",t.onwarn),"function"==typeof t.onReadEntry&&this.on("entry",t.onReadEntry)}warn(t,e,n={}){sh(this,t,e,n)}[Rh](t,e){let n;void 0===this[kh]&&(this[kh]=!1);try{n=new ql(t,e,this[fh],this[mh])}catch(t){return this.warn("TAR_ENTRY_INVALID",t)}if(n.nullBlock)this[xh]?(this[Th]=!0,"begin"===this[ch]&&(this[ch]="header"),this[Ch]("eof")):(this[xh]=!0,this[Ch]("nullBlock"));else if(this[xh]=!1,n.cksumValid)if(n.path){const t=n.type;if(/^(Symbolic)?Link$/.test(t)&&!n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:n});else if(/^(Symbolic)?Link$/.test(t)||/^(Global)?ExtendedHeader$/.test(t)||!n.linkpath){const t=this[dh]=new ih(n,this[fh],this[mh]);if(!this[kh])if(t.remain){const e=()=>{t.invalid||(this[kh]=!0)};t.on("end",e)}else this[kh]=!0;t.meta?t.size>this.maxMetaEntrySize?(t.ignore=!0,this[Ch]("ignoredEntry",t),this[ch]="ignore",t.resume()):t.size>0&&(this[vh]="",t.on("data",t=>this[vh]+=t),this[ch]="meta"):(this[fh]=void 0,t.ignore=t.ignore||!this.filter(t.path,t),t.ignore?(this[Ch]("ignoredEntry",t),this[ch]=t.remain?"ignore":"header",t.resume()):(t.remain?this[ch]="body":(this[ch]="header",t.end()),this[lh]?this[bh].push(t):(this[bh].push(t),this[hh]())))}else this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:n})}else this.warn("TAR_ENTRY_INVALID","path is required",{header:n});else this.warn("TAR_ENTRY_INVALID","checksum failure",{header:n})}[Lh](){queueMicrotask(()=>this.emit("close"))}[ph](t){let e=!0;if(t)if(Array.isArray(t)){const[e,...n]=t;this.emit(e,...n)}else this[lh]=t,this.emit("entry",t),t.emittedEnd||(t.on("end",()=>this[hh]()),e=!1);else this[lh]=void 0,e=!1;return e}[hh](){do{}while(this[ph](this[bh].shift()));if(!this[bh].length){const t=this[lh];!t||t.flowing||t.size===t.remain?this[Uh]||this.emit("drain"):t.once("drain",()=>this.emit("drain"))}}[Bh](t,e){const n=this[dh];if(!n)throw new Error("attempt to consume body without entry??");const r=n.blockRemain??0,u=r>=t.length&&0===e?t:t.subarray(e,e+r);return n.write(u),n.blockRemain||(this[ch]="header",this[dh]=void 0,n.end()),u.length}[Ih](t,e){const n=this[dh],r=this[Bh](t,e);return!this[dh]&&n&&this[Eh](n),r}[Ch](t,e,n){this[bh].length||this[lh]?this[bh].push([t,e,n]):this.emit(t,e,n)}[Eh](t){switch(this[Ch]("meta",this[vh]),t.type){case"ExtendedHeader":case"OldExtendedHeader":this[fh]=eh.parse(this[vh],this[fh],!1);break;case"GlobalExtendedHeader":this[mh]=eh.parse(this[vh],this[mh],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{const t=this[fh]??Object.create(null);this[fh]=t,t.path=this[vh].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{const t=this[fh]||Object.create(null);this[fh]=t,t.linkpath=this[vh].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+t.type)}}abort(t){this[Ph]=!0,this.emit("abort",t),this.warn("TAR_ABORT",t,{recoverable:!1})}write(t,e,n){if("function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8")),this[Ph])return n?.(),!1;if((void 0===this[Fh]||void 0===this.brotli&&!1===this[Fh])&&t){if(this[Ah]&&(t=Buffer.concat([this[Ah],t]),this[Ah]=void 0),t.length<ah.length)return this[Ah]=t,n?.(),!0;for(let e=0;void 0===this[Fh]&&e<ah.length;e++)t[e]!==ah[e]&&(this[Fh]=!1);const e=void 0===this.brotli;if(!1===this[Fh]&&e)if(t.length<512){if(!this[yh])return this[Ah]=t,n?.(),!0;this.brotli=!0}else try{new ql(t.subarray(0,512)),this.brotli=!1}catch(t){this.brotli=!0}if(void 0===this[Fh]||!1===this[Fh]&&this.brotli){const e=this[yh];this[yh]=!1,this[Fh]=void 0===this[Fh]?new Cl({}):new Dl({}),this[Fh].on("data",t=>this[wh](t)),this[Fh].on("error",t=>this.abort(t)),this[Fh].on("end",()=>{this[yh]=!0,this[wh]()}),this[Uh]=!0;const r=!!this[Fh][e?"end":"write"](t);return this[Uh]=!1,n?.(),r}}this[Uh]=!0,this[Fh]?this[Fh].write(t):this[wh](t),this[Uh]=!1;const r=!this[bh].length&&(!this[lh]||this[lh].flowing);return r||this[bh].length||this[lh]?.once("drain",()=>this.emit("drain")),n?.(),r}[Sh](t){t&&!this[Ph]&&(this[Ah]=this[Ah]?Buffer.concat([this[Ah],t]):t)}[_h](){if(this[yh]&&!this[gh]&&!this[Ph]&&!this[jh]){this[gh]=!0;const t=this[dh];if(t&&t.blockRemain){const e=this[Ah]?this[Ah].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`,{entry:t}),this[Ah]&&t.write(this[Ah]),t.end()}this[Ch](Oh)}}[wh](t){if(this[jh]&&t)this[Sh](t);else if(t||this[Ah]){if(t){if(this[jh]=!0,this[Ah]){this[Sh](t);const e=this[Ah];this[Ah]=void 0,this[Dh](e)}else this[Dh](t);for(;this[Ah]&&this[Ah]?.length>=512&&!this[Ph]&&!this[Th];){const t=this[Ah];this[Ah]=void 0,this[Dh](t)}this[jh]=!1}}else this[_h]();this[Ah]&&!this[yh]||this[_h]()}[Dh](t){let e=0;const n=t.length;for(;e+512<=n&&!this[Ph]&&!this[Th];)switch(this[ch]){case"begin":case"header":this[Rh](t,e),e+=512;break;case"ignore":case"body":e+=this[Bh](t,e);break;case"meta":e+=this[Ih](t,e);break;default:throw new Error("invalid state: "+this[ch])}e<n&&(this[Ah]?this[Ah]=Buffer.concat([t.subarray(e),this[Ah]]):this[Ah]=t.subarray(e))}end(t,e,n){return"function"==typeof t&&(n=t,e=void 0,t=void 0),"function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,e)),n&&this.once("finish",n),this[Ph]||(this[Fh]?(t&&this[Fh].write(t),this[Fh].end()):(this[yh]=!0,void 0===this.brotli&&(t=t||Buffer.alloc(0)),t&&this.write(t),this[_h]())),this}}const Mh=t=>{let e=t.length-1,n=-1;for(;e>-1&&"/"===t.charAt(e);)n=e,e--;return-1===n?t:t.slice(0,n)},Gh=(t,e)=>{const n=new Map(e.map(t=>[Mh(t),!0])),r=t.filter,u=(t,e="")=>{const r=e||F(t).root||".";let o;if(t===r)o=!1;else{const e=n.get(t);o=void 0!==e?e:u(w(t),r)}return n.set(t,o),o};t.filter=r?(t,e)=>r(t,e)&&u(Mh(t)):t=>u(Mh(t))},zh=Fd(t=>{const e=new qh(t),n=t.file;let r;try{const u=N.statSync(n),o=t.maxReadSize||16777216;if(u.size<o)e.end(N.readFileSync(n));else{let t=0;const i=Buffer.allocUnsafe(o);for(r=N.openSync(n,"r");t<u.size;){const n=N.readSync(r,i,0,o,t);t+=n,e.write(i.subarray(0,n))}e.end()}}finally{if("number"==typeof r)try{N.closeSync(r)}catch(t){}}},(t,e)=>{const n=new qh(t),r=t.maxReadSize||16777216,u=t.file,o=new Promise((t,e)=>{n.on("error",e),n.on("end",t),N.stat(u,(t,o)=>{if(t)e(t);else{const t=new vd(u,{readSize:r,size:o.size});t.on("error",e),t.pipe(n)}})});return o},t=>new qh(t),t=>new qh(t),(t,e)=>{e?.length&&Gh(t,e),t.noResume||(t=>{const e=t.onReadEntry;t.onReadEntry=e?t=>{e(t),t.resume()}:t=>t.resume()})(t)}),$h=(t,e,n)=>(t&=4095,n&&(t=-19&t|384),e&&(256&t&&(t|=64),32&t&&(t|=8),4&t&&(t|=1)),t),{isAbsolute:Wh,parse:Jh}=T,Vh=t=>{let e="",n=Jh(t);for(;Wh(t)||n.root;){const r="/"===t.charAt(0)&&"//?/"!==t.slice(0,4)?"/":n.root;t=t.slice(r.length),e+=r,n=Jh(t)}return[e,t]},Hh=["|","<",">","?",":"],Zh=Hh.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),Yh=new Map(Hh.map((t,e)=>[t,Zh[e]])),Kh=new Map(Zh.map((t,e)=>[t,Hh[e]])),Xh=t=>Hh.reduce((t,e)=>t.split(e).join(Yh.get(e)),t),Qh=(t,e)=>e?(t=oh(t).replace(/^\.(\/|$)/,""),Mh(e)+"/"+t):oh(t),tp=Symbol("process"),ep=Symbol("file"),np=Symbol("directory"),rp=Symbol("symlink"),up=Symbol("hardlink"),op=Symbol("header"),ip=Symbol("read"),sp=Symbol("lstat"),ap=Symbol("onlstat"),cp=Symbol("onread"),dp=Symbol("onreadlink"),lp=Symbol("openfile"),hp=Symbol("onopenfile"),pp=Symbol("close"),fp=Symbol("mode"),mp=Symbol("awaitDrain"),vp=Symbol("ondrain"),Ep=Symbol("prefix");class Ap extends cl{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#h=!1;constructor(t,e={}){const n=Cd(e);super(),this.path=oh(t),this.portable=!!n.portable,this.maxReadSize=n.maxReadSize||16777216,this.linkCache=n.linkCache||new Map,this.statCache=n.statCache||new Map,this.preservePaths=!!n.preservePaths,this.cwd=oh(n.cwd||process.cwd()),this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.mtime=n.mtime,this.prefix=n.prefix?oh(n.prefix):void 0,this.onWriteEntry=n.onWriteEntry,"function"==typeof n.onwarn&&this.on("warn",n.onwarn);let r=!1;if(!this.preservePaths){const[t,e]=Vh(this.path);t&&"string"==typeof e&&(this.path=e,r=t)}var u;this.win32=!!n.win32||"win32"===process.platform,this.win32&&(this.path=(u=this.path.replace(/\\/g,"/"),Zh.reduce((t,e)=>t.split(e).join(Kh.get(e)),u)),t=t.replace(/\\/g,"/")),this.absolute=oh(n.absolute||C.resolve(this.cwd,t)),""===this.path&&(this.path="./"),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path});const o=this.statCache.get(this.absolute);o?this[ap](o):this[sp]()}warn(t,e,n={}){return sh(this,t,e,n)}emit(t,...e){return"error"===t&&(this.#h=!0),super.emit(t,...e)}[sp](){E.lstat(this.absolute,(t,e)=>{if(t)return this.emit("error",t);this[ap](e)})}[ap](t){this.statCache.set(this.absolute,t),this.stat=t,t.isFile()||(t.size=0),this.type=gp(t),this.emit("stat",t),this[tp]()}[tp](){switch(this.type){case"File":return this[ep]();case"Directory":return this[np]();case"SymbolicLink":return this[rp]();default:return this.end()}}[fp](t){return $h(t,"Directory"===this.type,this.portable)}[Ep](t){return Qh(t,this.prefix)}[op](){if(!this.stat)throw new Error("cannot write header before stat");"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new ql({path:this[Ep](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[Ep](this.linkpath):this.linkpath,mode:this[fp](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:"Unsupported"===this.type?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new eh({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[Ep](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[Ep](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());const t=this.header?.block;if(!t)throw new Error("failed to encode header");super.write(t)}[np](){if(!this.stat)throw new Error("cannot create directory entry without stat");"/"!==this.path.slice(-1)&&(this.path+="/"),this.stat.size=0,this[op](),this.end()}[rp](){E.readlink(this.absolute,(t,e)=>{if(t)return this.emit("error",t);this[dp](e)})}[dp](t){this.linkpath=oh(t),this[op](),this.end()}[up](t){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=oh(C.relative(this.cwd,t)),this.stat.size=0,this[op](),this.end()}[ep](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){const t=`${this.stat.dev}:${this.stat.ino}`,e=this.linkCache.get(t);if(0===e?.indexOf(this.cwd))return this[up](e);this.linkCache.set(t,this.absolute)}if(this[op](),0===this.stat.size)return this.end();this[lp]()}[lp](){E.open(this.absolute,"r",(t,e)=>{if(t)return this.emit("error",t);this[hp](e)})}[hp](t){if(this.fd=t,this.#h)return this[pp]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;const e=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(e),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[ip]()}[ip](){const{fd:t,buf:e,offset:n,length:r,pos:u}=this;if(void 0===t||void 0===e)throw new Error("cannot read file without first opening");E.read(t,e,n,r,u,(t,e)=>{if(t)return this[pp](()=>this.emit("error",t));this[cp](e)})}[pp](t=()=>{}){void 0!==this.fd&&E.close(this.fd,t)}[cp](t){if(t<=0&&this.remain>0){const t=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[pp](()=>this.emit("error",t))}if(t>this.remain){const t=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[pp](()=>this.emit("error",t))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(t===this.remain)for(let e=t;e<this.length&&t<this.blockRemain;e++)this.buf[e+this.offset]=0,t++,this.remain++;const e=0===this.offset&&t===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+t);this.write(e)?this[vp]():this[mp](()=>this[vp]())}[mp](t){this.once("drain",t)}write(t,e,n){if("function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8")),this.blockRemain<t.length){const t=Object.assign(new Error("writing more data than expected"),{path:this.absolute});return this.emit("error",t)}return this.remain-=t.length,this.blockRemain-=t.length,this.pos+=t.length,this.offset+=t.length,super.write(t,null,n)}[vp](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[pp](t=>t?this.emit("error",t):this.end());if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[ip]()}}class bp extends Ap{sync=!0;[sp](){this[ap](E.lstatSync(this.absolute))}[rp](){this[dp](E.readlinkSync(this.absolute))}[lp](){this[hp](E.openSync(this.absolute,"r"))}[ip](){let t=!0;try{const{fd:e,buf:n,offset:r,length:u,pos:o}=this;if(void 0===e||void 0===n)throw new Error("fd and buf must be set in READ method");const i=E.readSync(e,n,r,u,o);this[cp](i),t=!1}finally{if(t)try{this[pp](()=>{})}catch(t){}}}[mp](t){t()}[pp](t=()=>{}){void 0!==this.fd&&E.closeSync(this.fd),t()}}class yp extends cl{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(t,e,n={}){return sh(this,t,e,n)}constructor(t,e={}){const n=Cd(e);super(),this.preservePaths=!!n.preservePaths,this.portable=!!n.portable,this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.onWriteEntry=n.onWriteEntry,this.readEntry=t;const{type:r}=t;if("Unsupported"===r)throw new Error("writing entry that should be ignored");this.type=r,"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.prefix=n.prefix,this.path=oh(t.path),this.mode=void 0!==t.mode?this[fp](t.mode):void 0,this.uid=this.portable?void 0:t.uid,this.gid=this.portable?void 0:t.gid,this.uname=this.portable?void 0:t.uname,this.gname=this.portable?void 0:t.gname,this.size=t.size,this.mtime=this.noMtime?void 0:n.mtime||t.mtime,this.atime=this.portable?void 0:t.atime,this.ctime=this.portable?void 0:t.ctime,this.linkpath=void 0!==t.linkpath?oh(t.linkpath):void 0,"function"==typeof n.onwarn&&this.on("warn",n.onwarn);let u=!1;if(!this.preservePaths){const[t,e]=Vh(this.path);t&&"string"==typeof e&&(this.path=e,u=t)}this.remain=t.size,this.blockRemain=t.startBlockSize,this.onWriteEntry?.(this),this.header=new ql({path:this[Ep](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[Ep](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),u&&this.warn("TAR_ENTRY_INFO",`stripping ${u} from absolute path`,{entry:this,path:u+this.path}),this.header.encode()&&!this.noPax&&super.write(new eh({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[Ep](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[Ep](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());const o=this.header?.block;if(!o)throw new Error("failed to encode header");super.write(o),t.pipe(this)}[Ep](t){return Qh(t,this.prefix)}[fp](t){return $h(t,"Directory"===this.type,this.portable)}write(t,e,n){"function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8"));const r=t.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(t,n)}end(t,e,n){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),"function"==typeof t&&(n=t,e=void 0,t=void 0),"function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,e??"utf8")),n&&this.once("finish",n),t?super.end(t,n):super.end(n),this}}const gp=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";class Cp{path;absolute;entry;stat;readdir;pending=!1;ignore=!1;piped=!1;constructor(t,e){this.path=t||"./",this.absolute=e}}const Fp=Buffer.alloc(1024),wp=Symbol("onStat"),Dp=Symbol("ended"),Bp=Symbol("queue"),Ip=Symbol("current"),Rp=Symbol("process"),jp=Symbol("processing"),Sp=Symbol("processJob"),_p=Symbol("jobs"),Up=Symbol("jobDone"),Pp=Symbol("addFSEntry"),Op=Symbol("addTarEntry"),kp=Symbol("stat"),xp=Symbol("readdir"),Tp=Symbol("onreaddir"),Lp=Symbol("pipe"),Np=Symbol("entry"),qp=Symbol("entryOpt"),Mp=Symbol("writeEntryClass"),Gp=Symbol("write"),zp=Symbol("ondrain");class $p extends cl{opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[Mp];onWriteEntry;[Bp];[_p]=0;[jp]=!1;[Dp]=!1;constructor(t={}){if(super(),this.opt=t,this.file=t.file||"",this.cwd=t.cwd||process.cwd(),this.maxReadSize=t.maxReadSize,this.preservePaths=!!t.preservePaths,this.strict=!!t.strict,this.noPax=!!t.noPax,this.prefix=oh(t.prefix||""),this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.readdirCache=t.readdirCache||new Map,this.onWriteEntry=t.onWriteEntry,this[Mp]=Ap,"function"==typeof t.onwarn&&this.on("warn",t.onwarn),this.portable=!!t.portable,t.gzip||t.brotli){if(t.gzip&&t.brotli)throw new TypeError("gzip and brotli are mutually exclusive");if(t.gzip&&("object"!=typeof t.gzip&&(t.gzip={}),this.portable&&(t.gzip.portable=!0),this.zip=new gl(t.gzip)),t.brotli&&("object"!=typeof t.brotli&&(t.brotli={}),this.zip=new wl(t.brotli)),!this.zip)throw new Error("impossible");const e=this.zip;e.on("data",t=>super.write(t)),e.on("end",()=>super.end()),e.on("drain",()=>this[zp]()),this.on("resume",()=>e.resume())}else this.on("drain",this[zp]);this.noDirRecurse=!!t.noDirRecurse,this.follow=!!t.follow,this.noMtime=!!t.noMtime,t.mtime&&(this.mtime=t.mtime),this.filter="function"==typeof t.filter?t.filter:()=>!0,this[Bp]=new Bl,this[_p]=0,this.jobs=Number(t.jobs)||4,this[jp]=!1,this[Dp]=!1}[Gp](t){return super.write(t)}add(t){return this.write(t),this}end(t,e,n){return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e=void 0),t&&this.add(t),this[Dp]=!0,this[Rp](),n&&n(),this}write(t){if(this[Dp])throw new Error("write after end");return t instanceof ih?this[Op](t):this[Pp](t),this.flowing}[Op](t){const e=oh(C.resolve(this.cwd,t.path));if(this.filter(t.path,t)){const n=new Cp(t.path,e);n.entry=new yp(t,this[qp](n)),n.entry.on("end",()=>this[Up](n)),this[_p]+=1,this[Bp].push(n)}else t.resume();this[Rp]()}[Pp](t){const e=oh(C.resolve(this.cwd,t));this[Bp].push(new Cp(t,e)),this[Rp]()}[kp](t){t.pending=!0,this[_p]+=1;const e=this.follow?"stat":"lstat";E[e](t.absolute,(e,n)=>{t.pending=!1,this[_p]-=1,e?this.emit("error",e):this[wp](t,n)})}[wp](t,e){this.statCache.set(t.absolute,e),t.stat=e,this.filter(t.path,e)||(t.ignore=!0),this[Rp]()}[xp](t){t.pending=!0,this[_p]+=1,E.readdir(t.absolute,(e,n)=>{if(t.pending=!1,this[_p]-=1,e)return this.emit("error",e);this[Tp](t,n)})}[Tp](t,e){this.readdirCache.set(t.absolute,e),t.readdir=e,this[Rp]()}[Rp](){if(!this[jp]){this[jp]=!0;for(let t=this[Bp].head;t&&this[_p]<this.jobs;t=t.next)if(this[Sp](t.value),t.value.ignore){const e=t.next;this[Bp].removeNode(t),t.next=e}this[jp]=!1,this[Dp]&&!this[Bp].length&&0===this[_p]&&(this.zip?this.zip.end(Fp):(super.write(Fp),super.end()))}}get[Ip](){return this[Bp]&&this[Bp].head&&this[Bp].head.value}[Up](t){this[Bp].shift(),this[_p]-=1,this[Rp]()}[Sp](t){if(!t.pending)if(t.entry)t!==this[Ip]||t.piped||this[Lp](t);else{if(!t.stat){const e=this.statCache.get(t.absolute);e?this[wp](t,e):this[kp](t)}if(t.stat&&!t.ignore){if(!this.noDirRecurse&&t.stat.isDirectory()&&!t.readdir){const e=this.readdirCache.get(t.absolute);if(e?this[Tp](t,e):this[xp](t),!t.readdir)return}t.entry=this[Np](t),t.entry?t!==this[Ip]||t.piped||this[Lp](t):t.ignore=!0}}}[qp](t){return{onwarn:(t,e,n)=>this.warn(t,e,n),noPax:this.noPax,cwd:this.cwd,absolute:t.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[Np](t){this[_p]+=1;try{return new this[Mp](t.path,this[qp](t)).on("end",()=>this[Up](t)).on("error",t=>this.emit("error",t))}catch(t){this.emit("error",t)}}[zp](){this[Ip]&&this[Ip].entry&&this[Ip].entry.resume()}[Lp](t){t.piped=!0,t.readdir&&t.readdir.forEach(e=>{const n=t.path,r="./"===n?"":n.replace(/\/*$/,"/");this[Pp](r+e)});const e=t.entry,n=this.zip;if(!e)throw new Error("cannot pipe without source");n?e.on("data",t=>{n.write(t)||e.pause()}):e.on("data",t=>{super.write(t)||e.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(t,e,n={}){sh(this,t,e,n)}}class Wp extends $p{sync=!0;constructor(t){super(t),this[Mp]=bp}pause(){}resume(){}[kp](t){const e=this.follow?"statSync":"lstatSync";this[wp](t,E[e](t.absolute))}[xp](t){this[Tp](t,E.readdirSync(t.absolute))}[Lp](t){const e=t.entry,n=this.zip;if(t.readdir&&t.readdir.forEach(e=>{const n=t.path,r="./"===n?"":n.replace(/\/*$/,"/");this[Pp](r+e)}),!e)throw new Error("Cannot pipe without source");n?e.on("data",t=>{n.write(t)}):e.on("data",t=>{super[Gp](t)})}}const Jp=(t,e)=>{e.forEach(e=>{"@"===e.charAt(0)?zh({file:O.resolve(t.cwd,e.slice(1)),sync:!0,noResume:!0,onReadEntry:e=>t.add(e)}):t.add(e)}),t.end()},Vp=async(t,e)=>{for(let n=0;n<e.length;n++){const r=String(e[n]);"@"===r.charAt(0)?await zh({file:O.resolve(String(t.cwd),r.slice(1)),noResume:!0,onReadEntry:e=>{t.add(e)}}):t.add(r)}t.end()},Hp=Fd((t,e)=>{const n=new Wp(t),r=new bd(t.file,{mode:t.mode||438});n.pipe(r),Jp(n,e)},(t,e)=>{const n=new $p(t),r=new Ad(t.file,{mode:t.mode||438});n.pipe(r);const u=new Promise((t,e)=>{r.on("error",e),r.on("close",t),n.on("error",e)});return Vp(n,e),u},(t,e)=>{const n=new Wp(t);return Jp(n,e),n},(t,e)=>{const n=new $p(t);return Vp(n,e),n},(t,e)=>{if(!e?.length)throw new TypeError("no paths specified to add to archive")}),Zp="win32"===(process.env.__FAKE_PLATFORM__||process.platform),{O_CREAT:Yp,O_TRUNC:Kp,O_WRONLY:Xp}=E.constants,Qp=Number(process.env.__FAKE_FS_O_FILENAME__)||E.constants.UV_FS_O_FILEMAP||0,tf=Qp|Kp|Yp|Xp,ef=Zp&&!!Qp?t=>t<524288?tf:"w":()=>"w",nf=(t,e,n)=>{try{return N.lchownSync(t,e,n)}catch(t){if("ENOENT"!==t?.code)throw t}},rf=(t,e,n,r)=>{N.lchown(t,e,n,t=>{r(t&&"ENOENT"!==t?.code?t:null)})},uf=(t,e,n,r,u)=>{if(e.isDirectory())of(O.resolve(t,e.name),n,r,o=>{if(o)return u(o);const i=O.resolve(t,e.name);rf(i,n,r,u)});else{const o=O.resolve(t,e.name);rf(o,n,r,u)}},of=(t,e,n,r)=>{N.readdir(t,{withFileTypes:!0},(u,o)=>{if(u){if("ENOENT"===u.code)return r();if("ENOTDIR"!==u.code&&"ENOTSUP"!==u.code)return r(u)}if(u||!o.length)return rf(t,e,n,r);let i=o.length,s=null;const a=u=>{if(!s)return u?r(s=u):0===--i?rf(t,e,n,r):void 0};for(const r of o)uf(t,r,e,n,a)})},sf=(t,e,n,r)=>{e.isDirectory()&&af(O.resolve(t,e.name),n,r),nf(O.resolve(t,e.name),n,r)},af=(t,e,n)=>{let r;try{r=N.readdirSync(t,{withFileTypes:!0})}catch(r){const u=r;if("ENOENT"===u?.code)return;if("ENOTDIR"===u?.code||"ENOTSUP"===u?.code)return nf(t,e,n);throw u}for(const u of r)sf(t,u,e,n);return nf(t,e,n)},cf=t=>{if(t)if("object"==typeof t)t={mode:511,...t};else if("number"==typeof t)t={mode:t};else{if("string"!=typeof t)throw new TypeError("invalid options argument");t={mode:parseInt(t,8)}}else t={mode:511};const e=t,n=t.fs||{};return t.mkdir=t.mkdir||n.mkdir||A,t.mkdirAsync=t.mkdirAsync?t.mkdirAsync:async(t,n)=>new Promise((r,u)=>e.mkdir(t,n,(t,e)=>t?u(t):r(e))),t.stat=t.stat||n.stat||b,t.statAsync=t.statAsync?t.statAsync:async t=>new Promise((n,r)=>e.stat(t,(t,e)=>t?r(t):n(e))),t.statSync=t.statSync||n.statSync||y,t.mkdirSync=t.mkdirSync||n.mkdirSync||g,e},df=(t,e,n)=>{const r=w(t),u={...cf(e),recursive:!1};if(r===t)try{return u.mkdirSync(t,u)}catch(t){if(t&&"EISDIR"!==t.code)throw t;return}try{return u.mkdirSync(t,u),n||t}catch(e){const o=e;if(o&&"ENOENT"===o.code)return df(t,u,df(r,u,n));if(o&&"EEXIST"!==o.code&&o&&"EROFS"!==o.code)throw e;try{if(!u.statSync(t).isDirectory())throw e}catch(t){throw e}}},lf=Object.assign(async(t,e,n)=>{const r=cf(e);r.recursive=!1;const u=w(t);return u===t?r.mkdirAsync(t,r).catch(t=>{if(t&&"EISDIR"!==t.code)throw t}):r.mkdirAsync(t,r).then(()=>n||t,async e=>{const o=e;if(o&&"ENOENT"===o.code)return lf(u,r).then(e=>lf(t,r,e));if(o&&"EEXIST"!==o.code&&"EROFS"!==o.code)throw e;return r.statAsync(t).then(t=>{if(t.isDirectory())return n;throw e},()=>{throw e})})},{sync:df}),hf=async(t,e,n)=>{if(n!==e)return t.statAsync(e).then(t=>t.isDirectory()?n:void 0,n=>n&&"ENOENT"===n.code?hf(t,w(e),e):void 0)},pf=(t,e,n)=>{if(n!==e)try{return t.statSync(e).isDirectory()?n:void 0}catch(n){return n&&"ENOENT"===n.code?pf(t,w(e),e):void 0}},ff=(t,e)=>{const n=cf(e);n.recursive=!0;if(w(t)===t)return n.mkdirSync(t,n);const r=pf(n,t);try{return n.mkdirSync(t,n),r}catch(e){if(e&&"ENOENT"===e.code)return df(t,n);throw e}},mf=Object.assign(async(t,e)=>{const n={...cf(e),recursive:!0};return w(t)===t?await n.mkdirAsync(t,n):hf(n,t).then(e=>n.mkdirAsync(t,n).then(t=>e||t).catch(e=>{if(e&&"ENOENT"===e.code)return lf(t,n);throw e}))},{sync:ff}),vf=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,Ef=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=D(t),"win32"===vf){const e=/[*|"<>?:]/,{root:n}=F(t);if(e.test(t.substring(n.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t},Af=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),bf=+Af[0]>10||10===+Af[0]&&+Af[1]>=12,yf=bf?t=>cf(t).mkdirSync===g:()=>!1,gf=Object.assign(bf?t=>cf(t).mkdir===A:()=>!1,{sync:yf}),Cf=(t,e)=>{t=Ef(t);const n=cf(e);return yf(n)?ff(t,n):df(t,n)},Ff=Object.assign(async(t,e)=>{t=Ef(t);const n=cf(e);return gf(n)?mf(t,n):lf(t,n)},{mkdirpSync:Cf,mkdirpNative:mf,mkdirpNativeSync:ff,mkdirpManual:lf,mkdirpManualSync:df,sync:Cf,native:mf,nativeSync:ff,manual:lf,manualSync:df,useNative:gf,useNativeSync:yf});class wf extends Error{path;code;syscall="chdir";constructor(t,e){super(`${e}: Cannot cd into '${t}'`),this.path=t,this.code=e}get name(){return"CwdError"}}class Df extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(t,e){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=t,this.path=e}get name(){return"SymlinkError"}}const Bf=(t,e)=>t.get(oh(e)),If=(t,e,n)=>t.set(oh(e),n),Rf=(t,e,n)=>{t=oh(t);const r=e.umask??18,u=448|e.mode,o=0!==(u&r),i=e.uid,s=e.gid,a="number"==typeof i&&"number"==typeof s&&(i!==e.processUid||s!==e.processGid),c=e.preserve,d=e.unlink,l=e.cache,h=oh(e.cwd),p=(e,r)=>{e?n(e):(If(l,t,!0),r&&a?of(r,i,s,t=>p(t)):o?E.chmod(t,u,n):n())};if(l&&!0===Bf(l,t))return p();if(t===h)return((t,e)=>{E.stat(t,(n,r)=>{!n&&r.isDirectory()||(n=new wf(t,n?.code||"ENOTDIR")),e(n)})})(t,p);if(c)return Ff(t,{mode:u}).then(t=>p(null,t??void 0),p);const f=oh(O.relative(h,t)).split("/");jf(h,f,u,l,d,h,void 0,p)},jf=(t,e,n,r,u,o,i,s)=>{if(!e.length)return s(null,i);const a=e.shift(),c=oh(O.resolve(t+"/"+a));if(Bf(r,c))return jf(c,e,n,r,u,o,i,s);E.mkdir(c,n,Sf(c,e,n,r,u,o,i,s))},Sf=(t,e,n,r,u,o,i,s)=>a=>{a?E.lstat(t,(c,d)=>{if(c)c.path=c.path&&oh(c.path),s(c);else if(d.isDirectory())jf(t,e,n,r,u,o,i,s);else if(u)E.unlink(t,a=>{if(a)return s(a);E.mkdir(t,n,Sf(t,e,n,r,u,o,i,s))});else{if(d.isSymbolicLink())return s(new Df(t,t+"/"+e.join("/")));s(a)}}):jf(t,e,n,r,u,o,i=i||t,s)},_f=(t,e)=>{t=oh(t);const n=e.umask??18,r=448|e.mode,u=0!==(r&n),o=e.uid,i=e.gid,s="number"==typeof o&&"number"==typeof i&&(o!==e.processUid||i!==e.processGid),a=e.preserve,c=e.unlink,d=e.cache,l=oh(e.cwd),h=e=>{If(d,t,!0),e&&s&&af(e,o,i),u&&E.chmodSync(t,r)};if(d&&!0===Bf(d,t))return h();if(t===l)return(t=>{let e,n=!1;try{n=E.statSync(t).isDirectory()}catch(t){e=t?.code}finally{if(!n)throw new wf(t,e??"ENOTDIR")}})(l),h();if(a)return h(Cf(t,r)??void 0);const p=oh(O.relative(l,t)).split("/");let f;for(let t=p.shift(),e=l;t&&(e+="/"+t);t=p.shift())if(e=oh(O.resolve(e)),!Bf(d,e))try{E.mkdirSync(e,r),f=f||e,If(d,e,!0)}catch(t){const n=E.lstatSync(e);if(n.isDirectory()){If(d,e,!0);continue}if(c){E.unlinkSync(e),E.mkdirSync(e,r),f=f||e,If(d,e,!0);continue}if(n.isSymbolicLink())return new Df(e,e+"/"+p.join("/"))}return h(f)},Uf=Object.create(null),{hasOwnProperty:Pf}=Object.prototype,Of=t=>(Pf.call(Uf,t)||(Uf[t]=t.normalize("NFD")),Uf[t]),kf="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform);class xf{#p=new Map;#f=new Map;#m=new Set;reserve(t,e){t=kf?["win32 parallelization disabled"]:t.map(t=>Mh(L(Of(t))).toLowerCase());const n=new Set(t.map(t=>(t=>{const e=t.split("/").slice(0,-1).reduce((t,e)=>{const n=t[t.length-1];return void 0!==n&&(e=L(n,e)),t.push(e||"/"),t},[]);return e})(t)).reduce((t,e)=>t.concat(e)));this.#f.set(e,{dirs:n,paths:t});for(const n of t){const t=this.#p.get(n);t?t.push(e):this.#p.set(n,[e])}for(const t of n){const n=this.#p.get(t);if(n){const t=n[n.length-1];t instanceof Set?t.add(e):n.push(new Set([e]))}else this.#p.set(t,[new Set([e])])}return this.#v(e)}#E(t){const e=this.#f.get(t);if(!e)throw new Error("function does not have any path reservations");return{paths:e.paths.map(t=>this.#p.get(t)),dirs:[...e.dirs].map(t=>this.#p.get(t))}}check(t){const{paths:e,dirs:n}=this.#E(t);return e.every(e=>e&&e[0]===t)&&n.every(e=>e&&e[0]instanceof Set&&e[0].has(t))}#v(t){return!(this.#m.has(t)||!this.check(t))&&(this.#m.add(t),t(()=>this.#A(t)),!0)}#A(t){if(!this.#m.has(t))return!1;const e=this.#f.get(t);if(!e)throw new Error("invalid reservation");const{paths:n,dirs:r}=e,u=new Set;for(const e of n){const n=this.#p.get(e);if(!n||n?.[0]!==t)continue;const r=n[1];if(r)if(n.shift(),"function"==typeof r)u.add(r);else for(const t of r)u.add(t);else this.#p.delete(e)}for(const e of r){const n=this.#p.get(e),r=n?.[0];if(n&&r instanceof Set)if(1!==r.size||1!==n.length)if(1===r.size){n.shift();const t=n[0];"function"==typeof t&&u.add(t)}else r.delete(t);else this.#p.delete(e)}return this.#m.delete(t),u.forEach(t=>this.#v(t)),!0}}const Tf=Symbol("onEntry"),Lf=Symbol("checkFs"),Nf=Symbol("checkFs2"),qf=Symbol("pruneCache"),Mf=Symbol("isReusable"),Gf=Symbol("makeFs"),zf=Symbol("file"),$f=Symbol("directory"),Wf=Symbol("link"),Jf=Symbol("symlink"),Vf=Symbol("hardlink"),Hf=Symbol("unsupported"),Zf=Symbol("checkPath"),Yf=Symbol("mkdir"),Kf=Symbol("onError"),Xf=Symbol("pending"),Qf=Symbol("pend"),tm=Symbol("unpend"),em=Symbol("ended"),nm=Symbol("maybeClose"),rm=Symbol("skip"),um=Symbol("doChown"),om=Symbol("uid"),im=Symbol("gid"),sm=Symbol("checkedCwd"),am="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform),cm=(t,e,n)=>void 0!==t&&t===t>>>0?t:void 0!==e&&e===e>>>0?e:n,dm=t=>Mh(oh(Of(t))).toLowerCase();class lm extends qh{[em]=!1;[sm]=!1;[Xf]=0;reservations=new xf;transform;writable=!0;readable=!1;dirCache;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(t={}){if(t.ondone=()=>{this[em]=!0,this[nm]()},super(t),this.transform=t.transform,this.dirCache=t.dirCache||new Map,this.chmod=!!t.chmod,"number"==typeof t.uid||"number"==typeof t.gid){if("number"!=typeof t.uid||"number"!=typeof t.gid)throw new TypeError("cannot set owner without number uid and gid");if(t.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=t.uid,this.gid=t.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;void 0===t.preserveOwner&&"number"!=typeof t.uid?this.preserveOwner=!(!process.getuid||0!==process.getuid()):this.preserveOwner=!!t.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth="number"==typeof t.maxDepth?t.maxDepth:1024,this.forceChown=!0===t.forceChown,this.win32=!!t.win32||am,this.newer=!!t.newer,this.keep=!!t.keep,this.noMtime=!!t.noMtime,this.preservePaths=!!t.preservePaths,this.unlink=!!t.unlink,this.cwd=oh(O.resolve(t.cwd||process.cwd())),this.strip=Number(t.strip)||0,this.processUmask=this.chmod?"number"==typeof t.processUmask?t.processUmask:process.umask():0,this.umask="number"==typeof t.umask?t.umask:this.processUmask,this.dmode=t.dmode||511&~this.umask,this.fmode=t.fmode||438&~this.umask,this.on("entry",t=>this[Tf](t))}warn(t,e,n={}){return"TAR_BAD_ARCHIVE"!==t&&"TAR_ABORT"!==t||(n.recoverable=!1),super.warn(t,e,n)}[nm](){this[em]&&0===this[Xf]&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[Zf](t){const e=oh(t.path),n=e.split("/");if(this.strip){if(n.length<this.strip)return!1;if("Link"===t.type){const e=oh(String(t.linkpath)).split("/");if(!(e.length>=this.strip))return!1;t.linkpath=e.slice(this.strip).join("/")}n.splice(0,this.strip),t.path=n.join("/")}if(isFinite(this.maxDepth)&&n.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:t,path:e,depth:n.length,maxDepth:this.maxDepth}),!1;if(!this.preservePaths){if(n.includes("..")||am&&/^[a-z]:\.\.$/i.test(n[0]??""))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:t,path:e}),!1;const[r,u]=Vh(e);r&&(t.path=String(u),this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:t,path:e}))}if(O.isAbsolute(t.path)?t.absolute=oh(O.resolve(t.path)):t.absolute=oh(O.resolve(this.cwd,t.path)),!this.preservePaths&&"string"==typeof t.absolute&&0!==t.absolute.indexOf(this.cwd+"/")&&t.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:t,path:oh(t.path),resolvedPath:t.absolute,cwd:this.cwd}),!1;if(t.absolute===this.cwd&&"Directory"!==t.type&&"GNUDumpDir"!==t.type)return!1;if(this.win32){const{root:e}=O.win32.parse(String(t.absolute));t.absolute=e+Xh(String(t.absolute).slice(e.length));const{root:n}=O.win32.parse(t.path);t.path=n+Xh(t.path.slice(n.length))}return!0}[Tf](t){if(!this[Zf](t))return t.resume();switch(M.equal(typeof t.absolute,"string"),t.type){case"Directory":case"GNUDumpDir":t.mode&&(t.mode=448|t.mode);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Lf](t);default:return this[Hf](t)}}[Kf](t,e){"CwdError"===t.name?this.emit("error",t):(this.warn("TAR_ENTRY_ERROR",t,{entry:e}),this[tm](),e.resume())}[Yf](t,e,n){Rf(oh(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:e},n)}[um](t){return this.forceChown||this.preserveOwner&&("number"==typeof t.uid&&t.uid!==this.processUid||"number"==typeof t.gid&&t.gid!==this.processGid)||"number"==typeof this.uid&&this.uid!==this.processUid||"number"==typeof this.gid&&this.gid!==this.processGid}[om](t){return cm(this.uid,t.uid,this.processUid)}[im](t){return cm(this.gid,t.gid,this.processGid)}[zf](t,e){const n="number"==typeof t.mode?4095&t.mode:this.fmode,r=new Ad(String(t.absolute),{flags:ef(t.size),mode:n,autoClose:!1});r.on("error",n=>{r.fd&&N.close(r.fd,()=>{}),r.write=()=>!0,this[Kf](n,t),e()});let u=1;const o=n=>{if(n)return r.fd&&N.close(r.fd,()=>{}),this[Kf](n,t),void e();0===--u&&void 0!==r.fd&&N.close(r.fd,n=>{n?this[Kf](n,t):this[tm](),e()})};r.on("finish",()=>{const e=String(t.absolute),n=r.fd;if("number"==typeof n&&t.mtime&&!this.noMtime){u++;const r=t.atime||new Date,i=t.mtime;N.futimes(n,r,i,t=>t?N.utimes(e,r,i,e=>o(e&&t)):o())}if("number"==typeof n&&this[um](t)){u++;const r=this[om](t),i=this[im](t);"number"==typeof r&&"number"==typeof i&&N.fchown(n,r,i,t=>t?N.chown(e,r,i,e=>o(e&&t)):o())}o()});const i=this.transform&&this.transform(t)||t;i!==t&&(i.on("error",n=>{this[Kf](n,t),e()}),t.pipe(i)),i.pipe(r)}[$f](t,e){const n="number"==typeof t.mode?4095&t.mode:this.dmode;this[Yf](String(t.absolute),n,n=>{if(n)return this[Kf](n,t),void e();let r=1;const u=()=>{0===--r&&(e(),this[tm](),t.resume())};t.mtime&&!this.noMtime&&(r++,N.utimes(String(t.absolute),t.atime||new Date,t.mtime,u)),this[um](t)&&(r++,N.chown(String(t.absolute),Number(this[om](t)),Number(this[im](t)),u)),u()})}[Hf](t){t.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${t.type}`,{entry:t}),t.resume()}[Jf](t,e){this[Wf](t,String(t.linkpath),"symlink",e)}[Vf](t,e){const n=oh(O.resolve(this.cwd,String(t.linkpath)));this[Wf](t,n,"link",e)}[Qf](){this[Xf]++}[tm](){this[Xf]--,this[nm]()}[rm](t){this[tm](),t.resume()}[Mf](t,e){return"File"===t.type&&!this.unlink&&e.isFile()&&e.nlink<=1&&!am}[Lf](t){this[Qf]();const e=[t.path];t.linkpath&&e.push(t.linkpath),this.reservations.reserve(e,e=>this[Nf](t,e))}[qf](t){"SymbolicLink"===t.type?(t=>{for(const e of t.keys())t.delete(e)})(this.dirCache):"Directory"!==t.type&&((t,e)=>{e=dm(e);for(const n of t.keys()){const r=dm(n);r!==e&&0!==r.indexOf(e+"/")||t.delete(n)}})(this.dirCache,String(t.absolute))}[Nf](t,e){this[qf](t);const n=n=>{this[qf](t),e(n)},r=()=>{this[Yf](this.cwd,this.dmode,e=>{if(e)return this[Kf](e,t),void n();this[sm]=!0,u()})},u=()=>{if(t.absolute!==this.cwd){const e=oh(O.dirname(String(t.absolute)));if(e!==this.cwd)return this[Yf](e,this.dmode,e=>{if(e)return this[Kf](e,t),void n();o()})}o()},o=()=>{N.lstat(String(t.absolute),(e,r)=>{if(r&&(this.keep||this.newer&&r.mtime>(t.mtime??r.mtime)))return this[rm](t),void n();if(e||this[Mf](t,r))return this[Gf](null,t,n);if(r.isDirectory()){if("Directory"===t.type){const e=e=>this[Gf](e??null,t,n);return this.chmod&&t.mode&&(4095&r.mode)!==t.mode?N.chmod(String(t.absolute),Number(t.mode),e):e()}if(t.absolute!==this.cwd)return N.rmdir(String(t.absolute),e=>this[Gf](e??null,t,n))}if(t.absolute===this.cwd)return this[Gf](null,t,n);((t,e)=>{if(!am)return N.unlink(t,e);const n=t+".DELETE."+G(16).toString("hex");N.rename(t,n,t=>{if(t)return e(t);N.unlink(n,e)})})(String(t.absolute),e=>this[Gf](e??null,t,n))})};this[sm]?u():r()}[Gf](t,e,n){if(t)return this[Kf](t,e),void n();switch(e.type){case"File":case"OldFile":case"ContiguousFile":return this[zf](e,n);case"Link":return this[Vf](e,n);case"SymbolicLink":return this[Jf](e,n);case"Directory":case"GNUDumpDir":return this[$f](e,n)}}[Wf](t,e,n,r){N[n](e,String(t.absolute),e=>{e?this[Kf](e,t):(this[tm](),t.resume()),r()})}}const hm=t=>{try{return[null,t()]}catch(t){return[t,null]}};class pm extends lm{sync=!0;[Gf](t,e){return super[Gf](t,e,()=>{})}[Lf](t){if(this[qf](t),!this[sm]){const e=this[Yf](this.cwd,this.dmode);if(e)return this[Kf](e,t);this[sm]=!0}if(t.absolute!==this.cwd){const e=oh(O.dirname(String(t.absolute)));if(e!==this.cwd){const n=this[Yf](e,this.dmode);if(n)return this[Kf](n,t)}}const[e,n]=hm(()=>N.lstatSync(String(t.absolute)));if(n&&(this.keep||this.newer&&n.mtime>(t.mtime??n.mtime)))return this[rm](t);if(e||this[Mf](t,n))return this[Gf](null,t);if(n.isDirectory()){if("Directory"===t.type){const e=this.chmod&&t.mode&&(4095&n.mode)!==t.mode,[r]=e?hm(()=>{N.chmodSync(String(t.absolute),Number(t.mode))}):[];return this[Gf](r,t)}const[e]=hm(()=>N.rmdirSync(String(t.absolute)));this[Gf](e,t)}const[r]=t.absolute===this.cwd?[]:hm(()=>(t=>{if(!am)return N.unlinkSync(t);const e=t+".DELETE."+G(16).toString("hex");N.renameSync(t,e),N.unlinkSync(e)})(String(t.absolute)));this[Gf](r,t)}[zf](t,e){const n="number"==typeof t.mode?4095&t.mode:this.fmode,r=n=>{let r;try{N.closeSync(u)}catch(t){r=t}(n||r)&&this[Kf](n||r,t),e()};let u;try{u=N.openSync(String(t.absolute),ef(t.size),n)}catch(t){return r(t)}const o=this.transform&&this.transform(t)||t;o!==t&&(o.on("error",e=>this[Kf](e,t)),t.pipe(o)),o.on("data",t=>{try{N.writeSync(u,t,0,t.length)}catch(t){r(t)}}),o.on("end",()=>{let e=null;if(t.mtime&&!this.noMtime){const n=t.atime||new Date,r=t.mtime;try{N.futimesSync(u,n,r)}catch(u){try{N.utimesSync(String(t.absolute),n,r)}catch(t){e=u}}}if(this[um](t)){const n=this[om](t),r=this[im](t);try{N.fchownSync(u,Number(n),Number(r))}catch(u){try{N.chownSync(String(t.absolute),Number(n),Number(r))}catch(t){e=e||u}}}r(e)})}[$f](t,e){const n="number"==typeof t.mode?4095&t.mode:this.dmode,r=this[Yf](String(t.absolute),n);if(r)return this[Kf](r,t),void e();if(t.mtime&&!this.noMtime)try{N.utimesSync(String(t.absolute),t.atime||new Date,t.mtime)}catch(r){}if(this[um](t))try{N.chownSync(String(t.absolute),Number(this[om](t)),Number(this[im](t)))}catch(r){}e(),t.resume()}[Yf](t,e){try{return _f(oh(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:e})}catch(t){return t}}[Wf](t,e,n,r){const u=`${n}Sync`;try{N[u](e,String(t.absolute)),r(),t.resume()}catch(e){return this[Kf](e,t)}}}const fm=Fd(t=>{const e=new pm(t),n=t.file,r=N.statSync(n),u=t.maxReadSize||16777216;new Ed(n,{readSize:u,size:r.size}).pipe(e)},(t,e)=>{const n=new lm(t),r=t.maxReadSize||16777216,u=t.file,o=new Promise((t,e)=>{n.on("error",e),n.on("close",t),N.stat(u,(t,o)=>{if(t)e(t);else{const t=new vd(u,{readSize:r,size:o.size});t.on("error",e),t.pipe(n)}})});return o},t=>new pm(t),t=>new lm(t),(t,e)=>{e?.length&&Gh(t,e)}),mm=(t,e,n,r,u)=>{const o=new bd(t.file,{fd:r,start:n});e.pipe(o),vm(e,u)},vm=(t,e)=>{e.forEach(e=>{"@"===e.charAt(0)?zh({file:O.resolve(t.cwd,e.slice(1)),sync:!0,noResume:!0,onReadEntry:e=>t.add(e)}):t.add(e)}),t.end()},Em=async(t,e)=>{for(let n=0;n<e.length;n++){const r=String(e[n]);"@"===r.charAt(0)?await zh({file:O.resolve(String(t.cwd),r.slice(1)),noResume:!0,onReadEntry:e=>t.add(e)}):t.add(r)}t.end()},Am=Fd((t,e)=>{const n=new Wp(t);let r,u,o=!0;try{try{r=N.openSync(t.file,"r+")}catch(e){if("ENOENT"!==e?.code)throw e;r=N.openSync(t.file,"w+")}const i=N.fstatSync(r),s=Buffer.alloc(512);t:for(u=0;u<i.size;u+=512){for(let t=0,e=0;t<512;t+=e){if(e=N.readSync(r,s,t,s.length-t,u+t),0===u&&31===s[0]&&139===s[1])throw new Error("cannot append to compressed archives");if(!e)break t}const e=new ql(s);if(!e.cksumValid)break;const n=512*Math.ceil((e.size||0)/512);if(u+n+512>i.size)break;u+=n,t.mtimeCache&&e.mtime&&t.mtimeCache.set(String(e.path),e.mtime)}o=!1,mm(t,n,u,r,e)}finally{if(o)try{N.closeSync(r)}catch(t){}}},(t,e)=>{e=Array.from(e);const n=new $p(t),r=new Promise((r,u)=>{n.on("error",u);let o="r+";const i=(s,a)=>s&&"ENOENT"===s.code&&"r+"===o?(o="w+",N.open(t.file,o,i)):s||!a?u(s):void N.fstat(a,(o,i)=>{if(o)return N.close(a,()=>u(o));((e,n,r)=>{const u=(t,n)=>{t?N.close(e,e=>r(t)):r(null,n)};let o=0;if(0===n)return u(null,0);let i=0;const s=Buffer.alloc(512),a=(r,c)=>{if(r||void 0===c)return u(r);if(i+=c,i<512&&c)return N.read(e,s,i,s.length-i,o+i,a);if(0===o&&31===s[0]&&139===s[1])return u(new Error("cannot append to compressed archives"));if(i<512)return u(null,o);const d=new ql(s);if(!d.cksumValid)return u(null,o);const l=512*Math.ceil((d.size??0)/512);return o+l+512>n?u(null,o):(o+=l+512,o>=n?u(null,o):(t.mtimeCache&&d.mtime&&t.mtimeCache.set(String(d.path),d.mtime),i=0,void N.read(e,s,0,512,o,a)))};N.read(e,s,0,512,o,a)})(a,i.size,(o,i)=>{if(o)return u(o);const s=new Ad(t.file,{fd:a,start:i});n.pipe(s),s.on("error",u),s.on("close",r),Em(n,e)})});N.open(t.file,o,i)});return r},()=>{throw new TypeError("file is required")},()=>{throw new TypeError("file is required")},(t,e)=>{if(!t.file)throw new TypeError("file is required");if(t.gzip||t.brotli||t.file.endsWith(".br")||t.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!e?.length)throw new TypeError("no paths specified to add/replace")});Fd(Am.syncFile,Am.asyncFile,Am.syncNoFile,Am.asyncNoFile,(t,e=[])=>{Am.validate?.(t,e),bm(t)});const bm=t=>{const e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(n,r)=>e(n,r)&&!((t.mtimeCache?.get(n)??r.mtime??0)>(r.mtime??0)):(e,n)=>!((t.mtimeCache?.get(e)??n.mtime??0)>(n.mtime??0))};function ym(t){return Array.isArray(t)?t:[t]}const gm=/^\s+$/,Cm=/(?:[^\\]|^)\\$/,Fm=/^\\!/,wm=/^\\#/,Dm=/\r?\n/g,Bm=/^\.*\/|^\.+$/;let Im="node-ignore";"undefined"!=typeof Symbol&&(Im=Symbol.for("node-ignore"));const Rm=Im,jm=/([0-z])-([0-z])/g,Sm=()=>!1,_m=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(t,e,n)=>e+(0===n.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(t,e)=>{const{length:n}=e;return e.slice(0,n-n%2)+" "}],[/[\\$.|*+(){^]/g,t=>`\\${t}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,n)=>e+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(t,e,n)=>e+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(t,e,n,r,u)=>"\\"===e?`\\[${n}${(t=>{const{length:e}=t;return t.slice(0,e-e%2)})(r)}${u}`:"]"===u&&r.length%2==0?`[${(t=>t.replace(jm,(t,e,n)=>e.charCodeAt(0)<=n.charCodeAt(0)?t:""))(n)}${r}]`:"[]"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(t,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`]],Um=Object.create(null),Pm=t=>"string"==typeof t;class Om{constructor(t,e,n,r){this.origin=t,this.pattern=e,this.negative=n,this.regex=r}}const km=(t,e)=>{const n=t;let r=!1;0===t.indexOf("!")&&(r=!0,t=t.substr(1));const u=((t,e)=>{let n=Um[t];return n||(n=_m.reduce((e,[n,r])=>e.replace(n,r.bind(t)),t),Um[t]=n),e?new RegExp(n,"i"):new RegExp(n)})(t=t.replace(Fm,"!").replace(wm,"#"),e);return new Om(n,t,r,u)},xm=(t,e)=>{throw new e(t)},Tm=(t,e,n)=>{if(!Pm(t))return n(`path must be a string, but got \`${e}\``,TypeError);if(!t)return n("path must not be empty",TypeError);if(Tm.isNotRelative(t)){return n(`path should be a ${"`path.relative()`d"} string, but got "${e}"`,RangeError)}return!0},Lm=t=>Bm.test(t);Tm.isNotRelative=Lm,Tm.convert=t=>t;class Nm{constructor({ignorecase:t=!0,ignoreCase:e=t,allowRelativePaths:n=!1}={}){var r,u,o;r=this,u=Rm,o=!0,Object.defineProperty(r,u,{value:o}),this._rules=[],this._ignoreCase=e,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[Rm])return this._rules=this._rules.concat(t._rules),void(this._added=!0);if((t=>t&&Pm(t)&&!gm.test(t)&&!Cm.test(t)&&0!==t.indexOf("#"))(t)){const e=km(t,this._ignoreCase);this._added=!0,this._rules.push(e)}}add(t){return this._added=!1,ym(Pm(t)?(t=>t.split(Dm))(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,e){let n=!1,r=!1;return this._rules.forEach(u=>{const{negative:o}=u;if(r===o&&n!==r||o&&!n&&!r&&!e)return;u.regex.test(t)&&(n=!o,r=o)}),{ignored:n,unignored:r}}_test(t,e,n,r){const u=t&&Tm.convert(t);return Tm(u,t,this._allowRelativePaths?Sm:xm),this._t(u,e,n,r)}_t(t,e,n,r){if(t in e)return e[t];if(r||(r=t.split("/")),r.pop(),!r.length)return e[t]=this._testOne(t,n);const u=this._t(r.join("/")+"/",e,n,r);return e[t]=u.ignored?u:this._testOne(t,n)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return ym(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}}const qm=t=>new Nm(t);qm.isPathValid=t=>Tm(t&&Tm.convert(t),t,Sm),qm.default=qm;var Mm=qm;if("undefined"!=typeof process&&(process.env&&process.env.IGNORE_TEST_WIN32||"win32"===process.platform)){const t=t=>/^\\\\\?\\/.test(t)||/["<>|\u0000-\u001F]+/u.test(t)?t:t.replace(/\\/g,"/");Tm.convert=t;const e=/^[a-z]:\//i;Tm.isNotRelative=t=>e.test(t)||Lm(t)}var Gm,zm=function(){function t(t,e){var n=this;if(this.exec=t,this.parameters=e,this.defaultEncoding="base64",this.getFileIgnoreFilter=function(t){if(void 0!==t){var e=Mm({allowRelativePaths:!0}).add(t);return function(t){return!e.ignores(t)}}},this.getTarTransformFn=function(t,e){return function(n){n.path=n.path.replace(t,e)}},this.ensureDirRemote=function(t){return J(n,void 0,void 0,function(){var e,n,r;return V(this,function(u){switch(u.label){case 0:return e=["mkdir","-p",t],[4,this.runCommand(e)];case 1:if(n=u.sent(),"Success"!==(null===(r=null==n?void 0:n.commandResult)||void 0===r?void 0:r.status))throw new Error("Failed creating remote directory.");return[2]}})})},this.ensureTarCmd=function(){return J(n,void 0,void 0,function(){var t,e,n;return V(this,function(r){switch(r.label){case 0:return t=["tar","--version"],[4,this.runCommand(t)];case 1:if(e=r.sent(),"Success"!==(null===(n=null==e?void 0:e.commandResult)||void 0===n?void 0:n.status))throw new Error("Tar command not found on remote container. Required for file copy.");return[2]}})})},this.pathExistsRemote=function(t){return J(n,void 0,void 0,function(){var e;return V(this,function(n){switch(n.label){case 0:return e=["test","-e",t],[4,this.runCommand(e)];case 1:return[2,0===n.sent().commandResult.exitCode]}})})},this.checkIsDirRemote=function(t){return J(n,void 0,void 0,function(){var e;return V(this,function(n){switch(n.label){case 0:return e=["test","-d",t],[4,this.runCommand(e)];case 1:return[2,0===n.sent().commandResult.exitCode]}})})},this.runCommand=function(t){return J(n,void 0,void 0,function(){var e,n,r,u,o,i,s,a,c;return V(this,function(d){switch(d.label){case 0:return n=(e=this).exec,r=e.parameters,u=r.projectId,o=r.resourceId,i=r.resourceType,s=r.containerName,a={command:t,shell:"none",containerName:s},"service"!==i?[3,2]:[4,n.execServiceCommand({projectId:u,serviceId:o},a)];case 1:return c=d.sent(),[3,4];case 2:return[4,n.execJobCommand({projectId:u,jobId:o},a)];case 3:c=d.sent(),d.label=4;case 4:return[2,c]}})})},this.runSession=function(t){return J(n,void 0,void 0,function(){var e,n,r,u,o,i,s,a,c;return V(this,function(d){switch(d.label){case 0:return n=(e=this).exec,r=e.parameters,u=r.projectId,o=r.resourceId,i=r.resourceType,s=r.containerName,a={command:t,shell:"none",tty:!1,encoding:this.defaultEncoding,containerName:s},"service"!==i?[3,2]:[4,n.execServiceSession({projectId:u,serviceId:o},a)];case 1:return c=d.sent(),[3,4];case 2:return[4,n.execJobSession({projectId:u,jobId:o},a)];case 3:c=d.sent(),d.label=4;case 4:return[2,c]}})})},!["service","job"].includes(e.resourceType))throw new Error("Invalid resource type: ".concat(e.resourceType,", only 'service' and 'job' supported"))}return t.prototype.uploadFiles=function(t,e,n){return J(this,void 0,void 0,function(){var r,u,o,i,s,a,c,d,l,h,p,f;return V(this,function(m){switch(m.label){case 0:if(void 0===t||!E.existsSync(t))throw new Error("Local path '".concat(t,"' does not exists but is required for uploads."));return r=E.lstatSync(t).isFile(),u=r?C.dirname(t):t,o=r?C.basename(t):".",i=r&&void 0!==e&&""!==C.extname(e),s=i?C.dirname(e):null!=e?e:u,a=void 0!==e?C.basename(e):o,c=Hp({gzip:{encoding:this.defaultEncoding},cwd:u,filter:this.getFileIgnoreFilter(n),preservePaths:!0,onWriteEntry:i?this.getTarTransformFn(o,a):void 0},Do(o)),[4,this.ensureTarCmd()];case 1:return m.sent(),[4,this.ensureDirRemote(s)];case 2:return m.sent(),d=H(H(["tar","-xzvf","-"],["--no-same-owner"],!0),["-C",s],!1),[4,this.runSession(d)];case 3:return l=m.sent(),h=new Io,p=new Io,l.stdErr.pipe(h),l.stdOut.pipe(p),c.pipe(l.stdIn),[4,l.waitForCommandResult()];case 4:if("Success"!==(null==(f=m.sent())?void 0:f.status))throw new Error("Failed to upload file to container: ".concat(null==f?void 0:f.message,", error details: ").concat(h.getContentsAsString(),"; ").concat(p.getContentsAsString()));return r?[2,{type:Gm.FILE_UPLOAD,sourceDirectory:u,sourceFile:o,targetDirectory:s,targetFile:a}]:[2,{type:Gm.DIRECTORY_UPLOAD,sourceDirectory:u,targetDirectory:s}]}})})},t.prototype.downloadFiles=function(t,e,n){return J(this,void 0,void 0,function(){var r,u,o,i,s,a,c,d,l,h,p,f,m,v;return V(this,function(A){switch(A.label){case 0:return(r=void 0===t)?[3,2]:[4,this.pathExistsRemote(t)];case 1:r=!A.sent(),A.label=2;case 2:if(r)throw new Error("Remote path '".concat(t,"' does not exists but is required for downloads."));return[4,this.checkIsDirRemote(t)];case 3:return u=A.sent(),o=u?t:C.dirname(t),i=u?".":C.basename(t),s=void 0!==e&&""!==C.extname(e),a=!u&&s?C.basename(e):i,(c=void 0!==e?s?C.dirname(e):e:".")&&E.mkdirSync(c,{recursive:!0}),d=Do(null!=n?n:[]).map(function(t){return"--exclude=".concat(t)}),l=H(H(["tar","-zcf","-"],["--no-same-owner"],!0),d,!0),h=H(H([],l,!0),["-C",o,i],!1),[4,this.runSession(h)];case 4:return p=A.sent(),f=fm({cwd:c,gzip:{encoding:this.defaultEncoding},onReadEntry:a?this.getTarTransformFn(i,a):void 0}),m=new Io,p.stdErr.pipe(m),p.stdOut.pipe(f),[4,p.waitForCommandResult()];case 5:if("Success"!==(null==(v=A.sent())?void 0:v.status))throw new Error("Failed to download file from container: ".concat(null==v?void 0:v.message,", error details: ").concat(m.getContentsAsString()));return u?[2,{type:Gm.DIRECTORY_DOWNLOAD,sourceDirectory:o,targetDirectory:c}]:[2,{type:Gm.FILE_DOWNLOAD,sourceDirectory:o,sourceFile:i,targetDirectory:c,targetFile:a}]}})})},t}();!function(t){t.DIRECTORY_UPLOAD="directory-upload",t.FILE_UPLOAD="file-upload",t.DIRECTORY_DOWNLOAD="directory-download",t.FILE_DOWNLOAD="file-download"}(Gm||(Gm={}));var $m,Wm=function(){function t(t,e){this.exec=t,this.stdIgnoreList=["*.*~"],e&&(this.stdIgnoreList=e)}return t.prototype.downloadServiceFiles=function(t,e){return J(this,void 0,void 0,function(){var n,r,u;return V(this,function(o){switch(o.label){case 0:return n=t.serviceId,r=t.projectId,u={projectId:r,resourceId:n,resourceType:"service"},[4,this.copy(u,e,"download")];case 1:return[2,o.sent()]}})})},t.prototype.uploadServiceFiles=function(t,e){return J(this,void 0,void 0,function(){var n,r,u;return V(this,function(o){switch(o.label){case 0:return n=t.serviceId,r=t.projectId,u={projectId:r,resourceId:n,resourceType:"service"},[4,this.copy(u,e,"upload")];case 1:return[2,o.sent()]}})})},t.prototype.downloadJobFiles=function(t,e){return J(this,void 0,void 0,function(){var n,r,u;return V(this,function(o){switch(o.label){case 0:return n=t.jobId,r=t.projectId,u={projectId:r,resourceId:n,resourceType:"job"},[4,this.copy(u,e,"download")];case 1:return[2,o.sent()]}})})},t.prototype.uploadJobFiles=function(t,e){return J(this,void 0,void 0,function(){var n,r,u;return V(this,function(o){switch(o.label){case 0:return n=t.jobId,r=t.projectId,u={projectId:r,resourceId:n,resourceType:"job"},[4,this.copy(u,e,"upload")];case 1:return[2,o.sent()]}})})},t.prototype.copy=function(t,e,n){var r;return J(this,void 0,void 0,function(){var u,o;return V(this,function(i){switch(i.label){case 0:switch(u=new zm(this.exec,W(W({},t),{containerName:e.containerName})),o=H(H([],null!==(r=e.ignoreList)&&void 0!==r?r:[],!0),this.stdIgnoreList,!0),n){case"download":return[3,1];case"upload":return[3,3]}return[3,5];case 1:return[4,u.downloadFiles(e.remotePath,e.localPath,o)];case 2:case 4:return[2,i.sent()];case 3:return[4,u.uploadFiles(e.localPath,e.remotePath,o)];case 5:return[2]}})})},t}(),Jm=function(t){function e(e){var n=this.constructor,r=t.call(this,e.message)||this;r.name="NorthflankApiCallError",r.message=e.message,r.status=e.status,r.id=e.id,r.details=e.details;var u=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,u):r.__proto__=u,r}return $(e,t),e}(Error),Vm=function(t){function e(e,n,r,u){var o=t.call(this)||this;return o.baseUrl=e,o.logsConfig=n,o.token=r,o.agent=u,o.stop=function(){return J(o,void 0,void 0,function(){var t;return V(this,function(e){if(void 0===this.logSession)throw new Error("No command is running");return null===(t=this.remote)||void 0===t||t.close(),[2]})})},o}return $(e,t),e.getLogsEndpoint=function(t){var e=t.containerName,n=t.types,r=t.entityId,u=t.entityType,o=t.buildId,i=t.runId,s=t.backupId,a=t.restoreId,c=t.deploymentId,d=t.isBuild,l=t.lineLimit,h=t.projectId,p=t.queryType,f=t.startTime,m=t.endTime,v=t.duration,E=t.direction,A=t.textIncludes,b=t.textNotIncludes,y=t.regexIncludes,g=t.regexNotIncludes,C="/v1/projects/".concat(h,"/"),F=new URLSearchParams;return F.append("queryType",p),void 0!==f&&F.append("startTime",f.toISOString()),void 0!==m&&F.append("endTime",m.toISOString()),void 0!==l&&F.append("lineLimit",l.toString()),void 0!==e&&F.append("containerName",e),void 0!==c&&F.append("deploymentId",c),void 0!==i&&F.append("runId",i),void 0!==o&&F.append("buildId",o),void 0!==A&&F.append("textIncludes",A),void 0!==b&&F.append("textNotIncludes",b),void 0!==y&&F.append("regexIncludes",y),void 0!==g&&F.append("regexNotIncludes",g),void 0!==E&&F.append("direction",E),void 0!==v&&F.append("duration",v.toString()),void 0!==n&&n.forEach(function(t){return F.append("type",t)}),"".concat(C).concat(function(){var t=d?"/build-logs":"/logs";switch(u){case"service":return"services/".concat(r).concat(t);case"job":return"jobs/".concat(r).concat(t);case"addon":return"addons/".concat(r).concat(t);case"addonBackup":return"addons/".concat(r,"/backups/").concat(s).concat(t);case"addonRestore":return"addons/".concat(r,"/backups/").concat(s,"/restores/").concat(a).concat(t);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(u))}}(),"?").concat(F.toString())},Object.defineProperty(e.prototype,"logsEndpoint",{get:function(){return"".concat(this.baseUrl).concat(e.getLogsEndpoint(this.logsConfig))},enumerable:!1,configurable:!0}),e.prototype.start=function(){return J(this,void 0,void 0,function(){var t=this;return V(this,function(e){switch(e.label){case 0:if(void 0!==this.logSession)throw new Error("Command is already running");return this.logSession=new Promise(function(e,n){var r,u,o,i;void 0!==t.remote&&n(Error("Command is already running"));var s=t.logsEndpoint.replace("https:","wss:").replace("http:","ws:");t.remote=new Fa(s,{agent:t.agent}),null===(r=t.remote)||void 0===r||r.on("message",function(e){var n,r,u=JSON.parse(e.toString());switch(null==u?void 0:u.type){case"init":var o=u.data;"successful"!==o.auth&&a("Log tail initialization failed: ".concat(null!==(n=null==o?void 0:o.message)&&void 0!==n?n:"Reason unknown"));break;case"log-lines":var i=u.data;t.emit("logs-received",i.map(iv));break;case"error":a(null===(r=u.data)||void 0===r?void 0:r.message);break;default:var s="unable to parse message: ".concat(JSON.stringify(u));a(s)}}),null===(u=t.remote)||void 0===u||u.on("close",function(){t.emit("close"),t.reset(),e()}),null===(o=t.remote)||void 0===o||o.on("open",function(){t.emit("open")}),null===(i=t.remote)||void 0===i||i.on("error",function(n){t.emit("error",n),t.reset(),e()});var a=function(e){t.emit("error",{message:e}),t.reset(),n(new Error(e))}}),[4,new Promise(function(e){var n;t.remote.on("open",function(){return e()}),null===(n=t.remote)||void 0===n||n.on("error",function(){e()})})];case 1:return e.sent(),this.initialAuth(),[2,this.logSession]}})})},e.prototype.initialAuth=function(){var t,e={type:"init",data:{auth:{type:"apiToken",apiToken:this.token}}};null===(t=this.remote)||void 0===t||t.send(JSON.stringify(e))},e.prototype.reset=function(){this.remote=void 0,this.logSession=void 0},e}(e),Hm=function(){if(Fo)try{return JSON.parse(E.readFileSync(C.join(C.dirname(c(import.meta.url)),"../../package.json")).toString())}catch(t){return{}}return{}},Zm=function(){function t(t,e){var n=this;this.opts=e,this.call=function(t){return J(n,void 0,void 0,function(){return V(this,function(e){return[2,this.executeCall(t)]})})},this.contextProvider=t}return t.prototype.getDefaultHeaders=function(){var t,e,n=this.contextProvider.getCurrentToken(),r=(null===(t=this.opts)||void 0===t?void 0:t.customUserAgent)?" (".concat(this.opts.customUserAgent,")"):"";return{Authorization:this.withAuth?"Bearer ".concat(n):void 0,"Content-Type":"application/json","User-Agent":"northflank-js-client/".concat(null===(e=Hm())||void 0===e?void 0:e.version).concat(r)}},t.prototype.executeCall=function(t){var e;return J(this,void 0,void 0,function(){var n,r,u,o,i,s,a,c,d,l,h,p,f=this;return V(this,function(m){switch(m.label){case 0:if(n=this.method,r=this.opts.agent,u={method:n,headers:this.getDefaultHeaders(),agent:r},!(o=null===(e=this.contextProvider)||void 0===e?void 0:e.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return i="".concat(o).concat(this.endpointUrl(t)),s=this.body(t),a=W(W({url:i},u),{body:s}),[4,rv(i,W(W({},u),{body:s}))];case 1:return[4,(c=m.sent()).text()];case 2:return d=m.sent(),l=function(){if(200!==c.status){var t=null==h?void 0:h.error,e=(null==t?void 0:t.message)||"",n={status:c.status,message:e,id:null==t?void 0:t.id,details:null==t?void 0:t.details};if(f.opts.throwErrorOnHttpErrorCode)throw new Jm(n);return n}},h=function(){try{return JSON.parse(d)}catch(t){throw Error("Failed reading api request result: \n\tStatus: ".concat(c.statusText," (").concat(c.status,")\n\tMessage: ").concat(d))}}(),p=l(),[2,{data:null==h?void 0:h.data,rawResponse:c,request:a,error:p,pagination:null==h?void 0:h.pagination}]}})})},t}(),Ym=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="get",e.body=function(){},e}return $(e,t),e}(Zm),Km=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.all=function(t){return J(e,void 0,void 0,function(){return V(this,function(e){return[2,new nv(this,t).getAll()]})})},e.call=function(n){return J(e,void 0,void 0,function(){var e,r=this;return V(this,function(u){switch(u.label){case 0:return[4,t.prototype.executeCall.call(this,n)];case 1:return e=u.sent(),[2,W(W({},e),{pagination:W(W({},e.pagination),{getNextPage:function(){return J(r,void 0,void 0,function(){var t,r,u,o,i,s,a,c=this;return V(this,function(d){return void 0===(null===(s=e.pagination)||void 0===s?void 0:s.cursor)?(t=Object.keys(e.data),r=1===t.length?((i={})[t[0]]=[],i):{},u=W(W({},e),{pagination:W(W({},e.pagination),{count:0}),data:r}),[2,(o=function(t){return W(W({},t),{pagination:W(W({},t.pagination),{getNextPage:function(){return J(c,void 0,void 0,function(){return V(this,function(e){return[2,o(t)]})})}})})})(u)]):[2,new nv(this,n,null===(a=e.pagination)||void 0===a?void 0:a.cursor).getNext()]})})}})})]}})})},e}return $(e,t),e}(Ym),Xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="post",e}return $(e,t),e}(Zm),Qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="delete",e.body=function(){},e}return $(e,t),e}(Zm),tv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="put",e}return $(e,t),e}(Zm),ev=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="patch",e}return $(e,t),e}(Zm),nv=function(){function t(t,e,n){void 0===n&&(n=null);var r=this;this.endpoint=t,this.opts=e,this._currentOffset=0,this.hasNext=function(){return void 0!==r.cursor},this.cursor=n}return Object.defineProperty(t.prototype,"currentOffset",{get:function(){return this._currentOffset},enumerable:!1,configurable:!0}),t.prototype.getNext=function(){var t,e,n;return J(this,void 0,void 0,function(){var r,u,o,i,s,a;return V(this,function(c){switch(c.label){case 0:return[4,this.endpoint.call(W(W({},this.opts),{options:W(W({},null===(t=this.opts)||void 0===t?void 0:t.options),{cursor:null!==(e=this.cursor)&&void 0!==e?e:void 0})}))];case 1:return r=c.sent(),u=r.data,o=r.request,i=r.error,s=r.pagination,a=r.rawResponse,this.cursor=null==s?void 0:s.cursor,this._currentOffset+=null!==(n=null==s?void 0:s.count)&&void 0!==n?n:0,[2,{data:u,request:o,error:i,pagination:s,rawResponse:a}]}})})},t.prototype.getAll=function(){var t,e;return J(this,void 0,void 0,function(){var n,r,u,o,i;return V(this,function(s){switch(s.label){case 0:n=[],s.label=1;case 1:return this.hasNext()?[4,this.getNext()]:[3,3];case 2:return(r=s.sent()).error?[2,r]:(n.push(r),[3,1]);case 3:return o=n.flatMap(function(t){var e=Object.keys(t.data);return 1===e.length?(u=e[0],t.data[e[0]]):t.data}),[2,{data:void 0===u?o:(i={},i[u]=o,i),request:null===(t=n[0])||void 0===t?void 0:t.request,rawResponse:null===(e=n[0])||void 0===e?void 0:e.rawResponse}]}})})},t}(),rv=function(t,e,n,r){return void 0===e&&(e={}),void 0===n&&(n=3),void 0===r&&(r=500),new Promise(function(u,o){var i=function(n){return wo(t,e).then(function(t){u(t)}).catch(function(t){return J(void 0,void 0,void 0,function(){return V(this,function(e){switch(e.label){case 0:return n>0?[4,(u=r,new Promise(function(t){setTimeout(function(){t()},u)}))]:[3,2];case 1:return e.sent(),[2,i(n-1)];case 2:return[2,o(t)]}var u})})})};return i(n)})},uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetch log lines over a specific time span",e.withAuth=!0,e.requiredPermissions="Account > Service | Job | Addon > General > Read",e.endpointUrl=function(t){return Vm.getLogsEndpoint(t)},e.body=function(){},e}return $(e,t),e}(Ym);!function(t){t.CDN="cdn",t.Mesh="mesh",t.Ingress="ingress",t.Runtime="runtime"}($m||($m={}));var ov,iv=function(t){return{containerId:t.containerId,log:t.log,ts:new Date(t.ts)}},sv=function(t,e){void 0===e&&(e={});var n=this;this.contextProvider=t,this.clientOpts=e,this.getServiceLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"service")]})})},this.getServiceBuildLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r,u,o;return V(this,function(i){return e=t.parameters,n=t.options,r=e.projectId,u=e.serviceId,o={entityId:u,projectId:r},[2,this.logRange(o,W(W({},n),{isBuild:!0}),"service")]})})},this.getJobLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"job")]})})},this.getJobBuildLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r,u,o;return V(this,function(i){return e=t.parameters,n=t.options,r=e.projectId,u=e.jobId,o={entityId:u,projectId:r},[2,this.logRange(o,W(W({},n),{isBuild:!0}),"job")]})})},this.getAddonLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"addon")]})})},this.getAddonBackupLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logRange(r,W(W({},n),{backupId:e.backupId}),"addonBackup")]})})},this.getAddonRestoresLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r,u;return V(this,function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},u={backupId:e.backupId,restoreId:e.restoreId},[2,this.logRange(r,W(W({},n),u),"addonRestore")]})})},this.logRange=function(t,e,r){return J(n,void 0,void 0,function(){var n,u,o,i,s;return V(this,function(a){switch(a.label){case 0:return n=t.entityId,u=t.projectId,o=W(W({projectId:u,entityId:n,entityType:r},e),{queryType:"range"}),[4,new uv(this.contextProvider,this.clientOpts).call(o)];case 1:return(i=a.sent()).error?[2,i]:[2,W(W({},i),{data:null===(s=null==i?void 0:i.data)||void 0===s?void 0:s.map(iv)})]}})})},this.tailServiceLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"service")]})})},this.tailServiceBuildLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r,u,o;return V(this,function(i){return e=t.parameters,n=t.options,r=e.serviceId,u=e.projectId,o={entityId:r,projectId:u},[2,this.logTail(o,W(W({},n),{isBuild:!0}),"service")]})})},this.tailJobLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"job")]})})},this.tailJobBuildLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r,u,o;return V(this,function(i){return e=t.parameters,n=t.options,r=e.projectId,u=e.jobId,o={entityId:u,projectId:r},[2,this.logTail(o,W(W({},n),{isBuild:!0}),"job")]})})},this.tailAddonLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"addon")]})})},this.tailAddonBackupLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logTail(r,W(W({},n),{backupId:e.backupId}),"addonBackup")]})})},this.tailAddonRestoresLogs=function(t){return J(n,void 0,void 0,function(){var e,n,r,u;return V(this,function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},u={backupId:e.backupId,restoreId:e.restoreId},[2,this.logTail(r,W(W({},n),u),"addonRestore")]})})},this.logTail=function(t,e,r){return J(n,void 0,void 0,function(){var n,u,o,i,s;return V(this,function(a){if(n=t.entityId,u=t.projectId,o=W({queryType:"tail",projectId:u,entityId:n,entityType:r},e),this.assertStartedWithNodejs(),i=this.contextProvider.getCurrentBaseUrl(!0),!(s=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new Vm(i,o,s,this.clientOpts.agent)]})})},this.assertStartedWithNodejs=function(){if(!Fo)throw new Error("Command exec only possible when started with nodejs")}},av=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetch metrics entries over a specific time span",e.withAuth=!0,e.requiredPermissions="Account > Service | Job | Addon > General > Read",e.endpointUrl=function(t){var e=t.projectId,n=t.entityId,r=t.entityType,u=t.deploymentId,o=t.runId,i=t.buildId,s=t.isBuild,a=t.queryType,c=t.metricTypes,d=t.startTime,l=t.endTime,h=t.duration,p=t.containerName,f=t.timestamp,m="/v1/projects/".concat(e,"/");var v=new URLSearchParams;return v.append("queryType",a),void 0!==d&&v.append("startTime",d.toISOString()),void 0!==l&&v.append("endTime",l.toISOString()),void 0!==p&&v.append("containerName",p),void 0!==u&&v.append("deploymentId",u),void 0!==o&&v.append("runId",o),void 0!==i&&v.append("buildId",i),void 0!==f&&v.append("timestamp",f.toISOString()),void 0!==h&&v.append("duration",h.toString()),void 0!==c&&c.forEach(function(t){return v.append("metricTypes",t)}),"".concat(m).concat(function(){var t=s?"/build-metrics":"/metrics";switch(r){case"service":return"services/".concat(n).concat(t);case"job":return"jobs/".concat(n).concat(t);case"addon":return"addons/".concat(n).concat(t);default:throw new Error("Unexpected Northflank entity type received in metrics endpoint generation: ".concat(r))}}(),"?").concat(v.toString())},e.body=function(){},e}return $(e,t),e}(Ym),cv=function(t){return{metadata:t.metadata,data:t.data.map(function(t){return{value:t.value,ts:new Date(t.ts)}})}};!function(t){t.Cpu="cpu",t.Memory="memory",t.NetworkIngress="networkIngress",t.NetworkEgress="networkEgress",t.TcpConnectionOpen="tcpConnectionsOpen",t.PvcUsage="diskUsage",t.Requests="requests",t.Http4xxResponses="http4xxResponses",t.Http5xxResponses="http5xxResponses",t.Bandwidth="bandwidth",t.BandwidthVolume="bandwidthVolume"}(ov||(ov={}));var dv=function(t){var e=this;this.contextProvider=t,this.getServiceMetrics=function(t){return J(e,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"service")]})})},this.getServiceBuildMetrics=function(t){return J(e,void 0,void 0,function(){var e,n,r,u,o;return V(this,function(i){return e=t.parameters,n=t.options,r=e.serviceId,u=e.projectId,o={entityId:r,projectId:u},[2,this.metricsSingle(o,W(W({},n),{isBuild:!0}),"service")]})})},this.getJobMetrics=function(t){return J(e,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"job")]})})},this.getJobBuildMetrics=function(t){return J(e,void 0,void 0,function(){var e,n,r,u,o;return V(this,function(i){return e=t.parameters,n=t.options,r=e.jobId,u=e.projectId,o={entityId:r,projectId:u},[2,this.metricsSingle(o,W(W({},n),{isBuild:!0}),"job")]})})},this.getAddonMetrics=function(t){return J(e,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"addon")]})})},this.metricsSingle=function(t,n,r){return J(e,void 0,void 0,function(){var e,u,o;return V(this,function(i){return e=t.entityId,u=t.projectId,o=W(W({projectId:u,entityId:e,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(o)]})})},this.getServiceMetricsRange=function(t){return J(e,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"service")]})})},this.getServiceBuildMetricsRange=function(t){return J(e,void 0,void 0,function(){var e,n,r,u,o;return V(this,function(i){return e=t.parameters,n=t.options,r=e.projectId,u=e.serviceId,o={entityId:u,projectId:r},[2,this.metricsRange(o,W(W({},n),{isBuild:!0}),"service")]})})},this.getJobMetricsRange=function(t){return J(e,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"job")]})})},this.getJobBuildMetricsRange=function(t){return J(e,void 0,void 0,function(){var e,n,r,u,o;return V(this,function(i){return e=t.parameters,n=t.options,r=e.projectId,u=e.jobId,o={entityId:u,projectId:r},[2,this.metricsRange(o,W(W({},n),{isBuild:!0}),"job")]})})},this.getAddonMetricsRange=function(t){return J(e,void 0,void 0,function(){var e,n,r;return V(this,function(u){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"addon")]})})},this.metricsRange=function(t,n,r){return J(e,void 0,void 0,function(){var e,u,o;return V(this,function(i){return e=t.entityId,u=t.projectId,o=W(W({projectId:u,entityId:e,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(o)]})})},this.getMetrics=function(t){return J(e,void 0,void 0,function(){var e;return V(this,function(n){switch(n.label){case 0:return[4,new av(this.contextProvider,{}).call(t)];case 1:return(e=n.sent()).error?[2,e]:[2,W(W({},e),{data:Object.fromEntries(Object.entries(e.data).map(function(t){var e=t[0],n=t[1];return[e,W(W({},n),{values:n.values.map(cv)})]}))})]}})})}},lv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the available addon types",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/addon-types"},e.body=function(){},e}return $(e,t),e}(Ym),hv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the backup destinations saved to this account. Does not display secrets.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/backup-destinations".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),pv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new backup destination to this account.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Create",e.endpointUrl=function(t){return"/v1/backup-destinations"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),fv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a backup destination, including secrets.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Read",e.endpointUrl=function(t){return["backupDestinationId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId))},e.body=function(){},e}return $(e,t),e}(Ym),mv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a backup destination.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Update",e.endpointUrl=function(t){return["backupDestinationId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),vv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a backup destination.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Delete",e.endpointUrl=function(t){return["backupDestinationId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId))},e.body=function(){},e}return $(e,t),e}(Qm),Ev=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the backups associated with a backup destinations.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Read",e.endpointUrl=function(t){var e;["backupDestinationId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId),"/backups").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),Av=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of past invoices",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/billing/invoices".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),bv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about an invoice. If `timestamp` is passed in as a query parameter, this endpoint returns details about the invoice containing that timestamp. Otherwise, returns a preview invoice displaying billing data from after the most recent invoice.",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/billing/invoices/details".concat(r)},e.body=function(){},e}return $(e,t),e}(Ym),yv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud providers",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/cloud-providers"},e.body=function(){},e}return $(e,t),e}(Ym),gv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists clusters for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/cloud-providers/clusters".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),Cv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Fv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or update a cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(tv),wv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given cluster",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){return["clusterId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId))},e.body=function(){},e}return $(e,t),e}(Ym),Dv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),Bv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given cluster. Fails if the cluster has associated projects.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Delete",e.endpointUrl=function(t){return["clusterId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId))},e.body=function(){},e}return $(e,t),e}(Qm),Iv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of nodes for the given cluster",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){var e;["clusterId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),Rv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Cordon a node on the cluster to prevent new pods from scheduling on it.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId","nodeId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes/").concat(encodeURIComponent(t.parameters.nodeId),"/cordon")},e.body=function(){},e}return $(e,t),e}(Xm),jv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Drain a node by evicting all running pods.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId","nodeId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes/").concat(encodeURIComponent(t.parameters.nodeId),"/drain")},e.body=function(){},e}return $(e,t),e}(Xm),Sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Uncordon a node on the cluster if it was previously cordoned.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId","nodeId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes/").concat(encodeURIComponent(t.parameters.nodeId),"/uncordon")},e.body=function(){},e}return $(e,t),e}(Xm),_v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists integrations for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/cloud-providers/integrations".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),Uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Pv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Create",e.endpointUrl=function(t){return["integrationId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/cloud-providers/integrations"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(tv),Ov=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given integration",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){return["integrationId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(t.parameters.integrationId))},e.body=function(){},e}return $(e,t),e}(Ym),kv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Update",e.endpointUrl=function(t){return["integrationId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(t.parameters.integrationId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),xv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given integration. Fails if the integration is associated with existing clusters.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Delete",e.endpointUrl=function(t){return["integrationId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(t.parameters.integrationId))},e.body=function(){},e}return $(e,t),e}(Qm),Tv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud provider node types",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/cloud-providers/node-types".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),Lv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud provider regions",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/cloud-providers/regions".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),Nv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the partially random string used when generating host names for the authenticated account.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return"/v1/dns-id"},e.body=function(){},e}return $(e,t),e}(Ym),qv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available domains",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/domains".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),Mv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Registers a new domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return"/v1/domains"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Gv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return["domain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain))},e.body=function(){},e}return $(e,t),e}(Ym),zv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a domain and each of its registered subdomains.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Delete",e.endpointUrl=function(t){return["domain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain))},e.body=function(){},e}return $(e,t),e}(Qm),$v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Retrieve certificate data for a domain to verify its contents.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return["domain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/certificate")},e.body=function(){},e}return $(e,t),e}(Ym),Wv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Import a certificate for the domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return["domain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Jv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new subdomain to the domain.",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Vv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Read",e.endpointUrl=function(t){return["domain","subdomain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain))},e.body=function(){},e}return $(e,t),e}(Ym),Hv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from a domain.",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain))},e.body=function(){},e}return $(e,t),e}(Qm),Zv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Assigns a service port to the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/assign")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Yv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from its assigned service",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){var e;["domain","subdomain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/assign").concat(r)},e.body=function(){},e}return $(e,t),e}(Qm),Kv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes the CDN integration from the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/cdn/disable")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Xv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Enables a CDN integration on the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/cdn/enable")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Qv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new path to the subdomain.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Create",e.endpointUrl=function(t){return["domain","subdomain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),tE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="List paths for a given subdomain.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Read",e.endpointUrl=function(t){return["domain","subdomain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths")},e.body=function(){},e}return $(e,t),e}(Ym),eE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get subdomain path details.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Read",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath))},e.body=function(){},e}return $(e,t),e}(Ym),nE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a path.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath))},e.body=function(){},e}return $(e,t),e}(Qm),rE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a subdomain path.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),uE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Assign a subdomain path to a port.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath),"/assign")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),oE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Unassign a subdomain path to a port.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath),"/assign")},e.body=function(){},e}return $(e,t),e}(Qm),iE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/verify")},e.body=function(){},e}return $(e,t),e}(Xm),sE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attempts to verify the domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return["domain"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/verify")},e.body=function(){},e}return $(e,t),e}(Xm),aE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of log sinks added to this account.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/integrations/log-sinks".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),cE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Create",e.endpointUrl=function(t){return"/v1/integrations/log-sinks"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),dE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Read",e.endpointUrl=function(t){return["logSinkId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId))},e.body=function(){},e}return $(e,t),e}(Ym),lE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Delete",e.endpointUrl=function(t){return["logSinkId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId))},e.body=function(){},e}return $(e,t),e}(Qm),hE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pauses a given log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId),"/pause")},e.body=function(){},e}return $(e,t),e}(Xm),pE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes a paused log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId),"/resume")},e.body=function(){},e}return $(e,t),e}(Xm),fE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the settings for a log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId),"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),mE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists notification integrations for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/integrations/notifications".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),vE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a new notification integration.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/integrations/notifications"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),EE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a notification integration.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Read",e.endpointUrl=function(t){return["notificationId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/integrations/notifications/".concat(encodeURIComponent(t.parameters.notificationId))},e.body=function(){},e}return $(e,t),e}(Ym),AE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a notification integration",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/integrations/notifications/".concat(encodeURIComponent(t.parameters.notificationId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),bE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a notification integration",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/integrations/notifications/".concat(encodeURIComponent(t.parameters.notificationId))},e.body=function(){},e}return $(e,t),e}(Qm),yE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the container registry credentials saved to this account. Does not display secrets.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/integrations/registries".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),gE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new set of container registry credentials to this account.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Create",e.endpointUrl=function(t){return"/v1/integrations/registries"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),CE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Views a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read Encrypted",e.endpointUrl=function(t){return["credentialId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/integrations/registries/".concat(encodeURIComponent(t.parameters.credentialId))},e.body=function(){},e}return $(e,t),e}(Ym),FE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Update",e.endpointUrl=function(t){return["credentialId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/integrations/registries/".concat(encodeURIComponent(t.parameters.credentialId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),wE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Delete",e.endpointUrl=function(t){return["credentialId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/integrations/registries/".concat(encodeURIComponent(t.parameters.credentialId))},e.body=function(){},e}return $(e,t),e}(Qm),DE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists linked version control providers",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){return"/v1/integrations/vcs"},e.body=function(){},e}return $(e,t),e}(Ym),BE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Generate a token for a specific VCS link.",e.withAuth=!0,e.requiredPermissions="Account > Git > Tokens > Read",e.endpointUrl=function(t){var e;["customVCSId","vcsLinkId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/integrations/vcs/custom/".concat(encodeURIComponent(t.parameters.customVCSId),"/token/").concat(encodeURIComponent(t.parameters.vcsLinkId)).concat(r)},e.body=function(){},e}return $(e,t),e}(Xm),IE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of repositories accessible to this account",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/integrations/vcs/repos".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),RE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of branches for the repo",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e;["vcsService","repositoryOwner","repositoryName"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/integrations/vcs/repos/".concat(encodeURIComponent(t.parameters.vcsService),"/").concat(encodeURIComponent(t.parameters.repositoryOwner),"/").concat(encodeURIComponent(t.parameters.repositoryName),"/branches").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),jE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available billing plans",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/plans"},e.body=function(){},e}return $(e,t),e}(Ym),SE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists projects for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),_E=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Create",e.endpointUrl=function(t){return"/v1/projects"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),UE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Create",e.endpointUrl=function(t){return"/v1/projects"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(tv),PE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Update",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),OE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given project",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId))},e.body=function(){},e}return $(e,t),e}(Ym),kE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given project. Fails if the project isn't empty.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Delete",e.endpointUrl=function(t){var e;["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId)).concat(r)},e.body=function(){},e}return $(e,t),e}(Qm),xE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of addons belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),TE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),LE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates an addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(tv),NE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return $(e,t),e}(Ym),qE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates an addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),ME=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Delete",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return $(e,t),e}(Qm),GE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about an addon's backup schedules",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backup-schedules").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),zE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a new backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backup-schedules")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),$E=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","scheduleId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backup-schedules/").concat(encodeURIComponent(t.parameters.scheduleId))},e.body=function(){},e}return $(e,t),e}(Qm),WE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns a list of backups for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),JE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Initiates a backup for the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),VE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId))},e.body=function(){},e}return $(e,t),e}(Ym),HE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a given backup",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId))},e.body=function(){},e}return $(e,t),e}(Qm),ZE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the in progress backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/abort")},e.body=function(){},e}return $(e,t),e}(Xm),YE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts an in-progress backup restore.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/abort-restore").concat(r)},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),KE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Generates a temporary download link for downloading the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/download-link")},e.body=function(){},e}return $(e,t),e}(Ym),XE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restores the given addon to the given backup state.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/restore").concat(r)},e.body=function(){},e}return $(e,t),e}(Xm),QE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of restores for the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/restores").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),tA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/retain")},e.body=function(){},e}return $(e,t),e}(Xm),eA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > Deployment > View Instances",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/containers").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),nA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the credentials for connecting to the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/credentials")},e.body=function(){},e}return $(e,t),e}(Ym),rA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Imports a database from an external archive or existing live database.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),uA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the network settings for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/network-settings")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),oA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/pause")},e.body=function(){},e}return $(e,t),e}(Xm),iA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Reset the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Delete",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/reset")},e.body=function(){},e}return $(e,t),e}(Xm),sA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restart the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/restart")},e.body=function(){},e}return $(e,t),e}(Xm),aA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns a list of restores for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/restores").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),cA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resume the given addon if it is paused.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/resume")},e.body=function(){},e}return $(e,t),e}(Xm),dA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the allocated resources for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),lA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the security rules for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/security")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),hA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the current addon version including available upgrades and upgrade history.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/version")},e.body=function(){},e}return $(e,t),e}(Ym),pA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Upgrades the addon to a new version.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/version")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),fA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of jobs belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),mA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),vA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(tv),EA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/cron/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),AA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),bA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(tv),yA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/manual/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),gA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(){},e}return $(e,t),e}(Ym),CA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Delete",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(){},e}return $(e,t),e}(Qm),FA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/branches").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),wA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists builds for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),DA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given job. Given a commit sha, it will build that commit.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),BA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the build arguments of the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-arguments").concat(r)},e.body=function(){},e}return $(e,t),e}(Ym),IA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets build arguments for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),RA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-arguments/details")},e.body=function(){},e}return $(e,t),e}(Ym),jA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),SA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),_A=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","buildId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return $(e,t),e}(Ym),UA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job build",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","buildId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return $(e,t),e}(Qm),PA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/containers").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),OA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/deployment")},e.body=function(){},e}return $(e,t),e}(Ym),kA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),xA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/health-checks")},e.body=function(){},e}return $(e,t),e}(Ym),TA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),LA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/pause")},e.body=function(){},e}return $(e,t),e}(Xm),NA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/pull-requests").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),qA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),MA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetches run history for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),GA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Starts a new job run for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),zA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns data about the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId","runId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs/").concat(encodeURIComponent(t.parameters.runId))},e.body=function(){},e}return $(e,t),e}(Ym),$A=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","runId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs/").concat(encodeURIComponent(t.parameters.runId))},e.body=function(){},e}return $(e,t),e}(Qm),WA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runtime-environment").concat(r)},e.body=function(){},e}return $(e,t),e}(Ym),JA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),VA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runtime-environment/details")},e.body=function(){},e}return $(e,t),e}(Ym),HA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Scale Job",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),ZA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates settings for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),YA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modify cron job to toggle suspending of its schedule.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/suspend")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),KA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists all pipelines for a project",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),XA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a pipeline",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId))},e.body=function(){},e}return $(e,t),e}(Ym),QA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),tb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a given preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Create",e.endpointUrl=function(t){return["projectId","pipelineId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),eb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of active preview environments for a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/previews").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),nb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a preview environment generated by a preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Delete",e.endpointUrl=function(t){return["projectId","pipelineId","previewId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/previews/").concat(encodeURIComponent(t.parameters.previewId))},e.body=function(){},e}return $(e,t),e}(Qm),rb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of preview template runs",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/runs").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),ub=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given preview template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","templateRunId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/runs/").concat(encodeURIComponent(t.parameters.templateRunId))},e.body=function(){},e}return $(e,t),e}(Ym),ob=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage))},e.body=function(){},e}return $(e,t),e}(Ym),ib=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Runs a given release flow with given arguments. This endpoint can be used as part of a CI pipeline to automatically trigger a release process.",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),ab=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists runs of a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId","stage"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),cb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given release flow run",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","stage","runId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs/").concat(encodeURIComponent(t.parameters.runId))},e.body=function(){},e}return $(e,t),e}(Ym),db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Abort the given release flow run",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage","runId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs/").concat(encodeURIComponent(t.parameters.runId),"/abort")},e.body=function(){},e}return $(e,t),e}(Xm),lb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of secrets belonging to the project",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e;["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),hb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),pb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(tv),fb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),mb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret including its contents",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e;["projectId","secretId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId)).concat(r)},e.body=function(){},e}return $(e,t),e}(Ym),vb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a secret",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId))},e.body=function(){},e}return $(e,t),e}(Qm),Eb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a secret",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Ab=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Link an addon to the secret group or edit the settings of the linked addon.",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),bb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a given addon link.",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return $(e,t),e}(Ym),yb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Unlinks an addon from the secret group.",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return $(e,t),e}(Qm),gb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret with details about its linked addons",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/details")},e.body=function(){},e}return $(e,t),e}(Ym),Cb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of services belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),Fb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),wb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(tv),Db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/build/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),Bb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Ib=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(tv),Rb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/combined/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),jb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(tv),_b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/deployment/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),Ub=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(){},e}return $(e,t),e}(Ym),Pb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Delete",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId)).concat(r)},e.body=function(){},e}return $(e,t),e}(Qm),Ob=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/branches").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),kb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the builds for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),xb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Tb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the build arguments of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-arguments").concat(r)},e.body=function(){},e}return $(e,t),e}(Ym),Lb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the build arguments for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Nb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-arguments/details")},e.body=function(){},e}return $(e,t),e}(Ym),qb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Mb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given build or combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Gb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId","buildId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return $(e,t),e}(Ym),zb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given service build",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","serviceId","buildId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return $(e,t),e}(Qm),$b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/containers").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),Wb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/deployment")},e.body=function(){},e}return $(e,t),e}(Ym),Jb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Vb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/health-checks")},e.body=function(){},e}return $(e,t),e}(Ym),Hb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Zb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/pause")},e.body=function(){},e}return $(e,t),e}(Xm),Yb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/ports")},e.body=function(){},e}return $(e,t),e}(Ym),Kb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the list of ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/ports")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Xb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/pull-requests").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),Qb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restarts the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/restart")},e.body=function(){},e}return $(e,t),e}(Xm),ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),ey=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the runtime environment of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/runtime-environment").concat(r)},e.body=function(){},e}return $(e,t),e}(Ym),ny=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),ry=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/runtime-environment/details")},e.body=function(){},e}return $(e,t),e}(Ym),uy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Scale Service",e.endpointUrl=function(t){return["projectId","serviceId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),oy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of volumes belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes")},e.body=function(){},e}return $(e,t),e}(Ym),iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a volume with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Create",e.endpointUrl=function(t){return["projectId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),sy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Retrieve a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return["projectId","volumeId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId))},e.body=function(){},e}return $(e,t),e}(Ym),ay=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update volume mounts and storage size",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),cy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes this volume and its associated data.",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Delete",e.endpointUrl=function(t){return["projectId","volumeId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId))},e.body=function(){},e}return $(e,t),e}(Qm),dy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId),"/attach")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),ly=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Detach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId),"/detach")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),hy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available project regions",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/regions"},e.body=function(){},e}return $(e,t),e}(Ym),py=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="List the resource tags for this entity.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/tags".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),fy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Add a new resource tag for this entity.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Create",e.endpointUrl=function(t){return"/v1/tags"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),my=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update or create a resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Update",e.endpointUrl=function(t){return["resourceTagId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/tags"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(tv),vy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View details for a given resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Read",e.endpointUrl=function(t){return["resourceTagId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/tags/".concat(encodeURIComponent(t.parameters.resourceTagId))},e.body=function(){},e}return $(e,t),e}(Ym),Ey=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Patch a resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Update",e.endpointUrl=function(t){return["resourceTagId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/tags/".concat(encodeURIComponent(t.parameters.resourceTagId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(ev),Ay=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Delete",e.endpointUrl=function(t){return["resourceTagId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/tags/".concat(encodeURIComponent(t.parameters.resourceTagId))},e.body=function(){},e}return $(e,t),e}(Qm),by=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of templates",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/templates".concat(r)},e.body=function(){},e}return $(e,t),e}(Km),yy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Create",e.endpointUrl=function(t){return"/v1/templates"},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),gy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["templateId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId)).concat(r)},e.body=function(){},e}return $(e,t),e}(Km),Cy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Update",e.endpointUrl=function(t){return["templateId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId))},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Fy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Delete",e.endpointUrl=function(t){return["templateId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId))},e.body=function(){},e}return $(e,t),e}(Qm),wy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Run a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Run",e.endpointUrl=function(t){return["templateId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return $(e,t),e}(Xm),Dy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of template runs",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["templateId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))});var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter(function(t){return void 0!==t[1]}),r=n.length>0?"?".concat(n.map(function(t){return"".concat(t[0],"=").concat(t[1])}).join("&")):"";return"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs").concat(r)},e.body=function(){},e}return $(e,t),e}(Km),By=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){return["templateId","templateRunId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs/").concat(encodeURIComponent(t.parameters.templateRunId))},e.body=function(){},e}return $(e,t),e}(Ym),Iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Abort the given template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > Runs > Abort",e.endpointUrl=function(t){return["templateId","templateRunId"].forEach(function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs/").concat(encodeURIComponent(t.parameters.templateRunId),"/abort")},e.body=function(){},e}return $(e,t),e}(Xm),Ry=function(){function t(){this.loadContext()}return t.prototype.loadContext=function(){this.contextWrapper=this.loadContextWrapper()},t.prototype.getInfo=function(){return""},t.prototype.storeContext=function(t){return J(this,void 0,void 0,function(){return V(this,function(e){switch(e.label){case 0:return[4,this.writeContext(t)];case 1:return e.sent(),this.contextWrapper=t,[2]}})})},t.prototype.addContext=function(t,e){return void 0===e&&(e=!0),J(this,void 0,void 0,function(){var n,r,u;return V(this,function(o){switch(o.label){case 0:if(e||void 0===this.findContext(t.name))return[3,1];throw new Error("Context with name ".concat(t.name," already exists"));case 1:return[4,this.removeContext(t.name)];case 2:o.sent(),o.label=3;case 3:return n=W({host:"https://api.northflank.com"},t),r=this.contextWrapper,u={current:n.name,contexts:H(H([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(u)];case 4:return o.sent(),[2]}})})},t.prototype.removeContext=function(t){return J(this,void 0,void 0,function(){var e,n,r,u;return V(this,function(o){switch(o.label){case 0:return e=this.contextWrapper,n=e.contexts.filter(function(e){return e.name!==t}),r=e.current===t?void 0:e.current,u={current:r,contexts:H([],n,!0),lastUpdateCheck:e.lastUpdateCheck},[4,this.storeContext(u)];case 1:return o.sent(),[2]}})})},t.prototype.getCurrentContext=function(){var t=this.contextWrapper.current;return void 0===t?t:this.findContext(t)},t.prototype.findContext=function(t){return this.contextWrapper.contexts.find(function(e){return e.name===t})},t.prototype.getCurrentBaseUrl=function(t){var e=this.getCurrentContext();if(!0===t&&!(null==e?void 0:e.host))throw new Error("Context (".concat(null==e?void 0:e.name,") doesn't have a target API host. Please login again."));return null==e?void 0:e.host},t.prototype.getCurrentProjectName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.project},t.prototype.getCurrentName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.name},t.prototype.getCurrentToken=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.token},t.prototype.getCurrentServiceName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.service},t.prototype.getCurrentJobName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.job},t.prototype.getCurrentPlanId=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.plan},t.prototype.getCurrentRegion=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.region},t.prototype.useContext=function(t){return J(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:if(!this.findContext(t))throw new Error("Context with name ".concat(t," doesn't exist"));return e=this.contextWrapper,n=W(W({},e),{current:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}})})},t.prototype.updateToken=function(t,e){return J(this,void 0,void 0,function(){var n,r,u,o,i;return V(this,function(s){switch(s.label){case 0:if(n=null!=e?e:this.getCurrentName(),!(r=this.findContext(n)))throw new Error("Context with name ".concat(e," doesn't exist"));return u=this.contextWrapper,o=u.contexts.map(function(e){return e.name===n?W(W({},r),{token:t}):e}),i=W(W({},u),{contexts:o}),[4,this.storeContext(i)];case 1:return s.sent(),[2]}})})},t.prototype.useProjectId=function(t){return J(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set project id to current context, current context not defined");return n=W(W({},e),{project:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}})})},t.prototype.useServiceId=function(t){return J(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set service id to current context, current context not defined");return n=W(W({},e),{service:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}})})},t.prototype.useJobId=function(t){return J(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set job id to current context, current context not defined");return n=W(W({},e),{job:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}})})},t.prototype.usePlanId=function(t){return J(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set plan id to current context, current context not defined");return n=W(W({},e),{plan:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}})})},t.prototype.useRegion=function(t){return J(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set region id to current context, current context not defined");return n=W(W({},e),{region:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}})})},t.prototype.getLastUpdateCheck=function(){return this.contextWrapper.lastUpdateCheck||new Date},t.prototype.setLastUpdateCheck=function(t){return J(this,void 0,void 0,function(){var e,n;return V(this,function(r){switch(r.label){case 0:return e=this.contextWrapper,n=W(W({},e),{lastUpdateCheck:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}})})},t}(),jy=function(t){function e(e){var n=t.call(this)||this;return n.assertDir=function(t){return J(n,void 0,void 0,function(){var e;return V(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),E.existsSync(t)?[3,2]:[4,E.promises.mkdir(t,{recursive:!0})];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:throw e=n.sent(),console.log("Failed to login, local files could not be created: ".concat(t,", error: ").concat(e.message)),e;case 4:return[2]}})})},n.configPath=e||"".concat(p.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return $(e,t),e.prototype.loadContextWrapper=function(){try{return JSON.parse(E.readFileSync(this.configFile,"utf8"))}catch(t){return{contexts:[],lastUpdateCheck:new Date(0)}}},e.prototype.writeContext=function(t){return J(this,void 0,void 0,function(){var e;return V(this,function(n){switch(n.label){case 0:return[4,this.assertConfigDir()];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,E.promises.writeFile(this.configFile,JSON.stringify(t,null,"\t"),{mode:416})];case 3:return n.sent(),[3,5];case 4:throw e=n.sent(),console.log("Failed to persist api context, local files could not be created, error: ".concat(e.message)),e;case 5:return[2]}})})},e.prototype.assertConfigDir=function(){return J(this,void 0,void 0,function(){return V(this,function(t){switch(t.label){case 0:return[4,this.assertDir(this.configPath)];case 1:return t.sent(),[2]}})})},e.prototype.getInfo=function(){return"Cli config stored in: ".concat(this.configPath)},e}(Ry),Sy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},e}return $(e,t),e.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},e.prototype.writeContext=function(t){return J(this,void 0,void 0,function(){return V(this,function(e){return this.inMemoryContextWrapper=t,[2]})})},e}(Ry),_y=function(t,e){void 0===e&&(e={});var n,r,u,o=this;this.baseUrl=function(){return o.contextProvider.getCurrentBaseUrl()},this.contextProvider=t,this.forwarding=new Ka(t,new Cb(t,e),new xE(t,e),e.agent),this.exec=new tc(t,e.agent),this.logs=new sv(t,e),this.metrics=new dv(t),this.fileCopy=new Wm(this.exec),this.endpoints={get:(u={},u.addon=((r=new NE(t,e)).types=new lv(t,e),r.backupSchedules=new GE(t,e),r.backups=new WE(t,e),r.backup=((n=new VE(t,e)).download=new KE(t,e),n.restores=new QE(t,e),n),r.containers=new eA(t,e),r.credentials=new nA(t,e),r.restores=new aA(t,e),r.version=new hA(t,e),r),u.backupDestination=new fv(t,e),u.invoice=function(){var n={};return n.details=new bv(t,e),n}(),u.cloud=function(){var n={};return n.cluster=new wv(t,e),n.integration=new Ov(t,e),n}(),u.dnsId=new Nv(t,e),u.domain=new Gv(t,e),u.domainCertificate=new $v(t,e),u.subdomain=function(){var n=new Vv(t,e);return n.path=new eE(t,e),n}(),u.logSink=new dE(t,e),u.notification=new EE(t,e),u.registryCredentials=new CE(t,e),u.project=new OE(t,e),u.job=function(){var n=new gA(t,e);return n.branches=new FA(t,e),n.builds=new wA(t,e),n.buildArguments=new BA(t,e),n.buildArgumentDetails=new RA(t,e),n.build=new _A(t,e),n.containers=new PA(t,e),n.deployment=new OA(t,e),n.healthChecks=new xA(t,e),n.pullRequests=new NA(t,e),n.runs=new MA(t,e),n.run=new zA(t,e),n.runtimeEnvironment=new WA(t,e),n.runtimeEnvironmentDetails=new VA(t,e),n}(),u.pipeline=new XA(t,e),u.previewTemplate=new QA(t,e),u.previewTemplateRun=new ub(t,e),u.releaseFlow=new ob(t,e),u.releaseFlowRun=new cb(t,e),u.secret=new mb(t,e),u.secretLink=new bb(t,e),u.secretDetails=new gb(t,e),u.service=function(){var n=new Ub(t,e);return n.branches=new Ob(t,e),n.builds=new kb(t,e),n.buildArguments=new Tb(t,e),n.buildArgumentDetails=new Nb(t,e),n.build=new Gb(t,e),n.containers=new $b(t,e),n.deployment=new Wb(t,e),n.healthChecks=new Vb(t,e),n.ports=new Yb(t,e),n.pullRequests=new Xb(t,e),n.runtimeEnvironment=new ey(t,e),n.runtimeEnvironmentDetails=new ry(t,e),n}(),u.volume=new sy(t,e),u.tag=new vy(t,e),u.template=new gy(t,e),u.templateRun=new By(t,e),u),list:function(){var n={};return n.backupDestinations=new hv(t,e),n.backupDestinationsBackups=new Ev(t,e),n.invoices=new Av(t,e),n.cloud=function(){var n={};return n.providers=new yv(t,e),n.clusters=new gv(t,e),n.cluster=function(){var n={};return n.nodes=new Iv(t,e),n}(),n.integrations=new _v(t,e),n.nodeTypes=new Tv(t,e),n.regions=new Lv(t,e),n}(),n.domains=new qv(t,e),n.subdomain=function(){var n={};return n.path=new tE(t,e),n}(),n.logSinks=new aE(t,e),n.notifications=new mE(t,e),n.registryCredentials=new yE(t,e),n.vcs=new DE(t,e),n.repos=new IE(t,e),n.branches=new RE(t,e),n.plans=new jE(t,e),n.projects=new SE(t,e),n.addons=new xE(t,e),n.jobs=new fA(t,e),n.pipelines=new KA(t,e),n.previewTemplatePreviews=new eb(t,e),n.previewTemplateRuns=new rb(t,e),n.releaseFlowRuns=new ab(t,e),n.secrets=new lb(t,e),n.services=new Cb(t,e),n.volumes=new oy(t,e),n.regions=new hy(t,e),n.tags=new py(t,e),n.templates=new by(t,e),n.templateRuns=new Dy(t,e),n}(),add:function(){var n={};return n.backupDestination=new pv(t,e),n.domain=function(){var n={};return n.subdomain=new Jv(t,e),n}(),n.subdomain=function(){var n={};return n.path=new Qv(t,e),n}(),n.registryCredentials=new gE(t,e),n.tag=new fy(t,e),n}(),patch:function(){var n={};return n.backupDestination=new mv(t,e),n.cloud=function(){var n={};return n.cluster=new Dv(t,e),n.integration=new kv(t,e),n}(),n.project=new PE(t,e),n.addon=new qE(t,e),n.job=function(){var n={};return n.cron=new EA(t,e),n.manual=new yA(t,e),n}(),n.secret=new fb(t,e),n.service=function(){var n={};return n.build=new Db(t,e),n.combined=new Rb(t,e),n.deployment=new _b(t,e),n}(),n.tag=new Ey(t,e),n}(),delete:function(){var n={};return n.backupDestination=new vv(t,e),n.cloud=function(){var n={};return n.cluster=new Bv(t,e),n.integration=new xv(t,e),n}(),n.domain=new zv(t,e),n.subdomain=function(){var n=new Hv(t,e);return n.path=new nE(t,e),n}(),n.logSink=new lE(t,e),n.notification=new bE(t,e),n.registryCredentials=new wE(t,e),n.project=new kE(t,e),n.addon=function(){var n=new ME(t,e);return n.backupSchedule=new $E(t,e),n}(),n.backup=new HE(t,e),n.job=new CA(t,e),n.previewTemplatePreview=new nb(t,e),n.secret=new vb(t,e),n.secretLink=new yb(t,e),n.service=new Pb(t,e),n.volume=new cy(t,e),n.tag=new Ay(t,e),n.template=new Fy(t,e),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Cv(t,e),n.integration=new Uv(t,e),n}(),n.domain=new Mv(t,e),n.logSink=new cE(t,e),n.notification=new vE(t,e),n.customVcs=function(){var n={};return n.token=new BE(t,e),n}(),n.project=new _E(t,e),n.addon=function(){var n=new TE(t,e);return n.backupSchedule=new zE(t,e),n}(),n.job=function(){var n={};return n.cron=new mA(t,e),n.manual=new AA(t,e),n}(),n.secret=new hb(t,e),n.service=function(){var n={};return n.build=new Fb(t,e),n.combined=new Bb(t,e),n.deployment=new jb(t,e),n}(),n.volume=new iy(t,e),n.template=new yy(t,e),n}(),put:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Fv(t,e),n.integration=new Pv(t,e),n}(),n.project=new UE(t,e),n.addon=new LE(t,e),n.job=function(){var n={};return n.cron=new vA(t,e),n.manual=new bA(t,e),n}(),n.secret=new pb(t,e),n.service=function(){var n={};return n.build=new wb(t,e),n.combined=new Ib(t,e),n.deployment=new Sb(t,e),n}(),n.tag=new my(t,e),n}(),cordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Rv(t,e),n}(),n}(),n}(),drain:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new jv(t,e),n}(),n}(),n}(),uncordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Sv(t,e),n}(),n}(),n}(),import:function(){var n={};return n.domainCertificate=new Wv(t,e),n.addon=function(){var n={};return n.backup=new rA(t,e),n}(),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new Zv(t,e),n.path=new uE(t,e),n}(),n}(),unassign:function(){var n={};return n.subdomain=function(){var n=new Yv(t,e);return n.path=new oE(t,e),n}(),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Kv(t,e),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Xv(t,e),n}(),n}(),update:function(){var n={};return n.subdomain=function(){var n={};return n.path=new rE(t,e),n}(),n.logSink=new fE(t,e),n.notification=new AE(t,e),n.registryCredentials=new FE(t,e),n.addon=function(){var n={};return n.networkSettings=new uA(t,e),n.security=new lA(t,e),n.version=new pA(t,e),n}(),n.job=function(){var n={};return n.buildArguments=new IA(t,e),n.buildOptions=new jA(t,e),n.buildSource=new SA(t,e),n.deployment=new kA(t,e),n.healthChecks=new TA(t,e),n.runtimeEnvironment=new JA(t,e),n.settings=new ZA(t,e),n}(),n.previewTemplate=new tb(t,e),n.releaseFlow=new ib(t,e),n.secret=new Eb(t,e),n.secretLink=new Ab(t,e),n.service=function(){var n={};return n.buildArguments=new Lb(t,e),n.buildOptions=new qb(t,e),n.buildSource=new Mb(t,e),n.deployment=new Jb(t,e),n.healthChecks=new Hb(t,e),n.ports=new Kb(t,e),n.runtimeEnvironment=new ny(t,e),n}(),n.volume=new ay(t,e),n.template=new Cy(t,e),n}(),verify:function(){var n={};return n.subdomain=new iE(t,e),n.domain=new sE(t,e),n}(),pause:function(){var n={};return n.logSink=new hE(t,e),n.addon=new oA(t,e),n.job=new LA(t,e),n.service=new Zb(t,e),n}(),resume:function(){var n={};return n.logSink=new pE(t,e),n.addon=new cA(t,e),n.job=new qA(t,e),n.service=new ty(t,e),n}(),backup:function(){var n={};return n.addon=new JE(t,e),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new ZE(t,e),n.restore=new YE(t,e),n}(),n.job=function(){var n={};return n.build=new UA(t,e),n.run=new $A(t,e),n}(),n.releaseFlowRun=new db(t,e),n.service=function(){var n={};return n.build=new zb(t,e),n}(),n.templateRun=new Iy(t,e),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new XE(t,e),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new tA(t,e),n}(),n}(),reset:function(){var n={};return n.addon=new iA(t,e),n}(),restart:function(){var n={};return n.addon=new sA(t,e),n.service=new Qb(t,e),n}(),scale:function(){var n={};return n.addon=new dA(t,e),n.job=new HA(t,e),n.service=new uy(t,e),n}(),start:function(){var n={};return n.job=function(){var n={};return n.build=new DA(t,e),n.run=new GA(t,e),n}(),n.service=function(){var n={};return n.build=new xb(t,e),n}(),n}(),suspend:function(){var n={};return n.job=new YA(t,e),n}(),run:function(){var n={};return n.releaseFlow=new sb(t,e),n.template=new wy(t,e),n}(),attach:function(){var n={};return n.volume=new dy(t,e),n}(),detach:function(){var n={};return n.volume=new ly(t,e),n}(),download:function(){var t={};return t.service=function(){var t={};return t.files=o.fileCopy.downloadServiceFiles.bind(o.fileCopy),t}(),t.job=function(){var t={};return t.files=o.fileCopy.downloadJobFiles.bind(o.fileCopy),t}(),t}(),upload:function(){var t={};return t.service=function(){var t={};return t.files=o.fileCopy.uploadServiceFiles.bind(o.fileCopy),t}(),t.job=function(){var t={};return t.files=o.fileCopy.uploadJobFiles.bind(o.fileCopy),t}(),t}()},this.download=function(){var t={};return t.service=function(){var t={};return t.files=o.endpoints.download.service.files,t}(),t.job=function(){var t={};return t.files=o.endpoints.download.job.files,t}(),t}(),this.upload=function(){var t={};return t.service=function(){var t={};return t.files=o.endpoints.upload.service.files,t}(),t.job=function(){var t={};return t.files=o.endpoints.upload.job.files,t}(),t}(),this.get=function(){var t={};return t.addon=function(){var t=o.endpoints.get.addon.call;return t.types=o.endpoints.get.addon.types.call,t.backupSchedules=function(){var t=o.endpoints.get.addon.backupSchedules.call;return t.all=o.endpoints.get.addon.backupSchedules.all,t}(),t.backups=function(){var t=o.endpoints.get.addon.backups.call;return t.all=o.endpoints.get.addon.backups.all,t}(),t.backup=function(){var t=o.endpoints.get.addon.backup.call;return t.download=o.endpoints.get.addon.backup.download.call,t.restores=function(){var t=o.endpoints.get.addon.backup.restores.call;return t.all=o.endpoints.get.addon.backup.restores.all,t}(),t.logs=o.logs.getAddonBackupLogs,t.logTail=o.logs.tailAddonBackupLogs,t}(),t.containers=function(){var t=o.endpoints.get.addon.containers.call;return t.all=o.endpoints.get.addon.containers.all,t}(),t.credentials=o.endpoints.get.addon.credentials.call,t.restores=function(){var t=function(){var t=o.endpoints.get.addon.restores.call;return t.all=o.endpoints.get.addon.restores.all,t}();return t.logs=o.logs.getAddonRestoresLogs,t.logTail=o.logs.tailAddonRestoresLogs,t}(),t.version=o.endpoints.get.addon.version.call,t.logs=o.logs.getAddonLogs,t.logTail=o.logs.tailAddonLogs,t.metrics=o.metrics.getAddonMetrics,t.metricsRange=o.metrics.getAddonMetricsRange,t}(),t.backupDestination=o.endpoints.get.backupDestination.call,t.invoice=function(){var t={};return t.details=o.endpoints.get.invoice.details.call,t}(),t.cloud=function(){var t={};return t.cluster=o.endpoints.get.cloud.cluster.call,t.integration=o.endpoints.get.cloud.integration.call,t}(),t.dnsId=o.endpoints.get.dnsId.call,t.domain=o.endpoints.get.domain.call,t.domainCertificate=o.endpoints.get.domainCertificate.call,t.subdomain=function(){var t=o.endpoints.get.subdomain.call;return t.path=o.endpoints.get.subdomain.path.call,t}(),t.logSink=o.endpoints.get.logSink.call,t.notification=o.endpoints.get.notification.call,t.registryCredentials=o.endpoints.get.registryCredentials.call,t.project=o.endpoints.get.project.call,t.job=function(){var t=o.endpoints.get.job.call;return t.branches=function(){var t=o.endpoints.get.job.branches.call;return t.all=o.endpoints.get.job.branches.all,t}(),t.builds=function(){var t=o.endpoints.get.job.builds.call;return t.all=o.endpoints.get.job.builds.all,t}(),t.buildArguments=o.endpoints.get.job.buildArguments.call,t.buildArgumentDetails=o.endpoints.get.job.buildArgumentDetails.call,t.build=o.endpoints.get.job.build.call,t.containers=function(){var t=o.endpoints.get.job.containers.call;return t.all=o.endpoints.get.job.containers.all,t}(),t.deployment=o.endpoints.get.job.deployment.call,t.healthChecks=o.endpoints.get.job.healthChecks.call,t.pullRequests=function(){var t=o.endpoints.get.job.pullRequests.call;return t.all=o.endpoints.get.job.pullRequests.all,t}(),t.runs=function(){var t=o.endpoints.get.job.runs.call;return t.all=o.endpoints.get.job.runs.all,t}(),t.run=o.endpoints.get.job.run.call,t.runtimeEnvironment=o.endpoints.get.job.runtimeEnvironment.call,t.runtimeEnvironmentDetails=o.endpoints.get.job.runtimeEnvironmentDetails.call,t.logs=o.logs.getJobLogs,t.buildLogs=o.logs.getJobBuildLogs,t.logTail=o.logs.tailJobLogs,t.buildLogTail=o.logs.tailJobBuildLogs,t.metrics=o.metrics.getJobMetrics,t.buildMetrics=o.metrics.getJobBuildMetrics,t.metricsRange=o.metrics.getJobMetricsRange,t.buildMetricsRange=o.metrics.getJobBuildMetricsRange,t}(),t.pipeline=o.endpoints.get.pipeline.call,t.previewTemplate=function(){var t=o.endpoints.get.previewTemplate.call;return t.all=o.endpoints.get.previewTemplate.all,t}(),t.previewTemplateRun=o.endpoints.get.previewTemplateRun.call,t.releaseFlow=o.endpoints.get.releaseFlow.call,t.releaseFlowRun=o.endpoints.get.releaseFlowRun.call,t.secret=o.endpoints.get.secret.call,t.secretLink=o.endpoints.get.secretLink.call,t.secretDetails=o.endpoints.get.secretDetails.call,t.service=function(){var t=o.endpoints.get.service.call;return t.branches=function(){var t=o.endpoints.get.service.branches.call;return t.all=o.endpoints.get.service.branches.all,t}(),t.builds=function(){var t=o.endpoints.get.service.builds.call;return t.all=o.endpoints.get.service.builds.all,t}(),t.buildArguments=o.endpoints.get.service.buildArguments.call,t.buildArgumentDetails=o.endpoints.get.service.buildArgumentDetails.call,t.build=o.endpoints.get.service.build.call,t.containers=function(){var t=o.endpoints.get.service.containers.call;return t.all=o.endpoints.get.service.containers.all,t}(),t.deployment=o.endpoints.get.service.deployment.call,t.healthChecks=o.endpoints.get.service.healthChecks.call,t.ports=o.endpoints.get.service.ports.call,t.pullRequests=function(){var t=o.endpoints.get.service.pullRequests.call;return t.all=o.endpoints.get.service.pullRequests.all,t}(),t.runtimeEnvironment=o.endpoints.get.service.runtimeEnvironment.call,t.runtimeEnvironmentDetails=o.endpoints.get.service.runtimeEnvironmentDetails.call,t.logs=o.logs.getServiceLogs,t.buildLogs=o.logs.getServiceBuildLogs,t.logTail=o.logs.tailServiceLogs,t.buildLogTail=o.logs.tailServiceBuildLogs,t.metrics=o.metrics.getServiceMetrics,t.buildMetrics=o.metrics.getServiceBuildMetrics,t.metricsRange=o.metrics.getServiceMetricsRange,t.buildMetricsRange=o.metrics.getServiceBuildMetricsRange,t}(),t.volume=o.endpoints.get.volume.call,t.tag=o.endpoints.get.tag.call,t.template=function(){var t=o.endpoints.get.template.call;return t.all=o.endpoints.get.template.all,t}(),t.templateRun=o.endpoints.get.templateRun.call,t}(),this.list=function(){var t={};return t.backupDestinations=function(){var t=o.endpoints.list.backupDestinations.call;return t.all=o.endpoints.list.backupDestinations.all,t}(),t.backupDestinationsBackups=function(){var t=o.endpoints.list.backupDestinationsBackups.call;return t.all=o.endpoints.list.backupDestinationsBackups.all,t}(),t.invoices=function(){var t=o.endpoints.list.invoices.call;return t.all=o.endpoints.list.invoices.all,t}(),t.cloud=function(){var t={};return t.providers=o.endpoints.list.cloud.providers.call,t.clusters=function(){var t=o.endpoints.list.cloud.clusters.call;return t.all=o.endpoints.list.cloud.clusters.all,t}(),t.cluster=function(){var t={};return t.nodes=function(){var t=o.endpoints.list.cloud.cluster.nodes.call;return t.all=o.endpoints.list.cloud.cluster.nodes.all,t}(),t}(),t.integrations=function(){var t=o.endpoints.list.cloud.integrations.call;return t.all=o.endpoints.list.cloud.integrations.all,t}(),t.nodeTypes=function(){var t=o.endpoints.list.cloud.nodeTypes.call;return t.all=o.endpoints.list.cloud.nodeTypes.all,t}(),t.regions=function(){var t=o.endpoints.list.cloud.regions.call;return t.all=o.endpoints.list.cloud.regions.all,t}(),t}(),t.domains=function(){var t=o.endpoints.list.domains.call;return t.all=o.endpoints.list.domains.all,t}(),t.subdomain=function(){var t={};return t.path=o.endpoints.list.subdomain.path.call,t}(),t.logSinks=function(){var t=o.endpoints.list.logSinks.call;return t.all=o.endpoints.list.logSinks.all,t}(),t.notifications=function(){var t=o.endpoints.list.notifications.call;return t.all=o.endpoints.list.notifications.all,t}(),t.registryCredentials=function(){var t=o.endpoints.list.registryCredentials.call;return t.all=o.endpoints.list.registryCredentials.all,t}(),t.vcs=o.endpoints.list.vcs.call,t.repos=function(){var t=o.endpoints.list.repos.call;return t.all=o.endpoints.list.repos.all,t}(),t.branches=function(){var t=o.endpoints.list.branches.call;return t.all=o.endpoints.list.branches.all,t}(),t.plans=o.endpoints.list.plans.call,t.projects=function(){var t=o.endpoints.list.projects.call;return t.all=o.endpoints.list.projects.all,t}(),t.addons=function(){var t=o.endpoints.list.addons.call;return t.all=o.endpoints.list.addons.all,t}(),t.jobs=function(){var t=o.endpoints.list.jobs.call;return t.all=o.endpoints.list.jobs.all,t}(),t.pipelines=function(){var t=o.endpoints.list.pipelines.call;return t.all=o.endpoints.list.pipelines.all,t}(),t.previewTemplatePreviews=function(){var t=o.endpoints.list.previewTemplatePreviews.call;return t.all=o.endpoints.list.previewTemplatePreviews.all,t}(),t.previewTemplateRuns=function(){var t=o.endpoints.list.previewTemplateRuns.call;return t.all=o.endpoints.list.previewTemplateRuns.all,t}(),t.releaseFlowRuns=function(){var t=o.endpoints.list.releaseFlowRuns.call;return t.all=o.endpoints.list.releaseFlowRuns.all,t}(),t.secrets=function(){var t=o.endpoints.list.secrets.call;return t.all=o.endpoints.list.secrets.all,t}(),t.services=function(){var t=o.endpoints.list.services.call;return t.all=o.endpoints.list.services.all,t}(),t.volumes=o.endpoints.list.volumes.call,t.regions=o.endpoints.list.regions.call,t.tags=function(){var t=o.endpoints.list.tags.call;return t.all=o.endpoints.list.tags.all,t}(),t.templates=function(){var t=o.endpoints.list.templates.call;return t.all=o.endpoints.list.templates.all,t}(),t.templateRuns=function(){var t=o.endpoints.list.templateRuns.call;return t.all=o.endpoints.list.templateRuns.all,t}(),t}(),this.add=function(){var t={};return t.backupDestination=o.endpoints.add.backupDestination.call,t.domain=function(){var t={};return t.subdomain=o.endpoints.add.domain.subdomain.call,t}(),t.subdomain=function(){var t={};return t.path=o.endpoints.add.subdomain.path.call,t}(),t.registryCredentials=o.endpoints.add.registryCredentials.call,t.tag=o.endpoints.add.tag.call,t}(),this.patch=function(){var t={};return t.backupDestination=o.endpoints.patch.backupDestination.call,t.cloud=function(){var t={};return t.cluster=o.endpoints.patch.cloud.cluster.call,t.integration=o.endpoints.patch.cloud.integration.call,t}(),t.project=o.endpoints.patch.project.call,t.addon=o.endpoints.patch.addon.call,t.job=function(){var t={};return t.cron=o.endpoints.patch.job.cron.call,t.manual=o.endpoints.patch.job.manual.call,t}(),t.secret=o.endpoints.patch.secret.call,t.service=function(){var t={};return t.build=o.endpoints.patch.service.build.call,t.combined=o.endpoints.patch.service.combined.call,t.deployment=o.endpoints.patch.service.deployment.call,t}(),t.tag=o.endpoints.patch.tag.call,t}(),this.delete=function(){var t={};return t.backupDestination=o.endpoints.delete.backupDestination.call,t.cloud=function(){var t={};return t.cluster=o.endpoints.delete.cloud.cluster.call,t.integration=o.endpoints.delete.cloud.integration.call,t}(),t.domain=o.endpoints.delete.domain.call,t.subdomain=function(){var t=o.endpoints.delete.subdomain.call;return t.path=o.endpoints.delete.subdomain.path.call,t}(),t.logSink=o.endpoints.delete.logSink.call,t.notification=o.endpoints.delete.notification.call,t.registryCredentials=o.endpoints.delete.registryCredentials.call,t.project=o.endpoints.delete.project.call,t.addon=function(){var t=o.endpoints.delete.addon.call;return t.backupSchedule=o.endpoints.delete.addon.backupSchedule.call,t}(),t.backup=o.endpoints.delete.backup.call,t.job=o.endpoints.delete.job.call,t.previewTemplatePreview=o.endpoints.delete.previewTemplatePreview.call,t.secret=o.endpoints.delete.secret.call,t.secretLink=o.endpoints.delete.secretLink.call,t.service=o.endpoints.delete.service.call,t.volume=o.endpoints.delete.volume.call,t.tag=o.endpoints.delete.tag.call,t.template=o.endpoints.delete.template.call,t}(),this.create=function(){var t={};return t.cloud=function(){var t={};return t.cluster=o.endpoints.create.cloud.cluster.call,t.integration=o.endpoints.create.cloud.integration.call,t}(),t.domain=o.endpoints.create.domain.call,t.logSink=o.endpoints.create.logSink.call,t.notification=o.endpoints.create.notification.call,t.customVcs=function(){var t={};return t.token=o.endpoints.create.customVcs.token.call,t}(),t.project=o.endpoints.create.project.call,t.addon=function(){var t=o.endpoints.create.addon.call;return t.backupSchedule=o.endpoints.create.addon.backupSchedule.call,t}(),t.job=function(){var t={};return t.cron=o.endpoints.create.job.cron.call,t.manual=o.endpoints.create.job.manual.call,t}(),t.secret=o.endpoints.create.secret.call,t.service=function(){var t={};return t.build=o.endpoints.create.service.build.call,t.combined=o.endpoints.create.service.combined.call,t.deployment=o.endpoints.create.service.deployment.call,t}(),t.volume=o.endpoints.create.volume.call,t.template=o.endpoints.create.template.call,t}(),this.put=function(){var t={};return t.cloud=function(){var t={};return t.cluster=o.endpoints.put.cloud.cluster.call,t.integration=o.endpoints.put.cloud.integration.call,t}(),t.project=o.endpoints.put.project.call,t.addon=o.endpoints.put.addon.call,t.job=function(){var t={};return t.cron=o.endpoints.put.job.cron.call,t.manual=o.endpoints.put.job.manual.call,t}(),t.secret=o.endpoints.put.secret.call,t.service=function(){var t={};return t.build=o.endpoints.put.service.build.call,t.combined=o.endpoints.put.service.combined.call,t.deployment=o.endpoints.put.service.deployment.call,t}(),t.tag=o.endpoints.put.tag.call,t}(),this.cordon=function(){var t={};return t.cloud=function(){var t={};return t.cluster=function(){var t={};return t.node=o.endpoints.cordon.cloud.cluster.node.call,t}(),t}(),t}(),this.drain=function(){var t={};return t.cloud=function(){var t={};return t.cluster=function(){var t={};return t.node=o.endpoints.drain.cloud.cluster.node.call,t}(),t}(),t}(),this.uncordon=function(){var t={};return t.cloud=function(){var t={};return t.cluster=function(){var t={};return t.node=o.endpoints.uncordon.cloud.cluster.node.call,t}(),t}(),t}(),this.import=function(){var t={};return t.domainCertificate=o.endpoints.import.domainCertificate.call,t.addon=function(){var t={};return t.backup=o.endpoints.import.addon.backup.call,t}(),t}(),this.assign=function(){var t={};return t.subdomain=function(){var t={};return t.service=o.endpoints.assign.subdomain.service.call,t.path=o.endpoints.assign.subdomain.path.call,t}(),t}(),this.unassign=function(){var t={};return t.subdomain=function(){var t=o.endpoints.unassign.subdomain.call;return t.path=o.endpoints.unassign.subdomain.path.call,t}(),t}(),this.disable=function(){var t={};return t.subdomain=function(){var t={};return t.cdn=o.endpoints.disable.subdomain.cdn.call,t}(),t}(),this.enable=function(){var t={};return t.subdomain=function(){var t={};return t.cdn=o.endpoints.enable.subdomain.cdn.call,t}(),t}(),this.update=function(){var t={};return t.subdomain=function(){var t={};return t.path=o.endpoints.update.subdomain.path.call,t}(),t.logSink=o.endpoints.update.logSink.call,t.notification=o.endpoints.update.notification.call,t.registryCredentials=o.endpoints.update.registryCredentials.call,t.addon=function(){var t={};return t.networkSettings=o.endpoints.update.addon.networkSettings.call,t.security=o.endpoints.update.addon.security.call,t.version=o.endpoints.update.addon.version.call,t}(),t.job=function(){var t={};return t.buildArguments=o.endpoints.update.job.buildArguments.call,t.buildOptions=o.endpoints.update.job.buildOptions.call,t.buildSource=o.endpoints.update.job.buildSource.call,t.deployment=o.endpoints.update.job.deployment.call,t.healthChecks=o.endpoints.update.job.healthChecks.call,t.runtimeEnvironment=o.endpoints.update.job.runtimeEnvironment.call,t.settings=o.endpoints.update.job.settings.call,t}(),t.previewTemplate=o.endpoints.update.previewTemplate.call,t.releaseFlow=o.endpoints.update.releaseFlow.call,t.secret=o.endpoints.update.secret.call,t.secretLink=o.endpoints.update.secretLink.call,t.service=function(){var t={};return t.buildArguments=o.endpoints.update.service.buildArguments.call,t.buildOptions=o.endpoints.update.service.buildOptions.call,t.buildSource=o.endpoints.update.service.buildSource.call,t.deployment=o.endpoints.update.service.deployment.call,t.healthChecks=o.endpoints.update.service.healthChecks.call,t.ports=o.endpoints.update.service.ports.call,t.runtimeEnvironment=o.endpoints.update.service.runtimeEnvironment.call,t}(),t.volume=o.endpoints.update.volume.call,t.template=o.endpoints.update.template.call,t}(),this.verify=function(){var t={};return t.subdomain=o.endpoints.verify.subdomain.call,t.domain=o.endpoints.verify.domain.call,t}(),this.pause=function(){var t={};return t.logSink=o.endpoints.pause.logSink.call,t.addon=o.endpoints.pause.addon.call,t.job=o.endpoints.pause.job.call,t.service=o.endpoints.pause.service.call,t}(),this.resume=function(){var t={};return t.logSink=o.endpoints.resume.logSink.call,t.addon=o.endpoints.resume.addon.call,t.job=o.endpoints.resume.job.call,t.service=o.endpoints.resume.service.call,t}(),this.backup=function(){var t={};return t.addon=o.endpoints.backup.addon.call,t}(),this.abort=function(){var t={};return t.addon=function(){var t={};return t.backup=o.endpoints.abort.addon.backup.call,t.restore=o.endpoints.abort.addon.restore.call,t}(),t.job=function(){var t={};return t.build=o.endpoints.abort.job.build.call,t.run=o.endpoints.abort.job.run.call,t}(),t.releaseFlowRun=o.endpoints.abort.releaseFlowRun.call,t.service=function(){var t={};return t.build=o.endpoints.abort.service.build.call,t}(),t.templateRun=o.endpoints.abort.templateRun.call,t}(),this.restore=function(){var t={};return t.addon=function(){var t={};return t.backup=o.endpoints.restore.addon.backup.call,t}(),t}(),this.retain=function(){var t={};return t.addon=function(){var t={};return t.backup=o.endpoints.retain.addon.backup.call,t}(),t}(),this.reset=function(){var t={};return t.addon=o.endpoints.reset.addon.call,t}(),this.restart=function(){var t={};return t.addon=o.endpoints.restart.addon.call,t.service=o.endpoints.restart.service.call,t}(),this.scale=function(){var t={};return t.addon=o.endpoints.scale.addon.call,t.job=o.endpoints.scale.job.call,t.service=o.endpoints.scale.service.call,t}(),this.start=function(){var t={};return t.job=function(){var t={};return t.build=o.endpoints.start.job.build.call,t.run=o.endpoints.start.job.run.call,t}(),t.service=function(){var t={};return t.build=o.endpoints.start.service.build.call,t}(),t}(),this.suspend=function(){var t={};return t.job=o.endpoints.suspend.job.call,t}(),this.run=function(){var t={};return t.releaseFlow=o.endpoints.run.releaseFlow.call,t.template=o.endpoints.run.template.call,t}(),this.attach=function(){var t={};return t.volume=o.endpoints.attach.volume.call,t}(),this.detach=function(){var t={};return t.volume=o.endpoints.detach.volume.call,t}()};export{ZE as AbortAddonBackupEndpoint,YE as AbortAddonRestoreEndpoint,UA as AbortJobBuildEndpoint,$A as AbortJobRunEndpoint,db as AbortReleaseflowrunEndpoint,zb as AbortServiceBuildEndpoint,Iy as AbortTemplaterunEndpoint,pv as AddBackupdestinationEndpoint,Jv as AddDomainSubdomainEndpoint,gE as AddRegistrycredentialsEndpoint,Qv as AddSubdomainPathEndpoint,fy as AddTagEndpoint,_y as ApiClient,Ry as ApiClientContextProvider,jy as ApiClientFileContextProvider,Sy as ApiClientInMemoryContextProvider,Zm as ApiEndpoint,uE as AssignSubdomainPathEndpoint,Zv as AssignSubdomainServiceEndpoint,dy as AttachVolumeEndpoint,JE as BackupAddonEndpoint,Gm as CopyType,Rv as CordonCloudClusterNodeEndpoint,zE as CreateAddonBackupscheduleEndpoint,TE as CreateAddonEndpoint,Cv as CreateCloudClusterEndpoint,Uv as CreateCloudIntegrationEndpoint,BE as CreateCustomvcsTokenEndpoint,Mv as CreateDomainEndpoint,mA as CreateJobCronEndpoint,AA as CreateJobManualEndpoint,cE as CreateLogsinkEndpoint,vE as CreateNotificationEndpoint,_E as CreateProjectEndpoint,hb as CreateSecretEndpoint,Fb as CreateServiceBuildEndpoint,Bb as CreateServiceCombinedEndpoint,jb as CreateServiceDeploymentEndpoint,yy as CreateTemplateEndpoint,iy as CreateVolumeEndpoint,$E as DeleteAddonBackupscheduleEndpoint,ME as DeleteAddonEndpoint,Qm as DeleteApiEndpoint,HE as DeleteBackupEndpoint,vv as DeleteBackupdestinationEndpoint,Bv as DeleteCloudClusterEndpoint,xv as DeleteCloudIntegrationEndpoint,zv as DeleteDomainEndpoint,CA as DeleteJobEndpoint,lE as DeleteLogsinkEndpoint,bE as DeleteNotificationEndpoint,nb as DeletePreviewtemplatepreviewEndpoint,kE as DeleteProjectEndpoint,wE as DeleteRegistrycredentialsEndpoint,vb as DeleteSecretEndpoint,yb as DeleteSecretlinkEndpoint,Pb as DeleteServiceEndpoint,Hv as DeleteSubdomainEndpoint,nE as DeleteSubdomainPathEndpoint,Ay as DeleteTagEndpoint,Fy as DeleteTemplateEndpoint,cy as DeleteVolumeEndpoint,ly as DetachVolumeEndpoint,Kv as DisableSubdomainCdnEndpoint,jv as DrainCloudClusterNodeEndpoint,Xv as EnableSubdomainCdnEndpoint,Qa as ExecCommandStandard,KE as GetAddonBackupDownloadEndpoint,VE as GetAddonBackupEndpoint,QE as GetAddonBackupRestoresEndpoint,WE as GetAddonBackupsEndpoint,GE as GetAddonBackupschedulesEndpoint,eA as GetAddonContainersEndpoint,nA as GetAddonCredentialsEndpoint,NE as GetAddonEndpoint,aA as GetAddonRestoresEndpoint,lv as GetAddonTypesEndpoint,hA as GetAddonVersionEndpoint,Ym as GetApiEndpoint,Km as GetApiEndpointPaginated,fv as GetBackupdestinationEndpoint,wv as GetCloudClusterEndpoint,Ov as GetCloudIntegrationEndpoint,Nv as GetDnsidEndpoint,Gv as GetDomainEndpoint,$v as GetDomaincertificateEndpoint,bv as GetInvoiceDetailsEndpoint,FA as GetJobBranchesEndpoint,_A as GetJobBuildEndpoint,RA as GetJobBuildargumentdetailsEndpoint,BA as GetJobBuildargumentsEndpoint,wA as GetJobBuildsEndpoint,PA as GetJobContainersEndpoint,OA as GetJobDeploymentEndpoint,gA as GetJobEndpoint,xA as GetJobHealthchecksEndpoint,NA as GetJobPullrequestsEndpoint,zA as GetJobRunEndpoint,MA as GetJobRunsEndpoint,WA as GetJobRuntimeenvironmentEndpoint,VA as GetJobRuntimeenvironmentdetailsEndpoint,dE as GetLogsinkEndpoint,EE as GetNotificationEndpoint,XA as GetPipelineEndpoint,QA as GetPreviewtemplateEndpoint,ub as GetPreviewtemplaterunEndpoint,OE as GetProjectEndpoint,CE as GetRegistrycredentialsEndpoint,ob as GetReleaseflowEndpoint,cb as GetReleaseflowrunEndpoint,mb as GetSecretEndpoint,gb as GetSecretdetailsEndpoint,bb as GetSecretlinkEndpoint,Ob as GetServiceBranchesEndpoint,Gb as GetServiceBuildEndpoint,Nb as GetServiceBuildargumentdetailsEndpoint,Tb as GetServiceBuildargumentsEndpoint,kb as GetServiceBuildsEndpoint,$b as GetServiceContainersEndpoint,Wb as GetServiceDeploymentEndpoint,Ub as GetServiceEndpoint,Vb as GetServiceHealthchecksEndpoint,Yb as GetServicePortsEndpoint,Xb as GetServicePullrequestsEndpoint,ey as GetServiceRuntimeenvironmentEndpoint,ry as GetServiceRuntimeenvironmentdetailsEndpoint,Vv as GetSubdomainEndpoint,eE as GetSubdomainPathEndpoint,vy as GetTagEndpoint,gy as GetTemplateEndpoint,By as GetTemplaterunEndpoint,sy as GetVolumeEndpoint,rA as ImportAddonBackupEndpoint,Wv as ImportDomaincertificateEndpoint,xE as ListAddonsEndpoint,hv as ListBackupdestinationsEndpoint,Ev as ListBackupdestinationsbackupsEndpoint,RE as ListBranchesEndpoint,Iv as ListCloudClusterNodesEndpoint,gv as ListCloudClustersEndpoint,_v as ListCloudIntegrationsEndpoint,Tv as ListCloudNodetypesEndpoint,yv as ListCloudProvidersEndpoint,Lv as ListCloudRegionsEndpoint,qv as ListDomainsEndpoint,Av as ListInvoicesEndpoint,fA as ListJobsEndpoint,aE as ListLogsinksEndpoint,mE as ListNotificationsEndpoint,KA as ListPipelinesEndpoint,jE as ListPlansEndpoint,eb as ListPreviewtemplatepreviewsEndpoint,rb as ListPreviewtemplaterunsEndpoint,SE as ListProjectsEndpoint,hy as ListRegionsEndpoint,yE as ListRegistrycredentialsEndpoint,ab as ListReleaseflowrunsEndpoint,IE as ListReposEndpoint,lb as ListSecretsEndpoint,Cb as ListServicesEndpoint,tE as ListSubdomainPathEndpoint,py as ListTagsEndpoint,Dy as ListTemplaterunsEndpoint,by as ListTemplatesEndpoint,DE as ListVcsEndpoint,oy as ListVolumesEndpoint,$m as LogType,ov as MetricType,Jm as NorthflankApiCallError,tc as NorthflankExecCommand,Wm as NorthflankFileCopy,sv as NorthflankLogFetch,dv as NorthflankMetricFetch,Ka as NorthflankPortForwarder,qE as PatchAddonEndpoint,ev as PatchApiEndpoint,mv as PatchBackupdestinationEndpoint,Dv as PatchCloudClusterEndpoint,kv as PatchCloudIntegrationEndpoint,EA as PatchJobCronEndpoint,yA as PatchJobManualEndpoint,PE as PatchProjectEndpoint,fb as PatchSecretEndpoint,Db as PatchServiceBuildEndpoint,Rb as PatchServiceCombinedEndpoint,_b as PatchServiceDeploymentEndpoint,Ey as PatchTagEndpoint,oA as PauseAddonEndpoint,LA as PauseJobEndpoint,hE as PauseLogsinkEndpoint,Zb as PauseServiceEndpoint,Xm as PostApiEndpoint,LE as PutAddonEndpoint,tv as PutApiEndpoint,Fv as PutCloudClusterEndpoint,Pv as PutCloudIntegrationEndpoint,vA as PutJobCronEndpoint,bA as PutJobManualEndpoint,UE as PutProjectEndpoint,pb as PutSecretEndpoint,wb as PutServiceBuildEndpoint,Ib as PutServiceCombinedEndpoint,Sb as PutServiceDeploymentEndpoint,my as PutTagEndpoint,iA as ResetAddonEndpoint,sA as RestartAddonEndpoint,Qb as RestartServiceEndpoint,XE as RestoreAddonBackupEndpoint,cA as ResumeAddonEndpoint,qA as ResumeJobEndpoint,pE as ResumeLogsinkEndpoint,ty as ResumeServiceEndpoint,tA as RetainAddonBackupEndpoint,sb as RunReleaseflowEndpoint,wy as RunTemplateEndpoint,dA as ScaleAddonEndpoint,HA as ScaleJobEndpoint,uy as ScaleServiceEndpoint,DA as StartJobBuildEndpoint,GA as StartJobRunEndpoint,xb as StartServiceBuildEndpoint,YA as SuspendJobEndpoint,Yv as UnassignSubdomainEndpoint,oE as UnassignSubdomainPathEndpoint,Sv as UncordonCloudClusterNodeEndpoint,uA as UpdateAddonNetworksettingsEndpoint,lA as UpdateAddonSecurityEndpoint,pA as UpdateAddonVersionEndpoint,IA as UpdateJobBuildargumentsEndpoint,jA as UpdateJobBuildoptionsEndpoint,SA as UpdateJobBuildsourceEndpoint,kA as UpdateJobDeploymentEndpoint,TA as UpdateJobHealthchecksEndpoint,JA as UpdateJobRuntimeenvironmentEndpoint,ZA as UpdateJobSettingsEndpoint,fE as UpdateLogsinkEndpoint,AE as UpdateNotificationEndpoint,tb as UpdatePreviewtemplateEndpoint,FE as UpdateRegistrycredentialsEndpoint,ib as UpdateReleaseflowEndpoint,Eb as UpdateSecretEndpoint,Ab as UpdateSecretlinkEndpoint,Lb as UpdateServiceBuildargumentsEndpoint,qb as UpdateServiceBuildoptionsEndpoint,Mb as UpdateServiceBuildsourceEndpoint,Jb as UpdateServiceDeploymentEndpoint,Hb as UpdateServiceHealthchecksEndpoint,Kb as UpdateServicePortsEndpoint,ny as UpdateServiceRuntimeenvironmentEndpoint,rE as UpdateSubdomainPathEndpoint,Cy as UpdateTemplateEndpoint,ay as UpdateVolumeEndpoint,sE as VerifyDomainEndpoint,iE as VerifySubdomainEndpoint};
|