@fern-api/php-dynamic-snippets 0.0.14 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/cjs/DynamicSnippetsGenerator.cjs +9 -9
  2. package/cjs/DynamicSnippetsGenerator.cjs.map +1 -1
  3. package/cjs/EndpointSnippetGenerator.cjs +7 -7
  4. package/cjs/EndpointSnippetGenerator.cjs.map +1 -1
  5. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +6 -6
  6. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -1
  7. package/cjs/context/DynamicTypeLiteralMapper.cjs +6 -6
  8. package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -1
  9. package/cjs/context/FilePropertyMapper.cjs +7 -7
  10. package/cjs/context/FilePropertyMapper.cjs.map +1 -1
  11. package/cjs/index.cjs +9 -9
  12. package/cjs/index.cjs.map +1 -1
  13. package/esm/DynamicSnippetsGenerator.js +1 -1
  14. package/esm/EndpointSnippetGenerator.js +1 -1
  15. package/esm/{chunk-PYHFKEW4.js → chunk-34WVNBJS.js} +7 -7
  16. package/esm/chunk-34WVNBJS.js.map +1 -0
  17. package/esm/{chunk-RC5VUNGI.js → chunk-BN32SYGE.js} +2 -2
  18. package/esm/{chunk-3QAUV5WT.js → chunk-F7LTKJMT.js} +2 -2
  19. package/esm/{chunk-E5GKCY37.js → chunk-MZ7AWQF7.js} +2 -2
  20. package/esm/{chunk-VYTKQRKI.js → chunk-P7HYTUQU.js} +2 -2
  21. package/esm/{chunk-WWRNGEPJ.js → chunk-Q7QB5SA5.js} +2 -2
  22. package/esm/{chunk-EIFVUIK7.js → chunk-U6JJRNQH.js} +2 -2
  23. package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
  24. package/esm/context/DynamicTypeLiteralMapper.js +1 -1
  25. package/esm/context/FilePropertyMapper.js +1 -1
  26. package/esm/index.js +1 -1
  27. package/package.json +1 -1
  28. package/esm/chunk-PYHFKEW4.js.map +0 -1
  29. /package/esm/{chunk-RC5VUNGI.js.map → chunk-BN32SYGE.js.map} +0 -0
  30. /package/esm/{chunk-3QAUV5WT.js.map → chunk-F7LTKJMT.js.map} +0 -0
  31. /package/esm/{chunk-E5GKCY37.js.map → chunk-MZ7AWQF7.js.map} +0 -0
  32. /package/esm/{chunk-VYTKQRKI.js.map → chunk-P7HYTUQU.js.map} +0 -0
  33. /package/esm/{chunk-WWRNGEPJ.js.map → chunk-Q7QB5SA5.js.map} +0 -0
  34. /package/esm/{chunk-EIFVUIK7.js.map → chunk-U6JJRNQH.js.map} +0 -0
@@ -1,6 +1,6 @@
1
- "use strict";var He=Object.defineProperty,ii=Object.defineProperties,oi=Object.getOwnPropertyDescriptor,ai=Object.getOwnPropertyDescriptors,si=Object.getOwnPropertyNames,Wt=Object.getOwnPropertySymbols;var Yt=Object.prototype.hasOwnProperty,fi=Object.prototype.propertyIsEnumerable;var bt=(r,t,e)=>t in r?He(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Oe=(r,t)=>{for(var e in t||(t={}))Yt.call(t,e)&&bt(r,e,t[e]);if(Wt)for(var e of Wt(t))fi.call(t,e)&&bt(r,e,t[e]);return r},Me=(r,t)=>ii(r,ai(t));var Et=(r,t)=>()=>(r&&(t=r(r=0)),t);var Gt=(r,t)=>{for(var e in t)He(r,e,{get:t[e],enumerable:!0})},ui=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of si(t))!Yt.call(r,i)&&i!==e&&He(r,i,{get:()=>t[i],enumerable:!(n=oi(t,i))||n.enumerable});return r};var pi=r=>ui(He({},"__esModule",{value:!0}),r);var m=(r,t,e)=>bt(r,typeof t!="symbol"?t+"":t,e);function Vt(){throw new Error("setTimeout has not been defined")}function zt(){throw new Error("clearTimeout has not been defined")}function Kt(r){if(re===setTimeout)return setTimeout(r,0);if((re===Vt||!re)&&setTimeout)return re=setTimeout,setTimeout(r,0);try{return re(r,0)}catch(t){try{return re.call(null,r,0)}catch(e){return re.call(this,r,0)}}}function li(r){if(ne===clearTimeout)return clearTimeout(r);if((ne===zt||!ne)&&clearTimeout)return ne=clearTimeout,clearTimeout(r);try{return ne(r)}catch(t){try{return ne.call(null,r)}catch(e){return ne.call(this,r)}}}function ci(){!_e||!he||(_e=!1,he.length?W=he.concat(W):Ve=-1,W.length&&Jt())}function Jt(){if(!_e){var r=Kt(ci);_e=!0;for(var t=W.length;t;){for(he=W,W=[];++Ve<t;)he&&he[Ve].run();Ve=-1,t=W.length}he=null,_e=!1,li(r)}}function mi(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];W.push(new Qt(r,t)),W.length===1&&!_e&&Kt(Jt)}function Qt(r,t){this.fun=r,this.array=t}function xe(){}function Li(r){throw new Error("process.binding is not supported")}function Ri(){return"/"}function Pi(r){throw new Error("process.chdir is not supported")}function Fi(){return 0}function ki(r){var t=Bi.call(Ne)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function Mi(){var r=new Date,t=r-Oi;return t/1e3}var re,ne,W,_e,he,Ve,di,hi,xi,yi,gi,wi,vi,Ti,Ai,bi,Ei,Ii,Ci,Si,Ni,_i,Ne,Bi,Oi,l,Ht,a=Et(()=>{"use strict";re=Vt,ne=zt;typeof globalThis.setTimeout=="function"&&(re=setTimeout);typeof globalThis.clearTimeout=="function"&&(ne=clearTimeout);W=[],_e=!1,Ve=-1;Qt.prototype.run=function(){this.fun.apply(null,this.array)};di="browser",hi="browser",xi=!0,yi={},gi=[],wi="",vi={},Ti={},Ai={};bi=xe,Ei=xe,Ii=xe,Ci=xe,Si=xe,Ni=xe,_i=xe;Ne=globalThis.performance||{},Bi=Ne.now||Ne.mozNow||Ne.msNow||Ne.oNow||Ne.webkitNow||function(){return new Date().getTime()};Oi=new Date;l={nextTick:mi,title:di,browser:xi,env:yi,argv:gi,version:wi,versions:vi,on:bi,addListener:Ei,once:Ii,off:Ci,removeListener:Si,removeAllListeners:Ni,emit:_i,binding:Li,cwd:Ri,chdir:Pi,umask:Fi,hrtime:ki,platform:hi,release:Ti,config:Ai,uptime:Mi},Ht={};Object.keys(Ht).forEach(r=>{let t=r.split("."),e=l;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Ht[r]:e=e[i]||(e[i]={})}})});function tr(){Ct=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)M[t]=r[t],R[r.charCodeAt(t)]=t;R[45]=62,R[95]=63}function Di(r){Ct||tr();var t,e,n,i,o,f,p=r.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[p-2]==="="?2:r[p-1]==="="?1:0,f=new Ui(p*3/4-o),n=o>0?p-4:p;var c=0;for(t=0,e=0;t<n;t+=4,e+=3)i=R[r.charCodeAt(t)]<<18|R[r.charCodeAt(t+1)]<<12|R[r.charCodeAt(t+2)]<<6|R[r.charCodeAt(t+3)],f[c++]=i>>16&255,f[c++]=i>>8&255,f[c++]=i&255;return o===2?(i=R[r.charCodeAt(t)]<<2|R[r.charCodeAt(t+1)]>>4,f[c++]=i&255):o===1&&(i=R[r.charCodeAt(t)]<<10|R[r.charCodeAt(t+1)]<<4|R[r.charCodeAt(t+2)]>>2,f[c++]=i>>8&255,f[c++]=i&255),f}function qi(r){return M[r>>18&63]+M[r>>12&63]+M[r>>6&63]+M[r&63]}function $i(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(qi(n));return i.join("")}function Xt(r){Ct||tr();for(var t,e=r.length,n=e%3,i="",o=[],f=16383,p=0,c=e-n;p<c;p+=f)o.push($i(r,p,p+f>c?c:p+f));return n===1?(t=r[e-1],i+=M[t>>2],i+=M[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=M[t>>10],i+=M[t>>4&63],i+=M[t<<2&63],i+="="),o.push(i),o.join("")}function ze(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Y(r,t){if(ze()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=u.prototype):(r===null&&(r=new u(t)),r.length=t),r}function u(r,t,e){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return St(this,r)}return rr(this,r,t,e)}function rr(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Yi(r,t,e,n):typeof t=="string"?Wi(r,t,e):Gi(r,t)}function nr(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 ji(r,t,e,n){return nr(t),t<=0?Y(r,t):e!==void 0?typeof n=="string"?Y(r,t).fill(e,n):Y(r,t).fill(e):Y(r,t)}function St(r,t){if(nr(t),r=Y(r,t<0?0:Nt(t)|0),!u.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Wi(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!u.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=ir(t,e)|0;r=Y(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function It(r,t){var e=t.length<0?0:Nt(t.length)|0;r=Y(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Yi(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),u.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=u.prototype):r=It(r,t),r}function Gi(r,t){if(U(t)){var e=Nt(t.length)|0;return r=Y(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||po(t.length)?Y(r,0):It(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return It(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Nt(r){if(r>=ze())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ze().toString(16)+" bytes");return r|0}function U(r){return!!(r!=null&&r._isBuffer)}function ir(r,t){if(U(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 e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Ke(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return lr(r).length;default:if(n)return Ke(r).length;t=(""+t).toLowerCase(),n=!0}}function Hi(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return ro(this,t,e);case"utf8":case"utf-8":return sr(this,t,e);case"ascii":return eo(this,t,e);case"latin1":case"binary":return to(this,t,e);case"base64":return Xi(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return no(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function ye(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function or(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=u.from(t,n)),U(t))return t.length===0?-1:Zt(r,t,e,n,i);if(typeof t=="number")return t=t&255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Zt(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function Zt(r,t,e,n,i){var o=1,f=r.length,p=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,f/=2,p/=2,e/=2}function c(v,T){return o===1?v[T]:v.readUInt16BE(T*o)}var d;if(i){var h=-1;for(d=e;d<f;d++)if(c(r,d)===c(t,h===-1?0:d-h)){if(h===-1&&(h=d),d-h+1===p)return h*o}else h!==-1&&(d-=d-h),h=-1}else for(e+p>f&&(e=f-p),d=e;d>=0;d--){for(var x=!0,y=0;y<p;y++)if(c(r,d+y)!==c(t,y)){x=!1;break}if(x)return d}return-1}function Vi(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var f=0;f<n;++f){var p=parseInt(t.substr(f*2,2),16);if(isNaN(p))return f;r[e+f]=p}return f}function zi(r,t,e,n){return Xe(Ke(t,r.length-e),r,e,n)}function ar(r,t,e,n){return Xe(fo(t),r,e,n)}function Ki(r,t,e,n){return ar(r,t,e,n)}function Ji(r,t,e,n){return Xe(lr(t),r,e,n)}function Qi(r,t,e,n){return Xe(uo(t,r.length-e),r,e,n)}function Xi(r,t,e){return t===0&&e===r.length?Xt(r):Xt(r.slice(t,e))}function sr(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],f=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=e){var c,d,h,x;switch(p){case 1:o<128&&(f=o);break;case 2:c=r[i+1],(c&192)===128&&(x=(o&31)<<6|c&63,x>127&&(f=x));break;case 3:c=r[i+1],d=r[i+2],(c&192)===128&&(d&192)===128&&(x=(o&15)<<12|(c&63)<<6|d&63,x>2047&&(x<55296||x>57343)&&(f=x));break;case 4:c=r[i+1],d=r[i+2],h=r[i+3],(c&192)===128&&(d&192)===128&&(h&192)===128&&(x=(o&15)<<18|(c&63)<<12|(d&63)<<6|h&63,x>65535&&x<1114112&&(f=x))}}f===null?(f=65533,p=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|f&1023),n.push(f),i+=p}return Zi(n)}function Zi(r){var t=r.length;if(t<=er)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=er));return e}function eo(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function to(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function ro(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=so(r[o]);return i}function no(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function b(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function N(r,t,e,n,i,o){if(!U(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function Je(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function Qe(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function fr(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function ur(r,t,e,n,i){return i||fr(r,t,e,4,34028234663852886e22,-34028234663852886e22),mr(r,t,e,n,23,4),e+4}function pr(r,t,e,n,i){return i||fr(r,t,e,8,17976931348623157e292,-17976931348623157e292),mr(r,t,e,n,52,8),e+8}function oo(r){if(r=ao(r).replace(io,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function ao(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function so(r){return r<16?"0"+r.toString(16):r.toString(16)}function Ke(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],f=0;f<n;++f){if(e=r.charCodeAt(f),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(f+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function fo(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function uo(r,t){for(var e,n,i,o=[],f=0;f<r.length&&!((t-=2)<0);++f)e=r.charCodeAt(f),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function lr(r){return Di(oo(r))}function Xe(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function po(r){return r!==r}function lo(r){return r!=null&&(!!r._isBuffer||cr(r)||co(r))}function cr(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function co(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&cr(r.slice(0,0))}function Ze(r,t,e,n,i){var o,f,p=i*8-n-1,c=(1<<p)-1,d=c>>1,h=-7,x=e?i-1:0,y=e?-1:1,v=r[t+x];for(x+=y,o=v&(1<<-h)-1,v>>=-h,h+=p;h>0;o=o*256+r[t+x],x+=y,h-=8);for(f=o&(1<<-h)-1,o>>=-h,h+=n;h>0;f=f*256+r[t+x],x+=y,h-=8);if(o===0)o=1-d;else{if(o===c)return f?NaN:(v?-1:1)*(1/0);f=f+Math.pow(2,n),o=o-d}return(v?-1:1)*f*Math.pow(2,o-n)}function mr(r,t,e,n,i,o){var f,p,c,d=o*8-i-1,h=(1<<d)-1,x=h>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:o-1,T=n?1:-1,C=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,f=h):(f=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-f))<1&&(f--,c*=2),f+x>=1?t+=y/c:t+=y*Math.pow(2,1-x),t*c>=2&&(f++,c/=2),f+x>=h?(p=0,f=h):f+x>=1?(p=(t*c-1)*Math.pow(2,i),f=f+x):(p=t*Math.pow(2,x-1)*Math.pow(2,i),f=0));i>=8;r[e+v]=p&255,v+=T,p/=256,i-=8);for(f=f<<i|p,d+=i;d>0;r[e+v]=f&255,v+=T,f/=256,d-=8);r[e+v-T]|=C*128}var M,R,Ui,Ct,er,io,dr=Et(()=>{"use strict";a();s();M=[],R=[],Ui=typeof Uint8Array!="undefined"?Uint8Array:Array,Ct=!1;u.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;u.poolSize=8192;u._augment=function(r){return r.__proto__=u.prototype,r};u.from=function(r,t,e){return rr(null,r,t,e)};u.kMaxLength=ze();u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&u[Symbol.species]);u.alloc=function(r,t,e){return ji(null,r,t,e)};u.allocUnsafe=function(r){return St(null,r)};u.allocUnsafeSlow=function(r){return St(null,r)};u.isBuffer=lo;u.compare=function(t,e){if(!U(t)||!U(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,f=Math.min(n,i);o<f;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};u.isEncoding=function(t){switch(String(t).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}};u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return u.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=u.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var f=t[n];if(!U(f))throw new TypeError('"list" argument must be an Array of Buffers');f.copy(i,o),o+=f.length}return i};u.byteLength=ir;u.prototype._isBuffer=!0;u.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)ye(this,e,e+1);return this};u.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)ye(this,e,e+3),ye(this,e+1,e+2);return this};u.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)ye(this,e,e+7),ye(this,e+1,e+6),ye(this,e+2,e+5),ye(this,e+3,e+4);return this};u.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?sr(this,0,t):Hi.apply(this,arguments)};u.prototype.equals=function(t){if(!U(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:u.compare(this,t)===0};u.prototype.compare=function(t,e,n,i,o){if(!U(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var f=o-i,p=n-e,c=Math.min(f,p),d=this.slice(i,o),h=t.slice(e,n),x=0;x<c;++x)if(d[x]!==h[x]){f=d[x],p=h[x];break}return f<p?-1:p<f?1:0};u.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};u.prototype.indexOf=function(t,e,n){return or(this,t,e,n,!0)};u.prototype.lastIndexOf=function(t,e,n){return or(this,t,e,n,!1)};u.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|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-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var f=!1;;)switch(i){case"hex":return Vi(this,t,e,n);case"utf8":case"utf-8":return zi(this,t,e,n);case"ascii":return ar(this,t,e,n);case"latin1":case"binary":return Ki(this,t,e,n);case"base64":return Ji(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qi(this,t,e,n);default:if(f)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}};u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};er=4096;u.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(u.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=u.prototype;else{var o=e-t;i=new u(o,void 0);for(var f=0;f<o;++f)i[f]=this[f+t]}return i};u.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t],o=1,f=0;++f<e&&(o*=256);)i+=this[t+f]*o;return i};u.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};u.prototype.readUInt8=function(t,e){return e||b(t,1,this.length),this[t]};u.prototype.readUInt16LE=function(t,e){return e||b(t,2,this.length),this[t]|this[t+1]<<8};u.prototype.readUInt16BE=function(t,e){return e||b(t,2,this.length),this[t]<<8|this[t+1]};u.prototype.readUInt32LE=function(t,e){return e||b(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};u.prototype.readUInt32BE=function(t,e){return e||b(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};u.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t],o=1,f=0;++f<e&&(o*=256);)i+=this[t+f]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};u.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=e,o=1,f=this[t+--i];i>0&&(o*=256);)f+=this[t+--i]*o;return o*=128,f>=o&&(f-=Math.pow(2,8*e)),f};u.prototype.readInt8=function(t,e){return e||b(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};u.prototype.readInt16LE=function(t,e){e||b(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};u.prototype.readInt16BE=function(t,e){e||b(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};u.prototype.readInt32LE=function(t,e){return e||b(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};u.prototype.readInt32BE=function(t,e){return e||b(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};u.prototype.readFloatLE=function(t,e){return e||b(t,4,this.length),Ze(this,t,!0,23,4)};u.prototype.readFloatBE=function(t,e){return e||b(t,4,this.length),Ze(this,t,!1,23,4)};u.prototype.readDoubleLE=function(t,e){return e||b(t,8,this.length),Ze(this,t,!0,52,8)};u.prototype.readDoubleBE=function(t,e){return e||b(t,8,this.length),Ze(this,t,!1,52,8)};u.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;N(this,t,e,n,o,0)}var f=1,p=0;for(this[e]=t&255;++p<n&&(f*=256);)this[e+p]=t/f&255;return e+n};u.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;N(this,t,e,n,o,0)}var f=n-1,p=1;for(this[e+f]=t&255;--f>=0&&(p*=256);)this[e+f]=t/p&255;return e+n};u.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Je(this,t,e,!0),e+2};u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Je(this,t,e,!1),e+2};u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):Qe(this,t,e,!0),e+4};u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Qe(this,t,e,!1),e+4};u.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);N(this,t,e,n,o-1,-o)}var f=0,p=1,c=0;for(this[e]=t&255;++f<n&&(p*=256);)t<0&&c===0&&this[e+f-1]!==0&&(c=1),this[e+f]=(t/p>>0)-c&255;return e+n};u.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);N(this,t,e,n,o-1,-o)}var f=n-1,p=1,c=0;for(this[e+f]=t&255;--f>=0&&(p*=256);)t<0&&c===0&&this[e+f+1]!==0&&(c=1),this[e+f]=(t/p>>0)-c&255;return e+n};u.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};u.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Je(this,t,e,!0),e+2};u.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Je(this,t,e,!1),e+2};u.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Qe(this,t,e,!0),e+4};u.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Qe(this,t,e,!1),e+4};u.prototype.writeFloatLE=function(t,e,n){return ur(this,t,e,!0,n)};u.prototype.writeFloatBE=function(t,e,n){return ur(this,t,e,!1,n)};u.prototype.writeDoubleLE=function(t,e,n){return pr(this,t,e,!0,n)};u.prototype.writeDoubleBE=function(t,e,n){return pr(this,t,e,!1,n)};u.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<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),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,f;if(this===t&&n<e&&e<i)for(f=o-1;f>=0;--f)t[f+e]=this[f+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(f=0;f<o;++f)t[f+e]=this[f+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};u.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var f;if(typeof t=="number")for(f=e;f<n;++f)this[f]=t;else{var p=U(t)?t:Ke(new u(t,i).toString()),c=p.length;for(f=0;f<n-e;++f)this[f+e]=p[f%c]}return this};io=/[^+\/0-9A-Za-z-_]/g});var s=Et(()=>{"use strict";dr()});var gu={};Gt(gu,{EndpointSnippetGenerator:()=>$t});module.exports=pi(gu);a();s();a();s();a();s();function _(r){throw new Error("Unexpected value: "+JSON.stringify(r))}a();s();a();s();a();s();a();s();a();s();var mo=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,et=mo;var ho=typeof self=="object"&&self&&self.Object===Object&&self,xo=et||ho||Function("return this")(),E=xo;var yo=E.Symbol,G=yo;a();s();var hr=Object.prototype,go=hr.hasOwnProperty,wo=hr.toString,Ue=G?G.toStringTag:void 0;function vo(r){var t=go.call(r,Ue),e=r[Ue];try{r[Ue]=void 0;var n=!0}catch(o){}var i=wo.call(r);return n&&(t?r[Ue]=e:delete r[Ue]),i}var xr=vo;a();s();var To=Object.prototype,Ao=To.toString;function bo(r){return Ao.call(r)}var yr=bo;var Eo="[object Null]",Io="[object Undefined]",gr=G?G.toStringTag:void 0;function Co(r){return r==null?r===void 0?Io:Eo:gr&&gr in Object(r)?xr(r):yr(r)}var H=Co;a();s();function So(r){return r!=null&&typeof r=="object"}var V=So;a();s();var No=Array.isArray,ge=No;a();s();function _o(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var tt=_o;a();s();a();s();a();s();a();s();var Lo="[object AsyncFunction]",Ro="[object Function]",Po="[object GeneratorFunction]",Fo="[object Proxy]";function Bo(r){if(!tt(r))return!1;var t=H(r);return t==Ro||t==Po||t==Lo||t==Fo}var rt=Bo;a();s();a();s();var ko=E["__core-js_shared__"],nt=ko;var wr=(function(){var r=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function Oo(r){return!!wr&&wr in r}var vr=Oo;a();s();var Mo=Function.prototype,Uo=Mo.toString;function Do(r){if(r!=null){try{return Uo.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var z=Do;var qo=/[\\^$.*+?()[\]{}|]/g,$o=/^\[object .+?Constructor\]$/,jo=Function.prototype,Wo=Object.prototype,Yo=jo.toString,Go=Wo.hasOwnProperty,Ho=RegExp("^"+Yo.call(Go).replace(qo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vo(r){if(!tt(r)||vr(r))return!1;var t=rt(r)?Ho:$o;return t.test(z(r))}var Tr=Vo;a();s();function zo(r,t){return r==null?void 0:r[t]}var Ar=zo;function Ko(r,t){var e=Ar(r,t);return Tr(e)?e:void 0}var P=Ko;var Jo=P(E,"WeakMap"),it=Jo;a();s();function Qo(){}var br=Qo;a();s();a();s();a();s();function Xo(r,t,e,n){for(var i=r.length,o=e+(n?1:-1);n?o--:++o<i;)if(t(r[o],o,r))return o;return-1}var Er=Xo;a();s();function Zo(r){return r!==r}var Ir=Zo;a();s();function ea(r,t,e){for(var n=e-1,i=r.length;++n<i;)if(r[n]===t)return n;return-1}var Cr=ea;function ta(r,t,e){return t===t?Cr(r,t,e):Er(r,Ir,e)}var Sr=ta;function ra(r,t){var e=r==null?0:r.length;return!!e&&Sr(r,t,0)>-1}var Nr=ra;a();s();var na=9007199254740991,ia=/^(?:0|[1-9]\d*)$/;function oa(r,t){var e=typeof r;return t=t==null?na:t,!!t&&(e=="number"||e!="symbol"&&ia.test(r))&&r>-1&&r%1==0&&r<t}var _r=oa;a();s();function aa(r,t){return r===t||r!==r&&t!==t}var ot=aa;a();s();a();s();var sa=9007199254740991;function fa(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=sa}var at=fa;function ua(r){return r!=null&&at(r.length)&&!rt(r)}var Lr=ua;a();s();var pa=Object.prototype;function la(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||pa;return r===e}var Rr=la;a();s();a();s();a();s();function ca(r,t){for(var e=-1,n=Array(r);++e<r;)n[e]=t(e);return n}var Pr=ca;a();s();a();s();var ma="[object Arguments]";function da(r){return V(r)&&H(r)==ma}var _t=da;var Fr=Object.prototype,ha=Fr.hasOwnProperty,xa=Fr.propertyIsEnumerable,ya=_t((function(){return arguments})())?_t:function(r){return V(r)&&ha.call(r,"callee")&&!xa.call(r,"callee")},Br=ya;a();s();a();s();function ga(){return!1}var kr=ga;var Ur=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Or=Ur&&typeof module=="object"&&module&&!module.nodeType&&module,wa=Or&&Or.exports===Ur,Mr=wa?E.Buffer:void 0,va=Mr?Mr.isBuffer:void 0,Ta=va||kr,De=Ta;a();s();a();s();var Aa="[object Arguments]",ba="[object Array]",Ea="[object Boolean]",Ia="[object Date]",Ca="[object Error]",Sa="[object Function]",Na="[object Map]",_a="[object Number]",La="[object Object]",Ra="[object RegExp]",Pa="[object Set]",Fa="[object String]",Ba="[object WeakMap]",ka="[object ArrayBuffer]",Oa="[object DataView]",Ma="[object Float32Array]",Ua="[object Float64Array]",Da="[object Int8Array]",qa="[object Int16Array]",$a="[object Int32Array]",ja="[object Uint8Array]",Wa="[object Uint8ClampedArray]",Ya="[object Uint16Array]",Ga="[object Uint32Array]",A={};A[Ma]=A[Ua]=A[Da]=A[qa]=A[$a]=A[ja]=A[Wa]=A[Ya]=A[Ga]=!0;A[Aa]=A[ba]=A[ka]=A[Ea]=A[Oa]=A[Ia]=A[Ca]=A[Sa]=A[Na]=A[_a]=A[La]=A[Ra]=A[Pa]=A[Fa]=A[Ba]=!1;function Ha(r){return V(r)&&at(r.length)&&!!A[H(r)]}var Dr=Ha;a();s();function Va(r){return function(t){return r(t)}}var qr=Va;a();s();var $r=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qe=$r&&typeof module=="object"&&module&&!module.nodeType&&module,za=qe&&qe.exports===$r,Lt=za&&et.process,Ka=(function(){try{var r=qe&&qe.require&&qe.require("util").types;return r||Lt&&Lt.binding&&Lt.binding("util")}catch(t){}})(),Rt=Ka;var jr=Rt&&Rt.isTypedArray,Ja=jr?qr(jr):Dr,st=Ja;var Qa=Object.prototype,Xa=Qa.hasOwnProperty;function Za(r,t){var e=ge(r),n=!e&&Br(r),i=!e&&!n&&De(r),o=!e&&!n&&!i&&st(r),f=e||n||i||o,p=f?Pr(r.length,String):[],c=p.length;for(var d in r)(t||Xa.call(r,d))&&!(f&&(d=="length"||i&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||_r(d,c)))&&p.push(d);return p}var Wr=Za;a();s();a();s();a();s();function es(r,t){return function(e){return r(t(e))}}var Yr=es;var ts=Yr(Object.keys,Object),Gr=ts;var rs=Object.prototype,ns=rs.hasOwnProperty;function is(r){if(!Rr(r))return Gr(r);var t=[];for(var e in Object(r))ns.call(r,e)&&e!="constructor"&&t.push(e);return t}var Hr=is;function os(r){return Lr(r)?Wr(r):Hr(r)}var Vr=os;a();s();a();s();a();s();a();s();a();s();var as=P(Object,"create"),K=as;function ss(){this.__data__=K?K(null):{},this.size=0}var zr=ss;a();s();function fs(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Kr=fs;a();s();var us="__lodash_hash_undefined__",ps=Object.prototype,ls=ps.hasOwnProperty;function cs(r){var t=this.__data__;if(K){var e=t[r];return e===us?void 0:e}return ls.call(t,r)?t[r]:void 0}var Jr=cs;a();s();var ms=Object.prototype,ds=ms.hasOwnProperty;function hs(r){var t=this.__data__;return K?t[r]!==void 0:ds.call(t,r)}var Qr=hs;a();s();var xs="__lodash_hash_undefined__";function ys(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=K&&t===void 0?xs:t,this}var Xr=ys;function Le(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Le.prototype.clear=zr;Le.prototype.delete=Kr;Le.prototype.get=Jr;Le.prototype.has=Qr;Le.prototype.set=Xr;var Pt=Le;a();s();a();s();function gs(){this.__data__=[],this.size=0}var Zr=gs;a();s();a();s();function ws(r,t){for(var e=r.length;e--;)if(ot(r[e][0],t))return e;return-1}var ie=ws;var vs=Array.prototype,Ts=vs.splice;function As(r){var t=this.__data__,e=ie(t,r);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():Ts.call(t,e,1),--this.size,!0}var en=As;a();s();function bs(r){var t=this.__data__,e=ie(t,r);return e<0?void 0:t[e][1]}var tn=bs;a();s();function Es(r){return ie(this.__data__,r)>-1}var rn=Es;a();s();function Is(r,t){var e=this.__data__,n=ie(e,r);return n<0?(++this.size,e.push([r,t])):e[n][1]=t,this}var nn=Is;function Re(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Re.prototype.clear=Zr;Re.prototype.delete=en;Re.prototype.get=tn;Re.prototype.has=rn;Re.prototype.set=nn;var oe=Re;a();s();var Cs=P(E,"Map"),ae=Cs;function Ss(){this.size=0,this.__data__={hash:new Pt,map:new(ae||oe),string:new Pt}}var on=Ss;a();s();a();s();a();s();function Ns(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var an=Ns;function _s(r,t){var e=r.__data__;return an(t)?e[typeof t=="string"?"string":"hash"]:e.map}var se=_s;function Ls(r){var t=se(this,r).delete(r);return this.size-=t?1:0,t}var sn=Ls;a();s();function Rs(r){return se(this,r).get(r)}var fn=Rs;a();s();function Ps(r){return se(this,r).has(r)}var un=Ps;a();s();function Fs(r,t){var e=se(this,r),n=e.size;return e.set(r,t),this.size+=e.size==n?0:1,this}var pn=Fs;function Pe(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Pe.prototype.clear=on;Pe.prototype.delete=sn;Pe.prototype.get=fn;Pe.prototype.has=un;Pe.prototype.set=pn;var ft=Pe;a();s();function Bs(r,t){for(var e=-1,n=t.length,i=r.length;++e<n;)r[i+e]=t[e];return r}var ln=Bs;a();s();a();s();function ks(){this.__data__=new oe,this.size=0}var cn=ks;a();s();function Os(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var mn=Os;a();s();function Ms(r){return this.__data__.get(r)}var dn=Ms;a();s();function Us(r){return this.__data__.has(r)}var hn=Us;a();s();var Ds=200;function qs(r,t){var e=this.__data__;if(e instanceof oe){var n=e.__data__;if(!ae||n.length<Ds-1)return n.push([r,t]),this.size=++e.size,this;e=this.__data__=new ft(n)}return e.set(r,t),this.size=e.size,this}var xn=qs;function Fe(r){var t=this.__data__=new oe(r);this.size=t.size}Fe.prototype.clear=cn;Fe.prototype.delete=mn;Fe.prototype.get=dn;Fe.prototype.has=hn;Fe.prototype.set=xn;var ut=Fe;a();s();a();s();function $s(r,t){for(var e=-1,n=r==null?0:r.length,i=0,o=[];++e<n;){var f=r[e];t(f,e,r)&&(o[i++]=f)}return o}var yn=$s;a();s();function js(){return[]}var gn=js;var Ws=Object.prototype,Ys=Ws.propertyIsEnumerable,wn=Object.getOwnPropertySymbols,Gs=wn?function(r){return r==null?[]:(r=Object(r),yn(wn(r),function(t){return Ys.call(r,t)}))}:gn,vn=Gs;a();s();a();s();function Hs(r,t,e){var n=t(r);return ge(r)?n:ln(n,e(r))}var Tn=Hs;function Vs(r){return Tn(r,Vr,vn)}var Ft=Vs;a();s();a();s();var zs=P(E,"DataView"),pt=zs;a();s();var Ks=P(E,"Promise"),lt=Ks;a();s();var Js=P(E,"Set"),fe=Js;var An="[object Map]",Qs="[object Object]",bn="[object Promise]",En="[object Set]",In="[object WeakMap]",Cn="[object DataView]",Xs=z(pt),Zs=z(ae),ef=z(lt),tf=z(fe),rf=z(it),we=H;(pt&&we(new pt(new ArrayBuffer(1)))!=Cn||ae&&we(new ae)!=An||lt&&we(lt.resolve())!=bn||fe&&we(new fe)!=En||it&&we(new it)!=In)&&(we=function(r){var t=H(r),e=t==Qs?r.constructor:void 0,n=e?z(e):"";if(n)switch(n){case Xs:return Cn;case Zs:return An;case ef:return bn;case tf:return En;case rf:return In}return t});var Bt=we;a();s();var nf=E.Uint8Array,kt=nf;a();s();a();s();a();s();a();s();a();s();var of="__lodash_hash_undefined__";function af(r){return this.__data__.set(r,of),this}var Sn=af;a();s();function sf(r){return this.__data__.has(r)}var Nn=sf;function ct(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new ft;++t<e;)this.add(r[t])}ct.prototype.add=ct.prototype.push=Sn;ct.prototype.has=Nn;var mt=ct;a();s();function ff(r,t){for(var e=-1,n=r==null?0:r.length;++e<n;)if(t(r[e],e,r))return!0;return!1}var _n=ff;a();s();function uf(r,t){return r.has(t)}var dt=uf;var pf=1,lf=2;function cf(r,t,e,n,i,o){var f=e&pf,p=r.length,c=t.length;if(p!=c&&!(f&&c>p))return!1;var d=o.get(r),h=o.get(t);if(d&&h)return d==t&&h==r;var x=-1,y=!0,v=e&lf?new mt:void 0;for(o.set(r,t),o.set(t,r);++x<p;){var T=r[x],C=t[x];if(n)var O=f?n(C,T,x,t,r,o):n(T,C,x,r,t,o);if(O!==void 0){if(O)continue;y=!1;break}if(v){if(!_n(t,function(me,de){if(!dt(v,de)&&(T===me||i(T,me,e,n,o)))return v.push(de)})){y=!1;break}}else if(!(T===C||i(T,C,e,n,o))){y=!1;break}}return o.delete(r),o.delete(t),y}var ht=cf;a();s();a();s();function mf(r){var t=-1,e=Array(r.size);return r.forEach(function(n,i){e[++t]=[i,n]}),e}var Ln=mf;a();s();function df(r){var t=-1,e=Array(r.size);return r.forEach(function(n){e[++t]=n}),e}var Be=df;var hf=1,xf=2,yf="[object Boolean]",gf="[object Date]",wf="[object Error]",vf="[object Map]",Tf="[object Number]",Af="[object RegExp]",bf="[object Set]",Ef="[object String]",If="[object Symbol]",Cf="[object ArrayBuffer]",Sf="[object DataView]",Rn=G?G.prototype:void 0,Ot=Rn?Rn.valueOf:void 0;function Nf(r,t,e,n,i,o,f){switch(e){case Sf:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case Cf:return!(r.byteLength!=t.byteLength||!o(new kt(r),new kt(t)));case yf:case gf:case Tf:return ot(+r,+t);case wf:return r.name==t.name&&r.message==t.message;case Af:case Ef:return r==t+"";case vf:var p=Ln;case bf:var c=n&hf;if(p||(p=Be),r.size!=t.size&&!c)return!1;var d=f.get(r);if(d)return d==t;n|=xf,f.set(r,t);var h=ht(p(r),p(t),n,i,o,f);return f.delete(r),h;case If:if(Ot)return Ot.call(r)==Ot.call(t)}return!1}var Pn=Nf;a();s();var _f=1,Lf=Object.prototype,Rf=Lf.hasOwnProperty;function Pf(r,t,e,n,i,o){var f=e&_f,p=Ft(r),c=p.length,d=Ft(t),h=d.length;if(c!=h&&!f)return!1;for(var x=c;x--;){var y=p[x];if(!(f?y in t:Rf.call(t,y)))return!1}var v=o.get(r),T=o.get(t);if(v&&T)return v==t&&T==r;var C=!0;o.set(r,t),o.set(t,r);for(var O=f;++x<c;){y=p[x];var me=r[y],de=t[y];if(n)var jt=f?n(de,me,y,t,r,o):n(me,de,y,r,t,o);if(!(jt===void 0?me===de||i(me,de,e,n,o):jt)){C=!1;break}O||(O=y=="constructor")}if(C&&!O){var Ye=r.constructor,Ge=t.constructor;Ye!=Ge&&"constructor"in r&&"constructor"in t&&!(typeof Ye=="function"&&Ye instanceof Ye&&typeof Ge=="function"&&Ge instanceof Ge)&&(C=!1)}return o.delete(r),o.delete(t),C}var Fn=Pf;var Ff=1,Bn="[object Arguments]",kn="[object Array]",xt="[object Object]",Bf=Object.prototype,On=Bf.hasOwnProperty;function kf(r,t,e,n,i,o){var f=ge(r),p=ge(t),c=f?kn:Bt(r),d=p?kn:Bt(t);c=c==Bn?xt:c,d=d==Bn?xt:d;var h=c==xt,x=d==xt,y=c==d;if(y&&De(r)){if(!De(t))return!1;f=!0,h=!1}if(y&&!h)return o||(o=new ut),f||st(r)?ht(r,t,e,n,i,o):Pn(r,t,c,e,n,i,o);if(!(e&Ff)){var v=h&&On.call(r,"__wrapped__"),T=x&&On.call(t,"__wrapped__");if(v||T){var C=v?r.value():r,O=T?t.value():t;return o||(o=new ut),i(C,O,e,n,o)}}return y?(o||(o=new ut),Fn(r,t,e,n,i,o)):!1}var Mn=kf;function Un(r,t,e,n,i){return r===t?!0:r==null||t==null||!V(r)&&!V(t)?r!==r&&t!==t:Mn(r,t,e,n,Un,i)}var Dn=Un;a();s();function Of(r,t,e){for(var n=-1,i=r==null?0:r.length;++n<i;)if(e(t,r[n]))return!0;return!1}var qn=Of;a();s();function Mf(r,t){return Dn(r,t)}var yt=Mf;a();s();a();s();var Uf=1/0,Df=fe&&1/Be(new fe([,-0]))[1]==Uf?function(r){return new fe(r)}:br,$n=Df;var qf=200;function $f(r,t,e){var n=-1,i=Nr,o=r.length,f=!0,p=[],c=p;if(e)f=!1,i=qn;else if(o>=qf){var d=t?null:$n(r);if(d)return Be(d);f=!1,i=dt,c=new mt}else c=t?[]:p;e:for(;++n<o;){var h=r[n],x=t?t(h):h;if(h=e||h!==0?h:0,f&&x===x){for(var y=c.length;y--;)if(c[y]===x)continue e;t&&c.push(x),p.push(h)}else i(c,x,e)||(c!==p&&c.push(x),p.push(h))}return p}var jn=$f;a();s();function jf(r,t){return t=typeof t=="function"?t:void 0,r&&r.length?jn(r,void 0,t):[]}var gt=jf;a();s();a();s();a();s();var Wn,Yn,$e=(Yn=(Wn=l.env.FERN_STACK_TRACK)==null?void 0:Wn.toLowerCase())!=null?Yn:"",D=$e!==""&&$e!=="0"&&$e!=="false",Mt=["single","multiline","box"].includes($e)?$e:"single";D&&(Error.stackTraceLimit=50);var Wf=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),Yf=new Set(["stacktrace"]);function vt({maxFrames:r=50,skip:t=0,filterPaths:e=[],filterFunctions:n=[],stopOn:i=[],filterNode:o=!0,filterJs:f=!0,formatFilename:p=c=>c}={}){var d;if(!D)return[];n=[...n,...Wf],e=[...e,...Yf],i=[...i,"runInteractiveTask"];let c=!1;return((d=new Error().stack)!=null?d:"").split(`
1
+ "use strict";var He=Object.defineProperty,ii=Object.defineProperties,oi=Object.getOwnPropertyDescriptor,ai=Object.getOwnPropertyDescriptors,si=Object.getOwnPropertyNames,Yt=Object.getOwnPropertySymbols;var Gt=Object.prototype.hasOwnProperty,fi=Object.prototype.propertyIsEnumerable;var bt=(r,t,e)=>t in r?He(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Oe=(r,t)=>{for(var e in t||(t={}))Gt.call(t,e)&&bt(r,e,t[e]);if(Yt)for(var e of Yt(t))fi.call(t,e)&&bt(r,e,t[e]);return r},Me=(r,t)=>ii(r,ai(t));var Et=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ht=(r,t)=>{for(var e in t)He(r,e,{get:t[e],enumerable:!0})},ui=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of si(t))!Gt.call(r,i)&&i!==e&&He(r,i,{get:()=>t[i],enumerable:!(n=oi(t,i))||n.enumerable});return r};var pi=r=>ui(He({},"__esModule",{value:!0}),r);var m=(r,t,e)=>bt(r,typeof t!="symbol"?t+"":t,e);function zt(){throw new Error("setTimeout has not been defined")}function Kt(){throw new Error("clearTimeout has not been defined")}function Jt(r){if(re===setTimeout)return setTimeout(r,0);if((re===zt||!re)&&setTimeout)return re=setTimeout,setTimeout(r,0);try{return re(r,0)}catch(t){try{return re.call(null,r,0)}catch(e){return re.call(this,r,0)}}}function li(r){if(ne===clearTimeout)return clearTimeout(r);if((ne===Kt||!ne)&&clearTimeout)return ne=clearTimeout,clearTimeout(r);try{return ne(r)}catch(t){try{return ne.call(null,r)}catch(e){return ne.call(this,r)}}}function ci(){!_e||!he||(_e=!1,he.length?W=he.concat(W):Ve=-1,W.length&&Qt())}function Qt(){if(!_e){var r=Jt(ci);_e=!0;for(var t=W.length;t;){for(he=W,W=[];++Ve<t;)he&&he[Ve].run();Ve=-1,t=W.length}he=null,_e=!1,li(r)}}function mi(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];W.push(new Xt(r,t)),W.length===1&&!_e&&Jt(Qt)}function Xt(r,t){this.fun=r,this.array=t}function xe(){}function Li(r){throw new Error("process.binding is not supported")}function Ri(){return"/"}function Pi(r){throw new Error("process.chdir is not supported")}function Fi(){return 0}function ki(r){var t=Bi.call(Ne)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function Mi(){var r=new Date,t=r-Oi;return t/1e3}var re,ne,W,_e,he,Ve,di,hi,xi,yi,gi,wi,vi,Ti,Ai,bi,Ei,Ii,Ci,Si,Ni,_i,Ne,Bi,Oi,l,Vt,a=Et(()=>{"use strict";re=zt,ne=Kt;typeof globalThis.setTimeout=="function"&&(re=setTimeout);typeof globalThis.clearTimeout=="function"&&(ne=clearTimeout);W=[],_e=!1,Ve=-1;Xt.prototype.run=function(){this.fun.apply(null,this.array)};di="browser",hi="browser",xi=!0,yi={},gi=[],wi="",vi={},Ti={},Ai={};bi=xe,Ei=xe,Ii=xe,Ci=xe,Si=xe,Ni=xe,_i=xe;Ne=globalThis.performance||{},Bi=Ne.now||Ne.mozNow||Ne.msNow||Ne.oNow||Ne.webkitNow||function(){return new Date().getTime()};Oi=new Date;l={nextTick:mi,title:di,browser:xi,env:yi,argv:gi,version:wi,versions:vi,on:bi,addListener:Ei,once:Ii,off:Ci,removeListener:Si,removeAllListeners:Ni,emit:_i,binding:Li,cwd:Ri,chdir:Pi,umask:Fi,hrtime:ki,platform:hi,release:Ti,config:Ai,uptime:Mi},Vt={};Object.keys(Vt).forEach(r=>{let t=r.split("."),e=l;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Vt[r]:e=e[i]||(e[i]={})}})});function rr(){Ct=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)M[t]=r[t],R[r.charCodeAt(t)]=t;R[45]=62,R[95]=63}function Di(r){Ct||rr();var t,e,n,i,o,f,p=r.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[p-2]==="="?2:r[p-1]==="="?1:0,f=new Ui(p*3/4-o),n=o>0?p-4:p;var c=0;for(t=0,e=0;t<n;t+=4,e+=3)i=R[r.charCodeAt(t)]<<18|R[r.charCodeAt(t+1)]<<12|R[r.charCodeAt(t+2)]<<6|R[r.charCodeAt(t+3)],f[c++]=i>>16&255,f[c++]=i>>8&255,f[c++]=i&255;return o===2?(i=R[r.charCodeAt(t)]<<2|R[r.charCodeAt(t+1)]>>4,f[c++]=i&255):o===1&&(i=R[r.charCodeAt(t)]<<10|R[r.charCodeAt(t+1)]<<4|R[r.charCodeAt(t+2)]>>2,f[c++]=i>>8&255,f[c++]=i&255),f}function qi(r){return M[r>>18&63]+M[r>>12&63]+M[r>>6&63]+M[r&63]}function $i(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(qi(n));return i.join("")}function Zt(r){Ct||rr();for(var t,e=r.length,n=e%3,i="",o=[],f=16383,p=0,c=e-n;p<c;p+=f)o.push($i(r,p,p+f>c?c:p+f));return n===1?(t=r[e-1],i+=M[t>>2],i+=M[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=M[t>>10],i+=M[t>>4&63],i+=M[t<<2&63],i+="="),o.push(i),o.join("")}function ze(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Y(r,t){if(ze()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=u.prototype):(r===null&&(r=new u(t)),r.length=t),r}function u(r,t,e){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return St(this,r)}return nr(this,r,t,e)}function nr(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Yi(r,t,e,n):typeof t=="string"?Wi(r,t,e):Gi(r,t)}function ir(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 ji(r,t,e,n){return ir(t),t<=0?Y(r,t):e!==void 0?typeof n=="string"?Y(r,t).fill(e,n):Y(r,t).fill(e):Y(r,t)}function St(r,t){if(ir(t),r=Y(r,t<0?0:Nt(t)|0),!u.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Wi(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!u.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=or(t,e)|0;r=Y(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function It(r,t){var e=t.length<0?0:Nt(t.length)|0;r=Y(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Yi(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),u.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=u.prototype):r=It(r,t),r}function Gi(r,t){if(U(t)){var e=Nt(t.length)|0;return r=Y(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||po(t.length)?Y(r,0):It(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return It(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Nt(r){if(r>=ze())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ze().toString(16)+" bytes");return r|0}function U(r){return!!(r!=null&&r._isBuffer)}function or(r,t){if(U(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 e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Ke(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return cr(r).length;default:if(n)return Ke(r).length;t=(""+t).toLowerCase(),n=!0}}function Hi(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return ro(this,t,e);case"utf8":case"utf-8":return fr(this,t,e);case"ascii":return eo(this,t,e);case"latin1":case"binary":return to(this,t,e);case"base64":return Xi(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return no(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function ye(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function ar(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=u.from(t,n)),U(t))return t.length===0?-1:er(r,t,e,n,i);if(typeof t=="number")return t=t&255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):er(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function er(r,t,e,n,i){var o=1,f=r.length,p=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,f/=2,p/=2,e/=2}function c(v,T){return o===1?v[T]:v.readUInt16BE(T*o)}var d;if(i){var h=-1;for(d=e;d<f;d++)if(c(r,d)===c(t,h===-1?0:d-h)){if(h===-1&&(h=d),d-h+1===p)return h*o}else h!==-1&&(d-=d-h),h=-1}else for(e+p>f&&(e=f-p),d=e;d>=0;d--){for(var x=!0,y=0;y<p;y++)if(c(r,d+y)!==c(t,y)){x=!1;break}if(x)return d}return-1}function Vi(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var f=0;f<n;++f){var p=parseInt(t.substr(f*2,2),16);if(isNaN(p))return f;r[e+f]=p}return f}function zi(r,t,e,n){return Xe(Ke(t,r.length-e),r,e,n)}function sr(r,t,e,n){return Xe(fo(t),r,e,n)}function Ki(r,t,e,n){return sr(r,t,e,n)}function Ji(r,t,e,n){return Xe(cr(t),r,e,n)}function Qi(r,t,e,n){return Xe(uo(t,r.length-e),r,e,n)}function Xi(r,t,e){return t===0&&e===r.length?Zt(r):Zt(r.slice(t,e))}function fr(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],f=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=e){var c,d,h,x;switch(p){case 1:o<128&&(f=o);break;case 2:c=r[i+1],(c&192)===128&&(x=(o&31)<<6|c&63,x>127&&(f=x));break;case 3:c=r[i+1],d=r[i+2],(c&192)===128&&(d&192)===128&&(x=(o&15)<<12|(c&63)<<6|d&63,x>2047&&(x<55296||x>57343)&&(f=x));break;case 4:c=r[i+1],d=r[i+2],h=r[i+3],(c&192)===128&&(d&192)===128&&(h&192)===128&&(x=(o&15)<<18|(c&63)<<12|(d&63)<<6|h&63,x>65535&&x<1114112&&(f=x))}}f===null?(f=65533,p=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|f&1023),n.push(f),i+=p}return Zi(n)}function Zi(r){var t=r.length;if(t<=tr)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=tr));return e}function eo(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function to(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function ro(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=so(r[o]);return i}function no(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function b(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function N(r,t,e,n,i,o){if(!U(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function Je(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function Qe(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function ur(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function pr(r,t,e,n,i){return i||ur(r,t,e,4,34028234663852886e22,-34028234663852886e22),dr(r,t,e,n,23,4),e+4}function lr(r,t,e,n,i){return i||ur(r,t,e,8,17976931348623157e292,-17976931348623157e292),dr(r,t,e,n,52,8),e+8}function oo(r){if(r=ao(r).replace(io,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function ao(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function so(r){return r<16?"0"+r.toString(16):r.toString(16)}function Ke(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],f=0;f<n;++f){if(e=r.charCodeAt(f),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(f+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function fo(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function uo(r,t){for(var e,n,i,o=[],f=0;f<r.length&&!((t-=2)<0);++f)e=r.charCodeAt(f),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function cr(r){return Di(oo(r))}function Xe(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function po(r){return r!==r}function lo(r){return r!=null&&(!!r._isBuffer||mr(r)||co(r))}function mr(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function co(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&mr(r.slice(0,0))}function Ze(r,t,e,n,i){var o,f,p=i*8-n-1,c=(1<<p)-1,d=c>>1,h=-7,x=e?i-1:0,y=e?-1:1,v=r[t+x];for(x+=y,o=v&(1<<-h)-1,v>>=-h,h+=p;h>0;o=o*256+r[t+x],x+=y,h-=8);for(f=o&(1<<-h)-1,o>>=-h,h+=n;h>0;f=f*256+r[t+x],x+=y,h-=8);if(o===0)o=1-d;else{if(o===c)return f?NaN:(v?-1:1)*(1/0);f=f+Math.pow(2,n),o=o-d}return(v?-1:1)*f*Math.pow(2,o-n)}function dr(r,t,e,n,i,o){var f,p,c,d=o*8-i-1,h=(1<<d)-1,x=h>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:o-1,T=n?1:-1,C=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,f=h):(f=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-f))<1&&(f--,c*=2),f+x>=1?t+=y/c:t+=y*Math.pow(2,1-x),t*c>=2&&(f++,c/=2),f+x>=h?(p=0,f=h):f+x>=1?(p=(t*c-1)*Math.pow(2,i),f=f+x):(p=t*Math.pow(2,x-1)*Math.pow(2,i),f=0));i>=8;r[e+v]=p&255,v+=T,p/=256,i-=8);for(f=f<<i|p,d+=i;d>0;r[e+v]=f&255,v+=T,f/=256,d-=8);r[e+v-T]|=C*128}var M,R,Ui,Ct,tr,io,hr=Et(()=>{"use strict";a();s();M=[],R=[],Ui=typeof Uint8Array!="undefined"?Uint8Array:Array,Ct=!1;u.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;u.poolSize=8192;u._augment=function(r){return r.__proto__=u.prototype,r};u.from=function(r,t,e){return nr(null,r,t,e)};u.kMaxLength=ze();u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&u[Symbol.species]);u.alloc=function(r,t,e){return ji(null,r,t,e)};u.allocUnsafe=function(r){return St(null,r)};u.allocUnsafeSlow=function(r){return St(null,r)};u.isBuffer=lo;u.compare=function(t,e){if(!U(t)||!U(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,f=Math.min(n,i);o<f;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};u.isEncoding=function(t){switch(String(t).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}};u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return u.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=u.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var f=t[n];if(!U(f))throw new TypeError('"list" argument must be an Array of Buffers');f.copy(i,o),o+=f.length}return i};u.byteLength=or;u.prototype._isBuffer=!0;u.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)ye(this,e,e+1);return this};u.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)ye(this,e,e+3),ye(this,e+1,e+2);return this};u.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)ye(this,e,e+7),ye(this,e+1,e+6),ye(this,e+2,e+5),ye(this,e+3,e+4);return this};u.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?fr(this,0,t):Hi.apply(this,arguments)};u.prototype.equals=function(t){if(!U(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:u.compare(this,t)===0};u.prototype.compare=function(t,e,n,i,o){if(!U(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var f=o-i,p=n-e,c=Math.min(f,p),d=this.slice(i,o),h=t.slice(e,n),x=0;x<c;++x)if(d[x]!==h[x]){f=d[x],p=h[x];break}return f<p?-1:p<f?1:0};u.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};u.prototype.indexOf=function(t,e,n){return ar(this,t,e,n,!0)};u.prototype.lastIndexOf=function(t,e,n){return ar(this,t,e,n,!1)};u.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|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-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var f=!1;;)switch(i){case"hex":return Vi(this,t,e,n);case"utf8":case"utf-8":return zi(this,t,e,n);case"ascii":return sr(this,t,e,n);case"latin1":case"binary":return Ki(this,t,e,n);case"base64":return Ji(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qi(this,t,e,n);default:if(f)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}};u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};tr=4096;u.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(u.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=u.prototype;else{var o=e-t;i=new u(o,void 0);for(var f=0;f<o;++f)i[f]=this[f+t]}return i};u.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t],o=1,f=0;++f<e&&(o*=256);)i+=this[t+f]*o;return i};u.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};u.prototype.readUInt8=function(t,e){return e||b(t,1,this.length),this[t]};u.prototype.readUInt16LE=function(t,e){return e||b(t,2,this.length),this[t]|this[t+1]<<8};u.prototype.readUInt16BE=function(t,e){return e||b(t,2,this.length),this[t]<<8|this[t+1]};u.prototype.readUInt32LE=function(t,e){return e||b(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};u.prototype.readUInt32BE=function(t,e){return e||b(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};u.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t],o=1,f=0;++f<e&&(o*=256);)i+=this[t+f]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};u.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=e,o=1,f=this[t+--i];i>0&&(o*=256);)f+=this[t+--i]*o;return o*=128,f>=o&&(f-=Math.pow(2,8*e)),f};u.prototype.readInt8=function(t,e){return e||b(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};u.prototype.readInt16LE=function(t,e){e||b(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};u.prototype.readInt16BE=function(t,e){e||b(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};u.prototype.readInt32LE=function(t,e){return e||b(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};u.prototype.readInt32BE=function(t,e){return e||b(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};u.prototype.readFloatLE=function(t,e){return e||b(t,4,this.length),Ze(this,t,!0,23,4)};u.prototype.readFloatBE=function(t,e){return e||b(t,4,this.length),Ze(this,t,!1,23,4)};u.prototype.readDoubleLE=function(t,e){return e||b(t,8,this.length),Ze(this,t,!0,52,8)};u.prototype.readDoubleBE=function(t,e){return e||b(t,8,this.length),Ze(this,t,!1,52,8)};u.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;N(this,t,e,n,o,0)}var f=1,p=0;for(this[e]=t&255;++p<n&&(f*=256);)this[e+p]=t/f&255;return e+n};u.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;N(this,t,e,n,o,0)}var f=n-1,p=1;for(this[e+f]=t&255;--f>=0&&(p*=256);)this[e+f]=t/p&255;return e+n};u.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Je(this,t,e,!0),e+2};u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Je(this,t,e,!1),e+2};u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):Qe(this,t,e,!0),e+4};u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Qe(this,t,e,!1),e+4};u.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);N(this,t,e,n,o-1,-o)}var f=0,p=1,c=0;for(this[e]=t&255;++f<n&&(p*=256);)t<0&&c===0&&this[e+f-1]!==0&&(c=1),this[e+f]=(t/p>>0)-c&255;return e+n};u.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);N(this,t,e,n,o-1,-o)}var f=n-1,p=1,c=0;for(this[e+f]=t&255;--f>=0&&(p*=256);)t<0&&c===0&&this[e+f+1]!==0&&(c=1),this[e+f]=(t/p>>0)-c&255;return e+n};u.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};u.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Je(this,t,e,!0),e+2};u.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Je(this,t,e,!1),e+2};u.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Qe(this,t,e,!0),e+4};u.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Qe(this,t,e,!1),e+4};u.prototype.writeFloatLE=function(t,e,n){return pr(this,t,e,!0,n)};u.prototype.writeFloatBE=function(t,e,n){return pr(this,t,e,!1,n)};u.prototype.writeDoubleLE=function(t,e,n){return lr(this,t,e,!0,n)};u.prototype.writeDoubleBE=function(t,e,n){return lr(this,t,e,!1,n)};u.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<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),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,f;if(this===t&&n<e&&e<i)for(f=o-1;f>=0;--f)t[f+e]=this[f+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(f=0;f<o;++f)t[f+e]=this[f+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};u.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var f;if(typeof t=="number")for(f=e;f<n;++f)this[f]=t;else{var p=U(t)?t:Ke(new u(t,i).toString()),c=p.length;for(f=0;f<n-e;++f)this[f+e]=p[f%c]}return this};io=/[^+\/0-9A-Za-z-_]/g});var s=Et(()=>{"use strict";hr()});var gu={};Ht(gu,{EndpointSnippetGenerator:()=>jt});module.exports=pi(gu);a();s();a();s();a();s();function _(r){throw new Error("Unexpected value: "+JSON.stringify(r))}a();s();a();s();a();s();a();s();a();s();var mo=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,et=mo;var ho=typeof self=="object"&&self&&self.Object===Object&&self,xo=et||ho||Function("return this")(),E=xo;var yo=E.Symbol,G=yo;a();s();var xr=Object.prototype,go=xr.hasOwnProperty,wo=xr.toString,Ue=G?G.toStringTag:void 0;function vo(r){var t=go.call(r,Ue),e=r[Ue];try{r[Ue]=void 0;var n=!0}catch(o){}var i=wo.call(r);return n&&(t?r[Ue]=e:delete r[Ue]),i}var yr=vo;a();s();var To=Object.prototype,Ao=To.toString;function bo(r){return Ao.call(r)}var gr=bo;var Eo="[object Null]",Io="[object Undefined]",wr=G?G.toStringTag:void 0;function Co(r){return r==null?r===void 0?Io:Eo:wr&&wr in Object(r)?yr(r):gr(r)}var H=Co;a();s();function So(r){return r!=null&&typeof r=="object"}var V=So;a();s();var No=Array.isArray,ge=No;a();s();function _o(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var tt=_o;a();s();a();s();a();s();a();s();var Lo="[object AsyncFunction]",Ro="[object Function]",Po="[object GeneratorFunction]",Fo="[object Proxy]";function Bo(r){if(!tt(r))return!1;var t=H(r);return t==Ro||t==Po||t==Lo||t==Fo}var rt=Bo;a();s();a();s();var ko=E["__core-js_shared__"],nt=ko;var vr=(function(){var r=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function Oo(r){return!!vr&&vr in r}var Tr=Oo;a();s();var Mo=Function.prototype,Uo=Mo.toString;function Do(r){if(r!=null){try{return Uo.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var z=Do;var qo=/[\\^$.*+?()[\]{}|]/g,$o=/^\[object .+?Constructor\]$/,jo=Function.prototype,Wo=Object.prototype,Yo=jo.toString,Go=Wo.hasOwnProperty,Ho=RegExp("^"+Yo.call(Go).replace(qo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vo(r){if(!tt(r)||Tr(r))return!1;var t=rt(r)?Ho:$o;return t.test(z(r))}var Ar=Vo;a();s();function zo(r,t){return r==null?void 0:r[t]}var br=zo;function Ko(r,t){var e=br(r,t);return Ar(e)?e:void 0}var P=Ko;var Jo=P(E,"WeakMap"),it=Jo;a();s();function Qo(){}var Er=Qo;a();s();a();s();a();s();function Xo(r,t,e,n){for(var i=r.length,o=e+(n?1:-1);n?o--:++o<i;)if(t(r[o],o,r))return o;return-1}var Ir=Xo;a();s();function Zo(r){return r!==r}var Cr=Zo;a();s();function ea(r,t,e){for(var n=e-1,i=r.length;++n<i;)if(r[n]===t)return n;return-1}var Sr=ea;function ta(r,t,e){return t===t?Sr(r,t,e):Ir(r,Cr,e)}var Nr=ta;function ra(r,t){var e=r==null?0:r.length;return!!e&&Nr(r,t,0)>-1}var _r=ra;a();s();var na=9007199254740991,ia=/^(?:0|[1-9]\d*)$/;function oa(r,t){var e=typeof r;return t=t==null?na:t,!!t&&(e=="number"||e!="symbol"&&ia.test(r))&&r>-1&&r%1==0&&r<t}var Lr=oa;a();s();function aa(r,t){return r===t||r!==r&&t!==t}var ot=aa;a();s();a();s();var sa=9007199254740991;function fa(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=sa}var at=fa;function ua(r){return r!=null&&at(r.length)&&!rt(r)}var Rr=ua;a();s();var pa=Object.prototype;function la(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||pa;return r===e}var Pr=la;a();s();a();s();a();s();function ca(r,t){for(var e=-1,n=Array(r);++e<r;)n[e]=t(e);return n}var Fr=ca;a();s();a();s();var ma="[object Arguments]";function da(r){return V(r)&&H(r)==ma}var _t=da;var Br=Object.prototype,ha=Br.hasOwnProperty,xa=Br.propertyIsEnumerable,ya=_t((function(){return arguments})())?_t:function(r){return V(r)&&ha.call(r,"callee")&&!xa.call(r,"callee")},kr=ya;a();s();a();s();function ga(){return!1}var Or=ga;var Dr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mr=Dr&&typeof module=="object"&&module&&!module.nodeType&&module,wa=Mr&&Mr.exports===Dr,Ur=wa?E.Buffer:void 0,va=Ur?Ur.isBuffer:void 0,Ta=va||Or,De=Ta;a();s();a();s();var Aa="[object Arguments]",ba="[object Array]",Ea="[object Boolean]",Ia="[object Date]",Ca="[object Error]",Sa="[object Function]",Na="[object Map]",_a="[object Number]",La="[object Object]",Ra="[object RegExp]",Pa="[object Set]",Fa="[object String]",Ba="[object WeakMap]",ka="[object ArrayBuffer]",Oa="[object DataView]",Ma="[object Float32Array]",Ua="[object Float64Array]",Da="[object Int8Array]",qa="[object Int16Array]",$a="[object Int32Array]",ja="[object Uint8Array]",Wa="[object Uint8ClampedArray]",Ya="[object Uint16Array]",Ga="[object Uint32Array]",A={};A[Ma]=A[Ua]=A[Da]=A[qa]=A[$a]=A[ja]=A[Wa]=A[Ya]=A[Ga]=!0;A[Aa]=A[ba]=A[ka]=A[Ea]=A[Oa]=A[Ia]=A[Ca]=A[Sa]=A[Na]=A[_a]=A[La]=A[Ra]=A[Pa]=A[Fa]=A[Ba]=!1;function Ha(r){return V(r)&&at(r.length)&&!!A[H(r)]}var qr=Ha;a();s();function Va(r){return function(t){return r(t)}}var $r=Va;a();s();var jr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qe=jr&&typeof module=="object"&&module&&!module.nodeType&&module,za=qe&&qe.exports===jr,Lt=za&&et.process,Ka=(function(){try{var r=qe&&qe.require&&qe.require("util").types;return r||Lt&&Lt.binding&&Lt.binding("util")}catch(t){}})(),Rt=Ka;var Wr=Rt&&Rt.isTypedArray,Ja=Wr?$r(Wr):qr,st=Ja;var Qa=Object.prototype,Xa=Qa.hasOwnProperty;function Za(r,t){var e=ge(r),n=!e&&kr(r),i=!e&&!n&&De(r),o=!e&&!n&&!i&&st(r),f=e||n||i||o,p=f?Fr(r.length,String):[],c=p.length;for(var d in r)(t||Xa.call(r,d))&&!(f&&(d=="length"||i&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Lr(d,c)))&&p.push(d);return p}var Yr=Za;a();s();a();s();a();s();function es(r,t){return function(e){return r(t(e))}}var Gr=es;var ts=Gr(Object.keys,Object),Hr=ts;var rs=Object.prototype,ns=rs.hasOwnProperty;function is(r){if(!Pr(r))return Hr(r);var t=[];for(var e in Object(r))ns.call(r,e)&&e!="constructor"&&t.push(e);return t}var Vr=is;function os(r){return Rr(r)?Yr(r):Vr(r)}var zr=os;a();s();a();s();a();s();a();s();a();s();var as=P(Object,"create"),K=as;function ss(){this.__data__=K?K(null):{},this.size=0}var Kr=ss;a();s();function fs(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Jr=fs;a();s();var us="__lodash_hash_undefined__",ps=Object.prototype,ls=ps.hasOwnProperty;function cs(r){var t=this.__data__;if(K){var e=t[r];return e===us?void 0:e}return ls.call(t,r)?t[r]:void 0}var Qr=cs;a();s();var ms=Object.prototype,ds=ms.hasOwnProperty;function hs(r){var t=this.__data__;return K?t[r]!==void 0:ds.call(t,r)}var Xr=hs;a();s();var xs="__lodash_hash_undefined__";function ys(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=K&&t===void 0?xs:t,this}var Zr=ys;function Le(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Le.prototype.clear=Kr;Le.prototype.delete=Jr;Le.prototype.get=Qr;Le.prototype.has=Xr;Le.prototype.set=Zr;var Pt=Le;a();s();a();s();function gs(){this.__data__=[],this.size=0}var en=gs;a();s();a();s();function ws(r,t){for(var e=r.length;e--;)if(ot(r[e][0],t))return e;return-1}var ie=ws;var vs=Array.prototype,Ts=vs.splice;function As(r){var t=this.__data__,e=ie(t,r);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():Ts.call(t,e,1),--this.size,!0}var tn=As;a();s();function bs(r){var t=this.__data__,e=ie(t,r);return e<0?void 0:t[e][1]}var rn=bs;a();s();function Es(r){return ie(this.__data__,r)>-1}var nn=Es;a();s();function Is(r,t){var e=this.__data__,n=ie(e,r);return n<0?(++this.size,e.push([r,t])):e[n][1]=t,this}var on=Is;function Re(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Re.prototype.clear=en;Re.prototype.delete=tn;Re.prototype.get=rn;Re.prototype.has=nn;Re.prototype.set=on;var oe=Re;a();s();var Cs=P(E,"Map"),ae=Cs;function Ss(){this.size=0,this.__data__={hash:new Pt,map:new(ae||oe),string:new Pt}}var an=Ss;a();s();a();s();a();s();function Ns(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var sn=Ns;function _s(r,t){var e=r.__data__;return sn(t)?e[typeof t=="string"?"string":"hash"]:e.map}var se=_s;function Ls(r){var t=se(this,r).delete(r);return this.size-=t?1:0,t}var fn=Ls;a();s();function Rs(r){return se(this,r).get(r)}var un=Rs;a();s();function Ps(r){return se(this,r).has(r)}var pn=Ps;a();s();function Fs(r,t){var e=se(this,r),n=e.size;return e.set(r,t),this.size+=e.size==n?0:1,this}var ln=Fs;function Pe(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Pe.prototype.clear=an;Pe.prototype.delete=fn;Pe.prototype.get=un;Pe.prototype.has=pn;Pe.prototype.set=ln;var ft=Pe;a();s();function Bs(r,t){for(var e=-1,n=t.length,i=r.length;++e<n;)r[i+e]=t[e];return r}var cn=Bs;a();s();a();s();function ks(){this.__data__=new oe,this.size=0}var mn=ks;a();s();function Os(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var dn=Os;a();s();function Ms(r){return this.__data__.get(r)}var hn=Ms;a();s();function Us(r){return this.__data__.has(r)}var xn=Us;a();s();var Ds=200;function qs(r,t){var e=this.__data__;if(e instanceof oe){var n=e.__data__;if(!ae||n.length<Ds-1)return n.push([r,t]),this.size=++e.size,this;e=this.__data__=new ft(n)}return e.set(r,t),this.size=e.size,this}var yn=qs;function Fe(r){var t=this.__data__=new oe(r);this.size=t.size}Fe.prototype.clear=mn;Fe.prototype.delete=dn;Fe.prototype.get=hn;Fe.prototype.has=xn;Fe.prototype.set=yn;var ut=Fe;a();s();a();s();function $s(r,t){for(var e=-1,n=r==null?0:r.length,i=0,o=[];++e<n;){var f=r[e];t(f,e,r)&&(o[i++]=f)}return o}var gn=$s;a();s();function js(){return[]}var wn=js;var Ws=Object.prototype,Ys=Ws.propertyIsEnumerable,vn=Object.getOwnPropertySymbols,Gs=vn?function(r){return r==null?[]:(r=Object(r),gn(vn(r),function(t){return Ys.call(r,t)}))}:wn,Tn=Gs;a();s();a();s();function Hs(r,t,e){var n=t(r);return ge(r)?n:cn(n,e(r))}var An=Hs;function Vs(r){return An(r,zr,Tn)}var Ft=Vs;a();s();a();s();var zs=P(E,"DataView"),pt=zs;a();s();var Ks=P(E,"Promise"),lt=Ks;a();s();var Js=P(E,"Set"),fe=Js;var bn="[object Map]",Qs="[object Object]",En="[object Promise]",In="[object Set]",Cn="[object WeakMap]",Sn="[object DataView]",Xs=z(pt),Zs=z(ae),ef=z(lt),tf=z(fe),rf=z(it),we=H;(pt&&we(new pt(new ArrayBuffer(1)))!=Sn||ae&&we(new ae)!=bn||lt&&we(lt.resolve())!=En||fe&&we(new fe)!=In||it&&we(new it)!=Cn)&&(we=function(r){var t=H(r),e=t==Qs?r.constructor:void 0,n=e?z(e):"";if(n)switch(n){case Xs:return Sn;case Zs:return bn;case ef:return En;case tf:return In;case rf:return Cn}return t});var Bt=we;a();s();var nf=E.Uint8Array,kt=nf;a();s();a();s();a();s();a();s();a();s();var of="__lodash_hash_undefined__";function af(r){return this.__data__.set(r,of),this}var Nn=af;a();s();function sf(r){return this.__data__.has(r)}var _n=sf;function ct(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new ft;++t<e;)this.add(r[t])}ct.prototype.add=ct.prototype.push=Nn;ct.prototype.has=_n;var mt=ct;a();s();function ff(r,t){for(var e=-1,n=r==null?0:r.length;++e<n;)if(t(r[e],e,r))return!0;return!1}var Ln=ff;a();s();function uf(r,t){return r.has(t)}var dt=uf;var pf=1,lf=2;function cf(r,t,e,n,i,o){var f=e&pf,p=r.length,c=t.length;if(p!=c&&!(f&&c>p))return!1;var d=o.get(r),h=o.get(t);if(d&&h)return d==t&&h==r;var x=-1,y=!0,v=e&lf?new mt:void 0;for(o.set(r,t),o.set(t,r);++x<p;){var T=r[x],C=t[x];if(n)var O=f?n(C,T,x,t,r,o):n(T,C,x,r,t,o);if(O!==void 0){if(O)continue;y=!1;break}if(v){if(!Ln(t,function(me,de){if(!dt(v,de)&&(T===me||i(T,me,e,n,o)))return v.push(de)})){y=!1;break}}else if(!(T===C||i(T,C,e,n,o))){y=!1;break}}return o.delete(r),o.delete(t),y}var ht=cf;a();s();a();s();function mf(r){var t=-1,e=Array(r.size);return r.forEach(function(n,i){e[++t]=[i,n]}),e}var Rn=mf;a();s();function df(r){var t=-1,e=Array(r.size);return r.forEach(function(n){e[++t]=n}),e}var Be=df;var hf=1,xf=2,yf="[object Boolean]",gf="[object Date]",wf="[object Error]",vf="[object Map]",Tf="[object Number]",Af="[object RegExp]",bf="[object Set]",Ef="[object String]",If="[object Symbol]",Cf="[object ArrayBuffer]",Sf="[object DataView]",Pn=G?G.prototype:void 0,Ot=Pn?Pn.valueOf:void 0;function Nf(r,t,e,n,i,o,f){switch(e){case Sf:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case Cf:return!(r.byteLength!=t.byteLength||!o(new kt(r),new kt(t)));case yf:case gf:case Tf:return ot(+r,+t);case wf:return r.name==t.name&&r.message==t.message;case Af:case Ef:return r==t+"";case vf:var p=Rn;case bf:var c=n&hf;if(p||(p=Be),r.size!=t.size&&!c)return!1;var d=f.get(r);if(d)return d==t;n|=xf,f.set(r,t);var h=ht(p(r),p(t),n,i,o,f);return f.delete(r),h;case If:if(Ot)return Ot.call(r)==Ot.call(t)}return!1}var Fn=Nf;a();s();var _f=1,Lf=Object.prototype,Rf=Lf.hasOwnProperty;function Pf(r,t,e,n,i,o){var f=e&_f,p=Ft(r),c=p.length,d=Ft(t),h=d.length;if(c!=h&&!f)return!1;for(var x=c;x--;){var y=p[x];if(!(f?y in t:Rf.call(t,y)))return!1}var v=o.get(r),T=o.get(t);if(v&&T)return v==t&&T==r;var C=!0;o.set(r,t),o.set(t,r);for(var O=f;++x<c;){y=p[x];var me=r[y],de=t[y];if(n)var Wt=f?n(de,me,y,t,r,o):n(me,de,y,r,t,o);if(!(Wt===void 0?me===de||i(me,de,e,n,o):Wt)){C=!1;break}O||(O=y=="constructor")}if(C&&!O){var Ye=r.constructor,Ge=t.constructor;Ye!=Ge&&"constructor"in r&&"constructor"in t&&!(typeof Ye=="function"&&Ye instanceof Ye&&typeof Ge=="function"&&Ge instanceof Ge)&&(C=!1)}return o.delete(r),o.delete(t),C}var Bn=Pf;var Ff=1,kn="[object Arguments]",On="[object Array]",xt="[object Object]",Bf=Object.prototype,Mn=Bf.hasOwnProperty;function kf(r,t,e,n,i,o){var f=ge(r),p=ge(t),c=f?On:Bt(r),d=p?On:Bt(t);c=c==kn?xt:c,d=d==kn?xt:d;var h=c==xt,x=d==xt,y=c==d;if(y&&De(r)){if(!De(t))return!1;f=!0,h=!1}if(y&&!h)return o||(o=new ut),f||st(r)?ht(r,t,e,n,i,o):Fn(r,t,c,e,n,i,o);if(!(e&Ff)){var v=h&&Mn.call(r,"__wrapped__"),T=x&&Mn.call(t,"__wrapped__");if(v||T){var C=v?r.value():r,O=T?t.value():t;return o||(o=new ut),i(C,O,e,n,o)}}return y?(o||(o=new ut),Bn(r,t,e,n,i,o)):!1}var Un=kf;function Dn(r,t,e,n,i){return r===t?!0:r==null||t==null||!V(r)&&!V(t)?r!==r&&t!==t:Un(r,t,e,n,Dn,i)}var qn=Dn;a();s();function Of(r,t,e){for(var n=-1,i=r==null?0:r.length;++n<i;)if(e(t,r[n]))return!0;return!1}var $n=Of;a();s();function Mf(r,t){return qn(r,t)}var yt=Mf;a();s();a();s();var Uf=1/0,Df=fe&&1/Be(new fe([,-0]))[1]==Uf?function(r){return new fe(r)}:Er,jn=Df;var qf=200;function $f(r,t,e){var n=-1,i=_r,o=r.length,f=!0,p=[],c=p;if(e)f=!1,i=$n;else if(o>=qf){var d=t?null:jn(r);if(d)return Be(d);f=!1,i=dt,c=new mt}else c=t?[]:p;e:for(;++n<o;){var h=r[n],x=t?t(h):h;if(h=e||h!==0?h:0,f&&x===x){for(var y=c.length;y--;)if(c[y]===x)continue e;t&&c.push(x),p.push(h)}else i(c,x,e)||(c!==p&&c.push(x),p.push(h))}return p}var Wn=$f;a();s();function jf(r,t){return t=typeof t=="function"?t:void 0,r&&r.length?Wn(r,void 0,t):[]}var gt=jf;a();s();a();s();a();s();var Yn,Gn,$e=(Gn=(Yn=l.env.FERN_STACK_TRACK)==null?void 0:Yn.toLowerCase())!=null?Gn:"",D=$e!==""&&$e!=="0"&&$e!=="false",Mt=["single","multiline","box"].includes($e)?$e:"single";D&&(Error.stackTraceLimit=50);var Wf=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),Yf=new Set(["stacktrace"]);function vt({maxFrames:r=50,skip:t=0,filterPaths:e=[],filterFunctions:n=[],stopOn:i=[],filterNode:o=!0,filterJs:f=!0,formatFilename:p=c=>c}={}){var d;if(!D)return[];n=[...n,...Wf],e=[...e,...Yf],i=[...i,"runInteractiveTask"];let c=!1;return((d=new Error().stack)!=null?d:"").split(`
2
2
  `).map(h=>{let x=h.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(x&&x.length===5){let[,y,v,T,C]=x;if(!y||!v||!T||!C)return;if(c||i.some(O=>y==null?void 0:y.includes(O))){c=!0;return}switch(y){case"Object.<anonymous>":y="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":y=`${y.substring(y.indexOf(".")+1)}()=> { ... }`;break}return{fn:y,path:p(v),position:`${T}:${C}`}}}).filter(h=>{var x,y;return h&&!n.some(v=>h.fn.includes(v))&&!(o&&((x=h.path)!=null&&x.startsWith("node:")))&&!(f&&((y=h.path)!=null&&y.endsWith(".js")))&&!e.some(v=>h.path.includes(v))}).slice(t,t+r)}var wt=class{constructor({maxFrames:t=50,skip:e=0,filterPaths:n=[],filterFunctions:i=[],stopOn:o=[],filterNode:f=!0,filterJs:p=!0,multiline:c=!1,formatFilename:d=h=>h}={}){m(this,"maxFrames");m(this,"skip");m(this,"filterPaths");m(this,"filterFunctions");m(this,"stopOn");m(this,"filterNode");m(this,"filterJs");m(this,"multiline");m(this,"formatFilename");m(this,"tracking",new WeakMap);this.maxFrames=t,this.skip=e,this.filterPaths=n,this.filterFunctions=i,this.stopOn=o,this.filterNode=f,this.filterJs=p,this.multiline=c,this.formatFilename=d}tag(t){let e=this.tracking.get(t)||new Set;vt({maxFrames:this.maxFrames,skip:this.skip,filterPaths:this.filterPaths,filterFunctions:this.filterFunctions,stopOn:this.stopOn,filterNode:this.filterNode,filterJs:this.filterJs,formatFilename:this.formatFilename}).forEach(n=>e.add(n)),this.tracking.set(t,e)}trace(t){if(!D)return"";let e=this.tracking.get(t);return e?[...e].map(n=>`${this.multiline?`
3
- `:""}${n.fn} - ${n.path}:${n.position}`).join(""):""}frames(t){let e=this.tracking.get(t);return e?[...e]:[]}free(t){this.tracking.delete(t)}clear(){this.tracking=new WeakMap}},J;function Gn({maxFrames:r=50,skip:t=0,filterPaths:e=[],filterFunctions:n=[],stopOn:i=[],filterNode:o=!0,filterJs:f=!0,multiline:p=!1,formatFilename:c=d=>d}={}){D&&(J!=null||(J=new wt({maxFrames:r,skip:t,filterPaths:e,filterFunctions:n,stopOn:i,filterNode:o,filterJs:f,multiline:p,formatFilename:c})))}function Hn(r){J==null||J.tag(r)}function Ut(r){var t;return(t=J==null?void 0:J.frames(r))!=null?t:[]}var Q=class{constructor(){Hn(this)}};a();s();a();s();a();s();var F=class extends Q{constructor(e){super();m(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var Gf=4;Gn({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var je=class{constructor(){m(this,"lineBuffer",[]);m(this,"indentLevel",0);m(this,"hasWrittenAnything",!1);m(this,"lastCharacterIsSemicolon",!1);m(this,"lastCharacterIsNewline",!1);m(this,"nodeStackFrames",[])}get buffer(){return D&&this.nodeStackFrames.length>0&&this.writeInternal(`
3
+ `:""}${n.fn} - ${n.path}:${n.position}`).join(""):""}frames(t){let e=this.tracking.get(t);return e?[...e]:[]}free(t){this.tracking.delete(t)}clear(){this.tracking=new WeakMap}},J;function Hn({maxFrames:r=50,skip:t=0,filterPaths:e=[],filterFunctions:n=[],stopOn:i=[],filterNode:o=!0,filterJs:f=!0,multiline:p=!1,formatFilename:c=d=>d}={}){D&&(J!=null||(J=new wt({maxFrames:r,skip:t,filterPaths:e,filterFunctions:n,stopOn:i,filterNode:o,filterJs:f,multiline:p,formatFilename:c})))}function Vn(r){J==null||J.tag(r)}function Ut(r){var t;return(t=J==null?void 0:J.frames(r))!=null?t:[]}var Q=class{constructor(){Vn(this)}};a();s();a();s();a();s();var F=class extends Q{constructor(e){super();m(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var Gf=4;Hn({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var je=class{constructor(){m(this,"lineBuffer",[]);m(this,"indentLevel",0);m(this,"hasWrittenAnything",!1);m(this,"lastCharacterIsSemicolon",!1);m(this,"lastCharacterIsNewline",!1);m(this,"nodeStackFrames",[])}get buffer(){return D&&this.nodeStackFrames.length>0&&this.writeInternal(`
4
4
  `),this.lineBuffer.join(`
5
5
  `)+(this.lastCharacterIsNewline?`
6
6
  `:"")}write(...t){for(let e of t)if(e!=null)if(typeof e=="string"){let n=e.length>0&&e.endsWith(`
@@ -12,19 +12,19 @@ ${o}`);this.isAtStartOfLine()&&(f=o+f),n&&(f+=`
12
12
  `)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
13
13
  `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let o=1;o<t.length;o++){this.write(e);let f=t[o];f!=null&&n(f)}}}toString(){return this.buffer}writeInternal(t){if(t.length===0)return;let e=!this.lastCharacterIsNewline;this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
14
14
  `),this.lastCharacterIsSemicolon=t.endsWith(";");let n=t.split(`
15
- `),i=D&&!this.shouldSkipTracking(n)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${n.shift()||""}`),this.lastCharacterIsNewline&&n.pop(),this.lineBuffer.push(...n),i&&this.appendTrackingComment()}set lastLine(t){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=t:this.lineBuffer.push(t)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(t){return!1}formatStack(t,e=""){return t.map(n=>`${e?`(${e}) `:""} ${n.fn} - ${n.path} : ${n.position}`)}filterStack(t){return t.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let t=[...this.formatStack(this.filterStack(vt({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,Mt){case"single":return this.singleLineTrackingComment(t);case"multiline":return this.multiLineTrackingComment(t);case"box":return this.boxTrackingComment(t)}}singleLineTrackingComment(t){this.lastLine=`${this.lastLine} // ${t.join(" ")}`}multiLineTrackingComment(t){this.lineBuffer.push(...t.map(e=>` // ${e}`))}boxTrackingComment(t){this.lineBuffer.push("/*",...t.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return Gf}};a();s();function Dt(r){return(r==null?void 0:r.name)!=null&&(r==null?void 0:r.assignment)!=null}a();s();var We=class extends Q{constructor({condition:e,true_:n,false_:i}){super();m(this,"condition");m(this,"true_");m(this,"false_");this.condition=e,this.true_=n,this.false_=i}write(e){e.writeNode(this.condition),e.write(" ? "),e.writeNode(this.true_),e.write(" : "),e.writeNode(this.false_)}};a();s();a();s();var ue={Critical:"CRITICAL",Warning:"WARNING"};a();s();var q={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};a();s();a();s();var Vn="self",zn="static";var g={};Gt(g,{Access:()=>pe,Array:()=>ve,AstNode:()=>w,Attribute:()=>Te,Class:()=>X,ClassInstantiation:()=>j,ClassReference:()=>I,CodeBlock:()=>S,DataClass:()=>Ae,Enum:()=>be,Field:()=>Ee,Map:()=>Ie,Method:()=>te,MethodInvocation:()=>ee,Parameter:()=>Z,Trait:()=>Ce,Type:()=>k,TypeLiteral:()=>B,Writer:()=>$,array:()=>Zf,assignVariable:()=>mu,attribute:()=>eu,classReference:()=>nu,class_:()=>tu,codeblock:()=>Se,dataClass:()=>iu,enum_:()=>ou,escapePhpString:()=>qt,field:()=>au,instantiateClass:()=>ti,invokeMethod:()=>su,map:()=>uu,mergeArrays:()=>xu,method:()=>pu,parameter:()=>lu,string:()=>hu,ternary:()=>cu,this_:()=>yu,throwException:()=>fu,trait:()=>ru,variable:()=>du});a();s();a();s();a();s();var pe={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};a();s();a();s();a();s();function Kn(r){return{namespace:r.substring(0,r.lastIndexOf("\\")),name:r.substring(r.lastIndexOf("\\")+1)}}var $=class extends je{constructor({namespace:e,rootNamespace:n,customConfig:i}){super();m(this,"namespace");m(this,"rootNamespace");m(this,"customConfig");m(this,"references",{});this.namespace=e,this.rootNamespace=n,this.customConfig=i}addReference(e){var f,p;if(e.namespace==null)return;if(Object.keys(this.references).filter(c=>{let d=Kn(c);return d.namespace!==e.namespace&&d.name===e.name}).length>0){e.requireFullyQualified();return}let i=e.namespace===""?e.name:`${e.namespace}\\${e.name}`;((p=(f=this.references)[i])!=null?p:f[i]=[]).push(e)}toString(e=!1){if(e)return this.buffer;let n=`namespace ${this.namespace};`,i=this.stringifyImports();return i.length>0?`${n}
15
+ `),i=D&&!this.shouldSkipTracking(n)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${n.shift()||""}`),this.lastCharacterIsNewline&&n.pop(),this.lineBuffer.push(...n),i&&this.appendTrackingComment()}set lastLine(t){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=t:this.lineBuffer.push(t)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(t){return!1}formatStack(t,e=""){return t.map(n=>`${e?`(${e}) `:""} ${n.fn} - ${n.path} : ${n.position}`)}filterStack(t){return t.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let t=[...this.formatStack(this.filterStack(vt({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,Mt){case"single":return this.singleLineTrackingComment(t);case"multiline":return this.multiLineTrackingComment(t);case"box":return this.boxTrackingComment(t)}}singleLineTrackingComment(t){this.lastLine=`${this.lastLine} // ${t.join(" ")}`}multiLineTrackingComment(t){this.lineBuffer.push(...t.map(e=>` // ${e}`))}boxTrackingComment(t){this.lineBuffer.push("/*",...t.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return Gf}};a();s();function Dt(r){return(r==null?void 0:r.name)!=null&&(r==null?void 0:r.assignment)!=null}a();s();var We=class extends Q{constructor({condition:e,true_:n,false_:i}){super();m(this,"condition");m(this,"true_");m(this,"false_");this.condition=e,this.true_=n,this.false_=i}write(e){e.writeNode(this.condition),e.write(" ? "),e.writeNode(this.true_),e.write(" : "),e.writeNode(this.false_)}};a();s();a();s();var ue={Critical:"CRITICAL",Warning:"WARNING"};a();s();var q={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};a();s();a();s();var zn="self",Kn="static";var g={};Ht(g,{Access:()=>pe,Array:()=>ve,AstNode:()=>w,Attribute:()=>Te,Class:()=>X,ClassInstantiation:()=>j,ClassReference:()=>I,CodeBlock:()=>S,DataClass:()=>Ae,Enum:()=>be,Field:()=>Ee,Map:()=>Ie,Method:()=>te,MethodInvocation:()=>ee,Parameter:()=>Z,Trait:()=>Ce,Type:()=>k,TypeLiteral:()=>B,Writer:()=>$,array:()=>Zf,assignVariable:()=>mu,attribute:()=>eu,classReference:()=>nu,class_:()=>tu,codeblock:()=>Se,dataClass:()=>iu,enum_:()=>ou,escapePhpString:()=>$t,field:()=>au,instantiateClass:()=>ti,invokeMethod:()=>su,map:()=>uu,mergeArrays:()=>xu,method:()=>pu,parameter:()=>lu,string:()=>hu,ternary:()=>cu,this_:()=>yu,throwException:()=>fu,trait:()=>ru,variable:()=>du});a();s();a();s();a();s();var pe={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};a();s();a();s();a();s();function Jn(r){return{namespace:r.substring(0,r.lastIndexOf("\\")),name:r.substring(r.lastIndexOf("\\")+1)}}var $=class extends je{constructor({namespace:e,rootNamespace:n,customConfig:i}){super();m(this,"namespace");m(this,"rootNamespace");m(this,"customConfig");m(this,"references",{});this.namespace=e,this.rootNamespace=n,this.customConfig=i}addReference(e){var f,p;if(e.namespace==null)return;if(Object.keys(this.references).filter(c=>{let d=Jn(c);return d.namespace!==e.namespace&&d.name===e.name}).length>0){e.requireFullyQualified();return}let i=e.namespace===""?e.name:`${e.namespace}\\${e.name}`;((p=(f=this.references)[i])!=null?p:f[i]=[]).push(e)}toString(e=!1){if(e)return this.buffer;let n=`namespace ${this.namespace};`,i=this.stringifyImports();return i.length>0?`${n}
16
16
 
17
17
  ${i}
18
18
 
19
19
  ${this.buffer}`:n+`
20
20
 
21
- `+this.buffer}stringifyImports(){let e=Object.keys(this.references);return e.length===0?"":e.filter(n=>Kn(n).namespace!==this.namespace).map(n=>`use ${n};`).join(`
21
+ `+this.buffer}stringifyImports(){let e=Object.keys(this.references);return e.length===0?"":e.filter(n=>Jn(n).namespace!==this.namespace).map(n=>`use ${n};`).join(`
22
22
  `)}};var w=class extends Q{toString(t){if(t==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:e,rootNamespace:n,customConfig:i,skipImports:o=!1}=t,f=new $({namespace:e,rootNamespace:n,customConfig:i});return this.write(f),f.toString(o)}async toStringAsync({namespace:t,rootNamespace:e,customConfig:n}){let i=new $({namespace:t,rootNamespace:e,customConfig:n});return this.write(i),i.toString()}};var ve=class extends w{constructor({entries:e}){super();m(this,"entries");this.entries=e!=null?e:[]}write(e){e.write("["),this.entries.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write("]")}};a();s();var Te=class extends w{constructor(e){var n;super();m(this,"reference");m(this,"arguments");this.reference=e.reference,this.arguments=(n=e.arguments)!=null?n:[]}write(e){e.addReference(this.reference),e.write(`${this.reference.name}`),this.arguments.length>0&&(e.write("("),this.arguments.forEach((n,i)=>{i>0&&e.write(","),typeof n=="string"?e.write(n):n.write(e)}),e.write(")"))}};a();s();a();s();var I=class extends w{constructor({name:e,namespace:n,generics:i}){super();m(this,"name");m(this,"namespace");m(this,"generics");m(this,"fullyQualified");this.name=e,this.namespace=n,this.generics=i,this.fullyQualified=!1}requireFullyQualified(){this.fullyQualified=!0}write(e){e.addReference(this);let n=this.fullyQualified?`\\${this.namespace}\\${this.name}`:this.name;e.write(`${n}`)}};a();s();a();s();function le(r){return r.startsWith("$")?r:`$${r}`}var L=class extends w{constructor({docs:e}={}){super();m(this,"docs");m(this,"tags",[]);this.docs=e}addTag(e){this.tags.push(Me(Oe({},e),{name:e.name!=null?le(e.name):void 0}))}write(e){e.writeLine("/**"),this.docs!=null&&(this.docs.split(`
23
23
  `).forEach(n=>{e.writeLine(` * ${n}`)}),this.tags.length>0&&e.writeLine(" *"));for(let n of this.tags)this.writeTag({writer:e,tag:n});e.writeLine(" */")}writeTag({writer:e,tag:n}){let i=n.docs!=null?n.docs.split(`
24
- `):void 0;i!=null&&i.length>1&&(i.forEach(o=>{e.writeLine(` * ${o}`)}),e.writeLine(" *")),e.write(` * @${n.tagType} `),n.type.write(e,{comment:!0}),n.name!=null&&e.write(` ${n.name}`),i!=null&&i.length===1&&e.write(` ${i[0]}`),e.newLine()}};a();s();function ce(r){return Hf(r,[pe.Public,pe.PublicReadonly,pe.Protected,pe.Private])}function Hf(r,t){return t.reduce((e,n)=>[...e,...r.filter(i=>i.access===n)],[])}var X=class extends w{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:f,traits:p}){super();m(this,"name");m(this,"namespace");m(this,"abstract");m(this,"docs");m(this,"parentClassReference");m(this,"traits");m(this,"fields",[]);m(this,"methods",[]);m(this,"constructor_");this.name=e,this.namespace=n,this.abstract=i!=null?i:!1,this.docs=o,this.parentClassReference=f,this.traits=p!=null?p:[]}addConstructor(e){this.constructor_=e}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}addMethods(e){this.methods.push(...e)}addTrait(e){this.traits.push(e)}write(e){e.addReference(new I({name:this.name,namespace:this.namespace})),this.abstract&&e.write("abstract "),this.writeComment(e),e.write(`class ${this.name} `),this.parentClassReference!=null&&(e.write("extends "),this.parentClassReference.write(e)),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:ce(this.fields)}),(this.constructor!=null||this.methods.length>0)&&e.newLine(),this.constructor_!=null&&(this.writeConstructor({writer:e,constructor:this.constructor_}),this.methods.length>0&&e.newLine()),this.writeMethods({writer:e,methods:ce(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new L({docs:this.docs}).write(e)}writeConstructor({writer:e,constructor:n}){var i;this.writeConstructorComment({writer:e,constructor:n}),n.access!=null&&e.write(`${n.access} `),e.write("function __construct("),e.indent(),n.parameters.forEach((o,f)=>{f===0&&e.newLine(),o.write(e),e.writeLine(",")}),e.dedent(),e.writeLine(")"),e.writeLine("{"),e.indent(),(i=n.body)==null||i.write(e),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeConstructorComment({writer:e,constructor:n}){if(n.parameters.length===0)return;let i=new L;for(let o of n.parameters)i.addTag(o.getCommentTag());i.write(e)}writeFields({writer:e,fields:n}){n.filter(i=>!i.inherited).forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};a();s();a();s();function ke({writer:r,arguments_:t,multiline:e}){if(t.length===0){r.write("()");return}if(e){Vf({writer:r,arguments_:t});return}zf({writer:r,arguments_:t})}function Vf({writer:r,arguments_:t}){r.writeLine("("),r.indent();for(let e of t)Qn({writer:r,argument:e,writeCompact:!1}),r.writeLine(",");r.dedent(),r.write(")")}function zf({writer:r,arguments_:t}){r.write("("),t.forEach((e,n)=>{n>0&&r.write(", "),Qn({writer:r,argument:e,writeCompact:!0})}),r.write(")")}function Qn({writer:r,argument:t,writeCompact:e}){Dt(t)?(t.docs&&(e?r.write(`/* ${t.docs} */ `):r.writeLine(`/* ${t.docs} */`)),r.write(`${t.name}: `),r.writeNodeOrString(t.assignment)):t.write(r)}var j=class extends w{constructor({classReference:e,arguments_:n,multiline:i}){super();m(this,"classReference");m(this,"arguments_");m(this,"multiline");this.classReference=e,this.arguments_=n,this.multiline=i!=null?i:!1}write(e){e.write("new "),e.writeNode(this.classReference),ke({writer:e,arguments_:this.arguments_,multiline:this.multiline})}};a();s();var S=class extends w{constructor(e){super();m(this,"arg");this.arg=e}write(e){return new F(this.arg).write(e)}};a();s();a();s();var Z=class extends w{constructor({name:e,type:n,docs:i,initializer:o,access:f,readonly_:p}){super();m(this,"name");m(this,"type");m(this,"docs");m(this,"initializer");m(this,"access");m(this,"readonly_");this.name=le(e),this.type=n,this.docs=i,this.initializer=o,this.access=f,this.readonly_=p!=null?p:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(e){this.access!=null&&e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null?(e.write(" = "),this.initializer.write(e)):this.type.isOptional()&&e.write(" = null")}};a();s();a();s();a();s();a();s();var ee=class extends w{constructor({method:e,arguments_:n,static_:i,multiline:o,on:f}){super();m(this,"method");m(this,"arguments_");m(this,"multiline");m(this,"static_");m(this,"on");this.method=e,this.arguments_=n,this.static_=i!=null?i:!1,this.multiline=o!=null?o:!1,this.on=f}write(e){this.on!=null&&(this.on.write(e),e.write(this.getMethodAccessor())),e.write(this.method),ke({writer:e,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};var B=class r extends w{constructor(e){super();m(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"list":{this.writeList({writer:e,list:this.internalType});break}case"boolean":{e.write(this.internalType.value.toString());break}case"class":{this.writeClass({writer:e,class_:this.internalType});break}case"file":{e.writeNode(Jf({writer:e,value:this.internalType.value}));break}case"float":{e.write(this.internalType.value.toString());break}case"number":{e.write(this.internalType.value.toString());break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"reference":{e.writeNode(this.internalType.value);break}case"datetime":{e.writeNode(Kf({writer:e,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
25
- `)){this.writeStringWithHeredoc({writer:e,value:this.internalType.value});break}if(this.internalType.value.includes("'")){e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}e.write(`'${this.internalType.value}'`);break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:_(this.internalType)}}isClass(){return this.internalType.type==="class"}asClassOrThrow(){if(this.isClass())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a class")}writeStringWithHeredoc({writer:e,value:n}){e.writeLine("<<<EOT"),e.writeNoIndent(n),e.newLine(),e.writeNoIndent("EOT")}writeClass({writer:e,class_:n}){e.writeNode(new j({classReference:n.reference,arguments_:[r.map({entries:n.fields.map(i=>({key:r.string(i.name),value:i.value}))})]}))}writeList({writer:e,list:n}){let i=Xf({values:n.values});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeMap({writer:e,map:n}){let i=Qf({entries:n.entries});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.key.write(e),e.write(" => "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("]")}static list({values:e}){return new this({type:"list",values:e})}static boolean(e){return new this({type:"boolean",value:e})}static class_({reference:e,fields:n}){return new this({type:"class",reference:e,fields:n})}static file(e){return new this({type:"file",value:e})}static float(e){return new this({type:"float",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static map({entries:e}){return new this({type:"map",entries:e})}static reference(e){return new this({type:"reference",value:e})}static string(e){return new this({type:"string",value:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownMap({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of n)e.writeNode(r.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownMap({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let[o,f]of i)e.write(`'${o}' => `),e.writeNode(r.unknown(f)),e.writeLine(",");e.dedent(),e.write("]")}};function Kf({writer:r,value:t}){return new j({classReference:new I({name:"DateTime",namespace:""}),arguments_:[new S(`'${t}'`)]})}function Jf({writer:r,value:t}){return new ee({on:new I({name:"File",namespace:`${r.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new S(`"${t}"`)]})}function Qf({entries:r}){return r.filter(t=>!B.isNop(t.key)&&!B.isNop(t.value))}function Xf({values:r}){return r.filter(t=>!B.isNop(t))}var k=class r extends w{constructor(e){super();m(this,"internalType");this.internalType=e}write(e,{comment:n}={}){switch(this.internalType.type){case"int":e.write("int");break;case"string":e.write("string");break;case"bool":e.write("bool");break;case"float":e.write("float");break;case"date":e.addReference(Xn),e.write("DateTime");break;case"dateTime":e.addReference(Xn),e.write("DateTime");break;case"mixed":e.write("mixed");break;case"object":e.write("object");break;case"array":if(!n){e.write("array");break}e.write("array<"),this.internalType.value.write(e,{comment:n}),e.write(">");break;case"map":{if(!n){e.write("array");break}e.write("array<"),this.internalType.keyType.write(e,{comment:n}),e.write(", "),this.internalType.valueType.write(e,{comment:n}),e.write(">");break}case"null":{e.write("null");break}case"typeDict":{if(!n){e.write("array");break}if(this.internalType.multiline){e.writeLine("array{");let i=this.internalType.entries.filter(p=>!p.valueType.isOptional()),o=this.internalType.entries.filter(p=>p.valueType.isOptional()),f=[...i,...o];for(let p of f)e.write(" * "),this.writeTypeDictEntry({writer:e,entry:p,comment:n}),e.writeLine(",");e.write(" * }");break}e.write("array{"),this.internalType.entries.forEach((i,o)=>{o>0&&e.write(", "),this.writeTypeDictEntry({writer:e,entry:i,comment:n})}),e.write("}");break}case"union":{this.writeUnion({writer:e,unionTypes:this.internalType.types,comment:n});break}case"optional":{let i=this.internalType.value.internalType,o=i.type==="mixed",f=i.type==="union";!f&&!o&&e.write("?"),this.internalType.value.write(e,{comment:n}),f&&!this.unionHasOptional(i.types)&&(e.write("|"),e.writeNode(r.null()));break}case"reference":if(n){e.writeNode(this.internalType.value);let i=this.internalType.value.generics;i&&i.length>0&&(e.write("<"),i.forEach((o,f)=>{f>0&&e.write(", "),o.write(e,{comment:n})}),e.write(">"))}else e.writeNode(this.internalType.value);break;case"enumString":n?(e.write("value-of<"),e.writeNode(this.internalType.value),e.write(">")):e.write("string");break;case"literal":if(n)e.writeNode(this.internalType.value);else switch(this.internalType.value.internalType.type){case"string":e.write("string");break;case"boolean":e.write("bool");break;default:_(this.internalType.value.internalType)}break;default:_(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:r.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var e;return(e=this.underlyingTypeIfOptional())!=null?e:this}isOptional(){return this.internalType.type==="optional"}getClassReference(){switch(this.internalType.type){case"date":case"dateTime":return new I({name:"DateTime",namespace:""});case"enumString":case"reference":return this.internalType.value;case"int":case"string":case"bool":case"float":case"object":case"map":case"array":case"null":case"mixed":case"optional":case"typeDict":case"union":case"literal":throw new Error("Cannot get class reference for "+this.internalType.type);default:_(this.internalType)}}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(e){return new this({type:"array",value:e})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static typeDict(e,{multiline:n}={}){return new this({type:"typeDict",entries:e,multiline:n})}static union(e){let n=this.flattenUnionTypes(e),i=gt(n,yt);return new this({type:"union",types:i})}static flattenUnionTypes(e){let n=[];for(let i of e)i.internalType.type==="union"?n.push(...this.flattenUnionTypes(i.internalType.types)):n.push(i);return n}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static null(){return new this({type:"null"})}static reference(e){return new this({type:"reference",value:e})}static enumString(e){return new this({type:"enumString",value:e})}static literalString(e){return new this({type:"literal",value:B.string(e)})}static literalBoolean(e){return new this({type:"literal",value:B.boolean(e)})}static isAlreadyOptional(e){return e.internalType.type==="optional"}writeUnion({writer:e,unionTypes:n,comment:i}){let o=this.getUniqueTypes({types:n,comment:i,writer:e}),f=this.unwrapOptionalTypes(o),p=f.filter(c=>c.underlyingType().internalType.type==="mixed").length>0;if(p&&!i){e.write("mixed");return}if(f.length>0&&i){e.writeLine("("),f.forEach((c,d)=>{d>0?e.write(" * |"):e.write(" * "),p&&(c=c.underlyingType()),c.write(e,{comment:i}),e.writeLine(),d++}),e.write(" * )");return}f.forEach((c,d)=>{d>0&&e.write("|"),p&&(c=c.underlyingType()),c.write(e,{comment:i}),d++})}writeTypeDictEntry({writer:e,entry:n,comment:i}){e.write(n.key),n.optional&&e.write("?"),e.write(": "),n.valueType.write(e,{comment:i})}getUniqueTypes({writer:e,types:n,comment:i}){let o=gt(n,yt),f=new Set;return o.filter(p=>{let c=p.toString({namespace:e.namespace,rootNamespace:e.rootNamespace,customConfig:e.customConfig,comment:i});return f.has(c)?!1:(f.add(c),!0)})}unwrapOptionalTypes(e){let n=!1,i=e.map(o=>o.internalType.type==="optional"?(n=!0,o.internalType.value):o);return n&&i.push(r.null()),i}unionHasOptional(e){return e.filter(n=>n.internalType.type==="optional").length>0}toString({namespace:e,rootNamespace:n,customConfig:i,comment:o}){let f=new $({namespace:e,rootNamespace:n,customConfig:i});return this.write(f,{comment:o!=null?o:!1}),f.toString()}},Xn=new I({namespace:"",name:"DateTime"});a();s();function Zn(r){return r.startsWith("$")?r.slice(1):r}var ei="values",Ae=class extends w{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:f,traits:p,constructorAccess:c}){super();m(this,"name");m(this,"namespace");m(this,"constructorAccess");m(this,"class_");this.name=e,this.namespace=n,this.constructorAccess=c!=null?c:"public",this.class_=new X({name:e,namespace:n,abstract:i,docs:o,parentClassReference:f,traits:p})}addField(e){this.class_.addField(e)}addMethod(e){this.class_.addMethod(e)}addTrait(e){this.class_.addTrait(e)}write(e){let n=ce(this.class_.fields).map(i=>Me(Oe({},i),{name:Zn(i.name)}));n.length>0&&this.class_.addConstructor({access:this.constructorAccess,parameters:this.getConstructorParameters({orderedFields:n}),body:g.codeblock(i=>{for(let o of n)i.write(`$this->${o.name} = $${ei}['${o.name}']`),o.type.isOptional()&&i.write(" ?? null"),i.write(";")})}),this.class_.write(e)}allFieldsAreOptional(){return this.class_.fields.every(e=>e.type.isOptional())}getConstructorParameters({orderedFields:e}){return[new Z({name:ei,type:k.typeDict(e.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new S("[]"):void 0})]}};a();s();a();s();var te=class extends w{constructor({name:e,access:n,parameters:i,throws:o,return_:f,body:p,docs:c,classReference:d,static_:h}){super();m(this,"name");m(this,"access");m(this,"parameters");m(this,"throws");m(this,"return_");m(this,"body");m(this,"docs");m(this,"classReference");m(this,"static_");this.name=e,this.access=n,this.parameters=i,this.throws=o!=null?o:[],this.return_=f,this.body=p,this.docs=c,this.classReference=d,this.static_=h!=null?h:!1}write(e){var f;this.writeComment(e),e.write(`${this.access}${this.static_?" static":""} function ${this.name}(`);let n=this.parameters.filter(p=>!p.type.isOptional()),i=this.parameters.filter(p=>p.type.isOptional());[...n,...i].forEach((p,c)=>{c>0&&e.write(", "),p.write(e)}),e.write("): "),this.return_!=null?e.writeNodeOrString(this.return_):e.write("void"),e.writeLine(" {"),e.indent(),(f=this.body)==null||f.write(e),e.dedent(),e.writeLine("}")}writeComment(e){let n=new L({docs:this.docs});for(let i of this.parameters)n.addTag({tagType:"param",type:i.type,name:i.name,docs:i.docs});this.return_!=null&&this.return_!==Vn&&this.return_!==zn&&n.addTag({tagType:"return",type:this.return_});for(let i of this.throws)n.addTag({tagType:"throws",type:k.reference(i)});e.writeNode(n)}};var be=class extends w{constructor({name:e,namespace:n,backing:i,docs:o,serializable:f}){super();m(this,"name");m(this,"namespace");m(this,"backing");m(this,"docs");m(this,"members",[]);m(this,"serializable");this.name=e,this.namespace=n,this.backing=i,this.docs=o,this.serializable=f!=null?f:!1}addMember(e){this.members.push(e)}write(e){this.writeComment(e),e.write("enum "),e.writeLine(`${this.name}`),this.backing!=null&&e.write(` : ${this.backing}`),this.serializable&&(e.addReference(new I({name:"JsonSerializable",namespace:""})),e.writeLine(" implements JsonSerializable")),e.writeLine(" {"),e.indent();for(let n of this.members){if(e.write(`case ${n.name}`),n.value!=null)if(typeof n.value=="string"){let i=qt(n.value);e.write(` = "${i}"`)}else e.write(` = ${n.value}`);e.writeTextStatement("")}this.serializable&&(e.newLine(),e.writeNode(new te({name:"jsonSerialize",return_:k.string(),access:"public",parameters:[],body:new S("return $this->value;")}))),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new L({docs:this.docs}).write(e)}};a();s();var Ee=class extends w{constructor({name:e,type:n,access:i,readonly_:o,initializer:f,docs:p,inlineDocs:c,attributes:d,inherited:h}){super();m(this,"name");m(this,"type");m(this,"access");m(this,"readonly_");m(this,"initializer");m(this,"docs");m(this,"inlineDocs");m(this,"attributes");m(this,"inherited");this.name=le(e),this.type=n,this.access=i,this.readonly_=o!=null?o:!1,this.initializer=f,this.docs=p,this.inlineDocs=c,this.attributes=d!=null?d:[],this.inherited=h!=null?h:!1}write(e){this.writeComment(e),this.writeAttributesIfPresent(e),e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null&&(e.write(" = "),this.initializer.write(e)),e.write(";"),this.inlineDocs!=null&&e.write(` // ${this.inlineDocs}`),e.newLine()}writeComment(e){let n=new L;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(e)}writeAttributesIfPresent(e){this.attributes.length>0&&(e.write("#["),this.attributes.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.writeLine("]"))}};a();s();var Ie=class extends w{constructor({entries:e,multiline:n}){super();m(this,"entries");m(this,"multiline");this.entries=e!=null?e:[],this.multiline=n!=null?n:!1}write(e){if(this.multiline){this.writeMultiline(e);return}this.writeCompact(e)}writeMultiline(e){e.writeLine("["),e.indent();for(let{key:n,value:i}of this.entries)n.write(e),e.write(" => "),i.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeCompact(e){e.write("[");for(let[n,{key:i,value:o}]of this.entries.entries())n>0&&e.write(", "),i.write(e),e.write(" => "),o.write(e);e.write("]")}};a();s();var Ce=class extends w{constructor({name:e,namespace:n,docs:i,traits:o}){super();m(this,"name");m(this,"namespace");m(this,"docs");m(this,"traits");m(this,"fields",[]);m(this,"methods",[]);this.name=e,this.namespace=n,this.docs=i,this.traits=o!=null?o:[]}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){this.writeComment(e),e.write(`trait ${this.name} `),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:ce(this.fields)}),this.fields.length>0&&this.methods.length>0&&e.newLine(),this.writeMethods({writer:e,methods:ce(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){let n=new L({docs:this.docs});for(let i of this.fields)n.addTag({tagType:"property",type:i.type,name:i.name});n.write(e)}writeFields({writer:e,fields:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};a();s();var Tt=class extends w{constructor(e){super();m(this,"arrays");this.arrays=e}write(e){e.write("array_merge"),ke({writer:e,arguments_:this.arrays.map(n=>Se(i=>{if(typeof n=="string"||n instanceof w){i.writeNodeOrString(n);return}i.writeNodeOrString(n.ref),n.fallback&&(i.write(" ?? "),i.writeNodeOrString(n.fallback))}))})}};function Zf(r){return new ve(r)}function eu(r){return new Te(r)}function tu(r){return new X(r)}function ru(r){return new Ce(r)}function nu(r){return new I(r)}function Se(r){return new S(r)}function iu(r){return new Ae(r)}function ou(r){return new be(r)}function au(r){return new Ee(r)}function ti(r){return new j(r)}function su(r){return new ee(r)}function fu(r){return Se(t=>{t.write("throw "),t.writeNode(ti(r))})}function uu(r){return new Ie(r)}function pu(r){return new te(r)}function lu(r){return new Z(r)}function cu(r){return new We(r)}function mu(r,t){return Se(e=>{e.writeNodeOrString(r),e.write(" = "),e.writeNodeOrString(t)})}function du(r){return Se(le(r))}function hu(r){return Se(`"${r}"`)}function xu(...r){return new Tt(r)}function qt(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\$/g,"\\$")}function yu(){return new S(r=>{r.write("$this")})}var ri="$client",At="Example",ni=`<?php
24
+ `):void 0;i!=null&&i.length>1&&(i.forEach(o=>{e.writeLine(` * ${o}`)}),e.writeLine(" *")),e.write(` * @${n.tagType} `),n.type.write(e,{comment:!0}),n.name!=null&&e.write(` ${n.name}`),i!=null&&i.length===1&&e.write(` ${i[0]}`),e.newLine()}};a();s();function ce(r){return Hf(r,[pe.Public,pe.PublicReadonly,pe.Protected,pe.Private])}function Hf(r,t){return t.reduce((e,n)=>[...e,...r.filter(i=>i.access===n)],[])}var X=class extends w{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:f,traits:p}){super();m(this,"name");m(this,"namespace");m(this,"abstract");m(this,"docs");m(this,"parentClassReference");m(this,"traits");m(this,"fields",[]);m(this,"methods",[]);m(this,"constructor_");this.name=e,this.namespace=n,this.abstract=i!=null?i:!1,this.docs=o,this.parentClassReference=f,this.traits=p!=null?p:[]}addConstructor(e){this.constructor_=e}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}addMethods(e){this.methods.push(...e)}addTrait(e){this.traits.push(e)}write(e){e.addReference(new I({name:this.name,namespace:this.namespace})),this.abstract&&e.write("abstract "),this.writeComment(e),e.write(`class ${this.name} `),this.parentClassReference!=null&&(e.write("extends "),this.parentClassReference.write(e)),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:ce(this.fields)}),(this.constructor!=null||this.methods.length>0)&&e.newLine(),this.constructor_!=null&&(this.writeConstructor({writer:e,constructor:this.constructor_}),this.methods.length>0&&e.newLine()),this.writeMethods({writer:e,methods:ce(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new L({docs:this.docs}).write(e)}writeConstructor({writer:e,constructor:n}){var i;this.writeConstructorComment({writer:e,constructor:n}),n.access!=null&&e.write(`${n.access} `),e.write("function __construct("),e.indent(),n.parameters.forEach((o,f)=>{f===0&&e.newLine(),o.write(e),e.writeLine(",")}),e.dedent(),e.writeLine(")"),e.writeLine("{"),e.indent(),(i=n.body)==null||i.write(e),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeConstructorComment({writer:e,constructor:n}){if(n.parameters.length===0)return;let i=new L;for(let o of n.parameters)i.addTag(o.getCommentTag());i.write(e)}writeFields({writer:e,fields:n}){n.filter(i=>!i.inherited).forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};a();s();a();s();function ke({writer:r,arguments_:t,multiline:e}){if(t.length===0){r.write("()");return}if(e){Vf({writer:r,arguments_:t});return}zf({writer:r,arguments_:t})}function Vf({writer:r,arguments_:t}){r.writeLine("("),r.indent();for(let e of t)Xn({writer:r,argument:e,writeCompact:!1}),r.writeLine(",");r.dedent(),r.write(")")}function zf({writer:r,arguments_:t}){r.write("("),t.forEach((e,n)=>{n>0&&r.write(", "),Xn({writer:r,argument:e,writeCompact:!0})}),r.write(")")}function Xn({writer:r,argument:t,writeCompact:e}){Dt(t)?(t.docs&&(e?r.write(`/* ${t.docs} */ `):r.writeLine(`/* ${t.docs} */`)),r.write(`${t.name}: `),r.writeNodeOrString(t.assignment)):t.write(r)}var j=class extends w{constructor({classReference:e,arguments_:n,multiline:i}){super();m(this,"classReference");m(this,"arguments_");m(this,"multiline");this.classReference=e,this.arguments_=n,this.multiline=i!=null?i:!1}write(e){e.write("new "),e.writeNode(this.classReference),ke({writer:e,arguments_:this.arguments_,multiline:this.multiline})}};a();s();var S=class extends w{constructor(e){super();m(this,"arg");this.arg=e}write(e){return new F(this.arg).write(e)}};a();s();a();s();var Z=class extends w{constructor({name:e,type:n,docs:i,initializer:o,access:f,readonly_:p}){super();m(this,"name");m(this,"type");m(this,"docs");m(this,"initializer");m(this,"access");m(this,"readonly_");this.name=le(e),this.type=n,this.docs=i,this.initializer=o,this.access=f,this.readonly_=p!=null?p:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(e){this.access!=null&&e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null?(e.write(" = "),this.initializer.write(e)):this.type.isOptional()&&e.write(" = null")}};a();s();a();s();a();s();a();s();var ee=class extends w{constructor({method:e,arguments_:n,static_:i,multiline:o,on:f}){super();m(this,"method");m(this,"arguments_");m(this,"multiline");m(this,"static_");m(this,"on");this.method=e,this.arguments_=n,this.static_=i!=null?i:!1,this.multiline=o!=null?o:!1,this.on=f}write(e){this.on!=null&&(this.on.write(e),e.write(this.getMethodAccessor())),e.write(this.method),ke({writer:e,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};var B=class r extends w{constructor(e){super();m(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"list":{this.writeList({writer:e,list:this.internalType});break}case"boolean":{e.write(this.internalType.value.toString());break}case"class":{this.writeClass({writer:e,class_:this.internalType});break}case"file":{e.writeNode(Jf({writer:e,value:this.internalType.value}));break}case"float":{e.write(this.internalType.value.toString());break}case"number":{e.write(this.internalType.value.toString());break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"reference":{e.writeNode(this.internalType.value);break}case"datetime":{e.writeNode(Kf({writer:e,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
25
+ `)){this.writeStringWithHeredoc({writer:e,value:this.internalType.value});break}if(this.internalType.value.includes("'")){e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}e.write(`'${this.internalType.value}'`);break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:_(this.internalType)}}isClass(){return this.internalType.type==="class"}asClassOrThrow(){if(this.isClass())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a class")}writeStringWithHeredoc({writer:e,value:n}){e.writeLine("<<<EOT"),e.writeNoIndent(n),e.newLine(),e.writeNoIndent("EOT")}writeClass({writer:e,class_:n}){e.writeNode(new j({classReference:n.reference,arguments_:[r.map({entries:n.fields.map(i=>({key:r.string(i.name),value:i.value}))})]}))}writeList({writer:e,list:n}){let i=Xf({values:n.values});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeMap({writer:e,map:n}){let i=Qf({entries:n.entries});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.key.write(e),e.write(" => "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("]")}static list({values:e}){return new this({type:"list",values:e})}static boolean(e){return new this({type:"boolean",value:e})}static class_({reference:e,fields:n}){return new this({type:"class",reference:e,fields:n})}static file(e){return new this({type:"file",value:e})}static float(e){return new this({type:"float",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static map({entries:e}){return new this({type:"map",entries:e})}static reference(e){return new this({type:"reference",value:e})}static string(e){return new this({type:"string",value:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownMap({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of n)e.writeNode(r.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownMap({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let[o,f]of i)e.write(`'${o}' => `),e.writeNode(r.unknown(f)),e.writeLine(",");e.dedent(),e.write("]")}};function Kf({writer:r,value:t}){return new j({classReference:new I({name:"DateTime",namespace:""}),arguments_:[new S(`'${t}'`)]})}function Jf({writer:r,value:t}){return new ee({on:new I({name:"File",namespace:`${r.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new S(`"${t}"`)]})}function Qf({entries:r}){return r.filter(t=>!B.isNop(t.key)&&!B.isNop(t.value))}function Xf({values:r}){return r.filter(t=>!B.isNop(t))}var k=class r extends w{constructor(e){super();m(this,"internalType");this.internalType=e}write(e,{comment:n}={}){switch(this.internalType.type){case"int":e.write("int");break;case"string":e.write("string");break;case"bool":e.write("bool");break;case"float":e.write("float");break;case"date":e.addReference(Zn),e.write("DateTime");break;case"dateTime":e.addReference(Zn),e.write("DateTime");break;case"mixed":e.write("mixed");break;case"object":e.write("object");break;case"array":if(!n){e.write("array");break}e.write("array<"),this.internalType.value.write(e,{comment:n}),e.write(">");break;case"map":{if(!n){e.write("array");break}e.write("array<"),this.internalType.keyType.write(e,{comment:n}),e.write(", "),this.internalType.valueType.write(e,{comment:n}),e.write(">");break}case"null":{e.write("null");break}case"typeDict":{if(!n){e.write("array");break}if(this.internalType.multiline){e.writeLine("array{");let i=this.internalType.entries.filter(p=>!p.valueType.isOptional()),o=this.internalType.entries.filter(p=>p.valueType.isOptional()),f=[...i,...o];for(let p of f)e.write(" * "),this.writeTypeDictEntry({writer:e,entry:p,comment:n}),e.writeLine(",");e.write(" * }");break}e.write("array{"),this.internalType.entries.forEach((i,o)=>{o>0&&e.write(", "),this.writeTypeDictEntry({writer:e,entry:i,comment:n})}),e.write("}");break}case"union":{this.writeUnion({writer:e,unionTypes:this.internalType.types,comment:n});break}case"optional":{let i=this.internalType.value.internalType,o=i.type==="mixed",f=i.type==="union";!f&&!o&&e.write("?"),this.internalType.value.write(e,{comment:n}),f&&!this.unionHasOptional(i.types)&&(e.write("|"),e.writeNode(r.null()));break}case"reference":if(n){e.writeNode(this.internalType.value);let i=this.internalType.value.generics;i&&i.length>0&&(e.write("<"),i.forEach((o,f)=>{f>0&&e.write(", "),o.write(e,{comment:n})}),e.write(">"))}else e.writeNode(this.internalType.value);break;case"enumString":n?(e.write("value-of<"),e.writeNode(this.internalType.value),e.write(">")):e.write("string");break;case"literal":if(n)e.writeNode(this.internalType.value);else switch(this.internalType.value.internalType.type){case"string":e.write("string");break;case"boolean":e.write("bool");break;default:_(this.internalType.value.internalType)}break;default:_(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:r.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var e;return(e=this.underlyingTypeIfOptional())!=null?e:this}isOptional(){return this.internalType.type==="optional"}getClassReference(){switch(this.internalType.type){case"date":case"dateTime":return new I({name:"DateTime",namespace:""});case"enumString":case"reference":return this.internalType.value;case"int":case"string":case"bool":case"float":case"object":case"map":case"array":case"null":case"mixed":case"optional":case"typeDict":case"union":case"literal":throw new Error("Cannot get class reference for "+this.internalType.type);default:_(this.internalType)}}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(e){return new this({type:"array",value:e})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static typeDict(e,{multiline:n}={}){return new this({type:"typeDict",entries:e,multiline:n})}static union(e){let n=this.flattenUnionTypes(e),i=gt(n,yt);return new this({type:"union",types:i})}static flattenUnionTypes(e){let n=[];for(let i of e)i.internalType.type==="union"?n.push(...this.flattenUnionTypes(i.internalType.types)):n.push(i);return n}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static null(){return new this({type:"null"})}static reference(e){return new this({type:"reference",value:e})}static enumString(e){return new this({type:"enumString",value:e})}static literalString(e){return new this({type:"literal",value:B.string(e)})}static literalBoolean(e){return new this({type:"literal",value:B.boolean(e)})}static isAlreadyOptional(e){return e.internalType.type==="optional"}writeUnion({writer:e,unionTypes:n,comment:i}){let o=this.getUniqueTypes({types:n,comment:i,writer:e}),f=this.unwrapOptionalTypes(o),p=f.filter(c=>c.underlyingType().internalType.type==="mixed").length>0;if(p&&!i){e.write("mixed");return}if(f.length>0&&i){e.writeLine("("),f.forEach((c,d)=>{d>0?e.write(" * |"):e.write(" * "),p&&(c=c.underlyingType()),c.write(e,{comment:i}),e.writeLine(),d++}),e.write(" * )");return}f.forEach((c,d)=>{d>0&&e.write("|"),p&&(c=c.underlyingType()),c.write(e,{comment:i}),d++})}writeTypeDictEntry({writer:e,entry:n,comment:i}){e.write(n.key),n.optional&&e.write("?"),e.write(": "),n.valueType.write(e,{comment:i})}getUniqueTypes({writer:e,types:n,comment:i}){let o=gt(n,yt),f=new Set;return o.filter(p=>{let c=p.toString({namespace:e.namespace,rootNamespace:e.rootNamespace,customConfig:e.customConfig,comment:i});return f.has(c)?!1:(f.add(c),!0)})}unwrapOptionalTypes(e){let n=!1,i=e.map(o=>o.internalType.type==="optional"?(n=!0,o.internalType.value):o);return n&&i.push(r.null()),i}unionHasOptional(e){return e.filter(n=>n.internalType.type==="optional").length>0}toString({namespace:e,rootNamespace:n,customConfig:i,comment:o}){let f=new $({namespace:e,rootNamespace:n,customConfig:i});return this.write(f,{comment:o!=null?o:!1}),f.toString()}},Zn=new I({namespace:"",name:"DateTime"});a();s();function ei(r){return r.startsWith("$")?r.slice(1):r}var qt="values",Ae=class extends w{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:f,traits:p,constructorAccess:c}){super();m(this,"name");m(this,"namespace");m(this,"constructorAccess");m(this,"class_");this.name=e,this.namespace=n,this.constructorAccess=c!=null?c:"public",this.class_=new X({name:e,namespace:n,abstract:i,docs:o,parentClassReference:f,traits:p})}addField(e){this.class_.addField(e)}addMethod(e){this.class_.addMethod(e)}addTrait(e){this.class_.addTrait(e)}write(e){let n=ce(this.class_.fields).map(i=>Me(Oe({},i),{name:ei(i.name)}));this.class_.addConstructor({access:this.constructorAccess,parameters:this.getConstructorParameters({orderedFields:n}),body:g.codeblock(i=>{if(n.length>0)for(let o of n)i.write(`$this->${o.name} = $${qt}['${o.name}']`),o.type.isOptional()&&i.write(" ?? null"),i.write(";");else i.writeLine(`unset($${qt});`)})}),this.class_.write(e)}allFieldsAreOptional(){return this.class_.fields.every(e=>e.type.isOptional())}getConstructorParameters({orderedFields:e}){return[new Z({name:qt,type:k.typeDict(e.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new S("[]"):void 0})]}};a();s();a();s();var te=class extends w{constructor({name:e,access:n,parameters:i,throws:o,return_:f,body:p,docs:c,classReference:d,static_:h}){super();m(this,"name");m(this,"access");m(this,"parameters");m(this,"throws");m(this,"return_");m(this,"body");m(this,"docs");m(this,"classReference");m(this,"static_");this.name=e,this.access=n,this.parameters=i,this.throws=o!=null?o:[],this.return_=f,this.body=p,this.docs=c,this.classReference=d,this.static_=h!=null?h:!1}write(e){var f;this.writeComment(e),e.write(`${this.access}${this.static_?" static":""} function ${this.name}(`);let n=this.parameters.filter(p=>!p.type.isOptional()),i=this.parameters.filter(p=>p.type.isOptional());[...n,...i].forEach((p,c)=>{c>0&&e.write(", "),p.write(e)}),e.write("): "),this.return_!=null?e.writeNodeOrString(this.return_):e.write("void"),e.writeLine(" {"),e.indent(),(f=this.body)==null||f.write(e),e.dedent(),e.writeLine("}")}writeComment(e){let n=new L({docs:this.docs});for(let i of this.parameters)n.addTag({tagType:"param",type:i.type,name:i.name,docs:i.docs});this.return_!=null&&this.return_!==zn&&this.return_!==Kn&&n.addTag({tagType:"return",type:this.return_});for(let i of this.throws)n.addTag({tagType:"throws",type:k.reference(i)});e.writeNode(n)}};var be=class extends w{constructor({name:e,namespace:n,backing:i,docs:o,serializable:f}){super();m(this,"name");m(this,"namespace");m(this,"backing");m(this,"docs");m(this,"members",[]);m(this,"serializable");this.name=e,this.namespace=n,this.backing=i,this.docs=o,this.serializable=f!=null?f:!1}addMember(e){this.members.push(e)}write(e){this.writeComment(e),e.write("enum "),e.writeLine(`${this.name}`),this.backing!=null&&e.write(` : ${this.backing}`),this.serializable&&(e.addReference(new I({name:"JsonSerializable",namespace:""})),e.writeLine(" implements JsonSerializable")),e.writeLine(" {"),e.indent();for(let n of this.members){if(e.write(`case ${n.name}`),n.value!=null)if(typeof n.value=="string"){let i=$t(n.value);e.write(` = "${i}"`)}else e.write(` = ${n.value}`);e.writeTextStatement("")}this.serializable&&(e.newLine(),e.writeNode(new te({name:"jsonSerialize",return_:k.string(),access:"public",parameters:[],body:new S("return $this->value;")}))),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new L({docs:this.docs}).write(e)}};a();s();var Ee=class extends w{constructor({name:e,type:n,access:i,readonly_:o,initializer:f,docs:p,inlineDocs:c,attributes:d,inherited:h}){super();m(this,"name");m(this,"type");m(this,"access");m(this,"readonly_");m(this,"initializer");m(this,"docs");m(this,"inlineDocs");m(this,"attributes");m(this,"inherited");this.name=le(e),this.type=n,this.access=i,this.readonly_=o!=null?o:!1,this.initializer=f,this.docs=p,this.inlineDocs=c,this.attributes=d!=null?d:[],this.inherited=h!=null?h:!1}write(e){this.writeComment(e),this.writeAttributesIfPresent(e),e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null&&(e.write(" = "),this.initializer.write(e)),e.write(";"),this.inlineDocs!=null&&e.write(` // ${this.inlineDocs}`),e.newLine()}writeComment(e){let n=new L;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(e)}writeAttributesIfPresent(e){this.attributes.length>0&&(e.write("#["),this.attributes.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.writeLine("]"))}};a();s();var Ie=class extends w{constructor({entries:e,multiline:n}){super();m(this,"entries");m(this,"multiline");this.entries=e!=null?e:[],this.multiline=n!=null?n:!1}write(e){if(this.multiline){this.writeMultiline(e);return}this.writeCompact(e)}writeMultiline(e){e.writeLine("["),e.indent();for(let{key:n,value:i}of this.entries)n.write(e),e.write(" => "),i.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeCompact(e){e.write("[");for(let[n,{key:i,value:o}]of this.entries.entries())n>0&&e.write(", "),i.write(e),e.write(" => "),o.write(e);e.write("]")}};a();s();var Ce=class extends w{constructor({name:e,namespace:n,docs:i,traits:o}){super();m(this,"name");m(this,"namespace");m(this,"docs");m(this,"traits");m(this,"fields",[]);m(this,"methods",[]);this.name=e,this.namespace=n,this.docs=i,this.traits=o!=null?o:[]}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){this.writeComment(e),e.write(`trait ${this.name} `),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:ce(this.fields)}),this.fields.length>0&&this.methods.length>0&&e.newLine(),this.writeMethods({writer:e,methods:ce(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){let n=new L({docs:this.docs});for(let i of this.fields)n.addTag({tagType:"property",type:i.type,name:i.name});n.write(e)}writeFields({writer:e,fields:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};a();s();var Tt=class extends w{constructor(e){super();m(this,"arrays");this.arrays=e}write(e){e.write("array_merge"),ke({writer:e,arguments_:this.arrays.map(n=>Se(i=>{if(typeof n=="string"||n instanceof w){i.writeNodeOrString(n);return}i.writeNodeOrString(n.ref),n.fallback&&(i.write(" ?? "),i.writeNodeOrString(n.fallback))}))})}};function Zf(r){return new ve(r)}function eu(r){return new Te(r)}function tu(r){return new X(r)}function ru(r){return new Ce(r)}function nu(r){return new I(r)}function Se(r){return new S(r)}function iu(r){return new Ae(r)}function ou(r){return new be(r)}function au(r){return new Ee(r)}function ti(r){return new j(r)}function su(r){return new ee(r)}function fu(r){return Se(t=>{t.write("throw "),t.writeNode(ti(r))})}function uu(r){return new Ie(r)}function pu(r){return new te(r)}function lu(r){return new Z(r)}function cu(r){return new We(r)}function mu(r,t){return Se(e=>{e.writeNodeOrString(r),e.write(" = "),e.writeNodeOrString(t)})}function du(r){return Se(le(r))}function hu(r){return Se(`"${r}"`)}function xu(...r){return new Tt(r)}function $t(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\$/g,"\\$")}function yu(){return new S(r=>{r.write("$this")})}var ri="$client",At="Example",ni=`<?php
26
26
 
27
- `,$t=class{constructor({context:t}){m(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){var i;let n=this.buildCodeBlock({endpoint:t,snippet:e});return ni+await n.toStringAsync({namespace:At,rootNamespace:At,customConfig:(i=this.context.customConfig)!=null?i:{}})}generateSnippetSync({endpoint:t,request:e}){var i;let n=this.buildCodeBlock({endpoint:t,snippet:e});return ni+n.toString({namespace:At,rootNamespace:At,customConfig:(i=this.context.customConfig)!=null?i:{}})}async generateSnippetAst({endpoint:t,request:e,options:n}){return n!=null&&n.skipClientInstantiation?this.buildCodeBlockWithoutClient({endpoint:t,snippet:e}):this.buildCodeBlock({endpoint:t,snippet:e})}buildCodeBlock({endpoint:t,snippet:e}){return g.codeblock(n=>{n.writeNodeStatement(this.constructClient({endpoint:t,snippet:e})),n.writeNodeStatement(this.callMethod({endpoint:t,snippet:e}))})}buildCodeBlockWithoutClient({endpoint:t,snippet:e}){return g.codeblock(n=>{n.writeNodeStatement(this.callMethodOnExistingClient({endpoint:t,snippet:e}))})}constructClient({endpoint:t,snippet:e}){return g.codeblock(n=>{n.write(`${ri} = `),n.writeNode(this.getRootClientClassInstantiation(this.getConstructorArgs({endpoint:t,snippet:e})))})}callMethod({endpoint:t,snippet:e}){return g.invokeMethod({on:g.codeblock(ri),method:this.getMethod({endpoint:t}),arguments_:this.getMethodArgs({endpoint:t,snippet:e}),multiline:!0})}callMethodOnExistingClient({endpoint:t,snippet:e}){let n=this.getMethodArgs({endpoint:t,snippet:e}),i=this.getRequestOptions({endpoint:t,snippet:e});return g.TypeLiteral.isNop(i)||n.push(i),g.invokeMethod({on:g.codeblock("$this->client"),method:this.getMethod({endpoint:t}),arguments_:n,multiline:!0})}getRequestOptions({endpoint:t,snippet:e}){var p;let n=(p=e.headers)!=null?p:{},i=Object.entries(n);if(i.length===0)return g.TypeLiteral.nop();let o=new Set;if(this.context.ir.headers!=null)for(let c of this.context.ir.headers)o.add(c.name.wireValue.toLowerCase());if(t.request.type==="inlined"&&t.request.headers!=null)for(let c of t.request.headers)o.add(c.name.wireValue.toLowerCase());let f=i.filter(([c])=>!o.has(c.toLowerCase()));return f.length===0?g.TypeLiteral.nop():g.TypeLiteral.map({entries:[{key:g.TypeLiteral.string("headers"),value:g.TypeLiteral.map({entries:f.map(([c,d])=>({key:g.TypeLiteral.string(c),value:g.TypeLiteral.string(String(d))}))})}]})}getConstructorArgs({endpoint:t,snippet:e}){var c;let n=[];if(t.auth!=null)if(e.auth!=null)n.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth}));else if(t.auth.type==="inferred"){let d={type:"inferred"};n.push(...this.getConstructorInferredAuthArgs({auth:t.auth,values:d}))}else this.context.errors.add({severity:ue.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`});let i=((c=this.context.ir.environments)==null?void 0:c.environments.type)==="multipleBaseUrls",o=this.getConstructorEnvironmentArg({environment:e.environment,hasMultiUrlEnvironments:i}),f=[];if(!i){let d=this.getConstructorBaseUrlArgs({baseUrl:e.baseURL,environment:e.environment});d.length>0&&f.push(...d)}this.context.errors.scope(q.Headers),this.context.ir.headers!=null&&e.headers!=null&&f.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope();let p=[...n];return o!=null&&p.push(o),f.length>0&&p.push({name:"options",assignment:g.TypeLiteral.map({entries:f.map(d=>({key:g.TypeLiteral.string(d.name),value:d.value}))})}),p}getConstructorAuthArgs({auth:t,values:e}){if(e.type!==t.type)return this.addError(this.context.newAuthMismatchError({auth:t,values:e}).message),[];switch(t.type){case"basic":return e.type==="basic"?this.getConstructorBasicAuthArgs({auth:t,values:e}):[];case"bearer":return e.type==="bearer"?this.getConstructorBearerAuthArgs({auth:t,values:e}):[];case"header":return e.type==="header"?this.getConstructorHeaderAuthArgs({auth:t,values:e}):[];case"oauth":return e.type==="oauth"?this.getConstructorOAuthArgs({auth:t,values:e}):[];case"inferred":return e.type==="inferred"?this.getConstructorInferredAuthArgs({auth:t,values:e}):[];default:_(t)}}addError(t){this.context.errors.add({severity:ue.Critical,message:t})}addWarning(t){this.context.errors.add({severity:ue.Warning,message:t})}getConstructorBasicAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),assignment:g.TypeLiteral.string(e.username)},{name:this.context.getPropertyName(t.password),assignment:g.TypeLiteral.string(e.password)}]}getConstructorEnvironmentArg({environment:t,hasMultiUrlEnvironments:e}){if(!e)return;let n=this.context.getEnvironmentsClassReference();if(t!=null){if(this.context.isSingleEnvironmentID(t)){let o=this.context.resolveEnvironmentName(t);if(o==null){this.addWarning(`Environment "${t}" was not found`);return}let f=this.context.getClassName(o);return{name:"environment",assignment:g.TypeLiteral.reference(g.codeblock(p=>{p.writeNode(n),p.write("::"),p.write(f),p.write("()")}))}}if(this.context.isMultiEnvironmentValues(t)){let o=this.resolveMultiEnvironmentName(t);if(o==null){this.addWarning("Invalid multi url environment");return}return o.type==="named"?{name:"environment",assignment:g.TypeLiteral.reference(g.codeblock(f=>{f.writeNode(n),f.write("::"),f.write(o.name),f.write("()")}))}:{name:"environment",assignment:g.TypeLiteral.reference(g.codeblock(f=>{f.writeNode(n),f.write("::custom(");let p=Object.entries(o.urls);p.forEach(([c,d],h)=>{f.write(`${c}: '${d}'`),h<p.length-1&&f.write(", ")}),f.write(")")}))}}}let i=this.getDefaultEnvironmentName();if(i!=null)return{name:"environment",assignment:g.TypeLiteral.reference(g.codeblock(o=>{o.writeNode(n),o.write("::"),o.write(i),o.write("()")}))}}getDefaultEnvironmentName(){var i;if(((i=this.context.ir.environments)==null?void 0:i.environments.type)!=="multipleBaseUrls")return;let t=this.context.ir.environments.environments;if(t.type!=="multipleBaseUrls")return;let e=t.environments;if(e.length===0)return;for(let o of e){let f=this.context.getClassName(o.name);if(f==="Production")return f}let n=e[0];if(n!=null)return this.context.getClassName(n.name)}resolveMultiEnvironmentName(t){let e=Object.keys(t);if(e.length===0||!this.context.validateMultiEnvironmentUrlValues(t))return;let n=e[0];if(n==null)return;let i=t[n];if(i==null)return;let o=this.context.resolveEnvironmentName(i);if(o!=null&&e.every(c=>{let d=t[c];return d==null?!1:this.context.resolveEnvironmentName(d)!=null&&d===i}))return{type:"named",name:this.context.getClassName(o)};let f={};for(let p of e){let c=t[p];if(c==null)continue;let d=this.getBaseUrlPropertyName(p);f[d]=c}if(Object.keys(f).length>0)return{type:"custom",urls:f}}getBaseUrlPropertyName(t){var i;if(((i=this.context.ir.environments)==null?void 0:i.environments.type)!=="multipleBaseUrls")return t;let e=this.context.ir.environments.environments;if(e.type!=="multipleBaseUrls")return t;let n=e.baseUrls.find(o=>o.id===t);return n==null?t:n.name.camelCase.safeName}getConstructorBaseUrlArgs({baseUrl:t,environment:e}){let n=this.getBaseUrlArg({baseUrl:t,environment:e});return g.TypeLiteral.isNop(n)?[]:[{name:"baseUrl",value:n}]}getBaseUrlArg({baseUrl:t,environment:e}){var n;if(t!=null&&e!=null)return this.context.errors.add({severity:ue.Critical,message:"Cannot specify both baseUrl and environment options"}),g.TypeLiteral.nop();if(t!=null)return g.TypeLiteral.string(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let i=this.context.getEnvironmentClassAccessFromID(e);return i==null?(this.context.errors.add({severity:ue.Warning,message:`Environment ${JSON.stringify(e)} was not found`}),g.TypeLiteral.nop()):g.TypeLiteral.reference(g.codeblock(o=>{o.writeNode(i),o.write("->value")}))}if(((n=this.context.ir.environments)==null?void 0:n.environments.type)==="multipleBaseUrls")return g.TypeLiteral.nop()}return g.TypeLiteral.nop()}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),assignment:g.TypeLiteral.string(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),assignment:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),assignment:g.TypeLiteral.string(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),assignment:g.TypeLiteral.string(e.clientSecret)}]}getConstructorInferredAuthArgs({auth:t,values:e}){return[]}getConstructorHeaderArgs({headers:t,values:e}){let n=[];for(let i of t){let o=this.getConstructorHeaderArg({header:i,value:e.value});o!=null&&n.push({name:this.context.getPropertyName(i.name.name),value:o})}return n}getConstructorHeaderArg({header:t,value:e}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!g.TypeLiteral.isNop(n))return n}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:_(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){var o,f;let n=[];this.context.errors.scope(q.PathParameters);let i=[...(o=this.context.ir.pathParameters)!=null?o:[],...(f=t.pathParameters)!=null?f:[]];return i.length>0&&n.push(...this.getPathParameters({namedParameters:i,snippet:e}).map(p=>p.value)),this.context.errors.unscope(),this.context.errors.scope(q.RequestBody),t.body!=null&&n.push(this.getBodyRequestArg({body:t.body,value:e.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e});default:_(t)}}getBytesBodyRequestArg({value:t}){return this.context.errors.add({severity:ue.Critical,message:"The PHP SDK doesn't support bytes requests yet"}),g.TypeLiteral.nop()}getMethodArgsForInlinedRequest({request:t,snippet:e}){var c,d,h,x;let n=[],i=(d=(c=this.context.customConfig)==null?void 0:c.inlinePathParameters)!=null?d:!1;this.context.errors.scope(q.PathParameters);let o=[],f=[...(h=this.context.ir.pathParameters)!=null?h:[],...(x=t.pathParameters)!=null?x:[]];f.length>0&&o.push(...this.getPathParameters({namedParameters:f,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(q.RequestBody);let p=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})||n.push(...o.map(y=>y.value)),this.context.needsRequestParameter({request:t,inlinePathParameters:i,inlineFileProperties:!0})&&n.push(this.getInlinedRequestArg({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})?o:[],filePropertyInfo:p})),n}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArg({request:t,snippet:e,pathParameterFields:n,filePropertyInfo:i}){var h,x,y,v;this.context.errors.scope(q.QueryParameters);let f=this.context.associateQueryParametersByWireValue({parameters:(h=t.queryParameters)!=null?h:[],values:(x=e.queryParameters)!=null?x:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(T)}));this.context.errors.unscope(),this.context.errors.scope(q.Headers);let c=this.context.associateByWireValue({parameters:(y=t.headers)!=null?y:[],values:(v=e.headers)!=null?v:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(T)}));this.context.errors.unscope(),this.context.errors.scope(q.RequestBody);let d=t.body!=null?this.getInlinedRequestBodyConstructorFields({body:t.body,value:e.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),g.TypeLiteral.class_({reference:g.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getRequestNamespace(t.declaration.fernFilepath)}),fields:[...n,...f,...c,...d]})}getInlinedRequestBodyConstructorFields({body:t,value:e,filePropertyInfo:n}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:t.value,value:e});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:t,value:e})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:n});default:_(t)}}getFileUploadRequestBodyConstructorFields({filePropertyInfo:t}){return[...t.fileFields,...t.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({body:t,value:e}){return{name:this.context.getPropertyName(t.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:t.bodyType,value:e})}}getReferencedRequestBodyPropertyTypeLiteral({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e});default:_(t)}}getInlinedRequestBodyPropertyConstructorFields({parameters:t,value:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=this.context.getRecord(e))!=null?o:{}});for(let f of i)n.push({name:this.context.getPropertyName(f.name.name),value:this.context.dynamicTypeLiteralMapper.convert(f)});return n}getPathParameters({namedParameters:t,snippet:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=e.pathParameters)!=null?o:{}});for(let f of i)n.push({name:this.context.getPropertyName(f.name.name),value:this.context.dynamicTypeLiteralMapper.convert(f)});return n}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getPropertyName(e)).join("->")}->${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}getRootClientClassInstantiation(t){return g.instantiateClass({classReference:g.classReference({name:this.context.getRootClientClassName(),namespace:this.context.rootNamespace}),arguments_:t,multiline:!0})}};0&&(module.exports={EndpointSnippetGenerator});
27
+ `,jt=class{constructor({context:t}){m(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){var i;let n=this.buildCodeBlock({endpoint:t,snippet:e});return ni+await n.toStringAsync({namespace:At,rootNamespace:At,customConfig:(i=this.context.customConfig)!=null?i:{}})}generateSnippetSync({endpoint:t,request:e}){var i;let n=this.buildCodeBlock({endpoint:t,snippet:e});return ni+n.toString({namespace:At,rootNamespace:At,customConfig:(i=this.context.customConfig)!=null?i:{}})}async generateSnippetAst({endpoint:t,request:e,options:n}){return n!=null&&n.skipClientInstantiation?this.buildCodeBlockWithoutClient({endpoint:t,snippet:e}):this.buildCodeBlock({endpoint:t,snippet:e})}buildCodeBlock({endpoint:t,snippet:e}){return g.codeblock(n=>{n.writeNodeStatement(this.constructClient({endpoint:t,snippet:e})),n.writeNodeStatement(this.callMethod({endpoint:t,snippet:e}))})}buildCodeBlockWithoutClient({endpoint:t,snippet:e}){return g.codeblock(n=>{n.writeNodeStatement(this.callMethodOnExistingClient({endpoint:t,snippet:e}))})}constructClient({endpoint:t,snippet:e}){return g.codeblock(n=>{n.write(`${ri} = `),n.writeNode(this.getRootClientClassInstantiation(this.getConstructorArgs({endpoint:t,snippet:e})))})}callMethod({endpoint:t,snippet:e}){return g.invokeMethod({on:g.codeblock(ri),method:this.getMethod({endpoint:t}),arguments_:this.getMethodArgs({endpoint:t,snippet:e}),multiline:!0})}callMethodOnExistingClient({endpoint:t,snippet:e}){let n=this.getMethodArgs({endpoint:t,snippet:e}),i=this.getRequestOptions({endpoint:t,snippet:e});return g.TypeLiteral.isNop(i)||n.push(i),g.invokeMethod({on:g.codeblock("$this->client"),method:this.getMethod({endpoint:t}),arguments_:n,multiline:!0})}getRequestOptions({endpoint:t,snippet:e}){var p;let n=(p=e.headers)!=null?p:{},i=Object.entries(n);if(i.length===0)return g.TypeLiteral.nop();let o=new Set;if(this.context.ir.headers!=null)for(let c of this.context.ir.headers)o.add(c.name.wireValue.toLowerCase());if(t.request.type==="inlined"&&t.request.headers!=null)for(let c of t.request.headers)o.add(c.name.wireValue.toLowerCase());let f=i.filter(([c])=>!o.has(c.toLowerCase()));return f.length===0?g.TypeLiteral.nop():g.TypeLiteral.map({entries:[{key:g.TypeLiteral.string("headers"),value:g.TypeLiteral.map({entries:f.map(([c,d])=>({key:g.TypeLiteral.string(c),value:g.TypeLiteral.string(String(d))}))})}]})}getConstructorArgs({endpoint:t,snippet:e}){var c;let n=[];if(t.auth!=null)if(e.auth!=null)n.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth}));else if(t.auth.type==="inferred"){let d={type:"inferred"};n.push(...this.getConstructorInferredAuthArgs({auth:t.auth,values:d}))}else this.context.errors.add({severity:ue.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`});let i=((c=this.context.ir.environments)==null?void 0:c.environments.type)==="multipleBaseUrls",o=this.getConstructorEnvironmentArg({environment:e.environment,hasMultiUrlEnvironments:i}),f=[];if(!i){let d=this.getConstructorBaseUrlArgs({baseUrl:e.baseURL,environment:e.environment});d.length>0&&f.push(...d)}this.context.errors.scope(q.Headers),this.context.ir.headers!=null&&e.headers!=null&&f.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope();let p=[...n];return o!=null&&p.push(o),f.length>0&&p.push({name:"options",assignment:g.TypeLiteral.map({entries:f.map(d=>({key:g.TypeLiteral.string(d.name),value:d.value}))})}),p}getConstructorAuthArgs({auth:t,values:e}){if(e.type!==t.type)return this.addError(this.context.newAuthMismatchError({auth:t,values:e}).message),[];switch(t.type){case"basic":return e.type==="basic"?this.getConstructorBasicAuthArgs({auth:t,values:e}):[];case"bearer":return e.type==="bearer"?this.getConstructorBearerAuthArgs({auth:t,values:e}):[];case"header":return e.type==="header"?this.getConstructorHeaderAuthArgs({auth:t,values:e}):[];case"oauth":return e.type==="oauth"?this.getConstructorOAuthArgs({auth:t,values:e}):[];case"inferred":return e.type==="inferred"?this.getConstructorInferredAuthArgs({auth:t,values:e}):[];default:_(t)}}addError(t){this.context.errors.add({severity:ue.Critical,message:t})}addWarning(t){this.context.errors.add({severity:ue.Warning,message:t})}getConstructorBasicAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),assignment:g.TypeLiteral.string(e.username)},{name:this.context.getPropertyName(t.password),assignment:g.TypeLiteral.string(e.password)}]}getConstructorEnvironmentArg({environment:t,hasMultiUrlEnvironments:e}){if(!e)return;let n=this.context.getEnvironmentsClassReference();if(t!=null){if(this.context.isSingleEnvironmentID(t)){let o=this.context.resolveEnvironmentName(t);if(o==null){this.addWarning(`Environment "${t}" was not found`);return}let f=this.context.getClassName(o);return{name:"environment",assignment:g.TypeLiteral.reference(g.codeblock(p=>{p.writeNode(n),p.write("::"),p.write(f),p.write("()")}))}}if(this.context.isMultiEnvironmentValues(t)){let o=this.resolveMultiEnvironmentName(t);if(o==null){this.addWarning("Invalid multi url environment");return}return o.type==="named"?{name:"environment",assignment:g.TypeLiteral.reference(g.codeblock(f=>{f.writeNode(n),f.write("::"),f.write(o.name),f.write("()")}))}:{name:"environment",assignment:g.TypeLiteral.reference(g.codeblock(f=>{f.writeNode(n),f.write("::custom(");let p=Object.entries(o.urls);p.forEach(([c,d],h)=>{f.write(`${c}: '${d}'`),h<p.length-1&&f.write(", ")}),f.write(")")}))}}}let i=this.getDefaultEnvironmentName();if(i!=null)return{name:"environment",assignment:g.TypeLiteral.reference(g.codeblock(o=>{o.writeNode(n),o.write("::"),o.write(i),o.write("()")}))}}getDefaultEnvironmentName(){var i;if(((i=this.context.ir.environments)==null?void 0:i.environments.type)!=="multipleBaseUrls")return;let t=this.context.ir.environments.environments;if(t.type!=="multipleBaseUrls")return;let e=t.environments;if(e.length===0)return;for(let o of e){let f=this.context.getClassName(o.name);if(f==="Production")return f}let n=e[0];if(n!=null)return this.context.getClassName(n.name)}resolveMultiEnvironmentName(t){let e=Object.keys(t);if(e.length===0||!this.context.validateMultiEnvironmentUrlValues(t))return;let n=e[0];if(n==null)return;let i=t[n];if(i==null)return;let o=this.context.resolveEnvironmentName(i);if(o!=null&&e.every(c=>{let d=t[c];return d==null?!1:this.context.resolveEnvironmentName(d)!=null&&d===i}))return{type:"named",name:this.context.getClassName(o)};let f={};for(let p of e){let c=t[p];if(c==null)continue;let d=this.getBaseUrlPropertyName(p);f[d]=c}if(Object.keys(f).length>0)return{type:"custom",urls:f}}getBaseUrlPropertyName(t){var i;if(((i=this.context.ir.environments)==null?void 0:i.environments.type)!=="multipleBaseUrls")return t;let e=this.context.ir.environments.environments;if(e.type!=="multipleBaseUrls")return t;let n=e.baseUrls.find(o=>o.id===t);return n==null?t:n.name.camelCase.safeName}getConstructorBaseUrlArgs({baseUrl:t,environment:e}){let n=this.getBaseUrlArg({baseUrl:t,environment:e});return g.TypeLiteral.isNop(n)?[]:[{name:"baseUrl",value:n}]}getBaseUrlArg({baseUrl:t,environment:e}){var n;if(t!=null&&e!=null)return this.context.errors.add({severity:ue.Critical,message:"Cannot specify both baseUrl and environment options"}),g.TypeLiteral.nop();if(t!=null)return g.TypeLiteral.string(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let i=this.context.getEnvironmentClassAccessFromID(e);return i==null?(this.context.errors.add({severity:ue.Warning,message:`Environment ${JSON.stringify(e)} was not found`}),g.TypeLiteral.nop()):g.TypeLiteral.reference(g.codeblock(o=>{o.writeNode(i),o.write("->value")}))}if(((n=this.context.ir.environments)==null?void 0:n.environments.type)==="multipleBaseUrls")return g.TypeLiteral.nop()}return g.TypeLiteral.nop()}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),assignment:g.TypeLiteral.string(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),assignment:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),assignment:g.TypeLiteral.string(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),assignment:g.TypeLiteral.string(e.clientSecret)}]}getConstructorInferredAuthArgs({auth:t,values:e}){return[]}getConstructorHeaderArgs({headers:t,values:e}){let n=[];for(let i of t){let o=this.getConstructorHeaderArg({header:i,value:e.value});o!=null&&n.push({name:this.context.getPropertyName(i.name.name),value:o})}return n}getConstructorHeaderArg({header:t,value:e}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!g.TypeLiteral.isNop(n))return n}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:_(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){var o,f;let n=[];this.context.errors.scope(q.PathParameters);let i=[...(o=this.context.ir.pathParameters)!=null?o:[],...(f=t.pathParameters)!=null?f:[]];return i.length>0&&n.push(...this.getPathParameters({namedParameters:i,snippet:e}).map(p=>p.value)),this.context.errors.unscope(),this.context.errors.scope(q.RequestBody),t.body!=null&&n.push(this.getBodyRequestArg({body:t.body,value:e.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e});default:_(t)}}getBytesBodyRequestArg({value:t}){return this.context.errors.add({severity:ue.Critical,message:"The PHP SDK doesn't support bytes requests yet"}),g.TypeLiteral.nop()}getMethodArgsForInlinedRequest({request:t,snippet:e}){var c,d,h,x;let n=[],i=(d=(c=this.context.customConfig)==null?void 0:c.inlinePathParameters)!=null?d:!1;this.context.errors.scope(q.PathParameters);let o=[],f=[...(h=this.context.ir.pathParameters)!=null?h:[],...(x=t.pathParameters)!=null?x:[]];f.length>0&&o.push(...this.getPathParameters({namedParameters:f,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(q.RequestBody);let p=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})||n.push(...o.map(y=>y.value)),this.context.needsRequestParameter({request:t,inlinePathParameters:i,inlineFileProperties:!0})&&n.push(this.getInlinedRequestArg({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})?o:[],filePropertyInfo:p})),n}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArg({request:t,snippet:e,pathParameterFields:n,filePropertyInfo:i}){var h,x,y,v;this.context.errors.scope(q.QueryParameters);let f=this.context.associateQueryParametersByWireValue({parameters:(h=t.queryParameters)!=null?h:[],values:(x=e.queryParameters)!=null?x:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(T)}));this.context.errors.unscope(),this.context.errors.scope(q.Headers);let c=this.context.associateByWireValue({parameters:(y=t.headers)!=null?y:[],values:(v=e.headers)!=null?v:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(T)}));this.context.errors.unscope(),this.context.errors.scope(q.RequestBody);let d=t.body!=null?this.getInlinedRequestBodyConstructorFields({body:t.body,value:e.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),g.TypeLiteral.class_({reference:g.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getRequestNamespace(t.declaration.fernFilepath)}),fields:[...n,...f,...c,...d]})}getInlinedRequestBodyConstructorFields({body:t,value:e,filePropertyInfo:n}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:t.value,value:e});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:t,value:e})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:n});default:_(t)}}getFileUploadRequestBodyConstructorFields({filePropertyInfo:t}){return[...t.fileFields,...t.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({body:t,value:e}){return{name:this.context.getPropertyName(t.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:t.bodyType,value:e})}}getReferencedRequestBodyPropertyTypeLiteral({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e});default:_(t)}}getInlinedRequestBodyPropertyConstructorFields({parameters:t,value:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=this.context.getRecord(e))!=null?o:{}});for(let f of i)n.push({name:this.context.getPropertyName(f.name.name),value:this.context.dynamicTypeLiteralMapper.convert(f)});return n}getPathParameters({namedParameters:t,snippet:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=e.pathParameters)!=null?o:{}});for(let f of i)n.push({name:this.context.getPropertyName(f.name.name),value:this.context.dynamicTypeLiteralMapper.convert(f)});return n}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getPropertyName(e)).join("->")}->${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}getRootClientClassInstantiation(t){return g.instantiateClass({classReference:g.classReference({name:this.context.getRootClientClassName(),namespace:this.context.rootNamespace}),arguments_:t,multiline:!0})}};0&&(module.exports={EndpointSnippetGenerator});
28
28
  /*! Bundled license information:
29
29
 
30
30
  @esbuild-plugins/node-globals-polyfill/Buffer.js: