@fern-api/swift-dynamic-snippets 0.1.0 → 0.1.1
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 +19 -1
- package/cjs/DynamicSnippetsGenerator.cjs.map +1 -1
- package/cjs/EndpointSnippetGenerator.cjs +30 -1
- package/cjs/EndpointSnippetGenerator.cjs.map +1 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +19 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -1
- package/cjs/context/DynamicTypeLiteralMapper.cjs +19 -1
- package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -1
- package/cjs/context/DynamicTypeMapper.cjs +19 -1
- package/cjs/context/DynamicTypeMapper.cjs.map +1 -1
- package/cjs/context/FilePropertyMapper.cjs +30 -1
- package/cjs/context/FilePropertyMapper.cjs.map +1 -1
- package/cjs/context/index.cjs +19 -1
- package/cjs/context/index.cjs.map +1 -1
- package/cjs/index.cjs +29 -11
- package/cjs/index.cjs.map +1 -1
- package/esm/Config.js +1 -1
- package/esm/DynamicSnippetsGenerator.js +1 -1
- package/esm/EndpointSnippetGenerator.js +1 -1
- package/esm/{chunk-4YR7VIA5.js → chunk-2M2RBZK2.js} +2 -2
- package/esm/chunk-6DFEQNIA.js +2 -0
- package/esm/{chunk-NEAKFXXW.js.map → chunk-6DFEQNIA.js.map} +1 -1
- package/esm/chunk-7RC2HH3P.js +2 -0
- package/esm/{chunk-JBDWOK23.js.map → chunk-7RC2HH3P.js.map} +1 -1
- package/esm/chunk-FX6IFKZ7.js +2 -0
- package/esm/chunk-HTU5V5TT.js +2 -0
- package/esm/chunk-IHG2VZKL.js +2 -0
- package/esm/chunk-IHG2VZKL.js.map +1 -0
- package/esm/chunk-JFTYS7SI.js +20 -0
- package/esm/chunk-JFTYS7SI.js.map +1 -0
- package/esm/chunk-KIHSBETU.js +2 -0
- package/esm/{chunk-QKXS634U.js.map → chunk-KIHSBETU.js.map} +1 -1
- package/esm/chunk-PJTPV2D6.js +15 -0
- package/esm/chunk-PJTPV2D6.js.map +1 -0
- package/esm/{chunk-PKOEJ7HU.js → chunk-PYMG6Y4R.js} +2 -2
- package/esm/{chunk-P4BOVZKM.js → chunk-WG3NZOM6.js} +2 -2
- package/esm/chunk-WXHVUJ6D.js +2 -0
- package/esm/{chunk-T6A4SG7G.js.map → chunk-WXHVUJ6D.js.map} +1 -1
- package/esm/chunk-ZIQ5ITTV.js +2 -0
- package/esm/{chunk-F6NGJ242.js.map → chunk-ZIQ5ITTV.js.map} +1 -1
- package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
- package/esm/context/DynamicTypeLiteralMapper.js +1 -1
- package/esm/context/DynamicTypeMapper.js +1 -1
- package/esm/context/FilePropertyMapper.js +1 -1
- package/esm/context/index.js +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/util/pascal-case.js +1 -1
- package/package.json +1 -1
- package/esm/chunk-243PMR4C.js +0 -2
- package/esm/chunk-7GLUP3NF.js +0 -2
- package/esm/chunk-7GLUP3NF.js.map +0 -1
- package/esm/chunk-BGT34OGK.js +0 -15
- package/esm/chunk-BGT34OGK.js.map +0 -1
- package/esm/chunk-F6NGJ242.js +0 -2
- package/esm/chunk-JBDWOK23.js +0 -2
- package/esm/chunk-NEAKFXXW.js +0 -2
- package/esm/chunk-NH2Q3QVN.js +0 -2
- package/esm/chunk-QKXS634U.js +0 -2
- package/esm/chunk-T6A4SG7G.js +0 -2
- /package/esm/{chunk-4YR7VIA5.js.map → chunk-2M2RBZK2.js.map} +0 -0
- /package/esm/{chunk-NH2Q3QVN.js.map → chunk-FX6IFKZ7.js.map} +0 -0
- /package/esm/{chunk-243PMR4C.js.map → chunk-HTU5V5TT.js.map} +0 -0
- /package/esm/{chunk-PKOEJ7HU.js.map → chunk-PYMG6Y4R.js.map} +0 -0
- /package/esm/{chunk-P4BOVZKM.js.map → chunk-WG3NZOM6.js.map} +0 -0
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
"use strict";var W=Object.defineProperty;var _e=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Ne=Object.prototype.hasOwnProperty;var Me=(t,r,e)=>r in t?W(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e;var H=(t,r)=>()=>(t&&(r=t(t=0)),r);var Oe=(t,r)=>{for(var e in r)W(t,e,{get:r[e],enumerable:!0})},ke=(t,r,e,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let f of Ce(r))!Ne.call(t,f)&&f!==e&&W(t,f,{get:()=>r[f],enumerable:!(o=_e(r,f))||o.enumerable});return t};var Pe=t=>ke(W({},"__esModule",{value:!0}),t);var fr=(t,r,e)=>Me(t,typeof r!="symbol"?r+"":r,e);function nr(){throw new Error("setTimeout has not been defined")}function ir(){throw new Error("clearTimeout has not been defined")}function ur(t){if(S===setTimeout)return setTimeout(t,0);if((S===nr||!S)&&setTimeout)return S=setTimeout,setTimeout(t,0);try{return S(t,0)}catch(r){try{return S.call(null,t,0)}catch(e){return S.call(this,t,0)}}}function De(t){if(U===clearTimeout)return clearTimeout(t);if((U===ir||!U)&&clearTimeout)return U=clearTimeout,clearTimeout(t);try{return U(t)}catch(r){try{return U.call(null,t)}catch(e){return U.call(this,t)}}}function Le(){!k||!_||(k=!1,_.length?R=_.concat(R):F=-1,R.length&&sr())}function sr(){if(!k){var t=ur(Le);k=!0;for(var r=R.length;r;){for(_=R,R=[];++F<r;)_&&_[F].run();F=-1,r=R.length}_=null,k=!1,De(t)}}function Ye(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];R.push(new pr(t,r)),R.length===1&&!k&&ur(sr)}function pr(t,r){this.fun=t,this.array=r}function C(){}function tt(t){throw new Error("process.binding is not supported")}function ot(){return"/"}function ft(t){throw new Error("process.chdir is not supported")}function at(){return 0}function it(t){var r=nt.call(O)*.001,e=Math.floor(r),o=Math.floor(r%1*1e9);return t&&(e=e-t[0],o=o-t[1],o<0&&(e--,o+=1e9)),[e,o]}function st(){var t=new Date,r=t-ut;return r/1e3}var S,U,R,k,_,F,We,Fe,je,ze,Ge,Ve,Ze,Je,qe,He,Ke,Qe,Xe,$e,rt,et,O,nt,ut,x,ar,u=H(()=>{"use strict";S=nr,U=ir;typeof globalThis.setTimeout=="function"&&(S=setTimeout);typeof globalThis.clearTimeout=="function"&&(U=clearTimeout);R=[],k=!1,F=-1;pr.prototype.run=function(){this.fun.apply(null,this.array)};We="browser",Fe="browser",je=!0,ze={},Ge=[],Ve="",Ze={},Je={},qe={};He=C,Ke=C,Qe=C,Xe=C,$e=C,rt=C,et=C;O=globalThis.performance||{},nt=O.now||O.mozNow||O.msNow||O.oNow||O.webkitNow||function(){return new Date().getTime()};ut=new Date;x={nextTick:Ye,title:We,browser:je,env:ze,argv:Ge,version:Ve,versions:Ze,on:He,addListener:Ke,once:Qe,off:Xe,removeListener:$e,removeAllListeners:rt,emit:et,binding:tt,cwd:ot,chdir:ft,umask:at,hrtime:it,platform:Fe,release:Je,config:qe,uptime:st},ar={};Object.keys(ar).forEach(t=>{let r=t.split("."),e=x;for(let o=0;o<r.length;o++){let f=r[o];o===r.length-1?e[f]=ar[t]:e=e[f]||(e[f]={})}})});function dr(){Q=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,e=t.length;r<e;++r)v[r]=t[r],T[t.charCodeAt(r)]=r;T[45]=62,T[95]=63}function lt(t){Q||dr();var r,e,o,f,a,i,p=t.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=t[p-2]==="="?2:t[p-1]==="="?1:0,i=new pt(p*3/4-a),o=a>0?p-4:p;var l=0;for(r=0,e=0;r<o;r+=4,e+=3)f=T[t.charCodeAt(r)]<<18|T[t.charCodeAt(r+1)]<<12|T[t.charCodeAt(r+2)]<<6|T[t.charCodeAt(r+3)],i[l++]=f>>16&255,i[l++]=f>>8&255,i[l++]=f&255;return a===2?(f=T[t.charCodeAt(r)]<<2|T[t.charCodeAt(r+1)]>>4,i[l++]=f&255):a===1&&(f=T[t.charCodeAt(r)]<<10|T[t.charCodeAt(r+1)]<<4|T[t.charCodeAt(r+2)]>>2,i[l++]=f>>8&255,i[l++]=f&255),i}function xt(t){return v[t>>18&63]+v[t>>12&63]+v[t>>6&63]+v[t&63]}function mt(t,r,e){for(var o,f=[],a=r;a<e;a+=3)o=(t[a]<<16)+(t[a+1]<<8)+t[a+2],f.push(xt(o));return f.join("")}function lr(t){Q||dr();for(var r,e=t.length,o=e%3,f="",a=[],i=16383,p=0,l=e-o;p<l;p+=i)a.push(mt(t,p,p+i>l?l:p+i));return o===1?(r=t[e-1],f+=v[r>>2],f+=v[r<<4&63],f+="=="):o===2&&(r=(t[e-2]<<8)+t[e-1],f+=v[r>>10],f+=v[r>>4&63],f+=v[r<<2&63],f+="="),a.push(f),a.join("")}function j(){return n.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(t,r){if(j()<r)throw new RangeError("Invalid typed array length");return n.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=n.prototype):(t===null&&(t=new n(r)),t.length=r),t}function n(t,r,e){if(!n.TYPED_ARRAY_SUPPORT&&!(this instanceof n))return new n(t,r,e);if(typeof t=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return X(this,t)}return cr(this,t,r,e)}function cr(t,r,e,o){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&r instanceof ArrayBuffer?ht(t,r,e,o):typeof r=="string"?ct(t,r,e):wt(t,r)}function hr(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function dt(t,r,e,o){return hr(r),r<=0?b(t,r):e!==void 0?typeof o=="string"?b(t,r).fill(e,o):b(t,r).fill(e):b(t,r)}function X(t,r){if(hr(r),t=b(t,r<0?0:$(r)|0),!n.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function ct(t,r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!n.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var o=wr(r,e)|0;t=b(t,o);var f=t.write(r,e);return f!==o&&(t=t.slice(0,f)),t}function K(t,r){var e=r.length<0?0:$(r.length)|0;t=b(t,e);for(var o=0;o<e;o+=1)t[o]=r[o]&255;return t}function ht(t,r,e,o){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(o||0))throw new RangeError("'length' is out of bounds");return e===void 0&&o===void 0?r=new Uint8Array(r):o===void 0?r=new Uint8Array(r,e):r=new Uint8Array(r,e,o),n.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=n.prototype):t=K(t,r),t}function wt(t,r){if(A(r)){var e=$(r.length)|0;return t=b(t,e),t.length===0||r.copy(t,0,0,e),t}if(r){if(typeof ArrayBuffer!="undefined"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||Pt(r.length)?b(t,0):K(t,r);if(r.type==="Buffer"&&Array.isArray(r.data))return K(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function $(t){if(t>=j())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+j().toString(16)+" bytes");return t|0}function A(t){return!!(t!=null&&t._isBuffer)}function wr(t,r){if(A(t))return t.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;if(e===0)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Rr(t).length;default:if(o)return z(t).length;r=(""+r).toLowerCase(),o=!0}}function yt(t,r,e){var o=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return Ut(this,r,e);case"utf8":case"utf-8":return Tr(this,r,e);case"ascii":return It(this,r,e);case"latin1":case"binary":return St(this,r,e);case"base64":return Rt(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,r,e);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}function N(t,r,e){var o=t[r];t[r]=t[e],t[e]=o}function yr(t,r,e,o,f){if(t.length===0)return-1;if(typeof e=="string"?(o=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=f?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(f)return-1;e=t.length-1}else if(e<0)if(f)e=0;else return-1;if(typeof r=="string"&&(r=n.from(r,o)),A(r))return r.length===0?-1:xr(t,r,e,o,f);if(typeof r=="number")return r=r&255,n.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?f?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):xr(t,[r],e,o,f);throw new TypeError("val must be string, number or Buffer")}function xr(t,r,e,o,f){var a=1,i=t.length,p=r.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(t.length<2||r.length<2)return-1;a=2,i/=2,p/=2,e/=2}function l(g,M){return a===1?g[M]:g.readUInt16BE(M*a)}var d;if(f){var c=-1;for(d=e;d<i;d++)if(l(t,d)===l(r,c===-1?0:d-c)){if(c===-1&&(c=d),d-c+1===p)return c*a}else c!==-1&&(d-=d-c),c=-1}else for(e+p>i&&(e=i-p),d=e;d>=0;d--){for(var m=!0,E=0;E<p;E++)if(l(t,d+E)!==l(r,E)){m=!1;break}if(m)return d}return-1}function gt(t,r,e,o){e=Number(e)||0;var f=t.length-e;o?(o=Number(o),o>f&&(o=f)):o=f;var a=r.length;if(a%2!==0)throw new TypeError("Invalid hex string");o>a/2&&(o=a/2);for(var i=0;i<o;++i){var p=parseInt(r.substr(i*2,2),16);if(isNaN(p))return i;t[e+i]=p}return i}function Tt(t,r,e,o){return Z(z(r,t.length-e),t,e,o)}function gr(t,r,e,o){return Z(Ot(r),t,e,o)}function Et(t,r,e,o){return gr(t,r,e,o)}function vt(t,r,e,o){return Z(Rr(r),t,e,o)}function At(t,r,e,o){return Z(kt(r,t.length-e),t,e,o)}function Rt(t,r,e){return r===0&&e===t.length?lr(t):lr(t.slice(r,e))}function Tr(t,r,e){e=Math.min(t.length,e);for(var o=[],f=r;f<e;){var a=t[f],i=null,p=a>239?4:a>223?3:a>191?2:1;if(f+p<=e){var l,d,c,m;switch(p){case 1:a<128&&(i=a);break;case 2:l=t[f+1],(l&192)===128&&(m=(a&31)<<6|l&63,m>127&&(i=m));break;case 3:l=t[f+1],d=t[f+2],(l&192)===128&&(d&192)===128&&(m=(a&15)<<12|(l&63)<<6|d&63,m>2047&&(m<55296||m>57343)&&(i=m));break;case 4:l=t[f+1],d=t[f+2],c=t[f+3],(l&192)===128&&(d&192)===128&&(c&192)===128&&(m=(a&15)<<18|(l&63)<<12|(d&63)<<6|c&63,m>65535&&m<1114112&&(i=m))}}i===null?(i=65533,p=1):i>65535&&(i-=65536,o.push(i>>>10&1023|55296),i=56320|i&1023),o.push(i),f+=p}return bt(o)}function bt(t){var r=t.length;if(r<=mr)return String.fromCharCode.apply(String,t);for(var e="",o=0;o<r;)e+=String.fromCharCode.apply(String,t.slice(o,o+=mr));return e}function It(t,r,e){var o="";e=Math.min(t.length,e);for(var f=r;f<e;++f)o+=String.fromCharCode(t[f]&127);return o}function St(t,r,e){var o="";e=Math.min(t.length,e);for(var f=r;f<e;++f)o+=String.fromCharCode(t[f]);return o}function Ut(t,r,e){var o=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>o)&&(e=o);for(var f="",a=r;a<e;++a)f+=Mt(t[a]);return f}function Bt(t,r,e){for(var o=t.slice(r,e),f="",a=0;a<o.length;a+=2)f+=String.fromCharCode(o[a]+o[a+1]*256);return f}function w(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function y(t,r,e,o,f,a){if(!A(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>f||r<a)throw new RangeError('"value" argument is out of bounds');if(e+o>t.length)throw new RangeError("Index out of range")}function G(t,r,e,o){r<0&&(r=65535+r+1);for(var f=0,a=Math.min(t.length-e,2);f<a;++f)t[e+f]=(r&255<<8*(o?f:1-f))>>>(o?f:1-f)*8}function V(t,r,e,o){r<0&&(r=4294967295+r+1);for(var f=0,a=Math.min(t.length-e,4);f<a;++f)t[e+f]=r>>>(o?f:3-f)*8&255}function Er(t,r,e,o,f,a){if(e+o>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function vr(t,r,e,o,f){return f||Er(t,r,e,4,34028234663852886e22,-34028234663852886e22),Ir(t,r,e,o,23,4),e+4}function Ar(t,r,e,o,f){return f||Er(t,r,e,8,17976931348623157e292,-17976931348623157e292),Ir(t,r,e,o,52,8),e+8}function Ct(t){if(t=Nt(t).replace(_t,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Nt(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Mt(t){return t<16?"0"+t.toString(16):t.toString(16)}function z(t,r){r=r||1/0;for(var e,o=t.length,f=null,a=[],i=0;i<o;++i){if(e=t.charCodeAt(i),e>55295&&e<57344){if(!f){if(e>56319){(r-=3)>-1&&a.push(239,191,189);continue}else if(i+1===o){(r-=3)>-1&&a.push(239,191,189);continue}f=e;continue}if(e<56320){(r-=3)>-1&&a.push(239,191,189),f=e;continue}e=(f-55296<<10|e-56320)+65536}else f&&(r-=3)>-1&&a.push(239,191,189);if(f=null,e<128){if((r-=1)<0)break;a.push(e)}else if(e<2048){if((r-=2)<0)break;a.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;a.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;a.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return a}function Ot(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function kt(t,r){for(var e,o,f,a=[],i=0;i<t.length&&!((r-=2)<0);++i)e=t.charCodeAt(i),o=e>>8,f=e%256,a.push(f),a.push(o);return a}function Rr(t){return lt(Ct(t))}function Z(t,r,e,o){for(var f=0;f<o&&!(f+e>=r.length||f>=t.length);++f)r[f+e]=t[f];return f}function Pt(t){return t!==t}function Dt(t){return t!=null&&(!!t._isBuffer||br(t)||Lt(t))}function br(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Lt(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&br(t.slice(0,0))}function J(t,r,e,o,f){var a,i,p=f*8-o-1,l=(1<<p)-1,d=l>>1,c=-7,m=e?f-1:0,E=e?-1:1,g=t[r+m];for(m+=E,a=g&(1<<-c)-1,g>>=-c,c+=p;c>0;a=a*256+t[r+m],m+=E,c-=8);for(i=a&(1<<-c)-1,a>>=-c,c+=o;c>0;i=i*256+t[r+m],m+=E,c-=8);if(a===0)a=1-d;else{if(a===l)return i?NaN:(g?-1:1)*(1/0);i=i+Math.pow(2,o),a=a-d}return(g?-1:1)*i*Math.pow(2,a-o)}function Ir(t,r,e,o,f,a){var i,p,l,d=a*8-f-1,c=(1<<d)-1,m=c>>1,E=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=o?0:a-1,M=o?1:-1,Be=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(p=isNaN(r)?1:0,i=c):(i=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-i))<1&&(i--,l*=2),i+m>=1?r+=E/l:r+=E*Math.pow(2,1-m),r*l>=2&&(i++,l/=2),i+m>=c?(p=0,i=c):i+m>=1?(p=(r*l-1)*Math.pow(2,f),i=i+m):(p=r*Math.pow(2,m-1)*Math.pow(2,f),i=0));f>=8;t[e+g]=p&255,g+=M,p/=256,f-=8);for(i=i<<f|p,d+=f;d>0;t[e+g]=i&255,g+=M,i/=256,d-=8);t[e+g-M]|=Be*128}var v,T,pt,Q,mr,_t,Sr=H(()=>{"use strict";u();s();v=[],T=[],pt=typeof Uint8Array!="undefined"?Uint8Array:Array,Q=!1;n.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;n.poolSize=8192;n._augment=function(t){return t.__proto__=n.prototype,t};n.from=function(t,r,e){return cr(null,t,r,e)};n.kMaxLength=j();n.TYPED_ARRAY_SUPPORT&&(n.prototype.__proto__=Uint8Array.prototype,n.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&n[Symbol.species]);n.alloc=function(t,r,e){return dt(null,t,r,e)};n.allocUnsafe=function(t){return X(null,t)};n.allocUnsafeSlow=function(t){return X(null,t)};n.isBuffer=Dt;n.compare=function(r,e){if(!A(r)||!A(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var o=r.length,f=e.length,a=0,i=Math.min(o,f);a<i;++a)if(r[a]!==e[a]){o=r[a],f=e[a];break}return o<f?-1:f<o?1:0};n.isEncoding=function(r){switch(String(r).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}};n.concat=function(r,e){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return n.alloc(0);var o;if(e===void 0)for(e=0,o=0;o<r.length;++o)e+=r[o].length;var f=n.allocUnsafe(e),a=0;for(o=0;o<r.length;++o){var i=r[o];if(!A(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(f,a),a+=i.length}return f};n.byteLength=wr;n.prototype._isBuffer=!0;n.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)N(this,e,e+1);return this};n.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)N(this,e,e+3),N(this,e+1,e+2);return this};n.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)N(this,e,e+7),N(this,e+1,e+6),N(this,e+2,e+5),N(this,e+3,e+4);return this};n.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?Tr(this,0,r):yt.apply(this,arguments)};n.prototype.equals=function(r){if(!A(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:n.compare(this,r)===0};n.prototype.compare=function(r,e,o,f,a){if(!A(r))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),o===void 0&&(o=r?r.length:0),f===void 0&&(f=0),a===void 0&&(a=this.length),e<0||o>r.length||f<0||a>this.length)throw new RangeError("out of range index");if(f>=a&&e>=o)return 0;if(f>=a)return-1;if(e>=o)return 1;if(e>>>=0,o>>>=0,f>>>=0,a>>>=0,this===r)return 0;for(var i=a-f,p=o-e,l=Math.min(i,p),d=this.slice(f,a),c=r.slice(e,o),m=0;m<l;++m)if(d[m]!==c[m]){i=d[m],p=c[m];break}return i<p?-1:p<i?1:0};n.prototype.includes=function(r,e,o){return this.indexOf(r,e,o)!==-1};n.prototype.indexOf=function(r,e,o){return yr(this,r,e,o,!0)};n.prototype.lastIndexOf=function(r,e,o){return yr(this,r,e,o,!1)};n.prototype.write=function(r,e,o,f){if(e===void 0)f="utf8",o=this.length,e=0;else if(o===void 0&&typeof e=="string")f=e,o=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(o)?(o=o|0,f===void 0&&(f="utf8")):(f=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a=this.length-e;if((o===void 0||o>a)&&(o=a),r.length>0&&(o<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");f||(f="utf8");for(var i=!1;;)switch(f){case"hex":return gt(this,r,e,o);case"utf8":case"utf-8":return Tt(this,r,e,o);case"ascii":return gr(this,r,e,o);case"latin1":case"binary":return Et(this,r,e,o);case"base64":return vt(this,r,e,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return At(this,r,e,o);default:if(i)throw new TypeError("Unknown encoding: "+f);f=(""+f).toLowerCase(),i=!0}};n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};mr=4096;n.prototype.slice=function(r,e){var o=this.length;r=~~r,e=e===void 0?o:~~e,r<0?(r+=o,r<0&&(r=0)):r>o&&(r=o),e<0?(e+=o,e<0&&(e=0)):e>o&&(e=o),e<r&&(e=r);var f;if(n.TYPED_ARRAY_SUPPORT)f=this.subarray(r,e),f.__proto__=n.prototype;else{var a=e-r;f=new n(a,void 0);for(var i=0;i<a;++i)f[i]=this[i+r]}return f};n.prototype.readUIntLE=function(r,e,o){r=r|0,e=e|0,o||w(r,e,this.length);for(var f=this[r],a=1,i=0;++i<e&&(a*=256);)f+=this[r+i]*a;return f};n.prototype.readUIntBE=function(r,e,o){r=r|0,e=e|0,o||w(r,e,this.length);for(var f=this[r+--e],a=1;e>0&&(a*=256);)f+=this[r+--e]*a;return f};n.prototype.readUInt8=function(r,e){return e||w(r,1,this.length),this[r]};n.prototype.readUInt16LE=function(r,e){return e||w(r,2,this.length),this[r]|this[r+1]<<8};n.prototype.readUInt16BE=function(r,e){return e||w(r,2,this.length),this[r]<<8|this[r+1]};n.prototype.readUInt32LE=function(r,e){return e||w(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};n.prototype.readUInt32BE=function(r,e){return e||w(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};n.prototype.readIntLE=function(r,e,o){r=r|0,e=e|0,o||w(r,e,this.length);for(var f=this[r],a=1,i=0;++i<e&&(a*=256);)f+=this[r+i]*a;return a*=128,f>=a&&(f-=Math.pow(2,8*e)),f};n.prototype.readIntBE=function(r,e,o){r=r|0,e=e|0,o||w(r,e,this.length);for(var f=e,a=1,i=this[r+--f];f>0&&(a*=256);)i+=this[r+--f]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*e)),i};n.prototype.readInt8=function(r,e){return e||w(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};n.prototype.readInt16LE=function(r,e){e||w(r,2,this.length);var o=this[r]|this[r+1]<<8;return o&32768?o|4294901760:o};n.prototype.readInt16BE=function(r,e){e||w(r,2,this.length);var o=this[r+1]|this[r]<<8;return o&32768?o|4294901760:o};n.prototype.readInt32LE=function(r,e){return e||w(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};n.prototype.readInt32BE=function(r,e){return e||w(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};n.prototype.readFloatLE=function(r,e){return e||w(r,4,this.length),J(this,r,!0,23,4)};n.prototype.readFloatBE=function(r,e){return e||w(r,4,this.length),J(this,r,!1,23,4)};n.prototype.readDoubleLE=function(r,e){return e||w(r,8,this.length),J(this,r,!0,52,8)};n.prototype.readDoubleBE=function(r,e){return e||w(r,8,this.length),J(this,r,!1,52,8)};n.prototype.writeUIntLE=function(r,e,o,f){if(r=+r,e=e|0,o=o|0,!f){var a=Math.pow(2,8*o)-1;y(this,r,e,o,a,0)}var i=1,p=0;for(this[e]=r&255;++p<o&&(i*=256);)this[e+p]=r/i&255;return e+o};n.prototype.writeUIntBE=function(r,e,o,f){if(r=+r,e=e|0,o=o|0,!f){var a=Math.pow(2,8*o)-1;y(this,r,e,o,a,0)}var i=o-1,p=1;for(this[e+i]=r&255;--i>=0&&(p*=256);)this[e+i]=r/p&255;return e+o};n.prototype.writeUInt8=function(r,e,o){return r=+r,e=e|0,o||y(this,r,e,1,255,0),n.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=r&255,e+1};n.prototype.writeUInt16LE=function(r,e,o){return r=+r,e=e|0,o||y(this,r,e,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):G(this,r,e,!0),e+2};n.prototype.writeUInt16BE=function(r,e,o){return r=+r,e=e|0,o||y(this,r,e,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):G(this,r,e,!1),e+2};n.prototype.writeUInt32LE=function(r,e,o){return r=+r,e=e|0,o||y(this,r,e,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255):V(this,r,e,!0),e+4};n.prototype.writeUInt32BE=function(r,e,o){return r=+r,e=e|0,o||y(this,r,e,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):V(this,r,e,!1),e+4};n.prototype.writeIntLE=function(r,e,o,f){if(r=+r,e=e|0,!f){var a=Math.pow(2,8*o-1);y(this,r,e,o,a-1,-a)}var i=0,p=1,l=0;for(this[e]=r&255;++i<o&&(p*=256);)r<0&&l===0&&this[e+i-1]!==0&&(l=1),this[e+i]=(r/p>>0)-l&255;return e+o};n.prototype.writeIntBE=function(r,e,o,f){if(r=+r,e=e|0,!f){var a=Math.pow(2,8*o-1);y(this,r,e,o,a-1,-a)}var i=o-1,p=1,l=0;for(this[e+i]=r&255;--i>=0&&(p*=256);)r<0&&l===0&&this[e+i+1]!==0&&(l=1),this[e+i]=(r/p>>0)-l&255;return e+o};n.prototype.writeInt8=function(r,e,o){return r=+r,e=e|0,o||y(this,r,e,1,127,-128),n.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[e]=r&255,e+1};n.prototype.writeInt16LE=function(r,e,o){return r=+r,e=e|0,o||y(this,r,e,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):G(this,r,e,!0),e+2};n.prototype.writeInt16BE=function(r,e,o){return r=+r,e=e|0,o||y(this,r,e,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):G(this,r,e,!1),e+2};n.prototype.writeInt32LE=function(r,e,o){return r=+r,e=e|0,o||y(this,r,e,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):V(this,r,e,!0),e+4};n.prototype.writeInt32BE=function(r,e,o){return r=+r,e=e|0,o||y(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),n.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):V(this,r,e,!1),e+4};n.prototype.writeFloatLE=function(r,e,o){return vr(this,r,e,!0,o)};n.prototype.writeFloatBE=function(r,e,o){return vr(this,r,e,!1,o)};n.prototype.writeDoubleLE=function(r,e,o){return Ar(this,r,e,!0,o)};n.prototype.writeDoubleBE=function(r,e,o){return Ar(this,r,e,!1,o)};n.prototype.copy=function(r,e,o,f){if(o||(o=0),!f&&f!==0&&(f=this.length),e>=r.length&&(e=r.length),e||(e=0),f>0&&f<o&&(f=o),f===o||r.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("sourceStart out of bounds");if(f<0)throw new RangeError("sourceEnd out of bounds");f>this.length&&(f=this.length),r.length-e<f-o&&(f=r.length-e+o);var a=f-o,i;if(this===r&&o<e&&e<f)for(i=a-1;i>=0;--i)r[i+e]=this[i+o];else if(a<1e3||!n.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)r[i+e]=this[i+o];else Uint8Array.prototype.set.call(r,this.subarray(o,o+a),e);return a};n.prototype.fill=function(r,e,o,f){if(typeof r=="string"){if(typeof e=="string"?(f=e,e=0,o=this.length):typeof o=="string"&&(f=o,o=this.length),r.length===1){var a=r.charCodeAt(0);a<256&&(r=a)}if(f!==void 0&&typeof f!="string")throw new TypeError("encoding must be a string");if(typeof f=="string"&&!n.isEncoding(f))throw new TypeError("Unknown encoding: "+f)}else typeof r=="number"&&(r=r&255);if(e<0||this.length<e||this.length<o)throw new RangeError("Out of range index");if(o<=e)return this;e=e>>>0,o=o===void 0?this.length:o>>>0,r||(r=0);var i;if(typeof r=="number")for(i=e;i<o;++i)this[i]=r;else{var p=A(r)?r:z(new n(r,f).toString()),l=p.length;for(i=0;i<o-e;++i)this[i+e]=p[i%l]}return this};_t=/[^+\/0-9A-Za-z-_]/g});var s=H(()=>{"use strict";Sr()});var If={};Oe(If,{DynamicTypeMapper:()=>or});module.exports=Pe(If);u();s();u();s();u();s();function D(t){throw new Error("Unexpected value: "+JSON.stringify(t))}u();s();u();s();u();s();u();s();u();s();u();s();var Yt=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,Ur=Yt;var Wt=typeof self=="object"&&self&&self.Object===Object&&self,Ft=Ur||Wt||Function("return this")(),Br=Ft;var jt=Br.Symbol,I=jt;u();s();var _r=Object.prototype,zt=_r.hasOwnProperty,Gt=_r.toString,L=I?I.toStringTag:void 0;function Vt(t){var r=zt.call(t,L),e=t[L];try{t[L]=void 0;var o=!0}catch(a){}var f=Gt.call(t);return o&&(r?t[L]=e:delete t[L]),f}var Cr=Vt;u();s();var Zt=Object.prototype,Jt=Zt.toString;function qt(t){return Jt.call(t)}var Nr=qt;var Ht="[object Null]",Kt="[object Undefined]",Mr=I?I.toStringTag:void 0;function Qt(t){return t==null?t===void 0?Kt:Ht:Mr&&Mr in Object(t)?Cr(t):Nr(t)}var Or=Qt;u();s();function Xt(t){return t!=null&&typeof t=="object"}var kr=Xt;var $t="[object Symbol]";function ro(t){return typeof t=="symbol"||kr(t)&&Or(t)==$t}var Pr=ro;u();s();u();s();function eo(t,r){for(var e=-1,o=t==null?0:t.length,f=Array(o);++e<o;)f[e]=r(t[e],e,t);return f}var Dr=eo;u();s();var to=Array.isArray,Lr=to;var oo=1/0,Yr=I?I.prototype:void 0,Wr=Yr?Yr.toString:void 0;function Fr(t){if(typeof t=="string")return t;if(Lr(t))return Dr(t,Fr)+"";if(Pr(t))return Wr?Wr.call(t):"";var r=t+"";return r=="0"&&1/t==-oo?"-0":r}var jr=Fr;u();s();function fo(t){return t==null?"":jr(t)}var B=fo;u();s();u();s();u();s();u();s();u();s();u();s();function ao(t,r,e){var o=-1,f=t.length;r<0&&(r=-r>f?0:f+r),e=e>f?f:e,e<0&&(e+=f),f=r>e?0:e-r>>>0,r>>>=0;for(var a=Array(f);++o<f;)a[o]=t[o+r];return a}var zr=ao;function no(t,r,e){var o=t.length;return e=e===void 0?o:e,!r&&e>=o?t:zr(t,r,e)}var Gr=no;u();s();var io="\\ud800-\\udfff",uo="\\u0300-\\u036f",so="\\ufe20-\\ufe2f",po="\\u20d0-\\u20ff",lo=uo+so+po,xo="\\ufe0e\\ufe0f",mo="\\u200d",co=RegExp("["+mo+io+lo+xo+"]");function ho(t){return co.test(t)}var q=ho;u();s();u();s();function wo(t){return t.split("")}var Vr=wo;u();s();var Zr="\\ud800-\\udfff",yo="\\u0300-\\u036f",go="\\ufe20-\\ufe2f",To="\\u20d0-\\u20ff",Eo=yo+go+To,vo="\\ufe0e\\ufe0f",Ao="["+Zr+"]",rr="["+Eo+"]",er="\\ud83c[\\udffb-\\udfff]",Ro="(?:"+rr+"|"+er+")",Jr="[^"+Zr+"]",qr="(?:\\ud83c[\\udde6-\\uddff]){2}",Hr="[\\ud800-\\udbff][\\udc00-\\udfff]",bo="\\u200d",Kr=Ro+"?",Qr="["+vo+"]?",Io="(?:"+bo+"(?:"+[Jr,qr,Hr].join("|")+")"+Qr+Kr+")*",So=Qr+Kr+Io,Uo="(?:"+[Jr+rr+"?",rr,qr,Hr,Ao].join("|")+")",Bo=RegExp(er+"(?="+er+")|"+Uo+So,"g");function _o(t){return t.match(Bo)||[]}var Xr=_o;function Co(t){return q(t)?Xr(t):Vr(t)}var $r=Co;function No(t){return function(r){r=B(r);var e=q(r)?$r(r):void 0,o=e?e[0]:r.charAt(0),f=e?Gr(e,1).join(""):r.slice(1);return o[t]()+f}}var re=No;var Mo=re("toUpperCase"),Y=Mo;function Oo(t){return Y(B(t).toLowerCase())}var ee=Oo;u();s();u();s();function ko(t,r,e,o){var f=-1,a=t==null?0:t.length;for(o&&a&&(e=t[++f]);++f<a;)e=r(e,t[f],f,t);return e}var te=ko;u();s();u();s();u();s();function Po(t){return function(r){return t==null?void 0:t[r]}}var oe=Po;var Do={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Lo=oe(Do),fe=Lo;var Yo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wo="\\u0300-\\u036f",Fo="\\ufe20-\\ufe2f",jo="\\u20d0-\\u20ff",zo=Wo+Fo+jo,Go="["+zo+"]",Vo=RegExp(Go,"g");function Zo(t){return t=B(t),t&&t.replace(Yo,fe).replace(Vo,"")}var ae=Zo;u();s();u();s();var Jo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function qo(t){return t.match(Jo)||[]}var ne=qo;u();s();var Ho=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Ko(t){return Ho.test(t)}var ie=Ko;u();s();var xe="\\ud800-\\udfff",Qo="\\u0300-\\u036f",Xo="\\ufe20-\\ufe2f",$o="\\u20d0-\\u20ff",rf=Qo+Xo+$o,me="\\u2700-\\u27bf",de="a-z\\xdf-\\xf6\\xf8-\\xff",ef="\\xac\\xb1\\xd7\\xf7",tf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",of="\\u2000-\\u206f",ff=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ce="A-Z\\xc0-\\xd6\\xd8-\\xde",af="\\ufe0e\\ufe0f",he=ef+tf+of+ff,we="['\u2019]",ue="["+he+"]",nf="["+rf+"]",ye="\\d+",uf="["+me+"]",ge="["+de+"]",Te="[^"+xe+he+ye+me+de+ce+"]",sf="\\ud83c[\\udffb-\\udfff]",pf="(?:"+nf+"|"+sf+")",lf="[^"+xe+"]",Ee="(?:\\ud83c[\\udde6-\\uddff]){2}",ve="[\\ud800-\\udbff][\\udc00-\\udfff]",P="["+ce+"]",xf="\\u200d",se="(?:"+ge+"|"+Te+")",mf="(?:"+P+"|"+Te+")",pe="(?:"+we+"(?:d|ll|m|re|s|t|ve))?",le="(?:"+we+"(?:D|LL|M|RE|S|T|VE))?",Ae=pf+"?",Re="["+af+"]?",df="(?:"+xf+"(?:"+[lf,Ee,ve].join("|")+")"+Re+Ae+")*",cf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",hf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",wf=Re+Ae+df,yf="(?:"+[uf,Ee,ve].join("|")+")"+wf,gf=RegExp([P+"?"+ge+"+"+pe+"(?="+[ue,P,"$"].join("|")+")",mf+"+"+le+"(?="+[ue,P+se,"$"].join("|")+")",P+"?"+se+"+"+pe,P+"+"+le,hf,cf,ye,yf].join("|"),"g");function Tf(t){return t.match(gf)||[]}var be=Tf;function Ef(t,r,e){return t=B(t),r=e?void 0:r,r===void 0?ie(t)?be(t):ne(t):t.match(r)||[]}var Ie=Ef;var vf="['\u2019]",Af=RegExp(vf,"g");function Rf(t){return function(r){return te(Ie(ae(r).replace(Af,"")),t,"")}}var Se=Rf;var bf=Se(function(t,r,e){return r=r.toLowerCase(),t+(e?ee(r):r)}),tr=bf;var h=require("@fern-api/swift-codegen");u();s();function Ue(t){return Y(tr(t))}var or=class{constructor({context:r}){fr(this,"context");this.context=r}convert(r){switch(r.typeReference.type){case"list":return h.swift.Type.array(this.convert({typeReference:r.typeReference.value}));case"literal":return this.convertLiteral({literal:r.typeReference.value});case"map":return h.swift.Type.dictionary(this.convert({typeReference:r.typeReference.key}),this.convert({typeReference:r.typeReference.value}));case"named":{let e=this.context.resolveNamedType({typeId:r.typeReference.value});return e==null?this.convertUnknown():this.convertNamed({named:e})}case"optional":return h.swift.Type.optional(this.convert({typeReference:r.typeReference.value}));case"nullable":return h.swift.Type.nullable(this.convert({typeReference:r.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:r.typeReference.value});case"set":return h.swift.Type.jsonValue();case"unknown":return this.convertUnknown();default:D(r.typeReference)}}convertNamed({named:r}){switch(r.type){case"alias":return this.convert({typeReference:r.typeReference});case"enum":case"discriminatedUnion":case"object":case"undiscriminatedUnion":return h.swift.Type.custom(r.declaration.name.pascalCase.unsafeName);default:D(r)}}convertLiteral({literal:r}){switch(r.type){case"boolean":return h.swift.Type.bool();case"string":return h.swift.Type.custom(Ue(r.value))}}convertUnknown(){return h.swift.Type.jsonValue()}convertPrimitive({primitive:r}){switch(r){case"INTEGER":return h.swift.Type.int();case"UINT":return h.swift.Type.int();case"LONG":return h.swift.Type.int64();case"UINT_64":return h.swift.Type.uint64();case"FLOAT":return h.swift.Type.float();case"DOUBLE":return h.swift.Type.double();case"BOOLEAN":return h.swift.Type.bool();case"STRING":return h.swift.Type.string();case"DATE":return h.swift.Type.date();case"DATE_TIME":return h.swift.Type.date();case"UUID":return h.swift.Type.uuid();case"BASE_64":return h.swift.Type.string();case"BIG_INTEGER":return h.swift.Type.string();default:D(r)}}};0&&(module.exports={DynamicTypeMapper});
|
|
1
|
+
"use strict";var ye=Object.defineProperty;var Lr=Object.getOwnPropertyDescriptor;var Ar=Object.getOwnPropertyNames,Ze=Object.getOwnPropertySymbols;var He=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable;var Ye=(r,t,e)=>t in r?ye(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,v=(r,t)=>{for(var e in t||(t={}))He.call(t,e)&&Ye(r,e,t[e]);if(Ze)for(var e of Ze(t))Rr.call(t,e)&&Ye(r,e,t[e]);return r};var _e=(r,t)=>()=>(r&&(t=r(r=0)),t);var Qe=(r,t)=>{for(var e in t)ye(r,e,{get:t[e],enumerable:!0})},kr=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ar(t))!He.call(r,i)&&i!==e&&ye(r,i,{get:()=>t[i],enumerable:!(n=Lr(t,i))||n.enumerable});return r};var Br=r=>kr(ye({},"__esModule",{value:!0}),r);var f=(r,t,e)=>Ye(r,typeof t!="symbol"?t+"":t,e);function et(){throw new Error("setTimeout has not been defined")}function tt(){throw new Error("clearTimeout has not been defined")}function rt(r){if(Y===setTimeout)return setTimeout(r,0);if((Y===et||!Y)&&setTimeout)return Y=setTimeout,setTimeout(r,0);try{return Y(r,0)}catch(t){try{return Y.call(null,r,0)}catch(e){return Y.call(this,r,0)}}}function Cr(r){if(_===clearTimeout)return clearTimeout(r);if((_===tt||!_)&&clearTimeout)return _=clearTimeout,clearTimeout(r);try{return _(r)}catch(t){try{return _.call(null,r)}catch(e){return _.call(this,r)}}}function Ur(){!Z||!j||(Z=!1,j.length?P=j.concat(P):we=-1,P.length&&nt())}function nt(){if(!Z){var r=rt(Ur);Z=!0;for(var t=P.length;t;){for(j=P,P=[];++we<t;)j&&j[we].run();we=-1,t=P.length}j=null,Z=!1,Cr(r)}}function Mr(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];P.push(new it(r,t)),P.length===1&&!Z&&rt(nt)}function it(r,t){this.fun=r,this.array=t}function z(){}function Hr(r){throw new Error("process.binding is not supported")}function Qr(){return"/"}function Xr(r){throw new Error("process.chdir is not supported")}function en(){return 0}function rn(r){var t=tn.call(J)*.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 an(){var r=new Date,t=r-nn;return t/1e3}var Y,_,P,Z,j,we,Or,Dr,Pr,Fr,Wr,Yr,_r,$r,jr,zr,Vr,qr,Gr,Kr,Jr,Zr,J,tn,nn,m,Xe,l=_e(()=>{"use strict";Y=et,_=tt;typeof globalThis.setTimeout=="function"&&(Y=setTimeout);typeof globalThis.clearTimeout=="function"&&(_=clearTimeout);P=[],Z=!1,we=-1;it.prototype.run=function(){this.fun.apply(null,this.array)};Or="browser",Dr="browser",Pr=!0,Fr={},Wr=[],Yr="",_r={},$r={},jr={};zr=z,Vr=z,qr=z,Gr=z,Kr=z,Jr=z,Zr=z;J=globalThis.performance||{},tn=J.now||J.mozNow||J.msNow||J.oNow||J.webkitNow||function(){return new Date().getTime()};nn=new Date;m={nextTick:Mr,title:Or,browser:Pr,env:Fr,argv:Wr,version:Yr,versions:_r,on:zr,addListener:Vr,once:qr,off:Gr,removeListener:Kr,removeAllListeners:Jr,emit:Zr,binding:Hr,cwd:Qr,chdir:Xr,umask:en,hrtime:rn,platform:Dr,release:$r,config:jr,uptime:an},Xe={};Object.keys(Xe).forEach(r=>{let t=r.split("."),e=m;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Xe[r]:e=e[i]||(e[i]={})}})});function lt(){je=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)M[t]=r[t],A[r.charCodeAt(t)]=t;A[45]=62,A[95]=63}function sn(r){je||lt();var t,e,n,i,a,o,p=r.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=r[p-2]==="="?2:r[p-1]==="="?1:0,o=new on(p*3/4-a),n=a>0?p-4:p;var c=0;for(t=0,e=0;t<n;t+=4,e+=3)i=A[r.charCodeAt(t)]<<18|A[r.charCodeAt(t+1)]<<12|A[r.charCodeAt(t+2)]<<6|A[r.charCodeAt(t+3)],o[c++]=i>>16&255,o[c++]=i>>8&255,o[c++]=i&255;return a===2?(i=A[r.charCodeAt(t)]<<2|A[r.charCodeAt(t+1)]>>4,o[c++]=i&255):a===1&&(i=A[r.charCodeAt(t)]<<10|A[r.charCodeAt(t+1)]<<4|A[r.charCodeAt(t+2)]>>2,o[c++]=i>>8&255,o[c++]=i&255),o}function ln(r){return M[r>>18&63]+M[r>>12&63]+M[r>>6&63]+M[r&63]}function un(r,t,e){for(var n,i=[],a=t;a<e;a+=3)n=(r[a]<<16)+(r[a+1]<<8)+r[a+2],i.push(ln(n));return i.join("")}function at(r){je||lt();for(var t,e=r.length,n=e%3,i="",a=[],o=16383,p=0,c=e-n;p<c;p+=o)a.push(un(r,p,p+o>c?c:p+o));return n===1?(t=r[e-1],i+=M[t>>2],i+=M[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=M[t>>10],i+=M[t>>4&63],i+=M[t<<2&63],i+="="),a.push(i),a.join("")}function ge(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function F(r,t){if(ge()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=s.prototype):(r===null&&(r=new s(t)),r.length=t),r}function s(r,t,e){if(!s.TYPED_ARRAY_SUPPORT&&!(this instanceof s))return new s(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 ze(this,r)}return ut(this,r,t,e)}function ut(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?cn(r,t,e,n):typeof t=="string"?pn(r,t,e):mn(r,t)}function ft(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 fn(r,t,e,n){return ft(t),t<=0?F(r,t):e!==void 0?typeof n=="string"?F(r,t).fill(e,n):F(r,t).fill(e):F(r,t)}function ze(r,t){if(ft(t),r=F(r,t<0?0:Ve(t)|0),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function pn(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=pt(t,e)|0;r=F(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function $e(r,t){var e=t.length<0?0:Ve(t.length)|0;r=F(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function cn(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),s.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=s.prototype):r=$e(r,t),r}function mn(r,t){if(O(t)){var e=Ve(t.length)|0;return r=F(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"||Cn(t.length)?F(r,0):$e(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return $e(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Ve(r){if(r>=ge())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ge().toString(16)+" bytes");return r|0}function O(r){return!!(r!=null&&r._isBuffer)}function pt(r,t){if(O(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 be(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return wt(r).length;default:if(n)return be(r).length;t=(""+t).toLowerCase(),n=!0}}function dn(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 En(this,t,e);case"utf8":case"utf-8":return dt(this,t,e);case"ascii":return vn(this,t,e);case"latin1":case"binary":return Sn(this,t,e);case"base64":return bn(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nn(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function V(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function ct(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=s.from(t,n)),O(t))return t.length===0?-1:ot(r,t,e,n,i);if(typeof t=="number")return t=t&255,s.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):ot(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function ot(r,t,e,n,i){var a=1,o=r.length,p=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;a=2,o/=2,p/=2,e/=2}function c(L,K){return a===1?L[K]:L.readUInt16BE(K*a)}var d;if(i){var x=-1;for(d=e;d<o;d++)if(c(r,d)===c(t,x===-1?0:d-x)){if(x===-1&&(x=d),d-x+1===p)return x*a}else x!==-1&&(d-=d-x),x=-1}else for(e+p>o&&(e=o-p),d=e;d>=0;d--){for(var w=!0,k=0;k<p;k++)if(c(r,d+k)!==c(t,k)){w=!1;break}if(w)return d}return-1}function hn(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var p=parseInt(t.substr(o*2,2),16);if(isNaN(p))return o;r[e+o]=p}return o}function xn(r,t,e,n){return Se(be(t,r.length-e),r,e,n)}function mt(r,t,e,n){return Se(kn(t),r,e,n)}function yn(r,t,e,n){return mt(r,t,e,n)}function wn(r,t,e,n){return Se(wt(t),r,e,n)}function gn(r,t,e,n){return Se(Bn(t,r.length-e),r,e,n)}function bn(r,t,e){return t===0&&e===r.length?at(r):at(r.slice(t,e))}function dt(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var a=r[i],o=null,p=a>239?4:a>223?3:a>191?2:1;if(i+p<=e){var c,d,x,w;switch(p){case 1:a<128&&(o=a);break;case 2:c=r[i+1],(c&192)===128&&(w=(a&31)<<6|c&63,w>127&&(o=w));break;case 3:c=r[i+1],d=r[i+2],(c&192)===128&&(d&192)===128&&(w=(a&15)<<12|(c&63)<<6|d&63,w>2047&&(w<55296||w>57343)&&(o=w));break;case 4:c=r[i+1],d=r[i+2],x=r[i+3],(c&192)===128&&(d&192)===128&&(x&192)===128&&(w=(a&15)<<18|(c&63)<<12|(d&63)<<6|x&63,w>65535&&w<1114112&&(o=w))}}o===null?(o=65533,p=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=p}return Tn(n)}function Tn(r){var t=r.length;if(t<=st)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=st));return e}function vn(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function Sn(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function En(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",a=t;a<e;++a)i+=Rn(r[a]);return i}function Nn(r,t,e){for(var n=r.slice(t,e),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}function S(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function N(r,t,e,n,i,a){if(!O(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function Te(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(r.length-e,2);i<a;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function ve(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(r.length-e,4);i<a;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function ht(r,t,e,n,i,a){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function xt(r,t,e,n,i){return i||ht(r,t,e,4,34028234663852886e22,-34028234663852886e22),bt(r,t,e,n,23,4),e+4}function yt(r,t,e,n,i){return i||ht(r,t,e,8,17976931348623157e292,-17976931348623157e292),bt(r,t,e,n,52,8),e+8}function Ln(r){if(r=An(r).replace(In,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function An(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function Rn(r){return r<16?"0"+r.toString(16):r.toString(16)}function be(r,t){t=t||1/0;for(var e,n=r.length,i=null,a=[],o=0;o<n;++o){if(e=r.charCodeAt(o),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&a.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;a.push(e)}else if(e<2048){if((t-=2)<0)break;a.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;a.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;a.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return a}function kn(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Bn(r,t){for(var e,n,i,a=[],o=0;o<r.length&&!((t-=2)<0);++o)e=r.charCodeAt(o),n=e>>8,i=e%256,a.push(i),a.push(n);return a}function wt(r){return sn(Ln(r))}function Se(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function Cn(r){return r!==r}function Un(r){return r!=null&&(!!r._isBuffer||gt(r)||Mn(r))}function gt(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Mn(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&>(r.slice(0,0))}function Ee(r,t,e,n,i){var a,o,p=i*8-n-1,c=(1<<p)-1,d=c>>1,x=-7,w=e?i-1:0,k=e?-1:1,L=r[t+w];for(w+=k,a=L&(1<<-x)-1,L>>=-x,x+=p;x>0;a=a*256+r[t+w],w+=k,x-=8);for(o=a&(1<<-x)-1,a>>=-x,x+=n;x>0;o=o*256+r[t+w],w+=k,x-=8);if(a===0)a=1-d;else{if(a===c)return o?NaN:(L?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-d}return(L?-1:1)*o*Math.pow(2,a-n)}function bt(r,t,e,n,i,a){var o,p,c,d=a*8-i-1,x=(1<<d)-1,w=x>>1,k=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,L=n?0:a-1,K=n?1:-1,Ir=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,o=x):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+w>=1?t+=k/c:t+=k*Math.pow(2,1-w),t*c>=2&&(o++,c/=2),o+w>=x?(p=0,o=x):o+w>=1?(p=(t*c-1)*Math.pow(2,i),o=o+w):(p=t*Math.pow(2,w-1)*Math.pow(2,i),o=0));i>=8;r[e+L]=p&255,L+=K,p/=256,i-=8);for(o=o<<i|p,d+=i;d>0;r[e+L]=o&255,L+=K,o/=256,d-=8);r[e+L-K]|=Ir*128}var M,A,on,je,st,In,Tt=_e(()=>{"use strict";l();u();M=[],A=[],on=typeof Uint8Array!="undefined"?Uint8Array:Array,je=!1;s.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;s.poolSize=8192;s._augment=function(r){return r.__proto__=s.prototype,r};s.from=function(r,t,e){return ut(null,r,t,e)};s.kMaxLength=ge();s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&s[Symbol.species]);s.alloc=function(r,t,e){return fn(null,r,t,e)};s.allocUnsafe=function(r){return ze(null,r)};s.allocUnsafeSlow=function(r){return ze(null,r)};s.isBuffer=Un;s.compare=function(t,e){if(!O(t)||!O(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,a=0,o=Math.min(n,i);a<o;++a)if(t[a]!==e[a]){n=t[a],i=e[a];break}return n<i?-1:i<n?1:0};s.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}};s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return s.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=s.allocUnsafe(e),a=0;for(n=0;n<t.length;++n){var o=t[n];if(!O(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};s.byteLength=pt;s.prototype._isBuffer=!0;s.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)V(this,e,e+1);return this};s.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)V(this,e,e+3),V(this,e+1,e+2);return this};s.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)V(this,e,e+7),V(this,e+1,e+6),V(this,e+2,e+5),V(this,e+3,e+4);return this};s.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?dt(this,0,t):dn.apply(this,arguments)};s.prototype.equals=function(t){if(!O(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:s.compare(this,t)===0};s.prototype.compare=function(t,e,n,i,a){if(!O(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),e<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&e>=n)return 0;if(i>=a)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;for(var o=a-i,p=n-e,c=Math.min(o,p),d=this.slice(i,a),x=t.slice(e,n),w=0;w<c;++w)if(d[w]!==x[w]){o=d[w],p=x[w];break}return o<p?-1:p<o?1:0};s.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};s.prototype.indexOf=function(t,e,n){return ct(this,t,e,n,!0)};s.prototype.lastIndexOf=function(t,e,n){return ct(this,t,e,n,!1)};s.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a=this.length-e;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<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 hn(this,t,e,n);case"utf8":case"utf-8":return xn(this,t,e,n);case"ascii":return mt(this,t,e,n);case"latin1":case"binary":return yn(this,t,e,n);case"base64":return wn(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gn(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};st=4096;s.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(s.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=s.prototype;else{var a=e-t;i=new s(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+t]}return i};s.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||S(t,e,this.length);for(var i=this[t],a=1,o=0;++o<e&&(a*=256);)i+=this[t+o]*a;return i};s.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||S(t,e,this.length);for(var i=this[t+--e],a=1;e>0&&(a*=256);)i+=this[t+--e]*a;return i};s.prototype.readUInt8=function(t,e){return e||S(t,1,this.length),this[t]};s.prototype.readUInt16LE=function(t,e){return e||S(t,2,this.length),this[t]|this[t+1]<<8};s.prototype.readUInt16BE=function(t,e){return e||S(t,2,this.length),this[t]<<8|this[t+1]};s.prototype.readUInt32LE=function(t,e){return e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};s.prototype.readUInt32BE=function(t,e){return e||S(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};s.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||S(t,e,this.length);for(var i=this[t],a=1,o=0;++o<e&&(a*=256);)i+=this[t+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*e)),i};s.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||S(t,e,this.length);for(var i=e,a=1,o=this[t+--i];i>0&&(a*=256);)o+=this[t+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*e)),o};s.prototype.readInt8=function(t,e){return e||S(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};s.prototype.readInt16LE=function(t,e){e||S(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};s.prototype.readInt16BE=function(t,e){e||S(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};s.prototype.readInt32LE=function(t,e){return e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};s.prototype.readInt32BE=function(t,e){return e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};s.prototype.readFloatLE=function(t,e){return e||S(t,4,this.length),Ee(this,t,!0,23,4)};s.prototype.readFloatBE=function(t,e){return e||S(t,4,this.length),Ee(this,t,!1,23,4)};s.prototype.readDoubleLE=function(t,e){return e||S(t,8,this.length),Ee(this,t,!0,52,8)};s.prototype.readDoubleBE=function(t,e){return e||S(t,8,this.length),Ee(this,t,!1,52,8)};s.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;N(this,t,e,n,a,0)}var o=1,p=0;for(this[e]=t&255;++p<n&&(o*=256);)this[e+p]=t/o&255;return e+n};s.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;N(this,t,e,n,a,0)}var o=n-1,p=1;for(this[e+o]=t&255;--o>=0&&(p*=256);)this[e+o]=t/p&255;return e+n};s.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Te(this,t,e,!0),e+2};s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Te(this,t,e,!1),e+2};s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,4,4294967295,0),s.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};s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,4,4294967295,0),s.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};s.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var a=Math.pow(2,8*n-1);N(this,t,e,n,a-1,-a)}var o=0,p=1,c=0;for(this[e]=t&255;++o<n&&(p*=256);)t<0&&c===0&&this[e+o-1]!==0&&(c=1),this[e+o]=(t/p>>0)-c&255;return e+n};s.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var a=Math.pow(2,8*n-1);N(this,t,e,n,a-1,-a)}var o=n-1,p=1,c=0;for(this[e+o]=t&255;--o>=0&&(p*=256);)t<0&&c===0&&this[e+o+1]!==0&&(c=1),this[e+o]=(t/p>>0)-c&255;return e+n};s.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};s.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Te(this,t,e,!0),e+2};s.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Te(this,t,e,!1),e+2};s.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,4,2147483647,-2147483648),s.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};s.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.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};s.prototype.writeFloatLE=function(t,e,n){return xt(this,t,e,!0,n)};s.prototype.writeFloatBE=function(t,e,n){return xt(this,t,e,!1,n)};s.prototype.writeDoubleLE=function(t,e,n){return yt(this,t,e,!0,n)};s.prototype.writeDoubleBE=function(t,e,n){return yt(this,t,e,!1,n)};s.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var a=i-n,o;if(this===t&&n<e&&e<i)for(o=a-1;o>=0;--o)t[o+e]=this[o+n];else if(a<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a};s.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var a=t.charCodeAt(0);a<256&&(t=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!s.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var o;if(typeof t=="number")for(o=e;o<n;++o)this[o]=t;else{var p=O(t)?t:be(new s(t,i).toString()),c=p.length;for(o=0;o<n-e;++o)this[o+e]=p[o%c]}return this};In=/[^+\/0-9A-Za-z-_]/g});var u=_e(()=>{"use strict";Tt()});var Fa={};Qe(Fa,{DynamicTypeMapper:()=>Je});module.exports=Br(Fa);l();u();l();u();l();u();function Ne(r,t){if(r===void 0)throw new Error(t!=null?t:"Expected value to be defined but got undefined.")}function R(r,t){if(r===null)throw new Error(t!=null?t:"Expected value to be non-null but got null.")}function b(r){throw new Error("Unexpected value: "+JSON.stringify(r))}l();u();l();u();l();u();l();u();l();u();l();u();var On=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,vt=On;var Dn=typeof self=="object"&&self&&self.Object===Object&&self,Pn=vt||Dn||Function("return this")(),St=Pn;var Fn=St.Symbol,W=Fn;l();u();var Et=Object.prototype,Wn=Et.hasOwnProperty,Yn=Et.toString,ce=W?W.toStringTag:void 0;function _n(r){var t=Wn.call(r,ce),e=r[ce];try{r[ce]=void 0;var n=!0}catch(a){}var i=Yn.call(r);return n&&(t?r[ce]=e:delete r[ce]),i}var Nt=_n;l();u();var $n=Object.prototype,jn=$n.toString;function zn(r){return jn.call(r)}var It=zn;var Vn="[object Null]",qn="[object Undefined]",Lt=W?W.toStringTag:void 0;function Gn(r){return r==null?r===void 0?qn:Vn:Lt&&Lt in Object(r)?Nt(r):It(r)}var At=Gn;l();u();function Kn(r){return r!=null&&typeof r=="object"}var Rt=Kn;var Jn="[object Symbol]";function Zn(r){return typeof r=="symbol"||Rt(r)&&At(r)==Jn}var kt=Zn;l();u();l();u();function Hn(r,t){for(var e=-1,n=r==null?0:r.length,i=Array(n);++e<n;)i[e]=t(r[e],e,r);return i}var Bt=Hn;l();u();var Qn=Array.isArray,Ct=Qn;var Xn=1/0,Ut=W?W.prototype:void 0,Mt=Ut?Ut.toString:void 0;function Ot(r){if(typeof r=="string")return r;if(Ct(r))return Bt(r,Ot)+"";if(kt(r))return Mt?Mt.call(r):"";var t=r+"";return t=="0"&&1/r==-Xn?"-0":t}var Dt=Ot;l();u();function ei(r){return r==null?"":Dt(r)}var $=ei;l();u();l();u();l();u();l();u();l();u();l();u();function ti(r,t,e){var n=-1,i=r.length;t<0&&(t=-t>i?0:i+t),e=e>i?i:e,e<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=r[n+t];return a}var Pt=ti;function ri(r,t,e){var n=r.length;return e=e===void 0?n:e,!t&&e>=n?r:Pt(r,t,e)}var Ft=ri;l();u();var ni="\\ud800-\\udfff",ii="\\u0300-\\u036f",ai="\\ufe20-\\ufe2f",oi="\\u20d0-\\u20ff",si=ii+ai+oi,li="\\ufe0e\\ufe0f",ui="\\u200d",fi=RegExp("["+ui+ni+si+li+"]");function pi(r){return fi.test(r)}var Ie=pi;l();u();l();u();function ci(r){return r.split("")}var Wt=ci;l();u();var Yt="\\ud800-\\udfff",mi="\\u0300-\\u036f",di="\\ufe20-\\ufe2f",hi="\\u20d0-\\u20ff",xi=mi+di+hi,yi="\\ufe0e\\ufe0f",wi="["+Yt+"]",qe="["+xi+"]",Ge="\\ud83c[\\udffb-\\udfff]",gi="(?:"+qe+"|"+Ge+")",_t="[^"+Yt+"]",$t="(?:\\ud83c[\\udde6-\\uddff]){2}",jt="[\\ud800-\\udbff][\\udc00-\\udfff]",bi="\\u200d",zt=gi+"?",Vt="["+yi+"]?",Ti="(?:"+bi+"(?:"+[_t,$t,jt].join("|")+")"+Vt+zt+")*",vi=Vt+zt+Ti,Si="(?:"+[_t+qe+"?",qe,$t,jt,wi].join("|")+")",Ei=RegExp(Ge+"(?="+Ge+")|"+Si+vi,"g");function Ni(r){return r.match(Ei)||[]}var qt=Ni;function Ii(r){return Ie(r)?qt(r):Wt(r)}var Gt=Ii;function Li(r){return function(t){t=$(t);var e=Ie(t)?Gt(t):void 0,n=e?e[0]:t.charAt(0),i=e?Ft(e,1).join(""):t.slice(1);return n[r]()+i}}var Le=Li;var Ai=Le("toUpperCase"),B=Ai;function Ri(r){return B($(r).toLowerCase())}var Kt=Ri;l();u();l();u();function ki(r,t,e,n){var i=-1,a=r==null?0:r.length;for(n&&a&&(e=r[++i]);++i<a;)e=t(e,r[i],i,r);return e}var Jt=ki;l();u();l();u();l();u();function Bi(r){return function(t){return r==null?void 0:r[t]}}var Zt=Bi;var Ci={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Ui=Zt(Ci),Ht=Ui;var Mi=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Oi="\\u0300-\\u036f",Di="\\ufe20-\\ufe2f",Pi="\\u20d0-\\u20ff",Fi=Oi+Di+Pi,Wi="["+Fi+"]",Yi=RegExp(Wi,"g");function _i(r){return r=$(r),r&&r.replace(Mi,Ht).replace(Yi,"")}var Qt=_i;l();u();l();u();var $i=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function ji(r){return r.match($i)||[]}var Xt=ji;l();u();var zi=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Vi(r){return zi.test(r)}var er=Vi;l();u();var ar="\\ud800-\\udfff",qi="\\u0300-\\u036f",Gi="\\ufe20-\\ufe2f",Ki="\\u20d0-\\u20ff",Ji=qi+Gi+Ki,or="\\u2700-\\u27bf",sr="a-z\\xdf-\\xf6\\xf8-\\xff",Zi="\\xac\\xb1\\xd7\\xf7",Hi="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Qi="\\u2000-\\u206f",Xi=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",lr="A-Z\\xc0-\\xd6\\xd8-\\xde",ea="\\ufe0e\\ufe0f",ur=Zi+Hi+Qi+Xi,fr="['\u2019]",tr="["+ur+"]",ta="["+Ji+"]",pr="\\d+",ra="["+or+"]",cr="["+sr+"]",mr="[^"+ar+ur+pr+or+sr+lr+"]",na="\\ud83c[\\udffb-\\udfff]",ia="(?:"+ta+"|"+na+")",aa="[^"+ar+"]",dr="(?:\\ud83c[\\udde6-\\uddff]){2}",hr="[\\ud800-\\udbff][\\udc00-\\udfff]",H="["+lr+"]",oa="\\u200d",rr="(?:"+cr+"|"+mr+")",sa="(?:"+H+"|"+mr+")",nr="(?:"+fr+"(?:d|ll|m|re|s|t|ve))?",ir="(?:"+fr+"(?:D|LL|M|RE|S|T|VE))?",xr=ia+"?",yr="["+ea+"]?",la="(?:"+oa+"(?:"+[aa,dr,hr].join("|")+")"+yr+xr+")*",ua="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fa="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pa=yr+xr+la,ca="(?:"+[ra,dr,hr].join("|")+")"+pa,ma=RegExp([H+"?"+cr+"+"+nr+"(?="+[tr,H,"$"].join("|")+")",sa+"+"+ir+"(?="+[tr,H+rr,"$"].join("|")+")",H+"?"+rr+"+"+nr,H+"+"+ir,fa,ua,pr,ca].join("|"),"g");function da(r){return r.match(ma)||[]}var wr=da;function ha(r,t,e){return r=$(r),t=e?void 0:t,t===void 0?er(r)?wr(r):Xt(r):r.match(t)||[]}var gr=ha;var xa="['\u2019]",ya=RegExp(xa,"g");function wa(r){return function(t){return Jt(gr(Qt(t).replace(ya,"")),r,"")}}var br=wa;var ga=br(function(r,t,e){return t=t.toLowerCase(),r+(e?Kt(t):t)}),me=ga;l();u();var ba=Le("toLowerCase"),Ae=ba;l();u();function Ke(){}l();u();function Re(r){return Object.values(r)}l();u();var g={};Qe(g,{AccessLevel:()=>Tr,Class:()=>Q,CodeBlock:()=>E,Comment:()=>X,ComputedProperty:()=>te,DeclarationType:()=>he,DocComment:()=>re,EnumWithAssociatedValues:()=>ne,EnumWithRawValues:()=>ie,Expression:()=>D,Extension:()=>ae,FunctionArgument:()=>oe,FunctionParameter:()=>se,Initializer:()=>le,LineBreak:()=>Be,Method:()=>ue,Pattern:()=>Ce,Property:()=>fe,Protocol:()=>Er,Statement:()=>ee,Struct:()=>pe,Symbol:()=>T,SymbolRegistry:()=>We,Type:()=>Me,TypeReference:()=>Oe,class_:()=>Ea,codeBlock:()=>Na,comment:()=>Ia,computedProperty:()=>La,docComment:()=>Aa,enumWithAssociatedValues:()=>Ra,enumWithRawValues:()=>ka,extension:()=>Ba,functionArgument:()=>Ca,functionParameter:()=>Ua,initializer:()=>Ma,method:()=>Oa,property:()=>Da,struct:()=>Pa});l();u();l();u();l();u();var Tr={Open:"open",Public:"public",Package:"package",Internal:"internal",Fileprivate:"fileprivate",Private:"private"};l();u();l();u();l();u();l();u();l();u();var q=class{};l();u();l();u();var C=class extends q{constructor(e){super();f(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 Ta=4,vr=!!m.env.FERN_STACK_TRACK;vr&&(Error.stackTraceLimit=50);var de=class{constructor(){f(this,"buffer","");f(this,"indentLevel",0);f(this,"hasWrittenAnything",!1);f(this,"lastCharacterIsSemicolon",!1);f(this,"lastCharacterIsNewline",!1)}write(...t){for(let e of t)if(e!=null)if(typeof e=="string"){let n=e.length>0&&e.endsWith(`
|
|
2
|
+
`),i=n?e.substring(0,e.length-1):e,a=this.getIndentString(),o=i.replaceAll(`
|
|
3
|
+
`,`
|
|
4
|
+
${a}`);this.isAtStartOfLine()&&(o=a+o),n&&(o+=`
|
|
5
|
+
`),this.writeInternal(o)}else this.writeNode(e)}writeStatement(...t){this.write(...t),this.write(";"),this.writeNewLineIfLastLineNot()}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 C(t).write(this),t.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new C(t).write(this),this.write(" (",e,")"),this.pushScope()}controlFlowWithoutStatement(t){new C(t).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new C(t).write(this),this.write(" (",e,")"),this.pushScope()}alternativeControlFlow(t){this.dedent(),this.write("} "),new C(t).write(this),this.pushScope()}pushScope(){this.writeLine("{"),this.indent()}popScope(t=!0){this.dedent(),this.writeNewLineIfLastLineNot(),t?this.writeLine("}"):this.write("}")}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 i=t[0];i!=null&&n(i);for(let a=1;a<t.length;a++){this.write(e);let o=t[a];o!=null&&n(o)}}}toString(){return this.buffer}writeInternal(t){if(t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
|
|
8
|
+
`),this.lastCharacterIsSemicolon=t.endsWith(";")),this.buffer+=t,vr&&this.buffer.endsWith(`
|
|
9
|
+
`)&&!this.buffer.endsWith(`"""
|
|
10
|
+
`)){let e=this.stacktrace(15).map(n=>`${n.fn} - ${n.path}:${n.position}`).join(" ");e&&(this.buffer=this.buffer.slice(0,-1),this.buffer+=`//@@ ${e}
|
|
11
|
+
`)}return this.buffer}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return Ta}stacktrace(t=50){var n;let e=!1;return((n=new Error().stack)!=null?n:"").split(`
|
|
12
|
+
`).map(i=>{var o;let a=i.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(a&&a.length===5){let[,p,c,d,x]=a;if(e||p!=null&&p.includes("runInteractiveTask")){e=!0;return}switch(p){case"Object.<anonymous>":p="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":p=`${p.substring(p.indexOf(".")+1)}()=> { ... }`;break}return{fn:p,path:(o=c==null?void 0:c.replace(/^.*?fern.*?\//,""))!=null?o:"",position:`${d}:${x}`}}}).filter(i=>{var a,o,p,c,d,x,w;return i&&!((a=i.path)!=null&&a.startsWith("node:"))&&!((o=i.path)!=null&&o.endsWith(".js"))&&!((p=i.path)!=null&&p.includes("AbstractWriter"))&&!((c=i.fn)!=null&&c.includes("stacktrace"))&&!((d=i.fn)!=null&&d.includes("stackLine"))&&!((x=i.fn)!=null&&x.includes("SdkGeneratorCLI"))&&!((w=i.fn)!=null&&w.includes("runCli"))}).slice(0,t)}};l();u();var ke=class extends de{toString(){return this.buffer}};var y=class extends q{toString(){let t=new ke;return this.write(t),t.toString()}};var Q=class extends y{constructor({accessLevel:e,name:n,final:i,conformances:a,properties:o,initializers:p,methods:c,docs:d}){super();f(this,"name");f(this,"final");f(this,"accessLevel");f(this,"conformances");f(this,"properties");f(this,"initializers");f(this,"methods");f(this,"docs");this.name=n,this.final=i,this.accessLevel=e,this.conformances=a!=null?a:[],this.properties=o,this.initializers=p!=null?p:[],this.methods=c!=null?c:[],this.docs=d}write(e){this.docs!=null&&this.docs.write(e),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),this.final&&e.write("final "),e.write(`class ${this.name}`),this.conformances.forEach((n,i)=>{i===0?e.write(": "):i>0&&e.write(", "),e.write(n)}),e.write(" {"),e.newLine(),e.indent(),this.properties.forEach(n=>{n.write(e),e.newLine()}),this.initializers.length>0&&(e.newLine(),this.initializers.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()})),this.methods.length>0&&(e.newLine(),this.methods.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()})),e.dedent(),e.write("}")}};l();u();var E=class r extends y{constructor(e){super();f(this,"args");this.args=e}write(e){let n=new C(this.args);e.write("{"),e.newLine(),e.indent(),n.write(e),e.dedent(),e.write("}")}static empty(){return new r(Ke)}static withStatements(e){return new r(n=>{e.forEach(i=>{i.write(n)})})}};l();u();var X=class extends y{constructor({content:e}){super();f(this,"content");this.content=e}write(e){this.content.split(`
|
|
13
|
+
`).forEach(i=>{e.write(`// ${i}`),e.newLine()})}};l();u();l();u();function Sr(r){return r.replace(/\\u([0-9a-fA-F]{4})/g,"\\u{$1}").replace(new RegExp("(?<!\\\\)\\\\f","g"),"\\u{000C}").replace(new RegExp("(?<!\\\\)\\\\v","g"),"\\u{000B}").replace(new RegExp("(?<!\\\\)\\\\0","g"),"\\u{0000}").replace(new RegExp('(?<!\\\\)"',"g"),'\\"')}l();u();var va=["Any","as","associatedtype","break","case","catch","class","continue","default","defer","deinit","do","else","fallthrough","false","for","guard","enum","extension","fileprivate","func","if","import","in","init","inout","internal","is","let","nil","operator","private","precedencegroup","Protocol","protocol","public","repeat","rethrows","return","Self","self","static","struct","subscript","super","switch","throw","throws","true","try","Type","typealias","var","where","while"],Sa=new Set(va);function G(r){return Sa.has(r)}function I(r){return G(r)?`\`${r}\``:r}l();u();var D=class extends y{constructor(e){super();f(this,"internalExpression");this.internalExpression=e}isNop(){return this.internalExpression.type==="nop"}isStructInitialization(){return this.internalExpression.type==="struct-initialization"}asStructInitializationOrThrow(){if(this.internalExpression.type!=="struct-initialization")throw new Error("Internal error; swift.Expression is not a struct initialization");return this.internalExpression}write(e){switch(this.internalExpression.type){case"reference":e.write(I(this.internalExpression.unsafeName));break;case"member-access":this.internalExpression.target.write(e),this.internalExpression.optionalChain&&e.write("?"),e.write("."),e.write(this.internalExpression.memberName);break;case"equals":this.internalExpression.left.write(e),e.write(" == "),this.internalExpression.right.write(e);break;case"enum-case-shorthand":e.write("."),e.write(this.internalExpression.caseName);break;case"function-call":this.writeCallableExpression({writer:e,target:I(this.internalExpression.unsafeName),arguments_:this.internalExpression.arguments_,multiline:!!this.internalExpression.multiline});break;case"struct-initialization":this.writeCallableExpression({writer:e,target:I(this.internalExpression.unsafeName),arguments_:this.internalExpression.arguments_,multiline:!!this.internalExpression.multiline});break;case"class-initialization":this.writeCallableExpression({writer:e,target:I(this.internalExpression.unsafeName),arguments_:this.internalExpression.arguments_,multiline:!!this.internalExpression.multiline});break;case"method-call":this.internalExpression.target.write(e),e.write("."),this.writeCallableExpression({writer:e,target:this.internalExpression.methodName,arguments_:this.internalExpression.arguments_,multiline:!!this.internalExpression.multiline});break;case"method-call-with-trailing-closure":this.internalExpression.target.write(e),e.write("."),e.write(this.internalExpression.methodName),e.write(" {"),this.internalExpression.multiline?(e.newLine(),e.indent()):e.write(" "),this.internalExpression.closureBody.write(e),this.internalExpression.multiline?(e.newLine(),e.dedent()):e.write(" "),e.write("}");break;case"contextual-method-call":e.write("."),this.writeCallableExpression({writer:e,target:this.internalExpression.methodName,arguments_:this.internalExpression.arguments_,multiline:!!this.internalExpression.multiline});break;case"try":e.write("try "),this.internalExpression.expression.write(e);break;case"optional-try":e.write("try? "),this.internalExpression.expression.write(e);break;case"force-try":e.write("try! "),this.internalExpression.expression.write(e);break;case"await":e.write("await "),this.internalExpression.expression.write(e);break;case"string-literal":e.write(`"${this.internalExpression.value}"`);break;case"number-literal":e.write(this.internalExpression.value.toString());break;case"bool-literal":e.write(this.internalExpression.value?"true":"false");break;case"date-literal":e.write(`try! Date("${this.internalExpression.isoString}", strategy: .iso8601)`);break;case"calendar-date-literal":e.write(`CalendarDate("${this.internalExpression.isoString}")!`);break;case"uuid-literal":e.write(`UUID(uuidString: "${this.internalExpression.value}")!`);break;case"dictionary-literal":this.writeDictionaryLiteral(e,this.internalExpression);break;case"array-literal":this.writeArrayLiteral(e,this.internalExpression);break;case"data-literal":e.write(`Data("${this.internalExpression.value}".utf8)`);break;case"raw-value":e.write(this.internalExpression.value);break;case"nop":break;default:b(this.internalExpression)}}writeCallableExpression({writer:e,target:n,arguments_:i,multiline:a}){e.write(n),e.write("("),a&&(e.newLine(),e.indent()),i==null||i.forEach((o,p)=>{p>0&&(e.write(","),a?e.newLine():e.write(" ")),o.write(e)}),a&&(e.newLine(),e.dedent()),e.write(")")}writeDictionaryLiteral(e,n){var a;if(!n.entries||n.entries.length===0){e.write("[:]");return}e.write("[");let i=!!n.multiline;i&&(e.newLine(),e.indent()),(a=n.entries)==null||a.forEach(([o,p],c)=>{c>0&&(e.write(", "),i&&e.newLine()),o.write(e),e.write(": "),p.write(e)}),i&&(e.newLine(),e.dedent()),e.write("]")}writeArrayLiteral(e,n){var a;if(!n.elements||n.elements.length===0){e.write("[]");return}e.write("[");let i=!!n.multiline;i&&(e.newLine(),e.indent()),(a=n.elements)==null||a.forEach((o,p)=>{p>0&&(e.write(","),i?e.newLine():e.write(" ")),o.write(e)}),i&&(e.newLine(),e.dedent()),e.write("]")}static reference(e){return new this({type:"reference",unsafeName:e})}static memberAccess(e){return new this(v({type:"member-access"},e))}static equals(e,n){return new this({type:"equals",left:e,right:n})}static enumCaseShorthand(e){return new this({type:"enum-case-shorthand",caseName:e})}static functionCall(e){return new this(v({type:"function-call"},e))}static structInitialization(e){return new this(v({type:"struct-initialization"},e))}static classInitialization(e){return new this(v({type:"class-initialization"},e))}static stringLiteral(e){return new this({type:"string-literal",value:e})}static numberLiteral(e){return new this({type:"number-literal",value:e})}static boolLiteral(e){return new this({type:"bool-literal",value:e})}static dateLiteral(e){return new this({type:"date-literal",isoString:e})}static calendarDateLiteral(e){return new this({type:"calendar-date-literal",isoString:e})}static uuidLiteral(e){return new this({type:"uuid-literal",value:e})}static dictionaryLiteral(e){return new this(v({type:"dictionary-literal"},e))}static arrayLiteral(e){return new this(v({type:"array-literal"},e))}static dataLiteral(e){return new this({type:"data-literal",value:e})}static methodCall(e){return new this(v({type:"method-call"},e))}static methodCallWithTrailingClosure(e){return new this(v({type:"method-call-with-trailing-closure"},e))}static contextualMethodCall(e){return new this(v({type:"contextual-method-call"},e))}static try(e){return new this({type:"try",expression:e})}static optionalTry(e){return new this({type:"optional-try",expression:e})}static forceTry(e){return new this({type:"force-try",expression:e})}static await(e){return new this({type:"await",expression:e})}static rawValue(e){return new this({type:"raw-value",value:e})}static nop(){return new this({type:"nop"})}static nil(){return new this({type:"raw-value",value:"nil"})}static self(){return new this({type:"raw-value",value:"self"})}};l();u();l();u();var he={Var:"var",Let:"let"};var ee=class extends y{constructor(e){super();f(this,"internalStatement");this.internalStatement=e}write(e){var n,i,a;switch(this.internalStatement.type){case"typealias-declaration":this.internalStatement.docs!=null&&this.internalStatement.docs.write(e),this.internalStatement.accessLevel&&(e.write(this.internalStatement.accessLevel),e.write(" ")),e.write("typealias "),e.write(this.internalStatement.unsafeName),e.write(" = "),this.internalStatement.aliasedType.write(e),e.newLine();break;case"constant-declaration":e.write(he.Let),e.write(" "),e.write(I(this.internalStatement.unsafeName)),e.write(" = "),this.internalStatement.value.write(e),this.internalStatement.noTrailingNewline||e.newLine();break;case"variable-declaration":e.write(he.Var),e.write(" "),e.write(I(this.internalStatement.unsafeName)),e.write(" = "),this.internalStatement.value.write(e),this.internalStatement.noTrailingNewline||e.newLine();break;case"function-declaration":this.internalStatement.docs!=null&&this.internalStatement.docs.write(e),this.internalStatement.accessLevel!=null&&(e.write(this.internalStatement.accessLevel),e.write(" ")),e.write("func "),e.write(I(this.internalStatement.unsafeName)),e.write("("),(n=this.internalStatement.parameters)==null||n.forEach((o,p)=>{p>0&&e.write(", "),o.write(e)}),e.write(")"),this.internalStatement.async&&e.write(" async"),this.internalStatement.throws&&e.write(" throws"),this.internalStatement.returnType&&(e.write(" -> "),this.internalStatement.returnType.write(e)),e.write(" "),((i=this.internalStatement.body)!=null?i:E.empty()).write(e),e.newLine();break;case"variable-assignment":e.write(I(this.internalStatement.unsafeName)),e.write(" = "),this.internalStatement.value.write(e),e.newLine();break;case"self-assignment":e.write("self = "),e.write(this.internalStatement.value.toString()),e.newLine();break;case"property-assignment":e.write("self."),e.write(this.internalStatement.unsafeName),e.write(" = "),this.internalStatement.value.write(e),e.newLine();break;case"discard-assignment":e.write("_ = "),this.internalStatement.value.write(e),e.newLine();break;case"return":e.write("return "),this.internalStatement.expression.write(e),e.newLine();break;case"throw":e.write("throw "),this.internalStatement.expression.write(e),e.newLine();break;case"expression-statement":this.internalStatement.expression.write(e),e.newLine();break;case"import":e.write("import "),e.write(this.internalStatement.moduleName),e.newLine();break;case"switch":e.write("switch "),this.internalStatement.target.write(e),e.write(" {"),e.newLine();for(let o of this.internalStatement.cases)if(e.write("case "),o.pattern.write(e),e.write(":"),e.newLine(),o.body.length>0){e.indent();for(let p of o.body)p.write(e);e.dedent()}if(this.internalStatement.defaultCase&&(e.write("default:"),e.newLine(),this.internalStatement.defaultCase.length>0)){e.indent();for(let o of this.internalStatement.defaultCase)o.write(e);e.dedent()}e.write("}"),e.newLine();break;case"if":{e.write("if "),this.internalStatement.condition.write(e),e.write(" "),E.withStatements(this.internalStatement.body).write(e);for(let o of(a=this.internalStatement.elseIfs)!=null?a:[])e.write(" else if "),o.condition.write(e),e.write(" "),E.withStatements(o.body).write(e);this.internalStatement.else&&(e.write(" else "),E.withStatements(this.internalStatement.else).write(e)),e.newLine();break}case"raw":e.write(this.internalStatement.content),e.newLine();break;default:b(this.internalStatement)}}static typealiasDeclaration(e){return new this(v({type:"typealias-declaration"},e))}static constantDeclaration(e){return new this(v({type:"constant-declaration"},e))}static variableDeclaration(e){return new this(v({type:"variable-declaration"},e))}static functionDeclaration(e){return new this(v({type:"function-declaration"},e))}static variableAssignment(e,n){return new this({type:"variable-assignment",unsafeName:e,value:n})}static selfAssignment(e){return new this({type:"self-assignment",value:e})}static propertyAssignment(e,n){return new this({type:"property-assignment",unsafeName:e,value:n})}static discardAssignment(e){return new this({type:"discard-assignment",value:e})}static return(e){return new this({type:"return",expression:e})}static throw(e){return new this({type:"throw",expression:e})}static expressionStatement(e){return new this({type:"expression-statement",expression:e})}static import(e){return new this({type:"import",moduleName:e})}static switch(e){return new this(v({type:"switch"},e))}static if(e){return new this(v({type:"if"},e))}static raw(e){return new this({type:"raw",content:e})}};var te=class extends y{constructor({unsafeName:e,accessLevel:n,type:i,body:a,docs:o}){super();f(this,"unsafeName");f(this,"accessLevel");f(this,"type");f(this,"body");f(this,"docs");this.unsafeName=e,this.accessLevel=n,this.type=i,this.body=a,this.docs=o}write(e){this.docs!=null&&this.docs.write(e),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),e.write("var "),e.write(I(this.unsafeName)),e.write(": "),this.type.write(e),e.write(" "),this.body instanceof E?this.body.write(e):this.body instanceof D?E.withStatements([ee.expressionStatement(this.body)]).write(e):b(this.body)}};l();u();var re=class r extends y{constructor({summary:e,description:n,parameters:i,returns:a,throws:o}){super();f(this,"summary");f(this,"description");f(this,"parameters");f(this,"returns");f(this,"throws");this.summary=r.sanitizeText(e),this.description=n!=null?r.sanitizeText(n):void 0,this.parameters=(i!=null?i:[]).map(p=>({name:p.name,description:r.sanitizeText(p.description)})),this.returns=a!=null?r.sanitizeText(a):void 0,this.throws=(o!=null?o:[]).map(p=>r.sanitizeText(p))}write(e){if(this.writeMultilineText(e,this.summary),this.description!=null&&(e.write("///"),e.newLine(),this.writeMultilineText(e,this.description)),this.parameters.length>0){e.write("///"),e.newLine();for(let n of this.parameters)n.description.split(`
|
|
14
|
+
`).forEach((a,o)=>{o===0?(e.write("/// - Parameter "),e.write(n.name),e.write(": "),e.write(a)):(e.write("/// "),e.write(a)),e.newLine()})}if(this.returns!=null&&this.returns.split(`
|
|
15
|
+
`).forEach((i,a)=>{a===0?(e.write("/// - Returns: "),e.write(i)):(e.write("/// "),e.write(i)),e.newLine()}),this.throws.length>0)for(let n of this.throws)n.split(`
|
|
16
|
+
`).forEach((a,o)=>{o===0?(e.write("/// - Throws: "),e.write(a)):(e.write("/// "),e.write(a)),e.newLine()})}writeMultilineText(e,n){let i=n.split(`
|
|
17
|
+
`);for(let a of i)e.write("/// "),e.write(a),e.newLine()}static sanitizeText(e){return e=e.replace(/\r\n/g,`
|
|
18
|
+
`).replace(/\r/g,`
|
|
19
|
+
`),e=e.replace(/\x00/g,""),e}};l();u();var ne=class extends y{constructor({accessLevel:e,name:n,conformances:i,cases:a,initializers:o,methods:p,nestedTypes:c,docs:d}){super();f(this,"name");f(this,"accessLevel");f(this,"conformances");f(this,"cases");f(this,"initializers");f(this,"methods");f(this,"nestedTypes");f(this,"docs");this.name=n,this.accessLevel=e,this.conformances=i!=null?i:[],this.cases=a,this.initializers=o!=null?o:[],this.methods=p!=null?p:[],this.nestedTypes=c!=null?c:[],this.docs=d}write(e){this.docs!=null&&this.docs.write(e),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),e.write(`enum ${this.name}`),this.conformances.forEach((n,i)=>{i===0?e.write(": "):i>0&&e.write(", "),e.write(n)}),e.write(" {"),e.newLine(),e.indent(),this.cases.forEach(n=>{n.docs!=null&&n.docs.write(e),e.write("case "),G(n.unsafeName)?e.write(`\`${n.unsafeName}\``):e.write(n.unsafeName),e.write("("),n.associatedValue.forEach((i,a)=>{a>0&&e.write(", "),i.write(e)}),e.write(")"),e.newLine()}),this.initializers.length>0&&(e.newLine(),this.initializers.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()})),this.methods.length>0&&(e.newLine(),this.methods.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()})),this.nestedTypes.length>0&&(e.newLine(),this.nestedTypes.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()})),e.dedent(),e.write("}")}};l();u();var ie=class extends y{constructor({accessLevel:e,name:n,conformances:i,cases:a,docs:o}){super();f(this,"name");f(this,"accessLevel");f(this,"conformances");f(this,"cases");f(this,"docs");this.name=n,this.accessLevel=e,this.conformances=i!=null?i:[],this.cases=a,this.docs=o}write(e){if(this.docs!=null&&this.docs.write(e),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),e.write(`enum ${this.name}`),this.conformances.forEach((n,i)=>{i===0?e.write(": "):i>0&&e.write(", "),e.write(n)}),this.cases.length===0){e.write(" {}");return}e.write(" {"),e.newLine(),e.indent(),this.cases.forEach(n=>{n.docs!=null&&n.docs.write(e),e.write("case "),G(n.unsafeName)?e.write(`\`${n.unsafeName}\``):e.write(n.unsafeName),n.rawValue!==n.unsafeName&&(e.write(" = "),e.write(`"${Sr(n.rawValue)}"`)),e.newLine()}),e.dedent(),e.write("}")}};l();u();var ae=class extends y{constructor({name:e,conformances:n,initializers:i,computedProperties:a,methods:o,nestedTypes:p,docs:c}){super();f(this,"name");f(this,"conformances");f(this,"initializers");f(this,"computedProperties");f(this,"methods");f(this,"nestedTypes");f(this,"docs");this.name=e,this.conformances=n!=null?n:[],this.initializers=i!=null?i:[],this.computedProperties=a!=null?a:[],this.methods=o!=null?o:[],this.nestedTypes=p!=null?p:[],this.docs=c}write(e){this.docs!=null&&this.docs.write(e),e.write(`extension ${this.name}`),this.conformances.forEach((n,i)=>{i===0?e.write(": "):i>0&&e.write(", "),e.write(n)}),e.write(" {"),this.initializers.length>0&&(e.newLine(),e.indent(),this.initializers.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()}),e.dedent()),this.computedProperties.length>0&&(e.newLine(),e.indent(),this.computedProperties.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()}),e.dedent()),this.methods.length>0&&(e.newLine(),e.indent(),this.methods.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()}),e.dedent()),this.nestedTypes.length>0&&(e.newLine(),e.indent(),this.nestedTypes.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()}),e.dedent()),e.write("}")}};l();u();var oe=class extends y{constructor({label:e,value:n}){super();f(this,"label");f(this,"value");this.label=e,this.value=n}write(e){this.label!=null&&(e.write(this.label),e.write(": ")),this.value.write(e)}};l();u();var se=class extends y{constructor({argumentLabel:e,unsafeName:n,escaping:i,type:a,defaultValue:o,docsContent:p}){super();f(this,"argumentLabel");f(this,"unsafeName");f(this,"escaping");f(this,"type");f(this,"defaultValue");f(this,"docsContent");this.argumentLabel=e,this.unsafeName=n,this.escaping=i,this.type=a,this.defaultValue=o,this.docsContent=p}write(e){this.argumentLabel==null?e.write("_ "):this.argumentLabel!==this.unsafeName&&(e.write(this.argumentLabel),e.write(" ")),e.write(this.unsafeName),e.write(": "),this.escaping&&e.write("@escaping "),this.type.write(e),this.defaultValue!=null&&(e.write(" = "),this.defaultValue.write(e))}};l();u();var le=class extends y{constructor({accessLevel:e,convenience:n,failable:i,throws:a,parameters:o,body:p,multiline:c,docs:d}){super();f(this,"accessLevel");f(this,"convenience");f(this,"failable");f(this,"throws");f(this,"parameters");f(this,"body");f(this,"multiline");f(this,"docs");this.accessLevel=e,this.convenience=n,this.failable=i,this.throws=a,this.parameters=o!=null?o:[],this.body=p!=null?p:E.empty(),this.multiline=c,this.docs=d}write(e){this.docs!=null&&this.docs.write(e),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),this.convenience&&e.write("convenience "),e.write("init"),this.failable&&e.write("?"),e.write("("),this.multiline&&(e.newLine(),e.indent()),this.parameters.forEach((n,i)=>{i>0&&(e.write(","),this.multiline?e.newLine():e.write(" ")),n.write(e)}),this.multiline&&(e.newLine(),e.dedent()),e.write(") "),this.throws&&e.write("throws "),this.body.write(e)}};l();u();var Be=class r extends y{constructor({count:e=1}={}){super();f(this,"count");this.count=e}write(e){for(let n=0;n<this.count;n++)e.newLine()}static single(){return new r({count:1})}static double(){return new r({count:2})}static multiple(e){return new r({count:e})}};l();u();var ue=class extends y{constructor({attributes:e,unsafeName:n,accessLevel:i,static_:a,parameters:o,async:p,throws:c,returnType:d,body:x,docs:w}){super();f(this,"attributes");f(this,"unsafeName");f(this,"accessLevel");f(this,"static_");f(this,"parameters");f(this,"async");f(this,"throws");f(this,"returnType");f(this,"body");f(this,"docs");this.attributes=e!=null?e:[],this.unsafeName=n,this.accessLevel=i,this.static_=a,this.parameters=o!=null?o:[],this.async=p,this.throws=c,this.returnType=d,this.body=x!=null?x:E.empty(),this.docs=w}write(e){this.docs!=null&&this.docs.write(e),this.attributes.forEach(n=>{var i;(i=n.arguments)!=null&&i.length?D.functionCall({unsafeName:`@${n.name}`,arguments_:n.arguments}).write(e):(e.write("@"),e.write(n.name)),e.write(" ")}),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),this.static_&&e.write("static "),e.write("func "),e.write(I(this.unsafeName)),e.write("("),this.parameters.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write(")"),this.async&&e.write(" async"),this.throws&&e.write(" throws"),e.write(" -> "),this.returnType.write(e),e.write(" "),this.body.write(e)}};l();u();var Ce=class extends y{constructor(e){super();f(this,"internalPattern");this.internalPattern=e}write(e){switch(this.internalPattern.type){case"enum-case-value-binding":e.write("."),e.write(this.internalPattern.caseName),e.write("("),e.write(this.internalPattern.declarationType),e.write(" "),e.write(this.internalPattern.referenceName),e.write(")");break;default:b(this.internalPattern.type)}}static enumCaseValueBinding(e){return new this(v({type:"enum-case-value-binding"},e))}};l();u();var fe=class extends y{constructor({unsafeName:e,accessLevel:n,static_:i,declarationType:a,type:o,defaultValue:p,docs:c}){super();f(this,"unsafeName");f(this,"accessLevel");f(this,"static_");f(this,"declarationType");f(this,"type");f(this,"defaultValue");f(this,"docs");this.unsafeName=e,this.accessLevel=n,this.static_=i,this.declarationType=a,this.type=o,this.defaultValue=p,this.docs=c}write(e){this.docs!=null&&this.docs.write(e),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),this.static_&&e.write("static "),e.write(this.declarationType),e.write(" "),G(this.unsafeName)?e.write(`\`${this.unsafeName}\``):e.write(this.unsafeName),e.write(": "),this.type.write(e),this.defaultValue!=null&&(e.write(" = "),this.defaultValue.write(e))}};l();u();var Er={CaseIterable:"CaseIterable",Codable:"Codable",CodingKey:"CodingKey",Decodable:"Decodable",Encodable:"Encodable",Equatable:"Equatable",Error:"Error",Hashable:"Hashable",Sendable:"Sendable",MultipartFormDataConvertible:"MultipartFormDataConvertible"};l();u();var pe=class extends y{constructor({attributes:e,accessLevel:n,name:i,conformances:a,properties:o,initializers:p,methods:c,nestedTypes:d,docs:x}){super();f(this,"attributes");f(this,"name");f(this,"accessLevel");f(this,"conformances");f(this,"properties");f(this,"initializers");f(this,"methods");f(this,"nestedTypes");f(this,"docs");this.attributes=e!=null?e:[],this.name=i,this.accessLevel=n,this.conformances=a!=null?a:[],this.properties=o!=null?o:[],this.initializers=p!=null?p:[],this.methods=c!=null?c:[],this.nestedTypes=d!=null?d:[],this.docs=x}write(e){this.docs!=null&&this.docs.write(e),this.attributes.forEach(c=>{var d;(d=c.arguments)!=null&&d.length?D.functionCall({unsafeName:`@${c.name}`,arguments_:c.arguments}).write(e):(e.write("@"),e.write(c.name)),e.write(" ")}),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),e.write(`struct ${this.name}`),this.conformances.forEach((c,d)=>{d===0?e.write(": "):d>0&&e.write(", "),e.write(c)}),e.write(" {"),e.newLine(),e.indent();let n=this.properties.length>0,i=this.initializers.length>0,a=this.methods.length>0,o=this.nestedTypes.length>0;this.properties.forEach(c=>{c.write(e),e.newLine()});let p=n;i&&(p&&e.newLine(),this.initializers.forEach((c,d)=>{d>0&&e.newLine(),c.write(e),e.newLine()}),p=!0),a&&(p&&e.newLine(),this.methods.forEach((c,d)=>{d>0&&e.newLine(),c.write(e),e.newLine()}),p=!0),o&&(p&&e.newLine(),this.nestedTypes.forEach((c,d)=>{d>0&&e.newLine(),c.write(e),e.newLine()})),e.dedent(),e.write("}")}};l();u();var U={String:{type:"string",symbolName:"String"},Bool:{type:"bool",symbolName:"Bool"},Int:{type:"int",symbolName:"Int"},Int64:{type:"int64",symbolName:"Int64"},UInt:{type:"uint",symbolName:"UInt"},UInt64:{type:"uint64",symbolName:"UInt64"},Float:{type:"float",symbolName:"Float"},Double:{type:"double",symbolName:"Double"},Void:{type:"void",symbolName:"Void"},Any:{type:"any",symbolName:"Any"}},Ue={Data:{type:"data",symbolName:"Data"},Date:{type:"date",symbolName:"Date"},UUID:{type:"uuid",symbolName:"UUID"}},Me=class r extends y{constructor(e){super();f(this,"internalType");this.internalType=e}get type(){return this.internalType.type}get nonOptionalType(){return this.internalType.type==="optional"?this.internalType.valueType.nonOptionalType:this.internalType.type}get nonNullableType(){return this.internalType.type==="nullable"?this.internalType.valueType.nonNullableType:this.internalType.type}get isOptional(){return this.internalType.type==="optional"}get isNullable(){return this.internalType.type==="nullable"}get isOptionalNullable(){return this.isOptional&&this.nonOptional().isNullable}nonOptional(){return r.nonOptional(this)}nonNullable(){return r.nonNullable(this)}equals(e){switch(this.internalType.type){case"string":case"bool":case"int":case"int64":case"uint":case"uint64":case"float":case"double":case"void":case"any":case"data":case"date":case"uuid":case"json-value":return this.internalType.type===e.internalType.type;case"tuple":{if(e.internalType.type!=="tuple"||this.internalType.elements.length!==e.internalType.elements.length)return!1;for(let n=0;n<this.internalType.elements.length;n++){let i=this.internalType.elements[n],a=e.internalType.elements[n];if(!i||!a||!i.equals(a))return!1}return!0}case"array":return e.internalType.type==="array"&&this.internalType.elementType.equals(e.internalType.elementType);case"dictionary":return e.internalType.type==="dictionary"&&this.internalType.keyType.equals(e.internalType.keyType)&&this.internalType.valueType.equals(e.internalType.valueType);case"optional":return e.internalType.type=="optional"&&this.internalType.valueType.equals(e.internalType.valueType);case"nullable":return e.internalType.type==="nullable"&&this.internalType.valueType.equals(e.internalType.valueType);case"custom":return e.internalType.type==="custom"&&this.internalType.name===e.internalType.name;case"existential-any":return e.internalType.type==="existential-any"&&this.internalType.protocolName===e.internalType.protocolName;case"calendar-date":return e.internalType.type==="calendar-date";default:b(this.internalType)}}toCaseName(){return r.toCaseName(this)}static toCaseName(e){switch(e.internalType.type){case"string":return"string";case"bool":return"bool";case"int":return"int";case"int64":return"int64";case"uint":return"uint";case"uint64":return"uint64";case"float":return"float";case"double":return"double";case"void":return"void";case"any":return"any";case"data":return"data";case"date":return"date";case"uuid":return"uuid";case"tuple":{let n=e.internalType.elements.map(i=>r.toCaseName(i)).join("And");return`tuple${B(n)}`}case"array":return`${Ae(r.toCaseName(e.internalType.elementType))}Array`;case"dictionary":{let n=Ae(r.toCaseName(e.internalType.keyType)),i=B(r.toCaseName(e.internalType.valueType));return`${n}To${i}Dictionary`}case"optional":return`optional${B(r.toCaseName(e.internalType.valueType))}`;case"nullable":return`nullable${B(r.toCaseName(e.internalType.valueType))}`;case"custom":return me(e.internalType.name);case"existential-any":return`any${B(e.internalType.protocolName)}`;case"calendar-date":return"calendarDate";case"json-value":return"json";default:b(e.internalType)}}write(e){switch(this.internalType.type){case"string":e.write("String");break;case"bool":e.write("Bool");break;case"int":e.write("Int");break;case"int64":e.write("Int64");break;case"uint":e.write("UInt");break;case"uint64":e.write("UInt64");break;case"float":e.write("Float");break;case"double":e.write("Double");break;case"void":e.write("Void");break;case"any":e.write("Any");break;case"data":e.write("Data");break;case"date":e.write("Date");break;case"uuid":e.write("UUID");break;case"tuple":e.write("("),this.internalType.elements.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write(")");break;case"array":e.write("["),this.internalType.elementType.write(e),e.write("]");break;case"dictionary":e.write("["),this.internalType.keyType.write(e),e.write(": "),this.internalType.valueType.write(e),e.write("]");break;case"optional":this.internalType.valueType.write(e),e.write("?");break;case"nullable":e.write("Nullable<"),this.internalType.valueType.write(e),e.write(">");break;case"custom":e.write(this.internalType.name);break;case"existential-any":e.write("any "),e.write(this.internalType.protocolName);break;case"calendar-date":e.write("CalendarDate");break;case"json-value":e.write("JSONValue");break;default:b(this.internalType)}}static primitiveSymbolNames(){return Re(U).map(e=>e.symbolName)}static foundationSymbolNames(){return Re(Ue).map(e=>e.symbolName)}static string(){return new this(U.String)}static bool(){return new this(U.Bool)}static int(){return new this(U.Int)}static uint(){return new this(U.UInt)}static uint64(){return new this(U.UInt64)}static int64(){return new this(U.Int64)}static float(){return new this(U.Float)}static double(){return new this(U.Double)}static void(){return new this(U.Void)}static any(){return new this(U.Any)}static data(){return new this(Ue.Data)}static date(){return new this(Ue.Date)}static uuid(){return new this(Ue.UUID)}static tuple(e){return new this({type:"tuple",elements:e})}static array(e){return new this({type:"array",elementType:e})}static dictionary(e,n){return new this({type:"dictionary",keyType:e,valueType:n})}static optional(e){return e.internalType.type==="optional"?e:new this({type:"optional",valueType:e})}static nullable(e){return new this({type:"nullable",valueType:e})}static nonOptional(e){return e.internalType.type==="optional"?r.nonOptional(e.internalType.valueType):e}static nonNullable(e){return e.internalType.type==="nullable"?r.nonNullable(e.internalType.valueType):e}static custom(e){return new this({type:"custom",name:e})}static existentialAny(e){return new this({type:"existential-any",protocolName:e})}static calendarDate(){return new this({type:"calendar-date"})}static jsonValue(){return new this({type:"json-value"})}};l();u();var Oe=class r extends y{constructor(e){super();f(this,"variant");this.variant=e}nonOptional(){return r.nonOptional(this)}nonNullable(){return r.nonNullable(this)}getReferenceIfSymbolType(){return this.variant.type==="symbol"?this.variant.symbol:null}write(e){let{variant:n}=this;switch(n.type){case"symbol":e.write(n.symbol);break;case"generic":{n.reference.write(e),n.arguments.length>0&&(e.write("<"),n.arguments.forEach((i,a)=>{i.write(e),a<n.arguments.length-1&&e.write(", ")}),e.write(">"));break}case"tuple":e.write("("),n.elements.forEach((i,a)=>{a>0&&e.write(", "),i.write(e)}),e.write(")");break;case"array":e.write("["),n.elementType.write(e),e.write("]");break;case"dictionary":e.write("["),n.keyType.write(e),e.write(": "),n.valueType.write(e),e.write("]");break;case"optional":n.valueType.write(e),e.write("?");break;case"nullable":e.write("Nullable<"),n.valueType.write(e),e.write(">");break;case"member-access":n.target.write(e),e.write("."),e.write(n.memberName);break;default:b(n)}}equals(e){switch(this.variant.type){case"symbol":return e.variant.type==="symbol"&&this.variant.symbol===e.variant.symbol;case"generic":return e.variant.type==="generic"&&this.variant.reference.equals(e.variant.reference)&&this.variant.arguments.every((n,i)=>e.variant.type==="generic"&&e.variant.arguments[i]&&n.equals(e.variant.arguments[i]));case"tuple":return e.variant.type==="tuple"&&this.variant.elements.every((n,i)=>e.variant.type==="tuple"&&e.variant.elements[i]&&n.equals(e.variant.elements[i]));case"array":return e.variant.type==="array"&&this.variant.elementType.equals(e.variant.elementType);case"dictionary":return e.variant.type==="dictionary"&&this.variant.keyType.equals(e.variant.keyType)&&this.variant.valueType.equals(e.variant.valueType);case"optional":return e.variant.type=="optional"&&this.variant.valueType.equals(e.variant.valueType);case"nullable":return e.variant.type==="nullable"&&this.variant.valueType.equals(e.variant.valueType);case"member-access":return e.variant.type==="member-access"&&this.variant.target.equals(e.variant.target)&&this.variant.memberName===e.variant.memberName;default:b(this.variant)}}static symbol(e){return new this({type:"symbol",symbol:e})}static generic(e,n){return new this({type:"generic",reference:e,arguments:n})}static tuple(e){return new this({type:"tuple",elements:e})}static array(e){return new this({type:"array",elementType:e})}static dictionary(e,n){return new this({type:"dictionary",keyType:e,valueType:n})}static optional(e){return e.variant.type==="optional"?e:new this({type:"optional",valueType:e})}static nullable(e){return e.variant.type==="nullable"?e:new this({type:"nullable",valueType:e})}static memberAccess(e,n){return new this({type:"member-access",target:e,memberName:n})}static nonOptional(e){return e.variant.type==="optional"?r.nonOptional(e.variant.valueType):e}static nonNullable(e){return e.variant.type==="nullable"?r.nonNullable(e.variant.valueType):e}static unqualifiedToSwiftType(e){return r.symbol(e)}static unqualifiedToFoundationType(e){return r.symbol(e)}};l();u();l();u();var h=class h{constructor(t,e,n){f(this,"id");f(this,"name");f(this,"shape");this.id=t,this.name=e,this.shape=n}static isSwiftSymbol(t){return h.SWIFT_SYMBOL_ID===t||t.startsWith(`${h.SWIFT_SYMBOL_ID}.`)}static isSwiftSymbolName(t){return t in h.swiftTypeSymbolsByName}static isFoundationSymbol(t){return h.FOUNDATION_SYMBOL_ID===t||t.startsWith(`${h.FOUNDATION_SYMBOL_ID}.`)}static isFoundationSymbolName(t){return t in h.foundationTypeSymbolsByName}static isCustomSymbol(t){return!h.isSwiftSymbol(t)&&!h.isFoundationSymbol(t)}static create(t,e,n){return new h(t,e,n)}static swiftType(t){return h.create(`${h.SWIFT_SYMBOL_ID}.${t}`,t,{type:"system"})}static foundationType(t){return h.create(`${h.FOUNDATION_SYMBOL_ID}.${t}`,t,{type:"system"})}get isSwiftSymbol(){return h.isSwiftSymbol(this.id)}get isFoundationSymbol(){return h.isFoundationSymbol(this.id)}get isCustomSymbol(){return h.isCustomSymbol(this.id)}};f(h,"SWIFT_SYMBOL_NAME","Swift"),f(h,"SWIFT_SYMBOL_ID",h.SWIFT_SYMBOL_NAME),f(h,"swiftTypeSymbolsByName",{String:h.swiftType("String"),Bool:h.swiftType("Bool"),Int:h.swiftType("Int"),Int64:h.swiftType("Int64"),UInt:h.swiftType("UInt"),UInt64:h.swiftType("UInt64"),Float:h.swiftType("Float"),Double:h.swiftType("Double"),Void:h.swiftType("Void"),Encoder:h.swiftType("Encoder"),Decoder:h.swiftType("Decoder"),Any:h.swiftType("Any")}),f(h,"swiftTypeSymbols",Object.values(h.swiftTypeSymbolsByName)),f(h,"FOUNDATION_SYMBOL_NAME","Foundation"),f(h,"FOUNDATION_SYMBOL_ID",h.FOUNDATION_SYMBOL_NAME),f(h,"foundationTypeSymbolsByName",{Data:h.foundationType("Data"),Date:h.foundationType("Date"),URLSession:h.foundationType("URLSession"),UUID:h.foundationType("UUID")}),f(h,"foundationTypeSymbols",Object.values(h.foundationTypeSymbolsByName));var T=h;l();u();l();u();l();u();l();u();var De=class{constructor(t,e){f(this,"id");f(this,"name");f(this,"childrenByName");this.id=t,this.name=e,this.childrenByName=new Map}get children(){return Array.from(this.childrenByName.values())}addChild(t){if(this.childrenByName.has(t.name))throw new Error(`A child with the name '${t.name}' already exists in module '${this.name}'.`);this.childrenByName.set(t.name,t)}getChildByName(t){return this.childrenByName.get(t)}},Pe=class extends De{constructor(e,n){super(e,n);f(this,"kind","module");f(this,"imports");f(this,"parent",null);this.imports=[]}addImport(e){this.imports.push(e)}get qualifiedPath(){return[this.name]}get qualifiedName(){return this.name}},Fe=class extends De{constructor(e,n,i){super(n,e);f(this,"kind","type");f(this,"shape");f(this,"parent");this.parent=null,this.shape=i}getNearestModuleAncestorOrThrow(){let e=this.parent;for(;e!==null&&e.kind!=="module";)e=e.parent;return R(e,`No module ancestor found for type symbol '${this.id}'`),e}get qualifiedPath(){var e,n;return[...(n=(e=this.parent)==null?void 0:e.qualifiedPath)!=null?n:[],this.name]}get qualifiedName(){return this.qualifiedPath.join(".")}};var xe=class{constructor(){f(this,"symbolsById",new Map)}createModuleSymbol({symbolId:t,symbolName:e}){this.validateSymbolNotExists(t);let n=new Pe(t,e);return this.symbolsById.set(t,n),n}createTypeSymbol({symbolId:t,symbolName:e,shape:n}){this.validateSymbolNotExists(t);let i=new Fe(e,t,n);return this.symbolsById.set(t,i),i}addImportRelation({clientSymbolId:t,importedSymbolId:e}){let n=this.getSymbolByIdOrThrow(t),i=this.getSymbolByIdOrThrow(e);if(n.kind!=="module"||i.kind!=="module")throw new Error(`Client module '${n.id}' and imported module '${i.id}' must both be module symbols.`);n.addImport(i)}nestSymbol({parentSymbolId:t,childSymbolId:e}){let n=this.getSymbolByIdOrThrow(t),i=this.getSymbolByIdOrThrow(e);n.addChild(i),i.parent=n}reference({fromSymbolId:t,targetSymbolId:e}){let n=this.getSymbolByIdOrThrow(t),i=this.getSymbolByIdOrThrow(e),a=i.qualifiedPath;for(let o=1;o<=a.length;o++){let p=a.slice(a.length-o),c=this.resolvePath(n,p);if((c==null?void 0:c.id)===i.id)return p.join(".")}return i.qualifiedName}resolveReference({fromSymbolId:t,reference:e}){let n=this.getSymbolByIdOrThrow(t),i=e.split(".").filter(a=>a.length>0);return this.resolvePath(n,i)}resolvePath(t,e){var p;let[n,...i]=e;if(n===void 0)return null;let a=this.resolveFirstSegment(t,n);if(a===null)return null;let o=a;for(let c=0;c<i.length;c++){let d=i[c];if(Ne(d),o=(p=o.getChildByName(d))!=null?p:null,o===null)return null}return o}resolveFirstSegment(t,e){let n=t;for(;n!==null;){let o=n.getChildByName(e);if(o)return o;n=n.parent}let i=t.kind==="module"?t:t.getNearestModuleAncestorOrThrow();if(i.name===e)return i;for(let o of i.imports)if(o.name===e)return o;let a=null;for(let o of i.imports){let p=o.getChildByName(e);if(p){if(a!=null&&a.id!==p.id)return null;a=p}}return a}getSymbolByIdOrThrow(t){let e=this.symbolsById.get(t);return Ne(e,`A symbol with the ID '${t}' was not found in the registry.`),e}getSymbolById(t){var e;return(e=this.symbolsById.get(t))!=null?e:null}validateSymbolNotExists(t){if(this.symbolsById.has(t))throw new Error(`A symbol with the ID '${t}' already exists in the registry.`)}};var We=class r{constructor(t,e,n){f(this,"graph");f(this,"swiftSymbol");f(this,"foundationSymbol");f(this,"registeredSourceModule");f(this,"registeredTestModule");this.graph=t,this.swiftSymbol=e,this.foundationSymbol=n,this.registeredSourceModule=null,this.registeredTestModule=null}static create(){let{graph:t,swiftSymbol:e,foundationSymbol:n}=r.createGraph();return new r(t,e,n)}static createGraph(){let t=new xe,e=()=>{let o=t.createModuleSymbol({symbolId:T.SWIFT_SYMBOL_ID,symbolName:T.SWIFT_SYMBOL_NAME});return T.swiftTypeSymbols.forEach(p=>{let c=t.createTypeSymbol({symbolId:p.id,symbolName:p.name,shape:{type:"system"}});t.nestSymbol({parentSymbolId:o.id,childSymbolId:c.id})}),o},n=()=>{let o=t.createModuleSymbol({symbolId:T.FOUNDATION_SYMBOL_ID,symbolName:T.FOUNDATION_SYMBOL_NAME});return T.foundationTypeSymbols.forEach(p=>{let c=t.createTypeSymbol({symbolId:p.id,symbolName:p.name,shape:{type:"system"}});t.nestSymbol({parentSymbolId:o.id,childSymbolId:c.id})}),o},i=e(),a=n();return{graph:t,swiftSymbol:i,foundationSymbol:a}}getRegisteredSourceModuleSymbolOrThrow(){return R(this.registeredSourceModule,"Module symbol not found."),T.create(this.registeredSourceModule.id,this.registeredSourceModule.name,{type:"other"})}getRegisteredTestModuleSymbolOrThrow(){return R(this.registeredTestModule,"Module symbol not found."),T.create(this.registeredTestModule.id,this.registeredTestModule.name,{type:"other"})}getSymbolByIdOrThrow(t){let e=this.graph.getSymbolById(t);return R(e,`Symbol with ID '${t}' not found in registry.`),T.create(e.id,e.name,e.kind==="type"?e.shape:{type:"other"})}registerSourceModule(t){let e=t,n=this.graph.createModuleSymbol({symbolId:e,symbolName:t});return n.addImport(this.swiftSymbol),n.addImport(this.foundationSymbol),this.registeredSourceModule=n,T.create(n.id,n.name,{type:"other"})}registerTestModule(t){let e=t,n=this.graph.createModuleSymbol({symbolId:e,symbolName:t});return n.addImport(this.swiftSymbol),n.addImport(this.foundationSymbol),R(this.registeredSourceModule,"Cannot register a test module before registering a source module."),n.addImport(this.registeredSourceModule),this.registeredTestModule=n,T.create(n.id,n.name,{type:"other"})}registerSourceModuleType(t,e){R(this.registeredSourceModule,"Cannot register a type before registering a module.");let n=this.inferSymbolIdForSourceModuleType(t),i=this.graph.createTypeSymbol({symbolId:n,symbolName:t,shape:e});return this.graph.nestSymbol({parentSymbolId:this.registeredSourceModule.id,childSymbolId:i.id}),T.create(i.id,i.name,e)}registerTestModuleType(t,e){R(this.registeredTestModule,"Cannot register a type before registering a module.");let n=this.inferSymbolIdForTestModuleType(t),i=this.graph.createTypeSymbol({symbolId:n,symbolName:t,shape:e});return this.graph.nestSymbol({parentSymbolId:this.registeredTestModule.id,childSymbolId:i.id}),T.create(i.id,i.name,e)}registerNestedType({parentSymbol:t,symbolName:e,shape:n}){let i=typeof t=="string"?t:t.id,a=this.inferSymbolIdForNestedType(i,e),o=this.graph.createTypeSymbol({symbolId:a,symbolName:e,shape:n});return this.graph.nestSymbol({parentSymbolId:i,childSymbolId:o.id}),T.create(o.id,o.name,n)}reference({fromSymbol:t,toSymbol:e}){let n=typeof t=="string"?t:t.id,i=typeof e=="string"?e:e.id;return this.graph.reference({fromSymbolId:n,targetSymbolId:i})}resolveReference({fromSymbol:t,reference:e}){let n=typeof t=="string"?t:t.id,i=this.graph.resolveReference({fromSymbolId:n,reference:e});return i?T.create(i.id,i.name,i.kind==="type"?i.shape:{type:"other"}):null}inferSymbolIdForSourceModuleType(t){return R(this.registeredSourceModule,"Cannot get symbol id for a type before registering a module."),`${this.registeredSourceModule.id}.${t}`}inferSymbolIdForTestModuleType(t){return R(this.registeredTestModule,"Cannot get symbol id for a type before registering a module."),`${this.registeredTestModule.id}.${t}`}inferSymbolIdForNestedType(t,e){return`${t}.${e}`}};function Ea(r){return new Q(r)}function Na(r){return new E(r)}function Ia(r){return new X(r)}function La(r){return new te(r)}function Aa(r){return new re(r)}function Ra(r){return new ne(r)}function ka(r){return new ie(r)}function Ba(r){return new ae(r)}function Ca(r){return new oe(r)}function Ua(r){return new se(r)}function Ma(r){return new le(r)}function Oa(r){return new ue(r)}function Da(r){return new fe(r)}function Pa(r){return new pe(r)}l();u();function Nr(r){return B(me(r))}var Je=class{constructor({context:t}){f(this,"context");this.context=t}convert(t){switch(t.typeReference.type){case"list":return g.Type.array(this.convert({typeReference:t.typeReference.value}));case"literal":return this.convertLiteral({literal:t.typeReference.value});case"map":return g.Type.dictionary(this.convert({typeReference:t.typeReference.key}),this.convert({typeReference:t.typeReference.value}));case"named":{let e=this.context.resolveNamedType({typeId:t.typeReference.value});return e==null?this.convertUnknown():this.convertNamed({named:e})}case"optional":return g.Type.optional(this.convert({typeReference:t.typeReference.value}));case"nullable":return g.Type.nullable(this.convert({typeReference:t.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:t.typeReference.value});case"set":return g.Type.jsonValue();case"unknown":return this.convertUnknown();default:b(t.typeReference)}}convertNamed({named:t}){switch(t.type){case"alias":return this.convert({typeReference:t.typeReference});case"enum":case"discriminatedUnion":case"object":case"undiscriminatedUnion":return g.Type.custom(t.declaration.name.pascalCase.unsafeName);default:b(t)}}convertLiteral({literal:t}){switch(t.type){case"boolean":return g.Type.bool();case"string":return g.Type.custom(Nr(t.value))}}convertUnknown(){return g.Type.jsonValue()}convertPrimitive({primitive:t}){switch(t){case"INTEGER":return g.Type.int();case"UINT":return g.Type.int();case"LONG":return g.Type.int64();case"UINT_64":return g.Type.uint64();case"FLOAT":return g.Type.float();case"DOUBLE":return g.Type.double();case"BOOLEAN":return g.Type.bool();case"STRING":return g.Type.string();case"DATE":return g.Type.date();case"DATE_TIME":return g.Type.date();case"UUID":return g.Type.uuid();case"BASE_64":return g.Type.string();case"BIG_INTEGER":return g.Type.string();default:b(t)}}};0&&(module.exports={DynamicTypeMapper});
|
|
2
20
|
/*! Bundled license information:
|
|
3
21
|
|
|
4
22
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|