@fern-api/typescript-dynamic-snippets 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DynamicSnippetsGenerator.cjs +6 -6
- package/cjs/DynamicSnippetsGenerator.d.cts +4 -2
- package/cjs/{DynamicSnippetsGeneratorContext-DFkk3dho.d.cts → DynamicSnippetsGeneratorContext-CmDa2k9n.d.cts} +1 -1
- package/cjs/EndpointSnippetGenerator.cjs +6 -6
- package/cjs/EndpointSnippetGenerator.d.cts +2 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +11 -11
- package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
- package/cjs/context/DynamicTypeLiteralMapper.cjs +6 -6
- package/cjs/context/DynamicTypeLiteralMapper.d.cts +1 -1
- package/cjs/context/FilePropertyMapper.cjs +15 -15
- package/cjs/context/FilePropertyMapper.d.cts +1 -1
- package/cjs/index.cjs +18 -18
- package/cjs/index.d.cts +2 -1
- package/esm/DynamicSnippetsGenerator.d.ts +4 -2
- package/esm/DynamicSnippetsGenerator.js +1 -1
- package/esm/{DynamicSnippetsGeneratorContext-DFkk3dho.d.ts → DynamicSnippetsGeneratorContext-CmDa2k9n.d.ts} +1 -1
- package/esm/EndpointSnippetGenerator.d.ts +2 -1
- package/esm/EndpointSnippetGenerator.js +1 -1
- package/esm/chunk-D7ZDXIQ6.js +1 -0
- package/esm/chunk-JGNWFXNM.js +1 -0
- package/esm/chunk-PXWPOKCJ.js +1 -0
- package/esm/chunk-RL2XA35J.js +27 -0
- package/esm/{chunk-25TNFA5L.js → chunk-T2HPPEKP.js} +1 -1
- package/esm/{chunk-LX5O4JB7.js → chunk-XC2QAVJY.js} +1 -1
- package/esm/chunk-XXAPM4QI.js +1 -0
- package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
- package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
- package/esm/context/DynamicTypeLiteralMapper.d.ts +1 -1
- package/esm/context/DynamicTypeLiteralMapper.js +1 -1
- package/esm/context/FilePropertyMapper.d.ts +1 -1
- package/esm/context/FilePropertyMapper.js +1 -1
- package/esm/index.d.ts +2 -1
- package/esm/index.js +10 -10
- package/package.json +1 -1
- package/esm/chunk-736FTN3M.js +0 -1
- package/esm/chunk-CQ55KPJT.js +0 -1
- package/esm/chunk-SQLJANKO.js +0 -1
- package/esm/chunk-V6G7NZKW.js +0 -1
- package/esm/chunk-YD6EIACZ.js +0 -27
package/cjs/index.cjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";var Wu=Object.create;var ze=Object.defineProperty,Vu=Object.defineProperties,Gu=Object.getOwnPropertyDescriptor,zu=Object.getOwnPropertyDescriptors,Yu=Object.getOwnPropertyNames,wr=Object.getOwnPropertySymbols,Hu=Object.getPrototypeOf,ht=Object.prototype.hasOwnProperty,$n=Object.prototype.propertyIsEnumerable;var yt=(t,e,r)=>e in t?ze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,qn=(t,e)=>{for(var r in e||(e={}))ht.call(e,r)&&yt(t,r,e[r]);if(wr)for(var r of wr(e))$n.call(e,r)&&yt(t,r,e[r]);return t},_n=(t,e)=>Vu(t,zu(e));var Mn=t=>typeof t=="symbol"?t:t+"",Dn=(t,e)=>{var r={};for(var n in t)ht.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&wr)for(var n of wr(t))e.indexOf(n)<0&&$n.call(t,n)&&(r[n]=t[n]);return r};var Ae=(t,e)=>()=>(t&&(e=t(t=0)),e);var v=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),gt=(t,e)=>{for(var r in e)ze(t,r,{get:e[r],enumerable:!0})},jn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Yu(e))!ht.call(t,o)&&o!==r&&ze(t,o,{get:()=>e[o],enumerable:!(n=Gu(e,o))||n.enumerable});return t};var Ju=(t,e,r)=>(r=t!=null?Wu(Hu(t)):{},jn(e||!t||!t.__esModule?ze(r,"default",{value:t,enumerable:!0}):r,t)),Wn=t=>jn(ze({},"__esModule",{value:!0}),t);var g=(t,e,r)=>yt(t,typeof e!="symbol"?e+"":e,r);function Gn(){throw new Error("setTimeout has not been defined")}function zn(){throw new Error("clearTimeout has not been defined")}function Yn(t){if(Q===setTimeout)return setTimeout(t,0);if((Q===Gn||!Q)&&setTimeout)return Q=setTimeout,setTimeout(t,0);try{return Q(t,0)}catch(e){try{return Q.call(null,t,0)}catch(r){return Q.call(this,t,0)}}}function Ku(t){if(X===clearTimeout)return clearTimeout(t);if((X===zn||!X)&&clearTimeout)return X=clearTimeout,clearTimeout(t);try{return X(t)}catch(e){try{return X.call(null,t)}catch(r){return X.call(this,t)}}}function Zu(){!Te||!ue||(Te=!1,ue.length?V=ue.concat(V):br=-1,V.length&&Hn())}function Hn(){if(!Te){var t=Yn(Zu);Te=!0;for(var e=V.length;e;){for(ue=V,V=[];++br<e;)ue&&ue[br].run();br=-1,e=V.length}ue=null,Te=!1,Ku(t)}}function Qu(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];V.push(new Jn(t,e)),V.length===1&&!Te&&Yn(Hn)}function Jn(t,e){this.fun=t,this.array=e}function fe(){}function hf(t){throw new Error("process.binding is not supported")}function gf(){return"/"}function xf(t){throw new Error("process.chdir is not supported")}function vf(){return 0}function bf(t){var e=wf.call(Se)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}function Sf(){var t=new Date,e=t-Af;return e/1e3}var Q,X,V,Te,ue,br,Xu,ef,rf,tf,nf,of,af,sf,uf,ff,lf,pf,cf,df,mf,yf,Se,wf,Af,c,Vn,s=Ae(()=>{"use strict";Q=Gn,X=zn;typeof globalThis.setTimeout=="function"&&(Q=setTimeout);typeof globalThis.clearTimeout=="function"&&(X=clearTimeout);V=[],Te=!1,br=-1;Jn.prototype.run=function(){this.fun.apply(null,this.array)};Xu="browser",ef="browser",rf=!0,tf={},nf=[],of="",af={},sf={},uf={};ff=fe,lf=fe,pf=fe,cf=fe,df=fe,mf=fe,yf=fe;Se=globalThis.performance||{},wf=Se.now||Se.mozNow||Se.msNow||Se.oNow||Se.webkitNow||function(){return new Date().getTime()};Af=new Date;c={nextTick:Qu,title:Xu,browser:rf,env:tf,argv:nf,version:of,versions:af,on:ff,addListener:lf,once:pf,off:cf,removeListener:df,removeAllListeners:mf,emit:yf,binding:hf,cwd:gf,chdir:xf,umask:vf,hrtime:bf,platform:ef,release:sf,config:uf,uptime:Sf},Vn={};Object.keys(Vn).forEach(t=>{let e=t.split("."),r=c;for(let n=0;n<e.length;n++){let o=e[n];n===e.length-1?r[o]=Vn[t]:r=r[o]||(r[o]={})}})});function Xn(){vt=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)$[e]=t[e],U[t.charCodeAt(e)]=e;U[45]=62,U[95]=63}function Ef(t){vt||Xn();var e,r,n,o,i,a,l=t.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i=t[l-2]==="="?2:t[l-1]==="="?1:0,a=new Tf(l*3/4-i),n=i>0?l-4:l;var p=0;for(e=0,r=0;e<n;e+=4,r+=3)o=U[t.charCodeAt(e)]<<18|U[t.charCodeAt(e+1)]<<12|U[t.charCodeAt(e+2)]<<6|U[t.charCodeAt(e+3)],a[p++]=o>>16&255,a[p++]=o>>8&255,a[p++]=o&255;return i===2?(o=U[t.charCodeAt(e)]<<2|U[t.charCodeAt(e+1)]>>4,a[p++]=o&255):i===1&&(o=U[t.charCodeAt(e)]<<10|U[t.charCodeAt(e+1)]<<4|U[t.charCodeAt(e+2)]>>2,a[p++]=o>>8&255,a[p++]=o&255),a}function If(t){return $[t>>18&63]+$[t>>12&63]+$[t>>6&63]+$[t&63]}function Rf(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16)+(t[i+1]<<8)+t[i+2],o.push(If(n));return o.join("")}function Kn(t){vt||Xn();for(var e,r=t.length,n=r%3,o="",i=[],a=16383,l=0,p=r-n;l<p;l+=a)i.push(Rf(t,l,l+a>p?p:l+a));return n===1?(e=t[r-1],o+=$[e>>2],o+=$[e<<4&63],o+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],o+=$[e>>10],o+=$[e>>4&63],o+=$[e<<2&63],o+="="),i.push(o),i.join("")}function Ar(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function G(t,e){if(Ar()<e)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=f.prototype):(t===null&&(t=new f(e)),t.length=e),t}function f(t,e,r){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(t,e,r);if(typeof t=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return wt(this,t)}return eo(this,t,e,r)}function eo(t,e,r,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer?Nf(t,e,r,n):typeof e=="string"?Pf(t,e,r):Of(t,e)}function ro(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Ff(t,e,r,n){return ro(e),e<=0?G(t,e):r!==void 0?typeof n=="string"?G(t,e).fill(r,n):G(t,e).fill(r):G(t,e)}function wt(t,e){if(ro(e),t=G(t,e<0?0:bt(e)|0),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function Pf(t,e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!f.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=to(e,r)|0;t=G(t,n);var o=t.write(e,r);return o!==n&&(t=t.slice(0,o)),t}function xt(t,e){var r=e.length<0?0:bt(e.length)|0;t=G(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function Nf(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return r===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,r):e=new Uint8Array(e,r,n),f.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=f.prototype):t=xt(t,e),t}function Of(t,e){if(q(e)){var r=bt(e.length)|0;return t=G(t,r),t.length===0||e.copy(t,0,0,r),t}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||Kf(e.length)?G(t,0):xt(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return xt(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function bt(t){if(t>=Ar())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ar().toString(16)+" bytes");return t|0}function q(t){return!!(t!=null&&t._isBuffer)}function to(t,e){if(q(t))return t.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var r=t.length;if(r===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Sr(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return fo(t).length;default:if(n)return Sr(t).length;e=(""+e).toLowerCase(),n=!0}}function Lf(t,e,r){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return jf(this,e,r);case"utf8":case"utf-8":return io(this,e,r);case"ascii":return Mf(this,e,r);case"latin1":case"binary":return Df(this,e,r);case"base64":return qf(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wf(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function le(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function no(t,e,r,n,o){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof e=="string"&&(e=f.from(e,n)),q(e))return e.length===0?-1:Zn(t,e,r,n,o);if(typeof e=="number")return e=e&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Zn(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function Zn(t,e,r,n,o){var i=1,a=t.length,l=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;i=2,a/=2,l/=2,r/=2}function p(A,T){return i===1?A[T]:A.readUInt16BE(T*i)}var m;if(o){var h=-1;for(m=r;m<a;m++)if(p(t,m)===p(e,h===-1?0:m-h)){if(h===-1&&(h=m),m-h+1===l)return h*i}else h!==-1&&(m-=m-h),h=-1}else for(r+l>a&&(r=a-l),m=r;m>=0;m--){for(var d=!0,x=0;x<l;x++)if(p(t,m+x)!==p(e,x)){d=!1;break}if(d)return m}return-1}function Cf(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var l=parseInt(e.substr(a*2,2),16);if(isNaN(l))return a;t[r+a]=l}return a}function Bf(t,e,r,n){return Ir(Sr(e,t.length-r),t,r,n)}function oo(t,e,r,n){return Ir(Hf(e),t,r,n)}function Uf(t,e,r,n){return oo(t,e,r,n)}function kf(t,e,r,n){return Ir(fo(e),t,r,n)}function $f(t,e,r,n){return Ir(Jf(e,t.length-r),t,r,n)}function qf(t,e,r){return e===0&&r===t.length?Kn(t):Kn(t.slice(e,r))}function io(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i=t[o],a=null,l=i>239?4:i>223?3:i>191?2:1;if(o+l<=r){var p,m,h,d;switch(l){case 1:i<128&&(a=i);break;case 2:p=t[o+1],(p&192)===128&&(d=(i&31)<<6|p&63,d>127&&(a=d));break;case 3:p=t[o+1],m=t[o+2],(p&192)===128&&(m&192)===128&&(d=(i&15)<<12|(p&63)<<6|m&63,d>2047&&(d<55296||d>57343)&&(a=d));break;case 4:p=t[o+1],m=t[o+2],h=t[o+3],(p&192)===128&&(m&192)===128&&(h&192)===128&&(d=(i&15)<<18|(p&63)<<12|(m&63)<<6|h&63,d>65535&&d<1114112&&(a=d))}}a===null?(a=65533,l=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),o+=l}return _f(n)}function _f(t){var e=t.length;if(e<=Qn)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Qn));return r}function Mf(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]&127);return n}function Df(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function jf(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=Yf(t[i]);return o}function Wf(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+n[i+1]*256);return o}function R(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,o,i){if(!q(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function Tr(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>(n?o:1-o)*8}function Er(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>(n?o:3-o)*8&255}function ao(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function so(t,e,r,n,o){return o||ao(t,e,r,4,34028234663852886e22,-34028234663852886e22),po(t,e,r,n,23,4),r+4}function uo(t,e,r,n,o){return o||ao(t,e,r,8,17976931348623157e292,-17976931348623157e292),po(t,e,r,n,52,8),r+8}function Gf(t){if(t=zf(t).replace(Vf,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function zf(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Yf(t){return t<16?"0"+t.toString(16):t.toString(16)}function Sr(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function Hf(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function Jf(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function fo(t){return Ef(Gf(t))}function Ir(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Kf(t){return t!==t}function Zf(t){return t!=null&&(!!t._isBuffer||lo(t)||Qf(t))}function lo(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Qf(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&lo(t.slice(0,0))}function Rr(t,e,r,n,o){var i,a,l=o*8-n-1,p=(1<<l)-1,m=p>>1,h=-7,d=r?o-1:0,x=r?-1:1,A=t[e+d];for(d+=x,i=A&(1<<-h)-1,A>>=-h,h+=l;h>0;i=i*256+t[e+d],d+=x,h-=8);for(a=i&(1<<-h)-1,i>>=-h,h+=n;h>0;a=a*256+t[e+d],d+=x,h-=8);if(i===0)i=1-m;else{if(i===p)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-m}return(A?-1:1)*a*Math.pow(2,i-n)}function po(t,e,r,n,o,i){var a,l,p,m=i*8-o-1,h=(1<<m)-1,d=h>>1,x=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=n?0:i-1,T=n?1:-1,I=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(p=Math.pow(2,-a))<1&&(a--,p*=2),a+d>=1?e+=x/p:e+=x*Math.pow(2,1-d),e*p>=2&&(a++,p/=2),a+d>=h?(l=0,a=h):a+d>=1?(l=(e*p-1)*Math.pow(2,o),a=a+d):(l=e*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;t[r+A]=l&255,A+=T,l/=256,o-=8);for(a=a<<o|l,m+=o;m>0;t[r+A]=a&255,A+=T,a/=256,m-=8);t[r+A-T]|=I*128}var $,U,Tf,vt,Qn,Vf,co=Ae(()=>{"use strict";s();u();$=[],U=[],Tf=typeof Uint8Array!="undefined"?Uint8Array:Array,vt=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(t){return t.__proto__=f.prototype,t};f.from=function(t,e,r){return eo(null,t,e,r)};f.kMaxLength=Ar();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(t,e,r){return Ff(null,t,e,r)};f.allocUnsafe=function(t){return wt(null,t)};f.allocUnsafeSlow=function(t){return wt(null,t)};f.isBuffer=Zf;f.compare=function(e,r){if(!q(e)||!q(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,o=r.length,i=0,a=Math.min(n,o);i<a;++i)if(e[i]!==r[i]){n=e[i],o=r[i];break}return n<o?-1:o<n?1:0};f.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}};f.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return f.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var o=f.allocUnsafe(r),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!q(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(o,i),i+=a.length}return o};f.byteLength=to;f.prototype._isBuffer=!0;f.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)le(this,r,r+1);return this};f.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)le(this,r,r+3),le(this,r+1,r+2);return this};f.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)le(this,r,r+7),le(this,r+1,r+6),le(this,r+2,r+5),le(this,r+3,r+4);return this};f.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?io(this,0,e):Lf.apply(this,arguments)};f.prototype.equals=function(e){if(!q(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:f.compare(this,e)===0};f.prototype.compare=function(e,r,n,o,i){if(!q(e))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),r<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,i>>>=0,this===e)return 0;for(var a=i-o,l=n-r,p=Math.min(a,l),m=this.slice(o,i),h=e.slice(r,n),d=0;d<p;++d)if(m[d]!==h[d]){a=m[d],l=h[d];break}return a<l?-1:l<a?1:0};f.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};f.prototype.indexOf=function(e,r,n){return no(this,e,r,n,!0)};f.prototype.lastIndexOf=function(e,r,n){return no(this,e,r,n,!1)};f.prototype.write=function(e,r,n,o){if(r===void 0)o="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")o=r,n=this.length,r=0;else if(isFinite(r))r=r|0,isFinite(n)?(n=n|0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-r;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var a=!1;;)switch(o){case"hex":return Cf(this,e,r,n);case"utf8":case"utf-8":return Bf(this,e,r,n);case"ascii":return oo(this,e,r,n);case"latin1":case"binary":return Uf(this,e,r,n);case"base64":return kf(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $f(this,e,r,n);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),a=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Qn=4096;f.prototype.slice=function(e,r){var n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var o;if(f.TYPED_ARRAY_SUPPORT)o=this.subarray(e,r),o.__proto__=f.prototype;else{var i=r-e;o=new f(i,void 0);for(var a=0;a<i;++a)o[a]=this[a+e]}return o};f.prototype.readUIntLE=function(e,r,n){e=e|0,r=r|0,n||R(e,r,this.length);for(var o=this[e],i=1,a=0;++a<r&&(i*=256);)o+=this[e+a]*i;return o};f.prototype.readUIntBE=function(e,r,n){e=e|0,r=r|0,n||R(e,r,this.length);for(var o=this[e+--r],i=1;r>0&&(i*=256);)o+=this[e+--r]*i;return o};f.prototype.readUInt8=function(e,r){return r||R(e,1,this.length),this[e]};f.prototype.readUInt16LE=function(e,r){return r||R(e,2,this.length),this[e]|this[e+1]<<8};f.prototype.readUInt16BE=function(e,r){return r||R(e,2,this.length),this[e]<<8|this[e+1]};f.prototype.readUInt32LE=function(e,r){return r||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};f.prototype.readUInt32BE=function(e,r){return r||R(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};f.prototype.readIntLE=function(e,r,n){e=e|0,r=r|0,n||R(e,r,this.length);for(var o=this[e],i=1,a=0;++a<r&&(i*=256);)o+=this[e+a]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};f.prototype.readIntBE=function(e,r,n){e=e|0,r=r|0,n||R(e,r,this.length);for(var o=r,i=1,a=this[e+--o];o>0&&(i*=256);)a+=this[e+--o]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*r)),a};f.prototype.readInt8=function(e,r){return r||R(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};f.prototype.readInt16LE=function(e,r){r||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(e,r){r||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(e,r){return r||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};f.prototype.readInt32BE=function(e,r){return r||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};f.prototype.readFloatLE=function(e,r){return r||R(e,4,this.length),Rr(this,e,!0,23,4)};f.prototype.readFloatBE=function(e,r){return r||R(e,4,this.length),Rr(this,e,!1,23,4)};f.prototype.readDoubleLE=function(e,r){return r||R(e,8,this.length),Rr(this,e,!0,52,8)};f.prototype.readDoubleBE=function(e,r){return r||R(e,8,this.length),Rr(this,e,!1,52,8)};f.prototype.writeUIntLE=function(e,r,n,o){if(e=+e,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;L(this,e,r,n,i,0)}var a=1,l=0;for(this[r]=e&255;++l<n&&(a*=256);)this[r+l]=e/a&255;return r+n};f.prototype.writeUIntBE=function(e,r,n,o){if(e=+e,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;L(this,e,r,n,i,0)}var a=n-1,l=1;for(this[r+a]=e&255;--a>=0&&(l*=256);)this[r+a]=e/l&255;return r+n};f.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||L(this,e,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=e&255,r+1};f.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r|0,n||L(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Tr(this,e,r,!0),r+2};f.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||L(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Tr(this,e,r,!1),r+2};f.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r|0,n||L(this,e,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255):Er(this,e,r,!0),r+4};f.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||L(this,e,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):Er(this,e,r,!1),r+4};f.prototype.writeIntLE=function(e,r,n,o){if(e=+e,r=r|0,!o){var i=Math.pow(2,8*n-1);L(this,e,r,n,i-1,-i)}var a=0,l=1,p=0;for(this[r]=e&255;++a<n&&(l*=256);)e<0&&p===0&&this[r+a-1]!==0&&(p=1),this[r+a]=(e/l>>0)-p&255;return r+n};f.prototype.writeIntBE=function(e,r,n,o){if(e=+e,r=r|0,!o){var i=Math.pow(2,8*n-1);L(this,e,r,n,i-1,-i)}var a=n-1,l=1,p=0;for(this[r+a]=e&255;--a>=0&&(l*=256);)e<0&&p===0&&this[r+a+1]!==0&&(p=1),this[r+a]=(e/l>>0)-p&255;return r+n};f.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||L(this,e,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=e&255,r+1};f.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r|0,n||L(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Tr(this,e,r,!0),r+2};f.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||L(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Tr(this,e,r,!1),r+2};f.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||L(this,e,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):Er(this,e,r,!0),r+4};f.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||L(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):Er(this,e,r,!1),r+4};f.prototype.writeFloatLE=function(e,r,n){return so(this,e,r,!0,n)};f.prototype.writeFloatBE=function(e,r,n){return so(this,e,r,!1,n)};f.prototype.writeDoubleLE=function(e,r,n){return uo(this,e,r,!0,n)};f.prototype.writeDoubleBE=function(e,r,n){return uo(this,e,r,!1,n)};f.prototype.copy=function(e,r,n,o){if(n||(n=0),!o&&o!==0&&(o=this.length),r>=e.length&&(r=e.length),r||(r=0),o>0&&o<n&&(o=n),o===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-r<o-n&&(o=e.length-r+n);var i=o-n,a;if(this===e&&n<r&&r<o)for(a=i-1;a>=0;--a)e[a+r]=this[a+n];else if(i<1e3||!f.TYPED_ARRAY_SUPPORT)for(a=0;a<i;++a)e[a+r]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),r);return i};f.prototype.fill=function(e,r,n,o){if(typeof e=="string"){if(typeof r=="string"?(o=r,r=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),e.length===1){var i=e.charCodeAt(0);i<256&&(e=i)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!f.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof e=="number"&&(e=e&255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var a;if(typeof e=="number")for(a=r;a<n;++a)this[a]=e;else{var l=q(e)?e:Sr(new f(e,o).toString()),p=l.length;for(a=0;a<n-r;++a)this[a+r]=l[a%p]}return this};Vf=/[^+\/0-9A-Za-z-_]/g});var u=Ae(()=>{"use strict";co()});var ho=v((sh,yo)=>{"use strict";s();u();var Xf="Function.prototype.bind called on incompatible ",el=Object.prototype.toString,rl=Math.max,tl="[object Function]",mo=function(e,r){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var i=0;i<r.length;i+=1)n[i+e.length]=r[i];return n},nl=function(e,r){for(var n=[],o=r||0,i=0;o<e.length;o+=1,i+=1)n[i]=e[o];return n},ol=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};yo.exports=function(e){var r=this;if(typeof r!="function"||el.apply(r)!==tl)throw new TypeError(Xf+r);for(var n=nl(arguments,1),o,i=function(){if(this instanceof o){var h=r.apply(this,mo(n,arguments));return Object(h)===h?h:this}return r.apply(e,mo(n,arguments))},a=rl(0,r.length-n.length),l=[],p=0;p<a;p++)l[p]="$"+p;if(o=Function("binder","return function ("+ol(l,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var m=function(){};m.prototype=r.prototype,o.prototype=new m,m.prototype=null}return o}});var Fr=v((lh,go)=>{"use strict";s();u();var il=ho();go.exports=Function.prototype.bind||il});var vo=v((dh,xo)=>{"use strict";s();u();xo.exports=Error});var bo=v((hh,wo)=>{"use strict";s();u();wo.exports=EvalError});var So=v((vh,Ao)=>{"use strict";s();u();Ao.exports=RangeError});var Eo=v((Ah,To)=>{"use strict";s();u();To.exports=ReferenceError});var At=v((Eh,Io)=>{"use strict";s();u();Io.exports=SyntaxError});var P=v((Fh,Ro)=>{"use strict";s();u();Ro.exports=TypeError});var Po=v((Oh,Fo)=>{"use strict";s();u();Fo.exports=URIError});var St=v((Bh,No)=>{"use strict";s();u();No.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,r);if(a.value!==o||a.enumerable!==!0)return!1}return!0}});var Tt=v(($h,Lo)=>{"use strict";s();u();var Oo=typeof Symbol!="undefined"&&Symbol,al=St();Lo.exports=function(){return typeof Oo!="function"||typeof Symbol!="function"||typeof Oo("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:al()}});var Bo=v((Mh,Co)=>{"use strict";s();u();var Et={__proto__:null,foo:{}},sl=Object;Co.exports=function(){return{__proto__:Et}.foo===Et.foo&&!(Et instanceof sl)}});var ko=v((Wh,Uo)=>{"use strict";s();u();var ul=Function.prototype.call,fl=Object.prototype.hasOwnProperty,ll=Fr();Uo.exports=ll.call(ul,fl)});var B=v((zh,Do)=>{"use strict";s();u();var w,pl=vo(),cl=bo(),dl=So(),ml=Eo(),Fe=At(),Re=P(),yl=Po(),Mo=Function,It=function(t){try{return Mo('"use strict"; return ('+t+").constructor;")()}catch(e){}},pe=Object.getOwnPropertyDescriptor;if(pe)try{pe({},"")}catch(t){pe=null}var Rt=function(){throw new Re},hl=pe?function(){try{return arguments.callee,Rt}catch(t){try{return pe(arguments,"callee").get}catch(e){return Rt}}}():Rt,Ee=Tt()(),gl=Bo()(),F=Object.getPrototypeOf||(gl?function(t){return t.__proto__}:null),Ie={},xl=typeof Uint8Array=="undefined"||!F?w:F(Uint8Array),ce={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?w:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?w:ArrayBuffer,"%ArrayIteratorPrototype%":Ee&&F?F([][Symbol.iterator]()):w,"%AsyncFromSyncIteratorPrototype%":w,"%AsyncFunction%":Ie,"%AsyncGenerator%":Ie,"%AsyncGeneratorFunction%":Ie,"%AsyncIteratorPrototype%":Ie,"%Atomics%":typeof Atomics=="undefined"?w:Atomics,"%BigInt%":typeof BigInt=="undefined"?w:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?w:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?w:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?w:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":pl,"%eval%":eval,"%EvalError%":cl,"%Float32Array%":typeof Float32Array=="undefined"?w:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?w:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?w:FinalizationRegistry,"%Function%":Mo,"%GeneratorFunction%":Ie,"%Int8Array%":typeof Int8Array=="undefined"?w:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?w:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?w:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ee&&F?F(F([][Symbol.iterator]())):w,"%JSON%":typeof JSON=="object"?JSON:w,"%Map%":typeof Map=="undefined"?w:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ee||!F?w:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?w:Promise,"%Proxy%":typeof Proxy=="undefined"?w:Proxy,"%RangeError%":dl,"%ReferenceError%":ml,"%Reflect%":typeof Reflect=="undefined"?w:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?w:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ee||!F?w:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?w:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ee&&F?F(""[Symbol.iterator]()):w,"%Symbol%":Ee?Symbol:w,"%SyntaxError%":Fe,"%ThrowTypeError%":hl,"%TypedArray%":xl,"%TypeError%":Re,"%Uint8Array%":typeof Uint8Array=="undefined"?w:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?w:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?w:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?w:Uint32Array,"%URIError%":yl,"%WeakMap%":typeof WeakMap=="undefined"?w:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?w:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?w:WeakSet};if(F)try{null.error}catch(t){$o=F(F(t)),ce["%Error.prototype%"]=$o}var $o,vl=function t(e){var r;if(e==="%AsyncFunction%")r=It("async function () {}");else if(e==="%GeneratorFunction%")r=It("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=It("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&F&&(r=F(o.prototype))}return ce[e]=r,r},qo={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ye=Fr(),Pr=ko(),wl=Ye.call(Function.call,Array.prototype.concat),bl=Ye.call(Function.apply,Array.prototype.splice),_o=Ye.call(Function.call,String.prototype.replace),Nr=Ye.call(Function.call,String.prototype.slice),Al=Ye.call(Function.call,RegExp.prototype.exec),Sl=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Tl=/\\(\\)?/g,El=function(e){var r=Nr(e,0,1),n=Nr(e,-1);if(r==="%"&&n!=="%")throw new Fe("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Fe("invalid intrinsic syntax, expected opening `%`");var o=[];return _o(e,Sl,function(i,a,l,p){o[o.length]=l?_o(p,Tl,"$1"):a||i}),o},Il=function(e,r){var n=e,o;if(Pr(qo,n)&&(o=qo[n],n="%"+o[0]+"%"),Pr(ce,n)){var i=ce[n];if(i===Ie&&(i=vl(n)),typeof i=="undefined"&&!r)throw new Re("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Fe("intrinsic "+e+" does not exist!")};Do.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Re("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Re('"allowMissing" argument must be a boolean');if(Al(/^%?[^%]*%?$/,e)===null)throw new Fe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=El(e),o=n.length>0?n[0]:"",i=Il("%"+o+"%",r),a=i.name,l=i.value,p=!1,m=i.alias;m&&(o=m[0],bl(n,wl([0,1],m)));for(var h=1,d=!0;h<n.length;h+=1){var x=n[h],A=Nr(x,0,1),T=Nr(x,-1);if((A==='"'||A==="'"||A==="`"||T==='"'||T==="'"||T==="`")&&A!==T)throw new Fe("property names with quotes must have matching quotes");if((x==="constructor"||!d)&&(p=!0),o+="."+x,a="%"+o+"%",Pr(ce,a))l=ce[a];else if(l!=null){if(!(x in l)){if(!r)throw new Re("base intrinsic for "+e+" exists, but the property is not available.");return}if(pe&&h+1>=n.length){var I=pe(l,x);d=!!I,d&&"get"in I&&!("originalValue"in I.get)?l=I.get:l=l[x]}else d=Pr(l,x),l=l[x];d&&!p&&(ce[a]=l)}}return l}});var Lr=v((Jh,jo)=>{"use strict";s();u();var Rl=B(),Or=Rl("%Object.defineProperty%",!0)||!1;if(Or)try{Or({},"a",{value:1})}catch(t){Or=!1}jo.exports=Or});var Ft=v((Qh,Wo)=>{"use strict";s();u();var Fl=B(),Cr=Fl("%Object.getOwnPropertyDescriptor%",!0);if(Cr)try{Cr([],"length")}catch(t){Cr=null}Wo.exports=Cr});var Pt=v((rg,zo)=>{"use strict";s();u();var Vo=Lr(),Pl=At(),Pe=P(),Go=Ft();zo.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Pe("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Pe("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Pe("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Pe("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Pe("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Pe("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,p=!!Go&&Go(e,r);if(Vo)Vo(e,r,{configurable:a===null&&p?p.configurable:!a,enumerable:o===null&&p?p.enumerable:!o,value:n,writable:i===null&&p?p.writable:!i});else if(l||!o&&!i&&!a)e[r]=n;else throw new Pl("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Ot=v((og,Ho)=>{"use strict";s();u();var Nt=Lr(),Yo=function(){return!!Nt};Yo.hasArrayLengthDefineBug=function(){if(!Nt)return null;try{return Nt([],"length",{value:1}).length!==1}catch(e){return!0}};Ho.exports=Yo});var Xo=v((sg,Qo)=>{"use strict";s();u();var Nl=B(),Jo=Pt(),Ol=Ot()(),Ko=Ft(),Zo=P(),Ll=Nl("%Math.floor%");Qo.exports=function(e,r){if(typeof e!="function")throw new Zo("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Ll(r)!==r)throw new Zo("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&Ko){var a=Ko(e,"length");a&&!a.configurable&&(o=!1),a&&!a.writable&&(i=!1)}return(o||i||!n)&&(Ol?Jo(e,"length",r,!0,!0):Jo(e,"length",r)),e}});var kr=v((lg,Br)=>{"use strict";s();u();var Lt=Fr(),Ur=B(),Cl=Xo(),Bl=P(),ti=Ur("%Function.prototype.apply%"),ni=Ur("%Function.prototype.call%"),oi=Ur("%Reflect.apply%",!0)||Lt.call(ni,ti),ei=Lr(),Ul=Ur("%Math.max%");Br.exports=function(e){if(typeof e!="function")throw new Bl("a function is required");var r=oi(Lt,ni,arguments);return Cl(r,1+Ul(0,e.length-(arguments.length-1)),!0)};var ri=function(){return oi(Lt,ti,arguments)};ei?ei(Br.exports,"apply",{value:ri}):Br.exports.apply=ri});var Ct=v((dg,ai)=>{"use strict";s();u();var ii=Object.prototype.toString;ai.exports=function(e){var r=ii.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&ii.call(e.callee)==="[object Function]"),n}});var yi=v((hg,mi)=>{"use strict";s();u();var di;Object.keys||(He=Object.prototype.hasOwnProperty,Bt=Object.prototype.toString,si=Ct(),Ut=Object.prototype.propertyIsEnumerable,ui=!Ut.call({toString:null},"toString"),fi=Ut.call(function(){},"prototype"),Je=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],$r=function(t){var e=t.constructor;return e&&e.prototype===t},li={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},pi=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!li["$"+t]&&He.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{$r(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),ci=function(t){if(typeof window=="undefined"||!pi)return $r(t);try{return $r(t)}catch(e){return!1}},di=function(e){var r=e!==null&&typeof e=="object",n=Bt.call(e)==="[object Function]",o=si(e),i=r&&Bt.call(e)==="[object String]",a=[];if(!r&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var l=fi&&n;if(i&&e.length>0&&!He.call(e,0))for(var p=0;p<e.length;++p)a.push(String(p));if(o&&e.length>0)for(var m=0;m<e.length;++m)a.push(String(m));else for(var h in e)!(l&&h==="prototype")&&He.call(e,h)&&a.push(String(h));if(ui)for(var d=ci(e),x=0;x<Je.length;++x)!(d&&Je[x]==="constructor")&&He.call(e,Je[x])&&a.push(Je[x]);return a});var He,Bt,si,Ut,ui,fi,Je,$r,li,pi,ci;mi.exports=di});var vi=v((vg,xi)=>{"use strict";s();u();var kl=Array.prototype.slice,$l=Ct(),hi=Object.keys,qr=hi?function(e){return hi(e)}:yi(),gi=Object.keys;qr.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(n){return $l(n)?gi(kl.call(n)):gi(n)})}else Object.keys=qr;return Object.keys||qr};xi.exports=qr});var Ke=v((Ag,Si)=>{"use strict";s();u();var ql=vi(),_l=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Ml=Object.prototype.toString,Dl=Array.prototype.concat,wi=Pt(),jl=function(t){return typeof t=="function"&&Ml.call(t)==="[object Function]"},bi=Ot()(),Wl=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!jl(n)||!n())return}bi?wi(t,e,r,!0):wi(t,e,r)},Ai=function(t,e){var r=arguments.length>2?arguments[2]:{},n=ql(e);_l&&(n=Dl.call(n,Object.getOwnPropertySymbols(e)));for(var o=0;o<n.length;o+=1)Wl(t,n[o],e[n[o]],r[n[o]])};Ai.supportsDescriptors=!!bi;Si.exports=Ai});var k=v((Eg,Ii)=>{"use strict";s();u();var Ti=B(),Ei=kr(),Vl=Ei(Ti("String.prototype.indexOf"));Ii.exports=function(e,r){var n=Ti(e,!!r);return typeof n=="function"&&Vl(e,".prototype.")>-1?Ei(n):n}});var Pi=v((Fg,Fi)=>{"use strict";s();u();var Gl=B(),Ri=Gl("%Array%"),zl=!Ri.isArray&&k()("Object.prototype.toString");Fi.exports=Ri.isArray||function(e){return zl(e)==="[object Array]"}});var kt=v((Og,Ni)=>{"use strict";s();u();Ni.exports=Pi()});var Li=v((Bg,Oi)=>{"use strict";s();u();var Yl=B(),Hl=k(),Jl=P(),Kl=kt(),Zl=Yl("%Reflect.apply%",!0)||Hl("Function.prototype.apply");Oi.exports=function(e,r){var n=arguments.length>2?arguments[2]:[];if(!Kl(n))throw new Jl("Assertion failed: optional `argumentsList`, if provided, must be a List");return Zl(e,r,n)}});function Ci(){throw new Error("setTimeout has not been defined")}function Bi(){throw new Error("clearTimeout has not been defined")}function Ui(t){if(ee===setTimeout)return setTimeout(t,0);if((ee===Ci||!ee)&&setTimeout)return ee=setTimeout,setTimeout(t,0);try{return ee(t,0)}catch(e){try{return ee.call(null,t,0)}catch(r){return ee.call(this,t,0)}}}function Ql(t){if(re===clearTimeout)return clearTimeout(t);if((re===Bi||!re)&&clearTimeout)return re=clearTimeout,clearTimeout(t);try{return re(t)}catch(e){try{return re.call(null,t)}catch(r){return re.call(this,t)}}}function Xl(){!Oe||!de||(Oe=!1,de.length?z=de.concat(z):_r=-1,z.length&&ki())}function ki(){if(!Oe){var t=Ui(Xl);Oe=!0;for(var e=z.length;e;){for(de=z,z=[];++_r<e;)de&&de[_r].run();_r=-1,e=z.length}de=null,Oe=!1,Ql(t)}}function ep(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];z.push(new $i(t,e)),z.length===1&&!Oe&&Ui(ki)}function $i(t,e){this.fun=t,this.array=e}function me(){}function gp(t){throw new Error("process.binding is not supported")}function xp(){return"/"}function vp(t){throw new Error("process.chdir is not supported")}function wp(){return 0}function Ap(t){var e=bp.call(Ne)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}function Tp(){var t=new Date,e=t-Sp;return e/1e3}var ee,re,z,Oe,de,_r,rp,tp,np,op,ip,ap,sp,up,fp,lp,pp,cp,dp,mp,yp,hp,Ne,bp,Sp,Ep,Ze,qi=Ae(()=>{"use strict";s();u();ee=Ci,re=Bi;typeof globalThis.setTimeout=="function"&&(ee=setTimeout);typeof globalThis.clearTimeout=="function"&&(re=clearTimeout);z=[],Oe=!1,_r=-1;$i.prototype.run=function(){this.fun.apply(null,this.array)};rp="browser",tp="browser",np=!0,op={},ip=[],ap="",sp={},up={},fp={};lp=me,pp=me,cp=me,dp=me,mp=me,yp=me,hp=me;Ne=globalThis.performance||{},bp=Ne.now||Ne.mozNow||Ne.msNow||Ne.oNow||Ne.webkitNow||function(){return new Date().getTime()};Sp=new Date;Ep={nextTick:ep,title:rp,browser:np,env:op,argv:ip,version:ap,versions:sp,on:lp,addListener:pp,once:cp,off:dp,removeListener:mp,removeAllListeners:yp,emit:hp,binding:gp,cwd:xp,chdir:vp,umask:wp,hrtime:Ap,platform:tp,release:up,config:fp,uptime:Tp},Ze=Ep});var $t,qt,_i=Ae(()=>{"use strict";s();u();typeof Object.create=="function"?$t=function(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:$t=function(e,r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e};qt=$t});var Yi={};gt(Yi,{_extend:()=>Yt,debuglog:()=>Mi,default:()=>Up,deprecate:()=>Wt,format:()=>Wr,inherits:()=>qt,inspect:()=>M,isArray:()=>Vt,isBoolean:()=>Vr,isBuffer:()=>Vi,isDate:()=>jr,isError:()=>Xe,isFunction:()=>er,isNull:()=>rr,isNullOrUndefined:()=>Di,isNumber:()=>Gt,isObject:()=>ye,isPrimitive:()=>Wi,isRegExp:()=>Qe,isString:()=>tr,isSymbol:()=>ji,isUndefined:()=>_,log:()=>Gi});function Wr(t){if(!tr(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(M(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,i=String(t).replace(Ip,function(l){if(l==="%%")return"%";if(r>=o)return l;switch(l){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(p){return"[Circular]"}default:return l}}),a=n[r];r<o;a=n[++r])rr(a)||!ye(a)?i+=" "+a:i+=" "+M(a);return i}function Wt(t,e){if(_(globalThis.process))return function(){return Wt(t,e).apply(this,arguments)};if(Ze.noDeprecation===!0)return t;var r=!1;function n(){if(!r){if(Ze.throwDeprecation)throw new Error(e);Ze.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n}function Mi(t){if(_(_t)&&(_t=Ze.env.NODE_DEBUG||""),t=t.toUpperCase(),!Mr[t])if(new RegExp("\\b"+t+"\\b","i").test(_t)){var e=0;Mr[t]=function(){var r=Wr.apply(null,arguments);console.error("%s %d: %s",t,e,r)}}else Mr[t]=function(){};return Mr[t]}function M(t,e){var r={seen:[],stylize:Fp};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Vr(e)?r.showHidden=e:e&&Yt(r,e),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Rp),Dr(r,t,r.depth)}function Rp(t,e){var r=M.styles[e];return r?"\x1B["+M.colors[r][0]+"m"+t+"\x1B["+M.colors[r][1]+"m":t}function Fp(t,e){return t}function Pp(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function Dr(t,e,r){if(t.customInspect&&e&&er(e.inspect)&&e.inspect!==M&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return tr(n)||(n=Dr(t,n,r)),n}var o=Np(t,e);if(o)return o;var i=Object.keys(e),a=Pp(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(e)),Xe(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Mt(e);if(i.length===0){if(er(e)){var l=e.name?": "+e.name:"";return t.stylize("[Function"+l+"]","special")}if(Qe(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(jr(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Xe(e))return Mt(e)}var p="",m=!1,h=["{","}"];if(Vt(e)&&(m=!0,h=["[","]"]),er(e)){var d=e.name?": "+e.name:"";p=" [Function"+d+"]"}if(Qe(e)&&(p=" "+RegExp.prototype.toString.call(e)),jr(e)&&(p=" "+Date.prototype.toUTCString.call(e)),Xe(e)&&(p=" "+Mt(e)),i.length===0&&(!m||e.length==0))return h[0]+p+h[1];if(r<0)return Qe(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var x;return m?x=Op(t,e,r,a,i):x=i.map(function(A){return jt(t,e,r,a,A,m)}),t.seen.pop(),Lp(x,p,h)}function Np(t,e){if(_(e))return t.stylize("undefined","undefined");if(tr(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Gt(e))return t.stylize(""+e,"number");if(Vr(e))return t.stylize(""+e,"boolean");if(rr(e))return t.stylize("null","null")}function Mt(t){return"["+Error.prototype.toString.call(t)+"]"}function Op(t,e,r,n,o){for(var i=[],a=0,l=e.length;a<l;++a)zi(e,String(a))?i.push(jt(t,e,r,n,String(a),!0)):i.push("");return o.forEach(function(p){p.match(/^\d+$/)||i.push(jt(t,e,r,n,p,!0))}),i}function jt(t,e,r,n,o,i){var a,l,p;if(p=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},p.get?p.set?l=t.stylize("[Getter/Setter]","special"):l=t.stylize("[Getter]","special"):p.set&&(l=t.stylize("[Setter]","special")),zi(n,o)||(a="["+o+"]"),l||(t.seen.indexOf(p.value)<0?(rr(r)?l=Dr(t,p.value,null):l=Dr(t,p.value,r-1),l.indexOf(`
|
|
2
|
-
`)>-1&&(i?
|
|
3
|
-
`).map(function(
|
|
4
|
-
`).substr(2):
|
|
5
|
-
`+
|
|
6
|
-
`).map(function(
|
|
7
|
-
`))):
|
|
1
|
+
"use strict";var lp=Object.create;var Xe=Object.defineProperty,cp=Object.defineProperties,yp=Object.getOwnPropertyDescriptor,dp=Object.getOwnPropertyDescriptors,mp=Object.getOwnPropertyNames,Nr=Object.getOwnPropertySymbols,hp=Object.getPrototypeOf,Lt=Object.prototype.hasOwnProperty,lo=Object.prototype.propertyIsEnumerable;var Nt=(t,e,r)=>e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,co=(t,e)=>{for(var r in e||(e={}))Lt.call(e,r)&&Nt(t,r,e[r]);if(Nr)for(var r of Nr(e))lo.call(e,r)&&Nt(t,r,e[r]);return t},yo=(t,e)=>cp(t,dp(e));var mo=t=>typeof t=="symbol"?t:t+"",ho=(t,e)=>{var r={};for(var n in t)Lt.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Nr)for(var n of Nr(t))e.indexOf(n)<0&&lo.call(t,n)&&(r[n]=t[n]);return r};var Ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Bt=(t,e)=>{for(var r in e)Xe(t,r,{get:e[r],enumerable:!0})},go=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of mp(e))!Lt.call(t,o)&&o!==r&&Xe(t,o,{get:()=>e[o],enumerable:!(n=yp(e,o))||n.enumerable});return t};var gp=(t,e,r)=>(r=t!=null?lp(hp(t)):{},go(e||!t||!t.__esModule?Xe(r,"default",{value:t,enumerable:!0}):r,t)),xo=t=>go(Xe({},"__esModule",{value:!0}),t);var v=(t,e,r)=>Nt(t,typeof e!="symbol"?e+"":e,r);function wo(){throw new Error("setTimeout has not been defined")}function bo(){throw new Error("clearTimeout has not been defined")}function Ao(t){if(re===setTimeout)return setTimeout(t,0);if((re===wo||!re)&&setTimeout)return re=setTimeout,setTimeout(t,0);try{return re(t,0)}catch(e){try{return re.call(null,t,0)}catch(r){return re.call(this,t,0)}}}function xp(t){if(te===clearTimeout)return clearTimeout(t);if((te===bo||!te)&&clearTimeout)return te=clearTimeout,clearTimeout(t);try{return te(t)}catch(e){try{return te.call(null,t)}catch(r){return te.call(this,t)}}}function vp(){!Pe||!pe||(Pe=!1,pe.length?Y=pe.concat(Y):Lr=-1,Y.length&&So())}function So(){if(!Pe){var t=Ao(vp);Pe=!0;for(var e=Y.length;e;){for(pe=Y,Y=[];++Lr<e;)pe&&pe[Lr].run();Lr=-1,e=Y.length}pe=null,Pe=!1,xp(t)}}function wp(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Y.push(new Eo(t,e)),Y.length===1&&!Pe&&Ao(So)}function Eo(t,e){this.fun=t,this.array=e}function le(){}function qp(t){throw new Error("process.binding is not supported")}function $p(){return"/"}function _p(t){throw new Error("process.chdir is not supported")}function Mp(){return 0}function jp(t){var e=Dp.call(Re)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}function Gp(){var t=new Date,e=t-Wp;return e/1e3}var re,te,Y,Pe,pe,Lr,bp,Ap,Sp,Ep,Tp,Ip,Rp,Pp,Fp,Op,Np,Lp,Bp,Up,Cp,kp,Re,Dp,Wp,l,vo,s=Ie(()=>{"use strict";re=wo,te=bo;typeof globalThis.setTimeout=="function"&&(re=setTimeout);typeof globalThis.clearTimeout=="function"&&(te=clearTimeout);Y=[],Pe=!1,Lr=-1;Eo.prototype.run=function(){this.fun.apply(null,this.array)};bp="browser",Ap="browser",Sp=!0,Ep={},Tp=[],Ip="",Rp={},Pp={},Fp={};Op=le,Np=le,Lp=le,Bp=le,Up=le,Cp=le,kp=le;Re=globalThis.performance||{},Dp=Re.now||Re.mozNow||Re.msNow||Re.oNow||Re.webkitNow||function(){return new Date().getTime()};Wp=new Date;l={nextTick:wp,title:bp,browser:Sp,env:Ep,argv:Tp,version:Ip,versions:Rp,on:Op,addListener:Np,once:Lp,off:Bp,removeListener:Up,removeAllListeners:Cp,emit:kp,binding:qp,cwd:$p,chdir:_p,umask:Mp,hrtime:jp,platform:Ap,release:Pp,config:Fp,uptime:Gp},vo={};Object.keys(vo).forEach(t=>{let e=t.split("."),r=l;for(let n=0;n<e.length;n++){let o=e[n];n===e.length-1?r[o]=vo[t]:r=r[o]||(r[o]={})}})});function Po(){Ct=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)_[e]=t[e],k[t.charCodeAt(e)]=e;k[45]=62,k[95]=63}function zp(t){Ct||Po();var e,r,n,o,i,a,p=t.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i=t[p-2]==="="?2:t[p-1]==="="?1:0,a=new Vp(p*3/4-i),n=i>0?p-4:p;var c=0;for(e=0,r=0;e<n;e+=4,r+=3)o=k[t.charCodeAt(e)]<<18|k[t.charCodeAt(e+1)]<<12|k[t.charCodeAt(e+2)]<<6|k[t.charCodeAt(e+3)],a[c++]=o>>16&255,a[c++]=o>>8&255,a[c++]=o&255;return i===2?(o=k[t.charCodeAt(e)]<<2|k[t.charCodeAt(e+1)]>>4,a[c++]=o&255):i===1&&(o=k[t.charCodeAt(e)]<<10|k[t.charCodeAt(e+1)]<<4|k[t.charCodeAt(e+2)]>>2,a[c++]=o>>8&255,a[c++]=o&255),a}function Yp(t){return _[t>>18&63]+_[t>>12&63]+_[t>>6&63]+_[t&63]}function Hp(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16)+(t[i+1]<<8)+t[i+2],o.push(Yp(n));return o.join("")}function To(t){Ct||Po();for(var e,r=t.length,n=r%3,o="",i=[],a=16383,p=0,c=r-n;p<c;p+=a)i.push(Hp(t,p,p+a>c?c:p+a));return n===1?(e=t[r-1],o+=_[e>>2],o+=_[e<<4&63],o+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],o+=_[e>>10],o+=_[e>>4&63],o+=_[e<<2&63],o+="="),i.push(o),i.join("")}function Br(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function H(t,e){if(Br()<e)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=f.prototype):(t===null&&(t=new f(e)),t.length=e),t}function f(t,e,r){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(t,e,r);if(typeof t=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return kt(this,t)}return Fo(this,t,e,r)}function Fo(t,e,r,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer?Zp(t,e,r,n):typeof e=="string"?Kp(t,e,r):Qp(t,e)}function Oo(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Jp(t,e,r,n){return Oo(e),e<=0?H(t,e):r!==void 0?typeof n=="string"?H(t,e).fill(r,n):H(t,e).fill(r):H(t,e)}function kt(t,e){if(Oo(e),t=H(t,e<0?0:qt(e)|0),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function Kp(t,e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!f.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=No(e,r)|0;t=H(t,n);var o=t.write(e,r);return o!==n&&(t=t.slice(0,o)),t}function Ut(t,e){var r=e.length<0?0:qt(e.length)|0;t=H(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function Zp(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return r===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,r):e=new Uint8Array(e,r,n),f.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=f.prototype):t=Ut(t,e),t}function Qp(t,e){if(M(e)){var r=qt(e.length)|0;return t=H(t,r),t.length===0||e.copy(t,0,0,r),t}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||gl(e.length)?H(t,0):Ut(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Ut(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function qt(t){if(t>=Br())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Br().toString(16)+" bytes");return t|0}function M(t){return!!(t!=null&&t._isBuffer)}function No(t,e){if(M(t))return t.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var r=t.length;if(r===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Ur(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return $o(t).length;default:if(n)return Ur(t).length;e=(""+e).toLowerCase(),n=!0}}function Xp(t,e,r){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return fl(this,e,r);case"utf8":case"utf-8":return Uo(this,e,r);case"ascii":return sl(this,e,r);case"latin1":case"binary":return ul(this,e,r);case"base64":return il(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pl(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function ce(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Lo(t,e,r,n,o){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof e=="string"&&(e=f.from(e,n)),M(e))return e.length===0?-1:Io(t,e,r,n,o);if(typeof e=="number")return e=e&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Io(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function Io(t,e,r,n,o){var i=1,a=t.length,p=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;i=2,a/=2,p/=2,r/=2}function c(w,E){return i===1?w[E]:w.readUInt16BE(E*i)}var d;if(o){var m=-1;for(d=r;d<a;d++)if(c(t,d)===c(e,m===-1?0:d-m)){if(m===-1&&(m=d),d-m+1===p)return m*i}else m!==-1&&(d-=d-m),m=-1}else for(r+p>a&&(r=a-p),d=r;d>=0;d--){for(var y=!0,x=0;x<p;x++)if(c(t,d+x)!==c(e,x)){y=!1;break}if(y)return d}return-1}function el(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var p=parseInt(e.substr(a*2,2),16);if(isNaN(p))return a;t[r+a]=p}return a}function rl(t,e,r,n){return qr(Ur(e,t.length-r),t,r,n)}function Bo(t,e,r,n){return qr(ml(e),t,r,n)}function tl(t,e,r,n){return Bo(t,e,r,n)}function nl(t,e,r,n){return qr($o(e),t,r,n)}function ol(t,e,r,n){return qr(hl(e,t.length-r),t,r,n)}function il(t,e,r){return e===0&&r===t.length?To(t):To(t.slice(e,r))}function Uo(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i=t[o],a=null,p=i>239?4:i>223?3:i>191?2:1;if(o+p<=r){var c,d,m,y;switch(p){case 1:i<128&&(a=i);break;case 2:c=t[o+1],(c&192)===128&&(y=(i&31)<<6|c&63,y>127&&(a=y));break;case 3:c=t[o+1],d=t[o+2],(c&192)===128&&(d&192)===128&&(y=(i&15)<<12|(c&63)<<6|d&63,y>2047&&(y<55296||y>57343)&&(a=y));break;case 4:c=t[o+1],d=t[o+2],m=t[o+3],(c&192)===128&&(d&192)===128&&(m&192)===128&&(y=(i&15)<<18|(c&63)<<12|(d&63)<<6|m&63,y>65535&&y<1114112&&(a=y))}}a===null?(a=65533,p=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),o+=p}return al(n)}function al(t){var e=t.length;if(e<=Ro)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Ro));return r}function sl(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]&127);return n}function ul(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function fl(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=dl(t[i]);return o}function pl(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+n[i+1]*256);return o}function F(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,o,i){if(!M(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function Cr(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>(n?o:1-o)*8}function kr(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>(n?o:3-o)*8&255}function Co(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ko(t,e,r,n,o){return o||Co(t,e,r,4,34028234663852886e22,-34028234663852886e22),Mo(t,e,r,n,23,4),r+4}function qo(t,e,r,n,o){return o||Co(t,e,r,8,17976931348623157e292,-17976931348623157e292),Mo(t,e,r,n,52,8),r+8}function cl(t){if(t=yl(t).replace(ll,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function yl(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function dl(t){return t<16?"0"+t.toString(16):t.toString(16)}function Ur(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function ml(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function hl(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function $o(t){return zp(cl(t))}function qr(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function gl(t){return t!==t}function xl(t){return t!=null&&(!!t._isBuffer||_o(t)||vl(t))}function _o(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function vl(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&_o(t.slice(0,0))}function $r(t,e,r,n,o){var i,a,p=o*8-n-1,c=(1<<p)-1,d=c>>1,m=-7,y=r?o-1:0,x=r?-1:1,w=t[e+y];for(y+=x,i=w&(1<<-m)-1,w>>=-m,m+=p;m>0;i=i*256+t[e+y],y+=x,m-=8);for(a=i&(1<<-m)-1,i>>=-m,m+=n;m>0;a=a*256+t[e+y],y+=x,m-=8);if(i===0)i=1-d;else{if(i===c)return a?NaN:(w?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-d}return(w?-1:1)*a*Math.pow(2,i-n)}function Mo(t,e,r,n,o,i){var a,p,c,d=i*8-o-1,m=(1<<d)-1,y=m>>1,x=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:i-1,E=n?1:-1,I=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(p=isNaN(e)?1:0,a=m):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+y>=1?e+=x/c:e+=x*Math.pow(2,1-y),e*c>=2&&(a++,c/=2),a+y>=m?(p=0,a=m):a+y>=1?(p=(e*c-1)*Math.pow(2,o),a=a+y):(p=e*Math.pow(2,y-1)*Math.pow(2,o),a=0));o>=8;t[r+w]=p&255,w+=E,p/=256,o-=8);for(a=a<<o|p,d+=o;d>0;t[r+w]=a&255,w+=E,a/=256,d-=8);t[r+w-E]|=I*128}var _,k,Vp,Ct,Ro,ll,Do=Ie(()=>{"use strict";s();u();_=[],k=[],Vp=typeof Uint8Array!="undefined"?Uint8Array:Array,Ct=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(t){return t.__proto__=f.prototype,t};f.from=function(t,e,r){return Fo(null,t,e,r)};f.kMaxLength=Br();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(t,e,r){return Jp(null,t,e,r)};f.allocUnsafe=function(t){return kt(null,t)};f.allocUnsafeSlow=function(t){return kt(null,t)};f.isBuffer=xl;f.compare=function(e,r){if(!M(e)||!M(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,o=r.length,i=0,a=Math.min(n,o);i<a;++i)if(e[i]!==r[i]){n=e[i],o=r[i];break}return n<o?-1:o<n?1:0};f.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}};f.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return f.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var o=f.allocUnsafe(r),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!M(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(o,i),i+=a.length}return o};f.byteLength=No;f.prototype._isBuffer=!0;f.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)ce(this,r,r+1);return this};f.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)ce(this,r,r+3),ce(this,r+1,r+2);return this};f.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)ce(this,r,r+7),ce(this,r+1,r+6),ce(this,r+2,r+5),ce(this,r+3,r+4);return this};f.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Uo(this,0,e):Xp.apply(this,arguments)};f.prototype.equals=function(e){if(!M(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:f.compare(this,e)===0};f.prototype.compare=function(e,r,n,o,i){if(!M(e))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),r<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,i>>>=0,this===e)return 0;for(var a=i-o,p=n-r,c=Math.min(a,p),d=this.slice(o,i),m=e.slice(r,n),y=0;y<c;++y)if(d[y]!==m[y]){a=d[y],p=m[y];break}return a<p?-1:p<a?1:0};f.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};f.prototype.indexOf=function(e,r,n){return Lo(this,e,r,n,!0)};f.prototype.lastIndexOf=function(e,r,n){return Lo(this,e,r,n,!1)};f.prototype.write=function(e,r,n,o){if(r===void 0)o="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")o=r,n=this.length,r=0;else if(isFinite(r))r=r|0,isFinite(n)?(n=n|0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-r;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var a=!1;;)switch(o){case"hex":return el(this,e,r,n);case"utf8":case"utf-8":return rl(this,e,r,n);case"ascii":return Bo(this,e,r,n);case"latin1":case"binary":return tl(this,e,r,n);case"base64":return nl(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ol(this,e,r,n);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),a=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Ro=4096;f.prototype.slice=function(e,r){var n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var o;if(f.TYPED_ARRAY_SUPPORT)o=this.subarray(e,r),o.__proto__=f.prototype;else{var i=r-e;o=new f(i,void 0);for(var a=0;a<i;++a)o[a]=this[a+e]}return o};f.prototype.readUIntLE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var o=this[e],i=1,a=0;++a<r&&(i*=256);)o+=this[e+a]*i;return o};f.prototype.readUIntBE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var o=this[e+--r],i=1;r>0&&(i*=256);)o+=this[e+--r]*i;return o};f.prototype.readUInt8=function(e,r){return r||F(e,1,this.length),this[e]};f.prototype.readUInt16LE=function(e,r){return r||F(e,2,this.length),this[e]|this[e+1]<<8};f.prototype.readUInt16BE=function(e,r){return r||F(e,2,this.length),this[e]<<8|this[e+1]};f.prototype.readUInt32LE=function(e,r){return r||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};f.prototype.readUInt32BE=function(e,r){return r||F(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};f.prototype.readIntLE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var o=this[e],i=1,a=0;++a<r&&(i*=256);)o+=this[e+a]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};f.prototype.readIntBE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var o=r,i=1,a=this[e+--o];o>0&&(i*=256);)a+=this[e+--o]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*r)),a};f.prototype.readInt8=function(e,r){return r||F(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};f.prototype.readInt16LE=function(e,r){r||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(e,r){r||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(e,r){return r||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};f.prototype.readInt32BE=function(e,r){return r||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};f.prototype.readFloatLE=function(e,r){return r||F(e,4,this.length),$r(this,e,!0,23,4)};f.prototype.readFloatBE=function(e,r){return r||F(e,4,this.length),$r(this,e,!1,23,4)};f.prototype.readDoubleLE=function(e,r){return r||F(e,8,this.length),$r(this,e,!0,52,8)};f.prototype.readDoubleBE=function(e,r){return r||F(e,8,this.length),$r(this,e,!1,52,8)};f.prototype.writeUIntLE=function(e,r,n,o){if(e=+e,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;U(this,e,r,n,i,0)}var a=1,p=0;for(this[r]=e&255;++p<n&&(a*=256);)this[r+p]=e/a&255;return r+n};f.prototype.writeUIntBE=function(e,r,n,o){if(e=+e,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;U(this,e,r,n,i,0)}var a=n-1,p=1;for(this[r+a]=e&255;--a>=0&&(p*=256);)this[r+a]=e/p&255;return r+n};f.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=e&255,r+1};f.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Cr(this,e,r,!0),r+2};f.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Cr(this,e,r,!1),r+2};f.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255):kr(this,e,r,!0),r+4};f.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):kr(this,e,r,!1),r+4};f.prototype.writeIntLE=function(e,r,n,o){if(e=+e,r=r|0,!o){var i=Math.pow(2,8*n-1);U(this,e,r,n,i-1,-i)}var a=0,p=1,c=0;for(this[r]=e&255;++a<n&&(p*=256);)e<0&&c===0&&this[r+a-1]!==0&&(c=1),this[r+a]=(e/p>>0)-c&255;return r+n};f.prototype.writeIntBE=function(e,r,n,o){if(e=+e,r=r|0,!o){var i=Math.pow(2,8*n-1);U(this,e,r,n,i-1,-i)}var a=n-1,p=1,c=0;for(this[r+a]=e&255;--a>=0&&(p*=256);)e<0&&c===0&&this[r+a+1]!==0&&(c=1),this[r+a]=(e/p>>0)-c&255;return r+n};f.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=e&255,r+1};f.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Cr(this,e,r,!0),r+2};f.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Cr(this,e,r,!1),r+2};f.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):kr(this,e,r,!0),r+4};f.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):kr(this,e,r,!1),r+4};f.prototype.writeFloatLE=function(e,r,n){return ko(this,e,r,!0,n)};f.prototype.writeFloatBE=function(e,r,n){return ko(this,e,r,!1,n)};f.prototype.writeDoubleLE=function(e,r,n){return qo(this,e,r,!0,n)};f.prototype.writeDoubleBE=function(e,r,n){return qo(this,e,r,!1,n)};f.prototype.copy=function(e,r,n,o){if(n||(n=0),!o&&o!==0&&(o=this.length),r>=e.length&&(r=e.length),r||(r=0),o>0&&o<n&&(o=n),o===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-r<o-n&&(o=e.length-r+n);var i=o-n,a;if(this===e&&n<r&&r<o)for(a=i-1;a>=0;--a)e[a+r]=this[a+n];else if(i<1e3||!f.TYPED_ARRAY_SUPPORT)for(a=0;a<i;++a)e[a+r]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),r);return i};f.prototype.fill=function(e,r,n,o){if(typeof e=="string"){if(typeof r=="string"?(o=r,r=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),e.length===1){var i=e.charCodeAt(0);i<256&&(e=i)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!f.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof e=="number"&&(e=e&255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var a;if(typeof e=="number")for(a=r;a<n;++a)this[a]=e;else{var p=M(e)?e:Ur(new f(e,o).toString()),c=p.length;for(a=0;a<n-r;++a)this[a+r]=p[a%c]}return this};ll=/[^+\/0-9A-Za-z-_]/g});var u=Ie(()=>{"use strict";Do()});var Go=h((lx,Wo)=>{"use strict";s();u();var wl="Function.prototype.bind called on incompatible ",bl=Object.prototype.toString,Al=Math.max,Sl="[object Function]",jo=function(e,r){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var i=0;i<r.length;i+=1)n[i+e.length]=r[i];return n},El=function(e,r){for(var n=[],o=r||0,i=0;o<e.length;o+=1,i+=1)n[i]=e[o];return n},Tl=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};Wo.exports=function(e){var r=this;if(typeof r!="function"||bl.apply(r)!==Sl)throw new TypeError(wl+r);for(var n=El(arguments,1),o,i=function(){if(this instanceof o){var m=r.apply(this,jo(n,arguments));return Object(m)===m?m:this}return r.apply(e,jo(n,arguments))},a=Al(0,r.length-n.length),p=[],c=0;c<a;c++)p[c]="$"+c;if(o=Function("binder","return function ("+Tl(p,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var d=function(){};d.prototype=r.prototype,o.prototype=new d,d.prototype=null}return o}});var ye=h((dx,Vo)=>{"use strict";s();u();var Il=Go();Vo.exports=Function.prototype.bind||Il});var $t=h((gx,zo)=>{"use strict";s();u();zo.exports=Error});var _t=h((wx,Yo)=>{"use strict";s();u();Yo.exports=EvalError});var Mt=h((Sx,Ho)=>{"use strict";s();u();Ho.exports=RangeError});var Dt=h((Ix,Jo)=>{"use strict";s();u();Jo.exports=ReferenceError});var _r=h((Fx,Ko)=>{"use strict";s();u();Ko.exports=SyntaxError});var P=h((Lx,Zo)=>{"use strict";s();u();Zo.exports=TypeError});var jt=h((Cx,Qo)=>{"use strict";s();u();Qo.exports=URIError});var ei=h(($x,Xo)=>{"use strict";s();u();Xo.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,r);if(a.value!==o||a.enumerable!==!0)return!1}return!0}});var Wt=h((Dx,ti)=>{"use strict";s();u();var ri=typeof Symbol!="undefined"&&Symbol,Rl=ei();ti.exports=function(){return typeof ri!="function"||typeof Symbol!="function"||typeof ri("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Rl()}});var oi=h((Gx,ni)=>{"use strict";s();u();var Gt={__proto__:null,foo:{}},Pl=Object;ni.exports=function(){return{__proto__:Gt}.foo===Gt.foo&&!(Gt instanceof Pl)}});var Vt=h((Yx,ii)=>{"use strict";s();u();var Fl=Function.prototype.call,Ol=Object.prototype.hasOwnProperty,Nl=ye();ii.exports=Nl.call(Fl,Ol)});var D=h((Kx,pi)=>{"use strict";s();u();var b,Ll=$t(),Bl=_t(),Ul=Mt(),Cl=Dt(),Le=_r(),Ne=P(),kl=jt(),fi=Function,zt=function(t){try{return fi('"use strict"; return ('+t+").constructor;")()}catch(e){}},de=Object.getOwnPropertyDescriptor;if(de)try{de({},"")}catch(t){de=null}var Yt=function(){throw new Ne},ql=de?function(){try{return arguments.callee,Yt}catch(t){try{return de(arguments,"callee").get}catch(e){return Yt}}}():Yt,Fe=Wt()(),$l=oi()(),O=Object.getPrototypeOf||($l?function(t){return t.__proto__}:null),Oe={},_l=typeof Uint8Array=="undefined"||!O?b:O(Uint8Array),me={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?b:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?b:ArrayBuffer,"%ArrayIteratorPrototype%":Fe&&O?O([][Symbol.iterator]()):b,"%AsyncFromSyncIteratorPrototype%":b,"%AsyncFunction%":Oe,"%AsyncGenerator%":Oe,"%AsyncGeneratorFunction%":Oe,"%AsyncIteratorPrototype%":Oe,"%Atomics%":typeof Atomics=="undefined"?b:Atomics,"%BigInt%":typeof BigInt=="undefined"?b:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?b:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?b:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?b:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ll,"%eval%":eval,"%EvalError%":Bl,"%Float32Array%":typeof Float32Array=="undefined"?b:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?b:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?b:FinalizationRegistry,"%Function%":fi,"%GeneratorFunction%":Oe,"%Int8Array%":typeof Int8Array=="undefined"?b:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?b:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?b:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Fe&&O?O(O([][Symbol.iterator]())):b,"%JSON%":typeof JSON=="object"?JSON:b,"%Map%":typeof Map=="undefined"?b:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Fe||!O?b:O(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?b:Promise,"%Proxy%":typeof Proxy=="undefined"?b:Proxy,"%RangeError%":Ul,"%ReferenceError%":Cl,"%Reflect%":typeof Reflect=="undefined"?b:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?b:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Fe||!O?b:O(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?b:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Fe&&O?O(""[Symbol.iterator]()):b,"%Symbol%":Fe?Symbol:b,"%SyntaxError%":Le,"%ThrowTypeError%":ql,"%TypedArray%":_l,"%TypeError%":Ne,"%Uint8Array%":typeof Uint8Array=="undefined"?b:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?b:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?b:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?b:Uint32Array,"%URIError%":kl,"%WeakMap%":typeof WeakMap=="undefined"?b:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?b:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?b:WeakSet};if(O)try{null.error}catch(t){ai=O(O(t)),me["%Error.prototype%"]=ai}var ai,Ml=function t(e){var r;if(e==="%AsyncFunction%")r=zt("async function () {}");else if(e==="%GeneratorFunction%")r=zt("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=zt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&O&&(r=O(o.prototype))}return me[e]=r,r},si={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},er=ye(),Mr=Vt(),Dl=er.call(Function.call,Array.prototype.concat),jl=er.call(Function.apply,Array.prototype.splice),ui=er.call(Function.call,String.prototype.replace),Dr=er.call(Function.call,String.prototype.slice),Wl=er.call(Function.call,RegExp.prototype.exec),Gl=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Vl=/\\(\\)?/g,zl=function(e){var r=Dr(e,0,1),n=Dr(e,-1);if(r==="%"&&n!=="%")throw new Le("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Le("invalid intrinsic syntax, expected opening `%`");var o=[];return ui(e,Gl,function(i,a,p,c){o[o.length]=p?ui(c,Vl,"$1"):a||i}),o},Yl=function(e,r){var n=e,o;if(Mr(si,n)&&(o=si[n],n="%"+o[0]+"%"),Mr(me,n)){var i=me[n];if(i===Oe&&(i=Ml(n)),typeof i=="undefined"&&!r)throw new Ne("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Le("intrinsic "+e+" does not exist!")};pi.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Ne("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ne('"allowMissing" argument must be a boolean');if(Wl(/^%?[^%]*%?$/,e)===null)throw new Le("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=zl(e),o=n.length>0?n[0]:"",i=Yl("%"+o+"%",r),a=i.name,p=i.value,c=!1,d=i.alias;d&&(o=d[0],jl(n,Dl([0,1],d)));for(var m=1,y=!0;m<n.length;m+=1){var x=n[m],w=Dr(x,0,1),E=Dr(x,-1);if((w==='"'||w==="'"||w==="`"||E==='"'||E==="'"||E==="`")&&w!==E)throw new Le("property names with quotes must have matching quotes");if((x==="constructor"||!y)&&(c=!0),o+="."+x,a="%"+o+"%",Mr(me,a))p=me[a];else if(p!=null){if(!(x in p)){if(!r)throw new Ne("base intrinsic for "+e+" exists, but the property is not available.");return}if(de&&m+1>=n.length){var I=de(p,x);y=!!I,y&&"get"in I&&!("originalValue"in I.get)?p=I.get:p=p[x]}else y=Mr(p,x),p=p[x];y&&!c&&(me[a]=p)}}return p}});var Ht=h((Xx,li)=>{"use strict";s();u();li.exports=Object});var yi=h((tv,ci)=>{"use strict";s();u();ci.exports=Math.abs});var mi=h((iv,di)=>{"use strict";s();u();di.exports=Math.floor});var gi=h((uv,hi)=>{"use strict";s();u();hi.exports=Math.max});var vi=h((lv,xi)=>{"use strict";s();u();xi.exports=Math.min});var bi=h((dv,wi)=>{"use strict";s();u();wi.exports=Math.pow});var Si=h((gv,Ai)=>{"use strict";s();u();Ai.exports=Math.round});var Ti=h((wv,Ei)=>{"use strict";s();u();Ei.exports=Number.isNaN||function(e){return e!==e}});var Ri=h((Sv,Ii)=>{"use strict";s();u();var Hl=Ti();Ii.exports=function(e){return Hl(e)||e===0?e:e<0?-1:1}});var Fi=h((Iv,Pi)=>{"use strict";s();u();Pi.exports=Object.getOwnPropertyDescriptor});var rr=h((Fv,Oi)=>{"use strict";s();u();var jr=Fi();if(jr)try{jr([],"length")}catch(t){jr=null}Oi.exports=jr});var Gr=h((Lv,Ni)=>{"use strict";s();u();var Wr=Object.defineProperty||!1;if(Wr)try{Wr({},"a",{value:1})}catch(t){Wr=!1}Ni.exports=Wr});var Jt=h((Cv,Li)=>{"use strict";s();u();Li.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(e,r);if(p.value!==o||p.enumerable!==!0)return!1}return!0}});var Ci=h(($v,Ui)=>{"use strict";s();u();var Bi=typeof Symbol!="undefined"&&Symbol,Jl=Jt();Ui.exports=function(){return typeof Bi!="function"||typeof Symbol!="function"||typeof Bi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Jl()}});var Kt=h((Dv,ki)=>{"use strict";s();u();ki.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Zt=h((Gv,qi)=>{"use strict";s();u();var Kl=Ht();qi.exports=Kl.getPrototypeOf||null});var Vr=h((Yv,$i)=>{"use strict";s();u();$i.exports=Function.prototype.call});var Qt=h((Kv,_i)=>{"use strict";s();u();_i.exports=Function.prototype.apply});var Di=h((Xv,Mi)=>{"use strict";s();u();Mi.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Wi=h((t0,ji)=>{"use strict";s();u();var Zl=ye(),Ql=Qt(),Xl=Vr(),ec=Di();ji.exports=ec||Zl.call(Xl,Ql)});var Vi=h((i0,Gi)=>{"use strict";s();u();var rc=ye(),tc=P(),nc=Vr(),oc=Wi();Gi.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new tc("a function is required");return oc(rc,nc,e)}});var Zi=h((u0,Ki)=>{"use strict";s();u();var ic=Vi(),zi=rr(),Hi;try{Hi=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Xt=!!Hi&&zi&&zi(Object.prototype,"__proto__"),Ji=Object,Yi=Ji.getPrototypeOf;Ki.exports=Xt&&typeof Xt.get=="function"?ic([Xt.get]):typeof Yi=="function"?function(e){return Yi(e==null?e:Ji(e))}:!1});var ta=h((l0,ra)=>{"use strict";s();u();var Qi=Kt(),Xi=Zt(),ea=Zi();ra.exports=Qi?function(e){return Qi(e)}:Xi?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return Xi(e)}:ea?function(e){return ea(e)}:null});var tn=h((d0,ua)=>{"use strict";s();u();var A,ac=Ht(),sc=$t(),uc=_t(),fc=Mt(),pc=Dt(),ke=_r(),Ce=P(),lc=jt(),cc=yi(),yc=mi(),dc=gi(),mc=vi(),hc=bi(),gc=Si(),xc=Ri(),aa=Function,en=function(t){try{return aa('"use strict"; return ('+t+").constructor;")()}catch(e){}},tr=rr(),vc=Gr(),rn=function(){throw new Ce},wc=tr?function(){try{return arguments.callee,rn}catch(t){try{return tr(arguments,"callee").get}catch(e){return rn}}}():rn,Be=Ci()(),N=ta(),bc=Zt(),Ac=Kt(),sa=Qt(),nr=Vr(),Ue={},Sc=typeof Uint8Array=="undefined"||!N?A:N(Uint8Array),he={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?A:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?A:ArrayBuffer,"%ArrayIteratorPrototype%":Be&&N?N([][Symbol.iterator]()):A,"%AsyncFromSyncIteratorPrototype%":A,"%AsyncFunction%":Ue,"%AsyncGenerator%":Ue,"%AsyncGeneratorFunction%":Ue,"%AsyncIteratorPrototype%":Ue,"%Atomics%":typeof Atomics=="undefined"?A:Atomics,"%BigInt%":typeof BigInt=="undefined"?A:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?A:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?A:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?A:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":sc,"%eval%":eval,"%EvalError%":uc,"%Float32Array%":typeof Float32Array=="undefined"?A:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?A:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?A:FinalizationRegistry,"%Function%":aa,"%GeneratorFunction%":Ue,"%Int8Array%":typeof Int8Array=="undefined"?A:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?A:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?A:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Be&&N?N(N([][Symbol.iterator]())):A,"%JSON%":typeof JSON=="object"?JSON:A,"%Map%":typeof Map=="undefined"?A:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Be||!N?A:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ac,"%Object.getOwnPropertyDescriptor%":tr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?A:Promise,"%Proxy%":typeof Proxy=="undefined"?A:Proxy,"%RangeError%":fc,"%ReferenceError%":pc,"%Reflect%":typeof Reflect=="undefined"?A:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?A:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Be||!N?A:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?A:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Be&&N?N(""[Symbol.iterator]()):A,"%Symbol%":Be?Symbol:A,"%SyntaxError%":ke,"%ThrowTypeError%":wc,"%TypedArray%":Sc,"%TypeError%":Ce,"%Uint8Array%":typeof Uint8Array=="undefined"?A:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?A:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?A:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?A:Uint32Array,"%URIError%":lc,"%WeakMap%":typeof WeakMap=="undefined"?A:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?A:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?A:WeakSet,"%Function.prototype.call%":nr,"%Function.prototype.apply%":sa,"%Object.defineProperty%":vc,"%Object.getPrototypeOf%":bc,"%Math.abs%":cc,"%Math.floor%":yc,"%Math.max%":dc,"%Math.min%":mc,"%Math.pow%":hc,"%Math.round%":gc,"%Math.sign%":xc,"%Reflect.getPrototypeOf%":Ac};if(N)try{null.error}catch(t){na=N(N(t)),he["%Error.prototype%"]=na}var na,Ec=function t(e){var r;if(e==="%AsyncFunction%")r=en("async function () {}");else if(e==="%GeneratorFunction%")r=en("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=en("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&N&&(r=N(o.prototype))}return he[e]=r,r},oa={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},or=ye(),zr=Vt(),Tc=or.call(nr,Array.prototype.concat),Ic=or.call(sa,Array.prototype.splice),ia=or.call(nr,String.prototype.replace),Yr=or.call(nr,String.prototype.slice),Rc=or.call(nr,RegExp.prototype.exec),Pc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Fc=/\\(\\)?/g,Oc=function(e){var r=Yr(e,0,1),n=Yr(e,-1);if(r==="%"&&n!=="%")throw new ke("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ke("invalid intrinsic syntax, expected opening `%`");var o=[];return ia(e,Pc,function(i,a,p,c){o[o.length]=p?ia(c,Fc,"$1"):a||i}),o},Nc=function(e,r){var n=e,o;if(zr(oa,n)&&(o=oa[n],n="%"+o[0]+"%"),zr(he,n)){var i=he[n];if(i===Ue&&(i=Ec(n)),typeof i=="undefined"&&!r)throw new Ce("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new ke("intrinsic "+e+" does not exist!")};ua.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Ce("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ce('"allowMissing" argument must be a boolean');if(Rc(/^%?[^%]*%?$/,e)===null)throw new ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Oc(e),o=n.length>0?n[0]:"",i=Nc("%"+o+"%",r),a=i.name,p=i.value,c=!1,d=i.alias;d&&(o=d[0],Ic(n,Tc([0,1],d)));for(var m=1,y=!0;m<n.length;m+=1){var x=n[m],w=Yr(x,0,1),E=Yr(x,-1);if((w==='"'||w==="'"||w==="`"||E==='"'||E==="'"||E==="`")&&w!==E)throw new ke("property names with quotes must have matching quotes");if((x==="constructor"||!y)&&(c=!0),o+="."+x,a="%"+o+"%",zr(he,a))p=he[a];else if(p!=null){if(!(x in p)){if(!r)throw new Ce("base intrinsic for "+e+" exists, but the property is not available.");return}if(tr&&m+1>=n.length){var I=tr(p,x);y=!!I,y&&"get"in I&&!("originalValue"in I.get)?p=I.get:p=p[x]}else y=zr(p,x),p=p[x];y&&!c&&(he[a]=p)}}return p}});var nn=h((g0,la)=>{"use strict";s();u();var fa=Gr(),Lc=_r(),qe=P(),pa=rr();la.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new qe("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new qe("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new qe("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new qe("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new qe("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new qe("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,c=!!pa&&pa(e,r);if(fa)fa(e,r,{configurable:a===null&&c?c.configurable:!a,enumerable:o===null&&c?c.enumerable:!o,value:n,writable:i===null&&c?c.writable:!i});else if(p||!o&&!i&&!a)e[r]=n;else throw new Lc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var an=h((w0,ya)=>{"use strict";s();u();var on=Gr(),ca=function(){return!!on};ca.hasArrayLengthDefineBug=function(){if(!on)return null;try{return on([],"length",{value:1}).length!==1}catch(e){return!0}};ya.exports=ca});var xa=h((S0,ga)=>{"use strict";s();u();var Bc=tn(),da=nn(),Uc=an()(),ma=rr(),ha=P(),Cc=Bc("%Math.floor%");ga.exports=function(e,r){if(typeof e!="function")throw new ha("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Cc(r)!==r)throw new ha("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&ma){var a=ma(e,"length");a&&!a.configurable&&(o=!1),a&&!a.writable&&(i=!1)}return(o||i||!n)&&(Uc?da(e,"length",r,!0,!0):da(e,"length",r)),e}});var wa=h((I0,va)=>{"use strict";s();u();var kc=tn(),Hr=kc("%Object.defineProperty%",!0)||!1;if(Hr)try{Hr({},"a",{value:1})}catch(t){Hr=!1}va.exports=Hr});var Zr=h((F0,Jr)=>{"use strict";s();u();var sn=ye(),Kr=D(),qc=xa(),$c=P(),Sa=Kr("%Function.prototype.apply%"),Ea=Kr("%Function.prototype.call%"),Ta=Kr("%Reflect.apply%",!0)||sn.call(Ea,Sa),ba=wa(),_c=Kr("%Math.max%");Jr.exports=function(e){if(typeof e!="function")throw new $c("a function is required");var r=Ta(sn,Ea,arguments);return qc(r,1+_c(0,e.length-(arguments.length-1)),!0)};var Aa=function(){return Ta(sn,Sa,arguments)};ba?ba(Jr.exports,"apply",{value:Aa}):Jr.exports.apply=Aa});var un=h((L0,Ra)=>{"use strict";s();u();var Ia=Object.prototype.toString;Ra.exports=function(e){var r=Ia.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Ia.call(e.callee)==="[object Function]"),n}});var ka=h((C0,Ca)=>{"use strict";s();u();var Ua;Object.keys||(ir=Object.prototype.hasOwnProperty,fn=Object.prototype.toString,Pa=un(),pn=Object.prototype.propertyIsEnumerable,Fa=!pn.call({toString:null},"toString"),Oa=pn.call(function(){},"prototype"),ar=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Qr=function(t){var e=t.constructor;return e&&e.prototype===t},Na={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},La=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!Na["$"+t]&&ir.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{Qr(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),Ba=function(t){if(typeof window=="undefined"||!La)return Qr(t);try{return Qr(t)}catch(e){return!1}},Ua=function(e){var r=e!==null&&typeof e=="object",n=fn.call(e)==="[object Function]",o=Pa(e),i=r&&fn.call(e)==="[object String]",a=[];if(!r&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var p=Oa&&n;if(i&&e.length>0&&!ir.call(e,0))for(var c=0;c<e.length;++c)a.push(String(c));if(o&&e.length>0)for(var d=0;d<e.length;++d)a.push(String(d));else for(var m in e)!(p&&m==="prototype")&&ir.call(e,m)&&a.push(String(m));if(Fa)for(var y=Ba(e),x=0;x<ar.length;++x)!(y&&ar[x]==="constructor")&&ir.call(e,ar[x])&&a.push(ar[x]);return a});var ir,fn,Pa,pn,Fa,Oa,ar,Qr,Na,La,Ba;Ca.exports=Ua});var Ma=h(($0,_a)=>{"use strict";s();u();var Mc=Array.prototype.slice,Dc=un(),qa=Object.keys,Xr=qa?function(e){return qa(e)}:ka(),$a=Object.keys;Xr.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(n){return Dc(n)?$a(Mc.call(n)):$a(n)})}else Object.keys=Xr;return Object.keys||Xr};_a.exports=Xr});var sr=h((D0,Ga)=>{"use strict";s();u();var jc=Ma(),Wc=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Gc=Object.prototype.toString,Vc=Array.prototype.concat,Da=nn(),zc=function(t){return typeof t=="function"&&Gc.call(t)==="[object Function]"},ja=an()(),Yc=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!zc(n)||!n())return}ja?Da(t,e,r,!0):Da(t,e,r)},Wa=function(t,e){var r=arguments.length>2?arguments[2]:{},n=jc(e);Wc&&(n=Vc.call(n,Object.getOwnPropertySymbols(e)));for(var o=0;o<n.length;o+=1)Yc(t,n[o],e[n[o]],r[n[o]])};Wa.supportsDescriptors=!!ja;Ga.exports=Wa});var q=h((G0,Ya)=>{"use strict";s();u();var Va=D(),za=Zr(),Hc=za(Va("String.prototype.indexOf"));Ya.exports=function(e,r){var n=Va(e,!!r);return typeof n=="function"&&Hc(e,".prototype.")>-1?za(n):n}});var Ka=h((Y0,Ja)=>{"use strict";s();u();var Jc=D(),Ha=Jc("%Array%"),Kc=!Ha.isArray&&q()("Object.prototype.toString");Ja.exports=Ha.isArray||function(e){return Kc(e)==="[object Array]"}});var ln=h((K0,Za)=>{"use strict";s();u();Za.exports=Ka()});var Xa=h((X0,Qa)=>{"use strict";s();u();var Zc=D(),Qc=q(),Xc=P(),ey=ln(),ry=Zc("%Reflect.apply%",!0)||Qc("Function.prototype.apply");Qa.exports=function(e,r){var n=arguments.length>2?arguments[2]:[];if(!ey(n))throw new Xc("Assertion failed: optional `argumentsList`, if provided, must be a List");return ry(e,r,n)}});function es(){throw new Error("setTimeout has not been defined")}function rs(){throw new Error("clearTimeout has not been defined")}function ts(t){if(ne===setTimeout)return setTimeout(t,0);if((ne===es||!ne)&&setTimeout)return ne=setTimeout,setTimeout(t,0);try{return ne(t,0)}catch(e){try{return ne.call(null,t,0)}catch(r){return ne.call(this,t,0)}}}function ty(t){if(oe===clearTimeout)return clearTimeout(t);if((oe===rs||!oe)&&clearTimeout)return oe=clearTimeout,clearTimeout(t);try{return oe(t)}catch(e){try{return oe.call(null,t)}catch(r){return oe.call(this,t)}}}function ny(){!_e||!ge||(_e=!1,ge.length?J=ge.concat(J):et=-1,J.length&&ns())}function ns(){if(!_e){var t=ts(ny);_e=!0;for(var e=J.length;e;){for(ge=J,J=[];++et<e;)ge&&ge[et].run();et=-1,e=J.length}ge=null,_e=!1,ty(t)}}function oy(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];J.push(new os(t,e)),J.length===1&&!_e&&ts(ns)}function os(t,e){this.fun=t,this.array=e}function xe(){}function by(t){throw new Error("process.binding is not supported")}function Ay(){return"/"}function Sy(t){throw new Error("process.chdir is not supported")}function Ey(){return 0}function Iy(t){var e=Ty.call($e)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}function Py(){var t=new Date,e=t-Ry;return e/1e3}var ne,oe,J,_e,ge,et,iy,ay,sy,uy,fy,py,ly,cy,yy,dy,my,hy,gy,xy,vy,wy,$e,Ty,Ry,Fy,ur,is=Ie(()=>{"use strict";s();u();ne=es,oe=rs;typeof globalThis.setTimeout=="function"&&(ne=setTimeout);typeof globalThis.clearTimeout=="function"&&(oe=clearTimeout);J=[],_e=!1,et=-1;os.prototype.run=function(){this.fun.apply(null,this.array)};iy="browser",ay="browser",sy=!0,uy={},fy=[],py="",ly={},cy={},yy={};dy=xe,my=xe,hy=xe,gy=xe,xy=xe,vy=xe,wy=xe;$e=globalThis.performance||{},Ty=$e.now||$e.mozNow||$e.msNow||$e.oNow||$e.webkitNow||function(){return new Date().getTime()};Ry=new Date;Fy={nextTick:oy,title:iy,browser:sy,env:uy,argv:fy,version:py,versions:ly,on:dy,addListener:my,once:hy,off:gy,removeListener:xy,removeAllListeners:vy,emit:wy,binding:by,cwd:Ay,chdir:Sy,umask:Ey,hrtime:Iy,platform:ay,release:cy,config:yy,uptime:Py},ur=Fy});var cn,yn,as=Ie(()=>{"use strict";s();u();typeof Object.create=="function"?cn=function(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:cn=function(e,r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e};yn=cn});var ds={};Bt(ds,{_extend:()=>An,debuglog:()=>ss,default:()=>_y,deprecate:()=>xn,format:()=>ot,inherits:()=>yn,inspect:()=>W,isArray:()=>vn,isBoolean:()=>it,isBuffer:()=>ls,isDate:()=>nt,isError:()=>pr,isFunction:()=>lr,isNull:()=>cr,isNullOrUndefined:()=>us,isNumber:()=>wn,isObject:()=>ve,isPrimitive:()=>ps,isRegExp:()=>fr,isString:()=>yr,isSymbol:()=>fs,isUndefined:()=>j,log:()=>cs});function ot(t){if(!yr(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(W(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,i=String(t).replace(Oy,function(p){if(p==="%%")return"%";if(r>=o)return p;switch(p){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(c){return"[Circular]"}default:return p}}),a=n[r];r<o;a=n[++r])cr(a)||!ve(a)?i+=" "+a:i+=" "+W(a);return i}function xn(t,e){if(j(globalThis.process))return function(){return xn(t,e).apply(this,arguments)};if(ur.noDeprecation===!0)return t;var r=!1;function n(){if(!r){if(ur.throwDeprecation)throw new Error(e);ur.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n}function ss(t){if(j(dn)&&(dn=ur.env.NODE_DEBUG||""),t=t.toUpperCase(),!rt[t])if(new RegExp("\\b"+t+"\\b","i").test(dn)){var e=0;rt[t]=function(){var r=ot.apply(null,arguments);console.error("%s %d: %s",t,e,r)}}else rt[t]=function(){};return rt[t]}function W(t,e){var r={seen:[],stylize:Ly};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),it(e)?r.showHidden=e:e&&An(r,e),j(r.showHidden)&&(r.showHidden=!1),j(r.depth)&&(r.depth=2),j(r.colors)&&(r.colors=!1),j(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Ny),tt(r,t,r.depth)}function Ny(t,e){var r=W.styles[e];return r?"\x1B["+W.colors[r][0]+"m"+t+"\x1B["+W.colors[r][1]+"m":t}function Ly(t,e){return t}function By(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function tt(t,e,r){if(t.customInspect&&e&&lr(e.inspect)&&e.inspect!==W&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return yr(n)||(n=tt(t,n,r)),n}var o=Uy(t,e);if(o)return o;var i=Object.keys(e),a=By(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(e)),pr(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return mn(e);if(i.length===0){if(lr(e)){var p=e.name?": "+e.name:"";return t.stylize("[Function"+p+"]","special")}if(fr(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(nt(e))return t.stylize(Date.prototype.toString.call(e),"date");if(pr(e))return mn(e)}var c="",d=!1,m=["{","}"];if(vn(e)&&(d=!0,m=["[","]"]),lr(e)){var y=e.name?": "+e.name:"";c=" [Function"+y+"]"}if(fr(e)&&(c=" "+RegExp.prototype.toString.call(e)),nt(e)&&(c=" "+Date.prototype.toUTCString.call(e)),pr(e)&&(c=" "+mn(e)),i.length===0&&(!d||e.length==0))return m[0]+c+m[1];if(r<0)return fr(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var x;return d?x=Cy(t,e,r,a,i):x=i.map(function(w){return gn(t,e,r,a,w,d)}),t.seen.pop(),ky(x,c,m)}function Uy(t,e){if(j(e))return t.stylize("undefined","undefined");if(yr(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(wn(e))return t.stylize(""+e,"number");if(it(e))return t.stylize(""+e,"boolean");if(cr(e))return t.stylize("null","null")}function mn(t){return"["+Error.prototype.toString.call(t)+"]"}function Cy(t,e,r,n,o){for(var i=[],a=0,p=e.length;a<p;++a)ys(e,String(a))?i.push(gn(t,e,r,n,String(a),!0)):i.push("");return o.forEach(function(c){c.match(/^\d+$/)||i.push(gn(t,e,r,n,c,!0))}),i}function gn(t,e,r,n,o,i){var a,p,c;if(c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},c.get?c.set?p=t.stylize("[Getter/Setter]","special"):p=t.stylize("[Getter]","special"):c.set&&(p=t.stylize("[Setter]","special")),ys(n,o)||(a="["+o+"]"),p||(t.seen.indexOf(c.value)<0?(cr(r)?p=tt(t,c.value,null):p=tt(t,c.value,r-1),p.indexOf(`
|
|
2
|
+
`)>-1&&(i?p=p.split(`
|
|
3
|
+
`).map(function(d){return" "+d}).join(`
|
|
4
|
+
`).substr(2):p=`
|
|
5
|
+
`+p.split(`
|
|
6
|
+
`).map(function(d){return" "+d}).join(`
|
|
7
|
+
`))):p=t.stylize("[Circular]","special")),j(a)){if(i&&o.match(/^\d+$/))return p;a=JSON.stringify(""+o),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+p}function ky(t,e,r){var n=0,o=t.reduce(function(i,a){return n++,a.indexOf(`
|
|
8
8
|
`)>=0&&n++,i+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(e===""?"":e+`
|
|
9
9
|
`)+" "+t.join(`,
|
|
10
|
-
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function Vt(t){return Array.isArray(t)}function Vr(t){return typeof t=="boolean"}function rr(t){return t===null}function Di(t){return t==null}function Gt(t){return typeof t=="number"}function tr(t){return typeof t=="string"}function ji(t){return typeof t=="symbol"}function _(t){return t===void 0}function Qe(t){return ye(t)&&zt(t)==="[object RegExp]"}function ye(t){return typeof t=="object"&&t!==null}function jr(t){return ye(t)&&zt(t)==="[object Date]"}function Xe(t){return ye(t)&&(zt(t)==="[object Error]"||t instanceof Error)}function er(t){return typeof t=="function"}function Wi(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function Vi(t){return f.isBuffer(t)}function zt(t){return Object.prototype.toString.call(t)}function Dt(t){return t<10?"0"+t.toString(10):t.toString(10)}function Bp(){var t=new Date,e=[Dt(t.getHours()),Dt(t.getMinutes()),Dt(t.getSeconds())].join(":");return[t.getDate(),Cp[t.getMonth()],e].join(" ")}function Gi(){console.log("%s - %s",Bp(),Wr.apply(null,arguments))}function Yt(t,e){if(!e||!ye(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}function zi(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Ip,Mr,_t,Cp,Up,Hi=Ae(()=>{"use strict";s();u();qi();_i();Ip=/%[sdj%]/g;Mr={};M.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};M.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};Cp=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Up={inherits:qt,_extend:Yt,log:Gi,isBuffer:Vi,isPrimitive:Wi,isFunction:er,isError:Xe,isDate:jr,isObject:ye,isRegExp:Qe,isUndefined:_,isSymbol:ji,isString:tr,isNumber:Gt,isNullOrUndefined:Di,isNull:rr,isBoolean:Vr,isArray:Vt,inspect:M,deprecate:Wt,format:Wr,debuglog:Mi}});var Ji=v((Yg,Gr)=>{"use strict";s();u();var he=(Hi(),Wn(Yi));if(he&&he.default){Gr.exports=he.default;for(let t in he)Gr.exports[t]=he[t]}else he&&(Gr.exports=he)});var Zi=v((Kg,Ki)=>{"use strict";s();u();Ki.exports=Ji().inspect});var ar=v((Xg,ga)=>{"use strict";s();u();var nn=typeof Map=="function"&&Map.prototype,Ht=Object.getOwnPropertyDescriptor&&nn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Yr=nn&&Ht&&typeof Ht.get=="function"?Ht.get:null,Qi=nn&&Map.prototype.forEach,on=typeof Set=="function"&&Set.prototype,Jt=Object.getOwnPropertyDescriptor&&on?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Hr=on&&Jt&&typeof Jt.get=="function"?Jt.get:null,Xi=on&&Set.prototype.forEach,kp=typeof WeakMap=="function"&&WeakMap.prototype,or=kp?WeakMap.prototype.has:null,$p=typeof WeakSet=="function"&&WeakSet.prototype,ir=$p?WeakSet.prototype.has:null,qp=typeof WeakRef=="function"&&WeakRef.prototype,ea=qp?WeakRef.prototype.deref:null,_p=Boolean.prototype.valueOf,Mp=Object.prototype.toString,Dp=Function.prototype.toString,jp=String.prototype.match,an=String.prototype.slice,te=String.prototype.replace,Wp=String.prototype.toUpperCase,ra=String.prototype.toLowerCase,la=RegExp.prototype.test,ta=Array.prototype.concat,D=Array.prototype.join,Vp=Array.prototype.slice,na=Math.floor,Qt=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Kt=Object.getOwnPropertySymbols,Xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Le=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Le||!0)?Symbol.toStringTag:null,pa=Object.prototype.propertyIsEnumerable,oa=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function ia(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||la.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-na(-t):na(t);if(n!==t){var o=String(n),i=an.call(e,o.length+1);return te.call(o,r,"$&_")+"."+te.call(te.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return te.call(e,r,"$&_")}var en=Zi(),aa=en.custom,sa=ma(aa)?aa:null,ca={__proto__:null,double:'"',single:"'"},Gp={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ga.exports=function t(e,r,n,o){var i=r||{};if(Y(i,"quoteStyle")&&!Y(ca,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Y(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Y(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=i.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return ha(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var p=String(e);return l?ia(e,p):p}if(typeof e=="bigint"){var m=String(e)+"n";return l?ia(e,m):m}var h=typeof i.depth=="undefined"?5:i.depth;if(typeof n=="undefined"&&(n=0),n>=h&&h>0&&typeof e=="object")return rn(e)?"[Array]":"[Object]";var d=fc(i,n);if(typeof o=="undefined")o=[];else if(ya(o,e)>=0)return"[Circular]";function x(be,vr,ju){if(vr&&(o=Vp.call(o),o.push(vr)),ju){var kn={depth:i.depth};return Y(i,"quoteStyle")&&(kn.quoteStyle=i.quoteStyle),t(be,kn,n+1,o)}return t(be,i,n+1,o)}if(typeof e=="function"&&!ua(e)){var A=ec(e),T=zr(e,x);return"[Function"+(A?": "+A:" (anonymous)")+"]"+(T.length>0?" { "+D.call(T,", ")+" }":"")}if(ma(e)){var I=Le?te.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Xt.call(e);return typeof e=="object"&&!Le?nr(I):I}if(ac(e)){for(var O="<"+ra.call(String(e.nodeName)),C=e.attributes||[],W=0;W<C.length;W++)O+=" "+C[W].name+"="+da(zp(C[W].value),"double",i);return O+=">",e.childNodes&&e.childNodes.length&&(O+="..."),O+="</"+ra.call(String(e.nodeName))+">",O}if(rn(e)){if(e.length===0)return"[]";var se=zr(e,x);return d&&!uc(se)?"["+tn(se,d)+"]":"[ "+D.call(se,", ")+" ]"}if(Hp(e)){var Ge=zr(e,x);return!("cause"in Error.prototype)&&"cause"in e&&!pa.call(e,"cause")?"{ ["+String(e)+"] "+D.call(ta.call("[cause]: "+x(e.cause),Ge),", ")+" }":Ge.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+D.call(Ge,", ")+" }"}if(typeof e=="object"&&a){if(sa&&typeof e[sa]=="function"&&en)return en(e,{depth:h-n});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(rc(e)){var xr=[];return Qi&&Qi.call(e,function(be,vr){xr.push(x(vr,e,!0)+" => "+x(be,e))}),fa("Map",Yr.call(e),xr,d)}if(oc(e)){var Cn=[];return Xi&&Xi.call(e,function(be){Cn.push(x(be,e))}),fa("Set",Hr.call(e),Cn,d)}if(tc(e))return Zt("WeakMap");if(ic(e))return Zt("WeakSet");if(nc(e))return Zt("WeakRef");if(Kp(e))return nr(x(Number(e)));if(Qp(e))return nr(x(Qt.call(e)));if(Zp(e))return nr(_p.call(e));if(Jp(e))return nr(x(String(e)));if(typeof window!="undefined"&&e===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&e===globalThis||typeof globalThis!="undefined"&&e===globalThis)return"{ [object globalThis] }";if(!Yp(e)&&!ua(e)){var ct=zr(e,x),Bn=oa?oa(e)===Object.prototype:e instanceof Object||e.constructor===Object,dt=e instanceof Object?"":"null prototype",Un=!Bn&&N&&Object(e)===e&&N in e?an.call(ne(e),8,-1):dt?"Object":"",Du=Bn||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",mt=Du+(Un||dt?"["+D.call(ta.call([],Un||[],dt||[]),": ")+"] ":"");return ct.length===0?mt+"{}":d?mt+"{"+tn(ct,d)+"}":mt+"{ "+D.call(ct,", ")+" }"}return String(e)};function da(t,e,r){var n=r.quoteStyle||e,o=ca[n];return o+t+o}function zp(t){return te.call(String(t),/"/g,""")}function rn(t){return ne(t)==="[object Array]"&&(!N||!(typeof t=="object"&&N in t))}function Yp(t){return ne(t)==="[object Date]"&&(!N||!(typeof t=="object"&&N in t))}function ua(t){return ne(t)==="[object RegExp]"&&(!N||!(typeof t=="object"&&N in t))}function Hp(t){return ne(t)==="[object Error]"&&(!N||!(typeof t=="object"&&N in t))}function Jp(t){return ne(t)==="[object String]"&&(!N||!(typeof t=="object"&&N in t))}function Kp(t){return ne(t)==="[object Number]"&&(!N||!(typeof t=="object"&&N in t))}function Zp(t){return ne(t)==="[object Boolean]"&&(!N||!(typeof t=="object"&&N in t))}function ma(t){if(Le)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Xt)return!1;try{return Xt.call(t),!0}catch(e){}return!1}function Qp(t){if(!t||typeof t!="object"||!Qt)return!1;try{return Qt.call(t),!0}catch(e){}return!1}var Xp=Object.prototype.hasOwnProperty||function(t){return t in this};function Y(t,e){return Xp.call(t,e)}function ne(t){return Mp.call(t)}function ec(t){if(t.name)return t.name;var e=jp.call(Dp.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function ya(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function rc(t){if(!Yr||!t||typeof t!="object")return!1;try{Yr.call(t);try{Hr.call(t)}catch(e){return!0}return t instanceof Map}catch(e){}return!1}function tc(t){if(!or||!t||typeof t!="object")return!1;try{or.call(t,or);try{ir.call(t,ir)}catch(e){return!0}return t instanceof WeakMap}catch(e){}return!1}function nc(t){if(!ea||!t||typeof t!="object")return!1;try{return ea.call(t),!0}catch(e){}return!1}function oc(t){if(!Hr||!t||typeof t!="object")return!1;try{Hr.call(t);try{Yr.call(t)}catch(e){return!0}return t instanceof Set}catch(e){}return!1}function ic(t){if(!ir||!t||typeof t!="object")return!1;try{ir.call(t,ir);try{or.call(t,or)}catch(e){return!0}return t instanceof WeakSet}catch(e){}return!1}function ac(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function ha(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return ha(an.call(t,0,e.maxStringLength),e)+n}var o=Gp[e.quoteStyle||"single"];o.lastIndex=0;var i=te.call(te.call(t,o,"\\$1"),/[\x00-\x1f]/g,sc);return da(i,"single",e)}function sc(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+Wp.call(e.toString(16))}function nr(t){return"Object("+t+")"}function Zt(t){return t+" { ? }"}function fa(t,e,r,n){var o=n?tn(r,n):D.call(r,", ");return t+" ("+e+") {"+o+"}"}function uc(t){for(var e=0;e<t.length;e++)if(ya(t[e],`
|
|
11
|
-
`)>=0)return!1;return!0}function
|
|
12
|
-
`+e.prev+e.base;return r+
|
|
13
|
-
`+e.prev}function zr(t,e){var r=rn(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=Y(t,o)?e(t[o],t):""}var i=typeof Kt=="function"?Kt(t):[],a;if(Le){a={};for(var l=0;l<i.length;l++)a["$"+i[l]]=i[l]}for(var p in t)Y(t,p)&&(r&&String(Number(p))===p&&p<t.length||Le&&a["$"+p]instanceof Symbol||(la.call(/[^\w$]/,p)?n.push(e(p,t)+": "+e(t[p],t)):n.push(p+": "+e(t[p],t))));if(typeof Kt=="function")for(var m=0;m<i.length;m++)pa.call(t,i[m])&&n.push("["+e(i[m])+"]: "+e(t[i[m]],t));return n}});var Jr=v((tx,xa)=>{"use strict";s();u();xa.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var wa=v((ix,va)=>{"use strict";s();u();var lc=P(),pc=ar(),cc=Jr();va.exports=function(e,r){if(!cc(r))throw new lc("Assertion failed: IsPropertyKey(P) is not true, got "+pc(r));return e[r]}});var Ta=v((ux,Sa)=>{"use strict";s();u();var Aa=Function.prototype.toString,Ce=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,un,Kr;if(typeof Ce=="function"&&typeof Object.defineProperty=="function")try{un=Object.defineProperty({},"length",{get:function(){throw Kr}}),Kr={},Ce(function(){throw 42},null,un)}catch(t){t!==Kr&&(Ce=null)}else Ce=null;var dc=/^\s*class\b/,fn=function(e){try{var r=Aa.call(e);return dc.test(r)}catch(n){return!1}},sn=function(e){try{return fn(e)?!1:(Aa.call(e),!0)}catch(r){return!1}},Zr=Object.prototype.toString,mc="[object Object]",yc="[object Function]",hc="[object GeneratorFunction]",gc="[object HTMLAllCollection]",xc="[object HTML document.all class]",vc="[object HTMLCollection]",wc=typeof Symbol=="function"&&!!Symbol.toStringTag,bc=!(0 in[,]),ln=function(){return!1};typeof document=="object"&&(ba=document.all,Zr.call(ba)===Zr.call(document.all)&&(ln=function(e){if((bc||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=Zr.call(e);return(r===gc||r===xc||r===vc||r===mc)&&e("")==null}catch(n){}return!1}));var ba;Sa.exports=Ce?function(e){if(ln(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Ce(e,null,un)}catch(r){if(r!==Kr)return!1}return!fn(e)&&sn(e)}:function(e){if(ln(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(wc)return sn(e);if(fn(e))return!1;var r=Zr.call(e);return r!==yc&&r!==hc&&!/^\[object HTML/.test(r)?!1:sn(e)}});var pn=v((px,Ea)=>{"use strict";s();u();Ea.exports=Ta()});var Pa=v((mx,Fa)=>{"use strict";s();u();var Ia=P(),Ac=wa(),Sc=pn(),Tc=Jr(),Ra=ar();Fa.exports=function(e,r){if(!Tc(r))throw new Ia("Assertion failed: IsPropertyKey(P) is not true");var n=Ac(e,r);if(n!=null){if(!Sc(n))throw new Ia(Ra(r)+" is not a function: "+Ra(n));return n}}});var Oa=v((gx,Na)=>{"use strict";s();u();var Ec=St();Na.exports=function(){return Ec()&&!!Symbol.toStringTag}});var yn=v((wx,Ua)=>{"use strict";s();u();var cn=k(),La=Oa()(),Ca,Ba,dn,mn;La&&(Ca=cn("Object.prototype.hasOwnProperty"),Ba=cn("RegExp.prototype.exec"),dn={},Qr=function(){throw dn},mn={toString:Qr,valueOf:Qr},typeof Symbol.toPrimitive=="symbol"&&(mn[Symbol.toPrimitive]=Qr));var Qr,Ic=cn("Object.prototype.toString"),Rc=Object.getOwnPropertyDescriptor,Fc="[object RegExp]";Ua.exports=La?function(e){if(!e||typeof e!="object")return!1;var r=Rc(e,"lastIndex"),n=r&&Ca(r,"value");if(!n)return!1;try{Ba(e,mn)}catch(o){return o===dn}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Ic(e)===Fc}});var hn=v((Sx,ka)=>{"use strict";s();u();var Pc=k(),Nc=yn(),Oc=Pc("RegExp.prototype.exec"),Lc=P();ka.exports=function(e){if(!Nc(e))throw new Lc("`regex` must be a RegExp");return function(n){return Oc(e,n)!==null}}});var qa=v((Ix,$a)=>{"use strict";s();u();$a.exports=function(e,r){for(var n=0;n<e.length;n+=1)if(!r(e[n],n,e))return!1;return!0}});var Ma=v((Px,_a)=>{"use strict";s();u();_a.exports=function(e){if(e===null)return"Null";if(typeof e=="undefined")return"Undefined";if(typeof e=="function"||typeof e=="object")return"Object";if(typeof e=="number")return"Number";if(typeof e=="boolean")return"Boolean";if(typeof e=="string")return"String"}});var gn=v((Lx,Da)=>{"use strict";s();u();var Cc=Ma();Da.exports=function(e){return typeof e=="symbol"?"Symbol":typeof e=="bigint"?"BigInt":Cc(e)}});var Va=v((Ux,Wa)=>{"use strict";s();u();var ja=P(),Bc=ar(),Uc=Jr(),kc=gn();Wa.exports=function(e,r){if(kc(e)!=="Object")throw new ja("Assertion failed: Type(O) is not Object");if(!Uc(r))throw new ja("Assertion failed: IsPropertyKey(P) is not true, got "+Bc(r));return e[r]}});var za=v((qx,Ga)=>{"use strict";s();u();var $c=B();Ga.exports=$c("%Math.min%")});var xn=v((Dx,Ya)=>{"use strict";s();u();Ya.exports=Number.isNaN||function(e){return e!==e}});var Ja=v((Vx,Ha)=>{"use strict";s();u();var qc=xn();Ha.exports=function(t){return(typeof t=="number"||typeof t=="bigint")&&!qc(t)&&t!==1/0&&t!==-1/0}});var Xr=v((Yx,Za)=>{"use strict";s();u();var Ka=B(),_c=Ka("%Math.abs%"),Mc=Ka("%Math.floor%"),Dc=xn(),jc=Ja();Za.exports=function(e){if(typeof e!="number"||Dc(e)||!jc(e))return!1;var r=_c(e);return Mc(r)===r}});var wn=v((Kx,Qa)=>{"use strict";s();u();var Wc=k(),vn=P(),Vc=Xr(),Gc=Wc("String.prototype.slice");Qa.exports=function(e,r,n){if(typeof e!="string")throw new vn("Assertion failed: `string` must be a String");if(typeof r!="string")throw new vn("Assertion failed: `searchValue` must be a String");if(!Vc(n)||n<0)throw new vn("Assertion failed: `fromIndex` must be a non-negative integer");var o=e.length;if(r===""&&n<=o)return n;for(var i=r.length,a=n;a<=o-i;a+=1){var l=Gc(e,a,a+i);if(l===r)return a}return-1}});var et=v((Xx,Xa)=>{"use strict";s();u();var zc=P();Xa.exports=function(e){if(e==null)throw new zc(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var rt=v((t0,es)=>{"use strict";s();u();var Yc=B(),Hc=Yc("%String%"),Jc=P();es.exports=function(e){if(typeof e=="symbol")throw new Jc("Cannot convert a Symbol value to a string");return Hc(e)}});var bn=v((i0,ns)=>{"use strict";s();u();var Kc=et(),Zc=rt(),Qc=k(),rs=Qc("String.prototype.replace"),ts=/^\s$/.test("\u180E"),Xc=ts?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,ed=ts?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;ns.exports=function(){var e=Zc(Kc(this));return rs(rs(e,Xc,""),ed,"")}});var An=v((u0,is)=>{"use strict";s();u();var rd=bn(),os="\u200B",Be="\u180E";is.exports=function(){return String.prototype.trim&&os.trim()===os&&Be.trim()===Be&&("_"+Be).trim()==="_"+Be&&(Be+"_").trim()===Be+"_"?String.prototype.trim:rd}});var ss=v((p0,as)=>{"use strict";s();u();var td=Ke(),nd=An();as.exports=function(){var e=nd();return td(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var ps=v((m0,ls)=>{"use strict";s();u();var od=kr(),id=Ke(),ad=et(),sd=bn(),us=An(),ud=ss(),fd=od(us()),fs=function(e){return ad(e),fd(e)};id(fs,{getPolyfill:us,implementation:sd,shim:ud});ls.exports=fs});var ys=v((g0,ms)=>{"use strict";s();u();var Tn=B(),Sn=Tn("%Number%"),ld=Tn("%RegExp%"),pd=P(),cs=Tn("%parseInt%"),cd=k(),tt=hn(),ds=cd("String.prototype.slice"),dd=tt(/^0b[01]+$/i),md=tt(/^0o[0-7]+$/i),yd=tt(/^[-+]0x[0-9a-f]+$/i),hd=["\x85","\u200B","\uFFFE"].join(""),gd=new ld("["+hd+"]","g"),xd=tt(gd),vd=ps();ms.exports=function t(e){if(typeof e!="string")throw new pd("Assertion failed: `argument` is not a String");if(dd(e))return Sn(cs(ds(e,2),2));if(md(e))return Sn(cs(ds(e,2),8));if(xd(e)||yd(e))return NaN;var r=vd(e);return r!==e?t(r):Sn(e)}});var xs=v((w0,gs)=>{"use strict";s();u();var wd=P(),hs=Xr(),bd=k(),Ad=bd("String.prototype.slice");gs.exports=function(e,r,n){if(typeof e!="string"||!hs(r)||arguments.length>2&&!hs(n))throw new wd("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Ad(e,r,arguments.length>2?n:e.length)}});var ws=v((S0,vs)=>{"use strict";s();u();vs.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var As=v((I0,bs)=>{"use strict";s();u();var Sd=k()("String.prototype.slice");bs.exports=function(e,r){return e===r?!0:e.length>r.length?!1:Sd(r,0,e.length)===e}});var Rs=v((P0,Is)=>{"use strict";s();u();var H=P(),Es=hn(),Td=qa(),En=ar(),Ed=Va(),Id=kt(),Rd=za(),Fd=wn(),Ss=ys(),J=xs(),Pd=rt(),Ts=gn(),Nd=Xr(),Od=ws(),sr=As(),Ld=Es(/^\$[0-9]/),Cd=Es(/^\$[0-9][0-9]/);Is.exports=function(e,r,n,o,i,a){if(typeof e!="string")throw new H("Assertion failed: `matched` must be a String");if(typeof r!="string")throw new H("Assertion failed: `str` must be a String");if(!Nd(n)||n<0)throw new H("Assertion failed: `position` must be a nonnegative integer, got "+En(n));if(!Id(o)||!Td(o,Od))throw new H("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+En(o));if(typeof i!="undefined"&&Ts(i)!=="Object")throw new H("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof a!="string")throw new H("Assertion failed: `replacementTemplate` must be a String");var l=r.length;if(n>l)throw new H("Assertion failed: position > stringLength, got "+En(n));for(var p=a,m="";p!=="";){var h,d,x;if(sr("$$",p))h="$$",d="$";else if(sr("$`",p))h="$`",d=J(r,0,n);else if(sr("$&",p))h="$&",d=e;else if(sr("$'",p)){h="$'";var A=e.length,T=n+A;d=J(r,Rd(T,l))}else if(Ld(p)){var I=Cd(p)?2:1,O=J(p,1,1+I),C=Ss(O);if(C<0||C>99)throw new H("Assertion failed: `index` must be >= 0 and <= 99");var W=o.length;C>W&&I===2&&(I=1,O=J(O,0,1),C=Ss(O)),h=J(p,0,1+I),1<=C&&C<=W?(x=o[C-1],typeof x=="undefined"?d="":d=x):d=h}else if(sr("$<",p)){var se=Fd(p,">",0);if(se===-1||typeof i=="undefined")h="$<",d=h;else{h=J(p,0,se+1);var Ge=J(p,2,se);if(Ts(i)!=="Object")throw new H("Assertion failed: Type(namedCaptures) is not Object");x=Ed(i,Ge),typeof x=="undefined"?d="":d=Pd(x)}}else h=J(p,0,1),d=h;var xr=h.length;p=J(p,xr),m+=d}return m}});var Rn=v((L0,Os)=>{"use strict";s();u();var Fs=Li(),Bd=Pa(),Ud=Rs(),kd=pn(),$d=et(),nt=rt(),Ps=wn(),qd=B(),ot=k(),_d=Tt()(),Md=yn(),Dd=qd("%Math.max%"),Ns=P(),jd=ot("Array.prototype.push"),In=ot("String.prototype.slice"),Wd=ot("String.prototype.indexOf"),Vd=ot("String.prototype.replace");Os.exports=function(e,r){var n=$d(this),o=Md(e);if(o&&Wd(In(e,e.source.length+2),"g")===-1)throw new Ns("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(_d&&Symbol.replace){if(e!=null){var i=Bd(e,Symbol.replace);if(typeof i!="undefined")return Fs(i,e,[n,r])}}else if(o)return Vd(n,e,r);var a=nt(n),l=nt(e),p=kd(r);p||(r=nt(r));for(var m=l.length,h=Dd(1,m),d=[],x=Ps(a,l,0);x!==-1;)jd(d,x),x=Ps(a,l,x+h);for(var A=0,T="",I=0;I<d.length;I+=1){var O;if(p)O=nt(Fs(r,void 0,[l,d[I],a]));else{if(typeof r!="string")throw new Ns("Assertion failed: `replaceValue` should be a string at this point");var C=[];O=Ud(l,a,d[I],C,void 0,r)}var W=In(a,A,d[I]);T+=W+O,A=d[I]+m}return A<a.length&&(T+=In(a,A)),T}});var Fn=v((U0,Ls)=>{"use strict";s();u();var Gd=Rn();Ls.exports=function(){return String.prototype.replaceAll||Gd}});var Bs=v((q0,Cs)=>{"use strict";s();u();var zd=Ke(),Yd=Fn();Cs.exports=function(){var e=Yd();return zd(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var qs=v((D0,$s)=>{"use strict";s();u();var Hd=kr(),Jd=Ke(),Us=Rn(),Kd=Fn(),Zd=Bs(),ks=Hd(Us);Jd(ks,{getPolyfill:Kd,implementation:Us,shim:Zd});$s.exports=ks});var Xy={};gt(Xy,{DynamicSnippetsGenerator:()=>pt});module.exports=Wn(Xy);s();u();var PT=Ju(qs(),1);s();u();s();u();s();u();function E(t){throw new Error("Unexpected value: "+JSON.stringify(t))}s();u();function ur(t){return Object.keys(t)}s();u();s();u();s();u();s();u();s();u();s();u();var Qd=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,_s=Qd;var Xd=typeof self=="object"&&self&&self.Object===Object&&self,em=_s||Xd||Function("return this")(),Ms=em;var rm=Ms.Symbol,K=rm;s();u();var Ds=Object.prototype,tm=Ds.hasOwnProperty,nm=Ds.toString,fr=K?K.toStringTag:void 0;function om(t){var e=tm.call(t,fr),r=t[fr];try{t[fr]=void 0;var n=!0}catch(i){}var o=nm.call(t);return n&&(e?t[fr]=r:delete t[fr]),o}var js=om;s();u();var im=Object.prototype,am=im.toString;function sm(t){return am.call(t)}var Ws=sm;var um="[object Null]",fm="[object Undefined]",Vs=K?K.toStringTag:void 0;function lm(t){return t==null?t===void 0?fm:um:Vs&&Vs in Object(t)?js(t):Ws(t)}var Gs=lm;s();u();function pm(t){return t!=null&&typeof t=="object"}var zs=pm;var cm="[object Symbol]";function dm(t){return typeof t=="symbol"||zs(t)&&Gs(t)==cm}var Ys=dm;s();u();s();u();function mm(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var Hs=mm;s();u();var ym=Array.isArray,Js=ym;var hm=1/0,Ks=K?K.prototype:void 0,Zs=Ks?Ks.toString:void 0;function Qs(t){if(typeof t=="string")return t;if(Js(t))return Hs(t,Qs)+"";if(Ys(t))return Zs?Zs.call(t):"";var e=t+"";return e=="0"&&1/t==-hm?"-0":e}var Xs=Qs;s();u();function gm(t){return t==null?"":Xs(t)}var oe=gm;s();u();s();u();s();u();s();u();s();u();s();u();function xm(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}var eu=xm;function vm(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:eu(t,e,r)}var ru=vm;s();u();var wm="\\ud800-\\udfff",bm="\\u0300-\\u036f",Am="\\ufe20-\\ufe2f",Sm="\\u20d0-\\u20ff",Tm=bm+Am+Sm,Em="\\ufe0e\\ufe0f",Im="\\u200d",Rm=RegExp("["+Im+wm+Tm+Em+"]");function Fm(t){return Rm.test(t)}var it=Fm;s();u();s();u();function Pm(t){return t.split("")}var tu=Pm;s();u();var nu="\\ud800-\\udfff",Nm="\\u0300-\\u036f",Om="\\ufe20-\\ufe2f",Lm="\\u20d0-\\u20ff",Cm=Nm+Om+Lm,Bm="\\ufe0e\\ufe0f",Um="["+nu+"]",Pn="["+Cm+"]",Nn="\\ud83c[\\udffb-\\udfff]",km="(?:"+Pn+"|"+Nn+")",ou="[^"+nu+"]",iu="(?:\\ud83c[\\udde6-\\uddff]){2}",au="[\\ud800-\\udbff][\\udc00-\\udfff]",$m="\\u200d",su=km+"?",uu="["+Bm+"]?",qm="(?:"+$m+"(?:"+[ou,iu,au].join("|")+")"+uu+su+")*",_m=uu+su+qm,Mm="(?:"+[ou+Pn+"?",Pn,iu,au,Um].join("|")+")",Dm=RegExp(Nn+"(?="+Nn+")|"+Mm+_m,"g");function jm(t){return t.match(Dm)||[]}var fu=jm;function Wm(t){return it(t)?fu(t):tu(t)}var lu=Wm;function Vm(t){return function(e){e=oe(e);var r=it(e)?lu(e):void 0,n=r?r[0]:e.charAt(0),o=r?ru(r,1).join(""):e.slice(1);return n[t]()+o}}var pu=Vm;var Gm=pu("toUpperCase"),Ue=Gm;function zm(t){return Ue(oe(t).toLowerCase())}var cu=zm;s();u();s();u();function Ym(t,e,r,n){var o=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}var du=Ym;s();u();s();u();s();u();function Hm(t){return function(e){return t==null?void 0:t[e]}}var mu=Hm;var Jm={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Km=mu(Jm),yu=Km;var Zm=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qm="\\u0300-\\u036f",Xm="\\ufe20-\\ufe2f",ey="\\u20d0-\\u20ff",ry=Qm+Xm+ey,ty="["+ry+"]",ny=RegExp(ty,"g");function oy(t){return t=oe(t),t&&t.replace(Zm,yu).replace(ny,"")}var hu=oy;s();u();s();u();var iy=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function ay(t){return t.match(iy)||[]}var gu=ay;s();u();var sy=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function uy(t){return sy.test(t)}var xu=uy;s();u();var Su="\\ud800-\\udfff",fy="\\u0300-\\u036f",ly="\\ufe20-\\ufe2f",py="\\u20d0-\\u20ff",cy=fy+ly+py,Tu="\\u2700-\\u27bf",Eu="a-z\\xdf-\\xf6\\xf8-\\xff",dy="\\xac\\xb1\\xd7\\xf7",my="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yy="\\u2000-\\u206f",hy=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Iu="A-Z\\xc0-\\xd6\\xd8-\\xde",gy="\\ufe0e\\ufe0f",Ru=dy+my+yy+hy,Fu="['\u2019]",vu="["+Ru+"]",xy="["+cy+"]",Pu="\\d+",vy="["+Tu+"]",Nu="["+Eu+"]",Ou="[^"+Su+Ru+Pu+Tu+Eu+Iu+"]",wy="\\ud83c[\\udffb-\\udfff]",by="(?:"+xy+"|"+wy+")",Ay="[^"+Su+"]",Lu="(?:\\ud83c[\\udde6-\\uddff]){2}",Cu="[\\ud800-\\udbff][\\udc00-\\udfff]",ke="["+Iu+"]",Sy="\\u200d",wu="(?:"+Nu+"|"+Ou+")",Ty="(?:"+ke+"|"+Ou+")",bu="(?:"+Fu+"(?:d|ll|m|re|s|t|ve))?",Au="(?:"+Fu+"(?:D|LL|M|RE|S|T|VE))?",Bu=by+"?",Uu="["+gy+"]?",Ey="(?:"+Sy+"(?:"+[Ay,Lu,Cu].join("|")+")"+Uu+Bu+")*",Iy="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ry="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fy=Uu+Bu+Ey,Py="(?:"+[vy,Lu,Cu].join("|")+")"+Fy,Ny=RegExp([ke+"?"+Nu+"+"+bu+"(?="+[vu,ke,"$"].join("|")+")",Ty+"+"+Au+"(?="+[vu,ke+wu,"$"].join("|")+")",ke+"?"+wu+"+"+bu,ke+"+"+Au,Ry,Iy,Pu,Py].join("|"),"g");function Oy(t){return t.match(Ny)||[]}var ku=Oy;function Ly(t,e,r){return t=oe(t),e=r?void 0:e,e===void 0?xu(t)?ku(t):gu(t):t.match(e)||[]}var $u=Ly;var Cy="['\u2019]",By=RegExp(Cy,"g");function Uy(t){return function(e){return du($u(hu(e).replace(By,"")),t,"")}}var qu=Uy;var ky=qu(function(t,e,r){return e=e.toLowerCase(),t+(r?cu(e):e)}),at=ky;s();u();s();u();var ge=class{};s();u();s();u();var ie=class extends ge{constructor(r){super();g(this,"value");this.value=r}write(r){typeof this.value=="string"?r.write(this.value):this.value(r)}};var $y=4,lr=class{constructor(){g(this,"buffer","");g(this,"indentLevel",0);g(this,"hasWrittenAnything",!1);g(this,"lastCharacterIsNewline",!1)}write(e){let r=e.length>0&&e.endsWith(`
|
|
10
|
+
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function vn(t){return Array.isArray(t)}function it(t){return typeof t=="boolean"}function cr(t){return t===null}function us(t){return t==null}function wn(t){return typeof t=="number"}function yr(t){return typeof t=="string"}function fs(t){return typeof t=="symbol"}function j(t){return t===void 0}function fr(t){return ve(t)&&bn(t)==="[object RegExp]"}function ve(t){return typeof t=="object"&&t!==null}function nt(t){return ve(t)&&bn(t)==="[object Date]"}function pr(t){return ve(t)&&(bn(t)==="[object Error]"||t instanceof Error)}function lr(t){return typeof t=="function"}function ps(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function ls(t){return f.isBuffer(t)}function bn(t){return Object.prototype.toString.call(t)}function hn(t){return t<10?"0"+t.toString(10):t.toString(10)}function $y(){var t=new Date,e=[hn(t.getHours()),hn(t.getMinutes()),hn(t.getSeconds())].join(":");return[t.getDate(),qy[t.getMonth()],e].join(" ")}function cs(){console.log("%s - %s",$y(),ot.apply(null,arguments))}function An(t,e){if(!e||!ve(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}function ys(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Oy,rt,dn,qy,_y,ms=Ie(()=>{"use strict";s();u();is();as();Oy=/%[sdj%]/g;rt={};W.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};W.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};qy=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];_y={inherits:yn,_extend:An,log:cs,isBuffer:ls,isPrimitive:ps,isFunction:lr,isError:pr,isDate:nt,isObject:ve,isRegExp:fr,isUndefined:j,isSymbol:fs,isString:yr,isNumber:wn,isNullOrUndefined:us,isNull:cr,isBoolean:it,isArray:vn,inspect:W,deprecate:xn,format:ot,debuglog:ss}});var hs=h((cw,at)=>{"use strict";s();u();var we=(ms(),xo(ds));if(we&&we.default){at.exports=we.default;for(let t in we)at.exports[t]=we[t]}else we&&(at.exports=we)});var xs=h((mw,gs)=>{"use strict";s();u();gs.exports=hs().inspect});var gr=h((xw,$s)=>{"use strict";s();u();var Ln=typeof Map=="function"&&Map.prototype,Sn=Object.getOwnPropertyDescriptor&&Ln?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ut=Ln&&Sn&&typeof Sn.get=="function"?Sn.get:null,vs=Ln&&Map.prototype.forEach,Bn=typeof Set=="function"&&Set.prototype,En=Object.getOwnPropertyDescriptor&&Bn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ft=Bn&&En&&typeof En.get=="function"?En.get:null,ws=Bn&&Set.prototype.forEach,My=typeof WeakMap=="function"&&WeakMap.prototype,mr=My?WeakMap.prototype.has:null,Dy=typeof WeakSet=="function"&&WeakSet.prototype,hr=Dy?WeakSet.prototype.has:null,jy=typeof WeakRef=="function"&&WeakRef.prototype,bs=jy?WeakRef.prototype.deref:null,Wy=Boolean.prototype.valueOf,Gy=Object.prototype.toString,Vy=Function.prototype.toString,zy=String.prototype.match,Un=String.prototype.slice,ie=String.prototype.replace,Yy=String.prototype.toUpperCase,As=String.prototype.toLowerCase,Ns=RegExp.prototype.test,Ss=Array.prototype.concat,G=Array.prototype.join,Hy=Array.prototype.slice,Es=Math.floor,Rn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Tn=Object.getOwnPropertySymbols,Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Me=typeof Symbol=="function"&&typeof Symbol.iterator=="object",L=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Me||!0)?Symbol.toStringTag:null,Ls=Object.prototype.propertyIsEnumerable,Ts=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Is(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ns.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Es(-t):Es(t);if(n!==t){var o=String(n),i=Un.call(e,o.length+1);return ie.call(o,r,"$&_")+"."+ie.call(ie.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ie.call(e,r,"$&_")}var Fn=xs(),Rs=Fn.custom,Ps=Cs(Rs)?Rs:null,Bs={__proto__:null,double:'"',single:"'"},Jy={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};$s.exports=function t(e,r,n,o){var i=r||{};if(K(i,"quoteStyle")&&!K(Bs,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=K(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=i.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return qs(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return p?Is(e,c):c}if(typeof e=="bigint"){var d=String(e)+"n";return p?Is(e,d):d}var m=typeof i.depth=="undefined"?5:i.depth;if(typeof n=="undefined"&&(n=0),n>=m&&m>0&&typeof e=="object")return On(e)?"[Array]":"[Object]";var y=yd(i,n);if(typeof o=="undefined")o=[];else if(ks(o,e)>=0)return"[Circular]";function x(Te,Or,pp){if(Or&&(o=Hy.call(o),o.push(Or)),pp){var po={depth:i.depth};return K(i,"quoteStyle")&&(po.quoteStyle=i.quoteStyle),t(Te,po,n+1,o)}return t(Te,i,n+1,o)}if(typeof e=="function"&&!Fs(e)){var w=od(e),E=st(e,x);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(E.length>0?" { "+G.call(E,", ")+" }":"")}if(Cs(e)){var I=Me?ie.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Pn.call(e);return typeof e=="object"&&!Me?dr(I):I}if(pd(e)){for(var B="<"+As.call(String(e.nodeName)),C=e.attributes||[],z=0;z<C.length;z++)B+=" "+C[z].name+"="+Us(Ky(C[z].value),"double",i);return B+=">",e.childNodes&&e.childNodes.length&&(B+="..."),B+="</"+As.call(String(e.nodeName))+">",B}if(On(e)){if(e.length===0)return"[]";var fe=st(e,x);return y&&!cd(fe)?"["+Nn(fe,y)+"]":"[ "+G.call(fe,", ")+" ]"}if(Qy(e)){var Qe=st(e,x);return!("cause"in Error.prototype)&&"cause"in e&&!Ls.call(e,"cause")?"{ ["+String(e)+"] "+G.call(Ss.call("[cause]: "+x(e.cause),Qe),", ")+" }":Qe.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+G.call(Qe,", ")+" }"}if(typeof e=="object"&&a){if(Ps&&typeof e[Ps]=="function"&&Fn)return Fn(e,{depth:m-n});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(id(e)){var Fr=[];return vs&&vs.call(e,function(Te,Or){Fr.push(x(Or,e,!0)+" => "+x(Te,e))}),Os("Map",ut.call(e),Fr,y)}if(ud(e)){var so=[];return ws&&ws.call(e,function(Te){so.push(x(Te,e))}),Os("Set",ft.call(e),so,y)}if(ad(e))return In("WeakMap");if(fd(e))return In("WeakSet");if(sd(e))return In("WeakRef");if(ed(e))return dr(x(Number(e)));if(td(e))return dr(x(Rn.call(e)));if(rd(e))return dr(Wy.call(e));if(Xy(e))return dr(x(String(e)));if(typeof window!="undefined"&&e===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&e===globalThis||typeof globalThis!="undefined"&&e===globalThis)return"{ [object globalThis] }";if(!Zy(e)&&!Fs(e)){var Pt=st(e,x),uo=Ts?Ts(e)===Object.prototype:e instanceof Object||e.constructor===Object,Ft=e instanceof Object?"":"null prototype",fo=!uo&&L&&Object(e)===e&&L in e?Un.call(ae(e),8,-1):Ft?"Object":"",fp=uo||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Ot=fp+(fo||Ft?"["+G.call(Ss.call([],fo||[],Ft||[]),": ")+"] ":"");return Pt.length===0?Ot+"{}":y?Ot+"{"+Nn(Pt,y)+"}":Ot+"{ "+G.call(Pt,", ")+" }"}return String(e)};function Us(t,e,r){var n=r.quoteStyle||e,o=Bs[n];return o+t+o}function Ky(t){return ie.call(String(t),/"/g,""")}function On(t){return ae(t)==="[object Array]"&&(!L||!(typeof t=="object"&&L in t))}function Zy(t){return ae(t)==="[object Date]"&&(!L||!(typeof t=="object"&&L in t))}function Fs(t){return ae(t)==="[object RegExp]"&&(!L||!(typeof t=="object"&&L in t))}function Qy(t){return ae(t)==="[object Error]"&&(!L||!(typeof t=="object"&&L in t))}function Xy(t){return ae(t)==="[object String]"&&(!L||!(typeof t=="object"&&L in t))}function ed(t){return ae(t)==="[object Number]"&&(!L||!(typeof t=="object"&&L in t))}function rd(t){return ae(t)==="[object Boolean]"&&(!L||!(typeof t=="object"&&L in t))}function Cs(t){if(Me)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Pn)return!1;try{return Pn.call(t),!0}catch(e){}return!1}function td(t){if(!t||typeof t!="object"||!Rn)return!1;try{return Rn.call(t),!0}catch(e){}return!1}var nd=Object.prototype.hasOwnProperty||function(t){return t in this};function K(t,e){return nd.call(t,e)}function ae(t){return Gy.call(t)}function od(t){if(t.name)return t.name;var e=zy.call(Vy.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function ks(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function id(t){if(!ut||!t||typeof t!="object")return!1;try{ut.call(t);try{ft.call(t)}catch(e){return!0}return t instanceof Map}catch(e){}return!1}function ad(t){if(!mr||!t||typeof t!="object")return!1;try{mr.call(t,mr);try{hr.call(t,hr)}catch(e){return!0}return t instanceof WeakMap}catch(e){}return!1}function sd(t){if(!bs||!t||typeof t!="object")return!1;try{return bs.call(t),!0}catch(e){}return!1}function ud(t){if(!ft||!t||typeof t!="object")return!1;try{ft.call(t);try{ut.call(t)}catch(e){return!0}return t instanceof Set}catch(e){}return!1}function fd(t){if(!hr||!t||typeof t!="object")return!1;try{hr.call(t,hr);try{mr.call(t,mr)}catch(e){return!0}return t instanceof WeakSet}catch(e){}return!1}function pd(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function qs(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return qs(Un.call(t,0,e.maxStringLength),e)+n}var o=Jy[e.quoteStyle||"single"];o.lastIndex=0;var i=ie.call(ie.call(t,o,"\\$1"),/[\x00-\x1f]/g,ld);return Us(i,"single",e)}function ld(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+Yy.call(e.toString(16))}function dr(t){return"Object("+t+")"}function In(t){return t+" { ? }"}function Os(t,e,r,n){var o=n?Nn(r,n):G.call(r,", ");return t+" ("+e+") {"+o+"}"}function cd(t){for(var e=0;e<t.length;e++)if(ks(t[e],`
|
|
11
|
+
`)>=0)return!1;return!0}function yd(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=G.call(Array(t.indent+1)," ");else return null;return{base:r,prev:G.call(Array(e+1),r)}}function Nn(t,e){if(t.length===0)return"";var r=`
|
|
12
|
+
`+e.prev+e.base;return r+G.call(t,","+r)+`
|
|
13
|
+
`+e.prev}function st(t,e){var r=On(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=K(t,o)?e(t[o],t):""}var i=typeof Tn=="function"?Tn(t):[],a;if(Me){a={};for(var p=0;p<i.length;p++)a["$"+i[p]]=i[p]}for(var c in t)K(t,c)&&(r&&String(Number(c))===c&&c<t.length||Me&&a["$"+c]instanceof Symbol||(Ns.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof Tn=="function")for(var d=0;d<i.length;d++)Ls.call(t,i[d])&&n.push("["+e(i[d])+"]: "+e(t[i[d]],t));return n}});var pt=h((bw,_s)=>{"use strict";s();u();_s.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var Ds=h((Ew,Ms)=>{"use strict";s();u();var dd=P(),md=gr(),hd=pt();Ms.exports=function(e,r){if(!hd(r))throw new dd("Assertion failed: IsPropertyKey(P) is not true, got "+md(r));return e[r]}});var Vs=h((Rw,Gs)=>{"use strict";s();u();var Ws=Function.prototype.toString,De=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,kn,lt;if(typeof De=="function"&&typeof Object.defineProperty=="function")try{kn=Object.defineProperty({},"length",{get:function(){throw lt}}),lt={},De(function(){throw 42},null,kn)}catch(t){t!==lt&&(De=null)}else De=null;var gd=/^\s*class\b/,qn=function(e){try{var r=Ws.call(e);return gd.test(r)}catch(n){return!1}},Cn=function(e){try{return qn(e)?!1:(Ws.call(e),!0)}catch(r){return!1}},ct=Object.prototype.toString,xd="[object Object]",vd="[object Function]",wd="[object GeneratorFunction]",bd="[object HTMLAllCollection]",Ad="[object HTML document.all class]",Sd="[object HTMLCollection]",Ed=typeof Symbol=="function"&&!!Symbol.toStringTag,Td=!(0 in[,]),$n=function(){return!1};typeof document=="object"&&(js=document.all,ct.call(js)===ct.call(document.all)&&($n=function(e){if((Td||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=ct.call(e);return(r===bd||r===Ad||r===Sd||r===xd)&&e("")==null}catch(n){}return!1}));var js;Gs.exports=De?function(e){if($n(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{De(e,null,kn)}catch(r){if(r!==lt)return!1}return!qn(e)&&Cn(e)}:function(e){if($n(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Ed)return Cn(e);if(qn(e))return!1;var r=ct.call(e);return r!==vd&&r!==wd&&!/^\[object HTML/.test(r)?!1:Cn(e)}});var _n=h((Ow,zs)=>{"use strict";s();u();zs.exports=Vs()});var Ks=h((Bw,Js)=>{"use strict";s();u();var Ys=P(),Id=Ds(),Rd=_n(),Pd=pt(),Hs=gr();Js.exports=function(e,r){if(!Pd(r))throw new Ys("Assertion failed: IsPropertyKey(P) is not true");var n=Id(e,r);if(n!=null){if(!Rd(n))throw new Ys(Hs(r)+" is not a function: "+Hs(n));return n}}});var Qs=h((kw,Zs)=>{"use strict";s();u();var Fd=Jt();Zs.exports=function(){return Fd()&&!!Symbol.toStringTag}});var Wn=h((_w,tu)=>{"use strict";s();u();var Mn=q(),Xs=Qs()(),eu,ru,Dn,jn;Xs&&(eu=Mn("Object.prototype.hasOwnProperty"),ru=Mn("RegExp.prototype.exec"),Dn={},yt=function(){throw Dn},jn={toString:yt,valueOf:yt},typeof Symbol.toPrimitive=="symbol"&&(jn[Symbol.toPrimitive]=yt));var yt,Od=Mn("Object.prototype.toString"),Nd=Object.getOwnPropertyDescriptor,Ld="[object RegExp]";tu.exports=Xs?function(e){if(!e||typeof e!="object")return!1;var r=Nd(e,"lastIndex"),n=r&&eu(r,"value");if(!n)return!1;try{ru(e,jn)}catch(o){return o===Dn}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Od(e)===Ld}});var Gn=h((jw,nu)=>{"use strict";s();u();var Bd=q(),Ud=Wn(),Cd=Bd("RegExp.prototype.exec"),kd=P();nu.exports=function(e){if(!Ud(e))throw new kd("`regex` must be a RegExp");return function(n){return Cd(e,n)!==null}}});var iu=h((Vw,ou)=>{"use strict";s();u();ou.exports=function(e,r){for(var n=0;n<e.length;n+=1)if(!r(e[n],n,e))return!1;return!0}});var su=h((Hw,au)=>{"use strict";s();u();au.exports=function(e){if(e===null)return"Null";if(typeof e=="undefined")return"Undefined";if(typeof e=="function"||typeof e=="object")return"Object";if(typeof e=="number")return"Number";if(typeof e=="boolean")return"Boolean";if(typeof e=="string")return"String"}});var Vn=h((Zw,uu)=>{"use strict";s();u();var qd=su();uu.exports=function(e){return typeof e=="symbol"?"Symbol":typeof e=="bigint"?"BigInt":qd(e)}});var lu=h((eb,pu)=>{"use strict";s();u();var fu=P(),$d=gr(),_d=pt(),Md=Vn();pu.exports=function(e,r){if(Md(e)!=="Object")throw new fu("Assertion failed: Type(O) is not Object");if(!_d(r))throw new fu("Assertion failed: IsPropertyKey(P) is not true, got "+$d(r));return e[r]}});var yu=h((nb,cu)=>{"use strict";s();u();var Dd=D();cu.exports=Dd("%Math.min%")});var zn=h((ab,du)=>{"use strict";s();u();du.exports=Number.isNaN||function(e){return e!==e}});var hu=h((fb,mu)=>{"use strict";s();u();var jd=zn();mu.exports=function(t){return(typeof t=="number"||typeof t=="bigint")&&!jd(t)&&t!==1/0&&t!==-1/0}});var dt=h((cb,xu)=>{"use strict";s();u();var gu=D(),Wd=gu("%Math.abs%"),Gd=gu("%Math.floor%"),Vd=zn(),zd=hu();xu.exports=function(e){if(typeof e!="number"||Vd(e)||!zd(e))return!1;var r=Wd(e);return Gd(r)===r}});var Hn=h((mb,vu)=>{"use strict";s();u();var Yd=q(),Yn=P(),Hd=dt(),Jd=Yd("String.prototype.slice");vu.exports=function(e,r,n){if(typeof e!="string")throw new Yn("Assertion failed: `string` must be a String");if(typeof r!="string")throw new Yn("Assertion failed: `searchValue` must be a String");if(!Hd(n)||n<0)throw new Yn("Assertion failed: `fromIndex` must be a non-negative integer");var o=e.length;if(r===""&&n<=o)return n;for(var i=r.length,a=n;a<=o-i;a+=1){var p=Jd(e,a,a+i);if(p===r)return a}return-1}});var mt=h((xb,wu)=>{"use strict";s();u();var Kd=P();wu.exports=function(e){if(e==null)throw new Kd(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var ht=h((bb,bu)=>{"use strict";s();u();var Zd=D(),Qd=Zd("%String%"),Xd=P();bu.exports=function(e){if(typeof e=="symbol")throw new Xd("Cannot convert a Symbol value to a string");return Qd(e)}});var Jn=h((Eb,Eu)=>{"use strict";s();u();var em=mt(),rm=ht(),tm=q(),Au=tm("String.prototype.replace"),Su=/^\s$/.test("\u180E"),nm=Su?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,om=Su?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;Eu.exports=function(){var e=rm(em(this));return Au(Au(e,nm,""),om,"")}});var Kn=h((Rb,Iu)=>{"use strict";s();u();var im=Jn(),Tu="\u200B",je="\u180E";Iu.exports=function(){return String.prototype.trim&&Tu.trim()===Tu&&je.trim()===je&&("_"+je).trim()==="_"+je&&(je+"_").trim()===je+"_"?String.prototype.trim:im}});var Pu=h((Ob,Ru)=>{"use strict";s();u();var am=sr(),sm=Kn();Ru.exports=function(){var e=sm();return am(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var Lu=h((Bb,Nu)=>{"use strict";s();u();var um=Zr(),fm=sr(),pm=mt(),lm=Jn(),Fu=Kn(),cm=Pu(),ym=um(Fu()),Ou=function(e){return pm(e),ym(e)};fm(Ou,{getPolyfill:Fu,implementation:lm,shim:cm});Nu.exports=Ou});var ku=h((kb,Cu)=>{"use strict";s();u();var Qn=D(),Zn=Qn("%Number%"),dm=Qn("%RegExp%"),mm=P(),Bu=Qn("%parseInt%"),hm=q(),gt=Gn(),Uu=hm("String.prototype.slice"),gm=gt(/^0b[01]+$/i),xm=gt(/^0o[0-7]+$/i),vm=gt(/^[-+]0x[0-9a-f]+$/i),wm=["\x85","\u200B","\uFFFE"].join(""),bm=new dm("["+wm+"]","g"),Am=gt(bm),Sm=Lu();Cu.exports=function t(e){if(typeof e!="string")throw new mm("Assertion failed: `argument` is not a String");if(gm(e))return Zn(Bu(Uu(e,2),2));if(xm(e))return Zn(Bu(Uu(e,2),8));if(Am(e)||vm(e))return NaN;var r=Sm(e);return r!==e?t(r):Zn(e)}});var _u=h((_b,$u)=>{"use strict";s();u();var Em=P(),qu=dt(),Tm=q(),Im=Tm("String.prototype.slice");$u.exports=function(e,r,n){if(typeof e!="string"||!qu(r)||arguments.length>2&&!qu(n))throw new Em("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Im(e,r,arguments.length>2?n:e.length)}});var Du=h((jb,Mu)=>{"use strict";s();u();Mu.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var Wu=h((Vb,ju)=>{"use strict";s();u();var Rm=q()("String.prototype.slice");ju.exports=function(e,r){return e===r?!0:e.length>r.length?!1:Rm(r,0,e.length)===e}});var Hu=h((Hb,Yu)=>{"use strict";s();u();var Z=P(),zu=Gn(),Pm=iu(),Xn=gr(),Fm=lu(),Om=ln(),Nm=yu(),Lm=Hn(),Gu=ku(),Q=_u(),Bm=ht(),Vu=Vn(),Um=dt(),Cm=Du(),xr=Wu(),km=zu(/^\$[0-9]/),qm=zu(/^\$[0-9][0-9]/);Yu.exports=function(e,r,n,o,i,a){if(typeof e!="string")throw new Z("Assertion failed: `matched` must be a String");if(typeof r!="string")throw new Z("Assertion failed: `str` must be a String");if(!Um(n)||n<0)throw new Z("Assertion failed: `position` must be a nonnegative integer, got "+Xn(n));if(!Om(o)||!Pm(o,Cm))throw new Z("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+Xn(o));if(typeof i!="undefined"&&Vu(i)!=="Object")throw new Z("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof a!="string")throw new Z("Assertion failed: `replacementTemplate` must be a String");var p=r.length;if(n>p)throw new Z("Assertion failed: position > stringLength, got "+Xn(n));for(var c=a,d="";c!=="";){var m,y,x;if(xr("$$",c))m="$$",y="$";else if(xr("$`",c))m="$`",y=Q(r,0,n);else if(xr("$&",c))m="$&",y=e;else if(xr("$'",c)){m="$'";var w=e.length,E=n+w;y=Q(r,Nm(E,p))}else if(km(c)){var I=qm(c)?2:1,B=Q(c,1,1+I),C=Gu(B);if(C<0||C>99)throw new Z("Assertion failed: `index` must be >= 0 and <= 99");var z=o.length;C>z&&I===2&&(I=1,B=Q(B,0,1),C=Gu(B)),m=Q(c,0,1+I),1<=C&&C<=z?(x=o[C-1],typeof x=="undefined"?y="":y=x):y=m}else if(xr("$<",c)){var fe=Lm(c,">",0);if(fe===-1||typeof i=="undefined")m="$<",y=m;else{m=Q(c,0,fe+1);var Qe=Q(c,2,fe);if(Vu(i)!=="Object")throw new Z("Assertion failed: Type(namedCaptures) is not Object");x=Fm(i,Qe),typeof x=="undefined"?y="":y=Bm(x)}}else m=Q(c,0,1),y=m;var Fr=m.length;c=Q(c,Fr),d+=y}return d}});var ro=h((Zb,Qu)=>{"use strict";s();u();var Ju=Xa(),$m=Ks(),_m=Hu(),Mm=_n(),Dm=mt(),xt=ht(),Ku=Hn(),jm=D(),vt=q(),Wm=Wt()(),Gm=Wn(),Vm=jm("%Math.max%"),Zu=P(),zm=vt("Array.prototype.push"),eo=vt("String.prototype.slice"),Ym=vt("String.prototype.indexOf"),Hm=vt("String.prototype.replace");Qu.exports=function(e,r){var n=Dm(this),o=Gm(e);if(o&&Ym(eo(e,e.source.length+2),"g")===-1)throw new Zu("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Wm&&Symbol.replace){if(e!=null){var i=$m(e,Symbol.replace);if(typeof i!="undefined")return Ju(i,e,[n,r])}}else if(o)return Hm(n,e,r);var a=xt(n),p=xt(e),c=Mm(r);c||(r=xt(r));for(var d=p.length,m=Vm(1,d),y=[],x=Ku(a,p,0);x!==-1;)zm(y,x),x=Ku(a,p,x+m);for(var w=0,E="",I=0;I<y.length;I+=1){var B;if(c)B=xt(Ju(r,void 0,[p,y[I],a]));else{if(typeof r!="string")throw new Zu("Assertion failed: `replaceValue` should be a string at this point");var C=[];B=_m(p,a,y[I],C,void 0,r)}var z=eo(a,w,y[I]);E+=z+B,w=y[I]+d}return w<a.length&&(E+=eo(a,w)),E}});var to=h((eA,Xu)=>{"use strict";s();u();var Jm=ro();Xu.exports=function(){return String.prototype.replaceAll||Jm}});var rf=h((nA,ef)=>{"use strict";s();u();var Km=sr(),Zm=to();ef.exports=function(){var e=Zm();return Km(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var af=h((aA,of)=>{"use strict";s();u();var Qm=Zr(),Xm=sr(),tf=ro(),eh=to(),rh=rf(),nf=Qm(tf);Xm(nf,{getPolyfill:eh,implementation:tf,shim:rh});of.exports=nf});var nx={};Bt(nx,{DynamicSnippetsGenerator:()=>Rt});module.exports=xo(nx);s();u();var HR=gp(af(),1);s();u();s();u();s();u();function R(t){throw new Error("Unexpected value: "+JSON.stringify(t))}s();u();function vr(t){return Object.keys(t)}s();u();s();u();s();u();s();u();s();u();s();u();var th=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,sf=th;var nh=typeof self=="object"&&self&&self.Object===Object&&self,oh=sf||nh||Function("return this")(),uf=oh;var ih=uf.Symbol,X=ih;s();u();var ff=Object.prototype,ah=ff.hasOwnProperty,sh=ff.toString,wr=X?X.toStringTag:void 0;function uh(t){var e=ah.call(t,wr),r=t[wr];try{t[wr]=void 0;var n=!0}catch(i){}var o=sh.call(t);return n&&(e?t[wr]=r:delete t[wr]),o}var pf=uh;s();u();var fh=Object.prototype,ph=fh.toString;function lh(t){return ph.call(t)}var lf=lh;var ch="[object Null]",yh="[object Undefined]",cf=X?X.toStringTag:void 0;function dh(t){return t==null?t===void 0?yh:ch:cf&&cf in Object(t)?pf(t):lf(t)}var yf=dh;s();u();function mh(t){return t!=null&&typeof t=="object"}var df=mh;var hh="[object Symbol]";function gh(t){return typeof t=="symbol"||df(t)&&yf(t)==hh}var mf=gh;s();u();s();u();function xh(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var hf=xh;s();u();var vh=Array.isArray,gf=vh;var wh=1/0,xf=X?X.prototype:void 0,vf=xf?xf.toString:void 0;function wf(t){if(typeof t=="string")return t;if(gf(t))return hf(t,wf)+"";if(mf(t))return vf?vf.call(t):"";var e=t+"";return e=="0"&&1/t==-wh?"-0":e}var bf=wf;s();u();function bh(t){return t==null?"":bf(t)}var se=bh;s();u();s();u();s();u();s();u();s();u();s();u();function Ah(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}var Af=Ah;function Sh(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:Af(t,e,r)}var Sf=Sh;s();u();var Eh="\\ud800-\\udfff",Th="\\u0300-\\u036f",Ih="\\ufe20-\\ufe2f",Rh="\\u20d0-\\u20ff",Ph=Th+Ih+Rh,Fh="\\ufe0e\\ufe0f",Oh="\\u200d",Nh=RegExp("["+Oh+Eh+Ph+Fh+"]");function Lh(t){return Nh.test(t)}var wt=Lh;s();u();s();u();function Bh(t){return t.split("")}var Ef=Bh;s();u();var Tf="\\ud800-\\udfff",Uh="\\u0300-\\u036f",Ch="\\ufe20-\\ufe2f",kh="\\u20d0-\\u20ff",qh=Uh+Ch+kh,$h="\\ufe0e\\ufe0f",_h="["+Tf+"]",no="["+qh+"]",oo="\\ud83c[\\udffb-\\udfff]",Mh="(?:"+no+"|"+oo+")",If="[^"+Tf+"]",Rf="(?:\\ud83c[\\udde6-\\uddff]){2}",Pf="[\\ud800-\\udbff][\\udc00-\\udfff]",Dh="\\u200d",Ff=Mh+"?",Of="["+$h+"]?",jh="(?:"+Dh+"(?:"+[If,Rf,Pf].join("|")+")"+Of+Ff+")*",Wh=Of+Ff+jh,Gh="(?:"+[If+no+"?",no,Rf,Pf,_h].join("|")+")",Vh=RegExp(oo+"(?="+oo+")|"+Gh+Wh,"g");function zh(t){return t.match(Vh)||[]}var Nf=zh;function Yh(t){return wt(t)?Nf(t):Ef(t)}var Lf=Yh;function Hh(t){return function(e){e=se(e);var r=wt(e)?Lf(e):void 0,n=r?r[0]:e.charAt(0),o=r?Sf(r,1).join(""):e.slice(1);return n[t]()+o}}var Bf=Hh;var Jh=Bf("toUpperCase"),We=Jh;function Kh(t){return We(se(t).toLowerCase())}var Uf=Kh;s();u();s();u();function Zh(t,e,r,n){var o=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}var Cf=Zh;s();u();s();u();s();u();function Qh(t){return function(e){return t==null?void 0:t[e]}}var kf=Qh;var Xh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},eg=kf(Xh),qf=eg;var rg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tg="\\u0300-\\u036f",ng="\\ufe20-\\ufe2f",og="\\u20d0-\\u20ff",ig=tg+ng+og,ag="["+ig+"]",sg=RegExp(ag,"g");function ug(t){return t=se(t),t&&t.replace(rg,qf).replace(sg,"")}var $f=ug;s();u();s();u();var fg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function pg(t){return t.match(fg)||[]}var _f=pg;s();u();var lg=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function cg(t){return lg.test(t)}var Mf=cg;s();u();var Vf="\\ud800-\\udfff",yg="\\u0300-\\u036f",dg="\\ufe20-\\ufe2f",mg="\\u20d0-\\u20ff",hg=yg+dg+mg,zf="\\u2700-\\u27bf",Yf="a-z\\xdf-\\xf6\\xf8-\\xff",gg="\\xac\\xb1\\xd7\\xf7",xg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vg="\\u2000-\\u206f",wg=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Hf="A-Z\\xc0-\\xd6\\xd8-\\xde",bg="\\ufe0e\\ufe0f",Jf=gg+xg+vg+wg,Kf="['\u2019]",Df="["+Jf+"]",Ag="["+hg+"]",Zf="\\d+",Sg="["+zf+"]",Qf="["+Yf+"]",Xf="[^"+Vf+Jf+Zf+zf+Yf+Hf+"]",Eg="\\ud83c[\\udffb-\\udfff]",Tg="(?:"+Ag+"|"+Eg+")",Ig="[^"+Vf+"]",ep="(?:\\ud83c[\\udde6-\\uddff]){2}",rp="[\\ud800-\\udbff][\\udc00-\\udfff]",Ge="["+Hf+"]",Rg="\\u200d",jf="(?:"+Qf+"|"+Xf+")",Pg="(?:"+Ge+"|"+Xf+")",Wf="(?:"+Kf+"(?:d|ll|m|re|s|t|ve))?",Gf="(?:"+Kf+"(?:D|LL|M|RE|S|T|VE))?",tp=Tg+"?",np="["+bg+"]?",Fg="(?:"+Rg+"(?:"+[Ig,ep,rp].join("|")+")"+np+tp+")*",Og="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ng="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Lg=np+tp+Fg,Bg="(?:"+[Sg,ep,rp].join("|")+")"+Lg,Ug=RegExp([Ge+"?"+Qf+"+"+Wf+"(?="+[Df,Ge,"$"].join("|")+")",Pg+"+"+Gf+"(?="+[Df,Ge+jf,"$"].join("|")+")",Ge+"?"+jf+"+"+Wf,Ge+"+"+Gf,Ng,Og,Zf,Bg].join("|"),"g");function Cg(t){return t.match(Ug)||[]}var op=Cg;function kg(t,e,r){return t=se(t),e=r?void 0:e,e===void 0?Mf(t)?op(t):_f(t):t.match(e)||[]}var ip=kg;var qg="['\u2019]",$g=RegExp(qg,"g");function _g(t){return function(e){return Cf(ip($f(e).replace($g,"")),t,"")}}var ap=_g;var Mg=ap(function(t,e,r){return e=e.toLowerCase(),t+(r?Uf(e):e)}),bt=Mg;s();u();s();u();var be=class{};s();u();s();u();var V=class extends be{constructor(r){super();v(this,"value");this.value=r}write(r){typeof this.value=="string"?r.write(this.value):this.value(r)}};var Dg=4,br=class{constructor(){v(this,"buffer","");v(this,"indentLevel",0);v(this,"hasWrittenAnything",!1);v(this,"lastCharacterIsNewline",!1)}write(e){let r=e.length>0&&e.endsWith(`
|
|
14
14
|
`),n=r?e.substring(0,e.length-1):e,o=this.getIndentString(),i=n.replaceAll(`
|
|
15
15
|
`,`
|
|
16
16
|
${o}`);this.isAtStartOfLine()&&(i=o+i),r&&(i+=`
|
|
17
|
-
`),this.writeInternal(i)}writeNoIndent(e){let r=this.indentLevel;this.indentLevel=0,this.write(e),this.indentLevel=r}writeNode(e){e.write(this)}writeNodeStatement(e){e.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(e){new
|
|
17
|
+
`),this.writeInternal(i)}writeNoIndent(e){let r=this.indentLevel;this.indentLevel=0,this.write(e),this.indentLevel=r}writeNode(e){e.write(this)}writeNodeOrString(e){if(typeof e=="string"){this.write(e);return}this.writeNode(e)}writeNodeStatement(e){e.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(e){new V(e).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(e,r){new V(e).write(this),this.write(" ("),this.writeNode(r),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}contiguousControlFlow(e,r){this.dedent(),this.write("} "),new V(e).write(this),this.write(" ("),this.writeNode(r),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}alternativeControlFlow(e){this.dedent(),this.write("} "),new V(e).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}openBlock(e,r="{",n,o="}"){let i=e.filter(a=>a!==void 0).join(" ");i?this.write(`${i} ${r!=null?r:""}`):this.write(r!=null?r:"");try{this.indent(),n(),this.dedent()}finally{this.write(o!=null?o:"")}}writeLine(e=""){this.write(e),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
|
|
18
18
|
`)}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
|
|
19
19
|
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:e,delimiter:r,writeFunction:n}){if(e.length>0){let o=e[0];o!=null&&n(o);for(let i=1;i<e.length;i++){this.write(r);let a=e[i];a!=null&&n(a)}}}toString(){return this.buffer}writeInternal(e){return e.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=e.endsWith(`
|
|
20
|
-
`)),this.buffer+=e}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*$y)}};s();u();var st=class{},pr=class extends st{async format(e){return e}formatSync(e){return e}};s();u();s();u();var cr=class{constructor(e){g(this,"context");this.context=e}};s();u();s();u();s();u();var dr=class{constructor(){g(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH)\s(\/[a-zA-Z0-9\/{}_-]*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let n=e.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};s();u();var b={Critical:"CRITICAL",Warning:"WARNING"},mr=class t{constructor(){g(this,"errors");g(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(_n(qn({},e),{path:[...this.path]}))}scope(e){this.path.push(e)}unscope(){this.path.pop()}getBySeverity(e){return this.errors.filter(r=>r.severity===e)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let e=new t;return e.errors=[...this.errors],e.path=[...this.path],e}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(e=>({severity:e.severity,path:e.path!=null?this.pathToStringArray(e.path):void 0,message:e.message}))}pathToStringArray(e){let r=[];for(let n of e){if(typeof n=="string"){r.push(n);continue}r[r.length-1]+=`[${n.index}]`}return r}};var yr=class{constructor({ir:e,config:r}){g(this,"config");g(this,"errors");g(this,"_ir");g(this,"httpEndpointReferenceParser");this._ir=e,this.config=r,this.errors=new mr,this.httpEndpointReferenceParser=new dr}associateQueryParametersByWireValue({parameters:e,values:r}){let n=[];for(let[o,i]of Object.entries(r)){this.errors.scope(o);try{let a=e.find(p=>p.name.wireValue===o);if(a==null)throw this.newParameterNotRecognizedError(o);let l=this.isListTypeReference(a.typeReference)&&!Array.isArray(i)?[i]:i;n.push({name:a.name,typeReference:a.typeReference,value:l})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:r,ignoreMissingParameters:n}){let o=[];for(let[i,a]of Object.entries(r)){this.errors.scope(i);try{let l=e.find(p=>p.name.wireValue===i);if(l==null){if(n)continue;this.errors.add({severity:b.Critical,message:this.newParameterNotRecognizedError(i).message});continue}o.push({name:l.name,typeReference:l.typeReference,value:a})}finally{this.errors.unscope()}}return o}getSingleFileValue({property:e,record:r}){let n=r[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:b.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:e,record:r}){let n=r[e.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:b.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let o=[];for(let i of n){if(typeof i!="string"){this.errors.add({severity:b.Critical,message:`Expected file array value to be an array of strings, got ${typeof i}`});return}o.push(i)}return o}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:b.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(e)?"array":typeof e}`});return}return e==null?{}:e}resolveNamedType({typeId:e}){let r=this._ir.types[e];if(r==null){this.errors.add({severity:b.Critical,message:`Type identified by "${e}" could not be found`});return}return r}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r}){let n=this.getRecord(r);if(n==null)return;let o=e.discriminant.wireValue,i=n[o];if(i==null){this.errors.add({severity:b.Critical,message:this.newParameterNotRecognizedError(o).message});return}if(typeof i!="string"){this.errors.add({severity:b.Critical,message:`Expected discriminant value to be a string but got: ${typeof i}`});return}let a=e.types[i];if(a==null){this.errors.add({severity:b.Critical,message:`No type found for discriminant value "${i}"`});return}let m=n,{[o]:l}=m,p=Dn(m,[Mn(o)]);return{singleDiscriminatedUnionType:a,discriminantValue:a.discriminantValue,value:p}}resolveEndpointOrThrow(e){let r=this.httpEndpointReferenceParser.tryParse(e);if(r==null)throw new Error(`Failed to parse endpoint reference "${e}"`);return this.resolveEndpointLocationOrThrow(r)}resolveEndpointLocationOrThrow(e){let r=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:e})&&r.push(n);if(r.length===0)throw new Error(`Failed to find endpoint identified by "${e.method} ${e.path}"`);return r}needsRequestParameter({request:e,inlinePathParameters:r,inlineFileProperties:n}){var o;return this.includePathParametersInWrappedRequest({request:e,inlinePathParameters:r})||e.queryParameters!=null&&e.queryParameters.length>0||e.headers!=null&&e.headers.length>0?!0:e.body!=null?this.includeRequestBodyInWrappedRequest({body:e.body,inlineFileProperties:n}):!((o=e.metadata)!=null&&o.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:r}){var n,o;return r&&((o=(n=e.metadata)==null?void 0:n.includePathParameters)!=null?o:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:E(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":{let n=r.environments.find(o=>o.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=r.environments.find(o=>o.id===e);return n==null?void 0:n.name}default:E(r)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:b.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":return this.errors.add({severity:b.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=r.environments[0];if(n==null)return this.errors.add({severity:b.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let o=new Set(ur(n.urls));for(let i of ur(e))o.has(i)&&o.delete(i);return o.size>0?(this.errors.add({severity:b.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${ur(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:b.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:b.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:b.Critical,message:this.newTypeMismatchError({expected:"string",value:e}).message});return}return e}isOptional(e){switch(e.type){case"nullable":return this.isOptional(e.value);case"optional":return!0;case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:r}){return new Error(`Expected auth type ${e.type}, got ${r.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:r}){return new Error(`Expected ${e}, got ${typeof r}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:r}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r});default:E(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r}){return this.fileUploadHasBodyProperties({fileUpload:e})||r&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:E(r)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:E(r)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:r}){return e.location.method===r.method&&e.location.path===r.path}};s();u();var $e=class{constructor(){g(this,"reporter");g(this,"snippet");g(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:r}){(this.reporter==null||this.reporter.size()>e.errors.size())&&(this.reporter=e.errors.clone(),this.snippet=r)}getResponseOrThrow({endpoint:e}){var r;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(r=this.err)!=null?r:new Error(`Failed to generate snippet for endpoint "${e.method} ${e.path}"`)}};s();u();var j={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};s();u();s();u();var y={};gt(y,{AstNode:()=>S,ClassInstantiation:()=>Ve,CodeBlock:()=>qe,Comment:()=>ae,Function:()=>De,FunctionInvocation:()=>je,MethodInvocation:()=>We,Parameter:()=>Me,Reference:()=>we,Type:()=>ve,TypeLiteral:()=>Z,Types:()=>ve,Variable:()=>_e,Writer:()=>xe,codeblock:()=>jy,function_:()=>Wy,instantiateClass:()=>Vy,invokeFunction:()=>Gy,invokeMethod:()=>zy,parameter:()=>Yy,reference:()=>Hy,variable:()=>Jy});s();u();s();u();s();u();s();u();s();u();s();u();var xe=class extends lr{constructor({customConfig:r,formatter:n}){super();g(this,"customConfig");g(this,"formatter");g(this,"imports",{});g(this,"defaultImports",{});g(this,"starImportAliases",{});g(this,"starImportAliasesInverse",{});this.customConfig=r,this.formatter=n!=null?n:new pr}addImport(r){var n,o,i;if(r.importFrom!=null){switch(r.importFrom.type){case"default":{this.validateDefault(r);break}case"named":{this.validateNamed(r);break}case"star":{this.validateStar(r);break}}let a=(i=(n=this.imports)[o=r.importFrom.moduleName])!=null?i:n[o]=[];a.map(p=>p.name).includes(r.name)||a.push(r)}}validateDefault(r){var o,i,a,l;if(((o=r.importFrom)==null?void 0:o.type)!=="default")return;let n=(l=(i=this.defaultImports)[a=r.importFrom.moduleName])!=null?l:i[a]=r;if(n.name!==r.name)throw new Error(`Cannot have multiple default imports for module ${r.importFrom.moduleName}: got ${r.name} but already had ${n.name}`)}validateNamed(r){var a,l,p,m,h;if(((a=r.importFrom)==null?void 0:a.type)!=="named")return;let o=((l=this.imports[r.importFrom.moduleName])!=null?l:[]).filter(d=>{var x;return((x=d.importFrom)==null?void 0:x.type)==="star"});if(o.length>0)throw new Error(`Cannot add named import ${r.name} because non-named imports ${o.map(d=>d.name)} already exist`);let i=[];for(let d of Object.values(this.imports))for(let x of d)((p=x.importFrom)==null?void 0:p.type)==="named"&&x.importFrom.moduleName!==r.importFrom.moduleName&&x.name===r.name&&i.push(x);if(i.length>0)throw new Error(`Cannot add named import from module ${r.importFrom.moduleName} because it is already imported from ${(h=(m=i[0])==null?void 0:m.importFrom)==null?void 0:h.moduleName}`)}validateStar(r){var i,a,l,p,m,h,d;if(((i=r.importFrom)==null?void 0:i.type)!=="star")return;let n=(p=(a=this.starImportAliases)[l=r.importFrom.moduleName])!=null?p:a[l]=r.importFrom.starImportAlias;if(n!==r.importFrom.starImportAlias)throw new Error(`Cannot have more than one alias for non-named imports from a module: got ${r.importFrom.starImportAlias} but already have ${n}.`);if(((d=(m=this.starImportAliasesInverse)[h=r.importFrom.starImportAlias])!=null?d:m[h]=r.importFrom.moduleName)!==r.importFrom.moduleName)throw new Error(`Attempted to use alias ${r.importFrom.starImportAlias} for more than one module in the same file`)}};var hr=class extends xe{constructor({customConfig:e,formatter:r}){super({customConfig:e,formatter:r})}async toStringAsync(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.format(e)}catch(r){throw new Error(`Failed to format TypeScript file: ${r}
|
|
20
|
+
`)),this.buffer+=e}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*Dg)}};s();u();var At=class{},Ar=class extends At{async format(e){return e}formatSync(e){return e}};s();u();s();u();s();u();var Sr=class{constructor(){v(this,"reporter");v(this,"snippet");v(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:r}){(this.reporter==null||this.reporter.size()>e.errors.size())&&(this.reporter=e.errors.clone(),this.snippet=r)}getResponseOrThrow({endpoint:e}){var r;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(r=this.err)!=null?r:new Error(`Failed to generate snippet for endpoint "${e.method} ${e.path}"`)}};var Er=class{constructor(e){v(this,"context");this.context=e}async generate(e){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new Sr;for(let o of r){let i=this.context.clone(),a=this.createSnippetGenerator(i);try{let p=await a.generateSnippet({endpoint:o,request:e});if(i.errors.empty())return{snippet:p,errors:void 0};n.update({context:i,snippet:p})}catch(p){n.err==null&&(n.err=p)}}return n.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new Sr;for(let o of r){let i=this.context.clone(),a=this.createSnippetGenerator(i);try{let p=a.generateSnippetSync({endpoint:o,request:e});if(i.errors.empty())return{snippet:p,errors:void 0};n.update({context:i,snippet:p})}catch(p){n.err==null&&(n.err=p)}}return n.getResponseOrThrow({endpoint:e.endpoint})}};s();u();s();u();s();u();var Tr=class{constructor(){v(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH)\s(\/[a-zA-Z0-9\/{}_-]*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let n=e.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};s();u();var S={Critical:"CRITICAL",Warning:"WARNING"},Ir=class t{constructor(){v(this,"errors");v(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(yo(co({},e),{path:[...this.path]}))}scope(e){this.path.push(e)}unscope(){this.path.pop()}getBySeverity(e){return this.errors.filter(r=>r.severity===e)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let e=new t;return e.errors=[...this.errors],e.path=[...this.path],e}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(e=>({severity:e.severity,path:e.path!=null?this.pathToStringArray(e.path):void 0,message:e.message}))}pathToStringArray(e){let r=[];for(let n of e){if(typeof n=="string"){r.push(n);continue}r[r.length-1]+=`[${n.index}]`}return r}};var Rr=class{constructor({ir:e,config:r}){v(this,"config");v(this,"errors");v(this,"_ir");v(this,"httpEndpointReferenceParser");this._ir=e,this.config=r,this.errors=new Ir,this.httpEndpointReferenceParser=new Tr}associateQueryParametersByWireValue({parameters:e,values:r}){let n=[];for(let[o,i]of Object.entries(r)){this.errors.scope(o);try{let a=e.find(c=>c.name.wireValue===o);if(a==null)throw this.newParameterNotRecognizedError(o);let p=this.isListTypeReference(a.typeReference)&&!Array.isArray(i)?[i]:i;n.push({name:a.name,typeReference:a.typeReference,value:p})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:r,ignoreMissingParameters:n}){let o=[];for(let[i,a]of Object.entries(r)){this.errors.scope(i);try{let p=e.find(c=>c.name.wireValue===i);if(p==null){if(n)continue;this.errors.add({severity:S.Critical,message:this.newParameterNotRecognizedError(i).message});continue}o.push({name:p.name,typeReference:p.typeReference,value:a})}finally{this.errors.unscope()}}return o}getSingleFileValue({property:e,record:r}){let n=r[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:S.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:e,record:r}){let n=r[e.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:S.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let o=[];for(let i of n){if(typeof i!="string"){this.errors.add({severity:S.Critical,message:`Expected file array value to be an array of strings, got ${typeof i}`});return}o.push(i)}return o}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:S.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(e)?"array":typeof e}`});return}return e==null?{}:e}resolveNamedType({typeId:e}){let r=this._ir.types[e];if(r==null){this.errors.add({severity:S.Critical,message:`Type identified by "${e}" could not be found`});return}return r}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r}){let n=this.getRecord(r);if(n==null)return;let o=e.discriminant.wireValue,i=n[o];if(i==null){this.errors.add({severity:S.Critical,message:this.newParameterNotRecognizedError(o).message});return}if(typeof i!="string"){this.errors.add({severity:S.Critical,message:`Expected discriminant value to be a string but got: ${typeof i}`});return}let a=e.types[i];if(a==null){this.errors.add({severity:S.Critical,message:`No type found for discriminant value "${i}"`});return}let d=n,{[o]:p}=d,c=ho(d,[mo(o)]);return{singleDiscriminatedUnionType:a,discriminantValue:a.discriminantValue,value:c}}resolveEndpointOrThrow(e){let r=this.httpEndpointReferenceParser.tryParse(e);if(r==null)throw new Error(`Failed to parse endpoint reference "${e}"`);return this.resolveEndpointLocationOrThrow(r)}resolveEndpointLocationOrThrow(e){let r=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:e})&&r.push(n);if(r.length===0)throw new Error(`Failed to find endpoint identified by "${e.method} ${e.path}"`);return r}needsRequestParameter({request:e,inlinePathParameters:r,inlineFileProperties:n}){var o;return this.includePathParametersInWrappedRequest({request:e,inlinePathParameters:r})||e.queryParameters!=null&&e.queryParameters.length>0||e.headers!=null&&e.headers.length>0?!0:e.body!=null?this.includeRequestBodyInWrappedRequest({body:e.body,inlineFileProperties:n}):!((o=e.metadata)!=null&&o.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:r}){var n,o;return r&&((o=(n=e.metadata)==null?void 0:n.includePathParameters)!=null?o:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:R(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":{let n=r.environments.find(o=>o.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=r.environments.find(o=>o.id===e);return n==null?void 0:n.name}default:R(r)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=r.environments[0];if(n==null)return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let o=new Set(vr(n.urls));for(let i of vr(e))o.has(i)&&o.delete(i);return o.size>0?(this.errors.add({severity:S.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${vr(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"string",value:e}).message});return}return e}isOptional(e){switch(e.type){case"nullable":return this.isOptional(e.value);case"optional":return!0;case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:r}){return new Error(`Expected auth type ${e.type}, got ${r.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:r}){return new Error(`Expected ${e}, got ${typeof r}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:r}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r});default:R(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r}){return this.fileUploadHasBodyProperties({fileUpload:e})||r&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:R(r)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:R(r)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:r}){return e.location.method===r.method&&e.location.path===r.path}};s();u();var $={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};s();u();s();u();var g={};Bt(g,{AstNode:()=>T,ClassInstantiation:()=>Ze,CodeBlock:()=>Ve,Comment:()=>ue,Function:()=>He,FunctionInvocation:()=>Je,MethodInvocation:()=>Ke,Parameter:()=>Ye,Reference:()=>Ee,Type:()=>Se,TypeLiteral:()=>ee,Types:()=>Se,Variable:()=>ze,Writer:()=>Ae,codeblock:()=>zg,function_:()=>Yg,instantiateClass:()=>Hg,invokeFunction:()=>Jg,invokeMethod:()=>Kg,parameter:()=>Zg,reference:()=>Qg,variable:()=>Xg});s();u();s();u();s();u();s();u();s();u();s();u();var Ae=class extends br{constructor({customConfig:r,formatter:n}){super();v(this,"customConfig");v(this,"formatter");v(this,"imports",{});v(this,"defaultImports",{});v(this,"starImportAliases",{});v(this,"starImportAliasesInverse",{});this.customConfig=r,this.formatter=n!=null?n:new Ar}addImport(r){var n,o,i;if(r.importFrom!=null){switch(r.importFrom.type){case"default":{this.validateDefault(r);break}case"named":{this.validateNamed(r);break}case"star":{this.validateStar(r);break}}let a=(i=(n=this.imports)[o=r.importFrom.moduleName])!=null?i:n[o]=[];a.map(c=>c.name).includes(r.name)||a.push(r)}}validateDefault(r){var o,i,a,p;if(((o=r.importFrom)==null?void 0:o.type)!=="default")return;let n=(p=(i=this.defaultImports)[a=r.importFrom.moduleName])!=null?p:i[a]=r;if(n.name!==r.name)throw new Error(`Cannot have multiple default imports for module ${r.importFrom.moduleName}: got ${r.name} but already had ${n.name}`)}validateNamed(r){var a,p,c,d,m;if(((a=r.importFrom)==null?void 0:a.type)!=="named")return;let o=((p=this.imports[r.importFrom.moduleName])!=null?p:[]).filter(y=>{var x;return((x=y.importFrom)==null?void 0:x.type)==="star"});if(o.length>0)throw new Error(`Cannot add named import ${r.name} because non-named imports ${o.map(y=>y.name)} already exist`);let i=[];for(let y of Object.values(this.imports))for(let x of y)((c=x.importFrom)==null?void 0:c.type)==="named"&&x.importFrom.moduleName!==r.importFrom.moduleName&&x.name===r.name&&i.push(x);if(i.length>0)throw new Error(`Cannot add named import from module ${r.importFrom.moduleName} because it is already imported from ${(m=(d=i[0])==null?void 0:d.importFrom)==null?void 0:m.moduleName}`)}validateStar(r){var i,a,p,c,d,m,y;if(((i=r.importFrom)==null?void 0:i.type)!=="star")return;let n=(c=(a=this.starImportAliases)[p=r.importFrom.moduleName])!=null?c:a[p]=r.importFrom.starImportAlias;if(n!==r.importFrom.starImportAlias)throw new Error(`Cannot have more than one alias for non-named imports from a module: got ${r.importFrom.starImportAlias} but already have ${n}.`);if(((y=(d=this.starImportAliasesInverse)[m=r.importFrom.starImportAlias])!=null?y:d[m]=r.importFrom.moduleName)!==r.importFrom.moduleName)throw new Error(`Attempted to use alias ${r.importFrom.starImportAlias} for more than one module in the same file`)}};var Pr=class extends Ae{constructor({customConfig:e,formatter:r}){super({customConfig:e,formatter:r})}async toStringAsync(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.format(e)}catch(r){throw new Error(`Failed to format TypeScript file: ${r}
|
|
21
21
|
${e}`)}return e}toString(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(e)}catch(r){throw new Error(`Failed to format TypeScript file: ${r}
|
|
22
22
|
${e}`)}return e}getContent(){let e=this.stringifyImports();return e.length>0?e+`
|
|
23
|
-
`+this.buffer:this.buffer}stringifyImports(){let e="";for(let[r,n]of Object.entries(this.imports)){let o=this.defaultImports[r],i="",a=n.filter(
|
|
24
|
-
`}}return e}};var
|
|
25
|
-
`)?this.writeStringWithBackticks({writer:r,value:this.internalType.value}):r.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}case"tuple":{this.writeIterable({writer:r,iterable:this.internalType});break}case"unknown":{this.writeUnknown({writer:r,value:this.internalType.value});break}case"null":{r.write("null");break}case"nop":break;default:
|
|
23
|
+
`+this.buffer:this.buffer}stringifyImports(){let e="";for(let[r,n]of Object.entries(this.imports)){let o=this.defaultImports[r],i="",a=n.filter(c=>{var d;return((d=c.importFrom)==null?void 0:d.type)==="named"}),p=this.starImportAliases[r];if(a.length>0||o!=null||p!=null){if(e+="import",o!=null&&(e+=` ${o.name}`),a.length>0){for(let d of a.slice(0,-1))i+=`${d.name}, `;let c=a[a.length-1];c!=null&&(i+=`${c.name}`),o!=null&&(e+=","),e+=` { ${i} }`}p!=null&&((o!=null||a.length>0)&&(e+=", "),e+=` * as ${p}`),e+=` from "${r}";
|
|
24
|
+
`}}return e}};var T=class extends be{async toStringAsync({customConfig:e,formatter:r}){let n=new Pr({customConfig:e,formatter:r});return this.write(n),await n.toStringAsync()}toString({customConfig:e,formatter:r}){let n=new Pr({customConfig:e,formatter:r});return this.write(n),n.toString()}};s();u();var Ve=class extends T{constructor(r){super();v(this,"args");this.args=r}write(r){return new V(this.args).write(r)}};s();u();var Se=class extends T{constructor(r){super();v(this,"internalType");this.internalType=r}write(r){switch(this.internalType.type){case"string":r.write("string");break;case"number":r.write("number");break;case"bigint":r.write("bigint");break;case"boolean":r.write("boolean");break;case"array":this.internalType.valueType.write(r),r.write("[]");break;case"map":r.write("Record<"),this.internalType.keyType.write(r),r.write(", "),this.internalType.valueType.write(r),r.write(">");break;case"object":r.write("{"),r.indent();for(let[n,o]of Object.entries(this.internalType.fields))r.write(`${n}: `),o.write(r),r.writeLine(",");r.dedent(),r.write("}");break;case"enum":r.write("enum");break;case"any":r.write("any");break;case"promise":r.write("Promise<"),this.internalType.value.write(r),r.write(">");break;case"unknown":r.write("unknown");break;case"void":r.write("void");break;case"undefined":r.write("undefined");break;case"null":r.write("null");break;case"never":r.write("never");break;case"nop":break;default:R(this.internalType)}}static string(){return new this({type:"string"})}static number(){return new this({type:"number"})}static bigint(){return new this({type:"bigint"})}static boolean(){return new this({type:"boolean"})}static array(r){return new this({type:"array",valueType:r})}static object(r){return new this({type:"object",fields:r})}static enum(r){return new this({type:"enum",values:r})}static any(){return new this({type:"any"})}static promise(r){return r.internalType.type==="promise"?r:new this({type:"promise",value:r})}static unknown(){return new this({type:"unknown"})}static void(){return new this({type:"void"})}static undefined(){return new this({type:"undefined"})}static null(){return new this({type:"null"})}static never(){return new this({type:"never"})}static nop(){return new this({type:"nop"})}};s();u();var ee=class t extends T{constructor(r){super();v(this,"internalType");this.internalType=r}write(r){var i,a;let n=!!((i=r.customConfig)!=null&&i.noSerdeLayer),o=!!((a=r.customConfig)!=null&&a.useBigInt);switch(this.internalType.type){case"array":{this.writeIterable({writer:r,iterable:this.internalType});break}case"blob":{if(n){r.writeNode(t.string(this.internalType.value));return}r.write("new Blob(["),r.writeNode(t.string(this.internalType.value)),r.write("])");break}case"boolean":{r.write(this.internalType.value.toString());break}case"bigint":{if(o){r.write(`BigInt("${this.internalType.value.toString()}")`);return}r.write(`"${this.internalType.value.toString()}"`);return}case"datetime":{if(n){r.writeNode(t.string(this.internalType.value));return}r.write("new Date("),r.writeNode(t.string(this.internalType.value)),r.write(")");break}case"number":{r.write(this.internalType.value.toString());break}case"object":{this.writeObject({writer:r,object:this.internalType});break}case"record":{this.writeRecord({writer:r,record:this.internalType});break}case"reference":{r.writeNode(this.internalType.value);break}case"set":{if(n||this.isSetOfObjects()){r.writeNode(t.array({values:this.internalType.values}));return}r.write("new Set("),this.writeIterable({writer:r,iterable:this.internalType}),r.write(")");break}case"string":{this.internalType.value.includes(`
|
|
25
|
+
`)?this.writeStringWithBackticks({writer:r,value:this.internalType.value}):r.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}case"tuple":{this.writeIterable({writer:r,iterable:this.internalType});break}case"unknown":{this.writeUnknown({writer:r,value:this.internalType.value});break}case"null":{r.write("null");break}case"nop":break;default:R(this.internalType)}}isObject(){return this.internalType.type==="object"}asObjectOrThrow(){if(this.isObject())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not an object")}isSet(){return this.internalType.type==="set"}asSetOrThrow(){if(this.isSet())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a set")}isSetOfObjects(){return this.isSet()&&this.asSetOrThrow().values.every(r=>r.isObject())}writeStringWithBackticks({writer:r,value:n}){r.write("`");let o=n.split(`
|
|
26
26
|
`),i=o[0]+`
|
|
27
27
|
`,a=o.slice(1).join(`
|
|
28
|
-
`);r.write(i.replaceAll("`","\\`")),r.writeNoIndent(a.replaceAll("`","\\`")),r.write("`")}writeIterable({writer:r,iterable:n}){let o=
|
|
29
|
-
`).forEach(n=>{r.writeLine(` * ${n}`)}),r.writeLine("*/"))}};var Me=class extends S{constructor({name:r,type:n,docs:o}){super();g(this,"name");g(this,"type");g(this,"docs");this.name=r,this.type=n,this.docs=o}write(r){this.docs!=null&&r.writeNode(new ae({docs:this.docs})),r.write(`${this.name}: `),this.type.write(r)}};s();u();var De=class extends S{constructor({name:r,parameters:n,async:o,body:i,return_:a,docs:l}){super();g(this,"name");g(this,"parameters");g(this,"async");g(this,"body");g(this,"return_");g(this,"docs");this.name=r,this.parameters=n,this.async=o!=null?o:!1,this.body=i,this.return_=a,this.docs=l}write(r){var n;r.writeNode(new ae({docs:this.docs})),this.async&&r.write("async "),r.write("function "),r.write(`${this.name}`),this.writeParameters(r),this.return_!=null&&(r.write(": "),r.writeNode(this.async?ve.promise(this.return_):this.return_)),r.writeLine(" {"),r.indent(),(n=this.body)==null||n.write(r),r.dedent(),r.writeNewLineIfLastLineNot(),r.writeLine("}")}writeParameters(r){if(this.parameters.length===0){r.write("()");return}r.indent(),r.writeLine("(");for(let n of this.parameters)r.writeNode(n),r.writeLine(",");r.dedent(),r.write(")")}};s();u();var je=class extends S{constructor({function_:r,arguments_:n}){super();g(this,"function_");g(this,"arguments_");this.function_=r,this.arguments_=n}write(r){r.writeNode(this.function_),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};s();u();var We=class extends S{constructor({on:r,method:n,arguments_:o,async:i}){super();g(this,"on");g(this,"method");g(this,"arguments_");g(this,"async");this.on=r,this.method=n,this.arguments_=o,this.async=i}write(r){this.async&&r.write("await "),this.on.write(r),r.write("."),r.write(this.method),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};s();u();var Ve=class extends S{constructor({class_:r,arguments_:n}){super();g(this,"class_");g(this,"arguments_");this.class_=r,this.arguments_=n}write(r){r.write("new "),r.writeNode(this.class_),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};function jy(t){return new qe(t)}function Wy(t){return new De(t)}function Vy(t){return new Ve(t)}function Gy(t){return new je(t)}function zy(t){return new We(t)}function Yy(t){return new Me(t)}function Hy(t){return new we(t)}function Jy(t){return new _e(t)}var _u="client",Mu="main",Ky={type:"primitive",value:"STRING"},gr=class{constructor({context:e}){g(this,"context");this.context=e}async generateSnippet({endpoint:e,request:r}){return await this.buildCodeBlock({endpoint:e,snippet:r}).toStringAsync({customConfig:this.context.customConfig})}generateSnippetSync({endpoint:e,request:r}){return this.buildCodeBlock({endpoint:e,snippet:r}).toString({customConfig:this.context.customConfig})}buildCodeBlock({endpoint:e,snippet:r}){return y.codeblock(n=>{n.writeNode(y.function_({name:Mu,async:!0,parameters:[],body:y.codeblock(o=>{o.writeNodeStatement(this.constructClient({endpoint:e,snippet:r})),o.writeNodeStatement(this.callMethod({endpoint:e,snippet:r}))})})),n.writeNodeStatement(y.invokeFunction({function_:y.reference({name:Mu}),arguments_:[]}))})}constructClient({endpoint:e,snippet:r}){return y.variable({name:_u,const:!0,initializer:y.instantiateClass({class_:y.reference({name:this.context.getRootClientName(),importFrom:this.context.getModuleImport()}),arguments_:[this.getConstructorArgs({endpoint:e,snippet:r})]})})}getConstructorArgs({endpoint:e,snippet:r}){let n=[],o=this.getConstructorEnvironmentArgs({baseUrl:r.baseURL,environment:r.environment});return o.length>0&&n.push(...o),e.auth!=null&&(r.auth!=null?n.push(...this.getConstructorAuthArgs({auth:e.auth,values:r.auth})):this.context.errors.add({severity:b.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(j.Headers),this.context.ir.headers!=null&&r.headers!=null&&n.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:r.headers})),this.context.errors.unscope(),n.length===0?y.TypeLiteral.nop():y.TypeLiteral.object({fields:n})}getConstructorEnvironmentArgs({baseUrl:e,environment:r}){let n=this.getEnvironmentValue({baseUrl:e,environment:r});return n==null?[]:[{name:"environment",value:n}]}getEnvironmentValue({baseUrl:e,environment:r}){if(e!=null&&r!=null){this.context.errors.add({severity:b.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(e!=null)return y.TypeLiteral.string(e);if(r!=null){if(this.context.isSingleEnvironmentID(r)){let n=this.context.getEnvironmentTypeReferenceFromID(r);if(n==null){this.context.errors.add({severity:b.Warning,message:`Environment ${JSON.stringify(r)} was not found`});return}return y.TypeLiteral.reference(n)}if(this.context.isMultiEnvironmentValues(r))return this.context.validateMultiEnvironmentUrlValues(r)?y.TypeLiteral.object({fields:Object.entries(r).map(([n,o])=>({name:n,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:Ky,value:o})}))}):void 0}}getConstructorAuthArgs({auth:e,values:r}){switch(e.type){case"basic":return r.type!=="basic"?(this.context.errors.add({severity:b.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorBasicAuthArg({auth:e,values:r});case"bearer":return r.type!=="bearer"?(this.context.errors.add({severity:b.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorBearerAuthArgs({auth:e,values:r});case"header":return r.type!=="header"?(this.context.errors.add({severity:b.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorHeaderAuthArgs({auth:e,values:r});default:E(e)}}getConstructorBasicAuthArg({auth:e,values:r}){return[{name:this.context.getPropertyName(e.username),value:y.TypeLiteral.string(r.username)},{name:this.context.getPropertyName(e.password),value:y.TypeLiteral.string(r.password)}]}getConstructorBearerAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.token),value:y.TypeLiteral.string(r.token)}]}getConstructorHeaderAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:r.value})}]}getConstructorHeaderArgs({headers:e,values:r}){let n=[];for(let o of e){let i=this.getConstructorHeaderArg({header:o,value:r.value});i!=null&&n.push(i)}return n}getConstructorHeaderArg({header:e,value:r}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:r});if(!y.TypeLiteral.isNop(n))return{name:this.context.getPropertyName(e.name.name),value:n}}callMethod({endpoint:e,snippet:r}){return y.invokeMethod({on:y.reference({name:_u}),method:this.getMethod({endpoint:e}),async:!0,arguments_:this.getMethodArgs({endpoint:e,snippet:r})})}getMethodArgs({endpoint:e,snippet:r}){switch(e.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:e.request,snippet:r});case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:r});default:E(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:r}){let n=[];if(this.context.errors.scope(j.PathParameters),e.pathParameters!=null){let o=this.getPathParameters({namedParameters:e.pathParameters,snippet:r});n.push(...o.map(i=>i.value))}return this.context.errors.unscope(),this.context.errors.scope(j.RequestBody),e.body!=null&&n.push(this.getBodyRequestArg({body:e.body,value:r.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:e,value:r}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r});default:E(e)}}getBytesBodyRequestArg({value:e}){return typeof e!="string"?(this.context.errors.add({severity:b.Critical,message:`Expected bytes value to be a string, got ${typeof e}`}),y.TypeLiteral.nop()):y.TypeLiteral.blob(e)}getMethodArgsForInlinedRequest({request:e,snippet:r}){var p,m,h,d;let n=[],{inlinePathParameters:o,inlineFileProperties:i}={inlinePathParameters:(m=(p=this.context.customConfig)==null?void 0:p.inlinePathParameters)!=null?m:!1,inlineFileProperties:(d=(h=this.context.customConfig)==null?void 0:h.inlineFileProperties)!=null?d:!1};this.context.errors.scope(j.PathParameters);let a=[];e.pathParameters!=null&&a.push(...this.getPathParameters({namedParameters:e.pathParameters,snippet:r})),this.context.errors.unscope(),this.context.errors.scope(j.RequestBody);let l=this.getFilePropertyInfo({request:e,snippet:r});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})||n.push(...a.map(x=>x.value)),i||n.push(...l.fileFields.map(x=>x.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:o,inlineFileProperties:i})&&n.push(this.getInlinedRequestArg({request:e,snippet:r,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})?a:[],filePropertyInfo:l})),n}getFilePropertyInfo({request:e,snippet:r}){return e.body==null||!this.context.isFileUploadRequestBody(e.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:e.body,value:r.requestBody})}getInlinedRequestArg({request:e,snippet:r,pathParameterFields:n,filePropertyInfo:o}){var h,d,x,A;this.context.errors.scope(j.QueryParameters);let a=this.context.associateQueryParametersByWireValue({parameters:(h=e.queryParameters)!=null?h:[],values:(d=r.queryParameters)!=null?d:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(T)}));this.context.errors.unscope(),this.context.errors.scope(j.Headers);let p=this.context.associateByWireValue({parameters:(x=e.headers)!=null?x:[],values:(A=r.headers)!=null?A:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(T)}));this.context.errors.unscope(),this.context.errors.scope(j.RequestBody);let m=e.body!=null?this.getInlinedRequestBodyObjectFields({body:e.body,value:r.requestBody,filePropertyInfo:o}):[];return this.context.errors.unscope(),y.TypeLiteral.object({fields:[...n,...a,...p,...m]})}getInlinedRequestBodyObjectFields({body:e,value:r,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:e.value,value:r});case"referenced":return[this.getReferencedRequestBodyPropertyObjectField({body:e,value:r})];case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:n});default:E(e)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:e}){var r;return(r=this.context.customConfig)!=null&&r.inlineFileProperties?[...e.fileFields,...e.bodyPropertyFields]:e.bodyPropertyFields}getReferencedRequestBodyPropertyObjectField({body:e,value:r}){return{name:this.context.getPropertyName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:e.bodyType,value:r})}}getReferencedRequestBodyPropertyTypeLiteral({body:e,value:r}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r});default:E(e)}}getInlinedRequestBodyPropertyObjectFields({parameters:e,value:r}){var i;let n=[],o=this.context.associateByWireValue({parameters:e,values:(i=this.context.getRecord(r))!=null?i:{}});for(let a of o)n.push({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)});return n}getPathParameters({namedParameters:e,snippet:r}){var i;let n=[],o=this.context.associateByWireValue({parameters:e,values:(i=r.pathParameters)!=null?i:{}});for(let a of o)n.push({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)});return n}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(r=>this.context.getMethodName(r)).join(".")}.${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}};s();u();s();u();s();u();function On({generatorConfig:t,isPackagePrivate:e}){var n;let r=t.output.mode;switch(r.type){case"downloadFiles":return;case"publish":return{packageName:r.registriesV2.npm.packageName,version:r.version,private:e,publishInfo:{registryUrl:r.registriesV2.npm.registryUrl,token:r.registriesV2.npm.token},license:void 0,repoUrl:void 0};case"github":if(r.publishInfo!=null&&r.publishInfo.type!=="npm")throw new Error(`Expected to receive npm publish info but received ${r.publishInfo.type} instead`);return{packageName:r.publishInfo!=null?r.publishInfo.packageName:"",version:r.version,private:e,publishInfo:void 0,repoUrl:r.repoUrl,license:(n=t.license)==null?void 0:n._visit({basic:o=>o.id,custom:o=>`See ${o.filename}`,_other:()=>{}})};default:throw new Error(`Encountered unknown output mode: ${r}`)}}s();u();function Ln({organization:t,workspaceName:e,namespaceExport:r}){return r!=null?r:`${Ue(at(t))}${Ue(at(e))}`}s();u();var Zy="value",ut=class{constructor({context:e}){g(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?y.TypeLiteral.null():(this.context.errors.add({severity:b.Critical,message:"Expected non-null value, but got null"}),y.TypeLiteral.nop());if(e.value===void 0)return y.TypeLiteral.nop();switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return this.convertLiteral({literalType:e.typeReference.value,value:e.value});case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let r=this.context.resolveNamedType({typeId:e.typeReference.value});return r==null?y.TypeLiteral.nop():this.convertNamed({named:r,value:e.value,as:e.as})}case"optional":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"nullable":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"primitive":return this.convertPrimitive({primitive:e.typeReference.value,value:e.value,as:e.as});case"set":return this.convertSet({set:e.typeReference.value,value:e.value});case"unknown":return this.convertUnknown({value:e.value});default:E(e.typeReference)}}convertLiteral({literalType:e,value:r}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:r});return n==null?y.TypeLiteral.nop():y.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:r});return n==null?y.TypeLiteral.nop():y.TypeLiteral.string(n)}default:E(e)}}convertList({list:e,value:r}){return Array.isArray(r)?y.TypeLiteral.array({values:r.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:b.Critical,message:`Expected array but got: ${typeof r}`}),y.TypeLiteral.nop())}convertSet({set:e,value:r}){return Array.isArray(r)?y.TypeLiteral.set({values:r.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:b.Critical,message:`Expected array but got: ${typeof r}`}),y.TypeLiteral.nop())}convertMap({map:e,value:r}){return typeof r!="object"||r==null?(this.context.errors.add({severity:b.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),y.TypeLiteral.nop()):y.TypeLiteral.record({entries:Object.entries(r).map(([n,o])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"key"}),value:this.convert({typeReference:e.value,value:o})}}finally{this.context.errors.unscope()}})})}convertNamed({named:e,value:r,as:n}){var o;switch(e.type){case"alias":return(o=this.context.customConfig)!=null&&o.useBrandedStringAliases?y.TypeLiteral.reference(y.codeblock(i=>{i.writeNode(y.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:e.declaration})})),i.write("("),i.writeNode(this.convert({typeReference:e.typeReference,value:r,as:n})),i.write(")")})):this.convert({typeReference:e.typeReference,value:r,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:e,value:r});case"enum":return this.convertEnum({enum_:e,value:r});case"object":return this.convertObject({object_:e,value:r});case"undiscriminatedUnion":return this.convertUndicriminatedUnion({undicriminatedUnion:e,value:r});default:E(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:r}){var l;let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r});if(n==null)return y.TypeLiteral.nop();let o=n.singleDiscriminatedUnionType,i=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:o});if(i==null)return y.TypeLiteral.nop();if((l=this.context.customConfig)!=null&&l.includeUtilsOnUnionMembers)return y.TypeLiteral.reference(y.codeblock(p=>{p.writeNode(y.invokeMethod({on:y.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:e.declaration})}),method:this.context.getMethodName(o.discriminantValue.name),arguments_:this.convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:n,unionVariant:o,unionProperties:i})}))}));let a={name:this.context.getPropertyName(e.discriminant.name),value:y.TypeLiteral.string(o.discriminantValue.wireValue)};return y.TypeLiteral.object({fields:[a,...i]})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:e,unionVariant:r}){let n=this.getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:r});switch(r.type){case"samePropertiesAsObject":{let o=this.context.resolveNamedType({typeId:r.typeId});if(o==null)return;let i=this.convertNamed({named:o,value:e.value});if(!i.isObject()){this.context.errors.add({severity:b.Critical,message:"Internal error; expected union value to be an object"});return}let a=i.asObjectOrThrow();return[...n,...a.fields]}case"singleProperty":try{this.context.errors.scope(r.discriminantValue.wireValue);let o=this.context.getRecord(e.value);return o==null?[...n,{name:Zy,value:this.convert({typeReference:r.typeReference,value:e.value})}]:[...n,{name:this.context.getPropertyName(r.discriminantValue.name),value:this.convert({typeReference:r.typeReference,value:o[r.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return n;default:E(r)}}convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:e,unionVariant:r,unionProperties:n}){return r.type==="singleProperty"&&this.context.getRecord(e.value)==null&&n.length===1?[this.convert({typeReference:r.typeReference,value:e.value})]:n.length>0?[y.TypeLiteral.object({fields:n})]:[]}getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:r}){var o,i;return this.context.associateByWireValue({parameters:(o=r.properties)!=null?o:[],values:(i=this.context.getRecord(e.value))!=null?i:{},ignoreMissingParameters:!0}).map(a=>{this.context.errors.scope(a.name.wireValue);try{return{name:this.context.getPropertyName(a.name.name),value:this.convert(a)}}finally{this.context.errors.unscope()}})}convertObject({object_:e,value:r}){var o;let n=this.context.associateByWireValue({parameters:e.properties,values:(o=this.context.getRecord(r))!=null?o:{}});return y.TypeLiteral.object({fields:n.map(i=>{this.context.errors.scope(i.name.wireValue);try{return{name:this.context.getPropertyName(i.name.name),value:this.convert(i)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:r}){let n=this.getEnumValue({enum_:e,value:r});return n==null?y.TypeLiteral.nop():y.TypeLiteral.string(n)}getEnumValue({enum_:e,value:r}){if(typeof r!="string"){this.context.errors.add({severity:b.Critical,message:`Expected enum value string, got: ${typeof r}`});return}if(e.values.find(o=>o.wireValue===r)==null){this.context.errors.add({severity:b.Critical,message:`An enum value named "${r}" does not exist in this context`});return}return r}convertUndicriminatedUnion({undicriminatedUnion:e,value:r}){let n=this.findMatchingUndiscriminatedUnionType({undicriminatedUnion:e,value:r});return n==null?y.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undicriminatedUnion:e,value:r}){for(let n of e.types)try{return this.convert({typeReference:n,value:r})}catch(o){continue}this.context.errors.add({severity:b.Critical,message:`None of the types in the undicriminated union matched the given "${typeof r}" value`})}convertUnknown({value:e}){return y.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:r,as:n}){var o,i;switch(e){case"INTEGER":case"UINT":{let a=this.getValueAsNumber({value:r,as:n});return a==null?y.TypeLiteral.nop():y.TypeLiteral.number(a)}case"LONG":case"UINT_64":{let a=this.getValueAsNumber({value:r,as:n});return a==null?y.TypeLiteral.nop():(o=this.context.customConfig)!=null&&o.useBigInt?y.TypeLiteral.bigint(BigInt(a)):y.TypeLiteral.number(a)}case"FLOAT":case"DOUBLE":{let a=this.getValueAsNumber({value:r});return a==null?y.TypeLiteral.nop():y.TypeLiteral.number(a)}case"BOOLEAN":{let a=this.getValueAsBoolean({value:r,as:n});return a==null?y.TypeLiteral.nop():y.TypeLiteral.boolean(a)}case"BASE_64":case"DATE":case"UUID":case"STRING":{let a=this.context.getValueAsString({value:r});return a==null?y.TypeLiteral.nop():y.TypeLiteral.string(a)}case"DATE_TIME":{let a=this.context.getValueAsString({value:r});return a==null?y.TypeLiteral.nop():y.TypeLiteral.datetime(a)}case"BIG_INTEGER":{let a=this.context.getValueAsString({value:r});return a==null?y.TypeLiteral.nop():(i=this.context.customConfig)!=null&&i.useBigInt?y.TypeLiteral.bigint(BigInt(a)):y.TypeLiteral.string(a)}default:E(e)}}getValueAsNumber({value:e,as:r}){let n=r==="key"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:r}){let n=r==="key"?typeof e=="string"?e==="true":e==="false"?!1:e:e;return this.context.getValueAsBoolean({value:n})}};s();u();var ft=class{constructor({context:e}){g(this,"context");this.context=e}getFilePropertyInfo({body:e,value:r}){var i;let n={fileFields:[],bodyPropertyFields:[]},o=(i=this.context.getRecord(r))!=null?i:{};for(let a of e.properties)switch(a.type){case"file":n.fileFields.push({name:this.context.getPropertyName(a.name),value:this.getSingleFileProperty({property:a,record:o})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(a.name),value:this.getArrayFileProperty({property:a,record:o})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(a.name.name),value:this.getBodyProperty({property:a,record:o})});break;default:E(a)}return n}getSingleFileProperty({property:e,record:r}){let n=this.context.getSingleFileValue({property:e,record:r});return n==null?y.TypeLiteral.nop():y.TypeLiteral.blob(n)}getArrayFileProperty({property:e,record:r}){let n=this.context.getFileArrayValues({property:e,record:r});return n==null?y.TypeLiteral.nop():y.TypeLiteral.array({values:n.map(o=>y.TypeLiteral.blob(o))})}getBodyProperty({property:e,record:r}){let n=r[e.name.wireValue];return n==null?y.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:n})}};var lt=class t extends yr{constructor({ir:r,config:n}){var o;super({ir:r,config:n});g(this,"ir");g(this,"customConfig");g(this,"dynamicTypeLiteralMapper");g(this,"filePropertyMapper");g(this,"moduleName");g(this,"namespaceExport");this.ir=r,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new ut({context:this}),this.filePropertyMapper=new ft({context:this}),this.moduleName=Qy({config:n,customConfig:this.customConfig}),this.namespaceExport=Ln({organization:n.organization,workspaceName:n.workspaceName,namespaceExport:(o=this.customConfig)==null?void 0:o.namespaceExport})}clone(){return new t({ir:this.ir,config:this.config})}getModuleImport(){return{type:"named",moduleName:this.moduleName}}getRootClientName(){return`${this.namespaceExport}Client`}getPropertyName(r){var n,o;return(n=this.customConfig)!=null&&n.retainOriginalCasing||(o=this.customConfig)!=null&&o.noSerdeLayer?this.formatOriginalPropertyName(r.originalName):r.camelCase.unsafeName}getMethodName(r){return r.camelCase.unsafeName}getTypeName(r){return r.pascalCase.unsafeName}getEnvironmentTypeReferenceFromID(r){let n=this.resolveEnvironmentName(r);if(n!=null)return this.getEnvironmentsTypeReference(n)}getFullyQualifiedReference({declaration:r}){return r.fernFilepath.allParts.length>0?`${r.fernFilepath.allParts.map(n=>n.camelCase.unsafeName).join(".")}.${this.getTypeName(r.name)}`:`${this.getTypeName(r.name)}`}getEnvironmentsTypeReference(r){return y.reference({name:`${this.namespaceExport}Environments`,importFrom:this.getModuleImport(),memberName:this.getTypeName(r)})}formatOriginalPropertyName(r){return r.includes("-")?`"${r}"`:r}};function Qy({config:t,customConfig:e}){var r,n,o;return(o=(n=On({generatorConfig:t,isPackagePrivate:(r=e==null?void 0:e.private)!=null?r:!1}))==null?void 0:n.packageName)!=null?o:t.organization}var pt=class extends cr{constructor({ir:e,config:r}){super(new lt({ir:e,config:r}))}async generate(e){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new $e;for(let o of r){let i=this.context.clone(),a=new gr({context:i});try{let l=await a.generateSnippet({endpoint:o,request:e});if(i.errors.empty())return{snippet:l,errors:void 0};n.update({context:i,snippet:l})}catch(l){n.err==null&&(n.err=l)}}return n.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new $e;for(let o of r){let i=this.context.clone(),a=new gr({context:i});try{let l=a.generateSnippetSync({endpoint:o,request:e});if(i.errors.empty())return{snippet:l,errors:void 0};n.update({context:i,snippet:l})}catch(l){n.err==null&&(n.err=l)}}return n.getResponseOrThrow({endpoint:e.endpoint})}};0&&(module.exports={DynamicSnippetsGenerator});
|
|
28
|
+
`);r.write(i.replaceAll("`","\\`")),r.writeNoIndent(a.replaceAll("`","\\`")),r.write("`")}writeIterable({writer:r,iterable:n}){let o=Gg({values:n.values});if(o.length===0){r.write("[]");return}r.writeLine("["),r.indent();for(let i of o)i.write(r),r.writeLine(",");r.dedent(),r.write("]")}writeRecord({writer:r,record:n}){let o=Wg({entries:n.entries});if(o.length===0){r.write("{}");return}r.writeLine("{"),r.indent();for(let i of o)i.key.write(r),r.write(": "),i.value.write(r),r.writeLine(",");r.dedent(),r.write("}")}writeObject({writer:r,object:n}){let o=jg({fields:n.fields});if(o.length===0){r.write("{}");return}r.writeLine("{"),r.indent();for(let i of o)r.write(`${i.name}: `),i.value.write(r),r.writeLine(",");r.dedent(),r.write("}")}static array({values:r}){return new this({type:"array",values:r})}static bigint(r){return new this({type:"bigint",value:r})}static blob(r){return new this({type:"blob",value:r})}static boolean(r){return new this({type:"boolean",value:r})}static datetime(r){return new this({type:"datetime",value:r})}static number(r){return new this({type:"number",value:r})}static object({fields:r}){return new this({type:"object",fields:r})}static record({entries:r}){return new this({type:"record",entries:r})}static reference(r){return new this({type:"reference",value:r})}static set({values:r}){return new this({type:"set",values:r})}static string(r){return new this({type:"string",value:r})}static tuple({values:r}){return new this({type:"tuple",values:r})}static unknown(r){return new this({type:"unknown",value:r})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(r){return r.internalType.type==="nop"}writeUnknown({writer:r,value:n}){switch(typeof n){case"boolean":r.write(n.toString());return;case"string":r.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":r.write(n.toString());return;case"object":if(n==null){r.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:r,value:n});return}this.writeUnknownObject({writer:r,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:r,value:n}){if(n.length===0){r.write("[]");return}r.writeLine("["),r.indent();for(let o of n)r.writeNode(t.unknown(o)),r.writeLine(",");r.dedent(),r.write("]")}writeUnknownObject({writer:r,value:n}){let o=Object.entries(n);if(o.length===0){r.write("{}");return}r.writeLine("{"),r.indent();for(let[i,a]of o)r.write(`${i}: `),r.writeNode(t.unknown(a)),r.writeLine(",");r.dedent(),r.write("}")}};function jg({fields:t}){return t.filter(e=>!ee.isNop(e.value))}function Wg({entries:t}){return t.filter(e=>!ee.isNop(e.key)&&!ee.isNop(e.value))}function Gg({values:t}){return t.filter(e=>!ee.isNop(e))}s();u();var Ee=class extends T{constructor({name:r,importFrom:n,memberName:o}){super();v(this,"name");v(this,"importFrom");v(this,"memberName");this.name=r,this.importFrom=n,this.memberName=o}write(r){var i;this.importFrom!=null&&r.addImport(this);let n=((i=this.importFrom)==null?void 0:i.type)==="star"?`${this.importFrom.starImportAlias}.`:"",o=this.memberName!=null?`.${this.memberName}`:"";r.write(`${n}${this.name}${o}`)}};s();u();var ze=class extends T{constructor(r){super();v(this,"args");this.args=r}write(r){this.args.export&&r.write("export "),this.args.const?r.write("const "):r.write("let "),r.write(`${this.args.name} = `),r.writeNode(this.args.initializer)}};s();u();s();u();var ue=class extends T{constructor({docs:r}={docs:void 0}){super();v(this,"docs");this.docs=r}write(r){this.docs!=null&&(r.writeLine("/**"),this.docs.split(`
|
|
29
|
+
`).forEach(n=>{r.writeLine(` * ${n}`)}),r.writeLine("*/"))}};var Ye=class extends T{constructor({name:r,type:n,docs:o}){super();v(this,"name");v(this,"type");v(this,"docs");this.name=r,this.type=n,this.docs=o}write(r){this.docs!=null&&r.writeNode(new ue({docs:this.docs})),r.write(`${this.name}: `),this.type.write(r)}};s();u();var He=class extends T{constructor({name:r,parameters:n,async:o,body:i,return_:a,docs:p}){super();v(this,"name");v(this,"parameters");v(this,"async");v(this,"body");v(this,"return_");v(this,"docs");this.name=r,this.parameters=n,this.async=o!=null?o:!1,this.body=i,this.return_=a,this.docs=p}write(r){var n;r.writeNode(new ue({docs:this.docs})),this.async&&r.write("async "),r.write("function "),r.write(`${this.name}`),this.writeParameters(r),this.return_!=null&&(r.write(": "),r.writeNode(this.async?Se.promise(this.return_):this.return_)),r.writeLine(" {"),r.indent(),(n=this.body)==null||n.write(r),r.dedent(),r.writeNewLineIfLastLineNot(),r.writeLine("}")}writeParameters(r){if(this.parameters.length===0){r.write("()");return}r.indent(),r.writeLine("(");for(let n of this.parameters)r.writeNode(n),r.writeLine(",");r.dedent(),r.write(")")}};s();u();var Je=class extends T{constructor({function_:r,arguments_:n}){super();v(this,"function_");v(this,"arguments_");this.function_=r,this.arguments_=n}write(r){r.writeNode(this.function_),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};s();u();var Ke=class extends T{constructor({on:r,method:n,arguments_:o,async:i}){super();v(this,"on");v(this,"method");v(this,"arguments_");v(this,"async");this.on=r,this.method=n,this.arguments_=o,this.async=i}write(r){this.async&&r.write("await "),this.on.write(r),r.write("."),r.write(this.method),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};s();u();var Ze=class extends T{constructor({class_:r,arguments_:n}){super();v(this,"class_");v(this,"arguments_");this.class_=r,this.arguments_=n}write(r){r.write("new "),r.writeNode(this.class_),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};function zg(t){return new Ve(t)}function Yg(t){return new He(t)}function Hg(t){return new Ze(t)}function Jg(t){return new Je(t)}function Kg(t){return new Ke(t)}function Zg(t){return new Ye(t)}function Qg(t){return new Ee(t)}function Xg(t){return new ze(t)}var sp="client",up="main",ex={type:"primitive",value:"STRING"},St=class{constructor({context:e}){v(this,"context");this.context=e}async generateSnippet({endpoint:e,request:r}){return await this.buildCodeBlock({endpoint:e,snippet:r}).toStringAsync({customConfig:this.context.customConfig})}generateSnippetSync({endpoint:e,request:r}){return this.buildCodeBlock({endpoint:e,snippet:r}).toString({customConfig:this.context.customConfig})}buildCodeBlock({endpoint:e,snippet:r}){return g.codeblock(n=>{n.writeNode(g.function_({name:up,async:!0,parameters:[],body:g.codeblock(o=>{o.writeNodeStatement(this.constructClient({endpoint:e,snippet:r})),o.writeNodeStatement(this.callMethod({endpoint:e,snippet:r}))})})),n.writeNodeStatement(g.invokeFunction({function_:g.reference({name:up}),arguments_:[]}))})}constructClient({endpoint:e,snippet:r}){return g.variable({name:sp,const:!0,initializer:g.instantiateClass({class_:g.reference({name:this.context.getRootClientName(),importFrom:this.context.getModuleImport()}),arguments_:[this.getConstructorArgs({endpoint:e,snippet:r})]})})}getConstructorArgs({endpoint:e,snippet:r}){let n=[],o=this.getConstructorEnvironmentArgs({baseUrl:r.baseURL,environment:r.environment});return o.length>0&&n.push(...o),e.auth!=null&&(r.auth!=null?n.push(...this.getConstructorAuthArgs({auth:e.auth,values:r.auth})):this.context.errors.add({severity:S.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`})),this.context.errors.scope($.PathParameters),this.context.ir.pathParameters!=null&&n.push(...this.getPathParameters({namedParameters:this.context.ir.pathParameters,snippet:r})),this.context.errors.unscope(),this.context.errors.scope($.Headers),this.context.ir.headers!=null&&r.headers!=null&&n.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:r.headers})),this.context.errors.unscope(),n.length===0?g.TypeLiteral.nop():g.TypeLiteral.object({fields:n})}getConstructorEnvironmentArgs({baseUrl:e,environment:r}){let n=this.getEnvironmentValue({baseUrl:e,environment:r});return n==null?[]:[{name:"environment",value:n}]}getEnvironmentValue({baseUrl:e,environment:r}){if(e!=null&&r!=null){this.context.errors.add({severity:S.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(e!=null)return g.TypeLiteral.string(e);if(r!=null){if(this.context.isSingleEnvironmentID(r)){let n=this.context.getEnvironmentTypeReferenceFromID(r);if(n==null){this.context.errors.add({severity:S.Warning,message:`Environment ${JSON.stringify(r)} was not found`});return}return g.TypeLiteral.reference(n)}if(this.context.isMultiEnvironmentValues(r))return this.context.validateMultiEnvironmentUrlValues(r)?g.TypeLiteral.object({fields:Object.entries(r).map(([n,o])=>({name:n,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:ex,value:o})}))}):void 0}}getConstructorAuthArgs({auth:e,values:r}){switch(e.type){case"basic":return r.type!=="basic"?(this.context.errors.add({severity:S.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorBasicAuthArg({auth:e,values:r});case"bearer":return r.type!=="bearer"?(this.context.errors.add({severity:S.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorBearerAuthArgs({auth:e,values:r});case"header":return r.type!=="header"?(this.context.errors.add({severity:S.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorHeaderAuthArgs({auth:e,values:r});case"oauth":return r.type!=="oauth"?(this.context.errors.add({severity:S.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorOAuthArgs({auth:e,values:r});default:R(e)}}getConstructorBasicAuthArg({auth:e,values:r}){return[{name:this.context.getPropertyName(e.username),value:g.TypeLiteral.string(r.username)},{name:this.context.getPropertyName(e.password),value:g.TypeLiteral.string(r.password)}]}getConstructorBearerAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.token),value:g.TypeLiteral.string(r.token)}]}getConstructorHeaderAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:r.value})}]}getConstructorOAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.clientId),value:g.TypeLiteral.string(r.clientId)},{name:this.context.getPropertyName(e.clientSecret),value:g.TypeLiteral.string(r.clientSecret)}]}getConstructorHeaderArgs({headers:e,values:r}){let n=[];for(let o of e){let i=this.getConstructorHeaderArg({header:o,value:r.value});i!=null&&n.push(i)}return n}getConstructorHeaderArg({header:e,value:r}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:r});if(!g.TypeLiteral.isNop(n))return{name:this.context.getPropertyName(e.name.name),value:n}}callMethod({endpoint:e,snippet:r}){return g.invokeMethod({on:g.reference({name:sp}),method:this.getMethod({endpoint:e}),async:!0,arguments_:this.getMethodArgs({endpoint:e,snippet:r})})}getMethodArgs({endpoint:e,snippet:r}){switch(e.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:e.request,snippet:r});case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:r});default:R(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:r}){var i,a;let n=[];this.context.errors.scope($.PathParameters);let o=[...(i=this.context.ir.pathParameters)!=null?i:[],...(a=e.pathParameters)!=null?a:[]];return o.length>0&&n.push(...this.getPathParameters({namedParameters:o,snippet:r}).map(p=>p.value)),this.context.errors.unscope(),this.context.errors.scope($.RequestBody),e.body!=null&&n.push(this.getBodyRequestArg({body:e.body,value:r.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:e,value:r}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r});default:R(e)}}getBytesBodyRequestArg({value:e}){return typeof e!="string"?(this.context.errors.add({severity:S.Critical,message:`Expected bytes value to be a string, got ${typeof e}`}),g.TypeLiteral.nop()):g.TypeLiteral.blob(e)}getMethodArgsForInlinedRequest({request:e,snippet:r}){var c,d,m,y;let n=[],{inlinePathParameters:o,inlineFileProperties:i}={inlinePathParameters:(d=(c=this.context.customConfig)==null?void 0:c.inlinePathParameters)!=null?d:!1,inlineFileProperties:(y=(m=this.context.customConfig)==null?void 0:m.inlineFileProperties)!=null?y:!1};this.context.errors.scope($.PathParameters);let a=[];e.pathParameters!=null&&a.push(...this.getPathParameters({namedParameters:e.pathParameters,snippet:r})),this.context.errors.unscope(),this.context.errors.scope($.RequestBody);let p=this.getFilePropertyInfo({request:e,snippet:r});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})||n.push(...a.map(x=>x.value)),i||n.push(...p.fileFields.map(x=>x.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:o,inlineFileProperties:i})&&n.push(this.getInlinedRequestArg({request:e,snippet:r,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})?a:[],filePropertyInfo:p})),n}getFilePropertyInfo({request:e,snippet:r}){return e.body==null||!this.context.isFileUploadRequestBody(e.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:e.body,value:r.requestBody})}getInlinedRequestArg({request:e,snippet:r,pathParameterFields:n,filePropertyInfo:o}){var m,y,x,w;this.context.errors.scope($.QueryParameters);let a=this.context.associateQueryParametersByWireValue({parameters:(m=e.queryParameters)!=null?m:[],values:(y=r.queryParameters)!=null?y:{}}).map(E=>({name:this.context.getPropertyName(E.name.name),value:this.context.dynamicTypeLiteralMapper.convert(E)}));this.context.errors.unscope(),this.context.errors.scope($.Headers);let c=this.context.associateByWireValue({parameters:(x=e.headers)!=null?x:[],values:(w=r.headers)!=null?w:{}}).map(E=>({name:this.context.getPropertyName(E.name.name),value:this.context.dynamicTypeLiteralMapper.convert(E)}));this.context.errors.unscope(),this.context.errors.scope($.RequestBody);let d=e.body!=null?this.getInlinedRequestBodyObjectFields({body:e.body,value:r.requestBody,filePropertyInfo:o}):[];return this.context.errors.unscope(),g.TypeLiteral.object({fields:[...n,...a,...c,...d]})}getInlinedRequestBodyObjectFields({body:e,value:r,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:e.value,value:r});case"referenced":return[this.getReferencedRequestBodyPropertyObjectField({body:e,value:r})];case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:n});default:R(e)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:e}){var r;return(r=this.context.customConfig)!=null&&r.inlineFileProperties?[...e.fileFields,...e.bodyPropertyFields]:e.bodyPropertyFields}getReferencedRequestBodyPropertyObjectField({body:e,value:r}){return{name:this.context.getPropertyName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:e.bodyType,value:r})}}getReferencedRequestBodyPropertyTypeLiteral({body:e,value:r}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r});default:R(e)}}getInlinedRequestBodyPropertyObjectFields({parameters:e,value:r}){var i;let n=[],o=this.context.associateByWireValue({parameters:e,values:(i=this.context.getRecord(r))!=null?i:{}});for(let a of o)n.push({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)});return n}getPathParameters({namedParameters:e,snippet:r}){var i;let n=[],o=this.context.associateByWireValue({parameters:e,values:(i=r.pathParameters)!=null?i:{},ignoreMissingParameters:!0});for(let a of o)n.push({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)});return n}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(r=>this.context.getMethodName(r)).join(".")}.${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}};s();u();s();u();s();u();function io({generatorConfig:t,isPackagePrivate:e}){var n;let r=t.output.mode;switch(r.type){case"downloadFiles":return;case"publish":return{packageName:r.registriesV2.npm.packageName,version:r.version,private:e,publishInfo:{registryUrl:r.registriesV2.npm.registryUrl,token:r.registriesV2.npm.token},license:void 0,repoUrl:void 0};case"github":if(r.publishInfo!=null&&r.publishInfo.type!=="npm")throw new Error(`Expected to receive npm publish info but received ${r.publishInfo.type} instead`);return{packageName:r.publishInfo!=null?r.publishInfo.packageName:"",version:r.version,private:e,publishInfo:void 0,repoUrl:r.repoUrl,license:(n=t.license)==null?void 0:n._visit({basic:o=>o.id,custom:o=>`See ${o.filename}`,_other:()=>{}})};default:throw new Error(`Encountered unknown output mode: ${r}`)}}s();u();function ao({organization:t,workspaceName:e,namespaceExport:r}){return r!=null?r:`${We(bt(t))}${We(bt(e))}`}s();u();var rx="value",Et=class{constructor({context:e}){v(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?g.TypeLiteral.null():(this.context.errors.add({severity:S.Critical,message:"Expected non-null value, but got null"}),g.TypeLiteral.nop());if(e.value===void 0)return g.TypeLiteral.nop();switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return this.convertLiteral({literalType:e.typeReference.value,value:e.value});case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let r=this.context.resolveNamedType({typeId:e.typeReference.value});return r==null?g.TypeLiteral.nop():this.convertNamed({named:r,value:e.value,as:e.as})}case"optional":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"nullable":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"primitive":return this.convertPrimitive({primitive:e.typeReference.value,value:e.value,as:e.as});case"set":return this.convertSet({set:e.typeReference.value,value:e.value});case"unknown":return this.convertUnknown({value:e.value});default:R(e.typeReference)}}convertLiteral({literalType:e,value:r}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.string(n)}default:R(e)}}convertList({list:e,value:r}){return Array.isArray(r)?g.TypeLiteral.array({values:r.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:S.Critical,message:`Expected array but got: ${typeof r}`}),g.TypeLiteral.nop())}convertSet({set:e,value:r}){return Array.isArray(r)?g.TypeLiteral.set({values:r.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:S.Critical,message:`Expected array but got: ${typeof r}`}),g.TypeLiteral.nop())}convertMap({map:e,value:r}){return typeof r!="object"||r==null?(this.context.errors.add({severity:S.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),g.TypeLiteral.nop()):g.TypeLiteral.record({entries:Object.entries(r).map(([n,o])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"key"}),value:this.convert({typeReference:e.value,value:o})}}finally{this.context.errors.unscope()}})})}convertNamed({named:e,value:r,as:n}){var o;switch(e.type){case"alias":return(o=this.context.customConfig)!=null&&o.useBrandedStringAliases?g.TypeLiteral.reference(g.codeblock(i=>{i.writeNode(g.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:e.declaration})})),i.write("("),i.writeNode(this.convert({typeReference:e.typeReference,value:r,as:n})),i.write(")")})):this.convert({typeReference:e.typeReference,value:r,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:e,value:r});case"enum":return this.convertEnum({enum_:e,value:r});case"object":return this.convertObject({object_:e,value:r});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r});default:R(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:r}){var p;let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r});if(n==null)return g.TypeLiteral.nop();let o=n.singleDiscriminatedUnionType,i=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:o});if(i==null)return g.TypeLiteral.nop();if((p=this.context.customConfig)!=null&&p.includeUtilsOnUnionMembers)return g.TypeLiteral.reference(g.codeblock(c=>{c.writeNode(g.invokeMethod({on:g.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:e.declaration})}),method:this.context.getMethodName(o.discriminantValue.name),arguments_:this.convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:n,unionVariant:o,unionProperties:i})}))}));let a={name:this.context.getPropertyName(e.discriminant.name),value:g.TypeLiteral.string(o.discriminantValue.wireValue)};return g.TypeLiteral.object({fields:[a,...i]})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:e,unionVariant:r}){let n=this.getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:r});switch(r.type){case"samePropertiesAsObject":{let o=this.context.resolveNamedType({typeId:r.typeId});if(o==null)return;let i=this.convertNamed({named:o,value:e.value});if(!i.isObject()){this.context.errors.add({severity:S.Critical,message:"Internal error; expected union value to be an object"});return}let a=i.asObjectOrThrow();return[...n,...a.fields]}case"singleProperty":try{this.context.errors.scope(r.discriminantValue.wireValue);let o=this.context.getRecord(e.value);return o==null?[...n,{name:rx,value:this.convert({typeReference:r.typeReference,value:e.value})}]:[...n,{name:this.context.getPropertyName(r.discriminantValue.name),value:this.convert({typeReference:r.typeReference,value:o[r.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return n;default:R(r)}}convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:e,unionVariant:r,unionProperties:n}){return r.type==="singleProperty"&&this.context.getRecord(e.value)==null&&n.length===1?[this.convert({typeReference:r.typeReference,value:e.value})]:n.length>0?[g.TypeLiteral.object({fields:n})]:[]}getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:r}){var o,i;return this.context.associateByWireValue({parameters:(o=r.properties)!=null?o:[],values:(i=this.context.getRecord(e.value))!=null?i:{},ignoreMissingParameters:!0}).map(a=>{this.context.errors.scope(a.name.wireValue);try{return{name:this.context.getPropertyName(a.name.name),value:this.convert(a)}}finally{this.context.errors.unscope()}})}convertObject({object_:e,value:r}){var o;let n=this.context.associateByWireValue({parameters:e.properties,values:(o=this.context.getRecord(r))!=null?o:{}});return g.TypeLiteral.object({fields:n.map(i=>{this.context.errors.scope(i.name.wireValue);try{return{name:this.context.getPropertyName(i.name.name),value:this.convert(i)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:r}){let n=this.getEnumValue({enum_:e,value:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.string(n)}getEnumValue({enum_:e,value:r}){if(typeof r!="string"){this.context.errors.add({severity:S.Critical,message:`Expected enum value string, got: ${typeof r}`});return}if(e.values.find(o=>o.wireValue===r)==null){this.context.errors.add({severity:S.Critical,message:`An enum value named "${r}" does not exist in this context`});return}return r}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r});return n==null?g.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r}){for(let n of e.types)try{return this.convert({typeReference:n,value:r})}catch(o){continue}this.context.errors.add({severity:S.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof r}" value`})}convertUnknown({value:e}){return g.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:r,as:n}){var o,i;switch(e){case"INTEGER":case"UINT":{let a=this.getValueAsNumber({value:r,as:n});return a==null?g.TypeLiteral.nop():g.TypeLiteral.number(a)}case"LONG":case"UINT_64":{let a=this.getValueAsNumber({value:r,as:n});return a==null?g.TypeLiteral.nop():(o=this.context.customConfig)!=null&&o.useBigInt?g.TypeLiteral.bigint(BigInt(a)):g.TypeLiteral.number(a)}case"FLOAT":case"DOUBLE":{let a=this.getValueAsNumber({value:r});return a==null?g.TypeLiteral.nop():g.TypeLiteral.number(a)}case"BOOLEAN":{let a=this.getValueAsBoolean({value:r,as:n});return a==null?g.TypeLiteral.nop():g.TypeLiteral.boolean(a)}case"BASE_64":case"DATE":case"UUID":case"STRING":{let a=this.context.getValueAsString({value:r});return a==null?g.TypeLiteral.nop():g.TypeLiteral.string(a)}case"DATE_TIME":{let a=this.context.getValueAsString({value:r});return a==null?g.TypeLiteral.nop():g.TypeLiteral.datetime(a)}case"BIG_INTEGER":{let a=this.context.getValueAsString({value:r});return a==null?g.TypeLiteral.nop():(i=this.context.customConfig)!=null&&i.useBigInt?g.TypeLiteral.bigint(BigInt(a)):g.TypeLiteral.string(a)}default:R(e)}}getValueAsNumber({value:e,as:r}){let n=r==="key"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:r}){let n=r==="key"?typeof e=="string"?e==="true":e==="false"?!1:e:e;return this.context.getValueAsBoolean({value:n})}};s();u();var Tt=class{constructor({context:e}){v(this,"context");this.context=e}getFilePropertyInfo({body:e,value:r}){var i;let n={fileFields:[],bodyPropertyFields:[]},o=(i=this.context.getRecord(r))!=null?i:{};for(let a of e.properties)switch(a.type){case"file":n.fileFields.push({name:this.context.getPropertyName(a.name),value:this.getSingleFileProperty({property:a,record:o})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(a.name),value:this.getArrayFileProperty({property:a,record:o})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(a.name.name),value:this.getBodyProperty({property:a,record:o})});break;default:R(a)}return n}getSingleFileProperty({property:e,record:r}){let n=this.context.getSingleFileValue({property:e,record:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.blob(n)}getArrayFileProperty({property:e,record:r}){let n=this.context.getFileArrayValues({property:e,record:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.array({values:n.map(o=>g.TypeLiteral.blob(o))})}getBodyProperty({property:e,record:r}){let n=r[e.name.wireValue];return n==null?g.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:n})}};var It=class t extends Rr{constructor({ir:r,config:n}){var o;super({ir:r,config:n});v(this,"ir");v(this,"customConfig");v(this,"dynamicTypeLiteralMapper");v(this,"filePropertyMapper");v(this,"moduleName");v(this,"namespaceExport");this.ir=r,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new Et({context:this}),this.filePropertyMapper=new Tt({context:this}),this.moduleName=tx({config:n,customConfig:this.customConfig}),this.namespaceExport=ao({organization:n.organization,workspaceName:n.workspaceName,namespaceExport:(o=this.customConfig)==null?void 0:o.namespaceExport})}clone(){return new t({ir:this.ir,config:this.config})}getModuleImport(){return{type:"named",moduleName:this.moduleName}}getRootClientName(){return`${this.namespaceExport}Client`}getPropertyName(r){var n,o;return(n=this.customConfig)!=null&&n.retainOriginalCasing||(o=this.customConfig)!=null&&o.noSerdeLayer?this.formatOriginalPropertyName(r.originalName):r.camelCase.unsafeName}getMethodName(r){return r.camelCase.unsafeName}getTypeName(r){return r.pascalCase.unsafeName}getEnvironmentTypeReferenceFromID(r){let n=this.resolveEnvironmentName(r);if(n!=null)return this.getEnvironmentsTypeReference(n)}getFullyQualifiedReference({declaration:r}){return r.fernFilepath.allParts.length>0?`${r.fernFilepath.allParts.map(n=>n.camelCase.unsafeName).join(".")}.${this.getTypeName(r.name)}`:`${this.getTypeName(r.name)}`}getEnvironmentsTypeReference(r){return g.reference({name:`${this.namespaceExport}Environment`,importFrom:this.getModuleImport(),memberName:this.getTypeName(r)})}formatOriginalPropertyName(r){return r.includes("-")?`"${r}"`:r}};function tx({config:t,customConfig:e}){var r,n,o;return(o=(n=io({generatorConfig:t,isPackagePrivate:(r=e==null?void 0:e.private)!=null?r:!1}))==null?void 0:n.packageName)!=null?o:t.organization}var Rt=class extends Er{constructor({ir:e,config:r}){super(new It({ir:e,config:r}))}async generate(e){return super.generate(e)}generateSync(e){return super.generateSync(e)}createSnippetGenerator(e){return new St({context:e})}};0&&(module.exports={DynamicSnippetsGenerator});
|
|
30
30
|
/*! Bundled license information:
|
|
31
31
|
|
|
32
32
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|