@fern-api/python-dynamic-snippets 4.43.0 → 4.45.2

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 (59) hide show
  1. package/dist/index.cjs +37 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +166 -0
  4. package/dist/index.d.ts +166 -0
  5. package/dist/index.js +37 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +9 -10
  8. package/cjs/DynamicSnippetsGenerator.cjs +0 -42
  9. package/cjs/DynamicSnippetsGenerator.cjs.map +0 -1
  10. package/cjs/DynamicSnippetsGenerator.d.cts +0 -25
  11. package/cjs/DynamicSnippetsGeneratorContext-4_I0JAlU.d.cts +0 -87
  12. package/cjs/EndpointSnippetGenerator.cjs +0 -31
  13. package/cjs/EndpointSnippetGenerator.cjs.map +0 -1
  14. package/cjs/EndpointSnippetGenerator.d.cts +0 -68
  15. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +0 -42
  16. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +0 -1
  17. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +0 -5
  18. package/cjs/context/DynamicTypeLiteralMapper.cjs +0 -31
  19. package/cjs/context/DynamicTypeLiteralMapper.cjs.map +0 -1
  20. package/cjs/context/DynamicTypeLiteralMapper.d.cts +0 -5
  21. package/cjs/context/FilePropertyMapper.cjs +0 -31
  22. package/cjs/context/FilePropertyMapper.cjs.map +0 -1
  23. package/cjs/context/FilePropertyMapper.d.cts +0 -5
  24. package/cjs/index.cjs +0 -42
  25. package/cjs/index.cjs.map +0 -1
  26. package/cjs/index.d.cts +0 -7
  27. package/esm/DynamicSnippetsGenerator.d.ts +0 -25
  28. package/esm/DynamicSnippetsGenerator.js +0 -2
  29. package/esm/DynamicSnippetsGenerator.js.map +0 -1
  30. package/esm/DynamicSnippetsGeneratorContext-4_I0JAlU.d.ts +0 -87
  31. package/esm/EndpointSnippetGenerator.d.ts +0 -68
  32. package/esm/EndpointSnippetGenerator.js +0 -2
  33. package/esm/EndpointSnippetGenerator.js.map +0 -1
  34. package/esm/chunk-2KHLQG2A.js +0 -2
  35. package/esm/chunk-2KHLQG2A.js.map +0 -1
  36. package/esm/chunk-2SPAKVUZ.js +0 -2
  37. package/esm/chunk-2SPAKVUZ.js.map +0 -1
  38. package/esm/chunk-3XEFLXHY.js +0 -2
  39. package/esm/chunk-3XEFLXHY.js.map +0 -1
  40. package/esm/chunk-DP6NTUTQ.js +0 -2
  41. package/esm/chunk-DP6NTUTQ.js.map +0 -1
  42. package/esm/chunk-HGKGDQ5J.js +0 -15
  43. package/esm/chunk-HGKGDQ5J.js.map +0 -1
  44. package/esm/chunk-NHAFJ5OA.js +0 -31
  45. package/esm/chunk-NHAFJ5OA.js.map +0 -1
  46. package/esm/chunk-ULECZXWB.js +0 -2
  47. package/esm/chunk-ULECZXWB.js.map +0 -1
  48. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +0 -5
  49. package/esm/context/DynamicSnippetsGeneratorContext.js +0 -2
  50. package/esm/context/DynamicSnippetsGeneratorContext.js.map +0 -1
  51. package/esm/context/DynamicTypeLiteralMapper.d.ts +0 -5
  52. package/esm/context/DynamicTypeLiteralMapper.js +0 -2
  53. package/esm/context/DynamicTypeLiteralMapper.js.map +0 -1
  54. package/esm/context/FilePropertyMapper.d.ts +0 -5
  55. package/esm/context/FilePropertyMapper.js +0 -2
  56. package/esm/context/FilePropertyMapper.js.map +0 -1
  57. package/esm/index.d.ts +0 -7
  58. package/esm/index.js +0 -2
  59. package/esm/index.js.map +0 -1
@@ -1,5 +0,0 @@
1
- import '@fern-api/dynamic-ir-sdk';
2
- import '@fern-api/python-ast';
3
- export { a as DynamicTypeLiteralMapper } from '../DynamicSnippetsGeneratorContext-4_I0JAlU.cjs';
4
- import '@fern-api/browser-compatible-base-generator';
5
- import '@fern-api/python-browser-compatible-base';
@@ -1,31 +0,0 @@
1
- "use strict";var xe=Object.defineProperty;var yt=Object.getOwnPropertyDescriptor;var gt=Object.getOwnPropertyNames,we=Object.getOwnPropertySymbols;var be=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Le=(i,t,e)=>t in i?xe(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Ye=(i,t)=>{for(var e in t||(t={}))be.call(t,e)&&Le(i,e,t[e]);if(we)for(var e of we(t))$e.call(t,e)&&Le(i,e,t[e]);return i};var We=(i,t)=>{var e={};for(var r in i)be.call(i,r)&&t.indexOf(r)<0&&(e[r]=i[r]);if(i!=null&&we)for(var r of we(i))t.indexOf(r)<0&&$e.call(i,r)&&(e[r]=i[r]);return e};var Pe=(i,t)=>()=>(i&&(t=i(i=0)),t);var Ve=(i,t)=>{for(var e in t)xe(i,e,{get:t[e],enumerable:!0})},Tt=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of gt(t))!be.call(i,n)&&n!==e&&xe(i,n,{get:()=>t[n],enumerable:!(r=yt(t,n))||r.enumerable});return i};var Et=i=>Tt(xe({},"__esModule",{value:!0}),i);var f=(i,t,e)=>Le(i,typeof t!="symbol"?t+"":t,e);function ze(){throw new Error("setTimeout has not been defined")}function je(){throw new Error("clearTimeout has not been defined")}function Ge(i){if(Y===setTimeout)return setTimeout(i,0);if((Y===ze||!Y)&&setTimeout)return Y=setTimeout,setTimeout(i,0);try{return Y(i,0)}catch(t){try{return Y.call(null,i,0)}catch(e){return Y.call(this,i,0)}}}function At(i){if(W===clearTimeout)return clearTimeout(i);if((W===je||!W)&&clearTimeout)return W=clearTimeout,clearTimeout(i);try{return W(i)}catch(t){try{return W.call(null,i)}catch(e){return W.call(this,i)}}}function Rt(){!ee||!Z||(ee=!1,Z.length?_=Z.concat(_):ye=-1,_.length&&Je())}function Je(){if(!ee){var i=Ge(Rt);ee=!0;for(var t=_.length;t;){for(Z=_,_=[];++ye<t;)Z&&Z[ye].run();ye=-1,t=_.length}Z=null,ee=!1,At(i)}}function Nt(i){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];_.push(new Ze(i,t)),_.length===1&&!ee&&Ge(Je)}function Ze(i,t){this.fun=i,this.array=t}function q(){}function Yt(i){throw new Error("process.binding is not supported")}function Wt(){return"/"}function Vt(i){throw new Error("process.chdir is not supported")}function Qt(){return 0}function jt(i){var t=zt.call(X)*.001,e=Math.floor(t),r=Math.floor(t%1*1e9);return i&&(e=e-i[0],r=r-i[1],r<0&&(e--,r+=1e9)),[e,r]}function Jt(){var i=new Date,t=i-Gt;return t/1e3}var Y,W,_,ee,Z,ye,It,vt,kt,St,Lt,bt,Pt,Ft,Ct,Ut,Bt,_t,Mt,Dt,Ot,$t,X,zt,Gt,y,Qe,l=Pe(()=>{"use strict";Y=ze,W=je;typeof globalThis.setTimeout=="function"&&(Y=setTimeout);typeof globalThis.clearTimeout=="function"&&(W=clearTimeout);_=[],ee=!1,ye=-1;Ze.prototype.run=function(){this.fun.apply(null,this.array)};It="browser",vt="browser",kt=!0,St={},Lt=[],bt="",Pt={},Ft={},Ct={};Ut=q,Bt=q,_t=q,Mt=q,Dt=q,Ot=q,$t=q;X=globalThis.performance||{},zt=X.now||X.mozNow||X.msNow||X.oNow||X.webkitNow||function(){return new Date().getTime()};Gt=new Date;y={nextTick:Nt,title:It,browser:kt,env:St,argv:Lt,version:bt,versions:Pt,on:Ut,addListener:Bt,once:_t,off:Mt,removeListener:Dt,removeAllListeners:Ot,emit:$t,binding:Yt,cwd:Wt,chdir:Vt,umask:Qt,hrtime:jt,platform:vt,release:Ft,config:Ct,uptime:Jt},Qe={};Object.keys(Qe).forEach(i=>{let t=i.split("."),e=y;for(let r=0;r<t.length;r++){let n=t[r];r===t.length-1?e[n]=Qe[i]:e=e[n]||(e[n]={})}})});function Xe(){Ce=!0;for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=i.length;t<e;++t)F[t]=i[t],S[i.charCodeAt(t)]=t;S[45]=62,S[95]=63}function qt(i){Ce||Xe();var t,e,r,n,o,s,h=i.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=i[h-2]==="="?2:i[h-1]==="="?1:0,s=new Zt(h*3/4-o),r=o>0?h-4:h;var c=0;for(t=0,e=0;t<r;t+=4,e+=3)n=S[i.charCodeAt(t)]<<18|S[i.charCodeAt(t+1)]<<12|S[i.charCodeAt(t+2)]<<6|S[i.charCodeAt(t+3)],s[c++]=n>>16&255,s[c++]=n>>8&255,s[c++]=n&255;return o===2?(n=S[i.charCodeAt(t)]<<2|S[i.charCodeAt(t+1)]>>4,s[c++]=n&255):o===1&&(n=S[i.charCodeAt(t)]<<10|S[i.charCodeAt(t+1)]<<4|S[i.charCodeAt(t+2)]>>2,s[c++]=n>>8&255,s[c++]=n&255),s}function Ht(i){return F[i>>18&63]+F[i>>12&63]+F[i>>6&63]+F[i&63]}function Kt(i,t,e){for(var r,n=[],o=t;o<e;o+=3)r=(i[o]<<16)+(i[o+1]<<8)+i[o+2],n.push(Ht(r));return n.join("")}function qe(i){Ce||Xe();for(var t,e=i.length,r=e%3,n="",o=[],s=16383,h=0,c=e-r;h<c;h+=s)o.push(Kt(i,h,h+s>c?c:h+s));return r===1?(t=i[e-1],n+=F[t>>2],n+=F[t<<4&63],n+="=="):r===2&&(t=(i[e-2]<<8)+i[e-1],n+=F[t>>10],n+=F[t>>4&63],n+=F[t<<2&63],n+="="),o.push(n),o.join("")}function ge(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function M(i,t){if(ge()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(i=new Uint8Array(t),i.__proto__=a.prototype):(i===null&&(i=new a(t)),i.length=t),i}function a(i,t,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(i,t,e);if(typeof i=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return Ue(this,i)}return et(this,i,t,e)}function et(i,t,e,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?tr(i,t,e,r):typeof t=="string"?er(i,t,e):rr(i,t)}function tt(i){if(typeof i!="number")throw new TypeError('"size" argument must be a number');if(i<0)throw new RangeError('"size" argument must not be negative')}function Xt(i,t,e,r){return tt(t),t<=0?M(i,t):e!==void 0?typeof r=="string"?M(i,t).fill(e,r):M(i,t).fill(e):M(i,t)}function Ue(i,t){if(tt(t),i=M(i,t<0?0:Be(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)i[e]=0;return i}function er(i,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=rt(t,e)|0;i=M(i,r);var n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}function Fe(i,t){var e=t.length<0?0:Be(t.length)|0;i=M(i,e);for(var r=0;r<e;r+=1)i[r]=t[r]&255;return i}function tr(i,t,e,r){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");return e===void 0&&r===void 0?t=new Uint8Array(t):r===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,r),a.TYPED_ARRAY_SUPPORT?(i=t,i.__proto__=a.prototype):i=Fe(i,t),i}function rr(i,t){if(C(t)){var e=Be(t.length)|0;return i=M(i,e),i.length===0||t.copy(i,0,0,e),i}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Er(t.length)?M(i,0):Fe(i,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Fe(i,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Be(i){if(i>=ge())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ge().toString(16)+" bytes");return i|0}function C(i){return!!(i!=null&&i._isBuffer)}function rt(i,t){if(C(i))return i.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(i)||i instanceof ArrayBuffer))return i.byteLength;typeof i!="string"&&(i=""+i);var e=i.length;if(e===0)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Te(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return ht(i).length;default:if(r)return Te(i).length;t=(""+t).toLowerCase(),r=!0}}function ir(i,t,e){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(i||(i="utf8");;)switch(i){case"hex":return pr(this,t,e);case"utf8":case"utf-8":return ot(this,t,e);case"ascii":return lr(this,t,e);case"latin1":case"binary":return ur(this,t,e);case"base64":return hr(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mr(this,t,e);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),r=!0}}function H(i,t,e){var r=i[t];i[t]=i[e],i[e]=r}function it(i,t,e,r,n){if(i.length===0)return-1;if(typeof e=="string"?(r=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=n?0:i.length-1),e<0&&(e=i.length+e),e>=i.length){if(n)return-1;e=i.length-1}else if(e<0)if(n)e=0;else return-1;if(typeof t=="string"&&(t=a.from(t,r)),C(t))return t.length===0?-1:He(i,t,e,r,n);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(i,t,e):Uint8Array.prototype.lastIndexOf.call(i,t,e):He(i,[t],e,r,n);throw new TypeError("val must be string, number or Buffer")}function He(i,t,e,r,n){var o=1,s=i.length,h=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(i.length<2||t.length<2)return-1;o=2,s/=2,h/=2,e/=2}function c(g,w){return o===1?g[w]:g.readUInt16BE(w*o)}var m;if(n){var p=-1;for(m=e;m<s;m++)if(c(i,m)===c(t,p===-1?0:m-p)){if(p===-1&&(p=m),m-p+1===h)return p*o}else p!==-1&&(m-=m-p),p=-1}else for(e+h>s&&(e=s-h),m=e;m>=0;m--){for(var d=!0,T=0;T<h;T++)if(c(i,m+T)!==c(t,T)){d=!1;break}if(d)return m}return-1}function nr(i,t,e,r){e=Number(e)||0;var n=i.length-e;r?(r=Number(r),r>n&&(r=n)):r=n;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var h=parseInt(t.substr(s*2,2),16);if(isNaN(h))return s;i[e+s]=h}return s}function or(i,t,e,r){return Re(Te(t,i.length-e),i,e,r)}function nt(i,t,e,r){return Re(gr(t),i,e,r)}function sr(i,t,e,r){return nt(i,t,e,r)}function ar(i,t,e,r){return Re(ht(t),i,e,r)}function fr(i,t,e,r){return Re(Tr(t,i.length-e),i,e,r)}function hr(i,t,e){return t===0&&e===i.length?qe(i):qe(i.slice(t,e))}function ot(i,t,e){e=Math.min(i.length,e);for(var r=[],n=t;n<e;){var o=i[n],s=null,h=o>239?4:o>223?3:o>191?2:1;if(n+h<=e){var c,m,p,d;switch(h){case 1:o<128&&(s=o);break;case 2:c=i[n+1],(c&192)===128&&(d=(o&31)<<6|c&63,d>127&&(s=d));break;case 3:c=i[n+1],m=i[n+2],(c&192)===128&&(m&192)===128&&(d=(o&15)<<12|(c&63)<<6|m&63,d>2047&&(d<55296||d>57343)&&(s=d));break;case 4:c=i[n+1],m=i[n+2],p=i[n+3],(c&192)===128&&(m&192)===128&&(p&192)===128&&(d=(o&15)<<18|(c&63)<<12|(m&63)<<6|p&63,d>65535&&d<1114112&&(s=d))}}s===null?(s=65533,h=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|s&1023),r.push(s),n+=h}return cr(r)}function cr(i){var t=i.length;if(t<=Ke)return String.fromCharCode.apply(String,i);for(var e="",r=0;r<t;)e+=String.fromCharCode.apply(String,i.slice(r,r+=Ke));return e}function lr(i,t,e){var r="";e=Math.min(i.length,e);for(var n=t;n<e;++n)r+=String.fromCharCode(i[n]&127);return r}function ur(i,t,e){var r="";e=Math.min(i.length,e);for(var n=t;n<e;++n)r+=String.fromCharCode(i[n]);return r}function pr(i,t,e){var r=i.length;(!t||t<0)&&(t=0),(!e||e<0||e>r)&&(e=r);for(var n="",o=t;o<e;++o)n+=yr(i[o]);return n}function mr(i,t,e){for(var r=i.slice(t,e),n="",o=0;o<r.length;o+=2)n+=String.fromCharCode(r[o]+r[o+1]*256);return n}function R(i,t,e){if(i%1!==0||i<0)throw new RangeError("offset is not uint");if(i+t>e)throw new RangeError("Trying to access beyond buffer length")}function k(i,t,e,r,n,o){if(!C(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(e+r>i.length)throw new RangeError("Index out of range")}function Ee(i,t,e,r){t<0&&(t=65535+t+1);for(var n=0,o=Math.min(i.length-e,2);n<o;++n)i[e+n]=(t&255<<8*(r?n:1-n))>>>(r?n:1-n)*8}function Ae(i,t,e,r){t<0&&(t=4294967295+t+1);for(var n=0,o=Math.min(i.length-e,4);n<o;++n)i[e+n]=t>>>(r?n:3-n)*8&255}function st(i,t,e,r,n,o){if(e+r>i.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function at(i,t,e,r,n){return n||st(i,t,e,4,34028234663852886e22,-34028234663852886e22),lt(i,t,e,r,23,4),e+4}function ft(i,t,e,r,n){return n||st(i,t,e,8,17976931348623157e292,-17976931348623157e292),lt(i,t,e,r,52,8),e+8}function wr(i){if(i=xr(i).replace(dr,""),i.length<2)return"";for(;i.length%4!==0;)i=i+"=";return i}function xr(i){return i.trim?i.trim():i.replace(/^\s+|\s+$/g,"")}function yr(i){return i<16?"0"+i.toString(16):i.toString(16)}function Te(i,t){t=t||1/0;for(var e,r=i.length,n=null,o=[],s=0;s<r;++s){if(e=i.charCodeAt(s),e>55295&&e<57344){if(!n){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}n=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),n=e;continue}e=(n-55296<<10|e-56320)+65536}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=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 gr(i){for(var t=[],e=0;e<i.length;++e)t.push(i.charCodeAt(e)&255);return t}function Tr(i,t){for(var e,r,n,o=[],s=0;s<i.length&&!((t-=2)<0);++s)e=i.charCodeAt(s),r=e>>8,n=e%256,o.push(n),o.push(r);return o}function ht(i){return qt(wr(i))}function Re(i,t,e,r){for(var n=0;n<r&&!(n+e>=t.length||n>=i.length);++n)t[n+e]=i[n];return n}function Er(i){return i!==i}function Ar(i){return i!=null&&(!!i._isBuffer||ct(i)||Rr(i))}function ct(i){return!!i.constructor&&typeof i.constructor.isBuffer=="function"&&i.constructor.isBuffer(i)}function Rr(i){return typeof i.readFloatLE=="function"&&typeof i.slice=="function"&&ct(i.slice(0,0))}function Ne(i,t,e,r,n){var o,s,h=n*8-r-1,c=(1<<h)-1,m=c>>1,p=-7,d=e?n-1:0,T=e?-1:1,g=i[t+d];for(d+=T,o=g&(1<<-p)-1,g>>=-p,p+=h;p>0;o=o*256+i[t+d],d+=T,p-=8);for(s=o&(1<<-p)-1,o>>=-p,p+=r;p>0;s=s*256+i[t+d],d+=T,p-=8);if(o===0)o=1-m;else{if(o===c)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-m}return(g?-1:1)*s*Math.pow(2,o-r)}function lt(i,t,e,r,n,o){var s,h,c,m=o*8-n-1,p=(1<<m)-1,d=p>>1,T=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:o-1,w=r?1:-1,E=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(h=isNaN(t)?1:0,s=p):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+d>=1?t+=T/c:t+=T*Math.pow(2,1-d),t*c>=2&&(s++,c/=2),s+d>=p?(h=0,s=p):s+d>=1?(h=(t*c-1)*Math.pow(2,n),s=s+d):(h=t*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;i[e+g]=h&255,g+=w,h/=256,n-=8);for(s=s<<n|h,m+=n;m>0;i[e+g]=s&255,g+=w,s/=256,m-=8);i[e+g-w]|=E*128}var F,S,Zt,Ce,Ke,dr,ut=Pe(()=>{"use strict";l();u();F=[],S=[],Zt=typeof Uint8Array!="undefined"?Uint8Array:Array,Ce=!1;a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;a.poolSize=8192;a._augment=function(i){return i.__proto__=a.prototype,i};a.from=function(i,t,e){return et(null,i,t,e)};a.kMaxLength=ge();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(i,t,e){return Xt(null,i,t,e)};a.allocUnsafe=function(i){return Ue(null,i)};a.allocUnsafeSlow=function(i){return Ue(null,i)};a.isBuffer=Ar;a.compare=function(t,e){if(!C(t)||!C(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,s=Math.min(r,n);o<s;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0};a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var r;if(e===void 0)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=a.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var s=t[r];if(!C(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n};a.byteLength=rt;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)H(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)H(this,e,e+3),H(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)H(this,e,e+7),H(this,e+1,e+6),H(this,e+2,e+5),H(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?ot(this,0,t):ir.apply(this,arguments)};a.prototype.equals=function(t){if(!C(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,r,n,o){if(!C(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),n===void 0&&(n=0),o===void 0&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,o>>>=0,this===t)return 0;for(var s=o-n,h=r-e,c=Math.min(s,h),m=this.slice(n,o),p=t.slice(e,r),d=0;d<c;++d)if(m[d]!==p[d]){s=m[d],h=p[d];break}return s<h?-1:h<s?1:0};a.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1};a.prototype.indexOf=function(t,e,r){return it(this,t,e,r,!0)};a.prototype.lastIndexOf=function(t,e,r){return it(this,t,e,r,!1)};a.prototype.write=function(t,e,r,n){if(e===void 0)n="utf8",r=this.length,e=0;else if(r===void 0&&typeof e=="string")n=e,r=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(r)?(r=r|0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((r===void 0||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return nr(this,t,e,r);case"utf8":case"utf-8":return or(this,t,e,r);case"ascii":return nt(this,t,e,r);case"latin1":case"binary":return sr(this,t,e,r);case"base64":return ar(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fr(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Ke=4096;a.prototype.slice=function(t,e){var r=this.length;t=~~t,e=e===void 0?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e<t&&(e=t);var n;if(a.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=a.prototype;else{var o=e-t;n=new a(o,void 0);for(var s=0;s<o;++s)n[s]=this[s+t]}return n};a.prototype.readUIntLE=function(t,e,r){t=t|0,e=e|0,r||R(t,e,this.length);for(var n=this[t],o=1,s=0;++s<e&&(o*=256);)n+=this[t+s]*o;return n};a.prototype.readUIntBE=function(t,e,r){t=t|0,e=e|0,r||R(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n};a.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,e){return e||R(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||R(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,e,r){t=t|0,e=e|0,r||R(t,e,this.length);for(var n=this[t],o=1,s=0;++s<e&&(o*=256);)n+=this[t+s]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n};a.prototype.readIntBE=function(t,e,r){t=t|0,e=e|0,r||R(t,e,this.length);for(var n=e,o=1,s=this[t+--n];n>0&&(o*=256);)s+=this[t+--n]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(t,e){return e||R(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r};a.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r};a.prototype.readInt32LE=function(t,e){return e||R(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||R(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||R(t,4,this.length),Ne(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),Ne(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),Ne(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),Ne(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e=e|0,r=r|0,!n){var o=Math.pow(2,8*r)-1;k(this,t,e,r,o,0)}var s=1,h=0;for(this[e]=t&255;++h<r&&(s*=256);)this[e+h]=t/s&255;return e+r};a.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e=e|0,r=r|0,!n){var o=Math.pow(2,8*r)-1;k(this,t,e,r,o,0)}var s=r-1,h=1;for(this[e+s]=t&255;--s>=0&&(h*=256);)this[e+s]=t/h&255;return e+r};a.prototype.writeUInt8=function(t,e,r){return t=+t,e=e|0,r||k(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=e|0,r||k(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Ee(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=e|0,r||k(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Ee(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=e|0,r||k(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,r){return t=+t,e=e|0,r||k(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,r,n){if(t=+t,e=e|0,!n){var o=Math.pow(2,8*r-1);k(this,t,e,r,o-1,-o)}var s=0,h=1,c=0;for(this[e]=t&255;++s<r&&(h*=256);)t<0&&c===0&&this[e+s-1]!==0&&(c=1),this[e+s]=(t/h>>0)-c&255;return e+r};a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=e|0,!n){var o=Math.pow(2,8*r-1);k(this,t,e,r,o-1,-o)}var s=r-1,h=1,c=0;for(this[e+s]=t&255;--s>=0&&(h*=256);)t<0&&c===0&&this[e+s+1]!==0&&(c=1),this[e+s]=(t/h>>0)-c&255;return e+r};a.prototype.writeInt8=function(t,e,r){return t=+t,e=e|0,r||k(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};a.prototype.writeInt16LE=function(t,e,r){return t=+t,e=e|0,r||k(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Ee(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,r){return t=+t,e=e|0,r||k(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Ee(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,r){return t=+t,e=e|0,r||k(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,r){return t=+t,e=e|0,r||k(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,r){return at(this,t,e,!0,r)};a.prototype.writeFloatBE=function(t,e,r){return at(this,t,e,!1,r)};a.prototype.writeDoubleLE=function(t,e,r){return ft(this,t,e,!0,r)};a.prototype.writeDoubleBE=function(t,e,r){return ft(this,t,e,!1,r)};a.prototype.copy=function(t,e,r,n){if(r||(r=0),!n&&n!==0&&(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o=n-r,s;if(this===t&&r<e&&e<n)for(s=o-1;s>=0;--s)t[s+e]=this[s+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+e]=this[s+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o};a.prototype.fill=function(t,e,r,n){if(typeof t=="string"){if(typeof e=="string"?(n=e,e=0,r=this.length):typeof r=="string"&&(n=r,r=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e=e>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);var s;if(typeof t=="number")for(s=e;s<r;++s)this[s]=t;else{var h=C(t)?t:Te(new a(t,n).toString()),c=h.length;for(s=0;s<r-e;++s)this[s+e]=h[s%c]}return this};dr=/[^+\/0-9A-Za-z-_]/g});var u=Pe(()=>{"use strict";ut()});var Jr={};Ve(Jr,{FilePropertyMapper:()=>Oe});module.exports=Et(Jr);l();u();l();u();l();u();function D(i){throw new Error("Unexpected value: "+JSON.stringify(i))}l();u();var A={};Ve(A,{AccessAttribute:()=>te,AstNode:()=>x,Class:()=>V,ClassInstantiation:()=>ie,CodeBlock:()=>$,Comment:()=>ne,Decorator:()=>oe,Field:()=>Q,Lambda:()=>se,LambdaParameter:()=>ae,Method:()=>j,MethodArgument:()=>he,MethodInvocation:()=>ce,Operator:()=>le,Parameter:()=>z,PythonFile:()=>ue,Reference:()=>L,StarImport:()=>G,Type:()=>Se,TypeInstantiation:()=>J,accessAttribute:()=>Lr,assign:()=>br,class_:()=>Fr,codeBlock:()=>Dr,comment:()=>Or,decorator:()=>Ur,field:()=>Mr,file:()=>Pr,instantiateClass:()=>Cr,invokeFunction:()=>Vr,invokeMethod:()=>Qr,lambda:()=>$r,lambdaParameter:()=>Yr,method:()=>Wr,methodArgument:()=>jr,operator:()=>Gr,parameter:()=>zr,reference:()=>Br,starImport:()=>_r});l();u();l();u();l();u();l();u();l();u();l();u();var pt,mt,pe=(mt=(pt=y.env.FERN_STACK_TRACK)==null?void 0:pt.toLowerCase())!=null?mt:"",U=pe!==""&&pe!=="0"&&pe!=="false",_e=["single","multiline","box"].includes(pe)?pe:"single";U&&(Error.stackTraceLimit=50);var Nr=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),Ir=new Set(["stacktrace"]);function ve({maxFrames:i=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:n=[],filterNode:o=!0,filterJs:s=!0,formatFilename:h=c=>c}={}){var m;if(!U)return[];r=[...r,...Nr],e=[...e,...Ir],n=[...n,"runInteractiveTask"];let c=!1;return((m=new Error().stack)!=null?m:"").split(`
2
- `).map(p=>{let d=p.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(d&&d.length===5){let[,T,g,w,E]=d;if(!T||!g||!w||!E)return;if(c||n.some(N=>T==null?void 0:T.includes(N))){c=!0;return}switch(T){case"Object.<anonymous>":T="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":T=`${T.substring(T.indexOf(".")+1)}()=> { ... }`;break}return{fn:T,path:h(g),position:`${w}:${E}`}}}).filter(p=>{var d,T;return p&&!r.some(g=>p.fn.includes(g))&&!(o&&((d=p.path)!=null&&d.startsWith("node:")))&&!(s&&((T=p.path)!=null&&T.endsWith(".js")))&&!e.some(g=>p.path.includes(g))}).slice(t,t+i)}var Ie=class{constructor({maxFrames:t=50,skip:e=0,filterPaths:r=[],filterFunctions:n=[],stopOn:o=[],filterNode:s=!0,filterJs:h=!0,multiline:c=!1,formatFilename:m=p=>p}={}){f(this,"maxFrames");f(this,"skip");f(this,"filterPaths");f(this,"filterFunctions");f(this,"stopOn");f(this,"filterNode");f(this,"filterJs");f(this,"multiline");f(this,"formatFilename");f(this,"tracking",new WeakMap);this.maxFrames=t,this.skip=e,this.filterPaths=r,this.filterFunctions=n,this.stopOn=o,this.filterNode=s,this.filterJs=h,this.multiline=c,this.formatFilename=m}tag(t){let e=this.tracking.get(t)||new Set;ve({maxFrames:this.maxFrames,skip:this.skip,filterPaths:this.filterPaths,filterFunctions:this.filterFunctions,stopOn:this.stopOn,filterNode:this.filterNode,filterJs:this.filterJs,formatFilename:this.formatFilename}).forEach(r=>e.add(r)),this.tracking.set(t,e)}trace(t){if(!U)return"";let e=this.tracking.get(t);return e?[...e].map(r=>`${this.multiline?`
3
- `:""}${r.fn} - ${r.path}:${r.position}`).join(""):""}frames(t){let e=this.tracking.get(t);return e?[...e]:[]}free(t){this.tracking.delete(t)}clear(){this.tracking=new WeakMap}},O;function dt({maxFrames:i=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:n=[],filterNode:o=!0,filterJs:s=!0,multiline:h=!1,formatFilename:c=m=>m}={}){U&&(O!=null||(O=new Ie({maxFrames:i,skip:t,filterPaths:e,filterFunctions:r,stopOn:n,filterNode:o,filterJs:s,multiline:h,formatFilename:c})))}function wt(i){O==null||O.tag(i)}function Me(i){var t;return(t=O==null?void 0:O.frames(i))!=null?t:[]}var K=class{constructor(){wt(this)}};l();u();l();u();l();u();var P=class extends K{constructor(e){super();f(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var vr=4;dt({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var me=class{constructor(){f(this,"lineBuffer",[]);f(this,"indentLevel",0);f(this,"hasWrittenAnything",!1);f(this,"lastCharacterIsSemicolon",!1);f(this,"lastCharacterIsNewline",!1);f(this,"nodeStackFrames",[])}get buffer(){return U&&this.nodeStackFrames.length>0&&this.writeInternal(`
4
- `),this.lineBuffer.join(`
5
- `)+(this.lastCharacterIsNewline?`
6
- `:"")}write(...t){for(let e of t)if(e!=null)if(typeof e=="string"){let r=e.length>0&&e.endsWith(`
7
- `),n=r?e.substring(0,e.length-1):e,o=this.getIndentString(),s=n.replaceAll(`
8
- `,`
9
- ${o}`);this.isAtStartOfLine()&&(s=o+s),r&&(s+=`
10
- `),this.writeInternal(s)}else this.writeNode(e)}writeStatement(...t){this.write(...t),this.write(";"),this.writeNewLineIfLastLineNot()}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){U&&this.nodeStackFrames.push(...Me(t)),t.write(this),U&&_e!=="single"&&this.writeInternal(`
11
- `)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){this.writeNode(t),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new P(t).write(this),t.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new P(t).write(this),this.write(" (",e,")"),this.pushScope()}controlFlowWithoutStatement(t){new P(t).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new P(t).write(this),this.write(" (",e,")"),this.pushScope()}alternativeControlFlow(t){this.dedent(),this.write("} "),new P(t).write(this),this.pushScope()}pushScope(){this.writeLine("{"),this.indent()}popScope(t=!0){this.dedent(),this.writeNewLineIfLastLineNot(),t?this.writeLine("}"):this.write("}")}writeLine(...t){this.write(...t.length===0?[""]:t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
12
- `)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
13
- `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:r}){if(t.length>0){let n=t[0];n!=null&&r(n);for(let o=1;o<t.length;o++){this.write(e);let s=t[o];s!=null&&r(s)}}}toString(){return this.buffer}writeInternal(t){if(t.length===0)return;let e=!this.lastCharacterIsNewline;this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
14
- `),this.lastCharacterIsSemicolon=t.endsWith(";");let r=t.split(`
15
- `),n=U&&!this.shouldSkipTracking(r)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${r.shift()||""}`),this.lastCharacterIsNewline&&r.pop(),this.lineBuffer.push(...r),n&&this.appendTrackingComment()}set lastLine(t){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=t:this.lineBuffer.push(t)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(t){return!1}formatStack(t,e=""){return t.map(r=>`${e?`(${e}) `:""} ${r.fn} - ${r.path} : ${r.position}`)}filterStack(t){return t.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let t=[...this.formatStack(this.filterStack(ve({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,_e){case"single":return this.singleLineTrackingComment(t);case"multiline":return this.multiLineTrackingComment(t);case"box":return this.boxTrackingComment(t)}}singleLineTrackingComment(t){this.lastLine=`${this.lastLine} // ${t.join(" ")}`}multiLineTrackingComment(t){this.lineBuffer.push(...t.map(e=>` // ${e}`))}boxTrackingComment(t){this.lineBuffer.push("/*",...t.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return vr}};l();u();var de=class extends me{constructor(){super(...arguments);f(this,"fullyQualifiedModulePathsToImportedNames",{})}setRefNameOverrides(e){this.fullyQualifiedModulePathsToImportedNames=e}unsetRefNameOverrides(){this.fullyQualifiedModulePathsToImportedNames={}}getRefNameOverride(e){var n;let r=this.fullyQualifiedModulePathsToImportedNames[e.getFullyQualifiedModulePath()];return r||{name:(n=e.alias)!=null?n:e.name,isAlias:!!e.alias}}toString(){return this.buffer}async toStringFormatted(e){return e.format(this.buffer)}};var x=class extends K{constructor(){super(...arguments);f(this,"references",[])}addReference(e){this.references.push(e)}inheritReferences(e){e!==void 0&&e.references.forEach(r=>{this.references.includes(r)||this.addReference(r)})}getReferences(){return this.references}toString(){let e=new de;return this.write(e),e.toString()}async toStringFormatted(e){let r=new de;return this.write(r),r.toStringFormatted(e)}};var te=class extends x{constructor({lhs:e,rhs:r}){super();f(this,"lhs");f(this,"rhs");this.lhs=e,this.inheritReferences(e),this.rhs=r,this.inheritReferences(r)}write(e){this.lhs.write(e),e.write("."),this.rhs.write(e)}};l();u();var ke=class extends x{constructor({lhs:e,rhs:r}){super();f(this,"lhs");f(this,"rhs");this.lhs=e,this.inheritReferences(e),this.rhs=r,this.inheritReferences(r)}write(e){this.lhs.write(e),e.write(" = "),this.rhs.write(e)}};l();u();var re=class extends x{constructor({reference:e,arguments_:r,multiline:n}){super();f(this,"reference");f(this,"arguments");f(this,"multiline");this.reference=e,this.arguments=r,this.multiline=n!=null?n:!1,this.inheritReferences(e),this.arguments.forEach(o=>{this.inheritReferences(o)})}write(e){if(this.reference.write(e),this.arguments.length===0){e.write("()");return}e.write("("),this.multiline&&(e.newLine(),e.indent()),this.arguments.forEach((r,n)=>{r.write(e),n<this.arguments.length-1&&(e.write(","),this.multiline?e.newLine():e.write(" "))}),this.multiline&&(e.newLine(),e.dedent()),e.write(")")}};l();u();var V=class extends x{constructor({docs:e,name:r,extends_:n,decorators:o}){super();f(this,"name");f(this,"extends_");f(this,"decorators");f(this,"fields",[]);f(this,"docs");f(this,"statements",[]);this.name=r,this.extends_=n!=null?n:[],this.decorators=o!=null?o:[],this.docs=e,this.extends_.forEach(s=>{this.inheritReferences(s)}),this.decorators.forEach(s=>{this.inheritReferences(s)})}write(e){this.decorators.forEach(r=>{r.write(e)}),e.write(`class ${this.name}`),this.extends_.length>0&&(e.write("("),this.extends_.forEach((r,n)=>{n>0&&e.write(", "),r.write(e)}),e.write(")")),e.write(":"),e.newLine(),e.indent(),this.docs!=null&&(e.write('"""'),e.write(this.docs),e.write('"""')),e.writeNewLineIfLastLineNot(),this.fields.forEach(r=>{r.write(e),e.writeNewLineIfLastLineNot()}),e.dedent(),e.indent(),this.statements.length?this.writeStatements({writer:e}):e.write("pass"),e.dedent()}add(e){this.statements.push(e),this.inheritReferences(e)}writeStatements({writer:e}){this.statements.forEach((r,n)=>{r.write(e),e.writeNewLineIfLastLineNot()})}addField(e){this.add(e)}};l();u();var ie=class extends re{constructor(r){var n=r,{classReference:t}=n,e=We(n,["classReference"]);super(Ye({reference:t},e))}};l();u();var $=class extends x{constructor(e){super();f(this,"arg");this.arg=e}write(e){return new P(this.arg).write(e)}};l();u();var ne=class extends x{constructor({docs:e}){super();f(this,"docs");this.docs=e}write(e){this.docs!=null&&this.docs.split(`
16
- `).forEach(r=>{e.writeLine(`# ${r}`)})}};l();u();var oe=class extends x{constructor({callable:e}){super();f(this,"callable");this.callable=e,this.inheritReferences(e)}write(e){e.write("@"),this.callable.write(e),e.newLine()}};l();u();var Q=class extends x{constructor({name:e,type:r,initializer:n,docs:o}){super();f(this,"name");f(this,"type");f(this,"initializer");f(this,"docs");this.name=e,this.type=r,this.initializer=n,this.docs=o,this.inheritReferences(this.type),this.inheritReferences(this.initializer)}write(e){e.write(this.name),this.type!==void 0&&(e.write(": "),this.type.write(e)),this.initializer!==void 0&&(e.write(" = "),this.initializer.write(e)),this.docs!=null&&(e.newLine(),e.write('"""'),e.newLine(),e.write(this.docs),e.newLine(),e.write('"""'))}};l();u();var se=class extends x{constructor({parameters:e,body:r}){super();f(this,"parameters");f(this,"body");this.parameters=e!=null?e:[],this.body=r,this.inheritReferences(r)}write(e){e.write("lambda"),this.parameters&&this.parameters.length&&(e.write(" "),this.parameters.forEach((r,n)=>{r.write(e),n<this.parameters.length-1&&e.write(", ")})),e.write(": "),this.body.write(e)}};l();u();l();u();var z=class extends x{constructor({name:e,type:r,initializer:n}){super();f(this,"name");f(this,"initializer");f(this,"type");this.name=e,this.type=r,this.initializer=n}write(e){e.write(this.name),this.type&&(e.write(": "),this.type.write(e)),this.initializer!==void 0&&(e.write(" = "),this.initializer.write(e))}};var ae=class extends z{constructor({name:t,initializer:e}){super({name:t,initializer:e,type:void 0})}};l();u();var fe;(function(i){i[i.STATIC=0]="STATIC",i[i.INSTANCE=1]="INSTANCE",i[i.CLASS=2]="CLASS"})(fe||(fe={}));var j=class extends x{constructor({static_:e,name:r,parameters:n,return_:o,docstring:s,type:h,decorators:c}){super();f(this,"name");f(this,"return");f(this,"docstring");f(this,"type");f(this,"parameters");f(this,"decorators");f(this,"statements",[]);f(this,"static_");this.name=r,this.parameters=n!=null?n:[],this.return=o,this.docstring=s,this.type=h,this.decorators=c!=null?c:[],this.static_=e!=null?e:!1,this.parameters.forEach(m=>{this.inheritReferences(m)}),this.inheritReferences(this.return),this.decorators.forEach(m=>{this.inheritReferences(m)}),this.statements.forEach(m=>{this.inheritReferences(m)})}addStatement(e){this.statements.push(e),this.inheritReferences(e)}write(e){this.static_&&this.decorators.push(A.decorator({callable:A.codeBlock("staticmethod")})),this.decorators.forEach(o=>{o.write(e)}),this.type===fe.CLASS?A.decorator({callable:new $("classmethod")}).write(e):this.type===fe.STATIC&&A.decorator({callable:new $("staticmethod")}).write(e),e.write(`def ${this.name}(`);let n=this.parameters.length>3;n&&(e.newLine(),e.indent()),this.type===fe.INSTANCE?(e.write("self"),this.parameters.length>0&&(e.write(n?",":", "),n&&e.newLine())):this.type===fe.CLASS&&(e.write("cls"),this.parameters.length>0&&(e.write(n?",":", "),n&&e.newLine())),this.parameters.forEach((o,s)=>{o.write(e),s<this.parameters.length-1&&(e.write(n?",":", "),n&&e.newLine())}),n&&(e.write(","),e.dedent(),e.newLine()),e.write(")"),this.return&&(e.write(" -> "),this.return.write(e)),e.write(":"),e.newLine(),this.docstring&&(e.indent(),e.write('"""'),e.write(this.docstring),e.write('"""'),e.newLine(),e.dedent()),this.statements.length?(e.indent(),this.statements.forEach((o,s)=>{o.write(e),s<this.statements.length-1&&e.newLine()}),e.dedent()):(e.indent(),e.write("pass"),e.dedent()),e.newLine()}};l();u();var he=class extends x{constructor({name:e,value:r}){super();f(this,"name");f(this,"value");this.name=e,this.value=r,this.inheritReferences(this.value)}write(e){this.name!==void 0&&(e.write(this.name),e.write("=")),this.value.write(e)}};l();u();var ce=class extends x{constructor({on:e,method:r,arguments_:n,multiline:o}){super();f(this,"on");f(this,"method");f(this,"arguments");f(this,"multiline");this.on=e,this.method=r,this.arguments=n,this.multiline=o!=null?o:!1,this.inheritReferences(e),this.arguments.forEach(s=>{this.inheritReferences(s)})}write(e){if(this.on.write(e),e.write("."),e.write(this.method),this.arguments.length===0){e.write("()");return}e.write("("),this.multiline&&(e.newLine(),e.indent()),this.arguments.forEach((r,n)=>{r.write(e),n<this.arguments.length-1&&(e.write(","),this.multiline?e.newLine():e.write(" "))}),this.multiline&&(e.newLine(),e.dedent()),e.write(")")}};l();u();l();u();var B={Or:"or",And:"and",Add:"add",Subtract:"subtract",Multiply:"multiple",Divide:"divide",Modulo:"modulo",LeftShift:"leftShift",RightShift:"rightShift"};var le=class extends x{constructor({operator:e,lhs:r,rhs:n}){super();f(this,"operator");f(this,"lhs");f(this,"rhs");this.operator=e,this.lhs=r,this.inheritReferences(r),this.rhs=n,this.inheritReferences(n)}getOperatorString(){switch(this.operator){case B.Or:return"or";case B.And:return"and";case B.Add:return"+";case B.Subtract:return"-";case B.Multiply:return"*";case B.Divide:return"/";case B.Modulo:return"%";case B.LeftShift:return"<<";case B.RightShift:return">>";default:D(this.operator)}}write(e){this.lhs.write(e),e.write(" "),e.write(this.getOperatorString()),e.write(" "),this.rhs.write(e)}};l();u();l();u();function xt(i){if(!i)return"Class";let t=i.replace(/[^a-zA-Z0-9\s_-]/g," ").replace(/[-_\s]+/g," ").trim();return!t||/^\d+$/.test(t)?"Class"+(t||""):(/^\d/.test(t)&&(t="Class"+t),t.split(/(?=[A-Z])|[-_\s]+/).filter(r=>r.length>0).map(r=>r.split(new RegExp("(?<=\\d)(?=[a-zA-Z])|(?<=[a-zA-Z])(?=\\d)")).filter(n=>n.length>0)).flat().map((r,n)=>n===0&&/^\d/.test(r)?"Class"+r.charAt(0).toUpperCase()+r.slice(1).toLowerCase():r.length>1&&r===r.toUpperCase()&&!/^\d+$/.test(r)?r:r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()).join(""))}l();u();l();u();var L=class extends x{constructor({name:e,modulePath:r,genericTypes:n,alias:o,attribute:s}){super();f(this,"name");f(this,"modulePath");f(this,"genericTypes");f(this,"alias");f(this,"attribute");this.name=e,this.modulePath=r!=null?r:[],this.genericTypes=n!=null?n:[],this.alias=o,this.attribute=s!=null?s:[],this.references.push(this),this.genericTypes.forEach(h=>{this.inheritReferences(h)})}write(e){let r=e.getRefNameOverride(this);e.write(r.name),this.genericTypes.length>0&&(e.write("["),this.genericTypes.forEach((n,o)=>{o>0&&e.write(", "),n.write(e)}),e.write("]")),this.attribute.length>0&&(e.write("."),this.attribute.forEach((n,o)=>{o>0&&e.write("."),e.write(n)}))}getFullyQualifiedPath(){return this.modulePath.join(".")}getFullyQualifiedModulePath(){return`${this.getFullyQualifiedPath()}.${this.name}`}};var G=class extends L{constructor({modulePath:e}){super({name:"*",modulePath:e});f(this,"docs")}write(e){throw new Error("Not intended to be written outside the context of a PythonFile.")}};var ue=class extends x{constructor({path:e,statements:r,isInitFile:n=!1,comments:o,imports:s}){super();f(this,"path");f(this,"isInitFile");f(this,"statements",[]);f(this,"comments");this.path=e,this.isInitFile=n,r==null||r.forEach(h=>this.addStatement(h)),this.comments=o!=null?o:[],s==null||s.forEach(h=>this.addReference(h))}addStatement(e){this.statements.push(e),this.inheritReferences(e)}write(e){let r=this.deduplicateReferences();this.updateWriterRefNameOverrides({writer:e,uniqueReferences:r}),this.writeComments(e),this.writeImports({writer:e,uniqueReferences:r}),this.statements.forEach((n,o)=>{n.write(e),e.newLine(),o<this.statements.length-1&&e.newLine()}),e.unsetRefNameOverrides()}updateWriterRefNameOverrides({writer:e,uniqueReferences:r}){let n=new Map(r),o={},s=this.getInitialUsedNames(),h=this.path.join("."),c=r.get(h);if(c){let{references:p}=c;p.forEach(d=>{let T=d.getFullyQualifiedModulePath(),g=d.name;o[T]={name:g,isAlias:!1},s.add(d.name)}),n.delete(h)}Array.from(n.values()).flatMap(({references:p})=>p).forEach(p=>{var N;if(p instanceof G)return;let d=(N=p.alias)!=null?N:p.name,T=p.getFullyQualifiedModulePath(),g=d,w=p.modulePath.length-1,E=!!p.alias;for(;s.has(g);){E=!0;let I=p.modulePath[w];w<0||!I?g=`_${g}`:g=`${xt(I)}${g}`,w--}s.add(g),o[T]={name:g,isAlias:E}}),e.setRefNameOverrides(o)}getInitialUsedNames(){let e=new Set;return this.statements.forEach(r=>{(r instanceof V||r instanceof j||r instanceof Q)&&e.add(r.name)}),e}deduplicateReferences(){let e=new Map;for(let r of this.references){let n=r.name,o=r.getFullyQualifiedPath();if(o==="")continue;let s=e.get(o);s?s.referenceNames.has(n)||(s.references.push(r),s.referenceNames.add(n)):e.set(o,{modulePath:r.modulePath,references:[r],referenceNames:new Set([n])})}return e}writeComments(e){this.comments.forEach(r=>{r.write(e)}),this.comments.length>0&&e.newLine()}getImportName({writer:e,reference:r}){let n=e.getRefNameOverride(r),o=r.name,s=n.isAlias?n.name:void 0;return`${o}${s?` as ${s}`:""}`}writeImports({writer:e,uniqueReferences:r}){if(r.size!==0){for(let[n,{modulePath:o,references:s}]of r){let h=o;if(!this.isDefinedInFile(h)){if(h[0]===this.path[0]){let c=0;for(;c<this.path.length&&c<h.length&&this.path[c]===h[c];)c++;let m=this.path.length-c;this.isInitFile&&m++;let p=m>0?".".repeat(m):".";p+=h.slice(c).join("."),e.write(`from ${p} import ${s.map(d=>this.getImportName({writer:e,reference:d})).join(", ")}`)}else e.write(`from ${n} import ${s.map(c=>this.getImportName({writer:e,reference:c})).join(", ")}`);e.newLine()}}e.newLine()}}isDefinedInFile(e){return e.length===this.path.length&&e.every((r,n)=>r===this.path[n])}};l();u();var Se=class extends x{constructor(e){super();f(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"int":e.write("int");break;case"float":e.write("float");break;case"bool":e.write("bool");break;case"str":e.write("str");break;case"bytes":e.write("bytes");break;case"list":e.write("List["),this.internalType.value.write(e),e.write("]");break;case"set":e.write("Set["),this.internalType.value.write(e),e.write("]");break;case"tuple":e.write("Tuple["),this.internalType.values.forEach((r,n)=>{n>0&&e.write(", "),r.write(e)}),e.write("]");break;case"dict":e.write("Dict["),this.internalType.keyType.write(e),e.write(", "),this.internalType.valueType.write(e),e.write("]");break;case"none":e.write("None");break;case"uuid":e.write("UUID");break;case"optional":e.write("Optional["),this.internalType.value.write(e),e.write("]");break;case"union":e.write("Union["),this.internalType.values.forEach((r,n)=>{n>0&&e.write(", "),r.write(e)}),e.write("]");break;case"any":e.write("Any");break;case"reference":this.internalType.value.write(e);break;case"datetime":e.write("datetime");break;case"literal":typeof this.internalType.value=="string"?e.write(`Literal["${this.internalType.value}"]`):e.write(`Literal[${this.internalType.value}]`);break;default:D(this.internalType)}}static int(){return new this({type:"int"})}static float(){return new this({type:"float"})}static bool(){return new this({type:"bool"})}static str(){return new this({type:"str"})}static bytes(){return new this({type:"bytes"})}static list(e){let r=new this({type:"list",value:e});return r.addReference(A.reference({name:"List",modulePath:["typing"]})),r.inheritReferences(e),r}static set(e){let r=new this({type:"set",value:e});return r.addReference(A.reference({name:"Set",modulePath:["typing"]})),r.inheritReferences(e),r}static tuple(e){let r=new this({type:"tuple",values:e});return r.addReference(A.reference({name:"Tuple",modulePath:["typing"]})),e.forEach(n=>r.inheritReferences(n)),r}static dict(e,r){let n=new this({type:"dict",keyType:e,valueType:r});return n.addReference(A.reference({name:"Dict",modulePath:["typing"]})),n.inheritReferences(e),n.inheritReferences(r),n}static none(){return new this({type:"none"})}static uuid(){let e=new this({type:"uuid"});return e.addReference(A.reference({name:"UUID",modulePath:["uuid"]})),e}static optional(e){if(this.isAlreadyOptional(e))return e;let r=new this({type:"optional",value:e});return r.addReference(A.reference({name:"Optional",modulePath:["typing"]})),r.inheritReferences(e),r}static union(e){let r=new this({type:"union",values:e});return r.addReference(A.reference({name:"Union",modulePath:["typing"]})),e.forEach(n=>r.inheritReferences(n)),r}static any(){let e=new this({type:"any"});return e.addReference(A.reference({name:"Any",modulePath:["typing"]})),e}static datetime(){let e=new this({type:"datetime"});return e.addReference(A.reference({name:"datetime",modulePath:["datetime"]})),e}static reference(e){let r=new this({type:"reference",value:e});return r.addReference(e),r}static literal(e){let r=new this({type:"literal",value:e});return r.addReference(A.reference({name:"Literal",modulePath:["typing"]})),r}static isAlreadyOptional(e){return e.internalType.type==="optional"}};l();u();var J=class i extends x{constructor(e){super();f(this,"internalType");this.internalType=e}static int(e){return new this({type:"int",value:e})}static float(e){return new this({type:"float",value:e})}static bool(e){return new this({type:"bool",value:e})}static str(e,r={multiline:!1,startOnNewLine:!1,endWithNewLine:!1}){return new this({type:"str",value:e,config:r})}static bytes(e){return new this({type:"bytes",value:e})}static list(e,r={endWithComma:!1}){let n=new this({type:"list",values:e,config:r});return e.forEach(o=>n.inheritReferences(o)),n}static set(e,r={endWithComma:!1}){let n=new this({type:"set",values:e,config:r});return e.forEach(o=>n.inheritReferences(o)),n}static tuple(e,r={endWithComma:!1}){let n=new this({type:"tuple",values:e,config:r});return e.forEach(o=>n.inheritReferences(o)),n}static typedDict(e,r={endWithComma:!1}){let n=new this({type:"typedDict",entries:e,config:r});return e.forEach(o=>n.inheritReferences(o.value)),n}static date(e){let r=new this({type:"date",value:e});return r.addReference(new L({name:"date",modulePath:["datetime"]})),r}static datetime(e){let r=new this({type:"datetime",value:e});return r.addReference(new L({name:"datetime",modulePath:["datetime"]})),r}static dict(e,r={endWithComma:!1}){let n=new this({type:"dict",entries:e,config:r});return e.forEach(o=>{n.inheritReferences(o.key),n.inheritReferences(o.value)}),n}static reference(e){let r=new this({type:"reference",value:e});return r.inheritReferences(e),r}static none(){return new this({type:"none"})}static unknown(e){return new this({type:"unknown",value:e})}static uuid(e){let r=new this({type:"uuid",value:e});return r.addReference(new L({name:"UUID",modulePath:["uuid"]})),r}static nop(){return new this({type:"nop"})}static isNop(e){return e instanceof i&&e.internalType.type==="nop"}isTypedDict(){return this.internalType.type==="typedDict"}asTypedDictOrThrow(){if(this.isTypedDict())return this.internalType;throw new Error("Internal error; python.TypeInstantiation is not a TypedDict")}write(e){var r,n,o,s,h,c,m,p,d,T,g;switch(this.internalType.type){case"int":e.write(this.internalType.value.toString());break;case"float":e.write(this.internalType.value.toString());break;case"bool":this.internalType.value?e.write("True"):e.write("False");break;case"str":if((r=this.internalType.config)!=null&&r.multiline){let{startOnNewLine:w,endWithNewLine:E}=this.internalType.config;this.writeStringWithTripleQuotes({writer:e,value:this.internalType.value,startOnNewLine:w,endWithNewLine:E})}else e.write(`"${this.escapeString(this.internalType.value)}"`);break;case"date":e.write(`date.fromisoformat("${this.internalType.value}")`);break;case"datetime":e.write(`datetime.fromisoformat("${this.internalType.value}")`);break;case"bytes":e.write(`b"${this.internalType.value}"`);break;case"list":{let w=this.internalType,E=De({values:w.values});if(E.length===0){e.write("[]");break}e.write("["),(n=w.config)!=null&&n.multiline&&(e.newLine(),e.indent()),E.forEach((N,I)=>{var v,b;I>0&&(e.write(","),(v=w.config)!=null&&v.multiline?e.newLine():e.write(" ")),N.write(e),I===E.length-1&&((b=w.config)!=null&&b.endWithComma)&&e.write(",")}),(o=w.config)!=null&&o.multiline&&(e.newLine(),e.dedent()),e.write("]");break}case"set":{let w=this.internalType,E=De({values:w.values});if(E.length===0){e.write("{}");break}e.write("{"),(s=w.config)!=null&&s.multiline&&(e.newLine(),e.indent()),E.forEach((N,I)=>{var v,b;I>0&&(e.write(","),(v=w.config)!=null&&v.multiline?e.newLine():e.write(" ")),N.write(e),I===E.length-1&&((b=w.config)!=null&&b.endWithComma)&&e.write(",")}),(h=w.config)!=null&&h.multiline&&(e.newLine(),e.dedent()),e.write("}");break}case"tuple":{let w=this.internalType,E=De({values:w.values});if(E.length===0){e.write("()");break}e.write("("),(c=w.config)!=null&&c.multiline&&(e.newLine(),e.indent()),E.forEach((N,I)=>{var v,b;I>0&&(e.write(","),(v=w.config)!=null&&v.multiline?e.newLine():e.write(" ")),N.write(e),(E.length===1||I===E.length-1&&((b=w.config)!=null&&b.endWithComma))&&e.write(",")}),(m=w.config)!=null&&m.multiline&&(e.newLine(),e.dedent()),e.write(")");break}case"dict":{let w=this.internalType,E=kr({entries:w.entries});if(E.length===0){e.write("{}");break}e.write("{"),(p=w.config)!=null&&p.multiline&&(e.newLine(),e.indent()),E.forEach((N,I)=>{var v,b;I>0&&(e.write(","),(v=w.config)!=null&&v.multiline?e.newLine():e.write(" ")),N.key.write(e),e.write(": "),N.value.write(e),I===E.length-1&&((b=w.config)!=null&&b.endWithComma)&&e.write(",")}),(d=w.config)!=null&&d.multiline&&(e.newLine(),e.dedent()),e.write("}");break}case"typedDict":{let w=this.internalType,E=Sr({entries:w.entries});if(E.length===0){e.write("{}");break}e.write("{"),(T=w.config)!=null&&T.multiline&&(e.writeLine(),e.indent()),E.forEach((N,I)=>{var v;I>0&&(e.write(","),(v=w.config)!=null&&v.multiline?e.newLine():e.write(" ")),e.write(`"${N.name}": `),N.value.write(e)}),(g=w.config)!=null&&g.multiline&&(e.newLine(),e.dedent()),e.write("}");break}case"reference":{this.internalType.value.write(e);break}case"none":e.write("None");break;case"unknown":this.writeUnknown({writer:e,value:this.internalType.value});break;case"uuid":e.write(`UUID("${this.internalType.value}")`);break;case"nop":break;default:D(this.internalType)}}writeStringWithTripleQuotes({writer:e,value:r,startOnNewLine:n,endWithNewLine:o}){var h;e.write('"""');let s=r.split(`
17
- `);if(s.length<=1){e.write(this.escapeString((h=s[0])!=null?h:"")),e.write('"""');return}n&&e.writeNoIndent(`\\
18
- `),s.forEach((c,m)=>{e.writeNoIndent(this.escapeString(c)),m===s.length-1?o&&e.writeNoIndent(`\\
19
- `):e.writeNoIndent(`
20
- `)}),e.writeNoIndent('"""')}escapeString(e){let r=new RegExp(`(?<!\\\\)(["'\\\\\\t\\n\\r])`,"g"),n={'"':'\\"',"'":"\\'","\\":"\\\\"," ":"\\t","\n":"\\n","\r":"\\r"};return e.replace(r,o=>{var s;return(s=n[o])!=null?s:o})}writeUnknown({writer:e,value:r}){switch(typeof r){case"boolean":e.write(r?"True":"False");return;case"string":e.write(`"${this.escapeString(r)}"`);return;case"number":e.write(r.toString());return;case"object":if(r==null){e.write("None");return}if(Array.isArray(r)){this.writeUnknownArray({writer:e,value:r});return}this.writeUnknownObject({writer:e,value:r});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof r}`)}}writeUnknownArray({writer:e,value:r}){if(r.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let n of r)e.writeNode(i.unknown(n)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownObject({writer:e,value:r}){let n=Object.entries(r);if(n.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[o,s]of n)e.write(`"${o}": `),e.writeNode(i.unknown(s)),e.writeLine(",");e.dedent(),e.write("}")}};function kr({entries:i}){return i.filter(t=>!J.isNop(t.key)&&!J.isNop(t.value))}function Sr({entries:i}){return i.filter(t=>!J.isNop(t.value))}function De({values:i}){return i.filter(t=>!J.isNop(t))}function Lr(i){return new te(i)}function br(i){return new ke(i)}function Pr(i){return new ue(i)}function Fr(i){return new V(i)}function Cr(i){return new ie(i)}function Ur(i){return new oe(i)}function Br(i){return new L(i)}function _r(i){return new G(i)}function Mr(i){return new Q(i)}function Dr(i){return new $(i)}function Or(i){return new ne(i)}function $r(i){return new se(i)}function Yr(i){return new ae(i)}function Wr(i){return new j(i)}function Vr(i){return new re(i)}function Qr(i){return new ce(i)}function zr(i){return new z(i)}function jr(i){return new he(i)}function Gr(i){return new le(i)}var Oe=class{constructor({context:t}){f(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){var o;let r={fileFields:[],bodyPropertyFields:[]},n=(o=this.context.getRecord(e))!=null?o:{};for(let s of t.properties)switch(s.type){case"file":{let h=this.getSingleFileProperty({property:s,record:n});if(A.TypeInstantiation.isNop(h))break;r.fileFields.push({name:this.context.getPropertyName(s.name),value:h});break}case"fileArray":{let h=this.getArrayFileProperty({property:s,record:n});if(A.TypeInstantiation.isNop(h))break;r.fileFields.push({name:this.context.getPropertyName(s.name),value:h});break}case"bodyProperty":{let h=this.getBodyProperty({property:s,record:n});if(A.TypeInstantiation.isNop(h))break;r.bodyPropertyFields.push({name:this.context.getPropertyName(s.name.name),value:h});break}default:D(s)}return r}getSingleFileProperty({property:t,record:e}){var n;let r=this.context.getSingleFileValue({property:t,record:e});return r==null&&(r=`example_${(n=t.wireValue)!=null?n:"file"}`),this.context.getFileFromString(r)}getArrayFileProperty({property:t,record:e}){let r=this.context.getFileArrayValues({property:t,record:e});return r==null?A.TypeInstantiation.nop():A.TypeInstantiation.list(r.map(n=>this.context.getFileFromString(n)))}getBodyProperty({property:t,record:e}){let r=e[t.name.wireValue];return r==null?A.TypeInstantiation.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:r})}};0&&(module.exports={FilePropertyMapper});
21
- /*! Bundled license information:
22
-
23
- @esbuild-plugins/node-globals-polyfill/Buffer.js:
24
- (*!
25
- * The buffer module from node.js, for the browser.
26
- *
27
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
28
- * @license MIT
29
- *)
30
- */
31
- //# sourceMappingURL=FilePropertyMapper.cjs.map