@fern-api/go-dynamic-snippets 0.0.10 → 0.0.12

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 (65) hide show
  1. package/cjs/DiscriminatedUnionTypeInstance.cjs +11 -1
  2. package/cjs/DynamicSnippetsGenerator.cjs +19 -9
  3. package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
  4. package/cjs/{DynamicSnippetsGeneratorContext-DuDerGxa.d.cts → DynamicSnippetsGeneratorContext-f4OAff1R.d.cts} +5 -1
  5. package/cjs/EndpointSnippetGenerator.cjs +19 -9
  6. package/cjs/EndpointSnippetGenerator.d.cts +3 -1
  7. package/cjs/Result.cjs +11 -1
  8. package/cjs/Result.d.cts +1 -1
  9. package/cjs/Scope.cjs +11 -1
  10. package/cjs/TypeInstance.cjs +11 -1
  11. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +18 -8
  12. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
  13. package/cjs/context/DynamicTypeInstantiationMapper.cjs +25 -15
  14. package/cjs/context/DynamicTypeInstantiationMapper.d.cts +1 -1
  15. package/cjs/context/DynamicTypeMapper.cjs +18 -8
  16. package/cjs/context/DynamicTypeMapper.d.cts +1 -1
  17. package/cjs/context/ErrorReporter.cjs +11 -1
  18. package/cjs/context/FilePropertyMapper.cjs +25 -15
  19. package/cjs/context/FilePropertyMapper.d.cts +1 -1
  20. package/cjs/index.cjs +30 -8
  21. package/cjs/index.d.cts +1 -1
  22. package/esm/DiscriminatedUnionTypeInstance.js +1 -0
  23. package/esm/DynamicSnippetsGenerator.d.ts +1 -1
  24. package/esm/DynamicSnippetsGenerator.js +1 -1
  25. package/esm/{DynamicSnippetsGeneratorContext-DKWsHJSo.d.ts → DynamicSnippetsGeneratorContext-Dyk9qWMy.d.ts} +5 -1
  26. package/esm/EndpointSnippetGenerator.d.ts +3 -1
  27. package/esm/EndpointSnippetGenerator.js +1 -1
  28. package/esm/Result.d.ts +1 -1
  29. package/esm/Result.js +1 -1
  30. package/esm/Scope.js +1 -1
  31. package/esm/TypeInstance.js +1 -0
  32. package/esm/chunk-2AZXIWKY.js +11 -0
  33. package/esm/chunk-575DWQWD.js +1 -0
  34. package/esm/chunk-5TA7XQOD.js +1 -0
  35. package/esm/chunk-DMDZDIA7.js +1 -0
  36. package/esm/chunk-E5FOYV6P.js +19 -0
  37. package/esm/chunk-HBFOF5YT.js +1 -0
  38. package/esm/chunk-IIKN6XQS.js +1 -0
  39. package/esm/chunk-LLE63BZO.js +1 -0
  40. package/esm/chunk-M3DYFCFN.js +1 -0
  41. package/esm/chunk-VLNKANS2.js +1 -0
  42. package/esm/chunk-ZI6CAI2V.js +1 -0
  43. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
  44. package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
  45. package/esm/context/DynamicTypeInstantiationMapper.d.ts +1 -1
  46. package/esm/context/DynamicTypeInstantiationMapper.js +1 -1
  47. package/esm/context/DynamicTypeMapper.d.ts +1 -1
  48. package/esm/context/DynamicTypeMapper.js +1 -1
  49. package/esm/context/ErrorReporter.js +1 -1
  50. package/esm/context/FilePropertyMapper.d.ts +1 -1
  51. package/esm/context/FilePropertyMapper.js +1 -1
  52. package/esm/index.d.ts +1 -1
  53. package/esm/index.js +13 -1
  54. package/package.json +3 -6
  55. package/esm/chunk-4PKXKUYU.js +0 -1
  56. package/esm/chunk-5XUC5IOB.js +0 -1
  57. package/esm/chunk-6JCPJA27.js +0 -1
  58. package/esm/chunk-BC35GX6S.js +0 -1
  59. package/esm/chunk-COBOWL3P.js +0 -1
  60. package/esm/chunk-IQODEXPX.js +0 -1
  61. package/esm/chunk-KJOW5AZT.js +0 -1
  62. package/esm/chunk-UVYC4FWB.js +0 -1
  63. package/esm/chunk-VAYOWHUI.js +0 -19
  64. package/esm/chunk-ZQRLKIRW.js +0 -1
  65. package/esm/chunk-ZYGZ4VN4.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import '@fern-api/go-ast';
2
- export { b as DynamicTypeInstantiationMapper } from '../DynamicSnippetsGeneratorContext-DuDerGxa.cjs';
2
+ export { b as DynamicTypeInstantiationMapper } from '../DynamicSnippetsGeneratorContext-f4OAff1R.cjs';
3
3
  import '@fern-fern/ir-sdk/api';
4
4
  import '@fern-api/browser-compatible-base-generator';
5
5
  import '../TypeInstance.cjs';
@@ -1,11 +1,11 @@
1
- "use strict";var P=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var G=Object.prototype.hasOwnProperty;var j=(r,t,e)=>t in r?P(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var B=(r,t)=>{for(var e in t)P(r,e,{get:t[e],enumerable:!0})},W=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of U(t))!G.call(r,i)&&i!==e&&P(r,i,{get:()=>t[i],enumerable:!(n=C(t,i))||n.enumerable});return r};var V=r=>W(P({},"__esModule",{value:!0}),r);var o=(r,t,e)=>j(r,typeof t!="symbol"?t+"":t,e);var ye={};B(ye,{DynamicTypeMapper:()=>M});module.exports=V(ye);function d(r){throw new Error("Unexpected value: "+JSON.stringify(r))}var x=class{};var T=class extends x{constructor(e){super();o(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var Y=4,k=class{constructor(){o(this,"buffer","");o(this,"indentLevel",0);o(this,"hasWrittenAnything",!1);o(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
2
- `),n=e?t.substring(0,t.length-1):t,i=this.getIndentString(),s=n.replaceAll(`
1
+ "use strict";var re=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var Ze=Object.prototype.hasOwnProperty;var Qe=(r,t,e)=>t in r?re(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var he=(r,t)=>()=>(r&&(t=r(r=0)),t);var ge=(r,t)=>{for(var e in t)re(r,e,{get:t[e],enumerable:!0})},Xe=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ze(t))!Ze.call(r,i)&&i!==e&&re(r,i,{get:()=>t[i],enumerable:!(n=Je(t,i))||n.enumerable});return r};var qe=r=>Xe(re({},"__esModule",{value:!0}),r);var c=(r,t,e)=>Qe(r,typeof t!="symbol"?t+"":t,e);function Ee(){throw new Error("setTimeout has not been defined")}function ve(){throw new Error("clearTimeout has not been defined")}function Ne(r){if(D===setTimeout)return setTimeout(r,0);if((D===Ee||!D)&&setTimeout)return D=setTimeout,setTimeout(r,0);try{return D(r,0)}catch(t){try{return D.call(null,r,0)}catch(e){return D.call(this,r,0)}}}function Ke(r){if(C===clearTimeout)return clearTimeout(r);if((C===ve||!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 je(){!q||!F||(q=!1,F.length?L=F.concat(L):ne=-1,L.length&&Re())}function Re(){if(!q){var r=Ne(je);q=!0;for(var t=L.length;t;){for(F=L,L=[];++ne<t;)F&&F[ne].run();ne=-1,t=L.length}F=null,q=!1,Ke(r)}}function et(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 Ie(r,t)),L.length===1&&!q&&Ne(Re)}function Ie(r,t){this.fun=r,this.array=t}function $(){}function dt(r){throw new Error("process.binding is not supported")}function xt(){return"/"}function Tt(r){throw new Error("process.chdir is not supported")}function gt(){return 0}function Et(r){var t=At.call(X)*.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 Nt(){var r=new Date,t=r-vt;return t/1e3}var D,C,L,q,F,ne,tt,rt,nt,it,ot,st,at,ut,ft,ct,pt,ht,lt,mt,wt,yt,X,At,vt,m,Ae,u=he(()=>{"use strict";D=Ee,C=ve;typeof globalThis.setTimeout=="function"&&(D=setTimeout);typeof globalThis.clearTimeout=="function"&&(C=clearTimeout);L=[],q=!1,ne=-1;Ie.prototype.run=function(){this.fun.apply(null,this.array)};tt="browser",rt="browser",nt=!0,it={},ot=[],st="",at={},ut={},ft={};ct=$,pt=$,ht=$,lt=$,mt=$,wt=$,yt=$;X=globalThis.performance||{},At=X.now||X.mozNow||X.msNow||X.oNow||X.webkitNow||function(){return new Date().getTime()};vt=new Date;m={nextTick:et,title:tt,browser:nt,env:it,argv:ot,version:st,versions:at,on:ct,addListener:pt,once:ht,off:lt,removeListener:mt,removeAllListeners:wt,emit:yt,binding:dt,cwd:xt,chdir:Tt,umask:gt,hrtime:Et,platform:rt,release:ut,config:ft,uptime:Nt},Ae={};Object.keys(Ae).forEach(r=>{let t=r.split("."),e=m;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Ae[r]:e=e[i]||(e[i]={})}})});function Ue(){me=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)k[t]=r[t],v[r.charCodeAt(t)]=t;v[45]=62,v[95]=63}function It(r){me||Ue();var t,e,n,i,o,s,p=r.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[p-2]==="="?2:r[p-1]==="="?1:0,s=new Rt(p*3/4-o),n=o>0?p-4:p;var h=0;for(t=0,e=0;t<n;t+=4,e+=3)i=v[r.charCodeAt(t)]<<18|v[r.charCodeAt(t+1)]<<12|v[r.charCodeAt(t+2)]<<6|v[r.charCodeAt(t+3)],s[h++]=i>>16&255,s[h++]=i>>8&255,s[h++]=i&255;return o===2?(i=v[r.charCodeAt(t)]<<2|v[r.charCodeAt(t+1)]>>4,s[h++]=i&255):o===1&&(i=v[r.charCodeAt(t)]<<10|v[r.charCodeAt(t+1)]<<4|v[r.charCodeAt(t+2)]>>2,s[h++]=i>>8&255,s[h++]=i&255),s}function _t(r){return k[r>>18&63]+k[r>>12&63]+k[r>>6&63]+k[r&63]}function kt(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(_t(n));return i.join("")}function _e(r){me||Ue();for(var t,e=r.length,n=e%3,i="",o=[],s=16383,p=0,h=e-n;p<h;p+=s)o.push(kt(r,p,p+s>h?h:p+s));return n===1?(t=r[e-1],i+=k[t>>2],i+=k[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=k[t>>10],i+=k[t>>4&63],i+=k[t<<2&63],i+="="),o.push(i),o.join("")}function ie(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function P(r,t){if(ie()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=a.prototype):(r===null&&(r=new a(t)),r.length=t),r}function a(r,t,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(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 we(this,r)}return Le(this,r,t,e)}function Le(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?Lt(r,t,e,n):typeof t=="string"?Ut(r,t,e):Pt(r,t)}function Pe(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 St(r,t,e,n){return Pe(t),t<=0?P(r,t):e!==void 0?typeof n=="string"?P(r,t).fill(e,n):P(r,t).fill(e):P(r,t)}function we(r,t){if(Pe(t),r=P(r,t<0?0:ye(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Ut(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=Be(t,e)|0;r=P(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:ye(t.length)|0;r=P(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Lt(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),a.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=a.prototype):r=le(r,t),r}function Pt(r,t){if(S(t)){var e=ye(t.length)|0;return r=P(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)?P(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 ye(r){if(r>=ie())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ie().toString(16)+" bytes");return r|0}function S(r){return!!(r!=null&&r._isBuffer)}function Be(r,t){if(S(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 oe(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return $e(r).length;default:if(n)return oe(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 Wt(this,t,e);case"utf8":case"utf-8":return De(this,t,e);case"ascii":return Ot(this,t,e);case"latin1":case"binary":return Gt(this,t,e);case"base64":return Ft(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function O(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=a.from(t,n)),S(t))return t.length===0?-1:ke(r,t,e,n,i);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):ke(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function ke(r,t,e,n,i){var o=1,s=r.length,p=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,s/=2,p/=2,e/=2}function h(E,Q){return o===1?E[Q]:E.readUInt16BE(Q*o)}var w;if(i){var y=-1;for(w=e;w<s;w++)if(h(r,w)===h(t,y===-1?0:w-y)){if(y===-1&&(y=w),w-y+1===p)return y*o}else y!==-1&&(w-=w-y),y=-1}else for(e+p>s&&(e=s-p),w=e;w>=0;w--){for(var l=!0,I=0;I<p;I++)if(h(r,w+I)!==h(t,I)){l=!1;break}if(l)return w}return-1}function bt(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var p=parseInt(t.substr(s*2,2),16);if(isNaN(p))return s;r[e+s]=p}return s}function Mt(r,t,e,n){return ue(oe(t,r.length-e),r,e,n)}function Me(r,t,e,n){return ue(Qt(t),r,e,n)}function Dt(r,t,e,n){return Me(r,t,e,n)}function Ct(r,t,e,n){return ue($e(t),r,e,n)}function Yt(r,t,e,n){return ue(Xt(t,r.length-e),r,e,n)}function Ft(r,t,e){return t===0&&e===r.length?_e(r):_e(r.slice(t,e))}function De(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],s=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=e){var h,w,y,l;switch(p){case 1:o<128&&(s=o);break;case 2:h=r[i+1],(h&192)===128&&(l=(o&31)<<6|h&63,l>127&&(s=l));break;case 3:h=r[i+1],w=r[i+2],(h&192)===128&&(w&192)===128&&(l=(o&15)<<12|(h&63)<<6|w&63,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:h=r[i+1],w=r[i+2],y=r[i+3],(h&192)===128&&(w&192)===128&&(y&192)===128&&(l=(o&15)<<18|(h&63)<<12|(w&63)<<6|y&63,l>65535&&l<1114112&&(s=l))}}s===null?(s=65533,p=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=p}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 Ot(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 Gt(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 Wt(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=Zt(r[o]);return i}function Vt(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function 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 g(r,t,e,n,i,o){if(!S(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function se(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function ae(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function Ce(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Ye(r,t,e,n,i){return i||Ce(r,t,e,4,34028234663852886e22,-34028234663852886e22),Ge(r,t,e,n,23,4),e+4}function Fe(r,t,e,n,i){return i||Ce(r,t,e,8,17976931348623157e292,-17976931348623157e292),Ge(r,t,e,n,52,8),e+8}function Jt(r){if(r=zt(r).replace(Ht,""),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 Zt(r){return r<16?"0"+r.toString(16):r.toString(16)}function oe(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],s=0;s<n;++s){if(e=r.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Qt(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Xt(r,t){for(var e,n,i,o=[],s=0;s<r.length&&!((t-=2)<0);++s)e=r.charCodeAt(s),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function $e(r){return It(Jt(r))}function ue(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 Kt(r){return r!=null&&(!!r._isBuffer||Oe(r)||jt(r))}function Oe(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function jt(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Oe(r.slice(0,0))}function fe(r,t,e,n,i){var o,s,p=i*8-n-1,h=(1<<p)-1,w=h>>1,y=-7,l=e?i-1:0,I=e?-1:1,E=r[t+l];for(l+=I,o=E&(1<<-y)-1,E>>=-y,y+=p;y>0;o=o*256+r[t+l],l+=I,y-=8);for(s=o&(1<<-y)-1,o>>=-y,y+=n;y>0;s=s*256+r[t+l],l+=I,y-=8);if(o===0)o=1-w;else{if(o===h)return s?NaN:(E?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-w}return(E?-1:1)*s*Math.pow(2,o-n)}function Ge(r,t,e,n,i,o){var s,p,h,w=o*8-i-1,y=(1<<w)-1,l=y>>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=n?0:o-1,Q=n?1:-1,He=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,s=y):(s=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-s))<1&&(s--,h*=2),s+l>=1?t+=I/h:t+=I*Math.pow(2,1-l),t*h>=2&&(s++,h/=2),s+l>=y?(p=0,s=y):s+l>=1?(p=(t*h-1)*Math.pow(2,i),s=s+l):(p=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;r[e+E]=p&255,E+=Q,p/=256,i-=8);for(s=s<<i|p,w+=i;w>0;r[e+E]=s&255,E+=Q,s/=256,w-=8);r[e+E-Q]|=He*128}var k,v,Rt,me,Se,Ht,We=he(()=>{"use strict";u();f();k=[],v=[],Rt=typeof Uint8Array!="undefined"?Uint8Array:Array,me=!1;a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;a.poolSize=8192;a._augment=function(r){return r.__proto__=a.prototype,r};a.from=function(r,t,e){return Le(null,r,t,e)};a.kMaxLength=ie();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(r,t,e){return St(null,r,t,e)};a.allocUnsafe=function(r){return we(null,r)};a.allocUnsafeSlow=function(r){return we(null,r)};a.isBuffer=Kt;a.compare=function(t,e){if(!S(t)||!S(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,s=Math.min(n,i);o<s;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=a.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!S(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};a.byteLength=Be;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)O(this,e,e+1);return this};a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)O(this,e,e+3),O(this,e+1,e+2);return this};a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)O(this,e,e+7),O(this,e+1,e+6),O(this,e+2,e+5),O(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?De(this,0,t):Bt.apply(this,arguments)};a.prototype.equals=function(t){if(!S(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,n,i,o){if(!S(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,p=n-e,h=Math.min(s,p),w=this.slice(i,o),y=t.slice(e,n),l=0;l<h;++l)if(w[l]!==y[l]){s=w[l],p=y[l];break}return s<p?-1:p<s?1:0};a.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};a.prototype.indexOf=function(t,e,n){return be(this,t,e,n,!0)};a.prototype.lastIndexOf=function(t,e,n){return be(this,t,e,n,!1)};a.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return bt(this,t,e,n);case"utf8":case"utf-8":return Mt(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 Ct(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Yt(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Se=4096;a.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(a.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=a.prototype;else{var o=e-t;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i};a.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||T(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return i};a.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||T(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};a.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]};a.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};a.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])};a.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||T(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||T(t,e,this.length);for(var i=e,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(t,e){return e||T(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.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};a.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};a.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};a.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]};a.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),fe(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),fe(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),fe(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),fe(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;g(this,t,e,n,o,0)}var s=1,p=0;for(this[e]=t&255;++p<n&&(s*=256);)this[e+p]=t/s&255;return e+n};a.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;g(this,t,e,n,o,0)}var s=n-1,p=1;for(this[e+s]=t&255;--s>=0&&(p*=256);)this[e+s]=t/p&255;return e+n};a.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):se(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):se(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):ae(this,t,e,!0),e+4};a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ae(this,t,e,!1),e+4};a.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);g(this,t,e,n,o-1,-o)}var s=0,p=1,h=0;for(this[e]=t&255;++s<n&&(p*=256);)t<0&&h===0&&this[e+s-1]!==0&&(h=1),this[e+s]=(t/p>>0)-h&255;return e+n};a.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);g(this,t,e,n,o-1,-o)}var s=n-1,p=1,h=0;for(this[e+s]=t&255;--s>=0&&(p*=256);)t<0&&h===0&&this[e+s+1]!==0&&(h=1),this[e+s]=(t/p>>0)-h&255;return e+n};a.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};a.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):se(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):se(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):ae(this,t,e,!0),e+4};a.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ae(this,t,e,!1),e+4};a.prototype.writeFloatLE=function(t,e,n){return Ye(this,t,e,!0,n)};a.prototype.writeFloatBE=function(t,e,n){return Ye(this,t,e,!1,n)};a.prototype.writeDoubleLE=function(t,e,n){return Fe(this,t,e,!0,n)};a.prototype.writeDoubleBE=function(t,e,n){return Fe(this,t,e,!1,n)};a.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,s;if(this===t&&n<e&&e<i)for(s=o-1;s>=0;--s)t[s+e]=this[s+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+e]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};a.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.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 s;if(typeof t=="number")for(s=e;s<n;++s)this[s]=t;else{var p=S(t)?t:oe(new a(t,i).toString()),h=p.length;for(s=0;s<n-e;++s)this[s+e]=p[s%h]}return this};Ht=/[^+\/0-9A-Za-z-_]/g});var f=he(()=>{"use strict";We()});var Rr={};ge(Rr,{DynamicTypeMapper:()=>Te});module.exports=qe(Rr);u();f();u();f();u();f();function B(r){throw new Error("Unexpected value: "+JSON.stringify(r))}u();f();u();f();u();f();var G=class{};u();f();u();f();var Y=class extends G{constructor(e){super();c(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var er=4,K=class{constructor(){c(this,"buffer","");c(this,"indentLevel",0);c(this,"hasWrittenAnything",!1);c(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
2
+ `),n=e?t.substring(0,t.length-1):t,i=this.getIndentString(),o=n.replaceAll(`
3
3
  `,`
4
- ${i}`);this.isAtStartOfLine()&&(s=i+s),e&&(s+=`
5
- `),this.writeInternal(s)}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){t.write(this)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new T(t).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new T(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(t,e="{",n,i="}"){let s=t.filter(p=>p!==void 0).join(" ");s?this.write(`${s} ${e!=null?e:""}`):this.write(e!=null?e:"");try{this.indent(),n(),this.dedent()}finally{this.write(i!=null?i:"")}}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
4
+ ${i}`);this.isAtStartOfLine()&&(o=i+o),e&&(o+=`
5
+ `),this.writeInternal(o)}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){t.write(this)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new Y(t).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new Y(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(t,e="{",n,i="}"){let o=t.filter(s=>s!==void 0).join(" ");o?this.write(`${o} ${e!=null?e:""}`):this.write(e!=null?e:"");try{this.indent(),n(),this.dedent()}finally{this.write(i!=null?i:"")}}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
6
6
  `)}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
7
7
  `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
8
- `)),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*Y)}};var E=class{},I=class extends E{async format(t){return t}formatSync(t){return t}};function _(r){return(r==null?void 0:r.name)!=null}function O(r,t){var n,i;let e=(n=r.split("/").pop())!=null?n:r;return t!=null&&t.stripExtension&&(i=e.split(".")[0])!=null?i:e}var H=/[^0-9a-zA-Z_]/g,N=class extends k{constructor({packageName:e,rootImportPath:n,importPath:i,customConfig:s,formatter:p}){super();o(this,"packageName");o(this,"rootImportPath");o(this,"importPath");o(this,"customConfig");o(this,"formatter");o(this,"imports",{});this.packageName=e,this.rootImportPath=n,this.importPath=i,this.customConfig=s,this.formatter=p!=null?p:new I}addImport(e){let n=this.imports[e];if(n!=null)return n;let i=this.getValidAlias(O(e));for(;i in this.imports;)i="_"+i;return this.imports[e]=i,i}getValidAlias(e){let n=e.split("-");return n[0]==null?e:n[0].replace(H,"")}};var S=class extends N{constructor({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:s}){super({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:s})}async toString(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format Go file: ${e}
8
+ `)),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*er)}};u();f();var ce=class{},j=class extends ce{async format(t){return t}formatSync(t){return t}};u();f();function de(r){return(r==null?void 0:r.name)!=null}u();f();u();f();u();f();u();f();u();f();u();f();u();f();function xe(r,t){var n,i;let e=(n=r.split("/").pop())!=null?n:r;return t!=null&&t.stripExtension&&(i=e.split(".")[0])!=null?i:e}var tr=/[^0-9a-zA-Z_]/g,W=class extends K{constructor({packageName:e,rootImportPath:n,importPath:i,customConfig:o,formatter:s}){super();c(this,"packageName");c(this,"rootImportPath");c(this,"importPath");c(this,"customConfig");c(this,"formatter");c(this,"imports",{});this.packageName=e,this.rootImportPath=n,this.importPath=i,this.customConfig=o,this.formatter=s!=null?s:new j}addImport(e){let n=this.imports[e];if(n!=null)return n;let i=this.getValidAlias(xe(e));for(;i in this.imports;)i="_"+i;return this.imports[e]=i,i}getValidAlias(e){let n=e.split("-");return n[0]==null?e:n[0].replace(tr,"")}};var ee=class extends W{constructor({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o}){super({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o})}async toString(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format Go file: ${e}
9
9
  ${t}`)}return t}toStringSync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(t)}catch(e){throw new Error(`Failed to format Go file: ${e}
10
10
  ${t}`)}return t}getContent(){let t=`package ${this.packageName}
11
11
 
@@ -14,6 +14,16 @@ ${t}`)}return t}getContent(){let t=`package ${this.packageName}
14
14
  ${this.buffer}`:t+this.buffer}stringifyImports(){let t=Object.entries(this.imports).filter(([e,n])=>e!==this.importPath).map(([e,n])=>` ${n} "${e}"`).join(`
15
15
  `);return t?`import (
16
16
  ${t}
17
- )`:""}};var a=class extends x{async toString({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:s}){let p=new S({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:s});return this.write(p),p.toString()}toStringSync({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:s}){let p=new S({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:s});return this.write(p),p.toStringSync()}};var h=class extends a{constructor(e){super();o(this,"arg");this.arg=e}write(e){return new T(this.arg).write(e)}};var m=class extends a{constructor({docs:e}={}){super();o(this,"docs");this.docs=e}write(e){this.docs!=null&&this.docs.split(`
18
- `).forEach(n=>{e.writeLine(`// ${n}`)})}};var g=class extends a{constructor({name:e,docs:n}){super();o(this,"name");o(this,"docs");o(this,"members",[]);this.name=e,this.docs=n}addMember(e){this.members.push(e)}write(e){e.writeNode(new m({docs:this.docs})),e.write(`type ${this.name} string`)}};var v=class extends a{constructor({name:e,type:n,docs:i}){super();o(this,"name");o(this,"type");o(this,"docs");this.name=e,this.type=n,this.docs=i}write(e){e.writeNode(new m({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};var y=class extends a{constructor({name:e,parameters:n,return_:i,body:s,docs:p,typeReference:D}){super();o(this,"name");o(this,"parameters");o(this,"return_");o(this,"body");o(this,"docs");o(this,"typeReference");this.name=e,this.parameters=n,this.return_=i,this.body=s,this.docs=p,this.typeReference=D}write(e){var n;if(e.writeNode(new m({docs:this.docs})),e.write("func "),this.typeReference!=null&&this.writeReceiver({writer:e,typeReference:this.typeReference}),e.write(`${this.name}`),this.parameters.length===0)e.write("() ");else{e.writeLine("(");for(let i of this.parameters)e.writeNode(i),e.writeLine(",");e.write(")")}this.return_!=null&&(e.write("("),this.return_.forEach((i,s)=>{s>0&&e.write(", "),e.writeNode(i)}),e.write(")")),e.writeLine(" {"),e.indent(),(n=this.body)==null||n.write(e),e.dedent(),e.writeNewLineIfLastLineNot(),e.writeLine("}")}writeReceiver({writer:e,typeReference:n}){e.write(`(${this.getReceiverName(n.name)} `),n.write(e),e.write(") ")}getReceiverName(e){return e.charAt(0).toLowerCase()}};var b=class extends a{constructor({name:e,parameters:n,return_:i,body:s,docs:p}){super();o(this,"func");this.func=new y({name:e,parameters:n,return_:i,body:s,docs:p})}get name(){return this.func.name}get parameters(){return this.func.parameters}get return_(){return this.func.return_}get body(){return this.func.body}get docs(){return this.func.docs}write(e){e.writeNode(this.func)}};var u=class extends a{constructor({name:e,importPath:n}){super();o(this,"name");o(this,"importPath");this.name=e,this.importPath=n}write(e){if(e.importPath===this.importPath){e.write(this.name);return}let n=e.addImport(this.importPath);e.write(`${n}.${this.name}`)}};var w=class extends a{constructor({method:e,arguments_:n,on:i}){super();o(this,"on");o(this,"method");o(this,"arguments_");this.on=i,this.method=e,this.arguments_=n}write(e){this.on.write(e),e.write("."),e.write(this.method),$({writer:e,arguments_:this.arguments_})}};var J=new Set(["bool","date","dateTime","float64","int","int64","string","uuid"]),F=new Set(["any","bytes","map","slice"]),l=class r extends a{constructor(e){super();o(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"any":this.writeAny({writer:e,value:this.internalType.value});break;case"bool":e.write(this.internalType.value.toString());break;case"bytes":e.write(`[]byte("${this.internalType.value}")`);break;case"date":case"dateTime":e.writeNode(K({writer:e,type:this.internalType}));break;case"enum":e.writeNode(this.internalType.typeReference);break;case"float64":e.write(this.internalType.value.toString());break;case"int":case"int64":e.write(this.internalType.value.toString());break;case"map":this.writeMap({writer:e,map:this.internalType});break;case"nil":e.write("nil");break;case"nop":break;case"optional":this.writeOptional({writer:e,type:this.internalType.value});break;case"reference":e.writeNode(this.internalType.value);break;case"slice":this.writeSlice({writer:e,slice:this.internalType});break;case"string":e.write(this.internalType.value.includes('"')||this.internalType.value.includes(`
19
- `)?`\`${this.internalType.value}\``:`"${this.internalType.value}"`);break;case"struct":this.writeStruct({writer:e,struct:this.internalType});break;case"uuid":e.writeNode(q({value:this.internalType.value}));break;default:d(this.internalType)}}static any(e){return new this({type:"any",value:e})}static bool(e){return new this({type:"bool",value:e})}static bytes(e){return new this({type:"bytes",value:e})}static date(e){return new this({type:"date",value:e})}static dateTime(e){return new this({type:"dateTime",value:e})}static enum(e){return new this({type:"enum",typeReference:e})}static float64(e){return new this({type:"float64",value:e})}static int(e){return new this({type:"int",value:e})}static int64(e){return new this({type:"int64",value:e})}static map({keyType:e,valueType:n,entries:i}){return new this({type:"map",keyType:e,valueType:n,entries:i})}static nil(){return new this({type:"nil"})}static nop(){return new this({type:"nop"})}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 slice({valueType:e,values:n}){return new this({type:"slice",valueType:e,values:n})}static string(e){return new this({type:"string",value:e})}static struct({typeReference:e,fields:n}){return new this({type:"struct",typeReference:e,fields:n})}static structPointer({typeReference:e,fields:n}){return new this({type:"optional",value:new this({type:"struct",typeReference:e,fields:n})})}static uuid(e){return new this({type:"uuid",value:e})}static isNop(e){return e.internalType.type==="optional"?this.isNop(e.internalType.value):e.internalType.type==="nop"}writeAny({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("nil");return}if(Array.isArray(n)){this.writeAnyArray({writer:e,value:n});return}this.writeAnyObject({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeAnyArray({writer:e,value:n}){if(e.write("[]interface{}"),n.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let i of n)e.writeNode(r.any(i)),e.writeLine(",");e.dedent(),e.write("}")}writeAnyObject({writer:e,value:n}){e.write("map[string]interface{}");let i=Object.entries(n);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[s,p]of i)e.write(`"${s}": `),e.writeNode(r.any(p)),e.writeLine(",");e.dedent(),e.write("}")}writeMap({writer:e,map:n}){e.write("map["),e.writeNode(n.keyType),e.write("]"),e.writeNode(n.valueType);let i=Q({entries:n.entries});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let s of i)s.key.write(e),e.write(": "),s.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeOptional({writer:e,type:n}){if(J.has(n.internalType.type)){e.writeNode(Z({writer:e,type:n}));return}if(F.has(n.internalType.type)){n.write(e);return}if(n.internalType.type==="enum"){e.writeNode(new w({on:n.internalType.typeReference,method:"Ptr",arguments_:[]}));return}e.write("&"),n.write(e)}static isAlreadyOptional(e){return e.internalType.type==="optional"||F.has(e.internalType.type)}writeSlice({writer:e,slice:n}){e.write("[]"),e.writeNode(n.valueType);let i=ee({values:n.values});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let s of i)s.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeStruct({writer:e,struct:n}){e.writeNode(n.typeReference);let i=X({fields:n.fields});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let s of i)e.write(`${s.name}: `),s.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}};function Z({writer:r,type:t}){return new f({func:new u({name:z({type:t}),importPath:r.rootImportPath}),arguments_:[t]})}function z({type:r}){switch(r.internalType.type){case"bool":return"Bool";case"date":case"dateTime":return"Time";case"float64":return"Float64";case"int":return"Int";case"int64":return"Int64";case"string":return"String";case"uuid":return"UUID";default:return""}}function K({writer:r,type:t}){let e=t instanceof Date?"MustParseDate":"MustParseDateTime";return new f({func:new u({name:e,importPath:r.rootImportPath}),arguments_:[new h(`"${t.value}"`)]})}function q({value:r}){return new f({func:new u({name:"MustParse",importPath:"github.com/google/uuid"}),arguments_:[new h(`"${r}"`)]})}function Q({entries:r}){return r.filter(t=>!l.isNop(t.key)&&!l.isNop(t.value))}function X({fields:r}){return r.filter(t=>!l.isNop(t.value))}function ee({values:r}){return r.filter(t=>!l.isNop(t))}function $({writer:r,arguments_:t}){let e=ne(t);if(e.length===0){r.write("()");return}r.writeLine("("),r.indent();for(let n of e)te({writer:r,argument:n}),r.writeLine(",");r.dedent(),r.write(")")}function te({writer:r,argument:t}){_(t)?t.assignment.write(r):t.write(r)}function ne(r){return r.filter(t=>!(t instanceof l&&l.isNop(t)))}var f=class extends a{constructor({func:e,arguments_:n}){super();o(this,"func");o(this,"arguments_");this.func=e,this.arguments_=n}write(e){e.writeNode(this.func),$({writer:e,arguments_:this.arguments_})}};var A=class extends a{constructor({name:e,type:n,docs:i}){super();o(this,"name");o(this,"type");o(this,"docs");this.name=e,this.type=n,this.docs=i}write(e){e.writeNode(new m({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};var L=class extends a{constructor({name:e,importPath:n,docs:i}){super();o(this,"name");o(this,"importPath");o(this,"docs");o(this,"fields",[]);o(this,"methods",[]);this.name=e,this.importPath=n,this.docs=i}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){if(e.writeNode(new m({docs:this.docs})),e.write(`type ${this.name} struct {`),this.fields.length>0)e.writeLine("}");else{e.newLine(),e.indent();for(let n of this.fields)e.writeNode(n),e.newLine();e.dedent(),e.writeLine("}")}(this.constructor!=null||this.methods.length>0)&&e.newLine();for(let n of this.methods)e.writeNode(n),e.newLine()}};var re=new Set(["any","bytes","map","slice"]),R=class r extends a{constructor(e){super();o(this,"internalType");this.internalType=e}write(e,{comment:n}={}){switch(this.internalType.type){case"any":e.write("interface{}");break;case"bool":e.write("bool");break;case"bytes":e.write("[]byte");break;case"date":case"dateTime":e.writeNode(ie);break;case"float64":e.write("float64");break;case"int":e.write("int");break;case"int64":e.write("int64");break;case"map":{e.write("map["),this.internalType.keyType.write(e),e.write("]"),this.internalType.valueType.write(e);break}case"optional":{e.write("*"),this.internalType.value.write(e);break}case"reference":e.writeNode(this.internalType.value);break;case"slice":e.write("[]"),this.internalType.value.write(e);break;case"string":e.write("string");break;case"uuid":e.writeNode(oe);break;default:d(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static any(){return new this({type:"any"})}static bool(){return new this({type:"bool"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static float64(){return new this({type:"float64"})}static int(){return new this({type:"int"})}static int64(){return new this({type:"int64"})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static pointer(e){return r.optional(e)}static reference(e){return new this({type:"reference",value:e})}static slice(e){return new this({type:"slice",value:e})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static isAlreadyOptional(e){return e.internalType.type==="optional"||re.has(e.internalType.type)}},ie=new u({importPath:"time",name:"Time"}),oe=new u({importPath:"github.com/google/uuid",name:"UUID"});var c={};B(c,{AstNode:()=>a,CodeBlock:()=>h,Enum:()=>g,Field:()=>v,Func:()=>b,FuncInvocation:()=>f,Method:()=>y,MethodInvocation:()=>w,Parameter:()=>A,Struct:()=>L,Type:()=>R,TypeInstantiation:()=>l,TypeReference:()=>u,Writer:()=>N,codeblock:()=>se,enum_:()=>ae,field:()=>ce,func:()=>pe,invokeFunc:()=>ue,invokeMethod:()=>me,method:()=>le,parameter:()=>fe,struct:()=>he,typeReference:()=>de});function se(r){return new h(r)}function ae(r){return new g(r)}function ce(r){return new v(r)}function pe(r){return new b(r)}function ue(r){return new f(r)}function me(r){return new w(r)}function le(r){return new y(r)}function fe(r){return new A(r)}function he(r){return new L(r)}function de(r){return new u(r)}var M=class{constructor({context:t}){o(this,"context");this.context=t}convert(t){switch(t.typeReference.type){case"list":return c.Type.slice(this.convert({typeReference:t.typeReference}));case"literal":return this.convertLiteral({literal:t.typeReference.value});case"map":return c.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":return c.Type.optional(this.convert({typeReference:t.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:t.typeReference.value});case"set":return c.Type.slice(this.convert({typeReference:t.typeReference}));case"unknown":return this.convertUnknown();default:d(t.typeReference)}}convertLiteral({literal:t}){switch(t.type){case"boolean":return c.Type.bool();case"string":return c.Type.string()}}convertNamed({named:t}){let e=c.Type.reference(c.typeReference({name:this.context.getTypeName(t.declaration.name),importPath:this.context.getImportPath(t.declaration.fernFilepath)}));switch(t.type){case"alias":case"enum":return e;case"discriminatedUnion":case"object":case"undiscriminatedUnion":return c.Type.pointer(e);default:d(t)}}convertUnknown(){return c.Type.any()}convertPrimitive({primitive:t}){switch(t){case"INTEGER":return c.Type.int();case"UINT":return c.Type.int();case"LONG":return c.Type.int64();case"UINT_64":return c.Type.int64();case"FLOAT":return c.Type.float64();case"DOUBLE":return c.Type.float64();case"BOOLEAN":return c.Type.bool();case"STRING":return c.Type.string();case"DATE":return c.Type.date();case"DATE_TIME":return c.Type.dateTime();case"UUID":return c.Type.uuid();case"BASE_64":return c.Type.bytes();case"BIG_INTEGER":return c.Type.string();default:d(t)}}};0&&(module.exports={DynamicTypeMapper});
17
+ )`:""}};var d=class extends G{async toString({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o}){let s=new ee({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o});return this.write(s),s.toString()}toStringSync({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o}){let s=new ee({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o});return this.write(s),s.toStringSync()}};var U=class extends d{constructor(e){super();c(this,"arg");this.arg=e}write(e){return new Y(this.arg).write(e)}};u();f();u();f();var N=class extends d{constructor({docs:e}={}){super();c(this,"docs");this.docs=e}write(e){this.docs!=null&&this.docs.split(`
18
+ `).forEach(n=>{e.writeLine(`// ${n}`)})}};var V=class extends d{constructor({name:e,docs:n}){super();c(this,"name");c(this,"docs");c(this,"members",[]);this.name=e,this.docs=n}addMember(e){this.members.push(e)}write(e){e.writeNode(new N({docs:this.docs})),e.write(`type ${this.name} string`)}};u();f();var H=class extends d{constructor({name:e,type:n,docs:i}){super();c(this,"name");c(this,"type");c(this,"docs");this.name=e,this.type=n,this.docs=i}write(e){e.writeNode(new N({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};u();f();u();f();var b=class extends d{constructor({name:e,parameters:n,return_:i,body:o,docs:s,typeReference:p}){super();c(this,"name");c(this,"parameters");c(this,"return_");c(this,"body");c(this,"docs");c(this,"typeReference");this.name=e,this.parameters=n,this.return_=i,this.body=o,this.docs=s,this.typeReference=p}write(e){var n;if(e.writeNode(new N({docs:this.docs})),e.write("func "),this.typeReference!=null&&this.writeReceiver({writer:e,typeReference:this.typeReference}),e.write(`${this.name}`),this.parameters.length===0)e.write("() ");else{e.writeLine("(");for(let i of this.parameters)e.writeNode(i),e.writeLine(",");e.write(")")}this.return_!=null&&(e.write("("),this.return_.forEach((i,o)=>{o>0&&e.write(", "),e.writeNode(i)}),e.write(")")),e.writeLine(" {"),e.indent(),(n=this.body)==null||n.write(e),e.dedent(),e.writeNewLineIfLastLineNot(),e.writeLine("}")}writeReceiver({writer:e,typeReference:n}){e.write(`(${this.getReceiverName(n.name)} `),n.write(e),e.write(") ")}getReceiverName(e){return e.charAt(0).toLowerCase()}};var J=class extends d{constructor({name:e,parameters:n,return_:i,body:o,docs:s}){super();c(this,"func");this.func=new b({name:e,parameters:n,return_:i,body:o,docs:s})}get name(){return this.func.name}get parameters(){return this.func.parameters}get return_(){return this.func.return_}get body(){return this.func.body}get docs(){return this.func.docs}write(e){e.writeNode(this.func)}};u();f();u();f();u();f();u();f();var A=class extends d{constructor({name:e,importPath:n}){super();c(this,"name");c(this,"importPath");this.name=e,this.importPath=n}write(e){if(e.importPath===this.importPath){e.write(this.name);return}let n=e.addImport(this.importPath);e.write(`${n}.${this.name}`)}};u();f();var M=class extends d{constructor({method:e,arguments_:n,on:i}){super();c(this,"on");c(this,"method");c(this,"arguments_");this.on=i,this.method=e,this.arguments_=n}write(e){this.on.write(e),e.write("."),e.write(this.method),pe({writer:e,arguments_:this.arguments_})}};var rr=new Set(["bool","date","dateTime","float64","int","int64","string","uuid"]),Ve=new Set(["any","bytes","map","slice"]),R=class r extends d{constructor(e){super();c(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"any":this.writeAny({writer:e,value:this.internalType.value});break;case"bool":e.write(this.internalType.value.toString());break;case"bytes":e.write(`[]byte("${this.internalType.value}")`);break;case"date":case"dateTime":e.writeNode(or({writer:e,type:this.internalType}));break;case"enum":e.writeNode(this.internalType.typeReference);break;case"float64":e.write(this.internalType.value.toString());break;case"int":case"int64":e.write(this.internalType.value.toString());break;case"map":this.writeMap({writer:e,map:this.internalType});break;case"nil":e.write("nil");break;case"nop":break;case"optional":this.writeOptional({writer:e,type:this.internalType.value});break;case"reference":e.writeNode(this.internalType.value);break;case"slice":this.writeSlice({writer:e,slice:this.internalType});break;case"string":e.write(this.internalType.value.includes('"')||this.internalType.value.includes(`
19
+ `)?`\`${this.internalType.value}\``:`"${this.internalType.value}"`);break;case"struct":this.writeStruct({writer:e,struct:this.internalType});break;case"uuid":e.writeNode(sr({value:this.internalType.value}));break;default:B(this.internalType)}}static any(e){return new this({type:"any",value:e})}static bool(e){return new this({type:"bool",value:e})}static bytes(e){return new this({type:"bytes",value:e})}static date(e){return new this({type:"date",value:e})}static dateTime(e){return new this({type:"dateTime",value:e})}static enum(e){return new this({type:"enum",typeReference:e})}static float64(e){return new this({type:"float64",value:e})}static int(e){return new this({type:"int",value:e})}static int64(e){return new this({type:"int64",value:e})}static map({keyType:e,valueType:n,entries:i}){return new this({type:"map",keyType:e,valueType:n,entries:i})}static nil(){return new this({type:"nil"})}static nop(){return new this({type:"nop"})}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 slice({valueType:e,values:n}){return new this({type:"slice",valueType:e,values:n})}static string(e){return new this({type:"string",value:e})}static struct({typeReference:e,fields:n}){return new this({type:"struct",typeReference:e,fields:n})}static structPointer({typeReference:e,fields:n}){return new this({type:"optional",value:new this({type:"struct",typeReference:e,fields:n})})}static uuid(e){return new this({type:"uuid",value:e})}static isNop(e){return e.internalType.type==="optional"?this.isNop(e.internalType.value):e.internalType.type==="nop"}writeAny({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("nil");return}if(Array.isArray(n)){this.writeAnyArray({writer:e,value:n});return}this.writeAnyObject({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeAnyArray({writer:e,value:n}){if(e.write("[]interface{}"),n.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let i of n)e.writeNode(r.any(i)),e.writeLine(",");e.dedent(),e.write("}")}writeAnyObject({writer:e,value:n}){e.write("map[string]interface{}");let i=Object.entries(n);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[o,s]of i)e.write(`"${o}": `),e.writeNode(r.any(s)),e.writeLine(",");e.dedent(),e.write("}")}writeMap({writer:e,map:n}){e.write("map["),e.writeNode(n.keyType),e.write("]"),e.writeNode(n.valueType);let i=ar({entries:n.entries});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)o.key.write(e),e.write(": "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeOptional({writer:e,type:n}){if(rr.has(n.internalType.type)){e.writeNode(nr({writer:e,type:n}));return}if(Ve.has(n.internalType.type)){n.write(e);return}if(n.internalType.type==="enum"){e.writeNode(new M({on:n.internalType.typeReference,method:"Ptr",arguments_:[]}));return}e.write("&"),n.write(e)}static isAlreadyOptional(e){return e.internalType.type==="optional"||Ve.has(e.internalType.type)}writeSlice({writer:e,slice:n}){e.write("[]"),e.writeNode(n.valueType);let i=fr({values:n.values});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeStruct({writer:e,struct:n}){e.writeNode(n.typeReference);let i=ur({fields:n.fields});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)e.write(`${o.name}: `),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}};function nr({writer:r,type:t}){return new _({func:new A({name:ir({type:t}),importPath:r.rootImportPath}),arguments_:[t]})}function ir({type:r}){switch(r.internalType.type){case"bool":return"Bool";case"date":case"dateTime":return"Time";case"float64":return"Float64";case"int":return"Int";case"int64":return"Int64";case"string":return"String";case"uuid":return"UUID";default:return""}}function or({writer:r,type:t}){let e=t instanceof Date?"MustParseDate":"MustParseDateTime";return new _({func:new A({name:e,importPath:r.rootImportPath}),arguments_:[new U(`"${t.value}"`)]})}function sr({value:r}){return new _({func:new A({name:"MustParse",importPath:"github.com/google/uuid"}),arguments_:[new U(`"${r}"`)]})}function ar({entries:r}){return r.filter(t=>!R.isNop(t.key)&&!R.isNop(t.value))}function ur({fields:r}){return r.filter(t=>!R.isNop(t.value))}function fr({values:r}){return r.filter(t=>!R.isNop(t))}function pe({writer:r,arguments_:t}){let e=pr(t);if(e.length===0){r.write("()");return}r.writeLine("("),r.indent();for(let n of e)cr({writer:r,argument:n}),r.writeLine(",");r.dedent(),r.write(")")}function cr({writer:r,argument:t}){de(t)?t.assignment.write(r):t.write(r)}function pr(r){return r.filter(t=>!(t instanceof R&&R.isNop(t)))}var _=class extends d{constructor({func:e,arguments_:n}){super();c(this,"func");c(this,"arguments_");this.func=e,this.arguments_=n}write(e){e.writeNode(this.func),pe({writer:e,arguments_:this.arguments_})}};u();f();var z=class extends d{constructor({name:e,type:n,docs:i}){super();c(this,"name");c(this,"type");c(this,"docs");this.name=e,this.type=n,this.docs=i}write(e){e.writeNode(new N({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};u();f();var Z=class extends d{constructor({name:e,importPath:n,docs:i}){super();c(this,"name");c(this,"importPath");c(this,"docs");c(this,"fields",[]);c(this,"methods",[]);this.name=e,this.importPath=n,this.docs=i}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){if(e.writeNode(new N({docs:this.docs})),e.write(`type ${this.name} struct {`),this.fields.length>0)e.writeLine("}");else{e.newLine(),e.indent();for(let n of this.fields)e.writeNode(n),e.newLine();e.dedent(),e.writeLine("}")}(this.constructor!=null||this.methods.length>0)&&e.newLine();for(let n of this.methods)e.writeNode(n),e.newLine()}};u();f();var hr=new Set(["any","bytes","map","slice"]),te=class r extends d{constructor(e){super();c(this,"internalType");this.internalType=e}write(e,{comment:n}={}){switch(this.internalType.type){case"any":e.write("interface{}");break;case"bool":e.write("bool");break;case"bytes":e.write("[]byte");break;case"date":case"dateTime":e.writeNode(lr);break;case"float64":e.write("float64");break;case"int":e.write("int");break;case"int64":e.write("int64");break;case"map":{e.write("map["),this.internalType.keyType.write(e),e.write("]"),this.internalType.valueType.write(e);break}case"optional":{e.write("*"),this.internalType.value.write(e);break}case"reference":e.writeNode(this.internalType.value);break;case"slice":e.write("[]"),this.internalType.value.write(e);break;case"string":e.write("string");break;case"uuid":e.writeNode(mr);break;default:B(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static any(){return new this({type:"any"})}static bool(){return new this({type:"bool"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static float64(){return new this({type:"float64"})}static int(){return new this({type:"int"})}static int64(){return new this({type:"int64"})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static pointer(e){return r.optional(e)}static reference(e){return new this({type:"reference",value:e})}static slice(e){return new this({type:"slice",value:e})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static isAlreadyOptional(e){return e.internalType.type==="optional"||hr.has(e.internalType.type)}},lr=new A({importPath:"time",name:"Time"}),mr=new A({importPath:"github.com/google/uuid",name:"UUID"});var x={};ge(x,{AstNode:()=>d,CodeBlock:()=>U,Enum:()=>V,Field:()=>H,Func:()=>J,FuncInvocation:()=>_,Method:()=>b,MethodInvocation:()=>M,Parameter:()=>z,Struct:()=>Z,Type:()=>te,TypeInstantiation:()=>R,TypeReference:()=>A,Writer:()=>W,codeblock:()=>wr,enum_:()=>yr,field:()=>dr,func:()=>xr,invokeFunc:()=>Tr,invokeMethod:()=>gr,method:()=>Ar,parameter:()=>Er,struct:()=>vr,typeReference:()=>Nr});u();f();function wr(r){return new U(r)}function yr(r){return new V(r)}function dr(r){return new H(r)}function xr(r){return new J(r)}function Tr(r){return new _(r)}function gr(r){return new M(r)}function Ar(r){return new b(r)}function Er(r){return new z(r)}function vr(r){return new Z(r)}function Nr(r){return new A(r)}var Te=class{constructor({context:t}){c(this,"context");this.context=t}convert(t){switch(t.typeReference.type){case"list":return x.Type.slice(this.convert({typeReference:t.typeReference}));case"literal":return this.convertLiteral({literal:t.typeReference.value});case"map":return x.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":return x.Type.optional(this.convert({typeReference:t.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:t.typeReference.value});case"set":return x.Type.slice(this.convert({typeReference:t.typeReference}));case"unknown":return this.convertUnknown();default:B(t.typeReference)}}convertLiteral({literal:t}){switch(t.type){case"boolean":return x.Type.bool();case"string":return x.Type.string()}}convertNamed({named:t}){let e=x.Type.reference(x.typeReference({name:this.context.getTypeName(t.declaration.name),importPath:this.context.getImportPath(t.declaration.fernFilepath)}));switch(t.type){case"alias":case"enum":return e;case"discriminatedUnion":case"object":case"undiscriminatedUnion":return x.Type.pointer(e);default:B(t)}}convertUnknown(){return x.Type.any()}convertPrimitive({primitive:t}){switch(t){case"INTEGER":return x.Type.int();case"UINT":return x.Type.int();case"LONG":return x.Type.int64();case"UINT_64":return x.Type.int64();case"FLOAT":return x.Type.float64();case"DOUBLE":return x.Type.float64();case"BOOLEAN":return x.Type.bool();case"STRING":return x.Type.string();case"DATE":return x.Type.date();case"DATE_TIME":return x.Type.dateTime();case"UUID":return x.Type.uuid();case"BASE_64":return x.Type.bytes();case"BIG_INTEGER":return x.Type.string();default:B(t)}}};0&&(module.exports={DynamicTypeMapper});
20
+ /*! Bundled license information:
21
+
22
+ @esbuild-plugins/node-globals-polyfill/Buffer.js:
23
+ (*!
24
+ * The buffer module from node.js, for the browser.
25
+ *
26
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
27
+ * @license MIT
28
+ *)
29
+ */
@@ -1,5 +1,5 @@
1
1
  import '@fern-api/go-ast';
2
- export { a as DynamicTypeMapper } from '../DynamicSnippetsGeneratorContext-DuDerGxa.cjs';
2
+ export { a as DynamicTypeMapper } from '../DynamicSnippetsGeneratorContext-f4OAff1R.cjs';
3
3
  import '@fern-fern/ir-sdk/api';
4
4
  import '@fern-api/browser-compatible-base-generator';
5
5
  import '../TypeInstance.cjs';
@@ -1 +1,11 @@
1
- "use strict";var s=Object.defineProperty,l=Object.defineProperties,v=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols;var c=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var p=(t,r,e)=>r in t?s(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,u=(t,r)=>{for(var e in r||(r={}))c.call(r,e)&&p(t,e,r[e]);if(h)for(var e of h(r))E.call(r,e)&&p(t,e,r[e]);return t},y=(t,r)=>l(t,g(r));var d=(t,r)=>{for(var e in r)s(t,e,{get:r[e],enumerable:!0})},f=(t,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of m(r))!c.call(t,o)&&o!==e&&s(t,o,{get:()=>r[o],enumerable:!(i=v(r,o))||i.enumerable});return t};var b=t=>f(s({},"__esModule",{value:!0}),t);var a=(t,r,e)=>p(t,typeof r!="symbol"?r+"":r,e);var R={};d(R,{ErrorReporter:()=>n,Severity:()=>I});module.exports=b(R);var I={Critical:"CRITICAL",Warning:"WARNING"},n=class t{constructor(){a(this,"errors");a(this,"path");this.errors=[],this.path=[]}add(r){this.errors.push(y(u({},r),{path:[...this.path]}))}scope(r){this.path.push(r)}unscope(){this.path.pop()}getBySeverity(r){return this.errors.filter(e=>e.severity===r)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let r=new t;return r.errors=[...this.errors],r.path=[...this.path],r}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(r=>({severity:r.severity,path:r.path!=null?this.pathToStringArray(r.path):void 0,message:r.message}))}pathToStringArray(r){let e=[];for(let i of r){if(typeof i=="string"){e.push(i);continue}e[e.length-1]+=`[${i.index}]`}return e}};0&&(module.exports={ErrorReporter,Severity});
1
+ "use strict";var P=Object.defineProperty,gr=Object.defineProperties,Ar=Object.getOwnPropertyDescriptor,Tr=Object.getOwnPropertyDescriptors,Rr=Object.getOwnPropertyNames,J=Object.getOwnPropertySymbols;var Q=Object.prototype.hasOwnProperty,vr=Object.prototype.propertyIsEnumerable;var F=(e,r,i)=>r in e?P(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,X=(e,r)=>{for(var i in r||(r={}))Q.call(r,i)&&F(e,i,r[i]);if(J)for(var i of J(r))vr.call(r,i)&&F(e,i,r[i]);return e},q=(e,r)=>gr(e,Tr(r));var Ir=(e,r)=>{for(var i in r)P(e,i,{get:r[i],enumerable:!0})},_r=(e,r,i,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of Rr(r))!Q.call(e,t)&&t!==i&&P(e,t,{get:()=>r[t],enumerable:!(n=Ar(r,t))||n.enumerable});return e};var Ur=e=>_r(P({},"__esModule",{value:!0}),e);var W=(e,r,i)=>F(e,typeof r!="symbol"?r+"":r,i);var Pi={};Ir(Pi,{ErrorReporter:()=>V,Severity:()=>Si});module.exports=Ur(Pi);function $(){throw new Error("setTimeout has not been defined")}function K(){throw new Error("clearTimeout has not been defined")}var R=$,v=K;typeof globalThis.setTimeout=="function"&&(R=setTimeout);typeof globalThis.clearTimeout=="function"&&(v=clearTimeout);function j(e){if(R===setTimeout)return setTimeout(e,0);if((R===$||!R)&&setTimeout)return R=setTimeout,setTimeout(e,0);try{return R(e,0)}catch(r){try{return R.call(null,e,0)}catch(i){return R.call(this,e,0)}}}function dr(e){if(v===clearTimeout)return clearTimeout(e);if((v===K||!v)&&clearTimeout)return v=clearTimeout,clearTimeout(e);try{return v(e)}catch(r){try{return v.call(null,e)}catch(i){return v.call(this,e)}}}var A=[],S=!1,I,Y=-1;function Br(){!S||!I||(S=!1,I.length?A=I.concat(A):Y=-1,A.length&&rr())}function rr(){if(!S){var e=j(Br);S=!0;for(var r=A.length;r;){for(I=A,A=[];++Y<r;)I&&I[Y].run();Y=-1,r=A.length}I=null,S=!1,dr(e)}}function Sr(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)r[i-1]=arguments[i];A.push(new ir(e,r)),A.length===1&&!S&&j(rr)}function ir(e,r){this.fun=e,this.array=r}ir.prototype.run=function(){this.fun.apply(null,this.array)};var Pr="browser",Yr="browser",Cr=!0,Mr={},Dr=[],kr="",Nr={},Lr={},Fr={};function _(){}var Wr=_,br=_,Gr=_,zr=_,Hr=_,Or=_,Vr=_;function Jr(e){throw new Error("process.binding is not supported")}function Qr(){return"/"}function Xr(e){throw new Error("process.chdir is not supported")}function qr(){return 0}var B=globalThis.performance||{},Zr=B.now||B.mozNow||B.msNow||B.oNow||B.webkitNow||function(){return new Date().getTime()};function $r(e){var r=Zr.call(B)*.001,i=Math.floor(r),n=Math.floor(r%1*1e9);return e&&(i=i-e[0],n=n-e[1],n<0&&(i--,n+=1e9)),[i,n]}var Kr=new Date;function jr(){var e=new Date,r=e-Kr;return r/1e3}var b={nextTick:Sr,title:Pr,browser:Cr,env:Mr,argv:Dr,version:kr,versions:Nr,on:Wr,addListener:br,once:Gr,off:zr,removeListener:Hr,removeAllListeners:Or,emit:Vr,binding:Jr,cwd:Qr,chdir:Xr,umask:qr,hrtime:$r,platform:Yr,release:Lr,config:Fr,uptime:jr},Z={};Object.keys(Z).forEach(e=>{let r=e.split("."),i=b;for(let n=0;n<r.length;n++){let t=r[n];n===r.length-1?i[t]=Z[e]:i=i[t]||(i[t]={})}});var y=[],E=[],ri=typeof Uint8Array!="undefined"?Uint8Array:Array,z=!1;function or(){z=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,i=e.length;r<i;++r)y[r]=e[r],E[e.charCodeAt(r)]=r;E[45]=62,E[95]=63}function ii(e){z||or();var r,i,n,t,o,u,a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=e[a-2]==="="?2:e[a-1]==="="?1:0,u=new ri(a*3/4-o),n=o>0?a-4:a;var h=0;for(r=0,i=0;r<n;r+=4,i+=3)t=E[e.charCodeAt(r)]<<18|E[e.charCodeAt(r+1)]<<12|E[e.charCodeAt(r+2)]<<6|E[e.charCodeAt(r+3)],u[h++]=t>>16&255,u[h++]=t>>8&255,u[h++]=t&255;return o===2?(t=E[e.charCodeAt(r)]<<2|E[e.charCodeAt(r+1)]>>4,u[h++]=t&255):o===1&&(t=E[e.charCodeAt(r)]<<10|E[e.charCodeAt(r+1)]<<4|E[e.charCodeAt(r+2)]>>2,u[h++]=t>>8&255,u[h++]=t&255),u}function ei(e){return y[e>>18&63]+y[e>>12&63]+y[e>>6&63]+y[e&63]}function ni(e,r,i){for(var n,t=[],o=r;o<i;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],t.push(ei(n));return t.join("")}function er(e){z||or();for(var r,i=e.length,n=i%3,t="",o=[],u=16383,a=0,h=i-n;a<h;a+=u)o.push(ni(e,a,a+u>h?h:a+u));return n===1?(r=e[i-1],t+=y[r>>2],t+=y[r<<4&63],t+="=="):n===2&&(r=(e[i-2]<<8)+e[i-1],t+=y[r>>10],t+=y[r>>4&63],t+=y[r<<2&63],t+="="),o.push(t),o.join("")}f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;function C(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function T(e,r){if(C()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=f.prototype):(e===null&&(e=new f(r)),e.length=r),e}function f(e,r,i){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(e,r,i);if(typeof e=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return H(this,e)}return ur(this,e,r,i)}f.poolSize=8192;f._augment=function(e){return e.__proto__=f.prototype,e};function ur(e,r,i,n){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&r instanceof ArrayBuffer?ui(e,r,i,n):typeof r=="string"?oi(e,r,i):fi(e,r)}f.from=function(e,r,i){return ur(null,e,r,i)};f.kMaxLength=C();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);function fr(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function ti(e,r,i,n){return fr(r),r<=0?T(e,r):i!==void 0?typeof n=="string"?T(e,r).fill(i,n):T(e,r).fill(i):T(e,r)}f.alloc=function(e,r,i){return ti(null,e,r,i)};function H(e,r){if(fr(r),e=T(e,r<0?0:O(r)|0),!f.TYPED_ARRAY_SUPPORT)for(var i=0;i<r;++i)e[i]=0;return e}f.allocUnsafe=function(e){return H(null,e)};f.allocUnsafeSlow=function(e){return H(null,e)};function oi(e,r,i){if((typeof i!="string"||i==="")&&(i="utf8"),!f.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=ar(r,i)|0;e=T(e,n);var t=e.write(r,i);return t!==n&&(e=e.slice(0,t)),e}function G(e,r){var i=r.length<0?0:O(r.length)|0;e=T(e,i);for(var n=0;n<i;n+=1)e[n]=r[n]&255;return e}function ui(e,r,i,n){if(r.byteLength,i<0||r.byteLength<i)throw new RangeError("'offset' is out of bounds");if(r.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");return i===void 0&&n===void 0?r=new Uint8Array(r):n===void 0?r=new Uint8Array(r,i):r=new Uint8Array(r,i,n),f.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=f.prototype):e=G(e,r),e}function fi(e,r){if(g(r)){var i=O(r.length)|0;return e=T(e,i),e.length===0||r.copy(e,0,0,i),e}if(r){if(typeof ArrayBuffer!="undefined"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||Ui(r.length)?T(e,0):G(e,r);if(r.type==="Buffer"&&Array.isArray(r.data))return G(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function O(e){if(e>=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return e|0}f.isBuffer=di;function g(e){return!!(e!=null&&e._isBuffer)}f.compare=function(r,i){if(!g(r)||!g(i))throw new TypeError("Arguments must be Buffers");if(r===i)return 0;for(var n=r.length,t=i.length,o=0,u=Math.min(n,t);o<u;++o)if(r[o]!==i[o]){n=r[o],t=i[o];break}return n<t?-1:t<n?1:0};f.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(r,i){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return f.alloc(0);var n;if(i===void 0)for(i=0,n=0;n<r.length;++n)i+=r[n].length;var t=f.allocUnsafe(i),o=0;for(n=0;n<r.length;++n){var u=r[n];if(!g(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(t,o),o+=u.length}return t};function ar(e,r){if(g(e))return e.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var i=e.length;if(i===0)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i*2;case"hex":return i>>>1;case"base64":return xr(e).length;default:if(n)return M(e).length;r=(""+r).toLowerCase(),n=!0}}f.byteLength=ar;function ai(e,r,i){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((i===void 0||i>this.length)&&(i=this.length),i<=0)||(i>>>=0,r>>>=0,i<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return yi(this,r,i);case"utf8":case"utf-8":return pr(this,r,i);case"ascii":return Ei(this,r,i);case"latin1":case"binary":return mi(this,r,i);case"base64":return wi(this,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gi(this,r,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}f.prototype._isBuffer=!0;function U(e,r,i){var n=e[r];e[r]=e[i],e[i]=n}f.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<r;i+=2)U(this,i,i+1);return this};f.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<r;i+=4)U(this,i,i+3),U(this,i+1,i+2);return this};f.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<r;i+=8)U(this,i,i+7),U(this,i+1,i+6),U(this,i+2,i+5),U(this,i+3,i+4);return this};f.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?pr(this,0,r):ai.apply(this,arguments)};f.prototype.equals=function(r){if(!g(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:f.compare(this,r)===0};f.prototype.compare=function(r,i,n,t,o){if(!g(r))throw new TypeError("Argument must be a Buffer");if(i===void 0&&(i=0),n===void 0&&(n=r?r.length:0),t===void 0&&(t=0),o===void 0&&(o=this.length),i<0||n>r.length||t<0||o>this.length)throw new RangeError("out of range index");if(t>=o&&i>=n)return 0;if(t>=o)return-1;if(i>=n)return 1;if(i>>>=0,n>>>=0,t>>>=0,o>>>=0,this===r)return 0;for(var u=o-t,a=n-i,h=Math.min(u,a),p=this.slice(t,o),s=r.slice(i,n),c=0;c<h;++c)if(p[c]!==s[c]){u=p[c],a=s[c];break}return u<a?-1:a<u?1:0};function hr(e,r,i,n,t){if(e.length===0)return-1;if(typeof i=="string"?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=t?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(t)return-1;i=e.length-1}else if(i<0)if(t)i=0;else return-1;if(typeof r=="string"&&(r=f.from(r,n)),g(r))return r.length===0?-1:nr(e,r,i,n,t);if(typeof r=="number")return r=r&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?t?Uint8Array.prototype.indexOf.call(e,r,i):Uint8Array.prototype.lastIndexOf.call(e,r,i):nr(e,[r],i,n,t);throw new TypeError("val must be string, number or Buffer")}function nr(e,r,i,n,t){var o=1,u=e.length,a=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,u/=2,a/=2,i/=2}function h(x,d){return o===1?x[d]:x.readUInt16BE(d*o)}var p;if(t){var s=-1;for(p=i;p<u;p++)if(h(e,p)===h(r,s===-1?0:p-s)){if(s===-1&&(s=p),p-s+1===a)return s*o}else s!==-1&&(p-=p-s),s=-1}else for(i+a>u&&(i=u-a),p=i;p>=0;p--){for(var c=!0,m=0;m<a;m++)if(h(e,p+m)!==h(r,m)){c=!1;break}if(c)return p}return-1}f.prototype.includes=function(r,i,n){return this.indexOf(r,i,n)!==-1};f.prototype.indexOf=function(r,i,n){return hr(this,r,i,n,!0)};f.prototype.lastIndexOf=function(r,i,n){return hr(this,r,i,n,!1)};function hi(e,r,i,n){i=Number(i)||0;var t=e.length-i;n?(n=Number(n),n>t&&(n=t)):n=t;var o=r.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var a=parseInt(r.substr(u*2,2),16);if(isNaN(a))return u;e[i+u]=a}return u}function ci(e,r,i,n){return N(M(r,e.length-i),e,i,n)}function cr(e,r,i,n){return N(Ii(r),e,i,n)}function pi(e,r,i,n){return cr(e,r,i,n)}function si(e,r,i,n){return N(xr(r),e,i,n)}function li(e,r,i,n){return N(_i(r,e.length-i),e,i,n)}f.prototype.write=function(r,i,n,t){if(i===void 0)t="utf8",n=this.length,i=0;else if(n===void 0&&typeof i=="string")t=i,n=this.length,i=0;else if(isFinite(i))i=i|0,isFinite(n)?(n=n|0,t===void 0&&(t="utf8")):(t=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-i;if((n===void 0||n>o)&&(n=o),r.length>0&&(n<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");t||(t="utf8");for(var u=!1;;)switch(t){case"hex":return hi(this,r,i,n);case"utf8":case"utf-8":return ci(this,r,i,n);case"ascii":return cr(this,r,i,n);case"latin1":case"binary":return pi(this,r,i,n);case"base64":return si(this,r,i,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return li(this,r,i,n);default:if(u)throw new TypeError("Unknown encoding: "+t);t=(""+t).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function wi(e,r,i){return r===0&&i===e.length?er(e):er(e.slice(r,i))}function pr(e,r,i){i=Math.min(e.length,i);for(var n=[],t=r;t<i;){var o=e[t],u=null,a=o>239?4:o>223?3:o>191?2:1;if(t+a<=i){var h,p,s,c;switch(a){case 1:o<128&&(u=o);break;case 2:h=e[t+1],(h&192)===128&&(c=(o&31)<<6|h&63,c>127&&(u=c));break;case 3:h=e[t+1],p=e[t+2],(h&192)===128&&(p&192)===128&&(c=(o&15)<<12|(h&63)<<6|p&63,c>2047&&(c<55296||c>57343)&&(u=c));break;case 4:h=e[t+1],p=e[t+2],s=e[t+3],(h&192)===128&&(p&192)===128&&(s&192)===128&&(c=(o&15)<<18|(h&63)<<12|(p&63)<<6|s&63,c>65535&&c<1114112&&(u=c))}}u===null?(u=65533,a=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),t+=a}return xi(n)}var tr=4096;function xi(e){var r=e.length;if(r<=tr)return String.fromCharCode.apply(String,e);for(var i="",n=0;n<r;)i+=String.fromCharCode.apply(String,e.slice(n,n+=tr));return i}function Ei(e,r,i){var n="";i=Math.min(e.length,i);for(var t=r;t<i;++t)n+=String.fromCharCode(e[t]&127);return n}function mi(e,r,i){var n="";i=Math.min(e.length,i);for(var t=r;t<i;++t)n+=String.fromCharCode(e[t]);return n}function yi(e,r,i){var n=e.length;(!r||r<0)&&(r=0),(!i||i<0||i>n)&&(i=n);for(var t="",o=r;o<i;++o)t+=vi(e[o]);return t}function gi(e,r,i){for(var n=e.slice(r,i),t="",o=0;o<n.length;o+=2)t+=String.fromCharCode(n[o]+n[o+1]*256);return t}f.prototype.slice=function(r,i){var n=this.length;r=~~r,i=i===void 0?n:~~i,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),i<0?(i+=n,i<0&&(i=0)):i>n&&(i=n),i<r&&(i=r);var t;if(f.TYPED_ARRAY_SUPPORT)t=this.subarray(r,i),t.__proto__=f.prototype;else{var o=i-r;t=new f(o,void 0);for(var u=0;u<o;++u)t[u]=this[u+r]}return t};function l(e,r,i){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>i)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUIntLE=function(r,i,n){r=r|0,i=i|0,n||l(r,i,this.length);for(var t=this[r],o=1,u=0;++u<i&&(o*=256);)t+=this[r+u]*o;return t};f.prototype.readUIntBE=function(r,i,n){r=r|0,i=i|0,n||l(r,i,this.length);for(var t=this[r+--i],o=1;i>0&&(o*=256);)t+=this[r+--i]*o;return t};f.prototype.readUInt8=function(r,i){return i||l(r,1,this.length),this[r]};f.prototype.readUInt16LE=function(r,i){return i||l(r,2,this.length),this[r]|this[r+1]<<8};f.prototype.readUInt16BE=function(r,i){return i||l(r,2,this.length),this[r]<<8|this[r+1]};f.prototype.readUInt32LE=function(r,i){return i||l(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};f.prototype.readUInt32BE=function(r,i){return i||l(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};f.prototype.readIntLE=function(r,i,n){r=r|0,i=i|0,n||l(r,i,this.length);for(var t=this[r],o=1,u=0;++u<i&&(o*=256);)t+=this[r+u]*o;return o*=128,t>=o&&(t-=Math.pow(2,8*i)),t};f.prototype.readIntBE=function(r,i,n){r=r|0,i=i|0,n||l(r,i,this.length);for(var t=i,o=1,u=this[r+--t];t>0&&(o*=256);)u+=this[r+--t]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*i)),u};f.prototype.readInt8=function(r,i){return i||l(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};f.prototype.readInt16LE=function(r,i){i||l(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(r,i){i||l(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(r,i){return i||l(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};f.prototype.readInt32BE=function(r,i){return i||l(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};f.prototype.readFloatLE=function(r,i){return i||l(r,4,this.length),L(this,r,!0,23,4)};f.prototype.readFloatBE=function(r,i){return i||l(r,4,this.length),L(this,r,!1,23,4)};f.prototype.readDoubleLE=function(r,i){return i||l(r,8,this.length),L(this,r,!0,52,8)};f.prototype.readDoubleBE=function(r,i){return i||l(r,8,this.length),L(this,r,!1,52,8)};function w(e,r,i,n,t,o){if(!g(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>t||r<o)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}f.prototype.writeUIntLE=function(r,i,n,t){if(r=+r,i=i|0,n=n|0,!t){var o=Math.pow(2,8*n)-1;w(this,r,i,n,o,0)}var u=1,a=0;for(this[i]=r&255;++a<n&&(u*=256);)this[i+a]=r/u&255;return i+n};f.prototype.writeUIntBE=function(r,i,n,t){if(r=+r,i=i|0,n=n|0,!t){var o=Math.pow(2,8*n)-1;w(this,r,i,n,o,0)}var u=n-1,a=1;for(this[i+u]=r&255;--u>=0&&(a*=256);)this[i+u]=r/a&255;return i+n};f.prototype.writeUInt8=function(r,i,n){return r=+r,i=i|0,n||w(this,r,i,1,255,0),f.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[i]=r&255,i+1};function D(e,r,i,n){r<0&&(r=65535+r+1);for(var t=0,o=Math.min(e.length-i,2);t<o;++t)e[i+t]=(r&255<<8*(n?t:1-t))>>>(n?t:1-t)*8}f.prototype.writeUInt16LE=function(r,i,n){return r=+r,i=i|0,n||w(this,r,i,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[i]=r&255,this[i+1]=r>>>8):D(this,r,i,!0),i+2};f.prototype.writeUInt16BE=function(r,i,n){return r=+r,i=i|0,n||w(this,r,i,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[i]=r>>>8,this[i+1]=r&255):D(this,r,i,!1),i+2};function k(e,r,i,n){r<0&&(r=4294967295+r+1);for(var t=0,o=Math.min(e.length-i,4);t<o;++t)e[i+t]=r>>>(n?t:3-t)*8&255}f.prototype.writeUInt32LE=function(r,i,n){return r=+r,i=i|0,n||w(this,r,i,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[i+3]=r>>>24,this[i+2]=r>>>16,this[i+1]=r>>>8,this[i]=r&255):k(this,r,i,!0),i+4};f.prototype.writeUInt32BE=function(r,i,n){return r=+r,i=i|0,n||w(this,r,i,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=r&255):k(this,r,i,!1),i+4};f.prototype.writeIntLE=function(r,i,n,t){if(r=+r,i=i|0,!t){var o=Math.pow(2,8*n-1);w(this,r,i,n,o-1,-o)}var u=0,a=1,h=0;for(this[i]=r&255;++u<n&&(a*=256);)r<0&&h===0&&this[i+u-1]!==0&&(h=1),this[i+u]=(r/a>>0)-h&255;return i+n};f.prototype.writeIntBE=function(r,i,n,t){if(r=+r,i=i|0,!t){var o=Math.pow(2,8*n-1);w(this,r,i,n,o-1,-o)}var u=n-1,a=1,h=0;for(this[i+u]=r&255;--u>=0&&(a*=256);)r<0&&h===0&&this[i+u+1]!==0&&(h=1),this[i+u]=(r/a>>0)-h&255;return i+n};f.prototype.writeInt8=function(r,i,n){return r=+r,i=i|0,n||w(this,r,i,1,127,-128),f.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[i]=r&255,i+1};f.prototype.writeInt16LE=function(r,i,n){return r=+r,i=i|0,n||w(this,r,i,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[i]=r&255,this[i+1]=r>>>8):D(this,r,i,!0),i+2};f.prototype.writeInt16BE=function(r,i,n){return r=+r,i=i|0,n||w(this,r,i,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[i]=r>>>8,this[i+1]=r&255):D(this,r,i,!1),i+2};f.prototype.writeInt32LE=function(r,i,n){return r=+r,i=i|0,n||w(this,r,i,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[i]=r&255,this[i+1]=r>>>8,this[i+2]=r>>>16,this[i+3]=r>>>24):k(this,r,i,!0),i+4};f.prototype.writeInt32BE=function(r,i,n){return r=+r,i=i|0,n||w(this,r,i,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),f.TYPED_ARRAY_SUPPORT?(this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=r&255):k(this,r,i,!1),i+4};function sr(e,r,i,n,t,o){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function lr(e,r,i,n,t){return t||sr(e,r,i,4,34028234663852886e22,-34028234663852886e22),mr(e,r,i,n,23,4),i+4}f.prototype.writeFloatLE=function(r,i,n){return lr(this,r,i,!0,n)};f.prototype.writeFloatBE=function(r,i,n){return lr(this,r,i,!1,n)};function wr(e,r,i,n,t){return t||sr(e,r,i,8,17976931348623157e292,-17976931348623157e292),mr(e,r,i,n,52,8),i+8}f.prototype.writeDoubleLE=function(r,i,n){return wr(this,r,i,!0,n)};f.prototype.writeDoubleBE=function(r,i,n){return wr(this,r,i,!1,n)};f.prototype.copy=function(r,i,n,t){if(n||(n=0),!t&&t!==0&&(t=this.length),i>=r.length&&(i=r.length),i||(i=0),t>0&&t<n&&(t=n),t===n||r.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(t<0)throw new RangeError("sourceEnd out of bounds");t>this.length&&(t=this.length),r.length-i<t-n&&(t=r.length-i+n);var o=t-n,u;if(this===r&&n<i&&i<t)for(u=o-1;u>=0;--u)r[u+i]=this[u+n];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(u=0;u<o;++u)r[u+i]=this[u+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+o),i);return o};f.prototype.fill=function(r,i,n,t){if(typeof r=="string"){if(typeof i=="string"?(t=i,i=0,n=this.length):typeof n=="string"&&(t=n,n=this.length),r.length===1){var o=r.charCodeAt(0);o<256&&(r=o)}if(t!==void 0&&typeof t!="string")throw new TypeError("encoding must be a string");if(typeof t=="string"&&!f.isEncoding(t))throw new TypeError("Unknown encoding: "+t)}else typeof r=="number"&&(r=r&255);if(i<0||this.length<i||this.length<n)throw new RangeError("Out of range index");if(n<=i)return this;i=i>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var u;if(typeof r=="number")for(u=i;u<n;++u)this[u]=r;else{var a=g(r)?r:M(new f(r,t).toString()),h=a.length;for(u=0;u<n-i;++u)this[u+i]=a[u%h]}return this};var Ai=/[^+\/0-9A-Za-z-_]/g;function Ti(e){if(e=Ri(e).replace(Ai,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Ri(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function vi(e){return e<16?"0"+e.toString(16):e.toString(16)}function M(e,r){r=r||1/0;for(var i,n=e.length,t=null,o=[],u=0;u<n;++u){if(i=e.charCodeAt(u),i>55295&&i<57344){if(!t){if(i>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}t=i;continue}if(i<56320){(r-=3)>-1&&o.push(239,191,189),t=i;continue}i=(t-55296<<10|i-56320)+65536}else t&&(r-=3)>-1&&o.push(239,191,189);if(t=null,i<128){if((r-=1)<0)break;o.push(i)}else if(i<2048){if((r-=2)<0)break;o.push(i>>6|192,i&63|128)}else if(i<65536){if((r-=3)<0)break;o.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((r-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return o}function Ii(e){for(var r=[],i=0;i<e.length;++i)r.push(e.charCodeAt(i)&255);return r}function _i(e,r){for(var i,n,t,o=[],u=0;u<e.length&&!((r-=2)<0);++u)i=e.charCodeAt(u),n=i>>8,t=i%256,o.push(t),o.push(n);return o}function xr(e){return ii(Ti(e))}function N(e,r,i,n){for(var t=0;t<n&&!(t+i>=r.length||t>=e.length);++t)r[t+i]=e[t];return t}function Ui(e){return e!==e}function di(e){return e!=null&&(!!e._isBuffer||Er(e)||Bi(e))}function Er(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Bi(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&Er(e.slice(0,0))}function L(e,r,i,n,t){var o,u,a=t*8-n-1,h=(1<<a)-1,p=h>>1,s=-7,c=i?t-1:0,m=i?-1:1,x=e[r+c];for(c+=m,o=x&(1<<-s)-1,x>>=-s,s+=a;s>0;o=o*256+e[r+c],c+=m,s-=8);for(u=o&(1<<-s)-1,o>>=-s,s+=n;s>0;u=u*256+e[r+c],c+=m,s-=8);if(o===0)o=1-p;else{if(o===h)return u?NaN:(x?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-p}return(x?-1:1)*u*Math.pow(2,o-n)}function mr(e,r,i,n,t,o){var u,a,h,p=o*8-t-1,s=(1<<p)-1,c=s>>1,m=t===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=n?0:o-1,d=n?1:-1,yr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,u=s):(u=Math.floor(Math.log(r)/Math.LN2),r*(h=Math.pow(2,-u))<1&&(u--,h*=2),u+c>=1?r+=m/h:r+=m*Math.pow(2,1-c),r*h>=2&&(u++,h/=2),u+c>=s?(a=0,u=s):u+c>=1?(a=(r*h-1)*Math.pow(2,t),u=u+c):(a=r*Math.pow(2,c-1)*Math.pow(2,t),u=0));t>=8;e[i+x]=a&255,x+=d,a/=256,t-=8);for(u=u<<t|a,p+=t;p>0;e[i+x]=u&255,x+=d,u/=256,p-=8);e[i+x-d]|=yr*128}var Si={Critical:"CRITICAL",Warning:"WARNING"},V=class e{constructor(){W(this,"errors");W(this,"path");this.errors=[],this.path=[]}add(r){this.errors.push(q(X({},r),{path:[...this.path]}))}scope(r){this.path.push(r)}unscope(){this.path.pop()}getBySeverity(r){return this.errors.filter(i=>i.severity===r)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let r=new e;return r.errors=[...this.errors],r.path=[...this.path],r}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(r=>({severity:r.severity,path:r.path!=null?this.pathToStringArray(r.path):void 0,message:r.message}))}pathToStringArray(r){let i=[];for(let n of r){if(typeof n=="string"){i.push(n);continue}i[i.length-1]+=`[${n.index}]`}return i}};0&&(module.exports={ErrorReporter,Severity});
2
+ /*! Bundled license information:
3
+
4
+ @esbuild-plugins/node-globals-polyfill/Buffer.js:
5
+ (*!
6
+ * The buffer module from node.js, for the browser.
7
+ *
8
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
9
+ * @license MIT
10
+ *)
11
+ */
@@ -1,19 +1,29 @@
1
- "use strict";var R=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var W=Object.prototype.hasOwnProperty;var U=(n,r,e)=>r in n?R(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e;var O=(n,r)=>{for(var e in r)R(n,e,{get:r[e],enumerable:!0})},j=(n,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of V(r))!W.call(n,i)&&i!==e&&R(n,i,{get:()=>r[i],enumerable:!(t=G(r,i))||t.enumerable});return n};var Y=n=>j(R({},"__esModule",{value:!0}),n);var o=(n,r,e)=>U(n,typeof r!="symbol"?r+"":r,e);var we={};O(we,{FilePropertyMapper:()=>B});module.exports=Y(we);function g(n){throw new Error("Unexpected value: "+JSON.stringify(n))}var x=class{};var w=class extends x{constructor(e){super();o(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var q=4,k=class{constructor(){o(this,"buffer","");o(this,"indentLevel",0);o(this,"hasWrittenAnything",!1);o(this,"lastCharacterIsNewline",!1)}write(r){let e=r.length>0&&r.endsWith(`
2
- `),t=e?r.substring(0,r.length-1):r,i=this.getIndentString(),s=t.replaceAll(`
1
+ "use strict";var re=Object.defineProperty;var qe=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var Ze=Object.prototype.hasOwnProperty;var Qe=(r,t,e)=>t in r?re(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var le=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ae=(r,t)=>{for(var e in t)re(r,e,{get:t[e],enumerable:!0})},Xe=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ze(t))!Ze.call(r,i)&&i!==e&&re(r,i,{get:()=>t[i],enumerable:!(n=qe(t,i))||n.enumerable});return r};var Ke=r=>Xe(re({},"__esModule",{value:!0}),r);var c=(r,t,e)=>Qe(r,typeof t!="symbol"?t+"":t,e);function ve(){throw new Error("setTimeout has not been defined")}function Ie(){throw new Error("clearTimeout has not been defined")}function Re(r){if(C===setTimeout)return setTimeout(r,0);if((C===ve||!C)&&setTimeout)return C=setTimeout,setTimeout(r,0);try{return C(r,0)}catch(t){try{return C.call(null,r,0)}catch(e){return C.call(this,r,0)}}}function je(r){if(M===clearTimeout)return clearTimeout(r);if((M===Ie||!M)&&clearTimeout)return M=clearTimeout,clearTimeout(r);try{return M(r)}catch(t){try{return M.call(null,r)}catch(e){return M.call(this,r)}}}function et(){!X||!D||(X=!1,D.length?k=D.concat(k):ne=-1,k.length&&Ne())}function Ne(){if(!X){var r=Re(et);X=!0;for(var t=k.length;t;){for(D=k,k=[];++ne<t;)D&&D[ne].run();ne=-1,t=k.length}D=null,X=!1,je(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];k.push(new Pe(r,t)),k.length===1&&!X&&Re(Ne)}function Pe(r,t){this.fun=r,this.array=t}function Y(){}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 At(){return 0}function vt(r){var t=Et.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 Rt(){var r=new Date,t=r-It;return t/1e3}var C,M,k,X,D,ne,rt,nt,it,ot,st,at,ut,ft,ct,pt,ht,lt,mt,yt,wt,dt,Q,Et,It,m,Ee,u=le(()=>{"use strict";C=ve,M=Ie;typeof globalThis.setTimeout=="function"&&(C=setTimeout);typeof globalThis.clearTimeout=="function"&&(M=clearTimeout);k=[],X=!1,ne=-1;Pe.prototype.run=function(){this.fun.apply(null,this.array)};rt="browser",nt="browser",it=!0,ot={},st=[],at="",ut={},ft={},ct={};pt=Y,ht=Y,lt=Y,mt=Y,yt=Y,wt=Y,dt=Y;Q=globalThis.performance||{},Et=Q.now||Q.mozNow||Q.msNow||Q.oNow||Q.webkitNow||function(){return new Date().getTime()};It=new Date;m={nextTick:tt,title:rt,browser:it,env:ot,argv:st,version:at,versions:ut,on:pt,addListener:ht,once:lt,off:mt,removeListener:yt,removeAllListeners:wt,emit:dt,binding:xt,cwd:gt,chdir:Tt,umask:At,hrtime:vt,platform:nt,release:ft,config:ct,uptime:Rt},Ee={};Object.keys(Ee).forEach(r=>{let t=r.split("."),e=m;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Ee[r]:e=e[i]||(e[i]={})}})});function ke(){ye=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)S[t]=r[t],v[r.charCodeAt(t)]=t;v[45]=62,v[95]=63}function Pt(r){ye||ke();var t,e,n,i,o,s,p=r.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[p-2]==="="?2:r[p-1]==="="?1:0,s=new Nt(p*3/4-o),n=o>0?p-4:p;var h=0;for(t=0,e=0;t<n;t+=4,e+=3)i=v[r.charCodeAt(t)]<<18|v[r.charCodeAt(t+1)]<<12|v[r.charCodeAt(t+2)]<<6|v[r.charCodeAt(t+3)],s[h++]=i>>16&255,s[h++]=i>>8&255,s[h++]=i&255;return o===2?(i=v[r.charCodeAt(t)]<<2|v[r.charCodeAt(t+1)]>>4,s[h++]=i&255):o===1&&(i=v[r.charCodeAt(t)]<<10|v[r.charCodeAt(t+1)]<<4|v[r.charCodeAt(t+2)]>>2,s[h++]=i>>8&255,s[h++]=i&255),s}function St(r){return S[r>>18&63]+S[r>>12&63]+S[r>>6&63]+S[r&63]}function _t(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(St(n));return i.join("")}function Se(r){ye||ke();for(var t,e=r.length,n=e%3,i="",o=[],s=16383,p=0,h=e-n;p<h;p+=s)o.push(_t(r,p,p+s>h?h:p+s));return n===1?(t=r[e-1],i+=S[t>>2],i+=S[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=S[t>>10],i+=S[t>>4&63],i+=S[t<<2&63],i+="="),o.push(i),o.join("")}function ie(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function B(r,t){if(ie()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=a.prototype):(r===null&&(r=new a(t)),r.length=t),r}function a(r,t,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(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 we(this,r)}return Be(this,r,t,e)}function Be(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?Bt(r,t,e,n):typeof t=="string"?kt(r,t,e):Ut(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 bt(r,t,e,n){return Ue(t),t<=0?B(r,t):e!==void 0?typeof n=="string"?B(r,t).fill(e,n):B(r,t).fill(e):B(r,t)}function we(r,t){if(Ue(t),r=B(r,t<0?0:de(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function kt(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=Le(t,e)|0;r=B(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function me(r,t){var e=t.length<0?0:de(t.length)|0;r=B(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Bt(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),a.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=a.prototype):r=me(r,t),r}function Ut(r,t){if(_(t)){var e=de(t.length)|0;return r=B(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"||Kt(t.length)?B(r,0):me(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return me(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function de(r){if(r>=ie())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ie().toString(16)+" bytes");return r|0}function _(r){return!!(r!=null&&r._isBuffer)}function Le(r,t){if(_(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 oe(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Oe(r).length;default:if(n)return oe(r).length;t=(""+t).toLowerCase(),n=!0}}function Lt(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 Vt(this,t,e);case"utf8":case"utf-8":return Fe(this,t,e);case"ascii":return Wt(this,t,e);case"latin1":case"binary":return Gt(this,t,e);case"base64":return $t(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 $(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function Ce(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=a.from(t,n)),_(t))return t.length===0?-1:_e(r,t,e,n,i);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):_e(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _e(r,t,e,n,i){var o=1,s=r.length,p=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,s/=2,p/=2,e/=2}function h(A,Z){return o===1?A[Z]:A.readUInt16BE(Z*o)}var y;if(i){var w=-1;for(y=e;y<s;y++)if(h(r,y)===h(t,w===-1?0:y-w)){if(w===-1&&(w=y),y-w+1===p)return w*o}else w!==-1&&(y-=y-w),w=-1}else for(e+p>s&&(e=s-p),y=e;y>=0;y--){for(var l=!0,N=0;N<p;N++)if(h(r,y+N)!==h(t,N)){l=!1;break}if(l)return y}return-1}function Ct(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var p=parseInt(t.substr(s*2,2),16);if(isNaN(p))return s;r[e+s]=p}return s}function Mt(r,t,e,n){return ue(oe(t,r.length-e),r,e,n)}function Me(r,t,e,n){return ue(Qt(t),r,e,n)}function Ft(r,t,e,n){return Me(r,t,e,n)}function Dt(r,t,e,n){return ue(Oe(t),r,e,n)}function Yt(r,t,e,n){return ue(Xt(t,r.length-e),r,e,n)}function $t(r,t,e){return t===0&&e===r.length?Se(r):Se(r.slice(t,e))}function Fe(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],s=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=e){var h,y,w,l;switch(p){case 1:o<128&&(s=o);break;case 2:h=r[i+1],(h&192)===128&&(l=(o&31)<<6|h&63,l>127&&(s=l));break;case 3:h=r[i+1],y=r[i+2],(h&192)===128&&(y&192)===128&&(l=(o&15)<<12|(h&63)<<6|y&63,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:h=r[i+1],y=r[i+2],w=r[i+3],(h&192)===128&&(y&192)===128&&(w&192)===128&&(l=(o&15)<<18|(h&63)<<12|(y&63)<<6|w&63,l>65535&&l<1114112&&(s=l))}}s===null?(s=65533,p=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=p}return Ot(n)}function Ot(r){var t=r.length;if(t<=be)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=be));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 Gt(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 Vt(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=Zt(r[o]);return i}function Ht(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function x(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 g(r,t,e,n,i,o){if(!_(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function se(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function ae(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function De(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Ye(r,t,e,n,i){return i||De(r,t,e,4,34028234663852886e22,-34028234663852886e22),Ge(r,t,e,n,23,4),e+4}function $e(r,t,e,n,i){return i||De(r,t,e,8,17976931348623157e292,-17976931348623157e292),Ge(r,t,e,n,52,8),e+8}function qt(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 Zt(r){return r<16?"0"+r.toString(16):r.toString(16)}function oe(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],s=0;s<n;++s){if(e=r.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Qt(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Xt(r,t){for(var e,n,i,o=[],s=0;s<r.length&&!((t-=2)<0);++s)e=r.charCodeAt(s),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function Oe(r){return Pt(qt(r))}function ue(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 Kt(r){return r!==r}function jt(r){return r!=null&&(!!r._isBuffer||We(r)||er(r))}function We(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"&&We(r.slice(0,0))}function fe(r,t,e,n,i){var o,s,p=i*8-n-1,h=(1<<p)-1,y=h>>1,w=-7,l=e?i-1:0,N=e?-1:1,A=r[t+l];for(l+=N,o=A&(1<<-w)-1,A>>=-w,w+=p;w>0;o=o*256+r[t+l],l+=N,w-=8);for(s=o&(1<<-w)-1,o>>=-w,w+=n;w>0;s=s*256+r[t+l],l+=N,w-=8);if(o===0)o=1-y;else{if(o===h)return s?NaN:(A?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-y}return(A?-1:1)*s*Math.pow(2,o-n)}function Ge(r,t,e,n,i,o){var s,p,h,y=o*8-i-1,w=(1<<y)-1,l=w>>1,N=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=n?0:o-1,Z=n?1:-1,Je=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,s=w):(s=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-s))<1&&(s--,h*=2),s+l>=1?t+=N/h:t+=N*Math.pow(2,1-l),t*h>=2&&(s++,h/=2),s+l>=w?(p=0,s=w):s+l>=1?(p=(t*h-1)*Math.pow(2,i),s=s+l):(p=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;r[e+A]=p&255,A+=Z,p/=256,i-=8);for(s=s<<i|p,y+=i;y>0;r[e+A]=s&255,A+=Z,s/=256,y-=8);r[e+A-Z]|=Je*128}var S,v,Nt,ye,be,Jt,Ve=le(()=>{"use strict";u();f();S=[],v=[],Nt=typeof Uint8Array!="undefined"?Uint8Array:Array,ye=!1;a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;a.poolSize=8192;a._augment=function(r){return r.__proto__=a.prototype,r};a.from=function(r,t,e){return Be(null,r,t,e)};a.kMaxLength=ie();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(r,t,e){return bt(null,r,t,e)};a.allocUnsafe=function(r){return we(null,r)};a.allocUnsafeSlow=function(r){return we(null,r)};a.isBuffer=jt;a.compare=function(t,e){if(!_(t)||!_(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,s=Math.min(n,i);o<s;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=a.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!_(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};a.byteLength=Le;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)$(this,e,e+1);return this};a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)$(this,e,e+3),$(this,e+1,e+2);return this};a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)$(this,e,e+7),$(this,e+1,e+6),$(this,e+2,e+5),$(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Fe(this,0,t):Lt.apply(this,arguments)};a.prototype.equals=function(t){if(!_(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,n,i,o){if(!_(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,p=n-e,h=Math.min(s,p),y=this.slice(i,o),w=t.slice(e,n),l=0;l<h;++l)if(y[l]!==w[l]){s=y[l],p=w[l];break}return s<p?-1:p<s?1:0};a.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};a.prototype.indexOf=function(t,e,n){return Ce(this,t,e,n,!0)};a.prototype.lastIndexOf=function(t,e,n){return Ce(this,t,e,n,!1)};a.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return Ct(this,t,e,n);case"utf8":case"utf-8":return Mt(this,t,e,n);case"ascii":return Me(this,t,e,n);case"latin1":case"binary":return Ft(this,t,e,n);case"base64":return Dt(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Yt(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};be=4096;a.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(a.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=a.prototype;else{var o=e-t;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i};a.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||x(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return i};a.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||x(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};a.prototype.readUInt8=function(t,e){return e||x(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||x(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||x(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,e){return e||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};a.prototype.readUInt32BE=function(t,e){return e||x(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||x(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||x(t,e,this.length);for(var i=e,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(t,e){return e||x(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,e){e||x(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(t,e){e||x(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(t,e){return e||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};a.prototype.readInt32BE=function(t,e){return e||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};a.prototype.readFloatLE=function(t,e){return e||x(t,4,this.length),fe(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||x(t,4,this.length),fe(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||x(t,8,this.length),fe(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||x(t,8,this.length),fe(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;g(this,t,e,n,o,0)}var s=1,p=0;for(this[e]=t&255;++p<n&&(s*=256);)this[e+p]=t/s&255;return e+n};a.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;g(this,t,e,n,o,0)}var s=n-1,p=1;for(this[e+s]=t&255;--s>=0&&(p*=256);)this[e+s]=t/p&255;return e+n};a.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):se(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):se(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):ae(this,t,e,!0),e+4};a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ae(this,t,e,!1),e+4};a.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);g(this,t,e,n,o-1,-o)}var s=0,p=1,h=0;for(this[e]=t&255;++s<n&&(p*=256);)t<0&&h===0&&this[e+s-1]!==0&&(h=1),this[e+s]=(t/p>>0)-h&255;return e+n};a.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);g(this,t,e,n,o-1,-o)}var s=n-1,p=1,h=0;for(this[e+s]=t&255;--s>=0&&(p*=256);)t<0&&h===0&&this[e+s+1]!==0&&(h=1),this[e+s]=(t/p>>0)-h&255;return e+n};a.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};a.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):se(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):se(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):ae(this,t,e,!0),e+4};a.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ae(this,t,e,!1),e+4};a.prototype.writeFloatLE=function(t,e,n){return Ye(this,t,e,!0,n)};a.prototype.writeFloatBE=function(t,e,n){return Ye(this,t,e,!1,n)};a.prototype.writeDoubleLE=function(t,e,n){return $e(this,t,e,!0,n)};a.prototype.writeDoubleBE=function(t,e,n){return $e(this,t,e,!1,n)};a.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,s;if(this===t&&n<e&&e<i)for(s=o-1;s>=0;--s)t[s+e]=this[s+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+e]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};a.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.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 s;if(typeof t=="number")for(s=e;s<n;++s)this[s]=t;else{var p=_(t)?t:oe(new a(t,i).toString()),h=p.length;for(s=0;s<n-e;++s)this[s+e]=p[s%h]}return this};Jt=/[^+\/0-9A-Za-z-_]/g});var f=le(()=>{"use strict";Ve()});var Nr={};Ae(Nr,{FilePropertyMapper:()=>Te});module.exports=Ke(Nr);u();f();u();f();u();f();u();f();function O(r){throw new Error("Unexpected value: "+JSON.stringify(r))}u();f();u();f();var W=class{};u();f();u();f();var F=class extends W{constructor(e){super();c(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var tr=4,K=class{constructor(){c(this,"buffer","");c(this,"indentLevel",0);c(this,"hasWrittenAnything",!1);c(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
2
+ `),n=e?t.substring(0,t.length-1):t,i=this.getIndentString(),o=n.replaceAll(`
3
3
  `,`
4
- ${i}`);this.isAtStartOfLine()&&(s=i+s),e&&(s+=`
5
- `),this.writeInternal(s)}writeNoIndent(r){let e=this.indentLevel;this.indentLevel=0,this.write(r),this.indentLevel=e}writeNode(r){r.write(this)}writeNodeStatement(r){r.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(r){new w(r).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(r,e){new w(r).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(r,e="{",t,i="}"){let s=r.filter(p=>p!==void 0).join(" ");s?this.write(`${s} ${e!=null?e:""}`):this.write(e!=null?e:"");try{this.indent(),t(),this.dedent()}finally{this.write(i!=null?i:"")}}writeLine(r=""){this.write(r),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
4
+ ${i}`);this.isAtStartOfLine()&&(o=i+o),e&&(o+=`
5
+ `),this.writeInternal(o)}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){t.write(this)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new F(t).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new F(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(t,e="{",n,i="}"){let o=t.filter(s=>s!==void 0).join(" ");o?this.write(`${o} ${e!=null?e:""}`):this.write(e!=null?e:"");try{this.indent(),n(),this.dedent()}finally{this.write(i!=null?i:"")}}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
6
6
  `)}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
7
- `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}writeInternal(r){return r.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=r.endsWith(`
8
- `)),this.buffer+=r}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*q)}};var E=class{},P=class extends E{async format(r){return r}formatSync(r){return r}};function _(n){return(n==null?void 0:n.name)!=null}function C(n,r){var t,i;let e=(t=n.split("/").pop())!=null?t:n;return r!=null&&r.stripExtension&&(i=e.split(".")[0])!=null?i:e}var H=/[^0-9a-zA-Z_]/g,N=class extends k{constructor({packageName:e,rootImportPath:t,importPath:i,customConfig:s,formatter:p}){super();o(this,"packageName");o(this,"rootImportPath");o(this,"importPath");o(this,"customConfig");o(this,"formatter");o(this,"imports",{});this.packageName=e,this.rootImportPath=t,this.importPath=i,this.customConfig=s,this.formatter=p!=null?p:new P}addImport(e){let t=this.imports[e];if(t!=null)return t;let i=this.getValidAlias(C(e));for(;i in this.imports;)i="_"+i;return this.imports[e]=i,i}getValidAlias(e){let t=e.split("-");return t[0]==null?e:t[0].replace(H,"")}};var S=class extends N{constructor({packageName:r,rootImportPath:e,importPath:t,customConfig:i,formatter:s}){super({packageName:r,rootImportPath:e,importPath:t,customConfig:i,formatter:s})}async toString(){let r=this.getContent();if(this.formatter!=null)try{return this.formatter.format(r)}catch(e){throw new Error(`Failed to format Go file: ${e}
9
- ${r}`)}return r}toStringSync(){let r=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(r)}catch(e){throw new Error(`Failed to format Go file: ${e}
10
- ${r}`)}return r}getContent(){let r=`package ${this.packageName}
7
+ `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
8
+ `)),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*tr)}};u();f();var ce=class{},j=class extends ce{async format(t){return t}formatSync(t){return t}};u();f();function xe(r){return(r==null?void 0:r.name)!=null}u();f();u();f();u();f();u();f();u();f();u();f();u();f();function ge(r,t){var n,i;let e=(n=r.split("/").pop())!=null?n:r;return t!=null&&t.stripExtension&&(i=e.split(".")[0])!=null?i:e}var rr=/[^0-9a-zA-Z_]/g,G=class extends K{constructor({packageName:e,rootImportPath:n,importPath:i,customConfig:o,formatter:s}){super();c(this,"packageName");c(this,"rootImportPath");c(this,"importPath");c(this,"customConfig");c(this,"formatter");c(this,"imports",{});this.packageName=e,this.rootImportPath=n,this.importPath=i,this.customConfig=o,this.formatter=s!=null?s:new j}addImport(e){let n=this.imports[e];if(n!=null)return n;let i=this.getValidAlias(ge(e));for(;i in this.imports;)i="_"+i;return this.imports[e]=i,i}getValidAlias(e){let n=e.split("-");return n[0]==null?e:n[0].replace(rr,"")}};var ee=class extends G{constructor({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o}){super({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o})}async toString(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format Go file: ${e}
9
+ ${t}`)}return t}toStringSync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(t)}catch(e){throw new Error(`Failed to format Go file: ${e}
10
+ ${t}`)}return t}getContent(){let t=`package ${this.packageName}
11
11
 
12
- `,e=this.stringifyImports();return e.length>0?`${r}${e}
12
+ `,e=this.stringifyImports();return e.length>0?`${t}${e}
13
13
 
14
- ${this.buffer}`:r+this.buffer}stringifyImports(){let r=Object.entries(this.imports).filter(([e,t])=>e!==this.importPath).map(([e,t])=>` ${t} "${e}"`).join(`
15
- `);return r?`import (
16
- ${r}
17
- )`:""}};var a=class extends x{async toString({packageName:r,rootImportPath:e,importPath:t,customConfig:i,formatter:s}){let p=new S({packageName:r,rootImportPath:e,importPath:t,customConfig:i,formatter:s});return this.write(p),p.toString()}toStringSync({packageName:r,rootImportPath:e,importPath:t,customConfig:i,formatter:s}){let p=new S({packageName:r,rootImportPath:e,importPath:t,customConfig:i,formatter:s});return this.write(p),p.toStringSync()}};var f=class extends a{constructor(e){super();o(this,"arg");this.arg=e}write(e){return new w(this.arg).write(e)}};var u=class extends a{constructor({docs:e}={}){super();o(this,"docs");this.docs=e}write(e){this.docs!=null&&this.docs.split(`
18
- `).forEach(t=>{e.writeLine(`// ${t}`)})}};var T=class extends a{constructor({name:e,docs:t}){super();o(this,"name");o(this,"docs");o(this,"members",[]);this.name=e,this.docs=t}addMember(e){this.members.push(e)}write(e){e.writeNode(new u({docs:this.docs})),e.write(`type ${this.name} string`)}};var b=class extends a{constructor({name:e,type:t,docs:i}){super();o(this,"name");o(this,"type");o(this,"docs");this.name=e,this.type=t,this.docs=i}write(e){e.writeNode(new u({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};var d=class extends a{constructor({name:e,parameters:t,return_:i,body:s,docs:p,typeReference:D}){super();o(this,"name");o(this,"parameters");o(this,"return_");o(this,"body");o(this,"docs");o(this,"typeReference");this.name=e,this.parameters=t,this.return_=i,this.body=s,this.docs=p,this.typeReference=D}write(e){var t;if(e.writeNode(new u({docs:this.docs})),e.write("func "),this.typeReference!=null&&this.writeReceiver({writer:e,typeReference:this.typeReference}),e.write(`${this.name}`),this.parameters.length===0)e.write("() ");else{e.writeLine("(");for(let i of this.parameters)e.writeNode(i),e.writeLine(",");e.write(")")}this.return_!=null&&(e.write("("),this.return_.forEach((i,s)=>{s>0&&e.write(", "),e.writeNode(i)}),e.write(")")),e.writeLine(" {"),e.indent(),(t=this.body)==null||t.write(e),e.dedent(),e.writeNewLineIfLastLineNot(),e.writeLine("}")}writeReceiver({writer:e,typeReference:t}){e.write(`(${this.getReceiverName(t.name)} `),t.write(e),e.write(") ")}getReceiverName(e){return e.charAt(0).toLowerCase()}};var v=class extends a{constructor({name:e,parameters:t,return_:i,body:s,docs:p}){super();o(this,"func");this.func=new d({name:e,parameters:t,return_:i,body:s,docs:p})}get name(){return this.func.name}get parameters(){return this.func.parameters}get return_(){return this.func.return_}get body(){return this.func.body}get docs(){return this.func.docs}write(e){e.writeNode(this.func)}};var c=class extends a{constructor({name:e,importPath:t}){super();o(this,"name");o(this,"importPath");this.name=e,this.importPath=t}write(e){if(e.importPath===this.importPath){e.write(this.name);return}let t=e.addImport(this.importPath);e.write(`${t}.${this.name}`)}};var y=class extends a{constructor({method:e,arguments_:t,on:i}){super();o(this,"on");o(this,"method");o(this,"arguments_");this.on=i,this.method=e,this.arguments_=t}write(e){this.on.write(e),e.write("."),e.write(this.method),F({writer:e,arguments_:this.arguments_})}};var J=new Set(["bool","date","dateTime","float64","int","int64","string","uuid"]),M=new Set(["any","bytes","map","slice"]),m=class n extends a{constructor(e){super();o(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"any":this.writeAny({writer:e,value:this.internalType.value});break;case"bool":e.write(this.internalType.value.toString());break;case"bytes":e.write(`[]byte("${this.internalType.value}")`);break;case"date":case"dateTime":e.writeNode(K({writer:e,type:this.internalType}));break;case"enum":e.writeNode(this.internalType.typeReference);break;case"float64":e.write(this.internalType.value.toString());break;case"int":case"int64":e.write(this.internalType.value.toString());break;case"map":this.writeMap({writer:e,map:this.internalType});break;case"nil":e.write("nil");break;case"nop":break;case"optional":this.writeOptional({writer:e,type:this.internalType.value});break;case"reference":e.writeNode(this.internalType.value);break;case"slice":this.writeSlice({writer:e,slice:this.internalType});break;case"string":e.write(this.internalType.value.includes('"')||this.internalType.value.includes(`
19
- `)?`\`${this.internalType.value}\``:`"${this.internalType.value}"`);break;case"struct":this.writeStruct({writer:e,struct:this.internalType});break;case"uuid":e.writeNode(Q({value:this.internalType.value}));break;default:g(this.internalType)}}static any(e){return new this({type:"any",value:e})}static bool(e){return new this({type:"bool",value:e})}static bytes(e){return new this({type:"bytes",value:e})}static date(e){return new this({type:"date",value:e})}static dateTime(e){return new this({type:"dateTime",value:e})}static enum(e){return new this({type:"enum",typeReference:e})}static float64(e){return new this({type:"float64",value:e})}static int(e){return new this({type:"int",value:e})}static int64(e){return new this({type:"int64",value:e})}static map({keyType:e,valueType:t,entries:i}){return new this({type:"map",keyType:e,valueType:t,entries:i})}static nil(){return new this({type:"nil"})}static nop(){return new this({type:"nop"})}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 slice({valueType:e,values:t}){return new this({type:"slice",valueType:e,values:t})}static string(e){return new this({type:"string",value:e})}static struct({typeReference:e,fields:t}){return new this({type:"struct",typeReference:e,fields:t})}static structPointer({typeReference:e,fields:t}){return new this({type:"optional",value:new this({type:"struct",typeReference:e,fields:t})})}static uuid(e){return new this({type:"uuid",value:e})}static isNop(e){return e.internalType.type==="optional"?this.isNop(e.internalType.value):e.internalType.type==="nop"}writeAny({writer:e,value:t}){switch(typeof t){case"boolean":e.write(t.toString());return;case"string":e.write(t.includes('"')?`\`${t}\``:`"${t}"`);return;case"number":e.write(t.toString());return;case"object":if(t==null){e.write("nil");return}if(Array.isArray(t)){this.writeAnyArray({writer:e,value:t});return}this.writeAnyObject({writer:e,value:t});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof t}`)}}writeAnyArray({writer:e,value:t}){if(e.write("[]interface{}"),t.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let i of t)e.writeNode(n.any(i)),e.writeLine(",");e.dedent(),e.write("}")}writeAnyObject({writer:e,value:t}){e.write("map[string]interface{}");let i=Object.entries(t);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[s,p]of i)e.write(`"${s}": `),e.writeNode(n.any(p)),e.writeLine(",");e.dedent(),e.write("}")}writeMap({writer:e,map:t}){e.write("map["),e.writeNode(t.keyType),e.write("]"),e.writeNode(t.valueType);let i=X({entries:t.entries});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let s of i)s.key.write(e),e.write(": "),s.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeOptional({writer:e,type:t}){if(J.has(t.internalType.type)){e.writeNode(z({writer:e,type:t}));return}if(M.has(t.internalType.type)){t.write(e);return}if(t.internalType.type==="enum"){e.writeNode(new y({on:t.internalType.typeReference,method:"Ptr",arguments_:[]}));return}e.write("&"),t.write(e)}static isAlreadyOptional(e){return e.internalType.type==="optional"||M.has(e.internalType.type)}writeSlice({writer:e,slice:t}){e.write("[]"),e.writeNode(t.valueType);let i=te({values:t.values});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let s of i)s.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeStruct({writer:e,struct:t}){e.writeNode(t.typeReference);let i=ee({fields:t.fields});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let s of i)e.write(`${s.name}: `),s.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}};function z({writer:n,type:r}){return new h({func:new c({name:Z({type:r}),importPath:n.rootImportPath}),arguments_:[r]})}function Z({type:n}){switch(n.internalType.type){case"bool":return"Bool";case"date":case"dateTime":return"Time";case"float64":return"Float64";case"int":return"Int";case"int64":return"Int64";case"string":return"String";case"uuid":return"UUID";default:return""}}function K({writer:n,type:r}){let e=r instanceof Date?"MustParseDate":"MustParseDateTime";return new h({func:new c({name:e,importPath:n.rootImportPath}),arguments_:[new f(`"${r.value}"`)]})}function Q({value:n}){return new h({func:new c({name:"MustParse",importPath:"github.com/google/uuid"}),arguments_:[new f(`"${n}"`)]})}function X({entries:n}){return n.filter(r=>!m.isNop(r.key)&&!m.isNop(r.value))}function ee({fields:n}){return n.filter(r=>!m.isNop(r.value))}function te({values:n}){return n.filter(r=>!m.isNop(r))}function F({writer:n,arguments_:r}){let e=ne(r);if(e.length===0){n.write("()");return}n.writeLine("("),n.indent();for(let t of e)re({writer:n,argument:t}),n.writeLine(",");n.dedent(),n.write(")")}function re({writer:n,argument:r}){_(r)?r.assignment.write(n):r.write(n)}function ne(n){return n.filter(r=>!(r instanceof m&&m.isNop(r)))}var h=class extends a{constructor({func:e,arguments_:t}){super();o(this,"func");o(this,"arguments_");this.func=e,this.arguments_=t}write(e){e.writeNode(this.func),F({writer:e,arguments_:this.arguments_})}};var A=class extends a{constructor({name:e,type:t,docs:i}){super();o(this,"name");o(this,"type");o(this,"docs");this.name=e,this.type=t,this.docs=i}write(e){e.writeNode(new u({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};var I=class extends a{constructor({name:e,importPath:t,docs:i}){super();o(this,"name");o(this,"importPath");o(this,"docs");o(this,"fields",[]);o(this,"methods",[]);this.name=e,this.importPath=t,this.docs=i}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){if(e.writeNode(new u({docs:this.docs})),e.write(`type ${this.name} struct {`),this.fields.length>0)e.writeLine("}");else{e.newLine(),e.indent();for(let t of this.fields)e.writeNode(t),e.newLine();e.dedent(),e.writeLine("}")}(this.constructor!=null||this.methods.length>0)&&e.newLine();for(let t of this.methods)e.writeNode(t),e.newLine()}};var ie=new Set(["any","bytes","map","slice"]),L=class n extends a{constructor(e){super();o(this,"internalType");this.internalType=e}write(e,{comment:t}={}){switch(this.internalType.type){case"any":e.write("interface{}");break;case"bool":e.write("bool");break;case"bytes":e.write("[]byte");break;case"date":case"dateTime":e.writeNode(oe);break;case"float64":e.write("float64");break;case"int":e.write("int");break;case"int64":e.write("int64");break;case"map":{e.write("map["),this.internalType.keyType.write(e),e.write("]"),this.internalType.valueType.write(e);break}case"optional":{e.write("*"),this.internalType.value.write(e);break}case"reference":e.writeNode(this.internalType.value);break;case"slice":e.write("[]"),this.internalType.value.write(e);break;case"string":e.write("string");break;case"uuid":e.writeNode(se);break;default:g(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static any(){return new this({type:"any"})}static bool(){return new this({type:"bool"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static float64(){return new this({type:"float64"})}static int(){return new this({type:"int"})}static int64(){return new this({type:"int64"})}static map(e,t){return new this({type:"map",keyType:e,valueType:t})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static pointer(e){return n.optional(e)}static reference(e){return new this({type:"reference",value:e})}static slice(e){return new this({type:"slice",value:e})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static isAlreadyOptional(e){return e.internalType.type==="optional"||ie.has(e.internalType.type)}},oe=new c({importPath:"time",name:"Time"}),se=new c({importPath:"github.com/google/uuid",name:"UUID"});var l={};O(l,{AstNode:()=>a,CodeBlock:()=>f,Enum:()=>T,Field:()=>b,Func:()=>v,FuncInvocation:()=>h,Method:()=>d,MethodInvocation:()=>y,Parameter:()=>A,Struct:()=>I,Type:()=>L,TypeInstantiation:()=>m,TypeReference:()=>c,Writer:()=>N,codeblock:()=>ae,enum_:()=>pe,field:()=>ce,func:()=>le,invokeFunc:()=>ue,invokeMethod:()=>me,method:()=>he,parameter:()=>fe,struct:()=>de,typeReference:()=>ye});function ae(n){return new f(n)}function pe(n){return new T(n)}function ce(n){return new b(n)}function le(n){return new v(n)}function ue(n){return new h(n)}function me(n){return new y(n)}function he(n){return new d(n)}function fe(n){return new A(n)}function de(n){return new I(n)}function ye(n){return new c(n)}var $={Critical:"CRITICAL",Warning:"WARNING"};var B=class{constructor({context:r}){o(this,"context");this.context=r}getFilePropertyInfo({body:r,value:e}){var s;let t={fileFields:[],bodyPropertyFields:[]},i=(s=this.context.getRecord(e))!=null?s:{};for(let p of r.properties)switch(p.type){case"file":t.fileFields.push({name:this.context.getTypeName(p.name),value:this.getSingleFileProperty({property:p,record:i})});break;case"fileArray":t.fileFields.push({name:this.context.getTypeName(p.name),value:this.getArrayFileProperty({property:p,record:i})});break;case"bodyProperty":t.bodyPropertyFields.push({name:this.context.getTypeName(p.name.name),value:this.getBodyProperty({property:p,record:i})});break;default:g(p)}return t}getSingleFileProperty({property:r,record:e}){let t=e[r.wireValue];return t==null?l.TypeInstantiation.nop():typeof t!="string"?(this.context.errors.add({severity:$.Critical,message:`Expected file value to be a string, got ${typeof t}`}),l.TypeInstantiation.nop()):l.TypeInstantiation.reference(this.context.getNewStringsReaderFunctionInvocation(t))}getArrayFileProperty({property:r,record:e}){let t=e[r.wireValue];if(t==null)return l.TypeInstantiation.nop();if(!Array.isArray(t))return this.context.errors.add({severity:$.Critical,message:`Expected file array value to be an array of strings, got ${typeof t}`}),l.TypeInstantiation.nop();let i=[];for(let s of t)typeof s!="string"&&this.context.errors.add({severity:$.Critical,message:`Expected file array value to be an array of strings, got ${typeof s}`}),i.push(s);return l.TypeInstantiation.slice({valueType:l.Type.reference(this.context.getIoReaderTypeReference()),values:i.map(s=>l.TypeInstantiation.reference(this.context.getNewStringsReaderFunctionInvocation(s)))})}getBodyProperty({property:r,record:e}){let t=e[r.name.wireValue];return t==null?l.TypeInstantiation.nop():this.context.dynamicTypeInstantiationMapper.convert({typeReference:r.typeReference,value:t})}};0&&(module.exports={FilePropertyMapper});
14
+ ${this.buffer}`:t+this.buffer}stringifyImports(){let t=Object.entries(this.imports).filter(([e,n])=>e!==this.importPath).map(([e,n])=>` ${n} "${e}"`).join(`
15
+ `);return t?`import (
16
+ ${t}
17
+ )`:""}};var d=class extends W{async toString({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o}){let s=new ee({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o});return this.write(s),s.toString()}toStringSync({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o}){let s=new ee({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o});return this.write(s),s.toStringSync()}};var b=class extends d{constructor(e){super();c(this,"arg");this.arg=e}write(e){return new F(this.arg).write(e)}};u();f();u();f();var I=class extends d{constructor({docs:e}={}){super();c(this,"docs");this.docs=e}write(e){this.docs!=null&&this.docs.split(`
18
+ `).forEach(n=>{e.writeLine(`// ${n}`)})}};var V=class extends d{constructor({name:e,docs:n}){super();c(this,"name");c(this,"docs");c(this,"members",[]);this.name=e,this.docs=n}addMember(e){this.members.push(e)}write(e){e.writeNode(new I({docs:this.docs})),e.write(`type ${this.name} string`)}};u();f();var H=class extends d{constructor({name:e,type:n,docs:i}){super();c(this,"name");c(this,"type");c(this,"docs");this.name=e,this.type=n,this.docs=i}write(e){e.writeNode(new I({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};u();f();u();f();var U=class extends d{constructor({name:e,parameters:n,return_:i,body:o,docs:s,typeReference:p}){super();c(this,"name");c(this,"parameters");c(this,"return_");c(this,"body");c(this,"docs");c(this,"typeReference");this.name=e,this.parameters=n,this.return_=i,this.body=o,this.docs=s,this.typeReference=p}write(e){var n;if(e.writeNode(new I({docs:this.docs})),e.write("func "),this.typeReference!=null&&this.writeReceiver({writer:e,typeReference:this.typeReference}),e.write(`${this.name}`),this.parameters.length===0)e.write("() ");else{e.writeLine("(");for(let i of this.parameters)e.writeNode(i),e.writeLine(",");e.write(")")}this.return_!=null&&(e.write("("),this.return_.forEach((i,o)=>{o>0&&e.write(", "),e.writeNode(i)}),e.write(")")),e.writeLine(" {"),e.indent(),(n=this.body)==null||n.write(e),e.dedent(),e.writeNewLineIfLastLineNot(),e.writeLine("}")}writeReceiver({writer:e,typeReference:n}){e.write(`(${this.getReceiverName(n.name)} `),n.write(e),e.write(") ")}getReceiverName(e){return e.charAt(0).toLowerCase()}};var J=class extends d{constructor({name:e,parameters:n,return_:i,body:o,docs:s}){super();c(this,"func");this.func=new U({name:e,parameters:n,return_:i,body:o,docs:s})}get name(){return this.func.name}get parameters(){return this.func.parameters}get return_(){return this.func.return_}get body(){return this.func.body}get docs(){return this.func.docs}write(e){e.writeNode(this.func)}};u();f();u();f();u();f();u();f();var T=class extends d{constructor({name:e,importPath:n}){super();c(this,"name");c(this,"importPath");this.name=e,this.importPath=n}write(e){if(e.importPath===this.importPath){e.write(this.name);return}let n=e.addImport(this.importPath);e.write(`${n}.${this.name}`)}};u();f();var L=class extends d{constructor({method:e,arguments_:n,on:i}){super();c(this,"on");c(this,"method");c(this,"arguments_");this.on=i,this.method=e,this.arguments_=n}write(e){this.on.write(e),e.write("."),e.write(this.method),pe({writer:e,arguments_:this.arguments_})}};var nr=new Set(["bool","date","dateTime","float64","int","int64","string","uuid"]),He=new Set(["any","bytes","map","slice"]),R=class r extends d{constructor(e){super();c(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"any":this.writeAny({writer:e,value:this.internalType.value});break;case"bool":e.write(this.internalType.value.toString());break;case"bytes":e.write(`[]byte("${this.internalType.value}")`);break;case"date":case"dateTime":e.writeNode(sr({writer:e,type:this.internalType}));break;case"enum":e.writeNode(this.internalType.typeReference);break;case"float64":e.write(this.internalType.value.toString());break;case"int":case"int64":e.write(this.internalType.value.toString());break;case"map":this.writeMap({writer:e,map:this.internalType});break;case"nil":e.write("nil");break;case"nop":break;case"optional":this.writeOptional({writer:e,type:this.internalType.value});break;case"reference":e.writeNode(this.internalType.value);break;case"slice":this.writeSlice({writer:e,slice:this.internalType});break;case"string":e.write(this.internalType.value.includes('"')||this.internalType.value.includes(`
19
+ `)?`\`${this.internalType.value}\``:`"${this.internalType.value}"`);break;case"struct":this.writeStruct({writer:e,struct:this.internalType});break;case"uuid":e.writeNode(ar({value:this.internalType.value}));break;default:O(this.internalType)}}static any(e){return new this({type:"any",value:e})}static bool(e){return new this({type:"bool",value:e})}static bytes(e){return new this({type:"bytes",value:e})}static date(e){return new this({type:"date",value:e})}static dateTime(e){return new this({type:"dateTime",value:e})}static enum(e){return new this({type:"enum",typeReference:e})}static float64(e){return new this({type:"float64",value:e})}static int(e){return new this({type:"int",value:e})}static int64(e){return new this({type:"int64",value:e})}static map({keyType:e,valueType:n,entries:i}){return new this({type:"map",keyType:e,valueType:n,entries:i})}static nil(){return new this({type:"nil"})}static nop(){return new this({type:"nop"})}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 slice({valueType:e,values:n}){return new this({type:"slice",valueType:e,values:n})}static string(e){return new this({type:"string",value:e})}static struct({typeReference:e,fields:n}){return new this({type:"struct",typeReference:e,fields:n})}static structPointer({typeReference:e,fields:n}){return new this({type:"optional",value:new this({type:"struct",typeReference:e,fields:n})})}static uuid(e){return new this({type:"uuid",value:e})}static isNop(e){return e.internalType.type==="optional"?this.isNop(e.internalType.value):e.internalType.type==="nop"}writeAny({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("nil");return}if(Array.isArray(n)){this.writeAnyArray({writer:e,value:n});return}this.writeAnyObject({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeAnyArray({writer:e,value:n}){if(e.write("[]interface{}"),n.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let i of n)e.writeNode(r.any(i)),e.writeLine(",");e.dedent(),e.write("}")}writeAnyObject({writer:e,value:n}){e.write("map[string]interface{}");let i=Object.entries(n);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[o,s]of i)e.write(`"${o}": `),e.writeNode(r.any(s)),e.writeLine(",");e.dedent(),e.write("}")}writeMap({writer:e,map:n}){e.write("map["),e.writeNode(n.keyType),e.write("]"),e.writeNode(n.valueType);let i=ur({entries:n.entries});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)o.key.write(e),e.write(": "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeOptional({writer:e,type:n}){if(nr.has(n.internalType.type)){e.writeNode(ir({writer:e,type:n}));return}if(He.has(n.internalType.type)){n.write(e);return}if(n.internalType.type==="enum"){e.writeNode(new L({on:n.internalType.typeReference,method:"Ptr",arguments_:[]}));return}e.write("&"),n.write(e)}static isAlreadyOptional(e){return e.internalType.type==="optional"||He.has(e.internalType.type)}writeSlice({writer:e,slice:n}){e.write("[]"),e.writeNode(n.valueType);let i=cr({values:n.values});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeStruct({writer:e,struct:n}){e.writeNode(n.typeReference);let i=fr({fields:n.fields});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)e.write(`${o.name}: `),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}};function ir({writer:r,type:t}){return new P({func:new T({name:or({type:t}),importPath:r.rootImportPath}),arguments_:[t]})}function or({type:r}){switch(r.internalType.type){case"bool":return"Bool";case"date":case"dateTime":return"Time";case"float64":return"Float64";case"int":return"Int";case"int64":return"Int64";case"string":return"String";case"uuid":return"UUID";default:return""}}function sr({writer:r,type:t}){let e=t instanceof Date?"MustParseDate":"MustParseDateTime";return new P({func:new T({name:e,importPath:r.rootImportPath}),arguments_:[new b(`"${t.value}"`)]})}function ar({value:r}){return new P({func:new T({name:"MustParse",importPath:"github.com/google/uuid"}),arguments_:[new b(`"${r}"`)]})}function ur({entries:r}){return r.filter(t=>!R.isNop(t.key)&&!R.isNop(t.value))}function fr({fields:r}){return r.filter(t=>!R.isNop(t.value))}function cr({values:r}){return r.filter(t=>!R.isNop(t))}function pe({writer:r,arguments_:t}){let e=hr(t);if(e.length===0){r.write("()");return}r.writeLine("("),r.indent();for(let n of e)pr({writer:r,argument:n}),r.writeLine(",");r.dedent(),r.write(")")}function pr({writer:r,argument:t}){xe(t)?t.assignment.write(r):t.write(r)}function hr(r){return r.filter(t=>!(t instanceof R&&R.isNop(t)))}var P=class extends d{constructor({func:e,arguments_:n}){super();c(this,"func");c(this,"arguments_");this.func=e,this.arguments_=n}write(e){e.writeNode(this.func),pe({writer:e,arguments_:this.arguments_})}};u();f();var q=class extends d{constructor({name:e,type:n,docs:i}){super();c(this,"name");c(this,"type");c(this,"docs");this.name=e,this.type=n,this.docs=i}write(e){e.writeNode(new I({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};u();f();var z=class extends d{constructor({name:e,importPath:n,docs:i}){super();c(this,"name");c(this,"importPath");c(this,"docs");c(this,"fields",[]);c(this,"methods",[]);this.name=e,this.importPath=n,this.docs=i}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){if(e.writeNode(new I({docs:this.docs})),e.write(`type ${this.name} struct {`),this.fields.length>0)e.writeLine("}");else{e.newLine(),e.indent();for(let n of this.fields)e.writeNode(n),e.newLine();e.dedent(),e.writeLine("}")}(this.constructor!=null||this.methods.length>0)&&e.newLine();for(let n of this.methods)e.writeNode(n),e.newLine()}};u();f();var lr=new Set(["any","bytes","map","slice"]),te=class r extends d{constructor(e){super();c(this,"internalType");this.internalType=e}write(e,{comment:n}={}){switch(this.internalType.type){case"any":e.write("interface{}");break;case"bool":e.write("bool");break;case"bytes":e.write("[]byte");break;case"date":case"dateTime":e.writeNode(mr);break;case"float64":e.write("float64");break;case"int":e.write("int");break;case"int64":e.write("int64");break;case"map":{e.write("map["),this.internalType.keyType.write(e),e.write("]"),this.internalType.valueType.write(e);break}case"optional":{e.write("*"),this.internalType.value.write(e);break}case"reference":e.writeNode(this.internalType.value);break;case"slice":e.write("[]"),this.internalType.value.write(e);break;case"string":e.write("string");break;case"uuid":e.writeNode(yr);break;default:O(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static any(){return new this({type:"any"})}static bool(){return new this({type:"bool"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static float64(){return new this({type:"float64"})}static int(){return new this({type:"int"})}static int64(){return new this({type:"int64"})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static pointer(e){return r.optional(e)}static reference(e){return new this({type:"reference",value:e})}static slice(e){return new this({type:"slice",value:e})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static isAlreadyOptional(e){return e.internalType.type==="optional"||lr.has(e.internalType.type)}},mr=new T({importPath:"time",name:"Time"}),yr=new T({importPath:"github.com/google/uuid",name:"UUID"});var E={};Ae(E,{AstNode:()=>d,CodeBlock:()=>b,Enum:()=>V,Field:()=>H,Func:()=>J,FuncInvocation:()=>P,Method:()=>U,MethodInvocation:()=>L,Parameter:()=>q,Struct:()=>z,Type:()=>te,TypeInstantiation:()=>R,TypeReference:()=>T,Writer:()=>G,codeblock:()=>wr,enum_:()=>dr,field:()=>xr,func:()=>gr,invokeFunc:()=>Tr,invokeMethod:()=>Ar,method:()=>Er,parameter:()=>vr,struct:()=>Ir,typeReference:()=>Rr});u();f();function wr(r){return new b(r)}function dr(r){return new V(r)}function xr(r){return new H(r)}function gr(r){return new J(r)}function Tr(r){return new P(r)}function Ar(r){return new L(r)}function Er(r){return new U(r)}function vr(r){return new q(r)}function Ir(r){return new z(r)}function Rr(r){return new T(r)}u();f();var he={Critical:"CRITICAL",Warning:"WARNING"};var Te=class{constructor({context:t}){c(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){var o;let n={fileFields:[],bodyPropertyFields:[]},i=(o=this.context.getRecord(e))!=null?o:{};for(let s of t.properties)switch(s.type){case"file":n.fileFields.push({name:this.context.getTypeName(s.name),value:this.getSingleFileProperty({property:s,record:i})});break;case"fileArray":n.fileFields.push({name:this.context.getTypeName(s.name),value:this.getArrayFileProperty({property:s,record:i})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getTypeName(s.name.name),value:this.getBodyProperty({property:s,record:i})});break;default:O(s)}return n}getSingleFileProperty({property:t,record:e}){let n=e[t.wireValue];return n==null?E.TypeInstantiation.nop():typeof n!="string"?(this.context.errors.add({severity:he.Critical,message:`Expected file value to be a string, got ${typeof n}`}),E.TypeInstantiation.nop()):E.TypeInstantiation.reference(this.context.getNewStringsReaderFunctionInvocation(n))}getArrayFileProperty({property:t,record:e}){let n=e[t.wireValue];if(n==null)return E.TypeInstantiation.nop();if(!Array.isArray(n))return this.context.errors.add({severity:he.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`}),E.TypeInstantiation.nop();let i=[];for(let o of n)typeof o!="string"&&this.context.errors.add({severity:he.Critical,message:`Expected file array value to be an array of strings, got ${typeof o}`}),i.push(o);return E.TypeInstantiation.slice({valueType:E.Type.reference(this.context.getIoReaderTypeReference()),values:i.map(o=>E.TypeInstantiation.reference(this.context.getNewStringsReaderFunctionInvocation(o)))})}getBodyProperty({property:t,record:e}){let n=e[t.name.wireValue];return n==null?E.TypeInstantiation.nop():this.context.dynamicTypeInstantiationMapper.convert({typeReference:t.typeReference,value:n})}};0&&(module.exports={FilePropertyMapper});
20
+ /*! Bundled license information:
21
+
22
+ @esbuild-plugins/node-globals-polyfill/Buffer.js:
23
+ (*!
24
+ * The buffer module from node.js, for the browser.
25
+ *
26
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
27
+ * @license MIT
28
+ *)
29
+ */
@@ -1,5 +1,5 @@
1
1
  import '@fern-api/go-ast';
2
- export { F as FilePropertyInfo, c as FilePropertyMapper } from '../DynamicSnippetsGeneratorContext-DuDerGxa.cjs';
2
+ export { F as FilePropertyInfo, c as FilePropertyMapper } from '../DynamicSnippetsGeneratorContext-f4OAff1R.cjs';
3
3
  import '@fern-fern/ir-sdk/api';
4
4
  import '@fern-api/browser-compatible-base-generator';
5
5
  import '../TypeInstance.cjs';