@fern-api/java-dynamic-snippets 0.0.3 → 0.0.4
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/Config.cjs +1 -0
- package/cjs/Config.cjs.map +1 -0
- package/cjs/DynamicSnippetsGenerator.cjs +16 -11
- package/cjs/DynamicSnippetsGenerator.cjs.map +1 -0
- package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
- package/cjs/{DynamicSnippetsGeneratorContext-B2BA5MLv.d.cts → DynamicSnippetsGeneratorContext-FbVOZ8Go.d.cts} +8 -5
- package/cjs/EndpointSnippetGenerator.cjs +12 -7
- package/cjs/EndpointSnippetGenerator.cjs.map +1 -0
- package/cjs/EndpointSnippetGenerator.d.cts +4 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +16 -11
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -0
- package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
- package/cjs/context/DynamicTypeLiteralMapper.cjs +12 -7
- package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -0
- package/cjs/context/DynamicTypeLiteralMapper.d.cts +1 -1
- package/cjs/context/DynamicTypeMapper.cjs +12 -7
- package/cjs/context/DynamicTypeMapper.cjs.map +1 -0
- package/cjs/context/DynamicTypeMapper.d.cts +1 -1
- package/cjs/context/FilePropertyMapper.cjs +12 -7
- package/cjs/context/FilePropertyMapper.cjs.map +1 -0
- package/cjs/context/FilePropertyMapper.d.cts +1 -1
- package/cjs/index.cjs +26 -21
- package/cjs/index.cjs.map +1 -0
- package/cjs/index.d.cts +2 -2
- package/esm/Config.js +2 -1
- package/esm/Config.js.map +1 -0
- package/esm/DynamicSnippetsGenerator.d.ts +1 -1
- package/esm/DynamicSnippetsGenerator.js +2 -1
- package/esm/DynamicSnippetsGenerator.js.map +1 -0
- package/esm/{DynamicSnippetsGeneratorContext-B2BA5MLv.d.ts → DynamicSnippetsGeneratorContext-FbVOZ8Go.d.ts} +8 -5
- package/esm/EndpointSnippetGenerator.d.ts +4 -1
- package/esm/EndpointSnippetGenerator.js +2 -1
- package/esm/EndpointSnippetGenerator.js.map +1 -0
- package/esm/chunk-3JSOCWNQ.js +20 -0
- package/esm/chunk-3JSOCWNQ.js.map +1 -0
- package/esm/chunk-3LOINSB3.js +2 -0
- package/esm/chunk-3LOINSB3.js.map +1 -0
- package/esm/chunk-6YM2QG7U.js +2 -0
- package/esm/chunk-6YM2QG7U.js.map +1 -0
- package/esm/{chunk-2AZXIWKY.js → chunk-E6GFFTKW.js} +2 -1
- package/esm/chunk-E6GFFTKW.js.map +1 -0
- package/esm/chunk-JZ2FDMYI.js +15 -0
- package/esm/chunk-JZ2FDMYI.js.map +1 -0
- package/esm/{chunk-452HWDL4.js → chunk-JZBCQWQN.js} +2 -1
- package/esm/chunk-JZBCQWQN.js.map +1 -0
- package/esm/{chunk-7CY27UU7.js → chunk-PUPEW5QI.js} +2 -1
- package/esm/chunk-PUPEW5QI.js.map +1 -0
- package/esm/chunk-SQKACQJK.js +2 -0
- package/esm/chunk-SQKACQJK.js.map +1 -0
- package/esm/chunk-WBGWLNLI.js +2 -0
- package/esm/chunk-WBGWLNLI.js.map +1 -0
- package/esm/chunk-ZYVZJBJN.js +2 -0
- package/esm/chunk-ZYVZJBJN.js.map +1 -0
- package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
- package/esm/context/DynamicSnippetsGeneratorContext.js +2 -1
- package/esm/context/DynamicSnippetsGeneratorContext.js.map +1 -0
- package/esm/context/DynamicTypeLiteralMapper.d.ts +1 -1
- package/esm/context/DynamicTypeLiteralMapper.js +2 -1
- package/esm/context/DynamicTypeLiteralMapper.js.map +1 -0
- package/esm/context/DynamicTypeMapper.d.ts +1 -1
- package/esm/context/DynamicTypeMapper.js +2 -1
- package/esm/context/DynamicTypeMapper.js.map +1 -0
- package/esm/context/FilePropertyMapper.d.ts +1 -1
- package/esm/context/FilePropertyMapper.js +2 -1
- package/esm/context/FilePropertyMapper.js.map +1 -0
- package/esm/index.d.ts +2 -2
- package/esm/index.js +12 -11
- package/esm/index.js.map +1 -0
- package/package.json +1 -1
- package/esm/chunk-AASPH6YC.js +0 -15
- package/esm/chunk-BKM7JFLZ.js +0 -1
- package/esm/chunk-HN67B7VQ.js +0 -1
- package/esm/chunk-JSEUWNSK.js +0 -1
- package/esm/chunk-N3DIPQCT.js +0 -14
- package/esm/chunk-TTNRR5YY.js +0 -1
- package/esm/chunk-WFKWXM7L.js +0 -1
package/cjs/index.cjs
CHANGED
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
"use strict";var hp=Object.create;var Ke=Object.defineProperty,gp=Object.defineProperties,vp=Object.getOwnPropertyDescriptor,xp=Object.getOwnPropertyDescriptors,wp=Object.getOwnPropertyNames,Nr=Object.getOwnPropertySymbols,bp=Object.getPrototypeOf,Ct=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable;var Ot=(t,e,r)=>e in t?Ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,hi=(t,e)=>{for(var r in e||(e={}))Ct.call(e,r)&&Ot(t,r,e[r]);if(Nr)for(var r of Nr(e))mi.call(e,r)&&Ot(t,r,e[r]);return t},gi=(t,e)=>gp(t,xp(e));var vi=t=>typeof t=="symbol"?t:t+"",xi=(t,e)=>{var r={};for(var n in t)Ct.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&&mi.call(t,n)&&(r[n]=t[n]);return r};var Oe=(t,e)=>()=>(t&&(e=t(t=0)),e);var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),kt=(t,e)=>{for(var r in e)Ke(t,r,{get:e[r],enumerable:!0})},wi=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wp(e))!Ct.call(t,i)&&i!==r&&Ke(t,i,{get:()=>e[i],enumerable:!(n=vp(e,i))||n.enumerable});return t};var Ap=(t,e,r)=>(r=t!=null?hp(bp(t)):{},wi(e||!t||!t.__esModule?Ke(r,"default",{value:t,enumerable:!0}):r,t)),bi=t=>wi(Ke({},"__esModule",{value:!0}),t);var g=(t,e,r)=>Ot(t,typeof e!="symbol"?e+"":e,r);function Si(){throw new Error("setTimeout has not been defined")}function Ti(){throw new Error("clearTimeout has not been defined")}function Ri(t){if(te===setTimeout)return setTimeout(t,0);if((te===Si||!te)&&setTimeout)return te=setTimeout,setTimeout(t,0);try{return te(t,0)}catch(e){try{return te.call(null,t,0)}catch(r){return te.call(this,t,0)}}}function Sp(t){if(ne===clearTimeout)return clearTimeout(t);if((ne===Ti||!ne)&&clearTimeout)return ne=clearTimeout,clearTimeout(t);try{return ne(t)}catch(e){try{return ne.call(null,t)}catch(r){return ne.call(this,t)}}}function Tp(){!ke||!pe||(ke=!1,pe.length?J=pe.concat(J):Fr=-1,J.length&&Ei())}function Ei(){if(!ke){var t=Ri(Tp);ke=!0;for(var e=J.length;e;){for(pe=J,J=[];++Fr<e;)pe&&pe[Fr].run();Fr=-1,e=J.length}pe=null,ke=!1,Sp(t)}}function Rp(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 Ii(t,e)),J.length===1&&!ke&&Ri(Ei)}function Ii(t,e){this.fun=t,this.array=e}function fe(){}function jp(t){throw new Error("process.binding is not supported")}function Wp(){return"/"}function Gp(t){throw new Error("process.chdir is not supported")}function Vp(){return 0}function Yp(t){var e=zp.call(Ce)*.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 Jp(){var t=new Date,e=t-Hp;return e/1e3}var te,ne,J,ke,pe,Fr,Ep,Ip,Pp,Np,Fp,Op,Cp,kp,Lp,Up,Bp,Mp,qp,$p,_p,Dp,Ce,zp,Hp,f,Ai,a=Oe(()=>{"use strict";te=Si,ne=Ti;typeof globalThis.setTimeout=="function"&&(te=setTimeout);typeof globalThis.clearTimeout=="function"&&(ne=clearTimeout);J=[],ke=!1,Fr=-1;Ii.prototype.run=function(){this.fun.apply(null,this.array)};Ep="browser",Ip="browser",Pp=!0,Np={},Fp=[],Op="",Cp={},kp={},Lp={};Up=fe,Bp=fe,Mp=fe,qp=fe,$p=fe,_p=fe,Dp=fe;Ce=globalThis.performance||{},zp=Ce.now||Ce.mozNow||Ce.msNow||Ce.oNow||Ce.webkitNow||function(){return new Date().getTime()};Hp=new Date;f={nextTick:Rp,title:Ep,browser:Pp,env:Np,argv:Fp,version:Op,versions:Cp,on:Up,addListener:Bp,once:Mp,off:qp,removeListener:$p,removeAllListeners:_p,emit:Dp,binding:jp,cwd:Wp,chdir:Gp,umask:Vp,hrtime:Yp,platform:Ip,release:kp,config:Lp,uptime:Jp},Ai={};Object.keys(Ai).forEach(t=>{let e=t.split("."),r=f;for(let n=0;n<e.length;n++){let i=e[n];n===e.length-1?r[i]=Ai[t]:r=r[i]||(r[i]={})}})});function Oi(){Ut=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)_[e]=t[e],q[t.charCodeAt(e)]=e;q[45]=62,q[95]=63}function Zp(t){Ut||Oi();var e,r,n,i,o,u,p=t.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=t[p-2]==="="?2:t[p-1]==="="?1:0,u=new Kp(p*3/4-o),n=o>0?p-4:p;var c=0;for(e=0,r=0;e<n;e+=4,r+=3)i=q[t.charCodeAt(e)]<<18|q[t.charCodeAt(e+1)]<<12|q[t.charCodeAt(e+2)]<<6|q[t.charCodeAt(e+3)],u[c++]=i>>16&255,u[c++]=i>>8&255,u[c++]=i&255;return o===2?(i=q[t.charCodeAt(e)]<<2|q[t.charCodeAt(e+1)]>>4,u[c++]=i&255):o===1&&(i=q[t.charCodeAt(e)]<<10|q[t.charCodeAt(e+1)]<<4|q[t.charCodeAt(e+2)]>>2,u[c++]=i>>8&255,u[c++]=i&255),u}function Xp(t){return _[t>>18&63]+_[t>>12&63]+_[t>>6&63]+_[t&63]}function Qp(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(Xp(n));return i.join("")}function Pi(t){Ut||Oi();for(var e,r=t.length,n=r%3,i="",o=[],u=16383,p=0,c=r-n;p<c;p+=u)o.push(Qp(t,p,p+u>c?c:p+u));return n===1?(e=t[r-1],i+=_[e>>2],i+=_[e<<4&63],i+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],i+=_[e>>10],i+=_[e>>4&63],i+=_[e<<2&63],i+="="),o.push(i),o.join("")}function Or(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function K(t,e){if(Or()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=l.prototype):(t===null&&(t=new l(e)),t.length=e),t}function l(t,e,r){if(!l.TYPED_ARRAY_SUPPORT&&!(this instanceof l))return new l(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 Bt(this,t)}return Ci(this,t,e,r)}function Ci(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?tf(t,e,r,n):typeof e=="string"?rf(t,e,r):nf(t,e)}function ki(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 ef(t,e,r,n){return ki(e),e<=0?K(t,e):r!==void 0?typeof n=="string"?K(t,e).fill(r,n):K(t,e).fill(r):K(t,e)}function Bt(t,e){if(ki(e),t=K(t,e<0?0:Mt(e)|0),!l.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function rf(t,e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!l.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=Li(e,r)|0;t=K(t,n);var i=t.write(e,r);return i!==n&&(t=t.slice(0,i)),t}function Lt(t,e){var r=e.length<0?0:Mt(e.length)|0;t=K(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function tf(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),l.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=l.prototype):t=Lt(t,e),t}function nf(t,e){if(D(e)){var r=Mt(e.length)|0;return t=K(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"||Sf(e.length)?K(t,0):Lt(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Lt(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Mt(t){if(t>=Or())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Or().toString(16)+" bytes");return t|0}function D(t){return!!(t!=null&&t._isBuffer)}function Li(t,e){if(D(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 Cr(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Di(t).length;default:if(n)return Cr(t).length;e=(""+e).toLowerCase(),n=!0}}function of(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 mf(this,e,r);case"utf8":case"utf-8":return Mi(this,e,r);case"ascii":return df(this,e,r);case"latin1":case"binary":return yf(this,e,r);case"base64":return ff(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return hf(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 Ui(t,e,r,n,i){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=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof e=="string"&&(e=l.from(e,n)),D(e))return e.length===0?-1:Ni(t,e,r,n,i);if(typeof e=="number")return e=e&255,l.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Ni(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Ni(t,e,r,n,i){var o=1,u=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;o=2,u/=2,p/=2,r/=2}function c(w,R){return o===1?w[R]:w.readUInt16BE(R*o)}var v;if(i){var h=-1;for(v=r;v<u;v++)if(c(t,v)===c(e,h===-1?0:v-h)){if(h===-1&&(h=v),v-h+1===p)return h*o}else h!==-1&&(v-=v-h),h=-1}else for(r+p>u&&(r=u-p),v=r;v>=0;v--){for(var m=!0,x=0;x<p;x++)if(c(t,v+x)!==c(e,x)){m=!1;break}if(m)return v}return-1}function af(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var p=parseInt(e.substr(u*2,2),16);if(isNaN(p))return u;t[r+u]=p}return u}function sf(t,e,r,n){return Ur(Cr(e,t.length-r),t,r,n)}function Bi(t,e,r,n){return Ur(bf(e),t,r,n)}function uf(t,e,r,n){return Bi(t,e,r,n)}function lf(t,e,r,n){return Ur(Di(e),t,r,n)}function pf(t,e,r,n){return Ur(Af(e,t.length-r),t,r,n)}function ff(t,e,r){return e===0&&r===t.length?Pi(t):Pi(t.slice(e,r))}function Mi(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],u=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=r){var c,v,h,m;switch(p){case 1:o<128&&(u=o);break;case 2:c=t[i+1],(c&192)===128&&(m=(o&31)<<6|c&63,m>127&&(u=m));break;case 3:c=t[i+1],v=t[i+2],(c&192)===128&&(v&192)===128&&(m=(o&15)<<12|(c&63)<<6|v&63,m>2047&&(m<55296||m>57343)&&(u=m));break;case 4:c=t[i+1],v=t[i+2],h=t[i+3],(c&192)===128&&(v&192)===128&&(h&192)===128&&(m=(o&15)<<18|(c&63)<<12|(v&63)<<6|h&63,m>65535&&m<1114112&&(u=m))}}u===null?(u=65533,p=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=p}return cf(n)}function cf(t){var e=t.length;if(e<=Fi)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Fi));return r}function df(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}function yf(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function mf(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=wf(t[o]);return i}function hf(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}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,i,o){if(!D(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function kr(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function Lr(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>(n?i:3-i)*8&255}function qi(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function $i(t,e,r,n,i){return i||qi(t,e,r,4,34028234663852886e22,-34028234663852886e22),Wi(t,e,r,n,23,4),r+4}function _i(t,e,r,n,i){return i||qi(t,e,r,8,17976931348623157e292,-17976931348623157e292),Wi(t,e,r,n,52,8),r+8}function vf(t){if(t=xf(t).replace(gf,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function xf(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function wf(t){return t<16?"0"+t.toString(16):t.toString(16)}function Cr(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],u=0;u<n;++u){if(r=t.charCodeAt(u),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function bf(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function Af(t,e){for(var r,n,i,o=[],u=0;u<t.length&&!((e-=2)<0);++u)r=t.charCodeAt(u),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function Di(t){return Zp(vf(t))}function Ur(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Sf(t){return t!==t}function Tf(t){return t!=null&&(!!t._isBuffer||ji(t)||Rf(t))}function ji(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Rf(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&ji(t.slice(0,0))}function Br(t,e,r,n,i){var o,u,p=i*8-n-1,c=(1<<p)-1,v=c>>1,h=-7,m=r?i-1:0,x=r?-1:1,w=t[e+m];for(m+=x,o=w&(1<<-h)-1,w>>=-h,h+=p;h>0;o=o*256+t[e+m],m+=x,h-=8);for(u=o&(1<<-h)-1,o>>=-h,h+=n;h>0;u=u*256+t[e+m],m+=x,h-=8);if(o===0)o=1-v;else{if(o===c)return u?NaN:(w?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-v}return(w?-1:1)*u*Math.pow(2,o-n)}function Wi(t,e,r,n,i,o){var u,p,c,v=o*8-i-1,h=(1<<v)-1,m=h>>1,x=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:o-1,R=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,u=h):(u=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+m>=1?e+=x/c:e+=x*Math.pow(2,1-m),e*c>=2&&(u++,c/=2),u+m>=h?(p=0,u=h):u+m>=1?(p=(e*c-1)*Math.pow(2,i),u=u+m):(p=e*Math.pow(2,m-1)*Math.pow(2,i),u=0));i>=8;t[r+w]=p&255,w+=R,p/=256,i-=8);for(u=u<<i|p,v+=i;v>0;t[r+w]=u&255,w+=R,u/=256,v-=8);t[r+w-R]|=I*128}var _,q,Kp,Ut,Fi,gf,Gi=Oe(()=>{"use strict";a();s();_=[],q=[],Kp=typeof Uint8Array!="undefined"?Uint8Array:Array,Ut=!1;l.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;l.poolSize=8192;l._augment=function(t){return t.__proto__=l.prototype,t};l.from=function(t,e,r){return Ci(null,t,e,r)};l.kMaxLength=Or();l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&l[Symbol.species]);l.alloc=function(t,e,r){return ef(null,t,e,r)};l.allocUnsafe=function(t){return Bt(null,t)};l.allocUnsafeSlow=function(t){return Bt(null,t)};l.isBuffer=Tf;l.compare=function(e,r){if(!D(e)||!D(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,u=Math.min(n,i);o<u;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0};l.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}};l.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return l.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=l.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var u=e[n];if(!D(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i};l.byteLength=Li;l.prototype._isBuffer=!0;l.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};l.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};l.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};l.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Mi(this,0,e):of.apply(this,arguments)};l.prototype.equals=function(e){if(!D(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:l.compare(this,e)===0};l.prototype.compare=function(e,r,n,i,o){if(!D(e))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var u=o-i,p=n-r,c=Math.min(u,p),v=this.slice(i,o),h=e.slice(r,n),m=0;m<c;++m)if(v[m]!==h[m]){u=v[m],p=h[m];break}return u<p?-1:p<u?1:0};l.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};l.prototype.indexOf=function(e,r,n){return Ui(this,e,r,n,!0)};l.prototype.lastIndexOf=function(e,r,n){return Ui(this,e,r,n,!1)};l.prototype.write=function(e,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-r;if((n===void 0||n>o)&&(n=o),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var u=!1;;)switch(i){case"hex":return af(this,e,r,n);case"utf8":case"utf-8":return sf(this,e,r,n);case"ascii":return Bi(this,e,r,n);case"latin1":case"binary":return uf(this,e,r,n);case"base64":return lf(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pf(this,e,r,n);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}};l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Fi=4096;l.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 i;if(l.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=l.prototype;else{var o=r-e;i=new l(o,void 0);for(var u=0;u<o;++u)i[u]=this[u+e]}return i};l.prototype.readUIntLE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var i=this[e],o=1,u=0;++u<r&&(o*=256);)i+=this[e+u]*o;return i};l.prototype.readUIntBE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var i=this[e+--r],o=1;r>0&&(o*=256);)i+=this[e+--r]*o;return i};l.prototype.readUInt8=function(e,r){return r||F(e,1,this.length),this[e]};l.prototype.readUInt16LE=function(e,r){return r||F(e,2,this.length),this[e]|this[e+1]<<8};l.prototype.readUInt16BE=function(e,r){return r||F(e,2,this.length),this[e]<<8|this[e+1]};l.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};l.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])};l.prototype.readIntLE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var i=this[e],o=1,u=0;++u<r&&(o*=256);)i+=this[e+u]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*r)),i};l.prototype.readIntBE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var i=r,o=1,u=this[e+--i];i>0&&(o*=256);)u+=this[e+--i]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*r)),u};l.prototype.readInt8=function(e,r){return r||F(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};l.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};l.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};l.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};l.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]};l.prototype.readFloatLE=function(e,r){return r||F(e,4,this.length),Br(this,e,!0,23,4)};l.prototype.readFloatBE=function(e,r){return r||F(e,4,this.length),Br(this,e,!1,23,4)};l.prototype.readDoubleLE=function(e,r){return r||F(e,8,this.length),Br(this,e,!0,52,8)};l.prototype.readDoubleBE=function(e,r){return r||F(e,8,this.length),Br(this,e,!1,52,8)};l.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;U(this,e,r,n,o,0)}var u=1,p=0;for(this[r]=e&255;++p<n&&(u*=256);)this[r+p]=e/u&255;return r+n};l.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;U(this,e,r,n,o,0)}var u=n-1,p=1;for(this[r+u]=e&255;--u>=0&&(p*=256);)this[r+u]=e/p&255;return r+n};l.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=e&255,r+1};l.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):kr(this,e,r,!0),r+2};l.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):kr(this,e,r,!1),r+2};l.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255):Lr(this,e,r,!0),r+4};l.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):Lr(this,e,r,!1),r+4};l.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r|0,!i){var o=Math.pow(2,8*n-1);U(this,e,r,n,o-1,-o)}var u=0,p=1,c=0;for(this[r]=e&255;++u<n&&(p*=256);)e<0&&c===0&&this[r+u-1]!==0&&(c=1),this[r+u]=(e/p>>0)-c&255;return r+n};l.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r|0,!i){var o=Math.pow(2,8*n-1);U(this,e,r,n,o-1,-o)}var u=n-1,p=1,c=0;for(this[r+u]=e&255;--u>=0&&(p*=256);)e<0&&c===0&&this[r+u+1]!==0&&(c=1),this[r+u]=(e/p>>0)-c&255;return r+n};l.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=e&255,r+1};l.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):kr(this,e,r,!0),r+2};l.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):kr(this,e,r,!1),r+2};l.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):Lr(this,e,r,!0),r+4};l.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),l.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):Lr(this,e,r,!1),r+4};l.prototype.writeFloatLE=function(e,r,n){return $i(this,e,r,!0,n)};l.prototype.writeFloatBE=function(e,r,n){return $i(this,e,r,!1,n)};l.prototype.writeDoubleLE=function(e,r,n){return _i(this,e,r,!0,n)};l.prototype.writeDoubleBE=function(e,r,n){return _i(this,e,r,!1,n)};l.prototype.copy=function(e,r,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===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(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o=i-n,u;if(this===e&&n<r&&r<i)for(u=o-1;u>=0;--u)e[u+r]=this[u+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(u=0;u<o;++u)e[u+r]=this[u+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),r);return o};l.prototype.fill=function(e,r,n,i){if(typeof e=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),e.length===1){var o=e.charCodeAt(0);o<256&&(e=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}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 u;if(typeof e=="number")for(u=r;u<n;++u)this[u]=e;else{var p=D(e)?e:Cr(new l(e,i).toString()),c=p.length;for(u=0;u<n-r;++u)this[u+r]=p[u%c]}return this};gf=/[^+\/0-9A-Za-z-_]/g});var s=Oe(()=>{"use strict";Gi()});var Yi=y((Nv,zi)=>{"use strict";a();s();var Ef="Function.prototype.bind called on incompatible ",If=Object.prototype.toString,Pf=Math.max,Nf="[object Function]",Vi=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var o=0;o<r.length;o+=1)n[o+e.length]=r[o];return n},Ff=function(e,r){for(var n=[],i=r||0,o=0;i<e.length;i+=1,o+=1)n[o]=e[i];return n},Of=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};zi.exports=function(e){var r=this;if(typeof r!="function"||If.apply(r)!==Nf)throw new TypeError(Ef+r);for(var n=Ff(arguments,1),i,o=function(){if(this instanceof i){var h=r.apply(this,Vi(n,arguments));return Object(h)===h?h:this}return r.apply(e,Vi(n,arguments))},u=Pf(0,r.length-n.length),p=[],c=0;c<u;c++)p[c]="$"+c;if(i=Function("binder","return function ("+Of(p,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var v=function(){};v.prototype=r.prototype,i.prototype=new v,v.prototype=null}return i}});var de=y((Cv,Hi)=>{"use strict";a();s();var Cf=Yi();Hi.exports=Function.prototype.bind||Cf});var qt=y((Uv,Ji)=>{"use strict";a();s();Ji.exports=Error});var $t=y((qv,Ki)=>{"use strict";a();s();Ki.exports=EvalError});var _t=y((Dv,Zi)=>{"use strict";a();s();Zi.exports=RangeError});var Dt=y((Gv,Xi)=>{"use strict";a();s();Xi.exports=ReferenceError});var Mr=y((Yv,Qi)=>{"use strict";a();s();Qi.exports=SyntaxError});var N=y((Kv,eo)=>{"use strict";a();s();eo.exports=TypeError});var jt=y((Qv,ro)=>{"use strict";a();s();ro.exports=URIError});var no=y((tx,to)=>{"use strict";a();s();to.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 i=42;e[r]=i;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 o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,r);if(u.value!==i||u.enumerable!==!0)return!1}return!0}});var Wt=y((ox,oo)=>{"use strict";a();s();var io=typeof Symbol!="undefined"&&Symbol,kf=no();oo.exports=function(){return typeof io!="function"||typeof Symbol!="function"||typeof io("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:kf()}});var so=y((ux,ao)=>{"use strict";a();s();var Gt={__proto__:null,foo:{}},Lf=Object;ao.exports=function(){return{__proto__:Gt}.foo===Gt.foo&&!(Gt instanceof Lf)}});var Vt=y((fx,uo)=>{"use strict";a();s();var Uf=Function.prototype.call,Bf=Object.prototype.hasOwnProperty,Mf=de();uo.exports=Mf.call(Uf,Bf)});var j=y((yx,yo)=>{"use strict";a();s();var b,qf=qt(),$f=$t(),_f=_t(),Df=Dt(),Me=Mr(),Be=N(),jf=jt(),co=Function,zt=function(t){try{return co('"use strict"; return ('+t+").constructor;")()}catch(e){}},ye=Object.getOwnPropertyDescriptor;if(ye)try{ye({},"")}catch(t){ye=null}var Yt=function(){throw new Be},Wf=ye?function(){try{return arguments.callee,Yt}catch(t){try{return ye(arguments,"callee").get}catch(e){return Yt}}}():Yt,Le=Wt()(),Gf=so()(),O=Object.getPrototypeOf||(Gf?function(t){return t.__proto__}:null),Ue={},Vf=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%":Le&&O?O([][Symbol.iterator]()):b,"%AsyncFromSyncIteratorPrototype%":b,"%AsyncFunction%":Ue,"%AsyncGenerator%":Ue,"%AsyncGeneratorFunction%":Ue,"%AsyncIteratorPrototype%":Ue,"%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%":qf,"%eval%":eval,"%EvalError%":$f,"%Float32Array%":typeof Float32Array=="undefined"?b:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?b:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?b:FinalizationRegistry,"%Function%":co,"%GeneratorFunction%":Ue,"%Int8Array%":typeof Int8Array=="undefined"?b:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?b:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?b:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Le&&O?O(O([][Symbol.iterator]())):b,"%JSON%":typeof JSON=="object"?JSON:b,"%Map%":typeof Map=="undefined"?b:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Le||!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%":_f,"%ReferenceError%":Df,"%Reflect%":typeof Reflect=="undefined"?b:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?b:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Le||!O?b:O(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?b:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Le&&O?O(""[Symbol.iterator]()):b,"%Symbol%":Le?Symbol:b,"%SyntaxError%":Me,"%ThrowTypeError%":Wf,"%TypedArray%":Vf,"%TypeError%":Be,"%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%":jf,"%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){lo=O(O(t)),me["%Error.prototype%"]=lo}var lo,zf=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 i=t("%AsyncGenerator%");i&&O&&(r=O(i.prototype))}return me[e]=r,r},po={__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"]},Ze=de(),qr=Vt(),Yf=Ze.call(Function.call,Array.prototype.concat),Hf=Ze.call(Function.apply,Array.prototype.splice),fo=Ze.call(Function.call,String.prototype.replace),$r=Ze.call(Function.call,String.prototype.slice),Jf=Ze.call(Function.call,RegExp.prototype.exec),Kf=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Zf=/\\(\\)?/g,Xf=function(e){var r=$r(e,0,1),n=$r(e,-1);if(r==="%"&&n!=="%")throw new Me("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Me("invalid intrinsic syntax, expected opening `%`");var i=[];return fo(e,Kf,function(o,u,p,c){i[i.length]=p?fo(c,Zf,"$1"):u||o}),i},Qf=function(e,r){var n=e,i;if(qr(po,n)&&(i=po[n],n="%"+i[0]+"%"),qr(me,n)){var o=me[n];if(o===Ue&&(o=zf(n)),typeof o=="undefined"&&!r)throw new Be("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new Me("intrinsic "+e+" does not exist!")};yo.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Be("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Be('"allowMissing" argument must be a boolean');if(Jf(/^%?[^%]*%?$/,e)===null)throw new Me("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Xf(e),i=n.length>0?n[0]:"",o=Qf("%"+i+"%",r),u=o.name,p=o.value,c=!1,v=o.alias;v&&(i=v[0],Hf(n,Yf([0,1],v)));for(var h=1,m=!0;h<n.length;h+=1){var x=n[h],w=$r(x,0,1),R=$r(x,-1);if((w==='"'||w==="'"||w==="`"||R==='"'||R==="'"||R==="`")&&w!==R)throw new Me("property names with quotes must have matching quotes");if((x==="constructor"||!m)&&(c=!0),i+="."+x,u="%"+i+"%",qr(me,u))p=me[u];else if(p!=null){if(!(x in p)){if(!r)throw new Be("base intrinsic for "+e+" exists, but the property is not available.");return}if(ye&&h+1>=n.length){var I=ye(p,x);m=!!I,m&&"get"in I&&!("originalValue"in I.get)?p=I.get:p=p[x]}else m=qr(p,x),p=p[x];m&&!c&&(me[u]=p)}}return p}});var Ht=y((gx,mo)=>{"use strict";a();s();mo.exports=Object});var go=y((wx,ho)=>{"use strict";a();s();ho.exports=Math.abs});var xo=y((Sx,vo)=>{"use strict";a();s();vo.exports=Math.floor});var bo=y((Ex,wo)=>{"use strict";a();s();wo.exports=Math.max});var So=y((Nx,Ao)=>{"use strict";a();s();Ao.exports=Math.min});var Ro=y((Cx,To)=>{"use strict";a();s();To.exports=Math.pow});var Io=y((Ux,Eo)=>{"use strict";a();s();Eo.exports=Math.round});var No=y((qx,Po)=>{"use strict";a();s();Po.exports=Number.isNaN||function(e){return e!==e}});var Oo=y((Dx,Fo)=>{"use strict";a();s();var ec=No();Fo.exports=function(e){return ec(e)||e===0?e:e<0?-1:1}});var ko=y((Gx,Co)=>{"use strict";a();s();Co.exports=Object.getOwnPropertyDescriptor});var Xe=y((Yx,Lo)=>{"use strict";a();s();var _r=ko();if(_r)try{_r([],"length")}catch(t){_r=null}Lo.exports=_r});var jr=y((Kx,Uo)=>{"use strict";a();s();var Dr=Object.defineProperty||!1;if(Dr)try{Dr({},"a",{value:1})}catch(t){Dr=!1}Uo.exports=Dr});var Jt=y((Qx,Bo)=>{"use strict";a();s();Bo.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 i=42;e[r]=i;for(var o 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 u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(e,r);if(p.value!==i||p.enumerable!==!0)return!1}return!0}});var $o=y((t0,qo)=>{"use strict";a();s();var Mo=typeof Symbol!="undefined"&&Symbol,rc=Jt();qo.exports=function(){return typeof Mo!="function"||typeof Symbol!="function"||typeof Mo("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:rc()}});var Kt=y((o0,_o)=>{"use strict";a();s();_o.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Zt=y((u0,Do)=>{"use strict";a();s();var tc=Ht();Do.exports=tc.getPrototypeOf||null});var Wr=y((f0,jo)=>{"use strict";a();s();jo.exports=Function.prototype.call});var Xt=y((y0,Wo)=>{"use strict";a();s();Wo.exports=Function.prototype.apply});var Vo=y((g0,Go)=>{"use strict";a();s();Go.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Yo=y((w0,zo)=>{"use strict";a();s();var nc=de(),ic=Xt(),oc=Wr(),ac=Vo();zo.exports=ac||nc.call(oc,ic)});var Jo=y((S0,Ho)=>{"use strict";a();s();var sc=de(),uc=N(),lc=Wr(),pc=Yo();Ho.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new uc("a function is required");return pc(sc,lc,e)}});var ra=y((E0,ea)=>{"use strict";a();s();var fc=Jo(),Ko=Xe(),Xo;try{Xo=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Qt=!!Xo&&Ko&&Ko(Object.prototype,"__proto__"),Qo=Object,Zo=Qo.getPrototypeOf;ea.exports=Qt&&typeof Qt.get=="function"?fc([Qt.get]):typeof Zo=="function"?function(e){return Zo(e==null?e:Qo(e))}:!1});var aa=y((N0,oa)=>{"use strict";a();s();var ta=Kt(),na=Zt(),ia=ra();oa.exports=ta?function(e){return ta(e)}:na?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return na(e)}:ia?function(e){return ia(e)}:null});var tn=y((C0,ca)=>{"use strict";a();s();var A,cc=Ht(),dc=qt(),yc=$t(),mc=_t(),hc=Dt(),De=Mr(),_e=N(),gc=jt(),vc=go(),xc=xo(),wc=bo(),bc=So(),Ac=Ro(),Sc=Io(),Tc=Oo(),pa=Function,en=function(t){try{return pa('"use strict"; return ('+t+").constructor;")()}catch(e){}},Qe=Xe(),Rc=jr(),rn=function(){throw new _e},Ec=Qe?function(){try{return arguments.callee,rn}catch(t){try{return Qe(arguments,"callee").get}catch(e){return rn}}}():rn,qe=$o()(),C=aa(),Ic=Zt(),Pc=Kt(),fa=Xt(),er=Wr(),$e={},Nc=typeof Uint8Array=="undefined"||!C?A:C(Uint8Array),he={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?A:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?A:ArrayBuffer,"%ArrayIteratorPrototype%":qe&&C?C([][Symbol.iterator]()):A,"%AsyncFromSyncIteratorPrototype%":A,"%AsyncFunction%":$e,"%AsyncGenerator%":$e,"%AsyncGeneratorFunction%":$e,"%AsyncIteratorPrototype%":$e,"%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%":dc,"%eval%":eval,"%EvalError%":yc,"%Float32Array%":typeof Float32Array=="undefined"?A:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?A:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?A:FinalizationRegistry,"%Function%":pa,"%GeneratorFunction%":$e,"%Int8Array%":typeof Int8Array=="undefined"?A:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?A:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?A:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":qe&&C?C(C([][Symbol.iterator]())):A,"%JSON%":typeof JSON=="object"?JSON:A,"%Map%":typeof Map=="undefined"?A:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!qe||!C?A:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":cc,"%Object.getOwnPropertyDescriptor%":Qe,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?A:Promise,"%Proxy%":typeof Proxy=="undefined"?A:Proxy,"%RangeError%":mc,"%ReferenceError%":hc,"%Reflect%":typeof Reflect=="undefined"?A:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?A:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!qe||!C?A:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?A:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":qe&&C?C(""[Symbol.iterator]()):A,"%Symbol%":qe?Symbol:A,"%SyntaxError%":De,"%ThrowTypeError%":Ec,"%TypedArray%":Nc,"%TypeError%":_e,"%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%":gc,"%WeakMap%":typeof WeakMap=="undefined"?A:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?A:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?A:WeakSet,"%Function.prototype.call%":er,"%Function.prototype.apply%":fa,"%Object.defineProperty%":Rc,"%Object.getPrototypeOf%":Ic,"%Math.abs%":vc,"%Math.floor%":xc,"%Math.max%":wc,"%Math.min%":bc,"%Math.pow%":Ac,"%Math.round%":Sc,"%Math.sign%":Tc,"%Reflect.getPrototypeOf%":Pc};if(C)try{null.error}catch(t){sa=C(C(t)),he["%Error.prototype%"]=sa}var sa,Fc=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 i=t("%AsyncGenerator%");i&&C&&(r=C(i.prototype))}return he[e]=r,r},ua={__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"]},rr=de(),Gr=Vt(),Oc=rr.call(er,Array.prototype.concat),Cc=rr.call(fa,Array.prototype.splice),la=rr.call(er,String.prototype.replace),Vr=rr.call(er,String.prototype.slice),kc=rr.call(er,RegExp.prototype.exec),Lc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Uc=/\\(\\)?/g,Bc=function(e){var r=Vr(e,0,1),n=Vr(e,-1);if(r==="%"&&n!=="%")throw new De("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new De("invalid intrinsic syntax, expected opening `%`");var i=[];return la(e,Lc,function(o,u,p,c){i[i.length]=p?la(c,Uc,"$1"):u||o}),i},Mc=function(e,r){var n=e,i;if(Gr(ua,n)&&(i=ua[n],n="%"+i[0]+"%"),Gr(he,n)){var o=he[n];if(o===$e&&(o=Fc(n)),typeof o=="undefined"&&!r)throw new _e("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new De("intrinsic "+e+" does not exist!")};ca.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new _e("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new _e('"allowMissing" argument must be a boolean');if(kc(/^%?[^%]*%?$/,e)===null)throw new De("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Bc(e),i=n.length>0?n[0]:"",o=Mc("%"+i+"%",r),u=o.name,p=o.value,c=!1,v=o.alias;v&&(i=v[0],Cc(n,Oc([0,1],v)));for(var h=1,m=!0;h<n.length;h+=1){var x=n[h],w=Vr(x,0,1),R=Vr(x,-1);if((w==='"'||w==="'"||w==="`"||R==='"'||R==="'"||R==="`")&&w!==R)throw new De("property names with quotes must have matching quotes");if((x==="constructor"||!m)&&(c=!0),i+="."+x,u="%"+i+"%",Gr(he,u))p=he[u];else if(p!=null){if(!(x in p)){if(!r)throw new _e("base intrinsic for "+e+" exists, but the property is not available.");return}if(Qe&&h+1>=n.length){var I=Qe(p,x);m=!!I,m&&"get"in I&&!("originalValue"in I.get)?p=I.get:p=p[x]}else m=Gr(p,x),p=p[x];m&&!c&&(he[u]=p)}}return p}});var nn=y((U0,ma)=>{"use strict";a();s();var da=jr(),qc=Mr(),je=N(),ya=Xe();ma.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new je("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new je("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new je("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new je("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new je("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new je("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,c=!!ya&&ya(e,r);if(da)da(e,r,{configurable:u===null&&c?c.configurable:!u,enumerable:i===null&&c?c.enumerable:!i,value:n,writable:o===null&&c?c.writable:!o});else if(p||!i&&!o&&!u)e[r]=n;else throw new qc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var an=y((q0,ga)=>{"use strict";a();s();var on=jr(),ha=function(){return!!on};ha.hasArrayLengthDefineBug=function(){if(!on)return null;try{return on([],"length",{value:1}).length!==1}catch(e){return!0}};ga.exports=ha});var Aa=y((D0,ba)=>{"use strict";a();s();var $c=tn(),va=nn(),_c=an()(),xa=Xe(),wa=N(),Dc=$c("%Math.floor%");ba.exports=function(e,r){if(typeof e!="function")throw new wa("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Dc(r)!==r)throw new wa("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&xa){var u=xa(e,"length");u&&!u.configurable&&(i=!1),u&&!u.writable&&(o=!1)}return(i||o||!n)&&(_c?va(e,"length",r,!0,!0):va(e,"length",r)),e}});var Ta=y((G0,Sa)=>{"use strict";a();s();var jc=tn(),zr=jc("%Object.defineProperty%",!0)||!1;if(zr)try{zr({},"a",{value:1})}catch(t){zr=!1}Sa.exports=zr});var Jr=y((Y0,Yr)=>{"use strict";a();s();var sn=de(),Hr=j(),Wc=Aa(),Gc=N(),Ia=Hr("%Function.prototype.apply%"),Pa=Hr("%Function.prototype.call%"),Na=Hr("%Reflect.apply%",!0)||sn.call(Pa,Ia),Ra=Ta(),Vc=Hr("%Math.max%");Yr.exports=function(e){if(typeof e!="function")throw new Gc("a function is required");var r=Na(sn,Pa,arguments);return Wc(r,1+Vc(0,e.length-(arguments.length-1)),!0)};var Ea=function(){return Na(sn,Ia,arguments)};Ra?Ra(Yr.exports,"apply",{value:Ea}):Yr.exports.apply=Ea});var un=y((K0,Oa)=>{"use strict";a();s();var Fa=Object.prototype.toString;Oa.exports=function(e){var r=Fa.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Fa.call(e.callee)==="[object Function]"),n}});var _a=y((Q0,$a)=>{"use strict";a();s();var qa;Object.keys||(tr=Object.prototype.hasOwnProperty,ln=Object.prototype.toString,Ca=un(),pn=Object.prototype.propertyIsEnumerable,ka=!pn.call({toString:null},"toString"),La=pn.call(function(){},"prototype"),nr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Kr=function(t){var e=t.constructor;return e&&e.prototype===t},Ua={$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},Ba=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!Ua["$"+t]&&tr.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{Kr(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),Ma=function(t){if(typeof window=="undefined"||!Ba)return Kr(t);try{return Kr(t)}catch(e){return!1}},qa=function(e){var r=e!==null&&typeof e=="object",n=ln.call(e)==="[object Function]",i=Ca(e),o=r&&ln.call(e)==="[object String]",u=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var p=La&&n;if(o&&e.length>0&&!tr.call(e,0))for(var c=0;c<e.length;++c)u.push(String(c));if(i&&e.length>0)for(var v=0;v<e.length;++v)u.push(String(v));else for(var h in e)!(p&&h==="prototype")&&tr.call(e,h)&&u.push(String(h));if(ka)for(var m=Ma(e),x=0;x<nr.length;++x)!(m&&nr[x]==="constructor")&&tr.call(e,nr[x])&&u.push(nr[x]);return u});var tr,ln,Ca,pn,ka,La,nr,Kr,Ua,Ba,Ma;$a.exports=qa});var Ga=y((tw,Wa)=>{"use strict";a();s();var zc=Array.prototype.slice,Yc=un(),Da=Object.keys,Zr=Da?function(e){return Da(e)}:_a(),ja=Object.keys;Zr.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 Yc(n)?ja(zc.call(n)):ja(n)})}else Object.keys=Zr;return Object.keys||Zr};Wa.exports=Zr});var ir=y((ow,Ha)=>{"use strict";a();s();var Hc=Ga(),Jc=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Kc=Object.prototype.toString,Zc=Array.prototype.concat,Va=nn(),Xc=function(t){return typeof t=="function"&&Kc.call(t)==="[object Function]"},za=an()(),Qc=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!Xc(n)||!n())return}za?Va(t,e,r,!0):Va(t,e,r)},Ya=function(t,e){var r=arguments.length>2?arguments[2]:{},n=Hc(e);Jc&&(n=Zc.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i<n.length;i+=1)Qc(t,n[i],e[n[i]],r[n[i]])};Ya.supportsDescriptors=!!za;Ha.exports=Ya});var $=y((uw,Za)=>{"use strict";a();s();var Ja=j(),Ka=Jr(),ed=Ka(Ja("String.prototype.indexOf"));Za.exports=function(e,r){var n=Ja(e,!!r);return typeof n=="function"&&ed(e,".prototype.")>-1?Ka(n):n}});var es=y((fw,Qa)=>{"use strict";a();s();var rd=j(),Xa=rd("%Array%"),td=!Xa.isArray&&$()("Object.prototype.toString");Qa.exports=Xa.isArray||function(e){return td(e)==="[object Array]"}});var fn=y((yw,rs)=>{"use strict";a();s();rs.exports=es()});var ns=y((gw,ts)=>{"use strict";a();s();var nd=j(),id=$(),od=N(),ad=fn(),sd=nd("%Reflect.apply%",!0)||id("Function.prototype.apply");ts.exports=function(e,r){var n=arguments.length>2?arguments[2]:[];if(!ad(n))throw new od("Assertion failed: optional `argumentsList`, if provided, must be a List");return sd(e,r,n)}});function is(){throw new Error("setTimeout has not been defined")}function os(){throw new Error("clearTimeout has not been defined")}function as(t){if(ie===setTimeout)return setTimeout(t,0);if((ie===is||!ie)&&setTimeout)return ie=setTimeout,setTimeout(t,0);try{return ie(t,0)}catch(e){try{return ie.call(null,t,0)}catch(r){return ie.call(this,t,0)}}}function ud(t){if(oe===clearTimeout)return clearTimeout(t);if((oe===os||!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 ld(){!Ge||!ge||(Ge=!1,ge.length?Z=ge.concat(Z):Xr=-1,Z.length&&ss())}function ss(){if(!Ge){var t=as(ld);Ge=!0;for(var e=Z.length;e;){for(ge=Z,Z=[];++Xr<e;)ge&&ge[Xr].run();Xr=-1,e=Z.length}ge=null,Ge=!1,ud(t)}}function pd(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 us(t,e)),Z.length===1&&!Ge&&as(ss)}function us(t,e){this.fun=t,this.array=e}function ve(){}function Id(t){throw new Error("process.binding is not supported")}function Pd(){return"/"}function Nd(t){throw new Error("process.chdir is not supported")}function Fd(){return 0}function Cd(t){var e=Od.call(We)*.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 Ld(){var t=new Date,e=t-kd;return e/1e3}var ie,oe,Z,Ge,ge,Xr,fd,cd,dd,yd,md,hd,gd,vd,xd,wd,bd,Ad,Sd,Td,Rd,Ed,We,Od,kd,Ud,or,ls=Oe(()=>{"use strict";a();s();ie=is,oe=os;typeof globalThis.setTimeout=="function"&&(ie=setTimeout);typeof globalThis.clearTimeout=="function"&&(oe=clearTimeout);Z=[],Ge=!1,Xr=-1;us.prototype.run=function(){this.fun.apply(null,this.array)};fd="browser",cd="browser",dd=!0,yd={},md=[],hd="",gd={},vd={},xd={};wd=ve,bd=ve,Ad=ve,Sd=ve,Td=ve,Rd=ve,Ed=ve;We=globalThis.performance||{},Od=We.now||We.mozNow||We.msNow||We.oNow||We.webkitNow||function(){return new Date().getTime()};kd=new Date;Ud={nextTick:pd,title:fd,browser:dd,env:yd,argv:md,version:hd,versions:gd,on:wd,addListener:bd,once:Ad,off:Sd,removeListener:Td,removeAllListeners:Rd,emit:Ed,binding:Id,cwd:Pd,chdir:Nd,umask:Fd,hrtime:Cd,platform:cd,release:vd,config:xd,uptime:Ld},or=Ud});var cn,dn,ps=Oe(()=>{"use strict";a();s();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};dn=cn});var vs={};kt(vs,{_extend:()=>An,debuglog:()=>fs,default:()=>Vd,deprecate:()=>vn,format:()=>tt,inherits:()=>dn,inspect:()=>G,isArray:()=>xn,isBoolean:()=>nt,isBuffer:()=>ms,isDate:()=>rt,isError:()=>sr,isFunction:()=>ur,isNull:()=>lr,isNullOrUndefined:()=>cs,isNumber:()=>wn,isObject:()=>xe,isPrimitive:()=>ys,isRegExp:()=>ar,isString:()=>pr,isSymbol:()=>ds,isUndefined:()=>W,log:()=>hs});function tt(t){if(!pr(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(G(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,i=n.length,o=String(t).replace(Bd,function(p){if(p==="%%")return"%";if(r>=i)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}}),u=n[r];r<i;u=n[++r])lr(u)||!xe(u)?o+=" "+u:o+=" "+G(u);return o}function vn(t,e){if(W(globalThis.process))return function(){return vn(t,e).apply(this,arguments)};if(or.noDeprecation===!0)return t;var r=!1;function n(){if(!r){if(or.throwDeprecation)throw new Error(e);or.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n}function fs(t){if(W(yn)&&(yn=or.env.NODE_DEBUG||""),t=t.toUpperCase(),!Qr[t])if(new RegExp("\\b"+t+"\\b","i").test(yn)){var e=0;Qr[t]=function(){var r=tt.apply(null,arguments);console.error("%s %d: %s",t,e,r)}}else Qr[t]=function(){};return Qr[t]}function G(t,e){var r={seen:[],stylize:qd};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),nt(e)?r.showHidden=e:e&&An(r,e),W(r.showHidden)&&(r.showHidden=!1),W(r.depth)&&(r.depth=2),W(r.colors)&&(r.colors=!1),W(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Md),et(r,t,r.depth)}function Md(t,e){var r=G.styles[e];return r?"\x1B["+G.colors[r][0]+"m"+t+"\x1B["+G.colors[r][1]+"m":t}function qd(t,e){return t}function $d(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function et(t,e,r){if(t.customInspect&&e&&ur(e.inspect)&&e.inspect!==G&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return pr(n)||(n=et(t,n,r)),n}var i=_d(t,e);if(i)return i;var o=Object.keys(e),u=$d(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),sr(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return mn(e);if(o.length===0){if(ur(e)){var p=e.name?": "+e.name:"";return t.stylize("[Function"+p+"]","special")}if(ar(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(rt(e))return t.stylize(Date.prototype.toString.call(e),"date");if(sr(e))return mn(e)}var c="",v=!1,h=["{","}"];if(xn(e)&&(v=!0,h=["[","]"]),ur(e)){var m=e.name?": "+e.name:"";c=" [Function"+m+"]"}if(ar(e)&&(c=" "+RegExp.prototype.toString.call(e)),rt(e)&&(c=" "+Date.prototype.toUTCString.call(e)),sr(e)&&(c=" "+mn(e)),o.length===0&&(!v||e.length==0))return h[0]+c+h[1];if(r<0)return ar(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var x;return v?x=Dd(t,e,r,u,o):x=o.map(function(w){return gn(t,e,r,u,w,v)}),t.seen.pop(),jd(x,c,h)}function _d(t,e){if(W(e))return t.stylize("undefined","undefined");if(pr(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(nt(e))return t.stylize(""+e,"boolean");if(lr(e))return t.stylize("null","null")}function mn(t){return"["+Error.prototype.toString.call(t)+"]"}function Dd(t,e,r,n,i){for(var o=[],u=0,p=e.length;u<p;++u)gs(e,String(u))?o.push(gn(t,e,r,n,String(u),!0)):o.push("");return i.forEach(function(c){c.match(/^\d+$/)||o.push(gn(t,e,r,n,c,!0))}),o}function gn(t,e,r,n,i,o){var u,p,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?c.set?p=t.stylize("[Getter/Setter]","special"):p=t.stylize("[Getter]","special"):c.set&&(p=t.stylize("[Setter]","special")),gs(n,i)||(u="["+i+"]"),p||(t.seen.indexOf(c.value)<0?(lr(r)?p=et(t,c.value,null):p=et(t,c.value,r-1),p.indexOf(`
|
|
2
|
-
`)>-1&&(
|
|
3
|
-
`).map(function(
|
|
4
|
-
`).substr(2):
|
|
5
|
-
`+
|
|
6
|
-
`).map(function(
|
|
7
|
-
`))):
|
|
8
|
-
`)>=0&&n++,o
|
|
9
|
-
`)+" "+
|
|
10
|
-
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function xn(t){return Array.isArray(t)}function nt(t){return typeof t=="boolean"}function lr(t){return t===null}function cs(t){return t==null}function wn(t){return typeof t=="number"}function pr(t){return typeof t=="string"}function ds(t){return typeof t=="symbol"}function W(t){return t===void 0}function ar(t){return xe(t)&&bn(t)==="[object RegExp]"}function xe(t){return typeof t=="object"&&t!==null}function rt(t){return xe(t)&&bn(t)==="[object Date]"}function sr(t){return xe(t)&&(bn(t)==="[object Error]"||t instanceof Error)}function ur(t){return typeof t=="function"}function ys(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function ms(t){return l.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 Gd(){var t=new Date,e=[hn(t.getHours()),hn(t.getMinutes()),hn(t.getSeconds())].join(":");return[t.getDate(),Wd[t.getMonth()],e].join(" ")}function hs(){console.log("%s - %s",Gd(),tt.apply(null,arguments))}function An(t,e){if(!e||!xe(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}function gs(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Bd,Qr,yn,Wd,Vd,xs=Oe(()=>{"use strict";a();s();ls();ps();Bd=/%[sdj%]/g;Qr={};G.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]};G.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};Wd=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Vd={inherits:dn,_extend:An,log:hs,isBuffer:ms,isPrimitive:ys,isFunction:ur,isError:sr,isDate:rt,isObject:xe,isRegExp:ar,isUndefined:W,isSymbol:ds,isString:pr,isNumber:wn,isNullOrUndefined:cs,isNull:lr,isBoolean:nt,isArray:xn,inspect:G,deprecate:vn,format:tt,debuglog:fs}});var ws=y((Fw,it)=>{"use strict";a();s();var we=(xs(),bi(vs));if(we&&we.default){it.exports=we.default;for(let t in we)it.exports[t]=we[t]}else we&&(it.exports=we)});var As=y((kw,bs)=>{"use strict";a();s();bs.exports=ws().inspect});var yr=y((Bw,js)=>{"use strict";a();s();var Cn=typeof Map=="function"&&Map.prototype,Sn=Object.getOwnPropertyDescriptor&&Cn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,at=Cn&&Sn&&typeof Sn.get=="function"?Sn.get:null,Ss=Cn&&Map.prototype.forEach,kn=typeof Set=="function"&&Set.prototype,Tn=Object.getOwnPropertyDescriptor&&kn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,st=kn&&Tn&&typeof Tn.get=="function"?Tn.get:null,Ts=kn&&Set.prototype.forEach,zd=typeof WeakMap=="function"&&WeakMap.prototype,cr=zd?WeakMap.prototype.has:null,Yd=typeof WeakSet=="function"&&WeakSet.prototype,dr=Yd?WeakSet.prototype.has:null,Hd=typeof WeakRef=="function"&&WeakRef.prototype,Rs=Hd?WeakRef.prototype.deref:null,Jd=Boolean.prototype.valueOf,Kd=Object.prototype.toString,Zd=Function.prototype.toString,Xd=String.prototype.match,Ln=String.prototype.slice,ae=String.prototype.replace,Qd=String.prototype.toUpperCase,Es=String.prototype.toLowerCase,Us=RegExp.prototype.test,Is=Array.prototype.concat,V=Array.prototype.join,ey=Array.prototype.slice,Ps=Math.floor,In=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Rn=Object.getOwnPropertySymbols,Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ve=typeof Symbol=="function"&&typeof Symbol.iterator=="object",k=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ve||!0)?Symbol.toStringTag:null,Bs=Object.prototype.propertyIsEnumerable,Ns=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Fs(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Us.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Ps(-t):Ps(t);if(n!==t){var i=String(n),o=Ln.call(e,i.length+1);return ae.call(i,r,"$&_")+"."+ae.call(ae.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ae.call(e,r,"$&_")}var Nn=As(),Os=Nn.custom,Cs=$s(Os)?Os:null,Ms={__proto__:null,double:'"',single:"'"},ry={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};js.exports=function t(e,r,n,i){var o=r||{};if(X(o,"quoteStyle")&&!X(Ms,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(X(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=X(o,"customInspect")?o.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(X(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(X(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=o.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 Ds(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return p?Fs(e,c):c}if(typeof e=="bigint"){var v=String(e)+"n";return p?Fs(e,v):v}var h=typeof o.depth=="undefined"?5:o.depth;if(typeof n=="undefined"&&(n=0),n>=h&&h>0&&typeof e=="object")return Fn(e)?"[Array]":"[Object]";var m=xy(o,n);if(typeof i=="undefined")i=[];else if(_s(i,e)>=0)return"[Circular]";function x(Fe,Pr,mp){if(Pr&&(i=ey.call(i),i.push(Pr)),mp){var yi={depth:o.depth};return X(o,"quoteStyle")&&(yi.quoteStyle=o.quoteStyle),t(Fe,yi,n+1,i)}return t(Fe,o,n+1,i)}if(typeof e=="function"&&!ks(e)){var w=py(e),R=ot(e,x);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(R.length>0?" { "+V.call(R,", ")+" }":"")}if($s(e)){var I=Ve?ae.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Pn.call(e);return typeof e=="object"&&!Ve?fr(I):I}if(hy(e)){for(var L="<"+Es.call(String(e.nodeName)),M=e.attributes||[],H=0;H<M.length;H++)L+=" "+M[H].name+"="+qs(ty(M[H].value),"double",o);return L+=">",e.childNodes&&e.childNodes.length&&(L+="..."),L+="</"+Es.call(String(e.nodeName))+">",L}if(Fn(e)){if(e.length===0)return"[]";var le=ot(e,x);return m&&!vy(le)?"["+On(le,m)+"]":"[ "+V.call(le,", ")+" ]"}if(iy(e)){var Je=ot(e,x);return!("cause"in Error.prototype)&&"cause"in e&&!Bs.call(e,"cause")?"{ ["+String(e)+"] "+V.call(Is.call("[cause]: "+x(e.cause),Je),", ")+" }":Je.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+V.call(Je,", ")+" }"}if(typeof e=="object"&&u){if(Cs&&typeof e[Cs]=="function"&&Nn)return Nn(e,{depth:h-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(fy(e)){var Ir=[];return Ss&&Ss.call(e,function(Fe,Pr){Ir.push(x(Pr,e,!0)+" => "+x(Fe,e))}),Ls("Map",at.call(e),Ir,m)}if(yy(e)){var fi=[];return Ts&&Ts.call(e,function(Fe){fi.push(x(Fe,e))}),Ls("Set",st.call(e),fi,m)}if(cy(e))return En("WeakMap");if(my(e))return En("WeakSet");if(dy(e))return En("WeakRef");if(ay(e))return fr(x(Number(e)));if(uy(e))return fr(x(In.call(e)));if(sy(e))return fr(Jd.call(e));if(oy(e))return fr(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(!ny(e)&&!ks(e)){var Pt=ot(e,x),ci=Ns?Ns(e)===Object.prototype:e instanceof Object||e.constructor===Object,Nt=e instanceof Object?"":"null prototype",di=!ci&&k&&Object(e)===e&&k in e?Ln.call(se(e),8,-1):Nt?"Object":"",yp=ci||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Ft=yp+(di||Nt?"["+V.call(Is.call([],di||[],Nt||[]),": ")+"] ":"");return Pt.length===0?Ft+"{}":m?Ft+"{"+On(Pt,m)+"}":Ft+"{ "+V.call(Pt,", ")+" }"}return String(e)};function qs(t,e,r){var n=r.quoteStyle||e,i=Ms[n];return i+t+i}function ty(t){return ae.call(String(t),/"/g,""")}function Fn(t){return se(t)==="[object Array]"&&(!k||!(typeof t=="object"&&k in t))}function ny(t){return se(t)==="[object Date]"&&(!k||!(typeof t=="object"&&k in t))}function ks(t){return se(t)==="[object RegExp]"&&(!k||!(typeof t=="object"&&k in t))}function iy(t){return se(t)==="[object Error]"&&(!k||!(typeof t=="object"&&k in t))}function oy(t){return se(t)==="[object String]"&&(!k||!(typeof t=="object"&&k in t))}function ay(t){return se(t)==="[object Number]"&&(!k||!(typeof t=="object"&&k in t))}function sy(t){return se(t)==="[object Boolean]"&&(!k||!(typeof t=="object"&&k in t))}function $s(t){if(Ve)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 uy(t){if(!t||typeof t!="object"||!In)return!1;try{return In.call(t),!0}catch(e){}return!1}var ly=Object.prototype.hasOwnProperty||function(t){return t in this};function X(t,e){return ly.call(t,e)}function se(t){return Kd.call(t)}function py(t){if(t.name)return t.name;var e=Xd.call(Zd.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function _s(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 fy(t){if(!at||!t||typeof t!="object")return!1;try{at.call(t);try{st.call(t)}catch(e){return!0}return t instanceof Map}catch(e){}return!1}function cy(t){if(!cr||!t||typeof t!="object")return!1;try{cr.call(t,cr);try{dr.call(t,dr)}catch(e){return!0}return t instanceof WeakMap}catch(e){}return!1}function dy(t){if(!Rs||!t||typeof t!="object")return!1;try{return Rs.call(t),!0}catch(e){}return!1}function yy(t){if(!st||!t||typeof t!="object")return!1;try{st.call(t);try{at.call(t)}catch(e){return!0}return t instanceof Set}catch(e){}return!1}function my(t){if(!dr||!t||typeof t!="object")return!1;try{dr.call(t,dr);try{cr.call(t,cr)}catch(e){return!0}return t instanceof WeakSet}catch(e){}return!1}function hy(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Ds(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Ds(Ln.call(t,0,e.maxStringLength),e)+n}var i=ry[e.quoteStyle||"single"];i.lastIndex=0;var o=ae.call(ae.call(t,i,"\\$1"),/[\x00-\x1f]/g,gy);return qs(o,"single",e)}function gy(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":"")+Qd.call(e.toString(16))}function fr(t){return"Object("+t+")"}function En(t){return t+" { ? }"}function Ls(t,e,r,n){var i=n?On(r,n):V.call(r,", ");return t+" ("+e+") {"+i+"}"}function vy(t){for(var e=0;e<t.length;e++)if(_s(t[e],`
|
|
11
|
-
`)>=0)return!1;return!0}function
|
|
12
|
-
`+e.prev+e.base;return
|
|
13
|
-
`+e.prev}function ot(t,e){var r=Fn(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=X(t,i)?e(t[i],t):""}var o=typeof Rn=="function"?Rn(t):[],u;if(Ve){u={};for(var p=0;p<o.length;p++)u["$"+o[p]]=o[p]}for(var c in t)X(t,c)&&(r&&String(Number(c))===c&&c<t.length||Ve&&u["$"+c]instanceof Symbol||(Us.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof Rn=="function")for(var v=0;v<o.length;v++)Bs.call(t,o[v])&&n.push("["+e(o[v])+"]: "+e(t[o[v]],t));return n}});var ut=y(($w,Ws)=>{"use strict";a();s();Ws.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var Vs=y((jw,Gs)=>{"use strict";a();s();var wy=N(),by=yr(),Ay=ut();Gs.exports=function(e,r){if(!Ay(r))throw new wy("Assertion failed: IsPropertyKey(P) is not true, got "+by(r));return e[r]}});var Js=y((Vw,Hs)=>{"use strict";a();s();var Ys=Function.prototype.toString,ze=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Bn,lt;if(typeof ze=="function"&&typeof Object.defineProperty=="function")try{Bn=Object.defineProperty({},"length",{get:function(){throw lt}}),lt={},ze(function(){throw 42},null,Bn)}catch(t){t!==lt&&(ze=null)}else ze=null;var Sy=/^\s*class\b/,Mn=function(e){try{var r=Ys.call(e);return Sy.test(r)}catch(n){return!1}},Un=function(e){try{return Mn(e)?!1:(Ys.call(e),!0)}catch(r){return!1}},pt=Object.prototype.toString,Ty="[object Object]",Ry="[object Function]",Ey="[object GeneratorFunction]",Iy="[object HTMLAllCollection]",Py="[object HTML document.all class]",Ny="[object HTMLCollection]",Fy=typeof Symbol=="function"&&!!Symbol.toStringTag,Oy=!(0 in[,]),qn=function(){return!1};typeof document=="object"&&(zs=document.all,pt.call(zs)===pt.call(document.all)&&(qn=function(e){if((Oy||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=pt.call(e);return(r===Iy||r===Py||r===Ny||r===Ty)&&e("")==null}catch(n){}return!1}));var zs;Hs.exports=ze?function(e){if(qn(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{ze(e,null,Bn)}catch(r){if(r!==lt)return!1}return!Mn(e)&&Un(e)}:function(e){if(qn(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Fy)return Un(e);if(Mn(e))return!1;var r=pt.call(e);return r!==Ry&&r!==Ey&&!/^\[object HTML/.test(r)?!1:Un(e)}});var $n=y((Hw,Ks)=>{"use strict";a();s();Ks.exports=Js()});var eu=y((Zw,Qs)=>{"use strict";a();s();var Zs=N(),Cy=Vs(),ky=$n(),Ly=ut(),Xs=yr();Qs.exports=function(e,r){if(!Ly(r))throw new Zs("Assertion failed: IsPropertyKey(P) is not true");var n=Cy(e,r);if(n!=null){if(!ky(n))throw new Zs(Xs(r)+" is not a function: "+Xs(n));return n}}});var tu=y((eb,ru)=>{"use strict";a();s();var Uy=Jt();ru.exports=function(){return Uy()&&!!Symbol.toStringTag}});var Wn=y((nb,au)=>{"use strict";a();s();var _n=$(),nu=tu()(),iu,ou,Dn,jn;nu&&(iu=_n("Object.prototype.hasOwnProperty"),ou=_n("RegExp.prototype.exec"),Dn={},ft=function(){throw Dn},jn={toString:ft,valueOf:ft},typeof Symbol.toPrimitive=="symbol"&&(jn[Symbol.toPrimitive]=ft));var ft,By=_n("Object.prototype.toString"),My=Object.getOwnPropertyDescriptor,qy="[object RegExp]";au.exports=nu?function(e){if(!e||typeof e!="object")return!1;var r=My(e,"lastIndex"),n=r&&iu(r,"value");if(!n)return!1;try{ou(e,jn)}catch(i){return i===Dn}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:By(e)===qy}});var Gn=y((ab,su)=>{"use strict";a();s();var $y=$(),_y=Wn(),Dy=$y("RegExp.prototype.exec"),jy=N();su.exports=function(e){if(!_y(e))throw new jy("`regex` must be a RegExp");return function(n){return Dy(e,n)!==null}}});var lu=y((lb,uu)=>{"use strict";a();s();uu.exports=function(e,r){for(var n=0;n<e.length;n+=1)if(!r(e[n],n,e))return!1;return!0}});var fu=y((cb,pu)=>{"use strict";a();s();pu.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=y((mb,cu)=>{"use strict";a();s();var Wy=fu();cu.exports=function(e){return typeof e=="symbol"?"Symbol":typeof e=="bigint"?"BigInt":Wy(e)}});var mu=y((vb,yu)=>{"use strict";a();s();var du=N(),Gy=yr(),Vy=ut(),zy=Vn();yu.exports=function(e,r){if(zy(e)!=="Object")throw new du("Assertion failed: Type(O) is not Object");if(!Vy(r))throw new du("Assertion failed: IsPropertyKey(P) is not true, got "+Gy(r));return e[r]}});var gu=y((bb,hu)=>{"use strict";a();s();var Yy=j();hu.exports=Yy("%Math.min%")});var zn=y((Tb,vu)=>{"use strict";a();s();vu.exports=Number.isNaN||function(e){return e!==e}});var wu=y((Ib,xu)=>{"use strict";a();s();var Hy=zn();xu.exports=function(t){return(typeof t=="number"||typeof t=="bigint")&&!Hy(t)&&t!==1/0&&t!==-1/0}});var ct=y((Fb,Au)=>{"use strict";a();s();var bu=j(),Jy=bu("%Math.abs%"),Ky=bu("%Math.floor%"),Zy=zn(),Xy=wu();Au.exports=function(e){if(typeof e!="number"||Zy(e)||!Xy(e))return!1;var r=Jy(e);return Ky(r)===r}});var Hn=y((kb,Su)=>{"use strict";a();s();var Qy=$(),Yn=N(),em=ct(),rm=Qy("String.prototype.slice");Su.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(!em(n)||n<0)throw new Yn("Assertion failed: `fromIndex` must be a non-negative integer");var i=e.length;if(r===""&&n<=i)return n;for(var o=r.length,u=n;u<=i-o;u+=1){var p=rm(e,u,u+o);if(p===r)return u}return-1}});var dt=y((Bb,Tu)=>{"use strict";a();s();var tm=N();Tu.exports=function(e){if(e==null)throw new tm(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var yt=y(($b,Ru)=>{"use strict";a();s();var nm=j(),im=nm("%String%"),om=N();Ru.exports=function(e){if(typeof e=="symbol")throw new om("Cannot convert a Symbol value to a string");return im(e)}});var Jn=y((jb,Pu)=>{"use strict";a();s();var am=dt(),sm=yt(),um=$(),Eu=um("String.prototype.replace"),Iu=/^\s$/.test("\u180E"),lm=Iu?/^[\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]+/,pm=Iu?/[\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]+$/;Pu.exports=function(){var e=sm(am(this));return Eu(Eu(e,lm,""),pm,"")}});var Kn=y((Vb,Fu)=>{"use strict";a();s();var fm=Jn(),Nu="\u200B",Ye="\u180E";Fu.exports=function(){return String.prototype.trim&&Nu.trim()===Nu&&Ye.trim()===Ye&&("_"+Ye).trim()==="_"+Ye&&(Ye+"_").trim()===Ye+"_"?String.prototype.trim:fm}});var Cu=y((Hb,Ou)=>{"use strict";a();s();var cm=ir(),dm=Kn();Ou.exports=function(){var e=dm();return cm(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var Bu=y((Zb,Uu)=>{"use strict";a();s();var ym=Jr(),mm=ir(),hm=dt(),gm=Jn(),ku=Kn(),vm=Cu(),xm=ym(ku()),Lu=function(e){return hm(e),xm(e)};mm(Lu,{getPolyfill:ku,implementation:gm,shim:vm});Uu.exports=Lu});var _u=y((eA,$u)=>{"use strict";a();s();var Xn=j(),Zn=Xn("%Number%"),wm=Xn("%RegExp%"),bm=N(),Mu=Xn("%parseInt%"),Am=$(),mt=Gn(),qu=Am("String.prototype.slice"),Sm=mt(/^0b[01]+$/i),Tm=mt(/^0o[0-7]+$/i),Rm=mt(/^[-+]0x[0-9a-f]+$/i),Em=["\x85","\u200B","\uFFFE"].join(""),Im=new wm("["+Em+"]","g"),Pm=mt(Im),Nm=Bu();$u.exports=function t(e){if(typeof e!="string")throw new bm("Assertion failed: `argument` is not a String");if(Sm(e))return Zn(Mu(qu(e,2),2));if(Tm(e))return Zn(Mu(qu(e,2),8));if(Pm(e)||Rm(e))return NaN;var r=Nm(e);return r!==e?t(r):Zn(e)}});var Wu=y((nA,ju)=>{"use strict";a();s();var Fm=N(),Du=ct(),Om=$(),Cm=Om("String.prototype.slice");ju.exports=function(e,r,n){if(typeof e!="string"||!Du(r)||arguments.length>2&&!Du(n))throw new Fm("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Cm(e,r,arguments.length>2?n:e.length)}});var Vu=y((aA,Gu)=>{"use strict";a();s();Gu.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var Yu=y((lA,zu)=>{"use strict";a();s();var km=$()("String.prototype.slice");zu.exports=function(e,r){return e===r?!0:e.length>r.length?!1:km(r,0,e.length)===e}});var Xu=y((cA,Zu)=>{"use strict";a();s();var Q=N(),Ku=Gn(),Lm=lu(),Qn=yr(),Um=mu(),Bm=fn(),Mm=gu(),qm=Hn(),Hu=_u(),ee=Wu(),$m=yt(),Ju=Vn(),_m=ct(),Dm=Vu(),mr=Yu(),jm=Ku(/^\$[0-9]/),Wm=Ku(/^\$[0-9][0-9]/);Zu.exports=function(e,r,n,i,o,u){if(typeof e!="string")throw new Q("Assertion failed: `matched` must be a String");if(typeof r!="string")throw new Q("Assertion failed: `str` must be a String");if(!_m(n)||n<0)throw new Q("Assertion failed: `position` must be a nonnegative integer, got "+Qn(n));if(!Bm(i)||!Lm(i,Dm))throw new Q("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+Qn(i));if(typeof o!="undefined"&&Ju(o)!=="Object")throw new Q("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof u!="string")throw new Q("Assertion failed: `replacementTemplate` must be a String");var p=r.length;if(n>p)throw new Q("Assertion failed: position > stringLength, got "+Qn(n));for(var c=u,v="";c!=="";){var h,m,x;if(mr("$$",c))h="$$",m="$";else if(mr("$`",c))h="$`",m=ee(r,0,n);else if(mr("$&",c))h="$&",m=e;else if(mr("$'",c)){h="$'";var w=e.length,R=n+w;m=ee(r,Mm(R,p))}else if(jm(c)){var I=Wm(c)?2:1,L=ee(c,1,1+I),M=Hu(L);if(M<0||M>99)throw new Q("Assertion failed: `index` must be >= 0 and <= 99");var H=i.length;M>H&&I===2&&(I=1,L=ee(L,0,1),M=Hu(L)),h=ee(c,0,1+I),1<=M&&M<=H?(x=i[M-1],typeof x=="undefined"?m="":m=x):m=h}else if(mr("$<",c)){var le=qm(c,">",0);if(le===-1||typeof o=="undefined")h="$<",m=h;else{h=ee(c,0,le+1);var Je=ee(c,2,le);if(Ju(o)!=="Object")throw new Q("Assertion failed: Type(namedCaptures) is not Object");x=Um(o,Je),typeof x=="undefined"?m="":m=$m(x)}}else h=ee(c,0,1),m=h;var Ir=h.length;c=ee(c,Ir),v+=m}return v}});var ri=y((mA,tl)=>{"use strict";a();s();var Qu=ns(),Gm=eu(),Vm=Xu(),zm=$n(),Ym=dt(),ht=yt(),el=Hn(),Hm=j(),gt=$(),Jm=Wt()(),Km=Wn(),Zm=Hm("%Math.max%"),rl=N(),Xm=gt("Array.prototype.push"),ei=gt("String.prototype.slice"),Qm=gt("String.prototype.indexOf"),eh=gt("String.prototype.replace");tl.exports=function(e,r){var n=Ym(this),i=Km(e);if(i&&Qm(ei(e,e.source.length+2),"g")===-1)throw new rl("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Jm&&Symbol.replace){if(e!=null){var o=Gm(e,Symbol.replace);if(typeof o!="undefined")return Qu(o,e,[n,r])}}else if(i)return eh(n,e,r);var u=ht(n),p=ht(e),c=zm(r);c||(r=ht(r));for(var v=p.length,h=Zm(1,v),m=[],x=el(u,p,0);x!==-1;)Xm(m,x),x=el(u,p,x+h);for(var w=0,R="",I=0;I<m.length;I+=1){var L;if(c)L=ht(Qu(r,void 0,[p,m[I],u]));else{if(typeof r!="string")throw new rl("Assertion failed: `replaceValue` should be a string at this point");var M=[];L=Vm(p,u,m[I],M,void 0,r)}var H=ei(u,w,m[I]);R+=H+L,w=m[I]+v}return w<u.length&&(R+=ei(u,w)),R}});var ti=y((vA,nl)=>{"use strict";a();s();var rh=ri();nl.exports=function(){return String.prototype.replaceAll||rh}});var ol=y((bA,il)=>{"use strict";a();s();var th=ir(),nh=ti();il.exports=function(){var e=nh();return th(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var ll=y((TA,ul)=>{"use strict";a();s();var ih=Jr(),oh=ir(),al=ri(),ah=ti(),sh=ol(),sl=ih(al);oh(sl,{getPolyfill:ah,implementation:al,shim:sh});ul.exports=sl});var bv={};kt(bv,{DynamicSnippetsGenerator:()=>It});module.exports=bi(bv);a();s();var IP=Ap(ll(),1);a();s();a();s();a();s();function S(t){throw new Error("Unexpected value: "+JSON.stringify(t))}a();s();function hr(t){return Object.keys(t)}a();s();a();s();a();s();a();s();a();s();a();s();var uh=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,pl=uh;var lh=typeof self=="object"&&self&&self.Object===Object&&self,ph=pl||lh||Function("return this")(),fl=ph;var fh=fl.Symbol,re=fh;a();s();var cl=Object.prototype,ch=cl.hasOwnProperty,dh=cl.toString,gr=re?re.toStringTag:void 0;function yh(t){var e=ch.call(t,gr),r=t[gr];try{t[gr]=void 0;var n=!0}catch(o){}var i=dh.call(t);return n&&(e?t[gr]=r:delete t[gr]),i}var dl=yh;a();s();var mh=Object.prototype,hh=mh.toString;function gh(t){return hh.call(t)}var yl=gh;var vh="[object Null]",xh="[object Undefined]",ml=re?re.toStringTag:void 0;function wh(t){return t==null?t===void 0?xh:vh:ml&&ml in Object(t)?dl(t):yl(t)}var hl=wh;a();s();function bh(t){return t!=null&&typeof t=="object"}var gl=bh;var Ah="[object Symbol]";function Sh(t){return typeof t=="symbol"||gl(t)&&hl(t)==Ah}var vl=Sh;a();s();a();s();function Th(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var xl=Th;a();s();var Rh=Array.isArray,wl=Rh;var Eh=1/0,bl=re?re.prototype:void 0,Al=bl?bl.toString:void 0;function Sl(t){if(typeof t=="string")return t;if(wl(t))return xl(t,Sl)+"";if(vl(t))return Al?Al.call(t):"";var e=t+"";return e=="0"&&1/t==-Eh?"-0":e}var Tl=Sl;a();s();function Ih(t){return t==null?"":Tl(t)}var ue=Ih;a();s();a();s();a();s();a();s();a();s();a();s();function Ph(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}var Rl=Ph;function Nh(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:Rl(t,e,r)}var El=Nh;a();s();var Fh="\\ud800-\\udfff",Oh="\\u0300-\\u036f",Ch="\\ufe20-\\ufe2f",kh="\\u20d0-\\u20ff",Lh=Oh+Ch+kh,Uh="\\ufe0e\\ufe0f",Bh="\\u200d",Mh=RegExp("["+Bh+Fh+Lh+Uh+"]");function qh(t){return Mh.test(t)}var vt=qh;a();s();a();s();function $h(t){return t.split("")}var Il=$h;a();s();var Pl="\\ud800-\\udfff",_h="\\u0300-\\u036f",Dh="\\ufe20-\\ufe2f",jh="\\u20d0-\\u20ff",Wh=_h+Dh+jh,Gh="\\ufe0e\\ufe0f",Vh="["+Pl+"]",ni="["+Wh+"]",ii="\\ud83c[\\udffb-\\udfff]",zh="(?:"+ni+"|"+ii+")",Nl="[^"+Pl+"]",Fl="(?:\\ud83c[\\udde6-\\uddff]){2}",Ol="[\\ud800-\\udbff][\\udc00-\\udfff]",Yh="\\u200d",Cl=zh+"?",kl="["+Gh+"]?",Hh="(?:"+Yh+"(?:"+[Nl,Fl,Ol].join("|")+")"+kl+Cl+")*",Jh=kl+Cl+Hh,Kh="(?:"+[Nl+ni+"?",ni,Fl,Ol,Vh].join("|")+")",Zh=RegExp(ii+"(?="+ii+")|"+Kh+Jh,"g");function Xh(t){return t.match(Zh)||[]}var Ll=Xh;function Qh(t){return vt(t)?Ll(t):Il(t)}var Ul=Qh;function eg(t){return function(e){e=ue(e);var r=vt(e)?Ul(e):void 0,n=r?r[0]:e.charAt(0),i=r?El(r,1).join(""):e.slice(1);return n[t]()+i}}var Bl=eg;var rg=Bl("toUpperCase"),Ml=rg;function tg(t){return Ml(ue(t).toLowerCase())}var ql=tg;a();s();a();s();function ng(t,e,r,n){var i=-1,o=t==null?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}var $l=ng;a();s();a();s();a();s();function ig(t){return function(e){return t==null?void 0:t[e]}}var _l=ig;var og={\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"},ag=_l(og),Dl=ag;var sg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ug="\\u0300-\\u036f",lg="\\ufe20-\\ufe2f",pg="\\u20d0-\\u20ff",fg=ug+lg+pg,cg="["+fg+"]",dg=RegExp(cg,"g");function yg(t){return t=ue(t),t&&t.replace(sg,Dl).replace(dg,"")}var jl=yg;a();s();a();s();var mg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function hg(t){return t.match(mg)||[]}var Wl=hg;a();s();var gg=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function vg(t){return gg.test(t)}var Gl=vg;a();s();var Jl="\\ud800-\\udfff",xg="\\u0300-\\u036f",wg="\\ufe20-\\ufe2f",bg="\\u20d0-\\u20ff",Ag=xg+wg+bg,Kl="\\u2700-\\u27bf",Zl="a-z\\xdf-\\xf6\\xf8-\\xff",Sg="\\xac\\xb1\\xd7\\xf7",Tg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Rg="\\u2000-\\u206f",Eg=" \\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",Xl="A-Z\\xc0-\\xd6\\xd8-\\xde",Ig="\\ufe0e\\ufe0f",Ql=Sg+Tg+Rg+Eg,ep="['\u2019]",Vl="["+Ql+"]",Pg="["+Ag+"]",rp="\\d+",Ng="["+Kl+"]",tp="["+Zl+"]",np="[^"+Jl+Ql+rp+Kl+Zl+Xl+"]",Fg="\\ud83c[\\udffb-\\udfff]",Og="(?:"+Pg+"|"+Fg+")",Cg="[^"+Jl+"]",ip="(?:\\ud83c[\\udde6-\\uddff]){2}",op="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Xl+"]",kg="\\u200d",zl="(?:"+tp+"|"+np+")",Lg="(?:"+He+"|"+np+")",Yl="(?:"+ep+"(?:d|ll|m|re|s|t|ve))?",Hl="(?:"+ep+"(?:D|LL|M|RE|S|T|VE))?",ap=Og+"?",sp="["+Ig+"]?",Ug="(?:"+kg+"(?:"+[Cg,ip,op].join("|")+")"+sp+ap+")*",Bg="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mg="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",qg=sp+ap+Ug,$g="(?:"+[Ng,ip,op].join("|")+")"+qg,_g=RegExp([He+"?"+tp+"+"+Yl+"(?="+[Vl,He,"$"].join("|")+")",Lg+"+"+Hl+"(?="+[Vl,He+zl,"$"].join("|")+")",He+"?"+zl+"+"+Yl,He+"+"+Hl,Mg,Bg,rp,$g].join("|"),"g");function Dg(t){return t.match(_g)||[]}var up=Dg;function jg(t,e,r){return t=ue(t),e=r?void 0:e,e===void 0?Gl(t)?up(t):Wl(t):t.match(e)||[]}var lp=jg;var Wg="['\u2019]",Gg=RegExp(Wg,"g");function Vg(t){return function(e){return $l(lp(jl(e).replace(Gg,"")),t,"")}}var pp=Vg;var zg=pp(function(t,e,r){return e=e.toLowerCase(),t+(r?ql(e):e)}),oi=zg;a();s();a();s();var be=class{};a();s();a();s();var z=class extends be{constructor(r){super();g(this,"value");this.value=r}write(r){typeof this.value=="string"?r.write(this.value):this.value(r)}};var Yg=4,vr=class{constructor(){g(this,"buffer","");g(this,"indentLevel",0);g(this,"hasWrittenAnything",!1);g(this,"lastCharacterIsSemicolon",!1);g(this,"lastCharacterIsNewline",!1)}write(e){let r=e.length>0&&e.endsWith(`
|
|
14
|
-
`),n
|
|
1
|
+
"use strict";var ff=Object.create;var Wt=Object.defineProperty,pf=Object.defineProperties,df=Object.getOwnPropertyDescriptor,mf=Object.getOwnPropertyDescriptors,hf=Object.getOwnPropertyNames,Ar=Object.getOwnPropertySymbols,yf=Object.getPrototypeOf,Un=Object.prototype.hasOwnProperty,li=Object.prototype.propertyIsEnumerable;var Ln=(r,e,t)=>e in r?Wt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,h=(r,e)=>{for(var t in e||(e={}))Un.call(e,t)&&Ln(r,t,e[t]);if(Ar)for(var t of Ar(e))li.call(e,t)&&Ln(r,t,e[t]);return r},A=(r,e)=>pf(r,mf(e));var ci=r=>typeof r=="symbol"?r:r+"",fi=(r,e)=>{var t={};for(var n in r)Un.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&Ar)for(var n of Ar(r))e.indexOf(n)<0&&li.call(r,n)&&(t[n]=r[n]);return t};var xt=(r,e)=>()=>(r&&(e=r(r=0)),e);var x=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Rr=(r,e)=>{for(var t in e)Wt(r,t,{get:e[t],enumerable:!0})},pi=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of hf(e))!Un.call(r,a)&&a!==t&&Wt(r,a,{get:()=>e[a],enumerable:!(n=df(e,a))||n.enumerable});return r};var gf=(r,e,t)=>(t=r!=null?ff(yf(r)):{},pi(e||!r||!r.__esModule?Wt(t,"default",{value:r,enumerable:!0}):t,r)),di=r=>pi(Wt({},"__esModule",{value:!0}),r);var w=(r,e,t)=>Ln(r,typeof e!="symbol"?e+"":e,t);function hi(){throw new Error("setTimeout has not been defined")}function yi(){throw new Error("clearTimeout has not been defined")}function gi(r){if(Re===setTimeout)return setTimeout(r,0);if((Re===hi||!Re)&&setTimeout)return Re=setTimeout,setTimeout(r,0);try{return Re(r,0)}catch(e){try{return Re.call(null,r,0)}catch(t){return Re.call(this,r,0)}}}function vf(r){if(ke===clearTimeout)return clearTimeout(r);if((ke===yi||!ke)&&clearTimeout)return ke=clearTimeout,clearTimeout(r);try{return ke(r)}catch(e){try{return ke.call(null,r)}catch(t){return ke.call(this,r)}}}function xf(){!bt||!Me||(bt=!1,Me.length?he=Me.concat(he):kr=-1,he.length&&vi())}function vi(){if(!bt){var r=gi(xf);bt=!0;for(var e=he.length;e;){for(Me=he,he=[];++kr<e;)Me&&Me[kr].run();kr=-1,e=he.length}Me=null,bt=!1,vf(r)}}function wf(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];he.push(new xi(r,e)),he.length===1&&!bt&&gi(vi)}function xi(r,e){this.fun=r,this.array=e}function je(){}function Bf(r){throw new Error("process.binding is not supported")}function Mf(){return"/"}function jf(r){throw new Error("process.chdir is not supported")}function $f(){return 0}function Df(r){var e=qf.call(wt)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}function Wf(){var r=new Date,e=r-Vf;return e/1e3}var Re,ke,he,bt,Me,kr,bf,Tf,_f,Sf,Af,Rf,kf,Nf,If,Ef,Pf,Cf,Of,Ff,Lf,Uf,wt,qf,Vf,p,mi,s=xt(()=>{"use strict";Re=hi,ke=yi;typeof globalThis.setTimeout=="function"&&(Re=setTimeout);typeof globalThis.clearTimeout=="function"&&(ke=clearTimeout);he=[],bt=!1,kr=-1;xi.prototype.run=function(){this.fun.apply(null,this.array)};bf="browser",Tf="browser",_f=!0,Sf={},Af=[],Rf="",kf={},Nf={},If={};Ef=je,Pf=je,Cf=je,Of=je,Ff=je,Lf=je,Uf=je;wt=globalThis.performance||{},qf=wt.now||wt.mozNow||wt.msNow||wt.oNow||wt.webkitNow||function(){return new Date().getTime()};Vf=new Date;p={nextTick:wf,title:bf,browser:_f,env:Sf,argv:Af,version:Rf,versions:kf,on:Ef,addListener:Pf,once:Cf,off:Of,removeListener:Ff,removeAllListeners:Lf,emit:Uf,binding:Bf,cwd:Mf,chdir:jf,umask:$f,hrtime:Df,platform:Tf,release:Nf,config:If,uptime:Wf},mi={};Object.keys(mi).forEach(r=>{let e=r.split("."),t=p;for(let n=0;n<e.length;n++){let a=e[n];n===e.length-1?t[a]=mi[r]:t=t[a]||(t[a]={})}})});function _i(){Mn=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)ae[e]=r[e],K[r.charCodeAt(e)]=e;K[45]=62,K[95]=63}function Gf(r){Mn||_i();var e,t,n,a,i,o,l=r.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i=r[l-2]==="="?2:r[l-1]==="="?1:0,o=new zf(l*3/4-i),n=i>0?l-4:l;var f=0;for(e=0,t=0;e<n;e+=4,t+=3)a=K[r.charCodeAt(e)]<<18|K[r.charCodeAt(e+1)]<<12|K[r.charCodeAt(e+2)]<<6|K[r.charCodeAt(e+3)],o[f++]=a>>16&255,o[f++]=a>>8&255,o[f++]=a&255;return i===2?(a=K[r.charCodeAt(e)]<<2|K[r.charCodeAt(e+1)]>>4,o[f++]=a&255):i===1&&(a=K[r.charCodeAt(e)]<<10|K[r.charCodeAt(e+1)]<<4|K[r.charCodeAt(e+2)]>>2,o[f++]=a>>8&255,o[f++]=a&255),o}function Zf(r){return ae[r>>18&63]+ae[r>>12&63]+ae[r>>6&63]+ae[r&63]}function Hf(r,e,t){for(var n,a=[],i=e;i<t;i+=3)n=(r[i]<<16)+(r[i+1]<<8)+r[i+2],a.push(Zf(n));return a.join("")}function wi(r){Mn||_i();for(var e,t=r.length,n=t%3,a="",i=[],o=16383,l=0,f=t-n;l<f;l+=o)i.push(Hf(r,l,l+o>f?f:l+o));return n===1?(e=r[t-1],a+=ae[e>>2],a+=ae[e<<4&63],a+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],a+=ae[e>>10],a+=ae[e>>4&63],a+=ae[e<<2&63],a+="="),i.push(a),i.join("")}function Nr(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ye(r,e){if(Nr()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=c.prototype):(r===null&&(r=new c(e)),r.length=e),r}function c(r,e,t){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(r,e,t);if(typeof r=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return jn(this,r)}return Si(this,r,e,t)}function Si(r,e,t,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer?Kf(r,e,t,n):typeof e=="string"?Jf(r,e,t):Xf(r,e)}function Ai(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function Yf(r,e,t,n){return Ai(e),e<=0?ye(r,e):t!==void 0?typeof n=="string"?ye(r,e).fill(t,n):ye(r,e).fill(t):ye(r,e)}function jn(r,e){if(Ai(e),r=ye(r,e<0?0:$n(e)|0),!c.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}function Jf(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!c.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=Ri(e,t)|0;r=ye(r,n);var a=r.write(e,t);return a!==n&&(r=r.slice(0,a)),r}function Bn(r,e){var t=e.length<0?0:$n(e.length)|0;r=ye(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function Kf(r,e,t,n){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");return t===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,t):e=new Uint8Array(e,t,n),c.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=c.prototype):r=Bn(r,e),r}function Xf(r,e){if(ie(e)){var t=$n(e.length)|0;return r=ye(r,t),r.length===0||e.copy(r,0,0,t),r}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||gp(e.length)?ye(r,0):Bn(r,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Bn(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function $n(r){if(r>=Nr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Nr().toString(16)+" bytes");return r|0}function ie(r){return!!(r!=null&&r._isBuffer)}function Ri(r,e){if(ie(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var t=r.length;if(t===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return Ir(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Oi(r).length;default:if(n)return Ir(r).length;e=(""+e).toLowerCase(),n=!0}}function Qf(r,e,t){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return lp(this,e,t);case"utf8":case"utf-8":return Ii(this,e,t);case"ascii":return sp(this,e,t);case"latin1":case"binary":return up(this,e,t);case"base64":return ip(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cp(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function $e(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function ki(r,e,t,n,a){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=a?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(a)return-1;t=r.length-1}else if(t<0)if(a)t=0;else return-1;if(typeof e=="string"&&(e=c.from(e,n)),ie(e))return e.length===0?-1:bi(r,e,t,n,a);if(typeof e=="number")return e=e&255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):bi(r,[e],t,n,a);throw new TypeError("val must be string, number or Buffer")}function bi(r,e,t,n,a){var i=1,o=r.length,l=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;i=2,o/=2,l/=2,t/=2}function f(E,B){return i===1?E[B]:E.readUInt16BE(B*i)}var d;if(a){var y=-1;for(d=t;d<o;d++)if(f(r,d)===f(e,y===-1?0:d-y)){if(y===-1&&(y=d),d-y+1===l)return y*i}else y!==-1&&(d-=d-y),y=-1}else for(t+l>o&&(t=o-l),d=t;d>=0;d--){for(var g=!0,_=0;_<l;_++)if(f(r,d+_)!==f(e,_)){g=!1;break}if(g)return d}return-1}function ep(r,e,t,n){t=Number(t)||0;var a=r.length-t;n?(n=Number(n),n>a&&(n=a)):n=a;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o<n;++o){var l=parseInt(e.substr(o*2,2),16);if(isNaN(l))return o;r[t+o]=l}return o}function tp(r,e,t,n){return Cr(Ir(e,r.length-t),r,t,n)}function Ni(r,e,t,n){return Cr(hp(e),r,t,n)}function rp(r,e,t,n){return Ni(r,e,t,n)}function np(r,e,t,n){return Cr(Oi(e),r,t,n)}function ap(r,e,t,n){return Cr(yp(e,r.length-t),r,t,n)}function ip(r,e,t){return e===0&&t===r.length?wi(r):wi(r.slice(e,t))}function Ii(r,e,t){t=Math.min(r.length,t);for(var n=[],a=e;a<t;){var i=r[a],o=null,l=i>239?4:i>223?3:i>191?2:1;if(a+l<=t){var f,d,y,g;switch(l){case 1:i<128&&(o=i);break;case 2:f=r[a+1],(f&192)===128&&(g=(i&31)<<6|f&63,g>127&&(o=g));break;case 3:f=r[a+1],d=r[a+2],(f&192)===128&&(d&192)===128&&(g=(i&15)<<12|(f&63)<<6|d&63,g>2047&&(g<55296||g>57343)&&(o=g));break;case 4:f=r[a+1],d=r[a+2],y=r[a+3],(f&192)===128&&(d&192)===128&&(y&192)===128&&(g=(i&15)<<18|(f&63)<<12|(d&63)<<6|y&63,g>65535&&g<1114112&&(o=g))}}o===null?(o=65533,l=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),a+=l}return op(n)}function op(r){var e=r.length;if(e<=Ti)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=Ti));return t}function sp(r,e,t){var n="";t=Math.min(r.length,t);for(var a=e;a<t;++a)n+=String.fromCharCode(r[a]&127);return n}function up(r,e,t){var n="";t=Math.min(r.length,t);for(var a=e;a<t;++a)n+=String.fromCharCode(r[a]);return n}function lp(r,e,t){var n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var a="",i=e;i<t;++i)a+=mp(r[i]);return a}function cp(r,e,t){for(var n=r.slice(e,t),a="",i=0;i<n.length;i+=2)a+=String.fromCharCode(n[i]+n[i+1]*256);return a}function $(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}function G(r,e,t,n,a,i){if(!ie(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||e<i)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}function Er(r,e,t,n){e<0&&(e=65535+e+1);for(var a=0,i=Math.min(r.length-t,2);a<i;++a)r[t+a]=(e&255<<8*(n?a:1-a))>>>(n?a:1-a)*8}function Pr(r,e,t,n){e<0&&(e=4294967295+e+1);for(var a=0,i=Math.min(r.length-t,4);a<i;++a)r[t+a]=e>>>(n?a:3-a)*8&255}function Ei(r,e,t,n,a,i){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Pi(r,e,t,n,a){return a||Ei(r,e,t,4,34028234663852886e22,-34028234663852886e22),Li(r,e,t,n,23,4),t+4}function Ci(r,e,t,n,a){return a||Ei(r,e,t,8,17976931348623157e292,-17976931348623157e292),Li(r,e,t,n,52,8),t+8}function pp(r){if(r=dp(r).replace(fp,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function dp(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function mp(r){return r<16?"0"+r.toString(16):r.toString(16)}function Ir(r,e){e=e||1/0;for(var t,n=r.length,a=null,i=[],o=0;o<n;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!a){if(t>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&i.push(239,191,189);continue}a=t;continue}if(t<56320){(e-=3)>-1&&i.push(239,191,189),a=t;continue}t=(a-55296<<10|t-56320)+65536}else a&&(e-=3)>-1&&i.push(239,191,189);if(a=null,t<128){if((e-=1)<0)break;i.push(t)}else if(t<2048){if((e-=2)<0)break;i.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;i.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return i}function hp(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function yp(r,e){for(var t,n,a,i=[],o=0;o<r.length&&!((e-=2)<0);++o)t=r.charCodeAt(o),n=t>>8,a=t%256,i.push(a),i.push(n);return i}function Oi(r){return Gf(pp(r))}function Cr(r,e,t,n){for(var a=0;a<n&&!(a+t>=e.length||a>=r.length);++a)e[a+t]=r[a];return a}function gp(r){return r!==r}function vp(r){return r!=null&&(!!r._isBuffer||Fi(r)||xp(r))}function Fi(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function xp(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Fi(r.slice(0,0))}function Or(r,e,t,n,a){var i,o,l=a*8-n-1,f=(1<<l)-1,d=f>>1,y=-7,g=t?a-1:0,_=t?-1:1,E=r[e+g];for(g+=_,i=E&(1<<-y)-1,E>>=-y,y+=l;y>0;i=i*256+r[e+g],g+=_,y-=8);for(o=i&(1<<-y)-1,i>>=-y,y+=n;y>0;o=o*256+r[e+g],g+=_,y-=8);if(i===0)i=1-d;else{if(i===f)return o?NaN:(E?-1:1)*(1/0);o=o+Math.pow(2,n),i=i-d}return(E?-1:1)*o*Math.pow(2,i-n)}function Li(r,e,t,n,a,i){var o,l,f,d=i*8-a-1,y=(1<<d)-1,g=y>>1,_=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=n?0:i-1,B=n?1:-1,j=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,o=y):(o=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-o))<1&&(o--,f*=2),o+g>=1?e+=_/f:e+=_*Math.pow(2,1-g),e*f>=2&&(o++,f/=2),o+g>=y?(l=0,o=y):o+g>=1?(l=(e*f-1)*Math.pow(2,a),o=o+g):(l=e*Math.pow(2,g-1)*Math.pow(2,a),o=0));a>=8;r[t+E]=l&255,E+=B,l/=256,a-=8);for(o=o<<a|l,d+=a;d>0;r[t+E]=o&255,E+=B,o/=256,d-=8);r[t+E-B]|=j*128}var ae,K,zf,Mn,Ti,fp,Ui=xt(()=>{"use strict";s();u();ae=[],K=[],zf=typeof Uint8Array!="undefined"?Uint8Array:Array,Mn=!1;c.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;c.poolSize=8192;c._augment=function(r){return r.__proto__=c.prototype,r};c.from=function(r,e,t){return Si(null,r,e,t)};c.kMaxLength=Nr();c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&c[Symbol.species]);c.alloc=function(r,e,t){return Yf(null,r,e,t)};c.allocUnsafe=function(r){return jn(null,r)};c.allocUnsafeSlow=function(r){return jn(null,r)};c.isBuffer=vp;c.compare=function(e,t){if(!ie(e)||!ie(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,a=t.length,i=0,o=Math.min(n,a);i<o;++i)if(e[i]!==t[i]){n=e[i],a=t[i];break}return n<a?-1:a<n?1:0};c.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}};c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return c.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var a=c.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!ie(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(a,i),i+=o.length}return a};c.byteLength=Ri;c.prototype._isBuffer=!0;c.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 t=0;t<e;t+=2)$e(this,t,t+1);return this};c.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 t=0;t<e;t+=4)$e(this,t,t+3),$e(this,t+1,t+2);return this};c.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 t=0;t<e;t+=8)$e(this,t,t+7),$e(this,t+1,t+6),$e(this,t+2,t+5),$e(this,t+3,t+4);return this};c.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Ii(this,0,e):Qf.apply(this,arguments)};c.prototype.equals=function(e){if(!ie(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:c.compare(this,e)===0};c.prototype.compare=function(e,t,n,a,i){if(!ie(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),a===void 0&&(a=0),i===void 0&&(i=this.length),t<0||n>e.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&t>=n)return 0;if(a>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,a>>>=0,i>>>=0,this===e)return 0;for(var o=i-a,l=n-t,f=Math.min(o,l),d=this.slice(a,i),y=e.slice(t,n),g=0;g<f;++g)if(d[g]!==y[g]){o=d[g],l=y[g];break}return o<l?-1:l<o?1:0};c.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};c.prototype.indexOf=function(e,t,n){return ki(this,e,t,n,!0)};c.prototype.lastIndexOf=function(e,t,n){return ki(this,e,t,n,!1)};c.prototype.write=function(e,t,n,a){if(t===void 0)a="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")a=t,n=this.length,t=0;else if(isFinite(t))t=t|0,isFinite(n)?(n=n|0,a===void 0&&(a="utf8")):(a=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var o=!1;;)switch(a){case"hex":return ep(this,e,t,n);case"utf8":case"utf-8":return tp(this,e,t,n);case"ascii":return Ni(this,e,t,n);case"latin1":case"binary":return rp(this,e,t,n);case"base64":return np(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ap(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),o=!0}};c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Ti=4096;c.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var a;if(c.TYPED_ARRAY_SUPPORT)a=this.subarray(e,t),a.__proto__=c.prototype;else{var i=t-e;a=new c(i,void 0);for(var o=0;o<i;++o)a[o]=this[o+e]}return a};c.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||$(e,t,this.length);for(var a=this[e],i=1,o=0;++o<t&&(i*=256);)a+=this[e+o]*i;return a};c.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||$(e,t,this.length);for(var a=this[e+--t],i=1;t>0&&(i*=256);)a+=this[e+--t]*i;return a};c.prototype.readUInt8=function(e,t){return t||$(e,1,this.length),this[e]};c.prototype.readUInt16LE=function(e,t){return t||$(e,2,this.length),this[e]|this[e+1]<<8};c.prototype.readUInt16BE=function(e,t){return t||$(e,2,this.length),this[e]<<8|this[e+1]};c.prototype.readUInt32LE=function(e,t){return t||$(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};c.prototype.readUInt32BE=function(e,t){return t||$(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};c.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||$(e,t,this.length);for(var a=this[e],i=1,o=0;++o<t&&(i*=256);)a+=this[e+o]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a};c.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||$(e,t,this.length);for(var a=t,i=1,o=this[e+--a];a>0&&(i*=256);)o+=this[e+--a]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};c.prototype.readInt8=function(e,t){return t||$(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};c.prototype.readInt16LE=function(e,t){t||$(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};c.prototype.readInt16BE=function(e,t){t||$(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};c.prototype.readInt32LE=function(e,t){return t||$(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};c.prototype.readInt32BE=function(e,t){return t||$(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};c.prototype.readFloatLE=function(e,t){return t||$(e,4,this.length),Or(this,e,!0,23,4)};c.prototype.readFloatBE=function(e,t){return t||$(e,4,this.length),Or(this,e,!1,23,4)};c.prototype.readDoubleLE=function(e,t){return t||$(e,8,this.length),Or(this,e,!0,52,8)};c.prototype.readDoubleBE=function(e,t){return t||$(e,8,this.length),Or(this,e,!1,52,8)};c.prototype.writeUIntLE=function(e,t,n,a){if(e=+e,t=t|0,n=n|0,!a){var i=Math.pow(2,8*n)-1;G(this,e,t,n,i,0)}var o=1,l=0;for(this[t]=e&255;++l<n&&(o*=256);)this[t+l]=e/o&255;return t+n};c.prototype.writeUIntBE=function(e,t,n,a){if(e=+e,t=t|0,n=n|0,!a){var i=Math.pow(2,8*n)-1;G(this,e,t,n,i,0)}var o=n-1,l=1;for(this[t+o]=e&255;--o>=0&&(l*=256);)this[t+o]=e/l&255;return t+n};c.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||G(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||G(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Er(this,e,t,!0),t+2};c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||G(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Er(this,e,t,!1),t+2};c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||G(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):Pr(this,e,t,!0),t+4};c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||G(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Pr(this,e,t,!1),t+4};c.prototype.writeIntLE=function(e,t,n,a){if(e=+e,t=t|0,!a){var i=Math.pow(2,8*n-1);G(this,e,t,n,i-1,-i)}var o=0,l=1,f=0;for(this[t]=e&255;++o<n&&(l*=256);)e<0&&f===0&&this[t+o-1]!==0&&(f=1),this[t+o]=(e/l>>0)-f&255;return t+n};c.prototype.writeIntBE=function(e,t,n,a){if(e=+e,t=t|0,!a){var i=Math.pow(2,8*n-1);G(this,e,t,n,i-1,-i)}var o=n-1,l=1,f=0;for(this[t+o]=e&255;--o>=0&&(l*=256);)e<0&&f===0&&this[t+o+1]!==0&&(f=1),this[t+o]=(e/l>>0)-f&255;return t+n};c.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||G(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1};c.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||G(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Er(this,e,t,!0),t+2};c.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||G(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Er(this,e,t,!1),t+2};c.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||G(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Pr(this,e,t,!0),t+4};c.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||G(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Pr(this,e,t,!1),t+4};c.prototype.writeFloatLE=function(e,t,n){return Pi(this,e,t,!0,n)};c.prototype.writeFloatBE=function(e,t,n){return Pi(this,e,t,!1,n)};c.prototype.writeDoubleLE=function(e,t,n){return Ci(this,e,t,!0,n)};c.prototype.writeDoubleBE=function(e,t,n){return Ci(this,e,t,!1,n)};c.prototype.copy=function(e,t,n,a){if(n||(n=0),!a&&a!==0&&(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a<n&&(a=n),a===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t<a-n&&(a=e.length-t+n);var i=a-n,o;if(this===e&&n<t&&t<a)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i};c.prototype.fill=function(e,t,n,a){if(typeof e=="string"){if(typeof t=="string"?(a=t,t=0,n=this.length):typeof n=="string"&&(a=n,n=this.length),e.length===1){var i=e.charCodeAt(0);i<256&&(e=i)}if(a!==void 0&&typeof a!="string")throw new TypeError("encoding must be a string");if(typeof a=="string"&&!c.isEncoding(a))throw new TypeError("Unknown encoding: "+a)}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var o;if(typeof e=="number")for(o=t;o<n;++o)this[o]=e;else{var l=ie(e)?e:Ir(new c(e,a).toString()),f=l.length;for(o=0;o<n-t;++o)this[o+t]=l[o%f]}return this};fp=/[^+\/0-9A-Za-z-_]/g});var u=xt(()=>{"use strict";Ui()});var qn=x((w0,Bi)=>{"use strict";s();u();Bi.exports=Object});var ji=x((_0,Mi)=>{"use strict";s();u();Mi.exports=Error});var qi=x((R0,$i)=>{"use strict";s();u();$i.exports=EvalError});var Vi=x((I0,Di)=>{"use strict";s();u();Di.exports=RangeError});var zi=x((C0,Wi)=>{"use strict";s();u();Wi.exports=ReferenceError});var Dn=x((L0,Gi)=>{"use strict";s();u();Gi.exports=SyntaxError});var q=x((M0,Zi)=>{"use strict";s();u();Zi.exports=TypeError});var Yi=x((q0,Hi)=>{"use strict";s();u();Hi.exports=URIError});var Vn=x((W0,Ji)=>{"use strict";s();u();Ji.exports=Math.abs});var Wn=x((Z0,Ki)=>{"use strict";s();u();Ki.exports=Math.floor});var Qi=x((J0,Xi)=>{"use strict";s();u();Xi.exports=Math.max});var zn=x((Q0,eo)=>{"use strict";s();u();eo.exports=Math.min});var ro=x((rw,to)=>{"use strict";s();u();to.exports=Math.pow});var ao=x((iw,no)=>{"use strict";s();u();no.exports=Math.round});var Fr=x((uw,io)=>{"use strict";s();u();io.exports=Number.isNaN||function(e){return e!==e}});var so=x((fw,oo)=>{"use strict";s();u();var wp=Fr();oo.exports=function(e){return wp(e)||e===0?e:e<0?-1:1}});var lo=x((mw,uo)=>{"use strict";s();u();uo.exports=Object.getOwnPropertyDescriptor});var Tt=x((gw,co)=>{"use strict";s();u();var Lr=lo();if(Lr)try{Lr([],"length")}catch(r){Lr=null}co.exports=Lr});var zt=x((ww,fo)=>{"use strict";s();u();var Ur=Object.defineProperty||!1;if(Ur)try{Ur({},"a",{value:1})}catch(r){Ur=!1}fo.exports=Ur});var Gn=x((_w,po)=>{"use strict";s();u();po.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;e[t]=a;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 o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,t);if(l.value!==a||l.enumerable!==!0)return!1}return!0}});var Zn=x((Rw,ho)=>{"use strict";s();u();var mo=typeof Symbol!="undefined"&&Symbol,bp=Gn();ho.exports=function(){return typeof mo!="function"||typeof Symbol!="function"||typeof mo("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:bp()}});var Hn=x((Iw,yo)=>{"use strict";s();u();yo.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Yn=x((Cw,go)=>{"use strict";s();u();var Tp=qn();go.exports=Tp.getPrototypeOf||null});var wo=x((Lw,xo)=>{"use strict";s();u();var _p="Function.prototype.bind called on incompatible ",Sp=Object.prototype.toString,Ap=Math.max,Rp="[object Function]",vo=function(e,t){for(var n=[],a=0;a<e.length;a+=1)n[a]=e[a];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},kp=function(e,t){for(var n=[],a=t||0,i=0;a<e.length;a+=1,i+=1)n[i]=e[a];return n},Np=function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t};xo.exports=function(e){var t=this;if(typeof t!="function"||Sp.apply(t)!==Rp)throw new TypeError(_p+t);for(var n=kp(arguments,1),a,i=function(){if(this instanceof a){var y=t.apply(this,vo(n,arguments));return Object(y)===y?y:this}return t.apply(e,vo(n,arguments))},o=Ap(0,t.length-n.length),l=[],f=0;f<o;f++)l[f]="$"+f;if(a=Function("binder","return function ("+Np(l,",")+"){ return binder.apply(this,arguments); }")(i),t.prototype){var d=function(){};d.prototype=t.prototype,a.prototype=new d,d.prototype=null}return a}});var _t=x((Mw,bo)=>{"use strict";s();u();var Ip=wo();bo.exports=Function.prototype.bind||Ip});var Br=x((qw,To)=>{"use strict";s();u();To.exports=Function.prototype.call});var Mr=x((Ww,_o)=>{"use strict";s();u();_o.exports=Function.prototype.apply});var Ao=x((Zw,So)=>{"use strict";s();u();So.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Jn=x((Jw,Ro)=>{"use strict";s();u();var Ep=_t(),Pp=Mr(),Cp=Br(),Op=Ao();Ro.exports=Op||Ep.call(Cp,Pp)});var jr=x((Qw,ko)=>{"use strict";s();u();var Fp=_t(),Lp=q(),Up=Br(),Bp=Jn();ko.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new Lp("a function is required");return Bp(Fp,Up,e)}});var Oo=x((rb,Co)=>{"use strict";s();u();var Mp=jr(),No=Tt(),Eo;try{Eo=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var Kn=!!Eo&&No&&No(Object.prototype,"__proto__"),Po=Object,Io=Po.getPrototypeOf;Co.exports=Kn&&typeof Kn.get=="function"?Mp([Kn.get]):typeof Io=="function"?function(e){return Io(e==null?e:Po(e))}:!1});var Mo=x((ib,Bo)=>{"use strict";s();u();var Fo=Hn(),Lo=Yn(),Uo=Oo();Bo.exports=Fo?function(e){return Fo(e)}:Lo?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return Lo(e)}:Uo?function(e){return Uo(e)}:null});var Xn=x((ub,jo)=>{"use strict";s();u();var jp=Function.prototype.call,$p=Object.prototype.hasOwnProperty,qp=_t();jo.exports=qp.call(jp,$p)});var oe=x((fb,zo)=>{"use strict";s();u();var P,Dp=qn(),Vp=ji(),Wp=qi(),zp=Vi(),Gp=zi(),kt=Dn(),Rt=q(),Zp=Yi(),Hp=Vn(),Yp=Wn(),Jp=Qi(),Kp=zn(),Xp=ro(),Qp=ao(),ed=so(),Vo=Function,Qn=function(r){try{return Vo('"use strict"; return ('+r+").constructor;")()}catch(e){}},Gt=Tt(),td=zt(),ea=function(){throw new Rt},rd=Gt?(function(){try{return arguments.callee,ea}catch(r){try{return Gt(arguments,"callee").get}catch(e){return ea}}})():ea,St=Zn()(),D=Mo(),nd=Yn(),ad=Hn(),Wo=Mr(),Zt=Br(),At={},id=typeof Uint8Array=="undefined"||!D?P:D(Uint8Array),qe={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?P:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?P:ArrayBuffer,"%ArrayIteratorPrototype%":St&&D?D([][Symbol.iterator]()):P,"%AsyncFromSyncIteratorPrototype%":P,"%AsyncFunction%":At,"%AsyncGenerator%":At,"%AsyncGeneratorFunction%":At,"%AsyncIteratorPrototype%":At,"%Atomics%":typeof Atomics=="undefined"?P:Atomics,"%BigInt%":typeof BigInt=="undefined"?P:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?P:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?P:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?P:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Vp,"%eval%":eval,"%EvalError%":Wp,"%Float16Array%":typeof Float16Array=="undefined"?P:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?P:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?P:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?P:FinalizationRegistry,"%Function%":Vo,"%GeneratorFunction%":At,"%Int8Array%":typeof Int8Array=="undefined"?P:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?P:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?P:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":St&&D?D(D([][Symbol.iterator]())):P,"%JSON%":typeof JSON=="object"?JSON:P,"%Map%":typeof Map=="undefined"?P:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!St||!D?P:D(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Dp,"%Object.getOwnPropertyDescriptor%":Gt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?P:Promise,"%Proxy%":typeof Proxy=="undefined"?P:Proxy,"%RangeError%":zp,"%ReferenceError%":Gp,"%Reflect%":typeof Reflect=="undefined"?P:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?P:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!St||!D?P:D(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?P:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":St&&D?D(""[Symbol.iterator]()):P,"%Symbol%":St?Symbol:P,"%SyntaxError%":kt,"%ThrowTypeError%":rd,"%TypedArray%":id,"%TypeError%":Rt,"%Uint8Array%":typeof Uint8Array=="undefined"?P:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?P:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?P:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?P:Uint32Array,"%URIError%":Zp,"%WeakMap%":typeof WeakMap=="undefined"?P:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?P:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?P:WeakSet,"%Function.prototype.call%":Zt,"%Function.prototype.apply%":Wo,"%Object.defineProperty%":td,"%Object.getPrototypeOf%":nd,"%Math.abs%":Hp,"%Math.floor%":Yp,"%Math.max%":Jp,"%Math.min%":Kp,"%Math.pow%":Xp,"%Math.round%":Qp,"%Math.sign%":ed,"%Reflect.getPrototypeOf%":ad};if(D)try{null.error}catch(r){$o=D(D(r)),qe["%Error.prototype%"]=$o}var $o,od=function r(e){var t;if(e==="%AsyncFunction%")t=Qn("async function () {}");else if(e==="%GeneratorFunction%")t=Qn("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Qn("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var a=r("%AsyncGenerator%");a&&D&&(t=D(a.prototype))}return qe[e]=t,t},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"]},Ht=_t(),$r=Xn(),sd=Ht.call(Zt,Array.prototype.concat),ud=Ht.call(Wo,Array.prototype.splice),Do=Ht.call(Zt,String.prototype.replace),qr=Ht.call(Zt,String.prototype.slice),ld=Ht.call(Zt,RegExp.prototype.exec),cd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fd=/\\(\\)?/g,pd=function(e){var t=qr(e,0,1),n=qr(e,-1);if(t==="%"&&n!=="%")throw new kt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new kt("invalid intrinsic syntax, expected opening `%`");var a=[];return Do(e,cd,function(i,o,l,f){a[a.length]=l?Do(f,fd,"$1"):o||i}),a},dd=function(e,t){var n=e,a;if($r(qo,n)&&(a=qo[n],n="%"+a[0]+"%"),$r(qe,n)){var i=qe[n];if(i===At&&(i=od(n)),typeof i=="undefined"&&!t)throw new Rt("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:i}}throw new kt("intrinsic "+e+" does not exist!")};zo.exports=function(e,t){if(typeof e!="string"||e.length===0)throw new Rt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Rt('"allowMissing" argument must be a boolean');if(ld(/^%?[^%]*%?$/,e)===null)throw new kt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=pd(e),a=n.length>0?n[0]:"",i=dd("%"+a+"%",t),o=i.name,l=i.value,f=!1,d=i.alias;d&&(a=d[0],ud(n,sd([0,1],d)));for(var y=1,g=!0;y<n.length;y+=1){var _=n[y],E=qr(_,0,1),B=qr(_,-1);if((E==='"'||E==="'"||E==="`"||B==='"'||B==="'"||B==="`")&&E!==B)throw new kt("property names with quotes must have matching quotes");if((_==="constructor"||!g)&&(f=!0),a+="."+_,o="%"+a+"%",$r(qe,o))l=qe[o];else if(l!=null){if(!(_ in l)){if(!t)throw new Rt("base intrinsic for "+e+" exists, but the property is not available.");return}if(Gt&&y+1>=n.length){var j=Gt(l,_);g=!!j,g&&"get"in j&&!("originalValue"in j.get)?l=j.get:l=l[_]}else g=$r(l,_),l=l[_];g&&!f&&(qe[o]=l)}}return l}});var Dr=x((mb,Ho)=>{"use strict";s();u();var Go=zt(),md=Dn(),Nt=q(),Zo=Tt();Ho.exports=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Nt("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Nt("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Nt("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Nt("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Nt("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Nt("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,f=!!Zo&&Zo(e,t);if(Go)Go(e,t,{configurable:o===null&&f?f.configurable:!o,enumerable:a===null&&f?f.enumerable:!a,value:n,writable:i===null&&f?f.writable:!i});else if(l||!a&&!i&&!o)e[t]=n;else throw new md("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Vr=x((gb,Jo)=>{"use strict";s();u();var ta=zt(),Yo=function(){return!!ta};Yo.hasArrayLengthDefineBug=function(){if(!ta)return null;try{return ta([],"length",{value:1}).length!==1}catch(e){return!0}};Jo.exports=Yo});var ts=x((wb,es)=>{"use strict";s();u();var hd=oe(),Ko=Dr(),yd=Vr()(),Xo=Tt(),Qo=q(),gd=hd("%Math.floor%");es.exports=function(e,t){if(typeof e!="function")throw new Qo("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||gd(t)!==t)throw new Qo("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],a=!0,i=!0;if("length"in e&&Xo){var o=Xo(e,"length");o&&!o.configurable&&(a=!1),o&&!o.writable&&(i=!1)}return(a||i||!n)&&(yd?Ko(e,"length",t,!0,!0):Ko(e,"length",t)),e}});var ns=x((_b,rs)=>{"use strict";s();u();var vd=_t(),xd=Mr(),wd=Jn();rs.exports=function(){return wd(vd,xd,arguments)}});var zr=x((Rb,Wr)=>{"use strict";s();u();var bd=ts(),as=zt(),Td=jr(),is=ns();Wr.exports=function(e){var t=Td(arguments),n=e.length-(arguments.length-1);return bd(t,1+(n>0?n:0),!0)};as?as(Wr.exports,"apply",{value:is}):Wr.exports.apply=is});var ra=x((Ib,ss)=>{"use strict";s();u();var os=Object.prototype.toString;ss.exports=function(e){var t=os.call(e),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&os.call(e.callee)==="[object Function]"),n}});var ys=x((Cb,hs)=>{"use strict";s();u();var ms;Object.keys||(Yt=Object.prototype.hasOwnProperty,na=Object.prototype.toString,us=ra(),aa=Object.prototype.propertyIsEnumerable,ls=!aa.call({toString:null},"toString"),cs=aa.call(function(){},"prototype"),Jt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Gr=function(r){var e=r.constructor;return e&&e.prototype===r},fs={$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},ps=(function(){if(typeof window=="undefined")return!1;for(var r in window)try{if(!fs["$"+r]&&Yt.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{Gr(window[r])}catch(e){return!0}}catch(e){return!0}return!1})(),ds=function(r){if(typeof window=="undefined"||!ps)return Gr(r);try{return Gr(r)}catch(e){return!1}},ms=function(e){var t=e!==null&&typeof e=="object",n=na.call(e)==="[object Function]",a=us(e),i=t&&na.call(e)==="[object String]",o=[];if(!t&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var l=cs&&n;if(i&&e.length>0&&!Yt.call(e,0))for(var f=0;f<e.length;++f)o.push(String(f));if(a&&e.length>0)for(var d=0;d<e.length;++d)o.push(String(d));else for(var y in e)!(l&&y==="prototype")&&Yt.call(e,y)&&o.push(String(y));if(ls)for(var g=ds(e),_=0;_<Jt.length;++_)!(g&&Jt[_]==="constructor")&&Yt.call(e,Jt[_])&&o.push(Jt[_]);return o});var Yt,na,us,aa,ls,cs,Jt,Gr,fs,ps,ds;hs.exports=ms});var ws=x((Lb,xs)=>{"use strict";s();u();var _d=Array.prototype.slice,Sd=ra(),gs=Object.keys,Zr=gs?function(e){return gs(e)}:ys(),vs=Object.keys;Zr.shim=function(){if(Object.keys){var e=(function(){var t=Object.keys(arguments);return t&&t.length===arguments.length})(1,2);e||(Object.keys=function(n){return Sd(n)?vs(_d.call(n)):vs(n)})}else Object.keys=Zr;return Object.keys||Zr};xs.exports=Zr});var Hr=x((Mb,Ss)=>{"use strict";s();u();var Ad=ws(),Rd=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",kd=Object.prototype.toString,Nd=Array.prototype.concat,bs=Dr(),Id=function(r){return typeof r=="function"&&kd.call(r)==="[object Function]"},Ts=Vr()(),Ed=function(r,e,t,n){if(e in r){if(n===!0){if(r[e]===t)return}else if(!Id(n)||!n())return}Ts?bs(r,e,t,!0):bs(r,e,t)},_s=function(r,e){var t=arguments.length>2?arguments[2]:{},n=Ad(e);Rd&&(n=Nd.call(n,Object.getOwnPropertySymbols(e)));for(var a=0;a<n.length;a+=1)Ed(r,n[a],e[n[a]],t[n[a]])};_s.supportsDescriptors=!!Ts;Ss.exports=_s});var se=x((qb,ks)=>{"use strict";s();u();var As=oe(),Rs=jr(),Pd=Rs([As("%String.prototype.indexOf%")]);ks.exports=function(e,t){var n=As(e,!!t);return typeof n=="function"&&Pd(e,".prototype.")>-1?Rs([n]):n}});var Es=x((Wb,Is)=>{"use strict";s();u();var Cd=oe(),Ns=Cd("%Array%"),Od=!Ns.isArray&&se()("Object.prototype.toString");Is.exports=Ns.isArray||function(e){return Od(e)==="[object Array]"}});var ia=x((Zb,Ps)=>{"use strict";s();u();Ps.exports=Es()});var Os=x((Jb,Cs)=>{"use strict";s();u();var Fd=oe(),Ld=se(),Ud=q(),Bd=ia(),Md=Fd("%Reflect.apply%",!0)||Ld("Function.prototype.apply");Cs.exports=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!Bd(n))throw new Ud("Assertion failed: optional `argumentsList`, if provided, must be a List");return Md(e,t,n)}});function Fs(){throw new Error("setTimeout has not been defined")}function Ls(){throw new Error("clearTimeout has not been defined")}function Us(r){if(Ne===setTimeout)return setTimeout(r,0);if((Ne===Fs||!Ne)&&setTimeout)return Ne=setTimeout,setTimeout(r,0);try{return Ne(r,0)}catch(e){try{return Ne.call(null,r,0)}catch(t){return Ne.call(this,r,0)}}}function jd(r){if(Ie===clearTimeout)return clearTimeout(r);if((Ie===Ls||!Ie)&&clearTimeout)return Ie=clearTimeout,clearTimeout(r);try{return Ie(r)}catch(e){try{return Ie.call(null,r)}catch(t){return Ie.call(this,r)}}}function $d(){!Et||!De||(Et=!1,De.length?ge=De.concat(ge):Yr=-1,ge.length&&Bs())}function Bs(){if(!Et){var r=Us($d);Et=!0;for(var e=ge.length;e;){for(De=ge,ge=[];++Yr<e;)De&&De[Yr].run();Yr=-1,e=ge.length}De=null,Et=!1,jd(r)}}function qd(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ge.push(new Ms(r,e)),ge.length===1&&!Et&&Us(Bs)}function Ms(r,e){this.fun=r,this.array=e}function Ve(){}function am(r){throw new Error("process.binding is not supported")}function im(){return"/"}function om(r){throw new Error("process.chdir is not supported")}function sm(){return 0}function lm(r){var e=um.call(It)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}function fm(){var r=new Date,e=r-cm;return e/1e3}var Ne,Ie,ge,Et,De,Yr,Dd,Vd,Wd,zd,Gd,Zd,Hd,Yd,Jd,Kd,Xd,Qd,em,tm,rm,nm,It,um,cm,pm,Kt,js=xt(()=>{"use strict";s();u();Ne=Fs,Ie=Ls;typeof globalThis.setTimeout=="function"&&(Ne=setTimeout);typeof globalThis.clearTimeout=="function"&&(Ie=clearTimeout);ge=[],Et=!1,Yr=-1;Ms.prototype.run=function(){this.fun.apply(null,this.array)};Dd="browser",Vd="browser",Wd=!0,zd={},Gd=[],Zd="",Hd={},Yd={},Jd={};Kd=Ve,Xd=Ve,Qd=Ve,em=Ve,tm=Ve,rm=Ve,nm=Ve;It=globalThis.performance||{},um=It.now||It.mozNow||It.msNow||It.oNow||It.webkitNow||function(){return new Date().getTime()};cm=new Date;pm={nextTick:qd,title:Dd,browser:Wd,env:zd,argv:Gd,version:Zd,versions:Hd,on:Kd,addListener:Xd,once:Qd,off:em,removeListener:tm,removeAllListeners:rm,emit:nm,binding:am,cwd:im,chdir:om,umask:sm,hrtime:lm,platform:Vd,release:Yd,config:Jd,uptime:fm},Kt=pm});var oa,sa,$s=xt(()=>{"use strict";s();u();typeof Object.create=="function"?oa=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:oa=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};sa=oa});var Hs={};Rr(Hs,{_extend:()=>ya,debuglog:()=>qs,default:()=>Tm,deprecate:()=>pa,format:()=>Qr,inherits:()=>sa,inspect:()=>le,isArray:()=>da,isBoolean:()=>en,isBuffer:()=>zs,isDate:()=>Xr,isError:()=>Qt,isFunction:()=>er,isNull:()=>tr,isNullOrUndefined:()=>Ds,isNumber:()=>ma,isObject:()=>We,isPrimitive:()=>Ws,isRegExp:()=>Xt,isString:()=>rr,isSymbol:()=>Vs,isUndefined:()=>ue,log:()=>Gs});function Qr(r){if(!rr(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(le(arguments[t]));return e.join(" ")}for(var t=1,n=arguments,a=n.length,i=String(r).replace(dm,function(l){if(l==="%%")return"%";if(t>=a)return l;switch(l){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(f){return"[Circular]"}default:return l}}),o=n[t];t<a;o=n[++t])tr(o)||!We(o)?i+=" "+o:i+=" "+le(o);return i}function pa(r,e){if(ue(globalThis.process))return function(){return pa(r,e).apply(this,arguments)};if(Kt.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(Kt.throwDeprecation)throw new Error(e);Kt.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}function qs(r){if(ue(ua)&&(ua=Kt.env.NODE_DEBUG||""),r=r.toUpperCase(),!Jr[r])if(new RegExp("\\b"+r+"\\b","i").test(ua)){var e=0;Jr[r]=function(){var t=Qr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else Jr[r]=function(){};return Jr[r]}function le(r,e){var t={seen:[],stylize:hm};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),en(e)?t.showHidden=e:e&&ya(t,e),ue(t.showHidden)&&(t.showHidden=!1),ue(t.depth)&&(t.depth=2),ue(t.colors)&&(t.colors=!1),ue(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=mm),Kr(t,r,t.depth)}function mm(r,e){var t=le.styles[e];return t?"\x1B["+le.colors[t][0]+"m"+r+"\x1B["+le.colors[t][1]+"m":r}function hm(r,e){return r}function ym(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function Kr(r,e,t){if(r.customInspect&&e&&er(e.inspect)&&e.inspect!==le&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return rr(n)||(n=Kr(r,n,t)),n}var a=gm(r,e);if(a)return a;var i=Object.keys(e),o=ym(i);if(r.showHidden&&(i=Object.getOwnPropertyNames(e)),Qt(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return la(e);if(i.length===0){if(er(e)){var l=e.name?": "+e.name:"";return r.stylize("[Function"+l+"]","special")}if(Xt(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(Xr(e))return r.stylize(Date.prototype.toString.call(e),"date");if(Qt(e))return la(e)}var f="",d=!1,y=["{","}"];if(da(e)&&(d=!0,y=["[","]"]),er(e)){var g=e.name?": "+e.name:"";f=" [Function"+g+"]"}if(Xt(e)&&(f=" "+RegExp.prototype.toString.call(e)),Xr(e)&&(f=" "+Date.prototype.toUTCString.call(e)),Qt(e)&&(f=" "+la(e)),i.length===0&&(!d||e.length==0))return y[0]+f+y[1];if(t<0)return Xt(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var _;return d?_=vm(r,e,t,o,i):_=i.map(function(E){return fa(r,e,t,o,E,d)}),r.seen.pop(),xm(_,f,y)}function gm(r,e){if(ue(e))return r.stylize("undefined","undefined");if(rr(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(ma(e))return r.stylize(""+e,"number");if(en(e))return r.stylize(""+e,"boolean");if(tr(e))return r.stylize("null","null")}function la(r){return"["+Error.prototype.toString.call(r)+"]"}function vm(r,e,t,n,a){for(var i=[],o=0,l=e.length;o<l;++o)Zs(e,String(o))?i.push(fa(r,e,t,n,String(o),!0)):i.push("");return a.forEach(function(f){f.match(/^\d+$/)||i.push(fa(r,e,t,n,f,!0))}),i}function fa(r,e,t,n,a,i){var o,l,f;if(f=Object.getOwnPropertyDescriptor(e,a)||{value:e[a]},f.get?f.set?l=r.stylize("[Getter/Setter]","special"):l=r.stylize("[Getter]","special"):f.set&&(l=r.stylize("[Setter]","special")),Zs(n,a)||(o="["+a+"]"),l||(r.seen.indexOf(f.value)<0?(tr(t)?l=Kr(r,f.value,null):l=Kr(r,f.value,t-1),l.indexOf(`
|
|
2
|
+
`)>-1&&(i?l=l.split(`
|
|
3
|
+
`).map(function(d){return" "+d}).join(`
|
|
4
|
+
`).substr(2):l=`
|
|
5
|
+
`+l.split(`
|
|
6
|
+
`).map(function(d){return" "+d}).join(`
|
|
7
|
+
`))):l=r.stylize("[Circular]","special")),ue(o)){if(i&&a.match(/^\d+$/))return l;o=JSON.stringify(""+a),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=r.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=r.stylize(o,"string"))}return o+": "+l}function xm(r,e,t){var n=0,a=r.reduce(function(i,o){return n++,o.indexOf(`
|
|
8
|
+
`)>=0&&n++,i+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?t[0]+(e===""?"":e+`
|
|
9
|
+
`)+" "+r.join(`,
|
|
10
|
+
`)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function da(r){return Array.isArray(r)}function en(r){return typeof r=="boolean"}function tr(r){return r===null}function Ds(r){return r==null}function ma(r){return typeof r=="number"}function rr(r){return typeof r=="string"}function Vs(r){return typeof r=="symbol"}function ue(r){return r===void 0}function Xt(r){return We(r)&&ha(r)==="[object RegExp]"}function We(r){return typeof r=="object"&&r!==null}function Xr(r){return We(r)&&ha(r)==="[object Date]"}function Qt(r){return We(r)&&(ha(r)==="[object Error]"||r instanceof Error)}function er(r){return typeof r=="function"}function Ws(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r=="undefined"}function zs(r){return c.isBuffer(r)}function ha(r){return Object.prototype.toString.call(r)}function ca(r){return r<10?"0"+r.toString(10):r.toString(10)}function bm(){var r=new Date,e=[ca(r.getHours()),ca(r.getMinutes()),ca(r.getSeconds())].join(":");return[r.getDate(),wm[r.getMonth()],e].join(" ")}function Gs(){console.log("%s - %s",bm(),Qr.apply(null,arguments))}function ya(r,e){if(!e||!We(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function Zs(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var dm,Jr,ua,wm,Tm,Ys=xt(()=>{"use strict";s();u();js();$s();dm=/%[sdj%]/g;Jr={};le.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]};le.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};wm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Tm={inherits:sa,_extend:ya,log:Gs,isBuffer:zs,isPrimitive:Ws,isFunction:er,isError:Qt,isDate:Xr,isObject:We,isRegExp:Xt,isUndefined:ue,isSymbol:Vs,isString:rr,isNumber:ma,isNullOrUndefined:Ds,isNull:tr,isBoolean:en,isArray:da,inspect:le,deprecate:pa,format:Qr,debuglog:qs}});var Js=x((lT,tn)=>{"use strict";s();u();var ze=(Ys(),di(Hs));if(ze&&ze.default){tn.exports=ze.default;for(let r in ze)tn.exports[r]=ze[r]}else ze&&(tn.exports=ze)});var Xs=x((pT,Ks)=>{"use strict";s();u();Ks.exports=Js().inspect});var sr=x((hT,vu)=>{"use strict";s();u();var Ra=typeof Map=="function"&&Map.prototype,ga=Object.getOwnPropertyDescriptor&&Ra?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,nn=Ra&&ga&&typeof ga.get=="function"?ga.get:null,Qs=Ra&&Map.prototype.forEach,ka=typeof Set=="function"&&Set.prototype,va=Object.getOwnPropertyDescriptor&&ka?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,an=ka&&va&&typeof va.get=="function"?va.get:null,eu=ka&&Set.prototype.forEach,_m=typeof WeakMap=="function"&&WeakMap.prototype,ar=_m?WeakMap.prototype.has:null,Sm=typeof WeakSet=="function"&&WeakSet.prototype,ir=Sm?WeakSet.prototype.has:null,Am=typeof WeakRef=="function"&&WeakRef.prototype,tu=Am?WeakRef.prototype.deref:null,Rm=Boolean.prototype.valueOf,km=Object.prototype.toString,Nm=Function.prototype.toString,Im=String.prototype.match,Na=String.prototype.slice,Ee=String.prototype.replace,Em=String.prototype.toUpperCase,ru=String.prototype.toLowerCase,fu=RegExp.prototype.test,nu=Array.prototype.concat,ce=Array.prototype.join,Pm=Array.prototype.slice,au=Math.floor,ba=typeof BigInt=="function"?BigInt.prototype.valueOf:null,xa=Object.getOwnPropertySymbols,Ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Pt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",or=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Pt||!0)?Symbol.toStringTag:null,pu=Object.prototype.propertyIsEnumerable,iu=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function ou(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||fu.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-au(-r):au(r);if(n!==r){var a=String(n),i=Na.call(e,a.length+1);return Ee.call(a,t,"$&_")+"."+Ee.call(Ee.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ee.call(e,t,"$&_")}var _a=Xs(),su=_a.custom,uu=hu(su)?su:null,du={__proto__:null,double:'"',single:"'"},Cm={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};vu.exports=function r(e,t,n,a){var i=t||{};if(ve(i,"quoteStyle")&&!ve(du,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ve(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 o=ve(i,"customInspect")?i.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ve(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(ve(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 gu(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var f=String(e);return l?ou(e,f):f}if(typeof e=="bigint"){var d=String(e)+"n";return l?ou(e,d):d}var y=typeof i.depth=="undefined"?5:i.depth;if(typeof n=="undefined"&&(n=0),n>=y&&y>0&&typeof e=="object")return Sa(e)?"[Array]":"[Object]";var g=Jm(i,n);if(typeof a=="undefined")a=[];else if(yu(a,e)>=0)return"[Circular]";function _(vt,Sr,cf){if(Sr&&(a=Pm.call(a),a.push(Sr)),cf){var ui={depth:i.depth};return ve(i,"quoteStyle")&&(ui.quoteStyle=i.quoteStyle),r(vt,ui,n+1,a)}return r(vt,i,n+1,a)}if(typeof e=="function"&&!lu(e)){var E=qm(e),B=rn(e,_);return"[Function"+(E?": "+E:" (anonymous)")+"]"+(B.length>0?" { "+ce.call(B,", ")+" }":"")}if(hu(e)){var j=Pt?Ee.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ta.call(e);return typeof e=="object"&&!Pt?nr(j):j}if(Zm(e)){for(var z="<"+ru.call(String(e.nodeName)),J=e.attributes||[],me=0;me<J.length;me++)z+=" "+J[me].name+"="+mu(Om(J[me].value),"double",i);return z+=">",e.childNodes&&e.childNodes.length&&(z+="..."),z+="</"+ru.call(String(e.nodeName))+">",z}if(Sa(e)){if(e.length===0)return"[]";var Be=rn(e,_);return g&&!Ym(Be)?"["+Aa(Be,g)+"]":"[ "+ce.call(Be,", ")+" ]"}if(Lm(e)){var Vt=rn(e,_);return!("cause"in Error.prototype)&&"cause"in e&&!pu.call(e,"cause")?"{ ["+String(e)+"] "+ce.call(nu.call("[cause]: "+_(e.cause),Vt),", ")+" }":Vt.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+ce.call(Vt,", ")+" }"}if(typeof e=="object"&&o){if(uu&&typeof e[uu]=="function"&&_a)return _a(e,{depth:y-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Dm(e)){var _r=[];return Qs&&Qs.call(e,function(vt,Sr){_r.push(_(Sr,e,!0)+" => "+_(vt,e))}),cu("Map",nn.call(e),_r,g)}if(zm(e)){var ii=[];return eu&&eu.call(e,function(vt){ii.push(_(vt,e))}),cu("Set",an.call(e),ii,g)}if(Vm(e))return wa("WeakMap");if(Gm(e))return wa("WeakSet");if(Wm(e))return wa("WeakRef");if(Bm(e))return nr(_(Number(e)));if(jm(e))return nr(_(ba.call(e)));if(Mm(e))return nr(Rm.call(e));if(Um(e))return nr(_(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(!Fm(e)&&!lu(e)){var Cn=rn(e,_),oi=iu?iu(e)===Object.prototype:e instanceof Object||e.constructor===Object,On=e instanceof Object?"":"null prototype",si=!oi&&or&&Object(e)===e&&or in e?Na.call(Pe(e),8,-1):On?"Object":"",lf=oi||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Fn=lf+(si||On?"["+ce.call(nu.call([],si||[],On||[]),": ")+"] ":"");return Cn.length===0?Fn+"{}":g?Fn+"{"+Aa(Cn,g)+"}":Fn+"{ "+ce.call(Cn,", ")+" }"}return String(e)};function mu(r,e,t){var n=t.quoteStyle||e,a=du[n];return a+r+a}function Om(r){return Ee.call(String(r),/"/g,""")}function Ge(r){return!or||!(typeof r=="object"&&(or in r||typeof r[or]!="undefined"))}function Sa(r){return Pe(r)==="[object Array]"&&Ge(r)}function Fm(r){return Pe(r)==="[object Date]"&&Ge(r)}function lu(r){return Pe(r)==="[object RegExp]"&&Ge(r)}function Lm(r){return Pe(r)==="[object Error]"&&Ge(r)}function Um(r){return Pe(r)==="[object String]"&&Ge(r)}function Bm(r){return Pe(r)==="[object Number]"&&Ge(r)}function Mm(r){return Pe(r)==="[object Boolean]"&&Ge(r)}function hu(r){if(Pt)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Ta)return!1;try{return Ta.call(r),!0}catch(e){}return!1}function jm(r){if(!r||typeof r!="object"||!ba)return!1;try{return ba.call(r),!0}catch(e){}return!1}var $m=Object.prototype.hasOwnProperty||function(r){return r in this};function ve(r,e){return $m.call(r,e)}function Pe(r){return km.call(r)}function qm(r){if(r.name)return r.name;var e=Im.call(Nm.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function yu(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function Dm(r){if(!nn||!r||typeof r!="object")return!1;try{nn.call(r);try{an.call(r)}catch(e){return!0}return r instanceof Map}catch(e){}return!1}function Vm(r){if(!ar||!r||typeof r!="object")return!1;try{ar.call(r,ar);try{ir.call(r,ir)}catch(e){return!0}return r instanceof WeakMap}catch(e){}return!1}function Wm(r){if(!tu||!r||typeof r!="object")return!1;try{return tu.call(r),!0}catch(e){}return!1}function zm(r){if(!an||!r||typeof r!="object")return!1;try{an.call(r);try{nn.call(r)}catch(e){return!0}return r instanceof Set}catch(e){}return!1}function Gm(r){if(!ir||!r||typeof r!="object")return!1;try{ir.call(r,ir);try{ar.call(r,ar)}catch(e){return!0}return r instanceof WeakSet}catch(e){}return!1}function Zm(r){return!r||typeof r!="object"?!1:typeof HTMLElement!="undefined"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function gu(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return gu(Na.call(r,0,e.maxStringLength),e)+n}var a=Cm[e.quoteStyle||"single"];a.lastIndex=0;var i=Ee.call(Ee.call(r,a,"\\$1"),/[\x00-\x1f]/g,Hm);return mu(i,"single",e)}function Hm(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+Em.call(e.toString(16))}function nr(r){return"Object("+r+")"}function wa(r){return r+" { ? }"}function cu(r,e,t,n){var a=n?Aa(t,n):ce.call(t,", ");return r+" ("+e+") {"+a+"}"}function Ym(r){for(var e=0;e<r.length;e++)if(yu(r[e],`
|
|
11
|
+
`)>=0)return!1;return!0}function Jm(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=ce.call(Array(r.indent+1)," ");else return null;return{base:t,prev:ce.call(Array(e+1),t)}}function Aa(r,e){if(r.length===0)return"";var t=`
|
|
12
|
+
`+e.prev+e.base;return t+ce.call(r,","+t)+`
|
|
13
|
+
`+e.prev}function rn(r,e){var t=Sa(r),n=[];if(t){n.length=r.length;for(var a=0;a<r.length;a++)n[a]=ve(r,a)?e(r[a],r):""}var i=typeof xa=="function"?xa(r):[],o;if(Pt){o={};for(var l=0;l<i.length;l++)o["$"+i[l]]=i[l]}for(var f in r)ve(r,f)&&(t&&String(Number(f))===f&&f<r.length||Pt&&o["$"+f]instanceof Symbol||(fu.call(/[^\w$]/,f)?n.push(e(f,r)+": "+e(r[f],r)):n.push(f+": "+e(r[f],r))));if(typeof xa=="function")for(var d=0;d<i.length;d++)pu.call(r,i[d])&&n.push("["+e(i[d])+"]: "+e(r[i[d]],r));return n}});var on=x((vT,xu)=>{"use strict";s();u();xu.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var bu=x((bT,wu)=>{"use strict";s();u();var Km=q(),Xm=sr(),Qm=on();wu.exports=function(e,t){if(!Qm(t))throw new Km("Assertion failed: P is not a Property Key, got "+Xm(t));return e[t]}});var Au=x((ST,Su)=>{"use strict";s();u();var _u=Function.prototype.toString,Ct=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ea,sn;if(typeof Ct=="function"&&typeof Object.defineProperty=="function")try{Ea=Object.defineProperty({},"length",{get:function(){throw sn}}),sn={},Ct(function(){throw 42},null,Ea)}catch(r){r!==sn&&(Ct=null)}else Ct=null;var eh=/^\s*class\b/,Pa=function(e){try{var t=_u.call(e);return eh.test(t)}catch(n){return!1}},Ia=function(e){try{return Pa(e)?!1:(_u.call(e),!0)}catch(t){return!1}},un=Object.prototype.toString,th="[object Object]",rh="[object Function]",nh="[object GeneratorFunction]",ah="[object HTMLAllCollection]",ih="[object HTML document.all class]",oh="[object HTMLCollection]",sh=typeof Symbol=="function"&&!!Symbol.toStringTag,uh=!(0 in[,]),Ca=function(){return!1};typeof document=="object"&&(Tu=document.all,un.call(Tu)===un.call(document.all)&&(Ca=function(e){if((uh||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var t=un.call(e);return(t===ah||t===ih||t===oh||t===th)&&e("")==null}catch(n){}return!1}));var Tu;Su.exports=Ct?function(e){if(Ca(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Ct(e,null,Ea)}catch(t){if(t!==sn)return!1}return!Pa(e)&&Ia(e)}:function(e){if(Ca(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(sh)return Ia(e);if(Pa(e))return!1;var t=un.call(e);return t!==rh&&t!==nh&&!/^\[object HTML/.test(t)?!1:Ia(e)}});var Oa=x((kT,Ru)=>{"use strict";s();u();Ru.exports=Au()});var Eu=x((ET,Iu)=>{"use strict";s();u();var ku=q(),lh=bu(),ch=Oa(),fh=on(),Nu=sr();Iu.exports=function(e,t){if(!fh(t))throw new ku("Assertion failed: P is not a Property Key");var n=lh(e,t);if(n!=null){if(!ch(n))throw new ku(Nu(t)+" is not a function: "+Nu(n));return n}}});var Cu=x((OT,Pu)=>{"use strict";s();u();var ph=Fr();Pu.exports=function(e){return(typeof e=="number"||typeof e=="bigint")&&!ph(e)&&e!==1/0&&e!==-1/0}});var ln=x((UT,Ou)=>{"use strict";s();u();var dh=Vn(),mh=Wn(),hh=Fr(),yh=Cu();Ou.exports=function(e){if(typeof e!="number"||hh(e)||!yh(e))return!1;var t=dh(e);return mh(t)===t}});var Fa=x((jT,Fu)=>{"use strict";s();u();Fu.exports=function(e){return!!e&&(typeof e=="function"||typeof e=="object")}});var Uu=x((DT,Lu)=>{"use strict";s();u();var gh=Gn();Lu.exports=function(){return gh()&&!!Symbol.toStringTag}});var Ma=x((zT,qu)=>{"use strict";s();u();var Bu=se(),vh=Uu()(),xh=Xn(),wh=Tt(),Ba;vh?(Mu=Bu("RegExp.prototype.exec"),La={},cn=function(){throw La},Ua={toString:cn,valueOf:cn},typeof Symbol.toPrimitive=="symbol"&&(Ua[Symbol.toPrimitive]=cn),Ba=function(e){if(!e||typeof e!="object")return!1;var t=wh(e,"lastIndex"),n=t&&xh(t,"value");if(!n)return!1;try{Mu(e,Ua)}catch(a){return a===La}}):(ju=Bu("Object.prototype.toString"),$u="[object RegExp]",Ba=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:ju(e)===$u});var Mu,La,cn,Ua,ju,$u;qu.exports=Ba});var ja=x((HT,Du)=>{"use strict";s();u();var bh=se(),Th=Ma(),_h=bh("RegExp.prototype.exec"),Sh=q();Du.exports=function(e){if(!Th(e))throw new Sh("`regex` must be a RegExp");return function(n){return _h(e,n)!==null}}});var zu=x((KT,Wu)=>{"use strict";s();u();var Vu=q(),Ah=sr(),Rh=on(),kh=Fa();Wu.exports=function(e,t){if(!kh(e))throw new Vu("Assertion failed: Type(O) is not Object");if(!Rh(t))throw new Vu("Assertion failed: P is not a Property Key, got "+Ah(t));return e[t]}});var Zu=x((e_,Gu)=>{"use strict";s();u();Gu.exports=zn()});var qa=x((n_,Hu)=>{"use strict";s();u();var Nh=se(),$a=q(),Ih=ln(),Eh=Nh("String.prototype.slice");Hu.exports=function(e,t,n){if(typeof e!="string")throw new $a("Assertion failed: `string` must be a String");if(typeof t!="string")throw new $a("Assertion failed: `searchValue` must be a String");if(!Ih(n)||n<0)throw new $a("Assertion failed: `fromIndex` must be a non-negative integer");var a=e.length;if(t===""&&n<=a)return n;for(var i=t.length,o=n;o<=a-i;o+=1){var l=Eh(e,o,o+i);if(l===t)return o}return"NOT-FOUND"}});var fn=x((o_,Yu)=>{"use strict";s();u();var Ph=q();Yu.exports=function(e){if(e==null)throw new Ph(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var Ku=x((l_,Ju)=>{"use strict";s();u();var Ch=oe(),Oh=Ch("%String%"),Fh=q();Ju.exports=function(e){if(typeof e=="symbol")throw new Fh("Cannot convert a Symbol value to a string");return Oh(e)}});var Da=x((p_,el)=>{"use strict";s();u();var Lh=fn(),Uh=Ku(),Bh=se(),Xu=Bh("String.prototype.replace"),Qu=/^\s$/.test("\u180E"),Mh=Qu?/^[\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]+/,jh=Qu?/[\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]+$/;el.exports=function(){var e=Uh(Lh(this));return Xu(Xu(e,Mh,""),jh,"")}});var Va=x((h_,rl)=>{"use strict";s();u();var $h=Da(),tl="\u200B",Ot="\u180E";rl.exports=function(){return String.prototype.trim&&tl.trim()===tl&&Ot.trim()===Ot&&("_"+Ot).trim()==="_"+Ot&&(Ot+"_").trim()===Ot+"_"?String.prototype.trim:$h}});var il=x((v_,al)=>{"use strict";s();u();var qh=Vr()(),nl=Dr(),Dh=Va();al.exports=function(){var e=Dh();return String.prototype.trim!==e&&(qh?nl(String.prototype,"trim",e,!0):nl(String.prototype,"trim",e)),e}});var ll=x((b_,ul)=>{"use strict";s();u();var Vh=zr(),Wh=Hr(),zh=fn(),Gh=Da(),ol=Va(),Zh=il(),Hh=Vh(ol()),sl=function(e){return zh(e),Hh(e)};Wh(sl,{getPolyfill:ol,implementation:Gh,shim:Zh});ul.exports=sl});var ml=x((S_,dl)=>{"use strict";s();u();var pl=oe(),Yh=pl("%RegExp%"),Jh=q(),cl=pl("%parseInt%"),Kh=se(),pn=ja(),fl=Kh("String.prototype.slice"),Xh=pn(/^0b[01]+$/i),Qh=pn(/^0o[0-7]+$/i),ey=pn(/^[-+]0x[0-9a-f]+$/i),ty=["\x85","\u200B","\uFFFE"].join(""),ry=new Yh("["+ty+"]","g"),ny=pn(ry),ay=ll();dl.exports=function r(e){if(typeof e!="string")throw new Jh("Assertion failed: `argument` is not a String");if(Xh(e))return+cl(fl(e,2),2);if(Qh(e))return+cl(fl(e,2),8);if(ny(e)||ey(e))return NaN;var t=ay(e);return t!==e?r(t):+e}});var gl=x((k_,yl)=>{"use strict";s();u();var iy=q(),hl=ln(),oy=se(),sy=oy("String.prototype.slice");yl.exports=function(e,t,n){if(typeof e!="string"||!hl(t)||arguments.length>2&&!hl(n))throw new iy("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return sy(e,t,arguments.length>2?n:e.length)}});var Wa=x((E_,vl)=>{"use strict";s();u();var uy=oe(),ly=uy("%String%"),cy=q();vl.exports=function(e){if(typeof e=="symbol")throw new cy("Cannot convert a Symbol value to a string");return ly(e)}});var wl=x((O_,xl)=>{"use strict";s();u();xl.exports=function(e,t){for(var n=0;n<e.length;n+=1)if(!t(e[n],n,e))return!1;return!0}});var Tl=x((U_,bl)=>{"use strict";s();u();var fy=se()("String.prototype.slice");bl.exports=function(e,t){return e===t?!0:e.length>t.length?!1:fy(t,0,e.length)===e}});var Sl=x((j_,_l)=>{"use strict";s();u();_l.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var Il=x((D_,Nl)=>{"use strict";s();u();var xe=q(),za=sr(),py=ln(),Al=Fa(),kl=ja(),dy=zu(),my=ia(),hy=Zu(),yy=qa(),Rl=ml(),we=gl(),gy=Wa(),vy=wl(),ur=Tl(),xy=Sl(),wy=kl(/^\$[0-9]/),by=kl(/^\$[0-9][0-9]/);Nl.exports=function(e,t,n,a,i,o){if(typeof e!="string")throw new xe("Assertion failed: `matched` must be a String");if(typeof t!="string")throw new xe("Assertion failed: `str` must be a String");if(!py(n)||n<0)throw new xe("Assertion failed: `position` must be a nonnegative integer, got "+za(n));if(!my(a)||!vy(a,xy))throw new xe("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+za(a));if(typeof i!="undefined"&&!Al(i))throw new xe("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof o!="string")throw new xe("Assertion failed: `replacementTemplate` must be a String");var l=t.length;if(n>l)throw new xe("Assertion failed: position > stringLength, got "+za(n));for(var f=o,d="";f!=="";){var y,g,_;if(ur("$$",f))y="$$",g="$";else if(ur("$`",f))y="$`",g=we(t,0,n);else if(ur("$&",f))y="$&",g=e;else if(ur("$'",f)){y="$'";var E=e.length,B=n+E;g=we(t,hy(B,l))}else if(wy(f)){var j=by(f)?2:1,z=we(f,1,1+j),J=Rl(z);if(J<0||J>99)throw new xe("Assertion failed: `index` must be >= 0 and <= 99");var me=a.length;J>me&&j===2&&(j=1,z=we(z,0,1),J=Rl(z)),y=we(f,0,1+j),1<=J&&J<=me?(_=a[J-1],typeof _=="undefined"?g="":g=_):g=y}else if(ur("$<",f)){var Be=yy(f,">",0);if(!(Be>-1)||typeof i=="undefined")y="$<",g=y;else{y=we(f,0,Be+1);var Vt=we(f,2,Be);if(!Al(i))throw new xe("Assertion failed: Type(namedCaptures) is not Object");_=dy(i,Vt),typeof _=="undefined"?g="":g=gy(_)}}else y=we(f,0,1),g=y;var _r=y.length;f=we(f,_r),d+=g}return d}});var Ol=x((z_,Cl)=>{"use strict";s();u();var El=oe(),Pl=zr(),Ty=Pl(El("String.prototype.indexOf"));Cl.exports=function(e,t){var n=El(e,!!t);return typeof n=="function"&&Ty(e,".prototype.")>-1?Pl(n):n}});var Za=x((H_,Bl)=>{"use strict";s();u();var Fl=Os(),_y=Eu(),Sy=Il(),Ay=Oa(),Ry=fn(),dn=Wa(),Ll=qa(),ky=oe(),mn=Ol(),Ny=Zn()(),Iy=Ma(),Ey=ky("%Math.max%"),Ul=q(),Py=mn("Array.prototype.push"),Ga=mn("String.prototype.slice"),Cy=mn("String.prototype.indexOf"),Oy=mn("String.prototype.replace");Bl.exports=function(e,t){var n=Ry(this),a=Iy(e);if(a&&Cy(Ga(e,e.source.length+2),"g")===-1)throw new Ul("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Ny&&Symbol.replace){if(e!=null){var i=_y(e,Symbol.replace);if(typeof i!="undefined")return Fl(i,e,[n,t])}}else if(a)return Oy(n,e,t);var o=dn(n),l=dn(e),f=Ay(t);f||(t=dn(t));for(var d=l.length,y=Ey(1,d),g=[],_=Ll(o,l,0);_!=="NOT-FOUND";)Py(g,_),_=Ll(o,l,_+y);for(var E=0,B="",j=0;j<g.length;j+=1){var z;if(f)z=dn(Fl(t,void 0,[l,g[j],o]));else{if(typeof t!="string")throw new Ul("Assertion failed: `replaceValue` should be a string at this point");var J=[];z=Sy(l,o,g[j],J,void 0,t)}var me=Ga(o,E,g[j]);B+=me+z,E=g[j]+d}return E<o.length&&(B+=Ga(o,E)),B}});var Ha=x((K_,Ml)=>{"use strict";s();u();var Fy=Za();Ml.exports=function(){return String.prototype.replaceAll||Fy}});var $l=x((eS,jl)=>{"use strict";s();u();var Ly=Hr(),Uy=Ha();jl.exports=function(){var e=Uy();return Ly(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var Wl=x((nS,Vl)=>{"use strict";s();u();var By=zr(),My=Hr(),ql=Za(),jy=Ha(),$y=$l(),Dl=By(ql);My(Dl,{getPolyfill:jy,implementation:ql,shim:$y});Vl.exports=Dl});var p0={};Rr(p0,{DynamicSnippetsGenerator:()=>Pn});module.exports=di(p0);s();u();var aP=gf(Wl(),1);s();u();s();u();s();u();function O(r){throw new Error("Unexpected value: "+JSON.stringify(r))}s();u();s();u();s();u();s();u();s();u();s();u();var qy=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,zl=qy;var Dy=typeof self=="object"&&self&&self.Object===Object&&self,Vy=zl||Dy||Function("return this")(),Gl=Vy;var Wy=Gl.Symbol,be=Wy;s();u();var Zl=Object.prototype,zy=Zl.hasOwnProperty,Gy=Zl.toString,lr=be?be.toStringTag:void 0;function Zy(r){var e=zy.call(r,lr),t=r[lr];try{r[lr]=void 0;var n=!0}catch(i){}var a=Gy.call(r);return n&&(e?r[lr]=t:delete r[lr]),a}var Hl=Zy;s();u();var Hy=Object.prototype,Yy=Hy.toString;function Jy(r){return Yy.call(r)}var Yl=Jy;var Ky="[object Null]",Xy="[object Undefined]",Jl=be?be.toStringTag:void 0;function Qy(r){return r==null?r===void 0?Xy:Ky:Jl&&Jl in Object(r)?Hl(r):Yl(r)}var Kl=Qy;s();u();function eg(r){return r!=null&&typeof r=="object"}var Xl=eg;var tg="[object Symbol]";function rg(r){return typeof r=="symbol"||Xl(r)&&Kl(r)==tg}var Ql=rg;s();u();s();u();function ng(r,e){for(var t=-1,n=r==null?0:r.length,a=Array(n);++t<n;)a[t]=e(r[t],t,r);return a}var ec=ng;s();u();var ag=Array.isArray,tc=ag;var ig=1/0,rc=be?be.prototype:void 0,nc=rc?rc.toString:void 0;function ac(r){if(typeof r=="string")return r;if(tc(r))return ec(r,ac)+"";if(Ql(r))return nc?nc.call(r):"";var e=r+"";return e=="0"&&1/r==-ig?"-0":e}var ic=ac;s();u();function og(r){return r==null?"":ic(r)}var Ce=og;s();u();s();u();s();u();s();u();s();u();s();u();function sg(r,e,t){var n=-1,a=r.length;e<0&&(e=-e>a?0:a+e),t=t>a?a:t,t<0&&(t+=a),a=e>t?0:t-e>>>0,e>>>=0;for(var i=Array(a);++n<a;)i[n]=r[n+e];return i}var oc=sg;function ug(r,e,t){var n=r.length;return t=t===void 0?n:t,!e&&t>=n?r:oc(r,e,t)}var sc=ug;s();u();var lg="\\ud800-\\udfff",cg="\\u0300-\\u036f",fg="\\ufe20-\\ufe2f",pg="\\u20d0-\\u20ff",dg=cg+fg+pg,mg="\\ufe0e\\ufe0f",hg="\\u200d",yg=RegExp("["+hg+lg+dg+mg+"]");function gg(r){return yg.test(r)}var hn=gg;s();u();s();u();function vg(r){return r.split("")}var uc=vg;s();u();var lc="\\ud800-\\udfff",xg="\\u0300-\\u036f",wg="\\ufe20-\\ufe2f",bg="\\u20d0-\\u20ff",Tg=xg+wg+bg,_g="\\ufe0e\\ufe0f",Sg="["+lc+"]",Ya="["+Tg+"]",Ja="\\ud83c[\\udffb-\\udfff]",Ag="(?:"+Ya+"|"+Ja+")",cc="[^"+lc+"]",fc="(?:\\ud83c[\\udde6-\\uddff]){2}",pc="[\\ud800-\\udbff][\\udc00-\\udfff]",Rg="\\u200d",dc=Ag+"?",mc="["+_g+"]?",kg="(?:"+Rg+"(?:"+[cc,fc,pc].join("|")+")"+mc+dc+")*",Ng=mc+dc+kg,Ig="(?:"+[cc+Ya+"?",Ya,fc,pc,Sg].join("|")+")",Eg=RegExp(Ja+"(?="+Ja+")|"+Ig+Ng,"g");function Pg(r){return r.match(Eg)||[]}var hc=Pg;function Cg(r){return hn(r)?hc(r):uc(r)}var yc=Cg;function Og(r){return function(e){e=Ce(e);var t=hn(e)?yc(e):void 0,n=t?t[0]:e.charAt(0),a=t?sc(t,1).join(""):e.slice(1);return n[r]()+a}}var gc=Og;var Fg=gc("toUpperCase"),vc=Fg;function Lg(r){return vc(Ce(r).toLowerCase())}var xc=Lg;s();u();s();u();function Ug(r,e,t,n){var a=-1,i=r==null?0:r.length;for(n&&i&&(t=r[++a]);++a<i;)t=e(t,r[a],a,r);return t}var wc=Ug;s();u();s();u();s();u();function Bg(r){return function(e){return r==null?void 0:r[e]}}var bc=Bg;var Mg={\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"},jg=bc(Mg),Tc=jg;var $g=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qg="\\u0300-\\u036f",Dg="\\ufe20-\\ufe2f",Vg="\\u20d0-\\u20ff",Wg=qg+Dg+Vg,zg="["+Wg+"]",Gg=RegExp(zg,"g");function Zg(r){return r=Ce(r),r&&r.replace($g,Tc).replace(Gg,"")}var _c=Zg;s();u();s();u();var Hg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Yg(r){return r.match(Hg)||[]}var Sc=Yg;s();u();var Jg=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Kg(r){return Jg.test(r)}var Ac=Kg;s();u();var Ec="\\ud800-\\udfff",Xg="\\u0300-\\u036f",Qg="\\ufe20-\\ufe2f",ev="\\u20d0-\\u20ff",tv=Xg+Qg+ev,Pc="\\u2700-\\u27bf",Cc="a-z\\xdf-\\xf6\\xf8-\\xff",rv="\\xac\\xb1\\xd7\\xf7",nv="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",av="\\u2000-\\u206f",iv=" \\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",Oc="A-Z\\xc0-\\xd6\\xd8-\\xde",ov="\\ufe0e\\ufe0f",Fc=rv+nv+av+iv,Lc="['\u2019]",Rc="["+Fc+"]",sv="["+tv+"]",Uc="\\d+",uv="["+Pc+"]",Bc="["+Cc+"]",Mc="[^"+Ec+Fc+Uc+Pc+Cc+Oc+"]",lv="\\ud83c[\\udffb-\\udfff]",cv="(?:"+sv+"|"+lv+")",fv="[^"+Ec+"]",jc="(?:\\ud83c[\\udde6-\\uddff]){2}",$c="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+Oc+"]",pv="\\u200d",kc="(?:"+Bc+"|"+Mc+")",dv="(?:"+Ft+"|"+Mc+")",Nc="(?:"+Lc+"(?:d|ll|m|re|s|t|ve))?",Ic="(?:"+Lc+"(?:D|LL|M|RE|S|T|VE))?",qc=cv+"?",Dc="["+ov+"]?",mv="(?:"+pv+"(?:"+[fv,jc,$c].join("|")+")"+Dc+qc+")*",hv="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yv="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",gv=Dc+qc+mv,vv="(?:"+[uv,jc,$c].join("|")+")"+gv,xv=RegExp([Ft+"?"+Bc+"+"+Nc+"(?="+[Rc,Ft,"$"].join("|")+")",dv+"+"+Ic+"(?="+[Rc,Ft+kc,"$"].join("|")+")",Ft+"?"+kc+"+"+Nc,Ft+"+"+Ic,yv,hv,Uc,vv].join("|"),"g");function wv(r){return r.match(xv)||[]}var Vc=wv;function bv(r,e,t){return r=Ce(r),e=t?void 0:e,e===void 0?Ac(r)?Vc(r):Sc(r):r.match(e)||[]}var Wc=bv;var Tv="['\u2019]",_v=RegExp(Tv,"g");function Sv(r){return function(e){return wc(Wc(_c(e).replace(_v,"")),r,"")}}var zc=Sv;var Av=zc(function(r,e,t){return e=e.toLowerCase(),r+(t?xc(e):e)}),Ka=Av;s();u();function cr(r){return Object.keys(r)}s();u();s();u();var Ze=class{};s();u();var yn=class{formatMultiple(e){return Promise.all(e.map(t=>this.format(t)))}formatMultipleSync(e){return e.map(t=>this.formatSync(t))}},fr=class extends yn{async format(e){return e}formatSync(e){return e}};s();u();s();u();var te=class extends Ze{constructor(t){super();w(this,"value");this.value=t}write(t){typeof this.value=="string"?t.write(this.value):typeof this.value=="function"?this.value(t):this.value.write(t)}};var Rv=4,Gc=!!p.env.FERN_STACK_TRACK;Gc&&(Error.stackTraceLimit=50);var pr=class{constructor(){w(this,"buffer","");w(this,"indentLevel",0);w(this,"hasWrittenAnything",!1);w(this,"lastCharacterIsSemicolon",!1);w(this,"lastCharacterIsNewline",!1)}write(...e){for(let t of e)if(t!=null)if(typeof t=="string"){let n=t.length>0&&t.endsWith(`
|
|
14
|
+
`),a=n?t.substring(0,t.length-1):t,i=this.getIndentString(),o=a.replaceAll(`
|
|
15
15
|
`,`
|
|
16
|
-
${i}`);this.isAtStartOfLine()&&(o=i+o),
|
|
17
|
-
`),this.writeInternal(o)}writeNoIndent(e){let
|
|
16
|
+
${i}`);this.isAtStartOfLine()&&(o=i+o),n&&(o+=`
|
|
17
|
+
`),this.writeInternal(o)}else this.writeNode(t)}writeStatement(...e){this.write(...e),this.write(";"),this.writeNewLineIfLastLineNot()}writeNoIndent(e){let t=this.indentLevel;this.indentLevel=0,this.write(e),this.indentLevel=t}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 te(e).write(this),e.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(e,t){new te(e).write(this),this.write(" (",t,")"),this.pushScope()}controlFlowWithoutStatement(e){new te(e).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(e,t){this.dedent(),this.write("} "),new te(e).write(this),this.write(" (",t,")"),this.pushScope()}alternativeControlFlow(e){this.dedent(),this.write("} "),new te(e).write(this),this.pushScope()}pushScope(){this.writeLine("{"),this.indent()}popScope(e=!0){this.dedent(),this.writeNewLineIfLastLineNot(),e?this.writeLine("}"):this.write("}")}writeLine(e=""){this.write(e),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
|
|
18
18
|
`)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
|
|
19
|
-
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:e,delimiter:
|
|
20
|
-
`),this.lastCharacterIsSemicolon=e.endsWith(";")),this.buffer+=e}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*Yg)}};a();s();var xt=class{},xr=class extends xt{async format(e){return e}formatSync(e){return e}};a();s();function ai(t){return(t==null?void 0:t.name)!=null}a();s();a();s();a();s();var wr=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.shouldUpdate({snippet:r,reporter:e.errors})&&(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}"`)}shouldUpdate({snippet:e,reporter:r}){var n,i;return this.reporter==null||this.reporter.size()>0&&r.size()===0?!0:e.length>((i=(n=this.snippet)==null?void 0:n.length)!=null?i:0)}};var br=class{constructor(e){g(this,"context");this.context=e}async generate(e,r={}){let n=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let i=new wr;for(let o of n){let u=this.context.clone(),p=this.createSnippetGenerator(u);try{let c=await p.generateSnippet({endpoint:o,request:e,options:r});if(u.errors.empty())return{snippet:c,errors:void 0};i.update({context:u,snippet:c})}catch(c){i.err==null&&(i.err=c)}}return i.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e,r={}){let n=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let i=new wr;for(let o of n){let u=this.context.clone(),p=this.createSnippetGenerator(u);try{let c=p.generateSnippetSync({endpoint:o,request:e,options:r});if(u.errors.empty())return{snippet:c,errors:void 0};i.update({context:u,snippet:c})}catch(c){i.err==null&&(i.err=c)}}return i.getResponseOrThrow({endpoint:e.endpoint})}};a();s();a();s();a();s();var Ar=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]}}};a();s();var T={Critical:"CRITICAL",Warning:"WARNING"},Sr=class t{constructor(){g(this,"errors");g(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(gi(hi({},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 Tr=class{constructor({ir:e,config:r,options:n={}}){g(this,"config");g(this,"options");g(this,"errors");g(this,"_ir");g(this,"httpEndpointReferenceParser");this._ir=e,this.config=r,this.options=n,this.errors=new Sr,this.httpEndpointReferenceParser=new Ar}associateQueryParametersByWireValue({parameters:e,values:r}){let n=[];for(let[i,o]of Object.entries(r)){this.errors.scope(i);try{let u=e.find(c=>c.name.wireValue===i);if(u==null)throw this.newParameterNotRecognizedError(i);let p=this.isListTypeReference(u.typeReference)&&!Array.isArray(o)?[o]:o;n.push({name:u.name,typeReference:u.typeReference,value:p})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:r,ignoreMissingParameters:n}){let i=[];for(let[o,u]of Object.entries(r)){this.errors.scope(o);try{let p=e.find(c=>c.name.wireValue===o);if(p==null){if(n)continue;this.errors.add({severity:T.Critical,message:this.newParameterNotRecognizedError(o).message});continue}i.push({name:p.name,typeReference:p.typeReference,value:u})}finally{this.errors.unscope()}}return i}getSingleFileValue({property:e,record:r}){let n=r[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:T.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:T.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let i=[];for(let o of n){if(typeof o!="string"){this.errors.add({severity:T.Critical,message:`Expected file array value to be an array of strings, got ${typeof o}`});return}i.push(o)}return i}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:T.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:T.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 i=e.discriminant.wireValue,o=n[i];if(o==null){this.errors.add({severity:T.Critical,message:this.newParameterNotRecognizedError(i).message});return}if(typeof o!="string"){this.errors.add({severity:T.Critical,message:`Expected discriminant value to be a string but got: ${typeof o}`});return}let u=e.types[o];if(u==null){this.errors.add({severity:T.Critical,message:`No type found for discriminant value "${o}"`});return}let v=n,{[i]:p}=v,c=xi(v,[vi(i)]);return{singleDiscriminatedUnionType:u,discriminantValue:u.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 i;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}):!((i=e.metadata)!=null&&i.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:r}){var n,i;return r&&((i=(n=e.metadata)==null?void 0:n.includePathParameters)!=null?i:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:S(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(i=>i.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=r.environments.find(i=>i.id===e);return n==null?void 0:n.name}default:S(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:T.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:T.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:T.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let i=new Set(hr(n.urls));for(let o of hr(e))i.has(o)&&i.delete(o);return i.size>0?(this.errors.add({severity:T.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${hr(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:T.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:T.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:T.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:S(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:S(r)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:S(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}};a();s();var Ae;(function(t){t.Concise="concise",t.Full="full"})(Ae||(Ae={}));a();s();var Y={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};a();s();a();s();var d={};kt(d,{Access:()=>si,AstNode:()=>P,Class:()=>Te,ClassInstantiation:()=>Re,ClassReference:()=>E,CodeBlock:()=>Ee,Method:()=>Ie,MethodInvocation:()=>Pe,Parameter:()=>Ne,Type:()=>Er,TypeLiteral:()=>B,Writer:()=>Se,classReference:()=>cv,class_:()=>fv,codeblock:()=>pv,instantiateClass:()=>dv,invokeMethod:()=>yv,method:()=>mv,parameter:()=>hv});a();s();a();s();a();s();var si={Public:"public",Protected:"protected",Private:"private"};a();s();a();s();a();s();var Se=class extends vr{constructor({packageName:r,customConfig:n,formatter:i}){super();g(this,"packageName");g(this,"customConfig");g(this,"formatter");g(this,"imports",new Set);this.packageName=r,this.customConfig=n,this.formatter=i!=null?i:new xr}addImport(r){this.imports.add(r)}};var Rr=class extends Se{constructor({packageName:e,customConfig:r,formatter:n}){super({packageName:e,customConfig:r,formatter:n})}async toStringAsync(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.format(e)}catch(r){throw new Error(`Failed to format Java file: ${r}
|
|
21
|
-
|
|
19
|
+
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:e,delimiter:t,writeFunction:n}){if(e.length>0){let a=e[0];a!=null&&n(a);for(let i=1;i<e.length;i++){this.write(t);let o=e[i];o!=null&&n(o)}}}toString(){return this.buffer}writeInternal(e){if(e.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=e.endsWith(`
|
|
20
|
+
`),this.lastCharacterIsSemicolon=e.endsWith(";")),this.buffer+=e,Gc&&this.buffer.endsWith(`
|
|
21
|
+
`)&&!this.buffer.endsWith(`"""
|
|
22
|
+
`)){let t=this.stacktrace(15).map(n=>`${n.fn} - ${n.path}:${n.position}`).join(" ");t&&(this.buffer=this.buffer.slice(0,-1),this.buffer+=`//@@ ${t}
|
|
23
|
+
`)}return this.buffer}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return Rv}stacktrace(e=50){var n;let t=!1;return((n=new Error().stack)!=null?n:"").split(`
|
|
24
|
+
`).map(a=>{var o;let i=a.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(i&&i.length===5){let[,l,f,d,y]=i;if(t||l!=null&&l.includes("runInteractiveTask")){t=!0;return}switch(l){case"Object.<anonymous>":l="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":l=`${l.substring(l.indexOf(".")+1)}()=> { ... }`;break}return{fn:l,path:(o=f==null?void 0:f.replace(/^.*?fern.*?\//,""))!=null?o:"",position:`${d}:${y}`}}}).filter(a=>{var i,o,l,f,d,y,g;return a&&!((i=a.path)!=null&&i.startsWith("node:"))&&!((o=a.path)!=null&&o.endsWith(".js"))&&!((l=a.path)!=null&&l.includes("AbstractWriter"))&&!((f=a.fn)!=null&&f.includes("stacktrace"))&&!((d=a.fn)!=null&&d.includes("stackLine"))&&!((y=a.fn)!=null&&y.includes("SdkGeneratorCLI"))&&!((g=a.fn)!=null&&g.includes("runCli"))}).slice(0,e)}};s();u();function Xa(r){return(r==null?void 0:r.name)!=null}s();u();s();u();s();u();var dr=class{constructor(){w(this,"reporter");w(this,"snippet");w(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:t}){this.shouldUpdate({snippet:t,reporter:e.errors})&&(this.reporter=e.errors.clone(),this.snippet=t)}getResponseOrThrow({endpoint:e}){var t;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(t=this.err)!=null?t:new Error(`Failed to generate snippet for endpoint "${e.method} ${e.path}"`)}shouldUpdate({snippet:e,reporter:t}){var n,a;return this.reporter==null||this.reporter.size()>0&&t.size()===0?!0:e.length>((a=(n=this.snippet)==null?void 0:n.length)!=null?a:0)}};var mr=class{constructor(e){w(this,"context");this.context=e}async generate(e,t={}){let n=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let a=new dr;for(let i of n){let o=this.context.clone(),l=this.createSnippetGenerator(o);try{let f=await l.generateSnippet({endpoint:i,request:e,options:t});if(o.errors.empty())return{snippet:f,errors:void 0};a.update({context:o,snippet:f})}catch(f){a.err==null&&(a.err=f)}}return a.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e,t={}){let n=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let a=new dr;for(let i of n){let o=this.context.clone(),l=this.createSnippetGenerator(o);try{let f=l.generateSnippetSync({endpoint:i,request:e,options:t});if(o.errors.empty())return{snippet:f,errors:void 0};a.update({context:o,snippet:f})}catch(f){a.err==null&&(a.err=f)}}return a.getResponseOrThrow({endpoint:e.endpoint})}};s();u();s();u();s();u();var hr=class{constructor(){w(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/)}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 F={Critical:"CRITICAL",Warning:"WARNING"},yr=class r{constructor(){w(this,"errors");w(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(A(h({},e),{path:[...this.path]}))}scope(e){this.path.push(e)}unscope(){this.path.pop()}getBySeverity(e){return this.errors.filter(t=>t.severity===e)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let e=new r;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 t=[];for(let n of e){if(typeof n=="string"){t.push(n);continue}t[t.length-1]+=`[${n.index}]`}return t}};var gr=class{constructor({ir:e,config:t,options:n={}}){w(this,"config");w(this,"options");w(this,"errors");w(this,"_ir");w(this,"httpEndpointReferenceParser");this._ir=e,this.config=t,this.options=n,this.errors=new yr,this.httpEndpointReferenceParser=new hr}associateQueryParametersByWireValue({parameters:e,values:t}){let n=[];for(let[a,i]of Object.entries(t)){this.errors.scope(a);try{let o=e.find(f=>f.name.wireValue===a);if(o==null)throw this.newParameterNotRecognizedError(a);let l=this.isListTypeReference(o.typeReference)&&!Array.isArray(i)?[i]:i;n.push({name:o.name,typeReference:o.typeReference,value:l})}finally{this.errors.unscope()}}return n}associateByWireValueOrDefault({parameters:e,values:t}){let n=[];for(let a of e){this.errors.scope(a.name.wireValue);try{let i=t[a.name.wireValue];if(i==null)if(a.typeReference.type==="primitive"&&a.typeReference.value==="STRING")i=`<${a.name.wireValue}>`;else{this.errors.add({severity:F.Critical,message:this.newParameterNotRecognizedError(a.name.wireValue).message});continue}n.push({name:a.name,typeReference:a.typeReference,value:i})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:t,ignoreMissingParameters:n}){let a=[];for(let[i,o]of Object.entries(t)){this.errors.scope(i);try{let l=e.find(f=>f.name.wireValue===i);if(l==null){if(n)continue;this.errors.add({severity:F.Critical,message:this.newParameterNotRecognizedError(i).message});continue}a.push({name:l.name,typeReference:l.typeReference,value:o})}finally{this.errors.unscope()}}return a}getExampleObjectProperties({parameters:e,snippetObject:t}){let n=typeof t=="object"&&t!==null&&!Array.isArray(t)?t:{},a=[];for(let i of e){let o=n[i.name.wireValue];o==null?i.typeReference.type==="nullable"&&a.push({name:i.name,typeReference:i.typeReference,value:null}):a.push({name:i.name,typeReference:i.typeReference,value:o})}return a}getSingleFileValue({property:e,record:t}){let n=t[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:F.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:e,record:t}){let n=t[e.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:F.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let a=[];for(let i of n){if(typeof i!="string"){this.errors.add({severity:F.Critical,message:`Expected file array value to be an array of strings, got ${typeof i}`});return}a.push(i)}return a}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:F.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 t=this._ir.types[e];if(t==null){this.errors.add({severity:F.Critical,message:`Type identified by "${e}" could not be found`});return}return t}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:t}){let n=this.getRecord(t);if(n==null)return;let a=e.discriminant.wireValue,i=n[a];if(i==null){this.errors.add({severity:F.Critical,message:this.newParameterNotRecognizedError(a).message});return}if(typeof i!="string"){this.errors.add({severity:F.Critical,message:`Expected discriminant value to be a string but got: ${typeof i}`});return}let o=e.types[i];if(o==null){this.errors.add({severity:F.Critical,message:`No type found for discriminant value "${i}"`});return}let d=n,{[a]:l}=d,f=fi(d,[ci(a)]);return{singleDiscriminatedUnionType:o,discriminantValue:o.discriminantValue,value:f}}resolveEndpointOrThrow(e){let t=this.httpEndpointReferenceParser.tryParse(e);if(t==null)throw new Error(`Failed to parse endpoint reference "${e}"`);return this.resolveEndpointLocationOrThrow(t)}resolveEndpointLocation(e){let t=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:e})&&t.push(n);return t}resolveEndpointLocationOrThrow(e){let t=this.resolveEndpointLocation(e);if(t.length===0)throw new Error(`Failed to find endpoint identified by "${e.method} ${e.path}"`);return t}needsRequestParameter({request:e,inlinePathParameters:t,inlineFileProperties:n}){var a;return this.includePathParametersInWrappedRequest({request:e,inlinePathParameters:t})||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}):!((a=e.metadata)!=null&&a.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:t}){var n,a;return t&&((a=(n=e.metadata)==null?void 0:n.includePathParameters)!=null?a:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:O(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let t=this._ir.environments.environments;switch(t.type){case"singleBaseUrl":{let n=t.environments.find(a=>a.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=t.environments.find(a=>a.id===e);return n==null?void 0:n.name}default:O(t)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:F.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let t=this._ir.environments.environments;switch(t.type){case"singleBaseUrl":return this.errors.add({severity:F.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=t.environments[0];if(n==null)return this.errors.add({severity:F.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let a=new Set(cr(n.urls));for(let i of cr(e))a.has(i)&&a.delete(i);return a.size>0?(this.errors.add({severity:F.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${cr(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:F.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:F.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:F.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 t=this.resolveNamedType({typeId:e.value});return t==null?!1:t.type==="alias"?this.isNullable(t.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let t=this.resolveNamedType({typeId:e.value});return t==null?!1:t.type==="alias"?this.isNullable(t.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:t}){return new Error(`Expected auth type ${e.type}, got ${t.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:t}){return new Error(`Expected ${e}, got ${typeof t}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:t}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:t});default:O(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:t}){return this.fileUploadHasBodyProperties({fileUpload:e})||t&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(t=>{switch(t.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:O(t)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(t=>{switch(t.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:O(t)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:t}){return e.location.method===t.method&&e.location.path===t.path}};s();u();var He;(function(r){r.Concise="concise",r.Full="full"})(He||(He={}));s();u();var re={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};s();u();s();u();s();u();s();u();var Ye=class extends pr{constructor({packageName:t,customConfig:n,formatter:a}){super();w(this,"packageName");w(this,"customConfig");w(this,"formatter");w(this,"imports",new Set);this.packageName=t,this.customConfig=n,this.formatter=a!=null?a:new fr}addImport(t){this.imports.add(t)}getImports(){return new Set(this.imports)}};var vr=class extends Ye{constructor({packageName:e,customConfig:t,formatter:n}){super({packageName:e,customConfig:t,formatter:n})}async toStringAsync(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.format(e)}catch(t){throw new Error(`Failed to format Java file: ${t}
|
|
25
|
+
${e}`)}return e}toString(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(e)}catch(t){throw new Error(`Failed to format Java file: ${t}
|
|
22
26
|
${e}`)}return e}getContent(){let e=`package ${this.packageName};
|
|
23
27
|
|
|
24
|
-
`,
|
|
28
|
+
`,t=this.stringifyImports();return t.length>0?`${e}${t}
|
|
25
29
|
|
|
26
30
|
${this.buffer}`:e+this.buffer}stringifyImports(){return Array.from(this.imports).filter(e=>e!==this.packageName).map(e=>`import ${e};`).sort().join(`
|
|
27
|
-
`)}};var P=class extends be{async toStringAsync({packageName:e,customConfig:r,formatter:n}){let i=new Rr({packageName:e,customConfig:r,formatter:n});return this.write(i),i.toStringAsync()}toString({packageName:e,customConfig:r,formatter:n}){let i=new Rr({packageName:e,customConfig:r,formatter:n});return this.write(i),i.toString()}};a();s();var Te=class extends P{constructor({name:r,access:n}){super();g(this,"name");g(this,"access");g(this,"methods",[]);this.name=r,this.access=n}write(r){if(r.write(`${this.access} class ${this.name}`),this.isEmpty()){r.writeLine(" {}");return}r.writeLine(" {"),r.indent();for(let n of this.methods)r.writeNode(n),r.newLine();r.dedent(),r.write("}")}addMethod(r){this.methods.push(r)}isEmpty(){return this.methods.length===0}};a();s();var E=class extends P{constructor({name:r,packageName:n,fullyQualified:i}){super();g(this,"name");g(this,"packageName");g(this,"fullyQualified");this.name=r,this.packageName=n,this.fullyQualified=i!=null?i:!1}write(r){if(r.addImport(`${this.packageName}.${this.name}`),this.fullyQualified){r.write(`${this.packageName}.${this.name}`);return}r.write(this.name)}};a();s();a();s();a();s();a();s();var Er=class extends P{constructor(r){super();g(this,"internalType");this.internalType=r}write(r){switch(this.internalType.type){case"bigInteger":r.writeNode(Hg);break;case"boolean":r.write("Boolean");break;case"bytes":r.write("byte[]");break;case"float":r.write("Float");break;case"date":r.write("String");break;case"dateTime":r.writeNode(Zg);break;case"double":r.write("Double");break;case"integer":r.write("Integer");break;case"list":{this.writeList({writer:r,list:this.internalType});break}case"long":{r.write("Long");break}case"map":{this.writeMap({writer:r,map:this.internalType});break}case"object":{r.write("Object");break}case"optional":{this.writeOptional({writer:r,optional:this.internalType});break}case"reference":r.writeNode(this.internalType.value);break;case"set":{this.writeSet({writer:r,set:this.internalType});break}case"string":r.write("String");break;case"uuid":r.writeNode(Qg);break;default:S(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static bigInteger(){return new this({type:"bigInteger"})}static boolean(){return new this({type:"boolean"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static double(){return new this({type:"double"})}static float(){return new this({type:"float"})}static integer(){return new this({type:"integer"})}static list(r){return new this({type:"list",value:r})}static long(){return new this({type:"long"})}static map(r,n){return new this({type:"map",keyType:r,valueType:n})}static object(){return new this({type:"object"})}static optional(r){return this.isAlreadyOptional(r)?r:new this({type:"optional",value:r})}static reference(r){return new this({type:"reference",value:r})}static set(r){return new this({type:"set",value:r})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}writeList({writer:r,list:n}){r.writeNode(Jg),r.write("<"),n.value.write(r),r.write(">")}writeMap({writer:r,map:n}){r.writeNode(Kg),r.write("<"),n.keyType.write(r),r.write(", "),n.valueType.write(r),r.write(">")}writeOptional({writer:r,optional:n}){r.writeNode(li),r.write("<"),n.value.write(r),r.write(">")}writeSet({writer:r,set:n}){r.writeNode(Xg),r.write("<"),n.value.write(r),r.write(">")}static isAlreadyOptional(r){return r.internalType.type==="optional"}},ui=new E({name:"Arrays",packageName:"java.util"}),Hg=new E({name:"BigInteger",packageName:"java.math"}),i1=new E({name:"HashMap",packageName:"java.util"}),Jg=new E({name:"List",packageName:"java.util"}),Kg=new E({name:"Map",packageName:"java.util"}),Zg=new E({name:"OffsetDateTime",packageName:"java.time"}),li=new E({name:"Optional",packageName:"java.util"}),Xg=new E({name:"Set",packageName:"java.util"}),Qg=new E({name:"UUID",packageName:"java.util"});var B=class t extends P{constructor(r){super();g(this,"internalType");this.internalType=r}write(r){switch(this.internalType.type){case"bigInteger":this.writeBigInteger({writer:r,bigInteger:this.internalType});break;case"boolean":r.write(this.internalType.value.toString());break;case"builder":this.writeBuilder({writer:r,builder:this.internalType});break;case"bytes":r.write(`"${this.internalType.value}".getBytes()`);break;case"class":{this.writeClass({writer:r,class_:this.internalType});break}case"date":r.write(`"${this.internalType.value}"`);break;case"dateTime":this.writeDateTime({writer:r,dateTime:this.internalType});break;case"double":r.write(this.internalType.value.toString());break;case"enum":this.writeEnum({writer:r,enum_:this.internalType});break;case"float":r.write(`${this.internalType.value}f`);break;case"integer":r.write(this.internalType.value.toString());break;case"list":{this.writeList({writer:r,list:this.internalType});break}case"long":{r.write(`${this.internalType.value}L`);break}case"map":{this.writeMap({writer:r,map:this.internalType});break}case"optional":{this.writeOptional({writer:r,optional:this.internalType});break}case"raw":{r.write(this.internalType.value);break}case"reference":r.writeNode(this.internalType.value);break;case"set":{this.writeSet({writer:r,set:this.internalType});break}case"string":r.write(`"${this.escapeString(this.internalType.value)}"`);break;case"unknown":this.writeUnknown({writer:r,value:this.internalType.value});break;case"uuid":this.writeUUID({writer:r,uuid:this.internalType});break;case"nop":break;default:S(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static bigInteger(r){return new this({type:"bigInteger",value:r})}static boolean(r){return new this({type:"boolean",value:r})}static builder({classReference:r,parameters:n}){return new this({type:"builder",classReference:r,parameters:n})}static bytes(r){return new this({type:"bytes",value:r})}static class_({reference:r,parameters:n}){return new this({type:"class",reference:r,parameters:n})}static date(r){return new this({type:"date",value:r})}static dateTime(r){return new this({type:"dateTime",value:r})}static double(r){return new this({type:"double",value:r})}static enum_({classReference:r,value:n}){return new this({type:"enum",classReference:r,value:n})}static float(r){return new this({type:"float",value:r})}static integer(r){return new this({type:"integer",value:r})}static list({valueType:r,values:n}){return new this({type:"list",valueType:r,values:n})}static long(r){return new this({type:"long",value:r})}static map({keyType:r,valueType:n,entries:i}){return new this({type:"map",keyType:r,valueType:n,entries:i})}static optional({value:r,useOf:n}){return this.isAlreadyOptional(r)?r:new this({type:"optional",value:r,useOf:n})}static raw(r){return new this({type:"raw",value:r})}static reference(r){return new this({type:"reference",value:r})}static set({valueType:r,values:n}){return new this({type:"set",valueType:r,values:n})}static string(r){return new this({type:"string",value:r})}static unknown(r){return new this({type:"unknown",value:r})}static uuid(r){return new this({type:"uuid",value:r})}static nop(){return new this({type:"nop"})}static isNop(r){return r.internalType.type==="nop"}shouldWriteInLine(){switch(this.internalType.type){case"bigInteger":case"boolean":case"bytes":case"date":case"dateTime":case"double":case"enum":case"float":case"integer":case"long":case"nop":case"raw":case"string":case"unknown":case"uuid":return!0;case"optional":return this.internalType.value.shouldWriteInLine();case"builder":case"class":case"list":case"map":case"reference":case"set":return!1;default:S(this.internalType)}}writeBigInteger({writer:r,bigInteger:n}){r.write("new "),r.writeNode(d.instantiateClass({classReference:ev,arguments_:[t.string(n.value)]}))}writeBuilder({writer:r,builder:n}){r.writeNode(n.classReference),r.writeNewLineIfLastLineNot(),r.indent(),this.writeBuilderParameters({writer:r,parameters:this.orderBuilderParameters(ov({parameters:n.parameters}))}),r.dedent()}writeBuilderParameters({writer:r,parameters:n}){r.writeLine(".builder()");for(let i of n)r.write(`.${i.name}(`),i.value.shouldWriteInLine()||r.newLine(),r.indent(),r.writeNode(i.value),r.dedent(),i.value.shouldWriteInLine()||r.newLine(),r.writeLine(")");r.writeNewLineIfLastLineNot(),r.write(".build()")}orderBuilderParameters(r){return r.sort((n,i)=>n.value.isOptional()&&!i.value.isOptional()?1:!n.value.isOptional()&&i.value.isOptional()?-1:0)}writeClass({writer:r,class_:n}){let i=iv({parameters:n.parameters});r.writeNode(d.instantiateClass({classReference:n.reference,arguments_:i.map(o=>o.value)}))}writeDateTime({writer:r,dateTime:n}){r.writeNode(d.invokeMethod({on:tv,method:"parse",arguments_:[t.string(n.value)]}))}writeEnum({writer:r,enum_:n}){r.writeNode(n.classReference),r.write("."+n.value)}writeList({writer:r,list:n}){this.writeIterable({writer:r,iterable:n})}writeMap({writer:r,map:n}){let i=av({entries:n.entries});if(i.length===0){r.write("new "),r.writeNode(wt),r.write("<"),r.writeNode(n.keyType),r.write(", "),r.writeNode(n.valueType),r.write(">()");return}r.write("new "),r.writeNode(wt),r.write("<"),r.writeNode(n.keyType),r.write(", "),r.writeNode(n.valueType),r.writeLine(">() {{"),r.indent();for(let o of i)r.write("put("),r.writeNode(o.key),r.write(", "),r.writeNode(o.value),r.writeLine(");");r.dedent(),r.write("}}")}writeOptional({writer:r,optional:n}){if(!n.useOf){r.writeNode(n.value);return}r.writeNode(d.invokeMethod({on:li,method:"of",arguments_:[n.value]}))}writeSet({writer:r,set:n}){this.writeIterable({writer:r,iterable:n})}writeIterable({writer:r,iterable:n}){let i=n.type==="list"?pi:rv,o=sv({values:n.values});if(o.length===0){r.write(`new ${i.name}<`),r.writeNode(n.valueType),r.write(">()");return}r.write("new "),r.writeNode(i),r.write("<"),r.writeNode(n.valueType),r.writeLine(">("),r.indent(),r.writeNode(d.invokeMethod({on:ui,method:"asList",arguments_:o})),r.writeNewLineIfLastLineNot(),r.dedent(),r.write(")")}writeUnknown({writer:r,value:n}){switch(typeof n){case"boolean":r.write(n.toString());return;case"string":r.write(`"${this.escapeString(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.writeUnknownMap({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("new"),r.writeNode(pi),r.write("<Object>()");return}r.writeLine("new"),r.writeNode(pi),r.write("<Object>() {"),r.indent(),r.writeNode(d.invokeMethod({on:ui,method:"asList",arguments_:n.map(i=>t.unknown(i))})),r.writeNewLineIfLastLineNot(),r.dedent(),r.write("}")}writeUnknownMap({writer:r,value:n}){let i=Object.entries(n);if(i.length===0){r.write("new "),r.writeNode(wt),r.write("<String, Object>()");return}r.writeLine("new "),r.writeNode(wt),r.write("<String, Object>() {{"),r.indent();for(let[o,u]of i)r.write(`put("${o}", `),r.writeNode(t.unknown(u)),r.writeLine(");");r.dedent(),r.write("}}")}writeUUID({writer:r,uuid:n}){r.writeNode(d.invokeMethod({on:nv,method:"fromString",arguments_:[t.string(n.value)]}))}escapeString(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}static isAlreadyOptional(r){return r.internalType.type==="optional"}},pi=new E({name:"ArrayList",packageName:"java.util"}),ev=new E({name:"BigInteger",packageName:"java.math"}),wt=new E({name:"HashMap",packageName:"java.util"}),rv=new E({name:"HashSet",packageName:"java.util"}),y1=new E({name:"List",packageName:"java.util"}),m1=new E({name:"Map",packageName:"java.util"}),tv=new E({name:"OffsetDateTime",packageName:"java.time"}),h1=new E({name:"Set",packageName:"java.util"}),nv=new E({name:"UUID",packageName:"java.util"});function iv({parameters:t}){return t.filter(e=>!B.isNop(e.value))}function ov({parameters:t}){return t.filter(e=>!B.isNop(e.value))}function av({entries:t}){return t.filter(e=>!B.isNop(e.key)&&!B.isNop(e.value))}function sv({values:t}){return t.filter(e=>!B.isNop(e))}function bt({writer:t,arguments_:e}){let r=lv(e);if(r.length===0){t.write("()");return}if(r.some(i=>i instanceof B&&!i.shouldWriteInLine())){uv({writer:t,arguments_:r});return}t.write("("),r.forEach((i,o)=>{o>0&&t.write(", "),fp({writer:t,argument:i})}),t.write(")")}function uv({writer:t,arguments_:e}){t.writeLine("("),t.indent(),e.forEach((r,n)=>{n>0&&t.writeLine(","),fp({writer:t,argument:r})}),t.dedent(),e.length>0&&t.newLine(),t.write(")")}function fp({writer:t,argument:e}){ai(e)?t.writeNodeOrString(e.assignment):e.write(t)}function lv(t){return t.filter(e=>!(e instanceof B&&B.isNop(e)))}var Re=class extends P{constructor({classReference:r,arguments_:n}){super();g(this,"classReference");g(this,"arguments_");this.classReference=r,this.arguments_=n}write(r){r.writeNode(this.classReference),bt({writer:r,arguments_:this.arguments_})}};a();s();var Ee=class extends P{constructor(r){super();g(this,"arg");this.arg=r}write(r){return new z(this.arg).write(r)}};a();s();var Ie=class extends P{constructor({name:r,access:n,parameters:i,body:o,static_:u,return_:p}){super();g(this,"name");g(this,"access");g(this,"parameters");g(this,"body");g(this,"return_");g(this,"static_");this.name=r,this.access=n,this.parameters=i,this.body=o,this.return_=p,this.static_=u!=null?u:!1}write(r){if(r.write(`${this.access} `),this.static_&&r.write("static "),this.return_!=null?r.writeNode(this.return_):r.write("void"),r.write(` ${this.name}`),this.parameters.length===0?r.write("()"):(r.writeLine("("),r.indent(),this.parameters.forEach((n,i)=>{i>0&&r.writeLine(", "),r.writeNode(n)}),r.dedent(),r.write(")")),this.body==null){r.write(";");return}r.writeLine(" {"),r.indent(),r.writeNode(this.body),r.writeNewLineIfLastLineNot(),r.dedent(),r.write("}")}};a();s();var Pe=class extends P{constructor({method:r,arguments_:n,on:i}){super();g(this,"on");g(this,"method");g(this,"arguments_");this.on=i,this.method=r,this.arguments_=n}write(r){this.on.write(r),r.write("."),r.write(this.method),bt({writer:r,arguments_:this.arguments_})}};a();s();var Ne=class extends P{constructor({name:r,type:n}){super();g(this,"name");g(this,"type");this.name=r,this.type=n}write(r){r.writeNode(this.type),r.write(` ${this.name}`)}};function pv(t){return new Ee(t)}function fv(t){return new Te(t)}function cv(t){return new E(t)}function dv(t){return new Re(t)}function yv(t){return new Pe(t)}function mv(t){return new Ie(t)}function hv(t){return new Ne(t)}var cp="com.example.usage",gv="Example",vv="run",dp="client",xv={type:"primitive",value:"STRING"},At=class{constructor({context:e,formatter:r}){g(this,"context");g(this,"formatter");this.context=e,this.formatter=r}async generateSnippet({endpoint:e,request:r,options:n}){var u,p;let i=this.getConfig(n);return await this.buildCodeBlock({endpoint:e,snippet:r,options:n}).toStringAsync({packageName:(u=i.fullStylePackageName)!=null?u:cp,customConfig:(p=this.context.customConfig)!=null?p:{},formatter:this.formatter})}generateSnippetSync({endpoint:e,request:r,options:n}){var u,p;let i=this.getConfig(n);return this.buildCodeBlock({endpoint:e,snippet:r,options:n}).toString({packageName:(u=i.fullStylePackageName)!=null?u:cp,customConfig:(p=this.context.customConfig)!=null?p:{},formatter:this.formatter})}buildCodeBlock({endpoint:e,snippet:r,options:n}){let i=d.codeblock(u=>{u.writeNodeStatement(this.constructClient({endpoint:e,snippet:r})),u.newLine(),u.writeNodeStatement(this.callMethod({endpoint:e,snippet:r}))}),o=this.getStyle(n);switch(o){case Ae.Concise:return i;case Ae.Full:return this.buildFullCodeBlock({body:i,options:n});default:S(o)}}constructClient({endpoint:e,snippet:r}){return d.codeblock(n=>{n.writeNode(this.context.getRootClientClassReference()),n.write(` ${dp} = `),n.writeNode(d.TypeLiteral.builder({classReference:this.context.getRootClientClassReference(),parameters:this.getRootClientBuilderArgs({endpoint:e,snippet:r})}))})}buildFullCodeBlock({body:e,options:r}){var o;let n=this.getConfig(r),i=d.class_({name:(o=n.fullStyleClassName)!=null?o:gv,access:d.Access.Public});return i.addMethod(d.method({name:vv,access:d.Access.Public,static_:!0,parameters:[],body:e})),i}getRootClientBuilderArgs({endpoint:e,snippet:r}){let n=[];e.auth!=null&&(r.auth!=null?n.push(...this.getRootClientAuthArgs({auth:e.auth,values:r.auth})):this.context.errors.add({severity:T.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`}));let i=this.getRootClientBaseUrlArg({baseUrl:r.baseURL,environment:r.environment});return i!=null&&n.push(i),this.context.errors.scope(Y.Headers),this.context.ir.headers!=null&&r.headers!=null&&n.push(...this.getRootClientHeaderArgs({headers:this.context.ir.headers,values:r.headers})),this.context.errors.unscope(),n}getRootClientBaseUrlArg({baseUrl:e,environment:r}){var n;if(e!=null&&r!=null){this.context.errors.add({severity:T.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(e!=null){if(((n=this.context.ir.environments)==null?void 0:n.environments.type)==="multipleBaseUrls"){this.context.errors.add({severity:T.Critical,message:"The Java SDK doesn't support a baseUrl when multiple URL environments are configured"});return}return{name:"url",value:d.TypeLiteral.string(e)}}if(r!=null){if(this.context.isSingleEnvironmentID(r)){let i=this.context.getEnvironmentTypeReferenceFromID(r);if(i==null){this.context.errors.add({severity:T.Warning,message:`Environment ${JSON.stringify(r)} was not found`});return}return{name:"environment",value:d.TypeLiteral.reference(i)}}if(this.context.isMultiEnvironmentValues(r))return this.context.validateMultiEnvironmentUrlValues(r)?{name:"environment",value:d.TypeLiteral.reference(d.instantiateClass({classReference:this.context.getEnvironmentClassReference(),arguments_:Object.values(r).map(i=>this.context.dynamicTypeLiteralMapper.convert({typeReference:xv,value:i}))}))}:void 0}}getRootClientAuthArgs({auth:e,values:r}){switch(e.type){case"basic":return r.type!=="basic"?(this.context.errors.add({severity:T.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getRootClientBasicAuthArgs({auth:e,values:r});case"bearer":return r.type!=="bearer"?(this.context.errors.add({severity:T.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getRootClientBearerAuthArgs({auth:e,values:r});case"header":return r.type!=="header"?(this.context.errors.add({severity:T.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getRootClientHeaderAuthArgs({auth:e,values:r});case"oauth":return r.type!=="oauth"?(this.context.errors.add({severity:T.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getRootClientOAuthArgs({auth:e,values:r});default:S(e)}}getRootClientBasicAuthArgs({auth:e,values:r}){return[{name:"credentials",value:d.TypeLiteral.raw(`"${r.username}", "${r.password}"`)}]}getRootClientBearerAuthArgs({auth:e,values:r}){return[{name:this.context.getMethodName(e.token),value:d.TypeLiteral.string(r.token)}]}getRootClientHeaderAuthArgs({auth:e,values:r}){return[{name:this.context.getMethodName(e.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:r.value})}]}getRootClientOAuthArgs({auth:e,values:r}){return[{name:this.context.getMethodName(e.clientId),value:d.TypeLiteral.string(r.clientId)},{name:this.context.getMethodName(e.clientSecret),value:d.TypeLiteral.string(r.clientSecret)}]}getRootClientHeaderArgs({headers:e,values:r}){let n=[];for(let i of e){let o=this.getRootClientHeaderArg({header:i,value:r.value});o!=null&&n.push({name:this.context.getMethodName(i.name.name),value:o})}return n}getRootClientHeaderArg({header:e,value:r}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:r});if(!d.TypeLiteral.isNop(n))return n}callMethod({endpoint:e,snippet:r}){return d.invokeMethod({on:d.codeblock(dp),method:this.getMethod({endpoint:e}),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:S(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:r}){var o,u;let n=[];this.context.errors.scope(Y.PathParameters);let i=[...(o=this.context.ir.pathParameters)!=null?o:[],...(u=e.pathParameters)!=null?u:[]];return i.length>0&&n.push(...this.getPathParameters({namedParameters:i,snippet:r}).map(p=>p.value)),this.context.errors.unscope(),this.context.errors.scope(Y.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 e.value.type==="optional"?d.TypeLiteral.optional({value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value.value,value:r}),useOf:!0}):this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r});default:S(e)}}getBytesBodyRequestArg({value:e}){return typeof e!="string"?(this.context.errors.add({severity:T.Critical,message:`Expected bytes value to be a string, got ${typeof e}`}),d.TypeLiteral.nop()):d.TypeLiteral.bytes(e)}getMethodArgsForInlinedRequest({request:e,snippet:r}){let n=[],{inlinePathParameters:i,inlineFileProperties:o}={inlinePathParameters:this.context.shouldInlinePathParameters(),inlineFileProperties:this.context.shouldInlineFileProperties()};this.context.errors.scope(Y.PathParameters);let u=[];e.pathParameters!=null&&u.push(...this.getPathParameters({namedParameters:e.pathParameters,snippet:r})),this.context.errors.unscope(),this.context.errors.scope(Y.RequestBody);let p=this.getFilePropertyInfo({request:e,snippet:r});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:i})||n.push(...u.map(c=>c.value)),o||n.push(...p.fileFields.map(c=>c.value)),n.push(this.getInlinedRequestArg({request:e,snippet:r,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:i})?u:[],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:i}){var h,m,x,w;this.context.errors.scope(Y.QueryParameters);let u=this.context.associateQueryParametersByWireValue({parameters:(h=e.queryParameters)!=null?h:[],values:(m=r.queryParameters)!=null?m:{}}).map(R=>({name:this.context.getMethodName(R.name.name),value:this.context.dynamicTypeLiteralMapper.convert(R)}));this.context.errors.unscope(),this.context.errors.scope(Y.Headers);let c=this.context.associateByWireValue({parameters:(x=e.headers)!=null?x:[],values:(w=r.headers)!=null?w:{}}).map(R=>({name:this.context.getMethodName(R.name.name),value:this.context.dynamicTypeLiteralMapper.convert(R)}));this.context.errors.unscope(),this.context.errors.scope(Y.RequestBody);let v=e.body!=null?this.getInlinedRequestBodyBuilderParameters({body:e.body,value:r.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),d.TypeLiteral.builder({classReference:d.classReference({name:this.context.getClassName(e.declaration.name),packageName:this.context.getRequestsPackageName(e.declaration.fernFilepath)}),parameters:[...n,...c,...u,...v]})}getInlinedRequestBodyBuilderParameters({body:e,value:r,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyBuilderParameters({parameters:e.value,value:r});case"referenced":return[this.getReferencedRequestBodyPropertyBuilderParameter({body:e,value:r})];case"fileUpload":return this.getFileUploadRequestBodyBuilderParameters({filePropertyInfo:n});default:S(e)}}getFileUploadRequestBodyBuilderParameters({filePropertyInfo:e}){return this.context.shouldInlineFileProperties()?[...e.fileFields,...e.bodyPropertyFields]:e.bodyPropertyFields}getReferencedRequestBodyPropertyBuilderParameter({body:e,value:r}){return{name:this.context.getMethodName(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:S(e)}}getInlinedRequestBodyPropertyBuilderParameters({parameters:e,value:r}){var o;let n=[],i=this.context.associateByWireValue({parameters:e,values:(o=this.context.getRecord(r))!=null?o:{}});for(let u of i)n.push({name:this.context.getMethodName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getPathParameters({namedParameters:e,snippet:r}){var o;let n=[],i=this.context.associateByWireValue({parameters:e,values:(o=r.pathParameters)!=null?o:{}});for(let u of i)n.push({name:this.context.getMethodName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});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)}getStyle(e){var r,n;return(n=(r=e.style)!=null?r:this.context.options.style)!=null?n:Ae.Full}getConfig(e){var r,n;return(n=(r=e.config)!=null?r:this.context.options.config)!=null?n:{}}};a();s();a();s();var St=class{constructor({context:e}){g(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?this.context.getNullableOfNull():(this.context.errors.add({severity:T.Critical,message:"Expected non-null value, but got null"}),d.TypeLiteral.nop());if(e.value===void 0)return d.TypeLiteral.nop();switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return this.convertLiteral({literal: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?d.TypeLiteral.nop():this.convertNamed({named:r,value:e.value,as:e.as})}case"nullable":case"optional":return d.TypeLiteral.optional({value:this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as}),useOf:e.as==="mapValue"});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:S(e.typeReference)}}convertList({list:e,value:r}){return Array.isArray(r)?d.TypeLiteral.list({valueType:this.context.dynamicTypeMapper.convert({typeReference:e}),values:r.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:T.Critical,message:`Expected array but got: ${typeof r}`}),d.TypeLiteral.nop())}convertLiteral({literal:e,value:r}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:r});return n==null?d.TypeLiteral.nop():d.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:r});return n==null?d.TypeLiteral.nop():d.TypeLiteral.string(n)}default:S(e)}}convertSet({set:e,value:r}){return Array.isArray(r)?d.TypeLiteral.set({valueType:this.context.dynamicTypeMapper.convert({typeReference:e}),values:r.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:T.Critical,message:`Expected array but got: ${typeof r}`}),d.TypeLiteral.nop())}convertMap({map:e,value:r}){return typeof r!="object"||r==null?(this.context.errors.add({severity:T.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),d.TypeLiteral.nop()):d.TypeLiteral.map({keyType:this.context.dynamicTypeMapper.convert({typeReference:e.key}),valueType:this.context.dynamicTypeMapper.convert({typeReference:e.value}),entries:Object.entries(r).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"mapKey"}),value:this.convert({typeReference:e.value,value:i,as:"mapValue"})}}finally{this.context.errors.unscope()}})})}convertNamed({named:e,value:r,as:n}){switch(e.type){case"alias":return 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,as:n});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r});default:S(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:r}){let n=this.context.getJavaClassReferenceFromDeclaration({declaration:e.declaration}),i=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r});if(i==null)return d.TypeLiteral.nop();let o=i.singleDiscriminatedUnionType;switch(o.type){case"samePropertiesAsObject":{let u=this.context.resolveNamedType({typeId:o.typeId});return u==null?d.TypeLiteral.nop():d.TypeLiteral.reference(d.invokeMethod({on:n,method:this.context.getPropertyName(o.discriminantValue.name),arguments_:[this.convertNamed({named:u,value:i.value})]}))}case"singleProperty":{let u=this.context.getRecord(i.value);if(u==null)return d.TypeLiteral.nop();try{return this.context.errors.scope(o.discriminantValue.wireValue),d.TypeLiteral.reference(d.invokeMethod({on:n,method:this.context.getPropertyName(o.discriminantValue.name),arguments_:[this.convert({typeReference:o.typeReference,value:u[o.discriminantValue.wireValue]})]}))}finally{this.context.errors.unscope()}}case"noProperties":return d.TypeLiteral.reference(d.invokeMethod({on:n,method:this.context.getPropertyName(o.discriminantValue.name),arguments_:[]}));default:S(o)}}convertObject({object_:e,value:r,as:n}){var o;let i=this.context.associateByWireValue({parameters:e.properties,values:(o=this.context.getRecord(r))!=null?o:{}});return d.TypeLiteral.builder({classReference:this.context.getJavaClassReferenceFromDeclaration({declaration:e.declaration}),parameters:i.map(u=>{this.context.errors.scope(u.name.wireValue);try{return{name:this.context.getMethodName(u.name.name),value:this.convert({typeReference:u.typeReference,value:u.value,as:n})}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:r}){let n=this.getEnumValueName({enum_:e,value:r});return n==null?d.TypeLiteral.nop():d.TypeLiteral.enum_({classReference:this.context.getJavaClassReferenceFromDeclaration({declaration:e.declaration}),value:n})}getEnumValueName({enum_:e,value:r}){if(typeof r!="string"){this.context.errors.add({severity:T.Critical,message:`Expected enum value string, got: ${typeof r}`});return}let n=e.values.find(i=>i.wireValue===r);if(n==null){this.context.errors.add({severity:T.Critical,message:`An enum value named "${r}" does not exist in this context`});return}return this.context.getEnumName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r});if(n==null)return d.TypeLiteral.nop();if(this.context.isPrimitive(n.valueTypeReference))return d.TypeLiteral.reference(d.invokeMethod({on:this.context.getJavaClassReferenceFromDeclaration({declaration:e.declaration}),method:"of",arguments_:[n.typeInstantiation]}));let i=this.getUndiscriminatedUnionFieldName({typeReference:n.valueTypeReference});return i==null?d.TypeLiteral.nop():d.TypeLiteral.reference(d.invokeMethod({on:this.context.getJavaClassReferenceFromDeclaration({declaration:e.declaration}),method:`of${i}`,arguments_:[n.typeInstantiation]}))}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r}){for(let n of e.types)try{let i=this.convert({typeReference:n,value:r});return{valueTypeReference:n,typeInstantiation:i}}catch(i){continue}this.context.errors.add({severity:T.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof r}" value`})}getUndiscriminatedUnionFieldName({typeReference:e}){switch(e.type){case"list":return this.getUndiscriminatedUnionFieldNameForList({list:e});case"literal":return this.getUndiscriminatedUnionFieldNameForLiteral({literal:e.value});case"map":return this.getUndiscriminatedUnionFieldNameForMap({map:e});case"named":{let r=this.context.resolveNamedType({typeId:e.value});return r==null?void 0:this.context.getClassName(r.declaration.name)}case"optional":return this.getUndiscriminatedUnionFieldNameForOptional({typeReference:e});case"nullable":return this.getUndiscriminatedUnionFieldNameForNullable({typeReference:e});case"primitive":return this.getUndiscriminatedUnionFieldNameForPrimitive({primitive:e.value});case"set":return this.getUndiscriminatedUnionFieldNameForSet({set:e});case"unknown":return"Unknown";default:S(e)}}getUndiscriminatedUnionFieldNameForList({list:e}){let r=this.getUndiscriminatedUnionFieldName({typeReference:e});if(r!=null)return`ListOf${r}`}getUndiscriminatedUnionFieldNameForMap({map:e}){let r=this.getUndiscriminatedUnionFieldName({typeReference:e.key});if(r==null)return;let n=this.getUndiscriminatedUnionFieldName({typeReference:e.value});if(n!=null)return`MapOf${r}To${n}`}getUndiscriminatedUnionFieldNameForOptional({typeReference:e}){let r=this.getUndiscriminatedUnionFieldName({typeReference:e});if(r!=null)return`Optional${r}`}getUndiscriminatedUnionFieldNameForNullable({typeReference:e}){let r=this.getUndiscriminatedUnionFieldName({typeReference:e});if(r!=null)return`Nullable${r}`}getUndiscriminatedUnionFieldNameForSet({set:e}){let r=this.getUndiscriminatedUnionFieldName({typeReference:e});if(r!=null)return`SetOf${r}`}getUndiscriminatedUnionFieldNameForLiteral({literal:e}){}getUndiscriminatedUnionFieldNameForPrimitive({primitive:e}){switch(e){case"INTEGER":case"UINT":return"Integer";case"LONG":case"UINT_64":return"Long";case"FLOAT":return"Float";case"DOUBLE":return"Double";case"BOOLEAN":return"Boolean";case"BIG_INTEGER":return"BigInteger";case"STRING":return"String";case"UUID":return"Uuid";case"DATE":return"Date";case"DATE_TIME":return"DateTime";case"BASE_64":return"Base64";default:S(e)}}convertUnknown({value:e}){return d.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:r,as:n}){switch(e){case"INTEGER":case"UINT":{let i=this.getValueAsNumber({value:r,as:n});return i==null?d.TypeLiteral.nop():d.TypeLiteral.integer(i)}case"LONG":case"UINT_64":{let i=this.getValueAsNumber({value:r,as:n});return i==null?d.TypeLiteral.nop():d.TypeLiteral.long(i)}case"FLOAT":{let i=this.getValueAsNumber({value:r,as:n});return i==null?d.TypeLiteral.nop():d.TypeLiteral.float(i)}case"DOUBLE":{let i=this.getValueAsNumber({value:r,as:n});return i==null?d.TypeLiteral.nop():d.TypeLiteral.double(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:r,as:n});return i==null?d.TypeLiteral.nop():d.TypeLiteral.boolean(i)}case"STRING":{let i=this.context.getValueAsString({value:r});return i==null?d.TypeLiteral.nop():d.TypeLiteral.string(i)}case"DATE":{let i=this.context.getValueAsString({value:r});return i==null?d.TypeLiteral.nop():d.TypeLiteral.string(i)}case"DATE_TIME":{let i=this.context.getValueAsString({value:r});return i==null?d.TypeLiteral.nop():d.TypeLiteral.dateTime(i)}case"UUID":{let i=this.context.getValueAsString({value:r});return i==null?d.TypeLiteral.nop():d.TypeLiteral.uuid(i)}case"BASE_64":{let i=this.context.getValueAsString({value:r});return i==null?d.TypeLiteral.nop():d.TypeLiteral.bytes(i)}case"BIG_INTEGER":{let i=this.context.getValueAsString({value:r});return i==null?d.TypeLiteral.nop():d.TypeLiteral.bigInteger(i)}default:S(e)}}getValueAsNumber({value:e,as:r}){let n=r==="mapKey"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:r}){let n=r==="mapKey"?typeof e=="string"?e==="true":e==="false"?!1:e:e;return this.context.getValueAsBoolean({value:n})}};a();s();var Tt=class{constructor({context:e}){g(this,"context");this.context=e}convert(e){switch(e.typeReference.type){case"list":return d.Type.list(this.convert({typeReference:e.typeReference}));case"literal":return this.convertLiteral({literal:e.typeReference.value});case"map":return d.Type.map(this.convert({typeReference:e.typeReference.key}),this.convert({typeReference:e.typeReference.value}));case"named":{let r=this.context.resolveNamedType({typeId:e.typeReference.value});return r==null?this.convertUnknown():this.convertNamed({named:r})}case"optional":case"nullable":return d.Type.optional(this.convert({typeReference:e.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:e.typeReference.value});case"set":return d.Type.set(this.convert({typeReference:e.typeReference}));case"unknown":return this.convertUnknown();default:S(e.typeReference)}}convertNamed({named:e}){switch(e.type){case"alias":return this.convert({typeReference:e.typeReference});case"enum":case"discriminatedUnion":case"object":case"undiscriminatedUnion":return d.Type.reference(d.classReference({name:this.context.getClassName(e.declaration.name),packageName:this.context.getTypesPackageName(e.declaration.fernFilepath)}));default:S(e)}}convertLiteral({literal:e}){switch(e.type){case"boolean":return d.Type.boolean();case"string":return d.Type.string()}}convertUnknown(){return d.Type.object()}convertPrimitive({primitive:e}){switch(e){case"INTEGER":return d.Type.integer();case"UINT":return d.Type.integer();case"LONG":return d.Type.long();case"UINT_64":return d.Type.long();case"FLOAT":return d.Type.float();case"DOUBLE":return d.Type.double();case"BOOLEAN":return d.Type.boolean();case"STRING":return d.Type.string();case"DATE":return d.Type.date();case"DATE_TIME":return d.Type.dateTime();case"UUID":return d.Type.uuid();case"BASE_64":return d.Type.bytes();case"BIG_INTEGER":return d.Type.bigInteger();default:S(e)}}};a();s();var Rt=class{constructor({context:e}){g(this,"context");this.context=e}getFilePropertyInfo({body:e,value:r}){var o;let n={fileFields:[],bodyPropertyFields:[]},i=(o=this.context.getRecord(r))!=null?o:{};for(let u of e.properties)switch(u.type){case"file":n.fileFields.push({name:this.context.getMethodName(u.name),value:this.getSingleFileProperty({property:u,record:i})});break;case"fileArray":n.fileFields.push({name:this.context.getMethodName(u.name),value:this.getArrayFileProperty({property:u,record:i})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getMethodName(u.name.name),value:this.getBodyProperty({property:u,record:i})});break;default:S(u)}return n}getSingleFileProperty({property:e,record:r}){let n=this.context.getSingleFileValue({property:e,record:r});return n==null?d.TypeLiteral.nop():d.TypeLiteral.reference(this.context.getFileStreamFromString(n))}getArrayFileProperty({property:e,record:r}){let n=this.context.getFileArrayValues({property:e,record:r});if(n==null)return d.TypeLiteral.nop();for(let i of n)return d.TypeLiteral.reference(this.context.getFileStreamFromString(i));return d.TypeLiteral.nop()}getBodyProperty({property:e,record:r}){let n=r[e.name.wireValue];return n==null?d.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:n})}};var wv=new Set(["enum","extends","package","void","short","class","abstract","return","import","for","assert","switch","getClass"]),Et=class t extends Tr{constructor({ir:r,config:n,options:i}){super({ir:r,config:n,options:i});g(this,"ir");g(this,"customConfig");g(this,"dynamicTypeMapper");g(this,"dynamicTypeLiteralMapper");g(this,"filePropertyMapper");this.ir=r,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeMapper=new Tt({context:this}),this.dynamicTypeLiteralMapper=new St({context:this}),this.filePropertyMapper=new Rt({context:this})}clone(){return new t({ir:this.ir,config:this.config,options:this.options})}getClassName(r){return this.getName(r.pascalCase.safeName)}getEnumName(r){return this.getName(r.screamingSnakeCase.safeName)}getPropertyName(r){return this.getName(r.camelCase.safeName)}getMethodName(r){return this.getName(r.camelCase.safeName)}getRootClientClassReference(){return d.classReference({name:this.getRootClientClassName(),packageName:this.getRootPackageName()})}getRootClientClassName(){var r,n;return(n=(r=this.customConfig)==null?void 0:r["client-class-name"])!=null?n:`${this.getBaseNamePrefix()}Client`}getEnvironmentClassName(){return"Environment"}getEnvironmentTypeReferenceFromID(r){let n=this.resolveEnvironmentName(r);if(n!=null)return d.codeblock(i=>{i.writeNode(this.getEnvironmentClassReference()),i.write("."),i.write(this.getEnumName(n))})}getEnvironmentClassReference(){return d.classReference({name:this.getEnvironmentClassName(),packageName:this.getCorePackageName()})}getJavaClassReferenceFromDeclaration({declaration:r}){return d.classReference({name:r.name.pascalCase.unsafeName,packageName:this.getTypesPackageName(r.fernFilepath)})}getNullableClassReference(){return d.classReference({name:"Nullable",packageName:this.getCorePackageName()})}getNullableOfNull(){return d.TypeLiteral.reference(d.invokeMethod({on:this.getNullableClassReference(),method:"ofNull",arguments_:[]}))}getFileStreamFromString(r){return d.TypeLiteral.reference(d.codeblock(n=>{n.write("new "),n.writeNode(this.getFileStreamClassReference()),n.write("("),n.writeNode(this.getByteArrayInputStreamClassReference()),n.write("("),n.writeNode(d.TypeLiteral.string(r)),n.write(".getBytes("),n.writeNode(this.getStandardCharsetsClassReference()),n.write(".UTF_8)))")}))}getFileStreamClassReference(){return d.classReference({name:"FileStream",packageName:this.getCorePackageName()})}getByteArrayInputStreamClassReference(){return d.classReference({name:"ByteArrayInputStream",packageName:"java.io"})}getStandardCharsetsClassReference(){return d.classReference({name:"StandardCharsets",packageName:"java.nio.charset"})}isPrimitive(r){switch(r.type){case"primitive":return!0;case"optional":case"nullable":return this.isPrimitive(r.value);case"named":{let n=this.resolveNamedType({typeId:r.value});if(n==null)return!1;switch(n.type){case"alias":return this.isPrimitive(n.typeReference);case"discriminatedUnion":case"undiscriminatedUnion":case"object":case"enum":return!1;default:S(n)}break}case"list":case"set":case"map":case"literal":case"unknown":return!1;default:S(r)}}getRootPackageName(){let r=this.getPackagePrefixTokens();return this.joinPackageTokens(r)}getCorePackageName(){let r=this.getPackagePrefixTokens();return r.push("core"),this.joinPackageTokens(r)}getTypesPackageName(r){return this.getResourcesPackage(r,"types")}getRequestsPackageName(r){return this.getPackageLayout()==="flat"?this.getTypesPackageName(r):this.getResourcesPackage(r,"requests")}getResourcesPackage(r,n){let i=this.getPackagePrefixTokens();switch(this.getPackageLayout()){case"flat":r!=null&&i.push(...r.packagePath.map(o=>this.getPackageNameSegment(o)));break;case"nested":default:r!=null&&r.allParts.length>0&&i.push("resources"),r!=null&&i.push(...r.allParts.map(o=>this.getPackageNameSegment(o)))}return n!=null&&i.push(n),this.joinPackageTokens(i)}getPackageName(r,n){let i=this.getPackageNameSegments(r);return i=n!=null?[...i,n]:i,[...this.getPackagePrefixTokens(),...i].join(".")}getPackageLayout(){var r,n;return(n=(r=this.customConfig)==null?void 0:r["package-layout"])!=null?n:"nested"}shouldInlinePathParameters(){var r,n;return(n=(r=this.customConfig)==null?void 0:r["inline-path-parameters"])!=null?n:!1}shouldInlineFileProperties(){var r,n;return(n=(r=this.customConfig)==null?void 0:r["inline-file-properties"])!=null?n:!1}getPackageNameSegments(r){return r.packagePath.map(n=>this.getPackageNameSegment(n))}getPackageNameSegment(r){return r.camelCase.safeName.toLowerCase()}getPackagePrefixTokens(){var n;if(((n=this.customConfig)==null?void 0:n["package-prefix"])!=null)return this.customConfig["package-prefix"].split(".");let r=[];return r.push("com"),r.push(...this.splitOnNonAlphaNumericChar(this.config.organization)),r.push(...this.splitOnNonAlphaNumericChar(this.getApiName())),r}getBaseNamePrefix(){return this.convertKebabCaseToUpperCamelCase(this.config.organization)+this.convertKebabCaseToUpperCamelCase(this.getApiName())}getApiName(){return oi(this.config.workspaceName)}startsWithNumber(r){return/^\d/.test(r)}splitOnNonAlphaNumericChar(r){return r.split(/[^a-zA-Z0-9]/)}convertKebabCaseToUpperCamelCase(r){return r.replace(/-([a-z])/g,(n,i)=>i.toUpperCase()).replace(/^[a-z]/,n=>n.toUpperCase())}joinPackageTokens(r){return r.map(i=>this.startsWithNumber(i)?"_"+i:i).join(".")}getName(r){return this.isReservedName(r)?"_"+r:r}isReservedName(r){return wv.has(r)}};var It=class extends br{constructor({ir:r,config:n,options:i={}}){super(new Et({ir:r,config:n,options:i}));g(this,"formatter")}async generate(r,n={}){return super.generate(r,n)}generateSync(r,n={}){return super.generateSync(r,n)}createSnippetGenerator(r){return new At({context:r})}};0&&(module.exports={DynamicSnippetsGenerator});
|
|
31
|
+
`)}};s();u();s();u();var L={};Rr(L,{BRAND:()=>Xv,DIRTY:()=>Je,EMPTY_PATH:()=>Ev,INVALID:()=>R,NEVER:()=>Ux,OK:()=>W,ParseStatus:()=>V,Schema:()=>I,ZodAny:()=>Le,ZodArray:()=>Ae,ZodBigInt:()=>Xe,ZodBoolean:()=>Qe,ZodBranded:()=>wr,ZodCatch:()=>ct,ZodDate:()=>et,ZodDefault:()=>lt,ZodDiscriminatedUnion:()=>xn,ZodEffects:()=>ee,ZodEnum:()=>st,ZodError:()=>Z,ZodFirstPartyTypeKind:()=>k,ZodFunction:()=>bn,ZodIntersection:()=>at,ZodIssueCode:()=>v,ZodLazy:()=>it,ZodLiteral:()=>ot,ZodMap:()=>$t,ZodNaN:()=>Dt,ZodNativeEnum:()=>ut,ZodNever:()=>ne,ZodNull:()=>rt,ZodNullable:()=>de,ZodNumber:()=>Ke,ZodObject:()=>H,ZodOptional:()=>X,ZodParsedType:()=>T,ZodPipeline:()=>br,ZodPromise:()=>Ue,ZodReadonly:()=>ft,ZodRecord:()=>wn,ZodSchema:()=>I,ZodSet:()=>qt,ZodString:()=>Fe,ZodSymbol:()=>Mt,ZodTransformer:()=>ee,ZodTuple:()=>pe,ZodType:()=>I,ZodUndefined:()=>tt,ZodUnion:()=>nt,ZodUnknown:()=>Se,ZodVoid:()=>jt,addIssueToContext:()=>b,any:()=>sx,array:()=>fx,bigint:()=>rx,boolean:()=>nf,coerce:()=>Lx,custom:()=>ef,date:()=>nx,datetimeRegex:()=>Xc,defaultErrorMap:()=>Te,discriminatedUnion:()=>hx,effect:()=>kx,enum:()=>Sx,function:()=>bx,getErrorMap:()=>Lt,getParsedType:()=>fe,instanceof:()=>ex,intersection:()=>yx,isAborted:()=>gn,isAsync:()=>Ut,isDirty:()=>vn,isValid:()=>Oe,late:()=>Qv,lazy:()=>Tx,literal:()=>_x,makeIssue:()=>xr,map:()=>xx,nan:()=>tx,nativeEnum:()=>Ax,never:()=>lx,null:()=>ox,nullable:()=>Ix,number:()=>rf,object:()=>px,objectUtil:()=>Qa,oboolean:()=>Fx,onumber:()=>Ox,optional:()=>Nx,ostring:()=>Cx,pipeline:()=>Px,preprocess:()=>Ex,promise:()=>Rx,quotelessJson:()=>kv,record:()=>vx,set:()=>wx,setErrorMap:()=>Iv,strictObject:()=>dx,string:()=>tf,symbol:()=>ax,transformer:()=>kx,tuple:()=>gx,undefined:()=>ix,union:()=>mx,unknown:()=>ux,util:()=>C,void:()=>cx});s();u();s();u();s();u();s();u();s();u();var C;(function(r){r.assertEqual=a=>{};function e(a){}r.assertIs=e;function t(a){throw new Error}r.assertNever=t,r.arrayToEnum=a=>{let i={};for(let o of a)i[o]=o;return i},r.getValidEnumValues=a=>{let i=r.objectKeys(a).filter(l=>typeof a[a[l]]!="number"),o={};for(let l of i)o[l]=a[l];return r.objectValues(o)},r.objectValues=a=>r.objectKeys(a).map(function(i){return a[i]}),r.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{let i=[];for(let o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},r.find=(a,i)=>{for(let o of a)if(i(o))return o},r.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function n(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}r.joinValues=n,r.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(C||(C={}));var Qa;(function(r){r.mergeShapes=(e,t)=>h(h({},e),t)})(Qa||(Qa={}));var T=C.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fe=r=>{switch(typeof r){case"undefined":return T.undefined;case"string":return T.string;case"number":return Number.isNaN(r)?T.nan:T.number;case"boolean":return T.boolean;case"function":return T.function;case"bigint":return T.bigint;case"symbol":return T.symbol;case"object":return Array.isArray(r)?T.array:r===null?T.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?T.promise:typeof Map!="undefined"&&r instanceof Map?T.map:typeof Set!="undefined"&&r instanceof Set?T.set:typeof Date!="undefined"&&r instanceof Date?T.date:T.object;default:return T.unknown}};var v=C.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),kv=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:"),Z=class r extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(i){return i.message},n={_errors:[]},a=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let l=n,f=0;for(;f<o.path.length;){let d=o.path[f];f===o.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(o))):l[d]=l[d]||{_errors:[]},l=l[d],f++}}};return a(this),n}static assert(e){if(!(e instanceof r))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,C.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},n=[];for(let a of this.issues)if(a.path.length>0){let i=a.path[0];t[i]=t[i]||[],t[i].push(e(a))}else n.push(e(a));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};Z.create=r=>new Z(r);var Nv=(r,e)=>{let t;switch(r.code){case v.invalid_type:r.received===T.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case v.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,C.jsonStringifyReplacer)}`;break;case v.unrecognized_keys:t=`Unrecognized key(s) in object: ${C.joinValues(r.keys,", ")}`;break;case v.invalid_union:t="Invalid input";break;case v.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${C.joinValues(r.options)}`;break;case v.invalid_enum_value:t=`Invalid enum value. Expected ${C.joinValues(r.options)}, received '${r.received}'`;break;case v.invalid_arguments:t="Invalid function arguments";break;case v.invalid_return_type:t="Invalid function return type";break;case v.invalid_date:t="Invalid date";break;case v.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:C.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case v.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case v.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case v.custom:t="Invalid input";break;case v.invalid_intersection_types:t="Intersection results could not be merged";break;case v.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case v.not_finite:t="Number must be finite";break;default:t=e.defaultError,C.assertNever(r)}return{message:t}},Te=Nv;var Zc=Te;function Iv(r){Zc=r}function Lt(){return Zc}s();u();var xr=r=>{let{data:e,path:t,errorMaps:n,issueData:a}=r,i=[...t,...a.path||[]],o=A(h({},a),{path:i});if(a.message!==void 0)return A(h({},a),{path:i,message:a.message});let l="",f=n.filter(d=>!!d).slice().reverse();for(let d of f)l=d(o,{data:e,defaultError:l}).message;return A(h({},a),{path:i,message:l})},Ev=[];function b(r,e){let t=Lt(),n=xr({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Te?void 0:Te].filter(a=>!!a)});r.common.issues.push(n)}var V=class r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let a of t){if(a.status==="aborted")return R;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let a of t){let i=await a.key,o=await a.value;n.push({key:i,value:o})}return r.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let a of t){let{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return R;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value!="undefined"||a.alwaysSet)&&(n[i.value]=o.value)}return{status:e.value,value:n}}},R=Object.freeze({status:"aborted"}),Je=r=>({status:"dirty",value:r}),W=r=>({status:"valid",value:r}),gn=r=>r.status==="aborted",vn=r=>r.status==="dirty",Oe=r=>r.status==="valid",Ut=r=>typeof Promise!="undefined"&&r instanceof Promise;s();u();s();u();var S;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(S||(S={}));var Q=class{constructor(e,t,n,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Hc=(r,e)=>{if(Oe(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new Z(r.common.issues);return this._error=t,this._error}}};function N(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:n,description:a}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(o,l)=>{var d,y;let{message:f}=r;return o.code==="invalid_enum_value"?{message:f!=null?f:l.defaultError}:typeof l.data=="undefined"?{message:(d=f!=null?f:n)!=null?d:l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:(y=f!=null?f:t)!=null?y:l.defaultError}},description:a}}var I=class{get description(){return this._def.description}_getType(e){return fe(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:fe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new V,ctx:{common:e.parent.common,data:e.data,parsedType:fe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Ut(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var i;let n={common:{issues:[],async:(i=t==null?void 0:t.async)!=null?i:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fe(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Hc(n,a)}"~validate"(e){var n,a;let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fe(e)};if(!this["~standard"].async)try{let i=this._parseSync({data:e,path:[],parent:t});return Oe(i)?{value:i.value}:{issues:t.common.issues}}catch(i){(a=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(i=>Oe(i)?{value:i.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fe(e)},a=this._parse({data:e,path:n.path,parent:n}),i=await(Ut(a)?a:Promise.resolve(a));return Hc(n,i)}refine(e,t){let n=a=>typeof t=="string"||typeof t=="undefined"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,i)=>{let o=e(a),l=()=>i.addIssue(h({code:v.custom},n(a)));return typeof Promise!="undefined"&&o instanceof Promise?o.then(f=>f?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(e,t){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof t=="function"?t(n,a):t),!1))}_refinement(e){return new ee({schema:this,typeName:k.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return X.create(this,this._def)}nullable(){return de.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ae.create(this)}promise(){return Ue.create(this,this._def)}or(e){return nt.create([this,e],this._def)}and(e){return at.create(this,e,this._def)}transform(e){return new ee(A(h({},N(this._def)),{schema:this,typeName:k.ZodEffects,effect:{type:"transform",transform:e}}))}default(e){let t=typeof e=="function"?e:()=>e;return new lt(A(h({},N(this._def)),{innerType:this,defaultValue:t,typeName:k.ZodDefault}))}brand(){return new wr(h({typeName:k.ZodBranded,type:this},N(this._def)))}catch(e){let t=typeof e=="function"?e:()=>e;return new ct(A(h({},N(this._def)),{innerType:this,catchValue:t,typeName:k.ZodCatch}))}describe(e){let t=this.constructor;return new t(A(h({},this._def),{description:e}))}pipe(e){return br.create(this,e)}readonly(){return ft.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Pv=/^c[^\s-]{8,}$/i,Cv=/^[0-9a-z]+$/,Ov=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Fv=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Lv=/^[a-z0-9_-]{21}$/i,Uv=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Bv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Mv=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,jv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ei,$v=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Dv=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Vv=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Wv=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,zv=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Jc="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Gv=new RegExp(`^${Jc}$`);function Kc(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);let t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Zv(r){return new RegExp(`^${Kc(r)}$`)}function Xc(r){let e=`${Jc}T${Kc(r)}`,t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Hv(r,e){return!!((e==="v4"||!e)&&$v.test(r)||(e==="v6"||!e)&&Dv.test(r))}function Yv(r,e){if(!Uv.test(r))return!1;try{let[t]=r.split(".");if(!t)return!1;let n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch(t){return!1}}function Jv(r,e){return!!((e==="v4"||!e)&&qv.test(r)||(e==="v6"||!e)&&Vv.test(r))}var Fe=class r extends I{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==T.string){let i=this._getOrReturnCtx(e);return b(i,{code:v.invalid_type,expected:T.string,received:i.parsedType}),R}let n=new V,a;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:v.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:v.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=e.data.length>i.value,l=e.data.length<i.value;(o||l)&&(a=this._getOrReturnCtx(e,a),o?b(a,{code:v.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&b(a,{code:v.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")Mv.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"email",code:v.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")ei||(ei=new RegExp(jv,"u")),ei.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"emoji",code:v.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Fv.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"uuid",code:v.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")Lv.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"nanoid",code:v.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")Pv.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"cuid",code:v.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Cv.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"cuid2",code:v.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Ov.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"ulid",code:v.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch(o){a=this._getOrReturnCtx(e,a),b(a,{validation:"url",code:v.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"regex",code:v.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),b(a,{code:v.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),b(a,{code:v.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),b(a,{code:v.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Xc(i).test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{code:v.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?Gv.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{code:v.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?Zv(i).test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{code:v.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?Bv.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"duration",code:v.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?Hv(e.data,i.version)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"ip",code:v.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?Yv(e.data,i.alg)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"jwt",code:v.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?Jv(e.data,i.version)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"cidr",code:v.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Wv.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"base64",code:v.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?zv.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"base64url",code:v.invalid_string,message:i.message}),n.dirty()):C.assertNever(i);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(a=>e.test(a),h({validation:t,code:v.invalid_string},S.errToObj(n)))}_addCheck(e){return new r(A(h({},this._def),{checks:[...this._def.checks,e]}))}email(e){return this._addCheck(h({kind:"email"},S.errToObj(e)))}url(e){return this._addCheck(h({kind:"url"},S.errToObj(e)))}emoji(e){return this._addCheck(h({kind:"emoji"},S.errToObj(e)))}uuid(e){return this._addCheck(h({kind:"uuid"},S.errToObj(e)))}nanoid(e){return this._addCheck(h({kind:"nanoid"},S.errToObj(e)))}cuid(e){return this._addCheck(h({kind:"cuid"},S.errToObj(e)))}cuid2(e){return this._addCheck(h({kind:"cuid2"},S.errToObj(e)))}ulid(e){return this._addCheck(h({kind:"ulid"},S.errToObj(e)))}base64(e){return this._addCheck(h({kind:"base64"},S.errToObj(e)))}base64url(e){return this._addCheck(h({kind:"base64url"},S.errToObj(e)))}jwt(e){return this._addCheck(h({kind:"jwt"},S.errToObj(e)))}ip(e){return this._addCheck(h({kind:"ip"},S.errToObj(e)))}cidr(e){return this._addCheck(h({kind:"cidr"},S.errToObj(e)))}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck(h({kind:"datetime",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!=null?t:!1,local:(n=e==null?void 0:e.local)!=null?n:!1},S.errToObj(e==null?void 0:e.message)))}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck(h({kind:"time",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision},S.errToObj(e==null?void 0:e.message)))}duration(e){return this._addCheck(h({kind:"duration"},S.errToObj(e)))}regex(e,t){return this._addCheck(h({kind:"regex",regex:e},S.errToObj(t)))}includes(e,t){return this._addCheck(h({kind:"includes",value:e,position:t==null?void 0:t.position},S.errToObj(t==null?void 0:t.message)))}startsWith(e,t){return this._addCheck(h({kind:"startsWith",value:e},S.errToObj(t)))}endsWith(e,t){return this._addCheck(h({kind:"endsWith",value:e},S.errToObj(t)))}min(e,t){return this._addCheck(h({kind:"min",value:e},S.errToObj(t)))}max(e,t){return this._addCheck(h({kind:"max",value:e},S.errToObj(t)))}length(e,t){return this._addCheck(h({kind:"length",value:e},S.errToObj(t)))}nonempty(e){return this.min(1,S.errToObj(e))}trim(){return new r(A(h({},this._def),{checks:[...this._def.checks,{kind:"trim"}]}))}toLowerCase(){return new r(A(h({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){return new r(A(h({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};Fe.create=r=>{var e;return new Fe(h({checks:[],typeName:k.ZodString,coerce:(e=r==null?void 0:r.coerce)!=null?e:!1},N(r)))};function Kv(r,e){let t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=t>n?t:n,i=Number.parseInt(r.toFixed(a).replace(".","")),o=Number.parseInt(e.toFixed(a).replace(".",""));return i%o/10**a}var Ke=class r extends I{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==T.number){let i=this._getOrReturnCtx(e);return b(i,{code:v.invalid_type,expected:T.number,received:i.parsedType}),R}let n,a=new V;for(let i of this._def.checks)i.kind==="int"?C.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),b(n,{code:v.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),b(n,{code:v.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),b(n,{code:v.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?Kv(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),b(n,{code:v.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),b(n,{code:v.not_finite,message:i.message}),a.dirty()):C.assertNever(i);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,n,a){return new r(A(h({},this._def),{checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:S.toString(a)}]}))}_addCheck(e){return new r(A(h({},this._def),{checks:[...this._def.checks,e]}))}int(e){return this._addCheck({kind:"int",message:S.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:S.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&C.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}};Ke.create=r=>new Ke(h({checks:[],typeName:k.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1},N(r)));var Xe=class r extends I{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(i){return this._getInvalidInput(e)}if(this._getType(e)!==T.bigint)return this._getInvalidInput(e);let n,a=new V;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),b(n,{code:v.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),b(n,{code:v.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),b(n,{code:v.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):C.assertNever(i);return{status:a.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return b(t,{code:v.invalid_type,expected:T.bigint,received:t.parsedType}),R}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,n,a){return new r(A(h({},this._def),{checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:S.toString(a)}]}))}_addCheck(e){return new r(A(h({},this._def),{checks:[...this._def.checks,e]}))}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};Xe.create=r=>{var e;return new Xe(h({checks:[],typeName:k.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!=null?e:!1},N(r)))};var Qe=class extends I{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==T.boolean){let n=this._getOrReturnCtx(e);return b(n,{code:v.invalid_type,expected:T.boolean,received:n.parsedType}),R}return W(e.data)}};Qe.create=r=>new Qe(h({typeName:k.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1},N(r)));var et=class r extends I{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==T.date){let i=this._getOrReturnCtx(e);return b(i,{code:v.invalid_type,expected:T.date,received:i.parsedType}),R}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return b(i,{code:v.invalid_date}),R}let n=new V,a;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:v.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:v.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):C.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new r(A(h({},this._def),{checks:[...this._def.checks,e]}))}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:S.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:S.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};et.create=r=>new et(h({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:k.ZodDate},N(r)));var Mt=class extends I{_parse(e){if(this._getType(e)!==T.symbol){let n=this._getOrReturnCtx(e);return b(n,{code:v.invalid_type,expected:T.symbol,received:n.parsedType}),R}return W(e.data)}};Mt.create=r=>new Mt(h({typeName:k.ZodSymbol},N(r)));var tt=class extends I{_parse(e){if(this._getType(e)!==T.undefined){let n=this._getOrReturnCtx(e);return b(n,{code:v.invalid_type,expected:T.undefined,received:n.parsedType}),R}return W(e.data)}};tt.create=r=>new tt(h({typeName:k.ZodUndefined},N(r)));var rt=class extends I{_parse(e){if(this._getType(e)!==T.null){let n=this._getOrReturnCtx(e);return b(n,{code:v.invalid_type,expected:T.null,received:n.parsedType}),R}return W(e.data)}};rt.create=r=>new rt(h({typeName:k.ZodNull},N(r)));var Le=class extends I{constructor(){super(...arguments),this._any=!0}_parse(e){return W(e.data)}};Le.create=r=>new Le(h({typeName:k.ZodAny},N(r)));var Se=class extends I{constructor(){super(...arguments),this._unknown=!0}_parse(e){return W(e.data)}};Se.create=r=>new Se(h({typeName:k.ZodUnknown},N(r)));var ne=class extends I{_parse(e){let t=this._getOrReturnCtx(e);return b(t,{code:v.invalid_type,expected:T.never,received:t.parsedType}),R}};ne.create=r=>new ne(h({typeName:k.ZodNever},N(r)));var jt=class extends I{_parse(e){if(this._getType(e)!==T.undefined){let n=this._getOrReturnCtx(e);return b(n,{code:v.invalid_type,expected:T.void,received:n.parsedType}),R}return W(e.data)}};jt.create=r=>new jt(h({typeName:k.ZodVoid},N(r)));var Ae=class r extends I{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),a=this._def;if(t.parsedType!==T.array)return b(t,{code:v.invalid_type,expected:T.array,received:t.parsedType}),R;if(a.exactLength!==null){let o=t.data.length>a.exactLength.value,l=t.data.length<a.exactLength.value;(o||l)&&(b(t,{code:o?v.too_big:v.too_small,minimum:l?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(b(t,{code:v.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(b(t,{code:v.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,l)=>a.type._parseAsync(new Q(t,o,t.path,l)))).then(o=>V.mergeArray(n,o));let i=[...t.data].map((o,l)=>a.type._parseSync(new Q(t,o,t.path,l)));return V.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new r(A(h({},this._def),{minLength:{value:e,message:S.toString(t)}}))}max(e,t){return new r(A(h({},this._def),{maxLength:{value:e,message:S.toString(t)}}))}length(e,t){return new r(A(h({},this._def),{exactLength:{value:e,message:S.toString(t)}}))}nonempty(e){return this.min(1,e)}};Ae.create=(r,e)=>new Ae(h({type:r,minLength:null,maxLength:null,exactLength:null,typeName:k.ZodArray},N(e)));function Bt(r){if(r instanceof H){let e={};for(let t in r.shape){let n=r.shape[t];e[t]=X.create(Bt(n))}return new H(A(h({},r._def),{shape:()=>e}))}else return r instanceof Ae?new Ae(A(h({},r._def),{type:Bt(r.element)})):r instanceof X?X.create(Bt(r.unwrap())):r instanceof de?de.create(Bt(r.unwrap())):r instanceof pe?pe.create(r.items.map(e=>Bt(e))):r}var H=class r extends I{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=C.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==T.object){let d=this._getOrReturnCtx(e);return b(d,{code:v.invalid_type,expected:T.object,received:d.parsedType}),R}let{status:n,ctx:a}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof ne&&this._def.unknownKeys==="strip"))for(let d in a.data)o.includes(d)||l.push(d);let f=[];for(let d of o){let y=i[d],g=a.data[d];f.push({key:{status:"valid",value:d},value:y._parse(new Q(a,g,a.path,d)),alwaysSet:d in a.data})}if(this._def.catchall instanceof ne){let d=this._def.unknownKeys;if(d==="passthrough")for(let y of l)f.push({key:{status:"valid",value:y},value:{status:"valid",value:a.data[y]}});else if(d==="strict")l.length>0&&(b(a,{code:v.unrecognized_keys,keys:l}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let y of l){let g=a.data[y];f.push({key:{status:"valid",value:y},value:d._parse(new Q(a,g,a.path,y)),alwaysSet:y in a.data})}}return a.common.async?Promise.resolve().then(async()=>{let d=[];for(let y of f){let g=await y.key,_=await y.value;d.push({key:g,value:_,alwaysSet:y.alwaysSet})}return d}).then(d=>V.mergeObjectSync(n,d)):V.mergeObjectSync(n,f)}get shape(){return this._def.shape()}strict(e){return S.errToObj,new r(h(A(h({},this._def),{unknownKeys:"strict"}),e!==void 0?{errorMap:(t,n)=>{var i,o,l,f;let a=(l=(o=(i=this._def).errorMap)==null?void 0:o.call(i,t,n).message)!=null?l:n.defaultError;return t.code==="unrecognized_keys"?{message:(f=S.errToObj(e).message)!=null?f:a}:{message:a}}}:{}))}strip(){return new r(A(h({},this._def),{unknownKeys:"strip"}))}passthrough(){return new r(A(h({},this._def),{unknownKeys:"passthrough"}))}extend(e){return new r(A(h({},this._def),{shape:()=>h(h({},this._def.shape()),e)}))}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>h(h({},this._def.shape()),e._def.shape()),typeName:k.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r(A(h({},this._def),{catchall:e}))}pick(e){let t={};for(let n of C.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new r(A(h({},this._def),{shape:()=>t}))}omit(e){let t={};for(let n of C.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new r(A(h({},this._def),{shape:()=>t}))}deepPartial(){return Bt(this)}partial(e){let t={};for(let n of C.objectKeys(this.shape)){let a=this.shape[n];e&&!e[n]?t[n]=a:t[n]=a.optional()}return new r(A(h({},this._def),{shape:()=>t}))}required(e){let t={};for(let n of C.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof X;)i=i._def.innerType;t[n]=i}return new r(A(h({},this._def),{shape:()=>t}))}keyof(){return Qc(C.objectKeys(this.shape))}};H.create=(r,e)=>new H(h({shape:()=>r,unknownKeys:"strip",catchall:ne.create(),typeName:k.ZodObject},N(e)));H.strictCreate=(r,e)=>new H(h({shape:()=>r,unknownKeys:"strict",catchall:ne.create(),typeName:k.ZodObject},N(e)));H.lazycreate=(r,e)=>new H(h({shape:r,unknownKeys:"strip",catchall:ne.create(),typeName:k.ZodObject},N(e)));var nt=class extends I{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function a(i){for(let l of i)if(l.result.status==="valid")return l.result;for(let l of i)if(l.result.status==="dirty")return t.common.issues.push(...l.ctx.common.issues),l.result;let o=i.map(l=>new Z(l.ctx.common.issues));return b(t,{code:v.invalid_union,unionErrors:o}),R}if(t.common.async)return Promise.all(n.map(async i=>{let o=A(h({},t),{common:A(h({},t.common),{issues:[]}),parent:null});return{result:await i._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(a);{let i,o=[];for(let f of n){let d=A(h({},t),{common:A(h({},t.common),{issues:[]}),parent:null}),y=f._parseSync({data:t.data,path:t.path,parent:d});if(y.status==="valid")return y;y.status==="dirty"&&!i&&(i={result:y,ctx:d}),d.common.issues.length&&o.push(d.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;let l=o.map(f=>new Z(f));return b(t,{code:v.invalid_union,unionErrors:l}),R}}get options(){return this._def.options}};nt.create=(r,e)=>new nt(h({options:r,typeName:k.ZodUnion},N(e)));var _e=r=>r instanceof it?_e(r.schema):r instanceof ee?_e(r.innerType()):r instanceof ot?[r.value]:r instanceof st?r.options:r instanceof ut?C.objectValues(r.enum):r instanceof lt?_e(r._def.innerType):r instanceof tt?[void 0]:r instanceof rt?[null]:r instanceof X?[void 0,..._e(r.unwrap())]:r instanceof de?[null,..._e(r.unwrap())]:r instanceof wr||r instanceof ft?_e(r.unwrap()):r instanceof ct?_e(r._def.innerType):[],xn=class r extends I{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==T.object)return b(t,{code:v.invalid_type,expected:T.object,received:t.parsedType}),R;let n=this.discriminator,a=t.data[n],i=this.optionsMap.get(a);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(b(t,{code:v.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),R)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let a=new Map;for(let i of t){let o=_e(i.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let l of o){if(a.has(l))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(l)}`);a.set(l,i)}}return new r(h({typeName:k.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a},N(n)))}};function ti(r,e){let t=fe(r),n=fe(e);if(r===e)return{valid:!0,data:r};if(t===T.object&&n===T.object){let a=C.objectKeys(e),i=C.objectKeys(r).filter(l=>a.indexOf(l)!==-1),o=h(h({},r),e);for(let l of i){let f=ti(r[l],e[l]);if(!f.valid)return{valid:!1};o[l]=f.data}return{valid:!0,data:o}}else if(t===T.array&&n===T.array){if(r.length!==e.length)return{valid:!1};let a=[];for(let i=0;i<r.length;i++){let o=r[i],l=e[i],f=ti(o,l);if(!f.valid)return{valid:!1};a.push(f.data)}return{valid:!0,data:a}}else return t===T.date&&n===T.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}var at=class extends I{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),a=(i,o)=>{if(gn(i)||gn(o))return R;let l=ti(i.value,o.value);return l.valid?((vn(i)||vn(o))&&t.dirty(),{status:t.value,value:l.data}):(b(n,{code:v.invalid_intersection_types}),R)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};at.create=(r,e,t)=>new at(h({left:r,right:e,typeName:k.ZodIntersection},N(t)));var pe=class r extends I{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==T.array)return b(n,{code:v.invalid_type,expected:T.array,received:n.parsedType}),R;if(n.data.length<this._def.items.length)return b(n,{code:v.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),R;!this._def.rest&&n.data.length>this._def.items.length&&(b(n,{code:v.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let i=[...n.data].map((o,l)=>{let f=this._def.items[l]||this._def.rest;return f?f._parse(new Q(n,o,n.path,l)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>V.mergeArray(t,o)):V.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new r(A(h({},this._def),{rest:e}))}};pe.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new pe(h({items:r,typeName:k.ZodTuple,rest:null},N(e)))};var wn=class r extends I{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==T.object)return b(n,{code:v.invalid_type,expected:T.object,received:n.parsedType}),R;let a=[],i=this._def.keyType,o=this._def.valueType;for(let l in n.data)a.push({key:i._parse(new Q(n,l,n.path,l)),value:o._parse(new Q(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?V.mergeObjectAsync(t,a):V.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof I?new r(h({keyType:e,valueType:t,typeName:k.ZodRecord},N(n))):new r(h({keyType:Fe.create(),valueType:e,typeName:k.ZodRecord},N(t)))}},$t=class extends I{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==T.map)return b(n,{code:v.invalid_type,expected:T.map,received:n.parsedType}),R;let a=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([l,f],d)=>({key:a._parse(new Q(n,l,n.path,[d,"key"])),value:i._parse(new Q(n,f,n.path,[d,"value"]))}));if(n.common.async){let l=new Map;return Promise.resolve().then(async()=>{for(let f of o){let d=await f.key,y=await f.value;if(d.status==="aborted"||y.status==="aborted")return R;(d.status==="dirty"||y.status==="dirty")&&t.dirty(),l.set(d.value,y.value)}return{status:t.value,value:l}})}else{let l=new Map;for(let f of o){let d=f.key,y=f.value;if(d.status==="aborted"||y.status==="aborted")return R;(d.status==="dirty"||y.status==="dirty")&&t.dirty(),l.set(d.value,y.value)}return{status:t.value,value:l}}}};$t.create=(r,e,t)=>new $t(h({valueType:e,keyType:r,typeName:k.ZodMap},N(t)));var qt=class r extends I{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==T.set)return b(n,{code:v.invalid_type,expected:T.set,received:n.parsedType}),R;let a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(b(n,{code:v.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(b(n,{code:v.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());let i=this._def.valueType;function o(f){let d=new Set;for(let y of f){if(y.status==="aborted")return R;y.status==="dirty"&&t.dirty(),d.add(y.value)}return{status:t.value,value:d}}let l=[...n.data.values()].map((f,d)=>i._parse(new Q(n,f,n.path,d)));return n.common.async?Promise.all(l).then(f=>o(f)):o(l)}min(e,t){return new r(A(h({},this._def),{minSize:{value:e,message:S.toString(t)}}))}max(e,t){return new r(A(h({},this._def),{maxSize:{value:e,message:S.toString(t)}}))}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};qt.create=(r,e)=>new qt(h({valueType:r,minSize:null,maxSize:null,typeName:k.ZodSet},N(e)));var bn=class r extends I{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==T.function)return b(t,{code:v.invalid_type,expected:T.function,received:t.parsedType}),R;function n(l,f){return xr({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Lt(),Te].filter(d=>!!d),issueData:{code:v.invalid_arguments,argumentsError:f}})}function a(l,f){return xr({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Lt(),Te].filter(d=>!!d),issueData:{code:v.invalid_return_type,returnTypeError:f}})}let i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Ue){let l=this;return W(async function(...f){let d=new Z([]),y=await l._def.args.parseAsync(f,i).catch(E=>{throw d.addIssue(n(f,E)),d}),g=await Reflect.apply(o,this,y);return await l._def.returns._def.type.parseAsync(g,i).catch(E=>{throw d.addIssue(a(g,E)),d})})}else{let l=this;return W(function(...f){let d=l._def.args.safeParse(f,i);if(!d.success)throw new Z([n(f,d.error)]);let y=Reflect.apply(o,this,d.data),g=l._def.returns.safeParse(y,i);if(!g.success)throw new Z([a(y,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r(A(h({},this._def),{args:pe.create(e).rest(Se.create())}))}returns(e){return new r(A(h({},this._def),{returns:e}))}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new r(h({args:e||pe.create([]).rest(Se.create()),returns:t||Se.create(),typeName:k.ZodFunction},N(n)))}},it=class extends I{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};it.create=(r,e)=>new it(h({getter:r,typeName:k.ZodLazy},N(e)));var ot=class extends I{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return b(t,{received:t.data,code:v.invalid_literal,expected:this._def.value}),R}return{status:"valid",value:e.data}}get value(){return this._def.value}};ot.create=(r,e)=>new ot(h({value:r,typeName:k.ZodLiteral},N(e)));function Qc(r,e){return new st(h({values:r,typeName:k.ZodEnum},N(e)))}var st=class r extends I{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),n=this._def.values;return b(t,{expected:C.joinValues(n),received:t.parsedType,code:v.invalid_type}),R}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return b(t,{received:t.data,code:v.invalid_enum_value,options:n}),R}return W(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return r.create(e,h(h({},this._def),t))}exclude(e,t=this._def){return r.create(this.options.filter(n=>!e.includes(n)),h(h({},this._def),t))}};st.create=Qc;var ut=class extends I{_parse(e){let t=C.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==T.string&&n.parsedType!==T.number){let a=C.objectValues(t);return b(n,{expected:C.joinValues(a),received:n.parsedType,code:v.invalid_type}),R}if(this._cache||(this._cache=new Set(C.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let a=C.objectValues(t);return b(n,{received:n.data,code:v.invalid_enum_value,options:a}),R}return W(e.data)}get enum(){return this._def.values}};ut.create=(r,e)=>new ut(h({values:r,typeName:k.ZodNativeEnum},N(e)));var Ue=class extends I{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==T.promise&&t.common.async===!1)return b(t,{code:v.invalid_type,expected:T.promise,received:t.parsedType}),R;let n=t.parsedType===T.promise?t.data:Promise.resolve(t.data);return W(n.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Ue.create=(r,e)=>new Ue(h({type:r,typeName:k.ZodPromise},N(e)));var ee=class extends I{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===k.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),a=this._def.effect||null,i={addIssue:o=>{b(n,o),o.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){let o=a.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async l=>{if(t.value==="aborted")return R;let f=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return f.status==="aborted"?R:f.status==="dirty"?Je(f.value):t.value==="dirty"?Je(f.value):f});{if(t.value==="aborted")return R;let l=this._def.schema._parseSync({data:o,path:n.path,parent:n});return l.status==="aborted"?R:l.status==="dirty"?Je(l.value):t.value==="dirty"?Je(l.value):l}}if(a.type==="refinement"){let o=l=>{let f=a.refinement(l,i);if(n.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){let l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?R:(l.status==="dirty"&&t.dirty(),o(l.value),{status:t.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?R:(l.status==="dirty"&&t.dirty(),o(l.value).then(()=>({status:t.value,value:l.value}))))}if(a.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Oe(o))return R;let l=a.transform(o.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Oe(o)?Promise.resolve(a.transform(o.value,i)).then(l=>({status:t.value,value:l})):R);C.assertNever(a)}};ee.create=(r,e,t)=>new ee(h({schema:r,typeName:k.ZodEffects,effect:e},N(t)));ee.createWithPreprocess=(r,e,t)=>new ee(h({schema:e,effect:{type:"preprocess",transform:r},typeName:k.ZodEffects},N(t)));var X=class extends I{_parse(e){return this._getType(e)===T.undefined?W(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};X.create=(r,e)=>new X(h({innerType:r,typeName:k.ZodOptional},N(e)));var de=class extends I{_parse(e){return this._getType(e)===T.null?W(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};de.create=(r,e)=>new de(h({innerType:r,typeName:k.ZodNullable},N(e)));var lt=class extends I{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===T.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};lt.create=(r,e)=>new lt(h({innerType:r,typeName:k.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default},N(e)));var ct=class extends I{_parse(e){let{ctx:t}=this._processInputParams(e),n=A(h({},t),{common:A(h({},t.common),{issues:[]})}),a=this._def.innerType._parse({data:n.data,path:n.path,parent:h({},n)});return Ut(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Z(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Z(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};ct.create=(r,e)=>new ct(h({innerType:r,typeName:k.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch},N(e)));var Dt=class extends I{_parse(e){if(this._getType(e)!==T.nan){let n=this._getOrReturnCtx(e);return b(n,{code:v.invalid_type,expected:T.nan,received:n.parsedType}),R}return{status:"valid",value:e.data}}};Dt.create=r=>new Dt(h({typeName:k.ZodNaN},N(r)));var Xv=Symbol("zod_brand"),wr=class extends I{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},br=class r extends I{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?R:i.status==="dirty"?(t.dirty(),Je(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?R:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,t){return new r({in:e,out:t,typeName:k.ZodPipeline})}},ft=class extends I{_parse(e){let t=this._def.innerType._parse(e),n=a=>(Oe(a)&&(a.value=Object.freeze(a.value)),a);return Ut(t)?t.then(a=>n(a)):n(t)}unwrap(){return this._def.innerType}};ft.create=(r,e)=>new ft(h({innerType:r,typeName:k.ZodReadonly},N(e)));function Yc(r,e){let t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function ef(r,e={},t){return r?Le.create().superRefine((n,a)=>{var o,l;let i=r(n);if(i instanceof Promise)return i.then(f=>{var d,y;if(!f){let g=Yc(e,n),_=(y=(d=g.fatal)!=null?d:t)!=null?y:!0;a.addIssue(A(h({code:"custom"},g),{fatal:_}))}});if(!i){let f=Yc(e,n),d=(l=(o=f.fatal)!=null?o:t)!=null?l:!0;a.addIssue(A(h({code:"custom"},f),{fatal:d}))}}):Le.create()}var Qv={object:H.lazycreate},k;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(k||(k={}));var ex=(r,e={message:`Input not instance of ${r.name}`})=>ef(t=>t instanceof r,e),tf=Fe.create,rf=Ke.create,tx=Dt.create,rx=Xe.create,nf=Qe.create,nx=et.create,ax=Mt.create,ix=tt.create,ox=rt.create,sx=Le.create,ux=Se.create,lx=ne.create,cx=jt.create,fx=Ae.create,px=H.create,dx=H.strictCreate,mx=nt.create,hx=xn.create,yx=at.create,gx=pe.create,vx=wn.create,xx=$t.create,wx=qt.create,bx=bn.create,Tx=it.create,_x=ot.create,Sx=st.create,Ax=ut.create,Rx=Ue.create,kx=ee.create,Nx=X.create,Ix=de.create,Ex=ee.createWithPreprocess,Px=br.create,Cx=()=>tf().optional(),Ox=()=>rf().optional(),Fx=()=>nf().optional(),Lx={string:(r=>Fe.create(A(h({},r),{coerce:!0}))),number:(r=>Ke.create(A(h({},r),{coerce:!0}))),boolean:(r=>Qe.create(A(h({},r),{coerce:!0}))),bigint:(r=>Xe.create(A(h({},r),{coerce:!0}))),date:(r=>et.create(A(h({},r),{coerce:!0})))};var Ux=R;s();u();var af=L.strictObject({title:L.string(),content:L.string()});var ri=L.object({"base-api-exception-class-name":L.string().optional(),"base-exception-class-name":L.string().optional(),"client-class-name":L.string().optional(),"inline-file-properties":L.boolean().optional(),"inline-path-parameters":L.boolean().optional(),"package-layout":L.enum(["flat","nested"]).optional(),"package-prefix":L.string().optional(),"custom-dependencies":L.array(L.string()).optional(),"disable-required-property-builder-checks":L.boolean().optional(),"enable-forward-compatible-enums":L.boolean().optional(),"enable-inline-types":L.boolean().optional(),"enable-public-constructors":L.boolean().optional(),"generate-unknown-as-json-node":L.boolean().optional(),"json-include":L.enum(["non-absent","non-empty"]).optional(),"enable-extensible-builders":L.boolean().optional(),"use-default-request-parameter-values":L.boolean().optional(),"enable-wire-tests":L.boolean().default(!0),"custom-readme-sections":L.array(af).optional(),"wrapped-aliases":L.boolean().optional()});var m={};Rr(m,{Access:()=>ni,AstNode:()=>M,Class:()=>pt,ClassInstantiation:()=>dt,ClassReference:()=>U,CodeBlock:()=>mt,Method:()=>ht,MethodInvocation:()=>yt,Parameter:()=>gt,Type:()=>Tr,TypeLiteral:()=>Y,Writer:()=>Ye,classReference:()=>r0,class_:()=>t0,codeblock:()=>e0,instantiateClass:()=>n0,invokeMethod:()=>a0,method:()=>i0,parameter:()=>o0});s();u();s();u();s();u();var ni={Public:"public",Protected:"protected",Private:"private"};s();u();s();u();var M=class extends Ze{async toStringAsync({packageName:e,customConfig:t,formatter:n}){let a=new vr({packageName:e,customConfig:t,formatter:n});return this.write(a),a.toStringAsync()}toString({packageName:e,customConfig:t,formatter:n}){let a=new vr({packageName:e,customConfig:t,formatter:n});return this.write(a),a.toString()}};var pt=class extends M{constructor({name:t,access:n}){super();w(this,"name");w(this,"access");w(this,"methods",[]);this.name=t,this.access=n}write(t){if(t.write(`${this.access} class ${this.name}`),this.isEmpty()){t.writeLine(" {}");return}t.writeLine(" {"),t.indent();for(let n of this.methods)t.writeNode(n),t.newLine();t.dedent(),t.write("}")}addMethod(t){this.methods.push(t)}isEmpty(){return this.methods.length===0}};s();u();s();u();s();u();s();u();var U=class extends M{constructor({name:t,packageName:n,fullyQualified:a}){super();w(this,"name");w(this,"packageName");w(this,"fullyQualified");this.name=t,this.packageName=n,this.fullyQualified=a!=null?a:!1}write(t){if(t.addImport(`${this.packageName}.${this.name}`),this.fullyQualified){t.write(`${this.packageName}.${this.name}`);return}t.write(this.name)}};s();u();var Tr=class extends M{constructor(t){super();w(this,"internalType");this.internalType=t}write(t){switch(this.internalType.type){case"array":t.writeNode(this.internalType.value),t.write("[]");break;case"bigInteger":t.writeNode(Bx);break;case"boolean":t.write("Boolean");break;case"bytes":t.write("byte[]");break;case"date":t.write("String");break;case"dateTime":t.writeNode($x);break;case"double":t.write("Double");break;case"float":t.write("Float");break;case"generic":t.writeNode(this.internalType.value),t.write("<");for(let[n,a]of this.internalType.parameters.entries())t.writeNode(a),n<this.internalType.parameters.length-1&&t.write(", ");t.write(">");break;case"inputStream":t.writeNode(Vx);break;case"integer":t.write("Integer");break;case"iterable":this.writeIterable({writer:t,iterable:this.internalType});break;case"list":{this.writeList({writer:t,list:this.internalType});break}case"long":{t.write("Long");break}case"map":{this.writeMap({writer:t,map:this.internalType});break}case"object":{t.write("Object");break}case"optional":{this.writeOptional({writer:t,optional:this.internalType});break}case"reference":t.writeNode(this.internalType.value);break;case"set":{this.writeSet({writer:t,set:this.internalType});break}case"string":t.write("String");break;case"uuid":t.writeNode(Dx);break;case"void":t.write("Void");break;default:O(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static array(t){return new this({type:"array",value:t})}static bigInteger(){return new this({type:"bigInteger"})}static boolean(){return new this({type:"boolean"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static double(){return new this({type:"double"})}static float(){return new this({type:"float"})}static integer(){return new this({type:"integer"})}static list(t){return new this({type:"list",value:t})}static long(){return new this({type:"long"})}static map(t,n){return new this({type:"map",keyType:t,valueType:n})}static object(){return new this({type:"object"})}static optional(t){return this.isAlreadyOptional(t)?t:new this({type:"optional",value:t})}static reference(t){return new this({type:"reference",value:t})}static generic(t,n){return new this({type:"generic",value:t,parameters:n})}static set(t){return new this({type:"set",value:t})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static void(){return new this({type:"void"})}static iterable(t){return new this({type:"iterable",value:t})}static inputStream(){return new this({type:"inputStream"})}writeList({writer:t,list:n}){t.writeNode(Mx),t.write("<"),n.value.write(t),t.write(">")}writeMap({writer:t,map:n}){t.writeNode(jx),t.write("<"),n.keyType.write(t),t.write(", "),n.valueType.write(t),t.write(">")}writeOptional({writer:t,optional:n}){t.writeNode(Tn),t.write("<"),n.value.write(t),t.write(">")}writeIterable({writer:t,iterable:n}){t.writeNode(Tn),t.write("<"),n.value.write(t),t.write(">")}writeSet({writer:t,set:n}){t.writeNode(qx),t.write("<"),n.value.write(t),t.write(">")}static isAlreadyOptional(t){return t.internalType.type==="optional"}},_n=new U({name:"Arrays",packageName:"java.util"}),Bx=new U({name:"BigInteger",packageName:"java.math"}),jN=new U({name:"HashMap",packageName:"java.util"}),Mx=new U({name:"List",packageName:"java.util"}),jx=new U({name:"Map",packageName:"java.util"}),$x=new U({name:"OffsetDateTime",packageName:"java.time"}),Tn=new U({name:"Optional",packageName:"java.util"}),qx=new U({name:"Set",packageName:"java.util"}),Dx=new U({name:"UUID",packageName:"java.util"}),Vx=new U({name:"InputStream",packageName:"java.io"});var Y=class r extends M{constructor(t){super();w(this,"internalType");this.internalType=t}write(t){switch(this.internalType.type){case"bigInteger":this.writeBigInteger({writer:t,bigInteger:this.internalType});break;case"boolean":t.write(this.internalType.value.toString());break;case"builder":this.writeBuilder({writer:t,builder:this.internalType});break;case"bytes":t.write(`"${this.internalType.value}".getBytes()`);break;case"class":{this.writeClass({writer:t,class_:this.internalType});break}case"date":t.write(`"${this.internalType.value}"`);break;case"dateTime":this.writeDateTime({writer:t,dateTime:this.internalType});break;case"double":{let n=this.internalType.value.toString();!n.includes(".")&&!n.includes("e")&&!n.includes("E")?t.write(`${n}.0`):t.write(n);break}case"enum":this.writeEnum({writer:t,enum_:this.internalType});break;case"float":t.write(`${this.internalType.value}f`);break;case"integer":t.write(Math.floor(this.internalType.value).toString());break;case"list":{this.writeList({writer:t,list:this.internalType});break}case"long":{t.write(`${Math.floor(this.internalType.value)}L`);break}case"map":{this.writeMap({writer:t,map:this.internalType});break}case"optional":{this.writeOptional({writer:t,optional:this.internalType});break}case"raw":{this.internalType.value instanceof M?t.writeNode(this.internalType.value):t.write(this.internalType.value);break}case"reference":t.writeNode(this.internalType.value);break;case"set":{this.writeSet({writer:t,set:this.internalType});break}case"string":t.write(`"${this.escapeString(this.internalType.value)}"`);break;case"unknown":this.writeUnknown({writer:t,value:this.internalType.value});break;case"uuid":this.writeUUID({writer:t,uuid:this.internalType});break;case"nop":break;default:O(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static bigInteger(t){return new this({type:"bigInteger",value:t})}static boolean(t){return new this({type:"boolean",value:t})}static builder({classReference:t,parameters:n}){return new this({type:"builder",classReference:t,parameters:n})}static bytes(t){return new this({type:"bytes",value:t})}static class_({reference:t,parameters:n}){return new this({type:"class",reference:t,parameters:n})}static date(t){return new this({type:"date",value:t})}static dateTime(t){return new this({type:"dateTime",value:t})}static double(t){return new this({type:"double",value:t})}static enum_({classReference:t,value:n}){return new this({type:"enum",classReference:t,value:n})}static float(t){return new this({type:"float",value:t})}static integer(t){return new this({type:"integer",value:t})}static list({valueType:t,values:n,isParameter:a}){return new this({type:"list",valueType:t,values:n,isParameter:a})}static long(t){return new this({type:"long",value:t})}static map({keyType:t,valueType:n,entries:a}){return new this({type:"map",keyType:t,valueType:n,entries:a})}static optional({value:t,useOf:n}){return this.isAlreadyOptional(t)?t:new this({type:"optional",value:t,useOf:n})}static raw(t){return new this({type:"raw",value:t})}static reference(t){return new this({type:"reference",value:t})}static set({valueType:t,values:n}){return new this({type:"set",valueType:t,values:n})}static string(t){return new this({type:"string",value:t})}static unknown(t){return new this({type:"unknown",value:t})}static uuid(t){return new this({type:"uuid",value:t})}static nop(){return new this({type:"nop"})}static isNop(t){return t.internalType.type==="nop"}shouldWriteInLine(){switch(this.internalType.type){case"bigInteger":case"boolean":case"bytes":case"date":case"dateTime":case"double":case"enum":case"float":case"integer":case"long":case"nop":case"raw":case"string":case"unknown":case"uuid":return!0;case"optional":return this.internalType.value.shouldWriteInLine();case"builder":case"class":case"list":case"map":case"reference":case"set":return!1;default:O(this.internalType)}}writeBigInteger({writer:t,bigInteger:n}){t.write("new "),t.writeNode(m.instantiateClass({classReference:Wx,arguments_:[r.string(n.value)]}))}writeBuilder({writer:t,builder:n}){t.writeNode(n.classReference),t.writeNewLineIfLastLineNot(),t.indent(),this.writeBuilderParameters({writer:t,parameters:this.orderBuilderParameters(Yx({parameters:n.parameters}))}),t.dedent()}writeBuilderParameters({writer:t,parameters:n}){t.writeLine(".builder()");for(let a of n)t.write(`.${a.name}(`),a.value.shouldWriteInLine()||t.newLine(),t.indent(),t.writeNode(a.value),t.dedent(),a.value.shouldWriteInLine()||t.newLine(),t.writeLine(")");t.writeNewLineIfLastLineNot(),t.write(".build()")}orderBuilderParameters(t){return t.sort((n,a)=>n.value.isOptional()&&!a.value.isOptional()?1:!n.value.isOptional()&&a.value.isOptional()?-1:0)}writeClass({writer:t,class_:n}){let a=Hx({parameters:n.parameters});t.writeNode(m.instantiateClass({classReference:n.reference,arguments_:a.map(i=>i.value)}))}writeDateTime({writer:t,dateTime:n}){t.writeNode(m.invokeMethod({on:Gx,method:"parse",arguments_:[r.string(n.value)]}))}writeEnum({writer:t,enum_:n}){t.writeNode(n.classReference),t.write("."+n.value)}writeList({writer:t,list:n}){this.writeIterable({writer:t,iterable:n})}writeMap({writer:t,map:n}){let a=Jx({entries:n.entries});if(a.length===0){t.write("new "),t.writeNode(Sn),t.write("<"),t.writeNode(n.keyType),t.write(", "),t.writeNode(n.valueType),t.write(">()");return}t.write("new "),t.writeNode(Sn),t.write("<"),t.writeNode(n.keyType),t.write(", "),t.writeNode(n.valueType),t.writeLine(">() {{"),t.indent();for(let i of a)t.write("put("),t.writeNode(i.key),t.write(", "),t.writeNode(i.value),t.writeLine(");");t.dedent(),t.write("}}")}writeOptional({writer:t,optional:n}){if(!n.useOf){t.writeNode(n.value);return}t.writeNode(m.invokeMethod({on:Tn,method:"of",arguments_:[n.value]}))}writeSet({writer:t,set:n}){this.writeIterable({writer:t,iterable:n})}writeIterable({writer:t,iterable:n}){let a=n.type==="list"?ai:zx,i=Kx({values:n.values});if(n.type==="list"&&n.isParameter&&i.length>0){t.writeNode(m.invokeMethod({on:_n,method:"asList",arguments_:i}));return}if(i.length===0){t.write(`new ${a.name}<`),t.writeNode(n.valueType),t.write(">()");return}t.write("new "),t.writeNode(a),t.write("<"),t.writeNode(n.valueType),t.writeLine(">("),t.indent(),t.writeNode(m.invokeMethod({on:_n,method:"asList",arguments_:i})),t.writeNewLineIfLastLineNot(),t.dedent(),t.write(")")}writeUnknown({writer:t,value:n}){switch(typeof n){case"boolean":t.write(n.toString());return;case"string":t.write(`"${this.escapeString(n)}"`);return;case"number":t.write(n.toString());return;case"object":if(n==null){t.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:t,value:n});return}this.writeUnknownMap({writer:t,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:t,value:n}){if(n.length===0){t.write("new "),t.writeNode(ai),t.write("<Object>()");return}t.write("new "),t.writeNode(ai),t.write("<Object>("),t.writeNode(m.invokeMethod({on:_n,method:"asList",arguments_:n.map(a=>r.unknown(a))})),t.write(")")}writeUnknownMap({writer:t,value:n}){let a=Object.entries(n);if(a.length===0){t.write("new "),t.writeNode(Sn),t.write("<String, Object>()");return}t.writeLine("new "),t.writeNode(Sn),t.write("<String, Object>() {{"),t.indent();for(let[i,o]of a)t.write(`put("${i}", `),t.writeNode(r.unknown(o)),t.writeLine(");");t.dedent(),t.write("}}")}writeUUID({writer:t,uuid:n}){t.writeNode(m.invokeMethod({on:Zx,method:"fromString",arguments_:[r.string(n.value)]}))}escapeString(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}static isAlreadyOptional(t){return t.internalType.type==="optional"}},ai=new U({name:"ArrayList",packageName:"java.util"}),Wx=new U({name:"BigInteger",packageName:"java.math"}),Sn=new U({name:"HashMap",packageName:"java.util"}),zx=new U({name:"HashSet",packageName:"java.util"}),YN=new U({name:"List",packageName:"java.util"}),JN=new U({name:"Map",packageName:"java.util"}),Gx=new U({name:"OffsetDateTime",packageName:"java.time"}),KN=new U({name:"Set",packageName:"java.util"}),Zx=new U({name:"UUID",packageName:"java.util"});function Hx({parameters:r}){return r.filter(e=>!Y.isNop(e.value))}function Yx({parameters:r}){return r.filter(e=>!Y.isNop(e.value))}function Jx({entries:r}){return r.filter(e=>!Y.isNop(e.key)&&!Y.isNop(e.value))}function Kx({values:r}){return r.filter(e=>!Y.isNop(e))}function An({writer:r,arguments_:e}){let t=Qx(e);if(t.length===0){r.write("()");return}if(t.some(a=>a instanceof Y&&!a.shouldWriteInLine())){Xx({writer:r,arguments_:t});return}r.write("("),t.forEach((a,i)=>{i>0&&r.write(", "),of({writer:r,argument:a})}),r.write(")")}function Xx({writer:r,arguments_:e}){r.writeLine("("),r.indent(),e.forEach((t,n)=>{n>0&&r.writeLine(","),of({writer:r,argument:t})}),r.dedent(),e.length>0&&r.newLine(),r.write(")")}function of({writer:r,argument:e}){Xa(e)?r.writeNodeOrString(e.assignment):e.write(r)}function Qx(r){return r.filter(e=>!(e instanceof Y&&Y.isNop(e)))}var dt=class extends M{constructor({classReference:t,arguments_:n}){super();w(this,"classReference");w(this,"arguments_");this.classReference=t,this.arguments_=n}write(t){t.writeNode(this.classReference),An({writer:t,arguments_:this.arguments_})}};s();u();var mt=class extends M{constructor(t){super();w(this,"arg");this.arg=t}write(t){return new te(this.arg).write(t)}};s();u();var ht=class extends M{constructor({name:t,access:n,parameters:a,body:i,static_:o,return_:l}){super();w(this,"name");w(this,"access");w(this,"parameters");w(this,"body");w(this,"return_");w(this,"static_");this.name=t,this.access=n,this.parameters=a,this.body=i,this.return_=l,this.static_=o!=null?o:!1}write(t){if(t.write(`${this.access} `),this.static_&&t.write("static "),this.return_!=null?t.writeNode(this.return_):t.write("void"),t.write(` ${this.name}`),this.parameters.length===0)t.write("()");else if(this.parameters.length===1){if(t.write("("),this.parameters[0]==null)throw new Error("Cannot render parameter "+this.parameters[0]);t.writeNode(this.parameters[0]),t.write(")")}else t.writeLine("("),t.indent(),this.parameters.forEach((n,a)=>{a>0&&t.writeLine(", "),t.writeNode(n)}),t.dedent(),t.write(")");if(this.body==null){t.write(";");return}t.writeLine(" {"),t.indent(),t.writeNode(this.body),t.writeNewLineIfLastLineNot(),t.dedent(),t.write("}")}};s();u();var yt=class extends M{constructor({method:t,arguments_:n,on:a}){super();w(this,"on");w(this,"method");w(this,"arguments_");this.on=a,this.method=t,this.arguments_=n}write(t){this.on.write(t),t.write("."),t.write(this.method),An({writer:t,arguments_:this.arguments_})}};s();u();var gt=class extends M{constructor({name:t,type:n}){super();w(this,"name");w(this,"type");this.name=t,this.type=n}write(t){t.writeNode(this.type),t.write(` ${this.name}`)}};function e0(r){return new mt(r)}function t0(r){return new pt(r)}function r0(r){return new U(r)}function n0(r){return new dt(r)}function a0(r){return new yt(r)}function i0(r){return new ht(r)}function o0(r){return new gt(r)}s();u();var Rn=class{constructor({context:e}){w(this,"context");this.context=e}isNopTypeLiteral(e){var n;return((n=e.internalType)==null?void 0:n.type)==="nop"}wrapInOptionalIfNotNop(e,t=!1){return this.isNopTypeLiteral(e)?e:m.TypeLiteral.optional({value:e,useOf:t})}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?this.context.getNullableOfNull():(this.context.errors.add({severity:F.Critical,message:"Expected non-null value, but got null"}),m.TypeLiteral.nop());if(e.value===void 0)return m.TypeLiteral.nop();switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return this.convertLiteral({literal:e.typeReference.value,value:e.value});case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let t=this.context.resolveNamedType({typeId:e.typeReference.value});return t==null?m.TypeLiteral.nop():this.convertNamed({named:t,value:e.value,as:e.as,inUndiscriminatedUnion:e.inUndiscriminatedUnion})}case"nullable":case"optional":{if(e.value===void 0||typeof e.value=="object"&&e.value!==null&&Object.keys(e.value).length===0&&e.typeReference.value.type==="named")return m.TypeLiteral.reference(m.invokeMethod({on:m.classReference({name:"Optional",packageName:"java.util"}),method:"empty",arguments_:[]}));if(e.typeReference.value.type==="list"){let a=this.convertList({list:e.typeReference.value.value,value:e.value});return this.wrapInOptionalIfNotNop(a,!0)}let t=this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as,inUndiscriminatedUnion:e.inUndiscriminatedUnion}),n=e.as==="mapValue"||e.inUndiscriminatedUnion===!0;return this.wrapInOptionalIfNotNop(t,n)}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:O(e.typeReference)}}convertList({list:e,value:t}){if(!Array.isArray(t))return this.context.errors.add({severity:F.Critical,message:`Expected array but got: ${typeof t}`}),m.TypeLiteral.nop();let n=e.type==="optional"||e.type==="nullable";return m.TypeLiteral.list({valueType:this.context.dynamicTypeMapper.convert({typeReference:e}),values:t.map((a,i)=>{this.context.errors.scope({index:i});try{if(n){let o=this.convert({typeReference:e.value,value:a});return this.wrapInOptionalIfNotNop(o,!0)}return this.convert({typeReference:e,value:a})}finally{this.context.errors.unscope()}}),isParameter:!0})}convertLiteral({literal:e,value:t}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:t});return n==null?m.TypeLiteral.nop():m.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:t});return n==null?m.TypeLiteral.nop():m.TypeLiteral.string(n)}default:O(e)}}convertSet({set:e,value:t}){return Array.isArray(t)?m.TypeLiteral.set({valueType:this.context.dynamicTypeMapper.convert({typeReference:e}),values:t.map((n,a)=>{this.context.errors.scope({index:a});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:F.Critical,message:`Expected array but got: ${typeof t}`}),m.TypeLiteral.nop())}convertMap({map:e,value:t}){return typeof t!="object"||t==null?(this.context.errors.add({severity:F.Critical,message:`Expected object but got: ${t==null?"null":typeof t}`}),m.TypeLiteral.nop()):m.TypeLiteral.map({keyType:this.context.dynamicTypeMapper.convert({typeReference:e.key}),valueType:this.context.dynamicTypeMapper.convert({typeReference:e.value}),entries:Object.entries(t).map(([n,a])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"mapKey"}),value:this.convert({typeReference:e.value,value:a,as:"mapValue"})}}finally{this.context.errors.unscope()}})})}convertNamed({named:e,value:t,as:n,inUndiscriminatedUnion:a}){switch(e.type){case"alias":return this.convert({typeReference:e.typeReference,value:t,as:n,inUndiscriminatedUnion:a});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:e,value:t});case"enum":return this.convertEnum({enum_:e,value:t});case"object":return this.convertObject({object_:e,value:t,as:n});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:e,value:t});default:O(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:t}){let n=this.context.getJavaClassReferenceFromDeclaration({declaration:e.declaration}),a=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:t});if(a==null)return m.TypeLiteral.nop();let i=a.singleDiscriminatedUnionType;switch(i.type){case"samePropertiesAsObject":{let o=this.context.resolveNamedType({typeId:i.typeId});return o==null?m.TypeLiteral.nop():m.TypeLiteral.reference(m.invokeMethod({on:n,method:this.context.getPropertyName(i.discriminantValue.name),arguments_:[this.convertNamed({named:o,value:a.value})]}))}case"singleProperty":{let o=this.context.getRecord(a.value);if(o==null)return m.TypeLiteral.nop();try{return this.context.errors.scope(i.discriminantValue.wireValue),m.TypeLiteral.reference(m.invokeMethod({on:n,method:this.context.getPropertyName(i.discriminantValue.name),arguments_:[this.convert({typeReference:i.typeReference,value:o[i.discriminantValue.wireValue]})]}))}finally{this.context.errors.unscope()}}case"noProperties":return m.TypeLiteral.reference(m.invokeMethod({on:n,method:this.context.getPropertyName(i.discriminantValue.name),arguments_:[]}));default:O(i)}}convertObject({object_:e,value:t,as:n}){var i;let a=this.context.associateByWireValue({parameters:e.properties,values:(i=this.context.getRecord(t))!=null?i:{}});return m.TypeLiteral.builder({classReference:this.context.getJavaClassReferenceFromDeclaration({declaration:e.declaration}),parameters:a.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getMethodName(o.name.name),value:this.convert({typeReference:o.typeReference,value:o.value,as:n})}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:t}){let n=this.getEnumValueName({enum_:e,value:t});return n==null?m.TypeLiteral.nop():m.TypeLiteral.enum_({classReference:this.context.getJavaClassReferenceFromDeclaration({declaration:e.declaration}),value:n})}getEnumValueName({enum_:e,value:t}){if(typeof t!="string"){this.context.errors.add({severity:F.Critical,message:`Expected enum value string, got: ${typeof t}`});return}let n=e.values.find(a=>a.wireValue===t);if(n==null){this.context.errors.add({severity:F.Critical,message:`An enum value named "${t}" does not exist in this context`});return}return this.context.getEnumName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:t}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:t});return n==null?m.TypeLiteral.nop():this.context.isPrimitive(n.valueTypeReference)?m.TypeLiteral.reference(m.invokeMethod({on:this.context.getJavaClassReferenceFromDeclaration({declaration:e.declaration}),method:"of",arguments_:[n.typeInstantiation]})):m.TypeLiteral.reference(m.invokeMethod({on:this.context.getJavaClassReferenceFromDeclaration({declaration:e.declaration}),method:"of",arguments_:[n.typeInstantiation]}))}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:t}){for(let n of e.types)try{let a=this.convert({typeReference:n,value:t,inUndiscriminatedUnion:!0});return{valueTypeReference:n,typeInstantiation:a}}catch(a){continue}this.context.errors.add({severity:F.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof t}" value`})}getUndiscriminatedUnionFieldName({typeReference:e}){switch(e.type){case"list":return this.getUndiscriminatedUnionFieldNameForList({list:e});case"literal":return this.getUndiscriminatedUnionFieldNameForLiteral({literal:e.value});case"map":return this.getUndiscriminatedUnionFieldNameForMap({map:e});case"named":{let t=this.context.resolveNamedType({typeId:e.value});return t==null?void 0:this.context.getClassName(t.declaration.name)}case"optional":return this.getUndiscriminatedUnionFieldNameForOptional({typeReference:e});case"nullable":return this.getUndiscriminatedUnionFieldNameForNullable({typeReference:e});case"primitive":return this.getUndiscriminatedUnionFieldNameForPrimitive({primitive:e.value});case"set":return this.getUndiscriminatedUnionFieldNameForSet({set:e});case"unknown":return"Unknown";default:O(e)}}getUndiscriminatedUnionFieldNameForList({list:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`ListOf${t}`}getUndiscriminatedUnionFieldNameForMap({map:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e.key});if(t==null)return;let n=this.getUndiscriminatedUnionFieldName({typeReference:e.value});if(n!=null)return`MapOf${t}To${n}`}getUndiscriminatedUnionFieldNameForOptional({typeReference:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`Optional${t}`}getUndiscriminatedUnionFieldNameForNullable({typeReference:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`Nullable${t}`}getUndiscriminatedUnionFieldNameForSet({set:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`SetOf${t}`}getUndiscriminatedUnionFieldNameForLiteral({literal:e}){}getUndiscriminatedUnionFieldNameForPrimitive({primitive:e}){switch(e){case"INTEGER":case"UINT":return"Integer";case"LONG":case"UINT_64":return"Long";case"FLOAT":return"Float";case"DOUBLE":return"Double";case"BOOLEAN":return"Boolean";case"BIG_INTEGER":return"BigInteger";case"STRING":return"String";case"UUID":return"Uuid";case"DATE":return"Date";case"DATE_TIME":return"DateTime";case"BASE_64":return"Base64";default:O(e)}}convertUnknown({value:e}){return m.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:t,as:n}){switch(e){case"INTEGER":case"UINT":{let a=this.getValueAsNumber({value:t,as:n});return a==null?m.TypeLiteral.nop():m.TypeLiteral.integer(a)}case"LONG":case"UINT_64":{let a=this.getValueAsNumber({value:t,as:n});return a==null?m.TypeLiteral.nop():m.TypeLiteral.long(a)}case"FLOAT":{let a=this.getValueAsNumber({value:t,as:n});return a==null?m.TypeLiteral.nop():m.TypeLiteral.float(a)}case"DOUBLE":{let a=this.getValueAsNumber({value:t,as:n});return a==null?m.TypeLiteral.nop():m.TypeLiteral.double(a)}case"BOOLEAN":{let a=this.getValueAsBoolean({value:t,as:n});return a==null?m.TypeLiteral.nop():m.TypeLiteral.boolean(a)}case"STRING":{let a=this.context.getValueAsString({value:t});return a==null?m.TypeLiteral.nop():m.TypeLiteral.string(a)}case"DATE":{let a=this.context.getValueAsString({value:t});return a==null?m.TypeLiteral.nop():m.TypeLiteral.string(a)}case"DATE_TIME":{let a=this.context.getValueAsString({value:t});return a==null?m.TypeLiteral.nop():m.TypeLiteral.dateTime(a)}case"UUID":{let a=this.context.getValueAsString({value:t});return a==null?m.TypeLiteral.nop():m.TypeLiteral.uuid(a)}case"BASE_64":{let a=this.context.getValueAsString({value:t});return a==null?m.TypeLiteral.nop():m.TypeLiteral.bytes(a)}case"BIG_INTEGER":{let a=this.context.getValueAsString({value:t});return a==null?m.TypeLiteral.nop():m.TypeLiteral.bigInteger(a)}default:O(e)}}getValueAsNumber({value:e,as:t}){let n=t==="mapKey"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:t}){let n=t==="mapKey"?typeof e=="string"?e==="true":e==="false"?!1:e:e;return this.context.getValueAsBoolean({value:n})}};s();u();var kn=class{constructor({context:e}){w(this,"context");this.context=e}convert(e){switch(e.typeReference.type){case"list":return m.Type.list(this.convert({typeReference:e.typeReference}));case"literal":return this.convertLiteral({literal:e.typeReference.value});case"map":return m.Type.map(this.convert({typeReference:e.typeReference.key}),this.convert({typeReference:e.typeReference.value}));case"named":{let t=this.context.resolveNamedType({typeId:e.typeReference.value});return t==null?this.convertUnknown():this.convertNamed({named:t})}case"optional":case"nullable":return m.Type.optional(this.convert({typeReference:e.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:e.typeReference.value});case"set":return m.Type.set(this.convert({typeReference:e.typeReference}));case"unknown":return this.convertUnknown();default:O(e.typeReference)}}convertNamed({named:e}){switch(e.type){case"alias":return this.convert({typeReference:e.typeReference});case"enum":case"discriminatedUnion":case"object":case"undiscriminatedUnion":return m.Type.reference(m.classReference({name:this.context.getClassName(e.declaration.name),packageName:this.context.getTypesPackageName(e.declaration.fernFilepath)}));default:O(e)}}convertLiteral({literal:e}){switch(e.type){case"boolean":return m.Type.boolean();case"string":return m.Type.string()}}convertUnknown(){return m.Type.object()}convertPrimitive({primitive:e}){switch(e){case"INTEGER":return m.Type.integer();case"UINT":return m.Type.integer();case"LONG":return m.Type.long();case"UINT_64":return m.Type.long();case"FLOAT":return m.Type.float();case"DOUBLE":return m.Type.double();case"BOOLEAN":return m.Type.boolean();case"STRING":return m.Type.string();case"DATE":return m.Type.date();case"DATE_TIME":return m.Type.dateTime();case"UUID":return m.Type.uuid();case"BASE_64":return m.Type.bytes();case"BIG_INTEGER":return m.Type.bigInteger();default:O(e)}}};s();u();var Nn=class{constructor({context:e}){w(this,"context");this.context=e}getFilePropertyInfo({body:e,value:t}){var i;let n={fileFields:[],bodyPropertyFields:[]},a=(i=this.context.getRecord(t))!=null?i:{};for(let o of e.properties)switch(o.type){case"file":n.fileFields.push({name:this.context.getMethodName(o.name),value:this.getSingleFileProperty({property:o,record:a})});break;case"fileArray":n.fileFields.push({name:this.context.getMethodName(o.name),value:this.getArrayFileProperty({property:o,record:a})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getMethodName(o.name.name),value:this.getBodyProperty({property:o,record:a})});break;default:O(o)}return n}getSingleFileProperty({property:e,record:t}){let n=this.context.getSingleFileValue({property:e,record:t});return n==null?m.TypeLiteral.nop():m.TypeLiteral.reference(this.context.getFileStreamFromString(n))}getArrayFileProperty({property:e,record:t}){let n=this.context.getFileArrayValues({property:e,record:t});if(n==null)return m.TypeLiteral.nop();for(let a of n)return m.TypeLiteral.reference(this.context.getFileStreamFromString(a));return m.TypeLiteral.nop()}getBodyProperty({property:e,record:t}){let n=t[e.name.wireValue];return n==null?m.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:n})}};var s0=new Set(["enum","extends","package","void","short","class","abstract","return","import","for","assert","switch","getClass"]),In=class r extends gr{constructor({ir:t,config:n,options:a}){var i;super({ir:t,config:n,options:a});w(this,"ir");w(this,"customConfig");w(this,"dynamicTypeMapper");w(this,"dynamicTypeLiteralMapper");w(this,"filePropertyMapper");this.ir=t,this.customConfig=ri.parse((i=n.customConfig)!=null?i:{}),this.dynamicTypeMapper=new kn({context:this}),this.dynamicTypeLiteralMapper=new Rn({context:this}),this.filePropertyMapper=new Nn({context:this})}clone(){return new r({ir:this.ir,config:this.config,options:this.options})}getClassName(t){return this.getName(t.pascalCase.safeName)}getEnumName(t){return this.getName(t.screamingSnakeCase.safeName)}getPropertyName(t){return this.getName(t.camelCase.safeName)}getMethodName(t){return this.getName(t.camelCase.safeName)}getRootClientClassReference(){return m.classReference({name:this.getRootClientClassName(),packageName:this.getRootPackageName()})}getRootClientClassName(){var t,n;return(n=(t=this.customConfig)==null?void 0:t["client-class-name"])!=null?n:`${this.getBaseNamePrefix()}Client`}getEnvironmentClassName(){return"Environment"}getEnvironmentTypeReferenceFromID(t){let n=this.resolveEnvironmentName(t);if(n!=null)return m.codeblock(a=>{a.writeNode(this.getEnvironmentClassReference()),a.write("."),a.write(this.getEnumName(n))})}getEnvironmentClassReference(){return m.classReference({name:this.getEnvironmentClassName(),packageName:this.getCorePackageName()})}getJavaClassReferenceFromDeclaration({declaration:t}){return m.classReference({name:t.name.pascalCase.unsafeName,packageName:this.getTypesPackageName(t.fernFilepath)})}getNullableClassReference(){return m.classReference({name:"Nullable",packageName:this.getCorePackageName()})}getNullableOfNull(){return m.TypeLiteral.reference(m.invokeMethod({on:this.getNullableClassReference(),method:"ofNull",arguments_:[]}))}getFileStreamFromString(t){return m.TypeLiteral.reference(m.codeblock(n=>{n.write("new "),n.writeNode(this.getFileStreamClassReference()),n.write("("),n.writeNode(this.getByteArrayInputStreamClassReference()),n.write("("),n.writeNode(m.TypeLiteral.string(t)),n.write(".getBytes("),n.writeNode(this.getStandardCharsetsClassReference()),n.write(".UTF_8)))")}))}getFileStreamClassReference(){return m.classReference({name:"FileStream",packageName:this.getCorePackageName()})}getByteArrayInputStreamClassReference(){return m.classReference({name:"ByteArrayInputStream",packageName:"java.io"})}getStandardCharsetsClassReference(){return m.classReference({name:"StandardCharsets",packageName:"java.nio.charset"})}isPrimitive(t){switch(t.type){case"primitive":return!0;case"optional":case"nullable":return this.isPrimitive(t.value);case"named":{let n=this.resolveNamedType({typeId:t.value});if(n==null)return!1;switch(n.type){case"alias":return this.isPrimitive(n.typeReference);case"discriminatedUnion":case"undiscriminatedUnion":case"object":case"enum":return!1;default:O(n)}break}case"list":case"set":case"map":case"literal":case"unknown":return!1;default:O(t)}}getRootPackageName(){let t=this.getPackagePrefixTokens();return this.joinPackageTokens(t)}getCorePackageName(){let t=this.getPackagePrefixTokens();return t.push("core"),this.joinPackageTokens(t)}getTypesPackageName(t){return this.getResourcesPackage(t,"types")}getRequestsPackageName(t){return this.getPackageLayout()==="flat"?this.getTypesPackageName(t):this.getResourcesPackage(t,"requests")}getResourcesPackage(t,n){let a=this.getPackagePrefixTokens();switch(this.getPackageLayout()){case"flat":t!=null&&a.push(...t.packagePath.map(i=>this.getPackageNameSegment(i)));break;case"nested":default:t!=null&&t.allParts.length>0&&a.push("resources"),t!=null&&a.push(...t.allParts.map(i=>this.getPackageNameSegment(i)))}return n!=null&&a.push(n),this.joinPackageTokens(a)}getPackageName(t,n){let a=this.getPackageNameSegments(t);return a=n!=null?[...a,n]:a,[...this.getPackagePrefixTokens(),...a].join(".")}getPackageLayout(){var t,n;return(n=(t=this.customConfig)==null?void 0:t["package-layout"])!=null?n:"nested"}shouldInlinePathParameters(){var t,n;return(n=(t=this.customConfig)==null?void 0:t["inline-path-parameters"])!=null?n:!1}shouldInlineFileProperties(){var t,n;return(n=(t=this.customConfig)==null?void 0:t["inline-file-properties"])!=null?n:!1}getPackageNameSegments(t){return t.packagePath.map(n=>this.getPackageNameSegment(n))}getPackageNameSegment(t){return t.camelCase.safeName.toLowerCase()}getPackagePrefixTokens(){var n;if(((n=this.customConfig)==null?void 0:n["package-prefix"])!=null)return this.customConfig["package-prefix"].split(".");let t=[];return t.push("com"),t.push(...this.splitOnNonAlphaNumericChar(this.config.organization)),t.push(...this.splitOnNonAlphaNumericChar(this.getApiName())),t}getBaseNamePrefix(){return this.convertKebabCaseToUpperCamelCase(this.config.organization)+this.convertKebabCaseToUpperCamelCase(this.getApiName())}getApiName(){return Ka(this.config.workspaceName)}startsWithNumber(t){return/^\d/.test(t)}splitOnNonAlphaNumericChar(t){return t.split(/[^a-zA-Z0-9]/)}convertKebabCaseToUpperCamelCase(t){return t.replace(/-([a-z])/g,(n,a)=>a.toUpperCase()).replace(/^[a-z]/,n=>n.toUpperCase())}joinPackageTokens(t){return t.map(a=>this.startsWithNumber(a)?"_"+a:a).join(".")}getName(t){return this.isReservedName(t)?"_"+t:t}isReservedName(t){return s0.has(t)}};s();u();var sf="com.example.usage",u0="Example",l0="main",c0="args",uf="client",f0={type:"primitive",value:"STRING"},En=class{constructor({context:e,formatter:t}){w(this,"context");w(this,"formatter");this.context=e,this.formatter=t}async generateSnippet({endpoint:e,request:t,options:n}){var o;let a=this.getConfig(n);return await this.buildCodeBlock({endpoint:e,snippet:t,options:n}).toStringAsync({packageName:(o=a.fullStylePackageName)!=null?o:sf,customConfig:this.context.customConfig,formatter:this.formatter})}generateSnippetSync({endpoint:e,request:t,options:n}){var o;let a=this.getConfig(n);return this.buildCodeBlock({endpoint:e,snippet:t,options:n}).toString({packageName:(o=a.fullStylePackageName)!=null?o:sf,customConfig:this.context.customConfig,formatter:this.formatter})}buildCodeBlock({endpoint:e,snippet:t,options:n}){let a=m.codeblock(o=>{o.writeNodeStatement(this.constructClient({endpoint:e,snippet:t})),o.newLine(),o.writeNodeStatement(this.callMethod({endpoint:e,snippet:t}))}),i=this.getStyle(n);switch(i){case He.Concise:return a;case He.Full:return this.buildFullCodeBlock({body:a,options:n});default:O(i)}}constructClient({endpoint:e,snippet:t}){return m.codeblock(n=>{n.writeNode(this.context.getRootClientClassReference()),n.write(` ${uf} = `),n.writeNode(m.TypeLiteral.builder({classReference:this.context.getRootClientClassReference(),parameters:this.getRootClientBuilderArgs({endpoint:e,snippet:t})}))})}buildFullCodeBlock({body:e,options:t}){var o;let n=this.getConfig(t),a=m.class_({name:(o=n.fullStyleClassName)!=null?o:u0,access:m.Access.Public}),i=m.parameter({name:c0,type:m.Type.array(m.Type.string())});return a.addMethod(m.method({name:l0,access:m.Access.Public,static_:!0,parameters:[i],body:e})),a}getRootClientBuilderArgs({endpoint:e,snippet:t}){var l,f;let n=[];e.auth!=null&&(t.auth!=null?n.push(...this.getRootClientAuthArgs({auth:e.auth,values:t.auth})):this.context.errors.add({severity:F.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`}));let a=this.getRootClientBaseUrlArg({baseUrl:t.baseURL,environment:t.environment});a!=null&&n.push(a),this.context.errors.scope(re.Headers),this.context.ir.headers!=null&&t.headers!=null&&n.push(...this.getRootClientHeaderArgs({headers:this.context.ir.headers,values:t.headers})),this.context.errors.unscope();let i=new Set;if([...(l=this.context.ir.pathParameters)!=null?l:[],...(f=e.request.pathParameters)!=null?f:[]].forEach(d=>{d.variable!=null&&i.add(d.variable)}),this.context.ir.variables!=null&&this.context.ir.variables.length>0){for(let d of this.context.ir.variables)if(i.has(d.id)){let y=d.name.camelCase.unsafeName;n.push({name:y,value:m.TypeLiteral.string(`YOUR_${d.name.screamingSnakeCase.unsafeName}`)})}}return n}getRootClientBaseUrlArg({baseUrl:e,environment:t}){var n;if(e!=null&&t!=null){this.context.errors.add({severity:F.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(e!=null){if(((n=this.context.ir.environments)==null?void 0:n.environments.type)==="multipleBaseUrls"){this.context.errors.add({severity:F.Critical,message:"The Java SDK doesn't support a baseUrl when multiple URL environments are configured"});return}return{name:"url",value:m.TypeLiteral.string(e)}}if(t!=null){if(this.context.isSingleEnvironmentID(t)){let a=this.context.getEnvironmentTypeReferenceFromID(t);if(a==null){this.context.errors.add({severity:F.Warning,message:`Environment ${JSON.stringify(t)} was not found`});return}return{name:"environment",value:m.TypeLiteral.reference(a)}}if(this.context.isMultiEnvironmentValues(t))return this.context.validateMultiEnvironmentUrlValues(t)?{name:"environment",value:m.TypeLiteral.reference(m.instantiateClass({classReference:this.context.getEnvironmentClassReference(),arguments_:Object.values(t).map(a=>this.context.dynamicTypeLiteralMapper.convert({typeReference:f0,value:a}))}))}:void 0}}getRootClientAuthArgs({auth:e,values:t}){if(t.type!==e.type)return this.addError(this.context.newAuthMismatchError({auth:e,values:t}).message),[];switch(e.type){case"basic":return t.type==="basic"?this.getRootClientBasicAuthArgs({auth:e,values:t}):[];case"bearer":return t.type==="bearer"?this.getRootClientBearerAuthArgs({auth:e,values:t}):[];case"header":return t.type==="header"?this.getRootClientHeaderAuthArgs({auth:e,values:t}):[];case"oauth":return t.type==="oauth"?this.getRootClientOAuthArgs({auth:e,values:t}):[];case"inferred":return this.addWarning("The Java SDK Generator does not support Inferred auth scheme yet"),[];default:O(e)}}addError(e){this.context.errors.add({severity:F.Critical,message:e})}addWarning(e){this.context.errors.add({severity:F.Warning,message:e})}getRootClientBasicAuthArgs({auth:e,values:t}){return[{name:"credentials",value:m.TypeLiteral.raw(`"${t.username}", "${t.password}"`)}]}getRootClientBearerAuthArgs({auth:e,values:t}){return[{name:this.context.getMethodName(e.token),value:m.TypeLiteral.string(t.token)}]}getRootClientHeaderAuthArgs({auth:e,values:t}){return[{name:this.context.getMethodName(e.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:t.value})}]}getRootClientOAuthArgs({auth:e,values:t}){return[{name:this.context.getMethodName(e.clientId),value:m.TypeLiteral.string(t.clientId)},{name:this.context.getMethodName(e.clientSecret),value:m.TypeLiteral.string(t.clientSecret)}]}getRootClientHeaderArgs({headers:e,values:t}){let n=[];for(let a of e){let i=this.getRootClientHeaderArg({header:a,value:t.value});i!=null&&n.push({name:this.context.getMethodName(a.name.name),value:i})}return n}getRootClientHeaderArg({header:e,value:t}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:t});if(!m.TypeLiteral.isNop(n))return n}callMethod({endpoint:e,snippet:t}){return m.invokeMethod({on:m.codeblock(uf),method:this.getMethod({endpoint:e}),arguments_:this.getMethodArgs({endpoint:e,snippet:t})})}getMethodArgs({endpoint:e,snippet:t}){switch(e.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:e.request,snippet:t});case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:t});default:O(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:t}){var l,f;let n=[];this.context.errors.scope(re.PathParameters);let i=[...(l=this.context.ir.pathParameters)!=null?l:[],...(f=e.pathParameters)!=null?f:[]].filter(d=>d.variable==null);i.length>0&&n.push(...this.getPathParameters({namedParameters:i,snippet:t}).map(d=>d.value)),this.context.errors.unscope(),this.context.errors.scope(re.RequestBody),e.body!=null&&n.push(this.getBodyRequestArg({body:e.body,value:t.requestBody})),this.context.errors.unscope();let o=this.getRequestOptionsArg({request:e,snippet:t});return o!=null&&n.push(o),n}getBodyRequestArg({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return e.value.type==="optional"?t==null?m.TypeLiteral.reference(m.invokeMethod({on:m.classReference({name:"Optional",packageName:"java.util"}),method:"empty",arguments_:[]})):m.TypeLiteral.optional({value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value.value,value:t}),useOf:!0}):this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:t});default:O(e)}}getBytesBodyRequestArg({value:e}){return typeof e!="string"?(this.context.errors.add({severity:F.Critical,message:`Expected bytes value to be a string, got ${typeof e}`}),m.TypeLiteral.nop()):m.TypeLiteral.bytes(e)}getMethodArgsForInlinedRequest({request:e,snippet:t}){var y,g;let n=[],{inlinePathParameters:a,inlineFileProperties:i}={inlinePathParameters:this.context.shouldInlinePathParameters(),inlineFileProperties:this.context.shouldInlineFileProperties()};this.context.errors.scope(re.PathParameters);let o=[],f=[...(y=this.context.ir.pathParameters)!=null?y:[],...(g=e.pathParameters)!=null?g:[]].filter(_=>_.variable==null);f.length>0&&o.push(...this.getPathParameters({namedParameters:f,snippet:t})),this.context.errors.unscope(),this.context.errors.scope(re.RequestBody);let d=this.getFilePropertyInfo({request:e,snippet:t});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:a})||n.push(...o.map(_=>_.value)),i||n.push(...d.fileFields.map(_=>_.value)),n.push(this.getInlinedRequestArg({request:e,snippet:t,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:a})?o:[],filePropertyInfo:d})),n}getFilePropertyInfo({request:e,snippet:t}){return e.body==null||!this.context.isFileUploadRequestBody(e.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:e.body,value:t.requestBody})}getInlinedRequestArg({request:e,snippet:t,pathParameterFields:n,filePropertyInfo:a}){var y,g,_,E;this.context.errors.scope(re.QueryParameters);let o=this.context.associateQueryParametersByWireValue({parameters:(y=e.queryParameters)!=null?y:[],values:(g=t.queryParameters)!=null?g:{}}).map(B=>({name:this.context.getMethodName(B.name.name),value:this.context.dynamicTypeLiteralMapper.convert(B)}));this.context.errors.unscope(),this.context.errors.scope(re.Headers);let f=this.context.associateByWireValue({parameters:(_=e.headers)!=null?_:[],values:(E=t.headers)!=null?E:{}}).map(B=>({name:this.context.getMethodName(B.name.name),value:this.context.dynamicTypeLiteralMapper.convert(B)}));this.context.errors.unscope(),this.context.errors.scope(re.RequestBody);let d=e.body!=null?this.getInlinedRequestBodyBuilderParameters({body:e.body,value:t.requestBody,filePropertyInfo:a}):[];return this.context.errors.unscope(),m.TypeLiteral.builder({classReference:m.classReference({name:this.context.getClassName(e.declaration.name),packageName:this.context.getRequestsPackageName(e.declaration.fernFilepath)}),parameters:[...n,...f,...o,...d]})}getRequestOptionsArg({request:e,snippet:t}){var f,d,y;let n="headers"in e?(f=e.headers)!=null?f:[]:[];if(n.length===0||Object.keys((d=t.headers)!=null?d:{}).length===0)return;this.context.errors.scope(re.Headers);let a=this.context.associateByWireValue({parameters:n,values:(y=t.headers)!=null?y:{}});if(this.context.errors.unscope(),a.length===0)return;let i=m.classReference({name:"RequestOptions",packageName:this.context.getCorePackageName()}),o=m.invokeMethod({on:i,method:"builder",arguments_:[]});for(let g of a)o=m.invokeMethod({on:o,method:"addHeader",arguments_:[m.TypeLiteral.string(g.name.wireValue),this.context.dynamicTypeLiteralMapper.convert(g)]});let l=m.invokeMethod({on:o,method:"build",arguments_:[]});return m.TypeLiteral.reference(l)}getInlinedRequestBodyBuilderParameters({body:e,value:t,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyBuilderParameters({parameters:e.value,value:t});case"referenced":return[this.getReferencedRequestBodyPropertyBuilderParameter({body:e,value:t})];case"fileUpload":return this.getFileUploadRequestBodyBuilderParameters({filePropertyInfo:n});default:O(e)}}getFileUploadRequestBodyBuilderParameters({filePropertyInfo:e}){return this.context.shouldInlineFileProperties()?[...e.fileFields,...e.bodyPropertyFields]:e.bodyPropertyFields}getReferencedRequestBodyPropertyBuilderParameter({body:e,value:t}){return{name:this.context.getMethodName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:e.bodyType,value:t})}}getReferencedRequestBodyPropertyTypeLiteral({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:t});default:O(e)}}getInlinedRequestBodyPropertyBuilderParameters({parameters:e,value:t}){var i;let n=[],a=this.context.associateByWireValue({parameters:e,values:(i=this.context.getRecord(t))!=null?i:{}});for(let o of a)n.push({name:this.context.getMethodName(o.name.name),value:this.context.dynamicTypeLiteralMapper.convert(o)});return n}getPathParameters({namedParameters:e,snippet:t}){var i;let n=[],a=this.context.associateByWireValue({parameters:e,values:(i=t.pathParameters)!=null?i:{}});for(let o of a)n.push({name:this.context.getMethodName(o.name.name),value:this.context.dynamicTypeLiteralMapper.convert(o)});return n}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(t=>`${this.context.getMethodName(t)}()`).join(".")}.${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}getStyle(e){var t,n;return(n=(t=e.style)!=null?t:this.context.options.style)!=null?n:He.Full}getConfig(e){var t,n;return(n=(t=e.config)!=null?t:this.context.options.config)!=null?n:{}}};var Pn=class extends mr{constructor({ir:t,config:n,options:a={}}){super(new In({ir:t,config:n,options:a}));w(this,"formatter")}async generate(t,n={}){return super.generate(t,n)}generateSync(t,n={}){return super.generateSync(t,n)}createSnippetGenerator(t){return new En({context:t})}};0&&(module.exports={DynamicSnippetsGenerator});
|
|
28
32
|
/*! Bundled license information:
|
|
29
33
|
|
|
30
34
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|
|
@@ -46,3 +50,4 @@ lodash-es/lodash.js:
|
|
|
46
50
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
47
51
|
*)
|
|
48
52
|
*/
|
|
53
|
+
//# sourceMappingURL=index.cjs.map
|