fern-api 0.66.14 → 0.66.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.cjs +3 -3
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -1674,7 +1674,7 @@ ${c.indent}`:""}${L5d(o)}:${l.indent?" ":""}`;return u=!1,s=!0,l.objectItem=void
|
|
|
1674
1674
|
`+e.slice(n,a),n=a+1),u=l;return d+=`
|
|
1675
1675
|
`,e.length-n>t&&u>n?d+=e.slice(n,u)+`
|
|
1676
1676
|
`+e.slice(u+1):d+=e.slice(n),d.slice(1)}function K3S(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=kRa(e,n),i=pJ[r],!i&&ixa(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||L3S(r);return t}function Y3S(e,t,r){var i="",n=e.tag,a,u,l;for(a=0,u=r.length;a<u;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(Bgi(e,t,l,!1,!1)||typeof l>"u"&&Bgi(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function j9d(e,t,r,i){var n="",a=e.tag,u,l,d;for(u=0,l=r.length;u<l;u+=1)d=r[u],e.replacer&&(d=e.replacer.call(r,String(u),d)),(Bgi(e,t+1,d,!0,!0,!1,!0)||typeof d>"u"&&Bgi(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=pJs(e,t)),e.dump&&txa===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}function X3S(e,t,r){var i="",n=e.tag,a=Object.keys(r),u,l,d,s,o;for(u=0,l=a.length;u<l;u+=1)o="",i!==""&&(o+=", "),e.condenseFlow&&(o+='"'),d=a[u],s=r[d],e.replacer&&(s=e.replacer.call(r,d,s)),Bgi(e,t,d,!1,!1)&&(e.dump.length>1024&&(o+="? "),o+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Bgi(e,t,s,!1,!1)&&(o+=e.dump,i+=o));e.tag=n,e.dump="{"+i+"}"}function Z3S(e,t,r,i){var n="",a=e.tag,u=Object.keys(r),l,d,s,o,c,b;if(e.sortKeys===!0)u.sort();else if(typeof e.sortKeys=="function")u.sort(e.sortKeys);else if(e.sortKeys)throw new yk("sortKeys must be a boolean or a function");for(l=0,d=u.length;l<d;l+=1)b="",(!i||n!=="")&&(b+=pJs(e,t)),s=u[l],o=r[s],e.replacer&&(o=e.replacer.call(r,s,o)),Bgi(e,t+1,s,!0,!0,!0)&&(c=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,c&&(e.dump&&txa===e.dump.charCodeAt(0)?b+="?":b+="? "),b+=e.dump,c&&(b+=pJs(e,t)),Bgi(e,t+1,o,!0,c)&&(e.dump&&txa===e.dump.charCodeAt(0)?b+=":":b+=": ",b+=e.dump,n+=b));e.tag=a,e.dump=n||"{}"}function w9d(e,t,r){var i,n,a,u,l,d;for(n=r?e.explicitTypes:e.implicitTypes,a=0,u=n.length;a<u;a+=1)if(l=n[a],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof t=="object"&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(r?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(d=e.styleMap[l.tag]||l.defaultStyle,tLd.call(l.represent)==="[object Function]")i=l.represent(t,d);else if(rLd.call(l.represent,d))i=l.represent[d](t,d);else throw new yk("!<"+l.tag+'> tag resolver accepts not "'+d+'" style');e.dump=i}return!0}return!1}function Bgi(e,t,r,i,n,a,u){e.tag=null,e.dump=r,w9d(e,r,!1)||w9d(e,r,!0);var l=tLd.call(e.dump),d=i,s;i&&(i=e.flowLevel<0||e.flowLevel>t);var o=l==="[object Object]"||l==="[object Array]",c,b;if(o&&(c=e.duplicates.indexOf(r),b=c!==-1),(e.tag!==null&&e.tag!=="?"||b||e.indent!==2&&t>0)&&(n=!1),b&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(o&&b&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),l==="[object Object]")i&&Object.keys(e.dump).length!==0?(Z3S(e,t,e.dump,n),b&&(e.dump="&ref_"+c+e.dump)):(X3S(e,t,e.dump),b&&(e.dump="&ref_"+c+" "+e.dump));else if(l==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!u&&t>0?j9d(e,t-1,e.dump,n):j9d(e,t,e.dump,n),b&&(e.dump="&ref_"+c+e.dump)):(Y3S(e,t,e.dump),b&&(e.dump="&ref_"+c+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&Q3S(e,e.dump,t,a,d);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new yk("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(s=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?s="!"+s:s.slice(0,18)==="tag:yaml.org,2002:"?s="!!"+s.slice(18):s="!<"+s+">",e.dump=s+" "+e.dump)}return!0}function k3S(e,t){var r=[],i=[],n,a;for(hJs(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}function hJs(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)hJs(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)hJs(e[i[n]],t,r)}function e7S(e,t){t=t||{};var r=new V3S(t);r.noRefs||k3S(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Bgi(r,0,i,!0,!0)?r.dump+`
|
|
1677
|
-
`:""}var t7S=e7S,r7S={dump:t7S};function mJs(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var i7S=kW,n7S=E9d,a7S=T9d,o7S=R9d,u7S=x9d,s7S=vJs,c7S=eLd.load,l7S=eLd.loadAll,qIo=r7S.dump,nxa=yk,f7S={binary:V9d,float:z9d,map:q9d,null:C9d,pairs:H9d,set:$9d,timestamp:L9d,bool:B9d,int:I9d,merge:U9d,omap:W9d,seq:A9d,str:M9d},d7S=mJs("safeLoad","load"),p7S=mJs("safeLoadAll","loadAll"),_7S=mJs("safeDump","dump"),h7S={Type:i7S,Schema:n7S,FAILSAFE_SCHEMA:a7S,JSON_SCHEMA:o7S,CORE_SCHEMA:u7S,DEFAULT_SCHEMA:s7S,load:c7S,loadAll:l7S,dump:qIo,YAMLException:nxa,types:f7S,safeLoad:d7S,safeLoadAll:p7S,safeDump:_7S},wd=h7S;var dLd=Su.object({dependencies:Su.record(Su.string(),Su.string())});async function _Ld({absolutePathToWorkspace:e,context:t}){let r=Eu(e,Ia.of($4d));if(!await jf(r))return;let i=await(0,pLd.readFile)(r),n=wd.load(i.toString());return await Yqo({schema:dLd,value:n,context:t,filepathBeingParsed:r})}async function PJs({absolutePathToWorkspace:e,context:t}){let r=await _Ld({absolutePathToWorkspace:e,context:t});return c9d({absolutePathToWorkspace:e,rawDependenciesConfiguration:r,context:t})}function TIo(e){"@babel/helpers - typeof";return TIo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},TIo(e)}var y7S=/^\s+/,v7S=/\s+$/;function F_(e,t){if(e=e||"",t=t||{},e instanceof F_)return e;if(!(this instanceof F_))return new F_(e,t);var r=b7S(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}F_.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),r,i,n,a,u,l;return r=t.r/255,i=t.g/255,n=t.b/255,r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),i<=.03928?u=i/12.92:u=Math.pow((i+.055)/1.055,2.4),n<=.03928?l=n/12.92:l=Math.pow((n+.055)/1.055,2.4),.2126*a+.7152*u+.0722*l},setAlpha:function(t){return this._a=mLd(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=yLd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=yLd(this._r,this._g,this._b),r=Math.round(t.h*360),i=Math.round(t.s*100),n=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+i+"%, "+n+"%)":"hsva("+r+", "+i+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=hLd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=hLd(this._r,this._g,this._b),r=Math.round(t.h*360),i=Math.round(t.s*100),n=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+i+"%, "+n+"%)":"hsla("+r+", "+i+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return vLd(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return P7S(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(WR(this._r,255)*100)+"%",g:Math.round(WR(this._g,255)*100)+"%",b:Math.round(WR(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(WR(this._r,255)*100)+"%, "+Math.round(WR(this._g,255)*100)+"%, "+Math.round(WR(this._b,255)*100)+"%)":"rgba("+Math.round(WR(this._r,255)*100)+"%, "+Math.round(WR(this._g,255)*100)+"%, "+Math.round(WR(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:I7S[vLd(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+bLd(this._r,this._g,this._b,this._a),i=r,n=this._gradientType?"GradientType = 1, ":"";if(t){var a=F_(t);i="#"+bLd(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+r+",endColorstr="+i+")"},toString:function(t){var r=!!t;t=t||this._format;var i=!1,n=this._a<1&&this._a>=0,a=!r&&n&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return a?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(i=this.toRgbString()),t==="prgb"&&(i=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(i=this.toHexString()),t==="hex3"&&(i=this.toHexString(!0)),t==="hex4"&&(i=this.toHex8String(!0)),t==="hex8"&&(i=this.toHex8String()),t==="name"&&(i=this.toName()),t==="hsl"&&(i=this.toHslString()),t==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return F_(this.toString())},_applyModification:function(t,r){var i=t.apply(null,[this].concat([].slice.call(r)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(D7S,arguments)},brighten:function(){return this._applyModification(E7S,arguments)},darken:function(){return this._applyModification(M7S,arguments)},desaturate:function(){return this._applyModification(j7S,arguments)},saturate:function(){return this._applyModification(w7S,arguments)},greyscale:function(){return this._applyModification(S7S,arguments)},spin:function(){return this._applyModification(A7S,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(C7S,arguments)},complement:function(){return this._applyCombination(q7S,arguments)},monochromatic:function(){return this._applyCombination(B7S,arguments)},splitcomplement:function(){return this._applyCombination(T7S,arguments)},triad:function(){return this._applyCombination(gLd,[3])},tetrad:function(){return this._applyCombination(gLd,[4])}};F_.fromRatio=function(e,t){if(TIo(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=axa(e[i]));e=r}return F_(e,t)};function b7S(e){var t={r:0,g:0,b:0},r=1,i=null,n=null,a=null,u=!1,l=!1;return typeof e=="string"&&(e=N7S(e)),TIo(e)=="object"&&(Igi(e.r)&&Igi(e.g)&&Igi(e.b)?(t=g7S(e.r,e.g,e.b),u=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Igi(e.h)&&Igi(e.s)&&Igi(e.v)?(i=axa(e.s),n=axa(e.v),t=m7S(e.h,i,n),u=!0,l="hsv"):Igi(e.h)&&Igi(e.s)&&Igi(e.l)&&(i=axa(e.s),a=axa(e.l),t=O7S(e.h,i,a),u=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=mLd(r),{ok:u,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function g7S(e,t,r){return{r:WR(e,255)*255,g:WR(t,255)*255,b:WR(r,255)*255}}function hLd(e,t,r){e=WR(e,255),t=WR(t,255),r=WR(r,255);var i=Math.max(e,t,r),n=Math.min(e,t,r),a,u,l=(i+n)/2;if(i==n)a=u=0;else{var d=i-n;switch(u=l>.5?d/(2-i-n):d/(i+n),i){case e:a=(t-r)/d+(t<r?6:0);break;case t:a=(r-e)/d+2;break;case r:a=(e-t)/d+4;break}a/=6}return{h:a,s:u,l}}function O7S(e,t,r){var i,n,a;e=WR(e,360),t=WR(t,100),r=WR(r,100);function u(s,o,c){return c<0&&(c+=1),c>1&&(c-=1),c<1/6?s+(o-s)*6*c:c<1/2?o:c<2/3?s+(o-s)*(2/3-c)*6:s}if(t===0)i=n=a=r;else{var l=r<.5?r*(1+t):r+t-r*t,d=2*r-l;i=u(d,l,e+1/3),n=u(d,l,e),a=u(d,l,e-1/3)}return{r:i*255,g:n*255,b:a*255}}function yLd(e,t,r){e=WR(e,255),t=WR(t,255),r=WR(r,255);var i=Math.max(e,t,r),n=Math.min(e,t,r),a,u,l=i,d=i-n;if(u=i===0?0:d/i,i==n)a=0;else{switch(i){case e:a=(t-r)/d+(t<r?6:0);break;case t:a=(r-e)/d+2;break;case r:a=(e-t)/d+4;break}a/=6}return{h:a,s:u,v:l}}function m7S(e,t,r){e=WR(e,360)*6,t=WR(t,100),r=WR(r,100);var i=Math.floor(e),n=e-i,a=r*(1-t),u=r*(1-n*t),l=r*(1-(1-n)*t),d=i%6,s=[r,u,a,a,l,r][d],o=[l,r,r,u,a,a][d],c=[a,a,l,r,r,u][d];return{r:s*255,g:o*255,b:c*255}}function vLd(e,t,r,i){var n=[q$t(Math.round(e).toString(16)),q$t(Math.round(t).toString(16)),q$t(Math.round(r).toString(16))];return i&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function P7S(e,t,r,i,n){var a=[q$t(Math.round(e).toString(16)),q$t(Math.round(t).toString(16)),q$t(Math.round(r).toString(16)),q$t(PLd(i))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function bLd(e,t,r,i){var n=[q$t(PLd(i)),q$t(Math.round(e).toString(16)),q$t(Math.round(t).toString(16)),q$t(Math.round(r).toString(16))];return n.join("")}F_.equals=function(e,t){return!e||!t?!1:F_(e).toRgbString()==F_(t).toRgbString()};F_.random=function(){return F_.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function j7S(e,t){t=t===0?0:t||10;var r=F_(e).toHsl();return r.s-=t/100,r.s=CIo(r.s),F_(r)}function w7S(e,t){t=t===0?0:t||10;var r=F_(e).toHsl();return r.s+=t/100,r.s=CIo(r.s),F_(r)}function S7S(e){return F_(e).desaturate(100)}function D7S(e,t){t=t===0?0:t||10;var r=F_(e).toHsl();return r.l+=t/100,r.l=CIo(r.l),F_(r)}function E7S(e,t){t=t===0?0:t||10;var r=F_(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),F_(r)}function M7S(e,t){t=t===0?0:t||10;var r=F_(e).toHsl();return r.l-=t/100,r.l=CIo(r.l),F_(r)}function A7S(e,t){var r=F_(e).toHsl(),i=(r.h+t)%360;return r.h=i<0?360+i:i,F_(r)}function q7S(e){var t=F_(e).toHsl();return t.h=(t.h+180)%360,F_(t)}function gLd(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=F_(e).toHsl(),i=[F_(e)],n=360/t,a=1;a<t;a++)i.push(F_({h:(r.h+a*n)%360,s:r.s,l:r.l}));return i}function T7S(e){var t=F_(e).toHsl(),r=t.h;return[F_(e),F_({h:(r+72)%360,s:t.s,l:t.l}),F_({h:(r+216)%360,s:t.s,l:t.l})]}function C7S(e,t,r){t=t||6,r=r||30;var i=F_(e).toHsl(),n=360/r,a=[F_(e)];for(i.h=(i.h-(n*t>>1)+720)%360;--t;)i.h=(i.h+n)%360,a.push(F_(i));return a}function B7S(e,t){t=t||6;for(var r=F_(e).toHsv(),i=r.h,n=r.s,a=r.v,u=[],l=1/t;t--;)u.push(F_({h:i,s:n,v:a})),a=(a+l)%1;return u}F_.mix=function(e,t,r){r=r===0?0:r||50;var i=F_(e).toRgb(),n=F_(t).toRgb(),a=r/100,u={r:(n.r-i.r)*a+i.r,g:(n.g-i.g)*a+i.g,b:(n.b-i.b)*a+i.b,a:(n.a-i.a)*a+i.a};return F_(u)};F_.readability=function(e,t){var r=F_(e),i=F_(t);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};F_.isReadable=function(e,t,r){var i=F_.readability(e,t),n,a;switch(a=!1,n=F7S(r),n.level+n.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7;break}return a};F_.mostReadable=function(e,t,r){var i=null,n=0,a,u,l,d;r=r||{},u=r.includeFallbackColors,l=r.level,d=r.size;for(var s=0;s<t.length;s++)a=F_.readability(e,t[s]),a>n&&(n=a,i=F_(t[s]));return F_.isReadable(e,i,{level:l,size:d})||!u?i:(r.includeFallbackColors=!1,F_.mostReadable(e,["#fff","#000"],r))};var jJs=F_.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},I7S=F_.hexNames=z7S(jJs);function z7S(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function mLd(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function WR(e,t){R7S(e)&&(e="100%");var r=x7S(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function CIo(e){return Math.min(1,Math.max(0,e))}function eAe(e){return parseInt(e,16)}function R7S(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function x7S(e){return typeof e=="string"&&e.indexOf("%")!=-1}function q$t(e){return e.length==1?"0"+e:""+e}function axa(e){return e<=1&&(e=e*100+"%"),e}function PLd(e){return Math.round(parseFloat(e)*255).toString(16)}function OLd(e){return eAe(e)/255}var A$t=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Igi(e){return!!A$t.CSS_UNIT.exec(e)}function N7S(e){e=e.replace(y7S,"").replace(v7S,"").toLowerCase();var t=!1;if(jJs[e])e=jJs[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=A$t.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=A$t.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=A$t.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=A$t.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=A$t.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=A$t.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=A$t.hex8.exec(e))?{r:eAe(r[1]),g:eAe(r[2]),b:eAe(r[3]),a:OLd(r[4]),format:t?"name":"hex8"}:(r=A$t.hex6.exec(e))?{r:eAe(r[1]),g:eAe(r[2]),b:eAe(r[3]),format:t?"name":"hex"}:(r=A$t.hex4.exec(e))?{r:eAe(r[1]+""+r[1]),g:eAe(r[2]+""+r[2]),b:eAe(r[3]+""+r[3]),a:OLd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=A$t.hex3.exec(e))?{r:eAe(r[1]+""+r[1]),g:eAe(r[2]+""+r[2]),b:eAe(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function F7S(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}function jLd(e={accentPrimary:void 0,background:void 0},t){e.accentPrimary=e.accentPrimary??e.accentPrimaryDeprecated;let r=IIo(e);switch(r){case"dark":return{type:"dark",...BIo(e,t,"dark")};case"light":return{type:"light",...BIo(e,t,"light")};case"darkAndLight":return{type:"darkAndLight",dark:BIo(e,t,"dark"),light:BIo(e,t,"light")};default:So(r)}}function IIo({background:e,accentPrimary:t,accentPrimaryDeprecated:r}){if(t=t??r,typeof e=="string"&&typeof t=="string")return F_(e).isDark()?"dark":"light";if(e!=null){if(typeof e=="string")return F_(e).isDark()?"dark":"light";if(e.dark!=null&&e.light!=null)return"darkAndLight"}if(t!=null){if(typeof t=="string")return F_(t).isLight()?"dark":"light";if(t.dark!=null&&t.light!=null)return"darkAndLight"}if(t!=null&&e!=null){if(e.dark!=null&&t.dark!=null)return"dark";if(e.light!=null&&t.light!=null)return"light"}return"darkAndLight"}function BIo(e,t,r){let i=t9n(e.accentPrimary??e.accentPrimaryDeprecated,t,"accent-primary",r)??F_.random(),n=t9n(e.background,t,"background",r);return{accentPrimary:i.toRgb(),background:n?.toRgb(),border:t9n(e.border,t,"border",r)?.toRgb(),sidebarBackground:t9n(e.sidebarBackground,t,"sidebar-background",r)?.toRgb(),headerBackground:t9n(e.headerBackground,t,"header-background",r)?.toRgb(),cardBackground:t9n(e.cardBackground,t,"card-background",r)?.toRgb(),logo:void 0,backgroundImage:void 0}}function oxa(e,t,r){if(e==null)return;let i=typeof e=="string"?e:e[r];if(i==null&&t==="accent-primary"&&typeof e!="string"&&(i=e[r==="dark"?"light":"dark"]),i!=null)return i}function t9n(e,t,r,i){let n=oxa(e,r,i);if(n==null)return;let a=F_(n);return a.isValid()||t.failAndThrow(`'${typeof e=="string"?r:`colors.${r}.${i}`}' should be a hex color of the format #FFFFFF`),a}var Pxo=require("fs/promises");var oH=ui(hAe(),1);var JOp=require("fs/promises");var QOp=100;async function lGS({files:e,absolutePathToFernFolder:t}){let r=await Promise.all(e.map(async i=>{let n=await(0,JOp.readFile)(i,"utf-8");return[_ae(t,i),n]}));return Object.fromEntries(r)}async function KOp({files:e,absolutePathToFernFolder:t}){let r={};for(let i=0;i<e.length;i+=QOp){let n=e.slice(i,i+QOp),a=await lGS({files:n,absolutePathToFernFolder:t});Object.assign(r,a)}return r}function gxo({landingPage:e,navigation:t}){return Xxe([e?.absolutePath,...fGS(t)])}function fGS(e){switch(e.type){case"tabbed":return e.items.flatMap(t=>t.child.type==="layout"?t.child.layout.flatMap(r=>AZs({item:r})):t.child.type==="changelog"?t.child.changelog:[]);case"untabbed":return e.items.flatMap(t=>AZs({item:t}));case"versioned":return e.versions.flatMap(t=>gxo({landingPage:t.landingPage,navigation:t.navigation}));case"productgroup":return e.products.flatMap(t=>gxo({landingPage:t.landingPage,navigation:t.navigation}));default:So(e)}}function AZs({item:e}){switch(e.type){case"apiSection":return Xxe([e.overviewAbsolutePath,...e.navigation.flatMap(t=>YOp({item:t}))]);case"link":return[];case"page":return[e.absolutePath];case"section":return Xxe([e.overviewAbsolutePath,...e.contents.flatMap(t=>AZs({item:t}))]);case"changelog":return e.changelog;default:So(e)}}function YOp({item:e}){return e.type==="page"?[e.absolutePath]:e.type==="package"||e.type==="section"?Xxe([e.overviewAbsolutePath,...e.contents.flatMap(t=>YOp({item:t}))]):[]}async function BZs({rawDocsConfiguration:e,absolutePathToFernFolder:t,absoluteFilepathToDocsConfig:r,context:i}){let{instances:n,title:a,tabs:u,products:l,versions:d,navigation:s,navbarLinks:o,footerLinks:c,defaultLanguage:b,metadata:g,redirects:O,logo:m,favicon:w,backgroundImage:E,colors:q,typography:M,layout:D,analytics:C,integrations:R,css:G,js:I,aiChat:F,aiSearch:V,experimental:X}=e,K=Lxa(e.landingPage,r),Y=gGS({tabs:u,products:l,versions:d,navigation:s,absolutePathToFernFolder:t,absolutePathToConfig:r,context:i}),oe=Y.then(wt=>KOp({files:gxo({navigation:wt,landingPage:K}),absolutePathToFernFolder:t})),pe=dGS(m,r),de=D8(w,r),Oe=pGS(E,r),Ue=M!=null?OGS({rawTypography:M,absoluteFilepathToDocsConfig:r}):void 0,bt=_GS(G,r),De=vGS(I,r),Te=zGS(g,r),[Rt,Pe,ot,at,me,we]=await Promise.all([Y,oe,Ue,bt,De,Te]);return{title:a,instances:n,roles:e.roles,pages:Pe,landingPage:K,navigation:Rt,navbarLinks:BGS(o),footerLinks:IGS(c),defaultLanguage:b,announcement:e.announcement,metadata:we,redirects:O?.map(wt=>({...wt,permanent:wt?.permanent})),logo:pe,favicon:de,backgroundImage:Oe,colors:jLd(q,i),typography:ot,layout:bGS(D),analyticsConfig:{...e.analytics,intercom:e.analytics?.intercom?{...e.analytics.intercom,appId:e.analytics.intercom.appId,apiBase:e.analytics.intercom.apiBase}:void 0,fullstory:e.analytics?.fullstory,posthog:e.analytics?.posthog?{...e.analytics.posthog,apiKey:e.analytics.posthog.apiKey,endpoint:e.analytics.posthog.endpoint}:void 0,segment:e.analytics?.segment,gtm:e.analytics?.gtm,ga4:e.analytics?.ga4,amplitude:void 0,mixpanel:void 0,hotjar:void 0,koala:void 0,logrocket:void 0,pirsch:void 0,plausible:void 0,fathom:void 0,clearbit:void 0,heap:void 0},integrations:{...R,intercom:R?.intercom?R.intercom:void 0},css:at,js:me,aiChatConfig:V??F,experimental:X}}function dGS(e,t){return e!=null?{dark:D8(e.dark,t),light:D8(e.light,t),height:e.height,href:e.href!=null?oH.FernRegistry.Url(e.href):void 0}:void 0}function pGS(e,t){if(e!=null)if(typeof e=="string"){let r=D8(e,t);return{dark:r,light:r}}else{let r=D8(e.dark,t),i=D8(e.light,t);return{dark:r,light:i}}}async function _GS(e,t){if(e==null)return;let r=typeof e=="string"?[e]:e;return{inline:await Promise.all(r.map(async i=>(await(0,Pxo.readFile)(D8(i,t))).toString()))}}function hGS(e){return Object.hasOwn(e,"url")}function yGS(e){return Object.hasOwn(e,"path")}async function vGS(e,t){let r=[],i=[];if(e==null)return{files:[]};let n=Array.isArray(e)?e:[e];for(let a of n)typeof a=="string"?i.push({absolutePath:D8(a,t)}):hGS(a)?r.push({strategy:a.strategy,url:oH.FernRegistry.Url(a.url)}):yGS(a)&&i.push({absolutePath:D8(a.path,t),strategy:a.strategy});return{remote:r,files:i}}function bGS(e){if(e!=null)return{pageWidth:e.pageWidth?.trim().toLowerCase()==="full"?{type:"full"}:Oxo(e.pageWidth),contentWidth:Oxo(e.contentWidth),sidebarWidth:Oxo(e.sidebarWidth),headerHeight:Oxo(e.headerHeight),searchbarPlacement:e.searchbarPlacement==="header"?oH.FernRegistry.docs.v1.commons.SearchbarPlacement.Header:e.searchbarPlacement==="header-tabs"?oH.FernRegistry.docs.v1.commons.SearchbarPlacement.HeaderTabs:oH.FernRegistry.docs.v1.commons.SearchbarPlacement.Sidebar,tabsPlacement:e.tabsPlacement==="header"?oH.FernRegistry.docs.v1.commons.TabsPlacement.Header:oH.FernRegistry.docs.v1.commons.TabsPlacement.Sidebar,contentAlignment:e.contentAlignment==="left"?oH.FernRegistry.docs.v1.commons.ContentAlignment.Left:oH.FernRegistry.docs.v1.commons.ContentAlignment.Center,headerPosition:e.headerPosition==="static"?oH.FernRegistry.docs.v1.commons.HeaderPosition.Absolute:oH.FernRegistry.docs.v1.commons.HeaderPosition.Fixed,disableHeader:e.disableHeader??!1}}function Oxo(e){if(e==null)return;let t=e.trim().toLowerCase(),r=t.match(/^(\d+)px$/);if(r!=null&&r[1]!=null)return{type:"px",value:parseFloat(r[1])};let i=t.match(/^(\d+)rem$/);if(i!=null&&i[1]!=null)return{type:"rem",value:parseFloat(i[1])}}async function XOp({versions:e,absolutePathToFernFolder:t,context:r}){let i=[];for(let n of e){let a=Cv(t,n.path),u=wd.load((await(0,Pxo.readFile)(a)).toString()),l=dae.RawSchemas.Serializer.VersionFileConfig.parseOrThrow(u),d=await CZs({tabs:l.tabs,rawNavigationConfig:l.navigation,absolutePathToFernFolder:t,absolutePathToConfig:a,context:r});i.push({landingPage:Lxa(l.landingPage,a),version:n.displayName,navigation:d,availability:n.availability,slug:n.slug,viewers:ENe(n.viewers),orphaned:n.orphaned,featureFlags:DNe(n.featureFlag)})}return{type:"versioned",versions:i}}async function gGS({tabs:e,products:t,versions:r,navigation:i,absolutePathToFernFolder:n,absolutePathToConfig:a,context:u}){if(i!=null)return await CZs({tabs:e,rawNavigationConfig:i,absolutePathToFernFolder:n,absolutePathToConfig:a,context:u});if(t!=null){let l=[];for(let d of t){let s=Cv(n,d.path),o=d.image!=null?Cv(n,d.image):void 0,c=wd.load((await(0,Pxo.readFile)(s)).toString()),b=dae.RawSchemas.Serializer.ProductFileConfig.parseOrThrow(c),g;d.versions!=null&&d.versions.length>0?g=await XOp({versions:d.versions,absolutePathToFernFolder:n,context:u}):g=await CZs({tabs:b.tabs,rawNavigationConfig:b.navigation,absolutePathToFernFolder:n,absolutePathToConfig:s,context:u}),l.push({landingPage:Lxa(b.landingPage,s),product:d.displayName,navigation:g,slug:d.slug,subtitle:d.subtitle,icon:d.icon||"fa-solid fa-code",image:o,viewers:ENe(d.viewers),orphaned:d.orphaned,featureFlags:DNe(d.featureFlag)})}return{type:"productgroup",products:l}}else if(r!=null)return await XOp({versions:r,absolutePathToFernFolder:n,context:u});throw new Error("Unexpected. Docs have neither navigation or versions defined.")}function DNe(e){if(e!=null)return typeof e=="string"?[{flag:e,match:!0,fallbackValue:void 0}]:Array.isArray(e)?e.map(t=>({flag:t.flag,match:t.match,fallbackValue:t.fallbackValue})):[{flag:e.flag,match:e.match??!0,fallbackValue:e.fallbackValue}]}async function OGS({rawTypography:e,absoluteFilepathToDocsConfig:t}){return{headingsFont:e.headingsFont!=null?await qZs({rawFontConfig:e.headingsFont,absoluteFilepathToDocsConfig:t}):void 0,bodyFont:e.bodyFont!=null?await qZs({rawFontConfig:e.bodyFont,absoluteFilepathToDocsConfig:t}):void 0,codeFont:e.codeFont!=null?await qZs({rawFontConfig:e.codeFont,absoluteFilepathToDocsConfig:t}):void 0}}async function qZs({rawFontConfig:e,absoluteFilepathToDocsConfig:t}){return{name:e.name,variants:await mGS(e,t),display:e.display,fallback:e.fallback,fontVariationSettings:e.fontVariationSettings}}function mGS(e,t){let r=[];return e.path!=null&&r.push({path:e.path,weight:e.weight,style:e.style}),e.paths?.forEach(i=>{typeof i=="string"?r.push({path:i,weight:e.weight,style:e.style}):r.push({path:i.path,weight:i.weight??e.weight,style:i.style??e.style})}),Promise.all(r.map(async i=>({absolutePath:D8(i.path,t),weight:PGS(i.weight),style:i.style})))}function PGS(e){return e==null?void 0:typeof e=="number"?[e.toString()]:e.split(/\D+/).filter(r=>r!==""&&["100","200","300","400","500","600","700","800","900"].includes(r))}async function jGS({tabs:e,item:t,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n}){let a=e[t.tab];if(a==null)throw new Error(`Tab ${t.tab} is not defined in the tabs config.`);if(t.layout!=null){let u=await Promise.all(t.layout.map(l=>IZs({rawConfig:l,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n})));return{title:a.displayName,icon:a.icon,slug:a.slug,skipUrlSlug:a.skipSlug,hidden:a.hidden,child:{type:"layout",layout:u},viewers:ENe(a.viewers),orphaned:a.orphaned,featureFlags:DNe(a.featureFlag)}}if(a.href!=null)return{title:a.displayName,icon:a.icon,slug:a.slug,skipUrlSlug:a.skipSlug,hidden:a.hidden,child:{type:"link",href:a.href},viewers:ENe(a.viewers),orphaned:a.orphaned,featureFlags:DNe(a.featureFlag)};if(a.changelog!=null)return{title:a.displayName,icon:a.icon,slug:a.slug,skipUrlSlug:a.skipSlug,hidden:a.hidden,child:{type:"changelog",changelog:await pae(D8(a.changelog,i),"{md,mdx}")},viewers:ENe(a.viewers),orphaned:a.orphaned,featureFlags:DNe(a.featureFlag)};So(a)}async function CZs({tabs:e={},rawNavigationConfig:t,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n}){return CGS(t)?{type:"tabbed",items:await Promise.all(t.map(u=>jGS({tabs:e,item:u,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n})))}:{type:"untabbed",items:await Promise.all(t.map(a=>IZs({rawConfig:a,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n})))}}var wGS="Changelog";async function IZs({rawConfig:e,absolutePathToFernFolder:t,absolutePathToConfig:r,context:i}){if(ZOp(e))return Lxa(e,r);if(DGS(e))return{type:"section",title:e.section,icon:e.icon,contents:await Promise.all(e.contents.map(n=>IZs({rawConfig:n,absolutePathToFernFolder:t,absolutePathToConfig:r,context:i}))),slug:e.slug??void 0,collapsed:e.collapsed??void 0,hidden:e.hidden??void 0,skipUrlSlug:e.skipSlug??!1,overviewAbsolutePath:D8(e.path,r),viewers:ENe(e.viewers),orphaned:e.orphaned,featureFlags:DNe(e.featureFlag)};if(EGS(e))return{type:"apiSection",openrpc:e.openrpc,title:e.api,icon:e.icon,apiName:e.apiName??void 0,audiences:e.audiences!=null?{type:"select",audiences:e.audiences}:{type:"all"},showErrors:e.displayErrors??!0,snippetsConfiguration:e.snippets!=null?SGS({rawConfig:e.snippets}):void 0,navigation:e.layout?.flatMap(n=>mxo(n,r))??[],overviewAbsolutePath:D8(e.summary,r),hidden:e.hidden??void 0,slug:e.slug,skipUrlSlug:e.skipSlug??!1,flattened:e.flattened??!1,alphabetized:e.alphabetized??!1,paginated:e.paginated??!1,playground:e.playground,viewers:ENe(e.viewers),orphaned:e.orphaned,featureFlags:DNe(e.featureFlag)};if(kOp(e))return{type:"link",text:e.link,url:e.href,icon:e.icon};if(MGS(e))return{type:"changelog",changelog:await pae(D8(e.changelog,r),"{md,mdx}"),hidden:e.hidden??!1,icon:e.icon,title:e.title??wGS,slug:e.slug,viewers:ENe(e.viewers),orphaned:e.orphaned,featureFlags:DNe(e.featureFlag)};So(e)}function Lxa(e,t){if(e!=null)return{type:"page",title:e.page,absolutePath:D8(e.path,t),slug:e.slug,icon:e.icon,hidden:e.hidden,noindex:e.noindex,viewers:ENe(e.viewers),orphaned:e.orphaned,featureFlags:DNe(e.featureFlag)}}function mxo(e,t){return typeof e=="string"?[{type:"item",value:e}]:ZOp(e)?[Lxa(e,t)]:kOp(e)?[{type:"link",text:e.link,url:e.href,icon:e.icon}]:AGS(e)?[{type:"section",title:e.section,referencedSubpackages:e.referencedPackages??[],overviewAbsolutePath:D8(e.summary,t),contents:e.contents?.flatMap(r=>mxo(r,t))??[],slug:e.slug,hidden:e.hidden,skipUrlSlug:e.skipSlug,icon:e.icon,playground:e.playground,viewers:ENe(e.viewers),orphaned:e.orphaned,featureFlags:DNe(e.featureFlag)}]:qGS(e)?[{type:"endpoint",endpoint:e.endpoint,title:e.title,icon:e.icon,slug:e.slug,hidden:e.hidden,playground:e.playground,viewers:ENe(e.viewers),orphaned:e.orphaned,featureFlags:DNe(e.featureFlag)}]:Object.entries(e).map(([r,i])=>TGS(i)?{type:"package",title:i.title,package:r,overviewAbsolutePath:D8(i.summary,t),contents:i.contents?.flatMap(n=>mxo(n,t))??[],slug:i.slug,hidden:i.hidden,skipUrlSlug:i.skipSlug,icon:i.icon,playground:i.playground,viewers:ENe(i.viewers),orphaned:i.orphaned,featureFlags:DNe(i.featureFlag)}:{type:"package",title:void 0,package:r,overviewAbsolutePath:void 0,contents:i.flatMap(n=>mxo(n,t)),hidden:!1,slug:void 0,skipUrlSlug:!1,icon:void 0,playground:void 0,viewers:void 0,orphaned:void 0,featureFlags:void 0})}function SGS({rawConfig:e}){return{python:e.python,typescript:e.typescript,go:e.go,java:e.java,ruby:e.ruby,csharp:e.csharp}}function ZOp(e){return vw(e)&&typeof e.page=="string"&&typeof e.path=="string"}function DGS(e){return e.section!=null}function EGS(e){return e.api!=null}function kOp(e){return dae.RawSchemas,vw(e)&&typeof e.link=="string"&&typeof e.href=="string"}function MGS(e){return vw(e)&&typeof e.changelog=="string"}function AGS(e){return vw(e)&&typeof e.section=="string"&&Array.isArray(e.contents)}function qGS(e){return vw(e)&&typeof e.endpoint=="string"}function TGS(e){return!Array.isArray(e)}function D8(e,t){if(e!=null)return Cv(Rd(t),e)}function CGS(e){return Array.isArray(e)&&e.length>0&&e[0].tab!=null}function BGS(e){return e?.map(t=>t.type==="github"?{type:"github",url:oH.FernRegistry.Url(t.value)}:{type:t.type,text:t.text,url:oH.FernRegistry.Url(t.href??t.url??"/"),icon:t.icon,rightIcon:t.rightIcon,rounded:t.rounded})}function IGS(e){if(e==null)return;let t=[];if(Object.keys(e).forEach(r=>{let i=e[r];i!=null&&t.push({type:r,value:oH.FernRegistry.Url(i)})}),t.length!==0)return t}async function zGS(e,t){if(e!=null)return{"og:site_name":e.ogSiteName,"og:title":e.ogTitle,"og:description":e.ogDescription,"og:url":e.ogUrl,"og:image":await TZs(e.ogImage,t),"og:image:width":e.ogImageWidth,"og:image:height":e.ogImageHeight,"og:locale":e.ogLocale,"og:logo":await TZs(e.ogLogo,t),"twitter:title":e.twitterTitle,"twitter:description":e.twitterDescription,"twitter:image":await TZs(e.twitterImage,t),"twitter:handle":e.twitterHandle,"twitter:site":e.twitterSite,"twitter:url":e.twitterUrl,"twitter:card":e.twitterCard,nofollow:void 0,noindex:void 0}}async function TZs(e,t){if(e==null)return;if(e.startsWith("http"))return{type:"url",value:e};let r=D8(e,t);return await jf(r)?{type:"filepath",value:r}:{type:"url",value:e}}function ENe(e){if(e!=null){if(typeof e=="string")return[oH.FernRegistry.RoleId(e)];if(e.length!==0)return e.map(oH.FernRegistry.RoleId)}}var tmp=require("fs/promises");var emp=Su.strictObject({organization:Su.string(),version:Su.string()});async function Xgi({directory:e,context:t}){let r=Eu(e,Ia.of(cae)),i=await(0,tmp.readFile)(r),n=JSON.parse(i.toString()),a=await Yqo({schema:emp,value:n,context:t,filepathBeingParsed:r});return{_absolutePath:r,rawConfig:a,organization:a.organization,version:a.version}}var Uxa={[$.JAVA]:{version:"2.38.1"},[$.TYPESCRIPT_EXPRESS]:{version:"0.18.4",output:{location:"local-file-system",path:"../src/fern"}},[$.JAVA_MODEL]:{version:"1.0.0"},[$.JAVA_SDK]:{version:"2.38.1",output:{location:"local-file-system",path:"../sdks/java/src/main/java/"}},[$.JAVA_SPRING]:{version:"0.9.2",output:{location:"local-file-system",path:"../src/main/java/com/fern"}},[$.TYPESCRIPT]:{version:"0.0.247"},[$.TYPESCRIPT_SDK]:{version:"2.3.2",output:{location:"local-file-system",path:"../sdks/typescript"}},[$.TYPESCRIPT_NODE_SDK]:{version:"2.3.2",output:{location:"local-file-system",path:"../sdks/typescript"}},[$.TYPESCRIPT_BROWSER_SDK]:{version:"1.0.0",output:{location:"local-file-system",path:"../sdks/typescript"}},[$.PYTHON_PYDANTIC]:{version:"1.4.7"},[$.PYTHON_FASTAPI]:{version:"1.7.0",output:{location:"local-file-system",path:"../src/fern"}},[$.PYTHON_SDK]:{version:"4.23.2",output:{location:"local-file-system",path:"../sdks/python"}},[$.GO_FIBER]:{version:"0.23.5"},[$.GO_MODEL]:{version:"0.23.5"},[$.GO_SDK]:{version:"1.4.0",output:{location:"local-file-system",path:"../sdks/go"},config:{module:{path:"sdk"}}},[$.RUBY_MODEL]:{version:"0.0.8"},[$.RUBY_SDK]:{version:"0.8.2",output:{location:"local-file-system",path:"../sdks/ruby"}},[$.OPENAPI]:{version:"0.1.7",config:{format:"yaml"},output:{location:"local-file-system",path:"../openapi"}},[$.STOPLIGHT]:{version:"0.0.28",config:{format:"yaml"}},[$.POSTMAN]:{version:"0.4.0",output:{location:"local-file-system",path:"../postman"}},[$.OPENAPI_PYTHON_CLIENT]:{version:"0.0.0",output:{location:"local-file-system",path:"../sdks/python"},config:{format:"yaml"}},[$.CSHARP_MODEL]:{version:"0.0.1"},[$.CSHARP_SDK]:{version:"2.0.2",output:{location:"local-file-system",path:"../sdks/csharp"}},[$.SWIFT_MODEL]:{version:"0.0.0"},[$.SWIFT_SDK]:{version:"0.0.0",output:{location:"local-file-system",path:"../sdks/swift/sdk"}},[$.PHP_MODEL]:{version:"0.0.0"},[$.PHP_SDK]:{version:"1.16.3",output:{location:"local-file-system",path:"../sdks/php/sdk"}},[$.RUST_MODEL]:{version:"0.0.1",output:{location:"local-file-system",path:"../models/rust"}},[$.RUST_SDK]:{version:"0.0.1",output:{location:"local-file-system",path:"../sdks/rust"}}};function CIi(e,t){let r=RGS(e);return r??t.failAndThrow("Unrecognized generator: "+e)}function RGS(e){if(e.startsWith("fernapi/")||(e=`fernapi/${e}`),xGS(e))return e}function xGS(e){return Object.values($).includes(e)}var AEp=ui(BIi(),1),lFo=ui(ONa(),1);async function Irr({generatorName:e,cliVersion:t,channel:r,currentGeneratorVersion:i,includeMajor:n,context:a}){let u=AEp.default.parse(i),l=new lFo.FernRegistryClient({environment:"https://registry.buildwithfern.com"});a?.logger.debug(`Getting latest version for ${e} with CLI version ${t}, includeMajor: ${n}, prior version: ${u}`);let d={generator:fuD(e,a),releaseTypes:[r??lFo.FernRegistry.generators.ReleaseType.Ga],cliVersion:t==="0.0.0"?void 0:t};!n&&u!=null&&(d.generatorMajorVersion=u.major);let s=await l.generators.versions.getLatestGeneratorRelease(d);if(s.ok)return s.body.version}function fuD(e,t){switch(e.startsWith("fernapi/")&&(e=e.replace("fernapi/","")),e){case"fern-python-sdk":return"python-sdk";case"fern-pydantic-model":return"pydantic";case"fern-fastapi-server":return"fastapi";case"fern-typescript-browser-sdk":case"fern-typescript-node-sdk":case"fern-typescript-sdk":return"ts-sdk";case"fern-typescript-express":return"ts-express";case"fern-java-sdk":return"java-sdk";case"java-model":return"java-model";case"fern-java-spring":return"java-spring";case"fern-go-sdk":return"go-sdk";case"fern-go-model":return"go-model";case"fern-go-fiber":return"go-fiber";case"fern-csharp-sdk":return"csharp-sdk";case"fern-csharp-model":return"csharp-model";case"fern-ruby-sdk":return"ruby-sdk";case"fern-ruby-model":return"ruby-model";case"fern-postman":return"postman";case"fern-openapi":return"openapi";case"fern-php-sdk":return"php-sdk";case"fern-php-model":return"php-model";case"fern-rust-sdk":return"rust-sdk";case"fern-rust-model":return"rust-model";default:return t?.logger.warn(`Unrecognized generator name found, attempting to parse manually: ${e}`),e.startsWith("fern-")?e.replace("fern-",""):e}}async function qEp({generatorsConfiguration:e,groupName:t=e[ry.DEFAULT_GROUP_GENERATORS_CONFIG_KEY],context:r,update:i}){if(t==null)return r.failAndThrow("No group specified.");let n=e.groups??={},a=n[t];if(a==null){let u=n[t]??={generators:[]};await i(u,t)}else await i(a,t);return e}async function Vec({generatorName:e,generatorsConfiguration:t,groupName:r=t[iTo],context:i,cliVersion:n}){let a=CIi(e,i),u=Uxa[a];return await qEp({generatorsConfiguration:t,groupName:r,context:i,update:async l=>{l.generators.some(d=>d.name===a)&&i.failAndThrow(`${e} is already installed in group ${r}.`),l.generators.push({name:a,...u,version:await Irr({cliVersion:n,generatorName:a,context:i,channel:void 0})??u.version})}})}var rNp=require("fs/promises");var iNp=ui(require("path"),1);var Jxp=require("fs/promises"),Kxp=ui(require("path"),1);var zrr="$";var AF={};Po(AF,{AvailabilityStatusSchema:()=>CEp,FernDefinitionError:()=>wNa,FernDefinitionTimeoutError:()=>SNa,FormDataBodyEncodingStyle:()=>VEp,HttpMethodSchema:()=>UEp,ObjectPropertyAccess:()=>$Ep,StreamFormat:()=>WEp,SupportedSdkLanguageSchema:()=>xEp,WebSocketOrigin:()=>YEp,WebhookMethodSchema:()=>KEp,auth:()=>TEp,availability:()=>Wec,commons:()=>BEp,encoding:()=>IEp,environments:()=>zEp,errors:()=>REp,examples:()=>Hec,file:()=>NEp,pagination:()=>FEp,products:()=>LEp,serialization:()=>vtc,service:()=>$ec,source:()=>HEp,types:()=>Gec,validation:()=>GEp,variables:()=>QEp,versioning:()=>JEp,webhooks:()=>Qec,websocket:()=>Jec});var TEp={};var Wec={};Po(Wec,{AvailabilityStatusSchema:()=>CEp});var CEp={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available"};var BEp={};var IEp={};var zEp={};var REp={};var Hec={};Po(Hec,{SupportedSdkLanguageSchema:()=>xEp});var xEp={Curl:"curl",Python:"python",Javascript:"javascript",Typescript:"typescript",Go:"go",Ruby:"ruby",Csharp:"csharp",Java:"java",Js:"js",Node:"node",Ts:"ts",Nodets:"nodets",Golang:"golang",Dotnet:"dotnet",Jvm:"jvm",Csharp2:"c#"};var NEp={};var FEp={};var LEp={};var $ec={};Po($ec,{FormDataBodyEncodingStyle:()=>VEp,HttpMethodSchema:()=>UEp,StreamFormat:()=>WEp});var UEp={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"};var VEp={Json:"json",Exploded:"exploded",Form:"form"};var WEp={Sse:"sse",Json:"json"};var HEp={};var Gec={};Po(Gec,{ObjectPropertyAccess:()=>$Ep});var $Ep={ReadOnly:"read-only",WriteOnly:"write-only"};var GEp={};var QEp={};var JEp={};var Qec={};Po(Qec,{WebhookMethodSchema:()=>KEp});var KEp={Post:"POST",Get:"GET"};var Jec={};Po(Jec,{WebSocketOrigin:()=>YEp});var YEp={Client:"client",Server:"server"};var vtc={};Po(vtc,{AliasSchema:()=>D3o,AnyAuthItem:()=>hFo,AnyAuthSchemesSchema:()=>yFo,ApiAuthSchema:()=>vFo,AuthSchemeDeclarationSchema:()=>BFo,AuthSchemeReferenceSchema:()=>gLn,AuthVariable:()=>Fen,AvailabilitySchema:()=>zFo,AvailabilityStatusSchema:()=>mLn,AvailabilityUnionSchema:()=>RFo,BaseTypeDeclarationSchema:()=>HNe,BaseTypeReferenceSchema:()=>SLn,BasicAuthSchemeSchema:()=>DFo,BearerAuthSchemeSchema:()=>CFo,CasingOverridesSchema:()=>f3o,CursorPaginationSchema:()=>Y3o,CustomPaginationSchema:()=>Z3o,DeclarationSchema:()=>Rrr,DeclarationWithNameSchema:()=>wMp,DeclarationWithoutDocsSchema:()=>LFo,DefinitionFileSchema:()=>p7o,DiscriminatedUnionSchema:()=>P3o,EncodingSchema:()=>PLn,EnumSchema:()=>_3o,EnumValue:()=>p3o,EnumValueSchema:()=>d3o,EnvironmentSchema:()=>HFo,ErrorDeclarationSchema:()=>QFo,ErrorDiscriminationSchema:()=>O7o,ExampleBodyResponseSchema:()=>YFo,ExampleCodeSampleSchema:()=>n3o,ExampleCodeSampleSchemaLanguage:()=>i3o,ExampleCodeSampleSchemaSdk:()=>r3o,ExampleEndpointCallArraySchema:()=>SMp,ExampleEndpointCallSchema:()=>wLn,ExampleResponseSchema:()=>e3o,ExampleSseEventSchema:()=>ZFo,ExampleSseResponseSchema:()=>kFo,ExampleStreamResponseSchema:()=>XFo,ExampleTypeReferenceSchema:()=>A8,ExampleTypeSchema:()=>jLn,ExampleTypeValueSchema:()=>GFo,ExampleWebSocketMessage:()=>JFo,ExampleWebSocketSession:()=>KFo,ExampleWebhookCallSchema:()=>a3o,Export:()=>y7o,ExportDetailed:()=>h7o,FormDataBodyEncodingStyle:()=>z3o,GrpcTransport:()=>M3o,HeaderAuthSchemeSchema:()=>SFo,HttpEndpointSchema:()=>e7o,HttpHeaderSchema:()=>$Ne,HttpInlineFileRequestBodyPropertySchema:()=>R3o,HttpInlineRequestBodyPropertySchema:()=>x3o,HttpInlineRequestBodySchema:()=>N3o,HttpMethodSchema:()=>A3o,HttpPathParameterSchema:()=>xrr,HttpQueryParameterSchema:()=>ELn,HttpReferencedRequestBodySchema:()=>I3o,HttpRequest:()=>U3o,HttpRequestBodySchema:()=>F3o,HttpRequestSchema:()=>L3o,HttpResponseSchema:()=>W3o,HttpResponseSchemaDetailed:()=>V3o,HttpResponseStreamSchema:()=>G3o,HttpResponseStreamSchemaDetailed:()=>$3o,HttpServiceSchema:()=>t7o,InferredAuthenticatedRequestHeader:()=>MFo,InferredBearerAuthSchema:()=>TFo,InferredGetTokenEndpointSchema:()=>qFo,InferredGetTokenEndpointSchemaObject:()=>AFo,MultipleBaseUrlsEnvironmentSchema:()=>WFo,Navigation:()=>_7o,NumberValidationSchema:()=>NFo,OAuthAccessTokenRequestPropertiesSchema:()=>bFo,OAuthAccessTokenResponsePropertiesSchema:()=>gFo,OAuthGetTokenEndpointSchema:()=>OFo,OAuthRefreshTokenEndpointSchema:()=>jFo,OAuthRefreshTokenRequestPropertiesSchema:()=>mFo,OAuthRefreshTokenResponsePropertiesSchema:()=>PFo,OAuthSchemeSchema:()=>wFo,ObjectExtendsSchema:()=>VNe,ObjectPropertyAccess:()=>o3o,ObjectPropertySchema:()=>rzi,ObjectPropertyWithAccessSchema:()=>u3o,ObjectSchema:()=>l3o,OffsetPaginationSchema:()=>X3o,OpenApiSourceSchema:()=>s3o,PackageMarkerFileSchema:()=>DMp,Pagination:()=>k3o,PaginationSchema:()=>MLn,ProductDeclarationHeaderObjectSchema:()=>A7o,ProductDeclarationHeaderSchema:()=>q7o,ProductDeclarationSchema:()=>T7o,ProductValue:()=>M7o,ProductValueDetailed:()=>E7o,PropertyBasedErrorDiscrimination:()=>b7o,ProtobufSourceSchema:()=>c3o,ProtobufTypeSchema:()=>UFo,QueryParameterTypeReferenceDetailed:()=>T3o,ResponseError:()=>J3o,ResponseErrorWithDocsSchema:()=>Q3o,ResponseErrorsSchema:()=>K3o,RootApiFileSchema:()=>EMp,ServiceTransport:()=>DLn,SingleBaseUrlEnvironmentSchema:()=>VFo,SingleUndiscriminatedUnionTypeDetailedSchema:()=>j3o,SingleUndiscriminatedUnionTypeSchema:()=>w3o,SingleUnionTypeDetailedSchema:()=>O3o,SingleUnionTypeKey:()=>g3o,SingleUnionTypeKeySchema:()=>b3o,SingleUnionTypeSchema:()=>m3o,SourceSchema:()=>izi,StatusCodeBasedErrorDiscrimination:()=>g7o,StreamFormat:()=>H3o,StringValidationSchema:()=>xFo,SupportedSdkLanguageSchema:()=>t3o,TokenBearerAuthSchema:()=>EFo,TypeDeclarationSchema:()=>E3o,TypeReferenceDeclarationWithEnvOverride:()=>B3o,TypeReferenceDeclarationWithEnvOverrideSchema:()=>C3o,TypeReferenceDeclarationWithName:()=>WNe,TypeReferenceDeclarationWithNameSchema:()=>MMp,TypeReferenceDetailedSchema:()=>v3o,TypeReferenceSchema:()=>iOi,UndiscriminatedUnionSchema:()=>S3o,UnionDiscriminant:()=>y3o,UnionDiscriminantSchema:()=>h3o,ValidationSchema:()=>tzi,VariableDeclarationDetailed:()=>m7o,VariableDeclarationSchema:()=>P7o,VariableReferenceSchema:()=>q3o,VersionDeclarationHeaderObjectSchema:()=>S7o,VersionDeclarationHeaderSchema:()=>D7o,VersionDeclarationSchema:()=>ALn,VersionValue:()=>w7o,VersionValueDetailed:()=>j7o,WebSocketChannelInlinedMessageSchema:()=>c7o,WebSocketChannelMessageBodySchema:()=>l7o,WebSocketChannelMessageSchema:()=>f7o,WebSocketChannelReferencedMessageSchema:()=>s7o,WebSocketChannelSchema:()=>d7o,WebSocketOrigin:()=>u7o,WebhookInlinedPayloadSchema:()=>n7o,WebhookMethodSchema:()=>r7o,WebhookPayloadSchema:()=>a7o,WebhookReferencedPayloadSchema:()=>i7o,WebhookSchema:()=>o7o,WithAudiences:()=>OL,WithAuthSchema:()=>IFo,WithAvailability:()=>SJ,WithDisplayName:()=>gL,WithDocsSchema:()=>Zp,WithEnvironmentVariable:()=>OLn,WithEnvironmentsSchema:()=>$Fo,WithHeadersSchema:()=>v7o,WithName:()=>pS,WithValidation:()=>FFo,auth:()=>kec,availability:()=>etc,commons:()=>ttc,encoding:()=>rtc,environments:()=>itc,errors:()=>ntc,examples:()=>atc,file:()=>otc,pagination:()=>utc,products:()=>stc,service:()=>ctc,source:()=>ltc,types:()=>ftc,validation:()=>dtc,variables:()=>ptc,versioning:()=>_tc,webhooks:()=>htc,websocket:()=>ytc});var kec={};Po(kec,{AnyAuthItem:()=>hFo,AnyAuthSchemesSchema:()=>yFo,ApiAuthSchema:()=>vFo,AuthSchemeDeclarationSchema:()=>BFo,AuthSchemeReferenceSchema:()=>gLn,AuthVariable:()=>Fen,BasicAuthSchemeSchema:()=>DFo,BearerAuthSchemeSchema:()=>CFo,HeaderAuthSchemeSchema:()=>SFo,InferredAuthenticatedRequestHeader:()=>MFo,InferredBearerAuthSchema:()=>TFo,InferredGetTokenEndpointSchema:()=>qFo,InferredGetTokenEndpointSchemaObject:()=>AFo,OAuthAccessTokenRequestPropertiesSchema:()=>bFo,OAuthAccessTokenResponsePropertiesSchema:()=>gFo,OAuthGetTokenEndpointSchema:()=>OFo,OAuthRefreshTokenEndpointSchema:()=>jFo,OAuthRefreshTokenRequestPropertiesSchema:()=>mFo,OAuthRefreshTokenResponsePropertiesSchema:()=>PFo,OAuthSchemeSchema:()=>wFo,TokenBearerAuthSchema:()=>EFo,WithAuthSchema:()=>IFo,WithEnvironmentVariable:()=>OLn});var gr={};Po(gr,{JsonError:()=>yLn,ParseError:()=>vLn,any:()=>fMp,bigint:()=>ZEp,boolean:()=>dMp,booleanLiteral:()=>lMp,date:()=>kEp,discriminant:()=>mMp,enum_:()=>dFo,getObjectLikeUtils:()=>J$t,getObjectUtils:()=>Nen,getSchemaUtils:()=>vT,isProperty:()=>ezi,lazy:()=>eMp,lazyObject:()=>uMp,list:()=>_Fo,number:()=>pMp,object:()=>pFo,objectWithoutOptionalProperties:()=>oMp,optional:()=>Kec,property:()=>rMp,record:()=>vMp,set:()=>bMp,string:()=>_Mp,stringLiteral:()=>cMp,transform:()=>Yec,undiscriminatedUnion:()=>OMp,union:()=>jMp,unknown:()=>hMp,withParsedProperties:()=>Zec});var Jj={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",OPTIONAL:"optional"};function CA(e,t){return`Expected ${t}. Received ${duD(e)}.`}function duD(e){if(Array.isArray(e))return"list";if(e===null)return"null";if(e instanceof BigInt)return"BigInt";switch(typeof e){case"string":return`"${e}"`;case"bigint":case"number":case"boolean":case"undefined":return`${e}`}return typeof e}function bL(e){return{...e,json:XEp(e.json),parse:XEp(e.parse)}}function XEp(e){return(t,r)=>{let i=e(t,r),{skipValidation:n=!1}=r??{};return!i.ok&&n?(console.warn(["Failed to validate.",...i.errors.map(a=>" - "+(a.path.length>0?`${a.path.join(".")}: ${a.message}`:a.message))].join(`
|
|
1677
|
+
`:""}var t7S=e7S,r7S={dump:t7S};function mJs(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var i7S=kW,n7S=E9d,a7S=T9d,o7S=R9d,u7S=x9d,s7S=vJs,c7S=eLd.load,l7S=eLd.loadAll,qIo=r7S.dump,nxa=yk,f7S={binary:V9d,float:z9d,map:q9d,null:C9d,pairs:H9d,set:$9d,timestamp:L9d,bool:B9d,int:I9d,merge:U9d,omap:W9d,seq:A9d,str:M9d},d7S=mJs("safeLoad","load"),p7S=mJs("safeLoadAll","loadAll"),_7S=mJs("safeDump","dump"),h7S={Type:i7S,Schema:n7S,FAILSAFE_SCHEMA:a7S,JSON_SCHEMA:o7S,CORE_SCHEMA:u7S,DEFAULT_SCHEMA:s7S,load:c7S,loadAll:l7S,dump:qIo,YAMLException:nxa,types:f7S,safeLoad:d7S,safeLoadAll:p7S,safeDump:_7S},wd=h7S;var dLd=Su.object({dependencies:Su.record(Su.string(),Su.string())});async function _Ld({absolutePathToWorkspace:e,context:t}){let r=Eu(e,Ia.of($4d));if(!await jf(r))return;let i=await(0,pLd.readFile)(r),n=wd.load(i.toString());return await Yqo({schema:dLd,value:n,context:t,filepathBeingParsed:r})}async function PJs({absolutePathToWorkspace:e,context:t}){let r=await _Ld({absolutePathToWorkspace:e,context:t});return c9d({absolutePathToWorkspace:e,rawDependenciesConfiguration:r,context:t})}function TIo(e){"@babel/helpers - typeof";return TIo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},TIo(e)}var y7S=/^\s+/,v7S=/\s+$/;function F_(e,t){if(e=e||"",t=t||{},e instanceof F_)return e;if(!(this instanceof F_))return new F_(e,t);var r=b7S(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}F_.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),r,i,n,a,u,l;return r=t.r/255,i=t.g/255,n=t.b/255,r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),i<=.03928?u=i/12.92:u=Math.pow((i+.055)/1.055,2.4),n<=.03928?l=n/12.92:l=Math.pow((n+.055)/1.055,2.4),.2126*a+.7152*u+.0722*l},setAlpha:function(t){return this._a=mLd(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=yLd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=yLd(this._r,this._g,this._b),r=Math.round(t.h*360),i=Math.round(t.s*100),n=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+i+"%, "+n+"%)":"hsva("+r+", "+i+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=hLd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=hLd(this._r,this._g,this._b),r=Math.round(t.h*360),i=Math.round(t.s*100),n=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+i+"%, "+n+"%)":"hsla("+r+", "+i+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return vLd(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return P7S(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(WR(this._r,255)*100)+"%",g:Math.round(WR(this._g,255)*100)+"%",b:Math.round(WR(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(WR(this._r,255)*100)+"%, "+Math.round(WR(this._g,255)*100)+"%, "+Math.round(WR(this._b,255)*100)+"%)":"rgba("+Math.round(WR(this._r,255)*100)+"%, "+Math.round(WR(this._g,255)*100)+"%, "+Math.round(WR(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:I7S[vLd(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+bLd(this._r,this._g,this._b,this._a),i=r,n=this._gradientType?"GradientType = 1, ":"";if(t){var a=F_(t);i="#"+bLd(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+r+",endColorstr="+i+")"},toString:function(t){var r=!!t;t=t||this._format;var i=!1,n=this._a<1&&this._a>=0,a=!r&&n&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return a?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(i=this.toRgbString()),t==="prgb"&&(i=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(i=this.toHexString()),t==="hex3"&&(i=this.toHexString(!0)),t==="hex4"&&(i=this.toHex8String(!0)),t==="hex8"&&(i=this.toHex8String()),t==="name"&&(i=this.toName()),t==="hsl"&&(i=this.toHslString()),t==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return F_(this.toString())},_applyModification:function(t,r){var i=t.apply(null,[this].concat([].slice.call(r)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(D7S,arguments)},brighten:function(){return this._applyModification(E7S,arguments)},darken:function(){return this._applyModification(M7S,arguments)},desaturate:function(){return this._applyModification(j7S,arguments)},saturate:function(){return this._applyModification(w7S,arguments)},greyscale:function(){return this._applyModification(S7S,arguments)},spin:function(){return this._applyModification(A7S,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(C7S,arguments)},complement:function(){return this._applyCombination(q7S,arguments)},monochromatic:function(){return this._applyCombination(B7S,arguments)},splitcomplement:function(){return this._applyCombination(T7S,arguments)},triad:function(){return this._applyCombination(gLd,[3])},tetrad:function(){return this._applyCombination(gLd,[4])}};F_.fromRatio=function(e,t){if(TIo(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=axa(e[i]));e=r}return F_(e,t)};function b7S(e){var t={r:0,g:0,b:0},r=1,i=null,n=null,a=null,u=!1,l=!1;return typeof e=="string"&&(e=N7S(e)),TIo(e)=="object"&&(Igi(e.r)&&Igi(e.g)&&Igi(e.b)?(t=g7S(e.r,e.g,e.b),u=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Igi(e.h)&&Igi(e.s)&&Igi(e.v)?(i=axa(e.s),n=axa(e.v),t=m7S(e.h,i,n),u=!0,l="hsv"):Igi(e.h)&&Igi(e.s)&&Igi(e.l)&&(i=axa(e.s),a=axa(e.l),t=O7S(e.h,i,a),u=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=mLd(r),{ok:u,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function g7S(e,t,r){return{r:WR(e,255)*255,g:WR(t,255)*255,b:WR(r,255)*255}}function hLd(e,t,r){e=WR(e,255),t=WR(t,255),r=WR(r,255);var i=Math.max(e,t,r),n=Math.min(e,t,r),a,u,l=(i+n)/2;if(i==n)a=u=0;else{var d=i-n;switch(u=l>.5?d/(2-i-n):d/(i+n),i){case e:a=(t-r)/d+(t<r?6:0);break;case t:a=(r-e)/d+2;break;case r:a=(e-t)/d+4;break}a/=6}return{h:a,s:u,l}}function O7S(e,t,r){var i,n,a;e=WR(e,360),t=WR(t,100),r=WR(r,100);function u(s,o,c){return c<0&&(c+=1),c>1&&(c-=1),c<1/6?s+(o-s)*6*c:c<1/2?o:c<2/3?s+(o-s)*(2/3-c)*6:s}if(t===0)i=n=a=r;else{var l=r<.5?r*(1+t):r+t-r*t,d=2*r-l;i=u(d,l,e+1/3),n=u(d,l,e),a=u(d,l,e-1/3)}return{r:i*255,g:n*255,b:a*255}}function yLd(e,t,r){e=WR(e,255),t=WR(t,255),r=WR(r,255);var i=Math.max(e,t,r),n=Math.min(e,t,r),a,u,l=i,d=i-n;if(u=i===0?0:d/i,i==n)a=0;else{switch(i){case e:a=(t-r)/d+(t<r?6:0);break;case t:a=(r-e)/d+2;break;case r:a=(e-t)/d+4;break}a/=6}return{h:a,s:u,v:l}}function m7S(e,t,r){e=WR(e,360)*6,t=WR(t,100),r=WR(r,100);var i=Math.floor(e),n=e-i,a=r*(1-t),u=r*(1-n*t),l=r*(1-(1-n)*t),d=i%6,s=[r,u,a,a,l,r][d],o=[l,r,r,u,a,a][d],c=[a,a,l,r,r,u][d];return{r:s*255,g:o*255,b:c*255}}function vLd(e,t,r,i){var n=[q$t(Math.round(e).toString(16)),q$t(Math.round(t).toString(16)),q$t(Math.round(r).toString(16))];return i&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function P7S(e,t,r,i,n){var a=[q$t(Math.round(e).toString(16)),q$t(Math.round(t).toString(16)),q$t(Math.round(r).toString(16)),q$t(PLd(i))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function bLd(e,t,r,i){var n=[q$t(PLd(i)),q$t(Math.round(e).toString(16)),q$t(Math.round(t).toString(16)),q$t(Math.round(r).toString(16))];return n.join("")}F_.equals=function(e,t){return!e||!t?!1:F_(e).toRgbString()==F_(t).toRgbString()};F_.random=function(){return F_.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function j7S(e,t){t=t===0?0:t||10;var r=F_(e).toHsl();return r.s-=t/100,r.s=CIo(r.s),F_(r)}function w7S(e,t){t=t===0?0:t||10;var r=F_(e).toHsl();return r.s+=t/100,r.s=CIo(r.s),F_(r)}function S7S(e){return F_(e).desaturate(100)}function D7S(e,t){t=t===0?0:t||10;var r=F_(e).toHsl();return r.l+=t/100,r.l=CIo(r.l),F_(r)}function E7S(e,t){t=t===0?0:t||10;var r=F_(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),F_(r)}function M7S(e,t){t=t===0?0:t||10;var r=F_(e).toHsl();return r.l-=t/100,r.l=CIo(r.l),F_(r)}function A7S(e,t){var r=F_(e).toHsl(),i=(r.h+t)%360;return r.h=i<0?360+i:i,F_(r)}function q7S(e){var t=F_(e).toHsl();return t.h=(t.h+180)%360,F_(t)}function gLd(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=F_(e).toHsl(),i=[F_(e)],n=360/t,a=1;a<t;a++)i.push(F_({h:(r.h+a*n)%360,s:r.s,l:r.l}));return i}function T7S(e){var t=F_(e).toHsl(),r=t.h;return[F_(e),F_({h:(r+72)%360,s:t.s,l:t.l}),F_({h:(r+216)%360,s:t.s,l:t.l})]}function C7S(e,t,r){t=t||6,r=r||30;var i=F_(e).toHsl(),n=360/r,a=[F_(e)];for(i.h=(i.h-(n*t>>1)+720)%360;--t;)i.h=(i.h+n)%360,a.push(F_(i));return a}function B7S(e,t){t=t||6;for(var r=F_(e).toHsv(),i=r.h,n=r.s,a=r.v,u=[],l=1/t;t--;)u.push(F_({h:i,s:n,v:a})),a=(a+l)%1;return u}F_.mix=function(e,t,r){r=r===0?0:r||50;var i=F_(e).toRgb(),n=F_(t).toRgb(),a=r/100,u={r:(n.r-i.r)*a+i.r,g:(n.g-i.g)*a+i.g,b:(n.b-i.b)*a+i.b,a:(n.a-i.a)*a+i.a};return F_(u)};F_.readability=function(e,t){var r=F_(e),i=F_(t);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};F_.isReadable=function(e,t,r){var i=F_.readability(e,t),n,a;switch(a=!1,n=F7S(r),n.level+n.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7;break}return a};F_.mostReadable=function(e,t,r){var i=null,n=0,a,u,l,d;r=r||{},u=r.includeFallbackColors,l=r.level,d=r.size;for(var s=0;s<t.length;s++)a=F_.readability(e,t[s]),a>n&&(n=a,i=F_(t[s]));return F_.isReadable(e,i,{level:l,size:d})||!u?i:(r.includeFallbackColors=!1,F_.mostReadable(e,["#fff","#000"],r))};var jJs=F_.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},I7S=F_.hexNames=z7S(jJs);function z7S(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function mLd(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function WR(e,t){R7S(e)&&(e="100%");var r=x7S(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function CIo(e){return Math.min(1,Math.max(0,e))}function eAe(e){return parseInt(e,16)}function R7S(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function x7S(e){return typeof e=="string"&&e.indexOf("%")!=-1}function q$t(e){return e.length==1?"0"+e:""+e}function axa(e){return e<=1&&(e=e*100+"%"),e}function PLd(e){return Math.round(parseFloat(e)*255).toString(16)}function OLd(e){return eAe(e)/255}var A$t=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Igi(e){return!!A$t.CSS_UNIT.exec(e)}function N7S(e){e=e.replace(y7S,"").replace(v7S,"").toLowerCase();var t=!1;if(jJs[e])e=jJs[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=A$t.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=A$t.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=A$t.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=A$t.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=A$t.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=A$t.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=A$t.hex8.exec(e))?{r:eAe(r[1]),g:eAe(r[2]),b:eAe(r[3]),a:OLd(r[4]),format:t?"name":"hex8"}:(r=A$t.hex6.exec(e))?{r:eAe(r[1]),g:eAe(r[2]),b:eAe(r[3]),format:t?"name":"hex"}:(r=A$t.hex4.exec(e))?{r:eAe(r[1]+""+r[1]),g:eAe(r[2]+""+r[2]),b:eAe(r[3]+""+r[3]),a:OLd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=A$t.hex3.exec(e))?{r:eAe(r[1]+""+r[1]),g:eAe(r[2]+""+r[2]),b:eAe(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function F7S(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}function jLd(e={accentPrimary:void 0,background:void 0},t){e.accentPrimary=e.accentPrimary??e.accentPrimaryDeprecated;let r=IIo(e);switch(r){case"dark":return{type:"dark",...BIo(e,t,"dark")};case"light":return{type:"light",...BIo(e,t,"light")};case"darkAndLight":return{type:"darkAndLight",dark:BIo(e,t,"dark"),light:BIo(e,t,"light")};default:So(r)}}function IIo({background:e,accentPrimary:t,accentPrimaryDeprecated:r}){if(t=t??r,typeof e=="string"&&typeof t=="string")return F_(e).isDark()?"dark":"light";if(e!=null){if(typeof e=="string")return F_(e).isDark()?"dark":"light";if(e.dark!=null&&e.light!=null)return"darkAndLight"}if(t!=null){if(typeof t=="string")return F_(t).isLight()?"dark":"light";if(t.dark!=null&&t.light!=null)return"darkAndLight"}if(t!=null&&e!=null){if(e.dark!=null&&t.dark!=null)return"dark";if(e.light!=null&&t.light!=null)return"light"}return"darkAndLight"}function BIo(e,t,r){let i=t9n(e.accentPrimary??e.accentPrimaryDeprecated,t,"accent-primary",r)??F_.random(),n=t9n(e.background,t,"background",r);return{accentPrimary:i.toRgb(),background:n?.toRgb(),border:t9n(e.border,t,"border",r)?.toRgb(),sidebarBackground:t9n(e.sidebarBackground,t,"sidebar-background",r)?.toRgb(),headerBackground:t9n(e.headerBackground,t,"header-background",r)?.toRgb(),cardBackground:t9n(e.cardBackground,t,"card-background",r)?.toRgb(),logo:void 0,backgroundImage:void 0}}function oxa(e,t,r){if(e==null)return;let i=typeof e=="string"?e:e[r];if(i==null&&t==="accent-primary"&&typeof e!="string"&&(i=e[r==="dark"?"light":"dark"]),i!=null)return i}function t9n(e,t,r,i){let n=oxa(e,r,i);if(n==null)return;let a=F_(n);return a.isValid()||t.failAndThrow(`'${typeof e=="string"?r:`colors.${r}.${i}`}' should be a hex color of the format #FFFFFF`),a}var Pxo=require("fs/promises");var oH=ui(hAe(),1);var JOp=require("fs/promises");var QOp=100;async function lGS({files:e,absolutePathToFernFolder:t}){let r=await Promise.all(e.map(async i=>{let n=await(0,JOp.readFile)(i,"utf-8");return[_ae(t,i),n]}));return Object.fromEntries(r)}async function KOp({files:e,absolutePathToFernFolder:t}){let r={};for(let i=0;i<e.length;i+=QOp){let n=e.slice(i,i+QOp),a=await lGS({files:n,absolutePathToFernFolder:t});Object.assign(r,a)}return r}function gxo({landingPage:e,navigation:t}){return Xxe([e?.absolutePath,...fGS(t)])}function fGS(e){switch(e.type){case"tabbed":return e.items.flatMap(t=>t.child.type==="layout"?t.child.layout.flatMap(r=>AZs({item:r})):t.child.type==="changelog"?t.child.changelog:[]);case"untabbed":return e.items.flatMap(t=>AZs({item:t}));case"versioned":return e.versions.flatMap(t=>gxo({landingPage:t.landingPage,navigation:t.navigation}));case"productgroup":return e.products.flatMap(t=>gxo({landingPage:t.landingPage,navigation:t.navigation}));default:So(e)}}function AZs({item:e}){switch(e.type){case"apiSection":return Xxe([e.overviewAbsolutePath,...e.navigation.flatMap(t=>YOp({item:t}))]);case"link":return[];case"page":return[e.absolutePath];case"section":return Xxe([e.overviewAbsolutePath,...e.contents.flatMap(t=>AZs({item:t}))]);case"changelog":return e.changelog;default:So(e)}}function YOp({item:e}){return e.type==="page"?[e.absolutePath]:e.type==="package"||e.type==="section"?Xxe([e.overviewAbsolutePath,...e.contents.flatMap(t=>YOp({item:t}))]):[]}async function BZs({rawDocsConfiguration:e,absolutePathToFernFolder:t,absoluteFilepathToDocsConfig:r,context:i}){let{instances:n,title:a,tabs:u,products:l,versions:d,navigation:s,navbarLinks:o,footerLinks:c,defaultLanguage:b,metadata:g,redirects:O,logo:m,favicon:w,backgroundImage:E,colors:q,typography:M,layout:D,analytics:C,integrations:R,css:G,js:I,aiChat:F,aiSearch:V,experimental:X}=e,K=Lxa(e.landingPage,r),Y=gGS({tabs:u,products:l,versions:d,navigation:s,absolutePathToFernFolder:t,absolutePathToConfig:r,context:i}),oe=Y.then(wt=>KOp({files:gxo({navigation:wt,landingPage:K}),absolutePathToFernFolder:t})),pe=dGS(m,r),de=D8(w,r),Oe=pGS(E,r),Ue=M!=null?OGS({rawTypography:M,absoluteFilepathToDocsConfig:r}):void 0,bt=_GS(G,r),De=vGS(I,r),Te=zGS(g,r),[Rt,Pe,ot,at,me,we]=await Promise.all([Y,oe,Ue,bt,De,Te]);return{title:a,instances:n,roles:e.roles,pages:Pe,landingPage:K,navigation:Rt,navbarLinks:BGS(o),footerLinks:IGS(c),defaultLanguage:b,announcement:e.announcement,metadata:we,redirects:O?.map(wt=>({...wt,permanent:wt?.permanent})),logo:pe,favicon:de,backgroundImage:Oe,colors:jLd(q,i),typography:ot,layout:bGS(D),analyticsConfig:{...e.analytics,intercom:e.analytics?.intercom?{...e.analytics.intercom,appId:e.analytics.intercom.appId,apiBase:e.analytics.intercom.apiBase}:void 0,fullstory:e.analytics?.fullstory,posthog:e.analytics?.posthog?{...e.analytics.posthog,apiKey:e.analytics.posthog.apiKey,endpoint:e.analytics.posthog.endpoint}:void 0,segment:e.analytics?.segment,gtm:e.analytics?.gtm,ga4:e.analytics?.ga4,amplitude:void 0,mixpanel:void 0,hotjar:void 0,koala:void 0,logrocket:void 0,pirsch:void 0,plausible:void 0,fathom:void 0,clearbit:void 0,heap:void 0},integrations:{...R,intercom:R?.intercom?R.intercom:void 0},css:at,js:me,aiChatConfig:V??F,experimental:X}}function dGS(e,t){return e!=null?{dark:D8(e.dark,t),light:D8(e.light,t),height:e.height,href:e.href!=null?oH.FernRegistry.Url(e.href):void 0}:void 0}function pGS(e,t){if(e!=null)if(typeof e=="string"){let r=D8(e,t);return{dark:r,light:r}}else{let r=D8(e.dark,t),i=D8(e.light,t);return{dark:r,light:i}}}async function _GS(e,t){if(e==null)return;let r=typeof e=="string"?[e]:e;return{inline:await Promise.all(r.map(async i=>(await(0,Pxo.readFile)(D8(i,t))).toString()))}}function hGS(e){return Object.hasOwn(e,"url")}function yGS(e){return Object.hasOwn(e,"path")}async function vGS(e,t){let r=[],i=[];if(e==null)return{files:[]};let n=Array.isArray(e)?e:[e];for(let a of n)typeof a=="string"?i.push({absolutePath:D8(a,t)}):hGS(a)?r.push({strategy:a.strategy,url:oH.FernRegistry.Url(a.url)}):yGS(a)&&i.push({absolutePath:D8(a.path,t),strategy:a.strategy});return{remote:r,files:i}}function bGS(e){if(e!=null)return{pageWidth:e.pageWidth?.trim().toLowerCase()==="full"?{type:"full"}:Oxo(e.pageWidth),contentWidth:Oxo(e.contentWidth),sidebarWidth:Oxo(e.sidebarWidth),headerHeight:Oxo(e.headerHeight),searchbarPlacement:e.searchbarPlacement==="header"?oH.FernRegistry.docs.v1.commons.SearchbarPlacement.Header:e.searchbarPlacement==="header-tabs"?oH.FernRegistry.docs.v1.commons.SearchbarPlacement.HeaderTabs:oH.FernRegistry.docs.v1.commons.SearchbarPlacement.Sidebar,tabsPlacement:e.tabsPlacement==="header"?oH.FernRegistry.docs.v1.commons.TabsPlacement.Header:oH.FernRegistry.docs.v1.commons.TabsPlacement.Sidebar,contentAlignment:e.contentAlignment==="left"?oH.FernRegistry.docs.v1.commons.ContentAlignment.Left:oH.FernRegistry.docs.v1.commons.ContentAlignment.Center,headerPosition:e.headerPosition==="static"?oH.FernRegistry.docs.v1.commons.HeaderPosition.Absolute:oH.FernRegistry.docs.v1.commons.HeaderPosition.Fixed,disableHeader:e.disableHeader??!1}}function Oxo(e){if(e==null)return;let t=e.trim().toLowerCase(),r=t.match(/^(\d+)px$/);if(r!=null&&r[1]!=null)return{type:"px",value:parseFloat(r[1])};let i=t.match(/^(\d+)rem$/);if(i!=null&&i[1]!=null)return{type:"rem",value:parseFloat(i[1])}}async function XOp({versions:e,absolutePathToFernFolder:t,context:r}){let i=[];for(let n of e){let a=Cv(t,n.path),u=wd.load((await(0,Pxo.readFile)(a)).toString()),l=dae.RawSchemas.Serializer.VersionFileConfig.parseOrThrow(u),d=await CZs({tabs:l.tabs,rawNavigationConfig:l.navigation,absolutePathToFernFolder:t,absolutePathToConfig:a,context:r});i.push({landingPage:Lxa(l.landingPage,a),version:n.displayName,navigation:d,availability:n.availability,slug:n.slug,viewers:ENe(n.viewers),orphaned:n.orphaned,featureFlags:DNe(n.featureFlag)})}return{type:"versioned",versions:i}}async function gGS({tabs:e,products:t,versions:r,navigation:i,absolutePathToFernFolder:n,absolutePathToConfig:a,context:u}){if(i!=null)return await CZs({tabs:e,rawNavigationConfig:i,absolutePathToFernFolder:n,absolutePathToConfig:a,context:u});if(t!=null){let l=[];for(let d of t){let s=Cv(n,d.path),o=d.image!=null?Cv(n,d.image):void 0,c=wd.load((await(0,Pxo.readFile)(s)).toString()),b=dae.RawSchemas.Serializer.ProductFileConfig.parseOrThrow(c),g;d.versions!=null&&d.versions.length>0?g=await XOp({versions:d.versions,absolutePathToFernFolder:n,context:u}):g=await CZs({tabs:b.tabs,rawNavigationConfig:b.navigation,absolutePathToFernFolder:n,absolutePathToConfig:s,context:u}),l.push({landingPage:Lxa(b.landingPage,s),product:d.displayName,navigation:g,slug:d.slug,subtitle:d.subtitle,icon:d.icon||"fa-solid fa-code",image:o,viewers:ENe(d.viewers),orphaned:d.orphaned,featureFlags:DNe(d.featureFlag)})}return{type:"productgroup",products:l}}else if(r!=null)return await XOp({versions:r,absolutePathToFernFolder:n,context:u});throw new Error("Unexpected. Docs have neither navigation or versions defined.")}function DNe(e){if(e!=null)return typeof e=="string"?[{flag:e,match:!0,fallbackValue:void 0}]:Array.isArray(e)?e.map(t=>({flag:t.flag,match:t.match,fallbackValue:t.fallbackValue})):[{flag:e.flag,match:e.match??!0,fallbackValue:e.fallbackValue}]}async function OGS({rawTypography:e,absoluteFilepathToDocsConfig:t}){return{headingsFont:e.headingsFont!=null?await qZs({rawFontConfig:e.headingsFont,absoluteFilepathToDocsConfig:t}):void 0,bodyFont:e.bodyFont!=null?await qZs({rawFontConfig:e.bodyFont,absoluteFilepathToDocsConfig:t}):void 0,codeFont:e.codeFont!=null?await qZs({rawFontConfig:e.codeFont,absoluteFilepathToDocsConfig:t}):void 0}}async function qZs({rawFontConfig:e,absoluteFilepathToDocsConfig:t}){return{name:e.name,variants:await mGS(e,t),display:e.display,fallback:e.fallback,fontVariationSettings:e.fontVariationSettings}}function mGS(e,t){let r=[];return e.path!=null&&r.push({path:e.path,weight:e.weight,style:e.style}),e.paths?.forEach(i=>{typeof i=="string"?r.push({path:i,weight:e.weight,style:e.style}):r.push({path:i.path,weight:i.weight??e.weight,style:i.style??e.style})}),Promise.all(r.map(async i=>({absolutePath:D8(i.path,t),weight:PGS(i.weight),style:i.style})))}function PGS(e){return e==null?void 0:typeof e=="number"?[e.toString()]:e.split(/\D+/).filter(r=>r!==""&&["100","200","300","400","500","600","700","800","900"].includes(r))}async function jGS({tabs:e,item:t,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n}){let a=e[t.tab];if(a==null)throw new Error(`Tab ${t.tab} is not defined in the tabs config.`);if(t.layout!=null){let u=await Promise.all(t.layout.map(l=>IZs({rawConfig:l,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n})));return{title:a.displayName,icon:a.icon,slug:a.slug,skipUrlSlug:a.skipSlug,hidden:a.hidden,child:{type:"layout",layout:u},viewers:ENe(a.viewers),orphaned:a.orphaned,featureFlags:DNe(a.featureFlag)}}if(a.href!=null)return{title:a.displayName,icon:a.icon,slug:a.slug,skipUrlSlug:a.skipSlug,hidden:a.hidden,child:{type:"link",href:a.href},viewers:ENe(a.viewers),orphaned:a.orphaned,featureFlags:DNe(a.featureFlag)};if(a.changelog!=null)return{title:a.displayName,icon:a.icon,slug:a.slug,skipUrlSlug:a.skipSlug,hidden:a.hidden,child:{type:"changelog",changelog:await pae(D8(a.changelog,i),"{md,mdx}")},viewers:ENe(a.viewers),orphaned:a.orphaned,featureFlags:DNe(a.featureFlag)};So(a)}async function CZs({tabs:e={},rawNavigationConfig:t,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n}){return CGS(t)?{type:"tabbed",items:await Promise.all(t.map(u=>jGS({tabs:e,item:u,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n})))}:{type:"untabbed",items:await Promise.all(t.map(a=>IZs({rawConfig:a,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n})))}}var wGS="Changelog";async function IZs({rawConfig:e,absolutePathToFernFolder:t,absolutePathToConfig:r,context:i}){if(ZOp(e))return Lxa(e,r);if(DGS(e))return{type:"section",title:e.section,icon:e.icon,contents:await Promise.all(e.contents.map(n=>IZs({rawConfig:n,absolutePathToFernFolder:t,absolutePathToConfig:r,context:i}))),slug:e.slug??void 0,collapsed:e.collapsed??void 0,hidden:e.hidden??void 0,skipUrlSlug:e.skipSlug??!1,overviewAbsolutePath:D8(e.path,r),viewers:ENe(e.viewers),orphaned:e.orphaned,featureFlags:DNe(e.featureFlag)};if(EGS(e))return{type:"apiSection",openrpc:e.openrpc,title:e.api,icon:e.icon,apiName:e.apiName??void 0,audiences:e.audiences!=null?{type:"select",audiences:e.audiences}:{type:"all"},showErrors:e.displayErrors??!0,snippetsConfiguration:e.snippets!=null?SGS({rawConfig:e.snippets}):void 0,navigation:e.layout?.flatMap(n=>mxo(n,r))??[],overviewAbsolutePath:D8(e.summary,r),hidden:e.hidden??void 0,slug:e.slug,skipUrlSlug:e.skipSlug??!1,flattened:e.flattened??!1,alphabetized:e.alphabetized??!1,paginated:e.paginated??!1,playground:e.playground,viewers:ENe(e.viewers),orphaned:e.orphaned,featureFlags:DNe(e.featureFlag)};if(kOp(e))return{type:"link",text:e.link,url:e.href,icon:e.icon};if(MGS(e))return{type:"changelog",changelog:await pae(D8(e.changelog,r),"{md,mdx}"),hidden:e.hidden??!1,icon:e.icon,title:e.title??wGS,slug:e.slug,viewers:ENe(e.viewers),orphaned:e.orphaned,featureFlags:DNe(e.featureFlag)};So(e)}function Lxa(e,t){if(e!=null)return{type:"page",title:e.page,absolutePath:D8(e.path,t),slug:e.slug,icon:e.icon,hidden:e.hidden,noindex:e.noindex,viewers:ENe(e.viewers),orphaned:e.orphaned,featureFlags:DNe(e.featureFlag)}}function mxo(e,t){return typeof e=="string"?[{type:"item",value:e}]:ZOp(e)?[Lxa(e,t)]:kOp(e)?[{type:"link",text:e.link,url:e.href,icon:e.icon}]:AGS(e)?[{type:"section",title:e.section,referencedSubpackages:e.referencedPackages??[],overviewAbsolutePath:D8(e.summary,t),contents:e.contents?.flatMap(r=>mxo(r,t))??[],slug:e.slug,hidden:e.hidden,skipUrlSlug:e.skipSlug,icon:e.icon,playground:e.playground,viewers:ENe(e.viewers),orphaned:e.orphaned,featureFlags:DNe(e.featureFlag)}]:qGS(e)?[{type:"endpoint",endpoint:e.endpoint,title:e.title,icon:e.icon,slug:e.slug,hidden:e.hidden,playground:e.playground,viewers:ENe(e.viewers),orphaned:e.orphaned,featureFlags:DNe(e.featureFlag)}]:Object.entries(e).map(([r,i])=>TGS(i)?{type:"package",title:i.title,package:r,overviewAbsolutePath:D8(i.summary,t),contents:i.contents?.flatMap(n=>mxo(n,t))??[],slug:i.slug,hidden:i.hidden,skipUrlSlug:i.skipSlug,icon:i.icon,playground:i.playground,viewers:ENe(i.viewers),orphaned:i.orphaned,featureFlags:DNe(i.featureFlag)}:{type:"package",title:void 0,package:r,overviewAbsolutePath:void 0,contents:i.flatMap(n=>mxo(n,t)),hidden:!1,slug:void 0,skipUrlSlug:!1,icon:void 0,playground:void 0,viewers:void 0,orphaned:void 0,featureFlags:void 0})}function SGS({rawConfig:e}){return{python:e.python,typescript:e.typescript,go:e.go,java:e.java,ruby:e.ruby,csharp:e.csharp}}function ZOp(e){return vw(e)&&typeof e.page=="string"&&typeof e.path=="string"}function DGS(e){return e.section!=null}function EGS(e){return e.api!=null}function kOp(e){return dae.RawSchemas,vw(e)&&typeof e.link=="string"&&typeof e.href=="string"}function MGS(e){return vw(e)&&typeof e.changelog=="string"}function AGS(e){return vw(e)&&typeof e.section=="string"&&Array.isArray(e.contents)}function qGS(e){return vw(e)&&typeof e.endpoint=="string"}function TGS(e){return!Array.isArray(e)}function D8(e,t){if(e!=null)return Cv(Rd(t),e)}function CGS(e){return Array.isArray(e)&&e.length>0&&e[0].tab!=null}function BGS(e){return e?.map(t=>t.type==="github"?{type:"github",url:oH.FernRegistry.Url(t.value)}:{type:t.type,text:t.text,url:oH.FernRegistry.Url(t.href??t.url??"/"),icon:t.icon,rightIcon:t.rightIcon,rounded:t.rounded})}function IGS(e){if(e==null)return;let t=[];if(Object.keys(e).forEach(r=>{let i=e[r];i!=null&&t.push({type:r,value:oH.FernRegistry.Url(i)})}),t.length!==0)return t}async function zGS(e,t){if(e!=null)return{"og:site_name":e.ogSiteName,"og:title":e.ogTitle,"og:description":e.ogDescription,"og:url":e.ogUrl,"og:image":await TZs(e.ogImage,t),"og:image:width":e.ogImageWidth,"og:image:height":e.ogImageHeight,"og:locale":e.ogLocale,"og:logo":await TZs(e.ogLogo,t),"twitter:title":e.twitterTitle,"twitter:description":e.twitterDescription,"twitter:image":await TZs(e.twitterImage,t),"twitter:handle":e.twitterHandle,"twitter:site":e.twitterSite,"twitter:url":e.twitterUrl,"twitter:card":e.twitterCard,nofollow:void 0,noindex:void 0}}async function TZs(e,t){if(e==null)return;if(e.startsWith("http"))return{type:"url",value:e};let r=D8(e,t);return await jf(r)?{type:"filepath",value:r}:{type:"url",value:e}}function ENe(e){if(e!=null){if(typeof e=="string")return[oH.FernRegistry.RoleId(e)];if(e.length!==0)return e.map(oH.FernRegistry.RoleId)}}var tmp=require("fs/promises");var emp=Su.strictObject({organization:Su.string(),version:Su.string()});async function Xgi({directory:e,context:t}){let r=Eu(e,Ia.of(cae)),i=await(0,tmp.readFile)(r),n=JSON.parse(i.toString()),a=await Yqo({schema:emp,value:n,context:t,filepathBeingParsed:r});return{_absolutePath:r,rawConfig:a,organization:a.organization,version:a.version}}var Uxa={[$.JAVA]:{version:"2.38.1"},[$.TYPESCRIPT_EXPRESS]:{version:"0.18.4",output:{location:"local-file-system",path:"../src/fern"}},[$.JAVA_MODEL]:{version:"1.0.0"},[$.JAVA_SDK]:{version:"2.38.1",output:{location:"local-file-system",path:"../sdks/java/src/main/java/"}},[$.JAVA_SPRING]:{version:"0.9.2",output:{location:"local-file-system",path:"../src/main/java/com/fern"}},[$.TYPESCRIPT]:{version:"0.0.247"},[$.TYPESCRIPT_SDK]:{version:"2.3.2",output:{location:"local-file-system",path:"../sdks/typescript"}},[$.TYPESCRIPT_NODE_SDK]:{version:"2.3.2",output:{location:"local-file-system",path:"../sdks/typescript"}},[$.TYPESCRIPT_BROWSER_SDK]:{version:"1.0.0",output:{location:"local-file-system",path:"../sdks/typescript"}},[$.PYTHON_PYDANTIC]:{version:"1.4.7"},[$.PYTHON_FASTAPI]:{version:"1.7.0",output:{location:"local-file-system",path:"../src/fern"}},[$.PYTHON_SDK]:{version:"4.23.2",output:{location:"local-file-system",path:"../sdks/python"}},[$.GO_FIBER]:{version:"0.23.5"},[$.GO_MODEL]:{version:"0.23.5"},[$.GO_SDK]:{version:"1.4.0",output:{location:"local-file-system",path:"../sdks/go"},config:{module:{path:"sdk"}}},[$.RUBY_MODEL]:{version:"0.0.8"},[$.RUBY_SDK]:{version:"0.8.2",output:{location:"local-file-system",path:"../sdks/ruby"}},[$.OPENAPI]:{version:"0.1.7",config:{format:"yaml"},output:{location:"local-file-system",path:"../openapi"}},[$.STOPLIGHT]:{version:"0.0.28",config:{format:"yaml"}},[$.POSTMAN]:{version:"0.4.0",output:{location:"local-file-system",path:"../postman"}},[$.OPENAPI_PYTHON_CLIENT]:{version:"0.0.0",output:{location:"local-file-system",path:"../sdks/python"},config:{format:"yaml"}},[$.CSHARP_MODEL]:{version:"0.0.1"},[$.CSHARP_SDK]:{version:"2.0.2",output:{location:"local-file-system",path:"../sdks/csharp"}},[$.SWIFT_MODEL]:{version:"0.0.0"},[$.SWIFT_SDK]:{version:"0.0.0",output:{location:"local-file-system",path:"../sdks/swift/sdk"}},[$.PHP_MODEL]:{version:"0.0.0"},[$.PHP_SDK]:{version:"1.16.3",output:{location:"local-file-system",path:"../sdks/php/sdk"}},[$.RUST_MODEL]:{version:"0.0.1",output:{location:"local-file-system",path:"../models/rust"}},[$.RUST_SDK]:{version:"0.0.1",output:{location:"local-file-system",path:"../sdks/rust"}}};function CIi(e,t){let r=RGS(e);return r??t.failAndThrow("Unrecognized generator: "+e)}function RGS(e){if(e.startsWith("fernapi/")||(e=`fernapi/${e}`),xGS(e))return e}function xGS(e){return Object.values($).includes(e)}var AEp=ui(BIi(),1),lFo=ui(ONa(),1);async function Irr({generatorName:e,cliVersion:t,channel:r,currentGeneratorVersion:i,includeMajor:n,context:a}){let u=AEp.default.parse(i),l=new lFo.FernRegistryClient({environment:"https://registry.buildwithfern.com"});a?.logger.debug(`Getting latest version for ${e} with CLI version ${t}, includeMajor: ${n}, prior version: ${u}`);let d={generator:fuD(e,a),releaseTypes:[r??lFo.FernRegistry.generators.ReleaseType.Ga],cliVersion:t==="0.0.0"?void 0:t};!n&&u!=null&&(d.generatorMajorVersion=u.major);let s=await l.generators.versions.getLatestGeneratorRelease(d);if(s.ok)return s.body.version}function fuD(e,t){switch(e.startsWith("fernapi/")&&(e=e.replace("fernapi/","")),e){case"fern-python-sdk":return"python-sdk";case"fern-pydantic-model":return"pydantic";case"fern-fastapi-server":return"fastapi";case"fern-typescript-browser-sdk":case"fern-typescript-node-sdk":case"fern-typescript-sdk":return"ts-sdk";case"fern-typescript-express":return"ts-express";case"fern-java-sdk":return"java-sdk";case"java-model":return"java-model";case"fern-java-spring":return"java-spring";case"fern-go-sdk":return"go-sdk";case"fern-go-model":return"go-model";case"fern-go-fiber":return"go-fiber";case"fern-csharp-sdk":return"csharp-sdk";case"fern-csharp-model":return"csharp-model";case"fern-ruby-sdk":return"ruby-sdk";case"fern-ruby-model":return"ruby-model";case"fern-postman":return"postman";case"fern-openapi":return"openapi";case"fern-php-sdk":return"php-sdk";case"fern-php-model":return"php-model";case"fern-rust-sdk":return"rust-sdk";case"fern-rust-model":return"rust-model";case"fern-swift-sdk":return"swift-sdk";case"fern-swift-model":return"swift-model";default:return t?.logger.warn(`Unrecognized generator name found, attempting to parse manually: ${e}`),e.startsWith("fern-")?e.replace("fern-",""):e}}async function qEp({generatorsConfiguration:e,groupName:t=e[ry.DEFAULT_GROUP_GENERATORS_CONFIG_KEY],context:r,update:i}){if(t==null)return r.failAndThrow("No group specified.");let n=e.groups??={},a=n[t];if(a==null){let u=n[t]??={generators:[]};await i(u,t)}else await i(a,t);return e}async function Vec({generatorName:e,generatorsConfiguration:t,groupName:r=t[iTo],context:i,cliVersion:n}){let a=CIi(e,i),u=Uxa[a];return await qEp({generatorsConfiguration:t,groupName:r,context:i,update:async l=>{l.generators.some(d=>d.name===a)&&i.failAndThrow(`${e} is already installed in group ${r}.`),l.generators.push({name:a,...u,version:await Irr({cliVersion:n,generatorName:a,context:i,channel:void 0})??u.version})}})}var rNp=require("fs/promises");var iNp=ui(require("path"),1);var Jxp=require("fs/promises"),Kxp=ui(require("path"),1);var zrr="$";var AF={};Po(AF,{AvailabilityStatusSchema:()=>CEp,FernDefinitionError:()=>wNa,FernDefinitionTimeoutError:()=>SNa,FormDataBodyEncodingStyle:()=>VEp,HttpMethodSchema:()=>UEp,ObjectPropertyAccess:()=>$Ep,StreamFormat:()=>WEp,SupportedSdkLanguageSchema:()=>xEp,WebSocketOrigin:()=>YEp,WebhookMethodSchema:()=>KEp,auth:()=>TEp,availability:()=>Wec,commons:()=>BEp,encoding:()=>IEp,environments:()=>zEp,errors:()=>REp,examples:()=>Hec,file:()=>NEp,pagination:()=>FEp,products:()=>LEp,serialization:()=>vtc,service:()=>$ec,source:()=>HEp,types:()=>Gec,validation:()=>GEp,variables:()=>QEp,versioning:()=>JEp,webhooks:()=>Qec,websocket:()=>Jec});var TEp={};var Wec={};Po(Wec,{AvailabilityStatusSchema:()=>CEp});var CEp={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available"};var BEp={};var IEp={};var zEp={};var REp={};var Hec={};Po(Hec,{SupportedSdkLanguageSchema:()=>xEp});var xEp={Curl:"curl",Python:"python",Javascript:"javascript",Typescript:"typescript",Go:"go",Ruby:"ruby",Csharp:"csharp",Java:"java",Js:"js",Node:"node",Ts:"ts",Nodets:"nodets",Golang:"golang",Dotnet:"dotnet",Jvm:"jvm",Csharp2:"c#"};var NEp={};var FEp={};var LEp={};var $ec={};Po($ec,{FormDataBodyEncodingStyle:()=>VEp,HttpMethodSchema:()=>UEp,StreamFormat:()=>WEp});var UEp={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"};var VEp={Json:"json",Exploded:"exploded",Form:"form"};var WEp={Sse:"sse",Json:"json"};var HEp={};var Gec={};Po(Gec,{ObjectPropertyAccess:()=>$Ep});var $Ep={ReadOnly:"read-only",WriteOnly:"write-only"};var GEp={};var QEp={};var JEp={};var Qec={};Po(Qec,{WebhookMethodSchema:()=>KEp});var KEp={Post:"POST",Get:"GET"};var Jec={};Po(Jec,{WebSocketOrigin:()=>YEp});var YEp={Client:"client",Server:"server"};var vtc={};Po(vtc,{AliasSchema:()=>D3o,AnyAuthItem:()=>hFo,AnyAuthSchemesSchema:()=>yFo,ApiAuthSchema:()=>vFo,AuthSchemeDeclarationSchema:()=>BFo,AuthSchemeReferenceSchema:()=>gLn,AuthVariable:()=>Fen,AvailabilitySchema:()=>zFo,AvailabilityStatusSchema:()=>mLn,AvailabilityUnionSchema:()=>RFo,BaseTypeDeclarationSchema:()=>HNe,BaseTypeReferenceSchema:()=>SLn,BasicAuthSchemeSchema:()=>DFo,BearerAuthSchemeSchema:()=>CFo,CasingOverridesSchema:()=>f3o,CursorPaginationSchema:()=>Y3o,CustomPaginationSchema:()=>Z3o,DeclarationSchema:()=>Rrr,DeclarationWithNameSchema:()=>wMp,DeclarationWithoutDocsSchema:()=>LFo,DefinitionFileSchema:()=>p7o,DiscriminatedUnionSchema:()=>P3o,EncodingSchema:()=>PLn,EnumSchema:()=>_3o,EnumValue:()=>p3o,EnumValueSchema:()=>d3o,EnvironmentSchema:()=>HFo,ErrorDeclarationSchema:()=>QFo,ErrorDiscriminationSchema:()=>O7o,ExampleBodyResponseSchema:()=>YFo,ExampleCodeSampleSchema:()=>n3o,ExampleCodeSampleSchemaLanguage:()=>i3o,ExampleCodeSampleSchemaSdk:()=>r3o,ExampleEndpointCallArraySchema:()=>SMp,ExampleEndpointCallSchema:()=>wLn,ExampleResponseSchema:()=>e3o,ExampleSseEventSchema:()=>ZFo,ExampleSseResponseSchema:()=>kFo,ExampleStreamResponseSchema:()=>XFo,ExampleTypeReferenceSchema:()=>A8,ExampleTypeSchema:()=>jLn,ExampleTypeValueSchema:()=>GFo,ExampleWebSocketMessage:()=>JFo,ExampleWebSocketSession:()=>KFo,ExampleWebhookCallSchema:()=>a3o,Export:()=>y7o,ExportDetailed:()=>h7o,FormDataBodyEncodingStyle:()=>z3o,GrpcTransport:()=>M3o,HeaderAuthSchemeSchema:()=>SFo,HttpEndpointSchema:()=>e7o,HttpHeaderSchema:()=>$Ne,HttpInlineFileRequestBodyPropertySchema:()=>R3o,HttpInlineRequestBodyPropertySchema:()=>x3o,HttpInlineRequestBodySchema:()=>N3o,HttpMethodSchema:()=>A3o,HttpPathParameterSchema:()=>xrr,HttpQueryParameterSchema:()=>ELn,HttpReferencedRequestBodySchema:()=>I3o,HttpRequest:()=>U3o,HttpRequestBodySchema:()=>F3o,HttpRequestSchema:()=>L3o,HttpResponseSchema:()=>W3o,HttpResponseSchemaDetailed:()=>V3o,HttpResponseStreamSchema:()=>G3o,HttpResponseStreamSchemaDetailed:()=>$3o,HttpServiceSchema:()=>t7o,InferredAuthenticatedRequestHeader:()=>MFo,InferredBearerAuthSchema:()=>TFo,InferredGetTokenEndpointSchema:()=>qFo,InferredGetTokenEndpointSchemaObject:()=>AFo,MultipleBaseUrlsEnvironmentSchema:()=>WFo,Navigation:()=>_7o,NumberValidationSchema:()=>NFo,OAuthAccessTokenRequestPropertiesSchema:()=>bFo,OAuthAccessTokenResponsePropertiesSchema:()=>gFo,OAuthGetTokenEndpointSchema:()=>OFo,OAuthRefreshTokenEndpointSchema:()=>jFo,OAuthRefreshTokenRequestPropertiesSchema:()=>mFo,OAuthRefreshTokenResponsePropertiesSchema:()=>PFo,OAuthSchemeSchema:()=>wFo,ObjectExtendsSchema:()=>VNe,ObjectPropertyAccess:()=>o3o,ObjectPropertySchema:()=>rzi,ObjectPropertyWithAccessSchema:()=>u3o,ObjectSchema:()=>l3o,OffsetPaginationSchema:()=>X3o,OpenApiSourceSchema:()=>s3o,PackageMarkerFileSchema:()=>DMp,Pagination:()=>k3o,PaginationSchema:()=>MLn,ProductDeclarationHeaderObjectSchema:()=>A7o,ProductDeclarationHeaderSchema:()=>q7o,ProductDeclarationSchema:()=>T7o,ProductValue:()=>M7o,ProductValueDetailed:()=>E7o,PropertyBasedErrorDiscrimination:()=>b7o,ProtobufSourceSchema:()=>c3o,ProtobufTypeSchema:()=>UFo,QueryParameterTypeReferenceDetailed:()=>T3o,ResponseError:()=>J3o,ResponseErrorWithDocsSchema:()=>Q3o,ResponseErrorsSchema:()=>K3o,RootApiFileSchema:()=>EMp,ServiceTransport:()=>DLn,SingleBaseUrlEnvironmentSchema:()=>VFo,SingleUndiscriminatedUnionTypeDetailedSchema:()=>j3o,SingleUndiscriminatedUnionTypeSchema:()=>w3o,SingleUnionTypeDetailedSchema:()=>O3o,SingleUnionTypeKey:()=>g3o,SingleUnionTypeKeySchema:()=>b3o,SingleUnionTypeSchema:()=>m3o,SourceSchema:()=>izi,StatusCodeBasedErrorDiscrimination:()=>g7o,StreamFormat:()=>H3o,StringValidationSchema:()=>xFo,SupportedSdkLanguageSchema:()=>t3o,TokenBearerAuthSchema:()=>EFo,TypeDeclarationSchema:()=>E3o,TypeReferenceDeclarationWithEnvOverride:()=>B3o,TypeReferenceDeclarationWithEnvOverrideSchema:()=>C3o,TypeReferenceDeclarationWithName:()=>WNe,TypeReferenceDeclarationWithNameSchema:()=>MMp,TypeReferenceDetailedSchema:()=>v3o,TypeReferenceSchema:()=>iOi,UndiscriminatedUnionSchema:()=>S3o,UnionDiscriminant:()=>y3o,UnionDiscriminantSchema:()=>h3o,ValidationSchema:()=>tzi,VariableDeclarationDetailed:()=>m7o,VariableDeclarationSchema:()=>P7o,VariableReferenceSchema:()=>q3o,VersionDeclarationHeaderObjectSchema:()=>S7o,VersionDeclarationHeaderSchema:()=>D7o,VersionDeclarationSchema:()=>ALn,VersionValue:()=>w7o,VersionValueDetailed:()=>j7o,WebSocketChannelInlinedMessageSchema:()=>c7o,WebSocketChannelMessageBodySchema:()=>l7o,WebSocketChannelMessageSchema:()=>f7o,WebSocketChannelReferencedMessageSchema:()=>s7o,WebSocketChannelSchema:()=>d7o,WebSocketOrigin:()=>u7o,WebhookInlinedPayloadSchema:()=>n7o,WebhookMethodSchema:()=>r7o,WebhookPayloadSchema:()=>a7o,WebhookReferencedPayloadSchema:()=>i7o,WebhookSchema:()=>o7o,WithAudiences:()=>OL,WithAuthSchema:()=>IFo,WithAvailability:()=>SJ,WithDisplayName:()=>gL,WithDocsSchema:()=>Zp,WithEnvironmentVariable:()=>OLn,WithEnvironmentsSchema:()=>$Fo,WithHeadersSchema:()=>v7o,WithName:()=>pS,WithValidation:()=>FFo,auth:()=>kec,availability:()=>etc,commons:()=>ttc,encoding:()=>rtc,environments:()=>itc,errors:()=>ntc,examples:()=>atc,file:()=>otc,pagination:()=>utc,products:()=>stc,service:()=>ctc,source:()=>ltc,types:()=>ftc,validation:()=>dtc,variables:()=>ptc,versioning:()=>_tc,webhooks:()=>htc,websocket:()=>ytc});var kec={};Po(kec,{AnyAuthItem:()=>hFo,AnyAuthSchemesSchema:()=>yFo,ApiAuthSchema:()=>vFo,AuthSchemeDeclarationSchema:()=>BFo,AuthSchemeReferenceSchema:()=>gLn,AuthVariable:()=>Fen,BasicAuthSchemeSchema:()=>DFo,BearerAuthSchemeSchema:()=>CFo,HeaderAuthSchemeSchema:()=>SFo,InferredAuthenticatedRequestHeader:()=>MFo,InferredBearerAuthSchema:()=>TFo,InferredGetTokenEndpointSchema:()=>qFo,InferredGetTokenEndpointSchemaObject:()=>AFo,OAuthAccessTokenRequestPropertiesSchema:()=>bFo,OAuthAccessTokenResponsePropertiesSchema:()=>gFo,OAuthGetTokenEndpointSchema:()=>OFo,OAuthRefreshTokenEndpointSchema:()=>jFo,OAuthRefreshTokenRequestPropertiesSchema:()=>mFo,OAuthRefreshTokenResponsePropertiesSchema:()=>PFo,OAuthSchemeSchema:()=>wFo,TokenBearerAuthSchema:()=>EFo,WithAuthSchema:()=>IFo,WithEnvironmentVariable:()=>OLn});var gr={};Po(gr,{JsonError:()=>yLn,ParseError:()=>vLn,any:()=>fMp,bigint:()=>ZEp,boolean:()=>dMp,booleanLiteral:()=>lMp,date:()=>kEp,discriminant:()=>mMp,enum_:()=>dFo,getObjectLikeUtils:()=>J$t,getObjectUtils:()=>Nen,getSchemaUtils:()=>vT,isProperty:()=>ezi,lazy:()=>eMp,lazyObject:()=>uMp,list:()=>_Fo,number:()=>pMp,object:()=>pFo,objectWithoutOptionalProperties:()=>oMp,optional:()=>Kec,property:()=>rMp,record:()=>vMp,set:()=>bMp,string:()=>_Mp,stringLiteral:()=>cMp,transform:()=>Yec,undiscriminatedUnion:()=>OMp,union:()=>jMp,unknown:()=>hMp,withParsedProperties:()=>Zec});var Jj={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",OPTIONAL:"optional"};function CA(e,t){return`Expected ${t}. Received ${duD(e)}.`}function duD(e){if(Array.isArray(e))return"list";if(e===null)return"null";if(e instanceof BigInt)return"BigInt";switch(typeof e){case"string":return`"${e}"`;case"bigint":case"number":case"boolean":case"undefined":return`${e}`}return typeof e}function bL(e){return{...e,json:XEp(e.json),parse:XEp(e.parse)}}function XEp(e){return(t,r)=>{let i=e(t,r),{skipValidation:n=!1}=r??{};return!i.ok&&n?(console.warn(["Failed to validate.",...i.errors.map(a=>" - "+(a.path.length>0?`${a.path.join(".")}: ${a.message}`:a.message))].join(`
|
|
1678
1678
|
`)),{ok:!0,value:t}):i}}function fFo(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var yLn=class e extends Error{errors;constructor(t){super(t.map(fFo).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};var vLn=class e extends Error{errors;constructor(t){super(t.map(fFo).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};function vT(e){return{optional:()=>Kec(e),transform:t=>Yec(e,t),parseOrThrow:(t,r)=>{let i=e.parse(t,r);if(i.ok)return i.value;throw new vLn(i.errors)},jsonOrThrow:(t,r)=>{let i=e.json(t,r);if(i.ok)return i.value;throw new yLn(i.errors)}}}function Kec(e){let t={parse:(r,i)=>r==null?{ok:!0,value:void 0}:e.parse(r,i),json:(r,i)=>i?.omitUndefined&&r===void 0?{ok:!0,value:void 0}:r==null?{ok:!0,value:null}:e.json(r,i),getType:()=>Jj.OPTIONAL};return{...t,...vT(t)}}function Yec(e,t){let r={parse:(i,n)=>{let a=e.parse(i,n);return a.ok?{ok:!0,value:t.transform(a.value)}:a},json:(i,n)=>{let a=t.untransform(i);return e.json(a,n)},getType:()=>e.getType()};return{...r,...vT(r)}}function ZEp(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:CA(t,"string")}]}:{ok:!0,value:BigInt(t)},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t=="bigint"?{ok:!0,value:t.toString()}:{ok:!1,errors:[{path:r,message:CA(t,"bigint")}]},getType:()=>Jj.BIGINT};return{...bL(e),...vT(e)}}var puD=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;function kEp(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:CA(t,"string")}]}:puD.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:CA(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:CA(t,"Date object")}]},getType:()=>Jj.DATE};return{...bL(e),...vT(e)}}function wJ(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...bL(r),...vT(r)}}}function dFo(e){let t=new Set(e);return wJ(Jj.ENUM,(i,{allowUnrecognizedEnumValues:n,breadcrumbsPrefix:a=[]}={})=>typeof i!="string"?{ok:!1,errors:[{path:a,message:CA(i,"string")}]}:!t.has(i)&&!n?{ok:!1,errors:[{path:a,message:CA(i,"enum")}]}:{ok:!0,value:i})()}function eMp(e){let t=Xec(e);return{...t,...vT(t)}}function Xec(e){return{parse:(t,r)=>bLn(e).parse(t,r),json:(t,r)=>bLn(e).json(t,r),getType:()=>bLn(e).getType()}}function bLn(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}function mNa(e){return Object.entries(e)}function PNa(e,t){let r=new Set(t);return Object.entries(e).reduce((i,[n,a])=>(r.has(n)&&(i[n]=a),i),{})}function kIi(e){if(typeof e!="object"||e===null)return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function jNa(e){return Object.keys(e)}function tMp(e,t){let r=[],i=[];for(let n of e)t(n)?r.push(n):i.push(n);return[r,i]}function J$t(e){return{withParsedProperties:t=>Zec(e,t)}}function Zec(e,t){let r={parse:(i,n)=>{let a=e.parse(i,n);if(!a.ok)return a;let u=Object.entries(t).reduce((l,[d,s])=>({...l,[d]:typeof s=="function"?s(a.value):s}),{});return{ok:!0,value:{...a.value,...u}}},json:(i,n)=>{if(!kIi(i))return{ok:!1,errors:[{path:n?.breadcrumbsPrefix??[],message:CA(i,"object")}]};let a=new Set(Object.keys(t)),u=PNa(i,Object.keys(i).filter(l=>!a.has(l)));return e.json(u,n)},getType:()=>e.getType()};return{...r,...vT(r),...J$t(r)}}function rMp(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function ezi(e){return e.isProperty}function pFo(e){let t={_getRawProperties:()=>Object.entries(e).map(([r,i])=>ezi(i)?i.rawKey:r),_getParsedProperties:()=>jNa(e),parse:(r,i)=>{let n={},a=[];for(let[u,l]of mNa(e)){let d=ezi(l)?l.rawKey:u,s=ezi(l)?l.valueSchema:l,o={rawKey:d,parsedKey:u,valueSchema:s};n[d]=o,aMp(s)&&a.push(d)}return iMp({value:r,requiredKeys:a,getProperty:u=>{let l=n[u];if(l!=null)return{transformedKey:l.parsedKey,transform:d=>l.valueSchema.parse(d,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],u]})}},unrecognizedObjectKeys:i?.unrecognizedObjectKeys,skipValidation:i?.skipValidation,breadcrumbsPrefix:i?.breadcrumbsPrefix,omitUndefined:i?.omitUndefined})},json:(r,i)=>{let n=[];for(let[a,u]of mNa(e)){let l=ezi(u)?u.valueSchema:u;aMp(l)&&n.push(a)}return iMp({value:r,requiredKeys:n,getProperty:a=>{let u=e[a];if(u!=null)return ezi(u)?{transformedKey:u.rawKey,transform:l=>u.valueSchema.json(l,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],a]})}:{transformedKey:a,transform:l=>u.json(l,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],a]})}},unrecognizedObjectKeys:i?.unrecognizedObjectKeys,skipValidation:i?.skipValidation,breadcrumbsPrefix:i?.breadcrumbsPrefix,omitUndefined:i?.omitUndefined})},getType:()=>Jj.OBJECT};return{...bL(t),...vT(t),...J$t(t),...Nen(t)}}function iMp({value:e,requiredKeys:t,getProperty:r,unrecognizedObjectKeys:i="fail",skipValidation:n=!1,breadcrumbsPrefix:a=[]}){if(!kIi(e))return{ok:!1,errors:[{path:a,message:CA(e,"object")}]};let u=new Set(t),l=[],d={};for(let[s,o]of Object.entries(e)){let c=r(s);if(c!=null){u.delete(s);let b=c.transform(o);b.ok?d[c.transformedKey]=b.value:(d[s]=o,l.push(...b.errors))}else switch(i){case"fail":l.push({path:[...a,s],message:`Unexpected key "${s}"`});break;case"strip":break;case"passthrough":d[s]=o;break}}return l.push(...t.filter(s=>u.has(s)).map(s=>({path:a,message:`Missing required key "${s}"`}))),l.length===0||n?{ok:!0,value:d}:{ok:!1,errors:l}}function Nen(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(i,n)=>nMp({extensionKeys:t._getRawProperties(),value:i,transformBase:a=>e.parse(a,n),transformExtension:a=>t.parse(a,n)}),json:(i,n)=>nMp({extensionKeys:t._getParsedProperties(),value:i,transformBase:a=>e.json(a,n),transformExtension:a=>t.json(a,n)}),getType:()=>Jj.OBJECT};return{...r,...vT(r),...J$t(r),...Nen(r)}},passthrough:()=>{let t={_getParsedProperties:()=>e._getParsedProperties(),_getRawProperties:()=>e._getRawProperties(),parse:(r,i)=>{let n=e.parse(r,{...i,unrecognizedObjectKeys:"passthrough"});return n.ok?{ok:!0,value:{...r,...n.value}}:n},json:(r,i)=>{let n=e.json(r,{...i,unrecognizedObjectKeys:"passthrough"});return n.ok?{ok:!0,value:{...r,...n.value}}:n},getType:()=>Jj.OBJECT};return{...t,...vT(t),...J$t(t),...Nen(t)}}}}function nMp({extensionKeys:e,value:t,transformBase:r,transformExtension:i}){let n=new Set(e),[a,u]=tMp(jNa(t),s=>n.has(s)),l=r(PNa(t,u)),d=i(PNa(t,a));return l.ok&&d.ok?{ok:!0,value:{...l.value,...d.value}}:{ok:!1,errors:[...l.ok?[]:l.errors,...d.ok?[]:d.errors]}}function aMp(e){return!_uD(e)}function _uD(e){switch(e.getType()){case Jj.ANY:case Jj.UNKNOWN:case Jj.OPTIONAL:return!0;default:return!1}}function oMp(e){return pFo(e)}function uMp(e){let t={...Xec(e),_getRawProperties:()=>bLn(e)._getRawProperties(),_getParsedProperties:()=>bLn(e)._getParsedProperties()};return{...t,...vT(t),...J$t(t),...Nen(t)}}function _Fo(e){let t={parse:(r,i)=>sMp(r,(n,a)=>e.parse(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),json:(r,i)=>sMp(r,(n,a)=>e.json(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),getType:()=>Jj.LIST};return{...bL(t),...vT(t)}}function sMp(e,t){return Array.isArray(e)?e.map((i,n)=>t(i,n)).reduce((i,n)=>{if(i.ok&&n.ok)return{ok:!0,value:[...i.value,n.value]};let a=[];return i.ok||a.push(...i.errors),n.ok||a.push(...n.errors),{ok:!1,errors:a}},{ok:!0,value:[]}):{ok:!1,errors:[{message:CA(e,"list"),path:[]}]}}function cMp(e){return wJ(Jj.STRING_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:CA(r,`"${e}"`)}]})()}function lMp(e){return wJ(Jj.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:CA(r,`${e.toString()}`)}]})()}var fMp=wJ(Jj.ANY,e=>({ok:!0,value:e}));var dMp=wJ(Jj.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:CA(e,"boolean")}]});var pMp=wJ(Jj.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:CA(e,"number")}]});var _Mp=wJ(Jj.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:CA(e,"string")}]});var hMp=wJ(Jj.UNKNOWN,e=>({ok:!0,value:e}));function vMp(e,t){let r={parse:(i,n)=>yMp({value:i,isKeyNumeric:e.getType()===Jj.NUMBER,transformKey:a=>e.parse(a,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`${a} (key)`]}),transformValue:(a,u)=>t.parse(a,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`${u}`]}),breadcrumbsPrefix:n?.breadcrumbsPrefix}),json:(i,n)=>yMp({value:i,isKeyNumeric:e.getType()===Jj.NUMBER,transformKey:a=>e.json(a,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`${a} (key)`]}),transformValue:(a,u)=>t.json(a,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`${u}`]}),breadcrumbsPrefix:n?.breadcrumbsPrefix}),getType:()=>Jj.RECORD};return{...bL(r),...vT(r)}}function yMp({value:e,isKeyNumeric:t,transformKey:r,transformValue:i,breadcrumbsPrefix:n=[]}){return kIi(e)?mNa(e).reduce((a,[u,l])=>{if(l==null)return a;let d=a,s=u;if(t){let g=u.length>0?Number(u):NaN;isNaN(g)||(s=g)}let o=r(s),c=i(l,s);if(d.ok&&o.ok&&c.ok)return{ok:!0,value:{...d.value,[o.value]:c.value}};let b=[];return d.ok||b.push(...d.errors),o.ok||b.push(...o.errors),c.ok||b.push(...c.errors),{ok:!1,errors:b}},{ok:!0,value:{}}):{ok:!1,errors:[{path:n,message:CA(e,"object")}]}}function bMp(e){let t=_Fo(e),r={parse:(i,n)=>{let a=t.parse(i,n);return a.ok?{ok:!0,value:new Set(a.value)}:a},json:(i,n)=>i instanceof Set?t.json([...i],n):{ok:!1,errors:[{path:n?.breadcrumbsPrefix??[],message:CA(i,"Set")}]},getType:()=>Jj.SET};return{...bL(r),...vT(r)}}function OMp(e){let t={parse:(r,i)=>gMp((n,a)=>n.parse(r,a),e,i),json:(r,i)=>gMp((n,a)=>n.json(r,a),e,i),getType:()=>Jj.UNDISCRIMINATED_UNION};return{...bL(t),...vT(t)}}function gMp(e,t,r){let i=[];for(let[n,a]of t.entries()){let u=e(a,{...r,skipValidation:!1});if(u.ok)return u;for(let l of u.errors)i.push({path:l.path,message:`[Variant ${n}] ${l.message}`})}return{ok:!1,errors:i}}function mMp(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}function jMp(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,i=typeof e=="string"?e:e.parsedDiscriminant,n=dFo(jNa(t)),a={parse:(u,l)=>PMp({value:u,discriminant:r,transformedDiscriminant:i,transformDiscriminantValue:d=>n.parse(d,{allowUnrecognizedEnumValues:l?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...l?.breadcrumbsPrefix??[],r]}),getAdditionalPropertiesSchema:d=>t[d],allowUnrecognizedUnionMembers:l?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(d,s)=>s.parse(d,l),breadcrumbsPrefix:l?.breadcrumbsPrefix}),json:(u,l)=>PMp({value:u,discriminant:i,transformedDiscriminant:r,transformDiscriminantValue:d=>n.json(d,{allowUnrecognizedEnumValues:l?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...l?.breadcrumbsPrefix??[],i]}),getAdditionalPropertiesSchema:d=>t[d],allowUnrecognizedUnionMembers:l?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(d,s)=>s.json(d,l),breadcrumbsPrefix:l?.breadcrumbsPrefix}),getType:()=>Jj.UNION};return{...bL(a),...vT(a),...J$t(a)}}function PMp({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:i,getAdditionalPropertiesSchema:n,allowUnrecognizedUnionMembers:a=!1,transformAdditionalProperties:u,breadcrumbsPrefix:l=[]}){if(!kIi(e))return{ok:!1,errors:[{path:l,message:CA(e,"object")}]};let{[t]:d,...s}=e;if(d==null)return{ok:!1,errors:[{path:l,message:`Missing discriminant ("${t}")`}]};let o=i(d);if(!o.ok)return{ok:!1,errors:o.errors};let c=n(o.value);if(c==null)return a?{ok:!0,value:{[r]:o.value,...s}}:{ok:!1,errors:[{path:[...l,t],message:"Unexpected discriminant value"}]};let b=u(s,c);return b.ok?{ok:!0,value:{[r]:d,...b.value}}:b}var Zp=gr.object({docs:gr.string().optional()});var gLn=gr.object({scheme:gr.string()}).extend(Zp);var hFo=gr.undiscriminatedUnion([gr.string(),gLn]);var yFo=gr.object({any:gr.list(hFo)}).extend(Zp);var vFo=gr.undiscriminatedUnion([gr.string(),gLn,yFo]);var bFo=gr.object({"client-id":gr.string().optional(),"client-secret":gr.string().optional(),scopes:gr.string().optional()});var gFo=gr.object({"access-token":gr.string().optional(),"expires-in":gr.string().optional(),"refresh-token":gr.string().optional()});var OFo=gr.object({endpoint:gr.string(),"request-properties":bFo.optional(),"response-properties":gFo.optional()});var mFo=gr.object({"refresh-token":gr.string()});var PFo=gr.object({"access-token":gr.string().optional(),"expires-in":gr.string().optional(),"refresh-token":gr.string().optional()});var jFo=gr.object({endpoint:gr.string(),"request-properties":mFo.optional(),"response-properties":PFo.optional()});var wFo=gr.object({scheme:gr.stringLiteral("oauth"),type:gr.stringLiteral("client-credentials"),scopes:gr.list(gr.string()).optional(),"client-id-env":gr.string().optional(),"client-secret-env":gr.string().optional(),"token-prefix":gr.string().optional(),"token-header":gr.string().optional(),"get-token":OFo,"refresh-token":jFo.optional()}).extend(Zp);var OLn=gr.object({env:gr.string().optional()});var pS=gr.object({name:gr.string().optional()});var SFo=gr.object({header:gr.string(),type:gr.string().optional(),prefix:gr.string().optional()}).extend(OLn).extend(pS).extend(Zp);var Fen=gr.object({}).extend(OLn).extend(pS);var DFo=gr.object({scheme:gr.stringLiteral("basic"),username:Fen.optional(),password:Fen.optional()}).extend(Zp);var EFo=gr.object({scheme:gr.stringLiteral("bearer"),token:Fen.optional()}).extend(Zp);var MFo=gr.object({"response-property":gr.string(),"header-name":gr.string(),"value-prefix":gr.string().optional()});var AFo=gr.object({endpoint:gr.string(),"expiry-response-property":gr.string().optional(),"authenticated-request-headers":gr.list(MFo).optional()});var qFo=gr.undiscriminatedUnion([gr.string(),AFo]);var TFo=gr.object({scheme:gr.stringLiteral("bearer"),"get-token":qFo}).extend(Zp);var CFo=gr.undiscriminatedUnion([EFo,TFo]);var BFo=gr.undiscriminatedUnion([wFo,SFo,DFo,CFo]);var IFo=gr.object({auth:vFo.optional(),"auth-schemes":gr.record(gr.string(),BFo).optional()});var etc={};Po(etc,{AvailabilitySchema:()=>zFo,AvailabilityStatusSchema:()=>mLn,AvailabilityUnionSchema:()=>RFo});var mLn=gr.enum_(["in-development","pre-release","deprecated","generally-available"]);var zFo=gr.object({status:mLn,message:gr.string().optional()});var RFo=gr.undiscriminatedUnion([mLn,zFo]);var ttc={};Po(ttc,{DeclarationSchema:()=>Rrr,DeclarationWithNameSchema:()=>wMp,DeclarationWithoutDocsSchema:()=>LFo,WithAudiences:()=>OL,WithAvailability:()=>SJ,WithDisplayName:()=>gL,WithDocsSchema:()=>Zp,WithName:()=>pS,WithValidation:()=>FFo});var SJ=gr.object({availability:RFo.optional()});var gL=gr.object({"display-name":gr.string().optional()});var xFo=gr.object({minLength:gr.number().optional(),maxLength:gr.number().optional(),pattern:gr.string().optional(),format:gr.string().optional()});var NFo=gr.object({min:gr.number().optional(),max:gr.number().optional(),exclusiveMin:gr.boolean().optional(),exclusiveMax:gr.boolean().optional(),multipleOf:gr.number().optional()});var tzi=gr.undiscriminatedUnion([xFo,NFo]);var FFo=gr.object({validation:tzi.optional()});var OL=gr.object({audiences:gr.list(gr.string()).optional()});var Rrr=gr.object({}).extend(Zp).extend(SJ).extend(OL);var LFo=gr.object({}).extend(SJ).extend(OL);var wMp=gr.object({}).extend(Rrr).extend(pS);var rtc={};Po(rtc,{EncodingSchema:()=>PLn,ProtobufTypeSchema:()=>UFo});var UFo=gr.object({type:gr.string()});var PLn=gr.object({proto:UFo.optional()});var itc={};Po(itc,{EnvironmentSchema:()=>HFo,MultipleBaseUrlsEnvironmentSchema:()=>WFo,SingleBaseUrlEnvironmentSchema:()=>VFo,WithEnvironmentsSchema:()=>$Fo});var VFo=gr.object({url:gr.string()}).extend(OL).extend(Zp);var WFo=gr.object({urls:gr.record(gr.string(),gr.string())}).extend(OL).extend(Zp);var HFo=gr.undiscriminatedUnion([gr.string(),VFo,WFo]);var $Fo=gr.object({"default-url":gr.string().optional(),"default-environment":gr.string().optional(),environments:gr.record(gr.string(),HFo).optional()});var ntc={};Po(ntc,{ErrorDeclarationSchema:()=>QFo});var GFo=gr.unknown();var jLn=gr.object({value:GFo}).extend(pS).extend(Zp);var QFo=gr.object({"status-code":gr.number(),type:gr.string().optional(),examples:gr.list(jLn).optional()}).extend(Zp);var atc={};Po(atc,{ExampleBodyResponseSchema:()=>YFo,ExampleCodeSampleSchema:()=>n3o,ExampleCodeSampleSchemaLanguage:()=>i3o,ExampleCodeSampleSchemaSdk:()=>r3o,ExampleEndpointCallArraySchema:()=>SMp,ExampleEndpointCallSchema:()=>wLn,ExampleResponseSchema:()=>e3o,ExampleSseEventSchema:()=>ZFo,ExampleSseResponseSchema:()=>kFo,ExampleStreamResponseSchema:()=>XFo,ExampleTypeReferenceSchema:()=>A8,ExampleTypeSchema:()=>jLn,ExampleTypeValueSchema:()=>GFo,ExampleWebSocketMessage:()=>JFo,ExampleWebSocketSession:()=>KFo,ExampleWebhookCallSchema:()=>a3o,SupportedSdkLanguageSchema:()=>t3o});var A8=gr.unknown();var JFo=gr.object({type:gr.string(),body:gr.unknown()});var KFo=gr.object({"path-parameters":gr.record(gr.string(),A8).optional(),"query-parameters":gr.record(gr.string(),A8).optional(),headers:gr.record(gr.string(),A8).optional(),messages:gr.list(JFo)}).extend(pS).extend(Zp);var YFo=gr.object({error:gr.string().optional(),body:A8.optional()});var XFo=gr.object({stream:gr.list(A8)});var ZFo=gr.object({event:gr.string(),data:A8.optional()});var kFo=gr.object({stream:gr.list(ZFo)});var e3o=gr.undiscriminatedUnion([YFo,XFo,kFo]);var t3o=gr.enum_(["curl","python","javascript","typescript","go","ruby","csharp","java","js","node","ts","nodets","golang","dotnet","jvm","c#"]);var r3o=gr.object({sdk:t3o,code:gr.string()}).extend(Zp).extend(pS);var i3o=gr.object({language:gr.string(),code:gr.string(),install:gr.string().optional()}).extend(Zp).extend(pS);var n3o=gr.undiscriminatedUnion([r3o,i3o]);var wLn=gr.object({id:gr.string().optional(),"path-parameters":gr.record(gr.string(),A8).optional(),"query-parameters":gr.record(gr.string(),A8).optional(),headers:gr.record(gr.string(),A8).optional(),request:A8.optional(),response:e3o.optional(),"code-samples":gr.list(n3o).optional()}).extend(pS).extend(Zp);var SMp=gr.list(wLn);var a3o=gr.object({id:gr.string().optional(),payload:A8}).extend(pS).extend(Zp);var otc={};Po(otc,{DefinitionFileSchema:()=>p7o,ErrorDiscriminationSchema:()=>O7o,Export:()=>y7o,ExportDetailed:()=>h7o,Navigation:()=>_7o,PackageMarkerFileSchema:()=>DMp,PropertyBasedErrorDiscrimination:()=>b7o,RootApiFileSchema:()=>EMp,StatusCodeBasedErrorDiscrimination:()=>g7o,WithHeadersSchema:()=>v7o});var VNe=gr.undiscriminatedUnion([gr.string(),gr.list(gr.string())]);var o3o=gr.enum_(["read-only","write-only"]);var SLn=gr.object({default:gr.unknown().optional(),encoding:PLn.optional(),validation:tzi.optional()}).extend(Zp).extend(SJ);var WNe=gr.object({type:gr.string()}).extend(SLn).extend(pS).extend(OL);var u3o=gr.object({access:o3o.optional()}).extend(WNe);var rzi=gr.undiscriminatedUnion([gr.string(),u3o]);var s3o=gr.object({openapi:gr.string()});var c3o=gr.object({proto:gr.string()});var izi=gr.undiscriminatedUnion([s3o,c3o]);var HNe=gr.object({examples:gr.list(jLn).optional(),encoding:PLn.optional(),source:izi.optional(),inline:gr.boolean().optional()}).extend(Zp).extend(SJ).extend(OL);var l3o=gr.object({extends:VNe.optional(),properties:gr.record(gr.string(),rzi).optional(),"extra-properties":gr.boolean().optional()}).extend(HNe);var f3o=gr.object({camel:gr.string().optional(),snake:gr.string().optional(),pascal:gr.string().optional(),"screaming-snake":gr.string().optional()});var d3o=gr.object({value:gr.string(),casing:f3o.optional()}).extend(Zp).extend(pS);var p3o=gr.undiscriminatedUnion([gr.string(),d3o]);var _3o=gr.object({default:gr.string().optional(),enum:gr.list(p3o)}).extend(HNe);var h3o=gr.object({value:gr.string()}).extend(pS);var y3o=gr.undiscriminatedUnion([gr.string(),h3o]);var v3o=gr.object({type:gr.string()}).extend(SLn).extend(pS).extend(OL);var iOi=gr.undiscriminatedUnion([gr.string(),v3o]);var b3o=gr.object({value:gr.string()}).extend(pS);var g3o=gr.undiscriminatedUnion([gr.string(),b3o]);var O3o=gr.object({type:gr.string().optional(),key:g3o.optional()}).extend(Zp).extend(pS).extend(SJ).extend(gL);var m3o=gr.undiscriminatedUnion([gr.string(),O3o]);var P3o=gr.object({discriminant:y3o.optional(),extends:VNe.optional(),"base-properties":gr.record(gr.string(),iOi).optional(),union:gr.record(gr.string(),m3o)}).extend(HNe);var j3o=gr.object({type:gr.string()}).extend(Zp).extend(gL).extend(FFo);var w3o=gr.undiscriminatedUnion([gr.string(),j3o]);var S3o=gr.object({discriminated:gr.booleanLiteral(!1),union:gr.list(w3o)}).extend(HNe);var D3o=gr.object({type:gr.string(),validation:tzi.optional()}).extend(HNe);var E3o=gr.undiscriminatedUnion([gr.string(),l3o,_3o,P3o,S3o,D3o]);var M3o=gr.object({"service-name":gr.string()});var DLn=gr.object({grpc:M3o.optional()});var A3o=gr.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"]);var q3o=gr.object({variable:gr.string()}).extend(SJ).extend(Zp);var xrr=gr.undiscriminatedUnion([iOi,q3o]);var T3o=gr.object({"allow-multiple":gr.boolean().optional()}).extend(WNe);var ELn=gr.undiscriminatedUnion([gr.string(),T3o]);var C3o=gr.object({env:gr.string().optional()}).extend(WNe);var B3o=gr.undiscriminatedUnion([gr.string(),C3o]);var $Ne=B3o;var I3o=gr.object({type:gr.string()}).extend(Zp);var z3o=gr.enum_(["json","exploded","form"]);var R3o=gr.object({style:z3o.optional(),"content-type":gr.string().optional()}).extend(WNe);var x3o=gr.undiscriminatedUnion([gr.string(),R3o]);var N3o=gr.object({extends:VNe.optional(),"extra-properties":gr.boolean().optional(),properties:gr.record(gr.string(),x3o).optional()});var F3o=gr.undiscriminatedUnion([gr.string(),I3o,N3o]);var L3o=gr.object({"content-type":gr.string().optional(),"path-parameters":gr.record(gr.string(),xrr).optional(),"query-parameters":gr.record(gr.string(),ELn).optional(),headers:gr.record(gr.string(),$Ne).optional(),body:F3o.optional()}).extend(pS).extend(Zp);var U3o=gr.undiscriminatedUnion([gr.string(),L3o]);var V3o=gr.object({type:gr.string().optional(),property:gr.string().optional(),"status-code":gr.number().optional()}).extend(Zp);var W3o=gr.undiscriminatedUnion([gr.string(),V3o]);var H3o=gr.enum_(["sse","json"]);var $3o=gr.object({type:gr.string(),format:H3o.optional(),terminator:gr.string().optional()}).extend(Zp);var G3o=gr.undiscriminatedUnion([gr.string(),$3o]);var Q3o=gr.object({error:gr.string()}).extend(Zp);var J3o=gr.undiscriminatedUnion([gr.string(),Q3o]);var K3o=gr.list(J3o);var Y3o=gr.object({cursor:gr.string(),next_cursor:gr.string(),results:gr.string()});var X3o=gr.object({offset:gr.string(),results:gr.string(),step:gr.string().optional(),"has-next-page":gr.string().optional()});var Z3o=gr.object({type:gr.stringLiteral("custom"),results:gr.string()});var MLn=gr.undiscriminatedUnion([Y3o,X3o,Z3o]);var k3o=gr.undiscriminatedUnion([MLn,gr.boolean()]);var e7o=gr.object({method:A3o.optional(),"base-path":gr.string().optional(),path:gr.string(),url:gr.string().optional(),"path-parameters":gr.record(gr.string(),xrr).optional(),auth:gr.boolean().optional(),idempotent:gr.boolean().optional(),"stream-condition":gr.string().optional(),request:U3o.optional(),response:W3o.optional(),"response-stream":G3o.optional(),errors:K3o.optional(),examples:gr.list(wLn).optional(),pagination:k3o.optional(),transport:DLn.optional(),source:izi.optional()}).extend(gL).extend(Rrr);var t7o=gr.object({auth:gr.boolean(),url:gr.string().optional(),"base-path":gr.string(),"path-parameters":gr.record(gr.string(),iOi).optional(),idempotent:gr.boolean().optional(),headers:gr.record(gr.string(),iOi).optional(),transport:DLn.optional(),source:izi.optional(),endpoints:gr.record(gr.string(),e7o)}).extend(LFo).extend(gL);var r7o=gr.enum_(["POST","GET"]);var i7o=gr.object({type:gr.string()}).extend(Zp);var n7o=gr.object({name:gr.string(),extends:VNe.optional(),properties:gr.record(gr.string(),rzi).optional()});var a7o=gr.undiscriminatedUnion([gr.string(),i7o,n7o]);var o7o=gr.object({method:r7o,headers:gr.record(gr.string(),$Ne).optional(),payload:a7o,examples:gr.list(a3o).optional()}).extend(SJ).extend(OL).extend(Zp).extend(gL);var u7o=gr.enum_(["client","server"]);var s7o=gr.object({type:gr.string()}).extend(Zp);var c7o=gr.object({name:gr.string(),extends:VNe.optional(),properties:gr.record(gr.string(),rzi).optional()});var l7o=gr.undiscriminatedUnion([gr.string(),s7o,c7o]);var f7o=gr.object({origin:u7o,body:l7o}).extend(Rrr).extend(gL);var d7o=gr.object({auth:gr.boolean(),url:gr.string().optional(),path:gr.string(),headers:gr.record(gr.string(),$Ne).optional(),"path-parameters":gr.record(gr.string(),xrr).optional(),"query-parameters":gr.record(gr.string(),ELn).optional(),messages:gr.record(gr.string(),f7o).optional(),examples:gr.list(KFo).optional()}).extend(Rrr).extend(gL);var p7o=gr.object({imports:gr.record(gr.string(),gr.string()).optional(),types:gr.record(gr.string(),E3o).optional(),service:t7o.optional(),errors:gr.record(gr.string(),QFo).optional(),webhooks:gr.record(gr.string(),o7o).optional(),channel:d7o.optional()}).extend(Zp);var _7o=gr.undiscriminatedUnion([gr.string(),gr.list(gr.string())]);var h7o=gr.object({dependency:gr.string(),url:gr.string().optional()});var y7o=gr.undiscriminatedUnion([gr.string(),h7o]);var DMp=gr.object({navigation:_7o.optional(),export:y7o.optional()}).extend(p7o);var v7o=gr.object({headers:gr.record(gr.string(),$Ne).optional()});var b7o=gr.object({strategy:gr.stringLiteral("property"),"property-name":gr.string()});var g7o=gr.object({strategy:gr.stringLiteral("status-code")});var O7o=gr.undiscriminatedUnion([b7o,g7o]);var m7o=gr.object({type:gr.string()}).extend(Zp);var P7o=gr.undiscriminatedUnion([gr.string(),m7o]);var j7o=gr.object({value:gr.string()}).extend(Zp).extend(pS);var w7o=gr.undiscriminatedUnion([gr.string(),j7o]);var S7o=gr.object({name:gr.string().optional(),env:gr.string().optional(),value:gr.string()});var D7o=gr.undiscriminatedUnion([gr.string(),S7o]);var ALn=gr.object({default:gr.string().optional(),values:gr.list(w7o),header:D7o});var E7o=gr.object({value:gr.string(),versions:ALn.optional()}).extend(Zp).extend(pS);var M7o=gr.undiscriminatedUnion([gr.string(),E7o]);var A7o=gr.object({name:gr.string().optional(),env:gr.string().optional(),value:gr.string()});var q7o=gr.undiscriminatedUnion([gr.string(),A7o]);var T7o=gr.object({default:gr.string().optional(),values:gr.list(M7o),header:q7o});var EMp=gr.object({name:gr.string(),imports:gr.record(gr.string(),gr.string()).optional(),"error-discrimination":O7o.optional(),audiences:gr.list(gr.string()).optional(),errors:gr.list(gr.string()).optional(),"base-path":gr.string().optional(),"path-parameters":gr.record(gr.string(),xrr).optional(),"idempotency-headers":gr.record(gr.string(),$Ne).optional(),variables:gr.record(gr.string(),P7o).optional(),pagination:MLn.optional(),product:T7o.optional(),version:ALn.optional()}).extend(Zp).extend(gL).extend($Fo).extend(IFo).extend(v7o);var utc={};Po(utc,{CursorPaginationSchema:()=>Y3o,CustomPaginationSchema:()=>Z3o,OffsetPaginationSchema:()=>X3o,PaginationSchema:()=>MLn});var stc={};Po(stc,{ProductDeclarationHeaderObjectSchema:()=>A7o,ProductDeclarationHeaderSchema:()=>q7o,ProductDeclarationSchema:()=>T7o,ProductValue:()=>M7o,ProductValueDetailed:()=>E7o});var ctc={};Po(ctc,{FormDataBodyEncodingStyle:()=>z3o,GrpcTransport:()=>M3o,HttpEndpointSchema:()=>e7o,HttpHeaderSchema:()=>$Ne,HttpInlineFileRequestBodyPropertySchema:()=>R3o,HttpInlineRequestBodyPropertySchema:()=>x3o,HttpInlineRequestBodySchema:()=>N3o,HttpMethodSchema:()=>A3o,HttpPathParameterSchema:()=>xrr,HttpQueryParameterSchema:()=>ELn,HttpReferencedRequestBodySchema:()=>I3o,HttpRequest:()=>U3o,HttpRequestBodySchema:()=>F3o,HttpRequestSchema:()=>L3o,HttpResponseSchema:()=>W3o,HttpResponseSchemaDetailed:()=>V3o,HttpResponseStreamSchema:()=>G3o,HttpResponseStreamSchemaDetailed:()=>$3o,HttpServiceSchema:()=>t7o,Pagination:()=>k3o,QueryParameterTypeReferenceDetailed:()=>T3o,ResponseError:()=>J3o,ResponseErrorWithDocsSchema:()=>Q3o,ResponseErrorsSchema:()=>K3o,ServiceTransport:()=>DLn,StreamFormat:()=>H3o,TypeReferenceDeclarationWithEnvOverride:()=>B3o,TypeReferenceDeclarationWithEnvOverrideSchema:()=>C3o});var ltc={};Po(ltc,{OpenApiSourceSchema:()=>s3o,ProtobufSourceSchema:()=>c3o,SourceSchema:()=>izi});var ftc={};Po(ftc,{AliasSchema:()=>D3o,BaseTypeDeclarationSchema:()=>HNe,BaseTypeReferenceSchema:()=>SLn,CasingOverridesSchema:()=>f3o,DiscriminatedUnionSchema:()=>P3o,EnumSchema:()=>_3o,EnumValue:()=>p3o,EnumValueSchema:()=>d3o,ObjectExtendsSchema:()=>VNe,ObjectPropertyAccess:()=>o3o,ObjectPropertySchema:()=>rzi,ObjectPropertyWithAccessSchema:()=>u3o,ObjectSchema:()=>l3o,SingleUndiscriminatedUnionTypeDetailedSchema:()=>j3o,SingleUndiscriminatedUnionTypeSchema:()=>w3o,SingleUnionTypeDetailedSchema:()=>O3o,SingleUnionTypeKey:()=>g3o,SingleUnionTypeKeySchema:()=>b3o,SingleUnionTypeSchema:()=>m3o,TypeDeclarationSchema:()=>E3o,TypeReferenceDeclarationWithName:()=>WNe,TypeReferenceDeclarationWithNameSchema:()=>MMp,TypeReferenceDetailedSchema:()=>v3o,TypeReferenceSchema:()=>iOi,UndiscriminatedUnionSchema:()=>S3o,UnionDiscriminant:()=>y3o,UnionDiscriminantSchema:()=>h3o});var MMp=gr.undiscriminatedUnion([gr.string(),WNe]);var dtc={};Po(dtc,{NumberValidationSchema:()=>NFo,StringValidationSchema:()=>xFo,ValidationSchema:()=>tzi});var ptc={};Po(ptc,{VariableDeclarationDetailed:()=>m7o,VariableDeclarationSchema:()=>P7o,VariableReferenceSchema:()=>q3o});var _tc={};Po(_tc,{VersionDeclarationHeaderObjectSchema:()=>S7o,VersionDeclarationHeaderSchema:()=>D7o,VersionDeclarationSchema:()=>ALn,VersionValue:()=>w7o,VersionValueDetailed:()=>j7o});var htc={};Po(htc,{WebhookInlinedPayloadSchema:()=>n7o,WebhookMethodSchema:()=>r7o,WebhookPayloadSchema:()=>a7o,WebhookReferencedPayloadSchema:()=>i7o,WebhookSchema:()=>o7o});var ytc={};Po(ytc,{WebSocketChannelInlinedMessageSchema:()=>c7o,WebSocketChannelMessageBodySchema:()=>l7o,WebSocketChannelMessageSchema:()=>f7o,WebSocketChannelReferencedMessageSchema:()=>s7o,WebSocketChannelSchema:()=>d7o,WebSocketOrigin:()=>u7o});var wNa=class e extends Error{statusCode;body;constructor({message:t,statusCode:r,body:i}){super(huD({message:t,statusCode:r,body:i})),Object.setPrototypeOf(this,e.prototype),r!=null&&(this.statusCode=r),i!==void 0&&(this.body=i)}};function huD({message:e,statusCode:t,body:r}){let i=[];return e!=null&&i.push(e),t!=null&&i.push(`Status code: ${t.toString()}`),r!=null&&i.push(`Body: ${JSON.stringify(r,void 0,2)}`),i.join(`
|
|
1679
1679
|
`)}var SNa=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var yuD={optional:"optional",nullable:"nullable",set:"set",list:"list",map:"map",literal:"literal"},AMp=new Set(Object.values(yuD));function $x(e){let t=e.match(/([\w.]+)<([\w,\s]+)>/);if(t?.[0]!=null&&t[1]!=null&&t[2]!=null&&!AMp.has(t[1].trim()))return{name:t[1].trim(),arguments:t[2].split(",").map(r=>r.trim())}}function GNe(e){return $x(e)!=null}function btc(e){return e.scheme==="oauth"}function gtc(e){if(e.request!=null)return typeof e.request=="string"?e.request:e.request.body}function Otc(e){if(e.response!=null)return typeof e.response=="string"?e.response:e.response.type}function RB(e){return typeof e=="string"?!1:e?.extends!=null||e?.properties!=null}function Nrr(e){return e?e.proto!=null:!1}var vuD="text";function qLn(e){return e===vuD}var Vs={};Po(Vs,{ApiDefinitionSource:()=>ioe,ApiVersionScheme:()=>ozi,AuthScheme:()=>BA,AuthSchemesRequirement:()=>eoe,AvailabilityStatus:()=>mL,ContainerType:()=>xy,Environments:()=>$R,ErrorDeclarationDiscriminantValue:()=>azi,ErrorDiscriminationStrategy:()=>bAe,ExampleCodeSample:()=>vAe,ExampleContainer:()=>Vm,ExampleEndpointSuccessResponse:()=>NB,ExamplePrimitive:()=>Vd,ExampleQueryParameterShape:()=>q8,ExampleRequestBody:()=>MJ,ExampleResponse:()=>gC,ExampleSingleUnionTypeProperties:()=>Y3,ExampleTypeReferenceShape:()=>ny,ExampleTypeShape:()=>l1,ExampleWebSocketMessageBody:()=>gAe,FileProperty:()=>toe,FileUploadBodyPropertyEncoding:()=>DNa,FileUploadRequestProperty:()=>P4,HttpEndpointSource:()=>DJ,HttpMethod:()=>xB,HttpRequestBody:()=>IA,HttpResponseBody:()=>c1,JsonResponse:()=>PL,Literal:()=>SL,NamedTypeDefault:()=>TLn,NonStreamHttpResponseBody:()=>_H,OAuthConfiguration:()=>nzi,ObjectPropertyAccess:()=>Vrr,Pagination:()=>EJ,PathParameterLocation:()=>KNe,PrimitiveTypeV1:()=>iy,PrimitiveTypeV2:()=>Td,ProtobufMethodType:()=>Y$t,ProtobufType:()=>mw,PublishTarget:()=>noe,PublishingConfig:()=>Urr,RequestPropertyValue:()=>roe,ResolvedTypeReference:()=>hH,SdkRequestBodyType:()=>K$t,SdkRequestShape:()=>YNe,ShapeType:()=>X$t,SingleUnionTypeProperties:()=>wL,Source:()=>nOi,StreamingResponse:()=>jL,SupportedSdkLanguage:()=>Lrr,Transport:()=>JNe,Type:()=>Vb,TypeReference:()=>Xc,V2AuthValues:()=>QNe,V2EndpointLocationHttpMethod:()=>Frr,V2HttpEndpointResponseBody:()=>m4,WebSocketMessageBody:()=>DL,WebSocketMessageOrigin:()=>z7o,WebhookHttpMethod:()=>I7o,WebhookPayload:()=>yH,WellKnownProtobufType:()=>od,audience:()=>qMp,auth:()=>mtc,commons:()=>Ptc,constants:()=>TMp,dynamic:()=>us,environment:()=>Mtc,errors:()=>Atc,examples:()=>qtc,generatorExec:()=>U0,http:()=>Ctc,ir:()=>Btc,proto:()=>Itc,publish:()=>ztc,types:()=>Rtc,variables:()=>ZMp,webhooks:()=>xtc,websocket:()=>Ntc});var qMp={};var mtc={};Po(mtc,{AuthScheme:()=>BA,AuthSchemesRequirement:()=>eoe,OAuthConfiguration:()=>nzi});var eoe={All:"ALL",Any:"ANY",_visit:(e,t)=>{switch(e){case eoe.All:return t.all();case eoe.Any:return t.any();default:return t._other()}}};var BA={bearer:e=>({...e,type:"bearer",_visit:function(t){return BA._visit(this,t)}}),basic:e=>({...e,type:"basic",_visit:function(t){return BA._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return BA._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return BA._visit(this,t)}}),inferred:e=>({...e,type:"inferred",_visit:function(t){return BA._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"bearer":return t.bearer(e);case"basic":return t.basic(e);case"header":return t.header(e);case"oauth":return t.oauth(e);case"inferred":return t.inferred(e);default:return t._other(e)}}};var nzi={clientCredentials:e=>({...e,type:"clientCredentials",_visit:function(t){return nzi._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"clientCredentials":return t.clientCredentials(e);default:return t._other(e)}}};var Ptc={};Po(Ptc,{AvailabilityStatus:()=>mL});var mL={InDevelopment:"IN_DEVELOPMENT",PreRelease:"PRE_RELEASE",GeneralAvailability:"GENERAL_AVAILABILITY",Deprecated:"DEPRECATED",_visit:(e,t)=>{switch(e){case mL.InDevelopment:return t.inDevelopment();case mL.PreRelease:return t.preRelease();case mL.GeneralAvailability:return t.generalAvailability();case mL.Deprecated:return t.deprecated();default:return t._other()}}};var TMp={};var us={};Po(us,{Auth:()=>CMp,AuthValues:()=>BMp,ErrorSeverity:()=>C7o,FileUploadRequestBodyProperty:()=>FMp,GeneratorOutputConfig:()=>UMp,InlinedRequestBody:()=>xMp,LiteralType:()=>GMp,NamedType:()=>WMp,PublishInfo:()=>VMp,ReferencedRequestBodyType:()=>NMp,Request:()=>zMp,Response:()=>RMp,SingleDiscriminatedUnionType:()=>$Mp,TypeReference:()=>HMp,auth:()=>jtc,declaration:()=>IMp,endpoints:()=>wtc,environment:()=>LMp,ir:()=>Stc,snippets:()=>Dtc,types:()=>Etc});var jtc={};Po(jtc,{Auth:()=>CMp,AuthValues:()=>BMp});var CMp={basic:e=>({...e,type:"basic",_visit:function(t){return us.Auth._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return us.Auth._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return us.Auth._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return us.Auth._visit(this,t)}}),inferred:e=>({...e,type:"inferred",_visit:function(t){return us.Auth._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"basic":return t.basic(e);case"bearer":return t.bearer(e);case"header":return t.header(e);case"oauth":return t.oauth(e);case"inferred":return t.inferred(e);default:return t._other(e)}}};var BMp={basic:e=>({...e,type:"basic",_visit:function(t){return us.AuthValues._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return us.AuthValues._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return us.AuthValues._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return us.AuthValues._visit(this,t)}}),inferred:e=>({...e,type:"inferred",_visit:function(t){return us.AuthValues._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"basic":return t.basic(e);case"bearer":return t.bearer(e);case"header":return t.header(e);case"oauth":return t.oauth(e);case"inferred":return t.inferred(e);default:return t._other(e)}}};var IMp={};var wtc={};Po(wtc,{FileUploadRequestBodyProperty:()=>FMp,InlinedRequestBody:()=>xMp,ReferencedRequestBodyType:()=>NMp,Request:()=>zMp,Response:()=>RMp});var zMp={body:e=>({...e,type:"body",_visit:function(t){return us.Request._visit(this,t)}}),inlined:e=>({...e,type:"inlined",_visit:function(t){return us.Request._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"body":return t.body(e);case"inlined":return t.inlined(e);default:return t._other(e)}}};var RMp={json:()=>({type:"json",_visit:function(e){return us.Response._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"json":return t.json();default:return t._other(e)}}};var xMp={properties:e=>({value:e,type:"properties",_visit:function(t){return us.InlinedRequestBody._visit(this,t)}}),referenced:e=>({...e,type:"referenced",_visit:function(t){return us.InlinedRequestBody._visit(this,t)}}),fileUpload:e=>({...e,type:"fileUpload",_visit:function(t){return us.InlinedRequestBody._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"properties":return t.properties(e.value);case"referenced":return t.referenced(e);case"fileUpload":return t.fileUpload(e);default:return t._other(e)}}};var NMp={bytes:()=>({type:"bytes",_visit:function(e){return us.ReferencedRequestBodyType._visit(this,e)}}),typeReference:e=>({value:e,type:"typeReference",_visit:function(t){return us.ReferencedRequestBodyType._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"bytes":return t.bytes();case"typeReference":return t.typeReference(e.value);default:return t._other(e)}}};var FMp={file:e=>({...e,type:"file",_visit:function(t){return us.FileUploadRequestBodyProperty._visit(this,t)}}),fileArray:e=>({...e,type:"fileArray",_visit:function(t){return us.FileUploadRequestBodyProperty._visit(this,t)}}),bodyProperty:e=>({...e,type:"bodyProperty",_visit:function(t){return us.FileUploadRequestBodyProperty._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"fileArray":return t.fileArray(e);case"bodyProperty":return t.bodyProperty(e);default:return t._other(e)}}};var LMp={};var Stc={};Po(Stc,{GeneratorOutputConfig:()=>UMp,PublishInfo:()=>VMp});var UMp={publish:e=>({value:e,type:"publish",_visit:function(t){return us.GeneratorOutputConfig._visit(this,t)}}),local:()=>({type:"local",_visit:function(e){return us.GeneratorOutputConfig._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"publish":return t.publish(e.value);case"local":return t.local();default:return t._other(e)}}};var VMp={go:e=>({...e,type:"go",_visit:function(t){return us.PublishInfo._visit(this,t)}}),maven:e=>({...e,type:"maven",_visit:function(t){return us.PublishInfo._visit(this,t)}}),npm:e=>({...e,type:"npm",_visit:function(t){return us.PublishInfo._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return us.PublishInfo._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return us.PublishInfo._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return us.PublishInfo._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"go":return t.go(e);case"maven":return t.maven(e);case"npm":return t.npm(e);case"nuget":return t.nuget(e);case"pypi":return t.pypi(e);case"rubygems":return t.rubygems(e);default:return t._other(e)}}};var Dtc={};Po(Dtc,{ErrorSeverity:()=>C7o});var C7o={Critical:"CRITICAL",Warning:"WARNING",_visit:(e,t)=>{switch(e){case C7o.Critical:return t.critical();case C7o.Warning:return t.warning();default:return t._other()}}};var Etc={};Po(Etc,{LiteralType:()=>GMp,NamedType:()=>WMp,SingleDiscriminatedUnionType:()=>$Mp,TypeReference:()=>HMp});var WMp={alias:e=>({...e,type:"alias",_visit:function(t){return us.NamedType._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return us.NamedType._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return us.NamedType._visit(this,t)}}),discriminatedUnion:e=>({...e,type:"discriminatedUnion",_visit:function(t){return us.NamedType._visit(this,t)}}),undiscriminatedUnion:e=>({...e,type:"undiscriminatedUnion",_visit:function(t){return us.NamedType._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"alias":return t.alias(e);case"enum":return t.enum(e);case"object":return t.object(e);case"discriminatedUnion":return t.discriminatedUnion(e);case"undiscriminatedUnion":return t.undiscriminatedUnion(e);default:return t._other(e)}}};var HMp={list:e=>({value:e,type:"list",_visit:function(t){return us.TypeReference._visit(this,t)}}),literal:e=>({value:e,type:"literal",_visit:function(t){return us.TypeReference._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return us.TypeReference._visit(this,t)}}),named:e=>({value:e,type:"named",_visit:function(t){return us.TypeReference._visit(this,t)}}),nullable:e=>({value:e,type:"nullable",_visit:function(t){return us.TypeReference._visit(this,t)}}),optional:e=>({value:e,type:"optional",_visit:function(t){return us.TypeReference._visit(this,t)}}),primitive:e=>({value:e,type:"primitive",_visit:function(t){return us.TypeReference._visit(this,t)}}),set:e=>({value:e,type:"set",_visit:function(t){return us.TypeReference._visit(this,t)}}),unknown:()=>({type:"unknown",_visit:function(e){return us.TypeReference._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"list":return t.list(e.value);case"literal":return t.literal(e.value);case"map":return t.map(e);case"named":return t.named(e.value);case"nullable":return t.nullable(e.value);case"optional":return t.optional(e.value);case"primitive":return t.primitive(e.value);case"set":return t.set(e.value);case"unknown":return t.unknown();default:return t._other(e)}}};var $Mp={samePropertiesAsObject:e=>({...e,type:"samePropertiesAsObject",_visit:function(t){return us.SingleDiscriminatedUnionType._visit(this,t)}}),singleProperty:e=>({...e,type:"singleProperty",_visit:function(t){return us.SingleDiscriminatedUnionType._visit(this,t)}}),noProperties:e=>({...e,type:"noProperties",_visit:function(t){return us.SingleDiscriminatedUnionType._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"samePropertiesAsObject":return t.samePropertiesAsObject(e);case"singleProperty":return t.singleProperty(e);case"noProperties":return t.noProperties(e);default:return t._other(e)}}};var GMp={boolean:e=>({value:e,type:"boolean",_visit:function(t){return us.LiteralType._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return us.LiteralType._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"boolean":return t.boolean(e.value);case"string":return t.string(e.value);default:return t._other(e)}}};var Mtc={};Po(Mtc,{Environments:()=>$R});var $R={singleBaseUrl:e=>({...e,type:"singleBaseUrl",_visit:function(t){return $R._visit(this,t)}}),multipleBaseUrls:e=>({...e,type:"multipleBaseUrls",_visit:function(t){return $R._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"singleBaseUrl":return t.singleBaseUrl(e);case"multipleBaseUrls":return t.multipleBaseUrls(e);default:return t._other(e)}}};var Atc={};Po(Atc,{ErrorDeclarationDiscriminantValue:()=>azi});var azi={property:e=>({...e,type:"property",_visit:function(t){return azi._visit(this,t)}}),statusCode:()=>({type:"statusCode",_visit:function(e){return azi._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"property":return t.property(e);case"statusCode":return t.statusCode();default:return t._other(e)}}};var qtc={};Po(qtc,{V2AuthValues:()=>QNe,V2EndpointLocationHttpMethod:()=>Frr,V2HttpEndpointResponseBody:()=>m4});var m4={error:e=>({value:e,type:"error",_visit:function(t){return m4._visit(this,t)}}),json:e=>({value:e,type:"json",_visit:function(t){return m4._visit(this,t)}}),stream:e=>({value:e,type:"stream",_visit:function(t){return m4._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"error":return t.error(e.value);case"json":return t.json(e.value);case"stream":return t.stream(e.value);default:return t._other(e)}}};var Frr={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD",_visit:(e,t)=>{switch(e){case Frr.Get:return t.get();case Frr.Post:return t.post();case Frr.Put:return t.put();case Frr.Patch:return t.patch();case Frr.Delete:return t.delete();case Frr.Head:return t.head();default:return t._other()}}};var QNe={basic:e=>({...e,type:"basic",_visit:function(t){return QNe._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return QNe._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return QNe._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return QNe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"basic":return t.basic(e);case"bearer":return t.bearer(e);case"header":return t.header(e);case"oauth":return t.oauth(e);default:return t._other(e)}}};var U0={};Po(U0,{GeneratorEnvironment:()=>XMp,GeneratorPublishTarget:()=>YMp,GithubPublishInfo:()=>KMp,LicenseConfig:()=>QMp,LicenseId:()=>B7o,OutputMode:()=>JMp,config:()=>Ttc});var Ttc={};Po(Ttc,{GeneratorEnvironment:()=>XMp,GeneratorPublishTarget:()=>YMp,GithubPublishInfo:()=>KMp,LicenseConfig:()=>QMp,LicenseId:()=>B7o,OutputMode:()=>JMp});var QMp={basic:e=>({...e,type:"basic",_visit:function(t){return U0.LicenseConfig._visit(this,t)}}),custom:e=>({...e,type:"custom",_visit:function(t){return U0.LicenseConfig._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"basic":return t.basic(e);case"custom":return t.custom(e);default:return t._other(e)}}};var B7o={Mit:"MIT",Apache2:"Apache-2.0",_visit:(e,t)=>{switch(e){case B7o.Mit:return t.mit();case B7o.Apache2:return t.apache2();default:return t._other()}}};var JMp={publish:e=>({...e,type:"publish",_visit:function(t){return U0.OutputMode._visit(this,t)}}),downloadFiles:()=>({type:"downloadFiles",_visit:function(e){return U0.OutputMode._visit(this,e)}}),github:e=>({...e,type:"github",_visit:function(t){return U0.OutputMode._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"publish":return t.publish(e);case"downloadFiles":return t.downloadFiles();case"github":return t.github(e);default:return t._other(e)}}};var KMp={npm:e=>({...e,type:"npm",_visit:function(t){return U0.GithubPublishInfo._visit(this,t)}}),maven:e=>({...e,type:"maven",_visit:function(t){return U0.GithubPublishInfo._visit(this,t)}}),postman:e=>({...e,type:"postman",_visit:function(t){return U0.GithubPublishInfo._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return U0.GithubPublishInfo._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return U0.GithubPublishInfo._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return U0.GithubPublishInfo._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"npm":return t.npm(e);case"maven":return t.maven(e);case"postman":return t.postman(e);case"pypi":return t.pypi(e);case"rubygems":return t.rubygems(e);case"nuget":return t.nuget(e);default:return t._other(e)}}};var YMp={maven:e=>({...e,type:"maven",_visit:function(t){return U0.GeneratorPublishTarget._visit(this,t)}}),npm:e=>({...e,type:"npm",_visit:function(t){return U0.GeneratorPublishTarget._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return U0.GeneratorPublishTarget._visit(this,t)}}),postman:e=>({...e,type:"postman",_visit:function(t){return U0.GeneratorPublishTarget._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return U0.GeneratorPublishTarget._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return U0.GeneratorPublishTarget._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"maven":return t.maven(e);case"npm":return t.npm(e);case"pypi":return t.pypi(e);case"postman":return t.postman(e);case"rubygems":return t.rubygems(e);case"nuget":return t.nuget(e);default:return t._other(e)}}};var XMp={local:()=>({type:"local",_visit:function(e){return U0.GeneratorEnvironment._visit(this,e)}}),remote:e=>({...e,type:"remote",_visit:function(t){return U0.GeneratorEnvironment._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"local":return t.local();case"remote":return t.remote(e);default:return t._other(e)}}};var Ctc={};Po(Ctc,{ExampleCodeSample:()=>vAe,ExampleEndpointSuccessResponse:()=>NB,ExampleQueryParameterShape:()=>q8,ExampleRequestBody:()=>MJ,ExampleResponse:()=>gC,FileProperty:()=>toe,FileUploadBodyPropertyEncoding:()=>DNa,FileUploadRequestProperty:()=>P4,HttpEndpointSource:()=>DJ,HttpMethod:()=>xB,HttpRequestBody:()=>IA,HttpResponseBody:()=>c1,JsonResponse:()=>PL,NonStreamHttpResponseBody:()=>_H,Pagination:()=>EJ,PathParameterLocation:()=>KNe,RequestPropertyValue:()=>roe,SdkRequestBodyType:()=>K$t,SdkRequestShape:()=>YNe,StreamingResponse:()=>jL,SupportedSdkLanguage:()=>Lrr,Transport:()=>JNe});var JNe={http:()=>({type:"http",_visit:function(e){return JNe._visit(this,e)}}),grpc:e=>({...e,type:"grpc",_visit:function(t){return JNe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"http":return t.http();case"grpc":return t.grpc(e);default:return t._other(e)}}};var DJ={proto:e=>({...e,type:"proto",_visit:function(t){return DJ._visit(this,t)}}),openapi:()=>({type:"openapi",_visit:function(e){return DJ._visit(this,e)}}),openrpc:()=>({type:"openrpc",_visit:function(e){return DJ._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"proto":return t.proto(e);case"openapi":return t.openapi();case"openrpc":return t.openrpc();default:return t._other(e)}}};var xB={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD",_visit:(e,t)=>{switch(e){case xB.Get:return t.get();case xB.Post:return t.post();case xB.Put:return t.put();case xB.Patch:return t.patch();case xB.Delete:return t.delete();case xB.Head:return t.head();default:return t._other()}}};var KNe={Root:"ROOT",Service:"SERVICE",Endpoint:"ENDPOINT",_visit:(e,t)=>{switch(e){case KNe.Root:return t.root();case KNe.Service:return t.service();case KNe.Endpoint:return t.endpoint();default:return t._other()}}};var IA={inlinedRequestBody:e=>({...e,type:"inlinedRequestBody",_visit:function(t){return IA._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return IA._visit(this,t)}}),fileUpload:e=>({...e,type:"fileUpload",_visit:function(t){return IA._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return IA._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"inlinedRequestBody":return t.inlinedRequestBody(e);case"reference":return t.reference(e);case"fileUpload":return t.fileUpload(e);case"bytes":return t.bytes(e);default:return t._other(e)}}};var P4={file:e=>({value:e,type:"file",_visit:function(t){return P4._visit(this,t)}}),bodyProperty:e=>({...e,type:"bodyProperty",_visit:function(t){return P4._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e.value);case"bodyProperty":return t.bodyProperty(e);default:return t._other(e)}}};var DNa={Exploded:"exploded",Json:"json",Form:"form",_visit:(e,t)=>{switch(e){case DNa.Exploded:return t.exploded();case DNa.Json:return t.json();case DNa.Form:return t.form();default:return t._other()}}};var toe={file:e=>({...e,type:"file",_visit:function(t){return toe._visit(this,t)}}),fileArray:e=>({...e,type:"fileArray",_visit:function(t){return toe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"fileArray":return t.fileArray(e);default:return t._other(e)}}};var K$t={typeReference:e=>({...e,type:"typeReference",_visit:function(t){return K$t._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return K$t._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"typeReference":return t.typeReference(e);case"bytes":return t.bytes(e);default:return t._other(e)}}};var YNe={justRequestBody:e=>({value:e,type:"justRequestBody",_visit:function(t){return YNe._visit(this,t)}}),wrapper:e=>({...e,type:"wrapper",_visit:function(t){return YNe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"justRequestBody":return t.justRequestBody(e.value);case"wrapper":return t.wrapper(e);default:return t._other(e)}}};var _H={json:e=>({value:e,type:"json",_visit:function(t){return _H._visit(this,t)}}),fileDownload:e=>({...e,type:"fileDownload",_visit:function(t){return _H._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return _H._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return _H._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"json":return t.json(e.value);case"fileDownload":return t.fileDownload(e);case"text":return t.text(e);case"bytes":return t.bytes(e);default:return t._other(e)}}};var c1={json:e=>({value:e,type:"json",_visit:function(t){return c1._visit(this,t)}}),fileDownload:e=>({...e,type:"fileDownload",_visit:function(t){return c1._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return c1._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return c1._visit(this,t)}}),streaming:e=>({value:e,type:"streaming",_visit:function(t){return c1._visit(this,t)}}),streamParameter:e=>({...e,type:"streamParameter",_visit:function(t){return c1._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"json":return t.json(e.value);case"fileDownload":return t.fileDownload(e);case"text":return t.text(e);case"bytes":return t.bytes(e);case"streaming":return t.streaming(e.value);case"streamParameter":return t.streamParameter(e);default:return t._other(e)}}};var PL={response:e=>({...e,type:"response",_visit:function(t){return PL._visit(this,t)}}),nestedPropertyAsResponse:e=>({...e,type:"nestedPropertyAsResponse",_visit:function(t){return PL._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"response":return t.response(e);case"nestedPropertyAsResponse":return t.nestedPropertyAsResponse(e);default:return t._other(e)}}};var jL={json:e=>({...e,type:"json",_visit:function(t){return jL._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return jL._visit(this,t)}}),sse:e=>({...e,type:"sse",_visit:function(t){return jL._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"json":return t.json(e);case"text":return t.text(e);case"sse":return t.sse(e);default:return t._other(e)}}};var EJ={cursor:e=>({...e,type:"cursor",_visit:function(t){return EJ._visit(this,t)}}),offset:e=>({...e,type:"offset",_visit:function(t){return EJ._visit(this,t)}}),custom:e=>({...e,type:"custom",_visit:function(t){return EJ._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"cursor":return t.cursor(e);case"offset":return t.offset(e);case"custom":return t.custom(e);default:return t._other(e)}}};var roe={query:e=>({...e,type:"query",_visit:function(t){return roe._visit(this,t)}}),body:e=>({...e,type:"body",_visit:function(t){return roe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"query":return t.query(e);case"body":return t.body(e);default:return t._other(e)}}};var vAe={language:e=>({...e,type:"language",_visit:function(t){return vAe._visit(this,t)}}),sdk:e=>({...e,type:"sdk",_visit:function(t){return vAe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"language":return t.language(e);case"sdk":return t.sdk(e);default:return t._other(e)}}};var Lrr={Curl:"curl",Python:"python",Javascript:"javascript",Typescript:"typescript",Go:"go",Ruby:"ruby",Csharp:"csharp",Java:"java",_visit:(e,t)=>{switch(e){case Lrr.Curl:return t.curl();case Lrr.Python:return t.python();case Lrr.Javascript:return t.javascript();case Lrr.Typescript:return t.typescript();case Lrr.Go:return t.go();case Lrr.Ruby:return t.ruby();case Lrr.Csharp:return t.csharp();case Lrr.Java:return t.java();default:return t._other()}}};var q8={single:()=>({type:"single",_visit:function(e){return q8._visit(this,e)}}),exploded:()=>({type:"exploded",_visit:function(e){return q8._visit(this,e)}}),commaSeparated:()=>({type:"commaSeparated",_visit:function(e){return q8._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"single":return t.single();case"exploded":return t.exploded();case"commaSeparated":return t.commaSeparated();default:return t._other(e)}}};var MJ={inlinedRequestBody:e=>({...e,type:"inlinedRequestBody",_visit:function(t){return MJ._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return MJ._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"inlinedRequestBody":return t.inlinedRequestBody(e);case"reference":return t.reference(e);default:return t._other(e)}}};var gC={ok:e=>({value:e,type:"ok",_visit:function(t){return gC._visit(this,t)}}),error:e=>({...e,type:"error",_visit:function(t){return gC._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"ok":return t.ok(e.value);case"error":return t.error(e);default:return t._other(e)}}};var NB={body:e=>({value:e,type:"body",_visit:function(t){return NB._visit(this,t)}}),stream:e=>({value:e,type:"stream",_visit:function(t){return NB._visit(this,t)}}),sse:e=>({value:e,type:"sse",_visit:function(t){return NB._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"body":return t.body(e.value);case"stream":return t.stream(e.value);case"sse":return t.sse(e.value);default:return t._other(e)}}};var Btc={};Po(Btc,{ApiDefinitionSource:()=>ioe,ApiVersionScheme:()=>ozi,ErrorDiscriminationStrategy:()=>bAe});var ioe={proto:e=>({...e,type:"proto",_visit:function(t){return ioe._visit(this,t)}}),openapi:()=>({type:"openapi",_visit:function(e){return ioe._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"proto":return t.proto(e);case"openapi":return t.openapi();default:return t._other(e)}}};var ozi={header:e=>({...e,type:"header",_visit:function(t){return ozi._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"header":return t.header(e);default:return t._other(e)}}};var bAe={statusCode:()=>({type:"statusCode",_visit:function(e){return bAe._visit(this,e)}}),property:e=>({...e,type:"property",_visit:function(t){return bAe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"statusCode":return t.statusCode();case"property":return t.property(e);default:return t._other(e)}}};var Itc={};Po(Itc,{ProtobufMethodType:()=>Y$t,ProtobufType:()=>mw,WellKnownProtobufType:()=>od});var mw={wellKnown:e=>({value:e,type:"wellKnown",_visit:function(t){return mw._visit(this,t)}}),userDefined:e=>({...e,type:"userDefined",_visit:function(t){return mw._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"wellKnown":return t.wellKnown(e.value);case"userDefined":return t.userDefined(e);default:return t._other(e)}}};var od={any:()=>({type:"any",_visit:function(e){return od._visit(this,e)}}),api:()=>({type:"api",_visit:function(e){return od._visit(this,e)}}),boolValue:()=>({type:"boolValue",_visit:function(e){return od._visit(this,e)}}),bytesValue:()=>({type:"bytesValue",_visit:function(e){return od._visit(this,e)}}),doubleValue:()=>({type:"doubleValue",_visit:function(e){return od._visit(this,e)}}),duration:()=>({type:"duration",_visit:function(e){return od._visit(this,e)}}),empty:()=>({type:"empty",_visit:function(e){return od._visit(this,e)}}),enum:()=>({type:"enum",_visit:function(e){return od._visit(this,e)}}),enumValue:()=>({type:"enumValue",_visit:function(e){return od._visit(this,e)}}),field:()=>({type:"field",_visit:function(e){return od._visit(this,e)}}),fieldCardinality:()=>({type:"fieldCardinality",_visit:function(e){return od._visit(this,e)}}),fieldKind:()=>({type:"fieldKind",_visit:function(e){return od._visit(this,e)}}),fieldMask:()=>({type:"fieldMask",_visit:function(e){return od._visit(this,e)}}),floatValue:()=>({type:"floatValue",_visit:function(e){return od._visit(this,e)}}),int32Value:()=>({type:"int32Value",_visit:function(e){return od._visit(this,e)}}),int64Value:()=>({type:"int64Value",_visit:function(e){return od._visit(this,e)}}),listValue:()=>({type:"listValue",_visit:function(e){return od._visit(this,e)}}),method:()=>({type:"method",_visit:function(e){return od._visit(this,e)}}),mixin:()=>({type:"mixin",_visit:function(e){return od._visit(this,e)}}),nullValue:()=>({type:"nullValue",_visit:function(e){return od._visit(this,e)}}),option:()=>({type:"option",_visit:function(e){return od._visit(this,e)}}),sourceContext:()=>({type:"sourceContext",_visit:function(e){return od._visit(this,e)}}),stringValue:()=>({type:"stringValue",_visit:function(e){return od._visit(this,e)}}),struct:()=>({type:"struct",_visit:function(e){return od._visit(this,e)}}),syntax:()=>({type:"syntax",_visit:function(e){return od._visit(this,e)}}),timestamp:()=>({type:"timestamp",_visit:function(e){return od._visit(this,e)}}),type:()=>({type:"type",_visit:function(e){return od._visit(this,e)}}),uint32Value:()=>({type:"uint32Value",_visit:function(e){return od._visit(this,e)}}),uint64Value:()=>({type:"uint64Value",_visit:function(e){return od._visit(this,e)}}),value:()=>({type:"value",_visit:function(e){return od._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"any":return t.any();case"api":return t.api();case"boolValue":return t.boolValue();case"bytesValue":return t.bytesValue();case"doubleValue":return t.doubleValue();case"duration":return t.duration();case"empty":return t.empty();case"enum":return t.enum();case"enumValue":return t.enumValue();case"field":return t.field();case"fieldCardinality":return t.fieldCardinality();case"fieldKind":return t.fieldKind();case"fieldMask":return t.fieldMask();case"floatValue":return t.floatValue();case"int32Value":return t.int32Value();case"int64Value":return t.int64Value();case"listValue":return t.listValue();case"method":return t.method();case"mixin":return t.mixin();case"nullValue":return t.nullValue();case"option":return t.option();case"sourceContext":return t.sourceContext();case"stringValue":return t.stringValue();case"struct":return t.struct();case"syntax":return t.syntax();case"timestamp":return t.timestamp();case"type":return t.type();case"uint32Value":return t.uint32Value();case"uint64Value":return t.uint64Value();case"value":return t.value();default:return t._other(e)}}};var Y$t={Unary:"UNARY",ClientStream:"CLIENT_STREAM",ServerStream:"SERVER_STREAM",BidirectionalStream:"BIDIRECTIONAL_STREAM",_visit:(e,t)=>{switch(e){case Y$t.Unary:return t.unary();case Y$t.ClientStream:return t.clientStream();case Y$t.ServerStream:return t.serverStream();case Y$t.BidirectionalStream:return t.bidirectionalStream();default:return t._other()}}};var ztc={};Po(ztc,{PublishTarget:()=>noe,PublishingConfig:()=>Urr});var Urr={github:e=>({...e,type:"github",_visit:function(t){return Urr._visit(this,t)}}),direct:e=>({...e,type:"direct",_visit:function(t){return Urr._visit(this,t)}}),filesystem:e=>({...e,type:"filesystem",_visit:function(t){return Urr._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"github":return t.github(e);case"direct":return t.direct(e);case"filesystem":return t.filesystem(e);default:return t._other(e)}}};var noe={postman:e=>({...e,type:"postman",_visit:function(t){return noe._visit(this,t)}}),npm:e=>({...e,type:"npm",_visit:function(t){return noe._visit(this,t)}}),maven:e=>({...e,type:"maven",_visit:function(t){return noe._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return noe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"postman":return t.postman(e);case"npm":return t.npm(e);case"maven":return t.maven(e);case"pypi":return t.pypi(e);default:return t._other(e)}}};var Rtc={};Po(Rtc,{ContainerType:()=>xy,ExampleContainer:()=>Vm,ExamplePrimitive:()=>Vd,ExampleSingleUnionTypeProperties:()=>Y3,ExampleTypeReferenceShape:()=>ny,ExampleTypeShape:()=>l1,Literal:()=>SL,NamedTypeDefault:()=>TLn,ObjectPropertyAccess:()=>Vrr,PrimitiveTypeV1:()=>iy,PrimitiveTypeV2:()=>Td,ResolvedTypeReference:()=>hH,ShapeType:()=>X$t,SingleUnionTypeProperties:()=>wL,Source:()=>nOi,Type:()=>Vb,TypeReference:()=>Xc});var nOi={proto:e=>({value:e,type:"proto",_visit:function(t){return nOi._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"proto":return t.proto(e.value);default:return t._other(e)}}};var Vb={alias:e=>({...e,type:"alias",_visit:function(t){return Vb._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return Vb._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return Vb._visit(this,t)}}),union:e=>({...e,type:"union",_visit:function(t){return Vb._visit(this,t)}}),undiscriminatedUnion:e=>({...e,type:"undiscriminatedUnion",_visit:function(t){return Vb._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"alias":return t.alias(e);case"enum":return t.enum(e);case"object":return t.object(e);case"union":return t.union(e);case"undiscriminatedUnion":return t.undiscriminatedUnion(e);default:return t._other(e)}}};var hH={container:e=>({container:e,type:"container",_visit:function(t){return hH._visit(this,t)}}),named:e=>({...e,type:"named",_visit:function(t){return hH._visit(this,t)}}),primitive:e=>({primitive:e,type:"primitive",_visit:function(t){return hH._visit(this,t)}}),unknown:()=>({type:"unknown",_visit:function(e){return hH._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"container":return t.container(e.container);case"named":return t.named(e);case"primitive":return t.primitive(e.primitive);case"unknown":return t.unknown();default:return t._other(e)}}};var X$t={Enum:"ENUM",Object:"OBJECT",Union:"UNION",UndiscriminatedUnion:"UNDISCRIMINATED_UNION",_visit:(e,t)=>{switch(e){case X$t.Enum:return t.enum();case X$t.Object:return t.object();case X$t.Union:return t.union();case X$t.UndiscriminatedUnion:return t.undiscriminatedUnion();default:return t._other()}}};var Vrr={ReadOnly:"READ_ONLY",WriteOnly:"WRITE_ONLY",_visit:(e,t)=>{switch(e){case Vrr.ReadOnly:return t.readOnly();case Vrr.WriteOnly:return t.writeOnly();default:return t._other()}}};var wL={samePropertiesAsObject:e=>({...e,propertiesType:"samePropertiesAsObject",_visit:function(t){return wL._visit(this,t)}}),singleProperty:e=>({...e,propertiesType:"singleProperty",_visit:function(t){return wL._visit(this,t)}}),noProperties:()=>({propertiesType:"noProperties",_visit:function(e){return wL._visit(this,e)}}),_visit:(e,t)=>{switch(e.propertiesType){case"samePropertiesAsObject":return t.samePropertiesAsObject(e);case"singleProperty":return t.singleProperty(e);case"noProperties":return t.noProperties();default:return t._other(e)}}};var Xc={container:e=>({container:e,type:"container",_visit:function(t){return Xc._visit(this,t)}}),named:e=>({...e,type:"named",_visit:function(t){return Xc._visit(this,t)}}),primitive:e=>({primitive:e,type:"primitive",_visit:function(t){return Xc._visit(this,t)}}),unknown:()=>({type:"unknown",_visit:function(e){return Xc._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"container":return t.container(e.container);case"named":return t.named(e);case"primitive":return t.primitive(e.primitive);case"unknown":return t.unknown();default:return t._other(e)}}};var TLn={enum:e=>({...e,type:"enum",_visit:function(t){return TLn._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"enum":return t.enum(e);default:return t._other(e)}}};var xy={list:e=>({list:e,type:"list",_visit:function(t){return xy._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return xy._visit(this,t)}}),nullable:e=>({nullable:e,type:"nullable",_visit:function(t){return xy._visit(this,t)}}),optional:e=>({optional:e,type:"optional",_visit:function(t){return xy._visit(this,t)}}),set:e=>({set:e,type:"set",_visit:function(t){return xy._visit(this,t)}}),literal:e=>({literal:e,type:"literal",_visit:function(t){return xy._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"list":return t.list(e.list);case"map":return t.map(e);case"nullable":return t.nullable(e.nullable);case"optional":return t.optional(e.optional);case"set":return t.set(e.set);case"literal":return t.literal(e.literal);default:return t._other(e)}}};var iy={Integer:"INTEGER",Long:"LONG",Uint:"UINT",Uint64:"UINT_64",Float:"FLOAT",Double:"DOUBLE",Boolean:"BOOLEAN",String:"STRING",Date:"DATE",DateTime:"DATE_TIME",Uuid:"UUID",Base64:"BASE_64",BigInteger:"BIG_INTEGER",_visit:(e,t)=>{switch(e){case iy.Integer:return t.integer();case iy.Long:return t.long();case iy.Uint:return t.uint();case iy.Uint64:return t.uint64();case iy.Float:return t.float();case iy.Double:return t.double();case iy.Boolean:return t.boolean();case iy.String:return t.string();case iy.Date:return t.date();case iy.DateTime:return t.dateTime();case iy.Uuid:return t.uuid();case iy.Base64:return t.base64();case iy.BigInteger:return t.bigInteger();default:return t._other()}}};var Td={integer:e=>({...e,type:"integer",_visit:function(t){return Td._visit(this,t)}}),long:e=>({...e,type:"long",_visit:function(t){return Td._visit(this,t)}}),uint:e=>({...e,type:"uint",_visit:function(t){return Td._visit(this,t)}}),uint64:e=>({...e,type:"uint64",_visit:function(t){return Td._visit(this,t)}}),float:e=>({...e,type:"float",_visit:function(t){return Td._visit(this,t)}}),double:e=>({...e,type:"double",_visit:function(t){return Td._visit(this,t)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return Td._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return Td._visit(this,t)}}),date:e=>({...e,type:"date",_visit:function(t){return Td._visit(this,t)}}),dateTime:e=>({...e,type:"dateTime",_visit:function(t){return Td._visit(this,t)}}),uuid:e=>({...e,type:"uuid",_visit:function(t){return Td._visit(this,t)}}),base64:e=>({...e,type:"base64",_visit:function(t){return Td._visit(this,t)}}),bigInteger:e=>({...e,type:"bigInteger",_visit:function(t){return Td._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"integer":return t.integer(e);case"long":return t.long(e);case"uint":return t.uint(e);case"uint64":return t.uint64(e);case"float":return t.float(e);case"double":return t.double(e);case"boolean":return t.boolean(e);case"string":return t.string(e);case"date":return t.date(e);case"dateTime":return t.dateTime(e);case"uuid":return t.uuid(e);case"base64":return t.base64(e);case"bigInteger":return t.bigInteger(e);default:return t._other(e)}}};var SL={string:e=>({string:e,type:"string",_visit:function(t){return SL._visit(this,t)}}),boolean:e=>({boolean:e,type:"boolean",_visit:function(t){return SL._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"string":return t.string(e.string);case"boolean":return t.boolean(e.boolean);default:return t._other(e)}}};var l1={alias:e=>({...e,type:"alias",_visit:function(t){return l1._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return l1._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return l1._visit(this,t)}}),union:e=>({...e,type:"union",_visit:function(t){return l1._visit(this,t)}}),undiscriminatedUnion:e=>({...e,type:"undiscriminatedUnion",_visit:function(t){return l1._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"alias":return t.alias(e);case"enum":return t.enum(e);case"object":return t.object(e);case"union":return t.union(e);case"undiscriminatedUnion":return t.undiscriminatedUnion(e);default:return t._other(e)}}};var Y3={samePropertiesAsObject:e=>({...e,type:"samePropertiesAsObject",_visit:function(t){return Y3._visit(this,t)}}),singleProperty:e=>({...e,type:"singleProperty",_visit:function(t){return Y3._visit(this,t)}}),noProperties:()=>({type:"noProperties",_visit:function(e){return Y3._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"samePropertiesAsObject":return t.samePropertiesAsObject(e);case"singleProperty":return t.singleProperty(e);case"noProperties":return t.noProperties();default:return t._other(e)}}};var ny={primitive:e=>({primitive:e,type:"primitive",_visit:function(t){return ny._visit(this,t)}}),container:e=>({container:e,type:"container",_visit:function(t){return ny._visit(this,t)}}),unknown:e=>({unknown:e,type:"unknown",_visit:function(t){return ny._visit(this,t)}}),named:e=>({...e,type:"named",_visit:function(t){return ny._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e.primitive);case"container":return t.container(e.container);case"unknown":return t.unknown(e.unknown);case"named":return t.named(e);default:return t._other(e)}}};var Vm={list:e=>({...e,type:"list",_visit:function(t){return Vm._visit(this,t)}}),set:e=>({...e,type:"set",_visit:function(t){return Vm._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return Vm._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return Vm._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return Vm._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return Vm._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"list":return t.list(e);case"set":return t.set(e);case"optional":return t.optional(e);case"nullable":return t.nullable(e);case"map":return t.map(e);case"literal":return t.literal(e);default:return t._other(e)}}};var Vd={integer:e=>({integer:e,type:"integer",_visit:function(t){return Vd._visit(this,t)}}),long:e=>({long:e,type:"long",_visit:function(t){return Vd._visit(this,t)}}),uint:e=>({uint:e,type:"uint",_visit:function(t){return Vd._visit(this,t)}}),uint64:e=>({uint64:e,type:"uint64",_visit:function(t){return Vd._visit(this,t)}}),float:e=>({float:e,type:"float",_visit:function(t){return Vd._visit(this,t)}}),double:e=>({double:e,type:"double",_visit:function(t){return Vd._visit(this,t)}}),boolean:e=>({boolean:e,type:"boolean",_visit:function(t){return Vd._visit(this,t)}}),string:e=>({string:e,type:"string",_visit:function(t){return Vd._visit(this,t)}}),date:e=>({date:e,type:"date",_visit:function(t){return Vd._visit(this,t)}}),datetime:e=>({...e,type:"datetime",_visit:function(t){return Vd._visit(this,t)}}),uuid:e=>({uuid:e,type:"uuid",_visit:function(t){return Vd._visit(this,t)}}),base64:e=>({base64:e,type:"base64",_visit:function(t){return Vd._visit(this,t)}}),bigInteger:e=>({bigInteger:e,type:"bigInteger",_visit:function(t){return Vd._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"integer":return t.integer(e.integer);case"long":return t.long(e.long);case"uint":return t.uint(e.uint);case"uint64":return t.uint64(e.uint64);case"float":return t.float(e.float);case"double":return t.double(e.double);case"boolean":return t.boolean(e.boolean);case"string":return t.string(e.string);case"date":return t.date(e.date);case"datetime":return t.datetime(e);case"uuid":return t.uuid(e.uuid);case"base64":return t.base64(e.base64);case"bigInteger":return t.bigInteger(e.bigInteger);default:return t._other(e)}}};var ZMp={};var xtc={};Po(xtc,{WebhookHttpMethod:()=>I7o,WebhookPayload:()=>yH});var yH={inlinedPayload:e=>({...e,type:"inlinedPayload",_visit:function(t){return yH._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return yH._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"inlinedPayload":return t.inlinedPayload(e);case"reference":return t.reference(e);default:return t._other(e)}}};var I7o={Get:"GET",Post:"POST",_visit:(e,t)=>{switch(e){case I7o.Get:return t.get();case I7o.Post:return t.post();default:return t._other()}}};var Ntc={};Po(Ntc,{ExampleWebSocketMessageBody:()=>gAe,WebSocketMessageBody:()=>DL,WebSocketMessageOrigin:()=>z7o});var z7o={Client:"client",Server:"server",_visit:(e,t)=>{switch(e){case z7o.Client:return t.client();case z7o.Server:return t.server();default:return t._other()}}};var DL={inlinedBody:e=>({...e,type:"inlinedBody",_visit:function(t){return DL._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return DL._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"inlinedBody":return t.inlinedBody(e);case"reference":return t.reference(e);default:return t._other(e)}}};var gAe={inlinedBody:e=>({...e,type:"inlinedBody",_visit:function(t){return gAe._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return gAe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"inlinedBody":return t.inlinedBody(e);case"reference":return t.reference(e);default:return t._other(e)}}};var Ap={};Po(Ap,{AliasTypeDeclaration:()=>w8o,ApiAuth:()=>n6o,ApiDefinitionSource:()=>y5o,ApiDefinitionSourceId:()=>_5o,ApiVersionScheme:()=>i8o,AudienceDefinition:()=>L7o,AudienceReference:()=>zLn,AuthScheme:()=>i6o,AuthSchemesRequirement:()=>U7o,AutogeneratedEndpointExample:()=>H2o,Availability:()=>$rr,AvailabilityStatus:()=>$7o,Base64Type:()=>O8o,BasicAuthScheme:()=>W7o,BasicAuthValues:()=>h4o,BearerAuthScheme:()=>V7o,BearerAuthValues:()=>y4o,BigIntegerType:()=>m8o,BooleanType:()=>_8o,BytesRequest:()=>aUn,BytesResponse:()=>lUn,Constants:()=>s6o,ContainerType:()=>mUn,CsharpProtobufFileOptions:()=>$2o,CursorPagination:()=>M2o,CustomPagination:()=>q2o,DateTimeType:()=>b8o,DateType:()=>v8o,Declaration:()=>j4,DeclaredErrorName:()=>_zi,DeclaredServiceName:()=>e2o,DeclaredTypeName:()=>OI,DirectPublish:()=>j5o,DisplayName:()=>dzi,DoubleType:()=>p8o,DoubleValidationRules:()=>d8o,Encoding:()=>bUn,EndpointId:()=>k$t,EndpointName:()=>r2o,EndpointReference:()=>czi,EnumTypeDeclaration:()=>gUn,EnumTypeReference:()=>CAp,EnumValue:()=>aOi,EnvironmentBaseUrlId:()=>qk,EnvironmentBaseUrlWithId:()=>Q6o,EnvironmentId:()=>kNe,EnvironmentUrl:()=>Qrr,EnvironmentVariable:()=>XNe,Environments:()=>Y6o,EnvironmentsConfig:()=>HLn,ErrorDeclaration:()=>f4o,ErrorDeclarationDiscriminantValue:()=>AAp,ErrorDiscriminationByPropertyStrategy:()=>o5o,ErrorDiscriminationStrategy:()=>u5o,ErrorId:()=>pzi,EscapedString:()=>a6o,ExampleAliasType:()=>T5o,ExampleCodeSample:()=>z2o,ExampleCodeSampleLanguage:()=>C2o,ExampleCodeSampleSdk:()=>I2o,ExampleContainer:()=>L5o,ExampleDatetime:()=>F5o,ExampleEndpointCall:()=>hUn,ExampleEndpointErrorResponse:()=>U2o,ExampleEndpointSuccessResponse:()=>L2o,ExampleEnumType:()=>q5o,ExampleError:()=>l4o,ExampleHeader:()=>Ven,ExampleInlinedRequestBody:()=>_Un,ExampleInlinedRequestBodyProperty:()=>x2o,ExampleKeyValuePair:()=>J5o,ExampleListContainer:()=>W5o,ExampleLiteralContainer:()=>V5o,ExampleMapContainer:()=>Q5o,ExampleNamedType:()=>U5o,ExampleNullableContainer:()=>G5o,ExampleObjectProperty:()=>I5o,ExampleObjectType:()=>SUn,ExampleObjectTypeWithTypeId:()=>x5o,ExampleOptionalContainer:()=>$5o,ExamplePathParameter:()=>hzi,ExamplePrimitive:()=>DUn,ExampleQueryParameter:()=>pUn,ExampleQueryParameterShape:()=>R2o,ExampleRequestBody:()=>N2o,ExampleResponse:()=>V2o,ExampleServerSideEvent:()=>F2o,ExampleSetContainer:()=>H5o,ExampleSingleUnionType:()=>z5o,ExampleSingleUnionTypeProperties:()=>R5o,ExampleType:()=>INa,ExampleTypeReference:()=>wm,ExampleTypeReferenceShape:()=>N5o,ExampleTypeShape:()=>PUn,ExampleUndiscriminatedUnionType:()=>B5o,ExampleUnionType:()=>C5o,ExampleWebSocketMessage:()=>t5o,ExampleWebSocketMessageBody:()=>e5o,ExampleWebSocketSession:()=>r5o,ExampleWebhookCall:()=>H8o,FeatureId:()=>u6o,FernFilepath:()=>aoe,FileDownloadResponse:()=>sUn,FileProperty:()=>u2o,FilePropertyArray:()=>o2o,FilePropertySingle:()=>a2o,FileUploadBodyProperty:()=>c2o,FileUploadBodyPropertyEncoding:()=>s2o,FileUploadRequest:()=>f2o,FileUploadRequestProperty:()=>l2o,Filesystem:()=>w5o,FloatType:()=>f8o,GithubPublish:()=>P5o,GrpcTransport:()=>J2o,HeaderApiVersionScheme:()=>r8o,HeaderAuthScheme:()=>H7o,HeaderAuthValues:()=>v4o,HttpEndpoint:()=>Z2o,HttpEndpointSource:()=>X2o,HttpHeader:()=>Tk,HttpMethod:()=>LLn,HttpPath:()=>eFe,HttpPathPart:()=>t2o,HttpRequestBody:()=>oUn,HttpRequestBodyReference:()=>nUn,HttpResponse:()=>dUn,HttpResponseBody:()=>w2o,HttpService:()=>t8o,InferredAuthScheme:()=>r6o,InferredAuthSchemeTokenEndpoint:()=>t6o,InferredAuthenticatedRequestHeader:()=>e6o,InlinedRequestBody:()=>n2o,InlinedRequestBodyProperty:()=>iUn,InlinedWebSocketMessageBody:()=>Y8o,InlinedWebSocketMessageBodyProperty:()=>K8o,InlinedWebhookPayload:()=>U8o,InlinedWebhookPayloadProperty:()=>L8o,IntegerType:()=>u8o,IntegerValidationRules:()=>o8o,IntermediateRepresentation:()=>TAp,JsonEncoding:()=>k2o,JsonResponse:()=>uUn,JsonResponseBody:()=>v2o,JsonResponseBodyWithProperty:()=>b2o,JsonStreamChunk:()=>g2o,Literal:()=>M5o,LongType:()=>s8o,MapType:()=>A5o,MavenPublishTarget:()=>O5o,MultipleBaseUrlsEnvironment:()=>J6o,MultipleBaseUrlsEnvironments:()=>K6o,MultipleEnvironmentUrlValues:()=>_4o,Name:()=>Sd,NameAndWireValue:()=>Hh,NamedType:()=>E5o,NamedTypeDefault:()=>D5o,NonStreamHttpResponseBody:()=>P2o,NpmPublishTarget:()=>g5o,OAuthAccessTokenRequestProperties:()=>Q7o,OAuthAccessTokenResponseProperties:()=>xLn,OAuthClientCredentials:()=>X7o,OAuthConfiguration:()=>Z7o,OAuthRefreshEndpoint:()=>Y7o,OAuthRefreshTokenRequestProperties:()=>K7o,OAuthScheme:()=>k7o,OAuthTokenEndpoint:()=>J7o,OAuthValues:()=>b4o,ObjectProperty:()=>Ak,ObjectPropertyAccess:()=>RLn,ObjectTypeDeclaration:()=>S8o,OffsetPagination:()=>A2o,Package:()=>wUn,PackageNavigationConfig:()=>n5o,Pagination:()=>T2o,PathParameter:()=>eGt,PathParameterLocation:()=>i2o,PlatformHeaders:()=>c5o,PostmanPublishTarget:()=>b5o,PrimitiveType:()=>OUn,PrimitiveTypeV1:()=>$Ln,PrimitiveTypeV2:()=>P8o,ProtoEncoding:()=>e8o,ProtoSource:()=>h5o,ProtoSourceInfo:()=>Y2o,ProtobufFile:()=>yUn,ProtobufFileOptions:()=>G2o,ProtobufMethodType:()=>K2o,ProtobufService:()=>Q2o,ProtobufType:()=>z8o,PublishTarget:()=>yzi,PublishingConfig:()=>S5o,PypiPublishTarget:()=>m5o,QueryParameter:()=>lzi,ReadmeConfig:()=>p5o,RequestProperty:()=>qJ,RequestPropertyValue:()=>G7o,ResolvedNamedType:()=>a8o,ResolvedTypeReference:()=>j8o,ResponseError:()=>D2o,ResponseErrors:()=>E2o,ResponseProperty:()=>AL,SafeAndUnsafeString:()=>Uen,SdkConfig:()=>l5o,SdkRequest:()=>y2o,SdkRequestBodyType:()=>p2o,SdkRequestShape:()=>h2o,SdkRequestWrapper:()=>_2o,ServiceId:()=>Wrr,ServiceTypeReferenceInfo:()=>d5o,ShapeType:()=>n8o,SingleBaseUrlEnvironment:()=>$6o,SingleBaseUrlEnvironments:()=>G6o,SingleUnionType:()=>M8o,SingleUnionTypeProperties:()=>E8o,SingleUnionTypeProperty:()=>D8o,Source:()=>R8o,SourceConfig:()=>v5o,SseStreamChunk:()=>m2o,StreamParameterResponse:()=>j2o,StreamingResponse:()=>fUn,StringType:()=>y8o,StringValidationRules:()=>h8o,Subpackage:()=>a5o,SubpackageId:()=>Hrr,SupportedSdkLanguage:()=>B2o,TextResponse:()=>cUn,TextStreamChunk:()=>O2o,Transport:()=>vUn,Type:()=>C8o,TypeDeclaration:()=>x8o,TypeId:()=>Gx,TypeReference:()=>ov,Uint64Type:()=>l8o,UintType:()=>c8o,UndiscriminatedUnionMember:()=>q8o,UndiscriminatedUnionTypeDeclaration:()=>T8o,UnionTypeDeclaration:()=>A8o,UserAgent:()=>s5o,UserDefinedProtobufType:()=>I8o,UserSpecifiedEndpointExample:()=>W2o,UuidType:()=>g8o,V2AuthValues:()=>QLn,V2EndpointLocation:()=>p4o,V2EndpointLocationHttpMethod:()=>d4o,V2EnvironmentValues:()=>GLn,V2HttpEndpointCodeSample:()=>P4o,V2HttpEndpointExample:()=>TNa,V2HttpEndpointExamples:()=>j4o,V2HttpEndpointRequest:()=>g4o,V2HttpEndpointResponse:()=>m4o,V2HttpEndpointResponseBody:()=>O4o,V2HttpRequestBodies:()=>d2o,V2HttpResponses:()=>S2o,V2SchemaExample:()=>qNa,V2SchemaExamples:()=>ML,V2ValueExamples:()=>Jrr,V2WebSocketEndpointLocation:()=>w4o,V2WebSocketMessageExample:()=>S4o,V2WebSocketSessionExample:()=>CNa,V2WebSocketSessionExamples:()=>D4o,V2WebhookExample:()=>BNa,V2WebhookExamples:()=>E4o,VariableDeclaration:()=>f5o,VariableId:()=>rUn,WebSocketChannel:()=>i5o,WebSocketChannelId:()=>FLn,WebSocketMessage:()=>k8o,WebSocketMessageBody:()=>Z8o,WebSocketMessageBodyReference:()=>X8o,WebSocketMessageId:()=>jUn,WebSocketMessageOrigin:()=>J8o,WebSocketName:()=>Q8o,Webhook:()=>$8o,WebhookGroup:()=>G8o,WebhookGroupId:()=>NLn,WebhookHttpMethod:()=>F8o,WebhookId:()=>o6o,WebhookName:()=>N8o,WebhookPayload:()=>W8o,WebhookPayloadReference:()=>V8o,WellKnownProtobufType:()=>B8o,WithContentType:()=>ZNe,WithDocs:()=>Dd,WithDocsAndAvailability:()=>fzi,WithJsonExample:()=>Grr,WithV2Examples:()=>gI,audience:()=>Wtc,auth:()=>Htc,commons:()=>$tc,constants:()=>Gtc,dynamic:()=>qF,environment:()=>erc,errors:()=>trc,examples:()=>rrc,generatorExec:()=>nrc,http:()=>arc,ir:()=>orc,proto:()=>urc,publish:()=>src,types:()=>crc,variables:()=>lrc,webhooks:()=>frc,websocket:()=>drc});var Wtc={};Po(Wtc,{AudienceDefinition:()=>L7o,AudienceReference:()=>zLn});var ie={};Po(ie,{JsonError:()=>CLn,ParseError:()=>BLn,any:()=>pAp,bigint:()=>eAp,boolean:()=>_Ap,booleanLiteral:()=>dAp,date:()=>tAp,discriminant:()=>jAp,enum_:()=>x7o,getObjectLikeUtils:()=>Z$t,getObjectUtils:()=>Len,getSchemaUtils:()=>bT,isProperty:()=>szi,lazy:()=>rAp,lazyObject:()=>cAp,list:()=>F7o,number:()=>hAp,object:()=>N7o,objectWithoutOptionalProperties:()=>sAp,optional:()=>Ftc,property:()=>nAp,record:()=>gAp,set:()=>OAp,string:()=>yAp,stringLiteral:()=>fAp,transform:()=>Ltc,undiscriminatedUnion:()=>PAp,union:()=>SAp,unknown:()=>vAp,withParsedProperties:()=>Vtc});var Kj={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",OPTIONAL:"optional"};function zA(e,t){return`Expected ${t}. Received ${buD(e)}.`}function buD(e){if(Array.isArray(e))return"list";if(e===null)return"null";if(e instanceof BigInt)return"BigInt";switch(typeof e){case"string":return`"${e}"`;case"bigint":case"number":case"boolean":case"undefined":return`${e}`}return typeof e}function EL(e){return{...e,json:kMp(e.json),parse:kMp(e.parse)}}function kMp(e){return(t,r)=>{let i=e(t,r),{skipValidation:n=!1}=r??{};return!i.ok&&n?(console.warn(["Failed to validate.",...i.errors.map(a=>" - "+(a.path.length>0?`${a.path.join(".")}: ${a.message}`:a.message))].join(`
|
|
1680
1680
|
`)),{ok:!0,value:t}):i}}function R7o(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var CLn=class e extends Error{errors;constructor(t){super(t.map(R7o).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};var BLn=class e extends Error{errors;constructor(t){super(t.map(R7o).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};function bT(e){return{optional:()=>Ftc(e),transform:t=>Ltc(e,t),parseOrThrow:(t,r)=>{let i=e.parse(t,r);if(i.ok)return i.value;throw new BLn(i.errors)},jsonOrThrow:(t,r)=>{let i=e.json(t,r);if(i.ok)return i.value;throw new CLn(i.errors)}}}function Ftc(e){let t={parse:(r,i)=>r==null?{ok:!0,value:void 0}:e.parse(r,i),json:(r,i)=>i?.omitUndefined&&r===void 0?{ok:!0,value:void 0}:r==null?{ok:!0,value:null}:e.json(r,i),getType:()=>Kj.OPTIONAL};return{...t,...bT(t)}}function Ltc(e,t){let r={parse:(i,n)=>{let a=e.parse(i,n);return a.ok?{ok:!0,value:t.transform(a.value)}:a},json:(i,n)=>{let a=t.untransform(i);return e.json(a,n)},getType:()=>e.getType()};return{...r,...bT(r)}}function eAp(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:zA(t,"string")}]}:{ok:!0,value:BigInt(t)},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t=="bigint"?{ok:!0,value:t.toString()}:{ok:!1,errors:[{path:r,message:zA(t,"bigint")}]},getType:()=>Kj.BIGINT};return{...EL(e),...bT(e)}}var guD=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;function tAp(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:zA(t,"string")}]}:guD.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:zA(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:zA(t,"Date object")}]},getType:()=>Kj.DATE};return{...EL(e),...bT(e)}}function AJ(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...EL(r),...bT(r)}}}function x7o(e){let t=new Set(e);return AJ(Kj.ENUM,(i,{allowUnrecognizedEnumValues:n,breadcrumbsPrefix:a=[]}={})=>typeof i!="string"?{ok:!1,errors:[{path:a,message:zA(i,"string")}]}:!t.has(i)&&!n?{ok:!1,errors:[{path:a,message:zA(i,"enum")}]}:{ok:!0,value:i})()}function rAp(e){let t=Utc(e);return{...t,...bT(t)}}function Utc(e){return{parse:(t,r)=>ILn(e).parse(t,r),json:(t,r)=>ILn(e).json(t,r),getType:()=>ILn(e).getType()}}function ILn(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}function ENa(e){return Object.entries(e)}function MNa(e,t){let r=new Set(t);return Object.entries(e).reduce((i,[n,a])=>(r.has(n)&&(i[n]=a),i),{})}function uzi(e){if(typeof e!="object"||e===null)return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ANa(e){return Object.keys(e)}function iAp(e,t){let r=[],i=[];for(let n of e)t(n)?r.push(n):i.push(n);return[r,i]}function Z$t(e){return{withParsedProperties:t=>Vtc(e,t)}}function Vtc(e,t){let r={parse:(i,n)=>{let a=e.parse(i,n);if(!a.ok)return a;let u=Object.entries(t).reduce((l,[d,s])=>({...l,[d]:typeof s=="function"?s(a.value):s}),{});return{ok:!0,value:{...a.value,...u}}},json:(i,n)=>{if(!uzi(i))return{ok:!1,errors:[{path:n?.breadcrumbsPrefix??[],message:zA(i,"object")}]};let a=new Set(Object.keys(t)),u=MNa(i,Object.keys(i).filter(l=>!a.has(l)));return e.json(u,n)},getType:()=>e.getType()};return{...r,...bT(r),...Z$t(r)}}function nAp(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function szi(e){return e.isProperty}function N7o(e){let t={_getRawProperties:()=>Object.entries(e).map(([r,i])=>szi(i)?i.rawKey:r),_getParsedProperties:()=>ANa(e),parse:(r,i)=>{let n={},a=[];for(let[u,l]of ENa(e)){let d=szi(l)?l.rawKey:u,s=szi(l)?l.valueSchema:l,o={rawKey:d,parsedKey:u,valueSchema:s};n[d]=o,uAp(s)&&a.push(d)}return aAp({value:r,requiredKeys:a,getProperty:u=>{let l=n[u];if(l!=null)return{transformedKey:l.parsedKey,transform:d=>l.valueSchema.parse(d,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],u]})}},unrecognizedObjectKeys:i?.unrecognizedObjectKeys,skipValidation:i?.skipValidation,breadcrumbsPrefix:i?.breadcrumbsPrefix,omitUndefined:i?.omitUndefined})},json:(r,i)=>{let n=[];for(let[a,u]of ENa(e)){let l=szi(u)?u.valueSchema:u;uAp(l)&&n.push(a)}return aAp({value:r,requiredKeys:n,getProperty:a=>{let u=e[a];if(u!=null)return szi(u)?{transformedKey:u.rawKey,transform:l=>u.valueSchema.json(l,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],a]})}:{transformedKey:a,transform:l=>u.json(l,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],a]})}},unrecognizedObjectKeys:i?.unrecognizedObjectKeys,skipValidation:i?.skipValidation,breadcrumbsPrefix:i?.breadcrumbsPrefix,omitUndefined:i?.omitUndefined})},getType:()=>Kj.OBJECT};return{...EL(t),...bT(t),...Z$t(t),...Len(t)}}function aAp({value:e,requiredKeys:t,getProperty:r,unrecognizedObjectKeys:i="fail",skipValidation:n=!1,breadcrumbsPrefix:a=[]}){if(!uzi(e))return{ok:!1,errors:[{path:a,message:zA(e,"object")}]};let u=new Set(t),l=[],d={};for(let[s,o]of Object.entries(e)){let c=r(s);if(c!=null){u.delete(s);let b=c.transform(o);b.ok?d[c.transformedKey]=b.value:(d[s]=o,l.push(...b.errors))}else switch(i){case"fail":l.push({path:[...a,s],message:`Unexpected key "${s}"`});break;case"strip":break;case"passthrough":d[s]=o;break}}return l.push(...t.filter(s=>u.has(s)).map(s=>({path:a,message:`Missing required key "${s}"`}))),l.length===0||n?{ok:!0,value:d}:{ok:!1,errors:l}}function Len(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(i,n)=>oAp({extensionKeys:t._getRawProperties(),value:i,transformBase:a=>e.parse(a,n),transformExtension:a=>t.parse(a,n)}),json:(i,n)=>oAp({extensionKeys:t._getParsedProperties(),value:i,transformBase:a=>e.json(a,n),transformExtension:a=>t.json(a,n)}),getType:()=>Kj.OBJECT};return{...r,...bT(r),...Z$t(r),...Len(r)}},passthrough:()=>{let t={_getParsedProperties:()=>e._getParsedProperties(),_getRawProperties:()=>e._getRawProperties(),parse:(r,i)=>{let n=e.parse(r,{...i,unrecognizedObjectKeys:"passthrough"});return n.ok?{ok:!0,value:{...r,...n.value}}:n},json:(r,i)=>{let n=e.json(r,{...i,unrecognizedObjectKeys:"passthrough"});return n.ok?{ok:!0,value:{...r,...n.value}}:n},getType:()=>Kj.OBJECT};return{...t,...bT(t),...Z$t(t),...Len(t)}}}}function oAp({extensionKeys:e,value:t,transformBase:r,transformExtension:i}){let n=new Set(e),[a,u]=iAp(ANa(t),s=>n.has(s)),l=r(MNa(t,u)),d=i(MNa(t,a));return l.ok&&d.ok?{ok:!0,value:{...l.value,...d.value}}:{ok:!1,errors:[...l.ok?[]:l.errors,...d.ok?[]:d.errors]}}function uAp(e){return!OuD(e)}function OuD(e){switch(e.getType()){case Kj.ANY:case Kj.UNKNOWN:case Kj.OPTIONAL:return!0;default:return!1}}function sAp(e){return N7o(e)}function cAp(e){let t={...Utc(e),_getRawProperties:()=>ILn(e)._getRawProperties(),_getParsedProperties:()=>ILn(e)._getParsedProperties()};return{...t,...bT(t),...Z$t(t),...Len(t)}}function F7o(e){let t={parse:(r,i)=>lAp(r,(n,a)=>e.parse(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),json:(r,i)=>lAp(r,(n,a)=>e.json(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),getType:()=>Kj.LIST};return{...EL(t),...bT(t)}}function lAp(e,t){return Array.isArray(e)?e.map((i,n)=>t(i,n)).reduce((i,n)=>{if(i.ok&&n.ok)return{ok:!0,value:[...i.value,n.value]};let a=[];return i.ok||a.push(...i.errors),n.ok||a.push(...n.errors),{ok:!1,errors:a}},{ok:!0,value:[]}):{ok:!1,errors:[{message:zA(e,"list"),path:[]}]}}function fAp(e){return AJ(Kj.STRING_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:zA(r,`"${e}"`)}]})()}function dAp(e){return AJ(Kj.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:zA(r,`${e.toString()}`)}]})()}var pAp=AJ(Kj.ANY,e=>({ok:!0,value:e}));var _Ap=AJ(Kj.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:zA(e,"boolean")}]});var hAp=AJ(Kj.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:zA(e,"number")}]});var yAp=AJ(Kj.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:zA(e,"string")}]});var vAp=AJ(Kj.UNKNOWN,e=>({ok:!0,value:e}));function gAp(e,t){let r={parse:(i,n)=>bAp({value:i,isKeyNumeric:e.getType()===Kj.NUMBER,transformKey:a=>e.parse(a,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`${a} (key)`]}),transformValue:(a,u)=>t.parse(a,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`${u}`]}),breadcrumbsPrefix:n?.breadcrumbsPrefix}),json:(i,n)=>bAp({value:i,isKeyNumeric:e.getType()===Kj.NUMBER,transformKey:a=>e.json(a,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`${a} (key)`]}),transformValue:(a,u)=>t.json(a,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`${u}`]}),breadcrumbsPrefix:n?.breadcrumbsPrefix}),getType:()=>Kj.RECORD};return{...EL(r),...bT(r)}}function bAp({value:e,isKeyNumeric:t,transformKey:r,transformValue:i,breadcrumbsPrefix:n=[]}){return uzi(e)?ENa(e).reduce((a,[u,l])=>{if(l==null)return a;let d=a,s=u;if(t){let g=u.length>0?Number(u):NaN;isNaN(g)||(s=g)}let o=r(s),c=i(l,s);if(d.ok&&o.ok&&c.ok)return{ok:!0,value:{...d.value,[o.value]:c.value}};let b=[];return d.ok||b.push(...d.errors),o.ok||b.push(...o.errors),c.ok||b.push(...c.errors),{ok:!1,errors:b}},{ok:!0,value:{}}):{ok:!1,errors:[{path:n,message:zA(e,"object")}]}}function OAp(e){let t=F7o(e),r={parse:(i,n)=>{let a=t.parse(i,n);return a.ok?{ok:!0,value:new Set(a.value)}:a},json:(i,n)=>i instanceof Set?t.json([...i],n):{ok:!1,errors:[{path:n?.breadcrumbsPrefix??[],message:zA(i,"Set")}]},getType:()=>Kj.SET};return{...EL(r),...bT(r)}}function PAp(e){let t={parse:(r,i)=>mAp((n,a)=>n.parse(r,a),e,i),json:(r,i)=>mAp((n,a)=>n.json(r,a),e,i),getType:()=>Kj.UNDISCRIMINATED_UNION};return{...EL(t),...bT(t)}}function mAp(e,t,r){let i=[];for(let[n,a]of t.entries()){let u=e(a,{...r,skipValidation:!1});if(u.ok)return u;for(let l of u.errors)i.push({path:l.path,message:`[Variant ${n}] ${l.message}`})}return{ok:!1,errors:i}}function jAp(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}function SAp(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,i=typeof e=="string"?e:e.parsedDiscriminant,n=x7o(ANa(t)),a={parse:(u,l)=>wAp({value:u,discriminant:r,transformedDiscriminant:i,transformDiscriminantValue:d=>n.parse(d,{allowUnrecognizedEnumValues:l?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...l?.breadcrumbsPrefix??[],r]}),getAdditionalPropertiesSchema:d=>t[d],allowUnrecognizedUnionMembers:l?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(d,s)=>s.parse(d,l),breadcrumbsPrefix:l?.breadcrumbsPrefix}),json:(u,l)=>wAp({value:u,discriminant:i,transformedDiscriminant:r,transformDiscriminantValue:d=>n.json(d,{allowUnrecognizedEnumValues:l?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...l?.breadcrumbsPrefix??[],i]}),getAdditionalPropertiesSchema:d=>t[d],allowUnrecognizedUnionMembers:l?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(d,s)=>s.json(d,l),breadcrumbsPrefix:l?.breadcrumbsPrefix}),getType:()=>Kj.UNION};return{...EL(a),...bT(a),...Z$t(a)}}function wAp({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:i,getAdditionalPropertiesSchema:n,allowUnrecognizedUnionMembers:a=!1,transformAdditionalProperties:u,breadcrumbsPrefix:l=[]}){if(!uzi(e))return{ok:!1,errors:[{path:l,message:zA(e,"object")}]};let{[t]:d,...s}=e;if(d==null)return{ok:!1,errors:[{path:l,message:`Missing discriminant ("${t}")`}]};let o=i(d);if(!o.ok)return{ok:!1,errors:o.errors};let c=n(o.value);if(c==null)return a?{ok:!0,value:{[r]:o.value,...s}}:{ok:!1,errors:[{path:[...l,t],message:"Unexpected discriminant value"}]};let b=u(s,c);return b.ok?{ok:!0,value:{[r]:d,...b.value}}:b}var L7o=ie.string();var zLn=ie.string();var Htc={};Po(Htc,{ApiAuth:()=>n6o,AuthScheme:()=>i6o,AuthSchemesRequirement:()=>U7o,BasicAuthScheme:()=>W7o,BearerAuthScheme:()=>V7o,EnvironmentVariable:()=>XNe,HeaderAuthScheme:()=>H7o,InferredAuthScheme:()=>r6o,InferredAuthSchemeTokenEndpoint:()=>t6o,InferredAuthenticatedRequestHeader:()=>e6o,OAuthAccessTokenRequestProperties:()=>Q7o,OAuthAccessTokenResponseProperties:()=>xLn,OAuthClientCredentials:()=>X7o,OAuthConfiguration:()=>Z7o,OAuthRefreshEndpoint:()=>Y7o,OAuthRefreshTokenRequestProperties:()=>K7o,OAuthScheme:()=>k7o,OAuthTokenEndpoint:()=>J7o});var XNe=ie.string();var U7o=ie.enum_(["ALL","ANY"]);var Uen=ie.objectWithoutOptionalProperties({unsafeName:ie.string(),safeName:ie.string()});var Sd=ie.objectWithoutOptionalProperties({originalName:ie.string(),camelCase:Uen,pascalCase:Uen,snakeCase:Uen,screamingSnakeCase:Uen});var Dd=ie.objectWithoutOptionalProperties({docs:ie.string().optional()});var V7o=ie.objectWithoutOptionalProperties({token:Sd,tokenEnvVar:XNe.optional()}).extend(Dd);var W7o=ie.objectWithoutOptionalProperties({username:Sd,usernameEnvVar:XNe.optional(),password:Sd,passwordEnvVar:XNe.optional()}).extend(Dd);var Hh=ie.objectWithoutOptionalProperties({wireValue:ie.string(),name:Sd});var H7o=ie.objectWithoutOptionalProperties({name:Hh,valueType:ie.lazy(()=>ov),prefix:ie.string().optional(),headerEnvVar:XNe.optional()}).extend(Dd);var k$t=ie.string();var Wrr=ie.string();var Hrr=ie.string();var czi=ie.objectWithoutOptionalProperties({endpointId:k$t,serviceId:Wrr,subpackageId:Hrr.optional()});var qNa=ie.unknown();var ML=ie.objectWithoutOptionalProperties({userSpecifiedExamples:ie.record(ie.string(),qNa),autogeneratedExamples:ie.record(ie.string(),qNa)});var $7o=ie.enum_(["IN_DEVELOPMENT","PRE_RELEASE","GENERAL_AVAILABILITY","DEPRECATED"]);var $rr=ie.objectWithoutOptionalProperties({status:$7o,message:ie.string().optional()});var j4=ie.objectWithoutOptionalProperties({availability:$rr.optional()}).extend(Dd);var lzi=ie.objectWithoutOptionalProperties({name:Hh,valueType:ie.lazy(()=>ov),allowMultiple:ie.boolean(),v2Examples:ML.optional()}).extend(j4);var RLn=ie.enum_(["READ_ONLY","WRITE_ONLY"]);var Ak=ie.objectWithoutOptionalProperties({name:Hh,valueType:ie.lazy(()=>ov),propertyAccess:RLn.optional(),v2Examples:ML.optional()}).extend(j4);var G7o=ie.union("type",{query:lzi,body:Ak}).transform({transform:e=>{switch(e.type){case"query":return roe.query(e);case"body":return roe.body(e);default:return e}},untransform:({_visit:e,...t})=>t});var qJ=ie.objectWithoutOptionalProperties({propertyPath:ie.list(Sd).optional(),property:G7o});var Q7o=ie.objectWithoutOptionalProperties({clientId:qJ,clientSecret:qJ,scopes:qJ.optional(),customProperties:ie.list(qJ).optional()});var AL=ie.objectWithoutOptionalProperties({propertyPath:ie.list(Sd).optional(),property:Ak});var xLn=ie.objectWithoutOptionalProperties({accessToken:AL,expiresIn:AL.optional(),refreshToken:AL.optional()});var J7o=ie.objectWithoutOptionalProperties({endpointReference:czi,requestProperties:Q7o,responseProperties:xLn});var K7o=ie.objectWithoutOptionalProperties({refreshToken:qJ});var Y7o=ie.objectWithoutOptionalProperties({endpointReference:czi,requestProperties:K7o,responseProperties:xLn});var X7o=ie.objectWithoutOptionalProperties({clientIdEnvVar:XNe.optional(),clientSecretEnvVar:XNe.optional(),tokenPrefix:ie.string().optional(),tokenHeader:ie.string().optional(),scopes:ie.list(ie.string()).optional(),tokenEndpoint:J7o,refreshEndpoint:Y7o.optional()});var Z7o=ie.union("type",{clientCredentials:X7o}).transform({transform:e=>{switch(e.type){case"clientCredentials":return nzi.clientCredentials(e);default:return e}},untransform:({_visit:e,...t})=>t});var k7o=ie.objectWithoutOptionalProperties({configuration:Z7o}).extend(Dd);var e6o=ie.objectWithoutOptionalProperties({responseProperty:AL,headerName:ie.string(),valuePrefix:ie.string().optional()});var t6o=ie.objectWithoutOptionalProperties({endpoint:czi,expiryProperty:AL.optional(),authenticatedRequestHeaders:ie.list(e6o)});var r6o=ie.objectWithoutOptionalProperties({tokenEndpoint:t6o}).extend(Dd);var i6o=ie.union(ie.discriminant("type","_type"),{bearer:V7o,basic:W7o,header:H7o,oauth:k7o,inferred:r6o}).transform({transform:e=>{switch(e.type){case"bearer":return BA.bearer(e);case"basic":return BA.basic(e);case"header":return BA.header(e);case"oauth":return BA.oauth(e);case"inferred":return BA.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t});var n6o=ie.objectWithoutOptionalProperties({requirement:U7o,schemes:ie.list(i6o)}).extend(Dd);var $tc={};Po($tc,{Availability:()=>$rr,AvailabilityStatus:()=>$7o,Declaration:()=>j4,DisplayName:()=>dzi,EndpointId:()=>k$t,EndpointReference:()=>czi,ErrorId:()=>pzi,EscapedString:()=>a6o,FeatureId:()=>u6o,FernFilepath:()=>aoe,Name:()=>Sd,NameAndWireValue:()=>Hh,SafeAndUnsafeString:()=>Uen,ServiceId:()=>Wrr,SubpackageId:()=>Hrr,TypeId:()=>Gx,WebSocketChannelId:()=>FLn,WebhookGroupId:()=>NLn,WebhookId:()=>o6o,WithContentType:()=>ZNe,WithDocs:()=>Dd,WithDocsAndAvailability:()=>fzi,WithJsonExample:()=>Grr});var fzi=ie.objectWithoutOptionalProperties({availability:$rr.optional()}).extend(Dd);var aoe=ie.objectWithoutOptionalProperties({allParts:ie.list(Sd),packagePath:ie.list(Sd),file:Sd.optional()});var dzi=ie.string();var a6o=ie.objectWithoutOptionalProperties({original:ie.string()});var Grr=ie.objectWithoutOptionalProperties({jsonExample:ie.unknown()});var ZNe=ie.objectWithoutOptionalProperties({contentType:ie.string().optional()});var Gx=ie.string();var pzi=ie.string();var NLn=ie.string();var o6o=ie.string();var FLn=ie.string();var u6o=ie.string();var Gtc={};Po(Gtc,{Constants:()=>s6o});var s6o=ie.objectWithoutOptionalProperties({errorInstanceIdKey:Hh});var qF={};Po(qF,{AliasType:()=>z6o,Auth:()=>_6o,AuthValues:()=>O6o,BasicAuth:()=>c6o,BasicAuthValues:()=>h6o,BearerAuth:()=>l6o,BearerAuthValues:()=>y6o,BodyRequest:()=>m6o,Declaration:()=>TJ,DiscriminatedUnionType:()=>V6o,DynamicIntermediateRepresentation:()=>o4o,Endpoint:()=>I6o,EndpointExample:()=>B6o,EndpointLocation:()=>ULn,EndpointSnippetRequest:()=>C6o,EndpointSnippetResponse:()=>DAp,EnumType:()=>R6o,EnvironmentValues:()=>T6o,ErrorSeverity:()=>u4o,Error_:()=>s4o,FileUploadRequestBody:()=>w6o,FileUploadRequestBodyProperty:()=>j6o,GeneratorConfig:()=>a4o,GeneratorOutputConfig:()=>n4o,GoPublishInfo:()=>X6o,HeaderAuth:()=>f6o,HeaderAuthValues:()=>v6o,InferredAuth:()=>p6o,InferredAuthValues:()=>g6o,InlinedRequest:()=>E6o,InlinedRequestBody:()=>S6o,InlinedRequestMetadata:()=>D6o,LiteralType:()=>c4o,MapType:()=>MAp,MavenPublishInfo:()=>Z6o,MultipleEnvironmentUrlValues:()=>q6o,NamedParameter:()=>$z,NamedType:()=>H6o,NpmPublishInfo:()=>k6o,NugetPublishInfo:()=>e4o,OAuth:()=>d6o,OAuthValues:()=>b6o,ObjectType:()=>x6o,PublishInfo:()=>i4o,PypiPublishInfo:()=>t4o,ReferencedRequestBody:()=>P6o,ReferencedRequestBodyType:()=>VLn,Request:()=>M6o,Response:()=>A6o,RubyGemsPublishInfo:()=>r4o,SingleDiscriminatedUnionType:()=>U6o,SingleDiscriminatedUnionTypeNoProperties:()=>L6o,SingleDiscriminatedUnionTypeObject:()=>N6o,SingleDiscriminatedUnionTypeSingleProperty:()=>F6o,TypeReference:()=>EAp,UndiscriminatedUnionType:()=>W6o,Values:()=>WLn,auth:()=>Qtc,declaration:()=>Jtc,endpoints:()=>Ktc,environment:()=>Ytc,ir:()=>Xtc,snippets:()=>Ztc,types:()=>ktc});var Qtc={};Po(Qtc,{Auth:()=>_6o,AuthValues:()=>O6o,BasicAuth:()=>c6o,BasicAuthValues:()=>h6o,BearerAuth:()=>l6o,BearerAuthValues:()=>y6o,HeaderAuth:()=>f6o,HeaderAuthValues:()=>v6o,InferredAuth:()=>p6o,InferredAuthValues:()=>g6o,OAuth:()=>d6o,OAuthValues:()=>b6o});var c6o=ie.objectWithoutOptionalProperties({username:Sd,password:Sd});var l6o=ie.objectWithoutOptionalProperties({token:Sd});var $z=ie.objectWithoutOptionalProperties({name:Hh,typeReference:ie.lazy(()=>qF.TypeReference)});var f6o=ie.objectWithoutOptionalProperties({header:$z});var d6o=ie.objectWithoutOptionalProperties({clientId:Sd,clientSecret:Sd});var p6o=ie.objectWithoutOptionalProperties({});var _6o=ie.union("type",{basic:c6o,bearer:l6o,header:f6o,oauth:d6o,inferred:p6o}).transform({transform:e=>{switch(e.type){case"basic":return us.Auth.basic(e);case"bearer":return us.Auth.bearer(e);case"header":return us.Auth.header(e);case"oauth":return us.Auth.oauth(e);case"inferred":return us.Auth.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t});var h6o=ie.objectWithoutOptionalProperties({username:ie.string(),password:ie.string()});var y6o=ie.objectWithoutOptionalProperties({token:ie.string()});var v6o=ie.objectWithoutOptionalProperties({value:ie.unknown()});var b6o=ie.objectWithoutOptionalProperties({clientId:ie.string(),clientSecret:ie.string()});var g6o=ie.objectWithoutOptionalProperties({});var O6o=ie.union("type",{basic:h6o,bearer:y6o,header:v6o,oauth:b6o,inferred:g6o}).transform({transform:e=>{switch(e.type){case"basic":return us.AuthValues.basic(e);case"bearer":return us.AuthValues.bearer(e);case"header":return us.AuthValues.header(e);case"oauth":return us.AuthValues.oauth(e);case"inferred":return us.AuthValues.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t});var Jtc={};Po(Jtc,{Declaration:()=>TJ});var TJ=ie.objectWithoutOptionalProperties({fernFilepath:aoe,name:Sd});var Ktc={};Po(Ktc,{BodyRequest:()=>m6o,Endpoint:()=>I6o,EndpointExample:()=>B6o,EndpointLocation:()=>ULn,FileUploadRequestBody:()=>w6o,FileUploadRequestBodyProperty:()=>j6o,InlinedRequest:()=>E6o,InlinedRequestBody:()=>S6o,InlinedRequestMetadata:()=>D6o,ReferencedRequestBody:()=>P6o,ReferencedRequestBodyType:()=>VLn,Request:()=>M6o,Response:()=>A6o});var LLn=ie.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"]);var ULn=ie.objectWithoutOptionalProperties({method:LLn,path:ie.string()});var VLn=ie.union("type",{bytes:ie.object({}),typeReference:ie.object({value:ie.lazy(()=>qF.TypeReference)})}).transform({transform:e=>{switch(e.type){case"bytes":return us.ReferencedRequestBodyType.bytes();case"typeReference":return us.ReferencedRequestBodyType.typeReference(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var m6o=ie.objectWithoutOptionalProperties({pathParameters:ie.list($z).optional(),body:VLn.optional()});var P6o=ie.objectWithoutOptionalProperties({bodyKey:Sd,bodyType:VLn});var j6o=ie.union("type",{file:Hh,fileArray:Hh,bodyProperty:$z}).transform({transform:e=>{switch(e.type){case"file":return us.FileUploadRequestBodyProperty.file(e);case"fileArray":return us.FileUploadRequestBodyProperty.fileArray(e);case"bodyProperty":return us.FileUploadRequestBodyProperty.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t});var w6o=ie.objectWithoutOptionalProperties({properties:ie.list(j6o)});var S6o=ie.union("type",{properties:ie.object({value:ie.list($z)}),referenced:P6o,fileUpload:w6o}).transform({transform:e=>{switch(e.type){case"properties":return us.InlinedRequestBody.properties(e.value);case"referenced":return us.InlinedRequestBody.referenced(e);case"fileUpload":return us.InlinedRequestBody.fileUpload(e);default:return e}},untransform:({_visit:e,...t})=>t});var D6o=ie.objectWithoutOptionalProperties({includePathParameters:ie.boolean(),onlyPathParameters:ie.boolean()});var E6o=ie.objectWithoutOptionalProperties({declaration:TJ,pathParameters:ie.list($z).optional(),queryParameters:ie.list($z).optional(),headers:ie.list($z).optional(),body:S6o.optional(),metadata:D6o.optional()});var M6o=ie.union("type",{body:m6o,inlined:E6o}).transform({transform:e=>{switch(e.type){case"body":return us.Request.body(e);case"inlined":return us.Request.inlined(e);default:return e}},untransform:({_visit:e,...t})=>t});var A6o=ie.union("type",{json:ie.object({})}).transform({transform:e=>{switch(e.type){case"json":return us.Response.json();default:return e}},untransform:({_visit:e,...t})=>t});var kNe=ie.string();var qk=ie.string();var Qrr=ie.string();var q6o=ie.record(qk,Qrr);var T6o=ie.undiscriminatedUnion([kNe,q6o]);var WLn=ie.record(ie.string(),ie.unknown());var C6o=ie.objectWithoutOptionalProperties({endpoint:ULn,baseUrl:ie.property("baseURL",ie.string().optional()),environment:T6o.optional(),auth:O6o.optional(),pathParameters:WLn.optional(),queryParameters:WLn.optional(),headers:WLn.optional(),requestBody:ie.unknown().optional()});var B6o=ie.objectWithoutOptionalProperties({id:ie.string(),name:ie.string().optional()}).extend(C6o);var I6o=ie.objectWithoutOptionalProperties({auth:_6o.optional(),declaration:TJ,location:ULn,request:M6o,response:A6o,examples:ie.list(B6o).optional()});var Ytc={};Po(Ytc,{EnvironmentValues:()=>T6o,MultipleEnvironmentUrlValues:()=>q6o});var Xtc={};Po(Xtc,{DynamicIntermediateRepresentation:()=>o4o,GeneratorConfig:()=>a4o,GeneratorOutputConfig:()=>n4o,GoPublishInfo:()=>X6o,MavenPublishInfo:()=>Z6o,NpmPublishInfo:()=>k6o,NugetPublishInfo:()=>e4o,PublishInfo:()=>i4o,PypiPublishInfo:()=>t4o,RubyGemsPublishInfo:()=>r4o});var z6o=ie.objectWithoutOptionalProperties({declaration:TJ,typeReference:ie.lazy(()=>qF.TypeReference)});var R6o=ie.objectWithoutOptionalProperties({declaration:TJ,values:ie.list(Hh)});var x6o=ie.objectWithoutOptionalProperties({declaration:TJ,properties:ie.list($z),additionalProperties:ie.boolean().optional()});var N6o=ie.objectWithoutOptionalProperties({typeId:Gx,discriminantValue:Hh,properties:ie.list($z)});var F6o=ie.objectWithoutOptionalProperties({typeReference:ie.lazy(()=>qF.TypeReference),discriminantValue:Hh,properties:ie.list($z).optional()});var L6o=ie.objectWithoutOptionalProperties({discriminantValue:Hh,properties:ie.list($z).optional()});var U6o=ie.union("type",{samePropertiesAsObject:N6o,singleProperty:F6o,noProperties:L6o}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return us.SingleDiscriminatedUnionType.samePropertiesAsObject(e);case"singleProperty":return us.SingleDiscriminatedUnionType.singleProperty(e);case"noProperties":return us.SingleDiscriminatedUnionType.noProperties(e);default:return e}},untransform:({_visit:e,...t})=>t});var V6o=ie.objectWithoutOptionalProperties({declaration:TJ,discriminant:Hh,types:ie.record(ie.string(),U6o)});var W6o=ie.objectWithoutOptionalProperties({declaration:TJ,types:ie.list(ie.lazy(()=>qF.TypeReference))});var H6o=ie.union("type",{alias:z6o,enum:R6o,object:x6o,discriminatedUnion:V6o,undiscriminatedUnion:W6o}).transform({transform:e=>{switch(e.type){case"alias":return us.NamedType.alias(e);case"enum":return us.NamedType.enum(e);case"object":return us.NamedType.object(e);case"discriminatedUnion":return us.NamedType.discriminatedUnion(e);case"undiscriminatedUnion":return us.NamedType.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t});var $6o=ie.objectWithoutOptionalProperties({id:kNe,name:Sd,url:Qrr}).extend(Dd);var G6o=ie.objectWithoutOptionalProperties({environments:ie.list($6o)});var Q6o=ie.objectWithoutOptionalProperties({id:qk,name:Sd});var J6o=ie.objectWithoutOptionalProperties({id:kNe,name:Sd,urls:ie.record(qk,Qrr)}).extend(Dd);var K6o=ie.objectWithoutOptionalProperties({baseUrls:ie.list(Q6o),environments:ie.list(J6o)});var Y6o=ie.union("type",{singleBaseUrl:G6o,multipleBaseUrls:K6o}).transform({transform:e=>{switch(e.type){case"singleBaseUrl":return $R.singleBaseUrl(e);case"multipleBaseUrls":return $R.multipleBaseUrls(e);default:return e}},untransform:({_visit:e,...t})=>t});var HLn=ie.objectWithoutOptionalProperties({defaultEnvironment:kNe.optional(),environments:Y6o});var X6o=ie.objectWithoutOptionalProperties({version:ie.string(),repoUrl:ie.string()});var Z6o=ie.objectWithoutOptionalProperties({version:ie.string(),coordinate:ie.string(),repoUrl:ie.string().optional()});var k6o=ie.objectWithoutOptionalProperties({version:ie.string(),packageName:ie.string(),repoUrl:ie.string().optional()});var e4o=ie.objectWithoutOptionalProperties({version:ie.string(),packageName:ie.string(),repoUrl:ie.string().optional()});var t4o=ie.objectWithoutOptionalProperties({version:ie.string(),packageName:ie.string(),repoUrl:ie.string().optional()});var r4o=ie.objectWithoutOptionalProperties({version:ie.string(),packageName:ie.string(),repoUrl:ie.string().optional()});var i4o=ie.union("type",{go:X6o,maven:Z6o,npm:k6o,nuget:e4o,pypi:t4o,rubygems:r4o}).transform({transform:e=>{switch(e.type){case"go":return us.PublishInfo.go(e);case"maven":return us.PublishInfo.maven(e);case"npm":return us.PublishInfo.npm(e);case"nuget":return us.PublishInfo.nuget(e);case"pypi":return us.PublishInfo.pypi(e);case"rubygems":return us.PublishInfo.rubygems(e);default:return e}},untransform:({_visit:e,...t})=>t});var n4o=ie.union("type",{publish:ie.object({value:i4o}),local:ie.object({})}).transform({transform:e=>{switch(e.type){case"publish":return us.GeneratorOutputConfig.publish(e.value);case"local":return us.GeneratorOutputConfig.local();default:return e}},untransform:({_visit:e,...t})=>t});var a4o=ie.objectWithoutOptionalProperties({apiName:ie.string(),organization:ie.string(),customConfig:ie.unknown(),outputConfig:n4o});var o4o=ie.objectWithoutOptionalProperties({version:ie.stringLiteral("1.0.0"),types:ie.record(Gx,H6o),endpoints:ie.record(k$t,I6o),environments:HLn.optional(),headers:ie.list($z).optional(),pathParameters:ie.list($z).optional(),generatorConfig:a4o.optional()});var Ztc={};Po(Ztc,{EndpointSnippetRequest:()=>C6o,EndpointSnippetResponse:()=>DAp,ErrorSeverity:()=>u4o,Error_:()=>s4o,Values:()=>WLn});var u4o=ie.enum_(["CRITICAL","WARNING"]);var s4o=ie.objectWithoutOptionalProperties({severity:u4o,message:ie.string()});var DAp=ie.objectWithoutOptionalProperties({snippet:ie.string(),errors:ie.list(s4o).optional()});var ktc={};Po(ktc,{AliasType:()=>z6o,DiscriminatedUnionType:()=>V6o,EnumType:()=>R6o,LiteralType:()=>c4o,MapType:()=>MAp,NamedParameter:()=>$z,NamedType:()=>H6o,ObjectType:()=>x6o,SingleDiscriminatedUnionType:()=>U6o,SingleDiscriminatedUnionTypeNoProperties:()=>L6o,SingleDiscriminatedUnionTypeObject:()=>N6o,SingleDiscriminatedUnionTypeSingleProperty:()=>F6o,TypeReference:()=>EAp,UndiscriminatedUnionType:()=>W6o});var c4o=ie.union("type",{boolean:ie.object({value:ie.boolean()}),string:ie.object({value:ie.string()})}).transform({transform:e=>{switch(e.type){case"boolean":return us.LiteralType.boolean(e.value);case"string":return us.LiteralType.string(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var $Ln=ie.enum_(["INTEGER","LONG","UINT","UINT_64","FLOAT","DOUBLE","BOOLEAN","STRING","DATE","DATE_TIME","UUID","BASE_64","BIG_INTEGER"]);var EAp=ie.union("type",{list:ie.object({value:ie.lazy(()=>qF.TypeReference)}),literal:ie.object({value:c4o}),map:ie.lazyObject(()=>qF.MapType),named:ie.object({value:Gx}),nullable:ie.object({value:ie.lazy(()=>qF.TypeReference)}),optional:ie.object({value:ie.lazy(()=>qF.TypeReference)}),primitive:ie.object({value:$Ln}),set:ie.object({value:ie.lazy(()=>qF.TypeReference)}),unknown:ie.object({})}).transform({transform:e=>{switch(e.type){case"list":return us.TypeReference.list(e.value);case"literal":return us.TypeReference.literal(e.value);case"map":return us.TypeReference.map(e);case"named":return us.TypeReference.named(e.value);case"nullable":return us.TypeReference.nullable(e.value);case"optional":return us.TypeReference.optional(e.value);case"primitive":return us.TypeReference.primitive(e.value);case"set":return us.TypeReference.set(e.value);case"unknown":return us.TypeReference.unknown();default:return e}},untransform:({_visit:e,...t})=>t});var MAp=ie.objectWithoutOptionalProperties({key:ie.lazy(()=>qF.TypeReference),value:ie.lazy(()=>qF.TypeReference)});var erc={};Po(erc,{EnvironmentBaseUrlId:()=>qk,EnvironmentBaseUrlWithId:()=>Q6o,EnvironmentId:()=>kNe,EnvironmentUrl:()=>Qrr,Environments:()=>Y6o,EnvironmentsConfig:()=>HLn,MultipleBaseUrlsEnvironment:()=>J6o,MultipleBaseUrlsEnvironments:()=>K6o,SingleBaseUrlEnvironment:()=>$6o,SingleBaseUrlEnvironments:()=>G6o});var trc={};Po(trc,{DeclaredErrorName:()=>_zi,ErrorDeclaration:()=>f4o,ErrorDeclarationDiscriminantValue:()=>AAp,ExampleError:()=>l4o});var _zi=ie.objectWithoutOptionalProperties({errorId:pzi,fernFilepath:aoe,name:Sd});var l4o=ie.objectWithoutOptionalProperties({name:Sd.optional(),shape:ie.lazyObject(()=>wm)}).extend(Grr).extend(Dd);var f4o=ie.objectWithoutOptionalProperties({name:_zi,displayName:ie.string().optional(),discriminantValue:Hh,type:ie.lazy(()=>ov).optional(),statusCode:ie.number(),examples:ie.list(l4o),v2Examples:ML.optional()}).extend(Dd);var AAp=ie.union("type",{property:Hh,statusCode:ie.object({})}).transform({transform:e=>{switch(e.type){case"property":return azi.property(e);case"statusCode":return azi.statusCode();default:return e}},untransform:({_visit:e,...t})=>t});var rrc={};Po(rrc,{BasicAuthValues:()=>h4o,BearerAuthValues:()=>y4o,HeaderAuthValues:()=>v4o,MultipleEnvironmentUrlValues:()=>_4o,OAuthValues:()=>b4o,V2AuthValues:()=>QLn,V2EndpointLocation:()=>p4o,V2EndpointLocationHttpMethod:()=>d4o,V2EnvironmentValues:()=>GLn,V2HttpEndpointCodeSample:()=>P4o,V2HttpEndpointExample:()=>TNa,V2HttpEndpointExamples:()=>j4o,V2HttpEndpointRequest:()=>g4o,V2HttpEndpointResponse:()=>m4o,V2HttpEndpointResponseBody:()=>O4o,V2SchemaExample:()=>qNa,V2SchemaExamples:()=>ML,V2ValueExamples:()=>Jrr,V2WebSocketEndpointLocation:()=>w4o,V2WebSocketMessageExample:()=>S4o,V2WebSocketSessionExample:()=>CNa,V2WebSocketSessionExamples:()=>D4o,V2WebhookExample:()=>BNa,V2WebhookExamples:()=>E4o,WithV2Examples:()=>gI});var gI=ie.objectWithoutOptionalProperties({v2Examples:ML.optional()});var d4o=ie.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"]);var p4o=ie.objectWithoutOptionalProperties({method:d4o,path:ie.string()});var _4o=ie.record(qk,Qrr);var GLn=ie.undiscriminatedUnion([kNe,_4o]);var h4o=ie.objectWithoutOptionalProperties({username:ie.string(),password:ie.string()});var y4o=ie.objectWithoutOptionalProperties({token:ie.string()});var v4o=ie.objectWithoutOptionalProperties({value:ie.unknown()});var b4o=ie.objectWithoutOptionalProperties({clientId:ie.string(),clientSecret:ie.string()});var QLn=ie.union("type",{basic:h4o,bearer:y4o,header:v4o,oauth:b4o}).transform({transform:e=>{switch(e.type){case"basic":return QNe.basic(e);case"bearer":return QNe.bearer(e);case"header":return QNe.header(e);case"oauth":return QNe.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t});var Jrr=ie.record(ie.string(),ie.unknown());var g4o=ie.objectWithoutOptionalProperties({endpoint:p4o,baseUrl:ie.property("baseURL",ie.string().optional()),environment:GLn.optional(),auth:QLn.optional(),pathParameters:Jrr.optional(),queryParameters:Jrr.optional(),headers:Jrr.optional(),requestBody:ie.unknown().optional()}).extend(Dd);var O4o=ie.union("type",{error:ie.object({value:ie.unknown()}),json:ie.object({value:ie.unknown()}),stream:ie.object({value:ie.list(ie.unknown())})}).transform({transform:e=>{switch(e.type){case"error":return m4.error(e.value);case"json":return m4.json(e.value);case"stream":return m4.stream(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var m4o=ie.objectWithoutOptionalProperties({statusCode:ie.number().optional(),body:O4o.optional()}).extend(Dd);var P4o=ie.objectWithoutOptionalProperties({name:ie.string().optional(),language:ie.string(),code:ie.string()}).extend(Dd);var TNa=ie.objectWithoutOptionalProperties({displayName:ie.string().optional(),request:g4o.optional(),response:m4o.optional(),codeSamples:ie.list(P4o).optional()});var j4o=ie.objectWithoutOptionalProperties({userSpecifiedExamples:ie.record(ie.string(),TNa),autogeneratedExamples:ie.record(ie.string(),TNa)});var w4o=ie.objectWithoutOptionalProperties({path:ie.string()});var S4o=ie.objectWithoutOptionalProperties({type:ie.string(),body:ie.unknown()});var CNa=ie.objectWithoutOptionalProperties({channel:w4o,baseUrl:ie.property("baseURL",ie.string().optional()),environment:GLn.optional(),auth:QLn.optional(),pathParameters:Jrr.optional(),queryParameters:Jrr.optional(),headers:Jrr.optional(),messages:ie.list(S4o).optional()});var D4o=ie.objectWithoutOptionalProperties({autogeneratedExamples:ie.record(ie.string(),CNa),userSpecifiedExamples:ie.record(ie.string(),CNa)});var BNa=ie.objectWithoutOptionalProperties({name:ie.string().optional(),payload:ie.unknown()});var E4o=ie.objectWithoutOptionalProperties({userSpecifiedExamples:ie.record(ie.string(),BNa),autogeneratedExamples:ie.record(ie.string(),BNa)});var nrc={};Po(nrc,{BasicLicense:()=>A4o,CustomLicense:()=>q4o,EnvironmentVariable:()=>X3,GeneratorConfig:()=>qAp,GeneratorEnvironment:()=>k4o,GeneratorOutputConfig:()=>X4o,GeneratorPublishConfig:()=>tUn,GeneratorPublishTarget:()=>L4o,GeneratorRegistriesConfig:()=>z4o,GeneratorRegistriesConfigV2:()=>N4o,GithubOutputMode:()=>K4o,GithubPublishInfo:()=>J4o,LicenseConfig:()=>T4o,LicenseId:()=>M4o,MavenCentralSignature:()=>JLn,MavenCentralSignatureGithubInfo:()=>V4o,MavenGithubPublishInfo:()=>W4o,MavenRegistryConfig:()=>B4o,MavenRegistryConfigV2:()=>KLn,NpmGithubPublishInfo:()=>U4o,NpmRegistryConfig:()=>I4o,NpmRegistryConfigV2:()=>YLn,NugetGithubPublishInfo:()=>Q4o,NugetRegistryConfig:()=>eUn,OutputMetadata:()=>x4o,OutputMetadataAuthor:()=>R4o,OutputMode:()=>Y4o,PostmanConfig:()=>F4o,PostmanGithubPublishInfo:()=>H4o,PublishingMetadata:()=>C4o,PypiGithubPublishInfo:()=>$4o,PypiMetadata:()=>XLn,PypiRegistryConfig:()=>ZLn,RemoteGeneratorEnvironment:()=>Z4o,RubyGemsGithubPublishInfo:()=>G4o,RubyGemsRegistryConfig:()=>kLn,config:()=>irc});var irc={};Po(irc,{BasicLicense:()=>A4o,CustomLicense:()=>q4o,EnvironmentVariable:()=>X3,GeneratorConfig:()=>qAp,GeneratorEnvironment:()=>k4o,GeneratorOutputConfig:()=>X4o,GeneratorPublishConfig:()=>tUn,GeneratorPublishTarget:()=>L4o,GeneratorRegistriesConfig:()=>z4o,GeneratorRegistriesConfigV2:()=>N4o,GithubOutputMode:()=>K4o,GithubPublishInfo:()=>J4o,LicenseConfig:()=>T4o,LicenseId:()=>M4o,MavenCentralSignature:()=>JLn,MavenCentralSignatureGithubInfo:()=>V4o,MavenGithubPublishInfo:()=>W4o,MavenRegistryConfig:()=>B4o,MavenRegistryConfigV2:()=>KLn,NpmGithubPublishInfo:()=>U4o,NpmRegistryConfig:()=>I4o,NpmRegistryConfigV2:()=>YLn,NugetGithubPublishInfo:()=>Q4o,NugetRegistryConfig:()=>eUn,OutputMetadata:()=>x4o,OutputMetadataAuthor:()=>R4o,OutputMode:()=>Y4o,PostmanConfig:()=>F4o,PostmanGithubPublishInfo:()=>H4o,PublishingMetadata:()=>C4o,PypiGithubPublishInfo:()=>$4o,PypiMetadata:()=>XLn,PypiRegistryConfig:()=>ZLn,RemoteGeneratorEnvironment:()=>Z4o,RubyGemsGithubPublishInfo:()=>G4o,RubyGemsRegistryConfig:()=>kLn});var M4o=ie.enum_(["MIT","Apache-2.0"]);var A4o=ie.objectWithoutOptionalProperties({id:M4o});var q4o=ie.objectWithoutOptionalProperties({filename:ie.string()});var T4o=ie.union("type",{basic:A4o,custom:q4o}).transform({transform:e=>{switch(e.type){case"basic":return U0.LicenseConfig.basic(e);case"custom":return U0.LicenseConfig.custom(e);default:return e}},untransform:({_visit:e,...t})=>t});var C4o=ie.objectWithoutOptionalProperties({packageDescription:ie.property("package_description",ie.string().optional()),publisherEmail:ie.property("publisher_email",ie.string().optional()),referenceUrl:ie.property("reference_url",ie.string().optional()),publisherName:ie.property("publisher_name",ie.string().optional())});var JLn=ie.objectWithoutOptionalProperties({keyId:ie.string(),password:ie.string(),secretKey:ie.string()});var B4o=ie.objectWithoutOptionalProperties({registryUrl:ie.string(),username:ie.string(),password:ie.string(),group:ie.string(),signature:JLn.optional()});var I4o=ie.objectWithoutOptionalProperties({registryUrl:ie.string(),token:ie.string(),scope:ie.string()});var z4o=ie.objectWithoutOptionalProperties({maven:B4o,npm:I4o});var KLn=ie.objectWithoutOptionalProperties({registryUrl:ie.string(),username:ie.string(),password:ie.string(),coordinate:ie.string(),signature:JLn.optional()});var YLn=ie.objectWithoutOptionalProperties({registryUrl:ie.string(),token:ie.string(),packageName:ie.string()});var R4o=ie.objectWithoutOptionalProperties({name:ie.string(),email:ie.string()});var x4o=ie.objectWithoutOptionalProperties({description:ie.string().optional(),authors:ie.list(R4o).optional()});var XLn=ie.objectWithoutOptionalProperties({keywords:ie.list(ie.string()).optional(),documentationLink:ie.string().optional(),homepageLink:ie.string().optional()}).extend(x4o);var ZLn=ie.objectWithoutOptionalProperties({registryUrl:ie.string(),username:ie.string(),password:ie.string(),packageName:ie.string(),pypiMetadata:XLn.optional()});var kLn=ie.objectWithoutOptionalProperties({registryUrl:ie.string(),apiKey:ie.string(),packageName:ie.string()});var eUn=ie.objectWithoutOptionalProperties({registryUrl:ie.string(),apiKey:ie.string(),packageName:ie.string()});var N4o=ie.objectWithoutOptionalProperties({maven:KLn,npm:YLn,pypi:ZLn,rubygems:kLn,nuget:eUn});var F4o=ie.objectWithoutOptionalProperties({apiKey:ie.string(),workspaceId:ie.string()});var L4o=ie.union("type",{maven:KLn,npm:YLn,pypi:ZLn,postman:F4o,rubygems:kLn,nuget:eUn}).transform({transform:e=>{switch(e.type){case"maven":return U0.GeneratorPublishTarget.maven(e);case"npm":return U0.GeneratorPublishTarget.npm(e);case"pypi":return U0.GeneratorPublishTarget.pypi(e);case"postman":return U0.GeneratorPublishTarget.postman(e);case"rubygems":return U0.GeneratorPublishTarget.rubygems(e);case"nuget":return U0.GeneratorPublishTarget.nuget(e);default:return e}},untransform:({_visit:e,...t})=>t});var tUn=ie.objectWithoutOptionalProperties({registries:z4o,registriesV2:N4o,publishTarget:L4o.optional(),version:ie.string()});var X3=ie.string();var U4o=ie.objectWithoutOptionalProperties({registryUrl:ie.string(),packageName:ie.string(),tokenEnvironmentVariable:X3,shouldGeneratePublishWorkflow:ie.boolean().optional()});var V4o=ie.objectWithoutOptionalProperties({keyIdEnvironmentVariable:X3,passwordEnvironmentVariable:X3,secretKeyEnvironmentVariable:X3});var W4o=ie.objectWithoutOptionalProperties({registryUrl:ie.string(),coordinate:ie.string(),usernameEnvironmentVariable:X3,passwordEnvironmentVariable:X3,signature:V4o.optional(),shouldGeneratePublishWorkflow:ie.boolean().optional()});var H4o=ie.objectWithoutOptionalProperties({apiKeyEnvironmentVariable:X3,workspaceIdEnvironmentVariable:X3});var $4o=ie.objectWithoutOptionalProperties({registryUrl:ie.string(),packageName:ie.string(),usernameEnvironmentVariable:X3,passwordEnvironmentVariable:X3,pypiMetadata:XLn.optional(),shouldGeneratePublishWorkflow:ie.boolean().optional()});var G4o=ie.objectWithoutOptionalProperties({registryUrl:ie.string(),packageName:ie.string(),apiKeyEnvironmentVariable:X3,shouldGeneratePublishWorkflow:ie.boolean().optional()});var Q4o=ie.objectWithoutOptionalProperties({registryUrl:ie.string(),packageName:ie.string(),apiKeyEnvironmentVariable:X3,shouldGeneratePublishWorkflow:ie.boolean().optional()});var J4o=ie.union("type",{npm:U4o,maven:W4o,postman:H4o,pypi:$4o,rubygems:G4o,nuget:Q4o}).transform({transform:e=>{switch(e.type){case"npm":return U0.GithubPublishInfo.npm(e);case"maven":return U0.GithubPublishInfo.maven(e);case"postman":return U0.GithubPublishInfo.postman(e);case"pypi":return U0.GithubPublishInfo.pypi(e);case"rubygems":return U0.GithubPublishInfo.rubygems(e);case"nuget":return U0.GithubPublishInfo.nuget(e);default:return e}},untransform:({_visit:e,...t})=>t});var K4o=ie.objectWithoutOptionalProperties({version:ie.string(),repoUrl:ie.string(),installationToken:ie.string().optional(),publishInfo:J4o.optional()});var Y4o=ie.union("type",{publish:tUn,downloadFiles:ie.object({}),github:K4o}).transform({transform:e=>{switch(e.type){case"publish":return U0.OutputMode.publish(e);case"downloadFiles":return U0.OutputMode.downloadFiles();case"github":return U0.OutputMode.github(e);default:return e}},untransform:({_visit:e,...t})=>t});var X4o=ie.objectWithoutOptionalProperties({path:ie.string(),snippetFilepath:ie.string().optional(),snippetTemplateFilepath:ie.string().optional(),publishingMetadata:C4o.optional(),mode:Y4o});var Z4o=ie.objectWithoutOptionalProperties({coordinatorUrl:ie.string(),coordinatorUrlV2:ie.string(),id:ie.string()});var k4o=ie.union(ie.discriminant("type","_type"),{local:ie.object({}),remote:Z4o}).transform({transform:e=>{switch(e.type){case"local":return U0.GeneratorEnvironment.local();case"remote":return U0.GeneratorEnvironment.remote(e);default:return e}},untransform:({_visit:e,...t})=>t});var qAp=ie.objectWithoutOptionalProperties({dryRun:ie.boolean(),irFilepath:ie.string(),originalReadmeFilepath:ie.string().optional(),license:T4o.optional(),output:X4o,publish:tUn.optional(),workspaceName:ie.string(),organization:ie.string(),customConfig:ie.unknown(),environment:k4o,whitelabel:ie.boolean(),writeUnitTests:ie.boolean(),generatePaginatedClients:ie.boolean().optional(),generateOauthClients:ie.boolean()});var arc={};Po(arc,{AutogeneratedEndpointExample:()=>H2o,BytesRequest:()=>aUn,BytesResponse:()=>lUn,CursorPagination:()=>M2o,CustomPagination:()=>q2o,DeclaredServiceName:()=>e2o,EndpointName:()=>r2o,ExampleCodeSample:()=>z2o,ExampleCodeSampleLanguage:()=>C2o,ExampleCodeSampleSdk:()=>I2o,ExampleEndpointCall:()=>hUn,ExampleEndpointErrorResponse:()=>U2o,ExampleEndpointSuccessResponse:()=>L2o,ExampleHeader:()=>Ven,ExampleInlinedRequestBody:()=>_Un,ExampleInlinedRequestBodyProperty:()=>x2o,ExamplePathParameter:()=>hzi,ExampleQueryParameter:()=>pUn,ExampleQueryParameterShape:()=>R2o,ExampleRequestBody:()=>N2o,ExampleResponse:()=>V2o,ExampleServerSideEvent:()=>F2o,FileDownloadResponse:()=>sUn,FileProperty:()=>u2o,FilePropertyArray:()=>o2o,FilePropertySingle:()=>a2o,FileUploadBodyProperty:()=>c2o,FileUploadBodyPropertyEncoding:()=>s2o,FileUploadRequest:()=>f2o,FileUploadRequestProperty:()=>l2o,GrpcTransport:()=>J2o,HttpEndpoint:()=>Z2o,HttpEndpointSource:()=>X2o,HttpHeader:()=>Tk,HttpMethod:()=>LLn,HttpPath:()=>eFe,HttpPathPart:()=>t2o,HttpRequestBody:()=>oUn,HttpRequestBodyReference:()=>nUn,HttpResponse:()=>dUn,HttpResponseBody:()=>w2o,HttpService:()=>t8o,InlinedRequestBody:()=>n2o,InlinedRequestBodyProperty:()=>iUn,JsonResponse:()=>uUn,JsonResponseBody:()=>v2o,JsonResponseBodyWithProperty:()=>b2o,JsonStreamChunk:()=>g2o,NonStreamHttpResponseBody:()=>P2o,OffsetPagination:()=>A2o,Pagination:()=>T2o,PathParameter:()=>eGt,PathParameterLocation:()=>i2o,ProtoSourceInfo:()=>Y2o,QueryParameter:()=>lzi,RequestProperty:()=>qJ,RequestPropertyValue:()=>G7o,ResponseError:()=>D2o,ResponseErrors:()=>E2o,ResponseProperty:()=>AL,SdkRequest:()=>y2o,SdkRequestBodyType:()=>p2o,SdkRequestShape:()=>h2o,SdkRequestWrapper:()=>_2o,SseStreamChunk:()=>m2o,StreamParameterResponse:()=>j2o,StreamingResponse:()=>fUn,SupportedSdkLanguage:()=>B2o,TextResponse:()=>cUn,TextStreamChunk:()=>O2o,Transport:()=>vUn,UserSpecifiedEndpointExample:()=>W2o,V2HttpRequestBodies:()=>d2o,V2HttpResponses:()=>S2o});var e2o=ie.objectWithoutOptionalProperties({fernFilepath:aoe});var t2o=ie.objectWithoutOptionalProperties({pathParameter:ie.string(),tail:ie.string()});var eFe=ie.objectWithoutOptionalProperties({head:ie.string(),parts:ie.list(t2o)});var r2o=Sd;var Tk=ie.objectWithoutOptionalProperties({name:Hh,valueType:ie.lazy(()=>ov),env:ie.string().optional(),v2Examples:ML.optional()}).extend(j4);var i2o=ie.enum_(["ROOT","SERVICE","ENDPOINT"]);var rUn=ie.string();var eGt=ie.objectWithoutOptionalProperties({name:Sd,valueType:ie.lazy(()=>ov),location:i2o,variable:rUn.optional(),v2Examples:ML.optional()}).extend(Dd);var OI=ie.objectWithoutOptionalProperties({typeId:Gx,fernFilepath:aoe,name:Sd,displayName:dzi.optional()});var iUn=ie.objectWithoutOptionalProperties({name:Hh,valueType:ie.lazy(()=>ov),v2Examples:ML.optional(),propertyAccess:RLn.optional()}).extend(fzi);var n2o=ie.objectWithoutOptionalProperties({name:Sd,extends:ie.list(OI),properties:ie.list(iUn),extendedProperties:ie.list(Ak).optional(),extraProperties:ie.property("extra-properties",ie.boolean())}).extend(Dd).extend(gI).extend(ZNe);var nUn=ie.objectWithoutOptionalProperties({requestBodyType:ie.lazy(()=>ov)}).extend(Dd).extend(ZNe).extend(gI);var a2o=ie.objectWithoutOptionalProperties({key:Hh,isOptional:ie.boolean(),contentType:ie.string().optional()}).extend(Dd);var o2o=ie.objectWithoutOptionalProperties({key:Hh,isOptional:ie.boolean(),contentType:ie.string().optional()}).extend(Dd);var u2o=ie.union("type",{file:a2o,fileArray:o2o}).transform({transform:e=>{switch(e.type){case"file":return toe.file(e);case"fileArray":return toe.fileArray(e);default:return e}},untransform:({_visit:e,...t})=>t});var s2o=ie.enum_(["exploded","json","form"]);var c2o=ie.objectWithoutOptionalProperties({style:s2o.optional()}).extend(iUn).extend(ZNe);var l2o=ie.union("type",{file:ie.object({value:u2o}),bodyProperty:c2o}).transform({transform:e=>{switch(e.type){case"file":return P4.file(e.value);case"bodyProperty":return P4.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t});var f2o=ie.objectWithoutOptionalProperties({name:Sd,properties:ie.list(l2o)}).extend(Dd).extend(gI).extend(ZNe);var aUn=ie.objectWithoutOptionalProperties({isOptional:ie.boolean()}).extend(Dd).extend(gI).extend(ZNe);var oUn=ie.union("type",{inlinedRequestBody:n2o,reference:nUn,fileUpload:f2o,bytes:aUn}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return IA.inlinedRequestBody(e);case"reference":return IA.reference(e);case"fileUpload":return IA.fileUpload(e);case"bytes":return IA.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t});var d2o=ie.objectWithoutOptionalProperties({requestBodies:ie.list(oUn).optional()});var p2o=ie.union("type",{typeReference:nUn,bytes:aUn}).transform({transform:e=>{switch(e.type){case"typeReference":return K$t.typeReference(e);case"bytes":return K$t.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t});var _2o=ie.objectWithoutOptionalProperties({wrapperName:Sd,bodyKey:Sd,includePathParameters:ie.boolean().optional(),onlyPathParameters:ie.boolean().optional()});var h2o=ie.union("type",{justRequestBody:ie.object({value:p2o}),wrapper:_2o}).transform({transform:e=>{switch(e.type){case"justRequestBody":return YNe.justRequestBody(e.value);case"wrapper":return YNe.wrapper(e);default:return e}},untransform:({_visit:e,...t})=>t});var y2o=ie.objectWithoutOptionalProperties({streamParameter:qJ.optional(),requestParameterName:Sd,shape:h2o});var v2o=ie.objectWithoutOptionalProperties({responseBodyType:ie.lazy(()=>ov)}).extend(Dd).extend(gI);var b2o=ie.objectWithoutOptionalProperties({responseBodyType:ie.lazy(()=>ov),responseProperty:Ak.optional()}).extend(Dd).extend(gI);var uUn=ie.union("type",{response:v2o,nestedPropertyAsResponse:b2o}).transform({transform:e=>{switch(e.type){case"response":return PL.response(e);case"nestedPropertyAsResponse":return PL.nestedPropertyAsResponse(e);default:return e}},untransform:({_visit:e,...t})=>t});var sUn=ie.objectWithoutOptionalProperties({}).extend(Dd).extend(gI);var cUn=ie.objectWithoutOptionalProperties({}).extend(Dd).extend(gI);var lUn=ie.objectWithoutOptionalProperties({}).extend(Dd).extend(gI);var g2o=ie.objectWithoutOptionalProperties({payload:ie.lazy(()=>ov),terminator:ie.string().optional()}).extend(Dd).extend(gI);var O2o=ie.objectWithoutOptionalProperties({}).extend(Dd).extend(gI);var m2o=ie.objectWithoutOptionalProperties({payload:ie.lazy(()=>ov),terminator:ie.string().optional()}).extend(Dd).extend(gI);var fUn=ie.union("type",{json:g2o,text:O2o,sse:m2o}).transform({transform:e=>{switch(e.type){case"json":return jL.json(e);case"text":return jL.text(e);case"sse":return jL.sse(e);default:return e}},untransform:({_visit:e,...t})=>t});var P2o=ie.union("type",{json:ie.object({value:uUn}),fileDownload:sUn,text:cUn,bytes:lUn}).transform({transform:e=>{switch(e.type){case"json":return _H.json(e.value);case"fileDownload":return _H.fileDownload(e);case"text":return _H.text(e);case"bytes":return _H.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t});var j2o=ie.objectWithoutOptionalProperties({nonStreamResponse:P2o,streamResponse:fUn});var w2o=ie.union("type",{json:ie.object({value:uUn}),fileDownload:sUn,text:cUn,bytes:lUn,streaming:ie.object({value:fUn}),streamParameter:j2o}).transform({transform:e=>{switch(e.type){case"json":return c1.json(e.value);case"fileDownload":return c1.fileDownload(e);case"text":return c1.text(e);case"bytes":return c1.bytes(e);case"streaming":return c1.streaming(e.value);case"streamParameter":return c1.streamParameter(e);default:return e}},untransform:({_visit:e,...t})=>t});var dUn=ie.objectWithoutOptionalProperties({statusCode:ie.property("status-code",ie.number().optional()),body:w2o.optional()});var S2o=ie.objectWithoutOptionalProperties({responses:ie.list(dUn).optional()});var D2o=ie.objectWithoutOptionalProperties({error:_zi}).extend(Dd);var E2o=ie.list(D2o);var M2o=ie.objectWithoutOptionalProperties({page:qJ,next:AL,results:AL});var A2o=ie.objectWithoutOptionalProperties({page:qJ,results:AL,hasNextPage:AL.optional(),step:qJ.optional()});var q2o=ie.objectWithoutOptionalProperties({results:AL});var T2o=ie.union("type",{cursor:M2o,offset:A2o,custom:q2o}).transform({transform:e=>{switch(e.type){case"cursor":return EJ.cursor(e);case"offset":return EJ.offset(e);case"custom":return EJ.custom(e);default:return e}},untransform:({_visit:e,...t})=>t});var C2o=ie.objectWithoutOptionalProperties({name:Sd.optional(),language:ie.string(),code:ie.string(),install:ie.string().optional()}).extend(Dd);var B2o=ie.enum_(["curl","python","javascript","typescript","go","ruby","csharp","java"]);var I2o=ie.objectWithoutOptionalProperties({name:Sd.optional(),sdk:B2o,code:ie.string()}).extend(Dd);var z2o=ie.union("type",{language:C2o,sdk:I2o}).transform({transform:e=>{switch(e.type){case"language":return vAe.language(e);case"sdk":return vAe.sdk(e);default:return e}},untransform:({_visit:e,...t})=>t});var hzi=ie.objectWithoutOptionalProperties({name:Sd,value:ie.lazyObject(()=>wm)});var Ven=ie.objectWithoutOptionalProperties({name:Hh,value:ie.lazyObject(()=>wm)});var R2o=ie.union("type",{single:ie.object({}),exploded:ie.object({}),commaSeparated:ie.object({})}).transform({transform:e=>{switch(e.type){case"single":return q8.single();case"exploded":return q8.exploded();case"commaSeparated":return q8.commaSeparated();default:return e}},untransform:({_visit:e,...t})=>t});var pUn=ie.objectWithoutOptionalProperties({name:Hh,value:ie.lazyObject(()=>wm),shape:R2o.optional()});var x2o=ie.objectWithoutOptionalProperties({name:Hh,value:ie.lazyObject(()=>wm),originalTypeDeclaration:OI.optional()});var _Un=ie.objectWithoutOptionalProperties({properties:ie.list(x2o)}).extend(Grr);var N2o=ie.union("type",{inlinedRequestBody:_Un,reference:ie.lazyObject(()=>wm)}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return MJ.inlinedRequestBody(e);case"reference":return MJ.reference(e);default:return e}},untransform:({_visit:e,...t})=>t});var F2o=ie.objectWithoutOptionalProperties({event:ie.string(),data:ie.lazyObject(()=>wm)});var L2o=ie.union("type",{body:ie.object({value:ie.lazyObject(()=>wm).optional()}),stream:ie.object({value:ie.list(ie.lazyObject(()=>wm))}),sse:ie.object({value:ie.list(F2o)})}).transform({transform:e=>{switch(e.type){case"body":return NB.body(e.value);case"stream":return NB.stream(e.value);case"sse":return NB.sse(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var U2o=ie.objectWithoutOptionalProperties({error:_zi,body:ie.lazyObject(()=>wm).optional()});var V2o=ie.union("type",{ok:ie.object({value:L2o}),error:U2o}).transform({transform:e=>{switch(e.type){case"ok":return gC.ok(e.value);case"error":return gC.error(e);default:return e}},untransform:({_visit:e,...t})=>t});var hUn=ie.objectWithoutOptionalProperties({id:ie.string().optional(),name:Sd.optional(),url:ie.string(),rootPathParameters:ie.list(hzi),servicePathParameters:ie.list(hzi),endpointPathParameters:ie.list(hzi),serviceHeaders:ie.list(Ven),endpointHeaders:ie.list(Ven),queryParameters:ie.list(pUn),request:N2o.optional(),response:V2o}).extend(Dd);var W2o=ie.objectWithoutOptionalProperties({codeSamples:ie.list(z2o).optional(),example:hUn.optional()});var H2o=ie.objectWithoutOptionalProperties({example:hUn});var $2o=ie.objectWithoutOptionalProperties({namespace:ie.string()});var G2o=ie.objectWithoutOptionalProperties({csharp:$2o.optional()});var yUn=ie.objectWithoutOptionalProperties({filepath:ie.string(),packageName:ie.string().optional(),options:G2o.optional()});var Q2o=ie.objectWithoutOptionalProperties({file:yUn,name:Sd});var J2o=ie.objectWithoutOptionalProperties({service:Q2o});var vUn=ie.union("type",{http:ie.object({}),grpc:J2o}).transform({transform:e=>{switch(e.type){case"http":return JNe.http();case"grpc":return JNe.grpc(e);default:return e}},untransform:({_visit:e,...t})=>t});var K2o=ie.enum_(["UNARY","CLIENT_STREAM","SERVER_STREAM","BIDIRECTIONAL_STREAM"]);var Y2o=ie.objectWithoutOptionalProperties({methodType:K2o.optional()});var X2o=ie.union("type",{proto:Y2o,openapi:ie.object({}),openrpc:ie.object({})}).transform({transform:e=>{switch(e.type){case"proto":return DJ.proto(e);case"openapi":return DJ.openapi();case"openrpc":return DJ.openrpc();default:return e}},untransform:({_visit:e,...t})=>t});var Z2o=ie.objectWithoutOptionalProperties({id:k$t,name:r2o,displayName:ie.string().optional(),method:LLn,headers:ie.list(Tk),baseUrl:qk.optional(),v2BaseUrls:ie.list(qk).optional(),basePath:eFe.optional(),path:eFe,fullPath:eFe,pathParameters:ie.list(eGt),allPathParameters:ie.list(eGt),queryParameters:ie.list(lzi),requestBody:oUn.optional(),v2RequestBodies:d2o.optional(),sdkRequest:y2o.optional(),response:dUn.optional(),v2Responses:S2o.optional(),errors:E2o,auth:ie.boolean(),idempotent:ie.boolean(),pagination:T2o.optional(),userSpecifiedExamples:ie.list(W2o),autogeneratedExamples:ie.list(H2o),v2Examples:j4o.optional(),transport:vUn.optional(),source:X2o.optional(),audiences:ie.list(zLn).optional()}).extend(j4);var k2o=ie.objectWithoutOptionalProperties({});var e8o=ie.objectWithoutOptionalProperties({});var bUn=ie.objectWithoutOptionalProperties({json:k2o.optional(),proto:e8o.optional()});var t8o=ie.objectWithoutOptionalProperties({availability:$rr.optional(),name:e2o,displayName:ie.string().optional(),basePath:eFe,endpoints:ie.list(Z2o),headers:ie.list(Tk),pathParameters:ie.list(eGt),encoding:bUn.optional(),transport:vUn.optional(),audiences:ie.list(zLn).optional()});var orc={};Po(orc,{ApiDefinitionSource:()=>y5o,ApiDefinitionSourceId:()=>_5o,ApiVersionScheme:()=>i8o,ErrorDiscriminationByPropertyStrategy:()=>o5o,ErrorDiscriminationStrategy:()=>u5o,HeaderApiVersionScheme:()=>r8o,IntermediateRepresentation:()=>TAp,Package:()=>wUn,PackageNavigationConfig:()=>n5o,PlatformHeaders:()=>c5o,ProtoSource:()=>h5o,ReadmeConfig:()=>p5o,SdkConfig:()=>l5o,ServiceTypeReferenceInfo:()=>d5o,SourceConfig:()=>v5o,Subpackage:()=>a5o,UserAgent:()=>s5o});var aOi=ie.objectWithoutOptionalProperties({name:Hh}).extend(j4);var gUn=ie.objectWithoutOptionalProperties({default:aOi.optional(),values:ie.list(aOi)});var r8o=ie.objectWithoutOptionalProperties({header:Tk,value:gUn});var i8o=ie.union("type",{header:r8o}).transform({transform:e=>{switch(e.type){case"header":return ozi.header(e);default:return e}},untransform:({_visit:e,...t})=>t});var n8o=ie.enum_(["ENUM","OBJECT","UNION","UNDISCRIMINATED_UNION"]);var a8o=ie.objectWithoutOptionalProperties({name:OI,shape:n8o});var o8o=ie.objectWithoutOptionalProperties({min:ie.number().optional(),max:ie.number().optional(),exclusiveMin:ie.boolean().optional(),exclusiveMax:ie.boolean().optional(),multipleOf:ie.number().optional()});var u8o=ie.objectWithoutOptionalProperties({default:ie.number().optional(),validation:o8o.optional()});var s8o=ie.objectWithoutOptionalProperties({default:ie.number().optional()});var c8o=ie.objectWithoutOptionalProperties({});var l8o=ie.objectWithoutOptionalProperties({});var f8o=ie.objectWithoutOptionalProperties({});var d8o=ie.objectWithoutOptionalProperties({min:ie.number().optional(),max:ie.number().optional(),exclusiveMin:ie.boolean().optional(),exclusiveMax:ie.boolean().optional(),multipleOf:ie.number().optional()});var p8o=ie.objectWithoutOptionalProperties({default:ie.number().optional(),validation:d8o.optional()});var _8o=ie.objectWithoutOptionalProperties({default:ie.boolean().optional()});var h8o=ie.objectWithoutOptionalProperties({format:ie.string().optional(),pattern:ie.string().optional(),minLength:ie.number().optional(),maxLength:ie.number().optional()});var y8o=ie.objectWithoutOptionalProperties({default:ie.string().optional(),validation:h8o.optional()});var v8o=ie.objectWithoutOptionalProperties({});var b8o=ie.objectWithoutOptionalProperties({});var g8o=ie.objectWithoutOptionalProperties({});var O8o=ie.objectWithoutOptionalProperties({});var m8o=ie.objectWithoutOptionalProperties({default:ie.string().optional()});var P8o=ie.union("type",{integer:u8o,long:s8o,uint:c8o,uint64:l8o,float:f8o,double:p8o,boolean:_8o,string:y8o,date:v8o,dateTime:b8o,uuid:g8o,base64:O8o,bigInteger:m8o}).transform({transform:e=>{switch(e.type){case"integer":return Td.integer(e);case"long":return Td.long(e);case"uint":return Td.uint(e);case"uint64":return Td.uint64(e);case"float":return Td.float(e);case"double":return Td.double(e);case"boolean":return Td.boolean(e);case"string":return Td.string(e);case"date":return Td.date(e);case"dateTime":return Td.dateTime(e);case"uuid":return Td.uuid(e);case"base64":return Td.base64(e);case"bigInteger":return Td.bigInteger(e);default:return e}},untransform:({_visit:e,...t})=>t});var OUn=ie.objectWithoutOptionalProperties({v1:$Ln,v2:P8o.optional()});var j8o=ie.union(ie.discriminant("type","_type"),{container:ie.object({container:ie.lazy(()=>mUn)}),named:a8o,primitive:ie.object({primitive:OUn}),unknown:ie.object({})}).transform({transform:e=>{switch(e.type){case"container":return hH.container(e.container);case"named":return hH.named(e);case"primitive":return hH.primitive(e.primitive);case"unknown":return hH.unknown();default:return e}},untransform:({_visit:e,...t})=>t});var w8o=ie.objectWithoutOptionalProperties({aliasOf:ie.lazy(()=>ov),resolvedType:j8o});var S8o=ie.objectWithoutOptionalProperties({extends:ie.list(OI),properties:ie.list(Ak),extendedProperties:ie.list(Ak).optional(),extraProperties:ie.property("extra-properties",ie.boolean())});var D8o=ie.objectWithoutOptionalProperties({name:Hh,type:ie.lazy(()=>ov)});var E8o=ie.union(ie.discriminant("propertiesType","_type"),{samePropertiesAsObject:OI,singleProperty:D8o,noProperties:ie.object({})}).transform({transform:e=>{switch(e.propertiesType){case"samePropertiesAsObject":return wL.samePropertiesAsObject(e);case"singleProperty":return wL.singleProperty(e);case"noProperties":return wL.noProperties();default:return e}},untransform:({_visit:e,...t})=>t});var M8o=ie.objectWithoutOptionalProperties({discriminantValue:Hh,shape:E8o,displayName:ie.string().optional(),availability:$rr.optional()}).extend(Dd);var A8o=ie.objectWithoutOptionalProperties({discriminant:Hh,extends:ie.list(OI),types:ie.list(M8o),baseProperties:ie.list(Ak)});var q8o=ie.objectWithoutOptionalProperties({type:ie.lazy(()=>ov)}).extend(Dd);var T8o=ie.objectWithoutOptionalProperties({members:ie.list(q8o)});var C8o=ie.union(ie.discriminant("type","_type"),{alias:w8o,enum:gUn,object:S8o,union:A8o,undiscriminatedUnion:T8o}).transform({transform:e=>{switch(e.type){case"alias":return Vb.alias(e);case"enum":return Vb.enum(e);case"object":return Vb.object(e);case"union":return Vb.union(e);case"undiscriminatedUnion":return Vb.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t});var INa=ie.objectWithoutOptionalProperties({name:Sd.optional(),shape:ie.lazy(()=>PUn)}).extend(Grr).extend(Dd);var B8o=ie.union("type",{any:ie.object({}),api:ie.object({}),boolValue:ie.object({}),bytesValue:ie.object({}),doubleValue:ie.object({}),duration:ie.object({}),empty:ie.object({}),enum:ie.object({}),enumValue:ie.object({}),field:ie.object({}),fieldCardinality:ie.object({}),fieldKind:ie.object({}),fieldMask:ie.object({}),floatValue:ie.object({}),int32Value:ie.object({}),int64Value:ie.object({}),listValue:ie.object({}),method:ie.object({}),mixin:ie.object({}),nullValue:ie.object({}),option:ie.object({}),sourceContext:ie.object({}),stringValue:ie.object({}),struct:ie.object({}),syntax:ie.object({}),timestamp:ie.object({}),type:ie.object({}),uint32Value:ie.object({}),uint64Value:ie.object({}),value:ie.object({})}).transform({transform:e=>{switch(e.type){case"any":return od.any();case"api":return od.api();case"boolValue":return od.boolValue();case"bytesValue":return od.bytesValue();case"doubleValue":return od.doubleValue();case"duration":return od.duration();case"empty":return od.empty();case"enum":return od.enum();case"enumValue":return od.enumValue();case"field":return od.field();case"fieldCardinality":return od.fieldCardinality();case"fieldKind":return od.fieldKind();case"fieldMask":return od.fieldMask();case"floatValue":return od.floatValue();case"int32Value":return od.int32Value();case"int64Value":return od.int64Value();case"listValue":return od.listValue();case"method":return od.method();case"mixin":return od.mixin();case"nullValue":return od.nullValue();case"option":return od.option();case"sourceContext":return od.sourceContext();case"stringValue":return od.stringValue();case"struct":return od.struct();case"syntax":return od.syntax();case"timestamp":return od.timestamp();case"type":return od.type();case"uint32Value":return od.uint32Value();case"uint64Value":return od.uint64Value();case"value":return od.value();default:return e}},untransform:({_visit:e,...t})=>t});var I8o=ie.objectWithoutOptionalProperties({file:yUn,name:Sd});var z8o=ie.union("type",{wellKnown:ie.object({value:B8o}),userDefined:I8o}).transform({transform:e=>{switch(e.type){case"wellKnown":return mw.wellKnown(e.value);case"userDefined":return mw.userDefined(e);default:return e}},untransform:({_visit:e,...t})=>t});var R8o=ie.union("type",{proto:ie.object({value:z8o})}).transform({transform:e=>{switch(e.type){case"proto":return nOi.proto(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var x8o=ie.objectWithoutOptionalProperties({name:OI,shape:C8o,autogeneratedExamples:ie.list(INa),userProvidedExamples:ie.list(INa),v2Examples:ML.optional(),referencedTypes:ie.set(Gx),encoding:bUn.optional(),source:R8o.optional(),inline:ie.boolean().optional()}).extend(j4);var N8o=Sd;var F8o=ie.enum_(["GET","POST"]);var L8o=ie.objectWithoutOptionalProperties({name:Hh,valueType:ie.lazy(()=>ov)}).extend(fzi);var U8o=ie.objectWithoutOptionalProperties({name:Sd,extends:ie.list(OI),properties:ie.list(L8o)});var V8o=ie.objectWithoutOptionalProperties({payloadType:ie.lazy(()=>ov)}).extend(Dd);var W8o=ie.union("type",{inlinedPayload:U8o,reference:V8o}).transform({transform:e=>{switch(e.type){case"inlinedPayload":return yH.inlinedPayload(e);case"reference":return yH.reference(e);default:return e}},untransform:({_visit:e,...t})=>t});var H8o=ie.objectWithoutOptionalProperties({name:Sd.optional(),payload:ie.lazyObject(()=>wm)}).extend(Dd);var $8o=ie.objectWithoutOptionalProperties({id:o6o,name:N8o,displayName:ie.string().optional(),method:F8o,headers:ie.list(Tk),payload:W8o,examples:ie.list(H8o).optional(),v2Examples:E4o.optional()}).extend(j4);var G8o=ie.list($8o);var Q8o=Sd;var jUn=ie.string();var J8o=ie.enum_(["client","server"]);var K8o=ie.objectWithoutOptionalProperties({name:Hh,valueType:ie.lazy(()=>ov)}).extend(fzi);var Y8o=ie.objectWithoutOptionalProperties({name:Sd,extends:ie.list(OI),properties:ie.list(K8o)});var X8o=ie.objectWithoutOptionalProperties({bodyType:ie.lazy(()=>ov)}).extend(Dd);var Z8o=ie.union("type",{inlinedBody:Y8o,reference:X8o}).transform({transform:e=>{switch(e.type){case"inlinedBody":return DL.inlinedBody(e);case"reference":return DL.reference(e);default:return e}},untransform:({_visit:e,...t})=>t});var k8o=ie.objectWithoutOptionalProperties({type:jUn,displayName:ie.string().optional(),origin:J8o,body:Z8o}).extend(j4);var e5o=ie.union("type",{inlinedBody:_Un,reference:ie.lazyObject(()=>wm)}).transform({transform:e=>{switch(e.type){case"inlinedBody":return gAe.inlinedBody(e);case"reference":return gAe.reference(e);default:return e}},untransform:({_visit:e,...t})=>t});var t5o=ie.objectWithoutOptionalProperties({type:jUn,body:e5o});var r5o=ie.objectWithoutOptionalProperties({name:Sd.optional(),url:ie.string(),pathParameters:ie.list(hzi),headers:ie.list(Ven),queryParameters:ie.list(pUn),messages:ie.list(t5o)}).extend(Dd);var i5o=ie.objectWithoutOptionalProperties({name:Q8o,displayName:ie.string().optional(),baseUrl:qk.optional(),path:eFe,auth:ie.boolean(),headers:ie.list(Tk),queryParameters:ie.list(lzi),pathParameters:ie.list(eGt),messages:ie.list(k8o),examples:ie.list(r5o),v2Examples:D4o.optional()}).extend(j4);var n5o=ie.objectWithoutOptionalProperties({pointsTo:Hrr});var wUn=ie.objectWithoutOptionalProperties({fernFilepath:aoe,service:Wrr.optional(),types:ie.list(Gx),errors:ie.list(pzi),webhooks:NLn.optional(),websocket:FLn.optional(),subpackages:ie.list(Hrr),hasEndpointsInTree:ie.boolean(),navigationConfig:n5o.optional()}).extend(Dd);var a5o=ie.objectWithoutOptionalProperties({name:Sd,displayName:dzi.optional()}).extend(wUn);var o5o=ie.objectWithoutOptionalProperties({discriminant:Hh,contentProperty:Hh});var u5o=ie.union("type",{statusCode:ie.object({}),property:o5o}).transform({transform:e=>{switch(e.type){case"statusCode":return bAe.statusCode();case"property":return bAe.property(e);default:return e}},untransform:({_visit:e,...t})=>t});var s5o=ie.objectWithoutOptionalProperties({header:ie.stringLiteral("User-Agent"),value:ie.string()});var c5o=ie.objectWithoutOptionalProperties({language:ie.string(),sdkName:ie.string(),sdkVersion:ie.string(),userAgent:s5o.optional()});var l5o=ie.objectWithoutOptionalProperties({isAuthMandatory:ie.boolean(),hasStreamingEndpoints:ie.boolean(),hasPaginatedEndpoints:ie.boolean(),hasFileDownloadEndpoints:ie.boolean(),platformHeaders:c5o});var f5o=ie.objectWithoutOptionalProperties({id:rUn,name:Sd,type:ie.lazy(()=>ov)}).extend(Dd);var d5o=ie.objectWithoutOptionalProperties({typesReferencedOnlyByService:ie.record(Wrr,ie.list(Gx)),sharedTypes:ie.list(Gx)});var p5o=ie.objectWithoutOptionalProperties({defaultEndpoint:k$t.optional(),bannerLink:ie.string().optional(),introduction:ie.string().optional(),apiReferenceLink:ie.string().optional(),features:ie.record(u6o,ie.list(k$t)).optional()});var _5o=ie.string();var h5o=ie.objectWithoutOptionalProperties({id:_5o,protoRootUrl:ie.string()});var y5o=ie.union("type",{proto:h5o,openapi:ie.object({})}).transform({transform:e=>{switch(e.type){case"proto":return ioe.proto(e);case"openapi":return ioe.openapi();default:return e}},untransform:({_visit:e,...t})=>t});var v5o=ie.objectWithoutOptionalProperties({sources:ie.list(y5o)});var b5o=ie.objectWithoutOptionalProperties({apiKey:ie.string(),workspaceId:ie.string(),collectionId:ie.string().optional()});var g5o=ie.objectWithoutOptionalProperties({version:ie.string().optional(),packageName:ie.string().optional(),tokenEnvironmentVariable:ie.string()});var O5o=ie.objectWithoutOptionalProperties({coordinate:ie.string().optional(),version:ie.string().optional(),usernameEnvironmentVariable:ie.string(),passwordEnvironmentVariable:ie.string(),mavenUrlEnvironmentVariable:ie.string()});var m5o=ie.objectWithoutOptionalProperties({version:ie.string().optional(),packageName:ie.string().optional()});var yzi=ie.union("type",{postman:b5o,npm:g5o,maven:O5o,pypi:m5o}).transform({transform:e=>{switch(e.type){case"postman":return noe.postman(e);case"npm":return noe.npm(e);case"maven":return noe.maven(e);case"pypi":return noe.pypi(e);default:return e}},untransform:({_visit:e,...t})=>t});var P5o=ie.objectWithoutOptionalProperties({owner:ie.string(),repo:ie.string(),uri:ie.string().optional(),token:ie.string().optional(),target:yzi});var j5o=ie.objectWithoutOptionalProperties({target:yzi});var w5o=ie.objectWithoutOptionalProperties({generateFullProject:ie.boolean(),publishTarget:yzi.optional()});var S5o=ie.union("type",{github:P5o,direct:j5o,filesystem:w5o}).transform({transform:e=>{switch(e.type){case"github":return Urr.github(e);case"direct":return Urr.direct(e);case"filesystem":return Urr.filesystem(e);default:return e}},untransform:({_visit:e,...t})=>t});var TAp=ie.objectWithoutOptionalProperties({fdrApiDefinitionId:ie.string().optional(),apiVersion:i8o.optional(),apiName:Sd,apiDisplayName:ie.string().optional(),apiDocs:ie.string().optional(),auth:n6o,headers:ie.list(Tk),idempotencyHeaders:ie.list(Tk),types:ie.record(Gx,x8o),services:ie.record(Wrr,t8o),webhookGroups:ie.record(NLn,G8o),websocketChannels:ie.record(FLn,i5o).optional(),errors:ie.record(pzi,f4o),subpackages:ie.record(Hrr,a5o),rootPackage:wUn,constants:s6o,environments:HLn.optional(),basePath:eFe.optional(),pathParameters:ie.list(eGt),errorDiscriminationStrategy:u5o,sdkConfig:l5o,variables:ie.list(f5o),serviceTypeReferenceInfo:d5o,readmeConfig:p5o.optional(),sourceConfig:v5o.optional(),publishConfig:S5o.optional(),dynamic:o4o.optional(),selfHosted:ie.boolean().optional(),audiences:ie.list(L7o).optional()});var urc={};Po(urc,{CsharpProtobufFileOptions:()=>$2o,ProtobufFile:()=>yUn,ProtobufFileOptions:()=>G2o,ProtobufMethodType:()=>K2o,ProtobufService:()=>Q2o,ProtobufType:()=>z8o,UserDefinedProtobufType:()=>I8o,WellKnownProtobufType:()=>B8o});var src={};Po(src,{DirectPublish:()=>j5o,Filesystem:()=>w5o,GithubPublish:()=>P5o,MavenPublishTarget:()=>O5o,NpmPublishTarget:()=>g5o,PostmanPublishTarget:()=>b5o,PublishTarget:()=>yzi,PublishingConfig:()=>S5o,PypiPublishTarget:()=>m5o});var crc={};Po(crc,{AliasTypeDeclaration:()=>w8o,Base64Type:()=>O8o,BigIntegerType:()=>m8o,BooleanType:()=>_8o,ContainerType:()=>mUn,DateTimeType:()=>b8o,DateType:()=>v8o,DeclaredTypeName:()=>OI,DoubleType:()=>p8o,DoubleValidationRules:()=>d8o,Encoding:()=>bUn,EnumTypeDeclaration:()=>gUn,EnumTypeReference:()=>CAp,EnumValue:()=>aOi,ExampleAliasType:()=>T5o,ExampleContainer:()=>L5o,ExampleDatetime:()=>F5o,ExampleEnumType:()=>q5o,ExampleKeyValuePair:()=>J5o,ExampleListContainer:()=>W5o,ExampleLiteralContainer:()=>V5o,ExampleMapContainer:()=>Q5o,ExampleNamedType:()=>U5o,ExampleNullableContainer:()=>G5o,ExampleObjectProperty:()=>I5o,ExampleObjectType:()=>SUn,ExampleObjectTypeWithTypeId:()=>x5o,ExampleOptionalContainer:()=>$5o,ExamplePrimitive:()=>DUn,ExampleSetContainer:()=>H5o,ExampleSingleUnionType:()=>z5o,ExampleSingleUnionTypeProperties:()=>R5o,ExampleType:()=>INa,ExampleTypeReference:()=>wm,ExampleTypeReferenceShape:()=>N5o,ExampleTypeShape:()=>PUn,ExampleUndiscriminatedUnionType:()=>B5o,ExampleUnionType:()=>C5o,FloatType:()=>f8o,IntegerType:()=>u8o,IntegerValidationRules:()=>o8o,JsonEncoding:()=>k2o,Literal:()=>M5o,LongType:()=>s8o,MapType:()=>A5o,NamedType:()=>E5o,NamedTypeDefault:()=>D5o,ObjectProperty:()=>Ak,ObjectPropertyAccess:()=>RLn,ObjectTypeDeclaration:()=>S8o,PrimitiveType:()=>OUn,PrimitiveTypeV1:()=>$Ln,PrimitiveTypeV2:()=>P8o,ProtoEncoding:()=>e8o,ResolvedNamedType:()=>a8o,ResolvedTypeReference:()=>j8o,ShapeType:()=>n8o,SingleUnionType:()=>M8o,SingleUnionTypeProperties:()=>E8o,SingleUnionTypeProperty:()=>D8o,Source:()=>R8o,StringType:()=>y8o,StringValidationRules:()=>h8o,Type:()=>C8o,TypeDeclaration:()=>x8o,TypeReference:()=>ov,Uint64Type:()=>l8o,UintType:()=>c8o,UndiscriminatedUnionMember:()=>q8o,UndiscriminatedUnionTypeDeclaration:()=>T8o,UnionTypeDeclaration:()=>A8o,UuidType:()=>g8o});var D5o=ie.union("type",{enum:aOi}).transform({transform:e=>{switch(e.type){case"enum":return TLn.enum(e);default:return e}},untransform:({_visit:e,...t})=>t});var E5o=ie.objectWithoutOptionalProperties({typeId:Gx,fernFilepath:aoe,name:Sd,displayName:dzi.optional(),default:D5o.optional(),inline:ie.boolean().optional()});var ov=ie.union(ie.discriminant("type","_type"),{container:ie.object({container:ie.lazy(()=>mUn)}),named:E5o,primitive:ie.object({primitive:OUn}),unknown:ie.object({})}).transform({transform:e=>{switch(e.type){case"container":return Xc.container(e.container);case"named":return Xc.named(e);case"primitive":return Xc.primitive(e.primitive);case"unknown":return Xc.unknown();default:return e}},untransform:({_visit:e,...t})=>t});var CAp=ie.objectWithoutOptionalProperties({default:aOi.optional(),name:OI});var M5o=ie.union("type",{string:ie.object({string:ie.string()}),boolean:ie.object({boolean:ie.boolean()})}).transform({transform:e=>{switch(e.type){case"string":return SL.string(e.string);case"boolean":return SL.boolean(e.boolean);default:return e}},untransform:({_visit:e,...t})=>t});var mUn=ie.union(ie.discriminant("type","_type"),{list:ie.object({list:ie.lazy(()=>ov)}),map:ie.lazyObject(()=>A5o),nullable:ie.object({nullable:ie.lazy(()=>ov)}),optional:ie.object({optional:ie.lazy(()=>ov)}),set:ie.object({set:ie.lazy(()=>ov)}),literal:ie.object({literal:M5o})}).transform({transform:e=>{switch(e.type){case"list":return xy.list(e.list);case"map":return xy.map(e);case"nullable":return xy.nullable(e.nullable);case"optional":return xy.optional(e.optional);case"set":return xy.set(e.set);case"literal":return xy.literal(e.literal);default:return e}},untransform:({_visit:e,...t})=>t});var A5o=ie.objectWithoutOptionalProperties({keyType:ie.lazy(()=>ov),valueType:ie.lazy(()=>ov)});var q5o=ie.objectWithoutOptionalProperties({value:Hh});var PUn=ie.union("type",{alias:ie.lazyObject(()=>T5o),enum:q5o,object:ie.lazyObject(()=>SUn),union:ie.lazyObject(()=>C5o),undiscriminatedUnion:ie.lazyObject(()=>B5o)}).transform({transform:e=>{switch(e.type){case"alias":return l1.alias(e);case"enum":return l1.enum(e);case"object":return l1.object(e);case"union":return l1.union(e);case"undiscriminatedUnion":return l1.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t});var T5o=ie.objectWithoutOptionalProperties({value:ie.lazyObject(()=>wm)});var SUn=ie.objectWithoutOptionalProperties({properties:ie.list(ie.lazyObject(()=>I5o))});var I5o=ie.objectWithoutOptionalProperties({name:Hh,value:ie.lazyObject(()=>wm),originalTypeDeclaration:OI});var C5o=ie.objectWithoutOptionalProperties({discriminant:Hh,singleUnionType:ie.lazyObject(()=>z5o)});var B5o=ie.objectWithoutOptionalProperties({index:ie.number(),singleUnionType:ie.lazyObject(()=>wm)});var z5o=ie.objectWithoutOptionalProperties({wireDiscriminantValue:Hh,shape:ie.lazy(()=>R5o)});var R5o=ie.union("type",{samePropertiesAsObject:ie.lazyObject(()=>x5o),singleProperty:ie.lazyObject(()=>wm),noProperties:ie.object({})}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return Y3.samePropertiesAsObject(e);case"singleProperty":return Y3.singleProperty(e);case"noProperties":return Y3.noProperties();default:return e}},untransform:({_visit:e,...t})=>t});var wm=ie.objectWithoutOptionalProperties({shape:ie.lazy(()=>N5o)}).extend(Grr);var F5o=ie.objectWithoutOptionalProperties({datetime:ie.date(),raw:ie.string().optional()});var DUn=ie.union("type",{integer:ie.object({integer:ie.number()}),long:ie.object({long:ie.number()}),uint:ie.object({uint:ie.number()}),uint64:ie.object({uint64:ie.number()}),float:ie.object({float:ie.number()}),double:ie.object({double:ie.number()}),boolean:ie.object({boolean:ie.boolean()}),string:ie.object({string:a6o}),date:ie.object({date:ie.string()}),datetime:F5o,uuid:ie.object({uuid:ie.string()}),base64:ie.object({base64:ie.string()}),bigInteger:ie.object({bigInteger:ie.string()})}).transform({transform:e=>{switch(e.type){case"integer":return Vd.integer(e.integer);case"long":return Vd.long(e.long);case"uint":return Vd.uint(e.uint);case"uint64":return Vd.uint64(e.uint64);case"float":return Vd.float(e.float);case"double":return Vd.double(e.double);case"boolean":return Vd.boolean(e.boolean);case"string":return Vd.string(e.string);case"date":return Vd.date(e.date);case"datetime":return Vd.datetime(e);case"uuid":return Vd.uuid(e.uuid);case"base64":return Vd.base64(e.base64);case"bigInteger":return Vd.bigInteger(e.bigInteger);default:return e}},untransform:({_visit:e,...t})=>t});var N5o=ie.union("type",{primitive:ie.object({primitive:DUn}),container:ie.object({container:ie.lazy(()=>L5o)}),unknown:ie.object({unknown:ie.unknown()}),named:ie.lazyObject(()=>U5o)}).transform({transform:e=>{switch(e.type){case"primitive":return ny.primitive(e.primitive);case"container":return ny.container(e.container);case"unknown":return ny.unknown(e.unknown);case"named":return ny.named(e);default:return e}},untransform:({_visit:e,...t})=>t});var V5o=ie.objectWithoutOptionalProperties({literal:DUn});var L5o=ie.union("type",{list:ie.lazyObject(()=>W5o),set:ie.lazyObject(()=>H5o),optional:ie.lazyObject(()=>$5o),nullable:ie.lazyObject(()=>G5o),map:ie.lazyObject(()=>Q5o),literal:V5o}).transform({transform:e=>{switch(e.type){case"list":return Vm.list(e);case"set":return Vm.set(e);case"optional":return Vm.optional(e);case"nullable":return Vm.nullable(e);case"map":return Vm.map(e);case"literal":return Vm.literal(e);default:return e}},untransform:({_visit:e,...t})=>t});var W5o=ie.objectWithoutOptionalProperties({list:ie.list(ie.lazyObject(()=>wm)),itemType:ie.lazy(()=>ov)});var H5o=ie.objectWithoutOptionalProperties({set:ie.list(ie.lazyObject(()=>wm)),itemType:ie.lazy(()=>ov)});var $5o=ie.objectWithoutOptionalProperties({optional:ie.lazyObject(()=>wm).optional(),valueType:ie.lazy(()=>ov)});var G5o=ie.objectWithoutOptionalProperties({nullable:ie.lazyObject(()=>wm).optional(),valueType:ie.lazy(()=>ov)});var Q5o=ie.objectWithoutOptionalProperties({map:ie.list(ie.lazyObject(()=>J5o)),keyType:ie.lazy(()=>ov),valueType:ie.lazy(()=>ov)});var J5o=ie.objectWithoutOptionalProperties({key:ie.lazyObject(()=>wm),value:ie.lazyObject(()=>wm)});var U5o=ie.objectWithoutOptionalProperties({typeName:OI,shape:ie.lazy(()=>PUn)});var x5o=ie.objectWithoutOptionalProperties({typeId:Gx,object:ie.lazyObject(()=>SUn)});var lrc={};Po(lrc,{VariableDeclaration:()=>f5o,VariableId:()=>rUn});var frc={};Po(frc,{ExampleWebhookCall:()=>H8o,InlinedWebhookPayload:()=>U8o,InlinedWebhookPayloadProperty:()=>L8o,Webhook:()=>$8o,WebhookGroup:()=>G8o,WebhookHttpMethod:()=>F8o,WebhookName:()=>N8o,WebhookPayload:()=>W8o,WebhookPayloadReference:()=>V8o});var drc={};Po(drc,{ExampleWebSocketMessage:()=>t5o,ExampleWebSocketMessageBody:()=>e5o,ExampleWebSocketSession:()=>r5o,InlinedWebSocketMessageBody:()=>Y8o,InlinedWebSocketMessageBodyProperty:()=>K8o,WebSocketChannel:()=>i5o,WebSocketMessage:()=>k8o,WebSocketMessageBody:()=>Z8o,WebSocketMessageBodyReference:()=>X8o,WebSocketMessageId:()=>jUn,WebSocketMessageOrigin:()=>J8o,WebSocketName:()=>Q8o});var Ck={integer:"integer",long:"long",uint:"uint",uint64:"uint64",float:"float",double:"double",boolean:"boolean",string:"string",datetime:"datetime",base64:"base64",uuid:"uuid",date:"date",bigint:"bigint",unknown:"unknown"};var ooe={MAP:/^map<\s*([^,]*)\s*,\s*(.*)\s*>$/,LIST:/^list<\s*(.*)\s*>$/,SET:/^set<\s*(.*)\s*>$/,OPTIONAL:/^optional<\s*(.*)\s*>$/,NULLABLE:/^nullable<\s*(.*)\s*>$/,LITERAL:/^literal<\s*(?:"(.*)"|(true|false))\s*>$/};function Wen({type:e,_default:t,validation:r,visitor:i}){switch(e){case Ck.integer:{let o=r??void 0;return i.primitive({v1:iy.Integer,v2:Td.integer({default:t??void 0,validation:o!=null?{min:o.min,max:o.max,exclusiveMin:o.exclusiveMin,exclusiveMax:o.exclusiveMax,multipleOf:o.multipleOf}:void 0})})}case Ck.double:{let o=r??void 0;return i.primitive({v1:iy.Double,v2:Td.double({default:t??void 0,validation:o!=null?{min:o.min,max:o.max,exclusiveMin:o.exclusiveMin,exclusiveMax:o.exclusiveMax,multipleOf:o.multipleOf}:void 0})})}case Ck.string:{let o=r??void 0;return i.primitive({v1:iy.String,v2:Td.string({default:t??void 0,validation:o!=null?{format:o.format,pattern:o.pattern,minLength:o.minLength,maxLength:o.maxLength}:void 0})})}case Ck.float:return i.primitive({v1:iy.Float,v2:void 0});case Ck.long:return i.primitive({v1:iy.Long,v2:Td.long({default:t??void 0})});case Ck.boolean:return i.primitive({v1:iy.Boolean,v2:Td.boolean({default:t??void 0})});case Ck.datetime:return i.primitive({v1:iy.DateTime,v2:void 0});case Ck.date:return i.primitive({v1:iy.Date,v2:void 0});case Ck.uuid:return i.primitive({v1:iy.Uuid,v2:void 0});case Ck.base64:return i.primitive({v1:iy.Base64,v2:void 0});case Ck.bigint:return i.primitive({v1:iy.BigInteger,v2:Td.bigInteger({default:t??void 0})});case Ck.uint:return i.primitive({v1:iy.Uint,v2:void 0});case Ck.uint64:return i.primitive({v1:iy.Uint64,v2:void 0});case Ck.unknown:return i.unknown()}let n=e.match(ooe.MAP);if(n?.[1]!=null&&n[2]!=null)return i.map({keyType:n[1],valueType:n[2]});let a=e.match(ooe.LIST);if(a?.[1]!=null)return i.list(a[1]);let u=e.match(ooe.SET);if(u?.[1]!=null)return i.set(u[1]);let l=e.match(ooe.OPTIONAL);if(l?.[1]!=null)return i.optional(l[1]);let d=e.match(ooe.NULLABLE);if(d?.[1]!=null)return i.nullable(d[1]);let s=e.match(ooe.LITERAL);if(s?.[1]!=null)return i.literal(SL.string(s[1]));if(s?.[2]!=null){let o=s[2];switch(o){case"false":return i.literal(SL.boolean(!1));case"true":return i.literal(SL.boolean(!0));default:throw new Error(`Unsupported literal value: ${o}`)}}return i.named(e)}var BAp="bytes";function Krr(e){if(e===BAp)return{isOptional:!1};if(e.match(ooe.OPTIONAL)?.[1]===BAp)return{isOptional:!0}}function zNa(e){let t=typeof e=="string"?e:typeof e.body=="string"?e.body:void 0;if(t!=null)return Krr(t)}function _rc({input:e,typeName:t}){for(let r of e.arguments)if(typeof r=="string"){if(r===t)return!0}else if(_rc({input:r,typeName:t}))return!0;return!1}function IAp(e){return _rc({input:e,typeName:"file"})}function zAp(e){let t=0,r=0;function i(){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t>=e.length)return;let a="";for(;t<e.length&&e[t]!=="<"&&e[t]!==","&&e[t]!==">";)a+=e[t++];if(a.trim()){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t<e.length&&e[t]==="<"){if(t++,r++,r>128)throw new Error("Internal error; Exceeded maximum recursion depth while parsing generics.");let u={name:a.trim(),arguments:[]};for(;t<e.length&&e[t]!==">";){for(;t<e.length&&/[\s,]/.test(e[t]);)t++;if(t<e.length&&e[t]!==">"){let l=i();l&&u.arguments.push(l)}}if(t<e.length&&e[t]===">")t++,r--;else throw new Error("Malformed input: missing closing '>' for generic arguments.");return u}else return a.trim()}}let n=i();if(typeof n=="object")return n}var hrc="file";function RAp(e){return e.match(ooe.LIST)?.[1]===hrc}function tFe(e){if(e===hrc)return{isOptional:!1,isArray:!1};let t=e.match(ooe.OPTIONAL);if(t?.[1]!==void 0){if(t[1]===hrc)return{isOptional:!0,isArray:!1};if(RAp(t[1]))return{isOptional:!0,isArray:!0}}if(RAp(e))return{isOptional:!1,isArray:!0}}function muD(e){return typeof e=="string"?!1:hq.parse(e["content-type"])?.isMultiPartFormData()??!1?!0:e.body==null?!1:!!(RB(e.body)&&Object.values(e.body.properties??[]).some(juD))}function Hen(e){if(!(!muD(e)||e.body==null)&&e.name!=null&&e.body!=null&&RB(e.body))return PuD(e.name,e.body)}function PuD(e,t){let r=Object.entries(t.properties??[]).reduce((i,[n,a])=>{let u=typeof a!="string"?a.docs:void 0,l=typeof a!="string"?a["content-type"]:void 0,d=typeof a!="string"?a.style:void 0,s=tFe(typeof a=="string"?a:a.type);return s!=null?i.push({isFile:!0,key:n,docs:u,isOptional:s.isOptional,isArray:s.isArray,contentType:l,style:d}):i.push({isFile:!1,key:n,propertyType:a,docs:u,contentType:l,style:d}),i},[]);return t["extra-properties"],{name:e,extends:t.extends,properties:r}}function juD(e){let t=typeof e=="string"?e:e.type;if(t==="file")return!0;if(!t.includes("file"))return!1;let r=zAp(t);return r==null?!1:IAp(r)}var xAp="text";function RNa(e){if(e===xAp)return{isOptional:!1};if(e.match(ooe.OPTIONAL)?.[1]===xAp)return{isOptional:!0}}function Z3({type:e,_default:t,validation:r,visitor:i}){return Wen({type:e,_default:t,validation:r,visitor:{primitive:i.primitive,map:({keyType:n,valueType:a})=>i.map({keyType:Z3({type:n,_default:void 0,validation:void 0,visitor:i}),valueType:Z3({type:a,_default:void 0,validation:void 0,visitor:i})}),list:n=>i.list(Z3({type:n,_default:void 0,validation:void 0,visitor:i})),set:n=>i.set(Z3({type:n,_default:void 0,validation:void 0,visitor:i})),optional:n=>i.optional(Z3({type:n,_default:t,validation:r,visitor:i})),nullable:n=>i.nullable(Z3({type:n,_default:t,validation:r,visitor:i})),literal:i.literal,named:i.named,unknown:i.unknown}})}function yrc(e,t){if(wuD(e))return t.sdk(e);if(SuD(e))return t.language(e);So(e)}function wuD(e){return e.sdk!=null}function SuD(e){return e.language!=null}function NAp(e){return e["response-stream"]!=null&&(typeof e["response-stream"]=="string"||e["response-stream"].format==null||e["response-stream"].format==="json")}function FAp(e){return e["response-stream"]!=null&&typeof e["response-stream"]!="string"&&e["response-stream"].format==="sse"}function $en(e,t,r){return DuD(e,t)?r.stream(t):EuD(e,t)?r.events(t):r.body(t)}function DuD(e,t){return t.stream!==void 0&&NAp(e)}function EuD(e,t){return t.stream!==void 0&&FAp(e)}function Gen(e,t){if(LAp(e))return t.single(e);if(UAp(e))return t.any(e);So(e)}function LAp(e){return typeof e=="string"||e.scheme!=null}function UAp(e){let[t,...r]=Object.keys(e);return t==="any"&&r.length===0}function xNa(e,t){if(VAp(e))return t.header(e);switch(e.scheme){case"basic":return t.basic(e);case"bearer":return"get-token"in e?t.inferredBearer(e):t.tokenBearer(e);case"oauth":return t.oauth(e);default:So(e)}}function VAp(e){return e.header!=null}function Yrr(e,t){if(WAp(e))return t.singleBaseUrl(e);if(EUn(e))return t.multipleBaseUrls(e);So(e)}function WAp(e){return typeof e=="string"||"url"in e}function EUn(e){return typeof e!="string"&&"urls"in e}function MUn(e){return typeof e=="string"?e.startsWith("$"):"variable"in e}function k3(e,t){if(vzi(e))return t.alias(e);if(bzi(e))return t.discriminatedUnion(e);if(cD(e))return t.object(e);if(AUn(e))return t.undiscriminatedUnion(e);if(tGt(e))return t.enum(e);So(e)}function vzi(e){return typeof e=="string"||e.type!=null}function cD(e){return e.extends!=null||e.properties!=null}function bzi(e){return e.union!=null&&e.discriminated==null}function AUn(e){let t=e;return t.union!=null&&t.discriminated!=null}function tGt(e){return e.enum!=null}var Qen=class{REFERENCE_REGEX=/^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/;validate(t){return this.REFERENCE_REGEX.test(t)?{type:"valid"}:{type:"invalid"}}tryParse(t){if(this.validate(t).type==="invalid")return;let i=t.match(this.REFERENCE_REGEX);if(!(i==null||i[1]==null||i[2]==null))return{method:i[1],path:i[2]}}};var $E=ui(Fzi(),1),bnc=ui(RO(),1),Lzi={shouldUseTitleAsName:void 0,shouldUseUndiscriminatedUnionsWithLiterals:void 0,shouldUseIdiomaticRequestNames:void 0,asyncApiMessageNaming:void 0,onlyIncludeReferencedSchemas:void 0,shouldUseOptionalAdditionalProperties:void 0,coerceEnumsToLiterals:void 0,objectQueryParameters:void 0,respectReadonlySchemas:void 0,respectNullableSchemas:void 0,inlinePathParameters:void 0,useBytesForBinaryResponse:void 0,respectForwardCompatibleEnums:void 0,filter:void 0,exampleGeneration:void 0,defaultFormParameterEncoding:void 0,additionalPropertiesDefaultsTo:void 0,typeDatesAsStrings:void 0,preserveSingleSchemaOneOf:void 0};async function Yxp({absolutePathToGeneratorsConfiguration:e,rawGeneratorsConfiguration:t,context:r}){let i=tNp(t.metadata),n=t.readme;qbD(r,t);let a=await gbD(t);return{absolutePathToConfiguration:e,api:a,rawConfiguration:t,defaultGroup:t["default-group"],reviewers:t.reviewers,groups:t.groups!=null?await Promise.all(Object.entries(t.groups).map(([u,l])=>ObD({absolutePathToGeneratorsConfiguration:e,groupName:u,group:l,maybeTopLevelMetadata:i,maybeTopLevelReviewers:t.reviewers,readme:n}))):[],whitelabel:t.whitelabel!=null&&t.whitelabel.github!=null?{github:t.whitelabel.github}:void 0}}function bLo(e){return{...Lzi,shouldUseTitleAsName:e?.["use-title"],shouldUseUndiscriminatedUnionsWithLiterals:e?.unions==="v1",asyncApiMessageNaming:e?.["message-naming"],respectNullableSchemas:e?.["respect-nullable-schemas"],onlyIncludeReferencedSchemas:e?.["only-include-referenced-schemas"],inlinePathParameters:e?.["inline-path-parameters"],shouldUseIdiomaticRequestNames:e?.["idiomatic-request-names"]}}function Xxp(e){return{...Zxp(e),shouldUseUndiscriminatedUnionsWithLiterals:e?.["prefer-undiscriminated-unions-with-literals"],onlyIncludeReferencedSchemas:e?.["only-include-referenced-schemas"],objectQueryParameters:e?.["object-query-parameters"],respectReadonlySchemas:e?.["respect-readonly-schemas"],inlinePathParameters:e?.["inline-path-parameters"],filter:e?.filter,exampleGeneration:e?.["example-generation"],defaultFormParameterEncoding:e?.["default-form-parameter-encoding"],useBytesForBinaryResponse:e?.["use-bytes-for-binary-response"],respectForwardCompatibleEnums:e?.["respect-forward-compatible-enums"],additionalPropertiesDefaultsTo:e?.["additional-properties-defaults-to"],typeDatesAsStrings:e?.["type-dates-as-strings"],preserveSingleSchemaOneOf:e?.["preserve-single-schema-oneof"]}}function vbD(e){return{...Zxp(e),asyncApiMessageNaming:e?.["message-naming"]}}function Zxp(e){return{...Lzi,shouldUseTitleAsName:e?.["title-as-schema-name"],shouldUseIdiomaticRequestNames:e?.["idiomatic-request-names"],shouldUseOptionalAdditionalProperties:e?.["optional-additional-properties"]??!0,coerceEnumsToLiterals:e?.["coerce-enums-to-literals"],respectNullableSchemas:e?.["respect-nullable-schemas"]}}async function Qxp(e,t){let r=[];if(e!=null)if(typeof e=="string")r.push({schema:{type:"oss",path:e},origin:void 0,overrides:void 0,audiences:[],settings:{...Lzi}});else if(ry.isRawProtobufAPIDefinitionSchema(e))r.push({schema:{type:"protobuf",root:e.proto.root,target:e.proto.target??"",localGeneration:e.proto["local-generation"]??!1,fromOpenAPI:e.proto["from-openapi"]??!1,dependencies:e.proto.dependencies??[]},origin:void 0,overrides:e.proto.overrides,audiences:[],settings:{...Lzi}});else if(Array.isArray(e))for(let i of e)typeof i=="string"?r.push({schema:{type:"oss",path:i},origin:void 0,overrides:void 0,audiences:[],settings:{...Lzi}}):ry.isRawProtobufAPIDefinitionSchema(i)?r.push({schema:{type:"protobuf",root:i.proto.root,target:i.proto.target??"",localGeneration:i.proto["local-generation"]??!1,fromOpenAPI:i.proto["from-openapi"]??!1,dependencies:i.proto.dependencies??[]},origin:void 0,overrides:i.proto.overrides,audiences:[],settings:{...Lzi}}):r.push({schema:{type:"oss",path:i.path},origin:i.origin,overrides:i.overrides,audiences:i.audiences,settings:bLo(i.settings)});else r.push({schema:{type:"oss",path:e.path},origin:e.origin,overrides:e.overrides,audiences:e.audiences,settings:bLo(e.settings)});else{let i=t[ry.API_SETTINGS_KEY],n=t[ry.OPENAPI_LOCATION_KEY],a=t[ry.API_ORIGIN_LOCATION_KEY],u=t[ry.OPENAPI_OVERRIDES_LOCATION_KEY],l=t[ry.ASYNC_API_LOCATION_KEY];n!=null&&(typeof n=="string"?r.push({schema:{type:"oss",path:n},origin:a,overrides:u,audiences:[],settings:bLo(i)}):typeof n=="object"&&r.push({schema:{type:"oss",path:n.path},origin:n.origin,overrides:n.overrides,audiences:[],settings:Xxp(n.settings)})),l!=null&&r.push({schema:{type:"oss",path:l},origin:a,overrides:void 0,audiences:[],settings:bLo(i)})}return r}async function bbD({apiConfiguration:e,rawConfiguration:t}){let r={"auth-schemes":e.auth!=null?Object.fromEntries(Object.entries(t["auth-schemes"]??{}).filter(([a,u])=>e.auth==null?!1:Gen(e.auth,{any:l=>l.any.includes(a),single:l=>l===a}))):void 0,...e};if(ry.isConjureSchema(e.specs))return{type:"conjure",pathToConjureDefinition:e.specs.conjure,...r};let i=[],n={};for(let a of e.specs??[]){let u;if(ry.isOpenApiSpecSchema(a))u={schema:{type:"oss",path:a.openapi},origin:a.origin,overrides:a.overrides,audiences:[],settings:Xxp(a.settings)};else if(ry.isAsyncApiSpecSchema(a))u={schema:{type:"oss",path:a.asyncapi},origin:a.origin,overrides:a.overrides,audiences:[],settings:vbD(a.settings)};else if(ry.isProtoSpecSchema(a))u={schema:{type:"protobuf",root:a.proto.root,target:a.proto.target??"",localGeneration:a.proto["local-generation"]??!1,fromOpenAPI:a.proto["from-openapi"]??!1,dependencies:a.proto.dependencies??[]},origin:void 0,overrides:a.proto.overrides,audiences:[],settings:{...Lzi}};else if(ry.isOpenRpcSpecSchema(a))u={schema:{type:"openrpc",path:a.openrpc},origin:void 0,overrides:a.overrides,audiences:[],settings:{...Lzi}};else continue;"namespace"in a&&a.namespace!=null?(n[a.namespace]??=[],n[a.namespace].push(u)):i.push(u)}return Object.keys(n).length===0?{type:"singleNamespace",definitions:i,...r}:{type:"multiNamespace",rootDefinitions:i,definitions:n,...r}}async function gbD(e){let t=e.api;if(t!=null){if(ry.isApiConfigurationV2Schema(t))return bbD({apiConfiguration:t,rawConfiguration:e});if(ry.isNamespacedApiConfiguration(t)){let r={};for(let[i,n]of Object.entries(t.namespaces))r[i]=await Qxp(n,e);return{type:"multiNamespace",rootDefinitions:void 0,definitions:r}}}return{type:"singleNamespace",definitions:await Qxp(t,e)}}async function ObD({absolutePathToGeneratorsConfiguration:e,groupName:t,group:r,maybeTopLevelMetadata:i,maybeTopLevelReviewers:n,readme:a}){let u=tNp(r.metadata);return{groupName:t,reviewers:r.reviewers,audiences:r.audiences==null?{type:"all"}:{type:"select",audiences:r.audiences},generators:await Promise.all(r.generators.map(l=>mbD({absolutePathToGeneratorsConfiguration:e,generator:l,maybeTopLevelMetadata:i,maybeGroupLevelMetadata:u,maybeTopLevelReviewers:n,maybeGroupLevelReviewers:r.reviewers,readme:a})))}}async function mbD({absolutePathToGeneratorsConfiguration:e,generator:t,maybeGroupLevelMetadata:r,maybeTopLevelMetadata:i,maybeGroupLevelReviewers:n,maybeTopLevelReviewers:a,readme:u}){return{raw:t,name:t.name,version:t.version,config:t.config,outputMode:await wbD({absolutePathToGeneratorsConfiguration:e,generator:t,maybeGroupLevelMetadata:r,maybeTopLevelMetadata:i,maybeGroupLevelReviewers:n,maybeTopLevelReviewers:a}),keywords:t.keywords,smartCasing:t["smart-casing"]??!1,disableExamples:t["disable-examples"]??!1,absolutePathToLocalOutput:t.output?.location==="local-file-system"?Cv(Rd(e),t.output.path):void 0,absolutePathToLocalSnippets:t.snippets?.path!=null?Cv(Rd(e),t.snippets.path):void 0,language:EbD(t.name),irVersionOverride:t["ir-version"]??void 0,publishMetadata:PbD({generatorInvocation:t}),readme:u,settings:t.api?.settings??void 0}}function PbD({generatorInvocation:e}){let t=e["publish-metadata"];if(t!=null)return{packageDescription:t["package-description"],publisherEmail:t.email,publisherName:t.author,referenceUrl:t["reference-url"]};if(e.metadata!=null)return{packageDescription:e.metadata["package-description"],publisherEmail:e.metadata.email,publisherName:e.metadata.author,referenceUrl:e.metadata["reference-url"]}}function kxp({pypiOutputMetadata:e,maybeGroupLevelMetadata:t,maybeTopLevelMetadata:r}){let i;return e!=null&&(i=AbD(e),i={...r,...t,...i}),i}function jbD({topLevelReviewers:e,groupLevelReviewers:t,outputModeReviewers:r}){let i=new Set,n=new Set,a=[],u=[...e?.teams??[],...t?.teams??[],...r?.teams??[]],l=[...e?.users??[],...t?.users??[],...r?.users??[]];for(let d of u)i.has(d.name)||(a.push(bnc.GithubPullRequestReviewer.team({name:d.name})),i.add(d.name));for(let d of l)n.has(d.name)||(a.push(bnc.GithubPullRequestReviewer.user({name:d.name})),n.add(d.name));return a}async function wbD({absolutePathToGeneratorsConfiguration:e,generator:t,maybeGroupLevelMetadata:r={},maybeTopLevelMetadata:i={},maybeGroupLevelReviewers:n,maybeTopLevelReviewers:a}){let u=t.snippets!=null&&t.snippets.path!=="";if(t.github!=null&&!uFa(t.github)){let l=t.github.repository.indexOf("/"),d=t.github.repository.slice(0,l),s=t.github.repository.slice(l+1),o=t.output!=null?DbD(t.output,r,i):void 0,c=MbD(t),b=c!=null?await SbD({absolutePathToGeneratorsConfiguration:e,githubLicense:c}):void 0,g=t.github.mode??"release";switch(g){case"commit":case"release":return $E.FernFiddle.OutputMode.githubV2($E.FernFiddle.GithubOutputModeV2.commitAndRelease({owner:d,repo:s,license:b,publishInfo:o,downloadSnippets:u}));case"pull-request":{let O=jbD({topLevelReviewers:a,groupLevelReviewers:n,outputModeReviewers:t.github.reviewers});return $E.FernFiddle.OutputMode.githubV2($E.FernFiddle.GithubOutputModeV2.pullRequest({owner:d,repo:s,license:b,publishInfo:o,downloadSnippets:u,reviewers:O}))}case"push":return $E.FernFiddle.OutputMode.githubV2($E.FernFiddle.GithubOutputModeV2.push({owner:d,repo:s,branch:t.github.mode==="push"?t.github.branch:void 0,license:b,publishInfo:o,downloadSnippets:u}));default:So(g)}}if(t.output==null)return $E.FernFiddle.remoteGen.OutputMode.publish({registryOverrides:{}});switch(t.output.location){case"local-file-system":return $E.FernFiddle.OutputMode.downloadFiles({downloadSnippets:u});case"npm":return $E.FernFiddle.OutputMode.publishV2($E.FernFiddle.remoteGen.PublishOutputModeV2.npmOverride({registryUrl:t.output.url??"https://registry.npmjs.org",packageName:t.output["package-name"],token:t.output.token??"",downloadSnippets:u}));case"maven":return $E.FernFiddle.OutputMode.publishV2($E.FernFiddle.remoteGen.PublishOutputModeV2.mavenOverride({registryUrl:eNp(t.output),username:t.output.username??"",password:t.output.password??"",coordinate:t.output.coordinate,signature:t.output.signature!=null?{keyId:t.output.signature.keyId,secretKey:t.output.signature.secretKey,password:t.output.signature.password}:void 0,downloadSnippets:u}));case"postman":return $E.FernFiddle.OutputMode.publishV2($E.FernFiddle.remoteGen.PublishOutputModeV2.postman({apiKey:t.output["api-key"],workspaceId:t.output["workspace-id"]}));case"pypi":return $E.FernFiddle.OutputMode.publishV2($E.FernFiddle.remoteGen.PublishOutputModeV2.pypiOverride({registryUrl:t.output.url??"https://upload.pypi.org/legacy/",username:t.output.token!=null?"__token__":t.output.password??"",password:t.output.token??t.output.password??"",coordinate:t.output["package-name"],downloadSnippets:u,pypiMetadata:kxp({pypiOutputMetadata:t.output.metadata,maybeGroupLevelMetadata:r,maybeTopLevelMetadata:i})}));case"nuget":return $E.FernFiddle.OutputMode.publishV2($E.FernFiddle.remoteGen.PublishOutputModeV2.nugetOverride({registryUrl:t.output.url??"https://nuget.org/",packageName:t.output["package-name"],apiKey:t.output["api-key"]??"",downloadSnippets:u}));case"rubygems":return $E.FernFiddle.OutputMode.publishV2($E.FernFiddle.remoteGen.PublishOutputModeV2.rubyGemsOverride({registryUrl:t.output.url??"https://rubygems.org/",packageName:t.output["package-name"],apiKey:t.output["api-key"]??"",downloadSnippets:u}));case"crates":return $E.FernFiddle.OutputMode.publishV2($E.FernFiddle.remoteGen.PublishOutputModeV2.npmOverride({registryUrl:t.output.url??"https://crates.io/api/v1/crates",packageName:t.output["package-name"],token:t.output.token??"",downloadSnippets:u}));default:So(t.output)}}async function SbD({absolutePathToGeneratorsConfiguration:e,githubLicense:t}){if(typeof t=="string")switch(t){case"MIT":return $E.FernFiddle.GithubLicense.basic({id:$E.FernFiddle.GithubLicenseId.Mit});case"Apache-2.0":return $E.FernFiddle.GithubLicense.basic({id:$E.FernFiddle.GithubLicenseId.Apache});default:So(t)}let r=Eu(Fc.of(Kxp.default.dirname(e)),Ia.of(t.custom)),i=await(0,Jxp.readFile)(r);return $E.FernFiddle.GithubLicense.custom({contents:i.toString()})}function DbD(e,t,r){switch(e.location){case"local-file-system":throw new Error("Cannot use local-file-system with github publishing");case"npm":return $E.FernFiddle.GithubPublishInfo.npm({registryUrl:e.url??"https://registry.npmjs.org",packageName:e["package-name"],token:e.token});case"maven":return $E.FernFiddle.GithubPublishInfo.maven({registryUrl:eNp(e),coordinate:e.coordinate,credentials:e.username!=null&&e.password!=null?{username:e.username,password:e.password}:void 0,signature:e.signature!=null?{keyId:e.signature.keyId,password:e.signature.password,secretKey:e.signature.secretKey}:void 0});case"postman":return $E.FernFiddle.GithubPublishInfo.postman({apiKey:e["api-key"],workspaceId:e["workspace-id"]});case"pypi":return $E.FernFiddle.GithubPublishInfo.pypi({registryUrl:e.url??"https://upload.pypi.org/legacy/",packageName:e["package-name"],credentials:e.token!=null?{username:"__token__",password:e.token}:{username:e.username??"",password:e.password??""},pypiMetadata:kxp({pypiOutputMetadata:e.metadata,maybeGroupLevelMetadata:t,maybeTopLevelMetadata:r})});case"nuget":return $E.FernFiddle.GithubPublishInfo.nuget({registryUrl:e.url??"https://nuget.org/",packageName:e["package-name"],apiKey:e["api-key"]});case"rubygems":return $E.FernFiddle.GithubPublishInfo.rubygems({registryUrl:e.url??"https://rubygems.org/",packageName:e["package-name"],apiKey:e["api-key"]});case"crates":return $E.FernFiddle.GithubPublishInfo.npm({registryUrl:e.url??"https://crates.io",packageName:e["package-name"],token:e.token});default:So(e)}}function EbD(e){if(e.includes("csharp"))return ry.GenerationLanguage.CSHARP;if(e.includes("go"))return ry.GenerationLanguage.GO;if(e.includes("java")||e.includes("spring"))return ry.GenerationLanguage.JAVA;if(e.includes("php"))return ry.GenerationLanguage.PHP;if(e.includes("python")||e.includes("fastapi")||e.includes("pydantic"))return ry.GenerationLanguage.PYTHON;if(e.includes("ruby"))return ry.GenerationLanguage.RUBY;if(e.includes("swift"))return ry.GenerationLanguage.SWIFT;if(e.includes("typescript"))return ry.GenerationLanguage.TYPESCRIPT}function eNp(e){return e.url!=null?e.url:e.signature!=null?"https://oss.sonatype.org/service/local/staging/deploy/maven2/":"https://s01.oss.sonatype.org/content/repositories/releases/"}function MbD(e){return e["publish-metadata"]?.license!=null?e["publish-metadata"].license:e.metadata?.license!=null?e.metadata.license:uFa(e.github)?void 0:e.github?.license}function tNp(e){return e!=null?{description:e.description,authors:e.authors?.map(t=>({name:t.name,email:t.email}))}:void 0}function AbD(e){return e!=null?{description:e.description,authors:e.authors?.map(t=>({name:t.name,email:t.email})),keywords:e.keywords,documentationLink:e["documentation-link"],homepageLink:e["homepage-link"]}:void 0}function qbD(e,t){let r=[];t["api-settings"]!=null&&r.push('"api-settings" is deprecated. Please use "api.specs[].settings" instead.'),t["async-api"]!=null&&r.push('"async-api" is deprecated. Please use "api.specs[].asyncapi" instead.'),t.openapi!=null&&r.push('"openapi" is deprecated. Please use "api.specs[].openapi" instead.'),t["openapi-overrides"]!=null&&r.push('"openapi-overrides" is deprecated. Please use "api.specs[].overrides" instead.'),t["spec-origin"]&&r.push('"spec-origin" is deprecated. Please use "api.specs[].origin" instead.'),t.api!=null&&(typeof t.api=="string"&&r.push('Using an OpenAPI or AsyncAPI path string for "api" is deprecated. Please use "api.specs[].openapi" or "api.specs[].asyncapi" instead.'),Array.isArray(t.api)?r.push('Using an array for "api" is deprecated. Please use "api.specs[].openapi", "api.specs[].asyncapi", or "api.specs[].proto" instead.'):typeof t.api=="object"&&("path"in t.api&&r.push('Using "api.path" is deprecated. Please use "api.specs[].openapi" or "api.specs[].asyncapi" instead.'),"proto"in t.api&&r.push('Using "api.proto" is deprecated. Please use "api.specs[].proto" instead.'),"namespaces"in t.api&&r.push('Using "api.namespaces" is deprecated. Please use "api.specs[].openapi", "api.specs[].asyncapi", or "api.specs[].proto" with the "namespace" property instead.'))),r.length>0&&(e.logger.warn("Warnings for generators.yml:"),e.logger.warn(" "+r.join(`
|
|
@@ -1714,7 +1714,7 @@ ${GJp.default.cursorShow}`)}releaseCursor(){this.extraLinesUnderPrompt>0&&bdc(th
|
|
|
1714
1714
|
`+urn.default.red(">> ")+t),this.screen.render(r,i)}getMaskedValue(t){return this.status==="answered"?this.opt.mask?urn.default.cyan(tKp(t,this.opt.mask)):urn.default.italic(urn.default.dim("[hidden]")):this.opt.mask?tKp(t,this.opt.mask):urn.default.italic(urn.default.dim("[input is hidden] "))}getSpinningValue(t){return this.getMaskedValue(t)}filterInput(t){return t||(this.opt.default==null?"":this.opt.default)}onEnd(t){this.status="answered",this.answer=t.value,this.render(),this.screen.done(),this.done(t.value)}onError(t){this.render(t.isValid)}onKeypress(){this.opt.default&&=void 0,this.render()}};var PQo=ui(z8(),1),DYp=ui(lpc(),1),EYp=ui(MAe(),1);var s7a=class extends R8{_run(t){this.done=t,this.editorResult=new EYp.Subject;let r=AH(this.rl);this.lineSubscription=r.line.subscribe(this.startExternalEditor.bind(this));let i=this.opt.waitUserInput===void 0?!0:this.opt.waitUserInput,n=this.handleSubmitEvents(this.editorResult);return n.success.forEach(this.onEnd.bind(this)),n.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,i?this.render():this.startExternalEditor(),this}render(t){let r="",i=this.getQuestion();i+=this.status==="answered"?PQo.default.dim("Received"):PQo.default.dim("Press <enter> to launch your preferred editor."),t&&(r=PQo.default.red(">> ")+t),this.screen.render(i,r)}startExternalEditor(){this.rl.pause(),(0,DYp.editAsync)(this.currentText,this.endExternalEditor.bind(this),{postfix:this.opt.postfix??".txt"})}endExternalEditor(t,r){this.rl.resume(),t?this.editorResult.error(t):this.editorResult.next(r)}onEnd(t){this.editorResult.unsubscribe(),this.lineSubscription.unsubscribe(),this.answer=t.value,this.status="answered",this.render(),this.screen.done(),this.done(this.answer)}onError(t){this.render(t.isValid)}};var CYp=require("stream");var qYp=ui(require("readline"),1),TYp=ui(AYp(),1),hrn=class{constructor(t){this.rl||=qYp.default.createInterface(kZD(t)),this.rl.resume(),this.onForceClose=this.onForceClose.bind(this),process.on("exit",this.onForceClose),this.rl.on("SIGINT",this.onForceClose)}onForceClose(){this.close(),process.kill(process.pid,"SIGINT"),console.log("")}close(){this.rl.removeListener("SIGINT",this.onForceClose),process.removeListener("exit",this.onForceClose),this.rl.output.unmute(),this.activePrompt&&typeof this.activePrompt.close=="function"&&this.activePrompt.close(),this.rl.output.end(),this.rl.pause(),this.rl.close()}};function kZD(e={}){e.skipTTYChecks=e.skipTTYChecks===void 0?!0:e.skipTTYChecks;let t=e.input||process.stdin;if(!e.skipTTYChecks&&!t.isTTY){let n=new Error("Prompts can not be meaningfully rendered in non-TTY environments");throw n.isTtyError=!0,n}let r=new TYp.default;return r.pipe(e.output||process.stdout),{terminal:!0,...e,input:t,output:r}}var c7a=class extends hrn{constructor(t={}){super(t),this.log=new CYp.Writable({write:(r,i,n)=>{this.writeLog(r),n()}}),this.bottomBar=t.bottomBar||"",this.render()}render(){return this.write(this.bottomBar),this}clean(){return H3a(this.rl,this.bottomBar.split(`
|
|
1715
1715
|
`).length),this}updateBottomBar(t){return H3a(this.rl,1),this.rl.output.unmute(),this.clean(),this.bottomBar=t,this.render(),this.rl.output.mute(),this}writeLog(t){return this.rl.output.unmute(),this.clean(),this.rl.output.write(this.enforceLF(t.toString())),this.render(),this.rl.output.mute(),this}enforceLF(t){return/[\n\r]$/.test(t)?t:t+`
|
|
1716
1716
|
`}write(t){let r=t.split(/\n/);this.height=r.length,this.rl.setPrompt(r.at(-1)),this.rl.output.rows===0&&this.rl.output.columns===0&&YGo(this.rl,t.length+this.rl.line.length),this.rl.output.write(t)}};var yM=ui(MAe(),1),zYp=ui(d3a(),1);var jQo=ui(MAe(),1),BYp=ui(d3a(),1),wQo=function(e,t,r){return typeof e[t]!="function"?(0,jQo.of)(e):(0,jQo.from)((0,BYp.default)(e[t])(r).then(i=>(e[t]=i,e)))};var IYp={set:(e,t="",r)=>{let i=e;t.split(".").forEach((n,a,u)=>{n==="__proto__"||n==="constructor"||(a===u.length-1?i[n]=r:(!(n in i)||typeof i[n]!="object")&&(i[n]={}),i=i[n])})},get:(e,t="",r)=>{let i=a=>String.prototype.split.call(t,a).filter(Boolean).reduce((u,l)=>u!=null?u[l]:u,e),n=i(/[,[\]]+?/)||i(/[,.[\]]+?/);return n===void 0||n===e?r:n}},yHn=class extends hrn{constructor(t,r){super(r),this.prompts=t}run(t,r){this.answers=typeof r=="object"?{...r}:{};let i;return Array.isArray(t)?i=(0,yM.from)(t):(0,yM.isObservable)(t)?i=t:Object.values(t).every(n=>typeof n=="object"&&!Array.isArray(n)&&n!=null)?i=(0,yM.from)(Object.entries(t).map(([n,a])=>({name:n,...a}))):i=(0,yM.from)([t]),this.process=i.pipe((0,yM.concatMap)(this.processQuestion.bind(this)),(0,yM.publish)()),this.process.connect(),this.process.pipe((0,yM.reduce)((n,a)=>(IYp.set(n,a.name,a.answer),n),this.answers)).toPromise(Promise).then(this.onCompletion.bind(this),this.onError.bind(this))}onCompletion(){return this.close(),this.answers}onError(t){return this.close(),Promise.reject(t)}processQuestion(t){return t={...t},(0,yM.defer)(()=>(0,yM.of)(t).pipe((0,yM.concatMap)(this.setDefaultType.bind(this)),(0,yM.concatMap)(this.filterIfRunnable.bind(this)),(0,yM.concatMap)(()=>wQo(t,"message",this.answers)),(0,yM.concatMap)(()=>wQo(t,"default",this.answers)),(0,yM.concatMap)(()=>wQo(t,"choices",this.answers)),(0,yM.concatMap)(this.fetchAnswer.bind(this))))}fetchAnswer(t){let r=this.prompts[t.type];return this.activePrompt=new r(t,this.rl,this.answers),(0,yM.defer)(()=>(0,yM.from)(this.activePrompt.run().then(i=>({name:t.name,answer:i}))))}setDefaultType(t){return this.prompts[t.type]||(t.type="input"),(0,yM.defer)(()=>(0,yM.of)(t))}filterIfRunnable(t){if(t.askAnswered!==!0&&IYp.get(this.answers,t.name)!==void 0)return yM.EMPTY;if(t.when===!1)return yM.EMPTY;if(typeof t.when!="function")return(0,yM.of)(t);let{answers:r}=this;return(0,yM.defer)(()=>(0,yM.from)((0,zYp.default)(t.when)(r).then(i=>{if(i)return t})).pipe((0,yM.filter)(i=>i!=null)))}};function RYp(e){let t=function(r,i){let n;try{n=new yHn(t.prompts,e)}catch(u){return Promise.reject(u)}let a=n.run(r,i);return a.ui=n,a};return t.prompts={},t.registerPrompt=function(r,i){return t.prompts[r]=i,this},t.restoreDefaultPrompts=function(){this.registerPrompt("list",G3a),this.registerPrompt("input",orn),this.registerPrompt("number",Q3a),this.registerPrompt("confirm",J3a),this.registerPrompt("rawlist",K3a),this.registerPrompt("expand",Y3a),this.registerPrompt("checkbox",X3a),this.registerPrompt("password",Z3a),this.registerPrompt("editor",s7a)},t.restoreDefaultPrompts(),t}var dpc=RYp();function tkD(e,t){dpc.registerPrompt(e,t)}function rkD(){dpc.restoreDefaultPrompts()}var ikD={prompt:dpc,ui:{BottomBar:c7a,Prompt:yHn},createPromptModule:RYp,registerPrompt:tkD,restoreDefaultPrompts:rkD,Separator:Foe},SQo=ikD;var MHn=require("path"),yZp=require("fs"),vZp=require("readline"),UXp="posthog-node";function NtE(e,{organization:t,projectId:r,prefix:i,severityAllowList:n=["error"]}={}){return a=>{if(!(n==="*"||n.includes(a.level)))return a;a.tags||(a.tags={});let l=a.tags[QQo.POSTHOG_ID_TAG];if(l===void 0)return a;let d=e.options.host??"https://us.i.posthog.com",s=new URL(`/project/${e.apiKey}/person/${l}`,d).toString();a.tags["PostHog Person URL"]=s;let o=a.exception?.values||[],c=o.map(g=>({...g,stacktrace:g.stacktrace?{...g.stacktrace,type:"raw",frames:(g.stacktrace.frames||[]).map(O=>({...O,platform:"node:javascript"}))}:void 0})),b={$exception_message:o[0]?.value||a.message,$exception_type:o[0]?.type,$exception_personURL:s,$exception_level:a.level,$exception_list:c,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:o[0]?.value||a.message,$sentry_exception_type:o[0]?.type,$sentry_tags:a.tags};return t&&r&&(b.$sentry_url=(i||"https://sentry.io/organizations/")+t+"/issues/?project="+r+"&query="+a.event_id),e.capture({event:"$exception",distinctId:l,properties:b}),a}}var QQo=class{constructor(t,r,i,n){this.name=UXp,this.name=UXp,this.setupOnce=function(a,u){let l=u()?.getClient()?.getDsn()?.projectId;a(NtE(t,{organization:r,projectId:l,prefix:i,severityAllowList:n}))}}};QQo.POSTHOG_ID_TAG="posthog_distinct_id";var VQo="0123456789abcdef",JQo=class e{constructor(t){this.bytes=t}static ofInner(t){if(t.length!==16)throw new TypeError("not 128-bit length");return new e(t)}static fromFieldsV7(t,r,i,n){if(!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(i)||!Number.isInteger(n)||t<0||r<0||i<0||n<0||t>0xffffffffffff||r>4095||i>1073741823||n>4294967295)throw new RangeError("invalid field value");let a=new Uint8Array(16);return a[0]=t/2**40,a[1]=t/2**32,a[2]=t/2**24,a[3]=t/2**16,a[4]=t/2**8,a[5]=t,a[6]=112|r>>>8,a[7]=r,a[8]=128|i>>>24,a[9]=i>>>16,a[10]=i>>>8,a[11]=i,a[12]=n>>>24,a[13]=n>>>16,a[14]=n>>>8,a[15]=n,new e(a)}static parse(t){let r;switch(t.length){case 32:r=/^[0-9a-f]{32}$/i.exec(t)?.[0];break;case 36:r=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t)?.slice(1,6).join("");break;case 38:r=/^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(t)?.slice(1,6).join("");break;case 45:r=/^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t)?.slice(1,6).join("");break}if(r){let i=new Uint8Array(16);for(let n=0;n<16;n+=4){let a=parseInt(r.substring(2*n,2*n+8),16);i[n+0]=a>>>24,i[n+1]=a>>>16,i[n+2]=a>>>8,i[n+3]=a}return new e(i)}else throw new SyntaxError("could not parse UUID string")}toString(){let t="";for(let r=0;r<this.bytes.length;r++)t+=VQo.charAt(this.bytes[r]>>>4),t+=VQo.charAt(this.bytes[r]&15),(r===3||r===5||r===7||r===9)&&(t+="-");return t}toHex(){let t="";for(let r=0;r<this.bytes.length;r++)t+=VQo.charAt(this.bytes[r]>>>4),t+=VQo.charAt(this.bytes[r]&15);return t}toJSON(){return this.toString()}getVariant(){let t=this.bytes[8]>>>4;if(t<0)throw new Error("unreachable");if(t<=7)return this.bytes.every(r=>r===0)?"NIL":"VAR_0";if(t<=11)return"VAR_10";if(t<=13)return"VAR_110";if(t<=15)return this.bytes.every(r=>r===255)?"MAX":"VAR_RESERVED";throw new Error("unreachable")}getVersion(){return this.getVariant()==="VAR_10"?this.bytes[6]>>>4:void 0}clone(){return new e(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(let r=0;r<16;r++){let i=this.bytes[r]-t.bytes[r];if(i!==0)return Math.sign(i)}return 0}},t_c=class{constructor(t){this.timestamp=0,this.counter=0,this.random=t??FtE()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(t,r){let i=this.generateOrAbortCore(t,r);return i===void 0&&(this.timestamp=0,i=this.generateOrAbortCore(t,r)),i}generateOrAbortCore(t,r){if(!Number.isInteger(t)||t<1||t>0xffffffffffff)throw new RangeError("`unixTsMs` must be a 48-bit positive integer");if(r<0||r>0xffffffffffff)throw new RangeError("`rollbackAllowance` out of reasonable range");if(t>this.timestamp)this.timestamp=t,this.resetCounter();else if(t+r>=this.timestamp)this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter());else return;return JQo.fromFieldsV7(this.timestamp,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=this.random.nextUint32()*1024+(this.random.nextUint32()&1023)}generateV4(){let t=new Uint8Array(Uint32Array.of(this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32()).buffer);return t[6]=64|t[6]>>>4,t[8]=128|t[8]>>>2,JQo.ofInner(t)}},FtE=()=>({nextUint32:()=>Math.trunc(Math.random()*65536)*65536+Math.trunc(Math.random()*65536)}),VXp,r_c=()=>LtE().toString(),LtE=()=>(VXp||(VXp=new t_c)).generate();function UtE(e,t){let r=!1;return Object.assign(i=>{let a=global.process.listeners("uncaughtException").filter(u=>u.name!=="domainUncaughtExceptionClear"&&u._posthogErrorHandler!==!0).length===0;e(i,{mechanism:{type:"onuncaughtexception",handled:!1}}),!r&&a&&(r=!0,t())},{_posthogErrorHandler:!0})}function VtE(e,t){global.process.on("uncaughtException",UtE(e,t))}function WtE(e){global.process.on("unhandledRejection",t=>{e(t,{mechanism:{type:"onunhandledrejection",handled:!1}})})}var WQo,WXp,HQo;function HtE(e){let t=globalThis._posthogChunkIds;if(!t)return console.error("No chunk id map found"),{};let r=Object.keys(t);return HQo&&r.length===WXp||(WXp=r.length,HQo=r.reduce((i,n)=>{WQo||(WQo={});let a=WQo[n];if(a)i[a[0]]=a[1];else{let u=e(n);for(let l=u.length-1;l>=0;l--){let s=u[l]?.filename,o=t[n];if(s&&o){i[s]=o,WQo[n]=[s,o];break}}}return i},{})),HQo}function $tE(e){return typeof Event<"u"&&bZp(e,Event)}function GtE(e){return gZp(e,"Object")}function l_c(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return bZp(e,Error)}}function bZp(e,t){try{return e instanceof t}catch{return!1}}function QtE(e){return gZp(e,"ErrorEvent")}function gZp(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}async function JtE(e,t,r,i){let a=i&&i.mechanism||{handled:!0,type:"generic"},u=OZp(a,r,i);return{$exception_list:await Promise.all(u.map(async s=>{let o=await trE(e,t,s);return o.value=o.value||"",o.type=o.type||"Error",o.mechanism=a,o}))}}function OZp(e,t,r){let i=KtE(e,t,r);return i.cause?[i,...OZp(e,i.cause,r)]:[i]}function KtE(e,t,r){if(l_c(t))return t;if(e.synthetic=!0,GtE(t)){let n=YtE(t);if(n)return n;let a=XtE(t),u=r?.syntheticException||new Error(a);return u.message=a,u}let i=r?.syntheticException||new Error(t);return i.message=`${t}`,i}function YtE(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];if(l_c(r))return r}}function XtE(e){if("name"in e&&typeof e.name=="string"){let i=`'${e.name}' captured as exception`;return"message"in e&&typeof e.message=="string"&&(i+=` with message '${e.message}'`),i}else if("message"in e&&typeof e.message=="string")return e.message;let t=ktE(e);if(QtE(e))return`Event \`ErrorEvent\` captured as exception with message \`${e.message}\``;let r=ZtE(e);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${t}`}function ZtE(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ktE(e,t=40){let r=Object.keys(erE(e));r.sort();let i=r[0];if(!i)return"[object has no keys]";if(i.length>=t)return HXp(i,t);for(let n=r.length;n>0;n--){let a=r.slice(0,n).join(", ");if(!(a.length>t))return n===r.length?a:HXp(a,t)}return""}function HXp(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function erE(e){return l_c(e)?{message:e.message,name:e.name,stack:e.stack,...$Xp(e)}:$tE(e)?{type:e.type,target:GXp(e.target),currentTarget:GXp(e.currentTarget),...$Xp(e)}:e}function $Xp(e){if(typeof e=="object"&&e!==null){let t={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function GXp(e){try{return Object.prototype.toString.call(e)}catch{return"<unknown>"}}async function trE(e,t,r){let i={type:r.name||r.constructor.name,value:r.message},n=rrE(e,r);for(let a of t)n=await a(n);return n.length&&(i.stacktrace={frames:n,type:"raw"}),i}function rrE(e,t){return irE(e(t.stack||"",1),e)}function irE(e,t){let r=HtE(t);return e.forEach(i=>{i.filename&&(i.chunk_id=r[i.filename])}),e}var nrE=2e3,SHn=class e{static async captureException(t,r,i,n,a){let u={...a};n||(u.$process_person_profile=!1);let l=await JtE(this.stackParser,this.frameModifiers,r,i);t.capture({event:"$exception",distinctId:n||r_c(),properties:{...l,...u}})}constructor(t,r){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this.startAutocaptureIfEnabled()}startAutocaptureIfEnabled(){this.isEnabled()&&(VtE(this.onException.bind(this),this.onFatalError.bind(this)),WtE(this.onException.bind(this)))}onException(t,r){e.captureException(this.client,t,r)}async onFatalError(){await this.client.shutdown(nrE)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}};function arE(e=process.argv[1]?(0,MHn.dirname)(process.argv[1]):process.cwd(),t=MHn.sep==="\\"){let r=t?QXp(e):e;return i=>{if(!i)return;let n=t?QXp(i):i,{dir:a,base:u,ext:l}=MHn.posix.parse(n);(l===".js"||l===".mjs"||l===".cjs")&&(u=u.slice(0,l.length*-1));let d=decodeURIComponent(u);a||(a=".");let s=a.lastIndexOf("/node_modules");if(s>-1)return`${a.slice(s+14).replace(/\//g,".")}:${d}`;if(a.startsWith(r)){let o=a.slice(r.length+1).replace(/\//g,".");return o?`${o}:${d}`:d}return d}}function QXp(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}var KQo=class{constructor(t){this._maxSize=t,this._cache=new Map}get(t){let r=this._cache.get(t);if(r!==void 0)return this._cache.delete(t),this._cache.set(t,r),r}set(t,r){this._cache.set(t,r)}reduce(){for(;this._cache.size>=this._maxSize;){let t=this._cache.keys().next().value;t&&this._cache.delete(t)}}},GQo=new KQo(25),mZp=new KQo(20),f_c=7,orE=1e3,urE=1e4;async function srE(e){let t={};for(let n=e.length-1;n>=0;n--){let a=e[n],u=a?.filename;if(!a||typeof u!="string"||typeof a.lineno!="number"||drE(u)||prE(a))continue;t[u]||(t[u]=[]),t[u].push(a.lineno)}let r=Object.keys(t);if(r.length==0)return e;let i=[];for(let n of r){if(mZp.get(n))continue;let a=t[n];if(!a)continue;a.sort((d,s)=>d-s);let u=hrE(a);if(u.every(d=>_rE(n,d)))continue;let l=yrE(GQo,n,{});i.push(crE(n,u,l))}return await Promise.all(i).catch(()=>{}),e&&e.length>0&&lrE(e,GQo),GQo.reduce(),e}function crE(e,t,r){return new Promise(i=>{let n=(0,yZp.createReadStream)(e),a=(0,vZp.createInterface)({input:n});function u(){n.destroy(),i()}let l=0,d=0,s=t[d];if(s===void 0){u();return}let o=s[0],c=s[1];function b(){mZp.set(e,1),a.close(),a.removeAllListeners(),u()}n.on("error",b),a.on("error",b),a.on("close",u),a.on("line",g=>{if(l++,!(l<o)&&(r[l]=vrE(g,0),l>=c)){if(d===t.length-1){a.close(),a.removeAllListeners();return}d++;let O=t[d];if(O===void 0){a.close(),a.removeAllListeners();return}o=O[0],c=O[1]}})})}function lrE(e,t){for(let r of e)if(r.filename&&r.context_line===void 0&&typeof r.lineno=="number"){let i=t.get(r.filename);if(i===void 0)continue;frE(r.lineno,r,i)}}function frE(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let n=PZp(e);n<e;n++){let a=r[n];if(a===void 0){JXp(t);return}t.pre_context.push(a)}if(r[e]===void 0){JXp(t);return}t.context_line=r[e];let i=jZp(e);t.post_context=[];for(let n=e+1;n<=i;n++){let a=r[n];if(a===void 0)break;t.post_context.push(a)}}function JXp(e){delete e.pre_context,delete e.context_line,delete e.post_context}function drE(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function prE(e){return e.lineno!==void 0&&e.lineno>urE||e.colno!==void 0&&e.colno>orE}function _rE(e,t){let r=GQo.get(e);if(r===void 0)return!1;for(let i=t[0];i<=t[1];i++)if(r[i]===void 0)return!1;return!0}function hrE(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let i=KXp(r),n=[];for(;;){if(t===e.length-1){n.push(i);break}let a=e[t+1];if(typeof a!="number")break;a<=i[1]?i[1]=a+f_c:(n.push(i),i=KXp(a)),t++}return n}function KXp(e){return[PZp(e),jZp(e)]}function PZp(e){return Math.max(1,e-f_c)}function jZp(e){return e+f_c}function yrE(e,t,r){let i=e.get(t);return i===void 0?(e.set(t,r),r):i}function vrE(e,t){let r=e,i=r.length;if(i<=150)return r;t>i&&(t=i);let n=Math.max(t-60,0);n<5&&(n=0);let a=Math.min(n+140,i);return a>i-5&&(a=i),a===i&&(n=Math.max(a-140,0)),r=r.slice(n,a),n>0&&(r=`...${r}`),a<i&&(r+="..."),r}var brE="4.18.0",$oe;(function(e){e.AnonymousId="anonymous_id",e.DistinctId="distinct_id",e.Props="props",e.FeatureFlagDetails="feature_flag_details",e.FeatureFlags="feature_flags",e.FeatureFlagPayloads="feature_flag_payloads",e.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",e.BootstrapFeatureFlags="bootstrap_feature_flags",e.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",e.OverrideFeatureFlags="override_feature_flags",e.Queue="queue",e.OptedOut="opted_out",e.SessionId="session_id",e.SessionStartTimestamp="session_start_timestamp",e.SessionLastTimestamp="session_timestamp",e.PersonProperties="person_properties",e.GroupProperties="group_properties",e.InstalledAppBuild="installed_app_build",e.InstalledAppVersion="installed_app_version",e.SessionReplay="session_replay",e.DecideEndpointWasHit="decide_endpoint_was_hit",e.SurveyLastSeenDate="survey_last_seen_date",e.SurveysSeen="surveys_seen",e.Surveys="surveys",e.RemoteConfig="remote_config"})($oe||($oe={}));var YXp;(function(e){e.Left="left",e.Right="right",e.Center="center"})(YXp||(YXp={}));var XXp;(function(e){e.Button="button",e.Tab="tab",e.Selector="selector"})(XXp||(XXp={}));var ZXp;(function(e){e.Popover="popover",e.API="api",e.Widget="widget"})(ZXp||(ZXp={}));var kXp;(function(e){e.Html="html",e.Text="text"})(kXp||(kXp={}));var eZp;(function(e){e.Number="number",e.Emoji="emoji"})(eZp||(eZp={}));var tZp;(function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"})(tZp||(tZp={}));var rZp;(function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"})(rZp||(rZp={}));var iZp;(function(e){e.Regex="regex",e.NotRegex="not_regex",e.Exact="exact",e.IsNot="is_not",e.Icontains="icontains",e.NotIcontains="not_icontains"})(iZp||(iZp={}));var nZp;(function(e){e.Contains="contains",e.Exact="exact",e.Regex="regex"})(nZp||(nZp={}));var grE=e=>{if("flags"in e){let t=mrE(e.flags),r=PrE(e.flags);return{...e,featureFlags:t,featureFlagPayloads:r}}else{let t=e.featureFlags??{},r=Object.fromEntries(Object.entries(e.featureFlagPayloads||{}).map(([n,a])=>[n,wZp(a)])),i=Object.fromEntries(Object.entries(t).map(([n,a])=>[n,OrE(n,a,r[n])]));return{...e,featureFlags:t,featureFlagPayloads:r,flags:i}}};function OrE(e,t,r){return{key:e,enabled:typeof t=="string"?!0:t,variant:typeof t=="string"?t:void 0,reason:void 0,metadata:{id:void 0,version:void 0,payload:r?JSON.stringify(r):void 0,description:void 0}}}var mrE=e=>Object.fromEntries(Object.entries(e??{}).map(([t,r])=>[t,d_c(r)]).filter(([,t])=>t!==void 0)),PrE=e=>{let t=e??{};return Object.fromEntries(Object.keys(t).filter(r=>{let i=t[r];return i.enabled&&i.metadata&&i.metadata.payload!==void 0}).map(r=>{let i=t[r].metadata?.payload;return[r,i?wZp(i):void 0]}))},d_c=e=>e===void 0?void 0:e.variant??e.enabled,wZp=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}},jrE=1,wrE=new Set(["61be3dd8","96f6df5f","8cfdba9b","bf027177","e59430a8","7fa5500b","569798e9","04809ff7","0ebc61a5","32de7f98","3beeb69a","12d34ad9","733853ec","0645bb64","5dcbee21","b1f95fa3","2189e408","82b460c2","3a8cc979","29ef8843","2cdbf767","38084b54","50f9f8de","41d0df91","5c236689","c11aedd3","ada46672","f4331ee1","42fed62a","c957462c","d62f705a","e0162666","01b3e5cf","441cef7f","bb9cafee","8f348eb0","b2553f3a","97469d7d","39f21a76","03706dcc","27d50569","307584a7","6433e92e","150c7fbb","49f57f22","3772f65b","01eb8256","3c9e9234","f853c7f7","c0ac4b67","cd609d40","10ca9b1a","8a87f11b","8e8e5216","1f6b63b3","db7943dd","79b7164c","07f78e33","2d21b6fd","952db5ee","a7d3b43f","1924dd9c","84e1b8f6","dff631b6","c5aa8a79","fa133a95","498a4508","24748755","98f3d658","21bbda67","7dbfed69","be3ec24c","fc80b8e2","75cc0998"]),SrE="utf8";function DrE(e,t){if(!e||typeof e!="string"||ErE(e))throw new Error(t)}function ErE(e){return e.trim().length===0}function MrE(e){return e?.replace(/\/+$/,"")}async function ArE(e,t){let r=null;for(let i=0;i<t.retryCount+1;i++){i>0&&await new Promise(n=>setTimeout(n,t.retryDelay));try{return await e()}catch(n){if(r=n,!t.retryCheck(n))throw n}}throw r}function aZp(){return new Date().getTime()}function kpc(){return new Date().toISOString()}function YQo(e,t){let r=setTimeout(e,t);return r?.unref&&r?.unref(),r}function qrE(){return typeof fetch<"u"?fetch:typeof globalThis.fetch<"u"?globalThis.fetch:void 0}function TrE(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);return(t>>>0).toString(16).padStart(8,"0")}function CrE(e,t=0,r){let i=TrE(e);return r?.has(i)?!1:parseInt(i,16)/4294967295<t}function oZp(e){return Promise.all(e.map(t=>(t??Promise.resolve()).then(r=>({status:"fulfilled",value:r}),r=>({status:"rejected",reason:r}))))}var g7a=String.fromCharCode,uZp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",$Qo={};function BrE(e,t){if(!$Qo[e]){$Qo[e]={};for(let r=0;r<e.length;r++)$Qo[e][e.charAt(r)]=r}return $Qo[e][t]}var jHn={compressToBase64:function(e){if(e==null)return"";let t=jHn._compress(e,6,function(r){return uZp.charAt(r)});switch(t.length%4){default:case 0:return t;case 1:return t+"===";case 2:return t+"==";case 3:return t+"="}},decompressFromBase64:function(e){return e==null?"":e==""?null:jHn._decompress(e.length,32,function(t){return BrE(uZp,e.charAt(t))})},compress:function(e){return jHn._compress(e,16,function(t){return g7a(t)})},_compress:function(e,t,r){if(e==null)return"";let i={},n={},a=[],u,l,d="",s="",o="",c=2,b=3,g=2,O=0,m=0,w;for(w=0;w<e.length;w+=1)if(d=e.charAt(w),Object.prototype.hasOwnProperty.call(i,d)||(i[d]=b++,n[d]=!0),s=o+d,Object.prototype.hasOwnProperty.call(i,s))o=s;else{if(Object.prototype.hasOwnProperty.call(n,o)){if(o.charCodeAt(0)<256){for(u=0;u<g;u++)O=O<<1,m==t-1?(m=0,a.push(r(O)),O=0):m++;for(l=o.charCodeAt(0),u=0;u<8;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1}else{for(l=1,u=0;u<g;u++)O=O<<1|l,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=0;for(l=o.charCodeAt(0),u=0;u<16;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1}c--,c==0&&(c=Math.pow(2,g),g++),delete n[o]}else for(l=i[o],u=0;u<g;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1;c--,c==0&&(c=Math.pow(2,g),g++),i[s]=b++,o=String(d)}if(o!==""){if(Object.prototype.hasOwnProperty.call(n,o)){if(o.charCodeAt(0)<256){for(u=0;u<g;u++)O=O<<1,m==t-1?(m=0,a.push(r(O)),O=0):m++;for(l=o.charCodeAt(0),u=0;u<8;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1}else{for(l=1,u=0;u<g;u++)O=O<<1|l,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=0;for(l=o.charCodeAt(0),u=0;u<16;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1}c--,c==0&&(c=Math.pow(2,g),g++),delete n[o]}else for(l=i[o],u=0;u<g;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1;c--,c==0&&(c=Math.pow(2,g),g++)}for(l=2,u=0;u<g;u++)O=O<<1|l&1,m==t-1?(m=0,a.push(r(O)),O=0):m++,l=l>>1;for(;;)if(O=O<<1,m==t-1){a.push(r(O));break}else m++;return a.join("")},decompress:function(e){return e==null?"":e==""?null:jHn._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(e,t,r){let i=[],n=[],a={val:r(0),position:t,index:1},u=4,l=4,d=3,s="",o,c,b,g,O,m,w;for(o=0;o<3;o+=1)i[o]=o;for(b=0,O=Math.pow(2,2),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;switch(b){case 0:for(b=0,O=Math.pow(2,8),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;w=g7a(b);break;case 1:for(b=0,O=Math.pow(2,16),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;w=g7a(b);break;case 2:return""}for(i[3]=w,c=w,n.push(w);;){if(a.index>e)return"";for(b=0,O=Math.pow(2,d),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;switch(w=b){case 0:for(b=0,O=Math.pow(2,8),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;i[l++]=g7a(b),w=l-1,u--;break;case 1:for(b=0,O=Math.pow(2,16),m=1;m!=O;)g=a.val&a.position,a.position>>=1,a.position==0&&(a.position=t,a.val=r(a.index++)),b|=(g>0?1:0)*m,m<<=1;i[l++]=g7a(b),w=l-1,u--;break;case 2:return n.join("")}if(u==0&&(u=Math.pow(2,d),d++),i[w])s=i[w];else if(w===l)s=c+c.charAt(0);else return null;n.push(s),i[l++]=c+s.charAt(0),u--,c=s,u==0&&(u=Math.pow(2,d),d++)}}},i_c=class{constructor(){this.events={},this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(i=>i!==r)}}emit(t,r){for(let i of this.events[t]||[])i(r);for(let i of this.events["*"]||[])i(t,r)}},DHn=class extends Error{constructor(t,r){super("HTTP error while fetching PostHog: status="+t.status+", reqByteLength="+r),this.response=t,this.reqByteLength=r,this.name="PostHogFetchHttpError"}get status(){return this.response.status}get text(){return this.response.text()}get json(){return this.response.json()}},O7a=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};async function sZp(e){if(e instanceof DHn){let t="";try{t=await e.text}catch{}console.error(`Error while flushing PostHog: message=${e.message}, response body=${t}`,e)}else console.error("Error while flushing PostHog",e);return Promise.resolve()}function e_c(e){return typeof e=="object"&&(e instanceof DHn||e instanceof O7a)}function cZp(e){return typeof e=="object"&&e instanceof DHn&&e.status===413}var n_c;(function(e){e.FeatureFlags="feature_flags",e.Recordings="recordings"})(n_c||(n_c={}));var a_c=class{constructor(t,r){this.flushPromise=null,this.shutdownPromise=null,this.pendingPromises={},this._events=new i_c,this._isInitialized=!1,DrE(t,"You must pass your PostHog project's api key."),this.apiKey=t,this.host=MrE(r?.host||"https://us.i.posthog.com"),this.flushAt=r?.flushAt?Math.max(r?.flushAt,1):20,this.maxBatchSize=Math.max(this.flushAt,r?.maxBatchSize??100),this.maxQueueSize=Math.max(this.flushAt,r?.maxQueueSize??1e3),this.flushInterval=r?.flushInterval??1e4,this.captureMode=r?.captureMode||"json",this.preloadFeatureFlags=r?.preloadFeatureFlags??!0,this.defaultOptIn=r?.defaultOptIn??!0,this.disableSurveys=r?.disableSurveys??!1,this._retryOptions={retryCount:r?.fetchRetryCount??3,retryDelay:r?.fetchRetryDelay??3e3,retryCheck:e_c},this.requestTimeout=r?.requestTimeout??1e4,this.featureFlagsRequestTimeoutMs=r?.featureFlagsRequestTimeoutMs??3e3,this.remoteConfigRequestTimeoutMs=r?.remoteConfigRequestTimeoutMs??3e3,this.disableGeoip=r?.disableGeoip??!0,this.disabled=r?.disabled??!1,this.historicalMigration=r?.historicalMigration??!1,this._initPromise=Promise.resolve(),this._isInitialized=!0}logMsgIfDebug(t){this.isDebug&&t()}wrap(t){if(this.disabled){this.logMsgIfDebug(()=>console.warn("[PostHog] The client is disabled"));return}if(this._isInitialized)return t();this._initPromise.then(()=>t())}getCommonEventProperties(){return{$lib:this.getLibraryId(),$lib_version:this.getLibraryVersion()}}get optedOut(){return this.getPersistedProperty($oe.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty($oe.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty($oe.OptedOut,!0)})}on(t,r){return this._events.on(t,r)}debug(t=!0){if(this.removeDebugCallback?.(),t){let r=this.on("*",(i,n)=>console.log("PostHog Debug",i,n));this.removeDebugCallback=()=>{r(),this.removeDebugCallback=void 0}}}get isDebug(){return!!this.removeDebugCallback}get isDisabled(){return this.disabled}buildPayload(t){return{distinct_id:t.distinct_id,event:t.event,properties:{...t.properties||{},...this.getCommonEventProperties()}}}addPendingPromise(t){let r=r_c();return this.pendingPromises[r]=t,t.catch(()=>{}).finally(()=>{delete this.pendingPromises[r]}),t}identifyStateless(t,r,i){this.wrap(()=>{let n={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};this.enqueue("identify",n,i)})}async identifyStatelessImmediate(t,r,i){let n={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};await this.sendImmediate("identify",n,i)}captureStateless(t,r,i,n){this.wrap(()=>{let a=this.buildPayload({distinct_id:t,event:r,properties:i});this.enqueue("capture",a,n)})}async captureStatelessImmediate(t,r,i,n){let a=this.buildPayload({distinct_id:t,event:r,properties:i});await this.sendImmediate("capture",a,n)}aliasStateless(t,r,i,n){this.wrap(()=>{let a=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...i||{},distinct_id:r,alias:t}});this.enqueue("alias",a,n)})}async aliasStatelessImmediate(t,r,i,n){let a=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...i||{},distinct_id:r,alias:t}});await this.sendImmediate("alias",a,n)}groupIdentifyStateless(t,r,i,n,a,u){this.wrap(()=>{let l=this.buildPayload({distinct_id:a||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:i||{},...u||{}}});this.enqueue("capture",l,n)})}async getRemoteConfig(){await this._initPromise;let t=this.host;t==="https://us.i.posthog.com"?t="https://us-assets.i.posthog.com":t==="https://eu.i.posthog.com"&&(t="https://eu-assets.i.posthog.com");let r=`${t}/array/${this.apiKey}/config`,i={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}};return this.fetchWithRetry(r,i,{retryCount:0},this.remoteConfigRequestTimeoutMs).then(n=>n.json()).catch(n=>{this.logMsgIfDebug(()=>console.error("Remote config could not be loaded",n)),this._events.emit("error",n)})}async getDecide(t,r={},i={},n={},a={}){await this._initPromise;let l=CrE(this.apiKey,jrE,wrE)?`${this.host}/flags/?v=2`:`${this.host}/decide/?v=4`,d={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:JSON.stringify({token:this.apiKey,distinct_id:t,groups:r,person_properties:i,group_properties:n,...a})};return this.logMsgIfDebug(()=>console.log("PostHog Debug","Decide URL",l)),this.fetchWithRetry(l,d,{retryCount:0},this.featureFlagsRequestTimeoutMs).then(s=>s.json()).then(s=>grE(s)).catch(s=>{this._events.emit("error",s)})}async getFeatureFlagStateless(t,r,i={},n={},a={},u){await this._initPromise;let l=await this.getFeatureFlagDetailStateless(t,r,i,n,a,u);if(l===void 0)return{response:void 0,requestId:void 0};let d=d_c(l.response);return d===void 0&&(d=!1),{response:d,requestId:l.requestId}}async getFeatureFlagDetailStateless(t,r,i={},n={},a={},u){await this._initPromise;let l=await this.getFeatureFlagDetailsStateless(r,i,n,a,u,[t]);return l===void 0?void 0:{response:l.flags[t],requestId:l.requestId}}async getFeatureFlagPayloadStateless(t,r,i={},n={},a={},u){await this._initPromise;let l=await this.getFeatureFlagPayloadsStateless(r,i,n,a,u,[t]);if(!l)return;let d=l[t];return d===void 0?null:d}async getFeatureFlagPayloadsStateless(t,r={},i={},n={},a,u){return await this._initPromise,(await this.getFeatureFlagsAndPayloadsStateless(t,r,i,n,a,u)).payloads}async getFeatureFlagsStateless(t,r={},i={},n={},a,u){return await this._initPromise,await this.getFeatureFlagsAndPayloadsStateless(t,r,i,n,a,u)}async getFeatureFlagsAndPayloadsStateless(t,r={},i={},n={},a,u){await this._initPromise;let l=await this.getFeatureFlagDetailsStateless(t,r,i,n,a,u);return l?{flags:l.featureFlags,payloads:l.featureFlagPayloads,requestId:l.requestId}:{flags:void 0,payloads:void 0,requestId:void 0}}async getFeatureFlagDetailsStateless(t,r={},i={},n={},a,u){await this._initPromise;let l={};(a??this.disableGeoip)&&(l.geoip_disable=!0),u&&(l.flag_keys_to_evaluate=u);let d=await this.getDecide(t,r,i,n,l);if(d!==void 0)return d.errorsWhileComputingFlags&&console.error("[FEATURE FLAGS] Error while computing feature flags, some flags may be missing or incorrect. Learn more at https://posthog.com/docs/feature-flags/best-practices"),d.quotaLimited?.includes(n_c.FeatureFlags)?(console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - feature flags unavailable. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"),{flags:{},featureFlags:{},featureFlagPayloads:{},requestId:d?.requestId}):d}async getSurveysStateless(){if(await this._initPromise,this.disableSurveys===!0)return this.logMsgIfDebug(()=>console.log("PostHog Debug","Loading surveys is disabled.")),[];let t=`${this.host}/api/surveys/?token=${this.apiKey}`,r={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}},n=(await this.fetchWithRetry(t,r).then(a=>{if(a.status!==200||!a.json){let u=`Surveys API could not be loaded: ${a.status}`,l=new Error(u);this.logMsgIfDebug(()=>console.error(l)),this._events.emit("error",new Error(u));return}return a.json()}).catch(a=>{this.logMsgIfDebug(()=>console.error("Surveys API could not be loaded",a)),this._events.emit("error",a)}))?.surveys;return n&&this.logMsgIfDebug(()=>console.log("PostHog Debug","Surveys fetched from API: ",JSON.stringify(n))),n??[]}get props(){return this._props||(this._props=this.getPersistedProperty($oe.Props)),this._props||{}}set props(t){this._props=t}async register(t){this.wrap(()=>{this.props={...this.props,...t},this.setPersistedProperty($oe.Props,this.props)})}async unregister(t){this.wrap(()=>{delete this.props[t],this.setPersistedProperty($oe.Props,this.props)})}enqueue(t,r,i){this.wrap(()=>{if(this.optedOut){this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");return}let n=this.prepareMessage(t,r,i),a=this.getPersistedProperty($oe.Queue)||[];a.length>=this.maxQueueSize&&(a.shift(),this.logMsgIfDebug(()=>console.info("Queue is full, the oldest event is dropped."))),a.push({message:n}),this.setPersistedProperty($oe.Queue,a),this._events.emit(t,n),a.length>=this.flushAt&&this.flushBackground(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=YQo(()=>this.flushBackground(),this.flushInterval))})}async sendImmediate(t,r,i){if(this.disabled){this.logMsgIfDebug(()=>console.warn("[PostHog] The client is disabled"));return}if(this._isInitialized||await this._initPromise,this.optedOut){this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");return}let n={api_key:this.apiKey,batch:[this.prepareMessage(t,r,i)],sent_at:kpc()};this.historicalMigration&&(n.historical_migration=!0);let a=JSON.stringify(n),u=this.captureMode==="form"?`${this.host}/e/?ip=1&_=${aZp()}&v=${this.getLibraryVersion()}`:`${this.host}/batch/`,l=this.captureMode==="form"?{method:"POST",mode:"no-cors",credentials:"omit",headers:{...this.getCustomHeaders(),"Content-Type":"application/x-www-form-urlencoded"},body:`data=${encodeURIComponent(jHn.compressToBase64(a))}&compression=lz64`}:{method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:a};try{await this.fetchWithRetry(u,l)}catch(d){this._events.emit("error",d)}}prepareMessage(t,r,i){let n={...r,type:t,library:this.getLibraryId(),library_version:this.getLibraryVersion(),timestamp:i?.timestamp?i?.timestamp:kpc(),uuid:i?.uuid?i.uuid:r_c()};return(i?.disableGeoip??this.disableGeoip)&&(n.properties||(n.properties={}),n.properties.$geoip_disable=!0),n.distinctId&&(n.distinct_id=n.distinctId,delete n.distinctId),n}clearFlushTimer(){this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=void 0)}flushBackground(){this.flush().catch(async t=>{await sZp(t)})}async flush(){let t=oZp([this.flushPromise]).then(()=>this._flush());return this.flushPromise=t,this.addPendingPromise(t),oZp([t]).then(()=>{this.flushPromise===t&&(this.flushPromise=null)}),t}getCustomHeaders(){let t=this.getCustomUserAgent(),r={};return t&&t!==""&&(r["User-Agent"]=t),r}async _flush(){this.clearFlushTimer(),await this._initPromise;let t=this.getPersistedProperty($oe.Queue)||[];if(!t.length)return;let r=[],i=t.length;for(;t.length>0&&r.length<i;){let n=t.slice(0,this.maxBatchSize),a=n.map(b=>b.message),u=()=>{let g=(this.getPersistedProperty($oe.Queue)||[]).slice(n.length);this.setPersistedProperty($oe.Queue,g),t=g},l={api_key:this.apiKey,batch:a,sent_at:kpc()};this.historicalMigration&&(l.historical_migration=!0);let d=JSON.stringify(l),s=this.captureMode==="form"?`${this.host}/e/?ip=1&_=${aZp()}&v=${this.getLibraryVersion()}`:`${this.host}/batch/`,o=this.captureMode==="form"?{method:"POST",mode:"no-cors",credentials:"omit",headers:{...this.getCustomHeaders(),"Content-Type":"application/x-www-form-urlencoded"},body:`data=${encodeURIComponent(jHn.compressToBase64(d))}&compression=lz64`}:{method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:d},c={retryCheck:b=>cZp(b)?!1:e_c(b)};try{await this.fetchWithRetry(s,o,c)}catch(b){if(cZp(b)&&a.length>1){this.maxBatchSize=Math.max(1,Math.floor(a.length/2)),this.logMsgIfDebug(()=>console.warn(`Received 413 when sending batch of size ${a.length}, reducing batch size to ${this.maxBatchSize}`));continue}throw b instanceof O7a||u(),this._events.emit("error",b),b}u(),r.push(...a)}this._events.emit("flush",r)}async fetchWithRetry(t,r,i,n){var a;(a=AbortSignal).timeout??(a.timeout=function(s){let o=new AbortController;return setTimeout(()=>o.abort(),s),o.signal});let u=r.body?r.body:"",l=-1;try{l=Buffer.byteLength(u,SrE)}catch{l=new TextEncoder().encode(u).length}return await ArE(async()=>{let d=null;try{d=await this.fetch(t,{signal:AbortSignal.timeout(n??this.requestTimeout),...r})}catch(o){throw new O7a(o)}if(!(r.mode==="no-cors")&&(d.status<200||d.status>=400))throw new DHn(d,l);return d},{...this._retryOptions,...i})}async _shutdown(t=3e4){await this._initPromise;let r=!1;this.clearFlushTimer();let i=async()=>{try{for(await Promise.all(Object.values(this.pendingPromises));!((this.getPersistedProperty($oe.Queue)||[]).length===0||(await this.flush(),r)););}catch(n){if(!e_c(n))throw n;await sZp(n)}};return Promise.race([new Promise((n,a)=>{YQo(()=>{this.logMsgIfDebug(()=>console.error("Timed out while shutting down PostHog")),r=!0,a("Timeout while shutting down PostHog. Some events may not have been sent.")},t)}),i()])}async shutdown(t=3e4){return this.shutdownPromise?this.logMsgIfDebug(()=>console.warn("shutdown() called while already shutting down. shutdown() is meant to be called once before process exit - use flush() for per-request cleanup")):this.shutdownPromise=this._shutdown(t).finally(()=>{this.shutdownPromise=null}),this.shutdownPromise}},o_c=qrE();if(!o_c){let e=LXp();o_c=async(t,r)=>{let i=await e.request({url:t,headers:r.headers,method:r.method.toLowerCase(),data:r.body,signal:r.signal,validateStatus:()=>!0});return{status:i.status,text:async()=>i.data,json:async()=>i.data}}}var SZp=o_c,XQo=class{constructor(t){this.factory=t}async getValue(){return this.value!==void 0?this.value:(this.initializationPromise===void 0&&(this.initializationPromise=(async()=>{try{let t=await this.factory();return this.value=t,t}finally{this.initializationPromise=void 0}})()),this.initializationPromise)}isInitialized(){return this.value!==void 0}async waitForInitialization(){this.isInitialized()||await this.getValue()}},DZp=new XQo(async()=>{try{return await import("crypto")}catch{return}});async function IrE(){return await DZp.getValue()}var zrE=new XQo(async()=>{if(typeof globalThis.crypto?.subtle<"u")return globalThis.crypto.subtle;try{let e=await DZp.getValue();if(e?.webcrypto?.subtle)return e.webcrypto.subtle}catch{}});async function RrE(){return await zrE.getValue()}async function xrE(e){let t=await IrE();if(t)return t.createHash("sha1").update(e).digest("hex");let r=await RrE();if(r){let i=await r.digest("SHA-1",new TextEncoder().encode(e));return Array.from(new Uint8Array(i)).map(a=>a.toString(16).padStart(2,"0")).join("")}throw new Error("No crypto implementation available. Tried Node Crypto API and Web SubtleCrypto API")}var NrE=60*1e3,FrE=1152921504606847e3,LrE=["is_not"],wHn=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}},x8=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},u_c=class{constructor({pollingInterval:t,personalApiKey:r,projectApiKey:i,timeout:n,host:a,customHeaders:u,...l}){this.debugMode=!1,this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.pollingInterval=t,this.personalApiKey=r,this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={},this.loadedSuccessfullyOnce=!1,this.timeout=n,this.projectApiKey=i,this.host=a,this.poller=void 0,this.fetch=l.fetch||SZp,this.onError=l.onError,this.customHeaders=u,this.onLoad=l.onLoad,this.loadFeatureFlags()}debug(t=!0){this.debugMode=t}logMsgIfDebug(t){this.debugMode&&t()}async getFeatureFlag(t,r,i={},n={},a={}){await this.loadFeatureFlags();let u,l;if(!this.loadedSuccessfullyOnce)return u;for(let d of this.featureFlags)if(t===d.key){l=d;break}if(l!==void 0)try{u=await this.computeFlagLocally(l,r,i,n,a),this.logMsgIfDebug(()=>console.debug(`Successfully computed flag locally: ${t} -> ${u}`))}catch(d){d instanceof x8?this.logMsgIfDebug(()=>console.debug(`InconclusiveMatchError when computing flag locally: ${t}: ${d}`)):d instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${t}: ${d}`))}return u}async computeFeatureFlagPayloadLocally(t,r){await this.loadFeatureFlags();let i;if(this.loadedSuccessfullyOnce){if(typeof r=="boolean"?i=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r.toString()]:typeof r=="string"&&(i=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r]),i==null)return null;try{return JSON.parse(i)}catch{return i}}}async getAllFlagsAndPayloads(t,r={},i={},n={}){await this.loadFeatureFlags();let a={},u={},l=this.featureFlags.length==0;return await Promise.all(this.featureFlags.map(async d=>{try{let s=await this.computeFlagLocally(d,t,r,i,n);a[d.key]=s;let o=await this.computeFeatureFlagPayloadLocally(d.key,s);o&&(u[d.key]=o)}catch(s){s instanceof x8||s instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${d.key}: ${s}`)),l=!0}})),{response:a,payloads:u,fallbackToDecide:l}}async computeFlagLocally(t,r,i={},n={},a={}){if(t.ensure_experience_continuity)throw new x8("Flag has experience continuity enabled");if(!t.active)return!1;let l=(t.filters||{}).aggregation_group_type_index;if(l!=null){let d=this.groupTypeMapping[String(l)];if(!d)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Unknown group type index ${l} for feature flag ${t.key}`)),new x8("Flag has unknown group type index");if(!(d in i))return this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute group feature flag: ${t.key} without group names passed in`)),!1;let s=a[d];return await this.matchFeatureFlagProperties(t,i[d],s)}else return await this.matchFeatureFlagProperties(t,r,n)}async matchFeatureFlagProperties(t,r,i){let n=t.filters||{},a=n.groups||[],u=!1,l,d=[...a].sort((s,o)=>{let c=!!s.variant,b=!!o.variant;return c&&b?0:c?-1:b?1:0});for(let s of d)try{if(await this.isConditionMatch(t,r,s,i)){let o=s.variant,c=n.multivariate?.variants||[];o&&c.some(b=>b.key===o)?l=o:l=await this.getMatchingVariant(t,r)||!0;break}}catch(o){if(o instanceof x8)u=!0;else throw o}if(l!==void 0)return l;if(u)throw new x8("Can't determine if feature flag is enabled or not with given properties");return!1}async isConditionMatch(t,r,i,n){let a=i.rollout_percentage,u=l=>{this.logMsgIfDebug(()=>console.warn(l))};if((i.properties||[]).length>0){for(let l of i.properties){let d=l.type,s=!1;if(d==="cohort"?s=MZp(l,n,this.cohorts,this.debugMode):s=EZp(l,n,u),!s)return!1}if(a==null)return!0}return!(a!=null&&await lZp(t.key,r)>a/100)}async getMatchingVariant(t,r){let i=await lZp(t.key,r,"variant"),n=this.variantLookupTable(t).find(a=>i>=a.valueMin&&i<a.valueMax);if(n)return n.key}variantLookupTable(t){let r=[],i=0,n=0;return((t.filters||{}).multivariate?.variants||[]).forEach(l=>{n=i+l.rollout_percentage/100,r.push({valueMin:i,valueMax:n,key:l.key}),i=n}),r}async loadFeatureFlags(t=!1){(!this.loadedSuccessfullyOnce||t)&&await this._loadFeatureFlags()}isLocalEvaluationReady(){return(this.loadedSuccessfullyOnce??!1)&&(this.featureFlags?.length??0)>0}getPollingInterval(){return this.shouldBeginExponentialBackoff?Math.min(NrE,this.pollingInterval*2**this.backOffCount):this.pollingInterval}async _loadFeatureFlags(){this.poller&&(clearTimeout(this.poller),this.poller=void 0),this.poller=setTimeout(()=>this._loadFeatureFlags(),this.getPollingInterval());try{let t=await this._requestFeatureFlagDefinitions();if(!t)return;switch(t.status){case 401:throw this.shouldBeginExponentialBackoff=!0,this.backOffCount+=1,new wHn(`Your project key or personal API key is invalid. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);case 402:console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - unsetting all local flags. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"),this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={};return;case 403:throw this.shouldBeginExponentialBackoff=!0,this.backOffCount+=1,new wHn(`Your personal API key does not have permission to fetch feature flag definitions for local evaluation. Setting next polling interval to ${this.getPollingInterval()}ms. Are you sure you're using the correct personal and Project API key pair? More information: https://posthog.com/docs/api/overview`);case 429:throw this.shouldBeginExponentialBackoff=!0,this.backOffCount+=1,new wHn(`You are being rate limited. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);case 200:{let r=await t.json()??{};if(!("flags"in r)){this.onError?.(new Error(`Invalid response when getting feature flags: ${JSON.stringify(r)}`));return}this.featureFlags=r.flags??[],this.featureFlagsByKey=this.featureFlags.reduce((i,n)=>(i[n.key]=n,i),{}),this.groupTypeMapping=r.group_type_mapping||{},this.cohorts=r.cohorts||{},this.loadedSuccessfullyOnce=!0,this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.onLoad?.(this.featureFlags.length);break}default:return}}catch(t){t instanceof wHn&&this.onError?.(t)}}getPersonalApiKeyRequestOptions(t="GET"){return{method:t,headers:{...this.customHeaders,"Content-Type":"application/json",Authorization:`Bearer ${this.personalApiKey}`}}}async _requestFeatureFlagDefinitions(){let t=`${this.host}/api/feature_flag/local_evaluation?token=${this.projectApiKey}&send_cohorts`,r=this.getPersonalApiKeyRequestOptions(),i=null;if(this.timeout&&typeof this.timeout=="number"){let n=new AbortController;i=YQo(()=>{n.abort()},this.timeout),r.signal=n.signal}try{return await this.fetch(t,r)}finally{clearTimeout(i)}}stopPoller(){clearTimeout(this.poller)}_requestRemoteConfigPayload(t){let r=`${this.host}/api/projects/@current/feature_flags/${t}/remote_config/`,i=this.getPersonalApiKeyRequestOptions(),n=null;if(this.timeout&&typeof this.timeout=="number"){let a=new AbortController;n=YQo(()=>{a.abort()},this.timeout),i.signal=a.signal}try{return this.fetch(r,i)}finally{clearTimeout(n)}}};async function lZp(e,t,r=""){let i=await xrE(`${e}.${t}${r}`);return parseInt(i.slice(0,15),16)/FrE}function EZp(e,t,r){let i=e.key,n=e.value,a=e.operator||"exact";if(i in t){if(a==="is_not_set")throw new x8("Operator is_not_set is not supported")}else throw new x8(`Property ${i} not found in propertyValues`);let u=t[i];if(u==null&&!LrE.includes(a))return r&&r(`Property ${i} cannot have a value of null/undefined with the ${a} operator`),!1;function l(s,o){return Array.isArray(s)?s.map(c=>String(c).toLowerCase()).includes(String(o).toLowerCase()):String(s).toLowerCase()===String(o).toLowerCase()}function d(s,o,c){if(c==="gt")return s>o;if(c==="gte")return s>=o;if(c==="lt")return s<o;if(c==="lte")return s<=o;throw new Error(`Invalid operator: ${c}`)}switch(a){case"exact":return l(n,u);case"is_not":return!l(n,u);case"is_set":return i in t;case"icontains":return String(u).toLowerCase().includes(String(n).toLowerCase());case"not_icontains":return!String(u).toLowerCase().includes(String(n).toLowerCase());case"regex":return fZp(String(n))&&String(u).match(String(n))!==null;case"not_regex":return fZp(String(n))&&String(u).match(String(n))===null;case"gt":case"gte":case"lt":case"lte":{let s=typeof n=="number"?n:null;if(typeof n=="string")try{s=parseFloat(n)}catch{}return s!=null&&u!=null?typeof u=="string"?d(u,String(n),a):d(u,s,a):d(String(u),String(n),a)}case"is_date_after":case"is_date_before":{let s=UrE(String(n));if(s==null&&(s=dZp(n)),s==null)throw new x8(`Invalid date: ${n}`);let o=dZp(u);return["is_date_before"].includes(a)?o<s:o>s}default:throw new x8(`Unknown operator: ${a}`)}}function MZp(e,t,r,i=!1){let n=String(e.value);if(!(n in r))throw new x8("can't match cohort without a given cohort property value");let a=r[n];return AZp(a,t,r,i)}function AZp(e,t,r,i=!1){if(!e)return!0;let n=e.type,a=e.values;if(!a||a.length===0)return!0;let u=!1;if("values"in a[0]){for(let l of a)try{let d=AZp(l,t,r,i);if(n==="AND"){if(!d)return!1}else if(d)return!0}catch(d){if(d instanceof x8)i&&console.debug(`Failed to compute property ${l} locally: ${d}`),u=!0;else throw d}if(u)throw new x8("Can't match cohort without a given cohort property value");return n==="AND"}else{for(let l of a)try{let d;l.type==="cohort"?d=MZp(l,t,r,i):d=EZp(l,t);let s=l.negation||!1;if(n==="AND"){if(!d&&!s||d&&s)return!1}else if(d&&!s||!d&&s)return!0}catch(d){if(d instanceof x8)i&&console.debug(`Failed to compute property ${l} locally: ${d}`),u=!0;else throw d}if(u)throw new x8("can't match cohort without a given cohort property value");return n==="AND"}}function fZp(e){try{return new RegExp(e),!0}catch{return!1}}function dZp(e){if(e instanceof Date)return e;if(typeof e=="string"||typeof e=="number"){let t=new Date(e);if(!isNaN(t.valueOf()))return t;throw new x8(`${e} is in an invalid date format`)}else throw new x8(`The date provided ${e} must be a string, number, or date object`)}function UrE(e){let t=/^-?(?<number>[0-9]+)(?<interval>[a-z])$/,r=e.match(t),i=new Date(new Date().toISOString());if(r){if(!r.groups)return null;let n=parseInt(r.groups.number);if(n>=1e4)return null;let a=r.groups.interval;if(a=="h")i.setUTCHours(i.getUTCHours()-n);else if(a=="d")i.setUTCDate(i.getUTCDate()-n);else if(a=="w")i.setUTCDate(i.getUTCDate()-n*7);else if(a=="m")i.setUTCMonth(i.getUTCMonth()-n);else if(a=="y")i.setUTCFullYear(i.getUTCFullYear()-n);else return null;return i}else return null}var s_c=class{constructor(){this._memoryStorage={}}getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}},VrE=100,pZp=30*1e3,WrE=50*1e3,c_c=class extends a_c{constructor(t,r={}){if(super(t,r),this._memoryStorage=new s_c,this.options=r,this.options.featureFlagsPollingInterval=typeof r.featureFlagsPollingInterval=="number"?Math.max(r.featureFlagsPollingInterval,VrE):pZp,r.personalApiKey){if(r.personalApiKey.includes("phc_"))throw new Error('Your Personal API key is invalid. These keys are prefixed with "phx_" and can be created in PostHog project settings.');this.featureFlagsPoller=new u_c({pollingInterval:this.options.featureFlagsPollingInterval,personalApiKey:r.personalApiKey,projectApiKey:t,timeout:r.requestTimeout??1e4,host:this.host,fetch:r.fetch,onError:i=>{this._events.emit("error",i)},onLoad:i=>{this._events.emit("localEvaluationFlagsLoaded",i)},customHeaders:this.getCustomHeaders()})}this.errorTracking=new SHn(this,r),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=r.maxCacheSize||WrE}getPersistedProperty(t){return this._memoryStorage.getProperty(t)}setPersistedProperty(t,r){return this._memoryStorage.setProperty(t,r)}fetch(t,r){return this.options.fetch?this.options.fetch(t,r):SZp(t,r)}getLibraryVersion(){return brE}getCustomUserAgent(){return`${this.getLibraryId()}/${this.getLibraryVersion()}`}enable(){return super.optIn()}disable(){return super.optOut()}debug(t=!0){super.debug(t),this.featureFlagsPoller?.debug(t)}capture(t){typeof t=="string"&&this.logMsgIfDebug(()=>console.warn("Called capture() with a string as the first argument when an object was expected."));let{distinctId:r,event:i,properties:n,groups:a,sendFeatureFlags:u,timestamp:l,disableGeoip:d,uuid:s}=t,o=g=>{super.captureStateless(r,i,g,{timestamp:l,disableGeoip:d,uuid:s})},c=async(g,O,m)=>(await super.getFeatureFlagsStateless(g,O,void 0,void 0,m)).flags,b=Promise.resolve().then(async()=>{if(u)return await c(r,a,d);if(i==="$feature_flag_called")return{};if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let g={};for(let[O,m]of Object.entries(a||{}))g[O]=String(m);return await this.getAllFlags(r,{groups:g,disableGeoip:d,onlyEvaluateLocally:!0})}return{}}).then(g=>{let O={};if(g)for(let[w,E]of Object.entries(g))O[`$feature/${w}`]=E;let m=Object.keys(g||{}).filter(w=>g?.[w]!==!1).sort();return m.length>0&&(O.$active_feature_flags=m),O}).catch(()=>({})).then(g=>{o({...g,...n,$groups:a})});this.addPendingPromise(b)}async captureImmediate(t){typeof t=="string"&&this.logMsgIfDebug(()=>console.warn("Called capture() with a string as the first argument when an object was expected."));let{distinctId:r,event:i,properties:n,groups:a,sendFeatureFlags:u,timestamp:l,disableGeoip:d,uuid:s}=t,o=g=>super.captureStatelessImmediate(r,i,g,{timestamp:l,disableGeoip:d,uuid:s}),c=async(g,O,m)=>(await super.getFeatureFlagsStateless(g,O,void 0,void 0,m)).flags;await Promise.resolve().then(async()=>{if(u)return await c(r,a,d);if(i==="$feature_flag_called")return{};if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let g={};for(let[O,m]of Object.entries(a||{}))g[O]=String(m);return await this.getAllFlags(r,{groups:g,disableGeoip:d,onlyEvaluateLocally:!0})}return{}}).then(g=>{let O={};if(g)for(let[w,E]of Object.entries(g))O[`$feature/${w}`]=E;let m=Object.keys(g||{}).filter(w=>g?.[w]!==!1).sort();return m.length>0&&(O.$active_feature_flags=m),O}).catch(()=>({})).then(g=>{o({...g,...n,$groups:a})})}identify({distinctId:t,properties:r,disableGeoip:i}){let n=r?.$set_once;delete r?.$set_once;let a=r?.$set||r;super.identifyStateless(t,{$set:a,$set_once:n},{disableGeoip:i})}async identifyImmediate({distinctId:t,properties:r,disableGeoip:i}){let n=r?.$set_once;delete r?.$set_once;let a=r?.$set||r;await super.identifyStatelessImmediate(t,{$set:a,$set_once:n},{disableGeoip:i})}alias(t){super.aliasStateless(t.alias,t.distinctId,void 0,{disableGeoip:t.disableGeoip})}async aliasImmediate(t){await super.aliasStatelessImmediate(t.alias,t.distinctId,void 0,{disableGeoip:t.disableGeoip})}isLocalEvaluationReady(){return this.featureFlagsPoller?.isLocalEvaluationReady()??!1}async waitForLocalEvaluationReady(t=pZp){return this.isLocalEvaluationReady()?!0:this.featureFlagsPoller===void 0?!1:new Promise(r=>{let i=setTimeout(()=>{n(),r(!1)},t),n=this._events.on("localEvaluationFlagsLoaded",a=>{clearTimeout(i),n(),r(a>0)})})}async getFeatureFlag(t,r,i){let{groups:n,disableGeoip:a}=i||{},{onlyEvaluateLocally:u,sendFeatureFlagEvents:l,personProperties:d,groupProperties:s}=i||{},o=this.addLocalPersonAndGroupProperties(r,n,d,s);d=o.allPersonProperties,s=o.allGroupProperties,u==null&&(u=!1),l==null&&(l=!0);let c=await this.featureFlagsPoller?.getFeatureFlag(t,r,n,d,s),b=c!==void 0,g,O;if(!b&&!u){let w=await super.getFeatureFlagDetailStateless(t,r,n,d,s,a);if(w===void 0)return;O=w.response,c=d_c(O),g=w?.requestId}let m=`${t}_${c}`;return l&&(!(r in this.distinctIdHasSentFlagCalls)||!this.distinctIdHasSentFlagCalls[r].includes(m))&&(Object.keys(this.distinctIdHasSentFlagCalls).length>=this.maxCacheSize&&(this.distinctIdHasSentFlagCalls={}),Array.isArray(this.distinctIdHasSentFlagCalls[r])?this.distinctIdHasSentFlagCalls[r].push(m):this.distinctIdHasSentFlagCalls[r]=[m],this.capture({distinctId:r,event:"$feature_flag_called",properties:{$feature_flag:t,$feature_flag_response:c,$feature_flag_id:O?.metadata?.id,$feature_flag_version:O?.metadata?.version,$feature_flag_reason:O?.reason?.description??O?.reason?.code,locally_evaluated:b,[`$feature/${t}`]:c,$feature_flag_request_id:g},groups:n,disableGeoip:a})),c}async getFeatureFlagPayload(t,r,i,n){let{groups:a,disableGeoip:u}=n||{},{onlyEvaluateLocally:l,sendFeatureFlagEvents:d,personProperties:s,groupProperties:o}=n||{},c=this.addLocalPersonAndGroupProperties(r,a,s,o);s=c.allPersonProperties,o=c.allGroupProperties;let b;return this.featureFlagsPoller!==void 0&&(i||(i=await this.getFeatureFlag(t,r,{...n,onlyEvaluateLocally:!0,sendFeatureFlagEvents:!1})),i&&(b=await this.featureFlagsPoller?.computeFeatureFlagPayloadLocally(t,i))),l==null&&(l=!1),d==null&&(d=!0),l==null&&(l=!1),!(b!==void 0)&&!l&&(b=await super.getFeatureFlagPayloadStateless(t,r,a,s,o,u)),b}async getRemoteConfigPayload(t){return(await this.featureFlagsPoller?._requestRemoteConfigPayload(t))?.json()}async isFeatureEnabled(t,r,i){let n=await this.getFeatureFlag(t,r,i);if(n!==void 0)return!!n||!1}async getAllFlags(t,r){return(await this.getAllFlagsAndPayloads(t,r)).featureFlags||{}}async getAllFlagsAndPayloads(t,r){let{groups:i,disableGeoip:n}=r||{},{onlyEvaluateLocally:a,personProperties:u,groupProperties:l}=r||{},d=this.addLocalPersonAndGroupProperties(t,i,u,l);u=d.allPersonProperties,l=d.allGroupProperties,a==null&&(a=!1);let s=await this.featureFlagsPoller?.getAllFlagsAndPayloads(t,i,u,l),o={},c={},b=!0;if(s&&(o=s.response,c=s.payloads,b=s.fallbackToDecide),b&&!a){let g=await super.getFeatureFlagsAndPayloadsStateless(t,i,u,l,n);o={...o,...g.flags||{}},c={...c,...g.payloads||{}}}return{featureFlags:o,featureFlagPayloads:c}}groupIdentify({groupType:t,groupKey:r,properties:i,distinctId:n,disableGeoip:a}){super.groupIdentifyStateless(t,r,i,{disableGeoip:a},n)}async reloadFeatureFlags(){await this.featureFlagsPoller?.loadFeatureFlags(!0)}async _shutdown(t){return this.featureFlagsPoller?.stopPoller(),super._shutdown(t)}addLocalPersonAndGroupProperties(t,r,i,n){let a={distinct_id:t,...i||{}},u={};if(r)for(let l of Object.keys(r))u[l]={$group_key:r[l],...n?.[l]||{}};return{allPersonProperties:a,allGroupProperties:u}}captureException(t,r,i){let n=new Error("PostHog syntheticException");SHn.captureException(this,t,{syntheticException:n},r,i)}},_Zp=/\(error: (.*)\)/,qZp=50,TZp="?";function HrE(e){let t=/^\s*[-]{4,}$/,r=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return i=>{let n=i.match(r);if(n){let a,u,l,d,s;if(n[1]){l=n[1];let b=l.lastIndexOf(".");if(l[b-1]==="."&&b--,b>0){a=l.slice(0,b),u=l.slice(b+1);let g=a.indexOf(".Module");g>0&&(l=l.slice(g+1),a=a.slice(0,g))}d=void 0}u&&(d=a,s=u),u==="<anonymous>"&&(s=void 0,l=void 0),l===void 0&&(s=s||TZp,l=d?`${d}.${s}`:s);let o=n[2]?.startsWith("file://")?n[2].slice(7):n[2],c=n[5]==="native";return o?.match(/\/[A-Z]:/)&&(o=o.slice(1)),!o&&n[5]&&!c&&(o=n[5]),{filename:o?decodeURI(o):void 0,module:e?e(o):void 0,function:l,lineno:hZp(n[3]),colno:hZp(n[4]),in_app:$rE(o||"",c),platform:"node:javascript"}}if(i.match(t))return{filename:i,platform:"node:javascript"}}}function $rE(e,t=!1){return!(t||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&e!==void 0&&!e.includes("node_modules/")}function hZp(e){return parseInt(e||"",10)||void 0}function GrE(e){return[90,HrE(e)]}function QrE(e){let r=[GrE(e)].sort((i,n)=>i[0]-n[0]).map(i=>i[1]);return(i,n=0)=>{let a=[],u=i.split(`
|
|
1717
|
-
`);for(let l=n;l<u.length;l++){let d=u[l];if(d.length>1024)continue;let s=_Zp.test(d)?d.replace(_Zp,"$1"):d;if(!s.match(/\S*Error: /)){for(let o of r){let c=o(s);if(c){a.push(c);break}}if(a.length>=qZp)break}}return JrE(a)}}function JrE(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,qZp).map(r=>({...r,filename:r.filename||KrE(t).filename,function:r.function||TZp}))}function KrE(e){return e[e.length-1]||{}}SHn.stackParser=QrE(arE());SHn.frameModifiers=[srE];var EHn=class extends c_c{getLibraryId(){return"posthog-node"}};var ZQo=class{posthog;constructor({posthogApiKey:t}){this.posthog=new EHn(t)}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"0.66.14",usingAccessToken:!0}})}async flush(){await this.posthog.flush()}};var m7a=class{async sendEvent(){}async identify(){}async flush(){}};var AHn=require("fs/promises"),zZp=require("os"),RZp=require("path");var CZp=ui(require("crypto")),eJo=new Uint8Array(256),kQo=eJo.length;function p_c(){return kQo>eJo.length-16&&(CZp.default.randomFillSync(eJo),kQo=0),eJo.slice(kQo,kQo+=16)}var CH=[];for(let e=0;e<256;++e)CH.push((e+256).toString(16).slice(1));function BZp(e,t=0){return CH[e[t+0]]+CH[e[t+1]]+CH[e[t+2]]+CH[e[t+3]]+"-"+CH[e[t+4]]+CH[e[t+5]]+"-"+CH[e[t+6]]+CH[e[t+7]]+"-"+CH[e[t+8]]+CH[e[t+9]]+"-"+CH[e[t+10]]+CH[e[t+11]]+CH[e[t+12]]+CH[e[t+13]]+CH[e[t+14]]+CH[e[t+15]]}var IZp=ui(require("crypto")),__c={randomUUID:IZp.default.randomUUID};function YrE(e,t,r){if(__c.randomUUID&&!t&&!e)return __c.randomUUID();e=e||{};let i=e.random||(e.rng||p_c)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=i[n];return t}return BZp(i)}var Goe=YrE;var XrE="id",ZrE=".fern",P7a=class{posthog;userId;constructor({token:t,posthogApiKey:r}){this.posthog=new EHn(r),this.userId=t==null?void 0:nuc(t)}async identify(){this.userId!=null&&this.posthog.alias({distinctId:this.userId,alias:await this.getPersistedDistinctId()})}async sendEvent(t){this.posthog.capture({distinctId:this.userId??await this.getPersistedDistinctId(),event:"CLI",properties:{version:"0.66.14",...t,...t.properties}})}async flush(){await this.posthog.flush()}persistedDistinctId;async getPersistedDistinctId(){if(this.persistedDistinctId==null){let t=Eu(Fc.of((0,zZp.homedir)()),Ia.of(ZrE),Ia.of(XrE));await jf(t)||(await(0,AHn.mkdir)((0,RZp.dirname)(t),{recursive:!0}),await(0,AHn.writeFile)(t,Goe())),this.persistedDistinctId=(await(0,AHn.readFile)(t)).toString()}return this.persistedDistinctId}};var h_c;async function qHn(){return h_c==null&&(h_c=await krE()),h_c}async function krE(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||t)return new m7a;let r=await gUo();return r!=null?new P7a({token:r,posthogApiKey:e}):await AVn()!=null?new ZQo({posthogApiKey:e}):new P7a({token:void 0,posthogApiKey:e})}catch{return new m7a}}function j7a(e,t){return function(){return e.apply(t,arguments)}}var{toString:eiE}=Object.prototype,{getPrototypeOf:v_c}=Object,{iterator:rJo,toStringTag:NZp}=Symbol,iJo=(e=>t=>{let r=eiE.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),CGt=e=>(e=e.toLowerCase(),t=>iJo(t)===e),nJo=e=>t=>typeof t===e,{isArray:THn}=Array,w7a=nJo("undefined");function tiE(e){return e!==null&&!w7a(e)&&e.constructor!==null&&!w7a(e.constructor)&&Qoe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var FZp=CGt("ArrayBuffer");function riE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&FZp(e.buffer),t}var iiE=nJo("string"),Qoe=nJo("function"),LZp=nJo("number"),aJo=e=>e!==null&&typeof e=="object",niE=e=>e===!0||e===!1,tJo=e=>{if(iJo(e)!=="object")return!1;let t=v_c(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(NZp in e)&&!(rJo in e)},aiE=CGt("Date"),oiE=CGt("File"),uiE=CGt("Blob"),siE=CGt("FileList"),ciE=e=>aJo(e)&&Qoe(e.pipe),liE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Qoe(e.append)&&((t=iJo(e))==="formdata"||t==="object"&&Qoe(e.toString)&&e.toString()==="[object FormData]"))},fiE=CGt("URLSearchParams"),[diE,piE,_iE,hiE]=["ReadableStream","Request","Response","Headers"].map(CGt),yiE=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function S7a(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,n;if(typeof e!="object"&&(e=[e]),THn(e))for(i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else{let a=r?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length,l;for(i=0;i<u;i++)l=a[i],t.call(null,e[l],l,e)}}function UZp(e,t){t=t.toLowerCase();let r=Object.keys(e),i=r.length,n;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}var mrn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,VZp=e=>!w7a(e)&&e!==mrn;function y_c(){let{caseless:e}=VZp(this)&&this||{},t={},r=(i,n)=>{let a=e&&UZp(t,n)||n;tJo(t[a])&&tJo(i)?t[a]=y_c(t[a],i):tJo(i)?t[a]=y_c({},i):THn(i)?t[a]=i.slice():t[a]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&S7a(arguments[i],r);return t}var viE=(e,t,r,{allOwnKeys:i}={})=>(S7a(t,(n,a)=>{r&&Qoe(n)?e[a]=j7a(n,r):e[a]=n},{allOwnKeys:i}),e),biE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),giE=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},OiE=(e,t,r,i)=>{let n,a,u,l={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),a=n.length;a-- >0;)u=n[a],(!i||i(u,e,t))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=r!==!1&&v_c(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},miE=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let i=e.indexOf(t,r);return i!==-1&&i===r},PiE=e=>{if(!e)return null;if(THn(e))return e;let t=e.length;if(!LZp(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},jiE=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&v_c(Uint8Array)),wiE=(e,t)=>{let i=(e&&e[rJo]).call(e),n;for(;(n=i.next())&&!n.done;){let a=n.value;t.call(e,a[0],a[1])}},SiE=(e,t)=>{let r,i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},DiE=CGt("HTMLFormElement"),EiE=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,n){return i.toUpperCase()+n}),xZp=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),MiE=CGt("RegExp"),WZp=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),i={};S7a(r,(n,a)=>{let u;(u=t(n,a,e))!==!1&&(i[a]=u||n)}),Object.defineProperties(e,i)},AiE=e=>{WZp(e,(t,r)=>{if(Qoe(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let i=e[r];if(Qoe(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},qiE=(e,t)=>{let r={},i=n=>{n.forEach(a=>{r[a]=!0})};return THn(e)?i(e):i(String(e).split(t)),r},TiE=()=>{},CiE=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function BiE(e){return!!(e&&Qoe(e.append)&&e[NZp]==="FormData"&&e[rJo])}var IiE=e=>{let t=new Array(10),r=(i,n)=>{if(aJo(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[n]=i;let a=THn(i)?[]:{};return S7a(i,(u,l)=>{let d=r(u,n+1);!w7a(d)&&(a[l]=d)}),t[n]=void 0,a}}return i};return r(e,0)},ziE=CGt("AsyncFunction"),RiE=e=>e&&(aJo(e)||Qoe(e))&&Qoe(e.then)&&Qoe(e.catch),HZp=((e,t)=>e?setImmediate:t?((r,i)=>(mrn.addEventListener("message",({source:n,data:a})=>{n===mrn&&a===r&&i.length&&i.shift()()},!1),n=>{i.push(n),mrn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Qoe(mrn.postMessage)),xiE=typeof queueMicrotask<"u"?queueMicrotask.bind(mrn):typeof process<"u"&&process.nextTick||HZp,NiE=e=>e!=null&&Qoe(e[rJo]),ss={isArray:THn,isArrayBuffer:FZp,isBuffer:tiE,isFormData:liE,isArrayBufferView:riE,isString:iiE,isNumber:LZp,isBoolean:niE,isObject:aJo,isPlainObject:tJo,isReadableStream:diE,isRequest:piE,isResponse:_iE,isHeaders:hiE,isUndefined:w7a,isDate:aiE,isFile:oiE,isBlob:uiE,isRegExp:MiE,isFunction:Qoe,isStream:ciE,isURLSearchParams:fiE,isTypedArray:jiE,isFileList:siE,forEach:S7a,merge:y_c,extend:viE,trim:yiE,stripBOM:biE,inherits:giE,toFlatObject:OiE,kindOf:iJo,kindOfTest:CGt,endsWith:miE,toArray:PiE,forEachEntry:wiE,matchAll:SiE,isHTMLForm:DiE,hasOwnProperty:xZp,hasOwnProp:xZp,reduceDescriptors:WZp,freezeMethods:AiE,toObjectSet:qiE,toCamelCase:EiE,noop:TiE,toFiniteNumber:CiE,findKey:UZp,global:mrn,isContextDefined:VZp,isSpecCompliantForm:BiE,toJSONObject:IiE,isAsyncFn:ziE,isThenable:RiE,setImmediate:HZp,asap:xiE,isIterable:NiE};function CHn(e,t,r,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n,this.status=n.status?n.status:null)}ss.inherits(CHn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ss.toJSONObject(this.config),code:this.code,status:this.status}}});var $Zp=CHn.prototype,GZp={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{GZp[e]={value:e}});Object.defineProperties(CHn,GZp);Object.defineProperty($Zp,"isAxiosError",{value:!0});CHn.from=(e,t,r,i,n,a)=>{let u=Object.create($Zp);return ss.toFlatObject(e,u,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),CHn.call(u,e.message,t,r,i,n),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};var Qp=CHn;var QZp=ui(DQo(),1),oJo=QZp.default;function b_c(e){return ss.isPlainObject(e)||ss.isArray(e)}function KZp(e){return ss.endsWith(e,"[]")?e.slice(0,-2):e}function JZp(e,t,r){return e?e.concat(t).map(function(n,a){return n=KZp(n),!r&&a?"["+n+"]":n}).join(r?".":""):t}function FiE(e){return ss.isArray(e)&&!e.some(b_c)}var LiE=ss.toFlatObject(ss,{},null,function(t){return/^is[A-Z]/.test(t)});function UiE(e,t,r){if(!ss.isObject(e))throw new TypeError("target must be an object");t=t||new(oJo||FormData),r=ss.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,w){return!ss.isUndefined(w[m])});let i=r.metaTokens,n=r.visitor||o,a=r.dots,u=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&ss.isSpecCompliantForm(t);if(!ss.isFunction(n))throw new TypeError("visitor must be a function");function s(O){if(O===null)return"";if(ss.isDate(O))return O.toISOString();if(ss.isBoolean(O))return O.toString();if(!d&&ss.isBlob(O))throw new Qp("Blob is not supported. Use a Buffer instead.");return ss.isArrayBuffer(O)||ss.isTypedArray(O)?d&&typeof Blob=="function"?new Blob([O]):Buffer.from(O):O}function o(O,m,w){let E=O;if(O&&!w&&typeof O=="object"){if(ss.endsWith(m,"{}"))m=i?m:m.slice(0,-2),O=JSON.stringify(O);else if(ss.isArray(O)&&FiE(O)||(ss.isFileList(O)||ss.endsWith(m,"[]"))&&(E=ss.toArray(O)))return m=KZp(m),E.forEach(function(M,D){!(ss.isUndefined(M)||M===null)&&t.append(u===!0?JZp([m],D,a):u===null?m:m+"[]",s(M))}),!1}return b_c(O)?!0:(t.append(JZp(w,m,a),s(O)),!1)}let c=[],b=Object.assign(LiE,{defaultVisitor:o,convertValue:s,isVisitable:b_c});function g(O,m){if(!ss.isUndefined(O)){if(c.indexOf(O)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(O),ss.forEach(O,function(E,q){(!(ss.isUndefined(E)||E===null)&&n.call(t,E,ss.isString(q)?q.trim():q,m,b))===!0&&g(E,m?m.concat(q):[q])}),c.pop()}}if(!ss.isObject(e))throw new TypeError("data must be an object");return g(e),t}var ZRi=UiE;function YZp(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function XZp(e,t){this._pairs=[],e&&ZRi(e,this,t)}var ZZp=XZp.prototype;ZZp.append=function(t,r){this._pairs.push([t,r])};ZZp.toString=function(t){let r=t?function(i){return t.call(this,i,YZp)}:YZp;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var kZp=XZp;function ViE(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Prn(e,t,r){if(!t)return e;let i=r&&r.encode||ViE;ss.isFunction(r)&&(r={serialize:r});let n=r&&r.serialize,a;if(n?a=n(t,r):a=ss.isURLSearchParams(t)?t.toString():new kZp(t,r).toString(i),a){let u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var g_c=class{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ss.forEach(this.handlers,function(i){i!==null&&t(i)})}},O_c=g_c;var BHn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var ikp=ui(require("crypto"),1);var ekp=ui(require("url"),1),tkp=ekp.default.URLSearchParams;var m_c="abcdefghijklmnopqrstuvwxyz",rkp="0123456789",nkp={DIGIT:rkp,ALPHA:m_c,ALPHA_DIGIT:m_c+m_c.toUpperCase()+rkp},WiE=(e=16,t=nkp.ALPHA_DIGIT)=>{let r="",{length:i}=t,n=new Uint32Array(e);ikp.default.randomFillSync(n);for(let a=0;a<e;a++)r+=t[n[a]%i];return r},akp={isNode:!0,classes:{URLSearchParams:tkp,FormData:oJo,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:nkp,generateString:WiE,protocols:["http","https","file","data"]};var w_c={};Po(w_c,{hasBrowserEnv:()=>j_c,hasStandardBrowserEnv:()=>HiE,hasStandardBrowserWebWorkerEnv:()=>$iE,navigator:()=>P_c,origin:()=>GiE});var j_c=typeof window<"u"&&typeof document<"u",P_c=typeof navigator=="object"&&navigator||void 0,HiE=j_c&&(!P_c||["ReactNative","NativeScript","NS"].indexOf(P_c.product)<0),$iE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",GiE=j_c&&window.location.href||"http://localhost";var xA={...w_c,...akp};function S_c(e,t){return ZRi(e,new xA.classes.URLSearchParams,Object.assign({visitor:function(r,i,n,a){return xA.isNode&&ss.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function QiE(e){return ss.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function JiE(e){let t={},r=Object.keys(e),i,n=r.length,a;for(i=0;i<n;i++)a=r[i],t[a]=e[a];return t}function KiE(e){function t(r,i,n,a){let u=r[a++];if(u==="__proto__")return!0;let l=Number.isFinite(+u),d=a>=r.length;return u=!u&&ss.isArray(n)?n.length:u,d?(ss.hasOwnProp(n,u)?n[u]=[n[u],i]:n[u]=i,!l):((!n[u]||!ss.isObject(n[u]))&&(n[u]=[]),t(r,i,n[u],a)&&ss.isArray(n[u])&&(n[u]=JiE(n[u])),!l)}if(ss.isFormData(e)&&ss.isFunction(e.entries)){let r={};return ss.forEachEntry(e,(i,n)=>{t(QiE(i),n,r,0)}),r}return null}var uJo=KiE;function YiE(e,t,r){if(ss.isString(e))try{return(t||JSON.parse)(e),ss.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}var D_c={transitional:BHn,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let i=r.getContentType()||"",n=i.indexOf("application/json")>-1,a=ss.isObject(t);if(a&&ss.isHTMLForm(t)&&(t=new FormData(t)),ss.isFormData(t))return n?JSON.stringify(uJo(t)):t;if(ss.isArrayBuffer(t)||ss.isBuffer(t)||ss.isStream(t)||ss.isFile(t)||ss.isBlob(t)||ss.isReadableStream(t))return t;if(ss.isArrayBufferView(t))return t.buffer;if(ss.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return S_c(t,this.formSerializer).toString();if((l=ss.isFileList(t))||i.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return ZRi(l?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||n?(r.setContentType("application/json",!1),YiE(t)):t}],transformResponse:[function(t){let r=this.transitional||D_c.transitional,i=r&&r.forcedJSONParsing,n=this.responseType==="json";if(ss.isResponse(t)||ss.isReadableStream(t))return t;if(t&&ss.isString(t)&&(i&&!this.responseType||n)){let u=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(l){if(u)throw l.name==="SyntaxError"?Qp.from(l,Qp.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xA.classes.FormData,Blob:xA.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ss.forEach(["delete","get","head","post","put","patch"],e=>{D_c.headers[e]={}});var IHn=D_c;var XiE=ss.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),okp=e=>{let t={},r,i,n;return e&&e.split(`
|
|
1717
|
+
`);for(let l=n;l<u.length;l++){let d=u[l];if(d.length>1024)continue;let s=_Zp.test(d)?d.replace(_Zp,"$1"):d;if(!s.match(/\S*Error: /)){for(let o of r){let c=o(s);if(c){a.push(c);break}}if(a.length>=qZp)break}}return JrE(a)}}function JrE(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,qZp).map(r=>({...r,filename:r.filename||KrE(t).filename,function:r.function||TZp}))}function KrE(e){return e[e.length-1]||{}}SHn.stackParser=QrE(arE());SHn.frameModifiers=[srE];var EHn=class extends c_c{getLibraryId(){return"posthog-node"}};var ZQo=class{posthog;constructor({posthogApiKey:t}){this.posthog=new EHn(t)}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"0.66.15",usingAccessToken:!0}})}async flush(){await this.posthog.flush()}};var m7a=class{async sendEvent(){}async identify(){}async flush(){}};var AHn=require("fs/promises"),zZp=require("os"),RZp=require("path");var CZp=ui(require("crypto")),eJo=new Uint8Array(256),kQo=eJo.length;function p_c(){return kQo>eJo.length-16&&(CZp.default.randomFillSync(eJo),kQo=0),eJo.slice(kQo,kQo+=16)}var CH=[];for(let e=0;e<256;++e)CH.push((e+256).toString(16).slice(1));function BZp(e,t=0){return CH[e[t+0]]+CH[e[t+1]]+CH[e[t+2]]+CH[e[t+3]]+"-"+CH[e[t+4]]+CH[e[t+5]]+"-"+CH[e[t+6]]+CH[e[t+7]]+"-"+CH[e[t+8]]+CH[e[t+9]]+"-"+CH[e[t+10]]+CH[e[t+11]]+CH[e[t+12]]+CH[e[t+13]]+CH[e[t+14]]+CH[e[t+15]]}var IZp=ui(require("crypto")),__c={randomUUID:IZp.default.randomUUID};function YrE(e,t,r){if(__c.randomUUID&&!t&&!e)return __c.randomUUID();e=e||{};let i=e.random||(e.rng||p_c)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=i[n];return t}return BZp(i)}var Goe=YrE;var XrE="id",ZrE=".fern",P7a=class{posthog;userId;constructor({token:t,posthogApiKey:r}){this.posthog=new EHn(r),this.userId=t==null?void 0:nuc(t)}async identify(){this.userId!=null&&this.posthog.alias({distinctId:this.userId,alias:await this.getPersistedDistinctId()})}async sendEvent(t){this.posthog.capture({distinctId:this.userId??await this.getPersistedDistinctId(),event:"CLI",properties:{version:"0.66.15",...t,...t.properties}})}async flush(){await this.posthog.flush()}persistedDistinctId;async getPersistedDistinctId(){if(this.persistedDistinctId==null){let t=Eu(Fc.of((0,zZp.homedir)()),Ia.of(ZrE),Ia.of(XrE));await jf(t)||(await(0,AHn.mkdir)((0,RZp.dirname)(t),{recursive:!0}),await(0,AHn.writeFile)(t,Goe())),this.persistedDistinctId=(await(0,AHn.readFile)(t)).toString()}return this.persistedDistinctId}};var h_c;async function qHn(){return h_c==null&&(h_c=await krE()),h_c}async function krE(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||t)return new m7a;let r=await gUo();return r!=null?new P7a({token:r,posthogApiKey:e}):await AVn()!=null?new ZQo({posthogApiKey:e}):new P7a({token:void 0,posthogApiKey:e})}catch{return new m7a}}function j7a(e,t){return function(){return e.apply(t,arguments)}}var{toString:eiE}=Object.prototype,{getPrototypeOf:v_c}=Object,{iterator:rJo,toStringTag:NZp}=Symbol,iJo=(e=>t=>{let r=eiE.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),CGt=e=>(e=e.toLowerCase(),t=>iJo(t)===e),nJo=e=>t=>typeof t===e,{isArray:THn}=Array,w7a=nJo("undefined");function tiE(e){return e!==null&&!w7a(e)&&e.constructor!==null&&!w7a(e.constructor)&&Qoe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var FZp=CGt("ArrayBuffer");function riE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&FZp(e.buffer),t}var iiE=nJo("string"),Qoe=nJo("function"),LZp=nJo("number"),aJo=e=>e!==null&&typeof e=="object",niE=e=>e===!0||e===!1,tJo=e=>{if(iJo(e)!=="object")return!1;let t=v_c(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(NZp in e)&&!(rJo in e)},aiE=CGt("Date"),oiE=CGt("File"),uiE=CGt("Blob"),siE=CGt("FileList"),ciE=e=>aJo(e)&&Qoe(e.pipe),liE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Qoe(e.append)&&((t=iJo(e))==="formdata"||t==="object"&&Qoe(e.toString)&&e.toString()==="[object FormData]"))},fiE=CGt("URLSearchParams"),[diE,piE,_iE,hiE]=["ReadableStream","Request","Response","Headers"].map(CGt),yiE=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function S7a(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,n;if(typeof e!="object"&&(e=[e]),THn(e))for(i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else{let a=r?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length,l;for(i=0;i<u;i++)l=a[i],t.call(null,e[l],l,e)}}function UZp(e,t){t=t.toLowerCase();let r=Object.keys(e),i=r.length,n;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}var mrn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,VZp=e=>!w7a(e)&&e!==mrn;function y_c(){let{caseless:e}=VZp(this)&&this||{},t={},r=(i,n)=>{let a=e&&UZp(t,n)||n;tJo(t[a])&&tJo(i)?t[a]=y_c(t[a],i):tJo(i)?t[a]=y_c({},i):THn(i)?t[a]=i.slice():t[a]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&S7a(arguments[i],r);return t}var viE=(e,t,r,{allOwnKeys:i}={})=>(S7a(t,(n,a)=>{r&&Qoe(n)?e[a]=j7a(n,r):e[a]=n},{allOwnKeys:i}),e),biE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),giE=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},OiE=(e,t,r,i)=>{let n,a,u,l={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),a=n.length;a-- >0;)u=n[a],(!i||i(u,e,t))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=r!==!1&&v_c(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},miE=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let i=e.indexOf(t,r);return i!==-1&&i===r},PiE=e=>{if(!e)return null;if(THn(e))return e;let t=e.length;if(!LZp(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},jiE=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&v_c(Uint8Array)),wiE=(e,t)=>{let i=(e&&e[rJo]).call(e),n;for(;(n=i.next())&&!n.done;){let a=n.value;t.call(e,a[0],a[1])}},SiE=(e,t)=>{let r,i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},DiE=CGt("HTMLFormElement"),EiE=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,n){return i.toUpperCase()+n}),xZp=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),MiE=CGt("RegExp"),WZp=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),i={};S7a(r,(n,a)=>{let u;(u=t(n,a,e))!==!1&&(i[a]=u||n)}),Object.defineProperties(e,i)},AiE=e=>{WZp(e,(t,r)=>{if(Qoe(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let i=e[r];if(Qoe(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},qiE=(e,t)=>{let r={},i=n=>{n.forEach(a=>{r[a]=!0})};return THn(e)?i(e):i(String(e).split(t)),r},TiE=()=>{},CiE=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function BiE(e){return!!(e&&Qoe(e.append)&&e[NZp]==="FormData"&&e[rJo])}var IiE=e=>{let t=new Array(10),r=(i,n)=>{if(aJo(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[n]=i;let a=THn(i)?[]:{};return S7a(i,(u,l)=>{let d=r(u,n+1);!w7a(d)&&(a[l]=d)}),t[n]=void 0,a}}return i};return r(e,0)},ziE=CGt("AsyncFunction"),RiE=e=>e&&(aJo(e)||Qoe(e))&&Qoe(e.then)&&Qoe(e.catch),HZp=((e,t)=>e?setImmediate:t?((r,i)=>(mrn.addEventListener("message",({source:n,data:a})=>{n===mrn&&a===r&&i.length&&i.shift()()},!1),n=>{i.push(n),mrn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Qoe(mrn.postMessage)),xiE=typeof queueMicrotask<"u"?queueMicrotask.bind(mrn):typeof process<"u"&&process.nextTick||HZp,NiE=e=>e!=null&&Qoe(e[rJo]),ss={isArray:THn,isArrayBuffer:FZp,isBuffer:tiE,isFormData:liE,isArrayBufferView:riE,isString:iiE,isNumber:LZp,isBoolean:niE,isObject:aJo,isPlainObject:tJo,isReadableStream:diE,isRequest:piE,isResponse:_iE,isHeaders:hiE,isUndefined:w7a,isDate:aiE,isFile:oiE,isBlob:uiE,isRegExp:MiE,isFunction:Qoe,isStream:ciE,isURLSearchParams:fiE,isTypedArray:jiE,isFileList:siE,forEach:S7a,merge:y_c,extend:viE,trim:yiE,stripBOM:biE,inherits:giE,toFlatObject:OiE,kindOf:iJo,kindOfTest:CGt,endsWith:miE,toArray:PiE,forEachEntry:wiE,matchAll:SiE,isHTMLForm:DiE,hasOwnProperty:xZp,hasOwnProp:xZp,reduceDescriptors:WZp,freezeMethods:AiE,toObjectSet:qiE,toCamelCase:EiE,noop:TiE,toFiniteNumber:CiE,findKey:UZp,global:mrn,isContextDefined:VZp,isSpecCompliantForm:BiE,toJSONObject:IiE,isAsyncFn:ziE,isThenable:RiE,setImmediate:HZp,asap:xiE,isIterable:NiE};function CHn(e,t,r,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n,this.status=n.status?n.status:null)}ss.inherits(CHn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ss.toJSONObject(this.config),code:this.code,status:this.status}}});var $Zp=CHn.prototype,GZp={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{GZp[e]={value:e}});Object.defineProperties(CHn,GZp);Object.defineProperty($Zp,"isAxiosError",{value:!0});CHn.from=(e,t,r,i,n,a)=>{let u=Object.create($Zp);return ss.toFlatObject(e,u,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),CHn.call(u,e.message,t,r,i,n),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};var Qp=CHn;var QZp=ui(DQo(),1),oJo=QZp.default;function b_c(e){return ss.isPlainObject(e)||ss.isArray(e)}function KZp(e){return ss.endsWith(e,"[]")?e.slice(0,-2):e}function JZp(e,t,r){return e?e.concat(t).map(function(n,a){return n=KZp(n),!r&&a?"["+n+"]":n}).join(r?".":""):t}function FiE(e){return ss.isArray(e)&&!e.some(b_c)}var LiE=ss.toFlatObject(ss,{},null,function(t){return/^is[A-Z]/.test(t)});function UiE(e,t,r){if(!ss.isObject(e))throw new TypeError("target must be an object");t=t||new(oJo||FormData),r=ss.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,w){return!ss.isUndefined(w[m])});let i=r.metaTokens,n=r.visitor||o,a=r.dots,u=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&ss.isSpecCompliantForm(t);if(!ss.isFunction(n))throw new TypeError("visitor must be a function");function s(O){if(O===null)return"";if(ss.isDate(O))return O.toISOString();if(ss.isBoolean(O))return O.toString();if(!d&&ss.isBlob(O))throw new Qp("Blob is not supported. Use a Buffer instead.");return ss.isArrayBuffer(O)||ss.isTypedArray(O)?d&&typeof Blob=="function"?new Blob([O]):Buffer.from(O):O}function o(O,m,w){let E=O;if(O&&!w&&typeof O=="object"){if(ss.endsWith(m,"{}"))m=i?m:m.slice(0,-2),O=JSON.stringify(O);else if(ss.isArray(O)&&FiE(O)||(ss.isFileList(O)||ss.endsWith(m,"[]"))&&(E=ss.toArray(O)))return m=KZp(m),E.forEach(function(M,D){!(ss.isUndefined(M)||M===null)&&t.append(u===!0?JZp([m],D,a):u===null?m:m+"[]",s(M))}),!1}return b_c(O)?!0:(t.append(JZp(w,m,a),s(O)),!1)}let c=[],b=Object.assign(LiE,{defaultVisitor:o,convertValue:s,isVisitable:b_c});function g(O,m){if(!ss.isUndefined(O)){if(c.indexOf(O)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(O),ss.forEach(O,function(E,q){(!(ss.isUndefined(E)||E===null)&&n.call(t,E,ss.isString(q)?q.trim():q,m,b))===!0&&g(E,m?m.concat(q):[q])}),c.pop()}}if(!ss.isObject(e))throw new TypeError("data must be an object");return g(e),t}var ZRi=UiE;function YZp(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function XZp(e,t){this._pairs=[],e&&ZRi(e,this,t)}var ZZp=XZp.prototype;ZZp.append=function(t,r){this._pairs.push([t,r])};ZZp.toString=function(t){let r=t?function(i){return t.call(this,i,YZp)}:YZp;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var kZp=XZp;function ViE(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Prn(e,t,r){if(!t)return e;let i=r&&r.encode||ViE;ss.isFunction(r)&&(r={serialize:r});let n=r&&r.serialize,a;if(n?a=n(t,r):a=ss.isURLSearchParams(t)?t.toString():new kZp(t,r).toString(i),a){let u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var g_c=class{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ss.forEach(this.handlers,function(i){i!==null&&t(i)})}},O_c=g_c;var BHn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var ikp=ui(require("crypto"),1);var ekp=ui(require("url"),1),tkp=ekp.default.URLSearchParams;var m_c="abcdefghijklmnopqrstuvwxyz",rkp="0123456789",nkp={DIGIT:rkp,ALPHA:m_c,ALPHA_DIGIT:m_c+m_c.toUpperCase()+rkp},WiE=(e=16,t=nkp.ALPHA_DIGIT)=>{let r="",{length:i}=t,n=new Uint32Array(e);ikp.default.randomFillSync(n);for(let a=0;a<e;a++)r+=t[n[a]%i];return r},akp={isNode:!0,classes:{URLSearchParams:tkp,FormData:oJo,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:nkp,generateString:WiE,protocols:["http","https","file","data"]};var w_c={};Po(w_c,{hasBrowserEnv:()=>j_c,hasStandardBrowserEnv:()=>HiE,hasStandardBrowserWebWorkerEnv:()=>$iE,navigator:()=>P_c,origin:()=>GiE});var j_c=typeof window<"u"&&typeof document<"u",P_c=typeof navigator=="object"&&navigator||void 0,HiE=j_c&&(!P_c||["ReactNative","NativeScript","NS"].indexOf(P_c.product)<0),$iE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",GiE=j_c&&window.location.href||"http://localhost";var xA={...w_c,...akp};function S_c(e,t){return ZRi(e,new xA.classes.URLSearchParams,Object.assign({visitor:function(r,i,n,a){return xA.isNode&&ss.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function QiE(e){return ss.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function JiE(e){let t={},r=Object.keys(e),i,n=r.length,a;for(i=0;i<n;i++)a=r[i],t[a]=e[a];return t}function KiE(e){function t(r,i,n,a){let u=r[a++];if(u==="__proto__")return!0;let l=Number.isFinite(+u),d=a>=r.length;return u=!u&&ss.isArray(n)?n.length:u,d?(ss.hasOwnProp(n,u)?n[u]=[n[u],i]:n[u]=i,!l):((!n[u]||!ss.isObject(n[u]))&&(n[u]=[]),t(r,i,n[u],a)&&ss.isArray(n[u])&&(n[u]=JiE(n[u])),!l)}if(ss.isFormData(e)&&ss.isFunction(e.entries)){let r={};return ss.forEachEntry(e,(i,n)=>{t(QiE(i),n,r,0)}),r}return null}var uJo=KiE;function YiE(e,t,r){if(ss.isString(e))try{return(t||JSON.parse)(e),ss.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}var D_c={transitional:BHn,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let i=r.getContentType()||"",n=i.indexOf("application/json")>-1,a=ss.isObject(t);if(a&&ss.isHTMLForm(t)&&(t=new FormData(t)),ss.isFormData(t))return n?JSON.stringify(uJo(t)):t;if(ss.isArrayBuffer(t)||ss.isBuffer(t)||ss.isStream(t)||ss.isFile(t)||ss.isBlob(t)||ss.isReadableStream(t))return t;if(ss.isArrayBufferView(t))return t.buffer;if(ss.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return S_c(t,this.formSerializer).toString();if((l=ss.isFileList(t))||i.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return ZRi(l?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||n?(r.setContentType("application/json",!1),YiE(t)):t}],transformResponse:[function(t){let r=this.transitional||D_c.transitional,i=r&&r.forcedJSONParsing,n=this.responseType==="json";if(ss.isResponse(t)||ss.isReadableStream(t))return t;if(t&&ss.isString(t)&&(i&&!this.responseType||n)){let u=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(l){if(u)throw l.name==="SyntaxError"?Qp.from(l,Qp.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xA.classes.FormData,Blob:xA.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ss.forEach(["delete","get","head","post","put","patch"],e=>{D_c.headers[e]={}});var IHn=D_c;var XiE=ss.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),okp=e=>{let t={},r,i,n;return e&&e.split(`
|
|
1718
1718
|
`).forEach(function(u){n=u.indexOf(":"),r=u.substring(0,n).trim().toLowerCase(),i=u.substring(n+1).trim(),!(!r||t[r]&&XiE[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t};var ukp=Symbol("internals");function D7a(e){return e&&String(e).trim().toLowerCase()}function sJo(e){return e===!1||e==null?e:ss.isArray(e)?e.map(sJo):String(e)}function ZiE(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}var kiE=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function E_c(e,t,r,i,n){if(ss.isFunction(i))return i.call(this,t,r);if(n&&(t=r),!!ss.isString(t)){if(ss.isString(i))return t.indexOf(i)!==-1;if(ss.isRegExp(i))return i.test(t)}}function enE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function tnE(e,t){let r=ss.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(n,a,u){return this[i].call(this,t,n,a,u)},configurable:!0})})}var zHn=class{constructor(t){t&&this.set(t)}set(t,r,i){let n=this;function a(l,d,s){let o=D7a(d);if(!o)throw new Error("header name must be a non-empty string");let c=ss.findKey(n,o);(!c||n[c]===void 0||s===!0||s===void 0&&n[c]!==!1)&&(n[c||d]=sJo(l))}let u=(l,d)=>ss.forEach(l,(s,o)=>a(s,o,d));if(ss.isPlainObject(t)||t instanceof this.constructor)u(t,r);else if(ss.isString(t)&&(t=t.trim())&&!kiE(t))u(okp(t),r);else if(ss.isObject(t)&&ss.isIterable(t)){let l={},d,s;for(let o of t){if(!ss.isArray(o))throw TypeError("Object iterator must return a key-value pair");l[s=o[0]]=(d=l[s])?ss.isArray(d)?[...d,o[1]]:[d,o[1]]:o[1]}u(l,r)}else t!=null&&a(r,t,i);return this}get(t,r){if(t=D7a(t),t){let i=ss.findKey(this,t);if(i){let n=this[i];if(!r)return n;if(r===!0)return ZiE(n);if(ss.isFunction(r))return r.call(this,n,i);if(ss.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=D7a(t),t){let i=ss.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||E_c(this,this[i],i,r)))}return!1}delete(t,r){let i=this,n=!1;function a(u){if(u=D7a(u),u){let l=ss.findKey(i,u);l&&(!r||E_c(i,i[l],l,r))&&(delete i[l],n=!0)}}return ss.isArray(t)?t.forEach(a):a(t),n}clear(t){let r=Object.keys(this),i=r.length,n=!1;for(;i--;){let a=r[i];(!t||E_c(this,this[a],a,t,!0))&&(delete this[a],n=!0)}return n}normalize(t){let r=this,i={};return ss.forEach(this,(n,a)=>{let u=ss.findKey(i,a);if(u){r[u]=sJo(n),delete r[a];return}let l=t?enE(a):String(a).trim();l!==a&&delete r[a],r[l]=sJo(n),i[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return ss.forEach(this,(i,n)=>{i!=null&&i!==!1&&(r[n]=t&&ss.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
1719
1719
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let i=new this(t);return r.forEach(n=>i.set(n)),i}static accessor(t){let i=(this[ukp]=this[ukp]={accessors:{}}).accessors,n=this.prototype;function a(u){let l=D7a(u);i[l]||(tnE(n,u),i[l]=!0)}return ss.isArray(t)?t.forEach(a):a(t),this}};zHn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ss.reduceDescriptors(zHn.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});ss.freezeMethods(zHn);var Kx=zHn;function E7a(e,t){let r=this||IHn,i=t||r,n=Kx.from(i.headers),a=i.data;return ss.forEach(e,function(l){a=l.call(r,a,n.normalize(),t?t.status:void 0)}),n.normalize(),a}function M7a(e){return!!(e&&e.__CANCEL__)}function skp(e,t,r){Qp.call(this,e??"canceled",Qp.ERR_CANCELED,t,r),this.name="CanceledError"}ss.inherits(skp,Qp,{__CANCEL__:!0});var qAe=skp;function Sar(e,t,r){let i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new Qp("Request failed with status code "+r.status,[Qp.ERR_BAD_REQUEST,Qp.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function M_c(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function A_c(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function jrn(e,t,r){let i=!M_c(t);return e&&(i||r==!1)?A_c(e,t):t}var wkp=ui(l7a(),1),Skp=ui(require("http"),1),Dkp=ui(require("https"),1),Ekp=ui(require("util"),1),Mkp=ui(Apc(),1),XOi=ui(require("zlib"),1);var wrn="1.10.0";function A7a(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var rnE=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function q_c(e,t,r){let i=r&&r.Blob||xA.classes.Blob,n=A7a(e);if(t===void 0&&i&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;let a=rnE.exec(e);if(!a)throw new Qp("Invalid URL",Qp.ERR_INVALID_URL);let u=a[1],l=a[2],d=a[3],s=Buffer.from(decodeURIComponent(d),l?"base64":"utf8");if(t){if(!i)throw new Qp("Blob is not supported",Qp.ERR_NOT_SUPPORT);return new i([s],{type:u})}return s}throw new Qp("Unsupported protocol "+n,Qp.ERR_NOT_SUPPORT)}var Drn=ui(require("stream"),1);var ckp=ui(require("stream"),1);var T_c=Symbol("internals"),C_c=class extends ckp.default.Transform{constructor(t){t=ss.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,n)=>!ss.isUndefined(n[i])),super({readableHighWaterMark:t.chunkSize});let r=this[T_c]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",i=>{i==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(t){let r=this[T_c];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,i){let n=this[T_c],a=n.maxRate,u=this.readableHighWaterMark,l=n.timeWindow,d=1e3/l,s=a/d,o=n.minChunkSize!==!1?Math.max(n.minChunkSize,s*.01):0,c=(g,O)=>{let m=Buffer.byteLength(g);n.bytesSeen+=m,n.bytes+=m,n.isCaptured&&this.emit("progress",n.bytesSeen),this.push(g)?process.nextTick(O):n.onReadCallback=()=>{n.onReadCallback=null,process.nextTick(O)}},b=(g,O)=>{let m=Buffer.byteLength(g),w=null,E=u,q,M=0;if(a){let D=Date.now();(!n.ts||(M=D-n.ts)>=l)&&(n.ts=D,q=s-n.bytes,n.bytes=q<0?-q:0,M=0),q=s-n.bytes}if(a){if(q<=0)return setTimeout(()=>{O(null,g)},l-M);q<E&&(E=q)}E&&m>E&&m-E>o&&(w=g.subarray(E),g=g.subarray(0,E)),c(g,w?()=>{process.nextTick(O,null,w)}:O)};b(t,function g(O,m){if(O)return i(O);m?b(m,g):i(null)})}},B_c=C_c;var Akp=require("events");var fkp=ui(require("util"),1),dkp=require("stream");var{asyncIterator:lkp}=Symbol,inE=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[lkp]?yield*e[lkp]():yield e},cJo=inE;var nnE=xA.ALPHABET.ALPHA_DIGIT+"-_",q7a=typeof TextEncoder=="function"?new TextEncoder:new fkp.default.TextEncoder,Srn=`\r
|
|
1720
1720
|
`,anE=q7a.encode(Srn),onE=2,I_c=class{constructor(t,r){let{escapeName:i}=this.constructor,n=ss.isString(r),a=`Content-Disposition: form-data; name="${i(t)}"${!n&&r.name?`; filename="${i(r.name)}"`:""}${Srn}`;n?r=q7a.encode(String(r).replace(/\r?\n|\r\n?/g,Srn)):a+=`Content-Type: ${r.type||"application/octet-stream"}${Srn}`,this.headers=q7a.encode(a+Srn),this.contentLength=n?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+onE,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;ss.isTypedArray(t)?yield t:yield*cJo(t),yield anE}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},unE=(e,t,r)=>{let{tag:i="form-data-boundary",size:n=25,boundary:a=i+"-"+xA.generateString(n,nnE)}=r||{};if(!ss.isFormData(e))throw TypeError("FormData instance required");if(a.length<1||a.length>70)throw Error("boundary must be 10-70 characters long");let u=q7a.encode("--"+a+Srn),l=q7a.encode("--"+a+"--"+Srn),d=l.byteLength,s=Array.from(e.entries()).map(([c,b])=>{let g=new I_c(c,b);return d+=g.size,g});d+=u.byteLength*s.length,d=ss.toFiniteNumber(d);let o={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(d)&&(o["Content-Length"]=d),t&&t(o),dkp.Readable.from(async function*(){for(let c of s)yield u,yield*c.encode();yield l}())},pkp=unE;var _kp=ui(require("stream"),1),z_c=class extends _kp.default.Transform{__transform(t,r,i){this.push(t),i()}_transform(t,r,i){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let n=Buffer.alloc(2);n[0]=120,n[1]=156,this.push(n,r)}this.__transform(t,r,i)}},hkp=z_c;var snE=(e,t)=>ss.isAsyncFn(e)?function(...r){let i=r.pop();e.apply(this,r).then(n=>{try{t?i(null,...t(n)):i(null,n)}catch(a){i(a)}},i)}:e,ykp=snE;function cnE(e,t){e=e||10;let r=new Array(e),i=new Array(e),n=0,a=0,u;return t=t!==void 0?t:1e3,function(d){let s=Date.now(),o=i[a];u||(u=s),r[n]=d,i[n]=s;let c=a,b=0;for(;c!==n;)b+=r[c++],c=c%e;if(n=(n+1)%e,n===a&&(a=(a+1)%e),s-u<t)return;let g=o&&s-o;return g?Math.round(b*1e3/g):void 0}}var vkp=cnE;function lnE(e,t){let r=0,i=1e3/t,n,a,u=(s,o=Date.now())=>{r=o,n=null,a&&(clearTimeout(a),a=null),e.apply(null,s)};return[(...s)=>{let o=Date.now(),c=o-r;c>=i?u(s,o):(n=s,a||(a=setTimeout(()=>{a=null,u(n)},i-c)))},()=>n&&u(n)]}var bkp=lnE;var YOi=(e,t,r=3)=>{let i=0,n=vkp(50,250);return bkp(a=>{let u=a.loaded,l=a.lengthComputable?a.total:void 0,d=u-i,s=n(d),o=u<=l;i=u;let c={loaded:u,total:l,progress:l?u/l:void 0,bytes:d,rate:s||void 0,estimated:s&&l&&o?(l-u)/s:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(c)},r)},RHn=(e,t)=>{let r=e!=null;return[i=>t[0]({lengthComputable:r,total:e,loaded:i}),t[1]]},xHn=e=>(...t)=>ss.asap(()=>e(...t));var gkp={flush:XOi.default.constants.Z_SYNC_FLUSH,finishFlush:XOi.default.constants.Z_SYNC_FLUSH},fnE={flush:XOi.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:XOi.default.constants.BROTLI_OPERATION_FLUSH},Okp=ss.isFunction(XOi.default.createBrotliDecompress),{http:dnE,https:pnE}=Mkp.default,_nE=/https:?/,mkp=xA.protocols.map(e=>e+":"),Pkp=(e,[t,r])=>(e.on("end",r).on("error",r),t);function hnE(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function qkp(e,t,r){let i=t;if(!i&&i!==!1){let n=wkp.default.getProxyForUrl(r);n&&(i=new URL(n))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));let a=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+a}e.headers.host=e.hostname+(e.port?":"+e.port:"");let n=i.hostname||i.host;e.hostname=n,e.host=n,e.port=i.port,e.path=r,i.protocol&&(e.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}e.beforeRedirects.proxy=function(a){qkp(a,t,a.href)}}var ynE=typeof process<"u"&&ss.kindOf(process)==="process",vnE=e=>new Promise((t,r)=>{let i,n,a=(d,s)=>{n||(n=!0,i&&i(d,s))},u=d=>{a(d),t(d)},l=d=>{a(d,!0),r(d)};e(u,l,d=>i=d).catch(l)}),bnE=({address:e,family:t})=>{if(!ss.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},jkp=(e,t)=>bnE(ss.isObject(e)?e:{address:e,family:t}),Tkp=ynE&&function(t){return vnE(async function(i,n,a){let{data:u,lookup:l,family:d}=t,{responseType:s,responseEncoding:o}=t,c=t.method.toUpperCase(),b,g=!1,O;if(l){let Oe=ykp(l,Ue=>ss.isArray(Ue)?Ue:[Ue]);l=(Ue,bt,De)=>{Oe(Ue,bt,(Te,Rt,Pe)=>{if(Te)return De(Te);let ot=ss.isArray(Rt)?Rt.map(at=>jkp(at)):[jkp(Rt,Pe)];bt.all?De(Te,ot):De(Te,ot[0].address,ot[0].family)})}}let m=new Akp.EventEmitter,w=()=>{t.cancelToken&&t.cancelToken.unsubscribe(E),t.signal&&t.signal.removeEventListener("abort",E),m.removeAllListeners()};a((Oe,Ue)=>{b=!0,Ue&&(g=!0,w())});function E(Oe){m.emit("abort",!Oe||Oe.type?new qAe(null,t,O):Oe)}m.once("abort",n),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(E),t.signal&&(t.signal.aborted?E():t.signal.addEventListener("abort",E)));let q=jrn(t.baseURL,t.url,t.allowAbsoluteUrls),M=new URL(q,xA.hasBrowserEnv?xA.origin:void 0),D=M.protocol||mkp[0];if(D==="data:"){let Oe;if(c!=="GET")return Sar(i,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{Oe=q_c(t.url,s==="blob",{Blob:t.env&&t.env.Blob})}catch(Ue){throw Qp.from(Ue,Qp.ERR_BAD_REQUEST,t)}return s==="text"?(Oe=Oe.toString(o),(!o||o==="utf8")&&(Oe=ss.stripBOM(Oe))):s==="stream"&&(Oe=Drn.default.Readable.from(Oe)),Sar(i,n,{data:Oe,status:200,statusText:"OK",headers:new Kx,config:t})}if(mkp.indexOf(D)===-1)return n(new Qp("Unsupported protocol "+D,Qp.ERR_BAD_REQUEST,t));let C=Kx.from(t.headers).normalize();C.set("User-Agent","axios/"+wrn,!1);let{onUploadProgress:R,onDownloadProgress:G}=t,I=t.maxRate,F,V;if(ss.isSpecCompliantForm(u)){let Oe=C.getContentType(/boundary=([-_\w\d]{10,70})/i);u=pkp(u,Ue=>{C.set(Ue)},{tag:`axios-${wrn}-boundary`,boundary:Oe&&Oe[1]||void 0})}else if(ss.isFormData(u)&&ss.isFunction(u.getHeaders)){if(C.set(u.getHeaders()),!C.hasContentLength())try{let Oe=await Ekp.default.promisify(u.getLength).call(u);Number.isFinite(Oe)&&Oe>=0&&C.setContentLength(Oe)}catch{}}else if(ss.isBlob(u)||ss.isFile(u))u.size&&C.setContentType(u.type||"application/octet-stream"),C.setContentLength(u.size||0),u=Drn.default.Readable.from(cJo(u));else if(u&&!ss.isStream(u)){if(!Buffer.isBuffer(u))if(ss.isArrayBuffer(u))u=Buffer.from(new Uint8Array(u));else if(ss.isString(u))u=Buffer.from(u,"utf-8");else return n(new Qp("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Qp.ERR_BAD_REQUEST,t));if(C.setContentLength(u.length,!1),t.maxBodyLength>-1&&u.length>t.maxBodyLength)return n(new Qp("Request body larger than maxBodyLength limit",Qp.ERR_BAD_REQUEST,t))}let X=ss.toFiniteNumber(C.getContentLength());ss.isArray(I)?(F=I[0],V=I[1]):F=V=I,u&&(R||F)&&(ss.isStream(u)||(u=Drn.default.Readable.from(u,{objectMode:!1})),u=Drn.default.pipeline([u,new B_c({maxRate:ss.toFiniteNumber(F)})],ss.noop),R&&u.on("progress",Pkp(u,RHn(X,YOi(xHn(R),!1,3)))));let K;if(t.auth){let Oe=t.auth.username||"",Ue=t.auth.password||"";K=Oe+":"+Ue}if(!K&&M.username){let Oe=M.username,Ue=M.password;K=Oe+":"+Ue}K&&C.delete("authorization");let Y;try{Y=Prn(M.pathname+M.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(Oe){let Ue=new Error(Oe.message);return Ue.config=t,Ue.url=t.url,Ue.exists=!0,n(Ue)}C.set("Accept-Encoding","gzip, compress, deflate"+(Okp?", br":""),!1);let oe={path:Y,method:c,headers:C.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:K,protocol:D,family:d,beforeRedirect:hnE,beforeRedirects:{}};!ss.isUndefined(l)&&(oe.lookup=l),t.socketPath?oe.socketPath=t.socketPath:(oe.hostname=M.hostname.startsWith("[")?M.hostname.slice(1,-1):M.hostname,oe.port=M.port,qkp(oe,t.proxy,D+"//"+M.hostname+(M.port?":"+M.port:"")+oe.path));let pe,de=_nE.test(oe.protocol);if(oe.agent=de?t.httpsAgent:t.httpAgent,t.transport?pe=t.transport:t.maxRedirects===0?pe=de?Dkp.default:Skp.default:(t.maxRedirects&&(oe.maxRedirects=t.maxRedirects),t.beforeRedirect&&(oe.beforeRedirects.config=t.beforeRedirect),pe=de?pnE:dnE),t.maxBodyLength>-1?oe.maxBodyLength=t.maxBodyLength:oe.maxBodyLength=1/0,t.insecureHTTPParser&&(oe.insecureHTTPParser=t.insecureHTTPParser),O=pe.request(oe,function(Ue){if(O.destroyed)return;let bt=[Ue],De=+Ue.headers["content-length"];if(G||V){let at=new B_c({maxRate:ss.toFiniteNumber(V)});G&&at.on("progress",Pkp(at,RHn(De,YOi(xHn(G),!0,3)))),bt.push(at)}let Te=Ue,Rt=Ue.req||O;if(t.decompress!==!1&&Ue.headers["content-encoding"])switch((c==="HEAD"||Ue.statusCode===204)&&delete Ue.headers["content-encoding"],(Ue.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":bt.push(XOi.default.createUnzip(gkp)),delete Ue.headers["content-encoding"];break;case"deflate":bt.push(new hkp),bt.push(XOi.default.createUnzip(gkp)),delete Ue.headers["content-encoding"];break;case"br":Okp&&(bt.push(XOi.default.createBrotliDecompress(fnE)),delete Ue.headers["content-encoding"])}Te=bt.length>1?Drn.default.pipeline(bt,ss.noop):bt[0];let Pe=Drn.default.finished(Te,()=>{Pe(),w()}),ot={status:Ue.statusCode,statusText:Ue.statusMessage,headers:new Kx(Ue.headers),config:t,request:Rt};if(s==="stream")ot.data=Te,Sar(i,n,ot);else{let at=[],me=0;Te.on("data",function(wt){at.push(wt),me+=wt.length,t.maxContentLength>-1&&me>t.maxContentLength&&(g=!0,Te.destroy(),n(new Qp("maxContentLength size of "+t.maxContentLength+" exceeded",Qp.ERR_BAD_RESPONSE,t,Rt)))}),Te.on("aborted",function(){if(g)return;let wt=new Qp("stream has been aborted",Qp.ERR_BAD_RESPONSE,t,Rt);Te.destroy(wt),n(wt)}),Te.on("error",function(wt){O.destroyed||n(Qp.from(wt,null,t,Rt))}),Te.on("end",function(){try{let wt=at.length===1?at[0]:Buffer.concat(at);s!=="arraybuffer"&&(wt=wt.toString(o),(!o||o==="utf8")&&(wt=ss.stripBOM(wt))),ot.data=wt}catch(wt){return n(Qp.from(wt,null,t,ot.request,ot))}Sar(i,n,ot)})}m.once("abort",at=>{Te.destroyed||(Te.emit("error",at),Te.destroy())})}),m.once("abort",Oe=>{n(Oe),O.destroy(Oe)}),O.on("error",function(Ue){n(Qp.from(Ue,null,t,O))}),O.on("socket",function(Ue){Ue.setKeepAlive(!0,1e3*60)}),t.timeout){let Oe=parseInt(t.timeout,10);if(Number.isNaN(Oe)){n(new Qp("error trying to parse `config.timeout` to int",Qp.ERR_BAD_OPTION_VALUE,t,O));return}O.setTimeout(Oe,function(){if(b)return;let bt=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",De=t.transitional||BHn;t.timeoutErrorMessage&&(bt=t.timeoutErrorMessage),n(new Qp(bt,De.clarifyTimeoutError?Qp.ETIMEDOUT:Qp.ECONNABORTED,t,O)),E()})}if(ss.isStream(u)){let Oe=!1,Ue=!1;u.on("end",()=>{Oe=!0}),u.once("error",bt=>{Ue=!0,O.destroy(bt)}),u.on("close",()=>{!Oe&&!Ue&&E(new qAe("Request stream has been aborted",t,O))}),u.pipe(O)}else O.end(u)})};var Ckp=xA.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,xA.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(xA.origin),xA.navigator&&/(msie|trident)/i.test(xA.navigator.userAgent)):()=>!0;var Bkp=xA.hasStandardBrowserEnv?{write(e,t,r,i,n,a){let u=[e+"="+encodeURIComponent(t)];ss.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),ss.isString(i)&&u.push("path="+i),ss.isString(n)&&u.push("domain="+n),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var Ikp=e=>e instanceof Kx?{...e}:e;function BGt(e,t){t=t||{};let r={};function i(s,o,c,b){return ss.isPlainObject(s)&&ss.isPlainObject(o)?ss.merge.call({caseless:b},s,o):ss.isPlainObject(o)?ss.merge({},o):ss.isArray(o)?o.slice():o}function n(s,o,c,b){if(ss.isUndefined(o)){if(!ss.isUndefined(s))return i(void 0,s,c,b)}else return i(s,o,c,b)}function a(s,o){if(!ss.isUndefined(o))return i(void 0,o)}function u(s,o){if(ss.isUndefined(o)){if(!ss.isUndefined(s))return i(void 0,s)}else return i(void 0,o)}function l(s,o,c){if(c in t)return i(s,o);if(c in e)return i(void 0,s)}let d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:l,headers:(s,o,c)=>n(Ikp(s),Ikp(o),c,!0)};return ss.forEach(Object.keys(Object.assign({},e,t)),function(o){let c=d[o]||n,b=c(e[o],t[o],o);ss.isUndefined(b)&&c!==l||(r[o]=b)}),r}var lJo=e=>{let t=BGt({},e),{data:r,withXSRFToken:i,xsrfHeaderName:n,xsrfCookieName:a,headers:u,auth:l}=t;t.headers=u=Kx.from(u),t.url=Prn(jrn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&u.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(ss.isFormData(r)){if(xA.hasStandardBrowserEnv||xA.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if((d=u.getContentType())!==!1){let[s,...o]=d?d.split(";").map(c=>c.trim()).filter(Boolean):[];u.setContentType([s||"multipart/form-data",...o].join("; "))}}if(xA.hasStandardBrowserEnv&&(i&&ss.isFunction(i)&&(i=i(t)),i||i!==!1&&Ckp(t.url))){let s=n&&a&&Bkp.read(a);s&&u.set(n,s)}return t};var gnE=typeof XMLHttpRequest<"u",zkp=gnE&&function(e){return new Promise(function(r,i){let n=lJo(e),a=n.data,u=Kx.from(n.headers).normalize(),{responseType:l,onUploadProgress:d,onDownloadProgress:s}=n,o,c,b,g,O;function m(){g&&g(),O&&O(),n.cancelToken&&n.cancelToken.unsubscribe(o),n.signal&&n.signal.removeEventListener("abort",o)}let w=new XMLHttpRequest;w.open(n.method.toUpperCase(),n.url,!0),w.timeout=n.timeout;function E(){if(!w)return;let M=Kx.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),C={data:!l||l==="text"||l==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:M,config:e,request:w};Sar(function(G){r(G),m()},function(G){i(G),m()},C),w=null}"onloadend"in w?w.onloadend=E:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(E)},w.onabort=function(){w&&(i(new Qp("Request aborted",Qp.ECONNABORTED,e,w)),w=null)},w.onerror=function(){i(new Qp("Network Error",Qp.ERR_NETWORK,e,w)),w=null},w.ontimeout=function(){let D=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",C=n.transitional||BHn;n.timeoutErrorMessage&&(D=n.timeoutErrorMessage),i(new Qp(D,C.clarifyTimeoutError?Qp.ETIMEDOUT:Qp.ECONNABORTED,e,w)),w=null},a===void 0&&u.setContentType(null),"setRequestHeader"in w&&ss.forEach(u.toJSON(),function(D,C){w.setRequestHeader(C,D)}),ss.isUndefined(n.withCredentials)||(w.withCredentials=!!n.withCredentials),l&&l!=="json"&&(w.responseType=n.responseType),s&&([b,O]=YOi(s,!0),w.addEventListener("progress",b)),d&&w.upload&&([c,g]=YOi(d),w.upload.addEventListener("progress",c),w.upload.addEventListener("loadend",g)),(n.cancelToken||n.signal)&&(o=M=>{w&&(i(!M||M.type?new qAe(null,e,w):M),w.abort(),w=null)},n.cancelToken&&n.cancelToken.subscribe(o),n.signal&&(n.signal.aborted?o():n.signal.addEventListener("abort",o)));let q=A7a(n.url);if(q&&xA.protocols.indexOf(q)===-1){i(new Qp("Unsupported protocol "+q+":",Qp.ERR_BAD_REQUEST,e));return}w.send(a||null)})};var OnE=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let i=new AbortController,n,a=function(s){if(!n){n=!0,l();let o=s instanceof Error?s:this.reason;i.abort(o instanceof Qp?o:new qAe(o instanceof Error?o.message:o))}},u=t&&setTimeout(()=>{u=null,a(new Qp(`timeout ${t} of ms exceeded`,Qp.ETIMEDOUT))},t),l=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(a):s.removeEventListener("abort",a)}),e=null)};e.forEach(s=>s.addEventListener("abort",a));let{signal:d}=i;return d.unsubscribe=()=>ss.asap(l),d}},Rkp=OnE;var mnE=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let i=0,n;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},PnE=async function*(e,t){for await(let r of jnE(e))yield*mnE(r,t)},jnE=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:r,value:i}=await t.read();if(r)break;yield i}}finally{await t.cancel()}},R_c=(e,t,r,i)=>{let n=PnE(e,t),a=0,u,l=d=>{u||(u=!0,i&&i(d))};return new ReadableStream({async pull(d){try{let{done:s,value:o}=await n.next();if(s){l(),d.close();return}let c=o.byteLength;if(r){let b=a+=c;r(b)}d.enqueue(new Uint8Array(o))}catch(s){throw l(s),s}},cancel(d){return l(d),n.return()}},{highWaterMark:2})};var dJo=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Nkp=dJo&&typeof ReadableStream=="function",wnE=dJo&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Fkp=(e,...t)=>{try{return!!e(...t)}catch{return!1}},SnE=Nkp&&Fkp(()=>{let e=!1,t=new Request(xA.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),xkp=64*1024,x_c=Nkp&&Fkp(()=>ss.isReadableStream(new Response("").body)),fJo={stream:x_c&&(e=>e.body)};dJo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!fJo[t]&&(fJo[t]=ss.isFunction(e[t])?r=>r[t]():(r,i)=>{throw new Qp(`Response type '${t}' is not supported`,Qp.ERR_NOT_SUPPORT,i)})})})(new Response);var DnE=async e=>{if(e==null)return 0;if(ss.isBlob(e))return e.size;if(ss.isSpecCompliantForm(e))return(await new Request(xA.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(ss.isArrayBufferView(e)||ss.isArrayBuffer(e))return e.byteLength;if(ss.isURLSearchParams(e)&&(e=e+""),ss.isString(e))return(await wnE(e)).byteLength},EnE=async(e,t)=>{let r=ss.toFiniteNumber(e.getContentLength());return r??DnE(t)},Lkp=dJo&&(async e=>{let{url:t,method:r,data:i,signal:n,cancelToken:a,timeout:u,onDownloadProgress:l,onUploadProgress:d,responseType:s,headers:o,withCredentials:c="same-origin",fetchOptions:b}=lJo(e);s=s?(s+"").toLowerCase():"text";let g=Rkp([n,a&&a.toAbortSignal()],u),O,m=g&&g.unsubscribe&&(()=>{g.unsubscribe()}),w;try{if(d&&SnE&&r!=="get"&&r!=="head"&&(w=await EnE(o,i))!==0){let C=new Request(t,{method:"POST",body:i,duplex:"half"}),R;if(ss.isFormData(i)&&(R=C.headers.get("content-type"))&&o.setContentType(R),C.body){let[G,I]=RHn(w,YOi(xHn(d)));i=R_c(C.body,xkp,G,I)}}ss.isString(c)||(c=c?"include":"omit");let E="credentials"in Request.prototype;O=new Request(t,{...b,signal:g,method:r.toUpperCase(),headers:o.normalize().toJSON(),body:i,duplex:"half",credentials:E?c:void 0});let q=await fetch(O,b),M=x_c&&(s==="stream"||s==="response");if(x_c&&(l||M&&m)){let C={};["status","statusText","headers"].forEach(F=>{C[F]=q[F]});let R=ss.toFiniteNumber(q.headers.get("content-length")),[G,I]=l&&RHn(R,YOi(xHn(l),!0))||[];q=new Response(R_c(q.body,xkp,G,()=>{I&&I(),m&&m()}),C)}s=s||"text";let D=await fJo[ss.findKey(fJo,s)||"text"](q,e);return!M&&m&&m(),await new Promise((C,R)=>{Sar(C,R,{data:D,headers:Kx.from(q.headers),status:q.status,statusText:q.statusText,config:e,request:O})})}catch(E){throw m&&m(),E&&E.name==="TypeError"&&/Load failed|fetch/i.test(E.message)?Object.assign(new Qp("Network Error",Qp.ERR_NETWORK,e,O),{cause:E.cause||E}):Qp.from(E,E&&E.code,e,O)}});var N_c={http:Tkp,xhr:zkp,fetch:Lkp};ss.forEach(N_c,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Ukp=e=>`- ${e}`,MnE=e=>ss.isFunction(e)||e===null||e===!1,pJo={getAdapter:e=>{e=ss.isArray(e)?e:[e];let{length:t}=e,r,i,n={};for(let a=0;a<t;a++){r=e[a];let u;if(i=r,!MnE(r)&&(i=N_c[(u=String(r)).toLowerCase()],i===void 0))throw new Qp(`Unknown adapter '${u}'`);if(i)break;n[u||"#"+a]=i}if(!i){let a=Object.entries(n).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build")),u=t?a.length>1?`since :
|
|
@@ -1953,7 +1953,7 @@ ${M}${q}${D}${Wm_.default.cursorHide}`});var g5a=ui(BIi(),1);function Hwc(e,t){i
|
|
|
1953
1953
|
Run ${Ds.cyan("fern generator upgrade")} to upgrade your generators.`),n.length>2&&(r+=`
|
|
1954
1954
|
Run ${Ds.cyan("fern generator upgrade --list")} to see the full list of generator upgrades available.`),FHn(r,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"})}async function t1c({generatorUpgradeInfo:e,header:t,limit:r,includeBoxen:i=!0}){if(!pP_(e))return;let n=t??"",a=e.filter(l=>l.isUpgradeAvailable);r!=null&&(a=a.slice(0,r+1));let u=a.sort((l,d)=>l.generatorName.localeCompare(d.generatorName)||l.currentVersion.localeCompare(d.currentVersion));for(let l of u)n+=`
|
|
1955
1955
|
${await rRE(l.generatorName)} (${l.apiName!=null?"API: "+l.apiName+", ":""}Group: ${l.generatorGroup}) `+Ds.dim(l.currentVersion)+Ds.reset(" \u2192 ")+Ds.green(l.latestVersion);return n+=`
|
|
1956
|
-
`,i?FHn(n,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):n}async function rRE(e){let r=await new dP_.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new Error(`Generator ${e} not found`);return r.body.displayName}async function iRE({cliContext:e,project:{apiWorkspaces:t},generatorFilter:r,groupFilter:i,channel:n,includeMajor:a}){if(t.length===1){let l={type:"singleApi",versions:{}};return await hP_({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(d,s,o,c)=>{l.versions[s]==null&&(l.versions[s]={});let b=CIi(o.name,c),g=await Irr({generatorName:b,cliVersion:e.environment.packageVersion,currentGeneratorVersion:o.version,channel:n,includeMajor:a,context:c});g!=null&&(l.versions[s][o.name]={previousVersion:o.version,latestVersion:g})},generatorFilter:r,groupFilter:i}),l}let u={type:"multiApi",versions:{}};return await hP_({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(l,d,s,o)=>{if(l==null)return;u.versions[l]==null&&(u.versions[l]={}),u.versions[l][d]==null&&(u.versions[l][d]={});let c=CIi(s.name,o),b=await Irr({generatorName:c,cliVersion:e.environment.packageVersion,currentGeneratorVersion:s.version,channel:n,includeMajor:a,context:o});b!=null&&(u.versions[l][d][s.name]={previousVersion:s.version,latestVersion:b})},generatorFilter:r,groupFilter:i}),u}async function hP_({cliContext:e,apiWorkspaces:t,perGeneratorAction:r,generatorFilter:i,groupFilter:n}){await Promise.all(t.map(async a=>{await e.runTaskForWorkspace(a,async u=>{let l=await nGt({absolutePathToWorkspace:a.absoluteFilePath,context:u});if(!(l==null||l.groups==null)){for(let d of l.groups)if(!(n!=null&&d.groupName!==n))for(let s of d.generators)i!=null&&s.name!==i||await r(a.workspaceName,d.groupName,s,u)}})}))}function yP_(e,t,r){let i=[];for(let[n,a]of Object.entries(e))for(let[u,l]of Object.entries(a)){r.debug(`Checking if ${u} in group ${n} has an upgrade available...`);let d=sue(l.latestVersion,l.previousVersion);r.debug(`Latest version: ${l.latestVersion}. `+(d?"Upgrade available.":"No upgrade available.")),i.push({generatorName:u,generatorGroup:n,apiName:t,isUpgradeAvailable:d,currentVersion:l.previousVersion,latestVersion:l.latestVersion})}return i}async function kru({project:e,cliContext:t,generatorFilter:r,groupFilter:i,channel:n,includeMajor:a}){let u=[];if(e!=null){let l=await iRE({cliContext:t,project:e,generatorFilter:r,groupFilter:i,channel:n,includeMajor:a});if(l.type==="multiApi")for(let[d,s]of Object.entries(l.versions))u.push(...yP_(s,d,t.logger));else u.push(...yP_(l.versions,void 0,t.logger))}return u}var E5a=class extends Error{response;request;options;constructor(t,r,i){let n=t.status||t.status===0?t.status:"",a=t.statusText||"",u=`${n} ${a}`.trim(),l=u?`status code ${u}`:"an unknown error";super(`Request failed with ${l}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=t,this.request=r,this.options=i}};var NJn=class extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}};var r1c=(()=>{let e=!1,t=!1,r=typeof globalThis.ReadableStream=="function",i=typeof globalThis.Request=="function";if(r&&i)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(n){if(n instanceof Error&&n.message==="unsupported BodyInit type")return!1;throw n}return e&&!t})(),vP_=typeof globalThis.AbortController=="function",bP_=typeof globalThis.ReadableStream=="function",gP_=typeof globalThis.FormData=="function",eiu=["get","post","put","patch","head","delete"],nRE=()=>{};nRE();var OP_={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},tiu=2147483647,mP_=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,riu=Symbol("stop"),PP_={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},jP_={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0};var aRE=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[r,i]of e)t+=mP_,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${r}"`).length,t+=typeof i=="string"?new TextEncoder().encode(i).length:i.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e=="string")return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if(typeof e=="object"&&e!==null)try{let t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},wP_=(e,t)=>{let r=Number(e.headers.get("content-length"))||0,i=0;return e.status===204?(t&&t({percent:1,totalBytes:r,transferredBytes:i},new Uint8Array),new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new Response(new ReadableStream({async start(n){let a=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array);async function u(){let{done:l,value:d}=await a.read();if(l){n.close();return}if(t){i+=d.byteLength;let s=r===0?0:i/r;t({percent:s,transferredBytes:i,totalBytes:r},d)}n.enqueue(d),await u()}await u()}}),{status:e.status,statusText:e.statusText,headers:e.headers})},SP_=(e,t)=>{let r=aRE(e.body),i=0;return new Request(e,{duplex:"half",body:new ReadableStream({async start(n){let a=e.body instanceof ReadableStream?e.body.getReader():new Response("").body.getReader();async function u(){let{done:l,value:d}=await a.read();if(l){t&&t({percent:1,transferredBytes:i,totalBytes:Math.max(r,i)},new Uint8Array),n.close();return}i+=d.byteLength;let s=r===0?0:i/r;(r<i||s===1)&&(s=.99),t&&t({percent:Number(s.toFixed(2)),transferredBytes:i,totalBytes:r},d),n.enqueue(d),await u()}await u()}})})};var FJn=e=>e!==null&&typeof e=="object";var M5a=(...e)=>{for(let t of e)if((!FJn(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return a1c({},...e)},i1c=(e={},t={})=>{let r=new globalThis.Headers(e),i=t instanceof globalThis.Headers,n=new globalThis.Headers(t);for(let[a,u]of n.entries())i&&u==="undefined"||u===void 0?r.delete(a):r.set(a,u);return r};function iiu(e,t,r){return Object.hasOwn(t,r)&&t[r]===void 0?[]:a1c(e[r]??[],t[r]??[])}var n1c=(e={},t={})=>({beforeRequest:iiu(e,t,"beforeRequest"),beforeRetry:iiu(e,t,"beforeRetry"),afterResponse:iiu(e,t,"afterResponse"),beforeError:iiu(e,t,"beforeError")}),a1c=(...e)=>{let t={},r={},i={};for(let n of e)if(Array.isArray(n))Array.isArray(t)||(t=[]),t=[...t,...n];else if(FJn(n)){for(let[a,u]of Object.entries(n))FJn(u)&&a in t&&(u=a1c(t[a],u)),t={...t,[a]:u};FJn(n.hooks)&&(i=n1c(i,n.hooks),t.hooks=i),FJn(n.headers)&&(r=i1c(r,n.headers),t.headers=r)}return t};var EP_=e=>eiu.includes(e)?e.toUpperCase():e,oRE=["get","put","head","delete","options","trace"],uRE=[408,413,429,500,502,503,504],sRE=[413,429,503],DP_={limit:2,methods:oRE,statusCodes:uRE,afterStatusCodes:sRE,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},MP_=(e={})=>{if(typeof e=="number")return{...DP_,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...DP_,...e}};async function o1c(e,t,r,i){return new Promise((n,a)=>{let u=setTimeout(()=>{r&&r.abort(),a(new NJn(e))},i.timeout);i.fetch(e,t).then(n).catch(a).then(()=>{clearTimeout(u)})})}async function u1c(e,{signal:t}){return new Promise((r,i)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",n,{once:!0}));function n(){clearTimeout(a),i(t.reason)}let a=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e)})}var AP_=(e,t)=>{let r={};for(let i in t)!(i in jP_)&&!(i in PP_)&&!(i in e)&&(r[i]=t[i]);return r};var A5a=class e{static create(t,r){let i=new e(t,r),n=async()=>{if(typeof i._options.timeout=="number"&&i._options.timeout>tiu)throw new RangeError(`The \`timeout\` option cannot be greater than ${tiu}`);await Promise.resolve();let l=await i._fetch();for(let d of i._options.hooks.afterResponse){let s=await d(i.request,i._options,i._decorateResponse(l.clone()));s instanceof globalThis.Response&&(l=s)}if(i._decorateResponse(l),!l.ok&&i._options.throwHttpErrors){let d=new E5a(l,i.request,i._options);for(let s of i._options.hooks.beforeError)d=await s(d);throw d}if(i._options.onDownloadProgress){if(typeof i._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!bP_)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return wP_(l.clone(),i._options.onDownloadProgress)}return l},u=(i._options.retry.methods.includes(i.request.method.toLowerCase())?i._retry(n):n()).finally(async()=>{i.request.bodyUsed||await i.request.body?.cancel()});for(let[l,d]of Object.entries(OP_))u[l]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||d);let s=await u;if(l==="json"){if(s.status===204||(await s.clone().arrayBuffer()).byteLength===0)return"";if(r.parseJson)return r.parseJson(await s.text())}return s[l]()};return u}request;abortController;_retryCount=0;_input;_options;constructor(t,r={}){if(this._input=t,this._options={...r,headers:i1c(this._input.headers,r.headers),hooks:n1c({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:EP_(r.method??this._input.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:MP_(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(vP_){let i=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=i?AbortSignal.any([i,this.abortController.signal]):this.abortController.signal}if(r1c&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let n="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),a=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,n);(gP_&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(a,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!r1c)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=SP_(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount>this._options.retry.limit||t instanceof NJn)throw t;if(t instanceof E5a){if(!this._options.retry.statusCodes.includes(t.response.status))throw t;let i=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(i&&this._options.retry.afterStatusCodes.includes(t.response.status)){let n=Number(i)*1e3;Number.isNaN(n)?n=Date.parse(i)-Date.now():n>=Date.parse("2024-01-01")&&(n-=Date.now());let a=this._options.retry.maxRetryAfter??n;return n<a?n:a}if(t.response.status===413)throw t}let r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(r){let i=Math.min(this._calculateRetryDelay(r),tiu);if(this._retryCount<1)throw r;await u1c(i,{signal:this._options.signal});for(let n of this._options.hooks.beforeRetry)if(await n({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===riu)return;return this._retry(t)}}async _fetch(){for(let i of this._options.hooks.beforeRequest){let n=await i(this.request,this._options);if(n instanceof Request){this.request=n;break}if(n instanceof Response)return n}let t=AP_(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,t):o1c(r,t,this.abortController,this._options)}};var s1c=e=>{let t=(r,i)=>A5a.create(r,M5a(e,i));for(let r of eiu)t[r]=(i,n)=>A5a.create(i,M5a(e,n,{method:r}));return t.create=r=>s1c(M5a(r)),t.extend=r=>(typeof r=="function"&&(r=r(e??{})),s1c(M5a(e,r))),t.stop=riu,t},cRE=s1c(),qP_=cRE;var kP_=ui(ZP_(),1);function p1c(e){let t=(0,kP_.default)("npm",{registry:"https://registry.npmjs.org/"}),r=t[`${e}:registry`]||t.config_registry||t.registry;return r.slice(-1)==="/"?r:`${r}/`}var Qj_=ui(Gj_(),1),Jj_=ui(BIi(),1),D1c=class extends Error{constructor(t){super(`Package \`${t}\` could not be found`),this.name="PackageNotFoundError"}},E1c=class extends Error{constructor(t,r){super(`Version \`${r}\` for package \`${t}\` could not be found`),this.name="VersionNotFoundError"}};async function M1c(e,t={}){let{version:r="latest"}=t,{omitDeprecated:i=!0}=t,n=e.split("/")[0],a=t.registryUrl??p1c(n),u=new URL(encodeURIComponent(e).replace(/^%40/,"@"),a),l=(0,Qj_.default)(a.toString(),{recursive:!0}),d={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};t.fullMetadata&&delete d.accept,l&&(d.authorization=`${l.type} ${l.token}`);let s;try{s=await qP_(u,{headers:d,keepalive:!0}).json()}catch(c){throw c?.response?.status===404?new D1c(e):c}if(t.allVersions)return s;let o=new E1c(e,r);if(s["dist-tags"][r]){let{time:c}=s;s=s.versions[s["dist-tags"][r]],s.time=c}else if(r){let c=!!s.versions[r];if(i&&!c)for(let[g,O]of Object.entries(s.versions))O.deprecated&&delete s.versions[g];if(!c){let g=Object.keys(s.versions);if(r=Jj_.default.maxSatisfying(g,r),!r)throw o}let{time:b}=s;if(s=s.versions[r],s.time=b,!s)throw o}return s}async function z5a(e,t){let{version:r}=await M1c(e.toLowerCase(),t);return r}async function TNi({cliEnvironment:e,includePreReleases:t=!1}){return e.packageName!=="fern-api"?e.packageVersion:z5a(e.packageName,{version:t?"prerelease":"latest"})}var Kj_=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],hiu=class{environment;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=pb.Info;isLocal;constructor(t,r,{isLocal:i}){this.ttyAwareLogger=new Zru(t,r),this.isLocal=i??!1;let n=this.getPackageName(),a=this.getPackageVersion(),u=this.getCliName();(n==null||a==null||u==null)&&this.exitProgram(),this.environment={packageName:n,packageVersion:a,cliName:u}}getPackageName(){return"fern-api"}getPackageVersion(){return"0.66.14"}getCliName(){return"fern"}setLogLevel(t){this.logLevel=t}logDebugInfo(){this.logger.debug(`Running ${Ds.bold(`${this.environment.cliName}`)} (${this.environment.packageName}@${this.environment.packageVersion})`)}failAndThrow(t,r){throw this.failWithoutThrowing(t,r),new lL}failWithoutThrowing(t,r){this.didSucceed=!1,Jru({message:t,error:r,logger:this.logger})}async exit({code:t}={}){(!this._suppressUpgradeMessage||!this.isLocal)&&await this.nudgeUpgradeIfAvailable(),this.ttyAwareLogger.finish(),await(await qHn()).flush(),this.exitProgram({code:t})}async nudgeUpgradeIfAvailable(){try{let t=await Promise.race([this.isUpgradeAvailable(),new Promise((i,n)=>setTimeout(()=>n("Request timed out"),300))]),r=await _P_({cliEnvironment:this.environment,upgradeInfo:t});r!=null&&(r.endsWith(`
|
|
1956
|
+
`,i?FHn(n,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):n}async function rRE(e){let r=await new dP_.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new Error(`Generator ${e} not found`);return r.body.displayName}async function iRE({cliContext:e,project:{apiWorkspaces:t},generatorFilter:r,groupFilter:i,channel:n,includeMajor:a}){if(t.length===1){let l={type:"singleApi",versions:{}};return await hP_({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(d,s,o,c)=>{l.versions[s]==null&&(l.versions[s]={});let b=CIi(o.name,c),g=await Irr({generatorName:b,cliVersion:e.environment.packageVersion,currentGeneratorVersion:o.version,channel:n,includeMajor:a,context:c});g!=null&&(l.versions[s][o.name]={previousVersion:o.version,latestVersion:g})},generatorFilter:r,groupFilter:i}),l}let u={type:"multiApi",versions:{}};return await hP_({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(l,d,s,o)=>{if(l==null)return;u.versions[l]==null&&(u.versions[l]={}),u.versions[l][d]==null&&(u.versions[l][d]={});let c=CIi(s.name,o),b=await Irr({generatorName:c,cliVersion:e.environment.packageVersion,currentGeneratorVersion:s.version,channel:n,includeMajor:a,context:o});b!=null&&(u.versions[l][d][s.name]={previousVersion:s.version,latestVersion:b})},generatorFilter:r,groupFilter:i}),u}async function hP_({cliContext:e,apiWorkspaces:t,perGeneratorAction:r,generatorFilter:i,groupFilter:n}){await Promise.all(t.map(async a=>{await e.runTaskForWorkspace(a,async u=>{let l=await nGt({absolutePathToWorkspace:a.absoluteFilePath,context:u});if(!(l==null||l.groups==null)){for(let d of l.groups)if(!(n!=null&&d.groupName!==n))for(let s of d.generators)i!=null&&s.name!==i||await r(a.workspaceName,d.groupName,s,u)}})}))}function yP_(e,t,r){let i=[];for(let[n,a]of Object.entries(e))for(let[u,l]of Object.entries(a)){r.debug(`Checking if ${u} in group ${n} has an upgrade available...`);let d=sue(l.latestVersion,l.previousVersion);r.debug(`Latest version: ${l.latestVersion}. `+(d?"Upgrade available.":"No upgrade available.")),i.push({generatorName:u,generatorGroup:n,apiName:t,isUpgradeAvailable:d,currentVersion:l.previousVersion,latestVersion:l.latestVersion})}return i}async function kru({project:e,cliContext:t,generatorFilter:r,groupFilter:i,channel:n,includeMajor:a}){let u=[];if(e!=null){let l=await iRE({cliContext:t,project:e,generatorFilter:r,groupFilter:i,channel:n,includeMajor:a});if(l.type==="multiApi")for(let[d,s]of Object.entries(l.versions))u.push(...yP_(s,d,t.logger));else u.push(...yP_(l.versions,void 0,t.logger))}return u}var E5a=class extends Error{response;request;options;constructor(t,r,i){let n=t.status||t.status===0?t.status:"",a=t.statusText||"",u=`${n} ${a}`.trim(),l=u?`status code ${u}`:"an unknown error";super(`Request failed with ${l}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=t,this.request=r,this.options=i}};var NJn=class extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}};var r1c=(()=>{let e=!1,t=!1,r=typeof globalThis.ReadableStream=="function",i=typeof globalThis.Request=="function";if(r&&i)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(n){if(n instanceof Error&&n.message==="unsupported BodyInit type")return!1;throw n}return e&&!t})(),vP_=typeof globalThis.AbortController=="function",bP_=typeof globalThis.ReadableStream=="function",gP_=typeof globalThis.FormData=="function",eiu=["get","post","put","patch","head","delete"],nRE=()=>{};nRE();var OP_={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},tiu=2147483647,mP_=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,riu=Symbol("stop"),PP_={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},jP_={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0};var aRE=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[r,i]of e)t+=mP_,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${r}"`).length,t+=typeof i=="string"?new TextEncoder().encode(i).length:i.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e=="string")return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if(typeof e=="object"&&e!==null)try{let t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},wP_=(e,t)=>{let r=Number(e.headers.get("content-length"))||0,i=0;return e.status===204?(t&&t({percent:1,totalBytes:r,transferredBytes:i},new Uint8Array),new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new Response(new ReadableStream({async start(n){let a=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array);async function u(){let{done:l,value:d}=await a.read();if(l){n.close();return}if(t){i+=d.byteLength;let s=r===0?0:i/r;t({percent:s,transferredBytes:i,totalBytes:r},d)}n.enqueue(d),await u()}await u()}}),{status:e.status,statusText:e.statusText,headers:e.headers})},SP_=(e,t)=>{let r=aRE(e.body),i=0;return new Request(e,{duplex:"half",body:new ReadableStream({async start(n){let a=e.body instanceof ReadableStream?e.body.getReader():new Response("").body.getReader();async function u(){let{done:l,value:d}=await a.read();if(l){t&&t({percent:1,transferredBytes:i,totalBytes:Math.max(r,i)},new Uint8Array),n.close();return}i+=d.byteLength;let s=r===0?0:i/r;(r<i||s===1)&&(s=.99),t&&t({percent:Number(s.toFixed(2)),transferredBytes:i,totalBytes:r},d),n.enqueue(d),await u()}await u()}})})};var FJn=e=>e!==null&&typeof e=="object";var M5a=(...e)=>{for(let t of e)if((!FJn(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return a1c({},...e)},i1c=(e={},t={})=>{let r=new globalThis.Headers(e),i=t instanceof globalThis.Headers,n=new globalThis.Headers(t);for(let[a,u]of n.entries())i&&u==="undefined"||u===void 0?r.delete(a):r.set(a,u);return r};function iiu(e,t,r){return Object.hasOwn(t,r)&&t[r]===void 0?[]:a1c(e[r]??[],t[r]??[])}var n1c=(e={},t={})=>({beforeRequest:iiu(e,t,"beforeRequest"),beforeRetry:iiu(e,t,"beforeRetry"),afterResponse:iiu(e,t,"afterResponse"),beforeError:iiu(e,t,"beforeError")}),a1c=(...e)=>{let t={},r={},i={};for(let n of e)if(Array.isArray(n))Array.isArray(t)||(t=[]),t=[...t,...n];else if(FJn(n)){for(let[a,u]of Object.entries(n))FJn(u)&&a in t&&(u=a1c(t[a],u)),t={...t,[a]:u};FJn(n.hooks)&&(i=n1c(i,n.hooks),t.hooks=i),FJn(n.headers)&&(r=i1c(r,n.headers),t.headers=r)}return t};var EP_=e=>eiu.includes(e)?e.toUpperCase():e,oRE=["get","put","head","delete","options","trace"],uRE=[408,413,429,500,502,503,504],sRE=[413,429,503],DP_={limit:2,methods:oRE,statusCodes:uRE,afterStatusCodes:sRE,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},MP_=(e={})=>{if(typeof e=="number")return{...DP_,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...DP_,...e}};async function o1c(e,t,r,i){return new Promise((n,a)=>{let u=setTimeout(()=>{r&&r.abort(),a(new NJn(e))},i.timeout);i.fetch(e,t).then(n).catch(a).then(()=>{clearTimeout(u)})})}async function u1c(e,{signal:t}){return new Promise((r,i)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",n,{once:!0}));function n(){clearTimeout(a),i(t.reason)}let a=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e)})}var AP_=(e,t)=>{let r={};for(let i in t)!(i in jP_)&&!(i in PP_)&&!(i in e)&&(r[i]=t[i]);return r};var A5a=class e{static create(t,r){let i=new e(t,r),n=async()=>{if(typeof i._options.timeout=="number"&&i._options.timeout>tiu)throw new RangeError(`The \`timeout\` option cannot be greater than ${tiu}`);await Promise.resolve();let l=await i._fetch();for(let d of i._options.hooks.afterResponse){let s=await d(i.request,i._options,i._decorateResponse(l.clone()));s instanceof globalThis.Response&&(l=s)}if(i._decorateResponse(l),!l.ok&&i._options.throwHttpErrors){let d=new E5a(l,i.request,i._options);for(let s of i._options.hooks.beforeError)d=await s(d);throw d}if(i._options.onDownloadProgress){if(typeof i._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!bP_)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return wP_(l.clone(),i._options.onDownloadProgress)}return l},u=(i._options.retry.methods.includes(i.request.method.toLowerCase())?i._retry(n):n()).finally(async()=>{i.request.bodyUsed||await i.request.body?.cancel()});for(let[l,d]of Object.entries(OP_))u[l]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||d);let s=await u;if(l==="json"){if(s.status===204||(await s.clone().arrayBuffer()).byteLength===0)return"";if(r.parseJson)return r.parseJson(await s.text())}return s[l]()};return u}request;abortController;_retryCount=0;_input;_options;constructor(t,r={}){if(this._input=t,this._options={...r,headers:i1c(this._input.headers,r.headers),hooks:n1c({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:EP_(r.method??this._input.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:MP_(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(vP_){let i=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=i?AbortSignal.any([i,this.abortController.signal]):this.abortController.signal}if(r1c&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let n="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),a=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,n);(gP_&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(a,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!r1c)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=SP_(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount>this._options.retry.limit||t instanceof NJn)throw t;if(t instanceof E5a){if(!this._options.retry.statusCodes.includes(t.response.status))throw t;let i=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(i&&this._options.retry.afterStatusCodes.includes(t.response.status)){let n=Number(i)*1e3;Number.isNaN(n)?n=Date.parse(i)-Date.now():n>=Date.parse("2024-01-01")&&(n-=Date.now());let a=this._options.retry.maxRetryAfter??n;return n<a?n:a}if(t.response.status===413)throw t}let r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(r){let i=Math.min(this._calculateRetryDelay(r),tiu);if(this._retryCount<1)throw r;await u1c(i,{signal:this._options.signal});for(let n of this._options.hooks.beforeRetry)if(await n({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===riu)return;return this._retry(t)}}async _fetch(){for(let i of this._options.hooks.beforeRequest){let n=await i(this.request,this._options);if(n instanceof Request){this.request=n;break}if(n instanceof Response)return n}let t=AP_(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,t):o1c(r,t,this.abortController,this._options)}};var s1c=e=>{let t=(r,i)=>A5a.create(r,M5a(e,i));for(let r of eiu)t[r]=(i,n)=>A5a.create(i,M5a(e,n,{method:r}));return t.create=r=>s1c(M5a(r)),t.extend=r=>(typeof r=="function"&&(r=r(e??{})),s1c(M5a(e,r))),t.stop=riu,t},cRE=s1c(),qP_=cRE;var kP_=ui(ZP_(),1);function p1c(e){let t=(0,kP_.default)("npm",{registry:"https://registry.npmjs.org/"}),r=t[`${e}:registry`]||t.config_registry||t.registry;return r.slice(-1)==="/"?r:`${r}/`}var Qj_=ui(Gj_(),1),Jj_=ui(BIi(),1),D1c=class extends Error{constructor(t){super(`Package \`${t}\` could not be found`),this.name="PackageNotFoundError"}},E1c=class extends Error{constructor(t,r){super(`Version \`${r}\` for package \`${t}\` could not be found`),this.name="VersionNotFoundError"}};async function M1c(e,t={}){let{version:r="latest"}=t,{omitDeprecated:i=!0}=t,n=e.split("/")[0],a=t.registryUrl??p1c(n),u=new URL(encodeURIComponent(e).replace(/^%40/,"@"),a),l=(0,Qj_.default)(a.toString(),{recursive:!0}),d={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};t.fullMetadata&&delete d.accept,l&&(d.authorization=`${l.type} ${l.token}`);let s;try{s=await qP_(u,{headers:d,keepalive:!0}).json()}catch(c){throw c?.response?.status===404?new D1c(e):c}if(t.allVersions)return s;let o=new E1c(e,r);if(s["dist-tags"][r]){let{time:c}=s;s=s.versions[s["dist-tags"][r]],s.time=c}else if(r){let c=!!s.versions[r];if(i&&!c)for(let[g,O]of Object.entries(s.versions))O.deprecated&&delete s.versions[g];if(!c){let g=Object.keys(s.versions);if(r=Jj_.default.maxSatisfying(g,r),!r)throw o}let{time:b}=s;if(s=s.versions[r],s.time=b,!s)throw o}return s}async function z5a(e,t){let{version:r}=await M1c(e.toLowerCase(),t);return r}async function TNi({cliEnvironment:e,includePreReleases:t=!1}){return e.packageName!=="fern-api"?e.packageVersion:z5a(e.packageName,{version:t?"prerelease":"latest"})}var Kj_=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],hiu=class{environment;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=pb.Info;isLocal;constructor(t,r,{isLocal:i}){this.ttyAwareLogger=new Zru(t,r),this.isLocal=i??!1;let n=this.getPackageName(),a=this.getPackageVersion(),u=this.getCliName();(n==null||a==null||u==null)&&this.exitProgram(),this.environment={packageName:n,packageVersion:a,cliName:u}}getPackageName(){return"fern-api"}getPackageVersion(){return"0.66.15"}getCliName(){return"fern"}setLogLevel(t){this.logLevel=t}logDebugInfo(){this.logger.debug(`Running ${Ds.bold(`${this.environment.cliName}`)} (${this.environment.packageName}@${this.environment.packageVersion})`)}failAndThrow(t,r){throw this.failWithoutThrowing(t,r),new lL}failWithoutThrowing(t,r){this.didSucceed=!1,Jru({message:t,error:r,logger:this.logger})}async exit({code:t}={}){(!this._suppressUpgradeMessage||!this.isLocal)&&await this.nudgeUpgradeIfAvailable(),this.ttyAwareLogger.finish(),await(await qHn()).flush(),this.exitProgram({code:t})}async nudgeUpgradeIfAvailable(){try{let t=await Promise.race([this.isUpgradeAvailable(),new Promise((i,n)=>setTimeout(()=>n("Request timed out"),300))]),r=await _P_({cliEnvironment:this.environment,upgradeInfo:t});r!=null&&(r.endsWith(`
|
|
1957
1957
|
`)||(r+=`
|
|
1958
1958
|
`),this.stderr.info(r))}catch{}}async exitIfFailed(){this.didSucceed||await this.exit()}exitProgram({code:t}={}){process.exit(t??(this.didSucceed?0:1))}longestWorkspaceName;registerWorkspaces(t){let r=RHs(t.map(i=>i.type==="docs"?"docs":i.workspaceName??"api"),i=>i.length);r!=null&&(this.longestWorkspaceName=r)}project;registerProject(t){this.project=t}runTask(t){return this.runTaskWithInit(this.constructTaskInit(),t)}addTask(){return this.addTaskWithInit(this.constructTaskInit())}async runTaskForWorkspace(t,r){await this.runTaskWithInit(this.constructTaskInitForWorkspace(t),r)}addTaskWithInit(t){let r=new O5a(t);return this.ttyAwareLogger.registerTask(r),r}USE_NODE_18_OR_ABOVE_MESSAGE="The Fern CLI requires Node 18+ or above.";async runTaskWithInit(t,r){let i=this.addTaskWithInit(t).start(),n;try{n=await r(i)}catch(a){throw a.message.includes("globalThis")?(i.logger.error(this.USE_NODE_18_OR_ABOVE_MESSAGE),i.failWithoutThrowing()):i.failWithoutThrowing(void 0,a),new lL}finally{i.finish()}return n}async instrumentPostHogEvent(t){this.isLocal||(await qHn()).sendEvent(t)}logger=Qer((t,...r)=>this.log(t,...r));stderr=Qer((t,...r)=>this.logStderr(t,...r));constructTaskInitForWorkspace(t){let r=Yj_(t.type==="docs"?"docs":t.workspaceName??"api"),i=1+(this.longestWorkspaceName!=null?Yj_(this.longestWorkspaceName):r).length,n=r.padEnd(i),a=Kj_[this.numTasks++%Kj_.length],u=Ds.hex(a)(n);return{...this.constructTaskInit(),logPrefix:u}}constructTaskInit(){return{logImmediately:t=>this.logImmediately(t),takeOverTerminal:t=>this.ttyAwareLogger.takeOverTerminal(t),onResult:t=>{t===hI.Failure&&(this.didSucceed=!1)},instrumentPostHogEvent:async t=>{await this.instrumentPostHogEvent(t)},shouldBufferLogs:!1}}log(t,...r){this.logImmediately([{parts:r,level:t,time:new Date}])}logStderr(t,...r){this.logImmediately([{parts:r,level:t,time:new Date}],{stderr:!0})}logImmediately(t,{stderr:r=!1}={}){let i=t.filter(n=>HBi.indexOf(n.level)>=HBi.indexOf(this.logLevel));this.ttyAwareLogger.log(i,{includeDebugInfo:this.logLevel===pb.Debug,stderr:r})}_suppressUpgradeMessage=!1;suppressUpgradeMessage(){this._suppressUpgradeMessage=!0}_isUpgradeAvailable;async isUpgradeAvailable({includePreReleases:t=!1}={}){if(this._isUpgradeAvailable==null){this.logger.debug(`Checking if ${this.environment.packageName} upgrade is available...`);let r=await TNi({cliEnvironment:this.environment,includePreReleases:t}),i=sue(r,this.environment.packageVersion);this.logger.debug(`Latest version: ${r}. `+(i?"Upgrade available.":"No upgrade available."));let n={isUpgradeAvailable:i,latestVersion:r},a=await kru({project:this.project,cliContext:this});this._isUpgradeAvailable={cliUpgradeInfo:n,generatorUpgradeInfo:a}}return this._isUpgradeAvailable}async confirmPrompt(t,r=!1){return await Fwc({message:t,default:r})}async getInput(t){return await Lwc({message:t.message,default:t.default})}};function Yj_(e){return`[${e}]:`}var S8_=require("fs/promises");function t7e({breadcrumbs:e=[],title:t,subtitle:r}){let i=[];return e.length>0&&i.push(Ds.blue(e.join(" -> "))),i.push(t),r!=null&&i.push(Ds.dim(r)),i.join(`
|
|
1959
1959
|
`)}var SF_=require("fs/promises");var _Qt=class{generatorsConfiguration;workspaceName;cliVersion;absoluteFilePath;changelog;constructor({generatorsConfiguration:t,workspaceName:r,cliVersion:i,absoluteFilePath:n,changelog:a}){this.generatorsConfiguration=t,this.workspaceName=r,this.cliVersion=i,this.absoluteFilePath=n,this.changelog=a}};var XAe=class extends _Qt{definition;sources;type="fern";constructor({definition:t,sources:r,...i}){super(i),this.definition=t,this.sources=r??[]}async getDefinition(){return this.definition}async toFernWorkspace(){return this}getSources(){return this.sources}getAbsoluteFilePaths(){return[this.absoluteFilePath]}};var R5a=class{context;constructor(t){this.context=t}};var yiu=class e{files={};directories={};getAllFiles(){let t={},r=(i,n)=>{for(let[u,l]of Object.entries(i.files)){let d=n!=null?fy.of(`${n}${P$t}${u}`):fy.of(u);t[d]=l}let a=Object.keys(i.directories).sort();for(let u of a){let l=n!=null?`${n}${P$t}${u}`:u,d=i.directories[u];r(d,l)}};return r(this),t}getOrCreateFile(t){return this.getOrCreateFileRecursive(t.split(P$t))}getOrCreateFileRecursive(t){if(t.length===1)return this.files[fy.of(t[0])]??={};let[r,...i]=t;if(r==null)throw new Error(`Internal error; cannot add file with path: ${t}`);return this.directories[r]||(this.directories[r]=new e),this.directories[r].getOrCreateFileRecursive(i)}};var Znn=class{enableUniqueErrorsPerEndpoint;root;rootApiFile;packageMarkerFile={};basePath=void 0;constructor(t){this.enableUniqueErrorsPerEndpoint=t,this.root=new yiu,this.rootApiFile={name:"api","error-discrimination":{strategy:"status-code"}}}setDisplayName({displayName:t}){this.rootApiFile["display-name"]=t}addNavigation({navigation:t}){this.packageMarkerFile.navigation=t}setServiceInfo(t,{auth:r,"base-path":i,"display-name":n,docs:a}){let u=this.getOrCreateFile(t);u.service==null&&(u.service={auth:!1,"base-path":"",endpoints:{}}),r!=null&&(u.service.auth=r),i!=null&&(u.service["base-path"]=i),n!=null&&(u.service["display-name"]=n),a!=null&&(u.docs=a)}addAudience(t){this.rootApiFile.audiences==null&&(this.rootApiFile.audiences=[]),this.rootApiFile.audiences.push(t)}setAuth(t){this.rootApiFile.auth=t}addAuthScheme({name:t,schema:r}){this.rootApiFile["auth-schemes"]==null&&(this.rootApiFile["auth-schemes"]={}),this.rootApiFile["auth-schemes"][t]==null&&(this.rootApiFile["auth-schemes"][t]=r)}setDefaultEnvironment(t){this.rootApiFile["default-environment"]=t}setDefaultUrl(t){this.rootApiFile["default-url"]=t}setBasePath(t){this.basePath=t}setApiVersion(t){this.rootApiFile.version=t}getEnvironmentType(){let t=Object.entries(this.rootApiFile.environments??{})[0];if(t!=null)return Yrr(t[1],{singleBaseUrl:()=>"single",multipleBaseUrls:()=>"multi"})}addEnvironment({name:t,schema:r}){this.rootApiFile.environments==null&&(this.rootApiFile.environments={}),this.rootApiFile.environments[t]=r}getGlobalHeaderNames(){let t=Object.keys(this.rootApiFile.headers??{});if(this.rootApiFile["auth-schemes"]!=null)for(let i of Object.values(this.rootApiFile["auth-schemes"]))Xj_(i)&&t.push(i.header);let r=this.getVersionHeader();return r!=null&&t.push(r),new Set(t)}getAuthHeaderName(){if(this.rootApiFile["auth-schemes"]!=null){for(let t of Object.values(this.rootApiFile["auth-schemes"]))if(Xj_(t))return t.header;return"Authorization"}}addGlobalHeader({name:t,schema:r}){let i=this.getVersionHeader();i!=null&&i===t||(this.rootApiFile.headers==null&&(this.rootApiFile.headers={}),this.rootApiFile.headers[t]=r)}getGlobalHeaders(){return this.rootApiFile.headers??{}}addIdempotencyHeader({name:t,schema:r}){this.rootApiFile["idempotency-headers"]==null&&(this.rootApiFile["idempotency-headers"]={}),this.rootApiFile["idempotency-headers"][t]=r}addVariable({name:t,schema:r}){this.rootApiFile.variables==null&&(this.rootApiFile.variables={}),this.rootApiFile.variables[t]=r}addImport({file:t,fileToImport:r,alias:i}){if(t===r)return;let n=i??S_((sNe(r)+"/"+mki(r,{stripExtension:!0})).replaceAll("__package__","root"));if(t===fy.of(x3))return this.rootApiFile.imports==null&&(this.rootApiFile.imports={}),this.rootApiFile.imports[n]=kBo(sNe(R5n.of(`/${t}`)),R5n.of(`/${r}`)),n;let a=this.getOrCreateFile(t);return a.imports==null&&(a.imports={}),a.imports[n]=kBo(sNe(R5n.of(`/${t}`)),R5n.of(`/${r}`)),n}addType(t,{name:r,schema:i}){if(t===fy.of(x3))return;let n=this.getOrCreateFile(t);n.types==null&&(n.types={}),n.types[r]=i}addTypeExample(t,r,i){let n=this.getOrCreateFile(t);n.types==null&&(n.types={});let a=n.types[r];a!=null&&(typeof a=="string"?n.types[r]={type:a,examples:[i]}:(a.examples==null&&(a.examples=[]),a.examples.push(i)))}addError(t,{name:r,schema:i}){let n=this.getOrCreateFile(t);n.errors==null&&(n.errors={}),n.errors[r]==null?n.errors[r]=i:n.errors[r]?.type!==i.type&&(n.errors[r]={"status-code":i["status-code"],type:"unknown"})}addErrorExample(t,{name:r,example:i}){let n=this.getOrCreateFile(t);if(n.errors==null)return;let a=n.errors[r];if(a==null)return;a.examples==null&&(a.examples=[]),(a.examples.some(l=>g8(l,i))??!1)||a.examples?.push(i)}addEndpoint(t,{name:r,schema:i,source:n}){let a=this.getOrCreateFile(t);a.service==null&&(a.service={auth:!1,"base-path":"",endpoints:{}}),n!=null&&(a.service.source=n),a.service.endpoints[r]=i}addWebhook(t,{name:r,schema:i}){let n=this.getOrCreateFile(t);n.webhooks==null&&(n.webhooks={}),n.webhooks[r]=i}addChannel(t,{channel:r}){let i=this.getOrCreateFile(t);i.channel=r;let n=this.basePath;n!=null&&(i.channel.path=jF(n,r.path))}addChannelExample(t,{example:r}){let i=this.getOrCreateFile(t);i.channel==null&&(i.channel={path:"",auth:!1}),i.channel.messages==null&&(i.channel.messages={}),i.channel.examples==null&&(i.channel.examples=[]),i.channel.examples.push(r)}addChannelMessage(t,{messageId:r,message:i}){let n=this.getOrCreateFile(t);n.channel==null&&(n.channel={path:"",auth:!1}),n.channel.messages==null&&(n.channel.messages={}),n.channel.messages[r]=i}build(){let t=this.root.getAllFiles(),r=this.basePath;if(r!=null){this.packageMarkerFile.service!=null&&(this.packageMarkerFile.service={...this.packageMarkerFile.service,endpoints:Object.fromEntries(Object.entries(this.packageMarkerFile.service.endpoints).map(([n,a])=>[n,{...a,path:jF(r,a.path)}]))});for(let n of Object.values(t))n.service!=null&&(n.service={...n.service,endpoints:Object.fromEntries(Object.entries(n.service.endpoints).map(([a,u])=>[a,{...u,path:jF(r,u.path)}]))})}return{rootApiFile:this.rootApiFile,packageMarkerFile:this.packageMarkerFile,definitionFiles:t}}getOrCreateFile(t){return t===fS?this.packageMarkerFile:this.root.getOrCreateFile(t)}getVersionHeader(){if(this.rootApiFile.version!=null)return typeof this.rootApiFile.version.header=="string"?this.rootApiFile.version.header:this.rootApiFile.version.header.value}};function Xj_(e){return e?.header!=null}var nK={openapi:e=>({...e,type:"openapi",_visit:function(t){return nK._visit(this,t)}}),protobuf:e=>({...e,type:"protobuf",_visit:function(t){return nK._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"openapi":return t.openapi(e);case"protobuf":return t.protobuf(e);default:return t._other(e)}}};var GJn={protobuf:e=>({...e,type:"protobuf",_visit:function(t){return GJn._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"protobuf":return t.protobuf(e);default:return t._other(e)}}};var JL={basic:e=>({...e,type:"basic",_visit:function(t){return JL._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return JL._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return JL._visit(this,t)}}),query:e=>({...e,type:"query",_visit:function(t){return JL._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return JL._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"basic":return t.basic(e);case"bearer":return t.bearer(e);case"header":return t.header(e);case"query":return t.query(e);case"oauth":return t.oauth(e);default:return t._other(e)}}};var xg={primitive:e=>({value:e,type:"primitive",_visit:function(t){return xg._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return xg._visit(this,t)}}),array:e=>({value:e,type:"array",_visit:function(t){return xg._visit(this,t)}}),map:e=>({value:e,type:"map",_visit:function(t){return xg._visit(this,t)}}),enum:e=>({value:e,type:"enum",_visit:function(t){return xg._visit(this,t)}}),literal:e=>({value:e,type:"literal",_visit:function(t){return xg._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return xg._visit(this,t)}}),unknown:e=>({value:e,type:"unknown",_visit:function(t){return xg._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e.value);case"object":return t.object(e);case"array":return t.array(e.value);case"map":return t.map(e.value);case"enum":return t.enum(e.value);case"literal":return t.literal(e.value);case"oneOf":return t.oneOf(e.value);case"unknown":return t.unknown(e.value);default:return t._other(e)}}};var h_={int:e=>({value:e,type:"int",_visit:function(t){return h_._visit(this,t)}}),int64:e=>({value:e,type:"int64",_visit:function(t){return h_._visit(this,t)}}),uint:e=>({value:e,type:"uint",_visit:function(t){return h_._visit(this,t)}}),uint64:e=>({value:e,type:"uint64",_visit:function(t){return h_._visit(this,t)}}),float:e=>({value:e,type:"float",_visit:function(t){return h_._visit(this,t)}}),double:e=>({value:e,type:"double",_visit:function(t){return h_._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return h_._visit(this,t)}}),datetime:e=>({value:e,type:"datetime",_visit:function(t){return h_._visit(this,t)}}),date:e=>({value:e,type:"date",_visit:function(t){return h_._visit(this,t)}}),base64:e=>({value:e,type:"base64",_visit:function(t){return h_._visit(this,t)}}),boolean:e=>({value:e,type:"boolean",_visit:function(t){return h_._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"int":return t.int(e.value);case"int64":return t.int64(e.value);case"uint":return t.uint(e.value);case"uint64":return t.uint64(e.value);case"float":return t.float(e.value);case"double":return t.double(e.value);case"string":return t.string(e.value);case"datetime":return t.datetime(e.value);case"date":return t.date(e.value);case"base64":return t.base64(e.value);case"boolean":return t.boolean(e.value);default:return t._other(e)}}};var CNi={boolean:e=>({value:e,type:"boolean",_visit:function(t){return CNi._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return CNi._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"boolean":return t.boolean(e.value);case"string":return t.string(e.value);default:return t._other(e)}}};var BNi={discriminated:e=>({value:e,type:"discriminated",_visit:function(t){return BNi._visit(this,t)}}),undiscriminated:e=>({value:e,type:"undiscriminated",_visit:function(t){return BNi._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"discriminated":return t.discriminated(e.value);case"undiscriminated":return t.undiscriminated(e.value);default:return t._other(e)}}};var $H={GenerallyAvailable:"GenerallyAvailable",Beta:"Beta",Deprecated:"Deprecated",_visit:(e,t)=>{switch(e){case $H.GenerallyAvailable:return t.generallyAvailable();case $H.Beta:return t.beta();case $H.Deprecated:return t.deprecated();default:return t._other()}}};var r7e={cursor:e=>({...e,type:"cursor",_visit:function(t){return r7e._visit(this,t)}}),offset:e=>({...e,type:"offset",_visit:function(t){return r7e._visit(this,t)}}),custom:e=>({...e,type:"custom",_visit:function(t){return r7e._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"cursor":return t.cursor(e);case"offset":return t.offset(e);case"custom":return t.custom(e);default:return t._other(e)}}};var $mi={language:e=>({...e,type:"language",_visit:function(t){return $mi._visit(this,t)}}),sdk:e=>({...e,type:"sdk",_visit:function(t){return $mi._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"language":return t.language(e);case"sdk":return t.sdk(e);default:return t._other(e)}}};var GH={Curl:"curl",Python:"python",Javascript:"javascript",Typescript:"typescript",Go:"go",Ruby:"ruby",Csharp:"csharp",Java:"java",Js:"js",Node:"node",Ts:"ts",Nodets:"nodets",Golang:"golang",Dotnet:"dotnet",Jvm:"jvm",_visit:(e,t)=>{switch(e){case GH.Curl:return t.curl();case GH.Python:return t.python();case GH.Javascript:return t.javascript();case GH.Typescript:return t.typescript();case GH.Go:return t.go();case GH.Ruby:return t.ruby();case GH.Csharp:return t.csharp();case GH.Java:return t.java();case GH.Js:return t.js();case GH.Node:return t.node();case GH.Ts:return t.ts();case GH.Nodets:return t.nodets();case GH.Golang:return t.golang();case GH.Dotnet:return t.dotnet();case GH.Jvm:return t.jvm();default:return t._other()}}};var hQt={unknown:e=>({value:e,type:"unknown",_visit:function(t){return hQt._visit(this,t)}}),full:e=>({...e,type:"full",_visit:function(t){return hQt._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"unknown":return t.unknown(e.value);case"full":return t.full(e);default:return t._other(e)}}};var yQt={withStreaming:e=>({...e,type:"withStreaming",_visit:function(t){return yQt._visit(this,t)}}),withoutStreaming:e=>({value:e,type:"withoutStreaming",_visit:function(t){return yQt._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"withStreaming":return t.withStreaming(e);case"withoutStreaming":return t.withoutStreaming(e.value);default:return t._other(e)}}};var QH={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD",Options:"OPTIONS",Trace:"TRACE",_visit:(e,t)=>{switch(e){case QH.Get:return t.get();case QH.Post:return t.post();case QH.Put:return t.put();case QH.Patch:return t.patch();case QH.Delete:return t.delete();case QH.Head:return t.head();case QH.Options:return t.options();case QH.Trace:return t.trace();default:return t._other()}}};var INi={octetStream:e=>({...e,type:"octetStream",_visit:function(t){return INi._visit(this,t)}}),multipart:e=>({...e,type:"multipart",_visit:function(t){return INi._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return INi._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"octetStream":return t.octetStream(e);case"multipart":return t.multipart(e);case"json":return t.json(e);default:return t._other(e)}}};var Gmi={file:e=>({...e,type:"file",_visit:function(t){return Gmi._visit(this,t)}}),json:e=>({value:e,type:"json",_visit:function(t){return Gmi._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"json":return t.json(e.value);default:return t._other(e)}}};var aK={file:e=>({...e,type:"file",_visit:function(t){return aK._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return aK._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return aK._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return aK._visit(this,t)}}),streamingSse:e=>({...e,type:"streamingSse",_visit:function(t){return aK._visit(this,t)}}),streamingText:e=>({...e,type:"streamingText",_visit:function(t){return aK._visit(this,t)}}),streamingJson:e=>({...e,type:"streamingJson",_visit:function(t){return aK._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"json":return t.json(e);case"text":return t.text(e);case"bytes":return t.bytes(e);case"streamingSse":return t.streamingSse(e);case"streamingText":return t.streamingText(e);case"streamingJson":return t.streamingJson(e);default:return t._other(e)}}};var cv={primitive:e=>({...e,type:"primitive",_visit:function(t){return cv._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return cv._visit(this,t)}}),array:e=>({...e,type:"array",_visit:function(t){return cv._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return cv._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return cv._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return cv._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return cv._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return cv._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return cv._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return cv._visit(this,t)}}),unknown:e=>({...e,type:"unknown",_visit:function(t){return cv._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e);case"object":return t.object(e);case"array":return t.array(e);case"map":return t.map(e);case"optional":return t.optional(e);case"enum":return t.enum(e);case"reference":return t.reference(e);case"literal":return t.literal(e);case"oneOf":return t.oneOf(e.value);case"nullable":return t.nullable(e);case"unknown":return t.unknown(e);default:return t._other(e)}}};var jw={int:e=>({...e,type:"int",_visit:function(t){return jw._visit(this,t)}}),int64:e=>({...e,type:"int64",_visit:function(t){return jw._visit(this,t)}}),uint:()=>({type:"uint",_visit:function(e){return jw._visit(this,e)}}),uint64:()=>({type:"uint64",_visit:function(e){return jw._visit(this,e)}}),float:()=>({type:"float",_visit:function(e){return jw._visit(this,e)}}),double:e=>({...e,type:"double",_visit:function(t){return jw._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return jw._visit(this,t)}}),datetime:()=>({type:"datetime",_visit:function(e){return jw._visit(this,e)}}),date:()=>({type:"date",_visit:function(e){return jw._visit(this,e)}}),base64:()=>({type:"base64",_visit:function(e){return jw._visit(this,e)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return jw._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"int":return t.int(e);case"int64":return t.int64(e);case"uint":return t.uint();case"uint64":return t.uint64();case"float":return t.float();case"double":return t.double(e);case"string":return t.string(e);case"datetime":return t.datetime();case"date":return t.date();case"base64":return t.base64();case"boolean":return t.boolean(e);default:return t._other(e)}}};var Kz={boolean:e=>({value:e,type:"boolean",_visit:function(t){return Kz._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return Kz._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"boolean":return t.boolean(e.value);case"string":return t.string(e.value);default:return t._other(e)}}};var Qmi={discriminated:e=>({...e,type:"discriminated",_visit:function(t){return Qmi._visit(this,t)}}),undiscriminated:e=>({...e,type:"undiscriminated",_visit:function(t){return Qmi._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"discriminated":return t.discriminated(e);case"undiscriminated":return t.undiscriminated(e);default:return t._other(e)}}};var ZAe={octetStream:e=>({...e,type:"octetStream",_visit:function(t){return ZAe._visit(this,t)}}),multipart:e=>({...e,type:"multipart",_visit:function(t){return ZAe._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return ZAe._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"octetStream":return t.octetStream(e);case"multipart":return t.multipart(e);case"json":return t.json(e);default:return t._other(e)}}};var iB={file:e=>({...e,type:"file",_visit:function(t){return iB._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return iB._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return iB._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return iB._visit(this,t)}}),streamingSse:e=>({...e,type:"streamingSse",_visit:function(t){return iB._visit(this,t)}}),streamingText:e=>({...e,type:"streamingText",_visit:function(t){return iB._visit(this,t)}}),streamingJson:e=>({...e,type:"streamingJson",_visit:function(t){return iB._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"json":return t.json(e);case"text":return t.text(e);case"bytes":return t.bytes(e);case"streamingSse":return t.streamingSse(e);case"streamingText":return t.streamingText(e);case"streamingJson":return t.streamingJson(e);default:return t._other(e)}}};var Al={primitive:e=>({...e,type:"primitive",_visit:function(t){return Al._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return Al._visit(this,t)}}),array:e=>({...e,type:"array",_visit:function(t){return Al._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return Al._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return Al._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return Al._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return Al._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return Al._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return Al._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return Al._visit(this,t)}}),unknown:e=>({...e,type:"unknown",_visit:function(t){return Al._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e);case"object":return t.object(e);case"array":return t.array(e);case"map":return t.map(e);case"optional":return t.optional(e);case"enum":return t.enum(e);case"reference":return t.reference(e);case"literal":return t.literal(e);case"oneOf":return t.oneOf(e.value);case"nullable":return t.nullable(e);case"unknown":return t.unknown(e);default:return t._other(e)}}};var nee={discriminated:e=>({...e,type:"discriminated",_visit:function(t){return nee._visit(this,t)}}),undiscriminated:e=>({...e,type:"undiscriminated",_visit:function(t){return nee._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"discriminated":return t.discriminated(e);case"undiscriminated":return t.undiscriminated(e);default:return t._other(e)}}};var np={int:e=>({...e,type:"int",_visit:function(t){return np._visit(this,t)}}),int64:e=>({...e,type:"int64",_visit:function(t){return np._visit(this,t)}}),uint:e=>({...e,type:"uint",_visit:function(t){return np._visit(this,t)}}),uint64:e=>({...e,type:"uint64",_visit:function(t){return np._visit(this,t)}}),float:e=>({...e,type:"float",_visit:function(t){return np._visit(this,t)}}),double:e=>({...e,type:"double",_visit:function(t){return np._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return np._visit(this,t)}}),datetime:e=>({...e,type:"datetime",_visit:function(t){return np._visit(this,t)}}),date:e=>({...e,type:"date",_visit:function(t){return np._visit(this,t)}}),base64:e=>({...e,type:"base64",_visit:function(t){return np._visit(this,t)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return np._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"int":return t.int(e);case"int64":return t.int64(e);case"uint":return t.uint(e);case"uint64":return t.uint64(e);case"float":return t.float(e);case"double":return t.double(e);case"string":return t.string(e);case"datetime":return t.datetime(e);case"date":return t.date(e);case"base64":return t.base64(e);case"boolean":return t.boolean(e);default:return t._other(e)}}};var Yv={};Po(Yv,{AllOfPropertyConflict:()=>hKn,ArraySchema:()=>Cnu,ArraySchemaWithExample:()=>oau,Availability:()=>Diu,Base64WithExample:()=>tau,BasicSecurityScheme:()=>Aiu,BearerSecurityScheme:()=>qiu,BooleanSchema:()=>Dnu,BooleanWithExample:()=>rau,BytesResponse:()=>oKn,CasingOverrides:()=>Biu,CommonProperty:()=>Lnu,CommonPropertyWithExample:()=>hau,CursorPagination:()=>cnu,CustomCodeSample:()=>unu,CustomCodeSampleLanguage:()=>nnu,CustomCodeSampleSdk:()=>onu,CustomPagination:()=>fnu,DateWithExample:()=>eau,DatetimeWithExample:()=>knu,DiscriminatedOneOfSchema:()=>Nnu,DiscriminatedOneOfSchemaWithExample:()=>pau,DoubleSchema:()=>wnu,DoubleWithExample:()=>Xnu,Encoding:()=>Siu,Endpoint:()=>dnu,EndpointExample:()=>lKn,EndpointResponseExample:()=>inu,EndpointSdkName:()=>gor,EndpointWithExample:()=>Ew_,EnumSchema:()=>YJn,EnumSchemaWithExample:()=>nau,EnumValue:()=>xNi,ErrorExample:()=>Ziu,FernExample:()=>enu,FileResponse:()=>nKn,FileSchema:()=>$iu,FloatWithExample:()=>Ynu,FullEndpointExample:()=>snu,FullExample:()=>PT,FullObjectExample:()=>Liu,FullOneOfExample:()=>Viu,GlobalHeader:()=>Mnu,Header:()=>FNi,HeaderExample:()=>cKn,HeaderSecurityScheme:()=>Tiu,HeaderWithExample:()=>VNi,HttpEndpointServer:()=>uKn,HttpError:()=>kiu,HttpErrorWithExample:()=>$nu,HttpMethod:()=>kJn,IdempotencyHeader:()=>Anu,Int64WithExample:()=>Qnu,IntSchema:()=>Pnu,IntWithExample:()=>Gnu,JsonRequest:()=>Kiu,JsonRequestWithExample:()=>Vnu,JsonResponse:()=>aKn,JsonResponseWithExample:()=>bKn,KeyValuePair:()=>Uiu,LiteralExample:()=>Fiu,LiteralSchema:()=>_Kn,LiteralSchemaValue:()=>qnu,LongSchema:()=>jnu,MapSchema:()=>Bnu,MapSchemaWithExample:()=>uau,MultipartRequest:()=>iKn,MultipartRequestProperty:()=>Jiu,MultipartRequestPropertyEncoding:()=>Qiu,MultipartSchema:()=>Giu,NamedFullExample:()=>mor,Namespace:()=>Iiu,NamespaceId:()=>Niu,NullableSchema:()=>znu,NullableSchemaWithExample:()=>cau,OauthSecurityScheme:()=>Riu,ObjectProperty:()=>xnu,ObjectPropertyConflictInfo:()=>yKn,ObjectPropertyWithExample:()=>dau,ObjectSchema:()=>Tnu,ObjectSchemaWithExample:()=>lau,OctetStreamRequest:()=>rKn,OffsetPagination:()=>lnu,OneOfSchema:()=>Rnu,OneOfSchemaWithExample:()=>fau,OpenApiIntermediateRepresentation:()=>Sw_,OpenApiSource:()=>miu,OptionalSchema:()=>Inu,OptionalSchemaWithExample:()=>sau,Pagination:()=>fKn,PathParameter:()=>eKn,PathParameterExample:()=>tnu,PathParameterWithExample:()=>Unu,PrimitiveExample:()=>ZJn,PrimitiveSchema:()=>UNi,PrimitiveSchemaValue:()=>Enu,PrimitiveSchemaValueWithExample:()=>iau,PrimitiveSchemaWithExample:()=>gKn,PropertyKey:()=>XJn,ProtobufEncoding:()=>wiu,ProtobufSource:()=>Piu,QueryParameter:()=>tKn,QueryParameterExample:()=>sKn,QueryParameterWithExample:()=>vKn,QuerySecurityScheme:()=>Ciu,ReferencedSchema:()=>Oor,Request:()=>Yiu,RequestWithExample:()=>Wnu,Response:()=>Xiu,ResponseWithExample:()=>Hnu,Schema:()=>$m,SchemaId:()=>aee,SchemaWithExample:()=>VA,Schemas:()=>mnu,SdkGroup:()=>ziu,SdkGroupInfo:()=>Wiu,SdkGroupName:()=>NNi,SecurityScheme:()=>xiu,SecuritySchemeId:()=>Miu,Server:()=>L5a,Source:()=>jiu,StatusCode:()=>bor,StreamingResponseExample:()=>rnu,StringSchema:()=>Snu,StringSchemaWithExample:()=>Znu,SupportedSdkLanguage:()=>anu,Tag:()=>Eiu,TagId:()=>oee,Tags:()=>Hiu,TextResponse:()=>LNi,Uint64WithExample:()=>Knu,UintWithExample:()=>Jnu,UnDiscriminatedOneOfSchema:()=>Fnu,UnDiscriminatedOneOfSchemaWithExample:()=>_au,UnknownSchemaWithExample:()=>aau,Webhook:()=>pnu,WebhookExampleCall:()=>pKn,WebhookHttpMethod:()=>dKn,WebhookWithExample:()=>Mw_,WebsocketChannel:()=>Onu,WebsocketHandshake:()=>_nu,WebsocketHandshakeWithExample:()=>Dw_,WebsocketMessageExample:()=>bnu,WebsocketMessageOrigin:()=>hnu,WebsocketMessageSchema:()=>ynu,WebsocketServer:()=>vnu,WebsocketSessionExample:()=>gnu,WithAvailability:()=>Gh,WithDescription:()=>mf,WithEncoding:()=>cue,WithInline:()=>bM,WithName:()=>k0,WithNamespace:()=>P0,WithSdkGroupName:()=>Em,WithSource:()=>_y,WithStatusCode:()=>i7e,WithTitle:()=>Dm,commons:()=>B1c,example:()=>I1c,finalIr:()=>z1c,parseIr:()=>R1c});var B1c={};Po(B1c,{BasicSecurityScheme:()=>Aiu,BearerSecurityScheme:()=>qiu,Encoding:()=>Siu,HeaderSecurityScheme:()=>Tiu,Namespace:()=>Iiu,NamespaceId:()=>Niu,OauthSecurityScheme:()=>Riu,OpenApiSource:()=>miu,ProtobufEncoding:()=>wiu,ProtobufSource:()=>Piu,QuerySecurityScheme:()=>Ciu,SchemaId:()=>aee,SdkGroup:()=>ziu,SdkGroupName:()=>NNi,SecurityScheme:()=>xiu,SecuritySchemeId:()=>Miu,Server:()=>L5a,Source:()=>jiu,StatusCode:()=>bor,Tag:()=>Eiu,TagId:()=>oee,WithAvailability:()=>Gh,WithDescription:()=>mf,WithEncoding:()=>cue,WithInline:()=>bM,WithName:()=>k0,WithNamespace:()=>P0,WithSdkGroupName:()=>Em,WithSource:()=>_y,WithStatusCode:()=>i7e,WithTitle:()=>Dm});var Mt={};Po(Mt,{JsonError:()=>QJn,ParseError:()=>JJn,any:()=>dw_,bigint:()=>kj_,boolean:()=>pw_,booleanLiteral:()=>fw_,date:()=>ew_,discriminant:()=>Pw_,enum_:()=>biu,getObjectLikeUtils:()=>vQt,getObjectUtils:()=>knn,getSchemaUtils:()=>mT,isProperty:()=>RNi,lazy:()=>tw_,lazyObject:()=>sw_,list:()=>Oiu,number:()=>_w_,object:()=>giu,objectWithoutOptionalProperties:()=>uw_,optional:()=>A1c,property:()=>iw_,record:()=>bw_,set:()=>gw_,string:()=>hw_,stringLiteral:()=>lw_,transform:()=>q1c,undiscriminatedUnion:()=>mw_,union:()=>ww_,unknown:()=>yw_,withParsedProperties:()=>C1c});var Zj={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",OPTIONAL:"optional"};function UA(e,t){return`Expected ${t}. Received ${hxE(e)}.`}function hxE(e){if(Array.isArray(e))return"list";if(e===null)return"null";if(e instanceof BigInt)return"BigInt";switch(typeof e){case"string":return`"${e}"`;case"bigint":case"number":case"boolean":case"undefined":return`${e}`}return typeof e}function KL(e){return{...e,json:Zj_(e.json),parse:Zj_(e.parse)}}function Zj_(e){return(t,r)=>{let i=e(t,r),{skipValidation:n=!1}=r??{};return!i.ok&&n?(console.warn(["Failed to validate.",...i.errors.map(a=>" - "+(a.path.length>0?`${a.path.join(".")}: ${a.message}`:a.message))].join(`
|