@fern-api/ruby-dynamic-snippets 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,26 @@
1
+ var et=Object.create;var G=Object.defineProperty,tt=Object.defineProperties,rt=Object.getOwnPropertyDescriptor,it=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertyNames,ae=Object.getOwnPropertySymbols,ot=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var ge=(r,t,e)=>t in r?G(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,vr=(r,t)=>{for(var e in t||(t={}))Te.call(t,e)&&ge(r,e,t[e]);if(ae)for(var e of ae(t))Ne.call(t,e)&&ge(r,e,t[e]);return r},Ir=(r,t)=>tt(r,it(t));var kr=r=>typeof r=="symbol"?r:r+"",Rr=(r,t)=>{var e={};for(var i in r)Te.call(r,i)&&t.indexOf(i)<0&&(e[i]=r[i]);if(r!=null&&ae)for(var i of ae(r))t.indexOf(i)<0&&Ne.call(r,i)&&(e[i]=r[i]);return e};var Ee=(r,t)=>()=>(r&&(t=r(r=0)),t);var Nr=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),st=(r,t)=>{for(var e in t)G(r,e,{get:t[e],enumerable:!0})},Se=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of nt(t))!Te.call(r,n)&&n!==e&&G(r,n,{get:()=>t[n],enumerable:!(i=rt(t,n))||i.enumerable});return r};var Sr=(r,t,e)=>(e=r!=null?et(ot(r)):{},Se(t||!r||!r.__esModule?G(e,"default",{value:r,enumerable:!0}):e,r)),_r=r=>Se(G({},"__esModule",{value:!0}),r);var f=(r,t,e)=>ge(r,typeof t!="symbol"?t+"":t,e);function Pe(){throw new Error("setTimeout has not been defined")}function Be(){throw new Error("clearTimeout has not been defined")}function Le(r){if(P===setTimeout)return setTimeout(r,0);if((P===Pe||!P)&&setTimeout)return P=setTimeout,setTimeout(r,0);try{return P(r,0)}catch(t){try{return P.call(null,r,0)}catch(e){return P.call(this,r,0)}}}function at(r){if(B===clearTimeout)return clearTimeout(r);if((B===Be||!B)&&clearTimeout)return B=clearTimeout,clearTimeout(r);try{return B(r)}catch(t){try{return B.call(null,r)}catch(e){return B.call(this,r)}}}function ft(){!V||!L||(V=!1,L.length?S=L.concat(S):fe=-1,S.length&&Ce())}function Ce(){if(!V){var r=Le(ft);V=!0;for(var t=S.length;t;){for(L=S,S=[];++fe<t;)L&&L[fe].run();fe=-1,t=S.length}L=null,V=!1,at(r)}}function ht(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];S.push(new be(r,t)),S.length===1&&!V&&Le(Ce)}function be(r,t){this.fun=r,this.array=t}function C(){}function Rt(r){throw new Error("process.binding is not supported")}function Nt(){return"/"}function St(r){throw new Error("process.chdir is not supported")}function _t(){return 0}function Bt(r){var t=Pt.call(J)*.001,e=Math.floor(t),i=Math.floor(t%1*1e9);return r&&(e=e-r[0],i=i-r[1],i<0&&(e--,i+=1e9)),[e,i]}function Ct(){var r=new Date,t=r-Lt;return t/1e3}var P,B,S,V,L,fe,ut,ct,lt,pt,wt,mt,xt,dt,yt,gt,Tt,Et,At,vt,It,kt,J,Pt,Lt,m,_e,h=Ee(()=>{"use strict";P=Pe,B=Be;typeof globalThis.setTimeout=="function"&&(P=setTimeout);typeof globalThis.clearTimeout=="function"&&(B=clearTimeout);S=[],V=!1,fe=-1;be.prototype.run=function(){this.fun.apply(null,this.array)};ut="browser",ct="browser",lt=!0,pt={},wt=[],mt="",xt={},dt={},yt={};gt=C,Tt=C,Et=C,At=C,vt=C,It=C,kt=C;J=globalThis.performance||{},Pt=J.now||J.mozNow||J.msNow||J.oNow||J.webkitNow||function(){return new Date().getTime()};Lt=new Date;m={nextTick:ht,title:ut,browser:lt,env:pt,argv:wt,version:mt,versions:xt,on:gt,addListener:Tt,once:Et,off:At,removeListener:vt,removeAllListeners:It,emit:kt,binding:Rt,cwd:Nt,chdir:St,umask:_t,hrtime:Bt,platform:ct,release:dt,config:yt,uptime:Ct},_e={};Object.keys(_e).forEach(r=>{let t=r.split("."),e=m;for(let i=0;i<t.length;i++){let n=t[i];i===t.length-1?e[n]=_e[r]:e=e[n]||(e[n]={})}})});function Ye(){ve=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)R[t]=r[t],A[r.charCodeAt(t)]=t;A[45]=62,A[95]=63}function Ut(r){ve||Ye();var t,e,i,n,s,o,c=r.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s=r[c-2]==="="?2:r[c-1]==="="?1:0,o=new bt(c*3/4-s),i=s>0?c-4:c;var l=0;for(t=0,e=0;t<i;t+=4,e+=3)n=A[r.charCodeAt(t)]<<18|A[r.charCodeAt(t+1)]<<12|A[r.charCodeAt(t+2)]<<6|A[r.charCodeAt(t+3)],o[l++]=n>>16&255,o[l++]=n>>8&255,o[l++]=n&255;return s===2?(n=A[r.charCodeAt(t)]<<2|A[r.charCodeAt(t+1)]>>4,o[l++]=n&255):s===1&&(n=A[r.charCodeAt(t)]<<10|A[r.charCodeAt(t+1)]<<4|A[r.charCodeAt(t+2)]>>2,o[l++]=n>>8&255,o[l++]=n&255),o}function Dt(r){return R[r>>18&63]+R[r>>12&63]+R[r>>6&63]+R[r&63]}function Mt(r,t,e){for(var i,n=[],s=t;s<e;s+=3)i=(r[s]<<16)+(r[s+1]<<8)+r[s+2],n.push(Dt(i));return n.join("")}function Ue(r){ve||Ye();for(var t,e=r.length,i=e%3,n="",s=[],o=16383,c=0,l=e-i;c<l;c+=o)s.push(Mt(r,c,c+o>l?l:c+o));return i===1?(t=r[e-1],n+=R[t>>2],n+=R[t<<4&63],n+="=="):i===2&&(t=(r[e-2]<<8)+r[e-1],n+=R[t>>10],n+=R[t>>4&63],n+=R[t<<2&63],n+="="),s.push(n),s.join("")}function he(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _(r,t){if(he()<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 Ie(this,r)}return $e(this,r,t,e)}function $e(r,t,e,i){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Ft(r,t,e,i):typeof t=="string"?$t(r,t,e):Wt(r,t)}function Fe(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function Yt(r,t,e,i){return Fe(t),t<=0?_(r,t):e!==void 0?typeof i=="string"?_(r,t).fill(e,i):_(r,t).fill(e):_(r,t)}function Ie(r,t){if(Fe(t),r=_(r,t<0?0:ke(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function $t(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var i=We(t,e)|0;r=_(r,i);var n=r.write(t,e);return n!==i&&(r=r.slice(0,n)),r}function Ae(r,t){var e=t.length<0?0:ke(t.length)|0;r=_(r,e);for(var i=0;i<e;i+=1)r[i]=t[i]&255;return r}function Ft(r,t,e,i){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(i||0))throw new RangeError("'length' is out of bounds");return e===void 0&&i===void 0?t=new Uint8Array(t):i===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,i),a.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=a.prototype):r=Ae(r,t),r}function Wt(r,t){if(N(t)){var e=ke(t.length)|0;return r=_(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||sr(t.length)?_(r,0):Ae(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Ae(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ke(r){if(r>=he())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+he().toString(16)+" bytes");return r|0}function N(r){return!!(r!=null&&r._isBuffer)}function We(r,t){if(N(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 i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return ue(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return He(r).length;default:if(i)return ue(r).length;t=(""+t).toLowerCase(),i=!0}}function zt(r,t,e){var i=!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 Xt(this,t,e);case"utf8":case"utf-8":return qe(this,t,e);case"ascii":return Gt(this,t,e);case"latin1":case"binary":return Qt(this,t,e);case"base64":return Ht(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return jt(this,t,e);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}function b(r,t,e){var i=r[t];r[t]=r[e],r[e]=i}function ze(r,t,e,i,n){if(r.length===0)return-1;if(typeof e=="string"?(i=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=n?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(n)return-1;e=r.length-1}else if(e<0)if(n)e=0;else return-1;if(typeof t=="string"&&(t=a.from(t,i)),N(t))return t.length===0?-1:De(r,t,e,i,n);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):De(r,[t],e,i,n);throw new TypeError("val must be string, number or Buffer")}function De(r,t,e,i,n){var s=1,o=r.length,c=t.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(r.length<2||t.length<2)return-1;s=2,o/=2,c/=2,e/=2}function l(E,K){return s===1?E[K]:E.readUInt16BE(K*s)}var w;if(n){var x=-1;for(w=e;w<o;w++)if(l(r,w)===l(t,x===-1?0:w-x)){if(x===-1&&(x=w),w-x+1===c)return x*s}else x!==-1&&(w-=w-x),x=-1}else for(e+c>o&&(e=o-c),w=e;w>=0;w--){for(var p=!0,v=0;v<c;v++)if(l(r,w+v)!==l(t,v)){p=!1;break}if(p)return w}return-1}function Ot(r,t,e,i){e=Number(e)||0;var n=r.length-e;i?(i=Number(i),i>n&&(i=n)):i=n;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");i>s/2&&(i=s/2);for(var o=0;o<i;++o){var c=parseInt(t.substr(o*2,2),16);if(isNaN(c))return o;r[e+o]=c}return o}function qt(r,t,e,i){return pe(ue(t,r.length-e),r,e,i)}function Oe(r,t,e,i){return pe(nr(t),r,e,i)}function Kt(r,t,e,i){return Oe(r,t,e,i)}function Jt(r,t,e,i){return pe(He(t),r,e,i)}function Vt(r,t,e,i){return pe(or(t,r.length-e),r,e,i)}function Ht(r,t,e){return t===0&&e===r.length?Ue(r):Ue(r.slice(t,e))}function qe(r,t,e){e=Math.min(r.length,e);for(var i=[],n=t;n<e;){var s=r[n],o=null,c=s>239?4:s>223?3:s>191?2:1;if(n+c<=e){var l,w,x,p;switch(c){case 1:s<128&&(o=s);break;case 2:l=r[n+1],(l&192)===128&&(p=(s&31)<<6|l&63,p>127&&(o=p));break;case 3:l=r[n+1],w=r[n+2],(l&192)===128&&(w&192)===128&&(p=(s&15)<<12|(l&63)<<6|w&63,p>2047&&(p<55296||p>57343)&&(o=p));break;case 4:l=r[n+1],w=r[n+2],x=r[n+3],(l&192)===128&&(w&192)===128&&(x&192)===128&&(p=(s&15)<<18|(l&63)<<12|(w&63)<<6|x&63,p>65535&&p<1114112&&(o=p))}}o===null?(o=65533,c=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|o&1023),i.push(o),n+=c}return Zt(i)}function Zt(r){var t=r.length;if(t<=Me)return String.fromCharCode.apply(String,r);for(var e="",i=0;i<t;)e+=String.fromCharCode.apply(String,r.slice(i,i+=Me));return e}function Gt(r,t,e){var i="";e=Math.min(r.length,e);for(var n=t;n<e;++n)i+=String.fromCharCode(r[n]&127);return i}function Qt(r,t,e){var i="";e=Math.min(r.length,e);for(var n=t;n<e;++n)i+=String.fromCharCode(r[n]);return i}function Xt(r,t,e){var i=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>i)&&(e=i);for(var n="",s=t;s<e;++s)n+=ir(r[s]);return n}function jt(r,t,e){for(var i=r.slice(t,e),n="",s=0;s<i.length;s+=2)n+=String.fromCharCode(i[s]+i[s+1]*256);return n}function y(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 T(r,t,e,i,n,s){if(!N(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<s)throw new RangeError('"value" argument is out of bounds');if(e+i>r.length)throw new RangeError("Index out of range")}function ce(r,t,e,i){t<0&&(t=65535+t+1);for(var n=0,s=Math.min(r.length-e,2);n<s;++n)r[e+n]=(t&255<<8*(i?n:1-n))>>>(i?n:1-n)*8}function le(r,t,e,i){t<0&&(t=4294967295+t+1);for(var n=0,s=Math.min(r.length-e,4);n<s;++n)r[e+n]=t>>>(i?n:3-n)*8&255}function Ke(r,t,e,i,n,s){if(e+i>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Je(r,t,e,i,n){return n||Ke(r,t,e,4,34028234663852886e22,-34028234663852886e22),Ge(r,t,e,i,23,4),e+4}function Ve(r,t,e,i,n){return n||Ke(r,t,e,8,17976931348623157e292,-17976931348623157e292),Ge(r,t,e,i,52,8),e+8}function tr(r){if(r=rr(r).replace(er,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function rr(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function ir(r){return r<16?"0"+r.toString(16):r.toString(16)}function ue(r,t){t=t||1/0;for(var e,i=r.length,n=null,s=[],o=0;o<i;++o){if(e=r.charCodeAt(o),e>55295&&e<57344){if(!n){if(e>56319){(t-=3)>-1&&s.push(239,191,189);continue}else if(o+1===i){(t-=3)>-1&&s.push(239,191,189);continue}n=e;continue}if(e<56320){(t-=3)>-1&&s.push(239,191,189),n=e;continue}e=(n-55296<<10|e-56320)+65536}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,e<128){if((t-=1)<0)break;s.push(e)}else if(e<2048){if((t-=2)<0)break;s.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;s.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;s.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return s}function nr(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function or(r,t){for(var e,i,n,s=[],o=0;o<r.length&&!((t-=2)<0);++o)e=r.charCodeAt(o),i=e>>8,n=e%256,s.push(n),s.push(i);return s}function He(r){return Ut(tr(r))}function pe(r,t,e,i){for(var n=0;n<i&&!(n+e>=t.length||n>=r.length);++n)t[n+e]=r[n];return n}function sr(r){return r!==r}function ar(r){return r!=null&&(!!r._isBuffer||Ze(r)||fr(r))}function Ze(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function fr(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Ze(r.slice(0,0))}function we(r,t,e,i,n){var s,o,c=n*8-i-1,l=(1<<c)-1,w=l>>1,x=-7,p=e?n-1:0,v=e?-1:1,E=r[t+p];for(p+=v,s=E&(1<<-x)-1,E>>=-x,x+=c;x>0;s=s*256+r[t+p],p+=v,x-=8);for(o=s&(1<<-x)-1,s>>=-x,x+=i;x>0;o=o*256+r[t+p],p+=v,x-=8);if(s===0)s=1-w;else{if(s===l)return o?NaN:(E?-1:1)*(1/0);o=o+Math.pow(2,i),s=s-w}return(E?-1:1)*o*Math.pow(2,s-i)}function Ge(r,t,e,i,n,s){var o,c,l,w=s*8-n-1,x=(1<<w)-1,p=x>>1,v=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=i?0:s-1,K=i?1:-1,je=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,o=x):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+p>=1?t+=v/l:t+=v*Math.pow(2,1-p),t*l>=2&&(o++,l/=2),o+p>=x?(c=0,o=x):o+p>=1?(c=(t*l-1)*Math.pow(2,n),o=o+p):(c=t*Math.pow(2,p-1)*Math.pow(2,n),o=0));n>=8;r[e+E]=c&255,E+=K,c/=256,n-=8);for(o=o<<n|c,w+=n;w>0;r[e+E]=o&255,E+=K,o/=256,w-=8);r[e+E-K]|=je*128}var R,A,bt,ve,Me,er,Qe=Ee(()=>{"use strict";h();u();R=[],A=[],bt=typeof Uint8Array!="undefined"?Uint8Array:Array,ve=!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 $e(null,r,t,e)};a.kMaxLength=he();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 Yt(null,r,t,e)};a.allocUnsafe=function(r){return Ie(null,r)};a.allocUnsafeSlow=function(r){return Ie(null,r)};a.isBuffer=ar;a.compare=function(t,e){if(!N(t)||!N(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var i=t.length,n=e.length,s=0,o=Math.min(i,n);s<o;++s)if(t[s]!==e[s]){i=t[s],n=e[s];break}return i<n?-1:n<i?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 i;if(e===void 0)for(e=0,i=0;i<t.length;++i)e+=t[i].length;var n=a.allocUnsafe(e),s=0;for(i=0;i<t.length;++i){var o=t[i];if(!N(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,s),s+=o.length}return n};a.byteLength=We;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)b(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)b(this,e,e+3),b(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)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?qe(this,0,t):zt.apply(this,arguments)};a.prototype.equals=function(t){if(!N(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,i,n,s){if(!N(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),i===void 0&&(i=t?t.length:0),n===void 0&&(n=0),s===void 0&&(s=this.length),e<0||i>t.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&e>=i)return 0;if(n>=s)return-1;if(e>=i)return 1;if(e>>>=0,i>>>=0,n>>>=0,s>>>=0,this===t)return 0;for(var o=s-n,c=i-e,l=Math.min(o,c),w=this.slice(n,s),x=t.slice(e,i),p=0;p<l;++p)if(w[p]!==x[p]){o=w[p],c=x[p];break}return o<c?-1:c<o?1:0};a.prototype.includes=function(t,e,i){return this.indexOf(t,e,i)!==-1};a.prototype.indexOf=function(t,e,i){return ze(this,t,e,i,!0)};a.prototype.lastIndexOf=function(t,e,i){return ze(this,t,e,i,!1)};a.prototype.write=function(t,e,i,n){if(e===void 0)n="utf8",i=this.length,e=0;else if(i===void 0&&typeof e=="string")n=e,i=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(i)?(i=i|0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var s=this.length-e;if((i===void 0||i>s)&&(i=s),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return Ot(this,t,e,i);case"utf8":case"utf-8":return qt(this,t,e,i);case"ascii":return Oe(this,t,e,i);case"latin1":case"binary":return Kt(this,t,e,i);case"base64":return Jt(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,t,e,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Me=4096;a.prototype.slice=function(t,e){var i=this.length;t=~~t,e=e===void 0?i:~~e,t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),e<t&&(e=t);var n;if(a.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=a.prototype;else{var s=e-t;n=new a(s,void 0);for(var o=0;o<s;++o)n[o]=this[o+t]}return n};a.prototype.readUIntLE=function(t,e,i){t=t|0,e=e|0,i||y(t,e,this.length);for(var n=this[t],s=1,o=0;++o<e&&(s*=256);)n+=this[t+o]*s;return n};a.prototype.readUIntBE=function(t,e,i){t=t|0,e=e|0,i||y(t,e,this.length);for(var n=this[t+--e],s=1;e>0&&(s*=256);)n+=this[t+--e]*s;return n};a.prototype.readUInt8=function(t,e){return e||y(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||y(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||y(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,e){return e||y(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||y(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,e,i){t=t|0,e=e|0,i||y(t,e,this.length);for(var n=this[t],s=1,o=0;++o<e&&(s*=256);)n+=this[t+o]*s;return s*=128,n>=s&&(n-=Math.pow(2,8*e)),n};a.prototype.readIntBE=function(t,e,i){t=t|0,e=e|0,i||y(t,e,this.length);for(var n=e,s=1,o=this[t+--n];n>0&&(s*=256);)o+=this[t+--n]*s;return s*=128,o>=s&&(o-=Math.pow(2,8*e)),o};a.prototype.readInt8=function(t,e){return e||y(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,e){e||y(t,2,this.length);var i=this[t]|this[t+1]<<8;return i&32768?i|4294901760:i};a.prototype.readInt16BE=function(t,e){e||y(t,2,this.length);var i=this[t+1]|this[t]<<8;return i&32768?i|4294901760:i};a.prototype.readInt32LE=function(t,e){return e||y(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||y(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||y(t,4,this.length),we(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||y(t,4,this.length),we(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||y(t,8,this.length),we(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||y(t,8,this.length),we(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,e,i,n){if(t=+t,e=e|0,i=i|0,!n){var s=Math.pow(2,8*i)-1;T(this,t,e,i,s,0)}var o=1,c=0;for(this[e]=t&255;++c<i&&(o*=256);)this[e+c]=t/o&255;return e+i};a.prototype.writeUIntBE=function(t,e,i,n){if(t=+t,e=e|0,i=i|0,!n){var s=Math.pow(2,8*i)-1;T(this,t,e,i,s,0)}var o=i-1,c=1;for(this[e+o]=t&255;--o>=0&&(c*=256);)this[e+o]=t/c&255;return e+i};a.prototype.writeUInt8=function(t,e,i){return t=+t,e=e|0,i||T(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,i){return t=+t,e=e|0,i||T(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):ce(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,i){return t=+t,e=e|0,i||T(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):ce(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,i){return t=+t,e=e|0,i||T(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):le(this,t,e,!0),e+4};a.prototype.writeUInt32BE=function(t,e,i){return t=+t,e=e|0,i||T(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):le(this,t,e,!1),e+4};a.prototype.writeIntLE=function(t,e,i,n){if(t=+t,e=e|0,!n){var s=Math.pow(2,8*i-1);T(this,t,e,i,s-1,-s)}var o=0,c=1,l=0;for(this[e]=t&255;++o<i&&(c*=256);)t<0&&l===0&&this[e+o-1]!==0&&(l=1),this[e+o]=(t/c>>0)-l&255;return e+i};a.prototype.writeIntBE=function(t,e,i,n){if(t=+t,e=e|0,!n){var s=Math.pow(2,8*i-1);T(this,t,e,i,s-1,-s)}var o=i-1,c=1,l=0;for(this[e+o]=t&255;--o>=0&&(c*=256);)t<0&&l===0&&this[e+o+1]!==0&&(l=1),this[e+o]=(t/c>>0)-l&255;return e+i};a.prototype.writeInt8=function(t,e,i){return t=+t,e=e|0,i||T(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,i){return t=+t,e=e|0,i||T(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):ce(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,i){return t=+t,e=e|0,i||T(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):ce(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,i){return t=+t,e=e|0,i||T(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):le(this,t,e,!0),e+4};a.prototype.writeInt32BE=function(t,e,i){return t=+t,e=e|0,i||T(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):le(this,t,e,!1),e+4};a.prototype.writeFloatLE=function(t,e,i){return Je(this,t,e,!0,i)};a.prototype.writeFloatBE=function(t,e,i){return Je(this,t,e,!1,i)};a.prototype.writeDoubleLE=function(t,e,i){return Ve(this,t,e,!0,i)};a.prototype.writeDoubleBE=function(t,e,i){return Ve(this,t,e,!1,i)};a.prototype.copy=function(t,e,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<i&&(n=i),n===i||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=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-i&&(n=t.length-e+i);var s=n-i,o;if(this===t&&i<e&&e<n)for(o=s-1;o>=0;--o)t[o+e]=this[o+i];else if(s<1e3||!a.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)t[o+e]=this[o+i];else Uint8Array.prototype.set.call(t,this.subarray(i,i+s),e);return s};a.prototype.fill=function(t,e,i,n){if(typeof t=="string"){if(typeof e=="string"?(n=e,e=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),t.length===1){var s=t.charCodeAt(0);s<256&&(t=s)}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<i)throw new RangeError("Out of range index");if(i<=e)return this;e=e>>>0,i=i===void 0?this.length:i>>>0,t||(t=0);var o;if(typeof t=="number")for(o=e;o<i;++o)this[o]=t;else{var c=N(t)?t:ue(new a(t,n).toString()),l=c.length;for(o=0;o<i-e;++o)this[o+e]=c[o%l]}return this};er=/[^+\/0-9A-Za-z-_]/g});var u=Ee(()=>{"use strict";Qe()});h();u();function Q(r){throw new Error("Unexpected value: "+JSON.stringify(r))}h();u();h();u();function hr(r){return Object.keys(r)}var Re={};st(Re,{AstNode:()=>d,ClassInstantiation:()=>Y,ClassReference:()=>$,CodeBlock:()=>F,KeywordArgument:()=>W,Method:()=>z,MethodInvocation:()=>O,Parameter:()=>g,TypeLiteral:()=>oe,TypeParameter:()=>q,classReference:()=>yr,class_:()=>pr,codeblock:()=>cr,comment:()=>xr,instantiateClass:()=>gr,invokeMethod:()=>Er,keywordArgument:()=>Tr,method:()=>mr,module:()=>wr,parameters:()=>lr,positionalArgument:()=>Ar,typeParameter:()=>dr});h();u();h();u();h();u();h();u();h();u();h();u();h();u();var U=class{};h();u();h();u();var I=class extends U{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 ur=4,X=class{constructor(){f(this,"buffer","");f(this,"indentLevel",0);f(this,"hasWrittenAnything",!1);f(this,"lastCharacterIsSemicolon",!1);f(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
2
+ `),i=e?t.substring(0,t.length-1):t,n=this.getIndentString(),s=i.replaceAll(`
3
+ `,`
4
+ ${n}`);this.isAtStartOfLine()&&(s=n+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)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new I(t).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new I(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}controlFlowWithoutStatement(t){new I(t).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new I(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}alternativeControlFlow(t){this.dedent(),this.write("} "),new I(t).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
6
+ `)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
7
+ `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:i}){if(t.length>0){let n=t[0];n!=null&&i(n);for(let s=1;s<t.length;s++){this.write(e);let o=t[s];o!=null&&i(o)}}}toString(){return this.buffer}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
8
+ `),this.lastCharacterIsSemicolon=t.endsWith(";")),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*ur)}};h();u();var me=class{formatMultiple(t){return Promise.all(t.map(e=>this.format(e)))}formatMultipleSync(t){return t.map(e=>this.formatSync(e))}},j=class extends me{async format(t){return t}formatSync(t){return t}};h();u();h();u();var xe=class extends X{constructor({customConfig:e,formatter:i}){super();f(this,"customConfig");f(this,"formatter");f(this,"requires",new Set);this.customConfig=e,this.formatter=i!=null?i:new j}addRequire(e){this.requires.add(e)}};var H=class extends xe{constructor({customConfig:t,formatter:e}){super({customConfig:t,formatter:e})}async toStringAsync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format Ruby file: ${e}
9
+ ${t}`)}return t}toString(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(t)}catch(e){throw new Error(`Failed to format Ruby file: ${e}
10
+ ${t}`)}return t}getContent(){let t=this.stringifyRequires();return t.length>0?`${t}
11
+
12
+ ${this.buffer}`:this.buffer}stringifyRequires(){return Array.from(this.requires).map(t=>`require "${t}"`).join(`
13
+ `)}};var d=class extends U{async toStringAsync({customConfig:t,formatter:e}){let i=new H({customConfig:t,formatter:e});return this.write(i),i.toStringAsync()}toString({customConfig:t,formatter:e}){let i=new H({customConfig:t,formatter:e});return this.write(i),i.toString()}typeDefinitionToString({customConfig:t,formatter:e}){let i=new H({customConfig:t,formatter:e});return this.writeTypeDefinition(i),i.toString()}writeTypeDefinition(t){}};var k=class extends d{constructor({docs:e}){super();f(this,"docs");this.docs=e}write(e){this.docs!=null&&this.docs.split(`
14
+ `).forEach(i=>{e.writeLine(`# ${i}`)})}};h();u();var D=class r extends d{constructor({name:e,namespace:i,typeParameters:n,docstring:s,statements:o}){super();f(this,"name");f(this,"namespace");f(this,"typeParameters");f(this,"docstring");f(this,"statements");this.name=e,this.namespace=i!=null?i:new Set,this.typeParameters=n!=null?n:[],this.docstring=s,this.statements=o!=null?o:[],this.populateChildNamespaces()}write(e){this.docstring&&new k({docs:this.docstring}).write(e),e.write(`module ${this.name}`),this.statements.length?(e.newLine(),e.indent(),this.statements.forEach((i,n)=>{i.write(e),n<this.statements.length-1&&e.newLine()}),e.dedent(),e.write("end")):e.write("; end"),e.newLine()}writeTypeDefinition(e){e.write(`module ${this.name}`),this.typeParameters.length&&(e.write("["),e.delimit({nodes:this.typeParameters,delimiter:", ",writeFunction:i=>i.writeTypeDefinition(e)}),e.write("]")),e.newLine(),this.statements.length&&(e.indent(),this.statements.forEach(i=>{i.writeTypeDefinition(e),e.newLine()}),e.dedent()),e.write("end")}populateChildNamespaces(){this.statements.filter(e=>e instanceof r||e instanceof M).forEach(e=>{e.namespace=new Set([...this.namespace,this]),e.populateChildNamespaces()})}get fullyQualifiedNamespace(){return[...this.namespace,this].map(e=>e.name).join("::")}};var M=class extends D{constructor({name:e,superclass:i,typeParameters:n,docstring:s,statements:o}){super({name:e,docstring:s,typeParameters:n});f(this,"superclass");f(this,"statements");this.superclass=i,this.statements=o!=null?o:[]}write(e){this.docstring&&new k({docs:this.docstring}).write(e),e.write(`class ${this.name}`),this.superclass&&e.write(` < ${this.superclass.name}`),this.statements.length?(e.newLine(),e.indent(),this.statements.forEach((i,n)=>{i.write(e),n<this.statements.length-1&&e.newLine()}),e.dedent(),e.write("end")):e.write("; end"),e.newLine()}writeTypeDefinition(e){e.write(`class ${this.name}`),this.typeParameters.length&&(e.write("["),e.delimit({nodes:this.typeParameters,delimiter:", ",writeFunction:i=>i.writeTypeDefinition(e)}),e.write("]")),this.superclass&&e.write(` < ${this.superclass.name}`),e.newLine(),this.statements.length&&(e.indent(),this.statements.forEach(i=>{i.writeTypeDefinition(e),e.newLine()}),e.dedent()),e.write("end")}};h();u();var Y=class extends d{constructor({classReference:e,arguments_:i}){super();f(this,"classReference");f(this,"arguments_");this.classReference=e,this.arguments_=i}write(e){e.writeNode(this.classReference),e.write("."),e.write("new"),e.write("("),this.arguments_.length>1?(e.indent(),e.newLine(),this.arguments_.forEach((i,n)=>{n>0&&(e.write(","),e.newLine()),i.write(e)}),e.newLine(),e.dedent()):this.arguments_.forEach((i,n)=>{n>0&&e.write(", "),i.write(e)}),e.write(")")}};h();u();var $=class extends d{constructor({name:e,modules:i,fullyQualified:n}){super();f(this,"name");f(this,"modules");f(this,"fullyQualified");this.name=e,this.modules=i!=null?i:[],this.fullyQualified=n!=null?n:!1}write(e){if(this.fullyQualified||this.modules.length>0){let i=[...this.modules,this.name].join("::");e.write(i);return}e.write(this.name)}};h();u();var F=class extends d{constructor(e){super();f(this,"arg");this.arg=e}write(e){return new I(this.arg).write(e)}};h();u();var W=class extends d{constructor({name:e,value:i}){super();f(this,"name");f(this,"value");this.name=e,this.value=i}write(e){e.write(`${this.name}: `),this.value.write(e)}};h();u();h();u();h();u();var Z=class r extends d{constructor(e){super();f(this,"internalType");this.internalType=e}write(e){}writeTypeDefinition(e){if(this.internalType)switch(this.internalType.type){case"self":e.write("self");break;case"class":e.write("class");break;case"instance":e.write("instance");break;case"boolean":e.write("bool");break;case"nil":e.write("nil");break;case"top":e.write("top");break;case"bot":e.write("bot");break;case"void":e.write("void");break;case"boolish":e.write("boolish");break;case"string":e.write("String");break;case"integer":e.write("Integer");break;case"union":e.delimit({nodes:this.internalType.elems,delimiter:" | ",writeFunction:i=>i.writeTypeDefinition(e)});break;case"intersection":e.delimit({nodes:this.internalType.elems,delimiter:" & ",writeFunction:i=>i.writeTypeDefinition(e)});break;case"array":e.write("Array["),this.internalType.elem.writeTypeDefinition(e),e.write("]");break;case"hash":e.write("Hash["),this.internalType.keyType.writeTypeDefinition(e),e.write(", "),this.internalType.valueType.writeTypeDefinition(e),e.write("]");break;case"object":e.write(this.internalType.klass);break;case"singleton":e.write("singleton("),e.write(this.internalType.klass),e.write(")");break;case"tuple":e.write("["),e.delimit({nodes:this.internalType.elems,delimiter:", ",writeFunction:i=>i.write(e)}),e.write("]");break;case"generic":e.write(`${this.internalType.baseKlass}[`),e.delimit({nodes:this.internalType.parameters,delimiter:", ",writeFunction:i=>i.writeTypeDefinition(e)}),e.write("]");break;default:Q(this.internalType)}else e.write("untyped")}static untyped(){return new this(void 0)}static self(){return new this({type:"self"})}static class_(){return new this({type:"class"})}static instance(){return new this({type:"instance"})}static boolean(){return new this({type:"boolean"})}static nil(){return new this({type:"nil"})}static top(){return new this({type:"top"})}static bot(){return new this({type:"bot"})}static void(){return new this({type:"void"})}static boolish(){return new this({type:"boolish"})}static string(){return new this({type:"string"})}static integer(){return new this({type:"integer"})}static union(e){return new this({type:"union",elems:e})}static intersection(e){return new this({type:"intersection",elems:e})}static array(e){return new this({type:"array",elem:e})}static hash(e,i){return new this({type:"hash",keyType:e,valueType:i})}static object(e){return new this({type:"object",klass:e})}static singleton(e){return new this({type:"singleton",klass:e})}static tuple(e){return new this({type:"tuple",elems:e})}static generic(e,i){return new this({type:"generic",baseKlass:e,parameters:i})}static nilable(e){return r.union([e,r.nil()])}nilable(){return r.nilable(this)}};var g=class extends d{constructor({name:e,type:i,optional:n}){super();f(this,"name");f(this,"type");f(this,"optional");this.name=e,this.type=i!=null?i:Z.untyped(),this.optional=n!=null?n:!1}};var ee=class extends g{constructor({name:e,type:i,initializer:n,optional:s}){super({name:e,type:i,optional:s});f(this,"initializer");this.initializer=n}write(e){e.write(`${this.name}:`),this.initializer&&e.write(` ${this.initializer.write(e)}`)}writeTypeDefinition(e){this.optional&&e.write("?"),e.write(`${this.name}: `),this.type.writeTypeDefinition(e)}};h();u();var te=class extends g{constructor(){super(...arguments);f(this,"initializer")}write(e){e.write(`**${this.name}`)}writeTypeDefinition(e){e.write("**"),this.type.writeTypeDefinition(e)}};h();u();var de={Instance:"instance",Class_:"class"},Xe={Public:"public",Private:"private",Protected:"protected"},z=class extends d{constructor({name:e,docstring:i,kind:n,visibility:s,parameters:o,returnType:c}){var l,w;super();f(this,"name");f(this,"docstring");f(this,"kind");f(this,"positionalParameters");f(this,"keywordParameters");f(this,"positionalSplatParameter");f(this,"keywordSplatParameter");f(this,"yieldParameter");f(this,"visibility");f(this,"statements",[]);f(this,"returnType");this.name=e,this.docstring=i,this.kind=n!=null?n:de.Instance,this.visibility=s!=null?s:Xe.Public,this.positionalParameters=(l=o==null?void 0:o.positional)!=null?l:[],this.keywordParameters=(w=o==null?void 0:o.keyword)!=null?w:[],this.positionalSplatParameter=o==null?void 0:o.positionalSplat,this.keywordSplatParameter=o==null?void 0:o.keywordSplat,this.yieldParameter=o==null?void 0:o.yield,this.returnType=c!=null?c:Z.untyped()}write(e){switch(this.docstring&&new k({docs:this.docstring}).write(e),this.visibility!==Xe.Public&&(e.write(this.visibility),this.kind===de.Class_&&e.write("_class_method"),e.write(" ")),this.kind){case de.Instance:e.write(`def ${this.name}`);break;case de.Class_:e.write(`def self.${this.name}`);break}this.parameters.length&&(e.write("("),e.delimit({nodes:this.parameters,delimiter:", ",writeFunction:i=>i.write(e)}),e.write(")")),this.statements.length?(e.newLine(),e.indent(),this.statements.forEach((i,n)=>{i.write(e),n<this.statements.length-1&&e.newLine()}),e.dedent(),e.write("end")):e.write("; end"),e.newLine()}writeTypeDefinition(e){e.write(`def ${this.name}: (`),this.parameters.forEach((i,n)=>{i.writeTypeDefinition(e),n<this.parameters.length-1&&e.write(", ")}),e.write(") -> "),this.returnType.writeTypeDefinition(e)}get parameters(){return[...this.positionalParameters,...this.keywordParameters,this.positionalSplatParameter,this.keywordSplatParameter,this.yieldParameter].flatMap(e=>e!==void 0?e:[])}};h();u();var O=class extends d{constructor({on:e,method:i,arguments_:n}){super();f(this,"on");f(this,"method");f(this,"arguments_");this.on=e,this.method=i,this.arguments_=n}write(e){this.on.write(e),e.write("."),e.write(this.method),e.write("("),this.arguments_.length>1?(e.indent(),e.newLine(),this.arguments_.forEach((i,n)=>{n>0&&(e.write(","),e.newLine()),i.write(e)}),e.newLine(),e.dedent()):this.arguments_.forEach((i,n)=>{n>0&&e.write(", "),i.write(e)}),e.write(")")}};h();u();var re=class extends d{constructor({value:e}){super();f(this,"value");this.value=e}write(e){this.value.write(e)}};h();u();var ie=class extends g{constructor({name:e,type:i,optional:n,initializer:s}){super({name:e,type:i,optional:n});f(this,"initializer");this.initializer=s}write(e){e.write(this.name),this.initializer&&e.write(` = ${this.initializer.write(e)}`)}writeTypeDefinition(e){this.optional&&e.write("?"),this.type.writeTypeDefinition(e)}};h();u();var ne=class extends g{write(t){t.write(`*${this.name}`)}writeTypeDefinition(t){t.write("*"),this.type.writeTypeDefinition(t)}};h();u();var oe=class r extends d{constructor(e){super();f(this,"internalType");this.internalType=e}static string(e){return new this({type:"str",value:e})}static integer(e){return new this({type:"int",value:e})}static float(e){return new this({type:"float",value:e})}static boolean(e){return new this({type:"bool",value:e})}static hash(e){return new this({type:"hash",entries:e})}static set(e){return new this({type:"set",values:e})}static list(e){return new this({type:"list",values:e})}static nop(){return new this({type:"nop"})}static nil(){return new this({type:"nil"})}static isNop(e){return e instanceof r&&e.internalType.type==="nop"}static isNil(e){return e instanceof r&&e.internalType.type==="nil"}write(e){switch(this.internalType.type){case"str":{this.internalType.value.includes("'")?e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`):e.write(`'${this.internalType.value}'`);break}case"int":{e.write(this.internalType.value.toString());break}case"float":{e.write(this.internalType.value.toString());break}case"bool":{e.write(this.internalType.value?"true":"false");break}case"hash":{let i=this.internalType.entries.filter(n=>!r.isNop(n.key)&&!r.isNop(n.value));if(i.length===0){e.write("{}");break}e.write(`{
15
+ `),i.forEach((n,s)=>{s>0&&e.writeLine(","),e.indent();let o=!1;if(n.key instanceof r&&n.key.internalType.type==="str"){let c=n.key.internalType.value;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(c)&&(e.write(`${c}:`),o=!0)}o||(n.key.write(e),e.write(":")),n.value.write(e),e.dedent()}),e.write(`
16
+ }`);break}case"set":{let i=this.internalType.values.filter(n=>!r.isNop(n));if(i.length===0){e.write("Set.new([])");break}e.write("Set.new(["),i.forEach((n,s)=>{s>0&&e.write(", "),n.write(e)}),e.write("])");break}case"list":{let i=this.internalType.values.filter(n=>!r.isNop(n));if(i.length===0){e.write("[]");break}e.write("["),i.forEach((n,s)=>{s>0&&e.write(", "),n.write(e)}),e.write("]");break}case"nop":break;case"nil":e.write("nil");break;default:Q(this.internalType)}}};h();u();var ye;(function(r){r[r.Invariant=0]="Invariant",r.Covariant="out",r.Contravariant="in"})(ye||(ye={}));var q=class extends d{constructor({name:e,unchecked:i,bound:n,variance:s,defaultType:o}){super();f(this,"name");f(this,"unchecked");f(this,"bound");f(this,"variance");f(this,"defaultType");this.name=e,this.unchecked=i!=null?i:!1,this.bound=n,this.variance=s!=null?s:ye.Invariant,this.defaultType=o}write(e){}writeTypeDefinition(e){this.unchecked&&e.write("unchecked "),this.variance!=ye.Invariant&&e.write(`${this.variance} `),e.write(this.name),this.bound&&(e.write(" < "),this.bound.writeTypeDefinition(e)),this.defaultType&&(e.write(" = "),this.defaultType.writeTypeDefinition(e))}};h();u();var se=class extends g{constructor(){super(...arguments);f(this,"initializer")}write(e){e.write(`&${this.name}`)}};function cr(r){return new F(r)}var lr={positional(r){return new ie(r)},keyword(r){return new ee(r)},positionalSplat(r){return new ne(r)},keywordSplat(r){return new te(r)},yield(r){return new se(r)}};function pr(r){return new M(r)}function wr(r){return new D(r)}function mr(r){return new z(r)}function xr(r){return new k(r)}function dr(r){return new q(r)}function yr(r){return new $(r)}function gr(r){return new Y(r)}function Tr(r){return new W(r)}function Er(r){return new O(r)}function Ar(r){return new re(r)}h();u();export{vr as a,Ir as b,kr as c,Rr as d,Ee as e,Nr as f,st as g,Sr as h,_r as i,f as j,h as k,a as l,u as m,Q as n,hr as o,Re as p};
17
+ /*! Bundled license information:
18
+
19
+ @esbuild-plugins/node-globals-polyfill/Buffer.js:
20
+ (*!
21
+ * The buffer module from node.js, for the browser.
22
+ *
23
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
24
+ * @license MIT
25
+ *)
26
+ */
@@ -0,0 +1 @@
1
+ import{a as p}from"./chunk-T3CDT3YD.js";import{a as i}from"./chunk-JE27KH5P.js";import{a as o}from"./chunk-P72WBQKD.js";import{j as r,k as t,m as n}from"./chunk-2EUGHB6H.js";t();n();var a=class extends o{constructor({ir:e,config:m,formatter:c}){super(new i({ir:e,config:m}));r(this,"formatter");this.formatter=c}async generate(e){return super.generate(e)}generateSync(e){return super.generateSync(e)}createSnippetGenerator(e){return new p({context:e,formatter:this.formatter})}};export{a};
@@ -0,0 +1 @@
1
+ import{b as s,c as m}from"./chunk-P72WBQKD.js";import{j as t,k as a,m as o,p as r}from"./chunk-2EUGHB6H.js";a();o();var u=class c extends s{constructor({ir:e,config:n}){super({ir:e,config:n});t(this,"ir");t(this,"customConfig");t(this,"dynamicTypeLiteralMapper");this.ir=e,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new m({context:this})}clone(){return new c({ir:this.ir,config:this.config})}getRootClientClassReference(){return r.classReference({name:this.getRootClientClassName(),modules:[this.getRootModuleName()]})}getRootClientClassName(){return"Client"}getRootModuleName(){var e,n;return(n=(e=this.customConfig)==null?void 0:e.clientModuleName)!=null?n:this.config.organization}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}getEnvironmentTypeReferenceFromID(e){let n=this.resolveEnvironmentName(e);if(n!=null)return r.codeblock(i=>{i.writeNode(this.getEnvironmentClassReference()),i.write("::"),i.write(this.getEnumName(n))})}getEnvironmentClassReference(){return r.classReference({name:"Environment",modules:[this.getRootModuleName()]})}getEnumName(e){return this.getName(e.screamingSnakeCase.safeName)}getMethodName(e){return this.getName(e.snakeCase.safeName)}getPropertyName(e){return this.getName(e.camelCase.safeName)}getName(e){return e}};export{u as a};
@@ -0,0 +1 @@
1
+ import{a as b,b as A,c as L,d as S,j as p,k as u,m as c,n as f,o as x,p as i}from"./chunk-2EUGHB6H.js";u();c();u();c();u();c();u();c();var v=class{constructor(){p(this,"reporter");p(this,"snippet");p(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:t}){this.shouldUpdate({snippet:t,reporter:e.errors})&&(this.reporter=e.errors.clone(),this.snippet=t)}getResponseOrThrow({endpoint:e}){var t;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(t=this.err)!=null?t:new Error(`Failed to generate snippet for endpoint "${e.method} ${e.path}"`)}shouldUpdate({snippet:e,reporter:t}){var r,n;return this.reporter==null||this.reporter.size()>0&&t.size()===0?!0:e.length>((n=(r=this.snippet)==null?void 0:r.length)!=null?n:0)}};var E=class{constructor(e){p(this,"context");this.context=e}async generate(e,t={}){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new v;for(let s of r){let a=this.context.clone(),d=this.createSnippetGenerator(a);try{let l=await d.generateSnippet({endpoint:s,request:e,options:t});if(a.errors.empty())return{snippet:l,errors:void 0};n.update({context:a,snippet:l})}catch(l){n.err==null&&(n.err=l)}}return n.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e,t={}){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new v;for(let s of r){let a=this.context.clone(),d=this.createSnippetGenerator(a);try{let l=d.generateSnippetSync({endpoint:s,request:e,options:t});if(a.errors.empty())return{snippet:l,errors:void 0};n.update({context:a,snippet:l})}catch(l){n.err==null&&(n.err=l)}}return n.getResponseOrThrow({endpoint:e.endpoint})}};u();c();u();c();u();c();var g=class{constructor(){p(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let r=e.match(this.REFERENCE_REGEX);if(!(r==null||r[1]==null||r[2]==null))return{method:r[1],path:r[2]}}};u();c();var o={Critical:"CRITICAL",Warning:"WARNING"},R=class m{constructor(){p(this,"errors");p(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(A(b({},e),{path:[...this.path]}))}scope(e){this.path.push(e)}unscope(){this.path.pop()}getBySeverity(e){return this.errors.filter(t=>t.severity===e)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let e=new m;return e.errors=[...this.errors],e.path=[...this.path],e}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(e=>({severity:e.severity,path:e.path!=null?this.pathToStringArray(e.path):void 0,message:e.message}))}pathToStringArray(e){let t=[];for(let r of e){if(typeof r=="string"){t.push(r);continue}t[t.length-1]+=`[${r.index}]`}return t}};var w=class{constructor({ir:e,config:t,options:r={}}){p(this,"config");p(this,"options");p(this,"errors");p(this,"_ir");p(this,"httpEndpointReferenceParser");this._ir=e,this.config=t,this.options=r,this.errors=new R,this.httpEndpointReferenceParser=new g}associateQueryParametersByWireValue({parameters:e,values:t}){let r=[];for(let[n,s]of Object.entries(t)){this.errors.scope(n);try{let a=e.find(l=>l.name.wireValue===n);if(a==null)throw this.newParameterNotRecognizedError(n);let d=this.isListTypeReference(a.typeReference)&&!Array.isArray(s)?[s]:s;r.push({name:a.name,typeReference:a.typeReference,value:d})}finally{this.errors.unscope()}}return r}associateByWireValue({parameters:e,values:t,ignoreMissingParameters:r}){let n=[];for(let[s,a]of Object.entries(t)){this.errors.scope(s);try{let d=e.find(l=>l.name.wireValue===s);if(d==null){if(r)continue;this.errors.add({severity:o.Critical,message:this.newParameterNotRecognizedError(s).message});continue}n.push({name:d.name,typeReference:d.typeReference,value:a})}finally{this.errors.unscope()}}return n}getSingleFileValue({property:e,record:t}){let r=t[e.wireValue];if(r!=null){if(typeof r!="string"){this.errors.add({severity:o.Critical,message:`Expected file value to be a string, got ${typeof r}`});return}return r}}getFileArrayValues({property:e,record:t}){let r=t[e.wireValue];if(r==null)return;if(!Array.isArray(r)){this.errors.add({severity:o.Critical,message:`Expected file array value to be an array of strings, got ${typeof r}`});return}let n=[];for(let s of r){if(typeof s!="string"){this.errors.add({severity:o.Critical,message:`Expected file array value to be an array of strings, got ${typeof s}`});return}n.push(s)}return n}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:o.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(e)?"array":typeof e}`});return}return e==null?{}:e}resolveNamedType({typeId:e}){let t=this._ir.types[e];if(t==null){this.errors.add({severity:o.Critical,message:`Type identified by "${e}" could not be found`});return}return t}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:t}){let r=this.getRecord(t);if(r==null)return;let n=e.discriminant.wireValue,s=r[n];if(s==null){this.errors.add({severity:o.Critical,message:this.newParameterNotRecognizedError(n).message});return}if(typeof s!="string"){this.errors.add({severity:o.Critical,message:`Expected discriminant value to be a string but got: ${typeof s}`});return}let a=e.types[s];if(a==null){this.errors.add({severity:o.Critical,message:`No type found for discriminant value "${s}"`});return}let T=r,{[n]:d}=T,l=S(T,[L(n)]);return{singleDiscriminatedUnionType:a,discriminantValue:a.discriminantValue,value:l}}resolveEndpointOrThrow(e){let t=this.httpEndpointReferenceParser.tryParse(e);if(t==null)throw new Error(`Failed to parse endpoint reference "${e}"`);return this.resolveEndpointLocationOrThrow(t)}resolveEndpointLocationOrThrow(e){let t=[];for(let r of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:r,parsedEndpoint:e})&&t.push(r);if(t.length===0)throw new Error(`Failed to find endpoint identified by "${e.method} ${e.path}"`);return t}needsRequestParameter({request:e,inlinePathParameters:t,inlineFileProperties:r}){var n;return this.includePathParametersInWrappedRequest({request:e,inlinePathParameters:t})||e.queryParameters!=null&&e.queryParameters.length>0||e.headers!=null&&e.headers.length>0?!0:e.body!=null?this.includeRequestBodyInWrappedRequest({body:e.body,inlineFileProperties:r}):!((n=e.metadata)!=null&&n.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:t}){var r,n;return t&&((n=(r=e.metadata)==null?void 0:r.includePathParameters)!=null?n:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:f(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let t=this._ir.environments.environments;switch(t.type){case"singleBaseUrl":{let r=t.environments.find(n=>n.id===e);return r==null?void 0:r.name}case"multipleBaseUrls":{let r=t.environments.find(n=>n.id===e);return r==null?void 0:r.name}default:f(t)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:o.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let t=this._ir.environments.environments;switch(t.type){case"singleBaseUrl":return this.errors.add({severity:o.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let r=t.environments[0];if(r==null)return this.errors.add({severity:o.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let n=new Set(x(r.urls));for(let s of x(e))n.has(s)&&n.delete(s);return n.size>0?(this.errors.add({severity:o.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${x(r.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:o.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:o.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:o.Critical,message:this.newTypeMismatchError({expected:"string",value:e}).message});return}return e}isOptional(e){switch(e.type){case"nullable":return this.isOptional(e.value);case"optional":return!0;case"named":{let t=this.resolveNamedType({typeId:e.value});return t==null?!1:t.type==="alias"?this.isNullable(t.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let t=this.resolveNamedType({typeId:e.value});return t==null?!1:t.type==="alias"?this.isNullable(t.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:t}){return new Error(`Expected auth type ${e.type}, got ${t.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:t}){return new Error(`Expected ${e}, got ${typeof t}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:t}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:t});default:f(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:t}){return this.fileUploadHasBodyProperties({fileUpload:e})||t&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(t=>{switch(t.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:f(t)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(t=>{switch(t.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:f(t)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:t}){return e.location.method===t.method&&e.location.path===t.path}};var N=class{constructor({context:e}){p(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?i.TypeLiteral.nil():(this.context.errors.add({severity:o.Critical,message:"Expected non-null value, but got null"}),i.TypeLiteral.nop());if(e.value===void 0)return i.TypeLiteral.nop();switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return this.convertLiteral({literalType:e.typeReference.value,value:e.value});case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let t=this.context.resolveNamedType({typeId:e.typeReference.value});return t==null?i.TypeLiteral.nop():this.convertNamed({named:t,value:e.value,as:e.as})}case"optional":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"nullable":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"primitive":return this.convertPrimitive({primitive:e.typeReference.value,value:e.value,as:e.as});case"set":return this.convertSet({set:e.typeReference.value,value:e.value});case"unknown":return i.TypeLiteral.nop();default:f(e.typeReference)}}convertLiteral({literalType:e,value:t}){switch(e.type){case"boolean":{let r=this.context.getValueAsBoolean({value:t});return r==null?i.TypeLiteral.nop():i.TypeLiteral.boolean(r)}case"string":{let r=this.context.getValueAsString({value:t});return r==null?i.TypeLiteral.nop():i.TypeLiteral.string(r)}default:f(e)}}convertList({list:e,value:t}){return Array.isArray(t)?i.TypeLiteral.list(t.map((r,n)=>{this.context.errors.scope({index:n});try{return this.convert({typeReference:e,value:r})}finally{this.context.errors.unscope()}})):(this.context.errors.add({severity:o.Critical,message:`Expected array but got: ${typeof t}`}),i.TypeLiteral.nop())}convertSet({set:e,value:t}){return Array.isArray(t)?i.TypeLiteral.set(t.map((r,n)=>{this.context.errors.scope({index:n});try{return this.convert({typeReference:e,value:r})}finally{this.context.errors.unscope()}})):(this.context.errors.add({severity:o.Critical,message:`Expected array but got: ${typeof t}`}),i.TypeLiteral.nop())}convertMap({map:e,value:t}){return typeof t!="object"||t==null?(this.context.errors.add({severity:o.Critical,message:`Expected object but got: ${t==null?"null":typeof t}`}),i.TypeLiteral.nop()):i.TypeLiteral.hash(Object.entries(t).map(([r,n])=>{this.context.errors.scope(r);try{return{key:this.convert({typeReference:e.key,value:r,as:"key"}),value:this.convert({typeReference:e.value,value:n})}}finally{this.context.errors.unscope()}}))}convertNamed({named:e,value:t,as:r}){switch(e.type){case"alias":return this.convert({typeReference:e.typeReference,value:t,as:r});case"discriminatedUnion":return i.TypeLiteral.nop();case"object":return this.convertObject({object:e,value:t});case"enum":return i.TypeLiteral.nop();case"undiscriminatedUnion":return i.TypeLiteral.nop();default:f(e)}}convertPrimitive({primitive:e,value:t,as:r}){switch(e){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let n=this.getValueAsNumber({value:t,as:r});return n==null?i.TypeLiteral.nop():i.TypeLiteral.integer(n)}case"FLOAT":case"DOUBLE":{let n=this.getValueAsNumber({value:t});return n==null?i.TypeLiteral.nop():i.TypeLiteral.float(n)}case"BOOLEAN":{let n=this.getValueAsBoolean({value:t,as:r});return n==null?i.TypeLiteral.nop():i.TypeLiteral.boolean(n)}case"BASE_64":case"BIG_INTEGER":case"STRING":{let n=this.context.getValueAsString({value:t});return n==null?i.TypeLiteral.nop():i.TypeLiteral.string(n)}case"UUID":{let n=this.context.getValueAsString({value:t});return n==null?i.TypeLiteral.nop():i.TypeLiteral.string(n)}case"DATE":{let n=this.context.getValueAsString({value:t});return n==null?i.TypeLiteral.nop():i.TypeLiteral.string(n)}case"DATE_TIME":{let n=this.context.getValueAsString({value:t});return n==null?i.TypeLiteral.nop():i.TypeLiteral.string(n)}default:f(e)}}convertObject({object:e,value:t}){return typeof t!="object"||t==null?(this.context.errors.add({severity:o.Critical,message:`Expected object but got: ${t==null?"null":typeof t}`}),i.TypeLiteral.nop()):i.TypeLiteral.hash(Object.entries(t).map(([r,n])=>{var l;this.context.errors.scope(r);let s=e.properties.find(T=>T.name.wireValue===r),a=(l=s==null?void 0:s.typeReference)!=null?l:{type:"unknown"},d={key:i.TypeLiteral.string(r),value:this.convert({typeReference:a,value:n})};return this.context.errors.unscope(),d}))}getValueAsNumber({value:e,as:t}){let r=t==="key"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:r})}getValueAsBoolean({value:e,as:t}){let r=t==="key"?typeof e=="string"?e==="true":!!e:e;return this.context.getValueAsBoolean({value:r})}};export{E as a,w as b,N as c};
@@ -0,0 +1 @@
1
+ import{j as u,k as d,m,n as o,p as n}from"./chunk-2EUGHB6H.js";d();m();var c="client",y=class{constructor({context:e,formatter:t}){u(this,"context");u(this,"formatter");this.context=e,this.formatter=t}async generateSnippet({endpoint:e,request:t}){var a;return await this.buildCodeBlock({endpoint:e,snippet:t}).toStringAsync({customConfig:(a=this.context.customConfig)!=null?a:{},formatter:this.formatter})}generateSnippetSync({endpoint:e,request:t}){var a;return this.buildCodeBlock({endpoint:e,snippet:t}).toString({customConfig:(a=this.context.customConfig)!=null?a:{},formatter:this.formatter})}buildCodeBlock({endpoint:e,snippet:t}){return n.codeblock(r=>{r.writeNodeStatement(this.constructClient({endpoint:e,snippet:t})),r.newLine(),r.writeNodeStatement(this.callMethod({endpoint:e,snippet:t}))})}constructClient({endpoint:e,snippet:t}){return n.codeblock(r=>{r.addRequire(this.context.getRootModuleName());let a=this.context.getRootClientClassReference(),s=this.getRootClientBuilderArgs({endpoint:e,snippet:t});r.write(`${c} = `),r.writeNode(n.instantiateClass({classReference:a,arguments_:s}))})}getRootClientBaseUrlArg({baseUrl:e,environment:t}){if(e!=null&&t!=null)return this.context.errors.add({severity:"CRITICAL",message:"Cannot specify both baseUrl and environment options"}),[];if(e!=null)return[n.keywordArgument({name:"base_url",value:n.TypeLiteral.string(e)})];if(t!=null){if(this.context.isSingleEnvironmentID(t)){let r=this.context.getEnvironmentTypeReferenceFromID(t);return r==null?(this.context.errors.add({severity:"CRITICAL",message:`Environment ID ${t} not found`}),[]):[n.keywordArgument({name:"environment",value:r})]}if(this.context.isMultiEnvironmentValues(t))return this.context.errors.add({severity:"CRITICAL",message:"Multi-environment values are not supported in Ruby snippets yet"}),[]}return[]}getRootClientAuthArgs({auth:e,values:t}){switch(e.type){case"basic":return t.type!=="basic"?(this.context.errors.add({severity:"CRITICAL",message:this.context.newAuthMismatchError({auth:e,values:t}).message}),[]):this.getRootClientBasicAuthArgs({auth:e,values:t});case"bearer":return t.type!=="bearer"?(this.context.errors.add({severity:"CRITICAL",message:this.context.newAuthMismatchError({auth:e,values:t}).message}),[]):this.getRootClientBearerAuthArgs({auth:e,values:t});case"header":return t.type!=="header"?(this.context.errors.add({severity:"CRITICAL",message:this.context.newAuthMismatchError({auth:e,values:t}).message}),[]):this.getRootClientHeaderAuthArgs({auth:e,values:t});case"oauth":return t.type!=="oauth"?(this.context.errors.add({severity:"CRITICAL",message:this.context.newAuthMismatchError({auth:e,values:t}).message}),[]):this.getRootClientOAuthArgs({auth:e,values:t});default:return[]}}getRootClientBasicAuthArgs({auth:e,values:t}){return[n.keywordArgument({name:e.username.snakeCase.safeName,value:n.TypeLiteral.string(t.username)}),n.keywordArgument({name:e.password.snakeCase.safeName,value:n.TypeLiteral.string(t.password)})]}getRootClientBearerAuthArgs({auth:e,values:t}){return[n.keywordArgument({name:e.token.snakeCase.safeName,value:n.TypeLiteral.string(t.token)})]}getRootClientHeaderAuthArgs({auth:e,values:t}){return[n.keywordArgument({name:e.header.name.name.snakeCase.safeName,value:n.TypeLiteral.string(t.value)})]}getRootClientOAuthArgs({auth:e,values:t}){return[n.keywordArgument({name:e.clientId.snakeCase.safeName,value:n.TypeLiteral.string(t.clientId)}),n.keywordArgument({name:e.clientSecret.snakeCase.safeName,value:n.TypeLiteral.string(t.clientSecret)})]}getRootClientHeaderArgs({headers:e,values:t}){let r=[];for(let a of e){let s=t[a.name.name.originalName];s!=null&&typeof s=="string"&&r.push(n.keywordArgument({name:a.name.name.snakeCase.safeName,value:n.TypeLiteral.string(s)}))}return r}getRootClientBuilderArgs({endpoint:e,snippet:t}){let r=[];e.auth!=null&&(t.auth!=null?r.push(...this.getRootClientAuthArgs({auth:e.auth,values:t.auth})):this.context.errors.add({severity:"WARNING",message:`Auth with ${e.auth.type} configuration is required for this endpoint`}));let a=this.getRootClientBaseUrlArg({baseUrl:t.baseURL,environment:t.environment});return a.length>0&&r.push(...a),this.context.errors.scope("Headers"),this.context.ir.headers!=null&&t.headers!=null&&r.push(...this.getRootClientHeaderArgs({headers:this.context.ir.headers,values:t.headers})),this.context.errors.unscope(),r}callMethod({endpoint:e,snippet:t}){return n.invokeMethod({on:n.codeblock(c),method:this.getMethod({endpoint:e}),arguments_:this.getMethodArgs({endpoint:e,snippet:t})})}getMethodArgs({endpoint:e,snippet:t}){switch(e.request.type){case"inlined":return[this.getMethodArgsForInlinedRequest({request:e.request,snippet:t})];case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:t});default:o(e.request)}}getMethodArgsForInlinedRequest({request:e,snippet:t}){let r=[];if(r.push(...this.getNamedParameterArgs({kind:"PathParameters",namedParameters:e.pathParameters,values:t.pathParameters})),r.push(...this.getNamedParameterArgs({kind:"QueryParameters",namedParameters:e.queryParameters,values:t.queryParameters})),r.push(...this.getNamedParameterArgs({kind:"Headers",namedParameters:e.headers,values:t.headers})),e.body!=null)switch(e.body.type){case"properties":r.push(...this.getMethodArgsForPropertiesRequest({request:e.body,snippet:t}));break;case"referenced":case"fileUpload":break;default:o(e.body)}return n.TypeLiteral.hash(r.map(a=>({key:n.TypeLiteral.string(a.name),value:a.value})))}getNamedParameterArgs({kind:e,namedParameters:t,values:r}){let a=[];if(this.context.errors.scope(e),t!=null){let s=this.context.associateByWireValue({parameters:t,values:r!=null?r:{},ignoreMissingParameters:!0});for(let i of s)a.push(n.keywordArgument({name:this.context.getPropertyName(i.name.name),value:this.context.dynamicTypeLiteralMapper.convert(i)}))}return this.context.errors.unscope(),a}getMethodArgsForPropertiesRequest({request:e,snippet:t}){var s;let r=[],a=this.context.associateByWireValue({parameters:e.value,values:(s=this.context.getRecord(t.requestBody))!=null?s:{}});for(let i of a)r.push(n.keywordArgument({name:this.context.getPropertyName(i.name.name),value:this.context.dynamicTypeLiteralMapper.convert(i)}));return r}getMethodArgsForBodyRequest({request:e,snippet:t}){if(e.body==null)return[];switch(e.body.type){case"bytes":return this.context.errors.add({severity:"CRITICAL",message:"Multi-environment values are not supported in Ruby snippets yet"}),[];case"typeReference":return[n.positionalArgument({value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.body.value,value:this.context.getRecord(t.requestBody)})})];default:o(e.body)}}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(t=>`${this.context.getMethodName(t)}`).join(".")}.${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}};export{y as a};
@@ -0,0 +1,4 @@
1
+ import '@fern-api/browser-compatible-base-generator';
2
+ import '@fern-api/dynamic-ir-sdk';
3
+ import '@fern-api/ruby-ast';
4
+ export { D as DynamicSnippetsGeneratorContext } from '../DynamicSnippetsGeneratorContext-BGmCyT7y.js';
@@ -0,0 +1 @@
1
+ import{a}from"../chunk-JE27KH5P.js";import"../chunk-P72WBQKD.js";import"../chunk-2EUGHB6H.js";export{a as DynamicSnippetsGeneratorContext};
@@ -0,0 +1,4 @@
1
+ import '@fern-api/dynamic-ir-sdk';
2
+ import '@fern-api/ruby-ast';
3
+ export { a as DynamicTypeLiteralMapper } from '../DynamicSnippetsGeneratorContext-BGmCyT7y.js';
4
+ import '@fern-api/browser-compatible-base-generator';
@@ -0,0 +1 @@
1
+ import{c as a}from"../chunk-P72WBQKD.js";import"../chunk-2EUGHB6H.js";export{a as DynamicTypeLiteralMapper};
package/esm/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export { DynamicSnippetsGenerator } from './DynamicSnippetsGenerator.js';
2
+ import '@fern-api/browser-compatible-base-generator';
3
+ import '@fern-api/dynamic-ir-sdk';
4
+ import './EndpointSnippetGenerator.js';
5
+ import './DynamicSnippetsGeneratorContext-BGmCyT7y.js';
6
+ import '@fern-api/ruby-ast';
package/esm/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import{a as _a}from"./chunk-5MYTC5XX.js";import"./chunk-T3CDT3YD.js";import"./chunk-JE27KH5P.js";import"./chunk-P72WBQKD.js";import{e as pe,f as p,g as Ra,h as Da,i as Na,k as o,l as s,m as i}from"./chunk-2EUGHB6H.js";var ce=p((ep,Ot)=>{"use strict";o();i();Ot.exports=Object});var xt=p((op,qt)=>{"use strict";o();i();qt.exports=Error});var $t=p((up,Pt)=>{"use strict";o();i();Pt.exports=EvalError});var Tt=p((lp,Et)=>{"use strict";o();i();Et.exports=RangeError});var Ft=p((yp,It)=>{"use strict";o();i();It.exports=ReferenceError});var ye=p((dp,Rt)=>{"use strict";o();i();Rt.exports=SyntaxError});var w=p((Sp,Dt)=>{"use strict";o();i();Dt.exports=TypeError});var _t=p((Ap,Nt)=>{"use strict";o();i();Nt.exports=URIError});var ve=p((xp,Bt)=>{"use strict";o();i();Bt.exports=Math.abs});var ge=p((Ep,Mt)=>{"use strict";o();i();Mt.exports=Math.floor});var Ut=p((Fp,Ct)=>{"use strict";o();i();Ct.exports=Math.max});var de=p((Np,Wt)=>{"use strict";o();i();Wt.exports=Math.min});var Gt=p((Mp,Lt)=>{"use strict";o();i();Lt.exports=Math.pow});var zt=p((Wp,kt)=>{"use strict";o();i();kt.exports=Math.round});var $r=p((kp,jt)=>{"use strict";o();i();jt.exports=Number.isNaN||function(r){return r!==r}});var Jt=p((Hp,Ht)=>{"use strict";o();i();var Ba=$r();Ht.exports=function(r){return Ba(r)||r===0?r:r<0?-1:1}});var Qt=p((Qp,Kt)=>{"use strict";o();i();Kt.exports=Object.getOwnPropertyDescriptor});var K=p((Zp,Yt)=>{"use strict";o();i();var Er=Qt();if(Er)try{Er([],"length")}catch(e){Er=null}Yt.exports=Er});var ur=p((ec,Xt)=>{"use strict";o();i();var Tr=Object.defineProperty||!1;if(Tr)try{Tr({},"a",{value:1})}catch(e){Tr=!1}Xt.exports=Tr});var he=p((oc,Zt)=>{"use strict";o();i();Zt.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;r[t]=a;for(var u in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var f=Object.getOwnPropertySymbols(r);if(f.length!==1||f[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var y=Object.getOwnPropertyDescriptor(r,t);if(y.value!==a||y.enumerable!==!0)return!1}return!0}});var me=p((uc,rn)=>{"use strict";o();i();var Vt=typeof Symbol!="undefined"&&Symbol,Ma=he();rn.exports=function(){return typeof Vt!="function"||typeof Symbol!="function"||typeof Vt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ma()}});var Se=p((lc,en)=>{"use strict";o();i();en.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var be=p((yc,tn)=>{"use strict";o();i();var Ca=ce();tn.exports=Ca.getPrototypeOf||null});var an=p((dc,on)=>{"use strict";o();i();var Ua="Function.prototype.bind called on incompatible ",Wa=Object.prototype.toString,La=Math.max,Ga="[object Function]",nn=function(r,t){for(var n=[],a=0;a<r.length;a+=1)n[a]=r[a];for(var u=0;u<t.length;u+=1)n[u+r.length]=t[u];return n},ka=function(r,t){for(var n=[],a=t||0,u=0;a<r.length;a+=1,u+=1)n[u]=r[a];return n},za=function(e,r){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=r);return t};on.exports=function(r){var t=this;if(typeof t!="function"||Wa.apply(t)!==Ga)throw new TypeError(Ua+t);for(var n=ka(arguments,1),a,u=function(){if(this instanceof a){var g=t.apply(this,nn(n,arguments));return Object(g)===g?g:this}return t.apply(r,nn(n,arguments))},f=La(0,t.length-n.length),y=[],c=0;c<f;c++)y[c]="$"+c;if(a=Function("binder","return function ("+za(y,",")+"){ return binder.apply(this,arguments); }")(u),t.prototype){var m=function(){};m.prototype=t.prototype,a.prototype=new m,m.prototype=null}return a}});var Q=p((Sc,un)=>{"use strict";o();i();var ja=an();un.exports=Function.prototype.bind||ja});var Ir=p((Ac,sn)=>{"use strict";o();i();sn.exports=Function.prototype.call});var Fr=p((xc,fn)=>{"use strict";o();i();fn.exports=Function.prototype.apply});var pn=p((Ec,ln)=>{"use strict";o();i();ln.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var we=p((Fc,cn)=>{"use strict";o();i();var Ha=Q(),Ja=Fr(),Ka=Ir(),Qa=pn();cn.exports=Qa||Ha.call(Ka,Ja)});var Rr=p((Nc,yn)=>{"use strict";o();i();var Ya=Q(),Xa=w(),Za=Ir(),Va=we();yn.exports=function(r){if(r.length<1||typeof r[0]!="function")throw new Xa("a function is required");return Va(Ya,Za,r)}});var Sn=p((Mc,mn)=>{"use strict";o();i();var ru=Rr(),vn=K(),dn;try{dn=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ae=!!dn&&vn&&vn(Object.prototype,"__proto__"),hn=Object,gn=hn.getPrototypeOf;mn.exports=Ae&&typeof Ae.get=="function"?ru([Ae.get]):typeof gn=="function"?function(r){return gn(r==null?r:hn(r))}:!1});var qn=p((Wc,On)=>{"use strict";o();i();var bn=Se(),wn=be(),An=Sn();On.exports=bn?function(r){return bn(r)}:wn?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return wn(r)}:An?function(r){return An(r)}:null});var Oe=p((kc,xn)=>{"use strict";o();i();var eu=Function.prototype.call,tu=Object.prototype.hasOwnProperty,nu=Q();xn.exports=nu.call(eu,tu)});var F=p((Hc,Fn)=>{"use strict";o();i();var d,ou=ce(),iu=xt(),au=$t(),uu=Tt(),su=Ft(),V=ye(),Z=w(),fu=_t(),lu=ve(),pu=ge(),cu=Ut(),yu=de(),vu=Gt(),gu=zt(),du=Jt(),Tn=Function,qe=function(e){try{return Tn('"use strict"; return ('+e+").constructor;")()}catch(r){}},sr=K(),hu=ur(),xe=function(){throw new Z},mu=sr?function(){try{return arguments.callee,xe}catch(e){try{return sr(arguments,"callee").get}catch(r){return xe}}}():xe,Y=me()(),b=qn(),Su=be(),bu=Se(),In=Fr(),fr=Ir(),X={},wu=typeof Uint8Array=="undefined"||!b?d:b(Uint8Array),L={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?d:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?d:ArrayBuffer,"%ArrayIteratorPrototype%":Y&&b?b([][Symbol.iterator]()):d,"%AsyncFromSyncIteratorPrototype%":d,"%AsyncFunction%":X,"%AsyncGenerator%":X,"%AsyncGeneratorFunction%":X,"%AsyncIteratorPrototype%":X,"%Atomics%":typeof Atomics=="undefined"?d:Atomics,"%BigInt%":typeof BigInt=="undefined"?d:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?d:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?d:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?d:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":iu,"%eval%":eval,"%EvalError%":au,"%Float16Array%":typeof Float16Array=="undefined"?d:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?d:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?d:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?d:FinalizationRegistry,"%Function%":Tn,"%GeneratorFunction%":X,"%Int8Array%":typeof Int8Array=="undefined"?d:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?d:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?d:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Y&&b?b(b([][Symbol.iterator]())):d,"%JSON%":typeof JSON=="object"?JSON:d,"%Map%":typeof Map=="undefined"?d:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Y||!b?d:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ou,"%Object.getOwnPropertyDescriptor%":sr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?d:Promise,"%Proxy%":typeof Proxy=="undefined"?d:Proxy,"%RangeError%":uu,"%ReferenceError%":su,"%Reflect%":typeof Reflect=="undefined"?d:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?d:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Y||!b?d:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?d:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Y&&b?b(""[Symbol.iterator]()):d,"%Symbol%":Y?Symbol:d,"%SyntaxError%":V,"%ThrowTypeError%":mu,"%TypedArray%":wu,"%TypeError%":Z,"%Uint8Array%":typeof Uint8Array=="undefined"?d:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?d:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?d:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?d:Uint32Array,"%URIError%":fu,"%WeakMap%":typeof WeakMap=="undefined"?d:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?d:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?d:WeakSet,"%Function.prototype.call%":fr,"%Function.prototype.apply%":In,"%Object.defineProperty%":hu,"%Object.getPrototypeOf%":Su,"%Math.abs%":lu,"%Math.floor%":pu,"%Math.max%":cu,"%Math.min%":yu,"%Math.pow%":vu,"%Math.round%":gu,"%Math.sign%":du,"%Reflect.getPrototypeOf%":bu};if(b)try{null.error}catch(e){Pn=b(b(e)),L["%Error.prototype%"]=Pn}var Pn,Au=function e(r){var t;if(r==="%AsyncFunction%")t=qe("async function () {}");else if(r==="%GeneratorFunction%")t=qe("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=qe("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&b&&(t=b(a.prototype))}return L[r]=t,t},$n={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},lr=Q(),Dr=Oe(),Ou=lr.call(fr,Array.prototype.concat),qu=lr.call(In,Array.prototype.splice),En=lr.call(fr,String.prototype.replace),Nr=lr.call(fr,String.prototype.slice),xu=lr.call(fr,RegExp.prototype.exec),Pu=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$u=/\\(\\)?/g,Eu=function(r){var t=Nr(r,0,1),n=Nr(r,-1);if(t==="%"&&n!=="%")throw new V("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new V("invalid intrinsic syntax, expected opening `%`");var a=[];return En(r,Pu,function(u,f,y,c){a[a.length]=y?En(c,$u,"$1"):f||u}),a},Tu=function(r,t){var n=r,a;if(Dr($n,n)&&(a=$n[n],n="%"+a[0]+"%"),Dr(L,n)){var u=L[n];if(u===X&&(u=Au(n)),typeof u=="undefined"&&!t)throw new Z("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:u}}throw new V("intrinsic "+r+" does not exist!")};Fn.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new Z("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Z('"allowMissing" argument must be a boolean');if(xu(/^%?[^%]*%?$/,r)===null)throw new V("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Eu(r),a=n.length>0?n[0]:"",u=Tu("%"+a+"%",t),f=u.name,y=u.value,c=!1,m=u.alias;m&&(a=m[0],qu(n,Ou([0,1],m)));for(var g=1,h=!0;g<n.length;g+=1){var v=n[g],A=Nr(v,0,1),q=Nr(v,-1);if((A==='"'||A==="'"||A==="`"||q==='"'||q==="'"||q==="`")&&A!==q)throw new V("property names with quotes must have matching quotes");if((v==="constructor"||!h)&&(c=!0),a+="."+v,f="%"+a+"%",Dr(L,f))y=L[f];else if(y!=null){if(!(v in y)){if(!t)throw new Z("base intrinsic for "+r+" exists, but the property is not available.");return}if(sr&&g+1>=n.length){var S=sr(y,v);h=!!S,h&&"get"in S&&!("originalValue"in S.get)?y=S.get:y=y[v]}else h=Dr(y,v),y=y[v];h&&!c&&(L[f]=y)}}return y}});var _r=p((Qc,Nn)=>{"use strict";o();i();var Rn=ur(),Iu=ye(),rr=w(),Dn=K();Nn.exports=function(r,t,n){if(!r||typeof r!="object"&&typeof r!="function")throw new rr("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new rr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new rr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new rr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new rr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new rr("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,y=arguments.length>6?arguments[6]:!1,c=!!Dn&&Dn(r,t);if(Rn)Rn(r,t,{configurable:f===null&&c?c.configurable:!f,enumerable:a===null&&c?c.enumerable:!a,value:n,writable:u===null&&c?c.writable:!u});else if(y||!a&&!u&&!f)r[t]=n;else throw new Iu("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Br=p((Zc,Bn)=>{"use strict";o();i();var Pe=ur(),_n=function(){return!!Pe};_n.hasArrayLengthDefineBug=function(){if(!Pe)return null;try{return Pe([],"length",{value:1}).length!==1}catch(r){return!0}};Bn.exports=_n});var Ln=p((ey,Wn)=>{"use strict";o();i();var Fu=F(),Mn=_r(),Ru=Br()(),Cn=K(),Un=w(),Du=Fu("%Math.floor%");Wn.exports=function(r,t){if(typeof r!="function")throw new Un("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||Du(t)!==t)throw new Un("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],a=!0,u=!0;if("length"in r&&Cn){var f=Cn(r,"length");f&&!f.configurable&&(a=!1),f&&!f.writable&&(u=!1)}return(a||u||!n)&&(Ru?Mn(r,"length",t,!0,!0):Mn(r,"length",t)),r}});var kn=p((oy,Gn)=>{"use strict";o();i();var Nu=Q(),_u=Fr(),Bu=we();Gn.exports=function(){return Bu(Nu,_u,arguments)}});var Cr=p((uy,Mr)=>{"use strict";o();i();var Mu=Ln(),zn=ur(),Cu=Rr(),jn=kn();Mr.exports=function(r){var t=Cu(arguments),n=r.length-(arguments.length-1);return Mu(t,1+(n>0?n:0),!0)};zn?zn(Mr.exports,"apply",{value:jn}):Mr.exports.apply=jn});var $e=p((ly,Jn)=>{"use strict";o();i();var Hn=Object.prototype.toString;Jn.exports=function(r){var t=Hn.call(r),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&Hn.call(r.callee)==="[object Function]"),n}});var to=p((yy,eo)=>{"use strict";o();i();var ro;Object.keys||(pr=Object.prototype.hasOwnProperty,Ee=Object.prototype.toString,Kn=$e(),Te=Object.prototype.propertyIsEnumerable,Qn=!Te.call({toString:null},"toString"),Yn=Te.call(function(){},"prototype"),cr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ur=function(e){var r=e.constructor;return r&&r.prototype===e},Xn={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Zn=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!Xn["$"+e]&&pr.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{Ur(window[e])}catch(r){return!0}}catch(r){return!0}return!1}(),Vn=function(e){if(typeof window=="undefined"||!Zn)return Ur(e);try{return Ur(e)}catch(r){return!1}},ro=function(r){var t=r!==null&&typeof r=="object",n=Ee.call(r)==="[object Function]",a=Kn(r),u=t&&Ee.call(r)==="[object String]",f=[];if(!t&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var y=Yn&&n;if(u&&r.length>0&&!pr.call(r,0))for(var c=0;c<r.length;++c)f.push(String(c));if(a&&r.length>0)for(var m=0;m<r.length;++m)f.push(String(m));else for(var g in r)!(y&&g==="prototype")&&pr.call(r,g)&&f.push(String(g));if(Qn)for(var h=Vn(r),v=0;v<cr.length;++v)!(h&&cr[v]==="constructor")&&pr.call(r,cr[v])&&f.push(cr[v]);return f});var pr,Ee,Kn,Te,Qn,Yn,cr,Ur,Xn,Zn,Vn;eo.exports=ro});var ao=p((dy,io)=>{"use strict";o();i();var Uu=Array.prototype.slice,Wu=$e(),no=Object.keys,Wr=no?function(r){return no(r)}:to(),oo=Object.keys;Wr.shim=function(){if(Object.keys){var r=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);r||(Object.keys=function(n){return Wu(n)?oo(Uu.call(n)):oo(n)})}else Object.keys=Wr;return Object.keys||Wr};io.exports=Wr});var Lr=p((Sy,lo)=>{"use strict";o();i();var Lu=ao(),Gu=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",ku=Object.prototype.toString,zu=Array.prototype.concat,uo=_r(),ju=function(e){return typeof e=="function"&&ku.call(e)==="[object Function]"},so=Br()(),Hu=function(e,r,t,n){if(r in e){if(n===!0){if(e[r]===t)return}else if(!ju(n)||!n())return}so?uo(e,r,t,!0):uo(e,r,t)},fo=function(e,r){var t=arguments.length>2?arguments[2]:{},n=Lu(r);Gu&&(n=zu.call(n,Object.getOwnPropertySymbols(r)));for(var a=0;a<n.length;a+=1)Hu(e,n[a],r[n[a]],t[n[a]])};fo.supportsDescriptors=!!so;lo.exports=fo});var P=p((Ay,yo)=>{"use strict";o();i();var po=F(),co=Rr(),Ju=co([po("%String.prototype.indexOf%")]);yo.exports=function(r,t){var n=po(r,!!t);return typeof n=="function"&&Ju(r,".prototype.")>-1?co([n]):n}});var ho=p((xy,go)=>{"use strict";o();i();var Ku=F(),vo=Ku("%Array%"),Qu=!vo.isArray&&P()("Object.prototype.toString");go.exports=vo.isArray||function(r){return Qu(r)==="[object Array]"}});var Ie=p((Ey,mo)=>{"use strict";o();i();mo.exports=ho()});var bo=p((Fy,So)=>{"use strict";o();i();var Yu=F(),Xu=P(),Zu=w(),Vu=Ie(),rs=Yu("%Reflect.apply%",!0)||Xu("Function.prototype.apply");So.exports=function(r,t){var n=arguments.length>2?arguments[2]:[];if(!Vu(n))throw new Zu("Assertion failed: optional `argumentsList`, if provided, must be a List");return rs(r,t,n)}});function wo(){throw new Error("setTimeout has not been defined")}function Ao(){throw new Error("clearTimeout has not been defined")}function Oo(e){if(B===setTimeout)return setTimeout(e,0);if((B===wo||!B)&&setTimeout)return B=setTimeout,setTimeout(e,0);try{return B(e,0)}catch(r){try{return B.call(null,e,0)}catch(t){return B.call(this,e,0)}}}function es(e){if(M===clearTimeout)return clearTimeout(e);if((M===Ao||!M)&&clearTimeout)return M=clearTimeout,clearTimeout(e);try{return M(e)}catch(r){try{return M.call(null,e)}catch(t){return M.call(this,e)}}}function ts(){!tr||!G||(tr=!1,G.length?R=G.concat(R):Gr=-1,R.length&&qo())}function qo(){if(!tr){var e=Oo(ts);tr=!0;for(var r=R.length;r;){for(G=R,R=[];++Gr<r;)G&&G[Gr].run();Gr=-1,r=R.length}G=null,tr=!1,es(e)}}function ns(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];R.push(new xo(e,r)),R.length===1&&!tr&&Oo(qo)}function xo(e,r){this.fun=e,this.array=r}function k(){}function bs(e){throw new Error("process.binding is not supported")}function ws(){return"/"}function As(e){throw new Error("process.chdir is not supported")}function Os(){return 0}function xs(e){var r=qs.call(er)*.001,t=Math.floor(r),n=Math.floor(r%1*1e9);return e&&(t=t-e[0],n=n-e[1],n<0&&(t--,n+=1e9)),[t,n]}function $s(){var e=new Date,r=e-Ps;return r/1e3}var B,M,R,tr,G,Gr,os,is,as,us,ss,fs,ls,ps,cs,ys,vs,gs,ds,hs,ms,Ss,er,qs,Ps,Es,yr,Po=pe(()=>{"use strict";o();i();B=wo,M=Ao;typeof globalThis.setTimeout=="function"&&(B=setTimeout);typeof globalThis.clearTimeout=="function"&&(M=clearTimeout);R=[],tr=!1,Gr=-1;xo.prototype.run=function(){this.fun.apply(null,this.array)};os="browser",is="browser",as=!0,us={},ss=[],fs="",ls={},ps={},cs={};ys=k,vs=k,gs=k,ds=k,hs=k,ms=k,Ss=k;er=globalThis.performance||{},qs=er.now||er.mozNow||er.msNow||er.oNow||er.webkitNow||function(){return new Date().getTime()};Ps=new Date;Es={nextTick:ns,title:os,browser:as,env:us,argv:ss,version:fs,versions:ls,on:ys,addListener:vs,once:gs,off:ds,removeListener:hs,removeAllListeners:ms,emit:Ss,binding:bs,cwd:ws,chdir:As,umask:Os,hrtime:xs,platform:is,release:ps,config:cs,uptime:$s},yr=Es});var Fe,Re,$o=pe(()=>{"use strict";o();i();typeof Object.create=="function"?Fe=function(r,t){r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:Fe=function(r,t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r};Re=Fe});var _o={};Ra(_o,{_extend:()=>Le,debuglog:()=>Eo,default:()=>Cs,deprecate:()=>Me,format:()=>Hr,inherits:()=>Re,inspect:()=>E,isArray:()=>Ce,isBoolean:()=>Jr,isBuffer:()=>Ro,isDate:()=>jr,isError:()=>gr,isFunction:()=>dr,isNull:()=>hr,isNullOrUndefined:()=>To,isNumber:()=>Ue,isObject:()=>z,isPrimitive:()=>Fo,isRegExp:()=>vr,isString:()=>mr,isSymbol:()=>Io,isUndefined:()=>$,log:()=>Do});function Hr(e){if(!mr(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(E(arguments[t]));return r.join(" ")}for(var t=1,n=arguments,a=n.length,u=String(e).replace(Ts,function(y){if(y==="%%")return"%";if(t>=a)return y;switch(y){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(c){return"[Circular]"}default:return y}}),f=n[t];t<a;f=n[++t])hr(f)||!z(f)?u+=" "+f:u+=" "+E(f);return u}function Me(e,r){if($(globalThis.process))return function(){return Me(e,r).apply(this,arguments)};if(yr.noDeprecation===!0)return e;var t=!1;function n(){if(!t){if(yr.throwDeprecation)throw new Error(r);yr.traceDeprecation?console.trace(r):console.error(r),t=!0}return e.apply(this,arguments)}return n}function Eo(e){if($(De)&&(De=yr.env.NODE_DEBUG||""),e=e.toUpperCase(),!kr[e])if(new RegExp("\\b"+e+"\\b","i").test(De)){var r=0;kr[e]=function(){var t=Hr.apply(null,arguments);console.error("%s %d: %s",e,r,t)}}else kr[e]=function(){};return kr[e]}function E(e,r){var t={seen:[],stylize:Fs};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),Jr(r)?t.showHidden=r:r&&Le(t,r),$(t.showHidden)&&(t.showHidden=!1),$(t.depth)&&(t.depth=2),$(t.colors)&&(t.colors=!1),$(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=Is),zr(t,e,t.depth)}function Is(e,r){var t=E.styles[r];return t?"\x1B["+E.colors[t][0]+"m"+e+"\x1B["+E.colors[t][1]+"m":e}function Fs(e,r){return e}function Rs(e){var r={};return e.forEach(function(t,n){r[t]=!0}),r}function zr(e,r,t){if(e.customInspect&&r&&dr(r.inspect)&&r.inspect!==E&&!(r.constructor&&r.constructor.prototype===r)){var n=r.inspect(t,e);return mr(n)||(n=zr(e,n,t)),n}var a=Ds(e,r);if(a)return a;var u=Object.keys(r),f=Rs(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(r)),gr(r)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return Ne(r);if(u.length===0){if(dr(r)){var y=r.name?": "+r.name:"";return e.stylize("[Function"+y+"]","special")}if(vr(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(jr(r))return e.stylize(Date.prototype.toString.call(r),"date");if(gr(r))return Ne(r)}var c="",m=!1,g=["{","}"];if(Ce(r)&&(m=!0,g=["[","]"]),dr(r)){var h=r.name?": "+r.name:"";c=" [Function"+h+"]"}if(vr(r)&&(c=" "+RegExp.prototype.toString.call(r)),jr(r)&&(c=" "+Date.prototype.toUTCString.call(r)),gr(r)&&(c=" "+Ne(r)),u.length===0&&(!m||r.length==0))return g[0]+c+g[1];if(t<0)return vr(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var v;return m?v=Ns(e,r,t,f,u):v=u.map(function(A){return Be(e,r,t,f,A,m)}),e.seen.pop(),_s(v,c,g)}function Ds(e,r){if($(r))return e.stylize("undefined","undefined");if(mr(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(Ue(r))return e.stylize(""+r,"number");if(Jr(r))return e.stylize(""+r,"boolean");if(hr(r))return e.stylize("null","null")}function Ne(e){return"["+Error.prototype.toString.call(e)+"]"}function Ns(e,r,t,n,a){for(var u=[],f=0,y=r.length;f<y;++f)No(r,String(f))?u.push(Be(e,r,t,n,String(f),!0)):u.push("");return a.forEach(function(c){c.match(/^\d+$/)||u.push(Be(e,r,t,n,c,!0))}),u}function Be(e,r,t,n,a,u){var f,y,c;if(c=Object.getOwnPropertyDescriptor(r,a)||{value:r[a]},c.get?c.set?y=e.stylize("[Getter/Setter]","special"):y=e.stylize("[Getter]","special"):c.set&&(y=e.stylize("[Setter]","special")),No(n,a)||(f="["+a+"]"),y||(e.seen.indexOf(c.value)<0?(hr(t)?y=zr(e,c.value,null):y=zr(e,c.value,t-1),y.indexOf(`
2
+ `)>-1&&(u?y=y.split(`
3
+ `).map(function(m){return" "+m}).join(`
4
+ `).substr(2):y=`
5
+ `+y.split(`
6
+ `).map(function(m){return" "+m}).join(`
7
+ `))):y=e.stylize("[Circular]","special")),$(f)){if(u&&a.match(/^\d+$/))return y;f=JSON.stringify(""+a),f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.substr(1,f.length-2),f=e.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=e.stylize(f,"string"))}return f+": "+y}function _s(e,r,t){var n=0,a=e.reduce(function(u,f){return n++,f.indexOf(`
8
+ `)>=0&&n++,u+f.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?t[0]+(r===""?"":r+`
9
+ `)+" "+e.join(`,
10
+ `)+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function Ce(e){return Array.isArray(e)}function Jr(e){return typeof e=="boolean"}function hr(e){return e===null}function To(e){return e==null}function Ue(e){return typeof e=="number"}function mr(e){return typeof e=="string"}function Io(e){return typeof e=="symbol"}function $(e){return e===void 0}function vr(e){return z(e)&&We(e)==="[object RegExp]"}function z(e){return typeof e=="object"&&e!==null}function jr(e){return z(e)&&We(e)==="[object Date]"}function gr(e){return z(e)&&(We(e)==="[object Error]"||e instanceof Error)}function dr(e){return typeof e=="function"}function Fo(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}function Ro(e){return s.isBuffer(e)}function We(e){return Object.prototype.toString.call(e)}function _e(e){return e<10?"0"+e.toString(10):e.toString(10)}function Ms(){var e=new Date,r=[_e(e.getHours()),_e(e.getMinutes()),_e(e.getSeconds())].join(":");return[e.getDate(),Bs[e.getMonth()],r].join(" ")}function Do(){console.log("%s - %s",Ms(),Hr.apply(null,arguments))}function Le(e,r){if(!r||!z(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e}function No(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var Ts,kr,De,Bs,Cs,Bo=pe(()=>{"use strict";o();i();Po();$o();Ts=/%[sdj%]/g;kr={};E.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};E.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};Bs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Cs={inherits:Re,_extend:Le,log:Do,isBuffer:Ro,isPrimitive:Fo,isFunction:dr,isError:gr,isDate:jr,isObject:z,isRegExp:vr,isUndefined:$,isSymbol:Io,isString:mr,isNumber:Ue,isNullOrUndefined:To,isNull:hr,isBoolean:Jr,isArray:Ce,inspect:E,deprecate:Me,format:Hr,debuglog:Eo}});var Mo=p((zy,Kr)=>{"use strict";o();i();var j=(Bo(),Na(_o));if(j&&j.default){Kr.exports=j.default;for(let e in j)Kr.exports[e]=j[e]}else j&&(Kr.exports=j)});var Uo=p((Jy,Co)=>{"use strict";o();i();Co.exports=Mo().inspect});var Or=p((Yy,ii)=>{"use strict";o();i();var Xe=typeof Map=="function"&&Map.prototype,Ge=Object.getOwnPropertyDescriptor&&Xe?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Yr=Xe&&Ge&&typeof Ge.get=="function"?Ge.get:null,Wo=Xe&&Map.prototype.forEach,Ze=typeof Set=="function"&&Set.prototype,ke=Object.getOwnPropertyDescriptor&&Ze?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xr=Ze&&ke&&typeof ke.get=="function"?ke.get:null,Lo=Ze&&Set.prototype.forEach,Us=typeof WeakMap=="function"&&WeakMap.prototype,br=Us?WeakMap.prototype.has:null,Ws=typeof WeakSet=="function"&&WeakSet.prototype,wr=Ws?WeakSet.prototype.has:null,Ls=typeof WeakRef=="function"&&WeakRef.prototype,Go=Ls?WeakRef.prototype.deref:null,Gs=Boolean.prototype.valueOf,ks=Object.prototype.toString,zs=Function.prototype.toString,js=String.prototype.match,Ve=String.prototype.slice,C=String.prototype.replace,Hs=String.prototype.toUpperCase,ko=String.prototype.toLowerCase,Zo=RegExp.prototype.test,zo=Array.prototype.concat,T=Array.prototype.join,Js=Array.prototype.slice,jo=Math.floor,He=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ze=Object.getOwnPropertySymbols,Je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,nr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ar=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===nr||!0)?Symbol.toStringTag:null,Vo=Object.prototype.propertyIsEnumerable,Ho=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Jo(e,r){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Zo.call(/e/,r))return r;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-jo(-e):jo(e);if(n!==e){var a=String(n),u=Ve.call(r,a.length+1);return C.call(a,t,"$&_")+"."+C.call(C.call(u,/([0-9]{3})/g,"$&_"),/_$/,"")}}return C.call(r,t,"$&_")}var Ke=Uo(),Ko=Ke.custom,Qo=ti(Ko)?Ko:null,ri={__proto__:null,double:'"',single:"'"},Ks={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ii.exports=function e(r,t,n,a){var u=t||{};if(D(u,"quoteStyle")&&!D(ri,u.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(D(u,"maxStringLength")&&(typeof u.maxStringLength=="number"?u.maxStringLength<0&&u.maxStringLength!==1/0:u.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=D(u,"customInspect")?u.customInspect:!0;if(typeof f!="boolean"&&f!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(D(u,"indent")&&u.indent!==null&&u.indent!==" "&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(D(u,"numericSeparator")&&typeof u.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=u.numericSeparator;if(typeof r=="undefined")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return oi(r,u);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var c=String(r);return y?Jo(r,c):c}if(typeof r=="bigint"){var m=String(r)+"n";return y?Jo(r,m):m}var g=typeof u.depth=="undefined"?5:u.depth;if(typeof n=="undefined"&&(n=0),n>=g&&g>0&&typeof r=="object")return Qe(r)?"[Array]":"[Object]";var h=yf(u,n);if(typeof a=="undefined")a=[];else if(ni(a,r)>=0)return"[Circular]";function v(J,Pr,Fa){if(Pr&&(a=Js.call(a),a.push(Pr)),Fa){var At={depth:u.depth};return D(u,"quoteStyle")&&(At.quoteStyle=u.quoteStyle),e(J,At,n+1,a)}return e(J,u,n+1,a)}if(typeof r=="function"&&!Yo(r)){var A=nf(r),q=Qr(r,v);return"[Function"+(A?": "+A:" (anonymous)")+"]"+(q.length>0?" { "+T.call(q,", ")+" }":"")}if(ti(r)){var S=nr?C.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):Je.call(r);return typeof r=="object"&&!nr?Sr(S):S}if(lf(r)){for(var O="<"+ko.call(String(r.nodeName)),x=r.attributes||[],I=0;I<x.length;I++)O+=" "+x[I].name+"="+ei(Qs(x[I].value),"double",u);return O+=">",r.childNodes&&r.childNodes.length&&(O+="..."),O+="</"+ko.call(String(r.nodeName))+">",O}if(Qe(r)){if(r.length===0)return"[]";var W=Qr(r,v);return h&&!cf(W)?"["+Ye(W,h)+"]":"[ "+T.call(W,", ")+" ]"}if(Xs(r)){var ar=Qr(r,v);return!("cause"in Error.prototype)&&"cause"in r&&!Vo.call(r,"cause")?"{ ["+String(r)+"] "+T.call(zo.call("[cause]: "+v(r.cause),ar),", ")+" }":ar.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+T.call(ar,", ")+" }"}if(typeof r=="object"&&f){if(Qo&&typeof r[Qo]=="function"&&Ke)return Ke(r,{depth:g-n});if(f!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(of(r)){var xr=[];return Wo&&Wo.call(r,function(J,Pr){xr.push(v(Pr,r,!0)+" => "+v(J,r))}),Xo("Map",Yr.call(r),xr,h)}if(sf(r)){var St=[];return Lo&&Lo.call(r,function(J){St.push(v(J,r))}),Xo("Set",Xr.call(r),St,h)}if(af(r))return je("WeakMap");if(ff(r))return je("WeakSet");if(uf(r))return je("WeakRef");if(Vs(r))return Sr(v(Number(r)));if(ef(r))return Sr(v(He.call(r)));if(rf(r))return Sr(Gs.call(r));if(Zs(r))return Sr(v(String(r)));if(typeof window!="undefined"&&r===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&r===globalThis||typeof globalThis!="undefined"&&r===globalThis)return"{ [object globalThis] }";if(!Ys(r)&&!Yo(r)){var se=Qr(r,v),bt=Ho?Ho(r)===Object.prototype:r instanceof Object||r.constructor===Object,fe=r instanceof Object?"":"null prototype",wt=!bt&&Ar&&Object(r)===r&&Ar in r?Ve.call(U(r),8,-1):fe?"Object":"",Ia=bt||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",le=Ia+(wt||fe?"["+T.call(zo.call([],wt||[],fe||[]),": ")+"] ":"");return se.length===0?le+"{}":h?le+"{"+Ye(se,h)+"}":le+"{ "+T.call(se,", ")+" }"}return String(r)};function ei(e,r,t){var n=t.quoteStyle||r,a=ri[n];return a+e+a}function Qs(e){return C.call(String(e),/"/g,"&quot;")}function H(e){return!Ar||!(typeof e=="object"&&(Ar in e||typeof e[Ar]!="undefined"))}function Qe(e){return U(e)==="[object Array]"&&H(e)}function Ys(e){return U(e)==="[object Date]"&&H(e)}function Yo(e){return U(e)==="[object RegExp]"&&H(e)}function Xs(e){return U(e)==="[object Error]"&&H(e)}function Zs(e){return U(e)==="[object String]"&&H(e)}function Vs(e){return U(e)==="[object Number]"&&H(e)}function rf(e){return U(e)==="[object Boolean]"&&H(e)}function ti(e){if(nr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Je)return!1;try{return Je.call(e),!0}catch(r){}return!1}function ef(e){if(!e||typeof e!="object"||!He)return!1;try{return He.call(e),!0}catch(r){}return!1}var tf=Object.prototype.hasOwnProperty||function(e){return e in this};function D(e,r){return tf.call(e,r)}function U(e){return ks.call(e)}function nf(e){if(e.name)return e.name;var r=js.call(zs.call(e),/^function\s*([\w$]+)/);return r?r[1]:null}function ni(e,r){if(e.indexOf)return e.indexOf(r);for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}function of(e){if(!Yr||!e||typeof e!="object")return!1;try{Yr.call(e);try{Xr.call(e)}catch(r){return!0}return e instanceof Map}catch(r){}return!1}function af(e){if(!br||!e||typeof e!="object")return!1;try{br.call(e,br);try{wr.call(e,wr)}catch(r){return!0}return e instanceof WeakMap}catch(r){}return!1}function uf(e){if(!Go||!e||typeof e!="object")return!1;try{return Go.call(e),!0}catch(r){}return!1}function sf(e){if(!Xr||!e||typeof e!="object")return!1;try{Xr.call(e);try{Yr.call(e)}catch(r){return!0}return e instanceof Set}catch(r){}return!1}function ff(e){if(!wr||!e||typeof e!="object")return!1;try{wr.call(e,wr);try{br.call(e,br)}catch(r){return!0}return e instanceof WeakSet}catch(r){}return!1}function lf(e){return!e||typeof e!="object"?!1:typeof HTMLElement!="undefined"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function oi(e,r){if(e.length>r.maxStringLength){var t=e.length-r.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return oi(Ve.call(e,0,r.maxStringLength),r)+n}var a=Ks[r.quoteStyle||"single"];a.lastIndex=0;var u=C.call(C.call(e,a,"\\$1"),/[\x00-\x1f]/g,pf);return ei(u,"single",r)}function pf(e){var r=e.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return t?"\\"+t:"\\x"+(r<16?"0":"")+Hs.call(r.toString(16))}function Sr(e){return"Object("+e+")"}function je(e){return e+" { ? }"}function Xo(e,r,t,n){var a=n?Ye(t,n):T.call(t,", ");return e+" ("+r+") {"+a+"}"}function cf(e){for(var r=0;r<e.length;r++)if(ni(e[r],`
11
+ `)>=0)return!1;return!0}function yf(e,r){var t;if(e.indent===" ")t=" ";else if(typeof e.indent=="number"&&e.indent>0)t=T.call(Array(e.indent+1)," ");else return null;return{base:t,prev:T.call(Array(r+1),t)}}function Ye(e,r){if(e.length===0)return"";var t=`
12
+ `+r.prev+r.base;return t+T.call(e,","+t)+`
13
+ `+r.prev}function Qr(e,r){var t=Qe(e),n=[];if(t){n.length=e.length;for(var a=0;a<e.length;a++)n[a]=D(e,a)?r(e[a],e):""}var u=typeof ze=="function"?ze(e):[],f;if(nr){f={};for(var y=0;y<u.length;y++)f["$"+u[y]]=u[y]}for(var c in e)D(e,c)&&(t&&String(Number(c))===c&&c<e.length||nr&&f["$"+c]instanceof Symbol||(Zo.call(/[^\w$]/,c)?n.push(r(c,e)+": "+r(e[c],e)):n.push(c+": "+r(e[c],e))));if(typeof ze=="function")for(var m=0;m<u.length;m++)Vo.call(e,u[m])&&n.push("["+r(u[m])+"]: "+r(e[u[m]],e));return n}});var Zr=p((Vy,ai)=>{"use strict";o();i();ai.exports=function(r){return typeof r=="string"||typeof r=="symbol"}});var si=p((tv,ui)=>{"use strict";o();i();var vf=w(),gf=Or(),df=Zr();ui.exports=function(r,t){if(!df(t))throw new vf("Assertion failed: P is not a Property Key, got "+gf(t));return r[t]}});var ci=p((iv,pi)=>{"use strict";o();i();var li=Function.prototype.toString,or=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,et,Vr;if(typeof or=="function"&&typeof Object.defineProperty=="function")try{et=Object.defineProperty({},"length",{get:function(){throw Vr}}),Vr={},or(function(){throw 42},null,et)}catch(e){e!==Vr&&(or=null)}else or=null;var hf=/^\s*class\b/,tt=function(r){try{var t=li.call(r);return hf.test(t)}catch(n){return!1}},rt=function(r){try{return tt(r)?!1:(li.call(r),!0)}catch(t){return!1}},re=Object.prototype.toString,mf="[object Object]",Sf="[object Function]",bf="[object GeneratorFunction]",wf="[object HTMLAllCollection]",Af="[object HTML document.all class]",Of="[object HTMLCollection]",qf=typeof Symbol=="function"&&!!Symbol.toStringTag,xf=!(0 in[,]),nt=function(){return!1};typeof document=="object"&&(fi=document.all,re.call(fi)===re.call(document.all)&&(nt=function(r){if((xf||!r)&&(typeof r=="undefined"||typeof r=="object"))try{var t=re.call(r);return(t===wf||t===Af||t===Of||t===mf)&&r("")==null}catch(n){}return!1}));var fi;pi.exports=or?function(r){if(nt(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{or(r,null,et)}catch(t){if(t!==Vr)return!1}return!tt(r)&&rt(r)}:function(r){if(nt(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(qf)return rt(r);if(tt(r))return!1;var t=re.call(r);return t!==Sf&&t!==bf&&!/^\[object HTML/.test(t)?!1:rt(r)}});var ot=p((sv,yi)=>{"use strict";o();i();yi.exports=ci()});var hi=p((pv,di)=>{"use strict";o();i();var vi=w(),Pf=si(),$f=ot(),Ef=Zr(),gi=Or();di.exports=function(r,t){if(!Ef(t))throw new vi("Assertion failed: P is not a Property Key");var n=Pf(r,t);if(n!=null){if(!$f(n))throw new vi(gi(t)+" is not a function: "+gi(n));return n}}});var Si=p((vv,mi)=>{"use strict";o();i();var Tf=$r();mi.exports=function(r){return(typeof r=="number"||typeof r=="bigint")&&!Tf(r)&&r!==1/0&&r!==-1/0}});var ee=p((hv,bi)=>{"use strict";o();i();var If=ve(),Ff=ge(),Rf=$r(),Df=Si();bi.exports=function(r){if(typeof r!="number"||Rf(r)||!Df(r))return!1;var t=If(r);return Ff(t)===t}});var it=p((bv,wi)=>{"use strict";o();i();wi.exports=function(r){return!!r&&(typeof r=="function"||typeof r=="object")}});var Oi=p((Ov,Ai)=>{"use strict";o();i();var Nf=he();Ai.exports=function(){return Nf()&&!!Symbol.toStringTag}});var ft=p((Pv,Ei)=>{"use strict";o();i();var qi=P(),_f=Oi()(),Bf=Oe(),Mf=K(),st;_f?(xi=qi("RegExp.prototype.exec"),at={},te=function(){throw at},ut={toString:te,valueOf:te},typeof Symbol.toPrimitive=="symbol"&&(ut[Symbol.toPrimitive]=te),st=function(r){if(!r||typeof r!="object")return!1;var t=Mf(r,"lastIndex"),n=t&&Bf(t,"value");if(!n)return!1;try{xi(r,ut)}catch(a){return a===at}}):(Pi=qi("Object.prototype.toString"),$i="[object RegExp]",st=function(r){return!r||typeof r!="object"&&typeof r!="function"?!1:Pi(r)===$i});var xi,at,te,ut,Pi,$i;Ei.exports=st});var lt=p((Tv,Ti)=>{"use strict";o();i();var Cf=P(),Uf=ft(),Wf=Cf("RegExp.prototype.exec"),Lf=w();Ti.exports=function(r){if(!Uf(r))throw new Lf("`regex` must be a RegExp");return function(n){return Wf(r,n)!==null}}});var Ri=p((Rv,Fi)=>{"use strict";o();i();var Ii=w(),Gf=Or(),kf=Zr(),zf=it();Fi.exports=function(r,t){if(!zf(r))throw new Ii("Assertion failed: Type(O) is not Object");if(!kf(t))throw new Ii("Assertion failed: P is not a Property Key, got "+Gf(t));return r[t]}});var Ni=p((_v,Di)=>{"use strict";o();i();Di.exports=de()});var ct=p((Cv,_i)=>{"use strict";o();i();var jf=P(),pt=w(),Hf=ee(),Jf=jf("String.prototype.slice");_i.exports=function(r,t,n){if(typeof r!="string")throw new pt("Assertion failed: `string` must be a String");if(typeof t!="string")throw new pt("Assertion failed: `searchValue` must be a String");if(!Hf(n)||n<0)throw new pt("Assertion failed: `fromIndex` must be a non-negative integer");var a=r.length;if(t===""&&n<=a)return n;for(var u=t.length,f=n;f<=a-u;f+=1){var y=Jf(r,f,f+u);if(y===t)return f}return-1}});var ne=p((Lv,Bi)=>{"use strict";o();i();var Kf=w();Bi.exports=function(r){if(r==null)throw new Kf(arguments.length>0&&arguments[1]||"Cannot call method on "+r);return r}});var oe=p((zv,Mi)=>{"use strict";o();i();var Qf=F(),Yf=Qf("%String%"),Xf=w();Mi.exports=function(r){if(typeof r=="symbol")throw new Xf("Cannot convert a Symbol value to a string");return Yf(r)}});var yt=p((Jv,Wi)=>{"use strict";o();i();var Zf=ne(),Vf=oe(),rl=P(),Ci=rl("String.prototype.replace"),Ui=/^\s$/.test("\u180E"),el=Ui?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,tl=Ui?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;Wi.exports=function(){var r=Vf(Zf(this));return Ci(Ci(r,el,""),tl,"")}});var vt=p((Yv,Gi)=>{"use strict";o();i();var nl=yt(),Li="\u200B",ir="\u180E";Gi.exports=function(){return String.prototype.trim&&Li.trim()===Li&&ir.trim()===ir&&("_"+ir).trim()==="_"+ir&&(ir+"_").trim()===ir+"_"?String.prototype.trim:nl}});var ji=p((Vv,zi)=>{"use strict";o();i();var ol=Br()(),ki=_r(),il=vt();zi.exports=function(){var r=il();return String.prototype.trim!==r&&(ol?ki(String.prototype,"trim",r,!0):ki(String.prototype,"trim",r)),r}});var Qi=p((tg,Ki)=>{"use strict";o();i();var al=Cr(),ul=Lr(),sl=ne(),fl=yt(),Hi=vt(),ll=ji(),pl=al(Hi()),Ji=function(r){return sl(r),pl(r)};ul(Ji,{getPolyfill:Hi,implementation:fl,shim:ll});Ki.exports=Ji});var ra=p((ig,Vi)=>{"use strict";o();i();var Zi=F(),cl=Zi("%RegExp%"),yl=w(),Yi=Zi("%parseInt%"),vl=P(),ie=lt(),Xi=vl("String.prototype.slice"),gl=ie(/^0b[01]+$/i),dl=ie(/^0o[0-7]+$/i),hl=ie(/^[-+]0x[0-9a-f]+$/i),ml=["\x85","\u200B","\uFFFE"].join(""),Sl=new cl("["+ml+"]","g"),bl=ie(Sl),wl=Qi();Vi.exports=function e(r){if(typeof r!="string")throw new yl("Assertion failed: `argument` is not a String");if(gl(r))return+Yi(Xi(r,2),2);if(dl(r))return+Yi(Xi(r,2),8);if(bl(r)||hl(r))return NaN;var t=wl(r);return t!==r?e(t):+r}});var na=p((sg,ta)=>{"use strict";o();i();var Al=w(),ea=ee(),Ol=P(),ql=Ol("String.prototype.slice");ta.exports=function(r,t,n){if(typeof r!="string"||!ea(t)||arguments.length>2&&!ea(n))throw new Al("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return ql(r,t,arguments.length>2?n:r.length)}});var ia=p((pg,oa)=>{"use strict";o();i();oa.exports=function(r,t){for(var n=0;n<r.length;n+=1)if(!t(r[n],n,r))return!1;return!0}});var ua=p((vg,aa)=>{"use strict";o();i();var xl=P()("String.prototype.slice");aa.exports=function(r,t){return r===t?!0:r.length>t.length?!1:xl(t,0,r.length)===r}});var fa=p((hg,sa)=>{"use strict";o();i();sa.exports=function(r){return typeof r=="string"||typeof r=="undefined"}});var va=p((bg,ya)=>{"use strict";o();i();var N=w(),gt=Or(),Pl=ee(),la=it(),ca=lt(),$l=Ri(),El=Ie(),Tl=Ni(),Il=ct(),pa=ra(),_=na(),Fl=oe(),Rl=ia(),qr=ua(),Dl=fa(),Nl=ca(/^\$[0-9]/),_l=ca(/^\$[0-9][0-9]/);ya.exports=function(r,t,n,a,u,f){if(typeof r!="string")throw new N("Assertion failed: `matched` must be a String");if(typeof t!="string")throw new N("Assertion failed: `str` must be a String");if(!Pl(n)||n<0)throw new N("Assertion failed: `position` must be a nonnegative integer, got "+gt(n));if(!El(a)||!Rl(a,Dl))throw new N("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+gt(a));if(typeof u!="undefined"&&!la(u))throw new N("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof f!="string")throw new N("Assertion failed: `replacementTemplate` must be a String");var y=t.length;if(n>y)throw new N("Assertion failed: position > stringLength, got "+gt(n));for(var c=f,m="";c!=="";){var g,h,v;if(qr("$$",c))g="$$",h="$";else if(qr("$`",c))g="$`",h=_(t,0,n);else if(qr("$&",c))g="$&",h=r;else if(qr("$'",c)){g="$'";var A=r.length,q=n+A;h=_(t,Tl(q,y))}else if(Nl(c)){var S=_l(c)?2:1,O=_(c,1,1+S),x=pa(O);if(x<0||x>99)throw new N("Assertion failed: `index` must be >= 0 and <= 99");var I=a.length;x>I&&S===2&&(S=1,O=_(O,0,1),x=pa(O)),g=_(c,0,1+S),1<=x&&x<=I?(v=a[x-1],typeof v=="undefined"?h="":h=v):h=g}else if(qr("$<",c)){var W=Il(c,">",0);if(!(W>-1)||typeof u=="undefined")g="$<",h=g;else{g=_(c,0,W+1);var ar=_(c,2,W);if(!la(u))throw new N("Assertion failed: Type(namedCaptures) is not Object");v=$l(u,ar),typeof v=="undefined"?h="":h=Fl(v)}}else g=_(c,0,1),h=g;var xr=g.length;c=_(c,xr),m+=h}return m}});var ma=p((Og,ha)=>{"use strict";o();i();var ga=F(),da=Cr(),Bl=da(ga("String.prototype.indexOf"));ha.exports=function(r,t){var n=ga(r,!!t);return typeof n=="function"&&Bl(r,".prototype.")>-1?da(n):n}});var ht=p((Pg,Aa)=>{"use strict";o();i();var Sa=bo(),Ml=hi(),Cl=va(),Ul=ot(),Wl=ne(),ae=oe(),ba=ct(),Ll=F(),ue=ma(),Gl=me()(),kl=ft(),zl=Ll("%Math.max%"),wa=w(),jl=ue("Array.prototype.push"),dt=ue("String.prototype.slice"),Hl=ue("String.prototype.indexOf"),Jl=ue("String.prototype.replace");Aa.exports=function(r,t){var n=Wl(this),a=kl(r);if(a&&Hl(dt(r,r.source.length+2),"g")===-1)throw new wa("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Gl&&Symbol.replace){if(r!=null){var u=Ml(r,Symbol.replace);if(typeof u!="undefined")return Sa(u,r,[n,t])}}else if(a)return Jl(n,r,t);var f=ae(n),y=ae(r),c=Ul(t);c||(t=ae(t));for(var m=y.length,g=zl(1,m),h=[],v=ba(f,y,0);v!==-1;)jl(h,v),v=ba(f,y,v+g);for(var A=0,q="",S=0;S<h.length;S+=1){var O;if(c)O=ae(Sa(t,void 0,[y,h[S],f]));else{if(typeof t!="string")throw new wa("Assertion failed: `replaceValue` should be a string at this point");var x=[];O=Cl(y,f,h[S],x,void 0,t)}var I=dt(f,A,h[S]);q+=I+O,A=h[S]+m}return A<f.length&&(q+=dt(f,A)),q}});var mt=p((Tg,Oa)=>{"use strict";o();i();var Kl=ht();Oa.exports=function(){return String.prototype.replaceAll||Kl}});var xa=p((Rg,qa)=>{"use strict";o();i();var Ql=Lr(),Yl=mt();qa.exports=function(){var r=Yl();return Ql(String.prototype,{replaceAll:r},{replaceAll:function(){return String.prototype.replaceAll!==r}}),r}});var Ta=p((_g,Ea)=>{"use strict";o();i();var Xl=Cr(),Zl=Lr(),Pa=ht(),Vl=mt(),rp=xa(),$a=Xl(Pa);Zl($a,{getPolyfill:Vl,implementation:Pa,shim:rp});Ea.exports=$a});o();i();var Cg=Da(Ta(),1);export{_a as DynamicSnippetsGenerator};
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@fern-api/ruby-dynamic-snippets",
3
+ "version": "0.0.1",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/fern-api/fern.git",
7
+ "directory": "generators/ruby-v2/dynamic-snippets"
8
+ },
9
+ "type": "module",
10
+ "exports": {
11
+ "import": {
12
+ "types": "./esm/index.d.ts",
13
+ "default": "./esm/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./cjs/index.d.cts",
17
+ "default": "./cjs/index.cjs"
18
+ }
19
+ },
20
+ "main": "./cjs/index.cjs",
21
+ "module": "./esm/index.js",
22
+ "types": "./cjs/index.d.cts",
23
+ "files": [
24
+ "cjs",
25
+ "esm"
26
+ ]
27
+ }