@redocly/openapi-docs 3.15.0-next.12 → 3.15.0-next.13

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.
@@ -2,7 +2,7 @@
2
2
  * @license Redocly OpenAPI Docs
3
3
  * (c) Copyright 2025 Redocly LLC, all rights reserved.
4
4
  * -------------------------------------------------------------
5
- * Version: 3.15.0-next.12
5
+ * Version: 3.15.0-next.13
6
6
  **/function EF(e,a){for(var t=0;t<a.length;t++){const r=a[t];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const i=Object.getOwnPropertyDescriptor(r,n);i&&Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Vr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _F(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var a=e.default;if(typeof a=="function"){var t=function r(){var n=!1;try{n=this instanceof r}catch{}return n?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};t.prototype=a.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),t}var LF={exports:{}},tk={};/**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -10274,7 +10274,7 @@ ${n.indent}`,variablesPrefix:n.variablesPrefix,capitalize:!0,lang:Rt.PHP});p.len
10274
10274
  *
10275
10275
  * @author Feross Aboukhadijeh <https://feross.org>
10276
10276
  * @license MIT
10277
- */var Ate;function c1(){return Ate||(Ate=1,(function(e){const a=Iaa(),t=Kaa(),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 E=new Uint8Array(1),ae={foo:function(){return 42}};return Object.setPrototypeOf(ae,Uint8Array.prototype),Object.setPrototypeOf(E,ae),E.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(E){if(E>n)throw new RangeError('The value "'+E+'" is invalid for option "size"');const ae=new Uint8Array(E);return Object.setPrototypeOf(ae,s.prototype),ae}function s(E,ae,le){if(typeof E=="number"){if(typeof ae=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(E)}return l(E,ae,le)}s.poolSize=8192;function l(E,ae,le){if(typeof E=="string")return p(E,ae);if(ArrayBuffer.isView(E))return g(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(he(E,ArrayBuffer)||E&&he(E.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(E,SharedArrayBuffer)||E&&he(E.buffer,SharedArrayBuffer)))return b(E,ae,le);if(typeof E=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ce=E.valueOf&&E.valueOf();if(Ce!=null&&Ce!==E)return s.from(Ce,ae,le);const Me=y(E);if(Me)return Me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]=="function")return s.from(E[Symbol.toPrimitive]("string"),ae,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}s.from=function(E,ae,le){return l(E,ae,le)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(E){if(typeof E!="number")throw new TypeError('"size" argument must be of type number');if(E<0)throw new RangeError('The value "'+E+'" is invalid for option "size"')}function u(E,ae,le){return c(E),E<=0?o(E):ae!==void 0?typeof le=="string"?o(E).fill(ae,le):o(E).fill(ae):o(E)}s.alloc=function(E,ae,le){return u(E,ae,le)};function d(E){return c(E),o(E<0?0:v(E)|0)}s.allocUnsafe=function(E){return d(E)},s.allocUnsafeSlow=function(E){return d(E)};function p(E,ae){if((typeof ae!="string"||ae==="")&&(ae="utf8"),!s.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);const le=z(E,ae)|0;let Ce=o(le);const Me=Ce.write(E,ae);return Me!==le&&(Ce=Ce.slice(0,Me)),Ce}function m(E){const ae=E.length<0?0:v(E.length)|0,le=o(ae);for(let Ce=0;Ce<ae;Ce+=1)le[Ce]=E[Ce]&255;return le}function g(E){if(he(E,Uint8Array)){const ae=new Uint8Array(E);return b(ae.buffer,ae.byteOffset,ae.byteLength)}return m(E)}function b(E,ae,le){if(ae<0||E.byteLength<ae)throw new RangeError('"offset" is outside of buffer bounds');if(E.byteLength<ae+(le||0))throw new RangeError('"length" is outside of buffer bounds');let Ce;return ae===void 0&&le===void 0?Ce=new Uint8Array(E):le===void 0?Ce=new Uint8Array(E,ae):Ce=new Uint8Array(E,ae,le),Object.setPrototypeOf(Ce,s.prototype),Ce}function y(E){if(s.isBuffer(E)){const ae=v(E.length)|0,le=o(ae);return le.length===0||E.copy(le,0,0,ae),le}if(E.length!==void 0)return typeof E.length!="number"||xe(E.length)?o(0):m(E);if(E.type==="Buffer"&&Array.isArray(E.data))return m(E.data)}function v(E){if(E>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return E|0}function k(E){return+E!=E&&(E=0),s.alloc(+E)}s.isBuffer=function(E){return E!=null&&E._isBuffer===!0&&E!==s.prototype},s.compare=function(E,ae){if(he(E,Uint8Array)&&(E=s.from(E,E.offset,E.byteLength)),he(ae,Uint8Array)&&(ae=s.from(ae,ae.offset,ae.byteLength)),!s.isBuffer(E)||!s.isBuffer(ae))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(E===ae)return 0;let le=E.length,Ce=ae.length;for(let Me=0,Te=Math.min(le,Ce);Me<Te;++Me)if(E[Me]!==ae[Me]){le=E[Me],Ce=ae[Me];break}return le<Ce?-1:Ce<le?1:0},s.isEncoding=function(E){switch(String(E).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(E,ae){if(!Array.isArray(E))throw new TypeError('"list" argument must be an Array of Buffers');if(E.length===0)return s.alloc(0);let le;if(ae===void 0)for(ae=0,le=0;le<E.length;++le)ae+=E[le].length;const Ce=s.allocUnsafe(ae);let Me=0;for(le=0;le<E.length;++le){let Te=E[le];if(he(Te,Uint8Array))Me+Te.length>Ce.length?(s.isBuffer(Te)||(Te=s.from(Te)),Te.copy(Ce,Me)):Uint8Array.prototype.set.call(Ce,Te,Me);else if(s.isBuffer(Te))Te.copy(Ce,Me);else throw new TypeError('"list" argument must be an Array of Buffers');Me+=Te.length}return Ce};function z(E,ae){if(s.isBuffer(E))return E.length;if(ArrayBuffer.isView(E)||he(E,ArrayBuffer))return E.byteLength;if(typeof E!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);const le=E.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&le===0)return 0;let Me=!1;for(;;)switch(ae){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return Q(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return fe(E).length;default:if(Me)return Ce?-1:Q(E).length;ae=(""+ae).toLowerCase(),Me=!0}}s.byteLength=z;function C(E,ae,le){let Ce=!1;if((ae===void 0||ae<0)&&(ae=0),ae>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,ae>>>=0,le<=ae))return"";for(E||(E="utf8");;)switch(E){case"hex":return me(this,ae,le);case"utf8":case"utf-8":return D(this,ae,le);case"ascii":return ue(this,ae,le);case"latin1":case"binary":return ne(this,ae,le);case"base64":return U(this,ae,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,ae,le);default:if(Ce)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),Ce=!0}}s.prototype._isBuffer=!0;function w(E,ae,le){const Ce=E[ae];E[ae]=E[le],E[le]=Ce}s.prototype.swap16=function(){const E=this.length;if(E%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ae=0;ae<E;ae+=2)w(this,ae,ae+1);return this},s.prototype.swap32=function(){const E=this.length;if(E%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ae=0;ae<E;ae+=4)w(this,ae,ae+3),w(this,ae+1,ae+2);return this},s.prototype.swap64=function(){const E=this.length;if(E%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ae=0;ae<E;ae+=8)w(this,ae,ae+7),w(this,ae+1,ae+6),w(this,ae+2,ae+5),w(this,ae+3,ae+4);return this},s.prototype.toString=function(){const E=this.length;return E===0?"":arguments.length===0?D(this,0,E):C.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(E){if(!s.isBuffer(E))throw new TypeError("Argument must be a Buffer");return this===E?!0:s.compare(this,E)===0},s.prototype.inspect=function(){let E="";const ae=e.INSPECT_MAX_BYTES;return E=this.toString("hex",0,ae).replace(/(.{2})/g,"$1 ").trim(),this.length>ae&&(E+=" ... "),"<Buffer "+E+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(E,ae,le,Ce,Me){if(he(E,Uint8Array)&&(E=s.from(E,E.offset,E.byteLength)),!s.isBuffer(E))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof E);if(ae===void 0&&(ae=0),le===void 0&&(le=E?E.length:0),Ce===void 0&&(Ce=0),Me===void 0&&(Me=this.length),ae<0||le>E.length||Ce<0||Me>this.length)throw new RangeError("out of range index");if(Ce>=Me&&ae>=le)return 0;if(Ce>=Me)return-1;if(ae>=le)return 1;if(ae>>>=0,le>>>=0,Ce>>>=0,Me>>>=0,this===E)return 0;let Te=Me-Ce,De=le-ae;const ra=Math.min(Te,De),pa=this.slice(Ce,Me),va=E.slice(ae,le);for(let sa=0;sa<ra;++sa)if(pa[sa]!==va[sa]){Te=pa[sa],De=va[sa];break}return Te<De?-1:De<Te?1:0};function S(E,ae,le,Ce,Me){if(E.length===0)return-1;if(typeof le=="string"?(Ce=le,le=0):le>2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,xe(le)&&(le=Me?0:E.length-1),le<0&&(le=E.length+le),le>=E.length){if(Me)return-1;le=E.length-1}else if(le<0)if(Me)le=0;else return-1;if(typeof ae=="string"&&(ae=s.from(ae,Ce)),s.isBuffer(ae))return ae.length===0?-1:O(E,ae,le,Ce,Me);if(typeof ae=="number")return ae=ae&255,typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(E,ae,le):Uint8Array.prototype.lastIndexOf.call(E,ae,le):O(E,[ae],le,Ce,Me);throw new TypeError("val must be string, number or Buffer")}function O(E,ae,le,Ce,Me){let Te=1,De=E.length,ra=ae.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(E.length<2||ae.length<2)return-1;Te=2,De/=2,ra/=2,le/=2}function pa(sa,ka){return Te===1?sa[ka]:sa.readUInt16BE(ka*Te)}let va;if(Me){let sa=-1;for(va=le;va<De;va++)if(pa(E,va)===pa(ae,sa===-1?0:va-sa)){if(sa===-1&&(sa=va),va-sa+1===ra)return sa*Te}else sa!==-1&&(va-=va-sa),sa=-1}else for(le+ra>De&&(le=De-ra),va=le;va>=0;va--){let sa=!0;for(let ka=0;ka<ra;ka++)if(pa(E,va+ka)!==pa(ae,ka)){sa=!1;break}if(sa)return va}return-1}s.prototype.includes=function(E,ae,le){return this.indexOf(E,ae,le)!==-1},s.prototype.indexOf=function(E,ae,le){return S(this,E,ae,le,!0)},s.prototype.lastIndexOf=function(E,ae,le){return S(this,E,ae,le,!1)};function A(E,ae,le,Ce){le=Number(le)||0;const Me=E.length-le;Ce?(Ce=Number(Ce),Ce>Me&&(Ce=Me)):Ce=Me;const Te=ae.length;Ce>Te/2&&(Ce=Te/2);let De;for(De=0;De<Ce;++De){const ra=parseInt(ae.substr(De*2,2),16);if(xe(ra))return De;E[le+De]=ra}return De}function B(E,ae,le,Ce){return ge(Q(ae,E.length-le),E,le,Ce)}function L(E,ae,le,Ce){return ge(re(ae),E,le,Ce)}function q(E,ae,le,Ce){return ge(fe(ae),E,le,Ce)}function N(E,ae,le,Ce){return ge(de(ae,E.length-le),E,le,Ce)}s.prototype.write=function(E,ae,le,Ce){if(ae===void 0)Ce="utf8",le=this.length,ae=0;else if(le===void 0&&typeof ae=="string")Ce=ae,le=this.length,ae=0;else if(isFinite(ae))ae=ae>>>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 Me=this.length-ae;if((le===void 0||le>Me)&&(le=Me),E.length>0&&(le<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ce||(Ce="utf8");let Te=!1;for(;;)switch(Ce){case"hex":return A(this,E,ae,le);case"utf8":case"utf-8":return B(this,E,ae,le);case"ascii":case"latin1":case"binary":return L(this,E,ae,le);case"base64":return q(this,E,ae,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,E,ae,le);default:if(Te)throw new TypeError("Unknown encoding: "+Ce);Ce=(""+Ce).toLowerCase(),Te=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(E,ae,le){return ae===0&&le===E.length?a.fromByteArray(E):a.fromByteArray(E.slice(ae,le))}function D(E,ae,le){le=Math.min(E.length,le);const Ce=[];let Me=ae;for(;Me<le;){const Te=E[Me];let De=null,ra=Te>239?4:Te>223?3:Te>191?2:1;if(Me+ra<=le){let pa,va,sa,ka;switch(ra){case 1:Te<128&&(De=Te);break;case 2:pa=E[Me+1],(pa&192)===128&&(ka=(Te&31)<<6|pa&63,ka>127&&(De=ka));break;case 3:pa=E[Me+1],va=E[Me+2],(pa&192)===128&&(va&192)===128&&(ka=(Te&15)<<12|(pa&63)<<6|va&63,ka>2047&&(ka<55296||ka>57343)&&(De=ka));break;case 4:pa=E[Me+1],va=E[Me+2],sa=E[Me+3],(pa&192)===128&&(va&192)===128&&(sa&192)===128&&(ka=(Te&15)<<18|(pa&63)<<12|(va&63)<<6|sa&63,ka>65535&&ka<1114112&&(De=ka))}}De===null?(De=65533,ra=1):De>65535&&(De-=65536,Ce.push(De>>>10&1023|55296),De=56320|De&1023),Ce.push(De),Me+=ra}return te(Ce)}const Y=4096;function te(E){const ae=E.length;if(ae<=Y)return String.fromCharCode.apply(String,E);let le="",Ce=0;for(;Ce<ae;)le+=String.fromCharCode.apply(String,E.slice(Ce,Ce+=Y));return le}function ue(E,ae,le){let Ce="";le=Math.min(E.length,le);for(let Me=ae;Me<le;++Me)Ce+=String.fromCharCode(E[Me]&127);return Ce}function ne(E,ae,le){let Ce="";le=Math.min(E.length,le);for(let Me=ae;Me<le;++Me)Ce+=String.fromCharCode(E[Me]);return Ce}function me(E,ae,le){const Ce=E.length;(!ae||ae<0)&&(ae=0),(!le||le<0||le>Ce)&&(le=Ce);let Me="";for(let Te=ae;Te<le;++Te)Me+=Oe[E[Te]];return Me}function I(E,ae,le){const Ce=E.slice(ae,le);let Me="";for(let Te=0;Te<Ce.length-1;Te+=2)Me+=String.fromCharCode(Ce[Te]+Ce[Te+1]*256);return Me}s.prototype.slice=function(E,ae){const le=this.length;E=~~E,ae=ae===void 0?le:~~ae,E<0?(E+=le,E<0&&(E=0)):E>le&&(E=le),ae<0?(ae+=le,ae<0&&(ae=0)):ae>le&&(ae=le),ae<E&&(ae=E);const Ce=this.subarray(E,ae);return Object.setPrototypeOf(Ce,s.prototype),Ce};function K(E,ae,le){if(E%1!==0||E<0)throw new RangeError("offset is not uint");if(E+ae>le)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E],Me=1,Te=0;for(;++Te<ae&&(Me*=256);)Ce+=this[E+Te]*Me;return Ce},s.prototype.readUintBE=s.prototype.readUIntBE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E+--ae],Me=1;for(;ae>0&&(Me*=256);)Ce+=this[E+--ae]*Me;return Ce},s.prototype.readUint8=s.prototype.readUInt8=function(E,ae){return E=E>>>0,ae||K(E,1,this.length),this[E]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(E,ae){return E=E>>>0,ae||K(E,2,this.length),this[E]|this[E+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(E,ae){return E=E>>>0,ae||K(E,2,this.length),this[E]<<8|this[E+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),(this[E]|this[E+1]<<8|this[E+2]<<16)+this[E+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]*16777216+(this[E+1]<<16|this[E+2]<<8|this[E+3])},s.prototype.readBigUInt64LE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=ae+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24,Me=this[++E]+this[++E]*2**8+this[++E]*2**16+le*2**24;return BigInt(Ce)+(BigInt(Me)<<BigInt(32))}),s.prototype.readBigUInt64BE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=ae*2**24+this[++E]*2**16+this[++E]*2**8+this[++E],Me=this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+le;return(BigInt(Ce)<<BigInt(32))+BigInt(Me)}),s.prototype.readIntLE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E],Me=1,Te=0;for(;++Te<ae&&(Me*=256);)Ce+=this[E+Te]*Me;return Me*=128,Ce>=Me&&(Ce-=Math.pow(2,8*ae)),Ce},s.prototype.readIntBE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=ae,Me=1,Te=this[E+--Ce];for(;Ce>0&&(Me*=256);)Te+=this[E+--Ce]*Me;return Me*=128,Te>=Me&&(Te-=Math.pow(2,8*ae)),Te},s.prototype.readInt8=function(E,ae){return E=E>>>0,ae||K(E,1,this.length),this[E]&128?(255-this[E]+1)*-1:this[E]},s.prototype.readInt16LE=function(E,ae){E=E>>>0,ae||K(E,2,this.length);const le=this[E]|this[E+1]<<8;return le&32768?le|4294901760:le},s.prototype.readInt16BE=function(E,ae){E=E>>>0,ae||K(E,2,this.length);const le=this[E+1]|this[E]<<8;return le&32768?le|4294901760:le},s.prototype.readInt32LE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]|this[E+1]<<8|this[E+2]<<16|this[E+3]<<24},s.prototype.readInt32BE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]<<24|this[E+1]<<16|this[E+2]<<8|this[E+3]},s.prototype.readBigInt64LE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=this[E+4]+this[E+5]*2**8+this[E+6]*2**16+(le<<24);return(BigInt(Ce)<<BigInt(32))+BigInt(ae+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24)}),s.prototype.readBigInt64BE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=(ae<<24)+this[++E]*2**16+this[++E]*2**8+this[++E];return(BigInt(Ce)<<BigInt(32))+BigInt(this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+le)}),s.prototype.readFloatLE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),t.read(this,E,!0,23,4)},s.prototype.readFloatBE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),t.read(this,E,!1,23,4)},s.prototype.readDoubleLE=function(E,ae){return E=E>>>0,ae||K(E,8,this.length),t.read(this,E,!0,52,8)},s.prototype.readDoubleBE=function(E,ae){return E=E>>>0,ae||K(E,8,this.length),t.read(this,E,!1,52,8)};function W(E,ae,le,Ce,Me,Te){if(!s.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(ae>Me||ae<Te)throw new RangeError('"value" argument is out of bounds');if(le+Ce>E.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;W(this,E,ae,le,De,0)}let Me=1,Te=0;for(this[ae]=E&255;++Te<le&&(Me*=256);)this[ae+Te]=E/Me&255;return ae+le},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;W(this,E,ae,le,De,0)}let Me=le-1,Te=1;for(this[ae+Me]=E&255;--Me>=0&&(Te*=256);)this[ae+Me]=E/Te&255;return ae+le},s.prototype.writeUint8=s.prototype.writeUInt8=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,1,255,0),this[ae]=E&255,ae+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,65535,0),this[ae]=E&255,this[ae+1]=E>>>8,ae+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,65535,0),this[ae]=E>>>8,this[ae+1]=E&255,ae+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,4294967295,0),this[ae+3]=E>>>24,this[ae+2]=E>>>16,this[ae+1]=E>>>8,this[ae]=E&255,ae+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,4294967295,0),this[ae]=E>>>24,this[ae+1]=E>>>16,this[ae+2]=E>>>8,this[ae+3]=E&255,ae+4};function V(E,ae,le,Ce,Me){$(ae,Ce,Me,E,le,7);let Te=Number(ae&BigInt(4294967295));E[le++]=Te,Te=Te>>8,E[le++]=Te,Te=Te>>8,E[le++]=Te,Te=Te>>8,E[le++]=Te;let De=Number(ae>>BigInt(32)&BigInt(4294967295));return E[le++]=De,De=De>>8,E[le++]=De,De=De>>8,E[le++]=De,De=De>>8,E[le++]=De,le}function P(E,ae,le,Ce,Me){$(ae,Ce,Me,E,le,7);let Te=Number(ae&BigInt(4294967295));E[le+7]=Te,Te=Te>>8,E[le+6]=Te,Te=Te>>8,E[le+5]=Te,Te=Te>>8,E[le+4]=Te;let De=Number(ae>>BigInt(32)&BigInt(4294967295));return E[le+3]=De,De=De>>8,E[le+2]=De,De=De>>8,E[le+1]=De,De=De>>8,E[le]=De,le+8}s.prototype.writeBigUInt64LE=_e(function(E,ae=0){return V(this,E,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=_e(function(E,ae=0){return P(this,E,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,!Ce){const ra=Math.pow(2,8*le-1);W(this,E,ae,le,ra-1,-ra)}let Me=0,Te=1,De=0;for(this[ae]=E&255;++Me<le&&(Te*=256);)E<0&&De===0&&this[ae+Me-1]!==0&&(De=1),this[ae+Me]=(E/Te>>0)-De&255;return ae+le},s.prototype.writeIntBE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,!Ce){const ra=Math.pow(2,8*le-1);W(this,E,ae,le,ra-1,-ra)}let Me=le-1,Te=1,De=0;for(this[ae+Me]=E&255;--Me>=0&&(Te*=256);)E<0&&De===0&&this[ae+Me+1]!==0&&(De=1),this[ae+Me]=(E/Te>>0)-De&255;return ae+le},s.prototype.writeInt8=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,1,127,-128),E<0&&(E=255+E+1),this[ae]=E&255,ae+1},s.prototype.writeInt16LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,32767,-32768),this[ae]=E&255,this[ae+1]=E>>>8,ae+2},s.prototype.writeInt16BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,32767,-32768),this[ae]=E>>>8,this[ae+1]=E&255,ae+2},s.prototype.writeInt32LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,2147483647,-2147483648),this[ae]=E&255,this[ae+1]=E>>>8,this[ae+2]=E>>>16,this[ae+3]=E>>>24,ae+4},s.prototype.writeInt32BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,2147483647,-2147483648),E<0&&(E=4294967295+E+1),this[ae]=E>>>24,this[ae+1]=E>>>16,this[ae+2]=E>>>8,this[ae+3]=E&255,ae+4},s.prototype.writeBigInt64LE=_e(function(E,ae=0){return V(this,E,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=_e(function(E,ae=0){return P(this,E,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _(E,ae,le,Ce,Me,Te){if(le+Ce>E.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function F(E,ae,le,Ce,Me){return ae=+ae,le=le>>>0,Me||_(E,ae,le,4),t.write(E,ae,le,Ce,23,4),le+4}s.prototype.writeFloatLE=function(E,ae,le){return F(this,E,ae,!0,le)},s.prototype.writeFloatBE=function(E,ae,le){return F(this,E,ae,!1,le)};function ee(E,ae,le,Ce,Me){return ae=+ae,le=le>>>0,Me||_(E,ae,le,8),t.write(E,ae,le,Ce,52,8),le+8}s.prototype.writeDoubleLE=function(E,ae,le){return ee(this,E,ae,!0,le)},s.prototype.writeDoubleBE=function(E,ae,le){return ee(this,E,ae,!1,le)},s.prototype.copy=function(E,ae,le,Ce){if(!s.isBuffer(E))throw new TypeError("argument should be a Buffer");if(le||(le=0),!Ce&&Ce!==0&&(Ce=this.length),ae>=E.length&&(ae=E.length),ae||(ae=0),Ce>0&&Ce<le&&(Ce=le),Ce===le||E.length===0||this.length===0)return 0;if(ae<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),E.length-ae<Ce-le&&(Ce=E.length-ae+le);const Me=Ce-le;return this===E&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ae,le,Ce):Uint8Array.prototype.set.call(E,this.subarray(le,Ce),ae),Me},s.prototype.fill=function(E,ae,le,Ce){if(typeof E=="string"){if(typeof ae=="string"?(Ce=ae,ae=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(E.length===1){const Te=E.charCodeAt(0);(Ce==="utf8"&&Te<128||Ce==="latin1")&&(E=Te)}}else typeof E=="number"?E=E&255:typeof E=="boolean"&&(E=Number(E));if(ae<0||this.length<ae||this.length<le)throw new RangeError("Out of range index");if(le<=ae)return this;ae=ae>>>0,le=le===void 0?this.length:le>>>0,E||(E=0);let Me;if(typeof E=="number")for(Me=ae;Me<le;++Me)this[Me]=E;else{const Te=s.isBuffer(E)?E:s.from(E,Ce),De=Te.length;if(De===0)throw new TypeError('The value "'+E+'" is invalid for argument "value"');for(Me=0;Me<le-ae;++Me)this[Me+ae]=Te[Me%De]}return this};const ie={};function be(E,ae,le){ie[E]=class extends le{constructor(){super(),Object.defineProperty(this,"message",{value:ae.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${E}]`,delete this.name}get code(){return E}set code(Ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ce,writable:!0})}toString(){return`${this.name} [${E}]: ${this.message}`}}}be("ERR_BUFFER_OUT_OF_BOUNDS",function(E){return E?`${E} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(E,ae){return`The "${E}" argument must be of type number. Received type ${typeof ae}`},TypeError),be("ERR_OUT_OF_RANGE",function(E,ae,le){let Ce=`The value of "${E}" is out of range.`,Me=le;return Number.isInteger(le)&&Math.abs(le)>2**32?Me=X(String(le)):typeof le=="bigint"&&(Me=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Me=X(Me)),Me+="n"),Ce+=` It must be ${ae}. Received ${Me}`,Ce},RangeError);function X(E){let ae="",le=E.length;const Ce=E[0]==="-"?1:0;for(;le>=Ce+4;le-=3)ae=`_${E.slice(le-3,le)}${ae}`;return`${E.slice(0,le)}${ae}`}function M(E,ae,le){oe(ae,"offset"),(E[ae]===void 0||E[ae+le]===void 0)&&G(ae,E.length-(le+1))}function $(E,ae,le,Ce,Me,Te){if(E>le||E<ae){const De=typeof ae=="bigint"?"n":"";let ra;throw ae===0||ae===BigInt(0)?ra=`>= 0${De} and < 2${De} ** ${(Te+1)*8}${De}`:ra=`>= -(2${De} ** ${(Te+1)*8-1}${De}) and < 2 ** ${(Te+1)*8-1}${De}`,new ie.ERR_OUT_OF_RANGE("value",ra,E)}M(Ce,Me,Te)}function oe(E,ae){if(typeof E!="number")throw new ie.ERR_INVALID_ARG_TYPE(ae,"number",E)}function G(E,ae,le){throw Math.floor(E)!==E?(oe(E,le),new ie.ERR_OUT_OF_RANGE("offset","an integer",E)):ae<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${ae}`,E)}const ce=/[^+/0-9A-Za-z-_]/g;function pe(E){if(E=E.split("=")[0],E=E.trim().replace(ce,""),E.length<2)return"";for(;E.length%4!==0;)E=E+"=";return E}function Q(E,ae){ae=ae||1/0;let le;const Ce=E.length;let Me=null;const Te=[];for(let De=0;De<Ce;++De){if(le=E.charCodeAt(De),le>55295&&le<57344){if(!Me){if(le>56319){(ae-=3)>-1&&Te.push(239,191,189);continue}else if(De+1===Ce){(ae-=3)>-1&&Te.push(239,191,189);continue}Me=le;continue}if(le<56320){(ae-=3)>-1&&Te.push(239,191,189),Me=le;continue}le=(Me-55296<<10|le-56320)+65536}else Me&&(ae-=3)>-1&&Te.push(239,191,189);if(Me=null,le<128){if((ae-=1)<0)break;Te.push(le)}else if(le<2048){if((ae-=2)<0)break;Te.push(le>>6|192,le&63|128)}else if(le<65536){if((ae-=3)<0)break;Te.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((ae-=4)<0)break;Te.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Te}function re(E){const ae=[];for(let le=0;le<E.length;++le)ae.push(E.charCodeAt(le)&255);return ae}function de(E,ae){let le,Ce,Me;const Te=[];for(let De=0;De<E.length&&!((ae-=2)<0);++De)le=E.charCodeAt(De),Ce=le>>8,Me=le%256,Te.push(Me),Te.push(Ce);return Te}function fe(E){return a.toByteArray(pe(E))}function ge(E,ae,le,Ce){let Me;for(Me=0;Me<Ce&&!(Me+le>=ae.length||Me>=E.length);++Me)ae[Me+le]=E[Me];return Me}function he(E,ae){return E instanceof ae||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===ae.name}function xe(E){return E!==E}const Oe=(function(){const E="0123456789abcdef",ae=new Array(256);for(let le=0;le<16;++le){const Ce=le*16;for(let Me=0;Me<16;++Me)ae[Ce+Me]=E[le]+E[Me]}return ae})();function _e(E){return typeof BigInt>"u"?Ye:E}function Ye(){throw new Error("BigInt not supported")}})(Cte)),Cte}const Pte=_F(xee);var u7,Mte;function Vaa(){if(Mte)return u7;Mte=1;function e(g,b){var y=Object.keys(g);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(g);b&&(v=v.filter(function(k){return Object.getOwnPropertyDescriptor(g,k).enumerable})),y.push.apply(y,v)}return y}function a(g){for(var b=1;b<arguments.length;b++){var y=arguments[b]!=null?arguments[b]:{};b%2?e(Object(y),!0).forEach(function(v){t(g,v,y[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(v){Object.defineProperty(g,v,Object.getOwnPropertyDescriptor(y,v))})}return g}function t(g,b,y){return b=o(b),b in g?Object.defineProperty(g,b,{value:y,enumerable:!0,configurable:!0,writable:!0}):g[b]=y,g}function r(g,b){if(!(g instanceof b))throw new TypeError("Cannot call a class as a function")}function n(g,b){for(var y=0;y<b.length;y++){var v=b[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,o(v.key),v)}}function i(g,b,y){return b&&n(g.prototype,b),Object.defineProperty(g,"prototype",{writable:!1}),g}function o(g){var b=s(g,"string");return typeof b=="symbol"?b:String(b)}function s(g,b){if(typeof g!="object"||g===null)return g;var y=g[Symbol.toPrimitive];if(y!==void 0){var v=y.call(g,b);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(g)}var l=c1(),c=l.Buffer,u=Pte,d=u.inspect,p=d&&d.custom||"inspect";function m(g,b,y){c.prototype.copy.call(g,b,y)}return u7=(function(){function g(){r(this,g),this.head=null,this.tail=null,this.length=0}return i(g,[{key:"push",value:function(b){var y={data:b,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(b){var y={data:b,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=b+y.data;return v}},{key:"concat",value:function(b){if(this.length===0)return c.alloc(0);for(var y=c.allocUnsafe(b>>>0),v=this.head,k=0;v;)m(v.data,y,k),k+=v.data.length,v=v.next;return y}},{key:"consume",value:function(b,y){var v;return b<this.head.data.length?(v=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):b===this.head.data.length?v=this.shift():v=y?this._getString(b):this._getBuffer(b),v}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var y=this.head,v=1,k=y.data;for(b-=k.length;y=y.next;){var z=y.data,C=b>z.length?z.length:b;if(C===z.length?k+=z:k+=z.slice(0,b),b-=C,b===0){C===z.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=z.slice(C));break}++v}return this.length-=v,k}},{key:"_getBuffer",value:function(b){var y=c.allocUnsafe(b),v=this.head,k=1;for(v.data.copy(y),b-=v.data.length;v=v.next;){var z=v.data,C=b>z.length?z.length:b;if(z.copy(y,y.length-b,0,C),b-=C,b===0){C===z.length?(++k,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=z.slice(C));break}++k}return this.length-=k,y}},{key:p,value:function(b,y){return d(this,a(a({},y),{},{depth:0,customInspect:!1}))}}]),g})(),u7}var d7,Tte;function Bte(){if(Tte)return d7;Tte=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(t,l):(l._writableState.errorEmitted=!0,process.nextTick(a,l,d)):process.nextTick(a,l,d):s?(process.nextTick(t,l),s(d)):process.nextTick(t,l)}),this)}function a(o,s){n(o,s),t(o)}function t(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 d7={destroy:e,undestroy:r,errorOrDestroy:i},d7}var p7={},Ete;function Xg(){if(Ete)return p7;Ete=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var a={};function t(s,l,c){c||(c=Error);function u(p,m,g){return typeof l=="string"?l:l(p,m,g)}var d=(function(p){e(m,p);function m(g,b,y){return p.call(this,u(g,b,y))||this}return m})(c);d.prototype.name=c.name,d.prototype.code=s,a[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 t("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),t("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 p=o(s,".")?"property":"argument";d='The "'.concat(s,'" ').concat(p," ").concat(u," ").concat(r(l,"type"))}return d+=". Received type ".concat(typeof c),d},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),p7.codes=a,p7}var h7,_te;function Lte(){if(_te)return h7;_te=1;var e=Xg().codes.ERR_INVALID_OPT_VALUE;function a(r,n,i){return r.highWaterMark!=null?r.highWaterMark:n?r[i]:null}function t(r,n,i,o){var s=a(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 h7={getHighWaterMark:t},h7}var m7,Rte;function Haa(){if(Rte)return m7;Rte=1,m7=e;function e(t,r){if(a("noDeprecation"))return t;var n=!1;function i(){if(!n){if(a("throwDeprecation"))throw new Error(r);a("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}return i}function a(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[t];return r==null?!1:String(r).toLowerCase()==="true"}return m7}var f7,Nte;function Dte(){if(Nte)return f7;Nte=1,f7=A;function e(F){var ee=this;this.next=null,this.entry=null,this.finish=function(){_(ee,F)}}var a;A.WritableState=S;var t={deprecate:Haa()},r=Ste(),n=c1().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=Bte(),c=Lte(),u=c.getHighWaterMark,d=Xg().codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,k=d.ERR_STREAM_WRITE_AFTER_END,z=d.ERR_UNKNOWN_ENCODING,C=l.errorOrDestroy;function w(){}function S(F,ee,ie){a=a||Yg(),F=F||{},typeof ie!="boolean"&&(ie=ee instanceof a),this.objectMode=!!F.objectMode,ie&&(this.objectMode=this.objectMode||!!F.writableObjectMode),this.highWaterMark=u(this,F,"writableHighWaterMark",ie),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(X){te(ee,X)},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,ee=[];F;)ee.push(F),F=F.next;return ee},(function(){try{Object.defineProperty(S.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var O;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(O=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(F){return O.call(this,F)?!0:this!==A?!1:F&&F._writableState instanceof S}})):O=function(F){return F instanceof this};function A(F){a=a||Yg();var ee=this instanceof a;if(!ee&&!O.call(A,this))return new A(F);this._writableState=new S(F,this,ee),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)}A.prototype.pipe=function(){C(this,new b)};function B(F,ee){var ie=new k;C(F,ie),process.nextTick(ee,ie)}function L(F,ee,ie,be){var X;return ie===null?X=new v:typeof ie!="string"&&!ee.objectMode&&(X=new p("chunk",["string","Buffer"],ie)),X?(C(F,X),process.nextTick(be,X),!1):!0}A.prototype.write=function(F,ee,ie){var be=this._writableState,X=!1,M=!be.objectMode&&s(F);return M&&!n.isBuffer(F)&&(F=o(F)),typeof ee=="function"&&(ie=ee,ee=null),M?ee="buffer":ee||(ee=be.defaultEncoding),typeof ie!="function"&&(ie=w),be.ending?B(this,ie):(M||L(this,be,F,ie))&&(be.pendingcb++,X=N(this,be,M,F,ee,ie)),X},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var F=this._writableState;F.corked&&(F.corked--,!F.writing&&!F.corked&&!F.bufferProcessing&&F.bufferedRequest&&me(this,F))},A.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 z(F);return this._writableState.defaultEncoding=F,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function q(F,ee,ie){return!F.objectMode&&F.decodeStrings!==!1&&typeof ee=="string"&&(ee=n.from(ee,ie)),ee}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(F,ee,ie,be,X,M){if(!ie){var $=q(ee,be,X);be!==$&&(ie=!0,X="buffer",be=$)}var oe=ee.objectMode?1:be.length;ee.length+=oe;var G=ee.length<ee.highWaterMark;if(G||(ee.needDrain=!0),ee.writing||ee.corked){var ce=ee.lastBufferedRequest;ee.lastBufferedRequest={chunk:be,encoding:X,isBuf:ie,callback:M,next:null},ce?ce.next=ee.lastBufferedRequest:ee.bufferedRequest=ee.lastBufferedRequest,ee.bufferedRequestCount+=1}else U(F,ee,!1,oe,be,X,M);return G}function U(F,ee,ie,be,X,M,$){ee.writelen=be,ee.writecb=$,ee.writing=!0,ee.sync=!0,ee.destroyed?ee.onwrite(new y("write")):ie?F._writev(X,ee.onwrite):F._write(X,M,ee.onwrite),ee.sync=!1}function D(F,ee,ie,be,X){--ee.pendingcb,ie?(process.nextTick(X,be),process.nextTick(V,F,ee),F._writableState.errorEmitted=!0,C(F,be)):(X(be),F._writableState.errorEmitted=!0,C(F,be),V(F,ee))}function Y(F){F.writing=!1,F.writecb=null,F.length-=F.writelen,F.writelen=0}function te(F,ee){var ie=F._writableState,be=ie.sync,X=ie.writecb;if(typeof X!="function")throw new g;if(Y(ie),ee)D(F,ie,be,ee,X);else{var M=I(ie)||F.destroyed;!M&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&me(F,ie),be?process.nextTick(ue,F,ie,M,X):ue(F,ie,M,X)}}function ue(F,ee,ie,be){ie||ne(F,ee),ee.pendingcb--,be(),V(F,ee)}function ne(F,ee){ee.length===0&&ee.needDrain&&(ee.needDrain=!1,F.emit("drain"))}function me(F,ee){ee.bufferProcessing=!0;var ie=ee.bufferedRequest;if(F._writev&&ie&&ie.next){var be=ee.bufferedRequestCount,X=new Array(be),M=ee.corkedRequestsFree;M.entry=ie;for(var $=0,oe=!0;ie;)X[$]=ie,ie.isBuf||(oe=!1),ie=ie.next,$+=1;X.allBuffers=oe,U(F,ee,!0,ee.length,X,"",M.finish),ee.pendingcb++,ee.lastBufferedRequest=null,M.next?(ee.corkedRequestsFree=M.next,M.next=null):ee.corkedRequestsFree=new e(ee),ee.bufferedRequestCount=0}else{for(;ie;){var G=ie.chunk,ce=ie.encoding,pe=ie.callback,Q=ee.objectMode?1:G.length;if(U(F,ee,!1,Q,G,ce,pe),ie=ie.next,ee.bufferedRequestCount--,ee.writing)break}ie===null&&(ee.lastBufferedRequest=null)}ee.bufferedRequest=ie,ee.bufferProcessing=!1}A.prototype._write=function(F,ee,ie){ie(new m("_write()"))},A.prototype._writev=null,A.prototype.end=function(F,ee,ie){var be=this._writableState;return typeof F=="function"?(ie=F,F=null,ee=null):typeof ee=="function"&&(ie=ee,ee=null),F!=null&&this.write(F,ee),be.corked&&(be.corked=1,this.uncork()),be.ending||P(this,be,ie),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function I(F){return F.ending&&F.length===0&&F.bufferedRequest===null&&!F.finished&&!F.writing}function K(F,ee){F._final(function(ie){ee.pendingcb--,ie&&C(F,ie),ee.prefinished=!0,F.emit("prefinish"),V(F,ee)})}function W(F,ee){!ee.prefinished&&!ee.finalCalled&&(typeof F._final=="function"&&!ee.destroyed?(ee.pendingcb++,ee.finalCalled=!0,process.nextTick(K,F,ee)):(ee.prefinished=!0,F.emit("prefinish")))}function V(F,ee){var ie=I(ee);if(ie&&(W(F,ee),ee.pendingcb===0&&(ee.finished=!0,F.emit("finish"),ee.autoDestroy))){var be=F._readableState;(!be||be.autoDestroy&&be.endEmitted)&&F.destroy()}return ie}function P(F,ee,ie){ee.ending=!0,V(F,ee),ie&&(ee.finished?process.nextTick(ie):F.once("finish",ie)),ee.ended=!0,F.writable=!1}function _(F,ee,ie){var be=F.entry;for(F.entry=null;be;){var X=be.callback;ee.pendingcb--,X(ie),be=be.next}ee.corkedRequestsFree.next=F}return Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(F){this._writableState&&(this._writableState.destroyed=F)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(F,ee){ee(F)},f7}var g7,$te;function Yg(){if($te)return g7;$te=1;var e=Object.keys||function(c){var u=[];for(var d in c)u.push(d);return u};g7=o;for(var a=Ute(),t=Dte(),r=e(t.prototype),n=0;n<r.length;n++){var i=r[n];o.prototype[i]||(o.prototype[i]=t.prototype[i])}function o(c){if(!(this instanceof o))return new o(c);a.call(this,c),t.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)}}),g7}var v7={},b7={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Ite;function Faa(){return Ite||(Ite=1,(function(e,a){var t=c1(),r=t.Buffer;function n(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=t:(n(t,a),a.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 t.SlowBuffer(o)}})(b7,b7.exports)),b7.exports}var Kte;function Vte(){if(Kte)return v7;Kte=1;var e=Faa().Buffer,a=e.isEncoding||function(v){switch(v=""+v,v&&v.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 t(v){if(!v)return"utf8";for(var k;;)switch(v){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 v;default:if(k)return;v=(""+v).toLowerCase(),k=!0}}function r(v){var k=t(v);if(typeof k!="string"&&(e.isEncoding===a||!a(v)))throw new Error("Unknown encoding: "+v);return k||v}v7.StringDecoder=n;function n(v){this.encoding=r(v);var k;switch(this.encoding){case"utf16le":this.text=d,this.end=p,k=4;break;case"utf8":this.fillLast=l,k=4;break;case"base64":this.text=m,this.end=g,k=3;break;default:this.write=b,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(k)}n.prototype.write=function(v){if(v.length===0)return"";var k,z;if(this.lastNeed){if(k=this.fillLast(v),k===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;return z<v.length?k?k+this.text(v,z):this.text(v,z):k||""},n.prototype.end=u,n.prototype.text=c,n.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length};function i(v){return v<=127?0:v>>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function o(v,k,z){var C=k.length-1;if(C<z)return 0;var w=i(k[C]);return w>=0?(w>0&&(v.lastNeed=w-1),w):--C<z||w===-2?0:(w=i(k[C]),w>=0?(w>0&&(v.lastNeed=w-2),w):--C<z||w===-2?0:(w=i(k[C]),w>=0?(w>0&&(w===2?w=0:v.lastNeed=w-3),w):0))}function s(v,k,z){if((k[0]&192)!==128)return v.lastNeed=0,"\uFFFD";if(v.lastNeed>1&&k.length>1){if((k[1]&192)!==128)return v.lastNeed=1,"\uFFFD";if(v.lastNeed>2&&k.length>2&&(k[2]&192)!==128)return v.lastNeed=2,"\uFFFD"}}function l(v){var k=this.lastTotal-this.lastNeed,z=s(this,v);if(z!==void 0)return z;if(this.lastNeed<=v.length)return v.copy(this.lastChar,k,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,k,0,v.length),this.lastNeed-=v.length}function c(v,k){var z=o(this,v,k);if(!this.lastNeed)return v.toString("utf8",k);this.lastTotal=z;var C=v.length-(z-this.lastNeed);return v.copy(this.lastChar,0,C),v.toString("utf8",k,C)}function u(v){var k=v&&v.length?this.write(v):"";return this.lastNeed?k+"\uFFFD":k}function d(v,k){if((v.length-k)%2===0){var z=v.toString("utf16le",k);if(z){var C=z.charCodeAt(z.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",k,v.length-1)}function p(v){var k=v&&v.length?this.write(v):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,z)}return k}function m(v,k){var z=(v.length-k)%3;return z===0?v.toString("base64",k):(this.lastNeed=3-z,this.lastTotal=3,z===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",k,v.length-z))}function g(v){var k=v&&v.length?this.write(v):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function b(v){return v.toString(this.encoding)}function y(v){return v&&v.length?this.write(v):""}return v7}var y7,Hte;function k7(){if(Hte)return y7;Hte=1;var e=Xg().codes.ERR_STREAM_PREMATURE_CLOSE;function a(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 t(){}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=a(s||t);var l=o.readable||o.readable!==!1&&i.readable,c=o.writable||o.writable!==!1&&i.writable,u=function(){i.writable||p()},d=i._writableState&&i._writableState.finished,p=function(){c=!1,d=!0,l||s.call(i)},m=i._readableState&&i._readableState.endEmitted,g=function(){l=!1,m=!0,c||s.call(i)},b=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)},v=function(){i.req.on("finish",p)};return r(i)?(i.on("complete",p),i.on("abort",y),i.req?v():i.on("request",v)):c&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",g),i.on("finish",p),o.error!==!1&&i.on("error",b),i.on("close",y),function(){i.removeListener("complete",p),i.removeListener("abort",y),i.removeListener("request",v),i.req&&i.req.removeListener("finish",p),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",p),i.removeListener("end",g),i.removeListener("error",b),i.removeListener("close",y)}}return y7=n,y7}var x7,Fte;function Gaa(){if(Fte)return x7;Fte=1;var e;function a(z,C,w){return C=t(C),C in z?Object.defineProperty(z,C,{value:w,enumerable:!0,configurable:!0,writable:!0}):z[C]=w,z}function t(z){var C=r(z,"string");return typeof C=="symbol"?C:String(C)}function r(z,C){if(typeof z!="object"||z===null)return z;var w=z[Symbol.toPrimitive];if(w!==void 0){var S=w.call(z,C);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(z)}var n=k7(),i=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function p(z,C){return{value:z,done:C}}function m(z){var C=z[i];if(C!==null){var w=z[d].read();w!==null&&(z[c]=null,z[i]=null,z[o]=null,C(p(w,!1)))}}function g(z){process.nextTick(m,z)}function b(z,C){return function(w,S){z.then(function(){if(C[l]){w(p(void 0,!0));return}C[u](w,S)},S)}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[d]},next:function(){var z=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(A,B){process.nextTick(function(){z[s]?B(z[s]):A(p(void 0,!0))})});var w=this[c],S;if(w)S=new Promise(b(w,this));else{var O=this[d].read();if(O!==null)return Promise.resolve(p(O,!1));S=new Promise(this[u])}return this[c]=S,S}},a(e,Symbol.asyncIterator,function(){return this}),a(e,"return",function(){var z=this;return new Promise(function(C,w){z[d].destroy(null,function(S){if(S){w(S);return}C(p(void 0,!0))})})}),e),y),k=function(z){var C,w=Object.create(v,(C={},a(C,d,{value:z,writable:!0}),a(C,i,{value:null,writable:!0}),a(C,o,{value:null,writable:!0}),a(C,s,{value:null,writable:!0}),a(C,l,{value:z._readableState.endEmitted,writable:!0}),a(C,u,{value:function(S,O){var A=w[d].read();A?(w[c]=null,w[i]=null,w[o]=null,S(p(A,!1))):(w[i]=S,w[o]=O)},writable:!0}),C));return w[c]=null,n(z,function(S){if(S&&S.code!=="ERR_STREAM_PREMATURE_CLOSE"){var O=w[o];O!==null&&(w[c]=null,w[i]=null,w[o]=null,O(S)),w[s]=S;return}var A=w[i];A!==null&&(w[c]=null,w[i]=null,w[o]=null,A(p(void 0,!0))),w[l]=!0}),z.on("readable",g.bind(null,w)),w};return x7=k,x7}var Gte,qte;function qaa(){return qte||(qte=1,Gte=function(){throw new Error("Readable.from is not available in the browser")}),Gte}var w7,Jte;function Ute(){if(Jte)return w7;Jte=1,w7=B;var e;B.ReadableState=A;var a=function(M,$){return M.listeners($).length},t=Ste(),r=c1().Buffer,n=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(M){return r.from(M)}function o(M){return r.isBuffer(M)||M instanceof n}var s=Pte,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=Vaa(),u=Bte(),d=Lte(),p=d.getHighWaterMark,m=Xg().codes,g=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,k,z,C,w=u.errorOrDestroy,S=["error","close","destroy","pause","resume"];function O(M,$,oe){if(typeof M.prependListener=="function")return M.prependListener($,oe);!M._events||!M._events[$]?M.on($,oe):Array.isArray(M._events[$])?M._events[$].unshift(oe):M._events[$]=[oe,M._events[$]]}function A(M,$,oe){e=e||Yg(),M=M||{},typeof oe!="boolean"&&(oe=$ instanceof e),this.objectMode=!!M.objectMode,oe&&(this.objectMode=this.objectMode||!!M.readableObjectMode),this.highWaterMark=p(this,M,"readableHighWaterMark",oe),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=M.emitClose!==!1,this.autoDestroy=!!M.autoDestroy,this.destroyed=!1,this.defaultEncoding=M.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,M.encoding&&(k||(k=Vte().StringDecoder),this.decoder=new k(M.encoding),this.encoding=M.encoding)}function B(M){if(e=e||Yg(),!(this instanceof B))return new B(M);var $=this instanceof e;this._readableState=new A(M,this,$),this.readable=!0,M&&(typeof M.read=="function"&&(this._read=M.read),typeof M.destroy=="function"&&(this._destroy=M.destroy)),t.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(M){this._readableState&&(this._readableState.destroyed=M)}}),B.prototype.destroy=u.destroy,B.prototype._undestroy=u.undestroy,B.prototype._destroy=function(M,$){$(M)},B.prototype.push=function(M,$){var oe=this._readableState,G;return oe.objectMode?G=!0:typeof M=="string"&&($=$||oe.defaultEncoding,$!==oe.encoding&&(M=r.from(M,$),$=""),G=!0),L(this,M,$,!1,G)},B.prototype.unshift=function(M){return L(this,M,null,!0,!1)};function L(M,$,oe,G,ce){l("readableAddChunk",$);var pe=M._readableState;if($===null)pe.reading=!1,te(M,pe);else{var Q;if(ce||(Q=N(pe,$)),Q)w(M,Q);else if(pe.objectMode||$&&$.length>0)if(typeof $!="string"&&!pe.objectMode&&Object.getPrototypeOf($)!==r.prototype&&($=i($)),G)pe.endEmitted?w(M,new v):q(M,pe,$,!0);else if(pe.ended)w(M,new b);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!oe?($=pe.decoder.write($),pe.objectMode||$.length!==0?q(M,pe,$,!1):me(M,pe)):q(M,pe,$,!1)}else G||(pe.reading=!1,me(M,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function q(M,$,oe,G){$.flowing&&$.length===0&&!$.sync?($.awaitDrain=0,M.emit("data",oe)):($.length+=$.objectMode?1:oe.length,G?$.buffer.unshift(oe):$.buffer.push(oe),$.needReadable&&ue(M)),me(M,$)}function N(M,$){var oe;return!o($)&&typeof $!="string"&&$!==void 0&&!M.objectMode&&(oe=new g("chunk",["string","Buffer","Uint8Array"],$)),oe}B.prototype.isPaused=function(){return this._readableState.flowing===!1},B.prototype.setEncoding=function(M){k||(k=Vte().StringDecoder);var $=new k(M);this._readableState.decoder=$,this._readableState.encoding=this._readableState.decoder.encoding;for(var oe=this._readableState.buffer.head,G="";oe!==null;)G+=$.write(oe.data),oe=oe.next;return this._readableState.buffer.clear(),G!==""&&this._readableState.buffer.push(G),this._readableState.length=G.length,this};var U=1073741824;function D(M){return M>=U?M=U:(M--,M|=M>>>1,M|=M>>>2,M|=M>>>4,M|=M>>>8,M|=M>>>16,M++),M}function Y(M,$){return M<=0||$.length===0&&$.ended?0:$.objectMode?1:M!==M?$.flowing&&$.length?$.buffer.head.data.length:$.length:(M>$.highWaterMark&&($.highWaterMark=D(M)),M<=$.length?M:$.ended?$.length:($.needReadable=!0,0))}B.prototype.read=function(M){l("read",M),M=parseInt(M,10);var $=this._readableState,oe=M;if(M!==0&&($.emittedReadable=!1),M===0&&$.needReadable&&(($.highWaterMark!==0?$.length>=$.highWaterMark:$.length>0)||$.ended))return l("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?ie(this):ue(this),null;if(M=Y(M,$),M===0&&$.ended)return $.length===0&&ie(this),null;var G=$.needReadable;l("need readable",G),($.length===0||$.length-M<$.highWaterMark)&&(G=!0,l("length less than watermark",G)),$.ended||$.reading?(G=!1,l("reading or ended",G)):G&&(l("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(M=Y(oe,$)));var ce;return M>0?ce=ee(M,$):ce=null,ce===null?($.needReadable=$.length<=$.highWaterMark,M=0):($.length-=M,$.awaitDrain=0),$.length===0&&($.ended||($.needReadable=!0),oe!==M&&$.ended&&ie(this)),ce!==null&&this.emit("data",ce),ce};function te(M,$){if(l("onEofChunk"),!$.ended){if($.decoder){var oe=$.decoder.end();oe&&oe.length&&($.buffer.push(oe),$.length+=$.objectMode?1:oe.length)}$.ended=!0,$.sync?ue(M):($.needReadable=!1,$.emittedReadable||($.emittedReadable=!0,ne(M)))}}function ue(M){var $=M._readableState;l("emitReadable",$.needReadable,$.emittedReadable),$.needReadable=!1,$.emittedReadable||(l("emitReadable",$.flowing),$.emittedReadable=!0,process.nextTick(ne,M))}function ne(M){var $=M._readableState;l("emitReadable_",$.destroyed,$.length,$.ended),!$.destroyed&&($.length||$.ended)&&(M.emit("readable"),$.emittedReadable=!1),$.needReadable=!$.flowing&&!$.ended&&$.length<=$.highWaterMark,F(M)}function me(M,$){$.readingMore||($.readingMore=!0,process.nextTick(I,M,$))}function I(M,$){for(;!$.reading&&!$.ended&&($.length<$.highWaterMark||$.flowing&&$.length===0);){var oe=$.length;if(l("maybeReadMore read 0"),M.read(0),oe===$.length)break}$.readingMore=!1}B.prototype._read=function(M){w(this,new y("_read()"))},B.prototype.pipe=function(M,$){var oe=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=M;break;case 1:G.pipes=[G.pipes,M];break;default:G.pipes.push(M);break}G.pipesCount+=1,l("pipe count=%d opts=%j",G.pipesCount,$);var ce=(!$||$.end!==!1)&&M!==null&&M!==process.stderr,pe=ce?re:Ye;G.endEmitted?process.nextTick(pe):oe.once("end",pe),M.on("unpipe",Q);function Q(E,ae){l("onunpipe"),E===oe&&ae&&ae.hasUnpiped===!1&&(ae.hasUnpiped=!0,ge())}function re(){l("onend"),M.end()}var de=K(oe);M.on("drain",de);var fe=!1;function ge(){l("cleanup"),M.removeListener("close",Oe),M.removeListener("finish",_e),M.removeListener("drain",de),M.removeListener("error",xe),M.removeListener("unpipe",Q),oe.removeListener("end",re),oe.removeListener("end",Ye),oe.removeListener("data",he),fe=!0,G.awaitDrain&&(!M._writableState||M._writableState.needDrain)&&de()}oe.on("data",he);function he(E){l("ondata");var ae=M.write(E);l("dest.write",ae),ae===!1&&((G.pipesCount===1&&G.pipes===M||G.pipesCount>1&&X(G.pipes,M)!==-1)&&!fe&&(l("false write response, pause",G.awaitDrain),G.awaitDrain++),oe.pause())}function xe(E){l("onerror",E),Ye(),M.removeListener("error",xe),a(M,"error")===0&&w(M,E)}O(M,"error",xe);function Oe(){M.removeListener("finish",_e),Ye()}M.once("close",Oe);function _e(){l("onfinish"),M.removeListener("close",Oe),Ye()}M.once("finish",_e);function Ye(){l("unpipe"),oe.unpipe(M)}return M.emit("pipe",oe),G.flowing||(l("pipe resume"),oe.resume()),M};function K(M){return function(){var $=M._readableState;l("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&a(M,"data")&&($.flowing=!0,F(M))}}B.prototype.unpipe=function(M){var $=this._readableState,oe={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return M&&M!==$.pipes?this:(M||(M=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,M&&M.emit("unpipe",this,oe),this);if(!M){var G=$.pipes,ce=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var pe=0;pe<ce;pe++)G[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var Q=X($.pipes,M);return Q===-1?this:($.pipes.splice(Q,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),M.emit("unpipe",this,oe),this)},B.prototype.on=function(M,$){var oe=t.prototype.on.call(this,M,$),G=this._readableState;return M==="data"?(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1&&this.resume()):M==="readable"&&!G.endEmitted&&!G.readableListening&&(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,l("on readable",G.length,G.reading),G.length?ue(this):G.reading||process.nextTick(V,this)),oe},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(M,$){var oe=t.prototype.removeListener.call(this,M,$);return M==="readable"&&process.nextTick(W,this),oe},B.prototype.removeAllListeners=function(M){var $=t.prototype.removeAllListeners.apply(this,arguments);return(M==="readable"||M===void 0)&&process.nextTick(W,this),$};function W(M){var $=M._readableState;$.readableListening=M.listenerCount("readable")>0,$.resumeScheduled&&!$.paused?$.flowing=!0:M.listenerCount("data")>0&&M.resume()}function V(M){l("readable nexttick read 0"),M.read(0)}B.prototype.resume=function(){var M=this._readableState;return M.flowing||(l("resume"),M.flowing=!M.readableListening,P(this,M)),M.paused=!1,this};function P(M,$){$.resumeScheduled||($.resumeScheduled=!0,process.nextTick(_,M,$))}function _(M,$){l("resume",$.reading),$.reading||M.read(0),$.resumeScheduled=!1,M.emit("resume"),F(M),$.flowing&&!$.reading&&M.read(0)}B.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(M){var $=M._readableState;for(l("flow",$.flowing);$.flowing&&M.read()!==null;);}B.prototype.wrap=function(M){var $=this,oe=this._readableState,G=!1;M.on("end",function(){if(l("wrapped end"),oe.decoder&&!oe.ended){var Q=oe.decoder.end();Q&&Q.length&&$.push(Q)}$.push(null)}),M.on("data",function(Q){if(l("wrapped data"),oe.decoder&&(Q=oe.decoder.write(Q)),!(oe.objectMode&&Q==null)&&!(!oe.objectMode&&(!Q||!Q.length))){var re=$.push(Q);re||(G=!0,M.pause())}});for(var ce in M)this[ce]===void 0&&typeof M[ce]=="function"&&(this[ce]=(function(Q){return function(){return M[Q].apply(M,arguments)}})(ce));for(var pe=0;pe<S.length;pe++)M.on(S[pe],this.emit.bind(this,S[pe]));return this._read=function(Q){l("wrapped _read",Q),G&&(G=!1,M.resume())},this},typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return z===void 0&&(z=Gaa()),z(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(M){this._readableState&&(this._readableState.flowing=M)}}),B._fromList=ee,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ee(M,$){if($.length===0)return null;var oe;return $.objectMode?oe=$.buffer.shift():!M||M>=$.length?($.decoder?oe=$.buffer.join(""):$.buffer.length===1?oe=$.buffer.first():oe=$.buffer.concat($.length),$.buffer.clear()):oe=$.buffer.consume(M,$.decoder),oe}function ie(M){var $=M._readableState;l("endReadable",$.endEmitted),$.endEmitted||($.ended=!0,process.nextTick(be,$,M))}function be(M,$){if(l("endReadableNT",M.endEmitted,M.length),!M.endEmitted&&M.length===0&&(M.endEmitted=!0,$.readable=!1,$.emit("end"),M.autoDestroy)){var oe=$._writableState;(!oe||oe.autoDestroy&&oe.finished)&&$.destroy()}}typeof Symbol=="function"&&(B.from=function(M,$){return C===void 0&&(C=qaa()),C(B,M,$)});function X(M,$){for(var oe=0,G=M.length;oe<G;oe++)if(M[oe]===$)return oe;return-1}return w7}var z7,Wte;function Zte(){if(Wte)return z7;Wte=1,z7=s;var e=Xg().codes,a=e.ERR_METHOD_NOT_IMPLEMENTED,t=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,i=Yg();function o(u,d){var p=this._transformState;p.transforming=!1;var m=p.writecb;if(m===null)return this.emit("error",new t);p.writechunk=null,p.writecb=null,d!=null&&this.push(d),m(u);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.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,p){c(u,d,p)}):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,p){p(new a("_transform()"))},s.prototype._write=function(u,d,p){var m=this._transformState;if(m.writecb=p,m.writechunk=u,m.writeencoding=d,!m.transforming){var g=this._readableState;(m.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.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(p){d(p)})};function c(u,d,p){if(d)return u.emit("error",d);if(p!=null&&u.push(p),u._writableState.length)throw new n;if(u._transformState.transforming)throw new r;return u.push(null)}return z7}var S7,Qte;function Jaa(){if(Qte)return S7;Qte=1,S7=a;var e=Zte();function a(t){if(!(this instanceof a))return new a(t);e.call(this,t)}return a.prototype._transform=function(t,r,n){n(null,t)},S7}var C7,Xte;function Uaa(){if(Xte)return C7;Xte=1;var e;function a(p){var m=!1;return function(){m||(m=!0,p.apply(void 0,arguments))}}var t=Xg().codes,r=t.ERR_MISSING_ARGS,n=t.ERR_STREAM_DESTROYED;function i(p){if(p)throw p}function o(p){return p.setHeader&&typeof p.abort=="function"}function s(p,m,g,b){b=a(b);var y=!1;p.on("close",function(){y=!0}),e===void 0&&(e=k7()),e(p,{readable:m,writable:g},function(k){if(k)return b(k);y=!0,b()});var v=!1;return function(k){if(!y&&!v){if(v=!0,o(p))return p.abort();if(typeof p.destroy=="function")return p.destroy();b(k||new n("pipe"))}}}function l(p){p()}function c(p,m){return p.pipe(m)}function u(p){return!p.length||typeof p[p.length-1]!="function"?i:p.pop()}function d(){for(var p=arguments.length,m=new Array(p),g=0;g<p;g++)m[g]=arguments[g];var b=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var y,v=m.map(function(k,z){var C=z<m.length-1,w=z>0;return s(k,C,w,function(S){y||(y=S),S&&v.forEach(l),!C&&(v.forEach(l),b(y))})});return m.reduce(c)}return C7=d,C7}var Yte;function ere(){return Yte||(Yte=1,(function(e,a){a=e.exports=Ute(),a.Stream=a,a.Readable=a,a.Writable=Dte(),a.Duplex=Yg(),a.Transform=Zte(),a.PassThrough=Jaa(),a.finished=k7(),a.pipeline=Uaa()})(l7,l7.exports)),l7.exports}var are;function tre(){if(are)return x2;are=1;var e=kte(),a=X8(),t=ere(),r=x2.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=x2.IncomingMessage=function(i,o,s,l){var c=this;if(t.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 b=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)),b()}}).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,v){c.headers[v.toLowerCase()]=y,c.rawHeaders.push(v,y)}),e.writableStream){var u=new WritableStream({write:function(y){return l(!1),new Promise(function(v,k){c._destroyed?k():c.push(Buffer.from(y))?v():c._resumeFetch=v})},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();b()}else{c._xhr=i,c._pos=0,c.url=i.responseURL,c.statusCode=i.status,c.statusMessage=i.statusText;var p=i.getAllResponseHeaders().split(/\r?\n/);if(p.forEach(function(b){var y=b.match(/^([^:]+):\s*(.*)/);if(y){var v=y[1].toLowerCase();v==="set-cookie"?(c.headers[v]===void 0&&(c.headers[v]=[]),c.headers[v].push(y[2])):c.headers[v]!==void 0?c.headers[v]+=", "+y[2]:c.headers[v]=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 g=m.match(/;\s*charset=([^;])(;|$)/);g&&(c._charset=g[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};return a(n,t.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 p=new globalThis.MSStreamReader;p.onprogress=function(){p.result.byteLength>o._pos&&(o.push(Buffer.from(new Uint8Array(p.result.slice(o._pos)))),o._pos=p.result.byteLength)},p.onload=function(){i(!0),o.push(null)},p.readAsArrayBuffer(l);break}o._xhr.readyState===r.DONE&&o._mode!=="ms-stream"&&(i(!0),o.push(null))},x2}var rre;function Waa(){if(rre)return s7.exports;rre=1;var e=kte(),a=X8(),t=tre(),r=ere(),n=t.IncomingMessage,i=t.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=s7.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(g){d.setHeader(g,u.headers[g])});var p,m=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!e.abortController)m=!1,p=!0;else if(u.mode==="prefer-streaming")p=!1;else if(u.mode==="allow-wrong-content-type")p=!e.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")p=!0;else throw new Error("Invalid value for opts.mode");d._mode=o(p,m),d._fetchTimer=null,d._socketTimeout=null,d._socketTimer=null,d.on("finish",function(){d._onFinish()})};a(s,r.Writable),s.prototype.setHeader=function(u,d){var p=this,m=u.toLowerCase();c.indexOf(m)===-1&&(p._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 p=u._headers,m=null;d.method!=="GET"&&d.method!=="HEAD"&&(m=new Blob(u._body,{type:(p["content-type"]||{}).value||""}));var g=[];if(Object.keys(p).forEach(function(k){var z=p[k].name,C=p[k].value;Array.isArray(C)?C.forEach(function(w){g.push([z,w])}):g.push([z,C])}),u._mode==="fetch"){var b=null;if(e.abortController){var y=new AbortController;b=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:g,body:m||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:b}).then(function(k){u._fetchResponse=k,u._resetTimers(!1),u._connect()},function(k){u._resetTimers(!0),u._destroyed||u.emit("error",k)})}else{var v=u._xhr=new globalThis.XMLHttpRequest;try{v.open(u._opts.method,u._opts.url,!0)}catch(k){process.nextTick(function(){u.emit("error",k)});return}"responseType"in v&&(v.responseType=u._mode),"withCredentials"in v&&(v.withCredentials=!!d.withCredentials),u._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(v.timeout=d.requestTimeout,v.ontimeout=function(){u.emit("requestTimeout")}),g.forEach(function(k){v.setRequestHeader(k[0],k[1])}),u._response=null,v.onreadystatechange=function(){switch(v.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){u._onXHRProgress()}),v.onerror=function(){u._destroyed||(u._resetTimers(!0),u.emit("error",new Error("XHR error")))};try{v.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,p){var m=this;m._body.push(u),p()},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,p){var m=this;typeof u=="function"&&(p=u,u=void 0),r.Writable.prototype.end.call(m,u,d,p)},s.prototype.setTimeout=function(u,d){var p=this;d&&p.once("timeout",d),p._socketTimeout=u,p._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 s7.exports}var j7,nre;function Zaa(){if(nre)return j7;nre=1,j7=a;var e=Object.prototype.hasOwnProperty;function a(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t}return j7}var ire,ore;function Qaa(){return ore||(ore=1,ire={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"}),ire}var sre;function Xaa(){return sre||(sre=1,(function(e){var a=Waa(),t=tre(),r=Zaa(),n=Qaa(),i=JB(),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,p=s.port,m=s.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),s.url=(d?u+"//"+d:"")+(p?":"+p:"")+m,s.method=(s.method||"GET").toUpperCase(),s.headers=s.headers||{};var g=new a(s);return l&&g.on("response",l),g},o.get=function(s,l){var c=o.request(s,l);return c.end(),c},o.ClientRequest=a,o.IncomingMessage=t.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"]})(vte)),vte}var lre,cre;function Yaa(){return cre||(cre=1,lre={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},Xaa().STATUS_CODES)}),lre}const eta="7.0.8",ata={version:eta};var O7,ure;function tta(){if(ure)return O7;ure=1;const e=Qg,a=JB(),t=_aa(),r=Qg,n=Qg,i=y2(),o=i.jptr,s=XB().isRef,l=k2().clone,c=k2().circularClone,u=a7().recurse,d=Naa(),p=Daa(),m=mte(),g=Yaa().statusCodes,b=ata.version,y="3.0.0";let v;class k extends Error{constructor($){super($),this.name="S2OError"}}function z(M,$){let oe=new k(M);if(oe.options=$,$.promise)$.promise.reject(oe);else throw oe}function C(M,$,oe){oe.warnOnly?$[oe.warnProperty||"x-s2o-warning"]=M:z(M,oe)}function w(M,$,oe){if(M.nullable&&oe.patches++,M.discriminator&&typeof M.discriminator=="string"&&(M.discriminator={propertyName:M.discriminator}),M.items&&Array.isArray(M.items)&&(M.items.length===0?M.items={}:M.items.length===1?M.items=M.items[0]:M.items={anyOf:M.items}),M.type&&Array.isArray(M.type))if(oe.patch){if(oe.patches++,M.type.length===0)delete M.type;else{M.oneOf||(M.oneOf=[]);for(let G of M.type){let ce={};if(G==="null")M.nullable=!0;else{ce.type=G;for(let pe of m.arrayProperties)typeof M.prop<"u"&&(ce[pe]=M[pe],delete M[pe])}ce.type&&M.oneOf.push(ce)}delete M.type,M.oneOf.length===0?delete M.oneOf:M.oneOf.length<2&&(M.type=M.oneOf[0].type,Object.keys(M.oneOf[0]).length>1&&C("Lost properties from oneOf",M,oe),delete M.oneOf)}M.type&&Array.isArray(M.type)&&M.type.length===1&&(M.type=M.type[0])}else z("(Patchable) schema type must not be an array",oe);M.type&&M.type==="null"&&(delete M.type,M.nullable=!0),M.type==="array"&&!M.items&&(M.items={}),M.type==="file"&&(M.type="string",M.format="binary"),typeof M.required=="boolean"&&(M.required&&M.name&&(typeof $.required>"u"&&($.required=[]),Array.isArray($.required)&&$.required.push(M.name)),delete M.required),M.xml&&typeof M.xml.namespace=="string"&&(M.xml.namespace||delete M.xml.namespace),typeof M.allowEmptyValue<"u"&&(oe.patches++,delete M.allowEmptyValue)}function S(M,$){if(M["x-required"]&&Array.isArray(M["x-required"])&&(M.required||(M.required=[]),M.required=M.required.concat(M["x-required"]),delete M["x-required"]),M["x-anyOf"]&&(M.anyOf=M["x-anyOf"],delete M["x-anyOf"]),M["x-oneOf"]&&(M.oneOf=M["x-oneOf"],delete M["x-oneOf"]),M["x-not"]&&(M.not=M["x-not"],delete M["x-not"]),typeof M["x-nullable"]=="boolean"&&(M.nullable=M["x-nullable"],delete M["x-nullable"]),typeof M["x-discriminator"]=="object"&&typeof M["x-discriminator"].propertyName=="string"){M.discriminator=M["x-discriminator"],delete M["x-discriminator"];for(let oe in M.discriminator.mapping){let G=M.discriminator.mapping[oe];G.startsWith("#/definitions/")&&(M.discriminator.mapping[oe]=G.replace("#/definitions/","#/components/schemas/"))}}}function O(M,$){p.walkSchema(M,{},{},function(oe,G,ce){S(oe),w(oe,G,$)})}function A(M){return M.indexOf("#")>=0?M=M.split("#")[1].split("/").pop():M=M.split("/").pop().split(".")[0],encodeURIComponent(m.sanitise(M))}function B(M,$,oe){let G=oe.payload.options;if(s(M,$)){if(!M[$].startsWith("#/components/")){if(M[$]==="#/consumes")delete M[$],oe.parent[oe.pkey]=l(G.openapi.consumes);else if(M[$]==="#/produces")delete M[$],oe.parent[oe.pkey]=l(G.openapi.produces);else if(M[$].startsWith("#/definitions/")){let ce=M[$].replace("#/definitions/","").split("/");const pe=i.jpunescape(ce[0]);let Q=v.schemas[decodeURIComponent(pe)];Q?ce[0]=Q:C("Could not resolve reference "+M[$],M,G),M[$]="#/components/schemas/"+ce.join("/")}else if(M[$].startsWith("#/parameters/"))M[$]="#/components/parameters/"+m.sanitise(M[$].replace("#/parameters/",""));else if(M[$].startsWith("#/responses/"))M[$]="#/components/responses/"+m.sanitise(M[$].replace("#/responses/",""));else if(M[$].startsWith("#")){let ce=l(i.jptr(G.openapi,M[$]));if(ce===!1)C("direct $ref not found "+M[$],M,G);else if(G.refmap[M[$]])M[$]=G.refmap[M[$]];else{let pe=M[$];pe=pe.replace("/properties/headers/",""),pe=pe.replace("/properties/responses/",""),pe=pe.replace("/properties/parameters/",""),pe=pe.replace("/properties/schemas/","");let Q="schemas",re=pe.lastIndexOf("/schema");if(Q=pe.indexOf("/headers/")>re?"headers":pe.indexOf("/responses/")>re?"responses":pe.indexOf("/example")>re?"examples":pe.indexOf("/x-")>re?"extensions":pe.indexOf("/parameters/")>re?"parameters":"schemas",Q==="schemas"&&O(ce,G),Q!=="responses"&&Q!=="extensions"){let de=Q.substr(0,Q.length-1);de==="parameter"&&ce.name&&ce.name===m.sanitise(ce.name)&&(de=encodeURIComponent(ce.name));let fe=1;for(M["x-miro"]&&(de=A(M["x-miro"]),fe="");i.jptr(G.openapi,"#/components/"+Q+"/"+de+fe);)fe=fe===""?2:++fe;let ge="#/components/"+Q+"/"+de+fe,he="";Q==="examples"&&(ce={value:ce},he="/value"),i.jptr(G.openapi,ge,ce),G.refmap[M[$]]=ge+he,M[$]=ge+he}}}}if(delete M["x-miro"],Object.keys(M).length>1){const ce=M[$],pe=oe.path.indexOf("/schema")>=0;G.refSiblings==="preserve"||(pe&&G.refSiblings==="allOf"?(delete M.$ref,oe.parent[oe.pkey]={allOf:[{$ref:ce},M]}):oe.parent[oe.pkey]={$ref:ce})}}if($==="x-ms-odata"&&typeof M[$]=="string"&&M[$].startsWith("#/")){let ce=M[$].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),pe=v.schemas[decodeURIComponent(ce[0])];pe?ce[0]=pe:C("Could not resolve reference "+M[$],M,G),M[$]="#/components/schemas/"+ce.join("/")}}function L(M,$){for(let oe in $.refmap)i.jptr(M,oe,{$ref:$.refmap[oe]})}function q(M){for(let $ in M)for(let oe in M[$]){let G=m.sanitise(oe);oe!==G&&(M[$][G]=M[$][oe],delete M[$][oe])}}function N(M,$){if(M.type==="basic"&&(M.type="http",M.scheme="basic"),M.type==="oauth2"){let oe={},G=M.flow;M.flow==="application"&&(G="clientCredentials"),M.flow==="accessCode"&&(G="authorizationCode"),typeof M.authorizationUrl<"u"&&(oe.authorizationUrl=M.authorizationUrl.split("?")[0].trim()||"/"),typeof M.tokenUrl=="string"&&(oe.tokenUrl=M.tokenUrl.split("?")[0].trim()||"/"),oe.scopes=M.scopes||{},M.flows={},M.flows[G]=oe,delete M.flow,delete M.authorizationUrl,delete M.tokenUrl,delete M.scopes,typeof M.name<"u"&&($.patch?($.patches++,delete M.name):z("(Patchable) oauth2 securitySchemes should not have name property",$))}}function U(M){return M&&!M["x-s2o-delete"]}function D(M,$){if(M.$ref)M.$ref=M.$ref.replace("#/responses/","#/components/responses/");else{M.type&&!M.schema&&(M.schema={}),M.type&&(M.schema.type=M.type),M.items&&M.items.type!=="array"&&(M.items.collectionFormat!==M.collectionFormat&&C("Nested collectionFormats are not supported",M,$),delete M.items.collectionFormat),M.type==="array"?(M.collectionFormat==="ssv"?C("collectionFormat:ssv is no longer supported for headers",M,$):M.collectionFormat==="pipes"?C("collectionFormat:pipes is no longer supported for headers",M,$):M.collectionFormat==="multi"?M.explode=!0:M.collectionFormat==="tsv"?(C("collectionFormat:tsv is no longer supported",M,$),M["x-collectionFormat"]="tsv"):M.style="simple",delete M.collectionFormat):M.collectionFormat&&($.patch?($.patches++,delete M.collectionFormat):z("(Patchable) collectionFormat is only applicable to header.type array",$)),delete M.type;for(let oe of m.parameterTypeProperties)typeof M[oe]<"u"&&(M.schema[oe]=M[oe],delete M[oe]);for(let oe of m.arrayProperties)typeof M[oe]<"u"&&(M.schema[oe]=M[oe],delete M[oe])}}function Y(M,$){if(M.$ref.indexOf("#/parameters/")>=0){let oe=M.$ref.split("#/parameters/");M.$ref=oe[0]+"#/components/parameters/"+m.sanitise(oe[1])}M.$ref.indexOf("#/definitions/")>=0&&C("Definition used as parameter",M,$)}function te(M,$){let oe={};for(let G of Object.keys(M))oe[G]=M[G],G==="parameters"&&(oe.requestBody={},$.rbname&&(oe[$.rbname]=""));return oe.requestBody={},oe}function ue(M,$,oe,G,ce,pe,Q){let re={},de=!0,fe;if($&&$.consumes&&typeof $.consumes=="string")if(Q.patch)Q.patches++,$.consumes=[$.consumes];else return z("(Patchable) operation.consumes must be an array",Q);Array.isArray(pe.consumes)||delete pe.consumes;let ge=(($?$.consumes:null)||pe.consumes||[]).filter(m.uniqueOnly);if(M&&M.$ref&&typeof M.$ref=="string"){Y(M,Q);let he=decodeURIComponent(M.$ref.replace("#/components/parameters/","")),xe=!1,Oe=pe.components.parameters[he];if((!Oe||Oe["x-s2o-delete"])&&M.$ref.startsWith("#/")&&(M["x-s2o-delete"]=!0,xe=!0),xe){let _e=M.$ref,Ye=o(pe,M.$ref);!Ye&&_e.startsWith("#/")?C("Could not resolve reference "+_e,M,Q):Ye&&(M=Ye)}}if(M&&(M.name||M.in)){typeof M["x-deprecated"]=="boolean"&&(M.deprecated=M["x-deprecated"],delete M["x-deprecated"]),typeof M["x-example"]<"u"&&(M.example=M["x-example"],delete M["x-example"]),M.in!=="body"&&!M.type&&(Q.patch?(Q.patches++,M.type="string"):z("(Patchable) parameter.type is mandatory for non-body parameters",Q)),M.type&&typeof M.type=="object"&&M.type.$ref&&(M.type=o(pe,M.type.$ref)),M.type==="file"&&(M["x-s2o-originalType"]=M.type,fe=M.type),M.description&&typeof M.description=="object"&&M.description.$ref&&(M.description=o(pe,M.description.$ref)),M.description===null&&delete M.description;let he=M.collectionFormat;if(M.type==="array"&&!he&&(he="csv"),he&&(M.type!=="array"&&(Q.patch?(Q.patches++,delete M.collectionFormat):z("(Patchable) collectionFormat is only applicable to param.type array",Q)),he==="csv"&&(M.in==="query"||M.in==="cookie")&&(M.style="form",M.explode=!1),he==="csv"&&(M.in==="path"||M.in==="header")&&(M.style="simple"),he==="ssv"&&(M.in==="query"?M.style="spaceDelimited":C("collectionFormat:ssv is no longer supported except for in:query parameters",M,Q)),he==="pipes"&&(M.in==="query"?M.style="pipeDelimited":C("collectionFormat:pipes is no longer supported except for in:query parameters",M,Q)),he==="multi"&&(M.explode=!0),he==="tsv"&&(C("collectionFormat:tsv is no longer supported",M,Q),M["x-collectionFormat"]="tsv"),delete M.collectionFormat),M.type&&M.type!=="body"&&M.in!=="formData")if(M.items&&M.schema)C("parameter has array,items and schema",M,Q);else{M.schema&&Q.patches++,(!M.schema||typeof M.schema!="object")&&(M.schema={}),M.schema.type=M.type,M.items&&(M.schema.items=M.items,delete M.items,u(M.schema.items,null,function(xe,Oe,_e){Oe==="collectionFormat"&&typeof xe[Oe]=="string"&&(he&&xe[Oe]!==he&&C("Nested collectionFormats are not supported",M,Q),delete xe[Oe])}));for(let xe of m.parameterTypeProperties)typeof M[xe]<"u"&&(M.schema[xe]=M[xe]),delete M[xe]}M.schema&&O(M.schema,Q),M["x-ms-skip-url-encoding"]&&M.in==="query"&&(M.allowReserved=!0,delete M["x-ms-skip-url-encoding"])}if(M&&M.in==="formData"){de=!1,re.content={};let he="application/x-www-form-urlencoded";if(ge.length&&ge.indexOf("multipart/form-data")>=0&&(he="multipart/form-data"),re.content[he]={},M.schema)re.content[he].schema=M.schema,M.schema.$ref&&(re["x-s2o-name"]=decodeURIComponent(M.schema.$ref.replace("#/components/schemas/","")));else{re.content[he].schema={},re.content[he].schema.type="object",re.content[he].schema.properties={},re.content[he].schema.properties[M.name]={};let xe=re.content[he].schema,Oe=re.content[he].schema.properties[M.name];M.description&&(Oe.description=M.description),M.example&&(Oe.example=M.example),M.type&&(Oe.type=M.type);for(let _e of m.parameterTypeProperties)typeof M[_e]<"u"&&(Oe[_e]=M[_e]);M.required===!0&&(xe.required||(xe.required=[]),xe.required.push(M.name),re.required=!0),typeof M.default<"u"&&(Oe.default=M.default),Oe.properties&&(Oe.properties=M.properties),M.allOf&&(Oe.allOf=M.allOf),M.type==="array"&&M.items&&(Oe.items=M.items,Oe.items.collectionFormat&&delete Oe.items.collectionFormat),(fe==="file"||M["x-s2o-originalType"]==="file")&&(Oe.type="string",Oe.format="binary"),ne(M,Oe)}}else M&&M.type==="file"&&(M.required&&(re.required=M.required),re.content={},re.content["application/octet-stream"]={},re.content["application/octet-stream"].schema={},re.content["application/octet-stream"].schema.type="string",re.content["application/octet-stream"].schema.format="binary",ne(M,re));if(M&&M.in==="body"){re.content={},M.name&&(re["x-s2o-name"]=($&&$.operationId?m.sanitiseAll($.operationId):"")+("_"+M.name).toCamelCase()),M.description&&(re.description=M.description),M.required&&(re.required=M.required),$&&Q.rbname&&M.name&&($[Q.rbname]=M.name),M.schema&&M.schema.$ref?re["x-s2o-name"]=decodeURIComponent(M.schema.$ref.replace("#/components/schemas/","")):M.schema&&M.schema.type==="array"&&M.schema.items&&M.schema.items.$ref&&(re["x-s2o-name"]=decodeURIComponent(M.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),ge.length||ge.push("application/json");for(let he of ge)re.content[he]={},re.content[he].schema=l(M.schema||{}),O(re.content[he].schema,Q);ne(M,re)}if(Object.keys(re).length>0&&(M["x-s2o-delete"]=!0,$))if($.requestBody&&de){$.requestBody["x-s2o-overloaded"]=!0;let he=$.operationId||ce;C("Operation "+he+" has multiple requestBodies",$,Q)}else $.requestBody||($=oe[G]=te($,Q)),$.requestBody.content&&$.requestBody.content["multipart/form-data"]&&$.requestBody.content["multipart/form-data"].schema&&$.requestBody.content["multipart/form-data"].schema.properties&&re.content["multipart/form-data"]&&re.content["multipart/form-data"].schema&&re.content["multipart/form-data"].schema.properties?($.requestBody.content["multipart/form-data"].schema.properties=Object.assign($.requestBody.content["multipart/form-data"].schema.properties,re.content["multipart/form-data"].schema.properties),$.requestBody.content["multipart/form-data"].schema.required=($.requestBody.content["multipart/form-data"].schema.required||[]).concat(re.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&&re.content["application/x-www-form-urlencoded"]&&re.content["application/x-www-form-urlencoded"].schema&&re.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,re.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(re.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,re),$.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(M&&!M["x-s2o-delete"]){delete M.type;for(let he of m.parameterTypeProperties)delete M[he];M.in==="path"&&(typeof M.required>"u"||M.required!==!0)&&(Q.patch?(Q.patches++,M.required=!0):z("(Patchable) path parameters must be required:true ["+M.name+" in "+ce+"]",Q))}return $}function ne(M,$){for(let oe in M)oe.startsWith("x-")&&!oe.startsWith("x-s2o")&&($[oe]=M[oe])}function me(M,$,oe,G,ce){if(!M)return!1;if(M.$ref&&typeof M.$ref=="string")M.$ref.indexOf("#/definitions/")>=0?C("definition used as response: "+M.$ref,M,ce):M.$ref.startsWith("#/responses/")&&(M.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(M.$ref.replace("#/responses/",""))));else{if((typeof M.description>"u"||M.description===null||M.description===""&&ce.patch)&&(ce.patch?typeof M=="object"&&!Array.isArray(M)&&(ce.patches++,M.description=g[M]||""):z("(Patchable) response.description is mandatory",ce)),typeof M.schema<"u"){if(O(M.schema,ce),M.schema.$ref&&typeof M.schema.$ref=="string"&&M.schema.$ref.startsWith("#/responses/")&&(M.schema.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(M.schema.$ref.replace("#/responses/","")))),oe&&oe.produces&&typeof oe.produces=="string")if(ce.patch)ce.patches++,oe.produces=[oe.produces];else return z("(Patchable) operation.produces must be an array",ce);G.produces&&!Array.isArray(G.produces)&&delete G.produces;let pe=((oe?oe.produces:null)||G.produces||[]).filter(m.uniqueOnly);pe.length||pe.push("*/*"),M.content={};for(let Q of pe){if(M.content[Q]={},M.content[Q].schema=l(M.schema),M.examples&&M.examples[Q]){let re={};re.value=M.examples[Q],M.content[Q].examples={},M.content[Q].examples.response=re,delete M.examples[Q]}M.content[Q].schema.type==="file"&&(M.content[Q].schema={type:"string",format:"binary"})}delete M.schema}for(let pe in M.examples)M.content||(M.content={}),M.content[pe]||(M.content[pe]={}),M.content[pe].examples={},M.content[pe].examples.response={},M.content[pe].examples.response.value=M.examples[pe];if(delete M.examples,M.headers)for(let pe in M.headers)pe.toLowerCase()==="status code"?ce.patch?(ce.patches++,delete M.headers[pe]):z('(Patchable) "Status Code" is not a valid header',ce):D(M.headers[pe],ce)}}function I(M,$,oe,G,ce){for(let pe in M){let Q=M[pe];Q&&Q["x-trace"]&&typeof Q["x-trace"]=="object"&&(Q.trace=Q["x-trace"],delete Q["x-trace"]),Q&&Q["x-summary"]&&typeof Q["x-summary"]=="string"&&(Q.summary=Q["x-summary"],delete Q["x-summary"]),Q&&Q["x-description"]&&typeof Q["x-description"]=="string"&&(Q.description=Q["x-description"],delete Q["x-description"]),Q&&Q["x-servers"]&&Array.isArray(Q["x-servers"])&&(Q.servers=Q["x-servers"],delete Q["x-servers"]);for(let re in Q)if(m.httpMethods.indexOf(re)>=0||re==="x-amazon-apigateway-any-method"){let de=Q[re];if(de&&de.parameters&&Array.isArray(de.parameters)){if(Q.parameters)for(let fe of Q.parameters)typeof fe.$ref=="string"&&(Y(fe,oe),fe=o(ce,fe.$ref)),!de.parameters.find(function(ge,he,xe){return ge.name===fe.name&&ge.in===fe.in})&&(fe.in==="formData"||fe.in==="body"||fe.type==="file")&&(de=ue(fe,de,Q,re,pe,ce,oe),oe.rbname&&de[oe.rbname]===""&&delete de[oe.rbname]);for(let fe of de.parameters)de=ue(fe,de,Q,re,re+":"+pe,ce,oe);oe.rbname&&de[oe.rbname]===""&&delete de[oe.rbname],oe.debug||de.parameters&&(de.parameters=de.parameters.filter(U))}if(de&&de.security&&q(de.security),typeof de=="object"){if(!de.responses){let fe={};fe.description="Default response",de.responses={default:fe}}for(let fe in de.responses){let ge=de.responses[fe];me(ge,fe,de,ce,oe)}}if(de&&de["x-servers"]&&Array.isArray(de["x-servers"]))de.servers=de["x-servers"],delete de["x-servers"];else if(de&&de.schemes&&de.schemes.length){for(let fe of de.schemes)if((!ce.schemes||ce.schemes.indexOf(fe)<0)&&(de.servers||(de.servers=[]),Array.isArray(ce.servers)))for(let ge of ce.servers){let he=l(ge),xe=a.parse(he.url);xe.protocol=fe,he.url=xe.format(),de.servers.push(he)}}if(oe.debug&&(de["x-s2o-consumes"]=de.consumes||[],de["x-s2o-produces"]=de.produces||[]),de){if(delete de.consumes,delete de.produces,delete de.schemes,de["x-ms-examples"]){for(let fe in de["x-ms-examples"]){let ge=de["x-ms-examples"][fe],he=m.sanitiseAll(fe);if(ge.parameters)for(let xe in ge.parameters){let Oe=ge.parameters[xe];for(let _e of(de.parameters||[]).concat(Q.parameters||[]))_e.$ref&&(_e=i.jptr(ce,_e.$ref)),_e.name===xe&&!_e.example&&(_e.examples||(_e.examples={}),_e.examples[fe]={value:Oe})}if(ge.responses)for(let xe in ge.responses){if(ge.responses[xe].headers)for(let Oe in ge.responses[xe].headers){let _e=ge.responses[xe].headers[Oe];for(let Ye in de.responses[xe].headers)if(Ye===Oe){let E=de.responses[xe].headers[Ye];E.example=_e}}if(ge.responses[xe].body&&(ce.components.examples[he]={value:l(ge.responses[xe].body)},de.responses[xe]&&de.responses[xe].content))for(let Oe in de.responses[xe].content){let _e=de.responses[xe].content[Oe];_e.examples||(_e.examples={}),_e.examples[fe]={$ref:"#/components/examples/"+he}}}}delete de["x-ms-examples"]}if(de.parameters&&de.parameters.length===0&&delete de.parameters,de.requestBody){let fe=de.operationId?m.sanitiseAll(de.operationId):m.sanitiseAll(re+pe).toCamelCase(),ge=m.sanitise(de.requestBody["x-s2o-name"]||fe||"");delete de.requestBody["x-s2o-name"];let he=JSON.stringify(de.requestBody),xe=m.hash(he);if(!G[xe]){let _e={};_e.name=ge,_e.body=de.requestBody,_e.refs=[],G[xe]=_e}let Oe="#/"+$+"/"+encodeURIComponent(i.jpescape(pe))+"/"+re+"/requestBody";G[xe].refs.push(Oe)}}}if(Q&&Q.parameters){for(let re in Q.parameters){let de=Q.parameters[re];ue(de,null,Q,null,pe,ce,oe)}!oe.debug&&Array.isArray(Q.parameters)&&(Q.parameters=Q.parameters.filter(U))}}}function K(M,$){let oe={};v={schemas:{}},M.security&&q(M.security);for(let ce in M.components.securitySchemes){let pe=m.sanitise(ce);ce!==pe&&(M.components.securitySchemes[pe]&&z("Duplicate sanitised securityScheme name "+pe,$),M.components.securitySchemes[pe]=M.components.securitySchemes[ce],delete M.components.securitySchemes[ce]),N(M.components.securitySchemes[pe],$)}for(let ce in M.components.schemas){let pe=m.sanitiseAll(ce),Q="";if(ce!==pe){for(;M.components.schemas[pe+Q];)Q=Q?++Q:2;M.components.schemas[pe+Q]=M.components.schemas[ce],delete M.components.schemas[ce]}v.schemas[ce]=pe+Q,O(M.components.schemas[pe+Q],$)}$.refmap={},u(M,{payload:{options:$}},B),L(M,$);for(let ce in M.components.parameters){let pe=m.sanitise(ce);ce!==pe&&(M.components.parameters[pe]&&z("Duplicate sanitised parameter name "+pe,$),M.components.parameters[pe]=M.components.parameters[ce],delete M.components.parameters[ce]);let Q=M.components.parameters[pe];ue(Q,null,null,null,pe,M,$)}for(let ce in M.components.responses){let pe=m.sanitise(ce);ce!==pe&&(M.components.responses[pe]&&z("Duplicate sanitised response name "+pe,$),M.components.responses[pe]=M.components.responses[ce],delete M.components.responses[ce]);let Q=M.components.responses[pe];if(me(Q,pe,null,M,$),Q.headers)for(let re in Q.headers)re.toLowerCase()==="status code"?$.patch?($.patches++,delete Q.headers[re]):z('(Patchable) "Status Code" is not a valid header',$):D(Q.headers[re],$)}for(let ce in M.components.requestBodies){let pe=M.components.requestBodies[ce],Q=JSON.stringify(pe),re=m.hash(Q),de={};de.name=ce,de.body=pe,de.refs=[],oe[re]=de}if(I(M.paths,"paths",$,oe,M),M["x-ms-paths"]&&I(M["x-ms-paths"],"x-ms-paths",$,oe,M),!$.debug)for(let ce in M.components.parameters)M.components.parameters[ce]["x-s2o-delete"]&&delete M.components.parameters[ce];$.debug&&(M["x-s2o-consumes"]=M.consumes||[],M["x-s2o-produces"]=M.produces||[]),delete M.consumes,delete M.produces,delete M.schemes;let G=[];if(M.components.requestBodies={},!$.resolveInternal){let ce=1;for(let pe in oe){let Q=oe[pe];if(Q.refs.length>1){let re="";for(Q.name||(Q.name="requestBody",re=ce++);G.indexOf(Q.name+re)>=0;)re=re?++re:2;Q.name=Q.name+re,G.push(Q.name),M.components.requestBodies[Q.name]=l(Q.body);for(let de in Q.refs){let fe={};fe.$ref="#/components/requestBodies/"+Q.name,i.jptr(M,Q.refs[de],fe)}}}}return M.components.responses&&Object.keys(M.components.responses).length===0&&delete M.components.responses,M.components.parameters&&Object.keys(M.components.parameters).length===0&&delete M.components.parameters,M.components.examples&&Object.keys(M.components.examples).length===0&&delete M.components.examples,M.components.requestBodies&&Object.keys(M.components.requestBodies).length===0&&delete M.components.requestBodies,M.components.securitySchemes&&Object.keys(M.components.securitySchemes).length===0&&delete M.components.securitySchemes,M.components.headers&&Object.keys(M.components.headers).length===0&&delete M.components.headers,M.components.schemas&&Object.keys(M.components.schemas).length===0&&delete M.components.schemas,M.components&&Object.keys(M.components).length===0&&delete M.components,M}function W(M){return!M||!M.url||typeof M.url!="string"||(M.url=M.url.split("{{").join("{"),M.url=M.url.split("}}").join("}"),M.url.replace(/\{(.+?)\}/g,function($,oe){M.variables||(M.variables={}),M.variables[oe]={default:"unknown"}})),M}function V(M,$,oe){if(typeof M.info>"u"||M.info===null)if($.patch)$.patches++,M.info={version:"",title:""};else return oe(new k("(Patchable) info object is mandatory"));if(typeof M.info!="object"||Array.isArray(M.info))return oe(new k("info must be an object"));if(typeof M.info.title>"u"||M.info.title===null)if($.patch)$.patches++,M.info.title="";else return oe(new k("(Patchable) info.title cannot be null"));if(typeof M.info.version>"u"||M.info.version===null)if($.patch)$.patches++,M.info.version="";else return oe(new k("(Patchable) info.version cannot be null"));if(typeof M.info.version!="string")if($.patch)$.patches++,M.info.version=M.info.version.toString();else return oe(new k("(Patchable) info.version must be a string"));if(typeof M.info.logo<"u")if($.patch)$.patches++,M.info["x-logo"]=M.info.logo,delete M.info.logo;else return oe(new k("(Patchable) info should not have logo property"));if(typeof M.info.termsOfService<"u"){if(M.info.termsOfService===null)if($.patch)$.patches++,M.info.termsOfService="";else return oe(new k("(Patchable) info.termsOfService cannot be null"));try{new URL(M.info.termsOfService)}catch{if($.patch)$.patches++,delete M.info.termsOfService;else return oe(new k("(Patchable) info.termsOfService must be a URL"))}}}function P(M,$,oe){if(typeof M.paths>"u")if($.patch)$.patches++,M.paths={};else return oe(new k("(Patchable) paths object is mandatory"))}function _(M,$){const oe=new WeakSet;u(M,{identityDetection:!0},function(G,ce,pe){typeof G[ce]=="object"&&G[ce]!==null&&(oe.has(G[ce])?$.anchors?G[ce]=l(G[ce]):z("YAML anchor or merge key at "+pe.path,$):oe.add(G[ce]))})}function F(M,$,oe){return t(oe,new Promise(function(G,ce){if(M||(M={}),$.original=M,$.text||($.text=n.stringify(M)),$.externals=[],$.externalRefs={},$.rewriteRefs=!0,$.preserveMiro=!0,$.promise={},$.promise.resolve=G,$.promise.reject=ce,$.patches=0,$.cache||($.cache={}),$.source&&($.cache[$.source]=$.original),_(M,$),M.openapi&&typeof M.openapi=="string"&&M.openapi.startsWith("3.")){$.openapi=c(M),V($.openapi,$,ce),P($.openapi,$,ce),d.optionalResolve($).then(function(){return $.direct?G($.openapi):G($)}).catch(function(Q){console.warn(Q),ce(Q)});return}if(!M.swagger||M.swagger!="2.0")return ce(new k("Unsupported swagger/OpenAPI version: "+(M.openapi?M.openapi:M.swagger)));let pe=$.openapi={};if(pe.openapi=typeof $.targetVersion=="string"&&$.targetVersion.startsWith("3.")?$.targetVersion:y,$.origin){pe["x-origin"]||(pe["x-origin"]=[]);let Q={};Q.url=$.source||$.origin,Q.format="swagger",Q.version=M.swagger,Q.converter={},Q.converter.url="https://github.com/mermade/oas-kit",Q.converter.version=b,pe["x-origin"].push(Q)}if(pe=Object.assign(pe,c(M)),delete pe.swagger,u(pe,{},function(Q,re,de){Q[re]===null&&!re.startsWith("x-")&&re!=="default"&&de.path.indexOf("/example")<0&&delete Q[re]}),M.host)for(let Q of Array.isArray(M.schemes)?M.schemes:[""]){let re={},de=(M.basePath||"").replace(/\/$/,"");re.url=(Q?Q+":":"")+"//"+M.host+de,W(re),pe.servers||(pe.servers=[]),pe.servers.push(re)}else if(M.basePath){let Q={};Q.url=M.basePath,W(Q),pe.servers||(pe.servers=[]),pe.servers.push(Q)}if(delete pe.host,delete pe.basePath,pe["x-servers"]&&Array.isArray(pe["x-servers"])&&(pe.servers=pe["x-servers"],delete pe["x-servers"]),M["x-ms-parameterized-host"]){let Q=M["x-ms-parameterized-host"],re={};re.url=Q.hostTemplate+(M.basePath?M.basePath:""),re.variables={};const de=re.url.match(/\{\w+\}/g);for(let fe in Q.parameters){let ge=Q.parameters[fe];ge.$ref&&(ge=l(o(pe,ge.$ref))),fe.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=de[fe].replace("{","").replace("}","")),re.variables[ge.name]=ge,delete ge.name)}pe.servers||(pe.servers=[]),Q.useSchemePrefix===!1?pe.servers.push(re):M.schemes.forEach(fe=>{pe.servers.push(Object.assign({},re,{url:fe+"://"+re.url}))}),delete pe["x-ms-parameterized-host"]}V(pe,$,ce),P(pe,$,ce),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(){K($.openapi,$),$.direct?G($.openapi):G($)}).catch(function(Q){console.warn(Q),ce(Q)})}))}function ee(M,$,oe){return t(oe,new Promise(function(G,ce){let pe=null,Q=null;try{pe=JSON.parse(M),$.text=JSON.stringify(pe,null,2)}catch(re){Q=re;try{pe=n.parse(M,{schema:"core",prettyErrors:!0}),$.sourceYaml=!0,$.text=M}catch(de){Q=de}}pe?F(pe,$).then(re=>G(re)).catch(re=>ce(re)):ce(new k(Q?Q.message:"Could not parse string"))}))}function ie(M,$,oe){return t(oe,new Promise(function(G,ce){$.origin=!0,$.source||($.source=M),$.verbose&&console.warn("GET "+M),$.fetch||($.fetch=r);const pe=Object.assign({},$.fetchOptions,{agent:$.agent});$.fetch(M,pe).then(function(Q){if(Q.status!==200)throw new k(`Received status code ${Q.status}: ${M}`);return Q.text()}).then(function(Q){ee(Q,$).then(re=>G(re)).catch(re=>ce(re))}).catch(function(Q){ce(Q)})}))}function be(M,$,oe){return t(oe,new Promise(function(G,ce){e.readFile(M,$.encoding||"utf8",function(pe,Q){pe?ce(pe):($.sourceFile=M,ee(Q,$).then(re=>G(re)).catch(re=>ce(re)))})}))}function X(M,$,oe){return t(oe,new Promise(function(G,ce){let pe="";M.on("data",function(Q){pe+=Q}).on("end",function(){ee(pe,$).then(Q=>G(Q)).catch(Q=>ce(Q))})}))}return O7={S2OError:k,targetVersion:y,convert:F,convertObj:F,convertUrl:ie,convertStr:ee,convertFile:be,convertStream:X},O7}var rta=tta();const nta=Vr(rta);function ita(e){return e.paths||(e.paths={}),new Promise((a,t)=>nta.convertObj(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(r,n)=>{if(r)return t(r);a(n?.openapi)}))}async function ota(){try{return(await Zae())?.resolvedConfig.openapi||{}}catch{return{}}}async function sta(e){const a=await Zae(),t={config:a,base:Jc?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};Jc&&(a.resolve.http.customFetch=globalThis.fetch),typeof e=="object"&&e!==null?t.doc=lta(e):t.ref=e;const{bundle:{parsed:r}}=await Caa(t);return r.swagger!==void 0?ita(r):r}function lta(e){return{source:{absoluteRef:""},parsed:e}}async function cta(e,a,t){let r;if(t?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await sta(e||a);try{IFe(r)}catch{}return r}const uta=({options:e,definitionUrl:a,definition:t,activeSampleLanguage:r,children:n})=>{const[i,o]=R.useState(),[s,l]=R.useState(!0),[c,u]=R.useState(null),[d,p]=R.useState(e||{});R.useEffect(()=>{async function g(){l(!0);try{const b=await ota();p({...e,...b}),u(await cta(t,a,e))}catch(b){o(b.message)}}g()},[t,a,e]);const m=R.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:a,activeSampleLanguage:r}},KFe([c,a,d]));return R.useEffect(()=>{m&&l(!1)},[m]),i||!m?null:s?Qs(e?.hideLoading,!1)?null:h.jsx(HZe,{color:"--loading-spinner-color"}):R.isValidElement(n)?R.cloneElement(n,{store:m}):null};function dta({definition:e,definitionUrl:a,options:t={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return h.jsx(uta,{definition:e,definitionUrl:a,options:t,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:h.jsx(yee,{withCommonStyles:!0,router:o||"hash"})})}function pta(e){const a={},t=e.attributes;for(let r=0;r<t.length;r++){const n=t[r];a[n.name]=n.value}return a}function hta(e){const a=pta(e),t={};for(const r in a){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());t[n]=a[r]}return t}function mta(e,a=document.querySelector("redoc")){ZF.hydrateRoot(a,h.jsx(yee,{store:e}),{onRecoverableError:(t,r)=>{t.message.includes("Minified React error #418")||console.error(t.message,r)}})}function dre(e,a={},t=z4("redoc")){if(t===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}={...a,...hta(t)};let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),ZF.createRoot(t).render(R.createElement(dta,{definition:o,definitionUrl:i,options:n,router:r??"hash"},["Loading..."]))}const fta="3.15.0-next.12",gta="a1b9df0c";function vta(){const e=z4("redoc");if(!e)return;const a=e.getAttribute("spec-url");a&&dre(a,{},e)}vta();function u1(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 pre={exports:{}};/*!
10277
+ */var Ate;function c1(){return Ate||(Ate=1,(function(e){const a=Iaa(),t=Kaa(),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 E=new Uint8Array(1),ae={foo:function(){return 42}};return Object.setPrototypeOf(ae,Uint8Array.prototype),Object.setPrototypeOf(E,ae),E.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(E){if(E>n)throw new RangeError('The value "'+E+'" is invalid for option "size"');const ae=new Uint8Array(E);return Object.setPrototypeOf(ae,s.prototype),ae}function s(E,ae,le){if(typeof E=="number"){if(typeof ae=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(E)}return l(E,ae,le)}s.poolSize=8192;function l(E,ae,le){if(typeof E=="string")return p(E,ae);if(ArrayBuffer.isView(E))return g(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(he(E,ArrayBuffer)||E&&he(E.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(E,SharedArrayBuffer)||E&&he(E.buffer,SharedArrayBuffer)))return b(E,ae,le);if(typeof E=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ce=E.valueOf&&E.valueOf();if(Ce!=null&&Ce!==E)return s.from(Ce,ae,le);const Me=y(E);if(Me)return Me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]=="function")return s.from(E[Symbol.toPrimitive]("string"),ae,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}s.from=function(E,ae,le){return l(E,ae,le)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(E){if(typeof E!="number")throw new TypeError('"size" argument must be of type number');if(E<0)throw new RangeError('The value "'+E+'" is invalid for option "size"')}function u(E,ae,le){return c(E),E<=0?o(E):ae!==void 0?typeof le=="string"?o(E).fill(ae,le):o(E).fill(ae):o(E)}s.alloc=function(E,ae,le){return u(E,ae,le)};function d(E){return c(E),o(E<0?0:v(E)|0)}s.allocUnsafe=function(E){return d(E)},s.allocUnsafeSlow=function(E){return d(E)};function p(E,ae){if((typeof ae!="string"||ae==="")&&(ae="utf8"),!s.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);const le=z(E,ae)|0;let Ce=o(le);const Me=Ce.write(E,ae);return Me!==le&&(Ce=Ce.slice(0,Me)),Ce}function m(E){const ae=E.length<0?0:v(E.length)|0,le=o(ae);for(let Ce=0;Ce<ae;Ce+=1)le[Ce]=E[Ce]&255;return le}function g(E){if(he(E,Uint8Array)){const ae=new Uint8Array(E);return b(ae.buffer,ae.byteOffset,ae.byteLength)}return m(E)}function b(E,ae,le){if(ae<0||E.byteLength<ae)throw new RangeError('"offset" is outside of buffer bounds');if(E.byteLength<ae+(le||0))throw new RangeError('"length" is outside of buffer bounds');let Ce;return ae===void 0&&le===void 0?Ce=new Uint8Array(E):le===void 0?Ce=new Uint8Array(E,ae):Ce=new Uint8Array(E,ae,le),Object.setPrototypeOf(Ce,s.prototype),Ce}function y(E){if(s.isBuffer(E)){const ae=v(E.length)|0,le=o(ae);return le.length===0||E.copy(le,0,0,ae),le}if(E.length!==void 0)return typeof E.length!="number"||xe(E.length)?o(0):m(E);if(E.type==="Buffer"&&Array.isArray(E.data))return m(E.data)}function v(E){if(E>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return E|0}function k(E){return+E!=E&&(E=0),s.alloc(+E)}s.isBuffer=function(E){return E!=null&&E._isBuffer===!0&&E!==s.prototype},s.compare=function(E,ae){if(he(E,Uint8Array)&&(E=s.from(E,E.offset,E.byteLength)),he(ae,Uint8Array)&&(ae=s.from(ae,ae.offset,ae.byteLength)),!s.isBuffer(E)||!s.isBuffer(ae))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(E===ae)return 0;let le=E.length,Ce=ae.length;for(let Me=0,Te=Math.min(le,Ce);Me<Te;++Me)if(E[Me]!==ae[Me]){le=E[Me],Ce=ae[Me];break}return le<Ce?-1:Ce<le?1:0},s.isEncoding=function(E){switch(String(E).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(E,ae){if(!Array.isArray(E))throw new TypeError('"list" argument must be an Array of Buffers');if(E.length===0)return s.alloc(0);let le;if(ae===void 0)for(ae=0,le=0;le<E.length;++le)ae+=E[le].length;const Ce=s.allocUnsafe(ae);let Me=0;for(le=0;le<E.length;++le){let Te=E[le];if(he(Te,Uint8Array))Me+Te.length>Ce.length?(s.isBuffer(Te)||(Te=s.from(Te)),Te.copy(Ce,Me)):Uint8Array.prototype.set.call(Ce,Te,Me);else if(s.isBuffer(Te))Te.copy(Ce,Me);else throw new TypeError('"list" argument must be an Array of Buffers');Me+=Te.length}return Ce};function z(E,ae){if(s.isBuffer(E))return E.length;if(ArrayBuffer.isView(E)||he(E,ArrayBuffer))return E.byteLength;if(typeof E!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);const le=E.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&le===0)return 0;let Me=!1;for(;;)switch(ae){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return Q(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return fe(E).length;default:if(Me)return Ce?-1:Q(E).length;ae=(""+ae).toLowerCase(),Me=!0}}s.byteLength=z;function C(E,ae,le){let Ce=!1;if((ae===void 0||ae<0)&&(ae=0),ae>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,ae>>>=0,le<=ae))return"";for(E||(E="utf8");;)switch(E){case"hex":return me(this,ae,le);case"utf8":case"utf-8":return D(this,ae,le);case"ascii":return ue(this,ae,le);case"latin1":case"binary":return ne(this,ae,le);case"base64":return U(this,ae,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,ae,le);default:if(Ce)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),Ce=!0}}s.prototype._isBuffer=!0;function w(E,ae,le){const Ce=E[ae];E[ae]=E[le],E[le]=Ce}s.prototype.swap16=function(){const E=this.length;if(E%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ae=0;ae<E;ae+=2)w(this,ae,ae+1);return this},s.prototype.swap32=function(){const E=this.length;if(E%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ae=0;ae<E;ae+=4)w(this,ae,ae+3),w(this,ae+1,ae+2);return this},s.prototype.swap64=function(){const E=this.length;if(E%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ae=0;ae<E;ae+=8)w(this,ae,ae+7),w(this,ae+1,ae+6),w(this,ae+2,ae+5),w(this,ae+3,ae+4);return this},s.prototype.toString=function(){const E=this.length;return E===0?"":arguments.length===0?D(this,0,E):C.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(E){if(!s.isBuffer(E))throw new TypeError("Argument must be a Buffer");return this===E?!0:s.compare(this,E)===0},s.prototype.inspect=function(){let E="";const ae=e.INSPECT_MAX_BYTES;return E=this.toString("hex",0,ae).replace(/(.{2})/g,"$1 ").trim(),this.length>ae&&(E+=" ... "),"<Buffer "+E+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(E,ae,le,Ce,Me){if(he(E,Uint8Array)&&(E=s.from(E,E.offset,E.byteLength)),!s.isBuffer(E))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof E);if(ae===void 0&&(ae=0),le===void 0&&(le=E?E.length:0),Ce===void 0&&(Ce=0),Me===void 0&&(Me=this.length),ae<0||le>E.length||Ce<0||Me>this.length)throw new RangeError("out of range index");if(Ce>=Me&&ae>=le)return 0;if(Ce>=Me)return-1;if(ae>=le)return 1;if(ae>>>=0,le>>>=0,Ce>>>=0,Me>>>=0,this===E)return 0;let Te=Me-Ce,De=le-ae;const ra=Math.min(Te,De),pa=this.slice(Ce,Me),va=E.slice(ae,le);for(let sa=0;sa<ra;++sa)if(pa[sa]!==va[sa]){Te=pa[sa],De=va[sa];break}return Te<De?-1:De<Te?1:0};function S(E,ae,le,Ce,Me){if(E.length===0)return-1;if(typeof le=="string"?(Ce=le,le=0):le>2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,xe(le)&&(le=Me?0:E.length-1),le<0&&(le=E.length+le),le>=E.length){if(Me)return-1;le=E.length-1}else if(le<0)if(Me)le=0;else return-1;if(typeof ae=="string"&&(ae=s.from(ae,Ce)),s.isBuffer(ae))return ae.length===0?-1:O(E,ae,le,Ce,Me);if(typeof ae=="number")return ae=ae&255,typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(E,ae,le):Uint8Array.prototype.lastIndexOf.call(E,ae,le):O(E,[ae],le,Ce,Me);throw new TypeError("val must be string, number or Buffer")}function O(E,ae,le,Ce,Me){let Te=1,De=E.length,ra=ae.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(E.length<2||ae.length<2)return-1;Te=2,De/=2,ra/=2,le/=2}function pa(sa,ka){return Te===1?sa[ka]:sa.readUInt16BE(ka*Te)}let va;if(Me){let sa=-1;for(va=le;va<De;va++)if(pa(E,va)===pa(ae,sa===-1?0:va-sa)){if(sa===-1&&(sa=va),va-sa+1===ra)return sa*Te}else sa!==-1&&(va-=va-sa),sa=-1}else for(le+ra>De&&(le=De-ra),va=le;va>=0;va--){let sa=!0;for(let ka=0;ka<ra;ka++)if(pa(E,va+ka)!==pa(ae,ka)){sa=!1;break}if(sa)return va}return-1}s.prototype.includes=function(E,ae,le){return this.indexOf(E,ae,le)!==-1},s.prototype.indexOf=function(E,ae,le){return S(this,E,ae,le,!0)},s.prototype.lastIndexOf=function(E,ae,le){return S(this,E,ae,le,!1)};function A(E,ae,le,Ce){le=Number(le)||0;const Me=E.length-le;Ce?(Ce=Number(Ce),Ce>Me&&(Ce=Me)):Ce=Me;const Te=ae.length;Ce>Te/2&&(Ce=Te/2);let De;for(De=0;De<Ce;++De){const ra=parseInt(ae.substr(De*2,2),16);if(xe(ra))return De;E[le+De]=ra}return De}function B(E,ae,le,Ce){return ge(Q(ae,E.length-le),E,le,Ce)}function L(E,ae,le,Ce){return ge(re(ae),E,le,Ce)}function q(E,ae,le,Ce){return ge(fe(ae),E,le,Ce)}function N(E,ae,le,Ce){return ge(de(ae,E.length-le),E,le,Ce)}s.prototype.write=function(E,ae,le,Ce){if(ae===void 0)Ce="utf8",le=this.length,ae=0;else if(le===void 0&&typeof ae=="string")Ce=ae,le=this.length,ae=0;else if(isFinite(ae))ae=ae>>>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 Me=this.length-ae;if((le===void 0||le>Me)&&(le=Me),E.length>0&&(le<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ce||(Ce="utf8");let Te=!1;for(;;)switch(Ce){case"hex":return A(this,E,ae,le);case"utf8":case"utf-8":return B(this,E,ae,le);case"ascii":case"latin1":case"binary":return L(this,E,ae,le);case"base64":return q(this,E,ae,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,E,ae,le);default:if(Te)throw new TypeError("Unknown encoding: "+Ce);Ce=(""+Ce).toLowerCase(),Te=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(E,ae,le){return ae===0&&le===E.length?a.fromByteArray(E):a.fromByteArray(E.slice(ae,le))}function D(E,ae,le){le=Math.min(E.length,le);const Ce=[];let Me=ae;for(;Me<le;){const Te=E[Me];let De=null,ra=Te>239?4:Te>223?3:Te>191?2:1;if(Me+ra<=le){let pa,va,sa,ka;switch(ra){case 1:Te<128&&(De=Te);break;case 2:pa=E[Me+1],(pa&192)===128&&(ka=(Te&31)<<6|pa&63,ka>127&&(De=ka));break;case 3:pa=E[Me+1],va=E[Me+2],(pa&192)===128&&(va&192)===128&&(ka=(Te&15)<<12|(pa&63)<<6|va&63,ka>2047&&(ka<55296||ka>57343)&&(De=ka));break;case 4:pa=E[Me+1],va=E[Me+2],sa=E[Me+3],(pa&192)===128&&(va&192)===128&&(sa&192)===128&&(ka=(Te&15)<<18|(pa&63)<<12|(va&63)<<6|sa&63,ka>65535&&ka<1114112&&(De=ka))}}De===null?(De=65533,ra=1):De>65535&&(De-=65536,Ce.push(De>>>10&1023|55296),De=56320|De&1023),Ce.push(De),Me+=ra}return te(Ce)}const Y=4096;function te(E){const ae=E.length;if(ae<=Y)return String.fromCharCode.apply(String,E);let le="",Ce=0;for(;Ce<ae;)le+=String.fromCharCode.apply(String,E.slice(Ce,Ce+=Y));return le}function ue(E,ae,le){let Ce="";le=Math.min(E.length,le);for(let Me=ae;Me<le;++Me)Ce+=String.fromCharCode(E[Me]&127);return Ce}function ne(E,ae,le){let Ce="";le=Math.min(E.length,le);for(let Me=ae;Me<le;++Me)Ce+=String.fromCharCode(E[Me]);return Ce}function me(E,ae,le){const Ce=E.length;(!ae||ae<0)&&(ae=0),(!le||le<0||le>Ce)&&(le=Ce);let Me="";for(let Te=ae;Te<le;++Te)Me+=Oe[E[Te]];return Me}function I(E,ae,le){const Ce=E.slice(ae,le);let Me="";for(let Te=0;Te<Ce.length-1;Te+=2)Me+=String.fromCharCode(Ce[Te]+Ce[Te+1]*256);return Me}s.prototype.slice=function(E,ae){const le=this.length;E=~~E,ae=ae===void 0?le:~~ae,E<0?(E+=le,E<0&&(E=0)):E>le&&(E=le),ae<0?(ae+=le,ae<0&&(ae=0)):ae>le&&(ae=le),ae<E&&(ae=E);const Ce=this.subarray(E,ae);return Object.setPrototypeOf(Ce,s.prototype),Ce};function K(E,ae,le){if(E%1!==0||E<0)throw new RangeError("offset is not uint");if(E+ae>le)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E],Me=1,Te=0;for(;++Te<ae&&(Me*=256);)Ce+=this[E+Te]*Me;return Ce},s.prototype.readUintBE=s.prototype.readUIntBE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E+--ae],Me=1;for(;ae>0&&(Me*=256);)Ce+=this[E+--ae]*Me;return Ce},s.prototype.readUint8=s.prototype.readUInt8=function(E,ae){return E=E>>>0,ae||K(E,1,this.length),this[E]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(E,ae){return E=E>>>0,ae||K(E,2,this.length),this[E]|this[E+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(E,ae){return E=E>>>0,ae||K(E,2,this.length),this[E]<<8|this[E+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),(this[E]|this[E+1]<<8|this[E+2]<<16)+this[E+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]*16777216+(this[E+1]<<16|this[E+2]<<8|this[E+3])},s.prototype.readBigUInt64LE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=ae+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24,Me=this[++E]+this[++E]*2**8+this[++E]*2**16+le*2**24;return BigInt(Ce)+(BigInt(Me)<<BigInt(32))}),s.prototype.readBigUInt64BE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=ae*2**24+this[++E]*2**16+this[++E]*2**8+this[++E],Me=this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+le;return(BigInt(Ce)<<BigInt(32))+BigInt(Me)}),s.prototype.readIntLE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E],Me=1,Te=0;for(;++Te<ae&&(Me*=256);)Ce+=this[E+Te]*Me;return Me*=128,Ce>=Me&&(Ce-=Math.pow(2,8*ae)),Ce},s.prototype.readIntBE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=ae,Me=1,Te=this[E+--Ce];for(;Ce>0&&(Me*=256);)Te+=this[E+--Ce]*Me;return Me*=128,Te>=Me&&(Te-=Math.pow(2,8*ae)),Te},s.prototype.readInt8=function(E,ae){return E=E>>>0,ae||K(E,1,this.length),this[E]&128?(255-this[E]+1)*-1:this[E]},s.prototype.readInt16LE=function(E,ae){E=E>>>0,ae||K(E,2,this.length);const le=this[E]|this[E+1]<<8;return le&32768?le|4294901760:le},s.prototype.readInt16BE=function(E,ae){E=E>>>0,ae||K(E,2,this.length);const le=this[E+1]|this[E]<<8;return le&32768?le|4294901760:le},s.prototype.readInt32LE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]|this[E+1]<<8|this[E+2]<<16|this[E+3]<<24},s.prototype.readInt32BE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]<<24|this[E+1]<<16|this[E+2]<<8|this[E+3]},s.prototype.readBigInt64LE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=this[E+4]+this[E+5]*2**8+this[E+6]*2**16+(le<<24);return(BigInt(Ce)<<BigInt(32))+BigInt(ae+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24)}),s.prototype.readBigInt64BE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=(ae<<24)+this[++E]*2**16+this[++E]*2**8+this[++E];return(BigInt(Ce)<<BigInt(32))+BigInt(this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+le)}),s.prototype.readFloatLE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),t.read(this,E,!0,23,4)},s.prototype.readFloatBE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),t.read(this,E,!1,23,4)},s.prototype.readDoubleLE=function(E,ae){return E=E>>>0,ae||K(E,8,this.length),t.read(this,E,!0,52,8)},s.prototype.readDoubleBE=function(E,ae){return E=E>>>0,ae||K(E,8,this.length),t.read(this,E,!1,52,8)};function W(E,ae,le,Ce,Me,Te){if(!s.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(ae>Me||ae<Te)throw new RangeError('"value" argument is out of bounds');if(le+Ce>E.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;W(this,E,ae,le,De,0)}let Me=1,Te=0;for(this[ae]=E&255;++Te<le&&(Me*=256);)this[ae+Te]=E/Me&255;return ae+le},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;W(this,E,ae,le,De,0)}let Me=le-1,Te=1;for(this[ae+Me]=E&255;--Me>=0&&(Te*=256);)this[ae+Me]=E/Te&255;return ae+le},s.prototype.writeUint8=s.prototype.writeUInt8=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,1,255,0),this[ae]=E&255,ae+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,65535,0),this[ae]=E&255,this[ae+1]=E>>>8,ae+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,65535,0),this[ae]=E>>>8,this[ae+1]=E&255,ae+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,4294967295,0),this[ae+3]=E>>>24,this[ae+2]=E>>>16,this[ae+1]=E>>>8,this[ae]=E&255,ae+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,4294967295,0),this[ae]=E>>>24,this[ae+1]=E>>>16,this[ae+2]=E>>>8,this[ae+3]=E&255,ae+4};function V(E,ae,le,Ce,Me){$(ae,Ce,Me,E,le,7);let Te=Number(ae&BigInt(4294967295));E[le++]=Te,Te=Te>>8,E[le++]=Te,Te=Te>>8,E[le++]=Te,Te=Te>>8,E[le++]=Te;let De=Number(ae>>BigInt(32)&BigInt(4294967295));return E[le++]=De,De=De>>8,E[le++]=De,De=De>>8,E[le++]=De,De=De>>8,E[le++]=De,le}function P(E,ae,le,Ce,Me){$(ae,Ce,Me,E,le,7);let Te=Number(ae&BigInt(4294967295));E[le+7]=Te,Te=Te>>8,E[le+6]=Te,Te=Te>>8,E[le+5]=Te,Te=Te>>8,E[le+4]=Te;let De=Number(ae>>BigInt(32)&BigInt(4294967295));return E[le+3]=De,De=De>>8,E[le+2]=De,De=De>>8,E[le+1]=De,De=De>>8,E[le]=De,le+8}s.prototype.writeBigUInt64LE=_e(function(E,ae=0){return V(this,E,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=_e(function(E,ae=0){return P(this,E,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,!Ce){const ra=Math.pow(2,8*le-1);W(this,E,ae,le,ra-1,-ra)}let Me=0,Te=1,De=0;for(this[ae]=E&255;++Me<le&&(Te*=256);)E<0&&De===0&&this[ae+Me-1]!==0&&(De=1),this[ae+Me]=(E/Te>>0)-De&255;return ae+le},s.prototype.writeIntBE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,!Ce){const ra=Math.pow(2,8*le-1);W(this,E,ae,le,ra-1,-ra)}let Me=le-1,Te=1,De=0;for(this[ae+Me]=E&255;--Me>=0&&(Te*=256);)E<0&&De===0&&this[ae+Me+1]!==0&&(De=1),this[ae+Me]=(E/Te>>0)-De&255;return ae+le},s.prototype.writeInt8=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,1,127,-128),E<0&&(E=255+E+1),this[ae]=E&255,ae+1},s.prototype.writeInt16LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,32767,-32768),this[ae]=E&255,this[ae+1]=E>>>8,ae+2},s.prototype.writeInt16BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,32767,-32768),this[ae]=E>>>8,this[ae+1]=E&255,ae+2},s.prototype.writeInt32LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,2147483647,-2147483648),this[ae]=E&255,this[ae+1]=E>>>8,this[ae+2]=E>>>16,this[ae+3]=E>>>24,ae+4},s.prototype.writeInt32BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,2147483647,-2147483648),E<0&&(E=4294967295+E+1),this[ae]=E>>>24,this[ae+1]=E>>>16,this[ae+2]=E>>>8,this[ae+3]=E&255,ae+4},s.prototype.writeBigInt64LE=_e(function(E,ae=0){return V(this,E,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=_e(function(E,ae=0){return P(this,E,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _(E,ae,le,Ce,Me,Te){if(le+Ce>E.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function F(E,ae,le,Ce,Me){return ae=+ae,le=le>>>0,Me||_(E,ae,le,4),t.write(E,ae,le,Ce,23,4),le+4}s.prototype.writeFloatLE=function(E,ae,le){return F(this,E,ae,!0,le)},s.prototype.writeFloatBE=function(E,ae,le){return F(this,E,ae,!1,le)};function ee(E,ae,le,Ce,Me){return ae=+ae,le=le>>>0,Me||_(E,ae,le,8),t.write(E,ae,le,Ce,52,8),le+8}s.prototype.writeDoubleLE=function(E,ae,le){return ee(this,E,ae,!0,le)},s.prototype.writeDoubleBE=function(E,ae,le){return ee(this,E,ae,!1,le)},s.prototype.copy=function(E,ae,le,Ce){if(!s.isBuffer(E))throw new TypeError("argument should be a Buffer");if(le||(le=0),!Ce&&Ce!==0&&(Ce=this.length),ae>=E.length&&(ae=E.length),ae||(ae=0),Ce>0&&Ce<le&&(Ce=le),Ce===le||E.length===0||this.length===0)return 0;if(ae<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),E.length-ae<Ce-le&&(Ce=E.length-ae+le);const Me=Ce-le;return this===E&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ae,le,Ce):Uint8Array.prototype.set.call(E,this.subarray(le,Ce),ae),Me},s.prototype.fill=function(E,ae,le,Ce){if(typeof E=="string"){if(typeof ae=="string"?(Ce=ae,ae=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(E.length===1){const Te=E.charCodeAt(0);(Ce==="utf8"&&Te<128||Ce==="latin1")&&(E=Te)}}else typeof E=="number"?E=E&255:typeof E=="boolean"&&(E=Number(E));if(ae<0||this.length<ae||this.length<le)throw new RangeError("Out of range index");if(le<=ae)return this;ae=ae>>>0,le=le===void 0?this.length:le>>>0,E||(E=0);let Me;if(typeof E=="number")for(Me=ae;Me<le;++Me)this[Me]=E;else{const Te=s.isBuffer(E)?E:s.from(E,Ce),De=Te.length;if(De===0)throw new TypeError('The value "'+E+'" is invalid for argument "value"');for(Me=0;Me<le-ae;++Me)this[Me+ae]=Te[Me%De]}return this};const ie={};function be(E,ae,le){ie[E]=class extends le{constructor(){super(),Object.defineProperty(this,"message",{value:ae.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${E}]`,delete this.name}get code(){return E}set code(Ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ce,writable:!0})}toString(){return`${this.name} [${E}]: ${this.message}`}}}be("ERR_BUFFER_OUT_OF_BOUNDS",function(E){return E?`${E} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(E,ae){return`The "${E}" argument must be of type number. Received type ${typeof ae}`},TypeError),be("ERR_OUT_OF_RANGE",function(E,ae,le){let Ce=`The value of "${E}" is out of range.`,Me=le;return Number.isInteger(le)&&Math.abs(le)>2**32?Me=X(String(le)):typeof le=="bigint"&&(Me=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Me=X(Me)),Me+="n"),Ce+=` It must be ${ae}. Received ${Me}`,Ce},RangeError);function X(E){let ae="",le=E.length;const Ce=E[0]==="-"?1:0;for(;le>=Ce+4;le-=3)ae=`_${E.slice(le-3,le)}${ae}`;return`${E.slice(0,le)}${ae}`}function M(E,ae,le){oe(ae,"offset"),(E[ae]===void 0||E[ae+le]===void 0)&&G(ae,E.length-(le+1))}function $(E,ae,le,Ce,Me,Te){if(E>le||E<ae){const De=typeof ae=="bigint"?"n":"";let ra;throw ae===0||ae===BigInt(0)?ra=`>= 0${De} and < 2${De} ** ${(Te+1)*8}${De}`:ra=`>= -(2${De} ** ${(Te+1)*8-1}${De}) and < 2 ** ${(Te+1)*8-1}${De}`,new ie.ERR_OUT_OF_RANGE("value",ra,E)}M(Ce,Me,Te)}function oe(E,ae){if(typeof E!="number")throw new ie.ERR_INVALID_ARG_TYPE(ae,"number",E)}function G(E,ae,le){throw Math.floor(E)!==E?(oe(E,le),new ie.ERR_OUT_OF_RANGE("offset","an integer",E)):ae<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${ae}`,E)}const ce=/[^+/0-9A-Za-z-_]/g;function pe(E){if(E=E.split("=")[0],E=E.trim().replace(ce,""),E.length<2)return"";for(;E.length%4!==0;)E=E+"=";return E}function Q(E,ae){ae=ae||1/0;let le;const Ce=E.length;let Me=null;const Te=[];for(let De=0;De<Ce;++De){if(le=E.charCodeAt(De),le>55295&&le<57344){if(!Me){if(le>56319){(ae-=3)>-1&&Te.push(239,191,189);continue}else if(De+1===Ce){(ae-=3)>-1&&Te.push(239,191,189);continue}Me=le;continue}if(le<56320){(ae-=3)>-1&&Te.push(239,191,189),Me=le;continue}le=(Me-55296<<10|le-56320)+65536}else Me&&(ae-=3)>-1&&Te.push(239,191,189);if(Me=null,le<128){if((ae-=1)<0)break;Te.push(le)}else if(le<2048){if((ae-=2)<0)break;Te.push(le>>6|192,le&63|128)}else if(le<65536){if((ae-=3)<0)break;Te.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((ae-=4)<0)break;Te.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Te}function re(E){const ae=[];for(let le=0;le<E.length;++le)ae.push(E.charCodeAt(le)&255);return ae}function de(E,ae){let le,Ce,Me;const Te=[];for(let De=0;De<E.length&&!((ae-=2)<0);++De)le=E.charCodeAt(De),Ce=le>>8,Me=le%256,Te.push(Me),Te.push(Ce);return Te}function fe(E){return a.toByteArray(pe(E))}function ge(E,ae,le,Ce){let Me;for(Me=0;Me<Ce&&!(Me+le>=ae.length||Me>=E.length);++Me)ae[Me+le]=E[Me];return Me}function he(E,ae){return E instanceof ae||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===ae.name}function xe(E){return E!==E}const Oe=(function(){const E="0123456789abcdef",ae=new Array(256);for(let le=0;le<16;++le){const Ce=le*16;for(let Me=0;Me<16;++Me)ae[Ce+Me]=E[le]+E[Me]}return ae})();function _e(E){return typeof BigInt>"u"?Ye:E}function Ye(){throw new Error("BigInt not supported")}})(Cte)),Cte}const Pte=_F(xee);var u7,Mte;function Vaa(){if(Mte)return u7;Mte=1;function e(g,b){var y=Object.keys(g);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(g);b&&(v=v.filter(function(k){return Object.getOwnPropertyDescriptor(g,k).enumerable})),y.push.apply(y,v)}return y}function a(g){for(var b=1;b<arguments.length;b++){var y=arguments[b]!=null?arguments[b]:{};b%2?e(Object(y),!0).forEach(function(v){t(g,v,y[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(v){Object.defineProperty(g,v,Object.getOwnPropertyDescriptor(y,v))})}return g}function t(g,b,y){return b=o(b),b in g?Object.defineProperty(g,b,{value:y,enumerable:!0,configurable:!0,writable:!0}):g[b]=y,g}function r(g,b){if(!(g instanceof b))throw new TypeError("Cannot call a class as a function")}function n(g,b){for(var y=0;y<b.length;y++){var v=b[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,o(v.key),v)}}function i(g,b,y){return b&&n(g.prototype,b),Object.defineProperty(g,"prototype",{writable:!1}),g}function o(g){var b=s(g,"string");return typeof b=="symbol"?b:String(b)}function s(g,b){if(typeof g!="object"||g===null)return g;var y=g[Symbol.toPrimitive];if(y!==void 0){var v=y.call(g,b);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(g)}var l=c1(),c=l.Buffer,u=Pte,d=u.inspect,p=d&&d.custom||"inspect";function m(g,b,y){c.prototype.copy.call(g,b,y)}return u7=(function(){function g(){r(this,g),this.head=null,this.tail=null,this.length=0}return i(g,[{key:"push",value:function(b){var y={data:b,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(b){var y={data:b,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=b+y.data;return v}},{key:"concat",value:function(b){if(this.length===0)return c.alloc(0);for(var y=c.allocUnsafe(b>>>0),v=this.head,k=0;v;)m(v.data,y,k),k+=v.data.length,v=v.next;return y}},{key:"consume",value:function(b,y){var v;return b<this.head.data.length?(v=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):b===this.head.data.length?v=this.shift():v=y?this._getString(b):this._getBuffer(b),v}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var y=this.head,v=1,k=y.data;for(b-=k.length;y=y.next;){var z=y.data,C=b>z.length?z.length:b;if(C===z.length?k+=z:k+=z.slice(0,b),b-=C,b===0){C===z.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=z.slice(C));break}++v}return this.length-=v,k}},{key:"_getBuffer",value:function(b){var y=c.allocUnsafe(b),v=this.head,k=1;for(v.data.copy(y),b-=v.data.length;v=v.next;){var z=v.data,C=b>z.length?z.length:b;if(z.copy(y,y.length-b,0,C),b-=C,b===0){C===z.length?(++k,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=z.slice(C));break}++k}return this.length-=k,y}},{key:p,value:function(b,y){return d(this,a(a({},y),{},{depth:0,customInspect:!1}))}}]),g})(),u7}var d7,Tte;function Bte(){if(Tte)return d7;Tte=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(t,l):(l._writableState.errorEmitted=!0,process.nextTick(a,l,d)):process.nextTick(a,l,d):s?(process.nextTick(t,l),s(d)):process.nextTick(t,l)}),this)}function a(o,s){n(o,s),t(o)}function t(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 d7={destroy:e,undestroy:r,errorOrDestroy:i},d7}var p7={},Ete;function Xg(){if(Ete)return p7;Ete=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var a={};function t(s,l,c){c||(c=Error);function u(p,m,g){return typeof l=="string"?l:l(p,m,g)}var d=(function(p){e(m,p);function m(g,b,y){return p.call(this,u(g,b,y))||this}return m})(c);d.prototype.name=c.name,d.prototype.code=s,a[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 t("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),t("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 p=o(s,".")?"property":"argument";d='The "'.concat(s,'" ').concat(p," ").concat(u," ").concat(r(l,"type"))}return d+=". Received type ".concat(typeof c),d},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),p7.codes=a,p7}var h7,_te;function Lte(){if(_te)return h7;_te=1;var e=Xg().codes.ERR_INVALID_OPT_VALUE;function a(r,n,i){return r.highWaterMark!=null?r.highWaterMark:n?r[i]:null}function t(r,n,i,o){var s=a(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 h7={getHighWaterMark:t},h7}var m7,Rte;function Haa(){if(Rte)return m7;Rte=1,m7=e;function e(t,r){if(a("noDeprecation"))return t;var n=!1;function i(){if(!n){if(a("throwDeprecation"))throw new Error(r);a("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}return i}function a(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[t];return r==null?!1:String(r).toLowerCase()==="true"}return m7}var f7,Nte;function Dte(){if(Nte)return f7;Nte=1,f7=A;function e(F){var ee=this;this.next=null,this.entry=null,this.finish=function(){_(ee,F)}}var a;A.WritableState=S;var t={deprecate:Haa()},r=Ste(),n=c1().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=Bte(),c=Lte(),u=c.getHighWaterMark,d=Xg().codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,k=d.ERR_STREAM_WRITE_AFTER_END,z=d.ERR_UNKNOWN_ENCODING,C=l.errorOrDestroy;function w(){}function S(F,ee,ie){a=a||Yg(),F=F||{},typeof ie!="boolean"&&(ie=ee instanceof a),this.objectMode=!!F.objectMode,ie&&(this.objectMode=this.objectMode||!!F.writableObjectMode),this.highWaterMark=u(this,F,"writableHighWaterMark",ie),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(X){te(ee,X)},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,ee=[];F;)ee.push(F),F=F.next;return ee},(function(){try{Object.defineProperty(S.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var O;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(O=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(F){return O.call(this,F)?!0:this!==A?!1:F&&F._writableState instanceof S}})):O=function(F){return F instanceof this};function A(F){a=a||Yg();var ee=this instanceof a;if(!ee&&!O.call(A,this))return new A(F);this._writableState=new S(F,this,ee),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)}A.prototype.pipe=function(){C(this,new b)};function B(F,ee){var ie=new k;C(F,ie),process.nextTick(ee,ie)}function L(F,ee,ie,be){var X;return ie===null?X=new v:typeof ie!="string"&&!ee.objectMode&&(X=new p("chunk",["string","Buffer"],ie)),X?(C(F,X),process.nextTick(be,X),!1):!0}A.prototype.write=function(F,ee,ie){var be=this._writableState,X=!1,M=!be.objectMode&&s(F);return M&&!n.isBuffer(F)&&(F=o(F)),typeof ee=="function"&&(ie=ee,ee=null),M?ee="buffer":ee||(ee=be.defaultEncoding),typeof ie!="function"&&(ie=w),be.ending?B(this,ie):(M||L(this,be,F,ie))&&(be.pendingcb++,X=N(this,be,M,F,ee,ie)),X},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var F=this._writableState;F.corked&&(F.corked--,!F.writing&&!F.corked&&!F.bufferProcessing&&F.bufferedRequest&&me(this,F))},A.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 z(F);return this._writableState.defaultEncoding=F,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function q(F,ee,ie){return!F.objectMode&&F.decodeStrings!==!1&&typeof ee=="string"&&(ee=n.from(ee,ie)),ee}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(F,ee,ie,be,X,M){if(!ie){var $=q(ee,be,X);be!==$&&(ie=!0,X="buffer",be=$)}var oe=ee.objectMode?1:be.length;ee.length+=oe;var G=ee.length<ee.highWaterMark;if(G||(ee.needDrain=!0),ee.writing||ee.corked){var ce=ee.lastBufferedRequest;ee.lastBufferedRequest={chunk:be,encoding:X,isBuf:ie,callback:M,next:null},ce?ce.next=ee.lastBufferedRequest:ee.bufferedRequest=ee.lastBufferedRequest,ee.bufferedRequestCount+=1}else U(F,ee,!1,oe,be,X,M);return G}function U(F,ee,ie,be,X,M,$){ee.writelen=be,ee.writecb=$,ee.writing=!0,ee.sync=!0,ee.destroyed?ee.onwrite(new y("write")):ie?F._writev(X,ee.onwrite):F._write(X,M,ee.onwrite),ee.sync=!1}function D(F,ee,ie,be,X){--ee.pendingcb,ie?(process.nextTick(X,be),process.nextTick(V,F,ee),F._writableState.errorEmitted=!0,C(F,be)):(X(be),F._writableState.errorEmitted=!0,C(F,be),V(F,ee))}function Y(F){F.writing=!1,F.writecb=null,F.length-=F.writelen,F.writelen=0}function te(F,ee){var ie=F._writableState,be=ie.sync,X=ie.writecb;if(typeof X!="function")throw new g;if(Y(ie),ee)D(F,ie,be,ee,X);else{var M=I(ie)||F.destroyed;!M&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&me(F,ie),be?process.nextTick(ue,F,ie,M,X):ue(F,ie,M,X)}}function ue(F,ee,ie,be){ie||ne(F,ee),ee.pendingcb--,be(),V(F,ee)}function ne(F,ee){ee.length===0&&ee.needDrain&&(ee.needDrain=!1,F.emit("drain"))}function me(F,ee){ee.bufferProcessing=!0;var ie=ee.bufferedRequest;if(F._writev&&ie&&ie.next){var be=ee.bufferedRequestCount,X=new Array(be),M=ee.corkedRequestsFree;M.entry=ie;for(var $=0,oe=!0;ie;)X[$]=ie,ie.isBuf||(oe=!1),ie=ie.next,$+=1;X.allBuffers=oe,U(F,ee,!0,ee.length,X,"",M.finish),ee.pendingcb++,ee.lastBufferedRequest=null,M.next?(ee.corkedRequestsFree=M.next,M.next=null):ee.corkedRequestsFree=new e(ee),ee.bufferedRequestCount=0}else{for(;ie;){var G=ie.chunk,ce=ie.encoding,pe=ie.callback,Q=ee.objectMode?1:G.length;if(U(F,ee,!1,Q,G,ce,pe),ie=ie.next,ee.bufferedRequestCount--,ee.writing)break}ie===null&&(ee.lastBufferedRequest=null)}ee.bufferedRequest=ie,ee.bufferProcessing=!1}A.prototype._write=function(F,ee,ie){ie(new m("_write()"))},A.prototype._writev=null,A.prototype.end=function(F,ee,ie){var be=this._writableState;return typeof F=="function"?(ie=F,F=null,ee=null):typeof ee=="function"&&(ie=ee,ee=null),F!=null&&this.write(F,ee),be.corked&&(be.corked=1,this.uncork()),be.ending||P(this,be,ie),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function I(F){return F.ending&&F.length===0&&F.bufferedRequest===null&&!F.finished&&!F.writing}function K(F,ee){F._final(function(ie){ee.pendingcb--,ie&&C(F,ie),ee.prefinished=!0,F.emit("prefinish"),V(F,ee)})}function W(F,ee){!ee.prefinished&&!ee.finalCalled&&(typeof F._final=="function"&&!ee.destroyed?(ee.pendingcb++,ee.finalCalled=!0,process.nextTick(K,F,ee)):(ee.prefinished=!0,F.emit("prefinish")))}function V(F,ee){var ie=I(ee);if(ie&&(W(F,ee),ee.pendingcb===0&&(ee.finished=!0,F.emit("finish"),ee.autoDestroy))){var be=F._readableState;(!be||be.autoDestroy&&be.endEmitted)&&F.destroy()}return ie}function P(F,ee,ie){ee.ending=!0,V(F,ee),ie&&(ee.finished?process.nextTick(ie):F.once("finish",ie)),ee.ended=!0,F.writable=!1}function _(F,ee,ie){var be=F.entry;for(F.entry=null;be;){var X=be.callback;ee.pendingcb--,X(ie),be=be.next}ee.corkedRequestsFree.next=F}return Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(F){this._writableState&&(this._writableState.destroyed=F)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(F,ee){ee(F)},f7}var g7,$te;function Yg(){if($te)return g7;$te=1;var e=Object.keys||function(c){var u=[];for(var d in c)u.push(d);return u};g7=o;for(var a=Ute(),t=Dte(),r=e(t.prototype),n=0;n<r.length;n++){var i=r[n];o.prototype[i]||(o.prototype[i]=t.prototype[i])}function o(c){if(!(this instanceof o))return new o(c);a.call(this,c),t.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)}}),g7}var v7={},b7={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Ite;function Faa(){return Ite||(Ite=1,(function(e,a){var t=c1(),r=t.Buffer;function n(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=t:(n(t,a),a.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 t.SlowBuffer(o)}})(b7,b7.exports)),b7.exports}var Kte;function Vte(){if(Kte)return v7;Kte=1;var e=Faa().Buffer,a=e.isEncoding||function(v){switch(v=""+v,v&&v.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 t(v){if(!v)return"utf8";for(var k;;)switch(v){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 v;default:if(k)return;v=(""+v).toLowerCase(),k=!0}}function r(v){var k=t(v);if(typeof k!="string"&&(e.isEncoding===a||!a(v)))throw new Error("Unknown encoding: "+v);return k||v}v7.StringDecoder=n;function n(v){this.encoding=r(v);var k;switch(this.encoding){case"utf16le":this.text=d,this.end=p,k=4;break;case"utf8":this.fillLast=l,k=4;break;case"base64":this.text=m,this.end=g,k=3;break;default:this.write=b,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(k)}n.prototype.write=function(v){if(v.length===0)return"";var k,z;if(this.lastNeed){if(k=this.fillLast(v),k===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;return z<v.length?k?k+this.text(v,z):this.text(v,z):k||""},n.prototype.end=u,n.prototype.text=c,n.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length};function i(v){return v<=127?0:v>>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function o(v,k,z){var C=k.length-1;if(C<z)return 0;var w=i(k[C]);return w>=0?(w>0&&(v.lastNeed=w-1),w):--C<z||w===-2?0:(w=i(k[C]),w>=0?(w>0&&(v.lastNeed=w-2),w):--C<z||w===-2?0:(w=i(k[C]),w>=0?(w>0&&(w===2?w=0:v.lastNeed=w-3),w):0))}function s(v,k,z){if((k[0]&192)!==128)return v.lastNeed=0,"\uFFFD";if(v.lastNeed>1&&k.length>1){if((k[1]&192)!==128)return v.lastNeed=1,"\uFFFD";if(v.lastNeed>2&&k.length>2&&(k[2]&192)!==128)return v.lastNeed=2,"\uFFFD"}}function l(v){var k=this.lastTotal-this.lastNeed,z=s(this,v);if(z!==void 0)return z;if(this.lastNeed<=v.length)return v.copy(this.lastChar,k,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,k,0,v.length),this.lastNeed-=v.length}function c(v,k){var z=o(this,v,k);if(!this.lastNeed)return v.toString("utf8",k);this.lastTotal=z;var C=v.length-(z-this.lastNeed);return v.copy(this.lastChar,0,C),v.toString("utf8",k,C)}function u(v){var k=v&&v.length?this.write(v):"";return this.lastNeed?k+"\uFFFD":k}function d(v,k){if((v.length-k)%2===0){var z=v.toString("utf16le",k);if(z){var C=z.charCodeAt(z.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",k,v.length-1)}function p(v){var k=v&&v.length?this.write(v):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,z)}return k}function m(v,k){var z=(v.length-k)%3;return z===0?v.toString("base64",k):(this.lastNeed=3-z,this.lastTotal=3,z===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",k,v.length-z))}function g(v){var k=v&&v.length?this.write(v):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function b(v){return v.toString(this.encoding)}function y(v){return v&&v.length?this.write(v):""}return v7}var y7,Hte;function k7(){if(Hte)return y7;Hte=1;var e=Xg().codes.ERR_STREAM_PREMATURE_CLOSE;function a(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 t(){}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=a(s||t);var l=o.readable||o.readable!==!1&&i.readable,c=o.writable||o.writable!==!1&&i.writable,u=function(){i.writable||p()},d=i._writableState&&i._writableState.finished,p=function(){c=!1,d=!0,l||s.call(i)},m=i._readableState&&i._readableState.endEmitted,g=function(){l=!1,m=!0,c||s.call(i)},b=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)},v=function(){i.req.on("finish",p)};return r(i)?(i.on("complete",p),i.on("abort",y),i.req?v():i.on("request",v)):c&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",g),i.on("finish",p),o.error!==!1&&i.on("error",b),i.on("close",y),function(){i.removeListener("complete",p),i.removeListener("abort",y),i.removeListener("request",v),i.req&&i.req.removeListener("finish",p),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",p),i.removeListener("end",g),i.removeListener("error",b),i.removeListener("close",y)}}return y7=n,y7}var x7,Fte;function Gaa(){if(Fte)return x7;Fte=1;var e;function a(z,C,w){return C=t(C),C in z?Object.defineProperty(z,C,{value:w,enumerable:!0,configurable:!0,writable:!0}):z[C]=w,z}function t(z){var C=r(z,"string");return typeof C=="symbol"?C:String(C)}function r(z,C){if(typeof z!="object"||z===null)return z;var w=z[Symbol.toPrimitive];if(w!==void 0){var S=w.call(z,C);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(z)}var n=k7(),i=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function p(z,C){return{value:z,done:C}}function m(z){var C=z[i];if(C!==null){var w=z[d].read();w!==null&&(z[c]=null,z[i]=null,z[o]=null,C(p(w,!1)))}}function g(z){process.nextTick(m,z)}function b(z,C){return function(w,S){z.then(function(){if(C[l]){w(p(void 0,!0));return}C[u](w,S)},S)}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[d]},next:function(){var z=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(A,B){process.nextTick(function(){z[s]?B(z[s]):A(p(void 0,!0))})});var w=this[c],S;if(w)S=new Promise(b(w,this));else{var O=this[d].read();if(O!==null)return Promise.resolve(p(O,!1));S=new Promise(this[u])}return this[c]=S,S}},a(e,Symbol.asyncIterator,function(){return this}),a(e,"return",function(){var z=this;return new Promise(function(C,w){z[d].destroy(null,function(S){if(S){w(S);return}C(p(void 0,!0))})})}),e),y),k=function(z){var C,w=Object.create(v,(C={},a(C,d,{value:z,writable:!0}),a(C,i,{value:null,writable:!0}),a(C,o,{value:null,writable:!0}),a(C,s,{value:null,writable:!0}),a(C,l,{value:z._readableState.endEmitted,writable:!0}),a(C,u,{value:function(S,O){var A=w[d].read();A?(w[c]=null,w[i]=null,w[o]=null,S(p(A,!1))):(w[i]=S,w[o]=O)},writable:!0}),C));return w[c]=null,n(z,function(S){if(S&&S.code!=="ERR_STREAM_PREMATURE_CLOSE"){var O=w[o];O!==null&&(w[c]=null,w[i]=null,w[o]=null,O(S)),w[s]=S;return}var A=w[i];A!==null&&(w[c]=null,w[i]=null,w[o]=null,A(p(void 0,!0))),w[l]=!0}),z.on("readable",g.bind(null,w)),w};return x7=k,x7}var Gte,qte;function qaa(){return qte||(qte=1,Gte=function(){throw new Error("Readable.from is not available in the browser")}),Gte}var w7,Jte;function Ute(){if(Jte)return w7;Jte=1,w7=B;var e;B.ReadableState=A;var a=function(M,$){return M.listeners($).length},t=Ste(),r=c1().Buffer,n=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(M){return r.from(M)}function o(M){return r.isBuffer(M)||M instanceof n}var s=Pte,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=Vaa(),u=Bte(),d=Lte(),p=d.getHighWaterMark,m=Xg().codes,g=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,k,z,C,w=u.errorOrDestroy,S=["error","close","destroy","pause","resume"];function O(M,$,oe){if(typeof M.prependListener=="function")return M.prependListener($,oe);!M._events||!M._events[$]?M.on($,oe):Array.isArray(M._events[$])?M._events[$].unshift(oe):M._events[$]=[oe,M._events[$]]}function A(M,$,oe){e=e||Yg(),M=M||{},typeof oe!="boolean"&&(oe=$ instanceof e),this.objectMode=!!M.objectMode,oe&&(this.objectMode=this.objectMode||!!M.readableObjectMode),this.highWaterMark=p(this,M,"readableHighWaterMark",oe),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=M.emitClose!==!1,this.autoDestroy=!!M.autoDestroy,this.destroyed=!1,this.defaultEncoding=M.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,M.encoding&&(k||(k=Vte().StringDecoder),this.decoder=new k(M.encoding),this.encoding=M.encoding)}function B(M){if(e=e||Yg(),!(this instanceof B))return new B(M);var $=this instanceof e;this._readableState=new A(M,this,$),this.readable=!0,M&&(typeof M.read=="function"&&(this._read=M.read),typeof M.destroy=="function"&&(this._destroy=M.destroy)),t.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(M){this._readableState&&(this._readableState.destroyed=M)}}),B.prototype.destroy=u.destroy,B.prototype._undestroy=u.undestroy,B.prototype._destroy=function(M,$){$(M)},B.prototype.push=function(M,$){var oe=this._readableState,G;return oe.objectMode?G=!0:typeof M=="string"&&($=$||oe.defaultEncoding,$!==oe.encoding&&(M=r.from(M,$),$=""),G=!0),L(this,M,$,!1,G)},B.prototype.unshift=function(M){return L(this,M,null,!0,!1)};function L(M,$,oe,G,ce){l("readableAddChunk",$);var pe=M._readableState;if($===null)pe.reading=!1,te(M,pe);else{var Q;if(ce||(Q=N(pe,$)),Q)w(M,Q);else if(pe.objectMode||$&&$.length>0)if(typeof $!="string"&&!pe.objectMode&&Object.getPrototypeOf($)!==r.prototype&&($=i($)),G)pe.endEmitted?w(M,new v):q(M,pe,$,!0);else if(pe.ended)w(M,new b);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!oe?($=pe.decoder.write($),pe.objectMode||$.length!==0?q(M,pe,$,!1):me(M,pe)):q(M,pe,$,!1)}else G||(pe.reading=!1,me(M,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function q(M,$,oe,G){$.flowing&&$.length===0&&!$.sync?($.awaitDrain=0,M.emit("data",oe)):($.length+=$.objectMode?1:oe.length,G?$.buffer.unshift(oe):$.buffer.push(oe),$.needReadable&&ue(M)),me(M,$)}function N(M,$){var oe;return!o($)&&typeof $!="string"&&$!==void 0&&!M.objectMode&&(oe=new g("chunk",["string","Buffer","Uint8Array"],$)),oe}B.prototype.isPaused=function(){return this._readableState.flowing===!1},B.prototype.setEncoding=function(M){k||(k=Vte().StringDecoder);var $=new k(M);this._readableState.decoder=$,this._readableState.encoding=this._readableState.decoder.encoding;for(var oe=this._readableState.buffer.head,G="";oe!==null;)G+=$.write(oe.data),oe=oe.next;return this._readableState.buffer.clear(),G!==""&&this._readableState.buffer.push(G),this._readableState.length=G.length,this};var U=1073741824;function D(M){return M>=U?M=U:(M--,M|=M>>>1,M|=M>>>2,M|=M>>>4,M|=M>>>8,M|=M>>>16,M++),M}function Y(M,$){return M<=0||$.length===0&&$.ended?0:$.objectMode?1:M!==M?$.flowing&&$.length?$.buffer.head.data.length:$.length:(M>$.highWaterMark&&($.highWaterMark=D(M)),M<=$.length?M:$.ended?$.length:($.needReadable=!0,0))}B.prototype.read=function(M){l("read",M),M=parseInt(M,10);var $=this._readableState,oe=M;if(M!==0&&($.emittedReadable=!1),M===0&&$.needReadable&&(($.highWaterMark!==0?$.length>=$.highWaterMark:$.length>0)||$.ended))return l("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?ie(this):ue(this),null;if(M=Y(M,$),M===0&&$.ended)return $.length===0&&ie(this),null;var G=$.needReadable;l("need readable",G),($.length===0||$.length-M<$.highWaterMark)&&(G=!0,l("length less than watermark",G)),$.ended||$.reading?(G=!1,l("reading or ended",G)):G&&(l("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(M=Y(oe,$)));var ce;return M>0?ce=ee(M,$):ce=null,ce===null?($.needReadable=$.length<=$.highWaterMark,M=0):($.length-=M,$.awaitDrain=0),$.length===0&&($.ended||($.needReadable=!0),oe!==M&&$.ended&&ie(this)),ce!==null&&this.emit("data",ce),ce};function te(M,$){if(l("onEofChunk"),!$.ended){if($.decoder){var oe=$.decoder.end();oe&&oe.length&&($.buffer.push(oe),$.length+=$.objectMode?1:oe.length)}$.ended=!0,$.sync?ue(M):($.needReadable=!1,$.emittedReadable||($.emittedReadable=!0,ne(M)))}}function ue(M){var $=M._readableState;l("emitReadable",$.needReadable,$.emittedReadable),$.needReadable=!1,$.emittedReadable||(l("emitReadable",$.flowing),$.emittedReadable=!0,process.nextTick(ne,M))}function ne(M){var $=M._readableState;l("emitReadable_",$.destroyed,$.length,$.ended),!$.destroyed&&($.length||$.ended)&&(M.emit("readable"),$.emittedReadable=!1),$.needReadable=!$.flowing&&!$.ended&&$.length<=$.highWaterMark,F(M)}function me(M,$){$.readingMore||($.readingMore=!0,process.nextTick(I,M,$))}function I(M,$){for(;!$.reading&&!$.ended&&($.length<$.highWaterMark||$.flowing&&$.length===0);){var oe=$.length;if(l("maybeReadMore read 0"),M.read(0),oe===$.length)break}$.readingMore=!1}B.prototype._read=function(M){w(this,new y("_read()"))},B.prototype.pipe=function(M,$){var oe=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=M;break;case 1:G.pipes=[G.pipes,M];break;default:G.pipes.push(M);break}G.pipesCount+=1,l("pipe count=%d opts=%j",G.pipesCount,$);var ce=(!$||$.end!==!1)&&M!==null&&M!==process.stderr,pe=ce?re:Ye;G.endEmitted?process.nextTick(pe):oe.once("end",pe),M.on("unpipe",Q);function Q(E,ae){l("onunpipe"),E===oe&&ae&&ae.hasUnpiped===!1&&(ae.hasUnpiped=!0,ge())}function re(){l("onend"),M.end()}var de=K(oe);M.on("drain",de);var fe=!1;function ge(){l("cleanup"),M.removeListener("close",Oe),M.removeListener("finish",_e),M.removeListener("drain",de),M.removeListener("error",xe),M.removeListener("unpipe",Q),oe.removeListener("end",re),oe.removeListener("end",Ye),oe.removeListener("data",he),fe=!0,G.awaitDrain&&(!M._writableState||M._writableState.needDrain)&&de()}oe.on("data",he);function he(E){l("ondata");var ae=M.write(E);l("dest.write",ae),ae===!1&&((G.pipesCount===1&&G.pipes===M||G.pipesCount>1&&X(G.pipes,M)!==-1)&&!fe&&(l("false write response, pause",G.awaitDrain),G.awaitDrain++),oe.pause())}function xe(E){l("onerror",E),Ye(),M.removeListener("error",xe),a(M,"error")===0&&w(M,E)}O(M,"error",xe);function Oe(){M.removeListener("finish",_e),Ye()}M.once("close",Oe);function _e(){l("onfinish"),M.removeListener("close",Oe),Ye()}M.once("finish",_e);function Ye(){l("unpipe"),oe.unpipe(M)}return M.emit("pipe",oe),G.flowing||(l("pipe resume"),oe.resume()),M};function K(M){return function(){var $=M._readableState;l("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&a(M,"data")&&($.flowing=!0,F(M))}}B.prototype.unpipe=function(M){var $=this._readableState,oe={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return M&&M!==$.pipes?this:(M||(M=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,M&&M.emit("unpipe",this,oe),this);if(!M){var G=$.pipes,ce=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var pe=0;pe<ce;pe++)G[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var Q=X($.pipes,M);return Q===-1?this:($.pipes.splice(Q,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),M.emit("unpipe",this,oe),this)},B.prototype.on=function(M,$){var oe=t.prototype.on.call(this,M,$),G=this._readableState;return M==="data"?(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1&&this.resume()):M==="readable"&&!G.endEmitted&&!G.readableListening&&(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,l("on readable",G.length,G.reading),G.length?ue(this):G.reading||process.nextTick(V,this)),oe},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(M,$){var oe=t.prototype.removeListener.call(this,M,$);return M==="readable"&&process.nextTick(W,this),oe},B.prototype.removeAllListeners=function(M){var $=t.prototype.removeAllListeners.apply(this,arguments);return(M==="readable"||M===void 0)&&process.nextTick(W,this),$};function W(M){var $=M._readableState;$.readableListening=M.listenerCount("readable")>0,$.resumeScheduled&&!$.paused?$.flowing=!0:M.listenerCount("data")>0&&M.resume()}function V(M){l("readable nexttick read 0"),M.read(0)}B.prototype.resume=function(){var M=this._readableState;return M.flowing||(l("resume"),M.flowing=!M.readableListening,P(this,M)),M.paused=!1,this};function P(M,$){$.resumeScheduled||($.resumeScheduled=!0,process.nextTick(_,M,$))}function _(M,$){l("resume",$.reading),$.reading||M.read(0),$.resumeScheduled=!1,M.emit("resume"),F(M),$.flowing&&!$.reading&&M.read(0)}B.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(M){var $=M._readableState;for(l("flow",$.flowing);$.flowing&&M.read()!==null;);}B.prototype.wrap=function(M){var $=this,oe=this._readableState,G=!1;M.on("end",function(){if(l("wrapped end"),oe.decoder&&!oe.ended){var Q=oe.decoder.end();Q&&Q.length&&$.push(Q)}$.push(null)}),M.on("data",function(Q){if(l("wrapped data"),oe.decoder&&(Q=oe.decoder.write(Q)),!(oe.objectMode&&Q==null)&&!(!oe.objectMode&&(!Q||!Q.length))){var re=$.push(Q);re||(G=!0,M.pause())}});for(var ce in M)this[ce]===void 0&&typeof M[ce]=="function"&&(this[ce]=(function(Q){return function(){return M[Q].apply(M,arguments)}})(ce));for(var pe=0;pe<S.length;pe++)M.on(S[pe],this.emit.bind(this,S[pe]));return this._read=function(Q){l("wrapped _read",Q),G&&(G=!1,M.resume())},this},typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return z===void 0&&(z=Gaa()),z(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(M){this._readableState&&(this._readableState.flowing=M)}}),B._fromList=ee,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ee(M,$){if($.length===0)return null;var oe;return $.objectMode?oe=$.buffer.shift():!M||M>=$.length?($.decoder?oe=$.buffer.join(""):$.buffer.length===1?oe=$.buffer.first():oe=$.buffer.concat($.length),$.buffer.clear()):oe=$.buffer.consume(M,$.decoder),oe}function ie(M){var $=M._readableState;l("endReadable",$.endEmitted),$.endEmitted||($.ended=!0,process.nextTick(be,$,M))}function be(M,$){if(l("endReadableNT",M.endEmitted,M.length),!M.endEmitted&&M.length===0&&(M.endEmitted=!0,$.readable=!1,$.emit("end"),M.autoDestroy)){var oe=$._writableState;(!oe||oe.autoDestroy&&oe.finished)&&$.destroy()}}typeof Symbol=="function"&&(B.from=function(M,$){return C===void 0&&(C=qaa()),C(B,M,$)});function X(M,$){for(var oe=0,G=M.length;oe<G;oe++)if(M[oe]===$)return oe;return-1}return w7}var z7,Wte;function Zte(){if(Wte)return z7;Wte=1,z7=s;var e=Xg().codes,a=e.ERR_METHOD_NOT_IMPLEMENTED,t=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,i=Yg();function o(u,d){var p=this._transformState;p.transforming=!1;var m=p.writecb;if(m===null)return this.emit("error",new t);p.writechunk=null,p.writecb=null,d!=null&&this.push(d),m(u);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.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,p){c(u,d,p)}):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,p){p(new a("_transform()"))},s.prototype._write=function(u,d,p){var m=this._transformState;if(m.writecb=p,m.writechunk=u,m.writeencoding=d,!m.transforming){var g=this._readableState;(m.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.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(p){d(p)})};function c(u,d,p){if(d)return u.emit("error",d);if(p!=null&&u.push(p),u._writableState.length)throw new n;if(u._transformState.transforming)throw new r;return u.push(null)}return z7}var S7,Qte;function Jaa(){if(Qte)return S7;Qte=1,S7=a;var e=Zte();function a(t){if(!(this instanceof a))return new a(t);e.call(this,t)}return a.prototype._transform=function(t,r,n){n(null,t)},S7}var C7,Xte;function Uaa(){if(Xte)return C7;Xte=1;var e;function a(p){var m=!1;return function(){m||(m=!0,p.apply(void 0,arguments))}}var t=Xg().codes,r=t.ERR_MISSING_ARGS,n=t.ERR_STREAM_DESTROYED;function i(p){if(p)throw p}function o(p){return p.setHeader&&typeof p.abort=="function"}function s(p,m,g,b){b=a(b);var y=!1;p.on("close",function(){y=!0}),e===void 0&&(e=k7()),e(p,{readable:m,writable:g},function(k){if(k)return b(k);y=!0,b()});var v=!1;return function(k){if(!y&&!v){if(v=!0,o(p))return p.abort();if(typeof p.destroy=="function")return p.destroy();b(k||new n("pipe"))}}}function l(p){p()}function c(p,m){return p.pipe(m)}function u(p){return!p.length||typeof p[p.length-1]!="function"?i:p.pop()}function d(){for(var p=arguments.length,m=new Array(p),g=0;g<p;g++)m[g]=arguments[g];var b=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var y,v=m.map(function(k,z){var C=z<m.length-1,w=z>0;return s(k,C,w,function(S){y||(y=S),S&&v.forEach(l),!C&&(v.forEach(l),b(y))})});return m.reduce(c)}return C7=d,C7}var Yte;function ere(){return Yte||(Yte=1,(function(e,a){a=e.exports=Ute(),a.Stream=a,a.Readable=a,a.Writable=Dte(),a.Duplex=Yg(),a.Transform=Zte(),a.PassThrough=Jaa(),a.finished=k7(),a.pipeline=Uaa()})(l7,l7.exports)),l7.exports}var are;function tre(){if(are)return x2;are=1;var e=kte(),a=X8(),t=ere(),r=x2.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=x2.IncomingMessage=function(i,o,s,l){var c=this;if(t.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 b=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)),b()}}).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,v){c.headers[v.toLowerCase()]=y,c.rawHeaders.push(v,y)}),e.writableStream){var u=new WritableStream({write:function(y){return l(!1),new Promise(function(v,k){c._destroyed?k():c.push(Buffer.from(y))?v():c._resumeFetch=v})},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();b()}else{c._xhr=i,c._pos=0,c.url=i.responseURL,c.statusCode=i.status,c.statusMessage=i.statusText;var p=i.getAllResponseHeaders().split(/\r?\n/);if(p.forEach(function(b){var y=b.match(/^([^:]+):\s*(.*)/);if(y){var v=y[1].toLowerCase();v==="set-cookie"?(c.headers[v]===void 0&&(c.headers[v]=[]),c.headers[v].push(y[2])):c.headers[v]!==void 0?c.headers[v]+=", "+y[2]:c.headers[v]=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 g=m.match(/;\s*charset=([^;])(;|$)/);g&&(c._charset=g[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};return a(n,t.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 p=new globalThis.MSStreamReader;p.onprogress=function(){p.result.byteLength>o._pos&&(o.push(Buffer.from(new Uint8Array(p.result.slice(o._pos)))),o._pos=p.result.byteLength)},p.onload=function(){i(!0),o.push(null)},p.readAsArrayBuffer(l);break}o._xhr.readyState===r.DONE&&o._mode!=="ms-stream"&&(i(!0),o.push(null))},x2}var rre;function Waa(){if(rre)return s7.exports;rre=1;var e=kte(),a=X8(),t=tre(),r=ere(),n=t.IncomingMessage,i=t.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=s7.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(g){d.setHeader(g,u.headers[g])});var p,m=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!e.abortController)m=!1,p=!0;else if(u.mode==="prefer-streaming")p=!1;else if(u.mode==="allow-wrong-content-type")p=!e.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")p=!0;else throw new Error("Invalid value for opts.mode");d._mode=o(p,m),d._fetchTimer=null,d._socketTimeout=null,d._socketTimer=null,d.on("finish",function(){d._onFinish()})};a(s,r.Writable),s.prototype.setHeader=function(u,d){var p=this,m=u.toLowerCase();c.indexOf(m)===-1&&(p._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 p=u._headers,m=null;d.method!=="GET"&&d.method!=="HEAD"&&(m=new Blob(u._body,{type:(p["content-type"]||{}).value||""}));var g=[];if(Object.keys(p).forEach(function(k){var z=p[k].name,C=p[k].value;Array.isArray(C)?C.forEach(function(w){g.push([z,w])}):g.push([z,C])}),u._mode==="fetch"){var b=null;if(e.abortController){var y=new AbortController;b=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:g,body:m||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:b}).then(function(k){u._fetchResponse=k,u._resetTimers(!1),u._connect()},function(k){u._resetTimers(!0),u._destroyed||u.emit("error",k)})}else{var v=u._xhr=new globalThis.XMLHttpRequest;try{v.open(u._opts.method,u._opts.url,!0)}catch(k){process.nextTick(function(){u.emit("error",k)});return}"responseType"in v&&(v.responseType=u._mode),"withCredentials"in v&&(v.withCredentials=!!d.withCredentials),u._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(v.timeout=d.requestTimeout,v.ontimeout=function(){u.emit("requestTimeout")}),g.forEach(function(k){v.setRequestHeader(k[0],k[1])}),u._response=null,v.onreadystatechange=function(){switch(v.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){u._onXHRProgress()}),v.onerror=function(){u._destroyed||(u._resetTimers(!0),u.emit("error",new Error("XHR error")))};try{v.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,p){var m=this;m._body.push(u),p()},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,p){var m=this;typeof u=="function"&&(p=u,u=void 0),r.Writable.prototype.end.call(m,u,d,p)},s.prototype.setTimeout=function(u,d){var p=this;d&&p.once("timeout",d),p._socketTimeout=u,p._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 s7.exports}var j7,nre;function Zaa(){if(nre)return j7;nre=1,j7=a;var e=Object.prototype.hasOwnProperty;function a(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t}return j7}var ire,ore;function Qaa(){return ore||(ore=1,ire={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"}),ire}var sre;function Xaa(){return sre||(sre=1,(function(e){var a=Waa(),t=tre(),r=Zaa(),n=Qaa(),i=JB(),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,p=s.port,m=s.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),s.url=(d?u+"//"+d:"")+(p?":"+p:"")+m,s.method=(s.method||"GET").toUpperCase(),s.headers=s.headers||{};var g=new a(s);return l&&g.on("response",l),g},o.get=function(s,l){var c=o.request(s,l);return c.end(),c},o.ClientRequest=a,o.IncomingMessage=t.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"]})(vte)),vte}var lre,cre;function Yaa(){return cre||(cre=1,lre={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},Xaa().STATUS_CODES)}),lre}const eta="7.0.8",ata={version:eta};var O7,ure;function tta(){if(ure)return O7;ure=1;const e=Qg,a=JB(),t=_aa(),r=Qg,n=Qg,i=y2(),o=i.jptr,s=XB().isRef,l=k2().clone,c=k2().circularClone,u=a7().recurse,d=Naa(),p=Daa(),m=mte(),g=Yaa().statusCodes,b=ata.version,y="3.0.0";let v;class k extends Error{constructor($){super($),this.name="S2OError"}}function z(M,$){let oe=new k(M);if(oe.options=$,$.promise)$.promise.reject(oe);else throw oe}function C(M,$,oe){oe.warnOnly?$[oe.warnProperty||"x-s2o-warning"]=M:z(M,oe)}function w(M,$,oe){if(M.nullable&&oe.patches++,M.discriminator&&typeof M.discriminator=="string"&&(M.discriminator={propertyName:M.discriminator}),M.items&&Array.isArray(M.items)&&(M.items.length===0?M.items={}:M.items.length===1?M.items=M.items[0]:M.items={anyOf:M.items}),M.type&&Array.isArray(M.type))if(oe.patch){if(oe.patches++,M.type.length===0)delete M.type;else{M.oneOf||(M.oneOf=[]);for(let G of M.type){let ce={};if(G==="null")M.nullable=!0;else{ce.type=G;for(let pe of m.arrayProperties)typeof M.prop<"u"&&(ce[pe]=M[pe],delete M[pe])}ce.type&&M.oneOf.push(ce)}delete M.type,M.oneOf.length===0?delete M.oneOf:M.oneOf.length<2&&(M.type=M.oneOf[0].type,Object.keys(M.oneOf[0]).length>1&&C("Lost properties from oneOf",M,oe),delete M.oneOf)}M.type&&Array.isArray(M.type)&&M.type.length===1&&(M.type=M.type[0])}else z("(Patchable) schema type must not be an array",oe);M.type&&M.type==="null"&&(delete M.type,M.nullable=!0),M.type==="array"&&!M.items&&(M.items={}),M.type==="file"&&(M.type="string",M.format="binary"),typeof M.required=="boolean"&&(M.required&&M.name&&(typeof $.required>"u"&&($.required=[]),Array.isArray($.required)&&$.required.push(M.name)),delete M.required),M.xml&&typeof M.xml.namespace=="string"&&(M.xml.namespace||delete M.xml.namespace),typeof M.allowEmptyValue<"u"&&(oe.patches++,delete M.allowEmptyValue)}function S(M,$){if(M["x-required"]&&Array.isArray(M["x-required"])&&(M.required||(M.required=[]),M.required=M.required.concat(M["x-required"]),delete M["x-required"]),M["x-anyOf"]&&(M.anyOf=M["x-anyOf"],delete M["x-anyOf"]),M["x-oneOf"]&&(M.oneOf=M["x-oneOf"],delete M["x-oneOf"]),M["x-not"]&&(M.not=M["x-not"],delete M["x-not"]),typeof M["x-nullable"]=="boolean"&&(M.nullable=M["x-nullable"],delete M["x-nullable"]),typeof M["x-discriminator"]=="object"&&typeof M["x-discriminator"].propertyName=="string"){M.discriminator=M["x-discriminator"],delete M["x-discriminator"];for(let oe in M.discriminator.mapping){let G=M.discriminator.mapping[oe];G.startsWith("#/definitions/")&&(M.discriminator.mapping[oe]=G.replace("#/definitions/","#/components/schemas/"))}}}function O(M,$){p.walkSchema(M,{},{},function(oe,G,ce){S(oe),w(oe,G,$)})}function A(M){return M.indexOf("#")>=0?M=M.split("#")[1].split("/").pop():M=M.split("/").pop().split(".")[0],encodeURIComponent(m.sanitise(M))}function B(M,$,oe){let G=oe.payload.options;if(s(M,$)){if(!M[$].startsWith("#/components/")){if(M[$]==="#/consumes")delete M[$],oe.parent[oe.pkey]=l(G.openapi.consumes);else if(M[$]==="#/produces")delete M[$],oe.parent[oe.pkey]=l(G.openapi.produces);else if(M[$].startsWith("#/definitions/")){let ce=M[$].replace("#/definitions/","").split("/");const pe=i.jpunescape(ce[0]);let Q=v.schemas[decodeURIComponent(pe)];Q?ce[0]=Q:C("Could not resolve reference "+M[$],M,G),M[$]="#/components/schemas/"+ce.join("/")}else if(M[$].startsWith("#/parameters/"))M[$]="#/components/parameters/"+m.sanitise(M[$].replace("#/parameters/",""));else if(M[$].startsWith("#/responses/"))M[$]="#/components/responses/"+m.sanitise(M[$].replace("#/responses/",""));else if(M[$].startsWith("#")){let ce=l(i.jptr(G.openapi,M[$]));if(ce===!1)C("direct $ref not found "+M[$],M,G);else if(G.refmap[M[$]])M[$]=G.refmap[M[$]];else{let pe=M[$];pe=pe.replace("/properties/headers/",""),pe=pe.replace("/properties/responses/",""),pe=pe.replace("/properties/parameters/",""),pe=pe.replace("/properties/schemas/","");let Q="schemas",re=pe.lastIndexOf("/schema");if(Q=pe.indexOf("/headers/")>re?"headers":pe.indexOf("/responses/")>re?"responses":pe.indexOf("/example")>re?"examples":pe.indexOf("/x-")>re?"extensions":pe.indexOf("/parameters/")>re?"parameters":"schemas",Q==="schemas"&&O(ce,G),Q!=="responses"&&Q!=="extensions"){let de=Q.substr(0,Q.length-1);de==="parameter"&&ce.name&&ce.name===m.sanitise(ce.name)&&(de=encodeURIComponent(ce.name));let fe=1;for(M["x-miro"]&&(de=A(M["x-miro"]),fe="");i.jptr(G.openapi,"#/components/"+Q+"/"+de+fe);)fe=fe===""?2:++fe;let ge="#/components/"+Q+"/"+de+fe,he="";Q==="examples"&&(ce={value:ce},he="/value"),i.jptr(G.openapi,ge,ce),G.refmap[M[$]]=ge+he,M[$]=ge+he}}}}if(delete M["x-miro"],Object.keys(M).length>1){const ce=M[$],pe=oe.path.indexOf("/schema")>=0;G.refSiblings==="preserve"||(pe&&G.refSiblings==="allOf"?(delete M.$ref,oe.parent[oe.pkey]={allOf:[{$ref:ce},M]}):oe.parent[oe.pkey]={$ref:ce})}}if($==="x-ms-odata"&&typeof M[$]=="string"&&M[$].startsWith("#/")){let ce=M[$].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),pe=v.schemas[decodeURIComponent(ce[0])];pe?ce[0]=pe:C("Could not resolve reference "+M[$],M,G),M[$]="#/components/schemas/"+ce.join("/")}}function L(M,$){for(let oe in $.refmap)i.jptr(M,oe,{$ref:$.refmap[oe]})}function q(M){for(let $ in M)for(let oe in M[$]){let G=m.sanitise(oe);oe!==G&&(M[$][G]=M[$][oe],delete M[$][oe])}}function N(M,$){if(M.type==="basic"&&(M.type="http",M.scheme="basic"),M.type==="oauth2"){let oe={},G=M.flow;M.flow==="application"&&(G="clientCredentials"),M.flow==="accessCode"&&(G="authorizationCode"),typeof M.authorizationUrl<"u"&&(oe.authorizationUrl=M.authorizationUrl.split("?")[0].trim()||"/"),typeof M.tokenUrl=="string"&&(oe.tokenUrl=M.tokenUrl.split("?")[0].trim()||"/"),oe.scopes=M.scopes||{},M.flows={},M.flows[G]=oe,delete M.flow,delete M.authorizationUrl,delete M.tokenUrl,delete M.scopes,typeof M.name<"u"&&($.patch?($.patches++,delete M.name):z("(Patchable) oauth2 securitySchemes should not have name property",$))}}function U(M){return M&&!M["x-s2o-delete"]}function D(M,$){if(M.$ref)M.$ref=M.$ref.replace("#/responses/","#/components/responses/");else{M.type&&!M.schema&&(M.schema={}),M.type&&(M.schema.type=M.type),M.items&&M.items.type!=="array"&&(M.items.collectionFormat!==M.collectionFormat&&C("Nested collectionFormats are not supported",M,$),delete M.items.collectionFormat),M.type==="array"?(M.collectionFormat==="ssv"?C("collectionFormat:ssv is no longer supported for headers",M,$):M.collectionFormat==="pipes"?C("collectionFormat:pipes is no longer supported for headers",M,$):M.collectionFormat==="multi"?M.explode=!0:M.collectionFormat==="tsv"?(C("collectionFormat:tsv is no longer supported",M,$),M["x-collectionFormat"]="tsv"):M.style="simple",delete M.collectionFormat):M.collectionFormat&&($.patch?($.patches++,delete M.collectionFormat):z("(Patchable) collectionFormat is only applicable to header.type array",$)),delete M.type;for(let oe of m.parameterTypeProperties)typeof M[oe]<"u"&&(M.schema[oe]=M[oe],delete M[oe]);for(let oe of m.arrayProperties)typeof M[oe]<"u"&&(M.schema[oe]=M[oe],delete M[oe])}}function Y(M,$){if(M.$ref.indexOf("#/parameters/")>=0){let oe=M.$ref.split("#/parameters/");M.$ref=oe[0]+"#/components/parameters/"+m.sanitise(oe[1])}M.$ref.indexOf("#/definitions/")>=0&&C("Definition used as parameter",M,$)}function te(M,$){let oe={};for(let G of Object.keys(M))oe[G]=M[G],G==="parameters"&&(oe.requestBody={},$.rbname&&(oe[$.rbname]=""));return oe.requestBody={},oe}function ue(M,$,oe,G,ce,pe,Q){let re={},de=!0,fe;if($&&$.consumes&&typeof $.consumes=="string")if(Q.patch)Q.patches++,$.consumes=[$.consumes];else return z("(Patchable) operation.consumes must be an array",Q);Array.isArray(pe.consumes)||delete pe.consumes;let ge=(($?$.consumes:null)||pe.consumes||[]).filter(m.uniqueOnly);if(M&&M.$ref&&typeof M.$ref=="string"){Y(M,Q);let he=decodeURIComponent(M.$ref.replace("#/components/parameters/","")),xe=!1,Oe=pe.components.parameters[he];if((!Oe||Oe["x-s2o-delete"])&&M.$ref.startsWith("#/")&&(M["x-s2o-delete"]=!0,xe=!0),xe){let _e=M.$ref,Ye=o(pe,M.$ref);!Ye&&_e.startsWith("#/")?C("Could not resolve reference "+_e,M,Q):Ye&&(M=Ye)}}if(M&&(M.name||M.in)){typeof M["x-deprecated"]=="boolean"&&(M.deprecated=M["x-deprecated"],delete M["x-deprecated"]),typeof M["x-example"]<"u"&&(M.example=M["x-example"],delete M["x-example"]),M.in!=="body"&&!M.type&&(Q.patch?(Q.patches++,M.type="string"):z("(Patchable) parameter.type is mandatory for non-body parameters",Q)),M.type&&typeof M.type=="object"&&M.type.$ref&&(M.type=o(pe,M.type.$ref)),M.type==="file"&&(M["x-s2o-originalType"]=M.type,fe=M.type),M.description&&typeof M.description=="object"&&M.description.$ref&&(M.description=o(pe,M.description.$ref)),M.description===null&&delete M.description;let he=M.collectionFormat;if(M.type==="array"&&!he&&(he="csv"),he&&(M.type!=="array"&&(Q.patch?(Q.patches++,delete M.collectionFormat):z("(Patchable) collectionFormat is only applicable to param.type array",Q)),he==="csv"&&(M.in==="query"||M.in==="cookie")&&(M.style="form",M.explode=!1),he==="csv"&&(M.in==="path"||M.in==="header")&&(M.style="simple"),he==="ssv"&&(M.in==="query"?M.style="spaceDelimited":C("collectionFormat:ssv is no longer supported except for in:query parameters",M,Q)),he==="pipes"&&(M.in==="query"?M.style="pipeDelimited":C("collectionFormat:pipes is no longer supported except for in:query parameters",M,Q)),he==="multi"&&(M.explode=!0),he==="tsv"&&(C("collectionFormat:tsv is no longer supported",M,Q),M["x-collectionFormat"]="tsv"),delete M.collectionFormat),M.type&&M.type!=="body"&&M.in!=="formData")if(M.items&&M.schema)C("parameter has array,items and schema",M,Q);else{M.schema&&Q.patches++,(!M.schema||typeof M.schema!="object")&&(M.schema={}),M.schema.type=M.type,M.items&&(M.schema.items=M.items,delete M.items,u(M.schema.items,null,function(xe,Oe,_e){Oe==="collectionFormat"&&typeof xe[Oe]=="string"&&(he&&xe[Oe]!==he&&C("Nested collectionFormats are not supported",M,Q),delete xe[Oe])}));for(let xe of m.parameterTypeProperties)typeof M[xe]<"u"&&(M.schema[xe]=M[xe]),delete M[xe]}M.schema&&O(M.schema,Q),M["x-ms-skip-url-encoding"]&&M.in==="query"&&(M.allowReserved=!0,delete M["x-ms-skip-url-encoding"])}if(M&&M.in==="formData"){de=!1,re.content={};let he="application/x-www-form-urlencoded";if(ge.length&&ge.indexOf("multipart/form-data")>=0&&(he="multipart/form-data"),re.content[he]={},M.schema)re.content[he].schema=M.schema,M.schema.$ref&&(re["x-s2o-name"]=decodeURIComponent(M.schema.$ref.replace("#/components/schemas/","")));else{re.content[he].schema={},re.content[he].schema.type="object",re.content[he].schema.properties={},re.content[he].schema.properties[M.name]={};let xe=re.content[he].schema,Oe=re.content[he].schema.properties[M.name];M.description&&(Oe.description=M.description),M.example&&(Oe.example=M.example),M.type&&(Oe.type=M.type);for(let _e of m.parameterTypeProperties)typeof M[_e]<"u"&&(Oe[_e]=M[_e]);M.required===!0&&(xe.required||(xe.required=[]),xe.required.push(M.name),re.required=!0),typeof M.default<"u"&&(Oe.default=M.default),Oe.properties&&(Oe.properties=M.properties),M.allOf&&(Oe.allOf=M.allOf),M.type==="array"&&M.items&&(Oe.items=M.items,Oe.items.collectionFormat&&delete Oe.items.collectionFormat),(fe==="file"||M["x-s2o-originalType"]==="file")&&(Oe.type="string",Oe.format="binary"),ne(M,Oe)}}else M&&M.type==="file"&&(M.required&&(re.required=M.required),re.content={},re.content["application/octet-stream"]={},re.content["application/octet-stream"].schema={},re.content["application/octet-stream"].schema.type="string",re.content["application/octet-stream"].schema.format="binary",ne(M,re));if(M&&M.in==="body"){re.content={},M.name&&(re["x-s2o-name"]=($&&$.operationId?m.sanitiseAll($.operationId):"")+("_"+M.name).toCamelCase()),M.description&&(re.description=M.description),M.required&&(re.required=M.required),$&&Q.rbname&&M.name&&($[Q.rbname]=M.name),M.schema&&M.schema.$ref?re["x-s2o-name"]=decodeURIComponent(M.schema.$ref.replace("#/components/schemas/","")):M.schema&&M.schema.type==="array"&&M.schema.items&&M.schema.items.$ref&&(re["x-s2o-name"]=decodeURIComponent(M.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),ge.length||ge.push("application/json");for(let he of ge)re.content[he]={},re.content[he].schema=l(M.schema||{}),O(re.content[he].schema,Q);ne(M,re)}if(Object.keys(re).length>0&&(M["x-s2o-delete"]=!0,$))if($.requestBody&&de){$.requestBody["x-s2o-overloaded"]=!0;let he=$.operationId||ce;C("Operation "+he+" has multiple requestBodies",$,Q)}else $.requestBody||($=oe[G]=te($,Q)),$.requestBody.content&&$.requestBody.content["multipart/form-data"]&&$.requestBody.content["multipart/form-data"].schema&&$.requestBody.content["multipart/form-data"].schema.properties&&re.content["multipart/form-data"]&&re.content["multipart/form-data"].schema&&re.content["multipart/form-data"].schema.properties?($.requestBody.content["multipart/form-data"].schema.properties=Object.assign($.requestBody.content["multipart/form-data"].schema.properties,re.content["multipart/form-data"].schema.properties),$.requestBody.content["multipart/form-data"].schema.required=($.requestBody.content["multipart/form-data"].schema.required||[]).concat(re.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&&re.content["application/x-www-form-urlencoded"]&&re.content["application/x-www-form-urlencoded"].schema&&re.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,re.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(re.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,re),$.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(M&&!M["x-s2o-delete"]){delete M.type;for(let he of m.parameterTypeProperties)delete M[he];M.in==="path"&&(typeof M.required>"u"||M.required!==!0)&&(Q.patch?(Q.patches++,M.required=!0):z("(Patchable) path parameters must be required:true ["+M.name+" in "+ce+"]",Q))}return $}function ne(M,$){for(let oe in M)oe.startsWith("x-")&&!oe.startsWith("x-s2o")&&($[oe]=M[oe])}function me(M,$,oe,G,ce){if(!M)return!1;if(M.$ref&&typeof M.$ref=="string")M.$ref.indexOf("#/definitions/")>=0?C("definition used as response: "+M.$ref,M,ce):M.$ref.startsWith("#/responses/")&&(M.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(M.$ref.replace("#/responses/",""))));else{if((typeof M.description>"u"||M.description===null||M.description===""&&ce.patch)&&(ce.patch?typeof M=="object"&&!Array.isArray(M)&&(ce.patches++,M.description=g[M]||""):z("(Patchable) response.description is mandatory",ce)),typeof M.schema<"u"){if(O(M.schema,ce),M.schema.$ref&&typeof M.schema.$ref=="string"&&M.schema.$ref.startsWith("#/responses/")&&(M.schema.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(M.schema.$ref.replace("#/responses/","")))),oe&&oe.produces&&typeof oe.produces=="string")if(ce.patch)ce.patches++,oe.produces=[oe.produces];else return z("(Patchable) operation.produces must be an array",ce);G.produces&&!Array.isArray(G.produces)&&delete G.produces;let pe=((oe?oe.produces:null)||G.produces||[]).filter(m.uniqueOnly);pe.length||pe.push("*/*"),M.content={};for(let Q of pe){if(M.content[Q]={},M.content[Q].schema=l(M.schema),M.examples&&M.examples[Q]){let re={};re.value=M.examples[Q],M.content[Q].examples={},M.content[Q].examples.response=re,delete M.examples[Q]}M.content[Q].schema.type==="file"&&(M.content[Q].schema={type:"string",format:"binary"})}delete M.schema}for(let pe in M.examples)M.content||(M.content={}),M.content[pe]||(M.content[pe]={}),M.content[pe].examples={},M.content[pe].examples.response={},M.content[pe].examples.response.value=M.examples[pe];if(delete M.examples,M.headers)for(let pe in M.headers)pe.toLowerCase()==="status code"?ce.patch?(ce.patches++,delete M.headers[pe]):z('(Patchable) "Status Code" is not a valid header',ce):D(M.headers[pe],ce)}}function I(M,$,oe,G,ce){for(let pe in M){let Q=M[pe];Q&&Q["x-trace"]&&typeof Q["x-trace"]=="object"&&(Q.trace=Q["x-trace"],delete Q["x-trace"]),Q&&Q["x-summary"]&&typeof Q["x-summary"]=="string"&&(Q.summary=Q["x-summary"],delete Q["x-summary"]),Q&&Q["x-description"]&&typeof Q["x-description"]=="string"&&(Q.description=Q["x-description"],delete Q["x-description"]),Q&&Q["x-servers"]&&Array.isArray(Q["x-servers"])&&(Q.servers=Q["x-servers"],delete Q["x-servers"]);for(let re in Q)if(m.httpMethods.indexOf(re)>=0||re==="x-amazon-apigateway-any-method"){let de=Q[re];if(de&&de.parameters&&Array.isArray(de.parameters)){if(Q.parameters)for(let fe of Q.parameters)typeof fe.$ref=="string"&&(Y(fe,oe),fe=o(ce,fe.$ref)),!de.parameters.find(function(ge,he,xe){return ge.name===fe.name&&ge.in===fe.in})&&(fe.in==="formData"||fe.in==="body"||fe.type==="file")&&(de=ue(fe,de,Q,re,pe,ce,oe),oe.rbname&&de[oe.rbname]===""&&delete de[oe.rbname]);for(let fe of de.parameters)de=ue(fe,de,Q,re,re+":"+pe,ce,oe);oe.rbname&&de[oe.rbname]===""&&delete de[oe.rbname],oe.debug||de.parameters&&(de.parameters=de.parameters.filter(U))}if(de&&de.security&&q(de.security),typeof de=="object"){if(!de.responses){let fe={};fe.description="Default response",de.responses={default:fe}}for(let fe in de.responses){let ge=de.responses[fe];me(ge,fe,de,ce,oe)}}if(de&&de["x-servers"]&&Array.isArray(de["x-servers"]))de.servers=de["x-servers"],delete de["x-servers"];else if(de&&de.schemes&&de.schemes.length){for(let fe of de.schemes)if((!ce.schemes||ce.schemes.indexOf(fe)<0)&&(de.servers||(de.servers=[]),Array.isArray(ce.servers)))for(let ge of ce.servers){let he=l(ge),xe=a.parse(he.url);xe.protocol=fe,he.url=xe.format(),de.servers.push(he)}}if(oe.debug&&(de["x-s2o-consumes"]=de.consumes||[],de["x-s2o-produces"]=de.produces||[]),de){if(delete de.consumes,delete de.produces,delete de.schemes,de["x-ms-examples"]){for(let fe in de["x-ms-examples"]){let ge=de["x-ms-examples"][fe],he=m.sanitiseAll(fe);if(ge.parameters)for(let xe in ge.parameters){let Oe=ge.parameters[xe];for(let _e of(de.parameters||[]).concat(Q.parameters||[]))_e.$ref&&(_e=i.jptr(ce,_e.$ref)),_e.name===xe&&!_e.example&&(_e.examples||(_e.examples={}),_e.examples[fe]={value:Oe})}if(ge.responses)for(let xe in ge.responses){if(ge.responses[xe].headers)for(let Oe in ge.responses[xe].headers){let _e=ge.responses[xe].headers[Oe];for(let Ye in de.responses[xe].headers)if(Ye===Oe){let E=de.responses[xe].headers[Ye];E.example=_e}}if(ge.responses[xe].body&&(ce.components.examples[he]={value:l(ge.responses[xe].body)},de.responses[xe]&&de.responses[xe].content))for(let Oe in de.responses[xe].content){let _e=de.responses[xe].content[Oe];_e.examples||(_e.examples={}),_e.examples[fe]={$ref:"#/components/examples/"+he}}}}delete de["x-ms-examples"]}if(de.parameters&&de.parameters.length===0&&delete de.parameters,de.requestBody){let fe=de.operationId?m.sanitiseAll(de.operationId):m.sanitiseAll(re+pe).toCamelCase(),ge=m.sanitise(de.requestBody["x-s2o-name"]||fe||"");delete de.requestBody["x-s2o-name"];let he=JSON.stringify(de.requestBody),xe=m.hash(he);if(!G[xe]){let _e={};_e.name=ge,_e.body=de.requestBody,_e.refs=[],G[xe]=_e}let Oe="#/"+$+"/"+encodeURIComponent(i.jpescape(pe))+"/"+re+"/requestBody";G[xe].refs.push(Oe)}}}if(Q&&Q.parameters){for(let re in Q.parameters){let de=Q.parameters[re];ue(de,null,Q,null,pe,ce,oe)}!oe.debug&&Array.isArray(Q.parameters)&&(Q.parameters=Q.parameters.filter(U))}}}function K(M,$){let oe={};v={schemas:{}},M.security&&q(M.security);for(let ce in M.components.securitySchemes){let pe=m.sanitise(ce);ce!==pe&&(M.components.securitySchemes[pe]&&z("Duplicate sanitised securityScheme name "+pe,$),M.components.securitySchemes[pe]=M.components.securitySchemes[ce],delete M.components.securitySchemes[ce]),N(M.components.securitySchemes[pe],$)}for(let ce in M.components.schemas){let pe=m.sanitiseAll(ce),Q="";if(ce!==pe){for(;M.components.schemas[pe+Q];)Q=Q?++Q:2;M.components.schemas[pe+Q]=M.components.schemas[ce],delete M.components.schemas[ce]}v.schemas[ce]=pe+Q,O(M.components.schemas[pe+Q],$)}$.refmap={},u(M,{payload:{options:$}},B),L(M,$);for(let ce in M.components.parameters){let pe=m.sanitise(ce);ce!==pe&&(M.components.parameters[pe]&&z("Duplicate sanitised parameter name "+pe,$),M.components.parameters[pe]=M.components.parameters[ce],delete M.components.parameters[ce]);let Q=M.components.parameters[pe];ue(Q,null,null,null,pe,M,$)}for(let ce in M.components.responses){let pe=m.sanitise(ce);ce!==pe&&(M.components.responses[pe]&&z("Duplicate sanitised response name "+pe,$),M.components.responses[pe]=M.components.responses[ce],delete M.components.responses[ce]);let Q=M.components.responses[pe];if(me(Q,pe,null,M,$),Q.headers)for(let re in Q.headers)re.toLowerCase()==="status code"?$.patch?($.patches++,delete Q.headers[re]):z('(Patchable) "Status Code" is not a valid header',$):D(Q.headers[re],$)}for(let ce in M.components.requestBodies){let pe=M.components.requestBodies[ce],Q=JSON.stringify(pe),re=m.hash(Q),de={};de.name=ce,de.body=pe,de.refs=[],oe[re]=de}if(I(M.paths,"paths",$,oe,M),M["x-ms-paths"]&&I(M["x-ms-paths"],"x-ms-paths",$,oe,M),!$.debug)for(let ce in M.components.parameters)M.components.parameters[ce]["x-s2o-delete"]&&delete M.components.parameters[ce];$.debug&&(M["x-s2o-consumes"]=M.consumes||[],M["x-s2o-produces"]=M.produces||[]),delete M.consumes,delete M.produces,delete M.schemes;let G=[];if(M.components.requestBodies={},!$.resolveInternal){let ce=1;for(let pe in oe){let Q=oe[pe];if(Q.refs.length>1){let re="";for(Q.name||(Q.name="requestBody",re=ce++);G.indexOf(Q.name+re)>=0;)re=re?++re:2;Q.name=Q.name+re,G.push(Q.name),M.components.requestBodies[Q.name]=l(Q.body);for(let de in Q.refs){let fe={};fe.$ref="#/components/requestBodies/"+Q.name,i.jptr(M,Q.refs[de],fe)}}}}return M.components.responses&&Object.keys(M.components.responses).length===0&&delete M.components.responses,M.components.parameters&&Object.keys(M.components.parameters).length===0&&delete M.components.parameters,M.components.examples&&Object.keys(M.components.examples).length===0&&delete M.components.examples,M.components.requestBodies&&Object.keys(M.components.requestBodies).length===0&&delete M.components.requestBodies,M.components.securitySchemes&&Object.keys(M.components.securitySchemes).length===0&&delete M.components.securitySchemes,M.components.headers&&Object.keys(M.components.headers).length===0&&delete M.components.headers,M.components.schemas&&Object.keys(M.components.schemas).length===0&&delete M.components.schemas,M.components&&Object.keys(M.components).length===0&&delete M.components,M}function W(M){return!M||!M.url||typeof M.url!="string"||(M.url=M.url.split("{{").join("{"),M.url=M.url.split("}}").join("}"),M.url.replace(/\{(.+?)\}/g,function($,oe){M.variables||(M.variables={}),M.variables[oe]={default:"unknown"}})),M}function V(M,$,oe){if(typeof M.info>"u"||M.info===null)if($.patch)$.patches++,M.info={version:"",title:""};else return oe(new k("(Patchable) info object is mandatory"));if(typeof M.info!="object"||Array.isArray(M.info))return oe(new k("info must be an object"));if(typeof M.info.title>"u"||M.info.title===null)if($.patch)$.patches++,M.info.title="";else return oe(new k("(Patchable) info.title cannot be null"));if(typeof M.info.version>"u"||M.info.version===null)if($.patch)$.patches++,M.info.version="";else return oe(new k("(Patchable) info.version cannot be null"));if(typeof M.info.version!="string")if($.patch)$.patches++,M.info.version=M.info.version.toString();else return oe(new k("(Patchable) info.version must be a string"));if(typeof M.info.logo<"u")if($.patch)$.patches++,M.info["x-logo"]=M.info.logo,delete M.info.logo;else return oe(new k("(Patchable) info should not have logo property"));if(typeof M.info.termsOfService<"u"){if(M.info.termsOfService===null)if($.patch)$.patches++,M.info.termsOfService="";else return oe(new k("(Patchable) info.termsOfService cannot be null"));try{new URL(M.info.termsOfService)}catch{if($.patch)$.patches++,delete M.info.termsOfService;else return oe(new k("(Patchable) info.termsOfService must be a URL"))}}}function P(M,$,oe){if(typeof M.paths>"u")if($.patch)$.patches++,M.paths={};else return oe(new k("(Patchable) paths object is mandatory"))}function _(M,$){const oe=new WeakSet;u(M,{identityDetection:!0},function(G,ce,pe){typeof G[ce]=="object"&&G[ce]!==null&&(oe.has(G[ce])?$.anchors?G[ce]=l(G[ce]):z("YAML anchor or merge key at "+pe.path,$):oe.add(G[ce]))})}function F(M,$,oe){return t(oe,new Promise(function(G,ce){if(M||(M={}),$.original=M,$.text||($.text=n.stringify(M)),$.externals=[],$.externalRefs={},$.rewriteRefs=!0,$.preserveMiro=!0,$.promise={},$.promise.resolve=G,$.promise.reject=ce,$.patches=0,$.cache||($.cache={}),$.source&&($.cache[$.source]=$.original),_(M,$),M.openapi&&typeof M.openapi=="string"&&M.openapi.startsWith("3.")){$.openapi=c(M),V($.openapi,$,ce),P($.openapi,$,ce),d.optionalResolve($).then(function(){return $.direct?G($.openapi):G($)}).catch(function(Q){console.warn(Q),ce(Q)});return}if(!M.swagger||M.swagger!="2.0")return ce(new k("Unsupported swagger/OpenAPI version: "+(M.openapi?M.openapi:M.swagger)));let pe=$.openapi={};if(pe.openapi=typeof $.targetVersion=="string"&&$.targetVersion.startsWith("3.")?$.targetVersion:y,$.origin){pe["x-origin"]||(pe["x-origin"]=[]);let Q={};Q.url=$.source||$.origin,Q.format="swagger",Q.version=M.swagger,Q.converter={},Q.converter.url="https://github.com/mermade/oas-kit",Q.converter.version=b,pe["x-origin"].push(Q)}if(pe=Object.assign(pe,c(M)),delete pe.swagger,u(pe,{},function(Q,re,de){Q[re]===null&&!re.startsWith("x-")&&re!=="default"&&de.path.indexOf("/example")<0&&delete Q[re]}),M.host)for(let Q of Array.isArray(M.schemes)?M.schemes:[""]){let re={},de=(M.basePath||"").replace(/\/$/,"");re.url=(Q?Q+":":"")+"//"+M.host+de,W(re),pe.servers||(pe.servers=[]),pe.servers.push(re)}else if(M.basePath){let Q={};Q.url=M.basePath,W(Q),pe.servers||(pe.servers=[]),pe.servers.push(Q)}if(delete pe.host,delete pe.basePath,pe["x-servers"]&&Array.isArray(pe["x-servers"])&&(pe.servers=pe["x-servers"],delete pe["x-servers"]),M["x-ms-parameterized-host"]){let Q=M["x-ms-parameterized-host"],re={};re.url=Q.hostTemplate+(M.basePath?M.basePath:""),re.variables={};const de=re.url.match(/\{\w+\}/g);for(let fe in Q.parameters){let ge=Q.parameters[fe];ge.$ref&&(ge=l(o(pe,ge.$ref))),fe.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=de[fe].replace("{","").replace("}","")),re.variables[ge.name]=ge,delete ge.name)}pe.servers||(pe.servers=[]),Q.useSchemePrefix===!1?pe.servers.push(re):M.schemes.forEach(fe=>{pe.servers.push(Object.assign({},re,{url:fe+"://"+re.url}))}),delete pe["x-ms-parameterized-host"]}V(pe,$,ce),P(pe,$,ce),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(){K($.openapi,$),$.direct?G($.openapi):G($)}).catch(function(Q){console.warn(Q),ce(Q)})}))}function ee(M,$,oe){return t(oe,new Promise(function(G,ce){let pe=null,Q=null;try{pe=JSON.parse(M),$.text=JSON.stringify(pe,null,2)}catch(re){Q=re;try{pe=n.parse(M,{schema:"core",prettyErrors:!0}),$.sourceYaml=!0,$.text=M}catch(de){Q=de}}pe?F(pe,$).then(re=>G(re)).catch(re=>ce(re)):ce(new k(Q?Q.message:"Could not parse string"))}))}function ie(M,$,oe){return t(oe,new Promise(function(G,ce){$.origin=!0,$.source||($.source=M),$.verbose&&console.warn("GET "+M),$.fetch||($.fetch=r);const pe=Object.assign({},$.fetchOptions,{agent:$.agent});$.fetch(M,pe).then(function(Q){if(Q.status!==200)throw new k(`Received status code ${Q.status}: ${M}`);return Q.text()}).then(function(Q){ee(Q,$).then(re=>G(re)).catch(re=>ce(re))}).catch(function(Q){ce(Q)})}))}function be(M,$,oe){return t(oe,new Promise(function(G,ce){e.readFile(M,$.encoding||"utf8",function(pe,Q){pe?ce(pe):($.sourceFile=M,ee(Q,$).then(re=>G(re)).catch(re=>ce(re)))})}))}function X(M,$,oe){return t(oe,new Promise(function(G,ce){let pe="";M.on("data",function(Q){pe+=Q}).on("end",function(){ee(pe,$).then(Q=>G(Q)).catch(Q=>ce(Q))})}))}return O7={S2OError:k,targetVersion:y,convert:F,convertObj:F,convertUrl:ie,convertStr:ee,convertFile:be,convertStream:X},O7}var rta=tta();const nta=Vr(rta);function ita(e){return e.paths||(e.paths={}),new Promise((a,t)=>nta.convertObj(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(r,n)=>{if(r)return t(r);a(n?.openapi)}))}async function ota(){try{return(await Zae())?.resolvedConfig.openapi||{}}catch{return{}}}async function sta(e){const a=await Zae(),t={config:a,base:Jc?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};Jc&&(a.resolve.http.customFetch=globalThis.fetch),typeof e=="object"&&e!==null?t.doc=lta(e):t.ref=e;const{bundle:{parsed:r}}=await Caa(t);return r.swagger!==void 0?ita(r):r}function lta(e){return{source:{absoluteRef:""},parsed:e}}async function cta(e,a,t){let r;if(t?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await sta(e||a);try{IFe(r)}catch{}return r}const uta=({options:e,definitionUrl:a,definition:t,activeSampleLanguage:r,children:n})=>{const[i,o]=R.useState(),[s,l]=R.useState(!0),[c,u]=R.useState(null),[d,p]=R.useState(e||{});R.useEffect(()=>{async function g(){l(!0);try{const b=await ota();p({...e,...b}),u(await cta(t,a,e))}catch(b){o(b.message)}}g()},[t,a,e]);const m=R.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:a,activeSampleLanguage:r}},KFe([c,a,d]));return R.useEffect(()=>{m&&l(!1)},[m]),i||!m?null:s?Qs(e?.hideLoading,!1)?null:h.jsx(HZe,{color:"--loading-spinner-color"}):R.isValidElement(n)?R.cloneElement(n,{store:m}):null};function dta({definition:e,definitionUrl:a,options:t={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return h.jsx(uta,{definition:e,definitionUrl:a,options:t,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:h.jsx(yee,{withCommonStyles:!0,router:o||"hash"})})}function pta(e){const a={},t=e.attributes;for(let r=0;r<t.length;r++){const n=t[r];a[n.name]=n.value}return a}function hta(e){const a=pta(e),t={};for(const r in a){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());t[n]=a[r]}return t}function mta(e,a=document.querySelector("redoc")){ZF.hydrateRoot(a,h.jsx(yee,{store:e}),{onRecoverableError:(t,r)=>{t.message.includes("Minified React error #418")||console.error(t.message,r)}})}function dre(e,a={},t=z4("redoc")){if(t===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}={...a,...hta(t)};let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),ZF.createRoot(t).render(R.createElement(dta,{definition:o,definitionUrl:i,options:n,router:r??"hash"},["Loading..."]))}const fta="3.15.0-next.13",gta="351af5a9";function vta(){const e=z4("redoc");if(!e)return;const a=e.getAttribute("spec-url");a&&dre(a,{},e)}vta();function u1(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 pre={exports:{}};/*!
10278
10278
 
10279
10279
  JSZip v3.10.1 - A JavaScript class for generating and reading zip files
10280
10280
  <http://stuartk.com/jszip>
@@ -11897,7 +11897,7 @@ html body {
11897
11897
  `),C+="`"+jzt(z)+"`: "+k),c([C])}return null})},e})();function _D(e){if(e){var a=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
11898
11898
 
11899
11899
  $3`);return a.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function jzt(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Ozt=(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},e(a,t)};return function(a,t){e(a,t);function r(){this.constructor=a}a.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Xn,gx;if(typeof process=="object")gx=!1;else if(typeof navigator=="object"){var Azt=navigator.userAgent;gx=Azt.indexOf("Windows")>=0}var Pzt=/^\w[\w\d+.-]*$/,Mzt=/^\//,Tzt=/^\/\//;function Bzt(e,a){if(!e.scheme&&a)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!Pzt.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Mzt.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Tzt.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Ezt(e,a){return!e&&!a?"file":e}function _zt(e,a){switch(e){case"https":case"http":case"file":a?a[0]!==Bc&&(a=Bc+a):a=Bc;break}return a}var Jr="",Bc="/",Lzt=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,LD=(function(){function e(a,t,r,n,i,o){o===void 0&&(o=!1),typeof a=="object"?(this.scheme=a.scheme||Jr,this.authority=a.authority||Jr,this.path=a.path||Jr,this.query=a.query||Jr,this.fragment=a.fragment||Jr):(this.scheme=Ezt(a,o),this.authority=t||Jr,this.path=_zt(this.scheme,r||Jr),this.query=n||Jr,this.fragment=i||Jr,Bzt(this,o))}return e.isUri=function(a){return a instanceof e?!0:a?typeof a.authority=="string"&&typeof a.fragment=="string"&&typeof a.path=="string"&&typeof a.query=="string"&&typeof a.scheme=="string"&&typeof a.fsPath=="function"&&typeof a.with=="function"&&typeof a.toString=="function":!1},Object.defineProperty(e.prototype,"fsPath",{get:function(){return Xze(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(a){if(!a)return this;var t=a.scheme,r=a.authority,n=a.path,i=a.query,o=a.fragment;return t===void 0?t=this.scheme:t===null&&(t=Jr),r===void 0?r=this.authority:r===null&&(r=Jr),n===void 0?n=this.path:n===null&&(n=Jr),i===void 0?i=this.query:i===null&&(i=Jr),o===void 0?o=this.fragment:o===null&&(o=Jr),t===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new wb(t,r,n,i,o)},e.parse=function(a,t){t===void 0&&(t=!1);var r=Lzt.exec(a);return r?new wb(r[2]||Jr,BM(r[4]||Jr),BM(r[5]||Jr),BM(r[7]||Jr),BM(r[9]||Jr),t):new wb(Jr,Jr,Jr,Jr,Jr)},e.file=function(a){var t=Jr;if(gx&&(a=a.replace(/\\/g,Bc)),a[0]===Bc&&a[1]===Bc){var r=a.indexOf(Bc,2);r===-1?(t=a.substring(2),a=Bc):(t=a.substring(2,r),a=a.substring(r)||Bc)}return new wb("file",t,a,Jr,Jr)},e.from=function(a){return new wb(a.scheme,a.authority,a.path,a.query,a.fragment)},e.prototype.toString=function(a){return a===void 0&&(a=!1),RD(this,a)},e.prototype.toJSON=function(){return this},e.revive=function(a){if(a){if(a instanceof e)return a;var t=new wb(a);return t._formatted=a.external,t._fsPath=a._sep===Wze?a.fsPath:null,t}else return a},e})(),Wze=gx?1:void 0,wb=(function(e){Ozt(a,e);function a(){var t=e!==null&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return Object.defineProperty(a.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=Xze(this)),this._fsPath},enumerable:!0,configurable:!0}),a.prototype.toString=function(t){return t===void 0&&(t=!1),t?RD(this,!0):(this._formatted||(this._formatted=RD(this,!1)),this._formatted)},a.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Wze),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},a})(LD),Zze=(Xn={},Xn[58]="%3A",Xn[47]="%2F",Xn[63]="%3F",Xn[35]="%23",Xn[91]="%5B",Xn[93]="%5D",Xn[64]="%40",Xn[33]="%21",Xn[36]="%24",Xn[38]="%26",Xn[39]="%27",Xn[40]="%28",Xn[41]="%29",Xn[42]="%2A",Xn[43]="%2B",Xn[44]="%2C",Xn[59]="%3B",Xn[61]="%3D",Xn[32]="%20",Xn);function Qze(e,a){for(var t=void 0,r=-1,n=0;n<e.length;n++){var i=e.charCodeAt(n);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||i===45||i===46||i===95||i===126||a&&i===47)r!==-1&&(t+=encodeURIComponent(e.substring(r,n)),r=-1),t!==void 0&&(t+=e.charAt(n));else{t===void 0&&(t=e.substr(0,n));var o=Zze[i];o!==void 0?(r!==-1&&(t+=encodeURIComponent(e.substring(r,n)),r=-1),t+=o):r===-1&&(r=n)}}return r!==-1&&(t+=encodeURIComponent(e.substring(r))),t!==void 0?t:e}function Rzt(e){for(var a=void 0,t=0;t<e.length;t++){var r=e.charCodeAt(t);r===35||r===63?(a===void 0&&(a=e.substr(0,t)),a+=Zze[r]):a!==void 0&&(a+=e[t])}return a!==void 0?a:e}function Xze(e,a){var t;return e.authority&&e.path.length>1&&e.scheme==="file"?t="//"+e.authority+e.path:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t=e.path[1].toLowerCase()+e.path.substr(2):t=e.path,gx&&(t=t.replace(/\//g,"\\")),t}function RD(e,a){var t=a?Rzt:Qze,r="",n=e.scheme,i=e.authority,o=e.path,s=e.query,l=e.fragment;if(n&&(r+=n,r+=":"),(i||n==="file")&&(r+=Bc,r+=Bc),i){var c=i.indexOf("@");if(c!==-1){var u=i.substr(0,c);i=i.substr(c+1),c=u.indexOf(":"),c===-1?r+=t(u,!1):(r+=t(u.substr(0,c),!1),r+=":",r+=t(u.substr(c+1),!1)),r+="@"}i=i.toLowerCase(),c=i.indexOf(":"),c===-1?r+=t(i,!1):(r+=t(i.substr(0,c),!1),r+=i.substr(c))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){var d=o.charCodeAt(1);d>=65&&d<=90&&(o="/"+String.fromCharCode(d+32)+":"+o.substr(3))}else if(o.length>=2&&o.charCodeAt(1)===58){var d=o.charCodeAt(0);d>=65&&d<=90&&(o=String.fromCharCode(d+32)+":"+o.substr(2))}r+=t(o,!0)}return s&&(r+="?",r+=t(s,!1)),l&&(r+="#",r+=a?l:Qze(l,!1)),r}function Yze(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Yze(e.substr(3)):e}}var eSe=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function BM(e){return e.match(eSe)?e.replace(eSe,function(a){return Yze(a)}):e}var Nzt=(function(){function e(a){try{this.patternRegExp=new RegExp(xzt(a)+"$")}catch{this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(a){this.schemas.push(a)},e.prototype.matchesPattern=function(a){return this.patternRegExp&&this.patternRegExp.test(a)},e.prototype.getSchemas=function(){return this.schemas},e})(),Dzt=(function(){function e(a,t,r){this.service=a,this.url=t,this.dependencies={},r&&(this.unresolvedSchema=this.service.promise.resolve(new zb(r)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var a=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(t){return a.service.resolveSchemaContent(t,a.url,a.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e})(),zb=(function(){function e(a,t){t===void 0&&(t=[]),this.schema=a,this.errors=t}return e})(),aSe=(function(){function e(a,t){t===void 0&&(t=[]),this.schema=a,this.errors=t}return e.prototype.getSection=function(a){return Ls(this.getSectionRecursive(a,this.schema))},e.prototype.getSectionRecursive=function(a,t){if(!t||typeof t=="boolean"||a.length===0)return t;var r=a.shift();if(t.properties&&typeof t.properties[r])return this.getSectionRecursive(a,t.properties[r]);if(t.patternProperties)for(var n=0,i=Object.keys(t.patternProperties);n<i.length;n++){var o=i[n],s=new RegExp(o);if(s.test(r))return this.getSectionRecursive(a,t.patternProperties[o])}else{if(typeof t.additionalProperties=="object")return this.getSectionRecursive(a,t.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(t.items)){var l=parseInt(r,10);if(!isNaN(l)&&t.items[l])return this.getSectionRecursive(a,t.items[l])}else if(t.items)return this.getSectionRecursive(a,t.items)}}return null},e})(),$zt=(function(){function e(a,t,r){this.contextService=t,this.requestService=a,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(a){return Object.keys(this.registeredSchemasIds).filter(function(t){var r=LD.parse(t).scheme;return r!=="schemaservice"&&(!a||a(r))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(a){var t=this,r=!1;a=this.normalizeId(a);for(var n=[a],i=Object.keys(this.schemasById).map(function(c){return t.schemasById[c]});n.length;)for(var o=n.pop(),s=0;s<i.length;s++){var l=i[s];l&&(l.url===o||l.dependencies[o])&&(l.url!==o&&n.push(l.url),l.clearSchema(),i[s]=void 0,r=!0)}return r},e.prototype.normalizeId=function(a){try{return LD.parse(a).toString()}catch{return a}},e.prototype.setSchemaContributions=function(a){if(a.schemas){var t=a.schemas;for(var r in t){var n=this.normalizeId(r);this.contributionSchemas[n]=this.addSchemaHandle(n,t[r])}}if(a.schemaAssociations){var i=a.schemaAssociations;for(var o in i){var s=i[o];this.contributionAssociations[o]=s;for(var l=this.getOrAddFilePatternAssociation(o),c=0,u=s;c<u.length;c++){var d=u[c],r=this.normalizeId(d);l.addSchema(r)}}}},e.prototype.addSchemaHandle=function(a,t){var r=new Dzt(this,a,t);return this.schemasById[a]=r,r},e.prototype.getOrAddSchemaHandle=function(a,t){return this.schemasById[a]||this.addSchemaHandle(a,t)},e.prototype.getOrAddFilePatternAssociation=function(a){var t=this.filePatternAssociationById[a];return t||(t=new Nzt(a),this.filePatternAssociationById[a]=t,this.filePatternAssociations.push(t)),t},e.prototype.registerExternalSchema=function(a,t,r){t===void 0&&(t=null);var n=this.normalizeId(a);if(this.registeredSchemasIds[n]=!0,t)for(var i=0,o=t;i<o.length;i++){var s=o[i];this.getOrAddFilePatternAssociation(s).addSchema(n)}return r?this.addSchemaHandle(n,r):this.getOrAddSchemaHandle(n)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var a in this.contributionSchemas)this.schemasById[a]=this.contributionSchemas[a],this.registeredSchemasIds[a]=!0;for(var t in this.contributionAssociations)for(var r=this.getOrAddFilePatternAssociation(t),n=0,i=this.contributionAssociations[t];n<i.length;n++){var o=i[n],a=this.normalizeId(o);r.addSchema(a)}},e.prototype.getResolvedSchema=function(a){var t=this.normalizeId(a),r=this.schemasById[t];return r?r.getResolvedSchema():this.promise.resolve(null)},e.prototype.loadSchema=function(a){if(!this.requestService){var t="Unable to load schema from '"+a+"'. No schema request service available";return this.promise.resolve(new zb({},[t]))}return this.requestService(a).then(function(r){if(!r){var n="Unable to load schema from '"+a+"': No content.";return new zb({},[n])}var i={},o=[];i=rzt(r,o);var s=o.length?["Unable to parse content from '"+a+"': Parse error at offset "+o[0].offset]:[];return new zb(i,s)},function(r){var n="Unable to load schema from '"+a+"': "+r.toString();return new zb({},[n])})},e.prototype.resolveSchemaContent=function(a,t,r){var n=this,i=a.errors.slice(0),o=a.schema;if(o.$schema){var s=this.normalizeId(o.$schema);if(s==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new aSe({},["Draft-03 schemas are not supported."]));s==="https://json-schema.org/draft/2019-09/schema"&&a.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var l=this.contextService,c=function(m,g){if(!g)return m;var b=m;return g[0]==="/"&&(g=g.substr(1)),g.split("/").some(function(y){return b=b[y],!b}),b},u=function(m,g,b,y){var v=c(g,y);if(v)for(var k in v)v.hasOwnProperty(k)&&!m.hasOwnProperty(k)&&(m[k]=v[k]);else i.push("$ref '"+y+"' in '"+b+"' can not be resolved.")},d=function(m,g,b,y,v){l&&!/^\w+:\/\/.*/.test(g)&&(g=l.resolveRelativePath(g,y)),g=n.normalizeId(g);var k=n.getOrAddSchemaHandle(g);return k.getUnresolvedSchema().then(function(z){if(v[g]=!0,z.errors.length){var C=b?g+"#"+b:g;i.push("Problems loading reference '"+C+"': "+z.errors[0]+".")}return u(m,z.schema,g,b),p(m,z.schema,g,k.dependencies)})},p=function(m,g,b,y){if(!m||typeof m!="object")return Promise.resolve(null);for(var v=[m],k=[],z=[],C=function(){for(var B=[],L=0;L<arguments.length;L++)B[L]=arguments[L];for(var q=0,N=B;q<N.length;q++){var U=N[q];typeof U=="object"&&v.push(U)}},w=function(){for(var B=[],L=0;L<arguments.length;L++)B[L]=arguments[L];for(var q=0,N=B;q<N.length;q++){var U=N[q];if(typeof U=="object")for(var D in U){var Y=U[D];typeof Y=="object"&&v.push(Y)}}},S=function(){for(var B=[],L=0;L<arguments.length;L++)B[L]=arguments[L];for(var q=0,N=B;q<N.length;q++){var U=N[q];if(Array.isArray(U))for(var D=0,Y=U;D<Y.length;D++){var te=Y[D];typeof te=="object"&&v.push(te)}}},O=function(B){for(var L=[];B.$ref;){var q=B.$ref,N=q.split("#",2);if(delete B.$ref,N[0].length>0){z.push(d(B,N[0],N[1],b,y));return}else L.indexOf(q)===-1&&(u(B,g,b,N[1]),L.push(q))}C(B.items,B.additionalProperties,B.not,B.contains,B.propertyNames,B.if,B.then,B.else),w(B.definitions,B.properties,B.patternProperties,B.dependencies),S(B.anyOf,B.allOf,B.oneOf,B.items)};v.length;){var A=v.pop();k.indexOf(A)>=0||(k.push(A),O(A))}return n.promise.all(z)};return p(o,o,t,r).then(function(m){return new aSe(o,i)})},e.prototype.getSchemaForResource=function(a,t){if(t&&t.root&&t.root.type==="object"){var r=t.root.properties.filter(function(g){return g.keyNode.value==="$schema"&&g.valueNode&&g.valueNode.type==="string"});if(r.length>0){var n=Sh(r[0].valueNode);if(n&&kzt(n,".")&&this.contextService&&(n=this.contextService.resolveRelativePath(n,a)),n){var i=this.normalizeId(n);return this.getOrAddSchemaHandle(i).getResolvedSchema()}}}for(var o=Object.create(null),s=[],l=0,c=this.filePatternAssociations;l<c.length;l++){var u=c[l];if(u.matchesPattern(a))for(var d=0,p=u.getSchemas();d<p.length;d++){var m=p[d];o[m]||(s.push(m),o[m]=!0)}}return s.length>0?this.createCombinedSchema(a,s).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(a,t){if(t.length===1)return this.getOrAddSchemaHandle(t[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(a),n={allOf:t.map(function(i){return{$ref:i}})};return this.addSchemaHandle(r,n)},e})(),Izt=(function(){function e(a,t){this.jsonSchemaService=a,this.promise=t,this.validationEnabled=!0}return e.prototype.configure=function(a){a&&(this.validationEnabled=a.validate,this.commentSeverity=a.allowComments?void 0:St.Error)},e.prototype.doValidation=function(a,t,r,n){var i=this;if(!this.validationEnabled)return this.promise.resolve([]);var o=[],s={},l=function(d){var p=d.range.start.line+" "+d.range.start.character+" "+d.message;s[p]||(s[p]=!0,o.push(d))},c=function(d){var p=r?nSe(r.trailingCommas):St.Error,m=r?nSe(r.comments):i.commentSeverity;if(d){if(d.errors.length&&t.root){var g=t.root,b=g.type==="object"?g.properties[0]:null;if(b&&b.keyNode.value==="$schema"){var y=b.valueNode||b,v=lr.create(a.positionAt(y.offset),a.positionAt(y.offset+y.length));l(Dd.create(v,d.errors[0],St.Warning,rr.SchemaResolveError))}else{var v=lr.create(a.positionAt(g.offset),a.positionAt(g.offset+1));l(Dd.create(v,d.errors[0],St.Warning,rr.SchemaResolveError))}}else{var k=t.validate(a,d.schema);k&&k.forEach(l)}tSe(d.schema)&&(m=void 0),rSe(d.schema)&&(p=void 0)}for(var z=0,C=t.syntaxErrors;z<C.length;z++){var w=C[z];if(w.code===rr.TrailingComma){if(typeof p!="number")continue;w.severity=p}l(w)}if(typeof m=="number"){var S="Comments are not permitted in JSON.";t.comments.forEach(function(O){l(Dd.create(O,S,m,rr.CommentNotPermitted))})}return o};if(n){var u=n.id||"schemaservice://untitled/"+Kzt++;return this.jsonSchemaService.resolveSchemaContent(new zb(n),u,{}).then(function(d){return c(d)})}return this.jsonSchemaService.getSchemaForResource(a.uri,t).then(function(d){return c(d)})},e})(),Kzt=0;function tSe(e){if(e&&typeof e=="object"){if(Tu(e.allowComments))return e.allowComments;if(e.allOf)for(var a=0,t=e.allOf;a<t.length;a++){var r=t[a],n=tSe(r);if(Tu(n))return n}}}function rSe(e){if(e&&typeof e=="object"){if(Tu(e.allowTrailingCommas))return e.allowTrailingCommas;if(Tu(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(e.allOf)for(var a=0,t=e.allOf;a<t.length;a++){var r=t[a],n=rSe(r);if(Tu(n))return n}}}function nSe(e){switch(e){case"error":return St.Error;case"warning":return St.Warning;case"ignore":return}}var iSe=48,Vzt=57,Hzt=65,EM=97,Fzt=102;function Yn(e){return e<iSe?0:e<=Vzt?e-iSe:(e<EM&&(e+=EM-Hzt),e>=EM&&e<=Fzt?e-EM+10:0)}function Gzt(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:Yn(e.charCodeAt(1))*17/255,green:Yn(e.charCodeAt(2))*17/255,blue:Yn(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Yn(e.charCodeAt(1))*17/255,green:Yn(e.charCodeAt(2))*17/255,blue:Yn(e.charCodeAt(3))*17/255,alpha:Yn(e.charCodeAt(4))*17/255};case 7:return{red:(Yn(e.charCodeAt(1))*16+Yn(e.charCodeAt(2)))/255,green:(Yn(e.charCodeAt(3))*16+Yn(e.charCodeAt(4)))/255,blue:(Yn(e.charCodeAt(5))*16+Yn(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Yn(e.charCodeAt(1))*16+Yn(e.charCodeAt(2)))/255,green:(Yn(e.charCodeAt(3))*16+Yn(e.charCodeAt(4)))/255,blue:(Yn(e.charCodeAt(5))*16+Yn(e.charCodeAt(6)))/255,alpha:(Yn(e.charCodeAt(7))*16+Yn(e.charCodeAt(8)))/255}}return null}var qzt=(function(){function e(a){this.schemaService=a}return e.prototype.findDocumentSymbols=function(a,t,r){var n=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var i=t.root;if(!i)return null;var o=r.resultLimit,s=a.uri;if((s==="vscode://defaultsettings/keybindings.json"||ED(s.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){for(var l=[],c=0,u=i.items;c<u.length;c++){var d=u[c];if(d.type==="object")for(var p=0,m=d.properties;p<m.length;p++){var g=m[p];if(g.keyNode.value==="key"&&g.valueNode){var b=yb.create(a.uri,Ch(a,d));if(l.push({name:Sh(g.valueNode),kind:Bu.Function,location:b}),o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),l}}}return l}var y=function(k,z,C){return o>=0&&(z.type==="array"?z.items.forEach(function(w){return y(k,w,C)}):z.type==="object"&&z.properties.forEach(function(w){if(o>=0){var S=w.valueNode;if(S){o--;var O=yb.create(a.uri,Ch(a,w)),A=C?C+"."+w.keyNode.value:w.keyNode.value;k.push({name:n.getKeyLabel(w),kind:n.getSymbolKind(S.type),location:O,containerName:C}),y(k,S,A)}}})),k},v=y([],i,void 0);return o<0&&(v.pop(),r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s)),v},e.prototype.findDocumentSymbols2=function(a,t,r){var n=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var i=t.root;if(!i)return null;var o=r.resultLimit,s=a.uri;if((s==="vscode://defaultsettings/keybindings.json"||ED(s.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){for(var l=[],c=0,u=i.items;c<u.length;c++){var d=u[c];if(d.type==="object")for(var p=0,m=d.properties;p<m.length;p++){var g=m[p];if(g.keyNode.value==="key"&&g.valueNode){var b=Ch(a,d),y=Ch(a,g.keyNode);if(l.push({name:Sh(g.valueNode),kind:Bu.Function,range:b,selectionRange:y}),o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),l}}}return l}var v=function(z,C){return o>=0&&(C.type==="array"?C.items.forEach(function(w,S){if(w&&o>=0){o--;var O=Ch(a,w),A=O,B=String(S),L=v([],w);z.push({name:B,kind:n.getSymbolKind(w.type),range:O,selectionRange:A,children:L})}}):C.type==="object"&&C.properties.forEach(function(w){var S=w.valueNode;if(S&&o>=0){o--;var O=Ch(a,w),A=Ch(a,w.keyNode),B=v([],S);z.push({name:n.getKeyLabel(w),kind:n.getSymbolKind(S.type),range:O,selectionRange:A,children:B})}})),z},k=v([],i);return o<0&&(k.pop(),r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s)),k},e.prototype.getSymbolKind=function(a){switch(a){case"object":return Bu.Module;case"string":return Bu.String;case"number":return Bu.Number;case"array":return Bu.Array;case"boolean":return Bu.Boolean;default:return Bu.Variable}},e.prototype.getKeyLabel=function(a){var t=a.keyNode.value;return t&&(t=t.replace(/[\n]/g,"\u21B5")),t&&t.trim()?t:'"'+t+'"'},e.prototype.findDocumentColors=function(a,t,r){return this.schemaService.getSchemaForResource(a.uri,t).then(function(n){var i=[];if(n)for(var o=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,s=t.getMatchingSchemas(n.schema),l={},c=0,u=s;c<u.length;c++){var d=u[c];if(!d.inverted&&d.schema&&(d.schema.format==="color"||d.schema.format==="color-hex")&&d.node&&d.node.type==="string"){var p=String(d.node.offset);if(!l[p]){var m=Gzt(Sh(d.node));if(m){var g=Ch(a,d.node);i.push({color:m,range:g})}if(l[p]=!0,o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a.uri),i}}}return i})},e.prototype.getColorPresentations=function(a,t,r,n){var i=[],o=Math.round(r.red*255),s=Math.round(r.green*255),l=Math.round(r.blue*255);function c(d){var p=d.toString(16);return p.length!==2?"0"+p:p}var u;return r.alpha===1?u="#"+c(o)+c(s)+c(l):u="#"+c(o)+c(s)+c(l)+c(Math.round(r.alpha*255)),i.push({label:u,textEdit:$d.replace(n,JSON.stringify(u))}),i},e})();function Ch(e,a){return lr.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length))}var Jzt={schemaAssociations:{},schemas:{}};function Uzt(e,a){var t=[],r=[],n=[],i=-1,o=bb(e.getText(),!1),s=o.scan();function l(L){t.push(L),r.push(n.length)}for(;s!==17;){switch(s){case 1:case 3:{var c=e.positionAt(o.getTokenOffset()).line,u={startLine:c,endLine:c,kind:s===1?"object":"array"};n.push(u);break}case 2:case 4:{var d=s===2?"object":"array";if(n.length>0&&n[n.length-1].kind===d){var u=n.pop(),p=e.positionAt(o.getTokenOffset()).line;u&&p>u.startLine+1&&i!==u.startLine&&(u.endLine=p-1,l(u),i=u.startLine)}break}case 13:{var c=e.positionAt(o.getTokenOffset()).line,m=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;o.getTokenError()===1&&c+1<e.lineCount?o.setPosition(e.offsetAt(Jl.create(c+1,0))):c<m&&(l({startLine:c,endLine:m,kind:mx.Comment}),i=c);break}case 12:{var g=e.getText().substr(o.getTokenOffset(),o.getTokenLength()),b=g.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(b){var p=e.positionAt(o.getTokenOffset()).line;if(b[1]){var u={startLine:p,endLine:p,kind:mx.Region};n.push(u)}else{for(var y=n.length-1;y>=0&&n[y].kind!==mx.Region;)y--;if(y>=0){var u=n[y];n.length=y,p>u.startLine&&i!==u.startLine&&(u.endLine=p,l(u),i=u.startLine)}}}break}}s=o.scan()}var v=a&&a.rangeLimit;if(typeof v!="number"||t.length<=v)return t;a&&a.onRangeLimitExceeded&&a.onRangeLimitExceeded(e.uri);for(var k=[],z=0,C=r;z<C.length;z++){var w=C[z];w<30&&(k[w]=(k[w]||0)+1)}for(var S=0,O=0,y=0;y<k.length;y++){var A=k[y];if(A){if(A+S>v){O=y;break}S+=A}}for(var B=[],y=0;y<t.length;y++){var w=r[y];typeof w=="number"&&(w<O||w===O&&S++<v)&&B.push(t[y])}return B}function Wzt(e,a,t){function r(s){for(var l=e.offsetAt(s),c=t.getNodeFromOffset(l,!0),u=[];c;){switch(c.type){case"string":case"object":case"array":var d=c.offset+1,p=c.offset+c.length-1;d<p&&l>=d&&l<=p&&u.push(n(d,p)),u.push(n(c.offset,c.offset+c.length));break;case"number":case"boolean":case"null":case"property":u.push(n(c.offset,c.offset+c.length));break}if(c.type==="property"||c.parent&&c.parent.type==="array"){var m=o(c.offset+c.length,5);m!==-1&&u.push(n(c.offset,m))}c=c.parent}for(var g=void 0,b=u.length-1;b>=0;b--)g=MM.create(u[b],g);return g||(g=MM.create(lr.create(s,s))),g}function n(s,l){return lr.create(e.positionAt(s),e.positionAt(l))}var i=bb(e.getText(),!0);function o(s,l){i.setPosition(s);var c=i.scan();return c===l?i.getTokenOffset()+i.getTokenLength():-1}return a.map(r)}function oSe(e){var a=e.promiseConstructor||Promise,t=new $zt(e.schemaRequestService,e.workspaceContext,a);t.setSchemaContributions(Jzt);var r=new Szt(t,e.contributions,a,e.clientCapabilities),n=new Czt(t,e.contributions,a),i=new qzt(t),o=new Izt(t,a);return{configure:function(s){t.clearExternalSchemas(),s.schemas&&s.schemas.forEach(function(l){t.registerExternalSchema(l.uri,l.fileMatch,l.schema)}),o.configure(s)},resetSchema:function(s){return t.onResourceChange(s)},doValidation:o.doValidation.bind(o),parseJSONDocument:function(s){return yzt(s,{collectComments:!0})},newJSONDocument:function(s,l){return bzt(s,l)},doComplete:r.doComplete.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findColorSymbols:function(s,l){return i.findDocumentColors(s,l).then(function(c){return c.map(function(u){return u.range})})},findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:n.doHover.bind(n),getFoldingRanges:Uzt,getSelectionRanges:Wzt,format:function(s,l,c){var u=void 0;if(l){var d=s.offsetAt(l.start),p=s.offsetAt(l.end)-d;u={offset:d,length:p}}var m={tabSize:c?c.tabSize:4,insertSpaces:c?c.insertSpaces:!0,eol:`
11900
- `};return szt(s.getText(),u,m).map(function(g){return $d.replace(lr.create(s.positionAt(g.offset),s.positionAt(g.offset+g.length)),g.content)})}}}function pf(){const{tabsState:e}=Ft(),a=R.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>e.tabs.findIndex(c=>{const u=c.data.get();return fi(u,n)?(!i||u.collectionId===i)&&(!o||u.workflowId===o)&&(!s||u.stepId===s)&&(!l||u.historyId===l):!1}),[e]),t=R.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>{const c=a({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l});return c!==-1?e.tabs[c]:void 0},[a,e]),r=R.useCallback((n,i)=>{if(!(!n.collectionId||!i.collectionId||n.collectionId!==i.collectionId)&&!(!n.workflowId||!i.workflowId)){if(n.workflowId!==i.workflowId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&((fi(s,Ka.Workflow)||fi(s,Ka.WorkflowRun))&&s.workflowId===n.workflowId&&o.data.workflowId.set(i.workflowId),fi(s,Ka.Step)&&o.data.workflowId.set(i.workflowId))});return}if(!(!n.stepId||!i.stepId)&&n.stepId!==i.stepId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&fi(s,Ka.Step)&&s.workflowId===n.workflowId&&s.stepId===n.stepId&&o.data.stepId.set(i.stepId)});return}}},[e]);return{tabs:e.tabs,activeTabIdx:e.activeTabIdx,getExistingTabIndex:a,getExistingTab:t,handleIdChange:r}}function fi(e,a){return e.type===a}const _M=oSe({});let sSe=null;function lSe(e){sSe!==e&&(sSe=e,_M.configure({validate:!0,schemas:[{uri:"stub://test",fileMatch:["*"],schema:e}]}))}function cSe(e){const a=TM.create("stub.json","json",0,e),t=_M.parseJSONDocument(a);return{textDoc:a,jsonDoc:t}}const uSe=Ai.define({create(){},update(e){return e}}),dSe=e=>e.field(uSe,!1),Zzt=({store:e,isResponse:a,apiOperation:t})=>{const r=A$(e).data.get();let n=t?.body?.mediaTypes?.[Lo.JSON]?.schema;if(fi(r,Ka.Step)&&a){const i=r.response?.status;i&&(n=t?.responses?.[i]?.mediaTypes?.[Lo.JSON]?.schema)}return[uSe.init(()=>({schema:Bd(n||{}),store:e}))]};function Qzt(){return async e=>{const{schema:a}=dSe(e.state)||{};if(!a)return[];lSe(a);const t=e.state.doc,{textDoc:r,jsonDoc:n}=cSe(t.toString());return(await _M.doValidation(r,n))?.map(i=>({from:ND(t,i.range.start),to:ND(t,i.range.end),message:i.message,severity:eSt[i.severity||3]}))}}const Xzt=wu.highest(nb.of([{key:"Tab",run:e=>D0e(e)}]));function Yzt(){return async function(e){const a={from:e.pos,to:e.pos,options:[],filter:!1},{schema:t}=dSe(e.state)||{};if(!t)return a;lSe(t);const r=e.state.doc,n=ND.bind(null,r),{textDoc:i,jsonDoc:o}=cSe(r.toString()),s=e.state.doc.lineAt(e.pos),l=s.number-1,c=e.pos-s.from,u=await _M.doComplete(i,{line:l,character:c},o);if(!u)return a;const d=e.state.sliceDoc(s.from,e.pos);if(d.trim().endsWith(",")||aSt(d))return a;a.options=u.items.map(g=>({label:g.label,info:g.documentation,apply:b=>{if(!g.textEdit||!("range"in g.textEdit))return;const y=g.textEdit.range,v=g.textEdit.newText.search(/(\$1|\${1:.*?})/);let k=g.textEdit.newText.replace(/(\$1|\${1:.*?})/,"");const z=v===-1?0:v-k.length;b.dispatch({changes:{from:n(y.start),to:n(y.end),insert:k}});const C=k.length-(y.end.character-y.start.character);b.dispatch({selection:oa.single(n(y.end)+C+z)})}}))||[];const p=e.state.wordAt(e.pos),m=p?.from?e.state.sliceDoc(p?.from,p?.to).toLowerCase():"";return m&&(a.options=a.options.filter(g=>g.label.toLowerCase().replace(/^"/,"").startsWith(m))),a}}const eSt={1:"error",2:"warning",3:"info",4:"hint"};function ND(e,a){return e.line(a.line+1).from+a.character}function aSt(e){try{return JSON.parse(`{${e}}`),!0}catch{return!1}}const pSe=ht.define();function Sb(e){const a=e.activeEnvironmentId.get();return e.environments.find(t=>t.name.get()===a)?.get()||e.environments[0].get()}const DD=e=>wn.fromClass(class{decorations;constructor(a){this.decorations=this.buildDecorations(a,e)}update(a){(a.docChanged||a.viewportChanged)&&(this.decorations=this.buildDecorations(a.view,e))}buildDecorations(a,t){const r=Sb(t.store)?.inputs,n=[],i=Na.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),o=s=>Na.mark({attributes:{style:`color: var(--replay-${s?"undefined":"defined"}-variable-color); background-color: var(--replay-${s?"undefined":"defined"}-variable-bg-color);`}});for(const{from:s,to:l}of a.visibleRanges){const c=a.state.doc.sliceString(s,l),u=PA(c);for(const d of u){const p=s+d.start,m=s+d.end;if(!(p>=m))if(d.prefix==="inputs"){const g=dL(d.match),b=!r?.find(y=>y.name===g)?.value;n.push({from:p,to:m,value:o(b)})}else n.push({from:p,to:m,value:i})}}return Na.set(n,!0)}},{decorations:a=>a.decorations}),tSt=oSe({});function rSt(e){if(!e||typeof e!="object")return!1;const a=e;return typeof a.type=="string"&&typeof a.offset=="number"&&typeof a.length=="number"}function nSt(e){const a=[];if(!e)return a;const t=[e];for(;t.length>0;){const r=t.pop();if(r.type==="property"){r.valueNode&&t.push(r.valueNode);continue}if(r.type==="string"){const n=r.offset,i=r.offset+r.length;i>n&&a.push({from:n,to:i})}if(r.children&&r.children.length)for(const n of r.children)t.push(n)}return a}const iSt=e=>wn.fromClass(class{decorations;constructor(a){this.decorations=this.buildDecorations(a,e)}update(a){(a.docChanged||a.viewportChanged)&&(this.decorations=this.buildDecorations(a.view,e))}buildDecorations(a,t){const r=a.state.doc.toString();let n;try{const u=TM.create("inmemory://model.json","json",0,r),d=tSt.parseJSONDocument(u)?.root;n=rSt(d)?d:void 0}catch{n=void 0}const i=Sb(t.store)?.inputs,o=Na.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),s=u=>Na.mark({attributes:{style:`color: var(--replay-${u?"undefined":"defined"}-variable-color); background-color: var(--replay-${u?"undefined":"defined"}-variable-bg-color);`}}),l=[];if(!n)return Na.set([],!0);const c=nSt(n);for(const u of c){if(!a.visibleRanges.some(b=>Math.max(b.from,u.from)<Math.min(b.to,u.to))||!(r[u.from]==='"'&&r[u.to-1]==='"'))continue;const d=u.from+1,p=u.to-1;if(p<=d)continue;const m=a.state.doc.sliceString(d,p),g=PA(m);for(const b of g){const y=d+b.start,v=d+b.end;if(!(y>=v))if(b.prefix==="inputs"){const k=dL(b.match),z=!i?.find(C=>C.name===k)?.value;l.push({from:y,to:v,value:s(z)})}else l.push({from:y,to:v,value:o})}}return Na.set(l,!0)}},{decorations:a=>a.decorations}),Eu={[Lo.Text]:{name:"Text",extensions:[wa.lineWrapping],stateExtensions:[DD]},[Lo.JSON]:{name:"JSON",extensions:[cyt(),$0t(Qzt(),{delay:0,needsRefresh:e=>e.transactions.some(a=>a.effects.some(t=>t.is(pSe)))}),Z1e.data.of({autocomplete:Yzt()}),Xzt],stateExtensions:[Zzt,iSt]},[Lo.XML]:{name:"XML",extensions:[O0t()],stateExtensions:[DD]}},oSt={[Lo.Image]:{name:"Image",extensions:[],stateExtensions:[]}},sSt={[Lo.HTML]:{name:"HTML",extensions:[r0t()],stateExtensions:[DD]}},jh={...Eu,...oSt,...sSt},hSe={[Lo.FormData]:{name:"form-data",extensions:void 0},[Lo["application/x-www-form-urlencoded"]]:{name:"x-www-form-urlencoded",extensions:void 0}},mSe={[Lo.Binary]:{name:"Binary",extensions:void 0}},hf={...Eu,...hSe,...mSe},lSt=Object.keys(Eu),$D=Object.keys(hSe),fSe=Object.keys(mSe);function gSe(e=[],a){const t={};return e.forEach(r=>{const n=String(r[a]);t[n]||(t[n]=[]),t[n].push(r)}),t}const vx={active:!0,key:"",value:""};function Oh(e,a){return[...e.map(t=>({id:crypto.randomUUID(),key:t.name,value:a.initializeWithInputs?`$inputs.${t.name}`:t.example?String(t.example):"",active:a.initializeWithInputs?!0:!!t.example,in:t.in})),_n(a.in)]}function bx(e,a){const[t]=e.split("?"),r=a.slice(0,-1).filter(n=>n.active).map(n=>`${n.key}=${n.value}`).join("&");return`${t}${r?`?${r}`:""}`}function Ul(){return{id:crypto.randomUUID(),...vx}}function Ns(){return{id:crypto.randomUUID(),...vx,description:""}}function _n(e){return{...vx,id:crypto.randomUUID(),in:e}}function mf(){return{id:crypto.randomUUID(),...vx,type:"text",files:null}}function ID(){return{id:crypto.randomUUID(),...vx,sendIn:Co.URL}}function KD(e){return e.map(a=>({id:crypto.randomUUID(),key:"",value:a,active:!0}))}function LM(e,a){return e.filter(t=>t.active&&t.value).map(({value:t})=>(a?Br(t,a):t).trim())}function Ah(e,a){const t=a.filter(r=>!!r).flatMap(r=>r).filter(r=>r.key&&r.active);return["path","header"].includes(e)?Array.from(new Map(t.map(r=>[r.key,r])).values()):t}function vSe(e,a){return e.map(({value:t,...r})=>({...r,value:Br(t,a)}))}function cSt(e,a){if(!e.startsWith("$components.parameters."))return null;const t=e.replace("$components.parameters.","");return t&&a[t]||null}function Ln(e=[],a={}){const t=[];for(const r of e)if(qp(r)){const n=cSt(r.reference,a);n&&t.push({...n,active:r.active,value:r.value||n.value})}else t.push(r);return t}function Ph(e){return Object.entries(e).map(([a,t])=>({id:crypto.randomUUID(),key:"",value:a,active:!0,description:t}))}function uSt(e){return e.replace(/{/g,"{{").replace(/}/g,"}}")}const bSe={documentedOAuth2Types:[],grantType:We.ClientCredentials,authRequestExtraParams:[Ul()],tokenRequestExtraParams:[ID()],[We.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ns()],accessToken:""},[We.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ns()],accessToken:""},[We.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ns()],codeVerifier:"",codeChallenge:"",accessToken:""},[We.AuthorizationCodeWithPkce]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ns()],codeVerifier:"",codeChallenge:"",accessToken:""},[We.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ns()],accessToken:""},[We.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:"",scopes:[Ns()]}},dSt={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:tl.Header,name:"",key:""},[qe.OAuth2]:bSe,[qe.OpenIDConnect]:{...bSe,openIdConnectUrl:"",userInfoUrl:""}},VD="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",pSt={[Bo.SIMPLE]:{condition:"",type:Bo.SIMPLE},[Bo.REGEX]:{condition:"",type:Bo.REGEX,context:""},[Bo.JSONPATH]:{condition:"",type:Bo.JSONPATH,context:""},[Bo.XPATH]:{condition:"",type:Bo.XPATH,context:""}};function RM(){return structuredClone({type:Ji.Text,content:"",activeExampleName:"",formData:{"multipart/form-data":[mf()],"application/x-www-form-urlencoded":[mf()]},binary:null})}const hSt={method:"GET",url:"",security:[_u()],body:RM(),queryParameters:[Ul()],headers:[Ul()],cookies:[Ul()],pathParameters:[Ul()]};function ySe(){return structuredClone(hSt)}function _u(){return Bd(dSt)}function mSt(e){return Bd({id:crypto.randomUUID(),...pSt[e]})}function kSe(e,a,t){for(const r of t){const n=xSe(e,r),i=xSe(a,r);if(typeof n=="object"&&typeof i=="object"){if(!kSe(n,i,t))return!1}else if(n!==i)return!1}return!0}function xSe(e,a){const t=a.split("/");let r=e;for(const n of t)if(r&&typeof r=="object"&&n in r)r=r[n];else return;return r}function fSt(e,a){return e.length===a.length&&e.sort().join()===a.sort().join()}function gSt(e,a){return e.every(t=>a.includes(t))}function vSt(e){switch(e){case"query":return tl.Query;case"cookie":return tl.Cookie;case"header":return tl.Header;default:return}}function bSt(e,a,t){const{security:r}=a,n=Cut(e);if(!t)return!1;const i=HD(t),o=i.map(c=>c.securityType),s=r.map(c=>c.securityType);if(!fSt(o,s))return!0;let l=[];return r.forEach(c=>{const u=c.securityType,d=c[qe.OAuth2]?.grantType,p=o.includes(u),m=i.find(v=>v.securityType===u),g=!m||kSe(c,m,kSt(u,d)),b=ySt(c,u,c[qe.OAuth2]?.grantType,n),y=!!(p&&m&&g&&b);l.push(!t.security?.length||y)}),l.includes(!1)}function ySt(e,a,t,r){if(a===qe.OAuth2&&(t===We.AuthorizationCode||t===We.AuthorizationCodeWithPkce||t===We.Implicit)){const n=e[qe.OAuth2][t]?.availableScopes,i=LM(e[qe.OAuth2][t]?.scopes,r);return gSt(i,n)}return!0}function kSt(e,a){return e===qe.APIKey?[`${qe.APIKey}/name`,`${qe.APIKey}/location`]:e===qe.OAuth2?[`${qe.OAuth2}/grantType`,...xSt(a)]:e===qe.OpenIDConnect?[`${qe.OpenIDConnect}/openIdConnectUrl`]:[]}function xSt(e){return e===We.ClientCredentials?[`${qe.OAuth2}/${We.ClientCredentials}/tokenUrl`]:e===We.Password?[`${qe.OAuth2}/${We.Password}/tokenUrl`]:e===We.Implicit?[`${qe.OAuth2}/${We.Implicit}/authorizationUrl`]:e===We.AuthorizationCode?[`${qe.OAuth2}/${We.AuthorizationCode}/tokenUrl`,`${qe.OAuth2}/${We.AuthorizationCode}/authorizationUrl`]:e===We.AuthorizationCodeWithPkce?[`${qe.OAuth2}/${We.AuthorizationCodeWithPkce}/tokenUrl`,`${qe.OAuth2}/${We.AuthorizationCodeWithPkce}/authorizationUrl`]:[]}function wSt(e){return e.map(a=>{const t=a.map(r=>r.id).join("_");return a.map(r=>({...r,schemeId:t}))})}function zSt(e){const a=e.security||[],t=a.map(r=>{let n="";const i=[];return r.forEach((o,s)=>{n=s===0?`${o.id}`:`${n}_${o.id}`,i.push(FD(o))}),{id:n,security:i}});return a.length?t:[]}function SSt(e,a){const t=e.security||[];return t?.length?CSe(t).map((r,n)=>FD(r)):[]}function HD(e){const a=(e.security||[])[0];return a?a.map(t=>FD(t)):[_u()]}function FD(e,a){const t={..._u(),securitySchemeId:e.id},r=NM(e);t.securityType=r;const n=e.id;if(e.id&&r!==qe.NoAuth&&(t[r].schemeName=e.id),r===qe.BasicAuth&&(t[qe.BasicAuth].username||(t[qe.BasicAuth].username=yn(n+tt.Username)),t[qe.BasicAuth].password||(t[qe.BasicAuth].password=yn(n+tt.Password))),r===qe.DigestAuth&&(t[qe.DigestAuth].username||(t[qe.DigestAuth].username=yn(n+tt.Username)),t[qe.DigestAuth].password||(t[qe.DigestAuth].password=yn(n+tt.Password))),r===qe.JWT&&!t[qe.JWT].token&&(t[qe.JWT].token=yn(n+tt.JWTToken)),r===qe.APIKey&&!t[qe.APIKey].key){t[qe.APIKey].name=e.name||"",t[qe.APIKey].key=yn(n+tt.APIKey);const i=vSt(e.in);i&&(t[qe.APIKey].location=i)}if(r===qe.OAuth2){const i=JD(e),o=yn(n+tt.Token),s=t[qe.OAuth2];s.grantType=i[0],i.forEach(l=>{l===We.AuthorizationCode&&!s[We.AuthorizationCode].accessToken&&(s[We.AuthorizationCode].accessToken=o,s[We.AuthorizationCode].clientId=yn(n+tt.ClientId),s[We.AuthorizationCode].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[We.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[We.AuthorizationCode].clientSecret=yn(n+tt.ClientSecret),s[We.AuthorizationCode].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[We.AuthorizationCode].scopes=[...Ph(e.flows?.authorizationCode?.scopes||{})||[],Ns()]),l===We.AuthorizationCodeWithPkce&&!s[We.AuthorizationCodeWithPkce].accessToken&&(s[We.AuthorizationCodeWithPkce].accessToken=o,s[We.AuthorizationCodeWithPkce].clientId=yn(n+tt.ClientId),s[We.AuthorizationCodeWithPkce].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[We.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[We.AuthorizationCodeWithPkce].clientSecret=yn(n+tt.ClientSecret),s[We.AuthorizationCodeWithPkce].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[We.AuthorizationCodeWithPkce].scopes=[...Ph(e.flows?.authorizationCode?.scopes||{}),Ns()]),l===We.ClientCredentials&&!s[We.ClientCredentials].accessToken&&(s[We.ClientCredentials].accessToken=o,s[We.ClientCredentials].clientId=yn(n+tt.ClientId),s[We.ClientCredentials].clientSecret=yn(n+tt.ClientSecret),s[We.ClientCredentials].tokenUrl=e.flows?.clientCredentials?.tokenUrl||"",s[We.ClientCredentials].scopes=[...Ph(e.flows?.clientCredentials?.scopes||{}),Ns()]),l===We.ClientCredentialsWithJwtAssertion&&!s[We.ClientCredentialsWithJwtAssertion].accessToken&&(s[We.ClientCredentialsWithJwtAssertion].accessToken=o,s[We.ClientCredentialsWithJwtAssertion].clientId=yn(n+tt.ClientId),s[We.ClientCredentialsWithJwtAssertion].clientAssertion=yn(n+tt.ClientAssertion),s[We.ClientCredentialsWithJwtAssertion].scopes=[...Ph(e.flows?.clientCredentials?.scopes||{}),Ns()]),l===We.Implicit&&!s[We.Implicit].accessToken&&(s[We.Implicit].accessToken=o,s[We.Implicit].clientId=yn(n+tt.ClientId),s[We.Implicit].authorizationUrl=e.flows?.implicit?.authorizationUrl||"",s[We.Implicit].availableScopes=Object.keys(e.flows?.implicit?.scopes||{})||[],s[We.Implicit].scopes=[...Ph(e.flows?.implicit?.scopes||{}),Ns()]),l===We.Password&&!s[We.Password].accessToken&&(s[We.Password].accessToken=o,s[We.Password].clientId=yn(n+tt.ClientId),s[We.Password].clientSecret=yn(n+tt.ClientSecret),s[We.Password].tokenUrl=e.flows?.password?.tokenUrl||"",s[We.Password].scopes=[...Ph(e.flows?.password?.scopes||{}),Ns()])})}if(r===qe.OpenIDConnect){const i=yn(n+tt.Token),o=t[qe.OpenIDConnect];o[We.AuthorizationCode].accessToken||(o[We.AuthorizationCode].accessToken=i,o[We.AuthorizationCode].clientId=yn(n+tt.ClientId),o[We.AuthorizationCode].clientSecret=yn(n+tt.ClientSecret),o[We.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[We.AuthorizationCodeWithPkce].accessToken||(o[We.AuthorizationCodeWithPkce].accessToken=i,o[We.AuthorizationCodeWithPkce].clientId=yn(n+tt.ClientId),o[We.AuthorizationCodeWithPkce].clientSecret=yn(n+tt.ClientSecret),o[We.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[We.Implicit].accessToken||(o[We.Implicit].accessToken=i,o[We.Implicit].clientId=yn(n+tt.ClientId))}return t}function CSt(e,a="",t){const r=gSe(e.parameters,"in"),n=wSe(e),i=HD(e),o=Oh(r.query||[],{in:"query"});return{id:crypto.randomUUID(),name:e.name,operationId:e.operationId,collectionPath:t,apiPath:{path:e.path,method:e.method},apiId:a,request:{pathParameters:Oh(r.path||[],{in:"path"}),method:e.method.toLocaleUpperCase(),url:bx(uSt(e.path),o),headers:Oh(r.header||[],{in:"header"}),queryParameters:o,cookies:Oh(r.cookie||[],{in:"cookie"}),body:n,security:i},response:null}}function GD(e){const a=gSe(e.parameters,"in"),t=wSe(e),r=HD(e);return{parameters:{queryParameters:Oh(a.query||[],{in:"query"}),headers:Oh(a.header||[],{in:"header"}),cookies:Oh(a.cookie||[],{in:"cookie"}),pathParameters:Oh(a.path||[],{initializeWithInputs:!0,in:"path"})},requestBody:t,security:r}}function wSe(e){const a=e.body?.mediaTypes;if(!a||!Object.keys(a).length)return RM();const t=jSt(a,e),r=t?.name||"",n=!$D.includes(r)&&!fSe.includes(r),i=qD(t),o=n&&i.length?JSON.stringify(i.find(({key:s})=>s===e.body?.activeExampleName)?.value,null,2)||JSON.stringify(i[0].value,null,2):"";return{...RM(),activeExampleName:e.body?.activeExampleName||i[0]?.key||"",...t&&{type:t.name},content:o,formData:{"multipart/form-data":SSe(a[Lo.FormData]),"application/x-www-form-urlencoded":SSe(a[Lo["application/x-www-form-urlencoded"]])}}}function zSe(e){return e?{...(Object.keys(e?.body?.mediaTypes||{})||[]).reduce((a,t)=>(a[t]={name:t,extensions:void 0},a),{}),...hf}:hf}function SSe(e){if(!e)return[mf()];if(!e.parameters)return[mf()];const a=e.parameters.map(t=>({id:crypto.randomUUID(),key:t.name,value:String(t.example)||"",active:!0,type:t.inputType,files:null}));return a.push(mf()),a}function qD(e){const a=e?.examples;return Object.keys(a||{}).map(t=>{const r=a?.[t];return{name:nm(r?.summary)?r?.summary:r?.summary?.raw||t,key:t,value:a?.[t].value}})}function jSt(e,a){const t=zSe(a),r=Object.keys(e).find(n=>!!t[n]);return r?e[r]:null}function OSt(e){return!e?.security?.length||!e?[]:SSt(e)}function CSe(e){const a=new Set;return e.flat().filter(t=>a.has(t.id)?!1:(a.add(t.id),!0))}function NM(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 ASt(e,a){if(e==="clientCredentials"&&a&&"x-assertionType"in a&&a["x-assertionType"]===VD)return We.ClientCredentialsWithJwtAssertion;if(e==="authorizationCode"&&a&&"x-usePkce"in a&&a["x-usePkce"])return We.AuthorizationCodeWithPkce;switch(e){case"implicit":return We.Implicit;case"password":return We.Password;case"clientCredentials":return We.ClientCredentials;case"authorizationCode":return We.AuthorizationCode;default:return We.AuthorizationCode}}function PSt(e,a){const t=e?.security;if(!t?.length)return[];const r=wSt(t).flat().filter(n=>n.schemeId===a).find(n=>NM(n)===qe.OAuth2);return JD(r)}function JD(e){return Object.entries(e?.flows||{}).map(([a,t])=>ASt(a,t)).filter(Boolean)}async function yx(e){try{const a=await Rmt(e),t=await xbe(e);return{absolutePath:e,file:new File([a],t)}}catch(a){return console.error("Failed to init replay file",a),null}}async function jSe(e){return(await Promise.allSettled(e.map(a=>yx(a)))).map(a=>a.status==="fulfilled"?a.value:null).filter(a=>a!==null)}async function MSt(e,a,t,r,n,i){const o=await Promise.all(e.sourceDescriptions.map(async l=>({name:l.name,url:l.url,type:l.type,apiId:await TSt({projectPath:r,apiUrl:l.url,collectionId:a})}))),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:a,srcType:t,state:sr.Normal,sourceDescriptions:o,components:s,workflows:await Promise.all(e.workflows.map(async l=>({...l,state:sr.Normal,parameters:NSe(l.parameters,l["x-replay-disabled-parameters"],e.components?.parameters),outputs:LSe(l.outputs),security:BSe(l["x-security"]),steps:await Promise.all(l.steps.map(async c=>{const u=NSe(c.parameters,c["x-replay-disabled-parameters"],e.components?.parameters),d=c["x-operation"]??null;d&&(d.url=bx(d.url,u.queryParameters.filter(Vre)));const p=BSt(c,o,n);let m;if(p&&i){const b=n?.find(y=>y.id===p.apiId);m=i(p.path,p.method,b)}delete c.operationId,delete c["x-operation"];const g=await DSt(c.requestBody,r);return{...c,state:sr.Normal,parameters:u,outputs:LSe(c.outputs),successCriteria:c.successCriteria?.map(b=>({...b,type:b.type??Bo.SIMPLE}))||[],requestBody:g,xOperation:d,security:BSe(c["x-security"],m),operation:p}}))})))}}async function TSt({projectPath:e,apiUrl:a,collectionId:t}){if(bbe(a))return a;if(await Hn.isAbsolute(a))return await Hn.relative(e,a);const r=await Hn.resolve(await Hn.join(e,t,"..",a));return await Hn.relative(e,r)}function BSt(e,a,t){if(e["x-operation"])return null;const{path:r,method:n,apiId:i}=ASe({operationPath:e.operationPath,parsedSourceDescriptions:a}),{operationId:o,apiId:s}=ESt({operationId:e.operationId,parsedSourceDescriptions:a}),l=s||i||a[0]?.apiId||"",c=t?.find(u=>u.id===l);if(o&&c&&!r&&!n){const u=ISt(o,c);return{apiId:l,path:u?.path??"",method:u?.method??"",operationId:o}}return{apiId:l,path:r??"",method:n??"",operationId:o}}function ESt({operationId:e,parsedSourceDescriptions:a}){if(!e)return{operationId:"",apiId:null};const t=e.split(".");if(t.length===1)return{operationId:e,apiId:a[0]?.apiId??""};const[,r,n=""]=t,i=a.find(({name:o})=>o===r);return{operationId:n,apiId:i?.apiId??""}}function OSe(e){return"reference"in e&&typeof e.reference=="string"}function ASe({operationPath:e,parsedSourceDescriptions:a}){if(!e)return{apiId:null,path:"",method:""};try{const t=e.split("#"),r=t.length>1?t[1]:t[0],n=t.length>1?t[0]:"";if(!r)return{path:"",method:"",apiId:null};let i=null,o=null;const s=/\$sourceDescriptions\.(.+)\.url/,l=n.match(s);if(l&&(i=l[1]),i){const d=a.find(({name:p})=>p===i);d&&(o=d.apiId)}const c=r.split("/"),u=c.pop()||"";return{path:Di.unescape(c.pop()||""),method:u.toLowerCase(),apiId:o}}catch{return{path:"",method:"",apiId:null}}}function _St(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 PSe(e,a){const t={clientCredentials:We.ClientCredentials,authorizationCode:We.AuthorizationCode,implicit:We.Implicit,password:We.Password,clientCredentialsWithJwtAssertion:We.ClientCredentialsWithJwtAssertion,authorizationCodeWithPkce:We.AuthorizationCodeWithPkce};return e==="clientCredentials"&&a["x-assertionType"]==="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"?We.ClientCredentialsWithJwtAssertion:e==="authorizationCode"&&a["x-usePkce"]?We.AuthorizationCodeWithPkce:t[e]??null}function LSt(e){return{query:tl.Query,header:tl.Header,cookie:tl.Cookie}[e.toLowerCase()]||tl.Header}function RSt(e){return{body:Co.Body,header:Co.Header,url:Co.URL}[e.toLowerCase()]||Co.URL}function MSe(e,a,t){return Object.keys(e).reduce((r,n)=>{const i=PSe(n,e[n]);if(!i)return r;switch(i){case We.ClientCredentials:r[i]={...t[i],clientId:a.clientId??"",clientSecret:a.clientSecret??"",clientAssertion:a.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:ff(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.AuthorizationCode:r[i]={...t[i],clientId:a.clientId??"",clientSecret:a.clientSecret??"",tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:e[n].availableScopes??[],scopes:ff(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.Implicit:r[i]={...t[i],clientId:a.clientId??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:ff(e[n].availableScopes),scopes:ff(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.Password:r[i]={...t[i],tokenUrl:e[n].tokenUrl??"",username:a.username??"",password:a.password??"",clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break;case We.ClientCredentialsWithJwtAssertion:r[i]={...t[i],clientAssertion:a.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:ff(e[n].scopes,e[n]["x-replay-disabled-scopes"]),clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break;case We.AuthorizationCodeWithPkce:r[i]={...t[i],tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:ff(e[n].availableScopes),scopes:ff(e[n].scopes,e[n]["x-replay-disabled-scopes"]),codeVerifier:a.codeVerifier??"",codeChallenge:a.codeChallenge??"",clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break}return r},t)}function TSe(e,a,t){const r={..._u(),securityType:e},n=Object.keys(a.flows||{})[0],i=PSe(n,a.flows?.[n])??We.ClientCredentials;switch(e){case qe.BasicAuth:return{...r,[qe.BasicAuth]:{username:t.username,password:t.password,schemeName:a.id}};case qe.JWT:return{...r,[qe.JWT]:{token:t.token,schemeName:a.id}};case qe.DigestAuth:return{...r,[qe.DigestAuth]:{...r[qe.DigestAuth],username:t.username,password:t.password,schemeName:a.id}};case qe.APIKey:return{...r,[qe.APIKey]:{location:LSt(a.in),name:a.name,key:t.apiKey,schemeName:a.id}};case qe.OAuth2:return{...r,[qe.OAuth2]:{...r[qe.OAuth2],...MSe(a.flows||{},t||{},r[qe.OAuth2]),authRequestExtraParams:ESe(t.authRequestExtraParams),tokenRequestExtraParams:_Se(t.tokenRequestExtraParams),grantType:i,schemeName:a.id}};case qe.OpenIDConnect:return{...r,[qe.OpenIDConnect]:{...r[qe.OpenIDConnect],...MSe(t.flows||{},t||{},r[qe.OpenIDConnect]),openIdConnectUrl:t.openIdConnectUrl,userInfoUrl:t.userInfoUrl,authRequestExtraParams:ESe(t.authRequestExtraParams),tokenRequestExtraParams:_Se(t.tokenRequestExtraParams),grantType:i,schemeName:a.id}};default:return r}}function NSt(e,a){return[...e.map(t=>{if("scheme"in t){const n=_St(t.scheme);return TSe(n,t.scheme,t.values)}const r=a.find(n=>n.id===t.schemeName);if(r){const n=NM(r),i=TSe(n,r,t.values);return i.securitySchemeId=r.id,i}return _u()})]}function BSe(e=[],a){const t=CSe(a?.security||[]);return e.length?NSt(e,t):[_u()]}function ff(e,a){const t=Ph(e||{}),r=Ph(a||{});return[...t,...r,Ns()]}function ESe(e){return(e||[]).map(a=>({id:crypto.randomUUID(),key:a.key??"",value:a.value??"",active:a.active??!0})).concat(Ul())}function _Se(e){return(e||[]).map(a=>({id:crypto.randomUUID(),key:a.key??"",value:a.value??"",active:a.active??!0,sendIn:RSt(a.in)})).concat(ID())}function LSe(e){if(!e)return[Ul()];const a=[];for(const t in e)a.push({id:crypto.randomUUID(),key:t,value:e[t],active:!0});return a.push(Ul()),a}const DM={query:"queryParameters",path:"pathParameters",header:"headers",cookie:"cookies"};function RSe(e,a){const t="$components.parameters.";if(e.reference.startsWith(t)){const r=e.reference.replace(t,"");return a?.[r]}}function NSe(e,a,t){if(!e&&!a)return{pathParameters:[_n("path")],queryParameters:[_n("query")],headers:[_n("header")],cookies:[_n("cookie")]};const r={pathParameters:[],queryParameters:[],headers:[],cookies:[]};if(e)for(const n of e)if(OSe(n)){const i=RSe(n,t),o=DM[i?.in];o&&r[o].push({reference:n.reference,active:!0,value:n.value})}else r[DM[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!0,in:n.in});if(a)for(const n of a)if(OSe(n)){const i=RSe(n,t),o=DM[i?.in];o&&r[o].push({reference:n.reference,active:!1,value:n.value})}else r[DM[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!1,in:n.in});return r.pathParameters.push(_n("path")),r.queryParameters.push(_n("query")),r.headers.push(_n("header")),r.cookies.push(_n("cookie")),r}async function DSt(e,a){const t=ySe().body;if(!e)return t;switch(e.contentType){case"application/x-www-form-urlencoded":case"multipart/form-data":return{...t,type:e.contentType,formData:await $St(e,a)};case"application/octet-stream":const r=e.payload?await ISe(e.payload,a):[],n=r.length>0?await yx(r[0]):null;return{...t,type:e.contentType,binary:n};case"application/json":case"application/ld+json":return{...t,type:e.contentType,content:$Se(e.payload)};default:{const i=typeof e.payload=="string",o=e.contentType||(i?"text/plain":"application/json");return{...t,type:o,content:i?e.payload:$Se(e.payload)}}}}async function DSe(e,a,t,r){const n=await ISe(a,r),i=n.length>0||Array.isArray(a),o=i?await jSe(n):void 0;return{id:crypto.randomUUID(),key:e,value:i?"":a,type:i?"file":"text",active:t,files:o}}async function $St(e,a){const t=ySe().body.formData,r=e.contentType,n=e.payload?await Promise.all(Object.entries(e.payload).map(([o,s])=>DSe(o,s,!0,a))):[],i=e["x-replay-disabled-payload"]?await Promise.all(Object.entries(e["x-replay-disabled-payload"]||{}).map(([o,s])=>DSe(o,s,!1,a))):[];return{...t,[r]:[...n,...i,mf()]}}function $Se(e){return e?JSON.stringify(e,null,2):""}function ISt(e,a){for(const t of Object.keys(a.paths)){const r=a.paths[t];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:t}}}return null}async function ISe(e,a){return Array.isArray(e)?(await Promise.all(e.map(t=>KSe(t,a)))).flat():typeof e=="string"?await KSe(e,a):[]}async function KSe(e,a){const t=/\$file\(['"](.+?)['"]\)/g,r=Array.from(e.matchAll(t));return Promise.all(r.map(n=>KSt(n[1],a)))}async function KSt(e,a){return await Hn.isAbsolute(e)?e:await Hn.resolve(await Hn.join(a,e))}const ps=e=>!e||typeof e=="boolean"?{type:"object",properties:{}}:e.type?e:{...e,type:"object"},VSe=(e,a,t)=>{if(!e.properties)return e;const r=e.properties[a],n=ps(r);return{...e,properties:{...e.properties,[a]:{...n,...t}}}},VSt=(e,a,t)=>{if(!e.properties||a===t||!t.trim())return null;const r={...e.properties};return r[t]?null:(r[t]=r[a],delete r[a],{...e,properties:r})},HSt=(e,a)=>{if(!e.properties)return e;const t={...e.properties};return delete t[a],{...e,properties:t}},FSt=(e,a,t={type:"string"})=>{const r=e.properties||{};return{...e,type:"object",properties:{...r,[a]:t}}};function HSe(e){const a=Object.assign({},...(e||[]).filter(({key:t,active:r})=>t&&r).map(t=>({[t.key]:t.value})));if(Object.keys(a).length!==0)return a}function FSe(e){if(!e)return{};const a={queryParameters:"query",headers:"header",cookies:"cookie",pathParameters:"path"},t=[],r=[];return Object.keys(a).forEach(n=>{const i=n;e[i].forEach(o=>{if(qp(o)){const s={reference:o.reference,value:o.value||void 0};o.active?t.push(s):r.push(s)}else{if(!o.key)return;const s={name:o.key,in:a[i],value:o.value};o.active?t.push(s):r.push(s)}})}),{parameters:t.length>0?t:void 0,"x-replay-disabled-parameters":r.length>0?r:void 0}}function GSt(e){const a=e?.map(t=>({condition:t.condition,context:t.context,type:t.type==Bo.SIMPLE?void 0:t.type}));if(a?.length!==0)return a}function qSt(e){if(!(!e||e.length===0))return[...e]}async function GSe(e,a){return e.absolutePath?`$file('${await Hn.relative(a,e.absolutePath)}')`:null}async function JSt(e,a){const{type:t,value:r,files:n}=e;switch(t){case"text":return r;case"file":let i=[];return n&&(i=(await Promise.all(Object.values(n).map(o=>GSe(o,a)))).filter(o=>o!==null)),i.length===0?"":i.length===1?i[0]:i}}async function USt(e,a){const t=e.type,r=e.formData[t],n={},i={};return await Promise.all(r.map(async o=>{const{key:s,active:l}=o;if(!s)return;const c=await JSt(o,a);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 WSt(e){if(!e)return e;try{const a=JSON.parse(e);return typeof a=="object"?a:e}catch{return e}}async function ZSt(e,a){if(e)switch(e.type){case"application/x-www-form-urlencoded":case"multipart/form-data":return{contentType:e.type,...await USt(e,a)};case"application/octet-stream":return{contentType:e.type,payload:e.binary?await GSe(e.binary,a):null};case"application/json":case"application/ld+json":return e.content?{contentType:e.type,payload:WSt(e.content)}:void 0;default:return e.content?{contentType:e.type,payload:e.content}:void 0}}function QSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"basic"}},values:{username:e.username,password:e.password}}}function XSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"apiKey",name:e.name,in:e.location.toLowerCase()}},values:{apiKey:e.key}}}function YSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"bearer"}},values:{token:e.token}}}function e2t(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"digest"}},values:{username:e.username,password:e.password}}}function a2t(e){const{flows:a,values:t}=USe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"openIdConnect",flows:a}},values:{...t,openIdConnectUrl:e.openIdConnectUrl,userInfoUrl:e.userInfoUrl,authRequestExtraParams:qSe(e.authRequestExtraParams),tokenRequestExtraParams:JSe(e.tokenRequestExtraParams)}}}function t2t(e){const{flows:a,values:t}=USe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"oauth2",flows:a}},values:{...t,authRequestExtraParams:qSe(e.authRequestExtraParams),tokenRequestExtraParams:JSe(e.tokenRequestExtraParams)}}}function Cb(e){const a={},t={};return e.forEach(r=>{r.value&&(r.active?a[r.value]=r.description:t[r.value]=r.description)}),{scopes:a,"x-replay-disabled-scopes":Object.keys(t).length>0?t:void 0}}function qSe(e){return e.filter(a=>a.value||a.key).map(a=>({key:a.key,value:a.value,active:a.active}))}function JSe(e){return e.filter(a=>a.value||a.key).map(a=>({key:a.key,value:a.value,active:a.active,in:a.sendIn.toLowerCase()}))}function USe(e){let a;switch(e.grantType){case We.ClientCredentials:return a=e[We.ClientCredentials],{flows:{clientCredentials:{tokenUrl:a.tokenUrl,...Cb(a.scopes)}},values:{clientId:a.clientId,clientSecret:a.clientSecret,accessToken:a.accessToken}};case We.Implicit:return a=e[We.Implicit],{flows:{implicit:{authorizationUrl:a.authorizationUrl,...Cb(a.scopes)}},values:{clientId:a.clientId,accessToken:a.accessToken,callbackUrl:a.callbackUrl}};case We.Password:return a=e[We.Password],{flows:{password:{tokenUrl:a.tokenUrl,...Cb(a.scopes)}},values:{clientId:a.clientId,clientSecret:a.clientSecret,username:a.username,password:a.password,accessToken:a.accessToken}};case We.AuthorizationCode:return a=e[We.AuthorizationCode],{flows:{authorizationCode:{tokenUrl:a.tokenUrl,authorizationUrl:a.authorizationUrl,...Cb(a.scopes)}},values:{accessToken:a.accessToken,clientId:a.clientId,callbackUrl:a.callbackUrl}};case We.ClientCredentialsWithJwtAssertion:return a=e[We.ClientCredentialsWithJwtAssertion],{flows:{clientCredentials:{tokenUrl:a.tokenUrl,...Cb(a.scopes),"x-assertionType":"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}},values:{clientId:a.clientId,clientAssertion:a.clientAssertion,accessToken:a.accessToken}};case We.AuthorizationCodeWithPkce:return a=e[We.AuthorizationCodeWithPkce],{flows:{authorizationCode:{tokenUrl:a.tokenUrl,authorizationUrl:a.authorizationUrl,...Cb(a.scopes),"x-usePkce":!0}},values:{clientId:a.clientId,clientSecret:a.clientSecret,accessToken:a.accessToken,codeVerifier:a.codeVerifier,codeChallenge:a.codeChallenge,callbackUrl:a.callbackUrl}}}}function WSe(e){const a=e.map(t=>{switch(t.securityType){case qe.OpenIDConnect:{const r=t[qe.OpenIDConnect];return a2t(r)}case qe.OAuth2:{const r=t[qe.OAuth2];return t2t(r)}case qe.APIKey:{const r=t[qe.APIKey];return XSt(r)}case qe.BasicAuth:{const r=t[qe.BasicAuth];return QSt(r)}case qe.DigestAuth:{const r=t[qe.DigestAuth];return e2t(r)}case qe.JWT:{const r=t[qe.JWT];return YSt(r)}default:return null}}).filter(t=>t!==null);return{"x-security":a.length?a:void 0}}function r2t(e){const{inputs:a,parameters:t,...r}=e;let n=r;return Object.keys(a).length&&(n.inputs=a),Object.keys(t).length&&(n.parameters=Object.fromEntries(Object.entries(t).map(([i,{id:o,active:s,key:l,...c}])=>[i,{...c,name:l}]))),Object.keys(n).length||(n=void 0),n}async function n2t(e,a){const{id:t,state:r,srcType:n,sourceDescriptions:i,workflows:o,components:s,...l}=e;return{arazzoObject:{...l,sourceDescriptions:i.map(c=>({name:c.name,url:c.url,type:c.type||"openapi"})),components:r2t(s),workflows:await Promise.all(o.map(async({parameters:c,security:u,dependsOn:d,outputs:p,state:m,steps:g,inputs:b,...y})=>({...y,dependsOn:qSt(d),outputs:HSe(p),inputs:b?ps(b):void 0,...WSe(u),...FSe(c),steps:await Promise.all(g.map(async({parameters:v,security:k,operation:z,requestBody:C,successCriteria:w,outputs:S,state:O,xOperation:A,...B})=>{const L={operationId:void 0,operationPath:void 0,"x-operation":void 0};if(z){const q=e.sourceDescriptions.find(({apiId:N})=>N===z.apiId)||e.sourceDescriptions[0];if(z.operationId){const N=e.sourceDescriptions.length<=1;L.operationId=N?z.operationId:`$sourceDescriptions.${q.name}.${z.operationId}`}else L.operationPath=`{$sourceDescriptions.${q.name}.url}#/paths/${Di.escape(z.path)}/${z.method}`}else A&&(L["x-operation"]={...A,url:A.url.split("?")[0]});return{...B,...L,...WSe(k),...FSe(v),requestBody:await ZSt(C,a),successCriteria:GSt(w),outputs:HSe(S)}}))})))}}}class i2t extends Obe{constructor(a,t){super(a),this.convertOperationToReplayValue=t}parse(a,t){return MSt(a.content,a.uri,a.type,this.storage.baseDir,t,this.convertOperationToReplayValue)}async stringify(a){const{arazzoObject:t}=await n2t(a,this.storage.baseDir);return await Hn.extname(a.id)===".json"?JSON.stringify(t,null,2):md.dump(t)}}class o2t{constructor(a,t){this.storage=a,this.localStorageSecretsProvider=t}default=[];async read(){const a=await this.storage.get("replay-environments.yaml"),t=await this.localStorageSecretsProvider.get();let r=null,n=null;if(!a)return this.default;try{r=md.load(a),n=t?JSON.parse(t):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:sr.Normal})):this.default}async write(a){const t=await this.localStorageSecretsProvider.get(),r=t?JSON.parse(t):{},n=a.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",md.dump(n))}}class s2t{constructor(a,t,r){this.storage=a,this.filePath=t,this.defaultValue=r}async parse(a){return JSON.parse(a)}stringify(a){return JSON.stringify(a)}async read(){const a=await this.storage.get(this.filePath);return a?await this.parse(a):this.defaultValue}async write(a){return this.storage.set(this.filePath,this.stringify(a))}}const l2t=(e,a)=>({data:e,version:a});class UD extends s2t{constructor(a,t,r,n){super(a,t,r),this.version=n}migrationMap={};migrate(a){if(!this.migrationMap[a.version])return this.defaultValue;const t=this.migrationMap[a.version](a);return t.version===this.version?t:this.migrate(t)}async parse(a){const t=JSON.parse(a);if(t.version!==this.version){const r=this.migrate(t);return await this.write(r.data),r.data}return t.data}stringify(a){return JSON.stringify(l2t(a,this.version))}}function c2t(e){return{data:{...e.data,tabs:e.data.tabs.map(a=>a.data.type===Ka.Step?{...a,data:{...a.data,draftStep:{...a.data.step,security:a.data.step.security.securities},step:void 0,hasUnsavedChanges:void 0,showUnsavedChangesModal:void 0}}:a)},version:2}}const ZSe=2,u2t="tabs.json";class d2t extends UD{migrationMap={1:c2t};constructor(a){super(a,u2t,Bd(gbe),ZSe)}async parse(a){let t=JSON.parse(a);t.version!==ZSe&&(t=this.migrate(t));const r=await Promise.all(t.data.tabs.map(async n=>{if(n.data.type===Ka.Step&&n.data.draftStep){const i=n.data.draftStep.requestBody.formData;i["multipart/form-data"]=await QSe(i["multipart/form-data"]),i["application/x-www-form-urlencoded"]=await QSe(i["application/x-www-form-urlencoded"]),n.data.draftStep.requestBody.binary&&n.data.draftStep.requestBody.binary.absolutePath&&(n.data.draftStep.requestBody.binary=await yx(n.data.draftStep.requestBody.binary.absolutePath))}return n}));return{...t.data,tabs:r}}stringify(a){return super.stringify({...a,tabs:a.tabs.map(t=>t.data.type===Ka.Step?{...t,data:{...t.data,response:null}}:t.data.type===Ka.WorkflowRun?{...t,data:{...t.data,result:null}}:t)})}}async function QSe(e){return Promise.all(e.map(async a=>{const t={...a};if(a.files){const r=a.files.map(n=>n.absolutePath).filter(n=>n!==null);t.files=await jSe(r)}return t}))}const p2t=1,h2t=1;class m2t{constructor(a,t){this.project=a,this.convertOperationToReplayValue=t,this.localStorageSecretsProvider=new Imt(this.project.id),this.systemFilesStorage=this.isTauriApp?new jbe(this.project.systemFilesDir):new ybe(this.project.systemFilesDir),this.userFilesStorage=this.isTauriApp?new jbe(this.project.userFilesDir):new ybe(this.project.userFilesDir);const r=new Bmt;this.historyStorage=new UD(this.systemFilesStorage,"history.json",[],p2t),this.activeEnvironmentIdStorage=new UD(this.systemFilesStorage,"active_environment_id.json",C0,h2t),this.tabsStateStorage=new d2t(this.systemFilesStorage),this.environmentsStorage=new o2t(this.userFilesStorage,this.localStorageSecretsProvider),this.collectionsStorage=new i2t(this.userFilesStorage,this.convertOperationToReplayValue),this.apisStorage=new Kmt(this.isTauriApp?this.userFilesStorage:r)}historyStorage;activeEnvironmentIdStorage;tabsStateStorage;environmentsStorage;collectionsStorage;apisStorage;isTauriApp=Jv();systemFilesStorage;localStorageSecretsProvider;userFilesStorage;async detectProjectFiles(){const a=(await this.userFilesStorage.ls()).filter(i=>/\.(ya?ml|json)$/.test(i)),t=[],r=[],n=new Set;return await Promise.all(a.map(async i=>{const o=await this.userFilesStorage.get(i);if(o)try{const s=md.load(o);typeof s=="object"&&s!==null&&(typeof s.openapi=="string"?t.push({uri:i,type:gu.FS,content:s}):typeof s.arazzo=="string"&&(r.push({uri:i,type:gu.FS,content:s}),s.sourceDescriptions?.map(async l=>{const c=l.type,u=l.url,d=!c||c==="openapi",p=typeof u=="string"&&bbe(u);d&&p&&n.add(u)})))}catch(s){console.error(`Error parsing YAML/JSON file ${i}:`,s)}})),{apiFiles:t,collectionFiles:r,apiUrls:n}}async loadApis(a){const t=[];return await Promise.all(Array.from(a).map(async r=>{let n="";try{const i=await vu(ICe({proxyUrl:ube,resolvedUrl:r,ignoreProxy:this.isTauriApp}));n=await i.text(),i.ok||console.error(`Error fetching API from ${r}:`,i.status,n)}catch(i){console.error(`Error fetching API from ${r}:`,i)}try{const i=md.load(n);typeof i=="object"&&i!==null&&typeof i.openapi=="string"&&t.push({uri:r,type:gu.WEB,content:i})}catch(i){console.error(`Error parsing YAML from ${r}:`,i)}})),t}async read(){const[a,t,r,n]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]),{apiFiles:i,collectionFiles:o,apiUrls:s}=await this.detectProjectFiles(),l=await this.loadApis(s),c=await this.apisStorage.parseMany([...i,...l]),u=await this.collectionsStorage.parseMany(o,c);return{project:this.project,history:a,activeEnvironmentId:t,tabsState:r,environments:n,apis:c,collections:u}}async update(a,t){switch(a.path[0]){case"history":this.historyStorage.write(t.history.get());break;case"activeEnvironmentId":this.activeEnvironmentIdStorage.write(t.activeEnvironmentId.get());break;case"tabsState":this.tabsStateStorage.write(t.tabsState.get());break;case"environments":this.environmentsStorage.write(t.environments.get());break;case"apis":this.isTauriApp&&await this.apisStorage.update(a,t.apis.get());break;case"collections":await this.collectionsStorage.update(a,t.collections.get());break}}}function f2t(e=!1){let a,t=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async(n,i)=>{if(t||r.path.length>0)return{isInitialized:!1};if(t=!0,!e){a=new m2t(n,i);const o=await a.read();r.merge(o)}return t=!1,{isInitialized:!0}}}),onSet(r,n,i){t||e||a.update(n,i)}})}function g2t({defaultEnvironments:e}={}){return structuredClone({project:{id:"default",userFilesDir:"default",systemFilesDir:"default"},history:[],tabsState:Bd(gbe),activeEnvironmentId:C0,environments:e||fbe,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:fu.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const v2t=Kia(g2t(),Via(Omt({key:"replay-root-store"}),f2t())),XSe=R.createContext(v2t);function Ft(){const e=R.useContext(XSe);return Ire(e)}function b2t(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[]}}const y2t=b2t(),k2t=R.createContext(y2t);function Id(){const e=R.useContext(k2t);return Ire(e)}function x2t(e,a){const{apps:{apiId:t}}=Ft(),{corsProxyUrl:r,disableCollectionsTab:n,mockServer:i,oAuth2RedirectURI:o,certificates:s,storageKey:l,isApiBased:c}=Id();r.set(e?.corsProxyUrl??ube),i.set(e?.mockServer),t.set(e?.apiId),o.set(e?.oAuth2RedirectURI),n.set(!!e?.disableCollectionsTab),l.set(e?.storageKey),c.set(!!a),R.useEffect(()=>{s.set(e?.certificates||[])},[e?.certificates])}const YSe=R.createContext({});function kx(){return R.useContext(YSe)||{}}const w2t="0.18.0-next.12",z2t={version:w2t};class S2t{client;_isInitialized=!1;constructor(){this.client=new wmt}get isInitialized(){return this._isInitialized}init(a){if(this.isInitialized)return;const t={serviceName:"replay",serviceVersion:z2t.version,version:"1.0.0",tracerName:a?.tracerName||"desktop",collectorUrl:a?.collectorUrl||"",isProd:!0};this.client.init({otel:{...t,...a}}),this._isInitialized=!0}sendEvent(a,t){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{this.client.send(a,t)}catch(r){console.error("Failed to send telemetry event:",r)}}}const WD=new S2t;function Bt(){const{telemetry:e}=kx();return WD.isInitialized||WD.init({tracerName:e?.tracerName,collectorUrl:e?.collectorUrl}),{sendEvent:(a,t)=>{WD.sendEvent(a,t)}}}const Ro=800;function gf(e){"@babel/helpers - typeof";return gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},gf(e)}function C2t(e,a){if(gf(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,a);if(gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function e2e(e){var a=C2t(e,"string");return gf(a)=="symbol"?a:a+""}function xx(e,a,t){return(a=e2e(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function a2e(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ya(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?a2e(Object(t),!0).forEach(function(r){xx(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a2e(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function j2t(e){if(Array.isArray(e))return e}function O2t(e,a){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,n,i,o,s=[],l=!0,c=!1;try{if(i=(t=t.call(e)).next,a===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=i.call(t)).done)&&(s.push(r.value),s.length!==a);l=!0);}catch(u){c=!0,n=u}finally{try{if(!l&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw n}}return s}}function ZD(e,a){(a==null||a>e.length)&&(a=e.length);for(var t=0,r=Array(a);t<a;t++)r[t]=e[t];return r}function t2e(e,a){if(e){if(typeof e=="string")return ZD(e,a);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ZD(e,a):void 0}}function A2t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
11900
+ `};return szt(s.getText(),u,m).map(function(g){return $d.replace(lr.create(s.positionAt(g.offset),s.positionAt(g.offset+g.length)),g.content)})}}}function pf(){const{tabsState:e}=Ft(),a=R.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>e.tabs.findIndex(c=>{const u=c.data.get();return fi(u,n)?(!i||u.collectionId===i)&&(!o||u.workflowId===o)&&(!s||u.stepId===s)&&(!l||u.historyId===l):!1}),[e]),t=R.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>{const c=a({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l});return c!==-1?e.tabs[c]:void 0},[a,e]),r=R.useCallback((n,i)=>{if(!(!n.collectionId||!i.collectionId||n.collectionId!==i.collectionId)&&!(!n.workflowId||!i.workflowId)){if(n.workflowId!==i.workflowId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&((fi(s,Ka.Workflow)||fi(s,Ka.WorkflowRun))&&s.workflowId===n.workflowId&&o.data.workflowId.set(i.workflowId),fi(s,Ka.Step)&&o.data.workflowId.set(i.workflowId))});return}if(!(!n.stepId||!i.stepId)&&n.stepId!==i.stepId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&fi(s,Ka.Step)&&s.workflowId===n.workflowId&&s.stepId===n.stepId&&o.data.stepId.set(i.stepId)});return}}},[e]);return{tabs:e.tabs,activeTabIdx:e.activeTabIdx,getExistingTabIndex:a,getExistingTab:t,handleIdChange:r}}function fi(e,a){return e.type===a}const _M=oSe({});let sSe=null;function lSe(e){sSe!==e&&(sSe=e,_M.configure({validate:!0,schemas:[{uri:"stub://test",fileMatch:["*"],schema:e}]}))}function cSe(e){const a=TM.create("stub.json","json",0,e),t=_M.parseJSONDocument(a);return{textDoc:a,jsonDoc:t}}const uSe=Ai.define({create(){},update(e){return e}}),dSe=e=>e.field(uSe,!1),Zzt=({store:e,isResponse:a,apiOperation:t})=>{const r=A$(e).data.get();let n=t?.body?.mediaTypes?.[Lo.JSON]?.schema;if(fi(r,Ka.Step)&&a){const i=r.response?.status;i&&(n=t?.responses?.[i]?.mediaTypes?.[Lo.JSON]?.schema)}return[uSe.init(()=>({schema:Bd(n||{}),store:e}))]};function Qzt(){return async e=>{const{schema:a}=dSe(e.state)||{};if(!a)return[];lSe(a);const t=e.state.doc,{textDoc:r,jsonDoc:n}=cSe(t.toString());return(await _M.doValidation(r,n))?.map(i=>({from:ND(t,i.range.start),to:ND(t,i.range.end),message:i.message,severity:eSt[i.severity||3]}))}}const Xzt=wu.highest(nb.of([{key:"Tab",run:e=>D0e(e)}]));function Yzt(){return async function(e){const a={from:e.pos,to:e.pos,options:[],filter:!1},{schema:t}=dSe(e.state)||{};if(!t)return a;lSe(t);const r=e.state.doc,n=ND.bind(null,r),{textDoc:i,jsonDoc:o}=cSe(r.toString()),s=e.state.doc.lineAt(e.pos),l=s.number-1,c=e.pos-s.from,u=await _M.doComplete(i,{line:l,character:c},o);if(!u)return a;const d=e.state.sliceDoc(s.from,e.pos);if(d.trim().endsWith(",")||aSt(d))return a;a.options=u.items.map(g=>({label:g.label,info:g.documentation,apply:b=>{if(!g.textEdit||!("range"in g.textEdit))return;const y=g.textEdit.range,v=g.textEdit.newText.search(/(\$1|\${1:.*?})/);let k=g.textEdit.newText.replace(/(\$1|\${1:.*?})/,"");const z=v===-1?0:v-k.length;b.dispatch({changes:{from:n(y.start),to:n(y.end),insert:k}});const C=k.length-(y.end.character-y.start.character);b.dispatch({selection:oa.single(n(y.end)+C+z)})}}))||[];const p=e.state.wordAt(e.pos),m=p?.from?e.state.sliceDoc(p?.from,p?.to).toLowerCase():"";return m&&(a.options=a.options.filter(g=>g.label.toLowerCase().replace(/^"/,"").startsWith(m))),a}}const eSt={1:"error",2:"warning",3:"info",4:"hint"};function ND(e,a){return e.line(a.line+1).from+a.character}function aSt(e){try{return JSON.parse(`{${e}}`),!0}catch{return!1}}const pSe=ht.define();function Sb(e){const a=e.activeEnvironmentId.get();return e.environments.find(t=>t.name.get()===a)?.get()||e.environments[0].get()}const DD=e=>wn.fromClass(class{decorations;constructor(a){this.decorations=this.buildDecorations(a,e)}update(a){(a.docChanged||a.viewportChanged)&&(this.decorations=this.buildDecorations(a.view,e))}buildDecorations(a,t){const r=Sb(t.store)?.inputs,n=[],i=Na.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),o=s=>Na.mark({attributes:{style:`color: var(--replay-${s?"undefined":"defined"}-variable-color); background-color: var(--replay-${s?"undefined":"defined"}-variable-bg-color);`}});for(const{from:s,to:l}of a.visibleRanges){const c=a.state.doc.sliceString(s,l),u=PA(c);for(const d of u){const p=s+d.start,m=s+d.end;if(!(p>=m))if(d.prefix==="inputs"){const g=dL(d.match),b=!r?.find(y=>y.name===g)?.value;n.push({from:p,to:m,value:o(b)})}else n.push({from:p,to:m,value:i})}}return Na.set(n,!0)}},{decorations:a=>a.decorations}),tSt=oSe({});function rSt(e){if(!e||typeof e!="object")return!1;const a=e;return typeof a.type=="string"&&typeof a.offset=="number"&&typeof a.length=="number"}function nSt(e){const a=[];if(!e)return a;const t=[e];for(;t.length>0;){const r=t.pop();if(r.type==="property"){r.valueNode&&t.push(r.valueNode);continue}if(r.type==="string"){const n=r.offset,i=r.offset+r.length;i>n&&a.push({from:n,to:i})}if(r.children&&r.children.length)for(const n of r.children)t.push(n)}return a}const iSt=e=>wn.fromClass(class{decorations;constructor(a){this.decorations=this.buildDecorations(a,e)}update(a){(a.docChanged||a.viewportChanged)&&(this.decorations=this.buildDecorations(a.view,e))}buildDecorations(a,t){const r=a.state.doc.toString();let n;try{const u=TM.create("inmemory://model.json","json",0,r),d=tSt.parseJSONDocument(u)?.root;n=rSt(d)?d:void 0}catch{n=void 0}const i=Sb(t.store)?.inputs,o=Na.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),s=u=>Na.mark({attributes:{style:`color: var(--replay-${u?"undefined":"defined"}-variable-color); background-color: var(--replay-${u?"undefined":"defined"}-variable-bg-color);`}}),l=[];if(!n)return Na.set([],!0);const c=nSt(n);for(const u of c){if(!a.visibleRanges.some(b=>Math.max(b.from,u.from)<Math.min(b.to,u.to))||!(r[u.from]==='"'&&r[u.to-1]==='"'))continue;const d=u.from+1,p=u.to-1;if(p<=d)continue;const m=a.state.doc.sliceString(d,p),g=PA(m);for(const b of g){const y=d+b.start,v=d+b.end;if(!(y>=v))if(b.prefix==="inputs"){const k=dL(b.match),z=!i?.find(C=>C.name===k)?.value;l.push({from:y,to:v,value:s(z)})}else l.push({from:y,to:v,value:o})}}return Na.set(l,!0)}},{decorations:a=>a.decorations}),Eu={[Lo.Text]:{name:"Text",extensions:[wa.lineWrapping],stateExtensions:[DD]},[Lo.JSON]:{name:"JSON",extensions:[cyt(),$0t(Qzt(),{delay:0,needsRefresh:e=>e.transactions.some(a=>a.effects.some(t=>t.is(pSe)))}),Z1e.data.of({autocomplete:Yzt()}),Xzt],stateExtensions:[Zzt,iSt]},[Lo.XML]:{name:"XML",extensions:[O0t()],stateExtensions:[DD]}},oSt={[Lo.Image]:{name:"Image",extensions:[],stateExtensions:[]}},sSt={[Lo.HTML]:{name:"HTML",extensions:[r0t()],stateExtensions:[DD]}},jh={...Eu,...oSt,...sSt},hSe={[Lo.FormData]:{name:"form-data",extensions:void 0},[Lo["application/x-www-form-urlencoded"]]:{name:"x-www-form-urlencoded",extensions:void 0}},mSe={[Lo.Binary]:{name:"Binary",extensions:void 0}},hf={...Eu,...hSe,...mSe},lSt=Object.keys(Eu),$D=Object.keys(hSe),fSe=Object.keys(mSe);function gSe(e=[],a){const t={};return e.forEach(r=>{const n=String(r[a]);t[n]||(t[n]=[]),t[n].push(r)}),t}const vx={active:!0,key:"",value:""};function Oh(e,a){return[...e.map(t=>({id:crypto.randomUUID(),key:t.name,value:a.initializeWithInputs?`$inputs.${t.name}`:t.example?String(t.example):"",active:a.initializeWithInputs?!0:!!t.example,in:t.in})),_n(a.in)]}function bx(e,a){const[t]=e.split("?"),r=a.slice(0,-1).filter(n=>n.active).map(n=>`${n.key}=${n.value}`).join("&");return`${t}${r?`?${r}`:""}`}function Ul(){return{id:crypto.randomUUID(),...vx}}function Ns(){return{id:crypto.randomUUID(),...vx,description:""}}function _n(e){return{...vx,id:crypto.randomUUID(),in:e}}function mf(){return{id:crypto.randomUUID(),...vx,type:"text",files:null}}function ID(){return{id:crypto.randomUUID(),...vx,sendIn:Co.URL}}function KD(e){return e.map(a=>({id:crypto.randomUUID(),key:"",value:a,active:!0}))}function LM(e,a){return e.filter(t=>t.active&&t.value).map(({value:t})=>(a?Br(t,a):t).trim())}function Ah(e,a){const t=a.filter(r=>!!r).flatMap(r=>r).filter(r=>r.key&&r.active);return["path","header"].includes(e)?Array.from(new Map(t.map(r=>[r.key,r])).values()):t}function vSe(e,a){return e.map(({value:t,...r})=>({...r,value:Br(t,a)}))}function cSt(e,a){if(!e.startsWith("$components.parameters."))return null;const t=e.replace("$components.parameters.","");return t&&a[t]||null}function Ln(e=[],a={}){const t=[];for(const r of e)if(qp(r)){const n=cSt(r.reference,a);n&&t.push({...n,active:r.active,value:r.value||n.value})}else t.push(r);return t}function Ph(e){return Object.entries(e).map(([a,t])=>({id:crypto.randomUUID(),key:"",value:a,active:!0,description:t}))}function uSt(e){return e.replace(/{/g,"{{").replace(/}/g,"}}")}const bSe={documentedOAuth2Types:[],grantType:We.ClientCredentials,authRequestExtraParams:[Ul()],tokenRequestExtraParams:[ID()],[We.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ns()],accessToken:""},[We.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ns()],accessToken:""},[We.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ns()],codeVerifier:"",codeChallenge:"",accessToken:""},[We.AuthorizationCodeWithPkce]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ns()],codeVerifier:"",codeChallenge:"",accessToken:""},[We.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ns()],accessToken:""},[We.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:"",scopes:[Ns()]}},dSt={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:tl.Header,name:"",key:""},[qe.OAuth2]:bSe,[qe.OpenIDConnect]:{...bSe,openIdConnectUrl:"",userInfoUrl:""}},VD="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",pSt={[Bo.SIMPLE]:{condition:"",type:Bo.SIMPLE},[Bo.REGEX]:{condition:"",type:Bo.REGEX,context:""},[Bo.JSONPATH]:{condition:"",type:Bo.JSONPATH,context:""},[Bo.XPATH]:{condition:"",type:Bo.XPATH,context:""}};function RM(){return structuredClone({type:Ji.Text,content:"",activeExampleName:"",formData:{"multipart/form-data":[mf()],"application/x-www-form-urlencoded":[mf()]},binary:null})}const hSt={method:"GET",url:"",security:[_u()],body:RM(),queryParameters:[Ul()],headers:[Ul()],cookies:[Ul()],pathParameters:[Ul()]};function ySe(){return structuredClone(hSt)}function _u(){return Bd(dSt)}function mSt(e){return Bd({id:crypto.randomUUID(),...pSt[e]})}function kSe(e,a,t){for(const r of t){const n=xSe(e,r),i=xSe(a,r);if(typeof n=="object"&&typeof i=="object"){if(!kSe(n,i,t))return!1}else if(n!==i)return!1}return!0}function xSe(e,a){const t=a.split("/");let r=e;for(const n of t)if(r&&typeof r=="object"&&n in r)r=r[n];else return;return r}function fSt(e,a){return e.length===a.length&&e.sort().join()===a.sort().join()}function gSt(e,a){return e.every(t=>a.includes(t))}function vSt(e){switch(e){case"query":return tl.Query;case"cookie":return tl.Cookie;case"header":return tl.Header;default:return}}function bSt(e,a,t){const{security:r}=a,n=Cut(e);if(!t)return!1;const i=HD(t),o=i.map(c=>c.securityType),s=r.map(c=>c.securityType);if(!fSt(o,s))return!0;let l=[];return r.forEach(c=>{const u=c.securityType,d=c[qe.OAuth2]?.grantType,p=o.includes(u),m=i.find(v=>v.securityType===u),g=!m||kSe(c,m,kSt(u,d)),b=ySt(c,u,c[qe.OAuth2]?.grantType,n),y=!!(p&&m&&g&&b);l.push(!t.security?.length||y)}),l.includes(!1)}function ySt(e,a,t,r){if(a===qe.OAuth2&&(t===We.AuthorizationCode||t===We.AuthorizationCodeWithPkce||t===We.Implicit)){const n=e[qe.OAuth2][t]?.availableScopes,i=LM(e[qe.OAuth2][t]?.scopes,r);return gSt(i,n)}return!0}function kSt(e,a){return e===qe.APIKey?[`${qe.APIKey}/name`,`${qe.APIKey}/location`]:e===qe.OAuth2?[`${qe.OAuth2}/grantType`,...xSt(a)]:e===qe.OpenIDConnect?[`${qe.OpenIDConnect}/openIdConnectUrl`]:[]}function xSt(e){return e===We.ClientCredentials?[`${qe.OAuth2}/${We.ClientCredentials}/tokenUrl`]:e===We.Password?[`${qe.OAuth2}/${We.Password}/tokenUrl`]:e===We.Implicit?[`${qe.OAuth2}/${We.Implicit}/authorizationUrl`]:e===We.AuthorizationCode?[`${qe.OAuth2}/${We.AuthorizationCode}/tokenUrl`,`${qe.OAuth2}/${We.AuthorizationCode}/authorizationUrl`]:e===We.AuthorizationCodeWithPkce?[`${qe.OAuth2}/${We.AuthorizationCodeWithPkce}/tokenUrl`,`${qe.OAuth2}/${We.AuthorizationCodeWithPkce}/authorizationUrl`]:[]}function wSt(e){return e.map(a=>{const t=a.map(r=>r.id).join("_");return a.map(r=>({...r,schemeId:t}))})}function zSt(e){const a=e.security||[],t=a.map(r=>{let n="";const i=[];return r.forEach((o,s)=>{n=s===0?`${o.id}`:`${n}_${o.id}`,i.push(FD(o))}),{id:n,security:i}});return a.length?t:[]}function SSt(e,a){const t=e.security||[];return t?.length?CSe(t).map((r,n)=>FD(r)):[]}function HD(e){const a=(e.security||[])[0];return a?a.map(t=>FD(t)):[_u()]}function FD(e,a){const t={..._u(),securitySchemeId:e.id},r=NM(e);t.securityType=r;const n=e.id;if(e.id&&r!==qe.NoAuth&&(t[r].schemeName=e.id),r===qe.BasicAuth&&(t[qe.BasicAuth].username||(t[qe.BasicAuth].username=yn(n+tt.Username)),t[qe.BasicAuth].password||(t[qe.BasicAuth].password=yn(n+tt.Password))),r===qe.DigestAuth&&(t[qe.DigestAuth].username||(t[qe.DigestAuth].username=yn(n+tt.Username)),t[qe.DigestAuth].password||(t[qe.DigestAuth].password=yn(n+tt.Password))),r===qe.JWT&&!t[qe.JWT].token&&(t[qe.JWT].token=yn(n+tt.JWTToken)),r===qe.APIKey&&!t[qe.APIKey].key){t[qe.APIKey].name=e.name||"",t[qe.APIKey].key=yn(n+tt.APIKey);const i=vSt(e.in);i&&(t[qe.APIKey].location=i)}if(r===qe.OAuth2){const i=JD(e),o=yn(n+tt.Token),s=t[qe.OAuth2];s.grantType=i[0],i.forEach(l=>{l===We.AuthorizationCode&&!s[We.AuthorizationCode].accessToken&&(s[We.AuthorizationCode].accessToken=o,s[We.AuthorizationCode].clientId=yn(n+tt.ClientId),s[We.AuthorizationCode].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[We.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[We.AuthorizationCode].clientSecret=yn(n+tt.ClientSecret),s[We.AuthorizationCode].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[We.AuthorizationCode].scopes=[...Ph(e.flows?.authorizationCode?.scopes||{})||[],Ns()]),l===We.AuthorizationCodeWithPkce&&!s[We.AuthorizationCodeWithPkce].accessToken&&(s[We.AuthorizationCodeWithPkce].accessToken=o,s[We.AuthorizationCodeWithPkce].clientId=yn(n+tt.ClientId),s[We.AuthorizationCodeWithPkce].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[We.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[We.AuthorizationCodeWithPkce].clientSecret=yn(n+tt.ClientSecret),s[We.AuthorizationCodeWithPkce].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[We.AuthorizationCodeWithPkce].scopes=[...Ph(e.flows?.authorizationCode?.scopes||{}),Ns()]),l===We.ClientCredentials&&!s[We.ClientCredentials].accessToken&&(s[We.ClientCredentials].accessToken=o,s[We.ClientCredentials].clientId=yn(n+tt.ClientId),s[We.ClientCredentials].clientSecret=yn(n+tt.ClientSecret),s[We.ClientCredentials].tokenUrl=e.flows?.clientCredentials?.tokenUrl||"",s[We.ClientCredentials].scopes=[...Ph(e.flows?.clientCredentials?.scopes||{}),Ns()]),l===We.ClientCredentialsWithJwtAssertion&&!s[We.ClientCredentialsWithJwtAssertion].accessToken&&(s[We.ClientCredentialsWithJwtAssertion].accessToken=o,s[We.ClientCredentialsWithJwtAssertion].clientId=yn(n+tt.ClientId),s[We.ClientCredentialsWithJwtAssertion].clientAssertion=yn(n+tt.ClientAssertion),s[We.ClientCredentialsWithJwtAssertion].scopes=[...Ph(e.flows?.clientCredentials?.scopes||{}),Ns()]),l===We.Implicit&&!s[We.Implicit].accessToken&&(s[We.Implicit].accessToken=o,s[We.Implicit].clientId=yn(n+tt.ClientId),s[We.Implicit].authorizationUrl=e.flows?.implicit?.authorizationUrl||"",s[We.Implicit].availableScopes=Object.keys(e.flows?.implicit?.scopes||{})||[],s[We.Implicit].scopes=[...Ph(e.flows?.implicit?.scopes||{}),Ns()]),l===We.Password&&!s[We.Password].accessToken&&(s[We.Password].accessToken=o,s[We.Password].clientId=yn(n+tt.ClientId),s[We.Password].clientSecret=yn(n+tt.ClientSecret),s[We.Password].tokenUrl=e.flows?.password?.tokenUrl||"",s[We.Password].scopes=[...Ph(e.flows?.password?.scopes||{}),Ns()])})}if(r===qe.OpenIDConnect){const i=yn(n+tt.Token),o=t[qe.OpenIDConnect];o[We.AuthorizationCode].accessToken||(o[We.AuthorizationCode].accessToken=i,o[We.AuthorizationCode].clientId=yn(n+tt.ClientId),o[We.AuthorizationCode].clientSecret=yn(n+tt.ClientSecret),o[We.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[We.AuthorizationCodeWithPkce].accessToken||(o[We.AuthorizationCodeWithPkce].accessToken=i,o[We.AuthorizationCodeWithPkce].clientId=yn(n+tt.ClientId),o[We.AuthorizationCodeWithPkce].clientSecret=yn(n+tt.ClientSecret),o[We.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[We.Implicit].accessToken||(o[We.Implicit].accessToken=i,o[We.Implicit].clientId=yn(n+tt.ClientId))}return t}function CSt(e,a="",t){const r=gSe(e.parameters,"in"),n=wSe(e),i=HD(e),o=Oh(r.query||[],{in:"query"});return{id:crypto.randomUUID(),name:e.name,operationId:e.operationId,collectionPath:t,apiPath:{path:e.path,method:e.method},apiId:a,request:{pathParameters:Oh(r.path||[],{in:"path"}),method:e.method.toLocaleUpperCase(),url:bx(uSt(e.path),o),headers:Oh(r.header||[],{in:"header"}),queryParameters:o,cookies:Oh(r.cookie||[],{in:"cookie"}),body:n,security:i},response:null}}function GD(e){const a=gSe(e.parameters,"in"),t=wSe(e),r=HD(e);return{parameters:{queryParameters:Oh(a.query||[],{in:"query"}),headers:Oh(a.header||[],{in:"header"}),cookies:Oh(a.cookie||[],{in:"cookie"}),pathParameters:Oh(a.path||[],{initializeWithInputs:!0,in:"path"})},requestBody:t,security:r}}function wSe(e){const a=e.body?.mediaTypes;if(!a||!Object.keys(a).length)return RM();const t=jSt(a,e),r=t?.name||"",n=!$D.includes(r)&&!fSe.includes(r),i=qD(t),o=n&&i.length?JSON.stringify(i.find(({key:s})=>s===e.body?.activeExampleName)?.value,null,2)||JSON.stringify(i[0].value,null,2):"";return{...RM(),activeExampleName:e.body?.activeExampleName||i[0]?.key||"",...t&&{type:t.name},content:o,formData:{"multipart/form-data":SSe(a[Lo.FormData]),"application/x-www-form-urlencoded":SSe(a[Lo["application/x-www-form-urlencoded"]])}}}function zSe(e){return e?{...(Object.keys(e?.body?.mediaTypes||{})||[]).reduce((a,t)=>(a[t]={name:t,extensions:void 0},a),{}),...hf}:hf}function SSe(e){if(!e)return[mf()];if(!e.parameters)return[mf()];const a=e.parameters.map(t=>({id:crypto.randomUUID(),key:t.name,value:String(t.example)||"",active:!0,type:t.inputType,files:null}));return a.push(mf()),a}function qD(e){const a=e?.examples;return Object.keys(a||{}).map(t=>{const r=a?.[t];return{name:nm(r?.summary)?r?.summary:r?.summary?.raw||t,key:t,value:a?.[t].value}})}function jSt(e,a){const t=zSe(a),r=Object.keys(e).find(n=>!!t[n]);return r?e[r]:null}function OSt(e){return!e?.security?.length||!e?[]:SSt(e)}function CSe(e){const a=new Set;return e.flat().filter(t=>a.has(t.id)?!1:(a.add(t.id),!0))}function NM(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 ASt(e,a){if(e==="clientCredentials"&&a&&"x-assertionType"in a&&a["x-assertionType"]===VD)return We.ClientCredentialsWithJwtAssertion;if(e==="authorizationCode"&&a&&"x-usePkce"in a&&a["x-usePkce"])return We.AuthorizationCodeWithPkce;switch(e){case"implicit":return We.Implicit;case"password":return We.Password;case"clientCredentials":return We.ClientCredentials;case"authorizationCode":return We.AuthorizationCode;default:return We.AuthorizationCode}}function PSt(e,a){const t=e?.security;if(!t?.length)return[];const r=wSt(t).flat().filter(n=>n.schemeId===a).find(n=>NM(n)===qe.OAuth2);return JD(r)}function JD(e){return Object.entries(e?.flows||{}).map(([a,t])=>ASt(a,t)).filter(Boolean)}async function yx(e){try{const a=await Rmt(e),t=await xbe(e);return{absolutePath:e,file:new File([a],t)}}catch(a){return console.error("Failed to init replay file",a),null}}async function jSe(e){return(await Promise.allSettled(e.map(a=>yx(a)))).map(a=>a.status==="fulfilled"?a.value:null).filter(a=>a!==null)}async function MSt(e,a,t,r,n,i){const o=await Promise.all(e.sourceDescriptions.map(async l=>({name:l.name,url:l.url,type:l.type,apiId:await TSt({projectPath:r,apiUrl:l.url,collectionId:a})}))),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:a,srcType:t,state:sr.Normal,sourceDescriptions:o,components:s,workflows:await Promise.all(e.workflows.map(async l=>({...l,state:sr.Normal,parameters:NSe(l.parameters,l["x-replay-disabled-parameters"],e.components?.parameters),outputs:LSe(l.outputs),security:BSe(l["x-security"]),steps:await Promise.all(l.steps.map(async c=>{const u=NSe(c.parameters,c["x-replay-disabled-parameters"],e.components?.parameters),d=c["x-operation"]??null;d&&(d.url=bx(d.url,u.queryParameters.filter(Vre)));const p=BSt(c,o,n);let m;if(p&&i){const b=n?.find(y=>y.id===p.apiId);m=i(p.path,p.method,b)}delete c.operationId,delete c["x-operation"];const g=await DSt(c.requestBody,r);return{...c,state:sr.Normal,parameters:u,outputs:LSe(c.outputs),successCriteria:c.successCriteria?.map(b=>({...b,type:b.type??Bo.SIMPLE}))||[],requestBody:g,xOperation:d,security:BSe(c["x-security"],m),operation:p}}))})))}}async function TSt({projectPath:e,apiUrl:a,collectionId:t}){if(bbe(a))return a;if(await Hn.isAbsolute(a))return await Hn.relative(e,a);const r=await Hn.resolve(await Hn.join(e,t,"..",a));return await Hn.relative(e,r)}function BSt(e,a,t){if(e["x-operation"])return null;const{path:r,method:n,apiId:i}=ASe({operationPath:e.operationPath,parsedSourceDescriptions:a}),{operationId:o,apiId:s}=ESt({operationId:e.operationId,parsedSourceDescriptions:a}),l=s||i||a[0]?.apiId||"",c=t?.find(u=>u.id===l);if(o&&c&&!r&&!n){const u=ISt(o,c);return{apiId:l,path:u?.path??"",method:u?.method??"",operationId:o}}return{apiId:l,path:r??"",method:n??"",operationId:o}}function ESt({operationId:e,parsedSourceDescriptions:a}){if(!e)return{operationId:"",apiId:null};const t=e.split(".");if(t.length===1)return{operationId:e,apiId:a[0]?.apiId??""};const[,r,n=""]=t,i=a.find(({name:o})=>o===r);return{operationId:n,apiId:i?.apiId??""}}function OSe(e){return"reference"in e&&typeof e.reference=="string"}function ASe({operationPath:e,parsedSourceDescriptions:a}){if(!e)return{apiId:null,path:"",method:""};try{const t=e.split("#"),r=t.length>1?t[1]:t[0],n=t.length>1?t[0]:"";if(!r)return{path:"",method:"",apiId:null};let i=null,o=null;const s=/\$sourceDescriptions\.(.+)\.url/,l=n.match(s);if(l&&(i=l[1]),i){const d=a.find(({name:p})=>p===i);d&&(o=d.apiId)}const c=r.split("/"),u=c.pop()||"";return{path:Di.unescape(c.pop()||""),method:u.toLowerCase(),apiId:o}}catch{return{path:"",method:"",apiId:null}}}function _St(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 PSe(e,a){const t={clientCredentials:We.ClientCredentials,authorizationCode:We.AuthorizationCode,implicit:We.Implicit,password:We.Password,clientCredentialsWithJwtAssertion:We.ClientCredentialsWithJwtAssertion,authorizationCodeWithPkce:We.AuthorizationCodeWithPkce};return e==="clientCredentials"&&a["x-assertionType"]==="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"?We.ClientCredentialsWithJwtAssertion:e==="authorizationCode"&&a["x-usePkce"]?We.AuthorizationCodeWithPkce:t[e]??null}function LSt(e){return{query:tl.Query,header:tl.Header,cookie:tl.Cookie}[e.toLowerCase()]||tl.Header}function RSt(e){return{body:Co.Body,header:Co.Header,url:Co.URL}[e.toLowerCase()]||Co.URL}function MSe(e,a,t){return Object.keys(e).reduce((r,n)=>{const i=PSe(n,e[n]);if(!i)return r;switch(i){case We.ClientCredentials:r[i]={...t[i],clientId:a.clientId??"",clientSecret:a.clientSecret??"",clientAssertion:a.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:ff(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.AuthorizationCode:r[i]={...t[i],clientId:a.clientId??"",clientSecret:a.clientSecret??"",tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:e[n].availableScopes??[],scopes:ff(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.Implicit:r[i]={...t[i],clientId:a.clientId??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:ff(e[n].availableScopes),scopes:ff(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.Password:r[i]={...t[i],tokenUrl:e[n].tokenUrl??"",username:a.username??"",password:a.password??"",clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break;case We.ClientCredentialsWithJwtAssertion:r[i]={...t[i],clientAssertion:a.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:ff(e[n].scopes,e[n]["x-replay-disabled-scopes"]),clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break;case We.AuthorizationCodeWithPkce:r[i]={...t[i],tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:ff(e[n].availableScopes),scopes:ff(e[n].scopes,e[n]["x-replay-disabled-scopes"]),codeVerifier:a.codeVerifier??"",codeChallenge:a.codeChallenge??"",clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break}return r},t)}function TSe(e,a,t){const r={..._u(),securityType:e},n=Object.keys(a.flows||{})[0],i=PSe(n,a.flows?.[n])??We.ClientCredentials;switch(e){case qe.BasicAuth:return{...r,[qe.BasicAuth]:{username:t.username,password:t.password,schemeName:a.id}};case qe.JWT:return{...r,[qe.JWT]:{token:t.token,schemeName:a.id}};case qe.DigestAuth:return{...r,[qe.DigestAuth]:{...r[qe.DigestAuth],username:t.username,password:t.password,schemeName:a.id}};case qe.APIKey:return{...r,[qe.APIKey]:{location:LSt(a.in),name:a.name,key:t.apiKey,schemeName:a.id}};case qe.OAuth2:return{...r,[qe.OAuth2]:{...r[qe.OAuth2],...MSe(a.flows||{},t||{},r[qe.OAuth2]),authRequestExtraParams:ESe(t.authRequestExtraParams),tokenRequestExtraParams:_Se(t.tokenRequestExtraParams),grantType:i,schemeName:a.id}};case qe.OpenIDConnect:return{...r,[qe.OpenIDConnect]:{...r[qe.OpenIDConnect],...MSe(t.flows||{},t||{},r[qe.OpenIDConnect]),openIdConnectUrl:t.openIdConnectUrl,userInfoUrl:t.userInfoUrl,authRequestExtraParams:ESe(t.authRequestExtraParams),tokenRequestExtraParams:_Se(t.tokenRequestExtraParams),grantType:i,schemeName:a.id}};default:return r}}function NSt(e,a){return[...e.map(t=>{if("scheme"in t){const n=_St(t.scheme);return TSe(n,t.scheme,t.values)}const r=a.find(n=>n.id===t.schemeName);if(r){const n=NM(r),i=TSe(n,r,t.values);return i.securitySchemeId=r.id,i}return _u()})]}function BSe(e=[],a){const t=CSe(a?.security||[]);return e.length?NSt(e,t):[_u()]}function ff(e,a){const t=Ph(e||{}),r=Ph(a||{});return[...t,...r,Ns()]}function ESe(e){return(e||[]).map(a=>({id:crypto.randomUUID(),key:a.key??"",value:a.value??"",active:a.active??!0})).concat(Ul())}function _Se(e){return(e||[]).map(a=>({id:crypto.randomUUID(),key:a.key??"",value:a.value??"",active:a.active??!0,sendIn:RSt(a.in)})).concat(ID())}function LSe(e){if(!e)return[Ul()];const a=[];for(const t in e)a.push({id:crypto.randomUUID(),key:t,value:e[t],active:!0});return a.push(Ul()),a}const DM={query:"queryParameters",path:"pathParameters",header:"headers",cookie:"cookies"};function RSe(e,a){const t="$components.parameters.";if(e.reference.startsWith(t)){const r=e.reference.replace(t,"");return a?.[r]}}function NSe(e,a,t){if(!e&&!a)return{pathParameters:[_n("path")],queryParameters:[_n("query")],headers:[_n("header")],cookies:[_n("cookie")]};const r={pathParameters:[],queryParameters:[],headers:[],cookies:[]};if(e)for(const n of e)if(OSe(n)){const i=RSe(n,t),o=DM[i?.in];o&&r[o].push({reference:n.reference,active:!0,value:n.value})}else r[DM[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!0,in:n.in});if(a)for(const n of a)if(OSe(n)){const i=RSe(n,t),o=DM[i?.in];o&&r[o].push({reference:n.reference,active:!1,value:n.value})}else r[DM[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!1,in:n.in});return r.pathParameters.push(_n("path")),r.queryParameters.push(_n("query")),r.headers.push(_n("header")),r.cookies.push(_n("cookie")),r}async function DSt(e,a){const t=ySe().body;if(!e)return t;switch(e.contentType){case"application/x-www-form-urlencoded":case"multipart/form-data":return{...t,type:e.contentType,formData:await $St(e,a)};case"application/octet-stream":const r=e.payload?await ISe(e.payload,a):[],n=r.length>0?await yx(r[0]):null;return{...t,type:e.contentType,binary:n};case"application/json":case"application/ld+json":return{...t,type:e.contentType,content:$Se(e.payload)};default:{const i=typeof e.payload=="string",o=e.contentType||(i?"text/plain":"application/json");return{...t,type:o,content:i?e.payload:$Se(e.payload)}}}}async function DSe(e,a,t,r){const n=await ISe(a,r),i=n.length>0||Array.isArray(a),o=i?await jSe(n):void 0;return{id:crypto.randomUUID(),key:e,value:i?"":a,type:i?"file":"text",active:t,files:o}}async function $St(e,a){const t=ySe().body.formData,r=e.contentType,n=e.payload?await Promise.all(Object.entries(e.payload).map(([o,s])=>DSe(o,s,!0,a))):[],i=e["x-replay-disabled-payload"]?await Promise.all(Object.entries(e["x-replay-disabled-payload"]||{}).map(([o,s])=>DSe(o,s,!1,a))):[];return{...t,[r]:[...n,...i,mf()]}}function $Se(e){return e?JSON.stringify(e,null,2):""}function ISt(e,a){for(const t of Object.keys(a.paths)){const r=a.paths[t];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:t}}}return null}async function ISe(e,a){return Array.isArray(e)?(await Promise.all(e.map(t=>KSe(t,a)))).flat():typeof e=="string"?await KSe(e,a):[]}async function KSe(e,a){const t=/\$file\(['"](.+?)['"]\)/g,r=Array.from(e.matchAll(t));return Promise.all(r.map(n=>KSt(n[1],a)))}async function KSt(e,a){return await Hn.isAbsolute(e)?e:await Hn.resolve(await Hn.join(a,e))}const ps=e=>!e||typeof e=="boolean"?{type:"object",properties:{}}:e.type?e:{...e,type:"object"},VSe=(e,a,t)=>{if(!e.properties)return e;const r=e.properties[a],n=ps(r);return{...e,properties:{...e.properties,[a]:{...n,...t}}}},VSt=(e,a,t)=>{if(!e.properties||a===t||!t.trim())return null;const r={...e.properties};return r[t]?null:(r[t]=r[a],delete r[a],{...e,properties:r})},HSt=(e,a)=>{if(!e.properties)return e;const t={...e.properties};return delete t[a],{...e,properties:t}},FSt=(e,a,t={type:"string"})=>{const r=e.properties||{};return{...e,type:"object",properties:{...r,[a]:t}}};function HSe(e){const a=Object.assign({},...(e||[]).filter(({key:t,active:r})=>t&&r).map(t=>({[t.key]:t.value})));if(Object.keys(a).length!==0)return a}function FSe(e){if(!e)return{};const a={queryParameters:"query",headers:"header",cookies:"cookie",pathParameters:"path"},t=[],r=[];return Object.keys(a).forEach(n=>{const i=n;e[i].forEach(o=>{if(qp(o)){const s={reference:o.reference,value:o.value||void 0};o.active?t.push(s):r.push(s)}else{if(!o.key)return;const s={name:o.key,in:a[i],value:o.value};o.active?t.push(s):r.push(s)}})}),{parameters:t.length>0?t:void 0,"x-replay-disabled-parameters":r.length>0?r:void 0}}function GSt(e){const a=e?.map(t=>({condition:t.condition,context:t.context,type:t.type==Bo.SIMPLE?void 0:t.type}));if(a?.length!==0)return a}function qSt(e){if(!(!e||e.length===0))return[...e]}async function GSe(e,a){return e.absolutePath?`$file('${await Hn.relative(a,e.absolutePath)}')`:null}async function JSt(e,a){const{type:t,value:r,files:n}=e;switch(t){case"text":return r;case"file":let i=[];return n&&(i=(await Promise.all(Object.values(n).map(o=>GSe(o,a)))).filter(o=>o!==null)),i.length===0?"":i.length===1?i[0]:i}}async function USt(e,a){const t=e.type,r=e.formData[t],n={},i={};return await Promise.all(r.map(async o=>{const{key:s,active:l}=o;if(!s)return;const c=await JSt(o,a);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 WSt(e){if(!e)return e;try{const a=JSON.parse(e);return typeof a=="object"?a:e}catch{return e}}async function ZSt(e,a){if(e)switch(e.type){case"application/x-www-form-urlencoded":case"multipart/form-data":return{contentType:e.type,...await USt(e,a)};case"application/octet-stream":return{contentType:e.type,payload:e.binary?await GSe(e.binary,a):null};case"application/json":case"application/ld+json":return e.content?{contentType:e.type,payload:WSt(e.content)}:void 0;default:return e.content?{contentType:e.type,payload:e.content}:void 0}}function QSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"basic"}},values:{username:e.username,password:e.password}}}function XSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"apiKey",name:e.name,in:e.location.toLowerCase()}},values:{apiKey:e.key}}}function YSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"bearer"}},values:{token:e.token}}}function e2t(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"digest"}},values:{username:e.username,password:e.password}}}function a2t(e){const{flows:a,values:t}=USe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"openIdConnect",flows:a}},values:{...t,openIdConnectUrl:e.openIdConnectUrl,userInfoUrl:e.userInfoUrl,authRequestExtraParams:qSe(e.authRequestExtraParams),tokenRequestExtraParams:JSe(e.tokenRequestExtraParams)}}}function t2t(e){const{flows:a,values:t}=USe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"oauth2",flows:a}},values:{...t,authRequestExtraParams:qSe(e.authRequestExtraParams),tokenRequestExtraParams:JSe(e.tokenRequestExtraParams)}}}function Cb(e){const a={},t={};return e.forEach(r=>{r.value&&(r.active?a[r.value]=r.description:t[r.value]=r.description)}),{scopes:a,"x-replay-disabled-scopes":Object.keys(t).length>0?t:void 0}}function qSe(e){return e.filter(a=>a.value||a.key).map(a=>({key:a.key,value:a.value,active:a.active}))}function JSe(e){return e.filter(a=>a.value||a.key).map(a=>({key:a.key,value:a.value,active:a.active,in:a.sendIn.toLowerCase()}))}function USe(e){let a;switch(e.grantType){case We.ClientCredentials:return a=e[We.ClientCredentials],{flows:{clientCredentials:{tokenUrl:a.tokenUrl,...Cb(a.scopes)}},values:{clientId:a.clientId,clientSecret:a.clientSecret,accessToken:a.accessToken}};case We.Implicit:return a=e[We.Implicit],{flows:{implicit:{authorizationUrl:a.authorizationUrl,...Cb(a.scopes)}},values:{clientId:a.clientId,accessToken:a.accessToken,callbackUrl:a.callbackUrl}};case We.Password:return a=e[We.Password],{flows:{password:{tokenUrl:a.tokenUrl,...Cb(a.scopes)}},values:{clientId:a.clientId,clientSecret:a.clientSecret,username:a.username,password:a.password,accessToken:a.accessToken}};case We.AuthorizationCode:return a=e[We.AuthorizationCode],{flows:{authorizationCode:{tokenUrl:a.tokenUrl,authorizationUrl:a.authorizationUrl,...Cb(a.scopes)}},values:{accessToken:a.accessToken,clientId:a.clientId,callbackUrl:a.callbackUrl}};case We.ClientCredentialsWithJwtAssertion:return a=e[We.ClientCredentialsWithJwtAssertion],{flows:{clientCredentials:{tokenUrl:a.tokenUrl,...Cb(a.scopes),"x-assertionType":"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}},values:{clientId:a.clientId,clientAssertion:a.clientAssertion,accessToken:a.accessToken}};case We.AuthorizationCodeWithPkce:return a=e[We.AuthorizationCodeWithPkce],{flows:{authorizationCode:{tokenUrl:a.tokenUrl,authorizationUrl:a.authorizationUrl,...Cb(a.scopes),"x-usePkce":!0}},values:{clientId:a.clientId,clientSecret:a.clientSecret,accessToken:a.accessToken,codeVerifier:a.codeVerifier,codeChallenge:a.codeChallenge,callbackUrl:a.callbackUrl}}}}function WSe(e){const a=e.map(t=>{switch(t.securityType){case qe.OpenIDConnect:{const r=t[qe.OpenIDConnect];return a2t(r)}case qe.OAuth2:{const r=t[qe.OAuth2];return t2t(r)}case qe.APIKey:{const r=t[qe.APIKey];return XSt(r)}case qe.BasicAuth:{const r=t[qe.BasicAuth];return QSt(r)}case qe.DigestAuth:{const r=t[qe.DigestAuth];return e2t(r)}case qe.JWT:{const r=t[qe.JWT];return YSt(r)}default:return null}}).filter(t=>t!==null);return{"x-security":a.length?a:void 0}}function r2t(e){const{inputs:a,parameters:t,...r}=e;let n=r;return Object.keys(a).length&&(n.inputs=a),Object.keys(t).length&&(n.parameters=Object.fromEntries(Object.entries(t).map(([i,{id:o,active:s,key:l,...c}])=>[i,{...c,name:l}]))),Object.keys(n).length||(n=void 0),n}async function n2t(e,a){const{id:t,state:r,srcType:n,sourceDescriptions:i,workflows:o,components:s,...l}=e;return{arazzoObject:{...l,sourceDescriptions:i.map(c=>({name:c.name,url:c.url,type:c.type||"openapi"})),components:r2t(s),workflows:await Promise.all(o.map(async({parameters:c,security:u,dependsOn:d,outputs:p,state:m,steps:g,inputs:b,...y})=>({...y,dependsOn:qSt(d),outputs:HSe(p),inputs:b?ps(b):void 0,...WSe(u),...FSe(c),steps:await Promise.all(g.map(async({parameters:v,security:k,operation:z,requestBody:C,successCriteria:w,outputs:S,state:O,xOperation:A,...B})=>{const L={operationId:void 0,operationPath:void 0,"x-operation":void 0};if(z){const q=e.sourceDescriptions.find(({apiId:N})=>N===z.apiId)||e.sourceDescriptions[0];if(z.operationId){const N=e.sourceDescriptions.length<=1;L.operationId=N?z.operationId:`$sourceDescriptions.${q.name}.${z.operationId}`}else L.operationPath=`{$sourceDescriptions.${q.name}.url}#/paths/${Di.escape(z.path)}/${z.method}`}else A&&(L["x-operation"]={...A,url:A.url.split("?")[0]});return{...B,...L,...WSe(k),...FSe(v),requestBody:await ZSt(C,a),successCriteria:GSt(w),outputs:HSe(S)}}))})))}}}class i2t extends Obe{constructor(a,t){super(a),this.convertOperationToReplayValue=t}parse(a,t){return MSt(a.content,a.uri,a.type,this.storage.baseDir,t,this.convertOperationToReplayValue)}async stringify(a){const{arazzoObject:t}=await n2t(a,this.storage.baseDir);return await Hn.extname(a.id)===".json"?JSON.stringify(t,null,2):md.dump(t)}}class o2t{constructor(a,t){this.storage=a,this.localStorageSecretsProvider=t}default=[];async read(){const a=await this.storage.get("replay-environments.yaml"),t=await this.localStorageSecretsProvider.get();let r=null,n=null;if(!a)return this.default;try{r=md.load(a),n=t?JSON.parse(t):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:sr.Normal})):this.default}async write(a){const t=await this.localStorageSecretsProvider.get(),r=t?JSON.parse(t):{},n=a.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",md.dump(n))}}class s2t{constructor(a,t,r){this.storage=a,this.filePath=t,this.defaultValue=r}async parse(a){return JSON.parse(a)}stringify(a){return JSON.stringify(a)}async read(){const a=await this.storage.get(this.filePath);return a?await this.parse(a):this.defaultValue}async write(a){return this.storage.set(this.filePath,this.stringify(a))}}const l2t=(e,a)=>({data:e,version:a});class UD extends s2t{constructor(a,t,r,n){super(a,t,r),this.version=n}migrationMap={};migrate(a){if(!this.migrationMap[a.version])return this.defaultValue;const t=this.migrationMap[a.version](a);return t.version===this.version?t:this.migrate(t)}async parse(a){const t=JSON.parse(a);if(t.version!==this.version){const r=this.migrate(t);return await this.write(r.data),r.data}return t.data}stringify(a){return JSON.stringify(l2t(a,this.version))}}function c2t(e){return{data:{...e.data,tabs:e.data.tabs.map(a=>a.data.type===Ka.Step?{...a,data:{...a.data,draftStep:{...a.data.step,security:a.data.step.security.securities},step:void 0,hasUnsavedChanges:void 0,showUnsavedChangesModal:void 0}}:a)},version:2}}const ZSe=2,u2t="tabs.json";class d2t extends UD{migrationMap={1:c2t};constructor(a){super(a,u2t,Bd(gbe),ZSe)}async parse(a){let t=JSON.parse(a);t.version!==ZSe&&(t=this.migrate(t));const r=await Promise.all(t.data.tabs.map(async n=>{if(n.data.type===Ka.Step&&n.data.draftStep){const i=n.data.draftStep.requestBody.formData;i["multipart/form-data"]=await QSe(i["multipart/form-data"]),i["application/x-www-form-urlencoded"]=await QSe(i["application/x-www-form-urlencoded"]),n.data.draftStep.requestBody.binary&&n.data.draftStep.requestBody.binary.absolutePath&&(n.data.draftStep.requestBody.binary=await yx(n.data.draftStep.requestBody.binary.absolutePath))}return n}));return{...t.data,tabs:r}}stringify(a){return super.stringify({...a,tabs:a.tabs.map(t=>t.data.type===Ka.Step?{...t,data:{...t.data,response:null}}:t.data.type===Ka.WorkflowRun?{...t,data:{...t.data,result:null}}:t)})}}async function QSe(e){return Promise.all(e.map(async a=>{const t={...a};if(a.files){const r=a.files.map(n=>n.absolutePath).filter(n=>n!==null);t.files=await jSe(r)}return t}))}const p2t=1,h2t=1;class m2t{constructor(a,t){this.project=a,this.convertOperationToReplayValue=t,this.localStorageSecretsProvider=new Imt(this.project.id),this.systemFilesStorage=this.isTauriApp?new jbe(this.project.systemFilesDir):new ybe(this.project.systemFilesDir),this.userFilesStorage=this.isTauriApp?new jbe(this.project.userFilesDir):new ybe(this.project.userFilesDir);const r=new Bmt;this.historyStorage=new UD(this.systemFilesStorage,"history.json",[],p2t),this.activeEnvironmentIdStorage=new UD(this.systemFilesStorage,"active_environment_id.json",C0,h2t),this.tabsStateStorage=new d2t(this.systemFilesStorage),this.environmentsStorage=new o2t(this.userFilesStorage,this.localStorageSecretsProvider),this.collectionsStorage=new i2t(this.userFilesStorage,this.convertOperationToReplayValue),this.apisStorage=new Kmt(this.isTauriApp?this.userFilesStorage:r)}historyStorage;activeEnvironmentIdStorage;tabsStateStorage;environmentsStorage;collectionsStorage;apisStorage;isTauriApp=Jv();systemFilesStorage;localStorageSecretsProvider;userFilesStorage;async detectProjectFiles(){const a=(await this.userFilesStorage.ls()).filter(i=>/\.(ya?ml|json)$/.test(i)),t=[],r=[],n=new Set;return await Promise.all(a.map(async i=>{const o=await this.userFilesStorage.get(i);if(o)try{const s=md.load(o);typeof s=="object"&&s!==null&&(typeof s.openapi=="string"?t.push({uri:i,type:gu.FS,content:s}):typeof s.arazzo=="string"&&(r.push({uri:i,type:gu.FS,content:s}),s.sourceDescriptions?.map(async l=>{const c=l.type,u=l.url,d=!c||c==="openapi",p=typeof u=="string"&&bbe(u);d&&p&&n.add(u)})))}catch(s){console.error(`Error parsing YAML/JSON file ${i}:`,s)}})),{apiFiles:t,collectionFiles:r,apiUrls:n}}async loadApis(a){const t=[];return await Promise.all(Array.from(a).map(async r=>{let n="";try{const i=await vu(ICe({proxyUrl:ube,resolvedUrl:r,ignoreProxy:this.isTauriApp}));n=await i.text(),i.ok||console.error(`Error fetching API from ${r}:`,i.status,n)}catch(i){console.error(`Error fetching API from ${r}:`,i)}try{const i=md.load(n);typeof i=="object"&&i!==null&&typeof i.openapi=="string"&&t.push({uri:r,type:gu.WEB,content:i})}catch(i){console.error(`Error parsing YAML from ${r}:`,i)}})),t}async read(){const[a,t,r,n]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]),{apiFiles:i,collectionFiles:o,apiUrls:s}=await this.detectProjectFiles(),l=await this.loadApis(s),c=await this.apisStorage.parseMany([...i,...l]),u=await this.collectionsStorage.parseMany(o,c);return{project:this.project,history:a,activeEnvironmentId:t,tabsState:r,environments:n,apis:c,collections:u}}async update(a,t){switch(a.path[0]){case"history":this.historyStorage.write(t.history.get());break;case"activeEnvironmentId":this.activeEnvironmentIdStorage.write(t.activeEnvironmentId.get());break;case"tabsState":this.tabsStateStorage.write(t.tabsState.get());break;case"environments":this.environmentsStorage.write(t.environments.get());break;case"apis":this.isTauriApp&&await this.apisStorage.update(a,t.apis.get());break;case"collections":await this.collectionsStorage.update(a,t.collections.get());break}}}function f2t(e=!1){let a,t=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async(n,i)=>{if(t||r.path.length>0)return{isInitialized:!1};if(t=!0,!e){a=new m2t(n,i);const o=await a.read();r.merge(o)}return t=!1,{isInitialized:!0}}}),onSet(r,n,i){t||e||a.update(n,i)}})}function g2t({defaultEnvironments:e}={}){return structuredClone({project:{id:"default",userFilesDir:"default",systemFilesDir:"default"},history:[],tabsState:Bd(gbe),activeEnvironmentId:C0,environments:e||fbe,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:fu.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const v2t=Kia(g2t(),Via(Omt({key:"replay-root-store"}),f2t())),XSe=R.createContext(v2t);function Ft(){const e=R.useContext(XSe);return Ire(e)}function b2t(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[]}}const y2t=b2t(),k2t=R.createContext(y2t);function Id(){const e=R.useContext(k2t);return Ire(e)}function x2t(e,a){const{apps:{apiId:t}}=Ft(),{corsProxyUrl:r,disableCollectionsTab:n,mockServer:i,oAuth2RedirectURI:o,certificates:s,storageKey:l,isApiBased:c}=Id();r.set(e?.corsProxyUrl??ube),i.set(e?.mockServer),t.set(e?.apiId),o.set(e?.oAuth2RedirectURI),n.set(!!e?.disableCollectionsTab),l.set(e?.storageKey),c.set(!!a),R.useEffect(()=>{s.set(e?.certificates||[])},[e?.certificates])}const YSe=R.createContext({});function kx(){return R.useContext(YSe)||{}}const w2t="0.18.0-next.13",z2t={version:w2t};class S2t{client;_isInitialized=!1;constructor(){this.client=new wmt}get isInitialized(){return this._isInitialized}init(a){if(this.isInitialized)return;const t={serviceName:"replay",serviceVersion:z2t.version,version:"1.0.0",tracerName:a?.tracerName||"desktop",collectorUrl:a?.collectorUrl||"",isProd:!0};this.client.init({otel:{...t,...a}}),this._isInitialized=!0}sendEvent(a,t){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{this.client.send(a,t)}catch(r){console.error("Failed to send telemetry event:",r)}}}const WD=new S2t;function Bt(){const{telemetry:e}=kx();return WD.isInitialized||WD.init({tracerName:e?.tracerName,collectorUrl:e?.collectorUrl}),{sendEvent:(a,t)=>{WD.sendEvent(a,t)}}}const Ro=800;function gf(e){"@babel/helpers - typeof";return gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},gf(e)}function C2t(e,a){if(gf(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,a);if(gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function e2e(e){var a=C2t(e,"string");return gf(a)=="symbol"?a:a+""}function xx(e,a,t){return(a=e2e(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function a2e(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ya(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?a2e(Object(t),!0).forEach(function(r){xx(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a2e(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function j2t(e){if(Array.isArray(e))return e}function O2t(e,a){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,n,i,o,s=[],l=!0,c=!1;try{if(i=(t=t.call(e)).next,a===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=i.call(t)).done)&&(s.push(r.value),s.length!==a);l=!0);}catch(u){c=!0,n=u}finally{try{if(!l&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw n}}return s}}function ZD(e,a){(a==null||a>e.length)&&(a=e.length);for(var t=0,r=Array(a);t<a;t++)r[t]=e[t];return r}function t2e(e,a){if(e){if(typeof e=="string")return ZD(e,a);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ZD(e,a):void 0}}function A2t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
11901
11901
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kd(e,a){return j2t(e)||O2t(e,a)||t2e(e,a)||A2t()}function P2t(e,a){if(e==null)return{};var t={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(a.indexOf(r)!==-1)continue;t[r]=e[r]}return t}function Vd(e,a){if(e==null)return{};var t,r,n=P2t(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],a.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var M2t=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function T2t(e){var a=e.defaultInputValue,t=a===void 0?"":a,r=e.defaultMenuIsOpen,n=r===void 0?!1:r,i=e.defaultValue,o=i===void 0?null:i,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,m=e.value,g=Vd(e,M2t),b=R.useState(s!==void 0?s:t),y=Kd(b,2),v=y[0],k=y[1],z=R.useState(l!==void 0?l:n),C=Kd(z,2),w=C[0],S=C[1],O=R.useState(m!==void 0?m:o),A=Kd(O,2),B=A[0],L=A[1],q=R.useCallback(function(ne,me){typeof c=="function"&&c(ne,me),L(ne)},[c]),N=R.useCallback(function(ne,me){var I;typeof u=="function"&&(I=u(ne,me)),k(I!==void 0?I:ne)},[u]),U=R.useCallback(function(){typeof p=="function"&&p(),S(!0)},[p]),D=R.useCallback(function(){typeof d=="function"&&d(),S(!1)},[d]),Y=s!==void 0?s:v,te=l!==void 0?l:w,ue=m!==void 0?m:B;return Ya(Ya({},g),{},{inputValue:Y,menuIsOpen:te,onChange:q,onInputChange:N,onMenuClose:D,onMenuOpen:U,value:ue})}function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ot.apply(null,arguments)}function B2t(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}function r2e(e,a){for(var t=0;t<a.length;t++){var r=a[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,e2e(r.key),r)}}function E2t(e,a,t){return a&&r2e(e.prototype,a),t&&r2e(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function QD(e,a){return QD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},QD(e,a)}function _2t(e,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),a&&QD(e,a)}function $M(e){return $M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},$M(e)}function n2e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(n2e=function(){return!!e})()}function L2t(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R2t(e,a){if(a&&(gf(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return L2t(e)}function N2t(e){var a=n2e();return function(){var t,r=$M(e);if(a){var n=$M(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return R2t(this,t)}}function D2t(e){if(Array.isArray(e))return ZD(e)}function $2t(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function I2t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
11902
11902
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XD(e){return D2t(e)||$2t(e)||t2e(e)||I2t()}function K2t(e){if(e.sheet)return e.sheet;for(var a=0;a<document.styleSheets.length;a++)if(document.styleSheets[a].ownerNode===e)return document.styleSheets[a]}function V2t(e){var a=document.createElement("style");return a.setAttribute("data-emotion",e.key),e.nonce!==void 0&&a.setAttribute("nonce",e.nonce),a.appendChild(document.createTextNode("")),a.setAttribute("data-s",""),a}var H2t=(function(){function e(t){var r=this;this._insertTag=function(n){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(n,i),r.tags.push(n)},this.isSpeedy=t.speedy===void 0?!0:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var a=e.prototype;return a.hydrate=function(t){t.forEach(this._insertTag)},a.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(V2t(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var n=K2t(r);try{n.insertRule(t,n.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(t));this.ctr++},a.flush=function(){this.tags.forEach(function(t){return t.parentNode&&t.parentNode.removeChild(t)}),this.tags=[],this.ctr=0},e})(),No="-ms-",IM="-moz-",br="-webkit-",i2e="comm",YD="rule",e$="decl",F2t="@import",o2e="@keyframes",G2t=Math.abs,KM=String.fromCharCode,q2t=Object.assign;function J2t(e,a){return lo(e,0)^45?(((a<<2^lo(e,0))<<2^lo(e,1))<<2^lo(e,2))<<2^lo(e,3):0}function s2e(e){return e.trim()}function U2t(e,a){return(e=a.exec(e))?e[0]:e}function jr(e,a,t){return e.replace(a,t)}function a$(e,a){return e.indexOf(a)}function lo(e,a){return e.charCodeAt(a)|0}function wx(e,a,t){return e.slice(a,t)}function Lu(e){return e.length}function t$(e){return e.length}function VM(e,a){return a.push(e),e}function W2t(e,a){return e.map(a).join("")}var HM=1,jb=1,l2e=0,Ds=0,gi=0,Ob="";function FM(e,a,t,r,n,i,o){return{value:e,root:a,parent:t,type:r,props:n,children:i,line:HM,column:jb,length:o,return:""}}function zx(e,a){return q2t(FM("",null,null,"",null,null,0),e,{length:-e.length},a)}function Z2t(){return gi}function Q2t(){return gi=Ds>0?lo(Ob,--Ds):0,jb--,gi===10&&(jb=1,HM--),gi}function ml(){return gi=Ds<l2e?lo(Ob,Ds++):0,jb++,gi===10&&(jb=1,HM++),gi}function Ru(){return lo(Ob,Ds)}function GM(){return Ds}function Sx(e,a){return wx(Ob,e,a)}function Cx(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function c2e(e){return HM=jb=1,l2e=Lu(Ob=e),Ds=0,[]}function u2e(e){return Ob="",e}function qM(e){return s2e(Sx(Ds-1,r$(e===91?e+2:e===40?e+1:e)))}function X2t(e){for(;(gi=Ru())&&gi<33;)ml();return Cx(e)>2||Cx(gi)>3?"":" "}function Y2t(e,a){for(;--a&&ml()&&!(gi<48||gi>102||gi>57&&gi<65||gi>70&&gi<97););return Sx(e,GM()+(a<6&&Ru()==32&&ml()==32))}function r$(e){for(;ml();)switch(gi){case e:return Ds;case 34:case 39:e!==34&&e!==39&&r$(gi);break;case 40:e===41&&r$(e);break;case 92:ml();break}return Ds}function eCt(e,a){for(;ml()&&e+gi!==57&&!(e+gi===84&&Ru()===47););return"/*"+Sx(a,Ds-1)+"*"+KM(e===47?e:ml())}function aCt(e){for(;!Cx(Ru());)ml();return Sx(e,Ds)}function tCt(e){return u2e(JM("",null,null,null,[""],e=c2e(e),0,[0],e))}function JM(e,a,t,r,n,i,o,s,l){for(var c=0,u=0,d=o,p=0,m=0,g=0,b=1,y=1,v=1,k=0,z="",C=n,w=i,S=r,O=z;y;)switch(g=k,k=ml()){case 40:if(g!=108&&lo(O,d-1)==58){a$(O+=jr(qM(k),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:O+=qM(k);break;case 9:case 10:case 13:case 32:O+=X2t(g);break;case 92:O+=Y2t(GM()-1,7);continue;case 47:switch(Ru()){case 42:case 47:VM(rCt(eCt(ml(),GM()),a,t),l);break;default:O+="/"}break;case 123*b:s[c++]=Lu(O)*v;case 125*b:case 59:case 0:switch(k){case 0:case 125:y=0;case 59+u:m>0&&Lu(O)-d&&VM(m>32?p2e(O+";",r,t,d-1):p2e(jr(O," ","")+";",r,t,d-2),l);break;case 59:O+=";";default:if(VM(S=d2e(O,a,t,c,u,n,s,z,C=[],w=[],d),i),k===123)if(u===0)JM(O,a,S,S,C,i,d,s,w);else switch(p===99&&lo(O,3)===110?100:p){case 100:case 109:case 115:JM(e,S,S,r&&VM(d2e(e,S,S,0,0,n,s,z,n,C=[],d),w),n,w,d,s,r?C:w);break;default:JM(O,S,S,S,[""],w,0,s,w)}}c=u=m=0,b=v=1,z=O="",d=o;break;case 58:d=1+Lu(O),m=g;default:if(b<1){if(k==123)--b;else if(k==125&&b++==0&&Q2t()==125)continue}switch(O+=KM(k),k*b){case 38:v=u>0?1:(O+="\f",-1);break;case 44:s[c++]=(Lu(O)-1)*v,v=1;break;case 64:Ru()===45&&(O+=qM(ml())),p=Ru(),u=d=Lu(z=O+=aCt(GM())),k++;break;case 45:g===45&&Lu(O)==2&&(b=0)}}return i}function d2e(e,a,t,r,n,i,o,s,l,c,u){for(var d=n-1,p=n===0?i:[""],m=t$(p),g=0,b=0,y=0;g<r;++g)for(var v=0,k=wx(e,d+1,d=G2t(b=o[g])),z=e;v<m;++v)(z=s2e(b>0?p[v]+" "+k:jr(k,/&\f/g,p[v])))&&(l[y++]=z);return FM(e,a,t,n===0?YD:s,l,c,u)}function rCt(e,a,t){return FM(e,a,t,i2e,KM(Z2t()),wx(e,2,-2),0)}function p2e(e,a,t,r){return FM(e,a,t,e$,wx(e,0,r),wx(e,r+1,-1),r)}function Ab(e,a){for(var t="",r=t$(e),n=0;n<r;n++)t+=a(e[n],n,e,a)||"";return t}function nCt(e,a,t,r){switch(e.type){case F2t:case e$:return e.return=e.return||e.value;case i2e:return"";case o2e:return e.return=e.value+"{"+Ab(e.children,r)+"}";case YD:e.value=e.props.join(",")}return Lu(t=Ab(e.children,r))?e.return=e.value+"{"+t+"}":""}function iCt(e){var a=t$(e);return function(t,r,n,i){for(var o="",s=0;s<a;s++)o+=e[s](t,r,n,i)||"";return o}}function oCt(e){return function(a){a.root||(a=a.return)&&e(a)}}function sCt(e){var a=Object.create(null);return function(t){return a[t]===void 0&&(a[t]=e(t)),a[t]}}var lCt=function(e,a,t){for(var r=0,n=0;r=n,n=Ru(),r===38&&n===12&&(a[t]=1),!Cx(n);)ml();return Sx(e,Ds)},cCt=function(e,a){var t=-1,r=44;do switch(Cx(r)){case 0:r===38&&Ru()===12&&(a[t]=1),e[t]+=lCt(Ds-1,a,t);break;case 2:e[t]+=qM(r);break;case 4:if(r===44){e[++t]=Ru()===58?"&\f":"",a[t]=e[t].length;break}default:e[t]+=KM(r)}while(r=ml());return e},uCt=function(e,a){return u2e(cCt(c2e(e),a))},h2e=new WeakMap,dCt=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var a=e.value,t=e.parent,r=e.column===t.column&&e.line===t.line;t.type!=="rule";)if(t=t.parent,!t)return;if(!(e.props.length===1&&a.charCodeAt(0)!==58&&!h2e.get(t))&&!r){h2e.set(e,!0);for(var n=[],i=uCt(a,n),o=t.props,s=0,l=0;s<i.length;s++)for(var c=0;c<o.length;c++,l++)e.props[l]=n[s]?i[s].replace(/&\f/g,o[c]):o[c]+" "+i[s]}}},pCt=function(e){if(e.type==="decl"){var a=e.value;a.charCodeAt(0)===108&&a.charCodeAt(2)===98&&(e.return="",e.value="")}};function m2e(e,a){switch(J2t(e,a)){case 5103:return br+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return br+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return br+e+IM+e+No+e+e;case 6828:case 4268:return br+e+No+e+e;case 6165:return br+e+No+"flex-"+e+e;case 5187:return br+e+jr(e,/(\w+).+(:[^]+)/,br+"box-$1$2"+No+"flex-$1$2")+e;case 5443:return br+e+No+"flex-item-"+jr(e,/flex-|-self/,"")+e;case 4675:return br+e+No+"flex-line-pack"+jr(e,/align-content|flex-|-self/,"")+e;case 5548:return br+e+No+jr(e,"shrink","negative")+e;case 5292:return br+e+No+jr(e,"basis","preferred-size")+e;case 6060:return br+"box-"+jr(e,"-grow","")+br+e+No+jr(e,"grow","positive")+e;case 4554:return br+jr(e,/([^-])(transform)/g,"$1"+br+"$2")+e;case 6187:return jr(jr(jr(e,/(zoom-|grab)/,br+"$1"),/(image-set)/,br+"$1"),e,"")+e;case 5495:case 3959:return jr(e,/(image-set\([^]*)/,br+"$1$`$1");case 4968:return jr(jr(e,/(.+:)(flex-)?(.*)/,br+"box-pack:$3"+No+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+br+e+e;case 4095:case 3583:case 4068:case 2532:return jr(e,/(.+)-inline(.+)/,br+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Lu(e)-1-a>6)switch(lo(e,a+1)){case 109:if(lo(e,a+4)!==45)break;case 102:return jr(e,/(.+:)(.+)-([^]+)/,"$1"+br+"$2-$3$1"+IM+(lo(e,a+3)==108?"$3":"$2-$3"))+e;case 115:return~a$(e,"stretch")?m2e(jr(e,"stretch","fill-available"),a)+e:e}break;case 4949:if(lo(e,a+1)!==115)break;case 6444:switch(lo(e,Lu(e)-3-(~a$(e,"!important")&&10))){case 107:return jr(e,":",":"+br)+e;case 101:return jr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+br+(lo(e,14)===45?"inline-":"")+"box$3$1"+br+"$2$3$1"+No+"$2box$3")+e}break;case 5936:switch(lo(e,a+11)){case 114:return br+e+No+jr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return br+e+No+jr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return br+e+No+jr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return br+e+No+e+e}return e}var hCt=function(e,a,t,r){if(e.length>-1&&!e.return)switch(e.type){case e$:e.return=m2e(e.value,e.length);break;case o2e:return Ab([zx(e,{value:jr(e.value,"@","@"+br)})],r);case YD:if(e.length)return W2t(e.props,function(n){switch(U2t(n,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ab([zx(e,{props:[jr(n,/:(read-\w+)/,":"+IM+"$1")]})],r);case"::placeholder":return Ab([zx(e,{props:[jr(n,/:(plac\w+)/,":"+br+"input-$1")]}),zx(e,{props:[jr(n,/:(plac\w+)/,":"+IM+"$1")]}),zx(e,{props:[jr(n,/:(plac\w+)/,No+"input-$1")]})],r)}return""})}},mCt=[hCt],fCt=function(e){var a=e.key;if(a==="css"){var t=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(t,function(g){var b=g.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var r=e.stylisPlugins||mCt,n={},i,o=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+a+' "]'),function(g){for(var b=g.getAttribute("data-emotion").split(" "),y=1;y<b.length;y++)n[b[y]]=!0;o.push(g)});var s,l=[dCt,pCt];{var c,u=[nCt,oCt(function(g){c.insert(g)})],d=iCt(l.concat(r,u)),p=function(g){return Ab(tCt(g),d)};s=function(g,b,y,v){c=y,p(g?g+"{"+b.styles+"}":b.styles),v&&(m.inserted[b.name]=!0)}}var m={key:a,sheet:new H2t({key:a,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:n,registered:{},insert:s};return m.sheet.hydrate(o),m},gCt=!0;function vCt(e,a,t){var r="";return t.split(" ").forEach(function(n){e[n]!==void 0?a.push(e[n]+";"):r+=n+" "}),r}var f2e=function(e,a,t){var r=e.key+"-"+a.name;(t===!1||gCt===!1)&&e.registered[r]===void 0&&(e.registered[r]=a.styles)},bCt=function(e,a,t){f2e(e,a,t);var r=e.key+"-"+a.name;if(e.inserted[a.name]===void 0){var n=a;do e.insert(a===n?"."+r:"",n,e.sheet,!0),n=n.next;while(n!==void 0)}};function yCt(e){for(var a=0,t,r=0,n=e.length;n>=4;++r,n-=4)t=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,a=(t&65535)*1540483477+((t>>>16)*59797<<16)^(a&65535)*1540483477+((a>>>16)*59797<<16);switch(n){case 3:a^=(e.charCodeAt(r+2)&255)<<16;case 2:a^=(e.charCodeAt(r+1)&255)<<8;case 1:a^=e.charCodeAt(r)&255,a=(a&65535)*1540483477+((a>>>16)*59797<<16)}return a^=a>>>13,a=(a&65535)*1540483477+((a>>>16)*59797<<16),((a^a>>>15)>>>0).toString(36)}var kCt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},xCt=/[A-Z]|^ms/g,wCt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,g2e=function(e){return e.charCodeAt(1)===45},v2e=function(e){return e!=null&&typeof e!="boolean"},n$=sCt(function(e){return g2e(e)?e:e.replace(xCt,"-$&").toLowerCase()}),b2e=function(e,a){switch(e){case"animation":case"animationName":if(typeof a=="string")return a.replace(wCt,function(t,r,n){return Nu={name:r,styles:n,next:Nu},r})}return kCt[e]!==1&&!g2e(e)&&typeof a=="number"&&a!==0?a+"px":a};function jx(e,a,t){if(t==null)return"";if(t.__emotion_styles!==void 0)return t;switch(typeof t){case"boolean":return"";case"object":{if(t.anim===1)return Nu={name:t.name,styles:t.styles,next:Nu},t.name;if(t.styles!==void 0){var r=t.next;if(r!==void 0)for(;r!==void 0;)Nu={name:r.name,styles:r.styles,next:Nu},r=r.next;var n=t.styles+";";return n}return zCt(e,a,t)}case"function":{if(e!==void 0){var i=Nu,o=t(e);return Nu=i,jx(e,a,o)}break}}return t}function zCt(e,a,t){var r="";if(Array.isArray(t))for(var n=0;n<t.length;n++)r+=jx(e,a,t[n])+";";else for(var i in t){var o=t[i];if(typeof o!="object")v2e(o)&&(r+=n$(i)+":"+b2e(i,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&a==null)for(var s=0;s<o.length;s++)v2e(o[s])&&(r+=n$(i)+":"+b2e(i,o[s])+";");else{var l=jx(e,a,o);switch(i){case"animation":case"animationName":{r+=n$(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}return r}var y2e=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Nu,k2e=function(e,a,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,n="";Nu=void 0;var i=e[0];i==null||i.raw===void 0?(r=!1,n+=jx(t,a,i)):n+=i[0];for(var o=1;o<e.length;o++)n+=jx(t,a,e[o]),r&&(n+=i[o]);y2e.lastIndex=0;for(var s="",l;(l=y2e.exec(n))!==null;)s+="-"+l[1];var c=yCt(n)+s;return{name:c,styles:n,next:Nu}},SCt=function(e){return e()},CCt=em.useInsertionEffect?em.useInsertionEffect:!1,jCt=CCt||SCt,i$={}.hasOwnProperty,OCt=R.createContext(typeof HTMLElement<"u"?fCt({key:"css"}):null),ACt=function(e){return R.forwardRef(function(a,t){var r=R.useContext(OCt);return e(a,r,t)})},PCt=R.createContext({}),o$="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",MCt=function(e,a){var t={};for(var r in a)i$.call(a,r)&&(t[r]=a[r]);return t[o$]=e,t},TCt=function(e){var a=e.cache,t=e.serialized,r=e.isStringTag;return f2e(a,t,r),jCt(function(){return bCt(a,t,r)}),null},BCt=ACt(function(e,a,t){var r=e.css;typeof r=="string"&&a.registered[r]!==void 0&&(r=a.registered[r]);var n=e[o$],i=[r],o="";typeof e.className=="string"?o=vCt(a.registered,i,e.className):e.className!=null&&(o=e.className+" ");var s=k2e(i,void 0,R.useContext(PCt));o+=a.key+"-"+s.name;var l={};for(var c in e)i$.call(e,c)&&c!=="css"&&c!==o$&&(l[c]=e[c]);return l.ref=t,l.className=o,R.createElement(R.Fragment,null,R.createElement(TCt,{cache:a,serialized:s,isStringTag:typeof n=="string"}),R.createElement(n,l))}),Qa=function(e,a){var t=arguments;if(a==null||!i$.call(a,"css"))return R.createElement.apply(void 0,t);var r=t.length,n=new Array(r);n[0]=BCt,n[1]=MCt(e,a);for(var i=2;i<r;i++)n[i]=t[i];return R.createElement.apply(null,n)};function s$(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];return k2e(a)}var ECt=function(){var e=s$.apply(void 0,arguments),a="animation-"+e.name;return{name:a,styles:"@keyframes "+a+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function _Ct(e,a){return a||(a=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(a)}}))}const LCt=Math.min,RCt=Math.max,UM=Math.round,WM=Math.floor,ZM=e=>({x:e,y:e});function NCt(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function x2e(e){return z2e(e)?(e.nodeName||"").toLowerCase():"#document"}function Hd(e){var a;return(e==null||(a=e.ownerDocument)==null?void 0:a.defaultView)||window}function w2e(e){var a;return(a=(z2e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:a.documentElement}function z2e(e){return e instanceof Node||e instanceof Hd(e).Node}function DCt(e){return e instanceof Element||e instanceof Hd(e).Element}function l$(e){return e instanceof HTMLElement||e instanceof Hd(e).HTMLElement}function S2e(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Hd(e).ShadowRoot}function C2e(e){const{overflow:a,overflowX:t,overflowY:r,display:n}=c$(e);return/auto|scroll|overlay|hidden|clip/.test(a+r+t)&&!["inline","contents"].includes(n)}function $Ct(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ICt(e){return["html","body","#document"].includes(x2e(e))}function c$(e){return Hd(e).getComputedStyle(e)}function KCt(e){if(x2e(e)==="html")return e;const a=e.assignedSlot||e.parentNode||S2e(e)&&e.host||w2e(e);return S2e(a)?a.host:a}function j2e(e){const a=KCt(e);return ICt(a)?e.ownerDocument?e.ownerDocument.body:e.body:l$(a)&&C2e(a)?a:j2e(a)}function QM(e,a,t){var r;a===void 0&&(a=[]),t===void 0&&(t=!0);const n=j2e(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Hd(n);return i?a.concat(o,o.visualViewport||[],C2e(n)?n:[],o.frameElement&&t?QM(o.frameElement):[]):a.concat(n,QM(n,[],t))}function VCt(e){const a=c$(e);let t=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const n=l$(e),i=n?e.offsetWidth:t,o=n?e.offsetHeight:r,s=UM(t)!==i||UM(r)!==o;return s&&(t=i,r=o),{width:t,height:r,$:s}}function u$(e){return DCt(e)?e:e.contextElement}function O2e(e){const a=u$(e);if(!l$(a))return ZM(1);const t=a.getBoundingClientRect(),{width:r,height:n,$:i}=VCt(a);let o=(i?UM(t.width):t.width)/r,s=(i?UM(t.height):t.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const HCt=ZM(0);function FCt(e){const a=Hd(e);return!$Ct()||!a.visualViewport?HCt:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function GCt(e,a,t){return!1}function A2e(e,a,t,r){a===void 0&&(a=!1);const n=e.getBoundingClientRect(),i=u$(e);let o=ZM(1);a&&(o=O2e(e));const s=GCt()?FCt(i):ZM(0);let l=(n.left+s.x)/o.x,c=(n.top+s.y)/o.y,u=n.width/o.x,d=n.height/o.y;if(i){const p=Hd(i),m=r;let g=p.frameElement;for(;g&&r&&m!==p;){const b=O2e(g),y=g.getBoundingClientRect(),v=c$(g),k=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*b.x,z=y.top+(g.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=k,c+=z,g=Hd(g).frameElement}}return NCt({width:u,height:d,x:l,y:c})}function qCt(e,a){let t=null,r;const n=w2e(e);function i(){clearTimeout(r),t&&t.disconnect(),t=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||a(),!d||!p)return;const m=WM(u),g=WM(n.clientWidth-(c+d)),b=WM(n.clientHeight-(u+p)),y=WM(c),v={rootMargin:-m+"px "+-g+"px "+-b+"px "+-y+"px",threshold:RCt(0,LCt(1,l))||1};let k=!0;function z(C){const w=C[0].intersectionRatio;if(w!==l){if(!k)return o();w?o(!1,w):r=setTimeout(()=>{o(!1,1e-7)},100)}k=!1}try{t=new IntersectionObserver(z,{...v,root:n.ownerDocument})}catch{t=new IntersectionObserver(z,v)}t.observe(e)}return o(!0),i}function JCt(e,a,t,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=u$(e),u=n||i?[...c?QM(c):[],...QM(a)]:[];u.forEach(v=>{n&&v.addEventListener("scroll",t,{passive:!0}),i&&v.addEventListener("resize",t)});const d=c&&s?qCt(c,t):null;let p=-1,m=null;o&&(m=new ResizeObserver(v=>{let[k]=v;k&&k.target===c&&m&&(m.unobserve(a),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{m&&m.observe(a)})),t()}),c&&!l&&m.observe(c),m.observe(a));let g,b=l?A2e(e):null;l&&y();function y(){const v=A2e(e);b&&(v.x!==b.x||v.y!==b.y||v.width!==b.width||v.height!==b.height)&&t(),b=v,g=requestAnimationFrame(y)}return t(),()=>{u.forEach(v=>{n&&v.removeEventListener("scroll",t),i&&v.removeEventListener("resize",t)}),d&&d(),m&&m.disconnect(),m=null,l&&cancelAnimationFrame(g)}}var d$=R.useLayoutEffect,UCt=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],XM=function(){};function WCt(e,a){return a?a[0]==="-"?e+a:e+"__"+a:e}function ZCt(e,a){for(var t=arguments.length,r=new Array(t>2?t-2:0),n=2;n<t;n++)r[n-2]=arguments[n];var i=[].concat(r);if(a&&e)for(var o in a)a.hasOwnProperty(o)&&a[o]&&i.push("".concat(WCt(e,o)));return i.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var P2e=function(e){return ijt(e)?e.filter(Boolean):gf(e)==="object"&&e!==null?[e]:[]},M2e=function(e){var a=Vd(e,UCt);return Ya({},a)},Vn=function(e,a,t){var r=e.cx,n=e.getStyles,i=e.getClassNames,o=e.className;return{css:n(a,e),className:r(t??{},i(a,e),o)}};function YM(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function QCt(e){return YM(e)?window.innerHeight:e.clientHeight}function T2e(e){return YM(e)?window.pageYOffset:e.scrollTop}function e5(e,a){if(YM(e)){window.scrollTo(0,a);return}e.scrollTop=a}function XCt(e){var a=getComputedStyle(e),t=a.position==="absolute",r=/(auto|scroll)/;if(a.position==="fixed")return document.documentElement;for(var n=e;n=n.parentElement;)if(a=getComputedStyle(n),!(t&&a.position==="static")&&r.test(a.overflow+a.overflowY+a.overflowX))return n;return document.documentElement}function YCt(e,a,t,r){return t*((e=e/r-1)*e*e+1)+a}function a5(e,a){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:XM,n=T2e(e),i=a-n,o=10,s=0;function l(){s+=o;var c=YCt(s,n,i,t);e5(e,c),s<t?window.requestAnimationFrame(l):r(e)}l()}function B2e(e,a){var t=e.getBoundingClientRect(),r=a.getBoundingClientRect(),n=a.offsetHeight/3;r.bottom+n>t.bottom?e5(e,Math.min(a.offsetTop+a.clientHeight-e.offsetHeight+n,e.scrollHeight)):r.top-n<t.top&&e5(e,Math.max(a.offsetTop-n,0))}function ejt(e){var a=e.getBoundingClientRect();return{bottom:a.bottom,height:a.height,left:a.left,right:a.right,top:a.top,width:a.width}}function E2e(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function ajt(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var _2e=!1,tjt={get passive(){return _2e=!0}},t5=typeof window<"u"?window:{};t5.addEventListener&&t5.removeEventListener&&(t5.addEventListener("p",XM,tjt),t5.removeEventListener("p",XM,!1));var rjt=_2e;function njt(e){return e!=null}function ijt(e){return Array.isArray(e)}function r5(e,a,t){return e?a:t}var ojt=function(e){for(var a=arguments.length,t=new Array(a>1?a-1:0),r=1;r<a;r++)t[r-1]=arguments[r];var n=Object.entries(e).filter(function(i){var o=Kd(i,1),s=o[0];return!t.includes(s)});return n.reduce(function(i,o){var s=Kd(o,2),l=s[0],c=s[1];return i[l]=c,i},{})},sjt=["children","innerProps"],ljt=["children","innerProps"];function cjt(e){var a=e.maxHeight,t=e.menuEl,r=e.minHeight,n=e.placement,i=e.shouldScroll,o=e.isFixedPosition,s=e.controlHeight,l=XCt(t),c={placement:"bottom",maxHeight:a};if(!t||!t.offsetParent)return c;var u=l.getBoundingClientRect(),d=u.height,p=t.getBoundingClientRect(),m=p.bottom,g=p.height,b=p.top,y=t.offsetParent.getBoundingClientRect(),v=y.top,k=o?window.innerHeight:QCt(l),z=T2e(l),C=parseInt(getComputedStyle(t).marginBottom,10),w=parseInt(getComputedStyle(t).marginTop,10),S=v-w,O=k-b,A=S+z,B=d-z-b,L=m-k+z+C,q=z+b-w,N=160;switch(n){case"auto":case"bottom":if(O>=g)return{placement:"bottom",maxHeight:a};if(B>=g&&!o)return i&&a5(l,L,N),{placement:"bottom",maxHeight:a};if(!o&&B>=r||o&&O>=r){i&&a5(l,L,N);var U=o?O-C:B-C;return{placement:"bottom",maxHeight:U}}if(n==="auto"||o){var D=a,Y=o?S:A;return Y>=r&&(D=Math.min(Y-C-s,a)),{placement:"top",maxHeight:D}}if(n==="bottom")return i&&e5(l,L),{placement:"bottom",maxHeight:a};break;case"top":if(S>=g)return{placement:"top",maxHeight:a};if(A>=g&&!o)return i&&a5(l,q,N),{placement:"top",maxHeight:a};if(!o&&A>=r||o&&S>=r){var te=a;return(!o&&A>=r||o&&S>=r)&&(te=o?S-w:A-w),i&&a5(l,q,N),{placement:"top",maxHeight:te}}return{placement:"bottom",maxHeight:a};default:throw new Error('Invalid placement provided "'.concat(n,'".'))}return c}function ujt(e){var a={bottom:"top",top:"bottom"};return e?a[e]:"bottom"}var L2e=function(e){return e==="auto"?"bottom":e},djt=function(e,a){var t,r=e.placement,n=e.theme,i=n.borderRadius,o=n.spacing,s=n.colors;return Ya((t={label:"menu"},xx(t,ujt(r),"100%"),xx(t,"position","absolute"),xx(t,"width","100%"),xx(t,"zIndex",1),t),a?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:o.menuGutter,marginTop:o.menuGutter})},R2e=R.createContext(null),pjt=function(e){var a=e.children,t=e.minMenuHeight,r=e.maxMenuHeight,n=e.menuPlacement,i=e.menuPosition,o=e.menuShouldScrollIntoView,s=e.theme,l=R.useContext(R2e)||{},c=l.setPortalPlacement,u=R.useRef(null),d=R.useState(r),p=Kd(d,2),m=p[0],g=p[1],b=R.useState(null),y=Kd(b,2),v=y[0],k=y[1],z=s.spacing.controlHeight;return d$(function(){var C=u.current;if(C){var w=i==="fixed",S=o&&!w,O=cjt({maxHeight:r,menuEl:C,minHeight:t,placement:n,shouldScroll:S,isFixedPosition:w,controlHeight:z});g(O.maxHeight),k(O.placement),c?.(O.placement)}},[r,n,i,o,t,c,z]),a({ref:u,placerProps:Ya(Ya({},e),{},{placement:v||L2e(n),maxHeight:m})})},hjt=function(e){var a=e.children,t=e.innerRef,r=e.innerProps;return Qa("div",ot({},Vn(e,"menu",{menu:!0}),{ref:t},r),a)},mjt=hjt,fjt=function(e,a){var t=e.maxHeight,r=e.theme.spacing.baseUnit;return Ya({maxHeight:t,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},a?{}:{paddingBottom:r,paddingTop:r})},gjt=function(e){var a=e.children,t=e.innerProps,r=e.innerRef,n=e.isMulti;return Qa("div",ot({},Vn(e,"menuList",{"menu-list":!0,"menu-list--is-multi":n}),{ref:r},t),a)},N2e=function(e,a){var t=e.theme,r=t.spacing.baseUnit,n=t.colors;return Ya({textAlign:"center"},a?{}:{color:n.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},vjt=N2e,bjt=N2e,yjt=function(e){var a=e.children,t=a===void 0?"No options":a,r=e.innerProps,n=Vd(e,sjt);return Qa("div",ot({},Vn(Ya(Ya({},n),{},{children:t,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),t)},kjt=function(e){var a=e.children,t=a===void 0?"Loading...":a,r=e.innerProps,n=Vd(e,ljt);return Qa("div",ot({},Vn(Ya(Ya({},n),{},{children:t,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),t)},xjt=function(e){var a=e.rect,t=e.offset,r=e.position;return{left:a.left,position:r,top:t,width:a.width,zIndex:1}},wjt=function(e){var a=e.appendTo,t=e.children,r=e.controlElement,n=e.innerProps,i=e.menuPlacement,o=e.menuPosition,s=R.useRef(null),l=R.useRef(null),c=R.useState(L2e(i)),u=Kd(c,2),d=u[0],p=u[1],m=R.useMemo(function(){return{setPortalPlacement:p}},[]),g=R.useState(null),b=Kd(g,2),y=b[0],v=b[1],k=R.useCallback(function(){if(r){var S=ejt(r),O=o==="fixed"?0:window.pageYOffset,A=S[d]+O;(A!==y?.offset||S.left!==y?.rect.left||S.width!==y?.rect.width)&&v({offset:A,rect:S})}},[r,o,d,y?.offset,y?.rect.left,y?.rect.width]);d$(function(){k()},[k]);var z=R.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),r&&s.current&&(l.current=JCt(r,s.current,k,{elementResize:"ResizeObserver"in window}))},[r,k]);d$(function(){z()},[z]);var C=R.useCallback(function(S){s.current=S,z()},[z]);if(!a&&o!=="fixed"||!y)return null;var w=Qa("div",ot({ref:C},Vn(Ya(Ya({},e),{},{offset:y.offset,position:o,rect:y.rect}),"menuPortal",{"menu-portal":!0}),n),t);return Qa(R2e.Provider,{value:m},a?Jz.createPortal(w,a):w)},zjt=function(e){var a=e.isDisabled,t=e.isRtl;return{label:"container",direction:t?"rtl":void 0,pointerEvents:a?"none":void 0,position:"relative"}},Sjt=function(e){var a=e.children,t=e.innerProps,r=e.isDisabled,n=e.isRtl;return Qa("div",ot({},Vn(e,"container",{"--is-disabled":r,"--is-rtl":n}),t),a)},Cjt=function(e,a){var t=e.theme.spacing,r=e.isMulti,n=e.hasValue,i=e.selectProps.controlShouldRenderValue;return Ya({alignItems:"center",display:r&&n&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},a?{}:{padding:"".concat(t.baseUnit/2,"px ").concat(t.baseUnit*2,"px")})},jjt=function(e){var a=e.children,t=e.innerProps,r=e.isMulti,n=e.hasValue;return Qa("div",ot({},Vn(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":n}),t),a)},Ojt=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Ajt=function(e){var a=e.children,t=e.innerProps;return Qa("div",ot({},Vn(e,"indicatorsContainer",{indicators:!0}),t),a)},D2e,Pjt=["size"],Mjt=["innerProps","isRtl","size"],Tjt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},$2e=function(e){var a=e.size,t=Vd(e,Pjt);return Qa("svg",ot({height:a,width:a,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Tjt},t))},p$=function(e){return Qa($2e,ot({size:20},e),Qa("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},I2e=function(e){return Qa($2e,ot({size:20},e),Qa("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},K2e=function(e,a){var t=e.isFocused,r=e.theme,n=r.spacing.baseUnit,i=r.colors;return Ya({label:"indicatorContainer",display:"flex",transition:"color 150ms"},a?{}:{color:t?i.neutral60:i.neutral20,padding:n*2,":hover":{color:t?i.neutral80:i.neutral40}})},Bjt=K2e,Ejt=function(e){var a=e.children,t=e.innerProps;return Qa("div",ot({},Vn(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),t),a||Qa(I2e,null))},_jt=K2e,Ljt=function(e){var a=e.children,t=e.innerProps;return Qa("div",ot({},Vn(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),t),a||Qa(p$,null))},Rjt=function(e,a){var t=e.isDisabled,r=e.theme,n=r.spacing.baseUnit,i=r.colors;return Ya({label:"indicatorSeparator",alignSelf:"stretch",width:1},a?{}:{backgroundColor:t?i.neutral10:i.neutral20,marginBottom:n*2,marginTop:n*2})},Njt=function(e){var a=e.innerProps;return Qa("span",ot({},a,Vn(e,"indicatorSeparator",{"indicator-separator":!0})))},Djt=ECt(D2e||(D2e=_Ct([`
11903
11903
  0%, 80%, 100% { opacity: 0; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/openapi-docs",
3
- "version": "3.15.0-next.12",
3
+ "version": "3.15.0-next.13",
4
4
  "description": "Redocly OpenAPI Docs",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -37,7 +37,7 @@
37
37
  "util": "~0.12.5",
38
38
  "web-vitals": "3.3.1",
39
39
  "@redocly/config": "0.37.0",
40
- "@redocly/replay": "0.18.0-next.12"
40
+ "@redocly/replay": "0.18.0-next.13"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@jest/globals": "29.5.0",
@@ -75,7 +75,7 @@
75
75
  "typescript": "5.9.3",
76
76
  "url": "~0.11.0",
77
77
  "vite": "7.1.9",
78
- "@redocly/theme": "0.59.0-next.11"
78
+ "@redocly/theme": "0.59.0-next.12"
79
79
  },
80
80
  "scripts": {
81
81
  "start": "npm run copy-highlight-hook && vite",