@cerebriline/agents 4.100.254 → 4.100.255

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -61,7 +61,7 @@ var Pn="input_progress";var zr=[/\bserver is shutting down\b/i,/^(?:error:\s*)?(
61
61
 
62
62
  `)}h.write("payload.value = newResult;"),h.write("return payload;");let Z=h.compile();return(U,I)=>Z(y,U,I)},o,s=Pe,a=!Ve.jitless,u=a&&Hr.value,c=t.catchall,d;e._zod.parse=(y,h)=>{d??(d=i.value);let g=y.value;if(!s(g))return y.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),y;if(a&&u&&h?.async===!1&&h.jitless!==!0){if(!o)o=r(t.shape);if(y=o(y,h),!c)return y;return ei([],g,y,h,d,e)}return n(y,h)}});function on(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter((o)=>!be(o));if(r.length===1)return t.value=r[0].value,r[0];return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((o)=>o.issues.map((s)=>te(s,i,ee())))}),t}var ti=p("$ZodUnion",(e,t)=>{x.init(e,t),A(e._zod,"optin",()=>t.options.some((i)=>i._zod.optin==="optional")?"optional":void 0),A(e._zod,"optout",()=>t.options.some((i)=>i._zod.optout==="optional")?"optional":void 0),A(e._zod,"values",()=>{if(t.options.every((i)=>i._zod.values))return new Set(t.options.flatMap((i)=>Array.from(i._zod.values)));return}),A(e._zod,"pattern",()=>{if(t.options.every((i)=>i._zod.pattern)){let i=t.options.map((r)=>r._zod.pattern);return new RegExp(`^(${i.map((r)=>xt(r.source)).join("|")})$`)}return});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,s=[];for(let a of t.options){let u=a._zod.run({value:i.value,issues:[]},r);if(u instanceof Promise)s.push(u),o=!0;else{if(u.issues.length===0)return u;s.push(u)}}if(!o)return on(s,i,e,r);return Promise.all(s).then((a)=>on(a,i,e,r))}}),$s=p("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ti.init(e,t);let n=e._zod.parse;A(e._zod,"propValues",()=>{let r={};for(let o of t.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[a,u]of Object.entries(s)){if(!r[a])r[a]=new Set;for(let c of u)r[a].add(c)}}return r});let i=et(()=>{let r=t.options,o=new Map;for(let s of r){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let u of a){if(o.has(u))throw Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,s)}}return o});e._zod.parse=(r,o)=>{let s=r.value;if(!Pe(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let a=i.value.get(s?.[t.discriminator]);if(a)return a._zod.run(r,o);if(t.unionFallback||o.direction==="backward")return n(r,o);return r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:s,path:[t.discriminator],inst:e}),r}}),Ls=p("$ZodIntersection",(e,t)=>{x.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),s=t.right._zod.run({value:r,issues:[]},i);if(o instanceof Promise||s instanceof Promise)return Promise.all([o,s]).then(([a,u])=>sn(n,a,u));return sn(n,o,s)}});function wt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(ke(e)&&ke(t)){let n=Object.keys(t),i=Object.keys(e).filter((o)=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let s=wt(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r[o]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],s=wt(r,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function sn(e,t,n){let i=new Map,r;for(let a of t.issues)if(a.code==="unrecognized_keys"){r??(r=a);for(let u of a.keys){if(!i.has(u))i.set(u,{});i.get(u).l=!0}}else e.issues.push(a);for(let a of n.issues)if(a.code==="unrecognized_keys")for(let u of a.keys){if(!i.has(u))i.set(u,{});i.get(u).r=!0}else e.issues.push(a);let o=[...i].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&r)e.issues.push({...r,keys:o});if(be(e))return e;let s=wt(t.value,n.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var ni=p("$ZodTuple",(e,t)=>{x.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],a=an(n,"optin"),u=an(n,"optout");if(!t.rest){if(o.length<a)return i.issues.push({code:"too_small",minimum:a,inclusive:!0,input:o,inst:e,origin:"array"}),i;if(o.length>n.length)i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}let c=Array(n.length);for(let d=0;d<n.length;d++){let y=n[d]._zod.run({value:o[d],issues:[]},r);if(y instanceof Promise)s.push(y.then((h)=>{c[d]=h}));else c[d]=y}if(t.rest){let d=n.length-1,y=o.slice(n.length);for(let h of y){d++;let g=t.rest._zod.run({value:h,issues:[]},r);if(g instanceof Promise)s.push(g.then((T)=>ln(T,i,d)));else ln(g,i,d)}}if(s.length)return Promise.all(s).then(()=>un(c,i,n,o,u));return un(c,i,n,o,u)}});function an(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function ln(e,t,n){if(e.issues.length)t.issues.push(...se(n,e.issues));t.value[n]=e.value}function un(e,t,n,i,r){for(let o=0;o<n.length;o++){let s=e[o],a=o<i.length;if(s.issues.length){if(!a&&o>=r){t.value.length=o;break}t.issues.push(...se(o,s.issues))}t.value[o]=s.value}for(let o=t.value.length-1;o>=i.length;o--)if(n[o]._zod.optout==="optional"&&t.value[o]===void 0)t.value.length=o;else break;return t}var zs=p("$ZodRecord",(e,t)=>{x.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!ke(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[],s=t.keyType._zod.values;if(s){n.value={};let a=new Set;for(let c of s)if(typeof c==="string"||typeof c==="number"||typeof c==="symbol"){a.add(typeof c==="number"?c.toString():c);let d=t.keyType._zod.run({value:c,issues:[]},i);if(d instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map((g)=>te(g,i,ee())),input:c,path:[c],inst:e});continue}let y=d.value,h=t.valueType._zod.run({value:r[c],issues:[]},i);if(h instanceof Promise)o.push(h.then((g)=>{if(g.issues.length)n.issues.push(...se(c,g.issues));n.value[y]=g.value}));else{if(h.issues.length)n.issues.push(...se(c,h.issues));n.value[y]=h.value}}let u;for(let c in r)if(!a.has(c))u=u??[],u.push(c);if(u&&u.length>0)n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(r,a))continue;let u=t.keyType._zod.run({value:a,issues:[]},i);if(u instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof a==="string"&&Vn.test(a)&&u.issues.length){let d=t.keyType._zod.run({value:Number(a),issues:[]},i);if(d instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(d.issues.length===0)u=d}if(u.issues.length){if(t.mode==="loose")n.value[a]=r[a];else n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map((d)=>te(d,i,ee())),input:a,path:[a],inst:e});continue}let c=t.valueType._zod.run({value:r[a],issues:[]},i);if(c instanceof Promise)o.push(c.then((d)=>{if(d.issues.length)n.issues.push(...se(a,d.issues));n.value[u.value]=d.value}));else{if(c.issues.length)n.issues.push(...se(a,c.issues));n.value[u.value]=c.value}}}if(o.length)return Promise.all(o).then(()=>n);return n}}),Ds=p("$ZodEnum",(e,t)=>{x.init(e,t);let n=zn(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter((r)=>Wr.has(typeof r)).map((r)=>typeof r==="string"?Ee(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{let s=r.value;if(i.has(s))return r;return r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),Us=p("$ZodLiteral",(e,t)=>{if(x.init(e,t),t.values.length===0)throw Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map((i)=>typeof i==="string"?Ee(i):i?Ee(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;if(n.has(o))return i;return i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),Fs=p("$ZodTransform",(e,t)=>{x.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Ct(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then((o)=>(n.value=o,n.fallback=!0,n));if(r instanceof Promise)throw new de;return n.value=r,n.fallback=!0,n}});function cn(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var ii=p("$ZodOptional",(e,t)=>{x.init(e,t),e._zod.optin="optional",e._zod.optout="optional",A(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),A(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${xt(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,o=t.innerType._zod.run(n,i);if(o instanceof Promise)return o.then((s)=>cn(s,r));return cn(o,r)}if(n.value===void 0)return n;return t.innerType._zod.run(n,i)}}),Bs=p("$ZodExactOptional",(e,t)=>{ii.init(e,t),A(e._zod,"values",()=>t.innerType._zod.values),A(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),js=p("$ZodNullable",(e,t)=>{x.init(e,t),A(e._zod,"optin",()=>t.innerType._zod.optin),A(e._zod,"optout",()=>t.innerType._zod.optout),A(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${xt(n.source)}|null)$`):void 0}),A(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>{if(n.value===null)return n;return t.innerType._zod.run(n,i)}}),qs=p("$ZodDefault",(e,t)=>{x.init(e,t),e._zod.optin="optional",A(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);if(r instanceof Promise)return r.then((o)=>dn(o,t));return dn(r,t)}});function dn(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var Hs=p("$ZodPrefault",(e,t)=>{x.init(e,t),e._zod.optin="optional",A(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)n.value=t.defaultValue;return t.innerType._zod.run(n,i)}}),Ws=p("$ZodNonOptional",(e,t)=>{x.init(e,t),A(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter((i)=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);if(r instanceof Promise)return r.then((o)=>pn(o,e));return pn(r,e)}});function pn(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t});return e}var Vs=p("$ZodCatch",(e,t)=>{x.init(e,t),e._zod.optin="optional",A(e._zod,"optout",()=>t.innerType._zod.optout),A(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);if(r instanceof Promise)return r.then((o)=>{if(n.value=o.value,o.issues.length)n.value=t.catchValue({...n,error:{issues:o.issues.map((s)=>te(s,i,ee()))},input:n.value}),n.issues=[],n.fallback=!0;return n});if(n.value=r.value,r.issues.length)n.value=t.catchValue({...n,error:{issues:r.issues.map((o)=>te(o,i,ee()))},input:n.value}),n.issues=[],n.fallback=!0;return n}}),ri=p("$ZodPipe",(e,t)=>{x.init(e,t),A(e._zod,"values",()=>t.in._zod.values),A(e._zod,"optin",()=>t.in._zod.optin),A(e._zod,"optout",()=>t.out._zod.optout),A(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);if(o instanceof Promise)return o.then((s)=>Be(s,t.in,i));return Be(o,t.in,i)}let r=t.in._zod.run(n,i);if(r instanceof Promise)return r.then((o)=>Be(o,t.out,i));return Be(r,t.out,i)}});function Be(e,t,n){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Zs=p("$ZodPreprocess",(e,t)=>{ri.init(e,t)}),Gs=p("$ZodReadonly",(e,t)=>{x.init(e,t),A(e._zod,"propValues",()=>t.innerType._zod.propValues),A(e._zod,"values",()=>t.innerType._zod.values),A(e._zod,"optin",()=>t.innerType?._zod?.optin),A(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);if(r instanceof Promise)return r.then(hn);return hn(r)}});function hn(e){return e.value=Object.freeze(e.value),e}var Ks=p("$ZodFunction",(e,t)=>(x.init(e,t),e._def=t,e._zod.def=t,e.implement=(n)=>{if(typeof n!=="function")throw Error("implement() must be called with a function");return function(...i){let r=e._def.input?en(e._def.input,i):i,o=Reflect.apply(n,this,r);if(e._def.output)return en(e._def.output,o);return o}},e.implementAsync=(n)=>{if(typeof n!=="function")throw Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await tn(e._def.input,i):i,o=await Reflect.apply(n,this,r);if(e._def.output)return await tn(e._def.output,o);return o}},e._zod.parse=(n,i)=>{if(typeof n.value!=="function")return n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n;if(e._def.output&&e._def.output._zod.def.type==="promise")n.value=e.implementAsync(n.value);else n.value=e.implement(n.value);return n},e.input=(...n)=>{let i=e.constructor;if(Array.isArray(n[0]))return new i({type:"function",input:new ni({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output});return new i({type:"function",input:n[0],output:e._def.output})},e.output=(n)=>new e.constructor({type:"function",input:e._def.input,output:n}),e)),Js=p("$ZodPromise",(e,t)=>{x.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then((r)=>t.innerType._zod.run({value:r,issues:[]},i))}),Ys=p("$ZodCustom",(e,t)=>{V.init(e,t),x.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=(n)=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then((o)=>fn(o,n,i,e));fn(r,n,i,e);return}});function fn(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};if(i._zod.def.params)r.params=i._zod.def.params;t.issues.push($e(r))}}var Xs=()=>{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(r){return e[r]??null}let n={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"},i={nan:"NaN"};return(r)=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=no(r.input),a=i[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":if(r.values.length===1)return`Invalid input: expected ${Fn(r.values[0])}`;return`Invalid option: expected one of ${Yt(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);if(s)return`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${s.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);if(s)return`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${s.unit}`;return`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`Invalid string: must start with "${o.prefix}"`;if(o.format==="ends_with")return`Invalid string: must end with "${o.suffix}"`;if(o.format==="includes")return`Invalid string: must include "${o.includes}"`;if(o.format==="regex")return`Invalid string: must match pattern ${o.pattern}`;return`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${Yt(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":if(r.options&&Array.isArray(r.options)&&r.options.length>0)return`Invalid discriminator value. Expected ${r.options.map((o)=>`'${o}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Qs(){return{localeError:Xs()}}var mn,vp=Symbol("ZodOutput"),bp=Symbol("ZodInput");class oi{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==="object"&&"id"in n)this._idmap.set(n.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t==="object"&&"id"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function ea(){return new oi}(mn=globalThis).__zod_globalRegistry??(mn.__zod_globalRegistry=ea());var Se=globalThis.__zod_globalRegistry;function ta(e,t){return new e({type:"string",...b(t)})}function na(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...b(t)})}function gn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...b(t)})}function ia(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...b(t)})}function ra(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...b(t)})}function oa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...b(t)})}function sa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...b(t)})}function aa(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...b(t)})}function la(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...b(t)})}function ua(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...b(t)})}function ca(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...b(t)})}function da(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...b(t)})}function pa(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...b(t)})}function ha(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...b(t)})}function fa(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...b(t)})}function ma(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...b(t)})}function ga(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...b(t)})}function ya(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...b(t)})}function va(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...b(t)})}function ba(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...b(t)})}function Ta(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...b(t)})}function wa(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...b(t)})}function _a(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...b(t)})}function ka(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...b(t)})}function Ea(e,t){return new e({type:"string",format:"date",check:"string_format",...b(t)})}function Ia(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...b(t)})}function Ca(e,t){return new e({type:"string",format:"duration",check:"string_format",...b(t)})}function Aa(e,t){return new e({type:"number",checks:[],...b(t)})}function xa(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...b(t)})}function Ra(e,t){return new e({type:"boolean",...b(t)})}function Sa(e){return new e({type:"unknown"})}function Na(e,t){return new e({type:"never",...b(t)})}function Oa(e,t){return new e({type:"void",...b(t)})}function Ma(e,t){return new e({type:"date",...b(t)})}function yn(e,t){return new Gn({check:"less_than",...b(t),value:e,inclusive:!1})}function He(e,t){return new Gn({check:"less_than",...b(t),value:e,inclusive:!0})}function vn(e,t){return new Kn({check:"greater_than",...b(t),value:e,inclusive:!1})}function We(e,t){return new Kn({check:"greater_than",...b(t),value:e,inclusive:!0})}function bn(e,t){return new jo({check:"multiple_of",...b(t),value:e})}function si(e,t){return new Ho({check:"max_length",...b(t),maximum:e})}function Ge(e,t){return new Wo({check:"min_length",...b(t),minimum:e})}function ai(e,t){return new Vo({check:"length_equals",...b(t),length:e})}function Pa(e,t){return new Zo({check:"string_format",format:"regex",...b(t),pattern:e})}function $a(e){return new Go({check:"string_format",format:"lowercase",...b(e)})}function La(e){return new Ko({check:"string_format",format:"uppercase",...b(e)})}function za(e,t){return new Jo({check:"string_format",format:"includes",...b(t),includes:e})}function Da(e,t){return new Yo({check:"string_format",format:"starts_with",...b(t),prefix:e})}function Ua(e,t){return new Xo({check:"string_format",format:"ends_with",...b(t),suffix:e})}function Ce(e){return new Qo({check:"overwrite",tx:e})}function Fa(e){return Ce((t)=>t.normalize(e))}function Ba(){return Ce((e)=>e.trim())}function ja(){return Ce((e)=>e.toLowerCase())}function qa(){return Ce((e)=>e.toUpperCase())}function Ha(){return Ce((e)=>qr(e))}function Wa(e,t,n){return new e({type:"array",element:t,...b(n)})}function Va(e,t,n){let i=b(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Za(e,t,n){return new e({type:"custom",check:"custom",fn:t,...b(n)})}function Ga(e,t){let n=Ka((i)=>(i.addIssue=(r)=>{if(typeof r==="string")i.issues.push($e(r,i.value,n._zod.def));else{let o=r;if(o.fatal)o.continue=!1;o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push($e(o))}},e(i.value,i)),t);return n}function Ka(e,t){let n=new V({check:"custom",...b(t)});return n._zod.check=e,n}function Ke(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";return{processors:e.processors??{},metadataRegistry:e?.metadata??Se,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 S(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o){if(o.count++,n.schemaPath.includes(e))o.cycle=n.path;return o.schema}let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let c={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,c);else{let y=s.schema,h=t.processors[r.type];if(!h)throw Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);h(e,t,y,c)}let d=e._zod.parent;if(d){if(!s.ref)s.ref=d;S(d,t,c),t.seen.get(d).isParent=!0}}let u=t.metadataRegistry.get(e);if(u)Object.assign(s.schema,u);if(t.io==="input"&&q(e))delete s.schema.examples,delete s.schema.default;if(t.io==="input"&&"_prefault"in s.schema)(i=s.schema).default??(i.default=s.schema._prefault);return delete s.schema._prefault,t.seen.get(e).schema}function Je(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let u=i.get(a);if(u&&u!==s[0])throw Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(a,s[0])}}let r=(s)=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(s[0])?.id,y=e.external.uri??((g)=>g);if(d)return{ref:y(d)};let h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${y("__shared")}#/${a}/${h}`}}if(s[1]===n)return{ref:"#"};let u=`#/${a}/`,c=s[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:u+c}},o=(s)=>{if(s[1].schema.$ref)return;let a=s[1],{ref:u,defId:c}=r(s);if(a.def={...a.schema},c)a.defId=c;let d=a.schema;for(let y in d)delete d[y];d.$ref=u};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
63
63
 
64
- 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 u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1){if(e.reused==="ref"){o(s);continue}}}}function Ye(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=(a)=>{let u=e.seen.get(a);if(u.ref===null)return;let c=u.def??u.schema,d={...c},y=u.ref;if(u.ref=null,y){i(y);let g=e.seen.get(y),T=g.schema;if(T.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))c.allOf=c.allOf??[],c.allOf.push(T);else Object.assign(c,T);if(Object.assign(c,d),a._zod.parent===y)for(let k in c){if(k==="$ref"||k==="allOf")continue;if(!(k in d))delete c[k]}if(T.$ref&&g.def)for(let k in c){if(k==="$ref"||k==="allOf")continue;if(k in g.def&&JSON.stringify(c[k])===JSON.stringify(g.def[k]))delete c[k]}}let h=a._zod.parent;if(h&&h!==y){i(h);let g=e.seen.get(h);if(g?.schema.$ref){if(c.$ref=g.schema.$ref,g.def)for(let T in c){if(T==="$ref"||T==="allOf")continue;if(T in g.def&&JSON.stringify(c[T])===JSON.stringify(g.def[T]))delete c[T]}}}e.override({zodSchema:a,jsonSchema:c,path:u.path??[]})};for(let a of[...e.seen.entries()].reverse())i(a[0]);let r={};if(e.target==="draft-2020-12")r.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")r.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")r.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw Error("Schema is missing an `id` property");r.$id=e.external.uri(a)}Object.assign(r,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;if(o!==void 0&&r.id===o)delete r.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let u=a[1];if(u.def&&u.defId){if(u.def.id===u.defId)delete u.def.id;s[u.defId]=u.def}}if(e.external);else if(Object.keys(s).length>0)if(e.target==="draft-2020-12")r.$defs=s;else r.definitions=s;try{let a=JSON.parse(JSON.stringify(r));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xe(t,"input",e.processors),output:Xe(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch(a){throw Error("Error converting schema to JSON.")}}function q(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return q(i.element,n);if(i.type==="set")return q(i.valueType,n);if(i.type==="lazy")return q(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return q(i.innerType,n);if(i.type==="intersection")return q(i.left,n)||q(i.right,n);if(i.type==="record"||i.type==="map")return q(i.keyType,n)||q(i.valueType,n);if(i.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return q(i.in,n)||q(i.out,n)}if(i.type==="object"){for(let r in i.shape)if(q(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(q(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(q(r,n))return!0;if(i.rest&&q(i.rest,n))return!0;return!1}return!1}var Ja=(e,t={})=>(n)=>{let i=Ke({...n,processors:t});return S(e,i),Je(i,e),Ye(i,e)},Xe=(e,t,n={})=>(i)=>{let{libraryOptions:r,target:o}=i??{},s=Ke({...r??{},target:o,io:t,processors:n});return S(e,s),Je(s,e),Ye(s,e)},Ya={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},li=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:s,format:a,patterns:u,contentEncoding:c}=e._zod.bag;if(typeof o==="number")r.minLength=o;if(typeof s==="number")r.maxLength=s;if(a){if(r.format=Ya[a]??a,r.format==="")delete r.format;if(a==="time")delete r.format}if(c)r.contentEncoding=c;if(u&&u.size>0){let d=[...u];if(d.length===1)r.pattern=d[0].source;else if(d.length>1)r.allOf=[...d.map((y)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))]}},ui=(e,t,n,i)=>{let r=n,{minimum:o,maximum:s,format:a,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:d}=e._zod.bag;if(typeof a==="string"&&a.includes("int"))r.type="integer";else r.type="number";let y=typeof d==="number"&&d>=(o??Number.NEGATIVE_INFINITY),h=typeof c==="number"&&c<=(s??Number.POSITIVE_INFINITY),g=t.target==="draft-04"||t.target==="openapi-3.0";if(y)if(g)r.minimum=d,r.exclusiveMinimum=!0;else r.exclusiveMinimum=d;else if(typeof o==="number")r.minimum=o;if(h)if(g)r.maximum=c,r.exclusiveMaximum=!0;else r.exclusiveMaximum=c;else if(typeof s==="number")r.maximum=s;if(typeof u==="number")r.multipleOf=u},ci=(e,t,n,i)=>{n.type="boolean"},Xa=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},Qa=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},el=(e,t,n,i)=>{if(t.target==="openapi-3.0")n.type="string",n.nullable=!0,n.enum=[null];else n.type="null"},tl=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},di=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},pi=(e,t,n,i)=>{n.not={}},nl=(e,t,n,i)=>{},hi=(e,t,n,i)=>{},fi=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},mi=(e,t,n,i)=>{let r=e._zod.def,o=zn(r.entries);if(o.every((s)=>typeof s==="number"))n.type="number";if(o.every((s)=>typeof s==="string"))n.type="string";n.enum=o},gi=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s==="bigint")if(t.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else o.push(Number(s));else o.push(s);if(o.length===0);else if(o.length===1){let s=o[0];if(n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0")n.enum=[s];else n.const=s}else{if(o.every((s)=>typeof s==="number"))n.type="number";if(o.every((s)=>typeof s==="string"))n.type="string";if(o.every((s)=>typeof s==="boolean"))n.type="boolean";if(o.every((s)=>s===null))n.type="null";n.enum=o}},il=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},rl=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},ol=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:u}=e._zod.bag;if(s!==void 0)o.minLength=s;if(a!==void 0)o.maxLength=a;if(u)if(u.length===1)o.contentMediaType=u[0],Object.assign(r,o);else Object.assign(r,o),r.anyOf=u.map((c)=>({contentMediaType:c}));else Object.assign(r,o)},sl=(e,t,n,i)=>{n.type="boolean"},yi=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},vi=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},bi=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},al=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},ll=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},Ti=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;if(typeof s==="number")r.minItems=s;if(typeof a==="number")r.maxItems=a;r.type="array",r.items=S(o.element,t,{...i,path:[...i.path,"items"]})},wi=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object",r.properties={};let s=o.shape;for(let c in s)r.properties[c]=S(s[c],t,{...i,path:[...i.path,"properties",c]});let a=new Set(Object.keys(s)),u=new Set([...a].filter((c)=>{let d=o.shape[c]._zod;if(t.io==="input")return d.optin===void 0;else return d.optout===void 0}));if(u.size>0)r.required=Array.from(u);if(o.catchall?._zod.def.type==="never")r.additionalProperties=!1;else if(!o.catchall){if(t.io==="output")r.additionalProperties=!1}else if(o.catchall)r.additionalProperties=S(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})},_i=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,s=r.options.map((a,u)=>S(a,t,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));if(o)n.oneOf=s;else n.anyOf=s},ki=(e,t,n,i)=>{let r=e._zod.def,o=S(r.left,t,{...i,path:[...i.path,"allOf",0]}),s=S(r.right,t,{...i,path:[...i.path,"allOf",1]}),a=(c)=>("allOf"in c)&&Object.keys(c).length===1,u=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];n.allOf=u},Ei=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"?"items":t.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((h,g)=>S(h,t,{...i,path:[...i.path,s,g]})),c=o.rest?S(o.rest,t,{...i,path:[...i.path,a,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;if(t.target==="draft-2020-12"){if(r.prefixItems=u,c)r.items=c}else if(t.target==="openapi-3.0"){if(r.items={anyOf:u},c)r.items.anyOf.push(c);if(r.minItems=u.length,!c)r.maxItems=u.length}else if(r.items=u,c)r.additionalItems=c;let{minimum:d,maximum:y}=e._zod.bag;if(typeof d==="number")r.minItems=d;if(typeof y==="number")r.maxItems=y},Ii=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let s=o.keyType,a=s._zod.bag?.patterns;if(o.mode==="loose"&&a&&a.size>0){let c=S(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let d of a)r.patternProperties[d.source]=c}else{if(t.target==="draft-07"||t.target==="draft-2020-12")r.propertyNames=S(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});r.additionalProperties=S(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let u=s._zod.values;if(u){let c=[...u].filter((d)=>typeof d==="string"||typeof d==="number");if(c.length>0)r.required=c}},Ci=(e,t,n,i)=>{let r=e._zod.def,o=S(r.innerType,t,i),s=t.seen.get(e);if(t.target==="openapi-3.0")s.ref=r.innerType,n.nullable=!0;else n.anyOf=[o,{type:"null"}]},Ai=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},xi=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Ri=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);if(o.ref=r.innerType,t.io==="input")n._prefault=JSON.parse(JSON.stringify(r.defaultValue))},Si=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Ni=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?o?r.out:r.in:r.out;S(s,t,i);let a=t.seen.get(e);a.ref=s},Oi=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},Mi=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Nt=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},ul=(e,t,n,i)=>{let r=e._zod.innerType;S(r,t,i);let o=t.seen.get(e);o.ref=r},Tn={string:li,number:ui,boolean:ci,bigint:Xa,symbol:Qa,null:el,undefined:tl,void:di,never:pi,any:nl,unknown:hi,date:fi,enum:mi,literal:gi,nan:il,template_literal:rl,file:ol,success:sl,custom:yi,function:vi,transform:bi,map:al,set:ll,array:Ti,object:wi,union:_i,intersection:ki,tuple:Ei,record:Ii,nullable:Ci,nonoptional:Ai,default:xi,prefault:Ri,catch:Si,pipe:Ni,readonly:Oi,promise:Mi,optional:Nt,lazy:ul};function cl(e,t){if("_idmap"in e){let i=e,r=Ke({...t,processors:Tn}),o={};for(let u of i._idmap.entries()){let[c,d]=u;S(d,r)}let s={},a={registry:i,uri:t?.uri,defs:o};r.external=a;for(let u of i._idmap.entries()){let[c,d]=u;Je(r,d),s[c]=Ye(r,d)}if(Object.keys(o).length>0){let u=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:o}}return{schemas:s}}let n=Ke({...t,processors:Tn});return S(e,n),Je(n,e),Ye(n,e)}var dl=p("ZodISODateTime",(e,t)=>{ps.init(e,t),P.init(e,t)});function pl(e){return ka(dl,e)}var hl=p("ZodISODate",(e,t)=>{hs.init(e,t),P.init(e,t)});function fl(e){return Ea(hl,e)}var ml=p("ZodISOTime",(e,t)=>{fs.init(e,t),P.init(e,t)});function gl(e){return Ia(ml,e)}var yl=p("ZodISODuration",(e,t)=>{ms.init(e,t),P.init(e,t)});function vl(e){return Ca(yl,e)}var bl=(e,t)=>{jn.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:(n)=>ro(e,n)},flatten:{value:(n)=>io(e,n)},addIssue:{value:(n)=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Tt,2)}},addIssues:{value:(n)=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Tt,2)}},isEmpty:{get(){return e.issues.length===0}}})},J=p("ZodError",bl,{Parent:Error}),Tl=nt(J),wl=it(J),_l=rt(J),kl=ot(J),El=ao(J),Il=lo(J),Cl=uo(J),Al=co(J),xl=po(J),Rl=ho(J),Sl=fo(J),Nl=mo(J),wn=new WeakMap;function Le(e,t,n){let i=Object.getPrototypeOf(e),r=wn.get(i);if(!r)r=new Set,wn.set(i,r);if(r.has(t))return;r.add(t);for(let o in n){let s=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}var R=p("ZodType",(e,t)=>(x.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xe(e,"input"),output:Xe(e,"output")}}),e.toJSONSchema=Ja(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>Tl(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>_l(e,n,i),e.parseAsync=async(n,i)=>wl(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>kl(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>El(e,n,i),e.decode=(n,i)=>Il(e,n,i),e.encodeAsync=async(n,i)=>Cl(e,n,i),e.decodeAsync=async(n,i)=>Al(e,n,i),e.safeEncode=(n,i)=>xl(e,n,i),e.safeDecode=(n,i)=>Rl(e,n,i),e.safeEncodeAsync=async(n,i)=>Sl(e,n,i),e.safeDecodeAsync=async(n,i)=>Nl(e,n,i),Le(e,"ZodType",{check(...n){let i=this.def;return this.clone(ae(i,{checks:[...i.checks??[],...n.map((r)=>typeof r==="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return le(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(xu(n,i))},superRefine(n,i){return this.check(Ru(n,i))},overwrite(n){return this.check(Ce(n))},optional(){return In(this)},exactOptional(){return fu(this)},nullable(){return Cn(this)},nullish(){return In(Cn(this))},nonoptional(n){return Tu(this,n)},array(){return w(this)},or(n){return Y([this,n])},and(n){return lu(this,n)},transform(n){return An(this,zi(n))},default(n){return yu(this,n)},prefault(n){return bu(this,n)},catch(n){return _u(this,n)},pipe(n){return An(this,n)},readonly(){return Iu(this)},describe(n){let i=this.clone();return Se.add(i,{description:n}),i},meta(...n){if(n.length===0)return Se.get(this);let i=this.clone();return Se.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Se.get(e)?.description},configurable:!0}),e)),Pi=p("_ZodString",(e,t)=>{St.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,r,o)=>li(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Le(e,"_ZodString",{regex(...i){return this.check(Pa(...i))},includes(...i){return this.check(za(...i))},startsWith(...i){return this.check(Da(...i))},endsWith(...i){return this.check(Ua(...i))},min(...i){return this.check(Ge(...i))},max(...i){return this.check(si(...i))},length(...i){return this.check(ai(...i))},nonempty(...i){return this.check(Ge(1,...i))},lowercase(i){return this.check($a(i))},uppercase(i){return this.check(La(i))},trim(){return this.check(Ba())},normalize(...i){return this.check(Fa(...i))},toLowerCase(){return this.check(ja())},toUpperCase(){return this.check(qa())},slugify(){return this.check(Ha())}})}),Ol=p("ZodString",(e,t)=>{St.init(e,t),Pi.init(e,t),e.email=(n)=>e.check(na(Ml,n)),e.url=(n)=>e.check(aa(Pl,n)),e.jwt=(n)=>e.check(_a(Kl,n)),e.emoji=(n)=>e.check(la($l,n)),e.guid=(n)=>e.check(gn(_n,n)),e.uuid=(n)=>e.check(ia(je,n)),e.uuidv4=(n)=>e.check(ra(je,n)),e.uuidv6=(n)=>e.check(oa(je,n)),e.uuidv7=(n)=>e.check(sa(je,n)),e.nanoid=(n)=>e.check(ua(Ll,n)),e.guid=(n)=>e.check(gn(_n,n)),e.cuid=(n)=>e.check(ca(zl,n)),e.cuid2=(n)=>e.check(da(Dl,n)),e.ulid=(n)=>e.check(pa(Ul,n)),e.base64=(n)=>e.check(ba(Vl,n)),e.base64url=(n)=>e.check(Ta(Zl,n)),e.xid=(n)=>e.check(ha(Fl,n)),e.ksuid=(n)=>e.check(fa(Bl,n)),e.ipv4=(n)=>e.check(ma(jl,n)),e.ipv6=(n)=>e.check(ga(ql,n)),e.cidrv4=(n)=>e.check(ya(Hl,n)),e.cidrv6=(n)=>e.check(va(Wl,n)),e.e164=(n)=>e.check(wa(Gl,n)),e.datetime=(n)=>e.check(pl(n)),e.date=(n)=>e.check(fl(n)),e.time=(n)=>e.check(gl(n)),e.duration=(n)=>e.check(vl(n))});function l(e){return ta(Ol,e)}var P=p("ZodStringFormat",(e,t)=>{O.init(e,t),Pi.init(e,t)}),Ml=p("ZodEmail",(e,t)=>{is.init(e,t),P.init(e,t)}),_n=p("ZodGUID",(e,t)=>{ts.init(e,t),P.init(e,t)}),je=p("ZodUUID",(e,t)=>{ns.init(e,t),P.init(e,t)}),Pl=p("ZodURL",(e,t)=>{rs.init(e,t),P.init(e,t)}),$l=p("ZodEmoji",(e,t)=>{os.init(e,t),P.init(e,t)}),Ll=p("ZodNanoID",(e,t)=>{ss.init(e,t),P.init(e,t)}),zl=p("ZodCUID",(e,t)=>{as.init(e,t),P.init(e,t)}),Dl=p("ZodCUID2",(e,t)=>{ls.init(e,t),P.init(e,t)}),Ul=p("ZodULID",(e,t)=>{us.init(e,t),P.init(e,t)}),Fl=p("ZodXID",(e,t)=>{cs.init(e,t),P.init(e,t)}),Bl=p("ZodKSUID",(e,t)=>{ds.init(e,t),P.init(e,t)}),jl=p("ZodIPv4",(e,t)=>{gs.init(e,t),P.init(e,t)}),ql=p("ZodIPv6",(e,t)=>{ys.init(e,t),P.init(e,t)}),Hl=p("ZodCIDRv4",(e,t)=>{vs.init(e,t),P.init(e,t)}),Wl=p("ZodCIDRv6",(e,t)=>{bs.init(e,t),P.init(e,t)}),Vl=p("ZodBase64",(e,t)=>{Ts.init(e,t),P.init(e,t)}),Zl=p("ZodBase64URL",(e,t)=>{_s.init(e,t),P.init(e,t)}),Gl=p("ZodE164",(e,t)=>{ks.init(e,t),P.init(e,t)}),Kl=p("ZodJWT",(e,t)=>{Is.init(e,t),P.init(e,t)}),$i=p("ZodNumber",(e,t)=>{Xn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ui(e,i,r,o),Le(e,"ZodNumber",{gt(i,r){return this.check(vn(i,r))},gte(i,r){return this.check(We(i,r))},min(i,r){return this.check(We(i,r))},lt(i,r){return this.check(yn(i,r))},lte(i,r){return this.check(He(i,r))},max(i,r){return this.check(He(i,r))},int(i){return this.check(kn(i))},safe(i){return this.check(kn(i))},positive(i){return this.check(vn(0,i))},nonnegative(i){return this.check(We(0,i))},negative(i){return this.check(yn(0,i))},nonpositive(i){return this.check(He(0,i))},multipleOf(i,r){return this.check(bn(i,r))},step(i,r){return this.check(bn(i,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??0.5),e.isFinite=!0,e.format=n.format??null});function m(e){return Aa($i,e)}var Jl=p("ZodNumberFormat",(e,t)=>{Cs.init(e,t),$i.init(e,t)});function kn(e){return xa(Jl,e)}var Yl=p("ZodBoolean",(e,t)=>{As.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ci(e,n,i,r)});function E(e){return Ra(Yl,e)}var Xl=p("ZodUnknown",(e,t)=>{xs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hi(e,n,i,r)});function D(){return Sa(Xl)}var Ql=p("ZodNever",(e,t)=>{Rs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>pi(e,n,i,r)});function eu(e){return Na(Ql,e)}var tu=p("ZodVoid",(e,t)=>{Ss.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>di(e,n,i,r)});function nu(e){return Oa(tu,e)}var iu=p("ZodDate",(e,t)=>{Ns.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,r,o)=>fi(e,i,r,o),e.min=(i,r)=>e.check(We(i,r)),e.max=(i,r)=>e.check(He(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Qe(e){return Ma(iu,e)}var ru=p("ZodArray",(e,t)=>{Os.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ti(e,n,i,r),e.element=t.element,Le(e,"ZodArray",{min(n,i){return this.check(Ge(n,i))},nonempty(n){return this.check(Ge(1,n))},max(n,i){return this.check(si(n,i))},length(n,i){return this.check(ai(n,i))},unwrap(){return this.element}})});function w(e,t){return Wa(ru,e,t)}var ou=p("ZodObject",(e,t)=>{Ps.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>wi(e,n,i,r),A(e,"shape",()=>t.shape),Le(e,"ZodObject",{keyof(){return _(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:D()})},loose(){return this.clone({...this._zod.def,catchall:D()})},strict(){return this.clone({...this._zod.def,catchall:eu()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Jr(this,n)},safeExtend(n){return Yr(this,n)},merge(n){return Xr(this,n)},pick(n){return Gr(this,n)},omit(n){return Kr(this,n)},partial(...n){return Qr(Di,this,n[0])},required(...n){return eo(Ui,this,n[0])}})});function f(e,t){let n={type:"object",shape:e??{},...b(t)};return new ou(n)}var Li=p("ZodUnion",(e,t)=>{ti.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>_i(e,n,i,r),e.options=t.options});function Y(e,t){return new Li({type:"union",options:e,...b(t)})}var su=p("ZodDiscriminatedUnion",(e,t)=>{Li.init(e,t),$s.init(e,t)});function Ot(e,t,n){return new su({type:"union",options:t,discriminator:e,...b(n)})}var au=p("ZodIntersection",(e,t)=>{Ls.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ki(e,n,i,r)});function lu(e,t){return new au({type:"intersection",left:e,right:t})}var uu=p("ZodTuple",(e,t)=>{ni.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ei(e,n,i,r),e.rest=(n)=>e.clone({...e._zod.def,rest:n})});function cu(e,t,n){let i=t instanceof x;return new uu({type:"tuple",items:e,rest:i?t:null,...b(i?n:t)})}var En=p("ZodRecord",(e,t)=>{zs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ii(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function z(e,t,n){if(!t||!t._zod)return new En({type:"record",keyType:l(),valueType:e,...b(t)});return new En({type:"record",keyType:e,valueType:t,...b(n)})}var _t=p("ZodEnum",(e,t)=>{Ds.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,r,o)=>mi(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let s of i)if(n.has(s))o[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new _t({...t,checks:[],...b(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let s of i)if(n.has(s))delete o[s];else throw Error(`Key ${s} not found in enum`);return new _t({...t,checks:[],...b(r),entries:o})}});function _(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map((i)=>[i,i])):e;return new _t({type:"enum",entries:n,...b(t)})}var du=p("ZodLiteral",(e,t)=>{Us.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gi(e,n,i,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function L(e,t){return new du({type:"literal",values:Array.isArray(e)?e:[e],...b(t)})}var pu=p("ZodTransform",(e,t)=>{Fs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>bi(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Ct(e.constructor.name);n.addIssue=(o)=>{if(typeof o==="string")n.issues.push($e(o,n.value,t));else{let s=o;if(s.fatal)s.continue=!1;s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push($e(s))}};let r=t.transform(n.value,n);if(r instanceof Promise)return r.then((o)=>(n.value=o,n.fallback=!0,n));return n.value=r,n.fallback=!0,n}});function zi(e){return new pu({type:"transform",transform:e})}var Di=p("ZodOptional",(e,t)=>{ii.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Nt(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function In(e){return new Di({type:"optional",innerType:e})}var hu=p("ZodExactOptional",(e,t)=>{Bs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Nt(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function fu(e){return new hu({type:"optional",innerType:e})}var mu=p("ZodNullable",(e,t)=>{js.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ci(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Cn(e){return new mu({type:"nullable",innerType:e})}var gu=p("ZodDefault",(e,t)=>{qs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xi(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function yu(e,t){return new gu({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():Un(t)}})}var vu=p("ZodPrefault",(e,t)=>{Hs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ri(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function bu(e,t){return new vu({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():Un(t)}})}var Ui=p("ZodNonOptional",(e,t)=>{Ws.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ai(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Tu(e,t){return new Ui({type:"nonoptional",innerType:e,...b(t)})}var wu=p("ZodCatch",(e,t)=>{Vs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Si(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function _u(e,t){return new wu({type:"catch",innerType:e,catchValue:typeof t==="function"?t:()=>t})}var Fi=p("ZodPipe",(e,t)=>{ri.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ni(e,n,i,r),e.in=t.in,e.out=t.out});function An(e,t){return new Fi({type:"pipe",in:e,out:t})}var ku=p("ZodPreprocess",(e,t)=>{Fi.init(e,t),Zs.init(e,t)}),Eu=p("ZodReadonly",(e,t)=>{Gs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Oi(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Iu(e){return new Eu({type:"readonly",innerType:e})}var Cu=p("ZodPromise",(e,t)=>{Js.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Mi(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function gt(e){return new Cu({type:"promise",innerType:e})}var Au=p("ZodFunction",(e,t)=>{Ks.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vi(e,n,i,r)});function qe(e){return new Au({type:"function",input:Array.isArray(e?.input)?cu(e?.input):e?.input??w(D()),output:e?.output??D()})}var Bi=p("ZodCustom",(e,t)=>{Ys.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>yi(e,n,i,r)});function K(e,t){return Va(Bi,e??(()=>!0),t)}function xu(e,t={}){return Za(Bi,e,t)}function Ru(e,t){return Ga(e,t)}function ji(e,t){return new ku({type:"pipe",in:zi(e),out:t})}ee(Qs());var qi=["none","minimal","low","medium","high","xhigh","max"],Su=_(qi),Nu=Su.exclude(["none"]),Ou=_([...qi,"default"]).nullable(),Mu=Ot("type",[f({type:L("toggle")}).strict(),f({type:L("effort"),values:w(Ou)}).strict(),f({type:L("budget_tokens"),min:m().min(-1).optional(),max:m().min(0).optional()}).strict().refine((e)=>e.min===void 0||e.max===void 0||e.min<=e.max,{message:"Minimum reasoning budget cannot exceed maximum",path:["min"]})]),Pu=_(["default","openai-responses","r1"]);var $u=_(["images","video","tools","streaming","prompt-cache","reasoning","reasoning-effort","computer-use","global-endpoint","structured_output","temperature","files"]),Lu=_(["active","preview","deprecated","legacy"]),zu=f({input:m().optional(),output:m().optional(),cacheWrite:m().optional(),cacheRead:m().optional()}),Du=f({maxBudget:m().optional(),outputPrice:m().optional(),thinkingLevel:_(["low","high"]).optional()}),Uu=f({reasoningDefaultOn:E().optional(),apiProtocol:_(["openai-chat","openai-responses","anthropic","gemini"]).optional()}).catchall(D()),xn=_(["text","image","audio","video","pdf"]),Fu=f({input:w(xn),output:w(xn)});var Bu=_(["language","image-generation","speech-generation","video-generation","transcription","realtime"]);var ju=_(["batch","streaming"]);var Hi=f({id:l(),name:l().optional(),description:l().optional(),maxTokens:m().optional(),contextWindow:m().optional(),maxInputTokens:m().optional(),capabilities:w($u).optional(),operation:Bu.optional(),operationModes:w(ju).optional(),modalities:Fu.optional(),reasoningOptions:w(Mu).optional(),apiFormat:Pu.optional(),systemRole:_(["system","developer"]).optional(),temperature:m().optional(),pricing:zu.optional(),thinkingConfig:Du.optional(),status:Lu.optional(),deprecationNotice:l().optional(),replacedBy:l().optional(),releaseDate:l().optional(),deprecationDate:l().optional(),family:l().optional(),metadata:Uu.optional()});var Wi="NOT a tool or system failure. Clarify with user before proceeding.",qu=f({id:l(),name:l(),execution:_(["client","provider"]).optional(),input:D(),output:D(),error:l().optional(),durationMs:m(),startedAt:Qe(),endedAt:Qe()}),Hu=_(["completed","max_iterations","aborted","mistake_limit","error"]),Wu=f({inputTokens:m(),outputTokens:m(),cacheReadTokens:m().optional(),cacheWriteTokens:m().optional(),totalCost:m().optional()}),Tp=f({text:l(),usage:Wu,messages:w(K()),toolCalls:w(qu),iterations:m(),finishReason:Hu,model:f({id:l(),provider:l(),info:Hi.optional()}),startedAt:Qe(),endedAt:Qe(),durationMs:m()}),wp=f({distinctId:l().optional(),sessionId:l().optional(),providerId:l(),modelId:l(),apiKey:l().optional(),baseUrl:l().url().optional(),headers:z(l(),l()).optional(),knownModels:z(l(),Hi).optional(),providerConfig:D().optional(),initialMessages:w(K()).optional(),systemPrompt:l(),tools:w(K()),modelTools:w(K()).optional(),maxIterations:m().positive().optional(),maxParallelToolCalls:m().int().positive().default(8),maxTokensPerTurn:m().positive().optional(),maxToolResultChars:m().int().positive().optional(),temperature:m().nonnegative().optional(),apiTimeoutMs:m().positive().default(180000),userFileContentLoader:qe().input([l()]).output(gt(l())).optional(),toolContextMetadata:z(l(),D()).optional(),execution:f({maxConsecutiveMistakes:m().int().positive().optional(),reminderAfterIterations:m().nonnegative().optional(),reminderText:l().optional(),loopDetection:Y([L(!1),f({softThreshold:m().int().positive().optional(),hardThreshold:m().int().positive().optional()})]).optional(),reasoningLoopDetection:Y([L(!1),f({minChars:m().int().positive().optional(),window:m().int().positive().optional(),maxPeriod:m().int().positive().optional(),minCycles:m().int().positive().optional(),maxUniqueInWindow:m().int().positive().optional(),minLineChars:m().int().positive().optional(),phraseMaxPeriod:m().int().positive().optional(),phraseMinCycles:m().int().positive().optional(),maxConsecutiveTrips:m().int().positive().optional()})]).optional(),reasoningRepetition:Y([L(!1),f({minChars:m().int().positive().optional(),minParagraphChars:m().int().positive().optional(),minStopwords:m().int().nonnegative().optional(),maxRepeatTrip:m().int().positive().optional(),duplicateFractionTrip:m().min(0).max(1).optional(),cooldownTurns:m().int().nonnegative().optional(),maxNudges:m().int().nonnegative().optional(),recoveryTokens:m().int().nonnegative().optional()})]).optional()}).optional(),reasoningEffort:Nu.optional(),thinkingBudgetTokens:m().positive().optional(),thinking:E().optional(),onEvent:qe().input([K()]).output(nu()).optional(),hooks:K().optional(),parentAgentId:l().optional(),extensions:w(K()).optional(),hookErrorMode:_(["ignore","throw"]).default("ignore"),toolPolicies:z(l(),f({enabled:E().optional(),autoApprove:E().optional()})).optional(),unavailableToolReasons:z(l(),l()).optional(),requestToolApproval:qe().input([f({sessionId:l(),agentId:l(),conversationId:l(),iteration:m(),toolCallId:l(),toolName:l(),input:D(),policy:f({enabled:E().optional(),autoApprove:E().optional()}).default({})})]).output(Y([f({approved:E(),reason:l().optional()}),gt(f({approved:E(),reason:l().optional()}))])).optional(),onConsecutiveMistakeLimitReached:qe().input([f({iteration:m().int().positive(),consecutiveMistakes:m().int().positive(),maxConsecutiveMistakes:m().int().positive(),reason:_(["api_error","invalid_tool_call","tool_execution_failed"]),details:l().optional()})]).output(Y([f({action:L("continue"),guidance:l().optional()}),f({action:L("stop"),reason:l().optional()}),gt(Y([f({action:L("continue"),guidance:l().optional()}),f({action:L("stop"),reason:l().optional()})]))])).optional(),logger:K().optional(),extensionContext:K().optional(),abortSignal:K().optional()}),Vu=_(["connector.started","connector.stopping","session.authorize","message.received","message.denied","message.completed","message.failed","session.started","session.reused","session.reset","schedule.delivery.started","schedule.delivery.sent","schedule.delivery.failed"]),Zu=f({id:l().optional(),label:l().optional(),role:l().optional(),participantKey:l().optional(),participantLabel:l().optional(),platformUserId:l().optional(),metadata:z(l(),D()).optional()}),Gu=f({source:l(),sourceEvent:l(),threadId:l(),channelId:l(),isDM:E(),sessionId:l().optional(),workspaceRoot:l().optional(),metadata:z(l(),D()).optional()}),_p=f({actor:Zu,context:Gu,payload:z(l(),D()).optional()}),kp=f({action:_(["allow","deny"]).default("allow"),message:l().optional(),reason:l().optional(),metadata:z(l(),D()).optional()}),Ep=f({adapter:l(),botUserName:l().optional(),event:Vu,payload:z(l(),D()),ts:l()});var Ku=["hooks","tools","commands","rules","skills","messageBuilders","providers","automationEvents","mcp"],Ip=new Set(Ku);var Ne={CLINE_PASS:"ext-cline-pass",CODE_CLOUD_AGENTS:"code-cloud-agents",CODE_ONBOARDING_GITHUB:"code-onboarding-github",CLINE_COMPOSIO_BETA:"CLINE_COMPOSIO_BETA"},Cp={[Ne.CLINE_PASS]:!1,[Ne.CODE_CLOUD_AGENTS]:!1,[Ne.CODE_ONBOARDING_GITHUB]:!1,[Ne.CLINE_COMPOSIO_BETA]:!1},Ap=Object.values(Ne),Ju=_(["agent_start","agent_resume","agent_abort","agent_end","agent_error","tool_call","tool_result","prompt_submit","pre_compact","session_shutdown"]),pe=z(l(),l()),Yu=f({toolName:l(),parameters:pe}),Xu=f({toolName:l(),parameters:pe,result:l(),success:E(),executionTimeMs:m()}),Qu=f({prompt:l(),attachments:w(l())}),ec=f({taskMetadata:pe}),tc=f({taskMetadata:pe,previousState:pe}),nc=f({taskMetadata:pe}),ic=f({taskMetadata:pe}),rc=f({taskId:l(),ulid:l(),contextSize:m(),compactionStrategy:l(),previousApiReqIndex:m(),tokensIn:m(),tokensOut:m(),tokensInCache:m(),tokensOutCache:m(),deletedRangeStart:m(),deletedRangeEnd:m(),contextJsonPath:l(),contextRawPath:l()}),xp=f({clineVersion:l(),hookName:Ju,timestamp:l(),taskId:l(),sessionContext:f({rootSessionId:l().optional(),hookLogPath:l().optional()}).optional(),workspaceRoots:w(l()),workspaceInfo:K().optional(),userId:l(),agent_id:l(),parent_agent_id:l().nullable(),iteration:m().optional(),reason:l().optional(),tool_call:f({id:l(),name:l(),input:D()}).optional(),tool_result:K().optional(),turn:D().optional(),error:f({name:l(),message:l(),stack:l().optional()}).optional(),preToolUse:Yu.optional(),postToolUse:Xu.optional(),userPromptSubmit:Qu.optional(),taskStart:ec.optional(),taskResume:tc.optional(),taskCancel:nc.optional(),taskComplete:ic.optional(),preCompact:rc.optional()}).passthrough();var oc=["readFile","search","bash","webFetch","editor","applyPatch","skills","askQuestion","submit"],Rp=new Set(oc);var Rn="<tool_call>",sc=/<tool_call>|<parameter=[^>]*>|<\/parameter>/g,ac=/<function=[^\s>]+\s*>/,Mt="[SYSTEM] Your last message contained no tool calls, so the run was about to end. If the task is not finished, continue now by emitting the tool calls it needs - do not describe what you are going to do without doing it. If the task really is finished, say so in one short sentence. If it stopped at a limit, a refusal or anything else only the user can change, and you have told the user so, that is finished too: say so in one short sentence and do not look for a way around it.",Vi=" If what you need is a decision from the user, call `ask_question` - that is the only way to reach them. A question written as ordinary text is not a question anyone will see: it reads here as a turn that called nothing, which is what produced this message.",lc="[SYSTEM] You have now taken ";function Zi(e,t){let n=Math.round(t/1000),i=n>=1?`about ${n.toLocaleString("en-US")},000 characters of reasoning`:"a full turn of reasoning";return lc+`${e} turns in a row without calling a single tool, spending ${i} on them. Thinking further has not moved this task, and it will not: you have already reasoned past the point where more of it helps. Stop analysing and make one tool call now - the smallest one that makes any progress at all, even if you are not certain it is the right one, because a call you can check beats an analysis you cannot. If you genuinely cannot make one, say what is blocking you in a single sentence and stop.`}var uc="[SYSTEM] Your last message contained a tool call that could not be read.",cc="<|tool_call>",Sn="<tool_call|>",ve='<|"|>',dc=/<\|tool_call>\s*call:([A-Za-z_][\w.-]*)\s*\{/g;function Gi(e){return`(A call to ${e.name?`\`${e.name}\``:"a tool"} was written here but could not be read, so nothing ran. Its text is not kept.)`}function yt(e){return JSON.stringify(e.replace(/\s+/g," ").trim())}function pc(e){let t=[];for(let r=e.indexOf(ve);r!==-1;r=e.indexOf(ve,r+ve.length))t.push(r);let n=(r)=>/([A-Za-z_]\w*)\s*:\s*$/.exec(e.slice(Math.max(0,r-80),r))?.[1],i=()=>{let r=/([A-Za-z_]\w*)\s*:\s*(?!<\|"\|>)([^,{}[\]<]{1,60})<\|"\|>/.exec(e);return r?`The value of \`${r[1]}\` (${yt(r[2])}) closes a string it never opened.`:void 0};for(let r=0;r+1<t.length;r+=2){let o=t[r],s=t[r+1],a=n(o),u=e.slice(o+ve.length,s),c=/([^\s,]{0,12})\s*,\s*([A-Za-z_]\w*)\s*:\s*$/.exec(u);if(c&&a){let h=c[1],g=h?`you wrote ${yt(h.slice(-8))} where its closing delimiter belongs`:"its closing delimiter is missing";return`The string for \`${a}\` was never closed: ${g}, just before \`${c[2]}\`. A string argument ends with the same delimiter that opened it and with nothing else - not a backtick, not a quote, not a tag.`}let d=e.slice(s+ve.length),y=/^\s*(\S)/.exec(d)?.[1];if(y&&!",}]".includes(y)){let h=/^\s*([A-Za-z_]\w*)\s*:/.exec(d)?.[1];if(!h){let g=i();if(g)return g}return h&&a?`There is no comma between \`${a}\` and \`${h}\`. Every argument is separated from the next by a comma.`:`After the string for \`${a??"an argument"}\` closes, the call continues with ${yt(d.slice(0,24))} where a comma or the end of the call belongs.`}}if(t.length%2===1)return`The string for \`${n(t[t.length-1])??"the last argument"}\` was opened and never closed.`;return i()}function hc(e){let t=[...e.matchAll(dc)];if(t.length===0)return;let n=t[t.length-1]?.[1],i=0;for(let u=1;u<t.length;u+=1){let c=e.slice(t[u-1].index??0,t[u].index??0);if((c.split(ve).length-1)%2===1||!c.includes(Sn))i+=1}let r=t[t.length-1],o=(r.index??0)+r[0].length,s=e.indexOf(Sn,o),a=i>0?void 0:pc(e.slice(o,s===-1?void 0:s));return{blocks:t.length,restarts:i,dialect:"gemma",...n?{name:n}:{},...a?{defect:a}:{}}}function Ae(e){if(!e)return;if(e.includes(cc)){let u=hc(e);if(u)return u}if(!e.includes(Rn)||!ac.test(e))return;let t=0,n=0,i=0;for(let u of e.matchAll(sc)){let c=u[0];if(c===Rn)t+=1;else if(c==="</parameter>")i+=1;else n+=1}if(t===0)return;let r=Math.max(n-i,0),o=Math.min(Math.max(t-1,0),r),s=[...e.matchAll(/<function=([^\s>]+)\s*>/g)],a=s[s.length-1]?.[1];return{blocks:t,restarts:o,dialect:"qwen",...a?{name:a}:{}}}function Pt(e){let t=e.name?`\`${e.name}\``:"a tool",n=e.dialect==="gemma",i=n?"string argument":"parameter",r=e.restarts>0?` You began ${t} and then, part-way through a ${i} you never closed, started the whole call again${e.restarts>1?`, ${e.restarts} times over`:""}. The reader cannot tell an abandoned call from the value of the ${i} it was abandoned inside, so all of it came back as text.`:e.defect?` It named ${t}. ${e.defect}`:` It named ${t}, but the block was not well formed and could not be read.`,o=n?" Write the call again, once: every string argument opens and closes with the same string delimiter, arguments are separated by commas, and the call is closed after the last one.":" Emit the call once, in one clean block: open it, give each parameter and close each parameter, then close the function and the call.";return uc+r+" Nothing ran, so nothing has changed on disk. The call is not in this conversation any more, so do not look for it or copy it: write it fresh."+o+" Do not restart a call once you have begun it - finish it, or send nothing and start the next turn fresh."}var fc="[SYSTEM] You wrote ";function Ki(e){let t=e.trim().replace(/\s+/g," ").slice(0,200);return fc+`"${t}" and then called nothing, for the second turn running. Saying what you are about to do is not doing it, and the run ends on the next silent turn with the work undone. Emit the tool call itself now - the first one, not a description of it. If you cannot, say plainly what is stopping you in one sentence.`}var Ji=/\b(?:let me|i'?ll|i will|i'?m going to|i am going to|now i(?:'?ll| will)|next,? i(?:'?ll| will)|let'?s)\b/i,Yi=/\b(?:task (?:is )?(?:complete|finished|done)|all done|is now (?:complete|finished|fixed|working)|i(?:'?m| am) (?:done|finished)|nothing (?:else|more) to do|no further changes)\b/i;function at(e){let t=e?.trim();if(!t||Yi.test(t))return;let n=t.slice(-400);return Ji.test(n)?t:void 0}var mc=300;function Xi(e){let t=e?.trim();return!!t&&t.length<=mc&&!/\n\s*\n/.test(t)&&!t.endsWith("?")&&at(t)===void 0}var gc=/(?:^done\b|^i(?:'ve| have) (?:now |fully |successfully )?(?:completed|finished)\b|\b(?:is|are|was|were|has been|have been) (?:now |all |fully |successfully )?(?:complete|completed|finished|done)\b)/i;function Qi(e){return e.slice(-300).includes("?")||Ji.test(e.slice(-400))}function er(e){let t=e?.trim();if(!t)return!1;let n=t.replace(/[*_`]/g,"");return(Yi.test(n)||gc.test(n))&&!Qi(t)}function tr(e){let t=e?.trim();return!!t&&!Qi(t)}var yc=_(["image","audio","video","file"]),vc=Ot("type",[f({type:L("base64"),data:l().min(1)}),f({type:L("url"),url:l().url().refine((e)=>{let t=new URL(e).protocol;return t==="http:"||t==="https:"},"Generated media URLs must use HTTP or HTTPS")}),f({type:L("artifact"),artifactId:l().min(1)})]);function bc(e){if(e.startsWith("image/"))return"image";if(e.startsWith("audio/"))return"audio";if(e.startsWith("video/"))return"video";return"file"}var Sp=f({id:l().min(1),modality:yc,mediaType:l().min(1),source:vc,name:l().min(1).optional(),sizeBytes:m().int().nonnegative().optional()}).refine((e)=>bc(e.mediaType)===e.modality,{message:"Generated media modality must match its media type",path:["modality"]});function Nn(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function $t(e,t){if(!e&&!t)return;let n=e?.metadata,i=t?.metadata,r={...e??{},...t??{}};if(Nn(n)&&Nn(i))r.metadata={...n,...i};return r}var On=Symbol.for("cline.shared.tokenCalibration");function Tc(e,t){if(e===void 0||t===void 0)return!0;return e===t}function nr(){let e=globalThis,t=e[On];if(t)return t;let n={};return e[On]=n,n}function wc(){return nr().charsPerToken??3}function Lt(e){let t=nr();return Tc(t.outputCapOwner,e)?t.outputCap:void 0}function ir(e){return Math.max(1,Math.ceil(e/wc()))}function Te(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function _c(e){let t=e.type;if(typeof t==="string")return[t];return Array.isArray(t)?t.filter((n)=>typeof n==="string"):[]}function kt(e,t){if(_c(e).includes(t))return!0;for(let n of["anyOf","oneOf","allOf"]){let i=e[n];if(Array.isArray(i)&&i.some((r)=>Te(r)&&kt(r,t)))return!0}return!1}function kc(e,t){if(typeof e!=="string")return e;let n=e.trim(),i=kt(t,"array"),r=kt(t,"object");if((!i||!n.startsWith("["))&&(!r||!n.startsWith("{")))return e;try{let o=JSON.parse(n);if(Array.isArray(o))return i?o:e;if(Te(o))return r?o:e;return e}catch{return e}}function Ie(e,t){let n=kc(e,t);if(Array.isArray(n)){let s=t.items;if(!Te(s))return n;let a=!1,u=n.map((c)=>{let d=Ie(c,s);return a||=d!==c,d});return a?u:n}if(!Te(n))return n;let i=t.properties;if(!Te(i))return n;let r=!1,o={...n};for(let[s,a]of Object.entries(i)){if(!(s in n)||!Te(a))continue;let u=Ie(n[s],a);if(u!==n[s])o[s]=u,r=!0}return r?o:n}function rr(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}function B(e){let t=e?.trim();return t?t:void 0}function Ec(e){return cl(e)}var Np=new RegExp(`${"⁣⟦"}([^${"⟧"}]*)${"⟧"}([\\s\\S]*?)${"⟦/⟧⁣"}`,"g");var or=`# Plan Mode
64
+ 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 u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1){if(e.reused==="ref"){o(s);continue}}}}function Ye(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=(a)=>{let u=e.seen.get(a);if(u.ref===null)return;let c=u.def??u.schema,d={...c},y=u.ref;if(u.ref=null,y){i(y);let g=e.seen.get(y),T=g.schema;if(T.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))c.allOf=c.allOf??[],c.allOf.push(T);else Object.assign(c,T);if(Object.assign(c,d),a._zod.parent===y)for(let k in c){if(k==="$ref"||k==="allOf")continue;if(!(k in d))delete c[k]}if(T.$ref&&g.def)for(let k in c){if(k==="$ref"||k==="allOf")continue;if(k in g.def&&JSON.stringify(c[k])===JSON.stringify(g.def[k]))delete c[k]}}let h=a._zod.parent;if(h&&h!==y){i(h);let g=e.seen.get(h);if(g?.schema.$ref){if(c.$ref=g.schema.$ref,g.def)for(let T in c){if(T==="$ref"||T==="allOf")continue;if(T in g.def&&JSON.stringify(c[T])===JSON.stringify(g.def[T]))delete c[T]}}}e.override({zodSchema:a,jsonSchema:c,path:u.path??[]})};for(let a of[...e.seen.entries()].reverse())i(a[0]);let r={};if(e.target==="draft-2020-12")r.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")r.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")r.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw Error("Schema is missing an `id` property");r.$id=e.external.uri(a)}Object.assign(r,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;if(o!==void 0&&r.id===o)delete r.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let u=a[1];if(u.def&&u.defId){if(u.def.id===u.defId)delete u.def.id;s[u.defId]=u.def}}if(e.external);else if(Object.keys(s).length>0)if(e.target==="draft-2020-12")r.$defs=s;else r.definitions=s;try{let a=JSON.parse(JSON.stringify(r));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xe(t,"input",e.processors),output:Xe(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch(a){throw Error("Error converting schema to JSON.")}}function q(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return q(i.element,n);if(i.type==="set")return q(i.valueType,n);if(i.type==="lazy")return q(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return q(i.innerType,n);if(i.type==="intersection")return q(i.left,n)||q(i.right,n);if(i.type==="record"||i.type==="map")return q(i.keyType,n)||q(i.valueType,n);if(i.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return q(i.in,n)||q(i.out,n)}if(i.type==="object"){for(let r in i.shape)if(q(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(q(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(q(r,n))return!0;if(i.rest&&q(i.rest,n))return!0;return!1}return!1}var Ja=(e,t={})=>(n)=>{let i=Ke({...n,processors:t});return S(e,i),Je(i,e),Ye(i,e)},Xe=(e,t,n={})=>(i)=>{let{libraryOptions:r,target:o}=i??{},s=Ke({...r??{},target:o,io:t,processors:n});return S(e,s),Je(s,e),Ye(s,e)},Ya={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},li=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:s,format:a,patterns:u,contentEncoding:c}=e._zod.bag;if(typeof o==="number")r.minLength=o;if(typeof s==="number")r.maxLength=s;if(a){if(r.format=Ya[a]??a,r.format==="")delete r.format;if(a==="time")delete r.format}if(c)r.contentEncoding=c;if(u&&u.size>0){let d=[...u];if(d.length===1)r.pattern=d[0].source;else if(d.length>1)r.allOf=[...d.map((y)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))]}},ui=(e,t,n,i)=>{let r=n,{minimum:o,maximum:s,format:a,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:d}=e._zod.bag;if(typeof a==="string"&&a.includes("int"))r.type="integer";else r.type="number";let y=typeof d==="number"&&d>=(o??Number.NEGATIVE_INFINITY),h=typeof c==="number"&&c<=(s??Number.POSITIVE_INFINITY),g=t.target==="draft-04"||t.target==="openapi-3.0";if(y)if(g)r.minimum=d,r.exclusiveMinimum=!0;else r.exclusiveMinimum=d;else if(typeof o==="number")r.minimum=o;if(h)if(g)r.maximum=c,r.exclusiveMaximum=!0;else r.exclusiveMaximum=c;else if(typeof s==="number")r.maximum=s;if(typeof u==="number")r.multipleOf=u},ci=(e,t,n,i)=>{n.type="boolean"},Xa=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},Qa=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},el=(e,t,n,i)=>{if(t.target==="openapi-3.0")n.type="string",n.nullable=!0,n.enum=[null];else n.type="null"},tl=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},di=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},pi=(e,t,n,i)=>{n.not={}},nl=(e,t,n,i)=>{},hi=(e,t,n,i)=>{},fi=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},mi=(e,t,n,i)=>{let r=e._zod.def,o=zn(r.entries);if(o.every((s)=>typeof s==="number"))n.type="number";if(o.every((s)=>typeof s==="string"))n.type="string";n.enum=o},gi=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s==="bigint")if(t.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else o.push(Number(s));else o.push(s);if(o.length===0);else if(o.length===1){let s=o[0];if(n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0")n.enum=[s];else n.const=s}else{if(o.every((s)=>typeof s==="number"))n.type="number";if(o.every((s)=>typeof s==="string"))n.type="string";if(o.every((s)=>typeof s==="boolean"))n.type="boolean";if(o.every((s)=>s===null))n.type="null";n.enum=o}},il=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},rl=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},ol=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:u}=e._zod.bag;if(s!==void 0)o.minLength=s;if(a!==void 0)o.maxLength=a;if(u)if(u.length===1)o.contentMediaType=u[0],Object.assign(r,o);else Object.assign(r,o),r.anyOf=u.map((c)=>({contentMediaType:c}));else Object.assign(r,o)},sl=(e,t,n,i)=>{n.type="boolean"},yi=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},vi=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},bi=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},al=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},ll=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},Ti=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;if(typeof s==="number")r.minItems=s;if(typeof a==="number")r.maxItems=a;r.type="array",r.items=S(o.element,t,{...i,path:[...i.path,"items"]})},wi=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object",r.properties={};let s=o.shape;for(let c in s)r.properties[c]=S(s[c],t,{...i,path:[...i.path,"properties",c]});let a=new Set(Object.keys(s)),u=new Set([...a].filter((c)=>{let d=o.shape[c]._zod;if(t.io==="input")return d.optin===void 0;else return d.optout===void 0}));if(u.size>0)r.required=Array.from(u);if(o.catchall?._zod.def.type==="never")r.additionalProperties=!1;else if(!o.catchall){if(t.io==="output")r.additionalProperties=!1}else if(o.catchall)r.additionalProperties=S(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})},_i=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,s=r.options.map((a,u)=>S(a,t,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));if(o)n.oneOf=s;else n.anyOf=s},ki=(e,t,n,i)=>{let r=e._zod.def,o=S(r.left,t,{...i,path:[...i.path,"allOf",0]}),s=S(r.right,t,{...i,path:[...i.path,"allOf",1]}),a=(c)=>("allOf"in c)&&Object.keys(c).length===1,u=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];n.allOf=u},Ei=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"?"items":t.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((h,g)=>S(h,t,{...i,path:[...i.path,s,g]})),c=o.rest?S(o.rest,t,{...i,path:[...i.path,a,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;if(t.target==="draft-2020-12"){if(r.prefixItems=u,c)r.items=c}else if(t.target==="openapi-3.0"){if(r.items={anyOf:u},c)r.items.anyOf.push(c);if(r.minItems=u.length,!c)r.maxItems=u.length}else if(r.items=u,c)r.additionalItems=c;let{minimum:d,maximum:y}=e._zod.bag;if(typeof d==="number")r.minItems=d;if(typeof y==="number")r.maxItems=y},Ii=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let s=o.keyType,a=s._zod.bag?.patterns;if(o.mode==="loose"&&a&&a.size>0){let c=S(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let d of a)r.patternProperties[d.source]=c}else{if(t.target==="draft-07"||t.target==="draft-2020-12")r.propertyNames=S(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});r.additionalProperties=S(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let u=s._zod.values;if(u){let c=[...u].filter((d)=>typeof d==="string"||typeof d==="number");if(c.length>0)r.required=c}},Ci=(e,t,n,i)=>{let r=e._zod.def,o=S(r.innerType,t,i),s=t.seen.get(e);if(t.target==="openapi-3.0")s.ref=r.innerType,n.nullable=!0;else n.anyOf=[o,{type:"null"}]},Ai=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},xi=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Ri=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);if(o.ref=r.innerType,t.io==="input")n._prefault=JSON.parse(JSON.stringify(r.defaultValue))},Si=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Ni=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?o?r.out:r.in:r.out;S(s,t,i);let a=t.seen.get(e);a.ref=s},Oi=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},Mi=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Nt=(e,t,n,i)=>{let r=e._zod.def;S(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},ul=(e,t,n,i)=>{let r=e._zod.innerType;S(r,t,i);let o=t.seen.get(e);o.ref=r},Tn={string:li,number:ui,boolean:ci,bigint:Xa,symbol:Qa,null:el,undefined:tl,void:di,never:pi,any:nl,unknown:hi,date:fi,enum:mi,literal:gi,nan:il,template_literal:rl,file:ol,success:sl,custom:yi,function:vi,transform:bi,map:al,set:ll,array:Ti,object:wi,union:_i,intersection:ki,tuple:Ei,record:Ii,nullable:Ci,nonoptional:Ai,default:xi,prefault:Ri,catch:Si,pipe:Ni,readonly:Oi,promise:Mi,optional:Nt,lazy:ul};function cl(e,t){if("_idmap"in e){let i=e,r=Ke({...t,processors:Tn}),o={};for(let u of i._idmap.entries()){let[c,d]=u;S(d,r)}let s={},a={registry:i,uri:t?.uri,defs:o};r.external=a;for(let u of i._idmap.entries()){let[c,d]=u;Je(r,d),s[c]=Ye(r,d)}if(Object.keys(o).length>0){let u=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:o}}return{schemas:s}}let n=Ke({...t,processors:Tn});return S(e,n),Je(n,e),Ye(n,e)}var dl=p("ZodISODateTime",(e,t)=>{ps.init(e,t),P.init(e,t)});function pl(e){return ka(dl,e)}var hl=p("ZodISODate",(e,t)=>{hs.init(e,t),P.init(e,t)});function fl(e){return Ea(hl,e)}var ml=p("ZodISOTime",(e,t)=>{fs.init(e,t),P.init(e,t)});function gl(e){return Ia(ml,e)}var yl=p("ZodISODuration",(e,t)=>{ms.init(e,t),P.init(e,t)});function vl(e){return Ca(yl,e)}var bl=(e,t)=>{jn.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:(n)=>ro(e,n)},flatten:{value:(n)=>io(e,n)},addIssue:{value:(n)=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Tt,2)}},addIssues:{value:(n)=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Tt,2)}},isEmpty:{get(){return e.issues.length===0}}})},J=p("ZodError",bl,{Parent:Error}),Tl=nt(J),wl=it(J),_l=rt(J),kl=ot(J),El=ao(J),Il=lo(J),Cl=uo(J),Al=co(J),xl=po(J),Rl=ho(J),Sl=fo(J),Nl=mo(J),wn=new WeakMap;function Le(e,t,n){let i=Object.getPrototypeOf(e),r=wn.get(i);if(!r)r=new Set,wn.set(i,r);if(r.has(t))return;r.add(t);for(let o in n){let s=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}var R=p("ZodType",(e,t)=>(x.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xe(e,"input"),output:Xe(e,"output")}}),e.toJSONSchema=Ja(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>Tl(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>_l(e,n,i),e.parseAsync=async(n,i)=>wl(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>kl(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>El(e,n,i),e.decode=(n,i)=>Il(e,n,i),e.encodeAsync=async(n,i)=>Cl(e,n,i),e.decodeAsync=async(n,i)=>Al(e,n,i),e.safeEncode=(n,i)=>xl(e,n,i),e.safeDecode=(n,i)=>Rl(e,n,i),e.safeEncodeAsync=async(n,i)=>Sl(e,n,i),e.safeDecodeAsync=async(n,i)=>Nl(e,n,i),Le(e,"ZodType",{check(...n){let i=this.def;return this.clone(ae(i,{checks:[...i.checks??[],...n.map((r)=>typeof r==="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return le(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(xu(n,i))},superRefine(n,i){return this.check(Ru(n,i))},overwrite(n){return this.check(Ce(n))},optional(){return In(this)},exactOptional(){return fu(this)},nullable(){return Cn(this)},nullish(){return In(Cn(this))},nonoptional(n){return Tu(this,n)},array(){return w(this)},or(n){return Y([this,n])},and(n){return lu(this,n)},transform(n){return An(this,zi(n))},default(n){return yu(this,n)},prefault(n){return bu(this,n)},catch(n){return _u(this,n)},pipe(n){return An(this,n)},readonly(){return Iu(this)},describe(n){let i=this.clone();return Se.add(i,{description:n}),i},meta(...n){if(n.length===0)return Se.get(this);let i=this.clone();return Se.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Se.get(e)?.description},configurable:!0}),e)),Pi=p("_ZodString",(e,t)=>{St.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,r,o)=>li(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Le(e,"_ZodString",{regex(...i){return this.check(Pa(...i))},includes(...i){return this.check(za(...i))},startsWith(...i){return this.check(Da(...i))},endsWith(...i){return this.check(Ua(...i))},min(...i){return this.check(Ge(...i))},max(...i){return this.check(si(...i))},length(...i){return this.check(ai(...i))},nonempty(...i){return this.check(Ge(1,...i))},lowercase(i){return this.check($a(i))},uppercase(i){return this.check(La(i))},trim(){return this.check(Ba())},normalize(...i){return this.check(Fa(...i))},toLowerCase(){return this.check(ja())},toUpperCase(){return this.check(qa())},slugify(){return this.check(Ha())}})}),Ol=p("ZodString",(e,t)=>{St.init(e,t),Pi.init(e,t),e.email=(n)=>e.check(na(Ml,n)),e.url=(n)=>e.check(aa(Pl,n)),e.jwt=(n)=>e.check(_a(Kl,n)),e.emoji=(n)=>e.check(la($l,n)),e.guid=(n)=>e.check(gn(_n,n)),e.uuid=(n)=>e.check(ia(je,n)),e.uuidv4=(n)=>e.check(ra(je,n)),e.uuidv6=(n)=>e.check(oa(je,n)),e.uuidv7=(n)=>e.check(sa(je,n)),e.nanoid=(n)=>e.check(ua(Ll,n)),e.guid=(n)=>e.check(gn(_n,n)),e.cuid=(n)=>e.check(ca(zl,n)),e.cuid2=(n)=>e.check(da(Dl,n)),e.ulid=(n)=>e.check(pa(Ul,n)),e.base64=(n)=>e.check(ba(Vl,n)),e.base64url=(n)=>e.check(Ta(Zl,n)),e.xid=(n)=>e.check(ha(Fl,n)),e.ksuid=(n)=>e.check(fa(Bl,n)),e.ipv4=(n)=>e.check(ma(jl,n)),e.ipv6=(n)=>e.check(ga(ql,n)),e.cidrv4=(n)=>e.check(ya(Hl,n)),e.cidrv6=(n)=>e.check(va(Wl,n)),e.e164=(n)=>e.check(wa(Gl,n)),e.datetime=(n)=>e.check(pl(n)),e.date=(n)=>e.check(fl(n)),e.time=(n)=>e.check(gl(n)),e.duration=(n)=>e.check(vl(n))});function l(e){return ta(Ol,e)}var P=p("ZodStringFormat",(e,t)=>{O.init(e,t),Pi.init(e,t)}),Ml=p("ZodEmail",(e,t)=>{is.init(e,t),P.init(e,t)}),_n=p("ZodGUID",(e,t)=>{ts.init(e,t),P.init(e,t)}),je=p("ZodUUID",(e,t)=>{ns.init(e,t),P.init(e,t)}),Pl=p("ZodURL",(e,t)=>{rs.init(e,t),P.init(e,t)}),$l=p("ZodEmoji",(e,t)=>{os.init(e,t),P.init(e,t)}),Ll=p("ZodNanoID",(e,t)=>{ss.init(e,t),P.init(e,t)}),zl=p("ZodCUID",(e,t)=>{as.init(e,t),P.init(e,t)}),Dl=p("ZodCUID2",(e,t)=>{ls.init(e,t),P.init(e,t)}),Ul=p("ZodULID",(e,t)=>{us.init(e,t),P.init(e,t)}),Fl=p("ZodXID",(e,t)=>{cs.init(e,t),P.init(e,t)}),Bl=p("ZodKSUID",(e,t)=>{ds.init(e,t),P.init(e,t)}),jl=p("ZodIPv4",(e,t)=>{gs.init(e,t),P.init(e,t)}),ql=p("ZodIPv6",(e,t)=>{ys.init(e,t),P.init(e,t)}),Hl=p("ZodCIDRv4",(e,t)=>{vs.init(e,t),P.init(e,t)}),Wl=p("ZodCIDRv6",(e,t)=>{bs.init(e,t),P.init(e,t)}),Vl=p("ZodBase64",(e,t)=>{Ts.init(e,t),P.init(e,t)}),Zl=p("ZodBase64URL",(e,t)=>{_s.init(e,t),P.init(e,t)}),Gl=p("ZodE164",(e,t)=>{ks.init(e,t),P.init(e,t)}),Kl=p("ZodJWT",(e,t)=>{Is.init(e,t),P.init(e,t)}),$i=p("ZodNumber",(e,t)=>{Xn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ui(e,i,r,o),Le(e,"ZodNumber",{gt(i,r){return this.check(vn(i,r))},gte(i,r){return this.check(We(i,r))},min(i,r){return this.check(We(i,r))},lt(i,r){return this.check(yn(i,r))},lte(i,r){return this.check(He(i,r))},max(i,r){return this.check(He(i,r))},int(i){return this.check(kn(i))},safe(i){return this.check(kn(i))},positive(i){return this.check(vn(0,i))},nonnegative(i){return this.check(We(0,i))},negative(i){return this.check(yn(0,i))},nonpositive(i){return this.check(He(0,i))},multipleOf(i,r){return this.check(bn(i,r))},step(i,r){return this.check(bn(i,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??0.5),e.isFinite=!0,e.format=n.format??null});function m(e){return Aa($i,e)}var Jl=p("ZodNumberFormat",(e,t)=>{Cs.init(e,t),$i.init(e,t)});function kn(e){return xa(Jl,e)}var Yl=p("ZodBoolean",(e,t)=>{As.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ci(e,n,i,r)});function E(e){return Ra(Yl,e)}var Xl=p("ZodUnknown",(e,t)=>{xs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hi(e,n,i,r)});function D(){return Sa(Xl)}var Ql=p("ZodNever",(e,t)=>{Rs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>pi(e,n,i,r)});function eu(e){return Na(Ql,e)}var tu=p("ZodVoid",(e,t)=>{Ss.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>di(e,n,i,r)});function nu(e){return Oa(tu,e)}var iu=p("ZodDate",(e,t)=>{Ns.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,r,o)=>fi(e,i,r,o),e.min=(i,r)=>e.check(We(i,r)),e.max=(i,r)=>e.check(He(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Qe(e){return Ma(iu,e)}var ru=p("ZodArray",(e,t)=>{Os.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ti(e,n,i,r),e.element=t.element,Le(e,"ZodArray",{min(n,i){return this.check(Ge(n,i))},nonempty(n){return this.check(Ge(1,n))},max(n,i){return this.check(si(n,i))},length(n,i){return this.check(ai(n,i))},unwrap(){return this.element}})});function w(e,t){return Wa(ru,e,t)}var ou=p("ZodObject",(e,t)=>{Ps.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>wi(e,n,i,r),A(e,"shape",()=>t.shape),Le(e,"ZodObject",{keyof(){return _(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:D()})},loose(){return this.clone({...this._zod.def,catchall:D()})},strict(){return this.clone({...this._zod.def,catchall:eu()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Jr(this,n)},safeExtend(n){return Yr(this,n)},merge(n){return Xr(this,n)},pick(n){return Gr(this,n)},omit(n){return Kr(this,n)},partial(...n){return Qr(Di,this,n[0])},required(...n){return eo(Ui,this,n[0])}})});function f(e,t){let n={type:"object",shape:e??{},...b(t)};return new ou(n)}var Li=p("ZodUnion",(e,t)=>{ti.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>_i(e,n,i,r),e.options=t.options});function Y(e,t){return new Li({type:"union",options:e,...b(t)})}var su=p("ZodDiscriminatedUnion",(e,t)=>{Li.init(e,t),$s.init(e,t)});function Ot(e,t,n){return new su({type:"union",options:t,discriminator:e,...b(n)})}var au=p("ZodIntersection",(e,t)=>{Ls.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ki(e,n,i,r)});function lu(e,t){return new au({type:"intersection",left:e,right:t})}var uu=p("ZodTuple",(e,t)=>{ni.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ei(e,n,i,r),e.rest=(n)=>e.clone({...e._zod.def,rest:n})});function cu(e,t,n){let i=t instanceof x;return new uu({type:"tuple",items:e,rest:i?t:null,...b(i?n:t)})}var En=p("ZodRecord",(e,t)=>{zs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ii(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function z(e,t,n){if(!t||!t._zod)return new En({type:"record",keyType:l(),valueType:e,...b(t)});return new En({type:"record",keyType:e,valueType:t,...b(n)})}var _t=p("ZodEnum",(e,t)=>{Ds.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,r,o)=>mi(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let s of i)if(n.has(s))o[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new _t({...t,checks:[],...b(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let s of i)if(n.has(s))delete o[s];else throw Error(`Key ${s} not found in enum`);return new _t({...t,checks:[],...b(r),entries:o})}});function _(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map((i)=>[i,i])):e;return new _t({type:"enum",entries:n,...b(t)})}var du=p("ZodLiteral",(e,t)=>{Us.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gi(e,n,i,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function L(e,t){return new du({type:"literal",values:Array.isArray(e)?e:[e],...b(t)})}var pu=p("ZodTransform",(e,t)=>{Fs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>bi(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Ct(e.constructor.name);n.addIssue=(o)=>{if(typeof o==="string")n.issues.push($e(o,n.value,t));else{let s=o;if(s.fatal)s.continue=!1;s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push($e(s))}};let r=t.transform(n.value,n);if(r instanceof Promise)return r.then((o)=>(n.value=o,n.fallback=!0,n));return n.value=r,n.fallback=!0,n}});function zi(e){return new pu({type:"transform",transform:e})}var Di=p("ZodOptional",(e,t)=>{ii.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Nt(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function In(e){return new Di({type:"optional",innerType:e})}var hu=p("ZodExactOptional",(e,t)=>{Bs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Nt(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function fu(e){return new hu({type:"optional",innerType:e})}var mu=p("ZodNullable",(e,t)=>{js.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ci(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Cn(e){return new mu({type:"nullable",innerType:e})}var gu=p("ZodDefault",(e,t)=>{qs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xi(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function yu(e,t){return new gu({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():Un(t)}})}var vu=p("ZodPrefault",(e,t)=>{Hs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ri(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function bu(e,t){return new vu({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():Un(t)}})}var Ui=p("ZodNonOptional",(e,t)=>{Ws.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ai(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Tu(e,t){return new Ui({type:"nonoptional",innerType:e,...b(t)})}var wu=p("ZodCatch",(e,t)=>{Vs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Si(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function _u(e,t){return new wu({type:"catch",innerType:e,catchValue:typeof t==="function"?t:()=>t})}var Fi=p("ZodPipe",(e,t)=>{ri.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ni(e,n,i,r),e.in=t.in,e.out=t.out});function An(e,t){return new Fi({type:"pipe",in:e,out:t})}var ku=p("ZodPreprocess",(e,t)=>{Fi.init(e,t),Zs.init(e,t)}),Eu=p("ZodReadonly",(e,t)=>{Gs.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Oi(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Iu(e){return new Eu({type:"readonly",innerType:e})}var Cu=p("ZodPromise",(e,t)=>{Js.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Mi(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function gt(e){return new Cu({type:"promise",innerType:e})}var Au=p("ZodFunction",(e,t)=>{Ks.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vi(e,n,i,r)});function qe(e){return new Au({type:"function",input:Array.isArray(e?.input)?cu(e?.input):e?.input??w(D()),output:e?.output??D()})}var Bi=p("ZodCustom",(e,t)=>{Ys.init(e,t),R.init(e,t),e._zod.processJSONSchema=(n,i,r)=>yi(e,n,i,r)});function K(e,t){return Va(Bi,e??(()=>!0),t)}function xu(e,t={}){return Za(Bi,e,t)}function Ru(e,t){return Ga(e,t)}function ji(e,t){return new ku({type:"pipe",in:zi(e),out:t})}ee(Qs());var qi=["none","minimal","low","medium","high","xhigh","max"],Su=_(qi),Nu=Su.exclude(["none"]),Ou=_([...qi,"default"]).nullable(),Mu=Ot("type",[f({type:L("toggle")}).strict(),f({type:L("effort"),values:w(Ou)}).strict(),f({type:L("budget_tokens"),min:m().min(-1).optional(),max:m().min(0).optional()}).strict().refine((e)=>e.min===void 0||e.max===void 0||e.min<=e.max,{message:"Minimum reasoning budget cannot exceed maximum",path:["min"]})]),Pu=_(["default","openai-responses","r1"]);var $u=_(["images","video","tools","streaming","prompt-cache","reasoning","reasoning-effort","computer-use","global-endpoint","structured_output","temperature","files"]),Lu=_(["active","preview","deprecated","legacy"]),zu=f({input:m().optional(),output:m().optional(),cacheWrite:m().optional(),cacheRead:m().optional()}),Du=f({maxBudget:m().optional(),outputPrice:m().optional(),thinkingLevel:_(["low","high"]).optional()}),Uu=f({reasoningDefaultOn:E().optional(),apiProtocol:_(["openai-chat","openai-responses","anthropic","gemini"]).optional()}).catchall(D()),xn=_(["text","image","audio","video","pdf"]),Fu=f({input:w(xn),output:w(xn)});var Bu=_(["language","image-generation","speech-generation","video-generation","transcription","realtime"]);var ju=_(["batch","streaming"]);var Hi=f({id:l(),name:l().optional(),description:l().optional(),maxTokens:m().optional(),contextWindow:m().optional(),maxInputTokens:m().optional(),capabilities:w($u).optional(),operation:Bu.optional(),operationModes:w(ju).optional(),modalities:Fu.optional(),reasoningOptions:w(Mu).optional(),apiFormat:Pu.optional(),systemRole:_(["system","developer"]).optional(),temperature:m().optional(),pricing:zu.optional(),thinkingConfig:Du.optional(),status:Lu.optional(),deprecationNotice:l().optional(),replacedBy:l().optional(),releaseDate:l().optional(),deprecationDate:l().optional(),family:l().optional(),metadata:Uu.optional()});var Wi="NOT a tool or system failure. Clarify with user before proceeding.",qu=f({id:l(),name:l(),execution:_(["client","provider"]).optional(),input:D(),output:D(),error:l().optional(),durationMs:m(),startedAt:Qe(),endedAt:Qe()}),Hu=_(["completed","max_iterations","aborted","mistake_limit","error"]),Wu=f({inputTokens:m(),outputTokens:m(),cacheReadTokens:m().optional(),cacheWriteTokens:m().optional(),totalCost:m().optional()}),Tp=f({text:l(),usage:Wu,messages:w(K()),toolCalls:w(qu),iterations:m(),finishReason:Hu,model:f({id:l(),provider:l(),info:Hi.optional()}),startedAt:Qe(),endedAt:Qe(),durationMs:m()}),wp=f({distinctId:l().optional(),sessionId:l().optional(),providerId:l(),modelId:l(),apiKey:l().optional(),baseUrl:l().url().optional(),headers:z(l(),l()).optional(),knownModels:z(l(),Hi).optional(),providerConfig:D().optional(),initialMessages:w(K()).optional(),systemPrompt:l(),tools:w(K()),modelTools:w(K()).optional(),maxIterations:m().positive().optional(),maxParallelToolCalls:m().int().positive().default(8),maxTokensPerTurn:m().positive().optional(),maxToolResultChars:m().int().positive().optional(),temperature:m().nonnegative().optional(),apiTimeoutMs:m().positive().default(180000),userFileContentLoader:qe().input([l()]).output(gt(l())).optional(),toolContextMetadata:z(l(),D()).optional(),execution:f({maxConsecutiveMistakes:m().int().positive().optional(),reminderAfterIterations:m().nonnegative().optional(),reminderText:l().optional(),loopDetection:Y([L(!1),f({softThreshold:m().int().positive().optional(),hardThreshold:m().int().positive().optional()})]).optional(),reasoningLoopDetection:Y([L(!1),f({minChars:m().int().positive().optional(),window:m().int().positive().optional(),maxPeriod:m().int().positive().optional(),minCycles:m().int().positive().optional(),maxUniqueInWindow:m().int().positive().optional(),minLineChars:m().int().positive().optional(),phraseMaxPeriod:m().int().positive().optional(),phraseMinCycles:m().int().positive().optional(),maxConsecutiveTrips:m().int().positive().optional()})]).optional(),reasoningRepetition:Y([L(!1),f({minChars:m().int().positive().optional(),minParagraphChars:m().int().positive().optional(),minStopwords:m().int().nonnegative().optional(),maxRepeatTrip:m().int().positive().optional(),duplicateFractionTrip:m().min(0).max(1).optional(),cooldownTurns:m().int().nonnegative().optional(),maxNudges:m().int().nonnegative().optional(),recoveryTokens:m().int().nonnegative().optional()})]).optional()}).optional(),reasoningEffort:Nu.optional(),thinkingBudgetTokens:m().positive().optional(),thinking:E().optional(),onEvent:qe().input([K()]).output(nu()).optional(),hooks:K().optional(),parentAgentId:l().optional(),extensions:w(K()).optional(),hookErrorMode:_(["ignore","throw"]).default("ignore"),toolPolicies:z(l(),f({enabled:E().optional(),autoApprove:E().optional()})).optional(),unavailableToolReasons:z(l(),l()).optional(),requestToolApproval:qe().input([f({sessionId:l(),agentId:l(),conversationId:l(),iteration:m(),toolCallId:l(),toolName:l(),input:D(),policy:f({enabled:E().optional(),autoApprove:E().optional()}).default({})})]).output(Y([f({approved:E(),reason:l().optional()}),gt(f({approved:E(),reason:l().optional()}))])).optional(),onConsecutiveMistakeLimitReached:qe().input([f({iteration:m().int().positive(),consecutiveMistakes:m().int().positive(),maxConsecutiveMistakes:m().int().positive(),reason:_(["api_error","invalid_tool_call","tool_execution_failed"]),details:l().optional()})]).output(Y([f({action:L("continue"),guidance:l().optional()}),f({action:L("stop"),reason:l().optional()}),gt(Y([f({action:L("continue"),guidance:l().optional()}),f({action:L("stop"),reason:l().optional()})]))])).optional(),logger:K().optional(),extensionContext:K().optional(),abortSignal:K().optional()}),Vu=_(["connector.started","connector.stopping","session.authorize","message.received","message.denied","message.completed","message.failed","session.started","session.reused","session.reset","schedule.delivery.started","schedule.delivery.sent","schedule.delivery.failed"]),Zu=f({id:l().optional(),label:l().optional(),role:l().optional(),participantKey:l().optional(),participantLabel:l().optional(),platformUserId:l().optional(),metadata:z(l(),D()).optional()}),Gu=f({source:l(),sourceEvent:l(),threadId:l(),channelId:l(),isDM:E(),sessionId:l().optional(),workspaceRoot:l().optional(),metadata:z(l(),D()).optional()}),_p=f({actor:Zu,context:Gu,payload:z(l(),D()).optional()}),kp=f({action:_(["allow","deny"]).default("allow"),message:l().optional(),reason:l().optional(),metadata:z(l(),D()).optional()}),Ep=f({adapter:l(),botUserName:l().optional(),event:Vu,payload:z(l(),D()),ts:l()});var Ku=["hooks","tools","commands","rules","skills","messageBuilders","providers","automationEvents","mcp"],Ip=new Set(Ku);var Ne={CLINE_PASS:"ext-cline-pass",CODE_CLOUD_AGENTS:"code-cloud-agents",CODE_ONBOARDING_GITHUB:"code-onboarding-github",CLINE_COMPOSIO_BETA:"CLINE_COMPOSIO_BETA"},Cp={[Ne.CLINE_PASS]:!1,[Ne.CODE_CLOUD_AGENTS]:!1,[Ne.CODE_ONBOARDING_GITHUB]:!1,[Ne.CLINE_COMPOSIO_BETA]:!1},Ap=Object.values(Ne),Ju=_(["agent_start","agent_resume","agent_abort","agent_end","agent_error","tool_call","tool_result","prompt_submit","pre_compact","session_shutdown"]),pe=z(l(),l()),Yu=f({toolName:l(),parameters:pe}),Xu=f({toolName:l(),parameters:pe,result:l(),success:E(),executionTimeMs:m()}),Qu=f({prompt:l(),attachments:w(l())}),ec=f({taskMetadata:pe}),tc=f({taskMetadata:pe,previousState:pe}),nc=f({taskMetadata:pe}),ic=f({taskMetadata:pe}),rc=f({taskId:l(),ulid:l(),contextSize:m(),compactionStrategy:l(),previousApiReqIndex:m(),tokensIn:m(),tokensOut:m(),tokensInCache:m(),tokensOutCache:m(),deletedRangeStart:m(),deletedRangeEnd:m(),contextJsonPath:l(),contextRawPath:l()}),xp=f({clineVersion:l(),hookName:Ju,timestamp:l(),taskId:l(),sessionContext:f({rootSessionId:l().optional(),hookLogPath:l().optional()}).optional(),workspaceRoots:w(l()),workspaceInfo:K().optional(),userId:l(),agent_id:l(),parent_agent_id:l().nullable(),iteration:m().optional(),reason:l().optional(),tool_call:f({id:l(),name:l(),input:D()}).optional(),tool_result:K().optional(),turn:D().optional(),error:f({name:l(),message:l(),stack:l().optional()}).optional(),preToolUse:Yu.optional(),postToolUse:Xu.optional(),userPromptSubmit:Qu.optional(),taskStart:ec.optional(),taskResume:tc.optional(),taskCancel:nc.optional(),taskComplete:ic.optional(),preCompact:rc.optional()}).passthrough();var oc=["readFile","search","bash","webFetch","editor","applyPatch","skills","askQuestion","submit"],Rp=new Set(oc);var Rn="<tool_call>",sc=/<tool_call>|<parameter=[^>]*>|<\/parameter>/g,ac=/<function=[^\s>]+\s*>/,Mt="[SYSTEM] Your last message contained no tool calls, so the run was about to end. If the task is not finished, continue now by emitting the tool calls it needs - do not describe what you are going to do without doing it. If the task really is finished, say so in one short sentence. If it stopped at a limit, a refusal or anything else only the user can change, and you have told the user so, that is finished too: say so in one short sentence and do not look for a way around it.",Vi=" If what you need is a decision from the user, call `ask_question` - that is the only way to reach them. A question written as ordinary text is not a question anyone will see: it reads here as a turn that called nothing, which is what produced this message.",lc="[SYSTEM] You have now taken ";function Zi(e,t){let n=Math.round(t/1000),i=n>=1?`about ${n.toLocaleString("en-US")},000 characters of reasoning`:"a full turn of reasoning";return lc+`${e} turns in a row without calling a single tool, spending ${i} on them. Thinking further has not moved this task, and it will not: you have already reasoned past the point where more of it helps. Stop analysing and make one tool call now - the smallest one that makes any progress at all, even if you are not certain it is the right one, because a call you can check beats an analysis you cannot. If you genuinely cannot make one, say what is blocking you in a single sentence and stop.`}var uc="[SYSTEM] Your last message contained a tool call that could not be read.",cc="<|tool_call>",Sn="<tool_call|>",ve='<|"|>',dc=/<\|tool_call>\s*call:([A-Za-z_][\w.-]*)\s*\{/g;function Gi(e){return`(A call to ${e.name?`\`${e.name}\``:"a tool"} was written here but could not be read, so nothing ran. Its text is not kept.)`}function yt(e){return JSON.stringify(e.replace(/\s+/g," ").trim())}function pc(e){let t=[];for(let r=e.indexOf(ve);r!==-1;r=e.indexOf(ve,r+ve.length))t.push(r);let n=(r)=>/([A-Za-z_]\w*)\s*:\s*$/.exec(e.slice(Math.max(0,r-80),r))?.[1],i=()=>{let r=/([A-Za-z_]\w*)\s*:\s*(?!<\|"\|>)([^,{}[\]<]{1,60})<\|"\|>/.exec(e);return r?`The value of \`${r[1]}\` (${yt(r[2])}) closes a string it never opened.`:void 0};for(let r=0;r+1<t.length;r+=2){let o=t[r],s=t[r+1],a=n(o),u=e.slice(o+ve.length,s),c=/([^\s,]{0,12})\s*,\s*([A-Za-z_]\w*)\s*:\s*$/.exec(u);if(c&&a){let h=c[1],g=h?`you wrote ${yt(h.slice(-8))} where its closing delimiter belongs`:"its closing delimiter is missing";return`The string for \`${a}\` was never closed: ${g}, just before \`${c[2]}\`. A string argument ends with the same delimiter that opened it and with nothing else - not a backtick, not a quote, not a tag.`}let d=e.slice(s+ve.length),y=/^\s*(\S)/.exec(d)?.[1];if(y&&!",}]".includes(y)){let h=/^\s*([A-Za-z_]\w*)\s*:/.exec(d)?.[1];if(!h){let g=i();if(g)return g}return h&&a?`There is no comma between \`${a}\` and \`${h}\`. Every argument is separated from the next by a comma.`:`After the string for \`${a??"an argument"}\` closes, the call continues with ${yt(d.slice(0,24))} where a comma or the end of the call belongs.`}}if(t.length%2===1)return`The string for \`${n(t[t.length-1])??"the last argument"}\` was opened and never closed.`;return i()}function hc(e){let t=[...e.matchAll(dc)];if(t.length===0)return;let n=t[t.length-1]?.[1],i=0;for(let u=1;u<t.length;u+=1){let c=e.slice(t[u-1].index??0,t[u].index??0);if((c.split(ve).length-1)%2===1||!c.includes(Sn))i+=1}let r=t[t.length-1],o=(r.index??0)+r[0].length,s=e.indexOf(Sn,o),a=i>0?void 0:pc(e.slice(o,s===-1?void 0:s));return{blocks:t.length,restarts:i,dialect:"gemma",...n?{name:n}:{},...a?{defect:a}:{}}}function Ae(e){if(!e)return;if(e.includes(cc)){let u=hc(e);if(u)return u}if(!e.includes(Rn)||!ac.test(e))return;let t=0,n=0,i=0;for(let u of e.matchAll(sc)){let c=u[0];if(c===Rn)t+=1;else if(c==="</parameter>")i+=1;else n+=1}if(t===0)return;let r=Math.max(n-i,0),o=Math.min(Math.max(t-1,0),r),s=[...e.matchAll(/<function=([^\s>]+)\s*>/g)],a=s[s.length-1]?.[1];return{blocks:t,restarts:o,dialect:"qwen",...a?{name:a}:{}}}function Pt(e){let t=e.name?`\`${e.name}\``:"a tool",n=e.dialect==="gemma",i=n?"string argument":"parameter",r=e.restarts>0?` You began ${t} and then, part-way through a ${i} you never closed, started the whole call again${e.restarts>1?`, ${e.restarts} times over`:""}. The reader cannot tell an abandoned call from the value of the ${i} it was abandoned inside, so all of it came back as text.`:e.defect?` It named ${t}. ${e.defect}`:` It named ${t}, but the block was not well formed and could not be read.`,o=n?" Write the call again, once: every string argument opens and closes with the same string delimiter, arguments are separated by commas, and the call is closed after the last one.":" Emit the call once, in one clean block: open it, give each parameter and close each parameter, then close the function and the call.";return uc+r+" Nothing ran, so nothing has changed on disk. The call is not in this conversation any more, so do not look for it or copy it: write it fresh."+o+" Do not restart a call once you have begun it - finish it, or send nothing and start the next turn fresh."}var fc="[SYSTEM] You wrote ";function Ki(e){let t=e.trim().replace(/\s+/g," ").slice(0,200);return fc+`"${t}" and then called nothing. Saying what you are about to do is not doing it, and the run ends on the next silent turn with the work undone. Emit the tool call itself now - the first one, not a description of it. If you cannot, say plainly what is stopping you in one sentence.`}var Ji=/\b(?:let me|i'?ll|i will|i'?m going to|i am going to|now i(?:'?ll| will)|next,? i(?:'?ll| will)|let['’]s)\b/i,Yi=/\b(?:task (?:is )?(?:complete|finished|done)|all done|is now (?:complete|finished|fixed|working)|i(?:'?m| am) (?:done|finished)|nothing (?:else|more) to do|no further changes)\b/i;function at(e){let t=e?.trim();if(!t||Yi.test(t))return;let n=t.slice(-400);return Ji.test(n)?t:void 0}var mc=300;function Xi(e){let t=e?.trim();return!!t&&t.length<=mc&&!/\n\s*\n/.test(t)&&!t.endsWith("?")&&at(t)===void 0}var gc=/(?:^done\b|^i(?:'ve| have) (?:now |fully |successfully )?(?:completed|finished)\b|\b(?:is|are|was|were|has been|have been) (?:now |all |fully |successfully )?(?:complete|completed|finished|done)\b)/i;function Qi(e){return e.slice(-300).includes("?")||Ji.test(e.slice(-400))}function er(e){let t=e?.trim();if(!t)return!1;let n=t.replace(/[*_`]/g,"");return(Yi.test(n)||gc.test(n))&&!Qi(t)}function tr(e){let t=e?.trim();return!!t&&!Qi(t)}var yc=_(["image","audio","video","file"]),vc=Ot("type",[f({type:L("base64"),data:l().min(1)}),f({type:L("url"),url:l().url().refine((e)=>{let t=new URL(e).protocol;return t==="http:"||t==="https:"},"Generated media URLs must use HTTP or HTTPS")}),f({type:L("artifact"),artifactId:l().min(1)})]);function bc(e){if(e.startsWith("image/"))return"image";if(e.startsWith("audio/"))return"audio";if(e.startsWith("video/"))return"video";return"file"}var Sp=f({id:l().min(1),modality:yc,mediaType:l().min(1),source:vc,name:l().min(1).optional(),sizeBytes:m().int().nonnegative().optional()}).refine((e)=>bc(e.mediaType)===e.modality,{message:"Generated media modality must match its media type",path:["modality"]});function Nn(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function $t(e,t){if(!e&&!t)return;let n=e?.metadata,i=t?.metadata,r={...e??{},...t??{}};if(Nn(n)&&Nn(i))r.metadata={...n,...i};return r}var On=Symbol.for("cline.shared.tokenCalibration");function Tc(e,t){if(e===void 0||t===void 0)return!0;return e===t}function nr(){let e=globalThis,t=e[On];if(t)return t;let n={};return e[On]=n,n}function wc(){return nr().charsPerToken??3}function Lt(e){let t=nr();return Tc(t.outputCapOwner,e)?t.outputCap:void 0}function ir(e){return Math.max(1,Math.ceil(e/wc()))}function Te(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function _c(e){let t=e.type;if(typeof t==="string")return[t];return Array.isArray(t)?t.filter((n)=>typeof n==="string"):[]}function kt(e,t){if(_c(e).includes(t))return!0;for(let n of["anyOf","oneOf","allOf"]){let i=e[n];if(Array.isArray(i)&&i.some((r)=>Te(r)&&kt(r,t)))return!0}return!1}function kc(e,t){if(typeof e!=="string")return e;let n=e.trim(),i=kt(t,"array"),r=kt(t,"object");if((!i||!n.startsWith("["))&&(!r||!n.startsWith("{")))return e;try{let o=JSON.parse(n);if(Array.isArray(o))return i?o:e;if(Te(o))return r?o:e;return e}catch{return e}}function Ie(e,t){let n=kc(e,t);if(Array.isArray(n)){let s=t.items;if(!Te(s))return n;let a=!1,u=n.map((c)=>{let d=Ie(c,s);return a||=d!==c,d});return a?u:n}if(!Te(n))return n;let i=t.properties;if(!Te(i))return n;let r=!1,o={...n};for(let[s,a]of Object.entries(i)){if(!(s in n)||!Te(a))continue;let u=Ie(n[s],a);if(u!==n[s])o[s]=u,r=!0}return r?o:n}function rr(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}function B(e){let t=e?.trim();return t?t:void 0}function Ec(e){return cl(e)}var Np=new RegExp(`${"⁣⟦"}([^${"⟧"}]*)${"⟧"}([\\s\\S]*?)${"⟦/⟧⁣"}`,"g");var or=`# Plan Mode
65
65
 
66
66
  You are in Plan mode. Your role is to explore, analyze, and plan -- not to execute.
67
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cerebriline/agents",
3
- "version": "4.100.254",
3
+ "version": "4.100.255",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/mann1x/cline.git",
@@ -9,8 +9,8 @@
9
9
  "main": "dist/index.js",
10
10
  "dependencies": {
11
11
  "nanoid": "^5.1.7",
12
- "@cerebriline/llms": "4.100.254",
13
- "@cerebriline/shared": "4.100.254"
12
+ "@cerebriline/llms": "4.100.255",
13
+ "@cerebriline/shared": "4.100.255"
14
14
  },
15
15
  "exports": {
16
16
  ".": {