@redocly/openapi-docs 3.17.0-next.5 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10427,7 +10427,7 @@ ${a}`).join(`\r
|
|
|
10427
10427
|
# See https://redocly.com/docs/cli/ for more information.
|
|
10428
10428
|
`;function Hnt(e){if(e)return ene(e)?ca.join(ca.dirname(e),DB):ca.join(e,DB)}let Fnt=class YMe{constructor(t,a={}){this.ignore={},this._usedRules=new Set,this._usedVersions=new Set,this.resolvedConfig=t,this.configPath=a.configPath,this.document=a.document,this.resolvedRefMap=a.resolvedRefMap,this.resolve=Int(this.resolvedConfig.resolve),this._alias=a.alias,this.plugins=a.plugins||[],this.doNotResolveExamples=!!t.resolve?.doNotResolveExamples;const r=n=>Knt({rules:n},this.plugins);this.rules={oas2:r({...t.rules,...t.oas2Rules}),oas3_0:r({...t.rules,...t.oas3_0Rules}),oas3_1:r({...t.rules,...t.oas3_1Rules}),oas3_2:r({...t.rules,...t.oas3_2Rules}),async2:r({...t.rules,...t.async2Rules}),async3:r({...t.rules,...t.async3Rules}),arazzo1:r({...t.rules,...t.arazzo1Rules}),overlay1:r({...t.rules,...t.overlay1Rules}),openrpc1:r({...t.rules,...t.openrpc1Rules})},this.preprocessors={oas2:{...t.preprocessors,...t.oas2Preprocessors},oas3_0:{...t.preprocessors,...t.oas3_0Preprocessors},oas3_1:{...t.preprocessors,...t.oas3_1Preprocessors},oas3_2:{...t.preprocessors,...t.oas3_2Preprocessors},async2:{...t.preprocessors,...t.async2Preprocessors},async3:{...t.preprocessors,...t.async3Preprocessors},arazzo1:{...t.preprocessors,...t.arazzo1Preprocessors},overlay1:{...t.preprocessors,...t.overlay1Preprocessors},openrpc1:{...t.preprocessors,...t.openrpc1Preprocessors}},this.decorators={oas2:{...t.decorators,...t.oas2Decorators},oas3_0:{...t.decorators,...t.oas3_0Decorators},oas3_1:{...t.decorators,...t.oas3_1Decorators},oas3_2:{...t.decorators,...t.oas3_2Decorators},async2:{...t.decorators,...t.async2Decorators},async3:{...t.decorators,...t.async3Decorators},arazzo1:{...t.decorators,...t.arazzo1Decorators},overlay1:{...t.decorators,...t.overlay1Decorators},openrpc1:{...t.decorators,...t.openrpc1Decorators}},this.resolveIgnore(Hnt(a.configPath))}forAlias(t){if(t===void 0||!ng(this.resolvedConfig?.apis?.[t]))return this;const{apis:a,...r}=this.resolvedConfig,{root:n,output:i,...o}=a[t];return new YMe({...r,...o},{configPath:this.configPath,document:this.document,resolvedRefMap:this.resolvedRefMap,alias:t,plugins:this.plugins})}resolveIgnore(t){!t||ene(t)}saveIgnore(){const t=this.configPath?ca.dirname(this.configPath):process.cwd(),a=ca.join(t,DB),r={};for(const n of Object.keys(this.ignore)){const i=Bv(n)?n:$nt(ca.relative(t,n)),o=r[i]=this.ignore[n];for(const s of Object.keys(o))o[s]=Array.from(o[s])}(void 0)(a,Vnt+$at(r))}addIgnore(t){const a=this.ignore,r=t.location[0];if(r.pointer===void 0)return;const n=a[r.source.absoluteRef]=a[r.source.absoluteRef]||{};(n[t.ruleId]=n[t.ruleId]||new Set).add(r.pointer)}addProblemToIgnore(t){const a=t.location[0];if(a.pointer===void 0)return t;const r=(this.ignore[a.source.absoluteRef]||{})[t.ruleId],n=r&&r.has(a.pointer);return n?{...t,ignored:n}:t}extendTypes(t,a){let r=t;for(const n of this.plugins)if(n.typeExtension!==void 0)switch(a){case"oas3_0":case"oas3_1":case"oas3_2":if(!n.typeExtension.oas3)continue;r=n.typeExtension.oas3(r,a);break;case"oas2":if(!n.typeExtension.oas2)continue;r=n.typeExtension.oas2(r,a);break;case"async2":if(!n.typeExtension.async2)continue;r=n.typeExtension.async2(r,a);break;case"async3":if(!n.typeExtension.async3)continue;r=n.typeExtension.async3(r,a);break;case"arazzo1":if(!n.typeExtension.arazzo1)continue;r=n.typeExtension.arazzo1(r,a);break;case"overlay1":if(!n.typeExtension.overlay1)continue;r=n.typeExtension.overlay1(r,a);break;case"openrpc1":if(!n.typeExtension.openrpc1)continue;r=n.typeExtension.openrpc1(r,a);break;default:throw new Error("Not implemented")}return r}getRuleSettings(t,a){this._usedRules.add(t),this._usedVersions.add(a);const r=this.rules[a][t]||"off";return typeof r=="string"?{severity:r}:{severity:"error",...r}}getPreprocessorSettings(t,a){this._usedRules.add(t),this._usedVersions.add(a);const r=this.preprocessors[a][t]||"off";return typeof r=="string"?{severity:r==="on"?"error":r}:{severity:"error",...r}}getDecoratorSettings(t,a){this._usedRules.add(t),this._usedVersions.add(a);const r=this.decorators[a][t]||"off";return typeof r=="string"?{severity:r==="on"?"error":r}:{severity:"error",...r}}getUnusedRules(){const t=[],a=[],r=[];for(const n of Array.from(this._usedVersions))t.push(...Object.keys(this.rules[n]).filter(i=>!this._usedRules.has(i))),a.push(...Object.keys(this.decorators[n]).filter(i=>!this._usedRules.has(i))),r.push(...Object.keys(this.preprocessors[n]).filter(i=>!this._usedRules.has(i)));return{rules:t,preprocessors:r,decorators:a}}getRulesForSpecVersion(t){switch(t){case"oas3":const a=[];return this.plugins.forEach(c=>c.preprocessors?.oas3&&a.push(c.preprocessors.oas3)),this.plugins.forEach(c=>c.rules?.oas3&&a.push(c.rules.oas3)),this.plugins.forEach(c=>c.decorators?.oas3&&a.push(c.decorators.oas3)),a;case"oas2":const r=[];return this.plugins.forEach(c=>c.preprocessors?.oas2&&r.push(c.preprocessors.oas2)),this.plugins.forEach(c=>c.rules?.oas2&&r.push(c.rules.oas2)),this.plugins.forEach(c=>c.decorators?.oas2&&r.push(c.decorators.oas2)),r;case"async2":const n=[];return this.plugins.forEach(c=>c.preprocessors?.async2&&n.push(c.preprocessors.async2)),this.plugins.forEach(c=>c.rules?.async2&&n.push(c.rules.async2)),this.plugins.forEach(c=>c.decorators?.async2&&n.push(c.decorators.async2)),n;case"async3":const i=[];return this.plugins.forEach(c=>c.preprocessors?.async3&&i.push(c.preprocessors.async3)),this.plugins.forEach(c=>c.rules?.async3&&i.push(c.rules.async3)),this.plugins.forEach(c=>c.decorators?.async3&&i.push(c.decorators.async3)),i;case"arazzo1":const o=[];return this.plugins.forEach(c=>c.preprocessors?.arazzo1&&o.push(c.preprocessors.arazzo1)),this.plugins.forEach(c=>c.rules?.arazzo1&&o.push(c.rules.arazzo1)),this.plugins.forEach(c=>c.decorators?.arazzo1&&o.push(c.decorators.arazzo1)),o;case"overlay1":const s=[];return this.plugins.forEach(c=>c.preprocessors?.overlay1&&s.push(c.preprocessors.overlay1)),this.plugins.forEach(c=>c.rules?.overlay1&&s.push(c.rules.overlay1)),this.plugins.forEach(c=>c.decorators?.overlay1&&s.push(c.decorators.overlay1)),s;case"openrpc1":const l=[];return this.plugins.forEach(c=>c.preprocessors?.openrpc1&&l.push(c.preprocessors.openrpc1)),this.plugins.forEach(c=>c.rules?.openrpc1&&l.push(c.rules.openrpc1)),this.plugins.forEach(c=>c.decorators?.openrpc1&&l.push(c.decorators.openrpc1)),l}}skipRules(t){for(const a of t||[])for(const r of BB)if(this.rules[r][a])this.rules[r][a]="off";else if(Array.isArray(this.rules[r].assertions))for(const n of this.rules[r].assertions)n.assertionId===a&&(n.severity="off")}skipPreprocessors(t){for(const a of t||[])for(const r of BB)this.preprocessors[r][a]&&(this.preprocessors[r][a]="off")}skipDecorators(t){for(const a of t||[])for(const r of BB)this.decorators[r][a]&&(this.decorators[r][a]="off")}};async function Gnt(e){const{ref:t,doc:a,externalRefResolver:r=new Hat(e.config.resolve),base:n=null}=e;if(!(t||a))throw new Error(`Document or reference is required.
|
|
10429
10429
|
`);const i=a===void 0?await r.resolveDocument(n,t,!0):a;if(i instanceof Error)throw i;const o=qre(i.parsed);let s;switch(o){case"oas2":s=Prt;break;case"oas3_0":s=C2;break;case"oas3_1":s=jn;break;case"oas3_2":s=Nnt;break;default:throw new Error(`Unsupported OpenAPI version: ${o}`)}return ert({document:i,...e,externalRefResolver:r,types:s})}function ane(e={}){return new Fnt({rules:{},preprocessors:{},decorators:{},plugins:[]},{configPath:e.configPath})}const qnt={isatty:()=>{},createRequire:()=>{}},rne=Object.freeze(Object.defineProperty({__proto__:null,default:qnt},Symbol.toStringTag,{value:"Module"})),Kv=Aq(rne);var og={},j2={exports:{}},Qnt=j2.exports,nne;function Unt(){return nne||(nne=1,(function(e,t){(function(a){var r=t&&!t.nodeType&&t,n=e&&!e.nodeType&&e,i=typeof globalThis=="object"&&globalThis;(i.global===i||i.window===i||i.self===i)&&(a=i);var o,s=2147483647,l=36,c=1,u=26,d=38,h=700,m=72,v=128,f="-",y=/^xn--/,b=/[^\x20-\x7E]/,k=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=l-c,O=Math.floor,S=String.fromCharCode,j;function P(W){throw RangeError(w[W])}function R(W,I){for(var J=W.length,G=[];J--;)G[J]=I(W[J]);return G}function _(W,I){var J=W.split("@"),G="";J.length>1&&(G=J[0]+"@",W=J[1]),W=W.replace(k,".");var B=W.split("."),N=R(B,I).join(".");return G+N}function K(W){for(var I=[],J=0,G=W.length,B,N;J<G;)B=W.charCodeAt(J++),B>=55296&&B<=56319&&J<G?(N=W.charCodeAt(J++),(N&64512)==56320?I.push(((B&1023)<<10)+(N&1023)+65536):(I.push(B),J--)):I.push(B);return I}function L(W){return R(W,function(I){var J="";return I>65535&&(I-=65536,J+=S(I>>>10&1023|55296),I=56320|I&1023),J+=S(I),J}).join("")}function Q(W){return W-48<10?W-22:W-65<26?W-65:W-97<26?W-97:l}function D(W,I){return W+22+75*(W<26)-((I!=0)<<5)}function Y(W,I,J){var G=0;for(W=J?O(W/h):W>>1,W+=O(W/I);W>C*u>>1;G+=l)W=O(W/C);return O(G+(C+1)*W/(W+d))}function ee(W){var I=[],J=W.length,G,B=0,N=v,F=m,ne,se,be,xe,E,$,re,q,ue;for(ne=W.lastIndexOf(f),ne<0&&(ne=0),se=0;se<ne;++se)W.charCodeAt(se)>=128&&P("not-basic"),I.push(W.charCodeAt(se));for(be=ne>0?ne+1:0;be<J;){for(xe=B,E=1,$=l;be>=J&&P("invalid-input"),re=Q(W.charCodeAt(be++)),(re>=l||re>O((s-B)/E))&&P("overflow"),B+=re*E,q=$<=F?c:$>=F+u?u:$-F,!(re<q);$+=l)ue=l-q,E>O(s/ue)&&P("overflow"),E*=ue;G=I.length+1,F=Y(B-xe,G,xe==0),O(B/G)>s-N&&P("overflow"),N+=O(B/G),B%=G,I.splice(B++,0,N)}return L(I)}function oe(W){var I,J,G,B,N,F,ne,se,be,xe,E,$=[],re,q,ue,pe;for(W=K(W),re=W.length,I=v,J=0,N=m,F=0;F<re;++F)E=W[F],E<128&&$.push(S(E));for(G=B=$.length,B&&$.push(f);G<re;){for(ne=s,F=0;F<re;++F)E=W[F],E>=I&&E<ne&&(ne=E);for(q=G+1,ne-I>O((s-J)/q)&&P("overflow"),J+=(ne-I)*q,I=ne,F=0;F<re;++F)if(E=W[F],E<I&&++J>s&&P("overflow"),E==I){for(se=J,be=l;xe=be<=N?c:be>=N+u?u:be-N,!(se<xe);be+=l)pe=se-xe,ue=l-xe,$.push(S(D(xe+pe%ue,0))),se=O(pe/ue);$.push(S(D(se,0))),N=Y(J,q,G==B),J=0,++G}++J,++I}return $.join("")}function X(W){return _(W,function(I){return y.test(I)?ee(I.slice(4).toLowerCase()):I})}function de(W){return _(W,function(I){return b.test(I)?"xn--"+oe(I):I})}if(o={version:"1.3.2",ucs2:{decode:K,encode:L},decode:ee,encode:oe,toASCII:de,toUnicode:X},r&&n)if(e.exports==r)n.exports=o;else for(j in o)o.hasOwnProperty(j)&&(r[j]=o[j]);else a.punycode=o})(Qnt)})(j2,j2.exports)),j2.exports}var ine,one;function Wnt(){return one||(one=1,ine={isString:function(e){return typeof e=="string"},isObject:function(e){return typeof e=="object"&&e!==null},isNull:function(e){return e===null},isNullOrUndefined:function(e){return e==null}}),ine}var Y1={},NB,sne;function Jnt(){if(sne)return NB;sne=1;function e(t,a){return Object.prototype.hasOwnProperty.call(t,a)}return NB=function(t,a,r,n){a=a||"&",r=r||"=";var i={};if(typeof t!="string"||t.length===0)return i;var o=/\+/g;t=t.split(a);var s=1e3;n&&typeof n.maxKeys=="number"&&(s=n.maxKeys);var l=t.length;s>0&&l>s&&(l=s);for(var c=0;c<l;++c){var u=t[c].replace(o,"%20"),d=u.indexOf(r),h,m,v,f;d>=0?(h=u.substr(0,d),m=u.substr(d+1)):(h=u,m=""),v=decodeURIComponent(h),f=decodeURIComponent(m),e(i,v)?Array.isArray(i[v])?i[v].push(f):i[v]=[i[v],f]:i[v]=f}return i},NB}var $B,lne;function Znt(){if(lne)return $B;lne=1;var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};return $B=function(t,a,r,n){return a=a||"&",r=r||"=",t===null&&(t=void 0),typeof t=="object"?Object.keys(t).map(function(i){var o=encodeURIComponent(e(i))+r;return Array.isArray(t[i])?t[i].map(function(s){return o+encodeURIComponent(e(s))}).join(a):o+encodeURIComponent(e(t[i]))}).join(a):n?encodeURIComponent(e(n))+r+encodeURIComponent(e(t)):""},$B}var cne;function Xnt(){return cne||(cne=1,Y1.decode=Y1.parse=Jnt(),Y1.encode=Y1.stringify=Znt()),Y1}var une;function IB(){if(une)return og;une=1;var e=Unt(),t=Wnt();og.parse=k,og.resolve=C,og.resolveObject=O,og.format=w,og.Url=a;function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["<",">",'"',"`"," ","\r",`
|
|
10430
|
-
`," "],s=["{","}","|","\\","^","`"].concat(o),l=["'"].concat(s),c=["%","/","?",";","#"].concat(l),u=["/","?","#"],d=255,h=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=Xnt();function k(S,j,P){if(S&&t.isObject(S)&&S instanceof a)return S;var R=new a;return R.parse(S,j,P),R}a.prototype.parse=function(S,j,P){if(!t.isString(S))throw new TypeError("Parameter 'url' must be a string, not "+typeof S);var R=S.indexOf("?"),_=R!==-1&&R<S.indexOf("#")?"?":"#",K=S.split(_),L=/\\/g;K[0]=K[0].replace(L,"/"),S=K.join(_);var Q=S;if(Q=Q.trim(),!P&&S.split("#").length===1){var D=i.exec(Q);if(D)return this.path=Q,this.href=Q,this.pathname=D[1],D[2]?(this.search=D[2],j?this.query=b.parse(this.search.substr(1)):this.query=this.search.substr(1)):j&&(this.search="",this.query={}),this}var Y=r.exec(Q);if(Y){Y=Y[0];var ee=Y.toLowerCase();this.protocol=ee,Q=Q.substr(Y.length)}if(P||Y||Q.match(/^\/\/[^@\/]+@[^@\/]+/)){var oe=Q.substr(0,2)==="//";oe&&!(Y&&f[Y])&&(Q=Q.substr(2),this.slashes=!0)}if(!f[Y]&&(oe||Y&&!y[Y])){for(var X=-1,de=0;de<u.length;de++){var W=Q.indexOf(u[de]);W!==-1&&(X===-1||W<X)&&(X=W)}var I,J;X===-1?J=Q.lastIndexOf("@"):J=Q.lastIndexOf("@",X),J!==-1&&(I=Q.slice(0,J),Q=Q.slice(J+1),this.auth=decodeURIComponent(I)),X=-1;for(var de=0;de<c.length;de++){var W=Q.indexOf(c[de]);W!==-1&&(X===-1||W<X)&&(X=W)}X===-1&&(X=Q.length),this.host=Q.slice(0,X),Q=Q.slice(X),this.parseHost(),this.hostname=this.hostname||"";var G=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!G)for(var B=this.hostname.split(/\./),de=0,N=B.length;de<N;de++){var F=B[de];if(F&&!F.match(h)){for(var ne="",se=0,be=F.length;se<be;se++)F.charCodeAt(se)>127?ne+="x":ne+=F[se];if(!ne.match(h)){var xe=B.slice(0,de),E=B.slice(de+1),$=F.match(m);$&&(xe.push($[1]),E.unshift($[2])),E.length&&(Q="/"+E.join(".")+Q),this.hostname=xe.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),G||(this.hostname=e.toASCII(this.hostname));var re=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+re,this.href+=this.host,G&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Q[0]!=="/"&&(Q="/"+Q))}if(!v[ee])for(var de=0,N=l.length;de<N;de++){var ue=l[de];if(Q.indexOf(ue)!==-1){var pe=encodeURIComponent(ue);pe===ue&&(pe=escape(ue)),Q=Q.split(ue).join(pe)}}var Z=Q.indexOf("#");Z!==-1&&(this.hash=Q.substr(Z),Q=Q.slice(0,Z));var ae=Q.indexOf("?");if(ae!==-1?(this.search=Q.substr(ae),this.query=Q.substr(ae+1),j&&(this.query=b.parse(this.query)),Q=Q.slice(0,ae)):j&&(this.search="",this.query={}),Q&&(this.pathname=Q),y[ee]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var re=this.pathname||"",ce=this.search||"";this.path=re+ce}return this.href=this.format(),this};function w(S){return t.isString(S)&&(S=k(S)),S instanceof a?S.format():a.prototype.format.call(S)}a.prototype.format=function(){var S=this.auth||"";S&&(S=encodeURIComponent(S),S=S.replace(/%3A/i,":"),S+="@");var j=this.protocol||"",P=this.pathname||"",R=this.hash||"",_=!1,K="";this.host?_=S+this.host:this.hostname&&(_=S+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(_+=":"+this.port)),this.query&&t.isObject(this.query)&&Object.keys(this.query).length&&(K=b.stringify(this.query));var L=this.search||K&&"?"+K||"";return j&&j.substr(-1)!==":"&&(j+=":"),this.slashes||(!j||y[j])&&_!==!1?(_="//"+(_||""),P&&P.charAt(0)!=="/"&&(P="/"+P)):_||(_=""),R&&R.charAt(0)!=="#"&&(R="#"+R),L&&L.charAt(0)!=="?"&&(L="?"+L),P=P.replace(/[?#]/g,function(Q){return encodeURIComponent(Q)}),L=L.replace("#","%23"),j+_+P+L+R};function C(S,j){return k(S,!1,!0).resolve(j)}a.prototype.resolve=function(S){return this.resolveObject(k(S,!1,!0)).format()};function O(S,j){return S?k(S,!1,!0).resolveObject(j):j}return a.prototype.resolveObject=function(S){if(t.isString(S)){var j=new a;j.parse(S,!1,!0),S=j}for(var P=new a,R=Object.keys(this),_=0;_<R.length;_++){var K=R[_];P[K]=this[K]}if(P.hash=S.hash,S.href==="")return P.href=P.format(),P;if(S.slashes&&!S.protocol){for(var L=Object.keys(S),Q=0;Q<L.length;Q++){var D=L[Q];D!=="protocol"&&(P[D]=S[D])}return y[P.protocol]&&P.hostname&&!P.pathname&&(P.path=P.pathname="/"),P.href=P.format(),P}if(S.protocol&&S.protocol!==P.protocol){if(!y[S.protocol]){for(var Y=Object.keys(S),ee=0;ee<Y.length;ee++){var oe=Y[ee];P[oe]=S[oe]}return P.href=P.format(),P}if(P.protocol=S.protocol,!S.host&&!f[S.protocol]){for(var N=(S.pathname||"").split("/");N.length&&!(S.host=N.shift()););S.host||(S.host=""),S.hostname||(S.hostname=""),N[0]!==""&&N.unshift(""),N.length<2&&N.unshift(""),P.pathname=N.join("/")}else P.pathname=S.pathname;if(P.search=S.search,P.query=S.query,P.host=S.host||"",P.auth=S.auth,P.hostname=S.hostname||S.host,P.port=S.port,P.pathname||P.search){var X=P.pathname||"",de=P.search||"";P.path=X+de}return P.slashes=P.slashes||S.slashes,P.href=P.format(),P}var W=P.pathname&&P.pathname.charAt(0)==="/",I=S.host||S.pathname&&S.pathname.charAt(0)==="/",J=I||W||P.host&&S.pathname,G=J,B=P.pathname&&P.pathname.split("/")||[],N=S.pathname&&S.pathname.split("/")||[],F=P.protocol&&!y[P.protocol];if(F&&(P.hostname="",P.port=null,P.host&&(B[0]===""?B[0]=P.host:B.unshift(P.host)),P.host="",S.protocol&&(S.hostname=null,S.port=null,S.host&&(N[0]===""?N[0]=S.host:N.unshift(S.host)),S.host=null),J=J&&(N[0]===""||B[0]==="")),I)P.host=S.host||S.host===""?S.host:P.host,P.hostname=S.hostname||S.hostname===""?S.hostname:P.hostname,P.search=S.search,P.query=S.query,B=N;else if(N.length)B||(B=[]),B.pop(),B=B.concat(N),P.search=S.search,P.query=S.query;else if(!t.isNullOrUndefined(S.search)){if(F){P.hostname=P.host=B.shift();var ne=P.host&&P.host.indexOf("@")>0?P.host.split("@"):!1;ne&&(P.auth=ne.shift(),P.host=P.hostname=ne.shift())}return P.search=S.search,P.query=S.query,(!t.isNull(P.pathname)||!t.isNull(P.search))&&(P.path=(P.pathname?P.pathname:"")+(P.search?P.search:"")),P.href=P.format(),P}if(!B.length)return P.pathname=null,P.search?P.path="/"+P.search:P.path=null,P.href=P.format(),P;for(var se=B.slice(-1)[0],be=(P.host||S.host||B.length>1)&&(se==="."||se==="..")||se==="",xe=0,E=B.length;E>=0;E--)se=B[E],se==="."?B.splice(E,1):se===".."?(B.splice(E,1),xe++):xe&&(B.splice(E,1),xe--);if(!J&&!G)for(;xe--;xe)B.unshift("..");J&&B[0]!==""&&(!B[0]||B[0].charAt(0)!=="/")&&B.unshift(""),be&&B.join("/").substr(-1)!=="/"&&B.push("");var $=B[0]===""||B[0]&&B[0].charAt(0)==="/";if(F){P.hostname=P.host=$?"":B.length?B.shift():"";var ne=P.host&&P.host.indexOf("@")>0?P.host.split("@"):!1;ne&&(P.auth=ne.shift(),P.host=P.hostname=ne.shift())}return J=J||P.host&&B.length,J&&!$&&B.unshift(""),B.length?P.pathname=B.join("/"):(P.pathname=null,P.path=null),(!t.isNull(P.pathname)||!t.isNull(P.search))&&(P.path=(P.pathname?P.pathname:"")+(P.search?P.search:"")),P.auth=S.auth||P.auth,P.slashes=P.slashes||S.slashes,P.href=P.format(),P},a.prototype.parseHost=function(){var S=this.host,j=n.exec(S);j&&(j=j[0],j!==":"&&(this.port=j.substr(1)),S=S.substr(0,S.length-j.length)),S&&(this.hostname=S)},og}var KB,dne;function Ynt(){if(dne)return KB;dne=1;function e(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}return KB=e(),KB}var VB,pne;function eit(){if(pne)return VB;pne=1;var e=Ynt();return VB=function(t,a){if(t){a.then(function(r){e(function(){t(null,r)})},function(r){e(function(){t(r)})});return}else return a},VB}var HB,hne;function P2(){if(hne)return HB;hne=1;function e(r){return r.replace(/\~/g,"~0").replace(/\//g,"~1")}function t(r){return r.replace(/\~1/g,"/").replace(/~0/g,"~")}function a(r,n,i){if(typeof r>"u")return!1;if(!n||typeof n!="string"||n==="#")return typeof i<"u"?i:r;if(n.indexOf("#")>=0){let s=n.split("#");if(s[0])return!1;n=s[1],n=decodeURIComponent(n.slice(1).split("+").join(" "))}n.startsWith("/")&&(n=n.slice(1));let o=n.split("/");for(let s=0;s<o.length;s++){o[s]=t(o[s]);let l=typeof i<"u"&&s==o.length-1,c=parseInt(o[s],10);if(!Array.isArray(r)||isNaN(c)||c.toString()!==o[s]?c=Array.isArray(r)&&o[s]==="-"?-2:-1:o[s]=s>0?o[s-1]:"",c!=-1||r&&r.hasOwnProperty(o[s]))if(c>=0)l&&(r[c]=i),r=r[c];else{if(c===-2)return l?(Array.isArray(r)&&r.push(i),i):void 0;l&&(r[o[s]]=i),r=r[o[s]]}else if(typeof i<"u"&&typeof r=="object"&&!Array.isArray(r))r[o[s]]=l?i:o[s+1]==="0"||o[s+1]==="-"?[]:{},r=r[o[s]];else return!1}return r}return HB={jptr:a,jpescape:e,jpunescape:t},HB}var FB,mne;function GB(){if(mne)return FB;mne=1;function e(t,a){return a==="$ref"&&!!t&&typeof t[a]=="string"}return FB={isRef:e},FB}var qB,gne;function A2(){if(gne)return qB;gne=1;function e(o){return o}function t(o){return JSON.parse(JSON.stringify(o))}function a(o){let s={};for(let l in o)o.hasOwnProperty(l)&&(s[l]=o[l]);return s}function r(o){let s=Array.isArray(o)?[]:{};for(let l in o)(o.hasOwnProperty(l)||Array.isArray(o))&&(s[l]=typeof o[l]=="object"?r(o[l]):o[l]);return s}function n(o){return Object.assign({},o)}function i(o,s){if(s||(s=new WeakMap),Object(o)!==o||o instanceof Function)return o;if(s.has(o))return s.get(o);try{var l=new o.constructor}catch{l=Object.create(Object.getPrototypeOf(o))}return s.set(o,l),Object.assign(l,...Object.keys(o).map(c=>({[c]:i(o[c],s)})))}return qB={nop:e,clone:t,shallowClone:a,deepClone:r,fastClone:n,circularClone:i},qB}var QB,fne;function UB(){if(fne)return QB;fne=1;const e=P2().jpescape;function t(){return{path:"#",depth:0,pkey:"",parent:{},payload:{},seen:new WeakMap,identity:!1,identityDetection:!1}}function a(r,n,i){if(n||(n={depth:0}),n.depth||(n=Object.assign({},t(),n)),typeof r!="object")return;let o=n.path;for(let s in r){if(n.key=s,n.path=n.path+"/"+encodeURIComponent(e(s)),n.identityPath=n.seen.get(r[s]),n.identity=typeof n.identityPath<"u",r.hasOwnProperty(s)&&i(r,s,n),typeof r[s]=="object"&&!n.identity){n.identityDetection&&!Array.isArray(r[s])&&r[s]!==null&&n.seen.set(r[s],n.path);let l={};l.parent=r,l.path=n.path,l.depth=n.depth?n.depth+1:1,l.pkey=s,l.payload=n.payload,l.seen=n.seen,l.identity=!1,l.identityDetection=n.identityDetection,a(r[s],l,i)}n.path=o}}return QB={recurse:a},QB}var WB,vne;function tit(){if(vne)return WB;vne=1;const e=UB().recurse,t=A2().shallowClone,a=P2().jptr,r=GB().isRef;var n=function(o){return o&&o.verbose?{warn:function(){var s=Array.prototype.slice.call(arguments);console.warn.apply(console,s)}}:{warn:function(){}}};function i(o,s,l){l||(l={}),l.cache||(l.cache={}),l.state||(l.state={}),l.state.identityDetection=!0,l.depth=l.depth?l.depth+1:1;let c=l.depth>1?o:t(o),u={data:c},d=l.depth>1?s:t(s);l.master||(l.master=c);let h=n(l),m=1;for(;m>0;)m=0,e(u,l.state,function(v,f,y){if(r(v,f)){let b=v[f];if(m++,l.cache[b]){let k=l.cache[b];if(k.resolved)h.warn("Patching %s for %s",b,k.path),y.parent[y.pkey]=k.data,l.$ref&&typeof y.parent[y.pkey]=="object"&&y.parent[y.pkey]!==null&&(y.parent[y.pkey][l.$ref]=b);else{if(b===k.path)throw new Error(`Tight circle at ${k.path}`);h.warn("Unresolved ref"),y.parent[y.pkey]=a(k.source,k.path),y.parent[y.pkey]===!1&&(y.parent[y.pkey]=a(k.source,k.key)),l.$ref&&typeof y.parent[y.pkey]=="object"&&y.parent[y.pkey]!==null&&(y.parent[l.$ref]=b)}}else{let k={};k.path=y.path.split("/$ref")[0],k.key=b,h.warn("Dereffing %s at %s",b,k.path),k.source=d,k.data=a(k.source,k.key),k.data===!1&&(k.data=a(l.master,k.key),k.source=l.master),k.data===!1&&h.warn("Missing $ref target",k.key),l.cache[b]=k,k.data=y.parent[y.pkey]=i(a(k.source,k.key),k.source,l),l.$ref&&typeof y.parent[y.pkey]=="object"&&y.parent[y.pkey]!==null&&(y.parent[y.pkey][l.$ref]=b),k.resolved=!0}}});return u.data}return WB={dereference:i},WB}var JB,bne;function ait(){if(bne)return JB;bne=1,JB=i,i.default=i,i.stable=c,i.stableStringify=c;var e="[...]",t="[Circular]",a=[],r=[];function n(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function i(h,m,v,f){typeof f>"u"&&(f=n()),s(h,"",0,[],void 0,0,f);var y;try{r.length===0?y=JSON.stringify(h,m,v):y=JSON.stringify(h,d(m),v)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;a.length!==0;){var b=a.pop();b.length===4?Object.defineProperty(b[0],b[1],b[3]):b[0][b[1]]=b[2]}}return y}function o(h,m,v,f){var y=Object.getOwnPropertyDescriptor(f,v);y.get!==void 0?y.configurable?(Object.defineProperty(f,v,{value:h}),a.push([f,v,m,y])):r.push([m,v,h]):(f[v]=h,a.push([f,v,m]))}function s(h,m,v,f,y,b,k){b+=1;var w;if(typeof h=="object"&&h!==null){for(w=0;w<f.length;w++)if(f[w]===h){o(t,h,m,y);return}if(typeof k.depthLimit<"u"&&b>k.depthLimit){o(e,h,m,y);return}if(typeof k.edgesLimit<"u"&&v+1>k.edgesLimit){o(e,h,m,y);return}if(f.push(h),Array.isArray(h))for(w=0;w<h.length;w++)s(h[w],w,w,f,h,b,k);else{var C=Object.keys(h);for(w=0;w<C.length;w++){var O=C[w];s(h[O],O,w,f,h,b,k)}}f.pop()}}function l(h,m){return h<m?-1:h>m?1:0}function c(h,m,v,f){typeof f>"u"&&(f=n());var y=u(h,"",0,[],void 0,0,f)||h,b;try{r.length===0?b=JSON.stringify(y,m,v):b=JSON.stringify(y,d(m),v)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;a.length!==0;){var k=a.pop();k.length===4?Object.defineProperty(k[0],k[1],k[3]):k[0][k[1]]=k[2]}}return b}function u(h,m,v,f,y,b,k){b+=1;var w;if(typeof h=="object"&&h!==null){for(w=0;w<f.length;w++)if(f[w]===h){o(t,h,m,y);return}try{if(typeof h.toJSON=="function")return}catch{return}if(typeof k.depthLimit<"u"&&b>k.depthLimit){o(e,h,m,y);return}if(typeof k.edgesLimit<"u"&&v+1>k.edgesLimit){o(e,h,m,y);return}if(f.push(h),Array.isArray(h))for(w=0;w<h.length;w++)u(h[w],w,w,f,h,b,k);else{var C={},O=Object.keys(h).sort(l);for(w=0;w<O.length;w++){var S=O[w];u(h[S],S,w,f,h,b,k),C[S]=h[S]}if(typeof y<"u")a.push([y,m,h]),y[m]=C;else return C}f.pop()}}function d(h){return h=typeof h<"u"?h:function(m,v){return v},function(m,v){if(r.length>0)for(var f=0;f<r.length;f++){var y=r[f];if(y[1]===m&&y[0]===v){v=y[2],r.splice(f,1);break}}return h.call(this,m,v)}}return JB}var ZB,yne;function kne(){if(yne)return ZB;yne=1;var e={};const t=ait(),a=e.NODE_DISABLE_COLORS?{red:"",yellow:"",green:"",normal:""}:{red:"\x1B[31m",yellow:"\x1B[33;1m",green:"\x1B[32m",normal:"\x1B[0m"};function r(y,b,k){return k.indexOf(y)===b}function n(y){return new Set(y).size!==y.length}function i(y){return new Set(y).size<=1}function o(y,b){function k(w,C){return t.stringify(w)===t.stringify(Object.assign({},w,C))}return k(y,b)&&k(b,y)}function s(y){let b=[];for(let k of y)b.find(function(w,C,O){return o(w,k)})||b.push(k);return b}function l(y){return y.length===s(y).length}function c(y){return y.find(function(b,k,w){return y.indexOf(b)<k})}function u(y){let b=0,k;if(y.length===0)return b;for(let w=0;w<y.length;w++)k=y.charCodeAt(w),b=(b<<5)-b+k,b|=0;return b}String.prototype.toCamelCase=function(){return this.toLowerCase().replace(/[-_ \/\.](.)/g,function(y,b){return b.toUpperCase()})};const d=["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],h=["items","minItems","maxItems","uniqueItems"],m=["get","post","put","delete","patch","head","options","trace"];function v(y){y=y.replace("[]","Array");let b=y.split("/");return b[0]=b[0].replace(/[^A-Za-z0-9_\-\.]+|\s+/gm,"_"),b.join("/")}function f(y){return v(y.split("/").join("_"))}return ZB={colour:a,uniqueOnly:r,hasDuplicates:n,allSame:i,distinctArray:l,firstDupe:c,hash:u,parameterTypeProperties:d,arrayProperties:h,httpMethods:m,sanitise:v,sanitiseAll:f},ZB}var XB,xne;function rit(){if(xne)return XB;xne=1;const e=Kv,t=BW(),a=IB(),r=Kv,n=Kv,i=P2().jptr,o=UB().recurse,s=A2().clone,l=tit().dereference,c=GB().isRef,u=kne();function d(P){return[...new Set(P)]}function h(P,R,_,K,L){return new Promise(function(Q,D){e.readFile(P,R,function(Y,ee){Y?_.ignoreIOErrors&&L?(_.verbose&&console.warn("FAILED",K),_.externalRefs[K].failed=!0,Q(L)):D(Y):Q(ee)})})}function m(P,R,_,K,L,Q){let D=Q.externalRefs[_+K].paths[0],Y=a.parse(L),ee={},oe=1;for(;oe;)oe=0,o(P,{identityDetection:!0},function(X,de,W){if(c(X,de)){if(X[de].startsWith("#")){if(!ee[X[de]]&&!X.$fixed){let I=s(i(R,X[de]));if(Q.verbose>1&&console.warn((I===!1?u.colour.red:u.colour.green)+"Fragment resolution",X[de],u.colour.normal),I===!1){if(W.parent[W.pkey]={},Q.fatal){let J=new Error("Fragment $ref resolution failed "+X[de]);if(Q.promise)Q.promise.reject(J);else throw J}}else oe++,W.parent[W.pkey]=I,ee[X[de]]=W.path.replace("/%24ref","")}else if(!X.$fixed){let I=(D+"/"+ee[X[de]]).split("/#/").join("/");W.parent[W.pkey]={$ref:I,"x-miro":X[de],$fixed:!0},Q.verbose>1&&console.warn("Replacing with",I),oe++}}else if(Y.protocol){let I=a.resolve(L,X[de]).toString();Q.verbose>1&&console.warn(u.colour.yellow+"Rewriting external url ref",X[de],"as",I,u.colour.normal),X["x-miro"]=X[de],Q.externalRefs[X[de]]&&(Q.externalRefs[I]||(Q.externalRefs[I]=Q.externalRefs[X[de]]),Q.externalRefs[I].failed=Q.externalRefs[X[de]].failed),X[de]=I}else if(!X["x-miro"]){let I=a.resolve(L,X[de]).toString(),J=!1;Q.externalRefs[X[de]]&&(J=Q.externalRefs[X[de]].failed),J||(Q.verbose>1&&console.warn(u.colour.yellow+"Rewriting external ref",X[de],"as",I,u.colour.normal),X["x-miro"]=X[de],X[de]=I)}}});return o(P,{},function(X,de,W){c(X,de)&&typeof X.$fixed<"u"&&delete X.$fixed}),Q.verbose>1&&console.warn("Finished fragment resolution"),P}function v(P,R){if(!R.filters||!R.filters.length)return P;for(let _ of R.filters)P=_(P,R);return P}function f(P,R){return P&&P.length>2?P:R&&R.length>2?R:"file:"}function y(P,R,_,K){var L=a.parse(_.source),Q=_.source.split("\\").join("/").split("/");Q.pop()||Q.pop();let D="",Y=R.split("#");Y.length>1&&(D="#"+Y[1],R=Y[0]),Q=Q.join("/");let ee=a.parse(R),oe=f(ee.protocol,L.protocol),X;if(oe==="file:"?X=t.resolve(Q?Q+"/":"",R):X=a.resolve(Q?Q+"/":"",R),_.cache[X]){_.verbose&&console.warn("CACHED",X,D);let de=s(_.cache[X]),W=_.externalRef=de;if(D&&(W=i(W,D),W===!1&&(W={},_.fatal))){let I=new Error("Cached $ref resolution failed "+X+D);if(_.promise)_.promise.reject(I);else throw I}return W=m(W,de,R,D,X,_),W=v(W,_),K(s(W),X,_),Promise.resolve(W)}if(_.verbose&&console.warn("GET",X,D),_.handlers&&_.handlers[oe])return _.handlers[oe](Q,R,D,_).then(function(de){return _.externalRef=de,de=v(de,_),_.cache[X]=de,K(de,X,_),de}).catch(function(de){throw _.verbose&&console.warn(de),de});if(oe&&oe.startsWith("http")){const de=Object.assign({},_.fetchOptions,{agent:_.agent});return _.fetch(X,de).then(function(W){if(W.status!==200){if(_.ignoreIOErrors)return _.verbose&&console.warn("FAILED",R),_.externalRefs[R].failed=!0,'{"$ref":"'+R+'"}';throw new Error(`Received status code ${W.status}: ${X}`)}return W.text()}).then(function(W){try{let I=n.parse(W,{schema:"core",prettyErrors:!0});if(W=_.externalRef=I,_.cache[X]=s(W),D&&(W=i(W,D),W===!1&&(W={},_.fatal))){let J=new Error("Remote $ref resolution failed "+X+D);if(_.promise)_.promise.reject(J);else throw J}W=m(W,I,R,D,X,_),W=v(W,_)}catch(I){if(_.verbose&&console.warn(I),_.promise&&_.fatal)_.promise.reject(I);else throw I}return K(W,X,_),W}).catch(function(W){if(_.verbose&&console.warn(W),_.cache[X]={},_.promise&&_.fatal)_.promise.reject(W);else throw W})}else{const de='{"$ref":"'+R+'"}';return h(X,_.encoding||"utf8",_,R,de).then(function(W){try{let I=n.parse(W,{schema:"core",prettyErrors:!0});if(W=_.externalRef=I,_.cache[X]=s(W),D&&(W=i(W,D),W===!1&&(W={},_.fatal))){let J=new Error("File $ref resolution failed "+X+D);if(_.promise)_.promise.reject(J);else throw J}W=m(W,I,R,D,X,_),W=v(W,_)}catch(I){if(_.verbose&&console.warn(I),_.promise&&_.fatal)_.promise.reject(I);else throw I}return K(W,X,_),W}).catch(function(W){if(_.verbose&&console.warn(W),_.promise&&_.fatal)_.promise.reject(W);else throw W})}}function b(P){return new Promise(function(R,_){function K(Q,D,Y){if(Q[D]&&c(Q[D],"$ref")){let ee=Q[D].$ref;if(!ee.startsWith("#")){let oe="";if(!L[ee]){let X=Object.keys(L).find(function(de,W,I){return ee.startsWith(de+"/")});X&&(P.verbose&&console.warn("Found potential subschema at",X),oe="/"+(ee.split("#")[1]||"").replace(X.split("#")[1]||""),oe=oe.split("/undefined").join(""),ee=X)}if(L[ee]||(L[ee]={resolved:!1,paths:[],extras:{},description:Q[D].description}),L[ee].resolved){if(!L[ee].failed)if(P.rewriteRefs){let X=L[ee].resolvedAt;P.verbose>1&&console.warn("Rewriting ref",ee,X),Q[D]["x-miro"]=ee,Q[D].$ref=X+oe}else Q[D]=s(L[ee].data)}else L[ee].paths.push(Y.path),L[ee].extras[Y.path]=oe}}}let L=P.externalRefs;if(P.resolver.depth>0&&P.source===P.resolver.base)return R(L);o(P.openapi.definitions,{identityDetection:!0,path:"#/definitions"},K),o(P.openapi.components,{identityDetection:!0,path:"#/components"},K),o(P.openapi,{identityDetection:!0},K),R(L)})}function k(P){return new Promise(function(R,_){b(P).then(function(L){for(let Q in L)if(!L[Q].resolved){let D=P.resolver.depth;D>0&&D++,P.resolver.actions[D].push(function(){return y(P.openapi,Q,P,function(Y,ee,oe){if(!L[Q].resolved){let W={};W.context=L[Q],W.$ref=Q,W.original=s(Y),W.updated=Y,W.source=ee,oe.externals.push(W),L[Q].resolved=!0}let X=Object.assign({},oe,{source:"",resolver:{actions:oe.resolver.actions,depth:oe.resolver.actions.length-1,base:oe.resolver.base}});oe.patch&&L[Q].description&&!Y.description&&typeof Y=="object"&&(Y.description=L[Q].description),L[Q].data=Y;let de=d(L[Q].paths);de=de.sort(function(W,I){const J=W.startsWith("#/components/")||W.startsWith("#/definitions/"),G=I.startsWith("#/components/")||I.startsWith("#/definitions/");return J&&!G?-1:G&&!J?1:0});for(let W of de)if(L[Q].resolvedAt&&W!==L[Q].resolvedAt&&W.indexOf("x-ms-examples/")<0)oe.verbose>1&&console.warn("Creating pointer to data at",W),i(oe.openapi,W,{$ref:L[Q].resolvedAt+L[Q].extras[W],"x-miro":Q+L[Q].extras[W]});else{L[Q].resolvedAt?oe.verbose>1&&console.warn("Avoiding circular reference"):(L[Q].resolvedAt=W,oe.verbose>1&&console.warn("Creating initial clone of data at",W));let I=s(Y);i(oe.openapi,W,I)}oe.resolver.actions[X.resolver.depth].length===0&&oe.resolver.actions[X.resolver.depth].push(function(){return k(X)})})})}}).catch(function(L){P.verbose&&console.warn(L),_(L)});let K={options:P};K.actions=P.resolver.actions[P.resolver.depth],R(K)})}const w=P=>P.reduce((R,_)=>R.then(K=>_().then(Array.prototype.concat.bind(K))),Promise.resolve([]));function C(P,R,_){P.resolver.actions.push([]),k(P).then(function(K){w(K.actions).then(function(){if(P.resolver.depth>=P.resolver.actions.length)return console.warn("Ran off the end of resolver actions"),R(!0);P.resolver.depth++,P.resolver.actions[P.resolver.depth].length?setTimeout(function(){C(K.options,R,_)},0):(P.verbose>1&&console.warn(u.colour.yellow+"Finished external resolution!",u.colour.normal),P.resolveInternal&&(P.verbose>1&&console.warn(u.colour.yellow+"Starting internal resolution!",u.colour.normal),P.openapi=l(P.openapi,P.original,{verbose:P.verbose-1}),P.verbose>1&&console.warn(u.colour.yellow+"Finished internal resolution!",u.colour.normal)),o(P.openapi,{},function(L,Q,D){c(L,Q)&&(P.preserveMiro||delete L["x-miro"])}),R(P))}).catch(function(L){P.verbose&&console.warn(L),_(L)})}).catch(function(K){P.verbose&&console.warn(K),_(K)})}function O(P){if(P.cache||(P.cache={}),P.fetch||(P.fetch=r),P.source){let R=a.parse(P.source);(!R.protocol||R.protocol.length<=2)&&(P.source=t.resolve(P.source))}P.externals=[],P.externalRefs={},P.rewriteRefs=!0,P.resolver={},P.resolver.depth=0,P.resolver.base=P.source,P.resolver.actions=[[]]}function S(P){return O(P),new Promise(function(R,_){P.resolve?C(P,R,_):R(P)})}function j(P,R,_){return _||(_={}),_.openapi=P,_.source=R,_.resolve=!0,O(_),new Promise(function(K,L){C(_,K,L)})}return XB={optionalResolve:S,resolve:j},XB}var YB,wne;function nit(){if(wne)return YB;wne=1;function e(){return{depth:0,seen:new WeakMap,top:!0,combine:!1,allowRefSiblings:!1}}function t(a,r,n,i){if(typeof n.depth>"u"&&(n=e()),a===null||typeof a>"u")return a;if(typeof a.$ref<"u"){let o={$ref:a.$ref};return n.allowRefSiblings&&a.description&&(o.description=a.description),i(o,r,n),o}if(n.combine&&(a.allOf&&Array.isArray(a.allOf)&&a.allOf.length===1&&(a=Object.assign({},a.allOf[0],a),delete a.allOf),a.anyOf&&Array.isArray(a.anyOf)&&a.anyOf.length===1&&(a=Object.assign({},a.anyOf[0],a),delete a.anyOf),a.oneOf&&Array.isArray(a.oneOf)&&a.oneOf.length===1&&(a=Object.assign({},a.oneOf[0],a),delete a.oneOf)),i(a,r,n),n.seen.has(a))return a;if(typeof a=="object"&&a!==null&&n.seen.set(a,!0),n.top=!1,n.depth++,typeof a.items<"u"&&(n.property="items",t(a.items,a,n,i)),a.additionalItems&&typeof a.additionalItems=="object"&&(n.property="additionalItems",t(a.additionalItems,a,n,i)),a.additionalProperties&&typeof a.additionalProperties=="object"&&(n.property="additionalProperties",t(a.additionalProperties,a,n,i)),a.properties)for(let o in a.properties){let s=a.properties[o];n.property="properties/"+o,t(s,a,n,i)}if(a.patternProperties)for(let o in a.patternProperties){let s=a.patternProperties[o];n.property="patternProperties/"+o,t(s,a,n,i)}if(a.allOf)for(let o in a.allOf){let s=a.allOf[o];n.property="allOf/"+o,t(s,a,n,i)}if(a.anyOf)for(let o in a.anyOf){let s=a.anyOf[o];n.property="anyOf/"+o,t(s,a,n,i)}if(a.oneOf)for(let o in a.oneOf){let s=a.oneOf[o];n.property="oneOf/"+o,t(s,a,n,i)}return a.not&&(n.property="not",t(a.not,a,n,i)),n.depth--,a}return YB={getDefaultState:e,walkSchema:t},YB}var One={},e7={exports:{}},zne={},Sne;function Cne(){return Sne||(Sne=1,(function(e){e.fetch=n(globalThis.fetch)&&n(globalThis.ReadableStream),e.writableStream=n(globalThis.WritableStream),e.abortController=n(globalThis.AbortController);var t;function a(){if(t!==void 0)return t;if(globalThis.XMLHttpRequest){t=new globalThis.XMLHttpRequest;try{t.open("GET",globalThis.XDomainRequest?"/":"https://example.com")}catch{t=null}}else t=null;return t}function r(i){var o=a();if(!o)return!1;try{return o.responseType=i,o.responseType===i}catch{}return!1}e.arraybuffer=e.fetch||r("arraybuffer"),e.msstream=!e.fetch&&r("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&r("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||(a()?n(a().overrideMimeType):!1);function n(i){return typeof i=="function"}t=null})(zne)),zne}var T2={},t7={exports:{}},M2={exports:{}},jne;function iit(){if(jne)return M2.exports;jne=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(C,O,S){return Function.prototype.apply.call(C,O,S)},a;e&&typeof e.ownKeys=="function"?a=e.ownKeys:Object.getOwnPropertySymbols?a=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:a=function(C){return Object.getOwnPropertyNames(C)};function r(C){console&&console.warn&&console.warn(C)}var n=Number.isNaN||function(C){return C!==C};function i(){i.init.call(this)}M2.exports=i,M2.exports.once=b,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function s(C){if(typeof C!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof C)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(C){if(typeof C!="number"||C<0||n(C))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+C+".");o=C}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||n(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function l(C){return C._maxListeners===void 0?i.defaultMaxListeners:C._maxListeners}i.prototype.getMaxListeners=function(){return l(this)},i.prototype.emit=function(C){for(var O=[],S=1;S<arguments.length;S++)O.push(arguments[S]);var j=C==="error",P=this._events;if(P!==void 0)j=j&&P.error===void 0;else if(!j)return!1;if(j){var R;if(O.length>0&&(R=O[0]),R instanceof Error)throw R;var _=new Error("Unhandled error."+(R?" ("+R.message+")":""));throw _.context=R,_}var K=P[C];if(K===void 0)return!1;if(typeof K=="function")t(K,this,O);else for(var L=K.length,Q=v(K,L),S=0;S<L;++S)t(Q[S],this,O);return!0};function c(C,O,S,j){var P,R,_;if(s(S),R=C._events,R===void 0?(R=C._events=Object.create(null),C._eventsCount=0):(R.newListener!==void 0&&(C.emit("newListener",O,S.listener?S.listener:S),R=C._events),_=R[O]),_===void 0)_=R[O]=S,++C._eventsCount;else if(typeof _=="function"?_=R[O]=j?[S,_]:[_,S]:j?_.unshift(S):_.push(S),P=l(C),P>0&&_.length>P&&!_.warned){_.warned=!0;var K=new Error("Possible EventEmitter memory leak detected. "+_.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");K.name="MaxListenersExceededWarning",K.emitter=C,K.type=O,K.count=_.length,r(K)}return C}i.prototype.addListener=function(C,O){return c(this,C,O,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(C,O){return c(this,C,O,!0)};function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(C,O,S){var j={fired:!1,wrapFn:void 0,target:C,type:O,listener:S},P=u.bind(j);return P.listener=S,j.wrapFn=P,P}i.prototype.once=function(C,O){return s(O),this.on(C,d(this,C,O)),this},i.prototype.prependOnceListener=function(C,O){return s(O),this.prependListener(C,d(this,C,O)),this},i.prototype.removeListener=function(C,O){var S,j,P,R,_;if(s(O),j=this._events,j===void 0)return this;if(S=j[C],S===void 0)return this;if(S===O||S.listener===O)--this._eventsCount===0?this._events=Object.create(null):(delete j[C],j.removeListener&&this.emit("removeListener",C,S.listener||O));else if(typeof S!="function"){for(P=-1,R=S.length-1;R>=0;R--)if(S[R]===O||S[R].listener===O){_=S[R].listener,P=R;break}if(P<0)return this;P===0?S.shift():f(S,P),S.length===1&&(j[C]=S[0]),j.removeListener!==void 0&&this.emit("removeListener",C,_||O)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(C){var O,S,j;if(S=this._events,S===void 0)return this;if(S.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):S[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete S[C]),this;if(arguments.length===0){var P=Object.keys(S),R;for(j=0;j<P.length;++j)R=P[j],R!=="removeListener"&&this.removeAllListeners(R);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(O=S[C],typeof O=="function")this.removeListener(C,O);else if(O!==void 0)for(j=O.length-1;j>=0;j--)this.removeListener(C,O[j]);return this};function h(C,O,S){var j=C._events;if(j===void 0)return[];var P=j[O];return P===void 0?[]:typeof P=="function"?S?[P.listener||P]:[P]:S?y(P):v(P,P.length)}i.prototype.listeners=function(C){return h(this,C,!0)},i.prototype.rawListeners=function(C){return h(this,C,!1)},i.listenerCount=function(C,O){return typeof C.listenerCount=="function"?C.listenerCount(O):m.call(C,O)},i.prototype.listenerCount=m;function m(C){var O=this._events;if(O!==void 0){var S=O[C];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]};function v(C,O){for(var S=new Array(O),j=0;j<O;++j)S[j]=C[j];return S}function f(C,O){for(;O+1<C.length;O++)C[O]=C[O+1];C.pop()}function y(C){for(var O=new Array(C.length),S=0;S<O.length;++S)O[S]=C[S].listener||C[S];return O}function b(C,O){return new Promise(function(S,j){function P(_){C.removeListener(O,R),j(_)}function R(){typeof C.removeListener=="function"&&C.removeListener("error",P),S([].slice.call(arguments))}w(C,O,R,{once:!0}),O!=="error"&&k(C,P,{once:!0})})}function k(C,O,S){typeof C.on=="function"&&w(C,"error",O,S)}function w(C,O,S,j){if(typeof C.on=="function")j.once?C.once(O,S):C.on(O,S);else if(typeof C.addEventListener=="function")C.addEventListener(O,function P(R){j.once&&C.removeEventListener(O,P),S(R)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof C)}return M2.exports}var Pne,Ane;function Tne(){return Ane||(Ane=1,Pne=iit().EventEmitter),Pne}var Mne={},e0={},Ene;function oit(){if(Ene)return e0;Ene=1,e0.byteLength=s,e0.toByteArray=c,e0.fromByteArray=h;for(var e=[],t=[],a=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,i=r.length;n<i;++n)e[n]=r[n],t[r.charCodeAt(n)]=n;t[45]=62,t[95]=63;function o(m){var v=m.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=m.indexOf("=");f===-1&&(f=v);var y=f===v?0:4-f%4;return[f,y]}function s(m){var v=o(m),f=v[0],y=v[1];return(f+y)*3/4-y}function l(m,v,f){return(v+f)*3/4-f}function c(m){var v,f=o(m),y=f[0],b=f[1],k=new a(l(m,y,b)),w=0,C=b>0?y-4:y,O;for(O=0;O<C;O+=4)v=t[m.charCodeAt(O)]<<18|t[m.charCodeAt(O+1)]<<12|t[m.charCodeAt(O+2)]<<6|t[m.charCodeAt(O+3)],k[w++]=v>>16&255,k[w++]=v>>8&255,k[w++]=v&255;return b===2&&(v=t[m.charCodeAt(O)]<<2|t[m.charCodeAt(O+1)]>>4,k[w++]=v&255),b===1&&(v=t[m.charCodeAt(O)]<<10|t[m.charCodeAt(O+1)]<<4|t[m.charCodeAt(O+2)]>>2,k[w++]=v>>8&255,k[w++]=v&255),k}function u(m){return e[m>>18&63]+e[m>>12&63]+e[m>>6&63]+e[m&63]}function d(m,v,f){for(var y,b=[],k=v;k<f;k+=3)y=(m[k]<<16&16711680)+(m[k+1]<<8&65280)+(m[k+2]&255),b.push(u(y));return b.join("")}function h(m){for(var v,f=m.length,y=f%3,b=[],k=16383,w=0,C=f-y;w<C;w+=k)b.push(d(m,w,w+k>C?C:w+k));return y===1?(v=m[f-1],b.push(e[v>>2]+e[v<<4&63]+"==")):y===2&&(v=(m[f-2]<<8)+m[f-1],b.push(e[v>>10]+e[v>>4&63]+e[v<<2&63]+"=")),b.join("")}return e0}var a7={},Bne;function sit(){return Bne||(Bne=1,a7.read=function(e,t,a,r,n){var i,o,s=n*8-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=a?n-1:0,h=a?-1:1,m=e[t+d];for(d+=h,i=m&(1<<-u)-1,m>>=-u,u+=s;u>0;i=i*256+e[t+d],d+=h,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=h,u-=8);if(i===0)i=1-c;else{if(i===l)return o?NaN:(m?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-c}return(m?-1:1)*o*Math.pow(2,i-r)},a7.write=function(e,t,a,r,n,i){var o,s,l,c=i*8-n-1,u=(1<<c)-1,d=u>>1,h=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:i-1,v=r?1:-1,f=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=h/l:t+=h*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,n),o=o+d):(s=t*Math.pow(2,d-1)*Math.pow(2,n),o=0));n>=8;e[a+m]=s&255,m+=v,s/=256,n-=8);for(o=o<<n|s,c+=n;c>0;e[a+m]=o&255,m+=v,o/=256,c-=8);e[a+m-v]|=f*128}),a7}var Rne;function t0(){return Rne||(Rne=1,(function(e){const t=oit(),a=sit(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=k,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const M=new Uint8Array(1),te={foo:function(){return 42}};return Object.setPrototypeOf(te,Uint8Array.prototype),Object.setPrototypeOf(M,te),M.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(M){if(M>n)throw new RangeError('The value "'+M+'" is invalid for option "size"');const te=new Uint8Array(M);return Object.setPrototypeOf(te,s.prototype),te}function s(M,te,le){if(typeof M=="number"){if(typeof te=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(M)}return l(M,te,le)}s.poolSize=8192;function l(M,te,le){if(typeof M=="string")return h(M,te);if(ArrayBuffer.isView(M))return v(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(fe(M,ArrayBuffer)||M&&fe(M.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(fe(M,SharedArrayBuffer)||M&&fe(M.buffer,SharedArrayBuffer)))return f(M,te,le);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ce=M.valueOf&&M.valueOf();if(Ce!=null&&Ce!==M)return s.from(Ce,te,le);const Te=y(M);if(Te)return Te;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return s.from(M[Symbol.toPrimitive]("string"),te,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}s.from=function(M,te,le){return l(M,te,le)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function u(M,te,le){return c(M),M<=0?o(M):te!==void 0?typeof le=="string"?o(M).fill(te,le):o(M).fill(te):o(M)}s.alloc=function(M,te,le){return u(M,te,le)};function d(M){return c(M),o(M<0?0:b(M)|0)}s.allocUnsafe=function(M){return d(M)},s.allocUnsafeSlow=function(M){return d(M)};function h(M,te){if((typeof te!="string"||te==="")&&(te="utf8"),!s.isEncoding(te))throw new TypeError("Unknown encoding: "+te);const le=w(M,te)|0;let Ce=o(le);const Te=Ce.write(M,te);return Te!==le&&(Ce=Ce.slice(0,Te)),Ce}function m(M){const te=M.length<0?0:b(M.length)|0,le=o(te);for(let Ce=0;Ce<te;Ce+=1)le[Ce]=M[Ce]&255;return le}function v(M){if(fe(M,Uint8Array)){const te=new Uint8Array(M);return f(te.buffer,te.byteOffset,te.byteLength)}return m(M)}function f(M,te,le){if(te<0||M.byteLength<te)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<te+(le||0))throw new RangeError('"length" is outside of buffer bounds');let Ce;return te===void 0&&le===void 0?Ce=new Uint8Array(M):le===void 0?Ce=new Uint8Array(M,te):Ce=new Uint8Array(M,te,le),Object.setPrototypeOf(Ce,s.prototype),Ce}function y(M){if(s.isBuffer(M)){const te=b(M.length)|0,le=o(te);return le.length===0||M.copy(le,0,0,te),le}if(M.length!==void 0)return typeof M.length!="number"||ye(M.length)?o(0):m(M);if(M.type==="Buffer"&&Array.isArray(M.data))return m(M.data)}function b(M){if(M>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return M|0}function k(M){return+M!=M&&(M=0),s.alloc(+M)}s.isBuffer=function(M){return M!=null&&M._isBuffer===!0&&M!==s.prototype},s.compare=function(M,te){if(fe(M,Uint8Array)&&(M=s.from(M,M.offset,M.byteLength)),fe(te,Uint8Array)&&(te=s.from(te,te.offset,te.byteLength)),!s.isBuffer(M)||!s.isBuffer(te))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(M===te)return 0;let le=M.length,Ce=te.length;for(let Te=0,Ee=Math.min(le,Ce);Te<Ee;++Te)if(M[Te]!==te[Te]){le=M[Te],Ce=te[Te];break}return le<Ce?-1:Ce<le?1:0},s.isEncoding=function(M){switch(String(M).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(M,te){if(!Array.isArray(M))throw new TypeError('"list" argument must be an Array of Buffers');if(M.length===0)return s.alloc(0);let le;if(te===void 0)for(te=0,le=0;le<M.length;++le)te+=M[le].length;const Ce=s.allocUnsafe(te);let Te=0;for(le=0;le<M.length;++le){let Ee=M[le];if(fe(Ee,Uint8Array))Te+Ee.length>Ce.length?(s.isBuffer(Ee)||(Ee=s.from(Ee)),Ee.copy(Ce,Te)):Uint8Array.prototype.set.call(Ce,Ee,Te);else if(s.isBuffer(Ee))Ee.copy(Ce,Te);else throw new TypeError('"list" argument must be an Array of Buffers');Te+=Ee.length}return Ce};function w(M,te){if(s.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||fe(M,ArrayBuffer))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);const le=M.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&le===0)return 0;let Te=!1;for(;;)switch(te){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return Z(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return ve(M).length;default:if(Te)return Ce?-1:Z(M).length;te=(""+te).toLowerCase(),Te=!0}}s.byteLength=w;function C(M,te,le){let Ce=!1;if((te===void 0||te<0)&&(te=0),te>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,te>>>=0,le<=te))return"";for(M||(M="utf8");;)switch(M){case"hex":return de(this,te,le);case"utf8":case"utf-8":return D(this,te,le);case"ascii":return oe(this,te,le);case"latin1":case"binary":return X(this,te,le);case"base64":return Q(this,te,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,te,le);default:if(Ce)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),Ce=!0}}s.prototype._isBuffer=!0;function O(M,te,le){const Ce=M[te];M[te]=M[le],M[le]=Ce}s.prototype.swap16=function(){const M=this.length;if(M%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let te=0;te<M;te+=2)O(this,te,te+1);return this},s.prototype.swap32=function(){const M=this.length;if(M%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let te=0;te<M;te+=4)O(this,te,te+3),O(this,te+1,te+2);return this},s.prototype.swap64=function(){const M=this.length;if(M%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let te=0;te<M;te+=8)O(this,te,te+7),O(this,te+1,te+6),O(this,te+2,te+5),O(this,te+3,te+4);return this},s.prototype.toString=function(){const M=this.length;return M===0?"":arguments.length===0?D(this,0,M):C.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(M){if(!s.isBuffer(M))throw new TypeError("Argument must be a Buffer");return this===M?!0:s.compare(this,M)===0},s.prototype.inspect=function(){let M="";const te=e.INSPECT_MAX_BYTES;return M=this.toString("hex",0,te).replace(/(.{2})/g,"$1 ").trim(),this.length>te&&(M+=" ... "),"<Buffer "+M+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(M,te,le,Ce,Te){if(fe(M,Uint8Array)&&(M=s.from(M,M.offset,M.byteLength)),!s.isBuffer(M))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof M);if(te===void 0&&(te=0),le===void 0&&(le=M?M.length:0),Ce===void 0&&(Ce=0),Te===void 0&&(Te=this.length),te<0||le>M.length||Ce<0||Te>this.length)throw new RangeError("out of range index");if(Ce>=Te&&te>=le)return 0;if(Ce>=Te)return-1;if(te>=le)return 1;if(te>>>=0,le>>>=0,Ce>>>=0,Te>>>=0,this===M)return 0;let Ee=Te-Ce,De=le-te;const at=Math.min(Ee,De),dt=this.slice(Ce,Te),gt=M.slice(te,le);for(let ct=0;ct<at;++ct)if(dt[ct]!==gt[ct]){Ee=dt[ct],De=gt[ct];break}return Ee<De?-1:De<Ee?1:0};function S(M,te,le,Ce,Te){if(M.length===0)return-1;if(typeof le=="string"?(Ce=le,le=0):le>2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,ye(le)&&(le=Te?0:M.length-1),le<0&&(le=M.length+le),le>=M.length){if(Te)return-1;le=M.length-1}else if(le<0)if(Te)le=0;else return-1;if(typeof te=="string"&&(te=s.from(te,Ce)),s.isBuffer(te))return te.length===0?-1:j(M,te,le,Ce,Te);if(typeof te=="number")return te=te&255,typeof Uint8Array.prototype.indexOf=="function"?Te?Uint8Array.prototype.indexOf.call(M,te,le):Uint8Array.prototype.lastIndexOf.call(M,te,le):j(M,[te],le,Ce,Te);throw new TypeError("val must be string, number or Buffer")}function j(M,te,le,Ce,Te){let Ee=1,De=M.length,at=te.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(M.length<2||te.length<2)return-1;Ee=2,De/=2,at/=2,le/=2}function dt(ct,Ot){return Ee===1?ct[Ot]:ct.readUInt16BE(Ot*Ee)}let gt;if(Te){let ct=-1;for(gt=le;gt<De;gt++)if(dt(M,gt)===dt(te,ct===-1?0:gt-ct)){if(ct===-1&&(ct=gt),gt-ct+1===at)return ct*Ee}else ct!==-1&&(gt-=gt-ct),ct=-1}else for(le+at>De&&(le=De-at),gt=le;gt>=0;gt--){let ct=!0;for(let Ot=0;Ot<at;Ot++)if(dt(M,gt+Ot)!==dt(te,Ot)){ct=!1;break}if(ct)return gt}return-1}s.prototype.includes=function(M,te,le){return this.indexOf(M,te,le)!==-1},s.prototype.indexOf=function(M,te,le){return S(this,M,te,le,!0)},s.prototype.lastIndexOf=function(M,te,le){return S(this,M,te,le,!1)};function P(M,te,le,Ce){le=Number(le)||0;const Te=M.length-le;Ce?(Ce=Number(Ce),Ce>Te&&(Ce=Te)):Ce=Te;const Ee=te.length;Ce>Ee/2&&(Ce=Ee/2);let De;for(De=0;De<Ce;++De){const at=parseInt(te.substr(De*2,2),16);if(ye(at))return De;M[le+De]=at}return De}function R(M,te,le,Ce){return ge(Z(te,M.length-le),M,le,Ce)}function _(M,te,le,Ce){return ge(ae(te),M,le,Ce)}function K(M,te,le,Ce){return ge(ve(te),M,le,Ce)}function L(M,te,le,Ce){return ge(ce(te,M.length-le),M,le,Ce)}s.prototype.write=function(M,te,le,Ce){if(te===void 0)Ce="utf8",le=this.length,te=0;else if(le===void 0&&typeof te=="string")Ce=te,le=this.length,te=0;else if(isFinite(te))te=te>>>0,isFinite(le)?(le=le>>>0,Ce===void 0&&(Ce="utf8")):(Ce=le,le=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Te=this.length-te;if((le===void 0||le>Te)&&(le=Te),M.length>0&&(le<0||te<0)||te>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ce||(Ce="utf8");let Ee=!1;for(;;)switch(Ce){case"hex":return P(this,M,te,le);case"utf8":case"utf-8":return R(this,M,te,le);case"ascii":case"latin1":case"binary":return _(this,M,te,le);case"base64":return K(this,M,te,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,M,te,le);default:if(Ee)throw new TypeError("Unknown encoding: "+Ce);Ce=(""+Ce).toLowerCase(),Ee=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(M,te,le){return te===0&&le===M.length?t.fromByteArray(M):t.fromByteArray(M.slice(te,le))}function D(M,te,le){le=Math.min(M.length,le);const Ce=[];let Te=te;for(;Te<le;){const Ee=M[Te];let De=null,at=Ee>239?4:Ee>223?3:Ee>191?2:1;if(Te+at<=le){let dt,gt,ct,Ot;switch(at){case 1:Ee<128&&(De=Ee);break;case 2:dt=M[Te+1],(dt&192)===128&&(Ot=(Ee&31)<<6|dt&63,Ot>127&&(De=Ot));break;case 3:dt=M[Te+1],gt=M[Te+2],(dt&192)===128&&(gt&192)===128&&(Ot=(Ee&15)<<12|(dt&63)<<6|gt&63,Ot>2047&&(Ot<55296||Ot>57343)&&(De=Ot));break;case 4:dt=M[Te+1],gt=M[Te+2],ct=M[Te+3],(dt&192)===128&&(gt&192)===128&&(ct&192)===128&&(Ot=(Ee&15)<<18|(dt&63)<<12|(gt&63)<<6|ct&63,Ot>65535&&Ot<1114112&&(De=Ot))}}De===null?(De=65533,at=1):De>65535&&(De-=65536,Ce.push(De>>>10&1023|55296),De=56320|De&1023),Ce.push(De),Te+=at}return ee(Ce)}const Y=4096;function ee(M){const te=M.length;if(te<=Y)return String.fromCharCode.apply(String,M);let le="",Ce=0;for(;Ce<te;)le+=String.fromCharCode.apply(String,M.slice(Ce,Ce+=Y));return le}function oe(M,te,le){let Ce="";le=Math.min(M.length,le);for(let Te=te;Te<le;++Te)Ce+=String.fromCharCode(M[Te]&127);return Ce}function X(M,te,le){let Ce="";le=Math.min(M.length,le);for(let Te=te;Te<le;++Te)Ce+=String.fromCharCode(M[Te]);return Ce}function de(M,te,le){const Ce=M.length;(!te||te<0)&&(te=0),(!le||le<0||le>Ce)&&(le=Ce);let Te="";for(let Ee=te;Ee<le;++Ee)Te+=Se[M[Ee]];return Te}function W(M,te,le){const Ce=M.slice(te,le);let Te="";for(let Ee=0;Ee<Ce.length-1;Ee+=2)Te+=String.fromCharCode(Ce[Ee]+Ce[Ee+1]*256);return Te}s.prototype.slice=function(M,te){const le=this.length;M=~~M,te=te===void 0?le:~~te,M<0?(M+=le,M<0&&(M=0)):M>le&&(M=le),te<0?(te+=le,te<0&&(te=0)):te>le&&(te=le),te<M&&(te=M);const Ce=this.subarray(M,te);return Object.setPrototypeOf(Ce,s.prototype),Ce};function I(M,te,le){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+te>le)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(M,te,le){M=M>>>0,te=te>>>0,le||I(M,te,this.length);let Ce=this[M],Te=1,Ee=0;for(;++Ee<te&&(Te*=256);)Ce+=this[M+Ee]*Te;return Ce},s.prototype.readUintBE=s.prototype.readUIntBE=function(M,te,le){M=M>>>0,te=te>>>0,le||I(M,te,this.length);let Ce=this[M+--te],Te=1;for(;te>0&&(Te*=256);)Ce+=this[M+--te]*Te;return Ce},s.prototype.readUint8=s.prototype.readUInt8=function(M,te){return M=M>>>0,te||I(M,1,this.length),this[M]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(M,te){return M=M>>>0,te||I(M,2,this.length),this[M]|this[M+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(M,te){return M=M>>>0,te||I(M,2,this.length),this[M]<<8|this[M+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(M,te){return M=M>>>0,te||I(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+this[M+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(M,te){return M=M>>>0,te||I(M,4,this.length),this[M]*16777216+(this[M+1]<<16|this[M+2]<<8|this[M+3])},s.prototype.readBigUInt64LE=Me(function(M){M=M>>>0,re(M,"offset");const te=this[M],le=this[M+7];(te===void 0||le===void 0)&&q(M,this.length-8);const Ce=te+this[++M]*2**8+this[++M]*2**16+this[++M]*2**24,Te=this[++M]+this[++M]*2**8+this[++M]*2**16+le*2**24;return BigInt(Ce)+(BigInt(Te)<<BigInt(32))}),s.prototype.readBigUInt64BE=Me(function(M){M=M>>>0,re(M,"offset");const te=this[M],le=this[M+7];(te===void 0||le===void 0)&&q(M,this.length-8);const Ce=te*2**24+this[++M]*2**16+this[++M]*2**8+this[++M],Te=this[++M]*2**24+this[++M]*2**16+this[++M]*2**8+le;return(BigInt(Ce)<<BigInt(32))+BigInt(Te)}),s.prototype.readIntLE=function(M,te,le){M=M>>>0,te=te>>>0,le||I(M,te,this.length);let Ce=this[M],Te=1,Ee=0;for(;++Ee<te&&(Te*=256);)Ce+=this[M+Ee]*Te;return Te*=128,Ce>=Te&&(Ce-=Math.pow(2,8*te)),Ce},s.prototype.readIntBE=function(M,te,le){M=M>>>0,te=te>>>0,le||I(M,te,this.length);let Ce=te,Te=1,Ee=this[M+--Ce];for(;Ce>0&&(Te*=256);)Ee+=this[M+--Ce]*Te;return Te*=128,Ee>=Te&&(Ee-=Math.pow(2,8*te)),Ee},s.prototype.readInt8=function(M,te){return M=M>>>0,te||I(M,1,this.length),this[M]&128?(255-this[M]+1)*-1:this[M]},s.prototype.readInt16LE=function(M,te){M=M>>>0,te||I(M,2,this.length);const le=this[M]|this[M+1]<<8;return le&32768?le|4294901760:le},s.prototype.readInt16BE=function(M,te){M=M>>>0,te||I(M,2,this.length);const le=this[M+1]|this[M]<<8;return le&32768?le|4294901760:le},s.prototype.readInt32LE=function(M,te){return M=M>>>0,te||I(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},s.prototype.readInt32BE=function(M,te){return M=M>>>0,te||I(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},s.prototype.readBigInt64LE=Me(function(M){M=M>>>0,re(M,"offset");const te=this[M],le=this[M+7];(te===void 0||le===void 0)&&q(M,this.length-8);const Ce=this[M+4]+this[M+5]*2**8+this[M+6]*2**16+(le<<24);return(BigInt(Ce)<<BigInt(32))+BigInt(te+this[++M]*2**8+this[++M]*2**16+this[++M]*2**24)}),s.prototype.readBigInt64BE=Me(function(M){M=M>>>0,re(M,"offset");const te=this[M],le=this[M+7];(te===void 0||le===void 0)&&q(M,this.length-8);const Ce=(te<<24)+this[++M]*2**16+this[++M]*2**8+this[++M];return(BigInt(Ce)<<BigInt(32))+BigInt(this[++M]*2**24+this[++M]*2**16+this[++M]*2**8+le)}),s.prototype.readFloatLE=function(M,te){return M=M>>>0,te||I(M,4,this.length),a.read(this,M,!0,23,4)},s.prototype.readFloatBE=function(M,te){return M=M>>>0,te||I(M,4,this.length),a.read(this,M,!1,23,4)},s.prototype.readDoubleLE=function(M,te){return M=M>>>0,te||I(M,8,this.length),a.read(this,M,!0,52,8)},s.prototype.readDoubleBE=function(M,te){return M=M>>>0,te||I(M,8,this.length),a.read(this,M,!1,52,8)};function J(M,te,le,Ce,Te,Ee){if(!s.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(te>Te||te<Ee)throw new RangeError('"value" argument is out of bounds');if(le+Ce>M.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(M,te,le,Ce){if(M=+M,te=te>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;J(this,M,te,le,De,0)}let Te=1,Ee=0;for(this[te]=M&255;++Ee<le&&(Te*=256);)this[te+Ee]=M/Te&255;return te+le},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(M,te,le,Ce){if(M=+M,te=te>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;J(this,M,te,le,De,0)}let Te=le-1,Ee=1;for(this[te+Te]=M&255;--Te>=0&&(Ee*=256);)this[te+Te]=M/Ee&255;return te+le},s.prototype.writeUint8=s.prototype.writeUInt8=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,1,255,0),this[te]=M&255,te+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,2,65535,0),this[te]=M&255,this[te+1]=M>>>8,te+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,2,65535,0),this[te]=M>>>8,this[te+1]=M&255,te+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,4,4294967295,0),this[te+3]=M>>>24,this[te+2]=M>>>16,this[te+1]=M>>>8,this[te]=M&255,te+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,4,4294967295,0),this[te]=M>>>24,this[te+1]=M>>>16,this[te+2]=M>>>8,this[te+3]=M&255,te+4};function G(M,te,le,Ce,Te){$(te,Ce,Te,M,le,7);let Ee=Number(te&BigInt(4294967295));M[le++]=Ee,Ee=Ee>>8,M[le++]=Ee,Ee=Ee>>8,M[le++]=Ee,Ee=Ee>>8,M[le++]=Ee;let De=Number(te>>BigInt(32)&BigInt(4294967295));return M[le++]=De,De=De>>8,M[le++]=De,De=De>>8,M[le++]=De,De=De>>8,M[le++]=De,le}function B(M,te,le,Ce,Te){$(te,Ce,Te,M,le,7);let Ee=Number(te&BigInt(4294967295));M[le+7]=Ee,Ee=Ee>>8,M[le+6]=Ee,Ee=Ee>>8,M[le+5]=Ee,Ee=Ee>>8,M[le+4]=Ee;let De=Number(te>>BigInt(32)&BigInt(4294967295));return M[le+3]=De,De=De>>8,M[le+2]=De,De=De>>8,M[le+1]=De,De=De>>8,M[le]=De,le+8}s.prototype.writeBigUInt64LE=Me(function(M,te=0){return G(this,M,te,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Me(function(M,te=0){return B(this,M,te,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(M,te,le,Ce){if(M=+M,te=te>>>0,!Ce){const at=Math.pow(2,8*le-1);J(this,M,te,le,at-1,-at)}let Te=0,Ee=1,De=0;for(this[te]=M&255;++Te<le&&(Ee*=256);)M<0&&De===0&&this[te+Te-1]!==0&&(De=1),this[te+Te]=(M/Ee>>0)-De&255;return te+le},s.prototype.writeIntBE=function(M,te,le,Ce){if(M=+M,te=te>>>0,!Ce){const at=Math.pow(2,8*le-1);J(this,M,te,le,at-1,-at)}let Te=le-1,Ee=1,De=0;for(this[te+Te]=M&255;--Te>=0&&(Ee*=256);)M<0&&De===0&&this[te+Te+1]!==0&&(De=1),this[te+Te]=(M/Ee>>0)-De&255;return te+le},s.prototype.writeInt8=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,1,127,-128),M<0&&(M=255+M+1),this[te]=M&255,te+1},s.prototype.writeInt16LE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,2,32767,-32768),this[te]=M&255,this[te+1]=M>>>8,te+2},s.prototype.writeInt16BE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,2,32767,-32768),this[te]=M>>>8,this[te+1]=M&255,te+2},s.prototype.writeInt32LE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,4,2147483647,-2147483648),this[te]=M&255,this[te+1]=M>>>8,this[te+2]=M>>>16,this[te+3]=M>>>24,te+4},s.prototype.writeInt32BE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),this[te]=M>>>24,this[te+1]=M>>>16,this[te+2]=M>>>8,this[te+3]=M&255,te+4},s.prototype.writeBigInt64LE=Me(function(M,te=0){return G(this,M,te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Me(function(M,te=0){return B(this,M,te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function N(M,te,le,Ce,Te,Ee){if(le+Ce>M.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function F(M,te,le,Ce,Te){return te=+te,le=le>>>0,Te||N(M,te,le,4),a.write(M,te,le,Ce,23,4),le+4}s.prototype.writeFloatLE=function(M,te,le){return F(this,M,te,!0,le)},s.prototype.writeFloatBE=function(M,te,le){return F(this,M,te,!1,le)};function ne(M,te,le,Ce,Te){return te=+te,le=le>>>0,Te||N(M,te,le,8),a.write(M,te,le,Ce,52,8),le+8}s.prototype.writeDoubleLE=function(M,te,le){return ne(this,M,te,!0,le)},s.prototype.writeDoubleBE=function(M,te,le){return ne(this,M,te,!1,le)},s.prototype.copy=function(M,te,le,Ce){if(!s.isBuffer(M))throw new TypeError("argument should be a Buffer");if(le||(le=0),!Ce&&Ce!==0&&(Ce=this.length),te>=M.length&&(te=M.length),te||(te=0),Ce>0&&Ce<le&&(Ce=le),Ce===le||M.length===0||this.length===0)return 0;if(te<0)throw new RangeError("targetStart out of bounds");if(le<0||le>=this.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("sourceEnd out of bounds");Ce>this.length&&(Ce=this.length),M.length-te<Ce-le&&(Ce=M.length-te+le);const Te=Ce-le;return this===M&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(te,le,Ce):Uint8Array.prototype.set.call(M,this.subarray(le,Ce),te),Te},s.prototype.fill=function(M,te,le,Ce){if(typeof M=="string"){if(typeof te=="string"?(Ce=te,te=0,le=this.length):typeof le=="string"&&(Ce=le,le=this.length),Ce!==void 0&&typeof Ce!="string")throw new TypeError("encoding must be a string");if(typeof Ce=="string"&&!s.isEncoding(Ce))throw new TypeError("Unknown encoding: "+Ce);if(M.length===1){const Ee=M.charCodeAt(0);(Ce==="utf8"&&Ee<128||Ce==="latin1")&&(M=Ee)}}else typeof M=="number"?M=M&255:typeof M=="boolean"&&(M=Number(M));if(te<0||this.length<te||this.length<le)throw new RangeError("Out of range index");if(le<=te)return this;te=te>>>0,le=le===void 0?this.length:le>>>0,M||(M=0);let Te;if(typeof M=="number")for(Te=te;Te<le;++Te)this[Te]=M;else{const Ee=s.isBuffer(M)?M:s.from(M,Ce),De=Ee.length;if(De===0)throw new TypeError('The value "'+M+'" is invalid for argument "value"');for(Te=0;Te<le-te;++Te)this[Te+te]=Ee[Te%De]}return this};const se={};function be(M,te,le){se[M]=class extends le{constructor(){super(),Object.defineProperty(this,"message",{value:te.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${M}]`,delete this.name}get code(){return M}set code(Ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ce,writable:!0})}toString(){return`${this.name} [${M}]: ${this.message}`}}}be("ERR_BUFFER_OUT_OF_BOUNDS",function(M){return M?`${M} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(M,te){return`The "${M}" argument must be of type number. Received type ${typeof te}`},TypeError),be("ERR_OUT_OF_RANGE",function(M,te,le){let Ce=`The value of "${M}" is out of range.`,Te=le;return Number.isInteger(le)&&Math.abs(le)>2**32?Te=xe(String(le)):typeof le=="bigint"&&(Te=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Te=xe(Te)),Te+="n"),Ce+=` It must be ${te}. Received ${Te}`,Ce},RangeError);function xe(M){let te="",le=M.length;const Ce=M[0]==="-"?1:0;for(;le>=Ce+4;le-=3)te=`_${M.slice(le-3,le)}${te}`;return`${M.slice(0,le)}${te}`}function E(M,te,le){re(te,"offset"),(M[te]===void 0||M[te+le]===void 0)&&q(te,M.length-(le+1))}function $(M,te,le,Ce,Te,Ee){if(M>le||M<te){const De=typeof te=="bigint"?"n":"";let at;throw te===0||te===BigInt(0)?at=`>= 0${De} and < 2${De} ** ${(Ee+1)*8}${De}`:at=`>= -(2${De} ** ${(Ee+1)*8-1}${De}) and < 2 ** ${(Ee+1)*8-1}${De}`,new se.ERR_OUT_OF_RANGE("value",at,M)}E(Ce,Te,Ee)}function re(M,te){if(typeof M!="number")throw new se.ERR_INVALID_ARG_TYPE(te,"number",M)}function q(M,te,le){throw Math.floor(M)!==M?(re(M,le),new se.ERR_OUT_OF_RANGE("offset","an integer",M)):te<0?new se.ERR_BUFFER_OUT_OF_BOUNDS:new se.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${te}`,M)}const ue=/[^+/0-9A-Za-z-_]/g;function pe(M){if(M=M.split("=")[0],M=M.trim().replace(ue,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function Z(M,te){te=te||1/0;let le;const Ce=M.length;let Te=null;const Ee=[];for(let De=0;De<Ce;++De){if(le=M.charCodeAt(De),le>55295&&le<57344){if(!Te){if(le>56319){(te-=3)>-1&&Ee.push(239,191,189);continue}else if(De+1===Ce){(te-=3)>-1&&Ee.push(239,191,189);continue}Te=le;continue}if(le<56320){(te-=3)>-1&&Ee.push(239,191,189),Te=le;continue}le=(Te-55296<<10|le-56320)+65536}else Te&&(te-=3)>-1&&Ee.push(239,191,189);if(Te=null,le<128){if((te-=1)<0)break;Ee.push(le)}else if(le<2048){if((te-=2)<0)break;Ee.push(le>>6|192,le&63|128)}else if(le<65536){if((te-=3)<0)break;Ee.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((te-=4)<0)break;Ee.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Ee}function ae(M){const te=[];for(let le=0;le<M.length;++le)te.push(M.charCodeAt(le)&255);return te}function ce(M,te){let le,Ce,Te;const Ee=[];for(let De=0;De<M.length&&!((te-=2)<0);++De)le=M.charCodeAt(De),Ce=le>>8,Te=le%256,Ee.push(Te),Ee.push(Ce);return Ee}function ve(M){return t.toByteArray(pe(M))}function ge(M,te,le,Ce){let Te;for(Te=0;Te<Ce&&!(Te+le>=te.length||Te>=M.length);++Te)te[Te+le]=M[Te];return Te}function fe(M,te){return M instanceof te||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===te.name}function ye(M){return M!==M}const Se=(function(){const M="0123456789abcdef",te=new Array(256);for(let le=0;le<16;++le){const Ce=le*16;for(let Te=0;Te<16;++Te)te[Ce+Te]=M[le]+M[Te]}return te})();function Me(M){return typeof BigInt>"u"?tt:M}function tt(){throw new Error("BigInt not supported")}})(Mne)),Mne}const _ne=Aq(Cae);var r7,Lne;function lit(){if(Lne)return r7;Lne=1;function e(v,f){var y=Object.keys(v);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(v);f&&(b=b.filter(function(k){return Object.getOwnPropertyDescriptor(v,k).enumerable})),y.push.apply(y,b)}return y}function t(v){for(var f=1;f<arguments.length;f++){var y=arguments[f]!=null?arguments[f]:{};f%2?e(Object(y),!0).forEach(function(b){a(v,b,y[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(b){Object.defineProperty(v,b,Object.getOwnPropertyDescriptor(y,b))})}return v}function a(v,f,y){return f=o(f),f in v?Object.defineProperty(v,f,{value:y,enumerable:!0,configurable:!0,writable:!0}):v[f]=y,v}function r(v,f){if(!(v instanceof f))throw new TypeError("Cannot call a class as a function")}function n(v,f){for(var y=0;y<f.length;y++){var b=f[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,o(b.key),b)}}function i(v,f,y){return f&&n(v.prototype,f),Object.defineProperty(v,"prototype",{writable:!1}),v}function o(v){var f=s(v,"string");return typeof f=="symbol"?f:String(f)}function s(v,f){if(typeof v!="object"||v===null)return v;var y=v[Symbol.toPrimitive];if(y!==void 0){var b=y.call(v,f);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(v)}var l=t0(),c=l.Buffer,u=_ne,d=u.inspect,h=d&&d.custom||"inspect";function m(v,f,y){c.prototype.copy.call(v,f,y)}return r7=(function(){function v(){r(this,v),this.head=null,this.tail=null,this.length=0}return i(v,[{key:"push",value:function(f){var y={data:f,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(f){var y={data:f,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(f){if(this.length===0)return"";for(var y=this.head,b=""+y.data;y=y.next;)b+=f+y.data;return b}},{key:"concat",value:function(f){if(this.length===0)return c.alloc(0);for(var y=c.allocUnsafe(f>>>0),b=this.head,k=0;b;)m(b.data,y,k),k+=b.data.length,b=b.next;return y}},{key:"consume",value:function(f,y){var b;return f<this.head.data.length?(b=this.head.data.slice(0,f),this.head.data=this.head.data.slice(f)):f===this.head.data.length?b=this.shift():b=y?this._getString(f):this._getBuffer(f),b}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(f){var y=this.head,b=1,k=y.data;for(f-=k.length;y=y.next;){var w=y.data,C=f>w.length?w.length:f;if(C===w.length?k+=w:k+=w.slice(0,f),f-=C,f===0){C===w.length?(++b,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=w.slice(C));break}++b}return this.length-=b,k}},{key:"_getBuffer",value:function(f){var y=c.allocUnsafe(f),b=this.head,k=1;for(b.data.copy(y),f-=b.data.length;b=b.next;){var w=b.data,C=f>w.length?w.length:f;if(w.copy(y,y.length-f,0,C),f-=C,f===0){C===w.length?(++k,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=w.slice(C));break}++k}return this.length-=k,y}},{key:h,value:function(f,y){return d(this,t(t({},y),{},{depth:0,customInspect:!1}))}}]),v})(),r7}var n7,Dne;function Nne(){if(Dne)return n7;Dne=1;function e(o,s){var l=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,o)):process.nextTick(n,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(d){!s&&d?l._writableState?l._writableState.errorEmitted?process.nextTick(a,l):(l._writableState.errorEmitted=!0,process.nextTick(t,l,d)):process.nextTick(t,l,d):s?(process.nextTick(a,l),s(d)):process.nextTick(a,l)}),this)}function t(o,s){n(o,s),a(o)}function a(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function n(o,s){o.emit("error",s)}function i(o,s){var l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(s):o.emit("error",s)}return n7={destroy:e,undestroy:r,errorOrDestroy:i},n7}var i7={},$ne;function Vv(){if($ne)return i7;$ne=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var t={};function a(s,l,c){c||(c=Error);function u(h,m,v){return typeof l=="string"?l:l(h,m,v)}var d=(function(h){e(m,h);function m(v,f,y){return h.call(this,u(v,f,y))||this}return m})(c);d.prototype.name=c.name,d.prototype.code=s,t[s]=d}function r(s,l){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(l," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}else return"of ".concat(l," ").concat(String(s))}function n(s,l,c){return s.substr(0,l.length)===l}function i(s,l,c){return(c===void 0||c>s.length)&&(c=s.length),s.substring(c-l.length,c)===l}function o(s,l,c){return typeof c!="number"&&(c=0),c+l.length>s.length?!1:s.indexOf(l,c)!==-1}return a("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),a("ERR_INVALID_ARG_TYPE",function(s,l,c){var u;typeof l=="string"&&n(l,"not ")?(u="must not be",l=l.replace(/^not /,"")):u="must be";var d;if(i(s," argument"))d="The ".concat(s," ").concat(u," ").concat(r(l,"type"));else{var h=o(s,".")?"property":"argument";d='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(l,"type"))}return d+=". Received type ".concat(typeof c),d},TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i7.codes=t,i7}var o7,Ine;function Kne(){if(Ine)return o7;Ine=1;var e=Vv().codes.ERR_INVALID_OPT_VALUE;function t(r,n,i){return r.highWaterMark!=null?r.highWaterMark:n?r[i]:null}function a(r,n,i,o){var s=t(n,o,i);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var l=o?i:"highWaterMark";throw new e(l,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return o7={getHighWaterMark:a},o7}var s7,Vne;function cit(){if(Vne)return s7;Vne=1,s7=e;function e(a,r){if(t("noDeprecation"))return a;var n=!1;function i(){if(!n){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return a.apply(this,arguments)}return i}function t(a){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[a];return r==null?!1:String(r).toLowerCase()==="true"}return s7}var l7,Hne;function Fne(){if(Hne)return l7;Hne=1,l7=P;function e(F){var ne=this;this.next=null,this.entry=null,this.finish=function(){N(ne,F)}}var t;P.WritableState=S;var a={deprecate:cit()},r=Tne(),n=t0().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(F){return n.from(F)}function s(F){return n.isBuffer(F)||F instanceof i}var l=Nne(),c=Kne(),u=c.getHighWaterMark,d=Vv().codes,h=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,v=d.ERR_MULTIPLE_CALLBACK,f=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,k=d.ERR_STREAM_WRITE_AFTER_END,w=d.ERR_UNKNOWN_ENCODING,C=l.errorOrDestroy;function O(){}function S(F,ne,se){t=t||Hv(),F=F||{},typeof se!="boolean"&&(se=ne instanceof t),this.objectMode=!!F.objectMode,se&&(this.objectMode=this.objectMode||!!F.writableObjectMode),this.highWaterMark=u(this,F,"writableHighWaterMark",se),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var be=F.decodeStrings===!1;this.decodeStrings=!be,this.defaultEncoding=F.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(xe){ee(ne,xe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=F.emitClose!==!1,this.autoDestroy=!!F.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}S.prototype.getBuffer=function(){for(var F=this.bufferedRequest,ne=[];F;)ne.push(F),F=F.next;return ne},(function(){try{Object.defineProperty(S.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var j;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(F){return j.call(this,F)?!0:this!==P?!1:F&&F._writableState instanceof S}})):j=function(F){return F instanceof this};function P(F){t=t||Hv();var ne=this instanceof t;if(!ne&&!j.call(P,this))return new P(F);this._writableState=new S(F,this,ne),this.writable=!0,F&&(typeof F.write=="function"&&(this._write=F.write),typeof F.writev=="function"&&(this._writev=F.writev),typeof F.destroy=="function"&&(this._destroy=F.destroy),typeof F.final=="function"&&(this._final=F.final)),r.call(this)}P.prototype.pipe=function(){C(this,new f)};function R(F,ne){var se=new k;C(F,se),process.nextTick(ne,se)}function _(F,ne,se,be){var xe;return se===null?xe=new b:typeof se!="string"&&!ne.objectMode&&(xe=new h("chunk",["string","Buffer"],se)),xe?(C(F,xe),process.nextTick(be,xe),!1):!0}P.prototype.write=function(F,ne,se){var be=this._writableState,xe=!1,E=!be.objectMode&&s(F);return E&&!n.isBuffer(F)&&(F=o(F)),typeof ne=="function"&&(se=ne,ne=null),E?ne="buffer":ne||(ne=be.defaultEncoding),typeof se!="function"&&(se=O),be.ending?R(this,se):(E||_(this,be,F,se))&&(be.pendingcb++,xe=L(this,be,E,F,ne,se)),xe},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var F=this._writableState;F.corked&&(F.corked--,!F.writing&&!F.corked&&!F.bufferProcessing&&F.bufferedRequest&&de(this,F))},P.prototype.setDefaultEncoding=function(F){if(typeof F=="string"&&(F=F.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((F+"").toLowerCase())>-1))throw new w(F);return this._writableState.defaultEncoding=F,this},Object.defineProperty(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function K(F,ne,se){return!F.objectMode&&F.decodeStrings!==!1&&typeof ne=="string"&&(ne=n.from(ne,se)),ne}Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function L(F,ne,se,be,xe,E){if(!se){var $=K(ne,be,xe);be!==$&&(se=!0,xe="buffer",be=$)}var re=ne.objectMode?1:be.length;ne.length+=re;var q=ne.length<ne.highWaterMark;if(q||(ne.needDrain=!0),ne.writing||ne.corked){var ue=ne.lastBufferedRequest;ne.lastBufferedRequest={chunk:be,encoding:xe,isBuf:se,callback:E,next:null},ue?ue.next=ne.lastBufferedRequest:ne.bufferedRequest=ne.lastBufferedRequest,ne.bufferedRequestCount+=1}else Q(F,ne,!1,re,be,xe,E);return q}function Q(F,ne,se,be,xe,E,$){ne.writelen=be,ne.writecb=$,ne.writing=!0,ne.sync=!0,ne.destroyed?ne.onwrite(new y("write")):se?F._writev(xe,ne.onwrite):F._write(xe,E,ne.onwrite),ne.sync=!1}function D(F,ne,se,be,xe){--ne.pendingcb,se?(process.nextTick(xe,be),process.nextTick(G,F,ne),F._writableState.errorEmitted=!0,C(F,be)):(xe(be),F._writableState.errorEmitted=!0,C(F,be),G(F,ne))}function Y(F){F.writing=!1,F.writecb=null,F.length-=F.writelen,F.writelen=0}function ee(F,ne){var se=F._writableState,be=se.sync,xe=se.writecb;if(typeof xe!="function")throw new v;if(Y(se),ne)D(F,se,be,ne,xe);else{var E=W(se)||F.destroyed;!E&&!se.corked&&!se.bufferProcessing&&se.bufferedRequest&&de(F,se),be?process.nextTick(oe,F,se,E,xe):oe(F,se,E,xe)}}function oe(F,ne,se,be){se||X(F,ne),ne.pendingcb--,be(),G(F,ne)}function X(F,ne){ne.length===0&&ne.needDrain&&(ne.needDrain=!1,F.emit("drain"))}function de(F,ne){ne.bufferProcessing=!0;var se=ne.bufferedRequest;if(F._writev&&se&&se.next){var be=ne.bufferedRequestCount,xe=new Array(be),E=ne.corkedRequestsFree;E.entry=se;for(var $=0,re=!0;se;)xe[$]=se,se.isBuf||(re=!1),se=se.next,$+=1;xe.allBuffers=re,Q(F,ne,!0,ne.length,xe,"",E.finish),ne.pendingcb++,ne.lastBufferedRequest=null,E.next?(ne.corkedRequestsFree=E.next,E.next=null):ne.corkedRequestsFree=new e(ne),ne.bufferedRequestCount=0}else{for(;se;){var q=se.chunk,ue=se.encoding,pe=se.callback,Z=ne.objectMode?1:q.length;if(Q(F,ne,!1,Z,q,ue,pe),se=se.next,ne.bufferedRequestCount--,ne.writing)break}se===null&&(ne.lastBufferedRequest=null)}ne.bufferedRequest=se,ne.bufferProcessing=!1}P.prototype._write=function(F,ne,se){se(new m("_write()"))},P.prototype._writev=null,P.prototype.end=function(F,ne,se){var be=this._writableState;return typeof F=="function"?(se=F,F=null,ne=null):typeof ne=="function"&&(se=ne,ne=null),F!=null&&this.write(F,ne),be.corked&&(be.corked=1,this.uncork()),be.ending||B(this,be,se),this},Object.defineProperty(P.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function W(F){return F.ending&&F.length===0&&F.bufferedRequest===null&&!F.finished&&!F.writing}function I(F,ne){F._final(function(se){ne.pendingcb--,se&&C(F,se),ne.prefinished=!0,F.emit("prefinish"),G(F,ne)})}function J(F,ne){!ne.prefinished&&!ne.finalCalled&&(typeof F._final=="function"&&!ne.destroyed?(ne.pendingcb++,ne.finalCalled=!0,process.nextTick(I,F,ne)):(ne.prefinished=!0,F.emit("prefinish")))}function G(F,ne){var se=W(ne);if(se&&(J(F,ne),ne.pendingcb===0&&(ne.finished=!0,F.emit("finish"),ne.autoDestroy))){var be=F._readableState;(!be||be.autoDestroy&&be.endEmitted)&&F.destroy()}return se}function B(F,ne,se){ne.ending=!0,G(F,ne),se&&(ne.finished?process.nextTick(se):F.once("finish",se)),ne.ended=!0,F.writable=!1}function N(F,ne,se){var be=F.entry;for(F.entry=null;be;){var xe=be.callback;ne.pendingcb--,xe(se),be=be.next}ne.corkedRequestsFree.next=F}return Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(F){this._writableState&&(this._writableState.destroyed=F)}}),P.prototype.destroy=l.destroy,P.prototype._undestroy=l.undestroy,P.prototype._destroy=function(F,ne){ne(F)},l7}var c7,Gne;function Hv(){if(Gne)return c7;Gne=1;var e=Object.keys||function(c){var u=[];for(var d in c)u.push(d);return u};c7=o;for(var t=eie(),a=Fne(),r=e(a.prototype),n=0;n<r.length;n++){var i=r[n];o.prototype[i]||(o.prototype[i]=a.prototype[i])}function o(c){if(!(this instanceof o))return new o(c);t.call(this,c),a.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),c7}var u7={},d7={exports:{}},qne;function uit(){return qne||(qne=1,(function(e,t){var a=t0(),r=a.Buffer;function n(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=a:(n(a,t),t.Buffer=i);function i(o,s,l){return r(o,s,l)}i.prototype=Object.create(r.prototype),n(r,i),i.from=function(o,s,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,l)},i.alloc=function(o,s,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=r(o);return s!==void 0?typeof l=="string"?c.fill(s,l):c.fill(s):c.fill(0),c},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return a.SlowBuffer(o)}})(d7,d7.exports)),d7.exports}var Qne;function Une(){if(Qne)return u7;Qne=1;var e=uit().Buffer,t=e.isEncoding||function(b){switch(b=""+b,b&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(b){if(!b)return"utf8";for(var k;;)switch(b){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return b;default:if(k)return;b=(""+b).toLowerCase(),k=!0}}function r(b){var k=a(b);if(typeof k!="string"&&(e.isEncoding===t||!t(b)))throw new Error("Unknown encoding: "+b);return k||b}u7.StringDecoder=n;function n(b){this.encoding=r(b);var k;switch(this.encoding){case"utf16le":this.text=d,this.end=h,k=4;break;case"utf8":this.fillLast=l,k=4;break;case"base64":this.text=m,this.end=v,k=3;break;default:this.write=f,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(k)}n.prototype.write=function(b){if(b.length===0)return"";var k,w;if(this.lastNeed){if(k=this.fillLast(b),k===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;return w<b.length?k?k+this.text(b,w):this.text(b,w):k||""},n.prototype.end=u,n.prototype.text=c,n.prototype.fillLast=function(b){if(this.lastNeed<=b.length)return b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,b.length),this.lastNeed-=b.length};function i(b){return b<=127?0:b>>5===6?2:b>>4===14?3:b>>3===30?4:b>>6===2?-1:-2}function o(b,k,w){var C=k.length-1;if(C<w)return 0;var O=i(k[C]);return O>=0?(O>0&&(b.lastNeed=O-1),O):--C<w||O===-2?0:(O=i(k[C]),O>=0?(O>0&&(b.lastNeed=O-2),O):--C<w||O===-2?0:(O=i(k[C]),O>=0?(O>0&&(O===2?O=0:b.lastNeed=O-3),O):0))}function s(b,k,w){if((k[0]&192)!==128)return b.lastNeed=0,"\uFFFD";if(b.lastNeed>1&&k.length>1){if((k[1]&192)!==128)return b.lastNeed=1,"\uFFFD";if(b.lastNeed>2&&k.length>2&&(k[2]&192)!==128)return b.lastNeed=2,"\uFFFD"}}function l(b){var k=this.lastTotal-this.lastNeed,w=s(this,b);if(w!==void 0)return w;if(this.lastNeed<=b.length)return b.copy(this.lastChar,k,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,k,0,b.length),this.lastNeed-=b.length}function c(b,k){var w=o(this,b,k);if(!this.lastNeed)return b.toString("utf8",k);this.lastTotal=w;var C=b.length-(w-this.lastNeed);return b.copy(this.lastChar,0,C),b.toString("utf8",k,C)}function u(b){var k=b&&b.length?this.write(b):"";return this.lastNeed?k+"\uFFFD":k}function d(b,k){if((b.length-k)%2===0){var w=b.toString("utf16le",k);if(w){var C=w.charCodeAt(w.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",k,b.length-1)}function h(b){var k=b&&b.length?this.write(b):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,w)}return k}function m(b,k){var w=(b.length-k)%3;return w===0?b.toString("base64",k):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",k,b.length-w))}function v(b){var k=b&&b.length?this.write(b):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function f(b){return b.toString(this.encoding)}function y(b){return b&&b.length?this.write(b):""}return u7}var p7,Wne;function h7(){if(Wne)return p7;Wne=1;var e=Vv().codes.ERR_STREAM_PREMATURE_CLOSE;function t(i){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];i.apply(this,l)}}}function a(){}function r(i){return i.setHeader&&typeof i.abort=="function"}function n(i,o,s){if(typeof o=="function")return n(i,null,o);o||(o={}),s=t(s||a);var l=o.readable||o.readable!==!1&&i.readable,c=o.writable||o.writable!==!1&&i.writable,u=function(){i.writable||h()},d=i._writableState&&i._writableState.finished,h=function(){c=!1,d=!0,l||s.call(i)},m=i._readableState&&i._readableState.endEmitted,v=function(){l=!1,m=!0,c||s.call(i)},f=function(k){s.call(i,k)},y=function(){var k;if(l&&!m)return(!i._readableState||!i._readableState.ended)&&(k=new e),s.call(i,k);if(c&&!d)return(!i._writableState||!i._writableState.ended)&&(k=new e),s.call(i,k)},b=function(){i.req.on("finish",h)};return r(i)?(i.on("complete",h),i.on("abort",y),i.req?b():i.on("request",b)):c&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",v),i.on("finish",h),o.error!==!1&&i.on("error",f),i.on("close",y),function(){i.removeListener("complete",h),i.removeListener("abort",y),i.removeListener("request",b),i.req&&i.req.removeListener("finish",h),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",h),i.removeListener("end",v),i.removeListener("error",f),i.removeListener("close",y)}}return p7=n,p7}var m7,Jne;function dit(){if(Jne)return m7;Jne=1;var e;function t(w,C,O){return C=a(C),C in w?Object.defineProperty(w,C,{value:O,enumerable:!0,configurable:!0,writable:!0}):w[C]=O,w}function a(w){var C=r(w,"string");return typeof C=="symbol"?C:String(C)}function r(w,C){if(typeof w!="object"||w===null)return w;var O=w[Symbol.toPrimitive];if(O!==void 0){var S=O.call(w,C);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(w)}var n=h7(),i=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function h(w,C){return{value:w,done:C}}function m(w){var C=w[i];if(C!==null){var O=w[d].read();O!==null&&(w[c]=null,w[i]=null,w[o]=null,C(h(O,!1)))}}function v(w){process.nextTick(m,w)}function f(w,C){return function(O,S){w.then(function(){if(C[l]){O(h(void 0,!0));return}C[u](O,S)},S)}}var y=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((e={get stream(){return this[d]},next:function(){var w=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[l])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise(function(P,R){process.nextTick(function(){w[s]?R(w[s]):P(h(void 0,!0))})});var O=this[c],S;if(O)S=new Promise(f(O,this));else{var j=this[d].read();if(j!==null)return Promise.resolve(h(j,!1));S=new Promise(this[u])}return this[c]=S,S}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var w=this;return new Promise(function(C,O){w[d].destroy(null,function(S){if(S){O(S);return}C(h(void 0,!0))})})}),e),y),k=function(w){var C,O=Object.create(b,(C={},t(C,d,{value:w,writable:!0}),t(C,i,{value:null,writable:!0}),t(C,o,{value:null,writable:!0}),t(C,s,{value:null,writable:!0}),t(C,l,{value:w._readableState.endEmitted,writable:!0}),t(C,u,{value:function(S,j){var P=O[d].read();P?(O[c]=null,O[i]=null,O[o]=null,S(h(P,!1))):(O[i]=S,O[o]=j)},writable:!0}),C));return O[c]=null,n(w,function(S){if(S&&S.code!=="ERR_STREAM_PREMATURE_CLOSE"){var j=O[o];j!==null&&(O[c]=null,O[i]=null,O[o]=null,j(S)),O[s]=S;return}var P=O[i];P!==null&&(O[c]=null,O[i]=null,O[o]=null,P(h(void 0,!0))),O[l]=!0}),w.on("readable",v.bind(null,O)),O};return m7=k,m7}var Zne,Xne;function pit(){return Xne||(Xne=1,Zne=function(){throw new Error("Readable.from is not available in the browser")}),Zne}var g7,Yne;function eie(){if(Yne)return g7;Yne=1,g7=R;var e;R.ReadableState=P;var t=function(E,$){return E.listeners($).length},a=Tne(),r=t0().Buffer,n=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(E){return r.from(E)}function o(E){return r.isBuffer(E)||E instanceof n}var s=_ne,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=lit(),u=Nne(),d=Kne(),h=d.getHighWaterMark,m=Vv().codes,v=m.ERR_INVALID_ARG_TYPE,f=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,b=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,k,w,C,O=u.errorOrDestroy,S=["error","close","destroy","pause","resume"];function j(E,$,re){if(typeof E.prependListener=="function")return E.prependListener($,re);!E._events||!E._events[$]?E.on($,re):Array.isArray(E._events[$])?E._events[$].unshift(re):E._events[$]=[re,E._events[$]]}function P(E,$,re){e=e||Hv(),E=E||{},typeof re!="boolean"&&(re=$ instanceof e),this.objectMode=!!E.objectMode,re&&(this.objectMode=this.objectMode||!!E.readableObjectMode),this.highWaterMark=h(this,E,"readableHighWaterMark",re),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=E.emitClose!==!1,this.autoDestroy=!!E.autoDestroy,this.destroyed=!1,this.defaultEncoding=E.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,E.encoding&&(k||(k=Une().StringDecoder),this.decoder=new k(E.encoding),this.encoding=E.encoding)}function R(E){if(e=e||Hv(),!(this instanceof R))return new R(E);var $=this instanceof e;this._readableState=new P(E,this,$),this.readable=!0,E&&(typeof E.read=="function"&&(this._read=E.read),typeof E.destroy=="function"&&(this._destroy=E.destroy)),a.call(this)}Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(E){this._readableState&&(this._readableState.destroyed=E)}}),R.prototype.destroy=u.destroy,R.prototype._undestroy=u.undestroy,R.prototype._destroy=function(E,$){$(E)},R.prototype.push=function(E,$){var re=this._readableState,q;return re.objectMode?q=!0:typeof E=="string"&&($=$||re.defaultEncoding,$!==re.encoding&&(E=r.from(E,$),$=""),q=!0),_(this,E,$,!1,q)},R.prototype.unshift=function(E){return _(this,E,null,!0,!1)};function _(E,$,re,q,ue){l("readableAddChunk",$);var pe=E._readableState;if($===null)pe.reading=!1,ee(E,pe);else{var Z;if(ue||(Z=L(pe,$)),Z)O(E,Z);else if(pe.objectMode||$&&$.length>0)if(typeof $!="string"&&!pe.objectMode&&Object.getPrototypeOf($)!==r.prototype&&($=i($)),q)pe.endEmitted?O(E,new b):K(E,pe,$,!0);else if(pe.ended)O(E,new f);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!re?($=pe.decoder.write($),pe.objectMode||$.length!==0?K(E,pe,$,!1):de(E,pe)):K(E,pe,$,!1)}else q||(pe.reading=!1,de(E,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function K(E,$,re,q){$.flowing&&$.length===0&&!$.sync?($.awaitDrain=0,E.emit("data",re)):($.length+=$.objectMode?1:re.length,q?$.buffer.unshift(re):$.buffer.push(re),$.needReadable&&oe(E)),de(E,$)}function L(E,$){var re;return!o($)&&typeof $!="string"&&$!==void 0&&!E.objectMode&&(re=new v("chunk",["string","Buffer","Uint8Array"],$)),re}R.prototype.isPaused=function(){return this._readableState.flowing===!1},R.prototype.setEncoding=function(E){k||(k=Une().StringDecoder);var $=new k(E);this._readableState.decoder=$,this._readableState.encoding=this._readableState.decoder.encoding;for(var re=this._readableState.buffer.head,q="";re!==null;)q+=$.write(re.data),re=re.next;return this._readableState.buffer.clear(),q!==""&&this._readableState.buffer.push(q),this._readableState.length=q.length,this};var Q=1073741824;function D(E){return E>=Q?E=Q:(E--,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E++),E}function Y(E,$){return E<=0||$.length===0&&$.ended?0:$.objectMode?1:E!==E?$.flowing&&$.length?$.buffer.head.data.length:$.length:(E>$.highWaterMark&&($.highWaterMark=D(E)),E<=$.length?E:$.ended?$.length:($.needReadable=!0,0))}R.prototype.read=function(E){l("read",E),E=parseInt(E,10);var $=this._readableState,re=E;if(E!==0&&($.emittedReadable=!1),E===0&&$.needReadable&&(($.highWaterMark!==0?$.length>=$.highWaterMark:$.length>0)||$.ended))return l("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?se(this):oe(this),null;if(E=Y(E,$),E===0&&$.ended)return $.length===0&&se(this),null;var q=$.needReadable;l("need readable",q),($.length===0||$.length-E<$.highWaterMark)&&(q=!0,l("length less than watermark",q)),$.ended||$.reading?(q=!1,l("reading or ended",q)):q&&(l("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(E=Y(re,$)));var ue;return E>0?ue=ne(E,$):ue=null,ue===null?($.needReadable=$.length<=$.highWaterMark,E=0):($.length-=E,$.awaitDrain=0),$.length===0&&($.ended||($.needReadable=!0),re!==E&&$.ended&&se(this)),ue!==null&&this.emit("data",ue),ue};function ee(E,$){if(l("onEofChunk"),!$.ended){if($.decoder){var re=$.decoder.end();re&&re.length&&($.buffer.push(re),$.length+=$.objectMode?1:re.length)}$.ended=!0,$.sync?oe(E):($.needReadable=!1,$.emittedReadable||($.emittedReadable=!0,X(E)))}}function oe(E){var $=E._readableState;l("emitReadable",$.needReadable,$.emittedReadable),$.needReadable=!1,$.emittedReadable||(l("emitReadable",$.flowing),$.emittedReadable=!0,process.nextTick(X,E))}function X(E){var $=E._readableState;l("emitReadable_",$.destroyed,$.length,$.ended),!$.destroyed&&($.length||$.ended)&&(E.emit("readable"),$.emittedReadable=!1),$.needReadable=!$.flowing&&!$.ended&&$.length<=$.highWaterMark,F(E)}function de(E,$){$.readingMore||($.readingMore=!0,process.nextTick(W,E,$))}function W(E,$){for(;!$.reading&&!$.ended&&($.length<$.highWaterMark||$.flowing&&$.length===0);){var re=$.length;if(l("maybeReadMore read 0"),E.read(0),re===$.length)break}$.readingMore=!1}R.prototype._read=function(E){O(this,new y("_read()"))},R.prototype.pipe=function(E,$){var re=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=E;break;case 1:q.pipes=[q.pipes,E];break;default:q.pipes.push(E);break}q.pipesCount+=1,l("pipe count=%d opts=%j",q.pipesCount,$);var ue=(!$||$.end!==!1)&&E!==null&&E!==process.stderr,pe=ue?ae:tt;q.endEmitted?process.nextTick(pe):re.once("end",pe),E.on("unpipe",Z);function Z(M,te){l("onunpipe"),M===re&&te&&te.hasUnpiped===!1&&(te.hasUnpiped=!0,ge())}function ae(){l("onend"),E.end()}var ce=I(re);E.on("drain",ce);var ve=!1;function ge(){l("cleanup"),E.removeListener("close",Se),E.removeListener("finish",Me),E.removeListener("drain",ce),E.removeListener("error",ye),E.removeListener("unpipe",Z),re.removeListener("end",ae),re.removeListener("end",tt),re.removeListener("data",fe),ve=!0,q.awaitDrain&&(!E._writableState||E._writableState.needDrain)&&ce()}re.on("data",fe);function fe(M){l("ondata");var te=E.write(M);l("dest.write",te),te===!1&&((q.pipesCount===1&&q.pipes===E||q.pipesCount>1&&xe(q.pipes,E)!==-1)&&!ve&&(l("false write response, pause",q.awaitDrain),q.awaitDrain++),re.pause())}function ye(M){l("onerror",M),tt(),E.removeListener("error",ye),t(E,"error")===0&&O(E,M)}j(E,"error",ye);function Se(){E.removeListener("finish",Me),tt()}E.once("close",Se);function Me(){l("onfinish"),E.removeListener("close",Se),tt()}E.once("finish",Me);function tt(){l("unpipe"),re.unpipe(E)}return E.emit("pipe",re),q.flowing||(l("pipe resume"),re.resume()),E};function I(E){return function(){var $=E._readableState;l("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&t(E,"data")&&($.flowing=!0,F(E))}}R.prototype.unpipe=function(E){var $=this._readableState,re={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return E&&E!==$.pipes?this:(E||(E=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,E&&E.emit("unpipe",this,re),this);if(!E){var q=$.pipes,ue=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var pe=0;pe<ue;pe++)q[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var Z=xe($.pipes,E);return Z===-1?this:($.pipes.splice(Z,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),E.emit("unpipe",this,re),this)},R.prototype.on=function(E,$){var re=a.prototype.on.call(this,E,$),q=this._readableState;return E==="data"?(q.readableListening=this.listenerCount("readable")>0,q.flowing!==!1&&this.resume()):E==="readable"&&!q.endEmitted&&!q.readableListening&&(q.readableListening=q.needReadable=!0,q.flowing=!1,q.emittedReadable=!1,l("on readable",q.length,q.reading),q.length?oe(this):q.reading||process.nextTick(G,this)),re},R.prototype.addListener=R.prototype.on,R.prototype.removeListener=function(E,$){var re=a.prototype.removeListener.call(this,E,$);return E==="readable"&&process.nextTick(J,this),re},R.prototype.removeAllListeners=function(E){var $=a.prototype.removeAllListeners.apply(this,arguments);return(E==="readable"||E===void 0)&&process.nextTick(J,this),$};function J(E){var $=E._readableState;$.readableListening=E.listenerCount("readable")>0,$.resumeScheduled&&!$.paused?$.flowing=!0:E.listenerCount("data")>0&&E.resume()}function G(E){l("readable nexttick read 0"),E.read(0)}R.prototype.resume=function(){var E=this._readableState;return E.flowing||(l("resume"),E.flowing=!E.readableListening,B(this,E)),E.paused=!1,this};function B(E,$){$.resumeScheduled||($.resumeScheduled=!0,process.nextTick(N,E,$))}function N(E,$){l("resume",$.reading),$.reading||E.read(0),$.resumeScheduled=!1,E.emit("resume"),F(E),$.flowing&&!$.reading&&E.read(0)}R.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function F(E){var $=E._readableState;for(l("flow",$.flowing);$.flowing&&E.read()!==null;);}R.prototype.wrap=function(E){var $=this,re=this._readableState,q=!1;E.on("end",function(){if(l("wrapped end"),re.decoder&&!re.ended){var Z=re.decoder.end();Z&&Z.length&&$.push(Z)}$.push(null)}),E.on("data",function(Z){if(l("wrapped data"),re.decoder&&(Z=re.decoder.write(Z)),!(re.objectMode&&Z==null)&&!(!re.objectMode&&(!Z||!Z.length))){var ae=$.push(Z);ae||(q=!0,E.pause())}});for(var ue in E)this[ue]===void 0&&typeof E[ue]=="function"&&(this[ue]=(function(Z){return function(){return E[Z].apply(E,arguments)}})(ue));for(var pe=0;pe<S.length;pe++)E.on(S[pe],this.emit.bind(this,S[pe]));return this._read=function(Z){l("wrapped _read",Z),q&&(q=!1,E.resume())},this},typeof Symbol=="function"&&(R.prototype[Symbol.asyncIterator]=function(){return w===void 0&&(w=dit()),w(this)}),Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(R.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(R.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(E){this._readableState&&(this._readableState.flowing=E)}}),R._fromList=ne,Object.defineProperty(R.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ne(E,$){if($.length===0)return null;var re;return $.objectMode?re=$.buffer.shift():!E||E>=$.length?($.decoder?re=$.buffer.join(""):$.buffer.length===1?re=$.buffer.first():re=$.buffer.concat($.length),$.buffer.clear()):re=$.buffer.consume(E,$.decoder),re}function se(E){var $=E._readableState;l("endReadable",$.endEmitted),$.endEmitted||($.ended=!0,process.nextTick(be,$,E))}function be(E,$){if(l("endReadableNT",E.endEmitted,E.length),!E.endEmitted&&E.length===0&&(E.endEmitted=!0,$.readable=!1,$.emit("end"),E.autoDestroy)){var re=$._writableState;(!re||re.autoDestroy&&re.finished)&&$.destroy()}}typeof Symbol=="function"&&(R.from=function(E,$){return C===void 0&&(C=pit()),C(R,E,$)});function xe(E,$){for(var re=0,q=E.length;re<q;re++)if(E[re]===$)return re;return-1}return g7}var f7,tie;function aie(){if(tie)return f7;tie=1,f7=s;var e=Vv().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,a=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,i=Hv();function o(u,d){var h=this._transformState;h.transforming=!1;var m=h.writecb;if(m===null)return this.emit("error",new a);h.writechunk=null,h.writecb=null,d!=null&&this.push(d),m(u);var v=this._readableState;v.reading=!1,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);i.call(this,u),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",l)}function l(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(d,h){c(u,d,h)}):c(this,null,null)}s.prototype.push=function(u,d){return this._transformState.needTransform=!1,i.prototype.push.call(this,u,d)},s.prototype._transform=function(u,d,h){h(new t("_transform()"))},s.prototype._write=function(u,d,h){var m=this._transformState;if(m.writecb=h,m.writechunk=u,m.writeencoding=d,!m.transforming){var v=this._readableState;(m.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}},s.prototype._read=function(u){var d=this._transformState;d.writechunk!==null&&!d.transforming?(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform)):d.needTransform=!0},s.prototype._destroy=function(u,d){i.prototype._destroy.call(this,u,function(h){d(h)})};function c(u,d,h){if(d)return u.emit("error",d);if(h!=null&&u.push(h),u._writableState.length)throw new n;if(u._transformState.transforming)throw new r;return u.push(null)}return f7}var v7,rie;function hit(){if(rie)return v7;rie=1,v7=t;var e=aie();function t(a){if(!(this instanceof t))return new t(a);e.call(this,a)}return t.prototype._transform=function(a,r,n){n(null,a)},v7}var b7,nie;function mit(){if(nie)return b7;nie=1;var e;function t(h){var m=!1;return function(){m||(m=!0,h.apply(void 0,arguments))}}var a=Vv().codes,r=a.ERR_MISSING_ARGS,n=a.ERR_STREAM_DESTROYED;function i(h){if(h)throw h}function o(h){return h.setHeader&&typeof h.abort=="function"}function s(h,m,v,f){f=t(f);var y=!1;h.on("close",function(){y=!0}),e===void 0&&(e=h7()),e(h,{readable:m,writable:v},function(k){if(k)return f(k);y=!0,f()});var b=!1;return function(k){if(!y&&!b){if(b=!0,o(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();f(k||new n("pipe"))}}}function l(h){h()}function c(h,m){return h.pipe(m)}function u(h){return!h.length||typeof h[h.length-1]!="function"?i:h.pop()}function d(){for(var h=arguments.length,m=new Array(h),v=0;v<h;v++)m[v]=arguments[v];var f=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var y,b=m.map(function(k,w){var C=w<m.length-1,O=w>0;return s(k,C,O,function(S){y||(y=S),S&&b.forEach(l),!C&&(b.forEach(l),f(y))})});return m.reduce(c)}return b7=d,b7}var iie;function oie(){return iie||(iie=1,(function(e,t){t=e.exports=eie(),t.Stream=t,t.Readable=t,t.Writable=Fne(),t.Duplex=Hv(),t.Transform=aie(),t.PassThrough=hit(),t.finished=h7(),t.pipeline=mit()})(t7,t7.exports)),t7.exports}var sie;function lie(){if(sie)return T2;sie=1;var e=Cne(),t=J8(),a=oie(),r=T2.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=T2.IncomingMessage=function(i,o,s,l){var c=this;if(a.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){process.nextTick(function(){c.emit("close")})}),s==="fetch"){let f=function(){d.read().then(function(y){if(!c._destroyed){if(l(y.done),y.done){c.push(null);return}c.push(Buffer.from(y.value)),f()}}).catch(function(y){l(!0),c._destroyed||c.emit("error",y)})};if(c._fetchResponse=o,c.url=o.url,c.statusCode=o.status,c.statusMessage=o.statusText,o.headers.forEach(function(y,b){c.headers[b.toLowerCase()]=y,c.rawHeaders.push(b,y)}),e.writableStream){var u=new WritableStream({write:function(y){return l(!1),new Promise(function(b,k){c._destroyed?k():c.push(Buffer.from(y))?b():c._resumeFetch=b})},close:function(){l(!0),c._destroyed||c.push(null)},abort:function(y){l(!0),c._destroyed||c.emit("error",y)}});try{o.body.pipeTo(u).catch(function(y){l(!0),c._destroyed||c.emit("error",y)});return}catch{}}var d=o.body.getReader();f()}else{c._xhr=i,c._pos=0,c.url=i.responseURL,c.statusCode=i.status,c.statusMessage=i.statusText;var h=i.getAllResponseHeaders().split(/\r?\n/);if(h.forEach(function(f){var y=f.match(/^([^:]+):\s*(.*)/);if(y){var b=y[1].toLowerCase();b==="set-cookie"?(c.headers[b]===void 0&&(c.headers[b]=[]),c.headers[b].push(y[2])):c.headers[b]!==void 0?c.headers[b]+=", "+y[2]:c.headers[b]=y[2],c.rawHeaders.push(y[1],y[2])}}),c._charset="x-user-defined",!e.overrideMimeType){var m=c.rawHeaders["mime-type"];if(m){var v=m.match(/;\s*charset=([^;])(;|$)/);v&&(c._charset=v[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};return t(n,a.Readable),n.prototype._read=function(){var i=this,o=i._resumeFetch;o&&(i._resumeFetch=null,o())},n.prototype._onXHRProgress=function(i){var o=this,s=o._xhr,l=null;switch(o._mode){case"text":if(l=s.responseText,l.length>o._pos){var c=l.substr(o._pos);if(o._charset==="x-user-defined"){for(var u=Buffer.alloc(c.length),d=0;d<c.length;d++)u[d]=c.charCodeAt(d)&255;o.push(u)}else o.push(c,o._charset);o._pos=l.length}break;case"arraybuffer":if(s.readyState!==r.DONE||!s.response)break;l=s.response,o.push(Buffer.from(new Uint8Array(l)));break;case"moz-chunked-arraybuffer":if(l=s.response,s.readyState!==r.LOADING||!l)break;o.push(Buffer.from(new Uint8Array(l)));break;case"ms-stream":if(l=s.response,s.readyState!==r.LOADING)break;var h=new globalThis.MSStreamReader;h.onprogress=function(){h.result.byteLength>o._pos&&(o.push(Buffer.from(new Uint8Array(h.result.slice(o._pos)))),o._pos=h.result.byteLength)},h.onload=function(){i(!0),o.push(null)},h.readAsArrayBuffer(l);break}o._xhr.readyState===r.DONE&&o._mode!=="ms-stream"&&(i(!0),o.push(null))},T2}var cie;function git(){if(cie)return e7.exports;cie=1;var e=Cne(),t=J8(),a=lie(),r=oie(),n=a.IncomingMessage,i=a.readyStates;function o(u,d){return e.fetch&&d?"fetch":e.mozchunkedarraybuffer?"moz-chunked-arraybuffer":e.msstream?"ms-stream":e.arraybuffer&&u?"arraybuffer":"text"}var s=e7.exports=function(u){var d=this;r.Writable.call(d),d._opts=u,d._body=[],d._headers={},u.auth&&d.setHeader("Authorization","Basic "+Buffer.from(u.auth).toString("base64")),Object.keys(u.headers).forEach(function(v){d.setHeader(v,u.headers[v])});var h,m=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!e.abortController)m=!1,h=!0;else if(u.mode==="prefer-streaming")h=!1;else if(u.mode==="allow-wrong-content-type")h=!e.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")h=!0;else throw new Error("Invalid value for opts.mode");d._mode=o(h,m),d._fetchTimer=null,d._socketTimeout=null,d._socketTimer=null,d.on("finish",function(){d._onFinish()})};t(s,r.Writable),s.prototype.setHeader=function(u,d){var h=this,m=u.toLowerCase();c.indexOf(m)===-1&&(h._headers[m]={name:u,value:d})},s.prototype.getHeader=function(u){var d=this._headers[u.toLowerCase()];return d?d.value:null},s.prototype.removeHeader=function(u){var d=this;delete d._headers[u.toLowerCase()]},s.prototype._onFinish=function(){var u=this;if(!u._destroyed){var d=u._opts;"timeout"in d&&d.timeout!==0&&u.setTimeout(d.timeout);var h=u._headers,m=null;d.method!=="GET"&&d.method!=="HEAD"&&(m=new Blob(u._body,{type:(h["content-type"]||{}).value||""}));var v=[];if(Object.keys(h).forEach(function(k){var w=h[k].name,C=h[k].value;Array.isArray(C)?C.forEach(function(O){v.push([w,O])}):v.push([w,C])}),u._mode==="fetch"){var f=null;if(e.abortController){var y=new AbortController;f=y.signal,u._fetchAbortController=y,"requestTimeout"in d&&d.requestTimeout!==0&&(u._fetchTimer=globalThis.setTimeout(function(){u.emit("requestTimeout"),u._fetchAbortController&&u._fetchAbortController.abort()},d.requestTimeout))}globalThis.fetch(u._opts.url,{method:u._opts.method,headers:v,body:m||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:f}).then(function(k){u._fetchResponse=k,u._resetTimers(!1),u._connect()},function(k){u._resetTimers(!0),u._destroyed||u.emit("error",k)})}else{var b=u._xhr=new globalThis.XMLHttpRequest;try{b.open(u._opts.method,u._opts.url,!0)}catch(k){process.nextTick(function(){u.emit("error",k)});return}"responseType"in b&&(b.responseType=u._mode),"withCredentials"in b&&(b.withCredentials=!!d.withCredentials),u._mode==="text"&&"overrideMimeType"in b&&b.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(b.timeout=d.requestTimeout,b.ontimeout=function(){u.emit("requestTimeout")}),v.forEach(function(k){b.setRequestHeader(k[0],k[1])}),u._response=null,b.onreadystatechange=function(){switch(b.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(b.onprogress=function(){u._onXHRProgress()}),b.onerror=function(){u._destroyed||(u._resetTimers(!0),u.emit("error",new Error("XHR error")))};try{b.send(m)}catch(k){process.nextTick(function(){u.emit("error",k)});return}}}};function l(u){try{var d=u.status;return d!==null&&d!==0}catch{return!1}}s.prototype._onXHRProgress=function(){var u=this;u._resetTimers(!1),!(!l(u._xhr)||u._destroyed)&&(u._response||u._connect(),u._response._onXHRProgress(u._resetTimers.bind(u)))},s.prototype._connect=function(){var u=this;u._destroyed||(u._response=new n(u._xhr,u._fetchResponse,u._mode,u._resetTimers.bind(u)),u._response.on("error",function(d){u.emit("error",d)}),u.emit("response",u._response))},s.prototype._write=function(u,d,h){var m=this;m._body.push(u),h()},s.prototype._resetTimers=function(u){var d=this;globalThis.clearTimeout(d._socketTimer),d._socketTimer=null,u?(globalThis.clearTimeout(d._fetchTimer),d._fetchTimer=null):d._socketTimeout&&(d._socketTimer=globalThis.setTimeout(function(){d.emit("timeout")},d._socketTimeout))},s.prototype.abort=s.prototype.destroy=function(u){var d=this;d._destroyed=!0,d._resetTimers(!0),d._response&&(d._response._destroyed=!0),d._xhr?d._xhr.abort():d._fetchAbortController&&d._fetchAbortController.abort(),u&&d.emit("error",u)},s.prototype.end=function(u,d,h){var m=this;typeof u=="function"&&(h=u,u=void 0),r.Writable.prototype.end.call(m,u,d,h)},s.prototype.setTimeout=function(u,d){var h=this;d&&h.once("timeout",d),h._socketTimeout=u,h._resetTimers(!1)},s.prototype.flushHeaders=function(){},s.prototype.setNoDelay=function(){},s.prototype.setSocketKeepAlive=function(){};var c=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"];return e7.exports}var y7,uie;function fit(){if(uie)return y7;uie=1,y7=t;var e=Object.prototype.hasOwnProperty;function t(){for(var a={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(a[i]=n[i])}return a}return y7}var die,pie;function vit(){return pie||(pie=1,die={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}),die}var hie;function bit(){return hie||(hie=1,(function(e){var t=git(),a=lie(),r=fit(),n=vit(),i=IB(),o=e;o.request=function(s,l){typeof s=="string"?s=i.parse(s):s=r(s);var c=globalThis.location.protocol.search(/^https?:$/)===-1?"http:":"",u=s.protocol||c,d=s.hostname||s.host,h=s.port,m=s.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),s.url=(d?u+"//"+d:"")+(h?":"+h:"")+m,s.method=(s.method||"GET").toUpperCase(),s.headers=s.headers||{};var v=new t(s);return l&&v.on("response",l),v},o.get=function(s,l){var c=o.request(s,l);return c.end(),c},o.ClientRequest=t,o.IncomingMessage=a.IncomingMessage,o.Agent=function(){},o.Agent.defaultMaxSockets=4,o.globalAgent=new o.Agent,o.STATUS_CODES=n,o.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})(One)),One}var mie,gie;function yit(){return gie||(gie=1,mie={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},bit().STATUS_CODES)}),mie}const kit="7.0.8",xit={version:kit};var k7,fie;function wit(){if(fie)return k7;fie=1;const e=Kv,t=IB(),a=eit(),r=Kv,n=Kv,i=P2(),o=i.jptr,s=GB().isRef,l=A2().clone,c=A2().circularClone,u=UB().recurse,d=rit(),h=nit(),m=kne(),v=yit().statusCodes,f=xit.version,y="3.0.0";let b;class k extends Error{constructor($){super($),this.name="S2OError"}}function w(E,$){let re=new k(E);if(re.options=$,$.promise)$.promise.reject(re);else throw re}function C(E,$,re){re.warnOnly?$[re.warnProperty||"x-s2o-warning"]=E:w(E,re)}function O(E,$,re){if(E.nullable&&re.patches++,E.discriminator&&typeof E.discriminator=="string"&&(E.discriminator={propertyName:E.discriminator}),E.items&&Array.isArray(E.items)&&(E.items.length===0?E.items={}:E.items.length===1?E.items=E.items[0]:E.items={anyOf:E.items}),E.type&&Array.isArray(E.type))if(re.patch){if(re.patches++,E.type.length===0)delete E.type;else{E.oneOf||(E.oneOf=[]);for(let q of E.type){let ue={};if(q==="null")E.nullable=!0;else{ue.type=q;for(let pe of m.arrayProperties)typeof E.prop<"u"&&(ue[pe]=E[pe],delete E[pe])}ue.type&&E.oneOf.push(ue)}delete E.type,E.oneOf.length===0?delete E.oneOf:E.oneOf.length<2&&(E.type=E.oneOf[0].type,Object.keys(E.oneOf[0]).length>1&&C("Lost properties from oneOf",E,re),delete E.oneOf)}E.type&&Array.isArray(E.type)&&E.type.length===1&&(E.type=E.type[0])}else w("(Patchable) schema type must not be an array",re);E.type&&E.type==="null"&&(delete E.type,E.nullable=!0),E.type==="array"&&!E.items&&(E.items={}),E.type==="file"&&(E.type="string",E.format="binary"),typeof E.required=="boolean"&&(E.required&&E.name&&(typeof $.required>"u"&&($.required=[]),Array.isArray($.required)&&$.required.push(E.name)),delete E.required),E.xml&&typeof E.xml.namespace=="string"&&(E.xml.namespace||delete E.xml.namespace),typeof E.allowEmptyValue<"u"&&(re.patches++,delete E.allowEmptyValue)}function S(E,$){if(E["x-required"]&&Array.isArray(E["x-required"])&&(E.required||(E.required=[]),E.required=E.required.concat(E["x-required"]),delete E["x-required"]),E["x-anyOf"]&&(E.anyOf=E["x-anyOf"],delete E["x-anyOf"]),E["x-oneOf"]&&(E.oneOf=E["x-oneOf"],delete E["x-oneOf"]),E["x-not"]&&(E.not=E["x-not"],delete E["x-not"]),typeof E["x-nullable"]=="boolean"&&(E.nullable=E["x-nullable"],delete E["x-nullable"]),typeof E["x-discriminator"]=="object"&&typeof E["x-discriminator"].propertyName=="string"){E.discriminator=E["x-discriminator"],delete E["x-discriminator"];for(let re in E.discriminator.mapping){let q=E.discriminator.mapping[re];q.startsWith("#/definitions/")&&(E.discriminator.mapping[re]=q.replace("#/definitions/","#/components/schemas/"))}}}function j(E,$){h.walkSchema(E,{},{},function(re,q,ue){S(re),O(re,q,$)})}function P(E){return E.indexOf("#")>=0?E=E.split("#")[1].split("/").pop():E=E.split("/").pop().split(".")[0],encodeURIComponent(m.sanitise(E))}function R(E,$,re){let q=re.payload.options;if(s(E,$)){if(!E[$].startsWith("#/components/")){if(E[$]==="#/consumes")delete E[$],re.parent[re.pkey]=l(q.openapi.consumes);else if(E[$]==="#/produces")delete E[$],re.parent[re.pkey]=l(q.openapi.produces);else if(E[$].startsWith("#/definitions/")){let ue=E[$].replace("#/definitions/","").split("/");const pe=i.jpunescape(ue[0]);let Z=b.schemas[decodeURIComponent(pe)];Z?ue[0]=Z:C("Could not resolve reference "+E[$],E,q),E[$]="#/components/schemas/"+ue.join("/")}else if(E[$].startsWith("#/parameters/"))E[$]="#/components/parameters/"+m.sanitise(E[$].replace("#/parameters/",""));else if(E[$].startsWith("#/responses/"))E[$]="#/components/responses/"+m.sanitise(E[$].replace("#/responses/",""));else if(E[$].startsWith("#")){let ue=l(i.jptr(q.openapi,E[$]));if(ue===!1)C("direct $ref not found "+E[$],E,q);else if(q.refmap[E[$]])E[$]=q.refmap[E[$]];else{let pe=E[$];pe=pe.replace("/properties/headers/",""),pe=pe.replace("/properties/responses/",""),pe=pe.replace("/properties/parameters/",""),pe=pe.replace("/properties/schemas/","");let Z="schemas",ae=pe.lastIndexOf("/schema");if(Z=pe.indexOf("/headers/")>ae?"headers":pe.indexOf("/responses/")>ae?"responses":pe.indexOf("/example")>ae?"examples":pe.indexOf("/x-")>ae?"extensions":pe.indexOf("/parameters/")>ae?"parameters":"schemas",Z==="schemas"&&j(ue,q),Z!=="responses"&&Z!=="extensions"){let ce=Z.substr(0,Z.length-1);ce==="parameter"&&ue.name&&ue.name===m.sanitise(ue.name)&&(ce=encodeURIComponent(ue.name));let ve=1;for(E["x-miro"]&&(ce=P(E["x-miro"]),ve="");i.jptr(q.openapi,"#/components/"+Z+"/"+ce+ve);)ve=ve===""?2:++ve;let ge="#/components/"+Z+"/"+ce+ve,fe="";Z==="examples"&&(ue={value:ue},fe="/value"),i.jptr(q.openapi,ge,ue),q.refmap[E[$]]=ge+fe,E[$]=ge+fe}}}}if(delete E["x-miro"],Object.keys(E).length>1){const ue=E[$],pe=re.path.indexOf("/schema")>=0;q.refSiblings==="preserve"||(pe&&q.refSiblings==="allOf"?(delete E.$ref,re.parent[re.pkey]={allOf:[{$ref:ue},E]}):re.parent[re.pkey]={$ref:ue})}}if($==="x-ms-odata"&&typeof E[$]=="string"&&E[$].startsWith("#/")){let ue=E[$].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),pe=b.schemas[decodeURIComponent(ue[0])];pe?ue[0]=pe:C("Could not resolve reference "+E[$],E,q),E[$]="#/components/schemas/"+ue.join("/")}}function _(E,$){for(let re in $.refmap)i.jptr(E,re,{$ref:$.refmap[re]})}function K(E){for(let $ in E)for(let re in E[$]){let q=m.sanitise(re);re!==q&&(E[$][q]=E[$][re],delete E[$][re])}}function L(E,$){if(E.type==="basic"&&(E.type="http",E.scheme="basic"),E.type==="oauth2"){let re={},q=E.flow;E.flow==="application"&&(q="clientCredentials"),E.flow==="accessCode"&&(q="authorizationCode"),typeof E.authorizationUrl<"u"&&(re.authorizationUrl=E.authorizationUrl.split("?")[0].trim()||"/"),typeof E.tokenUrl=="string"&&(re.tokenUrl=E.tokenUrl.split("?")[0].trim()||"/"),re.scopes=E.scopes||{},E.flows={},E.flows[q]=re,delete E.flow,delete E.authorizationUrl,delete E.tokenUrl,delete E.scopes,typeof E.name<"u"&&($.patch?($.patches++,delete E.name):w("(Patchable) oauth2 securitySchemes should not have name property",$))}}function Q(E){return E&&!E["x-s2o-delete"]}function D(E,$){if(E.$ref)E.$ref=E.$ref.replace("#/responses/","#/components/responses/");else{E.type&&!E.schema&&(E.schema={}),E.type&&(E.schema.type=E.type),E.items&&E.items.type!=="array"&&(E.items.collectionFormat!==E.collectionFormat&&C("Nested collectionFormats are not supported",E,$),delete E.items.collectionFormat),E.type==="array"?(E.collectionFormat==="ssv"?C("collectionFormat:ssv is no longer supported for headers",E,$):E.collectionFormat==="pipes"?C("collectionFormat:pipes is no longer supported for headers",E,$):E.collectionFormat==="multi"?E.explode=!0:E.collectionFormat==="tsv"?(C("collectionFormat:tsv is no longer supported",E,$),E["x-collectionFormat"]="tsv"):E.style="simple",delete E.collectionFormat):E.collectionFormat&&($.patch?($.patches++,delete E.collectionFormat):w("(Patchable) collectionFormat is only applicable to header.type array",$)),delete E.type;for(let re of m.parameterTypeProperties)typeof E[re]<"u"&&(E.schema[re]=E[re],delete E[re]);for(let re of m.arrayProperties)typeof E[re]<"u"&&(E.schema[re]=E[re],delete E[re])}}function Y(E,$){if(E.$ref.indexOf("#/parameters/")>=0){let re=E.$ref.split("#/parameters/");E.$ref=re[0]+"#/components/parameters/"+m.sanitise(re[1])}E.$ref.indexOf("#/definitions/")>=0&&C("Definition used as parameter",E,$)}function ee(E,$){let re={};for(let q of Object.keys(E))re[q]=E[q],q==="parameters"&&(re.requestBody={},$.rbname&&(re[$.rbname]=""));return re.requestBody={},re}function oe(E,$,re,q,ue,pe,Z){let ae={},ce=!0,ve;if($&&$.consumes&&typeof $.consumes=="string")if(Z.patch)Z.patches++,$.consumes=[$.consumes];else return w("(Patchable) operation.consumes must be an array",Z);Array.isArray(pe.consumes)||delete pe.consumes;let ge=(($?$.consumes:null)||pe.consumes||[]).filter(m.uniqueOnly);if(E&&E.$ref&&typeof E.$ref=="string"){Y(E,Z);let fe=decodeURIComponent(E.$ref.replace("#/components/parameters/","")),ye=!1,Se=pe.components.parameters[fe];if((!Se||Se["x-s2o-delete"])&&E.$ref.startsWith("#/")&&(E["x-s2o-delete"]=!0,ye=!0),ye){let Me=E.$ref,tt=o(pe,E.$ref);!tt&&Me.startsWith("#/")?C("Could not resolve reference "+Me,E,Z):tt&&(E=tt)}}if(E&&(E.name||E.in)){typeof E["x-deprecated"]=="boolean"&&(E.deprecated=E["x-deprecated"],delete E["x-deprecated"]),typeof E["x-example"]<"u"&&(E.example=E["x-example"],delete E["x-example"]),E.in!=="body"&&!E.type&&(Z.patch?(Z.patches++,E.type="string"):w("(Patchable) parameter.type is mandatory for non-body parameters",Z)),E.type&&typeof E.type=="object"&&E.type.$ref&&(E.type=o(pe,E.type.$ref)),E.type==="file"&&(E["x-s2o-originalType"]=E.type,ve=E.type),E.description&&typeof E.description=="object"&&E.description.$ref&&(E.description=o(pe,E.description.$ref)),E.description===null&&delete E.description;let fe=E.collectionFormat;if(E.type==="array"&&!fe&&(fe="csv"),fe&&(E.type!=="array"&&(Z.patch?(Z.patches++,delete E.collectionFormat):w("(Patchable) collectionFormat is only applicable to param.type array",Z)),fe==="csv"&&(E.in==="query"||E.in==="cookie")&&(E.style="form",E.explode=!1),fe==="csv"&&(E.in==="path"||E.in==="header")&&(E.style="simple"),fe==="ssv"&&(E.in==="query"?E.style="spaceDelimited":C("collectionFormat:ssv is no longer supported except for in:query parameters",E,Z)),fe==="pipes"&&(E.in==="query"?E.style="pipeDelimited":C("collectionFormat:pipes is no longer supported except for in:query parameters",E,Z)),fe==="multi"&&(E.explode=!0),fe==="tsv"&&(C("collectionFormat:tsv is no longer supported",E,Z),E["x-collectionFormat"]="tsv"),delete E.collectionFormat),E.type&&E.type!=="body"&&E.in!=="formData")if(E.items&&E.schema)C("parameter has array,items and schema",E,Z);else{E.schema&&Z.patches++,(!E.schema||typeof E.schema!="object")&&(E.schema={}),E.schema.type=E.type,E.items&&(E.schema.items=E.items,delete E.items,u(E.schema.items,null,function(ye,Se,Me){Se==="collectionFormat"&&typeof ye[Se]=="string"&&(fe&&ye[Se]!==fe&&C("Nested collectionFormats are not supported",E,Z),delete ye[Se])}));for(let ye of m.parameterTypeProperties)typeof E[ye]<"u"&&(E.schema[ye]=E[ye]),delete E[ye]}E.schema&&j(E.schema,Z),E["x-ms-skip-url-encoding"]&&E.in==="query"&&(E.allowReserved=!0,delete E["x-ms-skip-url-encoding"])}if(E&&E.in==="formData"){ce=!1,ae.content={};let fe="application/x-www-form-urlencoded";if(ge.length&&ge.indexOf("multipart/form-data")>=0&&(fe="multipart/form-data"),ae.content[fe]={},E.schema)ae.content[fe].schema=E.schema,E.schema.$ref&&(ae["x-s2o-name"]=decodeURIComponent(E.schema.$ref.replace("#/components/schemas/","")));else{ae.content[fe].schema={},ae.content[fe].schema.type="object",ae.content[fe].schema.properties={},ae.content[fe].schema.properties[E.name]={};let ye=ae.content[fe].schema,Se=ae.content[fe].schema.properties[E.name];E.description&&(Se.description=E.description),E.example&&(Se.example=E.example),E.type&&(Se.type=E.type);for(let Me of m.parameterTypeProperties)typeof E[Me]<"u"&&(Se[Me]=E[Me]);E.required===!0&&(ye.required||(ye.required=[]),ye.required.push(E.name),ae.required=!0),typeof E.default<"u"&&(Se.default=E.default),Se.properties&&(Se.properties=E.properties),E.allOf&&(Se.allOf=E.allOf),E.type==="array"&&E.items&&(Se.items=E.items,Se.items.collectionFormat&&delete Se.items.collectionFormat),(ve==="file"||E["x-s2o-originalType"]==="file")&&(Se.type="string",Se.format="binary"),X(E,Se)}}else E&&E.type==="file"&&(E.required&&(ae.required=E.required),ae.content={},ae.content["application/octet-stream"]={},ae.content["application/octet-stream"].schema={},ae.content["application/octet-stream"].schema.type="string",ae.content["application/octet-stream"].schema.format="binary",X(E,ae));if(E&&E.in==="body"){ae.content={},E.name&&(ae["x-s2o-name"]=($&&$.operationId?m.sanitiseAll($.operationId):"")+("_"+E.name).toCamelCase()),E.description&&(ae.description=E.description),E.required&&(ae.required=E.required),$&&Z.rbname&&E.name&&($[Z.rbname]=E.name),E.schema&&E.schema.$ref?ae["x-s2o-name"]=decodeURIComponent(E.schema.$ref.replace("#/components/schemas/","")):E.schema&&E.schema.type==="array"&&E.schema.items&&E.schema.items.$ref&&(ae["x-s2o-name"]=decodeURIComponent(E.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),ge.length||ge.push("application/json");for(let fe of ge)ae.content[fe]={},ae.content[fe].schema=l(E.schema||{}),j(ae.content[fe].schema,Z);X(E,ae)}if(Object.keys(ae).length>0&&(E["x-s2o-delete"]=!0,$))if($.requestBody&&ce){$.requestBody["x-s2o-overloaded"]=!0;let fe=$.operationId||ue;C("Operation "+fe+" has multiple requestBodies",$,Z)}else $.requestBody||($=re[q]=ee($,Z)),$.requestBody.content&&$.requestBody.content["multipart/form-data"]&&$.requestBody.content["multipart/form-data"].schema&&$.requestBody.content["multipart/form-data"].schema.properties&&ae.content["multipart/form-data"]&&ae.content["multipart/form-data"].schema&&ae.content["multipart/form-data"].schema.properties?($.requestBody.content["multipart/form-data"].schema.properties=Object.assign($.requestBody.content["multipart/form-data"].schema.properties,ae.content["multipart/form-data"].schema.properties),$.requestBody.content["multipart/form-data"].schema.required=($.requestBody.content["multipart/form-data"].schema.required||[]).concat(ae.content["multipart/form-data"].schema.required||[]),$.requestBody.content["multipart/form-data"].schema.required.length||delete $.requestBody.content["multipart/form-data"].schema.required):$.requestBody.content&&$.requestBody.content["application/x-www-form-urlencoded"]&&$.requestBody.content["application/x-www-form-urlencoded"].schema&&$.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&ae.content["application/x-www-form-urlencoded"]&&ae.content["application/x-www-form-urlencoded"].schema&&ae.content["application/x-www-form-urlencoded"].schema.properties?($.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign($.requestBody.content["application/x-www-form-urlencoded"].schema.properties,ae.content["application/x-www-form-urlencoded"].schema.properties),$.requestBody.content["application/x-www-form-urlencoded"].schema.required=($.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(ae.content["application/x-www-form-urlencoded"].schema.required||[]),$.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete $.requestBody.content["application/x-www-form-urlencoded"].schema.required):($.requestBody=Object.assign($.requestBody,ae),$.requestBody["x-s2o-name"]||($.requestBody.schema&&$.requestBody.schema.$ref?$.requestBody["x-s2o-name"]=decodeURIComponent($.requestBody.schema.$ref.replace("#/components/schemas/","")).split("/").join(""):$.operationId&&($.requestBody["x-s2o-name"]=m.sanitiseAll($.operationId))));if(E&&!E["x-s2o-delete"]){delete E.type;for(let fe of m.parameterTypeProperties)delete E[fe];E.in==="path"&&(typeof E.required>"u"||E.required!==!0)&&(Z.patch?(Z.patches++,E.required=!0):w("(Patchable) path parameters must be required:true ["+E.name+" in "+ue+"]",Z))}return $}function X(E,$){for(let re in E)re.startsWith("x-")&&!re.startsWith("x-s2o")&&($[re]=E[re])}function de(E,$,re,q,ue){if(!E)return!1;if(E.$ref&&typeof E.$ref=="string")E.$ref.indexOf("#/definitions/")>=0?C("definition used as response: "+E.$ref,E,ue):E.$ref.startsWith("#/responses/")&&(E.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(E.$ref.replace("#/responses/",""))));else{if((typeof E.description>"u"||E.description===null||E.description===""&&ue.patch)&&(ue.patch?typeof E=="object"&&!Array.isArray(E)&&(ue.patches++,E.description=v[E]||""):w("(Patchable) response.description is mandatory",ue)),typeof E.schema<"u"){if(j(E.schema,ue),E.schema.$ref&&typeof E.schema.$ref=="string"&&E.schema.$ref.startsWith("#/responses/")&&(E.schema.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(E.schema.$ref.replace("#/responses/","")))),re&&re.produces&&typeof re.produces=="string")if(ue.patch)ue.patches++,re.produces=[re.produces];else return w("(Patchable) operation.produces must be an array",ue);q.produces&&!Array.isArray(q.produces)&&delete q.produces;let pe=((re?re.produces:null)||q.produces||[]).filter(m.uniqueOnly);pe.length||pe.push("*/*"),E.content={};for(let Z of pe){if(E.content[Z]={},E.content[Z].schema=l(E.schema),E.examples&&E.examples[Z]){let ae={};ae.value=E.examples[Z],E.content[Z].examples={},E.content[Z].examples.response=ae,delete E.examples[Z]}E.content[Z].schema.type==="file"&&(E.content[Z].schema={type:"string",format:"binary"})}delete E.schema}for(let pe in E.examples)E.content||(E.content={}),E.content[pe]||(E.content[pe]={}),E.content[pe].examples={},E.content[pe].examples.response={},E.content[pe].examples.response.value=E.examples[pe];if(delete E.examples,E.headers)for(let pe in E.headers)pe.toLowerCase()==="status code"?ue.patch?(ue.patches++,delete E.headers[pe]):w('(Patchable) "Status Code" is not a valid header',ue):D(E.headers[pe],ue)}}function W(E,$,re,q,ue){for(let pe in E){let Z=E[pe];Z&&Z["x-trace"]&&typeof Z["x-trace"]=="object"&&(Z.trace=Z["x-trace"],delete Z["x-trace"]),Z&&Z["x-summary"]&&typeof Z["x-summary"]=="string"&&(Z.summary=Z["x-summary"],delete Z["x-summary"]),Z&&Z["x-description"]&&typeof Z["x-description"]=="string"&&(Z.description=Z["x-description"],delete Z["x-description"]),Z&&Z["x-servers"]&&Array.isArray(Z["x-servers"])&&(Z.servers=Z["x-servers"],delete Z["x-servers"]);for(let ae in Z)if(m.httpMethods.indexOf(ae)>=0||ae==="x-amazon-apigateway-any-method"){let ce=Z[ae];if(ce&&ce.parameters&&Array.isArray(ce.parameters)){if(Z.parameters)for(let ve of Z.parameters)typeof ve.$ref=="string"&&(Y(ve,re),ve=o(ue,ve.$ref)),!ce.parameters.find(function(ge,fe,ye){return ge.name===ve.name&&ge.in===ve.in})&&(ve.in==="formData"||ve.in==="body"||ve.type==="file")&&(ce=oe(ve,ce,Z,ae,pe,ue,re),re.rbname&&ce[re.rbname]===""&&delete ce[re.rbname]);for(let ve of ce.parameters)ce=oe(ve,ce,Z,ae,ae+":"+pe,ue,re);re.rbname&&ce[re.rbname]===""&&delete ce[re.rbname],re.debug||ce.parameters&&(ce.parameters=ce.parameters.filter(Q))}if(ce&&ce.security&&K(ce.security),typeof ce=="object"){if(!ce.responses){let ve={};ve.description="Default response",ce.responses={default:ve}}for(let ve in ce.responses){let ge=ce.responses[ve];de(ge,ve,ce,ue,re)}}if(ce&&ce["x-servers"]&&Array.isArray(ce["x-servers"]))ce.servers=ce["x-servers"],delete ce["x-servers"];else if(ce&&ce.schemes&&ce.schemes.length){for(let ve of ce.schemes)if((!ue.schemes||ue.schemes.indexOf(ve)<0)&&(ce.servers||(ce.servers=[]),Array.isArray(ue.servers)))for(let ge of ue.servers){let fe=l(ge),ye=t.parse(fe.url);ye.protocol=ve,fe.url=ye.format(),ce.servers.push(fe)}}if(re.debug&&(ce["x-s2o-consumes"]=ce.consumes||[],ce["x-s2o-produces"]=ce.produces||[]),ce){if(delete ce.consumes,delete ce.produces,delete ce.schemes,ce["x-ms-examples"]){for(let ve in ce["x-ms-examples"]){let ge=ce["x-ms-examples"][ve],fe=m.sanitiseAll(ve);if(ge.parameters)for(let ye in ge.parameters){let Se=ge.parameters[ye];for(let Me of(ce.parameters||[]).concat(Z.parameters||[]))Me.$ref&&(Me=i.jptr(ue,Me.$ref)),Me.name===ye&&!Me.example&&(Me.examples||(Me.examples={}),Me.examples[ve]={value:Se})}if(ge.responses)for(let ye in ge.responses){if(ge.responses[ye].headers)for(let Se in ge.responses[ye].headers){let Me=ge.responses[ye].headers[Se];for(let tt in ce.responses[ye].headers)if(tt===Se){let M=ce.responses[ye].headers[tt];M.example=Me}}if(ge.responses[ye].body&&(ue.components.examples[fe]={value:l(ge.responses[ye].body)},ce.responses[ye]&&ce.responses[ye].content))for(let Se in ce.responses[ye].content){let Me=ce.responses[ye].content[Se];Me.examples||(Me.examples={}),Me.examples[ve]={$ref:"#/components/examples/"+fe}}}}delete ce["x-ms-examples"]}if(ce.parameters&&ce.parameters.length===0&&delete ce.parameters,ce.requestBody){let ve=ce.operationId?m.sanitiseAll(ce.operationId):m.sanitiseAll(ae+pe).toCamelCase(),ge=m.sanitise(ce.requestBody["x-s2o-name"]||ve||"");delete ce.requestBody["x-s2o-name"];let fe=JSON.stringify(ce.requestBody),ye=m.hash(fe);if(!q[ye]){let Me={};Me.name=ge,Me.body=ce.requestBody,Me.refs=[],q[ye]=Me}let Se="#/"+$+"/"+encodeURIComponent(i.jpescape(pe))+"/"+ae+"/requestBody";q[ye].refs.push(Se)}}}if(Z&&Z.parameters){for(let ae in Z.parameters){let ce=Z.parameters[ae];oe(ce,null,Z,null,pe,ue,re)}!re.debug&&Array.isArray(Z.parameters)&&(Z.parameters=Z.parameters.filter(Q))}}}function I(E,$){let re={};b={schemas:{}},E.security&&K(E.security);for(let ue in E.components.securitySchemes){let pe=m.sanitise(ue);ue!==pe&&(E.components.securitySchemes[pe]&&w("Duplicate sanitised securityScheme name "+pe,$),E.components.securitySchemes[pe]=E.components.securitySchemes[ue],delete E.components.securitySchemes[ue]),L(E.components.securitySchemes[pe],$)}for(let ue in E.components.schemas){let pe=m.sanitiseAll(ue),Z="";if(ue!==pe){for(;E.components.schemas[pe+Z];)Z=Z?++Z:2;E.components.schemas[pe+Z]=E.components.schemas[ue],delete E.components.schemas[ue]}b.schemas[ue]=pe+Z,j(E.components.schemas[pe+Z],$)}$.refmap={},u(E,{payload:{options:$}},R),_(E,$);for(let ue in E.components.parameters){let pe=m.sanitise(ue);ue!==pe&&(E.components.parameters[pe]&&w("Duplicate sanitised parameter name "+pe,$),E.components.parameters[pe]=E.components.parameters[ue],delete E.components.parameters[ue]);let Z=E.components.parameters[pe];oe(Z,null,null,null,pe,E,$)}for(let ue in E.components.responses){let pe=m.sanitise(ue);ue!==pe&&(E.components.responses[pe]&&w("Duplicate sanitised response name "+pe,$),E.components.responses[pe]=E.components.responses[ue],delete E.components.responses[ue]);let Z=E.components.responses[pe];if(de(Z,pe,null,E,$),Z.headers)for(let ae in Z.headers)ae.toLowerCase()==="status code"?$.patch?($.patches++,delete Z.headers[ae]):w('(Patchable) "Status Code" is not a valid header',$):D(Z.headers[ae],$)}for(let ue in E.components.requestBodies){let pe=E.components.requestBodies[ue],Z=JSON.stringify(pe),ae=m.hash(Z),ce={};ce.name=ue,ce.body=pe,ce.refs=[],re[ae]=ce}if(W(E.paths,"paths",$,re,E),E["x-ms-paths"]&&W(E["x-ms-paths"],"x-ms-paths",$,re,E),!$.debug)for(let ue in E.components.parameters)E.components.parameters[ue]["x-s2o-delete"]&&delete E.components.parameters[ue];$.debug&&(E["x-s2o-consumes"]=E.consumes||[],E["x-s2o-produces"]=E.produces||[]),delete E.consumes,delete E.produces,delete E.schemes;let q=[];if(E.components.requestBodies={},!$.resolveInternal){let ue=1;for(let pe in re){let Z=re[pe];if(Z.refs.length>1){let ae="";for(Z.name||(Z.name="requestBody",ae=ue++);q.indexOf(Z.name+ae)>=0;)ae=ae?++ae:2;Z.name=Z.name+ae,q.push(Z.name),E.components.requestBodies[Z.name]=l(Z.body);for(let ce in Z.refs){let ve={};ve.$ref="#/components/requestBodies/"+Z.name,i.jptr(E,Z.refs[ce],ve)}}}}return E.components.responses&&Object.keys(E.components.responses).length===0&&delete E.components.responses,E.components.parameters&&Object.keys(E.components.parameters).length===0&&delete E.components.parameters,E.components.examples&&Object.keys(E.components.examples).length===0&&delete E.components.examples,E.components.requestBodies&&Object.keys(E.components.requestBodies).length===0&&delete E.components.requestBodies,E.components.securitySchemes&&Object.keys(E.components.securitySchemes).length===0&&delete E.components.securitySchemes,E.components.headers&&Object.keys(E.components.headers).length===0&&delete E.components.headers,E.components.schemas&&Object.keys(E.components.schemas).length===0&&delete E.components.schemas,E.components&&Object.keys(E.components).length===0&&delete E.components,E}function J(E){return!E||!E.url||typeof E.url!="string"||(E.url=E.url.split("{{").join("{"),E.url=E.url.split("}}").join("}"),E.url.replace(/\{(.+?)\}/g,function($,re){E.variables||(E.variables={}),E.variables[re]={default:"unknown"}})),E}function G(E,$,re){if(typeof E.info>"u"||E.info===null)if($.patch)$.patches++,E.info={version:"",title:""};else return re(new k("(Patchable) info object is mandatory"));if(typeof E.info!="object"||Array.isArray(E.info))return re(new k("info must be an object"));if(typeof E.info.title>"u"||E.info.title===null)if($.patch)$.patches++,E.info.title="";else return re(new k("(Patchable) info.title cannot be null"));if(typeof E.info.version>"u"||E.info.version===null)if($.patch)$.patches++,E.info.version="";else return re(new k("(Patchable) info.version cannot be null"));if(typeof E.info.version!="string")if($.patch)$.patches++,E.info.version=E.info.version.toString();else return re(new k("(Patchable) info.version must be a string"));if(typeof E.info.logo<"u")if($.patch)$.patches++,E.info["x-logo"]=E.info.logo,delete E.info.logo;else return re(new k("(Patchable) info should not have logo property"));if(typeof E.info.termsOfService<"u"){if(E.info.termsOfService===null)if($.patch)$.patches++,E.info.termsOfService="";else return re(new k("(Patchable) info.termsOfService cannot be null"));try{new URL(E.info.termsOfService)}catch{if($.patch)$.patches++,delete E.info.termsOfService;else return re(new k("(Patchable) info.termsOfService must be a URL"))}}}function B(E,$,re){if(typeof E.paths>"u")if($.patch)$.patches++,E.paths={};else return re(new k("(Patchable) paths object is mandatory"))}function N(E,$){const re=new WeakSet;u(E,{identityDetection:!0},function(q,ue,pe){typeof q[ue]=="object"&&q[ue]!==null&&(re.has(q[ue])?$.anchors?q[ue]=l(q[ue]):w("YAML anchor or merge key at "+pe.path,$):re.add(q[ue]))})}function F(E,$,re){return a(re,new Promise(function(q,ue){if(E||(E={}),$.original=E,$.text||($.text=n.stringify(E)),$.externals=[],$.externalRefs={},$.rewriteRefs=!0,$.preserveMiro=!0,$.promise={},$.promise.resolve=q,$.promise.reject=ue,$.patches=0,$.cache||($.cache={}),$.source&&($.cache[$.source]=$.original),N(E,$),E.openapi&&typeof E.openapi=="string"&&E.openapi.startsWith("3.")){$.openapi=c(E),G($.openapi,$,ue),B($.openapi,$,ue),d.optionalResolve($).then(function(){return $.direct?q($.openapi):q($)}).catch(function(Z){console.warn(Z),ue(Z)});return}if(!E.swagger||E.swagger!="2.0")return ue(new k("Unsupported swagger/OpenAPI version: "+(E.openapi?E.openapi:E.swagger)));let pe=$.openapi={};if(pe.openapi=typeof $.targetVersion=="string"&&$.targetVersion.startsWith("3.")?$.targetVersion:y,$.origin){pe["x-origin"]||(pe["x-origin"]=[]);let Z={};Z.url=$.source||$.origin,Z.format="swagger",Z.version=E.swagger,Z.converter={},Z.converter.url="https://github.com/mermade/oas-kit",Z.converter.version=f,pe["x-origin"].push(Z)}if(pe=Object.assign(pe,c(E)),delete pe.swagger,u(pe,{},function(Z,ae,ce){Z[ae]===null&&!ae.startsWith("x-")&&ae!=="default"&&ce.path.indexOf("/example")<0&&delete Z[ae]}),E.host)for(let Z of Array.isArray(E.schemes)?E.schemes:[""]){let ae={},ce=(E.basePath||"").replace(/\/$/,"");ae.url=(Z?Z+":":"")+"//"+E.host+ce,J(ae),pe.servers||(pe.servers=[]),pe.servers.push(ae)}else if(E.basePath){let Z={};Z.url=E.basePath,J(Z),pe.servers||(pe.servers=[]),pe.servers.push(Z)}if(delete pe.host,delete pe.basePath,pe["x-servers"]&&Array.isArray(pe["x-servers"])&&(pe.servers=pe["x-servers"],delete pe["x-servers"]),E["x-ms-parameterized-host"]){let Z=E["x-ms-parameterized-host"],ae={};ae.url=Z.hostTemplate+(E.basePath?E.basePath:""),ae.variables={};const ce=ae.url.match(/\{\w+\}/g);for(let ve in Z.parameters){let ge=Z.parameters[ve];ge.$ref&&(ge=l(o(pe,ge.$ref))),ve.startsWith("x-")||(delete ge.required,delete ge.type,delete ge.in,typeof ge.default>"u"&&(ge.enum?ge.default=ge.enum[0]:ge.default="none"),ge.name||(ge.name=ce[ve].replace("{","").replace("}","")),ae.variables[ge.name]=ge,delete ge.name)}pe.servers||(pe.servers=[]),Z.useSchemePrefix===!1?pe.servers.push(ae):E.schemes.forEach(ve=>{pe.servers.push(Object.assign({},ae,{url:ve+"://"+ae.url}))}),delete pe["x-ms-parameterized-host"]}G(pe,$,ue),B(pe,$,ue),typeof pe.consumes=="string"&&(pe.consumes=[pe.consumes]),typeof pe.produces=="string"&&(pe.produces=[pe.produces]),pe.components={},pe["x-callbacks"]&&(pe.components.callbacks=pe["x-callbacks"],delete pe["x-callbacks"]),pe.components.examples={},pe.components.headers={},pe["x-links"]&&(pe.components.links=pe["x-links"],delete pe["x-links"]),pe.components.parameters=pe.parameters||{},pe.components.responses=pe.responses||{},pe.components.requestBodies={},pe.components.securitySchemes=pe.securityDefinitions||{},pe.components.schemas=pe.definitions||{},delete pe.definitions,delete pe.responses,delete pe.parameters,delete pe.securityDefinitions,d.optionalResolve($).then(function(){I($.openapi,$),$.direct?q($.openapi):q($)}).catch(function(Z){console.warn(Z),ue(Z)})}))}function ne(E,$,re){return a(re,new Promise(function(q,ue){let pe=null,Z=null;try{pe=JSON.parse(E),$.text=JSON.stringify(pe,null,2)}catch(ae){Z=ae;try{pe=n.parse(E,{schema:"core",prettyErrors:!0}),$.sourceYaml=!0,$.text=E}catch(ce){Z=ce}}pe?F(pe,$).then(ae=>q(ae)).catch(ae=>ue(ae)):ue(new k(Z?Z.message:"Could not parse string"))}))}function se(E,$,re){return a(re,new Promise(function(q,ue){$.origin=!0,$.source||($.source=E),$.verbose&&console.warn("GET "+E),$.fetch||($.fetch=r);const pe=Object.assign({},$.fetchOptions,{agent:$.agent});$.fetch(E,pe).then(function(Z){if(Z.status!==200)throw new k(`Received status code ${Z.status}: ${E}`);return Z.text()}).then(function(Z){ne(Z,$).then(ae=>q(ae)).catch(ae=>ue(ae))}).catch(function(Z){ue(Z)})}))}function be(E,$,re){return a(re,new Promise(function(q,ue){e.readFile(E,$.encoding||"utf8",function(pe,Z){pe?ue(pe):($.sourceFile=E,ne(Z,$).then(ae=>q(ae)).catch(ae=>ue(ae)))})}))}function xe(E,$,re){return a(re,new Promise(function(q,ue){let pe="";E.on("data",function(Z){pe+=Z}).on("end",function(){ne(pe,$).then(Z=>q(Z)).catch(Z=>ue(Z))})}))}return k7={S2OError:k,targetVersion:y,convert:F,convertObj:F,convertUrl:se,convertStr:ne,convertFile:be,convertStream:xe},k7}var Oit=wit();const zit=Xr(Oit);function Sit(e){return e.paths||(e.paths={}),new Promise((t,a)=>zit.convertObj(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(r,n)=>{if(r)return a(r);t(n?.openapi)}))}async function Cit(){try{return(await ane())?.resolvedConfig.openapi||{}}catch{return{}}}async function jit(e){const t=await ane(),a={config:t,base:yu?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};yu&&(t.resolve.http.customFetch=globalThis.fetch),typeof e=="object"&&e!==null?a.doc=Pit(e):a.ref=e;const{bundle:{parsed:r}}=await Gnt(a);return r.swagger!==void 0?Sit(r):r}function Pit(e){return{source:{absoluteRef:""},parsed:e}}async function Ait(e,t,a){let r;if(a?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await jit(e||t);try{tUe(r)}catch{}return r}const Tit=({options:e,definitionUrl:t,definition:a,activeSampleLanguage:r,children:n})=>{const[i,o]=T.useState(),[s,l]=T.useState(!0),[c,u]=T.useState(null),[d,h]=T.useState(e||{});T.useEffect(()=>{async function v(){l(!0);try{const f=await Cit();h({...e,...f}),u(await Ait(a,t,e))}catch(f){o(f.message)}}v()},[a,t,e]);const m=T.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:t,activeSampleLanguage:r}},aUe([c,t,d]));return T.useEffect(()=>{m&&l(!1)},[m]),i||!m?null:s?kl(e?.hideLoading,!1)?null:p.jsx(iet,{color:"--loading-spinner-color"}):T.isValidElement(n)?T.cloneElement(n,{store:m}):null};function Mit({definition:e,definitionUrl:t,options:a={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return p.jsx(Tit,{definition:e,definitionUrl:t,options:a,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:p.jsx(zae,{withCommonStyles:!0,router:o||"hash"})})}function Eit(e){const t={},a=e.attributes;for(let r=0;r<a.length;r++){const n=a[r];t[n.name]=n.value}return t}function Bit(e){const t=Eit(e),a={};for(const r in t){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());a[n]=t[r]}return a}function Rit(e,t=document.querySelector("redoc")){Gq.hydrateRoot(t,p.jsx(zae,{store:e}),{onRecoverableError:(a,r)=>{a.message.includes("Minified React error #418")||console.error(a.message,r)}})}function vie(e,t={},a=b6("redoc")){if(a===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}={...t,...Bit(a)};let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),Gq.createRoot(a).render(T.createElement(Mit,{definition:o,definitionUrl:i,options:n,router:r??"hash"},["Loading..."]))}const _it="3.17.0-next.5",Lit="a610ff77ff";function Dit(){const e=b6("redoc");if(!e)return;const t=e.getAttribute("spec-url");t&&vie(t,{},e)}Dit();function a0(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bie={exports:{}},yie;function Nit(){return yie||(yie=1,(function(e,t){(function(a){e.exports=a()})(function(){return(function a(r,n,i){function o(c,u){if(!n[c]){if(!r[c]){var d=typeof a0=="function"&&a0;if(!u&&d)return d(c,!0);if(s)return s(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var m=n[c]={exports:{}};r[c][0].call(m.exports,function(v){var f=r[c][1][v];return o(f||v)},m,m.exports,a,r,n,i)}return n[c].exports}for(var s=typeof a0=="function"&&a0,l=0;l<i.length;l++)o(i[l]);return o})({1:[function(a,r,n){var i=a("./utils"),o=a("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(l){for(var c,u,d,h,m,v,f,y=[],b=0,k=l.length,w=k,C=i.getTypeOf(l)!=="string";b<l.length;)w=k-b,d=C?(c=l[b++],u=b<k?l[b++]:0,b<k?l[b++]:0):(c=l.charCodeAt(b++),u=b<k?l.charCodeAt(b++):0,b<k?l.charCodeAt(b++):0),h=c>>2,m=(3&c)<<4|u>>4,v=1<w?(15&u)<<2|d>>6:64,f=2<w?63&d:64,y.push(s.charAt(h)+s.charAt(m)+s.charAt(v)+s.charAt(f));return y.join("")},n.decode=function(l){var c,u,d,h,m,v,f=0,y=0,b="data:";if(l.substr(0,b.length)===b)throw new Error("Invalid base64 input, it looks like a data url.");var k,w=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===s.charAt(64)&&w--,l.charAt(l.length-2)===s.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(k=o.uint8array?new Uint8Array(0|w):new Array(0|w);f<l.length;)c=s.indexOf(l.charAt(f++))<<2|(h=s.indexOf(l.charAt(f++)))>>4,u=(15&h)<<4|(m=s.indexOf(l.charAt(f++)))>>2,d=(3&m)<<6|(v=s.indexOf(l.charAt(f++))),k[y++]=c,m!==64&&(k[y++]=u),v!==64&&(k[y++]=d);return k}},{"./support":30,"./utils":32}],2:[function(a,r,n){var i=a("./external"),o=a("./stream/DataWorker"),s=a("./stream/Crc32Probe"),l=a("./stream/DataLengthProbe");function c(u,d,h,m,v){this.compressedSize=u,this.uncompressedSize=d,this.crc32=h,this.compression=m,this.compressedContent=v}c.prototype={getContentWorker:function(){var u=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),d=this;return u.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(u,d,h){return u.pipe(new s).pipe(new l("uncompressedSize")).pipe(d.compressWorker(h)).pipe(new l("compressedSize")).withStreamInfo("compression",d)},r.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(a,r,n){var i=a("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=a("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(a,r,n){var i=a("./utils"),o=(function(){for(var s,l=[],c=0;c<256;c++){s=c;for(var u=0;u<8;u++)s=1&s?3988292384^s>>>1:s>>>1;l[c]=s}return l})();r.exports=function(s,l){return s!==void 0&&s.length?i.getTypeOf(s)!=="string"?(function(c,u,d,h){var m=o,v=h+d;c^=-1;for(var f=h;f<v;f++)c=c>>>8^m[255&(c^u[f])];return-1^c})(0|l,s,s.length,0):(function(c,u,d,h){var m=o,v=h+d;c^=-1;for(var f=h;f<v;f++)c=c>>>8^m[255&(c^u.charCodeAt(f))];return-1^c})(0|l,s,s.length,0):0}},{"./utils":32}],5:[function(a,r,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(a,r,n){var i=null;i=typeof Promise<"u"?Promise:a("lie"),r.exports={Promise:i}},{lie:37}],7:[function(a,r,n){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=a("pako"),s=a("./utils"),l=a("./stream/GenericWorker"),c=i?"uint8array":"array";function u(d,h){l.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=h,this.meta={}}n.magic="\b\0",s.inherits(u,l),u.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(s.transformTo(c,d.data),!1)},u.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(h){d.push({data:h,meta:d.meta})}},n.compressWorker=function(d){return new u("Deflate",d)},n.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(a,r,n){function i(m,v){var f,y="";for(f=0;f<v;f++)y+=String.fromCharCode(255&m),m>>>=8;return y}function o(m,v,f,y,b,k){var w,C,O=m.file,S=m.compression,j=k!==c.utf8encode,P=s.transformTo("string",k(O.name)),R=s.transformTo("string",c.utf8encode(O.name)),_=O.comment,K=s.transformTo("string",k(_)),L=s.transformTo("string",c.utf8encode(_)),Q=R.length!==O.name.length,D=L.length!==_.length,Y="",ee="",oe="",X=O.dir,de=O.date,W={crc32:0,compressedSize:0,uncompressedSize:0};v&&!f||(W.crc32=m.crc32,W.compressedSize=m.compressedSize,W.uncompressedSize=m.uncompressedSize);var I=0;v&&(I|=8),j||!Q&&!D||(I|=2048);var J=0,G=0;X&&(J|=16),b==="UNIX"?(G=798,J|=(function(N,F){var ne=N;return N||(ne=F?16893:33204),(65535&ne)<<16})(O.unixPermissions,X)):(G=20,J|=(function(N){return 63&(N||0)})(O.dosPermissions)),w=de.getUTCHours(),w<<=6,w|=de.getUTCMinutes(),w<<=5,w|=de.getUTCSeconds()/2,C=de.getUTCFullYear()-1980,C<<=4,C|=de.getUTCMonth()+1,C<<=5,C|=de.getUTCDate(),Q&&(ee=i(1,1)+i(u(P),4)+R,Y+="up"+i(ee.length,2)+ee),D&&(oe=i(1,1)+i(u(K),4)+L,Y+="uc"+i(oe.length,2)+oe);var B="";return B+=`
|
|
10430
|
+
`," "],s=["{","}","|","\\","^","`"].concat(o),l=["'"].concat(s),c=["%","/","?",";","#"].concat(l),u=["/","?","#"],d=255,h=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=Xnt();function k(S,j,P){if(S&&t.isObject(S)&&S instanceof a)return S;var R=new a;return R.parse(S,j,P),R}a.prototype.parse=function(S,j,P){if(!t.isString(S))throw new TypeError("Parameter 'url' must be a string, not "+typeof S);var R=S.indexOf("?"),_=R!==-1&&R<S.indexOf("#")?"?":"#",K=S.split(_),L=/\\/g;K[0]=K[0].replace(L,"/"),S=K.join(_);var Q=S;if(Q=Q.trim(),!P&&S.split("#").length===1){var D=i.exec(Q);if(D)return this.path=Q,this.href=Q,this.pathname=D[1],D[2]?(this.search=D[2],j?this.query=b.parse(this.search.substr(1)):this.query=this.search.substr(1)):j&&(this.search="",this.query={}),this}var Y=r.exec(Q);if(Y){Y=Y[0];var ee=Y.toLowerCase();this.protocol=ee,Q=Q.substr(Y.length)}if(P||Y||Q.match(/^\/\/[^@\/]+@[^@\/]+/)){var oe=Q.substr(0,2)==="//";oe&&!(Y&&f[Y])&&(Q=Q.substr(2),this.slashes=!0)}if(!f[Y]&&(oe||Y&&!y[Y])){for(var X=-1,de=0;de<u.length;de++){var W=Q.indexOf(u[de]);W!==-1&&(X===-1||W<X)&&(X=W)}var I,J;X===-1?J=Q.lastIndexOf("@"):J=Q.lastIndexOf("@",X),J!==-1&&(I=Q.slice(0,J),Q=Q.slice(J+1),this.auth=decodeURIComponent(I)),X=-1;for(var de=0;de<c.length;de++){var W=Q.indexOf(c[de]);W!==-1&&(X===-1||W<X)&&(X=W)}X===-1&&(X=Q.length),this.host=Q.slice(0,X),Q=Q.slice(X),this.parseHost(),this.hostname=this.hostname||"";var G=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!G)for(var B=this.hostname.split(/\./),de=0,N=B.length;de<N;de++){var F=B[de];if(F&&!F.match(h)){for(var ne="",se=0,be=F.length;se<be;se++)F.charCodeAt(se)>127?ne+="x":ne+=F[se];if(!ne.match(h)){var xe=B.slice(0,de),E=B.slice(de+1),$=F.match(m);$&&(xe.push($[1]),E.unshift($[2])),E.length&&(Q="/"+E.join(".")+Q),this.hostname=xe.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),G||(this.hostname=e.toASCII(this.hostname));var re=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+re,this.href+=this.host,G&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Q[0]!=="/"&&(Q="/"+Q))}if(!v[ee])for(var de=0,N=l.length;de<N;de++){var ue=l[de];if(Q.indexOf(ue)!==-1){var pe=encodeURIComponent(ue);pe===ue&&(pe=escape(ue)),Q=Q.split(ue).join(pe)}}var Z=Q.indexOf("#");Z!==-1&&(this.hash=Q.substr(Z),Q=Q.slice(0,Z));var ae=Q.indexOf("?");if(ae!==-1?(this.search=Q.substr(ae),this.query=Q.substr(ae+1),j&&(this.query=b.parse(this.query)),Q=Q.slice(0,ae)):j&&(this.search="",this.query={}),Q&&(this.pathname=Q),y[ee]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var re=this.pathname||"",ce=this.search||"";this.path=re+ce}return this.href=this.format(),this};function w(S){return t.isString(S)&&(S=k(S)),S instanceof a?S.format():a.prototype.format.call(S)}a.prototype.format=function(){var S=this.auth||"";S&&(S=encodeURIComponent(S),S=S.replace(/%3A/i,":"),S+="@");var j=this.protocol||"",P=this.pathname||"",R=this.hash||"",_=!1,K="";this.host?_=S+this.host:this.hostname&&(_=S+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(_+=":"+this.port)),this.query&&t.isObject(this.query)&&Object.keys(this.query).length&&(K=b.stringify(this.query));var L=this.search||K&&"?"+K||"";return j&&j.substr(-1)!==":"&&(j+=":"),this.slashes||(!j||y[j])&&_!==!1?(_="//"+(_||""),P&&P.charAt(0)!=="/"&&(P="/"+P)):_||(_=""),R&&R.charAt(0)!=="#"&&(R="#"+R),L&&L.charAt(0)!=="?"&&(L="?"+L),P=P.replace(/[?#]/g,function(Q){return encodeURIComponent(Q)}),L=L.replace("#","%23"),j+_+P+L+R};function C(S,j){return k(S,!1,!0).resolve(j)}a.prototype.resolve=function(S){return this.resolveObject(k(S,!1,!0)).format()};function O(S,j){return S?k(S,!1,!0).resolveObject(j):j}return a.prototype.resolveObject=function(S){if(t.isString(S)){var j=new a;j.parse(S,!1,!0),S=j}for(var P=new a,R=Object.keys(this),_=0;_<R.length;_++){var K=R[_];P[K]=this[K]}if(P.hash=S.hash,S.href==="")return P.href=P.format(),P;if(S.slashes&&!S.protocol){for(var L=Object.keys(S),Q=0;Q<L.length;Q++){var D=L[Q];D!=="protocol"&&(P[D]=S[D])}return y[P.protocol]&&P.hostname&&!P.pathname&&(P.path=P.pathname="/"),P.href=P.format(),P}if(S.protocol&&S.protocol!==P.protocol){if(!y[S.protocol]){for(var Y=Object.keys(S),ee=0;ee<Y.length;ee++){var oe=Y[ee];P[oe]=S[oe]}return P.href=P.format(),P}if(P.protocol=S.protocol,!S.host&&!f[S.protocol]){for(var N=(S.pathname||"").split("/");N.length&&!(S.host=N.shift()););S.host||(S.host=""),S.hostname||(S.hostname=""),N[0]!==""&&N.unshift(""),N.length<2&&N.unshift(""),P.pathname=N.join("/")}else P.pathname=S.pathname;if(P.search=S.search,P.query=S.query,P.host=S.host||"",P.auth=S.auth,P.hostname=S.hostname||S.host,P.port=S.port,P.pathname||P.search){var X=P.pathname||"",de=P.search||"";P.path=X+de}return P.slashes=P.slashes||S.slashes,P.href=P.format(),P}var W=P.pathname&&P.pathname.charAt(0)==="/",I=S.host||S.pathname&&S.pathname.charAt(0)==="/",J=I||W||P.host&&S.pathname,G=J,B=P.pathname&&P.pathname.split("/")||[],N=S.pathname&&S.pathname.split("/")||[],F=P.protocol&&!y[P.protocol];if(F&&(P.hostname="",P.port=null,P.host&&(B[0]===""?B[0]=P.host:B.unshift(P.host)),P.host="",S.protocol&&(S.hostname=null,S.port=null,S.host&&(N[0]===""?N[0]=S.host:N.unshift(S.host)),S.host=null),J=J&&(N[0]===""||B[0]==="")),I)P.host=S.host||S.host===""?S.host:P.host,P.hostname=S.hostname||S.hostname===""?S.hostname:P.hostname,P.search=S.search,P.query=S.query,B=N;else if(N.length)B||(B=[]),B.pop(),B=B.concat(N),P.search=S.search,P.query=S.query;else if(!t.isNullOrUndefined(S.search)){if(F){P.hostname=P.host=B.shift();var ne=P.host&&P.host.indexOf("@")>0?P.host.split("@"):!1;ne&&(P.auth=ne.shift(),P.host=P.hostname=ne.shift())}return P.search=S.search,P.query=S.query,(!t.isNull(P.pathname)||!t.isNull(P.search))&&(P.path=(P.pathname?P.pathname:"")+(P.search?P.search:"")),P.href=P.format(),P}if(!B.length)return P.pathname=null,P.search?P.path="/"+P.search:P.path=null,P.href=P.format(),P;for(var se=B.slice(-1)[0],be=(P.host||S.host||B.length>1)&&(se==="."||se==="..")||se==="",xe=0,E=B.length;E>=0;E--)se=B[E],se==="."?B.splice(E,1):se===".."?(B.splice(E,1),xe++):xe&&(B.splice(E,1),xe--);if(!J&&!G)for(;xe--;xe)B.unshift("..");J&&B[0]!==""&&(!B[0]||B[0].charAt(0)!=="/")&&B.unshift(""),be&&B.join("/").substr(-1)!=="/"&&B.push("");var $=B[0]===""||B[0]&&B[0].charAt(0)==="/";if(F){P.hostname=P.host=$?"":B.length?B.shift():"";var ne=P.host&&P.host.indexOf("@")>0?P.host.split("@"):!1;ne&&(P.auth=ne.shift(),P.host=P.hostname=ne.shift())}return J=J||P.host&&B.length,J&&!$&&B.unshift(""),B.length?P.pathname=B.join("/"):(P.pathname=null,P.path=null),(!t.isNull(P.pathname)||!t.isNull(P.search))&&(P.path=(P.pathname?P.pathname:"")+(P.search?P.search:"")),P.auth=S.auth||P.auth,P.slashes=P.slashes||S.slashes,P.href=P.format(),P},a.prototype.parseHost=function(){var S=this.host,j=n.exec(S);j&&(j=j[0],j!==":"&&(this.port=j.substr(1)),S=S.substr(0,S.length-j.length)),S&&(this.hostname=S)},og}var KB,dne;function Ynt(){if(dne)return KB;dne=1;function e(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}return KB=e(),KB}var VB,pne;function eit(){if(pne)return VB;pne=1;var e=Ynt();return VB=function(t,a){if(t){a.then(function(r){e(function(){t(null,r)})},function(r){e(function(){t(r)})});return}else return a},VB}var HB,hne;function P2(){if(hne)return HB;hne=1;function e(r){return r.replace(/\~/g,"~0").replace(/\//g,"~1")}function t(r){return r.replace(/\~1/g,"/").replace(/~0/g,"~")}function a(r,n,i){if(typeof r>"u")return!1;if(!n||typeof n!="string"||n==="#")return typeof i<"u"?i:r;if(n.indexOf("#")>=0){let s=n.split("#");if(s[0])return!1;n=s[1],n=decodeURIComponent(n.slice(1).split("+").join(" "))}n.startsWith("/")&&(n=n.slice(1));let o=n.split("/");for(let s=0;s<o.length;s++){o[s]=t(o[s]);let l=typeof i<"u"&&s==o.length-1,c=parseInt(o[s],10);if(!Array.isArray(r)||isNaN(c)||c.toString()!==o[s]?c=Array.isArray(r)&&o[s]==="-"?-2:-1:o[s]=s>0?o[s-1]:"",c!=-1||r&&r.hasOwnProperty(o[s]))if(c>=0)l&&(r[c]=i),r=r[c];else{if(c===-2)return l?(Array.isArray(r)&&r.push(i),i):void 0;l&&(r[o[s]]=i),r=r[o[s]]}else if(typeof i<"u"&&typeof r=="object"&&!Array.isArray(r))r[o[s]]=l?i:o[s+1]==="0"||o[s+1]==="-"?[]:{},r=r[o[s]];else return!1}return r}return HB={jptr:a,jpescape:e,jpunescape:t},HB}var FB,mne;function GB(){if(mne)return FB;mne=1;function e(t,a){return a==="$ref"&&!!t&&typeof t[a]=="string"}return FB={isRef:e},FB}var qB,gne;function A2(){if(gne)return qB;gne=1;function e(o){return o}function t(o){return JSON.parse(JSON.stringify(o))}function a(o){let s={};for(let l in o)o.hasOwnProperty(l)&&(s[l]=o[l]);return s}function r(o){let s=Array.isArray(o)?[]:{};for(let l in o)(o.hasOwnProperty(l)||Array.isArray(o))&&(s[l]=typeof o[l]=="object"?r(o[l]):o[l]);return s}function n(o){return Object.assign({},o)}function i(o,s){if(s||(s=new WeakMap),Object(o)!==o||o instanceof Function)return o;if(s.has(o))return s.get(o);try{var l=new o.constructor}catch{l=Object.create(Object.getPrototypeOf(o))}return s.set(o,l),Object.assign(l,...Object.keys(o).map(c=>({[c]:i(o[c],s)})))}return qB={nop:e,clone:t,shallowClone:a,deepClone:r,fastClone:n,circularClone:i},qB}var QB,fne;function UB(){if(fne)return QB;fne=1;const e=P2().jpescape;function t(){return{path:"#",depth:0,pkey:"",parent:{},payload:{},seen:new WeakMap,identity:!1,identityDetection:!1}}function a(r,n,i){if(n||(n={depth:0}),n.depth||(n=Object.assign({},t(),n)),typeof r!="object")return;let o=n.path;for(let s in r){if(n.key=s,n.path=n.path+"/"+encodeURIComponent(e(s)),n.identityPath=n.seen.get(r[s]),n.identity=typeof n.identityPath<"u",r.hasOwnProperty(s)&&i(r,s,n),typeof r[s]=="object"&&!n.identity){n.identityDetection&&!Array.isArray(r[s])&&r[s]!==null&&n.seen.set(r[s],n.path);let l={};l.parent=r,l.path=n.path,l.depth=n.depth?n.depth+1:1,l.pkey=s,l.payload=n.payload,l.seen=n.seen,l.identity=!1,l.identityDetection=n.identityDetection,a(r[s],l,i)}n.path=o}}return QB={recurse:a},QB}var WB,vne;function tit(){if(vne)return WB;vne=1;const e=UB().recurse,t=A2().shallowClone,a=P2().jptr,r=GB().isRef;var n=function(o){return o&&o.verbose?{warn:function(){var s=Array.prototype.slice.call(arguments);console.warn.apply(console,s)}}:{warn:function(){}}};function i(o,s,l){l||(l={}),l.cache||(l.cache={}),l.state||(l.state={}),l.state.identityDetection=!0,l.depth=l.depth?l.depth+1:1;let c=l.depth>1?o:t(o),u={data:c},d=l.depth>1?s:t(s);l.master||(l.master=c);let h=n(l),m=1;for(;m>0;)m=0,e(u,l.state,function(v,f,y){if(r(v,f)){let b=v[f];if(m++,l.cache[b]){let k=l.cache[b];if(k.resolved)h.warn("Patching %s for %s",b,k.path),y.parent[y.pkey]=k.data,l.$ref&&typeof y.parent[y.pkey]=="object"&&y.parent[y.pkey]!==null&&(y.parent[y.pkey][l.$ref]=b);else{if(b===k.path)throw new Error(`Tight circle at ${k.path}`);h.warn("Unresolved ref"),y.parent[y.pkey]=a(k.source,k.path),y.parent[y.pkey]===!1&&(y.parent[y.pkey]=a(k.source,k.key)),l.$ref&&typeof y.parent[y.pkey]=="object"&&y.parent[y.pkey]!==null&&(y.parent[l.$ref]=b)}}else{let k={};k.path=y.path.split("/$ref")[0],k.key=b,h.warn("Dereffing %s at %s",b,k.path),k.source=d,k.data=a(k.source,k.key),k.data===!1&&(k.data=a(l.master,k.key),k.source=l.master),k.data===!1&&h.warn("Missing $ref target",k.key),l.cache[b]=k,k.data=y.parent[y.pkey]=i(a(k.source,k.key),k.source,l),l.$ref&&typeof y.parent[y.pkey]=="object"&&y.parent[y.pkey]!==null&&(y.parent[y.pkey][l.$ref]=b),k.resolved=!0}}});return u.data}return WB={dereference:i},WB}var JB,bne;function ait(){if(bne)return JB;bne=1,JB=i,i.default=i,i.stable=c,i.stableStringify=c;var e="[...]",t="[Circular]",a=[],r=[];function n(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function i(h,m,v,f){typeof f>"u"&&(f=n()),s(h,"",0,[],void 0,0,f);var y;try{r.length===0?y=JSON.stringify(h,m,v):y=JSON.stringify(h,d(m),v)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;a.length!==0;){var b=a.pop();b.length===4?Object.defineProperty(b[0],b[1],b[3]):b[0][b[1]]=b[2]}}return y}function o(h,m,v,f){var y=Object.getOwnPropertyDescriptor(f,v);y.get!==void 0?y.configurable?(Object.defineProperty(f,v,{value:h}),a.push([f,v,m,y])):r.push([m,v,h]):(f[v]=h,a.push([f,v,m]))}function s(h,m,v,f,y,b,k){b+=1;var w;if(typeof h=="object"&&h!==null){for(w=0;w<f.length;w++)if(f[w]===h){o(t,h,m,y);return}if(typeof k.depthLimit<"u"&&b>k.depthLimit){o(e,h,m,y);return}if(typeof k.edgesLimit<"u"&&v+1>k.edgesLimit){o(e,h,m,y);return}if(f.push(h),Array.isArray(h))for(w=0;w<h.length;w++)s(h[w],w,w,f,h,b,k);else{var C=Object.keys(h);for(w=0;w<C.length;w++){var O=C[w];s(h[O],O,w,f,h,b,k)}}f.pop()}}function l(h,m){return h<m?-1:h>m?1:0}function c(h,m,v,f){typeof f>"u"&&(f=n());var y=u(h,"",0,[],void 0,0,f)||h,b;try{r.length===0?b=JSON.stringify(y,m,v):b=JSON.stringify(y,d(m),v)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;a.length!==0;){var k=a.pop();k.length===4?Object.defineProperty(k[0],k[1],k[3]):k[0][k[1]]=k[2]}}return b}function u(h,m,v,f,y,b,k){b+=1;var w;if(typeof h=="object"&&h!==null){for(w=0;w<f.length;w++)if(f[w]===h){o(t,h,m,y);return}try{if(typeof h.toJSON=="function")return}catch{return}if(typeof k.depthLimit<"u"&&b>k.depthLimit){o(e,h,m,y);return}if(typeof k.edgesLimit<"u"&&v+1>k.edgesLimit){o(e,h,m,y);return}if(f.push(h),Array.isArray(h))for(w=0;w<h.length;w++)u(h[w],w,w,f,h,b,k);else{var C={},O=Object.keys(h).sort(l);for(w=0;w<O.length;w++){var S=O[w];u(h[S],S,w,f,h,b,k),C[S]=h[S]}if(typeof y<"u")a.push([y,m,h]),y[m]=C;else return C}f.pop()}}function d(h){return h=typeof h<"u"?h:function(m,v){return v},function(m,v){if(r.length>0)for(var f=0;f<r.length;f++){var y=r[f];if(y[1]===m&&y[0]===v){v=y[2],r.splice(f,1);break}}return h.call(this,m,v)}}return JB}var ZB,yne;function kne(){if(yne)return ZB;yne=1;var e={};const t=ait(),a=e.NODE_DISABLE_COLORS?{red:"",yellow:"",green:"",normal:""}:{red:"\x1B[31m",yellow:"\x1B[33;1m",green:"\x1B[32m",normal:"\x1B[0m"};function r(y,b,k){return k.indexOf(y)===b}function n(y){return new Set(y).size!==y.length}function i(y){return new Set(y).size<=1}function o(y,b){function k(w,C){return t.stringify(w)===t.stringify(Object.assign({},w,C))}return k(y,b)&&k(b,y)}function s(y){let b=[];for(let k of y)b.find(function(w,C,O){return o(w,k)})||b.push(k);return b}function l(y){return y.length===s(y).length}function c(y){return y.find(function(b,k,w){return y.indexOf(b)<k})}function u(y){let b=0,k;if(y.length===0)return b;for(let w=0;w<y.length;w++)k=y.charCodeAt(w),b=(b<<5)-b+k,b|=0;return b}String.prototype.toCamelCase=function(){return this.toLowerCase().replace(/[-_ \/\.](.)/g,function(y,b){return b.toUpperCase()})};const d=["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],h=["items","minItems","maxItems","uniqueItems"],m=["get","post","put","delete","patch","head","options","trace"];function v(y){y=y.replace("[]","Array");let b=y.split("/");return b[0]=b[0].replace(/[^A-Za-z0-9_\-\.]+|\s+/gm,"_"),b.join("/")}function f(y){return v(y.split("/").join("_"))}return ZB={colour:a,uniqueOnly:r,hasDuplicates:n,allSame:i,distinctArray:l,firstDupe:c,hash:u,parameterTypeProperties:d,arrayProperties:h,httpMethods:m,sanitise:v,sanitiseAll:f},ZB}var XB,xne;function rit(){if(xne)return XB;xne=1;const e=Kv,t=BW(),a=IB(),r=Kv,n=Kv,i=P2().jptr,o=UB().recurse,s=A2().clone,l=tit().dereference,c=GB().isRef,u=kne();function d(P){return[...new Set(P)]}function h(P,R,_,K,L){return new Promise(function(Q,D){e.readFile(P,R,function(Y,ee){Y?_.ignoreIOErrors&&L?(_.verbose&&console.warn("FAILED",K),_.externalRefs[K].failed=!0,Q(L)):D(Y):Q(ee)})})}function m(P,R,_,K,L,Q){let D=Q.externalRefs[_+K].paths[0],Y=a.parse(L),ee={},oe=1;for(;oe;)oe=0,o(P,{identityDetection:!0},function(X,de,W){if(c(X,de)){if(X[de].startsWith("#")){if(!ee[X[de]]&&!X.$fixed){let I=s(i(R,X[de]));if(Q.verbose>1&&console.warn((I===!1?u.colour.red:u.colour.green)+"Fragment resolution",X[de],u.colour.normal),I===!1){if(W.parent[W.pkey]={},Q.fatal){let J=new Error("Fragment $ref resolution failed "+X[de]);if(Q.promise)Q.promise.reject(J);else throw J}}else oe++,W.parent[W.pkey]=I,ee[X[de]]=W.path.replace("/%24ref","")}else if(!X.$fixed){let I=(D+"/"+ee[X[de]]).split("/#/").join("/");W.parent[W.pkey]={$ref:I,"x-miro":X[de],$fixed:!0},Q.verbose>1&&console.warn("Replacing with",I),oe++}}else if(Y.protocol){let I=a.resolve(L,X[de]).toString();Q.verbose>1&&console.warn(u.colour.yellow+"Rewriting external url ref",X[de],"as",I,u.colour.normal),X["x-miro"]=X[de],Q.externalRefs[X[de]]&&(Q.externalRefs[I]||(Q.externalRefs[I]=Q.externalRefs[X[de]]),Q.externalRefs[I].failed=Q.externalRefs[X[de]].failed),X[de]=I}else if(!X["x-miro"]){let I=a.resolve(L,X[de]).toString(),J=!1;Q.externalRefs[X[de]]&&(J=Q.externalRefs[X[de]].failed),J||(Q.verbose>1&&console.warn(u.colour.yellow+"Rewriting external ref",X[de],"as",I,u.colour.normal),X["x-miro"]=X[de],X[de]=I)}}});return o(P,{},function(X,de,W){c(X,de)&&typeof X.$fixed<"u"&&delete X.$fixed}),Q.verbose>1&&console.warn("Finished fragment resolution"),P}function v(P,R){if(!R.filters||!R.filters.length)return P;for(let _ of R.filters)P=_(P,R);return P}function f(P,R){return P&&P.length>2?P:R&&R.length>2?R:"file:"}function y(P,R,_,K){var L=a.parse(_.source),Q=_.source.split("\\").join("/").split("/");Q.pop()||Q.pop();let D="",Y=R.split("#");Y.length>1&&(D="#"+Y[1],R=Y[0]),Q=Q.join("/");let ee=a.parse(R),oe=f(ee.protocol,L.protocol),X;if(oe==="file:"?X=t.resolve(Q?Q+"/":"",R):X=a.resolve(Q?Q+"/":"",R),_.cache[X]){_.verbose&&console.warn("CACHED",X,D);let de=s(_.cache[X]),W=_.externalRef=de;if(D&&(W=i(W,D),W===!1&&(W={},_.fatal))){let I=new Error("Cached $ref resolution failed "+X+D);if(_.promise)_.promise.reject(I);else throw I}return W=m(W,de,R,D,X,_),W=v(W,_),K(s(W),X,_),Promise.resolve(W)}if(_.verbose&&console.warn("GET",X,D),_.handlers&&_.handlers[oe])return _.handlers[oe](Q,R,D,_).then(function(de){return _.externalRef=de,de=v(de,_),_.cache[X]=de,K(de,X,_),de}).catch(function(de){throw _.verbose&&console.warn(de),de});if(oe&&oe.startsWith("http")){const de=Object.assign({},_.fetchOptions,{agent:_.agent});return _.fetch(X,de).then(function(W){if(W.status!==200){if(_.ignoreIOErrors)return _.verbose&&console.warn("FAILED",R),_.externalRefs[R].failed=!0,'{"$ref":"'+R+'"}';throw new Error(`Received status code ${W.status}: ${X}`)}return W.text()}).then(function(W){try{let I=n.parse(W,{schema:"core",prettyErrors:!0});if(W=_.externalRef=I,_.cache[X]=s(W),D&&(W=i(W,D),W===!1&&(W={},_.fatal))){let J=new Error("Remote $ref resolution failed "+X+D);if(_.promise)_.promise.reject(J);else throw J}W=m(W,I,R,D,X,_),W=v(W,_)}catch(I){if(_.verbose&&console.warn(I),_.promise&&_.fatal)_.promise.reject(I);else throw I}return K(W,X,_),W}).catch(function(W){if(_.verbose&&console.warn(W),_.cache[X]={},_.promise&&_.fatal)_.promise.reject(W);else throw W})}else{const de='{"$ref":"'+R+'"}';return h(X,_.encoding||"utf8",_,R,de).then(function(W){try{let I=n.parse(W,{schema:"core",prettyErrors:!0});if(W=_.externalRef=I,_.cache[X]=s(W),D&&(W=i(W,D),W===!1&&(W={},_.fatal))){let J=new Error("File $ref resolution failed "+X+D);if(_.promise)_.promise.reject(J);else throw J}W=m(W,I,R,D,X,_),W=v(W,_)}catch(I){if(_.verbose&&console.warn(I),_.promise&&_.fatal)_.promise.reject(I);else throw I}return K(W,X,_),W}).catch(function(W){if(_.verbose&&console.warn(W),_.promise&&_.fatal)_.promise.reject(W);else throw W})}}function b(P){return new Promise(function(R,_){function K(Q,D,Y){if(Q[D]&&c(Q[D],"$ref")){let ee=Q[D].$ref;if(!ee.startsWith("#")){let oe="";if(!L[ee]){let X=Object.keys(L).find(function(de,W,I){return ee.startsWith(de+"/")});X&&(P.verbose&&console.warn("Found potential subschema at",X),oe="/"+(ee.split("#")[1]||"").replace(X.split("#")[1]||""),oe=oe.split("/undefined").join(""),ee=X)}if(L[ee]||(L[ee]={resolved:!1,paths:[],extras:{},description:Q[D].description}),L[ee].resolved){if(!L[ee].failed)if(P.rewriteRefs){let X=L[ee].resolvedAt;P.verbose>1&&console.warn("Rewriting ref",ee,X),Q[D]["x-miro"]=ee,Q[D].$ref=X+oe}else Q[D]=s(L[ee].data)}else L[ee].paths.push(Y.path),L[ee].extras[Y.path]=oe}}}let L=P.externalRefs;if(P.resolver.depth>0&&P.source===P.resolver.base)return R(L);o(P.openapi.definitions,{identityDetection:!0,path:"#/definitions"},K),o(P.openapi.components,{identityDetection:!0,path:"#/components"},K),o(P.openapi,{identityDetection:!0},K),R(L)})}function k(P){return new Promise(function(R,_){b(P).then(function(L){for(let Q in L)if(!L[Q].resolved){let D=P.resolver.depth;D>0&&D++,P.resolver.actions[D].push(function(){return y(P.openapi,Q,P,function(Y,ee,oe){if(!L[Q].resolved){let W={};W.context=L[Q],W.$ref=Q,W.original=s(Y),W.updated=Y,W.source=ee,oe.externals.push(W),L[Q].resolved=!0}let X=Object.assign({},oe,{source:"",resolver:{actions:oe.resolver.actions,depth:oe.resolver.actions.length-1,base:oe.resolver.base}});oe.patch&&L[Q].description&&!Y.description&&typeof Y=="object"&&(Y.description=L[Q].description),L[Q].data=Y;let de=d(L[Q].paths);de=de.sort(function(W,I){const J=W.startsWith("#/components/")||W.startsWith("#/definitions/"),G=I.startsWith("#/components/")||I.startsWith("#/definitions/");return J&&!G?-1:G&&!J?1:0});for(let W of de)if(L[Q].resolvedAt&&W!==L[Q].resolvedAt&&W.indexOf("x-ms-examples/")<0)oe.verbose>1&&console.warn("Creating pointer to data at",W),i(oe.openapi,W,{$ref:L[Q].resolvedAt+L[Q].extras[W],"x-miro":Q+L[Q].extras[W]});else{L[Q].resolvedAt?oe.verbose>1&&console.warn("Avoiding circular reference"):(L[Q].resolvedAt=W,oe.verbose>1&&console.warn("Creating initial clone of data at",W));let I=s(Y);i(oe.openapi,W,I)}oe.resolver.actions[X.resolver.depth].length===0&&oe.resolver.actions[X.resolver.depth].push(function(){return k(X)})})})}}).catch(function(L){P.verbose&&console.warn(L),_(L)});let K={options:P};K.actions=P.resolver.actions[P.resolver.depth],R(K)})}const w=P=>P.reduce((R,_)=>R.then(K=>_().then(Array.prototype.concat.bind(K))),Promise.resolve([]));function C(P,R,_){P.resolver.actions.push([]),k(P).then(function(K){w(K.actions).then(function(){if(P.resolver.depth>=P.resolver.actions.length)return console.warn("Ran off the end of resolver actions"),R(!0);P.resolver.depth++,P.resolver.actions[P.resolver.depth].length?setTimeout(function(){C(K.options,R,_)},0):(P.verbose>1&&console.warn(u.colour.yellow+"Finished external resolution!",u.colour.normal),P.resolveInternal&&(P.verbose>1&&console.warn(u.colour.yellow+"Starting internal resolution!",u.colour.normal),P.openapi=l(P.openapi,P.original,{verbose:P.verbose-1}),P.verbose>1&&console.warn(u.colour.yellow+"Finished internal resolution!",u.colour.normal)),o(P.openapi,{},function(L,Q,D){c(L,Q)&&(P.preserveMiro||delete L["x-miro"])}),R(P))}).catch(function(L){P.verbose&&console.warn(L),_(L)})}).catch(function(K){P.verbose&&console.warn(K),_(K)})}function O(P){if(P.cache||(P.cache={}),P.fetch||(P.fetch=r),P.source){let R=a.parse(P.source);(!R.protocol||R.protocol.length<=2)&&(P.source=t.resolve(P.source))}P.externals=[],P.externalRefs={},P.rewriteRefs=!0,P.resolver={},P.resolver.depth=0,P.resolver.base=P.source,P.resolver.actions=[[]]}function S(P){return O(P),new Promise(function(R,_){P.resolve?C(P,R,_):R(P)})}function j(P,R,_){return _||(_={}),_.openapi=P,_.source=R,_.resolve=!0,O(_),new Promise(function(K,L){C(_,K,L)})}return XB={optionalResolve:S,resolve:j},XB}var YB,wne;function nit(){if(wne)return YB;wne=1;function e(){return{depth:0,seen:new WeakMap,top:!0,combine:!1,allowRefSiblings:!1}}function t(a,r,n,i){if(typeof n.depth>"u"&&(n=e()),a===null||typeof a>"u")return a;if(typeof a.$ref<"u"){let o={$ref:a.$ref};return n.allowRefSiblings&&a.description&&(o.description=a.description),i(o,r,n),o}if(n.combine&&(a.allOf&&Array.isArray(a.allOf)&&a.allOf.length===1&&(a=Object.assign({},a.allOf[0],a),delete a.allOf),a.anyOf&&Array.isArray(a.anyOf)&&a.anyOf.length===1&&(a=Object.assign({},a.anyOf[0],a),delete a.anyOf),a.oneOf&&Array.isArray(a.oneOf)&&a.oneOf.length===1&&(a=Object.assign({},a.oneOf[0],a),delete a.oneOf)),i(a,r,n),n.seen.has(a))return a;if(typeof a=="object"&&a!==null&&n.seen.set(a,!0),n.top=!1,n.depth++,typeof a.items<"u"&&(n.property="items",t(a.items,a,n,i)),a.additionalItems&&typeof a.additionalItems=="object"&&(n.property="additionalItems",t(a.additionalItems,a,n,i)),a.additionalProperties&&typeof a.additionalProperties=="object"&&(n.property="additionalProperties",t(a.additionalProperties,a,n,i)),a.properties)for(let o in a.properties){let s=a.properties[o];n.property="properties/"+o,t(s,a,n,i)}if(a.patternProperties)for(let o in a.patternProperties){let s=a.patternProperties[o];n.property="patternProperties/"+o,t(s,a,n,i)}if(a.allOf)for(let o in a.allOf){let s=a.allOf[o];n.property="allOf/"+o,t(s,a,n,i)}if(a.anyOf)for(let o in a.anyOf){let s=a.anyOf[o];n.property="anyOf/"+o,t(s,a,n,i)}if(a.oneOf)for(let o in a.oneOf){let s=a.oneOf[o];n.property="oneOf/"+o,t(s,a,n,i)}return a.not&&(n.property="not",t(a.not,a,n,i)),n.depth--,a}return YB={getDefaultState:e,walkSchema:t},YB}var One={},e7={exports:{}},zne={},Sne;function Cne(){return Sne||(Sne=1,(function(e){e.fetch=n(globalThis.fetch)&&n(globalThis.ReadableStream),e.writableStream=n(globalThis.WritableStream),e.abortController=n(globalThis.AbortController);var t;function a(){if(t!==void 0)return t;if(globalThis.XMLHttpRequest){t=new globalThis.XMLHttpRequest;try{t.open("GET",globalThis.XDomainRequest?"/":"https://example.com")}catch{t=null}}else t=null;return t}function r(i){var o=a();if(!o)return!1;try{return o.responseType=i,o.responseType===i}catch{}return!1}e.arraybuffer=e.fetch||r("arraybuffer"),e.msstream=!e.fetch&&r("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&r("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||(a()?n(a().overrideMimeType):!1);function n(i){return typeof i=="function"}t=null})(zne)),zne}var T2={},t7={exports:{}},M2={exports:{}},jne;function iit(){if(jne)return M2.exports;jne=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(C,O,S){return Function.prototype.apply.call(C,O,S)},a;e&&typeof e.ownKeys=="function"?a=e.ownKeys:Object.getOwnPropertySymbols?a=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:a=function(C){return Object.getOwnPropertyNames(C)};function r(C){console&&console.warn&&console.warn(C)}var n=Number.isNaN||function(C){return C!==C};function i(){i.init.call(this)}M2.exports=i,M2.exports.once=b,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function s(C){if(typeof C!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof C)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(C){if(typeof C!="number"||C<0||n(C))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+C+".");o=C}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||n(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function l(C){return C._maxListeners===void 0?i.defaultMaxListeners:C._maxListeners}i.prototype.getMaxListeners=function(){return l(this)},i.prototype.emit=function(C){for(var O=[],S=1;S<arguments.length;S++)O.push(arguments[S]);var j=C==="error",P=this._events;if(P!==void 0)j=j&&P.error===void 0;else if(!j)return!1;if(j){var R;if(O.length>0&&(R=O[0]),R instanceof Error)throw R;var _=new Error("Unhandled error."+(R?" ("+R.message+")":""));throw _.context=R,_}var K=P[C];if(K===void 0)return!1;if(typeof K=="function")t(K,this,O);else for(var L=K.length,Q=v(K,L),S=0;S<L;++S)t(Q[S],this,O);return!0};function c(C,O,S,j){var P,R,_;if(s(S),R=C._events,R===void 0?(R=C._events=Object.create(null),C._eventsCount=0):(R.newListener!==void 0&&(C.emit("newListener",O,S.listener?S.listener:S),R=C._events),_=R[O]),_===void 0)_=R[O]=S,++C._eventsCount;else if(typeof _=="function"?_=R[O]=j?[S,_]:[_,S]:j?_.unshift(S):_.push(S),P=l(C),P>0&&_.length>P&&!_.warned){_.warned=!0;var K=new Error("Possible EventEmitter memory leak detected. "+_.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");K.name="MaxListenersExceededWarning",K.emitter=C,K.type=O,K.count=_.length,r(K)}return C}i.prototype.addListener=function(C,O){return c(this,C,O,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(C,O){return c(this,C,O,!0)};function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(C,O,S){var j={fired:!1,wrapFn:void 0,target:C,type:O,listener:S},P=u.bind(j);return P.listener=S,j.wrapFn=P,P}i.prototype.once=function(C,O){return s(O),this.on(C,d(this,C,O)),this},i.prototype.prependOnceListener=function(C,O){return s(O),this.prependListener(C,d(this,C,O)),this},i.prototype.removeListener=function(C,O){var S,j,P,R,_;if(s(O),j=this._events,j===void 0)return this;if(S=j[C],S===void 0)return this;if(S===O||S.listener===O)--this._eventsCount===0?this._events=Object.create(null):(delete j[C],j.removeListener&&this.emit("removeListener",C,S.listener||O));else if(typeof S!="function"){for(P=-1,R=S.length-1;R>=0;R--)if(S[R]===O||S[R].listener===O){_=S[R].listener,P=R;break}if(P<0)return this;P===0?S.shift():f(S,P),S.length===1&&(j[C]=S[0]),j.removeListener!==void 0&&this.emit("removeListener",C,_||O)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(C){var O,S,j;if(S=this._events,S===void 0)return this;if(S.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):S[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete S[C]),this;if(arguments.length===0){var P=Object.keys(S),R;for(j=0;j<P.length;++j)R=P[j],R!=="removeListener"&&this.removeAllListeners(R);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(O=S[C],typeof O=="function")this.removeListener(C,O);else if(O!==void 0)for(j=O.length-1;j>=0;j--)this.removeListener(C,O[j]);return this};function h(C,O,S){var j=C._events;if(j===void 0)return[];var P=j[O];return P===void 0?[]:typeof P=="function"?S?[P.listener||P]:[P]:S?y(P):v(P,P.length)}i.prototype.listeners=function(C){return h(this,C,!0)},i.prototype.rawListeners=function(C){return h(this,C,!1)},i.listenerCount=function(C,O){return typeof C.listenerCount=="function"?C.listenerCount(O):m.call(C,O)},i.prototype.listenerCount=m;function m(C){var O=this._events;if(O!==void 0){var S=O[C];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]};function v(C,O){for(var S=new Array(O),j=0;j<O;++j)S[j]=C[j];return S}function f(C,O){for(;O+1<C.length;O++)C[O]=C[O+1];C.pop()}function y(C){for(var O=new Array(C.length),S=0;S<O.length;++S)O[S]=C[S].listener||C[S];return O}function b(C,O){return new Promise(function(S,j){function P(_){C.removeListener(O,R),j(_)}function R(){typeof C.removeListener=="function"&&C.removeListener("error",P),S([].slice.call(arguments))}w(C,O,R,{once:!0}),O!=="error"&&k(C,P,{once:!0})})}function k(C,O,S){typeof C.on=="function"&&w(C,"error",O,S)}function w(C,O,S,j){if(typeof C.on=="function")j.once?C.once(O,S):C.on(O,S);else if(typeof C.addEventListener=="function")C.addEventListener(O,function P(R){j.once&&C.removeEventListener(O,P),S(R)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof C)}return M2.exports}var Pne,Ane;function Tne(){return Ane||(Ane=1,Pne=iit().EventEmitter),Pne}var Mne={},e0={},Ene;function oit(){if(Ene)return e0;Ene=1,e0.byteLength=s,e0.toByteArray=c,e0.fromByteArray=h;for(var e=[],t=[],a=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,i=r.length;n<i;++n)e[n]=r[n],t[r.charCodeAt(n)]=n;t[45]=62,t[95]=63;function o(m){var v=m.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=m.indexOf("=");f===-1&&(f=v);var y=f===v?0:4-f%4;return[f,y]}function s(m){var v=o(m),f=v[0],y=v[1];return(f+y)*3/4-y}function l(m,v,f){return(v+f)*3/4-f}function c(m){var v,f=o(m),y=f[0],b=f[1],k=new a(l(m,y,b)),w=0,C=b>0?y-4:y,O;for(O=0;O<C;O+=4)v=t[m.charCodeAt(O)]<<18|t[m.charCodeAt(O+1)]<<12|t[m.charCodeAt(O+2)]<<6|t[m.charCodeAt(O+3)],k[w++]=v>>16&255,k[w++]=v>>8&255,k[w++]=v&255;return b===2&&(v=t[m.charCodeAt(O)]<<2|t[m.charCodeAt(O+1)]>>4,k[w++]=v&255),b===1&&(v=t[m.charCodeAt(O)]<<10|t[m.charCodeAt(O+1)]<<4|t[m.charCodeAt(O+2)]>>2,k[w++]=v>>8&255,k[w++]=v&255),k}function u(m){return e[m>>18&63]+e[m>>12&63]+e[m>>6&63]+e[m&63]}function d(m,v,f){for(var y,b=[],k=v;k<f;k+=3)y=(m[k]<<16&16711680)+(m[k+1]<<8&65280)+(m[k+2]&255),b.push(u(y));return b.join("")}function h(m){for(var v,f=m.length,y=f%3,b=[],k=16383,w=0,C=f-y;w<C;w+=k)b.push(d(m,w,w+k>C?C:w+k));return y===1?(v=m[f-1],b.push(e[v>>2]+e[v<<4&63]+"==")):y===2&&(v=(m[f-2]<<8)+m[f-1],b.push(e[v>>10]+e[v>>4&63]+e[v<<2&63]+"=")),b.join("")}return e0}var a7={},Bne;function sit(){return Bne||(Bne=1,a7.read=function(e,t,a,r,n){var i,o,s=n*8-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=a?n-1:0,h=a?-1:1,m=e[t+d];for(d+=h,i=m&(1<<-u)-1,m>>=-u,u+=s;u>0;i=i*256+e[t+d],d+=h,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=h,u-=8);if(i===0)i=1-c;else{if(i===l)return o?NaN:(m?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-c}return(m?-1:1)*o*Math.pow(2,i-r)},a7.write=function(e,t,a,r,n,i){var o,s,l,c=i*8-n-1,u=(1<<c)-1,d=u>>1,h=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:i-1,v=r?1:-1,f=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=h/l:t+=h*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,n),o=o+d):(s=t*Math.pow(2,d-1)*Math.pow(2,n),o=0));n>=8;e[a+m]=s&255,m+=v,s/=256,n-=8);for(o=o<<n|s,c+=n;c>0;e[a+m]=o&255,m+=v,o/=256,c-=8);e[a+m-v]|=f*128}),a7}var Rne;function t0(){return Rne||(Rne=1,(function(e){const t=oit(),a=sit(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=k,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const M=new Uint8Array(1),te={foo:function(){return 42}};return Object.setPrototypeOf(te,Uint8Array.prototype),Object.setPrototypeOf(M,te),M.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(M){if(M>n)throw new RangeError('The value "'+M+'" is invalid for option "size"');const te=new Uint8Array(M);return Object.setPrototypeOf(te,s.prototype),te}function s(M,te,le){if(typeof M=="number"){if(typeof te=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(M)}return l(M,te,le)}s.poolSize=8192;function l(M,te,le){if(typeof M=="string")return h(M,te);if(ArrayBuffer.isView(M))return v(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(fe(M,ArrayBuffer)||M&&fe(M.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(fe(M,SharedArrayBuffer)||M&&fe(M.buffer,SharedArrayBuffer)))return f(M,te,le);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ce=M.valueOf&&M.valueOf();if(Ce!=null&&Ce!==M)return s.from(Ce,te,le);const Te=y(M);if(Te)return Te;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return s.from(M[Symbol.toPrimitive]("string"),te,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}s.from=function(M,te,le){return l(M,te,le)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function u(M,te,le){return c(M),M<=0?o(M):te!==void 0?typeof le=="string"?o(M).fill(te,le):o(M).fill(te):o(M)}s.alloc=function(M,te,le){return u(M,te,le)};function d(M){return c(M),o(M<0?0:b(M)|0)}s.allocUnsafe=function(M){return d(M)},s.allocUnsafeSlow=function(M){return d(M)};function h(M,te){if((typeof te!="string"||te==="")&&(te="utf8"),!s.isEncoding(te))throw new TypeError("Unknown encoding: "+te);const le=w(M,te)|0;let Ce=o(le);const Te=Ce.write(M,te);return Te!==le&&(Ce=Ce.slice(0,Te)),Ce}function m(M){const te=M.length<0?0:b(M.length)|0,le=o(te);for(let Ce=0;Ce<te;Ce+=1)le[Ce]=M[Ce]&255;return le}function v(M){if(fe(M,Uint8Array)){const te=new Uint8Array(M);return f(te.buffer,te.byteOffset,te.byteLength)}return m(M)}function f(M,te,le){if(te<0||M.byteLength<te)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<te+(le||0))throw new RangeError('"length" is outside of buffer bounds');let Ce;return te===void 0&&le===void 0?Ce=new Uint8Array(M):le===void 0?Ce=new Uint8Array(M,te):Ce=new Uint8Array(M,te,le),Object.setPrototypeOf(Ce,s.prototype),Ce}function y(M){if(s.isBuffer(M)){const te=b(M.length)|0,le=o(te);return le.length===0||M.copy(le,0,0,te),le}if(M.length!==void 0)return typeof M.length!="number"||ye(M.length)?o(0):m(M);if(M.type==="Buffer"&&Array.isArray(M.data))return m(M.data)}function b(M){if(M>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return M|0}function k(M){return+M!=M&&(M=0),s.alloc(+M)}s.isBuffer=function(M){return M!=null&&M._isBuffer===!0&&M!==s.prototype},s.compare=function(M,te){if(fe(M,Uint8Array)&&(M=s.from(M,M.offset,M.byteLength)),fe(te,Uint8Array)&&(te=s.from(te,te.offset,te.byteLength)),!s.isBuffer(M)||!s.isBuffer(te))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(M===te)return 0;let le=M.length,Ce=te.length;for(let Te=0,Ee=Math.min(le,Ce);Te<Ee;++Te)if(M[Te]!==te[Te]){le=M[Te],Ce=te[Te];break}return le<Ce?-1:Ce<le?1:0},s.isEncoding=function(M){switch(String(M).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(M,te){if(!Array.isArray(M))throw new TypeError('"list" argument must be an Array of Buffers');if(M.length===0)return s.alloc(0);let le;if(te===void 0)for(te=0,le=0;le<M.length;++le)te+=M[le].length;const Ce=s.allocUnsafe(te);let Te=0;for(le=0;le<M.length;++le){let Ee=M[le];if(fe(Ee,Uint8Array))Te+Ee.length>Ce.length?(s.isBuffer(Ee)||(Ee=s.from(Ee)),Ee.copy(Ce,Te)):Uint8Array.prototype.set.call(Ce,Ee,Te);else if(s.isBuffer(Ee))Ee.copy(Ce,Te);else throw new TypeError('"list" argument must be an Array of Buffers');Te+=Ee.length}return Ce};function w(M,te){if(s.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||fe(M,ArrayBuffer))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);const le=M.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&le===0)return 0;let Te=!1;for(;;)switch(te){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return Z(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return ve(M).length;default:if(Te)return Ce?-1:Z(M).length;te=(""+te).toLowerCase(),Te=!0}}s.byteLength=w;function C(M,te,le){let Ce=!1;if((te===void 0||te<0)&&(te=0),te>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,te>>>=0,le<=te))return"";for(M||(M="utf8");;)switch(M){case"hex":return de(this,te,le);case"utf8":case"utf-8":return D(this,te,le);case"ascii":return oe(this,te,le);case"latin1":case"binary":return X(this,te,le);case"base64":return Q(this,te,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,te,le);default:if(Ce)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),Ce=!0}}s.prototype._isBuffer=!0;function O(M,te,le){const Ce=M[te];M[te]=M[le],M[le]=Ce}s.prototype.swap16=function(){const M=this.length;if(M%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let te=0;te<M;te+=2)O(this,te,te+1);return this},s.prototype.swap32=function(){const M=this.length;if(M%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let te=0;te<M;te+=4)O(this,te,te+3),O(this,te+1,te+2);return this},s.prototype.swap64=function(){const M=this.length;if(M%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let te=0;te<M;te+=8)O(this,te,te+7),O(this,te+1,te+6),O(this,te+2,te+5),O(this,te+3,te+4);return this},s.prototype.toString=function(){const M=this.length;return M===0?"":arguments.length===0?D(this,0,M):C.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(M){if(!s.isBuffer(M))throw new TypeError("Argument must be a Buffer");return this===M?!0:s.compare(this,M)===0},s.prototype.inspect=function(){let M="";const te=e.INSPECT_MAX_BYTES;return M=this.toString("hex",0,te).replace(/(.{2})/g,"$1 ").trim(),this.length>te&&(M+=" ... "),"<Buffer "+M+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(M,te,le,Ce,Te){if(fe(M,Uint8Array)&&(M=s.from(M,M.offset,M.byteLength)),!s.isBuffer(M))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof M);if(te===void 0&&(te=0),le===void 0&&(le=M?M.length:0),Ce===void 0&&(Ce=0),Te===void 0&&(Te=this.length),te<0||le>M.length||Ce<0||Te>this.length)throw new RangeError("out of range index");if(Ce>=Te&&te>=le)return 0;if(Ce>=Te)return-1;if(te>=le)return 1;if(te>>>=0,le>>>=0,Ce>>>=0,Te>>>=0,this===M)return 0;let Ee=Te-Ce,De=le-te;const at=Math.min(Ee,De),dt=this.slice(Ce,Te),gt=M.slice(te,le);for(let ct=0;ct<at;++ct)if(dt[ct]!==gt[ct]){Ee=dt[ct],De=gt[ct];break}return Ee<De?-1:De<Ee?1:0};function S(M,te,le,Ce,Te){if(M.length===0)return-1;if(typeof le=="string"?(Ce=le,le=0):le>2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,ye(le)&&(le=Te?0:M.length-1),le<0&&(le=M.length+le),le>=M.length){if(Te)return-1;le=M.length-1}else if(le<0)if(Te)le=0;else return-1;if(typeof te=="string"&&(te=s.from(te,Ce)),s.isBuffer(te))return te.length===0?-1:j(M,te,le,Ce,Te);if(typeof te=="number")return te=te&255,typeof Uint8Array.prototype.indexOf=="function"?Te?Uint8Array.prototype.indexOf.call(M,te,le):Uint8Array.prototype.lastIndexOf.call(M,te,le):j(M,[te],le,Ce,Te);throw new TypeError("val must be string, number or Buffer")}function j(M,te,le,Ce,Te){let Ee=1,De=M.length,at=te.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(M.length<2||te.length<2)return-1;Ee=2,De/=2,at/=2,le/=2}function dt(ct,Ot){return Ee===1?ct[Ot]:ct.readUInt16BE(Ot*Ee)}let gt;if(Te){let ct=-1;for(gt=le;gt<De;gt++)if(dt(M,gt)===dt(te,ct===-1?0:gt-ct)){if(ct===-1&&(ct=gt),gt-ct+1===at)return ct*Ee}else ct!==-1&&(gt-=gt-ct),ct=-1}else for(le+at>De&&(le=De-at),gt=le;gt>=0;gt--){let ct=!0;for(let Ot=0;Ot<at;Ot++)if(dt(M,gt+Ot)!==dt(te,Ot)){ct=!1;break}if(ct)return gt}return-1}s.prototype.includes=function(M,te,le){return this.indexOf(M,te,le)!==-1},s.prototype.indexOf=function(M,te,le){return S(this,M,te,le,!0)},s.prototype.lastIndexOf=function(M,te,le){return S(this,M,te,le,!1)};function P(M,te,le,Ce){le=Number(le)||0;const Te=M.length-le;Ce?(Ce=Number(Ce),Ce>Te&&(Ce=Te)):Ce=Te;const Ee=te.length;Ce>Ee/2&&(Ce=Ee/2);let De;for(De=0;De<Ce;++De){const at=parseInt(te.substr(De*2,2),16);if(ye(at))return De;M[le+De]=at}return De}function R(M,te,le,Ce){return ge(Z(te,M.length-le),M,le,Ce)}function _(M,te,le,Ce){return ge(ae(te),M,le,Ce)}function K(M,te,le,Ce){return ge(ve(te),M,le,Ce)}function L(M,te,le,Ce){return ge(ce(te,M.length-le),M,le,Ce)}s.prototype.write=function(M,te,le,Ce){if(te===void 0)Ce="utf8",le=this.length,te=0;else if(le===void 0&&typeof te=="string")Ce=te,le=this.length,te=0;else if(isFinite(te))te=te>>>0,isFinite(le)?(le=le>>>0,Ce===void 0&&(Ce="utf8")):(Ce=le,le=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Te=this.length-te;if((le===void 0||le>Te)&&(le=Te),M.length>0&&(le<0||te<0)||te>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ce||(Ce="utf8");let Ee=!1;for(;;)switch(Ce){case"hex":return P(this,M,te,le);case"utf8":case"utf-8":return R(this,M,te,le);case"ascii":case"latin1":case"binary":return _(this,M,te,le);case"base64":return K(this,M,te,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,M,te,le);default:if(Ee)throw new TypeError("Unknown encoding: "+Ce);Ce=(""+Ce).toLowerCase(),Ee=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(M,te,le){return te===0&&le===M.length?t.fromByteArray(M):t.fromByteArray(M.slice(te,le))}function D(M,te,le){le=Math.min(M.length,le);const Ce=[];let Te=te;for(;Te<le;){const Ee=M[Te];let De=null,at=Ee>239?4:Ee>223?3:Ee>191?2:1;if(Te+at<=le){let dt,gt,ct,Ot;switch(at){case 1:Ee<128&&(De=Ee);break;case 2:dt=M[Te+1],(dt&192)===128&&(Ot=(Ee&31)<<6|dt&63,Ot>127&&(De=Ot));break;case 3:dt=M[Te+1],gt=M[Te+2],(dt&192)===128&&(gt&192)===128&&(Ot=(Ee&15)<<12|(dt&63)<<6|gt&63,Ot>2047&&(Ot<55296||Ot>57343)&&(De=Ot));break;case 4:dt=M[Te+1],gt=M[Te+2],ct=M[Te+3],(dt&192)===128&&(gt&192)===128&&(ct&192)===128&&(Ot=(Ee&15)<<18|(dt&63)<<12|(gt&63)<<6|ct&63,Ot>65535&&Ot<1114112&&(De=Ot))}}De===null?(De=65533,at=1):De>65535&&(De-=65536,Ce.push(De>>>10&1023|55296),De=56320|De&1023),Ce.push(De),Te+=at}return ee(Ce)}const Y=4096;function ee(M){const te=M.length;if(te<=Y)return String.fromCharCode.apply(String,M);let le="",Ce=0;for(;Ce<te;)le+=String.fromCharCode.apply(String,M.slice(Ce,Ce+=Y));return le}function oe(M,te,le){let Ce="";le=Math.min(M.length,le);for(let Te=te;Te<le;++Te)Ce+=String.fromCharCode(M[Te]&127);return Ce}function X(M,te,le){let Ce="";le=Math.min(M.length,le);for(let Te=te;Te<le;++Te)Ce+=String.fromCharCode(M[Te]);return Ce}function de(M,te,le){const Ce=M.length;(!te||te<0)&&(te=0),(!le||le<0||le>Ce)&&(le=Ce);let Te="";for(let Ee=te;Ee<le;++Ee)Te+=Se[M[Ee]];return Te}function W(M,te,le){const Ce=M.slice(te,le);let Te="";for(let Ee=0;Ee<Ce.length-1;Ee+=2)Te+=String.fromCharCode(Ce[Ee]+Ce[Ee+1]*256);return Te}s.prototype.slice=function(M,te){const le=this.length;M=~~M,te=te===void 0?le:~~te,M<0?(M+=le,M<0&&(M=0)):M>le&&(M=le),te<0?(te+=le,te<0&&(te=0)):te>le&&(te=le),te<M&&(te=M);const Ce=this.subarray(M,te);return Object.setPrototypeOf(Ce,s.prototype),Ce};function I(M,te,le){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+te>le)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(M,te,le){M=M>>>0,te=te>>>0,le||I(M,te,this.length);let Ce=this[M],Te=1,Ee=0;for(;++Ee<te&&(Te*=256);)Ce+=this[M+Ee]*Te;return Ce},s.prototype.readUintBE=s.prototype.readUIntBE=function(M,te,le){M=M>>>0,te=te>>>0,le||I(M,te,this.length);let Ce=this[M+--te],Te=1;for(;te>0&&(Te*=256);)Ce+=this[M+--te]*Te;return Ce},s.prototype.readUint8=s.prototype.readUInt8=function(M,te){return M=M>>>0,te||I(M,1,this.length),this[M]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(M,te){return M=M>>>0,te||I(M,2,this.length),this[M]|this[M+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(M,te){return M=M>>>0,te||I(M,2,this.length),this[M]<<8|this[M+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(M,te){return M=M>>>0,te||I(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+this[M+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(M,te){return M=M>>>0,te||I(M,4,this.length),this[M]*16777216+(this[M+1]<<16|this[M+2]<<8|this[M+3])},s.prototype.readBigUInt64LE=Me(function(M){M=M>>>0,re(M,"offset");const te=this[M],le=this[M+7];(te===void 0||le===void 0)&&q(M,this.length-8);const Ce=te+this[++M]*2**8+this[++M]*2**16+this[++M]*2**24,Te=this[++M]+this[++M]*2**8+this[++M]*2**16+le*2**24;return BigInt(Ce)+(BigInt(Te)<<BigInt(32))}),s.prototype.readBigUInt64BE=Me(function(M){M=M>>>0,re(M,"offset");const te=this[M],le=this[M+7];(te===void 0||le===void 0)&&q(M,this.length-8);const Ce=te*2**24+this[++M]*2**16+this[++M]*2**8+this[++M],Te=this[++M]*2**24+this[++M]*2**16+this[++M]*2**8+le;return(BigInt(Ce)<<BigInt(32))+BigInt(Te)}),s.prototype.readIntLE=function(M,te,le){M=M>>>0,te=te>>>0,le||I(M,te,this.length);let Ce=this[M],Te=1,Ee=0;for(;++Ee<te&&(Te*=256);)Ce+=this[M+Ee]*Te;return Te*=128,Ce>=Te&&(Ce-=Math.pow(2,8*te)),Ce},s.prototype.readIntBE=function(M,te,le){M=M>>>0,te=te>>>0,le||I(M,te,this.length);let Ce=te,Te=1,Ee=this[M+--Ce];for(;Ce>0&&(Te*=256);)Ee+=this[M+--Ce]*Te;return Te*=128,Ee>=Te&&(Ee-=Math.pow(2,8*te)),Ee},s.prototype.readInt8=function(M,te){return M=M>>>0,te||I(M,1,this.length),this[M]&128?(255-this[M]+1)*-1:this[M]},s.prototype.readInt16LE=function(M,te){M=M>>>0,te||I(M,2,this.length);const le=this[M]|this[M+1]<<8;return le&32768?le|4294901760:le},s.prototype.readInt16BE=function(M,te){M=M>>>0,te||I(M,2,this.length);const le=this[M+1]|this[M]<<8;return le&32768?le|4294901760:le},s.prototype.readInt32LE=function(M,te){return M=M>>>0,te||I(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},s.prototype.readInt32BE=function(M,te){return M=M>>>0,te||I(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},s.prototype.readBigInt64LE=Me(function(M){M=M>>>0,re(M,"offset");const te=this[M],le=this[M+7];(te===void 0||le===void 0)&&q(M,this.length-8);const Ce=this[M+4]+this[M+5]*2**8+this[M+6]*2**16+(le<<24);return(BigInt(Ce)<<BigInt(32))+BigInt(te+this[++M]*2**8+this[++M]*2**16+this[++M]*2**24)}),s.prototype.readBigInt64BE=Me(function(M){M=M>>>0,re(M,"offset");const te=this[M],le=this[M+7];(te===void 0||le===void 0)&&q(M,this.length-8);const Ce=(te<<24)+this[++M]*2**16+this[++M]*2**8+this[++M];return(BigInt(Ce)<<BigInt(32))+BigInt(this[++M]*2**24+this[++M]*2**16+this[++M]*2**8+le)}),s.prototype.readFloatLE=function(M,te){return M=M>>>0,te||I(M,4,this.length),a.read(this,M,!0,23,4)},s.prototype.readFloatBE=function(M,te){return M=M>>>0,te||I(M,4,this.length),a.read(this,M,!1,23,4)},s.prototype.readDoubleLE=function(M,te){return M=M>>>0,te||I(M,8,this.length),a.read(this,M,!0,52,8)},s.prototype.readDoubleBE=function(M,te){return M=M>>>0,te||I(M,8,this.length),a.read(this,M,!1,52,8)};function J(M,te,le,Ce,Te,Ee){if(!s.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(te>Te||te<Ee)throw new RangeError('"value" argument is out of bounds');if(le+Ce>M.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(M,te,le,Ce){if(M=+M,te=te>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;J(this,M,te,le,De,0)}let Te=1,Ee=0;for(this[te]=M&255;++Ee<le&&(Te*=256);)this[te+Ee]=M/Te&255;return te+le},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(M,te,le,Ce){if(M=+M,te=te>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;J(this,M,te,le,De,0)}let Te=le-1,Ee=1;for(this[te+Te]=M&255;--Te>=0&&(Ee*=256);)this[te+Te]=M/Ee&255;return te+le},s.prototype.writeUint8=s.prototype.writeUInt8=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,1,255,0),this[te]=M&255,te+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,2,65535,0),this[te]=M&255,this[te+1]=M>>>8,te+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,2,65535,0),this[te]=M>>>8,this[te+1]=M&255,te+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,4,4294967295,0),this[te+3]=M>>>24,this[te+2]=M>>>16,this[te+1]=M>>>8,this[te]=M&255,te+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,4,4294967295,0),this[te]=M>>>24,this[te+1]=M>>>16,this[te+2]=M>>>8,this[te+3]=M&255,te+4};function G(M,te,le,Ce,Te){$(te,Ce,Te,M,le,7);let Ee=Number(te&BigInt(4294967295));M[le++]=Ee,Ee=Ee>>8,M[le++]=Ee,Ee=Ee>>8,M[le++]=Ee,Ee=Ee>>8,M[le++]=Ee;let De=Number(te>>BigInt(32)&BigInt(4294967295));return M[le++]=De,De=De>>8,M[le++]=De,De=De>>8,M[le++]=De,De=De>>8,M[le++]=De,le}function B(M,te,le,Ce,Te){$(te,Ce,Te,M,le,7);let Ee=Number(te&BigInt(4294967295));M[le+7]=Ee,Ee=Ee>>8,M[le+6]=Ee,Ee=Ee>>8,M[le+5]=Ee,Ee=Ee>>8,M[le+4]=Ee;let De=Number(te>>BigInt(32)&BigInt(4294967295));return M[le+3]=De,De=De>>8,M[le+2]=De,De=De>>8,M[le+1]=De,De=De>>8,M[le]=De,le+8}s.prototype.writeBigUInt64LE=Me(function(M,te=0){return G(this,M,te,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Me(function(M,te=0){return B(this,M,te,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(M,te,le,Ce){if(M=+M,te=te>>>0,!Ce){const at=Math.pow(2,8*le-1);J(this,M,te,le,at-1,-at)}let Te=0,Ee=1,De=0;for(this[te]=M&255;++Te<le&&(Ee*=256);)M<0&&De===0&&this[te+Te-1]!==0&&(De=1),this[te+Te]=(M/Ee>>0)-De&255;return te+le},s.prototype.writeIntBE=function(M,te,le,Ce){if(M=+M,te=te>>>0,!Ce){const at=Math.pow(2,8*le-1);J(this,M,te,le,at-1,-at)}let Te=le-1,Ee=1,De=0;for(this[te+Te]=M&255;--Te>=0&&(Ee*=256);)M<0&&De===0&&this[te+Te+1]!==0&&(De=1),this[te+Te]=(M/Ee>>0)-De&255;return te+le},s.prototype.writeInt8=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,1,127,-128),M<0&&(M=255+M+1),this[te]=M&255,te+1},s.prototype.writeInt16LE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,2,32767,-32768),this[te]=M&255,this[te+1]=M>>>8,te+2},s.prototype.writeInt16BE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,2,32767,-32768),this[te]=M>>>8,this[te+1]=M&255,te+2},s.prototype.writeInt32LE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,4,2147483647,-2147483648),this[te]=M&255,this[te+1]=M>>>8,this[te+2]=M>>>16,this[te+3]=M>>>24,te+4},s.prototype.writeInt32BE=function(M,te,le){return M=+M,te=te>>>0,le||J(this,M,te,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),this[te]=M>>>24,this[te+1]=M>>>16,this[te+2]=M>>>8,this[te+3]=M&255,te+4},s.prototype.writeBigInt64LE=Me(function(M,te=0){return G(this,M,te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Me(function(M,te=0){return B(this,M,te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function N(M,te,le,Ce,Te,Ee){if(le+Ce>M.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function F(M,te,le,Ce,Te){return te=+te,le=le>>>0,Te||N(M,te,le,4),a.write(M,te,le,Ce,23,4),le+4}s.prototype.writeFloatLE=function(M,te,le){return F(this,M,te,!0,le)},s.prototype.writeFloatBE=function(M,te,le){return F(this,M,te,!1,le)};function ne(M,te,le,Ce,Te){return te=+te,le=le>>>0,Te||N(M,te,le,8),a.write(M,te,le,Ce,52,8),le+8}s.prototype.writeDoubleLE=function(M,te,le){return ne(this,M,te,!0,le)},s.prototype.writeDoubleBE=function(M,te,le){return ne(this,M,te,!1,le)},s.prototype.copy=function(M,te,le,Ce){if(!s.isBuffer(M))throw new TypeError("argument should be a Buffer");if(le||(le=0),!Ce&&Ce!==0&&(Ce=this.length),te>=M.length&&(te=M.length),te||(te=0),Ce>0&&Ce<le&&(Ce=le),Ce===le||M.length===0||this.length===0)return 0;if(te<0)throw new RangeError("targetStart out of bounds");if(le<0||le>=this.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("sourceEnd out of bounds");Ce>this.length&&(Ce=this.length),M.length-te<Ce-le&&(Ce=M.length-te+le);const Te=Ce-le;return this===M&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(te,le,Ce):Uint8Array.prototype.set.call(M,this.subarray(le,Ce),te),Te},s.prototype.fill=function(M,te,le,Ce){if(typeof M=="string"){if(typeof te=="string"?(Ce=te,te=0,le=this.length):typeof le=="string"&&(Ce=le,le=this.length),Ce!==void 0&&typeof Ce!="string")throw new TypeError("encoding must be a string");if(typeof Ce=="string"&&!s.isEncoding(Ce))throw new TypeError("Unknown encoding: "+Ce);if(M.length===1){const Ee=M.charCodeAt(0);(Ce==="utf8"&&Ee<128||Ce==="latin1")&&(M=Ee)}}else typeof M=="number"?M=M&255:typeof M=="boolean"&&(M=Number(M));if(te<0||this.length<te||this.length<le)throw new RangeError("Out of range index");if(le<=te)return this;te=te>>>0,le=le===void 0?this.length:le>>>0,M||(M=0);let Te;if(typeof M=="number")for(Te=te;Te<le;++Te)this[Te]=M;else{const Ee=s.isBuffer(M)?M:s.from(M,Ce),De=Ee.length;if(De===0)throw new TypeError('The value "'+M+'" is invalid for argument "value"');for(Te=0;Te<le-te;++Te)this[Te+te]=Ee[Te%De]}return this};const se={};function be(M,te,le){se[M]=class extends le{constructor(){super(),Object.defineProperty(this,"message",{value:te.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${M}]`,delete this.name}get code(){return M}set code(Ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ce,writable:!0})}toString(){return`${this.name} [${M}]: ${this.message}`}}}be("ERR_BUFFER_OUT_OF_BOUNDS",function(M){return M?`${M} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(M,te){return`The "${M}" argument must be of type number. Received type ${typeof te}`},TypeError),be("ERR_OUT_OF_RANGE",function(M,te,le){let Ce=`The value of "${M}" is out of range.`,Te=le;return Number.isInteger(le)&&Math.abs(le)>2**32?Te=xe(String(le)):typeof le=="bigint"&&(Te=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Te=xe(Te)),Te+="n"),Ce+=` It must be ${te}. Received ${Te}`,Ce},RangeError);function xe(M){let te="",le=M.length;const Ce=M[0]==="-"?1:0;for(;le>=Ce+4;le-=3)te=`_${M.slice(le-3,le)}${te}`;return`${M.slice(0,le)}${te}`}function E(M,te,le){re(te,"offset"),(M[te]===void 0||M[te+le]===void 0)&&q(te,M.length-(le+1))}function $(M,te,le,Ce,Te,Ee){if(M>le||M<te){const De=typeof te=="bigint"?"n":"";let at;throw te===0||te===BigInt(0)?at=`>= 0${De} and < 2${De} ** ${(Ee+1)*8}${De}`:at=`>= -(2${De} ** ${(Ee+1)*8-1}${De}) and < 2 ** ${(Ee+1)*8-1}${De}`,new se.ERR_OUT_OF_RANGE("value",at,M)}E(Ce,Te,Ee)}function re(M,te){if(typeof M!="number")throw new se.ERR_INVALID_ARG_TYPE(te,"number",M)}function q(M,te,le){throw Math.floor(M)!==M?(re(M,le),new se.ERR_OUT_OF_RANGE("offset","an integer",M)):te<0?new se.ERR_BUFFER_OUT_OF_BOUNDS:new se.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${te}`,M)}const ue=/[^+/0-9A-Za-z-_]/g;function pe(M){if(M=M.split("=")[0],M=M.trim().replace(ue,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function Z(M,te){te=te||1/0;let le;const Ce=M.length;let Te=null;const Ee=[];for(let De=0;De<Ce;++De){if(le=M.charCodeAt(De),le>55295&&le<57344){if(!Te){if(le>56319){(te-=3)>-1&&Ee.push(239,191,189);continue}else if(De+1===Ce){(te-=3)>-1&&Ee.push(239,191,189);continue}Te=le;continue}if(le<56320){(te-=3)>-1&&Ee.push(239,191,189),Te=le;continue}le=(Te-55296<<10|le-56320)+65536}else Te&&(te-=3)>-1&&Ee.push(239,191,189);if(Te=null,le<128){if((te-=1)<0)break;Ee.push(le)}else if(le<2048){if((te-=2)<0)break;Ee.push(le>>6|192,le&63|128)}else if(le<65536){if((te-=3)<0)break;Ee.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((te-=4)<0)break;Ee.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Ee}function ae(M){const te=[];for(let le=0;le<M.length;++le)te.push(M.charCodeAt(le)&255);return te}function ce(M,te){let le,Ce,Te;const Ee=[];for(let De=0;De<M.length&&!((te-=2)<0);++De)le=M.charCodeAt(De),Ce=le>>8,Te=le%256,Ee.push(Te),Ee.push(Ce);return Ee}function ve(M){return t.toByteArray(pe(M))}function ge(M,te,le,Ce){let Te;for(Te=0;Te<Ce&&!(Te+le>=te.length||Te>=M.length);++Te)te[Te+le]=M[Te];return Te}function fe(M,te){return M instanceof te||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===te.name}function ye(M){return M!==M}const Se=(function(){const M="0123456789abcdef",te=new Array(256);for(let le=0;le<16;++le){const Ce=le*16;for(let Te=0;Te<16;++Te)te[Ce+Te]=M[le]+M[Te]}return te})();function Me(M){return typeof BigInt>"u"?tt:M}function tt(){throw new Error("BigInt not supported")}})(Mne)),Mne}const _ne=Aq(Cae);var r7,Lne;function lit(){if(Lne)return r7;Lne=1;function e(v,f){var y=Object.keys(v);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(v);f&&(b=b.filter(function(k){return Object.getOwnPropertyDescriptor(v,k).enumerable})),y.push.apply(y,b)}return y}function t(v){for(var f=1;f<arguments.length;f++){var y=arguments[f]!=null?arguments[f]:{};f%2?e(Object(y),!0).forEach(function(b){a(v,b,y[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(b){Object.defineProperty(v,b,Object.getOwnPropertyDescriptor(y,b))})}return v}function a(v,f,y){return f=o(f),f in v?Object.defineProperty(v,f,{value:y,enumerable:!0,configurable:!0,writable:!0}):v[f]=y,v}function r(v,f){if(!(v instanceof f))throw new TypeError("Cannot call a class as a function")}function n(v,f){for(var y=0;y<f.length;y++){var b=f[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,o(b.key),b)}}function i(v,f,y){return f&&n(v.prototype,f),Object.defineProperty(v,"prototype",{writable:!1}),v}function o(v){var f=s(v,"string");return typeof f=="symbol"?f:String(f)}function s(v,f){if(typeof v!="object"||v===null)return v;var y=v[Symbol.toPrimitive];if(y!==void 0){var b=y.call(v,f);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(v)}var l=t0(),c=l.Buffer,u=_ne,d=u.inspect,h=d&&d.custom||"inspect";function m(v,f,y){c.prototype.copy.call(v,f,y)}return r7=(function(){function v(){r(this,v),this.head=null,this.tail=null,this.length=0}return i(v,[{key:"push",value:function(f){var y={data:f,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(f){var y={data:f,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(f){if(this.length===0)return"";for(var y=this.head,b=""+y.data;y=y.next;)b+=f+y.data;return b}},{key:"concat",value:function(f){if(this.length===0)return c.alloc(0);for(var y=c.allocUnsafe(f>>>0),b=this.head,k=0;b;)m(b.data,y,k),k+=b.data.length,b=b.next;return y}},{key:"consume",value:function(f,y){var b;return f<this.head.data.length?(b=this.head.data.slice(0,f),this.head.data=this.head.data.slice(f)):f===this.head.data.length?b=this.shift():b=y?this._getString(f):this._getBuffer(f),b}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(f){var y=this.head,b=1,k=y.data;for(f-=k.length;y=y.next;){var w=y.data,C=f>w.length?w.length:f;if(C===w.length?k+=w:k+=w.slice(0,f),f-=C,f===0){C===w.length?(++b,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=w.slice(C));break}++b}return this.length-=b,k}},{key:"_getBuffer",value:function(f){var y=c.allocUnsafe(f),b=this.head,k=1;for(b.data.copy(y),f-=b.data.length;b=b.next;){var w=b.data,C=f>w.length?w.length:f;if(w.copy(y,y.length-f,0,C),f-=C,f===0){C===w.length?(++k,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=w.slice(C));break}++k}return this.length-=k,y}},{key:h,value:function(f,y){return d(this,t(t({},y),{},{depth:0,customInspect:!1}))}}]),v})(),r7}var n7,Dne;function Nne(){if(Dne)return n7;Dne=1;function e(o,s){var l=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,o)):process.nextTick(n,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(d){!s&&d?l._writableState?l._writableState.errorEmitted?process.nextTick(a,l):(l._writableState.errorEmitted=!0,process.nextTick(t,l,d)):process.nextTick(t,l,d):s?(process.nextTick(a,l),s(d)):process.nextTick(a,l)}),this)}function t(o,s){n(o,s),a(o)}function a(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function n(o,s){o.emit("error",s)}function i(o,s){var l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(s):o.emit("error",s)}return n7={destroy:e,undestroy:r,errorOrDestroy:i},n7}var i7={},$ne;function Vv(){if($ne)return i7;$ne=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var t={};function a(s,l,c){c||(c=Error);function u(h,m,v){return typeof l=="string"?l:l(h,m,v)}var d=(function(h){e(m,h);function m(v,f,y){return h.call(this,u(v,f,y))||this}return m})(c);d.prototype.name=c.name,d.prototype.code=s,t[s]=d}function r(s,l){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(l," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}else return"of ".concat(l," ").concat(String(s))}function n(s,l,c){return s.substr(0,l.length)===l}function i(s,l,c){return(c===void 0||c>s.length)&&(c=s.length),s.substring(c-l.length,c)===l}function o(s,l,c){return typeof c!="number"&&(c=0),c+l.length>s.length?!1:s.indexOf(l,c)!==-1}return a("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),a("ERR_INVALID_ARG_TYPE",function(s,l,c){var u;typeof l=="string"&&n(l,"not ")?(u="must not be",l=l.replace(/^not /,"")):u="must be";var d;if(i(s," argument"))d="The ".concat(s," ").concat(u," ").concat(r(l,"type"));else{var h=o(s,".")?"property":"argument";d='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(l,"type"))}return d+=". Received type ".concat(typeof c),d},TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i7.codes=t,i7}var o7,Ine;function Kne(){if(Ine)return o7;Ine=1;var e=Vv().codes.ERR_INVALID_OPT_VALUE;function t(r,n,i){return r.highWaterMark!=null?r.highWaterMark:n?r[i]:null}function a(r,n,i,o){var s=t(n,o,i);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var l=o?i:"highWaterMark";throw new e(l,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return o7={getHighWaterMark:a},o7}var s7,Vne;function cit(){if(Vne)return s7;Vne=1,s7=e;function e(a,r){if(t("noDeprecation"))return a;var n=!1;function i(){if(!n){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return a.apply(this,arguments)}return i}function t(a){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[a];return r==null?!1:String(r).toLowerCase()==="true"}return s7}var l7,Hne;function Fne(){if(Hne)return l7;Hne=1,l7=P;function e(F){var ne=this;this.next=null,this.entry=null,this.finish=function(){N(ne,F)}}var t;P.WritableState=S;var a={deprecate:cit()},r=Tne(),n=t0().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(F){return n.from(F)}function s(F){return n.isBuffer(F)||F instanceof i}var l=Nne(),c=Kne(),u=c.getHighWaterMark,d=Vv().codes,h=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,v=d.ERR_MULTIPLE_CALLBACK,f=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,k=d.ERR_STREAM_WRITE_AFTER_END,w=d.ERR_UNKNOWN_ENCODING,C=l.errorOrDestroy;function O(){}function S(F,ne,se){t=t||Hv(),F=F||{},typeof se!="boolean"&&(se=ne instanceof t),this.objectMode=!!F.objectMode,se&&(this.objectMode=this.objectMode||!!F.writableObjectMode),this.highWaterMark=u(this,F,"writableHighWaterMark",se),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var be=F.decodeStrings===!1;this.decodeStrings=!be,this.defaultEncoding=F.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(xe){ee(ne,xe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=F.emitClose!==!1,this.autoDestroy=!!F.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}S.prototype.getBuffer=function(){for(var F=this.bufferedRequest,ne=[];F;)ne.push(F),F=F.next;return ne},(function(){try{Object.defineProperty(S.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var j;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(F){return j.call(this,F)?!0:this!==P?!1:F&&F._writableState instanceof S}})):j=function(F){return F instanceof this};function P(F){t=t||Hv();var ne=this instanceof t;if(!ne&&!j.call(P,this))return new P(F);this._writableState=new S(F,this,ne),this.writable=!0,F&&(typeof F.write=="function"&&(this._write=F.write),typeof F.writev=="function"&&(this._writev=F.writev),typeof F.destroy=="function"&&(this._destroy=F.destroy),typeof F.final=="function"&&(this._final=F.final)),r.call(this)}P.prototype.pipe=function(){C(this,new f)};function R(F,ne){var se=new k;C(F,se),process.nextTick(ne,se)}function _(F,ne,se,be){var xe;return se===null?xe=new b:typeof se!="string"&&!ne.objectMode&&(xe=new h("chunk",["string","Buffer"],se)),xe?(C(F,xe),process.nextTick(be,xe),!1):!0}P.prototype.write=function(F,ne,se){var be=this._writableState,xe=!1,E=!be.objectMode&&s(F);return E&&!n.isBuffer(F)&&(F=o(F)),typeof ne=="function"&&(se=ne,ne=null),E?ne="buffer":ne||(ne=be.defaultEncoding),typeof se!="function"&&(se=O),be.ending?R(this,se):(E||_(this,be,F,se))&&(be.pendingcb++,xe=L(this,be,E,F,ne,se)),xe},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var F=this._writableState;F.corked&&(F.corked--,!F.writing&&!F.corked&&!F.bufferProcessing&&F.bufferedRequest&&de(this,F))},P.prototype.setDefaultEncoding=function(F){if(typeof F=="string"&&(F=F.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((F+"").toLowerCase())>-1))throw new w(F);return this._writableState.defaultEncoding=F,this},Object.defineProperty(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function K(F,ne,se){return!F.objectMode&&F.decodeStrings!==!1&&typeof ne=="string"&&(ne=n.from(ne,se)),ne}Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function L(F,ne,se,be,xe,E){if(!se){var $=K(ne,be,xe);be!==$&&(se=!0,xe="buffer",be=$)}var re=ne.objectMode?1:be.length;ne.length+=re;var q=ne.length<ne.highWaterMark;if(q||(ne.needDrain=!0),ne.writing||ne.corked){var ue=ne.lastBufferedRequest;ne.lastBufferedRequest={chunk:be,encoding:xe,isBuf:se,callback:E,next:null},ue?ue.next=ne.lastBufferedRequest:ne.bufferedRequest=ne.lastBufferedRequest,ne.bufferedRequestCount+=1}else Q(F,ne,!1,re,be,xe,E);return q}function Q(F,ne,se,be,xe,E,$){ne.writelen=be,ne.writecb=$,ne.writing=!0,ne.sync=!0,ne.destroyed?ne.onwrite(new y("write")):se?F._writev(xe,ne.onwrite):F._write(xe,E,ne.onwrite),ne.sync=!1}function D(F,ne,se,be,xe){--ne.pendingcb,se?(process.nextTick(xe,be),process.nextTick(G,F,ne),F._writableState.errorEmitted=!0,C(F,be)):(xe(be),F._writableState.errorEmitted=!0,C(F,be),G(F,ne))}function Y(F){F.writing=!1,F.writecb=null,F.length-=F.writelen,F.writelen=0}function ee(F,ne){var se=F._writableState,be=se.sync,xe=se.writecb;if(typeof xe!="function")throw new v;if(Y(se),ne)D(F,se,be,ne,xe);else{var E=W(se)||F.destroyed;!E&&!se.corked&&!se.bufferProcessing&&se.bufferedRequest&&de(F,se),be?process.nextTick(oe,F,se,E,xe):oe(F,se,E,xe)}}function oe(F,ne,se,be){se||X(F,ne),ne.pendingcb--,be(),G(F,ne)}function X(F,ne){ne.length===0&&ne.needDrain&&(ne.needDrain=!1,F.emit("drain"))}function de(F,ne){ne.bufferProcessing=!0;var se=ne.bufferedRequest;if(F._writev&&se&&se.next){var be=ne.bufferedRequestCount,xe=new Array(be),E=ne.corkedRequestsFree;E.entry=se;for(var $=0,re=!0;se;)xe[$]=se,se.isBuf||(re=!1),se=se.next,$+=1;xe.allBuffers=re,Q(F,ne,!0,ne.length,xe,"",E.finish),ne.pendingcb++,ne.lastBufferedRequest=null,E.next?(ne.corkedRequestsFree=E.next,E.next=null):ne.corkedRequestsFree=new e(ne),ne.bufferedRequestCount=0}else{for(;se;){var q=se.chunk,ue=se.encoding,pe=se.callback,Z=ne.objectMode?1:q.length;if(Q(F,ne,!1,Z,q,ue,pe),se=se.next,ne.bufferedRequestCount--,ne.writing)break}se===null&&(ne.lastBufferedRequest=null)}ne.bufferedRequest=se,ne.bufferProcessing=!1}P.prototype._write=function(F,ne,se){se(new m("_write()"))},P.prototype._writev=null,P.prototype.end=function(F,ne,se){var be=this._writableState;return typeof F=="function"?(se=F,F=null,ne=null):typeof ne=="function"&&(se=ne,ne=null),F!=null&&this.write(F,ne),be.corked&&(be.corked=1,this.uncork()),be.ending||B(this,be,se),this},Object.defineProperty(P.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function W(F){return F.ending&&F.length===0&&F.bufferedRequest===null&&!F.finished&&!F.writing}function I(F,ne){F._final(function(se){ne.pendingcb--,se&&C(F,se),ne.prefinished=!0,F.emit("prefinish"),G(F,ne)})}function J(F,ne){!ne.prefinished&&!ne.finalCalled&&(typeof F._final=="function"&&!ne.destroyed?(ne.pendingcb++,ne.finalCalled=!0,process.nextTick(I,F,ne)):(ne.prefinished=!0,F.emit("prefinish")))}function G(F,ne){var se=W(ne);if(se&&(J(F,ne),ne.pendingcb===0&&(ne.finished=!0,F.emit("finish"),ne.autoDestroy))){var be=F._readableState;(!be||be.autoDestroy&&be.endEmitted)&&F.destroy()}return se}function B(F,ne,se){ne.ending=!0,G(F,ne),se&&(ne.finished?process.nextTick(se):F.once("finish",se)),ne.ended=!0,F.writable=!1}function N(F,ne,se){var be=F.entry;for(F.entry=null;be;){var xe=be.callback;ne.pendingcb--,xe(se),be=be.next}ne.corkedRequestsFree.next=F}return Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(F){this._writableState&&(this._writableState.destroyed=F)}}),P.prototype.destroy=l.destroy,P.prototype._undestroy=l.undestroy,P.prototype._destroy=function(F,ne){ne(F)},l7}var c7,Gne;function Hv(){if(Gne)return c7;Gne=1;var e=Object.keys||function(c){var u=[];for(var d in c)u.push(d);return u};c7=o;for(var t=eie(),a=Fne(),r=e(a.prototype),n=0;n<r.length;n++){var i=r[n];o.prototype[i]||(o.prototype[i]=a.prototype[i])}function o(c){if(!(this instanceof o))return new o(c);t.call(this,c),a.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),c7}var u7={},d7={exports:{}},qne;function uit(){return qne||(qne=1,(function(e,t){var a=t0(),r=a.Buffer;function n(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=a:(n(a,t),t.Buffer=i);function i(o,s,l){return r(o,s,l)}i.prototype=Object.create(r.prototype),n(r,i),i.from=function(o,s,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,l)},i.alloc=function(o,s,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=r(o);return s!==void 0?typeof l=="string"?c.fill(s,l):c.fill(s):c.fill(0),c},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return a.SlowBuffer(o)}})(d7,d7.exports)),d7.exports}var Qne;function Une(){if(Qne)return u7;Qne=1;var e=uit().Buffer,t=e.isEncoding||function(b){switch(b=""+b,b&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(b){if(!b)return"utf8";for(var k;;)switch(b){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return b;default:if(k)return;b=(""+b).toLowerCase(),k=!0}}function r(b){var k=a(b);if(typeof k!="string"&&(e.isEncoding===t||!t(b)))throw new Error("Unknown encoding: "+b);return k||b}u7.StringDecoder=n;function n(b){this.encoding=r(b);var k;switch(this.encoding){case"utf16le":this.text=d,this.end=h,k=4;break;case"utf8":this.fillLast=l,k=4;break;case"base64":this.text=m,this.end=v,k=3;break;default:this.write=f,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(k)}n.prototype.write=function(b){if(b.length===0)return"";var k,w;if(this.lastNeed){if(k=this.fillLast(b),k===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;return w<b.length?k?k+this.text(b,w):this.text(b,w):k||""},n.prototype.end=u,n.prototype.text=c,n.prototype.fillLast=function(b){if(this.lastNeed<=b.length)return b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,b.length),this.lastNeed-=b.length};function i(b){return b<=127?0:b>>5===6?2:b>>4===14?3:b>>3===30?4:b>>6===2?-1:-2}function o(b,k,w){var C=k.length-1;if(C<w)return 0;var O=i(k[C]);return O>=0?(O>0&&(b.lastNeed=O-1),O):--C<w||O===-2?0:(O=i(k[C]),O>=0?(O>0&&(b.lastNeed=O-2),O):--C<w||O===-2?0:(O=i(k[C]),O>=0?(O>0&&(O===2?O=0:b.lastNeed=O-3),O):0))}function s(b,k,w){if((k[0]&192)!==128)return b.lastNeed=0,"\uFFFD";if(b.lastNeed>1&&k.length>1){if((k[1]&192)!==128)return b.lastNeed=1,"\uFFFD";if(b.lastNeed>2&&k.length>2&&(k[2]&192)!==128)return b.lastNeed=2,"\uFFFD"}}function l(b){var k=this.lastTotal-this.lastNeed,w=s(this,b);if(w!==void 0)return w;if(this.lastNeed<=b.length)return b.copy(this.lastChar,k,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,k,0,b.length),this.lastNeed-=b.length}function c(b,k){var w=o(this,b,k);if(!this.lastNeed)return b.toString("utf8",k);this.lastTotal=w;var C=b.length-(w-this.lastNeed);return b.copy(this.lastChar,0,C),b.toString("utf8",k,C)}function u(b){var k=b&&b.length?this.write(b):"";return this.lastNeed?k+"\uFFFD":k}function d(b,k){if((b.length-k)%2===0){var w=b.toString("utf16le",k);if(w){var C=w.charCodeAt(w.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",k,b.length-1)}function h(b){var k=b&&b.length?this.write(b):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,w)}return k}function m(b,k){var w=(b.length-k)%3;return w===0?b.toString("base64",k):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",k,b.length-w))}function v(b){var k=b&&b.length?this.write(b):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function f(b){return b.toString(this.encoding)}function y(b){return b&&b.length?this.write(b):""}return u7}var p7,Wne;function h7(){if(Wne)return p7;Wne=1;var e=Vv().codes.ERR_STREAM_PREMATURE_CLOSE;function t(i){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];i.apply(this,l)}}}function a(){}function r(i){return i.setHeader&&typeof i.abort=="function"}function n(i,o,s){if(typeof o=="function")return n(i,null,o);o||(o={}),s=t(s||a);var l=o.readable||o.readable!==!1&&i.readable,c=o.writable||o.writable!==!1&&i.writable,u=function(){i.writable||h()},d=i._writableState&&i._writableState.finished,h=function(){c=!1,d=!0,l||s.call(i)},m=i._readableState&&i._readableState.endEmitted,v=function(){l=!1,m=!0,c||s.call(i)},f=function(k){s.call(i,k)},y=function(){var k;if(l&&!m)return(!i._readableState||!i._readableState.ended)&&(k=new e),s.call(i,k);if(c&&!d)return(!i._writableState||!i._writableState.ended)&&(k=new e),s.call(i,k)},b=function(){i.req.on("finish",h)};return r(i)?(i.on("complete",h),i.on("abort",y),i.req?b():i.on("request",b)):c&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",v),i.on("finish",h),o.error!==!1&&i.on("error",f),i.on("close",y),function(){i.removeListener("complete",h),i.removeListener("abort",y),i.removeListener("request",b),i.req&&i.req.removeListener("finish",h),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",h),i.removeListener("end",v),i.removeListener("error",f),i.removeListener("close",y)}}return p7=n,p7}var m7,Jne;function dit(){if(Jne)return m7;Jne=1;var e;function t(w,C,O){return C=a(C),C in w?Object.defineProperty(w,C,{value:O,enumerable:!0,configurable:!0,writable:!0}):w[C]=O,w}function a(w){var C=r(w,"string");return typeof C=="symbol"?C:String(C)}function r(w,C){if(typeof w!="object"||w===null)return w;var O=w[Symbol.toPrimitive];if(O!==void 0){var S=O.call(w,C);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(w)}var n=h7(),i=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function h(w,C){return{value:w,done:C}}function m(w){var C=w[i];if(C!==null){var O=w[d].read();O!==null&&(w[c]=null,w[i]=null,w[o]=null,C(h(O,!1)))}}function v(w){process.nextTick(m,w)}function f(w,C){return function(O,S){w.then(function(){if(C[l]){O(h(void 0,!0));return}C[u](O,S)},S)}}var y=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((e={get stream(){return this[d]},next:function(){var w=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[l])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise(function(P,R){process.nextTick(function(){w[s]?R(w[s]):P(h(void 0,!0))})});var O=this[c],S;if(O)S=new Promise(f(O,this));else{var j=this[d].read();if(j!==null)return Promise.resolve(h(j,!1));S=new Promise(this[u])}return this[c]=S,S}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var w=this;return new Promise(function(C,O){w[d].destroy(null,function(S){if(S){O(S);return}C(h(void 0,!0))})})}),e),y),k=function(w){var C,O=Object.create(b,(C={},t(C,d,{value:w,writable:!0}),t(C,i,{value:null,writable:!0}),t(C,o,{value:null,writable:!0}),t(C,s,{value:null,writable:!0}),t(C,l,{value:w._readableState.endEmitted,writable:!0}),t(C,u,{value:function(S,j){var P=O[d].read();P?(O[c]=null,O[i]=null,O[o]=null,S(h(P,!1))):(O[i]=S,O[o]=j)},writable:!0}),C));return O[c]=null,n(w,function(S){if(S&&S.code!=="ERR_STREAM_PREMATURE_CLOSE"){var j=O[o];j!==null&&(O[c]=null,O[i]=null,O[o]=null,j(S)),O[s]=S;return}var P=O[i];P!==null&&(O[c]=null,O[i]=null,O[o]=null,P(h(void 0,!0))),O[l]=!0}),w.on("readable",v.bind(null,O)),O};return m7=k,m7}var Zne,Xne;function pit(){return Xne||(Xne=1,Zne=function(){throw new Error("Readable.from is not available in the browser")}),Zne}var g7,Yne;function eie(){if(Yne)return g7;Yne=1,g7=R;var e;R.ReadableState=P;var t=function(E,$){return E.listeners($).length},a=Tne(),r=t0().Buffer,n=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(E){return r.from(E)}function o(E){return r.isBuffer(E)||E instanceof n}var s=_ne,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=lit(),u=Nne(),d=Kne(),h=d.getHighWaterMark,m=Vv().codes,v=m.ERR_INVALID_ARG_TYPE,f=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,b=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,k,w,C,O=u.errorOrDestroy,S=["error","close","destroy","pause","resume"];function j(E,$,re){if(typeof E.prependListener=="function")return E.prependListener($,re);!E._events||!E._events[$]?E.on($,re):Array.isArray(E._events[$])?E._events[$].unshift(re):E._events[$]=[re,E._events[$]]}function P(E,$,re){e=e||Hv(),E=E||{},typeof re!="boolean"&&(re=$ instanceof e),this.objectMode=!!E.objectMode,re&&(this.objectMode=this.objectMode||!!E.readableObjectMode),this.highWaterMark=h(this,E,"readableHighWaterMark",re),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=E.emitClose!==!1,this.autoDestroy=!!E.autoDestroy,this.destroyed=!1,this.defaultEncoding=E.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,E.encoding&&(k||(k=Une().StringDecoder),this.decoder=new k(E.encoding),this.encoding=E.encoding)}function R(E){if(e=e||Hv(),!(this instanceof R))return new R(E);var $=this instanceof e;this._readableState=new P(E,this,$),this.readable=!0,E&&(typeof E.read=="function"&&(this._read=E.read),typeof E.destroy=="function"&&(this._destroy=E.destroy)),a.call(this)}Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(E){this._readableState&&(this._readableState.destroyed=E)}}),R.prototype.destroy=u.destroy,R.prototype._undestroy=u.undestroy,R.prototype._destroy=function(E,$){$(E)},R.prototype.push=function(E,$){var re=this._readableState,q;return re.objectMode?q=!0:typeof E=="string"&&($=$||re.defaultEncoding,$!==re.encoding&&(E=r.from(E,$),$=""),q=!0),_(this,E,$,!1,q)},R.prototype.unshift=function(E){return _(this,E,null,!0,!1)};function _(E,$,re,q,ue){l("readableAddChunk",$);var pe=E._readableState;if($===null)pe.reading=!1,ee(E,pe);else{var Z;if(ue||(Z=L(pe,$)),Z)O(E,Z);else if(pe.objectMode||$&&$.length>0)if(typeof $!="string"&&!pe.objectMode&&Object.getPrototypeOf($)!==r.prototype&&($=i($)),q)pe.endEmitted?O(E,new b):K(E,pe,$,!0);else if(pe.ended)O(E,new f);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!re?($=pe.decoder.write($),pe.objectMode||$.length!==0?K(E,pe,$,!1):de(E,pe)):K(E,pe,$,!1)}else q||(pe.reading=!1,de(E,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function K(E,$,re,q){$.flowing&&$.length===0&&!$.sync?($.awaitDrain=0,E.emit("data",re)):($.length+=$.objectMode?1:re.length,q?$.buffer.unshift(re):$.buffer.push(re),$.needReadable&&oe(E)),de(E,$)}function L(E,$){var re;return!o($)&&typeof $!="string"&&$!==void 0&&!E.objectMode&&(re=new v("chunk",["string","Buffer","Uint8Array"],$)),re}R.prototype.isPaused=function(){return this._readableState.flowing===!1},R.prototype.setEncoding=function(E){k||(k=Une().StringDecoder);var $=new k(E);this._readableState.decoder=$,this._readableState.encoding=this._readableState.decoder.encoding;for(var re=this._readableState.buffer.head,q="";re!==null;)q+=$.write(re.data),re=re.next;return this._readableState.buffer.clear(),q!==""&&this._readableState.buffer.push(q),this._readableState.length=q.length,this};var Q=1073741824;function D(E){return E>=Q?E=Q:(E--,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E++),E}function Y(E,$){return E<=0||$.length===0&&$.ended?0:$.objectMode?1:E!==E?$.flowing&&$.length?$.buffer.head.data.length:$.length:(E>$.highWaterMark&&($.highWaterMark=D(E)),E<=$.length?E:$.ended?$.length:($.needReadable=!0,0))}R.prototype.read=function(E){l("read",E),E=parseInt(E,10);var $=this._readableState,re=E;if(E!==0&&($.emittedReadable=!1),E===0&&$.needReadable&&(($.highWaterMark!==0?$.length>=$.highWaterMark:$.length>0)||$.ended))return l("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?se(this):oe(this),null;if(E=Y(E,$),E===0&&$.ended)return $.length===0&&se(this),null;var q=$.needReadable;l("need readable",q),($.length===0||$.length-E<$.highWaterMark)&&(q=!0,l("length less than watermark",q)),$.ended||$.reading?(q=!1,l("reading or ended",q)):q&&(l("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(E=Y(re,$)));var ue;return E>0?ue=ne(E,$):ue=null,ue===null?($.needReadable=$.length<=$.highWaterMark,E=0):($.length-=E,$.awaitDrain=0),$.length===0&&($.ended||($.needReadable=!0),re!==E&&$.ended&&se(this)),ue!==null&&this.emit("data",ue),ue};function ee(E,$){if(l("onEofChunk"),!$.ended){if($.decoder){var re=$.decoder.end();re&&re.length&&($.buffer.push(re),$.length+=$.objectMode?1:re.length)}$.ended=!0,$.sync?oe(E):($.needReadable=!1,$.emittedReadable||($.emittedReadable=!0,X(E)))}}function oe(E){var $=E._readableState;l("emitReadable",$.needReadable,$.emittedReadable),$.needReadable=!1,$.emittedReadable||(l("emitReadable",$.flowing),$.emittedReadable=!0,process.nextTick(X,E))}function X(E){var $=E._readableState;l("emitReadable_",$.destroyed,$.length,$.ended),!$.destroyed&&($.length||$.ended)&&(E.emit("readable"),$.emittedReadable=!1),$.needReadable=!$.flowing&&!$.ended&&$.length<=$.highWaterMark,F(E)}function de(E,$){$.readingMore||($.readingMore=!0,process.nextTick(W,E,$))}function W(E,$){for(;!$.reading&&!$.ended&&($.length<$.highWaterMark||$.flowing&&$.length===0);){var re=$.length;if(l("maybeReadMore read 0"),E.read(0),re===$.length)break}$.readingMore=!1}R.prototype._read=function(E){O(this,new y("_read()"))},R.prototype.pipe=function(E,$){var re=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=E;break;case 1:q.pipes=[q.pipes,E];break;default:q.pipes.push(E);break}q.pipesCount+=1,l("pipe count=%d opts=%j",q.pipesCount,$);var ue=(!$||$.end!==!1)&&E!==null&&E!==process.stderr,pe=ue?ae:tt;q.endEmitted?process.nextTick(pe):re.once("end",pe),E.on("unpipe",Z);function Z(M,te){l("onunpipe"),M===re&&te&&te.hasUnpiped===!1&&(te.hasUnpiped=!0,ge())}function ae(){l("onend"),E.end()}var ce=I(re);E.on("drain",ce);var ve=!1;function ge(){l("cleanup"),E.removeListener("close",Se),E.removeListener("finish",Me),E.removeListener("drain",ce),E.removeListener("error",ye),E.removeListener("unpipe",Z),re.removeListener("end",ae),re.removeListener("end",tt),re.removeListener("data",fe),ve=!0,q.awaitDrain&&(!E._writableState||E._writableState.needDrain)&&ce()}re.on("data",fe);function fe(M){l("ondata");var te=E.write(M);l("dest.write",te),te===!1&&((q.pipesCount===1&&q.pipes===E||q.pipesCount>1&&xe(q.pipes,E)!==-1)&&!ve&&(l("false write response, pause",q.awaitDrain),q.awaitDrain++),re.pause())}function ye(M){l("onerror",M),tt(),E.removeListener("error",ye),t(E,"error")===0&&O(E,M)}j(E,"error",ye);function Se(){E.removeListener("finish",Me),tt()}E.once("close",Se);function Me(){l("onfinish"),E.removeListener("close",Se),tt()}E.once("finish",Me);function tt(){l("unpipe"),re.unpipe(E)}return E.emit("pipe",re),q.flowing||(l("pipe resume"),re.resume()),E};function I(E){return function(){var $=E._readableState;l("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&t(E,"data")&&($.flowing=!0,F(E))}}R.prototype.unpipe=function(E){var $=this._readableState,re={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return E&&E!==$.pipes?this:(E||(E=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,E&&E.emit("unpipe",this,re),this);if(!E){var q=$.pipes,ue=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var pe=0;pe<ue;pe++)q[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var Z=xe($.pipes,E);return Z===-1?this:($.pipes.splice(Z,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),E.emit("unpipe",this,re),this)},R.prototype.on=function(E,$){var re=a.prototype.on.call(this,E,$),q=this._readableState;return E==="data"?(q.readableListening=this.listenerCount("readable")>0,q.flowing!==!1&&this.resume()):E==="readable"&&!q.endEmitted&&!q.readableListening&&(q.readableListening=q.needReadable=!0,q.flowing=!1,q.emittedReadable=!1,l("on readable",q.length,q.reading),q.length?oe(this):q.reading||process.nextTick(G,this)),re},R.prototype.addListener=R.prototype.on,R.prototype.removeListener=function(E,$){var re=a.prototype.removeListener.call(this,E,$);return E==="readable"&&process.nextTick(J,this),re},R.prototype.removeAllListeners=function(E){var $=a.prototype.removeAllListeners.apply(this,arguments);return(E==="readable"||E===void 0)&&process.nextTick(J,this),$};function J(E){var $=E._readableState;$.readableListening=E.listenerCount("readable")>0,$.resumeScheduled&&!$.paused?$.flowing=!0:E.listenerCount("data")>0&&E.resume()}function G(E){l("readable nexttick read 0"),E.read(0)}R.prototype.resume=function(){var E=this._readableState;return E.flowing||(l("resume"),E.flowing=!E.readableListening,B(this,E)),E.paused=!1,this};function B(E,$){$.resumeScheduled||($.resumeScheduled=!0,process.nextTick(N,E,$))}function N(E,$){l("resume",$.reading),$.reading||E.read(0),$.resumeScheduled=!1,E.emit("resume"),F(E),$.flowing&&!$.reading&&E.read(0)}R.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function F(E){var $=E._readableState;for(l("flow",$.flowing);$.flowing&&E.read()!==null;);}R.prototype.wrap=function(E){var $=this,re=this._readableState,q=!1;E.on("end",function(){if(l("wrapped end"),re.decoder&&!re.ended){var Z=re.decoder.end();Z&&Z.length&&$.push(Z)}$.push(null)}),E.on("data",function(Z){if(l("wrapped data"),re.decoder&&(Z=re.decoder.write(Z)),!(re.objectMode&&Z==null)&&!(!re.objectMode&&(!Z||!Z.length))){var ae=$.push(Z);ae||(q=!0,E.pause())}});for(var ue in E)this[ue]===void 0&&typeof E[ue]=="function"&&(this[ue]=(function(Z){return function(){return E[Z].apply(E,arguments)}})(ue));for(var pe=0;pe<S.length;pe++)E.on(S[pe],this.emit.bind(this,S[pe]));return this._read=function(Z){l("wrapped _read",Z),q&&(q=!1,E.resume())},this},typeof Symbol=="function"&&(R.prototype[Symbol.asyncIterator]=function(){return w===void 0&&(w=dit()),w(this)}),Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(R.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(R.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(E){this._readableState&&(this._readableState.flowing=E)}}),R._fromList=ne,Object.defineProperty(R.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ne(E,$){if($.length===0)return null;var re;return $.objectMode?re=$.buffer.shift():!E||E>=$.length?($.decoder?re=$.buffer.join(""):$.buffer.length===1?re=$.buffer.first():re=$.buffer.concat($.length),$.buffer.clear()):re=$.buffer.consume(E,$.decoder),re}function se(E){var $=E._readableState;l("endReadable",$.endEmitted),$.endEmitted||($.ended=!0,process.nextTick(be,$,E))}function be(E,$){if(l("endReadableNT",E.endEmitted,E.length),!E.endEmitted&&E.length===0&&(E.endEmitted=!0,$.readable=!1,$.emit("end"),E.autoDestroy)){var re=$._writableState;(!re||re.autoDestroy&&re.finished)&&$.destroy()}}typeof Symbol=="function"&&(R.from=function(E,$){return C===void 0&&(C=pit()),C(R,E,$)});function xe(E,$){for(var re=0,q=E.length;re<q;re++)if(E[re]===$)return re;return-1}return g7}var f7,tie;function aie(){if(tie)return f7;tie=1,f7=s;var e=Vv().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,a=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,i=Hv();function o(u,d){var h=this._transformState;h.transforming=!1;var m=h.writecb;if(m===null)return this.emit("error",new a);h.writechunk=null,h.writecb=null,d!=null&&this.push(d),m(u);var v=this._readableState;v.reading=!1,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);i.call(this,u),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",l)}function l(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(d,h){c(u,d,h)}):c(this,null,null)}s.prototype.push=function(u,d){return this._transformState.needTransform=!1,i.prototype.push.call(this,u,d)},s.prototype._transform=function(u,d,h){h(new t("_transform()"))},s.prototype._write=function(u,d,h){var m=this._transformState;if(m.writecb=h,m.writechunk=u,m.writeencoding=d,!m.transforming){var v=this._readableState;(m.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}},s.prototype._read=function(u){var d=this._transformState;d.writechunk!==null&&!d.transforming?(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform)):d.needTransform=!0},s.prototype._destroy=function(u,d){i.prototype._destroy.call(this,u,function(h){d(h)})};function c(u,d,h){if(d)return u.emit("error",d);if(h!=null&&u.push(h),u._writableState.length)throw new n;if(u._transformState.transforming)throw new r;return u.push(null)}return f7}var v7,rie;function hit(){if(rie)return v7;rie=1,v7=t;var e=aie();function t(a){if(!(this instanceof t))return new t(a);e.call(this,a)}return t.prototype._transform=function(a,r,n){n(null,a)},v7}var b7,nie;function mit(){if(nie)return b7;nie=1;var e;function t(h){var m=!1;return function(){m||(m=!0,h.apply(void 0,arguments))}}var a=Vv().codes,r=a.ERR_MISSING_ARGS,n=a.ERR_STREAM_DESTROYED;function i(h){if(h)throw h}function o(h){return h.setHeader&&typeof h.abort=="function"}function s(h,m,v,f){f=t(f);var y=!1;h.on("close",function(){y=!0}),e===void 0&&(e=h7()),e(h,{readable:m,writable:v},function(k){if(k)return f(k);y=!0,f()});var b=!1;return function(k){if(!y&&!b){if(b=!0,o(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();f(k||new n("pipe"))}}}function l(h){h()}function c(h,m){return h.pipe(m)}function u(h){return!h.length||typeof h[h.length-1]!="function"?i:h.pop()}function d(){for(var h=arguments.length,m=new Array(h),v=0;v<h;v++)m[v]=arguments[v];var f=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var y,b=m.map(function(k,w){var C=w<m.length-1,O=w>0;return s(k,C,O,function(S){y||(y=S),S&&b.forEach(l),!C&&(b.forEach(l),f(y))})});return m.reduce(c)}return b7=d,b7}var iie;function oie(){return iie||(iie=1,(function(e,t){t=e.exports=eie(),t.Stream=t,t.Readable=t,t.Writable=Fne(),t.Duplex=Hv(),t.Transform=aie(),t.PassThrough=hit(),t.finished=h7(),t.pipeline=mit()})(t7,t7.exports)),t7.exports}var sie;function lie(){if(sie)return T2;sie=1;var e=Cne(),t=J8(),a=oie(),r=T2.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=T2.IncomingMessage=function(i,o,s,l){var c=this;if(a.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){process.nextTick(function(){c.emit("close")})}),s==="fetch"){let f=function(){d.read().then(function(y){if(!c._destroyed){if(l(y.done),y.done){c.push(null);return}c.push(Buffer.from(y.value)),f()}}).catch(function(y){l(!0),c._destroyed||c.emit("error",y)})};if(c._fetchResponse=o,c.url=o.url,c.statusCode=o.status,c.statusMessage=o.statusText,o.headers.forEach(function(y,b){c.headers[b.toLowerCase()]=y,c.rawHeaders.push(b,y)}),e.writableStream){var u=new WritableStream({write:function(y){return l(!1),new Promise(function(b,k){c._destroyed?k():c.push(Buffer.from(y))?b():c._resumeFetch=b})},close:function(){l(!0),c._destroyed||c.push(null)},abort:function(y){l(!0),c._destroyed||c.emit("error",y)}});try{o.body.pipeTo(u).catch(function(y){l(!0),c._destroyed||c.emit("error",y)});return}catch{}}var d=o.body.getReader();f()}else{c._xhr=i,c._pos=0,c.url=i.responseURL,c.statusCode=i.status,c.statusMessage=i.statusText;var h=i.getAllResponseHeaders().split(/\r?\n/);if(h.forEach(function(f){var y=f.match(/^([^:]+):\s*(.*)/);if(y){var b=y[1].toLowerCase();b==="set-cookie"?(c.headers[b]===void 0&&(c.headers[b]=[]),c.headers[b].push(y[2])):c.headers[b]!==void 0?c.headers[b]+=", "+y[2]:c.headers[b]=y[2],c.rawHeaders.push(y[1],y[2])}}),c._charset="x-user-defined",!e.overrideMimeType){var m=c.rawHeaders["mime-type"];if(m){var v=m.match(/;\s*charset=([^;])(;|$)/);v&&(c._charset=v[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};return t(n,a.Readable),n.prototype._read=function(){var i=this,o=i._resumeFetch;o&&(i._resumeFetch=null,o())},n.prototype._onXHRProgress=function(i){var o=this,s=o._xhr,l=null;switch(o._mode){case"text":if(l=s.responseText,l.length>o._pos){var c=l.substr(o._pos);if(o._charset==="x-user-defined"){for(var u=Buffer.alloc(c.length),d=0;d<c.length;d++)u[d]=c.charCodeAt(d)&255;o.push(u)}else o.push(c,o._charset);o._pos=l.length}break;case"arraybuffer":if(s.readyState!==r.DONE||!s.response)break;l=s.response,o.push(Buffer.from(new Uint8Array(l)));break;case"moz-chunked-arraybuffer":if(l=s.response,s.readyState!==r.LOADING||!l)break;o.push(Buffer.from(new Uint8Array(l)));break;case"ms-stream":if(l=s.response,s.readyState!==r.LOADING)break;var h=new globalThis.MSStreamReader;h.onprogress=function(){h.result.byteLength>o._pos&&(o.push(Buffer.from(new Uint8Array(h.result.slice(o._pos)))),o._pos=h.result.byteLength)},h.onload=function(){i(!0),o.push(null)},h.readAsArrayBuffer(l);break}o._xhr.readyState===r.DONE&&o._mode!=="ms-stream"&&(i(!0),o.push(null))},T2}var cie;function git(){if(cie)return e7.exports;cie=1;var e=Cne(),t=J8(),a=lie(),r=oie(),n=a.IncomingMessage,i=a.readyStates;function o(u,d){return e.fetch&&d?"fetch":e.mozchunkedarraybuffer?"moz-chunked-arraybuffer":e.msstream?"ms-stream":e.arraybuffer&&u?"arraybuffer":"text"}var s=e7.exports=function(u){var d=this;r.Writable.call(d),d._opts=u,d._body=[],d._headers={},u.auth&&d.setHeader("Authorization","Basic "+Buffer.from(u.auth).toString("base64")),Object.keys(u.headers).forEach(function(v){d.setHeader(v,u.headers[v])});var h,m=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!e.abortController)m=!1,h=!0;else if(u.mode==="prefer-streaming")h=!1;else if(u.mode==="allow-wrong-content-type")h=!e.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")h=!0;else throw new Error("Invalid value for opts.mode");d._mode=o(h,m),d._fetchTimer=null,d._socketTimeout=null,d._socketTimer=null,d.on("finish",function(){d._onFinish()})};t(s,r.Writable),s.prototype.setHeader=function(u,d){var h=this,m=u.toLowerCase();c.indexOf(m)===-1&&(h._headers[m]={name:u,value:d})},s.prototype.getHeader=function(u){var d=this._headers[u.toLowerCase()];return d?d.value:null},s.prototype.removeHeader=function(u){var d=this;delete d._headers[u.toLowerCase()]},s.prototype._onFinish=function(){var u=this;if(!u._destroyed){var d=u._opts;"timeout"in d&&d.timeout!==0&&u.setTimeout(d.timeout);var h=u._headers,m=null;d.method!=="GET"&&d.method!=="HEAD"&&(m=new Blob(u._body,{type:(h["content-type"]||{}).value||""}));var v=[];if(Object.keys(h).forEach(function(k){var w=h[k].name,C=h[k].value;Array.isArray(C)?C.forEach(function(O){v.push([w,O])}):v.push([w,C])}),u._mode==="fetch"){var f=null;if(e.abortController){var y=new AbortController;f=y.signal,u._fetchAbortController=y,"requestTimeout"in d&&d.requestTimeout!==0&&(u._fetchTimer=globalThis.setTimeout(function(){u.emit("requestTimeout"),u._fetchAbortController&&u._fetchAbortController.abort()},d.requestTimeout))}globalThis.fetch(u._opts.url,{method:u._opts.method,headers:v,body:m||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:f}).then(function(k){u._fetchResponse=k,u._resetTimers(!1),u._connect()},function(k){u._resetTimers(!0),u._destroyed||u.emit("error",k)})}else{var b=u._xhr=new globalThis.XMLHttpRequest;try{b.open(u._opts.method,u._opts.url,!0)}catch(k){process.nextTick(function(){u.emit("error",k)});return}"responseType"in b&&(b.responseType=u._mode),"withCredentials"in b&&(b.withCredentials=!!d.withCredentials),u._mode==="text"&&"overrideMimeType"in b&&b.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(b.timeout=d.requestTimeout,b.ontimeout=function(){u.emit("requestTimeout")}),v.forEach(function(k){b.setRequestHeader(k[0],k[1])}),u._response=null,b.onreadystatechange=function(){switch(b.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(b.onprogress=function(){u._onXHRProgress()}),b.onerror=function(){u._destroyed||(u._resetTimers(!0),u.emit("error",new Error("XHR error")))};try{b.send(m)}catch(k){process.nextTick(function(){u.emit("error",k)});return}}}};function l(u){try{var d=u.status;return d!==null&&d!==0}catch{return!1}}s.prototype._onXHRProgress=function(){var u=this;u._resetTimers(!1),!(!l(u._xhr)||u._destroyed)&&(u._response||u._connect(),u._response._onXHRProgress(u._resetTimers.bind(u)))},s.prototype._connect=function(){var u=this;u._destroyed||(u._response=new n(u._xhr,u._fetchResponse,u._mode,u._resetTimers.bind(u)),u._response.on("error",function(d){u.emit("error",d)}),u.emit("response",u._response))},s.prototype._write=function(u,d,h){var m=this;m._body.push(u),h()},s.prototype._resetTimers=function(u){var d=this;globalThis.clearTimeout(d._socketTimer),d._socketTimer=null,u?(globalThis.clearTimeout(d._fetchTimer),d._fetchTimer=null):d._socketTimeout&&(d._socketTimer=globalThis.setTimeout(function(){d.emit("timeout")},d._socketTimeout))},s.prototype.abort=s.prototype.destroy=function(u){var d=this;d._destroyed=!0,d._resetTimers(!0),d._response&&(d._response._destroyed=!0),d._xhr?d._xhr.abort():d._fetchAbortController&&d._fetchAbortController.abort(),u&&d.emit("error",u)},s.prototype.end=function(u,d,h){var m=this;typeof u=="function"&&(h=u,u=void 0),r.Writable.prototype.end.call(m,u,d,h)},s.prototype.setTimeout=function(u,d){var h=this;d&&h.once("timeout",d),h._socketTimeout=u,h._resetTimers(!1)},s.prototype.flushHeaders=function(){},s.prototype.setNoDelay=function(){},s.prototype.setSocketKeepAlive=function(){};var c=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"];return e7.exports}var y7,uie;function fit(){if(uie)return y7;uie=1,y7=t;var e=Object.prototype.hasOwnProperty;function t(){for(var a={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(a[i]=n[i])}return a}return y7}var die,pie;function vit(){return pie||(pie=1,die={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}),die}var hie;function bit(){return hie||(hie=1,(function(e){var t=git(),a=lie(),r=fit(),n=vit(),i=IB(),o=e;o.request=function(s,l){typeof s=="string"?s=i.parse(s):s=r(s);var c=globalThis.location.protocol.search(/^https?:$/)===-1?"http:":"",u=s.protocol||c,d=s.hostname||s.host,h=s.port,m=s.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),s.url=(d?u+"//"+d:"")+(h?":"+h:"")+m,s.method=(s.method||"GET").toUpperCase(),s.headers=s.headers||{};var v=new t(s);return l&&v.on("response",l),v},o.get=function(s,l){var c=o.request(s,l);return c.end(),c},o.ClientRequest=t,o.IncomingMessage=a.IncomingMessage,o.Agent=function(){},o.Agent.defaultMaxSockets=4,o.globalAgent=new o.Agent,o.STATUS_CODES=n,o.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})(One)),One}var mie,gie;function yit(){return gie||(gie=1,mie={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},bit().STATUS_CODES)}),mie}const kit="7.0.8",xit={version:kit};var k7,fie;function wit(){if(fie)return k7;fie=1;const e=Kv,t=IB(),a=eit(),r=Kv,n=Kv,i=P2(),o=i.jptr,s=GB().isRef,l=A2().clone,c=A2().circularClone,u=UB().recurse,d=rit(),h=nit(),m=kne(),v=yit().statusCodes,f=xit.version,y="3.0.0";let b;class k extends Error{constructor($){super($),this.name="S2OError"}}function w(E,$){let re=new k(E);if(re.options=$,$.promise)$.promise.reject(re);else throw re}function C(E,$,re){re.warnOnly?$[re.warnProperty||"x-s2o-warning"]=E:w(E,re)}function O(E,$,re){if(E.nullable&&re.patches++,E.discriminator&&typeof E.discriminator=="string"&&(E.discriminator={propertyName:E.discriminator}),E.items&&Array.isArray(E.items)&&(E.items.length===0?E.items={}:E.items.length===1?E.items=E.items[0]:E.items={anyOf:E.items}),E.type&&Array.isArray(E.type))if(re.patch){if(re.patches++,E.type.length===0)delete E.type;else{E.oneOf||(E.oneOf=[]);for(let q of E.type){let ue={};if(q==="null")E.nullable=!0;else{ue.type=q;for(let pe of m.arrayProperties)typeof E.prop<"u"&&(ue[pe]=E[pe],delete E[pe])}ue.type&&E.oneOf.push(ue)}delete E.type,E.oneOf.length===0?delete E.oneOf:E.oneOf.length<2&&(E.type=E.oneOf[0].type,Object.keys(E.oneOf[0]).length>1&&C("Lost properties from oneOf",E,re),delete E.oneOf)}E.type&&Array.isArray(E.type)&&E.type.length===1&&(E.type=E.type[0])}else w("(Patchable) schema type must not be an array",re);E.type&&E.type==="null"&&(delete E.type,E.nullable=!0),E.type==="array"&&!E.items&&(E.items={}),E.type==="file"&&(E.type="string",E.format="binary"),typeof E.required=="boolean"&&(E.required&&E.name&&(typeof $.required>"u"&&($.required=[]),Array.isArray($.required)&&$.required.push(E.name)),delete E.required),E.xml&&typeof E.xml.namespace=="string"&&(E.xml.namespace||delete E.xml.namespace),typeof E.allowEmptyValue<"u"&&(re.patches++,delete E.allowEmptyValue)}function S(E,$){if(E["x-required"]&&Array.isArray(E["x-required"])&&(E.required||(E.required=[]),E.required=E.required.concat(E["x-required"]),delete E["x-required"]),E["x-anyOf"]&&(E.anyOf=E["x-anyOf"],delete E["x-anyOf"]),E["x-oneOf"]&&(E.oneOf=E["x-oneOf"],delete E["x-oneOf"]),E["x-not"]&&(E.not=E["x-not"],delete E["x-not"]),typeof E["x-nullable"]=="boolean"&&(E.nullable=E["x-nullable"],delete E["x-nullable"]),typeof E["x-discriminator"]=="object"&&typeof E["x-discriminator"].propertyName=="string"){E.discriminator=E["x-discriminator"],delete E["x-discriminator"];for(let re in E.discriminator.mapping){let q=E.discriminator.mapping[re];q.startsWith("#/definitions/")&&(E.discriminator.mapping[re]=q.replace("#/definitions/","#/components/schemas/"))}}}function j(E,$){h.walkSchema(E,{},{},function(re,q,ue){S(re),O(re,q,$)})}function P(E){return E.indexOf("#")>=0?E=E.split("#")[1].split("/").pop():E=E.split("/").pop().split(".")[0],encodeURIComponent(m.sanitise(E))}function R(E,$,re){let q=re.payload.options;if(s(E,$)){if(!E[$].startsWith("#/components/")){if(E[$]==="#/consumes")delete E[$],re.parent[re.pkey]=l(q.openapi.consumes);else if(E[$]==="#/produces")delete E[$],re.parent[re.pkey]=l(q.openapi.produces);else if(E[$].startsWith("#/definitions/")){let ue=E[$].replace("#/definitions/","").split("/");const pe=i.jpunescape(ue[0]);let Z=b.schemas[decodeURIComponent(pe)];Z?ue[0]=Z:C("Could not resolve reference "+E[$],E,q),E[$]="#/components/schemas/"+ue.join("/")}else if(E[$].startsWith("#/parameters/"))E[$]="#/components/parameters/"+m.sanitise(E[$].replace("#/parameters/",""));else if(E[$].startsWith("#/responses/"))E[$]="#/components/responses/"+m.sanitise(E[$].replace("#/responses/",""));else if(E[$].startsWith("#")){let ue=l(i.jptr(q.openapi,E[$]));if(ue===!1)C("direct $ref not found "+E[$],E,q);else if(q.refmap[E[$]])E[$]=q.refmap[E[$]];else{let pe=E[$];pe=pe.replace("/properties/headers/",""),pe=pe.replace("/properties/responses/",""),pe=pe.replace("/properties/parameters/",""),pe=pe.replace("/properties/schemas/","");let Z="schemas",ae=pe.lastIndexOf("/schema");if(Z=pe.indexOf("/headers/")>ae?"headers":pe.indexOf("/responses/")>ae?"responses":pe.indexOf("/example")>ae?"examples":pe.indexOf("/x-")>ae?"extensions":pe.indexOf("/parameters/")>ae?"parameters":"schemas",Z==="schemas"&&j(ue,q),Z!=="responses"&&Z!=="extensions"){let ce=Z.substr(0,Z.length-1);ce==="parameter"&&ue.name&&ue.name===m.sanitise(ue.name)&&(ce=encodeURIComponent(ue.name));let ve=1;for(E["x-miro"]&&(ce=P(E["x-miro"]),ve="");i.jptr(q.openapi,"#/components/"+Z+"/"+ce+ve);)ve=ve===""?2:++ve;let ge="#/components/"+Z+"/"+ce+ve,fe="";Z==="examples"&&(ue={value:ue},fe="/value"),i.jptr(q.openapi,ge,ue),q.refmap[E[$]]=ge+fe,E[$]=ge+fe}}}}if(delete E["x-miro"],Object.keys(E).length>1){const ue=E[$],pe=re.path.indexOf("/schema")>=0;q.refSiblings==="preserve"||(pe&&q.refSiblings==="allOf"?(delete E.$ref,re.parent[re.pkey]={allOf:[{$ref:ue},E]}):re.parent[re.pkey]={$ref:ue})}}if($==="x-ms-odata"&&typeof E[$]=="string"&&E[$].startsWith("#/")){let ue=E[$].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),pe=b.schemas[decodeURIComponent(ue[0])];pe?ue[0]=pe:C("Could not resolve reference "+E[$],E,q),E[$]="#/components/schemas/"+ue.join("/")}}function _(E,$){for(let re in $.refmap)i.jptr(E,re,{$ref:$.refmap[re]})}function K(E){for(let $ in E)for(let re in E[$]){let q=m.sanitise(re);re!==q&&(E[$][q]=E[$][re],delete E[$][re])}}function L(E,$){if(E.type==="basic"&&(E.type="http",E.scheme="basic"),E.type==="oauth2"){let re={},q=E.flow;E.flow==="application"&&(q="clientCredentials"),E.flow==="accessCode"&&(q="authorizationCode"),typeof E.authorizationUrl<"u"&&(re.authorizationUrl=E.authorizationUrl.split("?")[0].trim()||"/"),typeof E.tokenUrl=="string"&&(re.tokenUrl=E.tokenUrl.split("?")[0].trim()||"/"),re.scopes=E.scopes||{},E.flows={},E.flows[q]=re,delete E.flow,delete E.authorizationUrl,delete E.tokenUrl,delete E.scopes,typeof E.name<"u"&&($.patch?($.patches++,delete E.name):w("(Patchable) oauth2 securitySchemes should not have name property",$))}}function Q(E){return E&&!E["x-s2o-delete"]}function D(E,$){if(E.$ref)E.$ref=E.$ref.replace("#/responses/","#/components/responses/");else{E.type&&!E.schema&&(E.schema={}),E.type&&(E.schema.type=E.type),E.items&&E.items.type!=="array"&&(E.items.collectionFormat!==E.collectionFormat&&C("Nested collectionFormats are not supported",E,$),delete E.items.collectionFormat),E.type==="array"?(E.collectionFormat==="ssv"?C("collectionFormat:ssv is no longer supported for headers",E,$):E.collectionFormat==="pipes"?C("collectionFormat:pipes is no longer supported for headers",E,$):E.collectionFormat==="multi"?E.explode=!0:E.collectionFormat==="tsv"?(C("collectionFormat:tsv is no longer supported",E,$),E["x-collectionFormat"]="tsv"):E.style="simple",delete E.collectionFormat):E.collectionFormat&&($.patch?($.patches++,delete E.collectionFormat):w("(Patchable) collectionFormat is only applicable to header.type array",$)),delete E.type;for(let re of m.parameterTypeProperties)typeof E[re]<"u"&&(E.schema[re]=E[re],delete E[re]);for(let re of m.arrayProperties)typeof E[re]<"u"&&(E.schema[re]=E[re],delete E[re])}}function Y(E,$){if(E.$ref.indexOf("#/parameters/")>=0){let re=E.$ref.split("#/parameters/");E.$ref=re[0]+"#/components/parameters/"+m.sanitise(re[1])}E.$ref.indexOf("#/definitions/")>=0&&C("Definition used as parameter",E,$)}function ee(E,$){let re={};for(let q of Object.keys(E))re[q]=E[q],q==="parameters"&&(re.requestBody={},$.rbname&&(re[$.rbname]=""));return re.requestBody={},re}function oe(E,$,re,q,ue,pe,Z){let ae={},ce=!0,ve;if($&&$.consumes&&typeof $.consumes=="string")if(Z.patch)Z.patches++,$.consumes=[$.consumes];else return w("(Patchable) operation.consumes must be an array",Z);Array.isArray(pe.consumes)||delete pe.consumes;let ge=(($?$.consumes:null)||pe.consumes||[]).filter(m.uniqueOnly);if(E&&E.$ref&&typeof E.$ref=="string"){Y(E,Z);let fe=decodeURIComponent(E.$ref.replace("#/components/parameters/","")),ye=!1,Se=pe.components.parameters[fe];if((!Se||Se["x-s2o-delete"])&&E.$ref.startsWith("#/")&&(E["x-s2o-delete"]=!0,ye=!0),ye){let Me=E.$ref,tt=o(pe,E.$ref);!tt&&Me.startsWith("#/")?C("Could not resolve reference "+Me,E,Z):tt&&(E=tt)}}if(E&&(E.name||E.in)){typeof E["x-deprecated"]=="boolean"&&(E.deprecated=E["x-deprecated"],delete E["x-deprecated"]),typeof E["x-example"]<"u"&&(E.example=E["x-example"],delete E["x-example"]),E.in!=="body"&&!E.type&&(Z.patch?(Z.patches++,E.type="string"):w("(Patchable) parameter.type is mandatory for non-body parameters",Z)),E.type&&typeof E.type=="object"&&E.type.$ref&&(E.type=o(pe,E.type.$ref)),E.type==="file"&&(E["x-s2o-originalType"]=E.type,ve=E.type),E.description&&typeof E.description=="object"&&E.description.$ref&&(E.description=o(pe,E.description.$ref)),E.description===null&&delete E.description;let fe=E.collectionFormat;if(E.type==="array"&&!fe&&(fe="csv"),fe&&(E.type!=="array"&&(Z.patch?(Z.patches++,delete E.collectionFormat):w("(Patchable) collectionFormat is only applicable to param.type array",Z)),fe==="csv"&&(E.in==="query"||E.in==="cookie")&&(E.style="form",E.explode=!1),fe==="csv"&&(E.in==="path"||E.in==="header")&&(E.style="simple"),fe==="ssv"&&(E.in==="query"?E.style="spaceDelimited":C("collectionFormat:ssv is no longer supported except for in:query parameters",E,Z)),fe==="pipes"&&(E.in==="query"?E.style="pipeDelimited":C("collectionFormat:pipes is no longer supported except for in:query parameters",E,Z)),fe==="multi"&&(E.explode=!0),fe==="tsv"&&(C("collectionFormat:tsv is no longer supported",E,Z),E["x-collectionFormat"]="tsv"),delete E.collectionFormat),E.type&&E.type!=="body"&&E.in!=="formData")if(E.items&&E.schema)C("parameter has array,items and schema",E,Z);else{E.schema&&Z.patches++,(!E.schema||typeof E.schema!="object")&&(E.schema={}),E.schema.type=E.type,E.items&&(E.schema.items=E.items,delete E.items,u(E.schema.items,null,function(ye,Se,Me){Se==="collectionFormat"&&typeof ye[Se]=="string"&&(fe&&ye[Se]!==fe&&C("Nested collectionFormats are not supported",E,Z),delete ye[Se])}));for(let ye of m.parameterTypeProperties)typeof E[ye]<"u"&&(E.schema[ye]=E[ye]),delete E[ye]}E.schema&&j(E.schema,Z),E["x-ms-skip-url-encoding"]&&E.in==="query"&&(E.allowReserved=!0,delete E["x-ms-skip-url-encoding"])}if(E&&E.in==="formData"){ce=!1,ae.content={};let fe="application/x-www-form-urlencoded";if(ge.length&&ge.indexOf("multipart/form-data")>=0&&(fe="multipart/form-data"),ae.content[fe]={},E.schema)ae.content[fe].schema=E.schema,E.schema.$ref&&(ae["x-s2o-name"]=decodeURIComponent(E.schema.$ref.replace("#/components/schemas/","")));else{ae.content[fe].schema={},ae.content[fe].schema.type="object",ae.content[fe].schema.properties={},ae.content[fe].schema.properties[E.name]={};let ye=ae.content[fe].schema,Se=ae.content[fe].schema.properties[E.name];E.description&&(Se.description=E.description),E.example&&(Se.example=E.example),E.type&&(Se.type=E.type);for(let Me of m.parameterTypeProperties)typeof E[Me]<"u"&&(Se[Me]=E[Me]);E.required===!0&&(ye.required||(ye.required=[]),ye.required.push(E.name),ae.required=!0),typeof E.default<"u"&&(Se.default=E.default),Se.properties&&(Se.properties=E.properties),E.allOf&&(Se.allOf=E.allOf),E.type==="array"&&E.items&&(Se.items=E.items,Se.items.collectionFormat&&delete Se.items.collectionFormat),(ve==="file"||E["x-s2o-originalType"]==="file")&&(Se.type="string",Se.format="binary"),X(E,Se)}}else E&&E.type==="file"&&(E.required&&(ae.required=E.required),ae.content={},ae.content["application/octet-stream"]={},ae.content["application/octet-stream"].schema={},ae.content["application/octet-stream"].schema.type="string",ae.content["application/octet-stream"].schema.format="binary",X(E,ae));if(E&&E.in==="body"){ae.content={},E.name&&(ae["x-s2o-name"]=($&&$.operationId?m.sanitiseAll($.operationId):"")+("_"+E.name).toCamelCase()),E.description&&(ae.description=E.description),E.required&&(ae.required=E.required),$&&Z.rbname&&E.name&&($[Z.rbname]=E.name),E.schema&&E.schema.$ref?ae["x-s2o-name"]=decodeURIComponent(E.schema.$ref.replace("#/components/schemas/","")):E.schema&&E.schema.type==="array"&&E.schema.items&&E.schema.items.$ref&&(ae["x-s2o-name"]=decodeURIComponent(E.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),ge.length||ge.push("application/json");for(let fe of ge)ae.content[fe]={},ae.content[fe].schema=l(E.schema||{}),j(ae.content[fe].schema,Z);X(E,ae)}if(Object.keys(ae).length>0&&(E["x-s2o-delete"]=!0,$))if($.requestBody&&ce){$.requestBody["x-s2o-overloaded"]=!0;let fe=$.operationId||ue;C("Operation "+fe+" has multiple requestBodies",$,Z)}else $.requestBody||($=re[q]=ee($,Z)),$.requestBody.content&&$.requestBody.content["multipart/form-data"]&&$.requestBody.content["multipart/form-data"].schema&&$.requestBody.content["multipart/form-data"].schema.properties&&ae.content["multipart/form-data"]&&ae.content["multipart/form-data"].schema&&ae.content["multipart/form-data"].schema.properties?($.requestBody.content["multipart/form-data"].schema.properties=Object.assign($.requestBody.content["multipart/form-data"].schema.properties,ae.content["multipart/form-data"].schema.properties),$.requestBody.content["multipart/form-data"].schema.required=($.requestBody.content["multipart/form-data"].schema.required||[]).concat(ae.content["multipart/form-data"].schema.required||[]),$.requestBody.content["multipart/form-data"].schema.required.length||delete $.requestBody.content["multipart/form-data"].schema.required):$.requestBody.content&&$.requestBody.content["application/x-www-form-urlencoded"]&&$.requestBody.content["application/x-www-form-urlencoded"].schema&&$.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&ae.content["application/x-www-form-urlencoded"]&&ae.content["application/x-www-form-urlencoded"].schema&&ae.content["application/x-www-form-urlencoded"].schema.properties?($.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign($.requestBody.content["application/x-www-form-urlencoded"].schema.properties,ae.content["application/x-www-form-urlencoded"].schema.properties),$.requestBody.content["application/x-www-form-urlencoded"].schema.required=($.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(ae.content["application/x-www-form-urlencoded"].schema.required||[]),$.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete $.requestBody.content["application/x-www-form-urlencoded"].schema.required):($.requestBody=Object.assign($.requestBody,ae),$.requestBody["x-s2o-name"]||($.requestBody.schema&&$.requestBody.schema.$ref?$.requestBody["x-s2o-name"]=decodeURIComponent($.requestBody.schema.$ref.replace("#/components/schemas/","")).split("/").join(""):$.operationId&&($.requestBody["x-s2o-name"]=m.sanitiseAll($.operationId))));if(E&&!E["x-s2o-delete"]){delete E.type;for(let fe of m.parameterTypeProperties)delete E[fe];E.in==="path"&&(typeof E.required>"u"||E.required!==!0)&&(Z.patch?(Z.patches++,E.required=!0):w("(Patchable) path parameters must be required:true ["+E.name+" in "+ue+"]",Z))}return $}function X(E,$){for(let re in E)re.startsWith("x-")&&!re.startsWith("x-s2o")&&($[re]=E[re])}function de(E,$,re,q,ue){if(!E)return!1;if(E.$ref&&typeof E.$ref=="string")E.$ref.indexOf("#/definitions/")>=0?C("definition used as response: "+E.$ref,E,ue):E.$ref.startsWith("#/responses/")&&(E.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(E.$ref.replace("#/responses/",""))));else{if((typeof E.description>"u"||E.description===null||E.description===""&&ue.patch)&&(ue.patch?typeof E=="object"&&!Array.isArray(E)&&(ue.patches++,E.description=v[E]||""):w("(Patchable) response.description is mandatory",ue)),typeof E.schema<"u"){if(j(E.schema,ue),E.schema.$ref&&typeof E.schema.$ref=="string"&&E.schema.$ref.startsWith("#/responses/")&&(E.schema.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(E.schema.$ref.replace("#/responses/","")))),re&&re.produces&&typeof re.produces=="string")if(ue.patch)ue.patches++,re.produces=[re.produces];else return w("(Patchable) operation.produces must be an array",ue);q.produces&&!Array.isArray(q.produces)&&delete q.produces;let pe=((re?re.produces:null)||q.produces||[]).filter(m.uniqueOnly);pe.length||pe.push("*/*"),E.content={};for(let Z of pe){if(E.content[Z]={},E.content[Z].schema=l(E.schema),E.examples&&E.examples[Z]){let ae={};ae.value=E.examples[Z],E.content[Z].examples={},E.content[Z].examples.response=ae,delete E.examples[Z]}E.content[Z].schema.type==="file"&&(E.content[Z].schema={type:"string",format:"binary"})}delete E.schema}for(let pe in E.examples)E.content||(E.content={}),E.content[pe]||(E.content[pe]={}),E.content[pe].examples={},E.content[pe].examples.response={},E.content[pe].examples.response.value=E.examples[pe];if(delete E.examples,E.headers)for(let pe in E.headers)pe.toLowerCase()==="status code"?ue.patch?(ue.patches++,delete E.headers[pe]):w('(Patchable) "Status Code" is not a valid header',ue):D(E.headers[pe],ue)}}function W(E,$,re,q,ue){for(let pe in E){let Z=E[pe];Z&&Z["x-trace"]&&typeof Z["x-trace"]=="object"&&(Z.trace=Z["x-trace"],delete Z["x-trace"]),Z&&Z["x-summary"]&&typeof Z["x-summary"]=="string"&&(Z.summary=Z["x-summary"],delete Z["x-summary"]),Z&&Z["x-description"]&&typeof Z["x-description"]=="string"&&(Z.description=Z["x-description"],delete Z["x-description"]),Z&&Z["x-servers"]&&Array.isArray(Z["x-servers"])&&(Z.servers=Z["x-servers"],delete Z["x-servers"]);for(let ae in Z)if(m.httpMethods.indexOf(ae)>=0||ae==="x-amazon-apigateway-any-method"){let ce=Z[ae];if(ce&&ce.parameters&&Array.isArray(ce.parameters)){if(Z.parameters)for(let ve of Z.parameters)typeof ve.$ref=="string"&&(Y(ve,re),ve=o(ue,ve.$ref)),!ce.parameters.find(function(ge,fe,ye){return ge.name===ve.name&&ge.in===ve.in})&&(ve.in==="formData"||ve.in==="body"||ve.type==="file")&&(ce=oe(ve,ce,Z,ae,pe,ue,re),re.rbname&&ce[re.rbname]===""&&delete ce[re.rbname]);for(let ve of ce.parameters)ce=oe(ve,ce,Z,ae,ae+":"+pe,ue,re);re.rbname&&ce[re.rbname]===""&&delete ce[re.rbname],re.debug||ce.parameters&&(ce.parameters=ce.parameters.filter(Q))}if(ce&&ce.security&&K(ce.security),typeof ce=="object"){if(!ce.responses){let ve={};ve.description="Default response",ce.responses={default:ve}}for(let ve in ce.responses){let ge=ce.responses[ve];de(ge,ve,ce,ue,re)}}if(ce&&ce["x-servers"]&&Array.isArray(ce["x-servers"]))ce.servers=ce["x-servers"],delete ce["x-servers"];else if(ce&&ce.schemes&&ce.schemes.length){for(let ve of ce.schemes)if((!ue.schemes||ue.schemes.indexOf(ve)<0)&&(ce.servers||(ce.servers=[]),Array.isArray(ue.servers)))for(let ge of ue.servers){let fe=l(ge),ye=t.parse(fe.url);ye.protocol=ve,fe.url=ye.format(),ce.servers.push(fe)}}if(re.debug&&(ce["x-s2o-consumes"]=ce.consumes||[],ce["x-s2o-produces"]=ce.produces||[]),ce){if(delete ce.consumes,delete ce.produces,delete ce.schemes,ce["x-ms-examples"]){for(let ve in ce["x-ms-examples"]){let ge=ce["x-ms-examples"][ve],fe=m.sanitiseAll(ve);if(ge.parameters)for(let ye in ge.parameters){let Se=ge.parameters[ye];for(let Me of(ce.parameters||[]).concat(Z.parameters||[]))Me.$ref&&(Me=i.jptr(ue,Me.$ref)),Me.name===ye&&!Me.example&&(Me.examples||(Me.examples={}),Me.examples[ve]={value:Se})}if(ge.responses)for(let ye in ge.responses){if(ge.responses[ye].headers)for(let Se in ge.responses[ye].headers){let Me=ge.responses[ye].headers[Se];for(let tt in ce.responses[ye].headers)if(tt===Se){let M=ce.responses[ye].headers[tt];M.example=Me}}if(ge.responses[ye].body&&(ue.components.examples[fe]={value:l(ge.responses[ye].body)},ce.responses[ye]&&ce.responses[ye].content))for(let Se in ce.responses[ye].content){let Me=ce.responses[ye].content[Se];Me.examples||(Me.examples={}),Me.examples[ve]={$ref:"#/components/examples/"+fe}}}}delete ce["x-ms-examples"]}if(ce.parameters&&ce.parameters.length===0&&delete ce.parameters,ce.requestBody){let ve=ce.operationId?m.sanitiseAll(ce.operationId):m.sanitiseAll(ae+pe).toCamelCase(),ge=m.sanitise(ce.requestBody["x-s2o-name"]||ve||"");delete ce.requestBody["x-s2o-name"];let fe=JSON.stringify(ce.requestBody),ye=m.hash(fe);if(!q[ye]){let Me={};Me.name=ge,Me.body=ce.requestBody,Me.refs=[],q[ye]=Me}let Se="#/"+$+"/"+encodeURIComponent(i.jpescape(pe))+"/"+ae+"/requestBody";q[ye].refs.push(Se)}}}if(Z&&Z.parameters){for(let ae in Z.parameters){let ce=Z.parameters[ae];oe(ce,null,Z,null,pe,ue,re)}!re.debug&&Array.isArray(Z.parameters)&&(Z.parameters=Z.parameters.filter(Q))}}}function I(E,$){let re={};b={schemas:{}},E.security&&K(E.security);for(let ue in E.components.securitySchemes){let pe=m.sanitise(ue);ue!==pe&&(E.components.securitySchemes[pe]&&w("Duplicate sanitised securityScheme name "+pe,$),E.components.securitySchemes[pe]=E.components.securitySchemes[ue],delete E.components.securitySchemes[ue]),L(E.components.securitySchemes[pe],$)}for(let ue in E.components.schemas){let pe=m.sanitiseAll(ue),Z="";if(ue!==pe){for(;E.components.schemas[pe+Z];)Z=Z?++Z:2;E.components.schemas[pe+Z]=E.components.schemas[ue],delete E.components.schemas[ue]}b.schemas[ue]=pe+Z,j(E.components.schemas[pe+Z],$)}$.refmap={},u(E,{payload:{options:$}},R),_(E,$);for(let ue in E.components.parameters){let pe=m.sanitise(ue);ue!==pe&&(E.components.parameters[pe]&&w("Duplicate sanitised parameter name "+pe,$),E.components.parameters[pe]=E.components.parameters[ue],delete E.components.parameters[ue]);let Z=E.components.parameters[pe];oe(Z,null,null,null,pe,E,$)}for(let ue in E.components.responses){let pe=m.sanitise(ue);ue!==pe&&(E.components.responses[pe]&&w("Duplicate sanitised response name "+pe,$),E.components.responses[pe]=E.components.responses[ue],delete E.components.responses[ue]);let Z=E.components.responses[pe];if(de(Z,pe,null,E,$),Z.headers)for(let ae in Z.headers)ae.toLowerCase()==="status code"?$.patch?($.patches++,delete Z.headers[ae]):w('(Patchable) "Status Code" is not a valid header',$):D(Z.headers[ae],$)}for(let ue in E.components.requestBodies){let pe=E.components.requestBodies[ue],Z=JSON.stringify(pe),ae=m.hash(Z),ce={};ce.name=ue,ce.body=pe,ce.refs=[],re[ae]=ce}if(W(E.paths,"paths",$,re,E),E["x-ms-paths"]&&W(E["x-ms-paths"],"x-ms-paths",$,re,E),!$.debug)for(let ue in E.components.parameters)E.components.parameters[ue]["x-s2o-delete"]&&delete E.components.parameters[ue];$.debug&&(E["x-s2o-consumes"]=E.consumes||[],E["x-s2o-produces"]=E.produces||[]),delete E.consumes,delete E.produces,delete E.schemes;let q=[];if(E.components.requestBodies={},!$.resolveInternal){let ue=1;for(let pe in re){let Z=re[pe];if(Z.refs.length>1){let ae="";for(Z.name||(Z.name="requestBody",ae=ue++);q.indexOf(Z.name+ae)>=0;)ae=ae?++ae:2;Z.name=Z.name+ae,q.push(Z.name),E.components.requestBodies[Z.name]=l(Z.body);for(let ce in Z.refs){let ve={};ve.$ref="#/components/requestBodies/"+Z.name,i.jptr(E,Z.refs[ce],ve)}}}}return E.components.responses&&Object.keys(E.components.responses).length===0&&delete E.components.responses,E.components.parameters&&Object.keys(E.components.parameters).length===0&&delete E.components.parameters,E.components.examples&&Object.keys(E.components.examples).length===0&&delete E.components.examples,E.components.requestBodies&&Object.keys(E.components.requestBodies).length===0&&delete E.components.requestBodies,E.components.securitySchemes&&Object.keys(E.components.securitySchemes).length===0&&delete E.components.securitySchemes,E.components.headers&&Object.keys(E.components.headers).length===0&&delete E.components.headers,E.components.schemas&&Object.keys(E.components.schemas).length===0&&delete E.components.schemas,E.components&&Object.keys(E.components).length===0&&delete E.components,E}function J(E){return!E||!E.url||typeof E.url!="string"||(E.url=E.url.split("{{").join("{"),E.url=E.url.split("}}").join("}"),E.url.replace(/\{(.+?)\}/g,function($,re){E.variables||(E.variables={}),E.variables[re]={default:"unknown"}})),E}function G(E,$,re){if(typeof E.info>"u"||E.info===null)if($.patch)$.patches++,E.info={version:"",title:""};else return re(new k("(Patchable) info object is mandatory"));if(typeof E.info!="object"||Array.isArray(E.info))return re(new k("info must be an object"));if(typeof E.info.title>"u"||E.info.title===null)if($.patch)$.patches++,E.info.title="";else return re(new k("(Patchable) info.title cannot be null"));if(typeof E.info.version>"u"||E.info.version===null)if($.patch)$.patches++,E.info.version="";else return re(new k("(Patchable) info.version cannot be null"));if(typeof E.info.version!="string")if($.patch)$.patches++,E.info.version=E.info.version.toString();else return re(new k("(Patchable) info.version must be a string"));if(typeof E.info.logo<"u")if($.patch)$.patches++,E.info["x-logo"]=E.info.logo,delete E.info.logo;else return re(new k("(Patchable) info should not have logo property"));if(typeof E.info.termsOfService<"u"){if(E.info.termsOfService===null)if($.patch)$.patches++,E.info.termsOfService="";else return re(new k("(Patchable) info.termsOfService cannot be null"));try{new URL(E.info.termsOfService)}catch{if($.patch)$.patches++,delete E.info.termsOfService;else return re(new k("(Patchable) info.termsOfService must be a URL"))}}}function B(E,$,re){if(typeof E.paths>"u")if($.patch)$.patches++,E.paths={};else return re(new k("(Patchable) paths object is mandatory"))}function N(E,$){const re=new WeakSet;u(E,{identityDetection:!0},function(q,ue,pe){typeof q[ue]=="object"&&q[ue]!==null&&(re.has(q[ue])?$.anchors?q[ue]=l(q[ue]):w("YAML anchor or merge key at "+pe.path,$):re.add(q[ue]))})}function F(E,$,re){return a(re,new Promise(function(q,ue){if(E||(E={}),$.original=E,$.text||($.text=n.stringify(E)),$.externals=[],$.externalRefs={},$.rewriteRefs=!0,$.preserveMiro=!0,$.promise={},$.promise.resolve=q,$.promise.reject=ue,$.patches=0,$.cache||($.cache={}),$.source&&($.cache[$.source]=$.original),N(E,$),E.openapi&&typeof E.openapi=="string"&&E.openapi.startsWith("3.")){$.openapi=c(E),G($.openapi,$,ue),B($.openapi,$,ue),d.optionalResolve($).then(function(){return $.direct?q($.openapi):q($)}).catch(function(Z){console.warn(Z),ue(Z)});return}if(!E.swagger||E.swagger!="2.0")return ue(new k("Unsupported swagger/OpenAPI version: "+(E.openapi?E.openapi:E.swagger)));let pe=$.openapi={};if(pe.openapi=typeof $.targetVersion=="string"&&$.targetVersion.startsWith("3.")?$.targetVersion:y,$.origin){pe["x-origin"]||(pe["x-origin"]=[]);let Z={};Z.url=$.source||$.origin,Z.format="swagger",Z.version=E.swagger,Z.converter={},Z.converter.url="https://github.com/mermade/oas-kit",Z.converter.version=f,pe["x-origin"].push(Z)}if(pe=Object.assign(pe,c(E)),delete pe.swagger,u(pe,{},function(Z,ae,ce){Z[ae]===null&&!ae.startsWith("x-")&&ae!=="default"&&ce.path.indexOf("/example")<0&&delete Z[ae]}),E.host)for(let Z of Array.isArray(E.schemes)?E.schemes:[""]){let ae={},ce=(E.basePath||"").replace(/\/$/,"");ae.url=(Z?Z+":":"")+"//"+E.host+ce,J(ae),pe.servers||(pe.servers=[]),pe.servers.push(ae)}else if(E.basePath){let Z={};Z.url=E.basePath,J(Z),pe.servers||(pe.servers=[]),pe.servers.push(Z)}if(delete pe.host,delete pe.basePath,pe["x-servers"]&&Array.isArray(pe["x-servers"])&&(pe.servers=pe["x-servers"],delete pe["x-servers"]),E["x-ms-parameterized-host"]){let Z=E["x-ms-parameterized-host"],ae={};ae.url=Z.hostTemplate+(E.basePath?E.basePath:""),ae.variables={};const ce=ae.url.match(/\{\w+\}/g);for(let ve in Z.parameters){let ge=Z.parameters[ve];ge.$ref&&(ge=l(o(pe,ge.$ref))),ve.startsWith("x-")||(delete ge.required,delete ge.type,delete ge.in,typeof ge.default>"u"&&(ge.enum?ge.default=ge.enum[0]:ge.default="none"),ge.name||(ge.name=ce[ve].replace("{","").replace("}","")),ae.variables[ge.name]=ge,delete ge.name)}pe.servers||(pe.servers=[]),Z.useSchemePrefix===!1?pe.servers.push(ae):E.schemes.forEach(ve=>{pe.servers.push(Object.assign({},ae,{url:ve+"://"+ae.url}))}),delete pe["x-ms-parameterized-host"]}G(pe,$,ue),B(pe,$,ue),typeof pe.consumes=="string"&&(pe.consumes=[pe.consumes]),typeof pe.produces=="string"&&(pe.produces=[pe.produces]),pe.components={},pe["x-callbacks"]&&(pe.components.callbacks=pe["x-callbacks"],delete pe["x-callbacks"]),pe.components.examples={},pe.components.headers={},pe["x-links"]&&(pe.components.links=pe["x-links"],delete pe["x-links"]),pe.components.parameters=pe.parameters||{},pe.components.responses=pe.responses||{},pe.components.requestBodies={},pe.components.securitySchemes=pe.securityDefinitions||{},pe.components.schemas=pe.definitions||{},delete pe.definitions,delete pe.responses,delete pe.parameters,delete pe.securityDefinitions,d.optionalResolve($).then(function(){I($.openapi,$),$.direct?q($.openapi):q($)}).catch(function(Z){console.warn(Z),ue(Z)})}))}function ne(E,$,re){return a(re,new Promise(function(q,ue){let pe=null,Z=null;try{pe=JSON.parse(E),$.text=JSON.stringify(pe,null,2)}catch(ae){Z=ae;try{pe=n.parse(E,{schema:"core",prettyErrors:!0}),$.sourceYaml=!0,$.text=E}catch(ce){Z=ce}}pe?F(pe,$).then(ae=>q(ae)).catch(ae=>ue(ae)):ue(new k(Z?Z.message:"Could not parse string"))}))}function se(E,$,re){return a(re,new Promise(function(q,ue){$.origin=!0,$.source||($.source=E),$.verbose&&console.warn("GET "+E),$.fetch||($.fetch=r);const pe=Object.assign({},$.fetchOptions,{agent:$.agent});$.fetch(E,pe).then(function(Z){if(Z.status!==200)throw new k(`Received status code ${Z.status}: ${E}`);return Z.text()}).then(function(Z){ne(Z,$).then(ae=>q(ae)).catch(ae=>ue(ae))}).catch(function(Z){ue(Z)})}))}function be(E,$,re){return a(re,new Promise(function(q,ue){e.readFile(E,$.encoding||"utf8",function(pe,Z){pe?ue(pe):($.sourceFile=E,ne(Z,$).then(ae=>q(ae)).catch(ae=>ue(ae)))})}))}function xe(E,$,re){return a(re,new Promise(function(q,ue){let pe="";E.on("data",function(Z){pe+=Z}).on("end",function(){ne(pe,$).then(Z=>q(Z)).catch(Z=>ue(Z))})}))}return k7={S2OError:k,targetVersion:y,convert:F,convertObj:F,convertUrl:se,convertStr:ne,convertFile:be,convertStream:xe},k7}var Oit=wit();const zit=Xr(Oit);function Sit(e){return e.paths||(e.paths={}),new Promise((t,a)=>zit.convertObj(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(r,n)=>{if(r)return a(r);t(n?.openapi)}))}async function Cit(){try{return(await ane())?.resolvedConfig.openapi||{}}catch{return{}}}async function jit(e){const t=await ane(),a={config:t,base:yu?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};yu&&(t.resolve.http.customFetch=globalThis.fetch),typeof e=="object"&&e!==null?a.doc=Pit(e):a.ref=e;const{bundle:{parsed:r}}=await Gnt(a);return r.swagger!==void 0?Sit(r):r}function Pit(e){return{source:{absoluteRef:""},parsed:e}}async function Ait(e,t,a){let r;if(a?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await jit(e||t);try{tUe(r)}catch{}return r}const Tit=({options:e,definitionUrl:t,definition:a,activeSampleLanguage:r,children:n})=>{const[i,o]=T.useState(),[s,l]=T.useState(!0),[c,u]=T.useState(null),[d,h]=T.useState(e||{});T.useEffect(()=>{async function v(){l(!0);try{const f=await Cit();h({...e,...f}),u(await Ait(a,t,e))}catch(f){o(f.message)}}v()},[a,t,e]);const m=T.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:t,activeSampleLanguage:r}},aUe([c,t,d]));return T.useEffect(()=>{m&&l(!1)},[m]),i||!m?null:s?kl(e?.hideLoading,!1)?null:p.jsx(iet,{color:"--loading-spinner-color"}):T.isValidElement(n)?T.cloneElement(n,{store:m}):null};function Mit({definition:e,definitionUrl:t,options:a={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return p.jsx(Tit,{definition:e,definitionUrl:t,options:a,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:p.jsx(zae,{withCommonStyles:!0,router:o||"hash"})})}function Eit(e){const t={},a=e.attributes;for(let r=0;r<a.length;r++){const n=a[r];t[n.name]=n.value}return t}function Bit(e){const t=Eit(e),a={};for(const r in t){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());a[n]=t[r]}return a}function Rit(e,t=document.querySelector("redoc")){Gq.hydrateRoot(t,p.jsx(zae,{store:e}),{onRecoverableError:(a,r)=>{a.message.includes("Minified React error #418")||console.error(a.message,r)}})}function vie(e,t={},a=b6("redoc")){if(a===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}={...t,...Bit(a)};let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),Gq.createRoot(a).render(T.createElement(Mit,{definition:o,definitionUrl:i,options:n,router:r??"hash"},["Loading..."]))}const _it="3.17.0",Lit="915cc31798";function Dit(){const e=b6("redoc");if(!e)return;const t=e.getAttribute("spec-url");t&&vie(t,{},e)}Dit();function a0(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bie={exports:{}},yie;function Nit(){return yie||(yie=1,(function(e,t){(function(a){e.exports=a()})(function(){return(function a(r,n,i){function o(c,u){if(!n[c]){if(!r[c]){var d=typeof a0=="function"&&a0;if(!u&&d)return d(c,!0);if(s)return s(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var m=n[c]={exports:{}};r[c][0].call(m.exports,function(v){var f=r[c][1][v];return o(f||v)},m,m.exports,a,r,n,i)}return n[c].exports}for(var s=typeof a0=="function"&&a0,l=0;l<i.length;l++)o(i[l]);return o})({1:[function(a,r,n){var i=a("./utils"),o=a("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(l){for(var c,u,d,h,m,v,f,y=[],b=0,k=l.length,w=k,C=i.getTypeOf(l)!=="string";b<l.length;)w=k-b,d=C?(c=l[b++],u=b<k?l[b++]:0,b<k?l[b++]:0):(c=l.charCodeAt(b++),u=b<k?l.charCodeAt(b++):0,b<k?l.charCodeAt(b++):0),h=c>>2,m=(3&c)<<4|u>>4,v=1<w?(15&u)<<2|d>>6:64,f=2<w?63&d:64,y.push(s.charAt(h)+s.charAt(m)+s.charAt(v)+s.charAt(f));return y.join("")},n.decode=function(l){var c,u,d,h,m,v,f=0,y=0,b="data:";if(l.substr(0,b.length)===b)throw new Error("Invalid base64 input, it looks like a data url.");var k,w=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===s.charAt(64)&&w--,l.charAt(l.length-2)===s.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(k=o.uint8array?new Uint8Array(0|w):new Array(0|w);f<l.length;)c=s.indexOf(l.charAt(f++))<<2|(h=s.indexOf(l.charAt(f++)))>>4,u=(15&h)<<4|(m=s.indexOf(l.charAt(f++)))>>2,d=(3&m)<<6|(v=s.indexOf(l.charAt(f++))),k[y++]=c,m!==64&&(k[y++]=u),v!==64&&(k[y++]=d);return k}},{"./support":30,"./utils":32}],2:[function(a,r,n){var i=a("./external"),o=a("./stream/DataWorker"),s=a("./stream/Crc32Probe"),l=a("./stream/DataLengthProbe");function c(u,d,h,m,v){this.compressedSize=u,this.uncompressedSize=d,this.crc32=h,this.compression=m,this.compressedContent=v}c.prototype={getContentWorker:function(){var u=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),d=this;return u.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(u,d,h){return u.pipe(new s).pipe(new l("uncompressedSize")).pipe(d.compressWorker(h)).pipe(new l("compressedSize")).withStreamInfo("compression",d)},r.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(a,r,n){var i=a("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=a("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(a,r,n){var i=a("./utils"),o=(function(){for(var s,l=[],c=0;c<256;c++){s=c;for(var u=0;u<8;u++)s=1&s?3988292384^s>>>1:s>>>1;l[c]=s}return l})();r.exports=function(s,l){return s!==void 0&&s.length?i.getTypeOf(s)!=="string"?(function(c,u,d,h){var m=o,v=h+d;c^=-1;for(var f=h;f<v;f++)c=c>>>8^m[255&(c^u[f])];return-1^c})(0|l,s,s.length,0):(function(c,u,d,h){var m=o,v=h+d;c^=-1;for(var f=h;f<v;f++)c=c>>>8^m[255&(c^u.charCodeAt(f))];return-1^c})(0|l,s,s.length,0):0}},{"./utils":32}],5:[function(a,r,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(a,r,n){var i=null;i=typeof Promise<"u"?Promise:a("lie"),r.exports={Promise:i}},{lie:37}],7:[function(a,r,n){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=a("pako"),s=a("./utils"),l=a("./stream/GenericWorker"),c=i?"uint8array":"array";function u(d,h){l.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=h,this.meta={}}n.magic="\b\0",s.inherits(u,l),u.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(s.transformTo(c,d.data),!1)},u.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(h){d.push({data:h,meta:d.meta})}},n.compressWorker=function(d){return new u("Deflate",d)},n.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(a,r,n){function i(m,v){var f,y="";for(f=0;f<v;f++)y+=String.fromCharCode(255&m),m>>>=8;return y}function o(m,v,f,y,b,k){var w,C,O=m.file,S=m.compression,j=k!==c.utf8encode,P=s.transformTo("string",k(O.name)),R=s.transformTo("string",c.utf8encode(O.name)),_=O.comment,K=s.transformTo("string",k(_)),L=s.transformTo("string",c.utf8encode(_)),Q=R.length!==O.name.length,D=L.length!==_.length,Y="",ee="",oe="",X=O.dir,de=O.date,W={crc32:0,compressedSize:0,uncompressedSize:0};v&&!f||(W.crc32=m.crc32,W.compressedSize=m.compressedSize,W.uncompressedSize=m.uncompressedSize);var I=0;v&&(I|=8),j||!Q&&!D||(I|=2048);var J=0,G=0;X&&(J|=16),b==="UNIX"?(G=798,J|=(function(N,F){var ne=N;return N||(ne=F?16893:33204),(65535&ne)<<16})(O.unixPermissions,X)):(G=20,J|=(function(N){return 63&(N||0)})(O.dosPermissions)),w=de.getUTCHours(),w<<=6,w|=de.getUTCMinutes(),w<<=5,w|=de.getUTCSeconds()/2,C=de.getUTCFullYear()-1980,C<<=4,C|=de.getUTCMonth()+1,C<<=5,C|=de.getUTCDate(),Q&&(ee=i(1,1)+i(u(P),4)+R,Y+="up"+i(ee.length,2)+ee),D&&(oe=i(1,1)+i(u(K),4)+L,Y+="uc"+i(oe.length,2)+oe);var B="";return B+=`
|
|
10431
10431
|
\0`,B+=i(I,2),B+=S.magic,B+=i(w,2),B+=i(C,2),B+=i(W.crc32,4),B+=i(W.compressedSize,4),B+=i(W.uncompressedSize,4),B+=i(P.length,2),B+=i(Y.length,2),{fileRecord:d.LOCAL_FILE_HEADER+B+P+Y,dirRecord:d.CENTRAL_FILE_HEADER+i(G,2)+B+i(K.length,2)+"\0\0\0\0"+i(J,4)+i(y,4)+P+Y+K}}var s=a("../utils"),l=a("../stream/GenericWorker"),c=a("../utf8"),u=a("../crc32"),d=a("../signature");function h(m,v,f,y){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=f,this.encodeFileName=y,this.streamFiles=m,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(h,l),h.prototype.push=function(m){var v=m.meta.percent||0,f=this.entriesCount,y=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,l.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:f?(v+100*(f-y-1))/f:100}}))},h.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var v=this.streamFiles&&!m.file.dir;if(v){var f=o(m,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:f.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(m){this.accumulate=!1;var v=this.streamFiles&&!m.file.dir,f=o(m,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(f.dirRecord),v)this.push({data:(function(y){return d.DATA_DESCRIPTOR+i(y.crc32,4)+i(y.compressedSize,4)+i(y.uncompressedSize,4)})(m),meta:{percent:100}});else for(this.push({data:f.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var m=this.bytesWritten,v=0;v<this.dirRecords.length;v++)this.push({data:this.dirRecords[v],meta:{percent:100}});var f=this.bytesWritten-m,y=(function(b,k,w,C,O){var S=s.transformTo("string",O(C));return d.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(b,2)+i(b,2)+i(k,4)+i(w,4)+i(S.length,2)+S})(this.dirRecords.length,f,m,this.zipComment,this.encodeFileName);this.push({data:y,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(m){this._sources.push(m);var v=this;return m.on("data",function(f){v.processChunk(f)}),m.on("end",function(){v.closedSource(v.previous.streamInfo),v._sources.length?v.prepareNextSource():v.end()}),m.on("error",function(f){v.error(f)}),this},h.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(m){var v=this._sources;if(!l.prototype.error.call(this,m))return!1;for(var f=0;f<v.length;f++)try{v[f].error(m)}catch{}return!0},h.prototype.lock=function(){l.prototype.lock.call(this);for(var m=this._sources,v=0;v<m.length;v++)m[v].lock()},r.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(a,r,n){var i=a("../compressions"),o=a("./ZipFileWorker");n.generateWorker=function(s,l,c){var u=new o(l.streamFiles,c,l.platform,l.encodeFileName),d=0;try{s.forEach(function(h,m){d++;var v=(function(k,w){var C=k||w,O=i[C];if(!O)throw new Error(C+" is not a valid compression method !");return O})(m.options.compression,l.compression),f=m.options.compressionOptions||l.compressionOptions||{},y=m.dir,b=m.date;m._compressWorker(v,f).withStreamInfo("file",{name:h,dir:y,date:b,comment:m.comment||"",unixPermissions:m.unixPermissions,dosPermissions:m.dosPermissions}).pipe(u)}),u.entriesCount=d}catch(h){u.error(h)}return u}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(a,r,n){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new i;for(var s in this)typeof this[s]!="function"&&(o[s]=this[s]);return o}}(i.prototype=a("./object")).loadAsync=a("./load"),i.support=a("./support"),i.defaults=a("./defaults"),i.version="3.10.1",i.loadAsync=function(o,s){return new i().loadAsync(o,s)},i.external=a("./external"),r.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(a,r,n){var i=a("./utils"),o=a("./external"),s=a("./utf8"),l=a("./zipEntries"),c=a("./stream/Crc32Probe"),u=a("./nodejsUtils");function d(h){return new o.Promise(function(m,v){var f=h.decompressed.getContentWorker().pipe(new c);f.on("error",function(y){v(y)}).on("end",function(){f.streamInfo.crc32!==h.decompressed.crc32?v(new Error("Corrupted zip : CRC32 mismatch")):m()}).resume()})}r.exports=function(h,m){var v=this;return m=i.extend(m||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),u.isNode&&u.isStream(h)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",h,!0,m.optimizedBinaryString,m.base64).then(function(f){var y=new l(m);return y.load(f),y}).then(function(f){var y=[o.Promise.resolve(f)],b=f.files;if(m.checkCRC32)for(var k=0;k<b.length;k++)y.push(d(b[k]));return o.Promise.all(y)}).then(function(f){for(var y=f.shift(),b=y.files,k=0;k<b.length;k++){var w=b[k],C=w.fileNameStr,O=i.resolve(w.fileNameStr);v.file(O,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:m.createFolders}),w.dir||(v.file(O).unsafeOriginalName=C)}return y.zipComment.length&&(v.comment=y.zipComment),v})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(a,r,n){var i=a("../utils"),o=a("../stream/GenericWorker");function s(l,c){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}i.inherits(s,o),s.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(u){c.push({data:u,meta:{percent:0}})}).on("error",function(u){c.isPaused?this.generatedError=u:c.error(u)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},s.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(a,r,n){var i=a("readable-stream").Readable;function o(s,l,c){i.call(this,l),this._helper=s;var u=this;s.on("data",function(d,h){u.push(d)||u._helper.pause(),c&&c(h)}).on("error",function(d){u.emit("error",d)}).on("end",function(){u.push(null)})}a("../utils").inherits(o,i),o.prototype._read=function(){this._helper.resume()},r.exports=o},{"../utils":32,"readable-stream":16}],14:[function(a,r,n){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,o);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,o)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var o=new Buffer(i);return o.fill(0),o},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(a,r,n){function i(O,S,j){var P,R=s.getTypeOf(S),_=s.extend(j||{},u);_.date=_.date||new Date,_.compression!==null&&(_.compression=_.compression.toUpperCase()),typeof _.unixPermissions=="string"&&(_.unixPermissions=parseInt(_.unixPermissions,8)),_.unixPermissions&&16384&_.unixPermissions&&(_.dir=!0),_.dosPermissions&&16&_.dosPermissions&&(_.dir=!0),_.dir&&(O=b(O)),_.createFolders&&(P=y(O))&&k.call(this,P,!0);var K=R==="string"&&_.binary===!1&&_.base64===!1;j&&j.binary!==void 0||(_.binary=!K),(S instanceof d&&S.uncompressedSize===0||_.dir||!S||S.length===0)&&(_.base64=!1,_.binary=!0,S="",_.compression="STORE",R="string");var L=null;L=S instanceof d||S instanceof l?S:v.isNode&&v.isStream(S)?new f(O,S):s.prepareContent(O,S,_.binary,_.optimizedBinaryString,_.base64);var Q=new h(O,L,_);this.files[O]=Q}var o=a("./utf8"),s=a("./utils"),l=a("./stream/GenericWorker"),c=a("./stream/StreamHelper"),u=a("./defaults"),d=a("./compressedObject"),h=a("./zipObject"),m=a("./generate"),v=a("./nodejsUtils"),f=a("./nodejs/NodejsStreamInputAdapter"),y=function(O){O.slice(-1)==="/"&&(O=O.substring(0,O.length-1));var S=O.lastIndexOf("/");return 0<S?O.substring(0,S):""},b=function(O){return O.slice(-1)!=="/"&&(O+="/"),O},k=function(O,S){return S=S!==void 0?S:u.createFolders,O=b(O),this.files[O]||i.call(this,O,null,{dir:!0,createFolders:S}),this.files[O]};function w(O){return Object.prototype.toString.call(O)==="[object RegExp]"}var C={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(O){var S,j,P;for(S in this.files)P=this.files[S],(j=S.slice(this.root.length,S.length))&&S.slice(0,this.root.length)===this.root&&O(j,P)},filter:function(O){var S=[];return this.forEach(function(j,P){O(j,P)&&S.push(P)}),S},file:function(O,S,j){if(arguments.length!==1)return O=this.root+O,i.call(this,O,S,j),this;if(w(O)){var P=O;return this.filter(function(_,K){return!K.dir&&P.test(_)})}var R=this.files[this.root+O];return R&&!R.dir?R:null},folder:function(O){if(!O)return this;if(w(O))return this.filter(function(R,_){return _.dir&&O.test(R)});var S=this.root+O,j=k.call(this,S),P=this.clone();return P.root=j.name,P},remove:function(O){O=this.root+O;var S=this.files[O];if(S||(O.slice(-1)!=="/"&&(O+="/"),S=this.files[O]),S&&!S.dir)delete this.files[O];else for(var j=this.filter(function(R,_){return _.name.slice(0,O.length)===O}),P=0;P<j.length;P++)delete this.files[j[P].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(O){var S,j={};try{if((j=s.extend(O||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=j.type.toLowerCase(),j.compression=j.compression.toUpperCase(),j.type==="binarystring"&&(j.type="string"),!j.type)throw new Error("No output type specified.");s.checkSupport(j.type),j.platform!=="darwin"&&j.platform!=="freebsd"&&j.platform!=="linux"&&j.platform!=="sunos"||(j.platform="UNIX"),j.platform==="win32"&&(j.platform="DOS");var P=j.comment||this.comment||"";S=m.generateWorker(this,j,P)}catch(R){(S=new l("error")).error(R)}return new c(S,j.type||"string",j.mimeType)},generateAsync:function(O,S){return this.generateInternalStream(O).accumulate(S)},generateNodeStream:function(O,S){return(O=O||{}).type||(O.type="nodebuffer"),this.generateInternalStream(O).toNodejsStream(S)}};r.exports=C},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(a,r,n){r.exports=a("stream")},{stream:void 0}],17:[function(a,r,n){var i=a("./DataReader");function o(s){i.call(this,s);for(var l=0;l<this.data.length;l++)s[l]=255&s[l]}a("../utils").inherits(o,i),o.prototype.byteAt=function(s){return this.data[this.zero+s]},o.prototype.lastIndexOfSignature=function(s){for(var l=s.charCodeAt(0),c=s.charCodeAt(1),u=s.charCodeAt(2),d=s.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===l&&this.data[h+1]===c&&this.data[h+2]===u&&this.data[h+3]===d)return h-this.zero;return-1},o.prototype.readAndCheckSignature=function(s){var l=s.charCodeAt(0),c=s.charCodeAt(1),u=s.charCodeAt(2),d=s.charCodeAt(3),h=this.readData(4);return l===h[0]&&c===h[1]&&u===h[2]&&d===h[3]},o.prototype.readData=function(s){if(this.checkOffset(s),s===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},r.exports=o},{"../utils":32,"./DataReader":18}],18:[function(a,r,n){var i=a("../utils");function o(s){this.data=s,this.length=s.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(s){this.checkIndex(this.index+s)},checkIndex:function(s){if(this.length<this.zero+s||s<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+s+"). Corrupted zip ?")},setIndex:function(s){this.checkIndex(s),this.index=s},skip:function(s){this.setIndex(this.index+s)},byteAt:function(){},readInt:function(s){var l,c=0;for(this.checkOffset(s),l=this.index+s-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=s,c},readString:function(s){return i.transformTo("string",this.readData(s))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var s=this.readInt(4);return new Date(Date.UTC(1980+(s>>25&127),(s>>21&15)-1,s>>16&31,s>>11&31,s>>5&63,(31&s)<<1))}},r.exports=o},{"../utils":32}],19:[function(a,r,n){var i=a("./Uint8ArrayReader");function o(s){i.call(this,s)}a("../utils").inherits(o,i),o.prototype.readData=function(s){this.checkOffset(s);var l=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},r.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(a,r,n){var i=a("./DataReader");function o(s){i.call(this,s)}a("../utils").inherits(o,i),o.prototype.byteAt=function(s){return this.data.charCodeAt(this.zero+s)},o.prototype.lastIndexOfSignature=function(s){return this.data.lastIndexOf(s)-this.zero},o.prototype.readAndCheckSignature=function(s){return s===this.readData(4)},o.prototype.readData=function(s){this.checkOffset(s);var l=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},r.exports=o},{"../utils":32,"./DataReader":18}],21:[function(a,r,n){var i=a("./ArrayReader");function o(s){i.call(this,s)}a("../utils").inherits(o,i),o.prototype.readData=function(s){if(this.checkOffset(s),s===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},r.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(a,r,n){var i=a("../utils"),o=a("../support"),s=a("./ArrayReader"),l=a("./StringReader"),c=a("./NodeBufferReader"),u=a("./Uint8ArrayReader");r.exports=function(d){var h=i.getTypeOf(d);return i.checkSupport(h),h!=="string"||o.uint8array?h==="nodebuffer"?new c(d):o.uint8array?new u(i.transformTo("uint8array",d)):new s(i.transformTo("array",d)):new l(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(a,r,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(a,r,n){var i=a("./GenericWorker"),o=a("../utils");function s(l){i.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(s,i),s.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},r.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(a,r,n){var i=a("./GenericWorker"),o=a("../crc32");function s(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}a("../utils").inherits(s,i),s.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},r.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(a,r,n){var i=a("../utils"),o=a("./GenericWorker");function s(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(s,o),s.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}o.prototype.processChunk.call(this,l)},r.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(a,r,n){var i=a("../utils"),o=a("./GenericWorker");function s(l){o.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(u){c.dataIsReady=!0,c.data=u,c.max=u&&u.length||0,c.type=i.getTypeOf(u),c.isPaused||c._tickAndRepeat()},function(u){c.error(u)})}i.inherits(s,o),s.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(a,r,n){function i(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,s){return this._listeners[o].push(s),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,s){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,s)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var s=this;return o.on("data",function(l){s.processChunk(l)}),o.on("end",function(){s.end()}),o.on("error",function(l){s.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,s){return this.extraStreamInfo[o]=s,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},r.exports=i},{}],29:[function(a,r,n){var i=a("../utils"),o=a("./ConvertWorker"),s=a("./GenericWorker"),l=a("../base64"),c=a("../support"),u=a("../external"),d=null;if(c.nodestream)try{d=a("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(v,f){return new u.Promise(function(y,b){var k=[],w=v._internalType,C=v._outputType,O=v._mimeType;v.on("data",function(S,j){k.push(S),f&&f(j)}).on("error",function(S){k=[],b(S)}).on("end",function(){try{var S=(function(j,P,R){switch(j){case"blob":return i.newBlob(i.transformTo("arraybuffer",P),R);case"base64":return l.encode(P);default:return i.transformTo(j,P)}})(C,(function(j,P){var R,_=0,K=null,L=0;for(R=0;R<P.length;R++)L+=P[R].length;switch(j){case"string":return P.join("");case"array":return Array.prototype.concat.apply([],P);case"uint8array":for(K=new Uint8Array(L),R=0;R<P.length;R++)K.set(P[R],_),_+=P[R].length;return K;case"nodebuffer":return Buffer.concat(P);default:throw new Error("concat : unsupported type '"+j+"'")}})(w,k),O);y(S)}catch(j){b(j)}k=[]}).resume()})}function m(v,f,y){var b=f;switch(f){case"blob":case"arraybuffer":b="uint8array";break;case"base64":b="string"}try{this._internalType=b,this._outputType=f,this._mimeType=y,i.checkSupport(b),this._worker=v.pipe(new o(b)),v.lock()}catch(k){this._worker=new s("error"),this._worker.error(k)}}m.prototype={accumulate:function(v){return h(this,v)},on:function(v,f){var y=this;return v==="data"?this._worker.on(v,function(b){f.call(y,b.data,b.meta)}):this._worker.on(v,function(){i.delay(f,arguments,y)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(v){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new d(this,{objectMode:this._outputType!=="nodebuffer"},v)}},r.exports=m},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(a,r,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",n.nodebuffer=typeof Buffer<"u",n.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")n.blob=!1;else{var i=new ArrayBuffer(0);try{n.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),n.blob=o.getBlob("application/zip").size===0}catch{n.blob=!1}}}try{n.nodestream=!!a("readable-stream").Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(a,r,n){for(var i=a("./utils"),o=a("./support"),s=a("./nodejsUtils"),l=a("./stream/GenericWorker"),c=new Array(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;c[254]=c[254]=1;function d(){l.call(this,"utf-8 decode"),this.leftOver=null}function h(){l.call(this,"utf-8 encode")}n.utf8encode=function(m){return o.nodebuffer?s.newBufferFrom(m,"utf-8"):(function(v){var f,y,b,k,w,C=v.length,O=0;for(k=0;k<C;k++)(64512&(y=v.charCodeAt(k)))==55296&&k+1<C&&(64512&(b=v.charCodeAt(k+1)))==56320&&(y=65536+(y-55296<<10)+(b-56320),k++),O+=y<128?1:y<2048?2:y<65536?3:4;for(f=o.uint8array?new Uint8Array(O):new Array(O),k=w=0;w<O;k++)(64512&(y=v.charCodeAt(k)))==55296&&k+1<C&&(64512&(b=v.charCodeAt(k+1)))==56320&&(y=65536+(y-55296<<10)+(b-56320),k++),y<128?f[w++]=y:(y<2048?f[w++]=192|y>>>6:(y<65536?f[w++]=224|y>>>12:(f[w++]=240|y>>>18,f[w++]=128|y>>>12&63),f[w++]=128|y>>>6&63),f[w++]=128|63&y);return f})(m)},n.utf8decode=function(m){return o.nodebuffer?i.transformTo("nodebuffer",m).toString("utf-8"):(function(v){var f,y,b,k,w=v.length,C=new Array(2*w);for(f=y=0;f<w;)if((b=v[f++])<128)C[y++]=b;else if(4<(k=c[b]))C[y++]=65533,f+=k-1;else{for(b&=k===2?31:k===3?15:7;1<k&&f<w;)b=b<<6|63&v[f++],k--;1<k?C[y++]=65533:b<65536?C[y++]=b:(b-=65536,C[y++]=55296|b>>10&1023,C[y++]=56320|1023&b)}return C.length!==y&&(C.subarray?C=C.subarray(0,y):C.length=y),i.applyFromCharCode(C)})(m=i.transformTo(o.uint8array?"uint8array":"array",m))},i.inherits(d,l),d.prototype.processChunk=function(m){var v=i.transformTo(o.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var f=v;(v=new Uint8Array(f.length+this.leftOver.length)).set(this.leftOver,0),v.set(f,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var y=(function(k,w){var C;for((w=w||k.length)>k.length&&(w=k.length),C=w-1;0<=C&&(192&k[C])==128;)C--;return C<0||C===0?w:C+c[k[C]]>w?C:w})(v),b=v;y!==v.length&&(o.uint8array?(b=v.subarray(0,y),this.leftOver=v.subarray(y,v.length)):(b=v.slice(0,y),this.leftOver=v.slice(y,v.length))),this.push({data:n.utf8decode(b),meta:m.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=d,i.inherits(h,l),h.prototype.processChunk=function(m){this.push({data:n.utf8encode(m.data),meta:m.meta})},n.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(a,r,n){var i=a("./support"),o=a("./base64"),s=a("./nodejsUtils"),l=a("./external");function c(f){return f}function u(f,y){for(var b=0;b<f.length;++b)y[b]=255&f.charCodeAt(b);return y}a("setimmediate"),n.newBlob=function(f,y){n.checkSupport("blob");try{return new Blob([f],{type:y})}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return b.append(f),b.getBlob(y)}catch{throw new Error("Bug : can't construct the Blob.")}}};var d={stringifyByChunk:function(f,y,b){var k=[],w=0,C=f.length;if(C<=b)return String.fromCharCode.apply(null,f);for(;w<C;)y==="array"||y==="nodebuffer"?k.push(String.fromCharCode.apply(null,f.slice(w,Math.min(w+b,C)))):k.push(String.fromCharCode.apply(null,f.subarray(w,Math.min(w+b,C)))),w+=b;return k.join("")},stringifyByChar:function(f){for(var y="",b=0;b<f.length;b++)y+=String.fromCharCode(f[b]);return y},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,s.allocBuffer(1)).length===1}catch{return!1}})()}};function h(f){var y=65536,b=n.getTypeOf(f),k=!0;if(b==="uint8array"?k=d.applyCanBeUsed.uint8array:b==="nodebuffer"&&(k=d.applyCanBeUsed.nodebuffer),k)for(;1<y;)try{return d.stringifyByChunk(f,b,y)}catch{y=Math.floor(y/2)}return d.stringifyByChar(f)}function m(f,y){for(var b=0;b<f.length;b++)y[b]=f[b];return y}n.applyFromCharCode=h;var v={};v.string={string:c,array:function(f){return u(f,new Array(f.length))},arraybuffer:function(f){return v.string.uint8array(f).buffer},uint8array:function(f){return u(f,new Uint8Array(f.length))},nodebuffer:function(f){return u(f,s.allocBuffer(f.length))}},v.array={string:h,array:c,arraybuffer:function(f){return new Uint8Array(f).buffer},uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return s.newBufferFrom(f)}},v.arraybuffer={string:function(f){return h(new Uint8Array(f))},array:function(f){return m(new Uint8Array(f),new Array(f.byteLength))},arraybuffer:c,uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return s.newBufferFrom(new Uint8Array(f))}},v.uint8array={string:h,array:function(f){return m(f,new Array(f.length))},arraybuffer:function(f){return f.buffer},uint8array:c,nodebuffer:function(f){return s.newBufferFrom(f)}},v.nodebuffer={string:h,array:function(f){return m(f,new Array(f.length))},arraybuffer:function(f){return v.nodebuffer.uint8array(f).buffer},uint8array:function(f){return m(f,new Uint8Array(f.length))},nodebuffer:c},n.transformTo=function(f,y){if(y=y||"",!f)return y;n.checkSupport(f);var b=n.getTypeOf(y);return v[b][f](y)},n.resolve=function(f){for(var y=f.split("/"),b=[],k=0;k<y.length;k++){var w=y[k];w==="."||w===""&&k!==0&&k!==y.length-1||(w===".."?b.pop():b.push(w))}return b.join("/")},n.getTypeOf=function(f){return typeof f=="string"?"string":Object.prototype.toString.call(f)==="[object Array]"?"array":i.nodebuffer&&s.isBuffer(f)?"nodebuffer":i.uint8array&&f instanceof Uint8Array?"uint8array":i.arraybuffer&&f instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(f){if(!i[f.toLowerCase()])throw new Error(f+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(f){var y,b,k="";for(b=0;b<(f||"").length;b++)k+="\\x"+((y=f.charCodeAt(b))<16?"0":"")+y.toString(16).toUpperCase();return k},n.delay=function(f,y,b){setImmediate(function(){f.apply(b||null,y||[])})},n.inherits=function(f,y){function b(){}b.prototype=y.prototype,f.prototype=new b},n.extend=function(){var f,y,b={};for(f=0;f<arguments.length;f++)for(y in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],y)&&b[y]===void 0&&(b[y]=arguments[f][y]);return b},n.prepareContent=function(f,y,b,k,w){return l.Promise.resolve(y).then(function(C){return i.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)&&typeof FileReader<"u"?new l.Promise(function(O,S){var j=new FileReader;j.onload=function(P){O(P.target.result)},j.onerror=function(P){S(P.target.error)},j.readAsArrayBuffer(C)}):C}).then(function(C){var O=n.getTypeOf(C);return O?(O==="arraybuffer"?C=n.transformTo("uint8array",C):O==="string"&&(w?C=o.decode(C):b&&k!==!0&&(C=(function(S){return u(S,i.uint8array?new Uint8Array(S.length):new Array(S.length))})(C))),C):l.Promise.reject(new Error("Can't read the data of '"+f+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(a,r,n){var i=a("./reader/readerFor"),o=a("./utils"),s=a("./signature"),l=a("./zipEntry"),c=a("./support");function u(d){this.files=[],this.loadOptions=d}u.prototype={checkSignature:function(d){if(!this.reader.readAndCheckSignature(d)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(h)+", expected "+o.pretty(d)+")")}},isSignature:function(d,h){var m=this.reader.index;this.reader.setIndex(d);var v=this.reader.readString(4)===h;return this.reader.setIndex(m),v},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var d=this.reader.readData(this.zipCommentLength),h=c.uint8array?"uint8array":"array",m=o.transformTo(h,d);this.zipComment=this.loadOptions.decodeFileName(m)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var d,h,m,v=this.zip64EndOfCentralSize-44;0<v;)d=this.reader.readInt(2),h=this.reader.readInt(4),m=this.reader.readData(h),this.zip64ExtensibleData[d]={id:d,length:h,value:m}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var d,h;for(d=0;d<this.files.length;d++)h=this.files[d],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var d;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(d=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(d);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var d=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(d<0)throw this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(d);var h=d;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(d=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(d),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var m=this.centralDirOffset+this.centralDirSize;this.zip64&&(m+=20,m+=12+this.zip64EndOfCentralSize);var v=h-m;if(0<v)this.isSignature(h,s.CENTRAL_FILE_HEADER)||(this.reader.zero=v);else if(v<0)throw new Error("Corrupted zip: missing "+Math.abs(v)+" bytes.")},prepareReader:function(d){this.reader=i(d)},load:function(d){this.prepareReader(d),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(a,r,n){var i=a("./reader/readerFor"),o=a("./utils"),s=a("./compressedObject"),l=a("./crc32"),c=a("./utf8"),u=a("./compressions"),d=a("./support");function h(m,v){this.options=m,this.loadOptions=v}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(m){var v,f;if(m.skip(22),this.fileNameLength=m.readInt(2),f=m.readInt(2),this.fileName=m.readData(this.fileNameLength),m.skip(f),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((v=(function(y){for(var b in u)if(Object.prototype.hasOwnProperty.call(u,b)&&u[b].magic===y)return u[b];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,v,m.readData(this.compressedSize))},readCentralPart:function(m){this.versionMadeBy=m.readInt(2),m.skip(2),this.bitFlag=m.readInt(2),this.compressionMethod=m.readString(2),this.date=m.readDate(),this.crc32=m.readInt(4),this.compressedSize=m.readInt(4),this.uncompressedSize=m.readInt(4);var v=m.readInt(2);if(this.extraFieldsLength=m.readInt(2),this.fileCommentLength=m.readInt(2),this.diskNumberStart=m.readInt(2),this.internalFileAttributes=m.readInt(2),this.externalFileAttributes=m.readInt(4),this.localHeaderOffset=m.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");m.skip(v),this.readExtraFields(m),this.parseZIP64ExtraField(m),this.fileComment=m.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var m=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var v,f,y,b=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4<b;)v=m.readInt(2),f=m.readInt(2),y=m.readData(f),this.extraFields[v]={id:v,length:f,value:y};m.setIndex(b)},handleUTF8:function(){var m=d.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var v=this.findExtraFieldUnicodePath();if(v!==null)this.fileNameStr=v;else{var f=o.transformTo(m,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(f)}var y=this.findExtraFieldUnicodeComment();if(y!==null)this.fileCommentStr=y;else{var b=o.transformTo(m,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(b)}}},findExtraFieldUnicodePath:function(){var m=this.extraFields[28789];if(m){var v=i(m.value);return v.readInt(1)!==1||l(this.fileName)!==v.readInt(4)?null:c.utf8decode(v.readData(m.length-5))}return null},findExtraFieldUnicodeComment:function(){var m=this.extraFields[25461];if(m){var v=i(m.value);return v.readInt(1)!==1||l(this.fileComment)!==v.readInt(4)?null:c.utf8decode(v.readData(m.length-5))}return null}},r.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(a,r,n){function i(v,f,y){this.name=v,this.dir=y.dir,this.date=y.date,this.comment=y.comment,this.unixPermissions=y.unixPermissions,this.dosPermissions=y.dosPermissions,this._data=f,this._dataBinary=y.binary,this.options={compression:y.compression,compressionOptions:y.compressionOptions}}var o=a("./stream/StreamHelper"),s=a("./stream/DataWorker"),l=a("./utf8"),c=a("./compressedObject"),u=a("./stream/GenericWorker");i.prototype={internalStream:function(v){var f=null,y="string";try{if(!v)throw new Error("No output type specified.");var b=(y=v.toLowerCase())==="string"||y==="text";y!=="binarystring"&&y!=="text"||(y="string"),f=this._decompressWorker();var k=!this._dataBinary;k&&!b&&(f=f.pipe(new l.Utf8EncodeWorker)),!k&&b&&(f=f.pipe(new l.Utf8DecodeWorker))}catch(w){(f=new u("error")).error(w)}return new o(f,y,"")},async:function(v,f){return this.internalStream(v).accumulate(f)},nodeStream:function(v,f){return this.internalStream(v||"nodebuffer").toNodejsStream(f)},_compressWorker:function(v,f){if(this._data instanceof c&&this._data.compression.magic===v.magic)return this._data.getCompressedWorker();var y=this._decompressWorker();return this._dataBinary||(y=y.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(y,v,f)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof u?this._data:new s(this._data)}};for(var d=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},m=0;m<d.length;m++)i.prototype[d[m]]=h;r.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(a,r,n){(function(i){var o,s,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var c=0,u=new l(v),d=i.document.createTextNode("");u.observe(d,{characterData:!0}),o=function(){d.data=c=++c%2}}else if(i.setImmediate||i.MessageChannel===void 0)o="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var f=i.document.createElement("script");f.onreadystatechange=function(){v(),f.onreadystatechange=null,f.parentNode.removeChild(f),f=null},i.document.documentElement.appendChild(f)}:function(){setTimeout(v,0)};else{var h=new i.MessageChannel;h.port1.onmessage=v,o=function(){h.port2.postMessage(0)}}var m=[];function v(){var f,y;s=!0;for(var b=m.length;b;){for(y=m,m=[],f=-1;++f<b;)y[f]();b=m.length}s=!1}r.exports=function(f){m.push(f)!==1||s||o()}}).call(this,typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(a,r,n){var i=a("immediate");function o(){}var s={},l=["REJECTED"],c=["FULFILLED"],u=["PENDING"];function d(b){if(typeof b!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,b!==o&&f(this,b)}function h(b,k,w){this.promise=b,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function m(b,k,w){i(function(){var C;try{C=k(w)}catch(O){return s.reject(b,O)}C===b?s.reject(b,new TypeError("Cannot resolve promise with itself")):s.resolve(b,C)})}function v(b){var k=b&&b.then;if(b&&(typeof b=="object"||typeof b=="function")&&typeof k=="function")return function(){k.apply(b,arguments)}}function f(b,k){var w=!1;function C(j){w||(w=!0,s.reject(b,j))}function O(j){w||(w=!0,s.resolve(b,j))}var S=y(function(){k(O,C)});S.status==="error"&&C(S.value)}function y(b,k){var w={};try{w.value=b(k),w.status="success"}catch(C){w.status="error",w.value=C}return w}(r.exports=d).prototype.finally=function(b){if(typeof b!="function")return this;var k=this.constructor;return this.then(function(w){return k.resolve(b()).then(function(){return w})},function(w){return k.resolve(b()).then(function(){throw w})})},d.prototype.catch=function(b){return this.then(null,b)},d.prototype.then=function(b,k){if(typeof b!="function"&&this.state===c||typeof k!="function"&&this.state===l)return this;var w=new this.constructor(o);return this.state!==u?m(w,this.state===c?b:k,this.outcome):this.queue.push(new h(w,b,k)),w},h.prototype.callFulfilled=function(b){s.resolve(this.promise,b)},h.prototype.otherCallFulfilled=function(b){m(this.promise,this.onFulfilled,b)},h.prototype.callRejected=function(b){s.reject(this.promise,b)},h.prototype.otherCallRejected=function(b){m(this.promise,this.onRejected,b)},s.resolve=function(b,k){var w=y(v,k);if(w.status==="error")return s.reject(b,w.value);var C=w.value;if(C)f(b,C);else{b.state=c,b.outcome=k;for(var O=-1,S=b.queue.length;++O<S;)b.queue[O].callFulfilled(k)}return b},s.reject=function(b,k){b.state=l,b.outcome=k;for(var w=-1,C=b.queue.length;++w<C;)b.queue[w].callRejected(k);return b},d.resolve=function(b){return b instanceof this?b:s.resolve(new this(o),b)},d.reject=function(b){var k=new this(o);return s.reject(k,b)},d.all=function(b){var k=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=b.length,C=!1;if(!w)return this.resolve([]);for(var O=new Array(w),S=0,j=-1,P=new this(o);++j<w;)R(b[j],j);return P;function R(_,K){k.resolve(_).then(function(L){O[K]=L,++S!==w||C||(C=!0,s.resolve(P,O))},function(L){C||(C=!0,s.reject(P,L))})}},d.race=function(b){var k=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=b.length,C=!1;if(!w)return this.resolve([]);for(var O=-1,S=new this(o);++O<w;)j=b[O],k.resolve(j).then(function(P){C||(C=!0,s.resolve(S,P))},function(P){C||(C=!0,s.reject(S,P))});var j;return S}},{immediate:36}],38:[function(a,r,n){var i={};(0,a("./lib/utils/common").assign)(i,a("./lib/deflate"),a("./lib/inflate"),a("./lib/zlib/constants")),r.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(a,r,n){var i=a("./zlib/deflate"),o=a("./utils/common"),s=a("./utils/strings"),l=a("./zlib/messages"),c=a("./zlib/zstream"),u=Object.prototype.toString,d=0,h=-1,m=0,v=8;function f(b){if(!(this instanceof f))return new f(b);this.options=o.assign({level:h,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},b||{});var k=this.options;k.raw&&0<k.windowBits?k.windowBits=-k.windowBits:k.gzip&&0<k.windowBits&&k.windowBits<16&&(k.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var w=i.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(w!==d)throw new Error(l[w]);if(k.header&&i.deflateSetHeader(this.strm,k.header),k.dictionary){var C;if(C=typeof k.dictionary=="string"?s.string2buf(k.dictionary):u.call(k.dictionary)==="[object ArrayBuffer]"?new Uint8Array(k.dictionary):k.dictionary,(w=i.deflateSetDictionary(this.strm,C))!==d)throw new Error(l[w]);this._dict_set=!0}}function y(b,k){var w=new f(k);if(w.push(b,!0),w.err)throw w.msg||l[w.err];return w.result}f.prototype.push=function(b,k){var w,C,O=this.strm,S=this.options.chunkSize;if(this.ended)return!1;C=k===~~k?k:k===!0?4:0,typeof b=="string"?O.input=s.string2buf(b):u.call(b)==="[object ArrayBuffer]"?O.input=new Uint8Array(b):O.input=b,O.next_in=0,O.avail_in=O.input.length;do{if(O.avail_out===0&&(O.output=new o.Buf8(S),O.next_out=0,O.avail_out=S),(w=i.deflate(O,C))!==1&&w!==d)return this.onEnd(w),!(this.ended=!0);O.avail_out!==0&&(O.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(s.buf2binstring(o.shrinkBuf(O.output,O.next_out))):this.onData(o.shrinkBuf(O.output,O.next_out)))}while((0<O.avail_in||O.avail_out===0)&&w!==1);return C===4?(w=i.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===d):C!==2||(this.onEnd(d),!(O.avail_out=0))},f.prototype.onData=function(b){this.chunks.push(b)},f.prototype.onEnd=function(b){b===d&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg},n.Deflate=f,n.deflate=y,n.deflateRaw=function(b,k){return(k=k||{}).raw=!0,y(b,k)},n.gzip=function(b,k){return(k=k||{}).gzip=!0,y(b,k)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(a,r,n){var i=a("./zlib/inflate"),o=a("./utils/common"),s=a("./utils/strings"),l=a("./zlib/constants"),c=a("./zlib/messages"),u=a("./zlib/zstream"),d=a("./zlib/gzheader"),h=Object.prototype.toString;function m(f){if(!(this instanceof m))return new m(f);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},f||{});var y=this.options;y.raw&&0<=y.windowBits&&y.windowBits<16&&(y.windowBits=-y.windowBits,y.windowBits===0&&(y.windowBits=-15)),!(0<=y.windowBits&&y.windowBits<16)||f&&f.windowBits||(y.windowBits+=32),15<y.windowBits&&y.windowBits<48&&(15&y.windowBits)==0&&(y.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var b=i.inflateInit2(this.strm,y.windowBits);if(b!==l.Z_OK)throw new Error(c[b]);this.header=new d,i.inflateGetHeader(this.strm,this.header)}function v(f,y){var b=new m(y);if(b.push(f,!0),b.err)throw b.msg||c[b.err];return b.result}m.prototype.push=function(f,y){var b,k,w,C,O,S,j=this.strm,P=this.options.chunkSize,R=this.options.dictionary,_=!1;if(this.ended)return!1;k=y===~~y?y:y===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof f=="string"?j.input=s.binstring2buf(f):h.call(f)==="[object ArrayBuffer]"?j.input=new Uint8Array(f):j.input=f,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new o.Buf8(P),j.next_out=0,j.avail_out=P),(b=i.inflate(j,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&R&&(S=typeof R=="string"?s.string2buf(R):h.call(R)==="[object ArrayBuffer]"?new Uint8Array(R):R,b=i.inflateSetDictionary(this.strm,S)),b===l.Z_BUF_ERROR&&_===!0&&(b=l.Z_OK,_=!1),b!==l.Z_STREAM_END&&b!==l.Z_OK)return this.onEnd(b),!(this.ended=!0);j.next_out&&(j.avail_out!==0&&b!==l.Z_STREAM_END&&(j.avail_in!==0||k!==l.Z_FINISH&&k!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=s.utf8border(j.output,j.next_out),C=j.next_out-w,O=s.buf2string(j.output,w),j.next_out=C,j.avail_out=P-C,C&&o.arraySet(j.output,j.output,w,C,0),this.onData(O)):this.onData(o.shrinkBuf(j.output,j.next_out)))),j.avail_in===0&&j.avail_out===0&&(_=!0)}while((0<j.avail_in||j.avail_out===0)&&b!==l.Z_STREAM_END);return b===l.Z_STREAM_END&&(k=l.Z_FINISH),k===l.Z_FINISH?(b=i.inflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===l.Z_OK):k!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(j.avail_out=0))},m.prototype.onData=function(f){this.chunks.push(f)},m.prototype.onEnd=function(f){f===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},n.Inflate=m,n.inflate=v,n.inflateRaw=function(f,y){return(y=y||{}).raw=!0,v(f,y)},n.ungzip=v},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(a,r,n){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";n.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var u=c.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var d in u)u.hasOwnProperty(d)&&(l[d]=u[d])}}return l},n.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var o={arraySet:function(l,c,u,d,h){if(c.subarray&&l.subarray)l.set(c.subarray(u,u+d),h);else for(var m=0;m<d;m++)l[h+m]=c[u+m]},flattenChunks:function(l){var c,u,d,h,m,v;for(c=d=0,u=l.length;c<u;c++)d+=l[c].length;for(v=new Uint8Array(d),c=h=0,u=l.length;c<u;c++)m=l[c],v.set(m,h),h+=m.length;return v}},s={arraySet:function(l,c,u,d,h){for(var m=0;m<d;m++)l[h+m]=c[u+m]},flattenChunks:function(l){return[].concat.apply([],l)}};n.setTyped=function(l){l?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,o)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,s))},n.setTyped(i)},{}],42:[function(a,r,n){var i=a("./common"),o=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{s=!1}for(var l=new i.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function u(d,h){if(h<65537&&(d.subarray&&s||!d.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(d,h));for(var m="",v=0;v<h;v++)m+=String.fromCharCode(d[v]);return m}l[254]=l[254]=1,n.string2buf=function(d){var h,m,v,f,y,b=d.length,k=0;for(f=0;f<b;f++)(64512&(m=d.charCodeAt(f)))==55296&&f+1<b&&(64512&(v=d.charCodeAt(f+1)))==56320&&(m=65536+(m-55296<<10)+(v-56320),f++),k+=m<128?1:m<2048?2:m<65536?3:4;for(h=new i.Buf8(k),f=y=0;y<k;f++)(64512&(m=d.charCodeAt(f)))==55296&&f+1<b&&(64512&(v=d.charCodeAt(f+1)))==56320&&(m=65536+(m-55296<<10)+(v-56320),f++),m<128?h[y++]=m:(m<2048?h[y++]=192|m>>>6:(m<65536?h[y++]=224|m>>>12:(h[y++]=240|m>>>18,h[y++]=128|m>>>12&63),h[y++]=128|m>>>6&63),h[y++]=128|63&m);return h},n.buf2binstring=function(d){return u(d,d.length)},n.binstring2buf=function(d){for(var h=new i.Buf8(d.length),m=0,v=h.length;m<v;m++)h[m]=d.charCodeAt(m);return h},n.buf2string=function(d,h){var m,v,f,y,b=h||d.length,k=new Array(2*b);for(m=v=0;m<b;)if((f=d[m++])<128)k[v++]=f;else if(4<(y=l[f]))k[v++]=65533,m+=y-1;else{for(f&=y===2?31:y===3?15:7;1<y&&m<b;)f=f<<6|63&d[m++],y--;1<y?k[v++]=65533:f<65536?k[v++]=f:(f-=65536,k[v++]=55296|f>>10&1023,k[v++]=56320|1023&f)}return u(k,v)},n.utf8border=function(d,h){var m;for((h=h||d.length)>d.length&&(h=d.length),m=h-1;0<=m&&(192&d[m])==128;)m--;return m<0||m===0?h:m+l[d[m]]>h?m:h}},{"./common":41}],43:[function(a,r,n){r.exports=function(i,o,s,l){for(var c=65535&i|0,u=i>>>16&65535|0,d=0;s!==0;){for(s-=d=2e3<s?2e3:s;u=u+(c=c+o[l++]|0)|0,--d;);c%=65521,u%=65521}return c|u<<16|0}},{}],44:[function(a,r,n){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,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,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(a,r,n){var i=(function(){for(var o,s=[],l=0;l<256;l++){o=l;for(var c=0;c<8;c++)o=1&o?3988292384^o>>>1:o>>>1;s[l]=o}return s})();r.exports=function(o,s,l,c){var u=i,d=c+l;o^=-1;for(var h=c;h<d;h++)o=o>>>8^u[255&(o^s[h])];return-1^o}},{}],46:[function(a,r,n){var i,o=a("../utils/common"),s=a("./trees"),l=a("./adler32"),c=a("./crc32"),u=a("./messages"),d=0,h=4,m=0,v=-2,f=-1,y=4,b=2,k=8,w=9,C=286,O=30,S=19,j=2*C+1,P=15,R=3,_=258,K=_+R+1,L=42,Q=113,D=1,Y=2,ee=3,oe=4;function X(q,ue){return q.msg=u[ue],ue}function de(q){return(q<<1)-(4<q?9:0)}function W(q){for(var ue=q.length;0<=--ue;)q[ue]=0}function I(q){var ue=q.state,pe=ue.pending;pe>q.avail_out&&(pe=q.avail_out),pe!==0&&(o.arraySet(q.output,ue.pending_buf,ue.pending_out,pe,q.next_out),q.next_out+=pe,ue.pending_out+=pe,q.total_out+=pe,q.avail_out-=pe,ue.pending-=pe,ue.pending===0&&(ue.pending_out=0))}function J(q,ue){s._tr_flush_block(q,0<=q.block_start?q.block_start:-1,q.strstart-q.block_start,ue),q.block_start=q.strstart,I(q.strm)}function G(q,ue){q.pending_buf[q.pending++]=ue}function B(q,ue){q.pending_buf[q.pending++]=ue>>>8&255,q.pending_buf[q.pending++]=255&ue}function N(q,ue){var pe,Z,ae=q.max_chain_length,ce=q.strstart,ve=q.prev_length,ge=q.nice_match,fe=q.strstart>q.w_size-K?q.strstart-(q.w_size-K):0,ye=q.window,Se=q.w_mask,Me=q.prev,tt=q.strstart+_,M=ye[ce+ve-1],te=ye[ce+ve];q.prev_length>=q.good_match&&(ae>>=2),ge>q.lookahead&&(ge=q.lookahead);do if(ye[(pe=ue)+ve]===te&&ye[pe+ve-1]===M&&ye[pe]===ye[ce]&&ye[++pe]===ye[ce+1]){ce+=2,pe++;do;while(ye[++ce]===ye[++pe]&&ye[++ce]===ye[++pe]&&ye[++ce]===ye[++pe]&&ye[++ce]===ye[++pe]&&ye[++ce]===ye[++pe]&&ye[++ce]===ye[++pe]&&ye[++ce]===ye[++pe]&&ye[++ce]===ye[++pe]&&ce<tt);if(Z=_-(tt-ce),ce=tt-_,ve<Z){if(q.match_start=ue,ge<=(ve=Z))break;M=ye[ce+ve-1],te=ye[ce+ve]}}while((ue=Me[ue&Se])>fe&&--ae!=0);return ve<=q.lookahead?ve:q.lookahead}function F(q){var ue,pe,Z,ae,ce,ve,ge,fe,ye,Se,Me=q.w_size;do{if(ae=q.window_size-q.lookahead-q.strstart,q.strstart>=Me+(Me-K)){for(o.arraySet(q.window,q.window,Me,Me,0),q.match_start-=Me,q.strstart-=Me,q.block_start-=Me,ue=pe=q.hash_size;Z=q.head[--ue],q.head[ue]=Me<=Z?Z-Me:0,--pe;);for(ue=pe=Me;Z=q.prev[--ue],q.prev[ue]=Me<=Z?Z-Me:0,--pe;);ae+=Me}if(q.strm.avail_in===0)break;if(ve=q.strm,ge=q.window,fe=q.strstart+q.lookahead,ye=ae,Se=void 0,Se=ve.avail_in,ye<Se&&(Se=ye),pe=Se===0?0:(ve.avail_in-=Se,o.arraySet(ge,ve.input,ve.next_in,Se,fe),ve.state.wrap===1?ve.adler=l(ve.adler,ge,Se,fe):ve.state.wrap===2&&(ve.adler=c(ve.adler,ge,Se,fe)),ve.next_in+=Se,ve.total_in+=Se,Se),q.lookahead+=pe,q.lookahead+q.insert>=R)for(ce=q.strstart-q.insert,q.ins_h=q.window[ce],q.ins_h=(q.ins_h<<q.hash_shift^q.window[ce+1])&q.hash_mask;q.insert&&(q.ins_h=(q.ins_h<<q.hash_shift^q.window[ce+R-1])&q.hash_mask,q.prev[ce&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=ce,ce++,q.insert--,!(q.lookahead+q.insert<R)););}while(q.lookahead<K&&q.strm.avail_in!==0)}function ne(q,ue){for(var pe,Z;;){if(q.lookahead<K){if(F(q),q.lookahead<K&&ue===d)return D;if(q.lookahead===0)break}if(pe=0,q.lookahead>=R&&(q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+R-1])&q.hash_mask,pe=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart),pe!==0&&q.strstart-pe<=q.w_size-K&&(q.match_length=N(q,pe)),q.match_length>=R)if(Z=s._tr_tally(q,q.strstart-q.match_start,q.match_length-R),q.lookahead-=q.match_length,q.match_length<=q.max_lazy_match&&q.lookahead>=R){for(q.match_length--;q.strstart++,q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+R-1])&q.hash_mask,pe=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart,--q.match_length!=0;);q.strstart++}else q.strstart+=q.match_length,q.match_length=0,q.ins_h=q.window[q.strstart],q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+1])&q.hash_mask;else Z=s._tr_tally(q,0,q.window[q.strstart]),q.lookahead--,q.strstart++;if(Z&&(J(q,!1),q.strm.avail_out===0))return D}return q.insert=q.strstart<R-1?q.strstart:R-1,ue===h?(J(q,!0),q.strm.avail_out===0?ee:oe):q.last_lit&&(J(q,!1),q.strm.avail_out===0)?D:Y}function se(q,ue){for(var pe,Z,ae;;){if(q.lookahead<K){if(F(q),q.lookahead<K&&ue===d)return D;if(q.lookahead===0)break}if(pe=0,q.lookahead>=R&&(q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+R-1])&q.hash_mask,pe=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart),q.prev_length=q.match_length,q.prev_match=q.match_start,q.match_length=R-1,pe!==0&&q.prev_length<q.max_lazy_match&&q.strstart-pe<=q.w_size-K&&(q.match_length=N(q,pe),q.match_length<=5&&(q.strategy===1||q.match_length===R&&4096<q.strstart-q.match_start)&&(q.match_length=R-1)),q.prev_length>=R&&q.match_length<=q.prev_length){for(ae=q.strstart+q.lookahead-R,Z=s._tr_tally(q,q.strstart-1-q.prev_match,q.prev_length-R),q.lookahead-=q.prev_length-1,q.prev_length-=2;++q.strstart<=ae&&(q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+R-1])&q.hash_mask,pe=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart),--q.prev_length!=0;);if(q.match_available=0,q.match_length=R-1,q.strstart++,Z&&(J(q,!1),q.strm.avail_out===0))return D}else if(q.match_available){if((Z=s._tr_tally(q,0,q.window[q.strstart-1]))&&J(q,!1),q.strstart++,q.lookahead--,q.strm.avail_out===0)return D}else q.match_available=1,q.strstart++,q.lookahead--}return q.match_available&&(Z=s._tr_tally(q,0,q.window[q.strstart-1]),q.match_available=0),q.insert=q.strstart<R-1?q.strstart:R-1,ue===h?(J(q,!0),q.strm.avail_out===0?ee:oe):q.last_lit&&(J(q,!1),q.strm.avail_out===0)?D:Y}function be(q,ue,pe,Z,ae){this.good_length=q,this.max_lazy=ue,this.nice_length=pe,this.max_chain=Z,this.func=ae}function xe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=k,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*j),this.dyn_dtree=new o.Buf16(2*(2*O+1)),this.bl_tree=new o.Buf16(2*(2*S+1)),W(this.dyn_ltree),W(this.dyn_dtree),W(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(P+1),this.heap=new o.Buf16(2*C+1),W(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*C+1),W(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function E(q){var ue;return q&&q.state?(q.total_in=q.total_out=0,q.data_type=b,(ue=q.state).pending=0,ue.pending_out=0,ue.wrap<0&&(ue.wrap=-ue.wrap),ue.status=ue.wrap?L:Q,q.adler=ue.wrap===2?0:1,ue.last_flush=d,s._tr_init(ue),m):X(q,v)}function $(q){var ue=E(q);return ue===m&&(function(pe){pe.window_size=2*pe.w_size,W(pe.head),pe.max_lazy_match=i[pe.level].max_lazy,pe.good_match=i[pe.level].good_length,pe.nice_match=i[pe.level].nice_length,pe.max_chain_length=i[pe.level].max_chain,pe.strstart=0,pe.block_start=0,pe.lookahead=0,pe.insert=0,pe.match_length=pe.prev_length=R-1,pe.match_available=0,pe.ins_h=0})(q.state),ue}function re(q,ue,pe,Z,ae,ce){if(!q)return v;var ve=1;if(ue===f&&(ue=6),Z<0?(ve=0,Z=-Z):15<Z&&(ve=2,Z-=16),ae<1||w<ae||pe!==k||Z<8||15<Z||ue<0||9<ue||ce<0||y<ce)return X(q,v);Z===8&&(Z=9);var ge=new xe;return(q.state=ge).strm=q,ge.wrap=ve,ge.gzhead=null,ge.w_bits=Z,ge.w_size=1<<ge.w_bits,ge.w_mask=ge.w_size-1,ge.hash_bits=ae+7,ge.hash_size=1<<ge.hash_bits,ge.hash_mask=ge.hash_size-1,ge.hash_shift=~~((ge.hash_bits+R-1)/R),ge.window=new o.Buf8(2*ge.w_size),ge.head=new o.Buf16(ge.hash_size),ge.prev=new o.Buf16(ge.w_size),ge.lit_bufsize=1<<ae+6,ge.pending_buf_size=4*ge.lit_bufsize,ge.pending_buf=new o.Buf8(ge.pending_buf_size),ge.d_buf=1*ge.lit_bufsize,ge.l_buf=3*ge.lit_bufsize,ge.level=ue,ge.strategy=ce,ge.method=pe,$(q)}i=[new be(0,0,0,0,function(q,ue){var pe=65535;for(pe>q.pending_buf_size-5&&(pe=q.pending_buf_size-5);;){if(q.lookahead<=1){if(F(q),q.lookahead===0&&ue===d)return D;if(q.lookahead===0)break}q.strstart+=q.lookahead,q.lookahead=0;var Z=q.block_start+pe;if((q.strstart===0||q.strstart>=Z)&&(q.lookahead=q.strstart-Z,q.strstart=Z,J(q,!1),q.strm.avail_out===0)||q.strstart-q.block_start>=q.w_size-K&&(J(q,!1),q.strm.avail_out===0))return D}return q.insert=0,ue===h?(J(q,!0),q.strm.avail_out===0?ee:oe):(q.strstart>q.block_start&&(J(q,!1),q.strm.avail_out),D)}),new be(4,4,8,4,ne),new be(4,5,16,8,ne),new be(4,6,32,32,ne),new be(4,4,16,16,se),new be(8,16,32,32,se),new be(8,16,128,128,se),new be(8,32,128,256,se),new be(32,128,258,1024,se),new be(32,258,258,4096,se)],n.deflateInit=function(q,ue){return re(q,ue,k,15,8,0)},n.deflateInit2=re,n.deflateReset=$,n.deflateResetKeep=E,n.deflateSetHeader=function(q,ue){return q&&q.state?q.state.wrap!==2?v:(q.state.gzhead=ue,m):v},n.deflate=function(q,ue){var pe,Z,ae,ce;if(!q||!q.state||5<ue||ue<0)return q?X(q,v):v;if(Z=q.state,!q.output||!q.input&&q.avail_in!==0||Z.status===666&&ue!==h)return X(q,q.avail_out===0?-5:v);if(Z.strm=q,pe=Z.last_flush,Z.last_flush=ue,Z.status===L)if(Z.wrap===2)q.adler=0,G(Z,31),G(Z,139),G(Z,8),Z.gzhead?(G(Z,(Z.gzhead.text?1:0)+(Z.gzhead.hcrc?2:0)+(Z.gzhead.extra?4:0)+(Z.gzhead.name?8:0)+(Z.gzhead.comment?16:0)),G(Z,255&Z.gzhead.time),G(Z,Z.gzhead.time>>8&255),G(Z,Z.gzhead.time>>16&255),G(Z,Z.gzhead.time>>24&255),G(Z,Z.level===9?2:2<=Z.strategy||Z.level<2?4:0),G(Z,255&Z.gzhead.os),Z.gzhead.extra&&Z.gzhead.extra.length&&(G(Z,255&Z.gzhead.extra.length),G(Z,Z.gzhead.extra.length>>8&255)),Z.gzhead.hcrc&&(q.adler=c(q.adler,Z.pending_buf,Z.pending,0)),Z.gzindex=0,Z.status=69):(G(Z,0),G(Z,0),G(Z,0),G(Z,0),G(Z,0),G(Z,Z.level===9?2:2<=Z.strategy||Z.level<2?4:0),G(Z,3),Z.status=Q);else{var ve=k+(Z.w_bits-8<<4)<<8;ve|=(2<=Z.strategy||Z.level<2?0:Z.level<6?1:Z.level===6?2:3)<<6,Z.strstart!==0&&(ve|=32),ve+=31-ve%31,Z.status=Q,B(Z,ve),Z.strstart!==0&&(B(Z,q.adler>>>16),B(Z,65535&q.adler)),q.adler=1}if(Z.status===69)if(Z.gzhead.extra){for(ae=Z.pending;Z.gzindex<(65535&Z.gzhead.extra.length)&&(Z.pending!==Z.pending_buf_size||(Z.gzhead.hcrc&&Z.pending>ae&&(q.adler=c(q.adler,Z.pending_buf,Z.pending-ae,ae)),I(q),ae=Z.pending,Z.pending!==Z.pending_buf_size));)G(Z,255&Z.gzhead.extra[Z.gzindex]),Z.gzindex++;Z.gzhead.hcrc&&Z.pending>ae&&(q.adler=c(q.adler,Z.pending_buf,Z.pending-ae,ae)),Z.gzindex===Z.gzhead.extra.length&&(Z.gzindex=0,Z.status=73)}else Z.status=73;if(Z.status===73)if(Z.gzhead.name){ae=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>ae&&(q.adler=c(q.adler,Z.pending_buf,Z.pending-ae,ae)),I(q),ae=Z.pending,Z.pending===Z.pending_buf_size)){ce=1;break}ce=Z.gzindex<Z.gzhead.name.length?255&Z.gzhead.name.charCodeAt(Z.gzindex++):0,G(Z,ce)}while(ce!==0);Z.gzhead.hcrc&&Z.pending>ae&&(q.adler=c(q.adler,Z.pending_buf,Z.pending-ae,ae)),ce===0&&(Z.gzindex=0,Z.status=91)}else Z.status=91;if(Z.status===91)if(Z.gzhead.comment){ae=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>ae&&(q.adler=c(q.adler,Z.pending_buf,Z.pending-ae,ae)),I(q),ae=Z.pending,Z.pending===Z.pending_buf_size)){ce=1;break}ce=Z.gzindex<Z.gzhead.comment.length?255&Z.gzhead.comment.charCodeAt(Z.gzindex++):0,G(Z,ce)}while(ce!==0);Z.gzhead.hcrc&&Z.pending>ae&&(q.adler=c(q.adler,Z.pending_buf,Z.pending-ae,ae)),ce===0&&(Z.status=103)}else Z.status=103;if(Z.status===103&&(Z.gzhead.hcrc?(Z.pending+2>Z.pending_buf_size&&I(q),Z.pending+2<=Z.pending_buf_size&&(G(Z,255&q.adler),G(Z,q.adler>>8&255),q.adler=0,Z.status=Q)):Z.status=Q),Z.pending!==0){if(I(q),q.avail_out===0)return Z.last_flush=-1,m}else if(q.avail_in===0&&de(ue)<=de(pe)&&ue!==h)return X(q,-5);if(Z.status===666&&q.avail_in!==0)return X(q,-5);if(q.avail_in!==0||Z.lookahead!==0||ue!==d&&Z.status!==666){var ge=Z.strategy===2?(function(fe,ye){for(var Se;;){if(fe.lookahead===0&&(F(fe),fe.lookahead===0)){if(ye===d)return D;break}if(fe.match_length=0,Se=s._tr_tally(fe,0,fe.window[fe.strstart]),fe.lookahead--,fe.strstart++,Se&&(J(fe,!1),fe.strm.avail_out===0))return D}return fe.insert=0,ye===h?(J(fe,!0),fe.strm.avail_out===0?ee:oe):fe.last_lit&&(J(fe,!1),fe.strm.avail_out===0)?D:Y})(Z,ue):Z.strategy===3?(function(fe,ye){for(var Se,Me,tt,M,te=fe.window;;){if(fe.lookahead<=_){if(F(fe),fe.lookahead<=_&&ye===d)return D;if(fe.lookahead===0)break}if(fe.match_length=0,fe.lookahead>=R&&0<fe.strstart&&(Me=te[tt=fe.strstart-1])===te[++tt]&&Me===te[++tt]&&Me===te[++tt]){M=fe.strstart+_;do;while(Me===te[++tt]&&Me===te[++tt]&&Me===te[++tt]&&Me===te[++tt]&&Me===te[++tt]&&Me===te[++tt]&&Me===te[++tt]&&Me===te[++tt]&&tt<M);fe.match_length=_-(M-tt),fe.match_length>fe.lookahead&&(fe.match_length=fe.lookahead)}if(fe.match_length>=R?(Se=s._tr_tally(fe,1,fe.match_length-R),fe.lookahead-=fe.match_length,fe.strstart+=fe.match_length,fe.match_length=0):(Se=s._tr_tally(fe,0,fe.window[fe.strstart]),fe.lookahead--,fe.strstart++),Se&&(J(fe,!1),fe.strm.avail_out===0))return D}return fe.insert=0,ye===h?(J(fe,!0),fe.strm.avail_out===0?ee:oe):fe.last_lit&&(J(fe,!1),fe.strm.avail_out===0)?D:Y})(Z,ue):i[Z.level].func(Z,ue);if(ge!==ee&&ge!==oe||(Z.status=666),ge===D||ge===ee)return q.avail_out===0&&(Z.last_flush=-1),m;if(ge===Y&&(ue===1?s._tr_align(Z):ue!==5&&(s._tr_stored_block(Z,0,0,!1),ue===3&&(W(Z.head),Z.lookahead===0&&(Z.strstart=0,Z.block_start=0,Z.insert=0))),I(q),q.avail_out===0))return Z.last_flush=-1,m}return ue!==h?m:Z.wrap<=0?1:(Z.wrap===2?(G(Z,255&q.adler),G(Z,q.adler>>8&255),G(Z,q.adler>>16&255),G(Z,q.adler>>24&255),G(Z,255&q.total_in),G(Z,q.total_in>>8&255),G(Z,q.total_in>>16&255),G(Z,q.total_in>>24&255)):(B(Z,q.adler>>>16),B(Z,65535&q.adler)),I(q),0<Z.wrap&&(Z.wrap=-Z.wrap),Z.pending!==0?m:1)},n.deflateEnd=function(q){var ue;return q&&q.state?(ue=q.state.status)!==L&&ue!==69&&ue!==73&&ue!==91&&ue!==103&&ue!==Q&&ue!==666?X(q,v):(q.state=null,ue===Q?X(q,-3):m):v},n.deflateSetDictionary=function(q,ue){var pe,Z,ae,ce,ve,ge,fe,ye,Se=ue.length;if(!q||!q.state||(ce=(pe=q.state).wrap)===2||ce===1&&pe.status!==L||pe.lookahead)return v;for(ce===1&&(q.adler=l(q.adler,ue,Se,0)),pe.wrap=0,Se>=pe.w_size&&(ce===0&&(W(pe.head),pe.strstart=0,pe.block_start=0,pe.insert=0),ye=new o.Buf8(pe.w_size),o.arraySet(ye,ue,Se-pe.w_size,pe.w_size,0),ue=ye,Se=pe.w_size),ve=q.avail_in,ge=q.next_in,fe=q.input,q.avail_in=Se,q.next_in=0,q.input=ue,F(pe);pe.lookahead>=R;){for(Z=pe.strstart,ae=pe.lookahead-(R-1);pe.ins_h=(pe.ins_h<<pe.hash_shift^pe.window[Z+R-1])&pe.hash_mask,pe.prev[Z&pe.w_mask]=pe.head[pe.ins_h],pe.head[pe.ins_h]=Z,Z++,--ae;);pe.strstart=Z,pe.lookahead=R-1,F(pe)}return pe.strstart+=pe.lookahead,pe.block_start=pe.strstart,pe.insert=pe.lookahead,pe.lookahead=0,pe.match_length=pe.prev_length=R-1,pe.match_available=0,q.next_in=ge,q.input=fe,q.avail_in=ve,pe.wrap=ce,m},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(a,r,n){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(a,r,n){r.exports=function(i,o){var s,l,c,u,d,h,m,v,f,y,b,k,w,C,O,S,j,P,R,_,K,L,Q,D,Y;s=i.state,l=i.next_in,D=i.input,c=l+(i.avail_in-5),u=i.next_out,Y=i.output,d=u-(o-i.avail_out),h=u+(i.avail_out-257),m=s.dmax,v=s.wsize,f=s.whave,y=s.wnext,b=s.window,k=s.hold,w=s.bits,C=s.lencode,O=s.distcode,S=(1<<s.lenbits)-1,j=(1<<s.distbits)-1;e:do{w<15&&(k+=D[l++]<<w,w+=8,k+=D[l++]<<w,w+=8),P=C[k&S];t:for(;;){if(k>>>=R=P>>>24,w-=R,(R=P>>>16&255)===0)Y[u++]=65535&P;else{if(!(16&R)){if((64&R)==0){P=C[(65535&P)+(k&(1<<R)-1)];continue t}if(32&R){s.mode=12;break e}i.msg="invalid literal/length code",s.mode=30;break e}_=65535&P,(R&=15)&&(w<R&&(k+=D[l++]<<w,w+=8),_+=k&(1<<R)-1,k>>>=R,w-=R),w<15&&(k+=D[l++]<<w,w+=8,k+=D[l++]<<w,w+=8),P=O[k&j];a:for(;;){if(k>>>=R=P>>>24,w-=R,!(16&(R=P>>>16&255))){if((64&R)==0){P=O[(65535&P)+(k&(1<<R)-1)];continue a}i.msg="invalid distance code",s.mode=30;break e}if(K=65535&P,w<(R&=15)&&(k+=D[l++]<<w,(w+=8)<R&&(k+=D[l++]<<w,w+=8)),m<(K+=k&(1<<R)-1)){i.msg="invalid distance too far back",s.mode=30;break e}if(k>>>=R,w-=R,(R=u-d)<K){if(f<(R=K-R)&&s.sane){i.msg="invalid distance too far back",s.mode=30;break e}if(Q=b,(L=0)===y){if(L+=v-R,R<_){for(_-=R;Y[u++]=b[L++],--R;);L=u-K,Q=Y}}else if(y<R){if(L+=v+y-R,(R-=y)<_){for(_-=R;Y[u++]=b[L++],--R;);if(L=0,y<_){for(_-=R=y;Y[u++]=b[L++],--R;);L=u-K,Q=Y}}}else if(L+=y-R,R<_){for(_-=R;Y[u++]=b[L++],--R;);L=u-K,Q=Y}for(;2<_;)Y[u++]=Q[L++],Y[u++]=Q[L++],Y[u++]=Q[L++],_-=3;_&&(Y[u++]=Q[L++],1<_&&(Y[u++]=Q[L++]))}else{for(L=u-K;Y[u++]=Y[L++],Y[u++]=Y[L++],Y[u++]=Y[L++],2<(_-=3););_&&(Y[u++]=Y[L++],1<_&&(Y[u++]=Y[L++]))}break}}break}}while(l<c&&u<h);l-=_=w>>3,k&=(1<<(w-=_<<3))-1,i.next_in=l,i.next_out=u,i.avail_in=l<c?c-l+5:5-(l-c),i.avail_out=u<h?h-u+257:257-(u-h),s.hold=k,s.bits=w}},{}],49:[function(a,r,n){var i=a("../utils/common"),o=a("./adler32"),s=a("./crc32"),l=a("./inffast"),c=a("./inftrees"),u=1,d=2,h=0,m=-2,v=1,f=852,y=592;function b(L){return(L>>>24&255)+(L>>>8&65280)+((65280&L)<<8)+((255&L)<<24)}function k(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(L){var Q;return L&&L.state?(Q=L.state,L.total_in=L.total_out=Q.total=0,L.msg="",Q.wrap&&(L.adler=1&Q.wrap),Q.mode=v,Q.last=0,Q.havedict=0,Q.dmax=32768,Q.head=null,Q.hold=0,Q.bits=0,Q.lencode=Q.lendyn=new i.Buf32(f),Q.distcode=Q.distdyn=new i.Buf32(y),Q.sane=1,Q.back=-1,h):m}function C(L){var Q;return L&&L.state?((Q=L.state).wsize=0,Q.whave=0,Q.wnext=0,w(L)):m}function O(L,Q){var D,Y;return L&&L.state?(Y=L.state,Q<0?(D=0,Q=-Q):(D=1+(Q>>4),Q<48&&(Q&=15)),Q&&(Q<8||15<Q)?m:(Y.window!==null&&Y.wbits!==Q&&(Y.window=null),Y.wrap=D,Y.wbits=Q,C(L))):m}function S(L,Q){var D,Y;return L?(Y=new k,(L.state=Y).window=null,(D=O(L,Q))!==h&&(L.state=null),D):m}var j,P,R=!0;function _(L){if(R){var Q;for(j=new i.Buf32(512),P=new i.Buf32(32),Q=0;Q<144;)L.lens[Q++]=8;for(;Q<256;)L.lens[Q++]=9;for(;Q<280;)L.lens[Q++]=7;for(;Q<288;)L.lens[Q++]=8;for(c(u,L.lens,0,288,j,0,L.work,{bits:9}),Q=0;Q<32;)L.lens[Q++]=5;c(d,L.lens,0,32,P,0,L.work,{bits:5}),R=!1}L.lencode=j,L.lenbits=9,L.distcode=P,L.distbits=5}function K(L,Q,D,Y){var ee,oe=L.state;return oe.window===null&&(oe.wsize=1<<oe.wbits,oe.wnext=0,oe.whave=0,oe.window=new i.Buf8(oe.wsize)),Y>=oe.wsize?(i.arraySet(oe.window,Q,D-oe.wsize,oe.wsize,0),oe.wnext=0,oe.whave=oe.wsize):(Y<(ee=oe.wsize-oe.wnext)&&(ee=Y),i.arraySet(oe.window,Q,D-Y,ee,oe.wnext),(Y-=ee)?(i.arraySet(oe.window,Q,D-Y,Y,0),oe.wnext=Y,oe.whave=oe.wsize):(oe.wnext+=ee,oe.wnext===oe.wsize&&(oe.wnext=0),oe.whave<oe.wsize&&(oe.whave+=ee))),0}n.inflateReset=C,n.inflateReset2=O,n.inflateResetKeep=w,n.inflateInit=function(L){return S(L,15)},n.inflateInit2=S,n.inflate=function(L,Q){var D,Y,ee,oe,X,de,W,I,J,G,B,N,F,ne,se,be,xe,E,$,re,q,ue,pe,Z,ae=0,ce=new i.Buf8(4),ve=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!L||!L.state||!L.output||!L.input&&L.avail_in!==0)return m;(D=L.state).mode===12&&(D.mode=13),X=L.next_out,ee=L.output,W=L.avail_out,oe=L.next_in,Y=L.input,de=L.avail_in,I=D.hold,J=D.bits,G=de,B=W,ue=h;e:for(;;)switch(D.mode){case v:if(D.wrap===0){D.mode=13;break}for(;J<16;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}if(2&D.wrap&&I===35615){ce[D.check=0]=255&I,ce[1]=I>>>8&255,D.check=s(D.check,ce,2,0),J=I=0,D.mode=2;break}if(D.flags=0,D.head&&(D.head.done=!1),!(1&D.wrap)||(((255&I)<<8)+(I>>8))%31){L.msg="incorrect header check",D.mode=30;break}if((15&I)!=8){L.msg="unknown compression method",D.mode=30;break}if(J-=4,q=8+(15&(I>>>=4)),D.wbits===0)D.wbits=q;else if(q>D.wbits){L.msg="invalid window size",D.mode=30;break}D.dmax=1<<q,L.adler=D.check=1,D.mode=512&I?10:12,J=I=0;break;case 2:for(;J<16;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}if(D.flags=I,(255&D.flags)!=8){L.msg="unknown compression method",D.mode=30;break}if(57344&D.flags){L.msg="unknown header flags set",D.mode=30;break}D.head&&(D.head.text=I>>8&1),512&D.flags&&(ce[0]=255&I,ce[1]=I>>>8&255,D.check=s(D.check,ce,2,0)),J=I=0,D.mode=3;case 3:for(;J<32;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}D.head&&(D.head.time=I),512&D.flags&&(ce[0]=255&I,ce[1]=I>>>8&255,ce[2]=I>>>16&255,ce[3]=I>>>24&255,D.check=s(D.check,ce,4,0)),J=I=0,D.mode=4;case 4:for(;J<16;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}D.head&&(D.head.xflags=255&I,D.head.os=I>>8),512&D.flags&&(ce[0]=255&I,ce[1]=I>>>8&255,D.check=s(D.check,ce,2,0)),J=I=0,D.mode=5;case 5:if(1024&D.flags){for(;J<16;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}D.length=I,D.head&&(D.head.extra_len=I),512&D.flags&&(ce[0]=255&I,ce[1]=I>>>8&255,D.check=s(D.check,ce,2,0)),J=I=0}else D.head&&(D.head.extra=null);D.mode=6;case 6:if(1024&D.flags&&(de<(N=D.length)&&(N=de),N&&(D.head&&(q=D.head.extra_len-D.length,D.head.extra||(D.head.extra=new Array(D.head.extra_len)),i.arraySet(D.head.extra,Y,oe,N,q)),512&D.flags&&(D.check=s(D.check,Y,N,oe)),de-=N,oe+=N,D.length-=N),D.length))break e;D.length=0,D.mode=7;case 7:if(2048&D.flags){if(de===0)break e;for(N=0;q=Y[oe+N++],D.head&&q&&D.length<65536&&(D.head.name+=String.fromCharCode(q)),q&&N<de;);if(512&D.flags&&(D.check=s(D.check,Y,N,oe)),de-=N,oe+=N,q)break e}else D.head&&(D.head.name=null);D.length=0,D.mode=8;case 8:if(4096&D.flags){if(de===0)break e;for(N=0;q=Y[oe+N++],D.head&&q&&D.length<65536&&(D.head.comment+=String.fromCharCode(q)),q&&N<de;);if(512&D.flags&&(D.check=s(D.check,Y,N,oe)),de-=N,oe+=N,q)break e}else D.head&&(D.head.comment=null);D.mode=9;case 9:if(512&D.flags){for(;J<16;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}if(I!==(65535&D.check)){L.msg="header crc mismatch",D.mode=30;break}J=I=0}D.head&&(D.head.hcrc=D.flags>>9&1,D.head.done=!0),L.adler=D.check=0,D.mode=12;break;case 10:for(;J<32;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}L.adler=D.check=b(I),J=I=0,D.mode=11;case 11:if(D.havedict===0)return L.next_out=X,L.avail_out=W,L.next_in=oe,L.avail_in=de,D.hold=I,D.bits=J,2;L.adler=D.check=1,D.mode=12;case 12:if(Q===5||Q===6)break e;case 13:if(D.last){I>>>=7&J,J-=7&J,D.mode=27;break}for(;J<3;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}switch(D.last=1&I,J-=1,3&(I>>>=1)){case 0:D.mode=14;break;case 1:if(_(D),D.mode=20,Q!==6)break;I>>>=2,J-=2;break e;case 2:D.mode=17;break;case 3:L.msg="invalid block type",D.mode=30}I>>>=2,J-=2;break;case 14:for(I>>>=7&J,J-=7&J;J<32;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}if((65535&I)!=(I>>>16^65535)){L.msg="invalid stored block lengths",D.mode=30;break}if(D.length=65535&I,J=I=0,D.mode=15,Q===6)break e;case 15:D.mode=16;case 16:if(N=D.length){if(de<N&&(N=de),W<N&&(N=W),N===0)break e;i.arraySet(ee,Y,oe,N,X),de-=N,oe+=N,W-=N,X+=N,D.length-=N;break}D.mode=12;break;case 17:for(;J<14;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}if(D.nlen=257+(31&I),I>>>=5,J-=5,D.ndist=1+(31&I),I>>>=5,J-=5,D.ncode=4+(15&I),I>>>=4,J-=4,286<D.nlen||30<D.ndist){L.msg="too many length or distance symbols",D.mode=30;break}D.have=0,D.mode=18;case 18:for(;D.have<D.ncode;){for(;J<3;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}D.lens[ve[D.have++]]=7&I,I>>>=3,J-=3}for(;D.have<19;)D.lens[ve[D.have++]]=0;if(D.lencode=D.lendyn,D.lenbits=7,pe={bits:D.lenbits},ue=c(0,D.lens,0,19,D.lencode,0,D.work,pe),D.lenbits=pe.bits,ue){L.msg="invalid code lengths set",D.mode=30;break}D.have=0,D.mode=19;case 19:for(;D.have<D.nlen+D.ndist;){for(;be=(ae=D.lencode[I&(1<<D.lenbits)-1])>>>16&255,xe=65535&ae,!((se=ae>>>24)<=J);){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}if(xe<16)I>>>=se,J-=se,D.lens[D.have++]=xe;else{if(xe===16){for(Z=se+2;J<Z;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}if(I>>>=se,J-=se,D.have===0){L.msg="invalid bit length repeat",D.mode=30;break}q=D.lens[D.have-1],N=3+(3&I),I>>>=2,J-=2}else if(xe===17){for(Z=se+3;J<Z;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}J-=se,q=0,N=3+(7&(I>>>=se)),I>>>=3,J-=3}else{for(Z=se+7;J<Z;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}J-=se,q=0,N=11+(127&(I>>>=se)),I>>>=7,J-=7}if(D.have+N>D.nlen+D.ndist){L.msg="invalid bit length repeat",D.mode=30;break}for(;N--;)D.lens[D.have++]=q}}if(D.mode===30)break;if(D.lens[256]===0){L.msg="invalid code -- missing end-of-block",D.mode=30;break}if(D.lenbits=9,pe={bits:D.lenbits},ue=c(u,D.lens,0,D.nlen,D.lencode,0,D.work,pe),D.lenbits=pe.bits,ue){L.msg="invalid literal/lengths set",D.mode=30;break}if(D.distbits=6,D.distcode=D.distdyn,pe={bits:D.distbits},ue=c(d,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,pe),D.distbits=pe.bits,ue){L.msg="invalid distances set",D.mode=30;break}if(D.mode=20,Q===6)break e;case 20:D.mode=21;case 21:if(6<=de&&258<=W){L.next_out=X,L.avail_out=W,L.next_in=oe,L.avail_in=de,D.hold=I,D.bits=J,l(L,B),X=L.next_out,ee=L.output,W=L.avail_out,oe=L.next_in,Y=L.input,de=L.avail_in,I=D.hold,J=D.bits,D.mode===12&&(D.back=-1);break}for(D.back=0;be=(ae=D.lencode[I&(1<<D.lenbits)-1])>>>16&255,xe=65535&ae,!((se=ae>>>24)<=J);){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}if(be&&(240&be)==0){for(E=se,$=be,re=xe;be=(ae=D.lencode[re+((I&(1<<E+$)-1)>>E)])>>>16&255,xe=65535&ae,!(E+(se=ae>>>24)<=J);){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}I>>>=E,J-=E,D.back+=E}if(I>>>=se,J-=se,D.back+=se,D.length=xe,be===0){D.mode=26;break}if(32&be){D.back=-1,D.mode=12;break}if(64&be){L.msg="invalid literal/length code",D.mode=30;break}D.extra=15&be,D.mode=22;case 22:if(D.extra){for(Z=D.extra;J<Z;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}D.length+=I&(1<<D.extra)-1,I>>>=D.extra,J-=D.extra,D.back+=D.extra}D.was=D.length,D.mode=23;case 23:for(;be=(ae=D.distcode[I&(1<<D.distbits)-1])>>>16&255,xe=65535&ae,!((se=ae>>>24)<=J);){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}if((240&be)==0){for(E=se,$=be,re=xe;be=(ae=D.distcode[re+((I&(1<<E+$)-1)>>E)])>>>16&255,xe=65535&ae,!(E+(se=ae>>>24)<=J);){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}I>>>=E,J-=E,D.back+=E}if(I>>>=se,J-=se,D.back+=se,64&be){L.msg="invalid distance code",D.mode=30;break}D.offset=xe,D.extra=15&be,D.mode=24;case 24:if(D.extra){for(Z=D.extra;J<Z;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}D.offset+=I&(1<<D.extra)-1,I>>>=D.extra,J-=D.extra,D.back+=D.extra}if(D.offset>D.dmax){L.msg="invalid distance too far back",D.mode=30;break}D.mode=25;case 25:if(W===0)break e;if(N=B-W,D.offset>N){if((N=D.offset-N)>D.whave&&D.sane){L.msg="invalid distance too far back",D.mode=30;break}F=N>D.wnext?(N-=D.wnext,D.wsize-N):D.wnext-N,N>D.length&&(N=D.length),ne=D.window}else ne=ee,F=X-D.offset,N=D.length;for(W<N&&(N=W),W-=N,D.length-=N;ee[X++]=ne[F++],--N;);D.length===0&&(D.mode=21);break;case 26:if(W===0)break e;ee[X++]=D.length,W--,D.mode=21;break;case 27:if(D.wrap){for(;J<32;){if(de===0)break e;de--,I|=Y[oe++]<<J,J+=8}if(B-=W,L.total_out+=B,D.total+=B,B&&(L.adler=D.check=D.flags?s(D.check,ee,B,X-B):o(D.check,ee,B,X-B)),B=W,(D.flags?I:b(I))!==D.check){L.msg="incorrect data check",D.mode=30;break}J=I=0}D.mode=28;case 28:if(D.wrap&&D.flags){for(;J<32;){if(de===0)break e;de--,I+=Y[oe++]<<J,J+=8}if(I!==(4294967295&D.total)){L.msg="incorrect length check",D.mode=30;break}J=I=0}D.mode=29;case 29:ue=1;break e;case 30:ue=-3;break e;case 31:return-4;case 32:default:return m}return L.next_out=X,L.avail_out=W,L.next_in=oe,L.avail_in=de,D.hold=I,D.bits=J,(D.wsize||B!==L.avail_out&&D.mode<30&&(D.mode<27||Q!==4))&&K(L,L.output,L.next_out,B-L.avail_out)?(D.mode=31,-4):(G-=L.avail_in,B-=L.avail_out,L.total_in+=G,L.total_out+=B,D.total+=B,D.wrap&&B&&(L.adler=D.check=D.flags?s(D.check,ee,B,L.next_out-B):o(D.check,ee,B,L.next_out-B)),L.data_type=D.bits+(D.last?64:0)+(D.mode===12?128:0)+(D.mode===20||D.mode===15?256:0),(G==0&&B===0||Q===4)&&ue===h&&(ue=-5),ue)},n.inflateEnd=function(L){if(!L||!L.state)return m;var Q=L.state;return Q.window&&(Q.window=null),L.state=null,h},n.inflateGetHeader=function(L,Q){var D;return L&&L.state?(2&(D=L.state).wrap)==0?m:((D.head=Q).done=!1,h):m},n.inflateSetDictionary=function(L,Q){var D,Y=Q.length;return L&&L.state?(D=L.state).wrap!==0&&D.mode!==11?m:D.mode===11&&o(1,Q,Y,0)!==D.check?-3:K(L,Q,Y,Y)?(D.mode=31,-4):(D.havedict=1,h):m},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(a,r,n){var i=a("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(u,d,h,m,v,f,y,b){var k,w,C,O,S,j,P,R,_,K=b.bits,L=0,Q=0,D=0,Y=0,ee=0,oe=0,X=0,de=0,W=0,I=0,J=null,G=0,B=new i.Buf16(16),N=new i.Buf16(16),F=null,ne=0;for(L=0;L<=15;L++)B[L]=0;for(Q=0;Q<m;Q++)B[d[h+Q]]++;for(ee=K,Y=15;1<=Y&&B[Y]===0;Y--);if(Y<ee&&(ee=Y),Y===0)return v[f++]=20971520,v[f++]=20971520,b.bits=1,0;for(D=1;D<Y&&B[D]===0;D++);for(ee<D&&(ee=D),L=de=1;L<=15;L++)if(de<<=1,(de-=B[L])<0)return-1;if(0<de&&(u===0||Y!==1))return-1;for(N[1]=0,L=1;L<15;L++)N[L+1]=N[L]+B[L];for(Q=0;Q<m;Q++)d[h+Q]!==0&&(y[N[d[h+Q]]++]=Q);if(j=u===0?(J=F=y,19):u===1?(J=o,G-=257,F=s,ne-=257,256):(J=l,F=c,-1),L=D,S=f,X=Q=I=0,C=-1,O=(W=1<<(oe=ee))-1,u===1&&852<W||u===2&&592<W)return 1;for(;;){for(P=L-X,_=y[Q]<j?(R=0,y[Q]):y[Q]>j?(R=F[ne+y[Q]],J[G+y[Q]]):(R=96,0),k=1<<L-X,D=w=1<<oe;v[S+(I>>X)+(w-=k)]=P<<24|R<<16|_|0,w!==0;);for(k=1<<L-1;I&k;)k>>=1;if(k!==0?(I&=k-1,I+=k):I=0,Q++,--B[L]==0){if(L===Y)break;L=d[h+y[Q]]}if(ee<L&&(I&O)!==C){for(X===0&&(X=ee),S+=D,de=1<<(oe=L-X);oe+X<Y&&!((de-=B[oe+X])<=0);)oe++,de<<=1;if(W+=1<<oe,u===1&&852<W||u===2&&592<W)return 1;v[C=I&O]=ee<<24|oe<<16|S-f|0}}return I!==0&&(v[S+I]=L-X<<24|64<<16|0),b.bits=ee,0}},{"../utils/common":41}],51:[function(a,r,n){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(a,r,n){var i=a("../utils/common"),o=0,s=1;function l(ae){for(var ce=ae.length;0<=--ce;)ae[ce]=0}var c=0,u=29,d=256,h=d+1+u,m=30,v=19,f=2*h+1,y=15,b=16,k=7,w=256,C=16,O=17,S=18,j=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],P=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],R=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],_=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],K=new Array(2*(h+2));l(K);var L=new Array(2*m);l(L);var Q=new Array(512);l(Q);var D=new Array(256);l(D);var Y=new Array(u);l(Y);var ee,oe,X,de=new Array(m);function W(ae,ce,ve,ge,fe){this.static_tree=ae,this.extra_bits=ce,this.extra_base=ve,this.elems=ge,this.max_length=fe,this.has_stree=ae&&ae.length}function I(ae,ce){this.dyn_tree=ae,this.max_code=0,this.stat_desc=ce}function J(ae){return ae<256?Q[ae]:Q[256+(ae>>>7)]}function G(ae,ce){ae.pending_buf[ae.pending++]=255&ce,ae.pending_buf[ae.pending++]=ce>>>8&255}function B(ae,ce,ve){ae.bi_valid>b-ve?(ae.bi_buf|=ce<<ae.bi_valid&65535,G(ae,ae.bi_buf),ae.bi_buf=ce>>b-ae.bi_valid,ae.bi_valid+=ve-b):(ae.bi_buf|=ce<<ae.bi_valid&65535,ae.bi_valid+=ve)}function N(ae,ce,ve){B(ae,ve[2*ce],ve[2*ce+1])}function F(ae,ce){for(var ve=0;ve|=1&ae,ae>>>=1,ve<<=1,0<--ce;);return ve>>>1}function ne(ae,ce,ve){var ge,fe,ye=new Array(y+1),Se=0;for(ge=1;ge<=y;ge++)ye[ge]=Se=Se+ve[ge-1]<<1;for(fe=0;fe<=ce;fe++){var Me=ae[2*fe+1];Me!==0&&(ae[2*fe]=F(ye[Me]++,Me))}}function se(ae){var ce;for(ce=0;ce<h;ce++)ae.dyn_ltree[2*ce]=0;for(ce=0;ce<m;ce++)ae.dyn_dtree[2*ce]=0;for(ce=0;ce<v;ce++)ae.bl_tree[2*ce]=0;ae.dyn_ltree[2*w]=1,ae.opt_len=ae.static_len=0,ae.last_lit=ae.matches=0}function be(ae){8<ae.bi_valid?G(ae,ae.bi_buf):0<ae.bi_valid&&(ae.pending_buf[ae.pending++]=ae.bi_buf),ae.bi_buf=0,ae.bi_valid=0}function xe(ae,ce,ve,ge){var fe=2*ce,ye=2*ve;return ae[fe]<ae[ye]||ae[fe]===ae[ye]&&ge[ce]<=ge[ve]}function E(ae,ce,ve){for(var ge=ae.heap[ve],fe=ve<<1;fe<=ae.heap_len&&(fe<ae.heap_len&&xe(ce,ae.heap[fe+1],ae.heap[fe],ae.depth)&&fe++,!xe(ce,ge,ae.heap[fe],ae.depth));)ae.heap[ve]=ae.heap[fe],ve=fe,fe<<=1;ae.heap[ve]=ge}function $(ae,ce,ve){var ge,fe,ye,Se,Me=0;if(ae.last_lit!==0)for(;ge=ae.pending_buf[ae.d_buf+2*Me]<<8|ae.pending_buf[ae.d_buf+2*Me+1],fe=ae.pending_buf[ae.l_buf+Me],Me++,ge===0?N(ae,fe,ce):(N(ae,(ye=D[fe])+d+1,ce),(Se=j[ye])!==0&&B(ae,fe-=Y[ye],Se),N(ae,ye=J(--ge),ve),(Se=P[ye])!==0&&B(ae,ge-=de[ye],Se)),Me<ae.last_lit;);N(ae,w,ce)}function re(ae,ce){var ve,ge,fe,ye=ce.dyn_tree,Se=ce.stat_desc.static_tree,Me=ce.stat_desc.has_stree,tt=ce.stat_desc.elems,M=-1;for(ae.heap_len=0,ae.heap_max=f,ve=0;ve<tt;ve++)ye[2*ve]!==0?(ae.heap[++ae.heap_len]=M=ve,ae.depth[ve]=0):ye[2*ve+1]=0;for(;ae.heap_len<2;)ye[2*(fe=ae.heap[++ae.heap_len]=M<2?++M:0)]=1,ae.depth[fe]=0,ae.opt_len--,Me&&(ae.static_len-=Se[2*fe+1]);for(ce.max_code=M,ve=ae.heap_len>>1;1<=ve;ve--)E(ae,ye,ve);for(fe=tt;ve=ae.heap[1],ae.heap[1]=ae.heap[ae.heap_len--],E(ae,ye,1),ge=ae.heap[1],ae.heap[--ae.heap_max]=ve,ae.heap[--ae.heap_max]=ge,ye[2*fe]=ye[2*ve]+ye[2*ge],ae.depth[fe]=(ae.depth[ve]>=ae.depth[ge]?ae.depth[ve]:ae.depth[ge])+1,ye[2*ve+1]=ye[2*ge+1]=fe,ae.heap[1]=fe++,E(ae,ye,1),2<=ae.heap_len;);ae.heap[--ae.heap_max]=ae.heap[1],(function(te,le){var Ce,Te,Ee,De,at,dt,gt=le.dyn_tree,ct=le.max_code,Ot=le.stat_desc.static_tree,ra=le.stat_desc.has_stree,ft=le.stat_desc.extra_bits,Et=le.stat_desc.extra_base,Ft=le.stat_desc.max_length,ha=0;for(De=0;De<=y;De++)te.bl_count[De]=0;for(gt[2*te.heap[te.heap_max]+1]=0,Ce=te.heap_max+1;Ce<f;Ce++)Ft<(De=gt[2*gt[2*(Te=te.heap[Ce])+1]+1]+1)&&(De=Ft,ha++),gt[2*Te+1]=De,ct<Te||(te.bl_count[De]++,at=0,Et<=Te&&(at=ft[Te-Et]),dt=gt[2*Te],te.opt_len+=dt*(De+at),ra&&(te.static_len+=dt*(Ot[2*Te+1]+at)));if(ha!==0){do{for(De=Ft-1;te.bl_count[De]===0;)De--;te.bl_count[De]--,te.bl_count[De+1]+=2,te.bl_count[Ft]--,ha-=2}while(0<ha);for(De=Ft;De!==0;De--)for(Te=te.bl_count[De];Te!==0;)ct<(Ee=te.heap[--Ce])||(gt[2*Ee+1]!==De&&(te.opt_len+=(De-gt[2*Ee+1])*gt[2*Ee],gt[2*Ee+1]=De),Te--)}})(ae,ce),ne(ye,M,ae.bl_count)}function q(ae,ce,ve){var ge,fe,ye=-1,Se=ce[1],Me=0,tt=7,M=4;for(Se===0&&(tt=138,M=3),ce[2*(ve+1)+1]=65535,ge=0;ge<=ve;ge++)fe=Se,Se=ce[2*(ge+1)+1],++Me<tt&&fe===Se||(Me<M?ae.bl_tree[2*fe]+=Me:fe!==0?(fe!==ye&&ae.bl_tree[2*fe]++,ae.bl_tree[2*C]++):Me<=10?ae.bl_tree[2*O]++:ae.bl_tree[2*S]++,ye=fe,M=(Me=0)===Se?(tt=138,3):fe===Se?(tt=6,3):(tt=7,4))}function ue(ae,ce,ve){var ge,fe,ye=-1,Se=ce[1],Me=0,tt=7,M=4;for(Se===0&&(tt=138,M=3),ge=0;ge<=ve;ge++)if(fe=Se,Se=ce[2*(ge+1)+1],!(++Me<tt&&fe===Se)){if(Me<M)for(;N(ae,fe,ae.bl_tree),--Me!=0;);else fe!==0?(fe!==ye&&(N(ae,fe,ae.bl_tree),Me--),N(ae,C,ae.bl_tree),B(ae,Me-3,2)):Me<=10?(N(ae,O,ae.bl_tree),B(ae,Me-3,3)):(N(ae,S,ae.bl_tree),B(ae,Me-11,7));ye=fe,M=(Me=0)===Se?(tt=138,3):fe===Se?(tt=6,3):(tt=7,4)}}l(de);var pe=!1;function Z(ae,ce,ve,ge){B(ae,(c<<1)+(ge?1:0),3),(function(fe,ye,Se,Me){be(fe),G(fe,Se),G(fe,~Se),i.arraySet(fe.pending_buf,fe.window,ye,Se,fe.pending),fe.pending+=Se})(ae,ce,ve)}n._tr_init=function(ae){pe||((function(){var ce,ve,ge,fe,ye,Se=new Array(y+1);for(fe=ge=0;fe<u-1;fe++)for(Y[fe]=ge,ce=0;ce<1<<j[fe];ce++)D[ge++]=fe;for(D[ge-1]=fe,fe=ye=0;fe<16;fe++)for(de[fe]=ye,ce=0;ce<1<<P[fe];ce++)Q[ye++]=fe;for(ye>>=7;fe<m;fe++)for(de[fe]=ye<<7,ce=0;ce<1<<P[fe]-7;ce++)Q[256+ye++]=fe;for(ve=0;ve<=y;ve++)Se[ve]=0;for(ce=0;ce<=143;)K[2*ce+1]=8,ce++,Se[8]++;for(;ce<=255;)K[2*ce+1]=9,ce++,Se[9]++;for(;ce<=279;)K[2*ce+1]=7,ce++,Se[7]++;for(;ce<=287;)K[2*ce+1]=8,ce++,Se[8]++;for(ne(K,h+1,Se),ce=0;ce<m;ce++)L[2*ce+1]=5,L[2*ce]=F(ce,5);ee=new W(K,j,d+1,h,y),oe=new W(L,P,0,m,y),X=new W(new Array(0),R,0,v,k)})(),pe=!0),ae.l_desc=new I(ae.dyn_ltree,ee),ae.d_desc=new I(ae.dyn_dtree,oe),ae.bl_desc=new I(ae.bl_tree,X),ae.bi_buf=0,ae.bi_valid=0,se(ae)},n._tr_stored_block=Z,n._tr_flush_block=function(ae,ce,ve,ge){var fe,ye,Se=0;0<ae.level?(ae.strm.data_type===2&&(ae.strm.data_type=(function(Me){var tt,M=4093624447;for(tt=0;tt<=31;tt++,M>>>=1)if(1&M&&Me.dyn_ltree[2*tt]!==0)return o;if(Me.dyn_ltree[18]!==0||Me.dyn_ltree[20]!==0||Me.dyn_ltree[26]!==0)return s;for(tt=32;tt<d;tt++)if(Me.dyn_ltree[2*tt]!==0)return s;return o})(ae)),re(ae,ae.l_desc),re(ae,ae.d_desc),Se=(function(Me){var tt;for(q(Me,Me.dyn_ltree,Me.l_desc.max_code),q(Me,Me.dyn_dtree,Me.d_desc.max_code),re(Me,Me.bl_desc),tt=v-1;3<=tt&&Me.bl_tree[2*_[tt]+1]===0;tt--);return Me.opt_len+=3*(tt+1)+5+5+4,tt})(ae),fe=ae.opt_len+3+7>>>3,(ye=ae.static_len+3+7>>>3)<=fe&&(fe=ye)):fe=ye=ve+5,ve+4<=fe&&ce!==-1?Z(ae,ce,ve,ge):ae.strategy===4||ye===fe?(B(ae,2+(ge?1:0),3),$(ae,K,L)):(B(ae,4+(ge?1:0),3),(function(Me,tt,M,te){var le;for(B(Me,tt-257,5),B(Me,M-1,5),B(Me,te-4,4),le=0;le<te;le++)B(Me,Me.bl_tree[2*_[le]+1],3);ue(Me,Me.dyn_ltree,tt-1),ue(Me,Me.dyn_dtree,M-1)})(ae,ae.l_desc.max_code+1,ae.d_desc.max_code+1,Se+1),$(ae,ae.dyn_ltree,ae.dyn_dtree)),se(ae),ge&&be(ae)},n._tr_tally=function(ae,ce,ve){return ae.pending_buf[ae.d_buf+2*ae.last_lit]=ce>>>8&255,ae.pending_buf[ae.d_buf+2*ae.last_lit+1]=255&ce,ae.pending_buf[ae.l_buf+ae.last_lit]=255&ve,ae.last_lit++,ce===0?ae.dyn_ltree[2*ve]++:(ae.matches++,ce--,ae.dyn_ltree[2*(D[ve]+d+1)]++,ae.dyn_dtree[2*J(ce)]++),ae.last_lit===ae.lit_bufsize-1},n._tr_align=function(ae){B(ae,2,3),N(ae,w,K),(function(ce){ce.bi_valid===16?(G(ce,ce.bi_buf),ce.bi_buf=0,ce.bi_valid=0):8<=ce.bi_valid&&(ce.pending_buf[ce.pending++]=255&ce.bi_buf,ce.bi_buf>>=8,ce.bi_valid-=8)})(ae)}},{"../utils/common":41}],53:[function(a,r,n){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(a,r,n){(function(i){(function(o,s){if(!o.setImmediate){var l,c,u,d,h=1,m={},v=!1,f=o.document,y=Object.getPrototypeOf&&Object.getPrototypeOf(o);y=y&&y.setTimeout?y:o,l={}.toString.call(o.process)==="[object process]"?function(C){process.nextTick(function(){k(C)})}:(function(){if(o.postMessage&&!o.importScripts){var C=!0,O=o.onmessage;return o.onmessage=function(){C=!1},o.postMessage("","*"),o.onmessage=O,C}})()?(d="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",w,!1):o.attachEvent("onmessage",w),function(C){o.postMessage(d+C,"*")}):o.MessageChannel?((u=new MessageChannel).port1.onmessage=function(C){k(C.data)},function(C){u.port2.postMessage(C)}):f&&"onreadystatechange"in f.createElement("script")?(c=f.documentElement,function(C){var O=f.createElement("script");O.onreadystatechange=function(){k(C),O.onreadystatechange=null,c.removeChild(O),O=null},c.appendChild(O)}):function(C){setTimeout(k,0,C)},y.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var O=new Array(arguments.length-1),S=0;S<O.length;S++)O[S]=arguments[S+1];var j={callback:C,args:O};return m[h]=j,l(h),h++},y.clearImmediate=b}function b(C){delete m[C]}function k(C){if(v)setTimeout(k,0,C);else{var O=m[C];if(O){v=!0;try{(function(S){var j=S.callback,P=S.args;switch(P.length){case 0:j();break;case 1:j(P[0]);break;case 2:j(P[0],P[1]);break;case 3:j(P[0],P[1],P[2]);break;default:j.apply(s,P)}})(O)}finally{b(C),v=!1}}}}function w(C){C.source===o&&typeof C.data=="string"&&C.data.indexOf(d)===0&&k(+C.data.slice(d.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(bie)),bie.exports}var $it=Nit();const Iit=Xr($it),Kit=Object.freeze(Object.defineProperty({__proto__:null,default:Iit},Symbol.toStringTag,{value:"Module"}));function kie({value:e=!1,disabled:t=!1,onChange:a,onFocus:r,stopPropagation:n=!1,className:i}){const o=l=>{t||(n&&l.stopPropagation(),a(!e))},s=l=>{n&&l.stopPropagation(),r?.()};return p.jsx(Vit,{tabIndex:t?-1:0,onFocus:s,onClick:o,role:"switch","aria-checked":e,"aria-disabled":t,selected:e,disabled:t,className:i,children:p.jsx(Hit,{selected:e,disabled:t})})}const Vit=H.div`
|
|
10432
10432
|
width: var(--switch-width);
|
|
10433
10433
|
height: var(--switch-height);
|
|
@@ -12040,7 +12040,7 @@ $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Eja(e){return e.
|
|
|
12040
12040
|
`];let b=-1,k=0;for(const w of y){const C=e.indexOf(w,u);if(C!==-1&&C<l.start){b=C,k=w.length;break}}if(b!==-1)d=b+k;else{const w=[`
|
|
12041
12041
|
`,`\r
|
|
12042
12042
|
`];for(const C of w){const O=e.indexOf(C,u);if(O!==-1&&O<l.start){d=O+C.length;break}}}}const f=l.start;t.push({boundaryStart:s.start,boundaryEnd:s.end,headersStart:c,headersEnd:u,bodyStart:d,bodyEnd:f,contentType:h})}return t}const fPa=()=>un.fromClass(class{decorations;constructor(e){this.decorations=this.buildDecorations(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=this.buildDecorations(e.view))}buildDecorations(e){const t=e.state.doc.toString(),a=[],r=Mt.mark({attributes:{style:"color: var(--color-carrot-8); font-weight: var(--font-weight-semibold);"}}),n=Mt.mark({attributes:{style:"color: var(--color-blue-8);"}}),i=Mt.mark({attributes:{style:"color: var(--color-purple-8);"}}),o=gPa(t),s=/^--[a-zA-Z0-9_\-\.]+(?:--)?(?:\r?\n|$)/gm,l=[];let c;for(;(c=s.exec(t))!==null;)l.push({start:c.index,end:c.index+c[0].length});for(const v of l)e.visibleRanges.some(f=>Math.max(f.from,v.start)<Math.min(f.to,v.end))&&a.push({from:v.start,to:v.end,value:r});const u=/^([a-zA-Z0-9\-]+):\s*(.+?)(?:\r?\n|$)/gm;for(const v of o){u.lastIndex=v.headersStart;let f;for(;(f=u.exec(t))!==null&&f.index<v.headersEnd;){const y=f.index+f[1].length+1+(f[2].match(/^\s*/)?.[0]?.length||0),b=f.index+f[0].length-(f[0].match(/\r?\n$/)?.[0]?.length||0);e.visibleRanges.some(k=>Math.max(k.from,y)<Math.min(k.to,b))&&b>y&&a.push({from:y,to:b,value:n})}}const d=/\[Binary\s+Data\]/gi;let h;for(;(h=d.exec(t))!==null;){const v=h.index,f=h[0].length;e.visibleRanges.some(y=>Math.max(y.from,v)<Math.min(y.to,v+f))&&a.push({from:v,to:v+f,value:i})}const m=Mt.mark({attributes:{style:"color: var(--color-blue-8);"}});for(const v of o)if(v.contentType?.includes("json")){const f=t.slice(v.bodyStart,v.bodyEnd),y=f.trim();if(!y)continue;const b=f.length-f.trimStart().length,k=v.bodyStart+b;let w;try{const O=ly.create("inmemory://model.json","json",0,y),S=pPa.parseJSONDocument(O)?.root;w=hPa(S)?S:void 0}catch{w=void 0}if(!w)continue;const C=mPa(w);for(const O of C){const S=k+O.from,j=k+O.to;if(!e.visibleRanges.some(_=>Math.max(_.from,S)<Math.min(_.to,j))||!(t[S]==='"'&&t[j-1]==='"'))continue;const P=S+1,R=j-1;R<=P||a.push({from:P,to:R,value:m})}}return Mt.set(a,!0)}},{decorations:e=>e.decorations}),vPa=()=>un.fromClass(class{decorations;constructor(e){this.decorations=this.buildDecorations(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=this.buildDecorations(e.view))}buildDecorations(e){const t=e.state.doc.toString(),a=[],r=Mt.mark({attributes:{style:"color: var(--color-blue-8);"}}),n=/^([a-zA-Z0-9\-]+):\s*(.+?)(?:\r?\n|$)/gm;let i;for(;(i=n.exec(t))!==null;){let o=i.index+i[1].length+1;for(;o<t.length&&/\s/.test(t[o]);)o++;const s=i.index+i[0].length-(i[0].match(/\r?\n$/)?.[0]?.length||0);s<=o||!e.visibleRanges.some(l=>Math.max(l.from,o)<Math.min(l.to,s))||a.push({from:o,to:s,value:r})}return Mt.set(a,!0)}},{decorations:e=>e.decorations}),bPa=c3({});function yPa(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.type=="string"&&typeof t.offset=="number"&&typeof t.length=="number"}function kPa(e){const t=[];if(!e)return t;const a=[e];for(;a.length>0;){const r=a.pop();if(r.type==="property"){r.valueNode&&a.push(r.valueNode);continue}if(r.type==="string"){const n=r.offset,i=r.offset+r.length;i>n&&t.push({from:n,to:i})}if(r.children&&r.children.length)for(const n of r.children)a.push(n)}return t}const fI=()=>un.fromClass(class{decorations;constructor(e){this.decorations=this.buildDecorations(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=this.buildDecorations(e.view))}buildDecorations(e){const t=e.state.doc.toString(),a=[],r=Mt.mark({attributes:{style:"color: var(--color-blue-8);"}}),n=Mt.mark({attributes:{style:"color: var(--code-block-tokens-keyword-color); font-weight: var(--font-weight-bold);"}}),i=t.split(/\r?\n/);let o=0;for(let s=0;s<i.length;s++){const l=i[s],c=o,u=o+l.length;if(!l.trim()){o=u+(t[o+l.length]==="\r"?2:1);continue}let d=c,h=l;l.startsWith("0x1E")?(d=c+4,h=l.substring(4),a.push({from:c,to:c+4,value:n})):l.charCodeAt(0)===30&&(d=c+1,h=l.substring(1),a.push({from:c,to:c+1,value:n})),l.endsWith("0x0A")?(h=h.substring(0,h.length-4),a.push({from:u-4,to:u,value:n})):l.charCodeAt(l.length-1)===10&&(h=h.substring(0,h.length-1),a.push({from:u-1,to:u,value:n}));let m;try{const f=ly.create("inmemory://model.json","json",0,h),y=bPa.parseJSONDocument(f)?.root;m=yPa(y)?y:void 0}catch{m=void 0}if(!m){o=u+(t[o+l.length]==="\r"?2:1);continue}const v=kPa(m);for(const f of v){const y=d+f.from,b=d+f.to;if(!e.visibleRanges.some(C=>Math.max(C.from,y)<Math.min(C.to,b))||!(t[y]==='"'&&t[b-1]==='"'))continue;const k=y+1,w=b-1;w<=k||a.push({from:k,to:w,value:r})}o=u+(t[o+l.length]==="\r"?2:1)}return Mt.set(a,!0)}},{decorations:e=>e.decorations}),py={[si.Text]:{name:"Text",extensions:[wt.lineWrapping],stateExtensions:[gI]},[si.JSON]:{name:"JSON",extensions:[Gxe(),qSa(rPa(),{delay:0,needsRefresh:e=>e.transactions.some(t=>t.effects.some(a=>a.is(n2e)))}),Fxe.data.of({autocomplete:iPa()}),nPa],stateExtensions:[aPa,dPa]},[si.XML]:{name:"XML",extensions:[RSa()],stateExtensions:[gI]}},i2e={[si.MultipartMixed]:{name:"Multipart Mixed",extensions:[wt.lineWrapping],stateExtensions:[fPa]},[si.JSONL]:{name:"JSON Lines",extensions:[wt.lineWrapping],stateExtensions:[fI]},[si.NDJSON]:{name:"NDJSON",extensions:[Gxe(),wt.lineWrapping],stateExtensions:[fI]},[si.JSONSeq]:{name:"JSON Sequence",extensions:[wt.lineWrapping],stateExtensions:[fI]},[si.TextStream]:{name:"SSE",extensions:[wt.lineWrapping],stateExtensions:[vPa]}},o2e={[si.Image]:{name:"Image",extensions:[],stateExtensions:[]}},s2e={[si.HTML]:{name:"HTML",extensions:[uSa()],stateExtensions:[gI]}},dw={...py,...o2e,...s2e,...i2e},vI={...py,...o2e,...s2e},tf={...py,...i2e},l2e={[si.FormData]:{name:"form-data",extensions:void 0},[si["application/x-www-form-urlencoded"]]:{name:"x-www-form-urlencoded",extensions:void 0}},c2e={[si.Binary]:{name:"Binary",extensions:void 0}},af={...py,...l2e,...c2e},xPa=Object.keys(py),d3=Object.keys(l2e),u2e=Object.keys(c2e);function d2e(e=[],t){const a={};return e.forEach(r=>{const n=String(r[t]);a[n]||(a[n]=[]),a[n].push(r)}),a}const pw={active:!0,key:"",value:""};function dm(e,t){return[...e.map(a=>({id:crypto.randomUUID(),key:a.name,value:t.initializeWithInputs?`$inputs.${a.name}`:a.example?String(a.example):"",active:t.initializeWithInputs?!0:!!a.example,in:a.in})),gn(t.in)]}function hw(e,t){const[a]=e.split("?"),r=t.slice(0,-1).filter(n=>n.active).map(n=>`${n.key}=${n.value}`).join("&");return`${a}${r?`?${r}`:""}`}function mc(){return{id:crypto.randomUUID(),...pw}}function sl(){return{id:crypto.randomUUID(),...pw,description:""}}function gn(e){return{...pw,id:crypto.randomUUID(),in:e}}function bp(){return{id:crypto.randomUUID(),...pw,type:"text",files:null}}function bI(){return{id:crypto.randomUUID(),...pw,sendIn:qo.URL}}function yI(e){return e.map(t=>({id:crypto.randomUUID(),key:"",value:t,active:!0}))}function p3(e,t){return e.filter(a=>a.active&&a.value).map(({value:a})=>(t?Nr(a,t):a).trim())}function pm(e,t){const a=t.filter(r=>!!r).flatMap(r=>r).filter(r=>r.key&&r.active);return["path","header"].includes(e)?Array.from(new Map(a.map(r=>[r.key,r])).values()):a}function wPa(e,t){return e.map(({value:a,...r})=>({...r,value:Nr(a,t)}))}function OPa(e,t){if(!e.startsWith("$components.parameters."))return null;const a=e.replace("$components.parameters.","");return a&&t[a]||null}function In(e=[],t={}){const a=[];for(const r of e)if(Ah(r)){const n=OPa(r.reference,t);n&&a.push({...n,active:r.active,value:r.value||n.value})}else a.push(r);return a}function hm(e){return Object.entries(e).map(([t,a])=>({id:crypto.randomUUID(),key:"",value:t,active:!0,description:a}))}function zPa(e){return e.replace(/{/g,"{{").replace(/}/g,"}}")}const p2e={documentedOAuth2Types:[],grantType:Ue.ClientCredentials,authRequestExtraParams:[mc()],tokenRequestExtraParams:[bI()],[Ue.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[sl()],accessToken:""},[Ue.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[sl()],accessToken:""},[Ue.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[sl()],codeVerifier:"",codeChallenge:"",accessToken:""},[Ue.AuthorizationCodeWithPkce]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[sl()],codeVerifier:"",codeChallenge:"",accessToken:""},[Ue.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[sl()],accessToken:""},[Ue.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:"",scopes:[sl()]}},SPa={securityType:qe.NoAuth,securitySchemeId:null,[qe.BasicAuth]:{username:"",password:""},[qe.JWT]:{token:""},[qe.DigestAuth]:{username:"",password:"",nc:"00000001",realm:"",nonce:"",opaque:"",qop:"",algorithm:"",cnonce:""},[qe.APIKey]:{location:Ol.Header,name:"",key:""},[qe.OAuth2]:p2e,[qe.OpenIDConnect]:{...p2e,openIdConnectUrl:"",userInfoUrl:""}},kI="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",CPa={[Yo.SIMPLE]:{condition:"",type:Yo.SIMPLE},[Yo.REGEX]:{condition:"",type:Yo.REGEX,context:""},[Yo.JSONPATH]:{condition:"",type:Yo.JSONPATH,context:""},[Yo.XPATH]:{condition:"",type:Yo.XPATH,context:""}};function h3(){return structuredClone({type:$i.Text,content:"",activeExampleName:"",formData:{"multipart/form-data":[bp()],"application/x-www-form-urlencoded":[bp()]},binary:null})}const jPa={method:"GET",url:"",security:[au()],body:h3(),queryParameters:[mc()],headers:[mc()],cookies:[mc()],pathParameters:[mc()]};function h2e(){return structuredClone(jPa)}function au(){return op(SPa)}function PPa(e){return op({id:crypto.randomUUID(),...CPa[e]})}function m2e(e,t,a){for(const r of a){const n=g2e(e,r),i=g2e(t,r);if(typeof n=="object"&&typeof i=="object"){if(!m2e(n,i,a))return!1}else if(n!==i)return!1}return!0}function g2e(e,t){const a=t.split("/");let r=e;for(const n of a)if(r&&typeof r=="object"&&n in r)r=r[n];else return;return r}function APa(e,t){return e.length===t.length&&e.sort().join()===t.sort().join()}function TPa(e,t){return e.every(a=>t.includes(a))}function MPa(e){switch(e){case"query":return Ol.Query;case"cookie":return Ol.Cookie;case"header":return Ol.Header;default:return}}function EPa(e,t,a){const{security:r}=t,n=Dga(e);if(!a)return!1;const i=xI(a),o=i.map(c=>c.securityType),s=r.map(c=>c.securityType);if(!APa(o,s))return!0;let l=[];return r.forEach(c=>{const u=c.securityType,d=c[qe.OAuth2]?.grantType,h=o.includes(u),m=i.find(b=>b.securityType===u),v=!m||m2e(c,m,RPa(u,d)),f=BPa(c,u,c[qe.OAuth2]?.grantType,n),y=!!(h&&m&&v&&f);l.push(!a.security?.length||y)}),l.includes(!1)}function BPa(e,t,a,r){if(t===qe.OAuth2&&(a===Ue.AuthorizationCode||a===Ue.AuthorizationCodeWithPkce||a===Ue.Implicit)){const n=e[qe.OAuth2][a]?.availableScopes,i=p3(e[qe.OAuth2][a]?.scopes,r);return TPa(i,n)}return!0}function RPa(e,t){return e===qe.APIKey?[`${qe.APIKey}/name`,`${qe.APIKey}/location`]:e===qe.OAuth2?[`${qe.OAuth2}/grantType`,..._Pa(t)]:e===qe.OpenIDConnect?[`${qe.OpenIDConnect}/openIdConnectUrl`]:[]}function _Pa(e){return e===Ue.ClientCredentials?[`${qe.OAuth2}/${Ue.ClientCredentials}/tokenUrl`]:e===Ue.Password?[`${qe.OAuth2}/${Ue.Password}/tokenUrl`]:e===Ue.Implicit?[`${qe.OAuth2}/${Ue.Implicit}/authorizationUrl`]:e===Ue.AuthorizationCode?[`${qe.OAuth2}/${Ue.AuthorizationCode}/tokenUrl`,`${qe.OAuth2}/${Ue.AuthorizationCode}/authorizationUrl`]:e===Ue.AuthorizationCodeWithPkce?[`${qe.OAuth2}/${Ue.AuthorizationCodeWithPkce}/tokenUrl`,`${qe.OAuth2}/${Ue.AuthorizationCodeWithPkce}/authorizationUrl`]:[]}function LPa(e){return e.map(t=>{const a=t.map(r=>r.id).join("_");return t.map(r=>({...r,schemeId:a}))})}function DPa(e){const t=e.security||[],a=t.map(r=>{let n="";const i=[];return r.forEach((o,s)=>{n=s===0?`${o.id}`:`${n}_${o.id}`,i.push(wI(o))}),{id:n,security:i}});return t.length?a:[]}function NPa(e,t){const a=e.security||[];return a?.length?k2e(a).map((r,n)=>wI(r)):[]}function xI(e){const t=(e.security||[])[0];return t?t.map(a=>wI(a)):[au()]}function wI(e,t){const a={...au(),securitySchemeId:e.id},r=m3(e);a.securityType=r;const n=e.id;if(e.id&&r!==qe.NoAuth&&(a[r].schemeName=e.id),r===qe.BasicAuth&&(a[qe.BasicAuth].username||(a[qe.BasicAuth].username=Tn(n+la.Username)),a[qe.BasicAuth].password||(a[qe.BasicAuth].password=Tn(n+la.Password))),r===qe.DigestAuth&&(a[qe.DigestAuth].username||(a[qe.DigestAuth].username=Tn(n+la.Username)),a[qe.DigestAuth].password||(a[qe.DigestAuth].password=Tn(n+la.Password))),r===qe.JWT&&!a[qe.JWT].token&&(a[qe.JWT].token=Tn(n+la.JWTToken)),r===qe.APIKey&&!a[qe.APIKey].key){a[qe.APIKey].name=e.name||"",a[qe.APIKey].key=Tn(n+la.APIKey);const i=MPa(e.in);i&&(a[qe.APIKey].location=i)}if(r===qe.OAuth2){const i=SI(e),o=Tn(n+la.Token),s=a[qe.OAuth2];s.grantType=i[0],i.forEach(l=>{l===Ue.AuthorizationCode&&!s[Ue.AuthorizationCode].accessToken&&(s[Ue.AuthorizationCode].accessToken=o,s[Ue.AuthorizationCode].clientId=Tn(n+la.ClientId),s[Ue.AuthorizationCode].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[Ue.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[Ue.AuthorizationCode].clientSecret=Tn(n+la.ClientSecret),s[Ue.AuthorizationCode].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[Ue.AuthorizationCode].scopes=[...hm(e.flows?.authorizationCode?.scopes||{})||[],sl()]),l===Ue.AuthorizationCodeWithPkce&&!s[Ue.AuthorizationCodeWithPkce].accessToken&&(s[Ue.AuthorizationCodeWithPkce].accessToken=o,s[Ue.AuthorizationCodeWithPkce].clientId=Tn(n+la.ClientId),s[Ue.AuthorizationCodeWithPkce].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[Ue.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[Ue.AuthorizationCodeWithPkce].clientSecret=Tn(n+la.ClientSecret),s[Ue.AuthorizationCodeWithPkce].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[Ue.AuthorizationCodeWithPkce].scopes=[...hm(e.flows?.authorizationCode?.scopes||{}),sl()]),l===Ue.ClientCredentials&&!s[Ue.ClientCredentials].accessToken&&(s[Ue.ClientCredentials].accessToken=o,s[Ue.ClientCredentials].clientId=Tn(n+la.ClientId),s[Ue.ClientCredentials].clientSecret=Tn(n+la.ClientSecret),s[Ue.ClientCredentials].tokenUrl=e.flows?.clientCredentials?.tokenUrl||"",s[Ue.ClientCredentials].scopes=[...hm(e.flows?.clientCredentials?.scopes||{}),sl()]),l===Ue.ClientCredentialsWithJwtAssertion&&!s[Ue.ClientCredentialsWithJwtAssertion].accessToken&&(s[Ue.ClientCredentialsWithJwtAssertion].accessToken=o,s[Ue.ClientCredentialsWithJwtAssertion].clientId=Tn(n+la.ClientId),s[Ue.ClientCredentialsWithJwtAssertion].clientAssertion=Tn(n+la.ClientAssertion),s[Ue.ClientCredentialsWithJwtAssertion].scopes=[...hm(e.flows?.clientCredentials?.scopes||{}),sl()]),l===Ue.Implicit&&!s[Ue.Implicit].accessToken&&(s[Ue.Implicit].accessToken=o,s[Ue.Implicit].clientId=Tn(n+la.ClientId),s[Ue.Implicit].authorizationUrl=e.flows?.implicit?.authorizationUrl||"",s[Ue.Implicit].availableScopes=Object.keys(e.flows?.implicit?.scopes||{})||[],s[Ue.Implicit].scopes=[...hm(e.flows?.implicit?.scopes||{}),sl()]),l===Ue.Password&&!s[Ue.Password].accessToken&&(s[Ue.Password].accessToken=o,s[Ue.Password].clientId=Tn(n+la.ClientId),s[Ue.Password].clientSecret=Tn(n+la.ClientSecret),s[Ue.Password].tokenUrl=e.flows?.password?.tokenUrl||"",s[Ue.Password].scopes=[...hm(e.flows?.password?.scopes||{}),sl()])})}if(r===qe.OpenIDConnect){const i=Tn(n+la.Token),o=a[qe.OpenIDConnect];o[Ue.AuthorizationCode].accessToken||(o[Ue.AuthorizationCode].accessToken=i,o[Ue.AuthorizationCode].clientId=Tn(n+la.ClientId),o[Ue.AuthorizationCode].clientSecret=Tn(n+la.ClientSecret),o[Ue.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[Ue.AuthorizationCodeWithPkce].accessToken||(o[Ue.AuthorizationCodeWithPkce].accessToken=i,o[Ue.AuthorizationCodeWithPkce].clientId=Tn(n+la.ClientId),o[Ue.AuthorizationCodeWithPkce].clientSecret=Tn(n+la.ClientSecret),o[Ue.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[Ue.Implicit].accessToken||(o[Ue.Implicit].accessToken=i,o[Ue.Implicit].clientId=Tn(n+la.ClientId))}return a}function f2e(e){try{const t=JSON.parse(e);return JSON.stringify(t,null,2)}catch(t){return console.error({error:t}),e}}function $Pa(e,t=!1,a="",r){const n=d2e(e.parameters,"in"),i=v2e(e),o=xI(e),s=dm(n.query||[],{in:"query"});return{id:crypto.randomUUID(),name:e.name,operationId:e.operationId,collectionPath:r,apiPath:{path:e.path,method:e.method},apiId:a,isAdditionalOperation:t,request:{pathParameters:dm(n.path||[],{in:"path"}),method:e.method.toLocaleUpperCase(),url:hw(zPa(e.path),s),headers:dm(n.header||[],{in:"header"}),queryParameters:s,cookies:dm(n.cookie||[],{in:"cookie"}),body:i,security:o},response:null}}function OI(e){const t=d2e(e.parameters,"in"),a=v2e(e),r=xI(e);return{parameters:{queryParameters:dm(t.query||[],{in:"query"}),headers:dm(t.header||[],{in:"header"}),cookies:dm(t.cookie||[],{in:"cookie"}),pathParameters:dm(t.path||[],{initializeWithInputs:!0,in:"path"})},requestBody:a,security:r}}function IPa(e,t){const a=new Kd({format:!0});if(typeof e=="string")return t?.includes("json")?f2e(e):e;if(typeof e=="object"&&e!==null&&t?.includes("xml")){const r=Array.isArray(e)?e:{root:e};return a.build(r)}return JSON.stringify(e,null,2)}function v2e(e){const t=e.body?.mediaTypes;if(!t||!Object.keys(t).length)return h3();const a=KPa(t,e),r=a?.name||"",n=!d3.includes(r)&&!u2e.includes(r),i=zI(a),o=i.find(({key:l})=>l===e.body?.activeExampleName)?.value??i[0]?.value,s=n&&o?IPa(o,r):"";return{...h3(),activeExampleName:e.body?.activeExampleName||i[0]?.key||"",...a&&{type:a.name},content:s,formData:{"multipart/form-data":y2e(t[si.FormData]),"application/x-www-form-urlencoded":y2e(t[si["application/x-www-form-urlencoded"]])}}}function b2e(e){return e?{...(Object.keys(e?.body?.mediaTypes||{})||[]).reduce((t,a)=>(t[a]={name:a,extensions:void 0},t),{}),...af}:af}function y2e(e){if(!e)return[bp()];if(!e.parameters)return[bp()];const t=e.parameters.map(a=>({id:crypto.randomUUID(),key:a.name,value:String(a.example)||"",active:!0,type:a.inputType,files:null}));return t.push(bp()),t}function zI(e){const t=e?.examples;return Object.keys(t||{}).map(a=>{const r=t?.[a];return{name:Vm(r?.summary)?r?.summary:r?.summary?.raw||a,key:a,value:t?.[a].value}})}function KPa(e,t){const a=b2e(t),r=Object.keys(e).find(n=>!!a[n]);return r?e[r]:null}function VPa(e){return!e?.security?.length||!e?[]:NPa(e)}function k2e(e){const t=new Set;return e.flat().filter(a=>t.has(a.id)?!1:(t.add(a.id),!0))}function m3(e){if(e.type==="http"){if(e.scheme==="bearer")return qe.JWT;if(e.scheme==="basic")return qe.BasicAuth;if(e.scheme==="digest")return qe.DigestAuth}else{if(e.type==="apiKey")return qe.APIKey;if(e.type==="oauth2")return qe.OAuth2;if(e.type==="openIdConnect")return qe.OpenIDConnect}return qe.NoAuth}function HPa(e,t){if(e==="clientCredentials"&&t&&"x-assertionType"in t&&t["x-assertionType"]===kI)return Ue.ClientCredentialsWithJwtAssertion;if(e==="authorizationCode"&&t&&"x-usePkce"in t&&t["x-usePkce"])return Ue.AuthorizationCodeWithPkce;switch(e){case"implicit":return Ue.Implicit;case"password":return Ue.Password;case"clientCredentials":return Ue.ClientCredentials;case"authorizationCode":return Ue.AuthorizationCode;default:return Ue.AuthorizationCode}}function FPa(e,t){const a=e?.security;if(!a?.length)return[];const r=LPa(a).flat().filter(n=>n.schemeId===t).find(n=>m3(n)===qe.OAuth2);return SI(r)}function SI(e){return Object.entries(e?.flows||{}).map(([t,a])=>HPa(t,a)).filter(Boolean)}async function mw(e){try{const t=await oke(e),a=await dD(e);return{absolutePath:e,file:new File([t],a)}}catch(t){return console.error("Failed to init replay file",t),null}}async function x2e(e){return(await Promise.allSettled(e.map(t=>mw(t)))).map(t=>t.status==="fulfilled"?t.value:null).filter(t=>t!==null)}function g3(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}function CI(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function GPa(e){try{const t=new URL(e);return t.search="",t.hash="",t.toString()}catch{return e}}function f3(e){return/^https?:\/\//i.test(e)}function qPa(e,t){let a;if(t.startsWith("//")){const{protocol:r}=new URL(e);a=`${r||"https:"}${t}`}else if(g3(t))a=t;else if(!t.startsWith("/"))a=CI(e)+"/"+t;else{const r=new URL(e);r.pathname=t,a=r.toString()}return CI(a)}function w2e(e,t){let a=e;return t.forEach(({key:r,value:n,active:i})=>{n&&i&&(a=a.replaceAll(`{${r}}`,n))}),a}function O2e(e,t){let a=e;return t.forEach(({name:r,value:n})=>{n&&(a=a.replaceAll(`{${r}}`,n))}),a}function QPa(e){return e.startsWith("http://")||e.startsWith("https://")}function v3({url:e,serverUrl:t,corsProxyUrl:a}){let r;if(QPa(e)||!t)r=e;else{const n=new URL(t);n.pathname=e,n.search="",n.hash="",r=n.toString()}return a?`${a}${r}`:r}async function UPa(e,t,a,r,n,i){const o=await Promise.all(e.sourceDescriptions?.map(async l=>({...l,apiId:await z2e({projectPath:r,apiUrl:l.url,collectionId:t})}))),s={inputs:e.components?.inputs||{},parameters:Object.fromEntries(Object.entries(e.components?.parameters||{}).map(([l,c])=>[l,{...c,key:c.name,value:c.value,id:crypto.randomUUID(),active:!0}]))};return{...e,id:t,srcType:a,state:cr.Normal,sourceDescriptions:o,components:s,workflows:await Promise.all(e.workflows.map(async l=>({...l,state:cr.Normal,parameters:_2e(l.parameters,l["x-replay-disabled-parameters"],e.components?.parameters),outputs:B2e(l.outputs),security:T2e(l["x-security"]),steps:await Promise.all(l.steps.map(async c=>{const u=_2e(c.parameters,c["x-replay-disabled-parameters"],e.components?.parameters),d=c["x-operation"]??null;d&&(d.url=hw(d.url,u.queryParameters.filter(aoe)));const h=WPa(c,o,n);let m;if(h&&i){const f=n?.find(y=>y.id===h.apiId);try{m=i(h.path,h.method,f)}catch(y){console.error("Failed to convert operation to replay value",y),m=void 0}}delete c.operationId,delete c["x-operation"];const v=await tAa(c.requestBody,r);return{...c,state:cr.Normal,parameters:u,outputs:B2e(c.outputs),successCriteria:c.successCriteria?.map(f=>({...f,type:f.type??Yo.SIMPLE}))||[],requestBody:v,xOperation:d,security:T2e(c["x-security"],m),operation:h}}))})))}}async function z2e({projectPath:e,apiUrl:t,collectionId:a}){if(f3(t))return t;if(await Jr.isAbsolute(t))return await Jr.relative(e,t);const r=await Jr.resolve(await Jr.join(e,a,"..",t));return await Jr.relative(e,r)}function WPa(e,t,a){if(e["x-operation"])return null;const{path:r,method:n,apiId:i,isAdditionalOperation:o}=C2e({operationPath:e.operationPath,parsedSourceDescriptions:t}),{operationId:s,apiId:l}=JPa({operationId:e.operationId,parsedSourceDescriptions:t}),c=l||i||t[0]?.apiId||"",u=a?.find(d=>d.id===c);if(s&&u&&!r&&!n){const d=rAa(s,u);return{apiId:c,path:d?.path??"",method:d?.method??"",operationId:s,isAdditionalOperation:d?.isAdditionalOperation??!1}}return{apiId:c,path:r??"",method:n??"",operationId:s,isAdditionalOperation:o}}function JPa({operationId:e,parsedSourceDescriptions:t}){if(!e)return{operationId:"",apiId:null};const a=e.split(".");if(a.length===1)return{operationId:e,apiId:t[0]?.apiId??""};const[,r,n=""]=a,i=t.find(({name:o})=>o===r);return{operationId:n,apiId:i?.apiId??""}}function S2e(e){return"reference"in e&&typeof e.reference=="string"}function C2e({operationPath:e,parsedSourceDescriptions:t}){if(!e)return{apiId:null,path:"",method:"",isAdditionalOperation:!1};try{const a=e.split("#"),r=a.length>1?a[1]:a[0],n=a.length>1?a[0]:"";if(!r)return{path:"",method:"",apiId:null,isAdditionalOperation:!1};let i=null,o=null;const s=/\$sourceDescriptions\.(.+)\.url/,l=n.match(s);if(l&&(i=l[1]),i){const h=t.find(({name:m})=>m===i);h&&(o=h.apiId)}const c=r.split("/"),u=c.pop()||"",d=c[c.length-1]==="additionalOperations";return d&&c.pop(),{path:Li.unescape(c.pop()||""),method:u.toLowerCase(),apiId:o,isAdditionalOperation:d}}catch{return{path:"",method:"",apiId:null,isAdditionalOperation:!1}}}function ZPa(e){switch(e.type){case"apiKey":return qe.APIKey;case"oauth2":return qe.OAuth2;case"openIdConnect":return qe.OpenIDConnect;case"http":return e.scheme==="basic"?qe.BasicAuth:e.scheme==="digest"?qe.DigestAuth:e.scheme==="bearer"?qe.JWT:qe.NoAuth;default:return qe.NoAuth}}function j2e(e,t){const a={clientCredentials:Ue.ClientCredentials,authorizationCode:Ue.AuthorizationCode,implicit:Ue.Implicit,password:Ue.Password,clientCredentialsWithJwtAssertion:Ue.ClientCredentialsWithJwtAssertion,authorizationCodeWithPkce:Ue.AuthorizationCodeWithPkce};return e==="clientCredentials"&&t["x-assertionType"]==="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"?Ue.ClientCredentialsWithJwtAssertion:e==="authorizationCode"&&t["x-usePkce"]?Ue.AuthorizationCodeWithPkce:a[e]??null}function XPa(e){return{query:Ol.Query,header:Ol.Header,cookie:Ol.Cookie}[e.toLowerCase()]||Ol.Header}function YPa(e){return{body:qo.Body,header:qo.Header,url:qo.URL}[e.toLowerCase()]||qo.URL}function P2e(e,t,a){return Object.keys(e).reduce((r,n)=>{const i=j2e(n,e[n]);if(!i)return r;switch(i){case Ue.ClientCredentials:r[i]={...a[i],clientId:t.clientId??"",clientSecret:t.clientSecret??"",clientAssertion:t.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:rf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:t.accessToken??""};break;case Ue.AuthorizationCode:r[i]={...a[i],clientId:t.clientId??"",clientSecret:t.clientSecret??"",tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:t.callbackUrl??"",availableScopes:e[n].availableScopes??[],scopes:rf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:t.accessToken??""};break;case Ue.Implicit:r[i]={...a[i],clientId:t.clientId??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:t.callbackUrl??"",availableScopes:rf(e[n].availableScopes),scopes:rf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:t.accessToken??""};break;case Ue.Password:r[i]={...a[i],tokenUrl:e[n].tokenUrl??"",username:t.username??"",password:t.password??"",clientId:t.clientId??"",clientSecret:t.clientSecret??"",accessToken:t.accessToken??""};break;case Ue.ClientCredentialsWithJwtAssertion:r[i]={...a[i],clientAssertion:t.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:rf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),clientId:t.clientId??"",clientSecret:t.clientSecret??"",accessToken:t.accessToken??""};break;case Ue.AuthorizationCodeWithPkce:r[i]={...a[i],tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:t.callbackUrl??"",availableScopes:rf(e[n].availableScopes),scopes:rf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),codeVerifier:t.codeVerifier??"",codeChallenge:t.codeChallenge??"",clientId:t.clientId??"",clientSecret:t.clientSecret??"",accessToken:t.accessToken??""};break}return r},a)}function A2e(e,t,a){const r={...au(),securityType:e},n=Object.keys(t.flows||{})[0],i=j2e(n,t.flows?.[n])??Ue.ClientCredentials;switch(e){case qe.BasicAuth:return{...r,[qe.BasicAuth]:{username:a.username,password:a.password,schemeName:t.id}};case qe.JWT:return{...r,[qe.JWT]:{token:a.token,schemeName:t.id}};case qe.DigestAuth:return{...r,[qe.DigestAuth]:{...r[qe.DigestAuth],username:a.username,password:a.password,schemeName:t.id}};case qe.APIKey:return{...r,[qe.APIKey]:{location:XPa(t.in),name:t.name,key:a.apiKey,schemeName:t.id}};case qe.OAuth2:return{...r,[qe.OAuth2]:{...r[qe.OAuth2],...P2e(t.flows||{},a||{},r[qe.OAuth2]),authRequestExtraParams:M2e(a.authRequestExtraParams),tokenRequestExtraParams:E2e(a.tokenRequestExtraParams),grantType:i,schemeName:t.id}};case qe.OpenIDConnect:return{...r,[qe.OpenIDConnect]:{...r[qe.OpenIDConnect],...P2e(a.flows||{},a||{},r[qe.OpenIDConnect]),openIdConnectUrl:a.openIdConnectUrl,userInfoUrl:a.userInfoUrl,authRequestExtraParams:M2e(a.authRequestExtraParams),tokenRequestExtraParams:E2e(a.tokenRequestExtraParams),grantType:i,schemeName:t.id}};default:return r}}function eAa(e,t){return[...e.map(a=>{if("scheme"in a){const n=ZPa(a.scheme);return A2e(n,a.scheme,a.values)}const r=t.find(n=>n.id===a.schemeName);if(r){const n=m3(r),i=A2e(n,r,a.values);return i.securitySchemeId=r.id,i}return au()})]}function T2e(e=[],t){const a=k2e(t?.security||[]);return e.length?eAa(e,a):[au()]}function rf(e,t){const a=hm(e||{}),r=hm(t||{});return[...a,...r,sl()]}function M2e(e){return(e||[]).map(t=>({id:crypto.randomUUID(),key:t.key??"",value:t.value??"",active:t.active??!0})).concat(mc())}function E2e(e){return(e||[]).map(t=>({id:crypto.randomUUID(),key:t.key??"",value:t.value??"",active:t.active??!0,sendIn:YPa(t.in)})).concat(bI())}function B2e(e){if(!e)return[mc()];const t=[];for(const a in e)t.push({id:crypto.randomUUID(),key:a,value:e[a],active:!0});return t.push(mc()),t}const hy={query:"queryParameters",path:"pathParameters",header:"headers",cookie:"cookies"};function R2e(e,t){const a="$components.parameters.";if(e.reference.startsWith(a)){const r=e.reference.replace(a,"");return t?.[r]}}function _2e(e,t,a){if(!e&&!t)return{pathParameters:[gn("path")],queryParameters:[gn("query")],headers:[gn("header")],cookies:[gn("cookie")]};const r={pathParameters:[],queryParameters:[],headers:[],cookies:[]};if(e)for(const n of e)if(S2e(n)){const i=R2e(n,a),o=hy[i?.in];o&&r[o].push({reference:n.reference,active:!0,value:n.value})}else hy[n.in]&&r[hy[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!0,in:n.in});if(t)for(const n of t)if(S2e(n)){const i=R2e(n,a),o=hy[i?.in];o&&r[o].push({reference:n.reference,active:!1,value:n.value})}else hy[n.in]&&r[hy[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!1,in:n.in});return r.pathParameters.push(gn("path")),r.queryParameters.push(gn("query")),r.headers.push(gn("header")),r.cookies.push(gn("cookie")),r}async function tAa(e,t){const a=h2e().body;if(!e)return a;switch(e.contentType){case"application/x-www-form-urlencoded":case"multipart/form-data":return{...a,type:e.contentType,formData:await aAa(e,t)};case"application/octet-stream":const r=e.payload?await N2e(e.payload,t):[],n=r.length>0?await mw(r[0]):null;return{...a,type:e.contentType,binary:n};case"application/json":case"application/ld+json":return{...a,type:e.contentType,content:D2e(e.payload)};default:{const i=typeof e.payload=="string",o=e.contentType||(i?"text/plain":"application/json");return{...a,type:o,content:i?e.payload:D2e(e.payload)}}}}async function L2e(e,t,a,r){const n=await N2e(t,r),i=n.length>0||Array.isArray(t),o=i?await x2e(n):void 0;return{id:crypto.randomUUID(),key:e,value:i?"":t,type:i?"file":"text",active:a,files:o}}async function aAa(e,t){const a=h2e().body.formData,r=e.contentType,n=e.payload?await Promise.all(Object.entries(e.payload).map(([o,s])=>L2e(o,s,!0,t))):[],i=e["x-replay-disabled-payload"]?await Promise.all(Object.entries(e["x-replay-disabled-payload"]||{}).map(([o,s])=>L2e(o,s,!1,t))):[];return{...a,[r]:[...n,...i,bp()]}}function D2e(e){return e?JSON.stringify(e,null,2):""}function rAa(e,t){for(const a of Object.keys(t.paths)){const r=t.paths[a];for(const n of Object.keys(r)){const i=n.toLowerCase();if(["get","put","post","delete","options","head","patch","trace"].includes(i)&&r[i]?.operationId===e)return{method:i,path:a,isAdditionalOperation:!1}}if(r.additionalOperations){for(const[n,i]of Object.entries(r.additionalOperations))if(i?.operationId===e)return{method:n.toLowerCase(),path:a,isAdditionalOperation:!0}}}return null}async function N2e(e,t){return Array.isArray(e)?(await Promise.all(e.map(a=>$2e(a,t)))).flat():typeof e=="string"?await $2e(e,t):[]}async function $2e(e,t){const a=/\$file\(['"](.+?)['"]\)/g,r=Array.from(e.matchAll(a));return Promise.all(r.map(n=>nAa(n[1],t)))}async function nAa(e,t){return await Jr.isAbsolute(e)?e:await Jr.resolve(await Jr.join(t,e))}const Es=e=>!e||typeof e=="boolean"?{type:"object",properties:{}}:e.type?e:{...e,type:"object"},I2e=(e,t,a)=>{if(!e.properties)return e;const r=e.properties[t],n=Es(r);return{...e,properties:{...e.properties,[t]:{...n,...a}}}},iAa=(e,t,a)=>{if(!e.properties||t===a||!a.trim())return null;const r={...e.properties};return r[a]?null:(r[a]=r[t],delete r[t],{...e,properties:r})},oAa=(e,t)=>{if(!e.properties)return e;const a={...e.properties};return delete a[t],{...e,properties:a}},sAa=(e,t,a={type:"string"})=>{const r=e.properties||{};return{...e,type:"object",properties:{...r,[t]:a}}};function K2e(e){const t=Object.assign({},...(e||[]).filter(({key:a,active:r})=>a&&r).map(a=>({[a.key]:a.value})));if(Object.keys(t).length!==0)return t}function V2e(e){if(!e)return{};const t={queryParameters:"query",headers:"header",cookies:"cookie",pathParameters:"path"},a=[],r=[];return Object.keys(t).forEach(n=>{const i=n;e[i].forEach(o=>{if(Ah(o)){const s={reference:o.reference,value:o.value||void 0};o.active?a.push(s):r.push(s)}else{if(!o.key)return;const s={name:o.key,in:t[i],value:o.value};o.active?a.push(s):r.push(s)}})}),{parameters:a.length>0?a:void 0,"x-replay-disabled-parameters":r.length>0?r:void 0}}function lAa(e){const t=e?.map(a=>({condition:a.condition,context:a.context,type:a.type==Yo.SIMPLE?void 0:a.type}));if(t?.length!==0)return t}function cAa(e){if(!(!e||e.length===0))return[...e]}async function H2e(e,t){return e.absolutePath?`$file('${await Jr.relative(t,e.absolutePath)}')`:null}async function uAa(e,t){const{type:a,value:r,files:n}=e;switch(a){case"text":return r;case"file":let i=[];return n&&(i=(await Promise.all(Object.values(n).map(o=>H2e(o,t)))).filter(o=>o!==null)),i.length===0?"":i.length===1?i[0]:i}}async function dAa(e,t){const a=e.type,r=e.formData[a],n={},i={};return await Promise.all(r.map(async o=>{const{key:s,active:l}=o;if(!s)return;const c=await uAa(o,t);l?n[s]=c:i[s]=c})),{payload:Object.keys(n).length>0?n:void 0,"x-replay-disabled-payload":Object.keys(i).length>0?i:void 0}}function pAa(e){if(!e)return e;try{const t=JSON.parse(e);return typeof t=="object"?t:e}catch{return e}}async function hAa(e,t){if(e)switch(e.type){case"application/x-www-form-urlencoded":case"multipart/form-data":return{contentType:e.type,...await dAa(e,t)};case"application/octet-stream":return{contentType:e.type,payload:e.binary?await H2e(e.binary,t):null};case"application/json":case"application/ld+json":return e.content?{contentType:e.type,payload:pAa(e.content)}:void 0;default:return e.content?{contentType:e.type,payload:e.content}:void 0}}function mAa(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"basic"}},values:{username:e.username,password:e.password}}}function gAa(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"apiKey",name:e.name,in:e.location.toLowerCase()}},values:{apiKey:e.key}}}function fAa(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"bearer"}},values:{token:e.token}}}function vAa(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"digest"}},values:{username:e.username,password:e.password}}}function bAa(e){const{flows:t,values:a}=q2e(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"openIdConnect",flows:t}},values:{...a,openIdConnectUrl:e.openIdConnectUrl,userInfoUrl:e.userInfoUrl,authRequestExtraParams:F2e(e.authRequestExtraParams),tokenRequestExtraParams:G2e(e.tokenRequestExtraParams)}}}function yAa(e){const{flows:t,values:a}=q2e(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"oauth2",flows:t}},values:{...a,authRequestExtraParams:F2e(e.authRequestExtraParams),tokenRequestExtraParams:G2e(e.tokenRequestExtraParams)}}}function my(e){const t={},a={};return e.forEach(r=>{r.value&&(r.active?t[r.value]=r.description:a[r.value]=r.description)}),{scopes:t,"x-replay-disabled-scopes":Object.keys(a).length>0?a:void 0}}function F2e(e){return e.filter(t=>t.value||t.key).map(t=>({key:t.key,value:t.value,active:t.active}))}function G2e(e){return e.filter(t=>t.value||t.key).map(t=>({key:t.key,value:t.value,active:t.active,in:t.sendIn.toLowerCase()}))}function q2e(e){let t;switch(e.grantType){case Ue.ClientCredentials:return t=e[Ue.ClientCredentials],{flows:{clientCredentials:{tokenUrl:t.tokenUrl,...my(t.scopes)}},values:{clientId:t.clientId,clientSecret:t.clientSecret,accessToken:t.accessToken}};case Ue.Implicit:return t=e[Ue.Implicit],{flows:{implicit:{authorizationUrl:t.authorizationUrl,...my(t.scopes)}},values:{clientId:t.clientId,accessToken:t.accessToken,callbackUrl:t.callbackUrl}};case Ue.Password:return t=e[Ue.Password],{flows:{password:{tokenUrl:t.tokenUrl,...my(t.scopes)}},values:{clientId:t.clientId,clientSecret:t.clientSecret,username:t.username,password:t.password,accessToken:t.accessToken}};case Ue.AuthorizationCode:return t=e[Ue.AuthorizationCode],{flows:{authorizationCode:{tokenUrl:t.tokenUrl,authorizationUrl:t.authorizationUrl,...my(t.scopes)}},values:{accessToken:t.accessToken,clientId:t.clientId,callbackUrl:t.callbackUrl}};case Ue.ClientCredentialsWithJwtAssertion:return t=e[Ue.ClientCredentialsWithJwtAssertion],{flows:{clientCredentials:{tokenUrl:t.tokenUrl,...my(t.scopes),"x-assertionType":"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}},values:{clientId:t.clientId,clientAssertion:t.clientAssertion,accessToken:t.accessToken}};case Ue.AuthorizationCodeWithPkce:return t=e[Ue.AuthorizationCodeWithPkce],{flows:{authorizationCode:{tokenUrl:t.tokenUrl,authorizationUrl:t.authorizationUrl,...my(t.scopes),"x-usePkce":!0}},values:{clientId:t.clientId,clientSecret:t.clientSecret,accessToken:t.accessToken,codeVerifier:t.codeVerifier,codeChallenge:t.codeChallenge,callbackUrl:t.callbackUrl}}}}function Q2e(e){const t=e.map(a=>{switch(a.securityType){case qe.OpenIDConnect:{const r=a[qe.OpenIDConnect];return bAa(r)}case qe.OAuth2:{const r=a[qe.OAuth2];return yAa(r)}case qe.APIKey:{const r=a[qe.APIKey];return gAa(r)}case qe.BasicAuth:{const r=a[qe.BasicAuth];return mAa(r)}case qe.DigestAuth:{const r=a[qe.DigestAuth];return vAa(r)}case qe.JWT:{const r=a[qe.JWT];return fAa(r)}default:return null}}).filter(a=>a!==null);return{"x-security":t.length?t:void 0}}function kAa(e){const{inputs:t,parameters:a,...r}=e;let n=r;return Object.keys(t).length&&(n.inputs=t),Object.keys(a).length&&(n.parameters=Object.fromEntries(Object.entries(a).map(([i,{id:o,active:s,key:l,...c}])=>[i,{...c,name:l}]))),Object.keys(n).length||(n=void 0),n}async function xAa(e,t){const{id:a,state:r,srcType:n,sourceDescriptions:i,workflows:o,components:s,...l}=e;return{arazzoObject:{...l,sourceDescriptions:i.map(c=>({...c,name:c.name,url:c.url,type:c.type||"openapi",apiId:void 0})),components:kAa(s),workflows:await Promise.all(o.map(async({parameters:c,security:u,dependsOn:d,outputs:h,state:m,steps:v,inputs:f,...y})=>({...y,dependsOn:cAa(d),outputs:K2e(h),inputs:f?Es(f):void 0,...Q2e(u),...V2e(c),steps:await Promise.all(v.map(async({parameters:b,security:k,operation:w,requestBody:C,successCriteria:O,outputs:S,state:j,xOperation:P,...R})=>{const _={operationId:void 0,operationPath:void 0,"x-operation":void 0};if(w){const K=e.sourceDescriptions.find(({apiId:L})=>L===w.apiId)||e.sourceDescriptions[0];if(w.operationId){const L=e.sourceDescriptions.length<=1;_.operationId=L?w.operationId:`$sourceDescriptions.${K.name}.${w.operationId}`}else _.operationPath=w.isAdditionalOperation?`{$sourceDescriptions.${K.name}.url}#/paths/${Li.escape(w.path)}/additionalOperations/${w.method}`:`{$sourceDescriptions.${K.name}.url}#/paths/${Li.escape(w.path)}/${w.method}`}else P&&(_["x-operation"]={...P,url:P.url.split("?")[0]});return{...R,..._,...Q2e(k),...V2e(b),requestBody:await hAa(C,t),successCriteria:lAa(O),outputs:K2e(S)}}))})))}}}class wAa extends mke{constructor(t,a){super(t),this.convertOperationToReplayValue=a}parse(t,a){return UPa(t.content,t.uri,t.type,this.storage.baseDir,a,this.convertOperationToReplayValue)}async stringify(t){const{arazzoObject:a}=await xAa(t,this.storage.baseDir);return await Jr.extname(t.id)===".json"?JSON.stringify(a,null,2):Fd.dump(a)}}class OAa{constructor(t,a){this.storage=t,this.localStorageSecretsProvider=a}default=[];async read(){const t=await this.storage.get("replay-environments.yaml"),a=await this.localStorageSecretsProvider.get();let r=null,n=null;if(!t)return this.default;try{r=Fd.load(t),n=a?JSON.parse(a):null}catch(i){return console.error("Failed to parse environments file",i),this.default}return r?Object.keys(r).filter(i=>i!=="version").map(i=>({name:i,inputs:Object.entries(r[i].inputs).map(([o,s])=>{if(typeof s=="string")return{name:o,value:s,isSecret:!1};const l=n?.[i]?.[o]??"";return{name:o,value:l,isSecret:!0}}),servers:Object.entries(r[i].servers).map(([o,s])=>({apiId:o,value:s.value,variables:Object.entries(s.variables||{}).map(([l,c])=>({name:l,value:c}))})),state:cr.Normal})):this.default}async write(t){const a=await this.localStorageSecretsProvider.get(),r=a?JSON.parse(a):{},n=t.reduce((i,o)=>(o.name&&(i[o.name]={inputs:o.inputs.reduce((s,l)=>(l.isSecret&&r?(r[o.name]||(r[o.name]={}),r[o.name][l.name]=l.value,s[l.name]={provider:"local"}):s[l.name]=l.value,s),{}),servers:o.servers.reduce((s,l)=>(s[l.apiId]={value:l.value,variables:Object.fromEntries(l.variables.map(c=>[c.name,c.value]))},s),{})}),i),{});this.localStorageSecretsProvider.set(JSON.stringify(r)),n&&this.storage.set("replay-environments.yaml",Fd.dump(n))}}class zAa{constructor(t,a,r){this.storage=t,this.filePath=a,this.defaultValue=r}async parse(t){return JSON.parse(t)}stringify(t){return JSON.stringify(t)}async read(){const t=await this.storage.get(this.filePath);return t?await this.parse(t):this.defaultValue}async write(t){return this.storage.set(this.filePath,this.stringify(t))}}const SAa=(e,t)=>({data:e,version:t});class jI extends zAa{constructor(t,a,r,n){super(t,a,r),this.version=n}migrationMap={};migrate(t){if(!this.migrationMap[t.version])return this.defaultValue;const a=this.migrationMap[t.version](t);return a.version===this.version?a:this.migrate(a)}async parse(t){const a=JSON.parse(t);if(a.version!==this.version){const r=this.migrate(a);return await this.write(r.data),r.data}return a.data}stringify(t){return JSON.stringify(SAa(t,this.version))}}function CAa(e){return{data:{...e.data,tabs:e.data.tabs.map(t=>t.data.type===Wt.Step?{...t,data:{...t.data,draftStep:{...t.data.step,security:t.data.step.security.securities},step:void 0,hasUnsavedChanges:void 0,showUnsavedChangesModal:void 0}}:t)},version:2}}const U2e=2,jAa="tabs.json";class PAa extends jI{migrationMap={1:CAa};constructor(t){super(t,jAa,op(rke),U2e)}async parse(t){let a=JSON.parse(t);a.version!==U2e&&(a=this.migrate(a));const r=await Promise.all(a.data.tabs.map(async n=>{if(n.data.type===Wt.Step&&n.data.draftStep){const i=n.data.draftStep.requestBody.formData;i["multipart/form-data"]=await W2e(i["multipart/form-data"]),i["application/x-www-form-urlencoded"]=await W2e(i["application/x-www-form-urlencoded"]),n.data.draftStep.requestBody.binary&&n.data.draftStep.requestBody.binary.absolutePath&&(n.data.draftStep.requestBody.binary=await mw(n.data.draftStep.requestBody.binary.absolutePath))}return n}));return{...a.data,tabs:r}}stringify(t){return super.stringify({...t,tabs:t.tabs.map(a=>a.data.type===Wt.Step?{...a,data:{...a.data,response:null}}:a.data.type===Wt.WorkflowRun?{...a,data:{...a.data,result:null}}:a)})}}async function W2e(e){return Promise.all(e.map(async t=>{const a={...t};if(t.files){const r=t.files.map(n=>n.absolutePath).filter(n=>n!==null);a.files=await x2e(r)}return a}))}function AAa(e){return{data:e.data.map(t=>({...t,step:{...t.step,security:t.step.security.securities}})),version:2}}const TAa=2,MAa="history.json";class EAa extends jI{migrationMap={1:AAa};constructor(t){super(t,MAa,[],TAa)}}const BAa=1;class J2e{constructor(t,a,r,n,i,o){this.systemFilesStorage=t,this.userFilesStorage=a,this.project=r,this.isApiPersisted=n,this.convertOperationToReplayValue=i,this.telemetry=o,this.localStorageSecretsProvider=new Uya(this.project.id);const s=new Qya;this.historyStorage=new EAa(this.systemFilesStorage),this.activeEnvironmentIdStorage=new jI(this.systemFilesStorage,"active_environment_id.json",vx,BAa),this.tabsStateStorage=new PAa(this.systemFilesStorage),this.environmentsStorage=new OAa(this.userFilesStorage,this.localStorageSecretsProvider),this.collectionsStorage=new wAa(this.userFilesStorage,this.convertOperationToReplayValue),this.apisStorage=new Wya(this.isApiPersisted?this.userFilesStorage:s)}historyStorage;activeEnvironmentIdStorage;tabsStateStorage;environmentsStorage;collectionsStorage;apisStorage;localStorageSecretsProvider;async update(t,a){switch(t.path[0]){case"history":this.historyStorage.write(a.history.get());break;case"activeEnvironmentId":this.activeEnvironmentIdStorage.write(a.activeEnvironmentId.get());break;case"tabsState":this.tabsStateStorage.write(a.tabsState.get());break;case"environments":this.environmentsStorage.write(a.environments.get());break;case"apis":this.isApiPersisted&&await this.apisStorage.update(t,a.apis.get());break;case"collections":await this.collectionsStorage.update(t,a.collections.get());break}}}var Z2e={exports:{}},X2e;function RAa(){return X2e||(X2e=1,(function(e){var t=Object.prototype.hasOwnProperty,a="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(a=!1));function n(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function i(l,c,u,d,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var m=new n(u,d||l,h),v=a?a+c:c;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],m]:l._events[v].push(m):(l._events[v]=m,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],c,u;if(this._eventsCount===0)return l;for(u in c=this._events)t.call(c,u)&&l.push(a?u.slice(1):u);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},s.prototype.listeners=function(l){var c=a?a+l:l,u=this._events[c];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,h=u.length,m=new Array(h);d<h;d++)m[d]=u[d].fn;return m},s.prototype.listenerCount=function(l){var c=a?a+l:l,u=this._events[c];return u?u.fn?1:u.length:0},s.prototype.emit=function(l,c,u,d,h,m){var v=a?a+l:l;if(!this._events[v])return!1;var f=this._events[v],y=arguments.length,b,k;if(f.fn){switch(f.once&&this.removeListener(l,f.fn,void 0,!0),y){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,c),!0;case 3:return f.fn.call(f.context,c,u),!0;case 4:return f.fn.call(f.context,c,u,d),!0;case 5:return f.fn.call(f.context,c,u,d,h),!0;case 6:return f.fn.call(f.context,c,u,d,h,m),!0}for(k=1,b=new Array(y-1);k<y;k++)b[k-1]=arguments[k];f.fn.apply(f.context,b)}else{var w=f.length,C;for(k=0;k<w;k++)switch(f[k].once&&this.removeListener(l,f[k].fn,void 0,!0),y){case 1:f[k].fn.call(f[k].context);break;case 2:f[k].fn.call(f[k].context,c);break;case 3:f[k].fn.call(f[k].context,c,u);break;case 4:f[k].fn.call(f[k].context,c,u,d);break;default:if(!b)for(C=1,b=new Array(y-1);C<y;C++)b[C-1]=arguments[C];f[k].fn.apply(f[k].context,b)}}return!0},s.prototype.on=function(l,c,u){return i(this,l,c,u,!1)},s.prototype.once=function(l,c,u){return i(this,l,c,u,!0)},s.prototype.removeListener=function(l,c,u,d){var h=a?a+l:l;if(!this._events[h])return this;if(!c)return o(this,h),this;var m=this._events[h];if(m.fn)m.fn===c&&(!d||m.once)&&(!u||m.context===u)&&o(this,h);else{for(var v=0,f=[],y=m.length;v<y;v++)(m[v].fn!==c||d&&!m[v].once||u&&m[v].context!==u)&&f.push(m[v]);f.length?this._events[h]=f.length===1?f[0]:f:o(this,h)}return this},s.prototype.removeAllListeners=function(l){var c;return l?(c=a?a+l:l,this._events[c]&&o(this,c)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=a,s.EventEmitter=s,e.exports=s})(Z2e)),Z2e.exports}var _Aa=RAa();const LAa=Xr(_Aa);class Y2e extends Error{constructor(t){super(t),this.name="TimeoutError"}}let DAa=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}};const eCe=e=>globalThis.DOMException===void 0?new DAa(e):new DOMException(e),tCe=e=>{const t=e.reason===void 0?eCe("This operation was aborted."):e.reason;return t instanceof Error?t:eCe(t)};function NAa(e,t,a,r){let n;const i=new Promise((o,s)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(t===Number.POSITIVE_INFINITY){o(e);return}if(r={customTimers:{setTimeout,clearTimeout},...r},r.signal){const{signal:l}=r;l.aborted&&s(tCe(l)),l.addEventListener("abort",()=>{s(tCe(l))})}n=r.customTimers.setTimeout.call(void 0,()=>{const l=`Promise timed out after ${t} milliseconds`,c=a instanceof Error?a:new Y2e(l);typeof e.cancel=="function"&&e.cancel(),s(c)},t),(async()=>{try{o(await e)}catch(l){s(l)}finally{r.customTimers.clearTimeout.call(void 0,n)}})()});return i.clear=()=>{clearTimeout(n),n=void 0},i}function $Aa(e,t,a){let r=0,n=e.length;for(;n>0;){const i=Math.trunc(n/2);let o=r+i;a(e[o],t)<=0?(r=++o,n-=i+1):n=i}return r}var nf=function(e,t,a,r){if(a==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?r:a==="a"?r.call(e):r?r.value:t.get(e)},yp;class IAa{constructor(){yp.set(this,[])}enqueue(t,a){a={priority:0,...a};const r={priority:a.priority,run:t};if(this.size&&nf(this,yp,"f")[this.size-1].priority>=a.priority){nf(this,yp,"f").push(r);return}const n=$Aa(nf(this,yp,"f"),r,(i,o)=>o.priority-i.priority);nf(this,yp,"f").splice(n,0,r)}dequeue(){return nf(this,yp,"f").shift()?.run}filter(t){return nf(this,yp,"f").filter(a=>a.priority===t.priority).map(a=>a.run)}get size(){return nf(this,yp,"f").length}}yp=new WeakMap;var Kn=function(e,t,a,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(e,a):n?n.value=a:t.set(e,a),a},Ht=function(e,t,a,r){if(a==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?r:a==="a"?r.call(e):r?r.value:t.get(e)},ui,gw,fw,mm,b3,vw,y3,ru,bw,Nl,k3,$l,yw,gm,x3,aCe,rCe,nCe,iCe,oCe,w3,PI,AI,O3,sCe,z3;class lCe extends Error{}class KAa extends LAa{constructor(t){var a,r,n,i;if(super(),ui.add(this),gw.set(this,void 0),fw.set(this,void 0),mm.set(this,0),b3.set(this,void 0),vw.set(this,void 0),y3.set(this,0),ru.set(this,void 0),bw.set(this,void 0),Nl.set(this,void 0),k3.set(this,void 0),$l.set(this,0),yw.set(this,void 0),gm.set(this,void 0),x3.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:IAa,...t},!(typeof t.intervalCap=="number"&&t.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(r=(a=t.intervalCap)===null||a===void 0?void 0:a.toString())!==null&&r!==void 0?r:""}\` (${typeof t.intervalCap})`);if(t.interval===void 0||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(i=(n=t.interval)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:""}\` (${typeof t.interval})`);Kn(this,gw,t.carryoverConcurrencyCount,"f"),Kn(this,fw,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0,"f"),Kn(this,b3,t.intervalCap,"f"),Kn(this,vw,t.interval,"f"),Kn(this,Nl,new t.queueClass,"f"),Kn(this,k3,t.queueClass,"f"),this.concurrency=t.concurrency,this.timeout=t.timeout,Kn(this,x3,t.throwOnTimeout===!0,"f"),Kn(this,gm,t.autoStart===!1,"f")}get concurrency(){return Ht(this,yw,"f")}set concurrency(t){if(!(typeof t=="number"&&t>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);Kn(this,yw,t,"f"),Ht(this,ui,"m",O3).call(this)}async add(t,a={}){return a={timeout:this.timeout,throwOnTimeout:Ht(this,x3,"f"),...a},new Promise((r,n)=>{Ht(this,Nl,"f").enqueue(async()=>{var i,o,s;Kn(this,$l,(o=Ht(this,$l,"f"),o++,o),"f"),Kn(this,mm,(s=Ht(this,mm,"f"),s++,s),"f");try{if(!((i=a.signal)===null||i===void 0)&&i.aborted)throw new lCe("The task was aborted.");let l=t({signal:a.signal});a.timeout&&(l=NAa(Promise.resolve(l),a.timeout)),a.signal&&(l=Promise.race([l,Ht(this,ui,"m",sCe).call(this,a.signal)]));const c=await l;r(c),this.emit("completed",c)}catch(l){if(l instanceof Y2e&&!a.throwOnTimeout){r();return}n(l),this.emit("error",l)}finally{Ht(this,ui,"m",nCe).call(this)}},a),this.emit("add"),Ht(this,ui,"m",w3).call(this)})}async addAll(t,a){return Promise.all(t.map(async r=>this.add(r,a)))}start(){return Ht(this,gm,"f")?(Kn(this,gm,!1,"f"),Ht(this,ui,"m",O3).call(this),this):this}pause(){Kn(this,gm,!0,"f")}clear(){Kn(this,Nl,new(Ht(this,k3,"f")),"f")}async onEmpty(){Ht(this,Nl,"f").size!==0&&await Ht(this,ui,"m",z3).call(this,"empty")}async onSizeLessThan(t){Ht(this,Nl,"f").size<t||await Ht(this,ui,"m",z3).call(this,"next",()=>Ht(this,Nl,"f").size<t)}async onIdle(){Ht(this,$l,"f")===0&&Ht(this,Nl,"f").size===0||await Ht(this,ui,"m",z3).call(this,"idle")}get size(){return Ht(this,Nl,"f").size}sizeBy(t){return Ht(this,Nl,"f").filter(t).length}get pending(){return Ht(this,$l,"f")}get isPaused(){return Ht(this,gm,"f")}}gw=new WeakMap,fw=new WeakMap,mm=new WeakMap,b3=new WeakMap,vw=new WeakMap,y3=new WeakMap,ru=new WeakMap,bw=new WeakMap,Nl=new WeakMap,k3=new WeakMap,$l=new WeakMap,yw=new WeakMap,gm=new WeakMap,x3=new WeakMap,ui=new WeakSet,aCe=function(){return Ht(this,fw,"f")||Ht(this,mm,"f")<Ht(this,b3,"f")},rCe=function(){return Ht(this,$l,"f")<Ht(this,yw,"f")},nCe=function(){var e;Kn(this,$l,(e=Ht(this,$l,"f"),e--,e),"f"),Ht(this,ui,"m",w3).call(this),this.emit("next")},iCe=function(){Ht(this,ui,"m",AI).call(this),Ht(this,ui,"m",PI).call(this),Kn(this,bw,void 0,"f")},oCe=function(){const e=Date.now();if(Ht(this,ru,"f")===void 0){const t=Ht(this,y3,"f")-e;if(t<0)Kn(this,mm,Ht(this,gw,"f")?Ht(this,$l,"f"):0,"f");else return Ht(this,bw,"f")===void 0&&Kn(this,bw,setTimeout(()=>{Ht(this,ui,"m",iCe).call(this)},t),"f"),!0}return!1},w3=function(){if(Ht(this,Nl,"f").size===0)return Ht(this,ru,"f")&&clearInterval(Ht(this,ru,"f")),Kn(this,ru,void 0,"f"),this.emit("empty"),Ht(this,$l,"f")===0&&this.emit("idle"),!1;if(!Ht(this,gm,"f")){const e=!Ht(this,ui,"a",oCe);if(Ht(this,ui,"a",aCe)&&Ht(this,ui,"a",rCe)){const t=Ht(this,Nl,"f").dequeue();return t?(this.emit("active"),t(),e&&Ht(this,ui,"m",PI).call(this),!0):!1}}return!1},PI=function(){Ht(this,fw,"f")||Ht(this,ru,"f")!==void 0||(Kn(this,ru,setInterval(()=>{Ht(this,ui,"m",AI).call(this)},Ht(this,vw,"f")),"f"),Kn(this,y3,Date.now()+Ht(this,vw,"f"),"f"))},AI=function(){Ht(this,mm,"f")===0&&Ht(this,$l,"f")===0&&Ht(this,ru,"f")&&(clearInterval(Ht(this,ru,"f")),Kn(this,ru,void 0,"f")),Kn(this,mm,Ht(this,gw,"f")?Ht(this,$l,"f"):0,"f"),Ht(this,ui,"m",O3).call(this)},O3=function(){for(;Ht(this,ui,"m",w3).call(this););},sCe=async function(e){return new Promise((t,a)=>{e.addEventListener("abort",()=>{a(new lCe("The task was aborted."))},{once:!0})})},z3=async function(e,t){return new Promise(a=>{const r=()=>{t&&!t()||(this.off(e,r),a())};this.on(e,r)})};const kp=window.__TAURI__?.http.fetch??globalThis.fetch;class cCe extends hP{constructor(){super()}resolveExternalRef(t,a){return g3(a)?a:t&&g3(t)?new URL(a,t).href:t?Um.resolve(Um.dirname(t),a):a}async loadExternalRef(t){if(g3(t)){const{body:a,mimeType:r}=await poe(t,{...this.config.http,customFetch:kp});return new sb(t,a,r)}else{if(!await cD(t))throw new Error(`File not found at ${t}.`);try{throw await lD(t),new Error(`Expected a file but received a folder at ${t}.`)}catch(r){if(r instanceof Error&&r.message.includes("Expected a file but received a folder"))throw r}const a=await DA(t);return new sb(t,a.replace(/\r\n/g,`
|
|
12043
|
-
`))}}}async function TI(e,t){const a=new iM({});a.getRulesForSpecVersion=()=>[];const r=await Jr.dirname(e),n={config:a,base:r,externalRefResolver:new cCe,dereference:!0};t?n.doc={source:{absoluteRef:e},parsed:t}:n.ref=e;const{bundle:{parsed:i}}=await KR(n);return i}class VAa{constructor(t){this.apisStorage=t}data=new Map;loading=new Set;pQueue=new KAa({concurrency:20});async get(t){return this.data.has(t)?this.data.get(t):(await this.loadAndParse(t),this.data.get(t))}async load(t){this.data.has(t)||await this.loadAndParse(t)}async loadAndParse(t){if(this.loading.has(t))return await this.pQueue.add(()=>this.get(t));this.loading.add(t),await this.pQueue.add(async()=>{const a=f3(t)?As.WEB:As.FS,r=a===As.WEB?t:await this.apisStorage.getAbsolutePath(t);try{const n=await TI(r);if(!n){this.data.set(t,void 0);return}const i=this.apisStorage.parse({uri:t,type:a,content:n});this.data.set(t,i)}catch(n){console.error("Error loading api "+t,n),this.data.set(t,void 0);return}}),this.loading.delete(t)}get size(){return this.data.size}delete(t){this.data.delete(t)}getAll(){return Array.from(this.data.values()).filter(t=>t!==void 0)}clear(){this.data.clear(),this.loading.clear()}}class HAa extends J2e{apiLoader;constructor(t,a,r){const n=new hke(t.systemFilesDir),i=new hke(t.userFilesDir);super(n,i,t,!0,a,r),this.apiLoader=new VAa(this.apisStorage)}async read(){const t=this.telemetry?.startSpan("storage.read",void 0,void 0),a=this.telemetry?.startSpan("storage.loadUserState",{},t?.parentCtx),[r,n,i,o]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]);a?.setAttribute("status","completed"),a?.setAttribute("historyCount",r.length),a?.setAttribute("environmentCount",o.length),a?.setStatus(ko.OK),a?.end();const{apiFiles:s,collectionFiles:l}=await this.detectProjectFiles(t);await this.loadAndParseApis(s,t);const c=await this.loadAndParseCollections(l,t);this.collectionsStorage.setItemIds(c.map(d=>d.id));const u=this.apiLoader.getAll();return this.apisStorage.setItemIds(u.map(d=>d.id)),this.apiLoader.clear(),t?.setAttribute("status","completed"),t?.setStatus(ko.OK),t?.end(),{project:this.project,history:r,activeEnvironmentId:n,tabsState:i,environments:o,apis:u,collections:c}}async detectProjectFiles(t){const a=this.telemetry?.startSpan("storage.detectFiles",{},t?.parentCtx),{api_files:r,collection_files:n}=await Jh("fs_scan",{dir:this.project.userFilesDir});return a?.setAttribute("status","completed"),a?.setAttribute("filesCount",r.length+n.length),a?.setAttribute("apiFilesCount",r.length),a?.setAttribute("collectionFilesCount",n.length),a?.setStatus(ko.OK),a?.end(),{apiFiles:r,collectionFiles:n}}async loadAndParseApis(t,a){const r=this.telemetry?.startSpan("storage.parseApis",{apisCount:t.length},a?.parentCtx);await ike(t,20,async n=>{try{await this.apiLoader.load(n.relative_path)}catch(i){return console.error(`Error parsing YAML/JSON file ${n.absolute_path}:`,i),null}}),r?.setAttribute("status","completed"),r?.setAttribute("parsedApisCount",this.apiLoader.size),r?.setStatus(ko.OK),r?.end()}async loadAndParseCollections(t,a){const r=this.telemetry?.startSpan("storage.parseCollections",{collectionsCount:t.length},a?.parentCtx),n=await ike(t,20,async i=>{try{const o=await this.userFilesStorage.get(i.relative_path);if(!o)return null;const s=Fd.load(o??"");if(typeof s!="object"||s===null||typeof s.arazzo!="string")return null;const l=[];return await Promise.all(s.sourceDescriptions?.map(async c=>{const u=c.type,d=c.url,h=!u||u==="openapi",m=await z2e({projectPath:this.project.userFilesDir,apiUrl:d,collectionId:i.relative_path});if(h){const v=await this.apiLoader.get(m);v&&l.push(v)}})),await this.collectionsStorage.parse({uri:i.relative_path,type:As.FS,content:s},l)}catch(o){return console.error(`Error parsing Arazzo file ${i.relative_path}:`,o),null}});return r?.setAttribute("status","completed"),r?.setAttribute("parsedCollectionsCount",n.length),r?.setStatus(ko.OK),r?.end(),n.filter(i=>i!==null)}}class uCe{constructor(t){this.baseDir=t}async ls(t=""){const a=this.makeKey(t);return Object.keys(localStorage).filter(r=>r.startsWith(a)).map(r=>r.replace(a,""))}async get(t){const a=this.makeKey(t);return localStorage.getItem(a)??null}async set(t,a){const r=this.makeKey(t);localStorage.setItem(r,a)}async remove(t){const a=this.makeKey(t);localStorage.removeItem(a)}makeKey(t){return`replay:fs:${this.baseDir}/${t}`}}class FAa extends J2e{constructor(t,a,r){const n=new uCe(t.systemFilesDir),i=new uCe(t.userFilesDir);super(n,i,t,!1,a,r)}async detectProjectFiles(t){const a=this.telemetry?.startSpan("storage.detectFiles",{},t?.parentCtx),r=(await this.userFilesStorage.ls()).filter(s=>/\.(ya?ml|json)$/.test(s)),n=[],i=[],o=new Set;return await Promise.all(r.map(async s=>{const l=await this.userFilesStorage.get(s);if(l)try{const c=Fd.load(l);if(typeof c=="object"&&c!==null)if(typeof c.openapi=="string"){const u=await Jr.resolve(await Jr.join(this.userFilesStorage.baseDir,s)),d=await TI(u,c);n.push({uri:s,type:As.FS,content:d})}else typeof c.arazzo=="string"&&(i.push({uri:s,type:As.FS,content:c}),c.sourceDescriptions?.forEach(u=>{const d=u.type,h=u.url,m=!d||d==="openapi",v=typeof h=="string"&&f3(h);m&&v&&o.add(h)}))}catch(c){console.error(`Error parsing YAML/JSON file ${s}:`,c)}})),a?.setAttribute("status","completed"),a?.setAttribute("filesCount",r.length),a?.setAttribute("apiFilesCount",n.length),a?.setAttribute("collectionFilesCount",i.length),a?.setAttribute("apiUrlsCount",o.size),a?.setStatus(ko.OK),a?.end(),{apiFiles:n,collectionFiles:i,apiUrls:o}}async loadApis(t,a){const r=this.telemetry?.startSpan("storage.loadApis",{apiUrlsCount:t.size},a?.parentCtx),n=[];return await Promise.all(Array.from(t).map(async i=>{try{const o=await TI(i);n.push({uri:i,type:As.WEB,content:o})}catch(o){console.error(`Error parsing YAML from ${i}:`,o)}})),r?.setAttribute("status","completed"),r?.setStatus(ko.OK),r?.end(),n}async parseApis(t,a){const r=this.telemetry?.startSpan("storage.parseApis",{apisCount:t.length},a?.parentCtx),n=await this.apisStorage.parseMany(t);return r?.setAttribute("status","completed"),r?.setAttribute("parsedApisCount",n.length),r?.setStatus(ko.OK),r?.end(),n}async parseCollections(t,a,r){const n=this.telemetry?.startSpan("storage.parseCollections",{collectionsCount:t.length},r?.parentCtx),i=await this.collectionsStorage.parseMany(t,a);return n?.setAttribute("status","completed"),n?.setAttribute("parsedCollectionsCount",i.length),n?.setStatus(ko.OK),n?.end(),i}async read(){const t=this.telemetry?.startSpan("storage.read",void 0,void 0),a=this.telemetry?.startSpan("storage.loadUserState",{},t?.parentCtx),[r,n,i,o]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]);a?.setAttribute("status","completed"),a?.setAttribute("historyCount",r.length),a?.setAttribute("environmentCount",o.length),a?.setStatus(ko.OK),a?.end();const{apiFiles:s,collectionFiles:l,apiUrls:c}=await this.detectProjectFiles(t),u=await this.loadApis(c,t),d=await this.parseApis([...s,...u],t);this.apisStorage.setItemIds(d.map(m=>m.id));const h=await this.parseCollections(l,d,t);return this.collectionsStorage.setItemIds(h.map(m=>m.id)),t?.setAttribute("status","completed"),t?.setStatus(ko.OK),t?.end(),{project:this.project,history:r,activeEnvironmentId:n,tabsState:i,environments:o,apis:d,collections:h}}}function GAa(e=!1){let t,a=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async(n,i,o)=>{if(a||r.path.length>0)return{isInitialized:!1};if(a=!0,!e){t=sp()?new HAa(n,i,o):new FAa(n,i,o);const s=await t.read();r.merge(s)}return a=!1,{isInitialized:!0}}}),onSet(r,n,i){a||e||t.update(n,i)}})}function qAa({defaultEnvironments:e}={}){return structuredClone({project:{id:"default",userFilesDir:"default",systemFilesDir:"default"},history:[],tabsState:op(rke),activeEnvironmentId:vx,environments:e||ake,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:Wu.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const QAa=ect(qAa(),tct(Hya({key:"replay-root-store"}),GAa())),dCe=T.createContext(QAa);function Aa(){const e=T.useContext(dCe);return eoe(e)}function UAa(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[],hideOtherSecuritySchemes:!1}}const WAa=UAa(),JAa=T.createContext(WAa);function nu(){const e=T.useContext(JAa);return eoe(e)}function ZAa(e,t){const{apps:{apiId:a}}=Aa(),{corsProxyUrl:r,disableCollectionsTab:n,mockServer:i,oAuth2RedirectURI:o,certificates:s,storageKey:l,isApiBased:c}=nu();r.set(e?.corsProxyUrl??$ya),i.set(e?.mockServer),a.set(e?.apiId),o.set(e?.oAuth2RedirectURI),n.set(!!e?.disableCollectionsTab),l.set(e?.storageKey),c.set(!!t),T.useEffect(()=>{s.set(e?.certificates||[])},[e?.certificates])}const pCe=T.createContext({});function of(){return T.useContext(pCe)||{}}const XAa="0.20.0-next.5",YAa={version:XAa};class hCe{_client;_isInitialized=!1;_initResolve=null;_initPromise=new Promise(t=>{this._initResolve=t});_globalAttributes={platform:"",deviceId:""};constructor(){this._client=new Nya}get isInitialized(){return this._isInitialized}get client(){return this._client}awaitInit(){return this._initPromise}updateCloudEventData(t){this._client.updateCloudEventData(t)}enrichGlobalAttributes(t){this._globalAttributes={...this._globalAttributes,...t}}getGlobalAttributes(){return{...this._globalAttributes}}clearGlobalAttributes(){this._globalAttributes={platform:"",deviceId:""}}init(t){if(this.isInitialized)return;const a=!0,r=t?.tracerName||"desktop",n=t?.enableErrorInstrumentation??r==="desktop",i={serviceName:"replay",serviceVersion:YAa.version,version:"1.0.0",tracerName:r,collectorUrl:"",isProd:a,enableErrorInstrumentation:n};this._client.init({otel:{...i,...t}}),this._initResolve?.(this),this._isInitialized=!0}sendEvent(t,a){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}const r={...this._globalAttributes,...a};try{this.client.send(t,r)}catch(n){console.error("Failed to send telemetry event:",n)}}startSpan(t,a,r){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{return this._client.startSpan(t,{...this._globalAttributes,...a},r)}catch(n){console.error("Failed to start telemetry span:",n);return}}}const S3=new hCe;function pa(){const{telemetry:e}=of();return S3.isInitialized||S3.init(e),{sendEvent:(t,a)=>{S3.sendEvent(t,a)},startSpan:(t,a,r)=>S3.startSpan(t,a,r)}}const as=800,ll=H(Xe).attrs({variant:"text",size:"small",tone:"danger"})`
|
|
12043
|
+
`))}}}async function TI(e,t){const a=new iM({});a.getRulesForSpecVersion=()=>[];const r=await Jr.dirname(e),n={config:a,base:r,externalRefResolver:new cCe,dereference:!0};t?n.doc={source:{absoluteRef:e},parsed:t}:n.ref=e;const{bundle:{parsed:i}}=await KR(n);return i}class VAa{constructor(t){this.apisStorage=t}data=new Map;loading=new Set;pQueue=new KAa({concurrency:20});async get(t){return this.data.has(t)?this.data.get(t):(await this.loadAndParse(t),this.data.get(t))}async load(t){this.data.has(t)||await this.loadAndParse(t)}async loadAndParse(t){if(this.loading.has(t))return await this.pQueue.add(()=>this.get(t));this.loading.add(t),await this.pQueue.add(async()=>{const a=f3(t)?As.WEB:As.FS,r=a===As.WEB?t:await this.apisStorage.getAbsolutePath(t);try{const n=await TI(r);if(!n){this.data.set(t,void 0);return}const i=this.apisStorage.parse({uri:t,type:a,content:n});this.data.set(t,i)}catch(n){console.error("Error loading api "+t,n),this.data.set(t,void 0);return}}),this.loading.delete(t)}get size(){return this.data.size}delete(t){this.data.delete(t)}getAll(){return Array.from(this.data.values()).filter(t=>t!==void 0)}clear(){this.data.clear(),this.loading.clear()}}class HAa extends J2e{apiLoader;constructor(t,a,r){const n=new hke(t.systemFilesDir),i=new hke(t.userFilesDir);super(n,i,t,!0,a,r),this.apiLoader=new VAa(this.apisStorage)}async read(){const t=this.telemetry?.startSpan("storage.read",void 0,void 0),a=this.telemetry?.startSpan("storage.loadUserState",{},t?.parentCtx),[r,n,i,o]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]);a?.setAttribute("status","completed"),a?.setAttribute("historyCount",r.length),a?.setAttribute("environmentCount",o.length),a?.setStatus(ko.OK),a?.end();const{apiFiles:s,collectionFiles:l}=await this.detectProjectFiles(t);await this.loadAndParseApis(s,t);const c=await this.loadAndParseCollections(l,t);this.collectionsStorage.setItemIds(c.map(d=>d.id));const u=this.apiLoader.getAll();return this.apisStorage.setItemIds(u.map(d=>d.id)),this.apiLoader.clear(),t?.setAttribute("status","completed"),t?.setStatus(ko.OK),t?.end(),{project:this.project,history:r,activeEnvironmentId:n,tabsState:i,environments:o,apis:u,collections:c}}async detectProjectFiles(t){const a=this.telemetry?.startSpan("storage.detectFiles",{},t?.parentCtx),{api_files:r,collection_files:n}=await Jh("fs_scan",{dir:this.project.userFilesDir});return a?.setAttribute("status","completed"),a?.setAttribute("filesCount",r.length+n.length),a?.setAttribute("apiFilesCount",r.length),a?.setAttribute("collectionFilesCount",n.length),a?.setStatus(ko.OK),a?.end(),{apiFiles:r,collectionFiles:n}}async loadAndParseApis(t,a){const r=this.telemetry?.startSpan("storage.parseApis",{apisCount:t.length},a?.parentCtx);await ike(t,20,async n=>{try{await this.apiLoader.load(n.relative_path)}catch(i){return console.error(`Error parsing YAML/JSON file ${n.absolute_path}:`,i),null}}),r?.setAttribute("status","completed"),r?.setAttribute("parsedApisCount",this.apiLoader.size),r?.setStatus(ko.OK),r?.end()}async loadAndParseCollections(t,a){const r=this.telemetry?.startSpan("storage.parseCollections",{collectionsCount:t.length},a?.parentCtx),n=await ike(t,20,async i=>{try{const o=await this.userFilesStorage.get(i.relative_path);if(!o)return null;const s=Fd.load(o??"");if(typeof s!="object"||s===null||typeof s.arazzo!="string")return null;const l=[];return await Promise.all(s.sourceDescriptions?.map(async c=>{const u=c.type,d=c.url,h=!u||u==="openapi",m=await z2e({projectPath:this.project.userFilesDir,apiUrl:d,collectionId:i.relative_path});if(h){const v=await this.apiLoader.get(m);v&&l.push(v)}})),await this.collectionsStorage.parse({uri:i.relative_path,type:As.FS,content:s},l)}catch(o){return console.error(`Error parsing Arazzo file ${i.relative_path}:`,o),null}});return r?.setAttribute("status","completed"),r?.setAttribute("parsedCollectionsCount",n.length),r?.setStatus(ko.OK),r?.end(),n.filter(i=>i!==null)}}class uCe{constructor(t){this.baseDir=t}async ls(t=""){const a=this.makeKey(t);return Object.keys(localStorage).filter(r=>r.startsWith(a)).map(r=>r.replace(a,""))}async get(t){const a=this.makeKey(t);return localStorage.getItem(a)??null}async set(t,a){const r=this.makeKey(t);localStorage.setItem(r,a)}async remove(t){const a=this.makeKey(t);localStorage.removeItem(a)}makeKey(t){return`replay:fs:${this.baseDir}/${t}`}}class FAa extends J2e{constructor(t,a,r){const n=new uCe(t.systemFilesDir),i=new uCe(t.userFilesDir);super(n,i,t,!1,a,r)}async detectProjectFiles(t){const a=this.telemetry?.startSpan("storage.detectFiles",{},t?.parentCtx),r=(await this.userFilesStorage.ls()).filter(s=>/\.(ya?ml|json)$/.test(s)),n=[],i=[],o=new Set;return await Promise.all(r.map(async s=>{const l=await this.userFilesStorage.get(s);if(l)try{const c=Fd.load(l);if(typeof c=="object"&&c!==null)if(typeof c.openapi=="string"){const u=await Jr.resolve(await Jr.join(this.userFilesStorage.baseDir,s)),d=await TI(u,c);n.push({uri:s,type:As.FS,content:d})}else typeof c.arazzo=="string"&&(i.push({uri:s,type:As.FS,content:c}),c.sourceDescriptions?.forEach(u=>{const d=u.type,h=u.url,m=!d||d==="openapi",v=typeof h=="string"&&f3(h);m&&v&&o.add(h)}))}catch(c){console.error(`Error parsing YAML/JSON file ${s}:`,c)}})),a?.setAttribute("status","completed"),a?.setAttribute("filesCount",r.length),a?.setAttribute("apiFilesCount",n.length),a?.setAttribute("collectionFilesCount",i.length),a?.setAttribute("apiUrlsCount",o.size),a?.setStatus(ko.OK),a?.end(),{apiFiles:n,collectionFiles:i,apiUrls:o}}async loadApis(t,a){const r=this.telemetry?.startSpan("storage.loadApis",{apiUrlsCount:t.size},a?.parentCtx),n=[];return await Promise.all(Array.from(t).map(async i=>{try{const o=await TI(i);n.push({uri:i,type:As.WEB,content:o})}catch(o){console.error(`Error parsing YAML from ${i}:`,o)}})),r?.setAttribute("status","completed"),r?.setStatus(ko.OK),r?.end(),n}async parseApis(t,a){const r=this.telemetry?.startSpan("storage.parseApis",{apisCount:t.length},a?.parentCtx),n=await this.apisStorage.parseMany(t);return r?.setAttribute("status","completed"),r?.setAttribute("parsedApisCount",n.length),r?.setStatus(ko.OK),r?.end(),n}async parseCollections(t,a,r){const n=this.telemetry?.startSpan("storage.parseCollections",{collectionsCount:t.length},r?.parentCtx),i=await this.collectionsStorage.parseMany(t,a);return n?.setAttribute("status","completed"),n?.setAttribute("parsedCollectionsCount",i.length),n?.setStatus(ko.OK),n?.end(),i}async read(){const t=this.telemetry?.startSpan("storage.read",void 0,void 0),a=this.telemetry?.startSpan("storage.loadUserState",{},t?.parentCtx),[r,n,i,o]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]);a?.setAttribute("status","completed"),a?.setAttribute("historyCount",r.length),a?.setAttribute("environmentCount",o.length),a?.setStatus(ko.OK),a?.end();const{apiFiles:s,collectionFiles:l,apiUrls:c}=await this.detectProjectFiles(t),u=await this.loadApis(c,t),d=await this.parseApis([...s,...u],t);this.apisStorage.setItemIds(d.map(m=>m.id));const h=await this.parseCollections(l,d,t);return this.collectionsStorage.setItemIds(h.map(m=>m.id)),t?.setAttribute("status","completed"),t?.setStatus(ko.OK),t?.end(),{project:this.project,history:r,activeEnvironmentId:n,tabsState:i,environments:o,apis:d,collections:h}}}function GAa(e=!1){let t,a=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async(n,i,o)=>{if(a||r.path.length>0)return{isInitialized:!1};if(a=!0,!e){t=sp()?new HAa(n,i,o):new FAa(n,i,o);const s=await t.read();r.merge(s)}return a=!1,{isInitialized:!0}}}),onSet(r,n,i){a||e||t.update(n,i)}})}function qAa({defaultEnvironments:e}={}){return structuredClone({project:{id:"default",userFilesDir:"default",systemFilesDir:"default"},history:[],tabsState:op(rke),activeEnvironmentId:vx,environments:e||ake,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:Wu.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const QAa=ect(qAa(),tct(Hya({key:"replay-root-store"}),GAa())),dCe=T.createContext(QAa);function Aa(){const e=T.useContext(dCe);return eoe(e)}function UAa(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[],hideOtherSecuritySchemes:!1}}const WAa=UAa(),JAa=T.createContext(WAa);function nu(){const e=T.useContext(JAa);return eoe(e)}function ZAa(e,t){const{apps:{apiId:a}}=Aa(),{corsProxyUrl:r,disableCollectionsTab:n,mockServer:i,oAuth2RedirectURI:o,certificates:s,storageKey:l,isApiBased:c}=nu();r.set(e?.corsProxyUrl??$ya),i.set(e?.mockServer),a.set(e?.apiId),o.set(e?.oAuth2RedirectURI),n.set(!!e?.disableCollectionsTab),l.set(e?.storageKey),c.set(!!t),T.useEffect(()=>{s.set(e?.certificates||[])},[e?.certificates])}const pCe=T.createContext({});function of(){return T.useContext(pCe)||{}}const XAa="0.20.0",YAa={version:XAa};class hCe{_client;_isInitialized=!1;_initResolve=null;_initPromise=new Promise(t=>{this._initResolve=t});_globalAttributes={platform:"",deviceId:""};constructor(){this._client=new Nya}get isInitialized(){return this._isInitialized}get client(){return this._client}awaitInit(){return this._initPromise}updateCloudEventData(t){this._client.updateCloudEventData(t)}enrichGlobalAttributes(t){this._globalAttributes={...this._globalAttributes,...t}}getGlobalAttributes(){return{...this._globalAttributes}}clearGlobalAttributes(){this._globalAttributes={platform:"",deviceId:""}}init(t){if(this.isInitialized)return;const a=!0,r=t?.tracerName||"desktop",n=t?.enableErrorInstrumentation??r==="desktop",i={serviceName:"replay",serviceVersion:YAa.version,version:"1.0.0",tracerName:r,collectorUrl:"",isProd:a,enableErrorInstrumentation:n};this._client.init({otel:{...i,...t}}),this._initResolve?.(this),this._isInitialized=!0}sendEvent(t,a){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}const r={...this._globalAttributes,...a};try{this.client.send(t,r)}catch(n){console.error("Failed to send telemetry event:",n)}}startSpan(t,a,r){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{return this._client.startSpan(t,{...this._globalAttributes,...a},r)}catch(n){console.error("Failed to start telemetry span:",n);return}}}const S3=new hCe;function pa(){const{telemetry:e}=of();return S3.isInitialized||S3.init(e),{sendEvent:(t,a)=>{S3.sendEvent(t,a)},startSpan:(t,a,r)=>S3.startSpan(t,a,r)}}const as=800,ll=H(Xe).attrs({variant:"text",size:"small",tone:"danger"})`
|
|
12044
12044
|
border: none;
|
|
12045
12045
|
margin: 0;
|
|
12046
12046
|
|