fern-api 5.217.2 → 5.218.0
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 +12 -8
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -250,9 +250,9 @@ ${m.join(`
|
|
|
250
250
|
|
|
251
251
|
`)}f.write("payload.value = newResult;"),f.write("return payload;");let I=f.compile();return(C,x)=>I(d,C,x)},o,s=r3e,a=!V6t.jitless,l=a&&xAo.value,u=t.catchall,p;e._zod.parse=(d,f)=>{p??(p=n.value);let m=d.value;return s(m)?a&&l&&f?.async===!1&&f.jitless!==!0?(o||(o=i(t.shape)),d=o(d,f),u?H9c([],m,d,f,p,e):d):r(d,f):(d.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),d)}});n3t=wr("$ZodUnion",(e,t)=>{Zl.init(e,t),Wp(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Wp(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Wp(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Wp(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>W6t(o.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(r)return n(i,o);let s=!1,a=[];for(let c of t.options){let l=c._zod.run({value:i.value,issues:[]},o);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(c=>F9c(c,i,e,o)):F9c(a,i,e,o)}});gbo=wr("$ZodXor",(e,t)=>{n3t.init(e,t),t.inclusive=!1;let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(r)return n(i,o);let s=!1,a=[];for(let c of t.options){let l=c._zod.run({value:i.value,issues:[]},o);l instanceof Promise?(a.push(l),s=!0):a.push(l)}return s?Promise.all(a).then(c=>N9c(c,i,e,o)):N9c(a,i,e,o)}}),Abo=wr("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,n3t.init(e,t);let r=e._zod.parse;Wp(e._zod,"propValues",()=>{let i={};for(let o of t.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[a,c]of Object.entries(s)){i[a]||(i[a]=new Set);for(let l of c)i[a].add(l)}}return i});let n=art(()=>{let i=t.options,o=new Map;for(let s of i){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,s)}}return o});e._zod.parse=(i,o)=>{let s=i.value;if(!r3e(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;let a=n.value.get(s?.[t.discriminator]);return a?a._zod.run(i,o):t.unionFallback?r(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),i)}}),ybo=wr("$ZodIntersection",(e,t)=>{Zl.init(e,t),e._zod.parse=(r,n)=>{let i=r.value,o=t.left._zod.run({value:i,issues:[]},n),s=t.right._zod.run({value:i,issues:[]},n);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([c,l])=>j9c(r,c,l)):j9c(r,o,s)}});eFr=wr("$ZodTuple",(e,t)=>{Zl.init(e,t);let r=t.items;e._zod.parse=(n,i)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let s=[],a=[...r].reverse().findIndex(u=>u._zod.optin!=="optional"),c=a===-1?0:r.length-a;if(!t.rest){let u=o.length>r.length,p=o.length<c-1;if(u||p)return n.issues.push({...u?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:e,origin:"array"}),n}let l=-1;for(let u of r){if(l++,l>=o.length&&l>=c)continue;let p=u._zod.run({value:o[l],issues:[]},i);p instanceof Promise?s.push(p.then(d=>Hkr(d,n,l))):Hkr(p,n,l)}if(t.rest){let u=o.slice(r.length);for(let p of u){l++;let d=t.rest._zod.run({value:p,issues:[]},i);d instanceof Promise?s.push(d.then(f=>Hkr(f,n,l))):Hkr(d,n,l)}}return s.length?Promise.all(s).then(()=>n):n}});bbo=wr("$ZodRecord",(e,t)=>{Zl.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!kve(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s){r.value={};let a=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){a.add(typeof l=="number"?l.toString():l);let u=t.valueType._zod.run({value:i[l],issues:[]},n);u instanceof Promise?o.push(u.then(p=>{p.issues.length&&r.issues.push(...u3(l,p.issues)),r.value[l]=p.value})):(u.issues.length&&r.issues.push(...u3(l,u.issues)),r.value[l]=u.value)}let c;for(let l in i)a.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(i)){if(a==="__proto__")continue;let c=t.keyType._zod.run({value:a,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Ukr.test(a)&&c.issues.length){let p=t.keyType._zod.run({value:Number(a),issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(c=p)}if(c.issues.length){t.mode==="loose"?r.value[a]=i[a]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>Wz(p,n,XI())),input:a,path:[a],inst:e});continue}let u=t.valueType._zod.run({value:i[a],issues:[]},n);u instanceof Promise?o.push(u.then(p=>{p.issues.length&&r.issues.push(...u3(a,p.issues)),r.value[c.value]=p.value})):(u.issues.length&&r.issues.push(...u3(a,u.issues)),r.value[c.value]=u.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Ebo=wr("$ZodMap",(e,t)=>{Zl.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),r;let o=[];r.value=new Map;for(let[s,a]of i){let c=t.keyType._zod.run({value:s,issues:[]},n),l=t.valueType._zod.run({value:a,issues:[]},n);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([u,p])=>{z9c(u,p,r,s,i,e,n)})):z9c(c,l,r,s,i,e,n)}return o.length?Promise.all(o).then(()=>r):r}});Ibo=wr("$ZodSet",(e,t)=>{Zl.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let s of i){let a=t.valueType._zod.run({value:s,issues:[]},n);a instanceof Promise?o.push(a.then(c=>Q9c(c,r))):Q9c(a,r)}return o.length?Promise.all(o).then(()=>r):r}});vbo=wr("$ZodEnum",(e,t)=>{Zl.init(e,t);let r=q6t(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>H6t.has(typeof i)).map(i=>typeof i=="string"?$V(i):i.toString()).join("|")})$`),e._zod.parse=(i,o)=>{let s=i.value;return n.has(s)||i.issues.push({code:"invalid_value",values:r,input:s,inst:e}),i}}),Cbo=wr("$ZodLiteral",(e,t)=>{if(Zl.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?$V(n):n?$V(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let o=n.value;return r.has(o)||n.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),n}}),xbo=wr("$ZodFile",(e,t)=>{Zl.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),r}}),Sbo=wr("$ZodTransform",(e,t)=>{Zl.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Bve(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r));if(i instanceof Promise)throw new MH;return r.value=i,r}});tFr=wr("$ZodOptional",(e,t)=>{Zl.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Wp(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Wp(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${W6t(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>M9c(o,r.value)):M9c(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),wbo=wr("$ZodExactOptional",(e,t)=>{tFr.init(e,t),Wp(e._zod,"values",()=>t.innerType._zod.values),Wp(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),Tbo=wr("$ZodNullable",(e,t)=>{Zl.init(e,t),Wp(e._zod,"optin",()=>t.innerType._zod.optin),Wp(e._zod,"optout",()=>t.innerType._zod.optout),Wp(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${W6t(r.source)}|null)$`):void 0}),Wp(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),Obo=wr("$ZodDefault",(e,t)=>{Zl.init(e,t),e._zod.optin="optional",Wp(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>L9c(o,t)):L9c(i,t)}});Pbo=wr("$ZodPrefault",(e,t)=>{Zl.init(e,t),e._zod.optin="optional",Wp(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),Bbo=wr("$ZodNonOptional",(e,t)=>{Zl.init(e,t),Wp(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>_9c(o,e)):_9c(i,e)}});Dbo=wr("$ZodSuccess",(e,t)=>{Zl.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Bve("ZodSuccess");let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),Rbo=wr("$ZodCatch",(e,t)=>{Zl.init(e,t),Wp(e._zod,"optin",()=>t.innerType._zod.optin),Wp(e._zod,"optout",()=>t.innerType._zod.optout),Wp(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>Wz(s,n,XI()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(o=>Wz(o,n,XI()))},input:r.value}),r.issues=[]),r)}}),kbo=wr("$ZodNaN",(e,t)=>{Zl.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Fbo=wr("$ZodPipe",(e,t)=>{Zl.init(e,t),Wp(e._zod,"values",()=>t.in._zod.values),Wp(e._zod,"optin",()=>t.in._zod.optin),Wp(e._zod,"optout",()=>t.out._zod.optout),Wp(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let o=t.out._zod.run(r,n);return o instanceof Promise?o.then(s=>Kkr(s,t.in,n)):Kkr(o,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(o=>Kkr(o,t.out,n)):Kkr(i,t.out,n)}});i3t=wr("$ZodCodec",(e,t)=>{Zl.init(e,t),Wp(e._zod,"values",()=>t.in._zod.values),Wp(e._zod,"optin",()=>t.in._zod.optin),Wp(e._zod,"optout",()=>t.out._zod.optout),Wp(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Jkr(s,t,n)):Jkr(o,t,n)}else{let o=t.out._zod.run(r,n);return o instanceof Promise?o.then(s=>Jkr(s,t,n)):Jkr(o,t,n)}}});Nbo=wr("$ZodReadonly",(e,t)=>{Zl.init(e,t),Wp(e._zod,"propValues",()=>t.innerType._zod.propValues),Wp(e._zod,"values",()=>t.innerType._zod.values),Wp(e._zod,"optin",()=>t.innerType?._zod?.optin),Wp(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(U9c):U9c(i)}});jbo=wr("$ZodTemplateLiteral",(e,t)=>{Zl.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let o=i.startsWith("^")?1:0,s=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(o,s))}else if(n===null||wAo.has(typeof n))r.push($V(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),zbo=wr("$ZodFunction",(e,t)=>(Zl.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let i=e._def.input?Dkr(e._def.input,n):n,o=Reflect.apply(r,this,i);return e._def.output?Dkr(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let i=e._def.input?await Rkr(e._def.input,n):n,o=await Reflect.apply(r,this,i);return e._def.output?await Rkr(e._def.output,o):o}},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new eFr({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),Qbo=wr("$ZodPromise",(e,t)=>{Zl.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>t.innerType._zod.run({value:i,issues:[]},n))}),Mbo=wr("$ZodLazy",(e,t)=>{Zl.init(e,t),Wp(e._zod,"innerType",()=>t.getter()),Wp(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Wp(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Wp(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Wp(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),Lbo=wr("$ZodCustom",(e,t)=>{GA.init(e,t),Zl.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(o=>V9c(o,r,n,e));V9c(i,r,n,e)}})});function J9c(){return{localeError:WVd()}}var WVd,Y9c=h(()=>{"use strict";Ga();WVd=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(i){return e[i]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${i.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return i.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${ci(i.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${i.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${r[o.format]??i.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${i.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${i.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${i.keys.length>1?"\u0629":""}: ${on(i.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function X9c(){return{localeError:HVd()}}var HVd,Z9c=h(()=>{"use strict";Ga();HVd=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${i.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${ci(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??i.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${i.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${i.keys.length>1?"lar":""}: ${on(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${i.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function $9c(e,t,r,n){let i=Math.abs(e),o=i%10,s=i%100;return s>=11&&s<=19?n:o===1?t:o>=2&&o<=4?r:n}function eqc(){return{localeError:KVd()}}var KVd,tqc=h(()=>{"use strict";Ga();KVd=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(i){return e[i]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${ci(i.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);if(s){let a=Number(i.maximum),c=$9c(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${i.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);if(s){let a=Number(i.minimum),c=$9c(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${i.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${i.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${on(i.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${i.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function rqc(){return{localeError:JVd()}}var JVd,nqc=h(()=>{"use strict";Ga();JVd=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(i){return e[i]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${ci(i.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${i.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${i.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${i.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u043E\u0432\u0435":""}: ${on(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function iqc(){return{localeError:YVd()}}var YVd,oqc=h(()=>{"use strict";Ga();YVd=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(i){return e[i]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${i.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${ci(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${on(i.values," o ")}`;case"too_big":{let o=i.inclusive?"com a m\xE0xim":"menys de",s=t(i.origin);return s?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${o} ${i.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(i.origin);return s?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${o} ${i.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${on(i.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${i.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${i.origin}`;default:return"Entrada inv\xE0lida"}}}});function sqc(){return{localeError:XVd()}}var XVd,aqc=h(()=>{"use strict";Ga();XVd=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(i){return e[i]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${i.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${ci(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${on(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}}});function cqc(){return{localeError:ZVd()}}var ZVd,lqc=h(()=>{"use strict";Ga();ZVd=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(i){return e[i]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ugyldigt input: forventede instanceof ${i.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig v\xE6rdi: forventede ${ci(i.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin),a=n[i.origin]??i.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${i.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin),a=n[i.origin]??i.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${i.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??i.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${on(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${i.origin}`;default:return"Ugyldigt input"}}}});function uqc(){return{localeError:$Vd()}}var $Vd,pqc=h(()=>{"use strict";Ga();$Vd=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(i){return e[i]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${i.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${ci(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ist`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ist`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??i.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${on(i.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${i.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${i.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function rFr(){return{localeError:e5d()}}var e5d,Ubo=h(()=>{"use strict";Ga();e5d=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${ci(i.values[0])}`:`Invalid option: expected one of ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Too big: expected ${i.origin??"value"} to have ${o}${i.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Too small: expected ${i.origin} to have ${o}${i.minimum.toString()} ${s.unit}`:`Too small: expected ${i.origin} to be ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${on(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}}});function fqc(){return{localeError:t5d()}}var t5d,dqc=h(()=>{"use strict";Ga();t5d=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){return e[i]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${i.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return i.values.length===1?`Nevalida enigo: atendi\u011Dis ${ci(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Tro malgranda: atendi\u011Dis ke ${i.origin} havu ${o}${i.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${i.origin} estu ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} \u015Dlosilo${i.keys.length>1?"j":""}: ${on(i.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}}});function mqc(){return{localeError:r5d()}}var r5d,hqc=h(()=>{"use strict";Ga();r5d=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(i){return e[i]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${i.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${ci(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin),a=n[i.origin]??i.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${i.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin),a=n[i.origin]??i.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${i.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${r[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${on(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[i.origin]??i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[i.origin]??i.origin}`;default:return"Entrada inv\xE1lida"}}}});function gqc(){return{localeError:n5d()}}var n5d,Aqc=h(()=>{"use strict";Ga();n5d=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(i){return e[i]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return i.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${ci(i.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${on(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??i.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${i.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${i.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${on(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${i.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${i.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function yqc(){return{localeError:i5d()}}var i5d,bqc=h(()=>{"use strict";Ga();i5d=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(i){return e[i]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Virheellinen tyyppi: odotettiin instanceof ${i.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${ci(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${i.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${i.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${on(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}}});function Eqc(){return{localeError:o5d()}}var o5d,Iqc=h(()=>{"use strict";Ga();o5d=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){return e[i]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN",number:"nombre",array:"tableau"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : instanceof ${i.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${ci(i.values[0])} attendu`:`Option invalide : une valeur parmi ${on(i.values,"|")} attendue`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Trop grand : ${i.origin??"valeur"} doit ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i.origin??"valeur"} doit \xEAtre ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Trop petit : ${i.origin} doit ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Trop petit : ${i.origin} doit \xEAtre ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${r[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${on(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}}});function vqc(){return{localeError:s5d()}}var s5d,Cqc=h(()=>{"use strict";Ga();s5d=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){return e[i]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : attendu instanceof ${i.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${ci(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u2264":"<",s=t(i.origin);return s?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${o}${i.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u2265":">",s=t(i.origin);return s?`Trop petit : attendu que ${i.origin} ait ${o}${i.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${i.origin} soit ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${on(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}}});function xqc(){return{localeError:a5d()}}var a5d,Sqc=h(()=>{"use strict";Ga();a5d=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=l=>l?e[l]:void 0,n=l=>{let u=r(l);return u?u.label:l??e.unknown.label},i=l=>`\u05D4${n(l)}`,o=l=>(r(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=l=>l?t[l]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let u=l.expected,p=c[u??""]??n(u),d=Ai(l.input),f=c[d]??e[d]?.label??d;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${ci(l.values[0])}`;let u=l.values.map(f=>ci(f));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let p=u[u.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let u=s(l.origin),p=i(l.origin??"value");if(l.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let m=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(l.origin==="array"||l.origin==="set"){let m=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",g=l.inclusive?`${l.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let d=l.inclusive?"<=":"<",f=o(l.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${p} ${f} ${d}${l.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${f} ${d}${l.maximum.toString()}`}case"too_small":{let u=s(l.origin),p=i(l.origin??"value");if(l.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let m=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(l.origin==="array"||l.origin==="set"){let m=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let A=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${A}`}let g=l.inclusive?`${l.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let d=l.inclusive?">=":">",f=o(l.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${p} ${f} ${d}${l.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${f} ${d}${l.minimum.toString()}`}case"invalid_format":{let u=l;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${u.pattern}`;let p=a[u.format],d=p?.label??u.format,m=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${d} \u05DC\u05D0 ${m}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${on(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${i(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function wqc(){return{localeError:c5d()}}var c5d,Tqc=h(()=>{"use strict";Ga();c5d=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(i){return e[i]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${i.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${ci(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${i.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${o}${i.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??i.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${i.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${on(i.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${i.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${i.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function Oqc(e,t,r){return Math.abs(e)===1?t:r}function mrt(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}function Pqc(){return{localeError:l5d()}}var l5d,Bqc=h(()=>{"use strict";Ga();l5d=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(i){return e[i]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${i.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return i.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${ci(i.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);if(s){let a=Number(i.maximum),c=Oqc(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${mrt(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${i.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${mrt(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);if(s){let a=Number(i.minimum),c=Oqc(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${mrt(i.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${i.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${mrt(i.origin)} \u056C\u056B\u0576\u056B ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[o.format]??i.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${i.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${i.keys.length>1?"\u0576\u0565\u0580":""}. ${on(i.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${mrt(i.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${mrt(i.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function Dqc(){return{localeError:u5d()}}var u5d,Rqc=h(()=>{"use strict";Ga();u5d=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(i){return e[i]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Input tidak valid: diharapkan instanceof ${i.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${ci(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${o}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Terlalu kecil: diharapkan ${i.origin} memiliki ${o}${i.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${on(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}}});function kqc(){return{localeError:p5d()}}var p5d,Fqc=h(()=>{"use strict";Ga();p5d=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(i){return e[i]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${i.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return i.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${ci(i.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} hafi ${o}${i.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} s\xE9 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} hafi ${o}${i.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} s\xE9 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??i.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${on(i.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${i.origin}`;default:return"Rangt gildi"}}}});function Nqc(){return{localeError:f5d()}}var f5d,jqc=h(()=>{"use strict";Ga();f5d=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(i){return e[i]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Input non valido: atteso instanceof ${i.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return i.values.length===1?`Input non valido: atteso ${ci(i.values[0])}`:`Opzione non valida: atteso uno tra ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Troppo grande: ${i.origin??"valore"} deve avere ${o}${i.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Troppo piccolo: ${i.origin} deve avere ${o}${i.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${i.origin} deve essere ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${r[o.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${on(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}}});function zqc(){return{localeError:d5d()}}var d5d,Qqc=h(()=>{"use strict";Ga();d5d=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(i){return e[i]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${ci(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${on(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(i.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(i.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${i.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${i.keys.length>1?"\u7FA4":""}: ${on(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function Mqc(){return{localeError:m5d()}}var m5d,Lqc=h(()=>{"use strict";Ga();m5d=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(i){return e[i]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${i.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return i.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${ci(i.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${on(i.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${i.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${i.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${on(i.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${i.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${i.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function nFr(){return{localeError:h5d()}}var h5d,Vbo=h(()=>{"use strict";Ga();h5d=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(i){return e[i]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},n={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${i.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return i.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${ci(i.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${i.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${on(i.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function _qc(){return nFr()}var Uqc=h(()=>{"use strict";Vbo()});function Vqc(){return{localeError:g5d()}}var g5d,Gqc=h(()=>{"use strict";Ga();g5d=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${ci(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${on(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(i.origin),c=a?.unit??"\uC694\uC18C";return a?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${c} ${o}${s}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${o}${s}`}case"too_small":{let o=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(i.origin),c=a?.unit??"\uC694\uC18C";return a?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${c} ${o}${s}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??i.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${i.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${on(i.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${i.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${i.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function qqc(e){let t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}function Wqc(){return{localeError:A5d()}}var o3t,A5d,Hqc=h(()=>{"use strict";Ga();o3t=e=>e.charAt(0).toUpperCase()+e.slice(1);A5d=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(i,o,s,a){let c=e[i]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[a][s?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},n={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${i.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return i.values.length===1?`Privalo b\u016Bti ${ci(i.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${on(i.values,"|")} pasirinkim\u0173`;case"too_big":{let o=n[i.origin]??i.origin,s=t(i.origin,qqc(Number(i.maximum)),i.inclusive??!1,"smaller");if(s?.verb)return`${o3t(o??i.origin??"reik\u0161m\u0117")} ${s.verb} ${i.maximum.toString()} ${s.unit??"element\u0173"}`;let a=i.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${o3t(o??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${i.maximum.toString()} ${s?.unit}`}case"too_small":{let o=n[i.origin]??i.origin,s=t(i.origin,qqc(Number(i.minimum)),i.inclusive??!1,"bigger");if(s?.verb)return`${o3t(o??i.origin??"reik\u0161m\u0117")} ${s.verb} ${i.minimum.toString()} ${s.unit??"element\u0173"}`;let a=i.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${o3t(o??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${i.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??i.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${on(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=n[i.origin]??i.origin;return`${o3t(o??i.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function Kqc(){return{localeError:y5d()}}var y5d,Jqc=h(()=>{"use strict";Ga();y5d=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(i){return e[i]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${ci(i.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${r[o.format]??i.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${on(i.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${i.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${i.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function Yqc(){return{localeError:b5d()}}var b5d,Xqc=h(()=>{"use strict";Ga();b5d=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(i){return e[i]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Input tidak sah: dijangka instanceof ${i.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${ci(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Terlalu besar: dijangka ${i.origin??"nilai"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Terlalu kecil: dijangka ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${on(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}}});function Zqc(){return{localeError:E5d()}}var E5d,$qc=h(()=>{"use strict";Ga();E5d=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(i){return e[i]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ongeldige invoer: verwacht instanceof ${i.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${ci(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin),a=i.origin==="date"?"laat":i.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} is`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin),a=i.origin==="date"?"vroeg":i.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} is`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${on(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}}});function eWc(){return{localeError:I5d()}}var I5d,tWc=h(()=>{"use strict";Ga();I5d=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(i){return e[i]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventet instanceof ${i.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${ci(i.values[0])}`:`Ugyldig valg: forventet en av ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${on(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}}});function rWc(){return{localeError:v5d()}}var v5d,nWc=h(()=>{"use strict";Ga();v5d=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(i){return e[i]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`F\xE2sit giren: umulan instanceof ${i.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${ci(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=i;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??i.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${i.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${i.keys.length>1?"s":""}: ${on(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${i.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function iWc(){return{localeError:C5d()}}var C5d,oWc=h(()=>{"use strict";Ga();C5d=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(i){return e[i]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return i.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${ci(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${on(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??i.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${i.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${i.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${on(i.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${i.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${i.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function sWc(){return{localeError:x5d()}}var x5d,aWc=h(()=>{"use strict";Ga();x5d=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(i){return e[i]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},n={nan:"NaN",number:"liczba",array:"tablica"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${i.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${ci(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??i.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${on(i.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${i.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${i.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function cWc(){return{localeError:S5d()}}var S5d,lWc=h(()=>{"use strict";Ga();S5d=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(i){return e[i]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",number:"n\xFAmero",null:"nulo"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Tipo inv\xE1lido: esperado instanceof ${i.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: esperado ${ci(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${o}${i.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Muito pequeno: esperado que ${i.origin} tivesse ${o}${i.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${r[o.format]??i.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${on(i.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${i.origin}`;default:return"Campo inv\xE1lido"}}}});function uWc(e,t,r,n){let i=Math.abs(e),o=i%10,s=i%100;return s>=11&&s<=19?n:o===1?t:o>=2&&o<=4?r:n}function pWc(){return{localeError:w5d()}}var w5d,fWc=h(()=>{"use strict";Ga();w5d=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(i){return e[i]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${ci(i.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);if(s){let a=Number(i.maximum),c=uWc(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);if(s){let a=Number(i.minimum),c=uWc(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${i.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0438":""}: ${on(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function dWc(){return{localeError:T5d()}}var T5d,mWc=h(()=>{"use strict";Ga();T5d=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(i){return e[i]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${i.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${ci(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${o}${i.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${o}${i.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??i.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${on(i.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}}});function hWc(){return{localeError:O5d()}}var O5d,gWc=h(()=>{"use strict";Ga();O5d=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(i){return e[i]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${i.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${ci(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${on(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${i.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function AWc(){return{localeError:P5d()}}var P5d,yWc=h(()=>{"use strict";Ga();P5d=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(i){return e[i]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${i.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return i.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${ci(i.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${on(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${o}${i.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${o}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${i.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${i.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${on(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function bWc(){return{localeError:B5d()}}var B5d,EWc=h(()=>{"use strict";Ga();B5d=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(i){return e[i]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},n={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${i.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return i.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${ci(i.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(i.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(i.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??i.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${i.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${on(i.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function IWc(){return{localeError:D5d()}}var D5d,vWc=h(()=>{"use strict";Ga();D5d=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(i){return e[i]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${i.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return i.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${ci(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${o}${i.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??i.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${i.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${i.keys.length>1?"lar":""}: ${on(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${i.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function iFr(){return{localeError:R5d()}}var R5d,Gbo=h(()=>{"use strict";Ga();R5d=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(i){return e[i]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${i.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${ci(i.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} \u0431\u0443\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0456":""}: ${on(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${i.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function CWc(){return iFr()}var xWc=h(()=>{"use strict";Gbo()});function SWc(){return{localeError:k5d()}}var k5d,wWc=h(()=>{"use strict";Ga();k5d=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(i){return e[i]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${ci(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${on(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${o}${i.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u0627 ${o}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${i.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${i.keys.length>1?"\u0632":""}: ${on(i.keys,"\u060C ")}`;case"invalid_key":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function TWc(){return{localeError:F5d()}}var F5d,OWc=h(()=>{"use strict";Ga();F5d=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(i){return e[i]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${i.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return i.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${ci(i.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[o.format]??i.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${i.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${i.keys.length>1?"lar":""}: ${on(i.keys,", ")}`;case"invalid_key":return`${i.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${i.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function PWc(){return{localeError:N5d()}}var N5d,BWc=h(()=>{"use strict";Ga();N5d=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(i){return e[i]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${ci(i.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??i.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${i.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${on(i.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function DWc(){return{localeError:j5d()}}var j5d,RWc=h(()=>{"use strict";Ga();j5d=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(i){return e[i]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${ci(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??i.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${i.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${on(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${i.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function kWc(){return{localeError:z5d()}}var z5d,FWc=h(()=>{"use strict";Ga();z5d=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(i){return e[i]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${i.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${ci(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${i.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${i.keys.length>1?"\u5011":""}\uFF1A${on(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function NWc(){return{localeError:Q5d()}}var Q5d,jWc=h(()=>{"use strict";Ga();Q5d=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(i){return e[i]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ai(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${i.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return i.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${ci(i.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${on(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=t(i.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin??"iye"} ${s.verb} ${o}${i.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${i.maximum}`}case"too_small":{let o=i.inclusive?">=":">",s=t(i.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin} ${s.verb} ${o}${i.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${i.minimum}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??i.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${i.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${on(i.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var s3t={};ne(s3t,{ar:()=>J9c,az:()=>X9c,be:()=>eqc,bg:()=>rqc,ca:()=>iqc,cs:()=>sqc,da:()=>cqc,de:()=>uqc,en:()=>rFr,eo:()=>fqc,es:()=>mqc,fa:()=>gqc,fi:()=>yqc,fr:()=>Eqc,frCA:()=>vqc,he:()=>xqc,hu:()=>wqc,hy:()=>Pqc,id:()=>Dqc,is:()=>kqc,it:()=>Nqc,ja:()=>zqc,ka:()=>Mqc,kh:()=>_qc,km:()=>nFr,ko:()=>Vqc,lt:()=>Wqc,mk:()=>Kqc,ms:()=>Yqc,nl:()=>Zqc,no:()=>eWc,ota:()=>rWc,pl:()=>sWc,ps:()=>iWc,pt:()=>cWc,ru:()=>pWc,sl:()=>dWc,sv:()=>hWc,ta:()=>AWc,th:()=>bWc,tr:()=>IWc,ua:()=>CWc,uk:()=>iFr,ur:()=>SWc,uz:()=>TWc,vi:()=>PWc,yo:()=>NWc,zhCN:()=>DWc,zhTW:()=>kWc});var qbo=h(()=>{"use strict";Y9c();Z9c();tqc();nqc();oqc();aqc();lqc();pqc();Ubo();dqc();hqc();Aqc();bqc();Iqc();Cqc();Sqc();Tqc();Bqc();Rqc();Fqc();jqc();Qqc();Lqc();Uqc();Vbo();Gqc();Hqc();Jqc();Xqc();$qc();tWc();nWc();oWc();aWc();lWc();fWc();mWc();gWc();yWc();EWc();vWc();xWc();Gbo();wWc();OWc();BWc();RWc();FWc();jWc()});function sFr(){return new oFr}var zWc,Wbo,Hbo,oFr,VP,a3t=h(()=>{"use strict";Wbo=Symbol("ZodOutput"),Hbo=Symbol("ZodInput"),oFr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(zWc=globalThis).__zod_globalRegistry??(zWc.__zod_globalRegistry=sFr());VP=globalThis.__zod_globalRegistry});function Kbo(e,t){return new e({type:"string",...Bi(t)})}function Jbo(e,t){return new e({type:"string",coerce:!0,...Bi(t)})}function aFr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Bi(t)})}function c3t(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Bi(t)})}function cFr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Bi(t)})}function lFr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Bi(t)})}function uFr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Bi(t)})}function pFr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Bi(t)})}function l3t(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Bi(t)})}function fFr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Bi(t)})}function dFr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Bi(t)})}function mFr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Bi(t)})}function hFr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Bi(t)})}function gFr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Bi(t)})}function AFr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Bi(t)})}function yFr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Bi(t)})}function bFr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Bi(t)})}function EFr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Bi(t)})}function Ybo(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...Bi(t)})}function IFr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Bi(t)})}function vFr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Bi(t)})}function CFr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Bi(t)})}function xFr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Bi(t)})}function SFr(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Bi(t)})}function wFr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Bi(t)})}function Zbo(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Bi(t)})}function $bo(e,t){return new e({type:"string",format:"date",check:"string_format",...Bi(t)})}function eEo(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Bi(t)})}function tEo(e,t){return new e({type:"string",format:"duration",check:"string_format",...Bi(t)})}function rEo(e,t){return new e({type:"number",checks:[],...Bi(t)})}function nEo(e,t){return new e({type:"number",coerce:!0,checks:[],...Bi(t)})}function iEo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Bi(t)})}function oEo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Bi(t)})}function sEo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Bi(t)})}function aEo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Bi(t)})}function cEo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Bi(t)})}function lEo(e,t){return new e({type:"boolean",...Bi(t)})}function uEo(e,t){return new e({type:"boolean",coerce:!0,...Bi(t)})}function pEo(e,t){return new e({type:"bigint",...Bi(t)})}function fEo(e,t){return new e({type:"bigint",coerce:!0,...Bi(t)})}function dEo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Bi(t)})}function mEo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Bi(t)})}function hEo(e,t){return new e({type:"symbol",...Bi(t)})}function gEo(e,t){return new e({type:"undefined",...Bi(t)})}function AEo(e,t){return new e({type:"null",...Bi(t)})}function yEo(e){return new e({type:"any"})}function bEo(e){return new e({type:"unknown"})}function EEo(e,t){return new e({type:"never",...Bi(t)})}function IEo(e,t){return new e({type:"void",...Bi(t)})}function vEo(e,t){return new e({type:"date",...Bi(t)})}function CEo(e,t){return new e({type:"date",coerce:!0,...Bi(t)})}function xEo(e,t){return new e({type:"nan",...Bi(t)})}function Dee(e,t){return new Gkr({check:"less_than",...Bi(t),value:e,inclusive:!1})}function p3(e,t){return new Gkr({check:"less_than",...Bi(t),value:e,inclusive:!0})}function Ree(e,t){return new qkr({check:"greater_than",...Bi(t),value:e,inclusive:!1})}function KF(e,t){return new qkr({check:"greater_than",...Bi(t),value:e,inclusive:!0})}function TFr(e){return Ree(0,e)}function OFr(e){return Dee(0,e)}function PFr(e){return p3(0,e)}function BFr(e){return KF(0,e)}function Nve(e,t){return new uyo({check:"multiple_of",...Bi(t),value:e})}function jve(e,t){return new dyo({check:"max_size",...Bi(t),maximum:e})}function kee(e,t){return new myo({check:"min_size",...Bi(t),minimum:e})}function o3e(e,t){return new hyo({check:"size_equals",...Bi(t),size:e})}function s3e(e,t){return new gyo({check:"max_length",...Bi(t),maximum:e})}function Wfe(e,t){return new Ayo({check:"min_length",...Bi(t),minimum:e})}function a3e(e,t){return new yyo({check:"length_equals",...Bi(t),length:e})}function hrt(e,t){return new byo({check:"string_format",format:"regex",...Bi(t),pattern:e})}function grt(e){return new Eyo({check:"string_format",format:"lowercase",...Bi(e)})}function Art(e){return new Iyo({check:"string_format",format:"uppercase",...Bi(e)})}function yrt(e,t){return new vyo({check:"string_format",format:"includes",...Bi(t),includes:e})}function brt(e,t){return new Cyo({check:"string_format",format:"starts_with",...Bi(t),prefix:e})}function Ert(e,t){return new xyo({check:"string_format",format:"ends_with",...Bi(t),suffix:e})}function DFr(e,t,r){return new Syo({check:"property",property:e,schema:t,...Bi(r)})}function Irt(e,t){return new wyo({check:"mime_type",mime:e,...Bi(t)})}function LH(e){return new Tyo({check:"overwrite",tx:e})}function vrt(e){return LH(t=>t.normalize(e))}function Crt(){return LH(e=>e.trim())}function xrt(){return LH(e=>e.toLowerCase())}function Srt(){return LH(e=>e.toUpperCase())}function wrt(){return LH(e=>CAo(e))}function SEo(e,t,r){return new e({type:"array",element:t,...Bi(r)})}function L5d(e,t,r){return new e({type:"union",options:t,...Bi(r)})}function _5d(e,t,r){return new e({type:"union",options:t,inclusive:!1,...Bi(r)})}function U5d(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...Bi(n)})}function V5d(e,t,r){return new e({type:"intersection",left:t,right:r})}function G5d(e,t,r,n){let i=r instanceof Zl,o=i?n:r,s=i?r:null;return new e({type:"tuple",items:t,rest:s,...Bi(o)})}function q5d(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...Bi(n)})}function W5d(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...Bi(n)})}function H5d(e,t,r){return new e({type:"set",valueType:t,...Bi(r)})}function K5d(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:n,...Bi(r)})}function J5d(e,t,r){return new e({type:"enum",entries:t,...Bi(r)})}function Y5d(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Bi(r)})}function wEo(e,t){return new e({type:"file",...Bi(t)})}function X5d(e,t){return new e({type:"transform",transform:t})}function Z5d(e,t){return new e({type:"optional",innerType:t})}function $5d(e,t){return new e({type:"nullable",innerType:t})}function e8d(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():SAo(r)}})}function t8d(e,t,r){return new e({type:"nonoptional",innerType:t,...Bi(r)})}function r8d(e,t){return new e({type:"success",innerType:t})}function n8d(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function i8d(e,t,r){return new e({type:"pipe",in:t,out:r})}function o8d(e,t){return new e({type:"readonly",innerType:t})}function s8d(e,t,r){return new e({type:"template_literal",parts:t,...Bi(r)})}function a8d(e,t){return new e({type:"lazy",getter:t})}function c8d(e,t){return new e({type:"promise",innerType:t})}function TEo(e,t,r){let n=Bi(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function OEo(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Bi(r)})}function PEo(e){let t=QWc(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(crt(n,r.value,t._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),r.issues.push(crt(i))}},e(r.value,r)));return t}function QWc(e,t){let r=new GA({check:"custom",...Bi(t)});return r._zod.check=e,r}function BEo(e){let t=new GA({check:"describe"});return t._zod.onattach=[r=>{let n=VP.get(r)??{};VP.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function DEo(e){let t=new GA({check:"meta"});return t._zod.onattach=[r=>{let n=VP.get(r)??{};VP.add(r,{...n,...e})}],t._zod.check=()=>{},t}function REo(e,t){let r=Bi(t),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(f=>typeof f=="string"?f.toLowerCase():f),i=i.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(n),s=new Set(i),a=e.Codec??i3t,c=e.Boolean??r3t,l=e.String??i3e,u=new l({type:"string",error:r.error}),p=new c({type:"boolean",error:r.error}),d=new a({type:"pipe",in:u,out:p,transform:((f,m)=>{let g=f;return r.case!=="sensitive"&&(g=g.toLowerCase()),o.has(g)?!0:s.has(g)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:m.value,inst:d,continue:!1}),{})}),reverseTransform:((f,m)=>f===!0?n[0]||"true":i[0]||"false"),error:r.error});return d}function Trt(e,t,r,n={}){let i=Bi(n),o={...Bi(n),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...i};return r instanceof RegExp&&(o.pattern=r),new e(o)}var Xbo,MWc=h(()=>{"use strict";Wkr();a3t();_bo();Ga();Xbo={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function zve(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??VP,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Xh(e,t,r={path:[],schemaPath:[]}){var n;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let u={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,u);else{let d=s.schema,f=t.processors[i.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);f(e,t,d,u)}let p=e._zod.parent;p&&(s.ref||(s.ref=p),Xh(p,t,u),t.seen.get(p).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&JF(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Qve(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=n.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,s[0])}}let i=s=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(s[0])?.id,d=e.external.uri??(m=>m);if(p)return{ref:d(p)};let f=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=f,{defId:f,ref:`${d("__shared")}#/${a}/${f}`}}if(s[1]===r)return{ref:"#"};let l=`#/${a}/`,u=s[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:l+u}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:l}=i(s);a.def={...a.schema},l&&(a.defId=l);let u=a.schema;for(let p in u)delete u[p];u.$ref=c};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
252
252
|
|
|
253
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){o(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&e.reused==="ref"){o(s);continue}}}function Mve(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=s=>{let a=e.seen.get(s);if(a.ref===null)return;let c=a.def??a.schema,l={...c},u=a.ref;if(a.ref=null,u){n(u);let d=e.seen.get(u),f=d.schema;if(f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):Object.assign(c,f),Object.assign(c,l),s._zod.parent===u)for(let g in c)g==="$ref"||g==="allOf"||g in l||delete c[g];if(f.$ref&&d.def)for(let g in c)g==="$ref"||g==="allOf"||g in d.def&&JSON.stringify(c[g])===JSON.stringify(d.def[g])&&delete c[g]}let p=s._zod.parent;if(p&&p!==u){n(p);let d=e.seen.get(p);if(d?.schema.$ref&&(c.$ref=d.schema.$ref,d.def))for(let f in c)f==="$ref"||f==="allOf"||f in d.def&&JSON.stringify(c[f])===JSON.stringify(d.def[f])&&delete c[f]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(let s of[...e.seen.entries()].reverse())n(s[0]);let i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(s)}Object.assign(i,r.def??r.schema);let o=e.external?.defs??{};for(let s of e.seen.entries()){let a=s[1];a.def&&a.defId&&(o[a.defId]=a.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{let s=JSON.parse(JSON.stringify(i));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ort(t,"input",e.processors),output:Ort(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function JF(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return JF(n.element,r);if(n.type==="set")return JF(n.valueType,r);if(n.type==="lazy")return JF(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return JF(n.innerType,r);if(n.type==="intersection")return JF(n.left,r)||JF(n.right,r);if(n.type==="record"||n.type==="map")return JF(n.keyType,r)||JF(n.valueType,r);if(n.type==="pipe")return JF(n.in,r)||JF(n.out,r);if(n.type==="object"){for(let i in n.shape)if(JF(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(JF(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(JF(i,r))return!0;return!!(n.rest&&JF(n.rest,r))}return!1}var kEo,Ort,u3t=h(()=>{"use strict";a3t();kEo=(e,t={})=>r=>{let n=zve({...r,processors:t});return Xh(e,n),Qve(n,e),Mve(n,e)},Ort=(e,t,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},s=zve({...i??{},target:o,io:t,processors:r});return Xh(e,s),Qve(s,e),Mve(s,e)}});function NFr(e,t){if("_idmap"in e){let n=e,i=zve({...t,processors:RFr}),o={};for(let c of n._idmap.entries()){let[l,u]=c;Xh(u,i)}let s={},a={registry:n,uri:t?.uri,defs:o};i.external=a;for(let c of n._idmap.entries()){let[l,u]=c;Qve(i,u),s[l]=Mve(i,u)}if(Object.keys(o).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:o}}return{schemas:s}}let r=zve({...t,processors:RFr});return Xh(e,r),Qve(r,e),Mve(r,e)}var l8d,FEo,NEo,jEo,zEo,QEo,MEo,LEo,_Eo,UEo,VEo,GEo,qEo,WEo,HEo,KEo,JEo,YEo,XEo,ZEo,$Eo,e0o,t0o,r0o,n0o,i0o,kFr,o0o,s0o,a0o,c0o,l0o,u0o,p0o,f0o,d0o,m0o,h0o,FFr,g0o,RFr,p3t=h(()=>{"use strict";u3t();Ga();l8d={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},FEo=(e,t,r,n)=>{let i=r;i.type="string";let{minimum:o,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof s=="number"&&(i.maxLength=s),a&&(i.format=l8d[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let u=[...c];u.length===1?i.pattern=u[0].source:u.length>1&&(i.allOf=[...u.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},NEo=(e,t,r,n)=>{let i=r,{minimum:o,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number",typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof o=="number"&&(i.minimum=o,typeof u=="number"&&t.target!=="draft-04"&&(u>=o?delete i.minimum:delete i.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof s=="number"&&(i.maximum=s,typeof l=="number"&&t.target!=="draft-04"&&(l<=s?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},jEo=(e,t,r,n)=>{r.type="boolean"},zEo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},QEo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},MEo=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},LEo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},_Eo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},UEo=(e,t,r,n)=>{r.not={}},VEo=(e,t,r,n)=>{},GEo=(e,t,r,n)=>{},qEo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},WEo=(e,t,r,n)=>{let i=e._zod.def,o=q6t(i.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},HEo=(e,t,r,n)=>{let i=e._zod.def,o=[];for(let s of i.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o},KEo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},JEo=(e,t,r,n)=>{let i=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},YEo=(e,t,r,n)=>{let i=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=e._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),c?c.length===1?(o.contentMediaType=c[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(i,o)},XEo=(e,t,r,n)=>{r.type="boolean"},ZEo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},$Eo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},e0o=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},t0o=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},r0o=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},n0o=(e,t,r,n)=>{let i=r,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(i.minItems=s),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=Xh(o.element,t,{...n,path:[...n.path,"items"]})},i0o=(e,t,r,n)=>{let i=r,o=e._zod.def;i.type="object",i.properties={};let s=o.shape;for(let l in s)i.properties[l]=Xh(s[l],t,{...n,path:[...n.path,"properties",l]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{let u=o.shape[l]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));c.size>0&&(i.required=Array.from(c)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=Xh(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},kFr=(e,t,r,n)=>{let i=e._zod.def,o=i.inclusive===!1,s=i.options.map((a,c)=>Xh(a,t,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s},o0o=(e,t,r,n)=>{let i=e._zod.def,o=Xh(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=Xh(i.right,t,{...n,path:[...n.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=c},s0o=(e,t,r,n)=>{let i=r,o=e._zod.def;i.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((d,f)=>Xh(d,t,{...n,path:[...n.path,s,f]})),l=o.rest?Xh(o.rest,t,{...n,path:[...n.path,a,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=c,l&&(i.items=l)):t.target==="openapi-3.0"?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:p}=e._zod.bag;typeof u=="number"&&(i.minItems=u),typeof p=="number"&&(i.maxItems=p)},a0o=(e,t,r,n)=>{let i=r,o=e._zod.def;i.type="object";let s=o.keyType,c=s._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let u=Xh(o.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let p of c)i.patternProperties[p.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=Xh(o.keyType,t,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=Xh(o.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let l=s._zod.values;if(l){let u=[...l].filter(p=>typeof p=="string"||typeof p=="number");u.length>0&&(i.required=u)}},c0o=(e,t,r,n)=>{let i=e._zod.def,o=Xh(i.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},l0o=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},u0o=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},p0o=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},f0o=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},d0o=(e,t,r,n)=>{let i=e._zod.def,o=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Xh(o,t,n);let s=t.seen.get(e);s.ref=o},m0o=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.readOnly=!0},h0o=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},FFr=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},g0o=(e,t,r,n)=>{let i=e._zod.innerType;Xh(i,t,n);let o=t.seen.get(e);o.ref=i},RFr={string:FEo,number:NEo,boolean:jEo,bigint:zEo,symbol:QEo,null:MEo,undefined:LEo,void:_Eo,never:UEo,any:VEo,unknown:GEo,date:qEo,enum:WEo,literal:HEo,nan:KEo,template_literal:JEo,file:YEo,success:XEo,custom:ZEo,function:$Eo,transform:e0o,map:t0o,set:r0o,array:n0o,object:i0o,union:kFr,intersection:o0o,tuple:s0o,record:a0o,nullable:c0o,nonoptional:l0o,default:u0o,prefault:p0o,catch:f0o,pipe:d0o,readonly:m0o,promise:h0o,optional:FFr,lazy:g0o}});var jFr,LWc=h(()=>{"use strict";p3t();u3t();jFr=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=zve({processors:RFr,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return Xh(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),Qve(this.ctx,t);let n=Mve(this.ctx,t),{"~standard":i,...o}=n;return o}}});var _Wc={};var UWc=h(()=>{"use strict"});var Hfe={};ne(Hfe,{$ZodAny:()=>lbo,$ZodArray:()=>mbo,$ZodAsyncError:()=>MH,$ZodBase64:()=>$yo,$ZodBase64URL:()=>ebo,$ZodBigInt:()=>$kr,$ZodBigIntFormat:()=>obo,$ZodBoolean:()=>r3t,$ZodCIDRv4:()=>Yyo,$ZodCIDRv6:()=>Xyo,$ZodCUID:()=>Qyo,$ZodCUID2:()=>Myo,$ZodCatch:()=>Rbo,$ZodCheck:()=>GA,$ZodCheckBigIntFormat:()=>fyo,$ZodCheckEndsWith:()=>xyo,$ZodCheckGreaterThan:()=>qkr,$ZodCheckIncludes:()=>vyo,$ZodCheckLengthEquals:()=>yyo,$ZodCheckLessThan:()=>Gkr,$ZodCheckLowerCase:()=>Eyo,$ZodCheckMaxLength:()=>gyo,$ZodCheckMaxSize:()=>dyo,$ZodCheckMimeType:()=>wyo,$ZodCheckMinLength:()=>Ayo,$ZodCheckMinSize:()=>myo,$ZodCheckMultipleOf:()=>uyo,$ZodCheckNumberFormat:()=>pyo,$ZodCheckOverwrite:()=>Tyo,$ZodCheckProperty:()=>Syo,$ZodCheckRegex:()=>byo,$ZodCheckSizeEquals:()=>hyo,$ZodCheckStartsWith:()=>Cyo,$ZodCheckStringFormat:()=>drt,$ZodCheckUpperCase:()=>Iyo,$ZodCodec:()=>i3t,$ZodCustom:()=>Lbo,$ZodCustomStringFormat:()=>nbo,$ZodDate:()=>dbo,$ZodDefault:()=>Obo,$ZodDiscriminatedUnion:()=>Abo,$ZodE164:()=>tbo,$ZodEmail:()=>Fyo,$ZodEmoji:()=>jyo,$ZodEncodeError:()=>Bve,$ZodEnum:()=>vbo,$ZodError:()=>Y6t,$ZodExactOptional:()=>wbo,$ZodFile:()=>xbo,$ZodFunction:()=>zbo,$ZodGUID:()=>Ryo,$ZodIPv4:()=>Hyo,$ZodIPv6:()=>Kyo,$ZodISODate:()=>Gyo,$ZodISODateTime:()=>Vyo,$ZodISODuration:()=>Wyo,$ZodISOTime:()=>qyo,$ZodIntersection:()=>ybo,$ZodJWT:()=>rbo,$ZodKSUID:()=>Uyo,$ZodLazy:()=>Mbo,$ZodLiteral:()=>Cbo,$ZodMAC:()=>Jyo,$ZodMap:()=>Ebo,$ZodNaN:()=>kbo,$ZodNanoID:()=>zyo,$ZodNever:()=>pbo,$ZodNonOptional:()=>Bbo,$ZodNull:()=>cbo,$ZodNullable:()=>Tbo,$ZodNumber:()=>Zkr,$ZodNumberFormat:()=>ibo,$ZodObject:()=>K9c,$ZodObjectJIT:()=>hbo,$ZodOptional:()=>tFr,$ZodPipe:()=>Fbo,$ZodPrefault:()=>Pbo,$ZodPromise:()=>Qbo,$ZodReadonly:()=>Nbo,$ZodRealError:()=>Hz,$ZodRecord:()=>bbo,$ZodRegistry:()=>oFr,$ZodSet:()=>Ibo,$ZodString:()=>i3e,$ZodStringFormat:()=>AA,$ZodSuccess:()=>Dbo,$ZodSymbol:()=>sbo,$ZodTemplateLiteral:()=>jbo,$ZodTransform:()=>Sbo,$ZodTuple:()=>eFr,$ZodType:()=>Zl,$ZodULID:()=>Lyo,$ZodURL:()=>Nyo,$ZodUUID:()=>kyo,$ZodUndefined:()=>abo,$ZodUnion:()=>n3t,$ZodUnknown:()=>ubo,$ZodVoid:()=>fbo,$ZodXID:()=>_yo,$ZodXor:()=>gbo,$brand:()=>Okr,$constructor:()=>wr,$input:()=>Hbo,$output:()=>Wbo,Doc:()=>t3t,JSONSchema:()=>_Wc,JSONSchemaGenerator:()=>jFr,NEVER:()=>bAo,TimePrecision:()=>Xbo,_any:()=>yEo,_array:()=>SEo,_base64:()=>CFr,_base64url:()=>xFr,_bigint:()=>pEo,_boolean:()=>lEo,_catch:()=>n8d,_check:()=>QWc,_cidrv4:()=>IFr,_cidrv6:()=>vFr,_coercedBigint:()=>fEo,_coercedBoolean:()=>uEo,_coercedDate:()=>CEo,_coercedNumber:()=>nEo,_coercedString:()=>Jbo,_cuid:()=>mFr,_cuid2:()=>hFr,_custom:()=>TEo,_date:()=>vEo,_decode:()=>Fkr,_decodeAsync:()=>jkr,_default:()=>e8d,_discriminatedUnion:()=>U5d,_e164:()=>SFr,_email:()=>aFr,_emoji:()=>fFr,_encode:()=>kkr,_encodeAsync:()=>Nkr,_endsWith:()=>Ert,_enum:()=>K5d,_file:()=>wEo,_float32:()=>oEo,_float64:()=>sEo,_gt:()=>Ree,_gte:()=>KF,_guid:()=>c3t,_includes:()=>yrt,_int:()=>iEo,_int32:()=>aEo,_int64:()=>dEo,_intersection:()=>V5d,_ipv4:()=>bFr,_ipv6:()=>EFr,_isoDate:()=>$bo,_isoDateTime:()=>Zbo,_isoDuration:()=>tEo,_isoTime:()=>eEo,_jwt:()=>wFr,_ksuid:()=>yFr,_lazy:()=>a8d,_length:()=>a3e,_literal:()=>Y5d,_lowercase:()=>grt,_lt:()=>Dee,_lte:()=>p3,_mac:()=>Ybo,_map:()=>W5d,_max:()=>p3,_maxLength:()=>s3e,_maxSize:()=>jve,_mime:()=>Irt,_min:()=>KF,_minLength:()=>Wfe,_minSize:()=>kee,_multipleOf:()=>Nve,_nan:()=>xEo,_nanoid:()=>dFr,_nativeEnum:()=>J5d,_negative:()=>OFr,_never:()=>EEo,_nonnegative:()=>BFr,_nonoptional:()=>t8d,_nonpositive:()=>PFr,_normalize:()=>vrt,_null:()=>AEo,_nullable:()=>$5d,_number:()=>rEo,_optional:()=>Z5d,_overwrite:()=>LH,_parse:()=>lrt,_parseAsync:()=>urt,_pipe:()=>i8d,_positive:()=>TFr,_promise:()=>c8d,_property:()=>DFr,_readonly:()=>o8d,_record:()=>q5d,_refine:()=>OEo,_regex:()=>hrt,_safeDecode:()=>Qkr,_safeDecodeAsync:()=>Lkr,_safeEncode:()=>zkr,_safeEncodeAsync:()=>Mkr,_safeParse:()=>prt,_safeParseAsync:()=>frt,_set:()=>H5d,_size:()=>o3e,_slugify:()=>wrt,_startsWith:()=>brt,_string:()=>Kbo,_stringFormat:()=>Trt,_stringbool:()=>REo,_success:()=>r8d,_superRefine:()=>PEo,_symbol:()=>hEo,_templateLiteral:()=>s8d,_toLowerCase:()=>xrt,_toUpperCase:()=>Srt,_transform:()=>X5d,_trim:()=>Crt,_tuple:()=>G5d,_uint32:()=>cEo,_uint64:()=>mEo,_ulid:()=>gFr,_undefined:()=>gEo,_union:()=>L5d,_unknown:()=>bEo,_uppercase:()=>Art,_url:()=>l3t,_uuid:()=>cFr,_uuidv4:()=>lFr,_uuidv6:()=>uFr,_uuidv7:()=>pFr,_void:()=>IEo,_xid:()=>AFr,_xor:()=>_5d,clone:()=>HF,config:()=>XI,createStandardJSONSchemaMethod:()=>Ort,createToJSONSchemaMethod:()=>kEo,decode:()=>pVd,decodeAsync:()=>dVd,describe:()=>BEo,encode:()=>uVd,encodeAsync:()=>fVd,extractDefs:()=>Qve,finalize:()=>Mve,flattenError:()=>X6t,formatError:()=>Z6t,globalConfig:()=>V6t,globalRegistry:()=>VP,initializeContext:()=>zve,isValidBase64:()=>Zyo,isValidBase64URL:()=>G9c,isValidJWT:()=>q9c,locales:()=>s3t,meta:()=>DEo,parse:()=>Dkr,parseAsync:()=>Rkr,prettifyError:()=>DAo,process:()=>Xh,regexes:()=>e5,registry:()=>sFr,safeDecode:()=>hVd,safeDecodeAsync:()=>AVd,safeEncode:()=>mVd,safeEncodeAsync:()=>gVd,safeParse:()=>kAo,safeParseAsync:()=>FAo,toDotPath:()=>w9c,toJSONSchema:()=>NFr,treeifyError:()=>BAo,util:()=>vi,version:()=>Pyo});var Kz=h(()=>{"use strict";ort();NAo();RAo();_bo();Wkr();Byo();Ga();Vkr();qbo();a3t();Oyo();MWc();u3t();p3t();LWc();UWc()});var zFr={};ne(zFr,{endsWith:()=>Ert,gt:()=>Ree,gte:()=>KF,includes:()=>yrt,length:()=>a3e,lowercase:()=>grt,lt:()=>Dee,lte:()=>p3,maxLength:()=>s3e,maxSize:()=>jve,mime:()=>Irt,minLength:()=>Wfe,minSize:()=>kee,multipleOf:()=>Nve,negative:()=>OFr,nonnegative:()=>BFr,nonpositive:()=>PFr,normalize:()=>vrt,overwrite:()=>LH,positive:()=>TFr,property:()=>DFr,regex:()=>hrt,size:()=>o3e,slugify:()=>wrt,startsWith:()=>brt,toLowerCase:()=>xrt,toUpperCase:()=>Srt,trim:()=>Crt,uppercase:()=>Art});var QFr=h(()=>{"use strict";Kz()});var Prt={};ne(Prt,{ZodISODate:()=>LFr,ZodISODateTime:()=>MFr,ZodISODuration:()=>UFr,ZodISOTime:()=>_Fr,date:()=>y0o,datetime:()=>A0o,duration:()=>E0o,time:()=>b0o});function A0o(e){return Zbo(MFr,e)}function y0o(e){return $bo(LFr,e)}function b0o(e){return eEo(_Fr,e)}function E0o(e){return tEo(UFr,e)}var MFr,LFr,_Fr,UFr,f3t=h(()=>{"use strict";Kz();m3t();MFr=wr("ZodISODateTime",(e,t)=>{Vyo.init(e,t),yA.init(e,t)});LFr=wr("ZodISODate",(e,t)=>{Gyo.init(e,t),yA.init(e,t)});_Fr=wr("ZodISOTime",(e,t)=>{qyo.init(e,t),yA.init(e,t)});UFr=wr("ZodISODuration",(e,t)=>{Wyo.init(e,t),yA.init(e,t)})});var VWc,p8d,Jz,I0o=h(()=>{"use strict";Kz();Kz();Ga();VWc=(e,t)=>{Y6t.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Z6t(e,r)},flatten:{value:r=>X6t(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,srt,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,srt,2)}},isEmpty:{get(){return e.issues.length===0}}})},p8d=wr("ZodError",VWc),Jz=wr("ZodError",VWc,{Parent:Error})});var v0o,C0o,x0o,S0o,w0o,T0o,O0o,P0o,B0o,D0o,R0o,k0o,F0o=h(()=>{"use strict";Kz();I0o();v0o=lrt(Jz),C0o=urt(Jz),x0o=prt(Jz),S0o=frt(Jz),w0o=kkr(Jz),T0o=Fkr(Jz),O0o=Nkr(Jz),P0o=jkr(Jz),B0o=zkr(Jz),D0o=Qkr(Jz),R0o=Mkr(Jz),k0o=Lkr(Jz)});var d3t={};ne(d3t,{ZodAny:()=>U0o,ZodArray:()=>W0o,ZodBase64:()=>i2r,ZodBase64URL:()=>o2r,ZodBigInt:()=>Nrt,ZodBigIntFormat:()=>c2r,ZodBoolean:()=>Frt,ZodCIDRv4:()=>r2r,ZodCIDRv6:()=>n2r,ZodCUID:()=>JFr,ZodCUID2:()=>YFr,ZodCatch:()=>mIo,ZodCodec:()=>g2r,ZodCustom:()=>S3t,ZodCustomStringFormat:()=>Rrt,ZodDate:()=>E3t,ZodDefault:()=>cIo,ZodDiscriminatedUnion:()=>K0o,ZodE164:()=>s2r,ZodEmail:()=>WFr,ZodEmoji:()=>HFr,ZodEnum:()=>Brt,ZodExactOptional:()=>oIo,ZodFile:()=>nIo,ZodFunction:()=>CIo,ZodGUID:()=>h3t,ZodIPv4:()=>e2r,ZodIPv6:()=>t2r,ZodIntersection:()=>J0o,ZodJWT:()=>a2r,ZodKSUID:()=>$Fr,ZodLazy:()=>EIo,ZodLiteral:()=>rIo,ZodMAC:()=>N0o,ZodMap:()=>eIo,ZodNaN:()=>gIo,ZodNanoID:()=>KFr,ZodNever:()=>G0o,ZodNonOptional:()=>m2r,ZodNull:()=>L0o,ZodNullable:()=>aIo,ZodNumber:()=>krt,ZodNumberFormat:()=>l3e,ZodObject:()=>v3t,ZodOptional:()=>d2r,ZodPipe:()=>h2r,ZodPrefault:()=>uIo,ZodPromise:()=>vIo,ZodReadonly:()=>AIo,ZodRecord:()=>x3t,ZodSet:()=>tIo,ZodString:()=>Drt,ZodStringFormat:()=>yA,ZodSuccess:()=>dIo,ZodSymbol:()=>Q0o,ZodTemplateLiteral:()=>bIo,ZodTransform:()=>iIo,ZodTuple:()=>X0o,ZodType:()=>mp,ZodULID:()=>XFr,ZodURL:()=>b3t,ZodUUID:()=>Fee,ZodUndefined:()=>M0o,ZodUnion:()=>C3t,ZodUnknown:()=>V0o,ZodVoid:()=>q0o,ZodXID:()=>ZFr,ZodXor:()=>H0o,_ZodString:()=>qFr,_default:()=>lIo,_function:()=>J7c,any:()=>T7c,array:()=>I3t,base64:()=>u7c,base64url:()=>p7c,bigint:()=>v7c,boolean:()=>z0o,catch:()=>hIo,check:()=>Y7c,cidrv4:()=>c7c,cidrv6:()=>l7c,codec:()=>W7c,cuid:()=>e7c,cuid2:()=>t7c,custom:()=>X7c,date:()=>P7c,describe:()=>Z7c,discriminatedUnion:()=>N7c,e164:()=>f7c,email:()=>GWc,emoji:()=>ZWc,enum:()=>p2r,exactOptional:()=>sIo,file:()=>U7c,float32:()=>y7c,float64:()=>b7c,function:()=>J7c,guid:()=>qWc,hash:()=>A7c,hex:()=>g7c,hostname:()=>h7c,httpUrl:()=>XWc,instanceof:()=>eHc,int:()=>GFr,int32:()=>E7c,int64:()=>C7c,intersection:()=>Y0o,ipv4:()=>o7c,ipv6:()=>a7c,json:()=>rHc,jwt:()=>d7c,keyof:()=>B7c,ksuid:()=>i7c,lazy:()=>IIo,literal:()=>_7c,looseObject:()=>k7c,looseRecord:()=>z7c,mac:()=>s7c,map:()=>Q7c,meta:()=>$7c,nan:()=>q7c,nanoid:()=>$Wc,nativeEnum:()=>L7c,never:()=>l2r,nonoptional:()=>fIo,null:()=>_0o,nullable:()=>A3t,nullish:()=>V7c,number:()=>j0o,object:()=>D7c,optional:()=>g3t,partialRecord:()=>j7c,pipe:()=>y3t,prefault:()=>pIo,preprocess:()=>nHc,promise:()=>K7c,readonly:()=>yIo,record:()=>$0o,refine:()=>xIo,set:()=>M7c,strictObject:()=>R7c,string:()=>VFr,stringFormat:()=>m7c,stringbool:()=>tHc,success:()=>G7c,superRefine:()=>SIo,symbol:()=>S7c,templateLiteral:()=>H7c,transform:()=>f2r,tuple:()=>Z0o,uint32:()=>I7c,uint64:()=>x7c,ulid:()=>r7c,undefined:()=>w7c,union:()=>u2r,unknown:()=>c3e,url:()=>YWc,uuid:()=>WWc,uuidv4:()=>HWc,uuidv6:()=>KWc,uuidv7:()=>JWc,void:()=>O7c,xid:()=>n7c,xor:()=>F7c});function VFr(e){return Kbo(Drt,e)}function GWc(e){return aFr(WFr,e)}function qWc(e){return c3t(h3t,e)}function WWc(e){return cFr(Fee,e)}function HWc(e){return lFr(Fee,e)}function KWc(e){return uFr(Fee,e)}function JWc(e){return pFr(Fee,e)}function YWc(e){return l3t(b3t,e)}function XWc(e){return l3t(b3t,{protocol:/^https?$/,hostname:e5.domain,...vi.normalizeParams(e)})}function ZWc(e){return fFr(HFr,e)}function $Wc(e){return dFr(KFr,e)}function e7c(e){return mFr(JFr,e)}function t7c(e){return hFr(YFr,e)}function r7c(e){return gFr(XFr,e)}function n7c(e){return AFr(ZFr,e)}function i7c(e){return yFr($Fr,e)}function o7c(e){return bFr(e2r,e)}function s7c(e){return Ybo(N0o,e)}function a7c(e){return EFr(t2r,e)}function c7c(e){return IFr(r2r,e)}function l7c(e){return vFr(n2r,e)}function u7c(e){return CFr(i2r,e)}function p7c(e){return xFr(o2r,e)}function f7c(e){return SFr(s2r,e)}function d7c(e){return wFr(a2r,e)}function m7c(e,t,r={}){return Trt(Rrt,e,t,r)}function h7c(e){return Trt(Rrt,"hostname",e5.hostname,e)}function g7c(e){return Trt(Rrt,"hex",e5.hex,e)}function A7c(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,i=e5[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Trt(Rrt,n,i,t)}function j0o(e){return rEo(krt,e)}function GFr(e){return iEo(l3e,e)}function y7c(e){return oEo(l3e,e)}function b7c(e){return sEo(l3e,e)}function E7c(e){return aEo(l3e,e)}function I7c(e){return cEo(l3e,e)}function z0o(e){return lEo(Frt,e)}function v7c(e){return pEo(Nrt,e)}function C7c(e){return dEo(c2r,e)}function x7c(e){return mEo(c2r,e)}function S7c(e){return hEo(Q0o,e)}function w7c(e){return gEo(M0o,e)}function _0o(e){return AEo(L0o,e)}function T7c(){return yEo(U0o)}function c3e(){return bEo(V0o)}function l2r(e){return EEo(G0o,e)}function O7c(e){return IEo(q0o,e)}function P7c(e){return vEo(E3t,e)}function I3t(e,t){return SEo(W0o,e,t)}function B7c(e){let t=e._zod.def.shape;return p2r(Object.keys(t))}function D7c(e,t){let r={type:"object",shape:e??{},...vi.normalizeParams(t)};return new v3t(r)}function R7c(e,t){return new v3t({type:"object",shape:e,catchall:l2r(),...vi.normalizeParams(t)})}function k7c(e,t){return new v3t({type:"object",shape:e,catchall:c3e(),...vi.normalizeParams(t)})}function u2r(e,t){return new C3t({type:"union",options:e,...vi.normalizeParams(t)})}function F7c(e,t){return new H0o({type:"union",options:e,inclusive:!1,...vi.normalizeParams(t)})}function N7c(e,t,r){return new K0o({type:"union",options:t,discriminator:e,...vi.normalizeParams(r)})}function Y0o(e,t){return new J0o({type:"intersection",left:e,right:t})}function Z0o(e,t,r){let n=t instanceof Zl,i=n?r:t,o=n?t:null;return new X0o({type:"tuple",items:e,rest:o,...vi.normalizeParams(i)})}function $0o(e,t,r){return new x3t({type:"record",keyType:e,valueType:t,...vi.normalizeParams(r)})}function j7c(e,t,r){let n=HF(e);return n._zod.values=void 0,new x3t({type:"record",keyType:n,valueType:t,...vi.normalizeParams(r)})}function z7c(e,t,r){return new x3t({type:"record",keyType:e,valueType:t,mode:"loose",...vi.normalizeParams(r)})}function Q7c(e,t,r){return new eIo({type:"map",keyType:e,valueType:t,...vi.normalizeParams(r)})}function M7c(e,t){return new tIo({type:"set",valueType:e,...vi.normalizeParams(t)})}function p2r(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Brt({type:"enum",entries:r,...vi.normalizeParams(t)})}function L7c(e,t){return new Brt({type:"enum",entries:e,...vi.normalizeParams(t)})}function _7c(e,t){return new rIo({type:"literal",values:Array.isArray(e)?e:[e],...vi.normalizeParams(t)})}function U7c(e){return wEo(nIo,e)}function f2r(e){return new iIo({type:"transform",transform:e})}function g3t(e){return new d2r({type:"optional",innerType:e})}function sIo(e){return new oIo({type:"optional",innerType:e})}function A3t(e){return new aIo({type:"nullable",innerType:e})}function V7c(e){return g3t(A3t(e))}function lIo(e,t){return new cIo({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():vi.shallowClone(t)}})}function pIo(e,t){return new uIo({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():vi.shallowClone(t)}})}function fIo(e,t){return new m2r({type:"nonoptional",innerType:e,...vi.normalizeParams(t)})}function G7c(e){return new dIo({type:"success",innerType:e})}function hIo(e,t){return new mIo({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function q7c(e){return xEo(gIo,e)}function y3t(e,t){return new h2r({type:"pipe",in:e,out:t})}function W7c(e,t,r){return new g2r({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function yIo(e){return new AIo({type:"readonly",innerType:e})}function H7c(e,t){return new bIo({type:"template_literal",parts:e,...vi.normalizeParams(t)})}function IIo(e){return new EIo({type:"lazy",getter:e})}function K7c(e){return new vIo({type:"promise",innerType:e})}function J7c(e){return new CIo({type:"function",input:Array.isArray(e?.input)?Z0o(e?.input):e?.input??I3t(c3e()),output:e?.output??c3e()})}function Y7c(e){let t=new GA({check:"custom"});return t._zod.check=e,t}function X7c(e,t){return TEo(S3t,e??(()=>!0),t)}function xIo(e,t={}){return OEo(S3t,e,t)}function SIo(e){return PEo(e)}function eHc(e,t={}){let r=new S3t({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...vi.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}function rHc(e){let t=IIo(()=>u2r([VFr(e),j0o(),z0o(),_0o(),I3t(t),$0o(VFr(),t)]));return t}function nHc(e,t){return y3t(f2r(e),t)}var mp,qFr,Drt,yA,WFr,h3t,Fee,b3t,HFr,KFr,JFr,YFr,XFr,ZFr,$Fr,e2r,N0o,t2r,r2r,n2r,i2r,o2r,s2r,a2r,Rrt,krt,l3e,Frt,Nrt,c2r,Q0o,M0o,L0o,U0o,V0o,G0o,q0o,E3t,W0o,v3t,C3t,H0o,K0o,J0o,X0o,x3t,eIo,tIo,Brt,rIo,nIo,iIo,d2r,oIo,aIo,cIo,uIo,m2r,dIo,mIo,gIo,h2r,g2r,AIo,bIo,EIo,vIo,CIo,S3t,Z7c,$7c,tHc,m3t=h(()=>{"use strict";Kz();Kz();p3t();u3t();QFr();f3t();F0o();mp=wr("ZodType",(e,t)=>(Zl.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ort(e,"input"),output:Ort(e,"output")}}),e.toJSONSchema=kEo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(vi.mergeDefs(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>HF(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>v0o(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>x0o(e,r,n),e.parseAsync=async(r,n)=>C0o(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>S0o(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>w0o(e,r,n),e.decode=(r,n)=>T0o(e,r,n),e.encodeAsync=async(r,n)=>O0o(e,r,n),e.decodeAsync=async(r,n)=>P0o(e,r,n),e.safeEncode=(r,n)=>B0o(e,r,n),e.safeDecode=(r,n)=>D0o(e,r,n),e.safeEncodeAsync=async(r,n)=>R0o(e,r,n),e.safeDecodeAsync=async(r,n)=>k0o(e,r,n),e.refine=(r,n)=>e.check(xIo(r,n)),e.superRefine=r=>e.check(SIo(r)),e.overwrite=r=>e.check(LH(r)),e.optional=()=>g3t(e),e.exactOptional=()=>sIo(e),e.nullable=()=>A3t(e),e.nullish=()=>g3t(A3t(e)),e.nonoptional=r=>fIo(e,r),e.array=()=>I3t(e),e.or=r=>u2r([e,r]),e.and=r=>Y0o(e,r),e.transform=r=>y3t(e,f2r(r)),e.default=r=>lIo(e,r),e.prefault=r=>pIo(e,r),e.catch=r=>hIo(e,r),e.pipe=r=>y3t(e,r),e.readonly=()=>yIo(e),e.describe=r=>{let n=e.clone();return VP.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return VP.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return VP.get(e);let n=e.clone();return VP.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),qFr=wr("_ZodString",(e,t)=>{i3e.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>FEo(e,n,i,o);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(hrt(...n)),e.includes=(...n)=>e.check(yrt(...n)),e.startsWith=(...n)=>e.check(brt(...n)),e.endsWith=(...n)=>e.check(Ert(...n)),e.min=(...n)=>e.check(Wfe(...n)),e.max=(...n)=>e.check(s3e(...n)),e.length=(...n)=>e.check(a3e(...n)),e.nonempty=(...n)=>e.check(Wfe(1,...n)),e.lowercase=n=>e.check(grt(n)),e.uppercase=n=>e.check(Art(n)),e.trim=()=>e.check(Crt()),e.normalize=(...n)=>e.check(vrt(...n)),e.toLowerCase=()=>e.check(xrt()),e.toUpperCase=()=>e.check(Srt()),e.slugify=()=>e.check(wrt())}),Drt=wr("ZodString",(e,t)=>{i3e.init(e,t),qFr.init(e,t),e.email=r=>e.check(aFr(WFr,r)),e.url=r=>e.check(l3t(b3t,r)),e.jwt=r=>e.check(wFr(a2r,r)),e.emoji=r=>e.check(fFr(HFr,r)),e.guid=r=>e.check(c3t(h3t,r)),e.uuid=r=>e.check(cFr(Fee,r)),e.uuidv4=r=>e.check(lFr(Fee,r)),e.uuidv6=r=>e.check(uFr(Fee,r)),e.uuidv7=r=>e.check(pFr(Fee,r)),e.nanoid=r=>e.check(dFr(KFr,r)),e.guid=r=>e.check(c3t(h3t,r)),e.cuid=r=>e.check(mFr(JFr,r)),e.cuid2=r=>e.check(hFr(YFr,r)),e.ulid=r=>e.check(gFr(XFr,r)),e.base64=r=>e.check(CFr(i2r,r)),e.base64url=r=>e.check(xFr(o2r,r)),e.xid=r=>e.check(AFr(ZFr,r)),e.ksuid=r=>e.check(yFr($Fr,r)),e.ipv4=r=>e.check(bFr(e2r,r)),e.ipv6=r=>e.check(EFr(t2r,r)),e.cidrv4=r=>e.check(IFr(r2r,r)),e.cidrv6=r=>e.check(vFr(n2r,r)),e.e164=r=>e.check(SFr(s2r,r)),e.datetime=r=>e.check(A0o(r)),e.date=r=>e.check(y0o(r)),e.time=r=>e.check(b0o(r)),e.duration=r=>e.check(E0o(r))});yA=wr("ZodStringFormat",(e,t)=>{AA.init(e,t),qFr.init(e,t)}),WFr=wr("ZodEmail",(e,t)=>{Fyo.init(e,t),yA.init(e,t)});h3t=wr("ZodGUID",(e,t)=>{Ryo.init(e,t),yA.init(e,t)});Fee=wr("ZodUUID",(e,t)=>{kyo.init(e,t),yA.init(e,t)});b3t=wr("ZodURL",(e,t)=>{Nyo.init(e,t),yA.init(e,t)});HFr=wr("ZodEmoji",(e,t)=>{jyo.init(e,t),yA.init(e,t)});KFr=wr("ZodNanoID",(e,t)=>{zyo.init(e,t),yA.init(e,t)});JFr=wr("ZodCUID",(e,t)=>{Qyo.init(e,t),yA.init(e,t)});YFr=wr("ZodCUID2",(e,t)=>{Myo.init(e,t),yA.init(e,t)});XFr=wr("ZodULID",(e,t)=>{Lyo.init(e,t),yA.init(e,t)});ZFr=wr("ZodXID",(e,t)=>{_yo.init(e,t),yA.init(e,t)});$Fr=wr("ZodKSUID",(e,t)=>{Uyo.init(e,t),yA.init(e,t)});e2r=wr("ZodIPv4",(e,t)=>{Hyo.init(e,t),yA.init(e,t)});N0o=wr("ZodMAC",(e,t)=>{Jyo.init(e,t),yA.init(e,t)});t2r=wr("ZodIPv6",(e,t)=>{Kyo.init(e,t),yA.init(e,t)});r2r=wr("ZodCIDRv4",(e,t)=>{Yyo.init(e,t),yA.init(e,t)});n2r=wr("ZodCIDRv6",(e,t)=>{Xyo.init(e,t),yA.init(e,t)});i2r=wr("ZodBase64",(e,t)=>{$yo.init(e,t),yA.init(e,t)});o2r=wr("ZodBase64URL",(e,t)=>{ebo.init(e,t),yA.init(e,t)});s2r=wr("ZodE164",(e,t)=>{tbo.init(e,t),yA.init(e,t)});a2r=wr("ZodJWT",(e,t)=>{rbo.init(e,t),yA.init(e,t)});Rrt=wr("ZodCustomStringFormat",(e,t)=>{nbo.init(e,t),yA.init(e,t)});krt=wr("ZodNumber",(e,t)=>{Zkr.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>NEo(e,n,i,o),e.gt=(n,i)=>e.check(Ree(n,i)),e.gte=(n,i)=>e.check(KF(n,i)),e.min=(n,i)=>e.check(KF(n,i)),e.lt=(n,i)=>e.check(Dee(n,i)),e.lte=(n,i)=>e.check(p3(n,i)),e.max=(n,i)=>e.check(p3(n,i)),e.int=n=>e.check(GFr(n)),e.safe=n=>e.check(GFr(n)),e.positive=n=>e.check(Ree(0,n)),e.nonnegative=n=>e.check(KF(0,n)),e.negative=n=>e.check(Dee(0,n)),e.nonpositive=n=>e.check(p3(0,n)),e.multipleOf=(n,i)=>e.check(Nve(n,i)),e.step=(n,i)=>e.check(Nve(n,i)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});l3e=wr("ZodNumberFormat",(e,t)=>{ibo.init(e,t),krt.init(e,t)});Frt=wr("ZodBoolean",(e,t)=>{r3t.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jEo(e,r,n,i)});Nrt=wr("ZodBigInt",(e,t)=>{$kr.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>zEo(e,n,i,o),e.gte=(n,i)=>e.check(KF(n,i)),e.min=(n,i)=>e.check(KF(n,i)),e.gt=(n,i)=>e.check(Ree(n,i)),e.gte=(n,i)=>e.check(KF(n,i)),e.min=(n,i)=>e.check(KF(n,i)),e.lt=(n,i)=>e.check(Dee(n,i)),e.lte=(n,i)=>e.check(p3(n,i)),e.max=(n,i)=>e.check(p3(n,i)),e.positive=n=>e.check(Ree(BigInt(0),n)),e.negative=n=>e.check(Dee(BigInt(0),n)),e.nonpositive=n=>e.check(p3(BigInt(0),n)),e.nonnegative=n=>e.check(KF(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(Nve(n,i));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});c2r=wr("ZodBigIntFormat",(e,t)=>{obo.init(e,t),Nrt.init(e,t)});Q0o=wr("ZodSymbol",(e,t)=>{sbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>QEo(e,r,n,i)});M0o=wr("ZodUndefined",(e,t)=>{abo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>LEo(e,r,n,i)});L0o=wr("ZodNull",(e,t)=>{cbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>MEo(e,r,n,i)});U0o=wr("ZodAny",(e,t)=>{lbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>VEo(e,r,n,i)});V0o=wr("ZodUnknown",(e,t)=>{ubo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>GEo(e,r,n,i)});G0o=wr("ZodNever",(e,t)=>{pbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>UEo(e,r,n,i)});q0o=wr("ZodVoid",(e,t)=>{fbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_Eo(e,r,n,i)});E3t=wr("ZodDate",(e,t)=>{dbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>qEo(e,n,i,o),e.min=(n,i)=>e.check(KF(n,i)),e.max=(n,i)=>e.check(p3(n,i));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});W0o=wr("ZodArray",(e,t)=>{mbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>n0o(e,r,n,i),e.element=t.element,e.min=(r,n)=>e.check(Wfe(r,n)),e.nonempty=r=>e.check(Wfe(1,r)),e.max=(r,n)=>e.check(s3e(r,n)),e.length=(r,n)=>e.check(a3e(r,n)),e.unwrap=()=>e.element});v3t=wr("ZodObject",(e,t)=>{hbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>i0o(e,r,n,i),vi.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>p2r(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:c3e()}),e.loose=()=>e.clone({...e._zod.def,catchall:c3e()}),e.strict=()=>e.clone({...e._zod.def,catchall:l2r()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>vi.extend(e,r),e.safeExtend=r=>vi.safeExtend(e,r),e.merge=r=>vi.merge(e,r),e.pick=r=>vi.pick(e,r),e.omit=r=>vi.omit(e,r),e.partial=(...r)=>vi.partial(d2r,e,r[0]),e.required=(...r)=>vi.required(m2r,e,r[0])});C3t=wr("ZodUnion",(e,t)=>{n3t.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kFr(e,r,n,i),e.options=t.options});H0o=wr("ZodXor",(e,t)=>{C3t.init(e,t),gbo.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kFr(e,r,n,i),e.options=t.options});K0o=wr("ZodDiscriminatedUnion",(e,t)=>{C3t.init(e,t),Abo.init(e,t)});J0o=wr("ZodIntersection",(e,t)=>{ybo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>o0o(e,r,n,i)});X0o=wr("ZodTuple",(e,t)=>{eFr.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>s0o(e,r,n,i),e.rest=r=>e.clone({...e._zod.def,rest:r})});x3t=wr("ZodRecord",(e,t)=>{bbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>a0o(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType});eIo=wr("ZodMap",(e,t)=>{Ebo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>t0o(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(kee(...r)),e.nonempty=r=>e.check(kee(1,r)),e.max=(...r)=>e.check(jve(...r)),e.size=(...r)=>e.check(o3e(...r))});tIo=wr("ZodSet",(e,t)=>{Ibo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>r0o(e,r,n,i),e.min=(...r)=>e.check(kee(...r)),e.nonempty=r=>e.check(kee(1,r)),e.max=(...r)=>e.check(jve(...r)),e.size=(...r)=>e.check(o3e(...r))});Brt=wr("ZodEnum",(e,t)=>{vbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>WEo(e,n,i,o),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{let o={};for(let s of n)if(r.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Brt({...t,checks:[],...vi.normalizeParams(i),entries:o})},e.exclude=(n,i)=>{let o={...t.entries};for(let s of n)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new Brt({...t,checks:[],...vi.normalizeParams(i),entries:o})}});rIo=wr("ZodLiteral",(e,t)=>{Cbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>HEo(e,r,n,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});nIo=wr("ZodFile",(e,t)=>{xbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>YEo(e,r,n,i),e.min=(r,n)=>e.check(kee(r,n)),e.max=(r,n)=>e.check(jve(r,n)),e.mime=(r,n)=>e.check(Irt(Array.isArray(r)?r:[r],n))});iIo=wr("ZodTransform",(e,t)=>{Sbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>e0o(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Bve(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(vi.issue(o,r.value,t));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(vi.issue(s))}};let i=t.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});d2r=wr("ZodOptional",(e,t)=>{tFr.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>FFr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});oIo=wr("ZodExactOptional",(e,t)=>{wbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>FFr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});aIo=wr("ZodNullable",(e,t)=>{Tbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>c0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});cIo=wr("ZodDefault",(e,t)=>{Obo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>u0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});uIo=wr("ZodPrefault",(e,t)=>{Pbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>p0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});m2r=wr("ZodNonOptional",(e,t)=>{Bbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>l0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});dIo=wr("ZodSuccess",(e,t)=>{Dbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>XEo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});mIo=wr("ZodCatch",(e,t)=>{Rbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>f0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});gIo=wr("ZodNaN",(e,t)=>{kbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>KEo(e,r,n,i)});h2r=wr("ZodPipe",(e,t)=>{Fbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>d0o(e,r,n,i),e.in=t.in,e.out=t.out});g2r=wr("ZodCodec",(e,t)=>{h2r.init(e,t),i3t.init(e,t)});AIo=wr("ZodReadonly",(e,t)=>{Nbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>m0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});bIo=wr("ZodTemplateLiteral",(e,t)=>{jbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>JEo(e,r,n,i)});EIo=wr("ZodLazy",(e,t)=>{Mbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>g0o(e,r,n,i),e.unwrap=()=>e._zod.def.getter()});vIo=wr("ZodPromise",(e,t)=>{Qbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>h0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});CIo=wr("ZodFunction",(e,t)=>{zbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$Eo(e,r,n,i)});S3t=wr("ZodCustom",(e,t)=>{Lbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ZEo(e,r,n,i)});Z7c=BEo,$7c=DEo;tHc=(...e)=>REo({Codec:g2r,Boolean:Frt,String:Drt},...e)});function m8d(e){XI({customError:e})}function h8d(){return XI().customError}var d8d,wIo,iHc=h(()=>{"use strict";Kz();Kz();d8d={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};wIo||(wIo={})});function A8d(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function y8d(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let i=r[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}function oHc(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return jo.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let i=e.$ref;if(t.refs.has(i))return t.refs.get(i);if(t.processing.has(i))return jo.lazy(()=>{if(!t.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return t.refs.get(i)});t.processing.add(i);let o=y8d(i,t),s=MD(o,t);return t.refs.set(i,s),t.processing.delete(i),s}if(e.enum!==void 0){let i=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&i.length===1&&i[0]===null)return jo.null();if(i.length===0)return jo.never();if(i.length===1)return jo.literal(i[0]);if(i.every(s=>typeof s=="string"))return jo.enum(i);let o=i.map(s=>jo.literal(s));return o.length<2?o[0]:jo.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return jo.literal(e.const);let r=e.type;if(Array.isArray(r)){let i=r.map(o=>{let s={...e,type:o};return oHc(s,t)});return i.length===0?jo.never():i.length===1?i[0]:jo.union(i)}if(!r)return jo.any();let n;switch(r){case"string":{let i=jo.string();if(e.format){let o=e.format;o==="email"?i=i.check(jo.email()):o==="uri"||o==="uri-reference"?i=i.check(jo.url()):o==="uuid"||o==="guid"?i=i.check(jo.uuid()):o==="date-time"?i=i.check(jo.iso.datetime()):o==="date"?i=i.check(jo.iso.date()):o==="time"?i=i.check(jo.iso.time()):o==="duration"?i=i.check(jo.iso.duration()):o==="ipv4"?i=i.check(jo.ipv4()):o==="ipv6"?i=i.check(jo.ipv6()):o==="mac"?i=i.check(jo.mac()):o==="cidr"?i=i.check(jo.cidrv4()):o==="cidr-v6"?i=i.check(jo.cidrv6()):o==="base64"?i=i.check(jo.base64()):o==="base64url"?i=i.check(jo.base64url()):o==="e164"?i=i.check(jo.e164()):o==="jwt"?i=i.check(jo.jwt()):o==="emoji"?i=i.check(jo.emoji()):o==="nanoid"?i=i.check(jo.nanoid()):o==="cuid"?i=i.check(jo.cuid()):o==="cuid2"?i=i.check(jo.cuid2()):o==="ulid"?i=i.check(jo.ulid()):o==="xid"?i=i.check(jo.xid()):o==="ksuid"&&(i=i.check(jo.ksuid()))}typeof e.minLength=="number"&&(i=i.min(e.minLength)),typeof e.maxLength=="number"&&(i=i.max(e.maxLength)),e.pattern&&(i=i.regex(new RegExp(e.pattern))),n=i;break}case"number":case"integer":{let i=r==="integer"?jo.number().int():jo.number();typeof e.minimum=="number"&&(i=i.min(e.minimum)),typeof e.maximum=="number"&&(i=i.max(e.maximum)),typeof e.exclusiveMinimum=="number"?i=i.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(i=i.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?i=i.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(i=i.lt(e.maximum)),typeof e.multipleOf=="number"&&(i=i.multipleOf(e.multipleOf)),n=i;break}case"boolean":{n=jo.boolean();break}case"null":{n=jo.null();break}case"object":{let i={},o=e.properties||{},s=new Set(e.required||[]);for(let[c,l]of Object.entries(o)){let u=MD(l,t);i[c]=s.has(c)?u:u.optional()}if(e.propertyNames){let c=MD(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?MD(e.additionalProperties,t):jo.any();if(Object.keys(i).length===0){n=jo.record(c,l);break}let u=jo.object(i).passthrough(),p=jo.looseRecord(c,l);n=jo.intersection(u,p);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),u=[];for(let d of l){let f=MD(c[d],t),m=jo.string().regex(new RegExp(d));u.push(jo.looseRecord(m,f))}let p=[];if(Object.keys(i).length>0&&p.push(jo.object(i).passthrough()),p.push(...u),p.length===0)n=jo.object({}).passthrough();else if(p.length===1)n=p[0];else{let d=jo.intersection(p[0],p[1]);for(let f=2;f<p.length;f++)d=jo.intersection(d,p[f]);n=d}break}let a=jo.object(i);e.additionalProperties===!1?n=a.strict():typeof e.additionalProperties=="object"?n=a.catchall(MD(e.additionalProperties,t)):n=a.passthrough();break}case"array":{let i=e.prefixItems,o=e.items;if(i&&Array.isArray(i)){let s=i.map(c=>MD(c,t)),a=o&&typeof o=="object"&&!Array.isArray(o)?MD(o,t):void 0;a?n=jo.tuple(s).rest(a):n=jo.tuple(s),typeof e.minItems=="number"&&(n=n.check(jo.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(jo.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>MD(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?MD(e.additionalItems,t):void 0;a?n=jo.tuple(s).rest(a):n=jo.tuple(s),typeof e.minItems=="number"&&(n=n.check(jo.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(jo.maxLength(e.maxItems)))}else if(o!==void 0){let s=MD(o,t),a=jo.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),n=a}else n=jo.array(jo.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(n=n.describe(e.description)),e.default!==void 0&&(n=n.default(e.default)),n}function MD(e,t){if(typeof e=="boolean")return e?jo.any():jo.never();let r=oHc(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(l=>MD(l,t)),c=jo.union(a);r=n?jo.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(l=>MD(l,t)),c=jo.xor(a);r=n?jo.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:jo.any();else{let a=n?r:MD(e.allOf[0],t),c=n?0:1;for(let l=c;l<e.allOf.length;l++)a=jo.intersection(a,MD(e.allOf[l],t));r=a}e.nullable===!0&&t.version==="openapi-3.0"&&(r=jo.nullable(r)),e.readOnly===!0&&(r=jo.readonly(r));let i={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in e&&(i[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(i[a]=e[a]);for(let a of Object.keys(e))g8d.has(a)||(i[a]=e[a]);return Object.keys(i).length>0&&t.registry.add(r,i),r}function sHc(e,t){if(typeof e=="boolean")return e?jo.any():jo.never();let r=A8d(e,t?.defaultTarget),n=e.$defs||e.definitions||{},i={version:r,defs:n,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??VP};return MD(e,i)}var jo,g8d,aHc=h(()=>{"use strict";a3t();QFr();f3t();m3t();jo={...d3t,...zFr,iso:Prt},g8d=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var TIo={};ne(TIo,{bigint:()=>v8d,boolean:()=>I8d,date:()=>C8d,number:()=>E8d,string:()=>b8d});function b8d(e){return Jbo(Drt,e)}function E8d(e){return nEo(krt,e)}function I8d(e){return uEo(Frt,e)}function v8d(e){return fEo(Nrt,e)}function C8d(e){return CEo(E3t,e)}var cHc=h(()=>{"use strict";Kz();m3t()});var w={};ne(w,{$brand:()=>Okr,$input:()=>Hbo,$output:()=>Wbo,NEVER:()=>bAo,TimePrecision:()=>Xbo,ZodAny:()=>U0o,ZodArray:()=>W0o,ZodBase64:()=>i2r,ZodBase64URL:()=>o2r,ZodBigInt:()=>Nrt,ZodBigIntFormat:()=>c2r,ZodBoolean:()=>Frt,ZodCIDRv4:()=>r2r,ZodCIDRv6:()=>n2r,ZodCUID:()=>JFr,ZodCUID2:()=>YFr,ZodCatch:()=>mIo,ZodCodec:()=>g2r,ZodCustom:()=>S3t,ZodCustomStringFormat:()=>Rrt,ZodDate:()=>E3t,ZodDefault:()=>cIo,ZodDiscriminatedUnion:()=>K0o,ZodE164:()=>s2r,ZodEmail:()=>WFr,ZodEmoji:()=>HFr,ZodEnum:()=>Brt,ZodError:()=>p8d,ZodExactOptional:()=>oIo,ZodFile:()=>nIo,ZodFirstPartyTypeKind:()=>wIo,ZodFunction:()=>CIo,ZodGUID:()=>h3t,ZodIPv4:()=>e2r,ZodIPv6:()=>t2r,ZodISODate:()=>LFr,ZodISODateTime:()=>MFr,ZodISODuration:()=>UFr,ZodISOTime:()=>_Fr,ZodIntersection:()=>J0o,ZodIssueCode:()=>d8d,ZodJWT:()=>a2r,ZodKSUID:()=>$Fr,ZodLazy:()=>EIo,ZodLiteral:()=>rIo,ZodMAC:()=>N0o,ZodMap:()=>eIo,ZodNaN:()=>gIo,ZodNanoID:()=>KFr,ZodNever:()=>G0o,ZodNonOptional:()=>m2r,ZodNull:()=>L0o,ZodNullable:()=>aIo,ZodNumber:()=>krt,ZodNumberFormat:()=>l3e,ZodObject:()=>v3t,ZodOptional:()=>d2r,ZodPipe:()=>h2r,ZodPrefault:()=>uIo,ZodPromise:()=>vIo,ZodReadonly:()=>AIo,ZodRealError:()=>Jz,ZodRecord:()=>x3t,ZodSet:()=>tIo,ZodString:()=>Drt,ZodStringFormat:()=>yA,ZodSuccess:()=>dIo,ZodSymbol:()=>Q0o,ZodTemplateLiteral:()=>bIo,ZodTransform:()=>iIo,ZodTuple:()=>X0o,ZodType:()=>mp,ZodULID:()=>XFr,ZodURL:()=>b3t,ZodUUID:()=>Fee,ZodUndefined:()=>M0o,ZodUnion:()=>C3t,ZodUnknown:()=>V0o,ZodVoid:()=>q0o,ZodXID:()=>ZFr,ZodXor:()=>H0o,_ZodString:()=>qFr,_default:()=>lIo,_function:()=>J7c,any:()=>T7c,array:()=>I3t,base64:()=>u7c,base64url:()=>p7c,bigint:()=>v7c,boolean:()=>z0o,catch:()=>hIo,check:()=>Y7c,cidrv4:()=>c7c,cidrv6:()=>l7c,clone:()=>HF,codec:()=>W7c,coerce:()=>TIo,config:()=>XI,core:()=>Hfe,cuid:()=>e7c,cuid2:()=>t7c,custom:()=>X7c,date:()=>P7c,decode:()=>T0o,decodeAsync:()=>P0o,describe:()=>Z7c,discriminatedUnion:()=>N7c,e164:()=>f7c,email:()=>GWc,emoji:()=>ZWc,encode:()=>w0o,encodeAsync:()=>O0o,endsWith:()=>Ert,enum:()=>p2r,exactOptional:()=>sIo,file:()=>U7c,flattenError:()=>X6t,float32:()=>y7c,float64:()=>b7c,formatError:()=>Z6t,fromJSONSchema:()=>sHc,function:()=>J7c,getErrorMap:()=>h8d,globalRegistry:()=>VP,gt:()=>Ree,gte:()=>KF,guid:()=>qWc,hash:()=>A7c,hex:()=>g7c,hostname:()=>h7c,httpUrl:()=>XWc,includes:()=>yrt,instanceof:()=>eHc,int:()=>GFr,int32:()=>E7c,int64:()=>C7c,intersection:()=>Y0o,ipv4:()=>o7c,ipv6:()=>a7c,iso:()=>Prt,json:()=>rHc,jwt:()=>d7c,keyof:()=>B7c,ksuid:()=>i7c,lazy:()=>IIo,length:()=>a3e,literal:()=>_7c,locales:()=>s3t,looseObject:()=>k7c,looseRecord:()=>z7c,lowercase:()=>grt,lt:()=>Dee,lte:()=>p3,mac:()=>s7c,map:()=>Q7c,maxLength:()=>s3e,maxSize:()=>jve,meta:()=>$7c,mime:()=>Irt,minLength:()=>Wfe,minSize:()=>kee,multipleOf:()=>Nve,nan:()=>q7c,nanoid:()=>$Wc,nativeEnum:()=>L7c,negative:()=>OFr,never:()=>l2r,nonnegative:()=>BFr,nonoptional:()=>fIo,nonpositive:()=>PFr,normalize:()=>vrt,null:()=>_0o,nullable:()=>A3t,nullish:()=>V7c,number:()=>j0o,object:()=>D7c,optional:()=>g3t,overwrite:()=>LH,parse:()=>v0o,parseAsync:()=>C0o,partialRecord:()=>j7c,pipe:()=>y3t,positive:()=>TFr,prefault:()=>pIo,preprocess:()=>nHc,prettifyError:()=>DAo,promise:()=>K7c,property:()=>DFr,readonly:()=>yIo,record:()=>$0o,refine:()=>xIo,regex:()=>hrt,regexes:()=>e5,registry:()=>sFr,safeDecode:()=>D0o,safeDecodeAsync:()=>k0o,safeEncode:()=>B0o,safeEncodeAsync:()=>R0o,safeParse:()=>x0o,safeParseAsync:()=>S0o,set:()=>M7c,setErrorMap:()=>m8d,size:()=>o3e,slugify:()=>wrt,startsWith:()=>brt,strictObject:()=>R7c,string:()=>VFr,stringFormat:()=>m7c,stringbool:()=>tHc,success:()=>G7c,superRefine:()=>SIo,symbol:()=>S7c,templateLiteral:()=>H7c,toJSONSchema:()=>NFr,toLowerCase:()=>xrt,toUpperCase:()=>Srt,transform:()=>f2r,treeifyError:()=>BAo,trim:()=>Crt,tuple:()=>Z0o,uint32:()=>I7c,uint64:()=>x7c,ulid:()=>r7c,undefined:()=>w7c,union:()=>u2r,unknown:()=>c3e,uppercase:()=>Art,url:()=>YWc,util:()=>vi,uuid:()=>WWc,uuidv4:()=>HWc,uuidv6:()=>KWc,uuidv7:()=>JWc,void:()=>O7c,xid:()=>n7c,xor:()=>F7c});var OIo=h(()=>{"use strict";Kz();m3t();QFr();I0o();F0o();iHc();Kz();Ubo();Kz();p3t();aHc();qbo();f3t();f3t();cHc();XI(rFr())});var ss=h(()=>{"use strict";OIo();OIo()});var lHc=h(()=>{"use strict"});var WIo={};ne(WIo,{AIChatConfig:()=>RIo,AIChatDatasource:()=>eKc,AIChatLocation:()=>fHc,AIChatModel:()=>dHc,AIChatWebsiteDatasource:()=>$Hc,AbsoluteProductPath:()=>TJc,AgentsConfig:()=>nKc,AiExamplesConfig:()=>ZHc,AnalyticsConfig:()=>XHc,AnnouncementConfig:()=>I2r,ApiReferenceConfiguration:()=>cJc,ApiReferenceEndpointConfiguration:()=>XKc,ApiReferenceLayout:()=>SHc,ApiReferenceLayoutItem:()=>B3t,ApiReferenceOperationConfiguration:()=>ZKc,ApiReferencePackageConfiguration:()=>tJc,ApiReferencePackageConfigurationWithOptions:()=>eJc,ApiReferenceSectionConfiguration:()=>$Kc,ApiSpecConfiguration:()=>aJc,ApiSpecErrorResponseEnsure:()=>iJc,ApiSpecErrorResponseHttpMethod:()=>nJc,ApiSpecErrorResponses:()=>oJc,ApiSpecImportSettings:()=>sJc,ApiSpecType:()=>rJc,Audience:()=>T3t,AudienceId:()=>PIo,Availability:()=>Jfe,BackgroundImageConfiguration:()=>_Hc,BackgroundImageThemedConfig:()=>LHc,BlogConfiguration:()=>KKc,BodyThemeConfig:()=>RHc,BreadcrumbsConfig:()=>cKc,ChangelogConfiguration:()=>HKc,ChangelogFolderRelativePath:()=>w3t,ChangelogLayout:()=>xHc,CheckConfig:()=>zKc,CheckRuleSeverity:()=>Kfe,CheckRulesConfig:()=>jKc,CodeBlockTheme:()=>BIo,CodeBlocksThemeConfig:()=>OHc,CollapsedStringValue:()=>VHc,CollapsedValue:()=>O3t,ColorConfig:()=>Tx,ColorThemedConfig:()=>zHc,ColorsConfiguration:()=>dKc,ContentAlignment:()=>vHc,CssConfig:()=>UHc,CustomDomain:()=>QHc,CustomPageAction:()=>mKc,DocsConfiguration:()=>B8d,DocsInstance:()=>bKc,DocsSettingsConfig:()=>fKc,DocsTypographyConfig:()=>sKc,EditThisPageConfig:()=>yKc,EditThisPageLaunch:()=>mHc,EmbeddingConfig:()=>rKc,ExperimentalConfig:()=>_Kc,ExternalProduct:()=>xJc,ExternalSitemapConfigSchema:()=>MKc,ExternalSitemapSchema:()=>LKc,FeatureFlag:()=>DIo,FeatureFlagConfiguration:()=>GHc,FolderConfiguration:()=>YKc,FontConfig:()=>A2r,FontConfigPath:()=>oKc,FontConfigVariant:()=>iKc,FontDisplay:()=>yHc,FontStyle:()=>jIo,FontWeight:()=>QIo,FooterLinksConfig:()=>OKc,FooterNavThemeConfig:()=>BHc,FullStoryAnalyticsConfig:()=>WHc,GTMConfig:()=>JHc,GitLibraryInputSchema:()=>UKc,GithubEditThisPageConfig:()=>AKc,GoogleAnalytics4Config:()=>YHc,HeaderPosition:()=>CHc,HttpSnippetLanguage:()=>NHc,HttpSnippetsConfig:()=>MHc,IntegrationsConfig:()=>QKc,IntercomConfig:()=>HHc,InternalProduct:()=>CJc,JsConfig:()=>RKc,JsConfigOptions:()=>kIo,JsFileConfig:()=>BKc,JsFileConfigSettings:()=>PKc,JsRemoteConfig:()=>DKc,JsScriptStrategy:()=>zIo,Language:()=>b2r,LanguageSwitcherThemeConfig:()=>THc,LayoutConfig:()=>uKc,LibraryConfiguration:()=>WKc,LibraryInputConfiguration:()=>GKc,LibraryLanguage:()=>AHc,LibraryName:()=>FIo,LibraryOutputConfiguration:()=>qKc,LibraryReferenceConfiguration:()=>JKc,LinkConfiguration:()=>f3e,LogoConfiguration:()=>EKc,MetadataConfig:()=>kKc,NavbarDropdownConfig:()=>wKc,NavbarGithubConfig:()=>SKc,NavbarGithubConfigWithOptions:()=>xKc,NavbarLink:()=>TKc,NavbarLinkConfig:()=>u3e,NavigationConfig:()=>v2r,NavigationItem:()=>D3t,PageActionOption:()=>pHc,PageActionOptions:()=>hKc,PageActionsConfig:()=>gKc,PageActionsThemeConfig:()=>FHc,PageConfiguration:()=>zrt,PageDescriptionSource:()=>tKc,PathLibraryInputSchema:()=>VKc,PlaygroundButtonSettings:()=>CKc,PlaygroundSettings:()=>P3t,PostHogConfig:()=>KHc,ProductConfig:()=>SJc,ProductConfigBase:()=>qIo,ProductFileConfig:()=>P8d,ProductPath:()=>O8d,ProductSwitcherThemeConfig:()=>wHc,ProfileConfig:()=>bJc,ProfileVarsConfiguration:()=>yJc,ProfileVarsFile:()=>w8d,ProgrammingLanguage:()=>uHc,RedirectConfig:()=>_Io,RedirectsConfiguration:()=>FKc,RedirectsFile:()=>S8d,RelativeProductPath:()=>wJc,RemotePathConfig:()=>NKc,Role:()=>MIo,RoleId:()=>y2r,SearchSettingsConfig:()=>pKc,SearchbarPlacement:()=>bHc,SectionConfiguration:()=>lJc,SegmentConfig:()=>qHc,SidebarThemeConfig:()=>kHc,SiteSwitcherThemeConfig:()=>PHc,SnippetLanguageConfiguration:()=>_H,SnippetsConfiguration:()=>vKc,SortByAvailabilityValue:()=>hHc,SwitcherPlacement:()=>IHc,TabConfig:()=>C2r,TabId:()=>p3e,TabMenuEntry:()=>vJc,TabMenuGroup:()=>IJc,TabMenuGroupItem:()=>EJc,TabMenuLayoutConfig:()=>lKc,TabMenuTab:()=>VIo,TabVariant:()=>UIo,TabVariantGroup:()=>dJc,TabVariantGroupItem:()=>fJc,TabVariantItem:()=>mJc,TabbedNavigationConfig:()=>AJc,TabbedNavigationItem:()=>gJc,TabbedNavigationItemWithLayout:()=>pJc,TabbedNavigationItemWithVariants:()=>hJc,TabsPlacement:()=>EHc,TabsThemeConfig:()=>DHc,Target:()=>jrt,ThemeConfig:()=>aKc,TitleSource:()=>NIo,TranslationConfig:()=>PJc,TranslationConfigObject:()=>OJc,TwitterCardSetting:()=>jHc,UntabbedNavigationConfig:()=>uJc,VariantsColumnHeight:()=>LIo,VersionAvailability:()=>gHc,VersionConfig:()=>GIo,VersionFileConfig:()=>T8d,VersionedSnippetLanguageConfiguration:()=>IKc,WithFeatureFlags:()=>H1,WithPermissions:()=>W1,WithViewers:()=>E2r,normalizeTranslationConfig:()=>BJc});function BJc(e){return typeof e=="string"?{lang:e}:e}var p3e,w3t,PIo,y2r,FIo,uHc,b2r,pHc,fHc,dHc,mHc,Jfe,hHc,gHc,NIo,AHc,jIo,yHc,bHc,EHc,IHc,vHc,CHc,xHc,SHc,wHc,THc,BIo,OHc,PHc,BHc,DHc,RHc,kHc,FHc,NHc,jrt,jHc,zIo,QIo,zHc,Tx,T3t,MIo,QHc,MHc,LHc,_Hc,UHc,VHc,O3t,W1,DIo,GHc,H1,E2r,qHc,WHc,HHc,KHc,JHc,YHc,XHc,ZHc,$Hc,eKc,tKc,rKc,nKc,RIo,iKc,oKc,A2r,sKc,aKc,cKc,LIo,lKc,uKc,pKc,fKc,dKc,mKc,hKc,gKc,AKc,yKc,bKc,EKc,f3e,IKc,_H,vKc,CKc,P3t,I2r,u3e,xKc,SKc,wKc,TKc,OKc,PKc,BKc,DKc,kIo,RKc,kKc,_Io,FKc,S8d,NKc,Kfe,jKc,zKc,QKc,MKc,LKc,_Kc,UKc,VKc,GKc,qKc,WKc,zrt,HKc,KKc,JKc,YKc,XKc,ZKc,B3t,$Kc,eJc,tJc,rJc,nJc,iJc,oJc,sJc,aJc,cJc,D3t,lJc,uJc,UIo,pJc,fJc,dJc,mJc,hJc,gJc,AJc,v2r,yJc,w8d,bJc,VIo,EJc,IJc,vJc,C2r,GIo,T8d,qIo,CJc,xJc,SJc,wJc,TJc,O8d,P8d,OJc,PJc,B8d,DJc=h(()=>{"use strict";ss();p3e=w.string(),w3t=w.string(),PIo=w.string(),y2r=w.string(),FIo=w.string(),uHc=w.enum(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"]),b2r=w.string().regex(/^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$/,"Language must be a valid BCP 47 language tag (e.g. 'en', 'ja', 'ja-JP', 'pt-BR', 'zh-Hans-CN')"),pHc=w.enum(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","vscode"]),fHc=w.enum(["docs","slack","discord"]),dHc=w.enum(["claude-3.7","claude-4","command-a"]),mHc=w.enum(["github","dashboard"]),Jfe=w.enum(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]),hHc=w.enum(["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]),gHc=w.enum(["deprecated","ga","stable","beta"]),NIo=w.enum(["frontmatter","filename"]),AHc=w.enum(["python","cpp"]),jIo=w.enum(["normal","italic"]),yHc=w.enum(["auto","block","swap","fallback","optional"]),bHc=w.enum(["header","header-tabs","sidebar"]),EHc=w.enum(["header","sidebar"]),IHc=w.enum(["header","sidebar"]),vHc=w.enum(["center","left"]),CHc=w.enum(["fixed","static"]),xHc=w.enum(["timeline","classic"]),SHc=w.enum(["indented","cards"]),wHc=w.enum(["default","toggle","tabs"]),THc=w.enum(["default","minimal"]),BIo=w.enum(["github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","github-light","github-light-default","github-light-high-contrast","material-theme-darker","min-dark","min-light"]),OHc=w.object({light:BIo.optional(),dark:BIo.optional()}),PHc=w.object({enabled:w.boolean().optional(),order:w.array(w.string()).optional(),hide:w.array(w.string()).optional(),labels:w.record(w.string(),w.string()).optional(),"show-products":w.boolean().optional()}),BHc=w.enum(["default","minimal"]),DHc=w.enum(["default","bubble"]),RHc=w.enum(["default","canvas"]),kHc=w.enum(["default","minimal"]),FHc=w.enum(["default","toolbar"]),NHc=w.enum(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"]),jrt=w.enum(["_blank","_self","_parent","_top"]),jHc=w.enum(["summary","summary_large_image","app","player"]),zIo=w.enum(["beforeInteractive","afterInteractive","lazyOnload"]),QIo=w.union([w.string(),w.number().int()]),zHc=w.object({dark:w.string().optional(),light:w.string().optional()}),Tx=w.union([w.string(),zHc]),T3t=w.union([PIo,w.array(PIo)]),MIo=w.union([y2r,w.array(y2r)]),QHc=w.union([w.string(),w.array(w.string())]),MHc=w.union([w.boolean(),w.array(NHc)]),LHc=w.object({dark:w.string().optional(),light:w.string().optional()}),_Hc=w.union([w.string(),LHc]),UHc=w.union([w.string(),w.array(w.string())]),VHc=w.enum(["open-by-default"]),O3t=w.union([w.boolean(),VHc]),W1=w.object({viewers:MIo.optional(),orphaned:w.boolean().optional()}),DIo=w.object({flag:w.string(),"fallback-value":w.unknown().optional(),match:w.unknown().optional()}),GHc=w.union([w.string(),DIo,w.array(DIo)]),H1=w.object({"feature-flag":GHc.optional()}),E2r=w.object({viewers:MIo.optional()}),qHc=w.object({"write-key":w.string()}),WHc=w.object({"org-id":w.string()}),HHc=w.object({"app-id":w.string(),"api-base":w.string().optional()}),KHc=w.object({"api-key":w.string(),endpoint:w.string().optional()}),JHc=w.object({"container-id":w.string()}),YHc=w.object({"measurement-id":w.string()}),XHc=w.object({segment:qHc.optional(),fullstory:WHc.optional(),intercom:HHc.optional(),posthog:KHc.optional(),gtm:JHc.optional(),ga4:YHc.optional()}),ZHc=w.object({enabled:w.boolean().optional(),style:w.string().optional()}),$Hc=w.object({url:w.string(),title:w.string().optional()}),eKc=$Hc,tKc=w.enum(["description","subtitle"]),rKc=w.object({"allowed-origins":w.array(w.string())}),nKc=w.object({"page-directive":w.string().optional(),"page-description-source":tKc.optional(),"llms-txt":w.string().optional(),"llms-full-txt":w.string().optional()}),RIo=w.object({model:dHc.optional(),"system-prompt":w.string().optional(),location:w.array(fHc).optional(),datasources:w.array(eKc).optional(),"mask-pii":w.boolean().optional(),disclaimer:w.string().optional(),"button-text":w.string().optional()}),iKc=w.object({path:w.string(),weight:QIo.optional(),style:jIo.optional()}),oKc=w.union([w.string(),iKc]),A2r=w.object({name:w.string().optional(),path:w.string().optional(),weight:QIo.optional(),style:jIo.optional(),paths:w.array(oKc).optional(),display:yHc.optional(),fallback:w.array(w.string()).optional(),"font-variation-settings":w.string().optional()}),sKc=w.object({headingsFont:A2r.optional(),bodyFont:A2r.optional(),codeFont:A2r.optional()}),aKc=w.object({sidebar:kHc.optional(),body:RHc.optional(),tabs:DHc.optional(),"page-actions":FHc.optional(),"footer-nav":BHc.optional(),"language-switcher":THc.optional(),"product-switcher":wHc.optional(),"site-switcher":PHc.optional(),"code-blocks":OHc.optional()}),cKc=w.object({"current-page":w.boolean().optional(),sticky:w.boolean().optional()}),LIo=w.union([w.number().int().positive(),w.literal("no-limit")]),lKc=w.object({"default-column-height":LIo.nullable().optional(),"interact-on-click-only":w.boolean().optional()}),uKc=w.object({"page-width":w.string().optional(),"content-width":w.string().optional(),"sidebar-width":w.string().optional(),"header-height":w.string().optional(),"searchbar-placement":bHc.optional(),"tab-menu":lKc.optional(),"tabs-placement":EHc.optional(),"switcher-placement":IHc.optional(),"content-alignment":vHc.optional(),"header-position":CHc.optional(),"disable-header":w.boolean().optional(),"hide-nav-links":w.boolean().optional(),"hide-feedback":w.boolean().optional(),"mobile-toc":w.boolean().optional(),"changelog-layout":xHc.optional(),"api-reference-layout":SHc.optional(),"api-reference-expand-properties":w.boolean().optional(),"show-nav-availability-badges":w.boolean().optional(),"hide-webhook-method-badges":w.boolean().optional(),breadcrumbs:cKc.optional()}),pKc=w.object({"prioritize-current-product":w.boolean().optional(),"default-filter-by-current-product":w.boolean().optional()}),fKc=w.object({"search-text":w.string().optional(),"disable-search":w.boolean().optional(),"dark-mode-code":w.boolean().optional(),"default-search-filters":w.boolean().optional(),search:pKc.optional(),"http-snippets":MHc.optional(),"hide-404-page":w.boolean().optional(),"use-javascript-as-typescript":w.boolean().optional(),"disable-explorer-proxy":w.boolean().optional(),"disable-analytics":w.boolean().optional(),"require-analytics-consent":w.boolean().optional(),language:b2r.optional(),"folder-title-source":NIo.optional(),"substitute-env-vars":w.boolean().optional(),"websocket-oneof-display":w.enum(["flat","grouped"]).optional(),embedding:rKc.optional()}),dKc=w.object({"accent-primary":Tx.optional(),accentPrimary:Tx.optional(),background:Tx.optional(),border:Tx.optional(),"sidebar-background":Tx.optional(),"header-background":Tx.optional(),"card-background":Tx.optional(),"accent-1":Tx.optional(),"accent-2":Tx.optional(),"accent-3":Tx.optional(),"accent-4":Tx.optional(),"accent-5":Tx.optional(),"accent-6":Tx.optional(),"accent-7":Tx.optional(),"accent-8":Tx.optional(),"accent-9":Tx.optional(),"accent-10":Tx.optional(),"accent-11":Tx.optional(),"accent-12":Tx.optional()}),mKc=w.object({title:w.string(),subtitle:w.string().optional(),url:w.string(),icon:w.string().optional(),default:w.boolean().optional()}),hKc=w.object({"copy-page":w.boolean().optional(),"view-as-markdown":w.boolean().optional(),"ask-ai":w.boolean().optional(),chatgpt:w.boolean().optional(),claude:w.boolean().optional(),cursor:w.boolean().optional(),mcp:w.boolean().optional(),vscode:w.boolean().optional(),custom:w.array(mKc).optional()}),gKc=w.object({default:pHc.optional(),options:hKc.optional()}),AKc=w.object({host:w.string().optional(),owner:w.string(),repo:w.string(),branch:w.string().optional()}),yKc=w.object({github:AKc.optional(),launch:mHc.optional()}),bKc=w.object({url:w.string(),"custom-domain":QHc.optional(),"edit-this-page":yKc.optional(),audiences:T3t.optional(),"multi-source":w.boolean().optional()}),EKc=w.object({dark:w.string().optional(),light:w.string().optional(),height:w.number().optional(),href:w.string().optional(),"right-text":w.string().optional()}),f3e=w.object({link:w.string(),href:w.string(),icon:w.string().optional(),target:jrt.optional()}),IKc=w.object({version:w.string(),package:w.string()}),_H=w.union([w.string(),IKc]),vKc=w.object({python:_H.optional(),typescript:_H.optional(),go:_H.optional(),java:_H.optional(),ruby:_H.optional(),csharp:_H.optional(),php:_H.optional(),swift:_H.optional(),cli:_H.optional(),rust:_H.optional()}),CKc=w.object({href:w.string().optional()}),P3t=w.object({hidden:w.boolean().optional(),environments:w.array(w.string()).optional(),button:CKc.optional(),oauth:w.boolean().optional(),"limit-websocket-messages-per-connection":w.number().int().optional(),"send-optional-defaults":w.boolean().optional()}),I2r=w.object({message:w.string()}),u3e=E2r.merge(w.object({href:w.string().optional(),target:jrt.optional(),url:w.string().optional(),text:w.string().optional(),icon:w.string().optional(),rightIcon:w.string().optional(),rounded:w.boolean().optional()})),xKc=E2r.merge(w.object({url:w.string(),target:jrt.optional()})),SKc=w.union([w.string(),xKc]),wKc=E2r.merge(w.object({links:w.array(u3e),text:w.string().optional(),icon:w.string().optional(),rightIcon:w.string().optional(),rounded:w.boolean().optional()})),TKc=w.union([u3e.merge(w.object({type:w.literal("filled")})),u3e.merge(w.object({type:w.literal("outlined")})),u3e.merge(w.object({type:w.literal("minimal")})),w.object({type:w.literal("github"),value:SKc}),wKc.merge(w.object({type:w.literal("dropdown")})),u3e.merge(w.object({type:w.literal("primary")})),u3e.merge(w.object({type:w.literal("secondary")}))]),OKc=w.object({github:w.string().optional(),twitter:w.string().optional(),x:w.string().optional(),linkedin:w.string().optional(),youtube:w.string().optional(),instagram:w.string().optional(),facebook:w.string().optional(),discord:w.string().optional(),slack:w.string().optional(),hackernews:w.string().optional(),medium:w.string().optional(),website:w.string().optional()}),PKc=w.object({path:w.string(),strategy:zIo.optional()}),BKc=w.union([w.string(),PKc]),DKc=w.object({url:w.string(),strategy:zIo.optional(),"disable-sri":w.boolean().optional()}),kIo=w.union([DKc,BKc]),RKc=w.union([kIo,w.array(kIo)]),kKc=w.object({"og:site_name":w.string().optional(),"og:title":w.string().optional(),"og:description":w.string().optional(),"og:url":w.string().optional(),"og:image":w.string().optional(),"og:image:width":w.number().optional(),"og:image:height":w.number().optional(),"og:locale":w.string().optional(),"og:logo":w.string().optional(),"twitter:title":w.string().optional(),"twitter:description":w.string().optional(),"twitter:handle":w.string().optional(),"twitter:image":w.string().optional(),"twitter:site":w.string().optional(),"twitter:url":w.string().optional(),"twitter:card":jHc.optional(),"og:dynamic":w.boolean().optional(),"og:dynamic:background-image":w.string().optional(),"og:dynamic:text-color":w.string().optional(),"og:dynamic:background-color":w.string().optional(),"og:dynamic:logo-color":w.enum(["dark","light"]).optional(),"og:dynamic:show-logo":w.boolean().optional(),"og:dynamic:show-section":w.boolean().optional(),"og:dynamic:show-description":w.boolean().optional(),"og:dynamic:show-url":w.boolean().optional(),"og:dynamic:show-gradient":w.boolean().optional(),"canonical-host":w.string().optional()}),_Io=w.object({source:w.string(),destination:w.string(),permanent:w.boolean().optional()}),FKc=w.union([w.array(_Io),w.string(),w.array(w.string())]),S8d=w.object({redirects:w.array(_Io.strict())}).strict(),NKc=w.object({path:w.string(),destination:w.string()}).strict(),Kfe=w.enum(["warn","error"]),jKc=w.object({"example-validation":Kfe.optional(),"broken-links":Kfe.optional(),"no-non-component-refs":Kfe.optional(),"valid-local-references":Kfe.optional(),"no-circular-redirects":Kfe.optional(),"valid-docs-endpoints":Kfe.optional(),"missing-redirects":Kfe.optional(),"valid-changelog-slug":Kfe.optional()}),zKc=w.object({rules:jKc.optional()}),QKc=w.object({intercom:w.string().optional(),context7:w.string().optional()}),MKc=w.object({url:w.string(),locale:w.string().optional()}),LKc=w.union([w.string(),MKc]),_Kc=w.object({"mdx-components":w.array(w.string()).optional(),"disable-stream-toggle":w.boolean().optional(),"openapi-parser-v2":w.boolean().optional(),"openapi-parser-v3":w.boolean().optional(),"dynamic-snippets":w.boolean().optional(),"ai-examples":w.boolean().optional(),"ai-example-style-instructions":w.string().optional(),"exclude-apis":w.boolean().optional(),"basepath-aware":w.boolean().optional(),"robots-txt-on-instance-url":w.boolean().optional(),"external-sitemaps":w.array(LKc).optional()}),UKc=w.object({git:w.string(),subpath:w.string().optional(),ref:w.string().optional()}),VKc=w.object({path:w.string()}),GKc=w.union([UKc,VKc]),qKc=w.object({path:w.string()}),WKc=w.object({input:GKc,output:qKc,lang:AHc}),zrt=W1.merge(H1).merge(w.object({page:w.string(),profile:w.string().optional(),path:w.string(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),noindex:w.boolean().optional(),availability:Jfe.optional()})),HKc=W1.merge(H1).merge(w.object({changelog:w3t,title:w.string().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional()})),KKc=W1.merge(H1).merge(w.object({blog:w3t,title:w.string().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional()})),JKc=W1.merge(H1).merge(w.object({library:FIo,title:w.string().optional(),slug:w.string().optional()})),YKc=W1.merge(H1).merge(w.object({folder:w.string(),title:w.string().optional(),"title-source":NIo.optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),collapsed:O3t.optional(),collapsible:w.boolean().optional(),"collapsed-by-default":w.boolean().optional(),availability:Jfe.optional()})),XKc=W1.merge(H1).merge(w.object({endpoint:w.string(),title:w.string().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),availability:Jfe.optional(),playground:P3t.optional()})),ZKc=W1.merge(H1).merge(w.object({operation:w.string(),title:w.string().optional(),slug:w.string().optional(),hidden:w.boolean().optional(),availability:Jfe.optional()})),B3t=w.lazy(()=>w.union([w.string(),w.record(w.string(),tJc),$Kc,XKc,ZKc,zrt,f3e])),$Kc=W1.merge(H1).merge(w.object({section:w.string(),"referenced-packages":w.array(w.string()).optional(),summary:w.string().optional(),contents:w.array(B3t).optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),collapsed:O3t.optional(),collapsible:w.boolean().optional(),"collapsed-by-default":w.boolean().optional(),availability:Jfe.optional(),playground:P3t.optional()})),eJc=W1.merge(H1).merge(w.object({title:w.string().optional(),summary:w.string().optional(),contents:w.array(B3t).optional(),availability:Jfe.optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),playground:P3t.optional()})),tJc=w.lazy(()=>w.union([w.array(B3t),eJc])),rJc=w.enum(["openapi","asyncapi","graphql"]),nJc=w.enum(["get","post","put","patch","delete","head","options","trace"]),iJc=w.object({"status-code":w.number().int().min(400).max(599),methods:w.array(nJc).optional()}),oJc=w.object({schema:w.union([w.string(),w.record(w.string(),w.unknown())]),name:w.string().optional(),"apply-to":w.enum(["all","untyped"]).optional(),ensure:w.array(iJc).optional()}),sJc=w.object({"type-dates-as-strings":w.boolean().optional(),"use-bytes-for-binary-response":w.boolean().optional(),"respect-parameter-content":w.boolean().optional(),"respect-operation-id-word-boundaries":w.boolean().optional(),"infer-forward-compatible":w.boolean().optional(),"preserve-one-of-in-all-of":w.boolean().optional(),"any-of-sibling-properties-as-object":w.boolean().optional(),"error-responses":oJc.optional()}),aJc=w.object({type:rJc,path:w.string(),namespace:w.string().optional(),overlays:w.string().optional(),overrides:w.array(w.string()).optional(),settings:sJc.optional()}),cJc=W1.merge(H1).merge(w.object({api:w.string(),"api-name":w.string().optional(),specs:w.array(aJc).optional(),openrpc:w.string().optional(),audiences:T3t.optional(),"display-errors":w.boolean().optional(),"tag-description-pages":w.boolean().optional(),snippets:vKc.optional(),postman:w.string().optional(),summary:w.string().optional(),layout:w.array(B3t).optional(),collapsed:O3t.optional(),icon:w.string().optional(),slug:w.string().optional(),hidden:w.boolean().optional(),availability:Jfe.optional(),"skip-slug":w.boolean().optional(),alphabetized:w.boolean().optional(),"sort-by-availability":w.array(hHc).optional(),flattened:w.boolean().optional(),paginated:w.boolean().optional(),types:w.boolean().optional(),playground:P3t.optional()})),D3t=w.lazy(()=>w.union([zrt,lJc,cJc,JKc,f3e,HKc,KKc,YKc])),lJc=W1.merge(H1).merge(w.object({section:w.string(),profile:w.string().optional(),path:w.string().optional(),contents:w.array(D3t),collapsed:O3t.optional(),collapsible:w.boolean().optional(),"collapsed-by-default":w.boolean().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),availability:Jfe.optional()})),uJc=w.array(D3t),UIo=W1.merge(H1).merge(w.object({title:w.string(),profile:w.string().optional(),subtitle:w.string().optional(),icon:w.string().optional(),layout:w.array(D3t),slug:w.string().optional(),"skip-slug":w.boolean().optional(),hidden:w.boolean().optional(),default:w.boolean().optional()})),pJc=w.object({tab:p3e,layout:w.array(D3t).optional()}),fJc=w.union([UIo,f3e]),dJc=w.object({group:w.string(),items:w.array(fJc)}),mJc=w.union([UIo,dJc,f3e]),hJc=w.object({tab:p3e,variants:w.array(mJc)}),gJc=w.union([pJc,hJc]),AJc=w.array(gJc),v2r=w.union([AJc,uJc]),yJc=w.union([w.record(w.string(),w.string()),w.string(),w.array(w.string())]),w8d=w.object({vars:w.record(w.string(),w.string())}).strict(),bJc=w.object({vars:yJc.optional()}),VIo=W1.merge(H1).merge(w.object({tab:p3e,"display-name":w.string(),subtitle:w.string().optional(),icon:w.string().optional(),slug:w.string().optional(),"skip-slug":w.boolean().optional(),hidden:w.boolean().optional(),default:w.boolean().optional()})),EJc=w.union([VIo,f3e]),IJc=w.object({group:w.string(),tabs:w.array(EJc)}),vJc=w.union([VIo,IJc,f3e]),C2r=W1.merge(H1).merge(w.object({"display-name":w.string(),profile:w.string().optional(),icon:w.string().optional(),slug:w.string().optional(),"skip-slug":w.boolean().optional(),hidden:w.boolean().optional(),href:w.string().optional(),target:jrt.optional(),changelog:w3t.optional(),blog:w3t.optional(),"tab-menu":w.array(vJc).optional(),"tab-menu-column-height":LIo.nullable().optional()})),GIo=W1.merge(H1).merge(w.object({"display-name":w.string(),profile:w.string().optional(),path:w.string().optional(),ref:w.string().optional(),slug:w.string().optional(),availability:gHc.optional(),audiences:T3t.optional(),hidden:w.boolean().optional(),announcement:I2r.optional()})),T8d=w.object({tabs:w.record(p3e,C2r).optional(),"landing-page":zrt.optional(),navigation:v2r}),qIo=W1.merge(H1).merge(w.object({"display-name":w.string(),subtitle:w.string().optional(),icon:w.string().optional(),image:w.string().optional(),versions:w.array(GIo).optional(),profile:w.string().optional(),audiences:T3t.optional()})),CJc=qIo.merge(w.object({path:w.string(),slug:w.string().optional(),announcement:I2r.optional()})),xJc=qIo.merge(w.object({href:w.string(),target:jrt.optional()})),SJc=w.union([CJc,xJc]),wJc=W1.merge(H1).merge(w.object({"display-name":w.string(),path:w.string(),slug:w.string().optional()})),TJc=w.object({href:w.string()}),O8d=w.union([wJc,TJc]),P8d=w.object({tabs:w.record(p3e,C2r).optional(),"landing-page":zrt.optional(),navigation:v2r}),OJc=w.object({lang:b2r,default:w.boolean().optional()}),PJc=w.union([b2r,OJc]);B8d=w.object({instances:w.array(bKc),title:w.string().optional(),profiles:w.record(w.string(),bJc).optional(),profile:w.string().optional(),libraries:w.record(FIo,WKc).optional(),analytics:XHc.optional(),announcement:I2r.optional(),roles:w.array(y2r).optional(),tabs:w.record(p3e,C2r).optional(),versions:w.array(GIo).optional(),products:w.array(SJc).optional(),"landing-page":zrt.optional(),navigation:v2r.optional(),"navbar-links":w.array(TKc).optional(),"footer-links":OKc.optional(),"page-actions":gKc.optional(),experimental:_Kc.optional(),"default-language":uHc.optional(),languages:w.array(w.string()).optional(),translations:w.array(PJc).optional().superRefine((e,t)=>{if(e==null)return;let n=e.map(BJc).filter(i=>i.default===!0).length;n>1&&t.addIssue({code:w.ZodIssueCode.custom,message:`Only one translation entry can be marked as default, but ${n} were found`})}),"ai-chat":RIo.optional(),"ai-search":RIo.optional(),"ai-examples":ZHc.optional(),agents:nKc.optional(),metadata:kKc.optional(),redirects:FKc.optional(),"remote-paths":w.array(NKc).optional(),check:zKc.optional(),logo:EKc.optional(),favicon:w.string().optional(),"background-image":_Hc.optional(),colors:dKc.optional(),typography:sKc.optional(),layout:uKc.optional(),settings:fKc.optional(),theme:aKc.optional(),"global-theme":w.string().optional(),integrations:QKc.optional(),css:UHc.optional(),js:RKc.optional(),header:w.string().optional(),footer:w.string().optional()})});function k8d(e){if("changelog"in e)return e.changelog;if("blog"in e)return e.blog}function F8d(e){return e.changelog??e.blog}var D8d,R8d,RJc=h(()=>{"use strict";D8d="Changelog",R8d="Blog"});function N8d({location:e,columnHeight:t,layout:r,hasHeaderTabs:n}){let i=e==="tab"&&!n,o=i?"sidebar":e,s=o==="tab"?t??r?.tabMenuDefaultColumnHeight:void 0;return{location:o,columnHeight:typeof s=="number"&&s>0?Math.floor(s):void 0,fellBackToSidebar:i,interactOnClickOnly:o==="tab"&&r?.tabMenuInteractOnClickOnly===!0?!0:void 0}}function kJc(e){return e.flatMap(t=>t.nestedVariants!=null?kJc(t.nestedVariants.variants):[t.layout])}function FJc(e){return e.flatMap(t=>[t,...t.nestedVariants!=null?FJc(t.nestedVariants.variants):[]])}var NJc=h(()=>{"use strict"});var jJc=h(()=>{"use strict"});var zJc=h(()=>{"use strict"});var QJc=h(()=>{"use strict"});var MJc=h(()=>{"use strict"});var HIo,LJc=h(()=>{"use strict";HIo={Docs:"docs",Slack:"slack",Discord:"discord"}});var KIo,_Jc=h(()=>{"use strict";KIo={Claude37:"claude-3.7",Claude4:"claude-4",CommandA:"command-a"}});var UJc=h(()=>{"use strict"});var VJc=h(()=>{"use strict"});var GJc=h(()=>{"use strict"});var qJc=h(()=>{"use strict"});var WJc=h(()=>{"use strict"});var HJc=h(()=>{"use strict"});var JIo,KJc=h(()=>{"use strict";JIo={Indented:"indented",Cards:"cards"}});var JJc=h(()=>{"use strict"});var YJc=h(()=>{"use strict"});var XJc=h(()=>{"use strict"});var ZJc=h(()=>{"use strict"});var $Jc=h(()=>{"use strict"});var eYc=h(()=>{"use strict"});var YIo,tYc=h(()=>{"use strict";YIo={All:"all",Untyped:"untyped"}});var rYc=h(()=>{"use strict"});var XIo,nYc=h(()=>{"use strict";XIo={Get:"get",Post:"post",Put:"put",Patch:"patch",Delete:"delete",Head:"head",Options:"options",Trace:"trace"}});var iYc=h(()=>{"use strict"});var oYc=h(()=>{"use strict"});var sYc=h(()=>{"use strict"});var ZIo,aYc=h(()=>{"use strict";ZIo={Openapi:"openapi",Asyncapi:"asyncapi",Graphql:"graphql"}});var cYc=h(()=>{"use strict"});var lYc=h(()=>{"use strict"});var $Io,uYc=h(()=>{"use strict";$Io={Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var pYc=h(()=>{"use strict"});var fYc=h(()=>{"use strict"});var dYc=h(()=>{"use strict"});var evo,mYc=h(()=>{"use strict";evo={Default:"default",Canvas:"canvas"}});var hYc=h(()=>{"use strict"});var gYc=h(()=>{"use strict"});var AYc=h(()=>{"use strict"});var tvo,yYc=h(()=>{"use strict";tvo={Timeline:"timeline",Classic:"classic"}});var bYc=h(()=>{"use strict"});var rvo,EYc=h(()=>{"use strict";rvo={Warn:"warn",Error:"error"}});var IYc=h(()=>{"use strict"});var vYc=h(()=>{"use strict"});var nvo,CYc=h(()=>{"use strict";nvo={GithubDark:"github-dark",GithubDarkDefault:"github-dark-default",GithubDarkDimmed:"github-dark-dimmed",GithubDarkHighContrast:"github-dark-high-contrast",GithubLight:"github-light",GithubLightDefault:"github-light-default",GithubLightHighContrast:"github-light-high-contrast",MaterialThemeDarker:"material-theme-darker",MinDark:"min-dark",MinLight:"min-light"}});var ivo,xYc=h(()=>{"use strict";ivo={OpenByDefault:"open-by-default"}});var SYc=h(()=>{"use strict"});var wYc=h(()=>{"use strict"});var TYc=h(()=>{"use strict"});var OYc=h(()=>{"use strict"});var ovo,PYc=h(()=>{"use strict";ovo={Center:"center",Left:"left"}});var BYc=h(()=>{"use strict"});var DYc=h(()=>{"use strict"});var RYc=h(()=>{"use strict"});var kYc=h(()=>{"use strict"});var FYc=h(()=>{"use strict"});var NYc=h(()=>{"use strict"});var jYc=h(()=>{"use strict"});var zYc=h(()=>{"use strict"});var svo,QYc=h(()=>{"use strict";svo={Github:"github",Dashboard:"dashboard"}});var MYc=h(()=>{"use strict"});var LYc=h(()=>{"use strict"});var _Yc=h(()=>{"use strict"});var UYc=h(()=>{"use strict"});var VYc=h(()=>{"use strict"});var GYc=h(()=>{"use strict"});var qYc=h(()=>{"use strict"});var WYc=h(()=>{"use strict"});var HYc=h(()=>{"use strict"});var KYc=h(()=>{"use strict"});var JYc=h(()=>{"use strict"});var avo,YYc=h(()=>{"use strict";avo={Auto:"auto",Block:"block",Swap:"swap",Fallback:"fallback",Optional:"optional"}});var cvo,XYc=h(()=>{"use strict";cvo={Normal:"normal",Italic:"italic"}});var ZYc=h(()=>{"use strict"});var $Yc=h(()=>{"use strict"});var lvo,eXc=h(()=>{"use strict";lvo={Default:"default",Minimal:"minimal"}});var tXc=h(()=>{"use strict"});var rXc=h(()=>{"use strict"});var nXc=h(()=>{"use strict"});var iXc=h(()=>{"use strict"});var oXc=h(()=>{"use strict"});var uvo,sXc=h(()=>{"use strict";uvo={Fixed:"fixed",Static:"static"}});var pvo,aXc=h(()=>{"use strict";pvo={Curl:"curl",Csharp:"csharp",Go:"go",Java:"java",Javascript:"javascript",Php:"php",Python:"python",Ruby:"ruby",Swift:"swift",Typescript:"typescript"}});var cXc=h(()=>{"use strict"});var lXc=h(()=>{"use strict"});var uXc=h(()=>{"use strict"});var pXc=h(()=>{"use strict"});var fXc=h(()=>{"use strict"});var dXc=h(()=>{"use strict"});var mXc=h(()=>{"use strict"});var hXc=h(()=>{"use strict"});var gXc=h(()=>{"use strict"});var fvo,AXc=h(()=>{"use strict";fvo={BeforeInteractive:"beforeInteractive",AfterInteractive:"afterInteractive",LazyOnload:"lazyOnload"}});var yXc=h(()=>{"use strict"});var dvo,bXc=h(()=>{"use strict";dvo={Default:"default",Minimal:"minimal"}});var EXc=h(()=>{"use strict"});var IXc=h(()=>{"use strict"});var vXc=h(()=>{"use strict"});var CXc=h(()=>{"use strict"});var mvo,xXc=h(()=>{"use strict";mvo={Python:"python",Cpp:"cpp"}});var SXc=h(()=>{"use strict"});var hvo,wXc=h(()=>{"use strict";hvo={Kind:"kind",Header:"header"}});var TXc=h(()=>{"use strict"});var OXc=h(()=>{"use strict"});var gvo,PXc=h(()=>{"use strict";gvo={Compact:"compact",Hyphenated:"hyphenated"}});var BXc=h(()=>{"use strict"});var DXc=h(()=>{"use strict"});var RXc=h(()=>{"use strict"});var kXc=h(()=>{"use strict"});var FXc=h(()=>{"use strict"});var NXc=h(()=>{"use strict"});var jXc=h(()=>{"use strict"});var zXc=h(()=>{"use strict"});var QXc=h(()=>{"use strict"});var MXc=h(()=>{"use strict"});var Avo,LXc=h(()=>{"use strict";Avo={Dark:"dark",Light:"light"}});var yvo,_Xc=h(()=>{"use strict";yvo={CopyPage:"copy-page",ViewAsMarkdown:"view-as-markdown",AskAi:"ask-ai",Chatgpt:"chatgpt",Claude:"claude",Cursor:"cursor",ClaudeCode:"claude-code",Vscode:"vscode"}});var UXc=h(()=>{"use strict"});var VXc=h(()=>{"use strict"});var bvo,GXc=h(()=>{"use strict";bvo={Default:"default",Toolbar:"toolbar"}});var qXc=h(()=>{"use strict"});var Evo,WXc=h(()=>{"use strict";Evo={Description:"description",Subtitle:"subtitle"}});var HXc=h(()=>{"use strict"});var KXc=h(()=>{"use strict"});var JXc=h(()=>{"use strict"});var YXc=h(()=>{"use strict"});var XXc=h(()=>{"use strict"});var ZXc=h(()=>{"use strict"});var $Xc=h(()=>{"use strict"});var eZc=h(()=>{"use strict"});var Ivo,tZc=h(()=>{"use strict";Ivo={Default:"default",Toggle:"toggle",Tabs:"tabs"}});var rZc=h(()=>{"use strict"});var nZc=h(()=>{"use strict"});var vvo,iZc=h(()=>{"use strict";vvo={Typescript:"typescript",Javascript:"javascript",Python:"python",Java:"java",Go:"go",Ruby:"ruby",Csharp:"csharp",Php:"php",Swift:"swift",Rust:"rust",Nodets:"nodets",Nodejs:"nodejs",Dotnet:"dotnet",Curl:"curl",Jvm:"jvm",Ts:"ts",Js:"js"}});var oZc=h(()=>{"use strict"});var sZc=h(()=>{"use strict"});var aZc=h(()=>{"use strict"});var cZc=h(()=>{"use strict"});var lZc=h(()=>{"use strict"});var uZc=h(()=>{"use strict"});var Cvo,pZc=h(()=>{"use strict";Cvo={Header:"header",HeaderTabs:"header-tabs",Sidebar:"sidebar"}});var fZc=h(()=>{"use strict"});var dZc=h(()=>{"use strict"});var mZc=h(()=>{"use strict"});var xvo,hZc=h(()=>{"use strict";xvo={Default:"default",Minimal:"minimal"}});var gZc=h(()=>{"use strict"});var AZc=h(()=>{"use strict"});var yZc=h(()=>{"use strict"});var bZc=h(()=>{"use strict"});var EZc=h(()=>{"use strict"});var IZc=h(()=>{"use strict"});var Svo,vZc=h(()=>{"use strict";Svo={Unset:"unset",Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var wvo,CZc=h(()=>{"use strict";wvo={Header:"header",Sidebar:"sidebar"}});var xZc=h(()=>{"use strict"});var SZc=h(()=>{"use strict"});var wZc=h(()=>{"use strict"});var TZc=h(()=>{"use strict"});var OZc=h(()=>{"use strict"});var PZc=h(()=>{"use strict"});var BZc=h(()=>{"use strict"});var DZc=h(()=>{"use strict"});var RZc=h(()=>{"use strict"});var kZc=h(()=>{"use strict"});var FZc=h(()=>{"use strict"});var Tvo,NZc=h(()=>{"use strict";Tvo={Left:"left",Center:"center"}});var Ovo,jZc=h(()=>{"use strict";Ovo={Header:"header",Sidebar:"sidebar"}});var zZc=h(()=>{"use strict"});var QZc=h(()=>{"use strict"});var Pvo,MZc=h(()=>{"use strict";Pvo={Default:"default",Bubble:"bubble"}});var LZc=h(()=>{"use strict"});var _Zc=h(()=>{"use strict"});var UZc=h(()=>{"use strict"});var VZc=h(()=>{"use strict"});var Bvo,GZc=h(()=>{"use strict";Bvo={Blank:"_blank",Self:"_self",Parent:"_parent",Top:"_top"}});var qZc=h(()=>{"use strict"});var Dvo,WZc=h(()=>{"use strict";Dvo={Frontmatter:"frontmatter",Filename:"filename"}});var HZc=h(()=>{"use strict"});var KZc=h(()=>{"use strict"});var Rvo,JZc=h(()=>{"use strict";Rvo={Summary:"summary",SummaryLargeImage:"summary_large_image",App:"app",Player:"player"}});var YZc=h(()=>{"use strict"});var XZc=h(()=>{"use strict"});var ZZc=h(()=>{"use strict"});var kvo,$Zc=h(()=>{"use strict";kvo={Deprecated:"deprecated",Legacy:"legacy",Ga:"ga",Stable:"stable",Beta:"beta",Alpha:"alpha",Preview:"preview"}});var e$c=h(()=>{"use strict"});var t$c=h(()=>{"use strict"});var r$c=h(()=>{"use strict"});var Fvo,n$c=h(()=>{"use strict";Fvo={Flat:"flat",Grouped:"grouped"}});var i$c=h(()=>{"use strict"});var o$c=h(()=>{"use strict"});var s$c=h(()=>{"use strict"});var Nvo=h(()=>{"use strict";jJc();zJc();QJc();MJc();LJc();_Jc();UJc();VJc();GJc();qJc();WJc();HJc();KJc();JJc();YJc();XJc();ZJc();$Jc();eYc();tYc();rYc();nYc();iYc();oYc();sYc();aYc();cYc();lYc();uYc();pYc();fYc();dYc();mYc();hYc();gYc();AYc();yYc();bYc();EYc();IYc();vYc();CYc();xYc();SYc();wYc();TYc();OYc();PYc();BYc();DYc();RYc();kYc();FYc();NYc();jYc();zYc();QYc();MYc();LYc();_Yc();UYc();VYc();GYc();qYc();WYc();HYc();KYc();JYc();YYc();XYc();ZYc();$Yc();eXc();tXc();rXc();nXc();iXc();oXc();sXc();aXc();cXc();lXc();uXc();pXc();fXc();dXc();mXc();hXc();gXc();AXc();yXc();bXc();EXc();IXc();vXc();CXc();xXc();SXc();wXc();TXc();OXc();PXc();BXc();DXc();RXc();kXc();FXc();NXc();jXc();zXc();QXc();MXc();LXc();_Xc();UXc();VXc();GXc();qXc();WXc();HXc();KXc();JXc();YXc();XXc();ZXc();$Xc();eZc();tZc();rZc();nZc();iZc();oZc();sZc();aZc();cZc();lZc();uZc();pZc();fZc();dZc();mZc();hZc();gZc();AZc();yZc();bZc();EZc();IZc();vZc();CZc();xZc();SZc();wZc();TZc();OZc();PZc();BZc();DZc();RZc();kZc();FZc();NZc();jZc();zZc();QZc();MZc();LZc();_Zc();UZc();VZc();GZc();qZc();WZc();HZc();KZc();JZc();YZc();XZc();ZZc();$Zc();e$c();t$c();r$c();n$c();i$c();o$c();s$c()});var x2r={};ne(x2r,{AiChatLocation:()=>HIo,AiChatModel:()=>KIo,ApiReferenceLayout:()=>JIo,ApiSpecErrorResponseApplyTo:()=>YIo,ApiSpecErrorResponseHttpMethod:()=>XIo,ApiSpecType:()=>ZIo,Availability:()=>$Io,BodyThemeConfig:()=>evo,ChangelogLayout:()=>tvo,CheckRuleSeverity:()=>rvo,CodeBlockTheme:()=>nvo,CollapsedStringValue:()=>ivo,ContentAlignment:()=>ovo,EditThisPageLaunch:()=>svo,FontDisplay:()=>avo,FontStyle:()=>cvo,FooterNavThemeConfig:()=>lvo,HeaderPosition:()=>uvo,HttpSnippetLanguage:()=>pvo,JsScriptStrategy:()=>fvo,LanguageSwitcherThemeConfig:()=>dvo,LibraryLanguage:()=>mvo,LibraryOrganizeBy:()=>hvo,LibrarySlugStyle:()=>gvo,OgDynamicLogoColor:()=>Avo,PageActionOption:()=>yvo,PageActionsThemeConfig:()=>bvo,PageDescriptionSource:()=>Evo,ProductSwitcherThemeConfig:()=>Ivo,ProgrammingLanguage:()=>vvo,SearchbarPlacement:()=>Cvo,SidebarThemeConfig:()=>xvo,SortByAvailabilityValue:()=>Svo,SwitcherPlacement:()=>wvo,TabsAlignment:()=>Tvo,TabsPlacement:()=>Ovo,TabsThemeStyle:()=>Pvo,Target:()=>Bvo,TitleSource:()=>Dvo,TwitterCardSetting:()=>Rvo,VersionAvailability:()=>kvo,WebSocketOneofDisplay:()=>Fvo});var a$c=h(()=>{"use strict";Nvo()});var c$c=h(()=>{"use strict";a$c();Nvo()});var jvo={};ne(jvo,{AiChatLocation:()=>HIo,AiChatModel:()=>KIo,ApiReferenceLayout:()=>JIo,ApiSpecErrorResponseApplyTo:()=>YIo,ApiSpecErrorResponseHttpMethod:()=>XIo,ApiSpecType:()=>ZIo,Availability:()=>$Io,BodyThemeConfig:()=>evo,ChangelogLayout:()=>tvo,CheckRuleSeverity:()=>rvo,CodeBlockTheme:()=>nvo,CollapsedStringValue:()=>ivo,ContentAlignment:()=>ovo,EditThisPageLaunch:()=>svo,FontDisplay:()=>avo,FontStyle:()=>cvo,FooterNavThemeConfig:()=>lvo,HeaderPosition:()=>uvo,HttpSnippetLanguage:()=>pvo,JsScriptStrategy:()=>fvo,LanguageSwitcherThemeConfig:()=>dvo,LibraryLanguage:()=>mvo,LibraryOrganizeBy:()=>hvo,LibrarySlugStyle:()=>gvo,OgDynamicLogoColor:()=>Avo,PageActionOption:()=>yvo,PageActionsThemeConfig:()=>bvo,PageDescriptionSource:()=>Evo,ProductSwitcherThemeConfig:()=>Ivo,ProgrammingLanguage:()=>vvo,SearchbarPlacement:()=>Cvo,SidebarThemeConfig:()=>xvo,SortByAvailabilityValue:()=>Svo,SwitcherPlacement:()=>wvo,TabsAlignment:()=>Tvo,TabsPlacement:()=>Ovo,TabsThemeStyle:()=>Pvo,Target:()=>Bvo,TitleSource:()=>Dvo,TwitterCardSetting:()=>Rvo,VersionAvailability:()=>kvo,WebSocketOneofDisplay:()=>Fvo,docs:()=>x2r});var zvo=h(()=>{"use strict";c$c()});var l$c,u$c=h(()=>{"use strict";l$c=(e,t,r)=>JSON.stringify(e,t,r)});function j8d({message:e,statusCode:t,body:r}){let n=[];return e!=null&&n.push(e),t!=null&&n.push(`Status code: ${t.toString()}`),r!=null&&n.push(`Body: ${l$c(r,void 0,2)}`),n.join(`
|
|
253
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){o(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&e.reused==="ref"){o(s);continue}}}function Mve(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=s=>{let a=e.seen.get(s);if(a.ref===null)return;let c=a.def??a.schema,l={...c},u=a.ref;if(a.ref=null,u){n(u);let d=e.seen.get(u),f=d.schema;if(f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):Object.assign(c,f),Object.assign(c,l),s._zod.parent===u)for(let g in c)g==="$ref"||g==="allOf"||g in l||delete c[g];if(f.$ref&&d.def)for(let g in c)g==="$ref"||g==="allOf"||g in d.def&&JSON.stringify(c[g])===JSON.stringify(d.def[g])&&delete c[g]}let p=s._zod.parent;if(p&&p!==u){n(p);let d=e.seen.get(p);if(d?.schema.$ref&&(c.$ref=d.schema.$ref,d.def))for(let f in c)f==="$ref"||f==="allOf"||f in d.def&&JSON.stringify(c[f])===JSON.stringify(d.def[f])&&delete c[f]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(let s of[...e.seen.entries()].reverse())n(s[0]);let i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(s)}Object.assign(i,r.def??r.schema);let o=e.external?.defs??{};for(let s of e.seen.entries()){let a=s[1];a.def&&a.defId&&(o[a.defId]=a.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{let s=JSON.parse(JSON.stringify(i));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ort(t,"input",e.processors),output:Ort(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function JF(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return JF(n.element,r);if(n.type==="set")return JF(n.valueType,r);if(n.type==="lazy")return JF(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return JF(n.innerType,r);if(n.type==="intersection")return JF(n.left,r)||JF(n.right,r);if(n.type==="record"||n.type==="map")return JF(n.keyType,r)||JF(n.valueType,r);if(n.type==="pipe")return JF(n.in,r)||JF(n.out,r);if(n.type==="object"){for(let i in n.shape)if(JF(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(JF(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(JF(i,r))return!0;return!!(n.rest&&JF(n.rest,r))}return!1}var kEo,Ort,u3t=h(()=>{"use strict";a3t();kEo=(e,t={})=>r=>{let n=zve({...r,processors:t});return Xh(e,n),Qve(n,e),Mve(n,e)},Ort=(e,t,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},s=zve({...i??{},target:o,io:t,processors:r});return Xh(e,s),Qve(s,e),Mve(s,e)}});function NFr(e,t){if("_idmap"in e){let n=e,i=zve({...t,processors:RFr}),o={};for(let c of n._idmap.entries()){let[l,u]=c;Xh(u,i)}let s={},a={registry:n,uri:t?.uri,defs:o};i.external=a;for(let c of n._idmap.entries()){let[l,u]=c;Qve(i,u),s[l]=Mve(i,u)}if(Object.keys(o).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:o}}return{schemas:s}}let r=zve({...t,processors:RFr});return Xh(e,r),Qve(r,e),Mve(r,e)}var l8d,FEo,NEo,jEo,zEo,QEo,MEo,LEo,_Eo,UEo,VEo,GEo,qEo,WEo,HEo,KEo,JEo,YEo,XEo,ZEo,$Eo,e0o,t0o,r0o,n0o,i0o,kFr,o0o,s0o,a0o,c0o,l0o,u0o,p0o,f0o,d0o,m0o,h0o,FFr,g0o,RFr,p3t=h(()=>{"use strict";u3t();Ga();l8d={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},FEo=(e,t,r,n)=>{let i=r;i.type="string";let{minimum:o,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof s=="number"&&(i.maxLength=s),a&&(i.format=l8d[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let u=[...c];u.length===1?i.pattern=u[0].source:u.length>1&&(i.allOf=[...u.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},NEo=(e,t,r,n)=>{let i=r,{minimum:o,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number",typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof o=="number"&&(i.minimum=o,typeof u=="number"&&t.target!=="draft-04"&&(u>=o?delete i.minimum:delete i.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof s=="number"&&(i.maximum=s,typeof l=="number"&&t.target!=="draft-04"&&(l<=s?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},jEo=(e,t,r,n)=>{r.type="boolean"},zEo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},QEo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},MEo=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},LEo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},_Eo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},UEo=(e,t,r,n)=>{r.not={}},VEo=(e,t,r,n)=>{},GEo=(e,t,r,n)=>{},qEo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},WEo=(e,t,r,n)=>{let i=e._zod.def,o=q6t(i.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},HEo=(e,t,r,n)=>{let i=e._zod.def,o=[];for(let s of i.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o},KEo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},JEo=(e,t,r,n)=>{let i=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},YEo=(e,t,r,n)=>{let i=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=e._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),c?c.length===1?(o.contentMediaType=c[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(i,o)},XEo=(e,t,r,n)=>{r.type="boolean"},ZEo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},$Eo=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},e0o=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},t0o=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},r0o=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},n0o=(e,t,r,n)=>{let i=r,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(i.minItems=s),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=Xh(o.element,t,{...n,path:[...n.path,"items"]})},i0o=(e,t,r,n)=>{let i=r,o=e._zod.def;i.type="object",i.properties={};let s=o.shape;for(let l in s)i.properties[l]=Xh(s[l],t,{...n,path:[...n.path,"properties",l]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{let u=o.shape[l]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));c.size>0&&(i.required=Array.from(c)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=Xh(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},kFr=(e,t,r,n)=>{let i=e._zod.def,o=i.inclusive===!1,s=i.options.map((a,c)=>Xh(a,t,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s},o0o=(e,t,r,n)=>{let i=e._zod.def,o=Xh(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=Xh(i.right,t,{...n,path:[...n.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=c},s0o=(e,t,r,n)=>{let i=r,o=e._zod.def;i.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((d,f)=>Xh(d,t,{...n,path:[...n.path,s,f]})),l=o.rest?Xh(o.rest,t,{...n,path:[...n.path,a,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=c,l&&(i.items=l)):t.target==="openapi-3.0"?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:p}=e._zod.bag;typeof u=="number"&&(i.minItems=u),typeof p=="number"&&(i.maxItems=p)},a0o=(e,t,r,n)=>{let i=r,o=e._zod.def;i.type="object";let s=o.keyType,c=s._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let u=Xh(o.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let p of c)i.patternProperties[p.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=Xh(o.keyType,t,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=Xh(o.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let l=s._zod.values;if(l){let u=[...l].filter(p=>typeof p=="string"||typeof p=="number");u.length>0&&(i.required=u)}},c0o=(e,t,r,n)=>{let i=e._zod.def,o=Xh(i.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},l0o=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},u0o=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},p0o=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},f0o=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},d0o=(e,t,r,n)=>{let i=e._zod.def,o=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Xh(o,t,n);let s=t.seen.get(e);s.ref=o},m0o=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType,r.readOnly=!0},h0o=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},FFr=(e,t,r,n)=>{let i=e._zod.def;Xh(i.innerType,t,n);let o=t.seen.get(e);o.ref=i.innerType},g0o=(e,t,r,n)=>{let i=e._zod.innerType;Xh(i,t,n);let o=t.seen.get(e);o.ref=i},RFr={string:FEo,number:NEo,boolean:jEo,bigint:zEo,symbol:QEo,null:MEo,undefined:LEo,void:_Eo,never:UEo,any:VEo,unknown:GEo,date:qEo,enum:WEo,literal:HEo,nan:KEo,template_literal:JEo,file:YEo,success:XEo,custom:ZEo,function:$Eo,transform:e0o,map:t0o,set:r0o,array:n0o,object:i0o,union:kFr,intersection:o0o,tuple:s0o,record:a0o,nullable:c0o,nonoptional:l0o,default:u0o,prefault:p0o,catch:f0o,pipe:d0o,readonly:m0o,promise:h0o,optional:FFr,lazy:g0o}});var jFr,LWc=h(()=>{"use strict";p3t();u3t();jFr=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=zve({processors:RFr,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return Xh(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),Qve(this.ctx,t);let n=Mve(this.ctx,t),{"~standard":i,...o}=n;return o}}});var _Wc={};var UWc=h(()=>{"use strict"});var Hfe={};ne(Hfe,{$ZodAny:()=>lbo,$ZodArray:()=>mbo,$ZodAsyncError:()=>MH,$ZodBase64:()=>$yo,$ZodBase64URL:()=>ebo,$ZodBigInt:()=>$kr,$ZodBigIntFormat:()=>obo,$ZodBoolean:()=>r3t,$ZodCIDRv4:()=>Yyo,$ZodCIDRv6:()=>Xyo,$ZodCUID:()=>Qyo,$ZodCUID2:()=>Myo,$ZodCatch:()=>Rbo,$ZodCheck:()=>GA,$ZodCheckBigIntFormat:()=>fyo,$ZodCheckEndsWith:()=>xyo,$ZodCheckGreaterThan:()=>qkr,$ZodCheckIncludes:()=>vyo,$ZodCheckLengthEquals:()=>yyo,$ZodCheckLessThan:()=>Gkr,$ZodCheckLowerCase:()=>Eyo,$ZodCheckMaxLength:()=>gyo,$ZodCheckMaxSize:()=>dyo,$ZodCheckMimeType:()=>wyo,$ZodCheckMinLength:()=>Ayo,$ZodCheckMinSize:()=>myo,$ZodCheckMultipleOf:()=>uyo,$ZodCheckNumberFormat:()=>pyo,$ZodCheckOverwrite:()=>Tyo,$ZodCheckProperty:()=>Syo,$ZodCheckRegex:()=>byo,$ZodCheckSizeEquals:()=>hyo,$ZodCheckStartsWith:()=>Cyo,$ZodCheckStringFormat:()=>drt,$ZodCheckUpperCase:()=>Iyo,$ZodCodec:()=>i3t,$ZodCustom:()=>Lbo,$ZodCustomStringFormat:()=>nbo,$ZodDate:()=>dbo,$ZodDefault:()=>Obo,$ZodDiscriminatedUnion:()=>Abo,$ZodE164:()=>tbo,$ZodEmail:()=>Fyo,$ZodEmoji:()=>jyo,$ZodEncodeError:()=>Bve,$ZodEnum:()=>vbo,$ZodError:()=>Y6t,$ZodExactOptional:()=>wbo,$ZodFile:()=>xbo,$ZodFunction:()=>zbo,$ZodGUID:()=>Ryo,$ZodIPv4:()=>Hyo,$ZodIPv6:()=>Kyo,$ZodISODate:()=>Gyo,$ZodISODateTime:()=>Vyo,$ZodISODuration:()=>Wyo,$ZodISOTime:()=>qyo,$ZodIntersection:()=>ybo,$ZodJWT:()=>rbo,$ZodKSUID:()=>Uyo,$ZodLazy:()=>Mbo,$ZodLiteral:()=>Cbo,$ZodMAC:()=>Jyo,$ZodMap:()=>Ebo,$ZodNaN:()=>kbo,$ZodNanoID:()=>zyo,$ZodNever:()=>pbo,$ZodNonOptional:()=>Bbo,$ZodNull:()=>cbo,$ZodNullable:()=>Tbo,$ZodNumber:()=>Zkr,$ZodNumberFormat:()=>ibo,$ZodObject:()=>K9c,$ZodObjectJIT:()=>hbo,$ZodOptional:()=>tFr,$ZodPipe:()=>Fbo,$ZodPrefault:()=>Pbo,$ZodPromise:()=>Qbo,$ZodReadonly:()=>Nbo,$ZodRealError:()=>Hz,$ZodRecord:()=>bbo,$ZodRegistry:()=>oFr,$ZodSet:()=>Ibo,$ZodString:()=>i3e,$ZodStringFormat:()=>AA,$ZodSuccess:()=>Dbo,$ZodSymbol:()=>sbo,$ZodTemplateLiteral:()=>jbo,$ZodTransform:()=>Sbo,$ZodTuple:()=>eFr,$ZodType:()=>Zl,$ZodULID:()=>Lyo,$ZodURL:()=>Nyo,$ZodUUID:()=>kyo,$ZodUndefined:()=>abo,$ZodUnion:()=>n3t,$ZodUnknown:()=>ubo,$ZodVoid:()=>fbo,$ZodXID:()=>_yo,$ZodXor:()=>gbo,$brand:()=>Okr,$constructor:()=>wr,$input:()=>Hbo,$output:()=>Wbo,Doc:()=>t3t,JSONSchema:()=>_Wc,JSONSchemaGenerator:()=>jFr,NEVER:()=>bAo,TimePrecision:()=>Xbo,_any:()=>yEo,_array:()=>SEo,_base64:()=>CFr,_base64url:()=>xFr,_bigint:()=>pEo,_boolean:()=>lEo,_catch:()=>n8d,_check:()=>QWc,_cidrv4:()=>IFr,_cidrv6:()=>vFr,_coercedBigint:()=>fEo,_coercedBoolean:()=>uEo,_coercedDate:()=>CEo,_coercedNumber:()=>nEo,_coercedString:()=>Jbo,_cuid:()=>mFr,_cuid2:()=>hFr,_custom:()=>TEo,_date:()=>vEo,_decode:()=>Fkr,_decodeAsync:()=>jkr,_default:()=>e8d,_discriminatedUnion:()=>U5d,_e164:()=>SFr,_email:()=>aFr,_emoji:()=>fFr,_encode:()=>kkr,_encodeAsync:()=>Nkr,_endsWith:()=>Ert,_enum:()=>K5d,_file:()=>wEo,_float32:()=>oEo,_float64:()=>sEo,_gt:()=>Ree,_gte:()=>KF,_guid:()=>c3t,_includes:()=>yrt,_int:()=>iEo,_int32:()=>aEo,_int64:()=>dEo,_intersection:()=>V5d,_ipv4:()=>bFr,_ipv6:()=>EFr,_isoDate:()=>$bo,_isoDateTime:()=>Zbo,_isoDuration:()=>tEo,_isoTime:()=>eEo,_jwt:()=>wFr,_ksuid:()=>yFr,_lazy:()=>a8d,_length:()=>a3e,_literal:()=>Y5d,_lowercase:()=>grt,_lt:()=>Dee,_lte:()=>p3,_mac:()=>Ybo,_map:()=>W5d,_max:()=>p3,_maxLength:()=>s3e,_maxSize:()=>jve,_mime:()=>Irt,_min:()=>KF,_minLength:()=>Wfe,_minSize:()=>kee,_multipleOf:()=>Nve,_nan:()=>xEo,_nanoid:()=>dFr,_nativeEnum:()=>J5d,_negative:()=>OFr,_never:()=>EEo,_nonnegative:()=>BFr,_nonoptional:()=>t8d,_nonpositive:()=>PFr,_normalize:()=>vrt,_null:()=>AEo,_nullable:()=>$5d,_number:()=>rEo,_optional:()=>Z5d,_overwrite:()=>LH,_parse:()=>lrt,_parseAsync:()=>urt,_pipe:()=>i8d,_positive:()=>TFr,_promise:()=>c8d,_property:()=>DFr,_readonly:()=>o8d,_record:()=>q5d,_refine:()=>OEo,_regex:()=>hrt,_safeDecode:()=>Qkr,_safeDecodeAsync:()=>Lkr,_safeEncode:()=>zkr,_safeEncodeAsync:()=>Mkr,_safeParse:()=>prt,_safeParseAsync:()=>frt,_set:()=>H5d,_size:()=>o3e,_slugify:()=>wrt,_startsWith:()=>brt,_string:()=>Kbo,_stringFormat:()=>Trt,_stringbool:()=>REo,_success:()=>r8d,_superRefine:()=>PEo,_symbol:()=>hEo,_templateLiteral:()=>s8d,_toLowerCase:()=>xrt,_toUpperCase:()=>Srt,_transform:()=>X5d,_trim:()=>Crt,_tuple:()=>G5d,_uint32:()=>cEo,_uint64:()=>mEo,_ulid:()=>gFr,_undefined:()=>gEo,_union:()=>L5d,_unknown:()=>bEo,_uppercase:()=>Art,_url:()=>l3t,_uuid:()=>cFr,_uuidv4:()=>lFr,_uuidv6:()=>uFr,_uuidv7:()=>pFr,_void:()=>IEo,_xid:()=>AFr,_xor:()=>_5d,clone:()=>HF,config:()=>XI,createStandardJSONSchemaMethod:()=>Ort,createToJSONSchemaMethod:()=>kEo,decode:()=>pVd,decodeAsync:()=>dVd,describe:()=>BEo,encode:()=>uVd,encodeAsync:()=>fVd,extractDefs:()=>Qve,finalize:()=>Mve,flattenError:()=>X6t,formatError:()=>Z6t,globalConfig:()=>V6t,globalRegistry:()=>VP,initializeContext:()=>zve,isValidBase64:()=>Zyo,isValidBase64URL:()=>G9c,isValidJWT:()=>q9c,locales:()=>s3t,meta:()=>DEo,parse:()=>Dkr,parseAsync:()=>Rkr,prettifyError:()=>DAo,process:()=>Xh,regexes:()=>e5,registry:()=>sFr,safeDecode:()=>hVd,safeDecodeAsync:()=>AVd,safeEncode:()=>mVd,safeEncodeAsync:()=>gVd,safeParse:()=>kAo,safeParseAsync:()=>FAo,toDotPath:()=>w9c,toJSONSchema:()=>NFr,treeifyError:()=>BAo,util:()=>vi,version:()=>Pyo});var Kz=h(()=>{"use strict";ort();NAo();RAo();_bo();Wkr();Byo();Ga();Vkr();qbo();a3t();Oyo();MWc();u3t();p3t();LWc();UWc()});var zFr={};ne(zFr,{endsWith:()=>Ert,gt:()=>Ree,gte:()=>KF,includes:()=>yrt,length:()=>a3e,lowercase:()=>grt,lt:()=>Dee,lte:()=>p3,maxLength:()=>s3e,maxSize:()=>jve,mime:()=>Irt,minLength:()=>Wfe,minSize:()=>kee,multipleOf:()=>Nve,negative:()=>OFr,nonnegative:()=>BFr,nonpositive:()=>PFr,normalize:()=>vrt,overwrite:()=>LH,positive:()=>TFr,property:()=>DFr,regex:()=>hrt,size:()=>o3e,slugify:()=>wrt,startsWith:()=>brt,toLowerCase:()=>xrt,toUpperCase:()=>Srt,trim:()=>Crt,uppercase:()=>Art});var QFr=h(()=>{"use strict";Kz()});var Prt={};ne(Prt,{ZodISODate:()=>LFr,ZodISODateTime:()=>MFr,ZodISODuration:()=>UFr,ZodISOTime:()=>_Fr,date:()=>y0o,datetime:()=>A0o,duration:()=>E0o,time:()=>b0o});function A0o(e){return Zbo(MFr,e)}function y0o(e){return $bo(LFr,e)}function b0o(e){return eEo(_Fr,e)}function E0o(e){return tEo(UFr,e)}var MFr,LFr,_Fr,UFr,f3t=h(()=>{"use strict";Kz();m3t();MFr=wr("ZodISODateTime",(e,t)=>{Vyo.init(e,t),yA.init(e,t)});LFr=wr("ZodISODate",(e,t)=>{Gyo.init(e,t),yA.init(e,t)});_Fr=wr("ZodISOTime",(e,t)=>{qyo.init(e,t),yA.init(e,t)});UFr=wr("ZodISODuration",(e,t)=>{Wyo.init(e,t),yA.init(e,t)})});var VWc,p8d,Jz,I0o=h(()=>{"use strict";Kz();Kz();Ga();VWc=(e,t)=>{Y6t.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Z6t(e,r)},flatten:{value:r=>X6t(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,srt,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,srt,2)}},isEmpty:{get(){return e.issues.length===0}}})},p8d=wr("ZodError",VWc),Jz=wr("ZodError",VWc,{Parent:Error})});var v0o,C0o,x0o,S0o,w0o,T0o,O0o,P0o,B0o,D0o,R0o,k0o,F0o=h(()=>{"use strict";Kz();I0o();v0o=lrt(Jz),C0o=urt(Jz),x0o=prt(Jz),S0o=frt(Jz),w0o=kkr(Jz),T0o=Fkr(Jz),O0o=Nkr(Jz),P0o=jkr(Jz),B0o=zkr(Jz),D0o=Qkr(Jz),R0o=Mkr(Jz),k0o=Lkr(Jz)});var d3t={};ne(d3t,{ZodAny:()=>U0o,ZodArray:()=>W0o,ZodBase64:()=>i2r,ZodBase64URL:()=>o2r,ZodBigInt:()=>Nrt,ZodBigIntFormat:()=>c2r,ZodBoolean:()=>Frt,ZodCIDRv4:()=>r2r,ZodCIDRv6:()=>n2r,ZodCUID:()=>JFr,ZodCUID2:()=>YFr,ZodCatch:()=>mIo,ZodCodec:()=>g2r,ZodCustom:()=>S3t,ZodCustomStringFormat:()=>Rrt,ZodDate:()=>E3t,ZodDefault:()=>cIo,ZodDiscriminatedUnion:()=>K0o,ZodE164:()=>s2r,ZodEmail:()=>WFr,ZodEmoji:()=>HFr,ZodEnum:()=>Brt,ZodExactOptional:()=>oIo,ZodFile:()=>nIo,ZodFunction:()=>CIo,ZodGUID:()=>h3t,ZodIPv4:()=>e2r,ZodIPv6:()=>t2r,ZodIntersection:()=>J0o,ZodJWT:()=>a2r,ZodKSUID:()=>$Fr,ZodLazy:()=>EIo,ZodLiteral:()=>rIo,ZodMAC:()=>N0o,ZodMap:()=>eIo,ZodNaN:()=>gIo,ZodNanoID:()=>KFr,ZodNever:()=>G0o,ZodNonOptional:()=>m2r,ZodNull:()=>L0o,ZodNullable:()=>aIo,ZodNumber:()=>krt,ZodNumberFormat:()=>l3e,ZodObject:()=>v3t,ZodOptional:()=>d2r,ZodPipe:()=>h2r,ZodPrefault:()=>uIo,ZodPromise:()=>vIo,ZodReadonly:()=>AIo,ZodRecord:()=>x3t,ZodSet:()=>tIo,ZodString:()=>Drt,ZodStringFormat:()=>yA,ZodSuccess:()=>dIo,ZodSymbol:()=>Q0o,ZodTemplateLiteral:()=>bIo,ZodTransform:()=>iIo,ZodTuple:()=>X0o,ZodType:()=>mp,ZodULID:()=>XFr,ZodURL:()=>b3t,ZodUUID:()=>Fee,ZodUndefined:()=>M0o,ZodUnion:()=>C3t,ZodUnknown:()=>V0o,ZodVoid:()=>q0o,ZodXID:()=>ZFr,ZodXor:()=>H0o,_ZodString:()=>qFr,_default:()=>lIo,_function:()=>J7c,any:()=>T7c,array:()=>I3t,base64:()=>u7c,base64url:()=>p7c,bigint:()=>v7c,boolean:()=>z0o,catch:()=>hIo,check:()=>Y7c,cidrv4:()=>c7c,cidrv6:()=>l7c,codec:()=>W7c,cuid:()=>e7c,cuid2:()=>t7c,custom:()=>X7c,date:()=>P7c,describe:()=>Z7c,discriminatedUnion:()=>N7c,e164:()=>f7c,email:()=>GWc,emoji:()=>ZWc,enum:()=>p2r,exactOptional:()=>sIo,file:()=>U7c,float32:()=>y7c,float64:()=>b7c,function:()=>J7c,guid:()=>qWc,hash:()=>A7c,hex:()=>g7c,hostname:()=>h7c,httpUrl:()=>XWc,instanceof:()=>eHc,int:()=>GFr,int32:()=>E7c,int64:()=>C7c,intersection:()=>Y0o,ipv4:()=>o7c,ipv6:()=>a7c,json:()=>rHc,jwt:()=>d7c,keyof:()=>B7c,ksuid:()=>i7c,lazy:()=>IIo,literal:()=>_7c,looseObject:()=>k7c,looseRecord:()=>z7c,mac:()=>s7c,map:()=>Q7c,meta:()=>$7c,nan:()=>q7c,nanoid:()=>$Wc,nativeEnum:()=>L7c,never:()=>l2r,nonoptional:()=>fIo,null:()=>_0o,nullable:()=>A3t,nullish:()=>V7c,number:()=>j0o,object:()=>D7c,optional:()=>g3t,partialRecord:()=>j7c,pipe:()=>y3t,prefault:()=>pIo,preprocess:()=>nHc,promise:()=>K7c,readonly:()=>yIo,record:()=>$0o,refine:()=>xIo,set:()=>M7c,strictObject:()=>R7c,string:()=>VFr,stringFormat:()=>m7c,stringbool:()=>tHc,success:()=>G7c,superRefine:()=>SIo,symbol:()=>S7c,templateLiteral:()=>H7c,transform:()=>f2r,tuple:()=>Z0o,uint32:()=>I7c,uint64:()=>x7c,ulid:()=>r7c,undefined:()=>w7c,union:()=>u2r,unknown:()=>c3e,url:()=>YWc,uuid:()=>WWc,uuidv4:()=>HWc,uuidv6:()=>KWc,uuidv7:()=>JWc,void:()=>O7c,xid:()=>n7c,xor:()=>F7c});function VFr(e){return Kbo(Drt,e)}function GWc(e){return aFr(WFr,e)}function qWc(e){return c3t(h3t,e)}function WWc(e){return cFr(Fee,e)}function HWc(e){return lFr(Fee,e)}function KWc(e){return uFr(Fee,e)}function JWc(e){return pFr(Fee,e)}function YWc(e){return l3t(b3t,e)}function XWc(e){return l3t(b3t,{protocol:/^https?$/,hostname:e5.domain,...vi.normalizeParams(e)})}function ZWc(e){return fFr(HFr,e)}function $Wc(e){return dFr(KFr,e)}function e7c(e){return mFr(JFr,e)}function t7c(e){return hFr(YFr,e)}function r7c(e){return gFr(XFr,e)}function n7c(e){return AFr(ZFr,e)}function i7c(e){return yFr($Fr,e)}function o7c(e){return bFr(e2r,e)}function s7c(e){return Ybo(N0o,e)}function a7c(e){return EFr(t2r,e)}function c7c(e){return IFr(r2r,e)}function l7c(e){return vFr(n2r,e)}function u7c(e){return CFr(i2r,e)}function p7c(e){return xFr(o2r,e)}function f7c(e){return SFr(s2r,e)}function d7c(e){return wFr(a2r,e)}function m7c(e,t,r={}){return Trt(Rrt,e,t,r)}function h7c(e){return Trt(Rrt,"hostname",e5.hostname,e)}function g7c(e){return Trt(Rrt,"hex",e5.hex,e)}function A7c(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,i=e5[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Trt(Rrt,n,i,t)}function j0o(e){return rEo(krt,e)}function GFr(e){return iEo(l3e,e)}function y7c(e){return oEo(l3e,e)}function b7c(e){return sEo(l3e,e)}function E7c(e){return aEo(l3e,e)}function I7c(e){return cEo(l3e,e)}function z0o(e){return lEo(Frt,e)}function v7c(e){return pEo(Nrt,e)}function C7c(e){return dEo(c2r,e)}function x7c(e){return mEo(c2r,e)}function S7c(e){return hEo(Q0o,e)}function w7c(e){return gEo(M0o,e)}function _0o(e){return AEo(L0o,e)}function T7c(){return yEo(U0o)}function c3e(){return bEo(V0o)}function l2r(e){return EEo(G0o,e)}function O7c(e){return IEo(q0o,e)}function P7c(e){return vEo(E3t,e)}function I3t(e,t){return SEo(W0o,e,t)}function B7c(e){let t=e._zod.def.shape;return p2r(Object.keys(t))}function D7c(e,t){let r={type:"object",shape:e??{},...vi.normalizeParams(t)};return new v3t(r)}function R7c(e,t){return new v3t({type:"object",shape:e,catchall:l2r(),...vi.normalizeParams(t)})}function k7c(e,t){return new v3t({type:"object",shape:e,catchall:c3e(),...vi.normalizeParams(t)})}function u2r(e,t){return new C3t({type:"union",options:e,...vi.normalizeParams(t)})}function F7c(e,t){return new H0o({type:"union",options:e,inclusive:!1,...vi.normalizeParams(t)})}function N7c(e,t,r){return new K0o({type:"union",options:t,discriminator:e,...vi.normalizeParams(r)})}function Y0o(e,t){return new J0o({type:"intersection",left:e,right:t})}function Z0o(e,t,r){let n=t instanceof Zl,i=n?r:t,o=n?t:null;return new X0o({type:"tuple",items:e,rest:o,...vi.normalizeParams(i)})}function $0o(e,t,r){return new x3t({type:"record",keyType:e,valueType:t,...vi.normalizeParams(r)})}function j7c(e,t,r){let n=HF(e);return n._zod.values=void 0,new x3t({type:"record",keyType:n,valueType:t,...vi.normalizeParams(r)})}function z7c(e,t,r){return new x3t({type:"record",keyType:e,valueType:t,mode:"loose",...vi.normalizeParams(r)})}function Q7c(e,t,r){return new eIo({type:"map",keyType:e,valueType:t,...vi.normalizeParams(r)})}function M7c(e,t){return new tIo({type:"set",valueType:e,...vi.normalizeParams(t)})}function p2r(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Brt({type:"enum",entries:r,...vi.normalizeParams(t)})}function L7c(e,t){return new Brt({type:"enum",entries:e,...vi.normalizeParams(t)})}function _7c(e,t){return new rIo({type:"literal",values:Array.isArray(e)?e:[e],...vi.normalizeParams(t)})}function U7c(e){return wEo(nIo,e)}function f2r(e){return new iIo({type:"transform",transform:e})}function g3t(e){return new d2r({type:"optional",innerType:e})}function sIo(e){return new oIo({type:"optional",innerType:e})}function A3t(e){return new aIo({type:"nullable",innerType:e})}function V7c(e){return g3t(A3t(e))}function lIo(e,t){return new cIo({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():vi.shallowClone(t)}})}function pIo(e,t){return new uIo({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():vi.shallowClone(t)}})}function fIo(e,t){return new m2r({type:"nonoptional",innerType:e,...vi.normalizeParams(t)})}function G7c(e){return new dIo({type:"success",innerType:e})}function hIo(e,t){return new mIo({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function q7c(e){return xEo(gIo,e)}function y3t(e,t){return new h2r({type:"pipe",in:e,out:t})}function W7c(e,t,r){return new g2r({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function yIo(e){return new AIo({type:"readonly",innerType:e})}function H7c(e,t){return new bIo({type:"template_literal",parts:e,...vi.normalizeParams(t)})}function IIo(e){return new EIo({type:"lazy",getter:e})}function K7c(e){return new vIo({type:"promise",innerType:e})}function J7c(e){return new CIo({type:"function",input:Array.isArray(e?.input)?Z0o(e?.input):e?.input??I3t(c3e()),output:e?.output??c3e()})}function Y7c(e){let t=new GA({check:"custom"});return t._zod.check=e,t}function X7c(e,t){return TEo(S3t,e??(()=>!0),t)}function xIo(e,t={}){return OEo(S3t,e,t)}function SIo(e){return PEo(e)}function eHc(e,t={}){let r=new S3t({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...vi.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}function rHc(e){let t=IIo(()=>u2r([VFr(e),j0o(),z0o(),_0o(),I3t(t),$0o(VFr(),t)]));return t}function nHc(e,t){return y3t(f2r(e),t)}var mp,qFr,Drt,yA,WFr,h3t,Fee,b3t,HFr,KFr,JFr,YFr,XFr,ZFr,$Fr,e2r,N0o,t2r,r2r,n2r,i2r,o2r,s2r,a2r,Rrt,krt,l3e,Frt,Nrt,c2r,Q0o,M0o,L0o,U0o,V0o,G0o,q0o,E3t,W0o,v3t,C3t,H0o,K0o,J0o,X0o,x3t,eIo,tIo,Brt,rIo,nIo,iIo,d2r,oIo,aIo,cIo,uIo,m2r,dIo,mIo,gIo,h2r,g2r,AIo,bIo,EIo,vIo,CIo,S3t,Z7c,$7c,tHc,m3t=h(()=>{"use strict";Kz();Kz();p3t();u3t();QFr();f3t();F0o();mp=wr("ZodType",(e,t)=>(Zl.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ort(e,"input"),output:Ort(e,"output")}}),e.toJSONSchema=kEo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(vi.mergeDefs(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>HF(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>v0o(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>x0o(e,r,n),e.parseAsync=async(r,n)=>C0o(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>S0o(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>w0o(e,r,n),e.decode=(r,n)=>T0o(e,r,n),e.encodeAsync=async(r,n)=>O0o(e,r,n),e.decodeAsync=async(r,n)=>P0o(e,r,n),e.safeEncode=(r,n)=>B0o(e,r,n),e.safeDecode=(r,n)=>D0o(e,r,n),e.safeEncodeAsync=async(r,n)=>R0o(e,r,n),e.safeDecodeAsync=async(r,n)=>k0o(e,r,n),e.refine=(r,n)=>e.check(xIo(r,n)),e.superRefine=r=>e.check(SIo(r)),e.overwrite=r=>e.check(LH(r)),e.optional=()=>g3t(e),e.exactOptional=()=>sIo(e),e.nullable=()=>A3t(e),e.nullish=()=>g3t(A3t(e)),e.nonoptional=r=>fIo(e,r),e.array=()=>I3t(e),e.or=r=>u2r([e,r]),e.and=r=>Y0o(e,r),e.transform=r=>y3t(e,f2r(r)),e.default=r=>lIo(e,r),e.prefault=r=>pIo(e,r),e.catch=r=>hIo(e,r),e.pipe=r=>y3t(e,r),e.readonly=()=>yIo(e),e.describe=r=>{let n=e.clone();return VP.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return VP.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return VP.get(e);let n=e.clone();return VP.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),qFr=wr("_ZodString",(e,t)=>{i3e.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>FEo(e,n,i,o);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(hrt(...n)),e.includes=(...n)=>e.check(yrt(...n)),e.startsWith=(...n)=>e.check(brt(...n)),e.endsWith=(...n)=>e.check(Ert(...n)),e.min=(...n)=>e.check(Wfe(...n)),e.max=(...n)=>e.check(s3e(...n)),e.length=(...n)=>e.check(a3e(...n)),e.nonempty=(...n)=>e.check(Wfe(1,...n)),e.lowercase=n=>e.check(grt(n)),e.uppercase=n=>e.check(Art(n)),e.trim=()=>e.check(Crt()),e.normalize=(...n)=>e.check(vrt(...n)),e.toLowerCase=()=>e.check(xrt()),e.toUpperCase=()=>e.check(Srt()),e.slugify=()=>e.check(wrt())}),Drt=wr("ZodString",(e,t)=>{i3e.init(e,t),qFr.init(e,t),e.email=r=>e.check(aFr(WFr,r)),e.url=r=>e.check(l3t(b3t,r)),e.jwt=r=>e.check(wFr(a2r,r)),e.emoji=r=>e.check(fFr(HFr,r)),e.guid=r=>e.check(c3t(h3t,r)),e.uuid=r=>e.check(cFr(Fee,r)),e.uuidv4=r=>e.check(lFr(Fee,r)),e.uuidv6=r=>e.check(uFr(Fee,r)),e.uuidv7=r=>e.check(pFr(Fee,r)),e.nanoid=r=>e.check(dFr(KFr,r)),e.guid=r=>e.check(c3t(h3t,r)),e.cuid=r=>e.check(mFr(JFr,r)),e.cuid2=r=>e.check(hFr(YFr,r)),e.ulid=r=>e.check(gFr(XFr,r)),e.base64=r=>e.check(CFr(i2r,r)),e.base64url=r=>e.check(xFr(o2r,r)),e.xid=r=>e.check(AFr(ZFr,r)),e.ksuid=r=>e.check(yFr($Fr,r)),e.ipv4=r=>e.check(bFr(e2r,r)),e.ipv6=r=>e.check(EFr(t2r,r)),e.cidrv4=r=>e.check(IFr(r2r,r)),e.cidrv6=r=>e.check(vFr(n2r,r)),e.e164=r=>e.check(SFr(s2r,r)),e.datetime=r=>e.check(A0o(r)),e.date=r=>e.check(y0o(r)),e.time=r=>e.check(b0o(r)),e.duration=r=>e.check(E0o(r))});yA=wr("ZodStringFormat",(e,t)=>{AA.init(e,t),qFr.init(e,t)}),WFr=wr("ZodEmail",(e,t)=>{Fyo.init(e,t),yA.init(e,t)});h3t=wr("ZodGUID",(e,t)=>{Ryo.init(e,t),yA.init(e,t)});Fee=wr("ZodUUID",(e,t)=>{kyo.init(e,t),yA.init(e,t)});b3t=wr("ZodURL",(e,t)=>{Nyo.init(e,t),yA.init(e,t)});HFr=wr("ZodEmoji",(e,t)=>{jyo.init(e,t),yA.init(e,t)});KFr=wr("ZodNanoID",(e,t)=>{zyo.init(e,t),yA.init(e,t)});JFr=wr("ZodCUID",(e,t)=>{Qyo.init(e,t),yA.init(e,t)});YFr=wr("ZodCUID2",(e,t)=>{Myo.init(e,t),yA.init(e,t)});XFr=wr("ZodULID",(e,t)=>{Lyo.init(e,t),yA.init(e,t)});ZFr=wr("ZodXID",(e,t)=>{_yo.init(e,t),yA.init(e,t)});$Fr=wr("ZodKSUID",(e,t)=>{Uyo.init(e,t),yA.init(e,t)});e2r=wr("ZodIPv4",(e,t)=>{Hyo.init(e,t),yA.init(e,t)});N0o=wr("ZodMAC",(e,t)=>{Jyo.init(e,t),yA.init(e,t)});t2r=wr("ZodIPv6",(e,t)=>{Kyo.init(e,t),yA.init(e,t)});r2r=wr("ZodCIDRv4",(e,t)=>{Yyo.init(e,t),yA.init(e,t)});n2r=wr("ZodCIDRv6",(e,t)=>{Xyo.init(e,t),yA.init(e,t)});i2r=wr("ZodBase64",(e,t)=>{$yo.init(e,t),yA.init(e,t)});o2r=wr("ZodBase64URL",(e,t)=>{ebo.init(e,t),yA.init(e,t)});s2r=wr("ZodE164",(e,t)=>{tbo.init(e,t),yA.init(e,t)});a2r=wr("ZodJWT",(e,t)=>{rbo.init(e,t),yA.init(e,t)});Rrt=wr("ZodCustomStringFormat",(e,t)=>{nbo.init(e,t),yA.init(e,t)});krt=wr("ZodNumber",(e,t)=>{Zkr.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>NEo(e,n,i,o),e.gt=(n,i)=>e.check(Ree(n,i)),e.gte=(n,i)=>e.check(KF(n,i)),e.min=(n,i)=>e.check(KF(n,i)),e.lt=(n,i)=>e.check(Dee(n,i)),e.lte=(n,i)=>e.check(p3(n,i)),e.max=(n,i)=>e.check(p3(n,i)),e.int=n=>e.check(GFr(n)),e.safe=n=>e.check(GFr(n)),e.positive=n=>e.check(Ree(0,n)),e.nonnegative=n=>e.check(KF(0,n)),e.negative=n=>e.check(Dee(0,n)),e.nonpositive=n=>e.check(p3(0,n)),e.multipleOf=(n,i)=>e.check(Nve(n,i)),e.step=(n,i)=>e.check(Nve(n,i)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});l3e=wr("ZodNumberFormat",(e,t)=>{ibo.init(e,t),krt.init(e,t)});Frt=wr("ZodBoolean",(e,t)=>{r3t.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jEo(e,r,n,i)});Nrt=wr("ZodBigInt",(e,t)=>{$kr.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>zEo(e,n,i,o),e.gte=(n,i)=>e.check(KF(n,i)),e.min=(n,i)=>e.check(KF(n,i)),e.gt=(n,i)=>e.check(Ree(n,i)),e.gte=(n,i)=>e.check(KF(n,i)),e.min=(n,i)=>e.check(KF(n,i)),e.lt=(n,i)=>e.check(Dee(n,i)),e.lte=(n,i)=>e.check(p3(n,i)),e.max=(n,i)=>e.check(p3(n,i)),e.positive=n=>e.check(Ree(BigInt(0),n)),e.negative=n=>e.check(Dee(BigInt(0),n)),e.nonpositive=n=>e.check(p3(BigInt(0),n)),e.nonnegative=n=>e.check(KF(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(Nve(n,i));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});c2r=wr("ZodBigIntFormat",(e,t)=>{obo.init(e,t),Nrt.init(e,t)});Q0o=wr("ZodSymbol",(e,t)=>{sbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>QEo(e,r,n,i)});M0o=wr("ZodUndefined",(e,t)=>{abo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>LEo(e,r,n,i)});L0o=wr("ZodNull",(e,t)=>{cbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>MEo(e,r,n,i)});U0o=wr("ZodAny",(e,t)=>{lbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>VEo(e,r,n,i)});V0o=wr("ZodUnknown",(e,t)=>{ubo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>GEo(e,r,n,i)});G0o=wr("ZodNever",(e,t)=>{pbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>UEo(e,r,n,i)});q0o=wr("ZodVoid",(e,t)=>{fbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_Eo(e,r,n,i)});E3t=wr("ZodDate",(e,t)=>{dbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>qEo(e,n,i,o),e.min=(n,i)=>e.check(KF(n,i)),e.max=(n,i)=>e.check(p3(n,i));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});W0o=wr("ZodArray",(e,t)=>{mbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>n0o(e,r,n,i),e.element=t.element,e.min=(r,n)=>e.check(Wfe(r,n)),e.nonempty=r=>e.check(Wfe(1,r)),e.max=(r,n)=>e.check(s3e(r,n)),e.length=(r,n)=>e.check(a3e(r,n)),e.unwrap=()=>e.element});v3t=wr("ZodObject",(e,t)=>{hbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>i0o(e,r,n,i),vi.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>p2r(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:c3e()}),e.loose=()=>e.clone({...e._zod.def,catchall:c3e()}),e.strict=()=>e.clone({...e._zod.def,catchall:l2r()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>vi.extend(e,r),e.safeExtend=r=>vi.safeExtend(e,r),e.merge=r=>vi.merge(e,r),e.pick=r=>vi.pick(e,r),e.omit=r=>vi.omit(e,r),e.partial=(...r)=>vi.partial(d2r,e,r[0]),e.required=(...r)=>vi.required(m2r,e,r[0])});C3t=wr("ZodUnion",(e,t)=>{n3t.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kFr(e,r,n,i),e.options=t.options});H0o=wr("ZodXor",(e,t)=>{C3t.init(e,t),gbo.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kFr(e,r,n,i),e.options=t.options});K0o=wr("ZodDiscriminatedUnion",(e,t)=>{C3t.init(e,t),Abo.init(e,t)});J0o=wr("ZodIntersection",(e,t)=>{ybo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>o0o(e,r,n,i)});X0o=wr("ZodTuple",(e,t)=>{eFr.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>s0o(e,r,n,i),e.rest=r=>e.clone({...e._zod.def,rest:r})});x3t=wr("ZodRecord",(e,t)=>{bbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>a0o(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType});eIo=wr("ZodMap",(e,t)=>{Ebo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>t0o(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(kee(...r)),e.nonempty=r=>e.check(kee(1,r)),e.max=(...r)=>e.check(jve(...r)),e.size=(...r)=>e.check(o3e(...r))});tIo=wr("ZodSet",(e,t)=>{Ibo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>r0o(e,r,n,i),e.min=(...r)=>e.check(kee(...r)),e.nonempty=r=>e.check(kee(1,r)),e.max=(...r)=>e.check(jve(...r)),e.size=(...r)=>e.check(o3e(...r))});Brt=wr("ZodEnum",(e,t)=>{vbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(n,i,o)=>WEo(e,n,i,o),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{let o={};for(let s of n)if(r.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Brt({...t,checks:[],...vi.normalizeParams(i),entries:o})},e.exclude=(n,i)=>{let o={...t.entries};for(let s of n)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new Brt({...t,checks:[],...vi.normalizeParams(i),entries:o})}});rIo=wr("ZodLiteral",(e,t)=>{Cbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>HEo(e,r,n,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});nIo=wr("ZodFile",(e,t)=>{xbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>YEo(e,r,n,i),e.min=(r,n)=>e.check(kee(r,n)),e.max=(r,n)=>e.check(jve(r,n)),e.mime=(r,n)=>e.check(Irt(Array.isArray(r)?r:[r],n))});iIo=wr("ZodTransform",(e,t)=>{Sbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>e0o(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Bve(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(vi.issue(o,r.value,t));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(vi.issue(s))}};let i=t.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});d2r=wr("ZodOptional",(e,t)=>{tFr.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>FFr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});oIo=wr("ZodExactOptional",(e,t)=>{wbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>FFr(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});aIo=wr("ZodNullable",(e,t)=>{Tbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>c0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});cIo=wr("ZodDefault",(e,t)=>{Obo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>u0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});uIo=wr("ZodPrefault",(e,t)=>{Pbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>p0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});m2r=wr("ZodNonOptional",(e,t)=>{Bbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>l0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});dIo=wr("ZodSuccess",(e,t)=>{Dbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>XEo(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});mIo=wr("ZodCatch",(e,t)=>{Rbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>f0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});gIo=wr("ZodNaN",(e,t)=>{kbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>KEo(e,r,n,i)});h2r=wr("ZodPipe",(e,t)=>{Fbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>d0o(e,r,n,i),e.in=t.in,e.out=t.out});g2r=wr("ZodCodec",(e,t)=>{h2r.init(e,t),i3t.init(e,t)});AIo=wr("ZodReadonly",(e,t)=>{Nbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>m0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});bIo=wr("ZodTemplateLiteral",(e,t)=>{jbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>JEo(e,r,n,i)});EIo=wr("ZodLazy",(e,t)=>{Mbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>g0o(e,r,n,i),e.unwrap=()=>e._zod.def.getter()});vIo=wr("ZodPromise",(e,t)=>{Qbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>h0o(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});CIo=wr("ZodFunction",(e,t)=>{zbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$Eo(e,r,n,i)});S3t=wr("ZodCustom",(e,t)=>{Lbo.init(e,t),mp.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ZEo(e,r,n,i)});Z7c=BEo,$7c=DEo;tHc=(...e)=>REo({Codec:g2r,Boolean:Frt,String:Drt},...e)});function m8d(e){XI({customError:e})}function h8d(){return XI().customError}var d8d,wIo,iHc=h(()=>{"use strict";Kz();Kz();d8d={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};wIo||(wIo={})});function A8d(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function y8d(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let i=r[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}function oHc(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return jo.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let i=e.$ref;if(t.refs.has(i))return t.refs.get(i);if(t.processing.has(i))return jo.lazy(()=>{if(!t.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return t.refs.get(i)});t.processing.add(i);let o=y8d(i,t),s=MD(o,t);return t.refs.set(i,s),t.processing.delete(i),s}if(e.enum!==void 0){let i=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&i.length===1&&i[0]===null)return jo.null();if(i.length===0)return jo.never();if(i.length===1)return jo.literal(i[0]);if(i.every(s=>typeof s=="string"))return jo.enum(i);let o=i.map(s=>jo.literal(s));return o.length<2?o[0]:jo.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return jo.literal(e.const);let r=e.type;if(Array.isArray(r)){let i=r.map(o=>{let s={...e,type:o};return oHc(s,t)});return i.length===0?jo.never():i.length===1?i[0]:jo.union(i)}if(!r)return jo.any();let n;switch(r){case"string":{let i=jo.string();if(e.format){let o=e.format;o==="email"?i=i.check(jo.email()):o==="uri"||o==="uri-reference"?i=i.check(jo.url()):o==="uuid"||o==="guid"?i=i.check(jo.uuid()):o==="date-time"?i=i.check(jo.iso.datetime()):o==="date"?i=i.check(jo.iso.date()):o==="time"?i=i.check(jo.iso.time()):o==="duration"?i=i.check(jo.iso.duration()):o==="ipv4"?i=i.check(jo.ipv4()):o==="ipv6"?i=i.check(jo.ipv6()):o==="mac"?i=i.check(jo.mac()):o==="cidr"?i=i.check(jo.cidrv4()):o==="cidr-v6"?i=i.check(jo.cidrv6()):o==="base64"?i=i.check(jo.base64()):o==="base64url"?i=i.check(jo.base64url()):o==="e164"?i=i.check(jo.e164()):o==="jwt"?i=i.check(jo.jwt()):o==="emoji"?i=i.check(jo.emoji()):o==="nanoid"?i=i.check(jo.nanoid()):o==="cuid"?i=i.check(jo.cuid()):o==="cuid2"?i=i.check(jo.cuid2()):o==="ulid"?i=i.check(jo.ulid()):o==="xid"?i=i.check(jo.xid()):o==="ksuid"&&(i=i.check(jo.ksuid()))}typeof e.minLength=="number"&&(i=i.min(e.minLength)),typeof e.maxLength=="number"&&(i=i.max(e.maxLength)),e.pattern&&(i=i.regex(new RegExp(e.pattern))),n=i;break}case"number":case"integer":{let i=r==="integer"?jo.number().int():jo.number();typeof e.minimum=="number"&&(i=i.min(e.minimum)),typeof e.maximum=="number"&&(i=i.max(e.maximum)),typeof e.exclusiveMinimum=="number"?i=i.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(i=i.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?i=i.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(i=i.lt(e.maximum)),typeof e.multipleOf=="number"&&(i=i.multipleOf(e.multipleOf)),n=i;break}case"boolean":{n=jo.boolean();break}case"null":{n=jo.null();break}case"object":{let i={},o=e.properties||{},s=new Set(e.required||[]);for(let[c,l]of Object.entries(o)){let u=MD(l,t);i[c]=s.has(c)?u:u.optional()}if(e.propertyNames){let c=MD(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?MD(e.additionalProperties,t):jo.any();if(Object.keys(i).length===0){n=jo.record(c,l);break}let u=jo.object(i).passthrough(),p=jo.looseRecord(c,l);n=jo.intersection(u,p);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),u=[];for(let d of l){let f=MD(c[d],t),m=jo.string().regex(new RegExp(d));u.push(jo.looseRecord(m,f))}let p=[];if(Object.keys(i).length>0&&p.push(jo.object(i).passthrough()),p.push(...u),p.length===0)n=jo.object({}).passthrough();else if(p.length===1)n=p[0];else{let d=jo.intersection(p[0],p[1]);for(let f=2;f<p.length;f++)d=jo.intersection(d,p[f]);n=d}break}let a=jo.object(i);e.additionalProperties===!1?n=a.strict():typeof e.additionalProperties=="object"?n=a.catchall(MD(e.additionalProperties,t)):n=a.passthrough();break}case"array":{let i=e.prefixItems,o=e.items;if(i&&Array.isArray(i)){let s=i.map(c=>MD(c,t)),a=o&&typeof o=="object"&&!Array.isArray(o)?MD(o,t):void 0;a?n=jo.tuple(s).rest(a):n=jo.tuple(s),typeof e.minItems=="number"&&(n=n.check(jo.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(jo.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>MD(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?MD(e.additionalItems,t):void 0;a?n=jo.tuple(s).rest(a):n=jo.tuple(s),typeof e.minItems=="number"&&(n=n.check(jo.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(jo.maxLength(e.maxItems)))}else if(o!==void 0){let s=MD(o,t),a=jo.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),n=a}else n=jo.array(jo.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(n=n.describe(e.description)),e.default!==void 0&&(n=n.default(e.default)),n}function MD(e,t){if(typeof e=="boolean")return e?jo.any():jo.never();let r=oHc(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(l=>MD(l,t)),c=jo.union(a);r=n?jo.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(l=>MD(l,t)),c=jo.xor(a);r=n?jo.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:jo.any();else{let a=n?r:MD(e.allOf[0],t),c=n?0:1;for(let l=c;l<e.allOf.length;l++)a=jo.intersection(a,MD(e.allOf[l],t));r=a}e.nullable===!0&&t.version==="openapi-3.0"&&(r=jo.nullable(r)),e.readOnly===!0&&(r=jo.readonly(r));let i={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in e&&(i[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(i[a]=e[a]);for(let a of Object.keys(e))g8d.has(a)||(i[a]=e[a]);return Object.keys(i).length>0&&t.registry.add(r,i),r}function sHc(e,t){if(typeof e=="boolean")return e?jo.any():jo.never();let r=A8d(e,t?.defaultTarget),n=e.$defs||e.definitions||{},i={version:r,defs:n,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??VP};return MD(e,i)}var jo,g8d,aHc=h(()=>{"use strict";a3t();QFr();f3t();m3t();jo={...d3t,...zFr,iso:Prt},g8d=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var TIo={};ne(TIo,{bigint:()=>v8d,boolean:()=>I8d,date:()=>C8d,number:()=>E8d,string:()=>b8d});function b8d(e){return Jbo(Drt,e)}function E8d(e){return nEo(krt,e)}function I8d(e){return uEo(Frt,e)}function v8d(e){return fEo(Nrt,e)}function C8d(e){return CEo(E3t,e)}var cHc=h(()=>{"use strict";Kz();m3t()});var w={};ne(w,{$brand:()=>Okr,$input:()=>Hbo,$output:()=>Wbo,NEVER:()=>bAo,TimePrecision:()=>Xbo,ZodAny:()=>U0o,ZodArray:()=>W0o,ZodBase64:()=>i2r,ZodBase64URL:()=>o2r,ZodBigInt:()=>Nrt,ZodBigIntFormat:()=>c2r,ZodBoolean:()=>Frt,ZodCIDRv4:()=>r2r,ZodCIDRv6:()=>n2r,ZodCUID:()=>JFr,ZodCUID2:()=>YFr,ZodCatch:()=>mIo,ZodCodec:()=>g2r,ZodCustom:()=>S3t,ZodCustomStringFormat:()=>Rrt,ZodDate:()=>E3t,ZodDefault:()=>cIo,ZodDiscriminatedUnion:()=>K0o,ZodE164:()=>s2r,ZodEmail:()=>WFr,ZodEmoji:()=>HFr,ZodEnum:()=>Brt,ZodError:()=>p8d,ZodExactOptional:()=>oIo,ZodFile:()=>nIo,ZodFirstPartyTypeKind:()=>wIo,ZodFunction:()=>CIo,ZodGUID:()=>h3t,ZodIPv4:()=>e2r,ZodIPv6:()=>t2r,ZodISODate:()=>LFr,ZodISODateTime:()=>MFr,ZodISODuration:()=>UFr,ZodISOTime:()=>_Fr,ZodIntersection:()=>J0o,ZodIssueCode:()=>d8d,ZodJWT:()=>a2r,ZodKSUID:()=>$Fr,ZodLazy:()=>EIo,ZodLiteral:()=>rIo,ZodMAC:()=>N0o,ZodMap:()=>eIo,ZodNaN:()=>gIo,ZodNanoID:()=>KFr,ZodNever:()=>G0o,ZodNonOptional:()=>m2r,ZodNull:()=>L0o,ZodNullable:()=>aIo,ZodNumber:()=>krt,ZodNumberFormat:()=>l3e,ZodObject:()=>v3t,ZodOptional:()=>d2r,ZodPipe:()=>h2r,ZodPrefault:()=>uIo,ZodPromise:()=>vIo,ZodReadonly:()=>AIo,ZodRealError:()=>Jz,ZodRecord:()=>x3t,ZodSet:()=>tIo,ZodString:()=>Drt,ZodStringFormat:()=>yA,ZodSuccess:()=>dIo,ZodSymbol:()=>Q0o,ZodTemplateLiteral:()=>bIo,ZodTransform:()=>iIo,ZodTuple:()=>X0o,ZodType:()=>mp,ZodULID:()=>XFr,ZodURL:()=>b3t,ZodUUID:()=>Fee,ZodUndefined:()=>M0o,ZodUnion:()=>C3t,ZodUnknown:()=>V0o,ZodVoid:()=>q0o,ZodXID:()=>ZFr,ZodXor:()=>H0o,_ZodString:()=>qFr,_default:()=>lIo,_function:()=>J7c,any:()=>T7c,array:()=>I3t,base64:()=>u7c,base64url:()=>p7c,bigint:()=>v7c,boolean:()=>z0o,catch:()=>hIo,check:()=>Y7c,cidrv4:()=>c7c,cidrv6:()=>l7c,clone:()=>HF,codec:()=>W7c,coerce:()=>TIo,config:()=>XI,core:()=>Hfe,cuid:()=>e7c,cuid2:()=>t7c,custom:()=>X7c,date:()=>P7c,decode:()=>T0o,decodeAsync:()=>P0o,describe:()=>Z7c,discriminatedUnion:()=>N7c,e164:()=>f7c,email:()=>GWc,emoji:()=>ZWc,encode:()=>w0o,encodeAsync:()=>O0o,endsWith:()=>Ert,enum:()=>p2r,exactOptional:()=>sIo,file:()=>U7c,flattenError:()=>X6t,float32:()=>y7c,float64:()=>b7c,formatError:()=>Z6t,fromJSONSchema:()=>sHc,function:()=>J7c,getErrorMap:()=>h8d,globalRegistry:()=>VP,gt:()=>Ree,gte:()=>KF,guid:()=>qWc,hash:()=>A7c,hex:()=>g7c,hostname:()=>h7c,httpUrl:()=>XWc,includes:()=>yrt,instanceof:()=>eHc,int:()=>GFr,int32:()=>E7c,int64:()=>C7c,intersection:()=>Y0o,ipv4:()=>o7c,ipv6:()=>a7c,iso:()=>Prt,json:()=>rHc,jwt:()=>d7c,keyof:()=>B7c,ksuid:()=>i7c,lazy:()=>IIo,length:()=>a3e,literal:()=>_7c,locales:()=>s3t,looseObject:()=>k7c,looseRecord:()=>z7c,lowercase:()=>grt,lt:()=>Dee,lte:()=>p3,mac:()=>s7c,map:()=>Q7c,maxLength:()=>s3e,maxSize:()=>jve,meta:()=>$7c,mime:()=>Irt,minLength:()=>Wfe,minSize:()=>kee,multipleOf:()=>Nve,nan:()=>q7c,nanoid:()=>$Wc,nativeEnum:()=>L7c,negative:()=>OFr,never:()=>l2r,nonnegative:()=>BFr,nonoptional:()=>fIo,nonpositive:()=>PFr,normalize:()=>vrt,null:()=>_0o,nullable:()=>A3t,nullish:()=>V7c,number:()=>j0o,object:()=>D7c,optional:()=>g3t,overwrite:()=>LH,parse:()=>v0o,parseAsync:()=>C0o,partialRecord:()=>j7c,pipe:()=>y3t,positive:()=>TFr,prefault:()=>pIo,preprocess:()=>nHc,prettifyError:()=>DAo,promise:()=>K7c,property:()=>DFr,readonly:()=>yIo,record:()=>$0o,refine:()=>xIo,regex:()=>hrt,regexes:()=>e5,registry:()=>sFr,safeDecode:()=>D0o,safeDecodeAsync:()=>k0o,safeEncode:()=>B0o,safeEncodeAsync:()=>R0o,safeParse:()=>x0o,safeParseAsync:()=>S0o,set:()=>M7c,setErrorMap:()=>m8d,size:()=>o3e,slugify:()=>wrt,startsWith:()=>brt,strictObject:()=>R7c,string:()=>VFr,stringFormat:()=>m7c,stringbool:()=>tHc,success:()=>G7c,superRefine:()=>SIo,symbol:()=>S7c,templateLiteral:()=>H7c,toJSONSchema:()=>NFr,toLowerCase:()=>xrt,toUpperCase:()=>Srt,transform:()=>f2r,treeifyError:()=>BAo,trim:()=>Crt,tuple:()=>Z0o,uint32:()=>I7c,uint64:()=>x7c,ulid:()=>r7c,undefined:()=>w7c,union:()=>u2r,unknown:()=>c3e,uppercase:()=>Art,url:()=>YWc,util:()=>vi,uuid:()=>WWc,uuidv4:()=>HWc,uuidv6:()=>KWc,uuidv7:()=>JWc,void:()=>O7c,xid:()=>n7c,xor:()=>F7c});var OIo=h(()=>{"use strict";Kz();m3t();QFr();I0o();F0o();iHc();Kz();Ubo();Kz();p3t();aHc();qbo();f3t();f3t();cHc();XI(rFr())});var ss=h(()=>{"use strict";OIo();OIo()});var lHc=h(()=>{"use strict"});var WIo={};ne(WIo,{AIChatConfig:()=>RIo,AIChatDatasource:()=>eKc,AIChatLocation:()=>fHc,AIChatModel:()=>dHc,AIChatWebsiteDatasource:()=>$Hc,AbsoluteProductPath:()=>TJc,AgentsConfig:()=>nKc,AiExamplesConfig:()=>ZHc,AnalyticsConfig:()=>XHc,AnnouncementConfig:()=>I2r,ApiReferenceConfiguration:()=>cJc,ApiReferenceEndpointConfiguration:()=>XKc,ApiReferenceLayout:()=>SHc,ApiReferenceLayoutItem:()=>B3t,ApiReferenceOperationConfiguration:()=>ZKc,ApiReferencePackageConfiguration:()=>tJc,ApiReferencePackageConfigurationWithOptions:()=>eJc,ApiReferenceSectionConfiguration:()=>$Kc,ApiSpecConfiguration:()=>aJc,ApiSpecErrorResponseEnsure:()=>iJc,ApiSpecErrorResponseHttpMethod:()=>nJc,ApiSpecErrorResponses:()=>oJc,ApiSpecImportSettings:()=>sJc,ApiSpecType:()=>rJc,Audience:()=>T3t,AudienceId:()=>PIo,Availability:()=>Jfe,BackgroundImageConfiguration:()=>_Hc,BackgroundImageThemedConfig:()=>LHc,BlogConfiguration:()=>KKc,BodyThemeConfig:()=>RHc,BreadcrumbsConfig:()=>cKc,ChangelogConfiguration:()=>HKc,ChangelogFolderRelativePath:()=>w3t,ChangelogLayout:()=>xHc,CheckConfig:()=>zKc,CheckRuleSeverity:()=>Kfe,CheckRulesConfig:()=>jKc,CodeBlockTheme:()=>BIo,CodeBlocksThemeConfig:()=>OHc,CollapsedStringValue:()=>VHc,CollapsedValue:()=>O3t,ColorConfig:()=>Tx,ColorThemedConfig:()=>zHc,ColorsConfiguration:()=>dKc,ContentAlignment:()=>vHc,CssConfig:()=>UHc,CustomDomain:()=>QHc,CustomPageAction:()=>mKc,DocsConfiguration:()=>B8d,DocsInstance:()=>bKc,DocsSettingsConfig:()=>fKc,DocsTypographyConfig:()=>sKc,EditThisPageConfig:()=>yKc,EditThisPageLaunch:()=>mHc,EmbeddingConfig:()=>rKc,ExperimentalConfig:()=>_Kc,ExternalProduct:()=>xJc,ExternalSitemapConfigSchema:()=>MKc,ExternalSitemapSchema:()=>LKc,FeatureFlag:()=>DIo,FeatureFlagConfiguration:()=>GHc,FolderConfiguration:()=>YKc,FontConfig:()=>A2r,FontConfigPath:()=>oKc,FontConfigVariant:()=>iKc,FontDisplay:()=>yHc,FontStyle:()=>jIo,FontWeight:()=>QIo,FooterLinksConfig:()=>OKc,FooterNavThemeConfig:()=>BHc,FullStoryAnalyticsConfig:()=>WHc,GTMConfig:()=>JHc,GitLibraryInputSchema:()=>UKc,GithubEditThisPageConfig:()=>AKc,GoogleAnalytics4Config:()=>YHc,HeaderPosition:()=>CHc,HttpSnippetLanguage:()=>NHc,HttpSnippetsConfig:()=>MHc,IntegrationsConfig:()=>QKc,IntercomConfig:()=>HHc,InternalProduct:()=>CJc,JsConfig:()=>RKc,JsConfigOptions:()=>kIo,JsFileConfig:()=>BKc,JsFileConfigSettings:()=>PKc,JsRemoteConfig:()=>DKc,JsScriptStrategy:()=>zIo,Language:()=>b2r,LanguageSwitcherThemeConfig:()=>THc,LayoutConfig:()=>uKc,LibraryConfiguration:()=>WKc,LibraryInputConfiguration:()=>GKc,LibraryLanguage:()=>AHc,LibraryName:()=>FIo,LibraryOutputConfiguration:()=>qKc,LibraryReferenceConfiguration:()=>JKc,LinkConfiguration:()=>f3e,LogoConfiguration:()=>EKc,MetadataConfig:()=>kKc,NavbarDropdownConfig:()=>wKc,NavbarGithubConfig:()=>SKc,NavbarGithubConfigWithOptions:()=>xKc,NavbarLink:()=>TKc,NavbarLinkConfig:()=>u3e,NavigationConfig:()=>v2r,NavigationItem:()=>D3t,PageActionOption:()=>pHc,PageActionOptions:()=>hKc,PageActionsConfig:()=>gKc,PageActionsThemeConfig:()=>FHc,PageConfiguration:()=>zrt,PageDescriptionSource:()=>tKc,PathLibraryInputSchema:()=>VKc,PlaygroundButtonSettings:()=>CKc,PlaygroundSettings:()=>P3t,PostHogConfig:()=>KHc,ProductConfig:()=>SJc,ProductConfigBase:()=>qIo,ProductFileConfig:()=>P8d,ProductPath:()=>O8d,ProductSwitcherThemeConfig:()=>wHc,ProfileConfig:()=>bJc,ProfileVarsConfiguration:()=>yJc,ProfileVarsFile:()=>w8d,ProgrammingLanguage:()=>uHc,RedirectConfig:()=>_Io,RedirectsConfiguration:()=>FKc,RedirectsFile:()=>S8d,RelativeProductPath:()=>wJc,RemotePathConfig:()=>NKc,Role:()=>MIo,RoleId:()=>y2r,SearchSettingsConfig:()=>pKc,SearchbarPlacement:()=>bHc,SectionConfiguration:()=>lJc,SegmentConfig:()=>qHc,SidebarThemeConfig:()=>kHc,SiteSwitcherThemeConfig:()=>PHc,SnippetLanguageConfiguration:()=>_H,SnippetsConfiguration:()=>vKc,SortByAvailabilityValue:()=>hHc,SwitcherPlacement:()=>IHc,TabConfig:()=>C2r,TabId:()=>p3e,TabMenuEntry:()=>vJc,TabMenuGroup:()=>IJc,TabMenuGroupItem:()=>EJc,TabMenuLayoutConfig:()=>lKc,TabMenuTab:()=>VIo,TabVariant:()=>UIo,TabVariantGroup:()=>dJc,TabVariantGroupItem:()=>fJc,TabVariantItem:()=>mJc,TabbedNavigationConfig:()=>AJc,TabbedNavigationItem:()=>gJc,TabbedNavigationItemWithLayout:()=>pJc,TabbedNavigationItemWithVariants:()=>hJc,TabsPlacement:()=>EHc,TabsThemeConfig:()=>DHc,Target:()=>jrt,ThemeConfig:()=>aKc,TitleSource:()=>NIo,TranslationConfig:()=>PJc,TranslationConfigObject:()=>OJc,TwitterCardSetting:()=>jHc,UntabbedNavigationConfig:()=>uJc,VariantsColumnHeight:()=>LIo,VersionAvailability:()=>gHc,VersionConfig:()=>GIo,VersionFileConfig:()=>T8d,VersionedSnippetLanguageConfiguration:()=>IKc,WithFeatureFlags:()=>H1,WithPermissions:()=>W1,WithViewers:()=>E2r,normalizeTranslationConfig:()=>BJc});function BJc(e){return typeof e=="string"?{lang:e}:e}var p3e,w3t,PIo,y2r,FIo,uHc,b2r,pHc,fHc,dHc,mHc,Jfe,hHc,gHc,NIo,AHc,jIo,yHc,bHc,EHc,IHc,vHc,CHc,xHc,SHc,wHc,THc,BIo,OHc,PHc,BHc,DHc,RHc,kHc,FHc,NHc,jrt,jHc,zIo,QIo,zHc,Tx,T3t,MIo,QHc,MHc,LHc,_Hc,UHc,VHc,O3t,W1,DIo,GHc,H1,E2r,qHc,WHc,HHc,KHc,JHc,YHc,XHc,ZHc,$Hc,eKc,tKc,rKc,nKc,RIo,iKc,oKc,A2r,sKc,aKc,cKc,LIo,lKc,uKc,pKc,fKc,dKc,mKc,hKc,gKc,AKc,yKc,bKc,EKc,f3e,IKc,_H,vKc,CKc,P3t,I2r,u3e,xKc,SKc,wKc,TKc,OKc,PKc,BKc,DKc,kIo,RKc,kKc,_Io,FKc,S8d,NKc,Kfe,jKc,zKc,QKc,MKc,LKc,_Kc,UKc,VKc,GKc,qKc,WKc,zrt,HKc,KKc,JKc,YKc,XKc,ZKc,B3t,$Kc,eJc,tJc,rJc,nJc,iJc,oJc,sJc,aJc,cJc,D3t,lJc,uJc,UIo,pJc,fJc,dJc,mJc,hJc,gJc,AJc,v2r,yJc,w8d,bJc,VIo,EJc,IJc,vJc,C2r,GIo,T8d,qIo,CJc,xJc,SJc,wJc,TJc,O8d,P8d,OJc,PJc,B8d,DJc=h(()=>{"use strict";ss();p3e=w.string(),w3t=w.string(),PIo=w.string(),y2r=w.string(),FIo=w.string(),uHc=w.enum(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"]),b2r=w.string().regex(/^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$/,"Language must be a valid BCP 47 language tag (e.g. 'en', 'ja', 'ja-JP', 'pt-BR', 'zh-Hans-CN')"),pHc=w.enum(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","vscode"]),fHc=w.enum(["docs","slack","discord"]),dHc=w.enum(["claude-3.7","claude-4","command-a"]),mHc=w.enum(["github","dashboard"]),Jfe=w.enum(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]),hHc=w.enum(["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"]),gHc=w.enum(["deprecated","ga","stable","beta"]),NIo=w.enum(["frontmatter","filename"]),AHc=w.enum(["python","cpp"]),jIo=w.enum(["normal","italic"]),yHc=w.enum(["auto","block","swap","fallback","optional"]),bHc=w.enum(["header","header-tabs","sidebar"]),EHc=w.enum(["header","sidebar"]),IHc=w.enum(["header","sidebar"]),vHc=w.enum(["center","left"]),CHc=w.enum(["fixed","static"]),xHc=w.enum(["timeline","classic"]),SHc=w.enum(["indented","cards"]),wHc=w.enum(["default","toggle","tabs"]),THc=w.enum(["default","minimal"]),BIo=w.enum(["github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","github-light","github-light-default","github-light-high-contrast","material-theme-darker","min-dark","min-light"]),OHc=w.object({light:BIo.optional(),dark:BIo.optional()}),PHc=w.object({enabled:w.boolean().optional(),order:w.array(w.string()).optional(),hide:w.array(w.string()).optional(),labels:w.record(w.string(),w.string()).optional(),"show-products":w.boolean().optional()}),BHc=w.enum(["default","minimal"]),DHc=w.enum(["default","bubble"]),RHc=w.enum(["default","canvas"]),kHc=w.enum(["default","minimal"]),FHc=w.enum(["default","toolbar"]),NHc=w.enum(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"]),jrt=w.enum(["_blank","_self","_parent","_top"]),jHc=w.enum(["summary","summary_large_image","app","player"]),zIo=w.enum(["beforeInteractive","afterInteractive","lazyOnload"]),QIo=w.union([w.string(),w.number().int()]),zHc=w.object({dark:w.string().optional(),light:w.string().optional()}),Tx=w.union([w.string(),zHc]),T3t=w.union([PIo,w.array(PIo)]),MIo=w.union([y2r,w.array(y2r)]),QHc=w.union([w.string(),w.array(w.string())]),MHc=w.union([w.boolean(),w.array(NHc)]),LHc=w.object({dark:w.string().optional(),light:w.string().optional()}),_Hc=w.union([w.string(),LHc]),UHc=w.union([w.string(),w.array(w.string())]),VHc=w.enum(["open-by-default"]),O3t=w.union([w.boolean(),VHc]),W1=w.object({viewers:MIo.optional(),orphaned:w.boolean().optional()}),DIo=w.object({flag:w.string(),"fallback-value":w.unknown().optional(),match:w.unknown().optional()}),GHc=w.union([w.string(),DIo,w.array(DIo)]),H1=w.object({"feature-flag":GHc.optional()}),E2r=w.object({viewers:MIo.optional()}),qHc=w.object({"write-key":w.string()}),WHc=w.object({"org-id":w.string()}),HHc=w.object({"app-id":w.string(),"api-base":w.string().optional()}),KHc=w.object({"api-key":w.string(),endpoint:w.string().optional()}),JHc=w.object({"container-id":w.string()}),YHc=w.object({"measurement-id":w.string()}),XHc=w.object({segment:qHc.optional(),fullstory:WHc.optional(),intercom:HHc.optional(),posthog:KHc.optional(),gtm:JHc.optional(),ga4:YHc.optional()}),ZHc=w.object({enabled:w.boolean().optional(),style:w.string().optional()}),$Hc=w.object({url:w.string(),title:w.string().optional()}),eKc=$Hc,tKc=w.enum(["description","subtitle"]),rKc=w.object({"allowed-origins":w.array(w.string())}),nKc=w.object({"page-directive":w.string().optional(),"page-description-source":tKc.optional(),"llms-txt":w.string().optional(),"llms-full-txt":w.string().optional()}),RIo=w.object({model:dHc.optional(),"system-prompt":w.string().optional(),location:w.array(fHc).optional(),datasources:w.array(eKc).optional(),"mask-pii":w.boolean().optional(),disclaimer:w.string().optional(),"button-text":w.string().optional()}),iKc=w.object({path:w.string(),weight:QIo.optional(),style:jIo.optional()}),oKc=w.union([w.string(),iKc]),A2r=w.object({name:w.string().optional(),path:w.string().optional(),weight:QIo.optional(),style:jIo.optional(),paths:w.array(oKc).optional(),display:yHc.optional(),fallback:w.array(w.string()).optional(),"font-variation-settings":w.string().optional()}),sKc=w.object({headingsFont:A2r.optional(),bodyFont:A2r.optional(),codeFont:A2r.optional()}),aKc=w.object({sidebar:kHc.optional(),body:RHc.optional(),tabs:DHc.optional(),"page-actions":FHc.optional(),"footer-nav":BHc.optional(),"language-switcher":THc.optional(),"product-switcher":wHc.optional(),"site-switcher":PHc.optional(),"code-blocks":OHc.optional()}),cKc=w.object({"current-page":w.boolean().optional(),sticky:w.boolean().optional()}),LIo=w.union([w.number().int().positive(),w.literal("no-limit")]),lKc=w.object({"default-column-height":LIo.nullable().optional(),"interact-on-click-only":w.boolean().optional()}),uKc=w.object({"page-width":w.string().optional(),"content-width":w.string().optional(),"sidebar-width":w.string().optional(),"header-height":w.string().optional(),"searchbar-placement":bHc.optional(),"tab-menu":lKc.optional(),"tabs-placement":EHc.optional(),"switcher-placement":IHc.optional(),"content-alignment":vHc.optional(),"header-position":CHc.optional(),"disable-header":w.boolean().optional(),"hide-nav-links":w.boolean().optional(),"hide-feedback":w.boolean().optional(),"mobile-toc":w.boolean().optional(),"changelog-layout":xHc.optional(),"api-reference-layout":SHc.optional(),"api-reference-expand-properties":w.boolean().optional(),"show-nav-availability-badges":w.boolean().optional(),"hide-webhook-method-badges":w.boolean().optional(),breadcrumbs:cKc.optional()}),pKc=w.object({"prioritize-current-product":w.boolean().optional(),"default-filter-by-current-product":w.boolean().optional(),"popular-searches":w.boolean().optional()}),fKc=w.object({"search-text":w.string().optional(),"disable-search":w.boolean().optional(),"dark-mode-code":w.boolean().optional(),"default-search-filters":w.boolean().optional(),search:pKc.optional(),"http-snippets":MHc.optional(),"hide-404-page":w.boolean().optional(),"use-javascript-as-typescript":w.boolean().optional(),"disable-explorer-proxy":w.boolean().optional(),"disable-analytics":w.boolean().optional(),"require-analytics-consent":w.boolean().optional(),language:b2r.optional(),"folder-title-source":NIo.optional(),"substitute-env-vars":w.boolean().optional(),"websocket-oneof-display":w.enum(["flat","grouped"]).optional(),embedding:rKc.optional()}),dKc=w.object({"accent-primary":Tx.optional(),accentPrimary:Tx.optional(),background:Tx.optional(),border:Tx.optional(),"sidebar-background":Tx.optional(),"header-background":Tx.optional(),"card-background":Tx.optional(),"accent-1":Tx.optional(),"accent-2":Tx.optional(),"accent-3":Tx.optional(),"accent-4":Tx.optional(),"accent-5":Tx.optional(),"accent-6":Tx.optional(),"accent-7":Tx.optional(),"accent-8":Tx.optional(),"accent-9":Tx.optional(),"accent-10":Tx.optional(),"accent-11":Tx.optional(),"accent-12":Tx.optional()}),mKc=w.object({title:w.string(),subtitle:w.string().optional(),url:w.string(),icon:w.string().optional(),default:w.boolean().optional()}),hKc=w.object({"copy-page":w.boolean().optional(),"view-as-markdown":w.boolean().optional(),"ask-ai":w.boolean().optional(),chatgpt:w.boolean().optional(),claude:w.boolean().optional(),cursor:w.boolean().optional(),mcp:w.boolean().optional(),vscode:w.boolean().optional(),custom:w.array(mKc).optional()}),gKc=w.object({default:pHc.optional(),options:hKc.optional()}),AKc=w.object({host:w.string().optional(),owner:w.string(),repo:w.string(),branch:w.string().optional()}),yKc=w.object({github:AKc.optional(),launch:mHc.optional()}),bKc=w.object({url:w.string(),"custom-domain":QHc.optional(),"edit-this-page":yKc.optional(),audiences:T3t.optional(),"multi-source":w.boolean().optional()}),EKc=w.object({dark:w.string().optional(),light:w.string().optional(),height:w.number().optional(),href:w.string().optional(),"right-text":w.string().optional()}),f3e=w.object({link:w.string(),href:w.string(),icon:w.string().optional(),target:jrt.optional()}),IKc=w.object({version:w.string(),package:w.string()}),_H=w.union([w.string(),IKc]),vKc=w.object({python:_H.optional(),typescript:_H.optional(),go:_H.optional(),java:_H.optional(),ruby:_H.optional(),csharp:_H.optional(),php:_H.optional(),swift:_H.optional(),cli:_H.optional(),rust:_H.optional()}),CKc=w.object({href:w.string().optional()}),P3t=w.object({hidden:w.boolean().optional(),environments:w.array(w.string()).optional(),button:CKc.optional(),oauth:w.boolean().optional(),"limit-websocket-messages-per-connection":w.number().int().optional(),"send-optional-defaults":w.boolean().optional()}),I2r=w.object({message:w.string()}),u3e=E2r.merge(w.object({href:w.string().optional(),target:jrt.optional(),url:w.string().optional(),text:w.string().optional(),icon:w.string().optional(),rightIcon:w.string().optional(),rounded:w.boolean().optional()})),xKc=E2r.merge(w.object({url:w.string(),target:jrt.optional()})),SKc=w.union([w.string(),xKc]),wKc=E2r.merge(w.object({links:w.array(u3e),text:w.string().optional(),icon:w.string().optional(),rightIcon:w.string().optional(),rounded:w.boolean().optional()})),TKc=w.union([u3e.merge(w.object({type:w.literal("filled")})),u3e.merge(w.object({type:w.literal("outlined")})),u3e.merge(w.object({type:w.literal("minimal")})),w.object({type:w.literal("github"),value:SKc}),wKc.merge(w.object({type:w.literal("dropdown")})),u3e.merge(w.object({type:w.literal("primary")})),u3e.merge(w.object({type:w.literal("secondary")}))]),OKc=w.object({github:w.string().optional(),twitter:w.string().optional(),x:w.string().optional(),linkedin:w.string().optional(),youtube:w.string().optional(),instagram:w.string().optional(),facebook:w.string().optional(),discord:w.string().optional(),slack:w.string().optional(),hackernews:w.string().optional(),medium:w.string().optional(),website:w.string().optional()}),PKc=w.object({path:w.string(),strategy:zIo.optional()}),BKc=w.union([w.string(),PKc]),DKc=w.object({url:w.string(),strategy:zIo.optional(),"disable-sri":w.boolean().optional()}),kIo=w.union([DKc,BKc]),RKc=w.union([kIo,w.array(kIo)]),kKc=w.object({"og:site_name":w.string().optional(),"og:title":w.string().optional(),"og:description":w.string().optional(),"og:url":w.string().optional(),"og:image":w.string().optional(),"og:image:width":w.number().optional(),"og:image:height":w.number().optional(),"og:locale":w.string().optional(),"og:logo":w.string().optional(),"twitter:title":w.string().optional(),"twitter:description":w.string().optional(),"twitter:handle":w.string().optional(),"twitter:image":w.string().optional(),"twitter:site":w.string().optional(),"twitter:url":w.string().optional(),"twitter:card":jHc.optional(),"og:dynamic":w.boolean().optional(),"og:dynamic:background-image":w.string().optional(),"og:dynamic:text-color":w.string().optional(),"og:dynamic:background-color":w.string().optional(),"og:dynamic:logo-color":w.enum(["dark","light"]).optional(),"og:dynamic:show-logo":w.boolean().optional(),"og:dynamic:show-section":w.boolean().optional(),"og:dynamic:show-description":w.boolean().optional(),"og:dynamic:show-url":w.boolean().optional(),"og:dynamic:show-gradient":w.boolean().optional(),"canonical-host":w.string().optional()}),_Io=w.object({source:w.string(),destination:w.string(),permanent:w.boolean().optional()}),FKc=w.union([w.array(_Io),w.string(),w.array(w.string())]),S8d=w.object({redirects:w.array(_Io.strict())}).strict(),NKc=w.object({path:w.string(),destination:w.string()}).strict(),Kfe=w.enum(["warn","error"]),jKc=w.object({"example-validation":Kfe.optional(),"broken-links":Kfe.optional(),"no-non-component-refs":Kfe.optional(),"valid-local-references":Kfe.optional(),"no-circular-redirects":Kfe.optional(),"valid-docs-endpoints":Kfe.optional(),"missing-redirects":Kfe.optional(),"valid-changelog-slug":Kfe.optional()}),zKc=w.object({rules:jKc.optional()}),QKc=w.object({intercom:w.string().optional(),context7:w.string().optional()}),MKc=w.object({url:w.string(),locale:w.string().optional()}),LKc=w.union([w.string(),MKc]),_Kc=w.object({"mdx-components":w.array(w.string()).optional(),"disable-stream-toggle":w.boolean().optional(),"openapi-parser-v2":w.boolean().optional(),"openapi-parser-v3":w.boolean().optional(),"dynamic-snippets":w.boolean().optional(),"ai-examples":w.boolean().optional(),"ai-example-style-instructions":w.string().optional(),"exclude-apis":w.boolean().optional(),"basepath-aware":w.boolean().optional(),"robots-txt-on-instance-url":w.boolean().optional(),"external-sitemaps":w.array(LKc).optional()}),UKc=w.object({git:w.string(),subpath:w.string().optional(),ref:w.string().optional()}),VKc=w.object({path:w.string()}),GKc=w.union([UKc,VKc]),qKc=w.object({path:w.string()}),WKc=w.object({input:GKc,output:qKc,lang:AHc}),zrt=W1.merge(H1).merge(w.object({page:w.string(),profile:w.string().optional(),path:w.string(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),noindex:w.boolean().optional(),availability:Jfe.optional()})),HKc=W1.merge(H1).merge(w.object({changelog:w3t,title:w.string().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional()})),KKc=W1.merge(H1).merge(w.object({blog:w3t,title:w.string().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional()})),JKc=W1.merge(H1).merge(w.object({library:FIo,title:w.string().optional(),slug:w.string().optional()})),YKc=W1.merge(H1).merge(w.object({folder:w.string(),title:w.string().optional(),"title-source":NIo.optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),collapsed:O3t.optional(),collapsible:w.boolean().optional(),"collapsed-by-default":w.boolean().optional(),availability:Jfe.optional()})),XKc=W1.merge(H1).merge(w.object({endpoint:w.string(),title:w.string().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),availability:Jfe.optional(),playground:P3t.optional()})),ZKc=W1.merge(H1).merge(w.object({operation:w.string(),title:w.string().optional(),slug:w.string().optional(),hidden:w.boolean().optional(),availability:Jfe.optional()})),B3t=w.lazy(()=>w.union([w.string(),w.record(w.string(),tJc),$Kc,XKc,ZKc,zrt,f3e])),$Kc=W1.merge(H1).merge(w.object({section:w.string(),"referenced-packages":w.array(w.string()).optional(),summary:w.string().optional(),contents:w.array(B3t).optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),collapsed:O3t.optional(),collapsible:w.boolean().optional(),"collapsed-by-default":w.boolean().optional(),availability:Jfe.optional(),playground:P3t.optional()})),eJc=W1.merge(H1).merge(w.object({title:w.string().optional(),summary:w.string().optional(),contents:w.array(B3t).optional(),availability:Jfe.optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),playground:P3t.optional()})),tJc=w.lazy(()=>w.union([w.array(B3t),eJc])),rJc=w.enum(["openapi","asyncapi","graphql"]),nJc=w.enum(["get","post","put","patch","delete","head","options","trace"]),iJc=w.object({"status-code":w.number().int().min(400).max(599),methods:w.array(nJc).optional()}),oJc=w.object({schema:w.union([w.string(),w.record(w.string(),w.unknown())]),name:w.string().optional(),"apply-to":w.enum(["all","untyped"]).optional(),ensure:w.array(iJc).optional()}),sJc=w.object({"type-dates-as-strings":w.boolean().optional(),"use-bytes-for-binary-response":w.boolean().optional(),"respect-parameter-content":w.boolean().optional(),"respect-operation-id-word-boundaries":w.boolean().optional(),"infer-forward-compatible":w.boolean().optional(),"preserve-one-of-in-all-of":w.boolean().optional(),"any-of-sibling-properties-as-object":w.boolean().optional(),"error-responses":oJc.optional()}),aJc=w.object({type:rJc,path:w.string(),namespace:w.string().optional(),overlays:w.string().optional(),overrides:w.array(w.string()).optional(),settings:sJc.optional()}),cJc=W1.merge(H1).merge(w.object({api:w.string(),"api-name":w.string().optional(),specs:w.array(aJc).optional(),openrpc:w.string().optional(),audiences:T3t.optional(),"display-errors":w.boolean().optional(),"tag-description-pages":w.boolean().optional(),snippets:vKc.optional(),postman:w.string().optional(),summary:w.string().optional(),layout:w.array(B3t).optional(),collapsed:O3t.optional(),icon:w.string().optional(),slug:w.string().optional(),hidden:w.boolean().optional(),availability:Jfe.optional(),"skip-slug":w.boolean().optional(),alphabetized:w.boolean().optional(),"sort-by-availability":w.array(hHc).optional(),flattened:w.boolean().optional(),paginated:w.boolean().optional(),types:w.boolean().optional(),playground:P3t.optional()})),D3t=w.lazy(()=>w.union([zrt,lJc,cJc,JKc,f3e,HKc,KKc,YKc])),lJc=W1.merge(H1).merge(w.object({section:w.string(),profile:w.string().optional(),path:w.string().optional(),contents:w.array(D3t),collapsed:O3t.optional(),collapsible:w.boolean().optional(),"collapsed-by-default":w.boolean().optional(),slug:w.string().optional(),icon:w.string().optional(),hidden:w.boolean().optional(),"skip-slug":w.boolean().optional(),availability:Jfe.optional()})),uJc=w.array(D3t),UIo=W1.merge(H1).merge(w.object({title:w.string(),profile:w.string().optional(),subtitle:w.string().optional(),icon:w.string().optional(),layout:w.array(D3t),slug:w.string().optional(),"skip-slug":w.boolean().optional(),hidden:w.boolean().optional(),default:w.boolean().optional()})),pJc=w.object({tab:p3e,layout:w.array(D3t).optional()}),fJc=w.union([UIo,f3e]),dJc=w.object({group:w.string(),items:w.array(fJc)}),mJc=w.union([UIo,dJc,f3e]),hJc=w.object({tab:p3e,variants:w.array(mJc)}),gJc=w.union([pJc,hJc]),AJc=w.array(gJc),v2r=w.union([AJc,uJc]),yJc=w.union([w.record(w.string(),w.string()),w.string(),w.array(w.string())]),w8d=w.object({vars:w.record(w.string(),w.string())}).strict(),bJc=w.object({vars:yJc.optional()}),VIo=W1.merge(H1).merge(w.object({tab:p3e,"display-name":w.string(),subtitle:w.string().optional(),icon:w.string().optional(),slug:w.string().optional(),"skip-slug":w.boolean().optional(),hidden:w.boolean().optional(),default:w.boolean().optional()})),EJc=w.union([VIo,f3e]),IJc=w.object({group:w.string(),tabs:w.array(EJc)}),vJc=w.union([VIo,IJc,f3e]),C2r=W1.merge(H1).merge(w.object({"display-name":w.string(),profile:w.string().optional(),icon:w.string().optional(),slug:w.string().optional(),"skip-slug":w.boolean().optional(),hidden:w.boolean().optional(),href:w.string().optional(),target:jrt.optional(),changelog:w3t.optional(),blog:w3t.optional(),"tab-menu":w.array(vJc).optional(),"tab-menu-column-height":LIo.nullable().optional()})),GIo=W1.merge(H1).merge(w.object({"display-name":w.string(),profile:w.string().optional(),path:w.string().optional(),ref:w.string().optional(),slug:w.string().optional(),availability:gHc.optional(),audiences:T3t.optional(),hidden:w.boolean().optional(),announcement:I2r.optional()})),T8d=w.object({tabs:w.record(p3e,C2r).optional(),"landing-page":zrt.optional(),navigation:v2r}),qIo=W1.merge(H1).merge(w.object({"display-name":w.string(),subtitle:w.string().optional(),icon:w.string().optional(),image:w.string().optional(),versions:w.array(GIo).optional(),profile:w.string().optional(),audiences:T3t.optional()})),CJc=qIo.merge(w.object({path:w.string(),slug:w.string().optional(),announcement:I2r.optional()})),xJc=qIo.merge(w.object({href:w.string(),target:jrt.optional()})),SJc=w.union([CJc,xJc]),wJc=W1.merge(H1).merge(w.object({"display-name":w.string(),path:w.string(),slug:w.string().optional()})),TJc=w.object({href:w.string()}),O8d=w.union([wJc,TJc]),P8d=w.object({tabs:w.record(p3e,C2r).optional(),"landing-page":zrt.optional(),navigation:v2r}),OJc=w.object({lang:b2r,default:w.boolean().optional()}),PJc=w.union([b2r,OJc]);B8d=w.object({instances:w.array(bKc),title:w.string().optional(),profiles:w.record(w.string(),bJc).optional(),profile:w.string().optional(),libraries:w.record(FIo,WKc).optional(),analytics:XHc.optional(),announcement:I2r.optional(),roles:w.array(y2r).optional(),tabs:w.record(p3e,C2r).optional(),versions:w.array(GIo).optional(),products:w.array(SJc).optional(),"landing-page":zrt.optional(),navigation:v2r.optional(),"navbar-links":w.array(TKc).optional(),"footer-links":OKc.optional(),"page-actions":gKc.optional(),experimental:_Kc.optional(),"default-language":uHc.optional(),languages:w.array(w.string()).optional(),translations:w.array(PJc).optional().superRefine((e,t)=>{if(e==null)return;let n=e.map(BJc).filter(i=>i.default===!0).length;n>1&&t.addIssue({code:w.ZodIssueCode.custom,message:`Only one translation entry can be marked as default, but ${n} were found`})}),"ai-chat":RIo.optional(),"ai-search":RIo.optional(),"ai-examples":ZHc.optional(),agents:nKc.optional(),metadata:kKc.optional(),redirects:FKc.optional(),"remote-paths":w.array(NKc).optional(),check:zKc.optional(),logo:EKc.optional(),favicon:w.string().optional(),"background-image":_Hc.optional(),colors:dKc.optional(),typography:sKc.optional(),layout:uKc.optional(),settings:fKc.optional(),theme:aKc.optional(),"global-theme":w.string().optional(),integrations:QKc.optional(),css:UHc.optional(),js:RKc.optional(),header:w.string().optional(),footer:w.string().optional()})});function k8d(e){if("changelog"in e)return e.changelog;if("blog"in e)return e.blog}function F8d(e){return e.changelog??e.blog}var D8d,R8d,RJc=h(()=>{"use strict";D8d="Changelog",R8d="Blog"});function N8d({location:e,columnHeight:t,layout:r,hasHeaderTabs:n}){let i=e==="tab"&&!n,o=i?"sidebar":e,s=o==="tab"?t??r?.tabMenuDefaultColumnHeight:void 0;return{location:o,columnHeight:typeof s=="number"&&s>0?Math.floor(s):void 0,fellBackToSidebar:i,interactOnClickOnly:o==="tab"&&r?.tabMenuInteractOnClickOnly===!0?!0:void 0}}function kJc(e){return e.flatMap(t=>t.nestedVariants!=null?kJc(t.nestedVariants.variants):[t.layout])}function FJc(e){return e.flatMap(t=>[t,...t.nestedVariants!=null?FJc(t.nestedVariants.variants):[]])}var NJc=h(()=>{"use strict"});var jJc=h(()=>{"use strict"});var zJc=h(()=>{"use strict"});var QJc=h(()=>{"use strict"});var MJc=h(()=>{"use strict"});var HIo,LJc=h(()=>{"use strict";HIo={Docs:"docs",Slack:"slack",Discord:"discord"}});var KIo,_Jc=h(()=>{"use strict";KIo={Claude37:"claude-3.7",Claude4:"claude-4",CommandA:"command-a"}});var UJc=h(()=>{"use strict"});var VJc=h(()=>{"use strict"});var GJc=h(()=>{"use strict"});var qJc=h(()=>{"use strict"});var WJc=h(()=>{"use strict"});var HJc=h(()=>{"use strict"});var JIo,KJc=h(()=>{"use strict";JIo={Indented:"indented",Cards:"cards"}});var JJc=h(()=>{"use strict"});var YJc=h(()=>{"use strict"});var XJc=h(()=>{"use strict"});var ZJc=h(()=>{"use strict"});var $Jc=h(()=>{"use strict"});var eYc=h(()=>{"use strict"});var YIo,tYc=h(()=>{"use strict";YIo={All:"all",Untyped:"untyped"}});var rYc=h(()=>{"use strict"});var XIo,nYc=h(()=>{"use strict";XIo={Get:"get",Post:"post",Put:"put",Patch:"patch",Delete:"delete",Head:"head",Options:"options",Trace:"trace"}});var iYc=h(()=>{"use strict"});var oYc=h(()=>{"use strict"});var sYc=h(()=>{"use strict"});var ZIo,aYc=h(()=>{"use strict";ZIo={Openapi:"openapi",Asyncapi:"asyncapi",Graphql:"graphql"}});var cYc=h(()=>{"use strict"});var lYc=h(()=>{"use strict"});var $Io,uYc=h(()=>{"use strict";$Io={Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var pYc=h(()=>{"use strict"});var fYc=h(()=>{"use strict"});var dYc=h(()=>{"use strict"});var evo,mYc=h(()=>{"use strict";evo={Default:"default",Canvas:"canvas"}});var hYc=h(()=>{"use strict"});var gYc=h(()=>{"use strict"});var AYc=h(()=>{"use strict"});var tvo,yYc=h(()=>{"use strict";tvo={Timeline:"timeline",Classic:"classic"}});var bYc=h(()=>{"use strict"});var rvo,EYc=h(()=>{"use strict";rvo={Warn:"warn",Error:"error"}});var IYc=h(()=>{"use strict"});var vYc=h(()=>{"use strict"});var nvo,CYc=h(()=>{"use strict";nvo={GithubDark:"github-dark",GithubDarkDefault:"github-dark-default",GithubDarkDimmed:"github-dark-dimmed",GithubDarkHighContrast:"github-dark-high-contrast",GithubLight:"github-light",GithubLightDefault:"github-light-default",GithubLightHighContrast:"github-light-high-contrast",MaterialThemeDarker:"material-theme-darker",MinDark:"min-dark",MinLight:"min-light"}});var ivo,xYc=h(()=>{"use strict";ivo={OpenByDefault:"open-by-default"}});var SYc=h(()=>{"use strict"});var wYc=h(()=>{"use strict"});var TYc=h(()=>{"use strict"});var OYc=h(()=>{"use strict"});var ovo,PYc=h(()=>{"use strict";ovo={Center:"center",Left:"left"}});var BYc=h(()=>{"use strict"});var DYc=h(()=>{"use strict"});var RYc=h(()=>{"use strict"});var kYc=h(()=>{"use strict"});var FYc=h(()=>{"use strict"});var NYc=h(()=>{"use strict"});var jYc=h(()=>{"use strict"});var zYc=h(()=>{"use strict"});var svo,QYc=h(()=>{"use strict";svo={Github:"github",Dashboard:"dashboard"}});var MYc=h(()=>{"use strict"});var LYc=h(()=>{"use strict"});var _Yc=h(()=>{"use strict"});var UYc=h(()=>{"use strict"});var VYc=h(()=>{"use strict"});var GYc=h(()=>{"use strict"});var qYc=h(()=>{"use strict"});var WYc=h(()=>{"use strict"});var HYc=h(()=>{"use strict"});var KYc=h(()=>{"use strict"});var JYc=h(()=>{"use strict"});var avo,YYc=h(()=>{"use strict";avo={Auto:"auto",Block:"block",Swap:"swap",Fallback:"fallback",Optional:"optional"}});var cvo,XYc=h(()=>{"use strict";cvo={Normal:"normal",Italic:"italic"}});var ZYc=h(()=>{"use strict"});var $Yc=h(()=>{"use strict"});var lvo,eXc=h(()=>{"use strict";lvo={Default:"default",Minimal:"minimal"}});var tXc=h(()=>{"use strict"});var rXc=h(()=>{"use strict"});var nXc=h(()=>{"use strict"});var iXc=h(()=>{"use strict"});var oXc=h(()=>{"use strict"});var uvo,sXc=h(()=>{"use strict";uvo={Fixed:"fixed",Static:"static"}});var pvo,aXc=h(()=>{"use strict";pvo={Curl:"curl",Csharp:"csharp",Go:"go",Java:"java",Javascript:"javascript",Php:"php",Python:"python",Ruby:"ruby",Swift:"swift",Typescript:"typescript"}});var cXc=h(()=>{"use strict"});var lXc=h(()=>{"use strict"});var uXc=h(()=>{"use strict"});var pXc=h(()=>{"use strict"});var fXc=h(()=>{"use strict"});var dXc=h(()=>{"use strict"});var mXc=h(()=>{"use strict"});var hXc=h(()=>{"use strict"});var gXc=h(()=>{"use strict"});var fvo,AXc=h(()=>{"use strict";fvo={BeforeInteractive:"beforeInteractive",AfterInteractive:"afterInteractive",LazyOnload:"lazyOnload"}});var yXc=h(()=>{"use strict"});var dvo,bXc=h(()=>{"use strict";dvo={Default:"default",Minimal:"minimal"}});var EXc=h(()=>{"use strict"});var IXc=h(()=>{"use strict"});var vXc=h(()=>{"use strict"});var CXc=h(()=>{"use strict"});var mvo,xXc=h(()=>{"use strict";mvo={Python:"python",Cpp:"cpp"}});var SXc=h(()=>{"use strict"});var hvo,wXc=h(()=>{"use strict";hvo={Kind:"kind",Header:"header"}});var TXc=h(()=>{"use strict"});var OXc=h(()=>{"use strict"});var gvo,PXc=h(()=>{"use strict";gvo={Compact:"compact",Hyphenated:"hyphenated"}});var BXc=h(()=>{"use strict"});var DXc=h(()=>{"use strict"});var RXc=h(()=>{"use strict"});var kXc=h(()=>{"use strict"});var FXc=h(()=>{"use strict"});var NXc=h(()=>{"use strict"});var jXc=h(()=>{"use strict"});var zXc=h(()=>{"use strict"});var QXc=h(()=>{"use strict"});var MXc=h(()=>{"use strict"});var Avo,LXc=h(()=>{"use strict";Avo={Dark:"dark",Light:"light"}});var yvo,_Xc=h(()=>{"use strict";yvo={CopyPage:"copy-page",ViewAsMarkdown:"view-as-markdown",AskAi:"ask-ai",Chatgpt:"chatgpt",Claude:"claude",Cursor:"cursor",ClaudeCode:"claude-code",Vscode:"vscode"}});var UXc=h(()=>{"use strict"});var VXc=h(()=>{"use strict"});var bvo,GXc=h(()=>{"use strict";bvo={Default:"default",Toolbar:"toolbar"}});var qXc=h(()=>{"use strict"});var Evo,WXc=h(()=>{"use strict";Evo={Description:"description",Subtitle:"subtitle"}});var HXc=h(()=>{"use strict"});var KXc=h(()=>{"use strict"});var JXc=h(()=>{"use strict"});var YXc=h(()=>{"use strict"});var XXc=h(()=>{"use strict"});var ZXc=h(()=>{"use strict"});var $Xc=h(()=>{"use strict"});var eZc=h(()=>{"use strict"});var Ivo,tZc=h(()=>{"use strict";Ivo={Default:"default",Toggle:"toggle",Tabs:"tabs"}});var rZc=h(()=>{"use strict"});var nZc=h(()=>{"use strict"});var vvo,iZc=h(()=>{"use strict";vvo={Typescript:"typescript",Javascript:"javascript",Python:"python",Java:"java",Go:"go",Ruby:"ruby",Csharp:"csharp",Php:"php",Swift:"swift",Rust:"rust",Nodets:"nodets",Nodejs:"nodejs",Dotnet:"dotnet",Curl:"curl",Jvm:"jvm",Ts:"ts",Js:"js"}});var oZc=h(()=>{"use strict"});var sZc=h(()=>{"use strict"});var aZc=h(()=>{"use strict"});var cZc=h(()=>{"use strict"});var lZc=h(()=>{"use strict"});var uZc=h(()=>{"use strict"});var Cvo,pZc=h(()=>{"use strict";Cvo={Header:"header",HeaderTabs:"header-tabs",Sidebar:"sidebar"}});var fZc=h(()=>{"use strict"});var dZc=h(()=>{"use strict"});var mZc=h(()=>{"use strict"});var xvo,hZc=h(()=>{"use strict";xvo={Default:"default",Minimal:"minimal"}});var gZc=h(()=>{"use strict"});var AZc=h(()=>{"use strict"});var yZc=h(()=>{"use strict"});var bZc=h(()=>{"use strict"});var EZc=h(()=>{"use strict"});var IZc=h(()=>{"use strict"});var Svo,vZc=h(()=>{"use strict";Svo={Unset:"unset",Stable:"stable",GenerallyAvailable:"generally-available",InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",Beta:"beta",Alpha:"alpha",Preview:"preview",Legacy:"legacy"}});var wvo,CZc=h(()=>{"use strict";wvo={Header:"header",Sidebar:"sidebar"}});var xZc=h(()=>{"use strict"});var SZc=h(()=>{"use strict"});var wZc=h(()=>{"use strict"});var TZc=h(()=>{"use strict"});var OZc=h(()=>{"use strict"});var PZc=h(()=>{"use strict"});var BZc=h(()=>{"use strict"});var DZc=h(()=>{"use strict"});var RZc=h(()=>{"use strict"});var kZc=h(()=>{"use strict"});var FZc=h(()=>{"use strict"});var Tvo,NZc=h(()=>{"use strict";Tvo={Left:"left",Center:"center"}});var Ovo,jZc=h(()=>{"use strict";Ovo={Header:"header",Sidebar:"sidebar"}});var zZc=h(()=>{"use strict"});var QZc=h(()=>{"use strict"});var Pvo,MZc=h(()=>{"use strict";Pvo={Default:"default",Bubble:"bubble"}});var LZc=h(()=>{"use strict"});var _Zc=h(()=>{"use strict"});var UZc=h(()=>{"use strict"});var VZc=h(()=>{"use strict"});var Bvo,GZc=h(()=>{"use strict";Bvo={Blank:"_blank",Self:"_self",Parent:"_parent",Top:"_top"}});var qZc=h(()=>{"use strict"});var Dvo,WZc=h(()=>{"use strict";Dvo={Frontmatter:"frontmatter",Filename:"filename"}});var HZc=h(()=>{"use strict"});var KZc=h(()=>{"use strict"});var Rvo,JZc=h(()=>{"use strict";Rvo={Summary:"summary",SummaryLargeImage:"summary_large_image",App:"app",Player:"player"}});var YZc=h(()=>{"use strict"});var XZc=h(()=>{"use strict"});var ZZc=h(()=>{"use strict"});var kvo,$Zc=h(()=>{"use strict";kvo={Deprecated:"deprecated",Legacy:"legacy",Ga:"ga",Stable:"stable",Beta:"beta",Alpha:"alpha",Preview:"preview"}});var e$c=h(()=>{"use strict"});var t$c=h(()=>{"use strict"});var r$c=h(()=>{"use strict"});var Fvo,n$c=h(()=>{"use strict";Fvo={Flat:"flat",Grouped:"grouped"}});var i$c=h(()=>{"use strict"});var o$c=h(()=>{"use strict"});var s$c=h(()=>{"use strict"});var Nvo=h(()=>{"use strict";jJc();zJc();QJc();MJc();LJc();_Jc();UJc();VJc();GJc();qJc();WJc();HJc();KJc();JJc();YJc();XJc();ZJc();$Jc();eYc();tYc();rYc();nYc();iYc();oYc();sYc();aYc();cYc();lYc();uYc();pYc();fYc();dYc();mYc();hYc();gYc();AYc();yYc();bYc();EYc();IYc();vYc();CYc();xYc();SYc();wYc();TYc();OYc();PYc();BYc();DYc();RYc();kYc();FYc();NYc();jYc();zYc();QYc();MYc();LYc();_Yc();UYc();VYc();GYc();qYc();WYc();HYc();KYc();JYc();YYc();XYc();ZYc();$Yc();eXc();tXc();rXc();nXc();iXc();oXc();sXc();aXc();cXc();lXc();uXc();pXc();fXc();dXc();mXc();hXc();gXc();AXc();yXc();bXc();EXc();IXc();vXc();CXc();xXc();SXc();wXc();TXc();OXc();PXc();BXc();DXc();RXc();kXc();FXc();NXc();jXc();zXc();QXc();MXc();LXc();_Xc();UXc();VXc();GXc();qXc();WXc();HXc();KXc();JXc();YXc();XXc();ZXc();$Xc();eZc();tZc();rZc();nZc();iZc();oZc();sZc();aZc();cZc();lZc();uZc();pZc();fZc();dZc();mZc();hZc();gZc();AZc();yZc();bZc();EZc();IZc();vZc();CZc();xZc();SZc();wZc();TZc();OZc();PZc();BZc();DZc();RZc();kZc();FZc();NZc();jZc();zZc();QZc();MZc();LZc();_Zc();UZc();VZc();GZc();qZc();WZc();HZc();KZc();JZc();YZc();XZc();ZZc();$Zc();e$c();t$c();r$c();n$c();i$c();o$c();s$c()});var x2r={};ne(x2r,{AiChatLocation:()=>HIo,AiChatModel:()=>KIo,ApiReferenceLayout:()=>JIo,ApiSpecErrorResponseApplyTo:()=>YIo,ApiSpecErrorResponseHttpMethod:()=>XIo,ApiSpecType:()=>ZIo,Availability:()=>$Io,BodyThemeConfig:()=>evo,ChangelogLayout:()=>tvo,CheckRuleSeverity:()=>rvo,CodeBlockTheme:()=>nvo,CollapsedStringValue:()=>ivo,ContentAlignment:()=>ovo,EditThisPageLaunch:()=>svo,FontDisplay:()=>avo,FontStyle:()=>cvo,FooterNavThemeConfig:()=>lvo,HeaderPosition:()=>uvo,HttpSnippetLanguage:()=>pvo,JsScriptStrategy:()=>fvo,LanguageSwitcherThemeConfig:()=>dvo,LibraryLanguage:()=>mvo,LibraryOrganizeBy:()=>hvo,LibrarySlugStyle:()=>gvo,OgDynamicLogoColor:()=>Avo,PageActionOption:()=>yvo,PageActionsThemeConfig:()=>bvo,PageDescriptionSource:()=>Evo,ProductSwitcherThemeConfig:()=>Ivo,ProgrammingLanguage:()=>vvo,SearchbarPlacement:()=>Cvo,SidebarThemeConfig:()=>xvo,SortByAvailabilityValue:()=>Svo,SwitcherPlacement:()=>wvo,TabsAlignment:()=>Tvo,TabsPlacement:()=>Ovo,TabsThemeStyle:()=>Pvo,Target:()=>Bvo,TitleSource:()=>Dvo,TwitterCardSetting:()=>Rvo,VersionAvailability:()=>kvo,WebSocketOneofDisplay:()=>Fvo});var a$c=h(()=>{"use strict";Nvo()});var c$c=h(()=>{"use strict";a$c();Nvo()});var jvo={};ne(jvo,{AiChatLocation:()=>HIo,AiChatModel:()=>KIo,ApiReferenceLayout:()=>JIo,ApiSpecErrorResponseApplyTo:()=>YIo,ApiSpecErrorResponseHttpMethod:()=>XIo,ApiSpecType:()=>ZIo,Availability:()=>$Io,BodyThemeConfig:()=>evo,ChangelogLayout:()=>tvo,CheckRuleSeverity:()=>rvo,CodeBlockTheme:()=>nvo,CollapsedStringValue:()=>ivo,ContentAlignment:()=>ovo,EditThisPageLaunch:()=>svo,FontDisplay:()=>avo,FontStyle:()=>cvo,FooterNavThemeConfig:()=>lvo,HeaderPosition:()=>uvo,HttpSnippetLanguage:()=>pvo,JsScriptStrategy:()=>fvo,LanguageSwitcherThemeConfig:()=>dvo,LibraryLanguage:()=>mvo,LibraryOrganizeBy:()=>hvo,LibrarySlugStyle:()=>gvo,OgDynamicLogoColor:()=>Avo,PageActionOption:()=>yvo,PageActionsThemeConfig:()=>bvo,PageDescriptionSource:()=>Evo,ProductSwitcherThemeConfig:()=>Ivo,ProgrammingLanguage:()=>vvo,SearchbarPlacement:()=>Cvo,SidebarThemeConfig:()=>xvo,SortByAvailabilityValue:()=>Svo,SwitcherPlacement:()=>wvo,TabsAlignment:()=>Tvo,TabsPlacement:()=>Ovo,TabsThemeStyle:()=>Pvo,Target:()=>Bvo,TitleSource:()=>Dvo,TwitterCardSetting:()=>Rvo,VersionAvailability:()=>kvo,WebSocketOneofDisplay:()=>Fvo,docs:()=>x2r});var zvo=h(()=>{"use strict";c$c()});var l$c,u$c=h(()=>{"use strict";l$c=(e,t,r)=>JSON.stringify(e,t,r)});function j8d({message:e,statusCode:t,body:r}){let n=[];return e!=null&&n.push(e),t!=null&&n.push(`Status code: ${t.toString()}`),r!=null&&n.push(`Body: ${l$c(r,void 0,2)}`),n.join(`
|
|
254
254
|
`)}var d3e,p$c=h(()=>{"use strict";u$c();d3e=class extends Error{statusCode;body;rawResponse;cause;constructor({message:t,statusCode:r,body:n,rawResponse:i,cause:o}){super(j8d({message:t,statusCode:r,body:n})),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="FernDocsConfigError",this.statusCode=r,this.body=n,this.rawResponse=i,o!=null&&(this.cause=o)}get requestId(){let t=this.rawResponse?.headers;if(t==null)return;let r=t.get("X-Request-Id");if(r!=null)return r;let n;return t.forEach((i,o)=>{n===void 0&&/request[-_]?id$/i.test(o)&&(n=i)}),n}}});var R3t,f$c=h(()=>{"use strict";Qvo();R3t=class extends d3e{constructor(t,r){super({message:t,cause:r?.cause}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="FernDocsConfigTimeoutError"}}});var Qvo=h(()=>{"use strict";p$c();f$c()});var UH,d$c,k3t,Mvo,NP0,Lvo=h(()=>{"use strict";UH={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},d$c={[UH.Debug]:1,[UH.Info]:2,[UH.Warn]:3,[UH.Error]:4},k3t=class{debug(t,...r){console.debug(t,...r)}info(t,...r){console.info(t,...r)}warn(t,...r){console.warn(t,...r)}error(t,...r){console.error(t,...r)}},Mvo=class{level;logger;silent;constructor(t){this.level=d$c[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=d$c[t]}isDebug(){return this.shouldLog(UH.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(UH.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(UH.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(UH.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},NP0=new Mvo({level:UH.Info,logger:new k3t,silent:!0})});var _vo,m$c=h(()=>{"use strict";Lvo();(function(e){e.LogLevel=UH,e.ConsoleLogger=k3t})(_vo||(_vo={}))});var h$c=h(()=>{"use strict";m$c()});var g$c=h(()=>{"use strict";h$c()});var A$c=h(()=>{"use strict"});var y$c=h(()=>{"use strict";Lvo()});var b$c=h(()=>{"use strict"});var hl,ow=h(()=>{"use strict";hl={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",NEVER:"never",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"}});function gm(e,t){return`Expected ${t}. Received ${L8d(e)}.`}function L8d(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}var YF=h(()=>{"use strict"});function sw(e){return{...e,json:E$c(e.json),parse:E$c(e.parse)}}function E$c(e){return(t,r)=>{let n=e(t,r),{skipValidation:i=!1}=r??{};return!n.ok&&i?(console.warn(["Failed to validate.",...n.errors.map(o=>" - "+(o.path.length>0?`${o.path.join(".")}: ${o.message}`:o.message))].join(`
|
|
255
|
-
`)),{ok:!0,value:t}):n}}var Nee=h(()=>{"use strict"});function S2r(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var Uvo=h(()=>{"use strict"});var Qrt,Vvo=h(()=>{"use strict";Uvo();Qrt=class e extends Error{errors;constructor(t){super(t.map(S2r).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype),this.name="JsonError"}}});var Mrt,Gvo=h(()=>{"use strict";Uvo();Mrt=class e extends Error{errors;constructor(t){super(t.map(S2r).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype),this.name="ParseError"}}});function Am(e){return{nullable:()=>_8d(e),optional:()=>qvo(e),optionalNullable:()=>U8d(e),transform:t=>Wvo(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new Mrt(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new Qrt(n.errors)}}}function _8d(e){let t={parse:(r,n)=>r==null?{ok:!0,value:null}:e.parse(r,n),json:(r,n)=>r==null?{ok:!0,value:null}:e.json(r,n),getType:()=>hl.NULLABLE};return{...t,...Am(t)}}function qvo(e){let t={parse:(r,n)=>r==null?{ok:!0,value:void 0}:e.parse(r,n),json:(r,n)=>n?.omitUndefined&&r===void 0?{ok:!0,value:void 0}:r==null?{ok:!0,value:null}:e.json(r,n),getType:()=>hl.OPTIONAL};return{...t,...Am(t)}}function U8d(e){let t={parse:(r,n)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.parse(r,n),json:(r,n)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.json(r,n),getType:()=>hl.OPTIONAL_NULLABLE};return{...t,...Am(t)}}function Wvo(e,t){let r={parse:(n,i)=>{let o=e.parse(n,i);return o.ok?{ok:!0,value:t.transform(o.value)}:o},json:(n,i)=>{let o=t.untransform(n);return e.json(o,i)},getType:()=>e.getType()};return{...r,...Am(r)}}var I$c=h(()=>{"use strict";ow();Vvo();Gvo()});var Yz=h(()=>{"use strict";I$c();Vvo();Gvo()});function v$c(){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:gm(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:gm(t,"bigint")}]}:{ok:!0,value:t},getType:()=>hl.BIGINT};return{...sw(e),...Am(e)}}var C$c=h(()=>{"use strict";ow();YF();Nee();Yz()});var x$c=h(()=>{"use strict";C$c()});function S$c(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:gm(t,"string")}]}:V8d.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:gm(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:gm(t,"Date object")}]},getType:()=>hl.DATE};return{...sw(e),...Am(e)}}var V8d,w$c=h(()=>{"use strict";ow();YF();Nee();Yz();V8d=/^([+-]?\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)?)?)?)?$/});var T$c=h(()=>{"use strict";w$c()});function K1(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...sw(r),...Am(r)}}}var jee=h(()=>{"use strict";Yz();Nee()});function F3t(e){let t=new Set(e);return K1(hl.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:gm(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:gm(n,"enum")}]}:{ok:!0,value:n})()}function O$c(e){return F3t(e).transform({transform:t=>t,untransform:t=>t})}var P$c=h(()=>{"use strict";ow();jee();YF()});var Hvo=h(()=>{"use strict";P$c()});function B$c(e){let t=Kvo(e);return{...t,...Am(t)}}function Kvo(e){return{parse:(t,r)=>Lrt(e).parse(t,r),json:(t,r)=>Lrt(e).json(t,r),getType:()=>Lrt(e).getType()}}function Lrt(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var Jvo=h(()=>{"use strict";Yz()});function Yvo(e){return Object.entries(e)}var D$c=h(()=>{"use strict"});function N3t(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var Xvo=h(()=>{"use strict"});function Yfe(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var j3t=h(()=>{"use strict"});function z3t(e){return Object.keys(e)}var Zvo=h(()=>{"use strict"});function R$c(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var k$c=h(()=>{"use strict"});function VH(e){return{withParsedProperties:t=>$vo(e,t)}}function $vo(e,t){let r={parse:(n,i)=>{let o=e.parse(n,i);if(!o.ok)return o;let s={};for(let a in t)if(G8d.call(t,a)){let c=t[a];s[a]=typeof c=="function"?c(o.value):c}return{ok:!0,value:{...o.value,...s}}},json:(n,i)=>{if(!Yfe(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:gm(n,"object")}]};let o=new Set(Object.keys(t)),s=N3t(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Am(r),...VH(r)}}var G8d,F$c=h(()=>{"use strict";Xvo();YF();j3t();Yz();G8d=Object.prototype.hasOwnProperty});var Q3t=h(()=>{"use strict";F$c()});function N$c(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function Xfe(e){return e.isProperty}var eCo=h(()=>{"use strict"});function w2r(e){let t;function r(){if(t==null){t={};for(let[d,f]of Yvo(e)){let m=Xfe(f)?f.rawKey:d,g=Xfe(f)?f.valueSchema:f;t[m]={rawKey:m,parsedKey:d,valueSchema:g}}}return t}let n,i,o,s;function a(){if(n==null){n=[],i=[];for(let[d,f]of Yvo(e)){let m=Xfe(f)?f.rawKey:d,g=Xfe(f)?f.valueSchema:f;W8d(g)&&(n.push(m),i.push(d))}o=new Set(n),s=new Set(i)}return n}function c(){return i==null&&a(),i}function l(){return o==null&&a(),o}function u(){return s==null&&a(),s}let p={_getRawProperties:()=>Object.entries(e).map(([d,f])=>Xfe(f)?f.rawKey:d),_getParsedProperties:()=>z3t(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return j$c({value:d,requiredKeys:a(),requiredKeysSet:l(),getProperty:g=>{let A=r()[g];if(A!=null)return{transformedKey:A.parsedKey,transform:b=>{let I=[...m,g];return A.valueSchema.parse(b,{...f,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},json:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return j$c({value:d,requiredKeys:c(),requiredKeysSet:u(),getProperty:g=>{let A=e[g];if(A!=null)return Xfe(A)?{transformedKey:A.rawKey,transform:b=>{let I=[...m,g];return A.valueSchema.json(b,{...f,breadcrumbsPrefix:I})}}:{transformedKey:g,transform:b=>{let I=[...m,g];return A.json(b,{...f,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},getType:()=>hl.OBJECT};return{...sw(p),...Am(p),...VH(p),...m3e(p)}}function j$c({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!Yfe(e))return{ok:!1,errors:[{path:s,message:gm(e,"object")}]};let a=t.length,c=[],l={};for(let u in e){if(!q8d.call(e,u))continue;let p=e[u],d=n(u);if(d!=null){a>0&&r.has(u)&&a--;let f=d.transform(p);if(f.ok)l[d.transformedKey]=f.value;else{l[u]=p;for(let m of f.errors)c.push(m)}}else switch(i){case"fail":c.push({path:[...s,u],message:`Unexpected key "${u}"`});break;case"strip":break;case"passthrough":l[u]=p;break}}if(a>0)for(let u of t)u in e||c.push({path:s,message:`Missing required key "${u}"`});return c.length===0||o?{ok:!0,value:l}:{ok:!1,errors:c}}function m3e(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>z$c({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>z$c({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>hl.OBJECT};return{...r,...Am(r),...VH(r),...m3e(r)}},passthrough:()=>{let t=new Set(e._getRawProperties()),r=new Set(e._getParsedProperties()),n={_getParsedProperties:()=>e._getParsedProperties(),_getRawProperties:()=>e._getRawProperties(),parse:(i,o)=>{let s=e.parse(i,{...o,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let a={};if(typeof i=="object"&&i!=null)for(let[c,l]of Object.entries(i))t.has(c)||(a[c]=l);return{ok:!0,value:{...a,...s.value}}},json:(i,o)=>{let s=e.json(i,{...o,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let a={};if(typeof i=="object"&&i!=null)for(let[c,l]of Object.entries(i))r.has(c)||(a[c]=l);return{ok:!0,value:{...a,...s.value}}},getType:()=>hl.OBJECT};return{...n,...Am(n),...VH(n),...m3e(n)}}}}function z$c({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!Yfe(t))return{ok:!1,errors:[{path:i,message:gm(t,"object")}]};let o=new Set(e),[s,a]=R$c(z3t(t),u=>o.has(u)),c=r(N3t(t,a)),l=n(N3t(t,s));return c.ok&&l.ok?{ok:!0,value:{...c.value,...l.value}}:{ok:!1,errors:[...c.ok?[]:c.errors,...l.ok?[]:l.errors]}}function W8d(e){return!H8d(e)}function H8d(e){switch(e.getType()){case hl.ANY:case hl.UNKNOWN:case hl.OPTIONAL:case hl.OPTIONAL_NULLABLE:return!0;default:return!1}}var q8d,tCo=h(()=>{"use strict";ow();D$c();Xvo();YF();j3t();Zvo();Nee();k$c();Q3t();Yz();eCo();q8d=Object.prototype.hasOwnProperty});function Q$c(e){return w2r(e)}var M$c=h(()=>{"use strict";tCo()});var rCo=h(()=>{"use strict";tCo();M$c();eCo()});function L$c(e){let t={...Kvo(e),_getRawProperties:()=>Lrt(e)._getRawProperties(),_getParsedProperties:()=>Lrt(e)._getParsedProperties()};return{...t,...Am(t),...VH(t),...m3e(t)}}var _$c=h(()=>{"use strict";rCo();Q3t();Yz();Jvo()});var U$c=h(()=>{"use strict";Jvo();_$c()});function T2r(e){let t={parse:(r,n)=>V$c(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>V$c(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>hl.LIST};return{...sw(t),...Am(t)}}function V$c(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:gm(e,"list"),path:[]}]};let r=[],n=[];for(let i=0;i<e.length;i++){let o=t(e[i],i);if(o.ok)r.push(o.value);else for(let s of o.errors)n.push(s)}return n.length===0?{ok:!0,value:r}:{ok:!1,errors:n}}var G$c=h(()=>{"use strict";ow();YF();Nee();Yz()});var nCo=h(()=>{"use strict";G$c()});function q$c(e){return K1(hl.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:gm(r,`${e.toString()}`)}]})()}var W$c=h(()=>{"use strict";ow();jee();YF()});function H$c(e){return K1(hl.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:gm(r,`"${e}"`)}]})()}var K$c=h(()=>{"use strict";ow();jee();YF()});var J$c=h(()=>{"use strict";W$c();K$c()});var Y$c,X$c=h(()=>{"use strict";ow();jee();Y$c=K1(hl.ANY,e=>({ok:!0,value:e}))});var Z$c,$$c=h(()=>{"use strict";ow();jee();YF();Z$c=K1(hl.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:gm(e,"boolean")}]})});var eel,tel=h(()=>{"use strict";ow();jee();eel=K1(hl.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var rel,nel=h(()=>{"use strict";ow();jee();YF();rel=K1(hl.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:gm(e,"number")}]})});var iel,oel=h(()=>{"use strict";ow();jee();YF();iel=K1(hl.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:gm(e,"string")}]})});var sel,ael=h(()=>{"use strict";ow();jee();sel=K1(hl.UNKNOWN,e=>({ok:!0,value:e}))});var cel=h(()=>{"use strict";X$c();$$c();tel();nel();oel();ael()});function lel(e,t){let r={parse:(n,i)=>O2r({value:n,isKeyNumeric:e.getType()===hl.NUMBER,transformKey:o=>e.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>O2r({value:n,isKeyNumeric:e.getType()===hl.NUMBER,transformKey:o=>e.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>hl.RECORD};return{...sw(r),...Am(r)}}function uel(e,t){let r={parse:(n,i)=>O2r({value:n,isKeyNumeric:e.getType()===hl.NUMBER,transformKey:o=>e.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>O2r({value:n,isKeyNumeric:e.getType()===hl.NUMBER,transformKey:o=>e.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>hl.RECORD};return{...sw(r),...Am(r)}}function O2r({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!Yfe(e))return{ok:!1,errors:[{path:i,message:gm(e,"object")}]};let o={},s=[];for(let a in e){if(!K8d.call(e,a))continue;let c=e[a];if(c===void 0)continue;let l=a;if(t){let d=a.length>0?Number(a):NaN;Number.isNaN(d)||(l=d)}let u=r(l),p=n(c,l);if(u.ok&&p.ok)o[u.value]=p.value;else{if(!u.ok)for(let d of u.errors)s.push(d);if(!p.ok)for(let d of p.errors)s.push(d)}}return s.length===0?{ok:!0,value:o}:{ok:!1,errors:s}}var K8d,pel=h(()=>{"use strict";ow();YF();j3t();Nee();Yz();K8d=Object.prototype.hasOwnProperty});var fel=h(()=>{"use strict";pel()});function del(e){let t=T2r(e),r={parse:(n,i)=>{let o=t.parse(n,i);return o.ok?{ok:!0,value:new Set(o.value)}:o},json:(n,i)=>n instanceof Set?t.json([...n],i):{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:gm(n,"Set")}]},getType:()=>hl.SET};return{...sw(r),...Am(r)}}var mel=h(()=>{"use strict";ow();YF();Nee();nCo();Yz()});var hel=h(()=>{"use strict";mel()});function Ael(e){let t={parse:(r,n)=>gel((i,o)=>i.parse(r,o),e,n),json:(r,n)=>gel((i,o)=>i.json(r,o),e,n),getType:()=>hl.UNDISCRIMINATED_UNION};return{...sw(t),...Am(t)}}function gel(e,t,r){let n=[];for(let[i,o]of t.entries()){let s=e(o,{...r,skipValidation:!1});if(s.ok)return s;for(let a of s.errors)n.push({path:a.path,message:`[Variant ${i}] ${a.message}`})}return{ok:!1,errors:n}}var yel=h(()=>{"use strict";ow();Nee();Yz()});var bel=h(()=>{"use strict";yel()});function Eel(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var Iel=h(()=>{"use strict"});function Cel(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=F3t(z3t(t)),o={parse:(s,a)=>vel({value:s,discriminant:r,transformedDiscriminant:n,transformDiscriminantValue:c=>i.parse(c,{allowUnrecognizedEnumValues:a?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...a?.breadcrumbsPrefix??[],r]}),getAdditionalPropertiesSchema:c=>t[c],allowUnrecognizedUnionMembers:a?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(c,l)=>l.parse(c,a),breadcrumbsPrefix:a?.breadcrumbsPrefix}),json:(s,a)=>vel({value:s,discriminant:n,transformedDiscriminant:r,transformDiscriminantValue:c=>i.json(c,{allowUnrecognizedEnumValues:a?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...a?.breadcrumbsPrefix??[],n]}),getAdditionalPropertiesSchema:c=>t[c],allowUnrecognizedUnionMembers:a?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(c,l)=>l.json(c,a),breadcrumbsPrefix:a?.breadcrumbsPrefix}),getType:()=>hl.UNION};return{...sw(o),...Am(o),...VH(o)}}function vel({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!Yfe(e))return{ok:!1,errors:[{path:a,message:gm(e,"object")}]};let c=e[t],l={};for(let f in e)J8d.call(e,f)&&f!==t&&(l[f]=e[f]);if(c==null)return{ok:!1,errors:[{path:a,message:`Missing discriminant ("${t}")`}]};let u=n(c);if(!u.ok)return{ok:!1,errors:u.errors};let p=i(u.value);if(p==null)return o?{ok:!0,value:{[r]:u.value,...l}}:{ok:!1,errors:[{path:[...a,t],message:"Unexpected discriminant value"}]};let d=s(l,p);return d.ok?{ok:!0,value:{[r]:c,...d.value}}:d}var J8d,xel=h(()=>{"use strict";ow();YF();j3t();Zvo();Nee();Hvo();Q3t();Yz();J8d=Object.prototype.hasOwnProperty});var Sel=h(()=>{"use strict";Iel();xel()});var wel=h(()=>{"use strict";x$c();T$c();Hvo();U$c();nCo();J$c();rCo();Q3t();cel();fel();Yz();hel();bel();Sel()});var $={};ne($,{JsonError:()=>Qrt,ParseError:()=>Mrt,any:()=>Y$c,bigint:()=>v$c,boolean:()=>Z$c,booleanLiteral:()=>q$c,date:()=>S$c,discriminant:()=>Eel,enum_:()=>F3t,forwardCompatibleEnum_:()=>O$c,getObjectLikeUtils:()=>VH,getObjectUtils:()=>m3e,getSchemaUtils:()=>Am,isProperty:()=>Xfe,lazy:()=>B$c,lazyObject:()=>L$c,list:()=>T2r,never:()=>eel,number:()=>rel,object:()=>w2r,objectWithoutOptionalProperties:()=>Q$c,optional:()=>qvo,partialRecord:()=>uel,property:()=>N$c,record:()=>lel,set:()=>del,string:()=>iel,stringLiteral:()=>H$c,transform:()=>Wvo,undiscriminatedUnion:()=>Ael,union:()=>Cel,unknown:()=>sel,withParsedProperties:()=>$vo});var Tel=h(()=>{"use strict";wel()});var Oel=h(()=>{"use strict"});var br=h(()=>{"use strict";A$c();y$c();b$c();Tel();Oel()});var P2r,iCo=h(()=>{"use strict";br();P2r=$.object({href:$.string()})});var B2r,oCo=h(()=>{"use strict";br();B2r=$.enum_(["description","subtitle"])});var D2r,sCo=h(()=>{"use strict";br();oCo();D2r=$.object({pageDirective:$.property("page-directive",$.string().optional()),pageDescriptionSource:$.property("page-description-source",B2r.optional()),llmsTxt:$.property("llms-txt",$.string().optional()),llmsFullTxt:$.property("llms-full-txt",$.string().optional()),robotsTxt:$.property("robots-txt",$.string().optional())})});var R2r,aCo=h(()=>{"use strict";br();R2r=$.object({url:$.string(),title:$.string().optional()})});var k2r,cCo=h(()=>{"use strict";br();aCo();k2r=$.undiscriminatedUnion([R2r])});var F2r,lCo=h(()=>{"use strict";br();F2r=$.enum_(["docs","slack","discord"])});var N2r,uCo=h(()=>{"use strict";br();N2r=$.enum_(["claude-3.7","claude-4","command-a"])});var M3t,pCo=h(()=>{"use strict";br();cCo();lCo();uCo();M3t=$.object({model:N2r.optional(),systemPrompt:$.property("system-prompt",$.string().optional()),location:$.list(F2r).optional(),datasources:$.list(k2r).optional(),maskPii:$.property("mask-pii",$.boolean().optional()),disclaimer:$.string().optional(),buttonText:$.property("button-text",$.string().optional())})});var j2r,fCo=h(()=>{"use strict";br();j2r=$.object({enabled:$.boolean().optional(),style:$.string().optional()})});var z2r,dCo=h(()=>{"use strict";br();z2r=$.object({orgId:$.property("org-id",$.string())})});var Q2r,mCo=h(()=>{"use strict";br();Q2r=$.object({measurementId:$.property("measurement-id",$.string())})});var M2r,hCo=h(()=>{"use strict";br();M2r=$.object({containerId:$.property("container-id",$.string())})});var L2r,gCo=h(()=>{"use strict";br();L2r=$.object({appId:$.property("app-id",$.string()),apiBase:$.property("api-base",$.string().optional())})});var _2r,ACo=h(()=>{"use strict";br();_2r=$.object({apiKey:$.property("api-key",$.string()),endpoint:$.string().optional()})});var U2r,yCo=h(()=>{"use strict";br();U2r=$.object({writeKey:$.property("write-key",$.string())})});var V2r,bCo=h(()=>{"use strict";br();dCo();mCo();hCo();gCo();ACo();yCo();V2r=$.object({segment:U2r.optional(),fullstory:z2r.optional(),intercom:L2r.optional(),posthog:_2r.optional(),gtm:M2r.optional(),ga4:Q2r.optional()})});var Lve,L3t=h(()=>{"use strict";br();Lve=$.object({message:$.string()})});var G2r,ECo=h(()=>{"use strict";br();G2r=$.enum_(["all","untyped"])});var q2r,ICo=h(()=>{"use strict";br();q2r=$.enum_(["get","post","put","patch","delete","head","options","trace"])});var W2r,vCo=h(()=>{"use strict";br();ICo();W2r=$.object({statusCode:$.property("status-code",$.number()),methods:$.list(q2r).optional()})});var H2r,CCo=h(()=>{"use strict";br();H2r=$.undiscriminatedUnion([$.string(),$.record($.string(),$.unknown())])});var K2r,xCo=h(()=>{"use strict";br();ECo();vCo();CCo();K2r=$.object({schema:H2r,name:$.string().optional(),applyTo:$.property("apply-to",G2r.optional()),ensure:$.list(W2r).optional()})});var J2r,SCo=h(()=>{"use strict";br();xCo();J2r=$.object({typeDatesAsStrings:$.property("type-dates-as-strings",$.boolean().optional()),useBytesForBinaryResponse:$.property("use-bytes-for-binary-response",$.boolean().optional()),respectParameterContent:$.property("respect-parameter-content",$.boolean().optional()),respectOperationIdWordBoundaries:$.property("respect-operation-id-word-boundaries",$.boolean().optional()),inferForwardCompatible:$.property("infer-forward-compatible",$.boolean().optional()),preserveOneOfInAllOf:$.property("preserve-one-of-in-all-of",$.boolean().optional()),anyOfSiblingPropertiesAsObject:$.property("any-of-sibling-properties-as-object",$.boolean().optional()),errorResponses:$.property("error-responses",K2r.optional())})});var Y2r,wCo=h(()=>{"use strict";br();Y2r=$.enum_(["openapi","asyncapi","graphql"])});var X2r,TCo=h(()=>{"use strict";br();SCo();wCo();X2r=$.object({type:Y2r,path:$.string(),namespace:$.string().optional(),overlays:$.string().optional(),overrides:$.list($.string()).optional(),settings:J2r.optional()})});var _3t,OCo=h(()=>{"use strict";br();_3t=$.string()});var zee,_rt=h(()=>{"use strict";br();OCo();zee=$.undiscriminatedUnion([_3t,$.list(_3t)])});var J1,Qee=h(()=>{"use strict";br();J1=$.enum_(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var Z2r,PCo=h(()=>{"use strict";br();Z2r=$.enum_(["open-by-default"])});var Mee,Urt=h(()=>{"use strict";br();PCo();Mee=$.undiscriminatedUnion([$.boolean(),Z2r])});var $2r,BCo=h(()=>{"use strict";br();$2r=$.object({href:$.string().optional()})});var Lee,Vrt=h(()=>{"use strict";br();BCo();Lee=$.object({hidden:$.boolean().optional(),environments:$.list($.string()).optional(),button:$2r.optional(),oauth:$.boolean().optional(),limitWebsocketMessagesPerConnection:$.property("limit-websocket-messages-per-connection",$.number().optional()),sendOptionalDefaults:$.property("send-optional-defaults",$.boolean().optional())})});var eNr,DCo=h(()=>{"use strict";br();eNr=$.object({version:$.string(),package:$.string()})});var f3,RCo=h(()=>{"use strict";br();DCo();f3=$.undiscriminatedUnion([$.string(),eNr])});var tNr,kCo=h(()=>{"use strict";br();RCo();tNr=$.object({python:f3.optional(),typescript:f3.optional(),go:f3.optional(),java:f3.optional(),ruby:f3.optional(),csharp:f3.optional(),php:f3.optional(),swift:f3.optional(),rust:f3.optional(),cli:f3.optional()})});var rNr,FCo=h(()=>{"use strict";br();rNr=$.enum_(["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var U3t,NCo=h(()=>{"use strict";br();U3t=$.object({flag:$.string(),fallbackValue:$.property("fallback-value",$.unknown().optional()),match:$.unknown().optional()})});var nNr,jCo=h(()=>{"use strict";br();NCo();nNr=$.undiscriminatedUnion([$.string(),U3t,$.list(U3t)])});var Hf,aw=h(()=>{"use strict";br();jCo();Hf=$.object({featureFlag:$.property("feature-flag",nNr.optional())})});var h3e,iNr=h(()=>{"use strict";br();h3e=$.string()});var Grt,oNr=h(()=>{"use strict";br();iNr();Grt=$.undiscriminatedUnion([h3e,$.list(h3e)])});var Kf,cw=h(()=>{"use strict";br();oNr();Kf=$.object({viewers:Grt.optional(),orphaned:$.boolean().optional()})});var sNr,zCo=h(()=>{"use strict";br();d3();TCo();_rt();Qee();Urt();Vrt();kCo();FCo();aw();cw();sNr=$.object({api:$.string(),apiName:$.property("api-name",$.string().optional()),specs:$.list(X2r).optional(),openrpc:$.string().optional(),audiences:zee.optional(),displayErrors:$.property("display-errors",$.boolean().optional()),tagDescriptionPages:$.property("tag-description-pages",$.boolean().optional()),snippets:tNr.optional(),postman:$.string().optional(),summary:$.string().optional(),layout:$.list($.lazy(()=>_ee)).optional(),collapsed:Mee.optional(),icon:$.string().optional(),slug:$.string().optional(),hidden:$.boolean().optional(),availability:J1.optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),alphabetized:$.boolean().optional(),sortByAvailability:$.property("sort-by-availability",$.list(rNr).optional()),flattened:$.boolean().optional(),paginated:$.boolean().optional(),types:$.boolean().optional(),playground:Lee.optional()}).extend(Kf).extend(Hf)});var aNr,QCo=h(()=>{"use strict";br();Qee();Vrt();aw();cw();aNr=$.object({endpoint:$.string(),title:$.string().optional(),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional(),availability:J1.optional(),playground:Lee.optional()}).extend(Kf).extend(Hf)});var cNr,MCo=h(()=>{"use strict";br();cNr=$.enum_(["indented","cards"])});var lNr,LCo=h(()=>{"use strict";br();Qee();aw();cw();lNr=$.object({operation:$.string(),title:$.string().optional(),slug:$.string().optional(),hidden:$.boolean().optional(),availability:J1.optional()}).extend(Kf).extend(Hf)});var t5,g3e=h(()=>{"use strict";br();t5=$.enum_(["_blank","_self","_parent","_top"])});var Zz,_ve=h(()=>{"use strict";br();g3e();Zz=$.object({link:$.string(),href:$.string(),icon:$.string().optional(),target:t5.optional()})});var r5,A3e=h(()=>{"use strict";br();Qee();aw();cw();r5=$.object({page:$.string(),path:$.string(),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional(),noindex:$.boolean().optional(),availability:J1.optional(),profile:$.string().optional()}).extend(Kf).extend(Hf)});var _ee,Pel=h(()=>{"use strict";br();d3();QCo();LCo();_ve();A3e();_ee=$.undiscriminatedUnion([$.string(),$.record($.string(),$.lazy(()=>uNr)),$.lazyObject(()=>pNr),aNr,lNr,r5,Zz])});var uNr,Bel=h(()=>{"use strict";br();d3();uNr=$.undiscriminatedUnion([$.list($.lazy(()=>_ee)),$.lazyObject(()=>fNr)])});var fNr,Del=h(()=>{"use strict";br();d3();Qee();Vrt();aw();cw();fNr=$.object({title:$.string().optional(),summary:$.string().optional(),contents:$.list($.lazy(()=>_ee)).optional(),availability:J1.optional(),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),playground:Lee.optional()}).extend(Kf).extend(Hf)});var pNr,Rel=h(()=>{"use strict";br();d3();Qee();Urt();Vrt();aw();cw();pNr=$.object({section:$.string(),referencedPackages:$.property("referenced-packages",$.list($.string()).optional()),summary:$.string().optional(),contents:$.list($.lazy(()=>_ee)).optional(),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),collapsed:Mee.optional(),collapsible:$.boolean().optional(),collapsedByDefault:$.property("collapsed-by-default",$.boolean().optional()),availability:J1.optional(),playground:Lee.optional()}).extend(Kf).extend(Hf)});var dNr,_Co=h(()=>{"use strict";br();dNr=$.object({dark:$.string().optional(),light:$.string().optional()})});var mNr,UCo=h(()=>{"use strict";br();_Co();mNr=$.undiscriminatedUnion([$.string(),dNr])});var Zfe,V3t=h(()=>{"use strict";br();Zfe=$.string()});var hNr,VCo=h(()=>{"use strict";br();V3t();aw();cw();hNr=$.object({blog:Zfe,title:$.string().optional(),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional()}).extend(Kf).extend(Hf)});var gNr,GCo=h(()=>{"use strict";br();gNr=$.enum_(["default","canvas"])});var ANr,qCo=h(()=>{"use strict";br();ANr=$.object({currentPage:$.property("current-page",$.boolean().optional()),sticky:$.boolean().optional()})});var qrt,yNr=h(()=>{"use strict";br();V3t();aw();cw();qrt=$.object({changelog:Zfe,title:$.string().optional(),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional()}).extend(Kf).extend(Hf)});var bNr,WCo=h(()=>{"use strict";br();bNr=$.enum_(["timeline","classic"])});var GH,HCo=h(()=>{"use strict";br();GH=$.enum_(["warn","error"])});var ENr,KCo=h(()=>{"use strict";br();HCo();ENr=$.object({exampleValidation:$.property("example-validation",GH.optional()),brokenLinks:$.property("broken-links",GH.optional()),noNonComponentRefs:$.property("no-non-component-refs",GH.optional()),validLocalReferences:$.property("valid-local-references",GH.optional()),noCircularRedirects:$.property("no-circular-redirects",GH.optional()),validDocsEndpoints:$.property("valid-docs-endpoints",GH.optional()),missingRedirects:$.property("missing-redirects",GH.optional()),validChangelogSlug:$.property("valid-changelog-slug",GH.optional())})});var INr,JCo=h(()=>{"use strict";br();KCo();INr=$.object({rules:ENr.optional()})});var G3t,YCo=h(()=>{"use strict";br();G3t=$.enum_(["github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","github-light","github-light-default","github-light-high-contrast","material-theme-darker","min-dark","min-light"])});var vNr,XCo=h(()=>{"use strict";br();YCo();vNr=$.object({light:G3t.optional(),dark:G3t.optional()})});var CNr,ZCo=h(()=>{"use strict";br();CNr=$.object({dark:$.string().optional(),light:$.string().optional()})});var ZI,$Co=h(()=>{"use strict";br();ZCo();ZI=$.undiscriminatedUnion([$.string(),CNr])});var xNr,exo=h(()=>{"use strict";br();$Co();xNr=$.object({accentPrimary:$.property("accent-primary",ZI.optional()),accentPrimaryDeprecated:$.property("accentPrimary",ZI.optional()),background:ZI.optional(),border:ZI.optional(),sidebarBackground:$.property("sidebar-background",ZI.optional()),headerBackground:$.property("header-background",ZI.optional()),cardBackground:$.property("card-background",ZI.optional()),accent1:$.property("accent-1",ZI.optional()),accent2:$.property("accent-2",ZI.optional()),accent3:$.property("accent-3",ZI.optional()),accent4:$.property("accent-4",ZI.optional()),accent5:$.property("accent-5",ZI.optional()),accent6:$.property("accent-6",ZI.optional()),accent7:$.property("accent-7",ZI.optional()),accent8:$.property("accent-8",ZI.optional()),accent9:$.property("accent-9",ZI.optional()),accent10:$.property("accent-10",ZI.optional()),accent11:$.property("accent-11",ZI.optional()),accent12:$.property("accent-12",ZI.optional())})});var SNr,txo=h(()=>{"use strict";br();SNr=$.enum_(["center","left"])});var wNr,rxo=h(()=>{"use strict";br();wNr=$.undiscriminatedUnion([$.string(),$.list($.string())])});var TNr,nxo=h(()=>{"use strict";br();TNr=$.undiscriminatedUnion([$.string(),$.list($.string())])});var ONr,ixo=h(()=>{"use strict";br();ONr=$.object({title:$.string(),subtitle:$.string().optional(),url:$.string(),icon:$.string().optional(),default:$.boolean().optional()})});var PNr,oxo=h(()=>{"use strict";br();PNr=$.enum_(["github","dashboard"])});var BNr,sxo=h(()=>{"use strict";br();BNr=$.object({host:$.string().optional(),owner:$.string(),repo:$.string(),branch:$.string().optional()})});var DNr,axo=h(()=>{"use strict";br();oxo();sxo();DNr=$.object({github:BNr.optional(),launch:PNr.optional()})});var RNr,cxo=h(()=>{"use strict";br();_rt();nxo();axo();RNr=$.object({url:$.string(),customDomain:$.property("custom-domain",TNr.optional()),editThisPage:$.property("edit-this-page",DNr.optional()),audiences:zee.optional(),multiSource:$.property("multi-source",$.boolean().optional())})});var kNr,lxo=h(()=>{"use strict";br();kNr=$.object({allowedOrigins:$.property("allowed-origins",$.list($.string()))})});var FNr,uxo=h(()=>{"use strict";br();FNr=$.enum_(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"])});var NNr,pxo=h(()=>{"use strict";br();uxo();NNr=$.undiscriminatedUnion([$.boolean(),$.list(FNr)])});var Uve,q3t=h(()=>{"use strict";br();Uve=$.string()});var jNr,fxo=h(()=>{"use strict";br();jNr=$.object({prioritizeCurrentProduct:$.property("prioritize-current-product",$.boolean().optional()),defaultFilterByCurrentProduct:$.property("default-filter-by-current-product",$.boolean().optional())})});var Wrt,zNr=h(()=>{"use strict";br();Wrt=$.enum_(["frontmatter","filename"])});var QNr,dxo=h(()=>{"use strict";br();QNr=$.enum_(["flat","grouped"])});var MNr,mxo=h(()=>{"use strict";br();lxo();pxo();q3t();fxo();zNr();dxo();MNr=$.object({searchText:$.property("search-text",$.string().optional()),disableSearch:$.property("disable-search",$.boolean().optional()),darkModeCode:$.property("dark-mode-code",$.boolean().optional()),defaultSearchFilters:$.property("default-search-filters",$.boolean().optional()),search:jNr.optional(),httpSnippets:$.property("http-snippets",NNr.optional()),hide404Page:$.property("hide-404-page",$.boolean().optional()),useJavascriptAsTypescript:$.property("use-javascript-as-typescript",$.boolean().optional()),disableExplorerProxy:$.property("disable-explorer-proxy",$.boolean().optional()),disableEnvironmentEditing:$.property("disable-environment-editing",$.boolean().optional()),disableAnalytics:$.property("disable-analytics",$.boolean().optional()),language:Uve.optional(),folderTitleSource:$.property("folder-title-source",Wrt.optional()),substituteEnvVars:$.property("substitute-env-vars",$.boolean().optional()),websocketOneofDisplay:$.property("websocket-oneof-display",QNr.optional()),embedding:kNr.optional(),showHeadersInExamples:$.property("show-headers-in-examples",$.boolean().optional()),requireAnalyticsConsent:$.property("require-analytics-consent",$.boolean().optional())})});var Hrt,LNr=h(()=>{"use strict";br();Hrt=$.enum_(["normal","italic"])});var Krt,_Nr=h(()=>{"use strict";br();Krt=$.undiscriminatedUnion([$.string(),$.number()])});var UNr,hxo=h(()=>{"use strict";br();LNr();_Nr();UNr=$.object({path:$.string(),weight:Krt.optional(),style:Hrt.optional()})});var VNr,gxo=h(()=>{"use strict";br();hxo();VNr=$.undiscriminatedUnion([$.string(),UNr])});var GNr,Axo=h(()=>{"use strict";br();GNr=$.enum_(["auto","block","swap","fallback","optional"])});var Jrt,yxo=h(()=>{"use strict";br();gxo();Axo();LNr();_Nr();Jrt=$.object({name:$.string().optional(),path:$.string().optional(),weight:Krt.optional(),style:Hrt.optional(),paths:$.list(VNr).optional(),display:GNr.optional(),fallback:$.list($.string()).optional(),fontVariationSettings:$.property("font-variation-settings",$.string().optional())})});var qNr,bxo=h(()=>{"use strict";br();yxo();qNr=$.object({headingsFont:Jrt.optional(),bodyFont:Jrt.optional(),codeFont:Jrt.optional()})});var WNr,Exo=h(()=>{"use strict";br();WNr=$.object({url:$.string(),locale:$.string().optional()})});var HNr,Ixo=h(()=>{"use strict";br();Exo();HNr=$.undiscriminatedUnion([$.string(),WNr])});var KNr,vxo=h(()=>{"use strict";br();Ixo();KNr=$.object({mdxComponents:$.property("mdx-components",$.list($.string()).optional()),disableStreamToggle:$.property("disable-stream-toggle",$.boolean().optional()),openapiParserV2:$.property("openapi-parser-v2",$.boolean().optional()),openapiParserV3:$.property("openapi-parser-v3",$.boolean().optional()),dynamicSnippets:$.property("dynamic-snippets",$.boolean().optional()),aiExamples:$.property("ai-examples",$.boolean().optional()),aiExampleStyleInstructions:$.property("ai-example-style-instructions",$.string().optional()),excludeApis:$.property("exclude-apis",$.boolean().optional()),basepathAware:$.property("basepath-aware",$.boolean().optional()),robotsTxtOnInstanceUrl:$.property("robots-txt-on-instance-url",$.boolean().optional()),externalSitemaps:$.property("external-sitemaps",$.list(HNr).optional())})});var JNr,Cxo=h(()=>{"use strict";br();JNr=$.object({github:$.string().optional(),twitter:$.string().optional(),x:$.string().optional(),linkedin:$.string().optional(),youtube:$.string().optional(),instagram:$.string().optional(),facebook:$.string().optional(),discord:$.string().optional(),slack:$.string().optional(),hackernews:$.string().optional(),medium:$.string().optional(),website:$.string().optional()})});var YNr,xxo=h(()=>{"use strict";br();YNr=$.object({intercom:$.string().optional(),context7:$.string().optional()})});var Yrt,XNr=h(()=>{"use strict";br();Yrt=$.enum_(["beforeInteractive","afterInteractive","lazyOnload"])});var ZNr,Sxo=h(()=>{"use strict";br();XNr();ZNr=$.object({path:$.string(),strategy:Yrt.optional()})});var $Nr,wxo=h(()=>{"use strict";br();Sxo();$Nr=$.undiscriminatedUnion([$.string(),ZNr])});var ejr,Txo=h(()=>{"use strict";br();XNr();ejr=$.object({url:$.string(),strategy:Yrt.optional(),disableSri:$.property("disable-sri",$.boolean().optional())})});var W3t,Oxo=h(()=>{"use strict";br();wxo();Txo();W3t=$.undiscriminatedUnion([ejr,$Nr])});var tjr,Pxo=h(()=>{"use strict";br();Oxo();tjr=$.undiscriminatedUnion([W3t,$.list(W3t)])});var rjr,Bxo=h(()=>{"use strict";br();rjr=$.enum_(["fixed","static"])});var njr,Dxo=h(()=>{"use strict";br();njr=$.enum_(["header","header-tabs","sidebar"])});var ijr,Rxo=h(()=>{"use strict";br();ijr=$.enum_(["header","sidebar"])});var ojr,kxo=h(()=>{"use strict";br();ojr=$.number()});var Xrt,sjr=h(()=>{"use strict";br();kxo();Xrt=$.undiscriminatedUnion([ojr,$.stringLiteral("no-limit")])});var ajr,Fxo=h(()=>{"use strict";br();sjr();ajr=$.object({defaultColumnHeight:$.property("default-column-height",Xrt.optional()),interactOnClickOnly:$.property("interact-on-click-only",$.boolean().optional())})});var Zrt,cjr=h(()=>{"use strict";br();Zrt=$.enum_(["header","sidebar"])});var ljr,Nxo=h(()=>{"use strict";br();MCo();qCo();WCo();txo();Bxo();Dxo();Rxo();Fxo();cjr();ljr=$.object({pageWidth:$.property("page-width",$.string().optional()),contentWidth:$.property("content-width",$.string().optional()),sidebarWidth:$.property("sidebar-width",$.string().optional()),headerHeight:$.property("header-height",$.string().optional()),searchbarPlacement:$.property("searchbar-placement",njr.optional()),tabMenu:$.property("tab-menu",ajr.optional()),tabsPlacement:$.property("tabs-placement",Zrt.optional()),switcherPlacement:$.property("switcher-placement",ijr.optional()),contentAlignment:$.property("content-alignment",SNr.optional()),headerPosition:$.property("header-position",rjr.optional()),disableHeader:$.property("disable-header",$.boolean().optional()),hideNavLinks:$.property("hide-nav-links",$.boolean().optional()),hideFeedback:$.property("hide-feedback",$.boolean().optional()),mobileToc:$.property("mobile-toc",$.boolean().optional()),changelogLayout:$.property("changelog-layout",bNr.optional()),apiReferenceLayout:$.property("api-reference-layout",cNr.optional()),apiReferenceExpandProperties:$.property("api-reference-expand-properties",$.boolean().optional()),showNavAvailabilityBadges:$.property("show-nav-availability-badges",$.boolean().optional()),hideWebhookMethodBadges:$.property("hide-webhook-method-badges",$.boolean().optional()),breadcrumbs:ANr.optional()})});var ujr,jxo=h(()=>{"use strict";br();ujr=$.enum_(["kind","header"])});var pjr,zxo=h(()=>{"use strict";br();pjr=$.enum_(["compact","hyphenated"])});var fjr,Qxo=h(()=>{"use strict";br();jxo();zxo();fjr=$.object({doxyfile:$.string().optional(),includeUndocumentedMacros:$.property("include-undocumented-macros",$.boolean().optional()),slugStyle:$.property("slug-style",pjr.optional()),organizeBy:$.property("organize-by",ujr.optional()),include:$.list($.string()).optional(),exclude:$.list($.string()).optional(),excludeSymbols:$.property("exclude-symbols",$.list($.string()).optional())})});var djr,Mxo=h(()=>{"use strict";br();djr=$.object({git:$.string(),subpath:$.string().optional(),ref:$.string().optional()})});var mjr,Lxo=h(()=>{"use strict";br();mjr=$.object({path:$.string()})});var hjr,_xo=h(()=>{"use strict";br();Mxo();Lxo();hjr=$.undiscriminatedUnion([djr,mjr])});var gjr,Uxo=h(()=>{"use strict";br();gjr=$.enum_(["python","cpp"])});var Ajr,Vxo=h(()=>{"use strict";br();Ajr=$.object({path:$.string()})});var yjr,Gxo=h(()=>{"use strict";br();Qxo();_xo();Uxo();Vxo();yjr=$.object({input:hjr,output:Ajr,lang:gjr,config:fjr.optional()})});var $rt,bjr=h(()=>{"use strict";br();$rt=$.string()});var Ejr,qxo=h(()=>{"use strict";br();Ejr=$.object({dark:$.string().optional(),light:$.string().optional(),height:$.number().optional(),href:$.string().optional(),rightText:$.property("right-text",$.string().optional())})});var Ijr,Wxo=h(()=>{"use strict";br();Ijr=$.enum_(["dark","light"])});var vjr,Hxo=h(()=>{"use strict";br();vjr=$.enum_(["summary","summary_large_image","app","player"])});var Cjr,Kxo=h(()=>{"use strict";br();Wxo();Hxo();Cjr=$.object({ogSiteName:$.property("og:site_name",$.string().optional()),ogTitle:$.property("og:title",$.string().optional()),ogDescription:$.property("og:description",$.string().optional()),ogUrl:$.property("og:url",$.string().optional()),ogImage:$.property("og:image",$.string().optional()),ogImageWidth:$.property("og:image:width",$.number().optional()),ogImageHeight:$.property("og:image:height",$.number().optional()),ogLocale:$.property("og:locale",$.string().optional()),ogLogo:$.property("og:logo",$.string().optional()),twitterTitle:$.property("twitter:title",$.string().optional()),twitterDescription:$.property("twitter:description",$.string().optional()),twitterHandle:$.property("twitter:handle",$.string().optional()),twitterImage:$.property("twitter:image",$.string().optional()),twitterSite:$.property("twitter:site",$.string().optional()),twitterUrl:$.property("twitter:url",$.string().optional()),twitterCard:$.property("twitter:card",vjr.optional()),ogDynamic:$.property("og:dynamic",$.boolean().optional()),ogDynamicBackgroundImage:$.property("og:dynamic:background-image",$.string().optional()),ogDynamicTextColor:$.property("og:dynamic:text-color",$.string().optional()),ogDynamicBackgroundColor:$.property("og:dynamic:background-color",$.string().optional()),ogDynamicLogoColor:$.property("og:dynamic:logo-color",Ijr.optional()),ogDynamicShowLogo:$.property("og:dynamic:show-logo",$.boolean().optional()),ogDynamicShowSection:$.property("og:dynamic:show-section",$.boolean().optional()),ogDynamicShowDescription:$.property("og:dynamic:show-description",$.boolean().optional()),ogDynamicShowUrl:$.property("og:dynamic:show-url",$.boolean().optional()),ogDynamicShowGradient:$.property("og:dynamic:show-gradient",$.boolean().optional()),canonicalHost:$.property("canonical-host",$.string().optional())})});var Vve,H3t=h(()=>{"use strict";br();oNr();Vve=$.object({viewers:Grt.optional()})});var Uee,xjr=h(()=>{"use strict";br();g3e();H3t();Uee=$.object({href:$.string().optional(),target:t5.optional(),url:$.string().optional(),text:$.string().optional(),icon:$.string().optional(),rightIcon:$.string().optional(),rounded:$.boolean().optional()}).extend(Vve)});var Sjr,Jxo=h(()=>{"use strict";br();xjr();H3t();Sjr=$.object({links:$.list(Uee),text:$.string().optional(),icon:$.string().optional(),rightIcon:$.string().optional(),rounded:$.boolean().optional()}).extend(Vve)});var wjr,Yxo=h(()=>{"use strict";br();g3e();H3t();wjr=$.object({url:$.string(),target:t5.optional()}).extend(Vve)});var Tjr,Xxo=h(()=>{"use strict";br();Yxo();Tjr=$.undiscriminatedUnion([$.string(),wjr])});var Ojr,Zxo=h(()=>{"use strict";br();Jxo();Xxo();xjr();Ojr=$.union("type",{filled:Uee,outlined:Uee,minimal:Uee,github:$.object({value:Tjr}),dropdown:Sjr,primary:Uee,secondary:Uee}).transform({transform:e=>e,untransform:e=>e})});var $z,Gve=h(()=>{"use strict";br();$z=$.string()});var Pjr,$xo=h(()=>{"use strict";br();d3();Gve();Pjr=$.object({tab:$z,layout:$.list($.lazy(()=>Vee)).optional()})});var ent,Bjr=h(()=>{"use strict";br();d3();aw();cw();ent=$.object({title:$.string(),subtitle:$.string().optional(),icon:$.string().optional(),layout:$.list($.lazy(()=>Vee)),slug:$.string().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),hidden:$.boolean().optional(),default:$.boolean().optional(),profile:$.string().optional()}).extend(Kf).extend(Hf)});var Djr,eSo=h(()=>{"use strict";br();_ve();Bjr();Djr=$.undiscriminatedUnion([ent,Zz])});var Rjr,tSo=h(()=>{"use strict";br();eSo();Rjr=$.object({group:$.string(),items:$.list(Djr)})});var kjr,rSo=h(()=>{"use strict";br();_ve();Bjr();tSo();kjr=$.undiscriminatedUnion([ent,Rjr,Zz])});var Fjr,nSo=h(()=>{"use strict";br();Gve();rSo();Fjr=$.object({tab:$z,variants:$.list(kjr)})});var Njr,iSo=h(()=>{"use strict";br();$xo();nSo();Njr=$.undiscriminatedUnion([Pjr,Fjr])});var jjr,oSo=h(()=>{"use strict";br();iSo();jjr=$.list(Njr)});var zjr,sSo=h(()=>{"use strict";br();d3();zjr=$.list($.lazy(()=>Vee))});var qve,K3t=h(()=>{"use strict";br();oSo();sSo();qve=$.undiscriminatedUnion([jjr,zjr])});var Qjr,aSo=h(()=>{"use strict";br();Qjr=$.enum_(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","claude-code","vscode"])});var Mjr,cSo=h(()=>{"use strict";br();Mjr=$.object({name:$.string(),description:$.string().optional(),url:$.string().optional()})});var Ljr,lSo=h(()=>{"use strict";br();Ljr=$.undiscriminatedUnion([$.string(),$.list($.string())])});var _jr,uSo=h(()=>{"use strict";br();cSo();lSo();_jr=$.object({title:$.string().optional(),description:$.string().optional(),learnMoreUrl:$.property("learn-more-url",$.string().optional()),repository:$.string().optional(),installCommand:$.property("install-command",Ljr.optional()),skills:$.list(Mjr).optional()})});var Ujr,pSo=h(()=>{"use strict";br();ixo();uSo();Ujr=$.object({copyPage:$.property("copy-page",$.boolean().optional()),viewAsMarkdown:$.property("view-as-markdown",$.boolean().optional()),askAi:$.property("ask-ai",$.boolean().optional()),chatgpt:$.boolean().optional(),claude:$.boolean().optional(),claudeCode:$.property("claude-code",$.boolean().optional()),cursor:$.boolean().optional(),mcp:$.boolean().optional(),vscode:$.boolean().optional(),custom:$.list(ONr).optional(),skills:_jr.optional()})});var Vjr,fSo=h(()=>{"use strict";br();aSo();pSo();Vjr=$.object({default:Qjr.optional(),options:Ujr.optional()})});var Gjr,dSo=h(()=>{"use strict";br();Gjr=$.enum_(["deprecated","legacy","ga","stable","beta","alpha","preview"])});var tnt,qjr=h(()=>{"use strict";br();L3t();_rt();dSo();aw();cw();tnt=$.object({displayName:$.property("display-name",$.string()),profile:$.string().optional(),path:$.string().optional(),ref:$.string().optional(),slug:$.string().optional(),availability:Gjr.optional(),audiences:zee.optional(),hidden:$.boolean().optional(),default:$.boolean().optional(),announcement:Lve.optional()}).extend(Kf).extend(Hf)});var rnt,Wjr=h(()=>{"use strict";br();_rt();qjr();aw();cw();rnt=$.object({displayName:$.property("display-name",$.string()),subtitle:$.string().optional(),icon:$.string().optional(),image:$.string().optional(),versions:$.list(tnt).optional(),audiences:zee.optional(),profile:$.string().optional()}).extend(Kf).extend(Hf)});var Hjr,mSo=h(()=>{"use strict";br();Wjr();g3e();Hjr=$.object({href:$.string(),target:t5.optional()}).extend(rnt)});var Kjr,hSo=h(()=>{"use strict";br();L3t();Wjr();Kjr=$.object({path:$.string(),slug:$.string().optional(),announcement:Lve.optional()}).extend(rnt)});var Jjr,gSo=h(()=>{"use strict";br();mSo();hSo();Jjr=$.undiscriminatedUnion([Kjr,Hjr])});var Yjr,ASo=h(()=>{"use strict";br();Yjr=$.undiscriminatedUnion([$.record($.string(),$.string()),$.string(),$.list($.string())])});var Xjr,ySo=h(()=>{"use strict";br();ASo();Xjr=$.object({vars:Yjr.optional()})});var Zjr,bSo=h(()=>{"use strict";br();Zjr=$.enum_(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"])});var $jr,ESo=h(()=>{"use strict";br();$jr=$.object({source:$.string(),destination:$.string(),permanent:$.boolean().optional()})});var ezr,ISo=h(()=>{"use strict";br();ESo();ezr=$.undiscriminatedUnion([$.list($jr),$.string(),$.list($.string())])});var tzr,vSo=h(()=>{"use strict";br();tzr=$.object({path:$.string(),destination:$.string()})});var nnt,rzr=h(()=>{"use strict";br();Gve();aw();cw();nnt=$.object({tab:$z,displayName:$.property("display-name",$.string()),subtitle:$.string().optional(),icon:$.string().optional(),slug:$.string().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),hidden:$.boolean().optional(),default:$.boolean().optional()}).extend(Kf).extend(Hf)});var nzr,CSo=h(()=>{"use strict";br();_ve();rzr();nzr=$.undiscriminatedUnion([nnt,Zz])});var izr,xSo=h(()=>{"use strict";br();CSo();izr=$.object({group:$.string(),tabs:$.list(nzr)})});var ozr,SSo=h(()=>{"use strict";br();_ve();xSo();rzr();ozr=$.undiscriminatedUnion([nnt,izr,Zz])});var Wve,J3t=h(()=>{"use strict";br();V3t();SSo();g3e();sjr();aw();cw();Wve=$.object({displayName:$.property("display-name",$.string()),icon:$.string().optional(),slug:$.string().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),hidden:$.boolean().optional(),href:$.string().optional(),target:t5.optional(),changelog:Zfe.optional(),blog:Zfe.optional(),profile:$.string().optional(),tabMenu:$.property("tab-menu",$.list(ozr).optional()),tabMenuColumnHeight:$.property("tab-menu-column-height",Xrt.optional())}).extend(Kf).extend(Hf)});var szr,wSo=h(()=>{"use strict";br();szr=$.enum_(["default","minimal"])});var azr,TSo=h(()=>{"use strict";br();azr=$.enum_(["default","minimal"])});var czr,OSo=h(()=>{"use strict";br();czr=$.enum_(["default","toolbar"])});var lzr,PSo=h(()=>{"use strict";br();lzr=$.enum_(["default","toggle","tabs"])});var uzr,BSo=h(()=>{"use strict";br();uzr=$.enum_(["default","minimal"])});var pzr,DSo=h(()=>{"use strict";br();pzr=$.object({enabled:$.boolean().optional(),order:$.list($.string()).optional(),hide:$.list($.string()).optional(),labels:$.record($.string(),$.string()).optional(),showProducts:$.property("show-products",$.boolean().optional())})});var fzr,RSo=h(()=>{"use strict";br();fzr=$.enum_(["left","center"])});var int,dzr=h(()=>{"use strict";br();int=$.enum_(["default","bubble"])});var mzr,kSo=h(()=>{"use strict";br();RSo();cjr();dzr();mzr=$.object({style:int.optional(),alignment:fzr.optional(),placement:Zrt.optional()})});var hzr,FSo=h(()=>{"use strict";br();kSo();dzr();hzr=$.undiscriminatedUnion([int,mzr])});var gzr,NSo=h(()=>{"use strict";br();GCo();XCo();wSo();TSo();OSo();PSo();BSo();DSo();FSo();gzr=$.object({sidebar:uzr.optional(),body:gNr.optional(),tabs:hzr.optional(),pageActions:$.property("page-actions",czr.optional()),footerNav:$.property("footer-nav",szr.optional()),languageSwitcher:$.property("language-switcher",azr.optional()),productSwitcher:$.property("product-switcher",lzr.optional()),siteSwitcher:$.property("site-switcher",pzr.optional()),codeBlocks:$.property("code-blocks",vNr.optional())})});var Azr,jSo=h(()=>{"use strict";br();q3t();Azr=$.object({lang:Uve,default:$.boolean().optional()})});var yzr,zSo=h(()=>{"use strict";br();q3t();jSo();yzr=$.undiscriminatedUnion([Uve,Azr])});var kel,Fel=h(()=>{"use strict";br();sCo();pCo();fCo();bCo();L3t();UCo();yNr();JCo();exo();rxo();cxo();mxo();bxo();vxo();Cxo();xxo();Pxo();Nxo();Gxo();bjr();qxo();Kxo();Zxo();K3t();fSo();A3e();gSo();ySo();bSo();ISo();vSo();iNr();J3t();Gve();NSo();zSo();qjr();kel=$.object({instances:$.list(RNr),profiles:$.record($.string(),Xjr).optional(),profile:$.string().optional(),title:$.string().optional(),libraries:$.record($rt,yjr).optional(),analytics:V2r.optional(),announcement:Lve.optional(),roles:$.list(h3e).optional(),tabs:$.record($z,Wve).optional(),versions:$.list(tnt).optional(),products:$.list(Jjr).optional(),changelog:qrt.optional(),landingPage:$.property("landing-page",r5.optional()),navigation:qve.optional(),navbarLinks:$.property("navbar-links",$.list(Ojr).optional()),footerLinks:$.property("footer-links",JNr.optional()),pageActions:$.property("page-actions",Vjr.optional()),globalTheme:$.property("global-theme",$.string().optional()),experimental:KNr.optional(),defaultLanguage:$.property("default-language",Zjr.optional()),languages:$.list($.string()).optional(),translations:$.list(yzr).optional(),aiChat:$.property("ai-chat",M3t.optional()),aiSearch:$.property("ai-search",M3t.optional()),aiExamples:$.property("ai-examples",j2r.optional()),agents:D2r.optional(),metadata:Cjr.optional(),redirects:ezr.optional(),remotePaths:$.property("remote-paths",$.list(tzr).optional()),check:INr.optional(),logo:Ejr.optional(),favicon:$.string().optional(),backgroundImage:$.property("background-image",mNr.optional()),colors:xNr.optional(),typography:qNr.optional(),layout:ljr.optional(),settings:MNr.optional(),theme:gzr.optional(),integrations:YNr.optional(),css:wNr.optional(),js:tjr.optional(),header:$.string().optional(),footer:$.string().optional()})});var bzr,QSo=h(()=>{"use strict";br();Qee();Urt();zNr();aw();cw();bzr=$.object({folder:$.string(),title:$.string().optional(),titleSource:$.property("title-source",Wrt.optional()),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),collapsed:Mee.optional(),collapsible:$.boolean().optional(),collapsedByDefault:$.property("collapsed-by-default",$.boolean().optional()),availability:J1.optional()}).extend(Kf).extend(Hf)});var Ezr,MSo=h(()=>{"use strict";br();bjr();aw();cw();Ezr=$.object({library:$rt,title:$.string().optional(),slug:$.string().optional()}).extend(Kf).extend(Hf)});var Vee,Nel=h(()=>{"use strict";br();d3();zCo();VCo();yNr();QSo();MSo();_ve();A3e();Vee=$.undiscriminatedUnion([r5,$.lazyObject(()=>Izr),sNr,Ezr,Zz,qrt,hNr,bzr])});var jel,zel=h(()=>{"use strict";br();K3t();A3e();J3t();Gve();jel=$.object({tabs:$.record($z,Wve).optional(),landingPage:$.property("landing-page",r5.optional()),navigation:qve})});var vzr,LSo=h(()=>{"use strict";br();aw();cw();vzr=$.object({displayName:$.property("display-name",$.string()),path:$.string(),slug:$.string().optional()}).extend(Kf).extend(Hf)});var Qel,Mel=h(()=>{"use strict";br();iCo();LSo();Qel=$.undiscriminatedUnion([vzr,P2r])});var Izr,Lel=h(()=>{"use strict";br();d3();Qee();Urt();aw();cw();Izr=$.object({section:$.string(),path:$.string().optional(),contents:$.list($.lazy(()=>Vee)),profile:$.string().optional(),collapsed:Mee.optional(),collapsible:$.boolean().optional(),collapsedByDefault:$.property("collapsed-by-default",$.boolean().optional()),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),availability:J1.optional()}).extend(Kf).extend(Hf)});var _el,Uel=h(()=>{"use strict";br();K3t();A3e();J3t();Gve();_el=$.object({tabs:$.record($z,Wve).optional(),landingPage:$.property("landing-page",r5.optional()),navigation:qve})});var _So=h(()=>{"use strict";iCo();sCo();pCo();cCo();lCo();uCo();aCo();fCo();bCo();L3t();zCo();QCo();MCo();Pel();LCo();Bel();Del();Rel();TCo();ECo();vCo();ICo();CCo();xCo();SCo();wCo();_rt();OCo();Qee();UCo();_Co();VCo();GCo();qCo();yNr();V3t();WCo();JCo();HCo();KCo();XCo();YCo();PCo();Urt();$Co();exo();ZCo();txo();rxo();nxo();ixo();Fel();cxo();mxo();bxo();axo();oxo();lxo();vxo();mSo();Ixo();Exo();NCo();jCo();QSo();yxo();gxo();hxo();Axo();LNr();_Nr();Cxo();wSo();dCo();sxo();Mxo();mCo();hCo();Bxo();uxo();pxo();xxo();gCo();hSo();Pxo();Oxo();wxo();Sxo();Txo();XNr();q3t();TSo();Nxo();Qxo();Gxo();_xo();Uxo();bjr();jxo();Vxo();MSo();zxo();_ve();qxo();Kxo();Jxo();Xxo();Yxo();Zxo();xjr();K3t();Nel();Wxo();aSo();pSo();fSo();OSo();A3e();oCo();Lxo();BCo();Vrt();ACo();gSo();Wjr();zel();Mel();PSo();ySo();ASo();bSo();ESo();ISo();LSo();vSo();oNr();iNr();Dxo();fxo();Lel();yCo();BSo();DSo();cSo();lSo();uSo();RCo();kCo();FCo();Rxo();oSo();iSo();$xo();nSo();J3t();Gve();SSo();xSo();CSo();Fxo();rzr();RSo();cjr();FSo();kSo();dzr();Bjr();tSo();eSo();rSo();g3e();NSo();zNr();zSo();jSo();Hxo();sSo();sjr();kxo();dSo();qjr();DCo();Uel();dxo();aw();cw();H3t()});var USo={};ne(USo,{AbsoluteProductPath:()=>P2r,AgentsConfig:()=>D2r,AiChatConfig:()=>M3t,AiChatDatasource:()=>k2r,AiChatLocation:()=>F2r,AiChatModel:()=>N2r,AiChatWebsiteDatasource:()=>R2r,AiExamplesConfig:()=>j2r,AnalyticsConfig:()=>V2r,AnnouncementConfig:()=>Lve,ApiReferenceConfiguration:()=>sNr,ApiReferenceEndpointConfiguration:()=>aNr,ApiReferenceLayout:()=>cNr,ApiReferenceLayoutItem:()=>_ee,ApiReferenceOperationConfiguration:()=>lNr,ApiReferencePackageConfiguration:()=>uNr,ApiReferencePackageConfigurationWithOptions:()=>fNr,ApiReferenceSectionConfiguration:()=>pNr,ApiSpecConfiguration:()=>X2r,ApiSpecErrorResponseApplyTo:()=>G2r,ApiSpecErrorResponseEnsure:()=>W2r,ApiSpecErrorResponseHttpMethod:()=>q2r,ApiSpecErrorResponseSchemaSource:()=>H2r,ApiSpecErrorResponses:()=>K2r,ApiSpecImportSettings:()=>J2r,ApiSpecType:()=>Y2r,Audience:()=>zee,AudienceId:()=>_3t,Availability:()=>J1,BackgroundImageConfiguration:()=>mNr,BackgroundImageThemedConfig:()=>dNr,BlogConfiguration:()=>hNr,BodyThemeConfig:()=>gNr,BreadcrumbsConfig:()=>ANr,ChangelogConfiguration:()=>qrt,ChangelogFolderRelativePath:()=>Zfe,ChangelogLayout:()=>bNr,CheckConfig:()=>INr,CheckRuleSeverity:()=>GH,CheckRulesConfig:()=>ENr,CodeBlockTheme:()=>G3t,CodeBlocksThemeConfig:()=>vNr,CollapsedStringValue:()=>Z2r,CollapsedValue:()=>Mee,ColorConfig:()=>ZI,ColorThemedConfig:()=>CNr,ColorsConfiguration:()=>xNr,ContentAlignment:()=>SNr,CssConfig:()=>wNr,CustomDomain:()=>TNr,CustomPageAction:()=>ONr,DocsConfiguration:()=>kel,DocsInstance:()=>RNr,DocsSettingsConfig:()=>MNr,DocsTypographyConfig:()=>qNr,EditThisPageConfig:()=>DNr,EditThisPageLaunch:()=>PNr,EmbeddingConfig:()=>kNr,ExperimentalConfig:()=>KNr,ExternalProduct:()=>Hjr,ExternalSitemap:()=>HNr,ExternalSitemapConfig:()=>WNr,FeatureFlag:()=>U3t,FeatureFlagConfiguration:()=>nNr,FolderConfiguration:()=>bzr,FontConfig:()=>Jrt,FontConfigPath:()=>VNr,FontConfigVariant:()=>UNr,FontDisplay:()=>GNr,FontStyle:()=>Hrt,FontWeight:()=>Krt,FooterLinksConfig:()=>JNr,FooterNavThemeConfig:()=>szr,FullStoryAnalyticsConfig:()=>z2r,GitLibraryInputSchema:()=>djr,GithubEditThisPageConfig:()=>BNr,GoogleAnalytics4Config:()=>Q2r,GtmConfig:()=>M2r,HeaderPosition:()=>rjr,HttpSnippetLanguage:()=>FNr,HttpSnippetsConfig:()=>NNr,IntegrationsConfig:()=>YNr,IntercomConfig:()=>L2r,InternalProduct:()=>Kjr,JsConfig:()=>tjr,JsConfigOptions:()=>W3t,JsFileConfig:()=>$Nr,JsFileConfigSettings:()=>ZNr,JsRemoteConfig:()=>ejr,JsScriptStrategy:()=>Yrt,Language:()=>Uve,LanguageSwitcherThemeConfig:()=>azr,LayoutConfig:()=>ljr,LibraryConfig:()=>fjr,LibraryConfiguration:()=>yjr,LibraryInputConfiguration:()=>hjr,LibraryLanguage:()=>gjr,LibraryName:()=>$rt,LibraryOrganizeBy:()=>ujr,LibraryOutputConfiguration:()=>Ajr,LibraryReferenceConfiguration:()=>Ezr,LibrarySlugStyle:()=>pjr,LinkConfiguration:()=>Zz,LogoConfiguration:()=>Ejr,MetadataConfig:()=>Cjr,NavbarDropdownConfig:()=>Sjr,NavbarGithubConfig:()=>Tjr,NavbarGithubConfigWithOptions:()=>wjr,NavbarLink:()=>Ojr,NavbarLinkConfig:()=>Uee,NavigationConfig:()=>qve,NavigationItem:()=>Vee,OgDynamicLogoColor:()=>Ijr,PageActionOption:()=>Qjr,PageActionOptions:()=>Ujr,PageActionsConfig:()=>Vjr,PageActionsThemeConfig:()=>czr,PageConfiguration:()=>r5,PageDescriptionSource:()=>B2r,PathLibraryInputSchema:()=>mjr,PlaygroundButtonSettings:()=>$2r,PlaygroundSettings:()=>Lee,PostHogConfig:()=>_2r,ProductConfig:()=>Jjr,ProductConfigBase:()=>rnt,ProductFileConfig:()=>jel,ProductPath:()=>Qel,ProductSwitcherThemeConfig:()=>lzr,ProfileConfig:()=>Xjr,ProfileVarsConfiguration:()=>Yjr,ProgrammingLanguage:()=>Zjr,RedirectConfig:()=>$jr,RedirectsConfiguration:()=>ezr,RelativeProductPath:()=>vzr,RemotePathConfig:()=>tzr,Role:()=>Grt,RoleId:()=>h3e,SearchSettingsConfig:()=>jNr,SearchbarPlacement:()=>njr,SectionConfiguration:()=>Izr,SegmentConfig:()=>U2r,SidebarThemeConfig:()=>uzr,SiteSwitcherThemeConfig:()=>pzr,SkillEntry:()=>Mjr,SkillsInstallCommand:()=>Ljr,SkillsPageActionConfig:()=>_jr,SnippetLanguageConfiguration:()=>f3,SnippetsConfiguration:()=>tNr,SortByAvailabilityValue:()=>rNr,SwitcherPlacement:()=>ijr,TabConfig:()=>Wve,TabId:()=>$z,TabMenuEntry:()=>ozr,TabMenuGroup:()=>izr,TabMenuGroupItem:()=>nzr,TabMenuLayoutConfig:()=>ajr,TabMenuTab:()=>nnt,TabVariant:()=>ent,TabVariantGroup:()=>Rjr,TabVariantGroupItem:()=>Djr,TabVariantItem:()=>kjr,TabbedNavigationConfig:()=>jjr,TabbedNavigationItem:()=>Njr,TabbedNavigationItemWithLayout:()=>Pjr,TabbedNavigationItemWithVariants:()=>Fjr,TabsAlignment:()=>fzr,TabsPlacement:()=>Zrt,TabsThemeConfig:()=>hzr,TabsThemeObjectConfig:()=>mzr,TabsThemeStyle:()=>int,Target:()=>t5,ThemeConfig:()=>gzr,TitleSource:()=>Wrt,TranslationConfig:()=>yzr,TranslationConfigObject:()=>Azr,TwitterCardSetting:()=>vjr,UntabbedNavigationConfig:()=>zjr,VariantsColumnHeight:()=>Xrt,VariantsColumnHeightCount:()=>ojr,VersionAvailability:()=>Gjr,VersionConfig:()=>tnt,VersionFileConfig:()=>_el,VersionedSnippetLanguageConfiguration:()=>eNr,WebSocketOneofDisplay:()=>QNr,WithFeatureFlags:()=>Hf,WithPermissions:()=>Kf,WithViewers:()=>Vve});var Vel=h(()=>{"use strict";_So()});var Gel=h(()=>{"use strict";Vel();_So()});var Xz={};ne(Xz,{AbsoluteProductPath:()=>P2r,AgentsConfig:()=>D2r,AiChatConfig:()=>M3t,AiChatDatasource:()=>k2r,AiChatLocation:()=>F2r,AiChatModel:()=>N2r,AiChatWebsiteDatasource:()=>R2r,AiExamplesConfig:()=>j2r,AnalyticsConfig:()=>V2r,AnnouncementConfig:()=>Lve,ApiReferenceConfiguration:()=>sNr,ApiReferenceEndpointConfiguration:()=>aNr,ApiReferenceLayout:()=>cNr,ApiReferenceLayoutItem:()=>_ee,ApiReferenceOperationConfiguration:()=>lNr,ApiReferencePackageConfiguration:()=>uNr,ApiReferencePackageConfigurationWithOptions:()=>fNr,ApiReferenceSectionConfiguration:()=>pNr,ApiSpecConfiguration:()=>X2r,ApiSpecErrorResponseApplyTo:()=>G2r,ApiSpecErrorResponseEnsure:()=>W2r,ApiSpecErrorResponseHttpMethod:()=>q2r,ApiSpecErrorResponseSchemaSource:()=>H2r,ApiSpecErrorResponses:()=>K2r,ApiSpecImportSettings:()=>J2r,ApiSpecType:()=>Y2r,Audience:()=>zee,AudienceId:()=>_3t,Availability:()=>J1,BackgroundImageConfiguration:()=>mNr,BackgroundImageThemedConfig:()=>dNr,BlogConfiguration:()=>hNr,BodyThemeConfig:()=>gNr,BreadcrumbsConfig:()=>ANr,ChangelogConfiguration:()=>qrt,ChangelogFolderRelativePath:()=>Zfe,ChangelogLayout:()=>bNr,CheckConfig:()=>INr,CheckRuleSeverity:()=>GH,CheckRulesConfig:()=>ENr,CodeBlockTheme:()=>G3t,CodeBlocksThemeConfig:()=>vNr,CollapsedStringValue:()=>Z2r,CollapsedValue:()=>Mee,ColorConfig:()=>ZI,ColorThemedConfig:()=>CNr,ColorsConfiguration:()=>xNr,ContentAlignment:()=>SNr,CssConfig:()=>wNr,CustomDomain:()=>TNr,CustomPageAction:()=>ONr,DocsConfiguration:()=>kel,DocsInstance:()=>RNr,DocsSettingsConfig:()=>MNr,DocsTypographyConfig:()=>qNr,EditThisPageConfig:()=>DNr,EditThisPageLaunch:()=>PNr,EmbeddingConfig:()=>kNr,ExperimentalConfig:()=>KNr,ExternalProduct:()=>Hjr,ExternalSitemap:()=>HNr,ExternalSitemapConfig:()=>WNr,FeatureFlag:()=>U3t,FeatureFlagConfiguration:()=>nNr,FolderConfiguration:()=>bzr,FontConfig:()=>Jrt,FontConfigPath:()=>VNr,FontConfigVariant:()=>UNr,FontDisplay:()=>GNr,FontStyle:()=>Hrt,FontWeight:()=>Krt,FooterLinksConfig:()=>JNr,FooterNavThemeConfig:()=>szr,FullStoryAnalyticsConfig:()=>z2r,GitLibraryInputSchema:()=>djr,GithubEditThisPageConfig:()=>BNr,GoogleAnalytics4Config:()=>Q2r,GtmConfig:()=>M2r,HeaderPosition:()=>rjr,HttpSnippetLanguage:()=>FNr,HttpSnippetsConfig:()=>NNr,IntegrationsConfig:()=>YNr,IntercomConfig:()=>L2r,InternalProduct:()=>Kjr,JsConfig:()=>tjr,JsConfigOptions:()=>W3t,JsFileConfig:()=>$Nr,JsFileConfigSettings:()=>ZNr,JsRemoteConfig:()=>ejr,JsScriptStrategy:()=>Yrt,Language:()=>Uve,LanguageSwitcherThemeConfig:()=>azr,LayoutConfig:()=>ljr,LibraryConfig:()=>fjr,LibraryConfiguration:()=>yjr,LibraryInputConfiguration:()=>hjr,LibraryLanguage:()=>gjr,LibraryName:()=>$rt,LibraryOrganizeBy:()=>ujr,LibraryOutputConfiguration:()=>Ajr,LibraryReferenceConfiguration:()=>Ezr,LibrarySlugStyle:()=>pjr,LinkConfiguration:()=>Zz,LogoConfiguration:()=>Ejr,MetadataConfig:()=>Cjr,NavbarDropdownConfig:()=>Sjr,NavbarGithubConfig:()=>Tjr,NavbarGithubConfigWithOptions:()=>wjr,NavbarLink:()=>Ojr,NavbarLinkConfig:()=>Uee,NavigationConfig:()=>qve,NavigationItem:()=>Vee,OgDynamicLogoColor:()=>Ijr,PageActionOption:()=>Qjr,PageActionOptions:()=>Ujr,PageActionsConfig:()=>Vjr,PageActionsThemeConfig:()=>czr,PageConfiguration:()=>r5,PageDescriptionSource:()=>B2r,PathLibraryInputSchema:()=>mjr,PlaygroundButtonSettings:()=>$2r,PlaygroundSettings:()=>Lee,PostHogConfig:()=>_2r,ProductConfig:()=>Jjr,ProductConfigBase:()=>rnt,ProductFileConfig:()=>jel,ProductPath:()=>Qel,ProductSwitcherThemeConfig:()=>lzr,ProfileConfig:()=>Xjr,ProfileVarsConfiguration:()=>Yjr,ProgrammingLanguage:()=>Zjr,RedirectConfig:()=>$jr,RedirectsConfiguration:()=>ezr,RelativeProductPath:()=>vzr,RemotePathConfig:()=>tzr,Role:()=>Grt,RoleId:()=>h3e,SearchSettingsConfig:()=>jNr,SearchbarPlacement:()=>njr,SectionConfiguration:()=>Izr,SegmentConfig:()=>U2r,SidebarThemeConfig:()=>uzr,SiteSwitcherThemeConfig:()=>pzr,SkillEntry:()=>Mjr,SkillsInstallCommand:()=>Ljr,SkillsPageActionConfig:()=>_jr,SnippetLanguageConfiguration:()=>f3,SnippetsConfiguration:()=>tNr,SortByAvailabilityValue:()=>rNr,SwitcherPlacement:()=>ijr,TabConfig:()=>Wve,TabId:()=>$z,TabMenuEntry:()=>ozr,TabMenuGroup:()=>izr,TabMenuGroupItem:()=>nzr,TabMenuLayoutConfig:()=>ajr,TabMenuTab:()=>nnt,TabVariant:()=>ent,TabVariantGroup:()=>Rjr,TabVariantGroupItem:()=>Djr,TabVariantItem:()=>kjr,TabbedNavigationConfig:()=>jjr,TabbedNavigationItem:()=>Njr,TabbedNavigationItemWithLayout:()=>Pjr,TabbedNavigationItemWithVariants:()=>Fjr,TabsAlignment:()=>fzr,TabsPlacement:()=>Zrt,TabsThemeConfig:()=>hzr,TabsThemeObjectConfig:()=>mzr,TabsThemeStyle:()=>int,Target:()=>t5,ThemeConfig:()=>gzr,TitleSource:()=>Wrt,TranslationConfig:()=>yzr,TranslationConfigObject:()=>Azr,TwitterCardSetting:()=>vjr,UntabbedNavigationConfig:()=>zjr,VariantsColumnHeight:()=>Xrt,VariantsColumnHeightCount:()=>ojr,VersionAvailability:()=>Gjr,VersionConfig:()=>tnt,VersionFileConfig:()=>_el,VersionedSnippetLanguageConfiguration:()=>eNr,WebSocketOneofDisplay:()=>QNr,WithFeatureFlags:()=>Hf,WithPermissions:()=>Kf,WithViewers:()=>Vve,docs:()=>USo});var d3=h(()=>{"use strict";Gel()});var qel=h(()=>{"use strict";zvo();Qvo();g$c();d3()});var VSo={};ne(VSo,{AiChatLocation:()=>HIo,AiChatModel:()=>KIo,ApiReferenceLayout:()=>JIo,ApiSpecErrorResponseApplyTo:()=>YIo,ApiSpecErrorResponseHttpMethod:()=>XIo,ApiSpecType:()=>ZIo,Availability:()=>$Io,BodyThemeConfig:()=>evo,ChangelogLayout:()=>tvo,CheckRuleSeverity:()=>rvo,CodeBlockTheme:()=>nvo,CollapsedStringValue:()=>ivo,ContentAlignment:()=>ovo,EditThisPageLaunch:()=>svo,FernDocsConfig:()=>jvo,FernDocsConfigError:()=>d3e,FernDocsConfigTimeoutError:()=>R3t,FontDisplay:()=>avo,FontStyle:()=>cvo,FooterNavThemeConfig:()=>lvo,HeaderPosition:()=>uvo,HttpSnippetLanguage:()=>pvo,JsScriptStrategy:()=>fvo,LanguageSwitcherThemeConfig:()=>dvo,LibraryLanguage:()=>mvo,LibraryOrganizeBy:()=>hvo,LibrarySlugStyle:()=>gvo,OgDynamicLogoColor:()=>Avo,PageActionOption:()=>yvo,PageActionsThemeConfig:()=>bvo,PageDescriptionSource:()=>Evo,ProductSwitcherThemeConfig:()=>Ivo,ProgrammingLanguage:()=>vvo,SearchbarPlacement:()=>Cvo,Serializer:()=>Xz,SidebarThemeConfig:()=>xvo,SortByAvailabilityValue:()=>Svo,SwitcherPlacement:()=>wvo,TabsAlignment:()=>Tvo,TabsPlacement:()=>Ovo,TabsThemeStyle:()=>Pvo,Target:()=>Bvo,TitleSource:()=>Dvo,TwitterCardSetting:()=>Rvo,VersionAvailability:()=>kvo,WebSocketOneofDisplay:()=>Fvo,docs:()=>x2r,logging:()=>_vo,serialization:()=>Xz});var Wel=h(()=>{"use strict";qel();zvo();d3()});function Hel(e){return"group"in e}function GSo(e){return"link"in e}function Kel(e){return e.flatMap((t,r)=>Hel(t)?t.items.flatMap((n,i)=>GSo(n)?[]:[{variant:n,path:["variants",`${r}`,"items",`${i}`]}]):GSo(t)?[]:[{variant:t,path:["variants",`${r}`]}])}function X8d(e){return"variants"in e&&Array.isArray(e.variants)}function Jel(e){return"group"in e}function qSo(e){return"link"in e}function Yel(e){return e.flatMap((t,r)=>Jel(t)?t.tabs.flatMap((n,i)=>qSo(n)?[]:[{member:n,path:["tab-menu",`${r}`,"tabs",`${i}`]}]):qSo(t)?[]:[{member:t,path:["tab-menu",`${r}`]}])}function Xel(e){let t=new Map;for(let[r,n]of Object.entries(e??{}))for(let{member:i,path:o}of Yel(n.tabMenu??[]))t.has(i.tab)||t.set(i.tab,{menuTabId:r,menuTab:n,member:i,path:o});return t}function Z8d(e,t){let r=e?.[t];if(r!=null)return[{title:r.displayName,slug:r.slug,skipSlug:r.skipSlug}];let n=Xel(e).get(t);if(n==null)return;let{menuTab:i,member:o}=n;return[{title:i.displayName,slug:i.slug,skipSlug:i.skipSlug},{title:o.displayName,slug:o.slug,skipSlug:o.skipSlug}]}function $8d(e){return Kel(e.variants).map(({variant:t,path:r})=>({owners:[t],layout:t.layout,path:r}))}var Zel=h(()=>{"use strict"});function eGd(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var $el,etl,tGd,ttl=h(()=>{"use strict";$el={logo:"global",favicon:"global",backgroundImage:"global",colors:"global",typography:"global",layout:"global",settings:"global",theme:"global",integrations:"global",css:"global",js:"global",header:"global",footer:"global",navbarLinks:"global",footerLinks:"global",aiSearch:"global",announcement:"global",metadata:"global"},etl=Object.keys($el);tGd=new Set(etl.map(eGd))});function ntl(e){if(e.trim()!==e||e.length===0)return`Origin "${e}" must not be empty or contain surrounding whitespace`;if(e==="*"||e.startsWith("*"))return`Origin "${e}" is not allowed: a bare wildcard would let any site embed your docs. Use a scoped wildcard such as https://*.example.com instead`;if(!rGd.test(e))return`Origin "${e}" is not a valid origin. Expected scheme://host[:port] with no path, query, or CSP keywords, e.g. https://app.example.com or https://*.example.com`}function nGd(e){let t=[];return e.forEach((r,n)=>{let i=ntl(r);i!=null&&t.push(`settings.embedding.allowed-origins[${n}]: ${i}`)}),t}var rtl,rGd,itl=h(()=>{"use strict";rtl="[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?",rGd=new RegExp(`^https?://(?:\\*\\.)?${rtl}(?:\\.${rtl})*(?::\\d{1,5})?$`)});function WSo(e,t){return e===t||e.startsWith(`${t}/`)}function HSo(e,t){return WSo(e,t)||WSo(t,e)}function sGd(e){let t=e.split(".").pop()??"";return/^[0-9.]+$/.test(e)||/^(0x[0-9a-f]*|[0-9]+)$/i.test(t)||e.includes(":")||e.startsWith("[")}function aGd(e,t){return e===t||e.endsWith(`.${t}`)}function atl(e){if(e.length>256)return[`path "${e.slice(0,32)}\u2026" must be at most 256 characters`];if(!iGd.test(e))return[`path "${e}" must start with "/", contain only letters, digits and "._~-" segments, and not end with "/"`];if(e.split("/").some(n=>n==="."||n===".."))return[`path "${e}" must not contain "." or ".." segments`];let t=e.toLowerCase(),r=otl.find(n=>HSo(t,n.toLowerCase()));return r!=null?[`path "${e}" overlaps the Fern-reserved path "${r}"`]:[]}function ctl(e,t=[]){let r;try{r=new URL(e)}catch{return[`destination "${e}" must be an absolute https:// URL`]}if(r.protocol!=="https:")return[`destination "${e}" must use https://`];if(r.username!==""||r.password!=="")return[`destination "${e}" must not contain credentials`];if(r.search!==""||r.hash!==""||e.includes("?")||e.includes("#"))return[`destination "${e}" must not contain a query string or fragment`];if(r.port!=="")return[`destination "${e}" must use the default https port`];let n=r.hostname.toLowerCase().replace(/\.$/,"");return sGd(n)?[`destination "${e}" must use a hostname, not an IP address`]:!n.includes(".")||n==="localhost"||oGd.some(o=>n.endsWith(o))?[`destination "${e}" must be a public hostname`]:stl.some(o=>aGd(n,o))?[`destination "${e}" must not be a Fern-hosted domain`]:t.map(o=>o.toLowerCase().replace(/:\d+$/,"").replace(/\.$/,"")).includes(n)?[`destination "${e}" must not be this docs site's own domain`]:[]}function cGd(e,t=[]){let r=[];return e.length>20&&r.push(`at most 20 remote paths are allowed (found ${e.length})`),e.forEach((n,i)=>{r.push(...atl(n.path)),r.push(...ctl(n.destination,t));for(let o of e.slice(0,i))HSo(n.path,o.path)&&r.push(`path "${n.path}" overlaps the remote path "${o.path}"`)}),r}var A40,y40,otl,stl,iGd,oGd,ltl=h(()=>{"use strict";A40=20,y40=256,otl=["/api/fern-docs","/_fern-files","/_fern-img","/_fern-mdx","/_astro","/_shared","/_mcp","/_print","/~login","/.well-known","/fern-nav","/mcp","/robots.txt","/sitemap.xml","/llms.txt","/llms-full.txt","/context7.json","/favicon.ico","/_redirects","/_redirects-fallback.json","/_remote-paths.json","/_headers","/_routes.json"],stl=["buildwithfern.com","ferndocs.com"],iGd=/^(\/[A-Za-z0-9._~-]+)+$/,oGd=[".local",".localhost",".internal",".arpa",".home",".lan",".corp"]});var si={};ne(si,{DEFAULT_BLOG_TITLE:()=>R8d,DEFAULT_CHANGELOG_TITLE:()=>D8d,DocsYmlSchemas:()=>WIo,FERN_SERVED_HOST_SUFFIXES:()=>stl,MAX_REMOTE_PATHS:()=>A40,MAX_REMOTE_PATH_LENGTH:()=>y40,RESERVED_REMOTE_PATH_PREFIXES:()=>otl,RawSchemas:()=>VSo,THEME_ELIGIBLE_FIELDS:()=>etl,THEME_ELIGIBLE_YAML_KEYS:()=>tGd,THEME_FIELD_POLICIES:()=>$el,flattenNestedTabVariants:()=>FJc,flattenRawTabLayouts:()=>$8d,flattenRawTabMenu:()=>Yel,flattenRawTabVariants:()=>Kel,flattenTabVariantLayouts:()=>kJc,getChangelogFolderFromNavigationItem:()=>k8d,getChangelogFolderFromTabConfig:()=>F8d,getEmbeddingOriginErrors:()=>nGd,getRawTabMenuMemberships:()=>Xel,getRawTabSlugOwners:()=>Z8d,isPathAtOrUnder:()=>WSo,isRawTabMenuGroup:()=>Jel,isRawTabMenuLink:()=>qSo,isRawTabVariantGroup:()=>Hel,isRawTabVariantLink:()=>GSo,isRawTabWithVariantLayouts:()=>X8d,pathsOverlap:()=>HSo,remotePathDestinationProblems:()=>ctl,remotePathPathProblems:()=>atl,remotePathProblems:()=>cGd,resolveVariantsSettings:()=>N8d,validateEmbeddingOrigin:()=>ntl});var utl=h(()=>{"use strict";DJc();RJc();NJc();Wel();Zel();ttl();itl();ltl()});var ptl=h(()=>{"use strict"});async function Gee({absolutePathToFernignore:e}){let t=(await(0,ftl.readFile)(e)).toString();return dtl(t)}function dtl(e){return[q1,...e.trim().split(uGd).map(t=>{let r=t.indexOf("#");return r!==-1?t.slice(0,r).trim():t.trim()}).filter(t=>t.length>0)]}var ftl,uGd,mtl=h(()=>{"use strict";ftl=require("fs/promises");Tkr();uGd=/\r?\n/});function gtl(e){return e.output?.location==="rubygems"&&e.github==null}var htl,Atl=h(()=>{"use strict";htl="Direct RubyGems publishing is not supported. Add a github block to this generator (for example, github: { repository: your-org/your-ruby-sdk }) so the gem is published by the GitHub Actions workflow generated in that repository."});function btl({generatorInvocation:e}){return e.language==="go"?pGd(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,crates: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,crates:r=>r.packageName,_other:()=>{}}),publish:()=>{},publishV2:()=>{},_other:()=>{}})}function pGd(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:()=>{}})}var ytl,Etl=h(()=>{"use strict";ytl={TYPESCRIPT:"typescript",JAVA:"java",PYTHON:"python",GO:"go",RUBY:"ruby",CSHARP:"csharp",SWIFT:"swift",PHP:"php",RUST:"rust",CLI:"cli"}});function Itl(e){return e==null||!("auto-merge"in e)||e["auto-merge"]!==!0?!1:e.mode==="pull-request"}var vtl=h(()=>{"use strict"});function Ctl(e){return typeof e!="string"&&"proto"in e}var xtl=h(()=>{"use strict"});function Stl({rootAutomation:e,groupAutomation:t,generatorAutomation:r}){return{generate:r?.generate??t?.generate??e?.generate??Czr.generate,upgrade:r?.upgrade??t?.upgrade??e?.upgrade??Czr.upgrade,preview:r?.preview??t?.preview??e?.preview??Czr.preview,verify:r?.verify??t?.verify??e?.verify??Czr.verify}}var Czr,wtl=h(()=>{"use strict";Czr={generate:!0,upgrade:!0,preview:!0,verify:!0}});var Ttl=h(()=>{"use strict"});var Otl=h(()=>{"use strict"});var Ptl,Btl=h(()=>{"use strict";Ptl={Openai:"openai",Anthropic:"anthropic",AwsBedrock:"aws-bedrock"}});var KSo=h(()=>{"use strict";Ttl();Otl();Btl()});var JSo={};ne(JSo,{ModelProvider:()=>Ptl});var Dtl=h(()=>{"use strict";KSo()});var Rtl=h(()=>{"use strict"});var YSo=h(()=>{"use strict";Rtl()});var ktl={};var Ftl=h(()=>{"use strict";YSo()});var Ntl=h(()=>{"use strict"});var jtl=h(()=>{"use strict"});var ztl=h(()=>{"use strict"});var Qtl=h(()=>{"use strict"});var Mtl=h(()=>{"use strict"});var Ltl=h(()=>{"use strict"});var _tl=h(()=>{"use strict"});var Utl=h(()=>{"use strict"});var Vtl=h(()=>{"use strict"});var Gtl=h(()=>{"use strict"});var qtl=h(()=>{"use strict"});var Wtl=h(()=>{"use strict"});var Htl=h(()=>{"use strict"});var Ktl,Jtl=h(()=>{"use strict";Ktl={ApiKey:"api-key",RefreshToken:"refresh-token"}});var Ytl=h(()=>{"use strict"});var Xtl=h(()=>{"use strict"});var Ztl=h(()=>{"use strict"});var $tl=h(()=>{"use strict"});var erl=h(()=>{"use strict"});var trl,rrl=h(()=>{"use strict";trl={ClientCredentials:"client-credentials",AuthorizationCode:"authorization-code",DeviceCode:"device-code"}});var nrl=h(()=>{"use strict"});var irl=h(()=>{"use strict"});var orl=h(()=>{"use strict"});var srl=h(()=>{"use strict"});var arl=h(()=>{"use strict"});var crl=h(()=>{"use strict"});var lrl=h(()=>{"use strict"});var url=h(()=>{"use strict"});var prl=h(()=>{"use strict"});var frl=h(()=>{"use strict"});var drl=h(()=>{"use strict"});var XSo=h(()=>{"use strict";Ntl();jtl();ztl();Qtl();Mtl();Ltl();_tl();Utl();Vtl();Gtl();qtl();Wtl();Htl();Jtl();Ytl();Xtl();Ztl();$tl();erl();rrl();nrl();irl();orl();srl();arl();crl();lrl();url();prl();frl();drl()});var ZSo={};ne(ZSo,{InferredAuthTypeSchema:()=>Ktl,OAuthFlowTypeSchema:()=>trl});var mrl=h(()=>{"use strict";XSo()});var hrl=h(()=>{"use strict"});var grl,Arl=h(()=>{"use strict";grl={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available"}});var yrl=h(()=>{"use strict"});var $So=h(()=>{"use strict";hrl();Arl();yrl()});var ewo={};ne(ewo,{AvailabilityStatusSchema:()=>grl});var brl=h(()=>{"use strict";$So()});var Erl=h(()=>{"use strict"});var Irl=h(()=>{"use strict"});var vrl=h(()=>{"use strict"});var Crl=h(()=>{"use strict"});var two=h(()=>{"use strict";Erl();Irl();vrl();Crl()});var xrl={};var Srl=h(()=>{"use strict";two()});var wrl=h(()=>{"use strict"});var Trl=h(()=>{"use strict"});var rwo=h(()=>{"use strict";wrl();Trl()});var Orl={};var Prl=h(()=>{"use strict";rwo()});var Brl=h(()=>{"use strict"});var Drl=h(()=>{"use strict"});var Rrl=h(()=>{"use strict"});var krl=h(()=>{"use strict"});var Frl=h(()=>{"use strict"});var nwo=h(()=>{"use strict";Brl();Drl();Rrl();krl();Frl()});var Nrl={};var jrl=h(()=>{"use strict";nwo()});var zrl=h(()=>{"use strict"});var iwo=h(()=>{"use strict";zrl()});var Qrl={};var Mrl=h(()=>{"use strict";iwo()});var Lrl=h(()=>{"use strict"});var _rl=h(()=>{"use strict"});var Url=h(()=>{"use strict"});var owo=h(()=>{"use strict";Lrl();_rl();Url()});var Vrl={};var Grl=h(()=>{"use strict";owo()});var qrl=h(()=>{"use strict"});var Wrl=h(()=>{"use strict"});var swo=h(()=>{"use strict";qrl();Wrl()});var Hrl={};var Krl=h(()=>{"use strict";swo()});var Jrl=h(()=>{"use strict"});var Yrl=h(()=>{"use strict"});var Xrl=h(()=>{"use strict"});var Zrl=h(()=>{"use strict"});var $rl=h(()=>{"use strict"});var awo=h(()=>{"use strict";Jrl();Yrl();Xrl();Zrl();$rl()});var enl={};var tnl=h(()=>{"use strict";awo()});var rnl=h(()=>{"use strict";mrl();XSo();brl();$So();Srl();two();Prl();rwo();jrl();nwo();Mrl();iwo();Grl();owo();Krl();swo();tnl();awo()});var cwo={};ne(cwo,{AvailabilityStatusSchema:()=>grl,InferredAuthTypeSchema:()=>Ktl,OAuthFlowTypeSchema:()=>trl,auth:()=>ZSo,availability:()=>ewo,commons:()=>xrl,encoding:()=>Orl,environments:()=>Nrl,file:()=>Qrl,service:()=>Vrl,types:()=>Hrl,validation:()=>enl});var nnl=h(()=>{"use strict";rnl()});var inl=h(()=>{"use strict"});var onl=h(()=>{"use strict"});var snl=h(()=>{"use strict"});var anl=h(()=>{"use strict"});var cnl=h(()=>{"use strict"});var lnl=h(()=>{"use strict"});var unl=h(()=>{"use strict"});var pnl=h(()=>{"use strict"});var fnl=h(()=>{"use strict"});var dnl=h(()=>{"use strict"});var mnl=h(()=>{"use strict"});var hnl=h(()=>{"use strict"});var gnl=h(()=>{"use strict"});var Anl,ynl=h(()=>{"use strict";Anl={Literals:"literals",Enums:"enums",EnumsCoerceableToLiterals:"enums-coerceable-to-literals"}});var bnl=h(()=>{"use strict"});var Enl,Inl=h(()=>{"use strict";Enl={Int32:"int32",Int64:"int64",Uint32:"uint32",Uint64:"uint64"}});var vnl,Cnl=h(()=>{"use strict";vnl={Minimal:"minimal",Comprehensive:"comprehensive"}});var xnl,Snl=h(()=>{"use strict";xnl={Form:"form",Json:"json"}});var wnl=h(()=>{"use strict"});var Tnl=h(()=>{"use strict"});var Onl=h(()=>{"use strict"});var Pnl=h(()=>{"use strict"});var Bnl=h(()=>{"use strict"});var Dnl=h(()=>{"use strict"});var Rnl,knl=h(()=>{"use strict";Rnl={Java:"java",Python:"python",Go:"go",Ruby:"ruby",Csharp:"csharp",Typescript:"typescript",Php:"php",Rust:"rust",Swift:"swift"}});var Fnl,Nnl=h(()=>{"use strict";Fnl={V1:"v1",V2:"v2"}});var jnl,znl=h(()=>{"use strict";jnl={EnvironmentPerServer:"environment-per-server",UrlsPerEnvironment:"urls-per-environment"}});var Qnl=h(()=>{"use strict"});var Mnl,Lnl=h(()=>{"use strict";Mnl={All:"all",Untyped:"untyped"}});var _nl=h(()=>{"use strict"});var Unl,Vnl=h(()=>{"use strict";Unl={Get:"get",Post:"post",Put:"put",Patch:"patch",Delete:"delete",Head:"head",Options:"options",Trace:"trace"}});var Gnl=h(()=>{"use strict"});var qnl=h(()=>{"use strict"});var Wnl=h(()=>{"use strict"});var Hnl=h(()=>{"use strict"});var Knl=h(()=>{"use strict"});var Jnl=h(()=>{"use strict"});var Ynl=h(()=>{"use strict"});var Xnl=h(()=>{"use strict"});var Znl=h(()=>{"use strict"});var $nl=h(()=>{"use strict"});var eil,til=h(()=>{"use strict";eil={UrlOrder:"url-order",SpecOrder:"spec-order"}});var ril=h(()=>{"use strict"});var nil=h(()=>{"use strict"});var iil=h(()=>{"use strict"});var oil=h(()=>{"use strict"});var sil=h(()=>{"use strict"});var ail=h(()=>{"use strict"});var cil=h(()=>{"use strict"});var lil,uil=h(()=>{"use strict";lil={Always:"always",Never:"never"}});var pil=h(()=>{"use strict"});var fil=h(()=>{"use strict"});var dil=h(()=>{"use strict"});var mil=h(()=>{"use strict"});var hil=h(()=>{"use strict"});var gil=h(()=>{"use strict"});var Ail,yil=h(()=>{"use strict";Ail={V1:"v1"}});var bil=h(()=>{"use strict"});var Eil=h(()=>{"use strict"});var lwo=h(()=>{"use strict";inl();onl();snl();anl();cnl();lnl();unl();pnl();fnl();dnl();mnl();hnl();gnl();ynl();bnl();Inl();Cnl();Snl();wnl();Tnl();Onl();Pnl();Bnl();Dnl();knl();Nnl();znl();Qnl();Lnl();_nl();Vnl();Gnl();qnl();Wnl();Hnl();Knl();Jnl();Ynl();Xnl();Znl();$nl();til();ril();nil();iil();oil();sil();ail();cil();uil();pil();fil();dil();mil();hil();gil();yil();bil();Eil()});var uwo={};ne(uwo,{CoerceConstsTo:()=>Anl,DefaultIntegerFormat:()=>Enl,ExampleStyle:()=>vnl,FormParameterEncoding:()=>xnl,Language:()=>Rnl,MessageNamingSettingsSchema:()=>Fnl,MultiServerStrategy:()=>jnl,OpenApiErrorResponsesApplyTo:()=>Mnl,OpenApiErrorResponsesHttpMethod:()=>Unl,PathParameterOrder:()=>eil,RemoveDiscriminantsFromSchemas:()=>lil,UnionSettingsSchema:()=>Ail});var Iil=h(()=>{"use strict";lwo()});var vil=h(()=>{"use strict"});var Cil=h(()=>{"use strict"});var xil=h(()=>{"use strict"});var Sil=h(()=>{"use strict"});var wil=h(()=>{"use strict"});var Til=h(()=>{"use strict"});var Oil=h(()=>{"use strict"});var Pil=h(()=>{"use strict"});var Bil=h(()=>{"use strict"});var Dil=h(()=>{"use strict"});var Ril=h(()=>{"use strict"});var kil,Fil=h(()=>{"use strict";kil={Commit:"commit",Release:"release"}});var Nil=h(()=>{"use strict"});var jil=h(()=>{"use strict"});var zil=h(()=>{"use strict"});var Qil=h(()=>{"use strict"});var Mil,Lil=h(()=>{"use strict";Mil={PullRequest:"pull-request",Push:"push",CommitAndRelease:"commit-and-release"}});var _il=h(()=>{"use strict"});var Uil=h(()=>{"use strict"});var Vil=h(()=>{"use strict"});var Gil=h(()=>{"use strict"});var qil=h(()=>{"use strict"});var Wil=h(()=>{"use strict"});var Hil=h(()=>{"use strict"});var Kil=h(()=>{"use strict"});var Jil=h(()=>{"use strict"});var Yil=h(()=>{"use strict"});var pwo=h(()=>{"use strict";vil();Cil();xil();Sil();wil();Til();Oil();Pil();Bil();Dil();Ril();Fil();Nil();jil();zil();Qil();Lil();_il();Uil();Vil();Gil();qil();Wil();Hil();Kil();Jil();Yil()});var fwo={};ne(fwo,{GithubCommitAndReleaseMode:()=>kil,GithubSelfhostedMode:()=>Mil});var Xil=h(()=>{"use strict";pwo()});var Zil=h(()=>{"use strict"});var $il=h(()=>{"use strict"});var eol,tol=h(()=>{"use strict";eol={Mit:"MIT",Apache:"Apache-2.0"}});var dwo=h(()=>{"use strict";Zil();$il();tol()});var mwo={};ne(mwo,{GithubLicenseType:()=>eol});var rol=h(()=>{"use strict";dwo()});var nol=h(()=>{"use strict"});var hwo=h(()=>{"use strict";nol()});var iol={};var ool=h(()=>{"use strict";hwo()});var sol=h(()=>{"use strict"});var aol=h(()=>{"use strict"});var gwo=h(()=>{"use strict";sol();aol()});var col={};var lol=h(()=>{"use strict";gwo()});var uol=h(()=>{"use strict";Dtl();KSo();Ftl();YSo();nnl();Iil();lwo();Xil();pwo();rol();dwo();ool();hwo();lol();gwo()});var pol=h(()=>{"use strict";uol()});var $fe,fol,Awo,ywo,D80,dol=h(()=>{"use strict";$fe={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},fol={[$fe.Debug]:1,[$fe.Info]:2,[$fe.Warn]:3,[$fe.Error]:4},Awo=class{debug(t,...r){console.debug(t,...r)}info(t,...r){console.info(t,...r)}warn(t,...r){console.warn(t,...r)}error(t,...r){console.error(t,...r)}},ywo=class{level;logger;silent;constructor(t){this.level=fol[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=fol[t]}isDebug(){return this.shouldLog($fe.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog($fe.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog($fe.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog($fe.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},D80=new ywo({level:$fe.Info,logger:new Awo,silent:!0})});var mol=h(()=>{"use strict"});var hol=h(()=>{"use strict";dol()});var gol=h(()=>{"use strict"});var $l,lw=h(()=>{"use strict";$l={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",NEVER:"never",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"}});function ym(e,t){return`Expected ${t}. Received ${dGd(e)}.`}function dGd(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}var XF=h(()=>{"use strict"});function Y1(e){return{...e,json:Aol(e.json),parse:Aol(e.parse)}}function Aol(e){return(t,r)=>{let n=e(t,r),{skipValidation:i=!1}=r??{};return!n.ok&&i?(console.warn(["Failed to validate.",...n.errors.map(o=>" - "+(o.path.length>0?`${o.path.join(".")}: ${o.message}`:o.message))].join(`
|
|
255
|
+
`)),{ok:!0,value:t}):n}}var Nee=h(()=>{"use strict"});function S2r(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var Uvo=h(()=>{"use strict"});var Qrt,Vvo=h(()=>{"use strict";Uvo();Qrt=class e extends Error{errors;constructor(t){super(t.map(S2r).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype),this.name="JsonError"}}});var Mrt,Gvo=h(()=>{"use strict";Uvo();Mrt=class e extends Error{errors;constructor(t){super(t.map(S2r).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype),this.name="ParseError"}}});function Am(e){return{nullable:()=>_8d(e),optional:()=>qvo(e),optionalNullable:()=>U8d(e),transform:t=>Wvo(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new Mrt(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new Qrt(n.errors)}}}function _8d(e){let t={parse:(r,n)=>r==null?{ok:!0,value:null}:e.parse(r,n),json:(r,n)=>r==null?{ok:!0,value:null}:e.json(r,n),getType:()=>hl.NULLABLE};return{...t,...Am(t)}}function qvo(e){let t={parse:(r,n)=>r==null?{ok:!0,value:void 0}:e.parse(r,n),json:(r,n)=>n?.omitUndefined&&r===void 0?{ok:!0,value:void 0}:r==null?{ok:!0,value:null}:e.json(r,n),getType:()=>hl.OPTIONAL};return{...t,...Am(t)}}function U8d(e){let t={parse:(r,n)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.parse(r,n),json:(r,n)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.json(r,n),getType:()=>hl.OPTIONAL_NULLABLE};return{...t,...Am(t)}}function Wvo(e,t){let r={parse:(n,i)=>{let o=e.parse(n,i);return o.ok?{ok:!0,value:t.transform(o.value)}:o},json:(n,i)=>{let o=t.untransform(n);return e.json(o,i)},getType:()=>e.getType()};return{...r,...Am(r)}}var I$c=h(()=>{"use strict";ow();Vvo();Gvo()});var Yz=h(()=>{"use strict";I$c();Vvo();Gvo()});function v$c(){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:gm(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:gm(t,"bigint")}]}:{ok:!0,value:t},getType:()=>hl.BIGINT};return{...sw(e),...Am(e)}}var C$c=h(()=>{"use strict";ow();YF();Nee();Yz()});var x$c=h(()=>{"use strict";C$c()});function S$c(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:gm(t,"string")}]}:V8d.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:gm(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:gm(t,"Date object")}]},getType:()=>hl.DATE};return{...sw(e),...Am(e)}}var V8d,w$c=h(()=>{"use strict";ow();YF();Nee();Yz();V8d=/^([+-]?\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)?)?)?)?$/});var T$c=h(()=>{"use strict";w$c()});function K1(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...sw(r),...Am(r)}}}var jee=h(()=>{"use strict";Yz();Nee()});function F3t(e){let t=new Set(e);return K1(hl.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:gm(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:gm(n,"enum")}]}:{ok:!0,value:n})()}function O$c(e){return F3t(e).transform({transform:t=>t,untransform:t=>t})}var P$c=h(()=>{"use strict";ow();jee();YF()});var Hvo=h(()=>{"use strict";P$c()});function B$c(e){let t=Kvo(e);return{...t,...Am(t)}}function Kvo(e){return{parse:(t,r)=>Lrt(e).parse(t,r),json:(t,r)=>Lrt(e).json(t,r),getType:()=>Lrt(e).getType()}}function Lrt(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var Jvo=h(()=>{"use strict";Yz()});function Yvo(e){return Object.entries(e)}var D$c=h(()=>{"use strict"});function N3t(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var Xvo=h(()=>{"use strict"});function Yfe(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var j3t=h(()=>{"use strict"});function z3t(e){return Object.keys(e)}var Zvo=h(()=>{"use strict"});function R$c(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var k$c=h(()=>{"use strict"});function VH(e){return{withParsedProperties:t=>$vo(e,t)}}function $vo(e,t){let r={parse:(n,i)=>{let o=e.parse(n,i);if(!o.ok)return o;let s={};for(let a in t)if(G8d.call(t,a)){let c=t[a];s[a]=typeof c=="function"?c(o.value):c}return{ok:!0,value:{...o.value,...s}}},json:(n,i)=>{if(!Yfe(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:gm(n,"object")}]};let o=new Set(Object.keys(t)),s=N3t(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Am(r),...VH(r)}}var G8d,F$c=h(()=>{"use strict";Xvo();YF();j3t();Yz();G8d=Object.prototype.hasOwnProperty});var Q3t=h(()=>{"use strict";F$c()});function N$c(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function Xfe(e){return e.isProperty}var eCo=h(()=>{"use strict"});function w2r(e){let t;function r(){if(t==null){t={};for(let[d,f]of Yvo(e)){let m=Xfe(f)?f.rawKey:d,g=Xfe(f)?f.valueSchema:f;t[m]={rawKey:m,parsedKey:d,valueSchema:g}}}return t}let n,i,o,s;function a(){if(n==null){n=[],i=[];for(let[d,f]of Yvo(e)){let m=Xfe(f)?f.rawKey:d,g=Xfe(f)?f.valueSchema:f;W8d(g)&&(n.push(m),i.push(d))}o=new Set(n),s=new Set(i)}return n}function c(){return i==null&&a(),i}function l(){return o==null&&a(),o}function u(){return s==null&&a(),s}let p={_getRawProperties:()=>Object.entries(e).map(([d,f])=>Xfe(f)?f.rawKey:d),_getParsedProperties:()=>z3t(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return j$c({value:d,requiredKeys:a(),requiredKeysSet:l(),getProperty:g=>{let A=r()[g];if(A!=null)return{transformedKey:A.parsedKey,transform:b=>{let I=[...m,g];return A.valueSchema.parse(b,{...f,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},json:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return j$c({value:d,requiredKeys:c(),requiredKeysSet:u(),getProperty:g=>{let A=e[g];if(A!=null)return Xfe(A)?{transformedKey:A.rawKey,transform:b=>{let I=[...m,g];return A.valueSchema.json(b,{...f,breadcrumbsPrefix:I})}}:{transformedKey:g,transform:b=>{let I=[...m,g];return A.json(b,{...f,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},getType:()=>hl.OBJECT};return{...sw(p),...Am(p),...VH(p),...m3e(p)}}function j$c({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!Yfe(e))return{ok:!1,errors:[{path:s,message:gm(e,"object")}]};let a=t.length,c=[],l={};for(let u in e){if(!q8d.call(e,u))continue;let p=e[u],d=n(u);if(d!=null){a>0&&r.has(u)&&a--;let f=d.transform(p);if(f.ok)l[d.transformedKey]=f.value;else{l[u]=p;for(let m of f.errors)c.push(m)}}else switch(i){case"fail":c.push({path:[...s,u],message:`Unexpected key "${u}"`});break;case"strip":break;case"passthrough":l[u]=p;break}}if(a>0)for(let u of t)u in e||c.push({path:s,message:`Missing required key "${u}"`});return c.length===0||o?{ok:!0,value:l}:{ok:!1,errors:c}}function m3e(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>z$c({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>z$c({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>hl.OBJECT};return{...r,...Am(r),...VH(r),...m3e(r)}},passthrough:()=>{let t=new Set(e._getRawProperties()),r=new Set(e._getParsedProperties()),n={_getParsedProperties:()=>e._getParsedProperties(),_getRawProperties:()=>e._getRawProperties(),parse:(i,o)=>{let s=e.parse(i,{...o,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let a={};if(typeof i=="object"&&i!=null)for(let[c,l]of Object.entries(i))t.has(c)||(a[c]=l);return{ok:!0,value:{...a,...s.value}}},json:(i,o)=>{let s=e.json(i,{...o,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let a={};if(typeof i=="object"&&i!=null)for(let[c,l]of Object.entries(i))r.has(c)||(a[c]=l);return{ok:!0,value:{...a,...s.value}}},getType:()=>hl.OBJECT};return{...n,...Am(n),...VH(n),...m3e(n)}}}}function z$c({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!Yfe(t))return{ok:!1,errors:[{path:i,message:gm(t,"object")}]};let o=new Set(e),[s,a]=R$c(z3t(t),u=>o.has(u)),c=r(N3t(t,a)),l=n(N3t(t,s));return c.ok&&l.ok?{ok:!0,value:{...c.value,...l.value}}:{ok:!1,errors:[...c.ok?[]:c.errors,...l.ok?[]:l.errors]}}function W8d(e){return!H8d(e)}function H8d(e){switch(e.getType()){case hl.ANY:case hl.UNKNOWN:case hl.OPTIONAL:case hl.OPTIONAL_NULLABLE:return!0;default:return!1}}var q8d,tCo=h(()=>{"use strict";ow();D$c();Xvo();YF();j3t();Zvo();Nee();k$c();Q3t();Yz();eCo();q8d=Object.prototype.hasOwnProperty});function Q$c(e){return w2r(e)}var M$c=h(()=>{"use strict";tCo()});var rCo=h(()=>{"use strict";tCo();M$c();eCo()});function L$c(e){let t={...Kvo(e),_getRawProperties:()=>Lrt(e)._getRawProperties(),_getParsedProperties:()=>Lrt(e)._getParsedProperties()};return{...t,...Am(t),...VH(t),...m3e(t)}}var _$c=h(()=>{"use strict";rCo();Q3t();Yz();Jvo()});var U$c=h(()=>{"use strict";Jvo();_$c()});function T2r(e){let t={parse:(r,n)=>V$c(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>V$c(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>hl.LIST};return{...sw(t),...Am(t)}}function V$c(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:gm(e,"list"),path:[]}]};let r=[],n=[];for(let i=0;i<e.length;i++){let o=t(e[i],i);if(o.ok)r.push(o.value);else for(let s of o.errors)n.push(s)}return n.length===0?{ok:!0,value:r}:{ok:!1,errors:n}}var G$c=h(()=>{"use strict";ow();YF();Nee();Yz()});var nCo=h(()=>{"use strict";G$c()});function q$c(e){return K1(hl.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:gm(r,`${e.toString()}`)}]})()}var W$c=h(()=>{"use strict";ow();jee();YF()});function H$c(e){return K1(hl.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:gm(r,`"${e}"`)}]})()}var K$c=h(()=>{"use strict";ow();jee();YF()});var J$c=h(()=>{"use strict";W$c();K$c()});var Y$c,X$c=h(()=>{"use strict";ow();jee();Y$c=K1(hl.ANY,e=>({ok:!0,value:e}))});var Z$c,$$c=h(()=>{"use strict";ow();jee();YF();Z$c=K1(hl.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:gm(e,"boolean")}]})});var eel,tel=h(()=>{"use strict";ow();jee();eel=K1(hl.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var rel,nel=h(()=>{"use strict";ow();jee();YF();rel=K1(hl.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:gm(e,"number")}]})});var iel,oel=h(()=>{"use strict";ow();jee();YF();iel=K1(hl.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:gm(e,"string")}]})});var sel,ael=h(()=>{"use strict";ow();jee();sel=K1(hl.UNKNOWN,e=>({ok:!0,value:e}))});var cel=h(()=>{"use strict";X$c();$$c();tel();nel();oel();ael()});function lel(e,t){let r={parse:(n,i)=>O2r({value:n,isKeyNumeric:e.getType()===hl.NUMBER,transformKey:o=>e.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>O2r({value:n,isKeyNumeric:e.getType()===hl.NUMBER,transformKey:o=>e.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>hl.RECORD};return{...sw(r),...Am(r)}}function uel(e,t){let r={parse:(n,i)=>O2r({value:n,isKeyNumeric:e.getType()===hl.NUMBER,transformKey:o=>e.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>O2r({value:n,isKeyNumeric:e.getType()===hl.NUMBER,transformKey:o=>e.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>hl.RECORD};return{...sw(r),...Am(r)}}function O2r({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!Yfe(e))return{ok:!1,errors:[{path:i,message:gm(e,"object")}]};let o={},s=[];for(let a in e){if(!K8d.call(e,a))continue;let c=e[a];if(c===void 0)continue;let l=a;if(t){let d=a.length>0?Number(a):NaN;Number.isNaN(d)||(l=d)}let u=r(l),p=n(c,l);if(u.ok&&p.ok)o[u.value]=p.value;else{if(!u.ok)for(let d of u.errors)s.push(d);if(!p.ok)for(let d of p.errors)s.push(d)}}return s.length===0?{ok:!0,value:o}:{ok:!1,errors:s}}var K8d,pel=h(()=>{"use strict";ow();YF();j3t();Nee();Yz();K8d=Object.prototype.hasOwnProperty});var fel=h(()=>{"use strict";pel()});function del(e){let t=T2r(e),r={parse:(n,i)=>{let o=t.parse(n,i);return o.ok?{ok:!0,value:new Set(o.value)}:o},json:(n,i)=>n instanceof Set?t.json([...n],i):{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:gm(n,"Set")}]},getType:()=>hl.SET};return{...sw(r),...Am(r)}}var mel=h(()=>{"use strict";ow();YF();Nee();nCo();Yz()});var hel=h(()=>{"use strict";mel()});function Ael(e){let t={parse:(r,n)=>gel((i,o)=>i.parse(r,o),e,n),json:(r,n)=>gel((i,o)=>i.json(r,o),e,n),getType:()=>hl.UNDISCRIMINATED_UNION};return{...sw(t),...Am(t)}}function gel(e,t,r){let n=[];for(let[i,o]of t.entries()){let s=e(o,{...r,skipValidation:!1});if(s.ok)return s;for(let a of s.errors)n.push({path:a.path,message:`[Variant ${i}] ${a.message}`})}return{ok:!1,errors:n}}var yel=h(()=>{"use strict";ow();Nee();Yz()});var bel=h(()=>{"use strict";yel()});function Eel(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var Iel=h(()=>{"use strict"});function Cel(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=F3t(z3t(t)),o={parse:(s,a)=>vel({value:s,discriminant:r,transformedDiscriminant:n,transformDiscriminantValue:c=>i.parse(c,{allowUnrecognizedEnumValues:a?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...a?.breadcrumbsPrefix??[],r]}),getAdditionalPropertiesSchema:c=>t[c],allowUnrecognizedUnionMembers:a?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(c,l)=>l.parse(c,a),breadcrumbsPrefix:a?.breadcrumbsPrefix}),json:(s,a)=>vel({value:s,discriminant:n,transformedDiscriminant:r,transformDiscriminantValue:c=>i.json(c,{allowUnrecognizedEnumValues:a?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...a?.breadcrumbsPrefix??[],n]}),getAdditionalPropertiesSchema:c=>t[c],allowUnrecognizedUnionMembers:a?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(c,l)=>l.json(c,a),breadcrumbsPrefix:a?.breadcrumbsPrefix}),getType:()=>hl.UNION};return{...sw(o),...Am(o),...VH(o)}}function vel({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!Yfe(e))return{ok:!1,errors:[{path:a,message:gm(e,"object")}]};let c=e[t],l={};for(let f in e)J8d.call(e,f)&&f!==t&&(l[f]=e[f]);if(c==null)return{ok:!1,errors:[{path:a,message:`Missing discriminant ("${t}")`}]};let u=n(c);if(!u.ok)return{ok:!1,errors:u.errors};let p=i(u.value);if(p==null)return o?{ok:!0,value:{[r]:u.value,...l}}:{ok:!1,errors:[{path:[...a,t],message:"Unexpected discriminant value"}]};let d=s(l,p);return d.ok?{ok:!0,value:{[r]:c,...d.value}}:d}var J8d,xel=h(()=>{"use strict";ow();YF();j3t();Zvo();Nee();Hvo();Q3t();Yz();J8d=Object.prototype.hasOwnProperty});var Sel=h(()=>{"use strict";Iel();xel()});var wel=h(()=>{"use strict";x$c();T$c();Hvo();U$c();nCo();J$c();rCo();Q3t();cel();fel();Yz();hel();bel();Sel()});var $={};ne($,{JsonError:()=>Qrt,ParseError:()=>Mrt,any:()=>Y$c,bigint:()=>v$c,boolean:()=>Z$c,booleanLiteral:()=>q$c,date:()=>S$c,discriminant:()=>Eel,enum_:()=>F3t,forwardCompatibleEnum_:()=>O$c,getObjectLikeUtils:()=>VH,getObjectUtils:()=>m3e,getSchemaUtils:()=>Am,isProperty:()=>Xfe,lazy:()=>B$c,lazyObject:()=>L$c,list:()=>T2r,never:()=>eel,number:()=>rel,object:()=>w2r,objectWithoutOptionalProperties:()=>Q$c,optional:()=>qvo,partialRecord:()=>uel,property:()=>N$c,record:()=>lel,set:()=>del,string:()=>iel,stringLiteral:()=>H$c,transform:()=>Wvo,undiscriminatedUnion:()=>Ael,union:()=>Cel,unknown:()=>sel,withParsedProperties:()=>$vo});var Tel=h(()=>{"use strict";wel()});var Oel=h(()=>{"use strict"});var br=h(()=>{"use strict";A$c();y$c();b$c();Tel();Oel()});var P2r,iCo=h(()=>{"use strict";br();P2r=$.object({href:$.string()})});var B2r,oCo=h(()=>{"use strict";br();B2r=$.enum_(["description","subtitle"])});var D2r,sCo=h(()=>{"use strict";br();oCo();D2r=$.object({pageDirective:$.property("page-directive",$.string().optional()),pageDescriptionSource:$.property("page-description-source",B2r.optional()),llmsTxt:$.property("llms-txt",$.string().optional()),llmsFullTxt:$.property("llms-full-txt",$.string().optional()),robotsTxt:$.property("robots-txt",$.string().optional())})});var R2r,aCo=h(()=>{"use strict";br();R2r=$.object({url:$.string(),title:$.string().optional()})});var k2r,cCo=h(()=>{"use strict";br();aCo();k2r=$.undiscriminatedUnion([R2r])});var F2r,lCo=h(()=>{"use strict";br();F2r=$.enum_(["docs","slack","discord"])});var N2r,uCo=h(()=>{"use strict";br();N2r=$.enum_(["claude-3.7","claude-4","command-a"])});var M3t,pCo=h(()=>{"use strict";br();cCo();lCo();uCo();M3t=$.object({model:N2r.optional(),systemPrompt:$.property("system-prompt",$.string().optional()),location:$.list(F2r).optional(),datasources:$.list(k2r).optional(),maskPii:$.property("mask-pii",$.boolean().optional()),disclaimer:$.string().optional(),buttonText:$.property("button-text",$.string().optional())})});var j2r,fCo=h(()=>{"use strict";br();j2r=$.object({enabled:$.boolean().optional(),style:$.string().optional()})});var z2r,dCo=h(()=>{"use strict";br();z2r=$.object({orgId:$.property("org-id",$.string())})});var Q2r,mCo=h(()=>{"use strict";br();Q2r=$.object({measurementId:$.property("measurement-id",$.string())})});var M2r,hCo=h(()=>{"use strict";br();M2r=$.object({containerId:$.property("container-id",$.string())})});var L2r,gCo=h(()=>{"use strict";br();L2r=$.object({appId:$.property("app-id",$.string()),apiBase:$.property("api-base",$.string().optional())})});var _2r,ACo=h(()=>{"use strict";br();_2r=$.object({apiKey:$.property("api-key",$.string()),endpoint:$.string().optional()})});var U2r,yCo=h(()=>{"use strict";br();U2r=$.object({writeKey:$.property("write-key",$.string())})});var V2r,bCo=h(()=>{"use strict";br();dCo();mCo();hCo();gCo();ACo();yCo();V2r=$.object({segment:U2r.optional(),fullstory:z2r.optional(),intercom:L2r.optional(),posthog:_2r.optional(),gtm:M2r.optional(),ga4:Q2r.optional()})});var Lve,L3t=h(()=>{"use strict";br();Lve=$.object({message:$.string()})});var G2r,ECo=h(()=>{"use strict";br();G2r=$.enum_(["all","untyped"])});var q2r,ICo=h(()=>{"use strict";br();q2r=$.enum_(["get","post","put","patch","delete","head","options","trace"])});var W2r,vCo=h(()=>{"use strict";br();ICo();W2r=$.object({statusCode:$.property("status-code",$.number()),methods:$.list(q2r).optional()})});var H2r,CCo=h(()=>{"use strict";br();H2r=$.undiscriminatedUnion([$.string(),$.record($.string(),$.unknown())])});var K2r,xCo=h(()=>{"use strict";br();ECo();vCo();CCo();K2r=$.object({schema:H2r,name:$.string().optional(),applyTo:$.property("apply-to",G2r.optional()),ensure:$.list(W2r).optional()})});var J2r,SCo=h(()=>{"use strict";br();xCo();J2r=$.object({typeDatesAsStrings:$.property("type-dates-as-strings",$.boolean().optional()),useBytesForBinaryResponse:$.property("use-bytes-for-binary-response",$.boolean().optional()),respectParameterContent:$.property("respect-parameter-content",$.boolean().optional()),respectOperationIdWordBoundaries:$.property("respect-operation-id-word-boundaries",$.boolean().optional()),inferForwardCompatible:$.property("infer-forward-compatible",$.boolean().optional()),preserveOneOfInAllOf:$.property("preserve-one-of-in-all-of",$.boolean().optional()),anyOfSiblingPropertiesAsObject:$.property("any-of-sibling-properties-as-object",$.boolean().optional()),errorResponses:$.property("error-responses",K2r.optional())})});var Y2r,wCo=h(()=>{"use strict";br();Y2r=$.enum_(["openapi","asyncapi","graphql"])});var X2r,TCo=h(()=>{"use strict";br();SCo();wCo();X2r=$.object({type:Y2r,path:$.string(),namespace:$.string().optional(),overlays:$.string().optional(),overrides:$.list($.string()).optional(),settings:J2r.optional()})});var _3t,OCo=h(()=>{"use strict";br();_3t=$.string()});var zee,_rt=h(()=>{"use strict";br();OCo();zee=$.undiscriminatedUnion([_3t,$.list(_3t)])});var J1,Qee=h(()=>{"use strict";br();J1=$.enum_(["stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var Z2r,PCo=h(()=>{"use strict";br();Z2r=$.enum_(["open-by-default"])});var Mee,Urt=h(()=>{"use strict";br();PCo();Mee=$.undiscriminatedUnion([$.boolean(),Z2r])});var $2r,BCo=h(()=>{"use strict";br();$2r=$.object({href:$.string().optional()})});var Lee,Vrt=h(()=>{"use strict";br();BCo();Lee=$.object({hidden:$.boolean().optional(),environments:$.list($.string()).optional(),button:$2r.optional(),oauth:$.boolean().optional(),limitWebsocketMessagesPerConnection:$.property("limit-websocket-messages-per-connection",$.number().optional()),sendOptionalDefaults:$.property("send-optional-defaults",$.boolean().optional())})});var eNr,DCo=h(()=>{"use strict";br();eNr=$.object({version:$.string(),package:$.string()})});var f3,RCo=h(()=>{"use strict";br();DCo();f3=$.undiscriminatedUnion([$.string(),eNr])});var tNr,kCo=h(()=>{"use strict";br();RCo();tNr=$.object({python:f3.optional(),typescript:f3.optional(),go:f3.optional(),java:f3.optional(),ruby:f3.optional(),csharp:f3.optional(),php:f3.optional(),swift:f3.optional(),rust:f3.optional(),cli:f3.optional()})});var rNr,FCo=h(()=>{"use strict";br();rNr=$.enum_(["unset","stable","generally-available","in-development","pre-release","deprecated","beta","alpha","preview","legacy"])});var U3t,NCo=h(()=>{"use strict";br();U3t=$.object({flag:$.string(),fallbackValue:$.property("fallback-value",$.unknown().optional()),match:$.unknown().optional()})});var nNr,jCo=h(()=>{"use strict";br();NCo();nNr=$.undiscriminatedUnion([$.string(),U3t,$.list(U3t)])});var Hf,aw=h(()=>{"use strict";br();jCo();Hf=$.object({featureFlag:$.property("feature-flag",nNr.optional())})});var h3e,iNr=h(()=>{"use strict";br();h3e=$.string()});var Grt,oNr=h(()=>{"use strict";br();iNr();Grt=$.undiscriminatedUnion([h3e,$.list(h3e)])});var Kf,cw=h(()=>{"use strict";br();oNr();Kf=$.object({viewers:Grt.optional(),orphaned:$.boolean().optional()})});var sNr,zCo=h(()=>{"use strict";br();d3();TCo();_rt();Qee();Urt();Vrt();kCo();FCo();aw();cw();sNr=$.object({api:$.string(),apiName:$.property("api-name",$.string().optional()),specs:$.list(X2r).optional(),openrpc:$.string().optional(),audiences:zee.optional(),displayErrors:$.property("display-errors",$.boolean().optional()),tagDescriptionPages:$.property("tag-description-pages",$.boolean().optional()),snippets:tNr.optional(),postman:$.string().optional(),summary:$.string().optional(),layout:$.list($.lazy(()=>_ee)).optional(),collapsed:Mee.optional(),icon:$.string().optional(),slug:$.string().optional(),hidden:$.boolean().optional(),availability:J1.optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),alphabetized:$.boolean().optional(),sortByAvailability:$.property("sort-by-availability",$.list(rNr).optional()),flattened:$.boolean().optional(),paginated:$.boolean().optional(),types:$.boolean().optional(),playground:Lee.optional()}).extend(Kf).extend(Hf)});var aNr,QCo=h(()=>{"use strict";br();Qee();Vrt();aw();cw();aNr=$.object({endpoint:$.string(),title:$.string().optional(),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional(),availability:J1.optional(),playground:Lee.optional()}).extend(Kf).extend(Hf)});var cNr,MCo=h(()=>{"use strict";br();cNr=$.enum_(["indented","cards"])});var lNr,LCo=h(()=>{"use strict";br();Qee();aw();cw();lNr=$.object({operation:$.string(),title:$.string().optional(),slug:$.string().optional(),hidden:$.boolean().optional(),availability:J1.optional()}).extend(Kf).extend(Hf)});var t5,g3e=h(()=>{"use strict";br();t5=$.enum_(["_blank","_self","_parent","_top"])});var Zz,_ve=h(()=>{"use strict";br();g3e();Zz=$.object({link:$.string(),href:$.string(),icon:$.string().optional(),target:t5.optional()})});var r5,A3e=h(()=>{"use strict";br();Qee();aw();cw();r5=$.object({page:$.string(),path:$.string(),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional(),noindex:$.boolean().optional(),availability:J1.optional(),profile:$.string().optional()}).extend(Kf).extend(Hf)});var _ee,Pel=h(()=>{"use strict";br();d3();QCo();LCo();_ve();A3e();_ee=$.undiscriminatedUnion([$.string(),$.record($.string(),$.lazy(()=>uNr)),$.lazyObject(()=>pNr),aNr,lNr,r5,Zz])});var uNr,Bel=h(()=>{"use strict";br();d3();uNr=$.undiscriminatedUnion([$.list($.lazy(()=>_ee)),$.lazyObject(()=>fNr)])});var fNr,Del=h(()=>{"use strict";br();d3();Qee();Vrt();aw();cw();fNr=$.object({title:$.string().optional(),summary:$.string().optional(),contents:$.list($.lazy(()=>_ee)).optional(),availability:J1.optional(),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),playground:Lee.optional()}).extend(Kf).extend(Hf)});var pNr,Rel=h(()=>{"use strict";br();d3();Qee();Urt();Vrt();aw();cw();pNr=$.object({section:$.string(),referencedPackages:$.property("referenced-packages",$.list($.string()).optional()),summary:$.string().optional(),contents:$.list($.lazy(()=>_ee)).optional(),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),collapsed:Mee.optional(),collapsible:$.boolean().optional(),collapsedByDefault:$.property("collapsed-by-default",$.boolean().optional()),availability:J1.optional(),playground:Lee.optional()}).extend(Kf).extend(Hf)});var dNr,_Co=h(()=>{"use strict";br();dNr=$.object({dark:$.string().optional(),light:$.string().optional()})});var mNr,UCo=h(()=>{"use strict";br();_Co();mNr=$.undiscriminatedUnion([$.string(),dNr])});var Zfe,V3t=h(()=>{"use strict";br();Zfe=$.string()});var hNr,VCo=h(()=>{"use strict";br();V3t();aw();cw();hNr=$.object({blog:Zfe,title:$.string().optional(),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional()}).extend(Kf).extend(Hf)});var gNr,GCo=h(()=>{"use strict";br();gNr=$.enum_(["default","canvas"])});var ANr,qCo=h(()=>{"use strict";br();ANr=$.object({currentPage:$.property("current-page",$.boolean().optional()),sticky:$.boolean().optional()})});var qrt,yNr=h(()=>{"use strict";br();V3t();aw();cw();qrt=$.object({changelog:Zfe,title:$.string().optional(),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional()}).extend(Kf).extend(Hf)});var bNr,WCo=h(()=>{"use strict";br();bNr=$.enum_(["timeline","classic"])});var GH,HCo=h(()=>{"use strict";br();GH=$.enum_(["warn","error"])});var ENr,KCo=h(()=>{"use strict";br();HCo();ENr=$.object({exampleValidation:$.property("example-validation",GH.optional()),brokenLinks:$.property("broken-links",GH.optional()),noNonComponentRefs:$.property("no-non-component-refs",GH.optional()),validLocalReferences:$.property("valid-local-references",GH.optional()),noCircularRedirects:$.property("no-circular-redirects",GH.optional()),validDocsEndpoints:$.property("valid-docs-endpoints",GH.optional()),missingRedirects:$.property("missing-redirects",GH.optional()),validChangelogSlug:$.property("valid-changelog-slug",GH.optional())})});var INr,JCo=h(()=>{"use strict";br();KCo();INr=$.object({rules:ENr.optional()})});var G3t,YCo=h(()=>{"use strict";br();G3t=$.enum_(["github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","github-light","github-light-default","github-light-high-contrast","material-theme-darker","min-dark","min-light"])});var vNr,XCo=h(()=>{"use strict";br();YCo();vNr=$.object({light:G3t.optional(),dark:G3t.optional()})});var CNr,ZCo=h(()=>{"use strict";br();CNr=$.object({dark:$.string().optional(),light:$.string().optional()})});var ZI,$Co=h(()=>{"use strict";br();ZCo();ZI=$.undiscriminatedUnion([$.string(),CNr])});var xNr,exo=h(()=>{"use strict";br();$Co();xNr=$.object({accentPrimary:$.property("accent-primary",ZI.optional()),accentPrimaryDeprecated:$.property("accentPrimary",ZI.optional()),background:ZI.optional(),border:ZI.optional(),sidebarBackground:$.property("sidebar-background",ZI.optional()),headerBackground:$.property("header-background",ZI.optional()),cardBackground:$.property("card-background",ZI.optional()),accent1:$.property("accent-1",ZI.optional()),accent2:$.property("accent-2",ZI.optional()),accent3:$.property("accent-3",ZI.optional()),accent4:$.property("accent-4",ZI.optional()),accent5:$.property("accent-5",ZI.optional()),accent6:$.property("accent-6",ZI.optional()),accent7:$.property("accent-7",ZI.optional()),accent8:$.property("accent-8",ZI.optional()),accent9:$.property("accent-9",ZI.optional()),accent10:$.property("accent-10",ZI.optional()),accent11:$.property("accent-11",ZI.optional()),accent12:$.property("accent-12",ZI.optional())})});var SNr,txo=h(()=>{"use strict";br();SNr=$.enum_(["center","left"])});var wNr,rxo=h(()=>{"use strict";br();wNr=$.undiscriminatedUnion([$.string(),$.list($.string())])});var TNr,nxo=h(()=>{"use strict";br();TNr=$.undiscriminatedUnion([$.string(),$.list($.string())])});var ONr,ixo=h(()=>{"use strict";br();ONr=$.object({title:$.string(),subtitle:$.string().optional(),url:$.string(),icon:$.string().optional(),default:$.boolean().optional()})});var PNr,oxo=h(()=>{"use strict";br();PNr=$.enum_(["github","dashboard"])});var BNr,sxo=h(()=>{"use strict";br();BNr=$.object({host:$.string().optional(),owner:$.string(),repo:$.string(),branch:$.string().optional()})});var DNr,axo=h(()=>{"use strict";br();oxo();sxo();DNr=$.object({github:BNr.optional(),launch:PNr.optional()})});var RNr,cxo=h(()=>{"use strict";br();_rt();nxo();axo();RNr=$.object({url:$.string(),customDomain:$.property("custom-domain",TNr.optional()),editThisPage:$.property("edit-this-page",DNr.optional()),audiences:zee.optional(),multiSource:$.property("multi-source",$.boolean().optional())})});var kNr,lxo=h(()=>{"use strict";br();kNr=$.object({allowedOrigins:$.property("allowed-origins",$.list($.string()))})});var FNr,uxo=h(()=>{"use strict";br();FNr=$.enum_(["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"])});var NNr,pxo=h(()=>{"use strict";br();uxo();NNr=$.undiscriminatedUnion([$.boolean(),$.list(FNr)])});var Uve,q3t=h(()=>{"use strict";br();Uve=$.string()});var jNr,fxo=h(()=>{"use strict";br();jNr=$.object({prioritizeCurrentProduct:$.property("prioritize-current-product",$.boolean().optional()),defaultFilterByCurrentProduct:$.property("default-filter-by-current-product",$.boolean().optional()),popularSearches:$.property("popular-searches",$.boolean().optional())})});var Wrt,zNr=h(()=>{"use strict";br();Wrt=$.enum_(["frontmatter","filename"])});var QNr,dxo=h(()=>{"use strict";br();QNr=$.enum_(["flat","grouped"])});var MNr,mxo=h(()=>{"use strict";br();lxo();pxo();q3t();fxo();zNr();dxo();MNr=$.object({searchText:$.property("search-text",$.string().optional()),disableSearch:$.property("disable-search",$.boolean().optional()),darkModeCode:$.property("dark-mode-code",$.boolean().optional()),defaultSearchFilters:$.property("default-search-filters",$.boolean().optional()),search:jNr.optional(),httpSnippets:$.property("http-snippets",NNr.optional()),hide404Page:$.property("hide-404-page",$.boolean().optional()),useJavascriptAsTypescript:$.property("use-javascript-as-typescript",$.boolean().optional()),disableExplorerProxy:$.property("disable-explorer-proxy",$.boolean().optional()),disableEnvironmentEditing:$.property("disable-environment-editing",$.boolean().optional()),disableAnalytics:$.property("disable-analytics",$.boolean().optional()),language:Uve.optional(),folderTitleSource:$.property("folder-title-source",Wrt.optional()),substituteEnvVars:$.property("substitute-env-vars",$.boolean().optional()),websocketOneofDisplay:$.property("websocket-oneof-display",QNr.optional()),embedding:kNr.optional(),showHeadersInExamples:$.property("show-headers-in-examples",$.boolean().optional()),requireAnalyticsConsent:$.property("require-analytics-consent",$.boolean().optional())})});var Hrt,LNr=h(()=>{"use strict";br();Hrt=$.enum_(["normal","italic"])});var Krt,_Nr=h(()=>{"use strict";br();Krt=$.undiscriminatedUnion([$.string(),$.number()])});var UNr,hxo=h(()=>{"use strict";br();LNr();_Nr();UNr=$.object({path:$.string(),weight:Krt.optional(),style:Hrt.optional()})});var VNr,gxo=h(()=>{"use strict";br();hxo();VNr=$.undiscriminatedUnion([$.string(),UNr])});var GNr,Axo=h(()=>{"use strict";br();GNr=$.enum_(["auto","block","swap","fallback","optional"])});var Jrt,yxo=h(()=>{"use strict";br();gxo();Axo();LNr();_Nr();Jrt=$.object({name:$.string().optional(),path:$.string().optional(),weight:Krt.optional(),style:Hrt.optional(),paths:$.list(VNr).optional(),display:GNr.optional(),fallback:$.list($.string()).optional(),fontVariationSettings:$.property("font-variation-settings",$.string().optional())})});var qNr,bxo=h(()=>{"use strict";br();yxo();qNr=$.object({headingsFont:Jrt.optional(),bodyFont:Jrt.optional(),codeFont:Jrt.optional()})});var WNr,Exo=h(()=>{"use strict";br();WNr=$.object({url:$.string(),locale:$.string().optional()})});var HNr,Ixo=h(()=>{"use strict";br();Exo();HNr=$.undiscriminatedUnion([$.string(),WNr])});var KNr,vxo=h(()=>{"use strict";br();Ixo();KNr=$.object({mdxComponents:$.property("mdx-components",$.list($.string()).optional()),disableStreamToggle:$.property("disable-stream-toggle",$.boolean().optional()),openapiParserV2:$.property("openapi-parser-v2",$.boolean().optional()),openapiParserV3:$.property("openapi-parser-v3",$.boolean().optional()),dynamicSnippets:$.property("dynamic-snippets",$.boolean().optional()),aiExamples:$.property("ai-examples",$.boolean().optional()),aiExampleStyleInstructions:$.property("ai-example-style-instructions",$.string().optional()),excludeApis:$.property("exclude-apis",$.boolean().optional()),basepathAware:$.property("basepath-aware",$.boolean().optional()),robotsTxtOnInstanceUrl:$.property("robots-txt-on-instance-url",$.boolean().optional()),externalSitemaps:$.property("external-sitemaps",$.list(HNr).optional())})});var JNr,Cxo=h(()=>{"use strict";br();JNr=$.object({github:$.string().optional(),twitter:$.string().optional(),x:$.string().optional(),linkedin:$.string().optional(),youtube:$.string().optional(),instagram:$.string().optional(),facebook:$.string().optional(),discord:$.string().optional(),slack:$.string().optional(),hackernews:$.string().optional(),medium:$.string().optional(),website:$.string().optional()})});var YNr,xxo=h(()=>{"use strict";br();YNr=$.object({intercom:$.string().optional(),context7:$.string().optional()})});var Yrt,XNr=h(()=>{"use strict";br();Yrt=$.enum_(["beforeInteractive","afterInteractive","lazyOnload"])});var ZNr,Sxo=h(()=>{"use strict";br();XNr();ZNr=$.object({path:$.string(),strategy:Yrt.optional()})});var $Nr,wxo=h(()=>{"use strict";br();Sxo();$Nr=$.undiscriminatedUnion([$.string(),ZNr])});var ejr,Txo=h(()=>{"use strict";br();XNr();ejr=$.object({url:$.string(),strategy:Yrt.optional(),disableSri:$.property("disable-sri",$.boolean().optional())})});var W3t,Oxo=h(()=>{"use strict";br();wxo();Txo();W3t=$.undiscriminatedUnion([ejr,$Nr])});var tjr,Pxo=h(()=>{"use strict";br();Oxo();tjr=$.undiscriminatedUnion([W3t,$.list(W3t)])});var rjr,Bxo=h(()=>{"use strict";br();rjr=$.enum_(["fixed","static"])});var njr,Dxo=h(()=>{"use strict";br();njr=$.enum_(["header","header-tabs","sidebar"])});var ijr,Rxo=h(()=>{"use strict";br();ijr=$.enum_(["header","sidebar"])});var ojr,kxo=h(()=>{"use strict";br();ojr=$.number()});var Xrt,sjr=h(()=>{"use strict";br();kxo();Xrt=$.undiscriminatedUnion([ojr,$.stringLiteral("no-limit")])});var ajr,Fxo=h(()=>{"use strict";br();sjr();ajr=$.object({defaultColumnHeight:$.property("default-column-height",Xrt.optional()),interactOnClickOnly:$.property("interact-on-click-only",$.boolean().optional())})});var Zrt,cjr=h(()=>{"use strict";br();Zrt=$.enum_(["header","sidebar"])});var ljr,Nxo=h(()=>{"use strict";br();MCo();qCo();WCo();txo();Bxo();Dxo();Rxo();Fxo();cjr();ljr=$.object({pageWidth:$.property("page-width",$.string().optional()),contentWidth:$.property("content-width",$.string().optional()),sidebarWidth:$.property("sidebar-width",$.string().optional()),headerHeight:$.property("header-height",$.string().optional()),searchbarPlacement:$.property("searchbar-placement",njr.optional()),tabMenu:$.property("tab-menu",ajr.optional()),tabsPlacement:$.property("tabs-placement",Zrt.optional()),switcherPlacement:$.property("switcher-placement",ijr.optional()),contentAlignment:$.property("content-alignment",SNr.optional()),headerPosition:$.property("header-position",rjr.optional()),disableHeader:$.property("disable-header",$.boolean().optional()),hideNavLinks:$.property("hide-nav-links",$.boolean().optional()),hideFeedback:$.property("hide-feedback",$.boolean().optional()),mobileToc:$.property("mobile-toc",$.boolean().optional()),changelogLayout:$.property("changelog-layout",bNr.optional()),apiReferenceLayout:$.property("api-reference-layout",cNr.optional()),apiReferenceExpandProperties:$.property("api-reference-expand-properties",$.boolean().optional()),showNavAvailabilityBadges:$.property("show-nav-availability-badges",$.boolean().optional()),hideWebhookMethodBadges:$.property("hide-webhook-method-badges",$.boolean().optional()),breadcrumbs:ANr.optional()})});var ujr,jxo=h(()=>{"use strict";br();ujr=$.enum_(["kind","header"])});var pjr,zxo=h(()=>{"use strict";br();pjr=$.enum_(["compact","hyphenated"])});var fjr,Qxo=h(()=>{"use strict";br();jxo();zxo();fjr=$.object({doxyfile:$.string().optional(),includeUndocumentedMacros:$.property("include-undocumented-macros",$.boolean().optional()),slugStyle:$.property("slug-style",pjr.optional()),organizeBy:$.property("organize-by",ujr.optional()),include:$.list($.string()).optional(),exclude:$.list($.string()).optional(),excludeSymbols:$.property("exclude-symbols",$.list($.string()).optional())})});var djr,Mxo=h(()=>{"use strict";br();djr=$.object({git:$.string(),subpath:$.string().optional(),ref:$.string().optional()})});var mjr,Lxo=h(()=>{"use strict";br();mjr=$.object({path:$.string()})});var hjr,_xo=h(()=>{"use strict";br();Mxo();Lxo();hjr=$.undiscriminatedUnion([djr,mjr])});var gjr,Uxo=h(()=>{"use strict";br();gjr=$.enum_(["python","cpp"])});var Ajr,Vxo=h(()=>{"use strict";br();Ajr=$.object({path:$.string()})});var yjr,Gxo=h(()=>{"use strict";br();Qxo();_xo();Uxo();Vxo();yjr=$.object({input:hjr,output:Ajr,lang:gjr,config:fjr.optional()})});var $rt,bjr=h(()=>{"use strict";br();$rt=$.string()});var Ejr,qxo=h(()=>{"use strict";br();Ejr=$.object({dark:$.string().optional(),light:$.string().optional(),height:$.number().optional(),href:$.string().optional(),rightText:$.property("right-text",$.string().optional())})});var Ijr,Wxo=h(()=>{"use strict";br();Ijr=$.enum_(["dark","light"])});var vjr,Hxo=h(()=>{"use strict";br();vjr=$.enum_(["summary","summary_large_image","app","player"])});var Cjr,Kxo=h(()=>{"use strict";br();Wxo();Hxo();Cjr=$.object({ogSiteName:$.property("og:site_name",$.string().optional()),ogTitle:$.property("og:title",$.string().optional()),ogDescription:$.property("og:description",$.string().optional()),ogUrl:$.property("og:url",$.string().optional()),ogImage:$.property("og:image",$.string().optional()),ogImageWidth:$.property("og:image:width",$.number().optional()),ogImageHeight:$.property("og:image:height",$.number().optional()),ogLocale:$.property("og:locale",$.string().optional()),ogLogo:$.property("og:logo",$.string().optional()),twitterTitle:$.property("twitter:title",$.string().optional()),twitterDescription:$.property("twitter:description",$.string().optional()),twitterHandle:$.property("twitter:handle",$.string().optional()),twitterImage:$.property("twitter:image",$.string().optional()),twitterSite:$.property("twitter:site",$.string().optional()),twitterUrl:$.property("twitter:url",$.string().optional()),twitterCard:$.property("twitter:card",vjr.optional()),ogDynamic:$.property("og:dynamic",$.boolean().optional()),ogDynamicBackgroundImage:$.property("og:dynamic:background-image",$.string().optional()),ogDynamicTextColor:$.property("og:dynamic:text-color",$.string().optional()),ogDynamicBackgroundColor:$.property("og:dynamic:background-color",$.string().optional()),ogDynamicLogoColor:$.property("og:dynamic:logo-color",Ijr.optional()),ogDynamicShowLogo:$.property("og:dynamic:show-logo",$.boolean().optional()),ogDynamicShowSection:$.property("og:dynamic:show-section",$.boolean().optional()),ogDynamicShowDescription:$.property("og:dynamic:show-description",$.boolean().optional()),ogDynamicShowUrl:$.property("og:dynamic:show-url",$.boolean().optional()),ogDynamicShowGradient:$.property("og:dynamic:show-gradient",$.boolean().optional()),canonicalHost:$.property("canonical-host",$.string().optional())})});var Vve,H3t=h(()=>{"use strict";br();oNr();Vve=$.object({viewers:Grt.optional()})});var Uee,xjr=h(()=>{"use strict";br();g3e();H3t();Uee=$.object({href:$.string().optional(),target:t5.optional(),url:$.string().optional(),text:$.string().optional(),icon:$.string().optional(),rightIcon:$.string().optional(),rounded:$.boolean().optional()}).extend(Vve)});var Sjr,Jxo=h(()=>{"use strict";br();xjr();H3t();Sjr=$.object({links:$.list(Uee),text:$.string().optional(),icon:$.string().optional(),rightIcon:$.string().optional(),rounded:$.boolean().optional()}).extend(Vve)});var wjr,Yxo=h(()=>{"use strict";br();g3e();H3t();wjr=$.object({url:$.string(),target:t5.optional()}).extend(Vve)});var Tjr,Xxo=h(()=>{"use strict";br();Yxo();Tjr=$.undiscriminatedUnion([$.string(),wjr])});var Ojr,Zxo=h(()=>{"use strict";br();Jxo();Xxo();xjr();Ojr=$.union("type",{filled:Uee,outlined:Uee,minimal:Uee,github:$.object({value:Tjr}),dropdown:Sjr,primary:Uee,secondary:Uee}).transform({transform:e=>e,untransform:e=>e})});var $z,Gve=h(()=>{"use strict";br();$z=$.string()});var Pjr,$xo=h(()=>{"use strict";br();d3();Gve();Pjr=$.object({tab:$z,layout:$.list($.lazy(()=>Vee)).optional()})});var ent,Bjr=h(()=>{"use strict";br();d3();aw();cw();ent=$.object({title:$.string(),subtitle:$.string().optional(),icon:$.string().optional(),layout:$.list($.lazy(()=>Vee)),slug:$.string().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),hidden:$.boolean().optional(),default:$.boolean().optional(),profile:$.string().optional()}).extend(Kf).extend(Hf)});var Djr,eSo=h(()=>{"use strict";br();_ve();Bjr();Djr=$.undiscriminatedUnion([ent,Zz])});var Rjr,tSo=h(()=>{"use strict";br();eSo();Rjr=$.object({group:$.string(),items:$.list(Djr)})});var kjr,rSo=h(()=>{"use strict";br();_ve();Bjr();tSo();kjr=$.undiscriminatedUnion([ent,Rjr,Zz])});var Fjr,nSo=h(()=>{"use strict";br();Gve();rSo();Fjr=$.object({tab:$z,variants:$.list(kjr)})});var Njr,iSo=h(()=>{"use strict";br();$xo();nSo();Njr=$.undiscriminatedUnion([Pjr,Fjr])});var jjr,oSo=h(()=>{"use strict";br();iSo();jjr=$.list(Njr)});var zjr,sSo=h(()=>{"use strict";br();d3();zjr=$.list($.lazy(()=>Vee))});var qve,K3t=h(()=>{"use strict";br();oSo();sSo();qve=$.undiscriminatedUnion([jjr,zjr])});var Qjr,aSo=h(()=>{"use strict";br();Qjr=$.enum_(["copy-page","view-as-markdown","ask-ai","chatgpt","claude","cursor","claude-code","vscode"])});var Mjr,cSo=h(()=>{"use strict";br();Mjr=$.object({name:$.string(),description:$.string().optional(),url:$.string().optional()})});var Ljr,lSo=h(()=>{"use strict";br();Ljr=$.undiscriminatedUnion([$.string(),$.list($.string())])});var _jr,uSo=h(()=>{"use strict";br();cSo();lSo();_jr=$.object({title:$.string().optional(),description:$.string().optional(),learnMoreUrl:$.property("learn-more-url",$.string().optional()),repository:$.string().optional(),installCommand:$.property("install-command",Ljr.optional()),skills:$.list(Mjr).optional()})});var Ujr,pSo=h(()=>{"use strict";br();ixo();uSo();Ujr=$.object({copyPage:$.property("copy-page",$.boolean().optional()),viewAsMarkdown:$.property("view-as-markdown",$.boolean().optional()),askAi:$.property("ask-ai",$.boolean().optional()),chatgpt:$.boolean().optional(),claude:$.boolean().optional(),claudeCode:$.property("claude-code",$.boolean().optional()),cursor:$.boolean().optional(),mcp:$.boolean().optional(),vscode:$.boolean().optional(),custom:$.list(ONr).optional(),skills:_jr.optional()})});var Vjr,fSo=h(()=>{"use strict";br();aSo();pSo();Vjr=$.object({default:Qjr.optional(),options:Ujr.optional()})});var Gjr,dSo=h(()=>{"use strict";br();Gjr=$.enum_(["deprecated","legacy","ga","stable","beta","alpha","preview"])});var tnt,qjr=h(()=>{"use strict";br();L3t();_rt();dSo();aw();cw();tnt=$.object({displayName:$.property("display-name",$.string()),profile:$.string().optional(),path:$.string().optional(),ref:$.string().optional(),slug:$.string().optional(),availability:Gjr.optional(),audiences:zee.optional(),hidden:$.boolean().optional(),default:$.boolean().optional(),announcement:Lve.optional()}).extend(Kf).extend(Hf)});var rnt,Wjr=h(()=>{"use strict";br();_rt();qjr();aw();cw();rnt=$.object({displayName:$.property("display-name",$.string()),subtitle:$.string().optional(),icon:$.string().optional(),image:$.string().optional(),versions:$.list(tnt).optional(),audiences:zee.optional(),profile:$.string().optional()}).extend(Kf).extend(Hf)});var Hjr,mSo=h(()=>{"use strict";br();Wjr();g3e();Hjr=$.object({href:$.string(),target:t5.optional()}).extend(rnt)});var Kjr,hSo=h(()=>{"use strict";br();L3t();Wjr();Kjr=$.object({path:$.string(),slug:$.string().optional(),announcement:Lve.optional()}).extend(rnt)});var Jjr,gSo=h(()=>{"use strict";br();mSo();hSo();Jjr=$.undiscriminatedUnion([Kjr,Hjr])});var Yjr,ASo=h(()=>{"use strict";br();Yjr=$.undiscriminatedUnion([$.record($.string(),$.string()),$.string(),$.list($.string())])});var Xjr,ySo=h(()=>{"use strict";br();ASo();Xjr=$.object({vars:Yjr.optional()})});var Zjr,bSo=h(()=>{"use strict";br();Zjr=$.enum_(["typescript","javascript","python","java","go","ruby","csharp","php","swift","rust","nodets","nodejs","dotnet","curl","jvm","ts","js"])});var $jr,ESo=h(()=>{"use strict";br();$jr=$.object({source:$.string(),destination:$.string(),permanent:$.boolean().optional()})});var ezr,ISo=h(()=>{"use strict";br();ESo();ezr=$.undiscriminatedUnion([$.list($jr),$.string(),$.list($.string())])});var tzr,vSo=h(()=>{"use strict";br();tzr=$.object({path:$.string(),destination:$.string()})});var nnt,rzr=h(()=>{"use strict";br();Gve();aw();cw();nnt=$.object({tab:$z,displayName:$.property("display-name",$.string()),subtitle:$.string().optional(),icon:$.string().optional(),slug:$.string().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),hidden:$.boolean().optional(),default:$.boolean().optional()}).extend(Kf).extend(Hf)});var nzr,CSo=h(()=>{"use strict";br();_ve();rzr();nzr=$.undiscriminatedUnion([nnt,Zz])});var izr,xSo=h(()=>{"use strict";br();CSo();izr=$.object({group:$.string(),tabs:$.list(nzr)})});var ozr,SSo=h(()=>{"use strict";br();_ve();xSo();rzr();ozr=$.undiscriminatedUnion([nnt,izr,Zz])});var Wve,J3t=h(()=>{"use strict";br();V3t();SSo();g3e();sjr();aw();cw();Wve=$.object({displayName:$.property("display-name",$.string()),icon:$.string().optional(),slug:$.string().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),hidden:$.boolean().optional(),href:$.string().optional(),target:t5.optional(),changelog:Zfe.optional(),blog:Zfe.optional(),profile:$.string().optional(),tabMenu:$.property("tab-menu",$.list(ozr).optional()),tabMenuColumnHeight:$.property("tab-menu-column-height",Xrt.optional())}).extend(Kf).extend(Hf)});var szr,wSo=h(()=>{"use strict";br();szr=$.enum_(["default","minimal"])});var azr,TSo=h(()=>{"use strict";br();azr=$.enum_(["default","minimal"])});var czr,OSo=h(()=>{"use strict";br();czr=$.enum_(["default","toolbar"])});var lzr,PSo=h(()=>{"use strict";br();lzr=$.enum_(["default","toggle","tabs"])});var uzr,BSo=h(()=>{"use strict";br();uzr=$.enum_(["default","minimal"])});var pzr,DSo=h(()=>{"use strict";br();pzr=$.object({enabled:$.boolean().optional(),order:$.list($.string()).optional(),hide:$.list($.string()).optional(),labels:$.record($.string(),$.string()).optional(),showProducts:$.property("show-products",$.boolean().optional())})});var fzr,RSo=h(()=>{"use strict";br();fzr=$.enum_(["left","center"])});var int,dzr=h(()=>{"use strict";br();int=$.enum_(["default","bubble"])});var mzr,kSo=h(()=>{"use strict";br();RSo();cjr();dzr();mzr=$.object({style:int.optional(),alignment:fzr.optional(),placement:Zrt.optional()})});var hzr,FSo=h(()=>{"use strict";br();kSo();dzr();hzr=$.undiscriminatedUnion([int,mzr])});var gzr,NSo=h(()=>{"use strict";br();GCo();XCo();wSo();TSo();OSo();PSo();BSo();DSo();FSo();gzr=$.object({sidebar:uzr.optional(),body:gNr.optional(),tabs:hzr.optional(),pageActions:$.property("page-actions",czr.optional()),footerNav:$.property("footer-nav",szr.optional()),languageSwitcher:$.property("language-switcher",azr.optional()),productSwitcher:$.property("product-switcher",lzr.optional()),siteSwitcher:$.property("site-switcher",pzr.optional()),codeBlocks:$.property("code-blocks",vNr.optional())})});var Azr,jSo=h(()=>{"use strict";br();q3t();Azr=$.object({lang:Uve,default:$.boolean().optional()})});var yzr,zSo=h(()=>{"use strict";br();q3t();jSo();yzr=$.undiscriminatedUnion([Uve,Azr])});var kel,Fel=h(()=>{"use strict";br();sCo();pCo();fCo();bCo();L3t();UCo();yNr();JCo();exo();rxo();cxo();mxo();bxo();vxo();Cxo();xxo();Pxo();Nxo();Gxo();bjr();qxo();Kxo();Zxo();K3t();fSo();A3e();gSo();ySo();bSo();ISo();vSo();iNr();J3t();Gve();NSo();zSo();qjr();kel=$.object({instances:$.list(RNr),profiles:$.record($.string(),Xjr).optional(),profile:$.string().optional(),title:$.string().optional(),libraries:$.record($rt,yjr).optional(),analytics:V2r.optional(),announcement:Lve.optional(),roles:$.list(h3e).optional(),tabs:$.record($z,Wve).optional(),versions:$.list(tnt).optional(),products:$.list(Jjr).optional(),changelog:qrt.optional(),landingPage:$.property("landing-page",r5.optional()),navigation:qve.optional(),navbarLinks:$.property("navbar-links",$.list(Ojr).optional()),footerLinks:$.property("footer-links",JNr.optional()),pageActions:$.property("page-actions",Vjr.optional()),globalTheme:$.property("global-theme",$.string().optional()),experimental:KNr.optional(),defaultLanguage:$.property("default-language",Zjr.optional()),languages:$.list($.string()).optional(),translations:$.list(yzr).optional(),aiChat:$.property("ai-chat",M3t.optional()),aiSearch:$.property("ai-search",M3t.optional()),aiExamples:$.property("ai-examples",j2r.optional()),agents:D2r.optional(),metadata:Cjr.optional(),redirects:ezr.optional(),remotePaths:$.property("remote-paths",$.list(tzr).optional()),check:INr.optional(),logo:Ejr.optional(),favicon:$.string().optional(),backgroundImage:$.property("background-image",mNr.optional()),colors:xNr.optional(),typography:qNr.optional(),layout:ljr.optional(),settings:MNr.optional(),theme:gzr.optional(),integrations:YNr.optional(),css:wNr.optional(),js:tjr.optional(),header:$.string().optional(),footer:$.string().optional()})});var bzr,QSo=h(()=>{"use strict";br();Qee();Urt();zNr();aw();cw();bzr=$.object({folder:$.string(),title:$.string().optional(),titleSource:$.property("title-source",Wrt.optional()),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),collapsed:Mee.optional(),collapsible:$.boolean().optional(),collapsedByDefault:$.property("collapsed-by-default",$.boolean().optional()),availability:J1.optional()}).extend(Kf).extend(Hf)});var Ezr,MSo=h(()=>{"use strict";br();bjr();aw();cw();Ezr=$.object({library:$rt,title:$.string().optional(),slug:$.string().optional()}).extend(Kf).extend(Hf)});var Vee,Nel=h(()=>{"use strict";br();d3();zCo();VCo();yNr();QSo();MSo();_ve();A3e();Vee=$.undiscriminatedUnion([r5,$.lazyObject(()=>Izr),sNr,Ezr,Zz,qrt,hNr,bzr])});var jel,zel=h(()=>{"use strict";br();K3t();A3e();J3t();Gve();jel=$.object({tabs:$.record($z,Wve).optional(),landingPage:$.property("landing-page",r5.optional()),navigation:qve})});var vzr,LSo=h(()=>{"use strict";br();aw();cw();vzr=$.object({displayName:$.property("display-name",$.string()),path:$.string(),slug:$.string().optional()}).extend(Kf).extend(Hf)});var Qel,Mel=h(()=>{"use strict";br();iCo();LSo();Qel=$.undiscriminatedUnion([vzr,P2r])});var Izr,Lel=h(()=>{"use strict";br();d3();Qee();Urt();aw();cw();Izr=$.object({section:$.string(),path:$.string().optional(),contents:$.list($.lazy(()=>Vee)),profile:$.string().optional(),collapsed:Mee.optional(),collapsible:$.boolean().optional(),collapsedByDefault:$.property("collapsed-by-default",$.boolean().optional()),slug:$.string().optional(),icon:$.string().optional(),hidden:$.boolean().optional(),skipSlug:$.property("skip-slug",$.boolean().optional()),availability:J1.optional()}).extend(Kf).extend(Hf)});var _el,Uel=h(()=>{"use strict";br();K3t();A3e();J3t();Gve();_el=$.object({tabs:$.record($z,Wve).optional(),landingPage:$.property("landing-page",r5.optional()),navigation:qve})});var _So=h(()=>{"use strict";iCo();sCo();pCo();cCo();lCo();uCo();aCo();fCo();bCo();L3t();zCo();QCo();MCo();Pel();LCo();Bel();Del();Rel();TCo();ECo();vCo();ICo();CCo();xCo();SCo();wCo();_rt();OCo();Qee();UCo();_Co();VCo();GCo();qCo();yNr();V3t();WCo();JCo();HCo();KCo();XCo();YCo();PCo();Urt();$Co();exo();ZCo();txo();rxo();nxo();ixo();Fel();cxo();mxo();bxo();axo();oxo();lxo();vxo();mSo();Ixo();Exo();NCo();jCo();QSo();yxo();gxo();hxo();Axo();LNr();_Nr();Cxo();wSo();dCo();sxo();Mxo();mCo();hCo();Bxo();uxo();pxo();xxo();gCo();hSo();Pxo();Oxo();wxo();Sxo();Txo();XNr();q3t();TSo();Nxo();Qxo();Gxo();_xo();Uxo();bjr();jxo();Vxo();MSo();zxo();_ve();qxo();Kxo();Jxo();Xxo();Yxo();Zxo();xjr();K3t();Nel();Wxo();aSo();pSo();fSo();OSo();A3e();oCo();Lxo();BCo();Vrt();ACo();gSo();Wjr();zel();Mel();PSo();ySo();ASo();bSo();ESo();ISo();LSo();vSo();oNr();iNr();Dxo();fxo();Lel();yCo();BSo();DSo();cSo();lSo();uSo();RCo();kCo();FCo();Rxo();oSo();iSo();$xo();nSo();J3t();Gve();SSo();xSo();CSo();Fxo();rzr();RSo();cjr();FSo();kSo();dzr();Bjr();tSo();eSo();rSo();g3e();NSo();zNr();zSo();jSo();Hxo();sSo();sjr();kxo();dSo();qjr();DCo();Uel();dxo();aw();cw();H3t()});var USo={};ne(USo,{AbsoluteProductPath:()=>P2r,AgentsConfig:()=>D2r,AiChatConfig:()=>M3t,AiChatDatasource:()=>k2r,AiChatLocation:()=>F2r,AiChatModel:()=>N2r,AiChatWebsiteDatasource:()=>R2r,AiExamplesConfig:()=>j2r,AnalyticsConfig:()=>V2r,AnnouncementConfig:()=>Lve,ApiReferenceConfiguration:()=>sNr,ApiReferenceEndpointConfiguration:()=>aNr,ApiReferenceLayout:()=>cNr,ApiReferenceLayoutItem:()=>_ee,ApiReferenceOperationConfiguration:()=>lNr,ApiReferencePackageConfiguration:()=>uNr,ApiReferencePackageConfigurationWithOptions:()=>fNr,ApiReferenceSectionConfiguration:()=>pNr,ApiSpecConfiguration:()=>X2r,ApiSpecErrorResponseApplyTo:()=>G2r,ApiSpecErrorResponseEnsure:()=>W2r,ApiSpecErrorResponseHttpMethod:()=>q2r,ApiSpecErrorResponseSchemaSource:()=>H2r,ApiSpecErrorResponses:()=>K2r,ApiSpecImportSettings:()=>J2r,ApiSpecType:()=>Y2r,Audience:()=>zee,AudienceId:()=>_3t,Availability:()=>J1,BackgroundImageConfiguration:()=>mNr,BackgroundImageThemedConfig:()=>dNr,BlogConfiguration:()=>hNr,BodyThemeConfig:()=>gNr,BreadcrumbsConfig:()=>ANr,ChangelogConfiguration:()=>qrt,ChangelogFolderRelativePath:()=>Zfe,ChangelogLayout:()=>bNr,CheckConfig:()=>INr,CheckRuleSeverity:()=>GH,CheckRulesConfig:()=>ENr,CodeBlockTheme:()=>G3t,CodeBlocksThemeConfig:()=>vNr,CollapsedStringValue:()=>Z2r,CollapsedValue:()=>Mee,ColorConfig:()=>ZI,ColorThemedConfig:()=>CNr,ColorsConfiguration:()=>xNr,ContentAlignment:()=>SNr,CssConfig:()=>wNr,CustomDomain:()=>TNr,CustomPageAction:()=>ONr,DocsConfiguration:()=>kel,DocsInstance:()=>RNr,DocsSettingsConfig:()=>MNr,DocsTypographyConfig:()=>qNr,EditThisPageConfig:()=>DNr,EditThisPageLaunch:()=>PNr,EmbeddingConfig:()=>kNr,ExperimentalConfig:()=>KNr,ExternalProduct:()=>Hjr,ExternalSitemap:()=>HNr,ExternalSitemapConfig:()=>WNr,FeatureFlag:()=>U3t,FeatureFlagConfiguration:()=>nNr,FolderConfiguration:()=>bzr,FontConfig:()=>Jrt,FontConfigPath:()=>VNr,FontConfigVariant:()=>UNr,FontDisplay:()=>GNr,FontStyle:()=>Hrt,FontWeight:()=>Krt,FooterLinksConfig:()=>JNr,FooterNavThemeConfig:()=>szr,FullStoryAnalyticsConfig:()=>z2r,GitLibraryInputSchema:()=>djr,GithubEditThisPageConfig:()=>BNr,GoogleAnalytics4Config:()=>Q2r,GtmConfig:()=>M2r,HeaderPosition:()=>rjr,HttpSnippetLanguage:()=>FNr,HttpSnippetsConfig:()=>NNr,IntegrationsConfig:()=>YNr,IntercomConfig:()=>L2r,InternalProduct:()=>Kjr,JsConfig:()=>tjr,JsConfigOptions:()=>W3t,JsFileConfig:()=>$Nr,JsFileConfigSettings:()=>ZNr,JsRemoteConfig:()=>ejr,JsScriptStrategy:()=>Yrt,Language:()=>Uve,LanguageSwitcherThemeConfig:()=>azr,LayoutConfig:()=>ljr,LibraryConfig:()=>fjr,LibraryConfiguration:()=>yjr,LibraryInputConfiguration:()=>hjr,LibraryLanguage:()=>gjr,LibraryName:()=>$rt,LibraryOrganizeBy:()=>ujr,LibraryOutputConfiguration:()=>Ajr,LibraryReferenceConfiguration:()=>Ezr,LibrarySlugStyle:()=>pjr,LinkConfiguration:()=>Zz,LogoConfiguration:()=>Ejr,MetadataConfig:()=>Cjr,NavbarDropdownConfig:()=>Sjr,NavbarGithubConfig:()=>Tjr,NavbarGithubConfigWithOptions:()=>wjr,NavbarLink:()=>Ojr,NavbarLinkConfig:()=>Uee,NavigationConfig:()=>qve,NavigationItem:()=>Vee,OgDynamicLogoColor:()=>Ijr,PageActionOption:()=>Qjr,PageActionOptions:()=>Ujr,PageActionsConfig:()=>Vjr,PageActionsThemeConfig:()=>czr,PageConfiguration:()=>r5,PageDescriptionSource:()=>B2r,PathLibraryInputSchema:()=>mjr,PlaygroundButtonSettings:()=>$2r,PlaygroundSettings:()=>Lee,PostHogConfig:()=>_2r,ProductConfig:()=>Jjr,ProductConfigBase:()=>rnt,ProductFileConfig:()=>jel,ProductPath:()=>Qel,ProductSwitcherThemeConfig:()=>lzr,ProfileConfig:()=>Xjr,ProfileVarsConfiguration:()=>Yjr,ProgrammingLanguage:()=>Zjr,RedirectConfig:()=>$jr,RedirectsConfiguration:()=>ezr,RelativeProductPath:()=>vzr,RemotePathConfig:()=>tzr,Role:()=>Grt,RoleId:()=>h3e,SearchSettingsConfig:()=>jNr,SearchbarPlacement:()=>njr,SectionConfiguration:()=>Izr,SegmentConfig:()=>U2r,SidebarThemeConfig:()=>uzr,SiteSwitcherThemeConfig:()=>pzr,SkillEntry:()=>Mjr,SkillsInstallCommand:()=>Ljr,SkillsPageActionConfig:()=>_jr,SnippetLanguageConfiguration:()=>f3,SnippetsConfiguration:()=>tNr,SortByAvailabilityValue:()=>rNr,SwitcherPlacement:()=>ijr,TabConfig:()=>Wve,TabId:()=>$z,TabMenuEntry:()=>ozr,TabMenuGroup:()=>izr,TabMenuGroupItem:()=>nzr,TabMenuLayoutConfig:()=>ajr,TabMenuTab:()=>nnt,TabVariant:()=>ent,TabVariantGroup:()=>Rjr,TabVariantGroupItem:()=>Djr,TabVariantItem:()=>kjr,TabbedNavigationConfig:()=>jjr,TabbedNavigationItem:()=>Njr,TabbedNavigationItemWithLayout:()=>Pjr,TabbedNavigationItemWithVariants:()=>Fjr,TabsAlignment:()=>fzr,TabsPlacement:()=>Zrt,TabsThemeConfig:()=>hzr,TabsThemeObjectConfig:()=>mzr,TabsThemeStyle:()=>int,Target:()=>t5,ThemeConfig:()=>gzr,TitleSource:()=>Wrt,TranslationConfig:()=>yzr,TranslationConfigObject:()=>Azr,TwitterCardSetting:()=>vjr,UntabbedNavigationConfig:()=>zjr,VariantsColumnHeight:()=>Xrt,VariantsColumnHeightCount:()=>ojr,VersionAvailability:()=>Gjr,VersionConfig:()=>tnt,VersionFileConfig:()=>_el,VersionedSnippetLanguageConfiguration:()=>eNr,WebSocketOneofDisplay:()=>QNr,WithFeatureFlags:()=>Hf,WithPermissions:()=>Kf,WithViewers:()=>Vve});var Vel=h(()=>{"use strict";_So()});var Gel=h(()=>{"use strict";Vel();_So()});var Xz={};ne(Xz,{AbsoluteProductPath:()=>P2r,AgentsConfig:()=>D2r,AiChatConfig:()=>M3t,AiChatDatasource:()=>k2r,AiChatLocation:()=>F2r,AiChatModel:()=>N2r,AiChatWebsiteDatasource:()=>R2r,AiExamplesConfig:()=>j2r,AnalyticsConfig:()=>V2r,AnnouncementConfig:()=>Lve,ApiReferenceConfiguration:()=>sNr,ApiReferenceEndpointConfiguration:()=>aNr,ApiReferenceLayout:()=>cNr,ApiReferenceLayoutItem:()=>_ee,ApiReferenceOperationConfiguration:()=>lNr,ApiReferencePackageConfiguration:()=>uNr,ApiReferencePackageConfigurationWithOptions:()=>fNr,ApiReferenceSectionConfiguration:()=>pNr,ApiSpecConfiguration:()=>X2r,ApiSpecErrorResponseApplyTo:()=>G2r,ApiSpecErrorResponseEnsure:()=>W2r,ApiSpecErrorResponseHttpMethod:()=>q2r,ApiSpecErrorResponseSchemaSource:()=>H2r,ApiSpecErrorResponses:()=>K2r,ApiSpecImportSettings:()=>J2r,ApiSpecType:()=>Y2r,Audience:()=>zee,AudienceId:()=>_3t,Availability:()=>J1,BackgroundImageConfiguration:()=>mNr,BackgroundImageThemedConfig:()=>dNr,BlogConfiguration:()=>hNr,BodyThemeConfig:()=>gNr,BreadcrumbsConfig:()=>ANr,ChangelogConfiguration:()=>qrt,ChangelogFolderRelativePath:()=>Zfe,ChangelogLayout:()=>bNr,CheckConfig:()=>INr,CheckRuleSeverity:()=>GH,CheckRulesConfig:()=>ENr,CodeBlockTheme:()=>G3t,CodeBlocksThemeConfig:()=>vNr,CollapsedStringValue:()=>Z2r,CollapsedValue:()=>Mee,ColorConfig:()=>ZI,ColorThemedConfig:()=>CNr,ColorsConfiguration:()=>xNr,ContentAlignment:()=>SNr,CssConfig:()=>wNr,CustomDomain:()=>TNr,CustomPageAction:()=>ONr,DocsConfiguration:()=>kel,DocsInstance:()=>RNr,DocsSettingsConfig:()=>MNr,DocsTypographyConfig:()=>qNr,EditThisPageConfig:()=>DNr,EditThisPageLaunch:()=>PNr,EmbeddingConfig:()=>kNr,ExperimentalConfig:()=>KNr,ExternalProduct:()=>Hjr,ExternalSitemap:()=>HNr,ExternalSitemapConfig:()=>WNr,FeatureFlag:()=>U3t,FeatureFlagConfiguration:()=>nNr,FolderConfiguration:()=>bzr,FontConfig:()=>Jrt,FontConfigPath:()=>VNr,FontConfigVariant:()=>UNr,FontDisplay:()=>GNr,FontStyle:()=>Hrt,FontWeight:()=>Krt,FooterLinksConfig:()=>JNr,FooterNavThemeConfig:()=>szr,FullStoryAnalyticsConfig:()=>z2r,GitLibraryInputSchema:()=>djr,GithubEditThisPageConfig:()=>BNr,GoogleAnalytics4Config:()=>Q2r,GtmConfig:()=>M2r,HeaderPosition:()=>rjr,HttpSnippetLanguage:()=>FNr,HttpSnippetsConfig:()=>NNr,IntegrationsConfig:()=>YNr,IntercomConfig:()=>L2r,InternalProduct:()=>Kjr,JsConfig:()=>tjr,JsConfigOptions:()=>W3t,JsFileConfig:()=>$Nr,JsFileConfigSettings:()=>ZNr,JsRemoteConfig:()=>ejr,JsScriptStrategy:()=>Yrt,Language:()=>Uve,LanguageSwitcherThemeConfig:()=>azr,LayoutConfig:()=>ljr,LibraryConfig:()=>fjr,LibraryConfiguration:()=>yjr,LibraryInputConfiguration:()=>hjr,LibraryLanguage:()=>gjr,LibraryName:()=>$rt,LibraryOrganizeBy:()=>ujr,LibraryOutputConfiguration:()=>Ajr,LibraryReferenceConfiguration:()=>Ezr,LibrarySlugStyle:()=>pjr,LinkConfiguration:()=>Zz,LogoConfiguration:()=>Ejr,MetadataConfig:()=>Cjr,NavbarDropdownConfig:()=>Sjr,NavbarGithubConfig:()=>Tjr,NavbarGithubConfigWithOptions:()=>wjr,NavbarLink:()=>Ojr,NavbarLinkConfig:()=>Uee,NavigationConfig:()=>qve,NavigationItem:()=>Vee,OgDynamicLogoColor:()=>Ijr,PageActionOption:()=>Qjr,PageActionOptions:()=>Ujr,PageActionsConfig:()=>Vjr,PageActionsThemeConfig:()=>czr,PageConfiguration:()=>r5,PageDescriptionSource:()=>B2r,PathLibraryInputSchema:()=>mjr,PlaygroundButtonSettings:()=>$2r,PlaygroundSettings:()=>Lee,PostHogConfig:()=>_2r,ProductConfig:()=>Jjr,ProductConfigBase:()=>rnt,ProductFileConfig:()=>jel,ProductPath:()=>Qel,ProductSwitcherThemeConfig:()=>lzr,ProfileConfig:()=>Xjr,ProfileVarsConfiguration:()=>Yjr,ProgrammingLanguage:()=>Zjr,RedirectConfig:()=>$jr,RedirectsConfiguration:()=>ezr,RelativeProductPath:()=>vzr,RemotePathConfig:()=>tzr,Role:()=>Grt,RoleId:()=>h3e,SearchSettingsConfig:()=>jNr,SearchbarPlacement:()=>njr,SectionConfiguration:()=>Izr,SegmentConfig:()=>U2r,SidebarThemeConfig:()=>uzr,SiteSwitcherThemeConfig:()=>pzr,SkillEntry:()=>Mjr,SkillsInstallCommand:()=>Ljr,SkillsPageActionConfig:()=>_jr,SnippetLanguageConfiguration:()=>f3,SnippetsConfiguration:()=>tNr,SortByAvailabilityValue:()=>rNr,SwitcherPlacement:()=>ijr,TabConfig:()=>Wve,TabId:()=>$z,TabMenuEntry:()=>ozr,TabMenuGroup:()=>izr,TabMenuGroupItem:()=>nzr,TabMenuLayoutConfig:()=>ajr,TabMenuTab:()=>nnt,TabVariant:()=>ent,TabVariantGroup:()=>Rjr,TabVariantGroupItem:()=>Djr,TabVariantItem:()=>kjr,TabbedNavigationConfig:()=>jjr,TabbedNavigationItem:()=>Njr,TabbedNavigationItemWithLayout:()=>Pjr,TabbedNavigationItemWithVariants:()=>Fjr,TabsAlignment:()=>fzr,TabsPlacement:()=>Zrt,TabsThemeConfig:()=>hzr,TabsThemeObjectConfig:()=>mzr,TabsThemeStyle:()=>int,Target:()=>t5,ThemeConfig:()=>gzr,TitleSource:()=>Wrt,TranslationConfig:()=>yzr,TranslationConfigObject:()=>Azr,TwitterCardSetting:()=>vjr,UntabbedNavigationConfig:()=>zjr,VariantsColumnHeight:()=>Xrt,VariantsColumnHeightCount:()=>ojr,VersionAvailability:()=>Gjr,VersionConfig:()=>tnt,VersionFileConfig:()=>_el,VersionedSnippetLanguageConfiguration:()=>eNr,WebSocketOneofDisplay:()=>QNr,WithFeatureFlags:()=>Hf,WithPermissions:()=>Kf,WithViewers:()=>Vve,docs:()=>USo});var d3=h(()=>{"use strict";Gel()});var qel=h(()=>{"use strict";zvo();Qvo();g$c();d3()});var VSo={};ne(VSo,{AiChatLocation:()=>HIo,AiChatModel:()=>KIo,ApiReferenceLayout:()=>JIo,ApiSpecErrorResponseApplyTo:()=>YIo,ApiSpecErrorResponseHttpMethod:()=>XIo,ApiSpecType:()=>ZIo,Availability:()=>$Io,BodyThemeConfig:()=>evo,ChangelogLayout:()=>tvo,CheckRuleSeverity:()=>rvo,CodeBlockTheme:()=>nvo,CollapsedStringValue:()=>ivo,ContentAlignment:()=>ovo,EditThisPageLaunch:()=>svo,FernDocsConfig:()=>jvo,FernDocsConfigError:()=>d3e,FernDocsConfigTimeoutError:()=>R3t,FontDisplay:()=>avo,FontStyle:()=>cvo,FooterNavThemeConfig:()=>lvo,HeaderPosition:()=>uvo,HttpSnippetLanguage:()=>pvo,JsScriptStrategy:()=>fvo,LanguageSwitcherThemeConfig:()=>dvo,LibraryLanguage:()=>mvo,LibraryOrganizeBy:()=>hvo,LibrarySlugStyle:()=>gvo,OgDynamicLogoColor:()=>Avo,PageActionOption:()=>yvo,PageActionsThemeConfig:()=>bvo,PageDescriptionSource:()=>Evo,ProductSwitcherThemeConfig:()=>Ivo,ProgrammingLanguage:()=>vvo,SearchbarPlacement:()=>Cvo,Serializer:()=>Xz,SidebarThemeConfig:()=>xvo,SortByAvailabilityValue:()=>Svo,SwitcherPlacement:()=>wvo,TabsAlignment:()=>Tvo,TabsPlacement:()=>Ovo,TabsThemeStyle:()=>Pvo,Target:()=>Bvo,TitleSource:()=>Dvo,TwitterCardSetting:()=>Rvo,VersionAvailability:()=>kvo,WebSocketOneofDisplay:()=>Fvo,docs:()=>x2r,logging:()=>_vo,serialization:()=>Xz});var Wel=h(()=>{"use strict";qel();zvo();d3()});function Hel(e){return"group"in e}function GSo(e){return"link"in e}function Kel(e){return e.flatMap((t,r)=>Hel(t)?t.items.flatMap((n,i)=>GSo(n)?[]:[{variant:n,path:["variants",`${r}`,"items",`${i}`]}]):GSo(t)?[]:[{variant:t,path:["variants",`${r}`]}])}function X8d(e){return"variants"in e&&Array.isArray(e.variants)}function Jel(e){return"group"in e}function qSo(e){return"link"in e}function Yel(e){return e.flatMap((t,r)=>Jel(t)?t.tabs.flatMap((n,i)=>qSo(n)?[]:[{member:n,path:["tab-menu",`${r}`,"tabs",`${i}`]}]):qSo(t)?[]:[{member:t,path:["tab-menu",`${r}`]}])}function Xel(e){let t=new Map;for(let[r,n]of Object.entries(e??{}))for(let{member:i,path:o}of Yel(n.tabMenu??[]))t.has(i.tab)||t.set(i.tab,{menuTabId:r,menuTab:n,member:i,path:o});return t}function Z8d(e,t){let r=e?.[t];if(r!=null)return[{title:r.displayName,slug:r.slug,skipSlug:r.skipSlug}];let n=Xel(e).get(t);if(n==null)return;let{menuTab:i,member:o}=n;return[{title:i.displayName,slug:i.slug,skipSlug:i.skipSlug},{title:o.displayName,slug:o.slug,skipSlug:o.skipSlug}]}function $8d(e){return Kel(e.variants).map(({variant:t,path:r})=>({owners:[t],layout:t.layout,path:r}))}var Zel=h(()=>{"use strict"});function eGd(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var $el,etl,tGd,ttl=h(()=>{"use strict";$el={logo:"global",favicon:"global",backgroundImage:"global",colors:"global",typography:"global",layout:"global",settings:"global",theme:"global",integrations:"global",css:"global",js:"global",header:"global",footer:"global",navbarLinks:"global",footerLinks:"global",aiSearch:"global",announcement:"global",metadata:"global"},etl=Object.keys($el);tGd=new Set(etl.map(eGd))});function ntl(e){if(e.trim()!==e||e.length===0)return`Origin "${e}" must not be empty or contain surrounding whitespace`;if(e==="*"||e.startsWith("*"))return`Origin "${e}" is not allowed: a bare wildcard would let any site embed your docs. Use a scoped wildcard such as https://*.example.com instead`;if(!rGd.test(e))return`Origin "${e}" is not a valid origin. Expected scheme://host[:port] with no path, query, or CSP keywords, e.g. https://app.example.com or https://*.example.com`}function nGd(e){let t=[];return e.forEach((r,n)=>{let i=ntl(r);i!=null&&t.push(`settings.embedding.allowed-origins[${n}]: ${i}`)}),t}var rtl,rGd,itl=h(()=>{"use strict";rtl="[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?",rGd=new RegExp(`^https?://(?:\\*\\.)?${rtl}(?:\\.${rtl})*(?::\\d{1,5})?$`)});function WSo(e,t){return e===t||e.startsWith(`${t}/`)}function HSo(e,t){return WSo(e,t)||WSo(t,e)}function sGd(e){let t=e.split(".").pop()??"";return/^[0-9.]+$/.test(e)||/^(0x[0-9a-f]*|[0-9]+)$/i.test(t)||e.includes(":")||e.startsWith("[")}function aGd(e,t){return e===t||e.endsWith(`.${t}`)}function atl(e){if(e.length>256)return[`path "${e.slice(0,32)}\u2026" must be at most 256 characters`];if(!iGd.test(e))return[`path "${e}" must start with "/", contain only letters, digits and "._~-" segments, and not end with "/"`];if(e.split("/").some(n=>n==="."||n===".."))return[`path "${e}" must not contain "." or ".." segments`];let t=e.toLowerCase(),r=otl.find(n=>HSo(t,n.toLowerCase()));return r!=null?[`path "${e}" overlaps the Fern-reserved path "${r}"`]:[]}function ctl(e,t=[]){let r;try{r=new URL(e)}catch{return[`destination "${e}" must be an absolute https:// URL`]}if(r.protocol!=="https:")return[`destination "${e}" must use https://`];if(r.username!==""||r.password!=="")return[`destination "${e}" must not contain credentials`];if(r.search!==""||r.hash!==""||e.includes("?")||e.includes("#"))return[`destination "${e}" must not contain a query string or fragment`];if(r.port!=="")return[`destination "${e}" must use the default https port`];let n=r.hostname.toLowerCase().replace(/\.$/,"");return sGd(n)?[`destination "${e}" must use a hostname, not an IP address`]:!n.includes(".")||n==="localhost"||oGd.some(o=>n.endsWith(o))?[`destination "${e}" must be a public hostname`]:stl.some(o=>aGd(n,o))?[`destination "${e}" must not be a Fern-hosted domain`]:t.map(o=>o.toLowerCase().replace(/:\d+$/,"").replace(/\.$/,"")).includes(n)?[`destination "${e}" must not be this docs site's own domain`]:[]}function cGd(e,t=[]){let r=[];return e.length>20&&r.push(`at most 20 remote paths are allowed (found ${e.length})`),e.forEach((n,i)=>{r.push(...atl(n.path)),r.push(...ctl(n.destination,t));for(let o of e.slice(0,i))HSo(n.path,o.path)&&r.push(`path "${n.path}" overlaps the remote path "${o.path}"`)}),r}var A40,y40,otl,stl,iGd,oGd,ltl=h(()=>{"use strict";A40=20,y40=256,otl=["/api/fern-docs","/_fern-files","/_fern-img","/_fern-mdx","/_astro","/_shared","/_mcp","/_print","/~login","/.well-known","/fern-nav","/mcp","/robots.txt","/sitemap.xml","/llms.txt","/llms-full.txt","/context7.json","/favicon.ico","/_redirects","/_redirects-fallback.json","/_remote-paths.json","/_headers","/_routes.json"],stl=["buildwithfern.com","ferndocs.com"],iGd=/^(\/[A-Za-z0-9._~-]+)+$/,oGd=[".local",".localhost",".internal",".arpa",".home",".lan",".corp"]});var si={};ne(si,{DEFAULT_BLOG_TITLE:()=>R8d,DEFAULT_CHANGELOG_TITLE:()=>D8d,DocsYmlSchemas:()=>WIo,FERN_SERVED_HOST_SUFFIXES:()=>stl,MAX_REMOTE_PATHS:()=>A40,MAX_REMOTE_PATH_LENGTH:()=>y40,RESERVED_REMOTE_PATH_PREFIXES:()=>otl,RawSchemas:()=>VSo,THEME_ELIGIBLE_FIELDS:()=>etl,THEME_ELIGIBLE_YAML_KEYS:()=>tGd,THEME_FIELD_POLICIES:()=>$el,flattenNestedTabVariants:()=>FJc,flattenRawTabLayouts:()=>$8d,flattenRawTabMenu:()=>Yel,flattenRawTabVariants:()=>Kel,flattenTabVariantLayouts:()=>kJc,getChangelogFolderFromNavigationItem:()=>k8d,getChangelogFolderFromTabConfig:()=>F8d,getEmbeddingOriginErrors:()=>nGd,getRawTabMenuMemberships:()=>Xel,getRawTabSlugOwners:()=>Z8d,isPathAtOrUnder:()=>WSo,isRawTabMenuGroup:()=>Jel,isRawTabMenuLink:()=>qSo,isRawTabVariantGroup:()=>Hel,isRawTabVariantLink:()=>GSo,isRawTabWithVariantLayouts:()=>X8d,pathsOverlap:()=>HSo,remotePathDestinationProblems:()=>ctl,remotePathPathProblems:()=>atl,remotePathProblems:()=>cGd,resolveVariantsSettings:()=>N8d,validateEmbeddingOrigin:()=>ntl});var utl=h(()=>{"use strict";DJc();RJc();NJc();Wel();Zel();ttl();itl();ltl()});var ptl=h(()=>{"use strict"});async function Gee({absolutePathToFernignore:e}){let t=(await(0,ftl.readFile)(e)).toString();return dtl(t)}function dtl(e){return[q1,...e.trim().split(uGd).map(t=>{let r=t.indexOf("#");return r!==-1?t.slice(0,r).trim():t.trim()}).filter(t=>t.length>0)]}var ftl,uGd,mtl=h(()=>{"use strict";ftl=require("fs/promises");Tkr();uGd=/\r?\n/});function gtl(e){return e.output?.location==="rubygems"&&e.github==null}var htl,Atl=h(()=>{"use strict";htl="Direct RubyGems publishing is not supported. Add a github block to this generator (for example, github: { repository: your-org/your-ruby-sdk }) so the gem is published by the GitHub Actions workflow generated in that repository."});function btl({generatorInvocation:e}){return e.language==="go"?pGd(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,crates: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,crates:r=>r.packageName,_other:()=>{}}),publish:()=>{},publishV2:()=>{},_other:()=>{}})}function pGd(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:()=>{}})}var ytl,Etl=h(()=>{"use strict";ytl={TYPESCRIPT:"typescript",JAVA:"java",PYTHON:"python",GO:"go",RUBY:"ruby",CSHARP:"csharp",SWIFT:"swift",PHP:"php",RUST:"rust",CLI:"cli"}});function Itl(e){return e==null||!("auto-merge"in e)||e["auto-merge"]!==!0?!1:e.mode==="pull-request"}var vtl=h(()=>{"use strict"});function Ctl(e){return typeof e!="string"&&"proto"in e}var xtl=h(()=>{"use strict"});function Stl({rootAutomation:e,groupAutomation:t,generatorAutomation:r}){return{generate:r?.generate??t?.generate??e?.generate??Czr.generate,upgrade:r?.upgrade??t?.upgrade??e?.upgrade??Czr.upgrade,preview:r?.preview??t?.preview??e?.preview??Czr.preview,verify:r?.verify??t?.verify??e?.verify??Czr.verify}}var Czr,wtl=h(()=>{"use strict";Czr={generate:!0,upgrade:!0,preview:!0,verify:!0}});var Ttl=h(()=>{"use strict"});var Otl=h(()=>{"use strict"});var Ptl,Btl=h(()=>{"use strict";Ptl={Openai:"openai",Anthropic:"anthropic",AwsBedrock:"aws-bedrock"}});var KSo=h(()=>{"use strict";Ttl();Otl();Btl()});var JSo={};ne(JSo,{ModelProvider:()=>Ptl});var Dtl=h(()=>{"use strict";KSo()});var Rtl=h(()=>{"use strict"});var YSo=h(()=>{"use strict";Rtl()});var ktl={};var Ftl=h(()=>{"use strict";YSo()});var Ntl=h(()=>{"use strict"});var jtl=h(()=>{"use strict"});var ztl=h(()=>{"use strict"});var Qtl=h(()=>{"use strict"});var Mtl=h(()=>{"use strict"});var Ltl=h(()=>{"use strict"});var _tl=h(()=>{"use strict"});var Utl=h(()=>{"use strict"});var Vtl=h(()=>{"use strict"});var Gtl=h(()=>{"use strict"});var qtl=h(()=>{"use strict"});var Wtl=h(()=>{"use strict"});var Htl=h(()=>{"use strict"});var Ktl,Jtl=h(()=>{"use strict";Ktl={ApiKey:"api-key",RefreshToken:"refresh-token"}});var Ytl=h(()=>{"use strict"});var Xtl=h(()=>{"use strict"});var Ztl=h(()=>{"use strict"});var $tl=h(()=>{"use strict"});var erl=h(()=>{"use strict"});var trl,rrl=h(()=>{"use strict";trl={ClientCredentials:"client-credentials",AuthorizationCode:"authorization-code",DeviceCode:"device-code"}});var nrl=h(()=>{"use strict"});var irl=h(()=>{"use strict"});var orl=h(()=>{"use strict"});var srl=h(()=>{"use strict"});var arl=h(()=>{"use strict"});var crl=h(()=>{"use strict"});var lrl=h(()=>{"use strict"});var url=h(()=>{"use strict"});var prl=h(()=>{"use strict"});var frl=h(()=>{"use strict"});var drl=h(()=>{"use strict"});var XSo=h(()=>{"use strict";Ntl();jtl();ztl();Qtl();Mtl();Ltl();_tl();Utl();Vtl();Gtl();qtl();Wtl();Htl();Jtl();Ytl();Xtl();Ztl();$tl();erl();rrl();nrl();irl();orl();srl();arl();crl();lrl();url();prl();frl();drl()});var ZSo={};ne(ZSo,{InferredAuthTypeSchema:()=>Ktl,OAuthFlowTypeSchema:()=>trl});var mrl=h(()=>{"use strict";XSo()});var hrl=h(()=>{"use strict"});var grl,Arl=h(()=>{"use strict";grl={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available"}});var yrl=h(()=>{"use strict"});var $So=h(()=>{"use strict";hrl();Arl();yrl()});var ewo={};ne(ewo,{AvailabilityStatusSchema:()=>grl});var brl=h(()=>{"use strict";$So()});var Erl=h(()=>{"use strict"});var Irl=h(()=>{"use strict"});var vrl=h(()=>{"use strict"});var Crl=h(()=>{"use strict"});var two=h(()=>{"use strict";Erl();Irl();vrl();Crl()});var xrl={};var Srl=h(()=>{"use strict";two()});var wrl=h(()=>{"use strict"});var Trl=h(()=>{"use strict"});var rwo=h(()=>{"use strict";wrl();Trl()});var Orl={};var Prl=h(()=>{"use strict";rwo()});var Brl=h(()=>{"use strict"});var Drl=h(()=>{"use strict"});var Rrl=h(()=>{"use strict"});var krl=h(()=>{"use strict"});var Frl=h(()=>{"use strict"});var nwo=h(()=>{"use strict";Brl();Drl();Rrl();krl();Frl()});var Nrl={};var jrl=h(()=>{"use strict";nwo()});var zrl=h(()=>{"use strict"});var iwo=h(()=>{"use strict";zrl()});var Qrl={};var Mrl=h(()=>{"use strict";iwo()});var Lrl=h(()=>{"use strict"});var _rl=h(()=>{"use strict"});var Url=h(()=>{"use strict"});var owo=h(()=>{"use strict";Lrl();_rl();Url()});var Vrl={};var Grl=h(()=>{"use strict";owo()});var qrl=h(()=>{"use strict"});var Wrl=h(()=>{"use strict"});var swo=h(()=>{"use strict";qrl();Wrl()});var Hrl={};var Krl=h(()=>{"use strict";swo()});var Jrl=h(()=>{"use strict"});var Yrl=h(()=>{"use strict"});var Xrl=h(()=>{"use strict"});var Zrl=h(()=>{"use strict"});var $rl=h(()=>{"use strict"});var awo=h(()=>{"use strict";Jrl();Yrl();Xrl();Zrl();$rl()});var enl={};var tnl=h(()=>{"use strict";awo()});var rnl=h(()=>{"use strict";mrl();XSo();brl();$So();Srl();two();Prl();rwo();jrl();nwo();Mrl();iwo();Grl();owo();Krl();swo();tnl();awo()});var cwo={};ne(cwo,{AvailabilityStatusSchema:()=>grl,InferredAuthTypeSchema:()=>Ktl,OAuthFlowTypeSchema:()=>trl,auth:()=>ZSo,availability:()=>ewo,commons:()=>xrl,encoding:()=>Orl,environments:()=>Nrl,file:()=>Qrl,service:()=>Vrl,types:()=>Hrl,validation:()=>enl});var nnl=h(()=>{"use strict";rnl()});var inl=h(()=>{"use strict"});var onl=h(()=>{"use strict"});var snl=h(()=>{"use strict"});var anl=h(()=>{"use strict"});var cnl=h(()=>{"use strict"});var lnl=h(()=>{"use strict"});var unl=h(()=>{"use strict"});var pnl=h(()=>{"use strict"});var fnl=h(()=>{"use strict"});var dnl=h(()=>{"use strict"});var mnl=h(()=>{"use strict"});var hnl=h(()=>{"use strict"});var gnl=h(()=>{"use strict"});var Anl,ynl=h(()=>{"use strict";Anl={Literals:"literals",Enums:"enums",EnumsCoerceableToLiterals:"enums-coerceable-to-literals"}});var bnl=h(()=>{"use strict"});var Enl,Inl=h(()=>{"use strict";Enl={Int32:"int32",Int64:"int64",Uint32:"uint32",Uint64:"uint64"}});var vnl,Cnl=h(()=>{"use strict";vnl={Minimal:"minimal",Comprehensive:"comprehensive"}});var xnl,Snl=h(()=>{"use strict";xnl={Form:"form",Json:"json"}});var wnl=h(()=>{"use strict"});var Tnl=h(()=>{"use strict"});var Onl=h(()=>{"use strict"});var Pnl=h(()=>{"use strict"});var Bnl=h(()=>{"use strict"});var Dnl=h(()=>{"use strict"});var Rnl,knl=h(()=>{"use strict";Rnl={Java:"java",Python:"python",Go:"go",Ruby:"ruby",Csharp:"csharp",Typescript:"typescript",Php:"php",Rust:"rust",Swift:"swift"}});var Fnl,Nnl=h(()=>{"use strict";Fnl={V1:"v1",V2:"v2"}});var jnl,znl=h(()=>{"use strict";jnl={EnvironmentPerServer:"environment-per-server",UrlsPerEnvironment:"urls-per-environment"}});var Qnl=h(()=>{"use strict"});var Mnl,Lnl=h(()=>{"use strict";Mnl={All:"all",Untyped:"untyped"}});var _nl=h(()=>{"use strict"});var Unl,Vnl=h(()=>{"use strict";Unl={Get:"get",Post:"post",Put:"put",Patch:"patch",Delete:"delete",Head:"head",Options:"options",Trace:"trace"}});var Gnl=h(()=>{"use strict"});var qnl=h(()=>{"use strict"});var Wnl=h(()=>{"use strict"});var Hnl=h(()=>{"use strict"});var Knl=h(()=>{"use strict"});var Jnl=h(()=>{"use strict"});var Ynl=h(()=>{"use strict"});var Xnl=h(()=>{"use strict"});var Znl=h(()=>{"use strict"});var $nl=h(()=>{"use strict"});var eil,til=h(()=>{"use strict";eil={UrlOrder:"url-order",SpecOrder:"spec-order"}});var ril=h(()=>{"use strict"});var nil=h(()=>{"use strict"});var iil=h(()=>{"use strict"});var oil=h(()=>{"use strict"});var sil=h(()=>{"use strict"});var ail=h(()=>{"use strict"});var cil=h(()=>{"use strict"});var lil,uil=h(()=>{"use strict";lil={Always:"always",Never:"never"}});var pil=h(()=>{"use strict"});var fil=h(()=>{"use strict"});var dil=h(()=>{"use strict"});var mil=h(()=>{"use strict"});var hil=h(()=>{"use strict"});var gil=h(()=>{"use strict"});var Ail,yil=h(()=>{"use strict";Ail={V1:"v1"}});var bil=h(()=>{"use strict"});var Eil=h(()=>{"use strict"});var lwo=h(()=>{"use strict";inl();onl();snl();anl();cnl();lnl();unl();pnl();fnl();dnl();mnl();hnl();gnl();ynl();bnl();Inl();Cnl();Snl();wnl();Tnl();Onl();Pnl();Bnl();Dnl();knl();Nnl();znl();Qnl();Lnl();_nl();Vnl();Gnl();qnl();Wnl();Hnl();Knl();Jnl();Ynl();Xnl();Znl();$nl();til();ril();nil();iil();oil();sil();ail();cil();uil();pil();fil();dil();mil();hil();gil();yil();bil();Eil()});var uwo={};ne(uwo,{CoerceConstsTo:()=>Anl,DefaultIntegerFormat:()=>Enl,ExampleStyle:()=>vnl,FormParameterEncoding:()=>xnl,Language:()=>Rnl,MessageNamingSettingsSchema:()=>Fnl,MultiServerStrategy:()=>jnl,OpenApiErrorResponsesApplyTo:()=>Mnl,OpenApiErrorResponsesHttpMethod:()=>Unl,PathParameterOrder:()=>eil,RemoveDiscriminantsFromSchemas:()=>lil,UnionSettingsSchema:()=>Ail});var Iil=h(()=>{"use strict";lwo()});var vil=h(()=>{"use strict"});var Cil=h(()=>{"use strict"});var xil=h(()=>{"use strict"});var Sil=h(()=>{"use strict"});var wil=h(()=>{"use strict"});var Til=h(()=>{"use strict"});var Oil=h(()=>{"use strict"});var Pil=h(()=>{"use strict"});var Bil=h(()=>{"use strict"});var Dil=h(()=>{"use strict"});var Ril=h(()=>{"use strict"});var kil,Fil=h(()=>{"use strict";kil={Commit:"commit",Release:"release"}});var Nil=h(()=>{"use strict"});var jil=h(()=>{"use strict"});var zil=h(()=>{"use strict"});var Qil=h(()=>{"use strict"});var Mil,Lil=h(()=>{"use strict";Mil={PullRequest:"pull-request",Push:"push",CommitAndRelease:"commit-and-release"}});var _il=h(()=>{"use strict"});var Uil=h(()=>{"use strict"});var Vil=h(()=>{"use strict"});var Gil=h(()=>{"use strict"});var qil=h(()=>{"use strict"});var Wil=h(()=>{"use strict"});var Hil=h(()=>{"use strict"});var Kil=h(()=>{"use strict"});var Jil=h(()=>{"use strict"});var Yil=h(()=>{"use strict"});var pwo=h(()=>{"use strict";vil();Cil();xil();Sil();wil();Til();Oil();Pil();Bil();Dil();Ril();Fil();Nil();jil();zil();Qil();Lil();_il();Uil();Vil();Gil();qil();Wil();Hil();Kil();Jil();Yil()});var fwo={};ne(fwo,{GithubCommitAndReleaseMode:()=>kil,GithubSelfhostedMode:()=>Mil});var Xil=h(()=>{"use strict";pwo()});var Zil=h(()=>{"use strict"});var $il=h(()=>{"use strict"});var eol,tol=h(()=>{"use strict";eol={Mit:"MIT",Apache:"Apache-2.0"}});var dwo=h(()=>{"use strict";Zil();$il();tol()});var mwo={};ne(mwo,{GithubLicenseType:()=>eol});var rol=h(()=>{"use strict";dwo()});var nol=h(()=>{"use strict"});var hwo=h(()=>{"use strict";nol()});var iol={};var ool=h(()=>{"use strict";hwo()});var sol=h(()=>{"use strict"});var aol=h(()=>{"use strict"});var gwo=h(()=>{"use strict";sol();aol()});var col={};var lol=h(()=>{"use strict";gwo()});var uol=h(()=>{"use strict";Dtl();KSo();Ftl();YSo();nnl();Iil();lwo();Xil();pwo();rol();dwo();ool();hwo();lol();gwo()});var pol=h(()=>{"use strict";uol()});var $fe,fol,Awo,ywo,D80,dol=h(()=>{"use strict";$fe={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},fol={[$fe.Debug]:1,[$fe.Info]:2,[$fe.Warn]:3,[$fe.Error]:4},Awo=class{debug(t,...r){console.debug(t,...r)}info(t,...r){console.info(t,...r)}warn(t,...r){console.warn(t,...r)}error(t,...r){console.error(t,...r)}},ywo=class{level;logger;silent;constructor(t){this.level=fol[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=fol[t]}isDebug(){return this.shouldLog($fe.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog($fe.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog($fe.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog($fe.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},D80=new ywo({level:$fe.Info,logger:new Awo,silent:!0})});var mol=h(()=>{"use strict"});var hol=h(()=>{"use strict";dol()});var gol=h(()=>{"use strict"});var $l,lw=h(()=>{"use strict";$l={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",NEVER:"never",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"}});function ym(e,t){return`Expected ${t}. Received ${dGd(e)}.`}function dGd(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}var XF=h(()=>{"use strict"});function Y1(e){return{...e,json:Aol(e.json),parse:Aol(e.parse)}}function Aol(e){return(t,r)=>{let n=e(t,r),{skipValidation:i=!1}=r??{};return!n.ok&&i?(console.warn(["Failed to validate.",...n.errors.map(o=>" - "+(o.path.length>0?`${o.path.join(".")}: ${o.message}`:o.message))].join(`
|
|
256
256
|
`)),{ok:!0,value:t}):n}}var qee=h(()=>{"use strict"});function xzr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var bwo=h(()=>{"use strict"});var ont,Ewo=h(()=>{"use strict";bwo();ont=class extends Error{errors;constructor(t){super(t.map(xzr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var snt,Iwo=h(()=>{"use strict";bwo();snt=class extends Error{errors;constructor(t){super(t.map(xzr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function Zm(e){return{nullable:()=>mGd(e),optional:()=>vwo(e),optionalNullable:()=>hGd(e),transform:t=>Cwo(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new snt(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new ont(n.errors)}}}function mGd(e){let t={parse:(r,n)=>r==null?{ok:!0,value:null}:e.parse(r,n),json:(r,n)=>r==null?{ok:!0,value:null}:e.json(r,n),getType:()=>$l.NULLABLE};return{...t,...Zm(t)}}function vwo(e){let t={parse:(r,n)=>r==null?{ok:!0,value:void 0}:e.parse(r,n),json:(r,n)=>n?.omitUndefined&&r===void 0?{ok:!0,value:void 0}:r==null?{ok:!0,value:null}:e.json(r,n),getType:()=>$l.OPTIONAL};return{...t,...Zm(t)}}function hGd(e){let t={parse:(r,n)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.parse(r,n),json:(r,n)=>r===void 0?{ok:!0,value:void 0}:r===null?{ok:!0,value:null}:e.json(r,n),getType:()=>$l.OPTIONAL_NULLABLE};return{...t,...Zm(t)}}function Cwo(e,t){let r={parse:(n,i)=>{let o=e.parse(n,i);return o.ok?{ok:!0,value:t.transform(o.value)}:o},json:(n,i)=>{let o=t.untransform(n);return e.json(o,i)},getType:()=>e.getType()};return{...r,...Zm(r)}}var yol=h(()=>{"use strict";lw();Ewo();Iwo()});var eQ=h(()=>{"use strict";yol();Ewo();Iwo()});function bol(){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:ym(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:ym(t,"bigint")}]}:{ok:!0,value:t},getType:()=>$l.BIGINT};return{...Y1(e),...Zm(e)}}var Eol=h(()=>{"use strict";lw();XF();qee();eQ()});var Iol=h(()=>{"use strict";Eol()});function vol(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:ym(t,"string")}]}:gGd.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:ym(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:ym(t,"Date object")}]},getType:()=>$l.DATE};return{...Y1(e),...Zm(e)}}var gGd,Col=h(()=>{"use strict";lw();XF();qee();eQ();gGd=/^([+-]?\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)?)?)?)?$/});var xol=h(()=>{"use strict";Col()});function X1(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...Y1(r),...Zm(r)}}}var Wee=h(()=>{"use strict";eQ();qee()});function Szr(e){let t=new Set(e);return X1($l.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:ym(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:ym(n,"enum")}]}:{ok:!0,value:n})()}var Sol=h(()=>{"use strict";lw();Wee();XF()});var xwo=h(()=>{"use strict";Sol()});function wol(e){let t=Swo(e);return{...t,...Zm(t)}}function Swo(e){return{parse:(t,r)=>ant(e).parse(t,r),json:(t,r)=>ant(e).json(t,r),getType:()=>ant(e).getType()}}function ant(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var wwo=h(()=>{"use strict";eQ()});function Two(e){return Object.entries(e)}var Tol=h(()=>{"use strict"});function Y3t(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var Owo=h(()=>{"use strict"});function ede(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var X3t=h(()=>{"use strict"});function Z3t(e){return Object.keys(e)}var Pwo=h(()=>{"use strict"});function Ool(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var Pol=h(()=>{"use strict"});function qH(e){return{withParsedProperties:t=>Bwo(e,t)}}function Bwo(e,t){let r={parse:(n,i)=>{let o=e.parse(n,i);if(!o.ok)return o;let s={};for(let a in t)if(AGd.call(t,a)){let c=t[a];s[a]=typeof c=="function"?c(o.value):c}return{ok:!0,value:{...o.value,...s}}},json:(n,i)=>{if(!ede(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:ym(n,"object")}]};let o=new Set(Object.keys(t)),s=Y3t(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Zm(r),...qH(r)}}var AGd,Bol=h(()=>{"use strict";Owo();XF();X3t();eQ();AGd=Object.prototype.hasOwnProperty});var $3t=h(()=>{"use strict";Bol()});function Dol(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function tde(e){return e.isProperty}var Dwo=h(()=>{"use strict"});function wzr(e){let t;function r(){if(t==null){t={};for(let[d,f]of Two(e)){let m=tde(f)?f.rawKey:d,g=tde(f)?f.valueSchema:f;t[m]={rawKey:m,parsedKey:d,valueSchema:g}}}return t}let n,i,o,s;function a(){if(n==null){n=[],i=[];for(let[d,f]of Two(e)){let m=tde(f)?f.rawKey:d,g=tde(f)?f.valueSchema:f;bGd(g)&&(n.push(m),i.push(d))}o=new Set(n),s=new Set(i)}return n}function c(){return i==null&&a(),i}function l(){return o==null&&a(),o}function u(){return s==null&&a(),s}let p={_getRawProperties:()=>Object.entries(e).map(([d,f])=>tde(f)?f.rawKey:d),_getParsedProperties:()=>Z3t(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return Rol({value:d,requiredKeys:a(),requiredKeysSet:l(),getProperty:g=>{let A=r()[g];if(A!=null)return{transformedKey:A.parsedKey,transform:b=>{let I=[...m,g];return A.valueSchema.parse(b,{...f,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},json:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return Rol({value:d,requiredKeys:c(),requiredKeysSet:u(),getProperty:g=>{let A=e[g];if(A!=null)return tde(A)?{transformedKey:A.rawKey,transform:b=>{let I=[...m,g];return A.valueSchema.json(b,{...f,breadcrumbsPrefix:I})}}:{transformedKey:g,transform:b=>{let I=[...m,g];return A.json(b,{...f,breadcrumbsPrefix:I})}}},unrecognizedObjectKeys:f?.unrecognizedObjectKeys,skipValidation:f?.skipValidation,breadcrumbsPrefix:m,omitUndefined:f?.omitUndefined})},getType:()=>$l.OBJECT};return{...Y1(p),...Zm(p),...qH(p),...y3e(p)}}function Rol({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!ede(e))return{ok:!1,errors:[{path:s,message:ym(e,"object")}]};let a=t.length,c=[],l={};for(let u in e){if(!yGd.call(e,u))continue;let p=e[u],d=n(u);if(d!=null){a>0&&r.has(u)&&a--;let f=d.transform(p);f.ok?l[d.transformedKey]=f.value:(l[u]=p,c.push(...f.errors))}else switch(i){case"fail":c.push({path:[...s,u],message:`Unexpected key "${u}"`});break;case"strip":break;case"passthrough":l[u]=p;break}}if(a>0)for(let u of t)u in e||c.push({path:s,message:`Missing required key "${u}"`});return c.length===0||o?{ok:!0,value:l}:{ok:!1,errors:c}}function y3e(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>kol({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>kol({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>$l.OBJECT};return{...r,...Zm(r),...qH(r),...y3e(r)}},passthrough:()=>{let t=new Set(e._getRawProperties()),r=new Set(e._getParsedProperties()),n={_getParsedProperties:()=>e._getParsedProperties(),_getRawProperties:()=>e._getRawProperties(),parse:(i,o)=>{let s=e.parse(i,{...o,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let a={};if(typeof i=="object"&&i!=null)for(let[c,l]of Object.entries(i))t.has(c)||(a[c]=l);return{ok:!0,value:{...a,...s.value}}},json:(i,o)=>{let s=e.json(i,{...o,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let a={};if(typeof i=="object"&&i!=null)for(let[c,l]of Object.entries(i))r.has(c)||(a[c]=l);return{ok:!0,value:{...a,...s.value}}},getType:()=>$l.OBJECT};return{...n,...Zm(n),...qH(n),...y3e(n)}}}}function kol({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!ede(t))return{ok:!1,errors:[{path:i,message:ym(t,"object")}]};let o=new Set(e),[s,a]=Ool(Z3t(t),u=>o.has(u)),c=r(Y3t(t,a)),l=n(Y3t(t,s));return c.ok&&l.ok?{ok:!0,value:{...c.value,...l.value}}:{ok:!1,errors:[...c.ok?[]:c.errors,...l.ok?[]:l.errors]}}function bGd(e){return!EGd(e)}function EGd(e){switch(e.getType()){case $l.ANY:case $l.UNKNOWN:case $l.OPTIONAL:case $l.OPTIONAL_NULLABLE:return!0;default:return!1}}var yGd,Rwo=h(()=>{"use strict";lw();Tol();Owo();XF();X3t();Pwo();qee();Pol();$3t();eQ();Dwo();yGd=Object.prototype.hasOwnProperty});function Fol(e){return wzr(e)}var Nol=h(()=>{"use strict";Rwo()});var kwo=h(()=>{"use strict";Rwo();Nol();Dwo()});function jol(e){let t={...Swo(e),_getRawProperties:()=>ant(e)._getRawProperties(),_getParsedProperties:()=>ant(e)._getParsedProperties()};return{...t,...Zm(t),...qH(t),...y3e(t)}}var zol=h(()=>{"use strict";kwo();$3t();eQ();wwo()});var Qol=h(()=>{"use strict";wwo();zol()});function Tzr(e){let t={parse:(r,n)=>Mol(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>Mol(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>$l.LIST};return{...Y1(t),...Zm(t)}}function Mol(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:ym(e,"list"),path:[]}]};let r=[],n=[];for(let i=0;i<e.length;i++){let o=t(e[i],i);o.ok?r.push(o.value):n.push(...o.errors)}return n.length===0?{ok:!0,value:r}:{ok:!1,errors:n}}var Lol=h(()=>{"use strict";lw();XF();qee();eQ()});var Fwo=h(()=>{"use strict";Lol()});function _ol(e){return X1($l.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:ym(r,`${e.toString()}`)}]})()}var Uol=h(()=>{"use strict";lw();Wee();XF()});function Vol(e){return X1($l.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:ym(r,`"${e}"`)}]})()}var Gol=h(()=>{"use strict";lw();Wee();XF()});var qol=h(()=>{"use strict";Uol();Gol()});var Wol,Hol=h(()=>{"use strict";lw();Wee();Wol=X1($l.ANY,e=>({ok:!0,value:e}))});var Kol,Jol=h(()=>{"use strict";lw();Wee();XF();Kol=X1($l.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:ym(e,"boolean")}]})});var Yol,Xol=h(()=>{"use strict";lw();Wee();Yol=X1($l.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var Zol,$ol=h(()=>{"use strict";lw();Wee();XF();Zol=X1($l.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:ym(e,"number")}]})});var esl,tsl=h(()=>{"use strict";lw();Wee();XF();esl=X1($l.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:ym(e,"string")}]})});var rsl,nsl=h(()=>{"use strict";lw();Wee();rsl=X1($l.UNKNOWN,e=>({ok:!0,value:e}))});var isl=h(()=>{"use strict";Hol();Jol();Xol();$ol();tsl();nsl()});function ssl(e,t){let r={parse:(n,i)=>osl({value:n,isKeyNumeric:e.getType()===$l.NUMBER,transformKey:o=>e.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.parse(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>osl({value:n,isKeyNumeric:e.getType()===$l.NUMBER,transformKey:o=>e.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${o} (key)`]}),transformValue:(o,s)=>t.json(o,{...i,breadcrumbsPrefix:[...i?.breadcrumbsPrefix??[],`${s}`]}),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>$l.RECORD};return{...Y1(r),...Zm(r)}}function osl({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!ede(e))return{ok:!1,errors:[{path:i,message:ym(e,"object")}]};let o={},s=[];for(let a in e){if(!IGd.call(e,a))continue;let c=e[a];if(c===void 0)continue;let l=a;if(t){let d=a.length>0?Number(a):NaN;Number.isNaN(d)||(l=d)}let u=r(l),p=n(c,l);u.ok&&p.ok?o[u.value]=p.value:(u.ok||s.push(...u.errors),p.ok||s.push(...p.errors))}return s.length===0?{ok:!0,value:o}:{ok:!1,errors:s}}var IGd,asl=h(()=>{"use strict";lw();XF();X3t();qee();eQ();IGd=Object.prototype.hasOwnProperty});var csl=h(()=>{"use strict";asl()});function lsl(e){let t=Tzr(e),r={parse:(n,i)=>{let o=t.parse(n,i);return o.ok?{ok:!0,value:new Set(o.value)}:o},json:(n,i)=>n instanceof Set?t.json([...n],i):{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:ym(n,"Set")}]},getType:()=>$l.SET};return{...Y1(r),...Zm(r)}}var usl=h(()=>{"use strict";lw();XF();qee();Fwo();eQ()});var psl=h(()=>{"use strict";usl()});function dsl(e){let t={parse:(r,n)=>fsl((i,o)=>i.parse(r,o),e,n),json:(r,n)=>fsl((i,o)=>i.json(r,o),e,n),getType:()=>$l.UNDISCRIMINATED_UNION};return{...Y1(t),...Zm(t)}}function fsl(e,t,r){let n=[];for(let[i,o]of t.entries()){let s=e(o,{...r,skipValidation:!1});if(s.ok)return s;for(let a of s.errors)n.push({path:a.path,message:`[Variant ${i}] ${a.message}`})}return{ok:!1,errors:n}}var msl=h(()=>{"use strict";lw();qee();eQ()});var hsl=h(()=>{"use strict";msl()});function gsl(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var Asl=h(()=>{"use strict"});function bsl(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=Szr(Z3t(t)),o={parse:(s,a)=>ysl({value:s,discriminant:r,transformedDiscriminant:n,transformDiscriminantValue:c=>i.parse(c,{allowUnrecognizedEnumValues:a?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...a?.breadcrumbsPrefix??[],r]}),getAdditionalPropertiesSchema:c=>t[c],allowUnrecognizedUnionMembers:a?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(c,l)=>l.parse(c,a),breadcrumbsPrefix:a?.breadcrumbsPrefix}),json:(s,a)=>ysl({value:s,discriminant:n,transformedDiscriminant:r,transformDiscriminantValue:c=>i.json(c,{allowUnrecognizedEnumValues:a?.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...a?.breadcrumbsPrefix??[],n]}),getAdditionalPropertiesSchema:c=>t[c],allowUnrecognizedUnionMembers:a?.allowUnrecognizedUnionMembers,transformAdditionalProperties:(c,l)=>l.json(c,a),breadcrumbsPrefix:a?.breadcrumbsPrefix}),getType:()=>$l.UNION};return{...Y1(o),...Zm(o),...qH(o)}}function ysl({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!ede(e))return{ok:!1,errors:[{path:a,message:ym(e,"object")}]};let c=e[t],l={};for(let f in e)vGd.call(e,f)&&f!==t&&(l[f]=e[f]);if(c==null)return{ok:!1,errors:[{path:a,message:`Missing discriminant ("${t}")`}]};let u=n(c);if(!u.ok)return{ok:!1,errors:u.errors};let p=i(u.value);if(p==null)return o?{ok:!0,value:{[r]:u.value,...l}}:{ok:!1,errors:[{path:[...a,t],message:"Unexpected discriminant value"}]};let d=s(l,p);return d.ok?{ok:!0,value:{[r]:c,...d.value}}:d}var vGd,Esl=h(()=>{"use strict";lw();XF();X3t();Pwo();qee();xwo();$3t();eQ();vGd=Object.prototype.hasOwnProperty});var Isl=h(()=>{"use strict";Asl();Esl()});var vsl=h(()=>{"use strict";Iol();xol();xwo();Qol();Fwo();qol();kwo();$3t();isl();csl();eQ();psl();hsl();Isl()});var ve={};ne(ve,{JsonError:()=>ont,ParseError:()=>snt,any:()=>Wol,bigint:()=>bol,boolean:()=>Kol,booleanLiteral:()=>_ol,date:()=>vol,discriminant:()=>gsl,enum_:()=>Szr,getObjectLikeUtils:()=>qH,getObjectUtils:()=>y3e,getSchemaUtils:()=>Zm,isProperty:()=>tde,lazy:()=>wol,lazyObject:()=>jol,list:()=>Tzr,never:()=>Yol,number:()=>Zol,object:()=>wzr,objectWithoutOptionalProperties:()=>Fol,optional:()=>vwo,property:()=>Dol,record:()=>ssl,set:()=>lsl,string:()=>esl,stringLiteral:()=>Vol,transform:()=>Cwo,undiscriminatedUnion:()=>dsl,union:()=>bsl,unknown:()=>rsl,withParsedProperties:()=>Bwo});var Csl=h(()=>{"use strict";vsl()});var xsl=h(()=>{"use strict"});var _r=h(()=>{"use strict";mol();hol();gol();Csl();xsl()});var Ozr,Nwo=h(()=>{"use strict";_r();Ozr=ve.string()});var Pzr,jwo=h(()=>{"use strict";_r();Pzr=ve.enum_(["openai","anthropic","aws-bedrock"])});var Bzr,zwo=h(()=>{"use strict";_r();Nwo();jwo();Bzr=ve.object({provider:Pzr,model:Ozr})});var Qwo=h(()=>{"use strict";zwo();Nwo();jwo()});var Mwo={};ne(Mwo,{AiServicesSchema:()=>Bzr,ModelName:()=>Ozr,ModelProvider:()=>Pzr});var Ssl=h(()=>{"use strict";Qwo()});var Hve,e_t=h(()=>{"use strict";_r();Hve=ve.object({generate:ve.boolean().optional(),upgrade:ve.boolean().optional(),preview:ve.boolean().optional(),verify:ve.boolean().optional()})});var Lwo=h(()=>{"use strict";e_t()});var _wo={};ne(_wo,{AutomationSchema:()=>Hve});var wsl=h(()=>{"use strict";Lwo()});var PE,m3=h(()=>{"use strict";_r();PE=ve.object({docs:ve.string().optional()})});var cnt,Dzr=h(()=>{"use strict";_r();m3();cnt=ve.object({scheme:ve.string()}).extend(PE)});var Rzr,Uwo=h(()=>{"use strict";_r();Dzr();Rzr=ve.undiscriminatedUnion([ve.string(),cnt])});var kzr,Vwo=h(()=>{"use strict";_r();m3();Uwo();kzr=ve.object({any:ve.list(Rzr)}).extend(PE)});var Fzr,Gwo=h(()=>{"use strict";_r();Fzr=ve.object({})});var Nzr,qwo=h(()=>{"use strict";_r();m3();Gwo();Nzr=ve.object({"endpoint-security":Fzr}).extend(PE)});var lnt,jzr=h(()=>{"use strict";_r();Vwo();Dzr();qwo();lnt=ve.undiscriminatedUnion([ve.string(),cnt,kzr,Nzr])});var Kve,t_t=h(()=>{"use strict";_r();Kve=ve.object({name:ve.string().optional()})});var unt,zzr=h(()=>{"use strict";_r();unt=ve.object({env:ve.string().optional()})});var b3e,Qzr=h(()=>{"use strict";_r();t_t();zzr();b3e=ve.object({omit:ve.boolean().optional()}).extend(unt).extend(Kve)});var n5,E3e=h(()=>{"use strict";_r();n5=ve.object({"playground-docs":ve.string().optional()})});var Mzr,Wwo=h(()=>{"use strict";_r();m3();Qzr();E3e();Mzr=ve.object({scheme:ve.stringLiteral("basic"),username:b3e.optional(),password:b3e.optional()}).extend(PE).extend(n5)});var Lzr,Hwo=h(()=>{"use strict";_r();Lzr=ve.enum_(["api-key","refresh-token"])});var _zr,Kwo=h(()=>{"use strict";_r();_zr=ve.object({"response-property":ve.string(),"header-name":ve.string(),"value-prefix":ve.string().optional()})});var Uzr,Jwo=h(()=>{"use strict";_r();Kwo();Uzr=ve.object({endpoint:ve.string(),"expiry-response-property":ve.string().optional(),"authenticated-request-headers":ve.list(_zr).optional()})});var Vzr,Ywo=h(()=>{"use strict";_r();Jwo();Vzr=ve.undiscriminatedUnion([ve.string(),Uzr])});var Gzr,Xwo=h(()=>{"use strict";_r();m3();Hwo();Ywo();E3e();Gzr=ve.object({scheme:ve.stringLiteral("bearer"),"get-token":Vzr,type:Lzr.optional()}).extend(PE).extend(n5)});var qzr,Zwo=h(()=>{"use strict";_r();m3();Qzr();E3e();qzr=ve.object({scheme:ve.stringLiteral("bearer"),token:b3e.optional()}).extend(PE).extend(n5)});var Wzr,$wo=h(()=>{"use strict";_r();Xwo();Zwo();Wzr=ve.undiscriminatedUnion([qzr,Gzr])});var Hzr,e1o=h(()=>{"use strict";_r();m3();t_t();zzr();E3e();Hzr=ve.object({header:ve.string(),type:ve.string().optional(),prefix:ve.string().optional()}).extend(unt).extend(Kve).extend(PE).extend(n5)});var Kzr,t1o=h(()=>{"use strict";_r();Kzr=ve.string()});var Jzr,r1o=h(()=>{"use strict";_r();Jzr=ve.enum_(["client-credentials","authorization-code","device-code"])});var Yzr,n1o=h(()=>{"use strict";_r();Yzr=ve.object({"client-id":ve.string().optional(),"client-secret":ve.string().optional(),scopes:ve.string().optional()})});var Xzr,i1o=h(()=>{"use strict";_r();Xzr=ve.object({"access-token":ve.string().optional(),"expires-in":ve.string().optional(),"refresh-token":ve.string().optional()})});var Zzr,o1o=h(()=>{"use strict";_r();n1o();i1o();Zzr=ve.object({endpoint:ve.string(),"request-properties":Yzr.optional(),"response-properties":Xzr.optional()})});var $zr,s1o=h(()=>{"use strict";_r();$zr=ve.object({method:ve.string().optional()})});var eQr,a1o=h(()=>{"use strict";_r();eQr=ve.object({"refresh-token":ve.string()})});var tQr,c1o=h(()=>{"use strict";_r();tQr=ve.object({"access-token":ve.string().optional(),"expires-in":ve.string().optional(),"refresh-token":ve.string().optional()})});var rQr,l1o=h(()=>{"use strict";_r();a1o();c1o();rQr=ve.object({endpoint:ve.string(),"request-properties":eQr.optional(),"response-properties":tQr.optional()})});var nQr,u1o=h(()=>{"use strict";_r();nQr=ve.object({url:ve.string(),ports:ve.list(ve.number()).optional()})});var iQr,p1o=h(()=>{"use strict";_r();u1o();iQr=ve.undiscriminatedUnion([ve.string(),nQr])});var oQr,f1o=h(()=>{"use strict";_r();m3();t1o();r1o();o1o();s1o();l1o();p1o();E3e();oQr=ve.object({scheme:ve.stringLiteral("oauth"),type:Jzr,scopes:ve.list(Kzr).optional(),"token-prefix":ve.string().optional(),"token-header":ve.string().optional(),"client-id-env":ve.string().optional(),"client-secret-env":ve.string().optional(),"get-token":Zzr.optional(),"refresh-token":rQr.optional(),"client-id":ve.string().optional(),"authorization-url":ve.string().optional(),"device-authorization-url":ve.string().optional(),"token-url":ve.string().optional(),"refresh-url":ve.string().optional(),"redirect-uri":iQr.optional(),"success-redirect-url":ve.string().optional(),"error-redirect-url":ve.string().optional(),pkce:$zr.optional(),"authorization-parameters":ve.record(ve.string(),ve.string()).optional(),"device-authorization-parameters":ve.record(ve.string(),ve.string()).optional(),"token-parameters":ve.record(ve.string(),ve.string()).optional(),"refresh-parameters":ve.record(ve.string(),ve.string()).optional()}).extend(PE).extend(n5)});var Jve,r_t=h(()=>{"use strict";_r();Wwo();$wo();e1o();f1o();Jve=ve.undiscriminatedUnion([oQr,Hzr,Mzr,Wzr])});var d1o=h(()=>{"use strict";Uwo();Vwo();jzr();r_t();Dzr();t1o();Qzr();Wwo();$wo();qwo();Gwo();e1o();Kwo();Hwo();Xwo();Ywo();Jwo();n1o();i1o();r1o();o1o();s1o();l1o();a1o();c1o();f1o();p1o();u1o();Zwo();zzr();E3e()});var m1o={};ne(m1o,{AnyAuthItem:()=>Rzr,AnyAuthSchemesSchema:()=>kzr,ApiAuthSchema:()=>lnt,AuthSchemeDeclarationSchema:()=>Jve,AuthSchemeReferenceSchema:()=>cnt,AuthScope:()=>Kzr,AuthVariable:()=>b3e,BasicAuthSchemeSchema:()=>Mzr,BearerAuthSchemeSchema:()=>Wzr,EndpointSecuritySchema:()=>Nzr,EndpointSecuritySchemaDetails:()=>Fzr,HeaderAuthSchemeSchema:()=>Hzr,InferredAuthTypeSchema:()=>Lzr,InferredAuthenticatedRequestHeader:()=>_zr,InferredBearerAuthSchema:()=>Gzr,InferredGetTokenEndpointSchema:()=>Vzr,InferredGetTokenEndpointSchemaObject:()=>Uzr,OAuthAccessTokenRequestPropertiesSchema:()=>Yzr,OAuthAccessTokenResponsePropertiesSchema:()=>Xzr,OAuthFlowTypeSchema:()=>Jzr,OAuthGetTokenEndpointSchema:()=>Zzr,OAuthPkceSchema:()=>$zr,OAuthRefreshTokenEndpointSchema:()=>rQr,OAuthRefreshTokenRequestPropertiesSchema:()=>eQr,OAuthRefreshTokenResponsePropertiesSchema:()=>tQr,OAuthSchemeSchema:()=>oQr,RedirectUriSchema:()=>iQr,RedirectUriWithBackupPortsSchema:()=>nQr,TokenBearerAuthSchema:()=>qzr,WithEnvironmentVariable:()=>unt,WithPlaygroundDocsSchema:()=>n5});var Tsl=h(()=>{"use strict";d1o()});var pnt,sQr=h(()=>{"use strict";_r();pnt=ve.enum_(["in-development","pre-release","deprecated","generally-available"])});var aQr,h1o=h(()=>{"use strict";_r();sQr();aQr=ve.object({status:pnt,message:ve.string().optional()})});var cQr,g1o=h(()=>{"use strict";_r();h1o();sQr();cQr=ve.undiscriminatedUnion([pnt,aQr])});var A1o=h(()=>{"use strict";h1o();sQr();g1o()});var y1o={};ne(y1o,{AvailabilitySchema:()=>aQr,AvailabilityStatusSchema:()=>pnt,AvailabilityUnionSchema:()=>cQr});var Osl=h(()=>{"use strict";A1o()});var Yve,n_t=h(()=>{"use strict";_r();Yve=ve.object({audiences:ve.list(ve.string()).optional()})});var lQr,b1o=h(()=>{"use strict";_r();g1o();lQr=ve.object({availability:cQr.optional()})});var E1o=h(()=>{"use strict";n_t();b1o();m3();t_t()});var I1o={};ne(I1o,{WithAudiences:()=>Yve,WithAvailability:()=>lQr,WithDocsSchema:()=>PE,WithName:()=>Kve});var Psl=h(()=>{"use strict";E1o()});var uQr,v1o=h(()=>{"use strict";_r();uQr=ve.object({type:ve.string()})});var pQr,C1o=h(()=>{"use strict";_r();v1o();pQr=ve.object({proto:uQr.optional()})});var x1o=h(()=>{"use strict";C1o();v1o()});var S1o={};ne(S1o,{EncodingSchema:()=>pQr,ProtobufTypeSchema:()=>uQr});var Bsl=h(()=>{"use strict";x1o()});var fnt,fQr=h(()=>{"use strict";_r();fnt=ve.object({id:ve.string(),default:ve.string().optional(),values:ve.list(ve.string()).optional()})});var dQr,w1o=h(()=>{"use strict";_r();n_t();m3();fQr();dQr=ve.object({urls:ve.record(ve.string(),ve.string()),"url-templates":ve.record(ve.string(),ve.string()).optional(),"default-urls":ve.record(ve.string(),ve.string()).optional(),variables:ve.record(ve.string(),ve.list(fnt)).optional()}).extend(Yve).extend(PE)});var mQr,T1o=h(()=>{"use strict";_r();n_t();m3();fQr();mQr=ve.object({url:ve.string(),"default-url":ve.string().optional(),"url-template":ve.string().optional(),variables:ve.list(fnt).optional()}).extend(Yve).extend(PE)});var hQr,O1o=h(()=>{"use strict";_r();w1o();T1o();hQr=ve.undiscriminatedUnion([ve.string(),mQr,dQr])});var gQr,P1o=h(()=>{"use strict";_r();O1o();gQr=ve.object({"default-url":ve.string().optional(),"default-environment":ve.string().optional(),"base-url-env":ve.string().optional(),environments:ve.record(ve.string(),hQr).optional()})});var B1o=h(()=>{"use strict";O1o();w1o();fQr();T1o();P1o()});var D1o={};ne(D1o,{EnvironmentSchema:()=>hQr,MultipleBaseUrlsEnvironmentSchema:()=>dQr,ServerVariableSchema:()=>fnt,SingleBaseUrlEnvironmentSchema:()=>mQr,WithEnvironmentsSchema:()=>gQr});var Dsl=h(()=>{"use strict";B1o()});var AQr,R1o=h(()=>{"use strict";_r();AQr=ve.object({minItems:ve.number().optional(),maxItems:ve.number().optional()})});var yQr,k1o=h(()=>{"use strict";_r();yQr=ve.object({minProperties:ve.number().optional(),maxProperties:ve.number().optional()})});var bQr,F1o=h(()=>{"use strict";_r();bQr=ve.object({min:ve.number().optional(),max:ve.number().optional(),exclusiveMin:ve.boolean().optional(),exclusiveMax:ve.boolean().optional(),multipleOf:ve.number().optional()})});var EQr,N1o=h(()=>{"use strict";_r();EQr=ve.object({minLength:ve.number().optional(),maxLength:ve.number().optional(),pattern:ve.string().optional(),format:ve.string().optional()})});var IQr,j1o=h(()=>{"use strict";_r();R1o();k1o();F1o();N1o();IQr=ve.undiscriminatedUnion([EQr,bQr,AQr,yQr])});var vQr,z1o=h(()=>{"use strict";_r();b1o();m3();C1o();j1o();vQr=ve.object({default:ve.unknown().optional(),"client-default":ve.unknown().optional(),encoding:pQr.optional(),validation:IQr.optional()}).extend(PE).extend(lQr)});var CQr,Q1o=h(()=>{"use strict";_r();n_t();t_t();z1o();CQr=ve.object({type:ve.string()}).extend(vQr).extend(Kve).extend(Yve)});var xQr,M1o=h(()=>{"use strict";_r();Q1o();xQr=ve.object({env:ve.string().optional()}).extend(CQr)});var SQr,L1o=h(()=>{"use strict";_r();M1o();SQr=ve.undiscriminatedUnion([ve.string(),xQr])});var dnt,wQr=h(()=>{"use strict";L1o();dnt=SQr});var TQr,_1o=h(()=>{"use strict";_r();wQr();TQr=ve.object({headers:ve.record(ve.string(),dnt).optional()})});var U1o=h(()=>{"use strict";_1o()});var V1o={};ne(V1o,{WithHeadersSchema:()=>TQr});var Rsl=h(()=>{"use strict";U1o()});var G1o=h(()=>{"use strict";wQr();L1o();M1o()});var q1o={};ne(q1o,{HttpHeaderSchema:()=>dnt,TypeReferenceDeclarationWithEnvOverride:()=>SQr,TypeReferenceDeclarationWithEnvOverrideSchema:()=>xQr});var ksl=h(()=>{"use strict";G1o()});var W1o=h(()=>{"use strict";z1o();Q1o()});var H1o={};ne(H1o,{BaseTypeReferenceSchema:()=>vQr,TypeReferenceDeclarationWithName:()=>CQr});var Fsl=h(()=>{"use strict";W1o()});var K1o=h(()=>{"use strict";R1o();k1o();F1o();N1o();j1o()});var J1o={};ne(J1o,{ListValidationSchema:()=>AQr,MapValidationSchema:()=>yQr,NumberValidationSchema:()=>bQr,StringValidationSchema:()=>EQr,ValidationSchema:()=>IQr});var Nsl=h(()=>{"use strict";K1o()});var jsl=h(()=>{"use strict";Tsl();d1o();Osl();A1o();Psl();E1o();Bsl();x1o();Dsl();B1o();Rsl();U1o();ksl();G1o();Fsl();W1o();Nsl();K1o()});var Y1o={};ne(Y1o,{AnyAuthItem:()=>Rzr,AnyAuthSchemesSchema:()=>kzr,ApiAuthSchema:()=>lnt,AuthSchemeDeclarationSchema:()=>Jve,AuthSchemeReferenceSchema:()=>cnt,AuthScope:()=>Kzr,AuthVariable:()=>b3e,AvailabilitySchema:()=>aQr,AvailabilityStatusSchema:()=>pnt,AvailabilityUnionSchema:()=>cQr,BaseTypeReferenceSchema:()=>vQr,BasicAuthSchemeSchema:()=>Mzr,BearerAuthSchemeSchema:()=>Wzr,EncodingSchema:()=>pQr,EndpointSecuritySchema:()=>Nzr,EndpointSecuritySchemaDetails:()=>Fzr,EnvironmentSchema:()=>hQr,HeaderAuthSchemeSchema:()=>Hzr,HttpHeaderSchema:()=>dnt,InferredAuthTypeSchema:()=>Lzr,InferredAuthenticatedRequestHeader:()=>_zr,InferredBearerAuthSchema:()=>Gzr,InferredGetTokenEndpointSchema:()=>Vzr,InferredGetTokenEndpointSchemaObject:()=>Uzr,ListValidationSchema:()=>AQr,MapValidationSchema:()=>yQr,MultipleBaseUrlsEnvironmentSchema:()=>dQr,NumberValidationSchema:()=>bQr,OAuthAccessTokenRequestPropertiesSchema:()=>Yzr,OAuthAccessTokenResponsePropertiesSchema:()=>Xzr,OAuthFlowTypeSchema:()=>Jzr,OAuthGetTokenEndpointSchema:()=>Zzr,OAuthPkceSchema:()=>$zr,OAuthRefreshTokenEndpointSchema:()=>rQr,OAuthRefreshTokenRequestPropertiesSchema:()=>eQr,OAuthRefreshTokenResponsePropertiesSchema:()=>tQr,OAuthSchemeSchema:()=>oQr,ProtobufTypeSchema:()=>uQr,RedirectUriSchema:()=>iQr,RedirectUriWithBackupPortsSchema:()=>nQr,ServerVariableSchema:()=>fnt,SingleBaseUrlEnvironmentSchema:()=>mQr,StringValidationSchema:()=>EQr,TokenBearerAuthSchema:()=>qzr,TypeReferenceDeclarationWithEnvOverride:()=>SQr,TypeReferenceDeclarationWithEnvOverrideSchema:()=>xQr,TypeReferenceDeclarationWithName:()=>CQr,ValidationSchema:()=>IQr,WithAudiences:()=>Yve,WithAvailability:()=>lQr,WithDocsSchema:()=>PE,WithEnvironmentVariable:()=>unt,WithEnvironmentsSchema:()=>gQr,WithHeadersSchema:()=>TQr,WithName:()=>Kve,WithPlaygroundDocsSchema:()=>n5,auth:()=>m1o,availability:()=>y1o,commons:()=>I1o,encoding:()=>S1o,environments:()=>D1o,file:()=>V1o,service:()=>q1o,types:()=>H1o,validation:()=>J1o});var zsl=h(()=>{"use strict";jsl()});var Xve,i_t=h(()=>{"use strict";_r();Xve=ve.string()});var mnt,OQr=h(()=>{"use strict";_r();mnt=ve.enum_(["v1","v2"])});var hnt,PQr=h(()=>{"use strict";_r();hnt=ve.enum_(["environment-per-server","urls-per-environment"])});var gnt,BQr=h(()=>{"use strict";_r();gnt=ve.enum_(["url-order","spec-order"])});var Ant,DQr=h(()=>{"use strict";_r();Ant=ve.enum_(["always","never"])});var RQr,X1o=h(()=>{"use strict";_r();RQr=ve.enum_(["v1"])});var ynt,kQr=h(()=>{"use strict";_r();OQr();PQr();BQr();DQr();X1o();ynt=ve.object({"use-title":ve.boolean().optional(),unions:RQr.optional(),"message-naming":mnt.optional(),"respect-nullable-schemas":ve.boolean().optional(),"only-include-referenced-schemas":ve.boolean().optional(),"inline-path-parameters":ve.boolean().optional(),"idiomatic-request-names":ve.boolean().optional(),"wrap-references-to-nullable-in-optional":ve.boolean().optional(),"coerce-optional-schemas-to-nullable":ve.boolean().optional(),"group-environments-by-host":ve.boolean().optional(),"multi-server-strategy":hnt.optional(),"remove-discriminants-from-schemas":Ant.optional(),"path-parameter-order":gnt.optional()})});var i5,I3e=h(()=>{"use strict";_r();i5=ve.undiscriminatedUnion([ve.string(),ve.list(ve.string())])});var bnt,FQr=h(()=>{"use strict";_r();i_t();kQr();I3e();bnt=ve.object({path:Xve,origin:ve.string().optional(),overrides:i5.optional(),audiences:ve.list(ve.string()).optional(),settings:ynt.optional()})});var NQr,Z1o=h(()=>{"use strict";_r();NQr=ve.object({repo:ve.string(),ref:ve.string().optional(),path:ve.string()})});var jQr,$1o=h(()=>{"use strict";_r();Z1o();jQr=ve.object({git:NQr})});var Zve,o_t=h(()=>{"use strict";_r();$1o();Zve=ve.undiscriminatedUnion([ve.string(),jQr])});var Ent,zQr=h(()=>{"use strict";_r();I3e();o_t();Ent=ve.object({target:ve.string().optional(),root:Zve,overrides:i5.optional(),"local-generation":ve.boolean().optional(),"from-openapi":ve.boolean().optional(),dependencies:ve.list(ve.string()).optional()})});var Int,QQr=h(()=>{"use strict";_r();zQr();Int=ve.object({proto:Ent})});var MQr,eTo=h(()=>{"use strict";_r();i_t();FQr();QQr();MQr=ve.undiscriminatedUnion([Xve,bnt,Int])});var LQr,tTo=h(()=>{"use strict";_r();eTo();LQr=ve.list(MQr)});var vnt,_Qr=h(()=>{"use strict";_r();tTo();i_t();FQr();QQr();vnt=ve.undiscriminatedUnion([Xve,bnt,LQr,Int])});var UQr,rTo=h(()=>{"use strict";_r();UQr=ve.enum_(["literals","enums","enums-coerceable-to-literals"])});var Cnt,VQr=h(()=>{"use strict";_r();rTo();PQr();BQr();DQr();Cnt=ve.object({"respect-nullable-schemas":ve.boolean().optional(),"title-as-schema-name":ve.boolean().optional(),"optional-additional-properties":ve.boolean().optional(),"coerce-enums-to-literals":ve.boolean().optional(),"idiomatic-request-names":ve.boolean().optional(),"wrap-references-to-nullable-in-optional":ve.boolean().optional(),"coerce-optional-schemas-to-nullable":ve.boolean().optional(),"group-environments-by-host":ve.boolean().optional(),"multi-server-strategy":hnt.optional(),"remove-discriminants-from-schemas":Ant.optional(),"path-parameter-order":gnt.optional(),"resolve-schema-collisions":ve.boolean().optional(),"infer-forward-compatible":ve.boolean().optional(),"infer-default-environment":ve.boolean().optional(),"coerce-consts-to":UQr.optional()})});var xnt,GQr=h(()=>{"use strict";_r();VQr();OQr();xnt=ve.object({"message-naming":mnt.optional()}).extend(Cnt)});var qQr,nTo=h(()=>{"use strict";_r();qQr=ve.enum_(["int32","int64","uint32","uint64"])});var WQr,iTo=h(()=>{"use strict";_r();WQr=ve.enum_(["form","json"])});var HQr,oTo=h(()=>{"use strict";_r();HQr=ve.enum_(["all","untyped"])});var KQr,sTo=h(()=>{"use strict";_r();KQr=ve.enum_(["get","post","put","patch","delete","head","options","trace"])});var JQr,aTo=h(()=>{"use strict";_r();sTo();JQr=ve.object({"status-code":ve.number(),methods:ve.list(KQr).optional()})});var YQr,cTo=h(()=>{"use strict";_r();YQr=ve.undiscriminatedUnion([ve.string(),ve.record(ve.string(),ve.unknown())])});var XQr,lTo=h(()=>{"use strict";_r();oTo();aTo();cTo();XQr=ve.object({schema:YQr,name:ve.string().optional(),"apply-to":HQr.optional(),ensure:ve.list(JQr).optional()})});var s_t,uTo=h(()=>{"use strict";_r();s_t=ve.object({"max-depth":ve.number().optional()})});var ZQr,pTo=h(()=>{"use strict";_r();uTo();ZQr=ve.object({request:s_t.optional(),response:s_t.optional()})});var $Qr,fTo=h(()=>{"use strict";_r();$Qr=ve.object({endpoints:ve.list(ve.string()).optional()})});var eMr,dTo=h(()=>{"use strict";_r();eMr=ve.object({except:ve.list(ve.string()).optional()})});var tMr,mTo=h(()=>{"use strict";_r();dTo();tMr=ve.undiscriminatedUnion([ve.boolean(),eMr])});var $ve,a_t=h(()=>{"use strict";_r();VQr();nTo();iTo();lTo();pTo();fTo();mTo();$ve=ve.object({"only-include-referenced-schemas":ve.boolean().optional(),"inline-path-parameters":ve.boolean().optional(),"prefer-undiscriminated-unions-with-literals":ve.boolean().optional(),"object-query-parameters":ve.boolean().optional(),"respect-readonly-schemas":ve.boolean().optional(),"use-read-variant-for-responses":ve.boolean().optional(),"respect-forward-compatible-enums":ve.boolean().optional(),"respect-optional-request-body":ve.boolean().optional(),"use-bytes-for-binary-response":ve.boolean().optional(),"default-form-parameter-encoding":WQr.optional(),filter:$Qr.optional(),"example-generation":ZQr.optional(),"additional-properties-defaults-to":ve.boolean().optional(),"type-dates-as-strings":ve.boolean().optional(),"preserve-single-schema-oneof":ve.boolean().optional(),"preserve-one-of-in-all-of":ve.boolean().optional(),"any-of-sibling-properties-as-object":ve.boolean().optional(),"inline-all-of-schemas":ve.boolean().optional(),"resolve-aliases":tMr.optional(),"group-multi-api-environments":ve.boolean().optional(),"default-integer-format":qQr.optional(),"infer-discriminated-union-base-properties":ve.boolean().optional(),"disambiguate-request-names":ve.boolean().optional(),"ignore-tags":ve.boolean().optional(),"respect-parameter-content":ve.boolean().optional(),"respect-per-spec-base-path":ve.boolean().optional(),"respect-operation-id-word-boundaries":ve.boolean().optional(),"namespaced-errors":ve.boolean().optional(),"error-responses":XQr.optional()}).extend(Cnt)});var Snt,rMr=h(()=>{"use strict";_r();GQr();a_t();Snt=ve.object({"auto-generate-idempotency-key":ve.unknown().optional(),"webhook-signature":ve.unknown().optional()}).extend($ve).extend(xnt)});var nMr,hTo=h(()=>{"use strict";_r();nMr=ve.object({conjure:ve.string()})});var iMr,gTo=h(()=>{"use strict";_r();GQr();I3e();o_t();iMr=ve.object({asyncapi:Zve,origin:ve.string().optional(),overrides:i5.optional(),namespace:ve.string().optional(),settings:xnt.optional()})});var oMr,ATo=h(()=>{"use strict";_r();oMr=ve.object({graphql:ve.string(),origin:ve.string().optional(),overrides:ve.string().optional(),examples:ve.string().optional(),name:ve.string().optional()})});var sMr,yTo=h(()=>{"use strict";_r();a_t();I3e();o_t();sMr=ve.object({openapi:Zve,origin:ve.string().optional(),overrides:i5.optional(),overlays:ve.string().optional(),namespace:ve.string().optional(),settings:$ve.optional()})});var aMr,bTo=h(()=>{"use strict";_r();I3e();aMr=ve.object({openrpc:ve.string(),overrides:i5.optional(),namespace:ve.string().optional()})});var cMr,ETo=h(()=>{"use strict";_r();zQr();cMr=ve.object({proto:Ent})});var lMr,ITo=h(()=>{"use strict";_r();gTo();ATo();yTo();bTo();ETo();lMr=ve.undiscriminatedUnion([sMr,iMr,cMr,aMr,oMr])});var wnt,uMr=h(()=>{"use strict";_r();hTo();ITo();wnt=ve.undiscriminatedUnion([ve.list(lMr),nMr])});var pMr,vTo=h(()=>{"use strict";_r();jzr();r_t();P1o();_1o();rMr();uMr();pMr=ve.object({auth:lnt.optional(),"auth-schemes":ve.record(ve.string(),Jve).optional(),specs:wnt,settings:Snt.optional()}).extend(TQr).extend(gQr)});var fMr,CTo=h(()=>{"use strict";_r();_Qr();fMr=ve.object({namespaces:ve.record(ve.string(),vnt)})});var dMr,xTo=h(()=>{"use strict";_r();_Qr();vTo();CTo();dMr=ve.undiscriminatedUnion([vnt,fMr,pMr])});var mMr,STo=h(()=>{"use strict";_r();mMr=ve.enum_(["minimal","comprehensive"])});var hMr,wTo=h(()=>{"use strict";_r();hMr=ve.object({name:ve.string(),registry:ve.string()})});var gMr,TTo=h(()=>{"use strict";_r();gMr=ve.object({name:ve.string(),email:ve.string()})});var eCe,c_t=h(()=>{"use strict";_r();TTo();eCe=ve.object({description:ve.string().optional(),authors:ve.list(gMr).optional()})});var l_t,OTo=h(()=>{"use strict";_r();l_t=ve.object({name:ve.string()})});var tCe,u_t=h(()=>{"use strict";_r();OTo();tCe=ve.object({teams:ve.list(l_t).optional(),users:ve.list(l_t).optional()})});var AMr,PTo=h(()=>{"use strict";_r();jzr();r_t();wQr();rMr();uMr();AMr=ve.object({auth:lnt.optional(),"auth-schemes":ve.record(ve.string(),Jve).optional(),headers:ve.record(ve.string(),dnt).optional(),settings:Snt.optional(),specs:wnt.optional()})});var yMr,BTo=h(()=>{"use strict";_r();yMr=ve.object({url:ve.string().optional(),"package-name":ve.string(),token:ve.string().optional()})});var bMr,DTo=h(()=>{"use strict";_r();bMr=ve.object({slug:ve.string().optional()})});var EMr,RTo=h(()=>{"use strict";_r();EMr=ve.object({path:ve.string()})});var IMr,kTo=h(()=>{"use strict";_r();IMr=ve.object({keyId:ve.string(),password:ve.string(),secretKey:ve.string()})});var vMr,FTo=h(()=>{"use strict";_r();kTo();vMr=ve.object({url:ve.string().optional(),coordinate:ve.string(),username:ve.string().optional(),password:ve.string().optional(),signature:IMr.optional()})});var CMr,NTo=h(()=>{"use strict";_r();CMr=ve.object({url:ve.string().optional(),"package-name":ve.string(),token:ve.string().optional()})});var xMr,jTo=h(()=>{"use strict";_r();xMr=ve.object({url:ve.string().optional(),"package-name":ve.string(),"api-key":ve.string().optional()})});var SMr,zTo=h(()=>{"use strict";_r();SMr=ve.object({"api-key":ve.string(),"workspace-id":ve.string(),"collection-id":ve.string().optional()})});var wMr,QTo=h(()=>{"use strict";_r();c_t();wMr=ve.object({keywords:ve.list(ve.string()).optional(),"documentation-link":ve.string().optional(),"homepage-link":ve.string().optional()}).extend(eCe)});var TMr,MTo=h(()=>{"use strict";_r();QTo();TMr=ve.object({url:ve.string().optional(),"package-name":ve.string(),token:ve.string().optional(),username:ve.string().optional(),password:ve.string().optional(),metadata:wMr.optional()})});var OMr,LTo=h(()=>{"use strict";_r();OMr=ve.object({url:ve.string().optional(),"package-name":ve.string(),"api-key":ve.string().optional()})});var PMr,_To=h(()=>{"use strict";_r();BTo();DTo();RTo();FTo();NTo();jTo();zTo();MTo();LTo();PMr=ve.union("location",{npm:CMr,maven:vMr,pypi:TMr,postman:SMr,"local-file-system":EMr,"fern-hosted":bMr,nuget:xMr,rubygems:OMr,crates:yMr}).transform({transform:e=>e,untransform:e=>e})});var BMr,UTo=h(()=>{"use strict";_r();BMr=ve.object({custom:ve.string()})});var DMr,VTo=h(()=>{"use strict";_r();DMr=ve.enum_(["MIT","Apache-2.0"])});var o5,v3e=h(()=>{"use strict";_r();UTo();VTo();o5=ve.undiscriminatedUnion([DMr,BMr])});var p_t,GTo=h(()=>{"use strict";_r();v3e();p_t=ve.object({"package-description":ve.string().optional(),email:ve.string().optional(),"reference-url":ve.string().optional(),author:ve.string().optional(),license:o5.optional()})});var RMr,qTo=h(()=>{"use strict";_r();RMr=ve.object({path:ve.string()})});var kMr,WTo=h(()=>{"use strict";_r();kMr=ve.enum_(["commit","release"])});var FMr,HTo=h(()=>{"use strict";_r();v3e();WTo();FMr=ve.object({repository:ve.string(),branch:ve.string().optional(),license:o5.optional(),mode:kMr.optional(),workflows:ve.boolean().optional()})});var NMr,KTo=h(()=>{"use strict";_r();v3e();u_t();NMr=ve.object({repository:ve.string(),branch:ve.string().optional(),license:o5.optional(),mode:ve.stringLiteral("pull-request"),reviewers:tCe.optional(),workflows:ve.boolean().optional(),"auto-merge":ve.boolean().optional()})});var jMr,JTo=h(()=>{"use strict";_r();v3e();jMr=ve.object({repository:ve.string(),license:o5.optional(),mode:ve.stringLiteral("push"),branch:ve.string().optional(),workflows:ve.boolean().optional()})});var zMr,YTo=h(()=>{"use strict";_r();zMr=ve.enum_(["pull-request","push","commit-and-release"])});var QMr,XTo=h(()=>{"use strict";_r();v3e();YTo();QMr=ve.object({uri:ve.string(),token:ve.string(),mode:zMr.optional(),branch:ve.string().optional(),license:o5.optional(),workflows:ve.boolean().optional(),"auto-merge":ve.boolean().optional()})});var MMr,ZTo=h(()=>{"use strict";_r();HTo();KTo();JTo();XTo();MMr=ve.undiscriminatedUnion([QMr,FMr,NMr,jMr])});var Tnt,LMr=h(()=>{"use strict";_r();e_t();PTo();_To();GTo();qTo();ZTo();Tnt=ve.object({version:ve.string(),output:PMr.optional(),github:MMr.optional(),config:ve.unknown().optional(),metadata:p_t.optional(),keywords:ve.list(ve.string()).optional(),snippets:RMr.optional(),"ir-version":ve.string().optional(),"smart-casing":ve.boolean().optional(),"smart-casing-digit-word-boundary":ve.boolean().optional(),api:AMr.optional(),"disable-examples":ve.boolean().optional(),"publish-metadata":p_t.optional(),autorelease:ve.boolean().optional(),automation:Hve.optional()})});var _Mr,$To=h(()=>{"use strict";_r();wTo();LMr();_Mr=ve.object({image:hMr}).extend(Tnt)});var UMr,eOo=h(()=>{"use strict";_r();LMr();UMr=ve.object({name:ve.string()}).extend(Tnt)});var VMr,tOo=h(()=>{"use strict";_r();$To();eOo();VMr=ve.undiscriminatedUnion([UMr,_Mr])});var GMr,rOo=h(()=>{"use strict";_r();e_t();c_t();u_t();tOo();GMr=ve.object({audiences:ve.list(ve.string()).optional(),generators:ve.list(VMr),metadata:eCe.optional(),reviewers:tCe.optional(),automation:Hve.optional()})});var qMr,nOo=h(()=>{"use strict";_r();qMr=ve.object({enabled:ve.boolean()})});var WMr,iOo=h(()=>{"use strict";_r();a_t();WMr=ve.object({path:ve.string(),origin:ve.string().optional(),overrides:ve.string().optional(),"disable-examples":ve.boolean().optional(),settings:$ve})});var HMr,oOo=h(()=>{"use strict";_r();iOo();HMr=ve.undiscriminatedUnion([WMr,ve.string()])});var KMr,sOo=h(()=>{"use strict";_r();KMr=ve.enum_(["java","python","go","ruby","csharp","typescript","php","rust","swift"])});var JMr,aOo=h(()=>{"use strict";_r();sOo();JMr=ve.object({title:ve.string(),language:KMr,content:ve.string()})});var YMr,cOo=h(()=>{"use strict";_r();YMr=ve.object({method:ve.string(),path:ve.string(),stream:ve.boolean().optional()})});var f_t,lOo=h(()=>{"use strict";_r();cOo();f_t=ve.undiscriminatedUnion([ve.string(),YMr])});var XMr,uOo=h(()=>{"use strict";_r();STo();aOo();lOo();XMr=ve.object({bannerLink:ve.string().optional(),introduction:ve.string().optional(),apiReferenceLink:ve.string().optional(),apiName:ve.string().optional(),disabledSections:ve.list(ve.string()).optional(),defaultEndpoint:f_t.optional(),features:ve.record(ve.string(),ve.list(f_t)).optional(),customSections:ve.list(JMr).optional(),exampleStyle:mMr.optional()})});var ZMr,pOo=h(()=>{"use strict";_r();ZMr=ve.object({username:ve.string(),email:ve.string(),token:ve.string()})});var $Mr,fOo=h(()=>{"use strict";_r();pOo();$Mr=ve.object({github:ZMr.optional()})});var Qsl,Msl=h(()=>{"use strict";_r();zwo();e_t();r_t();rOo();nOo();u_t();xTo();kQr();oOo();c_t();uOo();fOo();Qsl=ve.object({"auth-schemes":ve.record(ve.string(),Jve).optional(),api:dMr.optional(),whitelabel:$Mr.optional(),metadata:eCe.optional(),readme:XMr.optional(),"default-group":ve.string().optional(),aliases:ve.record(ve.string(),ve.list(ve.string())).optional(),groups:ve.record(ve.string(),GMr).optional(),reviewers:tCe.optional(),replay:qMr.optional(),ai:Bzr.optional(),autorelease:ve.boolean().optional(),automation:Hve.optional(),openapi:HMr.optional(),"openapi-overrides":ve.string().optional(),"spec-origin":ve.string().optional(),"async-api":ve.string().optional(),"api-settings":ynt.optional()})});var dOo=h(()=>{"use strict";xTo();_Qr();vTo();rMr();uMr();tTo();i_t();eTo();kQr();FQr();GQr();gTo();VQr();rTo();hTo();nTo();STo();iTo();wTo();Msl();Z1o();iOo();oOo();ATo();sOo();OQr();PQr();CTo();oTo();aTo();sTo();lTo();cTo();pTo();fTo();a_t();yTo();bTo();TTo();c_t();I3e();BQr();QQr();zQr();ETo();aOo();cOo();lOo();uOo();DQr();uTo();mTo();dTo();ITo();$1o();o_t();X1o();fOo();pOo()});var mOo={};ne(mOo,{ApiConfigurationSchema:()=>dMr,ApiConfigurationSchemaInternal:()=>vnt,ApiConfigurationV2Schema:()=>pMr,ApiConfigurationV2SettingsSchema:()=>Snt,ApiConfigurationV2SpecsSchema:()=>wnt,ApiDefinitionList:()=>LQr,ApiDefinitionPathSchema:()=>Xve,ApiDefinitionSchema:()=>MQr,ApiDefinitionSettingsSchema:()=>ynt,ApiDefinitionWithOverridesSchema:()=>bnt,AsyncApiSettingsSchema:()=>xnt,AsyncApiSpecSchema:()=>iMr,BaseApiSettingsSchema:()=>Cnt,CoerceConstsTo:()=>UQr,ConjureSchema:()=>nMr,DefaultIntegerFormat:()=>qQr,ExampleStyle:()=>mMr,FormParameterEncoding:()=>WQr,GeneratorImageObjectSchema:()=>hMr,GeneratorsConfigurationSchema:()=>Qsl,GeneratorsOpenApiObjectSchema:()=>WMr,GeneratorsOpenApiSchema:()=>HMr,GitRemoteSchema:()=>NQr,GraphQlSpecSchema:()=>oMr,Language:()=>KMr,MessageNamingSettingsSchema:()=>mnt,MultiServerStrategy:()=>hnt,NamespacedApiConfigurationSchema:()=>fMr,OpenApiErrorResponsesApplyTo:()=>HQr,OpenApiErrorResponsesEnsureSchema:()=>JQr,OpenApiErrorResponsesHttpMethod:()=>KQr,OpenApiErrorResponsesSchema:()=>XQr,OpenApiErrorResponsesSchemaSource:()=>YQr,OpenApiExampleGenerationSchema:()=>ZQr,OpenApiFilterSchema:()=>$Qr,OpenApiSettingsSchema:()=>$ve,OpenApiSpecSchema:()=>sMr,OpenRpcSpecSchema:()=>aMr,OutputMetadataAuthor:()=>gMr,OutputMetadataSchema:()=>eCe,OverridesSchema:()=>i5,PathParameterOrder:()=>gnt,ProtobufApiDefinitionSchema:()=>Int,ProtobufDefinitionSchema:()=>Ent,ProtobufSpecSchema:()=>cMr,ReadmeCustomSectionSchema:()=>JMr,ReadmeEndpointObjectSchema:()=>YMr,ReadmeEndpointSchema:()=>f_t,ReadmeSchema:()=>XMr,RemoveDiscriminantsFromSchemas:()=>Ant,RequestOrResponseExampleGenerationSchema:()=>s_t,ResolveAliases:()=>tMr,ResolveAliasesSchema:()=>eMr,SpecGitSourceSchema:()=>jQr,SpecSchema:()=>lMr,SpecSourceSchema:()=>Zve,UnionSettingsSchema:()=>RQr,WhitelabelConfigurationSchema:()=>$Mr,WhitelabelGithubConfigurationSchema:()=>ZMr});var Lsl=h(()=>{"use strict";dOo()});var hOo=h(()=>{"use strict";LMr();BTo();$To();eOo();DTo();PTo();rOo();tOo();_To();GTo();qTo();WTo();HTo();ZTo();KTo();JTo();YTo();XTo();RTo();FTo();kTo();NTo();jTo();zTo();MTo();QTo();LTo()});var gOo={};ne(gOo,{BaseGeneratorInvocationSchema:()=>Tnt,CratesOutputLocationSchema:()=>yMr,CustomGeneratorInvocationSchema:()=>_Mr,DefaultGeneratorInvocationSchema:()=>UMr,FernHostedOutputLocationSchema:()=>bMr,GeneratorApiSettingsSchema:()=>AMr,GeneratorGroupSchema:()=>GMr,GeneratorInvocationSchema:()=>VMr,GeneratorOutputSchema:()=>PMr,GeneratorPublishMetadataSchema:()=>p_t,GeneratorSnippetsSchema:()=>RMr,GithubCommitAndReleaseMode:()=>kMr,GithubCommitAndReleaseSchema:()=>FMr,GithubConfigurationSchema:()=>MMr,GithubPullRequestSchema:()=>NMr,GithubPushSchema:()=>jMr,GithubSelfhostedMode:()=>zMr,GithubSelfhostedSchema:()=>QMr,LocalFileSystemOutputLocationSchema:()=>EMr,MavenOutputLocationSchema:()=>vMr,MavenOutputSignatureSchema:()=>IMr,NpmOutputLocationSchema:()=>CMr,NugetOutputLocationSchema:()=>xMr,PostmanOutputLocationSchema:()=>SMr,PypiOutputLocationSchema:()=>TMr,PypiOutputMetadataSchema:()=>wMr,RubyGemsOutputLocationSchema:()=>OMr});var _sl=h(()=>{"use strict";hOo()});var AOo=h(()=>{"use strict";UTo();v3e();VTo()});var yOo={};ne(yOo,{GithubLicenseCustomSchema:()=>BMr,GithubLicenseSchema:()=>o5,GithubLicenseType:()=>DMr});var Usl=h(()=>{"use strict";AOo()});var bOo=h(()=>{"use strict";nOo()});var EOo={};ne(EOo,{ReplayConfigSchema:()=>qMr});var Vsl=h(()=>{"use strict";bOo()});var IOo=h(()=>{"use strict";OTo();u_t()});var vOo={};ne(vOo,{ReviewerSchema:()=>l_t,ReviewersSchema:()=>tCe});var Gsl=h(()=>{"use strict";IOo()});var qsl=h(()=>{"use strict";Ssl();Qwo();wsl();Lwo();zsl();Lsl();dOo();_sl();hOo();Usl();AOo();Vsl();bOo();Gsl();IOo()});var COo={};ne(COo,{AiServicesSchema:()=>Bzr,ApiConfigurationSchema:()=>dMr,ApiConfigurationSchemaInternal:()=>vnt,ApiConfigurationV2Schema:()=>pMr,ApiConfigurationV2SettingsSchema:()=>Snt,ApiConfigurationV2SpecsSchema:()=>wnt,ApiDefinitionList:()=>LQr,ApiDefinitionPathSchema:()=>Xve,ApiDefinitionSchema:()=>MQr,ApiDefinitionSettingsSchema:()=>ynt,ApiDefinitionWithOverridesSchema:()=>bnt,AsyncApiSettingsSchema:()=>xnt,AsyncApiSpecSchema:()=>iMr,AutomationSchema:()=>Hve,BaseApiSettingsSchema:()=>Cnt,BaseGeneratorInvocationSchema:()=>Tnt,CoerceConstsTo:()=>UQr,ConjureSchema:()=>nMr,CratesOutputLocationSchema:()=>yMr,CustomGeneratorInvocationSchema:()=>_Mr,DefaultGeneratorInvocationSchema:()=>UMr,DefaultIntegerFormat:()=>qQr,ExampleStyle:()=>mMr,FernHostedOutputLocationSchema:()=>bMr,FormParameterEncoding:()=>WQr,GeneratorApiSettingsSchema:()=>AMr,GeneratorGroupSchema:()=>GMr,GeneratorImageObjectSchema:()=>hMr,GeneratorInvocationSchema:()=>VMr,GeneratorOutputSchema:()=>PMr,GeneratorPublishMetadataSchema:()=>p_t,GeneratorSnippetsSchema:()=>RMr,GeneratorsConfigurationSchema:()=>Qsl,GeneratorsOpenApiObjectSchema:()=>WMr,GeneratorsOpenApiSchema:()=>HMr,GitRemoteSchema:()=>NQr,GithubCommitAndReleaseMode:()=>kMr,GithubCommitAndReleaseSchema:()=>FMr,GithubConfigurationSchema:()=>MMr,GithubLicenseCustomSchema:()=>BMr,GithubLicenseSchema:()=>o5,GithubLicenseType:()=>DMr,GithubPullRequestSchema:()=>NMr,GithubPushSchema:()=>jMr,GithubSelfhostedMode:()=>zMr,GithubSelfhostedSchema:()=>QMr,GraphQlSpecSchema:()=>oMr,Language:()=>KMr,LocalFileSystemOutputLocationSchema:()=>EMr,MavenOutputLocationSchema:()=>vMr,MavenOutputSignatureSchema:()=>IMr,MessageNamingSettingsSchema:()=>mnt,ModelName:()=>Ozr,ModelProvider:()=>Pzr,MultiServerStrategy:()=>hnt,NamespacedApiConfigurationSchema:()=>fMr,NpmOutputLocationSchema:()=>CMr,NugetOutputLocationSchema:()=>xMr,OpenApiErrorResponsesApplyTo:()=>HQr,OpenApiErrorResponsesEnsureSchema:()=>JQr,OpenApiErrorResponsesHttpMethod:()=>KQr,OpenApiErrorResponsesSchema:()=>XQr,OpenApiErrorResponsesSchemaSource:()=>YQr,OpenApiExampleGenerationSchema:()=>ZQr,OpenApiFilterSchema:()=>$Qr,OpenApiSettingsSchema:()=>$ve,OpenApiSpecSchema:()=>sMr,OpenRpcSpecSchema:()=>aMr,OutputMetadataAuthor:()=>gMr,OutputMetadataSchema:()=>eCe,OverridesSchema:()=>i5,PathParameterOrder:()=>gnt,PostmanOutputLocationSchema:()=>SMr,ProtobufApiDefinitionSchema:()=>Int,ProtobufDefinitionSchema:()=>Ent,ProtobufSpecSchema:()=>cMr,PypiOutputLocationSchema:()=>TMr,PypiOutputMetadataSchema:()=>wMr,ReadmeCustomSectionSchema:()=>JMr,ReadmeEndpointObjectSchema:()=>YMr,ReadmeEndpointSchema:()=>f_t,ReadmeSchema:()=>XMr,RemoveDiscriminantsFromSchemas:()=>Ant,ReplayConfigSchema:()=>qMr,RequestOrResponseExampleGenerationSchema:()=>s_t,ResolveAliases:()=>tMr,ResolveAliasesSchema:()=>eMr,ReviewerSchema:()=>l_t,ReviewersSchema:()=>tCe,RubyGemsOutputLocationSchema:()=>OMr,SpecGitSourceSchema:()=>jQr,SpecSchema:()=>lMr,SpecSourceSchema:()=>Zve,UnionSettingsSchema:()=>RQr,WhitelabelConfigurationSchema:()=>$Mr,WhitelabelGithubConfigurationSchema:()=>ZMr,ai:()=>Mwo,automation:()=>_wo,fernDefinition:()=>Y1o,generators:()=>mOo,group:()=>gOo,license:()=>yOo,replay:()=>EOo,reviewers:()=>vOo});var Wsl=h(()=>{"use strict";qsl()});var Hsl=h(()=>{"use strict";pol();Wsl()});function Ksl(e){let t=e.output;return t?.location==="maven"&&t.signature==null&&t.url==null}function Jsl(e){return`Maven output for ${e} has no \`signature\` and no \`url\`. Maven Central requires signed artifacts, so this publish will be uploaded to the Central Portal staging service but never released. Add \`signature\` to publish to Maven Central, or set \`url\` to publish to another registry.`}var Ysl=h(()=>{"use strict"});function Xsl(e){return e?.specs!=null}var Zsl=h(()=>{"use strict"});function $sl(e){return e?.asyncapi!=null}var eal=h(()=>{"use strict"});function tal(e){return e?.conjure!=null}var ral=h(()=>{"use strict"});function nal(e){return e?.graphql!=null}var ial=h(()=>{"use strict"});function oal(e){return e?.namespaces!=null}var sal=h(()=>{"use strict"});function aal(e){return e?.openapi!=null}var cal=h(()=>{"use strict"});function lal(e){return e?.openrpc!=null}var ual=h(()=>{"use strict"});function pal(e){return e?.proto!=null}var fal=h(()=>{"use strict"});var dal=h(()=>{"use strict";Zsl();eal();ral();ial();sal();cal();ual();fal()});var Qr={};ne(Qr,{API_ORIGIN_LOCATION_KEY:()=>A9c,API_SETTINGS_KEY:()=>I9c,ASYNC_API_LOCATION_KEY:()=>y9c,CoerceConstsTo:()=>Anl,DEFAULT_GROUP_GENERATORS_CONFIG_KEY:()=>Pve,DEFAULT_GROUP_NAME:()=>U6t,DIRECT_RUBYGEMS_PUBLISHING_UNSUPPORTED_MESSAGE:()=>htl,DefaultIntegerFormat:()=>Enl,ExampleStyle:()=>vnl,FormParameterEncoding:()=>xnl,GenerationLanguage:()=>ytl,GithubCommitAndReleaseMode:()=>kil,GithubLicenseType:()=>eol,GithubSelfhostedMode:()=>Mil,Language:()=>Rnl,MessageNamingSettingsSchema:()=>Fnl,ModelProvider:()=>Ptl,MultiServerStrategy:()=>jnl,OPENAPI_LOCATION_KEY:()=>b9c,OPENAPI_OVERRIDES_LOCATION_KEY:()=>E9c,OpenApiErrorResponsesApplyTo:()=>Mnl,OpenApiErrorResponsesHttpMethod:()=>Unl,PathParameterOrder:()=>eil,RemoveDiscriminantsFromSchemas:()=>lil,UnionSettingsSchema:()=>Ail,ai:()=>JSo,automation:()=>ktl,fernDefinition:()=>cwo,generators:()=>uwo,getPackageName:()=>btl,getUnsignedMavenPublishingWithoutUrlMessage:()=>Jsl,group:()=>fwo,isApiConfigurationV2Schema:()=>Xsl,isAsyncApiSpecSchema:()=>$sl,isConjureSchema:()=>tal,isDirectRubyGemsPublishing:()=>gtl,isGithubAutoMergeEnabled:()=>Itl,isGraphQLSpecSchema:()=>nal,isNamespacedApiConfiguration:()=>oal,isOpenApiSpecSchema:()=>aal,isOpenRpcSpecSchema:()=>lal,isProtoSpecSchema:()=>pal,isRawProtobufAPIDefinitionSchema:()=>Ctl,isUnsignedMavenPublishingWithoutUrl:()=>Ksl,license:()=>mwo,replay:()=>iol,resolveAutomationConfig:()=>Stl,reviewers:()=>col,serialization:()=>COo});var mal=h(()=>{"use strict";Tkr();Atl();Etl();vtl();xtl();wtl();Hsl();Ysl();dal()});var yo=h(()=>{"use strict";d9c();Tkr();lHc();utl();ptl();mtl();mal()});function Hee(e){if(typeof e.raw?.output=="object"&&e.raw?.output!==null){let r=e.raw.output["package-name"];if(r!=null)return r;let n=e.raw.output.coordinate;if(n!=null)return n}let t=e.config??e.raw?.config;if(typeof t=="object"&&t!==null){let r=t.package_name;if(typeof r=="string")return r;let n=t["package-name"];if(typeof n=="string")return n;let i=t.module?.path;if(typeof i=="string")return i;let o=t.packageName;if(typeof o=="string")return o}}function rCe(e){if(typeof e.raw?.config=="object"&&e.raw?.config!==null){let t=e.raw.config["user-agent"];if(t!=null)return t}}function SGd(e){if(!Array.isArray(e))return SOo;let t=e.filter(r=>typeof r=="string").map(r=>r.toUpperCase()).filter(r=>xGd.has(r));return t.length>0?t:SOo}function nCe(e){let t=e.idempotencyKeyGenerationConfig??wGd(e);return TGd(t)}function wGd(e){let t=typeof e.raw?.config=="object"&&e.raw?.config!==null?e.raw.config:typeof e.config=="object"&&e.config!==null?e.config:void 0;if(t!=null)return t["auto-generate-idempotency-key"]}function TGd(e){if(e===!0)return{headerName:hal,methods:SOo};if(typeof e=="object"&&e!==null){let t=e["header-name"];return{headerName:typeof t=="string"?t:hal,methods:SGd(e.methods)}}}function iCe(e,t){return Aal(e.webhookSignatureConfig,t)}function gal(e,t){let r=e?.rawConfiguration.api;if(!(r==null||!Qr.isApiConfigurationV2Schema(r)))return Aal(r.settings?.["webhook-signature"],t)}function Aal(e,t){if(e==null)return;let r=Nd.serialization.WebhookSignatureSchema.parse(e,{unrecognizedObjectKeys:"fail"});if(!r.ok){let n=r.errors.map(i=>`${i.path.join(".")||"<root>"}: ${i.message}`).join("; ");return t.failAndThrow(`Invalid api.settings.webhook-signature in generators.yml: ${n}`)}return r.value}function Kee(e){if(typeof e!="object"||e===null)return e;let t={};for(let[r,n]of Object.entries(e))OGd.has(r)||(t[r]=n);return t}async function eLr({version:e,packageName:t,generatorInvocation:r,context:n}){if(e==null||r.outputMode.type==="downloadFiles")return;let i=r.outputMode.type==="publishV2"||r.outputMode.type==="publish",o=t??Hee(r);if(r.language==null||o==null)return;let s=r.language,a;try{a=await PGd({packageName:o,version:e,language:s})}catch(c){n.logger.debug(`Could not verify version availability on ${xOo(s)}: ${en(c)}`);return}a&&(i?n.failAndThrow(`Version ${e} of ${o} already exists on the ${xOo(s)} registry. Please use a different version number. If you want to automatically increment the version, omit the --version flag.`,void 0,{code:T.Code.VersionError}):n.logger.warn(`Version ${e} of ${o} already exists on the ${xOo(s)} registry. If your CI pipeline publishes this version, it may fail.`))}async function PGd({packageName:e,version:t,language:r}){switch(r){case"typescript":return await BGd(e,t);case"python":return await DGd(e,t);case"java":return await RGd(e,t);case"csharp":return await kGd(e,t);case"ruby":return await FGd(e,t);case"go":return await NGd(e,t);case"rust":return await jGd(e,t);default:return!1}}async function BGd(e,t){let r=encodeURIComponent(e).replace(/^%40/,"@"),n={accept:"application/json"},i=process.env.NPM_TOKEN;i!=null&&(n.authorization=`Bearer ${i}`);let o=await fetch(`https://registry.npmjs.org/${r}/${t}`,{headers:n,signal:AbortSignal.timeout(C3e)});return o.ok?(await o.json()).version===t:!1}async function DGd(e,t){return(await fetch(`https://pypi.org/pypi/${e}/${t}/json`,{signal:AbortSignal.timeout(C3e)})).ok}async function RGd(e,t){let r=e.split(":");if(r.length<2||!r[0]||!r[1])return!1;let n=r[0],i=r[1],o=await fetch(`https://search.maven.org/solrsearch/select?q=g:${encodeURIComponent(n)}+AND+a:${encodeURIComponent(i)}+AND+v:${encodeURIComponent(t)}&rows=1&wt=json`,{signal:AbortSignal.timeout(C3e)});return o.ok?((await o.json()).response?.numFound??0)>0:!1}async function kGd(e,t){let r=await fetch(`https://api.nuget.org/v3-flatcontainer/${e.toLowerCase()}/index.json`,{signal:AbortSignal.timeout(C3e)});return r.ok?((await r.json()).versions??[]).some(o=>o.toLowerCase()===t.toLowerCase()):!1}async function FGd(e,t){return(await fetch(`https://rubygems.org/api/v2/rubygems/${e}/versions/${t}.json`,{signal:AbortSignal.timeout(C3e)})).ok}async function NGd(e,t){let r=e.replace(/[A-Z]/g,s=>"!"+s.toLowerCase()),n=t.startsWith("v")?t:`v${t}`,i=await fetch(`https://proxy.golang.org/${r}/@v/${n}.info`,{signal:AbortSignal.timeout(C3e)});return i.ok?(await i.json()).Version!=null:!1}async function jGd(e,t){let r=await fetch(`https://crates.io/api/v1/crates/${e}/${t}`,{headers:{"user-agent":"fern-cli (https://buildwithfern.com)"},signal:AbortSignal.timeout(C3e)});return r.ok?(await r.json()).version?.num===t:!1}function xOo(e){switch(e){case"typescript":return"npm";case"python":return"PyPI";case"java":return"Maven Central";case"csharp":return"NuGet";case"ruby":return"RubyGems";case"go":return"Go Module Proxy";case"rust":return"crates.io";default:return e}}var hal,SOo,xGd,OGd,C3e,wOo=h(()=>{"use strict";yo();gt();co();Bt();hal="Idempotency-Key",SOo=["POST","PUT"],xGd=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);OGd=new Set(["user-agent","auto-generate-idempotency-key"]);C3e=5e3});var yal=E(h3=>{"use strict";var zGd=h3&&h3.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(h3,"__esModule",{value:!0});var QGd=require("fs"),MGd=zGd(MA()),Ont=MGd.default("@kwsites/file-exists");function LGd(e,t,r){Ont("checking %s",e);try{let n=QGd.statSync(e);return n.isFile()&&t?(Ont("[OK] path represents a file"),!0):n.isDirectory()&&r?(Ont("[OK] path represents a directory"),!0):(Ont("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Ont("[FAIL] path is not accessible: %o",n),!1;throw Ont("[FATAL] %o",n),n}}function _Gd(e,t=h3.READABLE){return LGd(e,(t&h3.FILE)>0,(t&h3.FOLDER)>0)}h3.exists=_Gd;h3.FILE=1;h3.FOLDER=2;h3.READABLE=h3.FILE+h3.FOLDER});var TOo=E(tLr=>{"use strict";function UGd(e){for(var t in e)tLr.hasOwnProperty(t)||(tLr[t]=e[t])}Object.defineProperty(tLr,"__esModule",{value:!0});UGd(yal())});function Pnt(...e){let t=new String(e);return OOo.set(t,e),t}function s5(e){return e instanceof String&&OOo.has(e)}function Bnt(e){return OOo.get(e)??[]}var OOo,oCe=h(()=>{"use strict";OOo=new WeakMap});var d_t=E(x3e=>{"use strict";Object.defineProperty(x3e,"__esModule",{value:!0});x3e.createDeferred=x3e.deferred=void 0;function POo(){let e,t,r="pending";return{promise:new Promise((i,o)=>{e=i,t=o}),done(i){r==="pending"&&(r="resolved",e(i))},fail(i){r==="pending"&&(r="rejected",t(i))},get fulfilled(){return r!=="pending"},get status(){return r}}}x3e.deferred=POo;x3e.createDeferred=POo;x3e.default=POo});function*bal(e,t){let r=t==="global";for(let n of e)n.isGlobal===r&&(yield n)}function HGd(e,t){for(let{name:n}of bal(e,"task")){if(VGd.has(n))return Dnt(!0,t);if(GGd.has(n))return Dnt(!1,t)}let r=t.at(0)?.toLowerCase();return r===void 0?null:qGd.has(r)?Dnt(!0,t.slice(1)):WGd.has(r)?Dnt(!1,t.slice(1)):t.length===1?Dnt(!1,t):Dnt(!0,t)}function Dnt(e=!1,t=[]){let r=t.at(0)?.toLowerCase();return r===void 0?null:{isWrite:e,isRead:!e,key:r,value:t.at(1)}}function KGd(e,t){return t.isWrite&&t.value!==void 0?{key:t.key,value:t.value,scope:e}:{key:t.key,scope:e}}function JGd(e){let t=e?.indexOf("=")||-1;return!e||t<0?null:{key:e.slice(0,t).trim().toLowerCase(),value:e.slice(t+1)}}function YGd(e){for(let{name:t}of bal(e,"task"))switch(t){case"--global":return"global";case"--system":return"system";case"--worktree":return"worktree";case"--local":return"local";case"--file":case"-f":return"file"}return"local"}function XGd({name:e}){if(e==="-c"||e==="--config")return"inline";if(e==="--config-env")return"env"}function*ZGd(e){for(let t of e){let r=XGd(t),n=r&&JGd(t.value);n&&(yield{...n,scope:r})}}function $Gd(e,t,r){let n={read:[],write:[...ZGd(t)]};return e==="config"&&e9d(n,YGd(t),HGd(t,r)),n}function e9d(e,t,r){if(r===null)return;let n=KGd(t,r);r.isWrite?e.write.push(n):e.read.push(n)}function i9d(e){let t=r9d[e??""]??n9d;return{short:new Map([...Eal.short.entries(),...t.short.entries()]),long:t.long}}function Ial(e,t=t9d){if(e.startsWith("--")){let r=e.indexOf("=");if(r>2)return[{name:e.slice(0,r),value:e.slice(r+1),needsNext:!1}];let n=e.slice(2);return[{name:e,needsNext:t.long.has(n)}]}if(e.length===2){let r=e.charAt(1),n=t.short.get(r);return[{name:e,needsNext:n===!0}]}return o9d(e,t.short)}function o9d(e,t){let r=e.slice(1).split(""),n=[];for(let i=0;i<r.length;i++){let o=r[i],s=t.get(o);if(s===void 0)return[{name:e,needsNext:!1}];if(s){let a=r.slice(i+1).join("");if(a&&![...a].every(c=>t.has(c)))return n.push({name:`-${o}`,value:a,needsNext:!1}),n}n.push({name:`-${o}`,needsNext:s})}return n}function s9d(e,t=[]){let r=0;for(;r<e.length;){let n=String(e[r]);if(!n.startsWith("-")||n.length<2)break;let i=Ial(n),o=r+1;for(let s of i){let a={name:s.name,value:s.value,absorbedNext:!1,isGlobal:!0};s.needsNext&&a.value===void 0&&o<e.length&&(a.value=String(e[o]),a.absorbedNext=!0,o++),t.push(a)}r=o}return{flags:t,taskIndex:r}}function a9d(e,t,r=[]){let n=i9d(t),i=[],o=[],s=0;for(;s<e.length;){let a=e[s];if(s5(a)){o.push(...Bnt(a)),s++;continue}let c=String(a);if(c==="--"){for(let p=s+1;p<e.length;p++){let d=e[p];s5(d)?o.push(...Bnt(d)):o.push(String(d))}break}if(!c.startsWith("-")||c.length<2){i.push(c),s++;continue}let l=Ial(c,n),u=s+1;for(let p of l){let d={name:p.name,value:p.value,absorbedNext:!1,isGlobal:!1};p.needsNext&&d.value===void 0&&u<e.length&&!s5(e[u])&&(d.value=String(e[u]),d.absorbedNext=!0,u++),r.push(d)}s=u}return{flags:r,positionals:i,pathspecs:o}}function*c9d({write:e}){for(let t of e)for(let r of l9d){let n=r(t.key);n&&(yield n)}}function c5(e,t,r=String(e)){let n=typeof e=="string"?new RegExp(`\\s*${e.toLowerCase()}`):e;return function(i){if(n.test(i))return{category:t,message:`Configuring ${r} is not permitted without enabling ${t}`}}}function a5(e,t){let r=new RegExp(`\\s*${e.toLowerCase().replace(/\./g,"(..+)?.")}`);return c5(r,t,e)}function*u9d(e,t){for(let r of t)for(let n of p9d){let i=n(e,r.name);i&&(yield i)}}function m_t(e,t,r,n=String(t)){let i=typeof t=="string"?new RegExp(`\\s*${t.toLowerCase()}`):t,o=`Use of ${e?`${e} with option `:""}${n} is not permitted without enabling ${r}`;return function(s,a){if((!e||s===e)&&i.test(a))return{category:r,message:o}}}function val(e,t,r){return[...u9d(e,t),...c9d(r)]}function f9d(...e){let{flags:t,taskIndex:r}=s9d(e),n=r<e.length?String(e[r]).toLowerCase():null,i=n!==null?e.slice(r+1):[],{positionals:o,pathspecs:s}=a9d(i,n,t),a=$Gd(n,t,o);return{task:n,flags:t.map(m9d),paths:s,config:a,vulnerabilities:d9d(val(n,t,a))}}function d9d(e){return Object.defineProperty(e,"vulnerabilities",{value:e})}function m9d({value:e,name:t}){return e!==void 0?{name:t,value:e}:{name:t}}function*h9d(e){let t=parseInt(e.git_config_count??"0",10);for(let r=0;r<t;r++){let n=e[`git_config_key_${r}`],i=e[`git_config_value_${r}`];n!==void 0&&(yield{key:n.toLowerCase().trim(),value:i,scope:"env"})}}function*g9d(e){for(let t of Object.keys(e))if(xal(t)){let r=Cal[t];yield{category:r,message:`Use of "${t.toUpperCase()}" is not permitted without enabling ${r}`}}}function xal(e){return Object.hasOwn(Cal,e)}function A9d(e){let t={};for(let[r,n]of Object.entries(e)){let i=r.toLowerCase().trim();(xal(i)||i.startsWith("git"))&&(t[i]=String(n))}return t}function y9d(e){let t=A9d(e),r={read:[],write:[...h9d(t)]},n=[...g9d(t),...val(null,[],r)];return{config:r,vulnerabilities:n}}function Sal(e,t){return[...f9d(...e).vulnerabilities,...y9d(t).vulnerabilities]}var VGd,GGd,qGd,WGd,Eal,t9d,r9d,n9d,l9d,p9d,Cal,wal=h(()=>{"use strict";oCe();VGd=new Set(["--add","--edit","--remove-section","--rename-section","--replace-all","--unset","--unset-all","-e"]),GGd=new Set(["--get","--get-all","--get-color","--get-colorbool","--get-regexp","--get-urlmatch","--list","-l"]),qGd=new Set(["edit","remove-section","rename-section","set","unset"]),WGd=new Set(["get","get-color","get-colorbool","list"]);Eal={short:new Map([["c",!0]])},t9d={short:new Map([["C",!0],["P",!1],["h",!1],["p",!1],["v",!1],...Eal.short.entries()]),long:new Set(["attr-source","config-env","exec-path","git-dir","list-cmds","namespace","super-prefix","work-tree"])},r9d={clone:{short:new Map([["b",!0],["j",!0],["l",!1],["n",!1],["o",!0],["q",!1],["s",!1],["u",!0]]),long:new Set(["branch","config","jobs","origin","upload-pack","u","template"])},commit:{short:new Map([["C",!0],["F",!0],["c",!0],["m",!0],["t",!0]]),long:new Set(["file","message","reedit-message","reuse-message","template"])},config:{short:new Map([["e",!1],["f",!0],["l",!1]]),long:new Set(["blob","comment","default","file","type","value"])},fetch:{short:new Map,long:new Set(["upload-pack"])},init:{short:new Map,long:new Set(["template"])},pull:{short:new Map,long:new Set(["upload-pack"])},push:{short:new Map,long:new Set(["exec","receive-pack"])}},n9d={short:new Map,long:new Set};l9d=[c5("alias","allowUnsafeAlias"),c5("core.askPass","allowUnsafeAskPass"),c5("core.editor","allowUnsafeEditor"),c5("core.fsmonitor","allowUnsafeFsMonitor"),c5("core.gitProxy","allowUnsafeGitProxy"),c5("core.hooksPath","allowUnsafeHooksPath"),c5("core.pager","allowUnsafePager"),c5("core.sshCommand","allowUnsafeSshCommand"),a5("credential.helper","allowUnsafeCredentialHelper"),a5("diff.command","allowUnsafeDiffExternal"),c5("diff.external","allowUnsafeDiffExternal"),a5("diff.textconv","allowUnsafeDiffTextConv"),a5("filter.clean","allowUnsafeFilter"),a5("filter.smudge","allowUnsafeFilter"),a5("gpg.program","allowUnsafeGpgProgram"),c5("init.templateDir","allowUnsafeTemplateDir"),a5("merge.driver","allowUnsafeMergeDriver"),a5("mergetool.path","allowUnsafeMergeDriver"),a5("mergetool.cmd","allowUnsafeMergeDriver"),a5("protocol.allow","allowUnsafeProtocolOverride"),a5("remote.receivepack","allowUnsafePack"),a5("remote.uploadpack","allowUnsafePack"),c5("sequence.editor","allowUnsafeEditor")];p9d=[m_t(null,/--(upload|receive)-pack/,"allowUnsafePack","--upload-pack or --receive-pack"),m_t("clone",/^-\w*u/,"allowUnsafePack"),m_t("clone","--u","allowUnsafePack"),m_t("push","--exec","allowUnsafePack"),m_t(null,"--template","allowUnsafeTemplateDir")];Cal={editor:"allowUnsafeEditor",git_askpass:"allowUnsafeAskPass",git_config_global:"allowUnsafeConfigPaths",git_config_system:"allowUnsafeConfigPaths",git_config_count:"allowUnsafeConfigEnvCount",git_config:"allowUnsafeConfigPaths",git_editor:"allowUnsafeEditor",git_exec_path:"allowUnsafeConfigPaths",git_external_diff:"allowUnsafeDiffExternal",git_pager:"allowUnsafePager",git_proxy_command:"allowUnsafeGitProxy",git_template_dir:"allowUnsafeTemplateDir",git_sequence_editor:"allowUnsafeEditor",git_ssh:"allowUnsafeSshCommand",git_ssh_command:"allowUnsafeSshCommand",pager:"allowUnsafePager",prefix:"allowUnsafeConfigPaths",ssh_askpass:"allowUnsafeAskPass"}});function scl(e){return typeof e!="function"?T3e:e}function acl(e){return typeof e=="function"&&e!==T3e}function ccl(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function lcl(e,t=0){return ucl(e)&&e.length>t?e[t]:void 0}function w3e(e,t=0){if(ucl(e)&&e.length>t)return e[e.length-1-t]}function ucl(e){return hLr(e)}function b_t(e="",t=!0,r=`
|
|
257
257
|
`){return e.split(r).reduce((n,i)=>{let o=t?i.trim():i;return o&&n.push(o),n},[])}function $Oo(e,t){return b_t(e,!0).map(r=>t(r))}function ePo(e){return(0,pLr.exists)(e,pLr.FOLDER)}function l5(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function pcl(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function fLr(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function Jee(e){return Array.isArray(e)?e:[e]}function fcl(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function jnt(e){return Jee(e).map(t=>t instanceof String?t:String(t))}function Sy(e,t=0){if(e==null)return t;let r=parseInt(e,10);return Number.isNaN(r)?t:r}function g_t(e,t){let r=[];for(let n=0,i=e.length;n<i;n++)r.push(t,e[n]);return r}function A_t(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function dcl(e,t){let r={};return t.forEach(n=>{e[n]!==void 0&&(r[n]=e[n])}),r}function jOo(e=0){return new Promise(t=>setTimeout(t,e))}function zOo(e){if(e!==!1)return e}function LD(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function QOo(e,t){let r=s5(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function mLr(e){return!!e&&E_t(e)==="[object Object]"}function mcl(e){return typeof e=="function"}function S9d(){throw new Error("LineParser:useMatches not implemented")}function Acl(...e){let t=process.cwd(),r=Object.assign({baseDir:t,...ycl},...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}function rPo(e,t=[]){return mLr(e)?Object.keys(e).reduce((r,n)=>{let i=e[n];if(s5(i))r.push(i);else if(QOo(i,["boolean"]))r.push(n+"="+i);else if(Array.isArray(i))for(let o of i)QOo(o,["string","number"])||r.push(n+"="+o);else r.push(n);return r},t):t}function ZF(e,t=0,r=!1){let n=[];for(let i=0,o=t<0?e.length:t;i<o;i++)"string|number".includes(typeof e[i])&&n.push(String(e[i]));return rPo(nPo(e),n),r||n.push(...O9d(e)),n}function O9d(e){let t=typeof w3e(e)=="function";return jnt(LD(w3e(e,t?1:0),I_t,[]))}function nPo(e){let t=mcl(w3e(e));return LD(w3e(e,t?1:0),mLr)}function BE(e,t=!0){let r=scl(w3e(e));return t||acl(r)?r:void 0}function LOo(e,t){return e(t.stdOut,t.stdErr)}function rQ(e,t,r,n=!0){return Jee(r).forEach(i=>{for(let o=b_t(i,n),s=0,a=o.length;s<a;s++){let c=(l=0)=>{if(!(s+l>=a))return o[s+l]};t.some(({parse:l})=>l(c,e))}}),e}function D9d(e){switch(e){case"bare":return vcl();case"root":return Icl()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:gLr,parser:iPo}}function Icl(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:gLr,parser(t){return/^\.(git)?$/.test(t.trim())}}}function vcl(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:gLr,parser:iPo}}function R9d(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}function k9d(e,t){let r=new xcl(e),n=e?wcl:Scl;return b_t(t).forEach(i=>{let o=i.replace(n,"");r.paths.push(o),(Tcl.test(o)?r.folders:r.files).push(o)}),r}function Ocl(e){return{commands:ALr,format:"empty",parser:e}}function tQ(e){return{commands:ALr,format:"empty",parser(){throw typeof e=="string"?new icl(e):e}}}function $F(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function Pcl(e){return{commands:e,format:"buffer",parser(t){return t}}}function Bcl(e){return e.format==="buffer"}function Dcl(e){return e.format==="empty"||!e.commands.length}function N9d(e,t){let{cleanMode:r,options:n,valid:i}=z9d(e);return r?i.options?(n.push(...t),n.some(L9d)?tQ(oPo):kcl(r,n)):tQ(aPo+JSON.stringify(e)):tQ(sPo)}function kcl(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return k9d(e==="n",n)}}}function j9d(e){return Array.isArray(e)&&e.every(t=>cPo.has(t))}function z9d(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(i=>{Q9d(i)?(t=i,n.cleanMode=!0):n.options=n.options&&M9d(r[r.length]=`-${i}`)}),{cleanMode:t,options:r,valid:n}}function Q9d(e){return e==="f"||e==="n"}function M9d(e){return/^-[a-z]$/i.test(e)&&cPo.has(e.charAt(1))}function L9d(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}function _9d(e){let t=new jcl;for(let r of Ncl(e))t.addValue(r.file,String(r.key),r.value);return t}function U9d(e,t){let r=null,n=[],i=new Map;for(let o of Ncl(e,t))o.key===t&&(n.push(r=o.value),i.has(o.file)||i.set(o.file,[]),i.get(o.file).push(r));return{key:t,paths:Array.from(i.keys()),scopes:i,value:r,values:n}}function V9d(e){return e.replace(/^(file):/,"")}function*Ncl(e,t=null){let r=e.split("\0");for(let n=0,i=r.length-1;n<i;){let o=V9d(r[n++]),s=r[n++],a=t;if(s.includes(`
|
|
258
258
|
`)){let c=ccl(s,`
|
|
@@ -498,7 +498,7 @@ ${a.error.issues.map(c=>` - ${c.path.join(".")}: ${c.message}`).join(`
|
|
|
498
498
|
`),code:T.Code.ParseError});return r}async function YGr({redirects:e,absoluteFilepathToDocsConfig:t}){if(e==null)return{redirects:void 0,errors:[]};let r=typeof e=="string"?[e]:e;if(wOm(r))return{redirects:r,errors:[]};if(!rjl(r))return{redirects:[],errors:["Failed to load redirects: `redirects` must be either a list of redirects or a list of filepaths, not a mix of both"]};let n=await Promise.allSettled(r.map(s=>TOm({filepath:s,absoluteFilepathToDocsConfig:t}))),i=[],o=[];for(let s of n)if(s.status==="fulfilled")o.push(...s.value);else if(s.reason instanceof T)i.push(s.reason.message);else throw s.reason;return{redirects:o,errors:i}}function ALo({redirects:e,absoluteFilepathToDocsConfig:t}){if(e==null)return[];let r=typeof e=="string"?[e]:e;return rjl(r)?r.filter(n=>n.trim().length>0).map(n=>Rn(Vr(t),n)):[]}function wOm(e){return e.every(t=>typeof t!="string")}function rjl(e){return e.every(t=>typeof t=="string")}async function TOm({filepath:e,absoluteFilepathToDocsConfig:t}){if(e.trim().length===0)throw new T({message:"Failed to load redirects: `redirects` contains an empty filepath",code:T.Code.ParseError});let r=Rn(Vr(t),e),n;try{n=await(0,JGr.stat)(r)}catch(a){throw new T({message:a instanceof Error&&sx(a)?`Failed to load redirects: ${r} does not exist`:`Failed to load redirects from ${r}: ${en(a)}`,code:T.Code.ParseError})}if(!n.isFile())throw new T({message:`Failed to load redirects: ${r} is not a file`,code:T.Code.ParseError});let i;try{i=(await(0,JGr.readFile)(r)).toString()}catch(a){throw new T({message:`Failed to read ${r}: ${en(a)}`,code:T.Code.ParseError})}let o;try{o=Er.load(i)}catch(a){throw a instanceof Er.YAMLException?new T({message:`Failed to parse ${r}: ${a.message}`,code:T.Code.ParseError}):a}if(o==null)throw new T({message:`Failed to parse ${r}: the file is empty and must contain a \`redirects\` list`,code:T.Code.ParseError});if(Array.isArray(o))throw new T({message:`Failed to parse ${r}: the file must nest the list under a top-level \`redirects\` key`,code:T.Code.ParseError});let s=SOm.safeParse(RS(o));if(!s.success)throw new T({message:`Failed to parse ${r}. The file must contain only a \`redirects\` list:
|
|
499
499
|
${s.error.issues.map(a=>` - ${a.path.join(".")}: ${a.message}`).join(`
|
|
500
500
|
`)}`,code:T.Code.ParseError});return s.data.redirects}var JGr,SOm,yLo=h(()=>{"use strict";yo();gt();rr();Bt();JGr=require("fs/promises");Ho();SOm=si.DocsYmlSchemas.RedirectsFile});function cK(e){return"layout"in e&&Array.isArray(e.layout)}var bLo=h(()=>{"use strict"});function OOm(e){return!e||e.startsWith("<")?!1:e.startsWith(".")||e.includes("/")||e.includes("\\")||e.includes(":")}function Lb(e,t){if(e)return OOm(e)?kh(e,t):e}async function __e({rawDocsConfiguration:e,absolutePathToFernFolder:t,absoluteFilepathToDocsConfig:r,context:n,buildRefVersions:i=!0}){let{instances:o,title:s,tabs:a,products:c,versions:l,navigation:u,navbarLinks:p,footerLinks:d,defaultLanguage:f,metadata:m,redirects:g,remotePaths:A,logo:b,favicon:I,backgroundImage:C,colors:x,typography:S,layout:B,integrations:D,css:R,js:O,aiChat:z,aiSearch:X,agents:ee,pageActions:te,experimental:ae}=e,le=bst(e.landingPage,r),se=e.settings?.folderTitleSource,he=KOm({tabs:a,products:c,rootChangelog:e.changelog,versions:l,navigation:u,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:se,buildRefVersions:i}),xe=he.then(Xe=>kFl({files:Fde({navigation:Xe,landingPage:le}),absolutePathToFernFolder:t})),Te=BOm(b,r),pe=kh(I,r),ue=DOm(C,r),Pe=S!=null?JOm({rawTypography:S,absoluteFilepathToDocsConfig:r}):void 0,Ie=fVt({redirects:g,absoluteFilepathToDocsConfig:r}),je=pVt({profiles:e.profiles,absoluteFilepathToDocsConfig:r}),_e=ROm(R,r),at=NOm(O,r),vt=gPm(m,r,n),Et=UOm({rawPath:e.integrations?.context7,absoluteFilepathToDocsConfig:r,context:n}),Nt=ELo({rawPath:ee?.llmsTxt,absoluteFilepathToDocsConfig:r}),tr=ELo({rawPath:ee?.llmsFullTxt,absoluteFilepathToDocsConfig:r}),ye=ELo({rawPath:ee?.robotsTxt,absoluteFilepathToDocsConfig:r}),ge=e.translations?.map(Xe=>si.DocsYmlSchemas.normalizeTranslationConfig(Xe)).find(Xe=>Xe.default===!0)?.lang??(e.translations?.[0]!=null?si.DocsYmlSchemas.normalizeTranslationConfig(e.translations[0]).lang:void 0),Je=xe.then(Xe=>yPm({translations:e.translations,defaultLocale:ge,pages:Xe,absolutePathToFernFolder:t,context:n})),ft=bPm({translations:e.translations,defaultLocale:ge,absolutePathToFernFolder:t,context:n}),[Ce,we,ut,Ue,ze,ot,bt,ir,Tn,Dr,Yn,Ht,vr]=await Promise.all([he,xe,Pe,_e,at,vt,Ie,Et,Nt,tr,ye,Je,ft]),We=LOm(e.theme),Ge=We?.tabs!=null&&typeof We.tabs=="object"?We.tabs:void 0,q=Ge?.placement??B?.tabsPlacement??"sidebar",Se=Ge?.alignment??"left";return q==="sidebar"&&Se==="center"&&n.logger.warn("Tabs alignment 'center' is not supported when tabs placement is 'sidebar'. The alignment will be ignored."),POm({externalSitemaps:ae?.externalSitemaps,siteLocales:e.translations?.map(Xe=>si.DocsYmlSchemas.normalizeTranslationConfig(Xe).lang)??[e.settings?.language??"en"],context:n}),{title:s,instances:o,profiles:xPm(await je),profile:e.profile,roles:e.roles,libraries:cjl(e.libraries),pages:we,translationPages:Ht,translationNavigationOverlays:vr,landingPage:le,navigation:Ce,navbarLinks:ljl(p,r),footerLinks:hPm(d),defaultLanguage:f,languages:e.languages,translations:e.translations,announcement:e.announcement,metadata:ot,redirects:bt,remotePaths:A,logo:Te,favicon:pe,backgroundImage:ue,colors:BFl(x,n),typography:ut,layout:GOm(B,Ge?.alignment,Ge?.placement),variantsLayout:VOm(B),settings:_Om(e.settings,n),context7File:ir,llmsTxtFile:Tn,llmsFullTxtFile:Dr,robotsTxtFile:Yn,theme:We,globalTheme:e.globalTheme,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:D!=null?{intercom:D.intercom??void 0}:void 0,css:Ue,js:ze,aiChatConfig:X??z,agents:ee,pageActions:jOm(te,r),header:kh(e.header,r),footer:kh(e.footer,r),experimental:ae}}function POm({externalSitemaps:e,siteLocales:t,context:r}){if(e==null)return;let n=t.map(i=>i.trim().toLowerCase());for(let i of e){if(typeof i=="string"||i.locale==null)continue;let o=i.locale.trim().toLowerCase(),s=o.split(/[-_]/)[0];n.some(c=>c===o||c.split(/[-_]/)[0]===s)||r.logger.warn(`external-sitemaps: locale '${i.locale}' for ${i.url} does not match any site locale (${t.join(", ")}); this sitemap will not be indexed.`)}}function BOm(e,t){return e!=null?{dark:kh(e.dark,t),light:kh(e.light,t),height:e.height,href:e.href!=null?tn.Url(e.href):void 0,rightText:e.rightText}:void 0}function DOm(e,t){if(e!=null)if(typeof e=="string"){let r=kh(e,t);return{dark:r,light:r}}else{let r=kh(e.dark,t),n=kh(e.light,t);return{dark:r,light:n}}}async function ROm(e,t){if(e==null)return;let r=typeof e=="string"?[e]:e;return{inline:await Promise.all(r.map(async n=>(await(0,jde.readFile)(kh(n,t))).toString()))}}function kOm(e){return Object.hasOwn(e,"url")}function FOm(e){return Object.hasOwn(e,"path")}async function NOm(e,t){let r=[],n=[];if(e==null)return{files:[]};let i=Array.isArray(e)?e:[e];for(let o of i)typeof o=="string"?n.push({absolutePath:kh(o,t)}):kOm(o)?r.push({strategy:o.strategy,url:tn.Url(o.url),disableSri:o.disableSri}):FOm(o)&&n.push({absolutePath:kh(o.path,t),strategy:o.strategy});return{remote:r,files:n}}function jOm(e,t){return e==null?void 0:{default:e.default!=null?QOm(e.default):void 0,options:{askAi:e.options?.askAi??!0,copyPage:e.options?.copyPage??!0,viewAsMarkdown:e.options?.viewAsMarkdown??!0,openAi:e.options?.chatgpt??!0,claude:e.options?.claude??!0,cursor:e.options?.cursor??!0,claudeCode:e.options?.claudeCode??!0,mcp:e.options?.mcp??!0,vscode:e.options?.vscode??!1,custom:(e.options?.custom??[]).map(n=>MOm(n,t)),skills:zOm(e.options?.skills)}}}function zOm(e){if(e!=null)return{title:e.title,description:e.description,learnMoreUrl:e.learnMoreUrl,repository:e.repository,installCommand:e.installCommand,skills:e.skills?.map(t=>({name:t.name,description:t.description,url:t.url}))}}function QOm(e){switch(e){case"copy-page":return"copyPage";case"view-as-markdown":return"viewAsMarkdown";case"ask-ai":return"askAi";case"chatgpt":return"openAi";case"claude":return"claude";case"cursor":return"cursor";case"claude-code":return"claudeCode";case"vscode":return"vscode";default:Ze(e)}}function MOm(e,t){return{title:e.title,subtitle:e.subtitle,url:e.url,icon:Lb(e.icon,t),default:e.default}}function LOm(e){if(e==null)return;let t;if(e.tabs!=null&&typeof e.tabs=="object"){let r=e.tabs;t={style:r.style??"default",alignment:r.alignment,placement:r.placement}}else t=e.tabs??"default";return{sidebar:e.sidebar??"default",tabs:t,body:e.body??"default",pageActions:e.pageActions??"default",footerNav:e.footerNav??"default",languageSwitcher:e.languageSwitcher??"default",productSwitcher:e.productSwitcher??"default",siteSwitcher:e.siteSwitcher,codeBlocks:e.codeBlocks}}function _Om(e,t){if(e==null)return;if(e.embedding!=null){let n=si.getEmbeddingOriginErrors(e.embedding.allowedOrigins);n.length>0&&t.failAndThrow(n.join(`
|
|
501
|
-
`))}let r=(e.search?.defaultFilterByCurrentProduct??!1)||(e.defaultSearchFilters??!1);return{darkModeCode:e.darkModeCode??!1,defaultSearchFilters:r,search:{prioritizeCurrentProduct:e.search?.prioritizeCurrentProduct,defaultFilterByCurrentProduct:r,externalSitemaps:void 0},language:e.language??"en",disableSearch:e.disableSearch??!1,hide404Page:e.hide404Page??!1,httpSnippets:e.httpSnippets??!0,searchText:e.searchText??void 0,useJavascriptAsTypescript:e.useJavascriptAsTypescript??!1,disableExplorerProxy:e.disableExplorerProxy??!1,disableEnvironmentEditing:e.disableEnvironmentEditing??!1,disableAnalytics:e.disableAnalytics??!1,websocketOneofDisplay:e.websocketOneofDisplay??void 0,embedding:e.embedding,showHeadersInExamples:e.showHeadersInExamples??!1,requireAnalyticsConsent:e.requireAnalyticsConsent??!1}}async function ELo({rawPath:e,absoluteFilepathToDocsConfig:t}){if(e==null)return;let r=kh(e,t);return await(0,jde.readFile)(r,"utf8"),r}async function UOm({rawPath:e,absoluteFilepathToDocsConfig:t,context:r}){if(e==null)return;let n=kh(e,t),i=await(0,jde.readFile)(n,"utf8");try{JSON.parse(i)}catch(o){r.failAndThrow(`Invalid JSON in Context7 config file: ${e}`,Zn(o),{code:T.Code.ConfigError})}return n}function VOm(e){if(e?.tabMenu!=null)return{tabMenuDefaultColumnHeight:e.tabMenu?.defaultColumnHeight??void 0,tabMenuInteractOnClickOnly:e.tabMenu?.interactOnClickOnly??void 0}}function GOm(e,t,r){if(e==null&&t==null&&r==null)return;let n=t==="center"?"CENTER":"LEFT",i=r==="header"?"HEADER":r==="sidebar"?"SIDEBAR":void 0;return e==null?{...i!=null?{tabsPlacement:i}:{},tabsAlignment:n}:{pageWidth:e.pageWidth?.trim().toLowerCase()==="full"?{type:"full"}:XGr(e.pageWidth),contentWidth:XGr(e.contentWidth),sidebarWidth:XGr(e.sidebarWidth),headerHeight:XGr(e.headerHeight),searchbarPlacement:e.searchbarPlacement==="header"?"HEADER":e.searchbarPlacement==="header-tabs"?"HEADER_TABS":"SIDEBAR",switcherPlacement:!e.switcherPlacement||e.switcherPlacement==="header"?"HEADER":"SIDEBAR",tabsPlacement:i??(e.tabsPlacement==="header"?"HEADER":"SIDEBAR"),contentAlignment:e.contentAlignment==="left"?"LEFT":"CENTER",headerPosition:e.headerPosition==="static"?"ABSOLUTE":"FIXED",disableHeader:e.disableHeader??!1,hideNavLinks:e.hideNavLinks??!1,hideFeedback:e.hideFeedback??!1,mobileToc:e.mobileToc??!1,changelogLayout:e.changelogLayout,apiReferenceLayout:e.apiReferenceLayout,apiReferenceExpandProperties:e.apiReferenceExpandProperties,showNavAvailabilityBadges:e.showNavAvailabilityBadges,hideWebhookMethodBadges:e.hideWebhookMethodBadges,breadcrumbs:e.breadcrumbs!=null?{currentPage:e.breadcrumbs.currentPage??!1,sticky:e.breadcrumbs.sticky??!1}:void 0,tabsAlignment:n}}function XGr(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 n=t.match(/^(\d+)rem$/);if(n!=null&&n[1]!=null)return{type:"rem",value:parseFloat(n[1])}}async function qOm({version:e,absolutePathToFernFolder:t,context:r,folderTitleSource:n}){if(e.path==null)throw new T({message:`Version '${e.displayName}' must specify a 'path' or 'ref'.`,code:T.Code.ConfigError});let i=Rn(t,Ee.of(e.path)),o;try{o=Er.load((await(0,jde.readFile)(i)).toString())}catch(u){throw u instanceof Er.YAMLException?new T({message:`Failed to parse version file ${e.path}: ${u.message}`,code:T.Code.ParseError}):u}let s=[],a=RS(o,[],s);s.length>0&&r.logger.warn(`Version file ${e.path} contained null/undefined sections that were ignored: ${s.map(u=>u.join(".")).join(", ")}`);let c=si.RawSchemas.Serializer.VersionFileConfig.parseOrThrow(a),l=await e9r({tabs:c.tabs,rawNavigationConfig:c.navigation,absolutePathToFernFolder:t,absolutePathToConfig:i,context:r,folderTitleSource:n});return{landingPage:bst(c.landingPage,i),version:e.displayName,profile:e.profile,navigation:l,availability:e.availability,slug:e.slug,hidden:e.hidden,default:e.default,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag),announcement:e.announcement,contentSource:void 0}}async function WOm({version:e,ref:t,scope:r,absolutePathToFernFolder:n,context:i,folderTitleSource:o}){let s=await ANl({ref:t,absolutePathToFernFolder:n,context:i}),a=await vNl({materialized:s,scope:r,context:i}),c=await e9r({tabs:a.tabs,rawNavigationConfig:a.navigation,absolutePathToFernFolder:s.absolutePathToFernFolder,absolutePathToConfig:a.absoluteFilepathToConfig,context:i,folderTitleSource:o});return{landingPage:bst(a.landingPage,a.absoluteFilepathToConfig),version:e.displayName,profile:e.profile,navigation:c,availability:e.availability,slug:e.slug,hidden:e.hidden,default:e.default,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag),announcement:e.announcement,contentSource:{displayVersion:e.displayName,ref:s.ref,sha:s.sha,absolutePathToFernFolder:s.absolutePathToFernFolder,libraries:cjl(a.rawLibraries)}}}function HOm(e){let t=e.filter(n=>n.default===!0);if(t.length>1)throw new T({message:`Only one version can set 'default: true', but ${t.length} do: ${t.map(n=>`'${n.displayName}'`).join(", ")}. Remove 'default: true' from all but one version.`,code:T.Code.ConfigError});let r=t[0]??e[0];if(r?.hidden===!0)throw new T({message:`The default version '${r.displayName}' cannot be hidden. Remove 'hidden: true' from it, or set 'default: true' on a version that is not hidden.`,code:T.Code.ConfigError})}async function njl({versions:e,refScope:t,absolutePathToFernFolder:r,context:n,folderTitleSource:i,buildRefVersions:o=!0}){HOm(e);let s=[];for(let a of e){let c=M_e(a);if(c==null){s.push(await qOm({version:a,absolutePathToFernFolder:r,context:n,folderTitleSource:i}));continue}if(a.path!=null)throw new T({message:`Version '${a.displayName}' declares both 'ref' and 'path'. A git-ref-backed version builds its content from the ref, so 'path' is not used. Remove 'path' to build from the ref, or remove 'ref' to build from the working tree.`,code:T.Code.ConfigError});if(!o){n.logger.debug(`Skipping git-ref-backed version '${a.displayName}' (ref '${c}').`);continue}s.push(await WOm({version:a,ref:c,scope:t,absolutePathToFernFolder:r,context:n,folderTitleSource:i}))}return{type:"versioned",versions:s}}async function KOm({tabs:e,products:t,rootChangelog:r,versions:n,navigation:i,absolutePathToFernFolder:o,absolutePathToConfig:s,context:a,folderTitleSource:c,buildRefVersions:l=!0}){if(r!=null&&t==null)throw new T({message:"A top-level `changelog` in docs.yml is only supported alongside `products`. For a site using `versions`, add the changelog to each version's `navigation`; otherwise add it to the top-level `navigation`.",code:T.Code.ConfigError});if(i!=null)return await e9r({tabs:e,rawNavigationConfig:i,absolutePathToFernFolder:o,absolutePathToConfig:s,context:a,folderTitleSource:c});if(t!=null){let u=[];for(let p of t){let d=p.image!=null?Rn(o,p.image):void 0;if("path"in p){let f,m=Rn(o,p.path),g;try{g=Er.load((await(0,jde.readFile)(m)).toString())}catch(C){throw C instanceof Er.YAMLException?new T({message:`Failed to parse product file ${p.path}: ${C.message}`,code:T.Code.ParseError}):C}let A=[],b=RS(g,[],A);A.length>0&&a.logger.warn(`Product file ${p.path} contained null/undefined sections that were ignored: ${A.map(C=>C.join(".")).join(", ")}`);let I=si.RawSchemas.Serializer.ProductFileConfig.parseOrThrow(b);p.versions!=null&&p.versions.length>0?f=await njl({versions:p.versions,refScope:{type:"product",displayName:p.displayName,slug:p.slug},absolutePathToFernFolder:o,context:a,folderTitleSource:c,buildRefVersions:l}):f=await e9r({tabs:I.tabs,rawNavigationConfig:I.navigation,absolutePathToFernFolder:o,absolutePathToConfig:m,context:a,folderTitleSource:c}),u.push({type:"internal",profile:p.profile,landingPage:bst(I.landingPage,m),product:p.displayName,navigation:f,slug:p.slug,subtitle:p.subtitle,icon:Lb(p.icon,s)||"fa-solid fa-code",image:d,viewers:hw(p.viewers),orphaned:p.orphaned,featureFlags:mw(p.featureFlag),announcement:p.announcement})}else if("href"in p&&p.href!=null)u.push({type:"external",product:p.displayName,href:p.href,target:p.target,subtitle:p.subtitle,icon:Lb(p.icon,s)||"fa-solid fa-code",image:d,viewers:hw(p.viewers),orphaned:p.orphaned,featureFlags:mw(p.featureFlag)});else throw new T({message:"Invalid product configuration: product must have either 'path' or valid 'href' property",code:T.Code.ConfigError})}return{type:"productgroup",products:u,changelog:r!=null?await ajl({rawConfig:r,absolutePathToConfig:s}):void 0}}else if(n!=null)return await njl({versions:n,refScope:{type:"site"},absolutePathToFernFolder:o,context:a,folderTitleSource:c,buildRefVersions:l});throw new T({message:"Unexpected. Docs have neither navigation or versions defined.",code:T.Code.ConfigError})}function mw(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 JOm({rawTypography:e,absoluteFilepathToDocsConfig:t}){return{headingsFont:e.headingsFont!=null?await ILo({rawFontConfig:e.headingsFont,absoluteFilepathToDocsConfig:t}):void 0,bodyFont:e.bodyFont!=null?await ILo({rawFontConfig:e.bodyFont,absoluteFilepathToDocsConfig:t}):void 0,codeFont:e.codeFont!=null?await ILo({rawFontConfig:e.codeFont,absoluteFilepathToDocsConfig:t}):void 0}}async function ILo({rawFontConfig:e,absoluteFilepathToDocsConfig:t}){return{name:e.name,variants:await YOm(e,t),display:e.display,fallback:e.fallback,fontVariationSettings:e.fontVariationSettings}}function YOm(e,t){let r=[];return e.path!=null&&r.push({path:e.path,weight:e.weight,style:e.style}),e.paths?.forEach(n=>{typeof n=="string"?r.push({path:n,weight:e.weight,style:e.style}):r.push({path:n.path,weight:n.weight??e.weight,style:n.style??e.style})}),Promise.all(r.map(async n=>({absolutePath:kh(n.path,t),weight:XOm(n.weight),style:n.style})))}function XOm(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 ZOm({tabs:e,item:t,tabMenuMemberItems:r,absolutePathToFernFolder:n,absolutePathToConfig:i,context:o,folderTitleSource:s}){let a=e[t.tab];if(a==null)throw new T({message:`Tab ${t.tab} is not defined in the tabs config.`,code:T.Code.ConfigError});let c=b=>Promise.all(b.map(I=>t9r({rawConfig:I,absolutePathToFernFolder:n,absolutePathToConfig:i,context:o,folderTitleSource:s}))),l=b=>({type:"link",title:b.link,href:b.href,icon:Lb(b.icon,i),target:b.target}),u=async(b,I,C,x)=>({title:b.title,subtitle:b.subtitle,icon:Lb(b.icon,i),layout:await c(I),slug:b.slug,skipUrlSlug:b.skipSlug,profile:b.profile,hidden:b.hidden,default:b.default,viewers:hw(b.viewers),orphaned:b.orphaned,featureFlags:mw(b.featureFlag),nestedVariants:C,tabId:x}),p=b=>b.flatMap(I=>I.type==="group"?I.children:[I]).flatMap(I=>I.type==="variant"?[I.variant]:[]),d=b=>b.some(I=>I.type!=="variant")?b:void 0,f=async b=>{let I=async x=>{if(si.isRawTabVariantLink(x))return l(x);if("group"in x)throw new T({message:`Tab ${t.tab}: variant groups can't be nested inside other groups.`,code:T.Code.ConfigError});return{type:"variant",variant:await u(x,x.layout,void 0)}},C=await Promise.all(b.map(async x=>si.isRawTabVariantGroup(x)?{type:"group",title:x.group,children:await Promise.all(x.items.map(I))}:I(x)));return{variants:p(C),columnHeight:void 0,menu:d(C)}},m=async b=>{let I=r.get(b.tab);if(I==null)throw new T({message:`Tab ${b.tab} in the tab-menu of ${t.tab} has no entry in navigation.`,code:T.Code.ConfigError});let C={...b,title:b.displayName};if(si.isRawTabWithVariantLayouts(I)){let x=await f(I.variants);return{type:"variant",variant:await u(C,[],x,b.tab)}}if(cK(I))return{type:"variant",variant:await u(C,I.layout,void 0,b.tab)};throw new T({message:`Tab ${b.tab} in the tab-menu of ${t.tab} needs a layout or variants in navigation.`,code:T.Code.ConfigError})},g=b=>Promise.all(b.map(async I=>si.isRawTabMenuGroup(I)?{type:"group",title:I.group,children:await Promise.all(I.tabs.map(C=>si.isRawTabMenuLink(C)?Promise.resolve(l(C)):m(C)))}:si.isRawTabMenuLink(I)?l(I):m(I)));if(a.tabMenu!=null||si.isRawTabWithVariantLayouts(t)){let b;if(a.tabMenu!=null){if(si.isRawTabWithVariantLayouts(t)||cK(t))throw new T({message:`Tab ${t.tab} has a tab-menu, so its navigation entry can't also have a layout or variants.`,code:T.Code.ConfigError});let I=await g(a.tabMenu);b={type:"variants",variants:p(I),location:"tab",columnHeight:a.tabMenuColumnHeight??void 0,menu:d(I)}}else if(si.isRawTabWithVariantLayouts(t)){let{variants:I,columnHeight:C,menu:x}=await f(t.variants);b={type:"variants",variants:I,location:"sidebar",columnHeight:C,menu:x}}else throw new T({message:`Tab ${t.tab} has no variants.`,code:T.Code.InternalError});return{title:a.displayName,icon:Lb(a.icon,i),slug:a.slug,skipUrlSlug:a.skipSlug,profile:a.profile,hidden:a.hidden,child:b,viewers:hw(a.viewers),orphaned:a.orphaned,featureFlags:mw(a.featureFlag)}}if(cK(t)){let b=await Promise.all(t.layout.map(I=>t9r({rawConfig:I,absolutePathToFernFolder:n,absolutePathToConfig:i,context:o,folderTitleSource:s})));return{title:a.displayName,icon:Lb(a.icon,i),slug:a.slug,skipUrlSlug:a.skipSlug,profile:a.profile,hidden:a.hidden,child:{type:"layout",layout:b},viewers:hw(a.viewers),orphaned:a.orphaned,featureFlags:mw(a.featureFlag)}}if(a.href!=null)return{title:a.displayName,icon:Lb(a.icon,i),slug:a.slug,skipUrlSlug:a.skipSlug,profile:a.profile,hidden:a.hidden,child:{type:"link",href:a.href,target:a.target},viewers:hw(a.viewers),orphaned:a.orphaned,featureFlags:mw(a.featureFlag)};let A=si.getChangelogFolderFromTabConfig(a);if(A!=null)return{title:a.displayName,icon:Lb(a.icon,i),slug:a.slug,skipUrlSlug:a.skipSlug,profile:a.profile,hidden:a.hidden,child:{type:"changelog",changelog:await r1(kh(A,i),"{md,mdx}")},viewers:hw(a.viewers),orphaned:a.orphaned,featureFlags:mw(a.featureFlag)};Ze(a)}async function e9r({tabs:e={},rawNavigationConfig:t,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o}){if(mPm(t)){let s=si.getRawTabMenuMemberships(e),a=u=>e?.[u.tab]==null&&s.has(u.tab),c=new Map(t.filter(a).map(u=>[u.tab,u]));return{type:"tabbed",items:await Promise.all(t.filter(u=>!a(u)).map(u=>ZOm({tabs:e,item:u,tabMenuMemberItems:c,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o})))}}else return{type:"untabbed",items:await Promise.all(t.map(s=>t9r({rawConfig:s,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o})))}}async function ePm({rawConfig:e,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i}){let o=kh(e.folder,r);await Gt(o)||n.failAndThrow(`Folder not found: ${e.folder}`,void 0,{code:T.Code.ConfigError}),xLo({context:n,sectionTitle:e.folder,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0});let s=e.titleSource??i,a=await mLo({directoryPath:o,titleSource:s}),c=a.find(m=>m.type==="page"&&(m.slug==="index"||m.absolutePath.toLowerCase().endsWith("/index.mdx")||m.absolutePath.toLowerCase().endsWith("/index.md"))),l=c?a.filter(m=>m!==c):a,u=lK.default.basename(o),p=s==="frontmatter"&&c?.type==="page"?(await HGr({absolutePath:c.absolutePath})).title:void 0,d=e.title??p??dLo({name:u}),f=e.slug??WGr({name:u});return{type:"section",title:d,icon:Lb(e.icon,r),contents:l,slug:f,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0,hidden:e.hidden??void 0,skipUrlSlug:e.skipSlug??!1,overviewAbsolutePath:c?.type==="page"?c.absolutePath:void 0,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag),availability:e.availability}}async function t9r({rawConfig:e,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i}){let o=sPm(e);if(ojl(o))return bst(o,r);if(rPm(o))return xLo({context:n,sectionTitle:o.section,collapsed:o.collapsed??void 0,collapsible:o.collapsible??void 0,collapsedByDefault:o.collapsedByDefault??void 0}),{type:"section",title:o.section,icon:Lb(o.icon,r),contents:await Promise.all(o.contents.map(s=>t9r({rawConfig:s,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i}))),slug:o.slug??void 0,collapsed:o.collapsed??void 0,collapsible:o.collapsible??void 0,collapsedByDefault:o.collapsedByDefault??void 0,hidden:o.hidden??void 0,profile:o.profile,skipUrlSlug:o.skipSlug??!1,overviewAbsolutePath:kh(o.path,r),viewers:hw(o.viewers),orphaned:o.orphaned,featureFlags:mw(o.featureFlag),availability:o.availability};if(nPm(o))return{type:"apiSection",openrpc:o.openrpc,title:o.api,icon:Lb(o.icon,r),apiName:o.apiName??void 0,specs:o.specs?.map(s=>({type:s.type,absolutePath:kh(s.path,r),namespace:s.namespace??void 0,absoluteOverlayPaths:s.overlays==null?[]:[kh(s.overlays,r)],absoluteOverridePaths:s.overrides?.map(a=>kh(a,r))??[],settings:s.settings==null?void 0:{...s.settings,...s.settings.errorResponses==null?{}:{errorResponses:{...s.settings.errorResponses,schema:typeof s.settings.errorResponses.schema=="string"?kh(s.settings.errorResponses.schema,r):s.settings.errorResponses.schema}}}})),audiences:o.audiences!=null?{type:"select",audiences:dVt(o.audiences)??[]}:{type:"all"},availability:o.availability,showErrors:o.displayErrors??!0,tagDescriptionPages:o.tagDescriptionPages??!1,snippetsConfiguration:o.snippets!=null?tPm({rawConfig:o.snippets}):void 0,postman:o.postman,navigation:o.layout?.flatMap(s=>$Gr(s,r,n))??[],overviewAbsolutePath:kh(o.summary,r),collapsed:o.collapsed??void 0,hidden:o.hidden??void 0,slug:o.slug,skipUrlSlug:o.skipSlug??!1,flattened:o.flattened??!1,alphabetized:o.alphabetized??!1,sortByAvailability:o.sortByAvailability,paginated:o.paginated??!1,types:o.types??!1,playground:o.playground,viewers:hw(o.viewers),orphaned:o.orphaned,featureFlags:mw(o.featureFlag)};if(sjl(o))return{type:"link",text:o.link,url:o.href,icon:Lb(o.icon,r),target:o.target};if(iPm(o))return await ajl({rawConfig:o,absolutePathToConfig:r});if(aPm(o))return await ePm({rawConfig:o,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i});if(cPm(o))return{type:"librarySection",libraryName:o.library,title:o.title??void 0,slug:o.slug??void 0,viewers:hw(o.viewers),orphaned:o.orphaned,featureFlags:mw(o.featureFlag)};Ze(o)}function bst(e,t){if(e!=null)return{type:"page",title:e.page,absolutePath:kh(e.path,t),slug:e.slug,icon:Lb(e.icon,t),hidden:e.hidden,noindex:e.noindex,profile:e.profile,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag),availability:e.availability}}function $Gr(e,t,r){return typeof e=="string"?[{type:"item",value:e}]:ojl(e)?[bst(e,t)]:sjl(e)?[{type:"link",text:e.link,url:e.href,icon:Lb(e.icon,t),target:e.target}]:uPm(e)?(r!=null&&xLo({context:r,sectionTitle:e.section,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0}),[{type:"section",title:e.section,referencedSubpackages:e.referencedPackages??[],overviewAbsolutePath:kh(e.summary,t),contents:e.contents?.flatMap(n=>$Gr(n,t,r))??[],slug:e.slug,hidden:e.hidden,skipUrlSlug:e.skipSlug,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0,availability:e.availability,icon:Lb(e.icon,t),playground:e.playground,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag)}]):pPm(e)?[{type:"endpoint",endpoint:e.endpoint,title:e.title,icon:Lb(e.icon,t),slug:e.slug,hidden:e.hidden,availability:e.availability,playground:e.playground,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag)}]:fPm(e)?[{type:"operation",operation:e.operation,title:e.title,slug:e.slug,hidden:e.hidden,availability:e.availability,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag)}]:Object.entries(e).map(([n,i])=>dPm(i)?{type:"package",title:i.title,package:n,overviewAbsolutePath:kh(i.summary,t),contents:i.contents?.flatMap(o=>$Gr(o,t,r))??[],slug:i.slug,hidden:i.hidden,skipUrlSlug:i.skipSlug,icon:Lb(i.icon,t),playground:i.playground,availability:i.availability,viewers:hw(i.viewers),orphaned:i.orphaned,featureFlags:mw(i.featureFlag)}:{type:"package",title:void 0,package:n,overviewAbsolutePath:void 0,contents:i.flatMap(o=>$Gr(o,t,r)),hidden:!1,slug:void 0,skipUrlSlug:!1,icon:void 0,playground:void 0,availability:void 0,viewers:void 0,orphaned:void 0,featureFlags:void 0})}function tPm({rawConfig:e}){return{python:e.python,typescript:e.typescript,go:e.go,java:e.java,ruby:e.ruby,csharp:e.csharp,php:e.php,swift:e.swift,cli:e.cli}}function ojl(e){return oi(e)&&typeof e.page=="string"&&typeof e.path=="string"}function rPm(e){return e.section!=null}function nPm(e){return e.api!=null}function sjl(e){return si.RawSchemas,oi(e)&&typeof e.link=="string"&&typeof e.href=="string"}function iPm(e){return oi(e)&&typeof e.changelog=="string"}async function ajl({rawConfig:e,absolutePathToConfig:t}){return{type:"changelog",changelog:await r1(kh(e.changelog,t),"{md,mdx}"),hidden:e.hidden??!1,icon:Lb(e.icon,t),title:e.title??$Om,slug:e.slug,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag)}}function oPm(e){return oi(e)&&typeof e.blog=="string"}function sPm(e){if(!oPm(e))return e;let{blog:t,...r}=e;return{...r,changelog:t,title:e.title??si.DEFAULT_BLOG_TITLE}}function aPm(e){return oi(e)&&typeof e.folder=="string"}function cPm(e){return oi(e)&&typeof e.library=="string"}function lPm(e){return"git"in e}function cjl(e){if(e==null)return;let t={};for(let[r,n]of Object.entries(e)){let i=lPm(n.input)?{type:"git",git:n.input.git,subpath:n.input.subpath,ref:n.input.ref}:{type:"path",path:n.input.path};t[r]={input:i,output:{path:n.output.path},lang:n.lang}}return t}function uPm(e){return oi(e)&&typeof e.section=="string"&&Array.isArray(e.contents)}function pPm(e){return oi(e)&&typeof e.endpoint=="string"}function fPm(e){return oi(e)&&typeof e.operation=="string"}function dPm(e){return!Array.isArray(e)}function kh(e,t){if(e!=null)return Rn(Vr(t),e)}function mPm(e){return Array.isArray(e)&&e.length>0&&e[0].tab!=null}function ljl(e,t){return e?.map(r=>{if(r.type==="github"){let i=r.value;return typeof i=="string"?{type:"github",url:tn.Url(i),viewers:void 0,target:void 0}:{type:"github",url:tn.Url(i.url),viewers:vLo(i.viewers),target:i.target}}let n=vLo(r.viewers);return r.type==="dropdown"?{type:"dropdown",text:r.text,icon:Lb(r.icon,t),rightIcon:Lb(r.rightIcon,t),rounded:r.rounded,viewers:n,links:r.links?.map(i=>({href:i.href,target:i.target,url:tn.Url(i.url??i.href??"/"),text:i.text,icon:Lb(i.icon,t),rightIcon:Lb(i.rightIcon,t),rounded:i.rounded,viewers:vLo(i.viewers)}))??[]}:{type:r.type,text:r.text,url:tn.Url(r.href??r.url??"/"),target:r.target,icon:Lb(r.icon,t),rightIcon:Lb(r.rightIcon,t),rounded:r.rounded,viewers:n}})}function vLo(e){if(e!=null)return Array.isArray(e)?e.map(t=>tn.docs.v1.commons.RoleId(t)):[tn.docs.v1.commons.RoleId(e)]}function hPm(e){if(e==null)return;let t=[];if(Object.keys(e).forEach(r=>{let n=e[r];n!=null&&t.push({type:r,value:tn.Url(n)})}),t.length!==0)return t}async function gPm(e,t,r){if(e!=null)return APm(e,r),{"og:site_name":e.ogSiteName,"og:title":e.ogTitle,"og:description":e.ogDescription,"og:url":e.ogUrl,"og:image":await ZGr(e.ogImage,t),"og:image:width":e.ogImageWidth,"og:image:height":e.ogImageHeight,"og:locale":e.ogLocale,"og:logo":await ZGr(e.ogLogo,t),"twitter:title":e.twitterTitle,"twitter:description":e.twitterDescription,"twitter:image":await ZGr(e.twitterImage,t),"twitter:handle":e.twitterHandle,"twitter:site":e.twitterSite,"twitter:url":e.twitterUrl,"twitter:card":e.twitterCard,"og:dynamic":e.ogDynamic,"og:dynamic:background-image":await ZGr(e.ogDynamicBackgroundImage,t),"og:dynamic:text-color":e.ogDynamicTextColor,"og:dynamic:background-color":e.ogDynamicBackgroundColor,"og:dynamic:logo-color":e.ogDynamicLogoColor,"og:dynamic:show-logo":e.ogDynamicShowLogo,"og:dynamic:show-section":e.ogDynamicShowSection,"og:dynamic:show-description":e.ogDynamicShowDescription,"og:dynamic:show-url":e.ogDynamicShowUrl,"og:dynamic:show-gradient":e.ogDynamicShowGradient,nofollow:void 0,noindex:void 0,canonicalHost:e.canonicalHost}}function APm(e,t){let r=e.ogDynamic===!0,n=[["og:dynamic:background-image",e.ogDynamicBackgroundImage],["og:dynamic:text-color",e.ogDynamicTextColor],["og:dynamic:background-color",e.ogDynamicBackgroundColor],["og:dynamic:logo-color",e.ogDynamicLogoColor],["og:dynamic:show-logo",e.ogDynamicShowLogo],["og:dynamic:show-section",e.ogDynamicShowSection],["og:dynamic:show-description",e.ogDynamicShowDescription],["og:dynamic:show-url",e.ogDynamicShowUrl],["og:dynamic:show-gradient",e.ogDynamicShowGradient]];if(r&&e.ogImage!=null&&t.logger.warn("[metadata] `og:image` is only applied to the homepage when `og:dynamic: true`. All other pages show the dynamically generated image. Remove `og:image` to rely entirely on dynamic generation, or set `og:dynamic: false` to use `og:image` site-wide."),r&&e.twitterImage!=null&&t.logger.warn("[metadata] `twitter:image` is only applied to the homepage when `og:dynamic: true`. All other pages show the dynamically generated image."),!r){let i=n.filter(([,o])=>o!=null).map(([o])=>o);i.length>0&&t.logger.warn(`[metadata] The following settings require \`og:dynamic: true\` and will be ignored: ${i.map(o=>`\`${o}\``).join(", ")}.`)}r&&e.ogDynamicShowLogo===!1&&e.ogDynamicLogoColor!=null&&t.logger.warn("[metadata] `og:dynamic:logo-color` has no effect because `og:dynamic:show-logo: false`. Remove one or the other."),e.ogImage==null&&(e.ogImageWidth!=null||e.ogImageHeight!=null)&&t.logger.warn("[metadata] `og:image:width` / `og:image:height` have no effect without `og:image`."),r&&typeof e.ogDynamicTextColor=="string"&&typeof e.ogDynamicBackgroundColor=="string"&&e.ogDynamicTextColor.trim().toLowerCase()===e.ogDynamicBackgroundColor.trim().toLowerCase()&&t.logger.warn(`[metadata] \`og:dynamic:text-color\` and \`og:dynamic:background-color\` are both set to \`${e.ogDynamicTextColor}\`, which will make text invisible in generated OG images.`)}async function ZGr(e,t){if(e==null)return;if(e.startsWith("http"))return{type:"url",value:e};let r=kh(e,t);return await Gt(r)?{type:"filepath",value:r}:{type:"url",value:e}}function hw(e){if(e!=null){if(typeof e=="string")return[tn.docs.v1.commons.RoleId(e)];if(e.length!==0)return e.map(tn.docs.v1.commons.RoleId)}}function dVt(e){if(e!=null){if(typeof e=="string")return[e];if(e.length!==0)return e}}function xLo({context:e,sectionTitle:t,collapsed:r,collapsible:n,collapsedByDefault:i}){n!=null&&r!=null&&e.failAndThrow(`Section "${t}": cannot use both "collapsible" and the deprecated "collapsed" property. Please use "collapsible" and "collapsed-by-default" instead.`,void 0,{code:T.Code.ConfigError}),i!=null&&n!==!0&&e.failAndThrow(`Section "${t}": "collapsed-by-default" requires "collapsible: true". "collapsed-by-default" has no effect on a non-collapsible section.`,void 0,{code:T.Code.ConfigError})}async function yPm({translations:e,defaultLocale:t,pages:r,absolutePathToFernFolder:n,context:i}){if(e==null||e.length===0)return;let o=lK.default.join(n,"translations"),s={},a=e.map(c=>si.DocsYmlSchemas.normalizeTranslationConfig(c));return await Promise.all(a.map(async({lang:c})=>{if(c===t)return;let l=lK.default.join(o,c);if(!await Gt(l)){i.failAndThrow(`Translation directory for locale "${c}" not found.
|
|
501
|
+
`))}let r=(e.search?.defaultFilterByCurrentProduct??!1)||(e.defaultSearchFilters??!1);return{darkModeCode:e.darkModeCode??!1,defaultSearchFilters:r,search:{prioritizeCurrentProduct:e.search?.prioritizeCurrentProduct,defaultFilterByCurrentProduct:r,popularSearches:e.search?.popularSearches,externalSitemaps:void 0},language:e.language??"en",disableSearch:e.disableSearch??!1,hide404Page:e.hide404Page??!1,httpSnippets:e.httpSnippets??!0,searchText:e.searchText??void 0,useJavascriptAsTypescript:e.useJavascriptAsTypescript??!1,disableExplorerProxy:e.disableExplorerProxy??!1,disableEnvironmentEditing:e.disableEnvironmentEditing??!1,disableAnalytics:e.disableAnalytics??!1,websocketOneofDisplay:e.websocketOneofDisplay??void 0,embedding:e.embedding,showHeadersInExamples:e.showHeadersInExamples??!1,requireAnalyticsConsent:e.requireAnalyticsConsent??!1}}async function ELo({rawPath:e,absoluteFilepathToDocsConfig:t}){if(e==null)return;let r=kh(e,t);return await(0,jde.readFile)(r,"utf8"),r}async function UOm({rawPath:e,absoluteFilepathToDocsConfig:t,context:r}){if(e==null)return;let n=kh(e,t),i=await(0,jde.readFile)(n,"utf8");try{JSON.parse(i)}catch(o){r.failAndThrow(`Invalid JSON in Context7 config file: ${e}`,Zn(o),{code:T.Code.ConfigError})}return n}function VOm(e){if(e?.tabMenu!=null)return{tabMenuDefaultColumnHeight:e.tabMenu?.defaultColumnHeight??void 0,tabMenuInteractOnClickOnly:e.tabMenu?.interactOnClickOnly??void 0}}function GOm(e,t,r){if(e==null&&t==null&&r==null)return;let n=t==="center"?"CENTER":"LEFT",i=r==="header"?"HEADER":r==="sidebar"?"SIDEBAR":void 0;return e==null?{...i!=null?{tabsPlacement:i}:{},tabsAlignment:n}:{pageWidth:e.pageWidth?.trim().toLowerCase()==="full"?{type:"full"}:XGr(e.pageWidth),contentWidth:XGr(e.contentWidth),sidebarWidth:XGr(e.sidebarWidth),headerHeight:XGr(e.headerHeight),searchbarPlacement:e.searchbarPlacement==="header"?"HEADER":e.searchbarPlacement==="header-tabs"?"HEADER_TABS":"SIDEBAR",switcherPlacement:!e.switcherPlacement||e.switcherPlacement==="header"?"HEADER":"SIDEBAR",tabsPlacement:i??(e.tabsPlacement==="header"?"HEADER":"SIDEBAR"),contentAlignment:e.contentAlignment==="left"?"LEFT":"CENTER",headerPosition:e.headerPosition==="static"?"ABSOLUTE":"FIXED",disableHeader:e.disableHeader??!1,hideNavLinks:e.hideNavLinks??!1,hideFeedback:e.hideFeedback??!1,mobileToc:e.mobileToc??!1,changelogLayout:e.changelogLayout,apiReferenceLayout:e.apiReferenceLayout,apiReferenceExpandProperties:e.apiReferenceExpandProperties,showNavAvailabilityBadges:e.showNavAvailabilityBadges,hideWebhookMethodBadges:e.hideWebhookMethodBadges,breadcrumbs:e.breadcrumbs!=null?{currentPage:e.breadcrumbs.currentPage??!1,sticky:e.breadcrumbs.sticky??!1}:void 0,tabsAlignment:n}}function XGr(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 n=t.match(/^(\d+)rem$/);if(n!=null&&n[1]!=null)return{type:"rem",value:parseFloat(n[1])}}async function qOm({version:e,absolutePathToFernFolder:t,context:r,folderTitleSource:n}){if(e.path==null)throw new T({message:`Version '${e.displayName}' must specify a 'path' or 'ref'.`,code:T.Code.ConfigError});let i=Rn(t,Ee.of(e.path)),o;try{o=Er.load((await(0,jde.readFile)(i)).toString())}catch(u){throw u instanceof Er.YAMLException?new T({message:`Failed to parse version file ${e.path}: ${u.message}`,code:T.Code.ParseError}):u}let s=[],a=RS(o,[],s);s.length>0&&r.logger.warn(`Version file ${e.path} contained null/undefined sections that were ignored: ${s.map(u=>u.join(".")).join(", ")}`);let c=si.RawSchemas.Serializer.VersionFileConfig.parseOrThrow(a),l=await e9r({tabs:c.tabs,rawNavigationConfig:c.navigation,absolutePathToFernFolder:t,absolutePathToConfig:i,context:r,folderTitleSource:n});return{landingPage:bst(c.landingPage,i),version:e.displayName,profile:e.profile,navigation:l,availability:e.availability,slug:e.slug,hidden:e.hidden,default:e.default,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag),announcement:e.announcement,contentSource:void 0}}async function WOm({version:e,ref:t,scope:r,absolutePathToFernFolder:n,context:i,folderTitleSource:o}){let s=await ANl({ref:t,absolutePathToFernFolder:n,context:i}),a=await vNl({materialized:s,scope:r,context:i}),c=await e9r({tabs:a.tabs,rawNavigationConfig:a.navigation,absolutePathToFernFolder:s.absolutePathToFernFolder,absolutePathToConfig:a.absoluteFilepathToConfig,context:i,folderTitleSource:o});return{landingPage:bst(a.landingPage,a.absoluteFilepathToConfig),version:e.displayName,profile:e.profile,navigation:c,availability:e.availability,slug:e.slug,hidden:e.hidden,default:e.default,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag),announcement:e.announcement,contentSource:{displayVersion:e.displayName,ref:s.ref,sha:s.sha,absolutePathToFernFolder:s.absolutePathToFernFolder,libraries:cjl(a.rawLibraries)}}}function HOm(e){let t=e.filter(n=>n.default===!0);if(t.length>1)throw new T({message:`Only one version can set 'default: true', but ${t.length} do: ${t.map(n=>`'${n.displayName}'`).join(", ")}. Remove 'default: true' from all but one version.`,code:T.Code.ConfigError});let r=t[0]??e[0];if(r?.hidden===!0)throw new T({message:`The default version '${r.displayName}' cannot be hidden. Remove 'hidden: true' from it, or set 'default: true' on a version that is not hidden.`,code:T.Code.ConfigError})}async function njl({versions:e,refScope:t,absolutePathToFernFolder:r,context:n,folderTitleSource:i,buildRefVersions:o=!0}){HOm(e);let s=[];for(let a of e){let c=M_e(a);if(c==null){s.push(await qOm({version:a,absolutePathToFernFolder:r,context:n,folderTitleSource:i}));continue}if(a.path!=null)throw new T({message:`Version '${a.displayName}' declares both 'ref' and 'path'. A git-ref-backed version builds its content from the ref, so 'path' is not used. Remove 'path' to build from the ref, or remove 'ref' to build from the working tree.`,code:T.Code.ConfigError});if(!o){n.logger.debug(`Skipping git-ref-backed version '${a.displayName}' (ref '${c}').`);continue}s.push(await WOm({version:a,ref:c,scope:t,absolutePathToFernFolder:r,context:n,folderTitleSource:i}))}return{type:"versioned",versions:s}}async function KOm({tabs:e,products:t,rootChangelog:r,versions:n,navigation:i,absolutePathToFernFolder:o,absolutePathToConfig:s,context:a,folderTitleSource:c,buildRefVersions:l=!0}){if(r!=null&&t==null)throw new T({message:"A top-level `changelog` in docs.yml is only supported alongside `products`. For a site using `versions`, add the changelog to each version's `navigation`; otherwise add it to the top-level `navigation`.",code:T.Code.ConfigError});if(i!=null)return await e9r({tabs:e,rawNavigationConfig:i,absolutePathToFernFolder:o,absolutePathToConfig:s,context:a,folderTitleSource:c});if(t!=null){let u=[];for(let p of t){let d=p.image!=null?Rn(o,p.image):void 0;if("path"in p){let f,m=Rn(o,p.path),g;try{g=Er.load((await(0,jde.readFile)(m)).toString())}catch(C){throw C instanceof Er.YAMLException?new T({message:`Failed to parse product file ${p.path}: ${C.message}`,code:T.Code.ParseError}):C}let A=[],b=RS(g,[],A);A.length>0&&a.logger.warn(`Product file ${p.path} contained null/undefined sections that were ignored: ${A.map(C=>C.join(".")).join(", ")}`);let I=si.RawSchemas.Serializer.ProductFileConfig.parseOrThrow(b);p.versions!=null&&p.versions.length>0?f=await njl({versions:p.versions,refScope:{type:"product",displayName:p.displayName,slug:p.slug},absolutePathToFernFolder:o,context:a,folderTitleSource:c,buildRefVersions:l}):f=await e9r({tabs:I.tabs,rawNavigationConfig:I.navigation,absolutePathToFernFolder:o,absolutePathToConfig:m,context:a,folderTitleSource:c}),u.push({type:"internal",profile:p.profile,landingPage:bst(I.landingPage,m),product:p.displayName,navigation:f,slug:p.slug,subtitle:p.subtitle,icon:Lb(p.icon,s)||"fa-solid fa-code",image:d,viewers:hw(p.viewers),orphaned:p.orphaned,featureFlags:mw(p.featureFlag),announcement:p.announcement})}else if("href"in p&&p.href!=null)u.push({type:"external",product:p.displayName,href:p.href,target:p.target,subtitle:p.subtitle,icon:Lb(p.icon,s)||"fa-solid fa-code",image:d,viewers:hw(p.viewers),orphaned:p.orphaned,featureFlags:mw(p.featureFlag)});else throw new T({message:"Invalid product configuration: product must have either 'path' or valid 'href' property",code:T.Code.ConfigError})}return{type:"productgroup",products:u,changelog:r!=null?await ajl({rawConfig:r,absolutePathToConfig:s}):void 0}}else if(n!=null)return await njl({versions:n,refScope:{type:"site"},absolutePathToFernFolder:o,context:a,folderTitleSource:c,buildRefVersions:l});throw new T({message:"Unexpected. Docs have neither navigation or versions defined.",code:T.Code.ConfigError})}function mw(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 JOm({rawTypography:e,absoluteFilepathToDocsConfig:t}){return{headingsFont:e.headingsFont!=null?await ILo({rawFontConfig:e.headingsFont,absoluteFilepathToDocsConfig:t}):void 0,bodyFont:e.bodyFont!=null?await ILo({rawFontConfig:e.bodyFont,absoluteFilepathToDocsConfig:t}):void 0,codeFont:e.codeFont!=null?await ILo({rawFontConfig:e.codeFont,absoluteFilepathToDocsConfig:t}):void 0}}async function ILo({rawFontConfig:e,absoluteFilepathToDocsConfig:t}){return{name:e.name,variants:await YOm(e,t),display:e.display,fallback:e.fallback,fontVariationSettings:e.fontVariationSettings}}function YOm(e,t){let r=[];return e.path!=null&&r.push({path:e.path,weight:e.weight,style:e.style}),e.paths?.forEach(n=>{typeof n=="string"?r.push({path:n,weight:e.weight,style:e.style}):r.push({path:n.path,weight:n.weight??e.weight,style:n.style??e.style})}),Promise.all(r.map(async n=>({absolutePath:kh(n.path,t),weight:XOm(n.weight),style:n.style})))}function XOm(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 ZOm({tabs:e,item:t,tabMenuMemberItems:r,absolutePathToFernFolder:n,absolutePathToConfig:i,context:o,folderTitleSource:s}){let a=e[t.tab];if(a==null)throw new T({message:`Tab ${t.tab} is not defined in the tabs config.`,code:T.Code.ConfigError});let c=b=>Promise.all(b.map(I=>t9r({rawConfig:I,absolutePathToFernFolder:n,absolutePathToConfig:i,context:o,folderTitleSource:s}))),l=b=>({type:"link",title:b.link,href:b.href,icon:Lb(b.icon,i),target:b.target}),u=async(b,I,C,x)=>({title:b.title,subtitle:b.subtitle,icon:Lb(b.icon,i),layout:await c(I),slug:b.slug,skipUrlSlug:b.skipSlug,profile:b.profile,hidden:b.hidden,default:b.default,viewers:hw(b.viewers),orphaned:b.orphaned,featureFlags:mw(b.featureFlag),nestedVariants:C,tabId:x}),p=b=>b.flatMap(I=>I.type==="group"?I.children:[I]).flatMap(I=>I.type==="variant"?[I.variant]:[]),d=b=>b.some(I=>I.type!=="variant")?b:void 0,f=async b=>{let I=async x=>{if(si.isRawTabVariantLink(x))return l(x);if("group"in x)throw new T({message:`Tab ${t.tab}: variant groups can't be nested inside other groups.`,code:T.Code.ConfigError});return{type:"variant",variant:await u(x,x.layout,void 0)}},C=await Promise.all(b.map(async x=>si.isRawTabVariantGroup(x)?{type:"group",title:x.group,children:await Promise.all(x.items.map(I))}:I(x)));return{variants:p(C),columnHeight:void 0,menu:d(C)}},m=async b=>{let I=r.get(b.tab);if(I==null)throw new T({message:`Tab ${b.tab} in the tab-menu of ${t.tab} has no entry in navigation.`,code:T.Code.ConfigError});let C={...b,title:b.displayName};if(si.isRawTabWithVariantLayouts(I)){let x=await f(I.variants);return{type:"variant",variant:await u(C,[],x,b.tab)}}if(cK(I))return{type:"variant",variant:await u(C,I.layout,void 0,b.tab)};throw new T({message:`Tab ${b.tab} in the tab-menu of ${t.tab} needs a layout or variants in navigation.`,code:T.Code.ConfigError})},g=b=>Promise.all(b.map(async I=>si.isRawTabMenuGroup(I)?{type:"group",title:I.group,children:await Promise.all(I.tabs.map(C=>si.isRawTabMenuLink(C)?Promise.resolve(l(C)):m(C)))}:si.isRawTabMenuLink(I)?l(I):m(I)));if(a.tabMenu!=null||si.isRawTabWithVariantLayouts(t)){let b;if(a.tabMenu!=null){if(si.isRawTabWithVariantLayouts(t)||cK(t))throw new T({message:`Tab ${t.tab} has a tab-menu, so its navigation entry can't also have a layout or variants.`,code:T.Code.ConfigError});let I=await g(a.tabMenu);b={type:"variants",variants:p(I),location:"tab",columnHeight:a.tabMenuColumnHeight??void 0,menu:d(I)}}else if(si.isRawTabWithVariantLayouts(t)){let{variants:I,columnHeight:C,menu:x}=await f(t.variants);b={type:"variants",variants:I,location:"sidebar",columnHeight:C,menu:x}}else throw new T({message:`Tab ${t.tab} has no variants.`,code:T.Code.InternalError});return{title:a.displayName,icon:Lb(a.icon,i),slug:a.slug,skipUrlSlug:a.skipSlug,profile:a.profile,hidden:a.hidden,child:b,viewers:hw(a.viewers),orphaned:a.orphaned,featureFlags:mw(a.featureFlag)}}if(cK(t)){let b=await Promise.all(t.layout.map(I=>t9r({rawConfig:I,absolutePathToFernFolder:n,absolutePathToConfig:i,context:o,folderTitleSource:s})));return{title:a.displayName,icon:Lb(a.icon,i),slug:a.slug,skipUrlSlug:a.skipSlug,profile:a.profile,hidden:a.hidden,child:{type:"layout",layout:b},viewers:hw(a.viewers),orphaned:a.orphaned,featureFlags:mw(a.featureFlag)}}if(a.href!=null)return{title:a.displayName,icon:Lb(a.icon,i),slug:a.slug,skipUrlSlug:a.skipSlug,profile:a.profile,hidden:a.hidden,child:{type:"link",href:a.href,target:a.target},viewers:hw(a.viewers),orphaned:a.orphaned,featureFlags:mw(a.featureFlag)};let A=si.getChangelogFolderFromTabConfig(a);if(A!=null)return{title:a.displayName,icon:Lb(a.icon,i),slug:a.slug,skipUrlSlug:a.skipSlug,profile:a.profile,hidden:a.hidden,child:{type:"changelog",changelog:await r1(kh(A,i),"{md,mdx}")},viewers:hw(a.viewers),orphaned:a.orphaned,featureFlags:mw(a.featureFlag)};Ze(a)}async function e9r({tabs:e={},rawNavigationConfig:t,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o}){if(mPm(t)){let s=si.getRawTabMenuMemberships(e),a=u=>e?.[u.tab]==null&&s.has(u.tab),c=new Map(t.filter(a).map(u=>[u.tab,u]));return{type:"tabbed",items:await Promise.all(t.filter(u=>!a(u)).map(u=>ZOm({tabs:e,item:u,tabMenuMemberItems:c,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o})))}}else return{type:"untabbed",items:await Promise.all(t.map(s=>t9r({rawConfig:s,absolutePathToFernFolder:r,absolutePathToConfig:n,context:i,folderTitleSource:o})))}}async function ePm({rawConfig:e,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i}){let o=kh(e.folder,r);await Gt(o)||n.failAndThrow(`Folder not found: ${e.folder}`,void 0,{code:T.Code.ConfigError}),xLo({context:n,sectionTitle:e.folder,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0});let s=e.titleSource??i,a=await mLo({directoryPath:o,titleSource:s}),c=a.find(m=>m.type==="page"&&(m.slug==="index"||m.absolutePath.toLowerCase().endsWith("/index.mdx")||m.absolutePath.toLowerCase().endsWith("/index.md"))),l=c?a.filter(m=>m!==c):a,u=lK.default.basename(o),p=s==="frontmatter"&&c?.type==="page"?(await HGr({absolutePath:c.absolutePath})).title:void 0,d=e.title??p??dLo({name:u}),f=e.slug??WGr({name:u});return{type:"section",title:d,icon:Lb(e.icon,r),contents:l,slug:f,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0,hidden:e.hidden??void 0,skipUrlSlug:e.skipSlug??!1,overviewAbsolutePath:c?.type==="page"?c.absolutePath:void 0,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag),availability:e.availability}}async function t9r({rawConfig:e,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i}){let o=sPm(e);if(ojl(o))return bst(o,r);if(rPm(o))return xLo({context:n,sectionTitle:o.section,collapsed:o.collapsed??void 0,collapsible:o.collapsible??void 0,collapsedByDefault:o.collapsedByDefault??void 0}),{type:"section",title:o.section,icon:Lb(o.icon,r),contents:await Promise.all(o.contents.map(s=>t9r({rawConfig:s,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i}))),slug:o.slug??void 0,collapsed:o.collapsed??void 0,collapsible:o.collapsible??void 0,collapsedByDefault:o.collapsedByDefault??void 0,hidden:o.hidden??void 0,profile:o.profile,skipUrlSlug:o.skipSlug??!1,overviewAbsolutePath:kh(o.path,r),viewers:hw(o.viewers),orphaned:o.orphaned,featureFlags:mw(o.featureFlag),availability:o.availability};if(nPm(o))return{type:"apiSection",openrpc:o.openrpc,title:o.api,icon:Lb(o.icon,r),apiName:o.apiName??void 0,specs:o.specs?.map(s=>({type:s.type,absolutePath:kh(s.path,r),namespace:s.namespace??void 0,absoluteOverlayPaths:s.overlays==null?[]:[kh(s.overlays,r)],absoluteOverridePaths:s.overrides?.map(a=>kh(a,r))??[],settings:s.settings==null?void 0:{...s.settings,...s.settings.errorResponses==null?{}:{errorResponses:{...s.settings.errorResponses,schema:typeof s.settings.errorResponses.schema=="string"?kh(s.settings.errorResponses.schema,r):s.settings.errorResponses.schema}}}})),audiences:o.audiences!=null?{type:"select",audiences:dVt(o.audiences)??[]}:{type:"all"},availability:o.availability,showErrors:o.displayErrors??!0,tagDescriptionPages:o.tagDescriptionPages??!1,snippetsConfiguration:o.snippets!=null?tPm({rawConfig:o.snippets}):void 0,postman:o.postman,navigation:o.layout?.flatMap(s=>$Gr(s,r,n))??[],overviewAbsolutePath:kh(o.summary,r),collapsed:o.collapsed??void 0,hidden:o.hidden??void 0,slug:o.slug,skipUrlSlug:o.skipSlug??!1,flattened:o.flattened??!1,alphabetized:o.alphabetized??!1,sortByAvailability:o.sortByAvailability,paginated:o.paginated??!1,types:o.types??!1,playground:o.playground,viewers:hw(o.viewers),orphaned:o.orphaned,featureFlags:mw(o.featureFlag)};if(sjl(o))return{type:"link",text:o.link,url:o.href,icon:Lb(o.icon,r),target:o.target};if(iPm(o))return await ajl({rawConfig:o,absolutePathToConfig:r});if(aPm(o))return await ePm({rawConfig:o,absolutePathToFernFolder:t,absolutePathToConfig:r,context:n,folderTitleSource:i});if(cPm(o))return{type:"librarySection",libraryName:o.library,title:o.title??void 0,slug:o.slug??void 0,viewers:hw(o.viewers),orphaned:o.orphaned,featureFlags:mw(o.featureFlag)};Ze(o)}function bst(e,t){if(e!=null)return{type:"page",title:e.page,absolutePath:kh(e.path,t),slug:e.slug,icon:Lb(e.icon,t),hidden:e.hidden,noindex:e.noindex,profile:e.profile,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag),availability:e.availability}}function $Gr(e,t,r){return typeof e=="string"?[{type:"item",value:e}]:ojl(e)?[bst(e,t)]:sjl(e)?[{type:"link",text:e.link,url:e.href,icon:Lb(e.icon,t),target:e.target}]:uPm(e)?(r!=null&&xLo({context:r,sectionTitle:e.section,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0}),[{type:"section",title:e.section,referencedSubpackages:e.referencedPackages??[],overviewAbsolutePath:kh(e.summary,t),contents:e.contents?.flatMap(n=>$Gr(n,t,r))??[],slug:e.slug,hidden:e.hidden,skipUrlSlug:e.skipSlug,collapsed:e.collapsed??void 0,collapsible:e.collapsible??void 0,collapsedByDefault:e.collapsedByDefault??void 0,availability:e.availability,icon:Lb(e.icon,t),playground:e.playground,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag)}]):pPm(e)?[{type:"endpoint",endpoint:e.endpoint,title:e.title,icon:Lb(e.icon,t),slug:e.slug,hidden:e.hidden,availability:e.availability,playground:e.playground,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag)}]:fPm(e)?[{type:"operation",operation:e.operation,title:e.title,slug:e.slug,hidden:e.hidden,availability:e.availability,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag)}]:Object.entries(e).map(([n,i])=>dPm(i)?{type:"package",title:i.title,package:n,overviewAbsolutePath:kh(i.summary,t),contents:i.contents?.flatMap(o=>$Gr(o,t,r))??[],slug:i.slug,hidden:i.hidden,skipUrlSlug:i.skipSlug,icon:Lb(i.icon,t),playground:i.playground,availability:i.availability,viewers:hw(i.viewers),orphaned:i.orphaned,featureFlags:mw(i.featureFlag)}:{type:"package",title:void 0,package:n,overviewAbsolutePath:void 0,contents:i.flatMap(o=>$Gr(o,t,r)),hidden:!1,slug:void 0,skipUrlSlug:!1,icon:void 0,playground:void 0,availability:void 0,viewers:void 0,orphaned:void 0,featureFlags:void 0})}function tPm({rawConfig:e}){return{python:e.python,typescript:e.typescript,go:e.go,java:e.java,ruby:e.ruby,csharp:e.csharp,php:e.php,swift:e.swift,cli:e.cli}}function ojl(e){return oi(e)&&typeof e.page=="string"&&typeof e.path=="string"}function rPm(e){return e.section!=null}function nPm(e){return e.api!=null}function sjl(e){return si.RawSchemas,oi(e)&&typeof e.link=="string"&&typeof e.href=="string"}function iPm(e){return oi(e)&&typeof e.changelog=="string"}async function ajl({rawConfig:e,absolutePathToConfig:t}){return{type:"changelog",changelog:await r1(kh(e.changelog,t),"{md,mdx}"),hidden:e.hidden??!1,icon:Lb(e.icon,t),title:e.title??$Om,slug:e.slug,viewers:hw(e.viewers),orphaned:e.orphaned,featureFlags:mw(e.featureFlag)}}function oPm(e){return oi(e)&&typeof e.blog=="string"}function sPm(e){if(!oPm(e))return e;let{blog:t,...r}=e;return{...r,changelog:t,title:e.title??si.DEFAULT_BLOG_TITLE}}function aPm(e){return oi(e)&&typeof e.folder=="string"}function cPm(e){return oi(e)&&typeof e.library=="string"}function lPm(e){return"git"in e}function cjl(e){if(e==null)return;let t={};for(let[r,n]of Object.entries(e)){let i=lPm(n.input)?{type:"git",git:n.input.git,subpath:n.input.subpath,ref:n.input.ref}:{type:"path",path:n.input.path};t[r]={input:i,output:{path:n.output.path},lang:n.lang}}return t}function uPm(e){return oi(e)&&typeof e.section=="string"&&Array.isArray(e.contents)}function pPm(e){return oi(e)&&typeof e.endpoint=="string"}function fPm(e){return oi(e)&&typeof e.operation=="string"}function dPm(e){return!Array.isArray(e)}function kh(e,t){if(e!=null)return Rn(Vr(t),e)}function mPm(e){return Array.isArray(e)&&e.length>0&&e[0].tab!=null}function ljl(e,t){return e?.map(r=>{if(r.type==="github"){let i=r.value;return typeof i=="string"?{type:"github",url:tn.Url(i),viewers:void 0,target:void 0}:{type:"github",url:tn.Url(i.url),viewers:vLo(i.viewers),target:i.target}}let n=vLo(r.viewers);return r.type==="dropdown"?{type:"dropdown",text:r.text,icon:Lb(r.icon,t),rightIcon:Lb(r.rightIcon,t),rounded:r.rounded,viewers:n,links:r.links?.map(i=>({href:i.href,target:i.target,url:tn.Url(i.url??i.href??"/"),text:i.text,icon:Lb(i.icon,t),rightIcon:Lb(i.rightIcon,t),rounded:i.rounded,viewers:vLo(i.viewers)}))??[]}:{type:r.type,text:r.text,url:tn.Url(r.href??r.url??"/"),target:r.target,icon:Lb(r.icon,t),rightIcon:Lb(r.rightIcon,t),rounded:r.rounded,viewers:n}})}function vLo(e){if(e!=null)return Array.isArray(e)?e.map(t=>tn.docs.v1.commons.RoleId(t)):[tn.docs.v1.commons.RoleId(e)]}function hPm(e){if(e==null)return;let t=[];if(Object.keys(e).forEach(r=>{let n=e[r];n!=null&&t.push({type:r,value:tn.Url(n)})}),t.length!==0)return t}async function gPm(e,t,r){if(e!=null)return APm(e,r),{"og:site_name":e.ogSiteName,"og:title":e.ogTitle,"og:description":e.ogDescription,"og:url":e.ogUrl,"og:image":await ZGr(e.ogImage,t),"og:image:width":e.ogImageWidth,"og:image:height":e.ogImageHeight,"og:locale":e.ogLocale,"og:logo":await ZGr(e.ogLogo,t),"twitter:title":e.twitterTitle,"twitter:description":e.twitterDescription,"twitter:image":await ZGr(e.twitterImage,t),"twitter:handle":e.twitterHandle,"twitter:site":e.twitterSite,"twitter:url":e.twitterUrl,"twitter:card":e.twitterCard,"og:dynamic":e.ogDynamic,"og:dynamic:background-image":await ZGr(e.ogDynamicBackgroundImage,t),"og:dynamic:text-color":e.ogDynamicTextColor,"og:dynamic:background-color":e.ogDynamicBackgroundColor,"og:dynamic:logo-color":e.ogDynamicLogoColor,"og:dynamic:show-logo":e.ogDynamicShowLogo,"og:dynamic:show-section":e.ogDynamicShowSection,"og:dynamic:show-description":e.ogDynamicShowDescription,"og:dynamic:show-url":e.ogDynamicShowUrl,"og:dynamic:show-gradient":e.ogDynamicShowGradient,nofollow:void 0,noindex:void 0,canonicalHost:e.canonicalHost}}function APm(e,t){let r=e.ogDynamic===!0,n=[["og:dynamic:background-image",e.ogDynamicBackgroundImage],["og:dynamic:text-color",e.ogDynamicTextColor],["og:dynamic:background-color",e.ogDynamicBackgroundColor],["og:dynamic:logo-color",e.ogDynamicLogoColor],["og:dynamic:show-logo",e.ogDynamicShowLogo],["og:dynamic:show-section",e.ogDynamicShowSection],["og:dynamic:show-description",e.ogDynamicShowDescription],["og:dynamic:show-url",e.ogDynamicShowUrl],["og:dynamic:show-gradient",e.ogDynamicShowGradient]];if(r&&e.ogImage!=null&&t.logger.warn("[metadata] `og:image` is only applied to the homepage when `og:dynamic: true`. All other pages show the dynamically generated image. Remove `og:image` to rely entirely on dynamic generation, or set `og:dynamic: false` to use `og:image` site-wide."),r&&e.twitterImage!=null&&t.logger.warn("[metadata] `twitter:image` is only applied to the homepage when `og:dynamic: true`. All other pages show the dynamically generated image."),!r){let i=n.filter(([,o])=>o!=null).map(([o])=>o);i.length>0&&t.logger.warn(`[metadata] The following settings require \`og:dynamic: true\` and will be ignored: ${i.map(o=>`\`${o}\``).join(", ")}.`)}r&&e.ogDynamicShowLogo===!1&&e.ogDynamicLogoColor!=null&&t.logger.warn("[metadata] `og:dynamic:logo-color` has no effect because `og:dynamic:show-logo: false`. Remove one or the other."),e.ogImage==null&&(e.ogImageWidth!=null||e.ogImageHeight!=null)&&t.logger.warn("[metadata] `og:image:width` / `og:image:height` have no effect without `og:image`."),r&&typeof e.ogDynamicTextColor=="string"&&typeof e.ogDynamicBackgroundColor=="string"&&e.ogDynamicTextColor.trim().toLowerCase()===e.ogDynamicBackgroundColor.trim().toLowerCase()&&t.logger.warn(`[metadata] \`og:dynamic:text-color\` and \`og:dynamic:background-color\` are both set to \`${e.ogDynamicTextColor}\`, which will make text invisible in generated OG images.`)}async function ZGr(e,t){if(e==null)return;if(e.startsWith("http"))return{type:"url",value:e};let r=kh(e,t);return await Gt(r)?{type:"filepath",value:r}:{type:"url",value:e}}function hw(e){if(e!=null){if(typeof e=="string")return[tn.docs.v1.commons.RoleId(e)];if(e.length!==0)return e.map(tn.docs.v1.commons.RoleId)}}function dVt(e){if(e!=null){if(typeof e=="string")return[e];if(e.length!==0)return e}}function xLo({context:e,sectionTitle:t,collapsed:r,collapsible:n,collapsedByDefault:i}){n!=null&&r!=null&&e.failAndThrow(`Section "${t}": cannot use both "collapsible" and the deprecated "collapsed" property. Please use "collapsible" and "collapsed-by-default" instead.`,void 0,{code:T.Code.ConfigError}),i!=null&&n!==!0&&e.failAndThrow(`Section "${t}": "collapsed-by-default" requires "collapsible: true". "collapsed-by-default" has no effect on a non-collapsible section.`,void 0,{code:T.Code.ConfigError})}async function yPm({translations:e,defaultLocale:t,pages:r,absolutePathToFernFolder:n,context:i}){if(e==null||e.length===0)return;let o=lK.default.join(n,"translations"),s={},a=e.map(c=>si.DocsYmlSchemas.normalizeTranslationConfig(c));return await Promise.all(a.map(async({lang:c})=>{if(c===t)return;let l=lK.default.join(o,c);if(!await Gt(l)){i.failAndThrow(`Translation directory for locale "${c}" not found.
|
|
502
502
|
Expected a directory at: ${l}
|
|
503
503
|
Create the directory and add translated versions of your documentation pages.
|
|
504
504
|
The directory should mirror the same relative paths referenced in your docs.yml navigation.
|
|
@@ -1750,6 +1750,10 @@ facet filter, so only results from the current product are shown by
|
|
|
1750
1750
|
default. Equivalent to the legacy \`settings.default-search-filters\`
|
|
1751
1751
|
setting, which is preserved as an alias for backwards compatibility.
|
|
1752
1752
|
|
|
1753
|
+
@default: false`},"popular-searches":{oneOf:[{type:"boolean"},{type:"null"}],description:`If set to true, the empty search box lists the site's most popular
|
|
1754
|
+
searches from the last 30 days, before the reader types. Only
|
|
1755
|
+
searches that return public results are shown.
|
|
1756
|
+
|
|
1753
1757
|
@default: false`}},additionalProperties:!1},"docs.HttpSnippetLanguage":{type:"string",enum:["curl","csharp","go","java","javascript","php","python","ruby","swift","typescript"]},"docs.HttpSnippetsConfig":{anyOf:[{type:"boolean"},{type:"array",items:{$ref:"#/definitions/docs.HttpSnippetLanguage"}}]},"docs.WebSocketOneofDisplay":{type:"string",enum:["flat","grouped"]},"docs.EmbeddingConfig":{type:"object",properties:{"allowed-origins":{type:"array",items:{type:"string"},description:"Origins that may embed your docs in an iframe, e.g. `https://app.example.com` or `https://*.example.com`.\nEach entry is added to the `frame-ancestors` directive of the Content-Security-Policy header."}},required:["allowed-origins"],additionalProperties:!1},"docs.DocsSettingsConfig":{type:"object",properties:{"search-text":{oneOf:[{type:"string"},{type:"null"}],description:`The text to display in the searchbar.
|
|
1754
1758
|
|
|
1755
1759
|
@default: Search`},"disable-search":{oneOf:[{type:"boolean"},{type:"null"}],description:`If set to true, the searchbar will be disabled. Use this if you want to use a custom search solution.
|
|
@@ -3479,7 +3483,7 @@ ${zeu.default.cursorShow}`)}releaseCursor(){this.extraLinesUnderPrompt>0&&zqo(th
|
|
|
3479
3483
|
`).length),this}updateBottomBar(t){return g9t(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+`
|
|
3480
3484
|
`}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&&UZr(this.rl,t.length+this.rl.line.length),this.rl.output.write(t)}};var Ud=Ae(Z3(),1),rru=Ae(HGt(),1);var I$r=Ae(Z3(),1),eru=Ae(HGt(),1),v$r=function(e,t,r){return typeof e[t]!="function"?(0,I$r.of)(e):(0,I$r.from)((0,eru.default)(e[t])(r).then(n=>(e[t]=n,e)))};var tru={set:(e,t="",r)=>{let n=e;t.split(".").forEach((i,o,s)=>{i==="__proto__"||i==="constructor"||(o===s.length-1?n[i]=r:(!(i in n)||typeof n[i]!="object")&&(n[i]={}),n=n[i])})},get:(e,t="",r)=>{let n=o=>String.prototype.split.call(t,o).filter(Boolean).reduce((s,a)=>s!=null?s[a]:s,e),i=n(/[,[\]]+?/)||n(/[,.[\]]+?/);return i===void 0||i===e?r:i}},jlt=class extends BUe{constructor(t,r){super(r),this.prompts=t}run(t,r){this.answers=typeof r=="object"?{...r}:{};let n;return Array.isArray(t)?n=(0,Ud.from)(t):(0,Ud.isObservable)(t)?n=t:Object.values(t).every(i=>typeof i=="object"&&!Array.isArray(i)&&i!=null)?n=(0,Ud.from)(Object.entries(t).map(([i,o])=>({name:i,...o}))):n=(0,Ud.from)([t]),this.process=n.pipe((0,Ud.concatMap)(this.processQuestion.bind(this)),(0,Ud.publish)()),this.process.connect(),this.process.pipe((0,Ud.reduce)((i,o)=>(tru.set(i,o.name,o.answer),i),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,Ud.defer)(()=>(0,Ud.of)(t).pipe((0,Ud.concatMap)(this.setDefaultType.bind(this)),(0,Ud.concatMap)(this.filterIfRunnable.bind(this)),(0,Ud.concatMap)(()=>v$r(t,"message",this.answers)),(0,Ud.concatMap)(()=>v$r(t,"default",this.answers)),(0,Ud.concatMap)(()=>v$r(t,"choices",this.answers)),(0,Ud.concatMap)(this.fetchAnswer.bind(this))))}fetchAnswer(t){let r=this.prompts[t.type];return this.activePrompt=new r(t,this.rl,this.answers),(0,Ud.defer)(()=>(0,Ud.from)(this.activePrompt.run().then(n=>({name:t.name,answer:n}))))}setDefaultType(t){return this.prompts[t.type]||(t.type="input"),(0,Ud.defer)(()=>(0,Ud.of)(t))}filterIfRunnable(t){if(t.askAnswered!==!0&&tru.get(this.answers,t.name)!==void 0)return Ud.EMPTY;if(t.when===!1)return Ud.EMPTY;if(typeof t.when!="function")return(0,Ud.of)(t);let{answers:r}=this;return(0,Ud.defer)(()=>(0,Ud.from)((0,rru.default)(t.when)(r).then(n=>{if(n)return t})).pipe((0,Ud.filter)(n=>n!=null)))}};function nru(e){let t=function(r,n){let i;try{i=new jlt(t.prompts,e)}catch(s){return Promise.reject(s)}let o=i.run(r,n);return o.ui=i,o};return t.prompts={},t.registerPrompt=function(r,n){return t.prompts[r]=n,this},t.restoreDefaultPrompts=function(){this.registerPrompt("list",y9t),this.registerPrompt("input",SUe),this.registerPrompt("number",b9t),this.registerPrompt("confirm",E9t),this.registerPrompt("rawlist",I9t),this.registerPrompt("expand",v9t),this.registerPrompt("checkbox",C9t),this.registerPrompt("password",x9t),this.registerPrompt("editor",R9t)},t.restoreDefaultPrompts(),t}var o7o=nru();function lsh(e,t){o7o.registerPrompt(e,t)}function ush(){o7o.restoreDefaultPrompts()}var psh={prompt:o7o,ui:{BottomBar:k9t,Prompt:jlt},createPromptModule:nru,registerPrompt:lsh,restoreDefaultPrompts:ush,Separator:FQ},Il=psh;var fsh=["prod","pre-prod","beta","dev","local"];function dsh(e){return fsh.some(t=>t===e)}function UK(e="prod"){let t=e?.trim();return t!=null&&dsh(t)?t:"local"}function C$r(){let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal";return e==null||e.trim().length===0?!1:process.env.FERN_DISABLE_TELEMETRY!=="true"}var zlt=require("path");function oru(){let e=msh();return async t=>{for(let r of t)r.module=e(r.filename);return t}}function msh(e=process.argv[1]?(0,zlt.dirname)(process.argv[1]):process.cwd(),t=zlt.sep==="\\"){let r=t?iru(e):e;return n=>{if(!n)return;let i=t?iru(n):n,{dir:o,base:s,ext:a}=zlt.posix.parse(i);(a===".js"||a===".mjs"||a===".cjs")&&(s=s.slice(0,-1*a.length));let c=decodeURIComponent(s);o||(o=".");let l=o.lastIndexOf("/node_modules");if(l>-1)return`${o.slice(l+14).replace(/\//g,".")}:${c}`;if(o.startsWith(r)){let u=o.slice(r.length+1).replace(/\//g,".");return u?`${u}:${c}`:c}return c}}function iru(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}var ST={};ne(ST,{DEFAULT_EXCEPTION_STEPS_CONFIG:()=>_$r,DOMExceptionCoercer:()=>v7o,EXCEPTION_STEP_INTERNAL_FIELDS:()=>V9t,ErrorCoercer:()=>M9t,ErrorEventCoercer:()=>C7o,ErrorPropertiesBuilder:()=>Q9t,EventCoercer:()=>x7o,ExceptionStepsBuffer:()=>O7o,ObjectCoercer:()=>_9t,PrimitiveCoercer:()=>U9t,PromiseRejectionEventCoercer:()=>S7o,ReduceableCache:()=>w7o,StringCoercer:()=>L9t,chromeStackLineParser:()=>y7o,createDefaultStackParser:()=>I7o,createStackParser:()=>Hru,geckoStackLineParser:()=>b7o,getInjectedReleaseId:()=>Oah,getUtf8ByteLength:()=>Jru,nodeStackLineParser:()=>_ru,opera10StackLineParser:()=>Qru,opera11StackLineParser:()=>Mru,resolveExceptionStepsConfig:()=>T7o,reverseAndStripFrames:()=>Wru,stripReservedExceptionStepFields:()=>Sah,winjsStackLineParser:()=>zru});var jQ=(function(e){return e.AnonymousId="anonymous_id",e.DistinctId="distinct_id",e.Props="props",e.EnablePersonProcessing="enable_person_processing",e.PersonMode="person_mode",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.AiQueue="ai_queue",e.AiCaptureQueue="ai_capture_queue",e.LogsQueue="logs_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.PushRegistered="push_registered",e.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",e.SurveyLastSeenDate="survey_last_seen_date",e.SurveysInProgress="surveys_in_progress",e.SurveysSeen="surveys_seen",e.Surveys="surveys",e.RemoteConfig="remote_config",e.FlagsEndpointWasHit="flags_endpoint_was_hit",e.DeviceId="device_id",e})({});function GSe(e){let t=[];return JSON.stringify(e,function(r,n){if(typeof n=="bigint")return n.toString();if(!(typeof n=="function"||typeof n=="symbol")){if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&typeof n=="object"){for(;t.length>0&&t[t.length-1]!==this;)t.pop();if(t.includes(n))return"[Circular]";t.push(n)}return n}})??"null"}var hsh=Array.isArray,aru=Object.prototype,PHv=aru.hasOwnProperty,x$r=aru.toString,e_=hsh||function(e){return x$r.call(e)==="[object Array]"};var F9t=e=>e===Object(e)&&!e_(e);var Ome=e=>e===void 0,pR=e=>x$r.call(e)=="[object String]",s7o=e=>pR(e)&&e.trim().length===0,a7o=e=>e===null,VK=e=>Ome(e)||a7o(e),Qlt=e=>x$r.call(e)=="[object Number]"&&e===e;var cru=e=>x$r.call(e)==="[object Boolean]";function S$r(e){return e===null||typeof e!="object"}function DUe(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function qSe(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return pru(e,Error)}}function lru(e){return DUe(e,"ErrorEvent")}function Mlt(e){return"u">typeof Event&&pru(e,Event)}function uru(e){return DUe(e,"Object")}function pru(e,t){try{return e instanceof t}catch{return!1}}var gsh=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterestbot","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],w$r=new Map,Ash=256;function ysh(e,t){let r="";for(let n=0;n<t.length;n++){let i=t[n];r+=i.length+":"+i}return e.length+":"+e+"|"+t.length+":"+r}var fru=function(e,t=[]){if(!e)return!1;let r=ysh(e,t),n=w$r.get(r);if(n!==void 0)return n;let i=e.toLowerCase(),o=gsh.concat(t).some(s=>i.indexOf(s.toLowerCase())!==-1);return w$r.size>=Ash&&w$r.clear(),w$r.set(r,o),o};function N9t(e,t,r,n,i){return t>r&&(n.warn("min cannot be greater than max."),t=r),Qlt(e)?e>r?(n.warn(" cannot be greater than max: "+r+". Using max value instead."),r):e<t?(n.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(n.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+i),N9t(i??r,t,r,n))}var bsh=864e5,Esh=1,Ish=10;function dru(e={}){return{refillRate:e.exceptionRateLimiterRefillRate??e.__exceptionRateLimiterRefillRate??Esh,bucketSize:e.exceptionRateLimiterBucketSize??e.__exceptionRateLimiterBucketSize??Ish}}var T$r=class{constructor(t){this._buckets={},this._onBucketRateLimited=t._onBucketRateLimited,this._bucketSize=N9t(t.bucketSize,0,100,t._logger),this._refillRate=N9t(t.refillRate,0,this._bucketSize,t._logger),this._refillInterval=N9t(t.refillInterval,0,bsh,t._logger)}_applyRefill(t,r){let n=r-t.lastAccess,i=Math.floor(n/this._refillInterval);if(i>0){let o=i*this._refillRate;t.tokens=Math.min(t.tokens+o,this._bucketSize),t.lastAccess=t.lastAccess+i*this._refillInterval}}consumeRateLimit(t){let r=Date.now(),n=String(t),i=this._buckets[n];return i?this._applyRefill(i,r):(i={tokens:this._bucketSize,lastAccess:r},this._buckets[n]=i),i.tokens===0?!0:(i.tokens--,i.tokens===0&&this._onBucketRateLimited?.(t),i.tokens===0)}stop(){this._buckets={}}};var O$r="0123456789abcdef",P$r=class e{constructor(t){this.bytes=t}static ofInner(t){if(t.length===16)return new e(t);throw new TypeError("not 128-bit length")}static fromFieldsV7(t,r,n,i){if(!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||!Number.isInteger(i)||t<0||r<0||n<0||i<0||t>0xffffffffffff||r>4095||n>1073741823||i>4294967295)throw new RangeError("invalid field value");let o=new Uint8Array(16);return o[0]=t/2**40,o[1]=t/2**32,o[2]=t/2**24,o[3]=t/2**16,o[4]=t/256,o[5]=t,o[6]=112|r>>>8,o[7]=r,o[8]=128|n>>>24,o[9]=n>>>16,o[10]=n>>>8,o[11]=n,o[12]=i>>>24,o[13]=i>>>16,o[14]=i>>>8,o[15]=i,new e(o)}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;default:break}if(r){let n=new Uint8Array(16);for(let i=0;i<16;i+=4){let o=parseInt(r.substring(2*i,2*i+8),16);n[i+0]=o>>>24,n[i+1]=o>>>16,n[i+2]=o>>>8,n[i+3]=o}return new e(n)}throw new SyntaxError("could not parse UUID string")}toString(){let t="";for(let r=0;r<this.bytes.length;r++)t+=O$r.charAt(this.bytes[r]>>>4),t+=O$r.charAt(15&this.bytes[r]),(r===3||r===5||r===7||r===9)&&(t+="-");return t}toHex(){let t="";for(let r=0;r<this.bytes.length;r++)t+=O$r.charAt(this.bytes[r]>>>4),t+=O$r.charAt(15&this.bytes[r]);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 n=this.bytes[r]-t.bytes[r];if(n!==0)return Math.sign(n)}return 0}},c7o=class{constructor(t){this.timestamp=0,this.counter=0,this.random=t??vsh()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(t,r){let n=this.generateOrAbortCore(t,r);return n===void 0&&(this.timestamp=0,n=this.generateOrAbortCore(t,r)),n}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))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return P$r.fromFieldsV7(this.timestamp,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}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,P$r.ofInner(t)}},vsh=()=>({nextUint32:()=>65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random())>>>0}),mru,F2=()=>Csh().toString(),Csh=()=>(mru||(mru=new c7o)).generate();var B$r=class{add(t){let r=F2(),n=++this.nextId;return this.promiseByIds[r]={id:n,promise:t},t.catch(()=>{}).finally(()=>{delete this.promiseByIds[r]}),t}async join(){let t=Object.values(this.promiseByIds).map(n=>n.promise),r=t.length;for(;r>0;)await Promise.all(t),t=Object.values(this.promiseByIds).map(n=>n.promise),r=t.length}getPromises(t=[],r=this.nextId){let n=new Set(t);return Object.values(this.promiseByIds).filter(i=>i.id<=r&&!n.has(i.promise)).map(i=>i.promise)}get maxId(){return this.nextId}get length(){return Object.keys(this.promiseByIds).length}constructor(){this.promiseByIds={},this.nextId=0}};function xsh(e=console){return{log:e.log.bind(e),warn:e.warn.bind(e),error:e.error.bind(e),debug:e.debug.bind(e)}}var hru=(e,t,r)=>{function n(o,...s){t(()=>{let a=r[o];a(e,...s)})}return{debug:(...o)=>{n("debug",...o)},info:(...o)=>{n("log",...o)},warn:(...o)=>{n("warn",...o)},error:(...o)=>{n("error",...o)},critical:(...o)=>{r.error(e,...o)},createLogger:o=>hru(`${e} ${o}`,t,r)}},Ssh=e=>e();function gru(e,t=Ssh){return hru(e,t,xsh())}var _lt="Mobile",R$r="iOS",Llt="Android",Iru="Tablet",GHv=Llt+" "+Iru;var Tsh="Apple",qHv=Tsh+" Watch",vru="Safari",k$r="BlackBerry",Cru="Samsung",Osh=Cru+"Browser",Psh=Cru+" Internet",F$r="Chrome",Bsh=F$r+" OS",Dsh=F$r+" "+R$r,xru="Internet Explorer",Rsh=xru+" "+_lt,p7o="Opera",WHv=p7o+" Mini",Sru="Edge",ksh="Microsoft "+Sru,f7o="Firefox",Fsh=f7o+" "+R$r,d7o="Nintendo",m7o="PlayStation",D$r="Xbox",Nsh=Llt+" "+_lt,jsh=_lt+" "+vru,j9t="Windows",zsh=j9t+" Phone";var wru="Generic",HHv=wru+" "+_lt.toLowerCase(),KHv=wru+" "+Iru.toLowerCase(),Qsh="Konqueror",Msh="Oculus Browser",Aru="Vivaldi",Lsh="Yandex",yru="Whale",_sh="DuckDuckGo",Ush="Pale Moon",bru="Waterfox",Eru="Brave",Tru="Claude",Oru="Codex",Pru="ChatGPT",Vsh="Google Search App",Wb="(\\d+(\\.\\d+)?)",l7o=new RegExp("Version/"+Wb),u7o=new RegExp("("+Tru+"|"+Oru+"|"+Pru+")\\/"+Wb);var JHv=new RegExp(D$r,"i"),YHv=new RegExp(m7o+" \\w+","i"),XHv=new RegExp(d7o+" \\w+","i"),Gsh=new RegExp(k$r+"|PlayBook|BB10","i"),qsh={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000","5.1":"XP","5.2":"XP","6.0":"Vista","6.1":"7","6.2":"8","6.3":"8.1","6.4":"10","10.0":"10"};var ZHv={[Rsh]:[new RegExp("rv:"+Wb)],[ksh]:[new RegExp(Sru+"?\\/"+Wb)],[F$r]:[new RegExp("("+F$r+"|CrMo)\\/"+Wb)],[Dsh]:[new RegExp("CriOS\\/"+Wb)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Wb)],[vru]:[l7o],[jsh]:[l7o],[p7o]:[new RegExp("("+p7o+"|OPR)\\/"+Wb)],[f7o]:[new RegExp(f7o+"\\/"+Wb)],[Fsh]:[new RegExp("FxiOS\\/"+Wb)],[Qsh]:[new RegExp("Konqueror[:/]?"+Wb,"i")],[k$r]:[new RegExp(k$r+" "+Wb),l7o],[Nsh]:[new RegExp("android\\s"+Wb,"i")],[Psh]:[new RegExp(Osh+"\\/"+Wb)],[Msh]:[new RegExp("OculusBrowser\\/"+Wb)],[Aru]:[new RegExp(Aru+"\\/"+Wb)],[Lsh]:[new RegExp("YaBrowser\\/"+Wb)],[yru]:[new RegExp(yru+"\\/"+Wb)],[Eru]:[new RegExp(Eru+"\\/"+Wb)],[Tru]:[u7o],[Oru]:[u7o],[Pru]:[u7o],[_sh]:[new RegExp("(DuckDuckGo|Ddg)\\/"+Wb)],[Ush]:[new RegExp("PaleMoon\\/"+Wb)],[bru]:[new RegExp(bru+"\\/"+Wb)],[Vsh]:[new RegExp("GSA\\/"+Wb)],[xru]:[new RegExp("(rv:|MSIE )"+Wb)],Mozilla:[new RegExp("rv:"+Wb)]};var $Hv=[[new RegExp(D$r+"; "+D$r+" (.*?)[);]","i"),e=>[D$r,e&&e[1]||""]],[new RegExp(d7o,"i"),[d7o,""]],[new RegExp(m7o,"i"),[m7o,""]],[Gsh,[k$r,""]],[new RegExp(j9t,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[zsh,""];if(new RegExp(_lt).test(t)&&!/IEMobile\b/.test(t))return[j9t+" "+_lt,""];let r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){let n=r[1],i=qsh[n]||"";return/arm/i.test(t)&&(i="RT"),[j9t,i]}return[j9t,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){let t=[e[3],e[4],e[5]||"0"];return[R$r,t.join(".")]}return[R$r,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{let t="";return e&&e.length>=3&&(t=Ome(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Llt+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Llt+")","i"),e=>{if(e&&e[2]){let t=[e[2],e[3],e[4]||"0"];return[Llt,t.join(".")]}return[Llt,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{let t=["Mac OS X",""];if(e&&e[1]){let r=[e[1],e[2],e[3]||"0"];t[1]=r.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Bsh,""]],[/Linux|debian/i,["Linux",""]]];var N$r="[Circular]",j$r="[Truncated]",Z5="[Unserializable]",Bru="[Function]",rKv=Date.prototype.getTime,nKv=Date.prototype.toISOString;function ire(e){let t="";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(n>=55296&&n<=56319){let i=e.charCodeAt(r+1);i>=56320&&i<=57343?(t+=e[r]+e[r+1],r++):t+="\uFFFD"}else t+=n>=56320&&n<=57343?"\uFFFD":e[r]}return t}function Pme(e,t){if(!t)return e;let r=[];try{r=Object.keys(t)}catch{r=[]}for(let n of r){let i;try{i=t[n]}catch{i=Z5}Object.defineProperty(e,n,{value:i,enumerable:!0,writable:!0,configurable:!0})}return e}function h7o(e,t=Date.now()){if(typeof e!="string"||!e)return;let r=e.trim(),n=/^\d+\s*,/.test(r)?r.slice(0,r.indexOf(",")).trim():r;if(/^\d+$/.test(n)){let s=1e3*Math.min(Number(n),300);return s>0?s:void 0}if(!/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun)[a-z]*[ ,]/.test(n))return;let i=/^\w{3} \w{3} /.test(n)?n+" GMT":n,o=Date.parse(i)-t;if(!(!Number.isFinite(o)||o<=0))return Math.min(o,3e5)}var RUe=class{record(t){if(t.kind==="too-large")return;if(t.kind!=="retry-later")return void this.reset();if(!t.retryAfterMs)return;let r=this.isOpen(),n=Date.now(),i=Math.min(t.retryAfterMs,3e5);if(!r){this._installedAt=n,this._until=n+i;return}this._until=Math.max(this._until,Math.min(n+i,this._installedAt+3e5))}remainingMs(){let t=Date.now();if(t<this._installedAt-5e3)return this.reset(),0;let r=Math.min(3e5,Math.max(0,this._until-t));return r===0&&this.reset(),r}isOpen(){return this.remainingMs()>0}reset(){this._until=0,this._installedAt=0}constructor(){this._until=0,this._installedAt=0}};var Dru="utf8",Wsh=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Hsh(e){return typeof e=="string"&&Wsh.test(e)}function kUe(e,t){return Hsh(e)?e:t()}function Ult(e,t){let r=new Error(t);try{Object.defineProperty(r,"name",{value:e,writable:!0,enumerable:!0,configurable:!0})}catch{}return r}function Rru(e){return e?.replace(/\/+$/,"")}async function kru(e,t){let r=null;for(let n=0;n<t.retryCount+1;n++){n>0&&await new Promise(i=>setTimeout(i,t.retryDelay));try{return await e()}catch(i){if(r=i,!t.retryCheck(i))throw i}}throw r}function g7o(){return new Date().toISOString()}function N2(e,t){let r=setTimeout(e,t);return r?.unref&&r?.unref(),r}async function WSe(e,t,r){let n;try{return await Promise.race([e,new Promise((i,o)=>{n=N2(()=>{try{r?.(),i()}catch(s){o(s)}},t)})])}finally{clearTimeout(n)}}var Fru=e=>e&&typeof e.then=="function";function z9t(e){return Promise.all(e.map(t=>(t??Promise.resolve()).then(r=>({status:"fulfilled",value:r}),r=>({status:"rejected",reason:r}))))}var z$r,Nru,Q$r;function jru(e){let t=globalThis._posthogChunkIds;if(!t)return;let r=Object.keys(t);return Q$r&&r.length===Nru||(Nru=r.length,Q$r=r.reduce((n,i)=>{z$r||(z$r={});let o=z$r[i];if(o)n[o[0]]=o[1];else{let s=e(i);for(let a=s.length-1;a>=0;a--){let l=s[a]?.filename,u=t[i];if(l&&u){n[l]=u,z$r[i]=[l,u];break}}}return n},{})),Q$r}var A7o=50,Ksh=1e3,Jsh=100,Ysh=4,Q9t=class{constructor(t,r,n=[]){this.coercers=t,this.stackParser=r,this.modifiers=n}buildFromUnknown(t,r={}){let i=r&&r.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(i,r,0).apply(t),a=this.buildParsingContext(r),c=this.parseStacktrace(s,a);return{$exception_list:this.convertToExceptionList(c,i),$exception_level:"error"}}async modifyFrames(t){for(let r of t)r.stacktrace&&r.stacktrace.frames&&e_(r.stacktrace.frames)&&(r.stacktrace.frames=await this.applyModifiers(r.stacktrace.frames));return t}coerceFallback(t){return{type:"Error",value:"Unknown error",stack:t.syntheticException?.stack,synthetic:!0}}parseStacktrace(t,r){let n;t.cause!=null&&(n=this.parseStacktrace(t.cause,r));let i;if(t.stack!=""&&t.stack!=null)try{i=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?r.skipFirstLines:0),r.chunkIdMap)}catch{}return{...t,cause:n,stack:i,errors:t.errors?.map(o=>this.parseStacktrace(o,r))}}applyChunkIds(t,r){return t.map(n=>(n.filename&&r&&(n.chunk_id=r[n.filename]),n))}applyCoercers(t,r){for(let n of this.coercers)if(n.match(t))return n.coerce(t,r);return this.coerceFallback(r)}async applyModifiers(t){let r=t;for(let n of this.modifiers)r=await n(r);return r}convertToExceptionList(t,r){let n=[],i=(o,s,a)=>{let c=n.length,l=s===void 0?{type:typeof r.type=="string"&&r.type.length>0?r.type:"generic",...typeof r.handled=="boolean"?{handled:r.handled}:r.handled===void 0?{handled:!0}:{},synthetic:typeof r.synthetic=="boolean"?r.synthetic:o.synthetic,exception_id:c}:{type:"chained",source:a,synthetic:o.synthetic,exception_id:c,parent_id:s},u={type:o.type,value:o.value,mechanism:l};o.stack&&(u.stacktrace={type:"raw",frames:o.stack}),n.push(u),o.cause&&i(o.cause,c,"cause");for(let p of o.errors??[])i(p,c,"member")};return i(t),n}buildParsingContext(t){return{chunkIdMap:jru(this.stackParser),skipFirstLines:t.skipFirstLines??1}}getAggregateErrors(t){try{if(qSe(t)){let r=Object.getPrototypeOf(t);for(let n=0;r&&n<Jsh;n++){let i=Object.getOwnPropertyDescriptor(r,"constructor")?.value;if(typeof i=="function"&&i.name==="AggregateError"){let o=t.errors;return e_(o)?o:void 0}r=Object.getPrototypeOf(r)}}}catch{}}buildCoercingContext(t,r,n=0){let i=0,o=0,s=!1,a=new Set,c=[],l={},u=(f,m,g=0)=>{let A=p(m,g),b=A.apply;if(A.apply=D=>{c.push(f);try{return b(D)}finally{c.pop()}},g>Ysh||g>0&&c.indexOf(f)!==-1)return this.coerceFallback(A);let I=typeof f=="object"&&f!==null||typeof f=="function";if(g===0&&i>=A7o||I&&a.has(f))return;I&&a.add(f),g===0&&i++;let C=this.getAggregateErrors(f);s||=!!C;let x;try{if(x=this.applyCoercers(f,A),!x)throw l}catch(D){if(D===l){g===0&&i--;return}if(!s)throw D;x=this.coerceFallback(A)}if(!C||i>=A7o)return x;let S;try{S=C.length}catch{return x}if(!Number.isInteger(S)||S<0||S>4294967295)return x;let B=[];for(let D=0;i<A7o&&o<Ksh&&D<S;D++){o++;let R;try{R=A.next(C[D])}catch{i++,R=this.coerceFallback(p(m+1))}R&&B.push(R)}return{...x,errors:B}},p=(f,m=0)=>({...r,syntheticException:f==0?r.syntheticException:void 0,mechanism:f==0?t:{},apply:g=>{let A=u(g,f,m+1);if(!A)throw l;return A},next:g=>u(g,f+1)}),d=p(n);return{...d,apply:f=>u(f,n)??this.coerceFallback(d)}}};var mB="?",Xsh="<anonymous>",Zsh=/^([a-z][a-z0-9.+-]+):/i,$sh=["http","https","file","blob","app","capacitor","ionic","webpack","webpack-internal","ng"];function eah(e){if(!e||e===Xsh)return!1;let t=Zsh.exec(e);return!t||$sh.includes(t[1].toLowerCase())}function ore(e,t,r,n,i){let o={platform:e,filename:t,function:r==="<anonymous>"?mB:r,in_app:eah(t)};return Ome(n)||(o.lineno=n),Ome(i)||(o.colno=i),o}var M$r=(e,t)=>{let r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:mB,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var tah=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,rah=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,nah=/\((\S*)(?::(\d+))(?::(\d+))\)/,y7o=(e,t)=>{let r=tah.exec(e);if(r){let[,i,o,s]=r;return ore(t,i,mB,+o,+s)}let n=rah.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let a=nah.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}let[o,s]=M$r(n[1]||mB,n[2]);return ore(t,s,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}};var iah=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,oah=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,b7o=(e,t)=>{let r=iah.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){let s=oah.exec(r[3]);s&&(r[1]=r[1]||"eval",r[3]=s[1],r[4]=s[2],r[5]="")}let i=r[3],o=r[1]||mB;return[o,i]=M$r(o,i),ore(t,i,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}};var sah=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,zru=(e,t)=>{let r=sah.exec(e);return r?ore(t,r[2],r[1]||mB,+r[3],r[4]?+r[4]:void 0):void 0};var aah=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Qru=(e,t)=>{let r=aah.exec(e);return r?ore(t,r[2],r[3]||mB,+r[1]):void 0},cah=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Mru=(e,t)=>{let r=cah.exec(e);return r?ore(t,r[5],r[3]||r[4]||mB,+r[1],+r[2]):void 0};var lah=/^\s*[-]{4,}$/,uah=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/,pah=/^Promise\.(?:all|any)$/,fah=/^index \d+$/,dah="node:internal/promise",_ru=(e,t)=>{let r=e.match(uah);if(r){let n,i,o,s,a;if(r[1]){o=r[1];let u=o.lastIndexOf(".");if(o[u-1]==="."&&u--,u>0){n=o.slice(0,u),i=o.slice(u+1);let p=n.indexOf(".Module");p>0&&(o=o.slice(p+1),n=n.slice(0,p))}s=void 0}i&&(s=n,a=i),i==="<anonymous>"&&(a=void 0,o=void 0),o===void 0&&(a=a||mB,o=s?`${s}.${a}`:a);let c=r[2]?.startsWith("file://")?r[2].slice(7):r[2],l=r[5]==="native";return c?.match(/\/[A-Z]:/)&&(c=c.slice(1)),!c&&r[5]&&!l&&(c=r[5]),pah.test(o)&&fah.test(c||"")&&(c=dah),{filename:c?decodeURI(c):void 0,module:void 0,function:o,lineno:Lru(r[3]),colno:Lru(r[4]),in_app:mah(c||"",l),platform:t}}if(e.match(lah))return{filename:e,platform:t}};function mah(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 Lru(e){return parseInt(e||"",10)||void 0}var Uru=/\(error: (.*)\)/,Vru=50,hah=10,gah=1e3;function E7o(e,t){return e.filename===t.filename&&e.function===t.function&&e.module===t.module&&e.lineno===t.lineno&&e.colno===t.colno}function Aah(e){for(let t=1;t<=hah;t++){let r=e.length-2*t;if(r<0)break;let n=!0;for(let i=0;i<t;i++){let o=e[r+i];if(!E7o(o,e[r+t+i])){n=!1;break}}if(n){for(let i=0;i<t;i++)e[r+i]=e[r+t+i];return e.length=r+t,{start:r,length:t}}}}function yah(e,t){let r=t.start+t.length,n=qru(e,t);n&&e.splice(r+n===e.length?r:t.start,n)}function Gru(e,t){let r=t.start;for(;r>0&&E7o(e[r-1],e[r-1+t.length]);)r--;return t.start-r}function qru(e,t){let r=t.start+t.length,n=r;for(;n<e.length&&E7o(e[n],e[n-t.length]);)n++;return n-r}function bah(e,t){let r=t[0],n=e.length-(r?Gru(e,r):0);for(let i of t)n-=qru(e,i);return n}function Eah(e){let t=e.map(n=>`${n.function}|${n.filename}|${n.lineno}|${n.colno}|${n.module}`),r=0;for(let n=1;n<t.length;n++)Iah(t,n,r)&&(r=n);e.push(...e.splice(0,r))}function Iah(e,t,r){for(let n=0;n<e.length;n++){let i=e[(t+n)%e.length],o=e[(r+n)%e.length];if(i!==o)return i<o}return!1}function Wru(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,Vru).map(r=>({...r,filename:r.filename||vah(t).filename,function:r.function||mB}))}function vah(e){return e[e.length-1]||{}}function I7o(){return Hru("web:javascript",y7o,b7o)}function Hru(e,...t){return(r,n=0)=>{let i=[],o=r.split(`
|
|
3481
3485
|
`),s=Math.min(o.length,n+gah),a=[];for(let u=n;u<s;u++){let p=o[u];if(p.length>1024)continue;let d=Uru.test(p)?p.replace(Uru,"$1"):p;if(!d.match(/\S*Error: /)){for(let f of t){let m=f(d,e);if(m){i.push(m);let g=Aah(i);if(g){for(let A=a.length-1;A>=0;A--){let b=a[A];if(b.start+b.length<=g.start)break;a.pop()}a.push(g)}break}}if(bah(i,a)>=Vru)break}}let c=[...a].sort((u,p)=>p.start-u.start),l=c[c.length-1];if(l){let u=Gru(i,l);i.splice(l.start-u,u);for(let p of c)p.start-=u}for(let u of c)yah(i,u);return a.some(u=>u.start===0&&i.length===u.length)&&Eah(i),Wru(i)}}var v7o=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){let n=pR(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:n?t.stack:void 0,cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){let r=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?`${r}: ${t.message}`:r}isDOMException(t){return DUe(t,"DOMException")}isDOMError(t){return DUe(t,"DOMError")}};var M9t=class{match(t){return qSe(t)}coerce(t,r){let n=this.getStack(t),i=n===void 0?r.syntheticException?.stack:void 0,o=!!i;return{type:this.getType(t),value:this.getMessage(t,r),stack:n??i,cause:t.cause?r.next(t.cause):void 0,synthetic:o}}getType(t){return t.name||t.constructor.name}getMessage(t,r){let n=t.message;return n.error&&typeof n.error.message=="string"?String(n.error.message):String(n)}getStack(t){try{let r=t.stacktrace;if(typeof r=="string"&&r.length>0)return r;let n=t.stack;return typeof n=="string"&&n.length>0?n:void 0}catch{return}}};var C7o=class{match(t){if(!lru(t))return!1;let r=t;return r.error!=null||this._hasUsableMessage(r)}coerce(t,r){if(t.error!=null)return r.apply(t.error);let n=r.apply(t.message);return{...n,stack:this._buildLocationStack(t)??n.stack,synthetic:!0}}_hasUsableMessage(t){return pR(t.message)&&t.message.length>0}_buildLocationStack(t){let r=t,n=r.lineno??0,i=r.colno??0;if(!(!pR(r.filename)||r.filename.length===0)&&n!==0)return`Error
|
|
3482
|
-
at ${r.filename}:${n}:${i}`}};var Cah=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,L9t=class{match(t){return typeof t=="string"}coerce(t,r){let[n,i]=this.getInfos(t);return{type:n??"Error",value:i??t,stack:r.syntheticException?.stack,synthetic:!0}}getInfos(t){let r="Error",n=t,i=t.match(Cah);return i&&(r=i[1],n=i[2]),[r,n]}};var Kru=["fatal","error","warning","log","info","debug"];function L$r(e,t=40){let r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(let n=r.length;n>0;n--){let i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length||i.length<=t?i:`${i.slice(0,t)}...`}return""}var _9t=class{match(t){return typeof t=="object"&&t!==null}coerce(t,r){let n=this.getErrorPropertyFromObject(t);return n?r.apply(n):{type:this.getType(t),value:this.getValue(t),stack:this.getStack(t)??r.syntheticException?.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){if(Mlt(t))return t.constructor.name;let r="name"in t?t.name:void 0;return pR(r)&&!s7o(r)?r:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){let i=`'${t.name}' captured as exception`;return"message"in t&&typeof t.message=="string"&&(i+=` with message: '${t.message}'`),i}if("message"in t&&typeof t.message=="string")return t.message;let r=this.getObjectClassName(t),n=L$r(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${n}`}isSeverityLevel(t){return pR(t)&&!s7o(t)&&Kru.indexOf(t)>=0}getStack(t){try{return pR(t.stacktrace)&&t.stacktrace.length>0?t.stacktrace:pR(t.stack)&&t.stack.length>0?t.stack:void 0}catch{return}}getErrorPropertyFromObject(t){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];if(qSe(n))return n}}getObjectClassName(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}};var x7o=class{match(t){return Mlt(t)}coerce(t,r){let n=t.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${L$r(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var U9t=class{match(t){return S$r(t)}coerce(t,r){return{type:"Error",value:`Primitive value captured as exception: ${String(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var S7o=class{match(t){return DUe(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!Mlt(t))return!1;try{let r=t.detail;return r!=null&&typeof r=="object"&&"reason"in r}catch{return!1}}coerce(t,r){let n=this.getUnhandledRejectionReason(t);return S$r(n)?{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(n)}`,stack:r.syntheticException?.stack,synthetic:!0}:r.apply(n)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}};var w7o=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)}}};var V9t={MESSAGE:"$message",TIMESTAMP:"$timestamp"},xah=new Set([V9t.MESSAGE,V9t.TIMESTAMP]),_$r={enabled:!0,max_bytes:32768};function T7o(e){return e?{enabled:e.enabled??_$r.enabled,max_bytes:wah(e.max_bytes,_$r.max_bytes)}:{..._$r}}function Sah(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,i)=>xah.has(i)?(t.push(i),n):(n[i]=e[i],n),{}),droppedKeys:t}}var O7o=class{constructor(t){this._entries=[],this._totalBytes=0,this._config=T7o(t)}setConfig(t){this._config=T7o(t),this._trimToMaxBytes()}add(t){let r=Tah(t);if(!r)return;let n=Jru(r.json);n>this._config.max_bytes||(this._entries.push({step:r.step,bytes:n}),this._totalBytes+=n,this._trimToMaxBytes())}getAttachable(){return this._entries.map(t=>t.step)}clear(){this._entries=[],this._totalBytes=0}size(){return this._entries.length}_trimToMaxBytes(){for(;this._totalBytes>this._config.max_bytes&&this._entries.length>0;){let t=this._entries.shift();t&&(this._totalBytes-=t.bytes)}}};function wah(e,t){if(!Qlt(e)||e===1/0||e===-1/0)return t;let r=Math.floor(e);return r<0?t:r}function Tah(e){let t;try{t=GSe(e)}catch{return}try{let r=JSON.parse(t);if(!F9t(r))return;let n=r,i=n[V9t.MESSAGE],o=n[V9t.TIMESTAMP];return!pR(i)||i.trim().length===0||!pR(o)&&!Qlt(o)?void 0:{step:n,json:t}}catch{return}}function Jru(e){if("u">typeof TextEncoder)return new TextEncoder().encode(e).length;let t=encodeURIComponent(e),r=0;for(let n=0;n<t.length;n++)t[n]==="%"?(r+=1,n+=2):r+=1;return r}function Oah(){let e=globalThis._posthogReleaseId;return typeof e=="string"&&e.length>0?e:void 0}var P7o=e=>{if("flags"in e){let t=Yru(e.flags),r=Xru(e.flags);return{...e,featureFlags:t,featureFlagPayloads:r}}{let t=e.featureFlags??{},r=Object.fromEntries(Object.entries(e.featureFlagPayloads||{}).map(([i,o])=>[i,Vlt(o)])),n=Object.fromEntries(Object.entries(t).map(([i,o])=>[i,Pah(i,o,r[i])]));return{...e,featureFlags:t,featureFlagPayloads:r,flags:n}}};function Pah(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 Yru=e=>Object.fromEntries(Object.entries(e??{}).map(([t,r])=>[t,G9t(r)]).filter(([,t])=>t!==void 0)),Xru=e=>{let t=e??{};return Object.fromEntries(Object.keys(t).filter(r=>{let n=t[r];return n.enabled&&n.metadata&&n.metadata.payload!==void 0}).map(r=>{let n=t[r].metadata?.payload;return[r,n?Vlt(n):void 0]}))},G9t=e=>e===void 0?void 0:e.variant??e.enabled,Vlt=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};var Zru=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid","gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","oppref","irclid","_kx"],Bah=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$referring_domain",...Zru,"$session_id","$window_id","$lib","$lib_version","$device_id","$is_server","$react_native_version"],q9t=(e,t=[])=>{let r={},n=i=>{e[i]!==void 0&&(r[i]=e[i])};return Bah.forEach(n),t.forEach(n),r};var U$r=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(n=>n!==r)}}emit(t,r){for(let n of this.events[t]||[])n(r);for(let n of this.events["*"]||[])n(t,r)}};function B7o(){return"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&typeof Response.prototype.blob=="function"}var Rah="NativeGzipValidationError",kah=31,Fah=139,Nah=8,jah=e=>e.length>=2&&e[0]===kah&&e[1]===Fah;var W9t,zah=()=>{if(W9t)return W9t;W9t=[];for(let e=0;e<256;e++){let t=e;for(let r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;W9t[e]=t>>>0}return W9t},Qah=e=>{let t=zah(),r=4294967295;for(let n=0;n<e.length;n++)r=t[(r^e[n])&255]^r>>>8;return(4294967295^r)>>>0},V$r=e=>{throw Ult(Rah,`Native gzip produced invalid output: ${e}`)},Mah=async(e,t)=>{e.size<18&&V$r("too-short");let r=new Uint8Array(await e.slice(0,10).arrayBuffer());(!jah(r)||r[2]!==Nah)&&V$r("invalid-header");let n=new DataView(await e.slice(e.size-8).arrayBuffer());n.getUint32(0,!0)!==Qah(t)&&V$r("invalid-crc");let i=t.length>>>0;n.getUint32(4,!0)!==i&&V$r("invalid-size")};async function H9t(e,t=!0,r){try{let n=new TextEncoder().encode(e),i=new globalThis.CompressionStream("gzip"),o=i.writable.getWriter(),s=o.write(n).then(()=>o.close()).catch(async l=>{try{await o.abort(l)}catch{}throw l}),a=new Response(i.readable).blob(),[c]=await Promise.all([a,s]);return await Mah(c,n),c}catch(n){if(r?.rethrow)throw n;return t&&console.error("Failed to gzip compress data",n),null}}var $5=class extends Error{constructor(t,r,n,i){super("HTTP error while fetching PostHog: status="+t.status+", reqByteLength="+r),this.response=t,this.reqByteLength=r,this.responseBodyDeadline=n,this.abortController=i,this.name="PostHogFetchHttpError",this._bodyReadTimedOut=!1}get status(){return this.response.status}get retryAfterMs(){try{return h7o(this.response.headers?.get("retry-after"))}catch{return}}get bodyReadTimedOut(){return this._bodyReadTimedOut}get text(){if(!this.responseBodyTextPromise)if(Date.now()>=this.responseBodyDeadline){this._bodyReadTimedOut=!0;let t=Ult("AbortError","Response body read timed out");this.cancelResponseBody(t),this.responseBodyTextPromise=Promise.reject(t)}else{let t=new Promise((n,i)=>{this.responseBodyTimer=N2(()=>{this._bodyReadTimedOut=!0;let o=Ult("AbortError","Response body read timed out");i(o),this.cancelResponseBody(o)},this.responseBodyDeadline-Date.now())}),r;try{r=Promise.resolve(this.response.text())}catch(n){r=Promise.reject(n)}this.responseBodyTextPromise=Promise.race([r,t]).finally(()=>clearTimeout(this.responseBodyTimer))}return this.responseBodyTextPromise}get json(){return this.text.then(t=>JSON.parse(t))}cancelResponseBody(t){clearTimeout(this.responseBodyTimer),this.abortController.signal.aborted||this.abortController.abort(t),(async()=>{try{await this.response.body?.cancel()}catch{}})()}},Bme=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};var nnu=(e,t)=>{for(let r of Object.keys(t))(r.startsWith("$feature/")||r==="$active_feature_flags")&&(e[r]=t[r])};async function $ru(e){if(e instanceof $5){let t="";try{t=await e.text}catch{e.bodyReadTimedOut&&(t="<response body read timed out>")}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 Lah(e){return typeof e=="object"&&(e instanceof $5||inu(e))}function inu(e){return e instanceof Bme}function _ah(e){if(e instanceof $5)return e.status===502||e.status===504;if(!(e instanceof Bme))return!1;let t=e.error;return(t?.code??t?.cause?.code)!=="ECONNREFUSED"}var enu=10485760;function tnu(e){try{return typeof e!="string"?e instanceof Uint8Array?e.byteLength:e.size:"u">typeof Buffer?Buffer.byteLength(e,Dru):new TextEncoder().encode(e).length}catch{return 0}}function Glt(e){return typeof e=="object"&&e instanceof $5&&e.status===413}function G$r(e){return e instanceof $5?e.status===408||e.status===429||e.status>=500:inu(e)}function rnu(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var D7o="default",K9t=class{getErrorPropertiesBuilder(){return this._errorPropertiesBuilder||(this._errorPropertiesBuilder=this.createErrorPropertiesBuilder()),this._errorPropertiesBuilder}createErrorPropertiesBuilder(){return new Q9t([new M9t,new _9t,new L9t,new U9t],I7o())}getEvaluationRuntime(){}constructor(t,r={}){this.flushPromise=null,this.pendingFlushPromise=null,this.flushPromises=new Set,this._dequeuedMessagesCount=0,this.shutdownPromise=null,this.promiseQueue=new B$r,this._events=new U$r,this._isInitialized=!1;let n=typeof t=="string"?t.trim():"",i=typeof r.host=="string"?r.host.trim():"",o=!n;this._logger=gru("[PostHog]",this.logMsgIfDebug.bind(this)),o&&this._logger.error("You must pass your PostHog project's api key. The client will be disabled."),this.apiKey=n,this.host=Rru(i||"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.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:G$r},this.requestTimeout=r.requestTimeout??1e4,this.featureFlagsRequestTimeoutMs=r.featureFlagsRequestTimeoutMs??3e3,this.featureFlagsRequestMaxRetries=r.featureFlagsRequestMaxRetries??1,this.remoteConfigRequestTimeoutMs=r.remoteConfigRequestTimeoutMs??3e3,this.disableGeoip=r.disableGeoip??!0,this.disabled=(r.disabled??!1)||o,this.historicalMigration=r?.historicalMigration??!1,this._initPromise=Promise.resolve(),this._isInitialized=!0,this.evaluationContexts=r?.evaluationContexts??r?.evaluationEnvironments,r?.evaluationEnvironments&&!r?.evaluationContexts&&this._logger.warn("evaluationEnvironments is deprecated. Use evaluationContexts instead. This property will be removed in a future version."),this.disableCompression=!B7o()||(r?.disableCompression??!1)}logMsgIfDebug(t){this.isDebug&&t()}wrap(t){if(this.disabled)return void this._logger.warn("The client is disabled");if(this._isInitialized)return t();this._initPromise.then(()=>t())}getCommonEventProperties(){return{$lib:this.getLibraryId(),$lib_version:this.getLibraryVersion()}}get optedOut(){return this.getPersistedProperty(jQ.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(jQ.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(jQ.OptedOut,!0)})}on(t,r){return this._events.on(t,r)}debug(t=!0){if(this.removeDebugCallback?.(),t){let r=this.on("*",(n,i)=>this._logger.info(n,i));this.removeDebugCallback=()=>{r(),this.removeDebugCallback=void 0}}}get isDebug(){return!!this.removeDebugCallback}get isDisabled(){return this.disabled}buildPayload(t){let r=t.properties||{},n={...r,...this.getCommonEventProperties()};return nnu(n,r),t.event==="$feature_flag_called"&&n.$feature_flag_has_experiment===!1&&this.isMinimalFlagCalledEventsEnabled()&&(n=q9t(n)),{distinct_id:t.distinct_id,event:t.event,properties:n}}isMinimalFlagCalledEventsEnabled(){return!1}addPendingPromise(t){return this.promiseQueue.add(t)}identifyStateless(t,r,n){this.wrap(()=>{let i={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};this.enqueue("identify",i,n)})}async identifyStatelessImmediate(t,r,n){let i={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};await this.sendImmediate("identify",i,n)}captureStateless(t,r,n,i){this.wrap(()=>{let o=this.buildPayload({distinct_id:t,event:r,properties:n});this.enqueue("capture",o,i)})}async captureStatelessImmediate(t,r,n,i){let o=this.buildPayload({distinct_id:t,event:r,properties:n});await this.sendImmediate("capture",o,i)}aliasStateless(t,r,n,i){this.wrap(()=>{let o=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...n||{},distinct_id:r,alias:t}});this.enqueue("alias",o,i)})}async aliasStatelessImmediate(t,r,n,i){let o=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...n||{},distinct_id:r,alias:t}});await this.sendImmediate("alias",o,i)}groupIdentifyStateless(t,r,n,i,o,s){this.wrap(()=>{let a=this.buildPayload({distinct_id:o||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{},...s||{}}});this.enqueue("capture",a,i)})}async groupIdentifyStatelessImmediate(t,r,n,i,o,s){let a=this.buildPayload({distinct_id:o||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{},...s||{}}});await this.sendImmediate("capture",a,i)}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`,n={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}};return this.fetchWithRetry(r,n,{type:"required",consume:i=>i.json()},{retryCount:0},this.remoteConfigRequestTimeoutMs).catch(i=>{this._logger.error("Remote config could not be loaded",i),this._events.emit("error",i)})}async getFlags(t,r={},n={},i={},o={},s=!1){await this._initPromise;let a=s?"&config=true":"",c=`${this.host}/flags/?v=2${a}`,l={token:this.apiKey,distinct_id:t,groups:r,person_properties:n,group_properties:i,...o};n.$device_id&&(l.$device_id=n.$device_id),this.evaluationContexts&&this.evaluationContexts.length>0&&(l.evaluation_contexts=this.evaluationContexts);let u=this.getEvaluationRuntime();u&&(l.evaluation_runtime=u);let p={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:JSON.stringify(l)};return this._logger.info("Flags URL",c),this.fetchWithRetry(c,p,{type:"required",consume:d=>d.json()},{retryCount:this.featureFlagsRequestMaxRetries,retryCheck:_ah},this.featureFlagsRequestTimeoutMs).then(d=>({success:!0,response:P7o(d)})).catch(d=>(this._events.emit("error",d),{success:!1,error:this.categorizeRequestError(d)}))}categorizeRequestError(t){if(t instanceof $5)return{type:"api_error",statusCode:t.status};if(t instanceof Bme){let r=t.error;return r instanceof Error&&(r.name==="AbortError"||r.name==="TimeoutError")?{type:"timeout"}:{type:"connection_error"}}return{type:"unknown_error"}}async getFeatureFlagStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagDetailStateless(t,r,n,i,o,s);if(a===void 0)return{response:void 0,requestId:void 0};let c=G9t(a.response);return c===void 0&&(c=!1),{response:c,requestId:a.requestId}}async getFeatureFlagDetailStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagDetailsStateless(r,n,i,o,s,[t]);return a===void 0?void 0:{response:a.flags[t],requestId:a.requestId,evaluatedAt:a.evaluatedAt}}async getFeatureFlagPayloadStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagPayloadsStateless(r,n,i,o,s,[t]);if(!a)return;let c=a[t];return c===void 0?null:c}async getFeatureFlagPayloadsStateless(t,r={},n={},i={},o,s){return await this._initPromise,(await this.getFeatureFlagsAndPayloadsStateless(t,r,n,i,o,s)).payloads}async getFeatureFlagsStateless(t,r={},n={},i={},o,s){return await this._initPromise,await this.getFeatureFlagsAndPayloadsStateless(t,r,n,i,o,s)}async getFeatureFlagsAndPayloadsStateless(t,r={},n={},i={},o,s){await this._initPromise;let a=await this.getFeatureFlagDetailsStateless(t,r,n,i,o,s);return a?{flags:a.featureFlags,payloads:a.featureFlagPayloads,requestId:a.requestId}:{flags:void 0,payloads:void 0,requestId:void 0}}async getFeatureFlagDetailsStateless(t,r={},n={},i={},o,s){await this._initPromise;let a={geoip_disable:o??this.disableGeoip};s&&(a.flag_keys_to_evaluate=s);let c=await this.getFlags(t,r,n,i,a);if(!c.success)return;let l=c.response;return l.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"),l.quotaLimited?.includes("feature_flags")?(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:l?.requestId,quotaLimited:l.quotaLimited}):l}async getSurveysStateless(){if(await this._initPromise,this.disabled)return[];if(this.disableSurveys===!0)return this._logger.info("Loading surveys is disabled."),[];let t=`${this.host}/api/surveys/?token=${this.apiKey}`,r={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}},i=(await this.fetchWithRetry(t,r,{type:"required",consume:o=>{if(o.status!==200||!o.json){let s=`Surveys API could not be loaded: ${o.status}`,a=new Error(s);return this._logger.error(a),this._events.emit("error",new Error(s)),Promise.resolve(void 0)}return o.json()}}).catch(o=>{this._logger.error("Surveys API could not be loaded",o),this._events.emit("error",o)}))?.surveys;return i&&this._logger.info("Surveys fetched from API: ",JSON.stringify(i)),i??[]}get props(){return this._props||(this._props=this.getPersistedProperty(jQ.Props)),this._props||{}}set props(t){this._props=t}async register(t){this.wrap(()=>{this.props={...this.props,...t},this.setPersistedProperty(jQ.Props,this.props)})}async unregister(t){this.wrap(()=>{delete this.props[t],this.setPersistedProperty(jQ.Props,this.props)})}processBeforeEnqueue(t){return t}async flushStorage(){}getQueueRouteKey(t){return D7o}persistedQueueKeyForRoute(t){return jQ.Queue}getActiveQueueRoutes(){return[D7o]}getRouteQueue(t){return this.getPersistedProperty(this.persistedQueueKeyForRoute(t))||[]}enqueue(t,r,n,i){this.wrap(()=>{if(this.optedOut)return void this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let o=this.prepareMessage(r,n);if(o=this.processBeforeEnqueue(o),o===null)return;o=this.normalizeMessage(o);let s=this.persistedQueueKeyForRoute(i??this.getQueueRouteKey(o)),a=this.getPersistedProperty(s)||[];a.length>=this.maxQueueSize&&(a.shift(),this._logger.warn("Queue is full, the oldest event is dropped.")),a.push({message:o}),this.setPersistedProperty(s,a),this._events.emit(t,o),a.length>=this.flushAt&&this.flushBackground(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=N2(()=>this.flushBackground(),this.flushInterval))})}async sendImmediate(t,r,n,i){if(this.disabled)return void this._logger.warn("The client is disabled");if(this._isInitialized||await this._initPromise,this.optedOut)return void this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let o=this.prepareMessage(r,n);if(o=this.processBeforeEnqueue(o),o!==null){o=this.normalizeMessage(o);try{await this.sendBatch([o],void 0,i??this.getQueueRouteKey(o))}catch(s){this._events.emit("error",s)}}}normalizeMessage(t){let{type:r,library:n,library_version:i,...o}=t,s=rnu(o.properties)?o.properties:void 0;return n!==void 0&&s?.$lib===void 0&&(s={...s||{},$lib:n}),i!==void 0&&s?.$lib_version===void 0&&(s={...s||{},$lib_version:i}),s&&(o.properties=s),o.uuid=kUe(o.uuid,F2),o}normalizeTimestampForWire(t){let r=t instanceof Date?t:typeof t=="string"?new Date(t):null;if(!r||Number.isNaN(r.getTime()))return t;let n=r.toISOString(),i=typeof t=="string"?t.match(/\.(\d+)(?:Z|[+-]\d{2}:?\d{2})?$/i)?.[1]:void 0;return i&&i.length>3?n.replace(/\.\d{3}Z$/,`.${i}Z`):n}prepareMessage(t,r){let n={...t,timestamp:r?.timestamp?r?.timestamp:g7o(),uuid:kUe(r?.uuid,F2)};return(r?.disableGeoip??this.disableGeoip)&&(rnu(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.pendingFlushPromise||this.flushAutomatic().catch(async t=>{await $ru(t)})}flushAutomatic(){return this.flush()}async waitForPendingPromises(t,r=[]){let n=r.filter(o=>!!o),i=0;for(;;){let o=this.promiseQueue.getPromises([...n,...this.flushPromises],t);if(o.length===0)return;i>0&&this._logger.debug(`flush() re-checking ${o.length} pending promise(s) before flushing`),await Promise.all(o.map(s=>s.catch(()=>{}))),i++}}flushWithPendingPromises(){return this.flushInternal(!0)}flush(){return this.flushInternal(!1)}flushInternal(t){if(this.disabled)return Promise.resolve();if(!t&&this.pendingFlushPromise)return this.pendingFlushPromise;let r=this.flushPromise,n=this.promiseQueue.maxId,i=Promise.resolve().then(()=>{if(t)return this.waitForPendingPromises(n,[r,i])}).then(()=>z9t([r])).then(()=>(this.pendingFlushPromise===i&&(this.pendingFlushPromise=null),this._flush()));return this.pendingFlushPromise=i,this.flushPromise=i,this.flushPromises.add(i),this.addPendingPromise(i),z9t([i]).then(()=>{this.flushPromises.delete(i),this.pendingFlushPromise===i&&(this.pendingFlushPromise=null),this.flushPromise===i&&(this.flushPromise=null)}),i}getCustomHeaders(){let t=this.getCustomUserAgent(),r={};return t&&t!==""&&(r["User-Agent"]=t),r}compressPayload(t){return H9t(t,this.isDebug)}getBatchEndpointPath(t){return"/batch/"}async sendBatch(t,r,n=D7o){let i={api_key:this.apiKey,batch:t.map(l=>{if(!l)return l;let u=this.normalizeTimestampForWire(l.timestamp);return u===l.timestamp?l:{...l,timestamp:u}}),sent_at:g7o()};this.historicalMigration&&(i.historical_migration=!0);let o=GSe(i),s=`${this.host}${this.getBatchEndpointPath(n)}`,a=this.disableCompression?null:await this.compressPayload(o),c={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...a!==null&&{"Content-Encoding":"gzip"}},body:a||o};await this.fetchWithRetry(s,c,{type:"successful-write"},r)}async _flush(){this.clearFlushTimer(),await this._initPromise;let t=this.getActiveQueueRoutes();if(!t.some(i=>this.getRouteQueue(i).length>0))return;let r=[],n;for(let i of t)try{await this._flushRoute(i,r)}catch(o){n===void 0&&(n=o)}if(n!==void 0)throw n;this._events.emit("flush",r)}async _flushRoute(t,r){let n=this.persistedQueueKeyForRoute(t),i=this.getPersistedProperty(n)||[];if(!i.length)return;let o=i.length,s=0;for(;i.length>0&&s<o;){let a=i.slice(0,this.maxBatchSize),c=a.map(p=>p.message===void 0?p.message:this.normalizeMessage(p.message)),l=async()=>{let p=this.getPersistedProperty(n)||[],d=[...a],f=p.filter(m=>{let g=m.message?.uuid,A=d.findIndex(b=>b===m||typeof g=="string"&&g.length>0&&b.message?.uuid===g);return A===-1?!0:(d.splice(A,1),!1)});this.setPersistedProperty(n,f),i=f,this._dequeuedMessagesCount+=a.length,await this.flushStorage()},u={retryCheck:p=>Glt(p)?!1:G$r(p)};try{await this.sendBatch(c,u,t)}catch(p){if(Glt(p)&&c.length>1){this.maxBatchSize=Math.max(1,Math.floor(c.length/2)),this._logger.warn(`Received 413 when sending batch of size ${c.length}, reducing batch size to ${this.maxBatchSize}`);continue}throw p instanceof Bme||await l(),this._events.emit("error",p),p}await l(),r.push(...c),s+=c.length}}async _sendOtlpBatch({path:t,auth:r,payload:n}){if(this.disabled)return{kind:"fatal",error:new Error("The client is disabled")};let i;try{i=JSON.stringify(n)}catch(u){return this.logMsgIfDebug(()=>console.warn(`[PostHog] Could not serialize a ${t} batch; reporting it as too large`,u)),{kind:"too-large",measuredLocally:!0}}let o=tnu(i);if(o>enu)return this.logMsgIfDebug(()=>console.warn(`[PostHog] Not sending a ${t} batch of ${o} bytes: the endpoint accepts at most ${enu}`)),{kind:"too-large",measuredLocally:!0};let s=r==="bearer"?`${this.host}/i/v1/${t}`:`${this.host}/i/v1/${t}?token=${encodeURIComponent(this.apiKey)}`,a=this.disableCompression?null:await this.compressPayload(i),c=a||i,l={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...r==="bearer"&&{Authorization:`Bearer ${this.apiKey}`},...a!==null&&{"Content-Encoding":"gzip"}},body:c};try{return await this.fetchWithRetry(s,l,{type:"successful-write"},{retryCheck:u=>Glt(u)||u instanceof $5&&u.retryAfterMs!==void 0?!1:G$r(u)}),{kind:"ok"}}catch(u){if(Glt(u))return{kind:"too-large"};if(G$r(u)){let p=u instanceof $5?u.retryAfterMs:void 0;return{kind:"retry-later",error:u,...p!==void 0&&{retryAfterMs:p}}}return{kind:"fatal",error:u}}}async _sendLogsBatch(t){return this._sendOtlpBatch({path:"logs",auth:"query-token",payload:t})}async _sendMetricsBatch(t){return this._sendOtlpBatch({path:"metrics",auth:"query-token",payload:t})}async _sendTracesBatch(t){return this._sendOtlpBatch({path:"traces",auth:"bearer",payload:t})}async fetchWithRetry(t,r,n,i,o){let s=r.body?r.body:"",a=tnu(s),c={...this._retryOptions,...i},l=0;return await kru(async()=>{l++;let u=new AbortController,p=o??this.requestTimeout,d=Date.now()+p,f,m=new Promise((C,x)=>{f=N2(()=>{let S=Ult("AbortError",`Request timed out after ${p}ms`);x(S),u.abort(S)},p)}),g,A=!1,b,I=()=>b??=(async()=>{try{await g?.body?.cancel()}catch{}})();try{let C;try{C=this.fetch(t,{signal:u.signal,...r})}catch(B){throw new Bme(B)}C.then(B=>{u.signal.aborted&&!A&&Promise.resolve(B.body?.cancel()).catch(()=>{})}).catch(()=>{});try{g=await Promise.race([C,m]),A=!0}catch(B){throw new Bme(B)}let x=r.mode==="no-cors",S=n.type==="successful-write"?300:400;if(!x&&(g.status<200||g.status>=S))throw new $5(g,a,d,u);if(n.type==="successful-write"){try{await Promise.race([I(),m])}catch{}return}try{return await Promise.race([n.consume(g),m])}catch(B){throw u.signal.aborted?new Bme(B):B}}finally{clearTimeout(f),u.signal.aborted&&g&&I()}},{...c,retryCheck:u=>{let p=c.retryCheck(u);return p&&l<=c.retryCount&&u instanceof $5&&u.cancelResponseBody(),p}})}async _shutdown(t=3e4){await this._initPromise;let r=!1;return this.clearFlushTimer(),this.disabled?void 0:WSe((async()=>{try{for(await this.promiseQueue.join();this.getActiveQueueRoutes().some(s=>this.getRouteQueue(s).length>0);){let o=this._dequeuedMessagesCount;if(await this.flush(),r)break;if(this._dequeuedMessagesCount===o){this._logger.warn("Shutdown flush completed but did not send any queued events. Stopping drain to avoid a loop.");break}}}catch(i){if(!Lah(i))throw i;await $ru(i)}})(),t,()=>{this._logger.critical("Timeout while shutting down PostHog. Some events may not have been sent.",{shutdownTimeoutMs:t}),r=!0})}async shutdown(t=3e4){return this.shutdownPromise?this._logger.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}};var Wah=/[a-z][a-z0-9+.-]{0,63}:[^\s<>"]+/gi;var lYv=new RegExp(Wah.source,"i"),onu=/[a-z][a-z0-9+.-]{0,63}:\/\//i,uYv=new RegExp(`^${onu.source}`,"i"),pYv=new RegExp(onu.source,"gi");var Hah=["is_not","is_set"],Kah=1152921504606847e3,Ul=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Object.setPrototypeOf(this,e.prototype)}};function R7o(e){if(typeof e=="boolean")return!0;if(typeof e=="string"){let t=e.toLowerCase();return t==="true"||t==="false"}if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(!R7o(t in e?e[t]:null))return!1;return!0}function k7o(e){if(typeof e=="boolean")return e;if(typeof e=="string")return e.toLowerCase()==="true";if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(!k7o(t in e?e[t]:null))return!1;return!0}function J9t(e){for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let n=e.charCodeAt(t+1);if(t+1>=e.length||n<56320||n>57343)throw new Ul("Cannot stringify an unpaired surrogate like the flags service");t++}else if(r>=56320&&r<=57343)throw new Ul("Cannot stringify an unpaired surrogate like the flags service")}}function W$r(e,t=new Set){if(!(e===null||typeof e=="boolean")){if(typeof e=="string")return void J9t(e);if(typeof e=="number"){if(!Number.isFinite(e))throw new Ul(`Cannot represent non-finite number ${e} like the flags service`);return}if(Array.isArray(e)){if(t.has(e))throw new Ul("Cannot represent a circular array during local evaluation");t.add(e);try{for(let r=0;r<e.length;r++)r in e&&W$r(e[r],t)}finally{t.delete(e)}return}if(typeof e=="object"){let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)throw new Ul("Cannot represent a non-JSON object like the flags service");if(t.has(e))throw new Ul("Cannot represent a circular object during local evaluation");t.add(e);try{for(let n of Object.keys(e))J9t(n),W$r(e[n],t)}finally{t.delete(e)}return}throw new Ul(`Cannot represent ${typeof e} like the flags service`)}}function Jah(e,t){let r=0,n=0;for(;r<e.length&&n<t.length;){let i=e.charCodeAt(r),o=t.charCodeAt(n),s=i>=55296&&i<=56319,a=o>=55296&&o<=56319,c=s?e.charCodeAt(r+1):0,l=a?t.charCodeAt(n+1):0,u=s?(i-55296)*1024+c-56320+65536:i,p=a?(o-55296)*1024+l-56320+65536:o;if(u!==p)return u-p;r+=s?2:1,n+=a?2:1}return e.length-t.length}function F7o(e,t=new Set){if(e===null)return"null";if(typeof e=="string")return J9t(e),JSON.stringify(e);if(typeof e=="boolean")return e?"true":"false";if(typeof e=="number"){if(!Number.isFinite(e))throw new Ul(`Cannot stringify non-finite number ${e} like the flags service`);if(Number.isInteger(e))throw new Ul(`Cannot distinguish integer ${e} from an integral JSON float during local evaluation`);return String(e)}if(Array.isArray(e)){if(t.has(e))throw new Ul("Cannot stringify a circular array during local evaluation");t.add(e);try{let r=[];for(let n=0;n<e.length;n++)r.push(n in e?F7o(e[n],t):"null");return`[${r.join(",")}]`}finally{t.delete(e)}}if(typeof e=="object"){let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)throw new Ul("Cannot stringify a non-JSON object like the flags service");if(t.has(e))throw new Ul("Cannot stringify a circular object during local evaluation");t.add(e);try{let n=Object.keys(e);return n.forEach(J9t),`{${n.sort(Jah).map(i=>`${JSON.stringify(i)}:${F7o(e[i],t)}`).join(",")}}`}finally{t.delete(e)}}throw new Ul(`Cannot stringify ${typeof e} like the flags service`)}function q$r(e){return typeof e=="string"?(J9t(e),e):F7o(e)}function snu(e){try{return new RegExp(e),!0}catch{return!1}}function e8(e){return String(e).replace(/[A-Z]/g,t=>t.toLowerCase())}function cnu(e,t,r){if(!/^\d+$/.test(e)||r==="strict"&&e.length>1&&e[0]==="0")throw new Ul(`Invalid semver: ${t}`);return parseInt(e,10)}function Cw(e,t="strict"){let n=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!n||n.startsWith("."))throw new Ul(`Invalid semver: ${e}`);let i=n.split("."),o=s=>s===void 0||s===""?0:cnu(s,e,t);return[o(i[0]),o(i[1]),o(i[2])]}function t8(e,t){for(let r=0;r<3;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0}function Yah(e,t){let r=Cw(e,t);return{lower:[r[0],r[1],r[2]],upper:[r[0],r[1]+1,0]}}function Xah(e,t){let[r,n,i]=Cw(e,t),o=[r,n,i],s;return s=r>0?[r+1,0,0]:n>0?[0,n+1,0]:[0,0,i+1],{lower:o,upper:s}}function Zah(e,t){let n=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!n)throw new Ul(`Invalid wildcard semver: ${e}`);let i=n.split("."),o=c=>{if(t==="legacy-permissive"){let l=parseInt(c,10);if(!isNaN(l))return l}else try{return cnu(c,e,t)}catch{}throw new Ul(`Invalid wildcard semver: ${e}`)},s=o(i[0]);if(i.length===1)return{lower:[s,0,0],upper:[s+1,0,0]};let a=o(i[1]);return{lower:[s,a,0],upper:[s,a+1,0]}}function anu(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 Ul(`${e} is in an invalid date format`)}throw new Ul(`The date provided ${e} must be a string, number, or date object`)}function N7o(e){let t=/^-?(?<number>[0-9]+)(?<interval>[a-z])$/,r=e.match(t),n=new Date(new Date().toISOString());if(!r||!r.groups)return null;let i=parseInt(r.groups.number);if(i>=1e4)return null;let o=r.groups.interval;if(o==="h")n.setUTCHours(n.getUTCHours()-i);else if(o==="d")n.setUTCDate(n.getUTCDate()-i);else if(o==="w")n.setUTCDate(n.getUTCDate()-7*i);else if(o==="m")n.setUTCMonth(n.getUTCMonth()-i);else{if(o!=="y")return null;n.setUTCFullYear(n.getUTCFullYear()-i)}return n}function j7o(e,t,r={}){let n=e.key,i=e.value,o=e.operator||"exact",s=r.semverParsingPolicy??"strict";if(Object.prototype.hasOwnProperty.call(t,n)){if(o==="is_not_set")return!1;if(o==="is_set")return!0}else throw new Ul(`Property ${n} not found in propertyValues`);let c=t[n];if(c===void 0)return r.warnFunction?.(`Property ${n} cannot have a value of undefined with the ${o} operator`),o==="is_not";if(c===null&&!Hah.includes(o)&&o!=="exact"&&o!=="is_not")return r.warnFunction?.(`Property ${n} cannot have a value of null with the ${o} operator`),!1;let l=(p,d)=>{if(r.propertyMatchingVersion!==2&&R7o(p)||Array.isArray(p)&&p.length===0)return W$r(d),k7o(p)===k7o(d);if(r.propertyMatchingVersion===2&&typeof d=="number"&&R7o(p))return W$r(d),!1;if(Array.isArray(p)){let f=q$r(d).toLowerCase();return p.some(m=>q$r(m).toLowerCase()===f)}return q$r(p).toLowerCase()===q$r(d).toLowerCase()},u=(p,d,f)=>{if(f==="gt")return p>d;if(f==="gte")return p>=d;if(f==="lt")return p<d;if(f==="lte")return p<=d;throw new Error(`Invalid operator: ${f}`)};switch(o){case"exact":return l(i,c);case"is_not":return!l(i,c);case"is_set":return!0;case"icontains":return e8(c).includes(e8(i));case"not_icontains":return!e8(c).includes(e8(i));case"starts_with":return e8(c).startsWith(e8(i));case"not_starts_with":return!e8(c).startsWith(e8(i));case"ends_with":return e8(c).endsWith(e8(i));case"not_ends_with":return!e8(c).endsWith(e8(i));case"regex":return snu(String(i))&&String(c).match(String(i))!==null;case"not_regex":return snu(String(i))&&String(c).match(String(i))===null;case"gt":case"gte":case"lt":case"lte":{let p=typeof i=="number"?i:parseFloat(String(i)),d=typeof c=="number"?c:c!=null?parseFloat(String(c)):NaN;return Number.isFinite(p)&&Number.isFinite(d)?u(d,p,o):u(String(c),String(i),o)}case"is_date_after":case"is_date_before":{if(typeof i=="boolean")throw new Ul("Date operations cannot be performed on boolean values");let p=N7o(String(i));p==null&&(p=anu(i));let d=anu(c);return o==="is_date_before"?d<p:d>p}case"semver_eq":return t8(Cw(String(c),s),Cw(String(i),s))===0;case"semver_neq":return t8(Cw(String(c),s),Cw(String(i),s))!==0;case"semver_gt":return t8(Cw(String(c),s),Cw(String(i),s))>0;case"semver_gte":return t8(Cw(String(c),s),Cw(String(i),s))>=0;case"semver_lt":return t8(Cw(String(c),s),Cw(String(i),s))<0;case"semver_lte":return t8(Cw(String(c),s),Cw(String(i),s))<=0;case"semver_tilde":{let p=Cw(String(c),s),{lower:d,upper:f}=Yah(String(i),s);return t8(p,d)>=0&&t8(p,f)<0}case"semver_caret":{let p=Cw(String(c),s),{lower:d,upper:f}=Xah(String(i),s);return t8(p,d)>=0&&t8(p,f)<0}case"semver_wildcard":{let p=Cw(String(c),s),{lower:d,upper:f}=Zah(String(i),s);return t8(p,d)>=0&&t8(p,f)<0}default:throw new Ul(`Unknown operator: ${o}`)}}async function lnu(e){let t=globalThis.crypto?.subtle;if(!t)throw new Error("SubtleCrypto API not available");let r=await t.digest("SHA-1",new TextEncoder().encode(e));return Array.from(new Uint8Array(r)).map(n=>n.toString(16).padStart(2,"0")).join("")}async function Y9t(e,t,r="",n="."){let i=await lnu(`${e}${n}${t}${r}`);return parseInt(i.slice(0,15),16)/Kah}async function z7o(e,t){if(e==null||e.id==null||e.exclusion_percentage==null)return;let r=Number(e.exclusion_percentage);if(!Number.isFinite(r))return;let n=Math.min(Math.max(r,0),100);if(!(n!==100&&await Y9t("holdout",t,"","-")>n/100))return`holdout-${e.id}`}function H$r(e){let t=[],r=0;for(let n of e){let i=r+n.rollout_percentage/100;t.push({valueMin:r,valueMax:i,key:n.key}),r=i}return t}async function Q7o(e,t,r){let n=await Y9t(e,t,"variant");return H$r(r).find(i=>n>=i.valueMin&&n<i.valueMax)?.key}function M7o(e,t){if(t===!1||t==null||!e)return null;let r=typeof t=="boolean"?t.toString():t,n=e[r]||null;return n==null?null:Vlt(n)}var unu=9223372036854776e3,$ah="9223372036854775808",ech=Object.prototype.propertyIsEnumerable;function tch(){return{ancestors:new WeakSet,remainingNodes:1e4}}function sre(e,t){try{return pnu(e,t,tch(),0)}catch{return[]}}function rch(e,t){let r=e.toString(),n=BigInt($ah);return e>=n||e<-n?(t?.debug(`Attribute ${r} is outside the int64 range; encoding it as a string`),{stringValue:r}):{intValue:r}}function U7o(e,t,r,n){if(r.remainingNodes<=0)return{stringValue:j$r};if(r.remainingNodes--,cru(e))return{boolValue:e};if(typeof e=="bigint")return rch(e,t);if(typeof e=="number"){if(!Number.isFinite(e))return{stringValue:String(e)};if(Number.isInteger(e)){if(Number.isSafeInteger(e))return{intValue:String(e)};if("u"<typeof BigInt)return{stringValue:String(e)};let i=BigInt(e).toString();return e>=unu||e<-unu?(t?.debug(`Attribute ${i} is outside the int64 range; encoding it as a string`),{stringValue:i}):{intValue:i}}return{doubleValue:e}}if(typeof e=="string")return{stringValue:ire(e)};if(typeof e=="function")return{stringValue:Bru};if(typeof e=="symbol")return{stringValue:String(e)};if(typeof e=="object"&&e!==null){if(r.ancestors.has(e))return{stringValue:N$r};if(n>=20)return{stringValue:j$r};if(e instanceof Date){let i=e.getTime(),o=Number.isFinite(i)?e.toISOString():String(e);return{stringValue:typeof o=="string"?ire(o):String(o)}}r.ancestors.add(e);try{try{let i=e.toJSON;if(typeof i=="function")return U7o(i.call(e),t,r,n+1)}catch{}return e_(e)?{arrayValue:{values:nch(e,t,r,n+1)}}:{kvlistValue:{values:pnu(e,t,r,n+1)}}}finally{r.ancestors.delete(e)}}return{stringValue:ire(String(e))}}function nch(e,t,r,n){let i=[],o=Math.min(e.length,1e3),s=0;for(;s<o&&r.remainingNodes>0;s++)try{let a=s in e?e[s]:void 0;if(VK(a))continue;i.push(U7o(a,t,r,n))}catch{i.push({stringValue:Z5})}return e.length>s&&i.push({stringValue:j$r}),i}function pnu(e,t,r,n){let i=[];for(let o in e)if(ech.call(e,o)){if(!o){t?.debug("Dropping an attribute with an empty key");continue}if(i.length>=1e3||r.remainingNodes<=0){t?.debug("Attributes truncated: the value exceeds the OTLP encoder budget");break}try{let s=e[o];if(a7o(s)||Ome(s))continue;i.push({key:ire(o),value:U7o(s,t,r,n)})}catch{i.push({key:ire(o),value:{stringValue:Z5}})}}return i}function Z9t(e,t,r){return{...Pme({},e.resourceAttributes),"service.name":e.serviceName||"unknown_service",...e.environment&&{"deployment.environment":e.environment},...e.serviceVersion&&{"service.version":e.serviceVersion},"telemetry.sdk.name":t,"telemetry.sdk.version":r}}var ich=["service.name","deployment.environment","service.version","telemetry.sdk.name","telemetry.sdk.version"];function $9t(e,t){let r=Pme({},e),n={};for(let i of ich)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i],delete r[i]);return[...sre(r,t),...sre(n,t)]}var fnu={darwin:"macOS",win32:"Windows",cygwin:"Windows",linux:"Linux",android:"Android",freebsd:"FreeBSD",openbsd:"OpenBSD",netbsd:"NetBSD",sunos:"SunOS",aix:"AIX",haiku:"Haiku","Mac OS X":"macOS"};function och(e){if(e)return Object.prototype.hasOwnProperty.call(fnu,e)?fnu[e]:e}function V7o(e,t){let r=och(e);return{...r?{"os.name":r}:{},...t?{"os.version":t}:{}}}var sch={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},TYv=sch.info;var FUe=class{constructor(t){this._onFire=t,this._firesAt=0}get pending(){return!!this._timer}arm(t){this.clear(),this._firesAt=Date.now()+t,this._timer=N2(()=>{this._timer=void 0,this._onFire()},t)}armNoEarlierThan(t){this._timer&&Date.now()+t<=this._firesAt||this.arm(t)}clear(){this._timer&&(clearTimeout(this._timer),this._timer=void 0)}};function eqt(){return 1-.25+Math.random()*.25*2}var r8=1;function tqt(e,t,r,n){let i=Math.min(Math.max(0,t-1),6),o=e*2**i,s=n===void 0?o:Math.min(o,Math.max(n,e));return Math.round(s*r)}var rqt=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function G7o(e){return String(e)+"000000"}function q7o(e,t,r,n){let i="";return n&&(i=Object.keys(n).sort().map(s=>`${JSON.stringify(s)}:${JSON.stringify(n[s])}`).join(",")),`${e}\0${t}\0${r??""}\0${i}`}function dnu(e,t){for(let r=0;r<t.length;r++)if(e<=t[r])return r;return t.length}function W7o(e,t,r){return Z9t(e,t,r)}function H7o(e,t,r,n){return{resourceMetrics:[{resource:{attributes:$9t(t)},scopeMetrics:[{scope:{name:r,version:n},metrics:e}]}]}}function J$r(e){let t=e?.resourceAttributes;return{serviceName:t?.["service.name"]??e?.serviceName,serviceVersion:t?.["service.version"]??e?.serviceVersion,environment:t?.["deployment.environment"]??e?.environment,resourceAttributes:t,beforeSend:e?.beforeSend,flushIntervalMs:e?.flushIntervalMs??1e4,maxSeriesPerFlush:e?.maxSeriesPerFlush??1e3}}var mnu=1,nqt=class{constructor(t,r,n){this._instance=t,this._config=r,this._logger=n,this._series=new Map,this._flushTimer=new FUe(()=>this.flush().catch(i=>{this._logger.error("Metrics flush failed:",i)})),this._flushPromise=null,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set,this._retryAfter=new RUe,this._consecutiveFlushFailures=0,this._flushJitter=r8,this._generation=0}count(t,r=1,n){this._capture({name:t,type:"count",value:r,unit:n?.unit,attributes:n?.attributes})}gauge(t,r,n){this._capture({name:t,type:"gauge",value:r,unit:n?.unit,attributes:n?.attributes})}histogram(t,r,n){this._capture({name:t,type:"histogram",value:r,unit:n?.unit,attributes:n?.attributes})}flush(){let t=this._flushPromise,n=(async()=>{t&&await t.catch(()=>{}),await this._doFlush()})().finally(()=>{this._flushPromise===n&&(this._flushPromise=null)});return this._flushPromise=n,n}drainWindow(){if(this._series.size===0)return null;let t=this._series;return this._series=new Map,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set,this._buildPayload(t)}reset(){this._generation++,this._retryAfter.reset(),this._consecutiveFlushFailures=0,this._flushJitter=r8,this._flushTimer.clear(),this._series=new Map,this._flushPromise=null,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set}_capture(t){if(this._instance.isDisabled||this._instance.optedOut)return;let r=this._runBeforeSend(t);if(r===null)return;if(!r.name||typeof r.name!="string")return void this._logger.warn("Dropping metric with empty name");if(typeof r.value!="number"||!Number.isFinite(r.value))return void this._logger.warn(`Dropping metric '${r.name}': value must be a finite number`);if(r.type==="count"&&r.value<0)return void this._logger.warn(`Dropping count '${r.name}': counters are monotonic, value must be >= 0`);let n,i;try{n=r.attributes?{...r.attributes}:void 0,i=q7o(r.type,r.name,r.unit,n)}catch(a){this._logger.warn(`Dropping metric '${r.name}': attributes could not be serialized`,a);return}let o=this._series.get(i);if(!o){if(!this._admitNewSeries())return;o={name:r.name,type:r.type,unit:r.unit,attributes:n,windowStartMs:Date.now()},this._series.set(i,o)}let s=this._typeByName.get(r.name);s===void 0?this._typeByName.set(r.name,r.type):s!==r.type&&!this._typeCollisionWarned.has(r.name)&&(this._typeCollisionWarned.add(r.name),this._logger.warn(`Metric name '${r.name}' is already used as a ${s}; recording it as a ${r.type} too will blend both series in charts. Use a distinct name.`)),this._fold(o,r.value),this._armFlushTimer()}_admitNewSeries(){return this._series.size<this._config.maxSeriesPerFlush?!0:(this._seriesCapWarned||(this._seriesCapWarned=!0,this._logger.warn(`Metric series cap reached (${this._config.maxSeriesPerFlush} per flush window); dropping new series until the next flush. Reduce attribute cardinality.`)),!1)}_fold(t,r){switch(t.type){case"count":t.total=(t.total??0)+r;break;case"gauge":t.last=r;break;case"histogram":{t.hist||(t.hist={count:0,sum:0,min:r,max:r,bucketCounts:new Array(rqt.length+1).fill(0)});let n=t.hist;n.count+=1,n.sum+=r,n.min=Math.min(n.min,r),n.max=Math.max(n.max,r),n.bucketCounts[dnu(r,rqt)]+=1;break}}}_runBeforeSend(t){let r=this._config.beforeSend;if(!r)return t;let n=e_(r)?r:[r],i=t;for(let o of n)try{let s=o(i);if(!s)return this._logger.info("Metric was rejected in beforeSend function"),null;i=s}catch(s){return this._logger.error("Error in beforeSend function for metric:",s),null}return i}_armFlushTimer(){this._flushTimer.pending||this._flushTimer.arm(this._nextFlushDelay())}_nextFlushDelay(){return Math.max(tqt(this._config.flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,3e4),this._retryAfter.remainingMs())}async _doFlush(){if(this._flushTimer.clear(),this._series.size===0)return;let t=this._series;this._series=new Map,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set;let r=this._generation,n=await this._instance._sendMetricsBatch(this._buildPayload(t));if(r===this._generation)switch(this._retryAfter.record(n),n.kind==="retry-later"?(this._consecutiveFlushFailures++,this._flushJitter=eqt()):(this._consecutiveFlushFailures=0,this._flushJitter=r8),this._flushTimer.pending&&this._flushTimer.arm(this._nextFlushDelay()),n.kind){case"ok":return;case"retry-later":this._mergeWindowBack(t),this._flushTimer.armNoEarlierThan(this._nextFlushDelay());return;case"too-large":this._logger.warn("Metrics batch exceeded the server size limit and was dropped");return;case"fatal":this._logger.error("Failed to send metrics batch:",n.error);return}}_buildPayload(t){return H7o(this._buildMetrics(t),W7o(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion()),this._instance.getLibraryId(),this._instance.getLibraryVersion())}_buildMetrics(t){let r=G7o(Date.now()),n=new Map;for(let i of t.values()){let o=q7o(i.type,i.name,i.unit,void 0),s=n.get(o);s||(s={name:i.name,...i.unit&&{unit:i.unit}},i.type==="count"?s.sum={aggregationTemporality:mnu,isMonotonic:!0,dataPoints:[]}:i.type==="gauge"?s.gauge={dataPoints:[]}:s.histogram={aggregationTemporality:mnu,dataPoints:[]},n.set(o,s));let a=sre(i.attributes??{},this._logger),c=G7o(i.windowStartMs);if(i.type==="count"){let l={attributes:a,startTimeUnixNano:c,timeUnixNano:r,asDouble:i.total??0};s.sum.dataPoints.push(l)}else if(i.type==="gauge"){let l={attributes:a,timeUnixNano:r,asDouble:i.last??0};s.gauge.dataPoints.push(l)}else if(i.hist){let l={attributes:a,startTimeUnixNano:c,timeUnixNano:r,count:i.hist.count,sum:i.hist.sum,min:i.hist.min,max:i.hist.max,bucketCounts:i.hist.bucketCounts,explicitBounds:rqt};s.histogram.dataPoints.push(l)}}return Array.from(n.values())}_mergeWindowBack(t){for(let[r,n]of t){let i=this._series.get(r);if(!i){this._admitNewSeries()&&this._series.set(r,n);continue}switch(i.windowStartMs=Math.min(i.windowStartMs,n.windowStartMs),i.type){case"count":i.total=(i.total??0)+(n.total??0);break;case"gauge":break;case"histogram":if(n.hist)if(i.hist){i.hist.count+=n.hist.count,i.hist.sum+=n.hist.sum,i.hist.min=Math.min(i.hist.min,n.hist.min),i.hist.max=Math.max(i.hist.max,n.hist.max);for(let o=0;o<i.hist.bucketCounts.length;o++)i.hist.bucketCounts[o]+=n.hist.bucketCounts[o]}else i.hist=n.hist;break}}}};var uch="0".repeat(32),pch="0".repeat(16),fch=/^[0-9a-f]+$/;function dch(e){let t=new Uint8Array(e),r=globalThis.crypto;if(r&&typeof r.getRandomValues=="function")try{return r.getRandomValues(t),t}catch{}for(let n=0;n<e;n++)t[n]=Math.floor(256*Math.random());return t}function mch(e){let t="";for(let r=0;r<e.length;r++)t+=e[r].toString(16).padStart(2,"0");return t}function hnu(e){let t=mch(dch(e));return/[^0]/.test(t)?t:t.slice(0,-1)+"1"}function gnu(){return hnu(16)}function Anu(){return hnu(8)}function ynu(e,t,r){return typeof e=="string"&&e.length===t&&e!==r&&fch.test(e)}function bnu(e){return ynu(e,32,uch)}function Enu(e){return ynu(e,16,pch)}var hch=/^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(-.*)?$/;function Inu(e){let t=vnu(e);return t&&{traceId:t.traceId,spanId:t.spanId,flags:gch(t.flags)}}function gch(e){return 1&parseInt(e,16)?X$r:Ach}function vnu(e){if(typeof e!="string")return;let t=hch.exec(e.trim());if(!t)return;let[,r,n,i,o,s]=t;if(r!=="ff"&&!(r==="00"&&s)&&!(!bnu(n)||!Enu(i)))return{version:r,traceId:n,spanId:i,flags:o}}function Cnu(e){return vnu(e)&&e.trim()}function Y$r(e){return Array.isArray(e)&&e.length===1?e[0]:e}var X$r="01",Ach="00";function xnu(e,t,r=X$r){return`00-${e}-${t}-${r}`}var ych=32,K7o=512;function Z$r(e){if(typeof e!="string")return;let t=e.trim();if(!t||/[^\x20-\x7e\t]/.test(t))return;let r=t.split(",");if(!(r.length>ych)){for(let n of r)if(n.trim()&&!n.includes("="))return;return t.length<=K7o?t:Ech(r)}}var bch=128;function Ech(e){let t=[...e],r=()=>t.reduce((n,i)=>n+i.length,0)+t.length-1;for(let n=t.length-1;n>=0&&r()>K7o;n--)t[n].length>bch&&t.splice(n,1);for(;t.length&&r()>K7o;)t.pop();return t.length?t.join(","):void 0}var Snu="unknown";function NUe(e,t,r,n){return typeof e=="string"&&e.trim()?e.length>r?e.slice(0,r):e:(n?.debug(`${t} must be a non-empty string; using "${Snu}"`),Snu)}function qlt(e){if(e==null)return;let t=e;if(e instanceof Date)try{t=e.getTime()}catch{return}if(!(typeof t!="number"||!Number.isFinite(t))&&!(t<0||t>9223372036854))return t}function wnu(e,t,r){let n=qlt(e);return n===void 0?(e!==void 0&&r?.debug("Span startTime is out of range or not a valid time; using the current time"),t):(t-n>864e5?r?.debug("Span startTime is more than 24 hours in the past; the server will clamp it to receive time and keep the original in $originalTimestamp"):n>t&&r?.debug("Span startTime is in the future; the span may export with a zero duration"),n)}function $$r(e,t){return e<t?t:e}function iqt(e,t,r,n){let i=qlt(e);return i===void 0?(e!==void 0&&n?.debug(`Span ${r} is out of range or not a valid time; using the derived time`),t):i}function ten(){let e=globalThis.performance;return typeof e?.now=="function"?e.now():void 0}var Wlt=class{constructor(t,r,n){this._onEnd=r,this._logger=n,this._events=[],this._ended=!1,this._userAttributeCount=0,this._userEventCount=0,this._droppedAttributes=0,this._droppedEvents=0,this._traceId=t.traceId,this._spanId=t.spanId,this._parentSpanId=t.parentSpanId,this._traceState=t.traceState,this._traceFlags=t.traceFlags??X$r,this._parentIsRemote=t.parentIsRemote??!1,this._name=t.name,this._kind=t.kind,this._autoKeys=new Set(t.autoAttributeKeys),this._maxAttributes=t.maxAttributes,this._maxEvents=t.maxEvents,this._maxAttributesPerEvent=t.maxAttributesPerEvent,this._maxAttributeValueLength=t.maxAttributeValueLength,this._attributes=Object.create(null);for(let i of Object.keys(t.attributes))this._writeAttribute(i,t.attributes[i]);this._startMono=t.backdated?void 0:ten(),this._startTime=t.clockAnchor&&this._startMono!==void 0?t.clockAnchor.wall+(this._startMono-t.clockAnchor.mono):t.startTime,this._startMono!==void 0&&(this._clockAnchor=t.clockAnchor??{wall:this._startTime,mono:this._startMono})}_now(){if(this._startMono!==void 0){let t=ten();if(t!==void 0)return this._startTime+Math.max(0,t-this._startMono)}return Date.now()}_mutable(t){return this._ended?(this._logger?.debug(`Ignoring ${t} on a span that has already ended`),!1):!0}_writeAttribute(t,r){if(VK(r)){t in this._attributes&&!this._autoKeys.has(t)&&this._userAttributeCount--,delete this._attributes[t];return}if(!this._autoKeys.has(t)&&!(t in this._attributes)){if(this._userAttributeCount>=this._maxAttributes)return void this._droppedAttributes++;this._userAttributeCount++}this._attributes[t]=nen(r,this._maxAttributeValueLength)}setAttribute(t,r){return this._mutable("setAttribute")&&this._writeAttribute(t,r),this}setAttributes(t){if(this._mutable("setAttributes")){let r=Pme({},t);for(let n of Object.keys(r))this._writeAttribute(n,r[n])}return this}addEvent(t,r,n){if(this._mutable("addEvent")){if(this._userEventCount>=this._maxEvents)return this._droppedEvents++,this;this._userEventCount++;let i=r&&Bnu(r,this._maxAttributesPerEvent,this._maxAttributeValueLength);this._events.push({name:NUe(t,"Span event name",this._maxAttributeValueLength,this._logger),timestamp:iqt(n,this._now(),"event timestamp",this._logger),...i&&{attributes:i.attributes,...i.dropped&&{droppedAttributesCount:i.dropped}}})}return this}setStatus(t,r){if(this._mutable("setStatus")){if(t!=="ok"&&t!=="error")return this._logger?.debug(`Ignoring unknown span status "${String(t)}"; expected "ok" or "error"`),this;this._status={code:t,...r&&{message:J7o(r,this._maxAttributeValueLength)}}}return this}get statusIsExplicitlyOk(){return this._status?.code==="ok"}recordException(t){if(!this._mutable("recordException"))return this;let{type:r,message:n,stack:i}=Y7o(t);return this.addEvent(Ich,{"exception.type":r,"exception.message":n,...i&&{"exception.stacktrace":i}}),this.setStatus("error",n)}updateName(t){return this._mutable("updateName")&&(this._name=NUe(t,"Span name",this._maxAttributeValueLength,this._logger)),this}traceparent(){return xnu(this._traceId,this._spanId,this._traceFlags)}tracestate(){return this._traceState??null}childContext(){return{traceId:this._traceId,parentSpanId:this._spanId,traceState:this._traceState,traceFlags:this._traceFlags,clockAnchor:this._clockAnchor}}end(t){if(this._ended)return void this._logger?.debug("Ignoring end() on a span that has already ended");this._ended=!0;let r=this._now(),n=iqt(t,r,"end time",this._logger);this._onEnd({traceId:this._traceId,spanId:this._spanId,...this._parentSpanId&&{parentSpanId:this._parentSpanId},...this._traceState&&{traceState:this._traceState},traceFlags:this._traceFlags,parentIsRemote:this._parentIsRemote,name:this._name,kind:this._kind,...this._status&&{status:this._status},attributes:{...this._attributes},events:this._events,startTime:this._startTime,endTime:$$r(n,this._startTime),...this._droppedAttributes&&{droppedAttributesCount:this._droppedAttributes},...this._droppedEvents&&{droppedEventsCount:this._droppedEvents}},this._autoKeys)}},Ich="exception",vch=4294967295;function Cch(e){try{return typeof e=="string"?e:String(e)}catch{return Z5}}function jUe(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?0:Math.min(Math.floor(e),vch)}function xch(e,t){if(!t.length)return Object.keys(e);let r=t.filter(i=>Object.prototype.propertyIsEnumerable.call(e,i)),n=new Set(r);return[...r,...Object.keys(e).filter(i=>!n.has(i))]}function Onu(e,t,r,n,i,o,s=[]){let a=0,c=0,l={};for(let f of xch(e.attributes,s)){let m=e.attributes[f];if(!VK(m)){if(!t.has(f)){if(a>=r){c++;continue}a++}Object.defineProperty(l,f,{value:nen(m,o),enumerable:!0,writable:!0,configurable:!0})}}e.attributes=l,c&&(e.droppedAttributesCount=jUe(e.droppedAttributesCount)+c);let u=0,p=0,d=[];for(let f of e.events){if(u>=n){p++;continue}if(u++,f.attributes){let m=Bnu(f.attributes,i,o);f.attributes=m.attributes,m.dropped&&(f.droppedAttributesCount=jUe(f.droppedAttributesCount)+m.dropped)}d.push(f)}e.events=d,p&&(e.droppedEventsCount=jUe(e.droppedEventsCount)+p),e.status?.message&&(e.status={...e.status,message:J7o(Cch(e.status.message),o)})}var ren=class{setAttribute(){return this}setAttributes(){return this}addEvent(){return this}setStatus(){return this}recordException(){return this}updateName(){return this}traceparent(){return null}tracestate(){return null}end(){}},Pnu=new ren,oqt=class extends ren{constructor(t,r){super(),this._traceparent=t,this._tracestate=r}traceparent(){return this._traceparent}tracestate(){return this._tracestate??null}};function Sch(e){try{let t=e.stack;return typeof t=="string"&&t?{stack:t}:{}}catch{return{}}}function HSe(e,t){let r=Y$r(e?.parent)??t,n=typeof r=="string"||r==null?r:Tnu(r,"traceparent"),i=Cnu(n);if(!i)return Pnu;let o=typeof r=="string"||r==null?e?.tracestate:Tnu(r,"tracestate");return new oqt(i,Z$r(o))}function Tnu(e,t){try{let r=e[t];return typeof r=="function"?r.call(e):void 0}catch{return}}function J7o(e,t){return e.length>t?e.slice(0,t):e}function nen(e,t){return een(e,t,{ancestors:new WeakSet,remainingNodes:1e4},0)}function een(e,t,r,n){if(e===null||typeof e!="object")return VK(e)||r.remainingNodes<=0?e:(r.remainingNodes--,typeof e=="string"?J7o(e,t):e);if(r.ancestors.has(e))return N$r;if(r.remainingNodes<=0||n>=20)return e;r.remainingNodes--,r.ancestors.add(e);try{if(e instanceof Date)return e;let i=wch(e);if(i.selfDescribed)return VK(i.value)?String(i.value):een(i.value,t,r,n+1);if(e_(e)){let a=Math.min(e.length,1e3),c=[];for(let l=0;l<a;l++)try{c.push(een(e[l],t,r,n+1))}catch{c.push(Z5)}return e.length>a&&(c.length=e.length),c}let o={},s=0;for(let a of Object.keys(e)){if(s>=1e3)break;let c;try{c=een(e[a],t,r,n+1)}catch{c=Z5}a&&!VK(c)&&s++,Object.defineProperty(o,a,{value:c,enumerable:!0,writable:!0,configurable:!0})}return o}catch{return e}finally{r.ancestors.delete(e)}}function wch(e){try{let t=e.toJSON;if(typeof t=="function")return{selfDescribed:!0,value:t.call(e)}}catch{}return{selfDescribed:!1}}function Bnu(e,t,r){let n;try{n=Object.keys(e)}catch{return{attributes:{},dropped:0}}let i={},o=0,s=0;for(let a of n){if(o>=t){s++;continue}let c;try{c=nen(e[a],r)}catch{c=Z5}VK(c)||(o++,Object.defineProperty(i,a,{value:c,enumerable:!0,writable:!0,configurable:!0}))}return{attributes:i,dropped:s}}function Dnu(e,t){for(let r of Object.keys(e))e[r]=nen(e[r],t);return e}function sqt(e,t,r){return t===Pnu?r(t):e.with(t,()=>r(t))}function Y7o(e){try{let t=Sch(e);if(qSe(e))return{type:e.name||"Error",message:e.message||"",...t};if(typeof e=="string")return{type:"string",message:e};if(e&&typeof e=="object"){let r=e;if(typeof r.message=="string")return{type:typeof r.name=="string"?r.name:"Object",message:r.message,...t}}return{type:typeof e,message:String(e)}}catch{return{type:typeof e,message:""}}}var X7o={internal:1,server:2,client:3,producer:4,consumer:5},Tch={ok:1,error:2},Och=1,Pch=256,Bch=512;function Dch(e){let t=parseInt(e.traceFlags,16);return(Number.isFinite(t)?255&t:Och)|Pch|(e.parentIsRemote?Bch:0)}function ien(e){if(typeof e=="string")return ire(e);try{return ire(String(e))}catch{return Z5}}function Rch(e){return e&&Object.prototype.hasOwnProperty.call(X7o,e)?X7o[e]:X7o.internal}function Z7o(e){let t=Math.floor(e),r=Math.round((e-t)*1e6);return r>=1e6&&(t+=1,r=0),String(t)+String(r).padStart(6,"0")}function kch(e,t){let r={name:ien(e.name),timeUnixNano:Z7o(e.timestamp)};if(e.attributes){let i=sre(e.attributes,t);i.length&&(r.attributes=i)}let n=jUe(e.droppedAttributesCount);return n&&(r.droppedAttributesCount=n),r}function Rnu(e,t){let r={traceId:e.traceId,spanId:e.spanId,name:ien(e.name),kind:Rch(e.kind),startTimeUnixNano:Z7o(e.startTime),endTimeUnixNano:Z7o(e.endTime),flags:Dch(e)};e.parentSpanId&&(r.parentSpanId=e.parentSpanId),e.traceState&&(r.traceState=ien(e.traceState));let n=sre(e.attributes,t);n.length&&(r.attributes=n),e.events.length&&(r.events=e.events.map(s=>kch(s,t)));let i=jUe(e.droppedAttributesCount);i&&(r.droppedAttributesCount=i);let o=jUe(e.droppedEventsCount);return o&&(r.droppedEventsCount=o),e.status&&(r.status={code:Tch[e.status.code],...e.status.message&&{message:ien(e.status.message)}}),r}function knu(e,t,r){return Z9t(e,t,r)}function Fnu(e,t,r,n,i){return{resourceSpans:[{resource:{attributes:$9t(t,i)},scopeSpans:[{scope:{name:r,version:n},spans:e}]}]}}var Nnu=8;function oen(){return ten()??Date.now()}function $7o(e){try{return e instanceof Wlt}catch{return!1}}function jnu(e,t){let r=Inu(e);if(r)return{traceId:r.traceId,parentSpanId:r.spanId,traceState:Z$r(t),traceFlags:r.flags,isRemote:!0}}function Fch(e){try{return typeof e.traceparent=="function"}catch{return!1}}function Nch(e){return!!e.attributes&&typeof e.attributes=="object"&&!Array.isArray(e.attributes)&&Array.isArray(e.events)&&e.name!==void 0&&e.kind!==void 0&&e.startTime!==void 0&&e.endTime!==void 0}function sen(e,t,r){e[t]!==r&&(e[t]=r)}function jch(e,t){try{let r=Object.getOwnPropertyDescriptors(e);for(let n of["traceId","spanId","parentSpanId","traceState"])r[n]={value:t[n],enumerable:!0,writable:!0,configurable:!0};return Object.create(Object.getPrototypeOf(e),r)}catch{return e}}var aqt=class{constructor(t,r,n,i,o,s){this._instance=t,this._config=r,this._logger=n,this._getContext=i,this._contextManager=o,this._onSpanQueued=s,this._queue=[],this._flushTimer=new FUe(()=>this._flushInBackground()),this._flushPromise=null,this._droppedSinceWarning=0,this._lastDropWarningAt=0,this._dropReasons=new Set,this._consecutiveFlushFailures=0,this._flushJitter=r8,this._retryAfter=new RUe,this._headBatchFailures=0,this._headBatchSize=0,this._headBatchChargeableAt=0,this._generation=0,this._liveSpans=new Map,this._maxExportBatchSize=r.maxExportBatchSize}startSpan(t,r){if(this._instance.isDisabled||this._instance.optedOut)return HSe(r,this._contextManager.active());let n=Y$r(r?.parent);if(n&&typeof n!="string"&&!$7o(n)){if(Fch(n))return this._logger.debug("Span parent is not a span from this SDK; returning an inert span"),HSe(r,this._contextManager.active());this._logger.debug("Ignoring an unusable span parent")}let i=this._resolveParent(n,r);if(this._liveSpans.size>=this._config.maxLiveSpans&&this._evictAgedSpans(),this._liveSpans.size>=this._config.maxLiveSpans)return this._recordDrop(1,`the live-span limit (${this._config.maxLiveSpans}) was reached \u2014 spans are being started and never ended`),HSe(r,this._contextManager.active());let o=Date.now(),s=wnu(r?.startTime,o,this._logger),a=Anu();this._liveSpans.set(a,oen());let c=this._autoContextAttributes();return new Wlt({traceId:i?.traceId??gnu(),spanId:a,parentSpanId:i?.parentSpanId,traceState:i?.traceState,traceFlags:i?.traceFlags,parentIsRemote:i?.isRemote,name:NUe(t,"Span name",this._config.maxAttributeValueLength,this._logger),kind:r?.kind??"internal",attributes:Pme({...c},r?.attributes),autoAttributeKeys:Object.keys(c),maxAttributes:this._config.maxAttributesPerSpan,maxEvents:this._config.maxEventsPerSpan,maxAttributesPerEvent:this._config.maxAttributesPerEvent,maxAttributeValueLength:this._config.maxAttributeValueLength,startTime:s,backdated:s!==o,clockAnchor:qlt(r?.startTime)===void 0?i?.clockAnchor:void 0},(l,u)=>this._onSpanEnd(l,u),this._logger)}withSpan(t,r,n){let i=typeof r=="function"?void 0:r,o=typeof r=="function"?r:n,s=this.startSpan(t,i);try{let a=sqt(this._contextManager,s,o);return Fru(a)?a.then(c=>(s.end(),c),c=>{throw this._recordCallbackError(s,c),s.end(),c}):(s.end(),a)}catch(a){throw this._recordCallbackError(s,a),s.end(),a}}getActiveSpan(){return this._contextManager.active()??null}get throttled(){return this._retryAfter.isOpen()}async flush(){for(;;)if(!this._queue.length||!await(this._flushPromise??this._startFlush()))return}_startFlush(){this._flushTimer.clear();let t=this._generation,r=Promise.resolve().then(()=>t===this._generation?this._flushInner():0).finally(()=>{this._flushPromise===r&&(this._flushPromise=null),this._armFlushTimerIfQueuedNoEarlierThan()});return this._flushPromise=r,r}reset(){this._flushTimer.clear(),this._queue.length&&this._logger.critical(`Discarding ${this._queue.length} span(s) that were still queued when tracing was shut down. Raise the shutdown timeout or flush earlier if they matter.`),this._queue=[],this._liveSpans.clear(),this._flushPromise=null,this._generation++,this._maxExportBatchSize=this._config.maxExportBatchSize,this._droppedSinceWarning=0,this._dropReasons.clear(),this._lastDropWarningAt=0,this._consecutiveFlushFailures=0,this._flushJitter=r8,this._retryAfter.reset(),this._resetHeadBatchBudget()}_resetHeadBatchBudget(){this._headBatchFailures=0,this._headBatchChargeableAt=0}_resolveParent(t,r){if(typeof t=="string"){let i=jnu(t,r?.tracestate);return i||this._logger.debug("Ignoring malformed traceparent; starting a new trace"),i}if($7o(t))return t.childContext();let n=this._contextManager.active();if($7o(n))return n.childContext();if(n instanceof oqt)return jnu(n.traceparent(),n.tracestate()??void 0)}_autoContextAttributes(){let t;try{t=this._getContext()}catch(n){return this._logger.debug("Failed to read tracing context; span will carry no PostHog attributes",n),{}}let r={};return t.distinctId&&(r.posthogDistinctId=t.distinctId),t.sessionId&&(r.sessionId=t.sessionId),t.currentUrl&&(r["url.full"]=t.currentUrl),t.screenName&&(r["screen.name"]=t.screenName),t.appState&&(r["app.state"]=t.appState),r}_recordCallbackError(t,r){if(!(t instanceof Wlt))return;let{type:n,message:i,stack:o}=Y7o(r);t.addEvent("exception",{"exception.type":n,"exception.message":i,...o&&{"exception.stacktrace":o}}),t.statusIsExplicitlyOk||t.setStatus("error",i)}_evictAgedSpans(){let t=oen()-this._config.maxSpanAgeMs,r=0;for(let[n,i]of this._liveSpans){if(i>t)break;this._liveSpans.delete(n),r++}r&&this._recordDrop(r,`they were still live after ${this._config.maxSpanAgeMs}ms`)}_onSpanEnd(t,r){if(!this._liveSpans.delete(t.spanId))return;if(this._instance.isDisabled||this._instance.optedOut)return void this._recordDrop(1,"the user has opted out");let n=this._runBeforeSpanSend(t,r);if(n){if(this._reportLimitDrops(n),this._queue.length>=this._config.maxQueueSize)return void this._recordDrop(1,`the queue is full (${this._config.maxQueueSize}) \u2014 raise the flush frequency or reduce span volume`);this._queue.push(n);try{this._onSpanQueued?.()}catch(i){this._logger.debug("Span queue notification failed",i)}!(this._queue.length>=this._maxExportBatchSize)||this._consecutiveFlushFailures||this._retryAfter.isOpen()?this._armFlushTimerIfQueued():this._flushInBackground()}}_reportLimitDrops(t){let r=t.droppedAttributesCount??0,n=t.droppedEventsCount??0,i=0;for(let o of t.events)i+=o.droppedAttributesCount??0;(r||n||i)&&this._logger.debug(`Span limits discarded data from "${t.name}": ${r} attributes, ${n} events, ${i} event attributes`)}_runBeforeSpanSend(t,r){if(!this._config.beforeSpanSend.length)return t;let n={traceId:t.traceId,spanId:t.spanId,parentSpanId:t.parentSpanId,traceState:t.traceState},i={startTime:t.startTime,endTime:t.endTime},o={attributes:t.droppedAttributesCount,events:t.droppedEventsCount},s=Object.keys(t.attributes),a={traceFlags:t.traceFlags,parentIsRemote:t.parentIsRemote},c=t.status&&{...t.status},l=t,u=t;try{for(let f of this._config.beforeSpanSend){let m=f(l);if(!m)return this._recordDrop(1,"beforeSpanSend dropped it"),null;l=this._keepSpanIdentity(m,n)}if(u={traceId:n.traceId,spanId:n.spanId,parentSpanId:n.parentSpanId,traceState:n.traceState,name:l.name,kind:l.kind,status:l.status,attributes:l.attributes,events:l.events,startTime:l.startTime,endTime:l.endTime,traceFlags:a.traceFlags,parentIsRemote:a.parentIsRemote,droppedAttributesCount:o.attributes,droppedEventsCount:o.events},!Nch(u))return this._logger.debug("beforeSpanSend did not return a span record; dropping the span"),this._recordDrop(1,"beforeSpanSend returned an unusable record"),null;u.name=NUe(u.name,"Span name",this._config.maxAttributeValueLength,this._logger),u.status&&u.status.code!=="ok"&&u.status.code!=="error"&&(this._logger.debug("beforeSpanSend set an unknown span status; keeping the original"),u.status=c),u.startTime=qlt(u.startTime)??i.startTime,u.endTime=$$r(qlt(u.endTime)??i.endTime,u.startTime);let d=[];for(let f of u.events)try{d.push({...f,name:NUe(f.name,"Span event name",this._config.maxAttributeValueLength,this._logger),timestamp:iqt(f.timestamp,u.startTime,"event timestamp",this._logger)})}catch{this._logger.debug("beforeSpanSend left an unreadable span event; dropping it")}return u.events=d,Onu(u,r,this._config.maxAttributesPerSpan,this._config.maxEventsPerSpan,this._config.maxAttributesPerEvent,this._config.maxAttributeValueLength,s),u}catch(p){return this._logger.debug("beforeSpanSend failed; dropping the span rather than exporting it unscrubbed",p),this._recordDrop(1,"beforeSpanSend failed"),null}}_keepSpanIdentity(t,r){(t.traceId!==r.traceId||t.spanId!==r.spanId||t.parentSpanId!==r.parentSpanId)&&this._logger.debug("beforeSpanSend changed a span identity field; keeping the original ids");try{sen(t,"traceId",r.traceId),sen(t,"spanId",r.spanId),sen(t,"parentSpanId",r.parentSpanId),sen(t,"traceState",r.traceState)}catch{return jch(t,r)}return t}_recordDrop(t,r){this._droppedSinceWarning+=t,this._dropReasons.add(r),Date.now()-this._lastDropWarningAt>=this._config.flushIntervalMs&&this._warnAboutDrops()}_warnAboutDrops(){this._droppedSinceWarning&&(this._lastDropWarningAt=Date.now(),this._logger.warn(`Dropping ${this._droppedSinceWarning} span(s): ${[...this._dropReasons].join("; ")}`),this._droppedSinceWarning=0,this._dropReasons.clear())}_encodeBatch(t){let r=[];for(let n of t)try{r.push(Rnu(n,this._logger))}catch(i){this._logger.debug("Failed to encode a span; dropping it",i),this._recordDrop(1,"its attributes could not be encoded")}return r}_discardQueueIfConsentWithdrawn(){if(!this._instance.isDisabled&&!this._instance.optedOut)return 0;let t=this._queue.length;return this._queue=[],this._resetHeadBatchBudget(),this._recordDrop(t,"the user has opted out"),this._warnAboutDrops(),t}async _flushInner(){if(!this._queue.length)return 0;let t=this._discardQueueIfConsentWithdrawn();if(t)return t;let r=Dnu(knu(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion()),this._config.maxAttributeValueLength),n=this._instance.getLibraryId(),i=this._instance.getLibraryVersion(),o=this._queue.length,s=0,a=1/0,c=this._generation;try{for(;o>0&&this._queue.length>0;){let l=this._discardQueueIfConsentWithdrawn();if(l)return s+l;let u=this._headBatchFailures>0?Math.min(this._maxExportBatchSize,this._headBatchSize):this._maxExportBatchSize,p=Math.max(1,Math.min(u,a,o,this._queue.length)),d=this._queue.slice(0,p),f=this._encodeBatch(d);if(!f.length){this._queue.splice(0,p),o-=p,s+=p,this._resetHeadBatchBudget();continue}let m=oen()>=this._headBatchChargeableAt&&!this._retryAfter.isOpen(),g=await this._instance._sendTracesBatch(Fnu(f,r,n,i,this._logger));if(c!==this._generation)break;if(this._retryAfter.record(g),g.kind==="ok"){this._consecutiveFlushFailures=0,this._flushJitter=r8,this._resetHeadBatchBudget(),this._queue.splice(0,p),o-=p,s+=p,this._maxExportBatchSize<this._config.maxExportBatchSize&&this._maxExportBatchSize++;continue}if(g.kind==="too-large"){if(p===1){this._queue.splice(0,1),o-=1,s+=1,this._recordDrop(1,"it is too large for the ingestion endpoint"),this._consecutiveFlushFailures=0,this._flushJitter=r8,this._resetHeadBatchBudget();continue}let A=Math.max(1,Math.floor(p/2));g.measuredLocally?a=A:this._maxExportBatchSize=A,this._resetHeadBatchBudget(),this._logger.debug(`Batch too large; retrying the same spans in batches of ${A}`);continue}if(g.kind==="retry-later"){if(this._consecutiveFlushFailures++,this._flushJitter=eqt(),this._headBatchSize=p,m&&(this._headBatchFailures++,this._headBatchChargeableAt=oen()+this._nextFlushDelay()),this._headBatchFailures<Nnu)return this._logger.debug("Span export failed; retrying on the next flush",g.error),s;if(this._queue.splice(0,p),o-=p,s+=p,this._consecutiveFlushFailures=0,this._flushJitter=r8,this._resetHeadBatchBudget(),this._recordDrop(p,`the ingestion endpoint failed ${Nnu} times in a row`),this._retryAfter.isOpen())return s;continue}this._logger.debug("Dropping a span batch the ingestion endpoint rejected",g.error),this._queue.splice(0,p),o-=p,s+=p,this._consecutiveFlushFailures=0,this._flushJitter=r8,this._resetHeadBatchBudget(),this._recordDrop(p,"the ingestion endpoint rejected the batch")}return s}finally{this._warnAboutDrops()}}_flushInBackground(){this._backgroundFlush||(this._backgroundFlush=this.flush().catch(t=>{this._logger.debug("Background span flush failed",t)}).finally(()=>{this._backgroundFlush=void 0,this._armFlushTimerIfQueuedNoEarlierThan()}))}_armFlushTimerIfQueued(){this._flushTimer.pending||!this._queue.length||this._flushTimer.arm(this._nextFlushDelay())}_armFlushTimerIfQueuedNoEarlierThan(){this._queue.length&&this._flushTimer.armNoEarlierThan(this._nextFlushDelay())}_nextFlushDelay(){return Math.max(tqt(this._config.flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,3e4),this._retryAfter.remainingMs())}};var cqt=class{active(){return this._active}with(t,r){let n=this._active;this._active=t;try{return r()}finally{this._active=n}}};var zch=5e3,Qch=512,Mch=2048,Lch=128,_ch=128,Uch=128,Vch=8192,Gch=1e4,qch=36e5;function KSe(e,t){return typeof e=="number"&&Number.isInteger(e)&&e>=1?e:t}var znu=["service.name","service.version","deployment.environment"];function Wch(e){if(!(!e||typeof e!="object"||Array.isArray(e)))try{if(znu.every(r=>!(r in e)||typeof e[r]=="string"))return e;let t={...e};for(let r of znu)r in t&&typeof t[r]!="string"&&delete t[r];return t}catch{return}}function Hch(e,t){if(!e)return[];let r=[e].flat().filter(i=>!!i),n=r.filter(i=>typeof i=="function");return n.length!==r.length&&t?.critical(`beforeSpanSend: ignoring ${r.length-n.length} of ${r.length} entries that are not functions. Spans export without them, so whatever they were redacting is not redacted.`),n}function eHo(e,t,r){let n=Pme({...t},Wch(e?.resourceAttributes)),i=KSe(e?.maxExportBatchSize,Qch);return{serviceName:n?.["service.name"]??e?.serviceName,serviceVersion:n?.["service.version"]??e?.serviceVersion,environment:n?.["deployment.environment"]??e?.environment,resourceAttributes:n,beforeSpanSend:Hch(e?.beforeSpanSend,r),maxAttributesPerSpan:KSe(e?.maxAttributesPerSpan,Lch),maxEventsPerSpan:KSe(e?.maxEventsPerSpan,_ch),maxAttributesPerEvent:Uch,maxAttributeValueLength:KSe(e?.maxAttributeValueLength,Vch),flushIntervalMs:KSe(e?.flushIntervalMs,zch),maxExportBatchSize:i,maxQueueSize:Math.max(KSe(e?.maxQueueSize,Mch),i),maxLiveSpans:KSe(e?.maxLiveSpans,Gch),maxSpanAgeMs:KSe(e?.maxSpanAgeMs,qch)}}var tHo=require("fs"),Lnu=require("fs/promises"),nHo=require("path"),_nu=require("readline"),aen=new ST.ReduceableCache(25),lqt=new ST.ReduceableCache(20),iHo=7,Kch=1e3,Jch=1e4,rHo=10485760;async function Unu(e,t=Lnu.open,r){let n={},i;try{i=process.cwd()}catch{}for(let a=e.length-1;a>=0;a--){let c=e[a],l=c?.filename;if(!c||typeof l!="string"||typeof c.lineno!="number"||elh(l)||tlh(c)||!(0,nHo.isAbsolute)(l)&&i===void 0)continue;n[l]||(n[l]=[]),n[l].push(c.lineno)}let o=Object.keys(n);if(o.length==0)return e;let s=[];for(let a of o){let c=Vnu(a,i);if(c===void 0||lqt.get(c))continue;let l=n[a];if(!l)continue;l.sort((d,f)=>d-f);let u=nlh(l);if(u.every(d=>rlh(c,d)))continue;let p=ilh(aen,c,{});s.push(Xch(a,u,p,c,t,r))}return await Promise.all(s).catch(()=>{}),e&&e.length>0&&Zch(e,aen,i),aen.reduce(),e}async function Ych(e,t,r){let n,i=!1;try{n=await t(e,tHo.constants.O_RDONLY|tHo.constants.O_NONBLOCK);let o=await n.stat();return o.isFile()?o.size>rHo?void r?.debug(`Skipping source context for oversized file ${e}: ${o.size} bytes exceeds ${rHo}`):(i=!0,n):void 0}catch{return}finally{n&&!i&&await n.close().catch(()=>{})}}async function Xch(e,t,r,n,i,o){let s=await Ych(e,i,o);if(s===void 0)return void lqt.set(n,1);let a=s;return new Promise(c=>{let l=!1;function u(C){l||(l=!0,C?.destroy(),a.close().then(c,c))}let p;try{p=a.createReadStream({autoClose:!1,start:0,end:rHo-1})}catch{lqt.set(n,1),u();return}let d;try{d=(0,_nu.createInterface)({input:p})}catch{lqt.set(n,1),u(p);return}let f=0,m=0,g=t[m];if(g===void 0)return void u(p);let A=g[0],b=g[1];function I(){lqt.set(n,1),d.close(),d.removeAllListeners(),u(p)}p.on("error",I),d.on("error",I),d.on("close",()=>u(p)),d.on("line",C=>{if(f++,!(f<A)&&(r[f]=olh(C,0),f>=b)){if(m===t.length-1){d.close(),d.removeAllListeners();return}m++;let x=t[m];if(x===void 0){d.close(),d.removeAllListeners();return}A=x[0],b=x[1]}})})}function Zch(e,t,r){for(let n of e)if(n.filename&&n.context_line===void 0&&typeof n.lineno=="number"){let i=Vnu(n.filename,r),o=i===void 0?void 0:t.get(i);if(o===void 0)continue;$ch(n.lineno,n,o)}}function $ch(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let i=Gnu(e);i<e;i++){let o=r[i];if(o===void 0)return void Qnu(t);t.pre_context.push(o)}if(r[e]===void 0)return void Qnu(t);t.context_line=r[e];let n=qnu(e);t.post_context=[];for(let i=e+1;i<=n;i++){let o=r[i];if(o===void 0)break;t.post_context.push(o)}}function Qnu(e){delete e.pre_context,delete e.context_line,delete e.post_context}function elh(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function tlh(e){return e.lineno!==void 0&&e.lineno>Jch||e.colno!==void 0&&e.colno>Kch}function Vnu(e,t){return(0,nHo.isAbsolute)(e)?JSON.stringify([null,e]):t===void 0?void 0:JSON.stringify([t,e])}function rlh(e,t){let r=aen.get(e);if(r===void 0)return!1;for(let n=t[0];n<=t[1];n++)if(r[n]===void 0)return!1;return!0}function nlh(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let n=Mnu(r),i=[];for(;;){if(t===e.length-1){i.push(n);break}let o=e[t+1];if(typeof o!="number")break;o<=n[1]?n[1]=o+iHo:(i.push(n),n=Mnu(o)),t++}return i}function Mnu(e){return[Gnu(e),qnu(e)]}function Gnu(e){return Math.max(1,e-iHo)}function qnu(e){return e+iHo}function ilh(e,t,r){let n=e.get(t);return n===void 0?(e.set(t,r),r):n}function olh(e,t){let r=e,n=r.length;if(n<=150)return r;t>n&&(t=n);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,n);return o>n-5&&(o=n),o===n&&(i=Math.max(o-140,0)),r=r.slice(i,o),i>0&&(r=`...${r}`),o<n&&(r+="..."),r}var Hlt=require("path");function Wnu(e=process.cwd()){let t=Hlt.sep==="\\",r=i=>t?i.replace(/\\/g,"/"):i,n=r(e);return async i=>{for(let o of i)!o.filename||o.filename.startsWith("node:")||o.filename.startsWith("data:")||(0,Hlt.isAbsolute)(o.filename)&&(o.filename=r((0,Hlt.relative)(n,r(o.filename))));return i}}var Hnu="5.55.0";var Dme={ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"};var JSe=class e{constructor(t){this._host=t.host,this._distinctId=t.distinctId,this._groups=t.groups,this._disableGeoip=t.disableGeoip,this._flags=t.flags,this._requestId=t.requestId,this._evaluatedAt=t.evaluatedAt,this._flagDefinitionsLoadedAt=t.flagDefinitionsLoadedAt,this._errorsWhileComputing=t.errorsWhileComputing??!1,this._quotaLimited=t.quotaLimited??!1,this._accessed=t.accessed??new Set,this._isSlice=t.isSlice??!1}isEnabled(t,r={}){let n=this._flags[t];return this._recordAccess(t),n?.enabled??r.defaultValue??!1}getFlag(t){let r=this._flags[t];if(this._recordAccess(t),!!r)return r.enabled?r.variant??!0:!1}getFlagPayload(t){return this._flags[t]?.payload}onlyAccessed(){let t={};for(let r of this._accessed){let n=this._flags[r];n&&(t[r]=n)}return this._cloneWith(t)}only(t){let r={},n=[];for(let i of t){let o=this._flags[i];o?r[i]=o:n.push(i)}return n.length>0&&this._host.logWarning(`FeatureFlagEvaluations.only() was called with flag keys that are not in the evaluation set and will be dropped: ${n.join(", ")}`),this._cloneWith(r)}get keys(){return Object.keys(this._flags)}_getEventProperties(){let t={},r=[];for(let[n,i]of Object.entries(this._flags)){let o=i.enabled===!1?!1:i.variant??!0;t[`$feature/${n}`]=o,i.enabled&&r.push(n)}return r.length>0&&(r.sort(),t.$active_feature_flags=r),t}_cloneWith(t){return new e({host:this._host,distinctId:this._distinctId,groups:this._groups,disableGeoip:this._disableGeoip,flags:t,requestId:this._requestId,evaluatedAt:this._evaluatedAt,flagDefinitionsLoadedAt:this._flagDefinitionsLoadedAt,errorsWhileComputing:this._errorsWhileComputing,quotaLimited:this._quotaLimited,accessed:new Set(this._accessed),isSlice:!0})}_recordAccess(t){if(this._accessed.add(t),this._distinctId===""||this._isSlice&&!(t in this._flags))return;let r=this._flags[t],n=r===void 0?void 0:r.enabled===!1?!1:r.variant??!0,i={$feature_flag:t,$feature_flag_response:n,$feature_flag_id:r?.id,$feature_flag_version:r?.version,$feature_flag_reason:r?.reason,locally_evaluated:r?.locallyEvaluated??!1,[`$feature/${t}`]:n,$feature_flag_request_id:this._requestId,$feature_flag_evaluated_at:r?.locallyEvaluated?Date.now():this._evaluatedAt};r?.hasExperiment!==void 0&&(i.$feature_flag_has_experiment=r.hasExperiment),r?.locallyEvaluated&&this._flagDefinitionsLoadedAt!==void 0&&(i.$feature_flag_definitions_loaded_at=this._flagDefinitionsLoadedAt);let o=[];this._errorsWhileComputing&&o.push(Dme.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(Dme.QUOTA_LIMITED),r===void 0&&o.push(Dme.FLAG_MISSING),o.length>0&&(i.$feature_flag_error=o.join(",")),this._host.captureFlagCalledEventIfNeeded({distinctId:this._distinctId,key:t,response:n,groups:this._groups,disableGeoip:this._disableGeoip,properties:i})}};var slh=6e4;function Knu(e){return e==="client"||e==="server"?e:"all"}function alh(e,t){return e===t||e==="all"||t==="all"}var Klt=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}};function clh(e,t){e.name=t.name,Error.captureStackTrace(e,t),Object.setPrototypeOf(e,t.prototype)}var are=class e extends Error{constructor(t){super(t),clh(this,e)}},cen=class{constructor({pollingInterval:t,personalApiKey:r,projectApiKey:n,timeout:i,host:o,customHeaders:s,...a}){this.debugMode=!1,this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.pollerStopped=!1,this.filteredOutFlagKeys=new Set,this.pollingInterval=t,this.personalApiKey=r,this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={},this.loadedSuccessfullyOnce=!1,this.timeout=i,this.projectApiKey=n,this.host=o,this.poller=void 0,this.fetch=a.fetch||fetch,this.onError=a.onError,this.customHeaders=s,this.onLoad=a.onLoad,this.onMinimalFlagCalledEvents=a.onMinimalFlagCalledEvents,this.cacheProvider=a.cacheProvider,this.strictLocalEvaluation=a.strictLocalEvaluation??!1,this.evaluationContexts=a.evaluationContexts,this.loadFeatureFlags()}debug(t=!0){this.debugMode=t}logMsgIfDebug(t){this.debugMode&&t()}withEvaluationSnapshot(t){return t.definitions?t:{...t,evaluationCache:{},definitions:{featureFlagsByKey:this.featureFlagsByKey,groupTypeMapping:this.groupTypeMapping,cohorts:this.cohorts,filteredOutFlagKeys:this.filteredOutFlagKeys,propertyMatchingVersion:this.propertyMatchingVersion}}}createEvaluationContext(t,r={},n={},i={},o={}){return{distinctId:t,groups:r,personProperties:n,groupProperties:i,evaluationCache:o}}async getFeatureFlag(t,r,n={},i={},o={}){await this.loadFeatureFlags();let s,a;if(!this.loadedSuccessfullyOnce)return s;if(a=this.featureFlagsByKey[t],a!==void 0){let c=this.createEvaluationContext(r,n,i,o);try{s=(await this.computeFlagAndPayloadLocally(a,c)).value,this.logMsgIfDebug(()=>console.debug(`Successfully computed flag locally: ${t} -> ${s}`))}catch(l){l instanceof are||l instanceof Ul?this.logMsgIfDebug(()=>console.debug(`${l.name} when computing flag locally: ${t}: ${l.message}`)):l instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${t}: ${l}`))}}return s}async getAllFlagsAndPayloads(t,r){await this.loadFeatureFlags();let n={},i={},o=this.featureFlags.length==0,s=r?r.map(c=>this.featureFlagsByKey[c]).filter(Boolean):this.featureFlags,a=this.withEvaluationSnapshot({...t,definitions:void 0});return await Promise.all(s.map(async c=>{try{let{value:l,payload:u}=await this.computeFlagAndPayloadLocally(c,a,{skipLoadCheck:!0});n[c.key]=l,u&&(i[c.key]=u)}catch(l){l instanceof are||l instanceof Ul?this.logMsgIfDebug(()=>console.debug(`${l.name} when computing flag locally: ${c.key}: ${l.message}`)):l instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${c.key}: ${l}`)),o=!0}})),{response:n,payloads:i,fallbackToFlags:o}}async computeFlagAndPayloadLocally(t,r,n={}){let{matchValue:i,skipLoadCheck:o=!1}=n;if(this.loadedSuccessfullyOnce&&(r=this.withEvaluationSnapshot(r)),o||await this.loadFeatureFlags(),!this.loadedSuccessfullyOnce)return{value:!1,payload:null};r=this.withEvaluationSnapshot(r),t=r.definitions.featureFlagsByKey[t.key]??t;let s;s=i!==void 0?i:await this.computeFlagValueLocally(t,r);let a=M7o(t.filters?.payloads,s);return{value:s,payload:a}}async computeFlagValueLocally(t,r){let{distinctId:n,groups:i,personProperties:o,groupProperties:s}=r;if(!t.active)return!1;if(t.ensure_experience_continuity)throw new Ul("Flag has experience continuity enabled");let c=(t.filters||{}).aggregation_group_type_index;if(c!=null){let l=r.definitions.groupTypeMapping[String(c)];if(!l)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Unknown group type index ${c} for feature flag ${t.key}`)),new Ul("Flag has unknown group type index");if(!(l in i))return this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute group feature flag: ${t.key} without group names passed in`)),!1;t.bucketing_identifier==="device_id"&&(o?.$device_id===void 0||o?.$device_id===null||o?.$device_id==="")&&this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Ignoring bucketing_identifier for group flag: ${t.key}`));let u=s[l];return await this.matchFeatureFlagProperties(t,i[l],u,r)}{let l=this.getBucketingValueForFlag(t,n,o);if(l===void 0)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute feature flag: ${t.key} without $device_id, falling back to server evaluation`)),new Ul(`Can't compute feature flag: ${t.key} without $device_id`);return await this.matchFeatureFlagProperties(t,l,o,r)}}getBucketingValueForFlag(t,r,n){if(t.filters?.aggregation_group_type_index!=null)return r;if(t.bucketing_identifier==="device_id"){let i=n?.$device_id;return i==null||i===""?void 0:i}return r}async evaluateFlagDependency(t,r,n){let{evaluationCache:i}=n,o=t.key;if(!n.definitions.featureFlagsByKey)throw new Ul("Feature flags not available for dependency evaluation");if(!("dependency_chain"in t))throw new Ul(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let s=t.dependency_chain;if(!Array.isArray(s))throw new Ul(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof s})`);if(s.length===0)throw new Ul(`Circular dependency detected for flag '${o}' (empty dependency chain)`);for(let c of s){if(!(c in i)){let u=n.definitions.featureFlagsByKey[c];if(u)if(u.active)try{let p=await this.computeFlagValueLocally(u,n);i[c]=p}catch(p){throw new Ul(`Error evaluating flag dependency '${c}' for flag '${o}': ${p}`)}else i[c]=!1;else if(n.definitions.filteredOutFlagKeys.has(c))i[c]=!1;else throw new Ul(`Missing flag dependency '${c}' for flag '${o}'`)}if(i[c]==null)throw new Ul(`Dependency '${c}' could not be evaluated`)}let a=i[o];return this.flagEvaluatesToExpectedValue(t.value,a)}flagEvaluatesToExpectedValue(t,r){return typeof t=="boolean"?t===r||typeof r=="string"&&r!==""&&t===!0:typeof t=="string"?r===t:!1}async matchFeatureFlagProperties(t,r,n,i){i=this.withEvaluationSnapshot(i);let o=t.filters||{},s=await z7o(o.holdout,r);if(s!==void 0)return s;let a=o.groups||[],c=o.aggregation_group_type_index,l=o.early_exit??!1,{groups:u,groupProperties:p}=i,d=!1,f;for(let m of a)try{let g=m.aggregation_group_type_index!==void 0?m.aggregation_group_type_index:c,A=n,b=r;if(g!==c&&g!=null){let C=i.definitions.groupTypeMapping[String(g)];if(!C||!(C in u)){this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Skipping group condition for flag '${t.key}': group type index ${g} not available`));continue}if(!(C in p)){d=!0;continue}A=p[C],b=u[C]}let I=await this.isConditionMatch(t,b,m,A,i);if(I==="match"){let C=m.variant,x=o.multivariate?.variants||[];f=C&&x.some(S=>S.key===C)?C:await this.getMatchingVariant(t,b)||!0;break}if(l&&I==="out_of_rollout_bound"){if(d)break;return!1}}catch(g){if(g instanceof are)throw g;if(g instanceof Ul)d=!0;else throw g}if(f!==void 0)return f;if(d)throw new Ul("Can't determine if feature flag is enabled or not with given properties");return!1}async isConditionMatch(t,r,n,i,o){o=this.withEvaluationSnapshot(o);let s=o.definitions,a=n.rollout_percentage,c=l=>{this.logMsgIfDebug(()=>console.warn(l))};if((n.properties||[]).length>0){for(let l of n.properties){let u=l.type,p=!1;if(u==="cohort"){let d=await Ynu(l,i,s.cohorts,this.debugMode,f=>this.evaluateFlagDependency(f,i,o),s.propertyMatchingVersion);p=l.operator==="not_in"?!d:d}else p=u==="flag"?await this.evaluateFlagDependency(l,i,o):Jnu(l,i,c,s.propertyMatchingVersion);if(!p)return"no_match"}if(a==null)return"match"}return a!=null&&await Y9t(t.key,r)>a/100?"out_of_rollout_bound":"match"}async getMatchingVariant(t,r){return Q7o(t.key,r,t.filters?.multivariate?.variants||[])}variantLookupTable(t){return H$r(t.filters?.multivariate?.variants||[])}filterFlagsByEvaluationContexts(t){if(!this.evaluationContexts||this.evaluationContexts.length===0)return t;let r=new Set(this.evaluationContexts);return t.filter(n=>{let i=n.evaluation_contexts??n.evaluation_tags;return!i||i.length===0?!0:i.some(o=>r.has(o))})}getEvaluationRuntimeForFlag(t){let r=this.featureFlagsByKey[t];return r?Knu(r.evaluation_runtime):void 0}getFlagKeysByEvaluationRuntime(t){return this.featureFlags.filter(r=>alh(Knu(r.evaluation_runtime),t)).map(r=>r.key)}updateFlagState(t){let r=this.filterFlagsByEvaluationContexts(t.flags);this.featureFlags=r,this.featureFlagsByKey=r.reduce((i,o)=>(i[o.key]=o,i),{});let n=new Set(r.map(i=>i.key));this.filteredOutFlagKeys=new Set(t.flags.filter(i=>!n.has(i.key)).map(i=>i.key)),this.groupTypeMapping=t.group_type_mapping??t.groupTypeMapping??{},this.cohorts=t.cohorts,this.propertyMatchingVersion=t.property_matching_version??t.propertyMatchingVersion,this.loadedSuccessfullyOnce=!0,this.onMinimalFlagCalledEvents?.((t.minimal_flag_called_events??t.minimalFlagCalledEvents)===!0)}warnAboutExperienceContinuityFlags(t){if(this.strictLocalEvaluation)return;let r=t.filter(n=>n.ensure_experience_continuity);r.length>0&&console.warn(`[PostHog] You are using local evaluation but ${r.length} flag(s) have experience continuity enabled: ${r.map(n=>n.key).join(", ")}. Experience continuity is incompatible with local evaluation and will cause a server request on every flag evaluation, negating local evaluation cost savings. To avoid server requests and unexpected costs, either disable experience continuity on these flags in PostHog, use strictLocalEvaluation: true in client init, or pass onlyEvaluateLocally: true per flag call (flags that cannot be evaluated locally will return undefined).`)}async loadFromCache(t){if(!this.cacheProvider)return!1;try{let r=await this.cacheProvider.getFlagDefinitions();return r?(this.updateFlagState(r),this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] ${t} (${r.flags.length} flags)`)),this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(this.featureFlags),!0):!1}catch(r){return this.onError?.(new Error(`Failed to load from cache: ${r}`)),!1}}async loadFeatureFlags(t=!1){if(!(this.loadedSuccessfullyOnce&&!t))return!t&&this.nextFetchAllowedAt&&Date.now()<this.nextFetchAllowedAt?void this.logMsgIfDebug(()=>console.debug("[FEATURE FLAGS] Skipping fetch, in backoff period")):(this.loadingPromise||(this.loadingPromise=this._loadFeatureFlags().catch(r=>this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Failed to load feature flags: ${r}`))).finally(()=>{this.loadingPromise=void 0})),this.loadingPromise)}isLocalEvaluationReady(){return(this.loadedSuccessfullyOnce??!1)&&(this.featureFlags?.length??0)>0}getFlagDefinitionsLoadedAt(){return this.flagDefinitionsLoadedAt}getPollingInterval(){let t=this.pollingInterval??3e4;return this.shouldBeginExponentialBackoff?Math.min(slh,t*2**this.backOffCount):t}beginBackoff(){this.shouldBeginExponentialBackoff=!0,this.backOffCount+=1,this.nextFetchAllowedAt=Date.now()+this.getPollingInterval()}clearBackoff(){this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.nextFetchAllowedAt=void 0}async _loadFeatureFlags(){this.poller&&(clearTimeout(this.poller),this.poller=void 0);try{let t=!0;if(this.cacheProvider)try{t=await this.cacheProvider.shouldFetchFlagDefinitions()}catch(n){this.onError?.(new Error(`Error in shouldFetchFlagDefinitions: ${n}`))}if(!t&&(await this.loadFromCache("Loaded flags from cache (skipped fetch)")||this.loadedSuccessfullyOnce))return;let r=await this._requestFeatureFlagDefinitions();if(!r)return;switch(r.status){case 304:this.logMsgIfDebug(()=>console.debug("[FEATURE FLAGS] Flags not modified (304), using cached data")),this.flagsEtag=r.headers?.get("ETag")??this.flagsEtag,this.loadedSuccessfullyOnce=!0,this.clearBackoff();return;case 401:throw this.beginBackoff(),new Klt(`Your project key or secret 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.filteredOutFlagKeys=new Set,this.groupTypeMapping={},this.cohorts={},this.propertyMatchingVersion=void 0,this.onMinimalFlagCalledEvents?.(!1);return;case 403:throw this.beginBackoff(),new Klt(`Your secret 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 secret and Project API key pair? More information: https://posthog.com/docs/api/overview`);case 429:throw this.beginBackoff(),new Klt(`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 n=await r.json()??{};if(!("flags"in n))return void this.onError?.(new Error(`Invalid response when getting feature flags: ${JSON.stringify(n)}`));this.flagsEtag=r.headers?.get("ETag")??void 0;let i=n.group_type_mapping||{},o=n.minimal_flag_called_events===!0,s={flags:n.flags??[],group_type_mapping:i,cohorts:n.cohorts||{},minimal_flag_called_events:o,property_matching_version:n.property_matching_version,propertyMatchingVersion:n.property_matching_version,groupTypeMapping:i,minimalFlagCalledEvents:o};if(this.updateFlagState(s),this.flagDefinitionsLoadedAt=Date.now(),this.clearBackoff(),this.cacheProvider&&t)try{await this.cacheProvider.onFlagDefinitionsReceived(s)}catch(a){this.onError?.(new Error(`Failed to store in cache: ${a}`))}this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(this.featureFlags);break}default:return}}catch(t){t instanceof Klt&&this.onError?.(t)}finally{!this.pollerStopped&&this.pollingInterval!==null&&(this.poller=setTimeout(()=>this.loadFeatureFlags(!0),this.getPollingInterval()))}}getPersonalApiKeyRequestOptions(t="GET",r){let n={...this.customHeaders,"Content-Type":"application/json",Authorization:`Bearer ${this.personalApiKey}`};return r&&(n["If-None-Match"]=r),{method:t,headers:n}}async _requestFeatureFlagDefinitions(){let t=`${this.host}/flags/definitions?token=${this.projectApiKey}&send_cohorts`,r=this.getPersonalApiKeyRequestOptions("GET",this.flagsEtag),n=null;if(this.timeout&&typeof this.timeout=="number"){let o=new AbortController;n=N2(()=>{o.abort()},this.timeout),r.signal=o.signal}let i=()=>clearTimeout(n);try{let o=this.fetch,s=await o(t,r);return s.status!==200?(i(),s):{status:s.status,headers:s.headers,body:s.body,text:async()=>{try{return await s.text()}finally{i()}},json:async()=>{try{return await s.json()}finally{i()}}}}catch(o){throw i(),o}}async stopPoller(t=3e4){if(this.pollerStopped=!0,clearTimeout(this.poller),this.poller=void 0,this.cacheProvider)try{let r=this.cacheProvider.shutdown();r instanceof Promise&&await WSe(r,t,()=>{throw new Error(`Cache shutdown timeout after ${t}ms`)})}catch(r){this.onError?.(new Error(`Error during cache shutdown: ${r}`))}}};function Jnu(e,t,r,n){return j7o(e,t,{warnFunction:r,propertyMatchingVersion:n})}function llh(e,t){if(!(e in t))throw new are(`cohort ${e} not found in local cohorts - likely a static cohort that requires server evaluation`)}async function Ynu(e,t,r,n=!1,i,o){let s=String(e.value);llh(s,r);let a=r[s];return Xnu(a,t,r,n,i,o)}async function Xnu(e,t,r,n=!1,i,o){if(!e)return!0;let s=e.type,a=e.values;if(!a||a.length===0)return!0;let c=!1;if("values"in a[0]){for(let l of a)try{let u=await Xnu(l,t,r,n,i,o);if(s==="AND"){if(!u)return!1}else if(u)return!0}catch(u){if(u instanceof are)throw u;if(u instanceof Ul)n&&console.debug(`Failed to compute property ${l} locally: ${u}`),c=!0;else throw u}if(c)throw new Ul("Can't match cohort without a given cohort property value");return s==="AND"}for(let l of a)try{let u;if(l.type==="cohort")u=await Ynu(l,t,r,n,i,o);else if(l.type==="flag"){if(!i)throw new Ul(`Flag dependency '${l.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);u=await i(l)}else u=Jnu(l,t,void 0,o);let p=l.negation||!1;if(s==="AND"){if(!u&&!p||u&&p)return!1}else if(u&&!p||!u&&p)return!0}catch(u){if(u instanceof are)throw u;if(u instanceof Ul)n&&console.debug(`Failed to compute property ${l} locally: ${u}`),c=!0;else throw u}if(c)throw new Ul("can't match cohort without a given cohort property value");return s==="AND"}var ulh=["--unhandled-rejections","--unhandled_rejections"],plh=new Set(["throw","strict","warn","warn-with-error-code","none"]),flh=[...globalThis.process?.execArgv??[]],dlh=globalThis.process?.env?.NODE_OPTIONS;function mlh(e){let t=[],r="",n=!1;for(let i=0;i<e.length;i++){let o=e[i];o==="\\"&&n&&i+1<e.length?r+=e[++i]:o!==" "||n?o==='"'?n=!n:r+=o:r&&(t.push(r),r="")}return r&&t.push(r),t}function Znu(e){let t;for(let r=0;r<e.length;r++){let n=e[r],i=ulh.find(s=>n===s||n.startsWith(`${s}=`));if(!i)continue;let o=n===i?e[++r]:n.slice(i.length+1);plh.has(o)&&(t=o)}return t}function hlh(e=flh,t=dlh){return Znu(e)??Znu(mlh(t??""))??"throw"}var $nu=hlh();function eiu(e,t,r){e(t,{mechanism:{type:r==="unhandledRejection"?"onunhandledrejection":"onuncaughtexception",handled:!1}})}function glh(e,t){let r=!1;return Object.assign((n,i)=>{let o=global.process.listeners("uncaughtException").filter(s=>s.name!=="domainUncaughtExceptionClear"&&s._posthogErrorHandler!==!0).length;eiu(e,n,i),!r&&o===0&&(r=!0,t(n))},{_posthogErrorHandler:!0})}function tiu(e,t,r=$nu){let n=globalThis.process;if(n){if(r==="strict")return void n.on("uncaughtExceptionMonitor",(i,o)=>eiu(e,i,o));n.on("uncaughtException",glh(e,t))}}function riu(e,t=$nu){let r=globalThis.process;!r||t==="throw"||t==="strict"||t==="warn-with-error-code"||r.on("unhandledRejection",n=>{e(n,{mechanism:{type:"onunhandledrejection",handled:!1}})})}var Alh=2e3,oHo=class e{constructor(t,r,n){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this._logger=n,this._rateLimiter=new T$r({...dru(r),refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(t){return F9t(t)&&"__posthog_previously_captured_error"in t&&t.__posthog_previously_captured_error===!0}static async buildEventMessage(t,r,n,i,o){let s={...o},a=t.buildFromUnknown(r,n);a.$exception_list=await t.modifyFrames(a.$exception_list);let c=ST.getInjectedReleaseId();return c&&(s.$release_id=c),{event:"$exception",distinctId:i,properties:{...a,...s},_originatedFromCaptureException:!0}}startAutocaptureIfEnabled(){this.isEnabled()&&(tiu(this.onException.bind(this),this.onFatalError.bind(this)),riu(this.onException.bind(this)))}onException(t,r){this.client.addPendingPromise((async()=>{if(!e.isPreviouslyCapturedError(t)){let n=await e.buildEventMessage(this.client.getErrorPropertiesBuilder(),t,r),o=n.properties?.$exception_list[0]?.type??"Exception";return this._rateLimiter.consumeRateLimit(o)?void this._logger.info("Skipping exception capture because of client rate limiting.",{exception:o}):this.client._capturePreparedEvent(n,!1)}})())}async onFatalError(t){console.error(t),await this.client.shutdown(Alh),globalThis.process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}},zUe=oHo;var len=class{getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}constructor(){this._memoryStorage={}}};function ylh(e){return e==="v0"||e==="v1"}function niu(){let e="u">typeof process?process.env?.POSTHOG_CAPTURE_MODE:void 0;return ylh(e)?e:"v0"}var blh="$ai_",uqt="analytics";function iiu(e){return typeof e.event=="string"&&e.event.startsWith(blh)}var Jlt=class e extends Error{constructor({requestId:t,drops:r,retryExhausted:n,cause:i}){super(e.buildMessage(t,r,n,i)),this.name="CaptureV1Error",this.requestId=t,this.drops=r,this.retryExhausted=n,this.cause=i}static buildMessage(t,r,n,i){let o=`Capture V1 batch ${t} did not fully deliver: ${r.length} dropped, ${n.length} undelivered`;return i instanceof Error&&(o+=` (${i.message})`),o}};function sHo(e){if(typeof e=="boolean")return e;if(typeof e=="number")return e!==0;if(typeof e=="string"){let t=e.trim().toLowerCase();if(t==="true"||t==="1")return!0;if(t==="false"||t==="0")return!1}}function Elh(e){return typeof e=="string"?e:void 0}var Ilh=[{property:"$cookieless_mode",optionKey:"cookieless_mode",coerce:sHo},{property:"$ignore_sent_at",optionKey:"disable_skew_correction",coerce:sHo},{property:"$process_person_profile",optionKey:"process_person_profile",coerce:sHo},{property:"$product_tour_id",optionKey:"product_tour_id",coerce:Elh}],vlh=[{property:"$session_id",field:"session_id"},{property:"$window_id",field:"window_id"}];function Clh(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function xlh(e){if(typeof e=="string"){let r=new Date(e);if(Number.isNaN(r.getTime()))return new Date().toISOString();let n=r.toISOString(),i=e.match(/\.(\d+)(?:Z|[+-]\d{2}:?\d{2})?$/i)?.[1];return i&&i.length>3?n.replace(/\.\d{3}Z$/,`.${i}Z`):n}if(e instanceof Date)return Number.isNaN(e.getTime())?new Date().toISOString():e.toISOString();let t=e==null?new Date:new Date(e);return Number.isNaN(t.getTime())?new Date().toISOString():t.toISOString()}function oiu(e,t,r){r!==void 0&&!(t in e)&&(e[t]=r)}function Slh(e){let r={...Clh(e.properties)?e.properties:{}},n={};for(let{property:o,optionKey:s,coerce:a}of Ilh)if(o in r){let c=a(r[o]);c!==void 0&&(n[s]=c),delete r[o]}let i={};for(let{property:o,field:s}of vlh)if(o in r){let a=r[o];typeof a=="string"&&(i[s]=a),delete r[o]}return delete r.$lib,delete r.$lib_version,oiu(r,"$set",e.$set),oiu(r,"$set_once",e.$set_once),{event:String(e.event??""),uuid:String(e.uuid??""),distinct_id:String(e.distinct_id??""),timestamp:xlh(e.timestamp),...i,options:n,properties:r}}function siu(e,{createdAt:t,historicalMigration:r}){let n={created_at:t,batch:e.map(Slh)};return r&&(n.historical_migration=!0),n}var wlh="/i/v1/analytics/events",Tlh=3e4,Olh=new Set([408,500,502,503,504]),uen=class{constructor(t,r){this.config=t,this.maxBackoffMs=t.maxBackoffMs??Tlh,this.fetchFn=r.fetch,this.onError=r.onError,this.now=r.now??Date.now,this.sleep=r.sleep??(n=>new Promise(i=>N2(i,n))),this.generateRequestId=r.generateRequestId??F2,this.compress=r.compress??H9t}async sendV1Batch(t){if(t.length===0)return;let r=this.generateRequestId(),n=new Date(this.now()).toISOString(),{batch:i}=siu(t,{createdAt:n,historicalMigration:this.config.historicalMigration}),o=`${this.config.host}${wlh}`,s=[],a=i,c=Math.max(1,this.config.maxAttempts);for(let l=1;l<=c;l++){let u=l===c,p=GSe({created_at:n,...this.config.historicalMigration?{historical_migration:!0}:{},batch:a}),d,f;try{d=await this.sendOnce(o,p,l,r);let{response:m,signal:g}=d,{status:A}=m;if(A<200||A>=300)if(!u&&Olh.has(A)){let b=this.parseRetryAfter(m);await d.waitFor(d.cancelBody()).catch(()=>{}),f=this.backoffDelay(l,b)}else{let b=await this.buildHttpError(m,A,d.waitFor);return this.surfaceBatchFailure(r,s,a,b)}else{let b;try{b=await d.waitFor(this.parseResponse(m))}catch(x){if(g.aborted)throw x;return this.surfaceBatchFailure(r,s,a,new Error(`Capture V1 returned an unparseable ${A} response body`))}let I=this.classify(a,b,s);if(I.length===0)return this.surfacePartialDrops(r,s);if(u)return void this.onError(new Jlt({requestId:r,drops:s,retryExhausted:I.map(x=>x.uuid)}));a=I;let C=this.parseRetryAfter(m);f=this.backoffDelay(l,C)}}catch(m){if(d&&!d.signal.aborted)throw m;if(u)return this.surfaceBatchFailure(r,s,a,m);f=this.backoffDelay(l)}finally{d?.cleanup()}f!==void 0&&await this.sleep(f)}}async sendOnce(t,r,n,i){let o=this.buildHeaders(n,i),s=r;if(this.config.compressionEnabled){let p=await this.compress(r,this.config.isDebug);p!==null&&(s=p,o["Content-Encoding"]="gzip")}let a=new AbortController,c="waiting for response headers",l,u=new Promise((p,d)=>{l=N2(()=>{let f=new Error(`Capture V1 request timed out ${c} after ${this.config.requestTimeoutMs}ms`);f.name="AbortError",d(f),a.abort(f)},this.config.requestTimeoutMs)});try{let p=this.fetchFn(t,{method:"POST",headers:o,body:s,signal:a.signal}),d=!1;p.then(b=>{a.signal.aborted&&!d&&this.cancelBody(b)}).catch(()=>{});let f=await Promise.race([p,u]);d=!0,c="while reading the response body";let m=!1,g,A=()=>g??=this.cancelBody(f);return{response:f,signal:a.signal,waitFor:b=>Promise.race([b,u]),cancelBody:A,cleanup:()=>{m||(m=!0,clearTimeout(l),a.signal.aborted&&A())}}}catch(p){throw clearTimeout(l),p}}buildHeaders(t,r){let n=`${this.config.libraryId}/${this.config.libraryVersion}`,i={"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`,"PostHog-Sdk-Info":n,"PostHog-Attempt":String(t),"PostHog-Request-Id":r,"PostHog-Request-Timestamp":new Date(this.now()).toISOString()};return this.config.userAgent&&(i["User-Agent"]=this.config.userAgent),i}classify(t,r,n){let i=r.results??{},o=[];for(let s of t){let a=i[s.uuid];a&&(a.result==="drop"?n.push({uuid:s.uuid,details:a.details??void 0}):a.result==="retry"&&o.push(s))}return o}backoffDelay(t,r){let n=Math.min(this.config.initialRetryDelayMs*2**(t-1),this.maxBackoffMs);return r===void 0?n:Math.max(n,Math.min(r,this.maxBackoffMs))}parseRetryAfter(t){let r=t.headers?.get("Retry-After");if(!r)return;let n=r.trim();if(/^\d+$/.test(n)){let s=parseInt(n,10);return Number.isFinite(s)&&s>0?1e3*s:void 0}let i=Date.parse(n);if(Number.isNaN(i))return;let o=i-this.now();return o>0?o:void 0}async parseResponse(t){let r=await t.text(),n=JSON.parse(r);if(typeof n!="object"||n===null||Array.isArray(n))throw new Error("unexpected response shape");let i=n.results;if(i!==void 0&&(typeof i!="object"||i===null||Array.isArray(i)))throw new Error("unexpected results shape");return{results:i??{}}}async buildHttpError(t,r,n){let i="";try{i=(await n(t.text())).slice(0,512)}catch{}let o=i?`: ${i}`:"";return new Error(`Capture V1 request failed with HTTP ${r}${o}`)}surfaceBatchFailure(t,r,n,i){this.onError(new Jlt({requestId:t,drops:r,retryExhausted:n.map(o=>o.uuid),cause:i}))}surfacePartialDrops(t,r){r.length>0&&this.onError(new Jlt({requestId:t,drops:r,retryExhausted:[]}))}async cancelBody(t){try{await t.body?.cancel()}catch{}}};var QUe="ai-capture",pen="/i/v0/ai/batch/";var Blh=new TextEncoder;function cHo(e){return Blh.encode(GSe(e)).length}function aiu(e,t=8388608,r=5242880){let n=[],i=[],o=[],s=0;for(let a of e){if(a===void 0)continue;let c=cHo(a);if(c>t){i.push({event:typeof a.event=="string"?a.event:"unknown",bytes:c});continue}o.length>0&&s+c>r&&(n.push(o),o=[],s=0),o.push(a),s+=c}return o.length>0&&n.push(o),{batches:n,dropped:i}}var Dlh=100,ciu=3e4,Rlh=5e4,klh=50,Flh=500,Nlh="https://us.i.posthog.com",liu=new Set;function den(e,t){liu.has(e)||(liu.add(e),console.warn(`[PostHog] ${t}`))}function jlh(e){return typeof e=="string"?e.trim():""}function zlh(e){return(typeof e=="string"?e.trim():"")||void 0}function Qlh(e){return(typeof e=="string"?e.trim():"")||Nlh}function Mlh(e){return(Array.isArray(e)?e:[e]).filter(r=>typeof r=="string"&&r.trim().length>0)}function Llh(e){if(!e)return{};let t={};for(let[n,i]of Object.entries(e))t[`$feature/${n}`]=i;let r=Object.keys(e).filter(n=>e[n]!==!1).sort();return r.length>0&&(t.$active_feature_flags=r),t}var men=class extends K9t{constructor(t,r={}){let n=jlh(t),i={...r,maxQueueSize:r.maxQueueSize??1e4,flushInterval:r.flushInterval??5e3,host:Qlh(r.host),personalApiKey:zlh(r.secretKey??r.personalApiKey)};if(super(n,i),this._memoryStorage=new len,this._aiCaptureRouteActive=!1,this._minimalFlagCalledEvents=!1,this.options=i,this.captureMode=niu(),this.enableFullAiCapture=i.enableFullAiCapture===!0,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval=typeof i.featureFlagsPollingInterval=="number"?Math.max(i.featureFlagsPollingInterval,Dlh):i.featureFlagsPollingInterval===null?null:ciu,typeof i.waitUntilDebounceMs=="number"&&(this.options.waitUntilDebounceMs=Math.max(i.waitUntilDebounceMs,0)),typeof i.waitUntilMaxWaitMs=="number"&&(this.options.waitUntilMaxWaitMs=Math.max(i.waitUntilMaxWaitMs,0)),!this.disabled&&i.personalApiKey){if(i.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.');i.enableLocalEvaluation!==!1&&(this.featureFlagsPoller=new cen({pollingInterval:this.options.featureFlagsPollingInterval,personalApiKey:i.personalApiKey,projectApiKey:n,timeout:i.requestTimeout??1e4,host:this.host,fetch:i.fetch,onError:s=>{this._events.emit("error",s)},onLoad:s=>{this._events.emit("localEvaluationFlagsLoaded",s)},onMinimalFlagCalledEvents:s=>{this._minimalFlagCalledEvents=s},customHeaders:this.getCustomHeaders(),cacheProvider:i.flagDefinitionCacheProvider,strictLocalEvaluation:i.strictLocalEvaluation,evaluationContexts:i.evaluationContexts??i.evaluationEnvironments}))}this.errorTracking=new zUe(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||Rlh}enqueue(t,r,n,i){super.enqueue(t,r,n,i),this.scheduleDebouncedFlush()}_flushEventsAndSpans(t=!1){let r=this.flushWithPendingPromises();return!this._traces||t&&this._traces.throttled?r:z9t([r,this._traces.flush().catch(()=>{})]).then(([n])=>{if(n.status==="rejected")throw n.reason})}flushAutomatic(){return this._flushKeepingRuntimeAlive(!0)}async flush(){return this._flushKeepingRuntimeAlive(!1)}_flushKeepingRuntimeAlive(t){let r=this._flushEventsAndSpans(t),n=this.options.waitUntil;if(n&&!this._waitUntilCycle)try{n(r.catch(()=>{}))}catch{}return r}scheduleDebouncedFlush(){let t=this.options.waitUntil;if(!t||this.disabled||this.optedOut)return;if(!this._waitUntilCycle){let s,a=new Promise(c=>{s=c});try{t(a)}catch{return}this._waitUntilCycle={resolve:s,startedAt:Date.now(),timer:void 0}}let r=Date.now()-this._waitUntilCycle.startedAt,n=this.options.waitUntilMaxWaitMs??Flh,i=r>=n;if(this._waitUntilCycle.timer!==void 0&&clearTimeout(this._waitUntilCycle.timer),i)return void this.resolveWaitUntilFlush();let o=this.options.waitUntilDebounceMs??klh;this._waitUntilCycle.timer=N2(()=>{this.resolveWaitUntilFlush()},o)}_consumeWaitUntilCycle(){let t=this._waitUntilCycle;return t&&(clearTimeout(t.timer),this._waitUntilCycle=void 0),t?.resolve}async resolveWaitUntilFlush(){let t=this._consumeWaitUntilCycle();try{await this._flushEventsAndSpans()}catch{}finally{t?.()}}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):fetch(t,r)}getQueueRouteKey(t){return this.captureMode==="v1"&&iiu(t)?"ai":uqt}persistedQueueKeyForRoute(t){return t===QUe?jQ.AiCaptureQueue:t==="ai"?jQ.AiQueue:jQ.Queue}getActiveQueueRoutes(){let t=this.captureMode==="v1"?[uqt,"ai"]:[uqt];return this._aiCaptureRouteActive&&t.push(QUe),t}getBatchEndpointPath(t){return t===QUe?pen:super.getBatchEndpointPath(t)}async sendBatch(t,r,n=uqt){if(n===QUe)return this.sendAiCaptureBatch(t,r);if(this.captureMode!=="v1"||n==="ai")return super.sendBatch(t,r,n);let i=t.filter(o=>o!==void 0);await this.getV1Sender().sendV1Batch(i)}async sendAiCaptureBatch(t,r){let{batches:n,dropped:i}=aiu(t);for(let{event:o,bytes:s}of i){let a=`Event ${o} (${s} bytes) exceeds the ${8388608/1048576}MiB limit for ${pen}, dropping.`;this._logger.error(a),this._events.emit("error",new Error(a))}for(let o of n)await this.sendAiSubBatch(o,r)}async sendAiSubBatch(t,r){try{await super.sendBatch(t,r,QUe)}catch(n){if(!Glt(n))throw n;if(t.length===1){let[o]=t,a=`Event ${typeof o.event=="string"?o.event:"unknown"} (${cHo(o)} bytes) was rejected with 413 by ${pen} on its own, dropping.`;this._logger.error(a),this._events.emit("error",new Error(a));return}let i=Math.ceil(t.length/2);await this.sendAiSubBatch(t.slice(0,i),r),await this.sendAiSubBatch(t.slice(i),r)}}getV1Sender(){return this._v1Sender||(this._v1Sender=new uen({host:this.host,apiKey:this.apiKey,libraryId:this.getLibraryId(),libraryVersion:this.getLibraryVersion(),userAgent:this.getCustomUserAgent()||void 0,historicalMigration:this.historicalMigration,compressionEnabled:!this.disableCompression,requestTimeoutMs:this.requestTimeout,maxAttempts:(this.options.fetchRetryCount??3)+1,initialRetryDelayMs:this.options.fetchRetryDelay??3e3,isDebug:this.isDebug},{fetch:(t,r)=>this.fetch(t,r),onError:t=>this._events.emit("error",t),compress:t=>this.compressPayload(t)})),this._v1Sender}getLibraryVersion(){return Hnu}get metrics(){return this._metrics||(this._metrics=new nqt(this,J$r(this.options.metrics),this._logger)),this._metrics}initializeSpanContextManager(){return new cqt}hostResourceAttributes(){return{}}get _spanContextManager(){return this._spanContext||(this._spanContext=this.initializeSpanContextManager()),this._spanContext}get _tracesPipeline(){if(this.options.traces)return this._traces||(this._traces=new aqt(this,eHo(this.options.traces,this.hostResourceAttributes(),this._logger),this._logger,()=>this._tracingContext(),this._spanContextManager,()=>this.scheduleDebouncedFlush())),this._traces}_tracingContext(){let t=this.context?.get();return{distinctId:t?.distinctId,sessionId:t?.sessionId}}startSpan(t,r){return this._tracesPipeline?.startSpan(t,r)??HSe(r,this._spanContextManager.active())}withSpan(t,r,n){let i=typeof r=="function"?void 0:r,o=typeof r=="function"?r:n,s=this._tracesPipeline;return s?i?s.withSpan(t,i,o):s.withSpan(t,o):sqt(this._spanContextManager,HSe(i,this._spanContextManager.active()),o)}getActiveSpan(){return this._spanContextManager.active()??null}getCustomUserAgent(){return`${this.getLibraryId()}/${this.getLibraryVersion()}`}getEvaluationRuntime(){return"server"}getCommonEventProperties(){let t=super.getCommonEventProperties();return(this.options.isServer??!0)&&(t.$is_server=!0),t}enable(){return super.optIn()}disable(){return super.optOut()}debug(t=!0){super.debug(t),this.featureFlagsPoller?.debug(t)}_warnIfInvalidCapture(t,r,n){typeof t=="string"&&this._logger.warn(r),t.event==="$exception"&&!t._originatedFromCaptureException&&this._logger.warn(n)}_sendPreparedEvent(t,r,n,i,o){return this.addPendingPromise(this._prepareEventMessage(r,i).then(({distinctId:s,event:a,properties:c,options:l})=>{let u={timestamp:l.timestamp,disableGeoip:l.disableGeoip,uuid:l.uuid},p={distinctId:s,event:a,properties:{...c,...this.getCommonEventProperties()}};return n?this.sendImmediate(t,p,u,o):this.enqueue(t,p,u,o)}).catch(s=>{s&&console.error(s)}))}_capturePreparedEvent(t,r){return this._sendPreparedEvent("capture",t,r)}capture(t){this._warnIfInvalidCapture(t,"Called capture() with a string as the first argument when an object was expected.","Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this._capturePreparedEvent(t,!1)}async captureImmediate(t){return this._warnIfInvalidCapture(t,"Called captureImmediate() with a string as the first argument when an object was expected.","Capturing a `$exception` event via `posthog.captureImmediate('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureExceptionImmediate(error)` instead, which attaches this metadata by default."),this._capturePreparedEvent(t,!0)}captureAi(t){if(this.disabled)return;let r=kUe(t.uuid,F2);return this._sendPreparedAiEvent({...t,uuid:r},!1),r}async captureAiImmediate(t){if(this.disabled)return;let r=kUe(t.uuid,F2);return await this._sendPreparedAiEvent({...t,uuid:r},!0),r}_sendPreparedAiEvent(t,r){return typeof t?.event=="string"&&!t.event.startsWith("$ai_")&&this._logger.debug(`captureAi called with non-AI event ${t.event}; routing it to the AI endpoint anyway.`),this._aiCaptureRouteActive=!0,this._sendPreparedEvent("capture",t,r,void 0,QUe)}identify({distinctId:t,properties:r={},disableGeoip:n}){let{$set:i,$set_once:o,$anon_distinct_id:s,...a}=r,u={$set:i||a,$set_once:o||{},$anon_distinct_id:s??void 0};this._sendPreparedEvent("identify",{distinctId:t,event:"$identify",properties:u,disableGeoip:n},!1,{includeContextProperties:!1})}async identifyImmediate({distinctId:t,properties:r={},disableGeoip:n}){let{$set:i,$set_once:o,$anon_distinct_id:s,...a}=r,u={$set:i||a,$set_once:o||{},$anon_distinct_id:s??void 0};await this._sendPreparedEvent("identify",{distinctId:t,event:"$identify",properties:u,disableGeoip:n},!0,{includeContextProperties:!1})}setPersonProperties({distinctId:t,properties:r={},propertiesOnce:n={}}){if(Object.keys(r).length===0&&Object.keys(n).length===0)return;let i={};Object.keys(r).length>0&&(i.$set=r),Object.keys(n).length>0&&(i.$set_once=n),this.capture({distinctId:t,event:"$set",properties:i})}unsetPersonProperties({distinctId:t,properties:r}){let n=Mlh(r);n.length!==0&&this.capture({distinctId:t,event:"$set",properties:{$unset:n}})}alias(t){this._sendPreparedEvent("alias",{distinctId:t.distinctId,event:"$create_alias",properties:{distinct_id:t.distinctId,alias:t.alias},disableGeoip:t.disableGeoip},!1,{includeContextProperties:!1})}async aliasImmediate(t){await this._sendPreparedEvent("alias",{distinctId:t.distinctId,event:"$create_alias",properties:{distinct_id:t.distinctId,alias:t.alias},disableGeoip:t.disableGeoip},!0,{includeContextProperties:!1})}isLocalEvaluationReady(){return this.featureFlagsPoller?.isLocalEvaluationReady()??!1}getFeatureFlagEvaluationRuntime(t){return this.featureFlagsPoller?.getEvaluationRuntimeForFlag(t)}getFeatureFlagKeysByEvaluationRuntime(t){return this.featureFlagsPoller?.getFlagKeysByEvaluationRuntime(t)??[]}async waitForLocalEvaluationReady(t=ciu){return this.isLocalEvaluationReady()?!0:this.featureFlagsPoller===void 0?!1:new Promise(r=>{let n=setTimeout(()=>{i(),r(!1)},t),i=this._events.on("localEvaluationFlagsLoaded",o=>{clearTimeout(n),i(),r(o>0)})})}_resolveDistinctId(t,r){return typeof t=="string"?{distinctId:t,options:r}:{distinctId:this.context?.get()?.distinctId,options:t}}async _getFeatureFlagResult(t,r,n={},i){if(this.disabled)return void this._logger.warn("The client is disabled");let o=n.sendFeatureFlagEvents??!0;if(this._flagOverrides!==void 0&&t in this._flagOverrides){let D=this._flagOverrides[t];if(D===void 0)return;let R=this._payloadOverrides?.[t];return{key:t,enabled:D!==!1,variant:typeof D=="string"?D:void 0,payload:R}}let{groups:s,disableGeoip:a}=n,{onlyEvaluateLocally:c,personProperties:l,groupProperties:u}=n,p=this.addLocalPersonAndGroupProperties(r,s,l,u);l=p.allPersonProperties,u=p.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(r,s,this.personPropertiesForLocalEvaluation(r,l),u);c==null&&(c=this.options.strictLocalEvaluation??!1);let f,m=!1,g,A,b,I,C,x,S;if(this.featureFlagsPoller!==void 0){await this.featureFlagsPoller?.loadFeatureFlags();let D=this.featureFlagsPoller?.featureFlagsByKey[t];if(D)try{let R=await this.featureFlagsPoller?.computeFlagAndPayloadLocally(D,d,{matchValue:i});if(R){m=!0;let O=R.value;I=D.id,x="Evaluated locally",S=D.has_experiment,f={key:t,enabled:O!==!1,variant:typeof O=="string"?O:void 0,payload:R.payload??void 0,reason:x,reasonCode:D.active===!1?"flag_disabled":void 0}}}catch(R){if(R instanceof are||R instanceof Ul)this._logger?.info(`${R.name} when computing flag locally: ${t}: ${R.message}`);else throw R}}if(!m&&!c){let D=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,l,u,a,[t]);if(D===void 0)b=Dme.UNKNOWN_ERROR;else{this._minimalFlagCalledEvents=D.minimalFlagCalledEvents===!0,g=D.requestId,A=D.evaluatedAt;let R=[];D.errorsWhileComputingFlags&&R.push(Dme.ERRORS_WHILE_COMPUTING),D.quotaLimited?.includes("feature_flags")&&R.push(Dme.QUOTA_LIMITED);let O=D.flags[t];if(O===void 0)R.push(Dme.FLAG_MISSING);else{I=O.metadata?.id,C=O.metadata?.version,x=O.reason?.description??O.reason?.code,S=O.metadata?.has_experiment;let z;if(O.metadata?.payload!==void 0)try{z=JSON.parse(O.metadata.payload)}catch{z=O.metadata.payload}f={key:t,enabled:O.enabled,variant:O.variant??void 0,payload:z,reason:x,reasonCode:O.reason?.code}}R.length>0&&(b=R.join(","))}}if(o){let D=f===void 0?void 0:f.enabled===!1?!1:f.variant??!0,R={$feature_flag:t,$feature_flag_response:D,$feature_flag_id:I,$feature_flag_version:C,$feature_flag_reason:x,locally_evaluated:m,[`$feature/${t}`]:D,$feature_flag_request_id:g,$feature_flag_evaluated_at:m?Date.now():A};if(S!==void 0&&(R.$feature_flag_has_experiment=S),m&&this.featureFlagsPoller){let O=this.featureFlagsPoller.getFlagDefinitionsLoadedAt();O!==void 0&&(R.$feature_flag_definitions_loaded_at=O)}b&&(R.$feature_flag_error=b),this._captureFlagCalledEventIfNeeded({distinctId:r,key:t,response:D,groups:s,disableGeoip:a,properties:R})}return f!==void 0&&this._payloadOverrides!==void 0&&t in this._payloadOverrides&&(f={...f,payload:this._payloadOverrides[t]}),f}async getFeatureFlag(t,r,n){den("getFeatureFlag","`getFeatureFlag` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.getFlag(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request.");let i=await this._getFeatureFlagResult(t,r,{...n,sendFeatureFlagEvents:n?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0});if(i!==void 0)return i.enabled===!1?!1:i.variant??!0}async getFeatureFlagPayload(t,r,n,i){if(den("getFeatureFlagPayload","`getFeatureFlagPayload` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.getFlagPayload(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request."),this._payloadOverrides!==void 0&&t in this._payloadOverrides)return this._payloadOverrides[t];let o=await this._getFeatureFlagResult(t,r,{...i,sendFeatureFlagEvents:!1},n);if(o!==void 0)return o.payload??null}async getFeatureFlagResult(t,r,n){let{distinctId:i,options:o}=this._resolveDistinctId(r,n);return i?this._getFeatureFlagResult(t,i,{...o,sendFeatureFlagEvents:o?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0}):void this._logger.warn("[PostHog] distinctId is required \u2014 pass it explicitly or use withContext()")}async getRemoteConfigPayload(t){if(this.disabled)return void this._logger.warn("The client is disabled");if(!this.options.personalApiKey)throw new Error("Personal API key is required for remote config payload decryption");let r=await this._requestRemoteConfigPayload(t);if(!r)return;let n=await r.json();if(typeof n=="string")try{return JSON.parse(n)}catch{}return n}async isFeatureEnabled(t,r,n){den("isFeatureEnabled","`isFeatureEnabled` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.isEnabled(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request.");let i=await this._getFeatureFlagResult(t,r,{...n,sendFeatureFlagEvents:n?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0});return i===void 0?void 0:i.enabled===!1?!1:!!(i.variant??!0)||!1}async getAllFlags(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);return n?(await this.getAllFlagsAndPayloads(n,i)).featureFlags||{}:(this._logger.warn("[PostHog] distinctId is required to get feature flags \u2014 pass it explicitly or use withContext()"),{})}async getAllFlagsAndPayloads(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);if(!n)return this._logger.warn("[PostHog] distinctId is required to get feature flags and payloads \u2014 pass it explicitly or use withContext()"),{featureFlags:{},featureFlagPayloads:{}};if(this.disabled)return this._logger.warn("The client is disabled"),{featureFlags:{},featureFlagPayloads:{}};let{groups:o,disableGeoip:s,flagKeys:a}=i||{},{onlyEvaluateLocally:c,personProperties:l,groupProperties:u}=i||{},p=this.addLocalPersonAndGroupProperties(n,o,l,u);l=p.allPersonProperties,u=p.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(n,o,this.personPropertiesForLocalEvaluation(n,l),u);c==null&&(c=this.options.strictLocalEvaluation??!1);let f=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),m={},g={},A=!0;if(f&&(m=f.response,g=f.payloads,A=f.fallbackToFlags),A&&!c){let b=await super.getFeatureFlagsAndPayloadsStateless(d.distinctId,d.groups,l,u,s,a);m={...m,...b.flags||{}},g={...g,...b.payloads||{}}}return this._flagOverrides!==void 0&&(m={...m,...this._flagOverrides}),this._payloadOverrides!==void 0&&(g={...g,...this._payloadOverrides}),{featureFlags:m,featureFlagPayloads:g}}async evaluateFlags(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);if(!n)return this._logger.warn("[PostHog] distinctId is required to evaluate feature flags \u2014 pass it explicitly or use withContext()"),new JSe({host:this._getFeatureFlagEvaluationsHost(),distinctId:"",flags:{}});if(this.disabled)return this._logger.warn("The client is disabled"),new JSe({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,flags:{}});let{groups:o,disableGeoip:s}=i||{},a=i?.flagKeys??void 0;if(a?.length===0)return new JSe({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,groups:o,disableGeoip:s,flags:{}});let{onlyEvaluateLocally:c,personProperties:l,groupProperties:u}=i||{},p=this.addLocalPersonAndGroupProperties(n,o,l,u);l=p.allPersonProperties,u=p.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(n,o,this.personPropertiesForLocalEvaluation(n,l),u);c==null&&(c=this.options.strictLocalEvaluation??!1);let f=a?new Set(a):void 0,m={},g,A,b=!1,I=!1,C=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),x=new Set;if(C)for(let[D,R]of Object.entries(C.response)){let O=this.featureFlagsPoller?.featureFlagsByKey[D];m[D]={key:D,enabled:R!==!1,variant:typeof R=="string"?R:void 0,payload:C.payloads[D],id:O?.id,version:void 0,reason:"Evaluated locally",locallyEvaluated:!0,hasExperiment:O?.has_experiment},x.add(D)}let S=f!==void 0&&Array.from(f).some(D=>this.featureFlagsPoller?.featureFlagsByKey[D]===void 0);if((C?C.fallbackToFlags||S:!0)&&!c){let D=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,l,u,s,a);if(D){this._minimalFlagCalledEvents=D.minimalFlagCalledEvents===!0,g=D.requestId,A=D.evaluatedAt,b=!!D.errorsWhileComputingFlags,I=Array.isArray(D.quotaLimited)&&D.quotaLimited.includes("feature_flags");for(let[R,O]of Object.entries(D.flags)){if(x.has(R))continue;let z;if(O.metadata?.payload!==void 0)try{z=JSON.parse(O.metadata.payload)}catch{z=O.metadata.payload}m[R]={key:R,enabled:O.enabled,variant:O.variant,payload:z,id:O.metadata?.id,version:O.metadata?.version,reason:O.reason?.description??O.reason?.code,locallyEvaluated:!1,hasExperiment:O.metadata?.has_experiment}}}}if(this._flagOverrides!==void 0)for(let[D,R]of Object.entries(this._flagOverrides)){if(R===void 0){delete m[D];continue}let O=m[D];m[D]={key:D,enabled:R!==!1,variant:typeof R=="string"?R:void 0,payload:O?.payload,id:O?.id,version:O?.version,reason:O?.reason,locallyEvaluated:O?.locallyEvaluated??!1,hasExperiment:O?.hasExperiment}}if(this._payloadOverrides!==void 0)for(let[D,R]of Object.entries(this._payloadOverrides)){let O=m[D];O&&(m[D]={...O,payload:R})}if(f!==void 0)for(let D of Object.keys(m))f.has(D)||delete m[D];return new JSe({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,groups:o,disableGeoip:s,flags:m,requestId:g,evaluatedAt:A,flagDefinitionsLoadedAt:this.featureFlagsPoller?.getFlagDefinitionsLoadedAt(),errorsWhileComputing:b,quotaLimited:I})}_shouldSendMinimalFlagCalledEvent(t,r){return t==="$feature_flag_called"&&this._minimalFlagCalledEvents&&r.$feature_flag_has_experiment===!1}_captureFlagCalledEventIfNeeded(t){let{distinctId:r,key:n,response:i,groups:o,disableGeoip:s,properties:a}=t,c=o&&Object.keys(o).length>0?`_${JSON.stringify(Object.entries(o).sort(([u],[p])=>u<p?-1:u>p?1:0))}`:"",l=`${n}_${i}${c}`;r in this.distinctIdHasSentFlagCalls&&this.distinctIdHasSentFlagCalls[r].has(l)||(Object.keys(this.distinctIdHasSentFlagCalls).length>=this.maxCacheSize&&(this.distinctIdHasSentFlagCalls={}),this.distinctIdHasSentFlagCalls[r]instanceof Set?this.distinctIdHasSentFlagCalls[r].add(l):this.distinctIdHasSentFlagCalls[r]=new Set([l]),this.capture({distinctId:r,event:"$feature_flag_called",properties:a,groups:o,disableGeoip:s}))}_getFeatureFlagEvaluationsHost(){return this._featureFlagEvaluationsHost||(this._featureFlagEvaluationsHost={captureFlagCalledEventIfNeeded:t=>this._captureFlagCalledEventIfNeeded(t),logWarning:t=>{this.options.featureFlagsLogWarnings!==!1&&console.warn(`[PostHog] ${t}`)}}),this._featureFlagEvaluationsHost}groupIdentify({groupType:t,groupKey:r,properties:n,distinctId:i,disableGeoip:o}){this._sendPreparedEvent("capture",{distinctId:i||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{}},disableGeoip:o},!1,{includeContextProperties:!1})}async groupIdentifyImmediate({groupType:t,groupKey:r,properties:n,distinctId:i,disableGeoip:o}){await this._sendPreparedEvent("capture",{distinctId:i||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{}},disableGeoip:o},!0,{includeContextProperties:!1})}async reloadFeatureFlags(){await this.featureFlagsPoller?.loadFeatureFlags(!0)}overrideFeatureFlags(t){let r=n=>Object.fromEntries(n.map(i=>[i,!0]));if(t===!1){this._flagOverrides=void 0,this._payloadOverrides=void 0;return}if(Array.isArray(t)){this._flagOverrides=r(t);return}if(this._isFeatureFlagOverrideOptions(t)){"flags"in t&&(t.flags===!1?this._flagOverrides=void 0:Array.isArray(t.flags)?this._flagOverrides=r(t.flags):t.flags!==void 0&&(this._flagOverrides={...t.flags})),"payloads"in t&&(t.payloads===!1?this._payloadOverrides=void 0:t.payloads!==void 0&&(this._payloadOverrides={...t.payloads}));return}this._flagOverrides={...t}}_isFeatureFlagOverrideOptions(t){if(typeof t!="object"||t===null||Array.isArray(t))return!1;let r=t;if("flags"in r){let n=r.flags;if(n===!1||Array.isArray(n)||typeof n=="object"&&n!==null)return!0}if("payloads"in r){let n=r.payloads;if(n===!1||typeof n=="object"&&n!==null)return!0}return!1}withContext(t,r,n){return this.context?this.context.run(t,r,n):r()}getContext(){return this.context?.get()}enterContext(t,r){this.context?.enter(t,r)}async _shutdown(t){let r=Date.now()+(t??3e4),n=this._consumeWaitUntilCycle();await this.featureFlagsPoller?.stopPoller(t),this.errorTracking.shutdown(),this._metrics&&(await WSe(this._metrics.flush().catch(()=>{}),Math.max(0,r-Date.now())),this._metrics.reset()),this._traces&&(await WSe(this._traces.flush().catch(()=>{}),Math.max(0,r-Date.now())),this._traces.reset());try{return await super._shutdown(Math.max(0,r-Date.now()))}finally{this.distinctIdHasSentFlagCalls={},n?.()}}async _requestRemoteConfigPayload(t){if(this.disabled||!this.apiKey||!this.options.personalApiKey)return;let r=`${this.host}/api/projects/@current/feature_flags/${t}/remote_config?token=${encodeURIComponent(this.apiKey)}`,n={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",Authorization:`Bearer ${this.options.personalApiKey}`}},i=null;if(this.options.requestTimeout&&typeof this.options.requestTimeout=="number"){let o=new AbortController;i=N2(()=>{o.abort()},this.options.requestTimeout),n.signal=o.signal}try{return await this.fetch(r,n)}catch(o){this._events.emit("error",o);return}finally{i&&clearTimeout(i)}}extractPropertiesFromEvent(t,r){if(!t)return{personProperties:{},groupProperties:{}};let n={},i={};for(let[o,s]of Object.entries(t))if(uru(s)&&r&&o in r){let a={};for(let[c,l]of Object.entries(s))a[String(c)]=String(l);i[String(o)]=a}else n[String(o)]=String(s);return{personProperties:n,groupProperties:i}}async getFeatureFlagsForEvent(t,r,n,i){if(this.disabled||!this.apiKey)return void this._logger.warn("The client is disabled");let o=i?.personProperties||{},s=i?.groupProperties||{},a=i?.flagKeys;if(i?.onlyEvaluateLocally??this.options.strictLocalEvaluation??!1)if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let l={};for(let[u,p]of Object.entries(r||{}))l[u]=String(p);return await this.getAllFlags(t,{groups:l,personProperties:o,groupProperties:s,disableGeoip:n,onlyEvaluateLocally:!0,flagKeys:a})}else return{};if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let l={};for(let[u,p]of Object.entries(r||{}))l[u]=String(p);return await this.getAllFlags(t,{groups:l,personProperties:o,groupProperties:s,disableGeoip:n,onlyEvaluateLocally:!0,flagKeys:a})}return(await super.getFeatureFlagsStateless(t,r,o,s,n)).flags}addLocalPersonAndGroupProperties(t,r,n,i){let o={...n||{}},s={};if(r)for(let a of Object.keys(r))s[a]={$group_key:r[a],...i?.[a]||{}};return{allPersonProperties:o,allGroupProperties:s}}personPropertiesForLocalEvaluation(t,r){return{distinct_id:t,...r||{}}}createFeatureFlagEvaluationContext(t,r,n,i){return{distinctId:t,groups:r||{},personProperties:n||{},groupProperties:i||{},evaluationCache:{}}}captureException(t,r,n,i,o){if(!zUe.isPreviouslyCapturedError(t)){let s=new Error("PostHog syntheticException");this.addPendingPromise(zUe.buildEventMessage(this.getErrorPropertiesBuilder(),t,{syntheticException:s},r,n).then(a=>this._capturePreparedEvent({...a,uuid:i,flags:o},!1)))}}async captureExceptionImmediate(t,r,n,i){if(!zUe.isPreviouslyCapturedError(t)){let o=new Error("PostHog syntheticException");return this.addPendingPromise(zUe.buildEventMessage(this.getErrorPropertiesBuilder(),t,{syntheticException:o},r,n).then(s=>this.captureImmediate({...s,flags:i})))}}async prepareEventMessage(t){return this._prepareEventMessage(t)}async _prepareEventMessage(t,r={}){let{distinctId:n,event:i,properties:o,groups:s,flags:a,sendFeatureFlags:c,timestamp:l,disableGeoip:u,uuid:p}=t,d=this.context?.get(),f=r.includeContextProperties??!0,m=n||d?.distinctId,g=f?{...this.props,...d?.properties||{},...o||{}}:{...o||{}};m||(m=F2(),g.$process_person_profile=!1),f&&d?.sessionId&&!g.$session_id&&(g.$session_id=d.sessionId);let A=this._shouldSendMinimalFlagCalledEvent(i,g)?q9t(g):g,b=this._runBeforeSend({distinctId:m,event:i,properties:A,groups:s,flags:a,sendFeatureFlags:c,timestamp:l,disableGeoip:u,uuid:p});if(!b)return Promise.reject(null);let I=await Promise.resolve().then(async()=>{if(a)return c&&console.warn("[PostHog] Both `flags` and `sendFeatureFlags` were passed to capture(); using `flags` and ignoring `sendFeatureFlags`."),a._getEventProperties();if(c){den("sendFeatureFlags","`sendFeatureFlags` is deprecated and will be removed in a future major version. Pass a `flags` snapshot from `posthog.evaluateFlags(...)` instead \u2014 it avoids a second `/flags` request per capture and guarantees the event carries the exact flag values your code branched on.");let C=typeof c=="object"?c:void 0,x=await this.getFeatureFlagsForEvent(b.distinctId,s,u,C);return Llh(x)}return{}}).catch(()=>({})).then(C=>{let x=b.groups||s;return{...C,...b.properties||{},...x!==void 0&&Object.keys(x).length>0?{$groups:x}:{}}});return b.event==="$pageview"&&this.options.__preview_capture_bot_pageviews&&typeof I.$raw_user_agent=="string"&&fru(I.$raw_user_agent,this.options.custom_blocked_useragents||[])&&(b.event="$bot_pageview",I.$browser_type="bot"),{distinctId:b.distinctId,event:b.event,properties:I,options:{timestamp:b.timestamp,disableGeoip:b.disableGeoip,uuid:b.uuid}}}_runBeforeSend(t){let r=this.options.before_send;if(!r)return t;let n=Array.isArray(r)?r:[r],i=t;for(let o of n)try{if(i=o(i),!i)return this._logger.info(`Event '${t.event}' was rejected in beforeSend function`),null;if(!i.properties||Object.keys(i.properties).length===0){let s=`Event '${i.event}' has no properties after beforeSend function, this is likely an error.`;this._logger.warn(s)}}catch(s){return this._logger.error(`Error in before_send function for event '${t.event}':`,s),null}return i}};var uiu=require("async_hooks"),hen=class{constructor(){this.storage=new uiu.AsyncLocalStorage}get(){return this.storage.getStore()}run(t,r,n){return this.storage.run(this.resolve(t,n),r)}enter(t,r){this.storage.enterWith(this.resolve(t,r))}resolve(t,r){if(r?.fresh===!0)return t;let n=this.get()||{};return{distinctId:t.distinctId??n.distinctId,sessionId:t.sessionId??n.sessionId,properties:{...n.properties||{},...t.properties||{}}}}};var piu=require("async_hooks"),gen=class{active(){return this._storage.getStore()}with(t,r){return this._storage.run(t,r)}constructor(){this._storage=new piu.AsyncLocalStorage}};var fiu=require("zlib"),diu=require("util"),_lh=(0,diu.promisify)(fiu.gzip);async function miu(e,t=!0){try{let r=await _lh(e);return new Uint8Array(r)}catch(r){return t&&console.error("Failed to gzip compress data",r),null}}var Aen=require("os");function hiu(){let e,t;try{e=(0,Aen.platform)(),t=(0,Aen.release)()}catch{}return V7o(e,t)}var giu="posthog-node";function Ulh(e,{organization:t,projectId:r,prefix:n,severityAllowList:i=["error"],sendExceptionsToPostHog:o=!0}={}){return s=>{if(!(i==="*"||i.includes(s.level)))return s;s.tags||(s.tags={});let c=s.tags[lHo.POSTHOG_ID_TAG];if(c===void 0)return s;let l=e.options.host??"https://us.i.posthog.com",u=new URL(`/project/${e.apiKey}/person/${c}`,l).toString();s.tags["PostHog Person URL"]=u;let p=s.exception?.values||[],d=p.map(g=>({...g,stacktrace:g.stacktrace?{...g.stacktrace,type:"raw",frames:(g.stacktrace.frames||[]).map(A=>({...A,platform:"node:javascript"}))}:void 0})),f={$exception_message:p[0]?.value||s.message,$exception_type:p[0]?.type,$exception_level:s.level,$exception_list:d,$sentry_event_id:s.event_id,$sentry_exception:s.exception,$sentry_exception_message:p[0]?.value||s.message,$sentry_exception_type:p[0]?.type,$sentry_tags:s.tags},m=ST.getInjectedReleaseId();return m&&(f.$release_id=m),t&&r&&(f.$sentry_url=(n||"https://sentry.io/organizations/")+t+"/issues/?project="+r+"&query="+s.event_id),o&&e.capture({event:"$exception",distinctId:c,properties:f}),s}}var lHo=class{static{this.POSTHOG_ID_TAG="posthog_distinct_id"}constructor(t,r,n,i,o){this.name=giu,this.name=giu,this.setupOnce=function(s,a){let c=a()?.getClient()?.getDsn()?.projectId;s(Ulh(t,{organization:r,projectId:c,prefix:n,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}};var cre=class extends men{getLibraryId(){return"posthog-node"}compressPayload(t){return miu(t,this.isDebug)}initializeContext(){return new hen}initializeSpanContextManager(){return new gen}hostResourceAttributes(){return hiu()}createErrorPropertiesBuilder(){return new ST.ErrorPropertiesBuilder([new ST.EventCoercer,new ST.ErrorCoercer,new ST.ObjectCoercer,new ST.StringCoercer,new ST.PrimitiveCoercer],ST.createStackParser("node:javascript",ST.nodeStackLineParser),[oru(),t=>Unu(t,void 0,this._logger),Wnu()])}};function Aiu(e){return e==null||!e.enabled?!1:e.variant==null||e.variant==="true"}var yen=class{isEnabled(){return Promise.resolve(!1)}getCachedValue(){}flush(){return Promise.resolve()}},Vlh="feature_flag_evaluated",Glh=3e3,qlh=3e3,ben=class{evaluator;environment;sendFeatureFlagEvents;pending=new Map;resolved=new Map;constructor({environment:t,sendFeatureFlagEvents:r,posthogApiKey:n,evaluator:i}){this.environment=t,this.sendFeatureFlagEvents=r,this.evaluator=i??new cre(n??"",{featureFlagsRequestTimeoutMs:Glh,isServer:!1})}isEnabled(t,r){let n=yiu(t,r),i=this.pending.get(n);if(i!=null)return i;let o=this.evaluateAndRemember(t,r,n);return this.pending.set(n,o),o}async evaluateAndRemember(t,r,n){let i=await this.evaluate(t,r);return this.resolved.set(n,i),i}getCachedValue(t,r){return this.resolved.get(yiu(t,r))}async flush(){if(!this.sendFeatureFlagEvents)return;let t;try{await Promise.race([this.flushAfterPendingEvaluations(),new Promise(r=>{t=setTimeout(r,qlh),t.unref()})])}catch{}finally{clearTimeout(t)}}async flushAfterPendingEvaluations(){await Promise.allSettled(this.pending.values()),await this.evaluator.flush()}async evaluate(t,r){let{org:n}=r,i=Hlh(r,this.environment),o;try{o=await this.evaluator.getFeatureFlagResult(t,uHo(n),{personProperties:i,groups:{organization:n},groupProperties:{organization:i},sendFeatureFlagEvents:!1})}catch{return!1}return this.sendFeatureFlagEvents&&this.captureFlagUsage({flag:t,org:n,result:o,properties:i}),Aiu(o)}captureFlagUsage({flag:t,org:r,result:n,properties:i}){let o=Wlh(n),s={...i,...n?.reason!=null?{$feature_flag_reason:n.reason}:{},version:"5.217.2"};this.tryCapture({distinctId:uHo(r),event:"$feature_flag_called",groups:{organization:r},properties:{...s,$feature_flag:t,$feature_flag_response:o,[`$feature/${t}`]:o}}),this.tryCapture({distinctId:uHo(r),event:Vlh,groups:{organization:r},properties:{...s,flag:t,response:o,enabled:Aiu(n)}})}tryCapture(t){try{this.evaluator.capture(t)}catch{}}};function Wlh(e){if(e!=null)return e.enabled?e.variant??!0:!1}function uHo(e){return`org:${e}`}function Hlh({org:e,generator:t,language:r},n){return{org:e,environment:n,...t!=null?{generator:t}:{},...r!=null?{language:r}:{}}}function yiu(e,{org:t,generator:r,language:n}){return JSON.stringify([e,t,r??null,n??null])}var Een;function Ien(){return Een==null&&(Een=Klh()),Een}async function pHo(){await Een?.flush()}function Klh(){let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal";return e==null||e.trim().length===0?new yen:new ben({posthogApiKey:e,environment:UK(),sendFeatureFlagEvents:C$r()})}var ven=class{posthog;constructor({posthogApiKey:t}){this.posthog=new cre(t,{isServer:!1})}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"5.217.2",usingAccessToken:!0,cliReleaseEnvironment:UK(),...Wpe()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:{...t.properties,cliReleaseEnvironment:UK()}})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}};var pqt=class{async sendEvent(){}async sendAutomationEvent(){}async identify(){}async flush(){}};nf();rr();var Ylt=require("fs/promises"),biu=require("os"),Eiu=require("path");N4e();var Jlh="id",Ylh=".fern",fqt=class{posthog;userId;token;constructor({token:t,posthogApiKey:r}){this.posthog=new cre(r,{isServer:!1}),this.userId=t==null?void 0:j7i(t),this.token=t}async identify(){this.userId!=null&&this.posthog.alias({distinctId:this.userId,alias:await this.getPersistedDistinctId()})}async sendEvent(t){let r=await this.getUserEmail();this.posthog.capture({distinctId:this.userId??await this.getPersistedDistinctId(),event:"CLI",properties:{version:"5.217.2",...t,...t.properties,usingAccessToken:!1,cliReleaseEnvironment:UK(),agent:Plr(),...r!=null?{userEmail:r}:{},...Wpe()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:{...t.properties,cliReleaseEnvironment:UK()}})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}userEmail;async getUserEmail(){if(this.userEmail!==null){if(this.userEmail!=null)return this.userEmail;if(this.token==null){this.userEmail=null;return}try{let t=await Pl({token:this.token.value}).user.getMyself();if(t.ok&&t.body.email!=null)return this.userEmail=t.body.email,this.userEmail}catch{}this.userEmail=null}}persistedDistinctId;async getPersistedDistinctId(){if(this.persistedDistinctId==null){let t=Ew(),r=ke(Xt.of((0,biu.homedir)()),Ee.of(Ylh),Ee.of(Jlh));try{await Gt(r)?this.persistedDistinctId=(await(0,Ylt.readFile)(r)).toString():(await(0,Ylt.mkdir)((0,Eiu.dirname)(r),{recursive:!0}),await(0,Ylt.writeFile)(r,t),this.persistedDistinctId=t)}catch{this.persistedDistinctId=t}}return this.persistedDistinctId}};var fHo;async function dqt(){return fHo==null&&(fHo=await Xlh()),fHo}async function Xlh(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal";if(e==null||!C$r())return new pqt;let t=await lXe();return t!=null?new fqt({token:t,posthogApiKey:e}):await Az()!=null?new ven({posthogApiKey:e}):new fqt({token:void 0,posthogApiKey:e})}catch{return new pqt}}cn();gt();Bt();vQ();var mqt=Ae(require("process"),1);AHe();var Ciu=Ae(HJi(),1),xiu=Ae(viu(),1);function wT(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=XW(e),e.length===0))return 0;e=e.replace((0,xiu.default)()," ");let r=t.ambiguousIsNarrow?1:2,n=0;for(let i of e){let o=i.codePointAt(0);if(o<=31||o>=127&&o<=159||o>=768&&o<=879)continue;switch(Ciu.default.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}cn();function Cen(e){let t=0;for(let r of e.split(`
|
|
3486
|
+
at ${r.filename}:${n}:${i}`}};var Cah=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,L9t=class{match(t){return typeof t=="string"}coerce(t,r){let[n,i]=this.getInfos(t);return{type:n??"Error",value:i??t,stack:r.syntheticException?.stack,synthetic:!0}}getInfos(t){let r="Error",n=t,i=t.match(Cah);return i&&(r=i[1],n=i[2]),[r,n]}};var Kru=["fatal","error","warning","log","info","debug"];function L$r(e,t=40){let r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(let n=r.length;n>0;n--){let i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length||i.length<=t?i:`${i.slice(0,t)}...`}return""}var _9t=class{match(t){return typeof t=="object"&&t!==null}coerce(t,r){let n=this.getErrorPropertyFromObject(t);return n?r.apply(n):{type:this.getType(t),value:this.getValue(t),stack:this.getStack(t)??r.syntheticException?.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){if(Mlt(t))return t.constructor.name;let r="name"in t?t.name:void 0;return pR(r)&&!s7o(r)?r:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){let i=`'${t.name}' captured as exception`;return"message"in t&&typeof t.message=="string"&&(i+=` with message: '${t.message}'`),i}if("message"in t&&typeof t.message=="string")return t.message;let r=this.getObjectClassName(t),n=L$r(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${n}`}isSeverityLevel(t){return pR(t)&&!s7o(t)&&Kru.indexOf(t)>=0}getStack(t){try{return pR(t.stacktrace)&&t.stacktrace.length>0?t.stacktrace:pR(t.stack)&&t.stack.length>0?t.stack:void 0}catch{return}}getErrorPropertyFromObject(t){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];if(qSe(n))return n}}getObjectClassName(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}};var x7o=class{match(t){return Mlt(t)}coerce(t,r){let n=t.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${L$r(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var U9t=class{match(t){return S$r(t)}coerce(t,r){return{type:"Error",value:`Primitive value captured as exception: ${String(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var S7o=class{match(t){return DUe(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!Mlt(t))return!1;try{let r=t.detail;return r!=null&&typeof r=="object"&&"reason"in r}catch{return!1}}coerce(t,r){let n=this.getUnhandledRejectionReason(t);return S$r(n)?{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(n)}`,stack:r.syntheticException?.stack,synthetic:!0}:r.apply(n)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}};var w7o=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)}}};var V9t={MESSAGE:"$message",TIMESTAMP:"$timestamp"},xah=new Set([V9t.MESSAGE,V9t.TIMESTAMP]),_$r={enabled:!0,max_bytes:32768};function T7o(e){return e?{enabled:e.enabled??_$r.enabled,max_bytes:wah(e.max_bytes,_$r.max_bytes)}:{..._$r}}function Sah(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,i)=>xah.has(i)?(t.push(i),n):(n[i]=e[i],n),{}),droppedKeys:t}}var O7o=class{constructor(t){this._entries=[],this._totalBytes=0,this._config=T7o(t)}setConfig(t){this._config=T7o(t),this._trimToMaxBytes()}add(t){let r=Tah(t);if(!r)return;let n=Jru(r.json);n>this._config.max_bytes||(this._entries.push({step:r.step,bytes:n}),this._totalBytes+=n,this._trimToMaxBytes())}getAttachable(){return this._entries.map(t=>t.step)}clear(){this._entries=[],this._totalBytes=0}size(){return this._entries.length}_trimToMaxBytes(){for(;this._totalBytes>this._config.max_bytes&&this._entries.length>0;){let t=this._entries.shift();t&&(this._totalBytes-=t.bytes)}}};function wah(e,t){if(!Qlt(e)||e===1/0||e===-1/0)return t;let r=Math.floor(e);return r<0?t:r}function Tah(e){let t;try{t=GSe(e)}catch{return}try{let r=JSON.parse(t);if(!F9t(r))return;let n=r,i=n[V9t.MESSAGE],o=n[V9t.TIMESTAMP];return!pR(i)||i.trim().length===0||!pR(o)&&!Qlt(o)?void 0:{step:n,json:t}}catch{return}}function Jru(e){if("u">typeof TextEncoder)return new TextEncoder().encode(e).length;let t=encodeURIComponent(e),r=0;for(let n=0;n<t.length;n++)t[n]==="%"?(r+=1,n+=2):r+=1;return r}function Oah(){let e=globalThis._posthogReleaseId;return typeof e=="string"&&e.length>0?e:void 0}var P7o=e=>{if("flags"in e){let t=Yru(e.flags),r=Xru(e.flags);return{...e,featureFlags:t,featureFlagPayloads:r}}{let t=e.featureFlags??{},r=Object.fromEntries(Object.entries(e.featureFlagPayloads||{}).map(([i,o])=>[i,Vlt(o)])),n=Object.fromEntries(Object.entries(t).map(([i,o])=>[i,Pah(i,o,r[i])]));return{...e,featureFlags:t,featureFlagPayloads:r,flags:n}}};function Pah(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 Yru=e=>Object.fromEntries(Object.entries(e??{}).map(([t,r])=>[t,G9t(r)]).filter(([,t])=>t!==void 0)),Xru=e=>{let t=e??{};return Object.fromEntries(Object.keys(t).filter(r=>{let n=t[r];return n.enabled&&n.metadata&&n.metadata.payload!==void 0}).map(r=>{let n=t[r].metadata?.payload;return[r,n?Vlt(n):void 0]}))},G9t=e=>e===void 0?void 0:e.variant??e.enabled,Vlt=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};var Zru=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid","gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","oppref","irclid","_kx"],Bah=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$referring_domain",...Zru,"$session_id","$window_id","$lib","$lib_version","$device_id","$is_server","$react_native_version"],q9t=(e,t=[])=>{let r={},n=i=>{e[i]!==void 0&&(r[i]=e[i])};return Bah.forEach(n),t.forEach(n),r};var U$r=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(n=>n!==r)}}emit(t,r){for(let n of this.events[t]||[])n(r);for(let n of this.events["*"]||[])n(t,r)}};function B7o(){return"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&typeof Response.prototype.blob=="function"}var Rah="NativeGzipValidationError",kah=31,Fah=139,Nah=8,jah=e=>e.length>=2&&e[0]===kah&&e[1]===Fah;var W9t,zah=()=>{if(W9t)return W9t;W9t=[];for(let e=0;e<256;e++){let t=e;for(let r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;W9t[e]=t>>>0}return W9t},Qah=e=>{let t=zah(),r=4294967295;for(let n=0;n<e.length;n++)r=t[(r^e[n])&255]^r>>>8;return(4294967295^r)>>>0},V$r=e=>{throw Ult(Rah,`Native gzip produced invalid output: ${e}`)},Mah=async(e,t)=>{e.size<18&&V$r("too-short");let r=new Uint8Array(await e.slice(0,10).arrayBuffer());(!jah(r)||r[2]!==Nah)&&V$r("invalid-header");let n=new DataView(await e.slice(e.size-8).arrayBuffer());n.getUint32(0,!0)!==Qah(t)&&V$r("invalid-crc");let i=t.length>>>0;n.getUint32(4,!0)!==i&&V$r("invalid-size")};async function H9t(e,t=!0,r){try{let n=new TextEncoder().encode(e),i=new globalThis.CompressionStream("gzip"),o=i.writable.getWriter(),s=o.write(n).then(()=>o.close()).catch(async l=>{try{await o.abort(l)}catch{}throw l}),a=new Response(i.readable).blob(),[c]=await Promise.all([a,s]);return await Mah(c,n),c}catch(n){if(r?.rethrow)throw n;return t&&console.error("Failed to gzip compress data",n),null}}var $5=class extends Error{constructor(t,r,n,i){super("HTTP error while fetching PostHog: status="+t.status+", reqByteLength="+r),this.response=t,this.reqByteLength=r,this.responseBodyDeadline=n,this.abortController=i,this.name="PostHogFetchHttpError",this._bodyReadTimedOut=!1}get status(){return this.response.status}get retryAfterMs(){try{return h7o(this.response.headers?.get("retry-after"))}catch{return}}get bodyReadTimedOut(){return this._bodyReadTimedOut}get text(){if(!this.responseBodyTextPromise)if(Date.now()>=this.responseBodyDeadline){this._bodyReadTimedOut=!0;let t=Ult("AbortError","Response body read timed out");this.cancelResponseBody(t),this.responseBodyTextPromise=Promise.reject(t)}else{let t=new Promise((n,i)=>{this.responseBodyTimer=N2(()=>{this._bodyReadTimedOut=!0;let o=Ult("AbortError","Response body read timed out");i(o),this.cancelResponseBody(o)},this.responseBodyDeadline-Date.now())}),r;try{r=Promise.resolve(this.response.text())}catch(n){r=Promise.reject(n)}this.responseBodyTextPromise=Promise.race([r,t]).finally(()=>clearTimeout(this.responseBodyTimer))}return this.responseBodyTextPromise}get json(){return this.text.then(t=>JSON.parse(t))}cancelResponseBody(t){clearTimeout(this.responseBodyTimer),this.abortController.signal.aborted||this.abortController.abort(t),(async()=>{try{await this.response.body?.cancel()}catch{}})()}},Bme=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};var nnu=(e,t)=>{for(let r of Object.keys(t))(r.startsWith("$feature/")||r==="$active_feature_flags")&&(e[r]=t[r])};async function $ru(e){if(e instanceof $5){let t="";try{t=await e.text}catch{e.bodyReadTimedOut&&(t="<response body read timed out>")}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 Lah(e){return typeof e=="object"&&(e instanceof $5||inu(e))}function inu(e){return e instanceof Bme}function _ah(e){if(e instanceof $5)return e.status===502||e.status===504;if(!(e instanceof Bme))return!1;let t=e.error;return(t?.code??t?.cause?.code)!=="ECONNREFUSED"}var enu=10485760;function tnu(e){try{return typeof e!="string"?e instanceof Uint8Array?e.byteLength:e.size:"u">typeof Buffer?Buffer.byteLength(e,Dru):new TextEncoder().encode(e).length}catch{return 0}}function Glt(e){return typeof e=="object"&&e instanceof $5&&e.status===413}function G$r(e){return e instanceof $5?e.status===408||e.status===429||e.status>=500:inu(e)}function rnu(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var D7o="default",K9t=class{getErrorPropertiesBuilder(){return this._errorPropertiesBuilder||(this._errorPropertiesBuilder=this.createErrorPropertiesBuilder()),this._errorPropertiesBuilder}createErrorPropertiesBuilder(){return new Q9t([new M9t,new _9t,new L9t,new U9t],I7o())}getEvaluationRuntime(){}constructor(t,r={}){this.flushPromise=null,this.pendingFlushPromise=null,this.flushPromises=new Set,this._dequeuedMessagesCount=0,this.shutdownPromise=null,this.promiseQueue=new B$r,this._events=new U$r,this._isInitialized=!1;let n=typeof t=="string"?t.trim():"",i=typeof r.host=="string"?r.host.trim():"",o=!n;this._logger=gru("[PostHog]",this.logMsgIfDebug.bind(this)),o&&this._logger.error("You must pass your PostHog project's api key. The client will be disabled."),this.apiKey=n,this.host=Rru(i||"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.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:G$r},this.requestTimeout=r.requestTimeout??1e4,this.featureFlagsRequestTimeoutMs=r.featureFlagsRequestTimeoutMs??3e3,this.featureFlagsRequestMaxRetries=r.featureFlagsRequestMaxRetries??1,this.remoteConfigRequestTimeoutMs=r.remoteConfigRequestTimeoutMs??3e3,this.disableGeoip=r.disableGeoip??!0,this.disabled=(r.disabled??!1)||o,this.historicalMigration=r?.historicalMigration??!1,this._initPromise=Promise.resolve(),this._isInitialized=!0,this.evaluationContexts=r?.evaluationContexts??r?.evaluationEnvironments,r?.evaluationEnvironments&&!r?.evaluationContexts&&this._logger.warn("evaluationEnvironments is deprecated. Use evaluationContexts instead. This property will be removed in a future version."),this.disableCompression=!B7o()||(r?.disableCompression??!1)}logMsgIfDebug(t){this.isDebug&&t()}wrap(t){if(this.disabled)return void this._logger.warn("The client is disabled");if(this._isInitialized)return t();this._initPromise.then(()=>t())}getCommonEventProperties(){return{$lib:this.getLibraryId(),$lib_version:this.getLibraryVersion()}}get optedOut(){return this.getPersistedProperty(jQ.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(jQ.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(jQ.OptedOut,!0)})}on(t,r){return this._events.on(t,r)}debug(t=!0){if(this.removeDebugCallback?.(),t){let r=this.on("*",(n,i)=>this._logger.info(n,i));this.removeDebugCallback=()=>{r(),this.removeDebugCallback=void 0}}}get isDebug(){return!!this.removeDebugCallback}get isDisabled(){return this.disabled}buildPayload(t){let r=t.properties||{},n={...r,...this.getCommonEventProperties()};return nnu(n,r),t.event==="$feature_flag_called"&&n.$feature_flag_has_experiment===!1&&this.isMinimalFlagCalledEventsEnabled()&&(n=q9t(n)),{distinct_id:t.distinct_id,event:t.event,properties:n}}isMinimalFlagCalledEventsEnabled(){return!1}addPendingPromise(t){return this.promiseQueue.add(t)}identifyStateless(t,r,n){this.wrap(()=>{let i={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};this.enqueue("identify",i,n)})}async identifyStatelessImmediate(t,r,n){let i={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};await this.sendImmediate("identify",i,n)}captureStateless(t,r,n,i){this.wrap(()=>{let o=this.buildPayload({distinct_id:t,event:r,properties:n});this.enqueue("capture",o,i)})}async captureStatelessImmediate(t,r,n,i){let o=this.buildPayload({distinct_id:t,event:r,properties:n});await this.sendImmediate("capture",o,i)}aliasStateless(t,r,n,i){this.wrap(()=>{let o=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...n||{},distinct_id:r,alias:t}});this.enqueue("alias",o,i)})}async aliasStatelessImmediate(t,r,n,i){let o=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...n||{},distinct_id:r,alias:t}});await this.sendImmediate("alias",o,i)}groupIdentifyStateless(t,r,n,i,o,s){this.wrap(()=>{let a=this.buildPayload({distinct_id:o||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{},...s||{}}});this.enqueue("capture",a,i)})}async groupIdentifyStatelessImmediate(t,r,n,i,o,s){let a=this.buildPayload({distinct_id:o||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{},...s||{}}});await this.sendImmediate("capture",a,i)}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`,n={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}};return this.fetchWithRetry(r,n,{type:"required",consume:i=>i.json()},{retryCount:0},this.remoteConfigRequestTimeoutMs).catch(i=>{this._logger.error("Remote config could not be loaded",i),this._events.emit("error",i)})}async getFlags(t,r={},n={},i={},o={},s=!1){await this._initPromise;let a=s?"&config=true":"",c=`${this.host}/flags/?v=2${a}`,l={token:this.apiKey,distinct_id:t,groups:r,person_properties:n,group_properties:i,...o};n.$device_id&&(l.$device_id=n.$device_id),this.evaluationContexts&&this.evaluationContexts.length>0&&(l.evaluation_contexts=this.evaluationContexts);let u=this.getEvaluationRuntime();u&&(l.evaluation_runtime=u);let p={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:JSON.stringify(l)};return this._logger.info("Flags URL",c),this.fetchWithRetry(c,p,{type:"required",consume:d=>d.json()},{retryCount:this.featureFlagsRequestMaxRetries,retryCheck:_ah},this.featureFlagsRequestTimeoutMs).then(d=>({success:!0,response:P7o(d)})).catch(d=>(this._events.emit("error",d),{success:!1,error:this.categorizeRequestError(d)}))}categorizeRequestError(t){if(t instanceof $5)return{type:"api_error",statusCode:t.status};if(t instanceof Bme){let r=t.error;return r instanceof Error&&(r.name==="AbortError"||r.name==="TimeoutError")?{type:"timeout"}:{type:"connection_error"}}return{type:"unknown_error"}}async getFeatureFlagStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagDetailStateless(t,r,n,i,o,s);if(a===void 0)return{response:void 0,requestId:void 0};let c=G9t(a.response);return c===void 0&&(c=!1),{response:c,requestId:a.requestId}}async getFeatureFlagDetailStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagDetailsStateless(r,n,i,o,s,[t]);return a===void 0?void 0:{response:a.flags[t],requestId:a.requestId,evaluatedAt:a.evaluatedAt}}async getFeatureFlagPayloadStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagPayloadsStateless(r,n,i,o,s,[t]);if(!a)return;let c=a[t];return c===void 0?null:c}async getFeatureFlagPayloadsStateless(t,r={},n={},i={},o,s){return await this._initPromise,(await this.getFeatureFlagsAndPayloadsStateless(t,r,n,i,o,s)).payloads}async getFeatureFlagsStateless(t,r={},n={},i={},o,s){return await this._initPromise,await this.getFeatureFlagsAndPayloadsStateless(t,r,n,i,o,s)}async getFeatureFlagsAndPayloadsStateless(t,r={},n={},i={},o,s){await this._initPromise;let a=await this.getFeatureFlagDetailsStateless(t,r,n,i,o,s);return a?{flags:a.featureFlags,payloads:a.featureFlagPayloads,requestId:a.requestId}:{flags:void 0,payloads:void 0,requestId:void 0}}async getFeatureFlagDetailsStateless(t,r={},n={},i={},o,s){await this._initPromise;let a={geoip_disable:o??this.disableGeoip};s&&(a.flag_keys_to_evaluate=s);let c=await this.getFlags(t,r,n,i,a);if(!c.success)return;let l=c.response;return l.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"),l.quotaLimited?.includes("feature_flags")?(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:l?.requestId,quotaLimited:l.quotaLimited}):l}async getSurveysStateless(){if(await this._initPromise,this.disabled)return[];if(this.disableSurveys===!0)return this._logger.info("Loading surveys is disabled."),[];let t=`${this.host}/api/surveys/?token=${this.apiKey}`,r={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}},i=(await this.fetchWithRetry(t,r,{type:"required",consume:o=>{if(o.status!==200||!o.json){let s=`Surveys API could not be loaded: ${o.status}`,a=new Error(s);return this._logger.error(a),this._events.emit("error",new Error(s)),Promise.resolve(void 0)}return o.json()}}).catch(o=>{this._logger.error("Surveys API could not be loaded",o),this._events.emit("error",o)}))?.surveys;return i&&this._logger.info("Surveys fetched from API: ",JSON.stringify(i)),i??[]}get props(){return this._props||(this._props=this.getPersistedProperty(jQ.Props)),this._props||{}}set props(t){this._props=t}async register(t){this.wrap(()=>{this.props={...this.props,...t},this.setPersistedProperty(jQ.Props,this.props)})}async unregister(t){this.wrap(()=>{delete this.props[t],this.setPersistedProperty(jQ.Props,this.props)})}processBeforeEnqueue(t){return t}async flushStorage(){}getQueueRouteKey(t){return D7o}persistedQueueKeyForRoute(t){return jQ.Queue}getActiveQueueRoutes(){return[D7o]}getRouteQueue(t){return this.getPersistedProperty(this.persistedQueueKeyForRoute(t))||[]}enqueue(t,r,n,i){this.wrap(()=>{if(this.optedOut)return void this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let o=this.prepareMessage(r,n);if(o=this.processBeforeEnqueue(o),o===null)return;o=this.normalizeMessage(o);let s=this.persistedQueueKeyForRoute(i??this.getQueueRouteKey(o)),a=this.getPersistedProperty(s)||[];a.length>=this.maxQueueSize&&(a.shift(),this._logger.warn("Queue is full, the oldest event is dropped.")),a.push({message:o}),this.setPersistedProperty(s,a),this._events.emit(t,o),a.length>=this.flushAt&&this.flushBackground(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=N2(()=>this.flushBackground(),this.flushInterval))})}async sendImmediate(t,r,n,i){if(this.disabled)return void this._logger.warn("The client is disabled");if(this._isInitialized||await this._initPromise,this.optedOut)return void this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let o=this.prepareMessage(r,n);if(o=this.processBeforeEnqueue(o),o!==null){o=this.normalizeMessage(o);try{await this.sendBatch([o],void 0,i??this.getQueueRouteKey(o))}catch(s){this._events.emit("error",s)}}}normalizeMessage(t){let{type:r,library:n,library_version:i,...o}=t,s=rnu(o.properties)?o.properties:void 0;return n!==void 0&&s?.$lib===void 0&&(s={...s||{},$lib:n}),i!==void 0&&s?.$lib_version===void 0&&(s={...s||{},$lib_version:i}),s&&(o.properties=s),o.uuid=kUe(o.uuid,F2),o}normalizeTimestampForWire(t){let r=t instanceof Date?t:typeof t=="string"?new Date(t):null;if(!r||Number.isNaN(r.getTime()))return t;let n=r.toISOString(),i=typeof t=="string"?t.match(/\.(\d+)(?:Z|[+-]\d{2}:?\d{2})?$/i)?.[1]:void 0;return i&&i.length>3?n.replace(/\.\d{3}Z$/,`.${i}Z`):n}prepareMessage(t,r){let n={...t,timestamp:r?.timestamp?r?.timestamp:g7o(),uuid:kUe(r?.uuid,F2)};return(r?.disableGeoip??this.disableGeoip)&&(rnu(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.pendingFlushPromise||this.flushAutomatic().catch(async t=>{await $ru(t)})}flushAutomatic(){return this.flush()}async waitForPendingPromises(t,r=[]){let n=r.filter(o=>!!o),i=0;for(;;){let o=this.promiseQueue.getPromises([...n,...this.flushPromises],t);if(o.length===0)return;i>0&&this._logger.debug(`flush() re-checking ${o.length} pending promise(s) before flushing`),await Promise.all(o.map(s=>s.catch(()=>{}))),i++}}flushWithPendingPromises(){return this.flushInternal(!0)}flush(){return this.flushInternal(!1)}flushInternal(t){if(this.disabled)return Promise.resolve();if(!t&&this.pendingFlushPromise)return this.pendingFlushPromise;let r=this.flushPromise,n=this.promiseQueue.maxId,i=Promise.resolve().then(()=>{if(t)return this.waitForPendingPromises(n,[r,i])}).then(()=>z9t([r])).then(()=>(this.pendingFlushPromise===i&&(this.pendingFlushPromise=null),this._flush()));return this.pendingFlushPromise=i,this.flushPromise=i,this.flushPromises.add(i),this.addPendingPromise(i),z9t([i]).then(()=>{this.flushPromises.delete(i),this.pendingFlushPromise===i&&(this.pendingFlushPromise=null),this.flushPromise===i&&(this.flushPromise=null)}),i}getCustomHeaders(){let t=this.getCustomUserAgent(),r={};return t&&t!==""&&(r["User-Agent"]=t),r}compressPayload(t){return H9t(t,this.isDebug)}getBatchEndpointPath(t){return"/batch/"}async sendBatch(t,r,n=D7o){let i={api_key:this.apiKey,batch:t.map(l=>{if(!l)return l;let u=this.normalizeTimestampForWire(l.timestamp);return u===l.timestamp?l:{...l,timestamp:u}}),sent_at:g7o()};this.historicalMigration&&(i.historical_migration=!0);let o=GSe(i),s=`${this.host}${this.getBatchEndpointPath(n)}`,a=this.disableCompression?null:await this.compressPayload(o),c={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...a!==null&&{"Content-Encoding":"gzip"}},body:a||o};await this.fetchWithRetry(s,c,{type:"successful-write"},r)}async _flush(){this.clearFlushTimer(),await this._initPromise;let t=this.getActiveQueueRoutes();if(!t.some(i=>this.getRouteQueue(i).length>0))return;let r=[],n;for(let i of t)try{await this._flushRoute(i,r)}catch(o){n===void 0&&(n=o)}if(n!==void 0)throw n;this._events.emit("flush",r)}async _flushRoute(t,r){let n=this.persistedQueueKeyForRoute(t),i=this.getPersistedProperty(n)||[];if(!i.length)return;let o=i.length,s=0;for(;i.length>0&&s<o;){let a=i.slice(0,this.maxBatchSize),c=a.map(p=>p.message===void 0?p.message:this.normalizeMessage(p.message)),l=async()=>{let p=this.getPersistedProperty(n)||[],d=[...a],f=p.filter(m=>{let g=m.message?.uuid,A=d.findIndex(b=>b===m||typeof g=="string"&&g.length>0&&b.message?.uuid===g);return A===-1?!0:(d.splice(A,1),!1)});this.setPersistedProperty(n,f),i=f,this._dequeuedMessagesCount+=a.length,await this.flushStorage()},u={retryCheck:p=>Glt(p)?!1:G$r(p)};try{await this.sendBatch(c,u,t)}catch(p){if(Glt(p)&&c.length>1){this.maxBatchSize=Math.max(1,Math.floor(c.length/2)),this._logger.warn(`Received 413 when sending batch of size ${c.length}, reducing batch size to ${this.maxBatchSize}`);continue}throw p instanceof Bme||await l(),this._events.emit("error",p),p}await l(),r.push(...c),s+=c.length}}async _sendOtlpBatch({path:t,auth:r,payload:n}){if(this.disabled)return{kind:"fatal",error:new Error("The client is disabled")};let i;try{i=JSON.stringify(n)}catch(u){return this.logMsgIfDebug(()=>console.warn(`[PostHog] Could not serialize a ${t} batch; reporting it as too large`,u)),{kind:"too-large",measuredLocally:!0}}let o=tnu(i);if(o>enu)return this.logMsgIfDebug(()=>console.warn(`[PostHog] Not sending a ${t} batch of ${o} bytes: the endpoint accepts at most ${enu}`)),{kind:"too-large",measuredLocally:!0};let s=r==="bearer"?`${this.host}/i/v1/${t}`:`${this.host}/i/v1/${t}?token=${encodeURIComponent(this.apiKey)}`,a=this.disableCompression?null:await this.compressPayload(i),c=a||i,l={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...r==="bearer"&&{Authorization:`Bearer ${this.apiKey}`},...a!==null&&{"Content-Encoding":"gzip"}},body:c};try{return await this.fetchWithRetry(s,l,{type:"successful-write"},{retryCheck:u=>Glt(u)||u instanceof $5&&u.retryAfterMs!==void 0?!1:G$r(u)}),{kind:"ok"}}catch(u){if(Glt(u))return{kind:"too-large"};if(G$r(u)){let p=u instanceof $5?u.retryAfterMs:void 0;return{kind:"retry-later",error:u,...p!==void 0&&{retryAfterMs:p}}}return{kind:"fatal",error:u}}}async _sendLogsBatch(t){return this._sendOtlpBatch({path:"logs",auth:"query-token",payload:t})}async _sendMetricsBatch(t){return this._sendOtlpBatch({path:"metrics",auth:"query-token",payload:t})}async _sendTracesBatch(t){return this._sendOtlpBatch({path:"traces",auth:"bearer",payload:t})}async fetchWithRetry(t,r,n,i,o){let s=r.body?r.body:"",a=tnu(s),c={...this._retryOptions,...i},l=0;return await kru(async()=>{l++;let u=new AbortController,p=o??this.requestTimeout,d=Date.now()+p,f,m=new Promise((C,x)=>{f=N2(()=>{let S=Ult("AbortError",`Request timed out after ${p}ms`);x(S),u.abort(S)},p)}),g,A=!1,b,I=()=>b??=(async()=>{try{await g?.body?.cancel()}catch{}})();try{let C;try{C=this.fetch(t,{signal:u.signal,...r})}catch(B){throw new Bme(B)}C.then(B=>{u.signal.aborted&&!A&&Promise.resolve(B.body?.cancel()).catch(()=>{})}).catch(()=>{});try{g=await Promise.race([C,m]),A=!0}catch(B){throw new Bme(B)}let x=r.mode==="no-cors",S=n.type==="successful-write"?300:400;if(!x&&(g.status<200||g.status>=S))throw new $5(g,a,d,u);if(n.type==="successful-write"){try{await Promise.race([I(),m])}catch{}return}try{return await Promise.race([n.consume(g),m])}catch(B){throw u.signal.aborted?new Bme(B):B}}finally{clearTimeout(f),u.signal.aborted&&g&&I()}},{...c,retryCheck:u=>{let p=c.retryCheck(u);return p&&l<=c.retryCount&&u instanceof $5&&u.cancelResponseBody(),p}})}async _shutdown(t=3e4){await this._initPromise;let r=!1;return this.clearFlushTimer(),this.disabled?void 0:WSe((async()=>{try{for(await this.promiseQueue.join();this.getActiveQueueRoutes().some(s=>this.getRouteQueue(s).length>0);){let o=this._dequeuedMessagesCount;if(await this.flush(),r)break;if(this._dequeuedMessagesCount===o){this._logger.warn("Shutdown flush completed but did not send any queued events. Stopping drain to avoid a loop.");break}}}catch(i){if(!Lah(i))throw i;await $ru(i)}})(),t,()=>{this._logger.critical("Timeout while shutting down PostHog. Some events may not have been sent.",{shutdownTimeoutMs:t}),r=!0})}async shutdown(t=3e4){return this.shutdownPromise?this._logger.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}};var Wah=/[a-z][a-z0-9+.-]{0,63}:[^\s<>"]+/gi;var lYv=new RegExp(Wah.source,"i"),onu=/[a-z][a-z0-9+.-]{0,63}:\/\//i,uYv=new RegExp(`^${onu.source}`,"i"),pYv=new RegExp(onu.source,"gi");var Hah=["is_not","is_set"],Kah=1152921504606847e3,Ul=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Object.setPrototypeOf(this,e.prototype)}};function R7o(e){if(typeof e=="boolean")return!0;if(typeof e=="string"){let t=e.toLowerCase();return t==="true"||t==="false"}if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(!R7o(t in e?e[t]:null))return!1;return!0}function k7o(e){if(typeof e=="boolean")return e;if(typeof e=="string")return e.toLowerCase()==="true";if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(!k7o(t in e?e[t]:null))return!1;return!0}function J9t(e){for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let n=e.charCodeAt(t+1);if(t+1>=e.length||n<56320||n>57343)throw new Ul("Cannot stringify an unpaired surrogate like the flags service");t++}else if(r>=56320&&r<=57343)throw new Ul("Cannot stringify an unpaired surrogate like the flags service")}}function W$r(e,t=new Set){if(!(e===null||typeof e=="boolean")){if(typeof e=="string")return void J9t(e);if(typeof e=="number"){if(!Number.isFinite(e))throw new Ul(`Cannot represent non-finite number ${e} like the flags service`);return}if(Array.isArray(e)){if(t.has(e))throw new Ul("Cannot represent a circular array during local evaluation");t.add(e);try{for(let r=0;r<e.length;r++)r in e&&W$r(e[r],t)}finally{t.delete(e)}return}if(typeof e=="object"){let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)throw new Ul("Cannot represent a non-JSON object like the flags service");if(t.has(e))throw new Ul("Cannot represent a circular object during local evaluation");t.add(e);try{for(let n of Object.keys(e))J9t(n),W$r(e[n],t)}finally{t.delete(e)}return}throw new Ul(`Cannot represent ${typeof e} like the flags service`)}}function Jah(e,t){let r=0,n=0;for(;r<e.length&&n<t.length;){let i=e.charCodeAt(r),o=t.charCodeAt(n),s=i>=55296&&i<=56319,a=o>=55296&&o<=56319,c=s?e.charCodeAt(r+1):0,l=a?t.charCodeAt(n+1):0,u=s?(i-55296)*1024+c-56320+65536:i,p=a?(o-55296)*1024+l-56320+65536:o;if(u!==p)return u-p;r+=s?2:1,n+=a?2:1}return e.length-t.length}function F7o(e,t=new Set){if(e===null)return"null";if(typeof e=="string")return J9t(e),JSON.stringify(e);if(typeof e=="boolean")return e?"true":"false";if(typeof e=="number"){if(!Number.isFinite(e))throw new Ul(`Cannot stringify non-finite number ${e} like the flags service`);if(Number.isInteger(e))throw new Ul(`Cannot distinguish integer ${e} from an integral JSON float during local evaluation`);return String(e)}if(Array.isArray(e)){if(t.has(e))throw new Ul("Cannot stringify a circular array during local evaluation");t.add(e);try{let r=[];for(let n=0;n<e.length;n++)r.push(n in e?F7o(e[n],t):"null");return`[${r.join(",")}]`}finally{t.delete(e)}}if(typeof e=="object"){let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)throw new Ul("Cannot stringify a non-JSON object like the flags service");if(t.has(e))throw new Ul("Cannot stringify a circular object during local evaluation");t.add(e);try{let n=Object.keys(e);return n.forEach(J9t),`{${n.sort(Jah).map(i=>`${JSON.stringify(i)}:${F7o(e[i],t)}`).join(",")}}`}finally{t.delete(e)}}throw new Ul(`Cannot stringify ${typeof e} like the flags service`)}function q$r(e){return typeof e=="string"?(J9t(e),e):F7o(e)}function snu(e){try{return new RegExp(e),!0}catch{return!1}}function e8(e){return String(e).replace(/[A-Z]/g,t=>t.toLowerCase())}function cnu(e,t,r){if(!/^\d+$/.test(e)||r==="strict"&&e.length>1&&e[0]==="0")throw new Ul(`Invalid semver: ${t}`);return parseInt(e,10)}function Cw(e,t="strict"){let n=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!n||n.startsWith("."))throw new Ul(`Invalid semver: ${e}`);let i=n.split("."),o=s=>s===void 0||s===""?0:cnu(s,e,t);return[o(i[0]),o(i[1]),o(i[2])]}function t8(e,t){for(let r=0;r<3;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0}function Yah(e,t){let r=Cw(e,t);return{lower:[r[0],r[1],r[2]],upper:[r[0],r[1]+1,0]}}function Xah(e,t){let[r,n,i]=Cw(e,t),o=[r,n,i],s;return s=r>0?[r+1,0,0]:n>0?[0,n+1,0]:[0,0,i+1],{lower:o,upper:s}}function Zah(e,t){let n=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!n)throw new Ul(`Invalid wildcard semver: ${e}`);let i=n.split("."),o=c=>{if(t==="legacy-permissive"){let l=parseInt(c,10);if(!isNaN(l))return l}else try{return cnu(c,e,t)}catch{}throw new Ul(`Invalid wildcard semver: ${e}`)},s=o(i[0]);if(i.length===1)return{lower:[s,0,0],upper:[s+1,0,0]};let a=o(i[1]);return{lower:[s,a,0],upper:[s,a+1,0]}}function anu(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 Ul(`${e} is in an invalid date format`)}throw new Ul(`The date provided ${e} must be a string, number, or date object`)}function N7o(e){let t=/^-?(?<number>[0-9]+)(?<interval>[a-z])$/,r=e.match(t),n=new Date(new Date().toISOString());if(!r||!r.groups)return null;let i=parseInt(r.groups.number);if(i>=1e4)return null;let o=r.groups.interval;if(o==="h")n.setUTCHours(n.getUTCHours()-i);else if(o==="d")n.setUTCDate(n.getUTCDate()-i);else if(o==="w")n.setUTCDate(n.getUTCDate()-7*i);else if(o==="m")n.setUTCMonth(n.getUTCMonth()-i);else{if(o!=="y")return null;n.setUTCFullYear(n.getUTCFullYear()-i)}return n}function j7o(e,t,r={}){let n=e.key,i=e.value,o=e.operator||"exact",s=r.semverParsingPolicy??"strict";if(Object.prototype.hasOwnProperty.call(t,n)){if(o==="is_not_set")return!1;if(o==="is_set")return!0}else throw new Ul(`Property ${n} not found in propertyValues`);let c=t[n];if(c===void 0)return r.warnFunction?.(`Property ${n} cannot have a value of undefined with the ${o} operator`),o==="is_not";if(c===null&&!Hah.includes(o)&&o!=="exact"&&o!=="is_not")return r.warnFunction?.(`Property ${n} cannot have a value of null with the ${o} operator`),!1;let l=(p,d)=>{if(r.propertyMatchingVersion!==2&&R7o(p)||Array.isArray(p)&&p.length===0)return W$r(d),k7o(p)===k7o(d);if(r.propertyMatchingVersion===2&&typeof d=="number"&&R7o(p))return W$r(d),!1;if(Array.isArray(p)){let f=q$r(d).toLowerCase();return p.some(m=>q$r(m).toLowerCase()===f)}return q$r(p).toLowerCase()===q$r(d).toLowerCase()},u=(p,d,f)=>{if(f==="gt")return p>d;if(f==="gte")return p>=d;if(f==="lt")return p<d;if(f==="lte")return p<=d;throw new Error(`Invalid operator: ${f}`)};switch(o){case"exact":return l(i,c);case"is_not":return!l(i,c);case"is_set":return!0;case"icontains":return e8(c).includes(e8(i));case"not_icontains":return!e8(c).includes(e8(i));case"starts_with":return e8(c).startsWith(e8(i));case"not_starts_with":return!e8(c).startsWith(e8(i));case"ends_with":return e8(c).endsWith(e8(i));case"not_ends_with":return!e8(c).endsWith(e8(i));case"regex":return snu(String(i))&&String(c).match(String(i))!==null;case"not_regex":return snu(String(i))&&String(c).match(String(i))===null;case"gt":case"gte":case"lt":case"lte":{let p=typeof i=="number"?i:parseFloat(String(i)),d=typeof c=="number"?c:c!=null?parseFloat(String(c)):NaN;return Number.isFinite(p)&&Number.isFinite(d)?u(d,p,o):u(String(c),String(i),o)}case"is_date_after":case"is_date_before":{if(typeof i=="boolean")throw new Ul("Date operations cannot be performed on boolean values");let p=N7o(String(i));p==null&&(p=anu(i));let d=anu(c);return o==="is_date_before"?d<p:d>p}case"semver_eq":return t8(Cw(String(c),s),Cw(String(i),s))===0;case"semver_neq":return t8(Cw(String(c),s),Cw(String(i),s))!==0;case"semver_gt":return t8(Cw(String(c),s),Cw(String(i),s))>0;case"semver_gte":return t8(Cw(String(c),s),Cw(String(i),s))>=0;case"semver_lt":return t8(Cw(String(c),s),Cw(String(i),s))<0;case"semver_lte":return t8(Cw(String(c),s),Cw(String(i),s))<=0;case"semver_tilde":{let p=Cw(String(c),s),{lower:d,upper:f}=Yah(String(i),s);return t8(p,d)>=0&&t8(p,f)<0}case"semver_caret":{let p=Cw(String(c),s),{lower:d,upper:f}=Xah(String(i),s);return t8(p,d)>=0&&t8(p,f)<0}case"semver_wildcard":{let p=Cw(String(c),s),{lower:d,upper:f}=Zah(String(i),s);return t8(p,d)>=0&&t8(p,f)<0}default:throw new Ul(`Unknown operator: ${o}`)}}async function lnu(e){let t=globalThis.crypto?.subtle;if(!t)throw new Error("SubtleCrypto API not available");let r=await t.digest("SHA-1",new TextEncoder().encode(e));return Array.from(new Uint8Array(r)).map(n=>n.toString(16).padStart(2,"0")).join("")}async function Y9t(e,t,r="",n="."){let i=await lnu(`${e}${n}${t}${r}`);return parseInt(i.slice(0,15),16)/Kah}async function z7o(e,t){if(e==null||e.id==null||e.exclusion_percentage==null)return;let r=Number(e.exclusion_percentage);if(!Number.isFinite(r))return;let n=Math.min(Math.max(r,0),100);if(!(n!==100&&await Y9t("holdout",t,"","-")>n/100))return`holdout-${e.id}`}function H$r(e){let t=[],r=0;for(let n of e){let i=r+n.rollout_percentage/100;t.push({valueMin:r,valueMax:i,key:n.key}),r=i}return t}async function Q7o(e,t,r){let n=await Y9t(e,t,"variant");return H$r(r).find(i=>n>=i.valueMin&&n<i.valueMax)?.key}function M7o(e,t){if(t===!1||t==null||!e)return null;let r=typeof t=="boolean"?t.toString():t,n=e[r]||null;return n==null?null:Vlt(n)}var unu=9223372036854776e3,$ah="9223372036854775808",ech=Object.prototype.propertyIsEnumerable;function tch(){return{ancestors:new WeakSet,remainingNodes:1e4}}function sre(e,t){try{return pnu(e,t,tch(),0)}catch{return[]}}function rch(e,t){let r=e.toString(),n=BigInt($ah);return e>=n||e<-n?(t?.debug(`Attribute ${r} is outside the int64 range; encoding it as a string`),{stringValue:r}):{intValue:r}}function U7o(e,t,r,n){if(r.remainingNodes<=0)return{stringValue:j$r};if(r.remainingNodes--,cru(e))return{boolValue:e};if(typeof e=="bigint")return rch(e,t);if(typeof e=="number"){if(!Number.isFinite(e))return{stringValue:String(e)};if(Number.isInteger(e)){if(Number.isSafeInteger(e))return{intValue:String(e)};if("u"<typeof BigInt)return{stringValue:String(e)};let i=BigInt(e).toString();return e>=unu||e<-unu?(t?.debug(`Attribute ${i} is outside the int64 range; encoding it as a string`),{stringValue:i}):{intValue:i}}return{doubleValue:e}}if(typeof e=="string")return{stringValue:ire(e)};if(typeof e=="function")return{stringValue:Bru};if(typeof e=="symbol")return{stringValue:String(e)};if(typeof e=="object"&&e!==null){if(r.ancestors.has(e))return{stringValue:N$r};if(n>=20)return{stringValue:j$r};if(e instanceof Date){let i=e.getTime(),o=Number.isFinite(i)?e.toISOString():String(e);return{stringValue:typeof o=="string"?ire(o):String(o)}}r.ancestors.add(e);try{try{let i=e.toJSON;if(typeof i=="function")return U7o(i.call(e),t,r,n+1)}catch{}return e_(e)?{arrayValue:{values:nch(e,t,r,n+1)}}:{kvlistValue:{values:pnu(e,t,r,n+1)}}}finally{r.ancestors.delete(e)}}return{stringValue:ire(String(e))}}function nch(e,t,r,n){let i=[],o=Math.min(e.length,1e3),s=0;for(;s<o&&r.remainingNodes>0;s++)try{let a=s in e?e[s]:void 0;if(VK(a))continue;i.push(U7o(a,t,r,n))}catch{i.push({stringValue:Z5})}return e.length>s&&i.push({stringValue:j$r}),i}function pnu(e,t,r,n){let i=[];for(let o in e)if(ech.call(e,o)){if(!o){t?.debug("Dropping an attribute with an empty key");continue}if(i.length>=1e3||r.remainingNodes<=0){t?.debug("Attributes truncated: the value exceeds the OTLP encoder budget");break}try{let s=e[o];if(a7o(s)||Ome(s))continue;i.push({key:ire(o),value:U7o(s,t,r,n)})}catch{i.push({key:ire(o),value:{stringValue:Z5}})}}return i}function Z9t(e,t,r){return{...Pme({},e.resourceAttributes),"service.name":e.serviceName||"unknown_service",...e.environment&&{"deployment.environment":e.environment},...e.serviceVersion&&{"service.version":e.serviceVersion},"telemetry.sdk.name":t,"telemetry.sdk.version":r}}var ich=["service.name","deployment.environment","service.version","telemetry.sdk.name","telemetry.sdk.version"];function $9t(e,t){let r=Pme({},e),n={};for(let i of ich)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i],delete r[i]);return[...sre(r,t),...sre(n,t)]}var fnu={darwin:"macOS",win32:"Windows",cygwin:"Windows",linux:"Linux",android:"Android",freebsd:"FreeBSD",openbsd:"OpenBSD",netbsd:"NetBSD",sunos:"SunOS",aix:"AIX",haiku:"Haiku","Mac OS X":"macOS"};function och(e){if(e)return Object.prototype.hasOwnProperty.call(fnu,e)?fnu[e]:e}function V7o(e,t){let r=och(e);return{...r?{"os.name":r}:{},...t?{"os.version":t}:{}}}var sch={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},TYv=sch.info;var FUe=class{constructor(t){this._onFire=t,this._firesAt=0}get pending(){return!!this._timer}arm(t){this.clear(),this._firesAt=Date.now()+t,this._timer=N2(()=>{this._timer=void 0,this._onFire()},t)}armNoEarlierThan(t){this._timer&&Date.now()+t<=this._firesAt||this.arm(t)}clear(){this._timer&&(clearTimeout(this._timer),this._timer=void 0)}};function eqt(){return 1-.25+Math.random()*.25*2}var r8=1;function tqt(e,t,r,n){let i=Math.min(Math.max(0,t-1),6),o=e*2**i,s=n===void 0?o:Math.min(o,Math.max(n,e));return Math.round(s*r)}var rqt=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function G7o(e){return String(e)+"000000"}function q7o(e,t,r,n){let i="";return n&&(i=Object.keys(n).sort().map(s=>`${JSON.stringify(s)}:${JSON.stringify(n[s])}`).join(",")),`${e}\0${t}\0${r??""}\0${i}`}function dnu(e,t){for(let r=0;r<t.length;r++)if(e<=t[r])return r;return t.length}function W7o(e,t,r){return Z9t(e,t,r)}function H7o(e,t,r,n){return{resourceMetrics:[{resource:{attributes:$9t(t)},scopeMetrics:[{scope:{name:r,version:n},metrics:e}]}]}}function J$r(e){let t=e?.resourceAttributes;return{serviceName:t?.["service.name"]??e?.serviceName,serviceVersion:t?.["service.version"]??e?.serviceVersion,environment:t?.["deployment.environment"]??e?.environment,resourceAttributes:t,beforeSend:e?.beforeSend,flushIntervalMs:e?.flushIntervalMs??1e4,maxSeriesPerFlush:e?.maxSeriesPerFlush??1e3}}var mnu=1,nqt=class{constructor(t,r,n){this._instance=t,this._config=r,this._logger=n,this._series=new Map,this._flushTimer=new FUe(()=>this.flush().catch(i=>{this._logger.error("Metrics flush failed:",i)})),this._flushPromise=null,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set,this._retryAfter=new RUe,this._consecutiveFlushFailures=0,this._flushJitter=r8,this._generation=0}count(t,r=1,n){this._capture({name:t,type:"count",value:r,unit:n?.unit,attributes:n?.attributes})}gauge(t,r,n){this._capture({name:t,type:"gauge",value:r,unit:n?.unit,attributes:n?.attributes})}histogram(t,r,n){this._capture({name:t,type:"histogram",value:r,unit:n?.unit,attributes:n?.attributes})}flush(){let t=this._flushPromise,n=(async()=>{t&&await t.catch(()=>{}),await this._doFlush()})().finally(()=>{this._flushPromise===n&&(this._flushPromise=null)});return this._flushPromise=n,n}drainWindow(){if(this._series.size===0)return null;let t=this._series;return this._series=new Map,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set,this._buildPayload(t)}reset(){this._generation++,this._retryAfter.reset(),this._consecutiveFlushFailures=0,this._flushJitter=r8,this._flushTimer.clear(),this._series=new Map,this._flushPromise=null,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set}_capture(t){if(this._instance.isDisabled||this._instance.optedOut)return;let r=this._runBeforeSend(t);if(r===null)return;if(!r.name||typeof r.name!="string")return void this._logger.warn("Dropping metric with empty name");if(typeof r.value!="number"||!Number.isFinite(r.value))return void this._logger.warn(`Dropping metric '${r.name}': value must be a finite number`);if(r.type==="count"&&r.value<0)return void this._logger.warn(`Dropping count '${r.name}': counters are monotonic, value must be >= 0`);let n,i;try{n=r.attributes?{...r.attributes}:void 0,i=q7o(r.type,r.name,r.unit,n)}catch(a){this._logger.warn(`Dropping metric '${r.name}': attributes could not be serialized`,a);return}let o=this._series.get(i);if(!o){if(!this._admitNewSeries())return;o={name:r.name,type:r.type,unit:r.unit,attributes:n,windowStartMs:Date.now()},this._series.set(i,o)}let s=this._typeByName.get(r.name);s===void 0?this._typeByName.set(r.name,r.type):s!==r.type&&!this._typeCollisionWarned.has(r.name)&&(this._typeCollisionWarned.add(r.name),this._logger.warn(`Metric name '${r.name}' is already used as a ${s}; recording it as a ${r.type} too will blend both series in charts. Use a distinct name.`)),this._fold(o,r.value),this._armFlushTimer()}_admitNewSeries(){return this._series.size<this._config.maxSeriesPerFlush?!0:(this._seriesCapWarned||(this._seriesCapWarned=!0,this._logger.warn(`Metric series cap reached (${this._config.maxSeriesPerFlush} per flush window); dropping new series until the next flush. Reduce attribute cardinality.`)),!1)}_fold(t,r){switch(t.type){case"count":t.total=(t.total??0)+r;break;case"gauge":t.last=r;break;case"histogram":{t.hist||(t.hist={count:0,sum:0,min:r,max:r,bucketCounts:new Array(rqt.length+1).fill(0)});let n=t.hist;n.count+=1,n.sum+=r,n.min=Math.min(n.min,r),n.max=Math.max(n.max,r),n.bucketCounts[dnu(r,rqt)]+=1;break}}}_runBeforeSend(t){let r=this._config.beforeSend;if(!r)return t;let n=e_(r)?r:[r],i=t;for(let o of n)try{let s=o(i);if(!s)return this._logger.info("Metric was rejected in beforeSend function"),null;i=s}catch(s){return this._logger.error("Error in beforeSend function for metric:",s),null}return i}_armFlushTimer(){this._flushTimer.pending||this._flushTimer.arm(this._nextFlushDelay())}_nextFlushDelay(){return Math.max(tqt(this._config.flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,3e4),this._retryAfter.remainingMs())}async _doFlush(){if(this._flushTimer.clear(),this._series.size===0)return;let t=this._series;this._series=new Map,this._seriesCapWarned=!1,this._typeByName=new Map,this._typeCollisionWarned=new Set;let r=this._generation,n=await this._instance._sendMetricsBatch(this._buildPayload(t));if(r===this._generation)switch(this._retryAfter.record(n),n.kind==="retry-later"?(this._consecutiveFlushFailures++,this._flushJitter=eqt()):(this._consecutiveFlushFailures=0,this._flushJitter=r8),this._flushTimer.pending&&this._flushTimer.arm(this._nextFlushDelay()),n.kind){case"ok":return;case"retry-later":this._mergeWindowBack(t),this._flushTimer.armNoEarlierThan(this._nextFlushDelay());return;case"too-large":this._logger.warn("Metrics batch exceeded the server size limit and was dropped");return;case"fatal":this._logger.error("Failed to send metrics batch:",n.error);return}}_buildPayload(t){return H7o(this._buildMetrics(t),W7o(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion()),this._instance.getLibraryId(),this._instance.getLibraryVersion())}_buildMetrics(t){let r=G7o(Date.now()),n=new Map;for(let i of t.values()){let o=q7o(i.type,i.name,i.unit,void 0),s=n.get(o);s||(s={name:i.name,...i.unit&&{unit:i.unit}},i.type==="count"?s.sum={aggregationTemporality:mnu,isMonotonic:!0,dataPoints:[]}:i.type==="gauge"?s.gauge={dataPoints:[]}:s.histogram={aggregationTemporality:mnu,dataPoints:[]},n.set(o,s));let a=sre(i.attributes??{},this._logger),c=G7o(i.windowStartMs);if(i.type==="count"){let l={attributes:a,startTimeUnixNano:c,timeUnixNano:r,asDouble:i.total??0};s.sum.dataPoints.push(l)}else if(i.type==="gauge"){let l={attributes:a,timeUnixNano:r,asDouble:i.last??0};s.gauge.dataPoints.push(l)}else if(i.hist){let l={attributes:a,startTimeUnixNano:c,timeUnixNano:r,count:i.hist.count,sum:i.hist.sum,min:i.hist.min,max:i.hist.max,bucketCounts:i.hist.bucketCounts,explicitBounds:rqt};s.histogram.dataPoints.push(l)}}return Array.from(n.values())}_mergeWindowBack(t){for(let[r,n]of t){let i=this._series.get(r);if(!i){this._admitNewSeries()&&this._series.set(r,n);continue}switch(i.windowStartMs=Math.min(i.windowStartMs,n.windowStartMs),i.type){case"count":i.total=(i.total??0)+(n.total??0);break;case"gauge":break;case"histogram":if(n.hist)if(i.hist){i.hist.count+=n.hist.count,i.hist.sum+=n.hist.sum,i.hist.min=Math.min(i.hist.min,n.hist.min),i.hist.max=Math.max(i.hist.max,n.hist.max);for(let o=0;o<i.hist.bucketCounts.length;o++)i.hist.bucketCounts[o]+=n.hist.bucketCounts[o]}else i.hist=n.hist;break}}}};var uch="0".repeat(32),pch="0".repeat(16),fch=/^[0-9a-f]+$/;function dch(e){let t=new Uint8Array(e),r=globalThis.crypto;if(r&&typeof r.getRandomValues=="function")try{return r.getRandomValues(t),t}catch{}for(let n=0;n<e;n++)t[n]=Math.floor(256*Math.random());return t}function mch(e){let t="";for(let r=0;r<e.length;r++)t+=e[r].toString(16).padStart(2,"0");return t}function hnu(e){let t=mch(dch(e));return/[^0]/.test(t)?t:t.slice(0,-1)+"1"}function gnu(){return hnu(16)}function Anu(){return hnu(8)}function ynu(e,t,r){return typeof e=="string"&&e.length===t&&e!==r&&fch.test(e)}function bnu(e){return ynu(e,32,uch)}function Enu(e){return ynu(e,16,pch)}var hch=/^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(-.*)?$/;function Inu(e){let t=vnu(e);return t&&{traceId:t.traceId,spanId:t.spanId,flags:gch(t.flags)}}function gch(e){return 1&parseInt(e,16)?X$r:Ach}function vnu(e){if(typeof e!="string")return;let t=hch.exec(e.trim());if(!t)return;let[,r,n,i,o,s]=t;if(r!=="ff"&&!(r==="00"&&s)&&!(!bnu(n)||!Enu(i)))return{version:r,traceId:n,spanId:i,flags:o}}function Cnu(e){return vnu(e)&&e.trim()}function Y$r(e){return Array.isArray(e)&&e.length===1?e[0]:e}var X$r="01",Ach="00";function xnu(e,t,r=X$r){return`00-${e}-${t}-${r}`}var ych=32,K7o=512;function Z$r(e){if(typeof e!="string")return;let t=e.trim();if(!t||/[^\x20-\x7e\t]/.test(t))return;let r=t.split(",");if(!(r.length>ych)){for(let n of r)if(n.trim()&&!n.includes("="))return;return t.length<=K7o?t:Ech(r)}}var bch=128;function Ech(e){let t=[...e],r=()=>t.reduce((n,i)=>n+i.length,0)+t.length-1;for(let n=t.length-1;n>=0&&r()>K7o;n--)t[n].length>bch&&t.splice(n,1);for(;t.length&&r()>K7o;)t.pop();return t.length?t.join(","):void 0}var Snu="unknown";function NUe(e,t,r,n){return typeof e=="string"&&e.trim()?e.length>r?e.slice(0,r):e:(n?.debug(`${t} must be a non-empty string; using "${Snu}"`),Snu)}function qlt(e){if(e==null)return;let t=e;if(e instanceof Date)try{t=e.getTime()}catch{return}if(!(typeof t!="number"||!Number.isFinite(t))&&!(t<0||t>9223372036854))return t}function wnu(e,t,r){let n=qlt(e);return n===void 0?(e!==void 0&&r?.debug("Span startTime is out of range or not a valid time; using the current time"),t):(t-n>864e5?r?.debug("Span startTime is more than 24 hours in the past; the server will clamp it to receive time and keep the original in $originalTimestamp"):n>t&&r?.debug("Span startTime is in the future; the span may export with a zero duration"),n)}function $$r(e,t){return e<t?t:e}function iqt(e,t,r,n){let i=qlt(e);return i===void 0?(e!==void 0&&n?.debug(`Span ${r} is out of range or not a valid time; using the derived time`),t):i}function ten(){let e=globalThis.performance;return typeof e?.now=="function"?e.now():void 0}var Wlt=class{constructor(t,r,n){this._onEnd=r,this._logger=n,this._events=[],this._ended=!1,this._userAttributeCount=0,this._userEventCount=0,this._droppedAttributes=0,this._droppedEvents=0,this._traceId=t.traceId,this._spanId=t.spanId,this._parentSpanId=t.parentSpanId,this._traceState=t.traceState,this._traceFlags=t.traceFlags??X$r,this._parentIsRemote=t.parentIsRemote??!1,this._name=t.name,this._kind=t.kind,this._autoKeys=new Set(t.autoAttributeKeys),this._maxAttributes=t.maxAttributes,this._maxEvents=t.maxEvents,this._maxAttributesPerEvent=t.maxAttributesPerEvent,this._maxAttributeValueLength=t.maxAttributeValueLength,this._attributes=Object.create(null);for(let i of Object.keys(t.attributes))this._writeAttribute(i,t.attributes[i]);this._startMono=t.backdated?void 0:ten(),this._startTime=t.clockAnchor&&this._startMono!==void 0?t.clockAnchor.wall+(this._startMono-t.clockAnchor.mono):t.startTime,this._startMono!==void 0&&(this._clockAnchor=t.clockAnchor??{wall:this._startTime,mono:this._startMono})}_now(){if(this._startMono!==void 0){let t=ten();if(t!==void 0)return this._startTime+Math.max(0,t-this._startMono)}return Date.now()}_mutable(t){return this._ended?(this._logger?.debug(`Ignoring ${t} on a span that has already ended`),!1):!0}_writeAttribute(t,r){if(VK(r)){t in this._attributes&&!this._autoKeys.has(t)&&this._userAttributeCount--,delete this._attributes[t];return}if(!this._autoKeys.has(t)&&!(t in this._attributes)){if(this._userAttributeCount>=this._maxAttributes)return void this._droppedAttributes++;this._userAttributeCount++}this._attributes[t]=nen(r,this._maxAttributeValueLength)}setAttribute(t,r){return this._mutable("setAttribute")&&this._writeAttribute(t,r),this}setAttributes(t){if(this._mutable("setAttributes")){let r=Pme({},t);for(let n of Object.keys(r))this._writeAttribute(n,r[n])}return this}addEvent(t,r,n){if(this._mutable("addEvent")){if(this._userEventCount>=this._maxEvents)return this._droppedEvents++,this;this._userEventCount++;let i=r&&Bnu(r,this._maxAttributesPerEvent,this._maxAttributeValueLength);this._events.push({name:NUe(t,"Span event name",this._maxAttributeValueLength,this._logger),timestamp:iqt(n,this._now(),"event timestamp",this._logger),...i&&{attributes:i.attributes,...i.dropped&&{droppedAttributesCount:i.dropped}}})}return this}setStatus(t,r){if(this._mutable("setStatus")){if(t!=="ok"&&t!=="error")return this._logger?.debug(`Ignoring unknown span status "${String(t)}"; expected "ok" or "error"`),this;this._status={code:t,...r&&{message:J7o(r,this._maxAttributeValueLength)}}}return this}get statusIsExplicitlyOk(){return this._status?.code==="ok"}recordException(t){if(!this._mutable("recordException"))return this;let{type:r,message:n,stack:i}=Y7o(t);return this.addEvent(Ich,{"exception.type":r,"exception.message":n,...i&&{"exception.stacktrace":i}}),this.setStatus("error",n)}updateName(t){return this._mutable("updateName")&&(this._name=NUe(t,"Span name",this._maxAttributeValueLength,this._logger)),this}traceparent(){return xnu(this._traceId,this._spanId,this._traceFlags)}tracestate(){return this._traceState??null}childContext(){return{traceId:this._traceId,parentSpanId:this._spanId,traceState:this._traceState,traceFlags:this._traceFlags,clockAnchor:this._clockAnchor}}end(t){if(this._ended)return void this._logger?.debug("Ignoring end() on a span that has already ended");this._ended=!0;let r=this._now(),n=iqt(t,r,"end time",this._logger);this._onEnd({traceId:this._traceId,spanId:this._spanId,...this._parentSpanId&&{parentSpanId:this._parentSpanId},...this._traceState&&{traceState:this._traceState},traceFlags:this._traceFlags,parentIsRemote:this._parentIsRemote,name:this._name,kind:this._kind,...this._status&&{status:this._status},attributes:{...this._attributes},events:this._events,startTime:this._startTime,endTime:$$r(n,this._startTime),...this._droppedAttributes&&{droppedAttributesCount:this._droppedAttributes},...this._droppedEvents&&{droppedEventsCount:this._droppedEvents}},this._autoKeys)}},Ich="exception",vch=4294967295;function Cch(e){try{return typeof e=="string"?e:String(e)}catch{return Z5}}function jUe(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?0:Math.min(Math.floor(e),vch)}function xch(e,t){if(!t.length)return Object.keys(e);let r=t.filter(i=>Object.prototype.propertyIsEnumerable.call(e,i)),n=new Set(r);return[...r,...Object.keys(e).filter(i=>!n.has(i))]}function Onu(e,t,r,n,i,o,s=[]){let a=0,c=0,l={};for(let f of xch(e.attributes,s)){let m=e.attributes[f];if(!VK(m)){if(!t.has(f)){if(a>=r){c++;continue}a++}Object.defineProperty(l,f,{value:nen(m,o),enumerable:!0,writable:!0,configurable:!0})}}e.attributes=l,c&&(e.droppedAttributesCount=jUe(e.droppedAttributesCount)+c);let u=0,p=0,d=[];for(let f of e.events){if(u>=n){p++;continue}if(u++,f.attributes){let m=Bnu(f.attributes,i,o);f.attributes=m.attributes,m.dropped&&(f.droppedAttributesCount=jUe(f.droppedAttributesCount)+m.dropped)}d.push(f)}e.events=d,p&&(e.droppedEventsCount=jUe(e.droppedEventsCount)+p),e.status?.message&&(e.status={...e.status,message:J7o(Cch(e.status.message),o)})}var ren=class{setAttribute(){return this}setAttributes(){return this}addEvent(){return this}setStatus(){return this}recordException(){return this}updateName(){return this}traceparent(){return null}tracestate(){return null}end(){}},Pnu=new ren,oqt=class extends ren{constructor(t,r){super(),this._traceparent=t,this._tracestate=r}traceparent(){return this._traceparent}tracestate(){return this._tracestate??null}};function Sch(e){try{let t=e.stack;return typeof t=="string"&&t?{stack:t}:{}}catch{return{}}}function HSe(e,t){let r=Y$r(e?.parent)??t,n=typeof r=="string"||r==null?r:Tnu(r,"traceparent"),i=Cnu(n);if(!i)return Pnu;let o=typeof r=="string"||r==null?e?.tracestate:Tnu(r,"tracestate");return new oqt(i,Z$r(o))}function Tnu(e,t){try{let r=e[t];return typeof r=="function"?r.call(e):void 0}catch{return}}function J7o(e,t){return e.length>t?e.slice(0,t):e}function nen(e,t){return een(e,t,{ancestors:new WeakSet,remainingNodes:1e4},0)}function een(e,t,r,n){if(e===null||typeof e!="object")return VK(e)||r.remainingNodes<=0?e:(r.remainingNodes--,typeof e=="string"?J7o(e,t):e);if(r.ancestors.has(e))return N$r;if(r.remainingNodes<=0||n>=20)return e;r.remainingNodes--,r.ancestors.add(e);try{if(e instanceof Date)return e;let i=wch(e);if(i.selfDescribed)return VK(i.value)?String(i.value):een(i.value,t,r,n+1);if(e_(e)){let a=Math.min(e.length,1e3),c=[];for(let l=0;l<a;l++)try{c.push(een(e[l],t,r,n+1))}catch{c.push(Z5)}return e.length>a&&(c.length=e.length),c}let o={},s=0;for(let a of Object.keys(e)){if(s>=1e3)break;let c;try{c=een(e[a],t,r,n+1)}catch{c=Z5}a&&!VK(c)&&s++,Object.defineProperty(o,a,{value:c,enumerable:!0,writable:!0,configurable:!0})}return o}catch{return e}finally{r.ancestors.delete(e)}}function wch(e){try{let t=e.toJSON;if(typeof t=="function")return{selfDescribed:!0,value:t.call(e)}}catch{}return{selfDescribed:!1}}function Bnu(e,t,r){let n;try{n=Object.keys(e)}catch{return{attributes:{},dropped:0}}let i={},o=0,s=0;for(let a of n){if(o>=t){s++;continue}let c;try{c=nen(e[a],r)}catch{c=Z5}VK(c)||(o++,Object.defineProperty(i,a,{value:c,enumerable:!0,writable:!0,configurable:!0}))}return{attributes:i,dropped:s}}function Dnu(e,t){for(let r of Object.keys(e))e[r]=nen(e[r],t);return e}function sqt(e,t,r){return t===Pnu?r(t):e.with(t,()=>r(t))}function Y7o(e){try{let t=Sch(e);if(qSe(e))return{type:e.name||"Error",message:e.message||"",...t};if(typeof e=="string")return{type:"string",message:e};if(e&&typeof e=="object"){let r=e;if(typeof r.message=="string")return{type:typeof r.name=="string"?r.name:"Object",message:r.message,...t}}return{type:typeof e,message:String(e)}}catch{return{type:typeof e,message:""}}}var X7o={internal:1,server:2,client:3,producer:4,consumer:5},Tch={ok:1,error:2},Och=1,Pch=256,Bch=512;function Dch(e){let t=parseInt(e.traceFlags,16);return(Number.isFinite(t)?255&t:Och)|Pch|(e.parentIsRemote?Bch:0)}function ien(e){if(typeof e=="string")return ire(e);try{return ire(String(e))}catch{return Z5}}function Rch(e){return e&&Object.prototype.hasOwnProperty.call(X7o,e)?X7o[e]:X7o.internal}function Z7o(e){let t=Math.floor(e),r=Math.round((e-t)*1e6);return r>=1e6&&(t+=1,r=0),String(t)+String(r).padStart(6,"0")}function kch(e,t){let r={name:ien(e.name),timeUnixNano:Z7o(e.timestamp)};if(e.attributes){let i=sre(e.attributes,t);i.length&&(r.attributes=i)}let n=jUe(e.droppedAttributesCount);return n&&(r.droppedAttributesCount=n),r}function Rnu(e,t){let r={traceId:e.traceId,spanId:e.spanId,name:ien(e.name),kind:Rch(e.kind),startTimeUnixNano:Z7o(e.startTime),endTimeUnixNano:Z7o(e.endTime),flags:Dch(e)};e.parentSpanId&&(r.parentSpanId=e.parentSpanId),e.traceState&&(r.traceState=ien(e.traceState));let n=sre(e.attributes,t);n.length&&(r.attributes=n),e.events.length&&(r.events=e.events.map(s=>kch(s,t)));let i=jUe(e.droppedAttributesCount);i&&(r.droppedAttributesCount=i);let o=jUe(e.droppedEventsCount);return o&&(r.droppedEventsCount=o),e.status&&(r.status={code:Tch[e.status.code],...e.status.message&&{message:ien(e.status.message)}}),r}function knu(e,t,r){return Z9t(e,t,r)}function Fnu(e,t,r,n,i){return{resourceSpans:[{resource:{attributes:$9t(t,i)},scopeSpans:[{scope:{name:r,version:n},spans:e}]}]}}var Nnu=8;function oen(){return ten()??Date.now()}function $7o(e){try{return e instanceof Wlt}catch{return!1}}function jnu(e,t){let r=Inu(e);if(r)return{traceId:r.traceId,parentSpanId:r.spanId,traceState:Z$r(t),traceFlags:r.flags,isRemote:!0}}function Fch(e){try{return typeof e.traceparent=="function"}catch{return!1}}function Nch(e){return!!e.attributes&&typeof e.attributes=="object"&&!Array.isArray(e.attributes)&&Array.isArray(e.events)&&e.name!==void 0&&e.kind!==void 0&&e.startTime!==void 0&&e.endTime!==void 0}function sen(e,t,r){e[t]!==r&&(e[t]=r)}function jch(e,t){try{let r=Object.getOwnPropertyDescriptors(e);for(let n of["traceId","spanId","parentSpanId","traceState"])r[n]={value:t[n],enumerable:!0,writable:!0,configurable:!0};return Object.create(Object.getPrototypeOf(e),r)}catch{return e}}var aqt=class{constructor(t,r,n,i,o,s){this._instance=t,this._config=r,this._logger=n,this._getContext=i,this._contextManager=o,this._onSpanQueued=s,this._queue=[],this._flushTimer=new FUe(()=>this._flushInBackground()),this._flushPromise=null,this._droppedSinceWarning=0,this._lastDropWarningAt=0,this._dropReasons=new Set,this._consecutiveFlushFailures=0,this._flushJitter=r8,this._retryAfter=new RUe,this._headBatchFailures=0,this._headBatchSize=0,this._headBatchChargeableAt=0,this._generation=0,this._liveSpans=new Map,this._maxExportBatchSize=r.maxExportBatchSize}startSpan(t,r){if(this._instance.isDisabled||this._instance.optedOut)return HSe(r,this._contextManager.active());let n=Y$r(r?.parent);if(n&&typeof n!="string"&&!$7o(n)){if(Fch(n))return this._logger.debug("Span parent is not a span from this SDK; returning an inert span"),HSe(r,this._contextManager.active());this._logger.debug("Ignoring an unusable span parent")}let i=this._resolveParent(n,r);if(this._liveSpans.size>=this._config.maxLiveSpans&&this._evictAgedSpans(),this._liveSpans.size>=this._config.maxLiveSpans)return this._recordDrop(1,`the live-span limit (${this._config.maxLiveSpans}) was reached \u2014 spans are being started and never ended`),HSe(r,this._contextManager.active());let o=Date.now(),s=wnu(r?.startTime,o,this._logger),a=Anu();this._liveSpans.set(a,oen());let c=this._autoContextAttributes();return new Wlt({traceId:i?.traceId??gnu(),spanId:a,parentSpanId:i?.parentSpanId,traceState:i?.traceState,traceFlags:i?.traceFlags,parentIsRemote:i?.isRemote,name:NUe(t,"Span name",this._config.maxAttributeValueLength,this._logger),kind:r?.kind??"internal",attributes:Pme({...c},r?.attributes),autoAttributeKeys:Object.keys(c),maxAttributes:this._config.maxAttributesPerSpan,maxEvents:this._config.maxEventsPerSpan,maxAttributesPerEvent:this._config.maxAttributesPerEvent,maxAttributeValueLength:this._config.maxAttributeValueLength,startTime:s,backdated:s!==o,clockAnchor:qlt(r?.startTime)===void 0?i?.clockAnchor:void 0},(l,u)=>this._onSpanEnd(l,u),this._logger)}withSpan(t,r,n){let i=typeof r=="function"?void 0:r,o=typeof r=="function"?r:n,s=this.startSpan(t,i);try{let a=sqt(this._contextManager,s,o);return Fru(a)?a.then(c=>(s.end(),c),c=>{throw this._recordCallbackError(s,c),s.end(),c}):(s.end(),a)}catch(a){throw this._recordCallbackError(s,a),s.end(),a}}getActiveSpan(){return this._contextManager.active()??null}get throttled(){return this._retryAfter.isOpen()}async flush(){for(;;)if(!this._queue.length||!await(this._flushPromise??this._startFlush()))return}_startFlush(){this._flushTimer.clear();let t=this._generation,r=Promise.resolve().then(()=>t===this._generation?this._flushInner():0).finally(()=>{this._flushPromise===r&&(this._flushPromise=null),this._armFlushTimerIfQueuedNoEarlierThan()});return this._flushPromise=r,r}reset(){this._flushTimer.clear(),this._queue.length&&this._logger.critical(`Discarding ${this._queue.length} span(s) that were still queued when tracing was shut down. Raise the shutdown timeout or flush earlier if they matter.`),this._queue=[],this._liveSpans.clear(),this._flushPromise=null,this._generation++,this._maxExportBatchSize=this._config.maxExportBatchSize,this._droppedSinceWarning=0,this._dropReasons.clear(),this._lastDropWarningAt=0,this._consecutiveFlushFailures=0,this._flushJitter=r8,this._retryAfter.reset(),this._resetHeadBatchBudget()}_resetHeadBatchBudget(){this._headBatchFailures=0,this._headBatchChargeableAt=0}_resolveParent(t,r){if(typeof t=="string"){let i=jnu(t,r?.tracestate);return i||this._logger.debug("Ignoring malformed traceparent; starting a new trace"),i}if($7o(t))return t.childContext();let n=this._contextManager.active();if($7o(n))return n.childContext();if(n instanceof oqt)return jnu(n.traceparent(),n.tracestate()??void 0)}_autoContextAttributes(){let t;try{t=this._getContext()}catch(n){return this._logger.debug("Failed to read tracing context; span will carry no PostHog attributes",n),{}}let r={};return t.distinctId&&(r.posthogDistinctId=t.distinctId),t.sessionId&&(r.sessionId=t.sessionId),t.currentUrl&&(r["url.full"]=t.currentUrl),t.screenName&&(r["screen.name"]=t.screenName),t.appState&&(r["app.state"]=t.appState),r}_recordCallbackError(t,r){if(!(t instanceof Wlt))return;let{type:n,message:i,stack:o}=Y7o(r);t.addEvent("exception",{"exception.type":n,"exception.message":i,...o&&{"exception.stacktrace":o}}),t.statusIsExplicitlyOk||t.setStatus("error",i)}_evictAgedSpans(){let t=oen()-this._config.maxSpanAgeMs,r=0;for(let[n,i]of this._liveSpans){if(i>t)break;this._liveSpans.delete(n),r++}r&&this._recordDrop(r,`they were still live after ${this._config.maxSpanAgeMs}ms`)}_onSpanEnd(t,r){if(!this._liveSpans.delete(t.spanId))return;if(this._instance.isDisabled||this._instance.optedOut)return void this._recordDrop(1,"the user has opted out");let n=this._runBeforeSpanSend(t,r);if(n){if(this._reportLimitDrops(n),this._queue.length>=this._config.maxQueueSize)return void this._recordDrop(1,`the queue is full (${this._config.maxQueueSize}) \u2014 raise the flush frequency or reduce span volume`);this._queue.push(n);try{this._onSpanQueued?.()}catch(i){this._logger.debug("Span queue notification failed",i)}!(this._queue.length>=this._maxExportBatchSize)||this._consecutiveFlushFailures||this._retryAfter.isOpen()?this._armFlushTimerIfQueued():this._flushInBackground()}}_reportLimitDrops(t){let r=t.droppedAttributesCount??0,n=t.droppedEventsCount??0,i=0;for(let o of t.events)i+=o.droppedAttributesCount??0;(r||n||i)&&this._logger.debug(`Span limits discarded data from "${t.name}": ${r} attributes, ${n} events, ${i} event attributes`)}_runBeforeSpanSend(t,r){if(!this._config.beforeSpanSend.length)return t;let n={traceId:t.traceId,spanId:t.spanId,parentSpanId:t.parentSpanId,traceState:t.traceState},i={startTime:t.startTime,endTime:t.endTime},o={attributes:t.droppedAttributesCount,events:t.droppedEventsCount},s=Object.keys(t.attributes),a={traceFlags:t.traceFlags,parentIsRemote:t.parentIsRemote},c=t.status&&{...t.status},l=t,u=t;try{for(let f of this._config.beforeSpanSend){let m=f(l);if(!m)return this._recordDrop(1,"beforeSpanSend dropped it"),null;l=this._keepSpanIdentity(m,n)}if(u={traceId:n.traceId,spanId:n.spanId,parentSpanId:n.parentSpanId,traceState:n.traceState,name:l.name,kind:l.kind,status:l.status,attributes:l.attributes,events:l.events,startTime:l.startTime,endTime:l.endTime,traceFlags:a.traceFlags,parentIsRemote:a.parentIsRemote,droppedAttributesCount:o.attributes,droppedEventsCount:o.events},!Nch(u))return this._logger.debug("beforeSpanSend did not return a span record; dropping the span"),this._recordDrop(1,"beforeSpanSend returned an unusable record"),null;u.name=NUe(u.name,"Span name",this._config.maxAttributeValueLength,this._logger),u.status&&u.status.code!=="ok"&&u.status.code!=="error"&&(this._logger.debug("beforeSpanSend set an unknown span status; keeping the original"),u.status=c),u.startTime=qlt(u.startTime)??i.startTime,u.endTime=$$r(qlt(u.endTime)??i.endTime,u.startTime);let d=[];for(let f of u.events)try{d.push({...f,name:NUe(f.name,"Span event name",this._config.maxAttributeValueLength,this._logger),timestamp:iqt(f.timestamp,u.startTime,"event timestamp",this._logger)})}catch{this._logger.debug("beforeSpanSend left an unreadable span event; dropping it")}return u.events=d,Onu(u,r,this._config.maxAttributesPerSpan,this._config.maxEventsPerSpan,this._config.maxAttributesPerEvent,this._config.maxAttributeValueLength,s),u}catch(p){return this._logger.debug("beforeSpanSend failed; dropping the span rather than exporting it unscrubbed",p),this._recordDrop(1,"beforeSpanSend failed"),null}}_keepSpanIdentity(t,r){(t.traceId!==r.traceId||t.spanId!==r.spanId||t.parentSpanId!==r.parentSpanId)&&this._logger.debug("beforeSpanSend changed a span identity field; keeping the original ids");try{sen(t,"traceId",r.traceId),sen(t,"spanId",r.spanId),sen(t,"parentSpanId",r.parentSpanId),sen(t,"traceState",r.traceState)}catch{return jch(t,r)}return t}_recordDrop(t,r){this._droppedSinceWarning+=t,this._dropReasons.add(r),Date.now()-this._lastDropWarningAt>=this._config.flushIntervalMs&&this._warnAboutDrops()}_warnAboutDrops(){this._droppedSinceWarning&&(this._lastDropWarningAt=Date.now(),this._logger.warn(`Dropping ${this._droppedSinceWarning} span(s): ${[...this._dropReasons].join("; ")}`),this._droppedSinceWarning=0,this._dropReasons.clear())}_encodeBatch(t){let r=[];for(let n of t)try{r.push(Rnu(n,this._logger))}catch(i){this._logger.debug("Failed to encode a span; dropping it",i),this._recordDrop(1,"its attributes could not be encoded")}return r}_discardQueueIfConsentWithdrawn(){if(!this._instance.isDisabled&&!this._instance.optedOut)return 0;let t=this._queue.length;return this._queue=[],this._resetHeadBatchBudget(),this._recordDrop(t,"the user has opted out"),this._warnAboutDrops(),t}async _flushInner(){if(!this._queue.length)return 0;let t=this._discardQueueIfConsentWithdrawn();if(t)return t;let r=Dnu(knu(this._config,this._instance.getLibraryId(),this._instance.getLibraryVersion()),this._config.maxAttributeValueLength),n=this._instance.getLibraryId(),i=this._instance.getLibraryVersion(),o=this._queue.length,s=0,a=1/0,c=this._generation;try{for(;o>0&&this._queue.length>0;){let l=this._discardQueueIfConsentWithdrawn();if(l)return s+l;let u=this._headBatchFailures>0?Math.min(this._maxExportBatchSize,this._headBatchSize):this._maxExportBatchSize,p=Math.max(1,Math.min(u,a,o,this._queue.length)),d=this._queue.slice(0,p),f=this._encodeBatch(d);if(!f.length){this._queue.splice(0,p),o-=p,s+=p,this._resetHeadBatchBudget();continue}let m=oen()>=this._headBatchChargeableAt&&!this._retryAfter.isOpen(),g=await this._instance._sendTracesBatch(Fnu(f,r,n,i,this._logger));if(c!==this._generation)break;if(this._retryAfter.record(g),g.kind==="ok"){this._consecutiveFlushFailures=0,this._flushJitter=r8,this._resetHeadBatchBudget(),this._queue.splice(0,p),o-=p,s+=p,this._maxExportBatchSize<this._config.maxExportBatchSize&&this._maxExportBatchSize++;continue}if(g.kind==="too-large"){if(p===1){this._queue.splice(0,1),o-=1,s+=1,this._recordDrop(1,"it is too large for the ingestion endpoint"),this._consecutiveFlushFailures=0,this._flushJitter=r8,this._resetHeadBatchBudget();continue}let A=Math.max(1,Math.floor(p/2));g.measuredLocally?a=A:this._maxExportBatchSize=A,this._resetHeadBatchBudget(),this._logger.debug(`Batch too large; retrying the same spans in batches of ${A}`);continue}if(g.kind==="retry-later"){if(this._consecutiveFlushFailures++,this._flushJitter=eqt(),this._headBatchSize=p,m&&(this._headBatchFailures++,this._headBatchChargeableAt=oen()+this._nextFlushDelay()),this._headBatchFailures<Nnu)return this._logger.debug("Span export failed; retrying on the next flush",g.error),s;if(this._queue.splice(0,p),o-=p,s+=p,this._consecutiveFlushFailures=0,this._flushJitter=r8,this._resetHeadBatchBudget(),this._recordDrop(p,`the ingestion endpoint failed ${Nnu} times in a row`),this._retryAfter.isOpen())return s;continue}this._logger.debug("Dropping a span batch the ingestion endpoint rejected",g.error),this._queue.splice(0,p),o-=p,s+=p,this._consecutiveFlushFailures=0,this._flushJitter=r8,this._resetHeadBatchBudget(),this._recordDrop(p,"the ingestion endpoint rejected the batch")}return s}finally{this._warnAboutDrops()}}_flushInBackground(){this._backgroundFlush||(this._backgroundFlush=this.flush().catch(t=>{this._logger.debug("Background span flush failed",t)}).finally(()=>{this._backgroundFlush=void 0,this._armFlushTimerIfQueuedNoEarlierThan()}))}_armFlushTimerIfQueued(){this._flushTimer.pending||!this._queue.length||this._flushTimer.arm(this._nextFlushDelay())}_armFlushTimerIfQueuedNoEarlierThan(){this._queue.length&&this._flushTimer.armNoEarlierThan(this._nextFlushDelay())}_nextFlushDelay(){return Math.max(tqt(this._config.flushIntervalMs,this._consecutiveFlushFailures,this._flushJitter,3e4),this._retryAfter.remainingMs())}};var cqt=class{active(){return this._active}with(t,r){let n=this._active;this._active=t;try{return r()}finally{this._active=n}}};var zch=5e3,Qch=512,Mch=2048,Lch=128,_ch=128,Uch=128,Vch=8192,Gch=1e4,qch=36e5;function KSe(e,t){return typeof e=="number"&&Number.isInteger(e)&&e>=1?e:t}var znu=["service.name","service.version","deployment.environment"];function Wch(e){if(!(!e||typeof e!="object"||Array.isArray(e)))try{if(znu.every(r=>!(r in e)||typeof e[r]=="string"))return e;let t={...e};for(let r of znu)r in t&&typeof t[r]!="string"&&delete t[r];return t}catch{return}}function Hch(e,t){if(!e)return[];let r=[e].flat().filter(i=>!!i),n=r.filter(i=>typeof i=="function");return n.length!==r.length&&t?.critical(`beforeSpanSend: ignoring ${r.length-n.length} of ${r.length} entries that are not functions. Spans export without them, so whatever they were redacting is not redacted.`),n}function eHo(e,t,r){let n=Pme({...t},Wch(e?.resourceAttributes)),i=KSe(e?.maxExportBatchSize,Qch);return{serviceName:n?.["service.name"]??e?.serviceName,serviceVersion:n?.["service.version"]??e?.serviceVersion,environment:n?.["deployment.environment"]??e?.environment,resourceAttributes:n,beforeSpanSend:Hch(e?.beforeSpanSend,r),maxAttributesPerSpan:KSe(e?.maxAttributesPerSpan,Lch),maxEventsPerSpan:KSe(e?.maxEventsPerSpan,_ch),maxAttributesPerEvent:Uch,maxAttributeValueLength:KSe(e?.maxAttributeValueLength,Vch),flushIntervalMs:KSe(e?.flushIntervalMs,zch),maxExportBatchSize:i,maxQueueSize:Math.max(KSe(e?.maxQueueSize,Mch),i),maxLiveSpans:KSe(e?.maxLiveSpans,Gch),maxSpanAgeMs:KSe(e?.maxSpanAgeMs,qch)}}var tHo=require("fs"),Lnu=require("fs/promises"),nHo=require("path"),_nu=require("readline"),aen=new ST.ReduceableCache(25),lqt=new ST.ReduceableCache(20),iHo=7,Kch=1e3,Jch=1e4,rHo=10485760;async function Unu(e,t=Lnu.open,r){let n={},i;try{i=process.cwd()}catch{}for(let a=e.length-1;a>=0;a--){let c=e[a],l=c?.filename;if(!c||typeof l!="string"||typeof c.lineno!="number"||elh(l)||tlh(c)||!(0,nHo.isAbsolute)(l)&&i===void 0)continue;n[l]||(n[l]=[]),n[l].push(c.lineno)}let o=Object.keys(n);if(o.length==0)return e;let s=[];for(let a of o){let c=Vnu(a,i);if(c===void 0||lqt.get(c))continue;let l=n[a];if(!l)continue;l.sort((d,f)=>d-f);let u=nlh(l);if(u.every(d=>rlh(c,d)))continue;let p=ilh(aen,c,{});s.push(Xch(a,u,p,c,t,r))}return await Promise.all(s).catch(()=>{}),e&&e.length>0&&Zch(e,aen,i),aen.reduce(),e}async function Ych(e,t,r){let n,i=!1;try{n=await t(e,tHo.constants.O_RDONLY|tHo.constants.O_NONBLOCK);let o=await n.stat();return o.isFile()?o.size>rHo?void r?.debug(`Skipping source context for oversized file ${e}: ${o.size} bytes exceeds ${rHo}`):(i=!0,n):void 0}catch{return}finally{n&&!i&&await n.close().catch(()=>{})}}async function Xch(e,t,r,n,i,o){let s=await Ych(e,i,o);if(s===void 0)return void lqt.set(n,1);let a=s;return new Promise(c=>{let l=!1;function u(C){l||(l=!0,C?.destroy(),a.close().then(c,c))}let p;try{p=a.createReadStream({autoClose:!1,start:0,end:rHo-1})}catch{lqt.set(n,1),u();return}let d;try{d=(0,_nu.createInterface)({input:p})}catch{lqt.set(n,1),u(p);return}let f=0,m=0,g=t[m];if(g===void 0)return void u(p);let A=g[0],b=g[1];function I(){lqt.set(n,1),d.close(),d.removeAllListeners(),u(p)}p.on("error",I),d.on("error",I),d.on("close",()=>u(p)),d.on("line",C=>{if(f++,!(f<A)&&(r[f]=olh(C,0),f>=b)){if(m===t.length-1){d.close(),d.removeAllListeners();return}m++;let x=t[m];if(x===void 0){d.close(),d.removeAllListeners();return}A=x[0],b=x[1]}})})}function Zch(e,t,r){for(let n of e)if(n.filename&&n.context_line===void 0&&typeof n.lineno=="number"){let i=Vnu(n.filename,r),o=i===void 0?void 0:t.get(i);if(o===void 0)continue;$ch(n.lineno,n,o)}}function $ch(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let i=Gnu(e);i<e;i++){let o=r[i];if(o===void 0)return void Qnu(t);t.pre_context.push(o)}if(r[e]===void 0)return void Qnu(t);t.context_line=r[e];let n=qnu(e);t.post_context=[];for(let i=e+1;i<=n;i++){let o=r[i];if(o===void 0)break;t.post_context.push(o)}}function Qnu(e){delete e.pre_context,delete e.context_line,delete e.post_context}function elh(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function tlh(e){return e.lineno!==void 0&&e.lineno>Jch||e.colno!==void 0&&e.colno>Kch}function Vnu(e,t){return(0,nHo.isAbsolute)(e)?JSON.stringify([null,e]):t===void 0?void 0:JSON.stringify([t,e])}function rlh(e,t){let r=aen.get(e);if(r===void 0)return!1;for(let n=t[0];n<=t[1];n++)if(r[n]===void 0)return!1;return!0}function nlh(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let n=Mnu(r),i=[];for(;;){if(t===e.length-1){i.push(n);break}let o=e[t+1];if(typeof o!="number")break;o<=n[1]?n[1]=o+iHo:(i.push(n),n=Mnu(o)),t++}return i}function Mnu(e){return[Gnu(e),qnu(e)]}function Gnu(e){return Math.max(1,e-iHo)}function qnu(e){return e+iHo}function ilh(e,t,r){let n=e.get(t);return n===void 0?(e.set(t,r),r):n}function olh(e,t){let r=e,n=r.length;if(n<=150)return r;t>n&&(t=n);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,n);return o>n-5&&(o=n),o===n&&(i=Math.max(o-140,0)),r=r.slice(i,o),i>0&&(r=`...${r}`),o<n&&(r+="..."),r}var Hlt=require("path");function Wnu(e=process.cwd()){let t=Hlt.sep==="\\",r=i=>t?i.replace(/\\/g,"/"):i,n=r(e);return async i=>{for(let o of i)!o.filename||o.filename.startsWith("node:")||o.filename.startsWith("data:")||(0,Hlt.isAbsolute)(o.filename)&&(o.filename=r((0,Hlt.relative)(n,r(o.filename))));return i}}var Hnu="5.55.0";var Dme={ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"};var JSe=class e{constructor(t){this._host=t.host,this._distinctId=t.distinctId,this._groups=t.groups,this._disableGeoip=t.disableGeoip,this._flags=t.flags,this._requestId=t.requestId,this._evaluatedAt=t.evaluatedAt,this._flagDefinitionsLoadedAt=t.flagDefinitionsLoadedAt,this._errorsWhileComputing=t.errorsWhileComputing??!1,this._quotaLimited=t.quotaLimited??!1,this._accessed=t.accessed??new Set,this._isSlice=t.isSlice??!1}isEnabled(t,r={}){let n=this._flags[t];return this._recordAccess(t),n?.enabled??r.defaultValue??!1}getFlag(t){let r=this._flags[t];if(this._recordAccess(t),!!r)return r.enabled?r.variant??!0:!1}getFlagPayload(t){return this._flags[t]?.payload}onlyAccessed(){let t={};for(let r of this._accessed){let n=this._flags[r];n&&(t[r]=n)}return this._cloneWith(t)}only(t){let r={},n=[];for(let i of t){let o=this._flags[i];o?r[i]=o:n.push(i)}return n.length>0&&this._host.logWarning(`FeatureFlagEvaluations.only() was called with flag keys that are not in the evaluation set and will be dropped: ${n.join(", ")}`),this._cloneWith(r)}get keys(){return Object.keys(this._flags)}_getEventProperties(){let t={},r=[];for(let[n,i]of Object.entries(this._flags)){let o=i.enabled===!1?!1:i.variant??!0;t[`$feature/${n}`]=o,i.enabled&&r.push(n)}return r.length>0&&(r.sort(),t.$active_feature_flags=r),t}_cloneWith(t){return new e({host:this._host,distinctId:this._distinctId,groups:this._groups,disableGeoip:this._disableGeoip,flags:t,requestId:this._requestId,evaluatedAt:this._evaluatedAt,flagDefinitionsLoadedAt:this._flagDefinitionsLoadedAt,errorsWhileComputing:this._errorsWhileComputing,quotaLimited:this._quotaLimited,accessed:new Set(this._accessed),isSlice:!0})}_recordAccess(t){if(this._accessed.add(t),this._distinctId===""||this._isSlice&&!(t in this._flags))return;let r=this._flags[t],n=r===void 0?void 0:r.enabled===!1?!1:r.variant??!0,i={$feature_flag:t,$feature_flag_response:n,$feature_flag_id:r?.id,$feature_flag_version:r?.version,$feature_flag_reason:r?.reason,locally_evaluated:r?.locallyEvaluated??!1,[`$feature/${t}`]:n,$feature_flag_request_id:this._requestId,$feature_flag_evaluated_at:r?.locallyEvaluated?Date.now():this._evaluatedAt};r?.hasExperiment!==void 0&&(i.$feature_flag_has_experiment=r.hasExperiment),r?.locallyEvaluated&&this._flagDefinitionsLoadedAt!==void 0&&(i.$feature_flag_definitions_loaded_at=this._flagDefinitionsLoadedAt);let o=[];this._errorsWhileComputing&&o.push(Dme.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(Dme.QUOTA_LIMITED),r===void 0&&o.push(Dme.FLAG_MISSING),o.length>0&&(i.$feature_flag_error=o.join(",")),this._host.captureFlagCalledEventIfNeeded({distinctId:this._distinctId,key:t,response:n,groups:this._groups,disableGeoip:this._disableGeoip,properties:i})}};var slh=6e4;function Knu(e){return e==="client"||e==="server"?e:"all"}function alh(e,t){return e===t||e==="all"||t==="all"}var Klt=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}};function clh(e,t){e.name=t.name,Error.captureStackTrace(e,t),Object.setPrototypeOf(e,t.prototype)}var are=class e extends Error{constructor(t){super(t),clh(this,e)}},cen=class{constructor({pollingInterval:t,personalApiKey:r,projectApiKey:n,timeout:i,host:o,customHeaders:s,...a}){this.debugMode=!1,this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.pollerStopped=!1,this.filteredOutFlagKeys=new Set,this.pollingInterval=t,this.personalApiKey=r,this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={},this.loadedSuccessfullyOnce=!1,this.timeout=i,this.projectApiKey=n,this.host=o,this.poller=void 0,this.fetch=a.fetch||fetch,this.onError=a.onError,this.customHeaders=s,this.onLoad=a.onLoad,this.onMinimalFlagCalledEvents=a.onMinimalFlagCalledEvents,this.cacheProvider=a.cacheProvider,this.strictLocalEvaluation=a.strictLocalEvaluation??!1,this.evaluationContexts=a.evaluationContexts,this.loadFeatureFlags()}debug(t=!0){this.debugMode=t}logMsgIfDebug(t){this.debugMode&&t()}withEvaluationSnapshot(t){return t.definitions?t:{...t,evaluationCache:{},definitions:{featureFlagsByKey:this.featureFlagsByKey,groupTypeMapping:this.groupTypeMapping,cohorts:this.cohorts,filteredOutFlagKeys:this.filteredOutFlagKeys,propertyMatchingVersion:this.propertyMatchingVersion}}}createEvaluationContext(t,r={},n={},i={},o={}){return{distinctId:t,groups:r,personProperties:n,groupProperties:i,evaluationCache:o}}async getFeatureFlag(t,r,n={},i={},o={}){await this.loadFeatureFlags();let s,a;if(!this.loadedSuccessfullyOnce)return s;if(a=this.featureFlagsByKey[t],a!==void 0){let c=this.createEvaluationContext(r,n,i,o);try{s=(await this.computeFlagAndPayloadLocally(a,c)).value,this.logMsgIfDebug(()=>console.debug(`Successfully computed flag locally: ${t} -> ${s}`))}catch(l){l instanceof are||l instanceof Ul?this.logMsgIfDebug(()=>console.debug(`${l.name} when computing flag locally: ${t}: ${l.message}`)):l instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${t}: ${l}`))}}return s}async getAllFlagsAndPayloads(t,r){await this.loadFeatureFlags();let n={},i={},o=this.featureFlags.length==0,s=r?r.map(c=>this.featureFlagsByKey[c]).filter(Boolean):this.featureFlags,a=this.withEvaluationSnapshot({...t,definitions:void 0});return await Promise.all(s.map(async c=>{try{let{value:l,payload:u}=await this.computeFlagAndPayloadLocally(c,a,{skipLoadCheck:!0});n[c.key]=l,u&&(i[c.key]=u)}catch(l){l instanceof are||l instanceof Ul?this.logMsgIfDebug(()=>console.debug(`${l.name} when computing flag locally: ${c.key}: ${l.message}`)):l instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${c.key}: ${l}`)),o=!0}})),{response:n,payloads:i,fallbackToFlags:o}}async computeFlagAndPayloadLocally(t,r,n={}){let{matchValue:i,skipLoadCheck:o=!1}=n;if(this.loadedSuccessfullyOnce&&(r=this.withEvaluationSnapshot(r)),o||await this.loadFeatureFlags(),!this.loadedSuccessfullyOnce)return{value:!1,payload:null};r=this.withEvaluationSnapshot(r),t=r.definitions.featureFlagsByKey[t.key]??t;let s;s=i!==void 0?i:await this.computeFlagValueLocally(t,r);let a=M7o(t.filters?.payloads,s);return{value:s,payload:a}}async computeFlagValueLocally(t,r){let{distinctId:n,groups:i,personProperties:o,groupProperties:s}=r;if(!t.active)return!1;if(t.ensure_experience_continuity)throw new Ul("Flag has experience continuity enabled");let c=(t.filters||{}).aggregation_group_type_index;if(c!=null){let l=r.definitions.groupTypeMapping[String(c)];if(!l)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Unknown group type index ${c} for feature flag ${t.key}`)),new Ul("Flag has unknown group type index");if(!(l in i))return this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute group feature flag: ${t.key} without group names passed in`)),!1;t.bucketing_identifier==="device_id"&&(o?.$device_id===void 0||o?.$device_id===null||o?.$device_id==="")&&this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Ignoring bucketing_identifier for group flag: ${t.key}`));let u=s[l];return await this.matchFeatureFlagProperties(t,i[l],u,r)}{let l=this.getBucketingValueForFlag(t,n,o);if(l===void 0)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute feature flag: ${t.key} without $device_id, falling back to server evaluation`)),new Ul(`Can't compute feature flag: ${t.key} without $device_id`);return await this.matchFeatureFlagProperties(t,l,o,r)}}getBucketingValueForFlag(t,r,n){if(t.filters?.aggregation_group_type_index!=null)return r;if(t.bucketing_identifier==="device_id"){let i=n?.$device_id;return i==null||i===""?void 0:i}return r}async evaluateFlagDependency(t,r,n){let{evaluationCache:i}=n,o=t.key;if(!n.definitions.featureFlagsByKey)throw new Ul("Feature flags not available for dependency evaluation");if(!("dependency_chain"in t))throw new Ul(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let s=t.dependency_chain;if(!Array.isArray(s))throw new Ul(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof s})`);if(s.length===0)throw new Ul(`Circular dependency detected for flag '${o}' (empty dependency chain)`);for(let c of s){if(!(c in i)){let u=n.definitions.featureFlagsByKey[c];if(u)if(u.active)try{let p=await this.computeFlagValueLocally(u,n);i[c]=p}catch(p){throw new Ul(`Error evaluating flag dependency '${c}' for flag '${o}': ${p}`)}else i[c]=!1;else if(n.definitions.filteredOutFlagKeys.has(c))i[c]=!1;else throw new Ul(`Missing flag dependency '${c}' for flag '${o}'`)}if(i[c]==null)throw new Ul(`Dependency '${c}' could not be evaluated`)}let a=i[o];return this.flagEvaluatesToExpectedValue(t.value,a)}flagEvaluatesToExpectedValue(t,r){return typeof t=="boolean"?t===r||typeof r=="string"&&r!==""&&t===!0:typeof t=="string"?r===t:!1}async matchFeatureFlagProperties(t,r,n,i){i=this.withEvaluationSnapshot(i);let o=t.filters||{},s=await z7o(o.holdout,r);if(s!==void 0)return s;let a=o.groups||[],c=o.aggregation_group_type_index,l=o.early_exit??!1,{groups:u,groupProperties:p}=i,d=!1,f;for(let m of a)try{let g=m.aggregation_group_type_index!==void 0?m.aggregation_group_type_index:c,A=n,b=r;if(g!==c&&g!=null){let C=i.definitions.groupTypeMapping[String(g)];if(!C||!(C in u)){this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Skipping group condition for flag '${t.key}': group type index ${g} not available`));continue}if(!(C in p)){d=!0;continue}A=p[C],b=u[C]}let I=await this.isConditionMatch(t,b,m,A,i);if(I==="match"){let C=m.variant,x=o.multivariate?.variants||[];f=C&&x.some(S=>S.key===C)?C:await this.getMatchingVariant(t,b)||!0;break}if(l&&I==="out_of_rollout_bound"){if(d)break;return!1}}catch(g){if(g instanceof are)throw g;if(g instanceof Ul)d=!0;else throw g}if(f!==void 0)return f;if(d)throw new Ul("Can't determine if feature flag is enabled or not with given properties");return!1}async isConditionMatch(t,r,n,i,o){o=this.withEvaluationSnapshot(o);let s=o.definitions,a=n.rollout_percentage,c=l=>{this.logMsgIfDebug(()=>console.warn(l))};if((n.properties||[]).length>0){for(let l of n.properties){let u=l.type,p=!1;if(u==="cohort"){let d=await Ynu(l,i,s.cohorts,this.debugMode,f=>this.evaluateFlagDependency(f,i,o),s.propertyMatchingVersion);p=l.operator==="not_in"?!d:d}else p=u==="flag"?await this.evaluateFlagDependency(l,i,o):Jnu(l,i,c,s.propertyMatchingVersion);if(!p)return"no_match"}if(a==null)return"match"}return a!=null&&await Y9t(t.key,r)>a/100?"out_of_rollout_bound":"match"}async getMatchingVariant(t,r){return Q7o(t.key,r,t.filters?.multivariate?.variants||[])}variantLookupTable(t){return H$r(t.filters?.multivariate?.variants||[])}filterFlagsByEvaluationContexts(t){if(!this.evaluationContexts||this.evaluationContexts.length===0)return t;let r=new Set(this.evaluationContexts);return t.filter(n=>{let i=n.evaluation_contexts??n.evaluation_tags;return!i||i.length===0?!0:i.some(o=>r.has(o))})}getEvaluationRuntimeForFlag(t){let r=this.featureFlagsByKey[t];return r?Knu(r.evaluation_runtime):void 0}getFlagKeysByEvaluationRuntime(t){return this.featureFlags.filter(r=>alh(Knu(r.evaluation_runtime),t)).map(r=>r.key)}updateFlagState(t){let r=this.filterFlagsByEvaluationContexts(t.flags);this.featureFlags=r,this.featureFlagsByKey=r.reduce((i,o)=>(i[o.key]=o,i),{});let n=new Set(r.map(i=>i.key));this.filteredOutFlagKeys=new Set(t.flags.filter(i=>!n.has(i.key)).map(i=>i.key)),this.groupTypeMapping=t.group_type_mapping??t.groupTypeMapping??{},this.cohorts=t.cohorts,this.propertyMatchingVersion=t.property_matching_version??t.propertyMatchingVersion,this.loadedSuccessfullyOnce=!0,this.onMinimalFlagCalledEvents?.((t.minimal_flag_called_events??t.minimalFlagCalledEvents)===!0)}warnAboutExperienceContinuityFlags(t){if(this.strictLocalEvaluation)return;let r=t.filter(n=>n.ensure_experience_continuity);r.length>0&&console.warn(`[PostHog] You are using local evaluation but ${r.length} flag(s) have experience continuity enabled: ${r.map(n=>n.key).join(", ")}. Experience continuity is incompatible with local evaluation and will cause a server request on every flag evaluation, negating local evaluation cost savings. To avoid server requests and unexpected costs, either disable experience continuity on these flags in PostHog, use strictLocalEvaluation: true in client init, or pass onlyEvaluateLocally: true per flag call (flags that cannot be evaluated locally will return undefined).`)}async loadFromCache(t){if(!this.cacheProvider)return!1;try{let r=await this.cacheProvider.getFlagDefinitions();return r?(this.updateFlagState(r),this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] ${t} (${r.flags.length} flags)`)),this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(this.featureFlags),!0):!1}catch(r){return this.onError?.(new Error(`Failed to load from cache: ${r}`)),!1}}async loadFeatureFlags(t=!1){if(!(this.loadedSuccessfullyOnce&&!t))return!t&&this.nextFetchAllowedAt&&Date.now()<this.nextFetchAllowedAt?void this.logMsgIfDebug(()=>console.debug("[FEATURE FLAGS] Skipping fetch, in backoff period")):(this.loadingPromise||(this.loadingPromise=this._loadFeatureFlags().catch(r=>this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Failed to load feature flags: ${r}`))).finally(()=>{this.loadingPromise=void 0})),this.loadingPromise)}isLocalEvaluationReady(){return(this.loadedSuccessfullyOnce??!1)&&(this.featureFlags?.length??0)>0}getFlagDefinitionsLoadedAt(){return this.flagDefinitionsLoadedAt}getPollingInterval(){let t=this.pollingInterval??3e4;return this.shouldBeginExponentialBackoff?Math.min(slh,t*2**this.backOffCount):t}beginBackoff(){this.shouldBeginExponentialBackoff=!0,this.backOffCount+=1,this.nextFetchAllowedAt=Date.now()+this.getPollingInterval()}clearBackoff(){this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.nextFetchAllowedAt=void 0}async _loadFeatureFlags(){this.poller&&(clearTimeout(this.poller),this.poller=void 0);try{let t=!0;if(this.cacheProvider)try{t=await this.cacheProvider.shouldFetchFlagDefinitions()}catch(n){this.onError?.(new Error(`Error in shouldFetchFlagDefinitions: ${n}`))}if(!t&&(await this.loadFromCache("Loaded flags from cache (skipped fetch)")||this.loadedSuccessfullyOnce))return;let r=await this._requestFeatureFlagDefinitions();if(!r)return;switch(r.status){case 304:this.logMsgIfDebug(()=>console.debug("[FEATURE FLAGS] Flags not modified (304), using cached data")),this.flagsEtag=r.headers?.get("ETag")??this.flagsEtag,this.loadedSuccessfullyOnce=!0,this.clearBackoff();return;case 401:throw this.beginBackoff(),new Klt(`Your project key or secret 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.filteredOutFlagKeys=new Set,this.groupTypeMapping={},this.cohorts={},this.propertyMatchingVersion=void 0,this.onMinimalFlagCalledEvents?.(!1);return;case 403:throw this.beginBackoff(),new Klt(`Your secret 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 secret and Project API key pair? More information: https://posthog.com/docs/api/overview`);case 429:throw this.beginBackoff(),new Klt(`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 n=await r.json()??{};if(!("flags"in n))return void this.onError?.(new Error(`Invalid response when getting feature flags: ${JSON.stringify(n)}`));this.flagsEtag=r.headers?.get("ETag")??void 0;let i=n.group_type_mapping||{},o=n.minimal_flag_called_events===!0,s={flags:n.flags??[],group_type_mapping:i,cohorts:n.cohorts||{},minimal_flag_called_events:o,property_matching_version:n.property_matching_version,propertyMatchingVersion:n.property_matching_version,groupTypeMapping:i,minimalFlagCalledEvents:o};if(this.updateFlagState(s),this.flagDefinitionsLoadedAt=Date.now(),this.clearBackoff(),this.cacheProvider&&t)try{await this.cacheProvider.onFlagDefinitionsReceived(s)}catch(a){this.onError?.(new Error(`Failed to store in cache: ${a}`))}this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(this.featureFlags);break}default:return}}catch(t){t instanceof Klt&&this.onError?.(t)}finally{!this.pollerStopped&&this.pollingInterval!==null&&(this.poller=setTimeout(()=>this.loadFeatureFlags(!0),this.getPollingInterval()))}}getPersonalApiKeyRequestOptions(t="GET",r){let n={...this.customHeaders,"Content-Type":"application/json",Authorization:`Bearer ${this.personalApiKey}`};return r&&(n["If-None-Match"]=r),{method:t,headers:n}}async _requestFeatureFlagDefinitions(){let t=`${this.host}/flags/definitions?token=${this.projectApiKey}&send_cohorts`,r=this.getPersonalApiKeyRequestOptions("GET",this.flagsEtag),n=null;if(this.timeout&&typeof this.timeout=="number"){let o=new AbortController;n=N2(()=>{o.abort()},this.timeout),r.signal=o.signal}let i=()=>clearTimeout(n);try{let o=this.fetch,s=await o(t,r);return s.status!==200?(i(),s):{status:s.status,headers:s.headers,body:s.body,text:async()=>{try{return await s.text()}finally{i()}},json:async()=>{try{return await s.json()}finally{i()}}}}catch(o){throw i(),o}}async stopPoller(t=3e4){if(this.pollerStopped=!0,clearTimeout(this.poller),this.poller=void 0,this.cacheProvider)try{let r=this.cacheProvider.shutdown();r instanceof Promise&&await WSe(r,t,()=>{throw new Error(`Cache shutdown timeout after ${t}ms`)})}catch(r){this.onError?.(new Error(`Error during cache shutdown: ${r}`))}}};function Jnu(e,t,r,n){return j7o(e,t,{warnFunction:r,propertyMatchingVersion:n})}function llh(e,t){if(!(e in t))throw new are(`cohort ${e} not found in local cohorts - likely a static cohort that requires server evaluation`)}async function Ynu(e,t,r,n=!1,i,o){let s=String(e.value);llh(s,r);let a=r[s];return Xnu(a,t,r,n,i,o)}async function Xnu(e,t,r,n=!1,i,o){if(!e)return!0;let s=e.type,a=e.values;if(!a||a.length===0)return!0;let c=!1;if("values"in a[0]){for(let l of a)try{let u=await Xnu(l,t,r,n,i,o);if(s==="AND"){if(!u)return!1}else if(u)return!0}catch(u){if(u instanceof are)throw u;if(u instanceof Ul)n&&console.debug(`Failed to compute property ${l} locally: ${u}`),c=!0;else throw u}if(c)throw new Ul("Can't match cohort without a given cohort property value");return s==="AND"}for(let l of a)try{let u;if(l.type==="cohort")u=await Ynu(l,t,r,n,i,o);else if(l.type==="flag"){if(!i)throw new Ul(`Flag dependency '${l.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);u=await i(l)}else u=Jnu(l,t,void 0,o);let p=l.negation||!1;if(s==="AND"){if(!u&&!p||u&&p)return!1}else if(u&&!p||!u&&p)return!0}catch(u){if(u instanceof are)throw u;if(u instanceof Ul)n&&console.debug(`Failed to compute property ${l} locally: ${u}`),c=!0;else throw u}if(c)throw new Ul("can't match cohort without a given cohort property value");return s==="AND"}var ulh=["--unhandled-rejections","--unhandled_rejections"],plh=new Set(["throw","strict","warn","warn-with-error-code","none"]),flh=[...globalThis.process?.execArgv??[]],dlh=globalThis.process?.env?.NODE_OPTIONS;function mlh(e){let t=[],r="",n=!1;for(let i=0;i<e.length;i++){let o=e[i];o==="\\"&&n&&i+1<e.length?r+=e[++i]:o!==" "||n?o==='"'?n=!n:r+=o:r&&(t.push(r),r="")}return r&&t.push(r),t}function Znu(e){let t;for(let r=0;r<e.length;r++){let n=e[r],i=ulh.find(s=>n===s||n.startsWith(`${s}=`));if(!i)continue;let o=n===i?e[++r]:n.slice(i.length+1);plh.has(o)&&(t=o)}return t}function hlh(e=flh,t=dlh){return Znu(e)??Znu(mlh(t??""))??"throw"}var $nu=hlh();function eiu(e,t,r){e(t,{mechanism:{type:r==="unhandledRejection"?"onunhandledrejection":"onuncaughtexception",handled:!1}})}function glh(e,t){let r=!1;return Object.assign((n,i)=>{let o=global.process.listeners("uncaughtException").filter(s=>s.name!=="domainUncaughtExceptionClear"&&s._posthogErrorHandler!==!0).length;eiu(e,n,i),!r&&o===0&&(r=!0,t(n))},{_posthogErrorHandler:!0})}function tiu(e,t,r=$nu){let n=globalThis.process;if(n){if(r==="strict")return void n.on("uncaughtExceptionMonitor",(i,o)=>eiu(e,i,o));n.on("uncaughtException",glh(e,t))}}function riu(e,t=$nu){let r=globalThis.process;!r||t==="throw"||t==="strict"||t==="warn-with-error-code"||r.on("unhandledRejection",n=>{e(n,{mechanism:{type:"onunhandledrejection",handled:!1}})})}var Alh=2e3,oHo=class e{constructor(t,r,n){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this._logger=n,this._rateLimiter=new T$r({...dru(r),refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(t){return F9t(t)&&"__posthog_previously_captured_error"in t&&t.__posthog_previously_captured_error===!0}static async buildEventMessage(t,r,n,i,o){let s={...o},a=t.buildFromUnknown(r,n);a.$exception_list=await t.modifyFrames(a.$exception_list);let c=ST.getInjectedReleaseId();return c&&(s.$release_id=c),{event:"$exception",distinctId:i,properties:{...a,...s},_originatedFromCaptureException:!0}}startAutocaptureIfEnabled(){this.isEnabled()&&(tiu(this.onException.bind(this),this.onFatalError.bind(this)),riu(this.onException.bind(this)))}onException(t,r){this.client.addPendingPromise((async()=>{if(!e.isPreviouslyCapturedError(t)){let n=await e.buildEventMessage(this.client.getErrorPropertiesBuilder(),t,r),o=n.properties?.$exception_list[0]?.type??"Exception";return this._rateLimiter.consumeRateLimit(o)?void this._logger.info("Skipping exception capture because of client rate limiting.",{exception:o}):this.client._capturePreparedEvent(n,!1)}})())}async onFatalError(t){console.error(t),await this.client.shutdown(Alh),globalThis.process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}},zUe=oHo;var len=class{getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}constructor(){this._memoryStorage={}}};function ylh(e){return e==="v0"||e==="v1"}function niu(){let e="u">typeof process?process.env?.POSTHOG_CAPTURE_MODE:void 0;return ylh(e)?e:"v0"}var blh="$ai_",uqt="analytics";function iiu(e){return typeof e.event=="string"&&e.event.startsWith(blh)}var Jlt=class e extends Error{constructor({requestId:t,drops:r,retryExhausted:n,cause:i}){super(e.buildMessage(t,r,n,i)),this.name="CaptureV1Error",this.requestId=t,this.drops=r,this.retryExhausted=n,this.cause=i}static buildMessage(t,r,n,i){let o=`Capture V1 batch ${t} did not fully deliver: ${r.length} dropped, ${n.length} undelivered`;return i instanceof Error&&(o+=` (${i.message})`),o}};function sHo(e){if(typeof e=="boolean")return e;if(typeof e=="number")return e!==0;if(typeof e=="string"){let t=e.trim().toLowerCase();if(t==="true"||t==="1")return!0;if(t==="false"||t==="0")return!1}}function Elh(e){return typeof e=="string"?e:void 0}var Ilh=[{property:"$cookieless_mode",optionKey:"cookieless_mode",coerce:sHo},{property:"$ignore_sent_at",optionKey:"disable_skew_correction",coerce:sHo},{property:"$process_person_profile",optionKey:"process_person_profile",coerce:sHo},{property:"$product_tour_id",optionKey:"product_tour_id",coerce:Elh}],vlh=[{property:"$session_id",field:"session_id"},{property:"$window_id",field:"window_id"}];function Clh(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function xlh(e){if(typeof e=="string"){let r=new Date(e);if(Number.isNaN(r.getTime()))return new Date().toISOString();let n=r.toISOString(),i=e.match(/\.(\d+)(?:Z|[+-]\d{2}:?\d{2})?$/i)?.[1];return i&&i.length>3?n.replace(/\.\d{3}Z$/,`.${i}Z`):n}if(e instanceof Date)return Number.isNaN(e.getTime())?new Date().toISOString():e.toISOString();let t=e==null?new Date:new Date(e);return Number.isNaN(t.getTime())?new Date().toISOString():t.toISOString()}function oiu(e,t,r){r!==void 0&&!(t in e)&&(e[t]=r)}function Slh(e){let r={...Clh(e.properties)?e.properties:{}},n={};for(let{property:o,optionKey:s,coerce:a}of Ilh)if(o in r){let c=a(r[o]);c!==void 0&&(n[s]=c),delete r[o]}let i={};for(let{property:o,field:s}of vlh)if(o in r){let a=r[o];typeof a=="string"&&(i[s]=a),delete r[o]}return delete r.$lib,delete r.$lib_version,oiu(r,"$set",e.$set),oiu(r,"$set_once",e.$set_once),{event:String(e.event??""),uuid:String(e.uuid??""),distinct_id:String(e.distinct_id??""),timestamp:xlh(e.timestamp),...i,options:n,properties:r}}function siu(e,{createdAt:t,historicalMigration:r}){let n={created_at:t,batch:e.map(Slh)};return r&&(n.historical_migration=!0),n}var wlh="/i/v1/analytics/events",Tlh=3e4,Olh=new Set([408,500,502,503,504]),uen=class{constructor(t,r){this.config=t,this.maxBackoffMs=t.maxBackoffMs??Tlh,this.fetchFn=r.fetch,this.onError=r.onError,this.now=r.now??Date.now,this.sleep=r.sleep??(n=>new Promise(i=>N2(i,n))),this.generateRequestId=r.generateRequestId??F2,this.compress=r.compress??H9t}async sendV1Batch(t){if(t.length===0)return;let r=this.generateRequestId(),n=new Date(this.now()).toISOString(),{batch:i}=siu(t,{createdAt:n,historicalMigration:this.config.historicalMigration}),o=`${this.config.host}${wlh}`,s=[],a=i,c=Math.max(1,this.config.maxAttempts);for(let l=1;l<=c;l++){let u=l===c,p=GSe({created_at:n,...this.config.historicalMigration?{historical_migration:!0}:{},batch:a}),d,f;try{d=await this.sendOnce(o,p,l,r);let{response:m,signal:g}=d,{status:A}=m;if(A<200||A>=300)if(!u&&Olh.has(A)){let b=this.parseRetryAfter(m);await d.waitFor(d.cancelBody()).catch(()=>{}),f=this.backoffDelay(l,b)}else{let b=await this.buildHttpError(m,A,d.waitFor);return this.surfaceBatchFailure(r,s,a,b)}else{let b;try{b=await d.waitFor(this.parseResponse(m))}catch(x){if(g.aborted)throw x;return this.surfaceBatchFailure(r,s,a,new Error(`Capture V1 returned an unparseable ${A} response body`))}let I=this.classify(a,b,s);if(I.length===0)return this.surfacePartialDrops(r,s);if(u)return void this.onError(new Jlt({requestId:r,drops:s,retryExhausted:I.map(x=>x.uuid)}));a=I;let C=this.parseRetryAfter(m);f=this.backoffDelay(l,C)}}catch(m){if(d&&!d.signal.aborted)throw m;if(u)return this.surfaceBatchFailure(r,s,a,m);f=this.backoffDelay(l)}finally{d?.cleanup()}f!==void 0&&await this.sleep(f)}}async sendOnce(t,r,n,i){let o=this.buildHeaders(n,i),s=r;if(this.config.compressionEnabled){let p=await this.compress(r,this.config.isDebug);p!==null&&(s=p,o["Content-Encoding"]="gzip")}let a=new AbortController,c="waiting for response headers",l,u=new Promise((p,d)=>{l=N2(()=>{let f=new Error(`Capture V1 request timed out ${c} after ${this.config.requestTimeoutMs}ms`);f.name="AbortError",d(f),a.abort(f)},this.config.requestTimeoutMs)});try{let p=this.fetchFn(t,{method:"POST",headers:o,body:s,signal:a.signal}),d=!1;p.then(b=>{a.signal.aborted&&!d&&this.cancelBody(b)}).catch(()=>{});let f=await Promise.race([p,u]);d=!0,c="while reading the response body";let m=!1,g,A=()=>g??=this.cancelBody(f);return{response:f,signal:a.signal,waitFor:b=>Promise.race([b,u]),cancelBody:A,cleanup:()=>{m||(m=!0,clearTimeout(l),a.signal.aborted&&A())}}}catch(p){throw clearTimeout(l),p}}buildHeaders(t,r){let n=`${this.config.libraryId}/${this.config.libraryVersion}`,i={"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`,"PostHog-Sdk-Info":n,"PostHog-Attempt":String(t),"PostHog-Request-Id":r,"PostHog-Request-Timestamp":new Date(this.now()).toISOString()};return this.config.userAgent&&(i["User-Agent"]=this.config.userAgent),i}classify(t,r,n){let i=r.results??{},o=[];for(let s of t){let a=i[s.uuid];a&&(a.result==="drop"?n.push({uuid:s.uuid,details:a.details??void 0}):a.result==="retry"&&o.push(s))}return o}backoffDelay(t,r){let n=Math.min(this.config.initialRetryDelayMs*2**(t-1),this.maxBackoffMs);return r===void 0?n:Math.max(n,Math.min(r,this.maxBackoffMs))}parseRetryAfter(t){let r=t.headers?.get("Retry-After");if(!r)return;let n=r.trim();if(/^\d+$/.test(n)){let s=parseInt(n,10);return Number.isFinite(s)&&s>0?1e3*s:void 0}let i=Date.parse(n);if(Number.isNaN(i))return;let o=i-this.now();return o>0?o:void 0}async parseResponse(t){let r=await t.text(),n=JSON.parse(r);if(typeof n!="object"||n===null||Array.isArray(n))throw new Error("unexpected response shape");let i=n.results;if(i!==void 0&&(typeof i!="object"||i===null||Array.isArray(i)))throw new Error("unexpected results shape");return{results:i??{}}}async buildHttpError(t,r,n){let i="";try{i=(await n(t.text())).slice(0,512)}catch{}let o=i?`: ${i}`:"";return new Error(`Capture V1 request failed with HTTP ${r}${o}`)}surfaceBatchFailure(t,r,n,i){this.onError(new Jlt({requestId:t,drops:r,retryExhausted:n.map(o=>o.uuid),cause:i}))}surfacePartialDrops(t,r){r.length>0&&this.onError(new Jlt({requestId:t,drops:r,retryExhausted:[]}))}async cancelBody(t){try{await t.body?.cancel()}catch{}}};var QUe="ai-capture",pen="/i/v0/ai/batch/";var Blh=new TextEncoder;function cHo(e){return Blh.encode(GSe(e)).length}function aiu(e,t=8388608,r=5242880){let n=[],i=[],o=[],s=0;for(let a of e){if(a===void 0)continue;let c=cHo(a);if(c>t){i.push({event:typeof a.event=="string"?a.event:"unknown",bytes:c});continue}o.length>0&&s+c>r&&(n.push(o),o=[],s=0),o.push(a),s+=c}return o.length>0&&n.push(o),{batches:n,dropped:i}}var Dlh=100,ciu=3e4,Rlh=5e4,klh=50,Flh=500,Nlh="https://us.i.posthog.com",liu=new Set;function den(e,t){liu.has(e)||(liu.add(e),console.warn(`[PostHog] ${t}`))}function jlh(e){return typeof e=="string"?e.trim():""}function zlh(e){return(typeof e=="string"?e.trim():"")||void 0}function Qlh(e){return(typeof e=="string"?e.trim():"")||Nlh}function Mlh(e){return(Array.isArray(e)?e:[e]).filter(r=>typeof r=="string"&&r.trim().length>0)}function Llh(e){if(!e)return{};let t={};for(let[n,i]of Object.entries(e))t[`$feature/${n}`]=i;let r=Object.keys(e).filter(n=>e[n]!==!1).sort();return r.length>0&&(t.$active_feature_flags=r),t}var men=class extends K9t{constructor(t,r={}){let n=jlh(t),i={...r,maxQueueSize:r.maxQueueSize??1e4,flushInterval:r.flushInterval??5e3,host:Qlh(r.host),personalApiKey:zlh(r.secretKey??r.personalApiKey)};if(super(n,i),this._memoryStorage=new len,this._aiCaptureRouteActive=!1,this._minimalFlagCalledEvents=!1,this.options=i,this.captureMode=niu(),this.enableFullAiCapture=i.enableFullAiCapture===!0,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval=typeof i.featureFlagsPollingInterval=="number"?Math.max(i.featureFlagsPollingInterval,Dlh):i.featureFlagsPollingInterval===null?null:ciu,typeof i.waitUntilDebounceMs=="number"&&(this.options.waitUntilDebounceMs=Math.max(i.waitUntilDebounceMs,0)),typeof i.waitUntilMaxWaitMs=="number"&&(this.options.waitUntilMaxWaitMs=Math.max(i.waitUntilMaxWaitMs,0)),!this.disabled&&i.personalApiKey){if(i.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.');i.enableLocalEvaluation!==!1&&(this.featureFlagsPoller=new cen({pollingInterval:this.options.featureFlagsPollingInterval,personalApiKey:i.personalApiKey,projectApiKey:n,timeout:i.requestTimeout??1e4,host:this.host,fetch:i.fetch,onError:s=>{this._events.emit("error",s)},onLoad:s=>{this._events.emit("localEvaluationFlagsLoaded",s)},onMinimalFlagCalledEvents:s=>{this._minimalFlagCalledEvents=s},customHeaders:this.getCustomHeaders(),cacheProvider:i.flagDefinitionCacheProvider,strictLocalEvaluation:i.strictLocalEvaluation,evaluationContexts:i.evaluationContexts??i.evaluationEnvironments}))}this.errorTracking=new zUe(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||Rlh}enqueue(t,r,n,i){super.enqueue(t,r,n,i),this.scheduleDebouncedFlush()}_flushEventsAndSpans(t=!1){let r=this.flushWithPendingPromises();return!this._traces||t&&this._traces.throttled?r:z9t([r,this._traces.flush().catch(()=>{})]).then(([n])=>{if(n.status==="rejected")throw n.reason})}flushAutomatic(){return this._flushKeepingRuntimeAlive(!0)}async flush(){return this._flushKeepingRuntimeAlive(!1)}_flushKeepingRuntimeAlive(t){let r=this._flushEventsAndSpans(t),n=this.options.waitUntil;if(n&&!this._waitUntilCycle)try{n(r.catch(()=>{}))}catch{}return r}scheduleDebouncedFlush(){let t=this.options.waitUntil;if(!t||this.disabled||this.optedOut)return;if(!this._waitUntilCycle){let s,a=new Promise(c=>{s=c});try{t(a)}catch{return}this._waitUntilCycle={resolve:s,startedAt:Date.now(),timer:void 0}}let r=Date.now()-this._waitUntilCycle.startedAt,n=this.options.waitUntilMaxWaitMs??Flh,i=r>=n;if(this._waitUntilCycle.timer!==void 0&&clearTimeout(this._waitUntilCycle.timer),i)return void this.resolveWaitUntilFlush();let o=this.options.waitUntilDebounceMs??klh;this._waitUntilCycle.timer=N2(()=>{this.resolveWaitUntilFlush()},o)}_consumeWaitUntilCycle(){let t=this._waitUntilCycle;return t&&(clearTimeout(t.timer),this._waitUntilCycle=void 0),t?.resolve}async resolveWaitUntilFlush(){let t=this._consumeWaitUntilCycle();try{await this._flushEventsAndSpans()}catch{}finally{t?.()}}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):fetch(t,r)}getQueueRouteKey(t){return this.captureMode==="v1"&&iiu(t)?"ai":uqt}persistedQueueKeyForRoute(t){return t===QUe?jQ.AiCaptureQueue:t==="ai"?jQ.AiQueue:jQ.Queue}getActiveQueueRoutes(){let t=this.captureMode==="v1"?[uqt,"ai"]:[uqt];return this._aiCaptureRouteActive&&t.push(QUe),t}getBatchEndpointPath(t){return t===QUe?pen:super.getBatchEndpointPath(t)}async sendBatch(t,r,n=uqt){if(n===QUe)return this.sendAiCaptureBatch(t,r);if(this.captureMode!=="v1"||n==="ai")return super.sendBatch(t,r,n);let i=t.filter(o=>o!==void 0);await this.getV1Sender().sendV1Batch(i)}async sendAiCaptureBatch(t,r){let{batches:n,dropped:i}=aiu(t);for(let{event:o,bytes:s}of i){let a=`Event ${o} (${s} bytes) exceeds the ${8388608/1048576}MiB limit for ${pen}, dropping.`;this._logger.error(a),this._events.emit("error",new Error(a))}for(let o of n)await this.sendAiSubBatch(o,r)}async sendAiSubBatch(t,r){try{await super.sendBatch(t,r,QUe)}catch(n){if(!Glt(n))throw n;if(t.length===1){let[o]=t,a=`Event ${typeof o.event=="string"?o.event:"unknown"} (${cHo(o)} bytes) was rejected with 413 by ${pen} on its own, dropping.`;this._logger.error(a),this._events.emit("error",new Error(a));return}let i=Math.ceil(t.length/2);await this.sendAiSubBatch(t.slice(0,i),r),await this.sendAiSubBatch(t.slice(i),r)}}getV1Sender(){return this._v1Sender||(this._v1Sender=new uen({host:this.host,apiKey:this.apiKey,libraryId:this.getLibraryId(),libraryVersion:this.getLibraryVersion(),userAgent:this.getCustomUserAgent()||void 0,historicalMigration:this.historicalMigration,compressionEnabled:!this.disableCompression,requestTimeoutMs:this.requestTimeout,maxAttempts:(this.options.fetchRetryCount??3)+1,initialRetryDelayMs:this.options.fetchRetryDelay??3e3,isDebug:this.isDebug},{fetch:(t,r)=>this.fetch(t,r),onError:t=>this._events.emit("error",t),compress:t=>this.compressPayload(t)})),this._v1Sender}getLibraryVersion(){return Hnu}get metrics(){return this._metrics||(this._metrics=new nqt(this,J$r(this.options.metrics),this._logger)),this._metrics}initializeSpanContextManager(){return new cqt}hostResourceAttributes(){return{}}get _spanContextManager(){return this._spanContext||(this._spanContext=this.initializeSpanContextManager()),this._spanContext}get _tracesPipeline(){if(this.options.traces)return this._traces||(this._traces=new aqt(this,eHo(this.options.traces,this.hostResourceAttributes(),this._logger),this._logger,()=>this._tracingContext(),this._spanContextManager,()=>this.scheduleDebouncedFlush())),this._traces}_tracingContext(){let t=this.context?.get();return{distinctId:t?.distinctId,sessionId:t?.sessionId}}startSpan(t,r){return this._tracesPipeline?.startSpan(t,r)??HSe(r,this._spanContextManager.active())}withSpan(t,r,n){let i=typeof r=="function"?void 0:r,o=typeof r=="function"?r:n,s=this._tracesPipeline;return s?i?s.withSpan(t,i,o):s.withSpan(t,o):sqt(this._spanContextManager,HSe(i,this._spanContextManager.active()),o)}getActiveSpan(){return this._spanContextManager.active()??null}getCustomUserAgent(){return`${this.getLibraryId()}/${this.getLibraryVersion()}`}getEvaluationRuntime(){return"server"}getCommonEventProperties(){let t=super.getCommonEventProperties();return(this.options.isServer??!0)&&(t.$is_server=!0),t}enable(){return super.optIn()}disable(){return super.optOut()}debug(t=!0){super.debug(t),this.featureFlagsPoller?.debug(t)}_warnIfInvalidCapture(t,r,n){typeof t=="string"&&this._logger.warn(r),t.event==="$exception"&&!t._originatedFromCaptureException&&this._logger.warn(n)}_sendPreparedEvent(t,r,n,i,o){return this.addPendingPromise(this._prepareEventMessage(r,i).then(({distinctId:s,event:a,properties:c,options:l})=>{let u={timestamp:l.timestamp,disableGeoip:l.disableGeoip,uuid:l.uuid},p={distinctId:s,event:a,properties:{...c,...this.getCommonEventProperties()}};return n?this.sendImmediate(t,p,u,o):this.enqueue(t,p,u,o)}).catch(s=>{s&&console.error(s)}))}_capturePreparedEvent(t,r){return this._sendPreparedEvent("capture",t,r)}capture(t){this._warnIfInvalidCapture(t,"Called capture() with a string as the first argument when an object was expected.","Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this._capturePreparedEvent(t,!1)}async captureImmediate(t){return this._warnIfInvalidCapture(t,"Called captureImmediate() with a string as the first argument when an object was expected.","Capturing a `$exception` event via `posthog.captureImmediate('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureExceptionImmediate(error)` instead, which attaches this metadata by default."),this._capturePreparedEvent(t,!0)}captureAi(t){if(this.disabled)return;let r=kUe(t.uuid,F2);return this._sendPreparedAiEvent({...t,uuid:r},!1),r}async captureAiImmediate(t){if(this.disabled)return;let r=kUe(t.uuid,F2);return await this._sendPreparedAiEvent({...t,uuid:r},!0),r}_sendPreparedAiEvent(t,r){return typeof t?.event=="string"&&!t.event.startsWith("$ai_")&&this._logger.debug(`captureAi called with non-AI event ${t.event}; routing it to the AI endpoint anyway.`),this._aiCaptureRouteActive=!0,this._sendPreparedEvent("capture",t,r,void 0,QUe)}identify({distinctId:t,properties:r={},disableGeoip:n}){let{$set:i,$set_once:o,$anon_distinct_id:s,...a}=r,u={$set:i||a,$set_once:o||{},$anon_distinct_id:s??void 0};this._sendPreparedEvent("identify",{distinctId:t,event:"$identify",properties:u,disableGeoip:n},!1,{includeContextProperties:!1})}async identifyImmediate({distinctId:t,properties:r={},disableGeoip:n}){let{$set:i,$set_once:o,$anon_distinct_id:s,...a}=r,u={$set:i||a,$set_once:o||{},$anon_distinct_id:s??void 0};await this._sendPreparedEvent("identify",{distinctId:t,event:"$identify",properties:u,disableGeoip:n},!0,{includeContextProperties:!1})}setPersonProperties({distinctId:t,properties:r={},propertiesOnce:n={}}){if(Object.keys(r).length===0&&Object.keys(n).length===0)return;let i={};Object.keys(r).length>0&&(i.$set=r),Object.keys(n).length>0&&(i.$set_once=n),this.capture({distinctId:t,event:"$set",properties:i})}unsetPersonProperties({distinctId:t,properties:r}){let n=Mlh(r);n.length!==0&&this.capture({distinctId:t,event:"$set",properties:{$unset:n}})}alias(t){this._sendPreparedEvent("alias",{distinctId:t.distinctId,event:"$create_alias",properties:{distinct_id:t.distinctId,alias:t.alias},disableGeoip:t.disableGeoip},!1,{includeContextProperties:!1})}async aliasImmediate(t){await this._sendPreparedEvent("alias",{distinctId:t.distinctId,event:"$create_alias",properties:{distinct_id:t.distinctId,alias:t.alias},disableGeoip:t.disableGeoip},!0,{includeContextProperties:!1})}isLocalEvaluationReady(){return this.featureFlagsPoller?.isLocalEvaluationReady()??!1}getFeatureFlagEvaluationRuntime(t){return this.featureFlagsPoller?.getEvaluationRuntimeForFlag(t)}getFeatureFlagKeysByEvaluationRuntime(t){return this.featureFlagsPoller?.getFlagKeysByEvaluationRuntime(t)??[]}async waitForLocalEvaluationReady(t=ciu){return this.isLocalEvaluationReady()?!0:this.featureFlagsPoller===void 0?!1:new Promise(r=>{let n=setTimeout(()=>{i(),r(!1)},t),i=this._events.on("localEvaluationFlagsLoaded",o=>{clearTimeout(n),i(),r(o>0)})})}_resolveDistinctId(t,r){return typeof t=="string"?{distinctId:t,options:r}:{distinctId:this.context?.get()?.distinctId,options:t}}async _getFeatureFlagResult(t,r,n={},i){if(this.disabled)return void this._logger.warn("The client is disabled");let o=n.sendFeatureFlagEvents??!0;if(this._flagOverrides!==void 0&&t in this._flagOverrides){let D=this._flagOverrides[t];if(D===void 0)return;let R=this._payloadOverrides?.[t];return{key:t,enabled:D!==!1,variant:typeof D=="string"?D:void 0,payload:R}}let{groups:s,disableGeoip:a}=n,{onlyEvaluateLocally:c,personProperties:l,groupProperties:u}=n,p=this.addLocalPersonAndGroupProperties(r,s,l,u);l=p.allPersonProperties,u=p.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(r,s,this.personPropertiesForLocalEvaluation(r,l),u);c==null&&(c=this.options.strictLocalEvaluation??!1);let f,m=!1,g,A,b,I,C,x,S;if(this.featureFlagsPoller!==void 0){await this.featureFlagsPoller?.loadFeatureFlags();let D=this.featureFlagsPoller?.featureFlagsByKey[t];if(D)try{let R=await this.featureFlagsPoller?.computeFlagAndPayloadLocally(D,d,{matchValue:i});if(R){m=!0;let O=R.value;I=D.id,x="Evaluated locally",S=D.has_experiment,f={key:t,enabled:O!==!1,variant:typeof O=="string"?O:void 0,payload:R.payload??void 0,reason:x,reasonCode:D.active===!1?"flag_disabled":void 0}}}catch(R){if(R instanceof are||R instanceof Ul)this._logger?.info(`${R.name} when computing flag locally: ${t}: ${R.message}`);else throw R}}if(!m&&!c){let D=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,l,u,a,[t]);if(D===void 0)b=Dme.UNKNOWN_ERROR;else{this._minimalFlagCalledEvents=D.minimalFlagCalledEvents===!0,g=D.requestId,A=D.evaluatedAt;let R=[];D.errorsWhileComputingFlags&&R.push(Dme.ERRORS_WHILE_COMPUTING),D.quotaLimited?.includes("feature_flags")&&R.push(Dme.QUOTA_LIMITED);let O=D.flags[t];if(O===void 0)R.push(Dme.FLAG_MISSING);else{I=O.metadata?.id,C=O.metadata?.version,x=O.reason?.description??O.reason?.code,S=O.metadata?.has_experiment;let z;if(O.metadata?.payload!==void 0)try{z=JSON.parse(O.metadata.payload)}catch{z=O.metadata.payload}f={key:t,enabled:O.enabled,variant:O.variant??void 0,payload:z,reason:x,reasonCode:O.reason?.code}}R.length>0&&(b=R.join(","))}}if(o){let D=f===void 0?void 0:f.enabled===!1?!1:f.variant??!0,R={$feature_flag:t,$feature_flag_response:D,$feature_flag_id:I,$feature_flag_version:C,$feature_flag_reason:x,locally_evaluated:m,[`$feature/${t}`]:D,$feature_flag_request_id:g,$feature_flag_evaluated_at:m?Date.now():A};if(S!==void 0&&(R.$feature_flag_has_experiment=S),m&&this.featureFlagsPoller){let O=this.featureFlagsPoller.getFlagDefinitionsLoadedAt();O!==void 0&&(R.$feature_flag_definitions_loaded_at=O)}b&&(R.$feature_flag_error=b),this._captureFlagCalledEventIfNeeded({distinctId:r,key:t,response:D,groups:s,disableGeoip:a,properties:R})}return f!==void 0&&this._payloadOverrides!==void 0&&t in this._payloadOverrides&&(f={...f,payload:this._payloadOverrides[t]}),f}async getFeatureFlag(t,r,n){den("getFeatureFlag","`getFeatureFlag` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.getFlag(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request.");let i=await this._getFeatureFlagResult(t,r,{...n,sendFeatureFlagEvents:n?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0});if(i!==void 0)return i.enabled===!1?!1:i.variant??!0}async getFeatureFlagPayload(t,r,n,i){if(den("getFeatureFlagPayload","`getFeatureFlagPayload` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.getFlagPayload(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request."),this._payloadOverrides!==void 0&&t in this._payloadOverrides)return this._payloadOverrides[t];let o=await this._getFeatureFlagResult(t,r,{...i,sendFeatureFlagEvents:!1},n);if(o!==void 0)return o.payload??null}async getFeatureFlagResult(t,r,n){let{distinctId:i,options:o}=this._resolveDistinctId(r,n);return i?this._getFeatureFlagResult(t,i,{...o,sendFeatureFlagEvents:o?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0}):void this._logger.warn("[PostHog] distinctId is required \u2014 pass it explicitly or use withContext()")}async getRemoteConfigPayload(t){if(this.disabled)return void this._logger.warn("The client is disabled");if(!this.options.personalApiKey)throw new Error("Personal API key is required for remote config payload decryption");let r=await this._requestRemoteConfigPayload(t);if(!r)return;let n=await r.json();if(typeof n=="string")try{return JSON.parse(n)}catch{}return n}async isFeatureEnabled(t,r,n){den("isFeatureEnabled","`isFeatureEnabled` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.isEnabled(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request.");let i=await this._getFeatureFlagResult(t,r,{...n,sendFeatureFlagEvents:n?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0});return i===void 0?void 0:i.enabled===!1?!1:!!(i.variant??!0)||!1}async getAllFlags(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);return n?(await this.getAllFlagsAndPayloads(n,i)).featureFlags||{}:(this._logger.warn("[PostHog] distinctId is required to get feature flags \u2014 pass it explicitly or use withContext()"),{})}async getAllFlagsAndPayloads(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);if(!n)return this._logger.warn("[PostHog] distinctId is required to get feature flags and payloads \u2014 pass it explicitly or use withContext()"),{featureFlags:{},featureFlagPayloads:{}};if(this.disabled)return this._logger.warn("The client is disabled"),{featureFlags:{},featureFlagPayloads:{}};let{groups:o,disableGeoip:s,flagKeys:a}=i||{},{onlyEvaluateLocally:c,personProperties:l,groupProperties:u}=i||{},p=this.addLocalPersonAndGroupProperties(n,o,l,u);l=p.allPersonProperties,u=p.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(n,o,this.personPropertiesForLocalEvaluation(n,l),u);c==null&&(c=this.options.strictLocalEvaluation??!1);let f=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),m={},g={},A=!0;if(f&&(m=f.response,g=f.payloads,A=f.fallbackToFlags),A&&!c){let b=await super.getFeatureFlagsAndPayloadsStateless(d.distinctId,d.groups,l,u,s,a);m={...m,...b.flags||{}},g={...g,...b.payloads||{}}}return this._flagOverrides!==void 0&&(m={...m,...this._flagOverrides}),this._payloadOverrides!==void 0&&(g={...g,...this._payloadOverrides}),{featureFlags:m,featureFlagPayloads:g}}async evaluateFlags(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);if(!n)return this._logger.warn("[PostHog] distinctId is required to evaluate feature flags \u2014 pass it explicitly or use withContext()"),new JSe({host:this._getFeatureFlagEvaluationsHost(),distinctId:"",flags:{}});if(this.disabled)return this._logger.warn("The client is disabled"),new JSe({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,flags:{}});let{groups:o,disableGeoip:s}=i||{},a=i?.flagKeys??void 0;if(a?.length===0)return new JSe({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,groups:o,disableGeoip:s,flags:{}});let{onlyEvaluateLocally:c,personProperties:l,groupProperties:u}=i||{},p=this.addLocalPersonAndGroupProperties(n,o,l,u);l=p.allPersonProperties,u=p.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(n,o,this.personPropertiesForLocalEvaluation(n,l),u);c==null&&(c=this.options.strictLocalEvaluation??!1);let f=a?new Set(a):void 0,m={},g,A,b=!1,I=!1,C=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),x=new Set;if(C)for(let[D,R]of Object.entries(C.response)){let O=this.featureFlagsPoller?.featureFlagsByKey[D];m[D]={key:D,enabled:R!==!1,variant:typeof R=="string"?R:void 0,payload:C.payloads[D],id:O?.id,version:void 0,reason:"Evaluated locally",locallyEvaluated:!0,hasExperiment:O?.has_experiment},x.add(D)}let S=f!==void 0&&Array.from(f).some(D=>this.featureFlagsPoller?.featureFlagsByKey[D]===void 0);if((C?C.fallbackToFlags||S:!0)&&!c){let D=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,l,u,s,a);if(D){this._minimalFlagCalledEvents=D.minimalFlagCalledEvents===!0,g=D.requestId,A=D.evaluatedAt,b=!!D.errorsWhileComputingFlags,I=Array.isArray(D.quotaLimited)&&D.quotaLimited.includes("feature_flags");for(let[R,O]of Object.entries(D.flags)){if(x.has(R))continue;let z;if(O.metadata?.payload!==void 0)try{z=JSON.parse(O.metadata.payload)}catch{z=O.metadata.payload}m[R]={key:R,enabled:O.enabled,variant:O.variant,payload:z,id:O.metadata?.id,version:O.metadata?.version,reason:O.reason?.description??O.reason?.code,locallyEvaluated:!1,hasExperiment:O.metadata?.has_experiment}}}}if(this._flagOverrides!==void 0)for(let[D,R]of Object.entries(this._flagOverrides)){if(R===void 0){delete m[D];continue}let O=m[D];m[D]={key:D,enabled:R!==!1,variant:typeof R=="string"?R:void 0,payload:O?.payload,id:O?.id,version:O?.version,reason:O?.reason,locallyEvaluated:O?.locallyEvaluated??!1,hasExperiment:O?.hasExperiment}}if(this._payloadOverrides!==void 0)for(let[D,R]of Object.entries(this._payloadOverrides)){let O=m[D];O&&(m[D]={...O,payload:R})}if(f!==void 0)for(let D of Object.keys(m))f.has(D)||delete m[D];return new JSe({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,groups:o,disableGeoip:s,flags:m,requestId:g,evaluatedAt:A,flagDefinitionsLoadedAt:this.featureFlagsPoller?.getFlagDefinitionsLoadedAt(),errorsWhileComputing:b,quotaLimited:I})}_shouldSendMinimalFlagCalledEvent(t,r){return t==="$feature_flag_called"&&this._minimalFlagCalledEvents&&r.$feature_flag_has_experiment===!1}_captureFlagCalledEventIfNeeded(t){let{distinctId:r,key:n,response:i,groups:o,disableGeoip:s,properties:a}=t,c=o&&Object.keys(o).length>0?`_${JSON.stringify(Object.entries(o).sort(([u],[p])=>u<p?-1:u>p?1:0))}`:"",l=`${n}_${i}${c}`;r in this.distinctIdHasSentFlagCalls&&this.distinctIdHasSentFlagCalls[r].has(l)||(Object.keys(this.distinctIdHasSentFlagCalls).length>=this.maxCacheSize&&(this.distinctIdHasSentFlagCalls={}),this.distinctIdHasSentFlagCalls[r]instanceof Set?this.distinctIdHasSentFlagCalls[r].add(l):this.distinctIdHasSentFlagCalls[r]=new Set([l]),this.capture({distinctId:r,event:"$feature_flag_called",properties:a,groups:o,disableGeoip:s}))}_getFeatureFlagEvaluationsHost(){return this._featureFlagEvaluationsHost||(this._featureFlagEvaluationsHost={captureFlagCalledEventIfNeeded:t=>this._captureFlagCalledEventIfNeeded(t),logWarning:t=>{this.options.featureFlagsLogWarnings!==!1&&console.warn(`[PostHog] ${t}`)}}),this._featureFlagEvaluationsHost}groupIdentify({groupType:t,groupKey:r,properties:n,distinctId:i,disableGeoip:o}){this._sendPreparedEvent("capture",{distinctId:i||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{}},disableGeoip:o},!1,{includeContextProperties:!1})}async groupIdentifyImmediate({groupType:t,groupKey:r,properties:n,distinctId:i,disableGeoip:o}){await this._sendPreparedEvent("capture",{distinctId:i||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{}},disableGeoip:o},!0,{includeContextProperties:!1})}async reloadFeatureFlags(){await this.featureFlagsPoller?.loadFeatureFlags(!0)}overrideFeatureFlags(t){let r=n=>Object.fromEntries(n.map(i=>[i,!0]));if(t===!1){this._flagOverrides=void 0,this._payloadOverrides=void 0;return}if(Array.isArray(t)){this._flagOverrides=r(t);return}if(this._isFeatureFlagOverrideOptions(t)){"flags"in t&&(t.flags===!1?this._flagOverrides=void 0:Array.isArray(t.flags)?this._flagOverrides=r(t.flags):t.flags!==void 0&&(this._flagOverrides={...t.flags})),"payloads"in t&&(t.payloads===!1?this._payloadOverrides=void 0:t.payloads!==void 0&&(this._payloadOverrides={...t.payloads}));return}this._flagOverrides={...t}}_isFeatureFlagOverrideOptions(t){if(typeof t!="object"||t===null||Array.isArray(t))return!1;let r=t;if("flags"in r){let n=r.flags;if(n===!1||Array.isArray(n)||typeof n=="object"&&n!==null)return!0}if("payloads"in r){let n=r.payloads;if(n===!1||typeof n=="object"&&n!==null)return!0}return!1}withContext(t,r,n){return this.context?this.context.run(t,r,n):r()}getContext(){return this.context?.get()}enterContext(t,r){this.context?.enter(t,r)}async _shutdown(t){let r=Date.now()+(t??3e4),n=this._consumeWaitUntilCycle();await this.featureFlagsPoller?.stopPoller(t),this.errorTracking.shutdown(),this._metrics&&(await WSe(this._metrics.flush().catch(()=>{}),Math.max(0,r-Date.now())),this._metrics.reset()),this._traces&&(await WSe(this._traces.flush().catch(()=>{}),Math.max(0,r-Date.now())),this._traces.reset());try{return await super._shutdown(Math.max(0,r-Date.now()))}finally{this.distinctIdHasSentFlagCalls={},n?.()}}async _requestRemoteConfigPayload(t){if(this.disabled||!this.apiKey||!this.options.personalApiKey)return;let r=`${this.host}/api/projects/@current/feature_flags/${t}/remote_config?token=${encodeURIComponent(this.apiKey)}`,n={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",Authorization:`Bearer ${this.options.personalApiKey}`}},i=null;if(this.options.requestTimeout&&typeof this.options.requestTimeout=="number"){let o=new AbortController;i=N2(()=>{o.abort()},this.options.requestTimeout),n.signal=o.signal}try{return await this.fetch(r,n)}catch(o){this._events.emit("error",o);return}finally{i&&clearTimeout(i)}}extractPropertiesFromEvent(t,r){if(!t)return{personProperties:{},groupProperties:{}};let n={},i={};for(let[o,s]of Object.entries(t))if(uru(s)&&r&&o in r){let a={};for(let[c,l]of Object.entries(s))a[String(c)]=String(l);i[String(o)]=a}else n[String(o)]=String(s);return{personProperties:n,groupProperties:i}}async getFeatureFlagsForEvent(t,r,n,i){if(this.disabled||!this.apiKey)return void this._logger.warn("The client is disabled");let o=i?.personProperties||{},s=i?.groupProperties||{},a=i?.flagKeys;if(i?.onlyEvaluateLocally??this.options.strictLocalEvaluation??!1)if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let l={};for(let[u,p]of Object.entries(r||{}))l[u]=String(p);return await this.getAllFlags(t,{groups:l,personProperties:o,groupProperties:s,disableGeoip:n,onlyEvaluateLocally:!0,flagKeys:a})}else return{};if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let l={};for(let[u,p]of Object.entries(r||{}))l[u]=String(p);return await this.getAllFlags(t,{groups:l,personProperties:o,groupProperties:s,disableGeoip:n,onlyEvaluateLocally:!0,flagKeys:a})}return(await super.getFeatureFlagsStateless(t,r,o,s,n)).flags}addLocalPersonAndGroupProperties(t,r,n,i){let o={...n||{}},s={};if(r)for(let a of Object.keys(r))s[a]={$group_key:r[a],...i?.[a]||{}};return{allPersonProperties:o,allGroupProperties:s}}personPropertiesForLocalEvaluation(t,r){return{distinct_id:t,...r||{}}}createFeatureFlagEvaluationContext(t,r,n,i){return{distinctId:t,groups:r||{},personProperties:n||{},groupProperties:i||{},evaluationCache:{}}}captureException(t,r,n,i,o){if(!zUe.isPreviouslyCapturedError(t)){let s=new Error("PostHog syntheticException");this.addPendingPromise(zUe.buildEventMessage(this.getErrorPropertiesBuilder(),t,{syntheticException:s},r,n).then(a=>this._capturePreparedEvent({...a,uuid:i,flags:o},!1)))}}async captureExceptionImmediate(t,r,n,i){if(!zUe.isPreviouslyCapturedError(t)){let o=new Error("PostHog syntheticException");return this.addPendingPromise(zUe.buildEventMessage(this.getErrorPropertiesBuilder(),t,{syntheticException:o},r,n).then(s=>this.captureImmediate({...s,flags:i})))}}async prepareEventMessage(t){return this._prepareEventMessage(t)}async _prepareEventMessage(t,r={}){let{distinctId:n,event:i,properties:o,groups:s,flags:a,sendFeatureFlags:c,timestamp:l,disableGeoip:u,uuid:p}=t,d=this.context?.get(),f=r.includeContextProperties??!0,m=n||d?.distinctId,g=f?{...this.props,...d?.properties||{},...o||{}}:{...o||{}};m||(m=F2(),g.$process_person_profile=!1),f&&d?.sessionId&&!g.$session_id&&(g.$session_id=d.sessionId);let A=this._shouldSendMinimalFlagCalledEvent(i,g)?q9t(g):g,b=this._runBeforeSend({distinctId:m,event:i,properties:A,groups:s,flags:a,sendFeatureFlags:c,timestamp:l,disableGeoip:u,uuid:p});if(!b)return Promise.reject(null);let I=await Promise.resolve().then(async()=>{if(a)return c&&console.warn("[PostHog] Both `flags` and `sendFeatureFlags` were passed to capture(); using `flags` and ignoring `sendFeatureFlags`."),a._getEventProperties();if(c){den("sendFeatureFlags","`sendFeatureFlags` is deprecated and will be removed in a future major version. Pass a `flags` snapshot from `posthog.evaluateFlags(...)` instead \u2014 it avoids a second `/flags` request per capture and guarantees the event carries the exact flag values your code branched on.");let C=typeof c=="object"?c:void 0,x=await this.getFeatureFlagsForEvent(b.distinctId,s,u,C);return Llh(x)}return{}}).catch(()=>({})).then(C=>{let x=b.groups||s;return{...C,...b.properties||{},...x!==void 0&&Object.keys(x).length>0?{$groups:x}:{}}});return b.event==="$pageview"&&this.options.__preview_capture_bot_pageviews&&typeof I.$raw_user_agent=="string"&&fru(I.$raw_user_agent,this.options.custom_blocked_useragents||[])&&(b.event="$bot_pageview",I.$browser_type="bot"),{distinctId:b.distinctId,event:b.event,properties:I,options:{timestamp:b.timestamp,disableGeoip:b.disableGeoip,uuid:b.uuid}}}_runBeforeSend(t){let r=this.options.before_send;if(!r)return t;let n=Array.isArray(r)?r:[r],i=t;for(let o of n)try{if(i=o(i),!i)return this._logger.info(`Event '${t.event}' was rejected in beforeSend function`),null;if(!i.properties||Object.keys(i.properties).length===0){let s=`Event '${i.event}' has no properties after beforeSend function, this is likely an error.`;this._logger.warn(s)}}catch(s){return this._logger.error(`Error in before_send function for event '${t.event}':`,s),null}return i}};var uiu=require("async_hooks"),hen=class{constructor(){this.storage=new uiu.AsyncLocalStorage}get(){return this.storage.getStore()}run(t,r,n){return this.storage.run(this.resolve(t,n),r)}enter(t,r){this.storage.enterWith(this.resolve(t,r))}resolve(t,r){if(r?.fresh===!0)return t;let n=this.get()||{};return{distinctId:t.distinctId??n.distinctId,sessionId:t.sessionId??n.sessionId,properties:{...n.properties||{},...t.properties||{}}}}};var piu=require("async_hooks"),gen=class{active(){return this._storage.getStore()}with(t,r){return this._storage.run(t,r)}constructor(){this._storage=new piu.AsyncLocalStorage}};var fiu=require("zlib"),diu=require("util"),_lh=(0,diu.promisify)(fiu.gzip);async function miu(e,t=!0){try{let r=await _lh(e);return new Uint8Array(r)}catch(r){return t&&console.error("Failed to gzip compress data",r),null}}var Aen=require("os");function hiu(){let e,t;try{e=(0,Aen.platform)(),t=(0,Aen.release)()}catch{}return V7o(e,t)}var giu="posthog-node";function Ulh(e,{organization:t,projectId:r,prefix:n,severityAllowList:i=["error"],sendExceptionsToPostHog:o=!0}={}){return s=>{if(!(i==="*"||i.includes(s.level)))return s;s.tags||(s.tags={});let c=s.tags[lHo.POSTHOG_ID_TAG];if(c===void 0)return s;let l=e.options.host??"https://us.i.posthog.com",u=new URL(`/project/${e.apiKey}/person/${c}`,l).toString();s.tags["PostHog Person URL"]=u;let p=s.exception?.values||[],d=p.map(g=>({...g,stacktrace:g.stacktrace?{...g.stacktrace,type:"raw",frames:(g.stacktrace.frames||[]).map(A=>({...A,platform:"node:javascript"}))}:void 0})),f={$exception_message:p[0]?.value||s.message,$exception_type:p[0]?.type,$exception_level:s.level,$exception_list:d,$sentry_event_id:s.event_id,$sentry_exception:s.exception,$sentry_exception_message:p[0]?.value||s.message,$sentry_exception_type:p[0]?.type,$sentry_tags:s.tags},m=ST.getInjectedReleaseId();return m&&(f.$release_id=m),t&&r&&(f.$sentry_url=(n||"https://sentry.io/organizations/")+t+"/issues/?project="+r+"&query="+s.event_id),o&&e.capture({event:"$exception",distinctId:c,properties:f}),s}}var lHo=class{static{this.POSTHOG_ID_TAG="posthog_distinct_id"}constructor(t,r,n,i,o){this.name=giu,this.name=giu,this.setupOnce=function(s,a){let c=a()?.getClient()?.getDsn()?.projectId;s(Ulh(t,{organization:r,projectId:c,prefix:n,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}};var cre=class extends men{getLibraryId(){return"posthog-node"}compressPayload(t){return miu(t,this.isDebug)}initializeContext(){return new hen}initializeSpanContextManager(){return new gen}hostResourceAttributes(){return hiu()}createErrorPropertiesBuilder(){return new ST.ErrorPropertiesBuilder([new ST.EventCoercer,new ST.ErrorCoercer,new ST.ObjectCoercer,new ST.StringCoercer,new ST.PrimitiveCoercer],ST.createStackParser("node:javascript",ST.nodeStackLineParser),[oru(),t=>Unu(t,void 0,this._logger),Wnu()])}};function Aiu(e){return e==null||!e.enabled?!1:e.variant==null||e.variant==="true"}var yen=class{isEnabled(){return Promise.resolve(!1)}getCachedValue(){}flush(){return Promise.resolve()}},Vlh="feature_flag_evaluated",Glh=3e3,qlh=3e3,ben=class{evaluator;environment;sendFeatureFlagEvents;pending=new Map;resolved=new Map;constructor({environment:t,sendFeatureFlagEvents:r,posthogApiKey:n,evaluator:i}){this.environment=t,this.sendFeatureFlagEvents=r,this.evaluator=i??new cre(n??"",{featureFlagsRequestTimeoutMs:Glh,isServer:!1})}isEnabled(t,r){let n=yiu(t,r),i=this.pending.get(n);if(i!=null)return i;let o=this.evaluateAndRemember(t,r,n);return this.pending.set(n,o),o}async evaluateAndRemember(t,r,n){let i=await this.evaluate(t,r);return this.resolved.set(n,i),i}getCachedValue(t,r){return this.resolved.get(yiu(t,r))}async flush(){if(!this.sendFeatureFlagEvents)return;let t;try{await Promise.race([this.flushAfterPendingEvaluations(),new Promise(r=>{t=setTimeout(r,qlh),t.unref()})])}catch{}finally{clearTimeout(t)}}async flushAfterPendingEvaluations(){await Promise.allSettled(this.pending.values()),await this.evaluator.flush()}async evaluate(t,r){let{org:n}=r,i=Hlh(r,this.environment),o;try{o=await this.evaluator.getFeatureFlagResult(t,uHo(n),{personProperties:i,groups:{organization:n},groupProperties:{organization:i},sendFeatureFlagEvents:!1})}catch{return!1}return this.sendFeatureFlagEvents&&this.captureFlagUsage({flag:t,org:n,result:o,properties:i}),Aiu(o)}captureFlagUsage({flag:t,org:r,result:n,properties:i}){let o=Wlh(n),s={...i,...n?.reason!=null?{$feature_flag_reason:n.reason}:{},version:"5.218.0"};this.tryCapture({distinctId:uHo(r),event:"$feature_flag_called",groups:{organization:r},properties:{...s,$feature_flag:t,$feature_flag_response:o,[`$feature/${t}`]:o}}),this.tryCapture({distinctId:uHo(r),event:Vlh,groups:{organization:r},properties:{...s,flag:t,response:o,enabled:Aiu(n)}})}tryCapture(t){try{this.evaluator.capture(t)}catch{}}};function Wlh(e){if(e!=null)return e.enabled?e.variant??!0:!1}function uHo(e){return`org:${e}`}function Hlh({org:e,generator:t,language:r},n){return{org:e,environment:n,...t!=null?{generator:t}:{},...r!=null?{language:r}:{}}}function yiu(e,{org:t,generator:r,language:n}){return JSON.stringify([e,t,r??null,n??null])}var Een;function Ien(){return Een==null&&(Een=Klh()),Een}async function pHo(){await Een?.flush()}function Klh(){let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal";return e==null||e.trim().length===0?new yen:new ben({posthogApiKey:e,environment:UK(),sendFeatureFlagEvents:C$r()})}var ven=class{posthog;constructor({posthogApiKey:t}){this.posthog=new cre(t,{isServer:!1})}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"5.218.0",usingAccessToken:!0,cliReleaseEnvironment:UK(),...Wpe()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:{...t.properties,cliReleaseEnvironment:UK()}})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}};var pqt=class{async sendEvent(){}async sendAutomationEvent(){}async identify(){}async flush(){}};nf();rr();var Ylt=require("fs/promises"),biu=require("os"),Eiu=require("path");N4e();var Jlh="id",Ylh=".fern",fqt=class{posthog;userId;token;constructor({token:t,posthogApiKey:r}){this.posthog=new cre(r,{isServer:!1}),this.userId=t==null?void 0:j7i(t),this.token=t}async identify(){this.userId!=null&&this.posthog.alias({distinctId:this.userId,alias:await this.getPersistedDistinctId()})}async sendEvent(t){let r=await this.getUserEmail();this.posthog.capture({distinctId:this.userId??await this.getPersistedDistinctId(),event:"CLI",properties:{version:"5.218.0",...t,...t.properties,usingAccessToken:!1,cliReleaseEnvironment:UK(),agent:Plr(),...r!=null?{userEmail:r}:{},...Wpe()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:{...t.properties,cliReleaseEnvironment:UK()}})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}userEmail;async getUserEmail(){if(this.userEmail!==null){if(this.userEmail!=null)return this.userEmail;if(this.token==null){this.userEmail=null;return}try{let t=await Pl({token:this.token.value}).user.getMyself();if(t.ok&&t.body.email!=null)return this.userEmail=t.body.email,this.userEmail}catch{}this.userEmail=null}}persistedDistinctId;async getPersistedDistinctId(){if(this.persistedDistinctId==null){let t=Ew(),r=ke(Xt.of((0,biu.homedir)()),Ee.of(Ylh),Ee.of(Jlh));try{await Gt(r)?this.persistedDistinctId=(await(0,Ylt.readFile)(r)).toString():(await(0,Ylt.mkdir)((0,Eiu.dirname)(r),{recursive:!0}),await(0,Ylt.writeFile)(r,t),this.persistedDistinctId=t)}catch{this.persistedDistinctId=t}}return this.persistedDistinctId}};var fHo;async function dqt(){return fHo==null&&(fHo=await Xlh()),fHo}async function Xlh(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal";if(e==null||!C$r())return new pqt;let t=await lXe();return t!=null?new fqt({token:t,posthogApiKey:e}):await Az()!=null?new ven({posthogApiKey:e}):new fqt({token:void 0,posthogApiKey:e})}catch{return new pqt}}cn();gt();Bt();vQ();var mqt=Ae(require("process"),1);AHe();var Ciu=Ae(HJi(),1),xiu=Ae(viu(),1);function wT(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=XW(e),e.length===0))return 0;e=e.replace((0,xiu.default)()," ");let r=t.ambiguousIsNarrow?1:2,n=0;for(let i of e){let o=i.codePointAt(0);if(o<=31||o>=127&&o<=159||o>=768&&o<=879)continue;switch(Ciu.default.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}cn();function Cen(e){let t=0;for(let r of e.split(`
|
|
3483
3487
|
`))t=Math.max(t,wT(r));return t}var Giu=Ae(mHo(),1);var $lh=/[\p{Lu}]/u,euh=/[\p{Ll}]/u,Tiu=/^[\p{Lu}](?![\p{Lu}])/gu,Biu=/([\p{Alpha}\p{N}_]|$)/u,hHo=/[_.\- ]+/,tuh=new RegExp("^"+hHo.source),Oiu=new RegExp(hHo.source+Biu.source,"gu"),Piu=new RegExp("\\d+"+Biu.source,"gu"),ruh=(e,t,r,n)=>{let i=!1,o=!1,s=!1,a=!1;for(let c=0;c<e.length;c++){let l=e[c];a=c>2?e[c-3]==="-":!0,i&&$lh.test(l)?(e=e.slice(0,c)+"-"+e.slice(c),i=!1,s=o,o=!0,c++):o&&s&&euh.test(l)&&(!a||n)?(e=e.slice(0,c-1)+"-"+e.slice(c-1),s=o,o=!1,i=!0):(i=t(l)===l&&r(l)!==l,s=o,o=r(l)===l&&t(l)!==l)}return e},nuh=(e,t)=>(Tiu.lastIndex=0,e.replace(Tiu,r=>t(r))),iuh=(e,t)=>(Oiu.lastIndex=0,Piu.lastIndex=0,e.replace(Oiu,(r,n)=>t(n)).replace(Piu,r=>t(r)));function gHo(e,t){if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},Array.isArray(e)?e=e.map(o=>o.trim()).filter(o=>o.length).join("-"):e=e.trim(),e.length===0)return"";let r=t.locale===!1?o=>o.toLowerCase():o=>o.toLocaleLowerCase(t.locale),n=t.locale===!1?o=>o.toUpperCase():o=>o.toLocaleUpperCase(t.locale);return e.length===1?hHo.test(e)?"":t.pascalCase?n(e):r(e):(e!==r(e)&&(e=ruh(e,r,n,t.preserveConsecutiveUppercase)),e=e.replace(tuh,""),e=t.preserveConsecutiveUppercase?nuh(e,r):r(e),t.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),iuh(e,n))}var EHo=Ae(Riu(),1);AHe();var kiu=(e=0)=>t=>`\x1B[${t+e}m`,Fiu=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Niu=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,HE={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]}},yeC=Object.keys(HE.modifier),cuh=Object.keys(HE.color),luh=Object.keys(HE.bgColor),beC=[...cuh,...luh];function uuh(){let e=new Map;for(let[t,r]of Object.entries(HE)){for(let[n,i]of Object.entries(r))HE[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=HE[n],e.set(i[0],i[1]);Object.defineProperty(HE,t,{value:r,enumerable:!1})}return Object.defineProperty(HE,"codes",{value:e,enumerable:!1}),HE.color.close="\x1B[39m",HE.bgColor.close="\x1B[49m",HE.color.ansi=kiu(),HE.color.ansi256=Fiu(),HE.color.ansi16m=Niu(),HE.bgColor.ansi=kiu(10),HE.bgColor.ansi256=Fiu(10),HE.bgColor.ansi16m=Niu(10),Object.defineProperties(HE,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?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(n/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[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>HE.rgbToAnsi256(...HE.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let s=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>HE.ansi256ToAnsi(HE.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>HE.ansi256ToAnsi(HE.hexToAnsi256(t)),enumerable:!1}}),HE}var puh=uuh(),jiu=puh;var xen=new Set(["\x1B","\x9B"]),fuh=39,yHo="\x07",Miu="[",duh="]",Liu="m",bHo=`${duh}8;;`,ziu=e=>`${xen.values().next().value}${Miu}${e}${Liu}`,Qiu=e=>`${xen.values().next().value}${bHo}${e}${yHo}`,muh=e=>e.split(" ").map(t=>wT(t)),AHo=(e,t,r)=>{let n=[...t],i=!1,o=!1,s=wT(XW(e[e.length-1]));for(let[a,c]of n.entries()){let l=wT(c);if(s+l<=r?e[e.length-1]+=c:(e.push(c),s=0),xen.has(c)&&(i=!0,o=n.slice(a+1).join("").startsWith(bHo)),i){o?c===yHo&&(i=!1,o=!1):c===Liu&&(i=!1);continue}s+=l,s===r&&a<n.length-1&&(e.push(""),s=0)}!s&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},huh=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(wT(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},guh=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,o,s=muh(e),a=[""];for(let[l,u]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=wT(a[a.length-1]);if(l!==0&&(p>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),p=0),(p>0||r.trim===!1)&&(a[a.length-1]+=" ",p++)),r.hard&&s[l]>t){let d=t-p,f=1+Math.floor((s[l]-d-1)/t);Math.floor((s[l]-1)/t)<f&&a.push(""),AHo(a,u,t);continue}if(p+s[l]>t&&p>0&&s[l]>0){if(r.wordWrap===!1&&p<t){AHo(a,u,t);continue}a.push("")}if(p+s[l]>t&&r.wordWrap===!1){AHo(a,u,t);continue}a[a.length-1]+=u}r.trim!==!1&&(a=a.map(l=>huh(l)));let c=[...a.join(`
|
|
3484
3488
|
`)];for(let[l,u]of c.entries()){if(n+=u,xen.has(u)){let{groups:d}=new RegExp(`(?:\\${Miu}(?<code>\\d+)m|\\${bHo}(?<uri>.*)${yHo})`).exec(c.slice(l).join(""))||{groups:{}};if(d.code!==void 0){let f=Number.parseFloat(d.code);i=f===fuh?void 0:f}else d.uri!==void 0&&(o=d.uri.length===0?void 0:d.uri)}let p=jiu.codes.get(Number(i));c[l+1]===`
|
|
3485
3489
|
`?(o&&(n+=Qiu("")),i&&p&&(n+=ziu(p))):u===`
|
|
@@ -4145,7 +4149,7 @@ ${ut.stack}`),ee&&m?.({event:"reload",ok:!1,durationMs:Date.now()-we,error:en(ut
|
|
|
4145
4149
|
|
|
4146
4150
|
`),o.add(u),l.on("close",()=>o.delete(u));return}s.requestStarted(),u.once("close",()=>s.requestFinished());let d=mIp(l.url,i),f=iRs.default.request(d!=null?{host:"127.0.0.1",port:n,method:l.method,path:d,headers:l.headers}:{host:"127.0.0.1",port:t,method:l.method,path:l.url,headers:{...l.headers,[yIp]:r}},m=>{let g={...m.headers};if(!((g["content-type"]??"").includes("text/html")&&g["content-encoding"]==null)){u.writeHead(m.statusCode??502,g),m.pipe(u);return}let b=[];m.on("data",I=>b.push(I)),m.on("end",()=>{let I=Buffer.concat(b).toString("utf-8"),C=I.lastIndexOf("</body>"),x=C>=0?`${I.slice(0,C)}${gIp}${I.slice(C)}`:`${I}${gIp}`,S=Buffer.from(x,"utf-8");delete g["transfer-encoding"],g["content-length"]=S.byteLength.toString(),u.writeHead(m.statusCode??502,g),u.end(S)}),m.on("error",()=>u.destroy())});f.on("error",m=>{u.headersSent||u.writeHead(502,{"content-type":"text/plain"}),u.end(`Astro preview server unavailable: ${m.message}
|
|
4147
4151
|
`)}),l.pipe(f)})}function OWg({req:e,res:t,pathname:r,port:n,serverInfo:i,onShutdownRequest:o}){let s=(c,l,u={})=>{t.writeHead(c,{"content-type":"application/json","cache-control":"no-store",...u}),t.end(`${JSON.stringify(l)}
|
|
4148
|
-
`)},a=_ju({remoteAddress:e.socket.remoteAddress,host:e.headers.host,origin:e.headers.origin,controlHeader:e.headers[axt],serverPort:n});if(a!=null){s(403,{error:a});return}if(r===oxt){if(e.method!=="GET"){s(405,{error:"use GET"},{allow:"GET"});return}s(200,i);return}if(e.method!=="POST"){s(405,{error:"use POST"},{allow:"POST"});return}t.once("finish",o),s(202,{stopping:!0},{connection:"close"})}function PWg(){return new Promise((e,t)=>{let r=oRs.default.createServer();r.once("error",t),r.listen(0,"127.0.0.1",()=>{let n=r.address(),i=typeof n=="object"&&n!=null?n.port:void 0;r.close(()=>i!=null?e(i):t(new Error("could not allocate a port")))})})}function BWg(e,t,r){let n=Date.now()+r;return new Promise((i,o)=>{let s=!1;t.on("exit",c=>{s=!0,o(new Error(`Astro preview server exited with code ${c} before becoming ready`))});let a=()=>{if(s)return;if(Date.now()>n){o(new Error("timed out waiting for the Astro preview server to become ready"));return}let c=oRs.default.connect(e,"127.0.0.1");c.once("connect",()=>{c.destroy(),i()}),c.once("error",()=>{c.destroy(),setTimeout(a,200)})};a()})}gt();Bt();var vIp=/^[a-z0-9-]+-preview-[a-z0-9-]+\.docs\.buildwithfern\.com$/i,EIp="docs.buildwithfern.com",IIp=62;function _9e(e){let t=e.toLowerCase().trim();t.startsWith("https://")?t=t.slice(8):t.startsWith("http://")&&(t=t.slice(7));let r=t.indexOf("/");return r!==-1&&(t=t.slice(0,r)),vIp.test(t)}function yer({orgId:e,previewId:t}){let r=sX(t),n=`${e}-preview-${r}.${EIp}`;if(n.length<=IIp)return n;let i=`${e}-preview-`,o=IIp-i.length;if(o<8)throw new T({message:`Organization name "${e}" is too long to generate a valid preview URL`,code:T.Code.ValidationError});let a=r.slice(0,o).replace(/-+$/,"");return`${i}${a}.${EIp}`}gt();c0();nm();rr();NE();Bt();cn();var FRs=require("child_process"),Nvp=Ae(xIp(),1),NRs=Ae(cIi(),1),jRs=Ae(require("fs"),1),QRs=require("fs/promises"),jvp=Ae(require("http"),1),zvp=Ae(require("os"),1),wIi=Ae(require("path"),1);PRs();c0();rr();var BRs=require("fs/promises");async function DRs(e,t){let r=new Map,{docsDefinition:n,translationPages:i,translationNavigationOverlays:o,translatedApiDefinitions:s,collectedFileIds:a,docsWorkspacePath:c,markdownFilesToPathName:l}=e,u=i!=null&&Object.keys(i).length>0,p=s!=null&&Object.keys(s).length>0;if(!u&&!p)return r;let d=n.config.translations?.defaultLocale,f=new Set([...Object.keys(i??{}),...Object.keys(s??{})]);for(let m of f){if(m===d)continue;let g=i?.[m]??{};try{let A=async le=>{let se=go(c,le),he=Rn(c,Ee.of(`translations/${m}/${se}`));return await Gt(he)?he:le},b=async le=>{let se=await A(le),he=await(0,BRs.readFile)(se,"utf-8"),xe=he.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);return xe!=null?he.slice(xe[0].length):he},I=async le=>{let se=await A(le);return(0,BRs.readFile)(se,"utf-8")},C={};for(let[le,se]of Object.entries(n.pages))se!=null&&(C[le]=se);for(let[le,se]of Object.entries(g))try{let he=C[le],xe=Rn(c,Ee.of(le)),{markdown:Te}=await Bk({markdown:se,absolutePathToFernFolder:c,absolutePathToMarkdownFile:xe,context:t,markdownLoader:b}),pe=await E_({markdown:Te,absolutePathToFernFolder:c,absolutePathToMarkdownFile:xe,context:t,fileLoader:I}),ue=I_({markdown:pe,absolutePathToFernFolder:c,absolutePathToMarkdownFile:xe,context:t}),Pe=AO(ue);Pe=h_(Pe,a,l,{absolutePathToMarkdownFile:xe,absolutePathToFernFolder:c},t),C[le]={markdown:Pe,rawMarkdown:Pe,editThisPageUrl:he?.editThisPageUrl,editThisPageLaunch:he?.editThisPageLaunch}}catch(he){t.logger.warn(`Failed to process translated page "${le}" for locale "${m}": ${String(he)}. Falling back to base page.`)}let x=x5e(n.config.root,g,t),S=o?.[m],B=n.config.announcement,D=n.config.navbarLinks;S!=null&&(x=w5e(x,S),B=T5e(S)??B,S.navbarLinks!=null&&(D=S.navbarLinks));let R=n.apis,O=s?.[m],z=O,X;if(O!=null&&x!=null){let le=v5e(x,R,O);le.size>0&&(t.logger.warn(`Translated API definition(s) [${Array.from(le).join(", ")}] for locale "${m}" diverge from the default-locale spec (e.g. changed OpenAPI tag names, operationIds, or paths, or a missing/added endpoint), so they can't be fully matched to the navigation tree. Serving the default-locale API for those (localized sidebar titles are still applied where they can be matched). For fully localized API reference content, translate only human-readable text and keep tag names/operationIds/paths identical to the base spec.`),z=Object.fromEntries(Object.entries(O).filter(([se])=>!le.has(se)))),X=new Set(Object.keys(O).filter(se=>!le.has(se)))}let te=z!=null&&Object.keys(z).length>0?{...n.apis,...z}:n.apis;O!=null&&Object.keys(O).length>0&&x!=null&&(x=C5e(x,R,O,{rewritableApiIds:X}));let ae={...n,apis:te,pages:C,config:{...n.config,root:x,announcement:B,navbarLinks:D,settings:O5e(n.config.settings,S)}};r.set(m,ae),t.logger.debug(`Computed translated definition for locale "${m}"`+(O!=null?` (with ${Object.keys(O).length} translated API(s))`:""))}catch(A){t.logger.warn(`Failed to compute translation for locale "${m}": ${String(A)}`)}}return r}rr();var iW=require("fs/promises"),Pvp=require("os"),kRs=Ae(require("path"),1),nHg=".fern",iHg="logs",RRs=100*1024*1024;function oHg(){return"cli@5.
|
|
4152
|
+
`)},a=_ju({remoteAddress:e.socket.remoteAddress,host:e.headers.host,origin:e.headers.origin,controlHeader:e.headers[axt],serverPort:n});if(a!=null){s(403,{error:a});return}if(r===oxt){if(e.method!=="GET"){s(405,{error:"use GET"},{allow:"GET"});return}s(200,i);return}if(e.method!=="POST"){s(405,{error:"use POST"},{allow:"POST"});return}t.once("finish",o),s(202,{stopping:!0},{connection:"close"})}function PWg(){return new Promise((e,t)=>{let r=oRs.default.createServer();r.once("error",t),r.listen(0,"127.0.0.1",()=>{let n=r.address(),i=typeof n=="object"&&n!=null?n.port:void 0;r.close(()=>i!=null?e(i):t(new Error("could not allocate a port")))})})}function BWg(e,t,r){let n=Date.now()+r;return new Promise((i,o)=>{let s=!1;t.on("exit",c=>{s=!0,o(new Error(`Astro preview server exited with code ${c} before becoming ready`))});let a=()=>{if(s)return;if(Date.now()>n){o(new Error("timed out waiting for the Astro preview server to become ready"));return}let c=oRs.default.connect(e,"127.0.0.1");c.once("connect",()=>{c.destroy(),i()}),c.once("error",()=>{c.destroy(),setTimeout(a,200)})};a()})}gt();Bt();var vIp=/^[a-z0-9-]+-preview-[a-z0-9-]+\.docs\.buildwithfern\.com$/i,EIp="docs.buildwithfern.com",IIp=62;function _9e(e){let t=e.toLowerCase().trim();t.startsWith("https://")?t=t.slice(8):t.startsWith("http://")&&(t=t.slice(7));let r=t.indexOf("/");return r!==-1&&(t=t.slice(0,r)),vIp.test(t)}function yer({orgId:e,previewId:t}){let r=sX(t),n=`${e}-preview-${r}.${EIp}`;if(n.length<=IIp)return n;let i=`${e}-preview-`,o=IIp-i.length;if(o<8)throw new T({message:`Organization name "${e}" is too long to generate a valid preview URL`,code:T.Code.ValidationError});let a=r.slice(0,o).replace(/-+$/,"");return`${i}${a}.${EIp}`}gt();c0();nm();rr();NE();Bt();cn();var FRs=require("child_process"),Nvp=Ae(xIp(),1),NRs=Ae(cIi(),1),jRs=Ae(require("fs"),1),QRs=require("fs/promises"),jvp=Ae(require("http"),1),zvp=Ae(require("os"),1),wIi=Ae(require("path"),1);PRs();c0();rr();var BRs=require("fs/promises");async function DRs(e,t){let r=new Map,{docsDefinition:n,translationPages:i,translationNavigationOverlays:o,translatedApiDefinitions:s,collectedFileIds:a,docsWorkspacePath:c,markdownFilesToPathName:l}=e,u=i!=null&&Object.keys(i).length>0,p=s!=null&&Object.keys(s).length>0;if(!u&&!p)return r;let d=n.config.translations?.defaultLocale,f=new Set([...Object.keys(i??{}),...Object.keys(s??{})]);for(let m of f){if(m===d)continue;let g=i?.[m]??{};try{let A=async le=>{let se=go(c,le),he=Rn(c,Ee.of(`translations/${m}/${se}`));return await Gt(he)?he:le},b=async le=>{let se=await A(le),he=await(0,BRs.readFile)(se,"utf-8"),xe=he.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);return xe!=null?he.slice(xe[0].length):he},I=async le=>{let se=await A(le);return(0,BRs.readFile)(se,"utf-8")},C={};for(let[le,se]of Object.entries(n.pages))se!=null&&(C[le]=se);for(let[le,se]of Object.entries(g))try{let he=C[le],xe=Rn(c,Ee.of(le)),{markdown:Te}=await Bk({markdown:se,absolutePathToFernFolder:c,absolutePathToMarkdownFile:xe,context:t,markdownLoader:b}),pe=await E_({markdown:Te,absolutePathToFernFolder:c,absolutePathToMarkdownFile:xe,context:t,fileLoader:I}),ue=I_({markdown:pe,absolutePathToFernFolder:c,absolutePathToMarkdownFile:xe,context:t}),Pe=AO(ue);Pe=h_(Pe,a,l,{absolutePathToMarkdownFile:xe,absolutePathToFernFolder:c},t),C[le]={markdown:Pe,rawMarkdown:Pe,editThisPageUrl:he?.editThisPageUrl,editThisPageLaunch:he?.editThisPageLaunch}}catch(he){t.logger.warn(`Failed to process translated page "${le}" for locale "${m}": ${String(he)}. Falling back to base page.`)}let x=x5e(n.config.root,g,t),S=o?.[m],B=n.config.announcement,D=n.config.navbarLinks;S!=null&&(x=w5e(x,S),B=T5e(S)??B,S.navbarLinks!=null&&(D=S.navbarLinks));let R=n.apis,O=s?.[m],z=O,X;if(O!=null&&x!=null){let le=v5e(x,R,O);le.size>0&&(t.logger.warn(`Translated API definition(s) [${Array.from(le).join(", ")}] for locale "${m}" diverge from the default-locale spec (e.g. changed OpenAPI tag names, operationIds, or paths, or a missing/added endpoint), so they can't be fully matched to the navigation tree. Serving the default-locale API for those (localized sidebar titles are still applied where they can be matched). For fully localized API reference content, translate only human-readable text and keep tag names/operationIds/paths identical to the base spec.`),z=Object.fromEntries(Object.entries(O).filter(([se])=>!le.has(se)))),X=new Set(Object.keys(O).filter(se=>!le.has(se)))}let te=z!=null&&Object.keys(z).length>0?{...n.apis,...z}:n.apis;O!=null&&Object.keys(O).length>0&&x!=null&&(x=C5e(x,R,O,{rewritableApiIds:X}));let ae={...n,apis:te,pages:C,config:{...n.config,root:x,announcement:B,navbarLinks:D,settings:O5e(n.config.settings,S)}};r.set(m,ae),t.logger.debug(`Computed translated definition for locale "${m}"`+(O!=null?` (with ${Object.keys(O).length} translated API(s))`:""))}catch(A){t.logger.warn(`Failed to compute translation for locale "${m}": ${String(A)}`)}}return r}rr();var iW=require("fs/promises"),Pvp=require("os"),kRs=Ae(require("path"),1),nHg=".fern",iHg="logs",RRs=100*1024*1024;function oHg(){return"cli@5.218.0"}var H9e=class{logFilePath=null;initialized=!1;sessionStartTime;consoleLogger;constructor(){this.sessionStartTime=Date.now()}async initialize(t,r){if(this.initialized)return;this.consoleLogger=t;let n=r??ke(ke(Xt.of((0,Pvp.homedir)()),Ee.of(nHg)),Ee.of(iHg));await Gt(n)||await(0,iW.mkdir)(n,{recursive:!0});let o=`${new Date().toISOString().replace(/[:.]/g,"-")}.debug.log`;this.logFilePath=ke(n,Ee.of(o));let s=["================================================================================","Fern Docs Dev Debug Log",`Session started: ${new Date().toISOString()}`,`Log file: ${kRs.default.basename(this.logFilePath)}`,"================================================================================",""].join(`
|
|
4149
4153
|
`);await(0,iW.writeFile)(this.logFilePath,s,"utf-8"),this.initialized=!0,this.enforceLogSizeLimit(n)}getLogFilePath(){return this.logFilePath}async writeEntry(t){if(!this.initialized||!this.logFilePath)return;let r=JSON.stringify(t)+`
|
|
4150
4154
|
`;try{await(0,iW.appendFile)(this.logFilePath,r,"utf-8")}catch{}}async logFrontendMetrics(t){let r={timestamp:t.timestamp,source:t.source,level:t.level,eventType:this.getEventType(t.payload,t.isAggregate),isAggregate:t.isAggregate,data:t.payload};await this.writeEntry(r)}async logCliMetric(t,r="info"){let n={timestamp:t.timestamp,source:oHg(),level:r,eventType:t.type,data:{durationMs:t.durationMs,metadata:t.metadata}};await this.writeEntry(n)}async logCliMemory(){let t=process.memoryUsage(),r={type:"cli_memory",timestamp:new Date().toISOString(),metadata:{heapUsed:t.heapUsed,heapTotal:t.heapTotal,external:t.external,rss:t.rss,heapUsedMB:Math.round(t.heapUsed/1024/1024*100)/100,heapTotalMB:Math.round(t.heapTotal/1024/1024*100)/100,rssMB:Math.round(t.rss/1024/1024*100)/100}};await this.logCliMetric(r)}async logCliReloadStart(){let t={type:"cli_reload_start",timestamp:new Date().toISOString()};await this.logCliMetric(t)}async logCliReloadFinish(t,r){let n={type:"cli_reload_finish",timestamp:new Date().toISOString(),durationMs:t,metadata:r};await this.logCliMetric(n)}async logCliDocsGeneration(t,r){let n={type:"cli_docs_generation",timestamp:new Date().toISOString(),durationMs:t,metadata:r};await this.logCliMetric(n)}async logCliValidation(t,r){let n={type:"cli_validation",timestamp:new Date().toISOString(),durationMs:t,metadata:{success:r}};await this.logCliMetric(n)}async enforceLogSizeLimit(t){try{let n=(await(0,iW.readdir)(t)).filter(c=>c.endsWith(".log")),i=[];for(let c of n){let l=kRs.default.join(t,c);try{let u=await(0,iW.stat)(l);i.push({name:c,fullPath:l,size:u.size,mtimeMs:u.mtimeMs})}catch{}}let o=i.reduce((c,l)=>c+l.size,0),s=Math.round(o/1024/1024*100)/100,a=RRs/1024/1024;if(o<=RRs){this.consoleLogger?.debug(`Log directory size ${s} MB does not exceed ${a} MB cap`);return}this.consoleLogger?.info(`Rotating logs: total size ${s} MB exceeds ${a} MB cap`),i.sort((c,l)=>c.mtimeMs-l.mtimeMs);for(let c of i){if(o<=RRs)break;if(!(this.logFilePath!=null&&c.fullPath===this.logFilePath))try{await(0,iW.unlink)(c.fullPath),o-=c.size}catch{}}}catch{}}getEventType(t,r){return r?"aggregate_summary":"type"in t&&typeof t.type=="string"?t.type:"unknown"}static isMetricsMessage(t){if(typeof t!="object"||t===null)return!1;let r=t;return r.type==="metrics"&&typeof r.timestamp=="string"&&typeof r.source=="string"}};var SIi={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"};function Bvp(e){let t=sHg();if(t==null)return;let{port:r,debugLogger:n,getDocsLoadResponse:i,extractLocaleFromPath:o}=e,s=new Map;function a(l){let u=JSON.stringify(l),p=[];for(let[d]of s)try{d.send(u)}catch{p.push(d)}for(let d of p){let f=s.get(d);f&&(clearInterval(f.pingInterval),s.delete(d))}}let c=t.serve({port:r,async fetch(l,u){if(l.method==="OPTIONS")return new Response(null,{status:204,headers:SIi});let p=new URL(l.url);if(l.headers.get("upgrade")?.toLowerCase()==="websocket"){u.upgrade(l,{data:{connectionId:`${Date.now()}`}});return}if(l.method==="POST"&&p.pathname==="/v2/registry/docs/load-with-url")try{let f=await l.json(),m=o?.(f?.url);return new Response(JSON.stringify(i(m)),{headers:{"Content-Type":"application/json",...SIi}})}catch{return new Response(JSON.stringify(i()),{headers:{"Content-Type":"application/json",...SIi}})}let d=/^\/_local\/(.*)/.exec(p.pathname);return l.method==="GET"&&d!=null?new Response(t.file(`/${d[1]}`),{headers:SIi}):new Response("Not Found",{status:404})},websocket:{open(l){let{connectionId:u}=l.data,p=setInterval(()=>{let d=s.get(l);if(!d)return;let f=Date.now();if(f-d.lastPong>9e4){l.close();return}try{l.send(JSON.stringify({type:"ping",timestamp:f}))}catch{l.close()}},3e4);s.set(l,{pingInterval:p,lastPong:Date.now()});try{l.send(JSON.stringify({type:"connected",connectionId:u}))}catch{}},message(l,u){try{let p=JSON.parse(u.toString());if(p.type==="pong"){let d=s.get(l);d&&(d.lastPong=Date.now())}else H9e.isMetricsMessage(p)&&n.logFrontendMetrics(p)}catch{}},close(l){let u=s.get(l);u&&(clearInterval(u.pingInterval),s.delete(l))}}});return{sendData:a,stop:l=>c.stop(l)}}function sHg(){return globalThis.Bun}var Dvp=require("fs"),Rvp=Ae(require("path"),1),aHg=`"use strict";
|
|
4151
4155
|
|
|
@@ -4483,7 +4487,7 @@ ${A}
|
|
|
4483
4487
|
|
|
4484
4488
|
Add a 'docs:' section to your fern.yml to get started.`,code:T.Code.ConfigError});let i=n.docs.raw.libraries;if(i==null)throw new T({message:`No libraries configured in docs.yml.
|
|
4485
4489
|
|
|
4486
|
-
Add a 'libraries' section to configure library documentation.`,code:T.Code.ConfigError});let o=await t.getTokenOrPrompt();await t.verifyOrgAccess({organization:n.org,token:o});let s=n.docs.absoluteFilePath??n.absoluteFilePath??t.cwd,a=Xt.of(Vr(s)),c=new bd({context:t,logLevel:Un.Info});await Frr({libraries:i,library:r.library,docsDirectoryPath:a,orgId:n.org,tokenValue:o.value,context:c,wrapStep:UO,docsConfig:n.docs.raw})}};function ULs(e){let t=new _Ls;ni(e,"generate","[Beta] Generate MDX documentation from library source code. Requires 'libraries' config in docs.yml.",(r,n)=>t.handle(r,n),r=>r.option("library",{type:"string",description:"Name of a specific library defined in docs.yml to generate docs for"}))}function VLs(e){gA({cli:e,name:"md",subcommands:[ULs,lLs]})}Bt();function q1i(e,t,r,n,i,o){e.command(t,r,s=>{for(let a of o)a(s);return s.command("$0",!1,a=>{let c=a.version(!1);return i!=null?i(c):c},Ytn(n)),s.version(!1).usage(r)})}gt();c0();Bt();cn();gt();Bt();var W1i=class{context;task;project;docsWorkspace;ossWorkspaces;token;constructor({context:t,task:r,project:n,docsWorkspace:i,ossWorkspaces:o,token:s}){this.context=t,this.task=r,this.project=n,this.docsWorkspace=i,this.ossWorkspaces=o,this.token=s}async publish({instanceUrl:t,preview:r,previewId:n,skipUpload:i}){let o=new bd({context:this.context,task:this.task});try{let s=await H$t({organization:this.project.config.organization,apiWorkspaces:this.project.apiWorkspaces,ossWorkspaces:this.ossWorkspaces,docsWorkspace:this.docsWorkspace,context:o,token:this.token,instanceUrl:t,preview:r,previewId:n,disableTemplates:void 0,skipUpload:i,cliVersion:"5.
|
|
4490
|
+
Add a 'libraries' section to configure library documentation.`,code:T.Code.ConfigError});let o=await t.getTokenOrPrompt();await t.verifyOrgAccess({organization:n.org,token:o});let s=n.docs.absoluteFilePath??n.absoluteFilePath??t.cwd,a=Xt.of(Vr(s)),c=new bd({context:t,logLevel:Un.Info});await Frr({libraries:i,library:r.library,docsDirectoryPath:a,orgId:n.org,tokenValue:o.value,context:c,wrapStep:UO,docsConfig:n.docs.raw})}};function ULs(e){let t=new _Ls;ni(e,"generate","[Beta] Generate MDX documentation from library source code. Requires 'libraries' config in docs.yml.",(r,n)=>t.handle(r,n),r=>r.option("library",{type:"string",description:"Name of a specific library defined in docs.yml to generate docs for"}))}function VLs(e){gA({cli:e,name:"md",subcommands:[ULs,lLs]})}Bt();function q1i(e,t,r,n,i,o){e.command(t,r,s=>{for(let a of o)a(s);return s.command("$0",!1,a=>{let c=a.version(!1);return i!=null?i(c):c},Ytn(n)),s.version(!1).usage(r)})}gt();c0();Bt();cn();gt();Bt();var W1i=class{context;task;project;docsWorkspace;ossWorkspaces;token;constructor({context:t,task:r,project:n,docsWorkspace:i,ossWorkspaces:o,token:s}){this.context=t,this.task=r,this.project=n,this.docsWorkspace=i,this.ossWorkspaces=o,this.token=s}async publish({instanceUrl:t,preview:r,previewId:n,skipUpload:i}){let o=new bd({context:this.context,task:this.task});try{let s=await H$t({organization:this.project.config.organization,apiWorkspaces:this.project.apiWorkspaces,ossWorkspaces:this.ossWorkspaces,docsWorkspace:this.docsWorkspace,context:o,token:this.token,instanceUrl:t,preview:r,previewId:n,disableTemplates:void 0,skipUpload:i,cliVersion:"5.218.0",loginCommand:"fern auth login"});return o.getResult()===mf.Failure?{success:!1}:{success:!0,url:s}}catch(s){return{success:!1,error:en(s)}}}};gt();cn();var nPt=class e{static MAX_DISPLAYED_LOGS_TTY=10;static URL_PATTERN=/https?:\/\/[^\s]+/;context;stream;tasks={};taskOrder=[];startTime;isRegistered=!1;constructor(t){this.context=t.context,this.stream=t.stream??process.stderr}addTask(t){let r={...t,status:t.status??"pending"};return this.tasks[t.id]=r,this.taskOrder.push(t.id),this}async start(t){return this.startTime=Date.now(),t!=null&&await this.context.ttyAwareLogger.takeOverTerminal(()=>{this.stream.write(`
|
|
4487
4491
|
`),this.stream.write(`${ce.cyan("\u25C6")} ${ce.bold(t.title)}
|
|
4488
4492
|
`),t.subtitle!=null&&this.stream.write(` ${ce.dim(t.subtitle)}
|
|
4489
4493
|
`),this.stream.write(`
|
|
@@ -5550,7 +5554,7 @@ ${r}`}function lBi(e){let t=this,{emitParseErrors:r,...n}={...t.data("settings")
|
|
|
5550
5554
|
`),g="";return c&&(g=u.style.error(c)),[`${p} ${f} ${s}`,[m,g].filter(Boolean).join(`
|
|
5551
5555
|
`)]});var rZA=ex((e,t)=>{let{validate:r=()=>!0}=e,n=OI(e.theme),[i,o]=sl("idle"),[s,a]=sl(),[c,l]=sl(""),u=ZC({status:i,theme:n});$C(async(g,A)=>{if(i==="idle")if(XC(g)){let b=c;o("loading");let I=await r(b);I===!0?(l(b),o("done"),t(b)):(A.write(c),a(I||"You must provide a valid value"),o("idle"))}else l(A.line),a(void 0)});let p=n.style.message(e.message,i),d="",f;e.mask?d=(typeof e.mask=="string"?e.mask:"*").repeat(c.length):i!=="done"&&(f=`${n.style.help("[input is masked]")}${cBt}`),i==="done"&&(d=n.style.answer(d));let m="";return s&&(m=n.style.error(s)),[[u,p,e.mask?d:f].join(" "),m]});var s7e=Ae(Iw(),1);var nZA={icon:{cursor:Vx.pointer},style:{disabled:e=>s7e.default.dim(`- ${e}`),searchTerm:e=>s7e.default.cyan(e),description:e=>s7e.default.cyan(e),keysHelpTip:e=>e.map(([t,r])=>`${s7e.default.bold(t)} ${s7e.default.dim(r)}`).join(s7e.default.dim(" \u2022 "))},helpMode:"always"};function hYs(e){return!Td.isSeparator(e)&&!e.disabled}function iZA(e){return e.map(t=>{if(Td.isSeparator(t))return t;if(typeof t=="string")return{value:t,name:t,short:t,disabled:!1};let r=t.name??String(t.value),n={value:t.value,name:r,short:t.short??r,disabled:t.disabled??!1};return t.description&&(n.description=t.description),n})}var oZA=ex((e,t)=>{let{pageSize:r=7,validate:n=()=>!0}=e,i=OI(nZA,e.theme),[o,s]=sl("loading"),[a,c]=sl(""),[l,u]=sl([]),[p,d]=sl(),f=ZC({status:o,theme:i}),m=i6(()=>{let z=l.findIndex(hYs),X=l.findLastIndex(hYs);return{first:z,last:X}},[l]),[g=m.first,A]=sl();E4(()=>{let z=new AbortController;return s("loading"),d(void 0),(async()=>{try{let ee=await e.source(a||void 0,{signal:z.signal});z.signal.aborted||(A(void 0),d(void 0),u(iZA(ee)),s("idle"))}catch(ee){!z.signal.aborted&&ee instanceof Error&&d(ee.message)}})(),()=>{z.abort()}},[a]);let b=l[g];$C(async(z,X)=>{if(XC(z))if(b){s("loading");let ee=await n(b.value);s("idle"),ee===!0?(s("done"),t(b.value)):b.name===a?d(ee||"You must provide a valid value"):(X.write(b.name),c(b.name))}else X.write(a);else if(xye(z)&&b)X.clearLine(0),X.write(b.name),c(b.name);else if(o!=="loading"&&(JB(z)||n6(z))){if(X.clearLine(0),JB(z)&&g!==m.first||n6(z)&&g!==m.last){let ee=JB(z)?-1:1,te=g;do te=(te+ee+l.length)%l.length;while(!hYs(l[te]));A(te)}}else c(X.line)});let I=i.style.message(e.message,o),C;if(i.helpMode!=="never")if(e.instructions){let{pager:z,navigation:X}=e.instructions;C=i.style.help(l.length>r?z:X)}else C=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]);let x=r7e({items:l,active:g,renderItem({item:z,isActive:X}){if(Td.isSeparator(z))return` ${z.separator}`;if(z.disabled){let ae=typeof z.disabled=="string"?z.disabled:"(disabled)";return i.style.disabled(`${z.name} ${ae}`)}let ee=X?i.style.highlight:ae=>ae,te=X?i.icon.cursor:" ";return ee(`${te} ${z.name}`)},pageSize:r,loop:!1}),S;p?S=i.style.error(p):l.length===0&&a!==""&&o==="idle"&&(S=i.style.error("No results found"));let B;if(o==="done"&&b)return[f,I,i.style.answer(b.short)].filter(Boolean).join(" ").trimEnd();B=i.style.searchTerm(a);let D=b?.description,R=[f,I,B].filter(Boolean).join(" ").trimEnd(),O=[S??x," ",D?i.style.description(D):"",C].filter(Boolean).join(`
|
|
5552
5556
|
`).trimEnd();return[R,O]});var uBt=Ae(Iw(),1);var sZA={icon:{cursor:Vx.pointer},style:{disabled:e=>uBt.default.dim(`- ${e}`),description:e=>uBt.default.cyan(e),keysHelpTip:e=>e.map(([t,r])=>`${uBt.default.bold(t)} ${uBt.default.dim(r)}`).join(uBt.default.dim(" \u2022 "))},helpMode:"always",indexMode:"hidden",keybindings:[]};function lBt(e){return!Td.isSeparator(e)&&!e.disabled}function aZA(e){return e.map(t=>{if(Td.isSeparator(t))return t;if(typeof t=="string")return{value:t,name:t,short:t,disabled:!1};let r=t.name??String(t.value),n={value:t.value,name:r,short:t.short??r,disabled:t.disabled??!1};return t.description&&(n.description=t.description),n})}var gYs=ex((e,t)=>{let{loop:r=!0,pageSize:n=7}=e,i=OI(sZA,e.theme),{keybindings:o}=i,[s,a]=sl("idle"),c=ZC({status:s,theme:i}),l=t7e(),u=!o.includes("vim"),p=i6(()=>aZA(e.choices),[e.choices]),d=i6(()=>{let D=p.findIndex(lBt),R=p.findLastIndex(lBt);if(D===-1)throw new Ole("[select prompt] No selectable choices. All choices are disabled.");return{first:D,last:R}},[p]),f=i6(()=>"default"in e?p.findIndex(D=>lBt(D)&&D.value===e.default):-1,[e.default,p]),[m,g]=sl(f===-1?d.first:f),A=p[m];$C((D,R)=>{if(clearTimeout(l.current),XC(D))a("done"),t(A.value);else if(JB(D,o)||n6(D,o)){if(R.clearLine(0),r||JB(D,o)&&m!==d.first||n6(D,o)&&m!==d.last){let O=JB(D,o)?-1:1,z=m;do z=(z+O+p.length)%p.length;while(!lBt(p[z]));g(z)}}else if(uir(D)&&!Number.isNaN(Number(R.line))){let O=Number(R.line)-1,z=-1,X=p.findIndex(te=>Td.isSeparator(te)?!1:(z++,z===O)),ee=p[X];ee!=null&&lBt(ee)&&g(X),l.current=setTimeout(()=>{R.clearLine(0)},700)}else if(ZWe(D))R.clearLine(0);else if(u){let O=R.line.toLowerCase(),z=p.findIndex(X=>Td.isSeparator(X)||!lBt(X)?!1:X.name.toLowerCase().startsWith(O));z!==-1&&g(z),l.current=setTimeout(()=>{R.clearLine(0)},700)}}),E4(()=>()=>{clearTimeout(l.current)},[]);let b=i.style.message(e.message,s),I;if(i.helpMode!=="never")if(e.instructions){let{pager:D,navigation:R}=e.instructions;I=i.style.help(p.length>n?D:R)}else I=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]);let C=0,x=r7e({items:p,active:m,renderItem({item:D,isActive:R,index:O}){if(Td.isSeparator(D))return C++,` ${D.separator}`;let z=i.indexMode==="number"?`${O+1-C}. `:"";if(D.disabled){let te=typeof D.disabled=="string"?D.disabled:"(disabled)";return i.style.disabled(`${z}${D.name} ${te}`)}let X=R?i.style.highlight:te=>te,ee=R?i.icon.cursor:" ";return X(`${ee} ${z}${D.name}`)},pageSize:n,loop:r});if(s==="done")return[c,b,i.style.answer(A.short)].filter(Boolean).join(" ");let{description:S}=A;return`${[[c,b].filter(Boolean).join(" "),x," ",S?i.style.description(S):"",I].filter(Boolean).join(`
|
|
5553
|
-
`).trimEnd()}${cBt}`});cn();Co();var Ple={GENERATION_STARTED:"generation_started",GENERATION_COMPLETED:"generation_completed",GENERATION_FAILED:"generation_failed",VERIFICATION_FAILED:"verification_failed",SDK_PR_CREATED:"sdk_pr_created",UPGRADE_APPLIED:"upgrade_applied",MAJOR_VERSION_BUMP:"major_version_bump"},cZA={[Ple.GENERATION_STARTED]:!1,[Ple.GENERATION_COMPLETED]:!1,[Ple.GENERATION_FAILED]:!0,[Ple.VERIFICATION_FAILED]:!0,[Ple.SDK_PR_CREATED]:!1,[Ple.UPGRADE_APPLIED]:!1,[Ple.MAJOR_VERSION_BUMP]:!1};function l9p(e){return cZA[e]}function u9p(e,t){return{automation_mode:!0,surface:"cli",action:t.action,run_id:t.run_id,github_run_id:t.github_run_id,github_run_url:t.github_run_url,org:t.org,config_repo:t.config_repo,config_commit_sha:t.config_commit_sha,config_branch:t.config_branch,config_pr_number:t.config_pr_number,trigger:t.trigger,cli_version:t.cli_version,...e.errorCode!==void 0?{error_code:e.errorCode}:{},...e.attributes??{}}}function p9p(e,t){function r(i,o,s){s!=null&&(i[o]=s)}let n={surface:"cli",automation_mode:"true"};return r(n,"event",e.event),r(n,"action",t.action),r(n,"run_id",t.run_id),r(n,"org",t.org),r(n,"config_repo",t.config_repo),r(n,"trigger",t.trigger),r(n,"error_code",e.errorCode??"none"),n}function f9p(e,t){return{github_run_id:t.github_run_id,github_run_url:t.github_run_url,config_commit_sha:t.config_commit_sha,config_branch:t.config_branch,config_pr_number:t.config_pr_number,cli_version:t.cli_version,...e.attributes??{}}}function d9p(e,t){return{event:e.event,timestamp:new Date().toISOString(),surface:"cli",action:t.action,run_id:t.run_id,github_run_id:t.github_run_id,github_run_url:t.github_run_url,org:t.org,config_repo:t.config_repo,config_commit_sha:t.config_commit_sha,config_branch:t.config_branch,config_pr_number:t.config_pr_number,trigger:t.trigger,cli_version:t.cli_version,...e.errorCode!==void 0?{error_code:e.errorCode}:{},...e.attributes??{}}}function m9p(e){let t=e.join(" ");return/\bautomations\s+generate\b/.test(t)?Ple.GENERATION_FAILED:/\bautomations\s+preview\b/.test(t)?Ple.VERIFICATION_FAILED:Ple.GENERATION_FAILED}var lZA="",uZA="FERN_AUTOMATION_EVENTS_ORIGIN",pZA=3e3,qBi=class e{static instance;origin;inflight=[];static getInstance(){return e.instance==null&&(e.instance=new e(process.env[uZA]??lZA)),e.instance}constructor(t){this.origin=t}resolveEndpoint(){if(this.origin.length!==0)return`${this.origin.replace(/\/$/,"")}/v1/automation/events`}post(t,r){this.inflight.push(this.send(t,r))}async shutdown(){let t=this.inflight;this.inflight=[],t.length>0&&await Promise.allSettled(t)}async send(t,r){let n=this.resolveEndpoint();if(n==null)return;let i=new AbortController,o=setTimeout(()=>i.abort(),pZA);try{let s={"content-type":"application/json"},a=await Az();a!=null&&a.value.length>0&&(s.Authorization=`Bearer ${a.value}`);let c=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(d9p(t,r)),signal:i.signal})}catch{return}finally{clearTimeout(o)}}};function h9p(){let{fern_run_id:e,github_run_id:t}=Wpe();return{action:process.env.FERN_ACTION,run_id:e,github_run_id:t,github_run_url:process.env.FERN_GITHUB_RUN_URL,org:void 0,config_repo:process.env.FERN_CONFIG_REPO,config_commit_sha:process.env.FERN_CONFIG_COMMIT_SHA,config_branch:process.env.FERN_CONFIG_BRANCH,config_pr_number:process.env.FERN_CONFIG_PR_NUMBER,trigger:process.env.GITHUB_EVENT_NAME,cli_version:"5.
|
|
5557
|
+
`).trimEnd()}${cBt}`});cn();Co();var Ple={GENERATION_STARTED:"generation_started",GENERATION_COMPLETED:"generation_completed",GENERATION_FAILED:"generation_failed",VERIFICATION_FAILED:"verification_failed",SDK_PR_CREATED:"sdk_pr_created",UPGRADE_APPLIED:"upgrade_applied",MAJOR_VERSION_BUMP:"major_version_bump"},cZA={[Ple.GENERATION_STARTED]:!1,[Ple.GENERATION_COMPLETED]:!1,[Ple.GENERATION_FAILED]:!0,[Ple.VERIFICATION_FAILED]:!0,[Ple.SDK_PR_CREATED]:!1,[Ple.UPGRADE_APPLIED]:!1,[Ple.MAJOR_VERSION_BUMP]:!1};function l9p(e){return cZA[e]}function u9p(e,t){return{automation_mode:!0,surface:"cli",action:t.action,run_id:t.run_id,github_run_id:t.github_run_id,github_run_url:t.github_run_url,org:t.org,config_repo:t.config_repo,config_commit_sha:t.config_commit_sha,config_branch:t.config_branch,config_pr_number:t.config_pr_number,trigger:t.trigger,cli_version:t.cli_version,...e.errorCode!==void 0?{error_code:e.errorCode}:{},...e.attributes??{}}}function p9p(e,t){function r(i,o,s){s!=null&&(i[o]=s)}let n={surface:"cli",automation_mode:"true"};return r(n,"event",e.event),r(n,"action",t.action),r(n,"run_id",t.run_id),r(n,"org",t.org),r(n,"config_repo",t.config_repo),r(n,"trigger",t.trigger),r(n,"error_code",e.errorCode??"none"),n}function f9p(e,t){return{github_run_id:t.github_run_id,github_run_url:t.github_run_url,config_commit_sha:t.config_commit_sha,config_branch:t.config_branch,config_pr_number:t.config_pr_number,cli_version:t.cli_version,...e.attributes??{}}}function d9p(e,t){return{event:e.event,timestamp:new Date().toISOString(),surface:"cli",action:t.action,run_id:t.run_id,github_run_id:t.github_run_id,github_run_url:t.github_run_url,org:t.org,config_repo:t.config_repo,config_commit_sha:t.config_commit_sha,config_branch:t.config_branch,config_pr_number:t.config_pr_number,trigger:t.trigger,cli_version:t.cli_version,...e.errorCode!==void 0?{error_code:e.errorCode}:{},...e.attributes??{}}}function m9p(e){let t=e.join(" ");return/\bautomations\s+generate\b/.test(t)?Ple.GENERATION_FAILED:/\bautomations\s+preview\b/.test(t)?Ple.VERIFICATION_FAILED:Ple.GENERATION_FAILED}var lZA="",uZA="FERN_AUTOMATION_EVENTS_ORIGIN",pZA=3e3,qBi=class e{static instance;origin;inflight=[];static getInstance(){return e.instance==null&&(e.instance=new e(process.env[uZA]??lZA)),e.instance}constructor(t){this.origin=t}resolveEndpoint(){if(this.origin.length!==0)return`${this.origin.replace(/\/$/,"")}/v1/automation/events`}post(t,r){this.inflight.push(this.send(t,r))}async shutdown(){let t=this.inflight;this.inflight=[],t.length>0&&await Promise.allSettled(t)}async send(t,r){let n=this.resolveEndpoint();if(n==null)return;let i=new AbortController,o=setTimeout(()=>i.abort(),pZA);try{let s={"content-type":"application/json"},a=await Az();a!=null&&a.value.length>0&&(s.Authorization=`Bearer ${a.value}`);let c=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(d9p(t,r)),signal:i.signal})}catch{return}finally{clearTimeout(o)}}};function h9p(){let{fern_run_id:e,github_run_id:t}=Wpe();return{action:process.env.FERN_ACTION,run_id:e,github_run_id:t,github_run_url:process.env.FERN_GITHUB_RUN_URL,org:void 0,config_repo:process.env.FERN_CONFIG_REPO,config_commit_sha:process.env.FERN_CONFIG_COMMIT_SHA,config_branch:process.env.FERN_CONFIG_BRANCH,config_pr_number:process.env.FERN_CONFIG_PR_NUMBER,trigger:process.env.GITHUB_EVENT_NAME,cli_version:"5.218.0"}}function g9p(){return process.env.FERN_AUTOMATION==="true"}var fZA=3e3,WBi=class{constructor(t,r=qBi.getInstance()){this.reporter=t;this.automationEventApiClient=r;this.context=h9p()}reporter;automationEventApiClient;context;setOrganization(t){this.context={...this.context,org:t}}emit(t,r){let n=this.captureSentryForFailure({event:t,context:this.context,error:r?.error}),i=n==null?t:{...t,attributes:{...t.attributes??{},sentry_event_id:n}};this.capturePostHogEvent({event:i,context:this.context}),this.captureAutomationEventApiEvent(i,this.context)}async flush(){let t;try{await Promise.race([this.automationEventApiClient.shutdown(),new Promise(r=>{t=setTimeout(r,fZA)})])}finally{clearTimeout(t)}}capturePostHogEvent({event:t,context:r}){this.reporter.instrumentPostHogAutomationEvent({distinctId:r.run_id??void 0,event:t.event,properties:u9p(t,r)})}captureSentryForFailure({event:t,context:r,error:n}){if(!(!l9p(t.event)||t.errorCode==null))return this.reporter.captureException(n,{tags:p9p(t,r),context:{automation:f9p(t,r)}})}captureAutomationEventApiEvent(t,r){this.automationEventApiClient.post(t,r)}};Bt();function HBi(e,t,r){if(t instanceof ec)return;let n=zpe(t,r?.code),i=r?.argv??process.argv,o=i.join(" "),s=r?.message??(t instanceof Error?t.message:void 0)??"",a=t??new T({message:s,code:n});g9p()?mZA(i,e,n,s,a):dZA(e,o,n,a)}function dZA(e,t,r,n){e.instrumentPostHogEvent({command:t,properties:{failed:!0,errorCode:r}}),UMe(r)&&e.captureException(n,{tags:{"error.code":r}})}function mZA(e,t,r,n,i){let o=m9p(e);t.emitAutomationTelemetryEvent({event:o,errorCode:r,attributes:{error_message:n}},{error:i})}Bt();function a7e(){return process.env.FERN_DISABLE_TELEMETRY==="true"}function KBi({cliName:e,packageVersion:t,isLocal:r}){return a7e()||r?!1:!(t==="0.0.0")&&(e==="fern"&&!0)}var JBi=class{sentry;constructor({release:t,telemetry:r}){let n="https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496";if(KBi(r)&&n!=null&&n.length>0){let i="production";if(i==null||i.length===0)throw new T({message:"SENTRY_ENVIRONMENT must be set when SENTRY_DSN is configured",code:T.Code.ConfigError});this.sentry=MLt({dsn:n,release:t,environment:i,defaultIntegrations:!1,integrations:[_Ze(),wIe(),TIe(),uIe(),SIe()],tracesSampleRate:0,attachStacktrace:!0,sendClientReports:!1}),LLt()}}captureException(t,r){if(this.sentry!=null)try{let n=r?.tags,i=r?.context,o=n!=null&&Object.keys(n).length>0,s=i!=null&&Object.values(i).some(a=>a!=null);return!o&&!s?this.sentry.captureException(t):BP(a=>{if(o&&a.setTags(n),i!=null)for(let[c,l]of Object.entries(i))l!=null&&a.setContext(c,l);return this.sentry?.captureException(t,void 0,a)})}catch{return}}async flush(){this.sentry!=null&&await Promise.resolve(this.sentry.flush(2e3)).catch(()=>{})}};Bt();var YBi=class{originalWrite;redirected=!1;redirect(){if(this.redirected)throw new T({message:"StdoutRedirector: already redirected \u2014 did you forget to restore()?",code:T.Code.InternalError});this.originalWrite=process.stdout.write,process.stdout.write=process.stderr.write.bind(process.stderr),this.redirected=!0}restore(){!this.redirected||this.originalWrite==null||(process.stdout.write=this.originalWrite,this.originalWrite=void 0,this.redirected=!1)}async withRedirect(t){this.redirect();try{return await t()}finally{this.restore()}}};F$();gt();hy();Bt();cn();var mir=class{result=mf.Success;lastFailureMessage=void 0;logImmediately;logPrefix;title;subtasks=[];shouldBufferLogs;bufferedLogs=[];status="notStarted";onResult;instrumentPostHogEventImpl;captureExceptionImpl;emitAutomationTelemetryEventImpl;constructor({logImmediately:t,logPrefix:r,title:n,takeOverTerminal:i,onResult:o,shouldBufferLogs:s,instrumentPostHogEvent:a,captureException:c,emitAutomationTelemetryEvent:l}){this.logImmediately=t,this.logPrefix=r??"",this.title=n,this.takeOverTerminal=i,this.onResult=o,this.shouldBufferLogs=s,this.instrumentPostHogEventImpl=a,this.captureExceptionImpl=c,this.emitAutomationTelemetryEventImpl=l}start(){return this.status="running",this}isStarted(){return this.status!=="notStarted"}finish(){this.status!=="finished"&&(this.status="finished",this.flushLogs(),this.onResult?.(this.getResult()))}isFinished(){return this.status==="finished"}takeOverTerminal;failAndThrow(t,r,n){throw this.failWithoutThrowing(t,r,n),this.finish(),new ec(t??(r instanceof ec?r.failureMessage:this.lastFailureMessage))}failWithoutThrowing(t,r,n){this.result=mf.Failure,!(r instanceof ec)&&(t!=null&&(this.lastFailureMessage=t),sLe({message:t,error:r,logger:this.logger,instructionsTopic:n?.instructionsTopic}),HBi(this,r,{...n,message:t}))}getLastFailureMessage(){return this.lastFailureMessage}captureException(t,r){return this.captureExceptionImpl?.(t,r)}emitAutomationTelemetryEvent(t,r){this.emitAutomationTelemetryEventImpl(t,r)}getResult(){return this.result}instrumentPostHogEvent(t){this.instrumentPostHogEventImpl(t)}logAtLevel(t,...r){this.logAtLevelWithOverrides(t,r)}logAtLevelWithOverrides(t,r,n={}){this.log({parts:r,level:t,time:new Date,...n})}log(t){this.bufferedLogs.push({...t,prefix:this.logPrefix}),this.shouldBufferLogs||this.flushLogs()}flushLogs(){this.logImmediately(this.bufferedLogs),this.bufferedLogs=[]}logger=k0(this.logAtLevel.bind(this));addInteractiveTask({name:t,subtitle:r}){let n=new AYs({name:t,subtitle:r,logImmediately:i=>this.logImmediately(i),logPrefix:`${this.logPrefix}${ce.blackBright(t)} `,takeOverTerminal:this.takeOverTerminal,onResult:this.onResult,shouldBufferLogs:this.shouldBufferLogs,instrumentPostHogEvent:i=>this.instrumentPostHogEventImpl(i),captureException:this.captureExceptionImpl,emitAutomationTelemetryEvent:this.emitAutomationTelemetryEventImpl});return this.subtasks.push(n),n}async runInteractiveTask(t,r){let n=this.addInteractiveTask(t).start();try{await r(n)}catch(o){n.failWithoutThrowing(void 0,o)}finally{n.finish()}let i=n.getResult()===mf.Success;return i||(this.lastFailureMessage=n.getLastFailureMessage()??this.lastFailureMessage),i}printInteractiveTasks({spinner:t}){return this.subtasks.map(r=>r.print({spinner:t})).join(`
|
|
5554
5558
|
`)}},AYs=class extends mir{name;subtitle;constructor({name:t,subtitle:r,...n}){super(n),this.name=t,this.subtitle=r}start(){return super.start(),this.logAtLevelWithOverrides(Un.Info,["Started."],{omitOnTTY:!0}),this.flushLogs(),this}isStarted(){return this.status!=="notStarted"}finish(){this.status!=="finished"&&(this.result===mf.Success?this.logAtLevelWithOverrides(Un.Info,["Finished."],{omitOnTTY:!0}):this.logAtLevelWithOverrides(Un.Error,["Failed."],{omitOnTTY:!0}),super.finish())}setSubtitle(t){this.subtitle=t}print({spinner:t}){let r=[this.name];return this.subtitle!=null&&r.push(ce.dim(this.subtitle)),r.push(...this.subtasks.map(n=>n.print({spinner:t}))),Pj({prefix:this.getIcon({spinner:t}),content:r.join(`
|
|
5555
5559
|
`)})}printInteractiveTasks({spinner:t}){return this.print({spinner:t})}getIcon({spinner:t}){let r=this.subtasks.length>0;switch(this.status){case"notStarted":return r?ce.dim("\u25B8 "):ce.dim("\u25E6 ");case"running":return r?ce.cyan("\u25BE "):t;case"finished":switch(this.getResult()){case mf.Success:return r?ce.green("\u25BE "):ce.green("\u2713 ");case mf.Failure:return r?ce.red("\u25BE "):ce.red("x ")}}}getResult(){if(this.result===mf.Failure)return mf.Failure;for(let t of this.subtasks)if(t.getResult()===mf.Failure)return mf.Failure;return mf.Success}};Bt();var A9p=Ae(gMe(),1);cn();function y9p(e){return e.filter(t=>t.isUpgradeAvailable).length>0}function hZA(e){return(e.cliUpgradeInfo?.isUpgradeAvailable??!1)||y9p(e.generatorUpgradeInfo)}async function b9p({cliEnvironment:e,upgradeInfo:t}){if(!hZA(t)||e.packageVersion==t.cliUpgradeInfo?.latestVersion)return;let r=`${ce.underline("Upgrades available")}
|
|
5556
5560
|
|
|
@@ -5559,7 +5563,7 @@ ${r}`}function lBi(e){let t=this,{emitParseErrors:r,...n}={...t.data("settings")
|
|
|
5559
5563
|
Run ${ce.cyan("fern generator upgrade")} to upgrade your generators.`),i.length>2&&(r+=`
|
|
5560
5564
|
Run ${ce.cyan("fern generator upgrade --list")} to see the full list of generator upgrades available.`),XSe(r,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"})}async function yYs({generatorUpgradeInfo:e,header:t,limit:r,includeBoxen:n=!0}){if(!y9p(e))return;let i=t??"",o=e.filter(a=>a.isUpgradeAvailable);r!=null&&(o=o.slice(0,r+1));let s=o.sort((a,c)=>a.generatorName.localeCompare(c.generatorName)||a.currentVersion.localeCompare(c.currentVersion));for(let a of s)i+=`
|
|
5561
5565
|
${await gZA(a.generatorName)} (${a.apiName!=null?"API: "+a.apiName+", ":""}Group: ${a.generatorGroup}) `+ce.dim(a.currentVersion)+ce.reset(" \u2192 ")+ce.green(a.latestVersion);return i+=`
|
|
5562
|
-
`,n?XSe(i,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):i}async function gZA(e){let r=await new A9p.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new T({message:`Generator ${e} not found`,code:T.Code.ConfigError});return r.body.displayName}Wn();qde();Bt();var hir=Ae(FA(),1);function pBt(e){let t;return()=>(t??=e.runTask(r=>Ep(r)),t)}function XBi({generatorId:e,candidateVersion:t,currentVersion:r}){if(!E9p(t)||!E9p(r))throw new T({message:`Cannot compare versions for generator "${e}": configured version "${r}", candidate version "${t}". Use valid semantic versions such as 1.2.3.`,code:T.Code.VersionError});try{return t===r?0:yw(t,r)?1:yw(r,t)?-1:0}catch{let n=hir.default.valid(t),i=hir.default.valid(r);if(n!=null&&i!=null)return Math.sign(hir.default.compare(n,i));throw new T({message:`Cannot compare versions for generator "${e}": configured version "${r}", candidate version "${t}". Use valid semantic versions such as 1.2.3.`,code:T.Code.VersionError})}}function E9p(e){if(e==="latest"||hir.default.valid(e)!=null)return!0;try{return gK(e),!0}catch{return!1}}async function ZBi({generatorId:e,currentVersion:t,includeMajor:r,channel:n,organization:i,getToken:o,context:s}){if(n!=null)throw new Error(`SDK Gen API generator version discovery does not support the requested upgrade channel "${n}". Remove --channel to use executable index versions; FDR channel metadata is used only when the ${jZt} feature flag is off for this organization.`);let a=Kse();if(a==null)throw new Error("FERN_SDK_GEN_API_ORIGIN is required when sdk-gen-api generation is enabled");let c=bv(e);if(c==null)return s.logger.error(`SDK Gen API cannot discover versions for unsupported generator ${e}. Use a canonical first-party SDK generator name.`),{};let l=await o(),u=await zbs({origin:a,organization:i,token:l,generatorId:e,language:c,currentVersion:t,includeMajor:r});return u.state==="UNAVAILABLE"?(s.logger.error(`SDK Gen API cannot resolve an executable version for ${e}@${t} (${u.reason}). Publish the coordinate to this environment or choose a supported generator version.`),{}):{compatibleVersion:u.compatibleVersion,withheldMajorVersion:u.withheldMajorVersion}}async function AZA({cliContext:e,project:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s}){let{apiWorkspaces:a}=t,l=s!==!0||await gy().catch(()=>{})!=null?pBt(e):void 0;if(a.length===1){let p={type:"singleApi",versions:{}};return await I9p({cliContext:e,apiWorkspaces:a,perGeneratorAction:async(d,f,m,g)=>{p.versions[f]==null&&(p.versions[f]={});let A=G_e(m.name);if(A==null){g.logger.debug(`Skipping unknown generator: ${m.name}`);return}let b=await C9p({generatorName:m.name,normalizedGeneratorName:A,cliVersion:e.environment.packageVersion,currentGeneratorVersion:m.version,channel:i,includeMajor:o,organization:t.config.organization,skipFeatureFlagRequest:s,getSdkGenApiToken:l,context:g});b!=null&&(p.versions[f][m.name]={previousVersion:m.version,latestVersion:b})},generatorFilter:r,groupFilter:n}),p}let u={type:"multiApi",versions:{}};return await I9p({cliContext:e,apiWorkspaces:a,perGeneratorAction:async(p,d,f,m)=>{if(p==null)return;u.versions[p]==null&&(u.versions[p]={}),u.versions[p][d]==null&&(u.versions[p][d]={});let g=G_e(f.name);if(g==null){m.logger.debug(`Skipping unknown generator: ${f.name}`);return}let A=await C9p({generatorName:f.name,normalizedGeneratorName:g,cliVersion:e.environment.packageVersion,currentGeneratorVersion:f.version,channel:i,includeMajor:o,organization:t.config.organization,skipFeatureFlagRequest:s,getSdkGenApiToken:l,context:m});A!=null&&(u.versions[p][d][f.name]={previousVersion:f.version,latestVersion:A})},generatorFilter:r,groupFilter:n}),u}async function I9p({cliContext:e,apiWorkspaces:t,perGeneratorAction:r,generatorFilter:n,groupFilter:i}){await Promise.all(t.map(async o=>{await e.runTaskForWorkspace(o,async s=>{let a=await O3({absolutePathToWorkspace:o.absoluteFilePath,context:s});if(a==null||a.groups==null)return;let c=n!=null?eh(n):void 0;for(let l of a.groups)if(!(i!=null&&l.groupName!==i))for(let u of l.generators)c!=null&&u.name!==c||await r(o.workspaceName,l.groupName,u,s)})}))}function v9p(e,t,r){let n=[];for(let[i,o]of Object.entries(e))for(let[s,a]of Object.entries(o)){r.debug(`Checking if ${s} in group ${i} has an upgrade available...`);let c=XBi({generatorId:s,candidateVersion:a.latestVersion,currentVersion:a.previousVersion})===1;r.debug(`Latest version: ${a.latestVersion}. `+(c?"Upgrade available.":"No upgrade available.")),n.push({generatorName:s,generatorGroup:i,apiName:t,isUpgradeAvailable:c,currentVersion:a.previousVersion,latestVersion:a.latestVersion})}return n}async function C9p({generatorName:e,normalizedGeneratorName:t,cliVersion:r,currentGeneratorVersion:n,channel:i,includeMajor:o,organization:s,skipFeatureFlagRequest:a,getSdkGenApiToken:c,context:l}){return n==="latest"?"latest":await yZA({organization:s,generatorName:eh(e),skipFeatureFlagRequest:a})?c==null?void 0:(await ZBi({generatorId:eh(e),currentVersion:n,includeMajor:o??!1,channel:i,organization:s,getToken:c,context:l})).compatibleVersion:nB({generatorName:t,cliVersion:r,currentGeneratorVersion:n,channel:i,includeMajor:o,context:l})}async function $Bi({project:e,cliContext:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s}){let a=[];if(e!=null){let c=await AZA({cliContext:t,project:e,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s});if(c.type==="multiApi")for(let[l,u]of Object.entries(c.versions))a.push(...v9p(u,l,t.logger));else a.push(...v9p(c.versions,void 0,t.logger))}return a}async function yZA({organization:e,generatorName:t,skipFeatureFlagRequest:r}){return r===!0?Aws({organization:e,generatorName:t})??!1:JSt({organization:e,generatorName:t})}gt();Bt();h6r();async function Sye({cliEnvironment:e,includePreReleases:t=!1}){if(e.packageName!=="fern-api"||e.packageVersion==="0.0.0")return e.packageVersion;try{return await W3e(e.packageName,{version:t?"prerelease":"latest"})}catch(r){throw new T({message:`Failed to resolve latest CLI version: ${Zn(r)}`,code:T.Code.NetworkError})}}var x9p=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],eDi=class e{environment;sentryClient;posthogManager;automationTelemetryManager;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=Un.Info;isLocal;stdoutRedirector=new YBi;jsonMode=!1;linesAfterTasks=[];static async create(t,r,{isLocal:n}){let i=await dqt();return new e(t,r,{isLocal:n,posthogManager:i})}constructor(t,r,{isLocal:n,posthogManager:i}){this.ttyAwareLogger=new iQt(t,r),this.isLocal=n??!1,this.posthogManager=i;let o=this.getPackageName(),s=this.getPackageVersion(),a=this.getCliName();(o==null||s==null||a==null)&&this.exitProgram(),this.environment={packageName:o,packageVersion:s,cliName:a},this.sentryClient=new JBi({release:`cli@${this.environment.packageVersion}`,telemetry:{cliName:this.environment.cliName,packageVersion:this.environment.packageVersion,isLocal:this.isLocal}}),this.automationTelemetryManager=new WBi(this)}getPackageName(){return"fern-api"}getPackageVersion(){return"5.
|
|
5566
|
+
`,n?XSe(i,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):i}async function gZA(e){let r=await new A9p.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new T({message:`Generator ${e} not found`,code:T.Code.ConfigError});return r.body.displayName}Wn();qde();Bt();var hir=Ae(FA(),1);function pBt(e){let t;return()=>(t??=e.runTask(r=>Ep(r)),t)}function XBi({generatorId:e,candidateVersion:t,currentVersion:r}){if(!E9p(t)||!E9p(r))throw new T({message:`Cannot compare versions for generator "${e}": configured version "${r}", candidate version "${t}". Use valid semantic versions such as 1.2.3.`,code:T.Code.VersionError});try{return t===r?0:yw(t,r)?1:yw(r,t)?-1:0}catch{let n=hir.default.valid(t),i=hir.default.valid(r);if(n!=null&&i!=null)return Math.sign(hir.default.compare(n,i));throw new T({message:`Cannot compare versions for generator "${e}": configured version "${r}", candidate version "${t}". Use valid semantic versions such as 1.2.3.`,code:T.Code.VersionError})}}function E9p(e){if(e==="latest"||hir.default.valid(e)!=null)return!0;try{return gK(e),!0}catch{return!1}}async function ZBi({generatorId:e,currentVersion:t,includeMajor:r,channel:n,organization:i,getToken:o,context:s}){if(n!=null)throw new Error(`SDK Gen API generator version discovery does not support the requested upgrade channel "${n}". Remove --channel to use executable index versions; FDR channel metadata is used only when the ${jZt} feature flag is off for this organization.`);let a=Kse();if(a==null)throw new Error("FERN_SDK_GEN_API_ORIGIN is required when sdk-gen-api generation is enabled");let c=bv(e);if(c==null)return s.logger.error(`SDK Gen API cannot discover versions for unsupported generator ${e}. Use a canonical first-party SDK generator name.`),{};let l=await o(),u=await zbs({origin:a,organization:i,token:l,generatorId:e,language:c,currentVersion:t,includeMajor:r});return u.state==="UNAVAILABLE"?(s.logger.error(`SDK Gen API cannot resolve an executable version for ${e}@${t} (${u.reason}). Publish the coordinate to this environment or choose a supported generator version.`),{}):{compatibleVersion:u.compatibleVersion,withheldMajorVersion:u.withheldMajorVersion}}async function AZA({cliContext:e,project:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s}){let{apiWorkspaces:a}=t,l=s!==!0||await gy().catch(()=>{})!=null?pBt(e):void 0;if(a.length===1){let p={type:"singleApi",versions:{}};return await I9p({cliContext:e,apiWorkspaces:a,perGeneratorAction:async(d,f,m,g)=>{p.versions[f]==null&&(p.versions[f]={});let A=G_e(m.name);if(A==null){g.logger.debug(`Skipping unknown generator: ${m.name}`);return}let b=await C9p({generatorName:m.name,normalizedGeneratorName:A,cliVersion:e.environment.packageVersion,currentGeneratorVersion:m.version,channel:i,includeMajor:o,organization:t.config.organization,skipFeatureFlagRequest:s,getSdkGenApiToken:l,context:g});b!=null&&(p.versions[f][m.name]={previousVersion:m.version,latestVersion:b})},generatorFilter:r,groupFilter:n}),p}let u={type:"multiApi",versions:{}};return await I9p({cliContext:e,apiWorkspaces:a,perGeneratorAction:async(p,d,f,m)=>{if(p==null)return;u.versions[p]==null&&(u.versions[p]={}),u.versions[p][d]==null&&(u.versions[p][d]={});let g=G_e(f.name);if(g==null){m.logger.debug(`Skipping unknown generator: ${f.name}`);return}let A=await C9p({generatorName:f.name,normalizedGeneratorName:g,cliVersion:e.environment.packageVersion,currentGeneratorVersion:f.version,channel:i,includeMajor:o,organization:t.config.organization,skipFeatureFlagRequest:s,getSdkGenApiToken:l,context:m});A!=null&&(u.versions[p][d][f.name]={previousVersion:f.version,latestVersion:A})},generatorFilter:r,groupFilter:n}),u}async function I9p({cliContext:e,apiWorkspaces:t,perGeneratorAction:r,generatorFilter:n,groupFilter:i}){await Promise.all(t.map(async o=>{await e.runTaskForWorkspace(o,async s=>{let a=await O3({absolutePathToWorkspace:o.absoluteFilePath,context:s});if(a==null||a.groups==null)return;let c=n!=null?eh(n):void 0;for(let l of a.groups)if(!(i!=null&&l.groupName!==i))for(let u of l.generators)c!=null&&u.name!==c||await r(o.workspaceName,l.groupName,u,s)})}))}function v9p(e,t,r){let n=[];for(let[i,o]of Object.entries(e))for(let[s,a]of Object.entries(o)){r.debug(`Checking if ${s} in group ${i} has an upgrade available...`);let c=XBi({generatorId:s,candidateVersion:a.latestVersion,currentVersion:a.previousVersion})===1;r.debug(`Latest version: ${a.latestVersion}. `+(c?"Upgrade available.":"No upgrade available.")),n.push({generatorName:s,generatorGroup:i,apiName:t,isUpgradeAvailable:c,currentVersion:a.previousVersion,latestVersion:a.latestVersion})}return n}async function C9p({generatorName:e,normalizedGeneratorName:t,cliVersion:r,currentGeneratorVersion:n,channel:i,includeMajor:o,organization:s,skipFeatureFlagRequest:a,getSdkGenApiToken:c,context:l}){return n==="latest"?"latest":await yZA({organization:s,generatorName:eh(e),skipFeatureFlagRequest:a})?c==null?void 0:(await ZBi({generatorId:eh(e),currentVersion:n,includeMajor:o??!1,channel:i,organization:s,getToken:c,context:l})).compatibleVersion:nB({generatorName:t,cliVersion:r,currentGeneratorVersion:n,channel:i,includeMajor:o,context:l})}async function $Bi({project:e,cliContext:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s}){let a=[];if(e!=null){let c=await AZA({cliContext:t,project:e,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o,skipFeatureFlagRequest:s});if(c.type==="multiApi")for(let[l,u]of Object.entries(c.versions))a.push(...v9p(u,l,t.logger));else a.push(...v9p(c.versions,void 0,t.logger))}return a}async function yZA({organization:e,generatorName:t,skipFeatureFlagRequest:r}){return r===!0?Aws({organization:e,generatorName:t})??!1:JSt({organization:e,generatorName:t})}gt();Bt();h6r();async function Sye({cliEnvironment:e,includePreReleases:t=!1}){if(e.packageName!=="fern-api"||e.packageVersion==="0.0.0")return e.packageVersion;try{return await W3e(e.packageName,{version:t?"prerelease":"latest"})}catch(r){throw new T({message:`Failed to resolve latest CLI version: ${Zn(r)}`,code:T.Code.NetworkError})}}var x9p=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],eDi=class e{environment;sentryClient;posthogManager;automationTelemetryManager;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=Un.Info;isLocal;stdoutRedirector=new YBi;jsonMode=!1;linesAfterTasks=[];static async create(t,r,{isLocal:n}){let i=await dqt();return new e(t,r,{isLocal:n,posthogManager:i})}constructor(t,r,{isLocal:n,posthogManager:i}){this.ttyAwareLogger=new iQt(t,r),this.isLocal=n??!1,this.posthogManager=i;let o=this.getPackageName(),s=this.getPackageVersion(),a=this.getCliName();(o==null||s==null||a==null)&&this.exitProgram(),this.environment={packageName:o,packageVersion:s,cliName:a},this.sentryClient=new JBi({release:`cli@${this.environment.packageVersion}`,telemetry:{cliName:this.environment.cliName,packageVersion:this.environment.packageVersion,isLocal:this.isLocal}}),this.automationTelemetryManager=new WBi(this)}getPackageName(){return"fern-api"}getPackageVersion(){return"5.218.0"}getCliName(){return"fern"}setLogLevel(t){this.logLevel=t}logFernVersionDebug(){this.logger.debug(`Running ${ce.bold(`${this.environment.cliName}`)} (${this.environment.packageName}@${this.environment.packageVersion})`)}failAndThrow(t,r,n){throw this.failWithoutThrowing(t,r,n),new ec(t??(r instanceof ec?r.failureMessage:r!=null?en(r):void 0))}failWithoutThrowing(t,r,n){this.didSucceed=!1,!(r instanceof ec)&&(sLe({message:t,error:r,logger:this.logger,instructionsTopic:n?.instructionsTopic}),HBi(this,r,{...n,message:t}))}enableJsonMode(){this.jsonMode||(this.jsonMode=!0,this.stdoutRedirector.redirect())}get isJsonMode(){return this.jsonMode}get isTTY(){return this.ttyAwareLogger.isTTY}writeJsonToStdout(t){this.writeTextToStdout(JSON.stringify(t,null,2)+`
|
|
5563
5567
|
`)}writeTextToStdout(t){this.stdoutRedirector.restore(),process.stdout.write(t),this.jsonMode&&this.stdoutRedirector.redirect()}async withRealStdout(t){this.stdoutRedirector.restore();try{return await t()}finally{this.jsonMode&&this.stdoutRedirector.redirect()}}logAfterTasks(t){this.isTTY?this.linesAfterTasks.push(t):this.logger.info(t)}async exit({code:t}={}){!this._suppressUpgradeMessage&&!this.isLocal&&await this.nudgeUpgradeIfAvailable(),this.ttyAwareLogger.finish();for(let r of this.linesAfterTasks)process.stdout.write(`${r}
|
|
5564
5568
|
`);try{await Promise.all([this.posthogManager.flush(),pHo()])}catch{}await this.sentryClient.flush(),await this.automationTelemetryManager.flush(),this.exitProgram({code:t})}async nudgeUpgradeIfAvailable(){try{let t=await Promise.race([this.isUpgradeAvailable({skipFeatureFlagRequest:!0}),new Promise((n,i)=>setTimeout(()=>i("Request timed out"),300))]),r=await b9p({cliEnvironment:this.environment,upgradeInfo:t});r!=null&&(r.endsWith(`
|
|
5565
5569
|
`)||(r+=`
|