@fern-api/java-dynamic-snippets 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/cjs/Config.cjs.map +1 -1
  2. package/cjs/DynamicSnippetsGenerator.cjs +18 -9
  3. package/cjs/DynamicSnippetsGenerator.cjs.map +1 -1
  4. package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
  5. package/cjs/{DynamicSnippetsGeneratorContext-FbVOZ8Go.d.cts → DynamicSnippetsGeneratorContext-DGzYoCz3.d.cts} +11 -1
  6. package/cjs/EndpointSnippetGenerator.cjs +14 -11
  7. package/cjs/EndpointSnippetGenerator.cjs.map +1 -1
  8. package/cjs/EndpointSnippetGenerator.d.cts +1 -1
  9. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +18 -9
  10. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -1
  11. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
  12. package/cjs/context/DynamicTypeLiteralMapper.cjs +18 -9
  13. package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -1
  14. package/cjs/context/DynamicTypeLiteralMapper.d.cts +1 -1
  15. package/cjs/context/DynamicTypeMapper.cjs +12 -9
  16. package/cjs/context/DynamicTypeMapper.cjs.map +1 -1
  17. package/cjs/context/DynamicTypeMapper.d.cts +1 -1
  18. package/cjs/context/FilePropertyMapper.cjs +14 -11
  19. package/cjs/context/FilePropertyMapper.cjs.map +1 -1
  20. package/cjs/context/FilePropertyMapper.d.cts +1 -1
  21. package/cjs/index.cjs +20 -23
  22. package/cjs/index.cjs.map +1 -1
  23. package/cjs/index.d.cts +1 -1
  24. package/esm/Config.js +1 -1
  25. package/esm/DynamicSnippetsGenerator.d.ts +1 -1
  26. package/esm/DynamicSnippetsGenerator.js +1 -1
  27. package/esm/{DynamicSnippetsGeneratorContext-FbVOZ8Go.d.ts → DynamicSnippetsGeneratorContext-DGzYoCz3.d.ts} +11 -1
  28. package/esm/EndpointSnippetGenerator.d.ts +1 -1
  29. package/esm/EndpointSnippetGenerator.js +1 -1
  30. package/esm/chunk-2U3YQWRZ.js +12 -0
  31. package/esm/chunk-2U3YQWRZ.js.map +1 -0
  32. package/esm/chunk-3X524Y2I.js +23 -0
  33. package/esm/chunk-3X524Y2I.js.map +1 -0
  34. package/esm/chunk-5CTXVUPZ.js +8 -0
  35. package/esm/chunk-5CTXVUPZ.js.map +1 -0
  36. package/esm/{chunk-3LOINSB3.js → chunk-EOZMORS3.js} +2 -2
  37. package/esm/chunk-JFD4YVTW.js +15 -0
  38. package/esm/chunk-JFD4YVTW.js.map +1 -0
  39. package/esm/chunk-KQE3JYZ2.js +2 -0
  40. package/esm/chunk-KQE3JYZ2.js.map +1 -0
  41. package/esm/chunk-N3AIOPEV.js +2 -0
  42. package/esm/chunk-PBNDQMXA.js +2 -0
  43. package/esm/{chunk-PUPEW5QI.js.map → chunk-PBNDQMXA.js.map} +1 -1
  44. package/esm/{chunk-6YM2QG7U.js → chunk-QH22Z5KY.js} +2 -2
  45. package/esm/{chunk-JZBCQWQN.js → chunk-VYJE6STI.js} +2 -2
  46. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
  47. package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
  48. package/esm/context/DynamicTypeLiteralMapper.d.ts +1 -1
  49. package/esm/context/DynamicTypeLiteralMapper.js +1 -1
  50. package/esm/context/DynamicTypeMapper.d.ts +1 -1
  51. package/esm/context/DynamicTypeMapper.js +1 -1
  52. package/esm/context/FilePropertyMapper.d.ts +1 -1
  53. package/esm/context/FilePropertyMapper.js +1 -1
  54. package/esm/index.d.ts +1 -1
  55. package/esm/index.js +1 -13
  56. package/esm/index.js.map +1 -1
  57. package/package.json +1 -1
  58. package/esm/chunk-3JSOCWNQ.js +0 -20
  59. package/esm/chunk-3JSOCWNQ.js.map +0 -1
  60. package/esm/chunk-E6GFFTKW.js +0 -12
  61. package/esm/chunk-E6GFFTKW.js.map +0 -1
  62. package/esm/chunk-JZ2FDMYI.js +0 -15
  63. package/esm/chunk-JZ2FDMYI.js.map +0 -1
  64. package/esm/chunk-PUPEW5QI.js +0 -2
  65. package/esm/chunk-SQKACQJK.js +0 -2
  66. package/esm/chunk-SQKACQJK.js.map +0 -1
  67. package/esm/chunk-WBGWLNLI.js +0 -2
  68. package/esm/chunk-ZYVZJBJN.js +0 -2
  69. package/esm/chunk-ZYVZJBJN.js.map +0 -1
  70. /package/esm/{chunk-3LOINSB3.js.map → chunk-EOZMORS3.js.map} +0 -0
  71. /package/esm/{chunk-WBGWLNLI.js.map → chunk-N3AIOPEV.js.map} +0 -0
  72. /package/esm/{chunk-6YM2QG7U.js.map → chunk-QH22Z5KY.js.map} +0 -0
  73. /package/esm/{chunk-JZBCQWQN.js.map → chunk-VYJE6STI.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  import '@fern-api/dynamic-ir-sdk';
2
2
  import '@fern-api/java-ast';
3
- export { a as DynamicTypeLiteralMapper } from '../DynamicSnippetsGeneratorContext-FbVOZ8Go.cjs';
3
+ export { a as DynamicTypeLiteralMapper } from '../DynamicSnippetsGeneratorContext-DGzYoCz3.cjs';
4
4
  import '@fern-api/browser-compatible-base-generator';
@@ -1,22 +1,25 @@
1
- "use strict";var q=Object.defineProperty;var Ve=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var Ke=Object.prototype.hasOwnProperty;var Xe=(r,t,e)=>t in r?q(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var pe=(r,t)=>()=>(r&&(t=r(r=0)),t);var Te=(r,t)=>{for(var e in t)q(r,e,{get:t[e],enumerable:!0})},Ze=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ze(t))!Ke.call(r,i)&&i!==e&&q(r,i,{get:()=>t[i],enumerable:!(n=Ve(t,i))||n.enumerable});return r};var qe=r=>Ze(q({},"__esModule",{value:!0}),r);var l=(r,t,e)=>Xe(r,typeof t!="symbol"?t+"":t,e);function Ne(){throw new Error("setTimeout has not been defined")}function Ae(){throw new Error("clearTimeout has not been defined")}function Ee(r){if(U===setTimeout)return setTimeout(r,0);if((U===Ne||!U)&&setTimeout)return U=setTimeout,setTimeout(r,0);try{return U(r,0)}catch(t){try{return U.call(null,r,0)}catch(e){return U.call(this,r,0)}}}function Qe(r){if(C===clearTimeout)return clearTimeout(r);if((C===Ae||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(r);try{return C(r)}catch(t){try{return C.call(null,r)}catch(e){return C.call(this,r)}}}function et(){!V||!B||(V=!1,B.length?L=B.concat(L):Q=-1,L.length&&Ie())}function Ie(){if(!V){var r=Ee(et);V=!0;for(var t=L.length;t;){for(B=L,L=[];++Q<t;)B&&B[Q].run();Q=-1,t=L.length}B=null,V=!1,Qe(r)}}function tt(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];L.push(new ke(r,t)),L.length===1&&!V&&Ee(Ie)}function ke(r,t){this.fun=r,this.array=t}function M(){}function xt(r){throw new Error("process.binding is not supported")}function gt(){return"/"}function Tt(r){throw new Error("process.chdir is not supported")}function vt(){return 0}function At(r){var t=Nt.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 It(){var r=new Date,t=r-Et;return t/1e3}var U,C,L,V,B,Q,rt,nt,it,at,ot,st,ct,ut,ft,pt,lt,ht,mt,wt,dt,yt,J,Nt,Et,y,ve,u=pe(()=>{"use strict";U=Ne,C=Ae;typeof globalThis.setTimeout=="function"&&(U=setTimeout);typeof globalThis.clearTimeout=="function"&&(C=clearTimeout);L=[],V=!1,Q=-1;ke.prototype.run=function(){this.fun.apply(null,this.array)};rt="browser",nt="browser",it=!0,at={},ot=[],st="",ct={},ut={},ft={};pt=M,lt=M,ht=M,mt=M,wt=M,dt=M,yt=M;J=globalThis.performance||{},Nt=J.now||J.mozNow||J.msNow||J.oNow||J.webkitNow||function(){return new Date().getTime()};Et=new Date;y={nextTick:tt,title:rt,browser:it,env:at,argv:ot,version:st,versions:ct,on:pt,addListener:lt,once:ht,off:mt,removeListener:wt,removeAllListeners:dt,emit:yt,binding:xt,cwd:gt,chdir:Tt,umask:vt,hrtime:At,platform:nt,release:ut,config:ft,uptime:It},ve={};Object.keys(ve).forEach(r=>{let t=r.split("."),e=y;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=ve[r]:e=e[i]||(e[i]={})}})});function Le(){he=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)R[t]=r[t],E[r.charCodeAt(t)]=t;E[45]=62,E[95]=63}function Rt(r){he||Le();var t,e,n,i,a,o,c=r.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=r[c-2]==="="?2:r[c-1]==="="?1:0,o=new kt(c*3/4-a),n=a>0?c-4:c;var p=0;for(t=0,e=0;t<n;t+=4,e+=3)i=E[r.charCodeAt(t)]<<18|E[r.charCodeAt(t+1)]<<12|E[r.charCodeAt(t+2)]<<6|E[r.charCodeAt(t+3)],o[p++]=i>>16&255,o[p++]=i>>8&255,o[p++]=i&255;return a===2?(i=E[r.charCodeAt(t)]<<2|E[r.charCodeAt(t+1)]>>4,o[p++]=i&255):a===1&&(i=E[r.charCodeAt(t)]<<10|E[r.charCodeAt(t+1)]<<4|E[r.charCodeAt(t+2)]>>2,o[p++]=i>>8&255,o[p++]=i&255),o}function bt(r){return R[r>>18&63]+R[r>>12&63]+R[r>>6&63]+R[r&63]}function St(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(bt(n));return i.join("")}function Re(r){he||Le();for(var t,e=r.length,n=e%3,i="",a=[],o=16383,c=0,p=e-n;c<p;c+=o)a.push(St(r,c,c+o>p?p:c+o));return n===1?(t=r[e-1],i+=R[t>>2],i+=R[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=R[t>>10],i+=R[t>>4&63],i+=R[t<<2&63],i+="="),a.push(i),a.join("")}function ee(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _(r,t){if(ee()<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 me(this,r)}return _e(this,r,t,e)}function _e(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?Ut(r,t,e,n):typeof t=="string"?_t(r,t,e):Ct(r,t)}function Ue(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 Lt(r,t,e,n){return Ue(t),t<=0?_(r,t):e!==void 0?typeof n=="string"?_(r,t).fill(e,n):_(r,t).fill(e):_(r,t)}function me(r,t){if(Ue(t),r=_(r,t<0?0:we(t)|0),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function _t(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=Ce(t,e)|0;r=_(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function le(r,t){var e=t.length<0?0:we(t.length)|0;r=_(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Ut(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=le(r,t),r}function Ct(r,t){if(b(t)){var e=we(t.length)|0;return r=_(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"||qt(t.length)?_(r,0):le(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return le(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function we(r){if(r>=ee())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ee().toString(16)+" bytes");return r|0}function b(r){return!!(r!=null&&r._isBuffer)}function Ce(r,t){if(b(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 te(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return je(r).length;default:if(n)return te(r).length;t=(""+t).toLowerCase(),n=!0}}function Bt(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 Gt(this,t,e);case"utf8":case"utf-8":return Pe(this,t,e);case"ascii":return Wt(this,t,e);case"latin1":case"binary":return Ft(this,t,e);case"base64":return jt(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ht(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function P(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function Be(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)),b(t))return t.length===0?-1:be(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):be(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function be(r,t,e,n,i){var a=1,o=r.length,c=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,c/=2,e/=2}function p(A,H){return a===1?A[H]:A.readUInt16BE(H*a)}var m;if(i){var w=-1;for(m=e;m<o;m++)if(p(r,m)===p(t,w===-1?0:m-w)){if(w===-1&&(w=m),m-w+1===c)return w*a}else w!==-1&&(m-=m-w),w=-1}else for(e+c>o&&(e=o-c),m=e;m>=0;m--){for(var h=!0,I=0;I<c;I++)if(p(r,m+I)!==p(t,I)){h=!1;break}if(h)return m}return-1}function Mt(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 c=parseInt(t.substr(o*2,2),16);if(isNaN(c))return o;r[e+o]=c}return o}function Pt(r,t,e,n){return ie(te(t,r.length-e),r,e,n)}function Me(r,t,e,n){return ie(Xt(t),r,e,n)}function Dt(r,t,e,n){return Me(r,t,e,n)}function Ot(r,t,e,n){return ie(je(t),r,e,n)}function Yt(r,t,e,n){return ie(Zt(t,r.length-e),r,e,n)}function jt(r,t,e){return t===0&&e===r.length?Re(r):Re(r.slice(t,e))}function Pe(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var a=r[i],o=null,c=a>239?4:a>223?3:a>191?2:1;if(i+c<=e){var p,m,w,h;switch(c){case 1:a<128&&(o=a);break;case 2:p=r[i+1],(p&192)===128&&(h=(a&31)<<6|p&63,h>127&&(o=h));break;case 3:p=r[i+1],m=r[i+2],(p&192)===128&&(m&192)===128&&(h=(a&15)<<12|(p&63)<<6|m&63,h>2047&&(h<55296||h>57343)&&(o=h));break;case 4:p=r[i+1],m=r[i+2],w=r[i+3],(p&192)===128&&(m&192)===128&&(w&192)===128&&(h=(a&15)<<18|(p&63)<<12|(m&63)<<6|w&63,h>65535&&h<1114112&&(o=h))}}o===null?(o=65533,c=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=c}return $t(n)}function $t(r){var t=r.length;if(t<=Se)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=Se));return e}function Wt(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 Ft(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 Gt(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+=Kt(r[a]);return i}function Ht(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 T(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 v(r,t,e,n,i,a){if(!b(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 re(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 ne(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 De(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 Oe(r,t,e,n,i){return i||De(r,t,e,4,34028234663852886e22,-34028234663852886e22),We(r,t,e,n,23,4),e+4}function Ye(r,t,e,n,i){return i||De(r,t,e,8,17976931348623157e292,-17976931348623157e292),We(r,t,e,n,52,8),e+8}function Vt(r){if(r=zt(r).replace(Jt,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function zt(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function Kt(r){return r<16?"0"+r.toString(16):r.toString(16)}function te(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 Xt(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Zt(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 je(r){return Rt(Vt(r))}function ie(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 qt(r){return r!==r}function Qt(r){return r!=null&&(!!r._isBuffer||$e(r)||er(r))}function $e(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function er(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&$e(r.slice(0,0))}function ae(r,t,e,n,i){var a,o,c=i*8-n-1,p=(1<<c)-1,m=p>>1,w=-7,h=e?i-1:0,I=e?-1:1,A=r[t+h];for(h+=I,a=A&(1<<-w)-1,A>>=-w,w+=c;w>0;a=a*256+r[t+h],h+=I,w-=8);for(o=a&(1<<-w)-1,a>>=-w,w+=n;w>0;o=o*256+r[t+h],h+=I,w-=8);if(a===0)a=1-m;else{if(a===p)return o?NaN:(A?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-m}return(A?-1:1)*o*Math.pow(2,a-n)}function We(r,t,e,n,i,a){var o,c,p,m=a*8-i-1,w=(1<<m)-1,h=w>>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=n?0:a-1,H=n?1:-1,Je=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,o=w):(o=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-o))<1&&(o--,p*=2),o+h>=1?t+=I/p:t+=I*Math.pow(2,1-h),t*p>=2&&(o++,p/=2),o+h>=w?(c=0,o=w):o+h>=1?(c=(t*p-1)*Math.pow(2,i),o=o+h):(c=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;r[e+A]=c&255,A+=H,c/=256,i-=8);for(o=o<<i|c,m+=i;m>0;r[e+A]=o&255,A+=H,o/=256,m-=8);r[e+A-H]|=Je*128}var R,E,kt,he,Se,Jt,Fe=pe(()=>{"use strict";u();f();R=[],E=[],kt=typeof Uint8Array!="undefined"?Uint8Array:Array,he=!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 _e(null,r,t,e)};s.kMaxLength=ee();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 Lt(null,r,t,e)};s.allocUnsafe=function(r){return me(null,r)};s.allocUnsafeSlow=function(r){return me(null,r)};s.isBuffer=Qt;s.compare=function(t,e){if(!b(t)||!b(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(!b(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};s.byteLength=Ce;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)P(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)P(this,e,e+3),P(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)P(this,e,e+7),P(this,e+1,e+6),P(this,e+2,e+5),P(this,e+3,e+4);return this};s.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Pe(this,0,t):Bt.apply(this,arguments)};s.prototype.equals=function(t){if(!b(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(!b(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,c=n-e,p=Math.min(o,c),m=this.slice(i,a),w=t.slice(e,n),h=0;h<p;++h)if(m[h]!==w[h]){o=m[h],c=w[h];break}return o<c?-1:c<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 Be(this,t,e,n,!0)};s.prototype.lastIndexOf=function(t,e,n){return Be(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 Mt(this,t,e,n);case"utf8":case"utf-8":return Pt(this,t,e,n);case"ascii":return Me(this,t,e,n);case"latin1":case"binary":return Dt(this,t,e,n);case"base64":return Ot(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Yt(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)}};Se=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||T(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||T(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||T(t,1,this.length),this[t]};s.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8};s.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]};s.prototype.readUInt32LE=function(t,e){return e||T(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||T(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||T(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||T(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||T(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};s.prototype.readInt16LE=function(t,e){e||T(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||T(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||T(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||T(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||T(t,4,this.length),ae(this,t,!0,23,4)};s.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),ae(this,t,!1,23,4)};s.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),ae(this,t,!0,52,8)};s.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),ae(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;v(this,t,e,n,a,0)}var o=1,c=0;for(this[e]=t&255;++c<n&&(o*=256);)this[e+c]=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;v(this,t,e,n,a,0)}var o=n-1,c=1;for(this[e+o]=t&255;--o>=0&&(c*=256);)this[e+o]=t/c&255;return e+n};s.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||v(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||v(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):re(this,t,e,!0),e+2};s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||v(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):re(this,t,e,!1),e+2};s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||v(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):ne(this,t,e,!0),e+4};s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||v(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):ne(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);v(this,t,e,n,a-1,-a)}var o=0,c=1,p=0;for(this[e]=t&255;++o<n&&(c*=256);)t<0&&p===0&&this[e+o-1]!==0&&(p=1),this[e+o]=(t/c>>0)-p&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);v(this,t,e,n,a-1,-a)}var o=n-1,c=1,p=0;for(this[e+o]=t&255;--o>=0&&(c*=256);)t<0&&p===0&&this[e+o+1]!==0&&(p=1),this[e+o]=(t/c>>0)-p&255;return e+n};s.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||v(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||v(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):re(this,t,e,!0),e+2};s.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||v(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):re(this,t,e,!1),e+2};s.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||v(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):ne(this,t,e,!0),e+4};s.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||v(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):ne(this,t,e,!1),e+4};s.prototype.writeFloatLE=function(t,e,n){return Oe(this,t,e,!0,n)};s.prototype.writeFloatBE=function(t,e,n){return Oe(this,t,e,!1,n)};s.prototype.writeDoubleLE=function(t,e,n){return Ye(this,t,e,!0,n)};s.prototype.writeDoubleBE=function(t,e,n){return Ye(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 c=b(t)?t:te(new s(t,i).toString()),p=c.length;for(o=0;o<n-e;++o)this[o+e]=c[o%p]}return this};Jt=/[^+\/0-9A-Za-z-_]/g});var f=pe(()=>{"use strict";Fe()});var kr={};Te(kr,{DynamicTypeMapper:()=>ge});module.exports=qe(kr);u();f();u();f();u();f();function S(r){throw new Error("Unexpected value: "+JSON.stringify(r))}u();f();u();f();u();f();u();f();u();f();var D=class{};u();f();var oe=class{formatMultiple(t){return Promise.all(t.map(e=>this.format(e)))}formatMultipleSync(t){return t.map(e=>this.formatSync(e))}},z=class extends oe{async format(t){return t}formatSync(t){return t}};u();f();u();f();var k=class extends D{constructor(e){super();l(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 tr=4,Ge=!!y.env.FERN_STACK_TRACK;Ge&&(Error.stackTraceLimit=50);var K=class{constructor(){l(this,"buffer","");l(this,"indentLevel",0);l(this,"hasWrittenAnything",!1);l(this,"lastCharacterIsSemicolon",!1);l(this,"lastCharacterIsNewline",!1)}write(...t){for(let e of t)if(e!=null)if(typeof e=="string"){let n=e.length>0&&e.endsWith(`
1
+ "use strict";var re=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var ot=Object.prototype.hasOwnProperty;var st=(r,t,e)=>t in r?re(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var xe=(r,t)=>()=>(r&&(t=r(r=0)),t);var be=(r,t)=>{for(var e in t)re(r,e,{get:t[e],enumerable:!0})},ct=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of at(t))!ot.call(r,i)&&i!==e&&re(r,i,{get:()=>t[i],enumerable:!(n=it(t,i))||n.enumerable});return r};var ut=r=>ct(re({},"__esModule",{value:!0}),r);var l=(r,t,e)=>st(r,typeof t!="symbol"?t+"":t,e);function Le(){throw new Error("setTimeout has not been defined")}function Ce(){throw new Error("clearTimeout has not been defined")}function Be(r){if(M===setTimeout)return setTimeout(r,0);if((M===Le||!M)&&setTimeout)return M=setTimeout,setTimeout(r,0);try{return M(r,0)}catch(t){try{return M.call(null,r,0)}catch(e){return M.call(this,r,0)}}}function ft(r){if(F===clearTimeout)return clearTimeout(r);if((F===Ce||!F)&&clearTimeout)return F=clearTimeout,clearTimeout(r);try{return F(r)}catch(t){try{return F.call(null,r)}catch(e){return F.call(this,r)}}}function lt(){!z||!P||(z=!1,P.length?B=P.concat(B):ne=-1,B.length&&_e())}function _e(){if(!z){var r=Be(lt);z=!0;for(var t=B.length;t;){for(P=B,B=[];++ne<t;)P&&P[ne].run();ne=-1,t=B.length}P=null,z=!1,ft(r)}}function pt(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];B.push(new Ue(r,t)),B.length===1&&!z&&Be(_e)}function Ue(r,t){this.fun=r,this.array=t}function O(){}function St(r){throw new Error("process.binding is not supported")}function Lt(){return"/"}function Ct(r){throw new Error("process.chdir is not supported")}function Bt(){return 0}function Ut(r){var t=_t.call(q)*.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 Ft(){var r=new Date,t=r-Mt;return t/1e3}var M,F,B,z,P,ne,ht,mt,wt,dt,xt,yt,gt,Tt,vt,Nt,kt,At,It,Et,Rt,bt,q,_t,Mt,x,Se,u=xe(()=>{"use strict";M=Le,F=Ce;typeof globalThis.setTimeout=="function"&&(M=setTimeout);typeof globalThis.clearTimeout=="function"&&(F=clearTimeout);B=[],z=!1,ne=-1;Ue.prototype.run=function(){this.fun.apply(null,this.array)};ht="browser",mt="browser",wt=!0,dt={},xt=[],yt="",gt={},Tt={},vt={};Nt=O,kt=O,At=O,It=O,Et=O,Rt=O,bt=O;q=globalThis.performance||{},_t=q.now||q.mozNow||q.msNow||q.oNow||q.webkitNow||function(){return new Date().getTime()};Mt=new Date;x={nextTick:pt,title:ht,browser:wt,env:dt,argv:xt,version:yt,versions:gt,on:Nt,addListener:kt,once:At,off:It,removeListener:Et,removeAllListeners:Rt,emit:bt,binding:St,cwd:Lt,chdir:Ct,umask:Bt,hrtime:Ut,platform:mt,release:Tt,config:vt,uptime:Ft},Se={};Object.keys(Se).forEach(r=>{let t=r.split("."),e=x;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Se[r]:e=e[i]||(e[i]={})}})});function Oe(){ge=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)R[t]=r[t],I[r.charCodeAt(t)]=t;I[45]=62,I[95]=63}function Ot(r){ge||Oe();var t,e,n,i,a,o,c=r.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=r[c-2]==="="?2:r[c-1]==="="?1:0,o=new Pt(c*3/4-a),n=a>0?c-4:c;var p=0;for(t=0,e=0;t<n;t+=4,e+=3)i=I[r.charCodeAt(t)]<<18|I[r.charCodeAt(t+1)]<<12|I[r.charCodeAt(t+2)]<<6|I[r.charCodeAt(t+3)],o[p++]=i>>16&255,o[p++]=i>>8&255,o[p++]=i&255;return a===2?(i=I[r.charCodeAt(t)]<<2|I[r.charCodeAt(t+1)]>>4,o[p++]=i&255):a===1&&(i=I[r.charCodeAt(t)]<<10|I[r.charCodeAt(t+1)]<<4|I[r.charCodeAt(t+2)]>>2,o[p++]=i>>8&255,o[p++]=i&255),o}function Dt(r){return R[r>>18&63]+R[r>>12&63]+R[r>>6&63]+R[r&63]}function $t(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(Dt(n));return i.join("")}function Me(r){ge||Oe();for(var t,e=r.length,n=e%3,i="",a=[],o=16383,c=0,p=e-n;c<p;c+=o)a.push($t(r,c,c+o>p?p:c+o));return n===1?(t=r[e-1],i+=R[t>>2],i+=R[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=R[t>>10],i+=R[t>>4&63],i+=R[t<<2&63],i+="="),a.push(i),a.join("")}function ie(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _(r,t){if(ie()<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 Te(this,r)}return De(this,r,t,e)}function De(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?Wt(r,t,e,n):typeof t=="string"?jt(r,t,e):Gt(r,t)}function $e(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 Yt(r,t,e,n){return $e(t),t<=0?_(r,t):e!==void 0?typeof n=="string"?_(r,t).fill(e,n):_(r,t).fill(e):_(r,t)}function Te(r,t){if($e(t),r=_(r,t<0?0:ve(t)|0),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function jt(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=Ye(t,e)|0;r=_(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function ye(r,t){var e=t.length<0?0:ve(t.length)|0;r=_(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Wt(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=ye(r,t),r}function Gt(r,t){if(b(t)){var e=ve(t.length)|0;return r=_(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"||ur(t.length)?_(r,0):ye(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return ye(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ve(r){if(r>=ie())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ie().toString(16)+" bytes");return r|0}function b(r){return!!(r!=null&&r._isBuffer)}function Ye(r,t){if(b(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 ae(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return qe(r).length;default:if(n)return ae(r).length;t=(""+t).toLowerCase(),n=!0}}function Jt(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 tr(this,t,e);case"utf8":case"utf-8":return Ge(this,t,e);case"ascii":return Qt(this,t,e);case"latin1":case"binary":return er(this,t,e);case"base64":return Xt(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rr(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function D(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function je(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)),b(t))return t.length===0?-1:Fe(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):Fe(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function Fe(r,t,e,n,i){var a=1,o=r.length,c=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,c/=2,e/=2}function p(v,C){return a===1?v[C]:v.readUInt16BE(C*a)}var w;if(i){var m=-1;for(w=e;w<o;w++)if(p(r,w)===p(t,m===-1?0:w-m)){if(m===-1&&(m=w),w-m+1===c)return m*a}else m!==-1&&(w-=w-m),m=-1}else for(e+c>o&&(e=o-c),w=e;w>=0;w--){for(var h=!0,g=0;g<c;g++)if(p(r,w+g)!==p(t,g)){h=!1;break}if(h)return w}return-1}function Vt(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 c=parseInt(t.substr(o*2,2),16);if(isNaN(c))return o;r[e+o]=c}return o}function Ht(r,t,e,n){return ce(ae(t,r.length-e),r,e,n)}function We(r,t,e,n){return ce(sr(t),r,e,n)}function qt(r,t,e,n){return We(r,t,e,n)}function zt(r,t,e,n){return ce(qe(t),r,e,n)}function Kt(r,t,e,n){return ce(cr(t,r.length-e),r,e,n)}function Xt(r,t,e){return t===0&&e===r.length?Me(r):Me(r.slice(t,e))}function Ge(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var a=r[i],o=null,c=a>239?4:a>223?3:a>191?2:1;if(i+c<=e){var p,w,m,h;switch(c){case 1:a<128&&(o=a);break;case 2:p=r[i+1],(p&192)===128&&(h=(a&31)<<6|p&63,h>127&&(o=h));break;case 3:p=r[i+1],w=r[i+2],(p&192)===128&&(w&192)===128&&(h=(a&15)<<12|(p&63)<<6|w&63,h>2047&&(h<55296||h>57343)&&(o=h));break;case 4:p=r[i+1],w=r[i+2],m=r[i+3],(p&192)===128&&(w&192)===128&&(m&192)===128&&(h=(a&15)<<18|(p&63)<<12|(w&63)<<6|m&63,h>65535&&h<1114112&&(o=h))}}o===null?(o=65533,c=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=c}return Zt(n)}function Zt(r){var t=r.length;if(t<=Pe)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=Pe));return e}function Qt(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 er(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 tr(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+=or(r[a]);return i}function rr(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 N(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 k(r,t,e,n,i,a){if(!b(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 oe(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 se(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 Je(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 Ve(r,t,e,n,i){return i||Je(r,t,e,4,34028234663852886e22,-34028234663852886e22),Ke(r,t,e,n,23,4),e+4}function He(r,t,e,n,i){return i||Je(r,t,e,8,17976931348623157e292,-17976931348623157e292),Ke(r,t,e,n,52,8),e+8}function ir(r){if(r=ar(r).replace(nr,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function ar(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function or(r){return r<16?"0"+r.toString(16):r.toString(16)}function ae(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 sr(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function cr(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 qe(r){return Ot(ir(r))}function ce(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 ur(r){return r!==r}function fr(r){return r!=null&&(!!r._isBuffer||ze(r)||lr(r))}function ze(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function lr(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&ze(r.slice(0,0))}function ue(r,t,e,n,i){var a,o,c=i*8-n-1,p=(1<<c)-1,w=p>>1,m=-7,h=e?i-1:0,g=e?-1:1,v=r[t+h];for(h+=g,a=v&(1<<-m)-1,v>>=-m,m+=c;m>0;a=a*256+r[t+h],h+=g,m-=8);for(o=a&(1<<-m)-1,a>>=-m,m+=n;m>0;o=o*256+r[t+h],h+=g,m-=8);if(a===0)a=1-w;else{if(a===p)return o?NaN:(v?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-w}return(v?-1:1)*o*Math.pow(2,a-n)}function Ke(r,t,e,n,i,a){var o,c,p,w=a*8-i-1,m=(1<<w)-1,h=m>>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:a-1,C=n?1:-1,te=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,o=m):(o=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-o))<1&&(o--,p*=2),o+h>=1?t+=g/p:t+=g*Math.pow(2,1-h),t*p>=2&&(o++,p/=2),o+h>=m?(c=0,o=m):o+h>=1?(c=(t*p-1)*Math.pow(2,i),o=o+h):(c=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;r[e+v]=c&255,v+=C,c/=256,i-=8);for(o=o<<i|c,w+=i;w>0;r[e+v]=o&255,v+=C,o/=256,w-=8);r[e+v-C]|=te*128}var R,I,Pt,ge,Pe,nr,Xe=xe(()=>{"use strict";u();f();R=[],I=[],Pt=typeof Uint8Array!="undefined"?Uint8Array:Array,ge=!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 De(null,r,t,e)};s.kMaxLength=ie();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 Yt(null,r,t,e)};s.allocUnsafe=function(r){return Te(null,r)};s.allocUnsafeSlow=function(r){return Te(null,r)};s.isBuffer=fr;s.compare=function(t,e){if(!b(t)||!b(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(!b(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};s.byteLength=Ye;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)D(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)D(this,e,e+3),D(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)D(this,e,e+7),D(this,e+1,e+6),D(this,e+2,e+5),D(this,e+3,e+4);return this};s.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Ge(this,0,t):Jt.apply(this,arguments)};s.prototype.equals=function(t){if(!b(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(!b(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,c=n-e,p=Math.min(o,c),w=this.slice(i,a),m=t.slice(e,n),h=0;h<p;++h)if(w[h]!==m[h]){o=w[h],c=m[h];break}return o<c?-1:c<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 je(this,t,e,n,!0)};s.prototype.lastIndexOf=function(t,e,n){return je(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 Vt(this,t,e,n);case"utf8":case"utf-8":return Ht(this,t,e,n);case"ascii":return We(this,t,e,n);case"latin1":case"binary":return qt(this,t,e,n);case"base64":return zt(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Kt(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)}};Pe=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||N(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||N(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||N(t,1,this.length),this[t]};s.prototype.readUInt16LE=function(t,e){return e||N(t,2,this.length),this[t]|this[t+1]<<8};s.prototype.readUInt16BE=function(t,e){return e||N(t,2,this.length),this[t]<<8|this[t+1]};s.prototype.readUInt32LE=function(t,e){return e||N(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||N(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||N(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||N(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||N(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};s.prototype.readInt16LE=function(t,e){e||N(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||N(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||N(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||N(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||N(t,4,this.length),ue(this,t,!0,23,4)};s.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),ue(this,t,!1,23,4)};s.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),ue(this,t,!0,52,8)};s.prototype.readDoubleBE=function(t,e){return e||N(t,8,this.length),ue(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;k(this,t,e,n,a,0)}var o=1,c=0;for(this[e]=t&255;++c<n&&(o*=256);)this[e+c]=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;k(this,t,e,n,a,0)}var o=n-1,c=1;for(this[e+o]=t&255;--o>=0&&(c*=256);)this[e+o]=t/c&255;return e+n};s.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||k(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||k(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):oe(this,t,e,!0),e+2};s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||k(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):oe(this,t,e,!1),e+2};s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||k(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):se(this,t,e,!0),e+4};s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||k(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):se(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);k(this,t,e,n,a-1,-a)}var o=0,c=1,p=0;for(this[e]=t&255;++o<n&&(c*=256);)t<0&&p===0&&this[e+o-1]!==0&&(p=1),this[e+o]=(t/c>>0)-p&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);k(this,t,e,n,a-1,-a)}var o=n-1,c=1,p=0;for(this[e+o]=t&255;--o>=0&&(c*=256);)t<0&&p===0&&this[e+o+1]!==0&&(p=1),this[e+o]=(t/c>>0)-p&255;return e+n};s.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||k(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||k(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):oe(this,t,e,!0),e+2};s.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||k(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):oe(this,t,e,!1),e+2};s.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||k(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):se(this,t,e,!0),e+4};s.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||k(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):se(this,t,e,!1),e+4};s.prototype.writeFloatLE=function(t,e,n){return Ve(this,t,e,!0,n)};s.prototype.writeFloatBE=function(t,e,n){return Ve(this,t,e,!1,n)};s.prototype.writeDoubleLE=function(t,e,n){return He(this,t,e,!0,n)};s.prototype.writeDoubleBE=function(t,e,n){return He(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 c=b(t)?t:ae(new s(t,i).toString()),p=c.length;for(o=0;o<n-e;++o)this[o+e]=c[o%p]}return this};nr=/[^+\/0-9A-Za-z-_]/g});var f=xe(()=>{"use strict";Xe()});var Dr={};be(Dr,{DynamicTypeMapper:()=>Re});module.exports=ut(Dr);u();f();u();f();u();f();function S(r){throw new Error("Unexpected value: "+JSON.stringify(r))}u();f();u();f();u();f();u();f();u();f();u();f();var Ze,Qe,K=(Qe=(Ze=x.env.FERN_STACK_TRACK)==null?void 0:Ze.toLowerCase())!=null?Qe:"",L=K!==""&&K!=="0"&&K!=="false",Ne=["single","multiline","box"].includes(K)?K:"single";L&&(Error.stackTraceLimit=50);var pr=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),hr=new Set(["stacktrace"]);function le({maxFrames:r=50,skip:t=0,filterPaths:e=[],filterFunctions:n=[],stopOn:i=[],filterNode:a=!0,filterJs:o=!0,formatFilename:c=p=>p}={}){var w;if(!L)return[];n=[...n,...pr],e=[...e,...hr],i=[...i,"runInteractiveTask"];let p=!1;return((w=new Error().stack)!=null?w:"").split(`
2
+ `).map(m=>{let h=m.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(h&&h.length===5){let[,g,v,C,te]=h;if(!g||!v||!C||!te)return;if(p||i.some(nt=>g==null?void 0:g.includes(nt))){p=!0;return}switch(g){case"Object.<anonymous>":g="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":g=`${g.substring(g.indexOf(".")+1)}()=> { ... }`;break}return{fn:g,path:c(v),position:`${C}:${te}`}}}).filter(m=>{var h,g;return m&&!n.some(v=>m.fn.includes(v))&&!(a&&((h=m.path)!=null&&h.startsWith("node:")))&&!(o&&((g=m.path)!=null&&g.endsWith(".js")))&&!e.some(v=>m.path.includes(v))}).slice(t,t+r)}var fe=class{constructor({maxFrames:t=50,skip:e=0,filterPaths:n=[],filterFunctions:i=[],stopOn:a=[],filterNode:o=!0,filterJs:c=!0,multiline:p=!1,formatFilename:w=m=>m}={}){l(this,"maxFrames");l(this,"skip");l(this,"filterPaths");l(this,"filterFunctions");l(this,"stopOn");l(this,"filterNode");l(this,"filterJs");l(this,"multiline");l(this,"formatFilename");l(this,"tracking",new WeakMap);this.maxFrames=t,this.skip=e,this.filterPaths=n,this.filterFunctions=i,this.stopOn=a,this.filterNode=o,this.filterJs=c,this.multiline=p,this.formatFilename=w}tag(t){let e=this.tracking.get(t)||new Set;le({maxFrames:this.maxFrames,skip:this.skip,filterPaths:this.filterPaths,filterFunctions:this.filterFunctions,stopOn:this.stopOn,filterNode:this.filterNode,filterJs:this.filterJs,formatFilename:this.formatFilename}).forEach(n=>e.add(n)),this.tracking.set(t,e)}trace(t){if(!L)return"";let e=this.tracking.get(t);return e?[...e].map(n=>`${this.multiline?`
3
+ `:""}${n.fn} - ${n.path}:${n.position}`).join(""):""}frames(t){let e=this.tracking.get(t);return e?[...e]:[]}free(t){this.tracking.delete(t)}clear(){this.tracking=new WeakMap}},U;function et({maxFrames:r=50,skip:t=0,filterPaths:e=[],filterFunctions:n=[],stopOn:i=[],filterNode:a=!0,filterJs:o=!0,multiline:c=!1,formatFilename:p=w=>w}={}){L&&(U!=null||(U=new fe({maxFrames:r,skip:t,filterPaths:e,filterFunctions:n,stopOn:i,filterNode:a,filterJs:o,multiline:c,formatFilename:p})))}function tt(r){U==null||U.tag(r)}function ke(r){var t;return(t=U==null?void 0:U.frames(r))!=null?t:[]}var $=class{constructor(){tt(this)}};u();f();var pe=class{formatMultiple(t){return Promise.all(t.map(e=>this.format(e)))}formatMultipleSync(t){return t.map(e=>this.formatSync(e))}},X=class extends pe{async format(t){return t}formatSync(t){return t}};u();f();u();f();u();f();var E=class extends ${constructor(e){super();l(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 mr=4;et({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var Z=class{constructor(){l(this,"lineBuffer",[]);l(this,"indentLevel",0);l(this,"hasWrittenAnything",!1);l(this,"lastCharacterIsSemicolon",!1);l(this,"lastCharacterIsNewline",!1);l(this,"nodeStackFrames",[])}get buffer(){return L&&this.nodeStackFrames.length>0&&this.writeInternal(`
4
+ `),this.lineBuffer.join(`
5
+ `)+(this.lastCharacterIsNewline?`
6
+ `:"")}write(...t){for(let e of t)if(e!=null)if(typeof e=="string"){let n=e.length>0&&e.endsWith(`
2
7
  `),i=n?e.substring(0,e.length-1):e,a=this.getIndentString(),o=i.replaceAll(`
3
8
  `,`
4
9
  ${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 k(t).write(this),t.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new k(t).write(this),this.write(" (",e,")"),this.pushScope()}controlFlowWithoutStatement(t){new k(t).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new k(t).write(this),this.write(" (",e,")"),this.pushScope()}alternativeControlFlow(t){this.dedent(),this.write("} "),new k(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(`
10
+ `),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){L&&this.nodeStackFrames.push(...ke(t)),t.write(this),L&&Ne!=="single"&&this.writeInternal(`
11
+ `)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){this.writeNode(t),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new E(t).write(this),t.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new E(t).write(this),this.write(" (",e,")"),this.pushScope()}controlFlowWithoutStatement(t){new E(t).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new E(t).write(this),this.write(" (",e,")"),this.pushScope()}alternativeControlFlow(t){this.dedent(),this.write("} "),new E(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.length===0?[""]:t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
6
12
  `)}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,Ge&&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 tr}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[,c,p,m,w]=a;if(e||c!=null&&c.includes("runInteractiveTask")){e=!0;return}switch(c){case"Object.<anonymous>":c="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":c=`${c.substring(c.indexOf(".")+1)}()=> { ... }`;break}return{fn:c,path:(o=p==null?void 0:p.replace(/^.*?fern.*?\//,""))!=null?o:"",position:`${m}:${w}`}}}).filter(i=>{var a,o,c,p,m,w,h;return i&&!((a=i.path)!=null&&a.startsWith("node:"))&&!((o=i.path)!=null&&o.endsWith(".js"))&&!((c=i.path)!=null&&c.includes("AbstractWriter"))&&!((p=i.fn)!=null&&p.includes("stacktrace"))&&!((m=i.fn)!=null&&m.includes("stackLine"))&&!((w=i.fn)!=null&&w.includes("SdkGeneratorCLI"))&&!((h=i.fn)!=null&&h.includes("runCli"))}).slice(0,t)}};u();f();function de(r){return(r==null?void 0:r.name)!=null}var O=class extends K{constructor({packageName:e,customConfig:n,formatter:i}){super();l(this,"packageName");l(this,"customConfig");l(this,"formatter");l(this,"imports",new Set);this.packageName=e,this.customConfig=n,this.formatter=i!=null?i:new z}addImport(e){this.imports.add(e)}getImports(){return new Set(this.imports)}};var X=class extends O{constructor({packageName:t,customConfig:e,formatter:n}){super({packageName:t,customConfig:e,formatter:n})}async toStringAsync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format Java file: ${e}
13
+ `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let 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)return;let e=!this.lastCharacterIsNewline;this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
14
+ `),this.lastCharacterIsSemicolon=t.endsWith(";");let n=t.split(`
15
+ `),i=L&&!this.shouldSkipTracking(n)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${n.shift()||""}`),this.lastCharacterIsNewline&&n.pop(),this.lineBuffer.push(...n),i&&this.appendTrackingComment()}set lastLine(t){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=t:this.lineBuffer.push(t)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(t){return!1}formatStack(t,e=""){return t.map(n=>`${e?`(${e}) `:""} ${n.fn} - ${n.path} : ${n.position}`)}filterStack(t){return t.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let t=[...this.formatStack(this.filterStack(le({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,Ne){case"single":return this.singleLineTrackingComment(t);case"multiline":return this.multiLineTrackingComment(t);case"box":return this.boxTrackingComment(t)}}singleLineTrackingComment(t){this.lastLine=`${this.lastLine} // ${t.join(" ")}`}multiLineTrackingComment(t){this.lineBuffer.push(...t.map(e=>` // ${e}`))}boxTrackingComment(t){this.lineBuffer.push("/*",...t.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return mr}};u();f();function Ae(r){return(r==null?void 0:r.name)!=null&&(r==null?void 0:r.assignment)!=null}var Y=class extends Z{constructor({packageName:e,customConfig:n,formatter:i}){super();l(this,"packageName");l(this,"customConfig");l(this,"formatter");l(this,"imports",new Set);this.packageName=e,this.customConfig=n,this.formatter=i!=null?i:new X}addImport(e){this.imports.add(e)}getImports(){return new Set(this.imports)}};var Q=class extends Y{constructor({packageName:t,customConfig:e,formatter:n}){super({packageName:t,customConfig:e,formatter:n})}async toStringAsync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format Java file: ${e}
13
16
  ${t}`)}return t}toString(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(t)}catch(e){throw new Error(`Failed to format Java file: ${e}
14
17
  ${t}`)}return t}getContent(){let t=`package ${this.packageName};
15
18
 
16
19
  `,e=this.stringifyImports();return e.length>0?`${t}${e}
17
20
 
18
21
  ${this.buffer}`:t+this.buffer}stringifyImports(){return Array.from(this.imports).filter(t=>t!==this.packageName).map(t=>`import ${t};`).sort().join(`
19
- `)}};var d={};Te(d,{Access:()=>ye,AstNode:()=>g,Class:()=>Y,ClassInstantiation:()=>j,ClassReference:()=>x,CodeBlock:()=>$,Method:()=>W,MethodInvocation:()=>F,Parameter:()=>G,Type:()=>Z,TypeLiteral:()=>N,Writer:()=>O,classReference:()=>vr,class_:()=>Tr,codeblock:()=>gr,instantiateClass:()=>Nr,invokeMethod:()=>Ar,method:()=>Er,parameter:()=>Ir});u();f();u();f();u();f();var ye={Public:"public",Protected:"protected",Private:"private"};u();f();u();f();var g=class extends D{async toStringAsync({packageName:t,customConfig:e,formatter:n}){let i=new X({packageName:t,customConfig:e,formatter:n});return this.write(i),i.toStringAsync()}toString({packageName:t,customConfig:e,formatter:n}){let i=new X({packageName:t,customConfig:e,formatter:n});return this.write(i),i.toString()}};var Y=class extends g{constructor({name:e,access:n}){super();l(this,"name");l(this,"access");l(this,"methods",[]);this.name=e,this.access=n}write(e){if(e.write(`${this.access} class ${this.name}`),this.isEmpty()){e.writeLine(" {}");return}e.writeLine(" {"),e.indent();for(let n of this.methods)e.writeNode(n),e.newLine();e.dedent(),e.write("}")}addMethod(e){this.methods.push(e)}isEmpty(){return this.methods.length===0}};u();f();u();f();u();f();u();f();var x=class extends g{constructor({name:e,packageName:n,fullyQualified:i}){super();l(this,"name");l(this,"packageName");l(this,"fullyQualified");this.name=e,this.packageName=n,this.fullyQualified=i!=null?i:!1}write(e){if(e.addImport(`${this.packageName}.${this.name}`),this.fullyQualified){e.write(`${this.packageName}.${this.name}`);return}e.write(this.name)}};u();f();var Z=class extends g{constructor(e){super();l(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"array":e.writeNode(this.internalType.value),e.write("[]");break;case"bigInteger":e.writeNode(rr);break;case"boolean":e.write("Boolean");break;case"bytes":e.write("byte[]");break;case"date":e.write("String");break;case"dateTime":e.writeNode(ar);break;case"double":e.write("Double");break;case"float":e.write("Float");break;case"generic":e.writeNode(this.internalType.value),e.write("<");for(let[n,i]of this.internalType.parameters.entries())e.writeNode(i),n<this.internalType.parameters.length-1&&e.write(", ");e.write(">");break;case"inputStream":e.writeNode(cr);break;case"integer":e.write("Integer");break;case"iterable":this.writeIterable({writer:e,iterable:this.internalType});break;case"list":{this.writeList({writer:e,list:this.internalType});break}case"long":{e.write("Long");break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"object":{e.write("Object");break}case"optional":{this.writeOptional({writer:e,optional:this.internalType});break}case"reference":e.writeNode(this.internalType.value);break;case"set":{this.writeSet({writer:e,set:this.internalType});break}case"string":e.write("String");break;case"uuid":e.writeNode(sr);break;case"void":e.write("Void");break;default:S(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static array(e){return new this({type:"array",value:e})}static bigInteger(){return new this({type:"bigInteger"})}static boolean(){return new this({type:"boolean"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static double(){return new this({type:"double"})}static float(){return new this({type:"float"})}static integer(){return new this({type:"integer"})}static list(e){return new this({type:"list",value:e})}static long(){return new this({type:"long"})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static object(){return new this({type:"object"})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static reference(e){return new this({type:"reference",value:e})}static generic(e,n){return new this({type:"generic",value:e,parameters:n})}static set(e){return new this({type:"set",value:e})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static void(){return new this({type:"void"})}static iterable(e){return new this({type:"iterable",value:e})}static inputStream(){return new this({type:"inputStream"})}writeList({writer:e,list:n}){e.writeNode(nr),e.write("<"),n.value.write(e),e.write(">")}writeMap({writer:e,map:n}){e.writeNode(ir),e.write("<"),n.keyType.write(e),e.write(", "),n.valueType.write(e),e.write(">")}writeOptional({writer:e,optional:n}){e.writeNode(se),e.write("<"),n.value.write(e),e.write(">")}writeIterable({writer:e,iterable:n}){e.writeNode(se),e.write("<"),n.value.write(e),e.write(">")}writeSet({writer:e,set:n}){e.writeNode(or),e.write("<"),n.value.write(e),e.write(">")}static isAlreadyOptional(e){return e.internalType.type==="optional"}},ce=new x({name:"Arrays",packageName:"java.util"}),rr=new x({name:"BigInteger",packageName:"java.math"}),Vn=new x({name:"HashMap",packageName:"java.util"}),nr=new x({name:"List",packageName:"java.util"}),ir=new x({name:"Map",packageName:"java.util"}),ar=new x({name:"OffsetDateTime",packageName:"java.time"}),se=new x({name:"Optional",packageName:"java.util"}),or=new x({name:"Set",packageName:"java.util"}),sr=new x({name:"UUID",packageName:"java.util"}),cr=new x({name:"InputStream",packageName:"java.io"});var N=class r extends g{constructor(e){super();l(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"bigInteger":this.writeBigInteger({writer:e,bigInteger:this.internalType});break;case"boolean":e.write(this.internalType.value.toString());break;case"builder":this.writeBuilder({writer:e,builder:this.internalType});break;case"bytes":e.write(`"${this.internalType.value}".getBytes()`);break;case"class":{this.writeClass({writer:e,class_:this.internalType});break}case"date":e.write(`"${this.internalType.value}"`);break;case"dateTime":this.writeDateTime({writer:e,dateTime:this.internalType});break;case"double":{let n=this.internalType.value.toString();!n.includes(".")&&!n.includes("e")&&!n.includes("E")?e.write(`${n}.0`):e.write(n);break}case"enum":this.writeEnum({writer:e,enum_:this.internalType});break;case"float":e.write(`${this.internalType.value}f`);break;case"integer":e.write(Math.floor(this.internalType.value).toString());break;case"list":{this.writeList({writer:e,list:this.internalType});break}case"long":{e.write(`${Math.floor(this.internalType.value)}L`);break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"optional":{this.writeOptional({writer:e,optional:this.internalType});break}case"raw":{this.internalType.value instanceof g?e.writeNode(this.internalType.value):e.write(this.internalType.value);break}case"reference":e.writeNode(this.internalType.value);break;case"set":{this.writeSet({writer:e,set:this.internalType});break}case"string":e.write(`"${this.escapeString(this.internalType.value)}"`);break;case"unknown":this.writeUnknown({writer:e,value:this.internalType.value});break;case"uuid":this.writeUUID({writer:e,uuid:this.internalType});break;case"nop":break;default:S(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static bigInteger(e){return new this({type:"bigInteger",value:e})}static boolean(e){return new this({type:"boolean",value:e})}static builder({classReference:e,parameters:n}){return new this({type:"builder",classReference:e,parameters:n})}static bytes(e){return new this({type:"bytes",value:e})}static class_({reference:e,parameters:n}){return new this({type:"class",reference:e,parameters:n})}static date(e){return new this({type:"date",value:e})}static dateTime(e){return new this({type:"dateTime",value:e})}static double(e){return new this({type:"double",value:e})}static enum_({classReference:e,value:n}){return new this({type:"enum",classReference:e,value:n})}static float(e){return new this({type:"float",value:e})}static integer(e){return new this({type:"integer",value:e})}static list({valueType:e,values:n,isParameter:i}){return new this({type:"list",valueType:e,values:n,isParameter:i})}static long(e){return new this({type:"long",value:e})}static map({keyType:e,valueType:n,entries:i}){return new this({type:"map",keyType:e,valueType:n,entries:i})}static optional({value:e,useOf:n}){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e,useOf:n})}static raw(e){return new this({type:"raw",value:e})}static reference(e){return new this({type:"reference",value:e})}static set({valueType:e,values:n}){return new this({type:"set",valueType:e,values:n})}static string(e){return new this({type:"string",value:e})}static unknown(e){return new this({type:"unknown",value:e})}static uuid(e){return new this({type:"uuid",value:e})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}shouldWriteInLine(){switch(this.internalType.type){case"bigInteger":case"boolean":case"bytes":case"date":case"dateTime":case"double":case"enum":case"float":case"integer":case"long":case"nop":case"raw":case"string":case"unknown":case"uuid":return!0;case"optional":return this.internalType.value.shouldWriteInLine();case"builder":case"class":case"list":case"map":case"reference":case"set":return!1;default:S(this.internalType)}}writeBigInteger({writer:e,bigInteger:n}){e.write("new "),e.writeNode(d.instantiateClass({classReference:ur,arguments_:[r.string(n.value)]}))}writeBuilder({writer:e,builder:n}){e.writeNode(n.classReference),e.writeNewLineIfLastLineNot(),e.indent(),this.writeBuilderParameters({writer:e,parameters:this.orderBuilderParameters(mr({parameters:n.parameters}))}),e.dedent()}writeBuilderParameters({writer:e,parameters:n}){e.writeLine(".builder()");for(let i of n)e.write(`.${i.name}(`),i.value.shouldWriteInLine()||e.newLine(),e.indent(),e.writeNode(i.value),e.dedent(),i.value.shouldWriteInLine()||e.newLine(),e.writeLine(")");e.writeNewLineIfLastLineNot(),e.write(".build()")}orderBuilderParameters(e){return e.sort((n,i)=>n.value.isOptional()&&!i.value.isOptional()?1:!n.value.isOptional()&&i.value.isOptional()?-1:0)}writeClass({writer:e,class_:n}){let i=hr({parameters:n.parameters});e.writeNode(d.instantiateClass({classReference:n.reference,arguments_:i.map(a=>a.value)}))}writeDateTime({writer:e,dateTime:n}){e.writeNode(d.invokeMethod({on:pr,method:"parse",arguments_:[r.string(n.value)]}))}writeEnum({writer:e,enum_:n}){e.writeNode(n.classReference),e.write("."+n.value)}writeList({writer:e,list:n}){this.writeIterable({writer:e,iterable:n})}writeMap({writer:e,map:n}){let i=wr({entries:n.entries});if(i.length===0){e.write("new "),e.writeNode(ue),e.write("<"),e.writeNode(n.keyType),e.write(", "),e.writeNode(n.valueType),e.write(">()");return}e.write("new "),e.writeNode(ue),e.write("<"),e.writeNode(n.keyType),e.write(", "),e.writeNode(n.valueType),e.writeLine(">() {{"),e.indent();for(let a of i)e.write("put("),e.writeNode(a.key),e.write(", "),e.writeNode(a.value),e.writeLine(");");e.dedent(),e.write("}}")}writeOptional({writer:e,optional:n}){if(!n.useOf){e.writeNode(n.value);return}e.writeNode(d.invokeMethod({on:se,method:"of",arguments_:[n.value]}))}writeSet({writer:e,set:n}){this.writeIterable({writer:e,iterable:n})}writeIterable({writer:e,iterable:n}){let i=n.type==="list"?xe:fr,a=dr({values:n.values});if(n.type==="list"&&n.isParameter&&a.length>0){e.writeNode(d.invokeMethod({on:ce,method:"asList",arguments_:a}));return}if(a.length===0){e.write(`new ${i.name}<`),e.writeNode(n.valueType),e.write(">()");return}e.write("new "),e.writeNode(i),e.write("<"),e.writeNode(n.valueType),e.writeLine(">("),e.indent(),e.writeNode(d.invokeMethod({on:ce,method:"asList",arguments_:a})),e.writeNewLineIfLastLineNot(),e.dedent(),e.write(")")}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(`"${this.escapeString(n)}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownMap({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("new "),e.writeNode(xe),e.write("<Object>()");return}e.write("new "),e.writeNode(xe),e.write("<Object>("),e.writeNode(d.invokeMethod({on:ce,method:"asList",arguments_:n.map(i=>r.unknown(i))})),e.write(")")}writeUnknownMap({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("new "),e.writeNode(ue),e.write("<String, Object>()");return}e.writeLine("new "),e.writeNode(ue),e.write("<String, Object>() {{"),e.indent();for(let[a,o]of i)e.write(`put("${a}", `),e.writeNode(r.unknown(o)),e.writeLine(");");e.dedent(),e.write("}}")}writeUUID({writer:e,uuid:n}){e.writeNode(d.invokeMethod({on:lr,method:"fromString",arguments_:[r.string(n.value)]}))}escapeString(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}static isAlreadyOptional(e){return e.internalType.type==="optional"}},xe=new x({name:"ArrayList",packageName:"java.util"}),ur=new x({name:"BigInteger",packageName:"java.math"}),ue=new x({name:"HashMap",packageName:"java.util"}),fr=new x({name:"HashSet",packageName:"java.util"}),ni=new x({name:"List",packageName:"java.util"}),ii=new x({name:"Map",packageName:"java.util"}),pr=new x({name:"OffsetDateTime",packageName:"java.time"}),ai=new x({name:"Set",packageName:"java.util"}),lr=new x({name:"UUID",packageName:"java.util"});function hr({parameters:r}){return r.filter(t=>!N.isNop(t.value))}function mr({parameters:r}){return r.filter(t=>!N.isNop(t.value))}function wr({entries:r}){return r.filter(t=>!N.isNop(t.key)&&!N.isNop(t.value))}function dr({values:r}){return r.filter(t=>!N.isNop(t))}function fe({writer:r,arguments_:t}){let e=xr(t);if(e.length===0){r.write("()");return}if(e.some(i=>i instanceof N&&!i.shouldWriteInLine())){yr({writer:r,arguments_:e});return}r.write("("),e.forEach((i,a)=>{a>0&&r.write(", "),He({writer:r,argument:i})}),r.write(")")}function yr({writer:r,arguments_:t}){r.writeLine("("),r.indent(),t.forEach((e,n)=>{n>0&&r.writeLine(","),He({writer:r,argument:e})}),r.dedent(),t.length>0&&r.newLine(),r.write(")")}function He({writer:r,argument:t}){de(t)?r.writeNodeOrString(t.assignment):t.write(r)}function xr(r){return r.filter(t=>!(t instanceof N&&N.isNop(t)))}var j=class extends g{constructor({classReference:e,arguments_:n}){super();l(this,"classReference");l(this,"arguments_");this.classReference=e,this.arguments_=n}write(e){e.writeNode(this.classReference),fe({writer:e,arguments_:this.arguments_})}};u();f();var $=class extends g{constructor(e){super();l(this,"arg");this.arg=e}write(e){return new k(this.arg).write(e)}};u();f();var W=class extends g{constructor({name:e,access:n,parameters:i,body:a,static_:o,return_:c}){super();l(this,"name");l(this,"access");l(this,"parameters");l(this,"body");l(this,"return_");l(this,"static_");this.name=e,this.access=n,this.parameters=i,this.body=a,this.return_=c,this.static_=o!=null?o:!1}write(e){if(e.write(`${this.access} `),this.static_&&e.write("static "),this.return_!=null?e.writeNode(this.return_):e.write("void"),e.write(` ${this.name}`),this.parameters.length===0)e.write("()");else if(this.parameters.length===1){if(e.write("("),this.parameters[0]==null)throw new Error("Cannot render parameter "+this.parameters[0]);e.writeNode(this.parameters[0]),e.write(")")}else e.writeLine("("),e.indent(),this.parameters.forEach((n,i)=>{i>0&&e.writeLine(", "),e.writeNode(n)}),e.dedent(),e.write(")");if(this.body==null){e.write(";");return}e.writeLine(" {"),e.indent(),e.writeNode(this.body),e.writeNewLineIfLastLineNot(),e.dedent(),e.write("}")}};u();f();var F=class extends g{constructor({method:e,arguments_:n,on:i}){super();l(this,"on");l(this,"method");l(this,"arguments_");this.on=i,this.method=e,this.arguments_=n}write(e){this.on.write(e),e.write("."),e.write(this.method),fe({writer:e,arguments_:this.arguments_})}};u();f();var G=class extends g{constructor({name:e,type:n}){super();l(this,"name");l(this,"type");this.name=e,this.type=n}write(e){e.writeNode(this.type),e.write(` ${this.name}`)}};function gr(r){return new $(r)}function Tr(r){return new Y(r)}function vr(r){return new x(r)}function Nr(r){return new j(r)}function Ar(r){return new F(r)}function Er(r){return new W(r)}function Ir(r){return new G(r)}var ge=class{constructor({context:t}){l(this,"context");this.context=t}convert(t){switch(t.typeReference.type){case"list":return d.Type.list(this.convert({typeReference:t.typeReference}));case"literal":return this.convertLiteral({literal:t.typeReference.value});case"map":return d.Type.map(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":case"nullable":return d.Type.optional(this.convert({typeReference:t.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:t.typeReference.value});case"set":return d.Type.set(this.convert({typeReference:t.typeReference}));case"unknown":return this.convertUnknown();default:S(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 d.Type.reference(d.classReference({name:this.context.getClassName(t.declaration.name),packageName:this.context.getTypesPackageName(t.declaration.fernFilepath)}));default:S(t)}}convertLiteral({literal:t}){switch(t.type){case"boolean":return d.Type.boolean();case"string":return d.Type.string()}}convertUnknown(){return d.Type.object()}convertPrimitive({primitive:t}){switch(t){case"INTEGER":return d.Type.integer();case"UINT":return d.Type.integer();case"LONG":return d.Type.long();case"UINT_64":return d.Type.long();case"FLOAT":return d.Type.float();case"DOUBLE":return d.Type.double();case"BOOLEAN":return d.Type.boolean();case"STRING":return d.Type.string();case"DATE":return d.Type.date();case"DATE_TIME":return d.Type.dateTime();case"UUID":return d.Type.uuid();case"BASE_64":return d.Type.bytes();case"BIG_INTEGER":return d.Type.bigInteger();default:S(t)}}};0&&(module.exports={DynamicTypeMapper});
22
+ `)}};var d={};be(d,{Access:()=>Ie,AstNode:()=>T,Class:()=>j,ClassInstantiation:()=>W,ClassReference:()=>y,CodeBlock:()=>G,Method:()=>J,MethodInvocation:()=>V,Parameter:()=>H,Type:()=>ee,TypeLiteral:()=>A,Writer:()=>Y,classReference:()=>Ur,class_:()=>_r,codeblock:()=>Br,instantiateClass:()=>Mr,invokeMethod:()=>Fr,method:()=>Pr,parameter:()=>Or});u();f();u();f();u();f();var Ie={Public:"public",Protected:"protected",Private:"private"};u();f();u();f();var T=class extends ${async toStringAsync({packageName:t,customConfig:e,formatter:n}){let i=new Q({packageName:t,customConfig:e,formatter:n});return this.write(i),i.toStringAsync()}toString({packageName:t,customConfig:e,formatter:n}){let i=new Q({packageName:t,customConfig:e,formatter:n});return this.write(i),i.toString()}};var j=class extends T{constructor({name:e,access:n}){super();l(this,"name");l(this,"access");l(this,"methods",[]);this.name=e,this.access=n}write(e){if(e.write(`${this.access} class ${this.name}`),this.isEmpty()){e.writeLine(" {}");return}e.writeLine(" {"),e.indent();for(let n of this.methods)e.writeNode(n),e.newLine();e.dedent(),e.write("}")}addMethod(e){this.methods.push(e)}isEmpty(){return this.methods.length===0}};u();f();u();f();u();f();u();f();var y=class extends T{constructor({name:e,packageName:n,fullyQualified:i}){super();l(this,"name");l(this,"packageName");l(this,"fullyQualified");this.name=e,this.packageName=n,this.fullyQualified=i!=null?i:!1}write(e){if(e.addImport(`${this.packageName}.${this.name}`),this.fullyQualified){e.write(`${this.packageName}.${this.name}`);return}e.write(this.name)}};u();f();var ee=class extends T{constructor(e){super();l(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"array":e.writeNode(this.internalType.value),e.write("[]");break;case"bigInteger":e.writeNode(wr);break;case"boolean":e.write("Boolean");break;case"bytes":e.write("byte[]");break;case"date":e.write("String");break;case"dateTime":e.writeNode(yr);break;case"double":e.write("Double");break;case"float":e.write("Float");break;case"generic":e.writeNode(this.internalType.value),e.write("<");for(let[n,i]of this.internalType.parameters.entries())e.writeNode(i),n<this.internalType.parameters.length-1&&e.write(", ");e.write(">");break;case"inputStream":e.writeNode(vr);break;case"integer":e.write("Integer");break;case"iterable":this.writeIterable({writer:e,iterable:this.internalType});break;case"list":{this.writeList({writer:e,list:this.internalType});break}case"long":{e.write("Long");break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"object":{e.write("Object");break}case"optional":{this.writeOptional({writer:e,optional:this.internalType});break}case"reference":e.writeNode(this.internalType.value);break;case"set":{this.writeSet({writer:e,set:this.internalType});break}case"string":e.write("String");break;case"uuid":e.writeNode(Tr);break;case"void":e.write("Void");break;default:S(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static array(e){return new this({type:"array",value:e})}static bigInteger(){return new this({type:"bigInteger"})}static boolean(){return new this({type:"boolean"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static double(){return new this({type:"double"})}static float(){return new this({type:"float"})}static integer(){return new this({type:"integer"})}static list(e){return new this({type:"list",value:e})}static long(){return new this({type:"long"})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static object(){return new this({type:"object"})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static reference(e){return new this({type:"reference",value:e})}static generic(e,n){return new this({type:"generic",value:e,parameters:n})}static set(e){return new this({type:"set",value:e})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static void(){return new this({type:"void"})}static iterable(e){return new this({type:"iterable",value:e})}static inputStream(){return new this({type:"inputStream"})}writeList({writer:e,list:n}){e.writeNode(dr),e.write("<"),n.value.write(e),e.write(">")}writeMap({writer:e,map:n}){e.writeNode(xr),e.write("<"),n.keyType.write(e),e.write(", "),n.valueType.write(e),e.write(">")}writeOptional({writer:e,optional:n}){e.writeNode(he),e.write("<"),n.value.write(e),e.write(">")}writeIterable({writer:e,iterable:n}){e.writeNode(he),e.write("<"),n.value.write(e),e.write(">")}writeSet({writer:e,set:n}){e.writeNode(gr),e.write("<"),n.value.write(e),e.write(">")}static isAlreadyOptional(e){return e.internalType.type==="optional"}},me=new y({name:"Arrays",packageName:"java.util"}),wr=new y({name:"BigInteger",packageName:"java.math"}),Ai=new y({name:"HashMap",packageName:"java.util"}),dr=new y({name:"List",packageName:"java.util"}),xr=new y({name:"Map",packageName:"java.util"}),yr=new y({name:"OffsetDateTime",packageName:"java.time"}),he=new y({name:"Optional",packageName:"java.util"}),gr=new y({name:"Set",packageName:"java.util"}),Tr=new y({name:"UUID",packageName:"java.util"}),vr=new y({name:"InputStream",packageName:"java.io"});var A=class r extends T{constructor(e){super();l(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"bigInteger":this.writeBigInteger({writer:e,bigInteger:this.internalType});break;case"boolean":e.write(this.internalType.value.toString());break;case"builder":this.writeBuilder({writer:e,builder:this.internalType});break;case"bytes":e.write(`"${this.internalType.value}".getBytes()`);break;case"class":{this.writeClass({writer:e,class_:this.internalType});break}case"date":e.write(`"${this.internalType.value}"`);break;case"dateTime":this.writeDateTime({writer:e,dateTime:this.internalType});break;case"double":{let n=this.internalType.value.toString();!n.includes(".")&&!n.includes("e")&&!n.includes("E")?e.write(`${n}.0`):e.write(n);break}case"enum":this.writeEnum({writer:e,enum_:this.internalType});break;case"float":e.write(`${this.internalType.value}f`);break;case"integer":e.write(Math.floor(this.internalType.value).toString());break;case"list":{this.writeList({writer:e,list:this.internalType});break}case"long":{e.write(`${Math.floor(this.internalType.value)}L`);break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"optional":{this.writeOptional({writer:e,optional:this.internalType});break}case"raw":{this.internalType.value instanceof T?e.writeNode(this.internalType.value):e.write(this.internalType.value);break}case"reference":e.writeNode(this.internalType.value);break;case"set":{this.writeSet({writer:e,set:this.internalType});break}case"string":e.write(`"${this.escapeString(this.internalType.value)}"`);break;case"unknown":this.writeUnknown({writer:e,value:this.internalType.value});break;case"uuid":this.writeUUID({writer:e,uuid:this.internalType});break;case"nop":break;default:S(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static bigInteger(e){return new this({type:"bigInteger",value:e})}static boolean(e){return new this({type:"boolean",value:e})}static builder({classReference:e,parameters:n}){return new this({type:"builder",classReference:e,parameters:n})}static bytes(e){return new this({type:"bytes",value:e})}static class_({reference:e,parameters:n}){return new this({type:"class",reference:e,parameters:n})}static date(e){return new this({type:"date",value:e})}static dateTime(e){return new this({type:"dateTime",value:e})}static double(e){return new this({type:"double",value:e})}static enum_({classReference:e,value:n}){return new this({type:"enum",classReference:e,value:n})}static float(e){return new this({type:"float",value:e})}static integer(e){return new this({type:"integer",value:e})}static list({valueType:e,values:n,isParameter:i}){return new this({type:"list",valueType:e,values:n,isParameter:i})}static long(e){return new this({type:"long",value:e})}static map({keyType:e,valueType:n,entries:i}){return new this({type:"map",keyType:e,valueType:n,entries:i})}static optional({value:e,useOf:n}){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e,useOf:n})}static raw(e){return new this({type:"raw",value:e})}static reference(e){return new this({type:"reference",value:e})}static set({valueType:e,values:n}){return new this({type:"set",valueType:e,values:n})}static string(e){return new this({type:"string",value:e})}static unknown(e){return new this({type:"unknown",value:e})}static uuid(e){return new this({type:"uuid",value:e})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}shouldWriteInLine(){switch(this.internalType.type){case"bigInteger":case"boolean":case"bytes":case"date":case"dateTime":case"double":case"enum":case"float":case"integer":case"long":case"nop":case"raw":case"string":case"unknown":case"uuid":return!0;case"optional":return this.internalType.value.shouldWriteInLine();case"builder":case"class":case"list":case"map":case"reference":case"set":return!1;default:S(this.internalType)}}writeBigInteger({writer:e,bigInteger:n}){e.write("new "),e.writeNode(d.instantiateClass({classReference:Nr,arguments_:[r.string(n.value)]}))}writeBuilder({writer:e,builder:n}){e.writeNode(n.classReference),e.writeNewLineIfLastLineNot(),e.indent(),this.writeBuilderParameters({writer:e,parameters:this.orderBuilderParameters(Rr({parameters:n.parameters}))}),e.dedent()}writeBuilderParameters({writer:e,parameters:n}){e.writeLine(".builder()");for(let i of n)e.write(`.${i.name}(`),i.value.shouldWriteInLine()||e.newLine(),e.indent(),e.writeNode(i.value),e.dedent(),i.value.shouldWriteInLine()||e.newLine(),e.writeLine(")");e.writeNewLineIfLastLineNot(),e.write(".build()")}orderBuilderParameters(e){return e.some(i=>!i.value.isOptional()&&!this.isCollection(i.value))?e.sort((i,a)=>{let o=this.isNonRequired(i.value),c=this.isNonRequired(a.value);return o&&!c?1:!o&&c?-1:0}):e.sort((i,a)=>{let o=i.value.isOptional(),c=a.value.isOptional();return o&&!c?1:!o&&c?-1:0})}isCollection(e){let n=e.internalType.type;return n==="list"||n==="set"||n==="map"}isNonRequired(e){return e.isOptional()||this.isCollection(e)}writeClass({writer:e,class_:n}){let i=Er({parameters:n.parameters});e.writeNode(d.instantiateClass({classReference:n.reference,arguments_:i.map(a=>a.value)}))}writeDateTime({writer:e,dateTime:n}){e.writeNode(d.invokeMethod({on:Ar,method:"parse",arguments_:[r.string(n.value)]}))}writeEnum({writer:e,enum_:n}){e.writeNode(n.classReference),e.write("."+n.value)}writeList({writer:e,list:n}){this.writeIterable({writer:e,iterable:n})}writeMap({writer:e,map:n}){let i=br({entries:n.entries});if(i.length===0){e.write("new "),e.writeNode(we),e.write("<"),e.writeNode(n.keyType),e.write(", "),e.writeNode(n.valueType),e.write(">()");return}e.write("new "),e.writeNode(we),e.write("<"),e.writeNode(n.keyType),e.write(", "),e.writeNode(n.valueType),e.writeLine(">() {{"),e.indent();for(let a of i)e.write("put("),e.writeNode(a.key),e.write(", "),e.writeNode(a.value),e.writeLine(");");e.dedent(),e.write("}}")}writeOptional({writer:e,optional:n}){if(!n.useOf){e.writeNode(n.value);return}e.writeNode(d.invokeMethod({on:he,method:"of",arguments_:[n.value]}))}writeSet({writer:e,set:n}){this.writeIterable({writer:e,iterable:n})}writeIterable({writer:e,iterable:n}){let i=n.type==="list"?Ee:kr,a=Sr({values:n.values});if(n.type==="list"&&n.isParameter&&a.length>0){e.writeNode(d.invokeMethod({on:me,method:"asList",arguments_:a}));return}if(a.length===0){e.write(`new ${i.name}<`),e.writeNode(n.valueType),e.write(">()");return}e.write("new "),e.writeNode(i),e.write("<"),e.writeNode(n.valueType),e.writeLine(">("),e.indent(),e.writeNode(d.invokeMethod({on:me,method:"asList",arguments_:a})),e.writeNewLineIfLastLineNot(),e.dedent(),e.write(")")}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(`"${this.escapeString(n)}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownMap({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("new "),e.writeNode(Ee),e.write("<Object>()");return}e.write("new "),e.writeNode(Ee),e.write("<Object>("),e.writeNode(d.invokeMethod({on:me,method:"asList",arguments_:n.map(i=>r.unknown(i))})),e.write(")")}writeUnknownMap({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("new "),e.writeNode(we),e.write("<String, Object>()");return}e.writeLine("new "),e.writeNode(we),e.write("<String, Object>() {{"),e.indent();for(let[a,o]of i)e.write(`put("${a}", `),e.writeNode(r.unknown(o)),e.writeLine(");");e.dedent(),e.write("}}")}writeUUID({writer:e,uuid:n}){e.writeNode(d.invokeMethod({on:Ir,method:"fromString",arguments_:[r.string(n.value)]}))}escapeString(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}static isAlreadyOptional(e){return e.internalType.type==="optional"}},Ee=new y({name:"ArrayList",packageName:"java.util"}),Nr=new y({name:"BigInteger",packageName:"java.math"}),we=new y({name:"HashMap",packageName:"java.util"}),kr=new y({name:"HashSet",packageName:"java.util"}),Ui=new y({name:"List",packageName:"java.util"}),Mi=new y({name:"Map",packageName:"java.util"}),Ar=new y({name:"OffsetDateTime",packageName:"java.time"}),Fi=new y({name:"Set",packageName:"java.util"}),Ir=new y({name:"UUID",packageName:"java.util"});function Er({parameters:r}){return r.filter(t=>!A.isNop(t.value))}function Rr({parameters:r}){return r.filter(t=>!A.isNop(t.value))}function br({entries:r}){return r.filter(t=>!A.isNop(t.key)&&!A.isNop(t.value))}function Sr({values:r}){return r.filter(t=>!A.isNop(t))}function de({writer:r,arguments_:t}){let e=Cr(t);if(e.length===0){r.write("()");return}if(e.some(i=>i instanceof A&&!i.shouldWriteInLine())){Lr({writer:r,arguments_:e});return}r.write("("),e.forEach((i,a)=>{a>0&&r.write(", "),rt({writer:r,argument:i})}),r.write(")")}function Lr({writer:r,arguments_:t}){r.writeLine("("),r.indent(),t.forEach((e,n)=>{n>0&&r.writeLine(","),rt({writer:r,argument:e})}),r.dedent(),t.length>0&&r.newLine(),r.write(")")}function rt({writer:r,argument:t}){Ae(t)?r.writeNodeOrString(t.assignment):t.write(r)}function Cr(r){return r.filter(t=>!(t instanceof A&&A.isNop(t)))}var W=class extends T{constructor({classReference:e,arguments_:n}){super();l(this,"classReference");l(this,"arguments_");this.classReference=e,this.arguments_=n}write(e){e.writeNode(this.classReference),de({writer:e,arguments_:this.arguments_})}};u();f();var G=class extends T{constructor(e){super();l(this,"arg");this.arg=e}write(e){return new E(this.arg).write(e)}};u();f();var J=class extends T{constructor({name:e,access:n,parameters:i,body:a,static_:o,return_:c}){super();l(this,"name");l(this,"access");l(this,"parameters");l(this,"body");l(this,"return_");l(this,"static_");this.name=e,this.access=n,this.parameters=i,this.body=a,this.return_=c,this.static_=o!=null?o:!1}write(e){if(e.write(`${this.access} `),this.static_&&e.write("static "),this.return_!=null?e.writeNode(this.return_):e.write("void"),e.write(` ${this.name}`),this.parameters.length===0)e.write("()");else if(this.parameters.length===1){if(e.write("("),this.parameters[0]==null)throw new Error("Cannot render parameter "+this.parameters[0]);e.writeNode(this.parameters[0]),e.write(")")}else e.writeLine("("),e.indent(),this.parameters.forEach((n,i)=>{i>0&&e.writeLine(", "),e.writeNode(n)}),e.dedent(),e.write(")");if(this.body==null){e.write(";");return}e.writeLine(" {"),e.indent(),e.writeNode(this.body),e.writeNewLineIfLastLineNot(),e.dedent(),e.write("}")}};u();f();var V=class extends T{constructor({method:e,arguments_:n,on:i}){super();l(this,"on");l(this,"method");l(this,"arguments_");this.on=i,this.method=e,this.arguments_=n}write(e){this.on.write(e),e.write("."),e.write(this.method),de({writer:e,arguments_:this.arguments_})}};u();f();var H=class extends T{constructor({name:e,type:n}){super();l(this,"name");l(this,"type");this.name=e,this.type=n}write(e){e.writeNode(this.type),e.write(` ${this.name}`)}};function Br(r){return new G(r)}function _r(r){return new j(r)}function Ur(r){return new y(r)}function Mr(r){return new W(r)}function Fr(r){return new V(r)}function Pr(r){return new J(r)}function Or(r){return new H(r)}var Re=class{constructor({context:t}){l(this,"context");this.context=t}convert(t){switch(t.typeReference.type){case"list":return d.Type.list(this.convert({typeReference:t.typeReference}));case"literal":return this.convertLiteral({literal:t.typeReference.value});case"map":return d.Type.map(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":case"nullable":return d.Type.optional(this.convert({typeReference:t.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:t.typeReference.value});case"set":return d.Type.set(this.convert({typeReference:t.typeReference}));case"unknown":return this.convertUnknown();default:S(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 d.Type.reference(d.classReference({name:this.context.getClassName(t.declaration.name),packageName:this.context.getTypesPackageName(t.declaration.fernFilepath)}));default:S(t)}}convertLiteral({literal:t}){switch(t.type){case"boolean":return d.Type.boolean();case"string":return d.Type.string()}}convertUnknown(){return d.Type.object()}convertPrimitive({primitive:t}){switch(t){case"INTEGER":return d.Type.integer();case"UINT":return d.Type.integer();case"LONG":return d.Type.long();case"UINT_64":return d.Type.long();case"FLOAT":return d.Type.float();case"DOUBLE":return d.Type.double();case"BOOLEAN":return d.Type.boolean();case"STRING":return d.Type.string();case"DATE":return d.Type.date();case"DATE_TIME":return d.Type.dateTime();case"UUID":return d.Type.uuid();case"BASE_64":return d.Type.bytes();case"BIG_INTEGER":return d.Type.bigInteger();default:S(t)}}};0&&(module.exports={DynamicTypeMapper});
20
23
  /*! Bundled license information:
21
24
 
22
25
  @esbuild-plugins/node-globals-polyfill/Buffer.js: