fern-api 0.64.21 → 0.64.22
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 +4 -4
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -1632,7 +1632,7 @@ ${r?e:" ".repeat(i)}`)}`}function jo(e){throw new Error("Unexpected value: "+JSO
|
|
|
1632
1632
|
`);return r.failAndThrow(u)}function XV1(e){return e.reduce((t,r)=>typeof r=="number"?t+"["+r+"]":t+(t===""?"":".")+r,"")}var Q={TYPESCRIPT:"fernapi/fern-typescript",TYPESCRIPT_SDK:"fernapi/fern-typescript-sdk",TYPESCRIPT_NODE_SDK:"fernapi/fern-typescript-node-sdk",TYPESCRIPT_BROWSER_SDK:"fernapi/fern-typescript-browser-sdk",TYPESCRIPT_EXPRESS:"fernapi/fern-typescript-express",JAVA:"fernapi/fern-java",JAVA_MODEL:"fernapi/java-model",JAVA_SDK:"fernapi/fern-java-sdk",JAVA_SPRING:"fernapi/fern-java-spring",PYTHON_FASTAPI:"fernapi/fern-fastapi-server",PYTHON_PYDANTIC:"fernapi/fern-pydantic-model",PYTHON_SDK:"fernapi/fern-python-sdk",GO_MODEL:"fernapi/fern-go-model",GO_SDK:"fernapi/fern-go-sdk",GO_FIBER:"fernapi/fern-go-fiber",RUBY_MODEL:"fernapi/fern-ruby-model",RUBY_SDK:"fernapi/fern-ruby-sdk",CSHARP_MODEL:"fernapi/fern-csharp-model",CSHARP_SDK:"fernapi/fern-csharp-sdk",SWIFT_MODEL:"fernapi/fern-swift-model",SWIFT_SDK:"fernapi/fern-swift-sdk",PHP_MODEL:"fernapi/fern-php-model",PHP_SDK:"fernapi/fern-php-sdk",OPENAPI:"fernapi/fern-openapi",STOPLIGHT:"fernapi/fern-stoplight",POSTMAN:"fernapi/fern-postman",OPENAPI_PYTHON_CLIENT:"fernapi/openapi-python-client"};var UCn=ai(require("path"),1),D0d=require("url");var m0d=ai(require("process"),1),P0d=ai(require("path"),1),Rvo=ai(require("fs"),1),j0d=require("url");var Czs=class{value;next;constructor(t){this.value=t}},tja=class{#e;#t;#r;constructor(){this.clear()}enqueue(t){let r=new Czs(t);this.#e?(this.#t.next=r,this.#t=r):(this.#e=r,this.#t=r),this.#r++}dequeue(){let t=this.#e;if(t)return this.#e=this.#e.next,this.#r--,t.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#r=0}get size(){return this.#r}*[Symbol.iterator](){let t=this.#e;for(;t;)yield t.value,t=t.next}*drain(){for(;this.#e;)yield this.dequeue()}};function zvo(e){if(!((Number.isInteger(e)||e===Number.POSITIVE_INFINITY)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=new tja,r=0,i=()=>{r--,t.size>0&&t.dequeue()()},n=async(l,d,s)=>{r++;let o=(async()=>l(...s))();d(o);try{await o}catch{}i()},a=(l,d,s)=>{t.enqueue(n.bind(void 0,l,d,s)),(async()=>(await Promise.resolve(),r<e&&t.size>0&&t.dequeue()()))()},u=(l,...d)=>new Promise(s=>{a(l,s,d)});return Object.defineProperties(u,{activeCount:{get:()=>r},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),u}var xvo=class extends Error{constructor(t){super(),this.value=t}},ZV1=async(e,t)=>t(await e),kV1=async e=>{let t=await Promise.all(e);if(t[1]===!0)throw new xvo(t[0]);return!1};async function Bzs(e,t,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:i=!0}={}){let n=zvo(r),a=[...e].map(l=>[l,n(ZV1,l,t)]),u=zvo(i?1:Number.POSITIVE_INFINITY);try{await Promise.all(a.map(l=>u(kV1,l)))}catch(l){if(l instanceof xvo)return l.value;throw l}}var w0d={directory:"isDirectory",file:"isFile"};function eW1(e){if(!Object.hasOwnProperty.call(w0d,e))throw new Error(`Invalid type specified: ${e}`)}var tW1=(e,t)=>t[w0d[e]](),rW1=e=>e instanceof URL?(0,j0d.fileURLToPath)(e):e;async function Izs(e,{cwd:t=m0d.default.cwd(),type:r="file",allowSymlinks:i=!0,concurrency:n,preserveOrder:a}={}){eW1(r),t=rW1(t);let u=i?Rvo.promises.stat:Rvo.promises.lstat;return Bzs(e,async l=>{try{let d=await u(P0d.default.resolve(t,l));return tW1(r,d)}catch{return!1}},{concurrency:n,preserveOrder:a})}var S0d=ai(require("fs"),1);var iW1=e=>e instanceof URL?(0,D0d.fileURLToPath)(e):e,nW1=Symbol("findUpStop");async function aW1(e,t={}){let r=UCn.default.resolve(iW1(t.cwd)||""),{root:i}=UCn.default.parse(r),n=UCn.default.resolve(r,t.stopAt||i),a=t.limit||Number.POSITIVE_INFINITY,u=[e].flat(),l=async s=>{if(typeof e!="function")return Izs(u,s);let o=await e(s.cwd);return typeof o=="string"?Izs([o],s):o},d=[];for(;;){let s=await l({...t,cwd:r});if(s===nW1||(s&&d.push(UCn.default.resolve(r,s)),r===n||d.length>=a))break;r=UCn.default.dirname(r)}return d}async function YM(e,t={}){return(await aW1(e,{...t,limit:1}))[0]}var HV="fern",n9="definition",Nvo="openapi",E0d="changelog",M0d="asyncapi",VF="api.yml",mUi="__package__",TS=`${mUi}.yml`,Fvo="dependencies.yml",WF="generators.yml",A0d="dependencies.yml",XUt="docs.yml",Tie="fern.config.json",zzs="api",Lvo=".fernignore";var Uvo="default-group";var bji="apis",rja="local";var du={};Dn(du,{BRAND:()=>TW1,DIRTY:()=>PUi,EMPTY_PATH:()=>cW1,INVALID:()=>m0,NEVER:()=>hH1,OK:()=>XG,ParseStatus:()=>$V,Schema:()=>Jj,ZodAny:()=>mji,ZodArray:()=>Lci,ZodBigInt:()=>wUi,ZodBoolean:()=>SUi,ZodBranded:()=>nja,ZodCatch:()=>xUi,ZodDate:()=>DUi,ZodDefault:()=>zUi,ZodDiscriminatedUnion:()=>Hvo,ZodEffects:()=>pxe,ZodEnum:()=>BUi,ZodError:()=>Cie,ZodFirstPartyTypeKind:()=>$0,ZodFunction:()=>Gvo,ZodIntersection:()=>qUi,ZodIssueCode:()=>Al,ZodLazy:()=>TUi,ZodLiteral:()=>CUi,ZodMap:()=>QCn,ZodNaN:()=>KCn,ZodNativeEnum:()=>IUi,ZodNever:()=>ZUt,ZodNull:()=>MUi,ZodNullable:()=>tXt,ZodNumber:()=>jUi,ZodObject:()=>Bie,ZodOptional:()=>fxe,ZodParsedType:()=>j_,ZodPipeline:()=>aja,ZodPromise:()=>Pji,ZodReadonly:()=>RUi,ZodRecord:()=>$vo,ZodSchema:()=>Jj,ZodSet:()=>JCn,ZodString:()=>Oji,ZodSymbol:()=>$Cn,ZodTransformer:()=>pxe,ZodTuple:()=>eXt,ZodType:()=>Jj,ZodUndefined:()=>EUi,ZodUnion:()=>AUi,ZodUnknown:()=>Fci,ZodVoid:()=>GCn,addIssueToContext:()=>Ep,any:()=>LW1,array:()=>HW1,bigint:()=>zW1,boolean:()=>L0d,coerce:()=>_H1,custom:()=>R0d,date:()=>xW1,datetimeRegex:()=>z0d,defaultErrorMap:()=>Rci,discriminatedUnion:()=>JW1,effect:()=>oH1,enum:()=>iH1,function:()=>eH1,getErrorMap:()=>VCn,getParsedType:()=>kYt,instanceof:()=>BW1,intersection:()=>KW1,isAborted:()=>Vvo,isAsync:()=>WCn,isDirty:()=>Wvo,isValid:()=>gji,late:()=>CW1,lazy:()=>tH1,literal:()=>rH1,makeIssue:()=>ija,map:()=>ZW1,nan:()=>IW1,nativeEnum:()=>nH1,never:()=>VW1,null:()=>FW1,nullable:()=>sH1,number:()=>F0d,object:()=>$W1,objectUtil:()=>xzs,oboolean:()=>pH1,onumber:()=>dH1,optional:()=>uH1,ostring:()=>fH1,pipeline:()=>lH1,preprocess:()=>cH1,promise:()=>aH1,quotelessJson:()=>oW1,record:()=>XW1,set:()=>kW1,setErrorMap:()=>sW1,strictObject:()=>GW1,string:()=>N0d,symbol:()=>RW1,transformer:()=>oH1,tuple:()=>YW1,undefined:()=>NW1,union:()=>QW1,unknown:()=>UW1,util:()=>CS,void:()=>WW1});var CS;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let a={};for(let u of n)a[u]=u;return a},e.getValidEnumValues=n=>{let a=e.objectKeys(n).filter(l=>typeof n[n[l]]!="number"),u={};for(let l of a)u[l]=n[l];return e.objectValues(u)},e.objectValues=n=>e.objectKeys(n).map(function(a){return n[a]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let u in n)Object.prototype.hasOwnProperty.call(n,u)&&a.push(u);return a},e.find=(n,a)=>{for(let u of n)if(a(u))return u},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function i(n,a=" | "){return n.map(u=>typeof u=="string"?`'${u}'`:u).join(a)}e.joinValues=i,e.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(CS||(CS={}));var xzs;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(xzs||(xzs={}));var j_=CS.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),kYt=e=>{switch(typeof e){case"undefined":return j_.undefined;case"string":return j_.string;case"number":return Number.isNaN(e)?j_.nan:j_.number;case"boolean":return j_.boolean;case"function":return j_.function;case"bigint":return j_.bigint;case"symbol":return j_.symbol;case"object":return Array.isArray(e)?j_.array:e===null?j_.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?j_.promise:typeof Map<"u"&&e instanceof Map?j_.map:typeof Set<"u"&&e instanceof Set?j_.set:typeof Date<"u"&&e instanceof Date?j_.date:j_.object;default:return j_.unknown}};var Al=CS.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),oW1=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Cie=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(a){return a.message},i={_errors:[]},n=a=>{for(let u of a.issues)if(u.code==="invalid_union")u.unionErrors.map(n);else if(u.code==="invalid_return_type")n(u.returnTypeError);else if(u.code==="invalid_arguments")n(u.argumentsError);else if(u.path.length===0)i._errors.push(r(u));else{let l=i,d=0;for(;d<u.path.length;){let s=u.path[d];d===u.path.length-1?(l[s]=l[s]||{_errors:[]},l[s]._errors.push(r(u))):l[s]=l[s]||{_errors:[]},l=l[s],d++}}};return n(this),i}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,CS.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},i=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};Cie.create=e=>new Cie(e);var uW1=(e,t)=>{let r;switch(e.code){case Al.invalid_type:e.received===j_.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Al.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,CS.jsonStringifyReplacer)}`;break;case Al.unrecognized_keys:r=`Unrecognized key(s) in object: ${CS.joinValues(e.keys,", ")}`;break;case Al.invalid_union:r="Invalid input";break;case Al.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${CS.joinValues(e.options)}`;break;case Al.invalid_enum_value:r=`Invalid enum value. Expected ${CS.joinValues(e.options)}, received '${e.received}'`;break;case Al.invalid_arguments:r="Invalid function arguments";break;case Al.invalid_return_type:r="Invalid function return type";break;case Al.invalid_date:r="Invalid date";break;case Al.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:CS.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Al.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Al.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Al.custom:r="Invalid input";break;case Al.invalid_intersection_types:r="Intersection results could not be merged";break;case Al.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Al.not_finite:r="Number must be finite";break;default:r=t.defaultError,CS.assertNever(e)}return{message:r}},Rci=uW1;var q0d=Rci;function sW1(e){q0d=e}function VCn(){return q0d}var ija=e=>{let{data:t,path:r,errorMaps:i,issueData:n}=e,a=[...r,...n.path||[]],u={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let l="",d=i.filter(s=>!!s).slice().reverse();for(let s of d)l=s(u,{data:t,defaultError:l}).message;return{...n,path:a,message:l}},cW1=[];function Ep(e,t){let r=VCn(),i=ija({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Rci?void 0:Rci].filter(n=>!!n)});e.common.issues.push(i)}var $V=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let i=[];for(let n of r){if(n.status==="aborted")return m0;n.status==="dirty"&&t.dirty(),i.push(n.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,r){let i=[];for(let n of r){let a=await n.key,u=await n.value;i.push({key:a,value:u})}return e.mergeObjectSync(t,i)}static mergeObjectSync(t,r){let i={};for(let n of r){let{key:a,value:u}=n;if(a.status==="aborted"||u.status==="aborted")return m0;a.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof u.value<"u"||n.alwaysSet)&&(i[a.value]=u.value)}return{status:t.value,value:i}}},m0=Object.freeze({status:"aborted"}),PUi=e=>({status:"dirty",value:e}),XG=e=>({status:"valid",value:e}),Vvo=e=>e.status==="aborted",Wvo=e=>e.status==="dirty",gji=e=>e.status==="valid",WCn=e=>typeof Promise<"u"&&e instanceof Promise;var Uy;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Uy||(Uy={}));var dxe=class{constructor(t,r,i,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=i,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},T0d=(e,t)=>{if(gji(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Cie(e.common.issues);return this._error=r,this._error}}};function AP(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:i,description:n}=e;if(t&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(u,l)=>{let{message:d}=e;return u.code==="invalid_enum_value"?{message:d??l.defaultError}:typeof l.data>"u"?{message:d??i??l.defaultError}:u.code!=="invalid_type"?{message:l.defaultError}:{message:d??r??l.defaultError}},description:n}}var Jj=class{get description(){return this._def.description}_getType(t){return kYt(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:kYt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $V,ctx:{common:t.parent.common,data:t.data,parsedType:kYt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(WCn(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let i=this.safeParse(t,r);if(i.success)return i.data;throw i.error}safeParse(t,r){let i={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:kYt(t)},n=this._parseSync({data:t,path:i.path,parent:i});return T0d(i,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:kYt(t)};if(!this["~standard"].async)try{let i=this._parseSync({data:t,path:[],parent:r});return gji(i)?{value:i.value}:{issues:r.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(i=>gji(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(t,r){let i=await this.safeParseAsync(t,r);if(i.success)return i.data;throw i.error}async safeParseAsync(t,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:kYt(t)},n=this._parse({data:t,path:i.path,parent:i}),a=await(WCn(n)?n:Promise.resolve(n));return T0d(i,a)}refine(t,r){let i=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,a)=>{let u=t(n),l=()=>a.addIssue({code:Al.custom,...i(n)});return typeof Promise<"u"&&u instanceof Promise?u.then(d=>d?!0:(l(),!1)):u?!0:(l(),!1)})}refinement(t,r){return this._refinement((i,n)=>t(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(t){return new pxe({schema:this,typeName:$0.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return fxe.create(this,this._def)}nullable(){return tXt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Lci.create(this)}promise(){return Pji.create(this,this._def)}or(t){return AUi.create([this,t],this._def)}and(t){return qUi.create(this,t,this._def)}transform(t){return new pxe({...AP(this._def),schema:this,typeName:$0.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new zUi({...AP(this._def),innerType:this,defaultValue:r,typeName:$0.ZodDefault})}brand(){return new nja({typeName:$0.ZodBranded,type:this,...AP(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new xUi({...AP(this._def),innerType:this,catchValue:r,typeName:$0.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return aja.create(this,t)}readonly(){return RUi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},lW1=/^c[^\s-]{8,}$/i,fW1=/^[0-9a-z]+$/,dW1=/^[0-9A-HJKMNP-TV-Z]{26}$/i,pW1=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,_W1=/^[a-z0-9_-]{21}$/i,hW1=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,yW1=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,vW1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,bW1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Rzs,gW1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,OW1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,mW1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,PW1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,jW1=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,wW1=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,B0d="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",SW1=new RegExp(`^${B0d}$`);function I0d(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function DW1(e){return new RegExp(`^${I0d(e)}$`)}function z0d(e){let t=`${B0d}T${I0d(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function EW1(e,t){return!!((t==="v4"||!t)&&gW1.test(e)||(t==="v6"||!t)&&mW1.test(e))}function MW1(e,t){if(!hW1.test(e))return!1;try{let[r]=e.split("."),i=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(i));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return!1}}function AW1(e,t){return!!((t==="v4"||!t)&&OW1.test(e)||(t==="v6"||!t)&&PW1.test(e))}var Oji=class e extends Jj{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==j_.string){let a=this._getOrReturnCtx(t);return Ep(a,{code:Al.invalid_type,expected:j_.string,received:a.parsedType}),m0}let i=new $V,n;for(let a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(n=this._getOrReturnCtx(t,n),Ep(n,{code:Al.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="max")t.data.length>a.value&&(n=this._getOrReturnCtx(t,n),Ep(n,{code:Al.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="length"){let u=t.data.length>a.value,l=t.data.length<a.value;(u||l)&&(n=this._getOrReturnCtx(t,n),u?Ep(n,{code:Al.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):l&&Ep(n,{code:Al.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),i.dirty())}else if(a.kind==="email")vW1.test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"email",code:Al.invalid_string,message:a.message}),i.dirty());else if(a.kind==="emoji")Rzs||(Rzs=new RegExp(bW1,"u")),Rzs.test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"emoji",code:Al.invalid_string,message:a.message}),i.dirty());else if(a.kind==="uuid")pW1.test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"uuid",code:Al.invalid_string,message:a.message}),i.dirty());else if(a.kind==="nanoid")_W1.test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"nanoid",code:Al.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid")lW1.test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"cuid",code:Al.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid2")fW1.test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"cuid2",code:Al.invalid_string,message:a.message}),i.dirty());else if(a.kind==="ulid")dW1.test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"ulid",code:Al.invalid_string,message:a.message}),i.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),Ep(n,{validation:"url",code:Al.invalid_string,message:a.message}),i.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"regex",code:Al.invalid_string,message:a.message}),i.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(t,n),Ep(n,{code:Al.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),i.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(n=this._getOrReturnCtx(t,n),Ep(n,{code:Al.invalid_string,validation:{startsWith:a.value},message:a.message}),i.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(n=this._getOrReturnCtx(t,n),Ep(n,{code:Al.invalid_string,validation:{endsWith:a.value},message:a.message}),i.dirty()):a.kind==="datetime"?z0d(a).test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{code:Al.invalid_string,validation:"datetime",message:a.message}),i.dirty()):a.kind==="date"?SW1.test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{code:Al.invalid_string,validation:"date",message:a.message}),i.dirty()):a.kind==="time"?DW1(a).test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{code:Al.invalid_string,validation:"time",message:a.message}),i.dirty()):a.kind==="duration"?yW1.test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"duration",code:Al.invalid_string,message:a.message}),i.dirty()):a.kind==="ip"?EW1(t.data,a.version)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"ip",code:Al.invalid_string,message:a.message}),i.dirty()):a.kind==="jwt"?MW1(t.data,a.alg)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"jwt",code:Al.invalid_string,message:a.message}),i.dirty()):a.kind==="cidr"?AW1(t.data,a.version)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"cidr",code:Al.invalid_string,message:a.message}),i.dirty()):a.kind==="base64"?jW1.test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"base64",code:Al.invalid_string,message:a.message}),i.dirty()):a.kind==="base64url"?wW1.test(t.data)||(n=this._getOrReturnCtx(t,n),Ep(n,{validation:"base64url",code:Al.invalid_string,message:a.message}),i.dirty()):CS.assertNever(a);return{status:i.value,value:t.data}}_regex(t,r,i){return this.refinement(n=>t.test(n),{validation:r,code:Al.invalid_string,...Uy.errToObj(i)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Uy.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Uy.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Uy.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Uy.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Uy.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Uy.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Uy.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Uy.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Uy.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Uy.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Uy.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Uy.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Uy.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Uy.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Uy.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Uy.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Uy.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...Uy.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Uy.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Uy.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Uy.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Uy.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Uy.errToObj(r)})}nonempty(t){return this.min(1,Uy.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Oji.create=e=>new Oji({checks:[],typeName:$0.ZodString,coerce:e?.coerce??!1,...AP(e)});function qW1(e,t){let r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i,a=Number.parseInt(e.toFixed(n).replace(".","")),u=Number.parseInt(t.toFixed(n).replace(".",""));return a%u/10**n}var jUi=class e extends Jj{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==j_.number){let a=this._getOrReturnCtx(t);return Ep(a,{code:Al.invalid_type,expected:j_.number,received:a.parsedType}),m0}let i,n=new $V;for(let a of this._def.checks)a.kind==="int"?CS.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),Ep(i,{code:Al.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(i=this._getOrReturnCtx(t,i),Ep(i,{code:Al.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(i=this._getOrReturnCtx(t,i),Ep(i,{code:Al.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?qW1(t.data,a.value)!==0&&(i=this._getOrReturnCtx(t,i),Ep(i,{code:Al.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),Ep(i,{code:Al.not_finite,message:a.message}),n.dirty()):CS.assertNever(a);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Uy.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Uy.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Uy.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Uy.toString(r))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:Uy.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Uy.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Uy.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Uy.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Uy.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Uy.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Uy.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Uy.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Uy.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Uy.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&CS.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(r)&&Number.isFinite(t)}};jUi.create=e=>new jUi({checks:[],typeName:$0.ZodNumber,coerce:e?.coerce||!1,...AP(e)});var wUi=class e extends Jj{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==j_.bigint)return this._getInvalidInput(t);let i,n=new $V;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(i=this._getOrReturnCtx(t,i),Ep(i,{code:Al.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(i=this._getOrReturnCtx(t,i),Ep(i,{code:Al.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),Ep(i,{code:Al.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):CS.assertNever(a);return{status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return Ep(r,{code:Al.invalid_type,expected:j_.bigint,received:r.parsedType}),m0}gte(t,r){return this.setLimit("min",t,!0,Uy.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Uy.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Uy.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Uy.toString(r))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:Uy.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Uy.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Uy.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Uy.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Uy.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Uy.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};wUi.create=e=>new wUi({checks:[],typeName:$0.ZodBigInt,coerce:e?.coerce??!1,...AP(e)});var SUi=class extends Jj{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==j_.boolean){let i=this._getOrReturnCtx(t);return Ep(i,{code:Al.invalid_type,expected:j_.boolean,received:i.parsedType}),m0}return XG(t.data)}};SUi.create=e=>new SUi({typeName:$0.ZodBoolean,coerce:e?.coerce||!1,...AP(e)});var DUi=class e extends Jj{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==j_.date){let a=this._getOrReturnCtx(t);return Ep(a,{code:Al.invalid_type,expected:j_.date,received:a.parsedType}),m0}if(Number.isNaN(t.data.getTime())){let a=this._getOrReturnCtx(t);return Ep(a,{code:Al.invalid_date}),m0}let i=new $V,n;for(let a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(n=this._getOrReturnCtx(t,n),Ep(n,{code:Al.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),i.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(n=this._getOrReturnCtx(t,n),Ep(n,{code:Al.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),i.dirty()):CS.assertNever(a);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Uy.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Uy.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};DUi.create=e=>new DUi({checks:[],coerce:e?.coerce||!1,typeName:$0.ZodDate,...AP(e)});var $Cn=class extends Jj{_parse(t){if(this._getType(t)!==j_.symbol){let i=this._getOrReturnCtx(t);return Ep(i,{code:Al.invalid_type,expected:j_.symbol,received:i.parsedType}),m0}return XG(t.data)}};$Cn.create=e=>new $Cn({typeName:$0.ZodSymbol,...AP(e)});var EUi=class extends Jj{_parse(t){if(this._getType(t)!==j_.undefined){let i=this._getOrReturnCtx(t);return Ep(i,{code:Al.invalid_type,expected:j_.undefined,received:i.parsedType}),m0}return XG(t.data)}};EUi.create=e=>new EUi({typeName:$0.ZodUndefined,...AP(e)});var MUi=class extends Jj{_parse(t){if(this._getType(t)!==j_.null){let i=this._getOrReturnCtx(t);return Ep(i,{code:Al.invalid_type,expected:j_.null,received:i.parsedType}),m0}return XG(t.data)}};MUi.create=e=>new MUi({typeName:$0.ZodNull,...AP(e)});var mji=class extends Jj{constructor(){super(...arguments),this._any=!0}_parse(t){return XG(t.data)}};mji.create=e=>new mji({typeName:$0.ZodAny,...AP(e)});var Fci=class extends Jj{constructor(){super(...arguments),this._unknown=!0}_parse(t){return XG(t.data)}};Fci.create=e=>new Fci({typeName:$0.ZodUnknown,...AP(e)});var ZUt=class extends Jj{_parse(t){let r=this._getOrReturnCtx(t);return Ep(r,{code:Al.invalid_type,expected:j_.never,received:r.parsedType}),m0}};ZUt.create=e=>new ZUt({typeName:$0.ZodNever,...AP(e)});var GCn=class extends Jj{_parse(t){if(this._getType(t)!==j_.undefined){let i=this._getOrReturnCtx(t);return Ep(i,{code:Al.invalid_type,expected:j_.void,received:i.parsedType}),m0}return XG(t.data)}};GCn.create=e=>new GCn({typeName:$0.ZodVoid,...AP(e)});var Lci=class e extends Jj{_parse(t){let{ctx:r,status:i}=this._processInputParams(t),n=this._def;if(r.parsedType!==j_.array)return Ep(r,{code:Al.invalid_type,expected:j_.array,received:r.parsedType}),m0;if(n.exactLength!==null){let u=r.data.length>n.exactLength.value,l=r.data.length<n.exactLength.value;(u||l)&&(Ep(r,{code:u?Al.too_big:Al.too_small,minimum:l?n.exactLength.value:void 0,maximum:u?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(Ep(r,{code:Al.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(Ep(r,{code:Al.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((u,l)=>n.type._parseAsync(new dxe(r,u,r.path,l)))).then(u=>$V.mergeArray(i,u));let a=[...r.data].map((u,l)=>n.type._parseSync(new dxe(r,u,r.path,l)));return $V.mergeArray(i,a)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:Uy.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:Uy.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:Uy.toString(r)}})}nonempty(t){return this.min(1,t)}};Lci.create=(e,t)=>new Lci({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$0.ZodArray,...AP(t)});function HCn(e){if(e instanceof Bie){let t={};for(let r in e.shape){let i=e.shape[r];t[r]=fxe.create(HCn(i))}return new Bie({...e._def,shape:()=>t})}else return e instanceof Lci?new Lci({...e._def,type:HCn(e.element)}):e instanceof fxe?fxe.create(HCn(e.unwrap())):e instanceof tXt?tXt.create(HCn(e.unwrap())):e instanceof eXt?eXt.create(e.items.map(t=>HCn(t))):e}var Bie=class e extends Jj{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=CS.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==j_.object){let s=this._getOrReturnCtx(t);return Ep(s,{code:Al.invalid_type,expected:j_.object,received:s.parsedType}),m0}let{status:i,ctx:n}=this._processInputParams(t),{shape:a,keys:u}=this._getCached(),l=[];if(!(this._def.catchall instanceof ZUt&&this._def.unknownKeys==="strip"))for(let s in n.data)u.includes(s)||l.push(s);let d=[];for(let s of u){let o=a[s],c=n.data[s];d.push({key:{status:"valid",value:s},value:o._parse(new dxe(n,c,n.path,s)),alwaysSet:s in n.data})}if(this._def.catchall instanceof ZUt){let s=this._def.unknownKeys;if(s==="passthrough")for(let o of l)d.push({key:{status:"valid",value:o},value:{status:"valid",value:n.data[o]}});else if(s==="strict")l.length>0&&(Ep(n,{code:Al.unrecognized_keys,keys:l}),i.dirty());else if(s!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let s=this._def.catchall;for(let o of l){let c=n.data[o];d.push({key:{status:"valid",value:o},value:s._parse(new dxe(n,c,n.path,o)),alwaysSet:o in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let s=[];for(let o of d){let c=await o.key,b=await o.value;s.push({key:c,value:b,alwaysSet:o.alwaysSet})}return s}).then(s=>$V.mergeObjectSync(i,s)):$V.mergeObjectSync(i,d)}get shape(){return this._def.shape()}strict(t){return Uy.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,i)=>{let n=this._def.errorMap?.(r,i).message??i.defaultError;return r.code==="unrecognized_keys"?{message:Uy.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$0.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let i of CS.objectKeys(t))t[i]&&this.shape[i]&&(r[i]=this.shape[i]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let i of CS.objectKeys(this.shape))t[i]||(r[i]=this.shape[i]);return new e({...this._def,shape:()=>r})}deepPartial(){return HCn(this)}partial(t){let r={};for(let i of CS.objectKeys(this.shape)){let n=this.shape[i];t&&!t[i]?r[i]=n:r[i]=n.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let i of CS.objectKeys(this.shape))if(t&&!t[i])r[i]=this.shape[i];else{let a=this.shape[i];for(;a instanceof fxe;)a=a._def.innerType;r[i]=a}return new e({...this._def,shape:()=>r})}keyof(){return x0d(CS.objectKeys(this.shape))}};Bie.create=(e,t)=>new Bie({shape:()=>e,unknownKeys:"strip",catchall:ZUt.create(),typeName:$0.ZodObject,...AP(t)});Bie.strictCreate=(e,t)=>new Bie({shape:()=>e,unknownKeys:"strict",catchall:ZUt.create(),typeName:$0.ZodObject,...AP(t)});Bie.lazycreate=(e,t)=>new Bie({shape:e,unknownKeys:"strip",catchall:ZUt.create(),typeName:$0.ZodObject,...AP(t)});var AUi=class extends Jj{_parse(t){let{ctx:r}=this._processInputParams(t),i=this._def.options;function n(a){for(let l of a)if(l.result.status==="valid")return l.result;for(let l of a)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;let u=a.map(l=>new Cie(l.ctx.common.issues));return Ep(r,{code:Al.invalid_union,unionErrors:u}),m0}if(r.common.async)return Promise.all(i.map(async a=>{let u={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:u}),ctx:u}})).then(n);{let a,u=[];for(let d of i){let s={...r,common:{...r.common,issues:[]},parent:null},o=d._parseSync({data:r.data,path:r.path,parent:s});if(o.status==="valid")return o;o.status==="dirty"&&!a&&(a={result:o,ctx:s}),s.common.issues.length&&u.push(s.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let l=u.map(d=>new Cie(d));return Ep(r,{code:Al.invalid_union,unionErrors:l}),m0}}get options(){return this._def.options}};AUi.create=(e,t)=>new AUi({options:e,typeName:$0.ZodUnion,...AP(t)});var Nci=e=>e instanceof TUi?Nci(e.schema):e instanceof pxe?Nci(e.innerType()):e instanceof CUi?[e.value]:e instanceof BUi?e.options:e instanceof IUi?CS.objectValues(e.enum):e instanceof zUi?Nci(e._def.innerType):e instanceof EUi?[void 0]:e instanceof MUi?[null]:e instanceof fxe?[void 0,...Nci(e.unwrap())]:e instanceof tXt?[null,...Nci(e.unwrap())]:e instanceof nja||e instanceof RUi?Nci(e.unwrap()):e instanceof xUi?Nci(e._def.innerType):[],Hvo=class e extends Jj{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==j_.object)return Ep(r,{code:Al.invalid_type,expected:j_.object,received:r.parsedType}),m0;let i=this.discriminator,n=r.data[i],a=this.optionsMap.get(n);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(Ep(r,{code:Al.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),m0)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,i){let n=new Map;for(let a of r){let u=Nci(a.shape[t]);if(!u.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let l of u){if(n.has(l))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);n.set(l,a)}}return new e({typeName:$0.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...AP(i)})}};function Nzs(e,t){let r=kYt(e),i=kYt(t);if(e===t)return{valid:!0,data:e};if(r===j_.object&&i===j_.object){let n=CS.objectKeys(t),a=CS.objectKeys(e).filter(l=>n.indexOf(l)!==-1),u={...e,...t};for(let l of a){let d=Nzs(e[l],t[l]);if(!d.valid)return{valid:!1};u[l]=d.data}return{valid:!0,data:u}}else if(r===j_.array&&i===j_.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let a=0;a<e.length;a++){let u=e[a],l=t[a],d=Nzs(u,l);if(!d.valid)return{valid:!1};n.push(d.data)}return{valid:!0,data:n}}else return r===j_.date&&i===j_.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var qUi=class extends Jj{_parse(t){let{status:r,ctx:i}=this._processInputParams(t),n=(a,u)=>{if(Vvo(a)||Vvo(u))return m0;let l=Nzs(a.value,u.value);return l.valid?((Wvo(a)||Wvo(u))&&r.dirty(),{status:r.value,value:l.data}):(Ep(i,{code:Al.invalid_intersection_types}),m0)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([a,u])=>n(a,u)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};qUi.create=(e,t,r)=>new qUi({left:e,right:t,typeName:$0.ZodIntersection,...AP(r)});var eXt=class e extends Jj{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==j_.array)return Ep(i,{code:Al.invalid_type,expected:j_.array,received:i.parsedType}),m0;if(i.data.length<this._def.items.length)return Ep(i,{code:Al.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m0;!this._def.rest&&i.data.length>this._def.items.length&&(Ep(i,{code:Al.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...i.data].map((u,l)=>{let d=this._def.items[l]||this._def.rest;return d?d._parse(new dxe(i,u,i.path,l)):null}).filter(u=>!!u);return i.common.async?Promise.all(a).then(u=>$V.mergeArray(r,u)):$V.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};eXt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new eXt({items:e,typeName:$0.ZodTuple,rest:null,...AP(t)})};var $vo=class e extends Jj{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==j_.object)return Ep(i,{code:Al.invalid_type,expected:j_.object,received:i.parsedType}),m0;let n=[],a=this._def.keyType,u=this._def.valueType;for(let l in i.data)n.push({key:a._parse(new dxe(i,l,i.path,l)),value:u._parse(new dxe(i,i.data[l],i.path,l)),alwaysSet:l in i.data});return i.common.async?$V.mergeObjectAsync(r,n):$V.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,i){return r instanceof Jj?new e({keyType:t,valueType:r,typeName:$0.ZodRecord,...AP(i)}):new e({keyType:Oji.create(),valueType:t,typeName:$0.ZodRecord,...AP(r)})}},QCn=class extends Jj{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==j_.map)return Ep(i,{code:Al.invalid_type,expected:j_.map,received:i.parsedType}),m0;let n=this._def.keyType,a=this._def.valueType,u=[...i.data.entries()].map(([l,d],s)=>({key:n._parse(new dxe(i,l,i.path,[s,"key"])),value:a._parse(new dxe(i,d,i.path,[s,"value"]))}));if(i.common.async){let l=new Map;return Promise.resolve().then(async()=>{for(let d of u){let s=await d.key,o=await d.value;if(s.status==="aborted"||o.status==="aborted")return m0;(s.status==="dirty"||o.status==="dirty")&&r.dirty(),l.set(s.value,o.value)}return{status:r.value,value:l}})}else{let l=new Map;for(let d of u){let s=d.key,o=d.value;if(s.status==="aborted"||o.status==="aborted")return m0;(s.status==="dirty"||o.status==="dirty")&&r.dirty(),l.set(s.value,o.value)}return{status:r.value,value:l}}}};QCn.create=(e,t,r)=>new QCn({valueType:t,keyType:e,typeName:$0.ZodMap,...AP(r)});var JCn=class e extends Jj{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==j_.set)return Ep(i,{code:Al.invalid_type,expected:j_.set,received:i.parsedType}),m0;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(Ep(i,{code:Al.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(Ep(i,{code:Al.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let a=this._def.valueType;function u(d){let s=new Set;for(let o of d){if(o.status==="aborted")return m0;o.status==="dirty"&&r.dirty(),s.add(o.value)}return{status:r.value,value:s}}let l=[...i.data.values()].map((d,s)=>a._parse(new dxe(i,d,i.path,s)));return i.common.async?Promise.all(l).then(d=>u(d)):u(l)}min(t,r){return new e({...this._def,minSize:{value:t,message:Uy.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:Uy.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};JCn.create=(e,t)=>new JCn({valueType:e,minSize:null,maxSize:null,typeName:$0.ZodSet,...AP(t)});var Gvo=class e extends Jj{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==j_.function)return Ep(r,{code:Al.invalid_type,expected:j_.function,received:r.parsedType}),m0;function i(l,d){return ija({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,VCn(),Rci].filter(s=>!!s),issueData:{code:Al.invalid_arguments,argumentsError:d}})}function n(l,d){return ija({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,VCn(),Rci].filter(s=>!!s),issueData:{code:Al.invalid_return_type,returnTypeError:d}})}let a={errorMap:r.common.contextualErrorMap},u=r.data;if(this._def.returns instanceof Pji){let l=this;return XG(async function(...d){let s=new Cie([]),o=await l._def.args.parseAsync(d,a).catch(g=>{throw s.addIssue(i(d,g)),s}),c=await Reflect.apply(u,this,o);return await l._def.returns._def.type.parseAsync(c,a).catch(g=>{throw s.addIssue(n(c,g)),s})})}else{let l=this;return XG(function(...d){let s=l._def.args.safeParse(d,a);if(!s.success)throw new Cie([i(d,s.error)]);let o=Reflect.apply(u,this,s.data),c=l._def.returns.safeParse(o,a);if(!c.success)throw new Cie([n(o,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:eXt.create(t).rest(Fci.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,i){return new e({args:t||eXt.create([]).rest(Fci.create()),returns:r||Fci.create(),typeName:$0.ZodFunction,...AP(i)})}},TUi=class extends Jj{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};TUi.create=(e,t)=>new TUi({getter:e,typeName:$0.ZodLazy,...AP(t)});var CUi=class extends Jj{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return Ep(r,{received:r.data,code:Al.invalid_literal,expected:this._def.value}),m0}return{status:"valid",value:t.data}}get value(){return this._def.value}};CUi.create=(e,t)=>new CUi({value:e,typeName:$0.ZodLiteral,...AP(t)});function x0d(e,t){return new BUi({values:e,typeName:$0.ZodEnum,...AP(t)})}var BUi=class e extends Jj{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),i=this._def.values;return Ep(r,{expected:CS.joinValues(i),received:r.parsedType,code:Al.invalid_type}),m0}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),i=this._def.values;return Ep(r,{received:r.data,code:Al.invalid_enum_value,options:i}),m0}return XG(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(i=>!t.includes(i)),{...this._def,...r})}};BUi.create=x0d;var IUi=class extends Jj{_parse(t){let r=CS.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==j_.string&&i.parsedType!==j_.number){let n=CS.objectValues(r);return Ep(i,{expected:CS.joinValues(n),received:i.parsedType,code:Al.invalid_type}),m0}if(this._cache||(this._cache=new Set(CS.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=CS.objectValues(r);return Ep(i,{received:i.data,code:Al.invalid_enum_value,options:n}),m0}return XG(t.data)}get enum(){return this._def.values}};IUi.create=(e,t)=>new IUi({values:e,typeName:$0.ZodNativeEnum,...AP(t)});var Pji=class extends Jj{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==j_.promise&&r.common.async===!1)return Ep(r,{code:Al.invalid_type,expected:j_.promise,received:r.parsedType}),m0;let i=r.parsedType===j_.promise?r.data:Promise.resolve(r.data);return XG(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Pji.create=(e,t)=>new Pji({type:e,typeName:$0.ZodPromise,...AP(t)});var pxe=class extends Jj{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$0.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:i}=this._processInputParams(t),n=this._def.effect||null,a={addIssue:u=>{Ep(i,u),u.fatal?r.abort():r.dirty()},get path(){return i.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let u=n.transform(i.data,a);if(i.common.async)return Promise.resolve(u).then(async l=>{if(r.value==="aborted")return m0;let d=await this._def.schema._parseAsync({data:l,path:i.path,parent:i});return d.status==="aborted"?m0:d.status==="dirty"?PUi(d.value):r.value==="dirty"?PUi(d.value):d});{if(r.value==="aborted")return m0;let l=this._def.schema._parseSync({data:u,path:i.path,parent:i});return l.status==="aborted"?m0:l.status==="dirty"?PUi(l.value):r.value==="dirty"?PUi(l.value):l}}if(n.type==="refinement"){let u=l=>{let d=n.refinement(l,a);if(i.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(i.common.async===!1){let l=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return l.status==="aborted"?m0:(l.status==="dirty"&&r.dirty(),u(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(l=>l.status==="aborted"?m0:(l.status==="dirty"&&r.dirty(),u(l.value).then(()=>({status:r.value,value:l.value}))))}if(n.type==="transform")if(i.common.async===!1){let u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!gji(u))return m0;let l=n.transform(u.value,a);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>gji(u)?Promise.resolve(n.transform(u.value,a)).then(l=>({status:r.value,value:l})):m0);CS.assertNever(n)}};pxe.create=(e,t,r)=>new pxe({schema:e,typeName:$0.ZodEffects,effect:t,...AP(r)});pxe.createWithPreprocess=(e,t,r)=>new pxe({schema:t,effect:{type:"preprocess",transform:e},typeName:$0.ZodEffects,...AP(r)});var fxe=class extends Jj{_parse(t){return this._getType(t)===j_.undefined?XG(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};fxe.create=(e,t)=>new fxe({innerType:e,typeName:$0.ZodOptional,...AP(t)});var tXt=class extends Jj{_parse(t){return this._getType(t)===j_.null?XG(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};tXt.create=(e,t)=>new tXt({innerType:e,typeName:$0.ZodNullable,...AP(t)});var zUi=class extends Jj{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return r.parsedType===j_.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};zUi.create=(e,t)=>new zUi({innerType:e,typeName:$0.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...AP(t)});var xUi=class extends Jj{_parse(t){let{ctx:r}=this._processInputParams(t),i={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return WCn(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Cie(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Cie(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};xUi.create=(e,t)=>new xUi({innerType:e,typeName:$0.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...AP(t)});var KCn=class extends Jj{_parse(t){if(this._getType(t)!==j_.nan){let i=this._getOrReturnCtx(t);return Ep(i,{code:Al.invalid_type,expected:j_.nan,received:i.parsedType}),m0}return{status:"valid",value:t.data}}};KCn.create=e=>new KCn({typeName:$0.ZodNaN,...AP(e)});var TW1=Symbol("zod_brand"),nja=class extends Jj{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},aja=class e extends Jj{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?m0:a.status==="dirty"?(r.dirty(),PUi(a.value)):this._def.out._parseAsync({data:a.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?m0:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(t,r){return new e({in:t,out:r,typeName:$0.ZodPipeline})}},RUi=class extends Jj{_parse(t){let r=this._def.innerType._parse(t),i=n=>(gji(n)&&(n.value=Object.freeze(n.value)),n);return WCn(r)?r.then(n=>i(n)):i(r)}unwrap(){return this._def.innerType}};RUi.create=(e,t)=>new RUi({innerType:e,typeName:$0.ZodReadonly,...AP(t)});function C0d(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function R0d(e,t={},r){return e?mji.create().superRefine((i,n)=>{let a=e(i);if(a instanceof Promise)return a.then(u=>{if(!u){let l=C0d(t,i),d=l.fatal??r??!0;n.addIssue({code:"custom",...l,fatal:d})}});if(!a){let u=C0d(t,i),l=u.fatal??r??!0;n.addIssue({code:"custom",...u,fatal:l})}}):mji.create()}var CW1={object:Bie.lazycreate},$0;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})($0||($0={}));var BW1=(e,t={message:`Input not instance of ${e.name}`})=>R0d(r=>r instanceof e,t),N0d=Oji.create,F0d=jUi.create,IW1=KCn.create,zW1=wUi.create,L0d=SUi.create,xW1=DUi.create,RW1=$Cn.create,NW1=EUi.create,FW1=MUi.create,LW1=mji.create,UW1=Fci.create,VW1=ZUt.create,WW1=GCn.create,HW1=Lci.create,$W1=Bie.create,GW1=Bie.strictCreate,QW1=AUi.create,JW1=Hvo.create,KW1=qUi.create,YW1=eXt.create,XW1=$vo.create,ZW1=QCn.create,kW1=JCn.create,eH1=Gvo.create,tH1=TUi.create,rH1=CUi.create,iH1=BUi.create,nH1=IUi.create,aH1=Pji.create,oH1=pxe.create,uH1=fxe.create,sH1=tXt.create,cH1=pxe.createWithPreprocess,lH1=aja.create,fH1=()=>N0d().optional(),dH1=()=>F0d().optional(),pH1=()=>L0d().optional(),_H1={string:e=>Oji.create({...e,coerce:!0}),number:e=>jUi.create({...e,coerce:!0}),boolean:e=>SUi.create({...e,coerce:!0}),bigint:e=>wUi.create({...e,coerce:!0}),date:e=>DUi.create({...e,coerce:!0})};var hH1=m0;var Iie={};Dn(Iie,{RawSchemas:()=>rxs});var rxs={};Dn(rxs,{AiChatModel:()=>Lzs,ContentAlignment:()=>Hzs,FernDocsConfig:()=>Yzs,FernDocsConfigError:()=>oja,FernDocsConfigTimeoutError:()=>uja,FontDisplay:()=>Qzs,FontStyle:()=>Gzs,HeaderPosition:()=>$zs,JsScriptStrategy:()=>Jzs,ProgrammingLanguage:()=>Fzs,SearchbarPlacement:()=>Vzs,Serializer:()=>hxe,TabsPlacement:()=>Wzs,TwitterCardSetting:()=>Kzs,VersionAvailability:()=>Uzs,docs:()=>Qvo,serialization:()=>Ci});var Yzs={};Dn(Yzs,{AiChatModel:()=>Lzs,ContentAlignment:()=>Hzs,FontDisplay:()=>Qzs,FontStyle:()=>Gzs,HeaderPosition:()=>$zs,JsScriptStrategy:()=>Jzs,ProgrammingLanguage:()=>Fzs,SearchbarPlacement:()=>Vzs,TabsPlacement:()=>Wzs,TwitterCardSetting:()=>Kzs,VersionAvailability:()=>Uzs,docs:()=>Qvo});var Qvo={};Dn(Qvo,{AiChatModel:()=>Lzs,ContentAlignment:()=>Hzs,FontDisplay:()=>Qzs,FontStyle:()=>Gzs,HeaderPosition:()=>$zs,JsScriptStrategy:()=>Jzs,ProgrammingLanguage:()=>Fzs,SearchbarPlacement:()=>Vzs,TabsPlacement:()=>Wzs,TwitterCardSetting:()=>Kzs,VersionAvailability:()=>Uzs});var Fzs={Typescript:"typescript",Javascript:"javascript",Python:"python",Java:"java",Go:"go",Ruby:"ruby",Csharp:"csharp",Nodets:"nodets",Nodejs:"nodejs",Dotnet:"dotnet",Curl:"curl",Jvm:"jvm",Ts:"ts",Js:"js"};var Lzs={Claude35:"claude-3.5",Claude37:"claude-3.7",Claude4:"claude-4",CommandA:"command-a"};var Uzs={Deprecated:"deprecated",Ga:"ga",Stable:"stable",Beta:"beta"};var Vzs={Header:"header",HeaderTabs:"header-tabs",Sidebar:"sidebar"};var Wzs={Header:"header",Sidebar:"sidebar"};var Hzs={Center:"center",Left:"left"};var $zs={Fixed:"fixed",Static:"static"};var Gzs={Normal:"normal",Italic:"italic"};var Qzs={Auto:"auto",Block:"block",Swap:"swap",Fallback:"fallback",Optional:"optional"};var Jzs={BeforeInteractive:"beforeInteractive",AfterInteractive:"afterInteractive",LazyOnload:"lazyOnload"};var Kzs={Summary:"summary",SummaryLargeImage:"summary_large_image",App:"app",Player:"player"};var oja=class e extends Error{statusCode;body;constructor({message:t,statusCode:r,body:i}){super(yH1({message:t,statusCode:r,body:i})),Object.setPrototypeOf(this,e.prototype),r!=null&&(this.statusCode=r),i!==void 0&&(this.body=i)}};function yH1({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(`
|
|
1633
1633
|
`)}var uja=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var Ci={};Dn(Ci,{JsonError:()=>YCn,ParseError:()=>XCn,any:()=>tgd,bigint:()=>V0d,boolean:()=>rgd,booleanLiteral:()=>egd,date:()=>W0d,discriminant:()=>fgd,enum_:()=>Kvo,getObjectLikeUtils:()=>kUt,getObjectUtils:()=>NUi,getSchemaUtils:()=>Iq,isProperty:()=>wji,lazy:()=>H0d,lazyObject:()=>X0d,list:()=>Xvo,number:()=>igd,object:()=>Yvo,objectWithoutOptionalProperties:()=>Y0d,optional:()=>Xzs,property:()=>G0d,record:()=>ugd,set:()=>sgd,string:()=>ngd,stringLiteral:()=>k0d,transform:()=>Zzs,undiscriminatedUnion:()=>lgd,union:()=>pgd,unknown:()=>agd,withParsedProperties:()=>exs});var Pj={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 XM(e,t){return`Expected ${t}. Received ${vH1(e)}.`}function vH1(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 a9(e){return{...e,json:U0d(e.json),parse:U0d(e.parse)}}function U0d(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(`
|
|
1634
1634
|
`)),{ok:!0,value:t}):i}}function Jvo(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var YCn=class e extends Error{errors;constructor(t){super(t.map(Jvo).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};var XCn=class e extends Error{errors;constructor(t){super(t.map(Jvo).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};function Iq(e){return{optional:()=>Xzs(e),transform:t=>Zzs(e,t),parseOrThrow:(t,r)=>{let i=e.parse(t,r);if(i.ok)return i.value;throw new XCn(i.errors)},jsonOrThrow:(t,r)=>{let i=e.json(t,r);if(i.ok)return i.value;throw new YCn(i.errors)}}}function Xzs(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:()=>Pj.OPTIONAL};return{...t,...Iq(t)}}function Zzs(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,...Iq(r)}}function V0d(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:XM(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:XM(t,"bigint")}]},getType:()=>Pj.BIGINT};return{...a9(e),...Iq(e)}}var bH1=/^([+-]?\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 W0d(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:XM(t,"string")}]}:bH1.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:XM(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:XM(t,"Date object")}]},getType:()=>Pj.DATE};return{...a9(e),...Iq(e)}}function ZG(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...a9(r),...Iq(r)}}}function Kvo(e){let t=new Set(e);return ZG(Pj.ENUM,(i,{allowUnrecognizedEnumValues:n,breadcrumbsPrefix:a=[]}={})=>typeof i!="string"?{ok:!1,errors:[{path:a,message:XM(i,"string")}]}:!t.has(i)&&!n?{ok:!1,errors:[{path:a,message:XM(i,"enum")}]}:{ok:!0,value:i})()}function H0d(e){let t=kzs(e);return{...t,...Iq(t)}}function kzs(e){return{parse:(t,r)=>ZCn(e).parse(t,r),json:(t,r)=>ZCn(e).json(t,r),getType:()=>ZCn(e).getType()}}function ZCn(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}function sja(e){return Object.entries(e)}function cja(e,t){let r=new Set(t);return Object.entries(e).reduce((i,[n,a])=>(r.has(n)&&(i[n]=a),i),{})}function jji(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 lja(e){return Object.keys(e)}function $0d(e,t){let r=[],i=[];for(let n of e)t(n)?r.push(n):i.push(n);return[r,i]}function kUt(e){return{withParsedProperties:t=>exs(e,t)}}function exs(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(!jji(i))return{ok:!1,errors:[{path:n?.breadcrumbsPrefix??[],message:XM(i,"object")}]};let a=new Set(Object.keys(t)),u=cja(i,Object.keys(i).filter(l=>!a.has(l)));return e.json(u,n)},getType:()=>e.getType()};return{...r,...Iq(r),...kUt(r)}}function G0d(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function wji(e){return e.isProperty}function Yvo(e){let t={_getRawProperties:()=>Object.entries(e).map(([r,i])=>wji(i)?i.rawKey:r),_getParsedProperties:()=>lja(e),parse:(r,i)=>{let n={},a=[];for(let[u,l]of sja(e)){let d=wji(l)?l.rawKey:u,s=wji(l)?l.valueSchema:l,o={rawKey:d,parsedKey:u,valueSchema:s};n[d]=o,K0d(s)&&a.push(d)}return Q0d({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 sja(e)){let l=wji(u)?u.valueSchema:u;K0d(l)&&n.push(a)}return Q0d({value:r,requiredKeys:n,getProperty:a=>{let u=e[a];if(u!=null)return wji(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:()=>Pj.OBJECT};return{...a9(t),...Iq(t),...kUt(t),...NUi(t)}}function Q0d({value:e,requiredKeys:t,getProperty:r,unrecognizedObjectKeys:i="fail",skipValidation:n=!1,breadcrumbsPrefix:a=[]}){if(!jji(e))return{ok:!1,errors:[{path:a,message:XM(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 NUi(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(i,n)=>J0d({extensionKeys:t._getRawProperties(),value:i,transformBase:a=>e.parse(a,n),transformExtension:a=>t.parse(a,n)}),json:(i,n)=>J0d({extensionKeys:t._getParsedProperties(),value:i,transformBase:a=>e.json(a,n),transformExtension:a=>t.json(a,n)}),getType:()=>Pj.OBJECT};return{...r,...Iq(r),...kUt(r),...NUi(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:()=>Pj.OBJECT};return{...t,...Iq(t),...kUt(t),...NUi(t)}}}}function J0d({extensionKeys:e,value:t,transformBase:r,transformExtension:i}){let n=new Set(e),[a,u]=$0d(lja(t),s=>n.has(s)),l=r(cja(t,u)),d=i(cja(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 K0d(e){return!gH1(e)}function gH1(e){switch(e.getType()){case Pj.ANY:case Pj.UNKNOWN:case Pj.OPTIONAL:return!0;default:return!1}}function Y0d(e){return Yvo(e)}function X0d(e){let t={...kzs(e),_getRawProperties:()=>ZCn(e)._getRawProperties(),_getParsedProperties:()=>ZCn(e)._getParsedProperties()};return{...t,...Iq(t),...kUt(t),...NUi(t)}}function Xvo(e){let t={parse:(r,i)=>Z0d(r,(n,a)=>e.parse(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),json:(r,i)=>Z0d(r,(n,a)=>e.json(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),getType:()=>Pj.LIST};return{...a9(t),...Iq(t)}}function Z0d(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:XM(e,"list"),path:[]}]}}function k0d(e){return ZG(Pj.STRING_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:XM(r,`"${e}"`)}]})()}function egd(e){return ZG(Pj.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:XM(r,`${e.toString()}`)}]})()}var tgd=ZG(Pj.ANY,e=>({ok:!0,value:e}));var rgd=ZG(Pj.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:XM(e,"boolean")}]});var igd=ZG(Pj.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:XM(e,"number")}]});var ngd=ZG(Pj.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:XM(e,"string")}]});var agd=ZG(Pj.UNKNOWN,e=>({ok:!0,value:e}));function ugd(e,t){let r={parse:(i,n)=>ogd({value:i,isKeyNumeric:e.getType()===Pj.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)=>ogd({value:i,isKeyNumeric:e.getType()===Pj.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:()=>Pj.RECORD};return{...a9(r),...Iq(r)}}function ogd({value:e,isKeyNumeric:t,transformKey:r,transformValue:i,breadcrumbsPrefix:n=[]}){return jji(e)?sja(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:XM(e,"object")}]}}function sgd(e){let t=Xvo(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:XM(i,"Set")}]},getType:()=>Pj.SET};return{...a9(r),...Iq(r)}}function lgd(e){let t={parse:(r,i)=>cgd((n,a)=>n.parse(r,a),e,i),json:(r,i)=>cgd((n,a)=>n.json(r,a),e,i),getType:()=>Pj.UNDISCRIMINATED_UNION};return{...a9(t),...Iq(t)}}function cgd(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 fgd(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}function pgd(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,i=typeof e=="string"?e:e.parsedDiscriminant,n=Kvo(lja(t)),a={parse:(u,l)=>dgd({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)=>dgd({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:()=>Pj.UNION};return{...a9(a),...Iq(a),...kUt(a)}}function dgd({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:i,getAdditionalPropertiesSchema:n,allowUnrecognizedUnionMembers:a=!1,transformAdditionalProperties:u,breadcrumbsPrefix:l=[]}){if(!jji(e))return{ok:!1,errors:[{path:l,message:XM(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 hxe={};Dn(hxe,{AiChatConfig:()=>dja,AiChatModel:()=>Pbo,AnalyticsConfig:()=>abo,AnnouncementConfig:()=>lbo,ApiReferenceConfiguration:()=>Ybo,ApiReferenceEndpointConfiguration:()=>kbo,ApiReferenceLayoutItem:()=>aXt,ApiReferencePackageConfiguration:()=>t0o,ApiReferencePackageConfigurationWithOptions:()=>r0o,ApiReferenceSectionConfiguration:()=>e0o,AudienceId:()=>Gbo,BackgroundImageConfiguration:()=>Mbo,BackgroundImageThemedConfig:()=>Ebo,ChangelogConfiguration:()=>Xbo,ChangelogFolderRelativePath:()=>kCn,ColorConfig:()=>iXt,ColorThemedConfig:()=>Abo,ColorsConfiguration:()=>qbo,ContentAlignment:()=>Rbo,CssConfig:()=>Ubo,CustomDomain:()=>obo,DocsConfiguration:()=>_gd,DocsInstance:()=>cbo,DocsTypographyConfig:()=>Ibo,EditThisPageConfig:()=>sbo,ExperimentalConfig:()=>mbo,FeatureFlag:()=>fja,FeatureFlagConfiguration:()=>dbo,FontConfig:()=>iBn,FontConfigPath:()=>Cbo,FontConfigVariant:()=>Tbo,FontDisplay:()=>Bbo,FontStyle:()=>rBn,FontWeight:()=>tBn,FooterLinksConfig:()=>Obo,FullStoryAnalyticsConfig:()=>ebo,GithubEditThisPageConfig:()=>ubo,GoogleAnalytics4Config:()=>nbo,GtmConfig:()=>ibo,HeaderPosition:()=>Nbo,IntegrationsConfig:()=>Lbo,IntercomConfig:()=>tbo,JsConfig:()=>$bo,JsConfigOptions:()=>pja,JsFileConfig:()=>Hbo,JsFileConfigSettings:()=>Wbo,JsRemoteConfig:()=>Vbo,JsScriptStrategy:()=>nBn,LayoutConfig:()=>Fbo,LinkConfiguration:()=>aBn,LogoConfiguration:()=>Dbo,MetadataConfig:()=>wbo,NavbarGithubConfig:()=>bbo,NavbarLink:()=>gbo,NavbarLinkConfig:()=>Mji,NavigationConfig:()=>Eji,NavigationItem:()=>Dji,PageConfiguration:()=>_xe,PlaygroundButtonSettings:()=>Kbo,PlaygroundSettings:()=>nXt,PostHogConfig:()=>rbo,ProductConfig:()=>_bo,ProductFileConfig:()=>ygd,ProgrammingLanguage:()=>Zvo,RedirectConfig:()=>Sbo,Role:()=>fbo,RoleId:()=>FUi,SearchbarPlacement:()=>zbo,SectionConfiguration:()=>Zbo,SegmentConfig:()=>kvo,SnippetLanguageConfiguration:()=>Uci,SnippetsConfiguration:()=>Jbo,TabConfig:()=>Sji,TabId:()=>rXt,TabbedNavigationConfig:()=>vbo,TabbedNavigationItem:()=>ybo,TabsPlacement:()=>xbo,TwitterCardSetting:()=>jbo,UntabbedNavigationConfig:()=>hbo,VersionAvailability:()=>pbo,VersionConfig:()=>eBn,VersionFileConfig:()=>hgd,VersionedSnippetLanguageConfiguration:()=>Qbo,WithFeatureFlags:()=>DN,WithPermissions:()=>SN,docs:()=>txs});var txs={};Dn(txs,{AiChatConfig:()=>dja,AiChatModel:()=>Pbo,AnalyticsConfig:()=>abo,AnnouncementConfig:()=>lbo,ApiReferenceConfiguration:()=>Ybo,ApiReferenceEndpointConfiguration:()=>kbo,ApiReferenceLayoutItem:()=>aXt,ApiReferencePackageConfiguration:()=>t0o,ApiReferencePackageConfigurationWithOptions:()=>r0o,ApiReferenceSectionConfiguration:()=>e0o,AudienceId:()=>Gbo,BackgroundImageConfiguration:()=>Mbo,BackgroundImageThemedConfig:()=>Ebo,ChangelogConfiguration:()=>Xbo,ChangelogFolderRelativePath:()=>kCn,ColorConfig:()=>iXt,ColorThemedConfig:()=>Abo,ColorsConfiguration:()=>qbo,ContentAlignment:()=>Rbo,CssConfig:()=>Ubo,CustomDomain:()=>obo,DocsConfiguration:()=>_gd,DocsInstance:()=>cbo,DocsTypographyConfig:()=>Ibo,EditThisPageConfig:()=>sbo,ExperimentalConfig:()=>mbo,FeatureFlag:()=>fja,FeatureFlagConfiguration:()=>dbo,FontConfig:()=>iBn,FontConfigPath:()=>Cbo,FontConfigVariant:()=>Tbo,FontDisplay:()=>Bbo,FontStyle:()=>rBn,FontWeight:()=>tBn,FooterLinksConfig:()=>Obo,FullStoryAnalyticsConfig:()=>ebo,GithubEditThisPageConfig:()=>ubo,GoogleAnalytics4Config:()=>nbo,GtmConfig:()=>ibo,HeaderPosition:()=>Nbo,IntegrationsConfig:()=>Lbo,IntercomConfig:()=>tbo,JsConfig:()=>$bo,JsConfigOptions:()=>pja,JsFileConfig:()=>Hbo,JsFileConfigSettings:()=>Wbo,JsRemoteConfig:()=>Vbo,JsScriptStrategy:()=>nBn,LayoutConfig:()=>Fbo,LinkConfiguration:()=>aBn,LogoConfiguration:()=>Dbo,MetadataConfig:()=>wbo,NavbarGithubConfig:()=>bbo,NavbarLink:()=>gbo,NavbarLinkConfig:()=>Mji,NavigationConfig:()=>Eji,NavigationItem:()=>Dji,PageConfiguration:()=>_xe,PlaygroundButtonSettings:()=>Kbo,PlaygroundSettings:()=>nXt,PostHogConfig:()=>rbo,ProductConfig:()=>_bo,ProductFileConfig:()=>ygd,ProgrammingLanguage:()=>Zvo,RedirectConfig:()=>Sbo,Role:()=>fbo,RoleId:()=>FUi,SearchbarPlacement:()=>zbo,SectionConfiguration:()=>Zbo,SegmentConfig:()=>kvo,SnippetLanguageConfiguration:()=>Uci,SnippetsConfiguration:()=>Jbo,TabConfig:()=>Sji,TabId:()=>rXt,TabbedNavigationConfig:()=>vbo,TabbedNavigationItem:()=>ybo,TabsPlacement:()=>xbo,TwitterCardSetting:()=>jbo,UntabbedNavigationConfig:()=>hbo,VersionAvailability:()=>pbo,VersionConfig:()=>eBn,VersionFileConfig:()=>hgd,VersionedSnippetLanguageConfiguration:()=>Qbo,WithFeatureFlags:()=>DN,WithPermissions:()=>SN});var Zvo=Ci.enum_(["typescript","javascript","python","java","go","ruby","csharp","nodets","nodejs","dotnet","curl","jvm","ts","js"]);var kvo=Ci.object({writeKey:Ci.property("write-key",Ci.string())});var ebo=Ci.object({orgId:Ci.property("org-id",Ci.string())});var tbo=Ci.object({appId:Ci.property("app-id",Ci.string()),apiBase:Ci.property("api-base",Ci.string().optional())});var rbo=Ci.object({apiKey:Ci.property("api-key",Ci.string()),endpoint:Ci.string().optional()});var ibo=Ci.object({containerId:Ci.property("container-id",Ci.string())});var nbo=Ci.object({measurementId:Ci.property("measurement-id",Ci.string())});var abo=Ci.object({segment:kvo.optional(),fullstory:ebo.optional(),intercom:tbo.optional(),posthog:rbo.optional(),gtm:ibo.optional(),ga4:nbo.optional()});var obo=Ci.undiscriminatedUnion([Ci.string(),Ci.list(Ci.string())]);var ubo=Ci.object({host:Ci.string().optional(),owner:Ci.string(),repo:Ci.string(),branch:Ci.string().optional()});var sbo=Ci.object({github:ubo.optional()});var cbo=Ci.object({url:Ci.string(),customDomain:Ci.property("custom-domain",obo.optional()),private:Ci.boolean().optional(),editThisPage:Ci.property("edit-this-page",sbo.optional())});var lbo=Ci.object({message:Ci.string()});var FUi=Ci.string();var rXt=Ci.string();var kCn=Ci.string();var fbo=Ci.undiscriminatedUnion([FUi,Ci.list(FUi)]);var SN=Ci.object({viewers:fbo.optional(),orphaned:Ci.boolean().optional()});var fja=Ci.object({flag:Ci.string(),fallbackValue:Ci.property("fallback-value",Ci.unknown().optional()),match:Ci.unknown().optional()});var dbo=Ci.undiscriminatedUnion([Ci.string(),fja,Ci.list(fja)]);var DN=Ci.object({featureFlag:Ci.property("feature-flag",dbo.optional())});var Sji=Ci.object({displayName:Ci.property("display-name",Ci.string()),icon:Ci.string().optional(),slug:Ci.string().optional(),skipSlug:Ci.property("skip-slug",Ci.boolean().optional()),hidden:Ci.boolean().optional(),href:Ci.string().optional(),changelog:kCn.optional()}).extend(SN).extend(DN);var pbo=Ci.enum_(["deprecated","ga","stable","beta"]);var eBn=Ci.object({displayName:Ci.property("display-name",Ci.string()),path:Ci.string(),slug:Ci.string().optional(),availability:pbo.optional()}).extend(SN).extend(DN);var _bo=Ci.object({displayName:Ci.property("display-name",Ci.string()),path:Ci.string(),subtitle:Ci.string().optional(),icon:Ci.string().optional(),image:Ci.string().optional(),slug:Ci.string().optional(),versions:Ci.list(eBn).optional()}).extend(SN).extend(DN);var _xe=Ci.object({page:Ci.string(),path:Ci.string(),slug:Ci.string().optional(),icon:Ci.string().optional(),hidden:Ci.boolean().optional(),noindex:Ci.boolean().optional()}).extend(SN).extend(DN);var hbo=Ci.list(Ci.lazy(()=>Dji));var ybo=Ci.object({tab:rXt,layout:Ci.list(Ci.lazy(()=>Dji)).optional()});var vbo=Ci.list(ybo);var Eji=Ci.undiscriminatedUnion([hbo,vbo]);var Mji=Ci.object({href:Ci.string().optional(),url:Ci.string().optional(),text:Ci.string().optional(),icon:Ci.string().optional(),rightIcon:Ci.string().optional(),rounded:Ci.boolean().optional()});var bbo=Ci.string();var gbo=Ci.union("type",{filled:Mji,outlined:Mji,minimal:Mji,github:Ci.object({value:bbo}),primary:Mji,secondary:Mji}).transform({transform:e=>e,untransform:e=>e});var Obo=Ci.object({github:Ci.string().optional(),twitter:Ci.string().optional(),x:Ci.string().optional(),linkedin:Ci.string().optional(),youtube:Ci.string().optional(),instagram:Ci.string().optional(),facebook:Ci.string().optional(),discord:Ci.string().optional(),slack:Ci.string().optional(),hackernews:Ci.string().optional(),medium:Ci.string().optional(),website:Ci.string().optional()});var mbo=Ci.object({mdxComponents:Ci.property("mdx-components",Ci.list(Ci.string()).optional()),disableStreamToggle:Ci.property("disable-stream-toggle",Ci.boolean().optional()),openapiParserV2:Ci.property("openapi-parser-v2",Ci.boolean().optional()),openapiParserV3:Ci.property("openapi-parser-v3",Ci.boolean().optional())});var Pbo=Ci.enum_(["claude-3.5","claude-3.7","claude-4","command-a"]);var dja=Ci.object({model:Pbo.optional(),systemPrompt:Ci.property("system-prompt",Ci.string().optional())});var jbo=Ci.enum_(["summary","summary_large_image","app","player"]);var wbo=Ci.object({ogSiteName:Ci.property("og:site_name",Ci.string().optional()),ogTitle:Ci.property("og:title",Ci.string().optional()),ogDescription:Ci.property("og:description",Ci.string().optional()),ogUrl:Ci.property("og:url",Ci.string().optional()),ogImage:Ci.property("og:image",Ci.string().optional()),ogImageWidth:Ci.property("og:image:width",Ci.number().optional()),ogImageHeight:Ci.property("og:image:height",Ci.number().optional()),ogLocale:Ci.property("og:locale",Ci.string().optional()),ogLogo:Ci.property("og:logo",Ci.string().optional()),twitterTitle:Ci.property("twitter:title",Ci.string().optional()),twitterDescription:Ci.property("twitter:description",Ci.string().optional()),twitterHandle:Ci.property("twitter:handle",Ci.string().optional()),twitterImage:Ci.property("twitter:image",Ci.string().optional()),twitterSite:Ci.property("twitter:site",Ci.string().optional()),twitterUrl:Ci.property("twitter:url",Ci.string().optional()),twitterCard:Ci.property("twitter:card",jbo.optional())});var Sbo=Ci.object({source:Ci.string(),destination:Ci.string(),permanent:Ci.boolean().optional()});var Dbo=Ci.object({dark:Ci.string().optional(),light:Ci.string().optional(),height:Ci.number().optional(),href:Ci.string().optional()});var Ebo=Ci.object({dark:Ci.string().optional(),light:Ci.string().optional()});var Mbo=Ci.undiscriminatedUnion([Ci.string(),Ebo]);var Abo=Ci.object({dark:Ci.string().optional(),light:Ci.string().optional()});var iXt=Ci.undiscriminatedUnion([Ci.string(),Abo]);var qbo=Ci.object({accentPrimary:Ci.property("accent-primary",iXt.optional()),accentPrimaryDeprecated:Ci.property("accentPrimary",iXt.optional()),background:iXt.optional(),border:iXt.optional(),sidebarBackground:Ci.property("sidebar-background",iXt.optional()),headerBackground:Ci.property("header-background",iXt.optional()),cardBackground:Ci.property("card-background",iXt.optional())});var tBn=Ci.undiscriminatedUnion([Ci.string(),Ci.number()]);var rBn=Ci.enum_(["normal","italic"]);var Tbo=Ci.object({path:Ci.string(),weight:tBn.optional(),style:rBn.optional()});var Cbo=Ci.undiscriminatedUnion([Ci.string(),Tbo]);var Bbo=Ci.enum_(["auto","block","swap","fallback","optional"]);var iBn=Ci.object({name:Ci.string().optional(),path:Ci.string().optional(),weight:tBn.optional(),style:rBn.optional(),paths:Ci.list(Cbo).optional(),display:Bbo.optional(),fallback:Ci.list(Ci.string()).optional(),fontVariationSettings:Ci.property("font-variation-settings",Ci.string().optional())});var Ibo=Ci.object({headingsFont:iBn.optional(),bodyFont:iBn.optional(),codeFont:iBn.optional()});var zbo=Ci.enum_(["header","header-tabs","sidebar"]);var xbo=Ci.enum_(["header","sidebar"]);var Rbo=Ci.enum_(["center","left"]);var Nbo=Ci.enum_(["fixed","static"]);var Fbo=Ci.object({pageWidth:Ci.property("page-width",Ci.string().optional()),contentWidth:Ci.property("content-width",Ci.string().optional()),sidebarWidth:Ci.property("sidebar-width",Ci.string().optional()),headerHeight:Ci.property("header-height",Ci.string().optional()),searchbarPlacement:Ci.property("searchbar-placement",zbo.optional()),tabsPlacement:Ci.property("tabs-placement",xbo.optional()),contentAlignment:Ci.property("content-alignment",Rbo.optional()),headerPosition:Ci.property("header-position",Nbo.optional()),disableHeader:Ci.property("disable-header",Ci.boolean().optional())});var Lbo=Ci.object({intercom:Ci.string().optional()});var Ubo=Ci.undiscriminatedUnion([Ci.string(),Ci.list(Ci.string())]);var nBn=Ci.enum_(["beforeInteractive","afterInteractive","lazyOnload"]);var Vbo=Ci.object({url:Ci.string(),strategy:nBn.optional()});var Wbo=Ci.object({path:Ci.string(),strategy:nBn.optional()});var Hbo=Ci.undiscriminatedUnion([Ci.string(),Wbo]);var pja=Ci.undiscriminatedUnion([Vbo,Hbo]);var $bo=Ci.undiscriminatedUnion([pja,Ci.list(pja)]);var _gd=Ci.object({instances:Ci.list(cbo),title:Ci.string().optional(),analytics:abo.optional(),announcement:lbo.optional(),roles:Ci.list(FUi).optional(),tabs:Ci.record(rXt,Sji).optional(),versions:Ci.list(eBn).optional(),products:Ci.list(_bo).optional(),landingPage:Ci.property("landing-page",_xe.optional()),navigation:Eji.optional(),navbarLinks:Ci.property("navbar-links",Ci.list(gbo).optional()),footerLinks:Ci.property("footer-links",Obo.optional()),experimental:mbo.optional(),defaultLanguage:Ci.property("default-language",Zvo.optional()),aiChat:Ci.property("ai-chat",dja.optional()),aiSearch:Ci.property("ai-search",dja.optional()),metadata:wbo.optional(),redirects:Ci.list(Sbo).optional(),logo:Dbo.optional(),favicon:Ci.string().optional(),backgroundImage:Ci.property("background-image",Mbo.optional()),colors:qbo.optional(),typography:Ibo.optional(),layout:Fbo.optional(),integrations:Lbo.optional(),css:Ubo.optional(),js:$bo.optional()});var hgd=Ci.object({tabs:Ci.record(rXt,Sji).optional(),landingPage:Ci.property("landing-page",_xe.optional()),navigation:Eji});var Gbo=Ci.string();var Qbo=Ci.object({version:Ci.string(),package:Ci.string()});var Uci=Ci.undiscriminatedUnion([Ci.string(),Qbo]);var Jbo=Ci.object({python:Uci.optional(),typescript:Uci.optional(),go:Uci.optional(),java:Uci.optional(),ruby:Uci.optional(),csharp:Uci.optional()});var Kbo=Ci.object({href:Ci.string().optional()});var nXt=Ci.object({environments:Ci.list(Ci.string()).optional(),button:Kbo.optional(),oauth:Ci.boolean().optional(),limitWebsocketMessagesPerConnection:Ci.property("limit-websocket-messages-per-connection",Ci.number().optional())});var Ybo=Ci.object({api:Ci.string(),apiName:Ci.property("api-name",Ci.string().optional()),openrpc:Ci.string().optional(),audiences:Ci.list(Gbo).optional(),displayErrors:Ci.property("display-errors",Ci.boolean().optional()),snippets:Jbo.optional(),summary:Ci.string().optional(),layout:Ci.list(Ci.lazy(()=>aXt)).optional(),icon:Ci.string().optional(),slug:Ci.string().optional(),hidden:Ci.boolean().optional(),skipSlug:Ci.property("skip-slug",Ci.boolean().optional()),alphabetized:Ci.boolean().optional(),flattened:Ci.boolean().optional(),paginated:Ci.boolean().optional(),playground:nXt.optional()}).extend(SN).extend(DN);var aBn=Ci.object({link:Ci.string(),href:Ci.string(),icon:Ci.string().optional()});var Xbo=Ci.object({changelog:kCn,title:Ci.string().optional(),slug:Ci.string().optional(),icon:Ci.string().optional(),hidden:Ci.boolean().optional()}).extend(SN).extend(DN);var Dji=Ci.undiscriminatedUnion([_xe,Ci.lazyObject(()=>Zbo),Ybo,aBn,Xbo]);var Zbo=Ci.object({section:Ci.string(),path:Ci.string().optional(),contents:Ci.list(Ci.lazy(()=>Dji)),collapsed:Ci.boolean().optional(),slug:Ci.string().optional(),icon:Ci.string().optional(),hidden:Ci.boolean().optional(),skipSlug:Ci.property("skip-slug",Ci.boolean().optional())}).extend(SN).extend(DN);var kbo=Ci.object({endpoint:Ci.string(),title:Ci.string().optional(),slug:Ci.string().optional(),icon:Ci.string().optional(),hidden:Ci.boolean().optional(),playground:nXt.optional()}).extend(SN).extend(DN);var aXt=Ci.undiscriminatedUnion([Ci.string(),Ci.record(Ci.string(),Ci.lazy(()=>t0o)),Ci.lazyObject(()=>e0o),kbo,_xe,aBn]);var e0o=Ci.object({section:Ci.string(),referencedPackages:Ci.property("referenced-packages",Ci.list(Ci.string()).optional()),summary:Ci.string().optional(),contents:Ci.list(Ci.lazy(()=>aXt)).optional(),slug:Ci.string().optional(),icon:Ci.string().optional(),hidden:Ci.boolean().optional(),skipSlug:Ci.property("skip-slug",Ci.boolean().optional()),playground:nXt.optional()}).extend(SN).extend(DN);var t0o=Ci.undiscriminatedUnion([Ci.list(Ci.lazy(()=>aXt)),Ci.lazyObject(()=>r0o)]);var r0o=Ci.object({title:Ci.string().optional(),summary:Ci.string().optional(),contents:Ci.list(Ci.lazy(()=>aXt)).optional(),slug:Ci.string().optional(),icon:Ci.string().optional(),hidden:Ci.boolean().optional(),skipSlug:Ci.property("skip-slug",Ci.boolean().optional()),playground:nXt.optional()}).extend(SN).extend(DN);var ygd=Ci.object({tabs:Ci.record(rXt,Sji).optional(),landingPage:Ci.property("landing-page",_xe.optional()),navigation:Eji});var by={};Dn(by,{API_ORIGIN_LOCATION_KEY:()=>pOd,API_SETTINGS_KEY:()=>DH1,ASYNC_API_LOCATION_KEY:()=>_Od,DEFAULT_GROUP_GENERATORS_CONFIG_KEY:()=>hOd,DEFAULT_GROUP_NAME:()=>rja,FormParameterEncoding:()=>Dgd,GenerationLanguage:()=>vOd,GithubCommitAndReleaseMode:()=>Egd,GithubLicenseType:()=>Mgd,MessageNamingSettingsSchema:()=>Sgd,OPENAPI_LOCATION_KEY:()=>yOd,OPENAPI_OVERRIDES_LOCATION_KEY:()=>SH1,UnionSettingsSchema:()=>wgd,fernDefinition:()=>uxs,generators:()=>ixs,getPackageName:()=>bOd,group:()=>nxs,isApiConfigurationV2Schema:()=>vgd,isAsyncApiSpecSchema:()=>bgd,isConjureSchema:()=>mgd,isNamespacedApiConfiguration:()=>Pgd,isOpenApiSpecSchema:()=>ggd,isOpenRpcSpecSchema:()=>jgd,isProtoSpecSchema:()=>Ogd,isRawProtobufAPIDefinitionSchema:()=>gOd,license:()=>axs,reviewers:()=>Agd,serialization:()=>Dxs});function vgd(e){return e?.specs!=null}function bgd(e){return e?.asyncapi!=null}function ggd(e){return e?.openapi!=null}function Ogd(e){return e?.proto!=null}function mgd(e){return e?.conjure!=null}function Pgd(e){return e?.namespaces!=null}function jgd(e){return e?.openrpc!=null}var ixs={};Dn(ixs,{FormParameterEncoding:()=>Dgd,MessageNamingSettingsSchema:()=>Sgd,UnionSettingsSchema:()=>wgd});var wgd={V1:"v1"};var Sgd={V1:"v1",V2:"v2"};var Dgd={Form:"form",Json:"json"};var nxs={};Dn(nxs,{GithubCommitAndReleaseMode:()=>Egd});var Egd={Commit:"commit",Release:"release"};var axs={};Dn(axs,{GithubLicenseType:()=>Mgd});var Mgd={Mit:"MIT",Apache:"Apache-2.0"};var Agd={};var uxs={};Dn(uxs,{AvailabilityStatusSchema:()=>Tgd,auth:()=>qgd,availability:()=>oxs,commons:()=>Cgd,encoding:()=>Bgd,environments:()=>Igd,file:()=>zgd,service:()=>xgd,types:()=>Rgd,validation:()=>Ngd});var qgd={};var oxs={};Dn(oxs,{AvailabilityStatusSchema:()=>Tgd});var Tgd={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available"};var Cgd={};var Bgd={};var Igd={};var zgd={};var xgd={};var Rgd={};var Ngd={};var Dxs={};Dn(Dxs,{ApiConfigurationSchema:()=>ego,ApiConfigurationSchemaInternal:()=>_Bn,ApiConfigurationV2Schema:()=>k0o,ApiConfigurationV2SpecsSchema:()=>I0o,ApiDefinitionList:()=>O0o,ApiDefinitionPathSchema:()=>Cji,ApiDefinitionSchema:()=>g0o,ApiDefinitionSettingsSchema:()=>Bji,ApiDefinitionWithOverridesSchema:()=>fBn,AsyncApiSettingsSchema:()=>M0o,AsyncApiSpecSchema:()=>A0o,BaseApiSettingsSchema:()=>vBn,ConjureSchema:()=>B0o,FormParameterEncoding:()=>w0o,GeneratorApiSettingsSchema:()=>Sgo,GeneratorGroupSchema:()=>Ego,GeneratorInvocationSchema:()=>Dgo,GeneratorOutputSchema:()=>hgo,GeneratorPublishMetadataSchema:()=>Oja,GeneratorSnippetsSchema:()=>wgo,GeneratorsConfigurationSchema:()=>dOd,GeneratorsOpenApiObjectSchema:()=>Mgo,GeneratorsOpenApiSchema:()=>Ago,GithubCommitAndReleaseMode:()=>ggo,GithubCommitAndReleaseSchema:()=>Ogo,GithubConfigurationSchema:()=>jgo,GithubLicenseCustomSchema:()=>bgo,GithubLicenseSchema:()=>oXt,GithubLicenseType:()=>vgo,GithubPullRequestSchema:()=>mgo,GithubPushSchema:()=>Pgo,GithubSelfhostedSchema:()=>ygo,LocalFileSystemOutputLocationSchema:()=>dgo,MavenOutputLocationSchema:()=>sgo,MavenOutputSignatureSchema:()=>ugo,MessageNamingSettingsSchema:()=>lBn,NamespacedApiConfigurationSchema:()=>m0o,NpmOutputLocationSchema:()=>ogo,NugetOutputLocationSchema:()=>pgo,OpenApiExampleGenerationSchema:()=>D0o,OpenApiFilterSchema:()=>S0o,OpenApiSettingsSchema:()=>bBn,OpenApiSpecSchema:()=>E0o,OpenRpcSpecSchema:()=>T0o,OutputMetadataAuthor:()=>igo,OutputMetadataSchema:()=>zji,PostmanOutputLocationSchema:()=>fgo,ProtobufApiDefinitionSchema:()=>pBn,ProtobufDefinitionSchema:()=>dBn,ProtobufSpecSchema:()=>q0o,PypiOutputLocationSchema:()=>lgo,PypiOutputMetadataSchema:()=>cgo,ReadmeEndpointObjectSchema:()=>ngo,ReadmeEndpointSchema:()=>bja,ReadmeSchema:()=>ago,RequestOrResponseExampleGenerationSchema:()=>vja,ReviewerSchema:()=>gja,ReviewersSchema:()=>xji,RubyGemsOutputLocationSchema:()=>_go,SpecSchema:()=>C0o,UnionSettingsSchema:()=>b0o,WhitelabelConfigurationSchema:()=>rgo,WhitelabelGithubConfigurationSchema:()=>tgo,fernDefinition:()=>Sxs,generators:()=>dxs,group:()=>pxs,license:()=>_xs,reviewers:()=>hxs});var dxs={};Dn(dxs,{ApiConfigurationSchema:()=>ego,ApiConfigurationSchemaInternal:()=>_Bn,ApiConfigurationV2Schema:()=>k0o,ApiConfigurationV2SpecsSchema:()=>I0o,ApiDefinitionList:()=>O0o,ApiDefinitionPathSchema:()=>Cji,ApiDefinitionSchema:()=>g0o,ApiDefinitionSettingsSchema:()=>Bji,ApiDefinitionWithOverridesSchema:()=>fBn,AsyncApiSettingsSchema:()=>M0o,AsyncApiSpecSchema:()=>A0o,BaseApiSettingsSchema:()=>vBn,ConjureSchema:()=>B0o,FormParameterEncoding:()=>w0o,GeneratorsConfigurationSchema:()=>dOd,GeneratorsOpenApiObjectSchema:()=>Mgo,GeneratorsOpenApiSchema:()=>Ago,MessageNamingSettingsSchema:()=>lBn,NamespacedApiConfigurationSchema:()=>m0o,OpenApiExampleGenerationSchema:()=>D0o,OpenApiFilterSchema:()=>S0o,OpenApiSettingsSchema:()=>bBn,OpenApiSpecSchema:()=>E0o,OpenRpcSpecSchema:()=>T0o,OutputMetadataAuthor:()=>igo,OutputMetadataSchema:()=>zji,ProtobufApiDefinitionSchema:()=>pBn,ProtobufDefinitionSchema:()=>dBn,ProtobufSpecSchema:()=>q0o,ReadmeEndpointObjectSchema:()=>ngo,ReadmeEndpointSchema:()=>bja,ReadmeSchema:()=>ago,RequestOrResponseExampleGenerationSchema:()=>vja,SpecSchema:()=>C0o,UnionSettingsSchema:()=>b0o,WhitelabelConfigurationSchema:()=>rgo,WhitelabelGithubConfigurationSchema:()=>tgo});var _n={};Dn(_n,{JsonError:()=>oBn,ParseError:()=>uBn,any:()=>kgd,bigint:()=>Lgd,boolean:()=>eOd,booleanLiteral:()=>Zgd,date:()=>Ugd,discriminant:()=>cOd,enum_:()=>n0o,getObjectLikeUtils:()=>eVt,getObjectUtils:()=>LUi,getSchemaUtils:()=>kM,isProperty:()=>qji,lazy:()=>Vgd,lazyObject:()=>Kgd,list:()=>o0o,number:()=>tOd,object:()=>a0o,objectWithoutOptionalProperties:()=>Jgd,optional:()=>sxs,property:()=>Hgd,record:()=>aOd,set:()=>oOd,string:()=>rOd,stringLiteral:()=>Xgd,transform:()=>cxs,undiscriminatedUnion:()=>sOd,union:()=>fOd,unknown:()=>iOd,withParsedProperties:()=>fxs});var rm={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",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"};function ZM(e,t){return`Expected ${t}. Received ${OH1(e)}.`}function OH1(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 o9(e){return{...e,json:Fgd(e.json),parse:Fgd(e.parse)}}function Fgd(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(`
|
|
1635
|
-
`)),{ok:!0,value:t}):i}}function i0o(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var oBn=class e extends Error{errors;constructor(t){super(t.map(i0o).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};var uBn=class e extends Error{errors;constructor(t){super(t.map(i0o).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};function kM(e){return{nullable:()=>mH1(e),optional:()=>sxs(e),optionalNullable:()=>PH1(e),transform:t=>cxs(e,t),parseOrThrow:(t,r)=>{let i=e.parse(t,r);if(i.ok)return i.value;throw new uBn(i.errors)},jsonOrThrow:(t,r)=>{let i=e.json(t,r);if(i.ok)return i.value;throw new oBn(i.errors)}}}function mH1(e){let t={parse:(r,i)=>r==null?{ok:!0,value:null}:e.parse(r,i),json:(r,i)=>r==null?{ok:!0,value:null}:e.json(r,i),getType:()=>rm.NULLABLE};return{...t,...kM(t)}}function sxs(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:()=>rm.OPTIONAL};return{...t,...kM(t)}}function PH1(e){let t={parse:(r,i)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.parse(r,i),json:(r,i)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.json(r,i),getType:()=>rm.OPTIONAL_NULLABLE};return{...t,...kM(t)}}function cxs(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,...kM(r)}}function Lgd(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t=="bigint"?{ok:!0,value:t}:typeof t=="number"?{ok:!0,value:BigInt(t)}:{ok:!1,errors:[{path:r,message:ZM(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:ZM(t,"bigint")}]}:{ok:!0,value:t},getType:()=>rm.BIGINT};return{...o9(e),...kM(e)}}var jH1=/^([+-]?\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 Ugd(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:ZM(t,"string")}]}:jH1.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:ZM(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:ZM(t,"Date object")}]},getType:()=>rm.DATE};return{...o9(e),...kM(e)}}function kG(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...o9(r),...kM(r)}}}function n0o(e){let t=new Set(e);return kG(rm.ENUM,(i,{allowUnrecognizedEnumValues:n,breadcrumbsPrefix:a=[]}={})=>typeof i!="string"?{ok:!1,errors:[{path:a,message:ZM(i,"string")}]}:!t.has(i)&&!n?{ok:!1,errors:[{path:a,message:ZM(i,"enum")}]}:{ok:!0,value:i})()}function Vgd(e){let t=lxs(e);return{...t,...kM(t)}}function lxs(e){return{parse:(t,r)=>sBn(e).parse(t,r),json:(t,r)=>sBn(e).json(t,r),getType:()=>sBn(e).getType()}}function sBn(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}function _ja(e){return Object.entries(e)}function hja(e,t){let r=new Set(t);return Object.entries(e).reduce((i,[n,a])=>(r.has(n)&&(i[n]=a),i),{})}function Aji(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 yja(e){return Object.keys(e)}function Wgd(e,t){let r=[],i=[];for(let n of e)t(n)?r.push(n):i.push(n);return[r,i]}function eVt(e){return{withParsedProperties:t=>fxs(e,t)}}function fxs(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(!Aji(i))return{ok:!1,errors:[{path:n?.breadcrumbsPrefix??[],message:ZM(i,"object")}]};let a=new Set(Object.keys(t)),u=hja(i,Object.keys(i).filter(l=>!a.has(l)));return e.json(u,n)},getType:()=>e.getType()};return{...r,...kM(r),...eVt(r)}}function Hgd(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function qji(e){return e.isProperty}function a0o(e){let t={_getRawProperties:()=>Object.entries(e).map(([r,i])=>qji(i)?i.rawKey:r),_getParsedProperties:()=>yja(e),parse:(r,i)=>{let n={},a=[];for(let[u,l]of _ja(e)){let d=qji(l)?l.rawKey:u,s=qji(l)?l.valueSchema:l,o={rawKey:d,parsedKey:u,valueSchema:s};n[d]=o,Qgd(s)&&a.push(d)}return $gd({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 _ja(e)){let l=qji(u)?u.valueSchema:u;Qgd(l)&&n.push(a)}return $gd({value:r,requiredKeys:n,getProperty:a=>{let u=e[a];if(u!=null)return qji(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:()=>rm.OBJECT};return{...o9(t),...kM(t),...eVt(t),...LUi(t)}}function $gd({value:e,requiredKeys:t,getProperty:r,unrecognizedObjectKeys:i="fail",skipValidation:n=!1,breadcrumbsPrefix:a=[]}){if(!Aji(e))return{ok:!1,errors:[{path:a,message:ZM(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 LUi(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(i,n)=>Ggd({extensionKeys:t._getRawProperties(),value:i,transformBase:a=>e.parse(a,n),transformExtension:a=>t.parse(a,n)}),json:(i,n)=>Ggd({extensionKeys:t._getParsedProperties(),value:i,transformBase:a=>e.json(a,n),transformExtension:a=>t.json(a,n)}),getType:()=>rm.OBJECT};return{...r,...kM(r),...eVt(r),...LUi(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:()=>rm.OBJECT};return{...t,...kM(t),...eVt(t),...LUi(t)}}}}function Ggd({extensionKeys:e,value:t,transformBase:r,transformExtension:i}){let n=new Set(e),[a,u]=Wgd(yja(t),s=>n.has(s)),l=r(hja(t,u)),d=i(hja(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 Qgd(e){return!wH1(e)}function wH1(e){switch(e.getType()){case rm.ANY:case rm.UNKNOWN:case rm.OPTIONAL:case rm.OPTIONAL_NULLABLE:return!0;default:return!1}}function Jgd(e){return a0o(e)}function Kgd(e){let t={...lxs(e),_getRawProperties:()=>sBn(e)._getRawProperties(),_getParsedProperties:()=>sBn(e)._getParsedProperties()};return{...t,...kM(t),...eVt(t),...LUi(t)}}function o0o(e){let t={parse:(r,i)=>Ygd(r,(n,a)=>e.parse(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),json:(r,i)=>Ygd(r,(n,a)=>e.json(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),getType:()=>rm.LIST};return{...o9(t),...kM(t)}}function Ygd(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:ZM(e,"list"),path:[]}]}}function Xgd(e){return kG(rm.STRING_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:ZM(r,`"${e}"`)}]})()}function Zgd(e){return kG(rm.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:ZM(r,`${e.toString()}`)}]})()}var kgd=kG(rm.ANY,e=>({ok:!0,value:e}));var eOd=kG(rm.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:ZM(e,"boolean")}]});var tOd=kG(rm.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:ZM(e,"number")}]});var rOd=kG(rm.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:ZM(e,"string")}]});var iOd=kG(rm.UNKNOWN,e=>({ok:!0,value:e}));function aOd(e,t){let r={parse:(i,n)=>nOd({value:i,isKeyNumeric:e.getType()===rm.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)=>nOd({value:i,isKeyNumeric:e.getType()===rm.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:()=>rm.RECORD};return{...o9(r),...kM(r)}}function nOd({value:e,isKeyNumeric:t,transformKey:r,transformValue:i,breadcrumbsPrefix:n=[]}){return Aji(e)?_ja(e).reduce((a,[u,l])=>{if(l===void 0)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:ZM(e,"object")}]}}function oOd(e){let t=o0o(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:ZM(i,"Set")}]},getType:()=>rm.SET};return{...o9(r),...kM(r)}}function sOd(e){let t={parse:(r,i)=>uOd((n,a)=>n.parse(r,a),e,i),json:(r,i)=>uOd((n,a)=>n.json(r,a),e,i),getType:()=>rm.UNDISCRIMINATED_UNION};return{...o9(t),...kM(t)}}function uOd(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 cOd(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}function fOd(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,i=typeof e=="string"?e:e.parsedDiscriminant,n=n0o(yja(t)),a={parse:(u,l)=>lOd({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)=>lOd({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:()=>rm.UNION};return{...o9(a),...kM(a),...eVt(a)}}function lOd({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:i,getAdditionalPropertiesSchema:n,allowUnrecognizedUnionMembers:a=!1,transformAdditionalProperties:u,breadcrumbsPrefix:l=[]}){if(!Aji(e))return{ok:!1,errors:[{path:l,message:ZM(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 u0o=_n.object({"client-id":_n.string().optional(),"client-secret":_n.string().optional(),scopes:_n.string().optional()});var s0o=_n.object({"access-token":_n.string().optional(),"expires-in":_n.string().optional(),"refresh-token":_n.string().optional()});var c0o=_n.object({endpoint:_n.string(),"request-properties":u0o.optional(),"response-properties":s0o.optional()});var l0o=_n.object({"refresh-token":_n.string()});var f0o=_n.object({"access-token":_n.string().optional(),"expires-in":_n.string().optional(),"refresh-token":_n.string().optional()});var d0o=_n.object({endpoint:_n.string(),"request-properties":l0o.optional(),"response-properties":f0o.optional()});var _6=_n.object({docs:_n.string().optional()});var p0o=_n.object({scheme:_n.stringLiteral("oauth"),type:_n.stringLiteral("client-credentials"),scopes:_n.list(_n.string()).optional(),"client-id-env":_n.string().optional(),"client-secret-env":_n.string().optional(),"token-prefix":_n.string().optional(),"token-header":_n.string().optional(),"get-token":c0o,"refresh-token":d0o.optional()}).extend(_6);var cBn=_n.object({env:_n.string().optional()});var Tji=_n.object({name:_n.string().optional()});var _0o=_n.object({header:_n.string(),type:_n.string().optional(),prefix:_n.string().optional()}).extend(cBn).extend(Tji).extend(_6);var UUi=_n.object({}).extend(cBn).extend(Tji);var h0o=_n.object({scheme:_n.stringLiteral("basic"),username:UUi.optional(),password:UUi.optional()}).extend(_6);var y0o=_n.object({scheme:_n.stringLiteral("bearer"),token:UUi.optional()}).extend(_6);var v0o=_n.undiscriminatedUnion([p0o,_0o,h0o,y0o]);var Cji=_n.string();var b0o=_n.enum_(["v1"]);var lBn=_n.enum_(["v1","v2"]);var Bji=_n.object({"use-title":_n.boolean().optional(),unions:b0o.optional(),"message-naming":lBn.optional(),"respect-nullable-schemas":_n.boolean().optional(),"only-include-referenced-schemas":_n.boolean().optional(),"inline-path-parameters":_n.boolean().optional(),"idiomatic-request-names":_n.boolean().optional()});var fBn=_n.object({path:Cji,origin:_n.string().optional(),overrides:_n.string().optional(),audiences:_n.list(_n.string()).optional(),settings:Bji.optional()});var dBn=_n.object({target:_n.string(),root:_n.string(),overrides:_n.string().optional(),"local-generation":_n.boolean().optional()});var pBn=_n.object({proto:dBn});var g0o=_n.undiscriminatedUnion([Cji,fBn,pBn]);var O0o=_n.list(g0o);var _Bn=_n.undiscriminatedUnion([Cji,fBn,O0o,pBn]);var m0o=_n.object({namespaces:_n.record(_n.string(),_Bn)});var hBn=_n.object({scheme:_n.string()}).extend(_6);var P0o=_n.undiscriminatedUnion([_n.string(),hBn]);var j0o=_n.object({any:_n.list(P0o)}).extend(_6);var yBn=_n.undiscriminatedUnion([_n.string(),hBn,j0o]);var w0o=_n.enum_(["form","json"]);var S0o=_n.object({endpoints:_n.list(_n.string()).optional()});var vja=_n.object({"max-depth":_n.number().optional()});var D0o=_n.object({request:vja.optional(),response:vja.optional()});var vBn=_n.object({"respect-nullable-schemas":_n.boolean().optional(),"title-as-schema-name":_n.boolean().optional(),"optional-additional-properties":_n.boolean().optional(),"coerce-enums-to-literals":_n.boolean().optional(),"idiomatic-request-names":_n.boolean().optional()});var bBn=_n.object({"only-include-referenced-schemas":_n.boolean().optional(),"inline-path-parameters":_n.boolean().optional(),"prefer-undiscriminated-unions-with-literals":_n.boolean().optional(),"object-query-parameters":_n.boolean().optional(),"respect-readonly-schemas":_n.boolean().optional(),"respect-forward-compatible-enums":_n.boolean().optional(),"use-bytes-for-binary-response":_n.boolean().optional(),"default-form-parameter-encoding":w0o.optional(),filter:S0o.optional(),"example-generation":D0o.optional(),"additional-properties-defaults-to":_n.boolean().optional(),"type-dates-as-strings":_n.boolean().optional(),"preserve-single-schema-oneof":_n.boolean().optional()}).extend(vBn);var E0o=_n.object({openapi:_n.string(),origin:_n.string().optional(),overrides:_n.string().optional(),namespace:_n.string().optional(),settings:bBn.optional()});var M0o=_n.object({"message-naming":lBn.optional()}).extend(vBn);var A0o=_n.object({asyncapi:_n.string(),origin:_n.string().optional(),overrides:_n.string().optional(),namespace:_n.string().optional(),settings:M0o.optional()});var q0o=_n.object({proto:dBn});var T0o=_n.object({openrpc:_n.string(),overrides:_n.string().optional(),namespace:_n.string().optional()});var C0o=_n.undiscriminatedUnion([E0o,A0o,q0o,T0o]);var B0o=_n.object({conjure:_n.string()});var I0o=_n.undiscriminatedUnion([_n.list(C0o),B0o]);var z0o=_n.object({type:_n.string()});var x0o=_n.object({proto:z0o.optional()});var R0o=_n.object({minLength:_n.number().optional(),maxLength:_n.number().optional(),pattern:_n.string().optional(),format:_n.string().optional()});var N0o=_n.object({min:_n.number().optional(),max:_n.number().optional(),exclusiveMin:_n.boolean().optional(),exclusiveMax:_n.boolean().optional(),multipleOf:_n.number().optional()});var F0o=_n.undiscriminatedUnion([R0o,N0o]);var gBn=_n.enum_(["in-development","pre-release","deprecated","generally-available"]);var L0o=_n.object({status:gBn,message:_n.string().optional()});var U0o=_n.undiscriminatedUnion([gBn,L0o]);var V0o=_n.object({availability:U0o.optional()});var W0o=_n.object({default:_n.unknown().optional(),encoding:x0o.optional(),validation:F0o.optional()}).extend(_6).extend(V0o);var Iji=_n.object({audiences:_n.list(_n.string()).optional()});var H0o=_n.object({type:_n.string()}).extend(W0o).extend(Tji).extend(Iji);var $0o=_n.object({env:_n.string().optional()}).extend(H0o);var G0o=_n.undiscriminatedUnion([_n.string(),$0o]);var Q0o=G0o;var J0o=_n.object({headers:_n.record(_n.string(),Q0o).optional()});var K0o=_n.object({url:_n.string()}).extend(Iji).extend(_6);var Y0o=_n.object({urls:_n.record(_n.string(),_n.string())}).extend(Iji).extend(_6);var X0o=_n.undiscriminatedUnion([_n.string(),K0o,Y0o]);var Z0o=_n.object({"default-url":_n.string().optional(),"default-environment":_n.string().optional(),environments:_n.record(_n.string(),X0o).optional()});var k0o=_n.object({auth:yBn.optional(),specs:I0o}).extend(J0o).extend(Z0o);var ego=_n.undiscriminatedUnion([_Bn,m0o,k0o]);var tgo=_n.object({username:_n.string(),email:_n.string(),token:_n.string()});var rgo=_n.object({github:tgo.optional()});var igo=_n.object({name:_n.string(),email:_n.string()});var zji=_n.object({description:_n.string().optional(),authors:_n.list(igo).optional()});var ngo=_n.object({method:_n.string(),path:_n.string(),stream:_n.boolean().optional()});var bja=_n.undiscriminatedUnion([_n.string(),ngo]);var ago=_n.object({bannerLink:_n.string().optional(),introduction:_n.string().optional(),apiReferenceLink:_n.string().optional(),defaultEndpoint:bja.optional(),features:_n.record(_n.string(),_n.list(bja)).optional()});var ogo=_n.object({url:_n.string().optional(),"package-name":_n.string(),token:_n.string().optional()});var ugo=_n.object({keyId:_n.string(),password:_n.string(),secretKey:_n.string()});var sgo=_n.object({url:_n.string().optional(),coordinate:_n.string(),username:_n.string().optional(),password:_n.string().optional(),signature:ugo.optional()});var cgo=_n.object({keywords:_n.list(_n.string()).optional(),"documentation-link":_n.string().optional(),"homepage-link":_n.string().optional()}).extend(zji);var lgo=_n.object({url:_n.string().optional(),"package-name":_n.string(),token:_n.string().optional(),username:_n.string().optional(),password:_n.string().optional(),metadata:cgo.optional()});var fgo=_n.object({"api-key":_n.string(),"workspace-id":_n.string(),"collection-id":_n.string().optional()});var dgo=_n.object({path:_n.string()});var pgo=_n.object({url:_n.string().optional(),"package-name":_n.string(),"api-key":_n.string().optional()});var _go=_n.object({url:_n.string().optional(),"package-name":_n.string(),"api-key":_n.string().optional()});var hgo=_n.union("location",{npm:ogo,maven:sgo,pypi:lgo,postman:fgo,"local-file-system":dgo,nuget:pgo,rubygems:_go}).transform({transform:e=>e,untransform:e=>e});var ygo=_n.object({uri:_n.string(),token:_n.string()});var vgo=_n.enum_(["MIT","Apache-2.0"]);var bgo=_n.object({custom:_n.string()});var oXt=_n.undiscriminatedUnion([vgo,bgo]);var ggo=_n.enum_(["commit","release"]);var Ogo=_n.object({repository:_n.string(),license:oXt.optional(),mode:ggo.optional()});var gja=_n.object({name:_n.string()});var xji=_n.object({teams:_n.list(gja).optional(),users:_n.list(gja).optional()});var mgo=_n.object({repository:_n.string(),branch:_n.string().optional(),license:oXt.optional(),mode:_n.stringLiteral("pull-request"),reviewers:xji.optional()});var Pgo=_n.object({repository:_n.string(),license:oXt.optional(),mode:_n.stringLiteral("push"),branch:_n.string().optional()});var jgo=_n.undiscriminatedUnion([ygo,Ogo,mgo,Pgo]);var Oja=_n.object({"package-description":_n.string().optional(),email:_n.string().optional(),"reference-url":_n.string().optional(),author:_n.string().optional(),license:oXt.optional()});var wgo=_n.object({path:_n.string()});var Sgo=_n.object({auth:yBn.optional(),settings:Bji.optional()});var Dgo=_n.object({name:_n.string(),version:_n.string(),output:hgo.optional(),github:jgo.optional(),config:_n.unknown(),metadata:Oja.optional(),keywords:_n.list(_n.string()).optional(),snippets:wgo.optional(),"ir-version":_n.string().optional(),"smart-casing":_n.boolean().optional(),api:Sgo.optional(),"disable-examples":_n.boolean().optional(),"publish-metadata":Oja.optional()});var Ego=_n.object({audiences:_n.list(_n.string()).optional(),generators:_n.list(Dgo),metadata:zji.optional(),reviewers:xji.optional()});var Mgo=_n.object({path:_n.string(),origin:_n.string().optional(),overrides:_n.string().optional(),"disable-examples":_n.boolean().optional(),settings:bBn});var Ago=_n.undiscriminatedUnion([Mgo,_n.string()]);var dOd=_n.object({"auth-schemes":_n.record(_n.string(),v0o).optional(),api:ego.optional(),whitelabel:rgo.optional(),metadata:zji.optional(),readme:ago.optional(),"default-group":_n.string().optional(),groups:_n.record(_n.string(),Ego).optional(),reviewers:xji.optional(),openapi:Ago.optional(),"openapi-overrides":_n.string().optional(),"spec-origin":_n.string().optional(),"async-api":_n.string().optional(),"api-settings":Bji.optional()});var pxs={};Dn(pxs,{GeneratorApiSettingsSchema:()=>Sgo,GeneratorGroupSchema:()=>Ego,GeneratorInvocationSchema:()=>Dgo,GeneratorOutputSchema:()=>hgo,GeneratorPublishMetadataSchema:()=>Oja,GeneratorSnippetsSchema:()=>wgo,GithubCommitAndReleaseMode:()=>ggo,GithubCommitAndReleaseSchema:()=>Ogo,GithubConfigurationSchema:()=>jgo,GithubPullRequestSchema:()=>mgo,GithubPushSchema:()=>Pgo,GithubSelfhostedSchema:()=>ygo,LocalFileSystemOutputLocationSchema:()=>dgo,MavenOutputLocationSchema:()=>sgo,MavenOutputSignatureSchema:()=>ugo,NpmOutputLocationSchema:()=>ogo,NugetOutputLocationSchema:()=>pgo,PostmanOutputLocationSchema:()=>fgo,PypiOutputLocationSchema:()=>lgo,PypiOutputMetadataSchema:()=>cgo,RubyGemsOutputLocationSchema:()=>_go});var _xs={};Dn(_xs,{GithubLicenseCustomSchema:()=>bgo,GithubLicenseSchema:()=>oXt,GithubLicenseType:()=>vgo});var hxs={};Dn(hxs,{ReviewerSchema:()=>gja,ReviewersSchema:()=>xji});var Sxs={};Dn(Sxs,{AnyAuthItem:()=>P0o,AnyAuthSchemesSchema:()=>j0o,ApiAuthSchema:()=>yBn,AuthSchemeDeclarationSchema:()=>v0o,AuthSchemeReferenceSchema:()=>hBn,AuthVariable:()=>UUi,AvailabilitySchema:()=>L0o,AvailabilityStatusSchema:()=>gBn,AvailabilityUnionSchema:()=>U0o,BaseTypeReferenceSchema:()=>W0o,BasicAuthSchemeSchema:()=>h0o,BearerAuthSchemeSchema:()=>y0o,EncodingSchema:()=>x0o,EnvironmentSchema:()=>X0o,HeaderAuthSchemeSchema:()=>_0o,HttpHeaderSchema:()=>Q0o,MultipleBaseUrlsEnvironmentSchema:()=>Y0o,NumberValidationSchema:()=>N0o,OAuthAccessTokenRequestPropertiesSchema:()=>u0o,OAuthAccessTokenResponsePropertiesSchema:()=>s0o,OAuthGetTokenEndpointSchema:()=>c0o,OAuthRefreshTokenEndpointSchema:()=>d0o,OAuthRefreshTokenRequestPropertiesSchema:()=>l0o,OAuthRefreshTokenResponsePropertiesSchema:()=>f0o,OAuthSchemeSchema:()=>p0o,ProtobufTypeSchema:()=>z0o,SingleBaseUrlEnvironmentSchema:()=>K0o,StringValidationSchema:()=>R0o,TypeReferenceDeclarationWithEnvOverride:()=>G0o,TypeReferenceDeclarationWithEnvOverrideSchema:()=>$0o,TypeReferenceDeclarationWithName:()=>H0o,ValidationSchema:()=>F0o,WithAudiences:()=>Iji,WithAvailability:()=>V0o,WithDocsSchema:()=>_6,WithEnvironmentVariable:()=>cBn,WithEnvironmentsSchema:()=>Z0o,WithHeadersSchema:()=>J0o,WithName:()=>Tji,auth:()=>yxs,availability:()=>vxs,commons:()=>bxs,encoding:()=>gxs,environments:()=>Oxs,file:()=>mxs,service:()=>Pxs,types:()=>jxs,validation:()=>wxs});var yxs={};Dn(yxs,{AnyAuthItem:()=>P0o,AnyAuthSchemesSchema:()=>j0o,ApiAuthSchema:()=>yBn,AuthSchemeDeclarationSchema:()=>v0o,AuthSchemeReferenceSchema:()=>hBn,AuthVariable:()=>UUi,BasicAuthSchemeSchema:()=>h0o,BearerAuthSchemeSchema:()=>y0o,HeaderAuthSchemeSchema:()=>_0o,OAuthAccessTokenRequestPropertiesSchema:()=>u0o,OAuthAccessTokenResponsePropertiesSchema:()=>s0o,OAuthGetTokenEndpointSchema:()=>c0o,OAuthRefreshTokenEndpointSchema:()=>d0o,OAuthRefreshTokenRequestPropertiesSchema:()=>l0o,OAuthRefreshTokenResponsePropertiesSchema:()=>f0o,OAuthSchemeSchema:()=>p0o,WithEnvironmentVariable:()=>cBn});var vxs={};Dn(vxs,{AvailabilitySchema:()=>L0o,AvailabilityStatusSchema:()=>gBn,AvailabilityUnionSchema:()=>U0o});var bxs={};Dn(bxs,{WithAudiences:()=>Iji,WithAvailability:()=>V0o,WithDocsSchema:()=>_6,WithName:()=>Tji});var gxs={};Dn(gxs,{EncodingSchema:()=>x0o,ProtobufTypeSchema:()=>z0o});var Oxs={};Dn(Oxs,{EnvironmentSchema:()=>X0o,MultipleBaseUrlsEnvironmentSchema:()=>Y0o,SingleBaseUrlEnvironmentSchema:()=>K0o,WithEnvironmentsSchema:()=>Z0o});var mxs={};Dn(mxs,{WithHeadersSchema:()=>J0o});var Pxs={};Dn(Pxs,{HttpHeaderSchema:()=>Q0o,TypeReferenceDeclarationWithEnvOverride:()=>G0o,TypeReferenceDeclarationWithEnvOverrideSchema:()=>$0o});var jxs={};Dn(jxs,{BaseTypeReferenceSchema:()=>W0o,TypeReferenceDeclarationWithName:()=>H0o});var wxs={};Dn(wxs,{NumberValidationSchema:()=>N0o,StringValidationSchema:()=>R0o,ValidationSchema:()=>F0o});var pOd="spec-origin",_Od="async-api",hOd="default-group",yOd="openapi",SH1="openapi-overrides",DH1="api-settings";var vOd={TYPESCRIPT:"typescript",JAVA:"java",PYTHON:"python",GO:"go",RUBY:"ruby",CSHARP:"csharp",SWIFT:"swift",PHP:"php"};function bOd({generatorInvocation:e}){return e.language==="go"?EH1(e):e.outputMode._visit({downloadFiles:()=>{},github:t=>t.publishInfo?._visit({maven:r=>r.coordinate,npm:r=>r.packageName,pypi:r=>r.packageName,postman:()=>{},rubygems:r=>r.packageName,nuget:r=>r.packageName,_other:()=>{}}),githubV2:t=>t.publishInfo?._visit({maven:r=>r.coordinate,npm:r=>r.packageName,pypi:r=>r.packageName,postman:()=>{},rubygems:r=>r.packageName,nuget:r=>r.packageName,_other:()=>{}}),publish:()=>{},publishV2:()=>{},_other:()=>{}})}function EH1(e){return e.outputMode._visit({downloadFiles:()=>{},github:t=>`github.com/${t.owner}/${t.repo}`,githubV2:t=>`github.com/${t.owner}/${t.repo}`,publish:()=>{},publishV2:()=>{},_other:()=>{}})}function gOd(e){return typeof e!="string"&&"proto"in e}var mOd=ai(require("path"),1);function uEe(e){return e.replace(/\\/g,"/")}function qgo(e){return e.startsWith("/")}var OBn={of:e=>{if(!qgo(e))throw new Error("Filepath is not absolute: "+e);return uEe(e)}};var gy={of:e=>{if(qgo(e))throw new Error("Filepath is not relative: "+e);return uEe(e)}};function VUi(e,t){let r=e.split("/").pop()??e;return t?.stripExtension?r.split(".")[0]??r:r}function yxe(e){let r=e.replace(/\/+$/,"").lastIndexOf("/");return r===-1?".":r===0?"/":e.slice(0,r)}function EN(...e){let t=[];for(let r of e.flatMap(i=>i.split("/")).filter(Boolean))r==="."||r===""||(r===".."&&t.length>0&&t[t.length-1]!==".."?t.pop():t.push(r));return(e[0]?.startsWith("/")?"/":"")+t.join("/")}var tVt="/";function Tgo(e,t){let r=e.split(tVt).filter(Boolean),i=t.split(tVt).filter(Boolean),n=0;for(;n<r.length&&n<i.length&&r[n]===i[n];)n++;let a=r.length-n;return[...Array(a).fill(".."),...i.slice(n)].join(tVt)||"."}function Exs(e){return OOd(e)}function Cgo(e){return OOd(e)}function OOd(e){let t=e;return/^[a-zA-Z]:\\/.test(e)&&(t=e.substring(2)),t.replace(/\\/g,"/")}var hl={of:e=>{if(!mOd.default.isAbsolute(e))throw new Error("Filepath is not absolute: "+e);return uEe(e)}};function kz(){return process.cwd()}var POd=ai(require("path"),1);function Td(e){return POd.default.dirname(e)}var jOd=require("fs"),wOd=require("fs/promises");async function mf(e,t){try{let r=await(0,wOd.lstat)(e);return!(t==="file"&&!r.isFile()||t==="directory"&&!r.isDirectory())}catch{return!1}}function Vci(e,t){try{let r=(0,jOd.lstatSync)(e);return!(t==="file"&&!r.isFile()||t==="directory"&&!r.isDirectory())}catch{return!1}}var Bgo=require("fs/promises"),Mxs=ai(require("path"),1);var SOd=ai(require("path"),1);var Ua={of:e=>{if(SOd.default.isAbsolute(e))throw new Error("Filepath is not relative: "+e);return uEe(e)}};var DOd=ai(require("path"),1);function Lu(...e){return DOd.default.join(...e)}async function uXt(e,t={}){let r=t.fileExtensions!=null?new Set(t.fileExtensions.map(a=>a.startsWith(".")?a:`.${a}`)):void 0,i=[],n=await(0,Bgo.readdir)(e,{withFileTypes:!0});return await Promise.all(n.map(async a=>{let u=Lu(e,Ua.of(a.name));a.isDirectory()?i.push({type:"directory",name:a.name,absolutePath:u,contents:await uXt(u,t)}):(r==null||r.has(Mxs.default.extname(a.name)))&&i.push({type:"file",name:a.name,absolutePath:u,contents:(await(0,Bgo.readFile)(Mxs.default.join(e,a.name))).toString()})})),i.sort((a,u)=>a.name<u.name?-1:1)}var Axs=(e,t,r)=>{let i=e instanceof RegExp?EOd(e,r):e,n=t instanceof RegExp?EOd(t,r):t,a=i!==null&&n!=null&&MH1(i,n,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+i.length,a[1]),post:r.slice(a[1]+n.length)}},EOd=(e,t)=>{let r=t.match(e);return r?r[0]:null},MH1=(e,t,r)=>{let i,n,a,u,l,d=r.indexOf(e),s=r.indexOf(t,d+1),o=d;if(d>=0&&s>0){if(e===t)return[d,s];for(i=[],a=r.length;o>=0&&!l;){if(o===d)i.push(o),d=r.indexOf(e,o+1);else if(i.length===1){let c=i.pop();c!==void 0&&(l=[c,s])}else n=i.pop(),n!==void 0&&n<a&&(a=n,u=s),s=r.indexOf(t,o+1);o=d<s&&d>=0?d:s}i.length&&u!==void 0&&(l=[a,u])}return l};var MOd="\0SLASH"+Math.random()+"\0",AOd="\0OPEN"+Math.random()+"\0",Txs="\0CLOSE"+Math.random()+"\0",qOd="\0COMMA"+Math.random()+"\0",TOd="\0PERIOD"+Math.random()+"\0",AH1=new RegExp(MOd,"g"),qH1=new RegExp(AOd,"g"),TH1=new RegExp(Txs,"g"),CH1=new RegExp(qOd,"g"),BH1=new RegExp(TOd,"g"),IH1=/\\\\/g,zH1=/\\{/g,xH1=/\\}/g,RH1=/\\,/g,NH1=/\\./g;function qxs(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function FH1(e){return e.replace(IH1,MOd).replace(zH1,AOd).replace(xH1,Txs).replace(RH1,qOd).replace(NH1,TOd)}function LH1(e){return e.replace(AH1,"\\").replace(qH1,"{").replace(TH1,"}").replace(CH1,",").replace(BH1,".")}function COd(e){if(!e)return[""];let t=[],r=Axs("{","}",e);if(!r)return e.split(",");let{pre:i,body:n,post:a}=r,u=i.split(",");u[u.length-1]+="{"+n+"}";let l=COd(a);return a.length&&(u[u.length-1]+=l.shift(),u.push.apply(u,l)),t.push.apply(t,u),t}function BOd(e){return e?(e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),mja(FH1(e),!0).map(LH1)):[]}function UH1(e){return"{"+e+"}"}function VH1(e){return/^-?0\d/.test(e)}function WH1(e,t){return e<=t}function HH1(e,t){return e>=t}function mja(e,t){let r=[],i=Axs("{","}",e);if(!i)return[e];let n=i.pre,a=i.post.length?mja(i.post,!1):[""];if(/\$$/.test(i.pre))for(let u=0;u<a.length;u++){let l=n+"{"+i.body+"}"+a[u];r.push(l)}else{let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),d=u||l,s=i.body.indexOf(",")>=0;if(!d&&!s)return i.post.match(/,(?!,).*\}/)?(e=i.pre+"{"+i.body+Txs+i.post,mja(e)):[e];let o;if(d)o=i.body.split(/\.\./);else if(o=COd(i.body),o.length===1&&o[0]!==void 0&&(o=mja(o[0],!1).map(UH1),o.length===1))return a.map(b=>i.pre+o[0]+b);let c;if(d&&o[0]!==void 0&&o[1]!==void 0){let b=qxs(o[0]),g=qxs(o[1]),O=Math.max(o[0].length,o[1].length),m=o.length===3&&o[2]!==void 0?Math.abs(qxs(o[2])):1,w=WH1;g<b&&(m*=-1,w=HH1);let q=o.some(VH1);c=[];for(let A=b;w(A,g);A+=m){let D;if(l)D=String.fromCharCode(A),D==="\\"&&(D="");else if(D=String(A),q){let C=O-D.length;if(C>0){let x=new Array(C+1).join("0");A<0?D="-"+x+D.slice(1):D=x+D}}c.push(D)}}else{c=[];for(let b=0;b<o.length;b++)c.push.apply(c,mja(o[b],!1))}for(let b=0;b<c.length;b++)for(let g=0;g<a.length;g++){let O=n+c[b]+a[g];(!t||d||O)&&r.push(O)}}return r}var Pja=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};var $H1={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},jja=e=>e.replace(/[[\]\\-]/g,"\\$&"),GH1=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),IOd=e=>e.join(""),zOd=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],a=r+1,u=!1,l=!1,d=!1,s=!1,o=r,c="";e:for(;a<e.length;){let m=e.charAt(a);if((m==="!"||m==="^")&&a===r+1){s=!0,a++;continue}if(m==="]"&&u&&!d){o=a+1;break}if(u=!0,m==="\\"&&!d){d=!0,a++;continue}if(m==="["&&!d){for(let[w,[E,q,A]]of Object.entries($H1))if(e.startsWith(w,a)){if(c)return["$.",!1,e.length-r,!0];a+=w.length,A?n.push(E):i.push(E),l=l||q;continue e}}if(d=!1,c){m>c?i.push(jja(c)+"-"+jja(m)):m===c&&i.push(jja(m)),c="",a++;continue}if(e.startsWith("-]",a+1)){i.push(jja(m+"-")),a+=2;continue}if(e.startsWith("-",a+1)){c=m,a+=2;continue}i.push(jja(m)),a++}if(o<a)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!s){let m=i[0].length===2?i[0].slice(-1):i[0];return[GH1(m),!1,o-r,!1]}let b="["+(s?"^":"")+IOd(i)+"]",g="["+(s?"":"^")+IOd(n)+"]";return[i.length&&n.length?"("+b+"|"+g+")":i.length?b:g,l,o-r,!0]};var rVt=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var QH1=new Set(["!","?","+","*","@"]),xOd=e=>QH1.has(e),JH1="(?!(?:^|/)\\.\\.?(?:$|/))",Igo="(?!\\.)",KH1=new Set(["[","."]),YH1=new Set(["..","."]),XH1=new Set("().*{}+?[]^$\\!"),ZH1=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Cxs="[^/]",ROd=Cxs+"*?",NOd=Cxs+"+?",mBn=class e{type;#e;#t;#r=!1;#n=[];#i;#a;#o;#s=!1;#f;#u;#c=!1;constructor(t,r,i={}){this.type=t,t&&(this.#t=!0),this.#i=r,this.#e=this.#i?this.#i.#e:this,this.#f=this.#e===this?i:this.#e.#f,this.#o=this.#e===this?[]:this.#e.#o,t==="!"&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#n.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let t of this.#n)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#n.map(t=>String(t)).join("|")+")":this.#u=this.#n.map(t=>String(t)).join("")}#l(){if(this!==this.#e)throw new Error("should only call on root");if(this.#s)return this;this.toString(),this.#s=!0;let t;for(;t=this.#o.pop();){if(t.type!=="!")continue;let r=t,i=r.#i;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#n.length;n++)for(let a of t.#n){if(typeof a=="string")throw new Error("string part in extglob AST??");a.copyIn(i.#n[n])}r=i,i=r.#i}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof e&&r.#i===this))throw new Error("invalid part: "+r);this.#n.push(r)}}toJSON(){let t=this.type===null?this.#n.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#n.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let t=this.#i;for(let r=0;r<this.#a;r++){let i=t.#n[r];if(!(i instanceof e&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let t=this.#i?this.#i.#n.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new e(this.type,t);for(let i of this.#n)r.copyIn(i);return r}static#p(t,r,i,n){let a=!1,u=!1,l=-1,d=!1;if(r.type===null){let g=i,O="";for(;g<t.length;){let m=t.charAt(g++);if(a||m==="\\"){a=!a,O+=m;continue}if(u){g===l+1?(m==="^"||m==="!")&&(d=!0):m==="]"&&!(g===l+2&&d)&&(u=!1),O+=m;continue}else if(m==="["){u=!0,l=g,d=!1,O+=m;continue}if(!n.noext&&xOd(m)&&t.charAt(g)==="("){r.push(O),O="";let w=new e(m,r);g=e.#p(t,w,g,n),r.push(w);continue}O+=m}return r.push(O),g}let s=i+1,o=new e(null,r),c=[],b="";for(;s<t.length;){let g=t.charAt(s++);if(a||g==="\\"){a=!a,b+=g;continue}if(u){s===l+1?(g==="^"||g==="!")&&(d=!0):g==="]"&&!(s===l+2&&d)&&(u=!1),b+=g;continue}else if(g==="["){u=!0,l=s,d=!1,b+=g;continue}if(xOd(g)&&t.charAt(s)==="("){o.push(b),b="";let O=new e(g,o);o.push(O),s=e.#p(t,O,s,n);continue}if(g==="|"){o.push(b),b="",c.push(o),o=new e(null,r);continue}if(g===")")return b===""&&r.#n.length===0&&(r.#c=!0),o.push(b),b="",r.push(...c,o),s;b+=g}return r.type=null,r.#t=void 0,r.#n=[t.substring(i-1)],s}static fromGlob(t,r={}){let i=new e(null,void 0,r);return e.#p(t,i,0,r),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[r,i,n,a]=this.toRegExpSource();if(!(n||this.#t||this.#f.nocase&&!this.#f.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let l=(this.#f.nocase?"i":"")+(a?"u":"");return Object.assign(new RegExp(`^${r}$`,l),{_src:r,_glob:t})}get options(){return this.#f}toRegExpSource(t){let r=t??!!this.#f.dot;if(this.#e===this&&this.#l(),!this.type){let d=this.isStart()&&this.isEnd(),s=this.#n.map(g=>{let[O,m,w,E]=typeof g=="string"?e.#_(g,this.#t,d):g.toRegExpSource(t);return this.#t=this.#t||w,this.#r=this.#r||E,O}).join(""),o="";if(this.isStart()&&typeof this.#n[0]=="string"&&!(this.#n.length===1&&YH1.has(this.#n[0]))){let O=KH1,m=r&&O.has(s.charAt(0))||s.startsWith("\\.")&&O.has(s.charAt(2))||s.startsWith("\\.\\.")&&O.has(s.charAt(4)),w=!r&&!t&&O.has(s.charAt(0));o=m?JH1:w?Igo:""}let c="";return this.isEnd()&&this.#e.#s&&this.#i?.type==="!"&&(c="(?:$|\\/)"),[o+s+c,rVt(s),this.#t=!!this.#t,this.#r]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",a=this.#h(r);if(this.isStart()&&this.isEnd()&&!a&&this.type!=="!"){let d=this.toString();return this.#n=[d],this.type=null,this.#t=void 0,[d,rVt(this.toString()),!1,!1]}let u=!i||t||r||!Igo?"":this.#h(!0);u===a&&(u=""),u&&(a=`(?:${a})(?:${u})*?`);let l="";if(this.type==="!"&&this.#c)l=(this.isStart()&&!r?Igo:"")+NOd;else{let d=this.type==="!"?"))"+(this.isStart()&&!r&&!t?Igo:"")+ROd+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&u?")":this.type==="*"&&u?")?":`)${this.type}`;l=n+a+d}return[l,rVt(a),this.#t=!!this.#t,this.#r]}#h(t){return this.#n.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,a,u]=r.toRegExpSource(t);return this.#r=this.#r||u,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#_(t,r,i=!1){let n=!1,a="",u=!1;for(let l=0;l<t.length;l++){let d=t.charAt(l);if(n){n=!1,a+=(XH1.has(d)?"\\":"")+d;continue}if(d==="\\"){l===t.length-1?a+="\\\\":n=!0;continue}if(d==="["){let[s,o,c,b]=zOd(t,l);if(c){a+=s,u=u||o,l+=c-1,r=r||b;continue}}if(d==="*"){i&&t==="*"?a+=NOd:a+=ROd,r=!0;continue}if(d==="?"){a+=Cxs,r=!0;continue}a+=ZH1(d)}return[a,rVt(t),!!r,u]}};var PBn=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");var QX=(e,t,r={})=>(Pja(t),!r.nocomment&&t.charAt(0)==="#"?!1:new sEe(t,r).match(e)),kH1=/^\*+([^+@!?\*\[\(]*)$/,e$1=e=>t=>!t.startsWith(".")&&t.endsWith(e),t$1=e=>t=>t.endsWith(e),r$1=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),i$1=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),n$1=/^\*+\.\*+$/,a$1=e=>!e.startsWith(".")&&e.includes("."),o$1=e=>e!=="."&&e!==".."&&e.includes("."),u$1=/^\.\*+$/,s$1=e=>e!=="."&&e!==".."&&e.startsWith("."),c$1=/^\*+$/,l$1=e=>e.length!==0&&!e.startsWith("."),f$1=e=>e.length!==0&&e!=="."&&e!=="..",d$1=/^\?+([^+@!?\*\[\(]*)?$/,p$1=([e,t=""])=>{let r=UOd([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},_$1=([e,t=""])=>{let r=VOd([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},h$1=([e,t=""])=>{let r=VOd([e]);return t?i=>r(i)&&i.endsWith(t):r},y$1=([e,t=""])=>{let r=UOd([e]);return t?i=>r(i)&&i.endsWith(t):r},UOd=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},VOd=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},WOd=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",FOd={win32:{sep:"\\"},posix:{sep:"/"}},v$1=WOd==="win32"?FOd.win32.sep:FOd.posix.sep;QX.sep=v$1;var GV=Symbol("globstar **");QX.GLOBSTAR=GV;var b$1="[^/]",g$1=b$1+"*?",O$1="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",m$1="(?:(?!(?:\\/|^)\\.).)*?",P$1=(e,t={})=>r=>QX(r,e,t);QX.filter=P$1;var vxe=(e,t={})=>Object.assign({},e,t),j$1=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return QX;let t=QX;return Object.assign((i,n,a={})=>t(i,n,vxe(e,a)),{Minimatch:class extends t.Minimatch{constructor(n,a={}){super(n,vxe(e,a))}static defaults(n){return t.defaults(vxe(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,a,u={}){super(n,a,vxe(e,u))}static fromGlob(n,a={}){return t.AST.fromGlob(n,vxe(e,a))}},unescape:(i,n={})=>t.unescape(i,vxe(e,n)),escape:(i,n={})=>t.escape(i,vxe(e,n)),filter:(i,n={})=>t.filter(i,vxe(e,n)),defaults:i=>t.defaults(vxe(e,i)),makeRe:(i,n={})=>t.makeRe(i,vxe(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,vxe(e,n)),match:(i,n,a={})=>t.match(i,n,vxe(e,a)),sep:t.sep,GLOBSTAR:GV})};QX.defaults=j$1;var HOd=(e,t={})=>(Pja(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:BOd(e));QX.braceExpand=HOd;var w$1=(e,t={})=>new sEe(e,t).makeRe();QX.makeRe=w$1;var S$1=(e,t,r={})=>{let i=new sEe(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};QX.match=S$1;var LOd=/[?*]|[+@!]\(.*?\)|\[|\]/,D$1=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),sEe=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,r={}){Pja(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||WOd,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...a)=>console.error(...a)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(a=>this.slashSplit(a));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((a,u,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let d=a[0]===""&&a[1]===""&&(a[2]==="?"||!LOd.test(a[2]))&&!LOd.test(a[3]),s=/^[a-z]:/i.test(a[0]);if(d)return[...a.slice(0,4),...a.slice(4).map(o=>this.parse(o))];if(s)return[a[0],...a.slice(1).map(o=>this.parse(o))]}return a.map(d=>this.parse(d))});if(this.debug(this.pattern,n),this.set=n.filter(a=>a.indexOf(!1)===-1),this.isWindows)for(let a=0;a<this.set.length;a++){let u=this.set[a];u[0]===""&&u[1]===""&&this.globParts[a][2]==="?"&&typeof u[3]=="string"&&/^[a-z]:$/i.test(u[3])&&(u[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let a=i[i.length-1];return n==="**"&&a==="**"?i:n===".."&&a&&a!==".."&&a!=="."&&a!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let a=t[n];n===1&&a===""&&t[0]===""||(a==="."||a==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let u=n;for(;i[u+1]==="**";)u++;u>n&&i.splice(n+1,u-n);let l=i[n+1],d=i[n+2],s=i[n+3];if(l!==".."||!d||d==="."||d===".."||!s||s==="."||s==="..")continue;r=!0,i.splice(n,1);let o=i.slice(0);o[n]="**",t.push(o),n--}if(!this.preserveMultipleSlashes){for(let u=1;u<i.length-1;u++){let l=i[u];u===1&&l===""&&i[0]===""||(l==="."||l==="")&&(r=!0,i.splice(u,1),u--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let a=0;for(;(a=i.indexOf("..",a+1))!==-1;){let u=i[a-1];if(u&&u!=="."&&u!==".."&&u!=="**"){r=!0;let d=a===1&&i[a+1]==="**"?["."]:[];i.splice(a-1,2,...d),i.length===0&&i.push(""),a-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,a=0,u=[],l="";for(;n<t.length&&a<r.length;)if(t[n]===r[a])u.push(l==="b"?r[a]:t[n]),n++,a++;else if(i&&t[n]==="**"&&r[a]===t[n+1])u.push(t[n]),n++;else if(i&&r[a]==="**"&&t[n]===r[a+1])u.push(r[a]),a++;else if(t[n]==="*"&&r[a]&&(this.options.dot||!r[a].startsWith("."))&&r[a]!=="**"){if(l==="b")return!1;l="a",u.push(t[n]),n++,a++}else if(r[a]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(l==="a")return!1;l="b",u.push(r[a]),n++,a++}else return!1;return t.length===r.length&&u}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=this.options;if(this.isWindows){let m=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),w=!m&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),E=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),q=!E&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),A=w?3:m?0:void 0,D=q?3:E?0:void 0;if(typeof A=="number"&&typeof D=="number"){let[C,x]=[t[A],r[D]];C.toLowerCase()===x.toLowerCase()&&(r[D]=C,D>A?r=r.slice(D):A>D&&(t=t.slice(A)))}}let{optimizationLevel:a=1}=this.options;a>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var u=0,l=0,d=t.length,s=r.length;u<d&&l<s;u++,l++){this.debug("matchOne loop");var o=r[l],c=t[u];if(this.debug(r,o,c),o===!1)return!1;if(o===GV){this.debug("GLOBSTAR",[r,o,c]);var b=u,g=l+1;if(g===s){for(this.debug("** at the end");u<d;u++)if(t[u]==="."||t[u]===".."||!n.dot&&t[u].charAt(0)===".")return!1;return!0}for(;b<d;){var O=t[b];if(this.debug(`
|
|
1635
|
+
`)),{ok:!0,value:t}):i}}function i0o(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var oBn=class e extends Error{errors;constructor(t){super(t.map(i0o).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};var uBn=class e extends Error{errors;constructor(t){super(t.map(i0o).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};function kM(e){return{nullable:()=>mH1(e),optional:()=>sxs(e),optionalNullable:()=>PH1(e),transform:t=>cxs(e,t),parseOrThrow:(t,r)=>{let i=e.parse(t,r);if(i.ok)return i.value;throw new uBn(i.errors)},jsonOrThrow:(t,r)=>{let i=e.json(t,r);if(i.ok)return i.value;throw new oBn(i.errors)}}}function mH1(e){let t={parse:(r,i)=>r==null?{ok:!0,value:null}:e.parse(r,i),json:(r,i)=>r==null?{ok:!0,value:null}:e.json(r,i),getType:()=>rm.NULLABLE};return{...t,...kM(t)}}function sxs(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:()=>rm.OPTIONAL};return{...t,...kM(t)}}function PH1(e){let t={parse:(r,i)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.parse(r,i),json:(r,i)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.json(r,i),getType:()=>rm.OPTIONAL_NULLABLE};return{...t,...kM(t)}}function cxs(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,...kM(r)}}function Lgd(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t=="bigint"?{ok:!0,value:t}:typeof t=="number"?{ok:!0,value:BigInt(t)}:{ok:!1,errors:[{path:r,message:ZM(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:ZM(t,"bigint")}]}:{ok:!0,value:t},getType:()=>rm.BIGINT};return{...o9(e),...kM(e)}}var jH1=/^([+-]?\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 Ugd(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:ZM(t,"string")}]}:jH1.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:ZM(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:ZM(t,"Date object")}]},getType:()=>rm.DATE};return{...o9(e),...kM(e)}}function kG(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...o9(r),...kM(r)}}}function n0o(e){let t=new Set(e);return kG(rm.ENUM,(i,{allowUnrecognizedEnumValues:n,breadcrumbsPrefix:a=[]}={})=>typeof i!="string"?{ok:!1,errors:[{path:a,message:ZM(i,"string")}]}:!t.has(i)&&!n?{ok:!1,errors:[{path:a,message:ZM(i,"enum")}]}:{ok:!0,value:i})()}function Vgd(e){let t=lxs(e);return{...t,...kM(t)}}function lxs(e){return{parse:(t,r)=>sBn(e).parse(t,r),json:(t,r)=>sBn(e).json(t,r),getType:()=>sBn(e).getType()}}function sBn(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}function _ja(e){return Object.entries(e)}function hja(e,t){let r=new Set(t);return Object.entries(e).reduce((i,[n,a])=>(r.has(n)&&(i[n]=a),i),{})}function Aji(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 yja(e){return Object.keys(e)}function Wgd(e,t){let r=[],i=[];for(let n of e)t(n)?r.push(n):i.push(n);return[r,i]}function eVt(e){return{withParsedProperties:t=>fxs(e,t)}}function fxs(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(!Aji(i))return{ok:!1,errors:[{path:n?.breadcrumbsPrefix??[],message:ZM(i,"object")}]};let a=new Set(Object.keys(t)),u=hja(i,Object.keys(i).filter(l=>!a.has(l)));return e.json(u,n)},getType:()=>e.getType()};return{...r,...kM(r),...eVt(r)}}function Hgd(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function qji(e){return e.isProperty}function a0o(e){let t={_getRawProperties:()=>Object.entries(e).map(([r,i])=>qji(i)?i.rawKey:r),_getParsedProperties:()=>yja(e),parse:(r,i)=>{let n={},a=[];for(let[u,l]of _ja(e)){let d=qji(l)?l.rawKey:u,s=qji(l)?l.valueSchema:l,o={rawKey:d,parsedKey:u,valueSchema:s};n[d]=o,Qgd(s)&&a.push(d)}return $gd({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 _ja(e)){let l=qji(u)?u.valueSchema:u;Qgd(l)&&n.push(a)}return $gd({value:r,requiredKeys:n,getProperty:a=>{let u=e[a];if(u!=null)return qji(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:()=>rm.OBJECT};return{...o9(t),...kM(t),...eVt(t),...LUi(t)}}function $gd({value:e,requiredKeys:t,getProperty:r,unrecognizedObjectKeys:i="fail",skipValidation:n=!1,breadcrumbsPrefix:a=[]}){if(!Aji(e))return{ok:!1,errors:[{path:a,message:ZM(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 LUi(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(i,n)=>Ggd({extensionKeys:t._getRawProperties(),value:i,transformBase:a=>e.parse(a,n),transformExtension:a=>t.parse(a,n)}),json:(i,n)=>Ggd({extensionKeys:t._getParsedProperties(),value:i,transformBase:a=>e.json(a,n),transformExtension:a=>t.json(a,n)}),getType:()=>rm.OBJECT};return{...r,...kM(r),...eVt(r),...LUi(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:()=>rm.OBJECT};return{...t,...kM(t),...eVt(t),...LUi(t)}}}}function Ggd({extensionKeys:e,value:t,transformBase:r,transformExtension:i}){let n=new Set(e),[a,u]=Wgd(yja(t),s=>n.has(s)),l=r(hja(t,u)),d=i(hja(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 Qgd(e){return!wH1(e)}function wH1(e){switch(e.getType()){case rm.ANY:case rm.UNKNOWN:case rm.OPTIONAL:case rm.OPTIONAL_NULLABLE:return!0;default:return!1}}function Jgd(e){return a0o(e)}function Kgd(e){let t={...lxs(e),_getRawProperties:()=>sBn(e)._getRawProperties(),_getParsedProperties:()=>sBn(e)._getParsedProperties()};return{...t,...kM(t),...eVt(t),...LUi(t)}}function o0o(e){let t={parse:(r,i)=>Ygd(r,(n,a)=>e.parse(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),json:(r,i)=>Ygd(r,(n,a)=>e.json(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),getType:()=>rm.LIST};return{...o9(t),...kM(t)}}function Ygd(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:ZM(e,"list"),path:[]}]}}function Xgd(e){return kG(rm.STRING_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:ZM(r,`"${e}"`)}]})()}function Zgd(e){return kG(rm.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:ZM(r,`${e.toString()}`)}]})()}var kgd=kG(rm.ANY,e=>({ok:!0,value:e}));var eOd=kG(rm.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:ZM(e,"boolean")}]});var tOd=kG(rm.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:ZM(e,"number")}]});var rOd=kG(rm.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:ZM(e,"string")}]});var iOd=kG(rm.UNKNOWN,e=>({ok:!0,value:e}));function aOd(e,t){let r={parse:(i,n)=>nOd({value:i,isKeyNumeric:e.getType()===rm.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)=>nOd({value:i,isKeyNumeric:e.getType()===rm.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:()=>rm.RECORD};return{...o9(r),...kM(r)}}function nOd({value:e,isKeyNumeric:t,transformKey:r,transformValue:i,breadcrumbsPrefix:n=[]}){return Aji(e)?_ja(e).reduce((a,[u,l])=>{if(l===void 0)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:ZM(e,"object")}]}}function oOd(e){let t=o0o(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:ZM(i,"Set")}]},getType:()=>rm.SET};return{...o9(r),...kM(r)}}function sOd(e){let t={parse:(r,i)=>uOd((n,a)=>n.parse(r,a),e,i),json:(r,i)=>uOd((n,a)=>n.json(r,a),e,i),getType:()=>rm.UNDISCRIMINATED_UNION};return{...o9(t),...kM(t)}}function uOd(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 cOd(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}function fOd(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,i=typeof e=="string"?e:e.parsedDiscriminant,n=n0o(yja(t)),a={parse:(u,l)=>lOd({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)=>lOd({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:()=>rm.UNION};return{...o9(a),...kM(a),...eVt(a)}}function lOd({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:i,getAdditionalPropertiesSchema:n,allowUnrecognizedUnionMembers:a=!1,transformAdditionalProperties:u,breadcrumbsPrefix:l=[]}){if(!Aji(e))return{ok:!1,errors:[{path:l,message:ZM(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 u0o=_n.object({"client-id":_n.string().optional(),"client-secret":_n.string().optional(),scopes:_n.string().optional()});var s0o=_n.object({"access-token":_n.string().optional(),"expires-in":_n.string().optional(),"refresh-token":_n.string().optional()});var c0o=_n.object({endpoint:_n.string(),"request-properties":u0o.optional(),"response-properties":s0o.optional()});var l0o=_n.object({"refresh-token":_n.string()});var f0o=_n.object({"access-token":_n.string().optional(),"expires-in":_n.string().optional(),"refresh-token":_n.string().optional()});var d0o=_n.object({endpoint:_n.string(),"request-properties":l0o.optional(),"response-properties":f0o.optional()});var _6=_n.object({docs:_n.string().optional()});var p0o=_n.object({scheme:_n.stringLiteral("oauth"),type:_n.stringLiteral("client-credentials"),scopes:_n.list(_n.string()).optional(),"client-id-env":_n.string().optional(),"client-secret-env":_n.string().optional(),"token-prefix":_n.string().optional(),"token-header":_n.string().optional(),"get-token":c0o,"refresh-token":d0o.optional()}).extend(_6);var cBn=_n.object({env:_n.string().optional()});var Tji=_n.object({name:_n.string().optional()});var _0o=_n.object({header:_n.string(),type:_n.string().optional(),prefix:_n.string().optional()}).extend(cBn).extend(Tji).extend(_6);var UUi=_n.object({}).extend(cBn).extend(Tji);var h0o=_n.object({scheme:_n.stringLiteral("basic"),username:UUi.optional(),password:UUi.optional()}).extend(_6);var y0o=_n.object({scheme:_n.stringLiteral("bearer"),token:UUi.optional()}).extend(_6);var v0o=_n.undiscriminatedUnion([p0o,_0o,h0o,y0o]);var Cji=_n.string();var b0o=_n.enum_(["v1"]);var lBn=_n.enum_(["v1","v2"]);var Bji=_n.object({"use-title":_n.boolean().optional(),unions:b0o.optional(),"message-naming":lBn.optional(),"respect-nullable-schemas":_n.boolean().optional(),"only-include-referenced-schemas":_n.boolean().optional(),"inline-path-parameters":_n.boolean().optional(),"idiomatic-request-names":_n.boolean().optional()});var fBn=_n.object({path:Cji,origin:_n.string().optional(),overrides:_n.string().optional(),audiences:_n.list(_n.string()).optional(),settings:Bji.optional()});var dBn=_n.object({target:_n.string().optional(),root:_n.string(),overrides:_n.string().optional(),"local-generation":_n.boolean().optional()});var pBn=_n.object({proto:dBn});var g0o=_n.undiscriminatedUnion([Cji,fBn,pBn]);var O0o=_n.list(g0o);var _Bn=_n.undiscriminatedUnion([Cji,fBn,O0o,pBn]);var m0o=_n.object({namespaces:_n.record(_n.string(),_Bn)});var hBn=_n.object({scheme:_n.string()}).extend(_6);var P0o=_n.undiscriminatedUnion([_n.string(),hBn]);var j0o=_n.object({any:_n.list(P0o)}).extend(_6);var yBn=_n.undiscriminatedUnion([_n.string(),hBn,j0o]);var w0o=_n.enum_(["form","json"]);var S0o=_n.object({endpoints:_n.list(_n.string()).optional()});var vja=_n.object({"max-depth":_n.number().optional()});var D0o=_n.object({request:vja.optional(),response:vja.optional()});var vBn=_n.object({"respect-nullable-schemas":_n.boolean().optional(),"title-as-schema-name":_n.boolean().optional(),"optional-additional-properties":_n.boolean().optional(),"coerce-enums-to-literals":_n.boolean().optional(),"idiomatic-request-names":_n.boolean().optional()});var bBn=_n.object({"only-include-referenced-schemas":_n.boolean().optional(),"inline-path-parameters":_n.boolean().optional(),"prefer-undiscriminated-unions-with-literals":_n.boolean().optional(),"object-query-parameters":_n.boolean().optional(),"respect-readonly-schemas":_n.boolean().optional(),"respect-forward-compatible-enums":_n.boolean().optional(),"use-bytes-for-binary-response":_n.boolean().optional(),"default-form-parameter-encoding":w0o.optional(),filter:S0o.optional(),"example-generation":D0o.optional(),"additional-properties-defaults-to":_n.boolean().optional(),"type-dates-as-strings":_n.boolean().optional(),"preserve-single-schema-oneof":_n.boolean().optional()}).extend(vBn);var E0o=_n.object({openapi:_n.string(),origin:_n.string().optional(),overrides:_n.string().optional(),namespace:_n.string().optional(),settings:bBn.optional()});var M0o=_n.object({"message-naming":lBn.optional()}).extend(vBn);var A0o=_n.object({asyncapi:_n.string(),origin:_n.string().optional(),overrides:_n.string().optional(),namespace:_n.string().optional(),settings:M0o.optional()});var q0o=_n.object({proto:dBn});var T0o=_n.object({openrpc:_n.string(),overrides:_n.string().optional(),namespace:_n.string().optional()});var C0o=_n.undiscriminatedUnion([E0o,A0o,q0o,T0o]);var B0o=_n.object({conjure:_n.string()});var I0o=_n.undiscriminatedUnion([_n.list(C0o),B0o]);var z0o=_n.object({type:_n.string()});var x0o=_n.object({proto:z0o.optional()});var R0o=_n.object({minLength:_n.number().optional(),maxLength:_n.number().optional(),pattern:_n.string().optional(),format:_n.string().optional()});var N0o=_n.object({min:_n.number().optional(),max:_n.number().optional(),exclusiveMin:_n.boolean().optional(),exclusiveMax:_n.boolean().optional(),multipleOf:_n.number().optional()});var F0o=_n.undiscriminatedUnion([R0o,N0o]);var gBn=_n.enum_(["in-development","pre-release","deprecated","generally-available"]);var L0o=_n.object({status:gBn,message:_n.string().optional()});var U0o=_n.undiscriminatedUnion([gBn,L0o]);var V0o=_n.object({availability:U0o.optional()});var W0o=_n.object({default:_n.unknown().optional(),encoding:x0o.optional(),validation:F0o.optional()}).extend(_6).extend(V0o);var Iji=_n.object({audiences:_n.list(_n.string()).optional()});var H0o=_n.object({type:_n.string()}).extend(W0o).extend(Tji).extend(Iji);var $0o=_n.object({env:_n.string().optional()}).extend(H0o);var G0o=_n.undiscriminatedUnion([_n.string(),$0o]);var Q0o=G0o;var J0o=_n.object({headers:_n.record(_n.string(),Q0o).optional()});var K0o=_n.object({url:_n.string()}).extend(Iji).extend(_6);var Y0o=_n.object({urls:_n.record(_n.string(),_n.string())}).extend(Iji).extend(_6);var X0o=_n.undiscriminatedUnion([_n.string(),K0o,Y0o]);var Z0o=_n.object({"default-url":_n.string().optional(),"default-environment":_n.string().optional(),environments:_n.record(_n.string(),X0o).optional()});var k0o=_n.object({auth:yBn.optional(),specs:I0o}).extend(J0o).extend(Z0o);var ego=_n.undiscriminatedUnion([_Bn,m0o,k0o]);var tgo=_n.object({username:_n.string(),email:_n.string(),token:_n.string()});var rgo=_n.object({github:tgo.optional()});var igo=_n.object({name:_n.string(),email:_n.string()});var zji=_n.object({description:_n.string().optional(),authors:_n.list(igo).optional()});var ngo=_n.object({method:_n.string(),path:_n.string(),stream:_n.boolean().optional()});var bja=_n.undiscriminatedUnion([_n.string(),ngo]);var ago=_n.object({bannerLink:_n.string().optional(),introduction:_n.string().optional(),apiReferenceLink:_n.string().optional(),defaultEndpoint:bja.optional(),features:_n.record(_n.string(),_n.list(bja)).optional()});var ogo=_n.object({url:_n.string().optional(),"package-name":_n.string(),token:_n.string().optional()});var ugo=_n.object({keyId:_n.string(),password:_n.string(),secretKey:_n.string()});var sgo=_n.object({url:_n.string().optional(),coordinate:_n.string(),username:_n.string().optional(),password:_n.string().optional(),signature:ugo.optional()});var cgo=_n.object({keywords:_n.list(_n.string()).optional(),"documentation-link":_n.string().optional(),"homepage-link":_n.string().optional()}).extend(zji);var lgo=_n.object({url:_n.string().optional(),"package-name":_n.string(),token:_n.string().optional(),username:_n.string().optional(),password:_n.string().optional(),metadata:cgo.optional()});var fgo=_n.object({"api-key":_n.string(),"workspace-id":_n.string(),"collection-id":_n.string().optional()});var dgo=_n.object({path:_n.string()});var pgo=_n.object({url:_n.string().optional(),"package-name":_n.string(),"api-key":_n.string().optional()});var _go=_n.object({url:_n.string().optional(),"package-name":_n.string(),"api-key":_n.string().optional()});var hgo=_n.union("location",{npm:ogo,maven:sgo,pypi:lgo,postman:fgo,"local-file-system":dgo,nuget:pgo,rubygems:_go}).transform({transform:e=>e,untransform:e=>e});var ygo=_n.object({uri:_n.string(),token:_n.string()});var vgo=_n.enum_(["MIT","Apache-2.0"]);var bgo=_n.object({custom:_n.string()});var oXt=_n.undiscriminatedUnion([vgo,bgo]);var ggo=_n.enum_(["commit","release"]);var Ogo=_n.object({repository:_n.string(),license:oXt.optional(),mode:ggo.optional()});var gja=_n.object({name:_n.string()});var xji=_n.object({teams:_n.list(gja).optional(),users:_n.list(gja).optional()});var mgo=_n.object({repository:_n.string(),branch:_n.string().optional(),license:oXt.optional(),mode:_n.stringLiteral("pull-request"),reviewers:xji.optional()});var Pgo=_n.object({repository:_n.string(),license:oXt.optional(),mode:_n.stringLiteral("push"),branch:_n.string().optional()});var jgo=_n.undiscriminatedUnion([ygo,Ogo,mgo,Pgo]);var Oja=_n.object({"package-description":_n.string().optional(),email:_n.string().optional(),"reference-url":_n.string().optional(),author:_n.string().optional(),license:oXt.optional()});var wgo=_n.object({path:_n.string()});var Sgo=_n.object({auth:yBn.optional(),settings:Bji.optional()});var Dgo=_n.object({name:_n.string(),version:_n.string(),output:hgo.optional(),github:jgo.optional(),config:_n.unknown(),metadata:Oja.optional(),keywords:_n.list(_n.string()).optional(),snippets:wgo.optional(),"ir-version":_n.string().optional(),"smart-casing":_n.boolean().optional(),api:Sgo.optional(),"disable-examples":_n.boolean().optional(),"publish-metadata":Oja.optional()});var Ego=_n.object({audiences:_n.list(_n.string()).optional(),generators:_n.list(Dgo),metadata:zji.optional(),reviewers:xji.optional()});var Mgo=_n.object({path:_n.string(),origin:_n.string().optional(),overrides:_n.string().optional(),"disable-examples":_n.boolean().optional(),settings:bBn});var Ago=_n.undiscriminatedUnion([Mgo,_n.string()]);var dOd=_n.object({"auth-schemes":_n.record(_n.string(),v0o).optional(),api:ego.optional(),whitelabel:rgo.optional(),metadata:zji.optional(),readme:ago.optional(),"default-group":_n.string().optional(),groups:_n.record(_n.string(),Ego).optional(),reviewers:xji.optional(),openapi:Ago.optional(),"openapi-overrides":_n.string().optional(),"spec-origin":_n.string().optional(),"async-api":_n.string().optional(),"api-settings":Bji.optional()});var pxs={};Dn(pxs,{GeneratorApiSettingsSchema:()=>Sgo,GeneratorGroupSchema:()=>Ego,GeneratorInvocationSchema:()=>Dgo,GeneratorOutputSchema:()=>hgo,GeneratorPublishMetadataSchema:()=>Oja,GeneratorSnippetsSchema:()=>wgo,GithubCommitAndReleaseMode:()=>ggo,GithubCommitAndReleaseSchema:()=>Ogo,GithubConfigurationSchema:()=>jgo,GithubPullRequestSchema:()=>mgo,GithubPushSchema:()=>Pgo,GithubSelfhostedSchema:()=>ygo,LocalFileSystemOutputLocationSchema:()=>dgo,MavenOutputLocationSchema:()=>sgo,MavenOutputSignatureSchema:()=>ugo,NpmOutputLocationSchema:()=>ogo,NugetOutputLocationSchema:()=>pgo,PostmanOutputLocationSchema:()=>fgo,PypiOutputLocationSchema:()=>lgo,PypiOutputMetadataSchema:()=>cgo,RubyGemsOutputLocationSchema:()=>_go});var _xs={};Dn(_xs,{GithubLicenseCustomSchema:()=>bgo,GithubLicenseSchema:()=>oXt,GithubLicenseType:()=>vgo});var hxs={};Dn(hxs,{ReviewerSchema:()=>gja,ReviewersSchema:()=>xji});var Sxs={};Dn(Sxs,{AnyAuthItem:()=>P0o,AnyAuthSchemesSchema:()=>j0o,ApiAuthSchema:()=>yBn,AuthSchemeDeclarationSchema:()=>v0o,AuthSchemeReferenceSchema:()=>hBn,AuthVariable:()=>UUi,AvailabilitySchema:()=>L0o,AvailabilityStatusSchema:()=>gBn,AvailabilityUnionSchema:()=>U0o,BaseTypeReferenceSchema:()=>W0o,BasicAuthSchemeSchema:()=>h0o,BearerAuthSchemeSchema:()=>y0o,EncodingSchema:()=>x0o,EnvironmentSchema:()=>X0o,HeaderAuthSchemeSchema:()=>_0o,HttpHeaderSchema:()=>Q0o,MultipleBaseUrlsEnvironmentSchema:()=>Y0o,NumberValidationSchema:()=>N0o,OAuthAccessTokenRequestPropertiesSchema:()=>u0o,OAuthAccessTokenResponsePropertiesSchema:()=>s0o,OAuthGetTokenEndpointSchema:()=>c0o,OAuthRefreshTokenEndpointSchema:()=>d0o,OAuthRefreshTokenRequestPropertiesSchema:()=>l0o,OAuthRefreshTokenResponsePropertiesSchema:()=>f0o,OAuthSchemeSchema:()=>p0o,ProtobufTypeSchema:()=>z0o,SingleBaseUrlEnvironmentSchema:()=>K0o,StringValidationSchema:()=>R0o,TypeReferenceDeclarationWithEnvOverride:()=>G0o,TypeReferenceDeclarationWithEnvOverrideSchema:()=>$0o,TypeReferenceDeclarationWithName:()=>H0o,ValidationSchema:()=>F0o,WithAudiences:()=>Iji,WithAvailability:()=>V0o,WithDocsSchema:()=>_6,WithEnvironmentVariable:()=>cBn,WithEnvironmentsSchema:()=>Z0o,WithHeadersSchema:()=>J0o,WithName:()=>Tji,auth:()=>yxs,availability:()=>vxs,commons:()=>bxs,encoding:()=>gxs,environments:()=>Oxs,file:()=>mxs,service:()=>Pxs,types:()=>jxs,validation:()=>wxs});var yxs={};Dn(yxs,{AnyAuthItem:()=>P0o,AnyAuthSchemesSchema:()=>j0o,ApiAuthSchema:()=>yBn,AuthSchemeDeclarationSchema:()=>v0o,AuthSchemeReferenceSchema:()=>hBn,AuthVariable:()=>UUi,BasicAuthSchemeSchema:()=>h0o,BearerAuthSchemeSchema:()=>y0o,HeaderAuthSchemeSchema:()=>_0o,OAuthAccessTokenRequestPropertiesSchema:()=>u0o,OAuthAccessTokenResponsePropertiesSchema:()=>s0o,OAuthGetTokenEndpointSchema:()=>c0o,OAuthRefreshTokenEndpointSchema:()=>d0o,OAuthRefreshTokenRequestPropertiesSchema:()=>l0o,OAuthRefreshTokenResponsePropertiesSchema:()=>f0o,OAuthSchemeSchema:()=>p0o,WithEnvironmentVariable:()=>cBn});var vxs={};Dn(vxs,{AvailabilitySchema:()=>L0o,AvailabilityStatusSchema:()=>gBn,AvailabilityUnionSchema:()=>U0o});var bxs={};Dn(bxs,{WithAudiences:()=>Iji,WithAvailability:()=>V0o,WithDocsSchema:()=>_6,WithName:()=>Tji});var gxs={};Dn(gxs,{EncodingSchema:()=>x0o,ProtobufTypeSchema:()=>z0o});var Oxs={};Dn(Oxs,{EnvironmentSchema:()=>X0o,MultipleBaseUrlsEnvironmentSchema:()=>Y0o,SingleBaseUrlEnvironmentSchema:()=>K0o,WithEnvironmentsSchema:()=>Z0o});var mxs={};Dn(mxs,{WithHeadersSchema:()=>J0o});var Pxs={};Dn(Pxs,{HttpHeaderSchema:()=>Q0o,TypeReferenceDeclarationWithEnvOverride:()=>G0o,TypeReferenceDeclarationWithEnvOverrideSchema:()=>$0o});var jxs={};Dn(jxs,{BaseTypeReferenceSchema:()=>W0o,TypeReferenceDeclarationWithName:()=>H0o});var wxs={};Dn(wxs,{NumberValidationSchema:()=>N0o,StringValidationSchema:()=>R0o,ValidationSchema:()=>F0o});var pOd="spec-origin",_Od="async-api",hOd="default-group",yOd="openapi",SH1="openapi-overrides",DH1="api-settings";var vOd={TYPESCRIPT:"typescript",JAVA:"java",PYTHON:"python",GO:"go",RUBY:"ruby",CSHARP:"csharp",SWIFT:"swift",PHP:"php"};function bOd({generatorInvocation:e}){return e.language==="go"?EH1(e):e.outputMode._visit({downloadFiles:()=>{},github:t=>t.publishInfo?._visit({maven:r=>r.coordinate,npm:r=>r.packageName,pypi:r=>r.packageName,postman:()=>{},rubygems:r=>r.packageName,nuget:r=>r.packageName,_other:()=>{}}),githubV2:t=>t.publishInfo?._visit({maven:r=>r.coordinate,npm:r=>r.packageName,pypi:r=>r.packageName,postman:()=>{},rubygems:r=>r.packageName,nuget:r=>r.packageName,_other:()=>{}}),publish:()=>{},publishV2:()=>{},_other:()=>{}})}function EH1(e){return e.outputMode._visit({downloadFiles:()=>{},github:t=>`github.com/${t.owner}/${t.repo}`,githubV2:t=>`github.com/${t.owner}/${t.repo}`,publish:()=>{},publishV2:()=>{},_other:()=>{}})}function gOd(e){return typeof e!="string"&&"proto"in e}var mOd=ai(require("path"),1);function uEe(e){return e.replace(/\\/g,"/")}function qgo(e){return e.startsWith("/")}var OBn={of:e=>{if(!qgo(e))throw new Error("Filepath is not absolute: "+e);return uEe(e)}};var gy={of:e=>{if(qgo(e))throw new Error("Filepath is not relative: "+e);return uEe(e)}};function VUi(e,t){let r=e.split("/").pop()??e;return t?.stripExtension?r.split(".")[0]??r:r}function yxe(e){let r=e.replace(/\/+$/,"").lastIndexOf("/");return r===-1?".":r===0?"/":e.slice(0,r)}function EN(...e){let t=[];for(let r of e.flatMap(i=>i.split("/")).filter(Boolean))r==="."||r===""||(r===".."&&t.length>0&&t[t.length-1]!==".."?t.pop():t.push(r));return(e[0]?.startsWith("/")?"/":"")+t.join("/")}var tVt="/";function Tgo(e,t){let r=e.split(tVt).filter(Boolean),i=t.split(tVt).filter(Boolean),n=0;for(;n<r.length&&n<i.length&&r[n]===i[n];)n++;let a=r.length-n;return[...Array(a).fill(".."),...i.slice(n)].join(tVt)||"."}function Exs(e){return OOd(e)}function Cgo(e){return OOd(e)}function OOd(e){let t=e;return/^[a-zA-Z]:\\/.test(e)&&(t=e.substring(2)),t.replace(/\\/g,"/")}var hl={of:e=>{if(!mOd.default.isAbsolute(e))throw new Error("Filepath is not absolute: "+e);return uEe(e)}};function kz(){return process.cwd()}var POd=ai(require("path"),1);function Td(e){return POd.default.dirname(e)}var jOd=require("fs"),wOd=require("fs/promises");async function mf(e,t){try{let r=await(0,wOd.lstat)(e);return!(t==="file"&&!r.isFile()||t==="directory"&&!r.isDirectory())}catch{return!1}}function Vci(e,t){try{let r=(0,jOd.lstatSync)(e);return!(t==="file"&&!r.isFile()||t==="directory"&&!r.isDirectory())}catch{return!1}}var Bgo=require("fs/promises"),Mxs=ai(require("path"),1);var SOd=ai(require("path"),1);var Ua={of:e=>{if(SOd.default.isAbsolute(e))throw new Error("Filepath is not relative: "+e);return uEe(e)}};var DOd=ai(require("path"),1);function Lu(...e){return DOd.default.join(...e)}async function uXt(e,t={}){let r=t.fileExtensions!=null?new Set(t.fileExtensions.map(a=>a.startsWith(".")?a:`.${a}`)):void 0,i=[],n=await(0,Bgo.readdir)(e,{withFileTypes:!0});return await Promise.all(n.map(async a=>{let u=Lu(e,Ua.of(a.name));a.isDirectory()?i.push({type:"directory",name:a.name,absolutePath:u,contents:await uXt(u,t)}):(r==null||r.has(Mxs.default.extname(a.name)))&&i.push({type:"file",name:a.name,absolutePath:u,contents:(await(0,Bgo.readFile)(Mxs.default.join(e,a.name))).toString()})})),i.sort((a,u)=>a.name<u.name?-1:1)}var Axs=(e,t,r)=>{let i=e instanceof RegExp?EOd(e,r):e,n=t instanceof RegExp?EOd(t,r):t,a=i!==null&&n!=null&&MH1(i,n,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+i.length,a[1]),post:r.slice(a[1]+n.length)}},EOd=(e,t)=>{let r=t.match(e);return r?r[0]:null},MH1=(e,t,r)=>{let i,n,a,u,l,d=r.indexOf(e),s=r.indexOf(t,d+1),o=d;if(d>=0&&s>0){if(e===t)return[d,s];for(i=[],a=r.length;o>=0&&!l;){if(o===d)i.push(o),d=r.indexOf(e,o+1);else if(i.length===1){let c=i.pop();c!==void 0&&(l=[c,s])}else n=i.pop(),n!==void 0&&n<a&&(a=n,u=s),s=r.indexOf(t,o+1);o=d<s&&d>=0?d:s}i.length&&u!==void 0&&(l=[a,u])}return l};var MOd="\0SLASH"+Math.random()+"\0",AOd="\0OPEN"+Math.random()+"\0",Txs="\0CLOSE"+Math.random()+"\0",qOd="\0COMMA"+Math.random()+"\0",TOd="\0PERIOD"+Math.random()+"\0",AH1=new RegExp(MOd,"g"),qH1=new RegExp(AOd,"g"),TH1=new RegExp(Txs,"g"),CH1=new RegExp(qOd,"g"),BH1=new RegExp(TOd,"g"),IH1=/\\\\/g,zH1=/\\{/g,xH1=/\\}/g,RH1=/\\,/g,NH1=/\\./g;function qxs(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function FH1(e){return e.replace(IH1,MOd).replace(zH1,AOd).replace(xH1,Txs).replace(RH1,qOd).replace(NH1,TOd)}function LH1(e){return e.replace(AH1,"\\").replace(qH1,"{").replace(TH1,"}").replace(CH1,",").replace(BH1,".")}function COd(e){if(!e)return[""];let t=[],r=Axs("{","}",e);if(!r)return e.split(",");let{pre:i,body:n,post:a}=r,u=i.split(",");u[u.length-1]+="{"+n+"}";let l=COd(a);return a.length&&(u[u.length-1]+=l.shift(),u.push.apply(u,l)),t.push.apply(t,u),t}function BOd(e){return e?(e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),mja(FH1(e),!0).map(LH1)):[]}function UH1(e){return"{"+e+"}"}function VH1(e){return/^-?0\d/.test(e)}function WH1(e,t){return e<=t}function HH1(e,t){return e>=t}function mja(e,t){let r=[],i=Axs("{","}",e);if(!i)return[e];let n=i.pre,a=i.post.length?mja(i.post,!1):[""];if(/\$$/.test(i.pre))for(let u=0;u<a.length;u++){let l=n+"{"+i.body+"}"+a[u];r.push(l)}else{let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),d=u||l,s=i.body.indexOf(",")>=0;if(!d&&!s)return i.post.match(/,(?!,).*\}/)?(e=i.pre+"{"+i.body+Txs+i.post,mja(e)):[e];let o;if(d)o=i.body.split(/\.\./);else if(o=COd(i.body),o.length===1&&o[0]!==void 0&&(o=mja(o[0],!1).map(UH1),o.length===1))return a.map(b=>i.pre+o[0]+b);let c;if(d&&o[0]!==void 0&&o[1]!==void 0){let b=qxs(o[0]),g=qxs(o[1]),O=Math.max(o[0].length,o[1].length),m=o.length===3&&o[2]!==void 0?Math.abs(qxs(o[2])):1,w=WH1;g<b&&(m*=-1,w=HH1);let q=o.some(VH1);c=[];for(let A=b;w(A,g);A+=m){let D;if(l)D=String.fromCharCode(A),D==="\\"&&(D="");else if(D=String(A),q){let C=O-D.length;if(C>0){let x=new Array(C+1).join("0");A<0?D="-"+x+D.slice(1):D=x+D}}c.push(D)}}else{c=[];for(let b=0;b<o.length;b++)c.push.apply(c,mja(o[b],!1))}for(let b=0;b<c.length;b++)for(let g=0;g<a.length;g++){let O=n+c[b]+a[g];(!t||d||O)&&r.push(O)}}return r}var Pja=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};var $H1={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},jja=e=>e.replace(/[[\]\\-]/g,"\\$&"),GH1=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),IOd=e=>e.join(""),zOd=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],a=r+1,u=!1,l=!1,d=!1,s=!1,o=r,c="";e:for(;a<e.length;){let m=e.charAt(a);if((m==="!"||m==="^")&&a===r+1){s=!0,a++;continue}if(m==="]"&&u&&!d){o=a+1;break}if(u=!0,m==="\\"&&!d){d=!0,a++;continue}if(m==="["&&!d){for(let[w,[E,q,A]]of Object.entries($H1))if(e.startsWith(w,a)){if(c)return["$.",!1,e.length-r,!0];a+=w.length,A?n.push(E):i.push(E),l=l||q;continue e}}if(d=!1,c){m>c?i.push(jja(c)+"-"+jja(m)):m===c&&i.push(jja(m)),c="",a++;continue}if(e.startsWith("-]",a+1)){i.push(jja(m+"-")),a+=2;continue}if(e.startsWith("-",a+1)){c=m,a+=2;continue}i.push(jja(m)),a++}if(o<a)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!s){let m=i[0].length===2?i[0].slice(-1):i[0];return[GH1(m),!1,o-r,!1]}let b="["+(s?"^":"")+IOd(i)+"]",g="["+(s?"":"^")+IOd(n)+"]";return[i.length&&n.length?"("+b+"|"+g+")":i.length?b:g,l,o-r,!0]};var rVt=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var QH1=new Set(["!","?","+","*","@"]),xOd=e=>QH1.has(e),JH1="(?!(?:^|/)\\.\\.?(?:$|/))",Igo="(?!\\.)",KH1=new Set(["[","."]),YH1=new Set(["..","."]),XH1=new Set("().*{}+?[]^$\\!"),ZH1=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Cxs="[^/]",ROd=Cxs+"*?",NOd=Cxs+"+?",mBn=class e{type;#e;#t;#r=!1;#n=[];#i;#a;#o;#s=!1;#f;#u;#c=!1;constructor(t,r,i={}){this.type=t,t&&(this.#t=!0),this.#i=r,this.#e=this.#i?this.#i.#e:this,this.#f=this.#e===this?i:this.#e.#f,this.#o=this.#e===this?[]:this.#e.#o,t==="!"&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#n.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let t of this.#n)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#n.map(t=>String(t)).join("|")+")":this.#u=this.#n.map(t=>String(t)).join("")}#l(){if(this!==this.#e)throw new Error("should only call on root");if(this.#s)return this;this.toString(),this.#s=!0;let t;for(;t=this.#o.pop();){if(t.type!=="!")continue;let r=t,i=r.#i;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#n.length;n++)for(let a of t.#n){if(typeof a=="string")throw new Error("string part in extglob AST??");a.copyIn(i.#n[n])}r=i,i=r.#i}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof e&&r.#i===this))throw new Error("invalid part: "+r);this.#n.push(r)}}toJSON(){let t=this.type===null?this.#n.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#n.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let t=this.#i;for(let r=0;r<this.#a;r++){let i=t.#n[r];if(!(i instanceof e&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let t=this.#i?this.#i.#n.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new e(this.type,t);for(let i of this.#n)r.copyIn(i);return r}static#p(t,r,i,n){let a=!1,u=!1,l=-1,d=!1;if(r.type===null){let g=i,O="";for(;g<t.length;){let m=t.charAt(g++);if(a||m==="\\"){a=!a,O+=m;continue}if(u){g===l+1?(m==="^"||m==="!")&&(d=!0):m==="]"&&!(g===l+2&&d)&&(u=!1),O+=m;continue}else if(m==="["){u=!0,l=g,d=!1,O+=m;continue}if(!n.noext&&xOd(m)&&t.charAt(g)==="("){r.push(O),O="";let w=new e(m,r);g=e.#p(t,w,g,n),r.push(w);continue}O+=m}return r.push(O),g}let s=i+1,o=new e(null,r),c=[],b="";for(;s<t.length;){let g=t.charAt(s++);if(a||g==="\\"){a=!a,b+=g;continue}if(u){s===l+1?(g==="^"||g==="!")&&(d=!0):g==="]"&&!(s===l+2&&d)&&(u=!1),b+=g;continue}else if(g==="["){u=!0,l=s,d=!1,b+=g;continue}if(xOd(g)&&t.charAt(s)==="("){o.push(b),b="";let O=new e(g,o);o.push(O),s=e.#p(t,O,s,n);continue}if(g==="|"){o.push(b),b="",c.push(o),o=new e(null,r);continue}if(g===")")return b===""&&r.#n.length===0&&(r.#c=!0),o.push(b),b="",r.push(...c,o),s;b+=g}return r.type=null,r.#t=void 0,r.#n=[t.substring(i-1)],s}static fromGlob(t,r={}){let i=new e(null,void 0,r);return e.#p(t,i,0,r),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[r,i,n,a]=this.toRegExpSource();if(!(n||this.#t||this.#f.nocase&&!this.#f.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let l=(this.#f.nocase?"i":"")+(a?"u":"");return Object.assign(new RegExp(`^${r}$`,l),{_src:r,_glob:t})}get options(){return this.#f}toRegExpSource(t){let r=t??!!this.#f.dot;if(this.#e===this&&this.#l(),!this.type){let d=this.isStart()&&this.isEnd(),s=this.#n.map(g=>{let[O,m,w,E]=typeof g=="string"?e.#_(g,this.#t,d):g.toRegExpSource(t);return this.#t=this.#t||w,this.#r=this.#r||E,O}).join(""),o="";if(this.isStart()&&typeof this.#n[0]=="string"&&!(this.#n.length===1&&YH1.has(this.#n[0]))){let O=KH1,m=r&&O.has(s.charAt(0))||s.startsWith("\\.")&&O.has(s.charAt(2))||s.startsWith("\\.\\.")&&O.has(s.charAt(4)),w=!r&&!t&&O.has(s.charAt(0));o=m?JH1:w?Igo:""}let c="";return this.isEnd()&&this.#e.#s&&this.#i?.type==="!"&&(c="(?:$|\\/)"),[o+s+c,rVt(s),this.#t=!!this.#t,this.#r]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",a=this.#h(r);if(this.isStart()&&this.isEnd()&&!a&&this.type!=="!"){let d=this.toString();return this.#n=[d],this.type=null,this.#t=void 0,[d,rVt(this.toString()),!1,!1]}let u=!i||t||r||!Igo?"":this.#h(!0);u===a&&(u=""),u&&(a=`(?:${a})(?:${u})*?`);let l="";if(this.type==="!"&&this.#c)l=(this.isStart()&&!r?Igo:"")+NOd;else{let d=this.type==="!"?"))"+(this.isStart()&&!r&&!t?Igo:"")+ROd+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&u?")":this.type==="*"&&u?")?":`)${this.type}`;l=n+a+d}return[l,rVt(a),this.#t=!!this.#t,this.#r]}#h(t){return this.#n.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,a,u]=r.toRegExpSource(t);return this.#r=this.#r||u,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#_(t,r,i=!1){let n=!1,a="",u=!1;for(let l=0;l<t.length;l++){let d=t.charAt(l);if(n){n=!1,a+=(XH1.has(d)?"\\":"")+d;continue}if(d==="\\"){l===t.length-1?a+="\\\\":n=!0;continue}if(d==="["){let[s,o,c,b]=zOd(t,l);if(c){a+=s,u=u||o,l+=c-1,r=r||b;continue}}if(d==="*"){i&&t==="*"?a+=NOd:a+=ROd,r=!0;continue}if(d==="?"){a+=Cxs,r=!0;continue}a+=ZH1(d)}return[a,rVt(t),!!r,u]}};var PBn=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");var QX=(e,t,r={})=>(Pja(t),!r.nocomment&&t.charAt(0)==="#"?!1:new sEe(t,r).match(e)),kH1=/^\*+([^+@!?\*\[\(]*)$/,e$1=e=>t=>!t.startsWith(".")&&t.endsWith(e),t$1=e=>t=>t.endsWith(e),r$1=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),i$1=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),n$1=/^\*+\.\*+$/,a$1=e=>!e.startsWith(".")&&e.includes("."),o$1=e=>e!=="."&&e!==".."&&e.includes("."),u$1=/^\.\*+$/,s$1=e=>e!=="."&&e!==".."&&e.startsWith("."),c$1=/^\*+$/,l$1=e=>e.length!==0&&!e.startsWith("."),f$1=e=>e.length!==0&&e!=="."&&e!=="..",d$1=/^\?+([^+@!?\*\[\(]*)?$/,p$1=([e,t=""])=>{let r=UOd([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},_$1=([e,t=""])=>{let r=VOd([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},h$1=([e,t=""])=>{let r=VOd([e]);return t?i=>r(i)&&i.endsWith(t):r},y$1=([e,t=""])=>{let r=UOd([e]);return t?i=>r(i)&&i.endsWith(t):r},UOd=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},VOd=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},WOd=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",FOd={win32:{sep:"\\"},posix:{sep:"/"}},v$1=WOd==="win32"?FOd.win32.sep:FOd.posix.sep;QX.sep=v$1;var GV=Symbol("globstar **");QX.GLOBSTAR=GV;var b$1="[^/]",g$1=b$1+"*?",O$1="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",m$1="(?:(?!(?:\\/|^)\\.).)*?",P$1=(e,t={})=>r=>QX(r,e,t);QX.filter=P$1;var vxe=(e,t={})=>Object.assign({},e,t),j$1=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return QX;let t=QX;return Object.assign((i,n,a={})=>t(i,n,vxe(e,a)),{Minimatch:class extends t.Minimatch{constructor(n,a={}){super(n,vxe(e,a))}static defaults(n){return t.defaults(vxe(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,a,u={}){super(n,a,vxe(e,u))}static fromGlob(n,a={}){return t.AST.fromGlob(n,vxe(e,a))}},unescape:(i,n={})=>t.unescape(i,vxe(e,n)),escape:(i,n={})=>t.escape(i,vxe(e,n)),filter:(i,n={})=>t.filter(i,vxe(e,n)),defaults:i=>t.defaults(vxe(e,i)),makeRe:(i,n={})=>t.makeRe(i,vxe(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,vxe(e,n)),match:(i,n,a={})=>t.match(i,n,vxe(e,a)),sep:t.sep,GLOBSTAR:GV})};QX.defaults=j$1;var HOd=(e,t={})=>(Pja(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:BOd(e));QX.braceExpand=HOd;var w$1=(e,t={})=>new sEe(e,t).makeRe();QX.makeRe=w$1;var S$1=(e,t,r={})=>{let i=new sEe(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};QX.match=S$1;var LOd=/[?*]|[+@!]\(.*?\)|\[|\]/,D$1=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),sEe=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,r={}){Pja(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||WOd,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...a)=>console.error(...a)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(a=>this.slashSplit(a));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((a,u,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let d=a[0]===""&&a[1]===""&&(a[2]==="?"||!LOd.test(a[2]))&&!LOd.test(a[3]),s=/^[a-z]:/i.test(a[0]);if(d)return[...a.slice(0,4),...a.slice(4).map(o=>this.parse(o))];if(s)return[a[0],...a.slice(1).map(o=>this.parse(o))]}return a.map(d=>this.parse(d))});if(this.debug(this.pattern,n),this.set=n.filter(a=>a.indexOf(!1)===-1),this.isWindows)for(let a=0;a<this.set.length;a++){let u=this.set[a];u[0]===""&&u[1]===""&&this.globParts[a][2]==="?"&&typeof u[3]=="string"&&/^[a-z]:$/i.test(u[3])&&(u[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let a=i[i.length-1];return n==="**"&&a==="**"?i:n===".."&&a&&a!==".."&&a!=="."&&a!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let a=t[n];n===1&&a===""&&t[0]===""||(a==="."||a==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let u=n;for(;i[u+1]==="**";)u++;u>n&&i.splice(n+1,u-n);let l=i[n+1],d=i[n+2],s=i[n+3];if(l!==".."||!d||d==="."||d===".."||!s||s==="."||s==="..")continue;r=!0,i.splice(n,1);let o=i.slice(0);o[n]="**",t.push(o),n--}if(!this.preserveMultipleSlashes){for(let u=1;u<i.length-1;u++){let l=i[u];u===1&&l===""&&i[0]===""||(l==="."||l==="")&&(r=!0,i.splice(u,1),u--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let a=0;for(;(a=i.indexOf("..",a+1))!==-1;){let u=i[a-1];if(u&&u!=="."&&u!==".."&&u!=="**"){r=!0;let d=a===1&&i[a+1]==="**"?["."]:[];i.splice(a-1,2,...d),i.length===0&&i.push(""),a-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,a=0,u=[],l="";for(;n<t.length&&a<r.length;)if(t[n]===r[a])u.push(l==="b"?r[a]:t[n]),n++,a++;else if(i&&t[n]==="**"&&r[a]===t[n+1])u.push(t[n]),n++;else if(i&&r[a]==="**"&&t[n]===r[a+1])u.push(r[a]),a++;else if(t[n]==="*"&&r[a]&&(this.options.dot||!r[a].startsWith("."))&&r[a]!=="**"){if(l==="b")return!1;l="a",u.push(t[n]),n++,a++}else if(r[a]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(l==="a")return!1;l="b",u.push(r[a]),n++,a++}else return!1;return t.length===r.length&&u}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=this.options;if(this.isWindows){let m=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),w=!m&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),E=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),q=!E&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),A=w?3:m?0:void 0,D=q?3:E?0:void 0;if(typeof A=="number"&&typeof D=="number"){let[C,x]=[t[A],r[D]];C.toLowerCase()===x.toLowerCase()&&(r[D]=C,D>A?r=r.slice(D):A>D&&(t=t.slice(A)))}}let{optimizationLevel:a=1}=this.options;a>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var u=0,l=0,d=t.length,s=r.length;u<d&&l<s;u++,l++){this.debug("matchOne loop");var o=r[l],c=t[u];if(this.debug(r,o,c),o===!1)return!1;if(o===GV){this.debug("GLOBSTAR",[r,o,c]);var b=u,g=l+1;if(g===s){for(this.debug("** at the end");u<d;u++)if(t[u]==="."||t[u]===".."||!n.dot&&t[u].charAt(0)===".")return!1;return!0}for(;b<d;){var O=t[b];if(this.debug(`
|
|
1636
1636
|
globstar while`,t,b,r,g,O),this.matchOne(t.slice(b),r.slice(g),i))return this.debug("globstar found match!",b,d,O),!0;if(O==="."||O===".."||!n.dot&&O.charAt(0)==="."){this.debug("dot detected!",t,b,r,g);break}this.debug("globstar swallow a segment, and continue"),b++}return!!(i&&(this.debug(`
|
|
1637
1637
|
>>> no match, partial?`,t,b,r,g),b===d))}let m;if(typeof o=="string"?(m=c===o,this.debug("string match",o,c,m)):(m=o.test(c),this.debug("pattern match",o,c,m)),!m)return!1}if(u===d&&l===s)return!0;if(u===d)return i;if(l===s)return u===d-1&&t[u]==="";throw new Error("wtf?")}braceExpand(){return HOd(this.pattern,this.options)}parse(t){Pja(t);let r=this.options;if(t==="**")return GV;if(t==="")return"";let i,n=null;(i=t.match(c$1))?n=r.dot?f$1:l$1:(i=t.match(kH1))?n=(r.nocase?r.dot?i$1:r$1:r.dot?t$1:e$1)(i[1]):(i=t.match(d$1))?n=(r.nocase?r.dot?_$1:p$1:r.dot?h$1:y$1)(i):(i=t.match(n$1))?n=r.dot?o$1:a$1:(i=t.match(u$1))&&(n=s$1);let a=mBn.fromGlob(t,this.options).toMMPattern();return n&&typeof a=="object"&&Reflect.defineProperty(a,"test",{value:n}),a}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?g$1:r.dot?O$1:m$1,n=new Set(r.nocase?["i"]:[]),a=t.map(d=>{let s=d.map(o=>{if(o instanceof RegExp)for(let c of o.flags.split(""))n.add(c);return typeof o=="string"?D$1(o):o===GV?GV:o._src});return s.forEach((o,c)=>{let b=s[c+1],g=s[c-1];o!==GV||g===GV||(g===void 0?b!==void 0&&b!==GV?s[c+1]="(?:\\/|"+i+"\\/)?"+b:s[c]=i:b===void 0?s[c-1]=g+"(?:\\/|"+i+")?":b!==GV&&(s[c-1]=g+"(?:\\/|\\/"+i+"\\/)"+b,s[c+1]=GV))}),s.filter(o=>o!==GV).join("/")}).join("|"),[u,l]=t.length>1?["(?:",")"]:["",""];a="^"+u+a+l+"$",this.negate&&(a="^(?!"+a+").+$");try{this.regexp=new RegExp(a,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let a=this.set;this.debug(this.pattern,"set",a);let u=n[n.length-1];if(!u)for(let l=n.length-2;!u&&l>=0;l--)u=n[l];for(let l=0;l<a.length;l++){let d=a[l],s=n;if(i.matchBase&&d.length===1&&(s=[u]),this.matchOne(s,d,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return QX.defaults(t).Minimatch}};QX.AST=mBn;QX.Minimatch=sEe;QX.escape=PBn;QX.unescape=rVt;var _md=require("url");var jBn=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,GOd=new Set,Bxs=typeof process=="object"&&process?process:{},QOd=(e,t,r,i)=>{typeof Bxs.emitWarning=="function"?Bxs.emitWarning(e,t,r,i):console.error(`[${r}] ${t}: ${e}`)},zgo=globalThis.AbortController,$Od=globalThis.AbortSignal;if(typeof zgo>"u"){$Od=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},zgo=class{constructor(){t()}signal=new $Od;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i)}}};let e=Bxs.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{e&&(e=!1,QOd("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var E$1=e=>!GOd.has(e),lk6=Symbol("type"),Rji=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),JOd=e=>Rji(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?wBn:null:null,wBn=class extends Array{constructor(t){super(t),this.fill(0)}},Ixs=class e{heap;length;static#e=!1;static create(t){let r=JOd(t);if(!r)return[];e.#e=!0;let i=new e(t,r);return e.#e=!1,i}constructor(t,r){if(!e.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},wja=class e{#e;#t;#r;#n;#i;#a;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#f;#u;#c;#l;#p;#h;#_;#y;#O;#v;#P;#j;#g;#w;#D;#m;#A;static unsafeExposeInternals(t){return{starts:t.#j,ttls:t.#g,sizes:t.#P,keyMap:t.#u,keyList:t.#c,valList:t.#l,next:t.#p,prev:t.#h,get head(){return t.#_},get tail(){return t.#y},free:t.#O,isBackgroundFetch:r=>t.#b(r),backgroundFetch:(r,i,n,a)=>t.#z(r,i,n,a),moveToTail:r=>t.#N(r),indexes:r=>t.#q(r),rindexes:r=>t.#C(r),isStale:r=>t.#M(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#f}get size(){return this.#s}get fetchMethod(){return this.#a}get memoMethod(){return this.#o}get dispose(){return this.#r}get onInsert(){return this.#n}get disposeAfter(){return this.#i}constructor(t){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:a,updateAgeOnGet:u,updateAgeOnHas:l,allowStale:d,dispose:s,onInsert:o,disposeAfter:c,noDisposeOnSet:b,noUpdateTTL:g,maxSize:O=0,maxEntrySize:m=0,sizeCalculation:w,fetchMethod:E,memoMethod:q,noDeleteOnFetchRejection:A,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:C,allowStaleOnFetchAbort:x,ignoreFetchAbort:$}=t;if(r!==0&&!Rji(r))throw new TypeError("max option must be a nonnegative integer");let I=r?JOd(r):Array;if(!I)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=O,this.maxEntrySize=m||this.#t,this.sizeCalculation=w,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(q!==void 0&&typeof q!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#o=q,E!==void 0&&typeof E!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=E,this.#D=!!E,this.#u=new Map,this.#c=new Array(r).fill(void 0),this.#l=new Array(r).fill(void 0),this.#p=new I(r),this.#h=new I(r),this.#_=0,this.#y=0,this.#O=Ixs.create(r),this.#s=0,this.#f=0,typeof s=="function"&&(this.#r=s),typeof o=="function"&&(this.#n=o),typeof c=="function"?(this.#i=c,this.#v=[]):(this.#i=void 0,this.#v=void 0),this.#w=!!this.#r,this.#A=!!this.#n,this.#m=!!this.#i,this.noDisposeOnSet=!!b,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!A,this.allowStaleOnFetchRejection=!!C,this.allowStaleOnFetchAbort=!!x,this.ignoreFetchAbort=!!$,this.maxEntrySize!==0){if(this.#t!==0&&!Rji(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!Rji(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#L()}if(this.allowStale=!!d,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!l,this.ttlResolution=Rji(n)||n===0?n:1,this.ttlAutopurge=!!a,this.ttl=i||0,this.ttl){if(!Rji(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#d()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let L="LRU_CACHE_UNBOUNDED";E$1(L)&&(GOd.add(L),QOd("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",L,e))}}getRemainingTTL(t){return this.#u.has(t)?1/0:0}#d(){let t=new wBn(this.#e),r=new wBn(this.#e);this.#g=t,this.#j=r,this.#S=(a,u,l=jBn.now())=>{if(r[a]=u!==0?l:0,t[a]=u,u!==0&&this.ttlAutopurge){let d=setTimeout(()=>{this.#M(a)&&this.#B(this.#c[a],"expire")},u+1);d.unref&&d.unref()}},this.#T=a=>{r[a]=t[a]!==0?jBn.now():0},this.#E=(a,u)=>{if(t[u]){let l=t[u],d=r[u];if(!l||!d)return;a.ttl=l,a.start=d,a.now=i||n();let s=a.now-d;a.remainingTTL=l-s}};let i=0,n=()=>{let a=jBn.now();if(this.ttlResolution>0){i=a;let u=setTimeout(()=>i=0,this.ttlResolution);u.unref&&u.unref()}return a};this.getRemainingTTL=a=>{let u=this.#u.get(a);if(u===void 0)return 0;let l=t[u],d=r[u];if(!l||!d)return 1/0;let s=(i||n())-d;return l-s},this.#M=a=>{let u=r[a],l=t[a];return!!l&&!!u&&(i||n())-u>l}}#T=()=>{};#E=()=>{};#S=()=>{};#M=()=>!1;#L(){let t=new wBn(this.#e);this.#f=0,this.#P=t,this.#I=r=>{this.#f-=t[r],t[r]=0},this.#U=(r,i,n,a)=>{if(this.#b(i))return 0;if(!Rji(n))if(a){if(typeof a!="function")throw new TypeError("sizeCalculation must be a function");if(n=a(i,r),!Rji(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.#x=(r,i,n)=>{if(t[r]=i,this.#t){let a=this.#t-t[r];for(;this.#f>a;)this.#R(!0)}this.#f+=t[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#f)}}#I=t=>{};#x=(t,r,i)=>{};#U=(t,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#q({allowStale:t=this.allowStale}={}){if(this.#s)for(let r=this.#y;!(!this.#V(r)||((t||!this.#M(r))&&(yield r),r===this.#_));)r=this.#h[r]}*#C({allowStale:t=this.allowStale}={}){if(this.#s)for(let r=this.#_;!(!this.#V(r)||((t||!this.#M(r))&&(yield r),r===this.#y));)r=this.#p[r]}#V(t){return t!==void 0&&this.#u.get(this.#c[t])===t}*entries(){for(let t of this.#q())this.#l[t]!==void 0&&this.#c[t]!==void 0&&!this.#b(this.#l[t])&&(yield[this.#c[t],this.#l[t]])}*rentries(){for(let t of this.#C())this.#l[t]!==void 0&&this.#c[t]!==void 0&&!this.#b(this.#l[t])&&(yield[this.#c[t],this.#l[t]])}*keys(){for(let t of this.#q()){let r=this.#c[t];r!==void 0&&!this.#b(this.#l[t])&&(yield r)}}*rkeys(){for(let t of this.#C()){let r=this.#c[t];r!==void 0&&!this.#b(this.#l[t])&&(yield r)}}*values(){for(let t of this.#q())this.#l[t]!==void 0&&!this.#b(this.#l[t])&&(yield this.#l[t])}*rvalues(){for(let t of this.#C())this.#l[t]!==void 0&&!this.#b(this.#l[t])&&(yield this.#l[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,r={}){for(let i of this.#q()){let n=this.#l[i],a=this.#b(n)?n.__staleWhileFetching:n;if(a!==void 0&&t(a,this.#c[i],this))return this.get(this.#c[i],r)}}forEach(t,r=this){for(let i of this.#q()){let n=this.#l[i],a=this.#b(n)?n.__staleWhileFetching:n;a!==void 0&&t.call(r,a,this.#c[i],this)}}rforEach(t,r=this){for(let i of this.#C()){let n=this.#l[i],a=this.#b(n)?n.__staleWhileFetching:n;a!==void 0&&t.call(r,a,this.#c[i],this)}}purgeStale(){let t=!1;for(let r of this.#C({allowStale:!0}))this.#M(r)&&(this.#B(this.#c[r],"expire"),t=!0);return t}info(t){let r=this.#u.get(t);if(r===void 0)return;let i=this.#l[r],n=this.#b(i)?i.__staleWhileFetching:i;if(n===void 0)return;let a={value:n};if(this.#g&&this.#j){let u=this.#g[r],l=this.#j[r];if(u&&l){let d=u-(jBn.now()-l);a.ttl=d,a.start=Date.now()}}return this.#P&&(a.size=this.#P[r]),a}dump(){let t=[];for(let r of this.#q({allowStale:!0})){let i=this.#c[r],n=this.#l[r],a=this.#b(n)?n.__staleWhileFetching:n;if(a===void 0||i===void 0)continue;let u={value:a};if(this.#g&&this.#j){u.ttl=this.#g[r];let l=jBn.now()-this.#j[r];u.start=Math.floor(Date.now()-l)}this.#P&&(u.size=this.#P[r]),t.unshift([i,u])}return t}load(t){this.clear();for(let[r,i]of t){if(i.start){let n=Date.now()-i.start;i.start=jBn.now()-n}this.set(r,i.value,i)}}set(t,r,i={}){if(r===void 0)return this.delete(t),this;let{ttl:n=this.ttl,start:a,noDisposeOnSet:u=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:d}=i,{noUpdateTTL:s=this.noUpdateTTL}=i,o=this.#U(t,r,i.size||0,l);if(this.maxEntrySize&&o>this.maxEntrySize)return d&&(d.set="miss",d.maxEntrySizeExceeded=!0),this.#B(t,"set"),this;let c=this.#s===0?void 0:this.#u.get(t);if(c===void 0)c=this.#s===0?this.#y:this.#O.length!==0?this.#O.pop():this.#s===this.#e?this.#R(!1):this.#s,this.#c[c]=t,this.#l[c]=r,this.#u.set(t,c),this.#p[this.#y]=c,this.#h[c]=this.#y,this.#y=c,this.#s++,this.#x(c,o,d),d&&(d.set="add"),s=!1,this.#A&&this.#n?.(r,t,"add");else{this.#N(c);let b=this.#l[c];if(r!==b){if(this.#D&&this.#b(b)){b.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=b;g!==void 0&&!u&&(this.#w&&this.#r?.(g,t,"set"),this.#m&&this.#v?.push([g,t,"set"]))}else u||(this.#w&&this.#r?.(b,t,"set"),this.#m&&this.#v?.push([b,t,"set"]));if(this.#I(c),this.#x(c,o,d),this.#l[c]=r,d){d.set="replace";let g=b&&this.#b(b)?b.__staleWhileFetching:b;g!==void 0&&(d.oldValue=g)}}else d&&(d.set="update");this.#A&&this.onInsert?.(r,t,r===b?"update":"replace")}if(n!==0&&!this.#g&&this.#d(),this.#g&&(s||this.#S(c,n,a),d&&this.#E(d,c)),!u&&this.#m&&this.#v){let b=this.#v,g;for(;g=b?.shift();)this.#i?.(...g)}return this}pop(){try{for(;this.#s;){let t=this.#l[this.#_];if(this.#R(!0),this.#b(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#m&&this.#v){let t=this.#v,r;for(;r=t?.shift();)this.#i?.(...r)}}}#R(t){let r=this.#_,i=this.#c[r],n=this.#l[r];return this.#D&&this.#b(n)?n.__abortController.abort(new Error("evicted")):(this.#w||this.#m)&&(this.#w&&this.#r?.(n,i,"evict"),this.#m&&this.#v?.push([n,i,"evict"])),this.#I(r),t&&(this.#c[r]=void 0,this.#l[r]=void 0,this.#O.push(r)),this.#s===1?(this.#_=this.#y=0,this.#O.length=0):this.#_=this.#p[r],this.#u.delete(i),this.#s--,r}has(t,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,a=this.#u.get(t);if(a!==void 0){let u=this.#l[a];if(this.#b(u)&&u.__staleWhileFetching===void 0)return!1;if(this.#M(a))n&&(n.has="stale",this.#E(n,a));else return i&&this.#T(a),n&&(n.has="hit",this.#E(n,a)),!0}else n&&(n.has="miss");return!1}peek(t,r={}){let{allowStale:i=this.allowStale}=r,n=this.#u.get(t);if(n===void 0||!i&&this.#M(n))return;let a=this.#l[n];return this.#b(a)?a.__staleWhileFetching:a}#z(t,r,i,n){let a=r===void 0?void 0:this.#l[r];if(this.#b(a))return a;let u=new zgo,{signal:l}=i;l?.addEventListener("abort",()=>u.abort(l.reason),{signal:u.signal});let d={signal:u.signal,options:i,context:n},s=(m,w=!1)=>{let{aborted:E}=u.signal,q=i.ignoreFetchAbort&&m!==void 0;if(i.status&&(E&&!w?(i.status.fetchAborted=!0,i.status.fetchError=u.signal.reason,q&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),E&&!q&&!w)return c(u.signal.reason);let A=g;return this.#l[r]===g&&(m===void 0?A.__staleWhileFetching?this.#l[r]=A.__staleWhileFetching:this.#B(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,m,d.options))),m},o=m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),c(m)),c=m=>{let{aborted:w}=u.signal,E=w&&i.allowStaleOnFetchAbort,q=E||i.allowStaleOnFetchRejection,A=q||i.noDeleteOnFetchRejection,D=g;if(this.#l[r]===g&&(!A||D.__staleWhileFetching===void 0?this.#B(t,"fetch"):E||(this.#l[r]=D.__staleWhileFetching)),q)return i.status&&D.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),D.__staleWhileFetching;if(D.__returned===D)throw m},b=(m,w)=>{let E=this.#a?.(t,a,d);E&&E instanceof Promise&&E.then(q=>m(q===void 0?void 0:q),w),u.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=q=>s(q,!0)))})};i.status&&(i.status.fetchDispatched=!0);let g=new Promise(b).then(s,o),O=Object.assign(g,{__abortController:u,__staleWhileFetching:a,__returned:void 0});return r===void 0?(this.set(t,O,{...d.options,status:void 0}),r=this.#u.get(t)):this.#l[r]=O,O}#b(t){if(!this.#D)return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof zgo}async fetch(t,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,ttl:u=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:d=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:o=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:b=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:O=this.allowStaleOnFetchAbort,context:m,forceRefresh:w=!1,status:E,signal:q}=r;if(!this.#D)return E&&(E.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:a,status:E});let A={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:a,ttl:u,noDisposeOnSet:l,size:d,sizeCalculation:s,noUpdateTTL:o,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:O,ignoreFetchAbort:g,status:E,signal:q},D=this.#u.get(t);if(D===void 0){E&&(E.fetch="miss");let C=this.#z(t,D,A,m);return C.__returned=C}else{let C=this.#l[D];if(this.#b(C)){let V=i&&C.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",V&&(E.returnedStale=!0)),V?C.__staleWhileFetching:C.__returned=C}let x=this.#M(D);if(!w&&!x)return E&&(E.fetch="hit"),this.#N(D),n&&this.#T(D),E&&this.#E(E,D),C;let $=this.#z(t,D,A,m),L=$.__staleWhileFetching!==void 0&&i;return E&&(E.fetch=x?"stale":"refresh",L&&x&&(E.returnedStale=!0)),L?$.__staleWhileFetching:$.__returned=$}}async forceFetch(t,r={}){let i=await this.fetch(t,r);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,r={}){let i=this.#o;if(!i)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:a,...u}=r,l=this.get(t,u);if(!a&&l!==void 0)return l;let d=i(t,l,{options:u,context:n});return this.set(t,d,u),d}get(t,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,status:u}=r,l=this.#u.get(t);if(l!==void 0){let d=this.#l[l],s=this.#b(d);return u&&this.#E(u,l),this.#M(l)?(u&&(u.get="stale"),s?(u&&i&&d.__staleWhileFetching!==void 0&&(u.returnedStale=!0),i?d.__staleWhileFetching:void 0):(a||this.#B(t,"expire"),u&&i&&(u.returnedStale=!0),i?d:void 0)):(u&&(u.get="hit"),s?d.__staleWhileFetching:(this.#N(l),n&&this.#T(l),d))}else u&&(u.get="miss")}#W(t,r){this.#h[r]=t,this.#p[t]=r}#N(t){t!==this.#y&&(t===this.#_?this.#_=this.#p[t]:this.#W(this.#h[t],this.#p[t]),this.#W(this.#y,t),this.#y=t)}delete(t){return this.#B(t,"delete")}#B(t,r){let i=!1;if(this.#s!==0){let n=this.#u.get(t);if(n!==void 0)if(i=!0,this.#s===1)this.#F(r);else{this.#I(n);let a=this.#l[n];if(this.#b(a)?a.__abortController.abort(new Error("deleted")):(this.#w||this.#m)&&(this.#w&&this.#r?.(a,t,r),this.#m&&this.#v?.push([a,t,r])),this.#u.delete(t),this.#c[n]=void 0,this.#l[n]=void 0,n===this.#y)this.#y=this.#h[n];else if(n===this.#_)this.#_=this.#p[n];else{let u=this.#h[n];this.#p[u]=this.#p[n];let l=this.#p[n];this.#h[l]=this.#h[n]}this.#s--,this.#O.push(n)}}if(this.#m&&this.#v?.length){let n=this.#v,a;for(;a=n?.shift();)this.#i?.(...a)}return i}clear(){return this.#F("delete")}#F(t){for(let r of this.#C({allowStale:!0})){let i=this.#l[r];if(this.#b(i))i.__abortController.abort(new Error("deleted"));else{let n=this.#c[r];this.#w&&this.#r?.(i,n,t),this.#m&&this.#v?.push([i,n,t])}}if(this.#u.clear(),this.#l.fill(void 0),this.#c.fill(void 0),this.#g&&this.#j&&(this.#g.fill(0),this.#j.fill(0)),this.#P&&this.#P.fill(0),this.#_=0,this.#y=0,this.#O.length=0,this.#f=0,this.#s=0,this.#m&&this.#v){let r=this.#v,i;for(;i=r?.shift();)this.#i?.(...i)}}};var EBn=require("path"),nmd=require("url"),lXt=require("fs"),R$1=ai(require("fs"),1),Lji=require("fs/promises");var Vgo=require("events"),Uxs=ai(require("stream"),1),kOd=require("string_decoder"),KOd=typeof process=="object"&&process?process:{stdout:null,stderr:null},M$1=e=>!!e&&typeof e=="object"&&(e instanceof Fji||e instanceof Uxs.default||A$1(e)||q$1(e)),A$1=e=>!!e&&typeof e=="object"&&e instanceof Vgo.EventEmitter&&typeof e.pipe=="function"&&e.pipe!==Uxs.default.Writable.prototype.pipe,q$1=e=>!!e&&typeof e=="object"&&e instanceof Vgo.EventEmitter&&typeof e.write=="function"&&typeof e.end=="function",Wci=Symbol("EOF"),Hci=Symbol("maybeEmitEnd"),Nji=Symbol("emittedEnd"),xgo=Symbol("emittingEnd"),Sja=Symbol("emittedError"),Rgo=Symbol("closed"),YOd=Symbol("read"),Ngo=Symbol("flush"),XOd=Symbol("flushChunk"),iVt=Symbol("encoding"),SBn=Symbol("decoder"),u9=Symbol("flowing"),Dja=Symbol("paused"),DBn=Symbol("resume"),s9=Symbol("buffer"),JX=Symbol("pipes"),c9=Symbol("bufferLength"),zxs=Symbol("bufferPush"),Fgo=Symbol("bufferShift"),eQ=Symbol("objectMode"),HF=Symbol("destroyed"),xxs=Symbol("error"),Rxs=Symbol("emitData"),ZOd=Symbol("emitEnd"),Nxs=Symbol("emitEnd2"),sXt=Symbol("async"),Fxs=Symbol("abort"),Lgo=Symbol("aborted"),Eja=Symbol("signal"),WUi=Symbol("dataListeners"),cEe=Symbol("discarded"),Mja=e=>Promise.resolve().then(e),T$1=e=>e(),C$1=e=>e==="end"||e==="finish"||e==="prefinish",B$1=e=>e instanceof ArrayBuffer||!!e&&typeof e=="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0,I$1=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),Ugo=class{src;dest;opts;ondrain;constructor(t,r,i){this.src=t,this.dest=r,this.opts=i,this.ondrain=()=>t[DBn](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Lxs=class extends Ugo{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,r,i){super(t,r,i),this.proxyErrors=n=>r.emit("error",n),t.on("error",this.proxyErrors)}},z$1=e=>!!e.objectMode,x$1=e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer",Fji=class extends Vgo.EventEmitter{[u9]=!1;[Dja]=!1;[JX]=[];[s9]=[];[eQ];[iVt];[sXt];[SBn];[Wci]=!1;[Nji]=!1;[xgo]=!1;[Rgo]=!1;[Sja]=null;[c9]=0;[HF]=!1;[Eja];[Lgo]=!1;[WUi]=0;[cEe]=!1;writable=!0;readable=!0;constructor(...t){let r=t[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");z$1(r)?(this[eQ]=!0,this[iVt]=null):x$1(r)?(this[iVt]=r.encoding,this[eQ]=!1):(this[eQ]=!1,this[iVt]=null),this[sXt]=!!r.async,this[SBn]=this[iVt]?new kOd.StringDecoder(this[iVt]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[s9]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[JX]});let{signal:i}=r;i&&(this[Eja]=i,i.aborted?this[Fxs]():i.addEventListener("abort",()=>this[Fxs]()))}get bufferLength(){return this[c9]}get encoding(){return this[iVt]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[eQ]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[sXt]}set async(t){this[sXt]=this[sXt]||!!t}[Fxs](){this[Lgo]=!0,this.emit("abort",this[Eja]?.reason),this.destroy(this[Eja]?.reason)}get aborted(){return this[Lgo]}set aborted(t){}write(t,r,i){if(this[Lgo])return!1;if(this[Wci])throw new Error("write after end");if(this[HF])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[sXt]?Mja:T$1;if(!this[eQ]&&!Buffer.isBuffer(t)){if(I$1(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(B$1(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[eQ]?(this[u9]&&this[c9]!==0&&this[Ngo](!0),this[u9]?this.emit("data",t):this[zxs](t),this[c9]!==0&&this.emit("readable"),i&&n(i),this[u9]):t.length?(typeof t=="string"&&!(r===this[iVt]&&!this[SBn]?.lastNeed)&&(t=Buffer.from(t,r)),Buffer.isBuffer(t)&&this[iVt]&&(t=this[SBn].write(t)),this[u9]&&this[c9]!==0&&this[Ngo](!0),this[u9]?this.emit("data",t):this[zxs](t),this[c9]!==0&&this.emit("readable"),i&&n(i),this[u9]):(this[c9]!==0&&this.emit("readable"),i&&n(i),this[u9])}read(t){if(this[HF])return null;if(this[cEe]=!1,this[c9]===0||t===0||t&&t>this[c9])return this[Hci](),null;this[eQ]&&(t=null),this[s9].length>1&&!this[eQ]&&(this[s9]=[this[iVt]?this[s9].join(""):Buffer.concat(this[s9],this[c9])]);let r=this[YOd](t||null,this[s9][0]);return this[Hci](),r}[YOd](t,r){if(this[eQ])this[Fgo]();else{let i=r;t===i.length||t===null?this[Fgo]():typeof i=="string"?(this[s9][0]=i.slice(t),r=i.slice(0,t),this[c9]-=t):(this[s9][0]=i.subarray(t),r=i.subarray(0,t),this[c9]-=t)}return this.emit("data",r),!this[s9].length&&!this[Wci]&&this.emit("drain"),r}end(t,r,i){return typeof t=="function"&&(i=t,t=void 0),typeof r=="function"&&(i=r,r="utf8"),t!==void 0&&this.write(t,r),i&&this.once("end",i),this[Wci]=!0,this.writable=!1,(this[u9]||!this[Dja])&&this[Hci](),this}[DBn](){this[HF]||(!this[WUi]&&!this[JX].length&&(this[cEe]=!0),this[Dja]=!1,this[u9]=!0,this.emit("resume"),this[s9].length?this[Ngo]():this[Wci]?this[Hci]():this.emit("drain"))}resume(){return this[DBn]()}pause(){this[u9]=!1,this[Dja]=!0,this[cEe]=!1}get destroyed(){return this[HF]}get flowing(){return this[u9]}get paused(){return this[Dja]}[zxs](t){this[eQ]?this[c9]+=1:this[c9]+=t.length,this[s9].push(t)}[Fgo](){return this[eQ]?this[c9]-=1:this[c9]-=this[s9][0].length,this[s9].shift()}[Ngo](t=!1){do;while(this[XOd](this[Fgo]())&&this[s9].length);!t&&!this[s9].length&&!this[Wci]&&this.emit("drain")}[XOd](t){return this.emit("data",t),this[u9]}pipe(t,r){if(this[HF])return t;this[cEe]=!1;let i=this[Nji];return r=r||{},t===KOd.stdout||t===KOd.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&t.end():(this[JX].push(r.proxyErrors?new Lxs(this,t,r):new Ugo(this,t,r)),this[sXt]?Mja(()=>this[DBn]()):this[DBn]()),t}unpipe(t){let r=this[JX].find(i=>i.dest===t);r&&(this[JX].length===1?(this[u9]&&this[WUi]===0&&(this[u9]=!1),this[JX]=[]):this[JX].splice(this[JX].indexOf(r),1),r.unpipe())}addListener(t,r){return this.on(t,r)}on(t,r){let i=super.on(t,r);if(t==="data")this[cEe]=!1,this[WUi]++,!this[JX].length&&!this[u9]&&this[DBn]();else if(t==="readable"&&this[c9]!==0)super.emit("readable");else if(C$1(t)&&this[Nji])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[Sja]){let n=r;this[sXt]?Mja(()=>n.call(this,this[Sja])):n.call(this,this[Sja])}return i}removeListener(t,r){return this.off(t,r)}off(t,r){let i=super.off(t,r);return t==="data"&&(this[WUi]=this.listeners("data").length,this[WUi]===0&&!this[cEe]&&!this[JX].length&&(this[u9]=!1)),i}removeAllListeners(t){let r=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[WUi]=0,!this[cEe]&&!this[JX].length&&(this[u9]=!1)),r}get emittedEnd(){return this[Nji]}[Hci](){!this[xgo]&&!this[Nji]&&!this[HF]&&this[s9].length===0&&this[Wci]&&(this[xgo]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Rgo]&&this.emit("close"),this[xgo]=!1)}emit(t,...r){let i=r[0];if(t!=="error"&&t!=="close"&&t!==HF&&this[HF])return!1;if(t==="data")return!this[eQ]&&!i?!1:this[sXt]?(Mja(()=>this[Rxs](i)),!0):this[Rxs](i);if(t==="end")return this[ZOd]();if(t==="close"){if(this[Rgo]=!0,!this[Nji]&&!this[HF])return!1;let a=super.emit("close");return this.removeAllListeners("close"),a}else if(t==="error"){this[Sja]=i,super.emit(xxs,i);let a=!this[Eja]||this.listeners("error").length?super.emit("error",i):!1;return this[Hci](),a}else if(t==="resume"){let a=super.emit("resume");return this[Hci](),a}else if(t==="finish"||t==="prefinish"){let a=super.emit(t);return this.removeAllListeners(t),a}let n=super.emit(t,...r);return this[Hci](),n}[Rxs](t){for(let i of this[JX])i.dest.write(t)===!1&&this.pause();let r=this[cEe]?!1:super.emit("data",t);return this[Hci](),r}[ZOd](){return this[Nji]?!1:(this[Nji]=!0,this.readable=!1,this[sXt]?(Mja(()=>this[Nxs]()),!0):this[Nxs]())}[Nxs](){if(this[SBn]){let r=this[SBn].end();if(r){for(let i of this[JX])i.dest.write(r);this[cEe]||super.emit("data",r)}}for(let r of this[JX])r.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[eQ]||(t.dataLength=0);let r=this.promise();return this.on("data",i=>{t.push(i),this[eQ]||(t.dataLength+=i.length)}),await r,t}async concat(){if(this[eQ])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[iVt]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,r)=>{this.on(HF,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[cEe]=!1;let t=!1,r=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[Wci])return r();let a,u,l=c=>{this.off("data",d),this.off("end",s),this.off(HF,o),r(),u(c)},d=c=>{this.off("error",l),this.off("end",s),this.off(HF,o),this.pause(),a({value:c,done:!!this[Wci]})},s=()=>{this.off("error",l),this.off("data",d),this.off(HF,o),r(),a({done:!0,value:void 0})},o=()=>l(new Error("stream destroyed"));return new Promise((c,b)=>{u=b,a=c,this.once(HF,o),this.once("error",l),this.once("end",s),this.once("data",d)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[cEe]=!1;let t=!1,r=()=>(this.pause(),this.off(xxs,r),this.off(HF,r),this.off("end",r),t=!0,{done:!0,value:void 0}),i=()=>{if(t)return r();let n=this.read();return n===null?r():{done:!1,value:n}};return this.once("end",r),this.once(xxs,r),this.once(HF,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(t){if(this[HF])return t?this.emit("error",t):this.emit(HF),this;this[HF]=!0,this[cEe]=!0,this[s9].length=0,this[c9]=0;let r=this;return typeof r.close=="function"&&!this[Rgo]&&r.close(),t?this.emit("error",t):this.emit(HF),this}static get isStream(){return M$1}};var N$1=lXt.realpathSync.native,qja={lstatSync:lXt.lstatSync,readdir:lXt.readdir,readdirSync:lXt.readdirSync,readlinkSync:lXt.readlinkSync,realpathSync:N$1,promises:{lstat:Lji.lstat,readdir:Lji.readdir,readlink:Lji.readlink,realpath:Lji.realpath}},amd=e=>!e||e===qja||e===R$1?qja:{...qja,...e,promises:{...qja.promises,...e.promises||{}}},omd=/^\\\\\?\\([a-z]:)\\?$/i,F$1=e=>e.replace(/\//g,"\\").replace(omd,"$1\\"),L$1=/[\\\/]/,gxe=0,umd=1,smd=2,cXt=4,cmd=6,lmd=8,HUi=10,fmd=12,bxe=15,Aja=~bxe,Vxs=16,emd=32,Tja=64,nVt=128,Wgo=256,$go=512,tmd=Tja|nVt|$go,U$1=1023,Wxs=e=>e.isFile()?lmd:e.isDirectory()?cXt:e.isSymbolicLink()?HUi:e.isCharacterDevice()?smd:e.isBlockDevice()?cmd:e.isSocket()?fmd:e.isFIFO()?umd:gxe,rmd=new Map,Cja=e=>{let t=rmd.get(e);if(t)return t;let r=e.normalize("NFKD");return rmd.set(e,r),r},imd=new Map,Hgo=e=>{let t=imd.get(e);if(t)return t;let r=Cja(e.toLowerCase());return imd.set(e,r),r},Ggo=class extends wja{constructor(){super({max:256})}},Hxs=class extends wja{constructor(t=16*1024){super({maxSize:t,sizeCalculation:r=>r.length+1})}},dmd=Symbol("PathScurry setAsCwd"),tQ=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#r;get mode(){return this.#r}#n;get nlink(){return this.#n}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#o;get rdev(){return this.#o}#s;get blksize(){return this.#s}#f;get ino(){return this.#f}#u;get size(){return this.#u}#c;get blocks(){return this.#c}#l;get atimeMs(){return this.#l}#p;get mtimeMs(){return this.#p}#h;get ctimeMs(){return this.#h}#_;get birthtimeMs(){return this.#_}#y;get atime(){return this.#y}#O;get mtime(){return this.#O}#v;get ctime(){return this.#v}#P;get birthtime(){return this.#P}#j;#g;#w;#D;#m;#A;#d;#T;#E;#S;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,r=gxe,i,n,a,u,l){this.name=t,this.#j=a?Hgo(t):Cja(t),this.#d=r&U$1,this.nocase=a,this.roots=n,this.root=i||this,this.#T=u,this.#w=l.fullpath,this.#m=l.relative,this.#A=l.relativePosix,this.parent=l.parent,this.parent?this.#e=this.parent.#e:this.#e=amd(l.fs)}depth(){return this.#g!==void 0?this.#g:this.parent?this.#g=this.parent.depth()+1:this.#g=0}childrenCache(){return this.#T}resolve(t){if(!t)return this;let r=this.getRootString(t),n=t.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#M(n):this.#M(n)}#M(t){let r=this;for(let i of t)r=r.child(i);return r}children(){let t=this.#T.get(this);if(t)return t;let r=Object.assign([],{provisional:0});return this.#T.set(this,r),this.#d&=~Vxs,r}child(t,r){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let i=this.children(),n=this.nocase?Hgo(t):Cja(t);for(let d of i)if(d.#j===n)return d;let a=this.parent?this.sep:"",u=this.#w?this.#w+a+t:void 0,l=this.newChild(t,gxe,{...r,parent:this,fullpath:u});return this.canReaddir()||(l.#d|=nVt),i.push(l),l}relative(){if(this.isCWD)return"";if(this.#m!==void 0)return this.#m;let t=this.name,r=this.parent;if(!r)return this.#m=this.name;let i=r.relative();return i+(!i||!r.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let t=this.name,r=this.parent;if(!r)return this.#A=this.fullpathPosix();let i=r.relativePosix();return i+(!i||!r.parent?"":"/")+t}fullpath(){if(this.#w!==void 0)return this.#w;let t=this.name,r=this.parent;if(!r)return this.#w=this.name;let n=r.fullpath()+(r.parent?this.sep:"")+t;return this.#w=n}fullpathPosix(){if(this.#D!==void 0)return this.#D;if(this.sep==="/")return this.#D=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#D=`//?/${n}`:this.#D=n}let t=this.parent,r=t.fullpathPosix(),i=r+(!r||!t.parent?"":"/")+this.name;return this.#D=i}isUnknown(){return(this.#d&bxe)===gxe}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#d&bxe)===lmd}isDirectory(){return(this.#d&bxe)===cXt}isCharacterDevice(){return(this.#d&bxe)===smd}isBlockDevice(){return(this.#d&bxe)===cmd}isFIFO(){return(this.#d&bxe)===umd}isSocket(){return(this.#d&bxe)===fmd}isSymbolicLink(){return(this.#d&HUi)===HUi}lstatCached(){return this.#d&emd?this:void 0}readlinkCached(){return this.#E}realpathCached(){return this.#S}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#E)return!0;if(!this.parent)return!1;let t=this.#d&bxe;return!(t!==gxe&&t!==HUi||this.#d&Wgo||this.#d&nVt)}calledReaddir(){return!!(this.#d&Vxs)}isENOENT(){return!!(this.#d&nVt)}isNamed(t){return this.nocase?this.#j===Hgo(t):this.#j===Cja(t)}async readlink(){let t=this.#E;if(t)return t;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(r);if(i)return this.#E=i}catch(r){this.#R(r.code);return}}readlinkSync(){let t=this.#E;if(t)return t;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(r);if(i)return this.#E=i}catch(r){this.#R(r.code);return}}#L(t){this.#d|=Vxs;for(let r=t.provisional;r<t.length;r++){let i=t[r];i&&i.#I()}}#I(){this.#d&nVt||(this.#d=(this.#d|nVt)&Aja,this.#x())}#x(){let t=this.children();t.provisional=0;for(let r of t)r.#I()}#U(){this.#d|=$go,this.#q()}#q(){if(this.#d&Tja)return;let t=this.#d;(t&bxe)===cXt&&(t&=Aja),this.#d=t|Tja,this.#x()}#C(t=""){t==="ENOTDIR"||t==="EPERM"?this.#q():t==="ENOENT"?this.#I():this.children().provisional=0}#V(t=""){t==="ENOTDIR"?this.parent.#q():t==="ENOENT"&&this.#I()}#R(t=""){let r=this.#d;r|=Wgo,t==="ENOENT"&&(r|=nVt),(t==="EINVAL"||t==="UNKNOWN")&&(r&=Aja),this.#d=r,t==="ENOTDIR"&&this.parent&&this.parent.#q()}#z(t,r){return this.#W(t,r)||this.#b(t,r)}#b(t,r){let i=Wxs(t),n=this.newChild(t.name,i,{parent:this}),a=n.#d&bxe;return a!==cXt&&a!==HUi&&a!==gxe&&(n.#d|=Tja),r.unshift(n),r.provisional++,n}#W(t,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?Hgo(t.name):Cja(t.name))===n.#j)return this.#N(t,n,i,r)}}#N(t,r,i,n){let a=r.name;return r.#d=r.#d&Aja|Wxs(t),a!==t.name&&(r.name=t.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(r)),n.provisional++,r}async lstat(){if((this.#d&nVt)===0)try{return this.#B(await this.#e.promises.lstat(this.fullpath())),this}catch(t){this.#V(t.code)}}lstatSync(){if((this.#d&nVt)===0)try{return this.#B(this.#e.lstatSync(this.fullpath())),this}catch(t){this.#V(t.code)}}#B(t){let{atime:r,atimeMs:i,birthtime:n,birthtimeMs:a,blksize:u,blocks:l,ctime:d,ctimeMs:s,dev:o,gid:c,ino:b,mode:g,mtime:O,mtimeMs:m,nlink:w,rdev:E,size:q,uid:A}=t;this.#y=r,this.#l=i,this.#P=n,this.#_=a,this.#s=u,this.#c=l,this.#v=d,this.#h=s,this.#t=o,this.#a=c,this.#f=b,this.#r=g,this.#O=O,this.#p=m,this.#n=w,this.#o=E,this.#u=q,this.#i=A;let D=Wxs(t);this.#d=this.#d&Aja|D|emd,D!==gxe&&D!==cXt&&D!==HUi&&(this.#d|=Tja)}#F=[];#$=!1;#G(t){this.#$=!1;let r=this.#F.slice();this.#F.length=0,r.forEach(i=>i(null,t))}readdirCB(t,r=!1){if(!this.canReaddir()){r?t(null,[]):queueMicrotask(()=>t(null,[]));return}let i=this.children();if(this.calledReaddir()){let a=i.slice(0,i.provisional);r?t(null,a):queueMicrotask(()=>t(null,a));return}if(this.#F.push(t),this.#$)return;this.#$=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(a,u)=>{if(a)this.#C(a.code),i.provisional=0;else{for(let l of u)this.#z(l,i);this.#L(i)}this.#G(i.slice(0,i.provisional))})}#H;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let r=this.fullpath();if(this.#H)await this.#H;else{let i=()=>{};this.#H=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#z(n,t);this.#L(t)}catch(n){this.#C(n.code),t.provisional=0}this.#H=void 0,i()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let r=this.fullpath();try{for(let i of this.#e.readdirSync(r,{withFileTypes:!0}))this.#z(i,t);this.#L(t)}catch(i){this.#C(i.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#d&tmd)return!1;let t=bxe&this.#d;return t===gxe||t===cXt||t===HUi}shouldWalk(t,r){return(this.#d&cXt)===cXt&&!(this.#d&tmd)&&!t.has(this)&&(!r||r(this))}async realpath(){if(this.#S)return this.#S;if(!(($go|Wgo|nVt)&this.#d))try{let t=await this.#e.promises.realpath(this.fullpath());return this.#S=this.resolve(t)}catch{this.#U()}}realpathSync(){if(this.#S)return this.#S;if(!(($go|Wgo|nVt)&this.#d))try{let t=this.#e.realpathSync(this.fullpath());return this.#S=this.resolve(t)}catch{this.#U()}}[dmd](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let r=new Set([]),i=[],n=this;for(;n&&n.parent;)r.add(n),n.#m=i.join(this.sep),n.#A=i.join("/"),n=n.parent,i.push("..");for(n=t;n&&n.parent&&!r.has(n);)n.#m=void 0,n.#A=void 0,n=n.parent}},Qgo=class e extends tQ{sep="\\";splitSep=L$1;constructor(t,r=gxe,i,n,a,u,l){super(t,r,i,n,a,u,l)}newChild(t,r=gxe,i={}){return new e(t,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(t){return EBn.win32.parse(t).root}getRoot(t){if(t=F$1(t.toUpperCase()),t===this.root.name)return this.root;for(let[r,i]of Object.entries(this.roots))if(this.sameRoot(t,r))return this.roots[t]=i;return this.roots[t]=new MBn(t,this).root}sameRoot(t,r=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(omd,"$1\\"),t===r}},Jgo=class e extends tQ{splitSep="/";sep="/";constructor(t,r=gxe,i,n,a,u,l){super(t,r,i,n,a,u,l)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,r=gxe,i={}){return new e(t,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Kgo=class{root;rootPath;roots;cwd;#e;#t;#r;nocase;#n;constructor(t=process.cwd(),r,i,{nocase:n,childrenCacheSize:a=16*1024,fs:u=qja}={}){this.#n=amd(u),(t instanceof URL||t.startsWith("file://"))&&(t=(0,nmd.fileURLToPath)(t));let l=r.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(l),this.#e=new Ggo,this.#t=new Ggo,this.#r=new Hxs(a);let d=l.substring(this.rootPath.length).split(i);if(d.length===1&&!d[0]&&d.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#n),this.roots[this.rootPath]=this.root;let s=this.root,o=d.length-1,c=r.sep,b=this.rootPath,g=!1;for(let O of d){let m=o--;s=s.child(O,{relative:new Array(m).fill("..").join(c),relativePosix:new Array(m).fill("..").join("/"),fullpath:b+=(g?"":c)+O}),g=!0}this.cwd=s}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#r}resolve(...t){let r="";for(let a=t.length-1;a>=0;a--){let u=t[a];if(!(!u||u===".")&&(r=r?`${u}/${r}`:u,this.isAbsolute(u)))break}let i=this.#e.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpath();return this.#e.set(r,n),n}resolvePosix(...t){let r="";for(let a=t.length-1;a>=0;a--){let u=t[a];if(!(!u||u===".")&&(r=r?`${u}/${r}`:u,this.isAbsolute(u)))break}let i=this.#t.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpathPosix();return this.#t.set(r,n),n}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,r={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof tQ||(r=t,t=this.cwd);let{withFileTypes:i}=r;if(t.canReaddir()){let n=await t.readdir();return i?n:n.map(a=>a.name)}else return[]}readdirSync(t=this.cwd,r={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof tQ||(r=t,t=this.cwd);let{withFileTypes:i=!0}=r;return t.canReaddir()?i?t.readdirSync():t.readdirSync().map(n=>n.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof tQ||(r=t.withFileTypes,t=this.cwd);let i=await t.readlink();return r?i:i?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof tQ||(r=t.withFileTypes,t=this.cwd);let i=t.readlinkSync();return r?i:i?.fullpath()}async realpath(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof tQ||(r=t.withFileTypes,t=this.cwd);let i=await t.realpath();return r?i:i?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof tQ||(r=t.withFileTypes,t=this.cwd);let i=t.realpathSync();return r?i:i?.fullpath()}async walk(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof tQ||(r=t,t=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:a,walkFilter:u}=r,l=[];(!a||a(t))&&l.push(i?t:t.fullpath());let d=new Set,s=(c,b)=>{d.add(c),c.readdirCB((g,O)=>{if(g)return b(g);let m=O.length;if(!m)return b();let w=()=>{--m===0&&b()};for(let E of O)(!a||a(E))&&l.push(i?E:E.fullpath()),n&&E.isSymbolicLink()?E.realpath().then(q=>q?.isUnknown()?q.lstat():q).then(q=>q?.shouldWalk(d,u)?s(q,w):w()):E.shouldWalk(d,u)?s(E,w):w()},!0)},o=t;return new Promise((c,b)=>{s(o,g=>{if(g)return b(g);c(l)})})}walkSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof tQ||(r=t,t=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:a,walkFilter:u}=r,l=[];(!a||a(t))&&l.push(i?t:t.fullpath());let d=new Set([t]);for(let s of d){let o=s.readdirSync();for(let c of o){(!a||a(c))&&l.push(i?c:c.fullpath());let b=c;if(c.isSymbolicLink()){if(!(n&&(b=c.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(d,u)&&d.add(b)}}return l}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,r={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof tQ||(r=t,t=this.cwd),this.stream(t,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof tQ||(r=t,t=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:a,walkFilter:u}=r;(!a||a(t))&&(yield i?t:t.fullpath());let l=new Set([t]);for(let d of l){let s=d.readdirSync();for(let o of s){(!a||a(o))&&(yield i?o:o.fullpath());let c=o;if(o.isSymbolicLink()){if(!(n&&(c=o.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(l,u)&&l.add(c)}}}stream(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof tQ||(r=t,t=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:a,walkFilter:u}=r,l=new Fji({objectMode:!0});(!a||a(t))&&l.write(i?t:t.fullpath());let d=new Set,s=[t],o=0,c=()=>{let b=!1;for(;!b;){let g=s.shift();if(!g){o===0&&l.end();return}o++,d.add(g);let O=(w,E,q=!1)=>{if(w)return l.emit("error",w);if(n&&!q){let A=[];for(let D of E)D.isSymbolicLink()&&A.push(D.realpath().then(C=>C?.isUnknown()?C.lstat():C));if(A.length){Promise.all(A).then(()=>O(null,E,!0));return}}for(let A of E)A&&(!a||a(A))&&(l.write(i?A:A.fullpath())||(b=!0));o--;for(let A of E){let D=A.realpathCached()||A;D.shouldWalk(d,u)&&s.push(D)}b&&!l.flowing?l.once("drain",c):m||c()},m=!0;g.readdirCB(O,!0),m=!1}};return c(),l}streamSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof tQ||(r=t,t=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:a,walkFilter:u}=r,l=new Fji({objectMode:!0}),d=new Set;(!a||a(t))&&l.write(i?t:t.fullpath());let s=[t],o=0,c=()=>{let b=!1;for(;!b;){let g=s.shift();if(!g){o===0&&l.end();return}o++,d.add(g);let O=g.readdirSync();for(let m of O)(!a||a(m))&&(l.write(i?m:m.fullpath())||(b=!0));o--;for(let m of O){let w=m;if(m.isSymbolicLink()){if(!(n&&(w=m.realpathSync())))continue;w.isUnknown()&&w.lstatSync()}w.shouldWalk(d,u)&&s.push(w)}}b&&!l.flowing&&l.once("drain",c)};return c(),l}chdir(t=this.cwd){let r=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[dmd](r)}},MBn=class extends Kgo{sep="\\";constructor(t=process.cwd(),r={}){let{nocase:i=!0}=r;super(t,EBn.win32,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(t){return EBn.win32.parse(t).root.toUpperCase()}newRoot(t){return new Qgo(this.rootPath,cXt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},ABn=class extends Kgo{sep="/";constructor(t=process.cwd(),r={}){let{nocase:i=!1}=r;super(t,EBn.posix,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(t){return"/"}newRoot(t){return new Jgo(this.rootPath,cXt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},Bja=class extends ABn{constructor(t=process.cwd(),r={}){let{nocase:i=!0}=r;super(t,{...r,nocase:i})}},hk6=process.platform==="win32"?Qgo:Jgo,pmd=process.platform==="win32"?MBn:process.platform==="darwin"?Bja:ABn;var V$1=e=>e.length>=1,W$1=e=>e.length>=1,qBn=class e{#e;#t;#r;length;#n;#i;#a;#o;#s;#f;#u=!0;constructor(t,r,i,n){if(!V$1(t))throw new TypeError("empty pattern list");if(!W$1(r))throw new TypeError("empty glob list");if(r.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=t,this.#t=r,this.#r=i,this.#n=n,this.#r===0){if(this.isUNC()){let[a,u,l,d,...s]=this.#e,[o,c,b,g,...O]=this.#t;s[0]===""&&(s.shift(),O.shift());let m=[a,u,l,d,""].join("/"),w=[o,c,b,g,""].join("/");this.#e=[m,...s],this.#t=[w,...O],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[a,...u]=this.#e,[l,...d]=this.#t;u[0]===""&&(u.shift(),d.shift());let s=a+"/",o=l+"/";this.#e=[s,...u],this.#t=[o,...d],this.length=this.#e.length}}}pattern(){return this.#e[this.#r]}isString(){return typeof this.#e[this.#r]=="string"}isGlobstar(){return this.#e[this.#r]===GV}isRegExp(){return this.#e[this.#r]instanceof RegExp}globString(){return this.#a=this.#a||(this.#r===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#r).join("/"))}hasMore(){return this.length>this.#r+1}rest(){return this.#i!==void 0?this.#i:this.hasMore()?(this.#i=new e(this.#e,this.#t,this.#r+1,this.#n),this.#i.#f=this.#f,this.#i.#s=this.#s,this.#i.#o=this.#o,this.#i):this.#i=null}isUNC(){let t=this.#e;return this.#s!==void 0?this.#s:this.#s=this.#n==="win32"&&this.#r===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#e;return this.#o!==void 0?this.#o:this.#o=this.#n==="win32"&&this.#r===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#e;return this.#f!==void 0?this.#f:this.#f=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#e[0];return typeof t=="string"&&this.isAbsolute()&&this.#r===0?t:""}checkFollowGlobstar(){return!(this.#r===0||!this.isGlobstar()||!this.#u)}markFollowGlobstar(){return this.#r===0||!this.isGlobstar()||!this.#u?!1:(this.#u=!1,!0)}};var H$1=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",TBn=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:r,nocase:i,noext:n,noglobstar:a,platform:u=H$1}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=u,this.mmopts={dot:!0,nobrace:r,nocase:i,noext:n,noglobstar:a,optimizationLevel:2,platform:u,nocomment:!0,nonegate:!0};for(let l of t)this.add(l)}add(t){let r=new sEe(t,this.mmopts);for(let i=0;i<r.set.length;i++){let n=r.set[i],a=r.globParts[i];if(!n||!a)throw new Error("invalid pattern object");for(;n[0]==="."&&a[0]===".";)n.shift(),a.shift();let u=new qBn(n,a,0,this.platform),l=new sEe(u.globString(),this.mmopts),d=a[a.length-1]==="**",s=u.isAbsolute();s?this.absolute.push(l):this.relative.push(l),d&&(s?this.absoluteChildren.push(l):this.relativeChildren.push(l))}}ignored(t){let r=t.fullpath(),i=`${r}/`,n=t.relative()||".",a=`${n}/`;for(let u of this.relative)if(u.match(n)||u.match(a))return!0;for(let u of this.absolute)if(u.match(r)||u.match(i))return!0;return!1}childrenIgnored(t){let r=t.fullpath()+"/",i=(t.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(i))return!0;for(let n of this.absoluteChildren)if(n.match(r))return!0;return!1}};var $xs=class e{store;constructor(t=new Map){this.store=t}copy(){return new e(new Map(this.store))}hasWalked(t,r){return this.store.get(t.fullpath())?.has(r.globString())}storeWalked(t,r){let i=t.fullpath(),n=this.store.get(i);n?n.add(r.globString()):this.store.set(i,new Set([r.globString()]))}},Gxs=class{store=new Map;add(t,r,i){let n=(r?2:0)|(i?1:0),a=this.store.get(t);this.store.set(t,a===void 0?n:n&a)}entries(){return[...this.store.entries()].map(([t,r])=>[t,!!(r&2),!!(r&1)])}},Qxs=class{store=new Map;add(t,r){if(!t.canReaddir())return;let i=this.store.get(t);i?i.find(n=>n.globString()===r.globString())||i.push(r):this.store.set(t,[r])}get(t){let r=this.store.get(t);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Ija=class e{hasWalkedCache;matches=new Gxs;subwalks=new Qxs;patterns;follow;dot;opts;constructor(t,r){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=r?r.copy():new $xs}processPatterns(t,r){this.patterns=r;let i=r.map(n=>[t,n]);for(let[n,a]of i){this.hasWalkedCache.storeWalked(n,a);let u=a.root(),l=a.isAbsolute()&&this.opts.absolute!==!1;if(u){n=n.resolve(u==="/"&&this.opts.root!==void 0?this.opts.root:u);let c=a.rest();if(c)a=c;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let d,s,o=!1;for(;typeof(d=a.pattern())=="string"&&(s=a.rest());)n=n.resolve(d),a=s,o=!0;if(d=a.pattern(),s=a.rest(),o){if(this.hasWalkedCache.hasWalked(n,a))continue;this.hasWalkedCache.storeWalked(n,a)}if(typeof d=="string"){let c=d===".."||d===""||d===".";this.matches.add(n.resolve(d),l,c);continue}else if(d===GV){(!n.isSymbolicLink()||this.follow||a.checkFollowGlobstar())&&this.subwalks.add(n,a);let c=s?.pattern(),b=s?.rest();if(!s||(c===""||c===".")&&!b)this.matches.add(n,l,c===""||c===".");else if(c===".."){let g=n.parent||n;b?this.hasWalkedCache.hasWalked(g,b)||this.subwalks.add(g,b):this.matches.add(g,l,!0)}}else d instanceof RegExp&&this.subwalks.add(n,a)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(t,r){let i=this.subwalks.get(t),n=this.child();for(let a of r)for(let u of i){let l=u.isAbsolute(),d=u.pattern(),s=u.rest();d===GV?n.testGlobstar(a,u,s,l):d instanceof RegExp?n.testRegExp(a,d,s,l):n.testString(a,d,s,l)}return n}testGlobstar(t,r,i,n){if((this.dot||!t.name.startsWith("."))&&(r.hasMore()||this.matches.add(t,n,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,r):t.isSymbolicLink()&&(i&&r.checkFollowGlobstar()?this.subwalks.add(t,i):r.markFollowGlobstar()&&this.subwalks.add(t,r)))),i){let a=i.pattern();if(typeof a=="string"&&a!==".."&&a!==""&&a!==".")this.testString(t,a,i.rest(),n);else if(a===".."){let u=t.parent||t;this.subwalks.add(u,i)}else a instanceof RegExp&&this.testRegExp(t,a,i.rest(),n)}}testRegExp(t,r,i,n){r.test(t.name)&&(i?this.subwalks.add(t,i):this.matches.add(t,n,!1))}testString(t,r,i,n){t.isNamed(r)&&(i?this.subwalks.add(t,i):this.matches.add(t,n,!1))}};var $$1=(e,t)=>typeof e=="string"?new TBn([e],t):Array.isArray(e)?new TBn(e,t):e,Ygo=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#r;signal;maxDepth;includeChildMatches;constructor(t,r,i){if(this.patterns=t,this.path=r,this.opts=i,this.#r=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#t=$$1(i.ignore??[],i),!this.includeChildMatches&&typeof this.#t.add!="function")){let n="cannot ignore child matches, ignore lacks add() method.";throw new Error(n)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#n(t){return this.seen.has(t)||!!this.#t?.ignored?.(t)}#i(t){return!!this.#t?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#e.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#e.push(t):t())}async matchCheck(t,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=t.realpathCached()||await t.realpath(),!i)return;t=i}let a=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&a?.isSymbolicLink()){let u=await a.realpath();u&&(u.isUnknown()||this.opts.stat)&&await u.lstat()}return this.matchCheckTest(a,r)}matchCheckTest(t,r){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!r||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#n(t)?t:void 0}matchCheckSync(t,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=t.realpathCached()||t.realpathSync(),!i)return;t=i}let a=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&a?.isSymbolicLink()){let u=a.realpathSync();u&&(u?.isUnknown()||this.opts.stat)&&u.lstatSync()}return this.matchCheckTest(a,r)}matchFinish(t,r){if(this.#n(t))return;if(!this.includeChildMatches&&this.#t?.add){let a=`${t.relativePosix()}/**`;this.#t.add(a)}let i=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(t);let n=this.opts.mark&&t.isDirectory()?this.#r:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(i){let a=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(a+n)}else{let a=this.opts.posix?t.relativePosix():t.relative(),u=this.opts.dotRelative&&!a.startsWith(".."+this.#r)?"."+this.#r:"";this.matchEmit(a?u+a+n:"."+n)}}async match(t,r,i){let n=await this.matchCheck(t,i);n&&this.matchFinish(n,r)}matchSync(t,r,i){let n=this.matchCheckSync(t,i);n&&this.matchFinish(n,r)}walkCB(t,r,i){this.signal?.aborted&&i(),this.walkCB2(t,r,new Ija(this.opts),i)}walkCB2(t,r,i,n){if(this.#i(t))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(t,r,i,n));return}i.processPatterns(t,r);let a=1,u=()=>{--a===0&&n()};for(let[l,d,s]of i.matches.entries())this.#n(l)||(a++,this.match(l,d,s).then(()=>u()));for(let l of i.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;a++;let d=l.readdirCached();l.calledReaddir()?this.walkCB3(l,d,i,u):l.readdirCB((s,o)=>this.walkCB3(l,o,i,u),!0)}u()}walkCB3(t,r,i,n){i=i.filterEntries(t,r);let a=1,u=()=>{--a===0&&n()};for(let[l,d,s]of i.matches.entries())this.#n(l)||(a++,this.match(l,d,s).then(()=>u()));for(let[l,d]of i.subwalks.entries())a++,this.walkCB2(l,d,i.child(),u);u()}walkCBSync(t,r,i){this.signal?.aborted&&i(),this.walkCB2Sync(t,r,new Ija(this.opts),i)}walkCB2Sync(t,r,i,n){if(this.#i(t))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(t,r,i,n));return}i.processPatterns(t,r);let a=1,u=()=>{--a===0&&n()};for(let[l,d,s]of i.matches.entries())this.#n(l)||this.matchSync(l,d,s);for(let l of i.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;a++;let d=l.readdirSync();this.walkCB3Sync(l,d,i,u)}u()}walkCB3Sync(t,r,i,n){i=i.filterEntries(t,r);let a=1,u=()=>{--a===0&&n()};for(let[l,d,s]of i.matches.entries())this.#n(l)||this.matchSync(l,d,s);for(let[l,d]of i.subwalks.entries())a++,this.walkCB2Sync(l,d,i.child(),u);u()}},zja=class extends Ygo{matches=new Set;constructor(t,r,i){super(t,r,i)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},xja=class extends Ygo{results;constructor(t,r,i){super(t,r,i),this.results=new Fji({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var G$1=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",aVt=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,_md.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.includeChildMatches=r.includeChildMatches!==!1,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(d=>d.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(d=>d.includes("/")?d:`./**/${d}`)}if(this.pattern=t,this.platform=r.platform||G$1,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let d=r.platform==="win32"?MBn:r.platform==="darwin"?Bja:r.platform?ABn:pmd;this.scurry=new d(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",n={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},a=this.pattern.map(d=>new sEe(d,n)),[u,l]=a.reduce((d,s)=>(d[0].push(...s.set),d[1].push(...s.globParts),d),[[],[]]);this.patterns=u.map((d,s)=>{let o=l[s];if(!o)throw new Error("invalid pattern object");return new qBn(d,o,0,this.platform)})}async walk(){return[...await new zja(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new zja(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new xja(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new xja(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var Jxs=(e,t={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new sEe(r,t).hasMagic())return!0;return!1};function Xgo(e,t={}){return new aVt(e,t).streamSync()}function ymd(e,t={}){return new aVt(e,t).stream()}function vmd(e,t={}){return new aVt(e,t).walkSync()}async function hmd(e,t={}){return new aVt(e,t).walk()}function Zgo(e,t={}){return new aVt(e,t).iterateSync()}function bmd(e,t={}){return new aVt(e,t).iterate()}var Q$1=Xgo,J$1=Object.assign(ymd,{sync:Xgo}),K$1=Zgo,Y$1=Object.assign(bmd,{sync:Zgo}),X$1=Object.assign(vmd,{stream:Xgo,iterate:Zgo}),eA=Object.assign(hmd,{glob:hmd,globSync:vmd,sync:X$1,globStream:ymd,stream:J$1,globStreamSync:Xgo,streamSync:Q$1,globIterate:bmd,iterate:Y$1,globIterateSync:Zgo,iterateSync:K$1,Glob:aVt,hasMagic:Jxs,escape:PBn,unescape:rVt});eA.glob=eA;async function Oxe(e,t){let r=(i,n)=>i.localeCompare(n,"en");return(await eA(`**/*.${t}`,{cwd:e,absolute:!0})).sort(r).map(hl.of)}var kgo=require("fs/promises");async function oVt({src:e,dest:t}){let r=await uXt(e);await gmd({src:e,dest:t,contents:r})}async function gmd({src:e,dest:t,contents:r}){for(let i of r)if(i.type==="file"){let n=Lu(e,Ua.of(i.name)),a=Lu(t,Ua.of(i.name)),u=Td(a);await mf(u)||await(0,kgo.mkdir)(u,{recursive:!0}),await(0,kgo.rename)(n,a)}else await gmd({src:Lu(e,Ua.of(i.name)),dest:Lu(t,Ua.of(i.name)),contents:i.contents})}var Omd=ai(require("path"),1);function zq(e,t){return Ua.of(Omd.default.relative(e,t))}var mmd=ai(require("path"),1);function zie(e,t){return Ua.of(mmd.default.relative(e,t))}var Pmd=ai(require("path"),1);function Gv(...e){return Pmd.default.resolve(...e.map(uEe))}var Smd=require("fs");var wmd=require("stream");function KX(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Kxs,Yxs,Z$1=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,k$1={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function eG1(e){return typeof e.read=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"&&typeof e.pipe=="function"&&typeof e.once=="function"&&typeof e.removeListener=="function"}var QV;(function(e){e[e.Array=0]="Array",e[e.Object=1]="Object",e[e.ReadableString=2]="ReadableString",e[e.ReadableObject=3]="ReadableObject",e[e.Primitive=4]="Primitive",e[e.Promise=5]="Promise"})(QV||(QV={}));function tG1(e){return e?typeof e.then=="function"?QV.Promise:eG1(e)?e._readableState.objectMode?QV.ReadableObject:QV.ReadableString:Array.isArray(e)?QV.Array:typeof e=="object"||e instanceof Object?QV.Object:QV.Primitive:QV.Primitive}function Zxs(e){return e.replace(Z$1,t=>{let r=k$1[t];return typeof r=="string"?r:`\\u${t.charCodeAt(0).toString(16).padStart(4,"0")}`})}var CBn;if(((Kxs=global)===null||Kxs===void 0||(Yxs=Kxs.JSON)===null||Yxs===void 0?void 0:Yxs.stringify)instanceof Function)try{if(JSON.stringify(global.BigInt?global.BigInt("123"):"")!=="123")throw new Error;CBn=JSON.stringify}catch{CBn=t=>typeof t=="bigint"?String(t):JSON.stringify(t)}else CBn=e=>{switch(typeof e){case"string":return`"${Zxs(e)}"`;case"number":return Number.isFinite(e)?String(e):"null";case"bigint":return String(e);case"boolean":return e?"true":"false";case"object":if(!e)return"null";default:throw Object.assign(new Error(`Not a primitive "${typeof e}".`),{value:e})}};var Xxs=new Map;function jmd(e){let t=e.length<1e4;if(t&&Xxs.has(e))return Xxs.get(e);let r=CBn(String(e));return t&&Xxs.set(e,r),r}function kxs(e,t){var r;let i=e.read(t);return i===null&&!(e.readableEnded||(r=e._readableState)!==null&&r!==void 0&&r.ended)?new Promise((n,a)=>{let u=()=>n(null);e.once("end",u),e.once("error",a),e.once("readable",()=>{e.removeListener("end",u),e.removeListener("error",a),kxs(e,t).then(n,a)})}):Promise.resolve(i)}var mxe;(function(e){e[e.Inactive=0]="Inactive",e[e.Reading=1]="Reading",e[e.ReadMore=2]="ReadMore",e[e.Consumed=3]="Consumed"})(mxe||(mxe={}));var eOo=class extends wmd.Readable{constructor(t,r,i,n=!1,a=512){super({encoding:"utf8"}),KX(this,"cycle",void 0),KX(this,"bufferSize",void 0),KX(this,"item",void 0),KX(this,"indent",void 0),KX(this,"root",void 0),KX(this,"include",void 0),KX(this,"replacer",void 0),KX(this,"visited",void 0),KX(this,"objectItem",void 0),KX(this,"buffer",""),KX(this,"bufferLength",0),KX(this,"pushCalled",!1),KX(this,"readSize",0),KX(this,"prePush",void 0),KX(this,"readState",mxe.Inactive),this.cycle=n,this.bufferSize=a;let u=typeof i;u==="number"?this.indent=" ".repeat(i):u==="string"&&(this.indent=i);let l=typeof r;l==="object"?this.include=r:l==="function"&&(this.replacer=r),this.visited=n?new WeakMap:[],this.root={value:{"":t},depth:0,indent:"",path:[]},this.setItem(t,this.root,"")}setItem(t,r,i=""){t&&typeof t=="object"&&typeof t.toJSON=="function"&&(t=t.toJSON(i)),this.replacer&&(t=this.replacer.call(r.value,i,t)),(t instanceof Function||typeof t=="symbol")&&(t=void 0);let n=tG1(t),a;if(!this.cycle&&n!==QV.Primitive){if(this.visited.some(u=>u===t)){this.destroy(Object.assign(new Error("Converting circular structure to JSON"),{value:t,key:i}));return}this.visited.push(t)}else if(this.cycle&&n!==QV.Primitive){if(a=this.visited.get(t),a){this._push(`{"$ref":"$${a.map(u=>`[${Number.isInteger(u)?u:Zxs(jmd(u))}]`).join("")}"}`),this.item=r;return}a=r===this.root?[]:r.path.concat(i),this.visited.set(t,a)}if(n===QV.Object)this.setObjectItem(t,r);else if(n===QV.Array)this.setArrayItem(t,r);else if(n===QV.Primitive){r!==this.root&&typeof i=="string"?t===void 0||this._push(CBn(t)):t===void 0&&typeof i=="number"?this._push("null"):t===void 0||this._push(CBn(t)),this.item=r;return}else n===QV.Promise?this.setPromiseItem(t,r,i):n===QV.ReadableString?this.setReadableStringItem(t,r):n===QV.ReadableObject&&this.setReadableObjectItem(t,r);this.item.value=t,this.item.depth=r.depth+1,this.indent&&(this.item.indent=this.indent.repeat(this.item.depth)),this.item.path=a}setReadableStringItem(t,r){var i,n;t.readableEnded||(i=t._readableState)!==null&&i!==void 0&&i.endEmitted?this.emit("error",new Error("Readable Stream has ended before it was serialized. All stream data have been lost"),t,r.path):(t.readableFlowing||(n=t._readableState)!==null&&n!==void 0&&n.flowing)&&(t.pause(),this.emit("error",new Error("Readable Stream is in flowing mode, data may have been lost. Trying to pause stream."),t,r.path));let a=this;this.prePush='"',this.item={type:"readable string",async read(u){try{let l=await kxs(t,u);if(l===null){a._push('"'),a.item=r,a.unvisit(t);return}l&&a._push(Zxs(l.toString()))}catch(l){a.emit("error",l),a.destroy()}}}}setReadableObjectItem(t,r){var i,n;t.readableEnded||(i=t._readableState)!==null&&i!==void 0&&i.endEmitted?this.emit("error",new Error("Readable Stream has ended before it was serialized. All stream data have been lost"),t,r.path):(t.readableFlowing||(n=t._readableState)!==null&&n!==void 0&&n.flowing)&&(t.pause(),this.emit("error",new Error("Readable Stream is in flowing mode, data may have been lost. Trying to pause stream."),t,r.path));let a=this;this._push("[");let u=!0,l=0,d={type:"readable object",async read(){try{let s="",o=await kxs(t);if(o===null){l&&a.indent&&(s+=`
|
|
1638
1638
|
${r.indent}`),s+="]",a._push(s),a.item=r,a.unvisit(t);return}u?u=!1:s+=",",a.indent&&(s+=`
|
|
@@ -1674,7 +1674,7 @@ ${c.indent}`:""}${jmd(o)}:${l.indent?" ":""}`;return u=!1,s=!0,l.objectItem=void
|
|
|
1674
1674
|
`:""}var MJ1=EJ1,AJ1={dump:MJ1};function ERs(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 qJ1=JV,TJ1=fPd,CJ1=hPd,BJ1=OPd,IJ1=mPd,zJ1=jRs,xJ1=NPd.load,RJ1=NPd.loadAll,sOo=AJ1.dump,Wja=XX,NJ1={binary:DPd,float:gPd,map:_Pd,null:yPd,pairs:MPd,set:APd,timestamp:wPd,bool:vPd,int:bPd,merge:SPd,omap:EPd,seq:pPd,str:dPd},FJ1=ERs("safeLoad","load"),LJ1=ERs("safeLoadAll","loadAll"),UJ1=ERs("safeDump","dump"),VJ1={Type:qJ1,Schema:TJ1,FAILSAFE_SCHEMA:CJ1,JSON_SCHEMA:BJ1,CORE_SCHEMA:IJ1,DEFAULT_SCHEMA:zJ1,load:xJ1,loadAll:RJ1,dump:sOo,YAMLException:Wja,types:NJ1,safeLoad:FJ1,safeLoadAll:LJ1,safeDump:UJ1},md=VJ1;var YPd=du.object({dependencies:du.record(du.string(),du.string())});async function ZPd({absolutePathToWorkspace:e,context:t}){let r=Lu(e,Ua.of(A0d));if(!await mf(r))return;let i=await(0,XPd.readFile)(r),n=md.load(i.toString());return await Ivo({schema:YPd,value:n,context:t,filepathBeingParsed:r})}async function MRs({absolutePathToWorkspace:e,context:t}){let r=await ZPd({absolutePathToWorkspace:e,context:t});return Qmd({absolutePathToWorkspace:e,rawDependenciesConfiguration:r,context:t})}function cOo(e){"@babel/helpers - typeof";return cOo=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},cOo(e)}var WJ1=/^\s+/,HJ1=/\s+$/;function w_(e,t){if(e=e||"",t=t||{},e instanceof w_)return e;if(!(this instanceof w_))return new w_(e,t);var r=$J1(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}w_.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=ajd(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=ejd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=ejd(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=kPd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=kPd(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 tjd(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return KJ1(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(ex(this._r,255)*100)+"%",g:Math.round(ex(this._g,255)*100)+"%",b:Math.round(ex(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ex(this._r,255)*100)+"%, "+Math.round(ex(this._g,255)*100)+"%, "+Math.round(ex(this._b,255)*100)+"%)":"rgba("+Math.round(ex(this._r,255)*100)+"%, "+Math.round(ex(this._g,255)*100)+"%, "+Math.round(ex(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:uK1[tjd(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+rjd(this._r,this._g,this._b,this._a),i=r,n=this._gradientType?"GradientType = 1, ":"";if(t){var a=w_(t);i="#"+rjd(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 w_(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(kJ1,arguments)},brighten:function(){return this._applyModification(eK1,arguments)},darken:function(){return this._applyModification(tK1,arguments)},desaturate:function(){return this._applyModification(YJ1,arguments)},saturate:function(){return this._applyModification(XJ1,arguments)},greyscale:function(){return this._applyModification(ZJ1,arguments)},spin:function(){return this._applyModification(rK1,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(aK1,arguments)},complement:function(){return this._applyCombination(iK1,arguments)},monochromatic:function(){return this._applyCombination(oK1,arguments)},splitcomplement:function(){return this._applyCombination(nK1,arguments)},triad:function(){return this._applyCombination(ijd,[3])},tetrad:function(){return this._applyCombination(ijd,[4])}};w_.fromRatio=function(e,t){if(cOo(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=Hja(e[i]));e=r}return w_(e,t)};function $J1(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=fK1(e)),cOo(e)=="object"&&(Jci(e.r)&&Jci(e.g)&&Jci(e.b)?(t=GJ1(e.r,e.g,e.b),u=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Jci(e.h)&&Jci(e.s)&&Jci(e.v)?(i=Hja(e.s),n=Hja(e.v),t=JJ1(e.h,i,n),u=!0,l="hsv"):Jci(e.h)&&Jci(e.s)&&Jci(e.l)&&(i=Hja(e.s),a=Hja(e.l),t=QJ1(e.h,i,a),u=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=ajd(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 GJ1(e,t,r){return{r:ex(e,255)*255,g:ex(t,255)*255,b:ex(r,255)*255}}function kPd(e,t,r){e=ex(e,255),t=ex(t,255),r=ex(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 QJ1(e,t,r){var i,n,a;e=ex(e,360),t=ex(t,100),r=ex(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 ejd(e,t,r){e=ex(e,255),t=ex(t,255),r=ex(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 JJ1(e,t,r){e=ex(e,360)*6,t=ex(t,100),r=ex(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 tjd(e,t,r,i){var n=[cVt(Math.round(e).toString(16)),cVt(Math.round(t).toString(16)),cVt(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 KJ1(e,t,r,i,n){var a=[cVt(Math.round(e).toString(16)),cVt(Math.round(t).toString(16)),cVt(Math.round(r).toString(16)),cVt(ojd(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 rjd(e,t,r,i){var n=[cVt(ojd(i)),cVt(Math.round(e).toString(16)),cVt(Math.round(t).toString(16)),cVt(Math.round(r).toString(16))];return n.join("")}w_.equals=function(e,t){return!e||!t?!1:w_(e).toRgbString()==w_(t).toRgbString()};w_.random=function(){return w_.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function YJ1(e,t){t=t===0?0:t||10;var r=w_(e).toHsl();return r.s-=t/100,r.s=lOo(r.s),w_(r)}function XJ1(e,t){t=t===0?0:t||10;var r=w_(e).toHsl();return r.s+=t/100,r.s=lOo(r.s),w_(r)}function ZJ1(e){return w_(e).desaturate(100)}function kJ1(e,t){t=t===0?0:t||10;var r=w_(e).toHsl();return r.l+=t/100,r.l=lOo(r.l),w_(r)}function eK1(e,t){t=t===0?0:t||10;var r=w_(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)))),w_(r)}function tK1(e,t){t=t===0?0:t||10;var r=w_(e).toHsl();return r.l-=t/100,r.l=lOo(r.l),w_(r)}function rK1(e,t){var r=w_(e).toHsl(),i=(r.h+t)%360;return r.h=i<0?360+i:i,w_(r)}function iK1(e){var t=w_(e).toHsl();return t.h=(t.h+180)%360,w_(t)}function ijd(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=w_(e).toHsl(),i=[w_(e)],n=360/t,a=1;a<t;a++)i.push(w_({h:(r.h+a*n)%360,s:r.s,l:r.l}));return i}function nK1(e){var t=w_(e).toHsl(),r=t.h;return[w_(e),w_({h:(r+72)%360,s:t.s,l:t.l}),w_({h:(r+216)%360,s:t.s,l:t.l})]}function aK1(e,t,r){t=t||6,r=r||30;var i=w_(e).toHsl(),n=360/r,a=[w_(e)];for(i.h=(i.h-(n*t>>1)+720)%360;--t;)i.h=(i.h+n)%360,a.push(w_(i));return a}function oK1(e,t){t=t||6;for(var r=w_(e).toHsv(),i=r.h,n=r.s,a=r.v,u=[],l=1/t;t--;)u.push(w_({h:i,s:n,v:a})),a=(a+l)%1;return u}w_.mix=function(e,t,r){r=r===0?0:r||50;var i=w_(e).toRgb(),n=w_(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 w_(u)};w_.readability=function(e,t){var r=w_(e),i=w_(t);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};w_.isReadable=function(e,t,r){var i=w_.readability(e,t),n,a;switch(a=!1,n=dK1(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};w_.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=w_.readability(e,t[s]),a>n&&(n=a,i=w_(t[s]));return w_.isReadable(e,i,{level:l,size:d})||!u?i:(r.includeFallbackColors=!1,w_.mostReadable(e,["#fff","#000"],r))};var ARs=w_.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"},uK1=w_.hexNames=sK1(ARs);function sK1(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function ajd(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ex(e,t){cK1(e)&&(e="100%");var r=lK1(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 lOo(e){return Math.min(1,Math.max(0,e))}function dEe(e){return parseInt(e,16)}function cK1(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function lK1(e){return typeof e=="string"&&e.indexOf("%")!=-1}function cVt(e){return e.length==1?"0"+e:""+e}function Hja(e){return e<=1&&(e=e*100+"%"),e}function ojd(e){return Math.round(parseFloat(e)*255).toString(16)}function njd(e){return dEe(e)/255}var sVt=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 Jci(e){return!!sVt.CSS_UNIT.exec(e)}function fK1(e){e=e.replace(WJ1,"").replace(HJ1,"").toLowerCase();var t=!1;if(ARs[e])e=ARs[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=sVt.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=sVt.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=sVt.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=sVt.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=sVt.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=sVt.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=sVt.hex8.exec(e))?{r:dEe(r[1]),g:dEe(r[2]),b:dEe(r[3]),a:njd(r[4]),format:t?"name":"hex8"}:(r=sVt.hex6.exec(e))?{r:dEe(r[1]),g:dEe(r[2]),b:dEe(r[3]),format:t?"name":"hex"}:(r=sVt.hex4.exec(e))?{r:dEe(r[1]+""+r[1]),g:dEe(r[2]+""+r[2]),b:dEe(r[3]+""+r[3]),a:njd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=sVt.hex3.exec(e))?{r:dEe(r[1]+""+r[1]),g:dEe(r[2]+""+r[2]),b:dEe(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function dK1(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 ujd(e={accentPrimary:void 0,background:void 0},t){e.accentPrimary=e.accentPrimary??e.accentPrimaryDeprecated;let r=dOo(e);switch(r){case"dark":return{type:"dark",...fOo(e,t,"dark")};case"light":return{type:"light",...fOo(e,t,"light")};case"darkAndLight":return{type:"darkAndLight",dark:fOo(e,t,"dark"),light:fOo(e,t,"light")};default:jo(r)}}function dOo({background:e,accentPrimary:t,accentPrimaryDeprecated:r}){if(t=t??r,typeof e=="string"&&typeof t=="string")return w_(e).isDark()?"dark":"light";if(e!=null){if(typeof e=="string")return w_(e).isDark()?"dark":"light";if(e.dark!=null&&e.light!=null)return"darkAndLight"}if(t!=null){if(typeof t=="string")return w_(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 fOo(e,t,r){let i=FBn(e.accentPrimary??e.accentPrimaryDeprecated,t,"accent-primary",r)??w_.random(),n=FBn(e.background,t,"background",r);return{accentPrimary:i.toRgb(),background:n?.toRgb(),border:FBn(e.border,t,"border",r)?.toRgb(),sidebarBackground:FBn(e.sidebarBackground,t,"sidebar-background",r)?.toRgb(),headerBackground:FBn(e.headerBackground,t,"header-background",r)?.toRgb(),cardBackground:FBn(e.cardBackground,t,"card-background",r)?.toRgb(),logo:void 0,backgroundImage:void 0}}function $ja(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 FBn(e,t,r,i){let n=$ja(e,r,i);if(n==null)return;let a=w_(n);return a.isValid()||t.failAndThrow(`'${typeof e=="string"?r:`colors.${r}.${i}`}' should be a hex color of the format #FFFFFF`),a}var kPo=require("fs/promises");var eW=ai(AEe(),1);var uKd=require("fs/promises");var oKd=100;async function xuS({files:e,absolutePathToFernFolder:t}){let r=await Promise.all(e.map(async i=>{let n=await(0,uKd.readFile)(i,"utf-8");return[zie(t,i),n]}));return Object.fromEntries(r)}async function sKd({files:e,absolutePathToFernFolder:t}){let r={};for(let i=0;i<e.length;i+=oKd){let n=e.slice(i,i+oKd),a=await xuS({files:n,absolutePathToFernFolder:t});Object.assign(r,a)}return r}function YPo({landingPage:e,navigation:t}){return axe([e?.absolutePath,...RuS(t)])}function RuS(e){switch(e.type){case"tabbed":return e.items.flatMap(t=>t.child.type==="layout"?t.child.layout.flatMap(r=>B7s({item:r})):t.child.type==="changelog"?t.child.changelog:[]);case"untabbed":return e.items.flatMap(t=>B7s({item:t}));case"versioned":return e.versions.flatMap(t=>YPo({landingPage:t.landingPage,navigation:t.navigation}));case"productgroup":return e.products.flatMap(t=>YPo({landingPage:t.landingPage,navigation:t.navigation}));default:jo(e)}}function B7s({item:e}){switch(e.type){case"apiSection":return axe([e.overviewAbsolutePath,...e.navigation.flatMap(t=>cKd({item:t}))]);case"link":return[];case"page":return[e.absolutePath];case"section":return axe([e.overviewAbsolutePath,...e.contents.flatMap(t=>B7s({item:t}))]);case"changelog":return e.changelog;default:jo(e)}}function cKd({item:e}){return e.type==="page"?[e.absolutePath]:e.type==="package"||e.type==="section"?axe([e.overviewAbsolutePath,...e.contents.flatMap(t=>cKd({item:t}))]):[]}async function R7s({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:A,layout:D,analytics:C,integrations:x,css:$,js:I,aiChat:L,aiSearch:V,experimental:K}=e,Y=Awa(e.landingPage,r),Z=$uS({tabs:u,products:l,versions:d,navigation:s,absolutePathToFernFolder:t,absolutePathToConfig:r,context:i}),oe=Z.then(jt=>sKd({files:YPo({navigation:jt,landingPage:Y}),absolutePathToFernFolder:t})),_e=NuS(m,r),de=S2(w,r),Oe=FuS(E,r),Ue=A!=null?GuS({rawTypography:A,absoluteFilepathToDocsConfig:r}):void 0,wt=LuS($,r),De=WuS(I,r),Te=usS(g,r),[xt,Pe,ot,at,me,we]=await Promise.all([Z,oe,Ue,wt,De,Te]);return{title:a,instances:n,roles:e.roles,pages:Pe,landingPage:Y,navigation:xt,navbarLinks:asS(o),footerLinks:osS(c),defaultLanguage:b,announcement:e.announcement,metadata:we,redirects:O?.map(jt=>({...jt,permanent:jt?.permanent})),logo:_e,favicon:de,backgroundImage:Oe,colors:ujd(q,i),typography:ot,layout:HuS(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:{...x,intercom:x?.intercom?x.intercom:void 0},css:at,js:me,aiChatConfig:V??L,experimental:K}}function NuS(e,t){return e!=null?{dark:S2(e.dark,t),light:S2(e.light,t),height:e.height,href:e.href!=null?eW.FernRegistry.Url(e.href):void 0}:void 0}function FuS(e,t){if(e!=null)if(typeof e=="string"){let r=S2(e,t);return{dark:r,light:r}}else{let r=S2(e.dark,t),i=S2(e.light,t);return{dark:r,light:i}}}async function LuS(e,t){if(e==null)return;let r=typeof e=="string"?[e]:e;return{inline:await Promise.all(r.map(async i=>(await(0,kPo.readFile)(S2(i,t))).toString()))}}function UuS(e){return Object.hasOwn(e,"url")}function VuS(e){return Object.hasOwn(e,"path")}async function WuS(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:S2(a,t)}):UuS(a)?r.push({strategy:a.strategy,url:eW.FernRegistry.Url(a.url)}):VuS(a)&&i.push({absolutePath:S2(a.path,t),strategy:a.strategy});return{remote:r,files:i}}function HuS(e){if(e!=null)return{pageWidth:e.pageWidth?.trim().toLowerCase()==="full"?{type:"full"}:XPo(e.pageWidth),contentWidth:XPo(e.contentWidth),sidebarWidth:XPo(e.sidebarWidth),headerHeight:XPo(e.headerHeight),searchbarPlacement:e.searchbarPlacement==="header"?eW.FernRegistry.docs.v1.commons.SearchbarPlacement.Header:e.searchbarPlacement==="header-tabs"?eW.FernRegistry.docs.v1.commons.SearchbarPlacement.HeaderTabs:eW.FernRegistry.docs.v1.commons.SearchbarPlacement.Sidebar,tabsPlacement:e.tabsPlacement==="header"?eW.FernRegistry.docs.v1.commons.TabsPlacement.Header:eW.FernRegistry.docs.v1.commons.TabsPlacement.Sidebar,contentAlignment:e.contentAlignment==="left"?eW.FernRegistry.docs.v1.commons.ContentAlignment.Left:eW.FernRegistry.docs.v1.commons.ContentAlignment.Center,headerPosition:e.headerPosition==="static"?eW.FernRegistry.docs.v1.commons.HeaderPosition.Absolute:eW.FernRegistry.docs.v1.commons.HeaderPosition.Fixed,disableHeader:e.disableHeader??!1}}function XPo(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 lKd({versions:e,absolutePathToFernFolder:t,context:r}){let i=[];for(let n of e){let a=Gv(t,n.path),u=md.load((await(0,kPo.readFile)(a)).toString()),l=Iie.RawSchemas.Serializer.VersionFileConfig.parseOrThrow(u),d=await x7s({tabs:l.tabs,rawNavigationConfig:l.navigation,absolutePathToFernFolder:t,absolutePathToConfig:a,context:r});i.push({landingPage:Awa(l.landingPage,a),version:n.displayName,navigation:d,availability:n.availability,slug:n.slug,viewers:OVt(n.viewers),orphaned:n.orphaned,featureFlags:gVt(n.featureFlag)})}return{type:"versioned",versions:i}}async function $uS({tabs:e,products:t,versions:r,navigation:i,absolutePathToFernFolder:n,absolutePathToConfig:a,context:u}){if(i!=null)return await x7s({tabs:e,rawNavigationConfig:i,absolutePathToFernFolder:n,absolutePathToConfig:a,context:u});if(t!=null){let l=[];for(let d of t){let s=Gv(n,d.path),o=d.image!=null?Gv(n,d.image):void 0,c=md.load((await(0,kPo.readFile)(s)).toString()),b=Iie.RawSchemas.Serializer.ProductFileConfig.parseOrThrow(c),g;d.versions!=null&&d.versions.length>0?g=await lKd({versions:d.versions,absolutePathToFernFolder:n,context:u}):g=await x7s({tabs:b.tabs,rawNavigationConfig:b.navigation,absolutePathToFernFolder:n,absolutePathToConfig:s,context:u}),l.push({landingPage:Awa(b.landingPage,s),product:d.displayName,navigation:g,slug:d.slug,subtitle:d.subtitle,icon:d.icon||"fa-solid fa-code",image:o})}return{type:"productgroup",products:l}}else if(r!=null)return await lKd({versions:r,absolutePathToFernFolder:n,context:u});throw new Error("Unexpected. Docs have neither navigation or versions defined.")}function gVt(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 GuS({rawTypography:e,absoluteFilepathToDocsConfig:t}){return{headingsFont:e.headingsFont!=null?await I7s({rawFontConfig:e.headingsFont,absoluteFilepathToDocsConfig:t}):void 0,bodyFont:e.bodyFont!=null?await I7s({rawFontConfig:e.bodyFont,absoluteFilepathToDocsConfig:t}):void 0,codeFont:e.codeFont!=null?await I7s({rawFontConfig:e.codeFont,absoluteFilepathToDocsConfig:t}):void 0}}async function I7s({rawFontConfig:e,absoluteFilepathToDocsConfig:t}){return{name:e.name,variants:await QuS(e,t),display:e.display,fallback:e.fallback,fontVariationSettings:e.fontVariationSettings}}function QuS(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:S2(i.path,t),weight:JuS(i.weight),style:i.style})))}function JuS(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 KuS({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=>N7s({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:OVt(a.viewers),orphaned:a.orphaned,featureFlags:gVt(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:OVt(a.viewers),orphaned:a.orphaned,featureFlags:gVt(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 Oxe(S2(a.changelog,i),"{md,mdx}")},viewers:OVt(a.viewers),orphaned:a.orphaned,featureFlags:gVt(a.featureFlag)};jo(a)}async function x7s({tabs:e={},rawNavigationConfig:t,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n}){return nsS(t)?{type:"tabbed",items:await Promise.all(t.map(u=>KuS({tabs:e,item:u,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n})))}:{type:"untabbed",items:await Promise.all(t.map(a=>N7s({rawConfig:a,absolutePathToFernFolder:r,absolutePathToConfig:i,context:n})))}}var YuS="Changelog";async function N7s({rawConfig:e,absolutePathToFernFolder:t,absolutePathToConfig:r,context:i}){if(fKd(e))return Awa(e,r);if(ZuS(e))return{type:"section",title:e.section,icon:e.icon,contents:await Promise.all(e.contents.map(n=>N7s({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:S2(e.path,r),viewers:OVt(e.viewers),orphaned:e.orphaned,featureFlags:gVt(e.featureFlag)};if(kuS(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?XuS({rawConfig:e.snippets}):void 0,navigation:e.layout?.flatMap(n=>ZPo(n,r))??[],overviewAbsolutePath:S2(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:OVt(e.viewers),orphaned:e.orphaned,featureFlags:gVt(e.featureFlag)};if(dKd(e))return{type:"link",text:e.link,url:e.href,icon:e.icon};if(esS(e))return{type:"changelog",changelog:await Oxe(S2(e.changelog,r),"{md,mdx}"),hidden:e.hidden??!1,icon:e.icon,title:e.title??YuS,slug:e.slug,viewers:OVt(e.viewers),orphaned:e.orphaned,featureFlags:gVt(e.featureFlag)};jo(e)}function Awa(e,t){if(e!=null)return{type:"page",title:e.page,absolutePath:S2(e.path,t),slug:e.slug,icon:e.icon,hidden:e.hidden,noindex:e.noindex,viewers:OVt(e.viewers),orphaned:e.orphaned,featureFlags:gVt(e.featureFlag)}}function ZPo(e,t){return typeof e=="string"?[{type:"item",value:e}]:fKd(e)?[Awa(e,t)]:dKd(e)?[{type:"link",text:e.link,url:e.href,icon:e.icon}]:tsS(e)?[{type:"section",title:e.section,referencedSubpackages:e.referencedPackages??[],overviewAbsolutePath:S2(e.summary,t),contents:e.contents?.flatMap(r=>ZPo(r,t))??[],slug:e.slug,hidden:e.hidden,skipUrlSlug:e.skipSlug,icon:e.icon,playground:e.playground,viewers:OVt(e.viewers),orphaned:e.orphaned,featureFlags:gVt(e.featureFlag)}]:rsS(e)?[{type:"endpoint",endpoint:e.endpoint,title:e.title,icon:e.icon,slug:e.slug,hidden:e.hidden,playground:e.playground,viewers:OVt(e.viewers),orphaned:e.orphaned,featureFlags:gVt(e.featureFlag)}]:Object.entries(e).map(([r,i])=>isS(i)?{type:"package",title:i.title,package:r,overviewAbsolutePath:S2(i.summary,t),contents:i.contents?.flatMap(n=>ZPo(n,t))??[],slug:i.slug,hidden:i.hidden,skipUrlSlug:i.skipSlug,icon:i.icon,playground:i.playground,viewers:OVt(i.viewers),orphaned:i.orphaned,featureFlags:gVt(i.featureFlag)}:{type:"package",title:void 0,package:r,overviewAbsolutePath:void 0,contents:i.flatMap(n=>ZPo(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 XuS({rawConfig:e}){return{python:e.python,typescript:e.typescript,go:e.go,java:e.java,ruby:e.ruby,csharp:e.csharp}}function fKd(e){return Qj(e)&&typeof e.page=="string"&&typeof e.path=="string"}function ZuS(e){return e.section!=null}function kuS(e){return e.api!=null}function dKd(e){return Iie.RawSchemas,Qj(e)&&typeof e.link=="string"&&typeof e.href=="string"}function esS(e){return Qj(e)&&typeof e.changelog=="string"}function tsS(e){return Qj(e)&&typeof e.section=="string"&&Array.isArray(e.contents)}function rsS(e){return Qj(e)&&typeof e.endpoint=="string"}function isS(e){return!Array.isArray(e)}function S2(e,t){if(e!=null)return Gv(Td(t),e)}function nsS(e){return Array.isArray(e)&&e.length>0&&e[0].tab!=null}function asS(e){return e?.map(t=>t.type==="github"?{type:"github",url:eW.FernRegistry.Url(t.value)}:{type:t.type,text:t.text,url:eW.FernRegistry.Url(t.href??t.url??"/"),icon:t.icon,rightIcon:t.rightIcon,rounded:t.rounded})}function osS(e){if(e==null)return;let t=[];if(Object.keys(e).forEach(r=>{let i=e[r];i!=null&&t.push({type:r,value:eW.FernRegistry.Url(i)})}),t.length!==0)return t}async function usS(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 z7s(e.ogImage,t),"og:image:width":e.ogImageWidth,"og:image:height":e.ogImageHeight,"og:locale":e.ogLocale,"og:logo":await z7s(e.ogLogo,t),"twitter:title":e.twitterTitle,"twitter:description":e.twitterDescription,"twitter:image":await z7s(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 z7s(e,t){if(e==null)return;if(e.startsWith("http"))return{type:"url",value:e};let r=S2(e,t);return await mf(r)?{type:"filepath",value:r}:{type:"url",value:e}}function OVt(e){if(e!=null){if(typeof e=="string")return[eW.FernRegistry.RoleId(e)];if(e.length!==0)return e.map(eW.FernRegistry.RoleId)}}var _Kd=require("fs/promises");var pKd=du.strictObject({organization:du.string(),version:du.string()});async function lli({directory:e,context:t}){let r=Lu(e,Ua.of(Tie)),i=await(0,_Kd.readFile)(r),n=JSON.parse(i.toString()),a=await Ivo({schema:pKd,value:n,context:t,filepathBeingParsed:r});return{_absolutePath:r,rawConfig:a,organization:a.organization,version:a.version}}var qwa={[Q.JAVA]:{version:"1.0.5"},[Q.TYPESCRIPT_EXPRESS]:{version:"0.17.3",output:{location:"local-file-system",path:"../src/fern"}},[Q.JAVA_MODEL]:{version:"0.9.2"},[Q.JAVA_SDK]:{version:"1.0.5"},[Q.JAVA_SPRING]:{version:"0.9.2",output:{location:"local-file-system",path:"../src/main/java/com/fern"},config:{"package-prefix":"com.fern"}},[Q.TYPESCRIPT]:{version:"0.39.3"},[Q.TYPESCRIPT_SDK]:{version:"0.39.3"},[Q.TYPESCRIPT_NODE_SDK]:{version:"0.49.1",output:{location:"local-file-system",path:"../sdks/typescript"}},[Q.TYPESCRIPT_BROWSER_SDK]:{version:"0.39.3",output:{location:"local-file-system",path:"../sdks/typescript"}},[Q.PYTHON_PYDANTIC]:{version:"1.4.3"},[Q.PYTHON_FASTAPI]:{version:"1.4.6",output:{location:"local-file-system",path:"../src/fern"}},[Q.PYTHON_SDK]:{version:"3.10.6",output:{location:"local-file-system",path:"../sdks/python"}},[Q.GO_FIBER]:{version:"0.23.0"},[Q.GO_MODEL]:{version:"0.23.0"},[Q.GO_SDK]:{version:"0.23.0",output:{location:"local-file-system",path:"../sdks/go"},config:{importPath:"go-mod-path/generated/go"}},[Q.RUBY_MODEL]:{version:"0.0.8"},[Q.RUBY_SDK]:{version:"0.8.2",output:{location:"local-file-system",path:"../sdks/ruby"}},[Q.OPENAPI]:{version:"0.0.31",config:{format:"yaml"},output:{location:"local-file-system",path:"../openapi"}},[Q.STOPLIGHT]:{version:"0.0.24",config:{format:"yaml"}},[Q.POSTMAN]:{version:"0.1.1",output:{location:"local-file-system",path:"../postman"}},[Q.OPENAPI_PYTHON_CLIENT]:{version:"0.0.11",output:{location:"local-file-system",path:"../sdks/python"},config:{format:"yaml"}},[Q.CSHARP_MODEL]:{version:"0.0.2"},[Q.CSHARP_SDK]:{version:"1.2.1",output:{location:"local-file-system",path:"../sdks/csharp"}},[Q.SWIFT_MODEL]:{version:"0.0.0"},[Q.SWIFT_SDK]:{version:"0.0.0",output:{location:"local-file-system",path:"../sdks/swift/sdk"}},[Q.PHP_MODEL]:{version:"0.0.0"},[Q.PHP_SDK]:{version:"0.1.0",output:{location:"local-file-system",path:"../sdks/php/sdk"}}};function Twi(e,t){let r=ssS(e);return r??t.failAndThrow("Unrecognized generator: "+e)}function ssS(e){if(e.startsWith("fernapi/")||(e=`fernapi/${e}`),csS(e))return e}function csS(e){return Object.values(Q).includes(e)}var Vrp=ai(Cwi(),1),Uwo=ai(c1a(),1);async function kZt({generatorName:e,cliVersion:t,channel:r,currentGeneratorVersion:i,includeMajor:n,context:a}){let u=Vrp.default.parse(i),l=new Uwo.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:RmS(e,a),releaseTypes:[r??Uwo.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 RmS(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";default:return t?.logger.warn(`Unrecognized generator name found, attempting to parse manually: ${e}`),e.startsWith("fern-")?e.replace("fern-",""):e}}async function Wrp({generatorsConfiguration:e,groupName:t=e[by.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 G4s({generatorName:e,generatorsConfiguration:t,groupName:r=t[Uvo],context:i,cliVersion:n}){let a=Twi(e,i),u=qwa[a];return await Wrp({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 kZt({cliVersion:n,generatorName:a,context:i,channel:void 0})??u.version})}})}var ypp=require("fs/promises");var vpp=ai(require("path"),1);var spp=require("fs/promises"),cpp=ai(require("path"),1);var ekt="$";var BN={};Dn(BN,{AvailabilityStatusSchema:()=>$rp,FernDefinitionError:()=>p1a,FernDefinitionTimeoutError:()=>_1a,FormDataBodyEncodingStyle:()=>tip,HttpMethodSchema:()=>eip,ObjectPropertyAccess:()=>nip,StreamFormat:()=>rip,SupportedSdkLanguageSchema:()=>Yrp,WebSocketOrigin:()=>cip,WebhookMethodSchema:()=>sip,auth:()=>Hrp,availability:()=>Q4s,commons:()=>Grp,encoding:()=>Qrp,environments:()=>Jrp,errors:()=>Krp,examples:()=>J4s,file:()=>Xrp,pagination:()=>Zrp,products:()=>krp,serialization:()=>m2s,service:()=>K4s,source:()=>iip,types:()=>Y4s,validation:()=>aip,variables:()=>oip,versioning:()=>uip,webhooks:()=>X4s,websocket:()=>Z4s});var Hrp={};var Q4s={};Dn(Q4s,{AvailabilityStatusSchema:()=>$rp});var $rp={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available"};var Grp={};var Qrp={};var Jrp={};var Krp={};var J4s={};Dn(J4s,{SupportedSdkLanguageSchema:()=>Yrp});var Yrp={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 Xrp={};var Zrp={};var krp={};var K4s={};Dn(K4s,{FormDataBodyEncodingStyle:()=>tip,HttpMethodSchema:()=>eip,StreamFormat:()=>rip});var eip={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"};var tip={Json:"json",Exploded:"exploded",Form:"form"};var rip={Sse:"sse",Json:"json"};var iip={};var Y4s={};Dn(Y4s,{ObjectPropertyAccess:()=>nip});var nip={ReadOnly:"read-only",WriteOnly:"write-only"};var aip={};var oip={};var uip={};var X4s={};Dn(X4s,{WebhookMethodSchema:()=>sip});var sip={Post:"POST",Get:"GET"};var Z4s={};Dn(Z4s,{WebSocketOrigin:()=>cip});var cip={Client:"client",Server:"server"};var m2s={};Dn(m2s,{AliasSchema:()=>Z1o,AnyAuthItem:()=>Gwo,AnyAuthSchemesSchema:()=>Qwo,ApiAuthSchema:()=>Jwo,AuthSchemeDeclarationSchema:()=>a1o,AuthSchemeReferenceSchema:()=>kIn,AuthVariable:()=>aWi,AvailabilitySchema:()=>u1o,AvailabilityStatusSchema:()=>tzn,AvailabilityUnionSchema:()=>s1o,BaseTypeDeclarationSchema:()=>Xxe,BaseTypeReferenceSchema:()=>azn,BasicAuthSchemeSchema:()=>i1o,BearerAuthSchemeSchema:()=>n1o,CasingOverridesSchema:()=>R1o,CursorPaginationSchema:()=>PSo,CustomPaginationSchema:()=>wSo,DeclarationSchema:()=>tkt,DeclarationWithNameSchema:()=>Rip,DeclarationWithoutDocsSchema:()=>d1o,DefinitionFileSchema:()=>FSo,DiscriminatedUnionSchema:()=>J1o,EncodingSchema:()=>rzn,EnumSchema:()=>L1o,EnumValue:()=>F1o,EnumValueSchema:()=>N1o,EnvironmentSchema:()=>y1o,ErrorDeclarationSchema:()=>g1o,ErrorDiscriminationSchema:()=>GSo,ExampleBodyResponseSchema:()=>P1o,ExampleCodeSampleSchema:()=>q1o,ExampleCodeSampleSchemaLanguage:()=>A1o,ExampleCodeSampleSchemaSdk:()=>M1o,ExampleEndpointCallArraySchema:()=>Nip,ExampleEndpointCallSchema:()=>nzn,ExampleResponseSchema:()=>D1o,ExampleSseEventSchema:()=>w1o,ExampleSseResponseSchema:()=>S1o,ExampleStreamResponseSchema:()=>j1o,ExampleTypeReferenceSchema:()=>M2,ExampleTypeSchema:()=>izn,ExampleTypeValueSchema:()=>b1o,ExampleWebSocketMessage:()=>O1o,ExampleWebSocketSession:()=>m1o,ExampleWebhookCallSchema:()=>T1o,Export:()=>VSo,ExportDetailed:()=>USo,FormDataBodyEncodingStyle:()=>uSo,GrpcTransport:()=>eSo,HeaderAuthSchemeSchema:()=>r1o,HttpEndpointSchema:()=>DSo,HttpHeaderSchema:()=>Zxe,HttpInlineFileRequestBodyPropertySchema:()=>sSo,HttpInlineRequestBodyPropertySchema:()=>cSo,HttpInlineRequestBodySchema:()=>lSo,HttpMethodSchema:()=>tSo,HttpPathParameterSchema:()=>rkt,HttpQueryParameterSchema:()=>uzn,HttpReferencedRequestBodySchema:()=>oSo,HttpRequest:()=>pSo,HttpRequestBodySchema:()=>fSo,HttpRequestSchema:()=>dSo,HttpResponseSchema:()=>hSo,HttpResponseSchemaDetailed:()=>_So,HttpResponseStreamSchema:()=>bSo,HttpResponseStreamSchemaDetailed:()=>vSo,HttpServiceSchema:()=>ESo,MultipleBaseUrlsEnvironmentSchema:()=>h1o,Navigation:()=>LSo,NumberValidationSchema:()=>l1o,OAuthAccessTokenRequestPropertiesSchema:()=>Kwo,OAuthAccessTokenResponsePropertiesSchema:()=>Ywo,OAuthGetTokenEndpointSchema:()=>Xwo,OAuthRefreshTokenEndpointSchema:()=>e1o,OAuthRefreshTokenRequestPropertiesSchema:()=>Zwo,OAuthRefreshTokenResponsePropertiesSchema:()=>kwo,OAuthSchemeSchema:()=>t1o,ObjectExtendsSchema:()=>Kxe,ObjectPropertyAccess:()=>C1o,ObjectPropertySchema:()=>t1i,ObjectPropertyWithAccessSchema:()=>B1o,ObjectSchema:()=>x1o,OffsetPaginationSchema:()=>jSo,OpenApiSourceSchema:()=>I1o,PackageMarkerFileSchema:()=>Fip,Pagination:()=>SSo,PaginationSchema:()=>szn,ProductDeclarationHeaderObjectSchema:()=>tDo,ProductDeclarationHeaderSchema:()=>rDo,ProductDeclarationSchema:()=>iDo,ProductValue:()=>eDo,ProductValueDetailed:()=>kSo,PropertyBasedErrorDiscrimination:()=>HSo,ProtobufSourceSchema:()=>z1o,ProtobufTypeSchema:()=>p1o,QueryParameterTypeReferenceDetailed:()=>iSo,ResponseError:()=>OSo,ResponseErrorWithDocsSchema:()=>gSo,ResponseErrorsSchema:()=>mSo,RootApiFileSchema:()=>Lip,ServiceTransport:()=>ozn,SingleBaseUrlEnvironmentSchema:()=>_1o,SingleUndiscriminatedUnionTypeDetailedSchema:()=>K1o,SingleUndiscriminatedUnionTypeSchema:()=>Y1o,SingleUnionTypeDetailedSchema:()=>G1o,SingleUnionTypeKey:()=>$1o,SingleUnionTypeKeySchema:()=>H1o,SingleUnionTypeSchema:()=>Q1o,SourceSchema:()=>r1i,StatusCodeBasedErrorDiscrimination:()=>$So,StreamFormat:()=>ySo,StringValidationSchema:()=>c1o,SupportedSdkLanguageSchema:()=>E1o,TypeDeclarationSchema:()=>k1o,TypeReferenceDeclarationWithEnvOverride:()=>aSo,TypeReferenceDeclarationWithEnvOverrideSchema:()=>nSo,TypeReferenceDeclarationWithName:()=>Yxe,TypeReferenceDeclarationWithNameSchema:()=>Uip,TypeReferenceDetailedSchema:()=>W1o,TypeReferenceSchema:()=>yli,UndiscriminatedUnionSchema:()=>X1o,UnionDiscriminant:()=>V1o,UnionDiscriminantSchema:()=>U1o,ValidationSchema:()=>e1i,VariableDeclarationDetailed:()=>QSo,VariableDeclarationSchema:()=>JSo,VariableReferenceSchema:()=>rSo,VersionDeclarationHeaderObjectSchema:()=>XSo,VersionDeclarationHeaderSchema:()=>ZSo,VersionDeclarationSchema:()=>czn,VersionValue:()=>YSo,VersionValueDetailed:()=>KSo,WebSocketChannelInlinedMessageSchema:()=>zSo,WebSocketChannelMessageBodySchema:()=>xSo,WebSocketChannelMessageSchema:()=>RSo,WebSocketChannelReferencedMessageSchema:()=>ISo,WebSocketChannelSchema:()=>NSo,WebSocketOrigin:()=>BSo,WebhookInlinedPayloadSchema:()=>qSo,WebhookMethodSchema:()=>MSo,WebhookPayloadSchema:()=>TSo,WebhookReferencedPayloadSchema:()=>ASo,WebhookSchema:()=>CSo,WithAudiences:()=>O9,WithAuthSchema:()=>o1o,WithAvailability:()=>hQ,WithDisplayName:()=>g9,WithDocsSchema:()=>f_,WithEnvironmentVariable:()=>ezn,WithEnvironmentsSchema:()=>v1o,WithHeadersSchema:()=>WSo,WithName:()=>F1,WithValidation:()=>f1o,auth:()=>i2s,availability:()=>n2s,commons:()=>a2s,encoding:()=>o2s,environments:()=>u2s,errors:()=>s2s,examples:()=>c2s,file:()=>l2s,pagination:()=>f2s,products:()=>d2s,service:()=>p2s,source:()=>_2s,types:()=>h2s,validation:()=>y2s,variables:()=>v2s,versioning:()=>b2s,webhooks:()=>g2s,websocket:()=>O2s});var i2s={};Dn(i2s,{AnyAuthItem:()=>Gwo,AnyAuthSchemesSchema:()=>Qwo,ApiAuthSchema:()=>Jwo,AuthSchemeDeclarationSchema:()=>a1o,AuthSchemeReferenceSchema:()=>kIn,AuthVariable:()=>aWi,BasicAuthSchemeSchema:()=>i1o,BearerAuthSchemeSchema:()=>n1o,HeaderAuthSchemeSchema:()=>r1o,OAuthAccessTokenRequestPropertiesSchema:()=>Kwo,OAuthAccessTokenResponsePropertiesSchema:()=>Ywo,OAuthGetTokenEndpointSchema:()=>Xwo,OAuthRefreshTokenEndpointSchema:()=>e1o,OAuthRefreshTokenRequestPropertiesSchema:()=>Zwo,OAuthRefreshTokenResponsePropertiesSchema:()=>kwo,OAuthSchemeSchema:()=>t1o,WithAuthSchema:()=>o1o,WithEnvironmentVariable:()=>ezn});var Ar={};Dn(Ar,{JsonError:()=>YIn,ParseError:()=>XIn,any:()=>wip,bigint:()=>fip,boolean:()=>Sip,booleanLiteral:()=>jip,date:()=>dip,discriminant:()=>Iip,enum_:()=>Wwo,getObjectLikeUtils:()=>MVt,getObjectUtils:()=>nWi,getSchemaUtils:()=>Rq,isProperty:()=>kwi,lazy:()=>pip,lazyObject:()=>Oip,list:()=>$wo,number:()=>Dip,object:()=>Hwo,objectWithoutOptionalProperties:()=>gip,optional:()=>k4s,property:()=>hip,record:()=>qip,set:()=>Tip,string:()=>Eip,stringLiteral:()=>Pip,transform:()=>e2s,undiscriminatedUnion:()=>Bip,union:()=>xip,unknown:()=>Mip,withParsedProperties:()=>r2s});var wj={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 tA(e,t){return`Expected ${t}. Received ${NmS(e)}.`}function NmS(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 b9(e){return{...e,json:lip(e.json),parse:lip(e.parse)}}function lip(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(`
|
|
1675
1675
|
`)),{ok:!0,value:t}):i}}function Vwo(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var YIn=class e extends Error{errors;constructor(t){super(t.map(Vwo).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};var XIn=class e extends Error{errors;constructor(t){super(t.map(Vwo).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};function Rq(e){return{optional:()=>k4s(e),transform:t=>e2s(e,t),parseOrThrow:(t,r)=>{let i=e.parse(t,r);if(i.ok)return i.value;throw new XIn(i.errors)},jsonOrThrow:(t,r)=>{let i=e.json(t,r);if(i.ok)return i.value;throw new YIn(i.errors)}}}function k4s(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:()=>wj.OPTIONAL};return{...t,...Rq(t)}}function e2s(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,...Rq(r)}}function fip(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:tA(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:tA(t,"bigint")}]},getType:()=>wj.BIGINT};return{...b9(e),...Rq(e)}}var FmS=/^([+-]?\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 dip(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:tA(t,"string")}]}:FmS.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:tA(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:tA(t,"Date object")}]},getType:()=>wj.DATE};return{...b9(e),...Rq(e)}}function _Q(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...b9(r),...Rq(r)}}}function Wwo(e){let t=new Set(e);return _Q(wj.ENUM,(i,{allowUnrecognizedEnumValues:n,breadcrumbsPrefix:a=[]}={})=>typeof i!="string"?{ok:!1,errors:[{path:a,message:tA(i,"string")}]}:!t.has(i)&&!n?{ok:!1,errors:[{path:a,message:tA(i,"enum")}]}:{ok:!0,value:i})()}function pip(e){let t=t2s(e);return{...t,...Rq(t)}}function t2s(e){return{parse:(t,r)=>ZIn(e).parse(t,r),json:(t,r)=>ZIn(e).json(t,r),getType:()=>ZIn(e).getType()}}function ZIn(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}function l1a(e){return Object.entries(e)}function f1a(e,t){let r=new Set(t);return Object.entries(e).reduce((i,[n,a])=>(r.has(n)&&(i[n]=a),i),{})}function Zwi(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 d1a(e){return Object.keys(e)}function _ip(e,t){let r=[],i=[];for(let n of e)t(n)?r.push(n):i.push(n);return[r,i]}function MVt(e){return{withParsedProperties:t=>r2s(e,t)}}function r2s(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(!Zwi(i))return{ok:!1,errors:[{path:n?.breadcrumbsPrefix??[],message:tA(i,"object")}]};let a=new Set(Object.keys(t)),u=f1a(i,Object.keys(i).filter(l=>!a.has(l)));return e.json(u,n)},getType:()=>e.getType()};return{...r,...Rq(r),...MVt(r)}}function hip(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function kwi(e){return e.isProperty}function Hwo(e){let t={_getRawProperties:()=>Object.entries(e).map(([r,i])=>kwi(i)?i.rawKey:r),_getParsedProperties:()=>d1a(e),parse:(r,i)=>{let n={},a=[];for(let[u,l]of l1a(e)){let d=kwi(l)?l.rawKey:u,s=kwi(l)?l.valueSchema:l,o={rawKey:d,parsedKey:u,valueSchema:s};n[d]=o,bip(s)&&a.push(d)}return yip({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 l1a(e)){let l=kwi(u)?u.valueSchema:u;bip(l)&&n.push(a)}return yip({value:r,requiredKeys:n,getProperty:a=>{let u=e[a];if(u!=null)return kwi(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:()=>wj.OBJECT};return{...b9(t),...Rq(t),...MVt(t),...nWi(t)}}function yip({value:e,requiredKeys:t,getProperty:r,unrecognizedObjectKeys:i="fail",skipValidation:n=!1,breadcrumbsPrefix:a=[]}){if(!Zwi(e))return{ok:!1,errors:[{path:a,message:tA(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 nWi(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(i,n)=>vip({extensionKeys:t._getRawProperties(),value:i,transformBase:a=>e.parse(a,n),transformExtension:a=>t.parse(a,n)}),json:(i,n)=>vip({extensionKeys:t._getParsedProperties(),value:i,transformBase:a=>e.json(a,n),transformExtension:a=>t.json(a,n)}),getType:()=>wj.OBJECT};return{...r,...Rq(r),...MVt(r),...nWi(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:()=>wj.OBJECT};return{...t,...Rq(t),...MVt(t),...nWi(t)}}}}function vip({extensionKeys:e,value:t,transformBase:r,transformExtension:i}){let n=new Set(e),[a,u]=_ip(d1a(t),s=>n.has(s)),l=r(f1a(t,u)),d=i(f1a(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 bip(e){return!LmS(e)}function LmS(e){switch(e.getType()){case wj.ANY:case wj.UNKNOWN:case wj.OPTIONAL:return!0;default:return!1}}function gip(e){return Hwo(e)}function Oip(e){let t={...t2s(e),_getRawProperties:()=>ZIn(e)._getRawProperties(),_getParsedProperties:()=>ZIn(e)._getParsedProperties()};return{...t,...Rq(t),...MVt(t),...nWi(t)}}function $wo(e){let t={parse:(r,i)=>mip(r,(n,a)=>e.parse(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),json:(r,i)=>mip(r,(n,a)=>e.json(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),getType:()=>wj.LIST};return{...b9(t),...Rq(t)}}function mip(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:tA(e,"list"),path:[]}]}}function Pip(e){return _Q(wj.STRING_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:tA(r,`"${e}"`)}]})()}function jip(e){return _Q(wj.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:tA(r,`${e.toString()}`)}]})()}var wip=_Q(wj.ANY,e=>({ok:!0,value:e}));var Sip=_Q(wj.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:tA(e,"boolean")}]});var Dip=_Q(wj.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:tA(e,"number")}]});var Eip=_Q(wj.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:tA(e,"string")}]});var Mip=_Q(wj.UNKNOWN,e=>({ok:!0,value:e}));function qip(e,t){let r={parse:(i,n)=>Aip({value:i,isKeyNumeric:e.getType()===wj.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)=>Aip({value:i,isKeyNumeric:e.getType()===wj.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:()=>wj.RECORD};return{...b9(r),...Rq(r)}}function Aip({value:e,isKeyNumeric:t,transformKey:r,transformValue:i,breadcrumbsPrefix:n=[]}){return Zwi(e)?l1a(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:tA(e,"object")}]}}function Tip(e){let t=$wo(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:tA(i,"Set")}]},getType:()=>wj.SET};return{...b9(r),...Rq(r)}}function Bip(e){let t={parse:(r,i)=>Cip((n,a)=>n.parse(r,a),e,i),json:(r,i)=>Cip((n,a)=>n.json(r,a),e,i),getType:()=>wj.UNDISCRIMINATED_UNION};return{...b9(t),...Rq(t)}}function Cip(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 Iip(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}function xip(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,i=typeof e=="string"?e:e.parsedDiscriminant,n=Wwo(d1a(t)),a={parse:(u,l)=>zip({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)=>zip({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:()=>wj.UNION};return{...b9(a),...Rq(a),...MVt(a)}}function zip({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:i,getAdditionalPropertiesSchema:n,allowUnrecognizedUnionMembers:a=!1,transformAdditionalProperties:u,breadcrumbsPrefix:l=[]}){if(!Zwi(e))return{ok:!1,errors:[{path:l,message:tA(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 f_=Ar.object({docs:Ar.string().optional()});var kIn=Ar.object({scheme:Ar.string()}).extend(f_);var Gwo=Ar.undiscriminatedUnion([Ar.string(),kIn]);var Qwo=Ar.object({any:Ar.list(Gwo)}).extend(f_);var Jwo=Ar.undiscriminatedUnion([Ar.string(),kIn,Qwo]);var Kwo=Ar.object({"client-id":Ar.string().optional(),"client-secret":Ar.string().optional(),scopes:Ar.string().optional()});var Ywo=Ar.object({"access-token":Ar.string().optional(),"expires-in":Ar.string().optional(),"refresh-token":Ar.string().optional()});var Xwo=Ar.object({endpoint:Ar.string(),"request-properties":Kwo.optional(),"response-properties":Ywo.optional()});var Zwo=Ar.object({"refresh-token":Ar.string()});var kwo=Ar.object({"access-token":Ar.string().optional(),"expires-in":Ar.string().optional(),"refresh-token":Ar.string().optional()});var e1o=Ar.object({endpoint:Ar.string(),"request-properties":Zwo.optional(),"response-properties":kwo.optional()});var t1o=Ar.object({scheme:Ar.stringLiteral("oauth"),type:Ar.stringLiteral("client-credentials"),scopes:Ar.list(Ar.string()).optional(),"client-id-env":Ar.string().optional(),"client-secret-env":Ar.string().optional(),"token-prefix":Ar.string().optional(),"token-header":Ar.string().optional(),"get-token":Xwo,"refresh-token":e1o.optional()}).extend(f_);var ezn=Ar.object({env:Ar.string().optional()});var F1=Ar.object({name:Ar.string().optional()});var r1o=Ar.object({header:Ar.string(),type:Ar.string().optional(),prefix:Ar.string().optional()}).extend(ezn).extend(F1).extend(f_);var aWi=Ar.object({}).extend(ezn).extend(F1);var i1o=Ar.object({scheme:Ar.stringLiteral("basic"),username:aWi.optional(),password:aWi.optional()}).extend(f_);var n1o=Ar.object({scheme:Ar.stringLiteral("bearer"),token:aWi.optional()}).extend(f_);var a1o=Ar.undiscriminatedUnion([t1o,r1o,i1o,n1o]);var o1o=Ar.object({auth:Jwo.optional(),"auth-schemes":Ar.record(Ar.string(),a1o).optional()});var n2s={};Dn(n2s,{AvailabilitySchema:()=>u1o,AvailabilityStatusSchema:()=>tzn,AvailabilityUnionSchema:()=>s1o});var tzn=Ar.enum_(["in-development","pre-release","deprecated","generally-available"]);var u1o=Ar.object({status:tzn,message:Ar.string().optional()});var s1o=Ar.undiscriminatedUnion([tzn,u1o]);var a2s={};Dn(a2s,{DeclarationSchema:()=>tkt,DeclarationWithNameSchema:()=>Rip,DeclarationWithoutDocsSchema:()=>d1o,WithAudiences:()=>O9,WithAvailability:()=>hQ,WithDisplayName:()=>g9,WithDocsSchema:()=>f_,WithName:()=>F1,WithValidation:()=>f1o});var hQ=Ar.object({availability:s1o.optional()});var g9=Ar.object({"display-name":Ar.string().optional()});var c1o=Ar.object({minLength:Ar.number().optional(),maxLength:Ar.number().optional(),pattern:Ar.string().optional(),format:Ar.string().optional()});var l1o=Ar.object({min:Ar.number().optional(),max:Ar.number().optional(),exclusiveMin:Ar.boolean().optional(),exclusiveMax:Ar.boolean().optional(),multipleOf:Ar.number().optional()});var e1i=Ar.undiscriminatedUnion([c1o,l1o]);var f1o=Ar.object({validation:e1i.optional()});var O9=Ar.object({audiences:Ar.list(Ar.string()).optional()});var tkt=Ar.object({}).extend(f_).extend(hQ).extend(O9);var d1o=Ar.object({}).extend(hQ).extend(O9);var Rip=Ar.object({}).extend(tkt).extend(F1);var o2s={};Dn(o2s,{EncodingSchema:()=>rzn,ProtobufTypeSchema:()=>p1o});var p1o=Ar.object({type:Ar.string()});var rzn=Ar.object({proto:p1o.optional()});var u2s={};Dn(u2s,{EnvironmentSchema:()=>y1o,MultipleBaseUrlsEnvironmentSchema:()=>h1o,SingleBaseUrlEnvironmentSchema:()=>_1o,WithEnvironmentsSchema:()=>v1o});var _1o=Ar.object({url:Ar.string()}).extend(O9).extend(f_);var h1o=Ar.object({urls:Ar.record(Ar.string(),Ar.string())}).extend(O9).extend(f_);var y1o=Ar.undiscriminatedUnion([Ar.string(),_1o,h1o]);var v1o=Ar.object({"default-url":Ar.string().optional(),"default-environment":Ar.string().optional(),environments:Ar.record(Ar.string(),y1o).optional()});var s2s={};Dn(s2s,{ErrorDeclarationSchema:()=>g1o});var b1o=Ar.unknown();var izn=Ar.object({value:b1o}).extend(F1).extend(f_);var g1o=Ar.object({"status-code":Ar.number(),type:Ar.string().optional(),examples:Ar.list(izn).optional()}).extend(f_);var c2s={};Dn(c2s,{ExampleBodyResponseSchema:()=>P1o,ExampleCodeSampleSchema:()=>q1o,ExampleCodeSampleSchemaLanguage:()=>A1o,ExampleCodeSampleSchemaSdk:()=>M1o,ExampleEndpointCallArraySchema:()=>Nip,ExampleEndpointCallSchema:()=>nzn,ExampleResponseSchema:()=>D1o,ExampleSseEventSchema:()=>w1o,ExampleSseResponseSchema:()=>S1o,ExampleStreamResponseSchema:()=>j1o,ExampleTypeReferenceSchema:()=>M2,ExampleTypeSchema:()=>izn,ExampleTypeValueSchema:()=>b1o,ExampleWebSocketMessage:()=>O1o,ExampleWebSocketSession:()=>m1o,ExampleWebhookCallSchema:()=>T1o,SupportedSdkLanguageSchema:()=>E1o});var M2=Ar.unknown();var O1o=Ar.object({type:Ar.string(),body:Ar.unknown()});var m1o=Ar.object({"path-parameters":Ar.record(Ar.string(),M2).optional(),"query-parameters":Ar.record(Ar.string(),M2).optional(),headers:Ar.record(Ar.string(),M2).optional(),messages:Ar.list(O1o)}).extend(F1).extend(f_);var P1o=Ar.object({error:Ar.string().optional(),body:M2.optional()});var j1o=Ar.object({stream:Ar.list(M2)});var w1o=Ar.object({event:Ar.string(),data:M2.optional()});var S1o=Ar.object({stream:Ar.list(w1o)});var D1o=Ar.undiscriminatedUnion([P1o,j1o,S1o]);var E1o=Ar.enum_(["curl","python","javascript","typescript","go","ruby","csharp","java","js","node","ts","nodets","golang","dotnet","jvm","c#"]);var M1o=Ar.object({sdk:E1o,code:Ar.string()}).extend(f_).extend(F1);var A1o=Ar.object({language:Ar.string(),code:Ar.string(),install:Ar.string().optional()}).extend(f_).extend(F1);var q1o=Ar.undiscriminatedUnion([M1o,A1o]);var nzn=Ar.object({id:Ar.string().optional(),"path-parameters":Ar.record(Ar.string(),M2).optional(),"query-parameters":Ar.record(Ar.string(),M2).optional(),headers:Ar.record(Ar.string(),M2).optional(),request:M2.optional(),response:D1o.optional(),"code-samples":Ar.list(q1o).optional()}).extend(F1).extend(f_);var Nip=Ar.list(nzn);var T1o=Ar.object({id:Ar.string().optional(),payload:M2}).extend(F1).extend(f_);var l2s={};Dn(l2s,{DefinitionFileSchema:()=>FSo,ErrorDiscriminationSchema:()=>GSo,Export:()=>VSo,ExportDetailed:()=>USo,Navigation:()=>LSo,PackageMarkerFileSchema:()=>Fip,PropertyBasedErrorDiscrimination:()=>HSo,RootApiFileSchema:()=>Lip,StatusCodeBasedErrorDiscrimination:()=>$So,WithHeadersSchema:()=>WSo});var Kxe=Ar.undiscriminatedUnion([Ar.string(),Ar.list(Ar.string())]);var C1o=Ar.enum_(["read-only","write-only"]);var azn=Ar.object({default:Ar.unknown().optional(),encoding:rzn.optional(),validation:e1i.optional()}).extend(f_).extend(hQ);var Yxe=Ar.object({type:Ar.string()}).extend(azn).extend(F1).extend(O9);var B1o=Ar.object({access:C1o.optional()}).extend(Yxe);var t1i=Ar.undiscriminatedUnion([Ar.string(),B1o]);var I1o=Ar.object({openapi:Ar.string()});var z1o=Ar.object({proto:Ar.string()});var r1i=Ar.undiscriminatedUnion([I1o,z1o]);var Xxe=Ar.object({examples:Ar.list(izn).optional(),encoding:rzn.optional(),source:r1i.optional(),inline:Ar.boolean().optional()}).extend(f_).extend(hQ).extend(O9);var x1o=Ar.object({extends:Kxe.optional(),properties:Ar.record(Ar.string(),t1i).optional(),"extra-properties":Ar.boolean().optional()}).extend(Xxe);var R1o=Ar.object({camel:Ar.string().optional(),snake:Ar.string().optional(),pascal:Ar.string().optional(),"screaming-snake":Ar.string().optional()});var N1o=Ar.object({value:Ar.string(),casing:R1o.optional()}).extend(f_).extend(F1);var F1o=Ar.undiscriminatedUnion([Ar.string(),N1o]);var L1o=Ar.object({default:Ar.string().optional(),enum:Ar.list(F1o)}).extend(Xxe);var U1o=Ar.object({value:Ar.string()}).extend(F1);var V1o=Ar.undiscriminatedUnion([Ar.string(),U1o]);var W1o=Ar.object({type:Ar.string()}).extend(azn).extend(F1).extend(O9);var yli=Ar.undiscriminatedUnion([Ar.string(),W1o]);var H1o=Ar.object({value:Ar.string()}).extend(F1);var $1o=Ar.undiscriminatedUnion([Ar.string(),H1o]);var G1o=Ar.object({type:Ar.string().optional(),key:$1o.optional()}).extend(f_).extend(F1).extend(hQ).extend(g9);var Q1o=Ar.undiscriminatedUnion([Ar.string(),G1o]);var J1o=Ar.object({discriminant:V1o.optional(),extends:Kxe.optional(),"base-properties":Ar.record(Ar.string(),yli).optional(),union:Ar.record(Ar.string(),Q1o)}).extend(Xxe);var K1o=Ar.object({type:Ar.string()}).extend(f_).extend(g9).extend(f1o);var Y1o=Ar.undiscriminatedUnion([Ar.string(),K1o]);var X1o=Ar.object({discriminated:Ar.booleanLiteral(!1),union:Ar.list(Y1o)}).extend(Xxe);var Z1o=Ar.object({type:Ar.string(),validation:e1i.optional()}).extend(Xxe);var k1o=Ar.undiscriminatedUnion([Ar.string(),x1o,L1o,J1o,X1o,Z1o]);var eSo=Ar.object({"service-name":Ar.string()});var ozn=Ar.object({grpc:eSo.optional()});var tSo=Ar.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"]);var rSo=Ar.object({variable:Ar.string()}).extend(hQ).extend(f_);var rkt=Ar.undiscriminatedUnion([yli,rSo]);var iSo=Ar.object({"allow-multiple":Ar.boolean().optional()}).extend(Yxe);var uzn=Ar.undiscriminatedUnion([Ar.string(),iSo]);var nSo=Ar.object({env:Ar.string().optional()}).extend(Yxe);var aSo=Ar.undiscriminatedUnion([Ar.string(),nSo]);var Zxe=aSo;var oSo=Ar.object({type:Ar.string()}).extend(f_);var uSo=Ar.enum_(["json","exploded","form"]);var sSo=Ar.object({style:uSo.optional(),"content-type":Ar.string().optional()}).extend(Yxe);var cSo=Ar.undiscriminatedUnion([Ar.string(),sSo]);var lSo=Ar.object({extends:Kxe.optional(),"extra-properties":Ar.boolean().optional(),properties:Ar.record(Ar.string(),cSo).optional()});var fSo=Ar.undiscriminatedUnion([Ar.string(),oSo,lSo]);var dSo=Ar.object({"content-type":Ar.string().optional(),"path-parameters":Ar.record(Ar.string(),rkt).optional(),"query-parameters":Ar.record(Ar.string(),uzn).optional(),headers:Ar.record(Ar.string(),Zxe).optional(),body:fSo.optional()}).extend(F1).extend(f_);var pSo=Ar.undiscriminatedUnion([Ar.string(),dSo]);var _So=Ar.object({type:Ar.string().optional(),property:Ar.string().optional(),"status-code":Ar.number().optional()}).extend(f_);var hSo=Ar.undiscriminatedUnion([Ar.string(),_So]);var ySo=Ar.enum_(["sse","json"]);var vSo=Ar.object({type:Ar.string(),format:ySo.optional(),terminator:Ar.string().optional()}).extend(f_);var bSo=Ar.undiscriminatedUnion([Ar.string(),vSo]);var gSo=Ar.object({error:Ar.string()}).extend(f_);var OSo=Ar.undiscriminatedUnion([Ar.string(),gSo]);var mSo=Ar.list(OSo);var PSo=Ar.object({cursor:Ar.string(),next_cursor:Ar.string(),results:Ar.string()});var jSo=Ar.object({offset:Ar.string(),results:Ar.string(),step:Ar.string().optional(),"has-next-page":Ar.string().optional()});var wSo=Ar.object({type:Ar.stringLiteral("custom"),results:Ar.string()});var szn=Ar.undiscriminatedUnion([PSo,jSo,wSo]);var SSo=Ar.undiscriminatedUnion([szn,Ar.boolean()]);var DSo=Ar.object({method:tSo.optional(),"base-path":Ar.string().optional(),path:Ar.string(),url:Ar.string().optional(),"path-parameters":Ar.record(Ar.string(),rkt).optional(),auth:Ar.boolean().optional(),idempotent:Ar.boolean().optional(),"stream-condition":Ar.string().optional(),request:pSo.optional(),response:hSo.optional(),"response-stream":bSo.optional(),errors:mSo.optional(),examples:Ar.list(nzn).optional(),pagination:SSo.optional(),transport:ozn.optional(),source:r1i.optional()}).extend(g9).extend(tkt);var ESo=Ar.object({auth:Ar.boolean(),url:Ar.string().optional(),"base-path":Ar.string(),"path-parameters":Ar.record(Ar.string(),yli).optional(),idempotent:Ar.boolean().optional(),headers:Ar.record(Ar.string(),yli).optional(),transport:ozn.optional(),source:r1i.optional(),endpoints:Ar.record(Ar.string(),DSo)}).extend(d1o).extend(g9);var MSo=Ar.enum_(["POST","GET"]);var ASo=Ar.object({type:Ar.string()}).extend(f_);var qSo=Ar.object({name:Ar.string(),extends:Kxe.optional(),properties:Ar.record(Ar.string(),t1i).optional()});var TSo=Ar.undiscriminatedUnion([Ar.string(),ASo,qSo]);var CSo=Ar.object({method:MSo,headers:Ar.record(Ar.string(),Zxe).optional(),payload:TSo,examples:Ar.list(T1o).optional()}).extend(hQ).extend(O9).extend(f_).extend(g9);var BSo=Ar.enum_(["client","server"]);var ISo=Ar.object({type:Ar.string()}).extend(f_);var zSo=Ar.object({name:Ar.string(),extends:Kxe.optional(),properties:Ar.record(Ar.string(),t1i).optional()});var xSo=Ar.undiscriminatedUnion([Ar.string(),ISo,zSo]);var RSo=Ar.object({origin:BSo,body:xSo}).extend(tkt).extend(g9);var NSo=Ar.object({auth:Ar.boolean(),url:Ar.string().optional(),path:Ar.string(),headers:Ar.record(Ar.string(),Zxe).optional(),"path-parameters":Ar.record(Ar.string(),rkt).optional(),"query-parameters":Ar.record(Ar.string(),uzn).optional(),messages:Ar.record(Ar.string(),RSo).optional(),examples:Ar.list(m1o).optional()}).extend(tkt).extend(g9);var FSo=Ar.object({imports:Ar.record(Ar.string(),Ar.string()).optional(),types:Ar.record(Ar.string(),k1o).optional(),service:ESo.optional(),errors:Ar.record(Ar.string(),g1o).optional(),webhooks:Ar.record(Ar.string(),CSo).optional(),channel:NSo.optional()}).extend(f_);var LSo=Ar.undiscriminatedUnion([Ar.string(),Ar.list(Ar.string())]);var USo=Ar.object({dependency:Ar.string(),url:Ar.string().optional()});var VSo=Ar.undiscriminatedUnion([Ar.string(),USo]);var Fip=Ar.object({navigation:LSo.optional(),export:VSo.optional()}).extend(FSo);var WSo=Ar.object({headers:Ar.record(Ar.string(),Zxe).optional()});var HSo=Ar.object({strategy:Ar.stringLiteral("property"),"property-name":Ar.string()});var $So=Ar.object({strategy:Ar.stringLiteral("status-code")});var GSo=Ar.undiscriminatedUnion([HSo,$So]);var QSo=Ar.object({type:Ar.string()}).extend(f_);var JSo=Ar.undiscriminatedUnion([Ar.string(),QSo]);var KSo=Ar.object({value:Ar.string()}).extend(f_).extend(F1);var YSo=Ar.undiscriminatedUnion([Ar.string(),KSo]);var XSo=Ar.object({name:Ar.string().optional(),env:Ar.string().optional(),value:Ar.string()});var ZSo=Ar.undiscriminatedUnion([Ar.string(),XSo]);var czn=Ar.object({default:Ar.string().optional(),values:Ar.list(YSo),header:ZSo});var kSo=Ar.object({value:Ar.string(),versions:czn.optional()}).extend(f_).extend(F1);var eDo=Ar.undiscriminatedUnion([Ar.string(),kSo]);var tDo=Ar.object({name:Ar.string().optional(),env:Ar.string().optional(),value:Ar.string()});var rDo=Ar.undiscriminatedUnion([Ar.string(),tDo]);var iDo=Ar.object({default:Ar.string().optional(),values:Ar.list(eDo),header:rDo});var Lip=Ar.object({name:Ar.string(),imports:Ar.record(Ar.string(),Ar.string()).optional(),"error-discrimination":GSo.optional(),audiences:Ar.list(Ar.string()).optional(),errors:Ar.list(Ar.string()).optional(),"base-path":Ar.string().optional(),"path-parameters":Ar.record(Ar.string(),rkt).optional(),"idempotency-headers":Ar.record(Ar.string(),Zxe).optional(),variables:Ar.record(Ar.string(),JSo).optional(),pagination:szn.optional(),product:iDo.optional(),version:czn.optional()}).extend(f_).extend(g9).extend(v1o).extend(o1o).extend(WSo);var f2s={};Dn(f2s,{CursorPaginationSchema:()=>PSo,CustomPaginationSchema:()=>wSo,OffsetPaginationSchema:()=>jSo,PaginationSchema:()=>szn});var d2s={};Dn(d2s,{ProductDeclarationHeaderObjectSchema:()=>tDo,ProductDeclarationHeaderSchema:()=>rDo,ProductDeclarationSchema:()=>iDo,ProductValue:()=>eDo,ProductValueDetailed:()=>kSo});var p2s={};Dn(p2s,{FormDataBodyEncodingStyle:()=>uSo,GrpcTransport:()=>eSo,HttpEndpointSchema:()=>DSo,HttpHeaderSchema:()=>Zxe,HttpInlineFileRequestBodyPropertySchema:()=>sSo,HttpInlineRequestBodyPropertySchema:()=>cSo,HttpInlineRequestBodySchema:()=>lSo,HttpMethodSchema:()=>tSo,HttpPathParameterSchema:()=>rkt,HttpQueryParameterSchema:()=>uzn,HttpReferencedRequestBodySchema:()=>oSo,HttpRequest:()=>pSo,HttpRequestBodySchema:()=>fSo,HttpRequestSchema:()=>dSo,HttpResponseSchema:()=>hSo,HttpResponseSchemaDetailed:()=>_So,HttpResponseStreamSchema:()=>bSo,HttpResponseStreamSchemaDetailed:()=>vSo,HttpServiceSchema:()=>ESo,Pagination:()=>SSo,QueryParameterTypeReferenceDetailed:()=>iSo,ResponseError:()=>OSo,ResponseErrorWithDocsSchema:()=>gSo,ResponseErrorsSchema:()=>mSo,ServiceTransport:()=>ozn,StreamFormat:()=>ySo,TypeReferenceDeclarationWithEnvOverride:()=>aSo,TypeReferenceDeclarationWithEnvOverrideSchema:()=>nSo});var _2s={};Dn(_2s,{OpenApiSourceSchema:()=>I1o,ProtobufSourceSchema:()=>z1o,SourceSchema:()=>r1i});var h2s={};Dn(h2s,{AliasSchema:()=>Z1o,BaseTypeDeclarationSchema:()=>Xxe,BaseTypeReferenceSchema:()=>azn,CasingOverridesSchema:()=>R1o,DiscriminatedUnionSchema:()=>J1o,EnumSchema:()=>L1o,EnumValue:()=>F1o,EnumValueSchema:()=>N1o,ObjectExtendsSchema:()=>Kxe,ObjectPropertyAccess:()=>C1o,ObjectPropertySchema:()=>t1i,ObjectPropertyWithAccessSchema:()=>B1o,ObjectSchema:()=>x1o,SingleUndiscriminatedUnionTypeDetailedSchema:()=>K1o,SingleUndiscriminatedUnionTypeSchema:()=>Y1o,SingleUnionTypeDetailedSchema:()=>G1o,SingleUnionTypeKey:()=>$1o,SingleUnionTypeKeySchema:()=>H1o,SingleUnionTypeSchema:()=>Q1o,TypeDeclarationSchema:()=>k1o,TypeReferenceDeclarationWithName:()=>Yxe,TypeReferenceDeclarationWithNameSchema:()=>Uip,TypeReferenceDetailedSchema:()=>W1o,TypeReferenceSchema:()=>yli,UndiscriminatedUnionSchema:()=>X1o,UnionDiscriminant:()=>V1o,UnionDiscriminantSchema:()=>U1o});var Uip=Ar.undiscriminatedUnion([Ar.string(),Yxe]);var y2s={};Dn(y2s,{NumberValidationSchema:()=>l1o,StringValidationSchema:()=>c1o,ValidationSchema:()=>e1i});var v2s={};Dn(v2s,{VariableDeclarationDetailed:()=>QSo,VariableDeclarationSchema:()=>JSo,VariableReferenceSchema:()=>rSo});var b2s={};Dn(b2s,{VersionDeclarationHeaderObjectSchema:()=>XSo,VersionDeclarationHeaderSchema:()=>ZSo,VersionDeclarationSchema:()=>czn,VersionValue:()=>YSo,VersionValueDetailed:()=>KSo});var g2s={};Dn(g2s,{WebhookInlinedPayloadSchema:()=>qSo,WebhookMethodSchema:()=>MSo,WebhookPayloadSchema:()=>TSo,WebhookReferencedPayloadSchema:()=>ASo,WebhookSchema:()=>CSo});var O2s={};Dn(O2s,{WebSocketChannelInlinedMessageSchema:()=>zSo,WebSocketChannelMessageBodySchema:()=>xSo,WebSocketChannelMessageSchema:()=>RSo,WebSocketChannelReferencedMessageSchema:()=>ISo,WebSocketChannelSchema:()=>NSo,WebSocketOrigin:()=>BSo});var p1a=class e extends Error{statusCode;body;constructor({message:t,statusCode:r,body:i}){super(UmS({message:t,statusCode:r,body:i})),Object.setPrototypeOf(this,e.prototype),r!=null&&(this.statusCode=r),i!==void 0&&(this.body=i)}};function UmS({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(`
|
|
1676
1676
|
`)}var _1a=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var VmS={optional:"optional",nullable:"nullable",set:"set",list:"list",map:"map",literal:"literal"},Vip=new Set(Object.values(VmS));function Zx(e){let t=e.match(/([\w.]+)<([\w,\s]+)>/);if(t?.[0]!=null&&t[1]!=null&&t[2]!=null&&!Vip.has(t[1].trim()))return{name:t[1].trim(),arguments:t[2].split(",").map(r=>r.trim())}}function kxe(e){return Zx(e)!=null}function P2s(e){return e.scheme==="oauth"}function j2s(e){if(e.request!=null)return typeof e.request=="string"?e.request:e.request.body}function w2s(e){if(e.response!=null)return typeof e.response=="string"?e.response:e.response.type}function YC(e){return typeof e=="string"?!1:e?.extends!=null||e?.properties!=null}function ikt(e){return e?e.proto!=null:!1}var WmS="text";function lzn(e){return e===WmS}var Qs={};Dn(Qs,{ApiDefinitionSource:()=>Dne,ApiVersionScheme:()=>o1i,AuthScheme:()=>zT,AuthSchemesRequirement:()=>Pne,AvailabilityStatus:()=>m9,ContainerType:()=>Av,Environments:()=>rx,ErrorDeclarationDiscriminantValue:()=>n1i,ErrorDiscriminationStrategy:()=>CEe,ExampleCodeSample:()=>TEe,ExampleContainer:()=>Pm,ExampleEndpointSuccessResponse:()=>XC,ExamplePrimitive:()=>Nd,ExampleQueryParameterShape:()=>A2,ExampleRequestBody:()=>bQ,ExampleResponse:()=>xT,ExampleSingleUnionTypeProperties:()=>n3,ExampleTypeReferenceShape:()=>Lh,ExampleTypeShape:()=>Rw,ExampleWebSocketMessageBody:()=>BEe,FileProperty:()=>wne,FileUploadBodyPropertyEncoding:()=>h1a,FileUploadRequestProperty:()=>j6,HttpEndpointSource:()=>jne,HttpMethod:()=>oz,HttpRequestBody:()=>Nq,HttpResponseBody:()=>zS,JsonResponse:()=>yQ,Literal:()=>S9,NamedTypeDefault:()=>fzn,NonStreamHttpResponseBody:()=>sW,OAuthConfiguration:()=>i1i,ObjectPropertyAccess:()=>ukt,Pagination:()=>vQ,PathParameterLocation:()=>rRe,PrimitiveTypeV1:()=>Xv,PrimitiveTypeV2:()=>pp,ProtobufType:()=>Yj,PublishTarget:()=>okt,PublishingConfig:()=>akt,RequestPropertyValue:()=>Sne,ResolvedTypeReference:()=>cW,SdkRequestBodyType:()=>AVt,SdkRequestShape:()=>iRe,ShapeType:()=>qVt,SingleUnionTypeProperties:()=>w9,Source:()=>vli,StreamingResponse:()=>j9,SupportedSdkLanguage:()=>nkt,Transport:()=>tRe,Type:()=>Dg,TypeReference:()=>rf,V2AuthValues:()=>eRe,V2EndpointLocationHttpMethod:()=>a1i,V2HttpEndpointResponseBody:()=>P9,WebSocketMessageBody:()=>D9,WebSocketMessageOrigin:()=>uDo,WebhookHttpMethod:()=>oDo,WebhookPayload:()=>lW,WellKnownProtobufType:()=>id,audience:()=>Wip,auth:()=>S2s,commons:()=>D2s,constants:()=>Hip,dynamic:()=>gs,environment:()=>C2s,errors:()=>B2s,examples:()=>I2s,generatorExec:()=>j0,http:()=>x2s,ir:()=>R2s,proto:()=>N2s,publish:()=>F2s,types:()=>L2s,variables:()=>fnp,webhooks:()=>U2s,websocket:()=>V2s});var Wip={};var S2s={};Dn(S2s,{AuthScheme:()=>zT,AuthSchemesRequirement:()=>Pne,OAuthConfiguration:()=>i1i});var Pne={All:"ALL",Any:"ANY",_visit:(e,t)=>{switch(e){case Pne.All:return t.all();case Pne.Any:return t.any();default:return t._other()}}};var zT={bearer:e=>({...e,type:"bearer",_visit:function(t){return zT._visit(this,t)}}),basic:e=>({...e,type:"basic",_visit:function(t){return zT._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return zT._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return zT._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);default:return t._other(e)}}};var i1i={clientCredentials:e=>({...e,type:"clientCredentials",_visit:function(t){return i1i._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"clientCredentials":return t.clientCredentials(e);default:return t._other(e)}}};var D2s={};Dn(D2s,{AvailabilityStatus:()=>m9});var m9={InDevelopment:"IN_DEVELOPMENT",PreRelease:"PRE_RELEASE",GeneralAvailability:"GENERAL_AVAILABILITY",Deprecated:"DEPRECATED",_visit:(e,t)=>{switch(e){case m9.InDevelopment:return t.inDevelopment();case m9.PreRelease:return t.preRelease();case m9.GeneralAvailability:return t.generalAvailability();case m9.Deprecated:return t.deprecated();default:return t._other()}}};var Hip={};var gs={};Dn(gs,{Auth:()=>$ip,AuthValues:()=>Gip,ErrorSeverity:()=>nDo,FileUploadRequestBodyProperty:()=>Zip,GeneratorOutputConfig:()=>enp,InlinedRequestBody:()=>Yip,LiteralType:()=>anp,NamedType:()=>rnp,PublishInfo:()=>tnp,ReferencedRequestBodyType:()=>Xip,Request:()=>Jip,Response:()=>Kip,SingleDiscriminatedUnionType:()=>nnp,TypeReference:()=>inp,auth:()=>E2s,declaration:()=>Qip,endpoints:()=>M2s,environment:()=>kip,ir:()=>A2s,snippets:()=>q2s,types:()=>T2s});var E2s={};Dn(E2s,{Auth:()=>$ip,AuthValues:()=>Gip});var $ip={basic:e=>({...e,type:"basic",_visit:function(t){return gs.Auth._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return gs.Auth._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return gs.Auth._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return gs.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);default:return t._other(e)}}};var Gip={basic:e=>({...e,type:"basic",_visit:function(t){return gs.AuthValues._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return gs.AuthValues._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return gs.AuthValues._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return gs.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);default:return t._other(e)}}};var Qip={};var M2s={};Dn(M2s,{FileUploadRequestBodyProperty:()=>Zip,InlinedRequestBody:()=>Yip,ReferencedRequestBodyType:()=>Xip,Request:()=>Jip,Response:()=>Kip});var Jip={body:e=>({...e,type:"body",_visit:function(t){return gs.Request._visit(this,t)}}),inlined:e=>({...e,type:"inlined",_visit:function(t){return gs.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 Kip={json:()=>({type:"json",_visit:function(e){return gs.Response._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"json":return t.json();default:return t._other(e)}}};var Yip={properties:e=>({value:e,type:"properties",_visit:function(t){return gs.InlinedRequestBody._visit(this,t)}}),referenced:e=>({...e,type:"referenced",_visit:function(t){return gs.InlinedRequestBody._visit(this,t)}}),fileUpload:e=>({...e,type:"fileUpload",_visit:function(t){return gs.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 Xip={bytes:()=>({type:"bytes",_visit:function(e){return gs.ReferencedRequestBodyType._visit(this,e)}}),typeReference:e=>({value:e,type:"typeReference",_visit:function(t){return gs.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 Zip={file:e=>({...e,type:"file",_visit:function(t){return gs.FileUploadRequestBodyProperty._visit(this,t)}}),fileArray:e=>({...e,type:"fileArray",_visit:function(t){return gs.FileUploadRequestBodyProperty._visit(this,t)}}),bodyProperty:e=>({...e,type:"bodyProperty",_visit:function(t){return gs.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 kip={};var A2s={};Dn(A2s,{GeneratorOutputConfig:()=>enp,PublishInfo:()=>tnp});var enp={publish:e=>({value:e,type:"publish",_visit:function(t){return gs.GeneratorOutputConfig._visit(this,t)}}),local:()=>({type:"local",_visit:function(e){return gs.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 tnp={go:e=>({...e,type:"go",_visit:function(t){return gs.PublishInfo._visit(this,t)}}),maven:e=>({...e,type:"maven",_visit:function(t){return gs.PublishInfo._visit(this,t)}}),npm:e=>({...e,type:"npm",_visit:function(t){return gs.PublishInfo._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return gs.PublishInfo._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return gs.PublishInfo._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return gs.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 q2s={};Dn(q2s,{ErrorSeverity:()=>nDo});var nDo={Critical:"CRITICAL",Warning:"WARNING",_visit:(e,t)=>{switch(e){case nDo.Critical:return t.critical();case nDo.Warning:return t.warning();default:return t._other()}}};var T2s={};Dn(T2s,{LiteralType:()=>anp,NamedType:()=>rnp,SingleDiscriminatedUnionType:()=>nnp,TypeReference:()=>inp});var rnp={alias:e=>({...e,type:"alias",_visit:function(t){return gs.NamedType._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return gs.NamedType._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return gs.NamedType._visit(this,t)}}),discriminatedUnion:e=>({...e,type:"discriminatedUnion",_visit:function(t){return gs.NamedType._visit(this,t)}}),undiscriminatedUnion:e=>({...e,type:"undiscriminatedUnion",_visit:function(t){return gs.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 inp={list:e=>({value:e,type:"list",_visit:function(t){return gs.TypeReference._visit(this,t)}}),literal:e=>({value:e,type:"literal",_visit:function(t){return gs.TypeReference._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return gs.TypeReference._visit(this,t)}}),named:e=>({value:e,type:"named",_visit:function(t){return gs.TypeReference._visit(this,t)}}),nullable:e=>({value:e,type:"nullable",_visit:function(t){return gs.TypeReference._visit(this,t)}}),optional:e=>({value:e,type:"optional",_visit:function(t){return gs.TypeReference._visit(this,t)}}),primitive:e=>({value:e,type:"primitive",_visit:function(t){return gs.TypeReference._visit(this,t)}}),set:e=>({value:e,type:"set",_visit:function(t){return gs.TypeReference._visit(this,t)}}),unknown:()=>({type:"unknown",_visit:function(e){return gs.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 nnp={samePropertiesAsObject:e=>({...e,type:"samePropertiesAsObject",_visit:function(t){return gs.SingleDiscriminatedUnionType._visit(this,t)}}),singleProperty:e=>({...e,type:"singleProperty",_visit:function(t){return gs.SingleDiscriminatedUnionType._visit(this,t)}}),noProperties:e=>({...e,type:"noProperties",_visit:function(t){return gs.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 anp={boolean:e=>({value:e,type:"boolean",_visit:function(t){return gs.LiteralType._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return gs.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 C2s={};Dn(C2s,{Environments:()=>rx});var rx={singleBaseUrl:e=>({...e,type:"singleBaseUrl",_visit:function(t){return rx._visit(this,t)}}),multipleBaseUrls:e=>({...e,type:"multipleBaseUrls",_visit:function(t){return rx._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 B2s={};Dn(B2s,{ErrorDeclarationDiscriminantValue:()=>n1i});var n1i={property:e=>({...e,type:"property",_visit:function(t){return n1i._visit(this,t)}}),statusCode:()=>({type:"statusCode",_visit:function(e){return n1i._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 I2s={};Dn(I2s,{V2AuthValues:()=>eRe,V2EndpointLocationHttpMethod:()=>a1i,V2HttpEndpointResponseBody:()=>P9});var P9={error:e=>({value:e,type:"error",_visit:function(t){return P9._visit(this,t)}}),json:e=>({value:e,type:"json",_visit:function(t){return P9._visit(this,t)}}),stream:e=>({value:e,type:"stream",_visit:function(t){return P9._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 a1i={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD",_visit:(e,t)=>{switch(e){case a1i.Get:return t.get();case a1i.Post:return t.post();case a1i.Put:return t.put();case a1i.Patch:return t.patch();case a1i.Delete:return t.delete();case a1i.Head:return t.head();default:return t._other()}}};var eRe={basic:e=>({...e,type:"basic",_visit:function(t){return eRe._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return eRe._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return eRe._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return eRe._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 j0={};Dn(j0,{GeneratorEnvironment:()=>lnp,GeneratorPublishTarget:()=>cnp,GithubPublishInfo:()=>snp,LicenseConfig:()=>onp,LicenseId:()=>aDo,OutputMode:()=>unp,config:()=>z2s});var z2s={};Dn(z2s,{GeneratorEnvironment:()=>lnp,GeneratorPublishTarget:()=>cnp,GithubPublishInfo:()=>snp,LicenseConfig:()=>onp,LicenseId:()=>aDo,OutputMode:()=>unp});var onp={basic:e=>({...e,type:"basic",_visit:function(t){return j0.LicenseConfig._visit(this,t)}}),custom:e=>({...e,type:"custom",_visit:function(t){return j0.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 aDo={Mit:"MIT",Apache2:"Apache-2.0",_visit:(e,t)=>{switch(e){case aDo.Mit:return t.mit();case aDo.Apache2:return t.apache2();default:return t._other()}}};var unp={publish:e=>({...e,type:"publish",_visit:function(t){return j0.OutputMode._visit(this,t)}}),downloadFiles:()=>({type:"downloadFiles",_visit:function(e){return j0.OutputMode._visit(this,e)}}),github:e=>({...e,type:"github",_visit:function(t){return j0.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 snp={npm:e=>({...e,type:"npm",_visit:function(t){return j0.GithubPublishInfo._visit(this,t)}}),maven:e=>({...e,type:"maven",_visit:function(t){return j0.GithubPublishInfo._visit(this,t)}}),postman:e=>({...e,type:"postman",_visit:function(t){return j0.GithubPublishInfo._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return j0.GithubPublishInfo._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return j0.GithubPublishInfo._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return j0.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 cnp={maven:e=>({...e,type:"maven",_visit:function(t){return j0.GeneratorPublishTarget._visit(this,t)}}),npm:e=>({...e,type:"npm",_visit:function(t){return j0.GeneratorPublishTarget._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return j0.GeneratorPublishTarget._visit(this,t)}}),postman:e=>({...e,type:"postman",_visit:function(t){return j0.GeneratorPublishTarget._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return j0.GeneratorPublishTarget._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return j0.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 lnp={local:()=>({type:"local",_visit:function(e){return j0.GeneratorEnvironment._visit(this,e)}}),remote:e=>({...e,type:"remote",_visit:function(t){return j0.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 x2s={};Dn(x2s,{ExampleCodeSample:()=>TEe,ExampleEndpointSuccessResponse:()=>XC,ExampleQueryParameterShape:()=>A2,ExampleRequestBody:()=>bQ,ExampleResponse:()=>xT,FileProperty:()=>wne,FileUploadBodyPropertyEncoding:()=>h1a,FileUploadRequestProperty:()=>j6,HttpEndpointSource:()=>jne,HttpMethod:()=>oz,HttpRequestBody:()=>Nq,HttpResponseBody:()=>zS,JsonResponse:()=>yQ,NonStreamHttpResponseBody:()=>sW,Pagination:()=>vQ,PathParameterLocation:()=>rRe,RequestPropertyValue:()=>Sne,SdkRequestBodyType:()=>AVt,SdkRequestShape:()=>iRe,StreamingResponse:()=>j9,SupportedSdkLanguage:()=>nkt,Transport:()=>tRe});var tRe={http:()=>({type:"http",_visit:function(e){return tRe._visit(this,e)}}),grpc:e=>({...e,type:"grpc",_visit:function(t){return tRe._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 jne={proto:()=>({type:"proto",_visit:function(e){return jne._visit(this,e)}}),openapi:()=>({type:"openapi",_visit:function(e){return jne._visit(this,e)}}),openrpc:()=>({type:"openrpc",_visit:function(e){return jne._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"proto":return t.proto();case"openapi":return t.openapi();case"openrpc":return t.openrpc();default:return t._other(e)}}};var oz={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD",_visit:(e,t)=>{switch(e){case oz.Get:return t.get();case oz.Post:return t.post();case oz.Put:return t.put();case oz.Patch:return t.patch();case oz.Delete:return t.delete();case oz.Head:return t.head();default:return t._other()}}};var rRe={Root:"ROOT",Service:"SERVICE",Endpoint:"ENDPOINT",_visit:(e,t)=>{switch(e){case rRe.Root:return t.root();case rRe.Service:return t.service();case rRe.Endpoint:return t.endpoint();default:return t._other()}}};var Nq={inlinedRequestBody:e=>({...e,type:"inlinedRequestBody",_visit:function(t){return Nq._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return Nq._visit(this,t)}}),fileUpload:e=>({...e,type:"fileUpload",_visit:function(t){return Nq._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return Nq._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 j6={file:e=>({value:e,type:"file",_visit:function(t){return j6._visit(this,t)}}),bodyProperty:e=>({...e,type:"bodyProperty",_visit:function(t){return j6._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 h1a={Exploded:"exploded",Json:"json",Form:"form",_visit:(e,t)=>{switch(e){case h1a.Exploded:return t.exploded();case h1a.Json:return t.json();case h1a.Form:return t.form();default:return t._other()}}};var wne={file:e=>({...e,type:"file",_visit:function(t){return wne._visit(this,t)}}),fileArray:e=>({...e,type:"fileArray",_visit:function(t){return wne._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 AVt={typeReference:e=>({...e,type:"typeReference",_visit:function(t){return AVt._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return AVt._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 iRe={justRequestBody:e=>({value:e,type:"justRequestBody",_visit:function(t){return iRe._visit(this,t)}}),wrapper:e=>({...e,type:"wrapper",_visit:function(t){return iRe._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 sW={json:e=>({value:e,type:"json",_visit:function(t){return sW._visit(this,t)}}),fileDownload:e=>({...e,type:"fileDownload",_visit:function(t){return sW._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return sW._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return sW._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 zS={json:e=>({value:e,type:"json",_visit:function(t){return zS._visit(this,t)}}),fileDownload:e=>({...e,type:"fileDownload",_visit:function(t){return zS._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return zS._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return zS._visit(this,t)}}),streaming:e=>({value:e,type:"streaming",_visit:function(t){return zS._visit(this,t)}}),streamParameter:e=>({...e,type:"streamParameter",_visit:function(t){return zS._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 yQ={response:e=>({...e,type:"response",_visit:function(t){return yQ._visit(this,t)}}),nestedPropertyAsResponse:e=>({...e,type:"nestedPropertyAsResponse",_visit:function(t){return yQ._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 j9={json:e=>({...e,type:"json",_visit:function(t){return j9._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return j9._visit(this,t)}}),sse:e=>({...e,type:"sse",_visit:function(t){return j9._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 vQ={cursor:e=>({...e,type:"cursor",_visit:function(t){return vQ._visit(this,t)}}),offset:e=>({...e,type:"offset",_visit:function(t){return vQ._visit(this,t)}}),custom:e=>({...e,type:"custom",_visit:function(t){return vQ._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 Sne={query:e=>({...e,type:"query",_visit:function(t){return Sne._visit(this,t)}}),body:e=>({...e,type:"body",_visit:function(t){return Sne._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 TEe={language:e=>({...e,type:"language",_visit:function(t){return TEe._visit(this,t)}}),sdk:e=>({...e,type:"sdk",_visit:function(t){return TEe._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 nkt={Curl:"curl",Python:"python",Javascript:"javascript",Typescript:"typescript",Go:"go",Ruby:"ruby",Csharp:"csharp",Java:"java",_visit:(e,t)=>{switch(e){case nkt.Curl:return t.curl();case nkt.Python:return t.python();case nkt.Javascript:return t.javascript();case nkt.Typescript:return t.typescript();case nkt.Go:return t.go();case nkt.Ruby:return t.ruby();case nkt.Csharp:return t.csharp();case nkt.Java:return t.java();default:return t._other()}}};var A2={single:()=>({type:"single",_visit:function(e){return A2._visit(this,e)}}),exploded:()=>({type:"exploded",_visit:function(e){return A2._visit(this,e)}}),commaSeparated:()=>({type:"commaSeparated",_visit:function(e){return A2._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 bQ={inlinedRequestBody:e=>({...e,type:"inlinedRequestBody",_visit:function(t){return bQ._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return bQ._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 xT={ok:e=>({value:e,type:"ok",_visit:function(t){return xT._visit(this,t)}}),error:e=>({...e,type:"error",_visit:function(t){return xT._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 XC={body:e=>({value:e,type:"body",_visit:function(t){return XC._visit(this,t)}}),stream:e=>({value:e,type:"stream",_visit:function(t){return XC._visit(this,t)}}),sse:e=>({value:e,type:"sse",_visit:function(t){return XC._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 R2s={};Dn(R2s,{ApiDefinitionSource:()=>Dne,ApiVersionScheme:()=>o1i,ErrorDiscriminationStrategy:()=>CEe});var Dne={proto:e=>({...e,type:"proto",_visit:function(t){return Dne._visit(this,t)}}),openapi:()=>({type:"openapi",_visit:function(e){return Dne._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 o1i={header:e=>({...e,type:"header",_visit:function(t){return o1i._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"header":return t.header(e);default:return t._other(e)}}};var CEe={statusCode:()=>({type:"statusCode",_visit:function(e){return CEe._visit(this,e)}}),property:e=>({...e,type:"property",_visit:function(t){return CEe._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 N2s={};Dn(N2s,{ProtobufType:()=>Yj,WellKnownProtobufType:()=>id});var Yj={wellKnown:e=>({value:e,type:"wellKnown",_visit:function(t){return Yj._visit(this,t)}}),userDefined:e=>({...e,type:"userDefined",_visit:function(t){return Yj._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 id={any:()=>({type:"any",_visit:function(e){return id._visit(this,e)}}),api:()=>({type:"api",_visit:function(e){return id._visit(this,e)}}),boolValue:()=>({type:"boolValue",_visit:function(e){return id._visit(this,e)}}),bytesValue:()=>({type:"bytesValue",_visit:function(e){return id._visit(this,e)}}),doubleValue:()=>({type:"doubleValue",_visit:function(e){return id._visit(this,e)}}),duration:()=>({type:"duration",_visit:function(e){return id._visit(this,e)}}),empty:()=>({type:"empty",_visit:function(e){return id._visit(this,e)}}),enum:()=>({type:"enum",_visit:function(e){return id._visit(this,e)}}),enumValue:()=>({type:"enumValue",_visit:function(e){return id._visit(this,e)}}),field:()=>({type:"field",_visit:function(e){return id._visit(this,e)}}),fieldCardinality:()=>({type:"fieldCardinality",_visit:function(e){return id._visit(this,e)}}),fieldKind:()=>({type:"fieldKind",_visit:function(e){return id._visit(this,e)}}),fieldMask:()=>({type:"fieldMask",_visit:function(e){return id._visit(this,e)}}),floatValue:()=>({type:"floatValue",_visit:function(e){return id._visit(this,e)}}),int32Value:()=>({type:"int32Value",_visit:function(e){return id._visit(this,e)}}),int64Value:()=>({type:"int64Value",_visit:function(e){return id._visit(this,e)}}),listValue:()=>({type:"listValue",_visit:function(e){return id._visit(this,e)}}),method:()=>({type:"method",_visit:function(e){return id._visit(this,e)}}),mixin:()=>({type:"mixin",_visit:function(e){return id._visit(this,e)}}),nullValue:()=>({type:"nullValue",_visit:function(e){return id._visit(this,e)}}),option:()=>({type:"option",_visit:function(e){return id._visit(this,e)}}),sourceContext:()=>({type:"sourceContext",_visit:function(e){return id._visit(this,e)}}),stringValue:()=>({type:"stringValue",_visit:function(e){return id._visit(this,e)}}),struct:()=>({type:"struct",_visit:function(e){return id._visit(this,e)}}),syntax:()=>({type:"syntax",_visit:function(e){return id._visit(this,e)}}),timestamp:()=>({type:"timestamp",_visit:function(e){return id._visit(this,e)}}),type:()=>({type:"type",_visit:function(e){return id._visit(this,e)}}),uint32Value:()=>({type:"uint32Value",_visit:function(e){return id._visit(this,e)}}),uint64Value:()=>({type:"uint64Value",_visit:function(e){return id._visit(this,e)}}),value:()=>({type:"value",_visit:function(e){return id._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 F2s={};Dn(F2s,{PublishTarget:()=>okt,PublishingConfig:()=>akt});var akt={github:e=>({...e,type:"github",_visit:function(t){return akt._visit(this,t)}}),direct:e=>({...e,type:"direct",_visit:function(t){return akt._visit(this,t)}}),filesystem:e=>({...e,type:"filesystem",_visit:function(t){return akt._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 okt={postman:e=>({...e,type:"postman",_visit:function(t){return okt._visit(this,t)}}),npm:e=>({...e,type:"npm",_visit:function(t){return okt._visit(this,t)}}),maven:e=>({...e,type:"maven",_visit:function(t){return okt._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);default:return t._other(e)}}};var L2s={};Dn(L2s,{ContainerType:()=>Av,ExampleContainer:()=>Pm,ExamplePrimitive:()=>Nd,ExampleSingleUnionTypeProperties:()=>n3,ExampleTypeReferenceShape:()=>Lh,ExampleTypeShape:()=>Rw,Literal:()=>S9,NamedTypeDefault:()=>fzn,ObjectPropertyAccess:()=>ukt,PrimitiveTypeV1:()=>Xv,PrimitiveTypeV2:()=>pp,ResolvedTypeReference:()=>cW,ShapeType:()=>qVt,SingleUnionTypeProperties:()=>w9,Source:()=>vli,Type:()=>Dg,TypeReference:()=>rf});var vli={proto:e=>({value:e,type:"proto",_visit:function(t){return vli._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"proto":return t.proto(e.value);default:return t._other(e)}}};var Dg={alias:e=>({...e,type:"alias",_visit:function(t){return Dg._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return Dg._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return Dg._visit(this,t)}}),union:e=>({...e,type:"union",_visit:function(t){return Dg._visit(this,t)}}),undiscriminatedUnion:e=>({...e,type:"undiscriminatedUnion",_visit:function(t){return Dg._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 cW={container:e=>({container:e,type:"container",_visit:function(t){return cW._visit(this,t)}}),named:e=>({...e,type:"named",_visit:function(t){return cW._visit(this,t)}}),primitive:e=>({primitive:e,type:"primitive",_visit:function(t){return cW._visit(this,t)}}),unknown:()=>({type:"unknown",_visit:function(e){return cW._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 qVt={Enum:"ENUM",Object:"OBJECT",Union:"UNION",UndiscriminatedUnion:"UNDISCRIMINATED_UNION",_visit:(e,t)=>{switch(e){case qVt.Enum:return t.enum();case qVt.Object:return t.object();case qVt.Union:return t.union();case qVt.UndiscriminatedUnion:return t.undiscriminatedUnion();default:return t._other()}}};var ukt={ReadOnly:"READ_ONLY",WriteOnly:"WRITE_ONLY",_visit:(e,t)=>{switch(e){case ukt.ReadOnly:return t.readOnly();case ukt.WriteOnly:return t.writeOnly();default:return t._other()}}};var w9={samePropertiesAsObject:e=>({...e,propertiesType:"samePropertiesAsObject",_visit:function(t){return w9._visit(this,t)}}),singleProperty:e=>({...e,propertiesType:"singleProperty",_visit:function(t){return w9._visit(this,t)}}),noProperties:()=>({propertiesType:"noProperties",_visit:function(e){return w9._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 rf={container:e=>({container:e,type:"container",_visit:function(t){return rf._visit(this,t)}}),named:e=>({...e,type:"named",_visit:function(t){return rf._visit(this,t)}}),primitive:e=>({primitive:e,type:"primitive",_visit:function(t){return rf._visit(this,t)}}),unknown:()=>({type:"unknown",_visit:function(e){return rf._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 fzn={enum:e=>({...e,type:"enum",_visit:function(t){return fzn._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"enum":return t.enum(e);default:return t._other(e)}}};var Av={list:e=>({list:e,type:"list",_visit:function(t){return Av._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return Av._visit(this,t)}}),nullable:e=>({nullable:e,type:"nullable",_visit:function(t){return Av._visit(this,t)}}),optional:e=>({optional:e,type:"optional",_visit:function(t){return Av._visit(this,t)}}),set:e=>({set:e,type:"set",_visit:function(t){return Av._visit(this,t)}}),literal:e=>({literal:e,type:"literal",_visit:function(t){return Av._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 Xv={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 Xv.Integer:return t.integer();case Xv.Long:return t.long();case Xv.Uint:return t.uint();case Xv.Uint64:return t.uint64();case Xv.Float:return t.float();case Xv.Double:return t.double();case Xv.Boolean:return t.boolean();case Xv.String:return t.string();case Xv.Date:return t.date();case Xv.DateTime:return t.dateTime();case Xv.Uuid:return t.uuid();case Xv.Base64:return t.base64();case Xv.BigInteger:return t.bigInteger();default:return t._other()}}};var pp={integer:e=>({...e,type:"integer",_visit:function(t){return pp._visit(this,t)}}),long:e=>({...e,type:"long",_visit:function(t){return pp._visit(this,t)}}),uint:e=>({...e,type:"uint",_visit:function(t){return pp._visit(this,t)}}),uint64:e=>({...e,type:"uint64",_visit:function(t){return pp._visit(this,t)}}),float:e=>({...e,type:"float",_visit:function(t){return pp._visit(this,t)}}),double:e=>({...e,type:"double",_visit:function(t){return pp._visit(this,t)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return pp._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return pp._visit(this,t)}}),date:e=>({...e,type:"date",_visit:function(t){return pp._visit(this,t)}}),dateTime:e=>({...e,type:"dateTime",_visit:function(t){return pp._visit(this,t)}}),uuid:e=>({...e,type:"uuid",_visit:function(t){return pp._visit(this,t)}}),base64:e=>({...e,type:"base64",_visit:function(t){return pp._visit(this,t)}}),bigInteger:e=>({...e,type:"bigInteger",_visit:function(t){return pp._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 S9={string:e=>({string:e,type:"string",_visit:function(t){return S9._visit(this,t)}}),boolean:e=>({boolean:e,type:"boolean",_visit:function(t){return S9._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 Rw={alias:e=>({...e,type:"alias",_visit:function(t){return Rw._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return Rw._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return Rw._visit(this,t)}}),union:e=>({...e,type:"union",_visit:function(t){return Rw._visit(this,t)}}),undiscriminatedUnion:e=>({...e,type:"undiscriminatedUnion",_visit:function(t){return Rw._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 n3={samePropertiesAsObject:e=>({...e,type:"samePropertiesAsObject",_visit:function(t){return n3._visit(this,t)}}),singleProperty:e=>({...e,type:"singleProperty",_visit:function(t){return n3._visit(this,t)}}),noProperties:()=>({type:"noProperties",_visit:function(e){return n3._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 Lh={primitive:e=>({primitive:e,type:"primitive",_visit:function(t){return Lh._visit(this,t)}}),container:e=>({container:e,type:"container",_visit:function(t){return Lh._visit(this,t)}}),unknown:e=>({unknown:e,type:"unknown",_visit:function(t){return Lh._visit(this,t)}}),named:e=>({...e,type:"named",_visit:function(t){return Lh._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 Pm={list:e=>({...e,type:"list",_visit:function(t){return Pm._visit(this,t)}}),set:e=>({...e,type:"set",_visit:function(t){return Pm._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return Pm._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return Pm._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return Pm._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return Pm._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 Nd={integer:e=>({integer:e,type:"integer",_visit:function(t){return Nd._visit(this,t)}}),long:e=>({long:e,type:"long",_visit:function(t){return Nd._visit(this,t)}}),uint:e=>({uint:e,type:"uint",_visit:function(t){return Nd._visit(this,t)}}),uint64:e=>({uint64:e,type:"uint64",_visit:function(t){return Nd._visit(this,t)}}),float:e=>({float:e,type:"float",_visit:function(t){return Nd._visit(this,t)}}),double:e=>({double:e,type:"double",_visit:function(t){return Nd._visit(this,t)}}),boolean:e=>({boolean:e,type:"boolean",_visit:function(t){return Nd._visit(this,t)}}),string:e=>({string:e,type:"string",_visit:function(t){return Nd._visit(this,t)}}),date:e=>({date:e,type:"date",_visit:function(t){return Nd._visit(this,t)}}),datetime:e=>({...e,type:"datetime",_visit:function(t){return Nd._visit(this,t)}}),uuid:e=>({uuid:e,type:"uuid",_visit:function(t){return Nd._visit(this,t)}}),base64:e=>({base64:e,type:"base64",_visit:function(t){return Nd._visit(this,t)}}),bigInteger:e=>({bigInteger:e,type:"bigInteger",_visit:function(t){return Nd._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 fnp={};var U2s={};Dn(U2s,{WebhookHttpMethod:()=>oDo,WebhookPayload:()=>lW});var lW={inlinedPayload:e=>({...e,type:"inlinedPayload",_visit:function(t){return lW._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return lW._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 oDo={Get:"GET",Post:"POST",_visit:(e,t)=>{switch(e){case oDo.Get:return t.get();case oDo.Post:return t.post();default:return t._other()}}};var V2s={};Dn(V2s,{ExampleWebSocketMessageBody:()=>BEe,WebSocketMessageBody:()=>D9,WebSocketMessageOrigin:()=>uDo});var uDo={Client:"client",Server:"server",_visit:(e,t)=>{switch(e){case uDo.Client:return t.client();case uDo.Server:return t.server();default:return t._other()}}};var D9={inlinedBody:e=>({...e,type:"inlinedBody",_visit:function(t){return D9._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return D9._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 BEe={inlinedBody:e=>({...e,type:"inlinedBody",_visit:function(t){return BEe._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return BEe._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 t_={};Dn(t_,{AliasTypeDeclaration:()=>HAo,ApiAuth:()=>MDo,ApiDefinitionSource:()=>xqo,ApiDefinitionSourceId:()=>Iqo,ApiVersionScheme:()=>jAo,AudienceDefinition:()=>dDo,AudienceReference:()=>hzn,AuthScheme:()=>EDo,AuthSchemesRequirement:()=>pDo,AutogeneratedEndpointExample:()=>dAo,Availability:()=>lkt,AvailabilityStatus:()=>vDo,Base64Type:()=>LAo,BasicAuthScheme:()=>hDo,BasicAuthValues:()=>REo,BearerAuthScheme:()=>_Do,BearerAuthValues:()=>NEo,BigIntegerType:()=>UAo,BooleanType:()=>IAo,BytesRequest:()=>Lzn,BytesResponse:()=>Hzn,Constants:()=>CDo,ContainerType:()=>exn,CsharpProtobufFileOptions:()=>pAo,CursorPagination:()=>YMo,CustomPagination:()=>ZMo,DateTimeType:()=>NAo,DateType:()=>RAo,Declaration:()=>w6,DeclaredErrorName:()=>d1i,DeclaredServiceName:()=>PMo,DeclaredTypeName:()=>CB,DirectPublish:()=>Vqo,DisplayName:()=>bzn,DoubleType:()=>BAo,DoubleValidationRules:()=>CAo,Encoding:()=>Xzn,EndpointId:()=>CVt,EndpointName:()=>wMo,EndpointReference:()=>yzn,EnumTypeDeclaration:()=>Zzn,EnumTypeReference:()=>$np,EnumValue:()=>bli,EnvironmentBaseUrlId:()=>cZ,EnvironmentBaseUrlWithId:()=>hEo,EnvironmentId:()=>oRe,EnvironmentUrl:()=>dkt,EnvironmentVariable:()=>nRe,Environments:()=>bEo,EnvironmentsConfig:()=>Szn,ErrorDeclaration:()=>BEo,ErrorDeclarationDiscriminantValue:()=>Vnp,ErrorDiscriminationByPropertyStrategy:()=>Dqo,ErrorDiscriminationStrategy:()=>Eqo,ErrorId:()=>f1i,EscapedString:()=>ADo,ExampleAliasType:()=>Yqo,ExampleCodeSample:()=>iAo,ExampleCodeSampleLanguage:()=>eAo,ExampleCodeSampleSdk:()=>rAo,ExampleContainer:()=>aTo,ExampleDatetime:()=>nTo,ExampleEndpointCall:()=>Jzn,ExampleEndpointErrorResponse:()=>cAo,ExampleEndpointSuccessResponse:()=>sAo,ExampleEnumType:()=>Kqo,ExampleError:()=>CEo,ExampleHeader:()=>sWi,ExampleInlinedRequestBody:()=>Qzn,ExampleInlinedRequestBodyProperty:()=>aAo,ExampleKeyValuePair:()=>pTo,ExampleListContainer:()=>sTo,ExampleLiteralContainer:()=>uTo,ExampleMapContainer:()=>dTo,ExampleNamedType:()=>oTo,ExampleNullableContainer:()=>fTo,ExampleObjectProperty:()=>kqo,ExampleObjectType:()=>axn,ExampleObjectTypeWithTypeId:()=>rTo,ExampleOptionalContainer:()=>lTo,ExamplePathParameter:()=>p1i,ExamplePrimitive:()=>oxn,ExampleQueryParameter:()=>Gzn,ExampleQueryParameterShape:()=>nAo,ExampleRequestBody:()=>oAo,ExampleResponse:()=>lAo,ExampleServerSideEvent:()=>uAo,ExampleSetContainer:()=>cTo,ExampleSingleUnionType:()=>eTo,ExampleSingleUnionTypeProperties:()=>tTo,ExampleType:()=>j1a,ExampleTypeReference:()=>am,ExampleTypeReferenceShape:()=>iTo,ExampleTypeShape:()=>txn,ExampleUndiscriminatedUnionType:()=>Zqo,ExampleUnionType:()=>Xqo,ExampleWebSocketMessage:()=>mqo,ExampleWebSocketMessageBody:()=>Oqo,ExampleWebSocketSession:()=>Pqo,ExampleWebhookCall:()=>lqo,FeatureId:()=>TDo,FernFilepath:()=>Mne,FileDownloadResponse:()=>Vzn,FileProperty:()=>AMo,FilePropertyArray:()=>MMo,FilePropertySingle:()=>EMo,FileUploadBodyProperty:()=>TMo,FileUploadBodyPropertyEncoding:()=>qMo,FileUploadRequest:()=>BMo,FileUploadRequestProperty:()=>CMo,Filesystem:()=>Wqo,FloatType:()=>TAo,GithubPublish:()=>Uqo,GrpcTransport:()=>yAo,HeaderApiVersionScheme:()=>PAo,HeaderAuthScheme:()=>yDo,HeaderAuthValues:()=>FEo,HttpEndpoint:()=>bAo,HttpEndpointSource:()=>vAo,HttpHeader:()=>lZ,HttpMethod:()=>mzn,HttpPath:()=>uRe,HttpPathPart:()=>jMo,HttpRequestBody:()=>IMo,HttpRequestBodyReference:()=>Fzn,HttpResponse:()=>QMo,HttpResponseBody:()=>GMo,HttpService:()=>mAo,InlinedRequestBody:()=>DMo,InlinedRequestBodyProperty:()=>Nzn,InlinedWebSocketMessageBody:()=>yqo,InlinedWebSocketMessageBodyProperty:()=>hqo,InlinedWebhookPayload:()=>uqo,InlinedWebhookPayloadProperty:()=>oqo,IntegerType:()=>EAo,IntegerValidationRules:()=>DAo,IntermediateRepresentation:()=>Hnp,JsonEncoding:()=>gAo,JsonResponse:()=>Uzn,JsonResponseBody:()=>FMo,JsonResponseBodyWithProperty:()=>LMo,JsonStreamChunk:()=>UMo,Literal:()=>Qqo,LongType:()=>MAo,MapType:()=>Jqo,MavenPublishTarget:()=>Lqo,MultipleBaseUrlsEnvironment:()=>yEo,MultipleBaseUrlsEnvironments:()=>vEo,MultipleEnvironmentUrlValues:()=>xEo,Name:()=>Pd,NameAndWireValue:()=>Ah,NamedType:()=>Gqo,NamedTypeDefault:()=>$qo,NonStreamHttpResponseBody:()=>HMo,NpmPublishTarget:()=>Fqo,OAuthAccessTokenRequestProperties:()=>ODo,OAuthAccessTokenResponseProperties:()=>vzn,OAuthClientCredentials:()=>wDo,OAuthConfiguration:()=>SDo,OAuthRefreshEndpoint:()=>jDo,OAuthRefreshTokenRequestProperties:()=>PDo,OAuthScheme:()=>DDo,OAuthTokenEndpoint:()=>mDo,OAuthValues:()=>LEo,ObjectProperty:()=>sZ,ObjectPropertyAccess:()=>bDo,ObjectTypeDeclaration:()=>$Ao,OffsetPagination:()=>XMo,Package:()=>ixn,PackageNavigationConfig:()=>wqo,Pagination:()=>kMo,PathParameter:()=>BVt,PathParameterLocation:()=>SMo,PlatformHeaders:()=>Aqo,PostmanPublishTarget:()=>Nqo,PrimitiveType:()=>kzn,PrimitiveTypeV1:()=>Dzn,PrimitiveTypeV2:()=>VAo,ProtoEncoding:()=>OAo,ProtoSource:()=>zqo,ProtobufFile:()=>Kzn,ProtobufFileOptions:()=>_Ao,ProtobufService:()=>hAo,ProtobufType:()=>tqo,PublishTarget:()=>nxn,PublishingConfig:()=>Hqo,QueryParameter:()=>c1i,ReadmeConfig:()=>Bqo,RequestProperty:()=>OQ,RequestPropertyValue:()=>gDo,ResolvedNamedType:()=>SAo,ResolvedTypeReference:()=>WAo,ResponseError:()=>JMo,ResponseErrors:()=>KMo,ResponseProperty:()=>Ene,SafeAndUnsafeString:()=>uWi,SdkConfig:()=>qqo,SdkRequest:()=>NMo,SdkRequestBodyType:()=>zMo,SdkRequestShape:()=>RMo,SdkRequestWrapper:()=>xMo,ServiceId:()=>skt,ServiceTypeReferenceInfo:()=>Cqo,ShapeType:()=>wAo,SingleBaseUrlEnvironment:()=>pEo,SingleBaseUrlEnvironments:()=>_Eo,SingleUnionType:()=>JAo,SingleUnionTypeProperties:()=>QAo,SingleUnionTypeProperty:()=>GAo,Source:()=>rqo,SourceConfig:()=>Rqo,SseStreamChunk:()=>WMo,StreamParameterResponse:()=>$Mo,StreamingResponse:()=>$zn,StringType:()=>xAo,StringValidationRules:()=>zAo,Subpackage:()=>Sqo,SubpackageId:()=>ckt,SupportedSdkLanguage:()=>tAo,TextResponse:()=>Wzn,TextStreamChunk:()=>VMo,Transport:()=>Yzn,Type:()=>ZAo,TypeDeclaration:()=>iqo,TypeId:()=>kx,TypeReference:()=>Vy,Uint64Type:()=>qAo,UintType:()=>AAo,UndiscriminatedUnionMember:()=>YAo,UndiscriminatedUnionTypeDeclaration:()=>XAo,UnionTypeDeclaration:()=>KAo,UserAgent:()=>Mqo,UserDefinedProtobufType:()=>eqo,UserSpecifiedEndpointExample:()=>fAo,UuidType:()=>FAo,V2AuthValues:()=>Mzn,V2EndpointLocation:()=>zEo,V2EndpointLocationHttpMethod:()=>IEo,V2EnvironmentValues:()=>Ezn,V2HttpEndpointCodeSample:()=>HEo,V2HttpEndpointExample:()=>O1a,V2HttpEndpointExamples:()=>$Eo,V2HttpEndpointRequest:()=>UEo,V2HttpEndpointResponse:()=>WEo,V2HttpEndpointResponseBody:()=>VEo,V2SchemaExample:()=>g1a,V2SchemaExamples:()=>M9,V2ValueExamples:()=>pkt,V2WebSocketEndpointLocation:()=>GEo,V2WebSocketMessageExample:()=>QEo,V2WebSocketSessionExample:()=>m1a,V2WebSocketSessionExamples:()=>JEo,V2WebhookExample:()=>P1a,V2WebhookExamples:()=>KEo,VariableDeclaration:()=>Tqo,VariableId:()=>Rzn,WebSocketChannel:()=>jqo,WebSocketChannelId:()=>Ozn,WebSocketMessage:()=>gqo,WebSocketMessageBody:()=>bqo,WebSocketMessageBodyReference:()=>vqo,WebSocketMessageId:()=>rxn,WebSocketMessageOrigin:()=>_qo,WebSocketName:()=>pqo,Webhook:()=>fqo,WebhookGroup:()=>dqo,WebhookGroupId:()=>gzn,WebhookHttpMethod:()=>aqo,WebhookId:()=>qDo,WebhookName:()=>nqo,WebhookPayload:()=>cqo,WebhookPayloadReference:()=>sqo,WellKnownProtobufType:()=>kAo,WithContentType:()=>aRe,WithDocs:()=>Cd,WithDocsAndAvailability:()=>l1i,WithJsonExample:()=>fkt,WithV2Examples:()=>TB,audience:()=>Q2s,auth:()=>J2s,commons:()=>K2s,constants:()=>Y2s,dynamic:()=>IN,environment:()=>n8s,errors:()=>a8s,examples:()=>o8s,generatorExec:()=>s8s,http:()=>c8s,ir:()=>l8s,proto:()=>f8s,publish:()=>d8s,types:()=>p8s,variables:()=>_8s,webhooks:()=>h8s,websocket:()=>y8s});var Q2s={};Dn(Q2s,{AudienceDefinition:()=>dDo,AudienceReference:()=>hzn});var ae={};Dn(ae,{JsonError:()=>dzn,ParseError:()=>pzn,any:()=>Dnp,bigint:()=>pnp,boolean:()=>Enp,booleanLiteral:()=>Snp,date:()=>_np,discriminant:()=>xnp,enum_:()=>cDo,getObjectLikeUtils:()=>TVt,getObjectUtils:()=>oWi,getSchemaUtils:()=>Fq,isProperty:()=>s1i,lazy:()=>hnp,lazyObject:()=>Pnp,list:()=>fDo,number:()=>Mnp,object:()=>lDo,objectWithoutOptionalProperties:()=>mnp,optional:()=>W2s,property:()=>vnp,record:()=>Cnp,set:()=>Bnp,string:()=>Anp,stringLiteral:()=>wnp,transform:()=>H2s,undiscriminatedUnion:()=>znp,union:()=>Nnp,unknown:()=>qnp,withParsedProperties:()=>G2s});var Sj={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 rA(e,t){return`Expected ${t}. Received ${HmS(e)}.`}function HmS(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 E9(e){return{...e,json:dnp(e.json),parse:dnp(e.parse)}}function dnp(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
|
-
`)),{ok:!0,value:t}):i}}function sDo(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var dzn=class e extends Error{errors;constructor(t){super(t.map(sDo).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};var pzn=class e extends Error{errors;constructor(t){super(t.map(sDo).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};function Fq(e){return{optional:()=>W2s(e),transform:t=>H2s(e,t),parseOrThrow:(t,r)=>{let i=e.parse(t,r);if(i.ok)return i.value;throw new pzn(i.errors)},jsonOrThrow:(t,r)=>{let i=e.json(t,r);if(i.ok)return i.value;throw new dzn(i.errors)}}}function W2s(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:()=>Sj.OPTIONAL};return{...t,...Fq(t)}}function H2s(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,...Fq(r)}}function pnp(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:rA(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:rA(t,"bigint")}]},getType:()=>Sj.BIGINT};return{...E9(e),...Fq(e)}}var $mS=/^([+-]?\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 _np(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:rA(t,"string")}]}:$mS.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:rA(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:rA(t,"Date object")}]},getType:()=>Sj.DATE};return{...E9(e),...Fq(e)}}function gQ(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...E9(r),...Fq(r)}}}function cDo(e){let t=new Set(e);return gQ(Sj.ENUM,(i,{allowUnrecognizedEnumValues:n,breadcrumbsPrefix:a=[]}={})=>typeof i!="string"?{ok:!1,errors:[{path:a,message:rA(i,"string")}]}:!t.has(i)&&!n?{ok:!1,errors:[{path:a,message:rA(i,"enum")}]}:{ok:!0,value:i})()}function hnp(e){let t=$2s(e);return{...t,...Fq(t)}}function $2s(e){return{parse:(t,r)=>_zn(e).parse(t,r),json:(t,r)=>_zn(e).json(t,r),getType:()=>_zn(e).getType()}}function _zn(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}function y1a(e){return Object.entries(e)}function v1a(e,t){let r=new Set(t);return Object.entries(e).reduce((i,[n,a])=>(r.has(n)&&(i[n]=a),i),{})}function u1i(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 b1a(e){return Object.keys(e)}function ynp(e,t){let r=[],i=[];for(let n of e)t(n)?r.push(n):i.push(n);return[r,i]}function TVt(e){return{withParsedProperties:t=>G2s(e,t)}}function G2s(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(!u1i(i))return{ok:!1,errors:[{path:n?.breadcrumbsPrefix??[],message:rA(i,"object")}]};let a=new Set(Object.keys(t)),u=v1a(i,Object.keys(i).filter(l=>!a.has(l)));return e.json(u,n)},getType:()=>e.getType()};return{...r,...Fq(r),...TVt(r)}}function vnp(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function s1i(e){return e.isProperty}function lDo(e){let t={_getRawProperties:()=>Object.entries(e).map(([r,i])=>s1i(i)?i.rawKey:r),_getParsedProperties:()=>b1a(e),parse:(r,i)=>{let n={},a=[];for(let[u,l]of y1a(e)){let d=s1i(l)?l.rawKey:u,s=s1i(l)?l.valueSchema:l,o={rawKey:d,parsedKey:u,valueSchema:s};n[d]=o,Onp(s)&&a.push(d)}return bnp({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 y1a(e)){let l=s1i(u)?u.valueSchema:u;Onp(l)&&n.push(a)}return bnp({value:r,requiredKeys:n,getProperty:a=>{let u=e[a];if(u!=null)return s1i(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:()=>Sj.OBJECT};return{...E9(t),...Fq(t),...TVt(t),...oWi(t)}}function bnp({value:e,requiredKeys:t,getProperty:r,unrecognizedObjectKeys:i="fail",skipValidation:n=!1,breadcrumbsPrefix:a=[]}){if(!u1i(e))return{ok:!1,errors:[{path:a,message:rA(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 oWi(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(i,n)=>gnp({extensionKeys:t._getRawProperties(),value:i,transformBase:a=>e.parse(a,n),transformExtension:a=>t.parse(a,n)}),json:(i,n)=>gnp({extensionKeys:t._getParsedProperties(),value:i,transformBase:a=>e.json(a,n),transformExtension:a=>t.json(a,n)}),getType:()=>Sj.OBJECT};return{...r,...Fq(r),...TVt(r),...oWi(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:()=>Sj.OBJECT};return{...t,...Fq(t),...TVt(t),...oWi(t)}}}}function gnp({extensionKeys:e,value:t,transformBase:r,transformExtension:i}){let n=new Set(e),[a,u]=ynp(b1a(t),s=>n.has(s)),l=r(v1a(t,u)),d=i(v1a(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 Onp(e){return!GmS(e)}function GmS(e){switch(e.getType()){case Sj.ANY:case Sj.UNKNOWN:case Sj.OPTIONAL:return!0;default:return!1}}function mnp(e){return lDo(e)}function Pnp(e){let t={...$2s(e),_getRawProperties:()=>_zn(e)._getRawProperties(),_getParsedProperties:()=>_zn(e)._getParsedProperties()};return{...t,...Fq(t),...TVt(t),...oWi(t)}}function fDo(e){let t={parse:(r,i)=>jnp(r,(n,a)=>e.parse(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),json:(r,i)=>jnp(r,(n,a)=>e.json(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),getType:()=>Sj.LIST};return{...E9(t),...Fq(t)}}function jnp(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:rA(e,"list"),path:[]}]}}function wnp(e){return gQ(Sj.STRING_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:rA(r,`"${e}"`)}]})()}function Snp(e){return gQ(Sj.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:rA(r,`${e.toString()}`)}]})()}var Dnp=gQ(Sj.ANY,e=>({ok:!0,value:e}));var Enp=gQ(Sj.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:rA(e,"boolean")}]});var Mnp=gQ(Sj.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:rA(e,"number")}]});var Anp=gQ(Sj.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:rA(e,"string")}]});var qnp=gQ(Sj.UNKNOWN,e=>({ok:!0,value:e}));function Cnp(e,t){let r={parse:(i,n)=>Tnp({value:i,isKeyNumeric:e.getType()===Sj.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)=>Tnp({value:i,isKeyNumeric:e.getType()===Sj.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:()=>Sj.RECORD};return{...E9(r),...Fq(r)}}function Tnp({value:e,isKeyNumeric:t,transformKey:r,transformValue:i,breadcrumbsPrefix:n=[]}){return u1i(e)?y1a(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:rA(e,"object")}]}}function Bnp(e){let t=fDo(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:rA(i,"Set")}]},getType:()=>Sj.SET};return{...E9(r),...Fq(r)}}function znp(e){let t={parse:(r,i)=>Inp((n,a)=>n.parse(r,a),e,i),json:(r,i)=>Inp((n,a)=>n.json(r,a),e,i),getType:()=>Sj.UNDISCRIMINATED_UNION};return{...E9(t),...Fq(t)}}function Inp(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 xnp(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}function Nnp(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,i=typeof e=="string"?e:e.parsedDiscriminant,n=cDo(b1a(t)),a={parse:(u,l)=>Rnp({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)=>Rnp({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:()=>Sj.UNION};return{...E9(a),...Fq(a),...TVt(a)}}function Rnp({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:i,getAdditionalPropertiesSchema:n,allowUnrecognizedUnionMembers:a=!1,transformAdditionalProperties:u,breadcrumbsPrefix:l=[]}){if(!u1i(e))return{ok:!1,errors:[{path:l,message:rA(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 dDo=ae.string();var hzn=ae.string();var J2s={};Dn(J2s,{ApiAuth:()=>MDo,AuthScheme:()=>EDo,AuthSchemesRequirement:()=>pDo,BasicAuthScheme:()=>hDo,BearerAuthScheme:()=>_Do,EnvironmentVariable:()=>nRe,HeaderAuthScheme:()=>yDo,OAuthAccessTokenRequestProperties:()=>ODo,OAuthAccessTokenResponseProperties:()=>vzn,OAuthClientCredentials:()=>wDo,OAuthConfiguration:()=>SDo,OAuthRefreshEndpoint:()=>jDo,OAuthRefreshTokenRequestProperties:()=>PDo,OAuthScheme:()=>DDo,OAuthTokenEndpoint:()=>mDo});var nRe=ae.string();var pDo=ae.enum_(["ALL","ANY"]);var uWi=ae.objectWithoutOptionalProperties({unsafeName:ae.string(),safeName:ae.string()});var Pd=ae.objectWithoutOptionalProperties({originalName:ae.string(),camelCase:uWi,pascalCase:uWi,snakeCase:uWi,screamingSnakeCase:uWi});var Cd=ae.objectWithoutOptionalProperties({docs:ae.string().optional()});var _Do=ae.objectWithoutOptionalProperties({token:Pd,tokenEnvVar:nRe.optional()}).extend(Cd);var hDo=ae.objectWithoutOptionalProperties({username:Pd,usernameEnvVar:nRe.optional(),password:Pd,passwordEnvVar:nRe.optional()}).extend(Cd);var Ah=ae.objectWithoutOptionalProperties({wireValue:ae.string(),name:Pd});var yDo=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy),prefix:ae.string().optional(),headerEnvVar:nRe.optional()}).extend(Cd);var CVt=ae.string();var skt=ae.string();var ckt=ae.string();var yzn=ae.objectWithoutOptionalProperties({endpointId:CVt,serviceId:skt,subpackageId:ckt.optional()});var g1a=ae.unknown();var M9=ae.objectWithoutOptionalProperties({userSpecifiedExamples:ae.record(ae.string(),g1a),autogeneratedExamples:ae.record(ae.string(),g1a)});var vDo=ae.enum_(["IN_DEVELOPMENT","PRE_RELEASE","GENERAL_AVAILABILITY","DEPRECATED"]);var lkt=ae.objectWithoutOptionalProperties({status:vDo,message:ae.string().optional()});var w6=ae.objectWithoutOptionalProperties({availability:lkt.optional()}).extend(Cd);var c1i=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy),allowMultiple:ae.boolean(),v2Examples:M9.optional()}).extend(w6);var bDo=ae.enum_(["READ_ONLY","WRITE_ONLY"]);var sZ=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy),propertyAccess:bDo.optional(),v2Examples:M9.optional()}).extend(w6);var gDo=ae.union("type",{query:c1i,body:sZ}).transform({transform:e=>{switch(e.type){case"query":return Sne.query(e);case"body":return Sne.body(e);default:return e}},untransform:({_visit:e,...t})=>t});var OQ=ae.objectWithoutOptionalProperties({propertyPath:ae.list(Pd).optional(),property:gDo});var ODo=ae.objectWithoutOptionalProperties({clientId:OQ,clientSecret:OQ,scopes:OQ.optional(),customProperties:ae.list(OQ).optional()});var Ene=ae.objectWithoutOptionalProperties({propertyPath:ae.list(Pd).optional(),property:sZ});var vzn=ae.objectWithoutOptionalProperties({accessToken:Ene,expiresIn:Ene.optional(),refreshToken:Ene.optional()});var mDo=ae.objectWithoutOptionalProperties({endpointReference:yzn,requestProperties:ODo,responseProperties:vzn});var PDo=ae.objectWithoutOptionalProperties({refreshToken:OQ});var jDo=ae.objectWithoutOptionalProperties({endpointReference:yzn,requestProperties:PDo,responseProperties:vzn});var wDo=ae.objectWithoutOptionalProperties({clientIdEnvVar:nRe.optional(),clientSecretEnvVar:nRe.optional(),tokenPrefix:ae.string().optional(),tokenHeader:ae.string().optional(),scopes:ae.list(ae.string()).optional(),tokenEndpoint:mDo,refreshEndpoint:jDo.optional()});var SDo=ae.union("type",{clientCredentials:wDo}).transform({transform:e=>{switch(e.type){case"clientCredentials":return i1i.clientCredentials(e);default:return e}},untransform:({_visit:e,...t})=>t});var DDo=ae.objectWithoutOptionalProperties({configuration:SDo}).extend(Cd);var EDo=ae.union(ae.discriminant("type","_type"),{bearer:_Do,basic:hDo,header:yDo,oauth:DDo}).transform({transform:e=>{switch(e.type){case"bearer":return zT.bearer(e);case"basic":return zT.basic(e);case"header":return zT.header(e);case"oauth":return zT.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t});var MDo=ae.objectWithoutOptionalProperties({requirement:pDo,schemes:ae.list(EDo)}).extend(Cd);var K2s={};Dn(K2s,{Availability:()=>lkt,AvailabilityStatus:()=>vDo,Declaration:()=>w6,DisplayName:()=>bzn,EndpointId:()=>CVt,EndpointReference:()=>yzn,ErrorId:()=>f1i,EscapedString:()=>ADo,FeatureId:()=>TDo,FernFilepath:()=>Mne,Name:()=>Pd,NameAndWireValue:()=>Ah,SafeAndUnsafeString:()=>uWi,ServiceId:()=>skt,SubpackageId:()=>ckt,TypeId:()=>kx,WebSocketChannelId:()=>Ozn,WebhookGroupId:()=>gzn,WebhookId:()=>qDo,WithContentType:()=>aRe,WithDocs:()=>Cd,WithDocsAndAvailability:()=>l1i,WithJsonExample:()=>fkt});var l1i=ae.objectWithoutOptionalProperties({availability:lkt.optional()}).extend(Cd);var Mne=ae.objectWithoutOptionalProperties({allParts:ae.list(Pd),packagePath:ae.list(Pd),file:Pd.optional()});var bzn=ae.string();var ADo=ae.objectWithoutOptionalProperties({original:ae.string()});var fkt=ae.objectWithoutOptionalProperties({jsonExample:ae.unknown()});var aRe=ae.objectWithoutOptionalProperties({contentType:ae.string().optional()});var kx=ae.string();var f1i=ae.string();var gzn=ae.string();var qDo=ae.string();var Ozn=ae.string();var TDo=ae.string();var Y2s={};Dn(Y2s,{Constants:()=>CDo});var CDo=ae.objectWithoutOptionalProperties({errorInstanceIdKey:Ah});var IN={};Dn(IN,{AliasType:()=>iEo,Auth:()=>RDo,AuthValues:()=>VDo,BasicAuth:()=>BDo,BasicAuthValues:()=>NDo,BearerAuth:()=>IDo,BearerAuthValues:()=>FDo,BodyRequest:()=>WDo,Declaration:()=>mQ,DiscriminatedUnionType:()=>lEo,DynamicIntermediateRepresentation:()=>MEo,Endpoint:()=>rEo,EndpointExample:()=>tEo,EndpointLocation:()=>Pzn,EndpointSnippetRequest:()=>eEo,EndpointSnippetResponse:()=>Fnp,EnumType:()=>nEo,EnvironmentValues:()=>kDo,ErrorSeverity:()=>AEo,Error_:()=>qEo,FileUploadRequestBody:()=>GDo,FileUploadRequestBodyProperty:()=>$Do,GeneratorConfig:()=>EEo,GeneratorOutputConfig:()=>DEo,GoPublishInfo:()=>gEo,HeaderAuth:()=>zDo,HeaderAuthValues:()=>LDo,InlinedRequest:()=>KDo,InlinedRequestBody:()=>QDo,InlinedRequestMetadata:()=>JDo,LiteralType:()=>TEo,MapType:()=>Unp,MavenPublishInfo:()=>OEo,MultipleEnvironmentUrlValues:()=>ZDo,NamedParameter:()=>uz,NamedType:()=>dEo,NpmPublishInfo:()=>mEo,NugetPublishInfo:()=>PEo,OAuth:()=>xDo,OAuthValues:()=>UDo,ObjectType:()=>aEo,PublishInfo:()=>SEo,PypiPublishInfo:()=>jEo,ReferencedRequestBody:()=>HDo,ReferencedRequestBodyType:()=>jzn,Request:()=>YDo,Response:()=>XDo,RubyGemsPublishInfo:()=>wEo,SingleDiscriminatedUnionType:()=>cEo,SingleDiscriminatedUnionTypeNoProperties:()=>sEo,SingleDiscriminatedUnionTypeObject:()=>oEo,SingleDiscriminatedUnionTypeSingleProperty:()=>uEo,TypeReference:()=>Lnp,UndiscriminatedUnionType:()=>fEo,Values:()=>wzn,auth:()=>X2s,declaration:()=>Z2s,endpoints:()=>k2s,environment:()=>e8s,ir:()=>t8s,snippets:()=>r8s,types:()=>i8s});var X2s={};Dn(X2s,{Auth:()=>RDo,AuthValues:()=>VDo,BasicAuth:()=>BDo,BasicAuthValues:()=>NDo,BearerAuth:()=>IDo,BearerAuthValues:()=>FDo,HeaderAuth:()=>zDo,HeaderAuthValues:()=>LDo,OAuth:()=>xDo,OAuthValues:()=>UDo});var BDo=ae.objectWithoutOptionalProperties({username:Pd,password:Pd});var IDo=ae.objectWithoutOptionalProperties({token:Pd});var uz=ae.objectWithoutOptionalProperties({name:Ah,typeReference:ae.lazy(()=>IN.TypeReference)});var zDo=ae.objectWithoutOptionalProperties({header:uz});var xDo=ae.objectWithoutOptionalProperties({clientId:Pd,clientSecret:Pd});var RDo=ae.union("type",{basic:BDo,bearer:IDo,header:zDo,oauth:xDo}).transform({transform:e=>{switch(e.type){case"basic":return gs.Auth.basic(e);case"bearer":return gs.Auth.bearer(e);case"header":return gs.Auth.header(e);case"oauth":return gs.Auth.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t});var NDo=ae.objectWithoutOptionalProperties({username:ae.string(),password:ae.string()});var FDo=ae.objectWithoutOptionalProperties({token:ae.string()});var LDo=ae.objectWithoutOptionalProperties({value:ae.unknown()});var UDo=ae.objectWithoutOptionalProperties({clientId:ae.string(),clientSecret:ae.string()});var VDo=ae.union("type",{basic:NDo,bearer:FDo,header:LDo,oauth:UDo}).transform({transform:e=>{switch(e.type){case"basic":return gs.AuthValues.basic(e);case"bearer":return gs.AuthValues.bearer(e);case"header":return gs.AuthValues.header(e);case"oauth":return gs.AuthValues.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t});var Z2s={};Dn(Z2s,{Declaration:()=>mQ});var mQ=ae.objectWithoutOptionalProperties({fernFilepath:Mne,name:Pd});var k2s={};Dn(k2s,{BodyRequest:()=>WDo,Endpoint:()=>rEo,EndpointExample:()=>tEo,EndpointLocation:()=>Pzn,FileUploadRequestBody:()=>GDo,FileUploadRequestBodyProperty:()=>$Do,InlinedRequest:()=>KDo,InlinedRequestBody:()=>QDo,InlinedRequestMetadata:()=>JDo,ReferencedRequestBody:()=>HDo,ReferencedRequestBodyType:()=>jzn,Request:()=>YDo,Response:()=>XDo});var mzn=ae.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"]);var Pzn=ae.objectWithoutOptionalProperties({method:mzn,path:ae.string()});var jzn=ae.union("type",{bytes:ae.object({}),typeReference:ae.object({value:ae.lazy(()=>IN.TypeReference)})}).transform({transform:e=>{switch(e.type){case"bytes":return gs.ReferencedRequestBodyType.bytes();case"typeReference":return gs.ReferencedRequestBodyType.typeReference(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var WDo=ae.objectWithoutOptionalProperties({pathParameters:ae.list(uz).optional(),body:jzn.optional()});var HDo=ae.objectWithoutOptionalProperties({bodyKey:Pd,bodyType:jzn});var $Do=ae.union("type",{file:Ah,fileArray:Ah,bodyProperty:uz}).transform({transform:e=>{switch(e.type){case"file":return gs.FileUploadRequestBodyProperty.file(e);case"fileArray":return gs.FileUploadRequestBodyProperty.fileArray(e);case"bodyProperty":return gs.FileUploadRequestBodyProperty.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t});var GDo=ae.objectWithoutOptionalProperties({properties:ae.list($Do)});var QDo=ae.union("type",{properties:ae.object({value:ae.list(uz)}),referenced:HDo,fileUpload:GDo}).transform({transform:e=>{switch(e.type){case"properties":return gs.InlinedRequestBody.properties(e.value);case"referenced":return gs.InlinedRequestBody.referenced(e);case"fileUpload":return gs.InlinedRequestBody.fileUpload(e);default:return e}},untransform:({_visit:e,...t})=>t});var JDo=ae.objectWithoutOptionalProperties({includePathParameters:ae.boolean(),onlyPathParameters:ae.boolean()});var KDo=ae.objectWithoutOptionalProperties({declaration:mQ,pathParameters:ae.list(uz).optional(),queryParameters:ae.list(uz).optional(),headers:ae.list(uz).optional(),body:QDo.optional(),metadata:JDo.optional()});var YDo=ae.union("type",{body:WDo,inlined:KDo}).transform({transform:e=>{switch(e.type){case"body":return gs.Request.body(e);case"inlined":return gs.Request.inlined(e);default:return e}},untransform:({_visit:e,...t})=>t});var XDo=ae.union("type",{json:ae.object({})}).transform({transform:e=>{switch(e.type){case"json":return gs.Response.json();default:return e}},untransform:({_visit:e,...t})=>t});var oRe=ae.string();var cZ=ae.string();var dkt=ae.string();var ZDo=ae.record(cZ,dkt);var kDo=ae.undiscriminatedUnion([oRe,ZDo]);var wzn=ae.record(ae.string(),ae.unknown());var eEo=ae.objectWithoutOptionalProperties({endpoint:Pzn,baseUrl:ae.property("baseURL",ae.string().optional()),environment:kDo.optional(),auth:VDo.optional(),pathParameters:wzn.optional(),queryParameters:wzn.optional(),headers:wzn.optional(),requestBody:ae.unknown().optional()});var tEo=ae.objectWithoutOptionalProperties({id:ae.string(),name:ae.string().optional()}).extend(eEo);var rEo=ae.objectWithoutOptionalProperties({auth:RDo.optional(),declaration:mQ,location:Pzn,request:YDo,response:XDo,examples:ae.list(tEo).optional()});var e8s={};Dn(e8s,{EnvironmentValues:()=>kDo,MultipleEnvironmentUrlValues:()=>ZDo});var t8s={};Dn(t8s,{DynamicIntermediateRepresentation:()=>MEo,GeneratorConfig:()=>EEo,GeneratorOutputConfig:()=>DEo,GoPublishInfo:()=>gEo,MavenPublishInfo:()=>OEo,NpmPublishInfo:()=>mEo,NugetPublishInfo:()=>PEo,PublishInfo:()=>SEo,PypiPublishInfo:()=>jEo,RubyGemsPublishInfo:()=>wEo});var iEo=ae.objectWithoutOptionalProperties({declaration:mQ,typeReference:ae.lazy(()=>IN.TypeReference)});var nEo=ae.objectWithoutOptionalProperties({declaration:mQ,values:ae.list(Ah)});var aEo=ae.objectWithoutOptionalProperties({declaration:mQ,properties:ae.list(uz),additionalProperties:ae.boolean().optional()});var oEo=ae.objectWithoutOptionalProperties({typeId:kx,discriminantValue:Ah,properties:ae.list(uz)});var uEo=ae.objectWithoutOptionalProperties({typeReference:ae.lazy(()=>IN.TypeReference),discriminantValue:Ah,properties:ae.list(uz).optional()});var sEo=ae.objectWithoutOptionalProperties({discriminantValue:Ah,properties:ae.list(uz).optional()});var cEo=ae.union("type",{samePropertiesAsObject:oEo,singleProperty:uEo,noProperties:sEo}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return gs.SingleDiscriminatedUnionType.samePropertiesAsObject(e);case"singleProperty":return gs.SingleDiscriminatedUnionType.singleProperty(e);case"noProperties":return gs.SingleDiscriminatedUnionType.noProperties(e);default:return e}},untransform:({_visit:e,...t})=>t});var lEo=ae.objectWithoutOptionalProperties({declaration:mQ,discriminant:Ah,types:ae.record(ae.string(),cEo)});var fEo=ae.objectWithoutOptionalProperties({declaration:mQ,types:ae.list(ae.lazy(()=>IN.TypeReference))});var dEo=ae.union("type",{alias:iEo,enum:nEo,object:aEo,discriminatedUnion:lEo,undiscriminatedUnion:fEo}).transform({transform:e=>{switch(e.type){case"alias":return gs.NamedType.alias(e);case"enum":return gs.NamedType.enum(e);case"object":return gs.NamedType.object(e);case"discriminatedUnion":return gs.NamedType.discriminatedUnion(e);case"undiscriminatedUnion":return gs.NamedType.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t});var pEo=ae.objectWithoutOptionalProperties({id:oRe,name:Pd,url:dkt}).extend(Cd);var _Eo=ae.objectWithoutOptionalProperties({environments:ae.list(pEo)});var hEo=ae.objectWithoutOptionalProperties({id:cZ,name:Pd});var yEo=ae.objectWithoutOptionalProperties({id:oRe,name:Pd,urls:ae.record(cZ,dkt)}).extend(Cd);var vEo=ae.objectWithoutOptionalProperties({baseUrls:ae.list(hEo),environments:ae.list(yEo)});var bEo=ae.union("type",{singleBaseUrl:_Eo,multipleBaseUrls:vEo}).transform({transform:e=>{switch(e.type){case"singleBaseUrl":return rx.singleBaseUrl(e);case"multipleBaseUrls":return rx.multipleBaseUrls(e);default:return e}},untransform:({_visit:e,...t})=>t});var Szn=ae.objectWithoutOptionalProperties({defaultEnvironment:oRe.optional(),environments:bEo});var gEo=ae.objectWithoutOptionalProperties({version:ae.string(),repoUrl:ae.string()});var OEo=ae.objectWithoutOptionalProperties({version:ae.string(),coordinate:ae.string(),repoUrl:ae.string().optional()});var mEo=ae.objectWithoutOptionalProperties({version:ae.string(),packageName:ae.string(),repoUrl:ae.string().optional()});var PEo=ae.objectWithoutOptionalProperties({version:ae.string(),packageName:ae.string(),repoUrl:ae.string().optional()});var jEo=ae.objectWithoutOptionalProperties({version:ae.string(),packageName:ae.string(),repoUrl:ae.string().optional()});var wEo=ae.objectWithoutOptionalProperties({version:ae.string(),packageName:ae.string(),repoUrl:ae.string().optional()});var SEo=ae.union("type",{go:gEo,maven:OEo,npm:mEo,nuget:PEo,pypi:jEo,rubygems:wEo}).transform({transform:e=>{switch(e.type){case"go":return gs.PublishInfo.go(e);case"maven":return gs.PublishInfo.maven(e);case"npm":return gs.PublishInfo.npm(e);case"nuget":return gs.PublishInfo.nuget(e);case"pypi":return gs.PublishInfo.pypi(e);case"rubygems":return gs.PublishInfo.rubygems(e);default:return e}},untransform:({_visit:e,...t})=>t});var DEo=ae.union("type",{publish:ae.object({value:SEo}),local:ae.object({})}).transform({transform:e=>{switch(e.type){case"publish":return gs.GeneratorOutputConfig.publish(e.value);case"local":return gs.GeneratorOutputConfig.local();default:return e}},untransform:({_visit:e,...t})=>t});var EEo=ae.objectWithoutOptionalProperties({apiName:ae.string(),organization:ae.string(),customConfig:ae.unknown(),outputConfig:DEo});var MEo=ae.objectWithoutOptionalProperties({version:ae.stringLiteral("1.0.0"),types:ae.record(kx,dEo),endpoints:ae.record(CVt,rEo),environments:Szn.optional(),headers:ae.list(uz).optional(),pathParameters:ae.list(uz).optional(),generatorConfig:EEo.optional()});var r8s={};Dn(r8s,{EndpointSnippetRequest:()=>eEo,EndpointSnippetResponse:()=>Fnp,ErrorSeverity:()=>AEo,Error_:()=>qEo,Values:()=>wzn});var AEo=ae.enum_(["CRITICAL","WARNING"]);var qEo=ae.objectWithoutOptionalProperties({severity:AEo,message:ae.string()});var Fnp=ae.objectWithoutOptionalProperties({snippet:ae.string(),errors:ae.list(qEo).optional()});var i8s={};Dn(i8s,{AliasType:()=>iEo,DiscriminatedUnionType:()=>lEo,EnumType:()=>nEo,LiteralType:()=>TEo,MapType:()=>Unp,NamedParameter:()=>uz,NamedType:()=>dEo,ObjectType:()=>aEo,SingleDiscriminatedUnionType:()=>cEo,SingleDiscriminatedUnionTypeNoProperties:()=>sEo,SingleDiscriminatedUnionTypeObject:()=>oEo,SingleDiscriminatedUnionTypeSingleProperty:()=>uEo,TypeReference:()=>Lnp,UndiscriminatedUnionType:()=>fEo});var TEo=ae.union("type",{boolean:ae.object({value:ae.boolean()}),string:ae.object({value:ae.string()})}).transform({transform:e=>{switch(e.type){case"boolean":return gs.LiteralType.boolean(e.value);case"string":return gs.LiteralType.string(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var Dzn=ae.enum_(["INTEGER","LONG","UINT","UINT_64","FLOAT","DOUBLE","BOOLEAN","STRING","DATE","DATE_TIME","UUID","BASE_64","BIG_INTEGER"]);var Lnp=ae.union("type",{list:ae.object({value:ae.lazy(()=>IN.TypeReference)}),literal:ae.object({value:TEo}),map:ae.lazyObject(()=>IN.MapType),named:ae.object({value:kx}),nullable:ae.object({value:ae.lazy(()=>IN.TypeReference)}),optional:ae.object({value:ae.lazy(()=>IN.TypeReference)}),primitive:ae.object({value:Dzn}),set:ae.object({value:ae.lazy(()=>IN.TypeReference)}),unknown:ae.object({})}).transform({transform:e=>{switch(e.type){case"list":return gs.TypeReference.list(e.value);case"literal":return gs.TypeReference.literal(e.value);case"map":return gs.TypeReference.map(e);case"named":return gs.TypeReference.named(e.value);case"nullable":return gs.TypeReference.nullable(e.value);case"optional":return gs.TypeReference.optional(e.value);case"primitive":return gs.TypeReference.primitive(e.value);case"set":return gs.TypeReference.set(e.value);case"unknown":return gs.TypeReference.unknown();default:return e}},untransform:({_visit:e,...t})=>t});var Unp=ae.objectWithoutOptionalProperties({key:ae.lazy(()=>IN.TypeReference),value:ae.lazy(()=>IN.TypeReference)});var n8s={};Dn(n8s,{EnvironmentBaseUrlId:()=>cZ,EnvironmentBaseUrlWithId:()=>hEo,EnvironmentId:()=>oRe,EnvironmentUrl:()=>dkt,Environments:()=>bEo,EnvironmentsConfig:()=>Szn,MultipleBaseUrlsEnvironment:()=>yEo,MultipleBaseUrlsEnvironments:()=>vEo,SingleBaseUrlEnvironment:()=>pEo,SingleBaseUrlEnvironments:()=>_Eo});var a8s={};Dn(a8s,{DeclaredErrorName:()=>d1i,ErrorDeclaration:()=>BEo,ErrorDeclarationDiscriminantValue:()=>Vnp,ExampleError:()=>CEo});var d1i=ae.objectWithoutOptionalProperties({errorId:f1i,fernFilepath:Mne,name:Pd});var CEo=ae.objectWithoutOptionalProperties({name:Pd.optional(),shape:ae.lazyObject(()=>am)}).extend(fkt).extend(Cd);var BEo=ae.objectWithoutOptionalProperties({name:d1i,displayName:ae.string().optional(),discriminantValue:Ah,type:ae.lazy(()=>Vy).optional(),statusCode:ae.number(),examples:ae.list(CEo),v2Examples:M9.optional()}).extend(Cd);var Vnp=ae.union("type",{property:Ah,statusCode:ae.object({})}).transform({transform:e=>{switch(e.type){case"property":return n1i.property(e);case"statusCode":return n1i.statusCode();default:return e}},untransform:({_visit:e,...t})=>t});var o8s={};Dn(o8s,{BasicAuthValues:()=>REo,BearerAuthValues:()=>NEo,HeaderAuthValues:()=>FEo,MultipleEnvironmentUrlValues:()=>xEo,OAuthValues:()=>LEo,V2AuthValues:()=>Mzn,V2EndpointLocation:()=>zEo,V2EndpointLocationHttpMethod:()=>IEo,V2EnvironmentValues:()=>Ezn,V2HttpEndpointCodeSample:()=>HEo,V2HttpEndpointExample:()=>O1a,V2HttpEndpointExamples:()=>$Eo,V2HttpEndpointRequest:()=>UEo,V2HttpEndpointResponse:()=>WEo,V2HttpEndpointResponseBody:()=>VEo,V2SchemaExample:()=>g1a,V2SchemaExamples:()=>M9,V2ValueExamples:()=>pkt,V2WebSocketEndpointLocation:()=>GEo,V2WebSocketMessageExample:()=>QEo,V2WebSocketSessionExample:()=>m1a,V2WebSocketSessionExamples:()=>JEo,V2WebhookExample:()=>P1a,V2WebhookExamples:()=>KEo,WithV2Examples:()=>TB});var TB=ae.objectWithoutOptionalProperties({v2Examples:M9.optional()});var IEo=ae.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"]);var zEo=ae.objectWithoutOptionalProperties({method:IEo,path:ae.string()});var xEo=ae.record(cZ,dkt);var Ezn=ae.undiscriminatedUnion([oRe,xEo]);var REo=ae.objectWithoutOptionalProperties({username:ae.string(),password:ae.string()});var NEo=ae.objectWithoutOptionalProperties({token:ae.string()});var FEo=ae.objectWithoutOptionalProperties({value:ae.unknown()});var LEo=ae.objectWithoutOptionalProperties({clientId:ae.string(),clientSecret:ae.string()});var Mzn=ae.union("type",{basic:REo,bearer:NEo,header:FEo,oauth:LEo}).transform({transform:e=>{switch(e.type){case"basic":return eRe.basic(e);case"bearer":return eRe.bearer(e);case"header":return eRe.header(e);case"oauth":return eRe.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t});var pkt=ae.record(ae.string(),ae.unknown());var UEo=ae.objectWithoutOptionalProperties({endpoint:zEo,baseUrl:ae.property("baseURL",ae.string().optional()),environment:Ezn.optional(),auth:Mzn.optional(),pathParameters:pkt.optional(),queryParameters:pkt.optional(),headers:pkt.optional(),requestBody:ae.unknown().optional()}).extend(Cd);var VEo=ae.union("type",{error:ae.object({value:ae.unknown()}),json:ae.object({value:ae.unknown()}),stream:ae.object({value:ae.list(ae.unknown())})}).transform({transform:e=>{switch(e.type){case"error":return P9.error(e.value);case"json":return P9.json(e.value);case"stream":return P9.stream(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var WEo=ae.objectWithoutOptionalProperties({statusCode:ae.number().optional(),body:VEo.optional()}).extend(Cd);var HEo=ae.objectWithoutOptionalProperties({name:ae.string().optional(),language:ae.string(),code:ae.string()}).extend(Cd);var O1a=ae.objectWithoutOptionalProperties({request:UEo.optional(),response:WEo.optional(),codeSamples:ae.list(HEo).optional()});var $Eo=ae.objectWithoutOptionalProperties({userSpecifiedExamples:ae.record(ae.string(),O1a),autogeneratedExamples:ae.record(ae.string(),O1a)});var GEo=ae.objectWithoutOptionalProperties({path:ae.string()});var QEo=ae.objectWithoutOptionalProperties({type:ae.string(),body:ae.unknown()});var m1a=ae.objectWithoutOptionalProperties({channel:GEo,baseUrl:ae.property("baseURL",ae.string().optional()),environment:Ezn.optional(),auth:Mzn.optional(),pathParameters:pkt.optional(),queryParameters:pkt.optional(),headers:pkt.optional(),messages:ae.list(QEo).optional()});var JEo=ae.objectWithoutOptionalProperties({autogeneratedExamples:ae.record(ae.string(),m1a),userSpecifiedExamples:ae.record(ae.string(),m1a)});var P1a=ae.objectWithoutOptionalProperties({name:ae.string().optional(),payload:ae.unknown()});var KEo=ae.objectWithoutOptionalProperties({userSpecifiedExamples:ae.record(ae.string(),P1a),autogeneratedExamples:ae.record(ae.string(),P1a)});var s8s={};Dn(s8s,{BasicLicense:()=>XEo,CustomLicense:()=>ZEo,EnvironmentVariable:()=>a3,GeneratorConfig:()=>Wnp,GeneratorEnvironment:()=>mMo,GeneratorOutputConfig:()=>gMo,GeneratorPublishConfig:()=>xzn,GeneratorPublishTarget:()=>sMo,GeneratorRegistriesConfig:()=>iMo,GeneratorRegistriesConfigV2:()=>oMo,GithubOutputMode:()=>vMo,GithubPublishInfo:()=>yMo,LicenseConfig:()=>kEo,LicenseId:()=>YEo,MavenCentralSignature:()=>Azn,MavenCentralSignatureGithubInfo:()=>lMo,MavenGithubPublishInfo:()=>fMo,MavenRegistryConfig:()=>tMo,MavenRegistryConfigV2:()=>qzn,NpmGithubPublishInfo:()=>cMo,NpmRegistryConfig:()=>rMo,NpmRegistryConfigV2:()=>Tzn,NugetGithubPublishInfo:()=>hMo,NugetRegistryConfig:()=>zzn,OutputMetadata:()=>aMo,OutputMetadataAuthor:()=>nMo,OutputMode:()=>bMo,PostmanConfig:()=>uMo,PostmanGithubPublishInfo:()=>dMo,PublishingMetadata:()=>eMo,PypiGithubPublishInfo:()=>pMo,PypiMetadata:()=>Czn,PypiRegistryConfig:()=>Bzn,RemoteGeneratorEnvironment:()=>OMo,RubyGemsGithubPublishInfo:()=>_Mo,RubyGemsRegistryConfig:()=>Izn,config:()=>u8s});var u8s={};Dn(u8s,{BasicLicense:()=>XEo,CustomLicense:()=>ZEo,EnvironmentVariable:()=>a3,GeneratorConfig:()=>Wnp,GeneratorEnvironment:()=>mMo,GeneratorOutputConfig:()=>gMo,GeneratorPublishConfig:()=>xzn,GeneratorPublishTarget:()=>sMo,GeneratorRegistriesConfig:()=>iMo,GeneratorRegistriesConfigV2:()=>oMo,GithubOutputMode:()=>vMo,GithubPublishInfo:()=>yMo,LicenseConfig:()=>kEo,LicenseId:()=>YEo,MavenCentralSignature:()=>Azn,MavenCentralSignatureGithubInfo:()=>lMo,MavenGithubPublishInfo:()=>fMo,MavenRegistryConfig:()=>tMo,MavenRegistryConfigV2:()=>qzn,NpmGithubPublishInfo:()=>cMo,NpmRegistryConfig:()=>rMo,NpmRegistryConfigV2:()=>Tzn,NugetGithubPublishInfo:()=>hMo,NugetRegistryConfig:()=>zzn,OutputMetadata:()=>aMo,OutputMetadataAuthor:()=>nMo,OutputMode:()=>bMo,PostmanConfig:()=>uMo,PostmanGithubPublishInfo:()=>dMo,PublishingMetadata:()=>eMo,PypiGithubPublishInfo:()=>pMo,PypiMetadata:()=>Czn,PypiRegistryConfig:()=>Bzn,RemoteGeneratorEnvironment:()=>OMo,RubyGemsGithubPublishInfo:()=>_Mo,RubyGemsRegistryConfig:()=>Izn});var YEo=ae.enum_(["MIT","Apache-2.0"]);var XEo=ae.objectWithoutOptionalProperties({id:YEo});var ZEo=ae.objectWithoutOptionalProperties({filename:ae.string()});var kEo=ae.union("type",{basic:XEo,custom:ZEo}).transform({transform:e=>{switch(e.type){case"basic":return j0.LicenseConfig.basic(e);case"custom":return j0.LicenseConfig.custom(e);default:return e}},untransform:({_visit:e,...t})=>t});var eMo=ae.objectWithoutOptionalProperties({packageDescription:ae.property("package_description",ae.string().optional()),publisherEmail:ae.property("publisher_email",ae.string().optional()),referenceUrl:ae.property("reference_url",ae.string().optional()),publisherName:ae.property("publisher_name",ae.string().optional())});var Azn=ae.objectWithoutOptionalProperties({keyId:ae.string(),password:ae.string(),secretKey:ae.string()});var tMo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),username:ae.string(),password:ae.string(),group:ae.string(),signature:Azn.optional()});var rMo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),token:ae.string(),scope:ae.string()});var iMo=ae.objectWithoutOptionalProperties({maven:tMo,npm:rMo});var qzn=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),username:ae.string(),password:ae.string(),coordinate:ae.string(),signature:Azn.optional()});var Tzn=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),token:ae.string(),packageName:ae.string()});var nMo=ae.objectWithoutOptionalProperties({name:ae.string(),email:ae.string()});var aMo=ae.objectWithoutOptionalProperties({description:ae.string().optional(),authors:ae.list(nMo).optional()});var Czn=ae.objectWithoutOptionalProperties({keywords:ae.list(ae.string()).optional(),documentationLink:ae.string().optional(),homepageLink:ae.string().optional()}).extend(aMo);var Bzn=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),username:ae.string(),password:ae.string(),packageName:ae.string(),pypiMetadata:Czn.optional()});var Izn=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),apiKey:ae.string(),packageName:ae.string()});var zzn=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),apiKey:ae.string(),packageName:ae.string()});var oMo=ae.objectWithoutOptionalProperties({maven:qzn,npm:Tzn,pypi:Bzn,rubygems:Izn,nuget:zzn});var uMo=ae.objectWithoutOptionalProperties({apiKey:ae.string(),workspaceId:ae.string()});var sMo=ae.union("type",{maven:qzn,npm:Tzn,pypi:Bzn,postman:uMo,rubygems:Izn,nuget:zzn}).transform({transform:e=>{switch(e.type){case"maven":return j0.GeneratorPublishTarget.maven(e);case"npm":return j0.GeneratorPublishTarget.npm(e);case"pypi":return j0.GeneratorPublishTarget.pypi(e);case"postman":return j0.GeneratorPublishTarget.postman(e);case"rubygems":return j0.GeneratorPublishTarget.rubygems(e);case"nuget":return j0.GeneratorPublishTarget.nuget(e);default:return e}},untransform:({_visit:e,...t})=>t});var xzn=ae.objectWithoutOptionalProperties({registries:iMo,registriesV2:oMo,publishTarget:sMo.optional(),version:ae.string()});var a3=ae.string();var cMo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),packageName:ae.string(),tokenEnvironmentVariable:a3,shouldGeneratePublishWorkflow:ae.boolean().optional()});var lMo=ae.objectWithoutOptionalProperties({keyIdEnvironmentVariable:a3,passwordEnvironmentVariable:a3,secretKeyEnvironmentVariable:a3});var fMo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),coordinate:ae.string(),usernameEnvironmentVariable:a3,passwordEnvironmentVariable:a3,signature:lMo.optional(),shouldGeneratePublishWorkflow:ae.boolean().optional()});var dMo=ae.objectWithoutOptionalProperties({apiKeyEnvironmentVariable:a3,workspaceIdEnvironmentVariable:a3});var pMo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),packageName:ae.string(),usernameEnvironmentVariable:a3,passwordEnvironmentVariable:a3,pypiMetadata:Czn.optional(),shouldGeneratePublishWorkflow:ae.boolean().optional()});var _Mo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),packageName:ae.string(),apiKeyEnvironmentVariable:a3,shouldGeneratePublishWorkflow:ae.boolean().optional()});var hMo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),packageName:ae.string(),apiKeyEnvironmentVariable:a3,shouldGeneratePublishWorkflow:ae.boolean().optional()});var yMo=ae.union("type",{npm:cMo,maven:fMo,postman:dMo,pypi:pMo,rubygems:_Mo,nuget:hMo}).transform({transform:e=>{switch(e.type){case"npm":return j0.GithubPublishInfo.npm(e);case"maven":return j0.GithubPublishInfo.maven(e);case"postman":return j0.GithubPublishInfo.postman(e);case"pypi":return j0.GithubPublishInfo.pypi(e);case"rubygems":return j0.GithubPublishInfo.rubygems(e);case"nuget":return j0.GithubPublishInfo.nuget(e);default:return e}},untransform:({_visit:e,...t})=>t});var vMo=ae.objectWithoutOptionalProperties({version:ae.string(),repoUrl:ae.string(),installationToken:ae.string().optional(),publishInfo:yMo.optional()});var bMo=ae.union("type",{publish:xzn,downloadFiles:ae.object({}),github:vMo}).transform({transform:e=>{switch(e.type){case"publish":return j0.OutputMode.publish(e);case"downloadFiles":return j0.OutputMode.downloadFiles();case"github":return j0.OutputMode.github(e);default:return e}},untransform:({_visit:e,...t})=>t});var gMo=ae.objectWithoutOptionalProperties({path:ae.string(),snippetFilepath:ae.string().optional(),snippetTemplateFilepath:ae.string().optional(),publishingMetadata:eMo.optional(),mode:bMo});var OMo=ae.objectWithoutOptionalProperties({coordinatorUrl:ae.string(),coordinatorUrlV2:ae.string(),id:ae.string()});var mMo=ae.union(ae.discriminant("type","_type"),{local:ae.object({}),remote:OMo}).transform({transform:e=>{switch(e.type){case"local":return j0.GeneratorEnvironment.local();case"remote":return j0.GeneratorEnvironment.remote(e);default:return e}},untransform:({_visit:e,...t})=>t});var Wnp=ae.objectWithoutOptionalProperties({dryRun:ae.boolean(),irFilepath:ae.string(),originalReadmeFilepath:ae.string().optional(),license:kEo.optional(),output:gMo,publish:xzn.optional(),workspaceName:ae.string(),organization:ae.string(),customConfig:ae.unknown(),environment:mMo,whitelabel:ae.boolean(),writeUnitTests:ae.boolean(),generatePaginatedClients:ae.boolean().optional(),generateOauthClients:ae.boolean()});var c8s={};Dn(c8s,{AutogeneratedEndpointExample:()=>dAo,BytesRequest:()=>Lzn,BytesResponse:()=>Hzn,CursorPagination:()=>YMo,CustomPagination:()=>ZMo,DeclaredServiceName:()=>PMo,EndpointName:()=>wMo,ExampleCodeSample:()=>iAo,ExampleCodeSampleLanguage:()=>eAo,ExampleCodeSampleSdk:()=>rAo,ExampleEndpointCall:()=>Jzn,ExampleEndpointErrorResponse:()=>cAo,ExampleEndpointSuccessResponse:()=>sAo,ExampleHeader:()=>sWi,ExampleInlinedRequestBody:()=>Qzn,ExampleInlinedRequestBodyProperty:()=>aAo,ExamplePathParameter:()=>p1i,ExampleQueryParameter:()=>Gzn,ExampleQueryParameterShape:()=>nAo,ExampleRequestBody:()=>oAo,ExampleResponse:()=>lAo,ExampleServerSideEvent:()=>uAo,FileDownloadResponse:()=>Vzn,FileProperty:()=>AMo,FilePropertyArray:()=>MMo,FilePropertySingle:()=>EMo,FileUploadBodyProperty:()=>TMo,FileUploadBodyPropertyEncoding:()=>qMo,FileUploadRequest:()=>BMo,FileUploadRequestProperty:()=>CMo,GrpcTransport:()=>yAo,HttpEndpoint:()=>bAo,HttpEndpointSource:()=>vAo,HttpHeader:()=>lZ,HttpMethod:()=>mzn,HttpPath:()=>uRe,HttpPathPart:()=>jMo,HttpRequestBody:()=>IMo,HttpRequestBodyReference:()=>Fzn,HttpResponse:()=>QMo,HttpResponseBody:()=>GMo,HttpService:()=>mAo,InlinedRequestBody:()=>DMo,InlinedRequestBodyProperty:()=>Nzn,JsonResponse:()=>Uzn,JsonResponseBody:()=>FMo,JsonResponseBodyWithProperty:()=>LMo,JsonStreamChunk:()=>UMo,NonStreamHttpResponseBody:()=>HMo,OffsetPagination:()=>XMo,Pagination:()=>kMo,PathParameter:()=>BVt,PathParameterLocation:()=>SMo,QueryParameter:()=>c1i,RequestProperty:()=>OQ,RequestPropertyValue:()=>gDo,ResponseError:()=>JMo,ResponseErrors:()=>KMo,ResponseProperty:()=>Ene,SdkRequest:()=>NMo,SdkRequestBodyType:()=>zMo,SdkRequestShape:()=>RMo,SdkRequestWrapper:()=>xMo,SseStreamChunk:()=>WMo,StreamParameterResponse:()=>$Mo,StreamingResponse:()=>$zn,SupportedSdkLanguage:()=>tAo,TextResponse:()=>Wzn,TextStreamChunk:()=>VMo,Transport:()=>Yzn,UserSpecifiedEndpointExample:()=>fAo});var PMo=ae.objectWithoutOptionalProperties({fernFilepath:Mne});var jMo=ae.objectWithoutOptionalProperties({pathParameter:ae.string(),tail:ae.string()});var uRe=ae.objectWithoutOptionalProperties({head:ae.string(),parts:ae.list(jMo)});var wMo=Pd;var lZ=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy),env:ae.string().optional(),v2Examples:M9.optional()}).extend(w6);var SMo=ae.enum_(["ROOT","SERVICE","ENDPOINT"]);var Rzn=ae.string();var BVt=ae.objectWithoutOptionalProperties({name:Pd,valueType:ae.lazy(()=>Vy),location:SMo,variable:Rzn.optional(),v2Examples:M9.optional()}).extend(Cd);var CB=ae.objectWithoutOptionalProperties({typeId:kx,fernFilepath:Mne,name:Pd,displayName:bzn.optional()});var Nzn=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy),v2Examples:M9.optional()}).extend(l1i);var DMo=ae.objectWithoutOptionalProperties({name:Pd,extends:ae.list(CB),properties:ae.list(Nzn),extendedProperties:ae.list(sZ).optional(),extraProperties:ae.property("extra-properties",ae.boolean())}).extend(Cd).extend(TB).extend(aRe);var Fzn=ae.objectWithoutOptionalProperties({requestBodyType:ae.lazy(()=>Vy)}).extend(Cd).extend(aRe).extend(TB);var EMo=ae.objectWithoutOptionalProperties({key:Ah,isOptional:ae.boolean(),contentType:ae.string().optional()}).extend(Cd);var MMo=ae.objectWithoutOptionalProperties({key:Ah,isOptional:ae.boolean(),contentType:ae.string().optional()}).extend(Cd);var AMo=ae.union("type",{file:EMo,fileArray:MMo}).transform({transform:e=>{switch(e.type){case"file":return wne.file(e);case"fileArray":return wne.fileArray(e);default:return e}},untransform:({_visit:e,...t})=>t});var qMo=ae.enum_(["exploded","json","form"]);var TMo=ae.objectWithoutOptionalProperties({style:qMo.optional()}).extend(Nzn).extend(aRe);var CMo=ae.union("type",{file:ae.object({value:AMo}),bodyProperty:TMo}).transform({transform:e=>{switch(e.type){case"file":return j6.file(e.value);case"bodyProperty":return j6.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t});var BMo=ae.objectWithoutOptionalProperties({name:Pd,properties:ae.list(CMo)}).extend(Cd).extend(TB).extend(aRe);var Lzn=ae.objectWithoutOptionalProperties({isOptional:ae.boolean()}).extend(Cd).extend(TB).extend(aRe);var IMo=ae.union("type",{inlinedRequestBody:DMo,reference:Fzn,fileUpload:BMo,bytes:Lzn}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return Nq.inlinedRequestBody(e);case"reference":return Nq.reference(e);case"fileUpload":return Nq.fileUpload(e);case"bytes":return Nq.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t});var zMo=ae.union("type",{typeReference:Fzn,bytes:Lzn}).transform({transform:e=>{switch(e.type){case"typeReference":return AVt.typeReference(e);case"bytes":return AVt.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t});var xMo=ae.objectWithoutOptionalProperties({wrapperName:Pd,bodyKey:Pd,includePathParameters:ae.boolean().optional(),onlyPathParameters:ae.boolean().optional()});var RMo=ae.union("type",{justRequestBody:ae.object({value:zMo}),wrapper:xMo}).transform({transform:e=>{switch(e.type){case"justRequestBody":return iRe.justRequestBody(e.value);case"wrapper":return iRe.wrapper(e);default:return e}},untransform:({_visit:e,...t})=>t});var NMo=ae.objectWithoutOptionalProperties({streamParameter:OQ.optional(),requestParameterName:Pd,shape:RMo});var FMo=ae.objectWithoutOptionalProperties({responseBodyType:ae.lazy(()=>Vy)}).extend(Cd).extend(TB);var LMo=ae.objectWithoutOptionalProperties({responseBodyType:ae.lazy(()=>Vy),responseProperty:sZ.optional()}).extend(Cd).extend(TB);var Uzn=ae.union("type",{response:FMo,nestedPropertyAsResponse:LMo}).transform({transform:e=>{switch(e.type){case"response":return yQ.response(e);case"nestedPropertyAsResponse":return yQ.nestedPropertyAsResponse(e);default:return e}},untransform:({_visit:e,...t})=>t});var Vzn=ae.objectWithoutOptionalProperties({}).extend(Cd).extend(TB);var Wzn=ae.objectWithoutOptionalProperties({}).extend(Cd).extend(TB);var Hzn=ae.objectWithoutOptionalProperties({}).extend(Cd).extend(TB);var UMo=ae.objectWithoutOptionalProperties({payload:ae.lazy(()=>Vy),terminator:ae.string().optional()}).extend(Cd).extend(TB);var VMo=ae.objectWithoutOptionalProperties({}).extend(Cd).extend(TB);var WMo=ae.objectWithoutOptionalProperties({payload:ae.lazy(()=>Vy),terminator:ae.string().optional()}).extend(Cd).extend(TB);var $zn=ae.union("type",{json:UMo,text:VMo,sse:WMo}).transform({transform:e=>{switch(e.type){case"json":return j9.json(e);case"text":return j9.text(e);case"sse":return j9.sse(e);default:return e}},untransform:({_visit:e,...t})=>t});var HMo=ae.union("type",{json:ae.object({value:Uzn}),fileDownload:Vzn,text:Wzn,bytes:Hzn}).transform({transform:e=>{switch(e.type){case"json":return sW.json(e.value);case"fileDownload":return sW.fileDownload(e);case"text":return sW.text(e);case"bytes":return sW.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t});var $Mo=ae.objectWithoutOptionalProperties({nonStreamResponse:HMo,streamResponse:$zn});var GMo=ae.union("type",{json:ae.object({value:Uzn}),fileDownload:Vzn,text:Wzn,bytes:Hzn,streaming:ae.object({value:$zn}),streamParameter:$Mo}).transform({transform:e=>{switch(e.type){case"json":return zS.json(e.value);case"fileDownload":return zS.fileDownload(e);case"text":return zS.text(e);case"bytes":return zS.bytes(e);case"streaming":return zS.streaming(e.value);case"streamParameter":return zS.streamParameter(e);default:return e}},untransform:({_visit:e,...t})=>t});var QMo=ae.objectWithoutOptionalProperties({statusCode:ae.property("status-code",ae.number().optional()),body:GMo.optional()});var JMo=ae.objectWithoutOptionalProperties({error:d1i}).extend(Cd);var KMo=ae.list(JMo);var YMo=ae.objectWithoutOptionalProperties({page:OQ,next:Ene,results:Ene});var XMo=ae.objectWithoutOptionalProperties({page:OQ,results:Ene,hasNextPage:Ene.optional(),step:OQ.optional()});var ZMo=ae.objectWithoutOptionalProperties({results:Ene});var kMo=ae.union("type",{cursor:YMo,offset:XMo,custom:ZMo}).transform({transform:e=>{switch(e.type){case"cursor":return vQ.cursor(e);case"offset":return vQ.offset(e);case"custom":return vQ.custom(e);default:return e}},untransform:({_visit:e,...t})=>t});var eAo=ae.objectWithoutOptionalProperties({name:Pd.optional(),language:ae.string(),code:ae.string(),install:ae.string().optional()}).extend(Cd);var tAo=ae.enum_(["curl","python","javascript","typescript","go","ruby","csharp","java"]);var rAo=ae.objectWithoutOptionalProperties({name:Pd.optional(),sdk:tAo,code:ae.string()}).extend(Cd);var iAo=ae.union("type",{language:eAo,sdk:rAo}).transform({transform:e=>{switch(e.type){case"language":return TEe.language(e);case"sdk":return TEe.sdk(e);default:return e}},untransform:({_visit:e,...t})=>t});var p1i=ae.objectWithoutOptionalProperties({name:Pd,value:ae.lazyObject(()=>am)});var sWi=ae.objectWithoutOptionalProperties({name:Ah,value:ae.lazyObject(()=>am)});var nAo=ae.union("type",{single:ae.object({}),exploded:ae.object({}),commaSeparated:ae.object({})}).transform({transform:e=>{switch(e.type){case"single":return A2.single();case"exploded":return A2.exploded();case"commaSeparated":return A2.commaSeparated();default:return e}},untransform:({_visit:e,...t})=>t});var Gzn=ae.objectWithoutOptionalProperties({name:Ah,value:ae.lazyObject(()=>am),shape:nAo.optional()});var aAo=ae.objectWithoutOptionalProperties({name:Ah,value:ae.lazyObject(()=>am),originalTypeDeclaration:CB.optional()});var Qzn=ae.objectWithoutOptionalProperties({properties:ae.list(aAo)}).extend(fkt);var oAo=ae.union("type",{inlinedRequestBody:Qzn,reference:ae.lazyObject(()=>am)}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return bQ.inlinedRequestBody(e);case"reference":return bQ.reference(e);default:return e}},untransform:({_visit:e,...t})=>t});var uAo=ae.objectWithoutOptionalProperties({event:ae.string(),data:ae.lazyObject(()=>am)});var sAo=ae.union("type",{body:ae.object({value:ae.lazyObject(()=>am).optional()}),stream:ae.object({value:ae.list(ae.lazyObject(()=>am))}),sse:ae.object({value:ae.list(uAo)})}).transform({transform:e=>{switch(e.type){case"body":return XC.body(e.value);case"stream":return XC.stream(e.value);case"sse":return XC.sse(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var cAo=ae.objectWithoutOptionalProperties({error:d1i,body:ae.lazyObject(()=>am).optional()});var lAo=ae.union("type",{ok:ae.object({value:sAo}),error:cAo}).transform({transform:e=>{switch(e.type){case"ok":return xT.ok(e.value);case"error":return xT.error(e);default:return e}},untransform:({_visit:e,...t})=>t});var Jzn=ae.objectWithoutOptionalProperties({id:ae.string().optional(),name:Pd.optional(),url:ae.string(),rootPathParameters:ae.list(p1i),servicePathParameters:ae.list(p1i),endpointPathParameters:ae.list(p1i),serviceHeaders:ae.list(sWi),endpointHeaders:ae.list(sWi),queryParameters:ae.list(Gzn),request:oAo.optional(),response:lAo}).extend(Cd);var fAo=ae.objectWithoutOptionalProperties({codeSamples:ae.list(iAo).optional(),example:Jzn.optional()});var dAo=ae.objectWithoutOptionalProperties({example:Jzn});var pAo=ae.objectWithoutOptionalProperties({namespace:ae.string()});var _Ao=ae.objectWithoutOptionalProperties({csharp:pAo.optional()});var Kzn=ae.objectWithoutOptionalProperties({filepath:ae.string(),packageName:ae.string().optional(),options:_Ao.optional()});var hAo=ae.objectWithoutOptionalProperties({file:Kzn,name:Pd});var yAo=ae.objectWithoutOptionalProperties({service:hAo});var Yzn=ae.union("type",{http:ae.object({}),grpc:yAo}).transform({transform:e=>{switch(e.type){case"http":return tRe.http();case"grpc":return tRe.grpc(e);default:return e}},untransform:({_visit:e,...t})=>t});var vAo=ae.union("type",{proto:ae.object({}),openapi:ae.object({}),openrpc:ae.object({})}).transform({transform:e=>{switch(e.type){case"proto":return jne.proto();case"openapi":return jne.openapi();case"openrpc":return jne.openrpc();default:return e}},untransform:({_visit:e,...t})=>t});var bAo=ae.objectWithoutOptionalProperties({id:CVt,name:wMo,displayName:ae.string().optional(),method:mzn,headers:ae.list(lZ),baseUrl:cZ.optional(),v2BaseUrls:ae.list(cZ).optional(),basePath:uRe.optional(),path:uRe,fullPath:uRe,pathParameters:ae.list(BVt),allPathParameters:ae.list(BVt),queryParameters:ae.list(c1i),requestBody:IMo.optional(),sdkRequest:NMo.optional(),response:QMo.optional(),errors:KMo,auth:ae.boolean(),idempotent:ae.boolean(),pagination:kMo.optional(),userSpecifiedExamples:ae.list(fAo),autogeneratedExamples:ae.list(dAo),v2Examples:$Eo.optional(),transport:Yzn.optional(),source:vAo.optional(),audiences:ae.list(hzn).optional()}).extend(w6);var gAo=ae.objectWithoutOptionalProperties({});var OAo=ae.objectWithoutOptionalProperties({});var Xzn=ae.objectWithoutOptionalProperties({json:gAo.optional(),proto:OAo.optional()});var mAo=ae.objectWithoutOptionalProperties({availability:lkt.optional(),name:PMo,displayName:ae.string().optional(),basePath:uRe,endpoints:ae.list(bAo),headers:ae.list(lZ),pathParameters:ae.list(BVt),encoding:Xzn.optional(),transport:Yzn.optional(),audiences:ae.list(hzn).optional()});var l8s={};Dn(l8s,{ApiDefinitionSource:()=>xqo,ApiDefinitionSourceId:()=>Iqo,ApiVersionScheme:()=>jAo,ErrorDiscriminationByPropertyStrategy:()=>Dqo,ErrorDiscriminationStrategy:()=>Eqo,HeaderApiVersionScheme:()=>PAo,IntermediateRepresentation:()=>Hnp,Package:()=>ixn,PackageNavigationConfig:()=>wqo,PlatformHeaders:()=>Aqo,ProtoSource:()=>zqo,ReadmeConfig:()=>Bqo,SdkConfig:()=>qqo,ServiceTypeReferenceInfo:()=>Cqo,SourceConfig:()=>Rqo,Subpackage:()=>Sqo,UserAgent:()=>Mqo});var bli=ae.objectWithoutOptionalProperties({name:Ah}).extend(w6);var Zzn=ae.objectWithoutOptionalProperties({default:bli.optional(),values:ae.list(bli)});var PAo=ae.objectWithoutOptionalProperties({header:lZ,value:Zzn});var jAo=ae.union("type",{header:PAo}).transform({transform:e=>{switch(e.type){case"header":return o1i.header(e);default:return e}},untransform:({_visit:e,...t})=>t});var wAo=ae.enum_(["ENUM","OBJECT","UNION","UNDISCRIMINATED_UNION"]);var SAo=ae.objectWithoutOptionalProperties({name:CB,shape:wAo});var DAo=ae.objectWithoutOptionalProperties({min:ae.number().optional(),max:ae.number().optional(),exclusiveMin:ae.boolean().optional(),exclusiveMax:ae.boolean().optional(),multipleOf:ae.number().optional()});var EAo=ae.objectWithoutOptionalProperties({default:ae.number().optional(),validation:DAo.optional()});var MAo=ae.objectWithoutOptionalProperties({default:ae.number().optional()});var AAo=ae.objectWithoutOptionalProperties({});var qAo=ae.objectWithoutOptionalProperties({});var TAo=ae.objectWithoutOptionalProperties({});var CAo=ae.objectWithoutOptionalProperties({min:ae.number().optional(),max:ae.number().optional(),exclusiveMin:ae.boolean().optional(),exclusiveMax:ae.boolean().optional(),multipleOf:ae.number().optional()});var BAo=ae.objectWithoutOptionalProperties({default:ae.number().optional(),validation:CAo.optional()});var IAo=ae.objectWithoutOptionalProperties({default:ae.boolean().optional()});var zAo=ae.objectWithoutOptionalProperties({format:ae.string().optional(),pattern:ae.string().optional(),minLength:ae.number().optional(),maxLength:ae.number().optional()});var xAo=ae.objectWithoutOptionalProperties({default:ae.string().optional(),validation:zAo.optional()});var RAo=ae.objectWithoutOptionalProperties({});var NAo=ae.objectWithoutOptionalProperties({});var FAo=ae.objectWithoutOptionalProperties({});var LAo=ae.objectWithoutOptionalProperties({});var UAo=ae.objectWithoutOptionalProperties({default:ae.string().optional()});var VAo=ae.union("type",{integer:EAo,long:MAo,uint:AAo,uint64:qAo,float:TAo,double:BAo,boolean:IAo,string:xAo,date:RAo,dateTime:NAo,uuid:FAo,base64:LAo,bigInteger:UAo}).transform({transform:e=>{switch(e.type){case"integer":return pp.integer(e);case"long":return pp.long(e);case"uint":return pp.uint(e);case"uint64":return pp.uint64(e);case"float":return pp.float(e);case"double":return pp.double(e);case"boolean":return pp.boolean(e);case"string":return pp.string(e);case"date":return pp.date(e);case"dateTime":return pp.dateTime(e);case"uuid":return pp.uuid(e);case"base64":return pp.base64(e);case"bigInteger":return pp.bigInteger(e);default:return e}},untransform:({_visit:e,...t})=>t});var kzn=ae.objectWithoutOptionalProperties({v1:Dzn,v2:VAo.optional()});var WAo=ae.union(ae.discriminant("type","_type"),{container:ae.object({container:ae.lazy(()=>exn)}),named:SAo,primitive:ae.object({primitive:kzn}),unknown:ae.object({})}).transform({transform:e=>{switch(e.type){case"container":return cW.container(e.container);case"named":return cW.named(e);case"primitive":return cW.primitive(e.primitive);case"unknown":return cW.unknown();default:return e}},untransform:({_visit:e,...t})=>t});var HAo=ae.objectWithoutOptionalProperties({aliasOf:ae.lazy(()=>Vy),resolvedType:WAo});var $Ao=ae.objectWithoutOptionalProperties({extends:ae.list(CB),properties:ae.list(sZ),extendedProperties:ae.list(sZ).optional(),extraProperties:ae.property("extra-properties",ae.boolean())});var GAo=ae.objectWithoutOptionalProperties({name:Ah,type:ae.lazy(()=>Vy)});var QAo=ae.union(ae.discriminant("propertiesType","_type"),{samePropertiesAsObject:CB,singleProperty:GAo,noProperties:ae.object({})}).transform({transform:e=>{switch(e.propertiesType){case"samePropertiesAsObject":return w9.samePropertiesAsObject(e);case"singleProperty":return w9.singleProperty(e);case"noProperties":return w9.noProperties();default:return e}},untransform:({_visit:e,...t})=>t});var JAo=ae.objectWithoutOptionalProperties({discriminantValue:Ah,shape:QAo,displayName:ae.string().optional(),availability:lkt.optional()}).extend(Cd);var KAo=ae.objectWithoutOptionalProperties({discriminant:Ah,extends:ae.list(CB),types:ae.list(JAo),baseProperties:ae.list(sZ)});var YAo=ae.objectWithoutOptionalProperties({type:ae.lazy(()=>Vy)}).extend(Cd);var XAo=ae.objectWithoutOptionalProperties({members:ae.list(YAo)});var ZAo=ae.union(ae.discriminant("type","_type"),{alias:HAo,enum:Zzn,object:$Ao,union:KAo,undiscriminatedUnion:XAo}).transform({transform:e=>{switch(e.type){case"alias":return Dg.alias(e);case"enum":return Dg.enum(e);case"object":return Dg.object(e);case"union":return Dg.union(e);case"undiscriminatedUnion":return Dg.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t});var j1a=ae.objectWithoutOptionalProperties({name:Pd.optional(),shape:ae.lazy(()=>txn)}).extend(fkt).extend(Cd);var kAo=ae.union("type",{any:ae.object({}),api:ae.object({}),boolValue:ae.object({}),bytesValue:ae.object({}),doubleValue:ae.object({}),duration:ae.object({}),empty:ae.object({}),enum:ae.object({}),enumValue:ae.object({}),field:ae.object({}),fieldCardinality:ae.object({}),fieldKind:ae.object({}),fieldMask:ae.object({}),floatValue:ae.object({}),int32Value:ae.object({}),int64Value:ae.object({}),listValue:ae.object({}),method:ae.object({}),mixin:ae.object({}),nullValue:ae.object({}),option:ae.object({}),sourceContext:ae.object({}),stringValue:ae.object({}),struct:ae.object({}),syntax:ae.object({}),timestamp:ae.object({}),type:ae.object({}),uint32Value:ae.object({}),uint64Value:ae.object({}),value:ae.object({})}).transform({transform:e=>{switch(e.type){case"any":return id.any();case"api":return id.api();case"boolValue":return id.boolValue();case"bytesValue":return id.bytesValue();case"doubleValue":return id.doubleValue();case"duration":return id.duration();case"empty":return id.empty();case"enum":return id.enum();case"enumValue":return id.enumValue();case"field":return id.field();case"fieldCardinality":return id.fieldCardinality();case"fieldKind":return id.fieldKind();case"fieldMask":return id.fieldMask();case"floatValue":return id.floatValue();case"int32Value":return id.int32Value();case"int64Value":return id.int64Value();case"listValue":return id.listValue();case"method":return id.method();case"mixin":return id.mixin();case"nullValue":return id.nullValue();case"option":return id.option();case"sourceContext":return id.sourceContext();case"stringValue":return id.stringValue();case"struct":return id.struct();case"syntax":return id.syntax();case"timestamp":return id.timestamp();case"type":return id.type();case"uint32Value":return id.uint32Value();case"uint64Value":return id.uint64Value();case"value":return id.value();default:return e}},untransform:({_visit:e,...t})=>t});var eqo=ae.objectWithoutOptionalProperties({file:Kzn,name:Pd});var tqo=ae.union("type",{wellKnown:ae.object({value:kAo}),userDefined:eqo}).transform({transform:e=>{switch(e.type){case"wellKnown":return Yj.wellKnown(e.value);case"userDefined":return Yj.userDefined(e);default:return e}},untransform:({_visit:e,...t})=>t});var rqo=ae.union("type",{proto:ae.object({value:tqo})}).transform({transform:e=>{switch(e.type){case"proto":return vli.proto(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var iqo=ae.objectWithoutOptionalProperties({name:CB,shape:ZAo,autogeneratedExamples:ae.list(j1a),userProvidedExamples:ae.list(j1a),v2Examples:M9.optional(),referencedTypes:ae.set(kx),encoding:Xzn.optional(),source:rqo.optional(),inline:ae.boolean().optional()}).extend(w6);var nqo=Pd;var aqo=ae.enum_(["GET","POST"]);var oqo=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy)}).extend(l1i);var uqo=ae.objectWithoutOptionalProperties({name:Pd,extends:ae.list(CB),properties:ae.list(oqo)});var sqo=ae.objectWithoutOptionalProperties({payloadType:ae.lazy(()=>Vy)}).extend(Cd);var cqo=ae.union("type",{inlinedPayload:uqo,reference:sqo}).transform({transform:e=>{switch(e.type){case"inlinedPayload":return lW.inlinedPayload(e);case"reference":return lW.reference(e);default:return e}},untransform:({_visit:e,...t})=>t});var lqo=ae.objectWithoutOptionalProperties({name:Pd.optional(),payload:ae.lazyObject(()=>am)}).extend(Cd);var fqo=ae.objectWithoutOptionalProperties({id:qDo,name:nqo,displayName:ae.string().optional(),method:aqo,headers:ae.list(lZ),payload:cqo,examples:ae.list(lqo).optional(),v2Examples:KEo.optional()}).extend(w6);var dqo=ae.list(fqo);var pqo=Pd;var rxn=ae.string();var _qo=ae.enum_(["client","server"]);var hqo=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy)}).extend(l1i);var yqo=ae.objectWithoutOptionalProperties({name:Pd,extends:ae.list(CB),properties:ae.list(hqo)});var vqo=ae.objectWithoutOptionalProperties({bodyType:ae.lazy(()=>Vy)}).extend(Cd);var bqo=ae.union("type",{inlinedBody:yqo,reference:vqo}).transform({transform:e=>{switch(e.type){case"inlinedBody":return D9.inlinedBody(e);case"reference":return D9.reference(e);default:return e}},untransform:({_visit:e,...t})=>t});var gqo=ae.objectWithoutOptionalProperties({type:rxn,displayName:ae.string().optional(),origin:_qo,body:bqo}).extend(w6);var Oqo=ae.union("type",{inlinedBody:Qzn,reference:ae.lazyObject(()=>am)}).transform({transform:e=>{switch(e.type){case"inlinedBody":return BEe.inlinedBody(e);case"reference":return BEe.reference(e);default:return e}},untransform:({_visit:e,...t})=>t});var mqo=ae.objectWithoutOptionalProperties({type:rxn,body:Oqo});var Pqo=ae.objectWithoutOptionalProperties({name:Pd.optional(),url:ae.string(),pathParameters:ae.list(p1i),headers:ae.list(sWi),queryParameters:ae.list(Gzn),messages:ae.list(mqo)}).extend(Cd);var jqo=ae.objectWithoutOptionalProperties({name:pqo,displayName:ae.string().optional(),baseUrl:cZ.optional(),path:uRe,auth:ae.boolean(),headers:ae.list(lZ),queryParameters:ae.list(c1i),pathParameters:ae.list(BVt),messages:ae.list(gqo),examples:ae.list(Pqo),v2Examples:JEo.optional()}).extend(w6);var wqo=ae.objectWithoutOptionalProperties({pointsTo:ckt});var ixn=ae.objectWithoutOptionalProperties({fernFilepath:Mne,service:skt.optional(),types:ae.list(kx),errors:ae.list(f1i),webhooks:gzn.optional(),websocket:Ozn.optional(),subpackages:ae.list(ckt),hasEndpointsInTree:ae.boolean(),navigationConfig:wqo.optional()}).extend(Cd);var Sqo=ae.objectWithoutOptionalProperties({name:Pd}).extend(ixn);var Dqo=ae.objectWithoutOptionalProperties({discriminant:Ah,contentProperty:Ah});var Eqo=ae.union("type",{statusCode:ae.object({}),property:Dqo}).transform({transform:e=>{switch(e.type){case"statusCode":return CEe.statusCode();case"property":return CEe.property(e);default:return e}},untransform:({_visit:e,...t})=>t});var Mqo=ae.objectWithoutOptionalProperties({header:ae.stringLiteral("User-Agent"),value:ae.string()});var Aqo=ae.objectWithoutOptionalProperties({language:ae.string(),sdkName:ae.string(),sdkVersion:ae.string(),userAgent:Mqo.optional()});var qqo=ae.objectWithoutOptionalProperties({isAuthMandatory:ae.boolean(),hasStreamingEndpoints:ae.boolean(),hasPaginatedEndpoints:ae.boolean(),hasFileDownloadEndpoints:ae.boolean(),platformHeaders:Aqo});var Tqo=ae.objectWithoutOptionalProperties({id:Rzn,name:Pd,type:ae.lazy(()=>Vy)}).extend(Cd);var Cqo=ae.objectWithoutOptionalProperties({typesReferencedOnlyByService:ae.record(skt,ae.list(kx)),sharedTypes:ae.list(kx)});var Bqo=ae.objectWithoutOptionalProperties({defaultEndpoint:CVt.optional(),bannerLink:ae.string().optional(),introduction:ae.string().optional(),apiReferenceLink:ae.string().optional(),features:ae.record(TDo,ae.list(CVt)).optional()});var Iqo=ae.string();var zqo=ae.objectWithoutOptionalProperties({id:Iqo,protoRootUrl:ae.string()});var xqo=ae.union("type",{proto:zqo,openapi:ae.object({})}).transform({transform:e=>{switch(e.type){case"proto":return Dne.proto(e);case"openapi":return Dne.openapi();default:return e}},untransform:({_visit:e,...t})=>t});var Rqo=ae.objectWithoutOptionalProperties({sources:ae.list(xqo)});var Nqo=ae.objectWithoutOptionalProperties({apiKey:ae.string(),workspaceId:ae.string(),collectionId:ae.string().optional()});var Fqo=ae.objectWithoutOptionalProperties({version:ae.string().optional(),packageName:ae.string().optional(),tokenEnvironmentVariable:ae.string()});var Lqo=ae.objectWithoutOptionalProperties({coordinate:ae.string().optional(),version:ae.string().optional(),usernameEnvironmentVariable:ae.string(),passwordEnvironmentVariable:ae.string(),mavenUrlEnvironmentVariable:ae.string()});var nxn=ae.union("type",{postman:Nqo,npm:Fqo,maven:Lqo}).transform({transform:e=>{switch(e.type){case"postman":return okt.postman(e);case"npm":return okt.npm(e);case"maven":return okt.maven(e);default:return e}},untransform:({_visit:e,...t})=>t});var Uqo=ae.objectWithoutOptionalProperties({owner:ae.string(),repo:ae.string(),uri:ae.string().optional(),token:ae.string().optional(),target:nxn});var Vqo=ae.objectWithoutOptionalProperties({target:nxn});var Wqo=ae.objectWithoutOptionalProperties({generateFullProject:ae.boolean()});var Hqo=ae.union("type",{github:Uqo,direct:Vqo,filesystem:Wqo}).transform({transform:e=>{switch(e.type){case"github":return akt.github(e);case"direct":return akt.direct(e);case"filesystem":return akt.filesystem(e);default:return e}},untransform:({_visit:e,...t})=>t});var Hnp=ae.objectWithoutOptionalProperties({fdrApiDefinitionId:ae.string().optional(),apiVersion:jAo.optional(),apiName:Pd,apiDisplayName:ae.string().optional(),apiDocs:ae.string().optional(),auth:MDo,headers:ae.list(lZ),idempotencyHeaders:ae.list(lZ),types:ae.record(kx,iqo),services:ae.record(skt,mAo),webhookGroups:ae.record(gzn,dqo),websocketChannels:ae.record(Ozn,jqo).optional(),errors:ae.record(f1i,BEo),subpackages:ae.record(ckt,Sqo),rootPackage:ixn,constants:CDo,environments:Szn.optional(),basePath:uRe.optional(),pathParameters:ae.list(BVt),errorDiscriminationStrategy:Eqo,sdkConfig:qqo,variables:ae.list(Tqo),serviceTypeReferenceInfo:Cqo,readmeConfig:Bqo.optional(),sourceConfig:Rqo.optional(),publishConfig:Hqo.optional(),dynamic:MEo.optional(),selfHosted:ae.boolean().optional(),audiences:ae.list(dDo).optional()});var f8s={};Dn(f8s,{CsharpProtobufFileOptions:()=>pAo,ProtobufFile:()=>Kzn,ProtobufFileOptions:()=>_Ao,ProtobufService:()=>hAo,ProtobufType:()=>tqo,UserDefinedProtobufType:()=>eqo,WellKnownProtobufType:()=>kAo});var d8s={};Dn(d8s,{DirectPublish:()=>Vqo,Filesystem:()=>Wqo,GithubPublish:()=>Uqo,MavenPublishTarget:()=>Lqo,NpmPublishTarget:()=>Fqo,PostmanPublishTarget:()=>Nqo,PublishTarget:()=>nxn,PublishingConfig:()=>Hqo});var p8s={};Dn(p8s,{AliasTypeDeclaration:()=>HAo,Base64Type:()=>LAo,BigIntegerType:()=>UAo,BooleanType:()=>IAo,ContainerType:()=>exn,DateTimeType:()=>NAo,DateType:()=>RAo,DeclaredTypeName:()=>CB,DoubleType:()=>BAo,DoubleValidationRules:()=>CAo,Encoding:()=>Xzn,EnumTypeDeclaration:()=>Zzn,EnumTypeReference:()=>$np,EnumValue:()=>bli,ExampleAliasType:()=>Yqo,ExampleContainer:()=>aTo,ExampleDatetime:()=>nTo,ExampleEnumType:()=>Kqo,ExampleKeyValuePair:()=>pTo,ExampleListContainer:()=>sTo,ExampleLiteralContainer:()=>uTo,ExampleMapContainer:()=>dTo,ExampleNamedType:()=>oTo,ExampleNullableContainer:()=>fTo,ExampleObjectProperty:()=>kqo,ExampleObjectType:()=>axn,ExampleObjectTypeWithTypeId:()=>rTo,ExampleOptionalContainer:()=>lTo,ExamplePrimitive:()=>oxn,ExampleSetContainer:()=>cTo,ExampleSingleUnionType:()=>eTo,ExampleSingleUnionTypeProperties:()=>tTo,ExampleType:()=>j1a,ExampleTypeReference:()=>am,ExampleTypeReferenceShape:()=>iTo,ExampleTypeShape:()=>txn,ExampleUndiscriminatedUnionType:()=>Zqo,ExampleUnionType:()=>Xqo,FloatType:()=>TAo,IntegerType:()=>EAo,IntegerValidationRules:()=>DAo,JsonEncoding:()=>gAo,Literal:()=>Qqo,LongType:()=>MAo,MapType:()=>Jqo,NamedType:()=>Gqo,NamedTypeDefault:()=>$qo,ObjectProperty:()=>sZ,ObjectPropertyAccess:()=>bDo,ObjectTypeDeclaration:()=>$Ao,PrimitiveType:()=>kzn,PrimitiveTypeV1:()=>Dzn,PrimitiveTypeV2:()=>VAo,ProtoEncoding:()=>OAo,ResolvedNamedType:()=>SAo,ResolvedTypeReference:()=>WAo,ShapeType:()=>wAo,SingleUnionType:()=>JAo,SingleUnionTypeProperties:()=>QAo,SingleUnionTypeProperty:()=>GAo,Source:()=>rqo,StringType:()=>xAo,StringValidationRules:()=>zAo,Type:()=>ZAo,TypeDeclaration:()=>iqo,TypeReference:()=>Vy,Uint64Type:()=>qAo,UintType:()=>AAo,UndiscriminatedUnionMember:()=>YAo,UndiscriminatedUnionTypeDeclaration:()=>XAo,UnionTypeDeclaration:()=>KAo,UuidType:()=>FAo});var $qo=ae.union("type",{enum:bli}).transform({transform:e=>{switch(e.type){case"enum":return fzn.enum(e);default:return e}},untransform:({_visit:e,...t})=>t});var Gqo=ae.objectWithoutOptionalProperties({typeId:kx,fernFilepath:Mne,name:Pd,displayName:bzn.optional(),default:$qo.optional(),inline:ae.boolean().optional()});var Vy=ae.union(ae.discriminant("type","_type"),{container:ae.object({container:ae.lazy(()=>exn)}),named:Gqo,primitive:ae.object({primitive:kzn}),unknown:ae.object({})}).transform({transform:e=>{switch(e.type){case"container":return rf.container(e.container);case"named":return rf.named(e);case"primitive":return rf.primitive(e.primitive);case"unknown":return rf.unknown();default:return e}},untransform:({_visit:e,...t})=>t});var $np=ae.objectWithoutOptionalProperties({default:bli.optional(),name:CB});var Qqo=ae.union("type",{string:ae.object({string:ae.string()}),boolean:ae.object({boolean:ae.boolean()})}).transform({transform:e=>{switch(e.type){case"string":return S9.string(e.string);case"boolean":return S9.boolean(e.boolean);default:return e}},untransform:({_visit:e,...t})=>t});var exn=ae.union(ae.discriminant("type","_type"),{list:ae.object({list:ae.lazy(()=>Vy)}),map:ae.lazyObject(()=>Jqo),nullable:ae.object({nullable:ae.lazy(()=>Vy)}),optional:ae.object({optional:ae.lazy(()=>Vy)}),set:ae.object({set:ae.lazy(()=>Vy)}),literal:ae.object({literal:Qqo})}).transform({transform:e=>{switch(e.type){case"list":return Av.list(e.list);case"map":return Av.map(e);case"nullable":return Av.nullable(e.nullable);case"optional":return Av.optional(e.optional);case"set":return Av.set(e.set);case"literal":return Av.literal(e.literal);default:return e}},untransform:({_visit:e,...t})=>t});var Jqo=ae.objectWithoutOptionalProperties({keyType:ae.lazy(()=>Vy),valueType:ae.lazy(()=>Vy)});var Kqo=ae.objectWithoutOptionalProperties({value:Ah});var txn=ae.union("type",{alias:ae.lazyObject(()=>Yqo),enum:Kqo,object:ae.lazyObject(()=>axn),union:ae.lazyObject(()=>Xqo),undiscriminatedUnion:ae.lazyObject(()=>Zqo)}).transform({transform:e=>{switch(e.type){case"alias":return Rw.alias(e);case"enum":return Rw.enum(e);case"object":return Rw.object(e);case"union":return Rw.union(e);case"undiscriminatedUnion":return Rw.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t});var Yqo=ae.objectWithoutOptionalProperties({value:ae.lazyObject(()=>am)});var axn=ae.objectWithoutOptionalProperties({properties:ae.list(ae.lazyObject(()=>kqo))});var kqo=ae.objectWithoutOptionalProperties({name:Ah,value:ae.lazyObject(()=>am),originalTypeDeclaration:CB});var Xqo=ae.objectWithoutOptionalProperties({discriminant:Ah,singleUnionType:ae.lazyObject(()=>eTo)});var Zqo=ae.objectWithoutOptionalProperties({index:ae.number(),singleUnionType:ae.lazyObject(()=>am)});var eTo=ae.objectWithoutOptionalProperties({wireDiscriminantValue:Ah,shape:ae.lazy(()=>tTo)});var tTo=ae.union("type",{samePropertiesAsObject:ae.lazyObject(()=>rTo),singleProperty:ae.lazyObject(()=>am),noProperties:ae.object({})}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return n3.samePropertiesAsObject(e);case"singleProperty":return n3.singleProperty(e);case"noProperties":return n3.noProperties();default:return e}},untransform:({_visit:e,...t})=>t});var am=ae.objectWithoutOptionalProperties({shape:ae.lazy(()=>iTo)}).extend(fkt);var nTo=ae.objectWithoutOptionalProperties({datetime:ae.date(),raw:ae.string().optional()});var oxn=ae.union("type",{integer:ae.object({integer:ae.number()}),long:ae.object({long:ae.number()}),uint:ae.object({uint:ae.number()}),uint64:ae.object({uint64:ae.number()}),float:ae.object({float:ae.number()}),double:ae.object({double:ae.number()}),boolean:ae.object({boolean:ae.boolean()}),string:ae.object({string:ADo}),date:ae.object({date:ae.string()}),datetime:nTo,uuid:ae.object({uuid:ae.string()}),base64:ae.object({base64:ae.string()}),bigInteger:ae.object({bigInteger:ae.string()})}).transform({transform:e=>{switch(e.type){case"integer":return Nd.integer(e.integer);case"long":return Nd.long(e.long);case"uint":return Nd.uint(e.uint);case"uint64":return Nd.uint64(e.uint64);case"float":return Nd.float(e.float);case"double":return Nd.double(e.double);case"boolean":return Nd.boolean(e.boolean);case"string":return Nd.string(e.string);case"date":return Nd.date(e.date);case"datetime":return Nd.datetime(e);case"uuid":return Nd.uuid(e.uuid);case"base64":return Nd.base64(e.base64);case"bigInteger":return Nd.bigInteger(e.bigInteger);default:return e}},untransform:({_visit:e,...t})=>t});var iTo=ae.union("type",{primitive:ae.object({primitive:oxn}),container:ae.object({container:ae.lazy(()=>aTo)}),unknown:ae.object({unknown:ae.unknown()}),named:ae.lazyObject(()=>oTo)}).transform({transform:e=>{switch(e.type){case"primitive":return Lh.primitive(e.primitive);case"container":return Lh.container(e.container);case"unknown":return Lh.unknown(e.unknown);case"named":return Lh.named(e);default:return e}},untransform:({_visit:e,...t})=>t});var uTo=ae.objectWithoutOptionalProperties({literal:oxn});var aTo=ae.union("type",{list:ae.lazyObject(()=>sTo),set:ae.lazyObject(()=>cTo),optional:ae.lazyObject(()=>lTo),nullable:ae.lazyObject(()=>fTo),map:ae.lazyObject(()=>dTo),literal:uTo}).transform({transform:e=>{switch(e.type){case"list":return Pm.list(e);case"set":return Pm.set(e);case"optional":return Pm.optional(e);case"nullable":return Pm.nullable(e);case"map":return Pm.map(e);case"literal":return Pm.literal(e);default:return e}},untransform:({_visit:e,...t})=>t});var sTo=ae.objectWithoutOptionalProperties({list:ae.list(ae.lazyObject(()=>am)),itemType:ae.lazy(()=>Vy)});var cTo=ae.objectWithoutOptionalProperties({set:ae.list(ae.lazyObject(()=>am)),itemType:ae.lazy(()=>Vy)});var lTo=ae.objectWithoutOptionalProperties({optional:ae.lazyObject(()=>am).optional(),valueType:ae.lazy(()=>Vy)});var fTo=ae.objectWithoutOptionalProperties({nullable:ae.lazyObject(()=>am).optional(),valueType:ae.lazy(()=>Vy)});var dTo=ae.objectWithoutOptionalProperties({map:ae.list(ae.lazyObject(()=>pTo)),keyType:ae.lazy(()=>Vy),valueType:ae.lazy(()=>Vy)});var pTo=ae.objectWithoutOptionalProperties({key:ae.lazyObject(()=>am),value:ae.lazyObject(()=>am)});var oTo=ae.objectWithoutOptionalProperties({typeName:CB,shape:ae.lazy(()=>txn)});var rTo=ae.objectWithoutOptionalProperties({typeId:kx,object:ae.lazyObject(()=>axn)});var _8s={};Dn(_8s,{VariableDeclaration:()=>Tqo,VariableId:()=>Rzn});var h8s={};Dn(h8s,{ExampleWebhookCall:()=>lqo,InlinedWebhookPayload:()=>uqo,InlinedWebhookPayloadProperty:()=>oqo,Webhook:()=>fqo,WebhookGroup:()=>dqo,WebhookHttpMethod:()=>aqo,WebhookName:()=>nqo,WebhookPayload:()=>cqo,WebhookPayloadReference:()=>sqo});var y8s={};Dn(y8s,{ExampleWebSocketMessage:()=>mqo,ExampleWebSocketMessageBody:()=>Oqo,ExampleWebSocketSession:()=>Pqo,InlinedWebSocketMessageBody:()=>yqo,InlinedWebSocketMessageBodyProperty:()=>hqo,WebSocketChannel:()=>jqo,WebSocketMessage:()=>gqo,WebSocketMessageBody:()=>bqo,WebSocketMessageBodyReference:()=>vqo,WebSocketMessageId:()=>rxn,WebSocketMessageOrigin:()=>_qo,WebSocketName:()=>pqo});var fZ={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 Ane={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 cWi({type:e,_default:t,validation:r,visitor:i}){switch(e){case fZ.integer:{let o=r??void 0;return i.primitive({v1:Xv.Integer,v2:pp.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 fZ.double:{let o=r??void 0;return i.primitive({v1:Xv.Double,v2:pp.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 fZ.string:{let o=r??void 0;return i.primitive({v1:Xv.String,v2:pp.string({default:t??void 0,validation:o!=null?{format:o.format,pattern:o.pattern,minLength:o.minLength,maxLength:o.maxLength}:void 0})})}case fZ.float:return i.primitive({v1:Xv.Float,v2:void 0});case fZ.long:return i.primitive({v1:Xv.Long,v2:pp.long({default:t??void 0})});case fZ.boolean:return i.primitive({v1:Xv.Boolean,v2:pp.boolean({default:t??void 0})});case fZ.datetime:return i.primitive({v1:Xv.DateTime,v2:void 0});case fZ.date:return i.primitive({v1:Xv.Date,v2:void 0});case fZ.uuid:return i.primitive({v1:Xv.Uuid,v2:void 0});case fZ.base64:return i.primitive({v1:Xv.Base64,v2:void 0});case fZ.bigint:return i.primitive({v1:Xv.BigInteger,v2:pp.bigInteger({default:t??void 0})});case fZ.uint:return i.primitive({v1:Xv.Uint,v2:void 0});case fZ.uint64:return i.primitive({v1:Xv.Uint64,v2:void 0});case fZ.unknown:return i.unknown()}let n=e.match(Ane.MAP);if(n?.[1]!=null&&n[2]!=null)return i.map({keyType:n[1],valueType:n[2]});let a=e.match(Ane.LIST);if(a?.[1]!=null)return i.list(a[1]);let u=e.match(Ane.SET);if(u?.[1]!=null)return i.set(u[1]);let l=e.match(Ane.OPTIONAL);if(l?.[1]!=null)return i.optional(l[1]);let d=e.match(Ane.NULLABLE);if(d?.[1]!=null)return i.nullable(d[1]);let s=e.match(Ane.LITERAL);if(s?.[1]!=null)return i.literal(S9.string(s[1]));if(s?.[2]!=null){let o=s[2];switch(o){case"false":return i.literal(S9.boolean(!1));case"true":return i.literal(S9.boolean(!0));default:throw new Error(`Unsupported literal value: ${o}`)}}return i.named(e)}var Gnp="bytes";function _kt(e){if(e===Gnp)return{isOptional:!1};if(e.match(Ane.OPTIONAL)?.[1]===Gnp)return{isOptional:!0}}function w1a(e){let t=typeof e=="string"?e:typeof e.body=="string"?e.body:void 0;if(t!=null)return _kt(t)}function b8s({input:e,typeName:t}){for(let r of e.arguments)if(typeof r=="string"){if(r===t)return!0}else if(b8s({input:r,typeName:t}))return!0;return!1}function Qnp(e){return b8s({input:e,typeName:"file"})}function Jnp(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 g8s="file";function Knp(e){return e.match(Ane.LIST)?.[1]===g8s}function sRe(e){if(e===g8s)return{isOptional:!1,isArray:!1};let t=e.match(Ane.OPTIONAL);if(t?.[1]!==void 0){if(t[1]===g8s)return{isOptional:!0,isArray:!1};if(Knp(t[1]))return{isOptional:!0,isArray:!0}}if(Knp(e))return{isOptional:!1,isArray:!0}}function QmS(e){return typeof e=="string"?!1:hM.parse(e["content-type"])?.isMultiPartFormData()??!1?!0:e.body==null?!1:!!(YC(e.body)&&Object.values(e.body.properties??[]).some(KmS))}function lWi(e){if(!(!QmS(e)||e.body==null)&&e.name!=null&&e.body!=null&&YC(e.body))return JmS(e.name,e.body)}function JmS(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=sRe(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 KmS(e){let t=typeof e=="string"?e:e.type;if(t==="file")return!0;if(!t.includes("file"))return!1;let r=Jnp(t);return r==null?!1:Qnp(r)}var Ynp="text";function S1a(e){if(e===Ynp)return{isOptional:!1};if(e.match(Ane.OPTIONAL)?.[1]===Ynp)return{isOptional:!0}}function q2({type:e,_default:t,validation:r,visitor:i}){return cWi({type:e,_default:t,validation:r,visitor:{primitive:i.primitive,map:({keyType:n,valueType:a})=>i.map({keyType:q2({type:n,_default:void 0,validation:void 0,visitor:i}),valueType:q2({type:a,_default:void 0,validation:void 0,visitor:i})}),list:n=>i.list(q2({type:n,_default:void 0,validation:void 0,visitor:i})),set:n=>i.set(q2({type:n,_default:void 0,validation:void 0,visitor:i})),optional:n=>i.optional(q2({type:n,_default:t,validation:r,visitor:i})),nullable:n=>i.nullable(q2({type:n,_default:t,validation:r,visitor:i})),literal:i.literal,named:i.named,unknown:i.unknown}})}function O8s(e,t){if(YmS(e))return t.sdk(e);if(XmS(e))return t.language(e);jo(e)}function YmS(e){return e.sdk!=null}function XmS(e){return e.language!=null}function Xnp(e){return e["response-stream"]!=null&&(typeof e["response-stream"]=="string"||e["response-stream"].format==null||e["response-stream"].format==="json")}function Znp(e){return e["response-stream"]!=null&&typeof e["response-stream"]!="string"&&e["response-stream"].format==="sse"}function fWi(e,t,r){return ZmS(e,t)?r.stream(t):kmS(e,t)?r.events(t):r.body(t)}function ZmS(e,t){return t.stream!==void 0&&Xnp(e)}function kmS(e,t){return t.stream!==void 0&&Znp(e)}function dWi(e,t){if(knp(e))return t.single(e);if(eap(e))return t.any(e);jo(e)}function knp(e){return typeof e=="string"||e.scheme!=null}function eap(e){let[t,...r]=Object.keys(e);return t==="any"&&r.length===0}function D1a(e,t){if(tap(e))return t.header(e);switch(e.scheme){case"basic":return t.basic(e);case"bearer":return t.bearer(e);case"oauth":return t.oauth(e);default:jo(e)}}function tap(e){return e.header!=null}function hkt(e,t){if(rap(e))return t.singleBaseUrl(e);if(uxn(e))return t.multipleBaseUrls(e);jo(e)}function rap(e){return typeof e=="string"||"url"in e}function uxn(e){return typeof e!="string"&&"urls"in e}function sxn(e){return typeof e=="string"?e.startsWith("$"):"variable"in e}function o3(e,t){if(_1i(e))return t.alias(e);if(h1i(e))return t.discriminatedUnion(e);if(xS(e))return t.object(e);if(cxn(e))return t.undiscriminatedUnion(e);if(IVt(e))return t.enum(e);jo(e)}function _1i(e){return typeof e=="string"||e.type!=null}function xS(e){return e.extends!=null||e.properties!=null}function h1i(e){return e.union!=null&&e.discriminated==null}function cxn(e){let t=e;return t.union!=null&&t.discriminated!=null}function IVt(e){return e.enum!=null}var pWi=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 iA=ai(BWi(),1),P9s=ai(_O(),1),x1i={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 lpp({absolutePathToGeneratorsConfiguration:e,rawGeneratorsConfiguration:t,context:r}){let i=hpp(t.metadata),n=t.readme;rCS(r,t);let a=await $TS(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])=>GTS({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 RCo(e){return{...x1i,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"],preserveSingleSchemaOneOf:e?.["preserve-single-schema-oneof"]}}function fpp(e){return{...dpp(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 WTS(e){return{...dpp(e),asyncApiMessageNaming:e?.["message-naming"]}}function dpp(e){return{...x1i,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 upp(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:{...x1i}});else if(by.isRawProtobufAPIDefinitionSchema(e))r.push({schema:{type:"protobuf",root:e.proto.root,target:e.proto.target,localGeneration:e.proto["local-generation"]??!1},origin:void 0,overrides:e.proto.overrides,audiences:[],settings:{...x1i}});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:{...x1i}}):by.isRawProtobufAPIDefinitionSchema(i)?r.push({schema:{type:"protobuf",root:i.proto.root,target:i.proto.target,localGeneration:i.proto["local-generation"]??!1},origin:void 0,overrides:i.proto.overrides,audiences:[],settings:{...x1i}}):r.push({schema:{type:"oss",path:i.path},origin:i.origin,overrides:i.overrides,audiences:i.audiences,settings:RCo(i.settings)});else r.push({schema:{type:"oss",path:e.path},origin:e.origin,overrides:e.overrides,audiences:e.audiences,settings:RCo(e.settings)});else{let i=t[by.API_SETTINGS_KEY],n=t[by.OPENAPI_LOCATION_KEY],a=t[by.API_ORIGIN_LOCATION_KEY],u=t[by.OPENAPI_OVERRIDES_LOCATION_KEY],l=t[by.ASYNC_API_LOCATION_KEY];n!=null&&(typeof n=="string"?r.push({schema:{type:"oss",path:n},origin:a,overrides:u,audiences:[],settings:RCo(i)}):typeof n=="object"&&r.push({schema:{type:"oss",path:n.path},origin:n.origin,overrides:n.overrides,audiences:[],settings:fpp(n.settings)})),l!=null&&r.push({schema:{type:"oss",path:l},origin:a,overrides:void 0,audiences:[],settings:RCo(i)})}return r}async function HTS({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:dWi(e.auth,{any:l=>l.any.includes(a),single:l=>l===a}))):void 0,...e};if(by.isConjureSchema(e.specs))return{type:"conjure",pathToConjureDefinition:e.specs.conjure,...r};let i=[],n={};for(let a of e.specs??[]){let u;if(by.isOpenApiSpecSchema(a))u={schema:{type:"oss",path:a.openapi},origin:a.origin,overrides:a.overrides,audiences:[],settings:fpp(a.settings)};else if(by.isAsyncApiSpecSchema(a))u={schema:{type:"oss",path:a.asyncapi},origin:a.origin,overrides:a.overrides,audiences:[],settings:WTS(a.settings)};else if(by.isProtoSpecSchema(a))u={schema:{type:"protobuf",root:a.proto.root,target:a.proto.target,localGeneration:a.proto["local-generation"]??!1},origin:void 0,overrides:a.proto.overrides,audiences:[],settings:{...x1i}};else if(by.isOpenRpcSpecSchema(a))u={schema:{type:"openrpc",path:a.openrpc},origin:void 0,overrides:a.overrides,audiences:[],settings:{...x1i}};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 $TS(e){let t=e.api;if(t!=null){if(by.isApiConfigurationV2Schema(t))return HTS({apiConfiguration:t,rawConfiguration:e});if(by.isNamespacedApiConfiguration(t)){let r={};for(let[i,n]of Object.entries(t.namespaces))r[i]=await upp(n,e);return{type:"multiNamespace",rootDefinitions:void 0,definitions:r}}}return{type:"singleNamespace",definitions:await upp(t,e)}}async function GTS({absolutePathToGeneratorsConfiguration:e,groupName:t,group:r,maybeTopLevelMetadata:i,maybeTopLevelReviewers:n,readme:a}){let u=hpp(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=>QTS({absolutePathToGeneratorsConfiguration:e,generator:l,maybeTopLevelMetadata:i,maybeGroupLevelMetadata:u,maybeTopLevelReviewers:n,maybeGroupLevelReviewers:r.reviewers,readme:a})))}}async function QTS({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 YTS({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"?Gv(Td(e),t.output.path):void 0,absolutePathToLocalSnippets:t.snippets?.path!=null?Gv(Td(e),t.snippets.path):void 0,language:kTS(t.name),irVersionOverride:t["ir-version"]??void 0,publishMetadata:JTS({generatorInvocation:t}),readme:u,settings:t.api?.settings??void 0}}function JTS({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 ppp({pypiOutputMetadata:e,maybeGroupLevelMetadata:t,maybeTopLevelMetadata:r}){let i;return e!=null&&(i=tCS(e),i={...r,...t,...i}),i}function KTS({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(P9s.GithubPullRequestReviewer.team({name:d.name})),i.add(d.name));for(let d of l)n.has(d.name)||(a.push(P9s.GithubPullRequestReviewer.user({name:d.name})),n.add(d.name));return a}async function YTS({absolutePathToGeneratorsConfiguration:e,generator:t,maybeGroupLevelMetadata:r={},maybeTopLevelMetadata:i={},maybeGroupLevelReviewers:n,maybeTopLevelReviewers:a}){let u=t.snippets!=null&&t.snippets.path!=="";if(t.github!=null&&!Y1a(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?ZTS(t.output,r,i):void 0,c=eCS(t),b=c!=null?await XTS({absolutePathToGeneratorsConfiguration:e,githubLicense:c}):void 0,g=t.github.mode??"release";switch(g){case"commit":case"release":return iA.FernFiddle.OutputMode.githubV2(iA.FernFiddle.GithubOutputModeV2.commitAndRelease({owner:d,repo:s,license:b,publishInfo:o,downloadSnippets:u}));case"pull-request":{let O=KTS({topLevelReviewers:a,groupLevelReviewers:n,outputModeReviewers:t.github.reviewers});return iA.FernFiddle.OutputMode.githubV2(iA.FernFiddle.GithubOutputModeV2.pullRequest({owner:d,repo:s,license:b,publishInfo:o,downloadSnippets:u,reviewers:O}))}case"push":return iA.FernFiddle.OutputMode.githubV2(iA.FernFiddle.GithubOutputModeV2.push({owner:d,repo:s,branch:t.github.mode==="push"?t.github.branch:void 0,license:b,publishInfo:o,downloadSnippets:u}));default:jo(g)}}if(t.output==null)return iA.FernFiddle.remoteGen.OutputMode.publish({registryOverrides:{}});switch(t.output.location){case"local-file-system":return iA.FernFiddle.OutputMode.downloadFiles({downloadSnippets:u});case"npm":return iA.FernFiddle.OutputMode.publishV2(iA.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 iA.FernFiddle.OutputMode.publishV2(iA.FernFiddle.remoteGen.PublishOutputModeV2.mavenOverride({registryUrl:_pp(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 iA.FernFiddle.OutputMode.publishV2(iA.FernFiddle.remoteGen.PublishOutputModeV2.postman({apiKey:t.output["api-key"],workspaceId:t.output["workspace-id"]}));case"pypi":return iA.FernFiddle.OutputMode.publishV2(iA.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:ppp({pypiOutputMetadata:t.output.metadata,maybeGroupLevelMetadata:r,maybeTopLevelMetadata:i})}));case"nuget":return iA.FernFiddle.OutputMode.publishV2(iA.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 iA.FernFiddle.OutputMode.publishV2(iA.FernFiddle.remoteGen.PublishOutputModeV2.rubyGemsOverride({registryUrl:t.output.url??"https://rubygems.org/",packageName:t.output["package-name"],apiKey:t.output["api-key"]??"",downloadSnippets:u}));default:jo(t.output)}}async function XTS({absolutePathToGeneratorsConfiguration:e,githubLicense:t}){if(typeof t=="string")switch(t){case"MIT":return iA.FernFiddle.GithubLicense.basic({id:iA.FernFiddle.GithubLicenseId.Mit});case"Apache-2.0":return iA.FernFiddle.GithubLicense.basic({id:iA.FernFiddle.GithubLicenseId.Apache});default:jo(t)}let r=Lu(hl.of(cpp.default.dirname(e)),Ua.of(t.custom)),i=await(0,spp.readFile)(r);return iA.FernFiddle.GithubLicense.custom({contents:i.toString()})}function ZTS(e,t,r){switch(e.location){case"local-file-system":throw new Error("Cannot use local-file-system with github publishing");case"npm":return iA.FernFiddle.GithubPublishInfo.npm({registryUrl:e.url??"https://registry.npmjs.org",packageName:e["package-name"],token:e.token});case"maven":return iA.FernFiddle.GithubPublishInfo.maven({registryUrl:_pp(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 iA.FernFiddle.GithubPublishInfo.postman({apiKey:e["api-key"],workspaceId:e["workspace-id"]});case"pypi":return iA.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:ppp({pypiOutputMetadata:e.metadata,maybeGroupLevelMetadata:t,maybeTopLevelMetadata:r})});case"nuget":return iA.FernFiddle.GithubPublishInfo.nuget({registryUrl:e.url??"https://nuget.org/",packageName:e["package-name"],apiKey:e["api-key"]});case"rubygems":return iA.FernFiddle.GithubPublishInfo.rubygems({registryUrl:e.url??"https://rubygems.org/",packageName:e["package-name"],apiKey:e["api-key"]});default:jo(e)}}function kTS(e){if(e.includes("csharp"))return by.GenerationLanguage.CSHARP;if(e.includes("go"))return by.GenerationLanguage.GO;if(e.includes("java")||e.includes("spring"))return by.GenerationLanguage.JAVA;if(e.includes("php"))return by.GenerationLanguage.PHP;if(e.includes("python")||e.includes("fastapi")||e.includes("pydantic"))return by.GenerationLanguage.PYTHON;if(e.includes("ruby"))return by.GenerationLanguage.RUBY;if(e.includes("swift"))return by.GenerationLanguage.SWIFT;if(e.includes("typescript"))return by.GenerationLanguage.TYPESCRIPT}function _pp(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 eCS(e){return e["publish-metadata"]?.license!=null?e["publish-metadata"].license:e.metadata?.license!=null?e.metadata.license:Y1a(e.github)?void 0:e.github?.license}function hpp(e){return e!=null?{description:e.description,authors:e.authors?.map(t=>({name:t.name,email:t.email}))}:void 0}function tCS(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 rCS(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(`
|
|
1677
|
+
`)),{ok:!0,value:t}):i}}function sDo(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var dzn=class e extends Error{errors;constructor(t){super(t.map(sDo).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};var pzn=class e extends Error{errors;constructor(t){super(t.map(sDo).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}};function Fq(e){return{optional:()=>W2s(e),transform:t=>H2s(e,t),parseOrThrow:(t,r)=>{let i=e.parse(t,r);if(i.ok)return i.value;throw new pzn(i.errors)},jsonOrThrow:(t,r)=>{let i=e.json(t,r);if(i.ok)return i.value;throw new dzn(i.errors)}}}function W2s(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:()=>Sj.OPTIONAL};return{...t,...Fq(t)}}function H2s(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,...Fq(r)}}function pnp(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:rA(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:rA(t,"bigint")}]},getType:()=>Sj.BIGINT};return{...E9(e),...Fq(e)}}var $mS=/^([+-]?\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 _np(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:rA(t,"string")}]}:$mS.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:rA(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:rA(t,"Date object")}]},getType:()=>Sj.DATE};return{...E9(e),...Fq(e)}}function gQ(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...E9(r),...Fq(r)}}}function cDo(e){let t=new Set(e);return gQ(Sj.ENUM,(i,{allowUnrecognizedEnumValues:n,breadcrumbsPrefix:a=[]}={})=>typeof i!="string"?{ok:!1,errors:[{path:a,message:rA(i,"string")}]}:!t.has(i)&&!n?{ok:!1,errors:[{path:a,message:rA(i,"enum")}]}:{ok:!0,value:i})()}function hnp(e){let t=$2s(e);return{...t,...Fq(t)}}function $2s(e){return{parse:(t,r)=>_zn(e).parse(t,r),json:(t,r)=>_zn(e).json(t,r),getType:()=>_zn(e).getType()}}function _zn(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}function y1a(e){return Object.entries(e)}function v1a(e,t){let r=new Set(t);return Object.entries(e).reduce((i,[n,a])=>(r.has(n)&&(i[n]=a),i),{})}function u1i(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 b1a(e){return Object.keys(e)}function ynp(e,t){let r=[],i=[];for(let n of e)t(n)?r.push(n):i.push(n);return[r,i]}function TVt(e){return{withParsedProperties:t=>G2s(e,t)}}function G2s(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(!u1i(i))return{ok:!1,errors:[{path:n?.breadcrumbsPrefix??[],message:rA(i,"object")}]};let a=new Set(Object.keys(t)),u=v1a(i,Object.keys(i).filter(l=>!a.has(l)));return e.json(u,n)},getType:()=>e.getType()};return{...r,...Fq(r),...TVt(r)}}function vnp(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function s1i(e){return e.isProperty}function lDo(e){let t={_getRawProperties:()=>Object.entries(e).map(([r,i])=>s1i(i)?i.rawKey:r),_getParsedProperties:()=>b1a(e),parse:(r,i)=>{let n={},a=[];for(let[u,l]of y1a(e)){let d=s1i(l)?l.rawKey:u,s=s1i(l)?l.valueSchema:l,o={rawKey:d,parsedKey:u,valueSchema:s};n[d]=o,Onp(s)&&a.push(d)}return bnp({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 y1a(e)){let l=s1i(u)?u.valueSchema:u;Onp(l)&&n.push(a)}return bnp({value:r,requiredKeys:n,getProperty:a=>{let u=e[a];if(u!=null)return s1i(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:()=>Sj.OBJECT};return{...E9(t),...Fq(t),...TVt(t),...oWi(t)}}function bnp({value:e,requiredKeys:t,getProperty:r,unrecognizedObjectKeys:i="fail",skipValidation:n=!1,breadcrumbsPrefix:a=[]}){if(!u1i(e))return{ok:!1,errors:[{path:a,message:rA(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 oWi(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(i,n)=>gnp({extensionKeys:t._getRawProperties(),value:i,transformBase:a=>e.parse(a,n),transformExtension:a=>t.parse(a,n)}),json:(i,n)=>gnp({extensionKeys:t._getParsedProperties(),value:i,transformBase:a=>e.json(a,n),transformExtension:a=>t.json(a,n)}),getType:()=>Sj.OBJECT};return{...r,...Fq(r),...TVt(r),...oWi(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:()=>Sj.OBJECT};return{...t,...Fq(t),...TVt(t),...oWi(t)}}}}function gnp({extensionKeys:e,value:t,transformBase:r,transformExtension:i}){let n=new Set(e),[a,u]=ynp(b1a(t),s=>n.has(s)),l=r(v1a(t,u)),d=i(v1a(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 Onp(e){return!GmS(e)}function GmS(e){switch(e.getType()){case Sj.ANY:case Sj.UNKNOWN:case Sj.OPTIONAL:return!0;default:return!1}}function mnp(e){return lDo(e)}function Pnp(e){let t={...$2s(e),_getRawProperties:()=>_zn(e)._getRawProperties(),_getParsedProperties:()=>_zn(e)._getParsedProperties()};return{...t,...Fq(t),...TVt(t),...oWi(t)}}function fDo(e){let t={parse:(r,i)=>jnp(r,(n,a)=>e.parse(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),json:(r,i)=>jnp(r,(n,a)=>e.json(n,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`[${a}]`]})),getType:()=>Sj.LIST};return{...E9(t),...Fq(t)}}function jnp(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:rA(e,"list"),path:[]}]}}function wnp(e){return gQ(Sj.STRING_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:rA(r,`"${e}"`)}]})()}function Snp(e){return gQ(Sj.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:i=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:i,message:rA(r,`${e.toString()}`)}]})()}var Dnp=gQ(Sj.ANY,e=>({ok:!0,value:e}));var Enp=gQ(Sj.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:rA(e,"boolean")}]});var Mnp=gQ(Sj.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:rA(e,"number")}]});var Anp=gQ(Sj.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:rA(e,"string")}]});var qnp=gQ(Sj.UNKNOWN,e=>({ok:!0,value:e}));function Cnp(e,t){let r={parse:(i,n)=>Tnp({value:i,isKeyNumeric:e.getType()===Sj.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)=>Tnp({value:i,isKeyNumeric:e.getType()===Sj.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:()=>Sj.RECORD};return{...E9(r),...Fq(r)}}function Tnp({value:e,isKeyNumeric:t,transformKey:r,transformValue:i,breadcrumbsPrefix:n=[]}){return u1i(e)?y1a(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:rA(e,"object")}]}}function Bnp(e){let t=fDo(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:rA(i,"Set")}]},getType:()=>Sj.SET};return{...E9(r),...Fq(r)}}function znp(e){let t={parse:(r,i)=>Inp((n,a)=>n.parse(r,a),e,i),json:(r,i)=>Inp((n,a)=>n.json(r,a),e,i),getType:()=>Sj.UNDISCRIMINATED_UNION};return{...E9(t),...Fq(t)}}function Inp(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 xnp(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}function Nnp(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,i=typeof e=="string"?e:e.parsedDiscriminant,n=cDo(b1a(t)),a={parse:(u,l)=>Rnp({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)=>Rnp({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:()=>Sj.UNION};return{...E9(a),...Fq(a),...TVt(a)}}function Rnp({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:i,getAdditionalPropertiesSchema:n,allowUnrecognizedUnionMembers:a=!1,transformAdditionalProperties:u,breadcrumbsPrefix:l=[]}){if(!u1i(e))return{ok:!1,errors:[{path:l,message:rA(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 dDo=ae.string();var hzn=ae.string();var J2s={};Dn(J2s,{ApiAuth:()=>MDo,AuthScheme:()=>EDo,AuthSchemesRequirement:()=>pDo,BasicAuthScheme:()=>hDo,BearerAuthScheme:()=>_Do,EnvironmentVariable:()=>nRe,HeaderAuthScheme:()=>yDo,OAuthAccessTokenRequestProperties:()=>ODo,OAuthAccessTokenResponseProperties:()=>vzn,OAuthClientCredentials:()=>wDo,OAuthConfiguration:()=>SDo,OAuthRefreshEndpoint:()=>jDo,OAuthRefreshTokenRequestProperties:()=>PDo,OAuthScheme:()=>DDo,OAuthTokenEndpoint:()=>mDo});var nRe=ae.string();var pDo=ae.enum_(["ALL","ANY"]);var uWi=ae.objectWithoutOptionalProperties({unsafeName:ae.string(),safeName:ae.string()});var Pd=ae.objectWithoutOptionalProperties({originalName:ae.string(),camelCase:uWi,pascalCase:uWi,snakeCase:uWi,screamingSnakeCase:uWi});var Cd=ae.objectWithoutOptionalProperties({docs:ae.string().optional()});var _Do=ae.objectWithoutOptionalProperties({token:Pd,tokenEnvVar:nRe.optional()}).extend(Cd);var hDo=ae.objectWithoutOptionalProperties({username:Pd,usernameEnvVar:nRe.optional(),password:Pd,passwordEnvVar:nRe.optional()}).extend(Cd);var Ah=ae.objectWithoutOptionalProperties({wireValue:ae.string(),name:Pd});var yDo=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy),prefix:ae.string().optional(),headerEnvVar:nRe.optional()}).extend(Cd);var CVt=ae.string();var skt=ae.string();var ckt=ae.string();var yzn=ae.objectWithoutOptionalProperties({endpointId:CVt,serviceId:skt,subpackageId:ckt.optional()});var g1a=ae.unknown();var M9=ae.objectWithoutOptionalProperties({userSpecifiedExamples:ae.record(ae.string(),g1a),autogeneratedExamples:ae.record(ae.string(),g1a)});var vDo=ae.enum_(["IN_DEVELOPMENT","PRE_RELEASE","GENERAL_AVAILABILITY","DEPRECATED"]);var lkt=ae.objectWithoutOptionalProperties({status:vDo,message:ae.string().optional()});var w6=ae.objectWithoutOptionalProperties({availability:lkt.optional()}).extend(Cd);var c1i=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy),allowMultiple:ae.boolean(),v2Examples:M9.optional()}).extend(w6);var bDo=ae.enum_(["READ_ONLY","WRITE_ONLY"]);var sZ=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy),propertyAccess:bDo.optional(),v2Examples:M9.optional()}).extend(w6);var gDo=ae.union("type",{query:c1i,body:sZ}).transform({transform:e=>{switch(e.type){case"query":return Sne.query(e);case"body":return Sne.body(e);default:return e}},untransform:({_visit:e,...t})=>t});var OQ=ae.objectWithoutOptionalProperties({propertyPath:ae.list(Pd).optional(),property:gDo});var ODo=ae.objectWithoutOptionalProperties({clientId:OQ,clientSecret:OQ,scopes:OQ.optional(),customProperties:ae.list(OQ).optional()});var Ene=ae.objectWithoutOptionalProperties({propertyPath:ae.list(Pd).optional(),property:sZ});var vzn=ae.objectWithoutOptionalProperties({accessToken:Ene,expiresIn:Ene.optional(),refreshToken:Ene.optional()});var mDo=ae.objectWithoutOptionalProperties({endpointReference:yzn,requestProperties:ODo,responseProperties:vzn});var PDo=ae.objectWithoutOptionalProperties({refreshToken:OQ});var jDo=ae.objectWithoutOptionalProperties({endpointReference:yzn,requestProperties:PDo,responseProperties:vzn});var wDo=ae.objectWithoutOptionalProperties({clientIdEnvVar:nRe.optional(),clientSecretEnvVar:nRe.optional(),tokenPrefix:ae.string().optional(),tokenHeader:ae.string().optional(),scopes:ae.list(ae.string()).optional(),tokenEndpoint:mDo,refreshEndpoint:jDo.optional()});var SDo=ae.union("type",{clientCredentials:wDo}).transform({transform:e=>{switch(e.type){case"clientCredentials":return i1i.clientCredentials(e);default:return e}},untransform:({_visit:e,...t})=>t});var DDo=ae.objectWithoutOptionalProperties({configuration:SDo}).extend(Cd);var EDo=ae.union(ae.discriminant("type","_type"),{bearer:_Do,basic:hDo,header:yDo,oauth:DDo}).transform({transform:e=>{switch(e.type){case"bearer":return zT.bearer(e);case"basic":return zT.basic(e);case"header":return zT.header(e);case"oauth":return zT.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t});var MDo=ae.objectWithoutOptionalProperties({requirement:pDo,schemes:ae.list(EDo)}).extend(Cd);var K2s={};Dn(K2s,{Availability:()=>lkt,AvailabilityStatus:()=>vDo,Declaration:()=>w6,DisplayName:()=>bzn,EndpointId:()=>CVt,EndpointReference:()=>yzn,ErrorId:()=>f1i,EscapedString:()=>ADo,FeatureId:()=>TDo,FernFilepath:()=>Mne,Name:()=>Pd,NameAndWireValue:()=>Ah,SafeAndUnsafeString:()=>uWi,ServiceId:()=>skt,SubpackageId:()=>ckt,TypeId:()=>kx,WebSocketChannelId:()=>Ozn,WebhookGroupId:()=>gzn,WebhookId:()=>qDo,WithContentType:()=>aRe,WithDocs:()=>Cd,WithDocsAndAvailability:()=>l1i,WithJsonExample:()=>fkt});var l1i=ae.objectWithoutOptionalProperties({availability:lkt.optional()}).extend(Cd);var Mne=ae.objectWithoutOptionalProperties({allParts:ae.list(Pd),packagePath:ae.list(Pd),file:Pd.optional()});var bzn=ae.string();var ADo=ae.objectWithoutOptionalProperties({original:ae.string()});var fkt=ae.objectWithoutOptionalProperties({jsonExample:ae.unknown()});var aRe=ae.objectWithoutOptionalProperties({contentType:ae.string().optional()});var kx=ae.string();var f1i=ae.string();var gzn=ae.string();var qDo=ae.string();var Ozn=ae.string();var TDo=ae.string();var Y2s={};Dn(Y2s,{Constants:()=>CDo});var CDo=ae.objectWithoutOptionalProperties({errorInstanceIdKey:Ah});var IN={};Dn(IN,{AliasType:()=>iEo,Auth:()=>RDo,AuthValues:()=>VDo,BasicAuth:()=>BDo,BasicAuthValues:()=>NDo,BearerAuth:()=>IDo,BearerAuthValues:()=>FDo,BodyRequest:()=>WDo,Declaration:()=>mQ,DiscriminatedUnionType:()=>lEo,DynamicIntermediateRepresentation:()=>MEo,Endpoint:()=>rEo,EndpointExample:()=>tEo,EndpointLocation:()=>Pzn,EndpointSnippetRequest:()=>eEo,EndpointSnippetResponse:()=>Fnp,EnumType:()=>nEo,EnvironmentValues:()=>kDo,ErrorSeverity:()=>AEo,Error_:()=>qEo,FileUploadRequestBody:()=>GDo,FileUploadRequestBodyProperty:()=>$Do,GeneratorConfig:()=>EEo,GeneratorOutputConfig:()=>DEo,GoPublishInfo:()=>gEo,HeaderAuth:()=>zDo,HeaderAuthValues:()=>LDo,InlinedRequest:()=>KDo,InlinedRequestBody:()=>QDo,InlinedRequestMetadata:()=>JDo,LiteralType:()=>TEo,MapType:()=>Unp,MavenPublishInfo:()=>OEo,MultipleEnvironmentUrlValues:()=>ZDo,NamedParameter:()=>uz,NamedType:()=>dEo,NpmPublishInfo:()=>mEo,NugetPublishInfo:()=>PEo,OAuth:()=>xDo,OAuthValues:()=>UDo,ObjectType:()=>aEo,PublishInfo:()=>SEo,PypiPublishInfo:()=>jEo,ReferencedRequestBody:()=>HDo,ReferencedRequestBodyType:()=>jzn,Request:()=>YDo,Response:()=>XDo,RubyGemsPublishInfo:()=>wEo,SingleDiscriminatedUnionType:()=>cEo,SingleDiscriminatedUnionTypeNoProperties:()=>sEo,SingleDiscriminatedUnionTypeObject:()=>oEo,SingleDiscriminatedUnionTypeSingleProperty:()=>uEo,TypeReference:()=>Lnp,UndiscriminatedUnionType:()=>fEo,Values:()=>wzn,auth:()=>X2s,declaration:()=>Z2s,endpoints:()=>k2s,environment:()=>e8s,ir:()=>t8s,snippets:()=>r8s,types:()=>i8s});var X2s={};Dn(X2s,{Auth:()=>RDo,AuthValues:()=>VDo,BasicAuth:()=>BDo,BasicAuthValues:()=>NDo,BearerAuth:()=>IDo,BearerAuthValues:()=>FDo,HeaderAuth:()=>zDo,HeaderAuthValues:()=>LDo,OAuth:()=>xDo,OAuthValues:()=>UDo});var BDo=ae.objectWithoutOptionalProperties({username:Pd,password:Pd});var IDo=ae.objectWithoutOptionalProperties({token:Pd});var uz=ae.objectWithoutOptionalProperties({name:Ah,typeReference:ae.lazy(()=>IN.TypeReference)});var zDo=ae.objectWithoutOptionalProperties({header:uz});var xDo=ae.objectWithoutOptionalProperties({clientId:Pd,clientSecret:Pd});var RDo=ae.union("type",{basic:BDo,bearer:IDo,header:zDo,oauth:xDo}).transform({transform:e=>{switch(e.type){case"basic":return gs.Auth.basic(e);case"bearer":return gs.Auth.bearer(e);case"header":return gs.Auth.header(e);case"oauth":return gs.Auth.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t});var NDo=ae.objectWithoutOptionalProperties({username:ae.string(),password:ae.string()});var FDo=ae.objectWithoutOptionalProperties({token:ae.string()});var LDo=ae.objectWithoutOptionalProperties({value:ae.unknown()});var UDo=ae.objectWithoutOptionalProperties({clientId:ae.string(),clientSecret:ae.string()});var VDo=ae.union("type",{basic:NDo,bearer:FDo,header:LDo,oauth:UDo}).transform({transform:e=>{switch(e.type){case"basic":return gs.AuthValues.basic(e);case"bearer":return gs.AuthValues.bearer(e);case"header":return gs.AuthValues.header(e);case"oauth":return gs.AuthValues.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t});var Z2s={};Dn(Z2s,{Declaration:()=>mQ});var mQ=ae.objectWithoutOptionalProperties({fernFilepath:Mne,name:Pd});var k2s={};Dn(k2s,{BodyRequest:()=>WDo,Endpoint:()=>rEo,EndpointExample:()=>tEo,EndpointLocation:()=>Pzn,FileUploadRequestBody:()=>GDo,FileUploadRequestBodyProperty:()=>$Do,InlinedRequest:()=>KDo,InlinedRequestBody:()=>QDo,InlinedRequestMetadata:()=>JDo,ReferencedRequestBody:()=>HDo,ReferencedRequestBodyType:()=>jzn,Request:()=>YDo,Response:()=>XDo});var mzn=ae.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"]);var Pzn=ae.objectWithoutOptionalProperties({method:mzn,path:ae.string()});var jzn=ae.union("type",{bytes:ae.object({}),typeReference:ae.object({value:ae.lazy(()=>IN.TypeReference)})}).transform({transform:e=>{switch(e.type){case"bytes":return gs.ReferencedRequestBodyType.bytes();case"typeReference":return gs.ReferencedRequestBodyType.typeReference(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var WDo=ae.objectWithoutOptionalProperties({pathParameters:ae.list(uz).optional(),body:jzn.optional()});var HDo=ae.objectWithoutOptionalProperties({bodyKey:Pd,bodyType:jzn});var $Do=ae.union("type",{file:Ah,fileArray:Ah,bodyProperty:uz}).transform({transform:e=>{switch(e.type){case"file":return gs.FileUploadRequestBodyProperty.file(e);case"fileArray":return gs.FileUploadRequestBodyProperty.fileArray(e);case"bodyProperty":return gs.FileUploadRequestBodyProperty.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t});var GDo=ae.objectWithoutOptionalProperties({properties:ae.list($Do)});var QDo=ae.union("type",{properties:ae.object({value:ae.list(uz)}),referenced:HDo,fileUpload:GDo}).transform({transform:e=>{switch(e.type){case"properties":return gs.InlinedRequestBody.properties(e.value);case"referenced":return gs.InlinedRequestBody.referenced(e);case"fileUpload":return gs.InlinedRequestBody.fileUpload(e);default:return e}},untransform:({_visit:e,...t})=>t});var JDo=ae.objectWithoutOptionalProperties({includePathParameters:ae.boolean(),onlyPathParameters:ae.boolean()});var KDo=ae.objectWithoutOptionalProperties({declaration:mQ,pathParameters:ae.list(uz).optional(),queryParameters:ae.list(uz).optional(),headers:ae.list(uz).optional(),body:QDo.optional(),metadata:JDo.optional()});var YDo=ae.union("type",{body:WDo,inlined:KDo}).transform({transform:e=>{switch(e.type){case"body":return gs.Request.body(e);case"inlined":return gs.Request.inlined(e);default:return e}},untransform:({_visit:e,...t})=>t});var XDo=ae.union("type",{json:ae.object({})}).transform({transform:e=>{switch(e.type){case"json":return gs.Response.json();default:return e}},untransform:({_visit:e,...t})=>t});var oRe=ae.string();var cZ=ae.string();var dkt=ae.string();var ZDo=ae.record(cZ,dkt);var kDo=ae.undiscriminatedUnion([oRe,ZDo]);var wzn=ae.record(ae.string(),ae.unknown());var eEo=ae.objectWithoutOptionalProperties({endpoint:Pzn,baseUrl:ae.property("baseURL",ae.string().optional()),environment:kDo.optional(),auth:VDo.optional(),pathParameters:wzn.optional(),queryParameters:wzn.optional(),headers:wzn.optional(),requestBody:ae.unknown().optional()});var tEo=ae.objectWithoutOptionalProperties({id:ae.string(),name:ae.string().optional()}).extend(eEo);var rEo=ae.objectWithoutOptionalProperties({auth:RDo.optional(),declaration:mQ,location:Pzn,request:YDo,response:XDo,examples:ae.list(tEo).optional()});var e8s={};Dn(e8s,{EnvironmentValues:()=>kDo,MultipleEnvironmentUrlValues:()=>ZDo});var t8s={};Dn(t8s,{DynamicIntermediateRepresentation:()=>MEo,GeneratorConfig:()=>EEo,GeneratorOutputConfig:()=>DEo,GoPublishInfo:()=>gEo,MavenPublishInfo:()=>OEo,NpmPublishInfo:()=>mEo,NugetPublishInfo:()=>PEo,PublishInfo:()=>SEo,PypiPublishInfo:()=>jEo,RubyGemsPublishInfo:()=>wEo});var iEo=ae.objectWithoutOptionalProperties({declaration:mQ,typeReference:ae.lazy(()=>IN.TypeReference)});var nEo=ae.objectWithoutOptionalProperties({declaration:mQ,values:ae.list(Ah)});var aEo=ae.objectWithoutOptionalProperties({declaration:mQ,properties:ae.list(uz),additionalProperties:ae.boolean().optional()});var oEo=ae.objectWithoutOptionalProperties({typeId:kx,discriminantValue:Ah,properties:ae.list(uz)});var uEo=ae.objectWithoutOptionalProperties({typeReference:ae.lazy(()=>IN.TypeReference),discriminantValue:Ah,properties:ae.list(uz).optional()});var sEo=ae.objectWithoutOptionalProperties({discriminantValue:Ah,properties:ae.list(uz).optional()});var cEo=ae.union("type",{samePropertiesAsObject:oEo,singleProperty:uEo,noProperties:sEo}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return gs.SingleDiscriminatedUnionType.samePropertiesAsObject(e);case"singleProperty":return gs.SingleDiscriminatedUnionType.singleProperty(e);case"noProperties":return gs.SingleDiscriminatedUnionType.noProperties(e);default:return e}},untransform:({_visit:e,...t})=>t});var lEo=ae.objectWithoutOptionalProperties({declaration:mQ,discriminant:Ah,types:ae.record(ae.string(),cEo)});var fEo=ae.objectWithoutOptionalProperties({declaration:mQ,types:ae.list(ae.lazy(()=>IN.TypeReference))});var dEo=ae.union("type",{alias:iEo,enum:nEo,object:aEo,discriminatedUnion:lEo,undiscriminatedUnion:fEo}).transform({transform:e=>{switch(e.type){case"alias":return gs.NamedType.alias(e);case"enum":return gs.NamedType.enum(e);case"object":return gs.NamedType.object(e);case"discriminatedUnion":return gs.NamedType.discriminatedUnion(e);case"undiscriminatedUnion":return gs.NamedType.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t});var pEo=ae.objectWithoutOptionalProperties({id:oRe,name:Pd,url:dkt}).extend(Cd);var _Eo=ae.objectWithoutOptionalProperties({environments:ae.list(pEo)});var hEo=ae.objectWithoutOptionalProperties({id:cZ,name:Pd});var yEo=ae.objectWithoutOptionalProperties({id:oRe,name:Pd,urls:ae.record(cZ,dkt)}).extend(Cd);var vEo=ae.objectWithoutOptionalProperties({baseUrls:ae.list(hEo),environments:ae.list(yEo)});var bEo=ae.union("type",{singleBaseUrl:_Eo,multipleBaseUrls:vEo}).transform({transform:e=>{switch(e.type){case"singleBaseUrl":return rx.singleBaseUrl(e);case"multipleBaseUrls":return rx.multipleBaseUrls(e);default:return e}},untransform:({_visit:e,...t})=>t});var Szn=ae.objectWithoutOptionalProperties({defaultEnvironment:oRe.optional(),environments:bEo});var gEo=ae.objectWithoutOptionalProperties({version:ae.string(),repoUrl:ae.string()});var OEo=ae.objectWithoutOptionalProperties({version:ae.string(),coordinate:ae.string(),repoUrl:ae.string().optional()});var mEo=ae.objectWithoutOptionalProperties({version:ae.string(),packageName:ae.string(),repoUrl:ae.string().optional()});var PEo=ae.objectWithoutOptionalProperties({version:ae.string(),packageName:ae.string(),repoUrl:ae.string().optional()});var jEo=ae.objectWithoutOptionalProperties({version:ae.string(),packageName:ae.string(),repoUrl:ae.string().optional()});var wEo=ae.objectWithoutOptionalProperties({version:ae.string(),packageName:ae.string(),repoUrl:ae.string().optional()});var SEo=ae.union("type",{go:gEo,maven:OEo,npm:mEo,nuget:PEo,pypi:jEo,rubygems:wEo}).transform({transform:e=>{switch(e.type){case"go":return gs.PublishInfo.go(e);case"maven":return gs.PublishInfo.maven(e);case"npm":return gs.PublishInfo.npm(e);case"nuget":return gs.PublishInfo.nuget(e);case"pypi":return gs.PublishInfo.pypi(e);case"rubygems":return gs.PublishInfo.rubygems(e);default:return e}},untransform:({_visit:e,...t})=>t});var DEo=ae.union("type",{publish:ae.object({value:SEo}),local:ae.object({})}).transform({transform:e=>{switch(e.type){case"publish":return gs.GeneratorOutputConfig.publish(e.value);case"local":return gs.GeneratorOutputConfig.local();default:return e}},untransform:({_visit:e,...t})=>t});var EEo=ae.objectWithoutOptionalProperties({apiName:ae.string(),organization:ae.string(),customConfig:ae.unknown(),outputConfig:DEo});var MEo=ae.objectWithoutOptionalProperties({version:ae.stringLiteral("1.0.0"),types:ae.record(kx,dEo),endpoints:ae.record(CVt,rEo),environments:Szn.optional(),headers:ae.list(uz).optional(),pathParameters:ae.list(uz).optional(),generatorConfig:EEo.optional()});var r8s={};Dn(r8s,{EndpointSnippetRequest:()=>eEo,EndpointSnippetResponse:()=>Fnp,ErrorSeverity:()=>AEo,Error_:()=>qEo,Values:()=>wzn});var AEo=ae.enum_(["CRITICAL","WARNING"]);var qEo=ae.objectWithoutOptionalProperties({severity:AEo,message:ae.string()});var Fnp=ae.objectWithoutOptionalProperties({snippet:ae.string(),errors:ae.list(qEo).optional()});var i8s={};Dn(i8s,{AliasType:()=>iEo,DiscriminatedUnionType:()=>lEo,EnumType:()=>nEo,LiteralType:()=>TEo,MapType:()=>Unp,NamedParameter:()=>uz,NamedType:()=>dEo,ObjectType:()=>aEo,SingleDiscriminatedUnionType:()=>cEo,SingleDiscriminatedUnionTypeNoProperties:()=>sEo,SingleDiscriminatedUnionTypeObject:()=>oEo,SingleDiscriminatedUnionTypeSingleProperty:()=>uEo,TypeReference:()=>Lnp,UndiscriminatedUnionType:()=>fEo});var TEo=ae.union("type",{boolean:ae.object({value:ae.boolean()}),string:ae.object({value:ae.string()})}).transform({transform:e=>{switch(e.type){case"boolean":return gs.LiteralType.boolean(e.value);case"string":return gs.LiteralType.string(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var Dzn=ae.enum_(["INTEGER","LONG","UINT","UINT_64","FLOAT","DOUBLE","BOOLEAN","STRING","DATE","DATE_TIME","UUID","BASE_64","BIG_INTEGER"]);var Lnp=ae.union("type",{list:ae.object({value:ae.lazy(()=>IN.TypeReference)}),literal:ae.object({value:TEo}),map:ae.lazyObject(()=>IN.MapType),named:ae.object({value:kx}),nullable:ae.object({value:ae.lazy(()=>IN.TypeReference)}),optional:ae.object({value:ae.lazy(()=>IN.TypeReference)}),primitive:ae.object({value:Dzn}),set:ae.object({value:ae.lazy(()=>IN.TypeReference)}),unknown:ae.object({})}).transform({transform:e=>{switch(e.type){case"list":return gs.TypeReference.list(e.value);case"literal":return gs.TypeReference.literal(e.value);case"map":return gs.TypeReference.map(e);case"named":return gs.TypeReference.named(e.value);case"nullable":return gs.TypeReference.nullable(e.value);case"optional":return gs.TypeReference.optional(e.value);case"primitive":return gs.TypeReference.primitive(e.value);case"set":return gs.TypeReference.set(e.value);case"unknown":return gs.TypeReference.unknown();default:return e}},untransform:({_visit:e,...t})=>t});var Unp=ae.objectWithoutOptionalProperties({key:ae.lazy(()=>IN.TypeReference),value:ae.lazy(()=>IN.TypeReference)});var n8s={};Dn(n8s,{EnvironmentBaseUrlId:()=>cZ,EnvironmentBaseUrlWithId:()=>hEo,EnvironmentId:()=>oRe,EnvironmentUrl:()=>dkt,Environments:()=>bEo,EnvironmentsConfig:()=>Szn,MultipleBaseUrlsEnvironment:()=>yEo,MultipleBaseUrlsEnvironments:()=>vEo,SingleBaseUrlEnvironment:()=>pEo,SingleBaseUrlEnvironments:()=>_Eo});var a8s={};Dn(a8s,{DeclaredErrorName:()=>d1i,ErrorDeclaration:()=>BEo,ErrorDeclarationDiscriminantValue:()=>Vnp,ExampleError:()=>CEo});var d1i=ae.objectWithoutOptionalProperties({errorId:f1i,fernFilepath:Mne,name:Pd});var CEo=ae.objectWithoutOptionalProperties({name:Pd.optional(),shape:ae.lazyObject(()=>am)}).extend(fkt).extend(Cd);var BEo=ae.objectWithoutOptionalProperties({name:d1i,displayName:ae.string().optional(),discriminantValue:Ah,type:ae.lazy(()=>Vy).optional(),statusCode:ae.number(),examples:ae.list(CEo),v2Examples:M9.optional()}).extend(Cd);var Vnp=ae.union("type",{property:Ah,statusCode:ae.object({})}).transform({transform:e=>{switch(e.type){case"property":return n1i.property(e);case"statusCode":return n1i.statusCode();default:return e}},untransform:({_visit:e,...t})=>t});var o8s={};Dn(o8s,{BasicAuthValues:()=>REo,BearerAuthValues:()=>NEo,HeaderAuthValues:()=>FEo,MultipleEnvironmentUrlValues:()=>xEo,OAuthValues:()=>LEo,V2AuthValues:()=>Mzn,V2EndpointLocation:()=>zEo,V2EndpointLocationHttpMethod:()=>IEo,V2EnvironmentValues:()=>Ezn,V2HttpEndpointCodeSample:()=>HEo,V2HttpEndpointExample:()=>O1a,V2HttpEndpointExamples:()=>$Eo,V2HttpEndpointRequest:()=>UEo,V2HttpEndpointResponse:()=>WEo,V2HttpEndpointResponseBody:()=>VEo,V2SchemaExample:()=>g1a,V2SchemaExamples:()=>M9,V2ValueExamples:()=>pkt,V2WebSocketEndpointLocation:()=>GEo,V2WebSocketMessageExample:()=>QEo,V2WebSocketSessionExample:()=>m1a,V2WebSocketSessionExamples:()=>JEo,V2WebhookExample:()=>P1a,V2WebhookExamples:()=>KEo,WithV2Examples:()=>TB});var TB=ae.objectWithoutOptionalProperties({v2Examples:M9.optional()});var IEo=ae.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"]);var zEo=ae.objectWithoutOptionalProperties({method:IEo,path:ae.string()});var xEo=ae.record(cZ,dkt);var Ezn=ae.undiscriminatedUnion([oRe,xEo]);var REo=ae.objectWithoutOptionalProperties({username:ae.string(),password:ae.string()});var NEo=ae.objectWithoutOptionalProperties({token:ae.string()});var FEo=ae.objectWithoutOptionalProperties({value:ae.unknown()});var LEo=ae.objectWithoutOptionalProperties({clientId:ae.string(),clientSecret:ae.string()});var Mzn=ae.union("type",{basic:REo,bearer:NEo,header:FEo,oauth:LEo}).transform({transform:e=>{switch(e.type){case"basic":return eRe.basic(e);case"bearer":return eRe.bearer(e);case"header":return eRe.header(e);case"oauth":return eRe.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t});var pkt=ae.record(ae.string(),ae.unknown());var UEo=ae.objectWithoutOptionalProperties({endpoint:zEo,baseUrl:ae.property("baseURL",ae.string().optional()),environment:Ezn.optional(),auth:Mzn.optional(),pathParameters:pkt.optional(),queryParameters:pkt.optional(),headers:pkt.optional(),requestBody:ae.unknown().optional()}).extend(Cd);var VEo=ae.union("type",{error:ae.object({value:ae.unknown()}),json:ae.object({value:ae.unknown()}),stream:ae.object({value:ae.list(ae.unknown())})}).transform({transform:e=>{switch(e.type){case"error":return P9.error(e.value);case"json":return P9.json(e.value);case"stream":return P9.stream(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var WEo=ae.objectWithoutOptionalProperties({statusCode:ae.number().optional(),body:VEo.optional()}).extend(Cd);var HEo=ae.objectWithoutOptionalProperties({name:ae.string().optional(),language:ae.string(),code:ae.string()}).extend(Cd);var O1a=ae.objectWithoutOptionalProperties({request:UEo.optional(),response:WEo.optional(),codeSamples:ae.list(HEo).optional()});var $Eo=ae.objectWithoutOptionalProperties({userSpecifiedExamples:ae.record(ae.string(),O1a),autogeneratedExamples:ae.record(ae.string(),O1a)});var GEo=ae.objectWithoutOptionalProperties({path:ae.string()});var QEo=ae.objectWithoutOptionalProperties({type:ae.string(),body:ae.unknown()});var m1a=ae.objectWithoutOptionalProperties({channel:GEo,baseUrl:ae.property("baseURL",ae.string().optional()),environment:Ezn.optional(),auth:Mzn.optional(),pathParameters:pkt.optional(),queryParameters:pkt.optional(),headers:pkt.optional(),messages:ae.list(QEo).optional()});var JEo=ae.objectWithoutOptionalProperties({autogeneratedExamples:ae.record(ae.string(),m1a),userSpecifiedExamples:ae.record(ae.string(),m1a)});var P1a=ae.objectWithoutOptionalProperties({name:ae.string().optional(),payload:ae.unknown()});var KEo=ae.objectWithoutOptionalProperties({userSpecifiedExamples:ae.record(ae.string(),P1a),autogeneratedExamples:ae.record(ae.string(),P1a)});var s8s={};Dn(s8s,{BasicLicense:()=>XEo,CustomLicense:()=>ZEo,EnvironmentVariable:()=>a3,GeneratorConfig:()=>Wnp,GeneratorEnvironment:()=>mMo,GeneratorOutputConfig:()=>gMo,GeneratorPublishConfig:()=>xzn,GeneratorPublishTarget:()=>sMo,GeneratorRegistriesConfig:()=>iMo,GeneratorRegistriesConfigV2:()=>oMo,GithubOutputMode:()=>vMo,GithubPublishInfo:()=>yMo,LicenseConfig:()=>kEo,LicenseId:()=>YEo,MavenCentralSignature:()=>Azn,MavenCentralSignatureGithubInfo:()=>lMo,MavenGithubPublishInfo:()=>fMo,MavenRegistryConfig:()=>tMo,MavenRegistryConfigV2:()=>qzn,NpmGithubPublishInfo:()=>cMo,NpmRegistryConfig:()=>rMo,NpmRegistryConfigV2:()=>Tzn,NugetGithubPublishInfo:()=>hMo,NugetRegistryConfig:()=>zzn,OutputMetadata:()=>aMo,OutputMetadataAuthor:()=>nMo,OutputMode:()=>bMo,PostmanConfig:()=>uMo,PostmanGithubPublishInfo:()=>dMo,PublishingMetadata:()=>eMo,PypiGithubPublishInfo:()=>pMo,PypiMetadata:()=>Czn,PypiRegistryConfig:()=>Bzn,RemoteGeneratorEnvironment:()=>OMo,RubyGemsGithubPublishInfo:()=>_Mo,RubyGemsRegistryConfig:()=>Izn,config:()=>u8s});var u8s={};Dn(u8s,{BasicLicense:()=>XEo,CustomLicense:()=>ZEo,EnvironmentVariable:()=>a3,GeneratorConfig:()=>Wnp,GeneratorEnvironment:()=>mMo,GeneratorOutputConfig:()=>gMo,GeneratorPublishConfig:()=>xzn,GeneratorPublishTarget:()=>sMo,GeneratorRegistriesConfig:()=>iMo,GeneratorRegistriesConfigV2:()=>oMo,GithubOutputMode:()=>vMo,GithubPublishInfo:()=>yMo,LicenseConfig:()=>kEo,LicenseId:()=>YEo,MavenCentralSignature:()=>Azn,MavenCentralSignatureGithubInfo:()=>lMo,MavenGithubPublishInfo:()=>fMo,MavenRegistryConfig:()=>tMo,MavenRegistryConfigV2:()=>qzn,NpmGithubPublishInfo:()=>cMo,NpmRegistryConfig:()=>rMo,NpmRegistryConfigV2:()=>Tzn,NugetGithubPublishInfo:()=>hMo,NugetRegistryConfig:()=>zzn,OutputMetadata:()=>aMo,OutputMetadataAuthor:()=>nMo,OutputMode:()=>bMo,PostmanConfig:()=>uMo,PostmanGithubPublishInfo:()=>dMo,PublishingMetadata:()=>eMo,PypiGithubPublishInfo:()=>pMo,PypiMetadata:()=>Czn,PypiRegistryConfig:()=>Bzn,RemoteGeneratorEnvironment:()=>OMo,RubyGemsGithubPublishInfo:()=>_Mo,RubyGemsRegistryConfig:()=>Izn});var YEo=ae.enum_(["MIT","Apache-2.0"]);var XEo=ae.objectWithoutOptionalProperties({id:YEo});var ZEo=ae.objectWithoutOptionalProperties({filename:ae.string()});var kEo=ae.union("type",{basic:XEo,custom:ZEo}).transform({transform:e=>{switch(e.type){case"basic":return j0.LicenseConfig.basic(e);case"custom":return j0.LicenseConfig.custom(e);default:return e}},untransform:({_visit:e,...t})=>t});var eMo=ae.objectWithoutOptionalProperties({packageDescription:ae.property("package_description",ae.string().optional()),publisherEmail:ae.property("publisher_email",ae.string().optional()),referenceUrl:ae.property("reference_url",ae.string().optional()),publisherName:ae.property("publisher_name",ae.string().optional())});var Azn=ae.objectWithoutOptionalProperties({keyId:ae.string(),password:ae.string(),secretKey:ae.string()});var tMo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),username:ae.string(),password:ae.string(),group:ae.string(),signature:Azn.optional()});var rMo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),token:ae.string(),scope:ae.string()});var iMo=ae.objectWithoutOptionalProperties({maven:tMo,npm:rMo});var qzn=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),username:ae.string(),password:ae.string(),coordinate:ae.string(),signature:Azn.optional()});var Tzn=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),token:ae.string(),packageName:ae.string()});var nMo=ae.objectWithoutOptionalProperties({name:ae.string(),email:ae.string()});var aMo=ae.objectWithoutOptionalProperties({description:ae.string().optional(),authors:ae.list(nMo).optional()});var Czn=ae.objectWithoutOptionalProperties({keywords:ae.list(ae.string()).optional(),documentationLink:ae.string().optional(),homepageLink:ae.string().optional()}).extend(aMo);var Bzn=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),username:ae.string(),password:ae.string(),packageName:ae.string(),pypiMetadata:Czn.optional()});var Izn=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),apiKey:ae.string(),packageName:ae.string()});var zzn=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),apiKey:ae.string(),packageName:ae.string()});var oMo=ae.objectWithoutOptionalProperties({maven:qzn,npm:Tzn,pypi:Bzn,rubygems:Izn,nuget:zzn});var uMo=ae.objectWithoutOptionalProperties({apiKey:ae.string(),workspaceId:ae.string()});var sMo=ae.union("type",{maven:qzn,npm:Tzn,pypi:Bzn,postman:uMo,rubygems:Izn,nuget:zzn}).transform({transform:e=>{switch(e.type){case"maven":return j0.GeneratorPublishTarget.maven(e);case"npm":return j0.GeneratorPublishTarget.npm(e);case"pypi":return j0.GeneratorPublishTarget.pypi(e);case"postman":return j0.GeneratorPublishTarget.postman(e);case"rubygems":return j0.GeneratorPublishTarget.rubygems(e);case"nuget":return j0.GeneratorPublishTarget.nuget(e);default:return e}},untransform:({_visit:e,...t})=>t});var xzn=ae.objectWithoutOptionalProperties({registries:iMo,registriesV2:oMo,publishTarget:sMo.optional(),version:ae.string()});var a3=ae.string();var cMo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),packageName:ae.string(),tokenEnvironmentVariable:a3,shouldGeneratePublishWorkflow:ae.boolean().optional()});var lMo=ae.objectWithoutOptionalProperties({keyIdEnvironmentVariable:a3,passwordEnvironmentVariable:a3,secretKeyEnvironmentVariable:a3});var fMo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),coordinate:ae.string(),usernameEnvironmentVariable:a3,passwordEnvironmentVariable:a3,signature:lMo.optional(),shouldGeneratePublishWorkflow:ae.boolean().optional()});var dMo=ae.objectWithoutOptionalProperties({apiKeyEnvironmentVariable:a3,workspaceIdEnvironmentVariable:a3});var pMo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),packageName:ae.string(),usernameEnvironmentVariable:a3,passwordEnvironmentVariable:a3,pypiMetadata:Czn.optional(),shouldGeneratePublishWorkflow:ae.boolean().optional()});var _Mo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),packageName:ae.string(),apiKeyEnvironmentVariable:a3,shouldGeneratePublishWorkflow:ae.boolean().optional()});var hMo=ae.objectWithoutOptionalProperties({registryUrl:ae.string(),packageName:ae.string(),apiKeyEnvironmentVariable:a3,shouldGeneratePublishWorkflow:ae.boolean().optional()});var yMo=ae.union("type",{npm:cMo,maven:fMo,postman:dMo,pypi:pMo,rubygems:_Mo,nuget:hMo}).transform({transform:e=>{switch(e.type){case"npm":return j0.GithubPublishInfo.npm(e);case"maven":return j0.GithubPublishInfo.maven(e);case"postman":return j0.GithubPublishInfo.postman(e);case"pypi":return j0.GithubPublishInfo.pypi(e);case"rubygems":return j0.GithubPublishInfo.rubygems(e);case"nuget":return j0.GithubPublishInfo.nuget(e);default:return e}},untransform:({_visit:e,...t})=>t});var vMo=ae.objectWithoutOptionalProperties({version:ae.string(),repoUrl:ae.string(),installationToken:ae.string().optional(),publishInfo:yMo.optional()});var bMo=ae.union("type",{publish:xzn,downloadFiles:ae.object({}),github:vMo}).transform({transform:e=>{switch(e.type){case"publish":return j0.OutputMode.publish(e);case"downloadFiles":return j0.OutputMode.downloadFiles();case"github":return j0.OutputMode.github(e);default:return e}},untransform:({_visit:e,...t})=>t});var gMo=ae.objectWithoutOptionalProperties({path:ae.string(),snippetFilepath:ae.string().optional(),snippetTemplateFilepath:ae.string().optional(),publishingMetadata:eMo.optional(),mode:bMo});var OMo=ae.objectWithoutOptionalProperties({coordinatorUrl:ae.string(),coordinatorUrlV2:ae.string(),id:ae.string()});var mMo=ae.union(ae.discriminant("type","_type"),{local:ae.object({}),remote:OMo}).transform({transform:e=>{switch(e.type){case"local":return j0.GeneratorEnvironment.local();case"remote":return j0.GeneratorEnvironment.remote(e);default:return e}},untransform:({_visit:e,...t})=>t});var Wnp=ae.objectWithoutOptionalProperties({dryRun:ae.boolean(),irFilepath:ae.string(),originalReadmeFilepath:ae.string().optional(),license:kEo.optional(),output:gMo,publish:xzn.optional(),workspaceName:ae.string(),organization:ae.string(),customConfig:ae.unknown(),environment:mMo,whitelabel:ae.boolean(),writeUnitTests:ae.boolean(),generatePaginatedClients:ae.boolean().optional(),generateOauthClients:ae.boolean()});var c8s={};Dn(c8s,{AutogeneratedEndpointExample:()=>dAo,BytesRequest:()=>Lzn,BytesResponse:()=>Hzn,CursorPagination:()=>YMo,CustomPagination:()=>ZMo,DeclaredServiceName:()=>PMo,EndpointName:()=>wMo,ExampleCodeSample:()=>iAo,ExampleCodeSampleLanguage:()=>eAo,ExampleCodeSampleSdk:()=>rAo,ExampleEndpointCall:()=>Jzn,ExampleEndpointErrorResponse:()=>cAo,ExampleEndpointSuccessResponse:()=>sAo,ExampleHeader:()=>sWi,ExampleInlinedRequestBody:()=>Qzn,ExampleInlinedRequestBodyProperty:()=>aAo,ExamplePathParameter:()=>p1i,ExampleQueryParameter:()=>Gzn,ExampleQueryParameterShape:()=>nAo,ExampleRequestBody:()=>oAo,ExampleResponse:()=>lAo,ExampleServerSideEvent:()=>uAo,FileDownloadResponse:()=>Vzn,FileProperty:()=>AMo,FilePropertyArray:()=>MMo,FilePropertySingle:()=>EMo,FileUploadBodyProperty:()=>TMo,FileUploadBodyPropertyEncoding:()=>qMo,FileUploadRequest:()=>BMo,FileUploadRequestProperty:()=>CMo,GrpcTransport:()=>yAo,HttpEndpoint:()=>bAo,HttpEndpointSource:()=>vAo,HttpHeader:()=>lZ,HttpMethod:()=>mzn,HttpPath:()=>uRe,HttpPathPart:()=>jMo,HttpRequestBody:()=>IMo,HttpRequestBodyReference:()=>Fzn,HttpResponse:()=>QMo,HttpResponseBody:()=>GMo,HttpService:()=>mAo,InlinedRequestBody:()=>DMo,InlinedRequestBodyProperty:()=>Nzn,JsonResponse:()=>Uzn,JsonResponseBody:()=>FMo,JsonResponseBodyWithProperty:()=>LMo,JsonStreamChunk:()=>UMo,NonStreamHttpResponseBody:()=>HMo,OffsetPagination:()=>XMo,Pagination:()=>kMo,PathParameter:()=>BVt,PathParameterLocation:()=>SMo,QueryParameter:()=>c1i,RequestProperty:()=>OQ,RequestPropertyValue:()=>gDo,ResponseError:()=>JMo,ResponseErrors:()=>KMo,ResponseProperty:()=>Ene,SdkRequest:()=>NMo,SdkRequestBodyType:()=>zMo,SdkRequestShape:()=>RMo,SdkRequestWrapper:()=>xMo,SseStreamChunk:()=>WMo,StreamParameterResponse:()=>$Mo,StreamingResponse:()=>$zn,SupportedSdkLanguage:()=>tAo,TextResponse:()=>Wzn,TextStreamChunk:()=>VMo,Transport:()=>Yzn,UserSpecifiedEndpointExample:()=>fAo});var PMo=ae.objectWithoutOptionalProperties({fernFilepath:Mne});var jMo=ae.objectWithoutOptionalProperties({pathParameter:ae.string(),tail:ae.string()});var uRe=ae.objectWithoutOptionalProperties({head:ae.string(),parts:ae.list(jMo)});var wMo=Pd;var lZ=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy),env:ae.string().optional(),v2Examples:M9.optional()}).extend(w6);var SMo=ae.enum_(["ROOT","SERVICE","ENDPOINT"]);var Rzn=ae.string();var BVt=ae.objectWithoutOptionalProperties({name:Pd,valueType:ae.lazy(()=>Vy),location:SMo,variable:Rzn.optional(),v2Examples:M9.optional()}).extend(Cd);var CB=ae.objectWithoutOptionalProperties({typeId:kx,fernFilepath:Mne,name:Pd,displayName:bzn.optional()});var Nzn=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy),v2Examples:M9.optional()}).extend(l1i);var DMo=ae.objectWithoutOptionalProperties({name:Pd,extends:ae.list(CB),properties:ae.list(Nzn),extendedProperties:ae.list(sZ).optional(),extraProperties:ae.property("extra-properties",ae.boolean())}).extend(Cd).extend(TB).extend(aRe);var Fzn=ae.objectWithoutOptionalProperties({requestBodyType:ae.lazy(()=>Vy)}).extend(Cd).extend(aRe).extend(TB);var EMo=ae.objectWithoutOptionalProperties({key:Ah,isOptional:ae.boolean(),contentType:ae.string().optional()}).extend(Cd);var MMo=ae.objectWithoutOptionalProperties({key:Ah,isOptional:ae.boolean(),contentType:ae.string().optional()}).extend(Cd);var AMo=ae.union("type",{file:EMo,fileArray:MMo}).transform({transform:e=>{switch(e.type){case"file":return wne.file(e);case"fileArray":return wne.fileArray(e);default:return e}},untransform:({_visit:e,...t})=>t});var qMo=ae.enum_(["exploded","json","form"]);var TMo=ae.objectWithoutOptionalProperties({style:qMo.optional()}).extend(Nzn).extend(aRe);var CMo=ae.union("type",{file:ae.object({value:AMo}),bodyProperty:TMo}).transform({transform:e=>{switch(e.type){case"file":return j6.file(e.value);case"bodyProperty":return j6.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t});var BMo=ae.objectWithoutOptionalProperties({name:Pd,properties:ae.list(CMo)}).extend(Cd).extend(TB).extend(aRe);var Lzn=ae.objectWithoutOptionalProperties({isOptional:ae.boolean()}).extend(Cd).extend(TB).extend(aRe);var IMo=ae.union("type",{inlinedRequestBody:DMo,reference:Fzn,fileUpload:BMo,bytes:Lzn}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return Nq.inlinedRequestBody(e);case"reference":return Nq.reference(e);case"fileUpload":return Nq.fileUpload(e);case"bytes":return Nq.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t});var zMo=ae.union("type",{typeReference:Fzn,bytes:Lzn}).transform({transform:e=>{switch(e.type){case"typeReference":return AVt.typeReference(e);case"bytes":return AVt.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t});var xMo=ae.objectWithoutOptionalProperties({wrapperName:Pd,bodyKey:Pd,includePathParameters:ae.boolean().optional(),onlyPathParameters:ae.boolean().optional()});var RMo=ae.union("type",{justRequestBody:ae.object({value:zMo}),wrapper:xMo}).transform({transform:e=>{switch(e.type){case"justRequestBody":return iRe.justRequestBody(e.value);case"wrapper":return iRe.wrapper(e);default:return e}},untransform:({_visit:e,...t})=>t});var NMo=ae.objectWithoutOptionalProperties({streamParameter:OQ.optional(),requestParameterName:Pd,shape:RMo});var FMo=ae.objectWithoutOptionalProperties({responseBodyType:ae.lazy(()=>Vy)}).extend(Cd).extend(TB);var LMo=ae.objectWithoutOptionalProperties({responseBodyType:ae.lazy(()=>Vy),responseProperty:sZ.optional()}).extend(Cd).extend(TB);var Uzn=ae.union("type",{response:FMo,nestedPropertyAsResponse:LMo}).transform({transform:e=>{switch(e.type){case"response":return yQ.response(e);case"nestedPropertyAsResponse":return yQ.nestedPropertyAsResponse(e);default:return e}},untransform:({_visit:e,...t})=>t});var Vzn=ae.objectWithoutOptionalProperties({}).extend(Cd).extend(TB);var Wzn=ae.objectWithoutOptionalProperties({}).extend(Cd).extend(TB);var Hzn=ae.objectWithoutOptionalProperties({}).extend(Cd).extend(TB);var UMo=ae.objectWithoutOptionalProperties({payload:ae.lazy(()=>Vy),terminator:ae.string().optional()}).extend(Cd).extend(TB);var VMo=ae.objectWithoutOptionalProperties({}).extend(Cd).extend(TB);var WMo=ae.objectWithoutOptionalProperties({payload:ae.lazy(()=>Vy),terminator:ae.string().optional()}).extend(Cd).extend(TB);var $zn=ae.union("type",{json:UMo,text:VMo,sse:WMo}).transform({transform:e=>{switch(e.type){case"json":return j9.json(e);case"text":return j9.text(e);case"sse":return j9.sse(e);default:return e}},untransform:({_visit:e,...t})=>t});var HMo=ae.union("type",{json:ae.object({value:Uzn}),fileDownload:Vzn,text:Wzn,bytes:Hzn}).transform({transform:e=>{switch(e.type){case"json":return sW.json(e.value);case"fileDownload":return sW.fileDownload(e);case"text":return sW.text(e);case"bytes":return sW.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t});var $Mo=ae.objectWithoutOptionalProperties({nonStreamResponse:HMo,streamResponse:$zn});var GMo=ae.union("type",{json:ae.object({value:Uzn}),fileDownload:Vzn,text:Wzn,bytes:Hzn,streaming:ae.object({value:$zn}),streamParameter:$Mo}).transform({transform:e=>{switch(e.type){case"json":return zS.json(e.value);case"fileDownload":return zS.fileDownload(e);case"text":return zS.text(e);case"bytes":return zS.bytes(e);case"streaming":return zS.streaming(e.value);case"streamParameter":return zS.streamParameter(e);default:return e}},untransform:({_visit:e,...t})=>t});var QMo=ae.objectWithoutOptionalProperties({statusCode:ae.property("status-code",ae.number().optional()),body:GMo.optional()});var JMo=ae.objectWithoutOptionalProperties({error:d1i}).extend(Cd);var KMo=ae.list(JMo);var YMo=ae.objectWithoutOptionalProperties({page:OQ,next:Ene,results:Ene});var XMo=ae.objectWithoutOptionalProperties({page:OQ,results:Ene,hasNextPage:Ene.optional(),step:OQ.optional()});var ZMo=ae.objectWithoutOptionalProperties({results:Ene});var kMo=ae.union("type",{cursor:YMo,offset:XMo,custom:ZMo}).transform({transform:e=>{switch(e.type){case"cursor":return vQ.cursor(e);case"offset":return vQ.offset(e);case"custom":return vQ.custom(e);default:return e}},untransform:({_visit:e,...t})=>t});var eAo=ae.objectWithoutOptionalProperties({name:Pd.optional(),language:ae.string(),code:ae.string(),install:ae.string().optional()}).extend(Cd);var tAo=ae.enum_(["curl","python","javascript","typescript","go","ruby","csharp","java"]);var rAo=ae.objectWithoutOptionalProperties({name:Pd.optional(),sdk:tAo,code:ae.string()}).extend(Cd);var iAo=ae.union("type",{language:eAo,sdk:rAo}).transform({transform:e=>{switch(e.type){case"language":return TEe.language(e);case"sdk":return TEe.sdk(e);default:return e}},untransform:({_visit:e,...t})=>t});var p1i=ae.objectWithoutOptionalProperties({name:Pd,value:ae.lazyObject(()=>am)});var sWi=ae.objectWithoutOptionalProperties({name:Ah,value:ae.lazyObject(()=>am)});var nAo=ae.union("type",{single:ae.object({}),exploded:ae.object({}),commaSeparated:ae.object({})}).transform({transform:e=>{switch(e.type){case"single":return A2.single();case"exploded":return A2.exploded();case"commaSeparated":return A2.commaSeparated();default:return e}},untransform:({_visit:e,...t})=>t});var Gzn=ae.objectWithoutOptionalProperties({name:Ah,value:ae.lazyObject(()=>am),shape:nAo.optional()});var aAo=ae.objectWithoutOptionalProperties({name:Ah,value:ae.lazyObject(()=>am),originalTypeDeclaration:CB.optional()});var Qzn=ae.objectWithoutOptionalProperties({properties:ae.list(aAo)}).extend(fkt);var oAo=ae.union("type",{inlinedRequestBody:Qzn,reference:ae.lazyObject(()=>am)}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return bQ.inlinedRequestBody(e);case"reference":return bQ.reference(e);default:return e}},untransform:({_visit:e,...t})=>t});var uAo=ae.objectWithoutOptionalProperties({event:ae.string(),data:ae.lazyObject(()=>am)});var sAo=ae.union("type",{body:ae.object({value:ae.lazyObject(()=>am).optional()}),stream:ae.object({value:ae.list(ae.lazyObject(()=>am))}),sse:ae.object({value:ae.list(uAo)})}).transform({transform:e=>{switch(e.type){case"body":return XC.body(e.value);case"stream":return XC.stream(e.value);case"sse":return XC.sse(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var cAo=ae.objectWithoutOptionalProperties({error:d1i,body:ae.lazyObject(()=>am).optional()});var lAo=ae.union("type",{ok:ae.object({value:sAo}),error:cAo}).transform({transform:e=>{switch(e.type){case"ok":return xT.ok(e.value);case"error":return xT.error(e);default:return e}},untransform:({_visit:e,...t})=>t});var Jzn=ae.objectWithoutOptionalProperties({id:ae.string().optional(),name:Pd.optional(),url:ae.string(),rootPathParameters:ae.list(p1i),servicePathParameters:ae.list(p1i),endpointPathParameters:ae.list(p1i),serviceHeaders:ae.list(sWi),endpointHeaders:ae.list(sWi),queryParameters:ae.list(Gzn),request:oAo.optional(),response:lAo}).extend(Cd);var fAo=ae.objectWithoutOptionalProperties({codeSamples:ae.list(iAo).optional(),example:Jzn.optional()});var dAo=ae.objectWithoutOptionalProperties({example:Jzn});var pAo=ae.objectWithoutOptionalProperties({namespace:ae.string()});var _Ao=ae.objectWithoutOptionalProperties({csharp:pAo.optional()});var Kzn=ae.objectWithoutOptionalProperties({filepath:ae.string(),packageName:ae.string().optional(),options:_Ao.optional()});var hAo=ae.objectWithoutOptionalProperties({file:Kzn,name:Pd});var yAo=ae.objectWithoutOptionalProperties({service:hAo});var Yzn=ae.union("type",{http:ae.object({}),grpc:yAo}).transform({transform:e=>{switch(e.type){case"http":return tRe.http();case"grpc":return tRe.grpc(e);default:return e}},untransform:({_visit:e,...t})=>t});var vAo=ae.union("type",{proto:ae.object({}),openapi:ae.object({}),openrpc:ae.object({})}).transform({transform:e=>{switch(e.type){case"proto":return jne.proto();case"openapi":return jne.openapi();case"openrpc":return jne.openrpc();default:return e}},untransform:({_visit:e,...t})=>t});var bAo=ae.objectWithoutOptionalProperties({id:CVt,name:wMo,displayName:ae.string().optional(),method:mzn,headers:ae.list(lZ),baseUrl:cZ.optional(),v2BaseUrls:ae.list(cZ).optional(),basePath:uRe.optional(),path:uRe,fullPath:uRe,pathParameters:ae.list(BVt),allPathParameters:ae.list(BVt),queryParameters:ae.list(c1i),requestBody:IMo.optional(),sdkRequest:NMo.optional(),response:QMo.optional(),errors:KMo,auth:ae.boolean(),idempotent:ae.boolean(),pagination:kMo.optional(),userSpecifiedExamples:ae.list(fAo),autogeneratedExamples:ae.list(dAo),v2Examples:$Eo.optional(),transport:Yzn.optional(),source:vAo.optional(),audiences:ae.list(hzn).optional()}).extend(w6);var gAo=ae.objectWithoutOptionalProperties({});var OAo=ae.objectWithoutOptionalProperties({});var Xzn=ae.objectWithoutOptionalProperties({json:gAo.optional(),proto:OAo.optional()});var mAo=ae.objectWithoutOptionalProperties({availability:lkt.optional(),name:PMo,displayName:ae.string().optional(),basePath:uRe,endpoints:ae.list(bAo),headers:ae.list(lZ),pathParameters:ae.list(BVt),encoding:Xzn.optional(),transport:Yzn.optional(),audiences:ae.list(hzn).optional()});var l8s={};Dn(l8s,{ApiDefinitionSource:()=>xqo,ApiDefinitionSourceId:()=>Iqo,ApiVersionScheme:()=>jAo,ErrorDiscriminationByPropertyStrategy:()=>Dqo,ErrorDiscriminationStrategy:()=>Eqo,HeaderApiVersionScheme:()=>PAo,IntermediateRepresentation:()=>Hnp,Package:()=>ixn,PackageNavigationConfig:()=>wqo,PlatformHeaders:()=>Aqo,ProtoSource:()=>zqo,ReadmeConfig:()=>Bqo,SdkConfig:()=>qqo,ServiceTypeReferenceInfo:()=>Cqo,SourceConfig:()=>Rqo,Subpackage:()=>Sqo,UserAgent:()=>Mqo});var bli=ae.objectWithoutOptionalProperties({name:Ah}).extend(w6);var Zzn=ae.objectWithoutOptionalProperties({default:bli.optional(),values:ae.list(bli)});var PAo=ae.objectWithoutOptionalProperties({header:lZ,value:Zzn});var jAo=ae.union("type",{header:PAo}).transform({transform:e=>{switch(e.type){case"header":return o1i.header(e);default:return e}},untransform:({_visit:e,...t})=>t});var wAo=ae.enum_(["ENUM","OBJECT","UNION","UNDISCRIMINATED_UNION"]);var SAo=ae.objectWithoutOptionalProperties({name:CB,shape:wAo});var DAo=ae.objectWithoutOptionalProperties({min:ae.number().optional(),max:ae.number().optional(),exclusiveMin:ae.boolean().optional(),exclusiveMax:ae.boolean().optional(),multipleOf:ae.number().optional()});var EAo=ae.objectWithoutOptionalProperties({default:ae.number().optional(),validation:DAo.optional()});var MAo=ae.objectWithoutOptionalProperties({default:ae.number().optional()});var AAo=ae.objectWithoutOptionalProperties({});var qAo=ae.objectWithoutOptionalProperties({});var TAo=ae.objectWithoutOptionalProperties({});var CAo=ae.objectWithoutOptionalProperties({min:ae.number().optional(),max:ae.number().optional(),exclusiveMin:ae.boolean().optional(),exclusiveMax:ae.boolean().optional(),multipleOf:ae.number().optional()});var BAo=ae.objectWithoutOptionalProperties({default:ae.number().optional(),validation:CAo.optional()});var IAo=ae.objectWithoutOptionalProperties({default:ae.boolean().optional()});var zAo=ae.objectWithoutOptionalProperties({format:ae.string().optional(),pattern:ae.string().optional(),minLength:ae.number().optional(),maxLength:ae.number().optional()});var xAo=ae.objectWithoutOptionalProperties({default:ae.string().optional(),validation:zAo.optional()});var RAo=ae.objectWithoutOptionalProperties({});var NAo=ae.objectWithoutOptionalProperties({});var FAo=ae.objectWithoutOptionalProperties({});var LAo=ae.objectWithoutOptionalProperties({});var UAo=ae.objectWithoutOptionalProperties({default:ae.string().optional()});var VAo=ae.union("type",{integer:EAo,long:MAo,uint:AAo,uint64:qAo,float:TAo,double:BAo,boolean:IAo,string:xAo,date:RAo,dateTime:NAo,uuid:FAo,base64:LAo,bigInteger:UAo}).transform({transform:e=>{switch(e.type){case"integer":return pp.integer(e);case"long":return pp.long(e);case"uint":return pp.uint(e);case"uint64":return pp.uint64(e);case"float":return pp.float(e);case"double":return pp.double(e);case"boolean":return pp.boolean(e);case"string":return pp.string(e);case"date":return pp.date(e);case"dateTime":return pp.dateTime(e);case"uuid":return pp.uuid(e);case"base64":return pp.base64(e);case"bigInteger":return pp.bigInteger(e);default:return e}},untransform:({_visit:e,...t})=>t});var kzn=ae.objectWithoutOptionalProperties({v1:Dzn,v2:VAo.optional()});var WAo=ae.union(ae.discriminant("type","_type"),{container:ae.object({container:ae.lazy(()=>exn)}),named:SAo,primitive:ae.object({primitive:kzn}),unknown:ae.object({})}).transform({transform:e=>{switch(e.type){case"container":return cW.container(e.container);case"named":return cW.named(e);case"primitive":return cW.primitive(e.primitive);case"unknown":return cW.unknown();default:return e}},untransform:({_visit:e,...t})=>t});var HAo=ae.objectWithoutOptionalProperties({aliasOf:ae.lazy(()=>Vy),resolvedType:WAo});var $Ao=ae.objectWithoutOptionalProperties({extends:ae.list(CB),properties:ae.list(sZ),extendedProperties:ae.list(sZ).optional(),extraProperties:ae.property("extra-properties",ae.boolean())});var GAo=ae.objectWithoutOptionalProperties({name:Ah,type:ae.lazy(()=>Vy)});var QAo=ae.union(ae.discriminant("propertiesType","_type"),{samePropertiesAsObject:CB,singleProperty:GAo,noProperties:ae.object({})}).transform({transform:e=>{switch(e.propertiesType){case"samePropertiesAsObject":return w9.samePropertiesAsObject(e);case"singleProperty":return w9.singleProperty(e);case"noProperties":return w9.noProperties();default:return e}},untransform:({_visit:e,...t})=>t});var JAo=ae.objectWithoutOptionalProperties({discriminantValue:Ah,shape:QAo,displayName:ae.string().optional(),availability:lkt.optional()}).extend(Cd);var KAo=ae.objectWithoutOptionalProperties({discriminant:Ah,extends:ae.list(CB),types:ae.list(JAo),baseProperties:ae.list(sZ)});var YAo=ae.objectWithoutOptionalProperties({type:ae.lazy(()=>Vy)}).extend(Cd);var XAo=ae.objectWithoutOptionalProperties({members:ae.list(YAo)});var ZAo=ae.union(ae.discriminant("type","_type"),{alias:HAo,enum:Zzn,object:$Ao,union:KAo,undiscriminatedUnion:XAo}).transform({transform:e=>{switch(e.type){case"alias":return Dg.alias(e);case"enum":return Dg.enum(e);case"object":return Dg.object(e);case"union":return Dg.union(e);case"undiscriminatedUnion":return Dg.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t});var j1a=ae.objectWithoutOptionalProperties({name:Pd.optional(),shape:ae.lazy(()=>txn)}).extend(fkt).extend(Cd);var kAo=ae.union("type",{any:ae.object({}),api:ae.object({}),boolValue:ae.object({}),bytesValue:ae.object({}),doubleValue:ae.object({}),duration:ae.object({}),empty:ae.object({}),enum:ae.object({}),enumValue:ae.object({}),field:ae.object({}),fieldCardinality:ae.object({}),fieldKind:ae.object({}),fieldMask:ae.object({}),floatValue:ae.object({}),int32Value:ae.object({}),int64Value:ae.object({}),listValue:ae.object({}),method:ae.object({}),mixin:ae.object({}),nullValue:ae.object({}),option:ae.object({}),sourceContext:ae.object({}),stringValue:ae.object({}),struct:ae.object({}),syntax:ae.object({}),timestamp:ae.object({}),type:ae.object({}),uint32Value:ae.object({}),uint64Value:ae.object({}),value:ae.object({})}).transform({transform:e=>{switch(e.type){case"any":return id.any();case"api":return id.api();case"boolValue":return id.boolValue();case"bytesValue":return id.bytesValue();case"doubleValue":return id.doubleValue();case"duration":return id.duration();case"empty":return id.empty();case"enum":return id.enum();case"enumValue":return id.enumValue();case"field":return id.field();case"fieldCardinality":return id.fieldCardinality();case"fieldKind":return id.fieldKind();case"fieldMask":return id.fieldMask();case"floatValue":return id.floatValue();case"int32Value":return id.int32Value();case"int64Value":return id.int64Value();case"listValue":return id.listValue();case"method":return id.method();case"mixin":return id.mixin();case"nullValue":return id.nullValue();case"option":return id.option();case"sourceContext":return id.sourceContext();case"stringValue":return id.stringValue();case"struct":return id.struct();case"syntax":return id.syntax();case"timestamp":return id.timestamp();case"type":return id.type();case"uint32Value":return id.uint32Value();case"uint64Value":return id.uint64Value();case"value":return id.value();default:return e}},untransform:({_visit:e,...t})=>t});var eqo=ae.objectWithoutOptionalProperties({file:Kzn,name:Pd});var tqo=ae.union("type",{wellKnown:ae.object({value:kAo}),userDefined:eqo}).transform({transform:e=>{switch(e.type){case"wellKnown":return Yj.wellKnown(e.value);case"userDefined":return Yj.userDefined(e);default:return e}},untransform:({_visit:e,...t})=>t});var rqo=ae.union("type",{proto:ae.object({value:tqo})}).transform({transform:e=>{switch(e.type){case"proto":return vli.proto(e.value);default:return e}},untransform:({_visit:e,...t})=>t});var iqo=ae.objectWithoutOptionalProperties({name:CB,shape:ZAo,autogeneratedExamples:ae.list(j1a),userProvidedExamples:ae.list(j1a),v2Examples:M9.optional(),referencedTypes:ae.set(kx),encoding:Xzn.optional(),source:rqo.optional(),inline:ae.boolean().optional()}).extend(w6);var nqo=Pd;var aqo=ae.enum_(["GET","POST"]);var oqo=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy)}).extend(l1i);var uqo=ae.objectWithoutOptionalProperties({name:Pd,extends:ae.list(CB),properties:ae.list(oqo)});var sqo=ae.objectWithoutOptionalProperties({payloadType:ae.lazy(()=>Vy)}).extend(Cd);var cqo=ae.union("type",{inlinedPayload:uqo,reference:sqo}).transform({transform:e=>{switch(e.type){case"inlinedPayload":return lW.inlinedPayload(e);case"reference":return lW.reference(e);default:return e}},untransform:({_visit:e,...t})=>t});var lqo=ae.objectWithoutOptionalProperties({name:Pd.optional(),payload:ae.lazyObject(()=>am)}).extend(Cd);var fqo=ae.objectWithoutOptionalProperties({id:qDo,name:nqo,displayName:ae.string().optional(),method:aqo,headers:ae.list(lZ),payload:cqo,examples:ae.list(lqo).optional(),v2Examples:KEo.optional()}).extend(w6);var dqo=ae.list(fqo);var pqo=Pd;var rxn=ae.string();var _qo=ae.enum_(["client","server"]);var hqo=ae.objectWithoutOptionalProperties({name:Ah,valueType:ae.lazy(()=>Vy)}).extend(l1i);var yqo=ae.objectWithoutOptionalProperties({name:Pd,extends:ae.list(CB),properties:ae.list(hqo)});var vqo=ae.objectWithoutOptionalProperties({bodyType:ae.lazy(()=>Vy)}).extend(Cd);var bqo=ae.union("type",{inlinedBody:yqo,reference:vqo}).transform({transform:e=>{switch(e.type){case"inlinedBody":return D9.inlinedBody(e);case"reference":return D9.reference(e);default:return e}},untransform:({_visit:e,...t})=>t});var gqo=ae.objectWithoutOptionalProperties({type:rxn,displayName:ae.string().optional(),origin:_qo,body:bqo}).extend(w6);var Oqo=ae.union("type",{inlinedBody:Qzn,reference:ae.lazyObject(()=>am)}).transform({transform:e=>{switch(e.type){case"inlinedBody":return BEe.inlinedBody(e);case"reference":return BEe.reference(e);default:return e}},untransform:({_visit:e,...t})=>t});var mqo=ae.objectWithoutOptionalProperties({type:rxn,body:Oqo});var Pqo=ae.objectWithoutOptionalProperties({name:Pd.optional(),url:ae.string(),pathParameters:ae.list(p1i),headers:ae.list(sWi),queryParameters:ae.list(Gzn),messages:ae.list(mqo)}).extend(Cd);var jqo=ae.objectWithoutOptionalProperties({name:pqo,displayName:ae.string().optional(),baseUrl:cZ.optional(),path:uRe,auth:ae.boolean(),headers:ae.list(lZ),queryParameters:ae.list(c1i),pathParameters:ae.list(BVt),messages:ae.list(gqo),examples:ae.list(Pqo),v2Examples:JEo.optional()}).extend(w6);var wqo=ae.objectWithoutOptionalProperties({pointsTo:ckt});var ixn=ae.objectWithoutOptionalProperties({fernFilepath:Mne,service:skt.optional(),types:ae.list(kx),errors:ae.list(f1i),webhooks:gzn.optional(),websocket:Ozn.optional(),subpackages:ae.list(ckt),hasEndpointsInTree:ae.boolean(),navigationConfig:wqo.optional()}).extend(Cd);var Sqo=ae.objectWithoutOptionalProperties({name:Pd}).extend(ixn);var Dqo=ae.objectWithoutOptionalProperties({discriminant:Ah,contentProperty:Ah});var Eqo=ae.union("type",{statusCode:ae.object({}),property:Dqo}).transform({transform:e=>{switch(e.type){case"statusCode":return CEe.statusCode();case"property":return CEe.property(e);default:return e}},untransform:({_visit:e,...t})=>t});var Mqo=ae.objectWithoutOptionalProperties({header:ae.stringLiteral("User-Agent"),value:ae.string()});var Aqo=ae.objectWithoutOptionalProperties({language:ae.string(),sdkName:ae.string(),sdkVersion:ae.string(),userAgent:Mqo.optional()});var qqo=ae.objectWithoutOptionalProperties({isAuthMandatory:ae.boolean(),hasStreamingEndpoints:ae.boolean(),hasPaginatedEndpoints:ae.boolean(),hasFileDownloadEndpoints:ae.boolean(),platformHeaders:Aqo});var Tqo=ae.objectWithoutOptionalProperties({id:Rzn,name:Pd,type:ae.lazy(()=>Vy)}).extend(Cd);var Cqo=ae.objectWithoutOptionalProperties({typesReferencedOnlyByService:ae.record(skt,ae.list(kx)),sharedTypes:ae.list(kx)});var Bqo=ae.objectWithoutOptionalProperties({defaultEndpoint:CVt.optional(),bannerLink:ae.string().optional(),introduction:ae.string().optional(),apiReferenceLink:ae.string().optional(),features:ae.record(TDo,ae.list(CVt)).optional()});var Iqo=ae.string();var zqo=ae.objectWithoutOptionalProperties({id:Iqo,protoRootUrl:ae.string()});var xqo=ae.union("type",{proto:zqo,openapi:ae.object({})}).transform({transform:e=>{switch(e.type){case"proto":return Dne.proto(e);case"openapi":return Dne.openapi();default:return e}},untransform:({_visit:e,...t})=>t});var Rqo=ae.objectWithoutOptionalProperties({sources:ae.list(xqo)});var Nqo=ae.objectWithoutOptionalProperties({apiKey:ae.string(),workspaceId:ae.string(),collectionId:ae.string().optional()});var Fqo=ae.objectWithoutOptionalProperties({version:ae.string().optional(),packageName:ae.string().optional(),tokenEnvironmentVariable:ae.string()});var Lqo=ae.objectWithoutOptionalProperties({coordinate:ae.string().optional(),version:ae.string().optional(),usernameEnvironmentVariable:ae.string(),passwordEnvironmentVariable:ae.string(),mavenUrlEnvironmentVariable:ae.string()});var nxn=ae.union("type",{postman:Nqo,npm:Fqo,maven:Lqo}).transform({transform:e=>{switch(e.type){case"postman":return okt.postman(e);case"npm":return okt.npm(e);case"maven":return okt.maven(e);default:return e}},untransform:({_visit:e,...t})=>t});var Uqo=ae.objectWithoutOptionalProperties({owner:ae.string(),repo:ae.string(),uri:ae.string().optional(),token:ae.string().optional(),target:nxn});var Vqo=ae.objectWithoutOptionalProperties({target:nxn});var Wqo=ae.objectWithoutOptionalProperties({generateFullProject:ae.boolean()});var Hqo=ae.union("type",{github:Uqo,direct:Vqo,filesystem:Wqo}).transform({transform:e=>{switch(e.type){case"github":return akt.github(e);case"direct":return akt.direct(e);case"filesystem":return akt.filesystem(e);default:return e}},untransform:({_visit:e,...t})=>t});var Hnp=ae.objectWithoutOptionalProperties({fdrApiDefinitionId:ae.string().optional(),apiVersion:jAo.optional(),apiName:Pd,apiDisplayName:ae.string().optional(),apiDocs:ae.string().optional(),auth:MDo,headers:ae.list(lZ),idempotencyHeaders:ae.list(lZ),types:ae.record(kx,iqo),services:ae.record(skt,mAo),webhookGroups:ae.record(gzn,dqo),websocketChannels:ae.record(Ozn,jqo).optional(),errors:ae.record(f1i,BEo),subpackages:ae.record(ckt,Sqo),rootPackage:ixn,constants:CDo,environments:Szn.optional(),basePath:uRe.optional(),pathParameters:ae.list(BVt),errorDiscriminationStrategy:Eqo,sdkConfig:qqo,variables:ae.list(Tqo),serviceTypeReferenceInfo:Cqo,readmeConfig:Bqo.optional(),sourceConfig:Rqo.optional(),publishConfig:Hqo.optional(),dynamic:MEo.optional(),selfHosted:ae.boolean().optional(),audiences:ae.list(dDo).optional()});var f8s={};Dn(f8s,{CsharpProtobufFileOptions:()=>pAo,ProtobufFile:()=>Kzn,ProtobufFileOptions:()=>_Ao,ProtobufService:()=>hAo,ProtobufType:()=>tqo,UserDefinedProtobufType:()=>eqo,WellKnownProtobufType:()=>kAo});var d8s={};Dn(d8s,{DirectPublish:()=>Vqo,Filesystem:()=>Wqo,GithubPublish:()=>Uqo,MavenPublishTarget:()=>Lqo,NpmPublishTarget:()=>Fqo,PostmanPublishTarget:()=>Nqo,PublishTarget:()=>nxn,PublishingConfig:()=>Hqo});var p8s={};Dn(p8s,{AliasTypeDeclaration:()=>HAo,Base64Type:()=>LAo,BigIntegerType:()=>UAo,BooleanType:()=>IAo,ContainerType:()=>exn,DateTimeType:()=>NAo,DateType:()=>RAo,DeclaredTypeName:()=>CB,DoubleType:()=>BAo,DoubleValidationRules:()=>CAo,Encoding:()=>Xzn,EnumTypeDeclaration:()=>Zzn,EnumTypeReference:()=>$np,EnumValue:()=>bli,ExampleAliasType:()=>Yqo,ExampleContainer:()=>aTo,ExampleDatetime:()=>nTo,ExampleEnumType:()=>Kqo,ExampleKeyValuePair:()=>pTo,ExampleListContainer:()=>sTo,ExampleLiteralContainer:()=>uTo,ExampleMapContainer:()=>dTo,ExampleNamedType:()=>oTo,ExampleNullableContainer:()=>fTo,ExampleObjectProperty:()=>kqo,ExampleObjectType:()=>axn,ExampleObjectTypeWithTypeId:()=>rTo,ExampleOptionalContainer:()=>lTo,ExamplePrimitive:()=>oxn,ExampleSetContainer:()=>cTo,ExampleSingleUnionType:()=>eTo,ExampleSingleUnionTypeProperties:()=>tTo,ExampleType:()=>j1a,ExampleTypeReference:()=>am,ExampleTypeReferenceShape:()=>iTo,ExampleTypeShape:()=>txn,ExampleUndiscriminatedUnionType:()=>Zqo,ExampleUnionType:()=>Xqo,FloatType:()=>TAo,IntegerType:()=>EAo,IntegerValidationRules:()=>DAo,JsonEncoding:()=>gAo,Literal:()=>Qqo,LongType:()=>MAo,MapType:()=>Jqo,NamedType:()=>Gqo,NamedTypeDefault:()=>$qo,ObjectProperty:()=>sZ,ObjectPropertyAccess:()=>bDo,ObjectTypeDeclaration:()=>$Ao,PrimitiveType:()=>kzn,PrimitiveTypeV1:()=>Dzn,PrimitiveTypeV2:()=>VAo,ProtoEncoding:()=>OAo,ResolvedNamedType:()=>SAo,ResolvedTypeReference:()=>WAo,ShapeType:()=>wAo,SingleUnionType:()=>JAo,SingleUnionTypeProperties:()=>QAo,SingleUnionTypeProperty:()=>GAo,Source:()=>rqo,StringType:()=>xAo,StringValidationRules:()=>zAo,Type:()=>ZAo,TypeDeclaration:()=>iqo,TypeReference:()=>Vy,Uint64Type:()=>qAo,UintType:()=>AAo,UndiscriminatedUnionMember:()=>YAo,UndiscriminatedUnionTypeDeclaration:()=>XAo,UnionTypeDeclaration:()=>KAo,UuidType:()=>FAo});var $qo=ae.union("type",{enum:bli}).transform({transform:e=>{switch(e.type){case"enum":return fzn.enum(e);default:return e}},untransform:({_visit:e,...t})=>t});var Gqo=ae.objectWithoutOptionalProperties({typeId:kx,fernFilepath:Mne,name:Pd,displayName:bzn.optional(),default:$qo.optional(),inline:ae.boolean().optional()});var Vy=ae.union(ae.discriminant("type","_type"),{container:ae.object({container:ae.lazy(()=>exn)}),named:Gqo,primitive:ae.object({primitive:kzn}),unknown:ae.object({})}).transform({transform:e=>{switch(e.type){case"container":return rf.container(e.container);case"named":return rf.named(e);case"primitive":return rf.primitive(e.primitive);case"unknown":return rf.unknown();default:return e}},untransform:({_visit:e,...t})=>t});var $np=ae.objectWithoutOptionalProperties({default:bli.optional(),name:CB});var Qqo=ae.union("type",{string:ae.object({string:ae.string()}),boolean:ae.object({boolean:ae.boolean()})}).transform({transform:e=>{switch(e.type){case"string":return S9.string(e.string);case"boolean":return S9.boolean(e.boolean);default:return e}},untransform:({_visit:e,...t})=>t});var exn=ae.union(ae.discriminant("type","_type"),{list:ae.object({list:ae.lazy(()=>Vy)}),map:ae.lazyObject(()=>Jqo),nullable:ae.object({nullable:ae.lazy(()=>Vy)}),optional:ae.object({optional:ae.lazy(()=>Vy)}),set:ae.object({set:ae.lazy(()=>Vy)}),literal:ae.object({literal:Qqo})}).transform({transform:e=>{switch(e.type){case"list":return Av.list(e.list);case"map":return Av.map(e);case"nullable":return Av.nullable(e.nullable);case"optional":return Av.optional(e.optional);case"set":return Av.set(e.set);case"literal":return Av.literal(e.literal);default:return e}},untransform:({_visit:e,...t})=>t});var Jqo=ae.objectWithoutOptionalProperties({keyType:ae.lazy(()=>Vy),valueType:ae.lazy(()=>Vy)});var Kqo=ae.objectWithoutOptionalProperties({value:Ah});var txn=ae.union("type",{alias:ae.lazyObject(()=>Yqo),enum:Kqo,object:ae.lazyObject(()=>axn),union:ae.lazyObject(()=>Xqo),undiscriminatedUnion:ae.lazyObject(()=>Zqo)}).transform({transform:e=>{switch(e.type){case"alias":return Rw.alias(e);case"enum":return Rw.enum(e);case"object":return Rw.object(e);case"union":return Rw.union(e);case"undiscriminatedUnion":return Rw.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t});var Yqo=ae.objectWithoutOptionalProperties({value:ae.lazyObject(()=>am)});var axn=ae.objectWithoutOptionalProperties({properties:ae.list(ae.lazyObject(()=>kqo))});var kqo=ae.objectWithoutOptionalProperties({name:Ah,value:ae.lazyObject(()=>am),originalTypeDeclaration:CB});var Xqo=ae.objectWithoutOptionalProperties({discriminant:Ah,singleUnionType:ae.lazyObject(()=>eTo)});var Zqo=ae.objectWithoutOptionalProperties({index:ae.number(),singleUnionType:ae.lazyObject(()=>am)});var eTo=ae.objectWithoutOptionalProperties({wireDiscriminantValue:Ah,shape:ae.lazy(()=>tTo)});var tTo=ae.union("type",{samePropertiesAsObject:ae.lazyObject(()=>rTo),singleProperty:ae.lazyObject(()=>am),noProperties:ae.object({})}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return n3.samePropertiesAsObject(e);case"singleProperty":return n3.singleProperty(e);case"noProperties":return n3.noProperties();default:return e}},untransform:({_visit:e,...t})=>t});var am=ae.objectWithoutOptionalProperties({shape:ae.lazy(()=>iTo)}).extend(fkt);var nTo=ae.objectWithoutOptionalProperties({datetime:ae.date(),raw:ae.string().optional()});var oxn=ae.union("type",{integer:ae.object({integer:ae.number()}),long:ae.object({long:ae.number()}),uint:ae.object({uint:ae.number()}),uint64:ae.object({uint64:ae.number()}),float:ae.object({float:ae.number()}),double:ae.object({double:ae.number()}),boolean:ae.object({boolean:ae.boolean()}),string:ae.object({string:ADo}),date:ae.object({date:ae.string()}),datetime:nTo,uuid:ae.object({uuid:ae.string()}),base64:ae.object({base64:ae.string()}),bigInteger:ae.object({bigInteger:ae.string()})}).transform({transform:e=>{switch(e.type){case"integer":return Nd.integer(e.integer);case"long":return Nd.long(e.long);case"uint":return Nd.uint(e.uint);case"uint64":return Nd.uint64(e.uint64);case"float":return Nd.float(e.float);case"double":return Nd.double(e.double);case"boolean":return Nd.boolean(e.boolean);case"string":return Nd.string(e.string);case"date":return Nd.date(e.date);case"datetime":return Nd.datetime(e);case"uuid":return Nd.uuid(e.uuid);case"base64":return Nd.base64(e.base64);case"bigInteger":return Nd.bigInteger(e.bigInteger);default:return e}},untransform:({_visit:e,...t})=>t});var iTo=ae.union("type",{primitive:ae.object({primitive:oxn}),container:ae.object({container:ae.lazy(()=>aTo)}),unknown:ae.object({unknown:ae.unknown()}),named:ae.lazyObject(()=>oTo)}).transform({transform:e=>{switch(e.type){case"primitive":return Lh.primitive(e.primitive);case"container":return Lh.container(e.container);case"unknown":return Lh.unknown(e.unknown);case"named":return Lh.named(e);default:return e}},untransform:({_visit:e,...t})=>t});var uTo=ae.objectWithoutOptionalProperties({literal:oxn});var aTo=ae.union("type",{list:ae.lazyObject(()=>sTo),set:ae.lazyObject(()=>cTo),optional:ae.lazyObject(()=>lTo),nullable:ae.lazyObject(()=>fTo),map:ae.lazyObject(()=>dTo),literal:uTo}).transform({transform:e=>{switch(e.type){case"list":return Pm.list(e);case"set":return Pm.set(e);case"optional":return Pm.optional(e);case"nullable":return Pm.nullable(e);case"map":return Pm.map(e);case"literal":return Pm.literal(e);default:return e}},untransform:({_visit:e,...t})=>t});var sTo=ae.objectWithoutOptionalProperties({list:ae.list(ae.lazyObject(()=>am)),itemType:ae.lazy(()=>Vy)});var cTo=ae.objectWithoutOptionalProperties({set:ae.list(ae.lazyObject(()=>am)),itemType:ae.lazy(()=>Vy)});var lTo=ae.objectWithoutOptionalProperties({optional:ae.lazyObject(()=>am).optional(),valueType:ae.lazy(()=>Vy)});var fTo=ae.objectWithoutOptionalProperties({nullable:ae.lazyObject(()=>am).optional(),valueType:ae.lazy(()=>Vy)});var dTo=ae.objectWithoutOptionalProperties({map:ae.list(ae.lazyObject(()=>pTo)),keyType:ae.lazy(()=>Vy),valueType:ae.lazy(()=>Vy)});var pTo=ae.objectWithoutOptionalProperties({key:ae.lazyObject(()=>am),value:ae.lazyObject(()=>am)});var oTo=ae.objectWithoutOptionalProperties({typeName:CB,shape:ae.lazy(()=>txn)});var rTo=ae.objectWithoutOptionalProperties({typeId:kx,object:ae.lazyObject(()=>axn)});var _8s={};Dn(_8s,{VariableDeclaration:()=>Tqo,VariableId:()=>Rzn});var h8s={};Dn(h8s,{ExampleWebhookCall:()=>lqo,InlinedWebhookPayload:()=>uqo,InlinedWebhookPayloadProperty:()=>oqo,Webhook:()=>fqo,WebhookGroup:()=>dqo,WebhookHttpMethod:()=>aqo,WebhookName:()=>nqo,WebhookPayload:()=>cqo,WebhookPayloadReference:()=>sqo});var y8s={};Dn(y8s,{ExampleWebSocketMessage:()=>mqo,ExampleWebSocketMessageBody:()=>Oqo,ExampleWebSocketSession:()=>Pqo,InlinedWebSocketMessageBody:()=>yqo,InlinedWebSocketMessageBodyProperty:()=>hqo,WebSocketChannel:()=>jqo,WebSocketMessage:()=>gqo,WebSocketMessageBody:()=>bqo,WebSocketMessageBodyReference:()=>vqo,WebSocketMessageId:()=>rxn,WebSocketMessageOrigin:()=>_qo,WebSocketName:()=>pqo});var fZ={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 Ane={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 cWi({type:e,_default:t,validation:r,visitor:i}){switch(e){case fZ.integer:{let o=r??void 0;return i.primitive({v1:Xv.Integer,v2:pp.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 fZ.double:{let o=r??void 0;return i.primitive({v1:Xv.Double,v2:pp.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 fZ.string:{let o=r??void 0;return i.primitive({v1:Xv.String,v2:pp.string({default:t??void 0,validation:o!=null?{format:o.format,pattern:o.pattern,minLength:o.minLength,maxLength:o.maxLength}:void 0})})}case fZ.float:return i.primitive({v1:Xv.Float,v2:void 0});case fZ.long:return i.primitive({v1:Xv.Long,v2:pp.long({default:t??void 0})});case fZ.boolean:return i.primitive({v1:Xv.Boolean,v2:pp.boolean({default:t??void 0})});case fZ.datetime:return i.primitive({v1:Xv.DateTime,v2:void 0});case fZ.date:return i.primitive({v1:Xv.Date,v2:void 0});case fZ.uuid:return i.primitive({v1:Xv.Uuid,v2:void 0});case fZ.base64:return i.primitive({v1:Xv.Base64,v2:void 0});case fZ.bigint:return i.primitive({v1:Xv.BigInteger,v2:pp.bigInteger({default:t??void 0})});case fZ.uint:return i.primitive({v1:Xv.Uint,v2:void 0});case fZ.uint64:return i.primitive({v1:Xv.Uint64,v2:void 0});case fZ.unknown:return i.unknown()}let n=e.match(Ane.MAP);if(n?.[1]!=null&&n[2]!=null)return i.map({keyType:n[1],valueType:n[2]});let a=e.match(Ane.LIST);if(a?.[1]!=null)return i.list(a[1]);let u=e.match(Ane.SET);if(u?.[1]!=null)return i.set(u[1]);let l=e.match(Ane.OPTIONAL);if(l?.[1]!=null)return i.optional(l[1]);let d=e.match(Ane.NULLABLE);if(d?.[1]!=null)return i.nullable(d[1]);let s=e.match(Ane.LITERAL);if(s?.[1]!=null)return i.literal(S9.string(s[1]));if(s?.[2]!=null){let o=s[2];switch(o){case"false":return i.literal(S9.boolean(!1));case"true":return i.literal(S9.boolean(!0));default:throw new Error(`Unsupported literal value: ${o}`)}}return i.named(e)}var Gnp="bytes";function _kt(e){if(e===Gnp)return{isOptional:!1};if(e.match(Ane.OPTIONAL)?.[1]===Gnp)return{isOptional:!0}}function w1a(e){let t=typeof e=="string"?e:typeof e.body=="string"?e.body:void 0;if(t!=null)return _kt(t)}function b8s({input:e,typeName:t}){for(let r of e.arguments)if(typeof r=="string"){if(r===t)return!0}else if(b8s({input:r,typeName:t}))return!0;return!1}function Qnp(e){return b8s({input:e,typeName:"file"})}function Jnp(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 g8s="file";function Knp(e){return e.match(Ane.LIST)?.[1]===g8s}function sRe(e){if(e===g8s)return{isOptional:!1,isArray:!1};let t=e.match(Ane.OPTIONAL);if(t?.[1]!==void 0){if(t[1]===g8s)return{isOptional:!0,isArray:!1};if(Knp(t[1]))return{isOptional:!0,isArray:!0}}if(Knp(e))return{isOptional:!1,isArray:!0}}function QmS(e){return typeof e=="string"?!1:hM.parse(e["content-type"])?.isMultiPartFormData()??!1?!0:e.body==null?!1:!!(YC(e.body)&&Object.values(e.body.properties??[]).some(KmS))}function lWi(e){if(!(!QmS(e)||e.body==null)&&e.name!=null&&e.body!=null&&YC(e.body))return JmS(e.name,e.body)}function JmS(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=sRe(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 KmS(e){let t=typeof e=="string"?e:e.type;if(t==="file")return!0;if(!t.includes("file"))return!1;let r=Jnp(t);return r==null?!1:Qnp(r)}var Ynp="text";function S1a(e){if(e===Ynp)return{isOptional:!1};if(e.match(Ane.OPTIONAL)?.[1]===Ynp)return{isOptional:!0}}function q2({type:e,_default:t,validation:r,visitor:i}){return cWi({type:e,_default:t,validation:r,visitor:{primitive:i.primitive,map:({keyType:n,valueType:a})=>i.map({keyType:q2({type:n,_default:void 0,validation:void 0,visitor:i}),valueType:q2({type:a,_default:void 0,validation:void 0,visitor:i})}),list:n=>i.list(q2({type:n,_default:void 0,validation:void 0,visitor:i})),set:n=>i.set(q2({type:n,_default:void 0,validation:void 0,visitor:i})),optional:n=>i.optional(q2({type:n,_default:t,validation:r,visitor:i})),nullable:n=>i.nullable(q2({type:n,_default:t,validation:r,visitor:i})),literal:i.literal,named:i.named,unknown:i.unknown}})}function O8s(e,t){if(YmS(e))return t.sdk(e);if(XmS(e))return t.language(e);jo(e)}function YmS(e){return e.sdk!=null}function XmS(e){return e.language!=null}function Xnp(e){return e["response-stream"]!=null&&(typeof e["response-stream"]=="string"||e["response-stream"].format==null||e["response-stream"].format==="json")}function Znp(e){return e["response-stream"]!=null&&typeof e["response-stream"]!="string"&&e["response-stream"].format==="sse"}function fWi(e,t,r){return ZmS(e,t)?r.stream(t):kmS(e,t)?r.events(t):r.body(t)}function ZmS(e,t){return t.stream!==void 0&&Xnp(e)}function kmS(e,t){return t.stream!==void 0&&Znp(e)}function dWi(e,t){if(knp(e))return t.single(e);if(eap(e))return t.any(e);jo(e)}function knp(e){return typeof e=="string"||e.scheme!=null}function eap(e){let[t,...r]=Object.keys(e);return t==="any"&&r.length===0}function D1a(e,t){if(tap(e))return t.header(e);switch(e.scheme){case"basic":return t.basic(e);case"bearer":return t.bearer(e);case"oauth":return t.oauth(e);default:jo(e)}}function tap(e){return e.header!=null}function hkt(e,t){if(rap(e))return t.singleBaseUrl(e);if(uxn(e))return t.multipleBaseUrls(e);jo(e)}function rap(e){return typeof e=="string"||"url"in e}function uxn(e){return typeof e!="string"&&"urls"in e}function sxn(e){return typeof e=="string"?e.startsWith("$"):"variable"in e}function o3(e,t){if(_1i(e))return t.alias(e);if(h1i(e))return t.discriminatedUnion(e);if(xS(e))return t.object(e);if(cxn(e))return t.undiscriminatedUnion(e);if(IVt(e))return t.enum(e);jo(e)}function _1i(e){return typeof e=="string"||e.type!=null}function xS(e){return e.extends!=null||e.properties!=null}function h1i(e){return e.union!=null&&e.discriminated==null}function cxn(e){let t=e;return t.union!=null&&t.discriminated!=null}function IVt(e){return e.enum!=null}var pWi=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 iA=ai(BWi(),1),P9s=ai(_O(),1),x1i={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 lpp({absolutePathToGeneratorsConfiguration:e,rawGeneratorsConfiguration:t,context:r}){let i=hpp(t.metadata),n=t.readme;rCS(r,t);let a=await $TS(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])=>GTS({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 RCo(e){return{...x1i,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 fpp(e){return{...dpp(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 WTS(e){return{...dpp(e),asyncApiMessageNaming:e?.["message-naming"]}}function dpp(e){return{...x1i,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 upp(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:{...x1i}});else if(by.isRawProtobufAPIDefinitionSchema(e))r.push({schema:{type:"protobuf",root:e.proto.root,target:e.proto.target??"",localGeneration:e.proto["local-generation"]??!1},origin:void 0,overrides:e.proto.overrides,audiences:[],settings:{...x1i}});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:{...x1i}}):by.isRawProtobufAPIDefinitionSchema(i)?r.push({schema:{type:"protobuf",root:i.proto.root,target:i.proto.target??"",localGeneration:i.proto["local-generation"]??!1},origin:void 0,overrides:i.proto.overrides,audiences:[],settings:{...x1i}}):r.push({schema:{type:"oss",path:i.path},origin:i.origin,overrides:i.overrides,audiences:i.audiences,settings:RCo(i.settings)});else r.push({schema:{type:"oss",path:e.path},origin:e.origin,overrides:e.overrides,audiences:e.audiences,settings:RCo(e.settings)});else{let i=t[by.API_SETTINGS_KEY],n=t[by.OPENAPI_LOCATION_KEY],a=t[by.API_ORIGIN_LOCATION_KEY],u=t[by.OPENAPI_OVERRIDES_LOCATION_KEY],l=t[by.ASYNC_API_LOCATION_KEY];n!=null&&(typeof n=="string"?r.push({schema:{type:"oss",path:n},origin:a,overrides:u,audiences:[],settings:RCo(i)}):typeof n=="object"&&r.push({schema:{type:"oss",path:n.path},origin:n.origin,overrides:n.overrides,audiences:[],settings:fpp(n.settings)})),l!=null&&r.push({schema:{type:"oss",path:l},origin:a,overrides:void 0,audiences:[],settings:RCo(i)})}return r}async function HTS({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:dWi(e.auth,{any:l=>l.any.includes(a),single:l=>l===a}))):void 0,...e};if(by.isConjureSchema(e.specs))return{type:"conjure",pathToConjureDefinition:e.specs.conjure,...r};let i=[],n={};for(let a of e.specs??[]){let u;if(by.isOpenApiSpecSchema(a))u={schema:{type:"oss",path:a.openapi},origin:a.origin,overrides:a.overrides,audiences:[],settings:fpp(a.settings)};else if(by.isAsyncApiSpecSchema(a))u={schema:{type:"oss",path:a.asyncapi},origin:a.origin,overrides:a.overrides,audiences:[],settings:WTS(a.settings)};else if(by.isProtoSpecSchema(a))u={schema:{type:"protobuf",root:a.proto.root,target:a.proto.target??"",localGeneration:a.proto["local-generation"]??!1},origin:void 0,overrides:a.proto.overrides,audiences:[],settings:{...x1i}};else if(by.isOpenRpcSpecSchema(a))u={schema:{type:"openrpc",path:a.openrpc},origin:void 0,overrides:a.overrides,audiences:[],settings:{...x1i}};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 $TS(e){let t=e.api;if(t!=null){if(by.isApiConfigurationV2Schema(t))return HTS({apiConfiguration:t,rawConfiguration:e});if(by.isNamespacedApiConfiguration(t)){let r={};for(let[i,n]of Object.entries(t.namespaces))r[i]=await upp(n,e);return{type:"multiNamespace",rootDefinitions:void 0,definitions:r}}}return{type:"singleNamespace",definitions:await upp(t,e)}}async function GTS({absolutePathToGeneratorsConfiguration:e,groupName:t,group:r,maybeTopLevelMetadata:i,maybeTopLevelReviewers:n,readme:a}){let u=hpp(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=>QTS({absolutePathToGeneratorsConfiguration:e,generator:l,maybeTopLevelMetadata:i,maybeGroupLevelMetadata:u,maybeTopLevelReviewers:n,maybeGroupLevelReviewers:r.reviewers,readme:a})))}}async function QTS({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 YTS({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"?Gv(Td(e),t.output.path):void 0,absolutePathToLocalSnippets:t.snippets?.path!=null?Gv(Td(e),t.snippets.path):void 0,language:kTS(t.name),irVersionOverride:t["ir-version"]??void 0,publishMetadata:JTS({generatorInvocation:t}),readme:u,settings:t.api?.settings??void 0}}function JTS({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 ppp({pypiOutputMetadata:e,maybeGroupLevelMetadata:t,maybeTopLevelMetadata:r}){let i;return e!=null&&(i=tCS(e),i={...r,...t,...i}),i}function KTS({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(P9s.GithubPullRequestReviewer.team({name:d.name})),i.add(d.name));for(let d of l)n.has(d.name)||(a.push(P9s.GithubPullRequestReviewer.user({name:d.name})),n.add(d.name));return a}async function YTS({absolutePathToGeneratorsConfiguration:e,generator:t,maybeGroupLevelMetadata:r={},maybeTopLevelMetadata:i={},maybeGroupLevelReviewers:n,maybeTopLevelReviewers:a}){let u=t.snippets!=null&&t.snippets.path!=="";if(t.github!=null&&!Y1a(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?ZTS(t.output,r,i):void 0,c=eCS(t),b=c!=null?await XTS({absolutePathToGeneratorsConfiguration:e,githubLicense:c}):void 0,g=t.github.mode??"release";switch(g){case"commit":case"release":return iA.FernFiddle.OutputMode.githubV2(iA.FernFiddle.GithubOutputModeV2.commitAndRelease({owner:d,repo:s,license:b,publishInfo:o,downloadSnippets:u}));case"pull-request":{let O=KTS({topLevelReviewers:a,groupLevelReviewers:n,outputModeReviewers:t.github.reviewers});return iA.FernFiddle.OutputMode.githubV2(iA.FernFiddle.GithubOutputModeV2.pullRequest({owner:d,repo:s,license:b,publishInfo:o,downloadSnippets:u,reviewers:O}))}case"push":return iA.FernFiddle.OutputMode.githubV2(iA.FernFiddle.GithubOutputModeV2.push({owner:d,repo:s,branch:t.github.mode==="push"?t.github.branch:void 0,license:b,publishInfo:o,downloadSnippets:u}));default:jo(g)}}if(t.output==null)return iA.FernFiddle.remoteGen.OutputMode.publish({registryOverrides:{}});switch(t.output.location){case"local-file-system":return iA.FernFiddle.OutputMode.downloadFiles({downloadSnippets:u});case"npm":return iA.FernFiddle.OutputMode.publishV2(iA.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 iA.FernFiddle.OutputMode.publishV2(iA.FernFiddle.remoteGen.PublishOutputModeV2.mavenOverride({registryUrl:_pp(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 iA.FernFiddle.OutputMode.publishV2(iA.FernFiddle.remoteGen.PublishOutputModeV2.postman({apiKey:t.output["api-key"],workspaceId:t.output["workspace-id"]}));case"pypi":return iA.FernFiddle.OutputMode.publishV2(iA.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:ppp({pypiOutputMetadata:t.output.metadata,maybeGroupLevelMetadata:r,maybeTopLevelMetadata:i})}));case"nuget":return iA.FernFiddle.OutputMode.publishV2(iA.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 iA.FernFiddle.OutputMode.publishV2(iA.FernFiddle.remoteGen.PublishOutputModeV2.rubyGemsOverride({registryUrl:t.output.url??"https://rubygems.org/",packageName:t.output["package-name"],apiKey:t.output["api-key"]??"",downloadSnippets:u}));default:jo(t.output)}}async function XTS({absolutePathToGeneratorsConfiguration:e,githubLicense:t}){if(typeof t=="string")switch(t){case"MIT":return iA.FernFiddle.GithubLicense.basic({id:iA.FernFiddle.GithubLicenseId.Mit});case"Apache-2.0":return iA.FernFiddle.GithubLicense.basic({id:iA.FernFiddle.GithubLicenseId.Apache});default:jo(t)}let r=Lu(hl.of(cpp.default.dirname(e)),Ua.of(t.custom)),i=await(0,spp.readFile)(r);return iA.FernFiddle.GithubLicense.custom({contents:i.toString()})}function ZTS(e,t,r){switch(e.location){case"local-file-system":throw new Error("Cannot use local-file-system with github publishing");case"npm":return iA.FernFiddle.GithubPublishInfo.npm({registryUrl:e.url??"https://registry.npmjs.org",packageName:e["package-name"],token:e.token});case"maven":return iA.FernFiddle.GithubPublishInfo.maven({registryUrl:_pp(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 iA.FernFiddle.GithubPublishInfo.postman({apiKey:e["api-key"],workspaceId:e["workspace-id"]});case"pypi":return iA.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:ppp({pypiOutputMetadata:e.metadata,maybeGroupLevelMetadata:t,maybeTopLevelMetadata:r})});case"nuget":return iA.FernFiddle.GithubPublishInfo.nuget({registryUrl:e.url??"https://nuget.org/",packageName:e["package-name"],apiKey:e["api-key"]});case"rubygems":return iA.FernFiddle.GithubPublishInfo.rubygems({registryUrl:e.url??"https://rubygems.org/",packageName:e["package-name"],apiKey:e["api-key"]});default:jo(e)}}function kTS(e){if(e.includes("csharp"))return by.GenerationLanguage.CSHARP;if(e.includes("go"))return by.GenerationLanguage.GO;if(e.includes("java")||e.includes("spring"))return by.GenerationLanguage.JAVA;if(e.includes("php"))return by.GenerationLanguage.PHP;if(e.includes("python")||e.includes("fastapi")||e.includes("pydantic"))return by.GenerationLanguage.PYTHON;if(e.includes("ruby"))return by.GenerationLanguage.RUBY;if(e.includes("swift"))return by.GenerationLanguage.SWIFT;if(e.includes("typescript"))return by.GenerationLanguage.TYPESCRIPT}function _pp(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 eCS(e){return e["publish-metadata"]?.license!=null?e["publish-metadata"].license:e.metadata?.license!=null?e.metadata.license:Y1a(e.github)?void 0:e.github?.license}function hpp(e){return e!=null?{description:e.description,authors:e.authors?.map(t=>({name:t.name,email:t.email}))}:void 0}function tCS(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 rCS(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(`
|
|
1678
1678
|
`)))}function Y1a(e){return e==null?!1:"uri"in e&&"token"in e}async function Gxn({absolutePathToWorkspace:e,context:t}){let r=await R1i({absolutePathToWorkspace:e});if(r==null)return;let i=await(0,ypp.readFile)(r);try{let n=md.load(i.toString()),a=by.serialization.GeneratorsConfigurationSchema.parse(n,{allowUnrecognizedEnumValues:!1,unrecognizedObjectKeys:"fail",allowUnrecognizedUnionMembers:!1,skipValidation:!1,breadcrumbsPrefix:void 0,omitUndefined:!1});if(a.ok)return a.value;throw new Error(a.errors.map(u=>u.message).join(`
|
|
1679
1679
|
`))}catch(n){if(n instanceof md.YAMLException)t.failAndThrow(`Failed to parse ${vpp.default.relative(process.cwd(),r)}: ${n.reason}`);else throw n}}async function RVt({absolutePathToWorkspace:e,context:t}){let r=await Gxn({absolutePathToWorkspace:e,context:t});if(r==null)return;let i=await R1i({absolutePathToWorkspace:e});if(i!=null)return lpp({absolutePathToGeneratorsConfiguration:i,rawGeneratorsConfiguration:r,context:t})}async function R1i({absolutePathToWorkspace:e}){let t=Lu(e,Ua.of("generators.yml")),r=Lu(e,Ua.of("generators.yaml"));if(await mf(t))return t;if(await mf(r))return r}var bpp=(e=0)=>t=>`\x1B[${t+e}m`,gpp=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Opp=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,ix={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Xu2=Object.keys(ix.modifier),iCS=Object.keys(ix.color),nCS=Object.keys(ix.bgColor),Zu2=[...iCS,...nCS];function aCS(){let e=new Map;for(let[t,r]of Object.entries(ix)){for(let[i,n]of Object.entries(r))ix[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=ix[i],e.set(n[0],n[1]);Object.defineProperty(ix,t,{value:r,enumerable:!1})}return Object.defineProperty(ix,"codes",{value:e,enumerable:!1}),ix.color.close="\x1B[39m",ix.bgColor.close="\x1B[49m",ix.color.ansi=bpp(),ix.color.ansi256=gpp(),ix.color.ansi16m=Opp(),ix.bgColor.ansi=bpp(10),ix.bgColor.ansi256=gpp(10),ix.bgColor.ansi16m=Opp(10),Object.defineProperties(ix,{rgbToAnsi256:{value(t,r,i){return t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(a=>a+a).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>ix.rgbToAnsi256(...ix.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else{t-=16;let l=t%36;r=Math.floor(t/36)/5,i=Math.floor(l/6)/5,n=l%6/5}let a=Math.max(r,i,n)*2;if(a===0)return 30;let u=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return a===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(t,r,i)=>ix.ansi256ToAnsi(ix.rgbToAnsi256(t,r,i)),enumerable:!1},hexToAnsi:{value:t=>ix.ansi256ToAnsi(ix.hexToAnsi256(t)),enumerable:!1}}),ix}var oCS=aCS(),NVt=oCS;var FCo=ai(require("process"),1),Ppp=ai(require("os"),1),j9s=ai(require("tty"),1);function $Re(e,t=globalThis.Deno?globalThis.Deno.args:FCo.default.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(r+e),n=t.indexOf("--");return i!==-1&&(n===-1||i<n)}var{env:xN}=FCo.default,NCo;$Re("no-color")||$Re("no-colors")||$Re("color=false")||$Re("color=never")?NCo=0:($Re("color")||$Re("colors")||$Re("color=true")||$Re("color=always"))&&(NCo=1);function uCS(){if("FORCE_COLOR"in xN)return xN.FORCE_COLOR==="true"?1:xN.FORCE_COLOR==="false"?0:xN.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(xN.FORCE_COLOR,10),3)}function sCS(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function cCS(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let i=uCS();i!==void 0&&(NCo=i);let n=r?NCo:i;if(n===0)return 0;if(r){if($Re("color=16m")||$Re("color=full")||$Re("color=truecolor"))return 3;if($Re("color=256"))return 2}if("TF_BUILD"in xN&&"AGENT_NAME"in xN)return 1;if(e&&!t&&n===void 0)return 0;let a=n||0;if(xN.TERM==="dumb")return a;if(FCo.default.platform==="win32"){let u=Ppp.default.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in xN)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(u=>u in xN)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in xN)||xN.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in xN)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(xN.TEAMCITY_VERSION)?1:0;if(xN.COLORTERM==="truecolor"||xN.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in xN){let u=Number.parseInt((xN.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(xN.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(xN.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(xN.TERM)||"COLORTERM"in xN?1:a}function mpp(e,t={}){let r=cCS(e,{streamIsTTY:e&&e.isTTY,...t});return sCS(r)}var lCS={stdout:mpp({isTTY:j9s.default.isatty(1)}),stderr:mpp({isTTY:j9s.default.isatty(2)})},jpp=lCS;function wpp(e,t,r){let i=e.indexOf(t);if(i===-1)return e;let n=t.length,a=0,u="";do u+=e.slice(a,i)+t+r,a=i+n,i=e.indexOf(t,a);while(i!==-1);return u+=e.slice(a),u}function Spp(e,t,r,i){let n=0,a="";do{let u=e[i-1]==="\r";a+=e.slice(n,u?i-1:i)+t+(u?`\r
|
|
1680
1680
|
`:`
|
|
@@ -1711,7 +1711,7 @@ ${oqp.default.cursorShow}`)}releaseCursor(){this.extraLinesUnderPrompt>0&&PQs(th
|
|
|
1711
1711
|
`+MHi.default.red(">> ")+t),this.screen.render(r,i)}getMaskedValue(t){return this.status==="answered"?this.opt.mask?MHi.default.cyan(hqp(t,this.opt.mask)):MHi.default.italic(MHi.default.dim("[hidden]")):this.opt.mask?hqp(t,this.opt.mask):MHi.default.italic(MHi.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 UFo=ai(z2(),1),LTp=ai(_Js(),1),UTp=ai(VEe(),1);var XDa=class extends x2{_run(t){this.done=t,this.editorResult=new UTp.Subject;let r=jW(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"?UFo.default.dim("Received"):UFo.default.dim("Press <enter> to launch your preferred editor."),t&&(r=UFo.default.red(">> ")+t),this.screen.render(i,r)}startExternalEditor(){this.rl.pause(),(0,LTp.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 GTp=require("stream");var HTp=ai(require("readline"),1),$Tp=ai(WTp(),1),xHi=class{constructor(t){this.rl||=HTp.default.createInterface(S_D(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 S_D(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 $Tp.default;return r.pipe(e.output||process.stdout),{terminal:!0,...e,input:t,output:r}}var ZDa=class extends xHi{constructor(t={}){super(t),this.log=new GTp.Writable({write:(r,i,n)=>{this.writeLog(r),n()}}),this.bottomBar=t.bottomBar||"",this.render()}render(){return this.write(this.bottomBar),this}clean(){return BDa(this.rl,this.bottomBar.split(`
|
|
1712
1712
|
`).length),this}updateBottomBar(t){return BDa(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+`
|
|
1713
1713
|
`}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&&hFo(this.rl,t.length+this.rl.line.length),this.rl.output.write(t)}};var UE=ai(VEe(),1),KTp=ai(tDa(),1);var VFo=ai(VEe(),1),QTp=ai(tDa(),1),WFo=function(e,t,r){return typeof e[t]!="function"?(0,VFo.of)(e):(0,VFo.from)((0,QTp.default)(e[t])(r).then(i=>(e[t]=i,e)))};var JTp={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}},YNn=class extends xHi{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,UE.from)(t):(0,UE.isObservable)(t)?i=t:Object.values(t).every(n=>typeof n=="object"&&!Array.isArray(n)&&n!=null)?i=(0,UE.from)(Object.entries(t).map(([n,a])=>({name:n,...a}))):i=(0,UE.from)([t]),this.process=i.pipe((0,UE.concatMap)(this.processQuestion.bind(this)),(0,UE.publish)()),this.process.connect(),this.process.pipe((0,UE.reduce)((n,a)=>(JTp.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,UE.defer)(()=>(0,UE.of)(t).pipe((0,UE.concatMap)(this.setDefaultType.bind(this)),(0,UE.concatMap)(this.filterIfRunnable.bind(this)),(0,UE.concatMap)(()=>WFo(t,"message",this.answers)),(0,UE.concatMap)(()=>WFo(t,"default",this.answers)),(0,UE.concatMap)(()=>WFo(t,"choices",this.answers)),(0,UE.concatMap)(this.fetchAnswer.bind(this))))}fetchAnswer(t){let r=this.prompts[t.type];return this.activePrompt=new r(t,this.rl,this.answers),(0,UE.defer)(()=>(0,UE.from)(this.activePrompt.run().then(i=>({name:t.name,answer:i}))))}setDefaultType(t){return this.prompts[t.type]||(t.type="input"),(0,UE.defer)(()=>(0,UE.of)(t))}filterIfRunnable(t){if(t.askAnswered!==!0&&JTp.get(this.answers,t.name)!==void 0)return UE.EMPTY;if(t.when===!1)return UE.EMPTY;if(typeof t.when!="function")return(0,UE.of)(t);let{answers:r}=this;return(0,UE.defer)(()=>(0,UE.from)((0,KTp.default)(t.when)(r).then(i=>{if(i)return t})).pipe((0,UE.filter)(i=>i!=null)))}};function YTp(e){let t=function(r,i){let n;try{n=new YNn(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",zDa),this.registerPrompt("input",EHi),this.registerPrompt("number",xDa),this.registerPrompt("confirm",RDa),this.registerPrompt("rawlist",NDa),this.registerPrompt("expand",FDa),this.registerPrompt("checkbox",LDa),this.registerPrompt("password",UDa),this.registerPrompt("editor",XDa)},t.restoreDefaultPrompts(),t}var yJs=YTp();function E_D(e,t){yJs.registerPrompt(e,t)}function M_D(){yJs.restoreDefaultPrompts()}var A_D={prompt:yJs,ui:{BottomBar:ZDa,Prompt:YNn},createPromptModule:YTp,registerPrompt:E_D,restoreDefaultPrompts:M_D,Separator:sae},HFo=A_D;var sFn=require("path"),qBp=require("fs"),TBp=require("readline"),tBp="posthog-node";function lvD(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[d3o.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 d3o=class{constructor(t,r,i,n){this.name=tBp,this.name=tBp,this.setupOnce=function(a,u){let l=u()?.getClient()?.getDsn()?.projectId;a(lvD(t,{organization:r,projectId:l,prefix:i,severityAllowList:n}))}}};d3o.POSTHOG_ID_TAG="posthog_distinct_id";var u3o="0123456789abcdef",p3o=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+=u3o.charAt(this.bytes[r]>>>4),t+=u3o.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+=u3o.charAt(this.bytes[r]>>>4),t+=u3o.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}},aKs=class{constructor(t){this.timestamp=0,this.counter=0,this.random=t??fvD()}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 p3o.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,p3o.ofInner(t)}},fvD=()=>({nextUint32:()=>Math.trunc(Math.random()*65536)*65536+Math.trunc(Math.random()*65536)}),rBp,oKs=()=>dvD().toString(),dvD=()=>(rBp||(rBp=new aKs)).generate();function pvD(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 _vD(e,t){global.process.on("uncaughtException",pvD(e,t))}function hvD(e){global.process.on("unhandledRejection",t=>{e(t,{mechanism:{type:"onunhandledrejection",handled:!1}})})}var s3o,iBp,c3o;function yvD(e){let t=globalThis._posthogChunkIds;if(!t)return console.error("No chunk id map found"),{};let r=Object.keys(t);return c3o&&r.length===iBp||(iBp=r.length,c3o=r.reduce((i,n)=>{s3o||(s3o={});let a=s3o[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,s3o[n]=[s,o];break}}}return i},{})),c3o}function vvD(e){return typeof Event<"u"&&CBp(e,Event)}function bvD(e){return BBp(e,"Object")}function _Ks(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return CBp(e,Error)}}function CBp(e,t){try{return e instanceof t}catch{return!1}}function gvD(e){return BBp(e,"ErrorEvent")}function BBp(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}async function OvD(e,t,r,i){let a=i&&i.mechanism||{handled:!0,type:"generic"},u=IBp(a,r,i);return{$exception_list:await Promise.all(u.map(async s=>{let o=await EvD(e,t,s);return o.value=o.value||"",o.type=o.type||"Error",o.mechanism=a,o}))}}function IBp(e,t,r){let i=mvD(e,t,r);return i.cause?[i,...IBp(e,i.cause,r)]:[i]}function mvD(e,t,r){if(_Ks(t))return t;if(e.synthetic=!0,bvD(t)){let n=PvD(t);if(n)return n;let a=jvD(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 PvD(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];if(_Ks(r))return r}}function jvD(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=SvD(e);if(gvD(e))return`Event \`ErrorEvent\` captured as exception with message \`${e.message}\``;let r=wvD(e);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${t}`}function wvD(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function SvD(e,t=40){let r=Object.keys(DvD(e));r.sort();let i=r[0];if(!i)return"[object has no keys]";if(i.length>=t)return nBp(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:nBp(a,t)}return""}function nBp(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function DvD(e){return _Ks(e)?{message:e.message,name:e.name,stack:e.stack,...aBp(e)}:vvD(e)?{type:e.type,target:oBp(e.target),currentTarget:oBp(e.currentTarget),...aBp(e)}:e}function aBp(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 oBp(e){try{return Object.prototype.toString.call(e)}catch{return"<unknown>"}}async function EvD(e,t,r){let i={type:r.name||r.constructor.name,value:r.message},n=MvD(e,r);for(let a of t)n=await a(n);return n.length&&(i.stacktrace={frames:n,type:"raw"}),i}function MvD(e,t){return AvD(e(t.stack||"",1),e)}function AvD(e,t){let r=yvD(t);return e.forEach(i=>{i.filename&&(i.chunk_id=r[i.filename])}),e}var qvD=2e3,aFn=class e{static async captureException(t,r,i,n,a){let u={...a};n||(u.$process_person_profile=!1);let l=await OvD(this.stackParser,this.frameModifiers,r,i);t.capture({event:"$exception",distinctId:n||oKs(),properties:{...l,...u}})}constructor(t,r){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this.startAutocaptureIfEnabled()}startAutocaptureIfEnabled(){this.isEnabled()&&(_vD(this.onException.bind(this),this.onFatalError.bind(this)),hvD(this.onException.bind(this)))}onException(t,r){e.captureException(this.client,t,r)}async onFatalError(){await this.client.shutdown(qvD)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}};function TvD(e=process.argv[1]?(0,sFn.dirname)(process.argv[1]):process.cwd(),t=sFn.sep==="\\"){let r=t?uBp(e):e;return i=>{if(!i)return;let n=t?uBp(i):i,{dir:a,base:u,ext:l}=sFn.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 uBp(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}var _3o=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)}}},f3o=new _3o(25),zBp=new _3o(20),hKs=7,CvD=1e3,BvD=1e4;async function IvD(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"||NvD(u)||FvD(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(zBp.get(n))continue;let a=t[n];if(!a)continue;a.sort((d,s)=>d-s);let u=UvD(a);if(u.every(d=>LvD(n,d)))continue;let l=VvD(f3o,n,{});i.push(zvD(n,u,l))}return await Promise.all(i).catch(()=>{}),e&&e.length>0&&xvD(e,f3o),f3o.reduce(),e}function zvD(e,t,r){return new Promise(i=>{let n=(0,qBp.createReadStream)(e),a=(0,TBp.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(){zBp.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]=WvD(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 xvD(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;RvD(r.lineno,r,i)}}function RvD(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let n=xBp(e);n<e;n++){let a=r[n];if(a===void 0){sBp(t);return}t.pre_context.push(a)}if(r[e]===void 0){sBp(t);return}t.context_line=r[e];let i=RBp(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 sBp(e){delete e.pre_context,delete e.context_line,delete e.post_context}function NvD(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function FvD(e){return e.lineno!==void 0&&e.lineno>BvD||e.colno!==void 0&&e.colno>CvD}function LvD(e,t){let r=f3o.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 UvD(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let i=cBp(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+hKs:(n.push(i),i=cBp(a)),t++}return n}function cBp(e){return[xBp(e),RBp(e)]}function xBp(e){return Math.max(1,e-hKs)}function RBp(e){return e+hKs}function VvD(e,t,r){let i=e.get(t);return i===void 0?(e.set(t,r),r):i}function WvD(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 HvD="4.18.0",_ae;(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"})(_ae||(_ae={}));var lBp;(function(e){e.Left="left",e.Right="right",e.Center="center"})(lBp||(lBp={}));var fBp;(function(e){e.Button="button",e.Tab="tab",e.Selector="selector"})(fBp||(fBp={}));var dBp;(function(e){e.Popover="popover",e.API="api",e.Widget="widget"})(dBp||(dBp={}));var pBp;(function(e){e.Html="html",e.Text="text"})(pBp||(pBp={}));var _Bp;(function(e){e.Number="number",e.Emoji="emoji"})(_Bp||(_Bp={}));var hBp;(function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"})(hBp||(hBp={}));var yBp;(function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"})(yBp||(yBp={}));var vBp;(function(e){e.Regex="regex",e.NotRegex="not_regex",e.Exact="exact",e.IsNot="is_not",e.Icontains="icontains",e.NotIcontains="not_icontains"})(vBp||(vBp={}));var bBp;(function(e){e.Contains="contains",e.Exact="exact",e.Regex="regex"})(bBp||(bBp={}));var $vD=e=>{if("flags"in e){let t=QvD(e.flags),r=JvD(e.flags);return{...e,featureFlags:t,featureFlagPayloads:r}}else{let t=e.featureFlags??{},r=Object.fromEntries(Object.entries(e.featureFlagPayloads||{}).map(([n,a])=>[n,NBp(a)])),i=Object.fromEntries(Object.entries(t).map(([n,a])=>[n,GvD(n,a,r[n])]));return{...e,featureFlags:t,featureFlagPayloads:r,flags:i}}};function GvD(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 QvD=e=>Object.fromEntries(Object.entries(e??{}).map(([t,r])=>[t,yKs(r)]).filter(([,t])=>t!==void 0)),JvD=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?NBp(i):void 0]}))},yKs=e=>e===void 0?void 0:e.variant??e.enabled,NBp=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}},KvD=1,YvD=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"]),XvD="utf8";function ZvD(e,t){if(!e||typeof e!="string"||kvD(e))throw new Error(t)}function kvD(e){return e.trim().length===0}function ebD(e){return e?.replace(/\/+$/,"")}async function tbD(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 gBp(){return new Date().getTime()}function iKs(){return new Date().toISOString()}function h3o(e,t){let r=setTimeout(e,t);return r?.unref&&r?.unref(),r}function rbD(){return typeof fetch<"u"?fetch:typeof globalThis.fetch<"u"?globalThis.fetch:void 0}function ibD(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 nbD(e,t=0,r){let i=ibD(e);return r?.has(i)?!1:parseInt(i,16)/4294967295<t}function OBp(e){return Promise.all(e.map(t=>(t??Promise.resolve()).then(r=>({status:"fulfilled",value:r}),r=>({status:"rejected",reason:r}))))}var sEa=String.fromCharCode,mBp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l3o={};function abD(e,t){if(!l3o[e]){l3o[e]={};for(let r=0;r<e.length;r++)l3o[e][e.charAt(r)]=r}return l3o[e][t]}var iFn={compressToBase64:function(e){if(e==null)return"";let t=iFn._compress(e,6,function(r){return mBp.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:iFn._decompress(e.length,32,function(t){return abD(mBp,e.charAt(t))})},compress:function(e){return iFn._compress(e,16,function(t){return sEa(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:iFn._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=sEa(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=sEa(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++]=sEa(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++]=sEa(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++)}}},uKs=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)}},oFn=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()}},cEa=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};async function PBp(e){if(e instanceof oFn){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 nKs(e){return typeof e=="object"&&(e instanceof oFn||e instanceof cEa)}function jBp(e){return typeof e=="object"&&e instanceof oFn&&e.status===413}var sKs;(function(e){e.FeatureFlags="feature_flags",e.Recordings="recordings"})(sKs||(sKs={}));var cKs=class{constructor(t,r){this.flushPromise=null,this.shutdownPromise=null,this.pendingPromises={},this._events=new uKs,this._isInitialized=!1,ZvD(t,"You must pass your PostHog project's api key."),this.apiKey=t,this.host=ebD(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:nKs},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(_ae.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(_ae.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(_ae.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=oKs();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=nbD(this.apiKey,KvD,YvD)?`${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=>$vD(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=yKs(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(sKs.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(_ae.Props)),this._props||{}}set props(t){this._props=t}async register(t){this.wrap(()=>{this.props={...this.props,...t},this.setPersistedProperty(_ae.Props,this.props)})}async unregister(t){this.wrap(()=>{delete this.props[t],this.setPersistedProperty(_ae.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(_ae.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(_ae.Queue,a),this._events.emit(t,n),a.length>=this.flushAt&&this.flushBackground(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=h3o(()=>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:iKs()};this.historicalMigration&&(n.historical_migration=!0);let a=JSON.stringify(n),u=this.captureMode==="form"?`${this.host}/e/?ip=1&_=${gBp()}&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(iFn.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:iKs(),uuid:i?.uuid?i.uuid:oKs()};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 PBp(t)})}async flush(){let t=OBp([this.flushPromise]).then(()=>this._flush());return this.flushPromise=t,this.addPendingPromise(t),OBp([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(_ae.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(_ae.Queue)||[]).slice(n.length);this.setPersistedProperty(_ae.Queue,g),t=g},l={api_key:this.apiKey,batch:a,sent_at:iKs()};this.historicalMigration&&(l.historical_migration=!0);let d=JSON.stringify(l),s=this.captureMode==="form"?`${this.host}/e/?ip=1&_=${gBp()}&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(iFn.compressToBase64(d))}&compression=lz64`}:{method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:d},c={retryCheck:b=>jBp(b)?!1:nKs(b)};try{await this.fetchWithRetry(s,o,c)}catch(b){if(jBp(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 cEa||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,XvD)}catch{l=new TextEncoder().encode(u).length}return await tbD(async()=>{let d=null;try{d=await this.fetch(t,{signal:AbortSignal.timeout(n??this.requestTimeout),...r})}catch(o){throw new cEa(o)}if(!(r.mode==="no-cors")&&(d.status<200||d.status>=400))throw new oFn(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(_ae.Queue)||[]).length===0||(await this.flush(),r)););}catch(n){if(!nKs(n))throw n;await PBp(n)}};return Promise.race([new Promise((n,a)=>{h3o(()=>{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}},lKs=rbD();if(!lKs){let e=eBp();lKs=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 FBp=lKs,y3o=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()}},LBp=new y3o(async()=>{try{return await import("crypto")}catch{return}});async function obD(){return await LBp.getValue()}var ubD=new y3o(async()=>{if(typeof globalThis.crypto?.subtle<"u")return globalThis.crypto.subtle;try{let e=await LBp.getValue();if(e?.webcrypto?.subtle)return e.webcrypto.subtle}catch{}});async function sbD(){return await ubD.getValue()}async function cbD(e){let t=await obD();if(t)return t.createHash("sha1").update(e).digest("hex");let r=await sbD();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 lbD=60*1e3,fbD=1152921504606847e3,dbD=["is_not"],nFn=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}},R2=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},fKs=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||FBp,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 R2?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 R2||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 R2("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 R2("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 R2)u=!0;else throw o}if(l!==void 0)return l;if(u)throw new R2("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=VBp(l,n,this.cohorts,this.debugMode):s=UBp(l,n,u),!s)return!1}if(a==null)return!0}return!(a!=null&&await wBp(t.key,r)>a/100)}async getMatchingVariant(t,r){let i=await wBp(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(lbD,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 nFn(`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 nFn(`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 nFn(`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 nFn&&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=h3o(()=>{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=h3o(()=>{a.abort()},this.timeout),i.signal=a.signal}try{return this.fetch(r,i)}finally{clearTimeout(n)}}};async function wBp(e,t,r=""){let i=await cbD(`${e}.${t}${r}`);return parseInt(i.slice(0,15),16)/fbD}function UBp(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 R2("Operator is_not_set is not supported")}else throw new R2(`Property ${i} not found in propertyValues`);let u=t[i];if(u==null&&!dbD.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 SBp(String(n))&&String(u).match(String(n))!==null;case"not_regex":return SBp(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=pbD(String(n));if(s==null&&(s=DBp(n)),s==null)throw new R2(`Invalid date: ${n}`);let o=DBp(u);return["is_date_before"].includes(a)?o<s:o>s}default:throw new R2(`Unknown operator: ${a}`)}}function VBp(e,t,r,i=!1){let n=String(e.value);if(!(n in r))throw new R2("can't match cohort without a given cohort property value");let a=r[n];return WBp(a,t,r,i)}function WBp(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=WBp(l,t,r,i);if(n==="AND"){if(!d)return!1}else if(d)return!0}catch(d){if(d instanceof R2)i&&console.debug(`Failed to compute property ${l} locally: ${d}`),u=!0;else throw d}if(u)throw new R2("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=VBp(l,t,r,i):d=UBp(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 R2)i&&console.debug(`Failed to compute property ${l} locally: ${d}`),u=!0;else throw d}if(u)throw new R2("can't match cohort without a given cohort property value");return n==="AND"}}function SBp(e){try{return new RegExp(e),!0}catch{return!1}}function DBp(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 R2(`${e} is in an invalid date format`)}else throw new R2(`The date provided ${e} must be a string, number, or date object`)}function pbD(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 dKs=class{constructor(){this._memoryStorage={}}getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}},_bD=100,EBp=30*1e3,hbD=50*1e3,pKs=class extends cKs{constructor(t,r={}){if(super(t,r),this._memoryStorage=new dKs,this.options=r,this.options.featureFlagsPollingInterval=typeof r.featureFlagsPollingInterval=="number"?Math.max(r.featureFlagsPollingInterval,_bD):EBp,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 fKs({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 aFn(this,r),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=r.maxCacheSize||hbD}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):FBp(t,r)}getLibraryVersion(){return HvD}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=EBp){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=yKs(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");aFn.captureException(this,t,{syntheticException:n},r,i)}},MBp=/\(error: (.*)\)/,HBp=50,$Bp="?";function ybD(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||$Bp,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:ABp(n[3]),colno:ABp(n[4]),in_app:vbD(o||"",c),platform:"node:javascript"}}if(i.match(t))return{filename:i,platform:"node:javascript"}}}function vbD(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 ABp(e){return parseInt(e||"",10)||void 0}function bbD(e){return[90,ybD(e)]}function gbD(e){let r=[bbD(e)].sort((i,n)=>i[0]-n[0]).map(i=>i[1]);return(i,n=0)=>{let a=[],u=i.split(`
|
|
1714
|
-
`);for(let l=n;l<u.length;l++){let d=u[l];if(d.length>1024)continue;let s=MBp.test(d)?d.replace(MBp,"$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>=HBp)break}}return ObD(a)}}function ObD(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,HBp).map(r=>({...r,filename:r.filename||mbD(t).filename,function:r.function||$Bp}))}function mbD(e){return e[e.length-1]||{}}aFn.stackParser=gbD(TvD());aFn.frameModifiers=[IvD];var uFn=class extends pKs{getLibraryId(){return"posthog-node"}};var v3o=class{posthog;constructor({posthogApiKey:t}){this.posthog=new uFn(t)}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"0.64.21",usingAccessToken:!0}})}async flush(){await this.posthog.flush()}};var lEa=class{async sendEvent(){}async identify(){}async flush(){}};var cFn=require("fs/promises"),KBp=require("os"),YBp=require("path");var GBp=ai(require("crypto")),g3o=new Uint8Array(256),b3o=g3o.length;function vKs(){return b3o>g3o.length-16&&(GBp.default.randomFillSync(g3o),b3o=0),g3o.slice(b3o,b3o+=16)}var DW=[];for(let e=0;e<256;++e)DW.push((e+256).toString(16).slice(1));function QBp(e,t=0){return DW[e[t+0]]+DW[e[t+1]]+DW[e[t+2]]+DW[e[t+3]]+"-"+DW[e[t+4]]+DW[e[t+5]]+"-"+DW[e[t+6]]+DW[e[t+7]]+"-"+DW[e[t+8]]+DW[e[t+9]]+"-"+DW[e[t+10]]+DW[e[t+11]]+DW[e[t+12]]+DW[e[t+13]]+DW[e[t+14]]+DW[e[t+15]]}var JBp=ai(require("crypto")),bKs={randomUUID:JBp.default.randomUUID};function PbD(e,t,r){if(bKs.randomUUID&&!t&&!e)return bKs.randomUUID();e=e||{};let i=e.random||(e.rng||vKs)();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 QBp(i)}var hae=PbD;var jbD="id",wbD=".fern",fEa=class{posthog;userId;constructor({token:t,posthogApiKey:r}){this.posthog=new uFn(r),this.userId=t==null?void 0:sVs(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.64.21",...t,...t.properties}})}async flush(){await this.posthog.flush()}persistedDistinctId;async getPersistedDistinctId(){if(this.persistedDistinctId==null){let t=Lu(hl.of((0,KBp.homedir)()),Ua.of(wbD),Ua.of(jbD));await mf(t)||(await(0,cFn.mkdir)((0,YBp.dirname)(t),{recursive:!0}),await(0,cFn.writeFile)(t,hae())),this.persistedDistinctId=(await(0,cFn.readFile)(t)).toString()}return this.persistedDistinctId}};var gKs;async function lFn(){return gKs==null&&(gKs=await SbD()),gKs}async function SbD(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||t)return new lEa;let r=await NBo();return r!=null?new fEa({token:r,posthogApiKey:e}):await cRn()!=null?new v3o({posthogApiKey:e}):new fEa({token:void 0,posthogApiKey:e})}catch{return new lEa}}function dEa(e,t){return function(){return e.apply(t,arguments)}}var{toString:DbD}=Object.prototype,{getPrototypeOf:mKs}=Object,{iterator:m3o,toStringTag:ZBp}=Symbol,P3o=(e=>t=>{let r=DbD.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),lWt=e=>(e=e.toLowerCase(),t=>P3o(t)===e),j3o=e=>t=>typeof t===e,{isArray:fFn}=Array,pEa=j3o("undefined");function EbD(e){return e!==null&&!pEa(e)&&e.constructor!==null&&!pEa(e.constructor)&&yae(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var kBp=lWt("ArrayBuffer");function MbD(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kBp(e.buffer),t}var AbD=j3o("string"),yae=j3o("function"),eIp=j3o("number"),w3o=e=>e!==null&&typeof e=="object",qbD=e=>e===!0||e===!1,O3o=e=>{if(P3o(e)!=="object")return!1;let t=mKs(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ZBp in e)&&!(m3o in e)},TbD=lWt("Date"),CbD=lWt("File"),BbD=lWt("Blob"),IbD=lWt("FileList"),zbD=e=>w3o(e)&&yae(e.pipe),xbD=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||yae(e.append)&&((t=P3o(e))==="formdata"||t==="object"&&yae(e.toString)&&e.toString()==="[object FormData]"))},RbD=lWt("URLSearchParams"),[NbD,FbD,LbD,UbD]=["ReadableStream","Request","Response","Headers"].map(lWt),VbD=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _Ea(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,n;if(typeof e!="object"&&(e=[e]),fFn(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 tIp(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 VHi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rIp=e=>!pEa(e)&&e!==VHi;function OKs(){let{caseless:e}=rIp(this)&&this||{},t={},r=(i,n)=>{let a=e&&tIp(t,n)||n;O3o(t[a])&&O3o(i)?t[a]=OKs(t[a],i):O3o(i)?t[a]=OKs({},i):fFn(i)?t[a]=i.slice():t[a]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&_Ea(arguments[i],r);return t}var WbD=(e,t,r,{allOwnKeys:i}={})=>(_Ea(t,(n,a)=>{r&&yae(n)?e[a]=dEa(n,r):e[a]=n},{allOwnKeys:i}),e),HbD=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$bD=(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)},GbD=(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&&mKs(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},QbD=(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},JbD=e=>{if(!e)return null;if(fFn(e))return e;let t=e.length;if(!eIp(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},KbD=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&mKs(Uint8Array)),YbD=(e,t)=>{let i=(e&&e[m3o]).call(e),n;for(;(n=i.next())&&!n.done;){let a=n.value;t.call(e,a[0],a[1])}},XbD=(e,t)=>{let r,i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},ZbD=lWt("HTMLFormElement"),kbD=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,n){return i.toUpperCase()+n}),XBp=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),e0D=lWt("RegExp"),iIp=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),i={};_Ea(r,(n,a)=>{let u;(u=t(n,a,e))!==!1&&(i[a]=u||n)}),Object.defineProperties(e,i)},t0D=e=>{iIp(e,(t,r)=>{if(yae(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let i=e[r];if(yae(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+"'")})}})},r0D=(e,t)=>{let r={},i=n=>{n.forEach(a=>{r[a]=!0})};return fFn(e)?i(e):i(String(e).split(t)),r},i0D=()=>{},n0D=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function a0D(e){return!!(e&&yae(e.append)&&e[ZBp]==="FormData"&&e[m3o])}var o0D=e=>{let t=new Array(10),r=(i,n)=>{if(w3o(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[n]=i;let a=fFn(i)?[]:{};return _Ea(i,(u,l)=>{let d=r(u,n+1);!pEa(d)&&(a[l]=d)}),t[n]=void 0,a}}return i};return r(e,0)},u0D=lWt("AsyncFunction"),s0D=e=>e&&(w3o(e)||yae(e))&&yae(e.then)&&yae(e.catch),nIp=((e,t)=>e?setImmediate:t?((r,i)=>(VHi.addEventListener("message",({source:n,data:a})=>{n===VHi&&a===r&&i.length&&i.shift()()},!1),n=>{i.push(n),VHi.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",yae(VHi.postMessage)),c0D=typeof queueMicrotask<"u"?queueMicrotask.bind(VHi):typeof process<"u"&&process.nextTick||nIp,l0D=e=>e!=null&&yae(e[m3o]),us={isArray:fFn,isArrayBuffer:kBp,isBuffer:EbD,isFormData:xbD,isArrayBufferView:MbD,isString:AbD,isNumber:eIp,isBoolean:qbD,isObject:w3o,isPlainObject:O3o,isReadableStream:NbD,isRequest:FbD,isResponse:LbD,isHeaders:UbD,isUndefined:pEa,isDate:TbD,isFile:CbD,isBlob:BbD,isRegExp:e0D,isFunction:yae,isStream:zbD,isURLSearchParams:RbD,isTypedArray:KbD,isFileList:IbD,forEach:_Ea,merge:OKs,extend:WbD,trim:VbD,stripBOM:HbD,inherits:$bD,toFlatObject:GbD,kindOf:P3o,kindOfTest:lWt,endsWith:QbD,toArray:JbD,forEachEntry:YbD,matchAll:XbD,isHTMLForm:ZbD,hasOwnProperty:XBp,hasOwnProp:XBp,reduceDescriptors:iIp,freezeMethods:t0D,toObjectSet:r0D,toCamelCase:kbD,noop:i0D,toFiniteNumber:n0D,findKey:tIp,global:VHi,isContextDefined:rIp,isSpecCompliantForm:a0D,toJSONObject:o0D,isAsyncFn:u0D,isThenable:s0D,setImmediate:nIp,asap:c0D,isIterable:l0D};function dFn(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)}us.inherits(dFn,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:us.toJSONObject(this.config),code:this.code,status:this.status}}});var aIp=dFn.prototype,oIp={};["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=>{oIp[e]={value:e}});Object.defineProperties(dFn,oIp);Object.defineProperty(aIp,"isAxiosError",{value:!0});dFn.from=(e,t,r,i,n,a)=>{let u=Object.create(aIp);return us.toFlatObject(e,u,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),dFn.call(u,e.message,t,r,i,n),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};var Np=dFn;var uIp=ai($Fo(),1),S3o=uIp.default;function PKs(e){return us.isPlainObject(e)||us.isArray(e)}function cIp(e){return us.endsWith(e,"[]")?e.slice(0,-2):e}function sIp(e,t,r){return e?e.concat(t).map(function(n,a){return n=cIp(n),!r&&a?"["+n+"]":n}).join(r?".":""):t}function f0D(e){return us.isArray(e)&&!e.some(PKs)}var d0D=us.toFlatObject(us,{},null,function(t){return/^is[A-Z]/.test(t)});function p0D(e,t,r){if(!us.isObject(e))throw new TypeError("target must be an object");t=t||new(S3o||FormData),r=us.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,w){return!us.isUndefined(w[m])});let i=r.metaTokens,n=r.visitor||o,a=r.dots,u=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&us.isSpecCompliantForm(t);if(!us.isFunction(n))throw new TypeError("visitor must be a function");function s(O){if(O===null)return"";if(us.isDate(O))return O.toISOString();if(us.isBoolean(O))return O.toString();if(!d&&us.isBlob(O))throw new Np("Blob is not supported. Use a Buffer instead.");return us.isArrayBuffer(O)||us.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(us.endsWith(m,"{}"))m=i?m:m.slice(0,-2),O=JSON.stringify(O);else if(us.isArray(O)&&f0D(O)||(us.isFileList(O)||us.endsWith(m,"[]"))&&(E=us.toArray(O)))return m=cIp(m),E.forEach(function(A,D){!(us.isUndefined(A)||A===null)&&t.append(u===!0?sIp([m],D,a):u===null?m:m+"[]",s(A))}),!1}return PKs(O)?!0:(t.append(sIp(w,m,a),s(O)),!1)}let c=[],b=Object.assign(d0D,{defaultVisitor:o,convertValue:s,isVisitable:PKs});function g(O,m){if(!us.isUndefined(O)){if(c.indexOf(O)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(O),us.forEach(O,function(E,q){(!(us.isUndefined(E)||E===null)&&n.call(t,E,us.isString(q)?q.trim():q,m,b))===!0&&g(E,m?m.concat(q):[q])}),c.pop()}}if(!us.isObject(e))throw new TypeError("data must be an object");return g(e),t}var JSi=p0D;function lIp(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function fIp(e,t){this._pairs=[],e&&JSi(e,this,t)}var dIp=fIp.prototype;dIp.append=function(t,r){this._pairs.push([t,r])};dIp.toString=function(t){let r=t?function(i){return t.call(this,i,lIp)}:lIp;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var pIp=fIp;function _0D(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function WHi(e,t,r){if(!t)return e;let i=r&&r.encode||_0D;us.isFunction(r)&&(r={serialize:r});let n=r&&r.serialize,a;if(n?a=n(t,r):a=us.isURLSearchParams(t)?t.toString():new pIp(t,r).toString(i),a){let u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var jKs=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){us.forEach(this.handlers,function(i){i!==null&&t(i)})}},wKs=jKs;var pFn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var vIp=ai(require("crypto"),1);var _Ip=ai(require("url"),1),hIp=_Ip.default.URLSearchParams;var SKs="abcdefghijklmnopqrstuvwxyz",yIp="0123456789",bIp={DIGIT:yIp,ALPHA:SKs,ALPHA_DIGIT:SKs+SKs.toUpperCase()+yIp},h0D=(e=16,t=bIp.ALPHA_DIGIT)=>{let r="",{length:i}=t,n=new Uint32Array(e);vIp.default.randomFillSync(n);for(let a=0;a<e;a++)r+=t[n[a]%i];return r},gIp={isNode:!0,classes:{URLSearchParams:hIp,FormData:S3o,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:bIp,generateString:h0D,protocols:["http","https","file","data"]};var MKs={};Dn(MKs,{hasBrowserEnv:()=>EKs,hasStandardBrowserEnv:()=>y0D,hasStandardBrowserWebWorkerEnv:()=>v0D,navigator:()=>DKs,origin:()=>b0D});var EKs=typeof window<"u"&&typeof document<"u",DKs=typeof navigator=="object"&&navigator||void 0,y0D=EKs&&(!DKs||["ReactNative","NativeScript","NS"].indexOf(DKs.product)<0),v0D=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",b0D=EKs&&window.location.href||"http://localhost";var aA={...MKs,...gIp};function AKs(e,t){return JSi(e,new aA.classes.URLSearchParams,Object.assign({visitor:function(r,i,n,a){return aA.isNode&&us.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function g0D(e){return us.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function O0D(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 m0D(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&&us.isArray(n)?n.length:u,d?(us.hasOwnProp(n,u)?n[u]=[n[u],i]:n[u]=i,!l):((!n[u]||!us.isObject(n[u]))&&(n[u]=[]),t(r,i,n[u],a)&&us.isArray(n[u])&&(n[u]=O0D(n[u])),!l)}if(us.isFormData(e)&&us.isFunction(e.entries)){let r={};return us.forEachEntry(e,(i,n)=>{t(g0D(i),n,r,0)}),r}return null}var D3o=m0D;function P0D(e,t,r){if(us.isString(e))try{return(t||JSON.parse)(e),us.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}var qKs={transitional:pFn,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let i=r.getContentType()||"",n=i.indexOf("application/json")>-1,a=us.isObject(t);if(a&&us.isHTMLForm(t)&&(t=new FormData(t)),us.isFormData(t))return n?JSON.stringify(D3o(t)):t;if(us.isArrayBuffer(t)||us.isBuffer(t)||us.isStream(t)||us.isFile(t)||us.isBlob(t)||us.isReadableStream(t))return t;if(us.isArrayBufferView(t))return t.buffer;if(us.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 AKs(t,this.formSerializer).toString();if((l=us.isFileList(t))||i.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return JSi(l?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||n?(r.setContentType("application/json",!1),P0D(t)):t}],transformResponse:[function(t){let r=this.transitional||qKs.transitional,i=r&&r.forcedJSONParsing,n=this.responseType==="json";if(us.isResponse(t)||us.isReadableStream(t))return t;if(t&&us.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"?Np.from(l,Np.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:aA.classes.FormData,Blob:aA.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};us.forEach(["delete","get","head","post","put","patch"],e=>{qKs.headers[e]={}});var _Fn=qKs;var j0D=us.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"]),OIp=e=>{let t={},r,i,n;return e&&e.split(`
|
|
1714
|
+
`);for(let l=n;l<u.length;l++){let d=u[l];if(d.length>1024)continue;let s=MBp.test(d)?d.replace(MBp,"$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>=HBp)break}}return ObD(a)}}function ObD(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,HBp).map(r=>({...r,filename:r.filename||mbD(t).filename,function:r.function||$Bp}))}function mbD(e){return e[e.length-1]||{}}aFn.stackParser=gbD(TvD());aFn.frameModifiers=[IvD];var uFn=class extends pKs{getLibraryId(){return"posthog-node"}};var v3o=class{posthog;constructor({posthogApiKey:t}){this.posthog=new uFn(t)}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"0.64.22",usingAccessToken:!0}})}async flush(){await this.posthog.flush()}};var lEa=class{async sendEvent(){}async identify(){}async flush(){}};var cFn=require("fs/promises"),KBp=require("os"),YBp=require("path");var GBp=ai(require("crypto")),g3o=new Uint8Array(256),b3o=g3o.length;function vKs(){return b3o>g3o.length-16&&(GBp.default.randomFillSync(g3o),b3o=0),g3o.slice(b3o,b3o+=16)}var DW=[];for(let e=0;e<256;++e)DW.push((e+256).toString(16).slice(1));function QBp(e,t=0){return DW[e[t+0]]+DW[e[t+1]]+DW[e[t+2]]+DW[e[t+3]]+"-"+DW[e[t+4]]+DW[e[t+5]]+"-"+DW[e[t+6]]+DW[e[t+7]]+"-"+DW[e[t+8]]+DW[e[t+9]]+"-"+DW[e[t+10]]+DW[e[t+11]]+DW[e[t+12]]+DW[e[t+13]]+DW[e[t+14]]+DW[e[t+15]]}var JBp=ai(require("crypto")),bKs={randomUUID:JBp.default.randomUUID};function PbD(e,t,r){if(bKs.randomUUID&&!t&&!e)return bKs.randomUUID();e=e||{};let i=e.random||(e.rng||vKs)();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 QBp(i)}var hae=PbD;var jbD="id",wbD=".fern",fEa=class{posthog;userId;constructor({token:t,posthogApiKey:r}){this.posthog=new uFn(r),this.userId=t==null?void 0:sVs(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.64.22",...t,...t.properties}})}async flush(){await this.posthog.flush()}persistedDistinctId;async getPersistedDistinctId(){if(this.persistedDistinctId==null){let t=Lu(hl.of((0,KBp.homedir)()),Ua.of(wbD),Ua.of(jbD));await mf(t)||(await(0,cFn.mkdir)((0,YBp.dirname)(t),{recursive:!0}),await(0,cFn.writeFile)(t,hae())),this.persistedDistinctId=(await(0,cFn.readFile)(t)).toString()}return this.persistedDistinctId}};var gKs;async function lFn(){return gKs==null&&(gKs=await SbD()),gKs}async function SbD(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||t)return new lEa;let r=await NBo();return r!=null?new fEa({token:r,posthogApiKey:e}):await cRn()!=null?new v3o({posthogApiKey:e}):new fEa({token:void 0,posthogApiKey:e})}catch{return new lEa}}function dEa(e,t){return function(){return e.apply(t,arguments)}}var{toString:DbD}=Object.prototype,{getPrototypeOf:mKs}=Object,{iterator:m3o,toStringTag:ZBp}=Symbol,P3o=(e=>t=>{let r=DbD.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),lWt=e=>(e=e.toLowerCase(),t=>P3o(t)===e),j3o=e=>t=>typeof t===e,{isArray:fFn}=Array,pEa=j3o("undefined");function EbD(e){return e!==null&&!pEa(e)&&e.constructor!==null&&!pEa(e.constructor)&&yae(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var kBp=lWt("ArrayBuffer");function MbD(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kBp(e.buffer),t}var AbD=j3o("string"),yae=j3o("function"),eIp=j3o("number"),w3o=e=>e!==null&&typeof e=="object",qbD=e=>e===!0||e===!1,O3o=e=>{if(P3o(e)!=="object")return!1;let t=mKs(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ZBp in e)&&!(m3o in e)},TbD=lWt("Date"),CbD=lWt("File"),BbD=lWt("Blob"),IbD=lWt("FileList"),zbD=e=>w3o(e)&&yae(e.pipe),xbD=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||yae(e.append)&&((t=P3o(e))==="formdata"||t==="object"&&yae(e.toString)&&e.toString()==="[object FormData]"))},RbD=lWt("URLSearchParams"),[NbD,FbD,LbD,UbD]=["ReadableStream","Request","Response","Headers"].map(lWt),VbD=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _Ea(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,n;if(typeof e!="object"&&(e=[e]),fFn(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 tIp(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 VHi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rIp=e=>!pEa(e)&&e!==VHi;function OKs(){let{caseless:e}=rIp(this)&&this||{},t={},r=(i,n)=>{let a=e&&tIp(t,n)||n;O3o(t[a])&&O3o(i)?t[a]=OKs(t[a],i):O3o(i)?t[a]=OKs({},i):fFn(i)?t[a]=i.slice():t[a]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&_Ea(arguments[i],r);return t}var WbD=(e,t,r,{allOwnKeys:i}={})=>(_Ea(t,(n,a)=>{r&&yae(n)?e[a]=dEa(n,r):e[a]=n},{allOwnKeys:i}),e),HbD=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$bD=(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)},GbD=(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&&mKs(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},QbD=(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},JbD=e=>{if(!e)return null;if(fFn(e))return e;let t=e.length;if(!eIp(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},KbD=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&mKs(Uint8Array)),YbD=(e,t)=>{let i=(e&&e[m3o]).call(e),n;for(;(n=i.next())&&!n.done;){let a=n.value;t.call(e,a[0],a[1])}},XbD=(e,t)=>{let r,i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},ZbD=lWt("HTMLFormElement"),kbD=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,n){return i.toUpperCase()+n}),XBp=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),e0D=lWt("RegExp"),iIp=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),i={};_Ea(r,(n,a)=>{let u;(u=t(n,a,e))!==!1&&(i[a]=u||n)}),Object.defineProperties(e,i)},t0D=e=>{iIp(e,(t,r)=>{if(yae(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let i=e[r];if(yae(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+"'")})}})},r0D=(e,t)=>{let r={},i=n=>{n.forEach(a=>{r[a]=!0})};return fFn(e)?i(e):i(String(e).split(t)),r},i0D=()=>{},n0D=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function a0D(e){return!!(e&&yae(e.append)&&e[ZBp]==="FormData"&&e[m3o])}var o0D=e=>{let t=new Array(10),r=(i,n)=>{if(w3o(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[n]=i;let a=fFn(i)?[]:{};return _Ea(i,(u,l)=>{let d=r(u,n+1);!pEa(d)&&(a[l]=d)}),t[n]=void 0,a}}return i};return r(e,0)},u0D=lWt("AsyncFunction"),s0D=e=>e&&(w3o(e)||yae(e))&&yae(e.then)&&yae(e.catch),nIp=((e,t)=>e?setImmediate:t?((r,i)=>(VHi.addEventListener("message",({source:n,data:a})=>{n===VHi&&a===r&&i.length&&i.shift()()},!1),n=>{i.push(n),VHi.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",yae(VHi.postMessage)),c0D=typeof queueMicrotask<"u"?queueMicrotask.bind(VHi):typeof process<"u"&&process.nextTick||nIp,l0D=e=>e!=null&&yae(e[m3o]),us={isArray:fFn,isArrayBuffer:kBp,isBuffer:EbD,isFormData:xbD,isArrayBufferView:MbD,isString:AbD,isNumber:eIp,isBoolean:qbD,isObject:w3o,isPlainObject:O3o,isReadableStream:NbD,isRequest:FbD,isResponse:LbD,isHeaders:UbD,isUndefined:pEa,isDate:TbD,isFile:CbD,isBlob:BbD,isRegExp:e0D,isFunction:yae,isStream:zbD,isURLSearchParams:RbD,isTypedArray:KbD,isFileList:IbD,forEach:_Ea,merge:OKs,extend:WbD,trim:VbD,stripBOM:HbD,inherits:$bD,toFlatObject:GbD,kindOf:P3o,kindOfTest:lWt,endsWith:QbD,toArray:JbD,forEachEntry:YbD,matchAll:XbD,isHTMLForm:ZbD,hasOwnProperty:XBp,hasOwnProp:XBp,reduceDescriptors:iIp,freezeMethods:t0D,toObjectSet:r0D,toCamelCase:kbD,noop:i0D,toFiniteNumber:n0D,findKey:tIp,global:VHi,isContextDefined:rIp,isSpecCompliantForm:a0D,toJSONObject:o0D,isAsyncFn:u0D,isThenable:s0D,setImmediate:nIp,asap:c0D,isIterable:l0D};function dFn(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)}us.inherits(dFn,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:us.toJSONObject(this.config),code:this.code,status:this.status}}});var aIp=dFn.prototype,oIp={};["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=>{oIp[e]={value:e}});Object.defineProperties(dFn,oIp);Object.defineProperty(aIp,"isAxiosError",{value:!0});dFn.from=(e,t,r,i,n,a)=>{let u=Object.create(aIp);return us.toFlatObject(e,u,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),dFn.call(u,e.message,t,r,i,n),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};var Np=dFn;var uIp=ai($Fo(),1),S3o=uIp.default;function PKs(e){return us.isPlainObject(e)||us.isArray(e)}function cIp(e){return us.endsWith(e,"[]")?e.slice(0,-2):e}function sIp(e,t,r){return e?e.concat(t).map(function(n,a){return n=cIp(n),!r&&a?"["+n+"]":n}).join(r?".":""):t}function f0D(e){return us.isArray(e)&&!e.some(PKs)}var d0D=us.toFlatObject(us,{},null,function(t){return/^is[A-Z]/.test(t)});function p0D(e,t,r){if(!us.isObject(e))throw new TypeError("target must be an object");t=t||new(S3o||FormData),r=us.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,w){return!us.isUndefined(w[m])});let i=r.metaTokens,n=r.visitor||o,a=r.dots,u=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&us.isSpecCompliantForm(t);if(!us.isFunction(n))throw new TypeError("visitor must be a function");function s(O){if(O===null)return"";if(us.isDate(O))return O.toISOString();if(us.isBoolean(O))return O.toString();if(!d&&us.isBlob(O))throw new Np("Blob is not supported. Use a Buffer instead.");return us.isArrayBuffer(O)||us.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(us.endsWith(m,"{}"))m=i?m:m.slice(0,-2),O=JSON.stringify(O);else if(us.isArray(O)&&f0D(O)||(us.isFileList(O)||us.endsWith(m,"[]"))&&(E=us.toArray(O)))return m=cIp(m),E.forEach(function(A,D){!(us.isUndefined(A)||A===null)&&t.append(u===!0?sIp([m],D,a):u===null?m:m+"[]",s(A))}),!1}return PKs(O)?!0:(t.append(sIp(w,m,a),s(O)),!1)}let c=[],b=Object.assign(d0D,{defaultVisitor:o,convertValue:s,isVisitable:PKs});function g(O,m){if(!us.isUndefined(O)){if(c.indexOf(O)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(O),us.forEach(O,function(E,q){(!(us.isUndefined(E)||E===null)&&n.call(t,E,us.isString(q)?q.trim():q,m,b))===!0&&g(E,m?m.concat(q):[q])}),c.pop()}}if(!us.isObject(e))throw new TypeError("data must be an object");return g(e),t}var JSi=p0D;function lIp(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function fIp(e,t){this._pairs=[],e&&JSi(e,this,t)}var dIp=fIp.prototype;dIp.append=function(t,r){this._pairs.push([t,r])};dIp.toString=function(t){let r=t?function(i){return t.call(this,i,lIp)}:lIp;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var pIp=fIp;function _0D(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function WHi(e,t,r){if(!t)return e;let i=r&&r.encode||_0D;us.isFunction(r)&&(r={serialize:r});let n=r&&r.serialize,a;if(n?a=n(t,r):a=us.isURLSearchParams(t)?t.toString():new pIp(t,r).toString(i),a){let u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var jKs=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){us.forEach(this.handlers,function(i){i!==null&&t(i)})}},wKs=jKs;var pFn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var vIp=ai(require("crypto"),1);var _Ip=ai(require("url"),1),hIp=_Ip.default.URLSearchParams;var SKs="abcdefghijklmnopqrstuvwxyz",yIp="0123456789",bIp={DIGIT:yIp,ALPHA:SKs,ALPHA_DIGIT:SKs+SKs.toUpperCase()+yIp},h0D=(e=16,t=bIp.ALPHA_DIGIT)=>{let r="",{length:i}=t,n=new Uint32Array(e);vIp.default.randomFillSync(n);for(let a=0;a<e;a++)r+=t[n[a]%i];return r},gIp={isNode:!0,classes:{URLSearchParams:hIp,FormData:S3o,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:bIp,generateString:h0D,protocols:["http","https","file","data"]};var MKs={};Dn(MKs,{hasBrowserEnv:()=>EKs,hasStandardBrowserEnv:()=>y0D,hasStandardBrowserWebWorkerEnv:()=>v0D,navigator:()=>DKs,origin:()=>b0D});var EKs=typeof window<"u"&&typeof document<"u",DKs=typeof navigator=="object"&&navigator||void 0,y0D=EKs&&(!DKs||["ReactNative","NativeScript","NS"].indexOf(DKs.product)<0),v0D=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",b0D=EKs&&window.location.href||"http://localhost";var aA={...MKs,...gIp};function AKs(e,t){return JSi(e,new aA.classes.URLSearchParams,Object.assign({visitor:function(r,i,n,a){return aA.isNode&&us.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function g0D(e){return us.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function O0D(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 m0D(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&&us.isArray(n)?n.length:u,d?(us.hasOwnProp(n,u)?n[u]=[n[u],i]:n[u]=i,!l):((!n[u]||!us.isObject(n[u]))&&(n[u]=[]),t(r,i,n[u],a)&&us.isArray(n[u])&&(n[u]=O0D(n[u])),!l)}if(us.isFormData(e)&&us.isFunction(e.entries)){let r={};return us.forEachEntry(e,(i,n)=>{t(g0D(i),n,r,0)}),r}return null}var D3o=m0D;function P0D(e,t,r){if(us.isString(e))try{return(t||JSON.parse)(e),us.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}var qKs={transitional:pFn,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let i=r.getContentType()||"",n=i.indexOf("application/json")>-1,a=us.isObject(t);if(a&&us.isHTMLForm(t)&&(t=new FormData(t)),us.isFormData(t))return n?JSON.stringify(D3o(t)):t;if(us.isArrayBuffer(t)||us.isBuffer(t)||us.isStream(t)||us.isFile(t)||us.isBlob(t)||us.isReadableStream(t))return t;if(us.isArrayBufferView(t))return t.buffer;if(us.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 AKs(t,this.formSerializer).toString();if((l=us.isFileList(t))||i.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return JSi(l?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||n?(r.setContentType("application/json",!1),P0D(t)):t}],transformResponse:[function(t){let r=this.transitional||qKs.transitional,i=r&&r.forcedJSONParsing,n=this.responseType==="json";if(us.isResponse(t)||us.isReadableStream(t))return t;if(t&&us.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"?Np.from(l,Np.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:aA.classes.FormData,Blob:aA.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};us.forEach(["delete","get","head","post","put","patch"],e=>{qKs.headers[e]={}});var _Fn=qKs;var j0D=us.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"]),OIp=e=>{let t={},r,i,n;return e&&e.split(`
|
|
1715
1715
|
`).forEach(function(u){n=u.indexOf(":"),r=u.substring(0,n).trim().toLowerCase(),i=u.substring(n+1).trim(),!(!r||t[r]&&j0D[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t};var mIp=Symbol("internals");function hEa(e){return e&&String(e).trim().toLowerCase()}function E3o(e){return e===!1||e==null?e:us.isArray(e)?e.map(E3o):String(e)}function w0D(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 S0D=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function TKs(e,t,r,i,n){if(us.isFunction(i))return i.call(this,t,r);if(n&&(t=r),!!us.isString(t)){if(us.isString(i))return t.indexOf(i)!==-1;if(us.isRegExp(i))return i.test(t)}}function D0D(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function E0D(e,t){let r=us.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 hFn=class{constructor(t){t&&this.set(t)}set(t,r,i){let n=this;function a(l,d,s){let o=hEa(d);if(!o)throw new Error("header name must be a non-empty string");let c=us.findKey(n,o);(!c||n[c]===void 0||s===!0||s===void 0&&n[c]!==!1)&&(n[c||d]=E3o(l))}let u=(l,d)=>us.forEach(l,(s,o)=>a(s,o,d));if(us.isPlainObject(t)||t instanceof this.constructor)u(t,r);else if(us.isString(t)&&(t=t.trim())&&!S0D(t))u(OIp(t),r);else if(us.isObject(t)&&us.isIterable(t)){let l={},d,s;for(let o of t){if(!us.isArray(o))throw TypeError("Object iterator must return a key-value pair");l[s=o[0]]=(d=l[s])?us.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=hEa(t),t){let i=us.findKey(this,t);if(i){let n=this[i];if(!r)return n;if(r===!0)return w0D(n);if(us.isFunction(r))return r.call(this,n,i);if(us.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=hEa(t),t){let i=us.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||TKs(this,this[i],i,r)))}return!1}delete(t,r){let i=this,n=!1;function a(u){if(u=hEa(u),u){let l=us.findKey(i,u);l&&(!r||TKs(i,i[l],l,r))&&(delete i[l],n=!0)}}return us.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||TKs(this,this[a],a,t,!0))&&(delete this[a],n=!0)}return n}normalize(t){let r=this,i={};return us.forEach(this,(n,a)=>{let u=us.findKey(i,a);if(u){r[u]=E3o(n),delete r[a];return}let l=t?D0D(a):String(a).trim();l!==a&&delete r[a],r[l]=E3o(n),i[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return us.forEach(this,(i,n)=>{i!=null&&i!==!1&&(r[n]=t&&us.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(`
|
|
1716
1716
|
`)}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[mIp]=this[mIp]={accessors:{}}).accessors,n=this.prototype;function a(u){let l=hEa(u);i[l]||(E0D(n,u),i[l]=!0)}return us.isArray(t)?t.forEach(a):a(t),this}};hFn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);us.reduceDescriptors(hFn.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});us.freezeMethods(hFn);var rR=hFn;function yEa(e,t){let r=this||_Fn,i=t||r,n=rR.from(i.headers),a=i.data;return us.forEach(e,function(l){a=l.call(r,a,n.normalize(),t?t.status:void 0)}),n.normalize(),a}function vEa(e){return!!(e&&e.__CANCEL__)}function PIp(e,t,r){Np.call(this,e??"canceled",Np.ERR_CANCELED,t,r),this.name="CanceledError"}us.inherits(PIp,Np,{__CANCEL__:!0});var HEe=PIp;function $tr(e,t,r){let i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new Np("Request failed with status code "+r.status,[Np.ERR_BAD_REQUEST,Np.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function CKs(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function BKs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function HHi(e,t,r){let i=!CKs(t);return e&&(i||r==!1)?BKs(e,t):t}var NIp=ai(kDa(),1),FIp=ai(require("http"),1),LIp=ai(require("https"),1),UIp=ai(require("util"),1),VIp=ai(BJs(),1),lfi=ai(require("zlib"),1);var $Hi="1.10.0";function bEa(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var M0D=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function IKs(e,t,r){let i=r&&r.Blob||aA.classes.Blob,n=bEa(e);if(t===void 0&&i&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;let a=M0D.exec(e);if(!a)throw new Np("Invalid URL",Np.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 Np("Blob is not supported",Np.ERR_NOT_SUPPORT);return new i([s],{type:u})}return s}throw new Np("Unsupported protocol "+n,Np.ERR_NOT_SUPPORT)}var QHi=ai(require("stream"),1);var jIp=ai(require("stream"),1);var zKs=Symbol("internals"),xKs=class extends jIp.default.Transform{constructor(t){t=us.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,n)=>!us.isUndefined(n[i])),super({readableHighWaterMark:t.chunkSize});let r=this[zKs]={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[zKs];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,i){let n=this[zKs],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,A=0;if(a){let D=Date.now();(!n.ts||(A=D-n.ts)>=l)&&(n.ts=D,q=s-n.bytes,n.bytes=q<0?-q:0,A=0),q=s-n.bytes}if(a){if(q<=0)return setTimeout(()=>{O(null,g)},l-A);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)})}},RKs=xKs;var WIp=require("events");var SIp=ai(require("util"),1),DIp=require("stream");var{asyncIterator:wIp}=Symbol,A0D=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[wIp]?yield*e[wIp]():yield e},M3o=A0D;var q0D=aA.ALPHABET.ALPHA_DIGIT+"-_",gEa=typeof TextEncoder=="function"?new TextEncoder:new SIp.default.TextEncoder,GHi=`\r
|
|
1717
1717
|
`,T0D=gEa.encode(GHi),C0D=2,NKs=class{constructor(t,r){let{escapeName:i}=this.constructor,n=us.isString(r),a=`Content-Disposition: form-data; name="${i(t)}"${!n&&r.name?`; filename="${i(r.name)}"`:""}${GHi}`;n?r=gEa.encode(String(r).replace(/\r?\n|\r\n?/g,GHi)):a+=`Content-Type: ${r.type||"application/octet-stream"}${GHi}`,this.headers=gEa.encode(a+GHi),this.contentLength=n?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+C0D,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;us.isTypedArray(t)?yield t:yield*M3o(t),yield T0D}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},B0D=(e,t,r)=>{let{tag:i="form-data-boundary",size:n=25,boundary:a=i+"-"+aA.generateString(n,q0D)}=r||{};if(!us.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=gEa.encode("--"+a+GHi),l=gEa.encode("--"+a+"--"+GHi),d=l.byteLength,s=Array.from(e.entries()).map(([c,b])=>{let g=new NKs(c,b);return d+=g.size,g});d+=u.byteLength*s.length,d=us.toFiniteNumber(d);let o={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(d)&&(o["Content-Length"]=d),t&&t(o),DIp.Readable.from(async function*(){for(let c of s)yield u,yield*c.encode();yield l}())},EIp=B0D;var MIp=ai(require("stream"),1),FKs=class extends MIp.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)}},AIp=FKs;var I0D=(e,t)=>us.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,qIp=I0D;function z0D(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 TIp=z0D;function x0D(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 CIp=x0D;var cfi=(e,t,r=3)=>{let i=0,n=TIp(50,250);return CIp(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)},yFn=(e,t)=>{let r=e!=null;return[i=>t[0]({lengthComputable:r,total:e,loaded:i}),t[1]]},vFn=e=>(...t)=>us.asap(()=>e(...t));var BIp={flush:lfi.default.constants.Z_SYNC_FLUSH,finishFlush:lfi.default.constants.Z_SYNC_FLUSH},R0D={flush:lfi.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:lfi.default.constants.BROTLI_OPERATION_FLUSH},IIp=us.isFunction(lfi.default.createBrotliDecompress),{http:N0D,https:F0D}=VIp.default,L0D=/https:?/,zIp=aA.protocols.map(e=>e+":"),xIp=(e,[t,r])=>(e.on("end",r).on("error",r),t);function U0D(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function HIp(e,t,r){let i=t;if(!i&&i!==!1){let n=NIp.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){HIp(a,t,a.href)}}var V0D=typeof process<"u"&&us.kindOf(process)==="process",W0D=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)}),H0D=({address:e,family:t})=>{if(!us.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},RIp=(e,t)=>H0D(us.isObject(e)?e:{address:e,family:t}),$Ip=V0D&&function(t){return W0D(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=qIp(l,Ue=>us.isArray(Ue)?Ue:[Ue]);l=(Ue,wt,De)=>{Oe(Ue,wt,(Te,xt,Pe)=>{if(Te)return De(Te);let ot=us.isArray(xt)?xt.map(at=>RIp(at)):[RIp(xt,Pe)];wt.all?De(Te,ot):De(Te,ot[0].address,ot[0].family)})}}let m=new WIp.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 HEe(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=HHi(t.baseURL,t.url,t.allowAbsoluteUrls),A=new URL(q,aA.hasBrowserEnv?aA.origin:void 0),D=A.protocol||zIp[0];if(D==="data:"){let Oe;if(c!=="GET")return $tr(i,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{Oe=IKs(t.url,s==="blob",{Blob:t.env&&t.env.Blob})}catch(Ue){throw Np.from(Ue,Np.ERR_BAD_REQUEST,t)}return s==="text"?(Oe=Oe.toString(o),(!o||o==="utf8")&&(Oe=us.stripBOM(Oe))):s==="stream"&&(Oe=QHi.default.Readable.from(Oe)),$tr(i,n,{data:Oe,status:200,statusText:"OK",headers:new rR,config:t})}if(zIp.indexOf(D)===-1)return n(new Np("Unsupported protocol "+D,Np.ERR_BAD_REQUEST,t));let C=rR.from(t.headers).normalize();C.set("User-Agent","axios/"+$Hi,!1);let{onUploadProgress:x,onDownloadProgress:$}=t,I=t.maxRate,L,V;if(us.isSpecCompliantForm(u)){let Oe=C.getContentType(/boundary=([-_\w\d]{10,70})/i);u=EIp(u,Ue=>{C.set(Ue)},{tag:`axios-${$Hi}-boundary`,boundary:Oe&&Oe[1]||void 0})}else if(us.isFormData(u)&&us.isFunction(u.getHeaders)){if(C.set(u.getHeaders()),!C.hasContentLength())try{let Oe=await UIp.default.promisify(u.getLength).call(u);Number.isFinite(Oe)&&Oe>=0&&C.setContentLength(Oe)}catch{}}else if(us.isBlob(u)||us.isFile(u))u.size&&C.setContentType(u.type||"application/octet-stream"),C.setContentLength(u.size||0),u=QHi.default.Readable.from(M3o(u));else if(u&&!us.isStream(u)){if(!Buffer.isBuffer(u))if(us.isArrayBuffer(u))u=Buffer.from(new Uint8Array(u));else if(us.isString(u))u=Buffer.from(u,"utf-8");else return n(new Np("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Np.ERR_BAD_REQUEST,t));if(C.setContentLength(u.length,!1),t.maxBodyLength>-1&&u.length>t.maxBodyLength)return n(new Np("Request body larger than maxBodyLength limit",Np.ERR_BAD_REQUEST,t))}let K=us.toFiniteNumber(C.getContentLength());us.isArray(I)?(L=I[0],V=I[1]):L=V=I,u&&(x||L)&&(us.isStream(u)||(u=QHi.default.Readable.from(u,{objectMode:!1})),u=QHi.default.pipeline([u,new RKs({maxRate:us.toFiniteNumber(L)})],us.noop),x&&u.on("progress",xIp(u,yFn(K,cfi(vFn(x),!1,3)))));let Y;if(t.auth){let Oe=t.auth.username||"",Ue=t.auth.password||"";Y=Oe+":"+Ue}if(!Y&&A.username){let Oe=A.username,Ue=A.password;Y=Oe+":"+Ue}Y&&C.delete("authorization");let Z;try{Z=WHi(A.pathname+A.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"+(IIp?", br":""),!1);let oe={path:Z,method:c,headers:C.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:Y,protocol:D,family:d,beforeRedirect:U0D,beforeRedirects:{}};!us.isUndefined(l)&&(oe.lookup=l),t.socketPath?oe.socketPath=t.socketPath:(oe.hostname=A.hostname.startsWith("[")?A.hostname.slice(1,-1):A.hostname,oe.port=A.port,HIp(oe,t.proxy,D+"//"+A.hostname+(A.port?":"+A.port:"")+oe.path));let _e,de=L0D.test(oe.protocol);if(oe.agent=de?t.httpsAgent:t.httpAgent,t.transport?_e=t.transport:t.maxRedirects===0?_e=de?LIp.default:FIp.default:(t.maxRedirects&&(oe.maxRedirects=t.maxRedirects),t.beforeRedirect&&(oe.beforeRedirects.config=t.beforeRedirect),_e=de?F0D:N0D),t.maxBodyLength>-1?oe.maxBodyLength=t.maxBodyLength:oe.maxBodyLength=1/0,t.insecureHTTPParser&&(oe.insecureHTTPParser=t.insecureHTTPParser),O=_e.request(oe,function(Ue){if(O.destroyed)return;let wt=[Ue],De=+Ue.headers["content-length"];if($||V){let at=new RKs({maxRate:us.toFiniteNumber(V)});$&&at.on("progress",xIp(at,yFn(De,cfi(vFn($),!0,3)))),wt.push(at)}let Te=Ue,xt=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":wt.push(lfi.default.createUnzip(BIp)),delete Ue.headers["content-encoding"];break;case"deflate":wt.push(new AIp),wt.push(lfi.default.createUnzip(BIp)),delete Ue.headers["content-encoding"];break;case"br":IIp&&(wt.push(lfi.default.createBrotliDecompress(R0D)),delete Ue.headers["content-encoding"])}Te=wt.length>1?QHi.default.pipeline(wt,us.noop):wt[0];let Pe=QHi.default.finished(Te,()=>{Pe(),w()}),ot={status:Ue.statusCode,statusText:Ue.statusMessage,headers:new rR(Ue.headers),config:t,request:xt};if(s==="stream")ot.data=Te,$tr(i,n,ot);else{let at=[],me=0;Te.on("data",function(jt){at.push(jt),me+=jt.length,t.maxContentLength>-1&&me>t.maxContentLength&&(g=!0,Te.destroy(),n(new Np("maxContentLength size of "+t.maxContentLength+" exceeded",Np.ERR_BAD_RESPONSE,t,xt)))}),Te.on("aborted",function(){if(g)return;let jt=new Np("stream has been aborted",Np.ERR_BAD_RESPONSE,t,xt);Te.destroy(jt),n(jt)}),Te.on("error",function(jt){O.destroyed||n(Np.from(jt,null,t,xt))}),Te.on("end",function(){try{let jt=at.length===1?at[0]:Buffer.concat(at);s!=="arraybuffer"&&(jt=jt.toString(o),(!o||o==="utf8")&&(jt=us.stripBOM(jt))),ot.data=jt}catch(jt){return n(Np.from(jt,null,t,ot.request,ot))}$tr(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(Np.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 Np("error trying to parse `config.timeout` to int",Np.ERR_BAD_OPTION_VALUE,t,O));return}O.setTimeout(Oe,function(){if(b)return;let wt=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",De=t.transitional||pFn;t.timeoutErrorMessage&&(wt=t.timeoutErrorMessage),n(new Np(wt,De.clarifyTimeoutError?Np.ETIMEDOUT:Np.ECONNABORTED,t,O)),E()})}if(us.isStream(u)){let Oe=!1,Ue=!1;u.on("end",()=>{Oe=!0}),u.once("error",wt=>{Ue=!0,O.destroy(wt)}),u.on("close",()=>{!Oe&&!Ue&&E(new HEe("Request stream has been aborted",t,O))}),u.pipe(O)}else O.end(u)})};var GIp=aA.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,aA.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(aA.origin),aA.navigator&&/(msie|trident)/i.test(aA.navigator.userAgent)):()=>!0;var QIp=aA.hasStandardBrowserEnv?{write(e,t,r,i,n,a){let u=[e+"="+encodeURIComponent(t)];us.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),us.isString(i)&&u.push("path="+i),us.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 JIp=e=>e instanceof rR?{...e}:e;function fWt(e,t){t=t||{};let r={};function i(s,o,c,b){return us.isPlainObject(s)&&us.isPlainObject(o)?us.merge.call({caseless:b},s,o):us.isPlainObject(o)?us.merge({},o):us.isArray(o)?o.slice():o}function n(s,o,c,b){if(us.isUndefined(o)){if(!us.isUndefined(s))return i(void 0,s,c,b)}else return i(s,o,c,b)}function a(s,o){if(!us.isUndefined(o))return i(void 0,o)}function u(s,o){if(us.isUndefined(o)){if(!us.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(JIp(s),JIp(o),c,!0)};return us.forEach(Object.keys(Object.assign({},e,t)),function(o){let c=d[o]||n,b=c(e[o],t[o],o);us.isUndefined(b)&&c!==l||(r[o]=b)}),r}var A3o=e=>{let t=fWt({},e),{data:r,withXSRFToken:i,xsrfHeaderName:n,xsrfCookieName:a,headers:u,auth:l}=t;t.headers=u=rR.from(u),t.url=WHi(HHi(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(us.isFormData(r)){if(aA.hasStandardBrowserEnv||aA.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(aA.hasStandardBrowserEnv&&(i&&us.isFunction(i)&&(i=i(t)),i||i!==!1&&GIp(t.url))){let s=n&&a&&QIp.read(a);s&&u.set(n,s)}return t};var $0D=typeof XMLHttpRequest<"u",KIp=$0D&&function(e){return new Promise(function(r,i){let n=A3o(e),a=n.data,u=rR.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 A=rR.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),C={data:!l||l==="text"||l==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:A,config:e,request:w};$tr(function($){r($),m()},function($){i($),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 Np("Request aborted",Np.ECONNABORTED,e,w)),w=null)},w.onerror=function(){i(new Np("Network Error",Np.ERR_NETWORK,e,w)),w=null},w.ontimeout=function(){let D=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",C=n.transitional||pFn;n.timeoutErrorMessage&&(D=n.timeoutErrorMessage),i(new Np(D,C.clarifyTimeoutError?Np.ETIMEDOUT:Np.ECONNABORTED,e,w)),w=null},a===void 0&&u.setContentType(null),"setRequestHeader"in w&&us.forEach(u.toJSON(),function(D,C){w.setRequestHeader(C,D)}),us.isUndefined(n.withCredentials)||(w.withCredentials=!!n.withCredentials),l&&l!=="json"&&(w.responseType=n.responseType),s&&([b,O]=cfi(s,!0),w.addEventListener("progress",b)),d&&w.upload&&([c,g]=cfi(d),w.upload.addEventListener("progress",c),w.upload.addEventListener("loadend",g)),(n.cancelToken||n.signal)&&(o=A=>{w&&(i(!A||A.type?new HEe(null,e,w):A),w.abort(),w=null)},n.cancelToken&&n.cancelToken.subscribe(o),n.signal&&(n.signal.aborted?o():n.signal.addEventListener("abort",o)));let q=bEa(n.url);if(q&&aA.protocols.indexOf(q)===-1){i(new Np("Unsupported protocol "+q+":",Np.ERR_BAD_REQUEST,e));return}w.send(a||null)})};var G0D=(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 Np?o:new HEe(o instanceof Error?o.message:o))}},u=t&&setTimeout(()=>{u=null,a(new Np(`timeout ${t} of ms exceeded`,Np.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=()=>us.asap(l),d}},YIp=G0D;var Q0D=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},J0D=async function*(e,t){for await(let r of K0D(e))yield*Q0D(r,t)},K0D=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()}},LKs=(e,t,r,i)=>{let n=J0D(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 T3o=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ZIp=T3o&&typeof ReadableStream=="function",Y0D=T3o&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),kIp=(e,...t)=>{try{return!!e(...t)}catch{return!1}},X0D=ZIp&&kIp(()=>{let e=!1,t=new Request(aA.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),XIp=64*1024,UKs=ZIp&&kIp(()=>us.isReadableStream(new Response("").body)),q3o={stream:UKs&&(e=>e.body)};T3o&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!q3o[t]&&(q3o[t]=us.isFunction(e[t])?r=>r[t]():(r,i)=>{throw new Np(`Response type '${t}' is not supported`,Np.ERR_NOT_SUPPORT,i)})})})(new Response);var Z0D=async e=>{if(e==null)return 0;if(us.isBlob(e))return e.size;if(us.isSpecCompliantForm(e))return(await new Request(aA.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(us.isArrayBufferView(e)||us.isArrayBuffer(e))return e.byteLength;if(us.isURLSearchParams(e)&&(e=e+""),us.isString(e))return(await Y0D(e)).byteLength},k0D=async(e,t)=>{let r=us.toFiniteNumber(e.getContentLength());return r??Z0D(t)},ezp=T3o&&(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}=A3o(e);s=s?(s+"").toLowerCase():"text";let g=YIp([n,a&&a.toAbortSignal()],u),O,m=g&&g.unsubscribe&&(()=>{g.unsubscribe()}),w;try{if(d&&X0D&&r!=="get"&&r!=="head"&&(w=await k0D(o,i))!==0){let C=new Request(t,{method:"POST",body:i,duplex:"half"}),x;if(us.isFormData(i)&&(x=C.headers.get("content-type"))&&o.setContentType(x),C.body){let[$,I]=yFn(w,cfi(vFn(d)));i=LKs(C.body,XIp,$,I)}}us.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),A=UKs&&(s==="stream"||s==="response");if(UKs&&(l||A&&m)){let C={};["status","statusText","headers"].forEach(L=>{C[L]=q[L]});let x=us.toFiniteNumber(q.headers.get("content-length")),[$,I]=l&&yFn(x,cfi(vFn(l),!0))||[];q=new Response(LKs(q.body,XIp,$,()=>{I&&I(),m&&m()}),C)}s=s||"text";let D=await q3o[us.findKey(q3o,s)||"text"](q,e);return!A&&m&&m(),await new Promise((C,x)=>{$tr(C,x,{data:D,headers:rR.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 Np("Network Error",Np.ERR_NETWORK,e,O),{cause:E.cause||E}):Np.from(E,E&&E.code,e,O)}});var VKs={http:$Ip,xhr:KIp,fetch:ezp};us.forEach(VKs,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var tzp=e=>`- ${e}`,egD=e=>us.isFunction(e)||e===null||e===!1,C3o={getAdapter:e=>{e=us.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,!egD(r)&&(i=VKs[(u=String(r)).toLowerCase()],i===void 0))throw new Np(`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 :
|
|
@@ -1952,7 +1952,7 @@ ${A}${q}${D}${bKp.default.cursorHide}`});var YTa=ai(Cwi(),1);function Moc(e,t){i
|
|
|
1952
1952
|
Run ${Ds.cyan("fern generator upgrade")} to upgrade your generators.`),n.length>2&&(r+=`
|
|
1953
1953
|
Run ${Ds.cyan("fern generator upgrade --list")} to see the full list of generator upgrades available.`),gFn(r,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"})}async function Foc({generatorUpgradeInfo:e,header:t,limit:r,includeBoxen:i=!0}){if(!VKp(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+=`
|
|
1954
1954
|
${await DUD(l.generatorName)} (${l.apiName!=null?"API: "+l.apiName+", ":""}Group: ${l.generatorGroup}) `+Ds.dim(l.currentVersion)+Ds.reset(" \u2192 ")+Ds.green(l.latestVersion);return n+=`
|
|
1955
|
-
`,i?gFn(n,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):n}async function DUD(e){let r=await new UKp.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 EUD({cliContext:e,project:{apiWorkspaces:t},generatorFilter:r,groupFilter:i,channel:n,includeMajor:a}){if(t.length===1){let l={type:"singleApi",versions:{}};return await HKp({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(d,s,o,c)=>{l.versions[s]==null&&(l.versions[s]={});let b=Twi(o.name,c),g=await kZt({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 HKp({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=Twi(s.name,o),b=await kZt({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 HKp({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 RVt({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 $Kp(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=qae(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 RLo({project:e,cliContext:t,generatorFilter:r,groupFilter:i,channel:n,includeMajor:a}){let u=[];if(e!=null){let l=await EUD({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(...$Kp(s,d,t.logger));else u.push(...$Kp(l.versions,void 0,t.logger))}return u}var nCa=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 Z6n=class extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}};var Loc=(()=>{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})(),GKp=typeof globalThis.AbortController=="function",QKp=typeof globalThis.ReadableStream=="function",JKp=typeof globalThis.FormData=="function",NLo=["get","post","put","patch","head","delete"],MUD=()=>{};MUD();var KKp={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},FLo=2147483647,YKp=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,LLo=Symbol("stop"),XKp={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},ZKp={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 AUD=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[r,i]of e)t+=YKp,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},kKp=(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})},eYp=(e,t)=>{let r=AUD(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 k6n=e=>e!==null&&typeof e=="object";var aCa=(...e)=>{for(let t of e)if((!k6n(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return Woc({},...e)},Uoc=(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 ULo(e,t,r){return Object.hasOwn(t,r)&&t[r]===void 0?[]:Woc(e[r]??[],t[r]??[])}var Voc=(e={},t={})=>({beforeRequest:ULo(e,t,"beforeRequest"),beforeRetry:ULo(e,t,"beforeRetry"),afterResponse:ULo(e,t,"afterResponse"),beforeError:ULo(e,t,"beforeError")}),Woc=(...e)=>{let t={},r={},i={};for(let n of e)if(Array.isArray(n))Array.isArray(t)||(t=[]),t=[...t,...n];else if(k6n(n)){for(let[a,u]of Object.entries(n))k6n(u)&&a in t&&(u=Woc(t[a],u)),t={...t,[a]:u};k6n(n.hooks)&&(i=Voc(i,n.hooks),t.hooks=i),k6n(n.headers)&&(r=Uoc(r,n.headers),t.headers=r)}return t};var rYp=e=>NLo.includes(e)?e.toUpperCase():e,qUD=["get","put","head","delete","options","trace"],TUD=[408,413,429,500,502,503,504],CUD=[413,429,503],tYp={limit:2,methods:qUD,statusCodes:TUD,afterStatusCodes:CUD,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},iYp=(e={})=>{if(typeof e=="number")return{...tYp,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{...tYp,...e}};async function Hoc(e,t,r,i){return new Promise((n,a)=>{let u=setTimeout(()=>{r&&r.abort(),a(new Z6n(e))},i.timeout);i.fetch(e,t).then(n).catch(a).then(()=>{clearTimeout(u)})})}async function $oc(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 nYp=(e,t)=>{let r={};for(let i in t)!(i in ZKp)&&!(i in XKp)&&!(i in e)&&(r[i]=t[i]);return r};var oCa=class e{static create(t,r){let i=new e(t,r),n=async()=>{if(typeof i._options.timeout=="number"&&i._options.timeout>FLo)throw new RangeError(`The \`timeout\` option cannot be greater than ${FLo}`);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 nCa(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(!QKp)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return kKp(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(KKp))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:Uoc(this._input.headers,r.headers),hooks:Voc({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:rYp(r.method??this._input.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:iYp(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(GKp){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(Loc&&(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);(JKp&&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(!Loc)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=eYp(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount>this._options.retry.limit||t instanceof Z6n)throw t;if(t instanceof nCa){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),FLo);if(this._retryCount<1)throw r;await $oc(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})===LLo)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=nYp(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,t):Hoc(r,t,this.abortController,this._options)}};var Goc=e=>{let t=(r,i)=>oCa.create(r,aCa(e,i));for(let r of NLo)t[r]=(i,n)=>oCa.create(i,aCa(e,n,{method:r}));return t.create=r=>Goc(aCa(r)),t.extend=r=>(typeof r=="function"&&(r=r(e??{})),Goc(aCa(e,r))),t.stop=LLo,t},BUD=Goc(),aYp=BUD;var MYp=ai(EYp(),1);function Xoc(e){let t=(0,MYp.default)("npm",{registry:"https://registry.npmjs.org/"}),r=t[`${e}:registry`]||t.config_registry||t.registry;return r.slice(-1)==="/"?r:`${r}/`}var PXp=ai(mXp(),1),jXp=ai(Cwi(),1),luc=class extends Error{constructor(t){super(`Package \`${t}\` could not be found`),this.name="PackageNotFoundError"}},fuc=class extends Error{constructor(t,r){super(`Version \`${r}\` for package \`${t}\` could not be found`),this.name="VersionNotFoundError"}};async function duc(e,t={}){let{version:r="latest"}=t,{omitDeprecated:i=!0}=t,n=e.split("/")[0],a=t.registryUrl??Xoc(n),u=new URL(encodeURIComponent(e).replace(/^%40/,"@"),a),l=(0,PXp.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 aYp(u,{headers:d,keepalive:!0}).json()}catch(c){throw c?.response?.status===404?new luc(e):c}if(t.allVersions)return s;let o=new fuc(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=jXp.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 dCa(e,t){let{version:r}=await duc(e.toLowerCase(),t);return r}async function bEi({cliEnvironment:e,includePreReleases:t=!1}){return e.packageName!=="fern-api"?e.packageVersion:dCa(e.packageName,{version:t?"prerelease":"latest"})}var wXp=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],kLo=class{environment;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=T0.Info;isLocal;constructor(t,r,{isLocal:i}){this.ttyAwareLogger=new xLo(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.64.21"}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 l9}failWithoutThrowing(t,r){this.didSucceed=!1,CLo({message:t,error:r,logger:this.logger})}async exit({code:t}={}){(!this._suppressUpgradeMessage||!this.isLocal)&&await this.nudgeUpgradeIfAvailable(),this.ttyAwareLogger.finish(),await(await lFn()).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 WKp({cliEnvironment:this.environment,upgradeInfo:t});r!=null&&(r.endsWith(`
|
|
1955
|
+
`,i?gFn(n,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):n}async function DUD(e){let r=await new UKp.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 EUD({cliContext:e,project:{apiWorkspaces:t},generatorFilter:r,groupFilter:i,channel:n,includeMajor:a}){if(t.length===1){let l={type:"singleApi",versions:{}};return await HKp({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(d,s,o,c)=>{l.versions[s]==null&&(l.versions[s]={});let b=Twi(o.name,c),g=await kZt({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 HKp({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=Twi(s.name,o),b=await kZt({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 HKp({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 RVt({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 $Kp(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=qae(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 RLo({project:e,cliContext:t,generatorFilter:r,groupFilter:i,channel:n,includeMajor:a}){let u=[];if(e!=null){let l=await EUD({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(...$Kp(s,d,t.logger));else u.push(...$Kp(l.versions,void 0,t.logger))}return u}var nCa=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 Z6n=class extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}};var Loc=(()=>{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})(),GKp=typeof globalThis.AbortController=="function",QKp=typeof globalThis.ReadableStream=="function",JKp=typeof globalThis.FormData=="function",NLo=["get","post","put","patch","head","delete"],MUD=()=>{};MUD();var KKp={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},FLo=2147483647,YKp=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,LLo=Symbol("stop"),XKp={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},ZKp={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 AUD=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[r,i]of e)t+=YKp,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},kKp=(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})},eYp=(e,t)=>{let r=AUD(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 k6n=e=>e!==null&&typeof e=="object";var aCa=(...e)=>{for(let t of e)if((!k6n(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return Woc({},...e)},Uoc=(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 ULo(e,t,r){return Object.hasOwn(t,r)&&t[r]===void 0?[]:Woc(e[r]??[],t[r]??[])}var Voc=(e={},t={})=>({beforeRequest:ULo(e,t,"beforeRequest"),beforeRetry:ULo(e,t,"beforeRetry"),afterResponse:ULo(e,t,"afterResponse"),beforeError:ULo(e,t,"beforeError")}),Woc=(...e)=>{let t={},r={},i={};for(let n of e)if(Array.isArray(n))Array.isArray(t)||(t=[]),t=[...t,...n];else if(k6n(n)){for(let[a,u]of Object.entries(n))k6n(u)&&a in t&&(u=Woc(t[a],u)),t={...t,[a]:u};k6n(n.hooks)&&(i=Voc(i,n.hooks),t.hooks=i),k6n(n.headers)&&(r=Uoc(r,n.headers),t.headers=r)}return t};var rYp=e=>NLo.includes(e)?e.toUpperCase():e,qUD=["get","put","head","delete","options","trace"],TUD=[408,413,429,500,502,503,504],CUD=[413,429,503],tYp={limit:2,methods:qUD,statusCodes:TUD,afterStatusCodes:CUD,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},iYp=(e={})=>{if(typeof e=="number")return{...tYp,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{...tYp,...e}};async function Hoc(e,t,r,i){return new Promise((n,a)=>{let u=setTimeout(()=>{r&&r.abort(),a(new Z6n(e))},i.timeout);i.fetch(e,t).then(n).catch(a).then(()=>{clearTimeout(u)})})}async function $oc(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 nYp=(e,t)=>{let r={};for(let i in t)!(i in ZKp)&&!(i in XKp)&&!(i in e)&&(r[i]=t[i]);return r};var oCa=class e{static create(t,r){let i=new e(t,r),n=async()=>{if(typeof i._options.timeout=="number"&&i._options.timeout>FLo)throw new RangeError(`The \`timeout\` option cannot be greater than ${FLo}`);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 nCa(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(!QKp)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return kKp(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(KKp))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:Uoc(this._input.headers,r.headers),hooks:Voc({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:rYp(r.method??this._input.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:iYp(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(GKp){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(Loc&&(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);(JKp&&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(!Loc)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=eYp(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount>this._options.retry.limit||t instanceof Z6n)throw t;if(t instanceof nCa){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),FLo);if(this._retryCount<1)throw r;await $oc(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})===LLo)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=nYp(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,t):Hoc(r,t,this.abortController,this._options)}};var Goc=e=>{let t=(r,i)=>oCa.create(r,aCa(e,i));for(let r of NLo)t[r]=(i,n)=>oCa.create(i,aCa(e,n,{method:r}));return t.create=r=>Goc(aCa(r)),t.extend=r=>(typeof r=="function"&&(r=r(e??{})),Goc(aCa(e,r))),t.stop=LLo,t},BUD=Goc(),aYp=BUD;var MYp=ai(EYp(),1);function Xoc(e){let t=(0,MYp.default)("npm",{registry:"https://registry.npmjs.org/"}),r=t[`${e}:registry`]||t.config_registry||t.registry;return r.slice(-1)==="/"?r:`${r}/`}var PXp=ai(mXp(),1),jXp=ai(Cwi(),1),luc=class extends Error{constructor(t){super(`Package \`${t}\` could not be found`),this.name="PackageNotFoundError"}},fuc=class extends Error{constructor(t,r){super(`Version \`${r}\` for package \`${t}\` could not be found`),this.name="VersionNotFoundError"}};async function duc(e,t={}){let{version:r="latest"}=t,{omitDeprecated:i=!0}=t,n=e.split("/")[0],a=t.registryUrl??Xoc(n),u=new URL(encodeURIComponent(e).replace(/^%40/,"@"),a),l=(0,PXp.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 aYp(u,{headers:d,keepalive:!0}).json()}catch(c){throw c?.response?.status===404?new luc(e):c}if(t.allVersions)return s;let o=new fuc(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=jXp.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 dCa(e,t){let{version:r}=await duc(e.toLowerCase(),t);return r}async function bEi({cliEnvironment:e,includePreReleases:t=!1}){return e.packageName!=="fern-api"?e.packageVersion:dCa(e.packageName,{version:t?"prerelease":"latest"})}var wXp=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],kLo=class{environment;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=T0.Info;isLocal;constructor(t,r,{isLocal:i}){this.ttyAwareLogger=new xLo(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.64.22"}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 l9}failWithoutThrowing(t,r){this.didSucceed=!1,CLo({message:t,error:r,logger:this.logger})}async exit({code:t}={}){(!this._suppressUpgradeMessage||!this.isLocal)&&await this.nudgeUpgradeIfAvailable(),this.ttyAwareLogger.finish(),await(await lFn()).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 WKp({cliEnvironment:this.environment,upgradeInfo:t});r!=null&&(r.endsWith(`
|
|
1956
1956
|
`)||(r+=`
|
|
1957
1957
|
`),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=UBs(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 XTa(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 l9}finally{i.finish()}return n}async instrumentPostHogEvent(t){this.isLocal||(await lFn()).sendEvent(t)}logger=dXt((t,...r)=>this.log(t,...r));stderr=dXt((t,...r)=>this.logStderr(t,...r));constructTaskInitForWorkspace(t){let r=SXp(t.type==="docs"?"docs":t.workspaceName??"api"),i=1+(this.longestWorkspaceName!=null?SXp(this.longestWorkspaceName):r).length,n=r.padEnd(i),a=wXp[this.numTasks++%wXp.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===MB.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=>Vji.indexOf(n.level)>=Vji.indexOf(this.logLevel));this.ttyAwareLogger.log(i,{includeDebugInfo:this.logLevel===T0.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 bEi({cliEnvironment:this.environment,includePreReleases:t}),i=qae(r,this.environment.packageVersion);this.logger.debug(`Latest version: ${r}. `+(i?"Upgrade available.":"No upgrade available."));let n={isUpgradeAvailable:i,latestVersion:r},a=await RLo({project:this.project,cliContext:this});this._isUpgradeAvailable={cliUpgradeInfo:n,generatorUpgradeInfo:a}}return this._isUpgradeAvailable}async confirmPrompt(t,r=!1){return await joc({message:t,default:r})}async getInput(t){return await woc({message:t.message,default:t.default})}};function SXp(e){return`[${e}]:`}var lg_=require("fs/promises");function rFe({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(`
|
|
1958
1958
|
`)}var e__=require("fs/promises");var WWt=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 cMe=class extends WWt{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 pCa=class{context;constructor(t){this.context=t}};var eUo=class e{files={};directories={};getAllFiles(){let t={},r=(i,n)=>{for(let[u,l]of Object.entries(i.files)){let d=n!=null?gy.of(`${n}${tVt}${u}`):gy.of(u);t[d]=l}let a=Object.keys(i.directories).sort();for(let u of a){let l=n!=null?`${n}${tVt}${u}`:u,d=i.directories[u];r(d,l)}};return r(this),t}getOrCreateFile(t){return this.getOrCreateFileRecursive(t.split(tVt))}getOrCreateFileRecursive(t){if(t.length===1)return this.files[gy.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 ZGi=class{enableUniqueErrorsPerEndpoint;root;rootApiFile;packageMarkerFile={};basePath=void 0;constructor(t){this.enableUniqueErrorsPerEndpoint=t,this.root=new eUo,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 hkt(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"]))DXp(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(DXp(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)}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??C_((yxe(r)+"/"+VUi(r,{stripExtension:!0})).replaceAll("__package__","root"));if(t===gy.of(VF))return this.rootApiFile.imports==null&&(this.rootApiFile.imports={}),this.rootApiFile.imports[n]=Tgo(yxe(OBn.of(`/${t}`)),OBn.of(`/${r}`)),n;let a=this.getOrCreateFile(t);return a.imports==null&&(a.imports={}),a.imports[n]=Tgo(yxe(OBn.of(`/${t}`)),OBn.of(`/${r}`)),n}addType(t,{name:r,schema:i}){if(t===gy.of(VF))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=>v2(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=EN(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:EN(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:EN(r,u.path)}]))})}return{rootApiFile:this.rootApiFile,packageMarkerFile:this.packageMarkerFile,definitionFiles:t}}getOrCreateFile(t){return t===TS?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 DXp(e){return e?.header!=null}var Tae={openapi:e=>({...e,type:"openapi",_visit:function(t){return Tae._visit(this,t)}}),protobuf:e=>({...e,type:"protobuf",_visit:function(t){return Tae._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 o4n={protobuf:e=>({...e,type:"protobuf",_visit:function(t){return o4n._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"protobuf":return t.protobuf(e);default:return t._other(e)}}};var Q9={basic:e=>({...e,type:"basic",_visit:function(t){return Q9._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return Q9._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return Q9._visit(this,t)}}),query:e=>({...e,type:"query",_visit:function(t){return Q9._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return Q9._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 OO={primitive:e=>({value:e,type:"primitive",_visit:function(t){return OO._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return OO._visit(this,t)}}),array:e=>({value:e,type:"array",_visit:function(t){return OO._visit(this,t)}}),map:e=>({value:e,type:"map",_visit:function(t){return OO._visit(this,t)}}),enum:e=>({value:e,type:"enum",_visit:function(t){return OO._visit(this,t)}}),literal:e=>({value:e,type:"literal",_visit:function(t){return OO._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return OO._visit(this,t)}}),unknown:e=>({value:e,type:"unknown",_visit:function(t){return OO._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 D_={int:e=>({value:e,type:"int",_visit:function(t){return D_._visit(this,t)}}),int64:e=>({value:e,type:"int64",_visit:function(t){return D_._visit(this,t)}}),uint:e=>({value:e,type:"uint",_visit:function(t){return D_._visit(this,t)}}),uint64:e=>({value:e,type:"uint64",_visit:function(t){return D_._visit(this,t)}}),float:e=>({value:e,type:"float",_visit:function(t){return D_._visit(this,t)}}),double:e=>({value:e,type:"double",_visit:function(t){return D_._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return D_._visit(this,t)}}),datetime:e=>({value:e,type:"datetime",_visit:function(t){return D_._visit(this,t)}}),date:e=>({value:e,type:"date",_visit:function(t){return D_._visit(this,t)}}),base64:e=>({value:e,type:"base64",_visit:function(t){return D_._visit(this,t)}}),boolean:e=>({value:e,type:"boolean",_visit:function(t){return D_._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 u4n={boolean:e=>({value:e,type:"boolean",_visit:function(t){return u4n._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return u4n._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 gEi={discriminated:e=>({value:e,type:"discriminated",_visit:function(t){return gEi._visit(this,t)}}),undiscriminated:e=>({value:e,type:"undiscriminated",_visit:function(t){return gEi._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 RW={GenerallyAvailable:"GenerallyAvailable",Beta:"Beta",Deprecated:"Deprecated",_visit:(e,t)=>{switch(e){case RW.GenerallyAvailable:return t.generallyAvailable();case RW.Beta:return t.beta();case RW.Deprecated:return t.deprecated();default:return t._other()}}};var iFe={cursor:e=>({...e,type:"cursor",_visit:function(t){return iFe._visit(this,t)}}),offset:e=>({...e,type:"offset",_visit:function(t){return iFe._visit(this,t)}}),custom:e=>({...e,type:"custom",_visit:function(t){return iFe._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 kfi={language:e=>({...e,type:"language",_visit:function(t){return kfi._visit(this,t)}}),sdk:e=>({...e,type:"sdk",_visit:function(t){return kfi._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 NW={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 NW.Curl:return t.curl();case NW.Python:return t.python();case NW.Javascript:return t.javascript();case NW.Typescript:return t.typescript();case NW.Go:return t.go();case NW.Ruby:return t.ruby();case NW.Csharp:return t.csharp();case NW.Java:return t.java();case NW.Js:return t.js();case NW.Node:return t.node();case NW.Ts:return t.ts();case NW.Nodets:return t.nodets();case NW.Golang:return t.golang();case NW.Dotnet:return t.dotnet();case NW.Jvm:return t.jvm();default:return t._other()}}};var HWt={unknown:e=>({value:e,type:"unknown",_visit:function(t){return HWt._visit(this,t)}}),full:e=>({...e,type:"full",_visit:function(t){return HWt._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 $Wt={withStreaming:e=>({...e,type:"withStreaming",_visit:function(t){return $Wt._visit(this,t)}}),withoutStreaming:e=>({value:e,type:"withoutStreaming",_visit:function(t){return $Wt._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 FW={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD",Options:"OPTIONS",Trace:"TRACE",_visit:(e,t)=>{switch(e){case FW.Get:return t.get();case FW.Post:return t.post();case FW.Put:return t.put();case FW.Patch:return t.patch();case FW.Delete:return t.delete();case FW.Head:return t.head();case FW.Options:return t.options();case FW.Trace:return t.trace();default:return t._other()}}};var OEi={octetStream:e=>({...e,type:"octetStream",_visit:function(t){return OEi._visit(this,t)}}),multipart:e=>({...e,type:"multipart",_visit:function(t){return OEi._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return OEi._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 edi={file:e=>({...e,type:"file",_visit:function(t){return edi._visit(this,t)}}),json:e=>({value:e,type:"json",_visit:function(t){return edi._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 GQ={file:e=>({...e,type:"file",_visit:function(t){return GQ._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return GQ._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return GQ._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return GQ._visit(this,t)}}),streamingSse:e=>({...e,type:"streamingSse",_visit:function(t){return GQ._visit(this,t)}}),streamingText:e=>({...e,type:"streamingText",_visit:function(t){return GQ._visit(this,t)}}),streamingJson:e=>({...e,type:"streamingJson",_visit:function(t){return GQ._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 Hy={primitive:e=>({...e,type:"primitive",_visit:function(t){return Hy._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return Hy._visit(this,t)}}),array:e=>({...e,type:"array",_visit:function(t){return Hy._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return Hy._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return Hy._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return Hy._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return Hy._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return Hy._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return Hy._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return Hy._visit(this,t)}}),unknown:e=>({...e,type:"unknown",_visit:function(t){return Hy._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 Xj={int:e=>({...e,type:"int",_visit:function(t){return Xj._visit(this,t)}}),int64:e=>({...e,type:"int64",_visit:function(t){return Xj._visit(this,t)}}),uint:()=>({type:"uint",_visit:function(e){return Xj._visit(this,e)}}),uint64:()=>({type:"uint64",_visit:function(e){return Xj._visit(this,e)}}),float:()=>({type:"float",_visit:function(e){return Xj._visit(this,e)}}),double:e=>({...e,type:"double",_visit:function(t){return Xj._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return Xj._visit(this,t)}}),datetime:()=>({type:"datetime",_visit:function(e){return Xj._visit(this,e)}}),date:()=>({type:"date",_visit:function(e){return Xj._visit(this,e)}}),base64:()=>({type:"base64",_visit:function(e){return Xj._visit(this,e)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return Xj._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 fz={boolean:e=>({value:e,type:"boolean",_visit:function(t){return fz._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return fz._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 tdi={discriminated:e=>({...e,type:"discriminated",_visit:function(t){return tdi._visit(this,t)}}),undiscriminated:e=>({...e,type:"undiscriminated",_visit:function(t){return tdi._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 lMe={octetStream:e=>({...e,type:"octetStream",_visit:function(t){return lMe._visit(this,t)}}),multipart:e=>({...e,type:"multipart",_visit:function(t){return lMe._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return lMe._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 bC={file:e=>({...e,type:"file",_visit:function(t){return bC._visit(this,t)}}),json:e=>({...e,type:"json",_visit:function(t){return bC._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return bC._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return bC._visit(this,t)}}),streamingSse:e=>({...e,type:"streamingSse",_visit:function(t){return bC._visit(this,t)}}),streamingText:e=>({...e,type:"streamingText",_visit:function(t){return bC._visit(this,t)}}),streamingJson:e=>({...e,type:"streamingJson",_visit:function(t){return bC._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 zl={primitive:e=>({...e,type:"primitive",_visit:function(t){return zl._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return zl._visit(this,t)}}),array:e=>({...e,type:"array",_visit:function(t){return zl._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return zl._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return zl._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return zl._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return zl._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return zl._visit(this,t)}}),oneOf:e=>({value:e,type:"oneOf",_visit:function(t){return zl._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return zl._visit(this,t)}}),unknown:e=>({...e,type:"unknown",_visit:function(t){return zl._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 xZ={discriminated:e=>({...e,type:"discriminated",_visit:function(t){return xZ._visit(this,t)}}),undiscriminated:e=>({...e,type:"undiscriminated",_visit:function(t){return xZ._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 cp={int:e=>({...e,type:"int",_visit:function(t){return cp._visit(this,t)}}),int64:e=>({...e,type:"int64",_visit:function(t){return cp._visit(this,t)}}),uint:e=>({...e,type:"uint",_visit:function(t){return cp._visit(this,t)}}),uint64:e=>({...e,type:"uint64",_visit:function(t){return cp._visit(this,t)}}),float:e=>({...e,type:"float",_visit:function(t){return cp._visit(this,t)}}),double:e=>({...e,type:"double",_visit:function(t){return cp._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return cp._visit(this,t)}}),datetime:e=>({...e,type:"datetime",_visit:function(t){return cp._visit(this,t)}}),date:e=>({...e,type:"date",_visit:function(t){return cp._visit(this,t)}}),base64:e=>({...e,type:"base64",_visit:function(t){return cp._visit(this,t)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return cp._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 Tv={};Dn(Tv,{AllOfPropertyConflict:()=>q4n,ArraySchema:()=>yVo,ArraySchemaWithExample:()=>HVo,Availability:()=>lUo,Base64WithExample:()=>FVo,BasicSecurityScheme:()=>pUo,BearerSecurityScheme:()=>_Uo,BooleanSchema:()=>lVo,BooleanWithExample:()=>LVo,BytesResponse:()=>m4n,CasingOverrides:()=>vUo,CommonProperty:()=>wVo,CommonPropertyWithExample:()=>kVo,CursorPagination:()=>QUo,CustomCodeSample:()=>$Uo,CustomCodeSampleLanguage:()=>VUo,CustomCodeSampleSdk:()=>HUo,CustomPagination:()=>KUo,DateWithExample:()=>NVo,DatetimeWithExample:()=>RVo,DiscriminatedOneOfSchema:()=>PVo,DiscriminatedOneOfSchemaWithExample:()=>XVo,DoubleSchema:()=>sVo,DoubleWithExample:()=>zVo,Encoding:()=>cUo,Endpoint:()=>YUo,EndpointExample:()=>S4n,EndpointResponseExample:()=>UUo,EndpointSdkName:()=>Brr,EndpointWithExample:()=>rZp,EnumSchema:()=>f4n,EnumSchemaWithExample:()=>VVo,EnumValue:()=>jEi,ErrorExample:()=>xUo,FernExample:()=>NUo,FileResponse:()=>g4n,FileSchema:()=>AUo,FloatWithExample:()=>IVo,FullEndpointExample:()=>GUo,FullExample:()=>Vq,FullObjectExample:()=>wUo,FullOneOfExample:()=>DUo,GlobalHeader:()=>dVo,Header:()=>SEi,HeaderExample:()=>w4n,HeaderSecurityScheme:()=>hUo,HeaderWithExample:()=>MEi,HttpEndpointServer:()=>P4n,HttpError:()=>RUo,HttpErrorWithExample:()=>AVo,HttpMethod:()=>_4n,IdempotencyHeader:()=>pVo,Int64WithExample:()=>TVo,IntSchema:()=>oVo,IntWithExample:()=>qVo,JsonRequest:()=>BUo,JsonRequestWithExample:()=>DVo,JsonResponse:()=>O4n,JsonResponseWithExample:()=>B4n,KeyValuePair:()=>SUo,LiteralExample:()=>jUo,LiteralSchema:()=>A4n,LiteralSchemaValue:()=>_Vo,LongSchema:()=>uVo,MapSchema:()=>vVo,MapSchemaWithExample:()=>$Vo,MultipartRequest:()=>b4n,MultipartRequestProperty:()=>CUo,MultipartRequestPropertyEncoding:()=>TUo,MultipartSchema:()=>qUo,NamedFullExample:()=>zrr,Namespace:()=>bUo,NamespaceId:()=>PUo,NullableSchema:()=>gVo,NullableSchemaWithExample:()=>QVo,OauthSecurityScheme:()=>OUo,ObjectProperty:()=>mVo,ObjectPropertyConflictInfo:()=>T4n,ObjectPropertyWithExample:()=>YVo,ObjectSchema:()=>hVo,ObjectSchemaWithExample:()=>JVo,OctetStreamRequest:()=>v4n,OffsetPagination:()=>JUo,OneOfSchema:()=>OVo,OneOfSchemaWithExample:()=>KVo,OpenApiIntermediateRepresentation:()=>eZp,OpenApiSource:()=>aUo,OptionalSchema:()=>bVo,OptionalSchemaWithExample:()=>GVo,Pagination:()=>D4n,PathParameter:()=>h4n,PathParameterExample:()=>FUo,PathParameterWithExample:()=>SVo,PrimitiveExample:()=>p4n,PrimitiveSchema:()=>EEi,PrimitiveSchemaValue:()=>fVo,PrimitiveSchemaValueWithExample:()=>UVo,PrimitiveSchemaWithExample:()=>I4n,PropertyKey:()=>d4n,ProtobufEncoding:()=>sUo,ProtobufSource:()=>oUo,QueryParameter:()=>y4n,QueryParameterExample:()=>j4n,QueryParameterWithExample:()=>C4n,QuerySecurityScheme:()=>yUo,ReferencedSchema:()=>Irr,Request:()=>IUo,RequestWithExample:()=>EVo,Response:()=>zUo,ResponseWithExample:()=>MVo,Schema:()=>wm,SchemaId:()=>RZ,SchemaWithExample:()=>lA,Schemas:()=>aVo,SdkGroup:()=>gUo,SdkGroupInfo:()=>EUo,SdkGroupName:()=>wEi,SecurityScheme:()=>mUo,SecuritySchemeId:()=>dUo,Server:()=>vCa,Source:()=>uUo,StatusCode:()=>Crr,StreamingResponseExample:()=>LUo,StringSchema:()=>cVo,StringSchemaWithExample:()=>xVo,SupportedSdkLanguage:()=>WUo,Tag:()=>fUo,TagId:()=>NZ,Tags:()=>MUo,TextResponse:()=>DEi,Uint64WithExample:()=>BVo,UintWithExample:()=>CVo,UnDiscriminatedOneOfSchema:()=>jVo,UnDiscriminatedOneOfSchemaWithExample:()=>ZVo,UnknownSchemaWithExample:()=>WVo,Webhook:()=>XUo,WebhookExampleCall:()=>M4n,WebhookHttpMethod:()=>E4n,WebhookWithExample:()=>iZp,WebsocketChannel:()=>nVo,WebsocketHandshake:()=>ZUo,WebsocketHandshakeWithExample:()=>tZp,WebsocketMessageExample:()=>rVo,WebsocketMessageOrigin:()=>kUo,WebsocketMessageSchema:()=>eVo,WebsocketServer:()=>tVo,WebsocketSessionExample:()=>iVo,WithAvailability:()=>Th,WithDescription:()=>gf,WithEncoding:()=>Cae,WithInline:()=>WE,WithName:()=>z0,WithNamespace:()=>i0,WithSdkGroupName:()=>sm,WithSource:()=>Xh,WithStatusCode:()=>nFe,WithTitle:()=>um,commons:()=>vuc,example:()=>buc,finalIr:()=>guc,parseIr:()=>Ouc});var vuc={};Dn(vuc,{BasicSecurityScheme:()=>pUo,BearerSecurityScheme:()=>_Uo,Encoding:()=>cUo,HeaderSecurityScheme:()=>hUo,Namespace:()=>bUo,NamespaceId:()=>PUo,OauthSecurityScheme:()=>OUo,OpenApiSource:()=>aUo,ProtobufEncoding:()=>sUo,ProtobufSource:()=>oUo,QuerySecurityScheme:()=>yUo,SchemaId:()=>RZ,SdkGroup:()=>gUo,SdkGroupName:()=>wEi,SecurityScheme:()=>mUo,SecuritySchemeId:()=>dUo,Server:()=>vCa,Source:()=>uUo,StatusCode:()=>Crr,Tag:()=>fUo,TagId:()=>NZ,WithAvailability:()=>Th,WithDescription:()=>gf,WithEncoding:()=>Cae,WithInline:()=>WE,WithName:()=>z0,WithNamespace:()=>i0,WithSdkGroupName:()=>sm,WithSource:()=>Xh,WithStatusCode:()=>nFe,WithTitle:()=>um});var Mt={};Dn(Mt,{JsonError:()=>s4n,ParseError:()=>c4n,any:()=>UXp,bigint:()=>MXp,boolean:()=>VXp,booleanLiteral:()=>LXp,date:()=>AXp,discriminant:()=>XXp,enum_:()=>rUo,getObjectLikeUtils:()=>GWt,getObjectUtils:()=>kGi,getSchemaUtils:()=>Uq,isProperty:()=>PEi,lazy:()=>qXp,lazyObject:()=>RXp,list:()=>nUo,number:()=>WXp,object:()=>iUo,objectWithoutOptionalProperties:()=>xXp,optional:()=>puc,property:()=>CXp,record:()=>QXp,set:()=>JXp,string:()=>HXp,stringLiteral:()=>FXp,transform:()=>_uc,undiscriminatedUnion:()=>YXp,union:()=>kXp,unknown:()=>$Xp,withParsedProperties:()=>yuc});var Mj={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 ${FVD(e)}.`}function FVD(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 J9(e){return{...e,json:EXp(e.json),parse:EXp(e.parse)}}function EXp(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(`
|