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