lensmcp 1.23.6 → 1.23.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundled/dashboard.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var qy=Object.defineProperty;var s=(e,t)=>qy(e,"name",{value:t,configurable:!0});var Fp=Object.defineProperty,o=s((e,t)=>Fp(e,"name",{value:t,configurable:!0}),"a"),Ge=s((e,t)=>{for(var r in t)Fp(e,r,{get:t[r],enumerable:!0})},"nt");import"reflect-metadata";import{createHash as Ly}from"node:crypto";import{existsSync as zp,readFileSync as jp,statSync as Np}from"node:fs";import{createServer as Jy}from"node:http";import{basename as Vy}from"node:path";var Op="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function Rp(e,t){let r="",i=e;for(let u=t-1;u>=0;u--){let n=i%32;r=Op[n]+r,i=(i-n)/32}return r}s(Rp,"p_"),o(Rp,"encodeTime");function Tp(e){let t=new Uint8Array(e);globalThis.crypto.getRandomValues(t);let r="";for(let i=0;i<e;i++)r+=Op[(t[i]??0)&31];return r}s(Tp,"f_"),o(Tp,"encodeRandom");function qt(e=Date.now()){return Rp(e,10)+Tp(16)}s(qt,"ot"),o(qt,"ulid");var Wy=class{static{s(this,"So")}static{o(this,"EventBus")}constructor(e={}){this.subs=new Set,this.dropped=0,this.capacity=e.capacity??1e4,this.onDrop=e.onDrop,this.transform=e.transform}publish(e){if(this.subs.size>this.capacity){this.dropped++,this.onDrop?.(1);return}let t=e;if(this.transform)try{t=this.transform(e)??e}catch{t=e}for(let r of this.subs)if(!(r.filter&&!r.filter(t)))try{let i=r.handler(t);i&&typeof i.then=="function"&&i.catch(()=>{})}catch{}}subscribe(e,t){let r={handler:e,filter:t};return this.subs.add(r),()=>{this.subs.delete(r)}}droppedCount(){return this.dropped}subscriberCount(){return this.subs.size}},Lt="REDACTED",Gy=["token","secret","password","passwd","apikey","credential","assertion","signature"],Ky=new Set(["key","auth","authorization","jwt","code","sig","pwd","pass","session","sid","bearer","otp","cookie","set-cookie"]),Hy=/^(?:(?:prompt|completion|total|input|output|cache|cached|cacheread|cachewrite|reasoning|thinking|max|min|remaining|used|billed)tokens|tokens?(?:count|used|limit|remaining))$/;function ks(e){let t=e.toLowerCase();if(Hy.test(t.replace(/[-_.]+/g,"")))return!1;if(Gy.some(r=>t.includes(r)))return!0;for(let r of t.split(/[-_.]+/))if(r&&Ky.has(r))return!0;return!1}s(ks,"ky"),o(ks,"isSecretParam");var Xy=/^([a-z][a-z0-9+.-]*:\/\/)[^/?#@\s]*@/i,Yy=/([?&#])([^=&#\s]+)=([^&#\s]*)/g;function Mp(e){return e&&e.replace(Xy,`$1${Lt}@`).replace(Yy,(t,r,i)=>ks(i)?`${r}${i}=${Lt}`:t)}s(Mp,"b_"),o(Mp,"redactUrlParams");var Qy=/\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]*/g,eE=/\b(bearer|basic)\s+[A-Za-z0-9._~+/=-]{8,}/gi,tE=/\b(authorization|x-api-key|api-key|cookie|set-cookie|proxy-authorization)\b(\s*[:=]\s*)(["']?)((?:(?:bearer|basic)\s+)?[^\s"',;]{4,})\3/gi;function tt(e){return Mp(e).replace(tE,(t,r,i,u)=>`${r}${i}${u}${Lt}${u}`).replace(Qy,Lt).replace(eE,(t,r)=>`${r} ${Lt}`)}s(tt,"it"),o(tt,"redactText");function As(e,t){return e.length<=t?e:`${e.slice(0,t)}\u2026[lensmcp truncated: ${e.length-t} more chars]`}s(As,"Sy"),o(As,"clip");function Pp(e,t=4096){if(e!==void 0)return As(tt(e),t)}s(Pp,"Iy"),o(Pp,"safeText");function Up(e){return As(tt(e),300)}s(Up,"Ry"),o(Up,"safeTitle");var uE=6,rE=64;function _u(e,t=0,r=uE){if(typeof e=="string")return tt(e);if(e===null||typeof e!="object"||t>=r)return e;if(Array.isArray(e)){let n=!1,a=e.map((l,d)=>{if(d>=rE)return l;let p=_u(l,t+1,r);return p!==l&&(n=!0),p});return n?a:e}let i=!1,u={};for(let[n,a]of Object.entries(e)){let l=ks(n)&&a!==void 0&&a!==null?Lt:_u(a,t+1,r);l!==a&&(i=!0),u[n]=l}return i?u:e}s(_u,"tr"),o(_u,"redactDeep");var nE=12;function Zp(e={}){let t=e.maxDepth??nE,r=0,i=0;return{redact(u){r+=1;let n=u.title===void 0?void 0:Up(tt(u.title)),a=u.message===void 0?void 0:Pp(tt(u.message),4096),l=u.raw===void 0?void 0:_u(u.raw,0,t),d=n!==u.title,p=a!==u.message,c=l!==u.raw;return!d&&!p&&!c?u:(i+=1,{...u,...n!==void 0?{title:n}:{},...a!==void 0?{message:a}:{},...l!==void 0?{raw:l}:{}})},stats:o(()=>({inspected:r,redacted:i}),"stats"),reset:o(()=>{r=0,i=0},"reset")}}s(Zp,"Ty"),o(Zp,"createEventRedactor");var iE=class{static{s(this,"Io")}static{o(this,"ResourceStore")}constructor(){this.entries=new Map,this.subs=new Map}register(e,t){if(this.entries.has(e))throw new Error(`Resource already registered: ${e}`);return this.entries.set(e,{uri:e,produce:t,revision:0}),()=>{this.entries.delete(e),this.subs.delete(e)}}async read(e){let t=this.entries.get(e);if(!t)throw new Error(`Unknown resource: ${e}`);return t.produce()}list(){return[...this.entries.keys()]}async markDirty(e){let t=this.entries.get(e);if(!t)return;let r=await t.produce(),i=JSON.stringify(r);if(i===t.lastJson)return;t.lastJson=i,t.revision+=1;let u=this.subs.get(e);if(u)for(let n of u)try{n(e,t.revision)}catch{}}revision(e){return this.entries.get(e)?.revision}subscribe(e,t){let r=this.subs.get(e);return r||(r=new Set,this.subs.set(e,r)),r.add(t),()=>{r?.delete(t)}}},qp=class{static{s(this,"rr")}static{o(this,"GraphStore")}constructor(){this.nodes=new Map,this.edges=new Map,this.byParent=new Map,this.byFlow=new Map,this.byLogical=new Map,this.byInstance=new Map,this.byRequest=new Map,this.outByAxis=new Map,this.inByAxis=new Map}addNode(e){this.nodes.set(e.id,e),e.parentTraceNodeId&&this.addToIndex(this.byParent,e.parentTraceNodeId,e.id),e.context.flowId&&this.addToIndex(this.byFlow,e.context.flowId,e.id),e.logicalId&&this.addToIndex(this.byLogical,e.logicalId,e.id),e.instanceId&&this.addToIndex(this.byInstance,e.instanceId,e.id),e.context.requestId&&this.addToIndex(this.byRequest,e.context.requestId,e.id)}updateNode(e,t){let r=this.nodes.get(e);if(!r)throw new Error(`Unknown node: ${e}`);let i={...r,...t,id:r.id};return this.nodes.set(e,i),i}getNode(e){return this.nodes.get(e)}addEdge(e){this.edges.set(e.id,e);let t=this.outByAxis.get(e.axis);t||(t=new Map,this.outByAxis.set(e.axis,t)),this.addToIndex(t,e.from,e.id);let r=this.inByAxis.get(e.axis);r||(r=new Map,this.inByAxis.set(e.axis,r)),this.addToIndex(r,e.to,e.id)}getEdge(e){return this.edges.get(e)}childrenOf(e){return this.materialiseNodes(this.byParent.get(e))}nodesInFlow(e){return this.materialiseNodes(this.byFlow.get(e))}nodesByLogical(e){return this.materialiseNodes(this.byLogical.get(e))}nodesByInstance(e){return this.materialiseNodes(this.byInstance.get(e))}nodesByRequest(e){return this.materialiseNodes(this.byRequest.get(e))}traverse(e){let t=this.nodes.get(e.from);if(!t)return{nodes:[],edges:[]};let r=Array.isArray(e.lens)?e.lens:[e.lens],i=e.direction??"both",u=e.depth??4,n=e.maxNodes??1e3,a=new Set,l=new Set,d=[{id:t.id,d:0}];for(;d.length&&!(a.size>=n);){let{id:p,d:c}=d.shift();if(!a.has(p)&&(a.add(p),!(c>=u)))for(let f of r){if(i==="out"||i==="both"){let g=this.outByAxis.get(f)?.get(p);if(g)for(let m of g){l.add(m);let h=this.edges.get(m);a.has(h.to)||d.push({id:h.to,d:c+1})}}if(i==="in"||i==="both"){let g=this.inByAxis.get(f)?.get(p);if(g)for(let m of g){l.add(m);let h=this.edges.get(m);a.has(h.from)||d.push({id:h.from,d:c+1})}}}}return{nodes:this.materialiseNodes(a),edges:[...l].map(p=>this.edges.get(p)).filter(p=>!!p)}}nodeCount(){return this.nodes.size}edgeCount(){return this.edges.size}addToIndex(e,t,r){let i=e.get(t);i||(i=new Set,e.set(t,i)),i.add(r)}materialiseNodes(e){if(!e)return[];let t=[];for(let r of e){let i=this.nodes.get(r);i&&t.push(i)}return t}};function Lp(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}s(Lp,"R_"),o(Lp,"fnv1a32");function Jp(e){let t=[e.kind,e.identity,e.file??"",e.detail??""];return`${e.kind}:${Lp(t.join("|"))}`}s(Jp,"Ey"),o(Jp,"fingerprint");var sE=class{static{s(this,"Ro")}static{o(this,"ReducerRegistry")}constructor(){this.reducers=[]}register(e,t){if(this.reducers.some(r=>r.name===e))throw new Error(`Reducer already registered: ${e}`);this.reducers.push({name:e,reducer:t})}list(){return this.reducers}async dispatch(e){for(let{reducer:t}of this.reducers)try{let r=t(e);r&&typeof r.then=="function"&&await r}catch{}}};function _s(e,t={}){let r,i;if(t.flowId)i=t.flowId,r=e.filter(f=>f.context.flowId===i);else{let f=e.find(g=>g.context.flowId);if(!f)return;i=f.context.flowId,r=e.filter(g=>g.context.flowId===i)}if(r.length===0)return;r.sort((f,g)=>f.timestamp-g.timestamp);let u=1e3;r.length>u&&(r=[r[0],...r.slice(r.length-(u-1))]);let n=r[0],a=[],l,d;for(let f of r){let g=Vp(f);if(g){if(a.push(g),g.kind==="render"||g.kind==="final-render"){let m=f.raw;m?.render&&(l={id:m.render.id,page:m.render.page,route:m.render.route,componentName:m.render.componentName})}else if(f.source==="visual"&&g.kind==="visual-violation"){let m=f.raw;m?.frame&&(d=m.frame.id)}}}for(let f=a.length-1;f>=0;f--)if(a[f].kind==="render"){a[f]={...a[f],kind:"final-render"};break}let p=r[0].timestamp,c=r[r.length-1].timestamp;return{flowId:i,origin:{type:n.context.originType,nodeId:n.context.originNodeId,at:n.timestamp},phases:a,finalState:l?{page:l.page,route:l.route,componentName:l.componentName,renderId:l.id,visualFrameId:d}:void 0,startedAt:p,endedAt:c,eventCount:r.length}}s(_s,"To"),o(_s,"compileStory");function Vp(e){let t=(e.raw??null)?.kind;if(t==="flow-origin"||e.source==="client-runtime"&&t==="user-action"){let r=e.raw;return{kind:"user-action",at:e.timestamp,label:r?.origin?.label??e.title,eventIds:[e.id]}}if(e.source==="react"&&t==="render"){let r=e.raw;return{kind:"render",at:e.timestamp,label:`render ${r?.render?.componentName??"?"}`,eventIds:[e.id],details:r?.render?{componentName:r.render.componentName,durationMs:r.render.actualDurationMs}:void 0}}if(e.source==="react"&&t==="slot-content-changed"){let r=e.raw,i=r?.slot?.toComponent??"?";return{kind:/spinner|loader|loading/i.test(i)?"loading-ui":"idle-ui",at:e.timestamp,label:`slot ${r?.slot?.slotLogicalId??""} \u2192 ${i}`,eventIds:[e.id]}}if(e.source==="client-runtime"&&t==="route"){let r=e.raw;return{kind:"route-transition",at:e.timestamp,label:`route ${r?.from??""} \u2192 ${r?.url??""}`,eventIds:[e.id]}}if(e.source==="valtio"&&t==="state-update"){let r=e.raw;return{kind:"state-update",at:e.timestamp,label:`${r?.update?.storeId??"?"}.${r?.update?.path??"?"}`,eventIds:[e.id],details:r?.update}}if(e.source==="nestjs"&&t==="server-request"){let r=e.raw;return{kind:"backend-request",at:e.timestamp,label:`${r?.request?.method??"?"} ${r?.request?.route??"?"} \u2192 ${r?.request?.status??"?"}`,eventIds:[e.id],details:r?.request}}if(e.source==="chrome"&&e.category==="network")return{kind:"backend-request",at:e.timestamp,label:e.title,eventIds:[e.id]};if(e.source==="visual"&&t==="visual-violation"){let r=e.raw;return{kind:"visual-violation",at:e.timestamp,label:`${r?.violation?.ruleType??"rule"} ${r?.violation?.ruleId??""}`,eventIds:[e.id]}}}s(Vp,"T_"),o(Vp,"classifyEvent");var v={};Ge(v,{$brand:s(()=>Hp,"$brand"),$input:s(()=>Sg,"$input"),$output:s(()=>Ig,"$output"),NEVER:s(()=>Kp,"NEVER"),TimePrecision:s(()=>zg,"TimePrecision"),ZodAny:s(()=>x0,"ZodAny"),ZodArray:s(()=>z0,"ZodArray"),ZodBase64:s(()=>Gn,"ZodBase64"),ZodBase64URL:s(()=>Kn,"ZodBase64URL"),ZodBigInt:s(()=>fr,"ZodBigInt"),ZodBigIntFormat:s(()=>ei,"ZodBigIntFormat"),ZodBoolean:s(()=>mr,"ZodBoolean"),ZodCIDRv4:s(()=>Vn,"ZodCIDRv4"),ZodCIDRv6:s(()=>Wn,"ZodCIDRv6"),ZodCUID:s(()=>Mn,"ZodCUID"),ZodCUID2:s(()=>Pn,"ZodCUID2"),ZodCatch:s(()=>ll,"ZodCatch"),ZodCodec:s(()=>Br,"ZodCodec"),ZodCustom:s(()=>Cr,"ZodCustom"),ZodCustomStringFormat:s(()=>uu,"ZodCustomStringFormat"),ZodDate:s(()=>ui,"ZodDate"),ZodDefault:s(()=>il,"ZodDefault"),ZodDiscriminatedUnion:s(()=>P0,"ZodDiscriminatedUnion"),ZodE164:s(()=>Hn,"ZodE164"),ZodEmail:s(()=>On,"ZodEmail"),ZodEmoji:s(()=>Rn,"ZodEmoji"),ZodEnum:s(()=>iu,"ZodEnum"),ZodError:s(()=>q5,"ZodError"),ZodExactOptional:s(()=>ul,"ZodExactOptional"),ZodFile:s(()=>Q0,"ZodFile"),ZodFirstPartyTypeKind:s(()=>kl,"ZodFirstPartyTypeKind"),ZodFunction:s(()=>Dl,"ZodFunction"),ZodGUID:s(()=>lr,"ZodGUID"),ZodIPv4:s(()=>Ln,"ZodIPv4"),ZodIPv6:s(()=>Jn,"ZodIPv6"),ZodISODate:s(()=>zo,"ZodISODate"),ZodISODateTime:s(()=>So,"ZodISODateTime"),ZodISODuration:s(()=>Ro,"ZodISODuration"),ZodISOTime:s(()=>No,"ZodISOTime"),ZodIntersection:s(()=>Z0,"ZodIntersection"),ZodIssueCode:s(()=>L5,"ZodIssueCode"),ZodJWT:s(()=>Xn,"ZodJWT"),ZodKSUID:s(()=>qn,"ZodKSUID"),ZodLazy:s(()=>yl,"ZodLazy"),ZodLiteral:s(()=>X0,"ZodLiteral"),ZodMAC:s(()=>t0,"ZodMAC"),ZodMap:s(()=>V0,"ZodMap"),ZodNaN:s(()=>dl,"ZodNaN"),ZodNanoID:s(()=>Tn,"ZodNanoID"),ZodNever:s(()=>_0,"ZodNever"),ZodNonOptional:s(()=>di,"ZodNonOptional"),ZodNull:s(()=>C0,"ZodNull"),ZodNullable:s(()=>rl,"ZodNullable"),ZodNumber:s(()=>cr,"ZodNumber"),ZodNumberFormat:s(()=>_t,"ZodNumberFormat"),ZodObject:s(()=>hr,"ZodObject"),ZodOptional:s(()=>si,"ZodOptional"),ZodPipe:s(()=>Dr,"ZodPipe"),ZodPrefault:s(()=>sl,"ZodPrefault"),ZodPreprocess:s(()=>fl,"ZodPreprocess"),ZodPromise:s(()=>El,"ZodPromise"),ZodReadonly:s(()=>gl,"ZodReadonly"),ZodRealError:s(()=>Se,"ZodRealError"),ZodRecord:s(()=>nu,"ZodRecord"),ZodSet:s(()=>G0,"ZodSet"),ZodString:s(()=>or,"ZodString"),ZodStringFormat:s(()=>ae,"ZodStringFormat"),ZodSuccess:s(()=>al,"ZodSuccess"),ZodSymbol:s(()=>D0,"ZodSymbol"),ZodTemplateLiteral:s(()=>hl,"ZodTemplateLiteral"),ZodTransform:s(()=>tl,"ZodTransform"),ZodTuple:s(()=>q0,"ZodTuple"),ZodType:s(()=>X,"ZodType"),ZodULID:s(()=>Un,"ZodULID"),ZodURL:s(()=>dr,"ZodURL"),ZodUUID:s(()=>qe,"ZodUUID"),ZodUndefined:s(()=>B0,"ZodUndefined"),ZodUnion:s(()=>vr,"ZodUnion"),ZodUnknown:s(()=>A0,"ZodUnknown"),ZodVoid:s(()=>I0,"ZodVoid"),ZodXID:s(()=>Zn,"ZodXID"),ZodXor:s(()=>T0,"ZodXor"),_ZodString:s(()=>Nn,"_ZodString"),_default:s(()=>oi,"_default"),_function:s(()=>$r,"_function"),any:s(()=>k0,"any"),array:s(()=>ru,"array"),base64:s(()=>s0,"base64"),base64url:s(()=>a0,"base64url"),bigint:s(()=>y0,"bigint"),boolean:s(()=>Qn,"boolean"),catch:s(()=>pi,"catch"),check:s(()=>wl,"check"),cidrv4:s(()=>n0,"cidrv4"),cidrv6:s(()=>i0,"cidrv6"),clone:s(()=>ke,"clone"),codec:s(()=>pl,"codec"),coerce:s(()=>cv,"coerce"),config:s(()=>he,"config"),core:s(()=>Wp,"core"),cuid:s(()=>Ko,"cuid"),cuid2:s(()=>Ho,"cuid2"),custom:s(()=>Bl,"custom"),date:s(()=>F0,"date"),decode:s(()=>Kh,"decode"),decodeAsync:s(()=>Xh,"decodeAsync"),describe:s(()=>rv,"describe"),discriminatedUnion:s(()=>U0,"discriminatedUnion"),e164:s(()=>o0,"e164"),email:s(()=>Mo,"email"),emoji:s(()=>Wo,"emoji"),encode:s(()=>Gh,"encode"),encodeAsync:s(()=>Hh,"encodeAsync"),endsWith:s(()=>er,"endsWith"),enum:s(()=>Er,"enum"),exactOptional:s(()=>ai,"exactOptional"),file:s(()=>el,"file"),flattenError:s(()=>rn,"flattenError"),float32:s(()=>f0,"float32"),float64:s(()=>g0,"float64"),formatError:s(()=>nn,"formatError"),fromJSONSchema:s(()=>dv,"fromJSONSchema"),function:s(()=>$r,"function"),getErrorMap:s(()=>av,"getErrorMap"),globalRegistry:s(()=>Ne,"globalRegistry"),gt:s(()=>Xe,"gt"),gte:s(()=>we,"gte"),guid:s(()=>Po,"guid"),hash:s(()=>m0,"hash"),hex:s(()=>p0,"hex"),hostname:s(()=>c0,"hostname"),httpUrl:s(()=>Vo,"httpUrl"),includes:s(()=>Yu,"includes"),instanceof:s(()=>$l,"instanceof"),int:s(()=>pr,"int"),int32:s(()=>h0,"int32"),int64:s(()=>E0,"int64"),intersection:s(()=>ri,"intersection"),invertCodec:s(()=>ml,"invertCodec"),ipv4:s(()=>e0,"ipv4"),ipv6:s(()=>r0,"ipv6"),iso:s(()=>Io,"iso"),json:s(()=>Cl,"json"),jwt:s(()=>l0,"jwt"),keyof:s(()=>j0,"keyof"),ksuid:s(()=>Qo,"ksuid"),lazy:s(()=>fi,"lazy"),length:s(()=>Yt,"length"),literal:s(()=>Y0,"literal"),locales:s(()=>Fa,"locales"),looseObject:s(()=>R0,"looseObject"),looseRecord:s(()=>J0,"looseRecord"),lowercase:s(()=>Hu,"lowercase"),lt:s(()=>He,"lt"),lte:s(()=>Ie,"lte"),mac:s(()=>u0,"mac"),map:s(()=>W0,"map"),maxLength:s(()=>Xt,"maxLength"),maxSize:s(()=>Ct,"maxSize"),meta:s(()=>nv,"meta"),mime:s(()=>tr,"mime"),minLength:s(()=>st,"minLength"),minSize:s(()=>Ye,"minSize"),multipleOf:s(()=>$t,"multipleOf"),nan:s(()=>cl,"nan"),nanoid:s(()=>Go,"nanoid"),nativeEnum:s(()=>H0,"nativeEnum"),negative:s(()=>Sn,"negative"),never:s(()=>gr,"never"),nonnegative:s(()=>zn,"nonnegative"),nonoptional:s(()=>ci,"nonoptional"),nonpositive:s(()=>Fn,"nonpositive"),normalize:s(()=>ur,"normalize"),null:s(()=>ti,"null"),nullable:s(()=>au,"nullable"),nullish:s(()=>nl,"nullish"),number:s(()=>Yn,"number"),object:s(()=>N0,"object"),optional:s(()=>su,"optional"),overwrite:s(()=>Ze,"overwrite"),parse:s(()=>Lh,"parse"),parseAsync:s(()=>Jh,"parseAsync"),partialRecord:s(()=>L0,"partialRecord"),pipe:s(()=>wr,"pipe"),positive:s(()=>In,"positive"),prefault:s(()=>li,"prefault"),preprocess:s(()=>xl,"preprocess"),prettifyError:s(()=>Us,"prettifyError"),promise:s(()=>bl,"promise"),property:s(()=>jn,"property"),readonly:s(()=>mi,"readonly"),record:s(()=>ii,"record"),refine:s(()=>gi,"refine"),regex:s(()=>Ku,"regex"),regexes:s(()=>it,"regexes"),registry:s(()=>ln,"registry"),safeDecode:s(()=>Qh,"safeDecode"),safeDecodeAsync:s(()=>tv,"safeDecodeAsync"),safeEncode:s(()=>Yh,"safeEncode"),safeEncodeAsync:s(()=>ev,"safeEncodeAsync"),safeParse:s(()=>Vh,"safeParse"),safeParseAsync:s(()=>Wh,"safeParseAsync"),set:s(()=>K0,"set"),setErrorMap:s(()=>sv,"setErrorMap"),size:s(()=>Ht,"size"),slugify:s(()=>sr,"slugify"),startsWith:s(()=>Qu,"startsWith"),strictObject:s(()=>O0,"strictObject"),string:s(()=>tu,"string"),stringFormat:s(()=>d0,"stringFormat"),stringbool:s(()=>iv,"stringbool"),success:s(()=>ol,"success"),superRefine:s(()=>hi,"superRefine"),symbol:s(()=>w0,"symbol"),templateLiteral:s(()=>vl,"templateLiteral"),toJSONSchema:s(()=>_o,"toJSONSchema"),toLowerCase:s(()=>nr,"toLowerCase"),toUpperCase:s(()=>ir,"toUpperCase"),transform:s(()=>br,"transform"),treeifyError:s(()=>Ms,"treeifyError"),trim:s(()=>rr,"trim"),tuple:s(()=>ni,"tuple"),uint32:s(()=>v0,"uint32"),uint64:s(()=>b0,"uint64"),ulid:s(()=>Xo,"ulid"),undefined:s(()=>$0,"undefined"),union:s(()=>yr,"union"),unknown:s(()=>at,"unknown"),uppercase:s(()=>Xu,"uppercase"),url:s(()=>Jo,"url"),util:s(()=>Q,"util"),uuid:s(()=>Uo,"uuid"),uuidv4:s(()=>Zo,"uuidv4"),uuidv6:s(()=>qo,"uuidv6"),uuidv7:s(()=>Lo,"uuidv7"),void:s(()=>S0,"void"),xid:s(()=>Yo,"xid"),xor:s(()=>M0,"xor")});var Wp={};Ge(Wp,{$ZodAny:s(()=>ef,"$ZodAny"),$ZodArray:s(()=>sf,"$ZodArray"),$ZodAsyncError:s(()=>Dt,"$ZodAsyncError"),$ZodBase64:s(()=>L4,"$ZodBase64"),$ZodBase64URL:s(()=>J4,"$ZodBase64URL"),$ZodBigInt:s(()=>ca,"$ZodBigInt"),$ZodBigIntFormat:s(()=>H4,"$ZodBigIntFormat"),$ZodBoolean:s(()=>da,"$ZodBoolean"),$ZodCIDRv4:s(()=>Z4,"$ZodCIDRv4"),$ZodCIDRv6:s(()=>q4,"$ZodCIDRv6"),$ZodCUID:s(()=>I4,"$ZodCUID"),$ZodCUID2:s(()=>S4,"$ZodCUID2"),$ZodCatch:s(()=>Cf,"$ZodCatch"),$ZodCheck:s(()=>oe,"$ZodCheck"),$ZodCheckBigIntFormat:s(()=>s4,"$ZodCheckBigIntFormat"),$ZodCheckEndsWith:s(()=>y4,"$ZodCheckEndsWith"),$ZodCheckGreaterThan:s(()=>ia,"$ZodCheckGreaterThan"),$ZodCheckIncludes:s(()=>h4,"$ZodCheckIncludes"),$ZodCheckLengthEquals:s(()=>p4,"$ZodCheckLengthEquals"),$ZodCheckLessThan:s(()=>na,"$ZodCheckLessThan"),$ZodCheckLowerCase:s(()=>f4,"$ZodCheckLowerCase"),$ZodCheckMaxLength:s(()=>d4,"$ZodCheckMaxLength"),$ZodCheckMaxSize:s(()=>a4,"$ZodCheckMaxSize"),$ZodCheckMimeType:s(()=>b4,"$ZodCheckMimeType"),$ZodCheckMinLength:s(()=>c4,"$ZodCheckMinLength"),$ZodCheckMinSize:s(()=>o4,"$ZodCheckMinSize"),$ZodCheckMultipleOf:s(()=>n4,"$ZodCheckMultipleOf"),$ZodCheckNumberFormat:s(()=>i4,"$ZodCheckNumberFormat"),$ZodCheckOverwrite:s(()=>D4,"$ZodCheckOverwrite"),$ZodCheckProperty:s(()=>E4,"$ZodCheckProperty"),$ZodCheckRegex:s(()=>m4,"$ZodCheckRegex"),$ZodCheckSizeEquals:s(()=>l4,"$ZodCheckSizeEquals"),$ZodCheckStartsWith:s(()=>v4,"$ZodCheckStartsWith"),$ZodCheckStringFormat:s(()=>Pu,"$ZodCheckStringFormat"),$ZodCheckUpperCase:s(()=>g4,"$ZodCheckUpperCase"),$ZodCodec:s(()=>_a,"$ZodCodec"),$ZodCustom:s(()=>zf,"$ZodCustom"),$ZodCustomStringFormat:s(()=>G4,"$ZodCustomStringFormat"),$ZodDate:s(()=>nf,"$ZodDate"),$ZodDefault:s(()=>Df,"$ZodDefault"),$ZodDiscriminatedUnion:s(()=>df,"$ZodDiscriminatedUnion"),$ZodE164:s(()=>V4,"$ZodE164"),$ZodEmail:s(()=>x4,"$ZodEmail"),$ZodEmoji:s(()=>A4,"$ZodEmoji"),$ZodEncodeError:s(()=>Qr,"$ZodEncodeError"),$ZodEnum:s(()=>gf,"$ZodEnum"),$ZodError:s(()=>Ts,"$ZodError"),$ZodExactOptional:s(()=>Ef,"$ZodExactOptional"),$ZodFile:s(()=>vf,"$ZodFile"),$ZodFunction:s(()=>If,"$ZodFunction"),$ZodGUID:s(()=>$4,"$ZodGUID"),$ZodIPv4:s(()=>M4,"$ZodIPv4"),$ZodIPv6:s(()=>P4,"$ZodIPv6"),$ZodISODate:s(()=>O4,"$ZodISODate"),$ZodISODateTime:s(()=>N4,"$ZodISODateTime"),$ZodISODuration:s(()=>T4,"$ZodISODuration"),$ZodISOTime:s(()=>R4,"$ZodISOTime"),$ZodIntersection:s(()=>cf,"$ZodIntersection"),$ZodJWT:s(()=>W4,"$ZodJWT"),$ZodKSUID:s(()=>j4,"$ZodKSUID"),$ZodLazy:s(()=>Ff,"$ZodLazy"),$ZodLiteral:s(()=>hf,"$ZodLiteral"),$ZodMAC:s(()=>U4,"$ZodMAC"),$ZodMap:s(()=>mf,"$ZodMap"),$ZodNaN:s(()=>xf,"$ZodNaN"),$ZodNanoID:s(()=>_4,"$ZodNanoID"),$ZodNever:s(()=>uf,"$ZodNever"),$ZodNonOptional:s(()=>Bf,"$ZodNonOptional"),$ZodNull:s(()=>Q4,"$ZodNull"),$ZodNullable:s(()=>bf,"$ZodNullable"),$ZodNumber:s(()=>la,"$ZodNumber"),$ZodNumberFormat:s(()=>K4,"$ZodNumberFormat"),$ZodObject:s(()=>af,"$ZodObject"),$ZodObjectJIT:s(()=>of,"$ZodObjectJIT"),$ZodOptional:s(()=>Ca,"$ZodOptional"),$ZodPipe:s(()=>Aa,"$ZodPipe"),$ZodPrefault:s(()=>wf,"$ZodPrefault"),$ZodPreprocess:s(()=>kf,"$ZodPreprocess"),$ZodPromise:s(()=>Sf,"$ZodPromise"),$ZodReadonly:s(()=>Af,"$ZodReadonly"),$ZodRealError:s(()=>_e,"$ZodRealError"),$ZodRecord:s(()=>pf,"$ZodRecord"),$ZodRegistry:s(()=>Fg,"$ZodRegistry"),$ZodSet:s(()=>ff,"$ZodSet"),$ZodString:s(()=>Uu,"$ZodString"),$ZodStringFormat:s(()=>se,"$ZodStringFormat"),$ZodSuccess:s(()=>$f,"$ZodSuccess"),$ZodSymbol:s(()=>X4,"$ZodSymbol"),$ZodTemplateLiteral:s(()=>_f,"$ZodTemplateLiteral"),$ZodTransform:s(()=>yf,"$ZodTransform"),$ZodTuple:s(()=>ya,"$ZodTuple"),$ZodType:s(()=>K,"$ZodType"),$ZodULID:s(()=>F4,"$ZodULID"),$ZodURL:s(()=>k4,"$ZodURL"),$ZodUUID:s(()=>C4,"$ZodUUID"),$ZodUndefined:s(()=>Y4,"$ZodUndefined"),$ZodUnion:s(()=>an,"$ZodUnion"),$ZodUnknown:s(()=>tf,"$ZodUnknown"),$ZodVoid:s(()=>rf,"$ZodVoid"),$ZodXID:s(()=>z4,"$ZodXID"),$ZodXor:s(()=>lf,"$ZodXor"),$brand:s(()=>Hp,"$brand"),$constructor:s(()=>B,"$constructor"),$input:s(()=>Sg,"$input"),$output:s(()=>Ig,"$output"),Doc:s(()=>w4,"Doc"),JSONSchema:s(()=>Z5,"JSONSchema"),JSONSchemaGenerator:s(()=>U5,"JSONSchemaGenerator"),NEVER:s(()=>Kp,"NEVER"),TimePrecision:s(()=>zg,"TimePrecision"),_any:s(()=>lo,"_any"),_array:s(()=>vo,"_array"),_base64:s(()=>xn,"_base64"),_base64url:s(()=>kn,"_base64url"),_bigint:s(()=>uo,"_bigint"),_boolean:s(()=>eo,"_boolean"),_catch:s(()=>Xg,"_catch"),_check:s(()=>wo,"_check"),_cidrv4:s(()=>$n,"_cidrv4"),_cidrv6:s(()=>Cn,"_cidrv6"),_coercedBigint:s(()=>ro,"_coercedBigint"),_coercedBoolean:s(()=>to,"_coercedBoolean"),_coercedDate:s(()=>go,"_coercedDate"),_coercedNumber:s(()=>Ga,"_coercedNumber"),_coercedString:s(()=>Ua,"_coercedString"),_cuid:s(()=>vn,"_cuid"),_cuid2:s(()=>yn,"_cuid2"),_custom:s(()=>Eo,"_custom"),_date:s(()=>fo,"_date"),_decode:s(()=>Js,"_decode"),_decodeAsync:s(()=>Ws,"_decodeAsync"),_default:s(()=>Gg,"_default"),_discriminatedUnion:s(()=>Og,"_discriminatedUnion"),_e164:s(()=>An,"_e164"),_email:s(()=>dn,"_email"),_emoji:s(()=>gn,"_emoji"),_encode:s(()=>Ls,"_encode"),_encodeAsync:s(()=>Vs,"_encodeAsync"),_endsWith:s(()=>er,"_endsWith"),_enum:s(()=>Zg,"_enum"),_file:s(()=>yo,"_file"),_float32:s(()=>Ha,"_float32"),_float64:s(()=>Xa,"_float64"),_gt:s(()=>Xe,"_gt"),_gte:s(()=>we,"_gte"),_guid:s(()=>Wu,"_guid"),_includes:s(()=>Yu,"_includes"),_int:s(()=>Ka,"_int"),_int32:s(()=>Ya,"_int32"),_int64:s(()=>no,"_int64"),_intersection:s(()=>Rg,"_intersection"),_ipv4:s(()=>wn,"_ipv4"),_ipv6:s(()=>Bn,"_ipv6"),_isoDate:s(()=>La,"_isoDate"),_isoDateTime:s(()=>qa,"_isoDateTime"),_isoDuration:s(()=>Va,"_isoDuration"),_isoTime:s(()=>Ja,"_isoTime"),_jwt:s(()=>_n,"_jwt"),_ksuid:s(()=>Dn,"_ksuid"),_lazy:s(()=>th,"_lazy"),_length:s(()=>Yt,"_length"),_literal:s(()=>Lg,"_literal"),_lowercase:s(()=>Hu,"_lowercase"),_lt:s(()=>He,"_lt"),_lte:s(()=>Ie,"_lte"),_mac:s(()=>Za,"_mac"),_map:s(()=>Pg,"_map"),_max:s(()=>Ie,"_max"),_maxLength:s(()=>Xt,"_maxLength"),_maxSize:s(()=>Ct,"_maxSize"),_mime:s(()=>tr,"_mime"),_min:s(()=>we,"_min"),_minLength:s(()=>st,"_minLength"),_minSize:s(()=>Ye,"_minSize"),_multipleOf:s(()=>$t,"_multipleOf"),_nan:s(()=>ho,"_nan"),_nanoid:s(()=>hn,"_nanoid"),_nativeEnum:s(()=>qg,"_nativeEnum"),_negative:s(()=>Sn,"_negative"),_never:s(()=>po,"_never"),_nonnegative:s(()=>zn,"_nonnegative"),_nonoptional:s(()=>Kg,"_nonoptional"),_nonpositive:s(()=>Fn,"_nonpositive"),_normalize:s(()=>ur,"_normalize"),_null:s(()=>oo,"_null"),_nullable:s(()=>Wg,"_nullable"),_number:s(()=>Wa,"_number"),_optional:s(()=>Vg,"_optional"),_overwrite:s(()=>Ze,"_overwrite"),_parse:s(()=>Ou,"_parse"),_parseAsync:s(()=>Ru,"_parseAsync"),_pipe:s(()=>Yg,"_pipe"),_positive:s(()=>In,"_positive"),_promise:s(()=>uh,"_promise"),_property:s(()=>jn,"_property"),_readonly:s(()=>Qg,"_readonly"),_record:s(()=>Mg,"_record"),_refine:s(()=>bo,"_refine"),_regex:s(()=>Ku,"_regex"),_safeDecode:s(()=>Ks,"_safeDecode"),_safeDecodeAsync:s(()=>Xs,"_safeDecodeAsync"),_safeEncode:s(()=>Gs,"_safeEncode"),_safeEncodeAsync:s(()=>Hs,"_safeEncodeAsync"),_safeParse:s(()=>Tu,"_safeParse"),_safeParseAsync:s(()=>Mu,"_safeParseAsync"),_set:s(()=>Ug,"_set"),_size:s(()=>Ht,"_size"),_slugify:s(()=>sr,"_slugify"),_startsWith:s(()=>Qu,"_startsWith"),_string:s(()=>Pa,"_string"),_stringFormat:s(()=>Qt,"_stringFormat"),_stringbool:s(()=>Co,"_stringbool"),_success:s(()=>Hg,"_success"),_superRefine:s(()=>Do,"_superRefine"),_symbol:s(()=>so,"_symbol"),_templateLiteral:s(()=>eh,"_templateLiteral"),_toLowerCase:s(()=>nr,"_toLowerCase"),_toUpperCase:s(()=>ir,"_toUpperCase"),_transform:s(()=>Jg,"_transform"),_trim:s(()=>rr,"_trim"),_tuple:s(()=>Tg,"_tuple"),_uint32:s(()=>Qa,"_uint32"),_uint64:s(()=>io,"_uint64"),_ulid:s(()=>En,"_ulid"),_undefined:s(()=>ao,"_undefined"),_union:s(()=>jg,"_union"),_unknown:s(()=>co,"_unknown"),_uppercase:s(()=>Xu,"_uppercase"),_url:s(()=>Gu,"_url"),_uuid:s(()=>cn,"_uuid"),_uuidv4:s(()=>pn,"_uuidv4"),_uuidv6:s(()=>mn,"_uuidv6"),_uuidv7:s(()=>fn,"_uuidv7"),_void:s(()=>mo,"_void"),_xid:s(()=>bn,"_xid"),_xor:s(()=>Ng,"_xor"),clone:s(()=>ke,"clone"),config:s(()=>he,"config"),createStandardJSONSchemaMethod:s(()=>ar,"createStandardJSONSchemaMethod"),createToJSONSchemaMethod:s(()=>rh,"createToJSONSchemaMethod"),decode:s(()=>dE,"decode"),decodeAsync:s(()=>pE,"decodeAsync"),describe:s(()=>Bo,"describe"),encode:s(()=>lE,"encode"),encodeAsync:s(()=>cE,"encodeAsync"),extractDefs:s(()=>kt,"extractDefs"),finalize:s(()=>At,"finalize"),flattenError:s(()=>rn,"flattenError"),formatError:s(()=>nn,"formatError"),globalConfig:s(()=>Iu,"globalConfig"),globalRegistry:s(()=>Ne,"globalRegistry"),initializeContext:s(()=>xt,"initializeContext"),isValidBase64:s(()=>sn,"isValidBase64"),isValidBase64URL:s(()=>aa,"isValidBase64URL"),isValidJWT:s(()=>oa,"isValidJWT"),locales:s(()=>Fa,"locales"),meta:s(()=>$o,"meta"),parse:s(()=>Zs,"parse"),parseAsync:s(()=>qs,"parseAsync"),prettifyError:s(()=>Us,"prettifyError"),process:s(()=>re,"process"),regexes:s(()=>it,"regexes"),registry:s(()=>ln,"registry"),safeDecode:s(()=>fE,"safeDecode"),safeDecodeAsync:s(()=>hE,"safeDecodeAsync"),safeEncode:s(()=>mE,"safeEncode"),safeEncodeAsync:s(()=>gE,"safeEncodeAsync"),safeParse:s(()=>km,"safeParse"),safeParseAsync:s(()=>Am,"safeParseAsync"),toDotPath:s(()=>Ps,"toDotPath"),toJSONSchema:s(()=>_o,"toJSONSchema"),treeifyError:s(()=>Ms,"treeifyError"),util:s(()=>Q,"util"),version:s(()=>B4,"version")});var Gp,Kp=Object.freeze({status:"aborted"});function B(e,t,r){function i(l,d){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,d);let p=a.prototype,c=Object.keys(p);for(let f=0;f<c.length;f++){let g=c[f];g in l||(l[g]=p[g].bind(l))}}s(i,"o"),o(i,"init");let u=r?.Parent??Object;class n extends u{static{s(this,"i")}static{o(this,"Definition")}}Object.defineProperty(n,"name",{value:e});function a(l){var d;let p=r?.Parent?new n:this;i(p,l),(d=p._zod).deferred??(d.deferred=[]);for(let c of p._zod.deferred)c();return p}return s(a,"s"),o(a,"_"),Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(a,"name",{value:e}),a}s(B,"$"),o(B,"$constructor");var Hp=Symbol("zod_brand"),Dt=class extends Error{static{s(this,"Ge")}static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Qr=class extends Error{static{s(this,"dt")}static{o(this,"$ZodEncodeError")}constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Gp=globalThis).__zod_globalConfig??(Gp.__zod_globalConfig={});var Iu=globalThis.__zod_globalConfig;function he(e){return e&&Object.assign(Iu,e),Iu}s(he,"ue"),o(he,"config");var Q={};Ge(Q,{BIGINT_FORMAT_RANGES:s(()=>mm,"BIGINT_FORMAT_RANGES"),Class:s(()=>oE,"Class"),NUMBER_FORMAT_RANGES:s(()=>pm,"NUMBER_FORMAT_RANGES"),aborted:s(()=>nt,"aborted"),allowsEval:s(()=>om,"allowsEval"),assert:s(()=>tm,"assert"),assertEqual:s(()=>Xp,"assertEqual"),assertIs:s(()=>Qp,"assertIs"),assertNever:s(()=>em,"assertNever"),assertNotEqual:s(()=>Yp,"assertNotEqual"),assignProp:s(()=>Ke,"assignProp"),base64ToUint8Array:s(()=>Os,"base64ToUint8Array"),base64urlToUint8Array:s(()=>wm,"base64urlToUint8Array"),cached:s(()=>Jt,"cached"),captureStackTrace:s(()=>Fs,"captureStackTrace"),cleanEnum:s(()=>Dm,"cleanEnum"),cleanRegex:s(()=>Fu,"cleanRegex"),clone:s(()=>ke,"clone"),cloneDef:s(()=>nm,"cloneDef"),createTransparentProxy:s(()=>cm,"createTransparentProxy"),defineLazy:s(()=>Y,"defineLazy"),esc:s(()=>tn,"esc"),escapeRegex:s(()=>Ue,"escapeRegex"),explicitlyAborted:s(()=>Ns,"explicitlyAborted"),extend:s(()=>hm,"extend"),finalizeIssue:s(()=>$e,"finalizeIssue"),floatSafeRemainder:s(()=>Is,"floatSafeRemainder"),getElementAtPath:s(()=>im,"getElementAtPath"),getEnumValues:s(()=>en,"getEnumValues"),getLengthableOrigin:s(()=>ju,"getLengthableOrigin"),getParsedType:s(()=>aE,"getParsedType"),getSizableOrigin:s(()=>zu,"getSizableOrigin"),hexToUint8Array:s(()=>$m,"hexToUint8Array"),isObject:s(()=>wt,"isObject"),isPlainObject:s(()=>rt,"isPlainObject"),issue:s(()=>Nu,"issue"),joinValues:s(()=>z,"joinValues"),jsonStringifyReplacer:s(()=>Su,"jsonStringifyReplacer"),merge:s(()=>ym,"merge"),mergeDefs:s(()=>Pe,"mergeDefs"),normalizeParams:s(()=>T,"normalizeParams"),nullish:s(()=>ut,"nullish"),numKeys:s(()=>lm,"numKeys"),objectClone:s(()=>rm,"objectClone"),omit:s(()=>gm,"omit"),optionalKeys:s(()=>js,"optionalKeys"),parsedType:s(()=>G,"parsedType"),partial:s(()=>Em,"partial"),pick:s(()=>fm,"pick"),prefixIssues:s(()=>Ae,"prefixIssues"),primitiveTypes:s(()=>dm,"primitiveTypes"),promiseAllObject:s(()=>sm,"promiseAllObject"),propertyKeyTypes:s(()=>un,"propertyKeyTypes"),randomString:s(()=>am,"randomString"),required:s(()=>bm,"required"),safeExtend:s(()=>vm,"safeExtend"),shallowClone:s(()=>zs,"shallowClone"),slugify:s(()=>Ss,"slugify"),stringifyPrimitive:s(()=>V,"stringifyPrimitive"),uint8ArrayToBase64:s(()=>Rs,"uint8ArrayToBase64"),uint8ArrayToBase64url:s(()=>Bm,"uint8ArrayToBase64url"),uint8ArrayToHex:s(()=>Cm,"uint8ArrayToHex"),unwrapMessage:s(()=>Vt,"unwrapMessage")});function Xp(e){return e}s(Xp,"E_"),o(Xp,"assertEqual");function Yp(e){return e}s(Yp,"A_"),o(Yp,"assertNotEqual");function Qp(e){}s(Qp,"z_"),o(Qp,"assertIs");function em(e){throw new Error("Unexpected value in exhaustive check")}s(em,"j_"),o(em,"assertNever");function tm(e){}s(tm,"O_"),o(tm,"assert");function en(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}s(en,"sn"),o(en,"getEnumValues");function z(e,t="|"){return e.map(r=>V(r)).join(t)}s(z,"I"),o(z,"joinValues");function Su(e,t){return typeof t=="bigint"?t.toString():t}s(Su,"nr"),o(Su,"jsonStringifyReplacer");function Jt(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}s(Jt,"or"),o(Jt,"cached");function ut(e){return e==null}s(ut,"pt"),o(ut,"nullish");function Fu(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}s(Fu,"an"),o(Fu,"cleanRegex");function Is(e,t){let r=e/t,i=Math.round(r),u=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<u?0:r-i}s(Is,"za"),o(Is,"floatSafeRemainder");var um=Symbol("evaluating");function Y(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==um)return i===void 0&&(i=um,i=r()),i},set(u){Object.defineProperty(e,t,{value:u})},configurable:!0})}s(Y,"Y"),o(Y,"defineLazy");function rm(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}s(rm,"N_"),o(rm,"objectClone");function Ke(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}s(Ke,"ft"),o(Ke,"assignProp");function Pe(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}s(Pe,"st"),o(Pe,"mergeDefs");function nm(e){return Pe(e._zod.def)}s(nm,"P_"),o(nm,"cloneDef");function im(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}s(im,"D_"),o(im,"getElementAtPath");function sm(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let u={};for(let n=0;n<t.length;n++)u[t[n]]=i[n];return u})}s(sm,"M_"),o(sm,"promiseAllObject");function am(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}s(am,"C_"),o(am,"randomString");function tn(e){return JSON.stringify(e)}s(tn,"Eo"),o(tn,"esc");function Ss(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}s(Ss,"ja"),o(Ss,"slugify");var Fs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function wt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}s(wt,"Pt"),o(wt,"isObject");var om=Jt(()=>{if(Iu.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function rt(e){if(wt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(wt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}s(rt,"mt"),o(rt,"isPlainObject");function zs(e){return rt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}s(zs,"Na"),o(zs,"shallowClone");function lm(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}s(lm,"U_"),o(lm,"numKeys");var aE=o(e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},"getParsedType"),un=new Set(["string","number","symbol"]),dm=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ue(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(Ue,"Fe"),o(Ue,"escapeRegex");function ke(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}s(ke,"_e"),o(ke,"clone");function T(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:o(()=>t.error,"error")}:t}s(T,"L"),o(T,"normalizeParams");function cm(e){let t;return new Proxy({},{get(r,i,u){return t??(t=e()),Reflect.get(t,i,u)},set(r,i,u,n){return t??(t=e()),Reflect.set(t,i,u,n)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,u){return t??(t=e()),Reflect.defineProperty(t,i,u)}})}s(cm,"F_"),o(cm,"createTransparentProxy");function V(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}s(V,"P"),o(V,"stringifyPrimitive");function js(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}s(js,"Da"),o(js,"optionalKeys");var pm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},mm={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function fm(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let u=Pe(e._zod.def,{get shape(){let n={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(n[a]=r.shape[a])}return Ke(this,"shape",n),n},checks:[]});return ke(e,u)}s(fm,"Z_"),o(fm,"pick");function gm(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let u=Pe(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete n[a]}return Ke(this,"shape",n),n},checks:[]});return ke(e,u)}s(gm,"B_"),o(gm,"omit");function hm(e,t){if(!rt(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let u=e._zod.def.shape;for(let n in t)if(Object.getOwnPropertyDescriptor(u,n)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Pe(e._zod.def,{get shape(){let u={...e._zod.def.shape,...t};return Ke(this,"shape",u),u}});return ke(e,i)}s(hm,"q_"),o(hm,"extend");function vm(e,t){if(!rt(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Pe(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ke(this,"shape",i),i}});return ke(e,r)}s(vm,"V_"),o(vm,"safeExtend");function ym(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Pe(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Ke(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ke(e,r)}s(ym,"G_"),o(ym,"merge");function Em(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let u=Pe(t._zod.def,{get shape(){let n=t._zod.def.shape,a={...n};if(r)for(let l in r){if(!(l in n))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(a[l]=e?new e({type:"optional",innerType:n[l]}):n[l])}else for(let l in n)a[l]=e?new e({type:"optional",innerType:n[l]}):n[l];return Ke(this,"shape",a),a},checks:[]});return ke(t,u)}s(Em,"J_"),o(Em,"partial");function bm(e,t,r){let i=Pe(t._zod.def,{get shape(){let u=t._zod.def.shape,n={...u};if(r)for(let a in r){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(n[a]=new e({type:"nonoptional",innerType:u[a]}))}else for(let a in u)n[a]=new e({type:"nonoptional",innerType:u[a]});return Ke(this,"shape",n),n}});return ke(t,i)}s(bm,"K_"),o(bm,"required");function nt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}s(nt,"gt"),o(nt,"aborted");function Ns(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}s(Ns,"Ua"),o(Ns,"explicitlyAborted");function Ae(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}s(Ae,"Ee"),o(Ae,"prefixIssues");function Vt(e){return typeof e=="string"?e:e?.message}s(Vt,"on"),o(Vt,"unwrapMessage");function $e(e,t,r){let i=e.message?e.message:Vt(e.inst?._zod.def?.error?.(e))??Vt(t?.error?.(e))??Vt(r.customError?.(e))??Vt(r.localeError?.(e))??"Invalid input",{inst:u,continue:n,input:a,...l}=e;return l.path??(l.path=[]),l.message=i,t?.reportInput&&(l.input=a),l}s($e,"ke"),o($e,"finalizeIssue");function zu(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}s(zu,"un"),o(zu,"getSizableOrigin");function ju(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}s(ju,"ln"),o(ju,"getLengthableOrigin");function G(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}s(G,"D"),o(G,"parsedType");function Nu(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}s(Nu,"ir"),o(Nu,"issue");function Dm(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}s(Dm,"W_"),o(Dm,"cleanEnum");function Os(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}s(Os,"jy"),o(Os,"base64ToUint8Array");function Rs(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}s(Rs,"Oy"),o(Rs,"uint8ArrayToBase64");function wm(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Os(t+r)}s(wm,"X_"),o(wm,"base64urlToUint8Array");function Bm(e){return Rs(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}s(Bm,"H_"),o(Bm,"uint8ArrayToBase64url");function $m(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}s($m,"Y_"),o($m,"hexToUint8Array");function Cm(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}s(Cm,"Q_"),o(Cm,"uint8ArrayToHex");var oE=class{static{s(this,"Aa")}static{o(this,"Class")}constructor(...e){}},xm=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Su,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Ts=B("$ZodError",xm),_e=B("$ZodError",xm,{Parent:Error});function rn(e,t=r=>r.message){let r={},i=[];for(let u of e.issues)u.path.length>0?(r[u.path[0]]=r[u.path[0]]||[],r[u.path[0]].push(t(u))):i.push(t(u));return{formErrors:i,fieldErrors:r}}s(rn,"pn"),o(rn,"flattenError");function nn(e,t=r=>r.message){let r={_errors:[]},i=o((u,n=[])=>{for(let a of u.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(l=>i({issues:l},[...n,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...n,...a.path]);else{let l=[...n,...a.path];if(l.length===0)r._errors.push(t(a));else{let d=r,p=0;for(;p<l.length;){let c=l[p];p===l.length-1?(d[c]=d[c]||{_errors:[]},d[c]._errors.push(t(a))):d[c]=d[c]||{_errors:[]},d=d[c],p++}}}},"processError");return i(e),r}s(nn,"fn"),o(nn,"formatError");function Ms(e,t=r=>r.message){let r={errors:[]},i=o((u,n=[])=>{var a,l;for(let d of u.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(p=>i({issues:p},[...n,...d.path]));else if(d.code==="invalid_key")i({issues:d.issues},[...n,...d.path]);else if(d.code==="invalid_element")i({issues:d.issues},[...n,...d.path]);else{let p=[...n,...d.path];if(p.length===0){r.errors.push(t(d));continue}let c=r,f=0;for(;f<p.length;){let g=p[f],m=f===p.length-1;typeof g=="string"?(c.properties??(c.properties={}),(a=c.properties)[g]??(a[g]={errors:[]}),c=c.properties[g]):(c.items??(c.items=[]),(l=c.items)[g]??(l[g]={errors:[]}),c=c.items[g]),m&&c.errors.push(t(d)),f++}}},"processError");return i(e),r}s(Ms,"La"),o(Ms,"treeifyError");function Ps(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}s(Ps,"Py"),o(Ps,"toDotPath");function Us(e){let t=[],r=[...e.issues].sort((i,u)=>(i.path??[]).length-(u.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${Ps(i.path)}`);return t.join(`
|
|
2
|
-
`)}s(Us,"Fa"),o(Us,"prettifyError");var Ou=o(e=>(t,r,i,u)=>{let n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new Dt;if(a.issues.length){let l=new(u?.Err??e)(a.issues.map(d=>$e(d,n,he())));throw Fs(l,u?.callee),l}return a.value},"_parse"),Zs=Ou(_e),Ru=o(e=>async(t,r,i,u)=>{let n=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let l=new(u?.Err??e)(a.issues.map(d=>$e(d,n,he())));throw Fs(l,u?.callee),l}return a.value},"_parseAsync"),qs=Ru(_e),Tu=o(e=>(t,r,i)=>{let u=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},u);if(n instanceof Promise)throw new Dt;return n.issues.length?{success:!1,error:new(e??Ts)(n.issues.map(a=>$e(a,u,he())))}:{success:!0,data:n.value}},"_safeParse"),km=Tu(_e),Mu=o(e=>async(t,r,i)=>{let u=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},u);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(a=>$e(a,u,he())))}:{success:!0,data:n.value}},"_safeParseAsync"),Am=Mu(_e),Ls=o(e=>(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Ou(e)(t,r,u)},"_encode"),lE=Ls(_e),Js=o(e=>(t,r,i)=>Ou(e)(t,r,i),"_decode"),dE=Js(_e),Vs=o(e=>async(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Ru(e)(t,r,u)},"_encodeAsync"),cE=Vs(_e),Ws=o(e=>async(t,r,i)=>Ru(e)(t,r,i),"_decodeAsync"),pE=Ws(_e),Gs=o(e=>(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Tu(e)(t,r,u)},"_safeEncode"),mE=Gs(_e),Ks=o(e=>(t,r,i)=>Tu(e)(t,r,i),"_safeDecode"),fE=Ks(_e),Hs=o(e=>async(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Mu(e)(t,r,u)},"_safeEncodeAsync"),gE=Hs(_e),Xs=o(e=>async(t,r,i)=>Mu(e)(t,r,i),"_safeDecodeAsync"),hE=Xs(_e),it={};Ge(it,{base64:s(()=>Lm,"base64"),base64url:s(()=>Qs,"base64url"),bigint:s(()=>Hm,"bigint"),boolean:s(()=>Ym,"boolean"),browserEmail:s(()=>$E,"browserEmail"),cidrv4:s(()=>Zm,"cidrv4"),cidrv6:s(()=>qm,"cidrv6"),cuid:s(()=>_m,"cuid"),cuid2:s(()=>Im,"cuid2"),date:s(()=>Gm,"date"),datetime:s(()=>ua,"datetime"),domain:s(()=>kE,"domain"),duration:s(()=>Nm,"duration"),e164:s(()=>Vm,"e164"),email:s(()=>Rm,"email"),emoji:s(()=>Ys,"emoji"),extendedDuration:s(()=>vE,"extendedDuration"),guid:s(()=>Om,"guid"),hex:s(()=>AE,"hex"),hostname:s(()=>xE,"hostname"),html5Email:s(()=>DE,"html5Email"),httpProtocol:s(()=>Jm,"httpProtocol"),idnEmail:s(()=>BE,"idnEmail"),integer:s(()=>Xm,"integer"),ipv4:s(()=>Mm,"ipv4"),ipv6:s(()=>Pm,"ipv6"),ksuid:s(()=>zm,"ksuid"),lowercase:s(()=>t4,"lowercase"),mac:s(()=>Um,"mac"),md5_base64:s(()=>IE,"md5_base64"),md5_base64url:s(()=>SE,"md5_base64url"),md5_hex:s(()=>_E,"md5_hex"),nanoid:s(()=>jm,"nanoid"),null:s(()=>Qm,"null"),number:s(()=>ra,"number"),rfc5322Email:s(()=>wE,"rfc5322Email"),sha1_base64:s(()=>zE,"sha1_base64"),sha1_base64url:s(()=>jE,"sha1_base64url"),sha1_hex:s(()=>FE,"sha1_hex"),sha256_base64:s(()=>OE,"sha256_base64"),sha256_base64url:s(()=>RE,"sha256_base64url"),sha256_hex:s(()=>NE,"sha256_hex"),sha384_base64:s(()=>ME,"sha384_base64"),sha384_base64url:s(()=>PE,"sha384_base64url"),sha384_hex:s(()=>TE,"sha384_hex"),sha512_base64:s(()=>ZE,"sha512_base64"),sha512_base64url:s(()=>qE,"sha512_base64url"),sha512_hex:s(()=>UE,"sha512_hex"),string:s(()=>Km,"string"),time:s(()=>ta,"time"),ulid:s(()=>Sm,"ulid"),undefined:s(()=>e4,"undefined"),unicodeEmail:s(()=>Tm,"unicodeEmail"),uppercase:s(()=>u4,"uppercase"),uuid:s(()=>Wt,"uuid"),uuid4:s(()=>yE,"uuid4"),uuid6:s(()=>EE,"uuid6"),uuid7:s(()=>bE,"uuid7"),xid:s(()=>Fm,"xid")});var _m=/^[cC][0-9a-z]{6,}$/,Im=/^[0-9a-z]+$/,Sm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Fm=/^[0-9a-vA-V]{20}$/,zm=/^[A-Za-z0-9]{27}$/,jm=/^[a-zA-Z0-9_-]{21}$/,Nm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,vE=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Om=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Wt=o(e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,"uuid"),yE=Wt(4),EE=Wt(6),bE=Wt(7),Rm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,DE=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,wE=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Tm=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,BE=Tm,$E=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,CE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ys(){return new RegExp(CE,"u")}s(Ys,"Qa"),o(Ys,"emoji");var Mm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Pm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Um=o(e=>{let t=Ue(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},"mac"),Zm=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,qm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Qs=/^[A-Za-z0-9_-]*$/,xE=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,kE=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Jm=/^https?$/,Vm=/^\+[1-9]\d{6,14}$/,Wm="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Gm=new RegExp(`^${Wm}$`);function ea(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}s(ea,"Cy"),o(ea,"timeSource");function ta(e){return new RegExp(`^${ea(e)}$`)}s(ta,"uc"),o(ta,"time");function ua(e){let t=ea({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Wm}T(?:${i})$`)}s(ua,"lc"),o(ua,"datetime");var Km=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Hm=/^-?\d+n?$/,Xm=/^-?\d+$/,ra=/^-?\d+(?:\.\d+)?$/,Ym=/^(?:true|false)$/i,Qm=/^null$/i,e4=/^undefined$/i,t4=/^[^A-Z]*$/,u4=/^[^a-z]*$/,AE=/^[0-9a-fA-F]*$/;function Gt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}s(Gt,"mn"),o(Gt,"fixedBase64");function Kt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}s(Kt,"gn"),o(Kt,"fixedBase64url");var _E=/^[0-9a-fA-F]{32}$/,IE=Gt(22,"=="),SE=Kt(22),FE=/^[0-9a-fA-F]{40}$/,zE=Gt(27,"="),jE=Kt(27),NE=/^[0-9a-fA-F]{64}$/,OE=Gt(43,"="),RE=Kt(43),TE=/^[0-9a-fA-F]{96}$/,ME=Gt(64,""),PE=Kt(64),UE=/^[0-9a-fA-F]{128}$/,ZE=Gt(86,"=="),qE=Kt(86),oe=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),r4={number:"number",bigint:"bigint",object:"date"},na=B("$ZodCheckLessThan",(e,t)=>{oe.init(e,t);let r=r4[typeof t.value];e._zod.onattach.push(i=>{let u=i._zod.bag,n=(t.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<n&&(t.inclusive?u.maximum=t.value:u.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ia=B("$ZodCheckGreaterThan",(e,t)=>{oe.init(e,t);let r=r4[typeof t.value];e._zod.onattach.push(i=>{let u=i._zod.bag,n=(t.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>n&&(t.inclusive?u.minimum=t.value:u.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),n4=B("$ZodCheckMultipleOf",(e,t)=>{oe.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Is(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),i4=B("$ZodCheckNumberFormat",(e,t)=>{oe.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[u,n]=pm[t.format];e._zod.onattach.push(a=>{let l=a._zod.bag;l.format=t.format,l.minimum=u,l.maximum=n,r&&(l.pattern=Xm)}),e._zod.check=a=>{let l=a.value;if(r){if(!Number.isInteger(l)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}l<u&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:u,inclusive:!0,inst:e,continue:!t.abort}),l>n&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),s4=B("$ZodCheckBigIntFormat",(e,t)=>{oe.init(e,t);let[r,i]=mm[t.format];e._zod.onattach.push(u=>{let n=u._zod.bag;n.format=t.format,n.minimum=r,n.maximum=i}),e._zod.check=u=>{let n=u.value;n<r&&u.issues.push({origin:"bigint",input:n,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),n>i&&u.issues.push({origin:"bigint",input:n,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),a4=B("$ZodCheckMaxSize",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ut(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<u&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let u=i.value;u.size<=t.maximum||i.issues.push({origin:zu(u),code:"too_big",maximum:t.maximum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),o4=B("$ZodCheckMinSize",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ut(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>u&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let u=i.value;u.size>=t.minimum||i.issues.push({origin:zu(u),code:"too_small",minimum:t.minimum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),l4=B("$ZodCheckSizeEquals",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ut(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag;u.minimum=t.size,u.maximum=t.size,u.size=t.size}),e._zod.check=i=>{let u=i.value,n=u.size;if(n===t.size)return;let a=n>t.size;i.issues.push({origin:zu(u),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),d4=B("$ZodCheckMaxLength",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ut(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<u&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let u=i.value;if(u.length<=t.maximum)return;let n=ju(u);i.issues.push({origin:n,code:"too_big",maximum:t.maximum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),c4=B("$ZodCheckMinLength",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ut(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>u&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let u=i.value;if(u.length>=t.minimum)return;let n=ju(u);i.issues.push({origin:n,code:"too_small",minimum:t.minimum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),p4=B("$ZodCheckLengthEquals",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ut(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag;u.minimum=t.length,u.maximum=t.length,u.length=t.length}),e._zod.check=i=>{let u=i.value,n=u.length;if(n===t.length)return;let a=ju(u),l=n>t.length;i.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Pu=B("$ZodCheckStringFormat",(e,t)=>{var r,i;oe.init(e,t),e._zod.onattach.push(u=>{let n=u._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=u=>{t.pattern.lastIndex=0,!t.pattern.test(u.value)&&u.issues.push({origin:"string",code:"invalid_format",format:t.format,input:u.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),m4=B("$ZodCheckRegex",(e,t)=>{Pu.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),f4=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=t4),Pu.init(e,t)}),g4=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=u4),Pu.init(e,t)}),h4=B("$ZodCheckIncludes",(e,t)=>{oe.init(e,t);let r=Ue(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(u=>{let n=u._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(i)}),e._zod.check=u=>{u.value.includes(t.includes,t.position)||u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:u.value,inst:e,continue:!t.abort})}}),v4=B("$ZodCheckStartsWith",(e,t)=>{oe.init(e,t);let r=new RegExp(`^${Ue(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let u=i._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),y4=B("$ZodCheckEndsWith",(e,t)=>{oe.init(e,t);let r=new RegExp(`.*${Ue(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let u=i._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function sa(e,t,r){e.issues.length&&t.issues.push(...Ae(r,e.issues))}s(sa,"Uy"),o(sa,"handleCheckPropertyResult");var E4=B("$ZodCheckProperty",(e,t)=>{oe.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(u=>sa(u,r,t.property));sa(i,r,t.property)}}),b4=B("$ZodCheckMimeType",(e,t)=>{oe.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),D4=B("$ZodCheckOverwrite",(e,t)=>{oe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),w4=class{static{s(this,"hn")}static{o(this,"Doc")}constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split(`
|
|
1
|
+
"use strict";var qy=Object.defineProperty;var s=(e,t)=>qy(e,"name",{value:t,configurable:!0});var Fp=Object.defineProperty,o=s((e,t)=>Fp(e,"name",{value:t,configurable:!0}),"a"),Ge=s((e,t)=>{for(var r in t)Fp(e,r,{get:t[r],enumerable:!0})},"nt");import"reflect-metadata";import{createHash as Ly}from"node:crypto";import{existsSync as zp,readFileSync as jp,statSync as Np}from"node:fs";import{createServer as Jy}from"node:http";import{basename as Vy}from"node:path";var Op="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function Rp(e,t){let r="",i=e;for(let u=t-1;u>=0;u--){let n=i%32;r=Op[n]+r,i=(i-n)/32}return r}s(Rp,"p_"),o(Rp,"encodeTime");function Tp(e){let t=new Uint8Array(e);globalThis.crypto.getRandomValues(t);let r="";for(let i=0;i<e;i++)r+=Op[(t[i]??0)&31];return r}s(Tp,"f_"),o(Tp,"encodeRandom");function qt(e=Date.now()){return Rp(e,10)+Tp(16)}s(qt,"ot"),o(qt,"ulid");var Wy=class{static{s(this,"So")}static{o(this,"EventBus")}constructor(e={}){this.subs=new Set,this.dropped=0,this.capacity=e.capacity??1e4,this.onDrop=e.onDrop,this.transform=e.transform}publish(e){if(this.subs.size>this.capacity){this.dropped++,this.onDrop?.(1);return}let t=e;if(this.transform)try{t=this.transform(e)??e}catch{t=e}for(let r of this.subs)if(!(r.filter&&!r.filter(t)))try{let i=r.handler(t);i&&typeof i.then=="function"&&i.catch(()=>{})}catch{}}subscribe(e,t){let r={handler:e,filter:t};return this.subs.add(r),()=>{this.subs.delete(r)}}droppedCount(){return this.dropped}subscriberCount(){return this.subs.size}},Lt="REDACTED",Gy=["token","secret","password","passwd","apikey","credential","assertion","signature"],Ky=new Set(["key","auth","authorization","jwt","code","sig","pwd","pass","session","sid","bearer","otp","cookie","set-cookie"]),Hy=/^(?:(?:prompt|completion|total|input|output|cache|cached|cacheread|cachewrite|reasoning|thinking|max|min|remaining|used|billed)tokens|tokens?(?:count|used|limit|remaining))$/;function As(e){let t=e.toLowerCase();if(Hy.test(t.replace(/[-_.]+/g,"")))return!1;if(Gy.some(r=>t.includes(r)))return!0;for(let r of t.split(/[-_.]+/))if(r&&Ky.has(r))return!0;return!1}s(As,"ky"),o(As,"isSecretParam");var Xy=/^([a-z][a-z0-9+.-]*:\/\/)[^/?#@\s]*@/i,Yy=/([?&#])([^=&#\s]+)=([^&#\s]*)/g;function Mp(e){return e&&e.replace(Xy,`$1${Lt}@`).replace(Yy,(t,r,i)=>As(i)?`${r}${i}=${Lt}`:t)}s(Mp,"b_"),o(Mp,"redactUrlParams");var Qy=/\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]*/g,eE=/\b(bearer|basic)\s+[A-Za-z0-9._~+/=-]{8,}/gi,tE=/\b(authorization|x-api-key|api-key|cookie|set-cookie|proxy-authorization)\b(\s*[:=]\s*)(["']?)((?:(?:bearer|basic)\s+)?[^\s"',;]{4,})\3/gi;function tt(e){return Mp(e).replace(tE,(t,r,i,u)=>`${r}${i}${u}${Lt}${u}`).replace(Qy,Lt).replace(eE,(t,r)=>`${r} ${Lt}`)}s(tt,"it"),o(tt,"redactText");function _s(e,t){return e.length<=t?e:`${e.slice(0,t)}\u2026[lensmcp truncated: ${e.length-t} more chars]`}s(_s,"Sy"),o(_s,"clip");function Pp(e,t=4096){if(e!==void 0)return _s(tt(e),t)}s(Pp,"Iy"),o(Pp,"safeText");function Up(e){return _s(tt(e),300)}s(Up,"Ry"),o(Up,"safeTitle");var uE=6,rE=64;function _u(e,t=0,r=uE){if(typeof e=="string")return tt(e);if(e===null||typeof e!="object"||t>=r)return e;if(Array.isArray(e)){let n=!1,a=e.map((l,d)=>{if(d>=rE)return l;let p=_u(l,t+1,r);return p!==l&&(n=!0),p});return n?a:e}let i=!1,u={};for(let[n,a]of Object.entries(e)){let l=As(n)&&a!==void 0&&a!==null?Lt:_u(a,t+1,r);l!==a&&(i=!0),u[n]=l}return i?u:e}s(_u,"tr"),o(_u,"redactDeep");var nE=12;function Zp(e={}){let t=e.maxDepth??nE,r=0,i=0;return{redact(u){r+=1;let n=u.title===void 0?void 0:Up(tt(u.title)),a=u.message===void 0?void 0:Pp(tt(u.message),4096),l=u.raw===void 0?void 0:_u(u.raw,0,t),d=n!==u.title,p=a!==u.message,c=l!==u.raw;return!d&&!p&&!c?u:(i+=1,{...u,...n!==void 0?{title:n}:{},...a!==void 0?{message:a}:{},...l!==void 0?{raw:l}:{}})},stats:o(()=>({inspected:r,redacted:i}),"stats"),reset:o(()=>{r=0,i=0},"reset")}}s(Zp,"Ty"),o(Zp,"createEventRedactor");var iE=class{static{s(this,"Io")}static{o(this,"ResourceStore")}constructor(){this.entries=new Map,this.subs=new Map}register(e,t){if(this.entries.has(e))throw new Error(`Resource already registered: ${e}`);return this.entries.set(e,{uri:e,produce:t,revision:0}),()=>{this.entries.delete(e),this.subs.delete(e)}}async read(e){let t=this.entries.get(e);if(!t)throw new Error(`Unknown resource: ${e}`);return t.produce()}list(){return[...this.entries.keys()]}async markDirty(e){let t=this.entries.get(e);if(!t)return;let r=await t.produce(),i=JSON.stringify(r);if(i===t.lastJson)return;t.lastJson=i,t.revision+=1;let u=this.subs.get(e);if(u)for(let n of u)try{n(e,t.revision)}catch{}}revision(e){return this.entries.get(e)?.revision}subscribe(e,t){let r=this.subs.get(e);return r||(r=new Set,this.subs.set(e,r)),r.add(t),()=>{r?.delete(t)}}},qp=class{static{s(this,"rr")}static{o(this,"GraphStore")}constructor(){this.nodes=new Map,this.edges=new Map,this.byParent=new Map,this.byFlow=new Map,this.byLogical=new Map,this.byInstance=new Map,this.byRequest=new Map,this.outByAxis=new Map,this.inByAxis=new Map}addNode(e){this.nodes.set(e.id,e),e.parentTraceNodeId&&this.addToIndex(this.byParent,e.parentTraceNodeId,e.id),e.context.flowId&&this.addToIndex(this.byFlow,e.context.flowId,e.id),e.logicalId&&this.addToIndex(this.byLogical,e.logicalId,e.id),e.instanceId&&this.addToIndex(this.byInstance,e.instanceId,e.id),e.context.requestId&&this.addToIndex(this.byRequest,e.context.requestId,e.id)}updateNode(e,t){let r=this.nodes.get(e);if(!r)throw new Error(`Unknown node: ${e}`);let i={...r,...t,id:r.id};return this.nodes.set(e,i),i}getNode(e){return this.nodes.get(e)}addEdge(e){this.edges.set(e.id,e);let t=this.outByAxis.get(e.axis);t||(t=new Map,this.outByAxis.set(e.axis,t)),this.addToIndex(t,e.from,e.id);let r=this.inByAxis.get(e.axis);r||(r=new Map,this.inByAxis.set(e.axis,r)),this.addToIndex(r,e.to,e.id)}getEdge(e){return this.edges.get(e)}childrenOf(e){return this.materialiseNodes(this.byParent.get(e))}nodesInFlow(e){return this.materialiseNodes(this.byFlow.get(e))}nodesByLogical(e){return this.materialiseNodes(this.byLogical.get(e))}nodesByInstance(e){return this.materialiseNodes(this.byInstance.get(e))}nodesByRequest(e){return this.materialiseNodes(this.byRequest.get(e))}traverse(e){let t=this.nodes.get(e.from);if(!t)return{nodes:[],edges:[]};let r=Array.isArray(e.lens)?e.lens:[e.lens],i=e.direction??"both",u=e.depth??4,n=e.maxNodes??1e3,a=new Set,l=new Set,d=[{id:t.id,d:0}];for(;d.length&&!(a.size>=n);){let{id:p,d:c}=d.shift();if(!a.has(p)&&(a.add(p),!(c>=u)))for(let f of r){if(i==="out"||i==="both"){let g=this.outByAxis.get(f)?.get(p);if(g)for(let m of g){l.add(m);let h=this.edges.get(m);a.has(h.to)||d.push({id:h.to,d:c+1})}}if(i==="in"||i==="both"){let g=this.inByAxis.get(f)?.get(p);if(g)for(let m of g){l.add(m);let h=this.edges.get(m);a.has(h.from)||d.push({id:h.from,d:c+1})}}}}return{nodes:this.materialiseNodes(a),edges:[...l].map(p=>this.edges.get(p)).filter(p=>!!p)}}nodeCount(){return this.nodes.size}edgeCount(){return this.edges.size}addToIndex(e,t,r){let i=e.get(t);i||(i=new Set,e.set(t,i)),i.add(r)}materialiseNodes(e){if(!e)return[];let t=[];for(let r of e){let i=this.nodes.get(r);i&&t.push(i)}return t}};function Lp(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}s(Lp,"R_"),o(Lp,"fnv1a32");function Jp(e){let t=[e.kind,e.identity,e.file??"",e.detail??""];return`${e.kind}:${Lp(t.join("|"))}`}s(Jp,"Ey"),o(Jp,"fingerprint");var sE=class{static{s(this,"Ro")}static{o(this,"ReducerRegistry")}constructor(){this.reducers=[]}register(e,t){if(this.reducers.some(r=>r.name===e))throw new Error(`Reducer already registered: ${e}`);this.reducers.push({name:e,reducer:t})}list(){return this.reducers}async dispatch(e){for(let{reducer:t}of this.reducers)try{let r=t(e);r&&typeof r.then=="function"&&await r}catch{}}};function Is(e,t={}){let r,i;if(t.flowId)i=t.flowId,r=e.filter(f=>f.context.flowId===i);else{let f=e.find(g=>g.context.flowId);if(!f)return;i=f.context.flowId,r=e.filter(g=>g.context.flowId===i)}if(r.length===0)return;r.sort((f,g)=>f.timestamp-g.timestamp);let u=1e3;r.length>u&&(r=[r[0],...r.slice(r.length-(u-1))]);let n=r[0],a=[],l,d;for(let f of r){let g=Vp(f);if(g){if(a.push(g),g.kind==="render"||g.kind==="final-render"){let m=f.raw;m?.render&&(l={id:m.render.id,page:m.render.page,route:m.render.route,componentName:m.render.componentName})}else if(f.source==="visual"&&g.kind==="visual-violation"){let m=f.raw;m?.frame&&(d=m.frame.id)}}}for(let f=a.length-1;f>=0;f--)if(a[f].kind==="render"){a[f]={...a[f],kind:"final-render"};break}let p=r[0].timestamp,c=r[r.length-1].timestamp;return{flowId:i,origin:{type:n.context.originType,nodeId:n.context.originNodeId,at:n.timestamp},phases:a,finalState:l?{page:l.page,route:l.route,componentName:l.componentName,renderId:l.id,visualFrameId:d}:void 0,startedAt:p,endedAt:c,eventCount:r.length}}s(Is,"To"),o(Is,"compileStory");function Vp(e){let t=(e.raw??null)?.kind;if(t==="flow-origin"||e.source==="client-runtime"&&t==="user-action"){let r=e.raw;return{kind:"user-action",at:e.timestamp,label:r?.origin?.label??e.title,eventIds:[e.id]}}if(e.source==="react"&&t==="render"){let r=e.raw;return{kind:"render",at:e.timestamp,label:`render ${r?.render?.componentName??"?"}`,eventIds:[e.id],details:r?.render?{componentName:r.render.componentName,durationMs:r.render.actualDurationMs}:void 0}}if(e.source==="react"&&t==="slot-content-changed"){let r=e.raw,i=r?.slot?.toComponent??"?";return{kind:/spinner|loader|loading/i.test(i)?"loading-ui":"idle-ui",at:e.timestamp,label:`slot ${r?.slot?.slotLogicalId??""} \u2192 ${i}`,eventIds:[e.id]}}if(e.source==="client-runtime"&&t==="route"){let r=e.raw;return{kind:"route-transition",at:e.timestamp,label:`route ${r?.from??""} \u2192 ${r?.url??""}`,eventIds:[e.id]}}if(e.source==="valtio"&&t==="state-update"){let r=e.raw;return{kind:"state-update",at:e.timestamp,label:`${r?.update?.storeId??"?"}.${r?.update?.path??"?"}`,eventIds:[e.id],details:r?.update}}if(e.source==="nestjs"&&t==="server-request"){let r=e.raw;return{kind:"backend-request",at:e.timestamp,label:`${r?.request?.method??"?"} ${r?.request?.route??"?"} \u2192 ${r?.request?.status??"?"}`,eventIds:[e.id],details:r?.request}}if(e.source==="chrome"&&e.category==="network")return{kind:"backend-request",at:e.timestamp,label:e.title,eventIds:[e.id]};if(e.source==="visual"&&t==="visual-violation"){let r=e.raw;return{kind:"visual-violation",at:e.timestamp,label:`${r?.violation?.ruleType??"rule"} ${r?.violation?.ruleId??""}`,eventIds:[e.id]}}}s(Vp,"T_"),o(Vp,"classifyEvent");var v={};Ge(v,{$brand:s(()=>Hp,"$brand"),$input:s(()=>Sg,"$input"),$output:s(()=>Ig,"$output"),NEVER:s(()=>Kp,"NEVER"),TimePrecision:s(()=>zg,"TimePrecision"),ZodAny:s(()=>k0,"ZodAny"),ZodArray:s(()=>j0,"ZodArray"),ZodBase64:s(()=>Gn,"ZodBase64"),ZodBase64URL:s(()=>Kn,"ZodBase64URL"),ZodBigInt:s(()=>fr,"ZodBigInt"),ZodBigIntFormat:s(()=>ei,"ZodBigIntFormat"),ZodBoolean:s(()=>mr,"ZodBoolean"),ZodCIDRv4:s(()=>Vn,"ZodCIDRv4"),ZodCIDRv6:s(()=>Wn,"ZodCIDRv6"),ZodCUID:s(()=>Mn,"ZodCUID"),ZodCUID2:s(()=>Pn,"ZodCUID2"),ZodCatch:s(()=>dl,"ZodCatch"),ZodCodec:s(()=>Br,"ZodCodec"),ZodCustom:s(()=>Cr,"ZodCustom"),ZodCustomStringFormat:s(()=>uu,"ZodCustomStringFormat"),ZodDate:s(()=>ui,"ZodDate"),ZodDefault:s(()=>sl,"ZodDefault"),ZodDiscriminatedUnion:s(()=>U0,"ZodDiscriminatedUnion"),ZodE164:s(()=>Hn,"ZodE164"),ZodEmail:s(()=>On,"ZodEmail"),ZodEmoji:s(()=>Rn,"ZodEmoji"),ZodEnum:s(()=>iu,"ZodEnum"),ZodError:s(()=>q5,"ZodError"),ZodExactOptional:s(()=>rl,"ZodExactOptional"),ZodFile:s(()=>el,"ZodFile"),ZodFirstPartyTypeKind:s(()=>Al,"ZodFirstPartyTypeKind"),ZodFunction:s(()=>wl,"ZodFunction"),ZodGUID:s(()=>lr,"ZodGUID"),ZodIPv4:s(()=>Ln,"ZodIPv4"),ZodIPv6:s(()=>Jn,"ZodIPv6"),ZodISODate:s(()=>jo,"ZodISODate"),ZodISODateTime:s(()=>Fo,"ZodISODateTime"),ZodISODuration:s(()=>To,"ZodISODuration"),ZodISOTime:s(()=>Oo,"ZodISOTime"),ZodIntersection:s(()=>q0,"ZodIntersection"),ZodIssueCode:s(()=>L5,"ZodIssueCode"),ZodJWT:s(()=>Xn,"ZodJWT"),ZodKSUID:s(()=>qn,"ZodKSUID"),ZodLazy:s(()=>El,"ZodLazy"),ZodLiteral:s(()=>Y0,"ZodLiteral"),ZodMAC:s(()=>u0,"ZodMAC"),ZodMap:s(()=>W0,"ZodMap"),ZodNaN:s(()=>cl,"ZodNaN"),ZodNanoID:s(()=>Tn,"ZodNanoID"),ZodNever:s(()=>I0,"ZodNever"),ZodNonOptional:s(()=>di,"ZodNonOptional"),ZodNull:s(()=>x0,"ZodNull"),ZodNullable:s(()=>nl,"ZodNullable"),ZodNumber:s(()=>cr,"ZodNumber"),ZodNumberFormat:s(()=>_t,"ZodNumberFormat"),ZodObject:s(()=>hr,"ZodObject"),ZodOptional:s(()=>si,"ZodOptional"),ZodPipe:s(()=>Dr,"ZodPipe"),ZodPrefault:s(()=>al,"ZodPrefault"),ZodPreprocess:s(()=>gl,"ZodPreprocess"),ZodPromise:s(()=>bl,"ZodPromise"),ZodReadonly:s(()=>hl,"ZodReadonly"),ZodRealError:s(()=>Se,"ZodRealError"),ZodRecord:s(()=>nu,"ZodRecord"),ZodSet:s(()=>K0,"ZodSet"),ZodString:s(()=>or,"ZodString"),ZodStringFormat:s(()=>ae,"ZodStringFormat"),ZodSuccess:s(()=>ol,"ZodSuccess"),ZodSymbol:s(()=>w0,"ZodSymbol"),ZodTemplateLiteral:s(()=>vl,"ZodTemplateLiteral"),ZodTransform:s(()=>ul,"ZodTransform"),ZodTuple:s(()=>L0,"ZodTuple"),ZodType:s(()=>X,"ZodType"),ZodULID:s(()=>Un,"ZodULID"),ZodURL:s(()=>dr,"ZodURL"),ZodUUID:s(()=>qe,"ZodUUID"),ZodUndefined:s(()=>$0,"ZodUndefined"),ZodUnion:s(()=>vr,"ZodUnion"),ZodUnknown:s(()=>_0,"ZodUnknown"),ZodVoid:s(()=>S0,"ZodVoid"),ZodXID:s(()=>Zn,"ZodXID"),ZodXor:s(()=>M0,"ZodXor"),_ZodString:s(()=>Nn,"_ZodString"),_default:s(()=>oi,"_default"),_function:s(()=>$r,"_function"),any:s(()=>A0,"any"),array:s(()=>ru,"array"),base64:s(()=>a0,"base64"),base64url:s(()=>o0,"base64url"),bigint:s(()=>E0,"bigint"),boolean:s(()=>Qn,"boolean"),catch:s(()=>pi,"catch"),check:s(()=>Bl,"check"),cidrv4:s(()=>i0,"cidrv4"),cidrv6:s(()=>s0,"cidrv6"),clone:s(()=>ke,"clone"),codec:s(()=>ml,"codec"),coerce:s(()=>cv,"coerce"),config:s(()=>he,"config"),core:s(()=>Wp,"core"),cuid:s(()=>Ho,"cuid"),cuid2:s(()=>Xo,"cuid2"),custom:s(()=>$l,"custom"),date:s(()=>z0,"date"),decode:s(()=>Kh,"decode"),decodeAsync:s(()=>Xh,"decodeAsync"),describe:s(()=>rv,"describe"),discriminatedUnion:s(()=>Z0,"discriminatedUnion"),e164:s(()=>l0,"e164"),email:s(()=>Po,"email"),emoji:s(()=>Go,"emoji"),encode:s(()=>Gh,"encode"),encodeAsync:s(()=>Hh,"encodeAsync"),endsWith:s(()=>er,"endsWith"),enum:s(()=>Er,"enum"),exactOptional:s(()=>ai,"exactOptional"),file:s(()=>tl,"file"),flattenError:s(()=>rn,"flattenError"),float32:s(()=>g0,"float32"),float64:s(()=>h0,"float64"),formatError:s(()=>nn,"formatError"),fromJSONSchema:s(()=>dv,"fromJSONSchema"),function:s(()=>$r,"function"),getErrorMap:s(()=>av,"getErrorMap"),globalRegistry:s(()=>Ne,"globalRegistry"),gt:s(()=>Xe,"gt"),gte:s(()=>we,"gte"),guid:s(()=>Uo,"guid"),hash:s(()=>f0,"hash"),hex:s(()=>m0,"hex"),hostname:s(()=>p0,"hostname"),httpUrl:s(()=>Wo,"httpUrl"),includes:s(()=>Yu,"includes"),instanceof:s(()=>Cl,"instanceof"),int:s(()=>pr,"int"),int32:s(()=>v0,"int32"),int64:s(()=>b0,"int64"),intersection:s(()=>ri,"intersection"),invertCodec:s(()=>fl,"invertCodec"),ipv4:s(()=>t0,"ipv4"),ipv6:s(()=>n0,"ipv6"),iso:s(()=>So,"iso"),json:s(()=>xl,"json"),jwt:s(()=>d0,"jwt"),keyof:s(()=>N0,"keyof"),ksuid:s(()=>e0,"ksuid"),lazy:s(()=>fi,"lazy"),length:s(()=>Yt,"length"),literal:s(()=>Q0,"literal"),locales:s(()=>za,"locales"),looseObject:s(()=>T0,"looseObject"),looseRecord:s(()=>V0,"looseRecord"),lowercase:s(()=>Hu,"lowercase"),lt:s(()=>He,"lt"),lte:s(()=>Ie,"lte"),mac:s(()=>r0,"mac"),map:s(()=>G0,"map"),maxLength:s(()=>Xt,"maxLength"),maxSize:s(()=>Ct,"maxSize"),meta:s(()=>nv,"meta"),mime:s(()=>tr,"mime"),minLength:s(()=>st,"minLength"),minSize:s(()=>Ye,"minSize"),multipleOf:s(()=>$t,"multipleOf"),nan:s(()=>pl,"nan"),nanoid:s(()=>Ko,"nanoid"),nativeEnum:s(()=>X0,"nativeEnum"),negative:s(()=>Sn,"negative"),never:s(()=>gr,"never"),nonnegative:s(()=>zn,"nonnegative"),nonoptional:s(()=>ci,"nonoptional"),nonpositive:s(()=>Fn,"nonpositive"),normalize:s(()=>ur,"normalize"),null:s(()=>ti,"null"),nullable:s(()=>au,"nullable"),nullish:s(()=>il,"nullish"),number:s(()=>Yn,"number"),object:s(()=>O0,"object"),optional:s(()=>su,"optional"),overwrite:s(()=>Ze,"overwrite"),parse:s(()=>Lh,"parse"),parseAsync:s(()=>Jh,"parseAsync"),partialRecord:s(()=>J0,"partialRecord"),pipe:s(()=>wr,"pipe"),positive:s(()=>In,"positive"),prefault:s(()=>li,"prefault"),preprocess:s(()=>kl,"preprocess"),prettifyError:s(()=>Zs,"prettifyError"),promise:s(()=>Dl,"promise"),property:s(()=>jn,"property"),readonly:s(()=>mi,"readonly"),record:s(()=>ii,"record"),refine:s(()=>gi,"refine"),regex:s(()=>Ku,"regex"),regexes:s(()=>it,"regexes"),registry:s(()=>ln,"registry"),safeDecode:s(()=>Qh,"safeDecode"),safeDecodeAsync:s(()=>tv,"safeDecodeAsync"),safeEncode:s(()=>Yh,"safeEncode"),safeEncodeAsync:s(()=>ev,"safeEncodeAsync"),safeParse:s(()=>Vh,"safeParse"),safeParseAsync:s(()=>Wh,"safeParseAsync"),set:s(()=>H0,"set"),setErrorMap:s(()=>sv,"setErrorMap"),size:s(()=>Ht,"size"),slugify:s(()=>sr,"slugify"),startsWith:s(()=>Qu,"startsWith"),strictObject:s(()=>R0,"strictObject"),string:s(()=>tu,"string"),stringFormat:s(()=>c0,"stringFormat"),stringbool:s(()=>iv,"stringbool"),success:s(()=>ll,"success"),superRefine:s(()=>hi,"superRefine"),symbol:s(()=>B0,"symbol"),templateLiteral:s(()=>yl,"templateLiteral"),toJSONSchema:s(()=>Io,"toJSONSchema"),toLowerCase:s(()=>nr,"toLowerCase"),toUpperCase:s(()=>ir,"toUpperCase"),transform:s(()=>br,"transform"),treeifyError:s(()=>Ps,"treeifyError"),trim:s(()=>rr,"trim"),tuple:s(()=>ni,"tuple"),uint32:s(()=>y0,"uint32"),uint64:s(()=>D0,"uint64"),ulid:s(()=>Yo,"ulid"),undefined:s(()=>C0,"undefined"),union:s(()=>yr,"union"),unknown:s(()=>at,"unknown"),uppercase:s(()=>Xu,"uppercase"),url:s(()=>Vo,"url"),util:s(()=>Q,"util"),uuid:s(()=>Zo,"uuid"),uuidv4:s(()=>qo,"uuidv4"),uuidv6:s(()=>Lo,"uuidv6"),uuidv7:s(()=>Jo,"uuidv7"),void:s(()=>F0,"void"),xid:s(()=>Qo,"xid"),xor:s(()=>P0,"xor")});var Wp={};Ge(Wp,{$ZodAny:s(()=>ef,"$ZodAny"),$ZodArray:s(()=>sf,"$ZodArray"),$ZodAsyncError:s(()=>Dt,"$ZodAsyncError"),$ZodBase64:s(()=>L4,"$ZodBase64"),$ZodBase64URL:s(()=>J4,"$ZodBase64URL"),$ZodBigInt:s(()=>pa,"$ZodBigInt"),$ZodBigIntFormat:s(()=>H4,"$ZodBigIntFormat"),$ZodBoolean:s(()=>ca,"$ZodBoolean"),$ZodCIDRv4:s(()=>Z4,"$ZodCIDRv4"),$ZodCIDRv6:s(()=>q4,"$ZodCIDRv6"),$ZodCUID:s(()=>I4,"$ZodCUID"),$ZodCUID2:s(()=>S4,"$ZodCUID2"),$ZodCatch:s(()=>Cf,"$ZodCatch"),$ZodCheck:s(()=>oe,"$ZodCheck"),$ZodCheckBigIntFormat:s(()=>s4,"$ZodCheckBigIntFormat"),$ZodCheckEndsWith:s(()=>y4,"$ZodCheckEndsWith"),$ZodCheckGreaterThan:s(()=>sa,"$ZodCheckGreaterThan"),$ZodCheckIncludes:s(()=>h4,"$ZodCheckIncludes"),$ZodCheckLengthEquals:s(()=>p4,"$ZodCheckLengthEquals"),$ZodCheckLessThan:s(()=>ia,"$ZodCheckLessThan"),$ZodCheckLowerCase:s(()=>f4,"$ZodCheckLowerCase"),$ZodCheckMaxLength:s(()=>d4,"$ZodCheckMaxLength"),$ZodCheckMaxSize:s(()=>a4,"$ZodCheckMaxSize"),$ZodCheckMimeType:s(()=>b4,"$ZodCheckMimeType"),$ZodCheckMinLength:s(()=>c4,"$ZodCheckMinLength"),$ZodCheckMinSize:s(()=>o4,"$ZodCheckMinSize"),$ZodCheckMultipleOf:s(()=>n4,"$ZodCheckMultipleOf"),$ZodCheckNumberFormat:s(()=>i4,"$ZodCheckNumberFormat"),$ZodCheckOverwrite:s(()=>D4,"$ZodCheckOverwrite"),$ZodCheckProperty:s(()=>E4,"$ZodCheckProperty"),$ZodCheckRegex:s(()=>m4,"$ZodCheckRegex"),$ZodCheckSizeEquals:s(()=>l4,"$ZodCheckSizeEquals"),$ZodCheckStartsWith:s(()=>v4,"$ZodCheckStartsWith"),$ZodCheckStringFormat:s(()=>Pu,"$ZodCheckStringFormat"),$ZodCheckUpperCase:s(()=>g4,"$ZodCheckUpperCase"),$ZodCodec:s(()=>Ia,"$ZodCodec"),$ZodCustom:s(()=>zf,"$ZodCustom"),$ZodCustomStringFormat:s(()=>G4,"$ZodCustomStringFormat"),$ZodDate:s(()=>nf,"$ZodDate"),$ZodDefault:s(()=>Df,"$ZodDefault"),$ZodDiscriminatedUnion:s(()=>df,"$ZodDiscriminatedUnion"),$ZodE164:s(()=>V4,"$ZodE164"),$ZodEmail:s(()=>x4,"$ZodEmail"),$ZodEmoji:s(()=>A4,"$ZodEmoji"),$ZodEncodeError:s(()=>Qr,"$ZodEncodeError"),$ZodEnum:s(()=>gf,"$ZodEnum"),$ZodError:s(()=>Ms,"$ZodError"),$ZodExactOptional:s(()=>Ef,"$ZodExactOptional"),$ZodFile:s(()=>vf,"$ZodFile"),$ZodFunction:s(()=>If,"$ZodFunction"),$ZodGUID:s(()=>$4,"$ZodGUID"),$ZodIPv4:s(()=>M4,"$ZodIPv4"),$ZodIPv6:s(()=>P4,"$ZodIPv6"),$ZodISODate:s(()=>O4,"$ZodISODate"),$ZodISODateTime:s(()=>N4,"$ZodISODateTime"),$ZodISODuration:s(()=>T4,"$ZodISODuration"),$ZodISOTime:s(()=>R4,"$ZodISOTime"),$ZodIntersection:s(()=>cf,"$ZodIntersection"),$ZodJWT:s(()=>W4,"$ZodJWT"),$ZodKSUID:s(()=>j4,"$ZodKSUID"),$ZodLazy:s(()=>Ff,"$ZodLazy"),$ZodLiteral:s(()=>hf,"$ZodLiteral"),$ZodMAC:s(()=>U4,"$ZodMAC"),$ZodMap:s(()=>mf,"$ZodMap"),$ZodNaN:s(()=>xf,"$ZodNaN"),$ZodNanoID:s(()=>_4,"$ZodNanoID"),$ZodNever:s(()=>uf,"$ZodNever"),$ZodNonOptional:s(()=>Bf,"$ZodNonOptional"),$ZodNull:s(()=>Q4,"$ZodNull"),$ZodNullable:s(()=>bf,"$ZodNullable"),$ZodNumber:s(()=>da,"$ZodNumber"),$ZodNumberFormat:s(()=>K4,"$ZodNumberFormat"),$ZodObject:s(()=>af,"$ZodObject"),$ZodObjectJIT:s(()=>of,"$ZodObjectJIT"),$ZodOptional:s(()=>xa,"$ZodOptional"),$ZodPipe:s(()=>_a,"$ZodPipe"),$ZodPrefault:s(()=>wf,"$ZodPrefault"),$ZodPreprocess:s(()=>kf,"$ZodPreprocess"),$ZodPromise:s(()=>Sf,"$ZodPromise"),$ZodReadonly:s(()=>Af,"$ZodReadonly"),$ZodRealError:s(()=>_e,"$ZodRealError"),$ZodRecord:s(()=>pf,"$ZodRecord"),$ZodRegistry:s(()=>Fg,"$ZodRegistry"),$ZodSet:s(()=>ff,"$ZodSet"),$ZodString:s(()=>Uu,"$ZodString"),$ZodStringFormat:s(()=>se,"$ZodStringFormat"),$ZodSuccess:s(()=>$f,"$ZodSuccess"),$ZodSymbol:s(()=>X4,"$ZodSymbol"),$ZodTemplateLiteral:s(()=>_f,"$ZodTemplateLiteral"),$ZodTransform:s(()=>yf,"$ZodTransform"),$ZodTuple:s(()=>Ea,"$ZodTuple"),$ZodType:s(()=>K,"$ZodType"),$ZodULID:s(()=>F4,"$ZodULID"),$ZodURL:s(()=>k4,"$ZodURL"),$ZodUUID:s(()=>C4,"$ZodUUID"),$ZodUndefined:s(()=>Y4,"$ZodUndefined"),$ZodUnion:s(()=>an,"$ZodUnion"),$ZodUnknown:s(()=>tf,"$ZodUnknown"),$ZodVoid:s(()=>rf,"$ZodVoid"),$ZodXID:s(()=>z4,"$ZodXID"),$ZodXor:s(()=>lf,"$ZodXor"),$brand:s(()=>Hp,"$brand"),$constructor:s(()=>B,"$constructor"),$input:s(()=>Sg,"$input"),$output:s(()=>Ig,"$output"),Doc:s(()=>w4,"Doc"),JSONSchema:s(()=>Z5,"JSONSchema"),JSONSchemaGenerator:s(()=>U5,"JSONSchemaGenerator"),NEVER:s(()=>Kp,"NEVER"),TimePrecision:s(()=>zg,"TimePrecision"),_any:s(()=>co,"_any"),_array:s(()=>yo,"_array"),_base64:s(()=>xn,"_base64"),_base64url:s(()=>kn,"_base64url"),_bigint:s(()=>ro,"_bigint"),_boolean:s(()=>to,"_boolean"),_catch:s(()=>Xg,"_catch"),_check:s(()=>Bo,"_check"),_cidrv4:s(()=>$n,"_cidrv4"),_cidrv6:s(()=>Cn,"_cidrv6"),_coercedBigint:s(()=>no,"_coercedBigint"),_coercedBoolean:s(()=>uo,"_coercedBoolean"),_coercedDate:s(()=>ho,"_coercedDate"),_coercedNumber:s(()=>Ka,"_coercedNumber"),_coercedString:s(()=>Za,"_coercedString"),_cuid:s(()=>vn,"_cuid"),_cuid2:s(()=>yn,"_cuid2"),_custom:s(()=>bo,"_custom"),_date:s(()=>go,"_date"),_decode:s(()=>Vs,"_decode"),_decodeAsync:s(()=>Gs,"_decodeAsync"),_default:s(()=>Gg,"_default"),_discriminatedUnion:s(()=>Og,"_discriminatedUnion"),_e164:s(()=>An,"_e164"),_email:s(()=>dn,"_email"),_emoji:s(()=>gn,"_emoji"),_encode:s(()=>Js,"_encode"),_encodeAsync:s(()=>Ws,"_encodeAsync"),_endsWith:s(()=>er,"_endsWith"),_enum:s(()=>Zg,"_enum"),_file:s(()=>Eo,"_file"),_float32:s(()=>Xa,"_float32"),_float64:s(()=>Ya,"_float64"),_gt:s(()=>Xe,"_gt"),_gte:s(()=>we,"_gte"),_guid:s(()=>Wu,"_guid"),_includes:s(()=>Yu,"_includes"),_int:s(()=>Ha,"_int"),_int32:s(()=>Qa,"_int32"),_int64:s(()=>io,"_int64"),_intersection:s(()=>Rg,"_intersection"),_ipv4:s(()=>wn,"_ipv4"),_ipv6:s(()=>Bn,"_ipv6"),_isoDate:s(()=>Ja,"_isoDate"),_isoDateTime:s(()=>La,"_isoDateTime"),_isoDuration:s(()=>Wa,"_isoDuration"),_isoTime:s(()=>Va,"_isoTime"),_jwt:s(()=>_n,"_jwt"),_ksuid:s(()=>Dn,"_ksuid"),_lazy:s(()=>th,"_lazy"),_length:s(()=>Yt,"_length"),_literal:s(()=>Lg,"_literal"),_lowercase:s(()=>Hu,"_lowercase"),_lt:s(()=>He,"_lt"),_lte:s(()=>Ie,"_lte"),_mac:s(()=>qa,"_mac"),_map:s(()=>Pg,"_map"),_max:s(()=>Ie,"_max"),_maxLength:s(()=>Xt,"_maxLength"),_maxSize:s(()=>Ct,"_maxSize"),_mime:s(()=>tr,"_mime"),_min:s(()=>we,"_min"),_minLength:s(()=>st,"_minLength"),_minSize:s(()=>Ye,"_minSize"),_multipleOf:s(()=>$t,"_multipleOf"),_nan:s(()=>vo,"_nan"),_nanoid:s(()=>hn,"_nanoid"),_nativeEnum:s(()=>qg,"_nativeEnum"),_negative:s(()=>Sn,"_negative"),_never:s(()=>mo,"_never"),_nonnegative:s(()=>zn,"_nonnegative"),_nonoptional:s(()=>Kg,"_nonoptional"),_nonpositive:s(()=>Fn,"_nonpositive"),_normalize:s(()=>ur,"_normalize"),_null:s(()=>lo,"_null"),_nullable:s(()=>Wg,"_nullable"),_number:s(()=>Ga,"_number"),_optional:s(()=>Vg,"_optional"),_overwrite:s(()=>Ze,"_overwrite"),_parse:s(()=>Ou,"_parse"),_parseAsync:s(()=>Ru,"_parseAsync"),_pipe:s(()=>Yg,"_pipe"),_positive:s(()=>In,"_positive"),_promise:s(()=>uh,"_promise"),_property:s(()=>jn,"_property"),_readonly:s(()=>Qg,"_readonly"),_record:s(()=>Mg,"_record"),_refine:s(()=>Do,"_refine"),_regex:s(()=>Ku,"_regex"),_safeDecode:s(()=>Hs,"_safeDecode"),_safeDecodeAsync:s(()=>Ys,"_safeDecodeAsync"),_safeEncode:s(()=>Ks,"_safeEncode"),_safeEncodeAsync:s(()=>Xs,"_safeEncodeAsync"),_safeParse:s(()=>Tu,"_safeParse"),_safeParseAsync:s(()=>Mu,"_safeParseAsync"),_set:s(()=>Ug,"_set"),_size:s(()=>Ht,"_size"),_slugify:s(()=>sr,"_slugify"),_startsWith:s(()=>Qu,"_startsWith"),_string:s(()=>Ua,"_string"),_stringFormat:s(()=>Qt,"_stringFormat"),_stringbool:s(()=>xo,"_stringbool"),_success:s(()=>Hg,"_success"),_superRefine:s(()=>wo,"_superRefine"),_symbol:s(()=>ao,"_symbol"),_templateLiteral:s(()=>eh,"_templateLiteral"),_toLowerCase:s(()=>nr,"_toLowerCase"),_toUpperCase:s(()=>ir,"_toUpperCase"),_transform:s(()=>Jg,"_transform"),_trim:s(()=>rr,"_trim"),_tuple:s(()=>Tg,"_tuple"),_uint32:s(()=>eo,"_uint32"),_uint64:s(()=>so,"_uint64"),_ulid:s(()=>En,"_ulid"),_undefined:s(()=>oo,"_undefined"),_union:s(()=>jg,"_union"),_unknown:s(()=>po,"_unknown"),_uppercase:s(()=>Xu,"_uppercase"),_url:s(()=>Gu,"_url"),_uuid:s(()=>cn,"_uuid"),_uuidv4:s(()=>pn,"_uuidv4"),_uuidv6:s(()=>mn,"_uuidv6"),_uuidv7:s(()=>fn,"_uuidv7"),_void:s(()=>fo,"_void"),_xid:s(()=>bn,"_xid"),_xor:s(()=>Ng,"_xor"),clone:s(()=>ke,"clone"),config:s(()=>he,"config"),createStandardJSONSchemaMethod:s(()=>ar,"createStandardJSONSchemaMethod"),createToJSONSchemaMethod:s(()=>rh,"createToJSONSchemaMethod"),decode:s(()=>dE,"decode"),decodeAsync:s(()=>pE,"decodeAsync"),describe:s(()=>$o,"describe"),encode:s(()=>lE,"encode"),encodeAsync:s(()=>cE,"encodeAsync"),extractDefs:s(()=>kt,"extractDefs"),finalize:s(()=>At,"finalize"),flattenError:s(()=>rn,"flattenError"),formatError:s(()=>nn,"formatError"),globalConfig:s(()=>Iu,"globalConfig"),globalRegistry:s(()=>Ne,"globalRegistry"),initializeContext:s(()=>xt,"initializeContext"),isValidBase64:s(()=>sn,"isValidBase64"),isValidBase64URL:s(()=>oa,"isValidBase64URL"),isValidJWT:s(()=>la,"isValidJWT"),locales:s(()=>za,"locales"),meta:s(()=>Co,"meta"),parse:s(()=>qs,"parse"),parseAsync:s(()=>Ls,"parseAsync"),prettifyError:s(()=>Zs,"prettifyError"),process:s(()=>re,"process"),regexes:s(()=>it,"regexes"),registry:s(()=>ln,"registry"),safeDecode:s(()=>fE,"safeDecode"),safeDecodeAsync:s(()=>hE,"safeDecodeAsync"),safeEncode:s(()=>mE,"safeEncode"),safeEncodeAsync:s(()=>gE,"safeEncodeAsync"),safeParse:s(()=>km,"safeParse"),safeParseAsync:s(()=>Am,"safeParseAsync"),toDotPath:s(()=>Us,"toDotPath"),toJSONSchema:s(()=>Io,"toJSONSchema"),treeifyError:s(()=>Ps,"treeifyError"),util:s(()=>Q,"util"),version:s(()=>B4,"version")});var Gp,Kp=Object.freeze({status:"aborted"});function B(e,t,r){function i(l,d){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,d);let p=a.prototype,c=Object.keys(p);for(let f=0;f<c.length;f++){let g=c[f];g in l||(l[g]=p[g].bind(l))}}s(i,"o"),o(i,"init");let u=r?.Parent??Object;class n extends u{static{s(this,"i")}static{o(this,"Definition")}}Object.defineProperty(n,"name",{value:e});function a(l){var d;let p=r?.Parent?new n:this;i(p,l),(d=p._zod).deferred??(d.deferred=[]);for(let c of p._zod.deferred)c();return p}return s(a,"s"),o(a,"_"),Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(a,"name",{value:e}),a}s(B,"$"),o(B,"$constructor");var Hp=Symbol("zod_brand"),Dt=class extends Error{static{s(this,"Ge")}static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Qr=class extends Error{static{s(this,"dt")}static{o(this,"$ZodEncodeError")}constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Gp=globalThis).__zod_globalConfig??(Gp.__zod_globalConfig={});var Iu=globalThis.__zod_globalConfig;function he(e){return e&&Object.assign(Iu,e),Iu}s(he,"ue"),o(he,"config");var Q={};Ge(Q,{BIGINT_FORMAT_RANGES:s(()=>mm,"BIGINT_FORMAT_RANGES"),Class:s(()=>oE,"Class"),NUMBER_FORMAT_RANGES:s(()=>pm,"NUMBER_FORMAT_RANGES"),aborted:s(()=>nt,"aborted"),allowsEval:s(()=>om,"allowsEval"),assert:s(()=>tm,"assert"),assertEqual:s(()=>Xp,"assertEqual"),assertIs:s(()=>Qp,"assertIs"),assertNever:s(()=>em,"assertNever"),assertNotEqual:s(()=>Yp,"assertNotEqual"),assignProp:s(()=>Ke,"assignProp"),base64ToUint8Array:s(()=>Rs,"base64ToUint8Array"),base64urlToUint8Array:s(()=>wm,"base64urlToUint8Array"),cached:s(()=>Jt,"cached"),captureStackTrace:s(()=>zs,"captureStackTrace"),cleanEnum:s(()=>Dm,"cleanEnum"),cleanRegex:s(()=>Fu,"cleanRegex"),clone:s(()=>ke,"clone"),cloneDef:s(()=>nm,"cloneDef"),createTransparentProxy:s(()=>cm,"createTransparentProxy"),defineLazy:s(()=>Y,"defineLazy"),esc:s(()=>tn,"esc"),escapeRegex:s(()=>Ue,"escapeRegex"),explicitlyAborted:s(()=>Os,"explicitlyAborted"),extend:s(()=>hm,"extend"),finalizeIssue:s(()=>$e,"finalizeIssue"),floatSafeRemainder:s(()=>Ss,"floatSafeRemainder"),getElementAtPath:s(()=>im,"getElementAtPath"),getEnumValues:s(()=>en,"getEnumValues"),getLengthableOrigin:s(()=>ju,"getLengthableOrigin"),getParsedType:s(()=>aE,"getParsedType"),getSizableOrigin:s(()=>zu,"getSizableOrigin"),hexToUint8Array:s(()=>$m,"hexToUint8Array"),isObject:s(()=>wt,"isObject"),isPlainObject:s(()=>rt,"isPlainObject"),issue:s(()=>Nu,"issue"),joinValues:s(()=>z,"joinValues"),jsonStringifyReplacer:s(()=>Su,"jsonStringifyReplacer"),merge:s(()=>ym,"merge"),mergeDefs:s(()=>Pe,"mergeDefs"),normalizeParams:s(()=>T,"normalizeParams"),nullish:s(()=>ut,"nullish"),numKeys:s(()=>lm,"numKeys"),objectClone:s(()=>rm,"objectClone"),omit:s(()=>gm,"omit"),optionalKeys:s(()=>Ns,"optionalKeys"),parsedType:s(()=>G,"parsedType"),partial:s(()=>Em,"partial"),pick:s(()=>fm,"pick"),prefixIssues:s(()=>Ae,"prefixIssues"),primitiveTypes:s(()=>dm,"primitiveTypes"),promiseAllObject:s(()=>sm,"promiseAllObject"),propertyKeyTypes:s(()=>un,"propertyKeyTypes"),randomString:s(()=>am,"randomString"),required:s(()=>bm,"required"),safeExtend:s(()=>vm,"safeExtend"),shallowClone:s(()=>js,"shallowClone"),slugify:s(()=>Fs,"slugify"),stringifyPrimitive:s(()=>V,"stringifyPrimitive"),uint8ArrayToBase64:s(()=>Ts,"uint8ArrayToBase64"),uint8ArrayToBase64url:s(()=>Bm,"uint8ArrayToBase64url"),uint8ArrayToHex:s(()=>Cm,"uint8ArrayToHex"),unwrapMessage:s(()=>Vt,"unwrapMessage")});function Xp(e){return e}s(Xp,"E_"),o(Xp,"assertEqual");function Yp(e){return e}s(Yp,"A_"),o(Yp,"assertNotEqual");function Qp(e){}s(Qp,"z_"),o(Qp,"assertIs");function em(e){throw new Error("Unexpected value in exhaustive check")}s(em,"j_"),o(em,"assertNever");function tm(e){}s(tm,"O_"),o(tm,"assert");function en(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}s(en,"sn"),o(en,"getEnumValues");function z(e,t="|"){return e.map(r=>V(r)).join(t)}s(z,"I"),o(z,"joinValues");function Su(e,t){return typeof t=="bigint"?t.toString():t}s(Su,"nr"),o(Su,"jsonStringifyReplacer");function Jt(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}s(Jt,"or"),o(Jt,"cached");function ut(e){return e==null}s(ut,"pt"),o(ut,"nullish");function Fu(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}s(Fu,"an"),o(Fu,"cleanRegex");function Ss(e,t){let r=e/t,i=Math.round(r),u=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<u?0:r-i}s(Ss,"ja"),o(Ss,"floatSafeRemainder");var um=Symbol("evaluating");function Y(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==um)return i===void 0&&(i=um,i=r()),i},set(u){Object.defineProperty(e,t,{value:u})},configurable:!0})}s(Y,"Y"),o(Y,"defineLazy");function rm(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}s(rm,"N_"),o(rm,"objectClone");function Ke(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}s(Ke,"ft"),o(Ke,"assignProp");function Pe(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}s(Pe,"st"),o(Pe,"mergeDefs");function nm(e){return Pe(e._zod.def)}s(nm,"P_"),o(nm,"cloneDef");function im(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}s(im,"D_"),o(im,"getElementAtPath");function sm(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let u={};for(let n=0;n<t.length;n++)u[t[n]]=i[n];return u})}s(sm,"M_"),o(sm,"promiseAllObject");function am(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}s(am,"C_"),o(am,"randomString");function tn(e){return JSON.stringify(e)}s(tn,"Eo"),o(tn,"esc");function Fs(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}s(Fs,"Oa"),o(Fs,"slugify");var zs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function wt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}s(wt,"Pt"),o(wt,"isObject");var om=Jt(()=>{if(Iu.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function rt(e){if(wt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(wt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}s(rt,"mt"),o(rt,"isPlainObject");function js(e){return rt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}s(js,"Pa"),o(js,"shallowClone");function lm(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}s(lm,"U_"),o(lm,"numKeys");var aE=o(e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},"getParsedType"),un=new Set(["string","number","symbol"]),dm=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ue(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(Ue,"Fe"),o(Ue,"escapeRegex");function ke(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}s(ke,"_e"),o(ke,"clone");function T(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:o(()=>t.error,"error")}:t}s(T,"L"),o(T,"normalizeParams");function cm(e){let t;return new Proxy({},{get(r,i,u){return t??(t=e()),Reflect.get(t,i,u)},set(r,i,u,n){return t??(t=e()),Reflect.set(t,i,u,n)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,u){return t??(t=e()),Reflect.defineProperty(t,i,u)}})}s(cm,"F_"),o(cm,"createTransparentProxy");function V(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}s(V,"P"),o(V,"stringifyPrimitive");function Ns(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}s(Ns,"Ma"),o(Ns,"optionalKeys");var pm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},mm={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function fm(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let u=Pe(e._zod.def,{get shape(){let n={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(n[a]=r.shape[a])}return Ke(this,"shape",n),n},checks:[]});return ke(e,u)}s(fm,"Z_"),o(fm,"pick");function gm(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let u=Pe(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete n[a]}return Ke(this,"shape",n),n},checks:[]});return ke(e,u)}s(gm,"B_"),o(gm,"omit");function hm(e,t){if(!rt(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let u=e._zod.def.shape;for(let n in t)if(Object.getOwnPropertyDescriptor(u,n)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Pe(e._zod.def,{get shape(){let u={...e._zod.def.shape,...t};return Ke(this,"shape",u),u}});return ke(e,i)}s(hm,"q_"),o(hm,"extend");function vm(e,t){if(!rt(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Pe(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ke(this,"shape",i),i}});return ke(e,r)}s(vm,"V_"),o(vm,"safeExtend");function ym(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Pe(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Ke(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ke(e,r)}s(ym,"G_"),o(ym,"merge");function Em(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let u=Pe(t._zod.def,{get shape(){let n=t._zod.def.shape,a={...n};if(r)for(let l in r){if(!(l in n))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(a[l]=e?new e({type:"optional",innerType:n[l]}):n[l])}else for(let l in n)a[l]=e?new e({type:"optional",innerType:n[l]}):n[l];return Ke(this,"shape",a),a},checks:[]});return ke(t,u)}s(Em,"J_"),o(Em,"partial");function bm(e,t,r){let i=Pe(t._zod.def,{get shape(){let u=t._zod.def.shape,n={...u};if(r)for(let a in r){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(n[a]=new e({type:"nonoptional",innerType:u[a]}))}else for(let a in u)n[a]=new e({type:"nonoptional",innerType:u[a]});return Ke(this,"shape",n),n}});return ke(t,i)}s(bm,"K_"),o(bm,"required");function nt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}s(nt,"gt"),o(nt,"aborted");function Os(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}s(Os,"La"),o(Os,"explicitlyAborted");function Ae(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}s(Ae,"Ee"),o(Ae,"prefixIssues");function Vt(e){return typeof e=="string"?e:e?.message}s(Vt,"on"),o(Vt,"unwrapMessage");function $e(e,t,r){let i=e.message?e.message:Vt(e.inst?._zod.def?.error?.(e))??Vt(t?.error?.(e))??Vt(r.customError?.(e))??Vt(r.localeError?.(e))??"Invalid input",{inst:u,continue:n,input:a,...l}=e;return l.path??(l.path=[]),l.message=i,t?.reportInput&&(l.input=a),l}s($e,"ke"),o($e,"finalizeIssue");function zu(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}s(zu,"un"),o(zu,"getSizableOrigin");function ju(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}s(ju,"ln"),o(ju,"getLengthableOrigin");function G(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}s(G,"D"),o(G,"parsedType");function Nu(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}s(Nu,"ir"),o(Nu,"issue");function Dm(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}s(Dm,"W_"),o(Dm,"cleanEnum");function Rs(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}s(Rs,"jy"),o(Rs,"base64ToUint8Array");function Ts(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}s(Ts,"Oy"),o(Ts,"uint8ArrayToBase64");function wm(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Rs(t+r)}s(wm,"X_"),o(wm,"base64urlToUint8Array");function Bm(e){return Ts(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}s(Bm,"H_"),o(Bm,"uint8ArrayToBase64url");function $m(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}s($m,"Y_"),o($m,"hexToUint8Array");function Cm(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}s(Cm,"Q_"),o(Cm,"uint8ArrayToHex");var oE=class{static{s(this,"za")}static{o(this,"Class")}constructor(...e){}},xm=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Su,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Ms=B("$ZodError",xm),_e=B("$ZodError",xm,{Parent:Error});function rn(e,t=r=>r.message){let r={},i=[];for(let u of e.issues)u.path.length>0?(r[u.path[0]]=r[u.path[0]]||[],r[u.path[0]].push(t(u))):i.push(t(u));return{formErrors:i,fieldErrors:r}}s(rn,"pn"),o(rn,"flattenError");function nn(e,t=r=>r.message){let r={_errors:[]},i=o((u,n=[])=>{for(let a of u.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(l=>i({issues:l},[...n,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...n,...a.path]);else{let l=[...n,...a.path];if(l.length===0)r._errors.push(t(a));else{let d=r,p=0;for(;p<l.length;){let c=l[p];p===l.length-1?(d[c]=d[c]||{_errors:[]},d[c]._errors.push(t(a))):d[c]=d[c]||{_errors:[]},d=d[c],p++}}}},"processError");return i(e),r}s(nn,"fn"),o(nn,"formatError");function Ps(e,t=r=>r.message){let r={errors:[]},i=o((u,n=[])=>{var a,l;for(let d of u.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(p=>i({issues:p},[...n,...d.path]));else if(d.code==="invalid_key")i({issues:d.issues},[...n,...d.path]);else if(d.code==="invalid_element")i({issues:d.issues},[...n,...d.path]);else{let p=[...n,...d.path];if(p.length===0){r.errors.push(t(d));continue}let c=r,f=0;for(;f<p.length;){let g=p[f],m=f===p.length-1;typeof g=="string"?(c.properties??(c.properties={}),(a=c.properties)[g]??(a[g]={errors:[]}),c=c.properties[g]):(c.items??(c.items=[]),(l=c.items)[g]??(l[g]={errors:[]}),c=c.items[g]),m&&c.errors.push(t(d)),f++}}},"processError");return i(e),r}s(Ps,"Fa"),o(Ps,"treeifyError");function Us(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}s(Us,"Py"),o(Us,"toDotPath");function Zs(e){let t=[],r=[...e.issues].sort((i,u)=>(i.path??[]).length-(u.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${Us(i.path)}`);return t.join(`
|
|
2
|
+
`)}s(Zs,"Za"),o(Zs,"prettifyError");var Ou=o(e=>(t,r,i,u)=>{let n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new Dt;if(a.issues.length){let l=new(u?.Err??e)(a.issues.map(d=>$e(d,n,he())));throw zs(l,u?.callee),l}return a.value},"_parse"),qs=Ou(_e),Ru=o(e=>async(t,r,i,u)=>{let n=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let l=new(u?.Err??e)(a.issues.map(d=>$e(d,n,he())));throw zs(l,u?.callee),l}return a.value},"_parseAsync"),Ls=Ru(_e),Tu=o(e=>(t,r,i)=>{let u=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},u);if(n instanceof Promise)throw new Dt;return n.issues.length?{success:!1,error:new(e??Ms)(n.issues.map(a=>$e(a,u,he())))}:{success:!0,data:n.value}},"_safeParse"),km=Tu(_e),Mu=o(e=>async(t,r,i)=>{let u=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},u);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(a=>$e(a,u,he())))}:{success:!0,data:n.value}},"_safeParseAsync"),Am=Mu(_e),Js=o(e=>(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Ou(e)(t,r,u)},"_encode"),lE=Js(_e),Vs=o(e=>(t,r,i)=>Ou(e)(t,r,i),"_decode"),dE=Vs(_e),Ws=o(e=>async(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Ru(e)(t,r,u)},"_encodeAsync"),cE=Ws(_e),Gs=o(e=>async(t,r,i)=>Ru(e)(t,r,i),"_decodeAsync"),pE=Gs(_e),Ks=o(e=>(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Tu(e)(t,r,u)},"_safeEncode"),mE=Ks(_e),Hs=o(e=>(t,r,i)=>Tu(e)(t,r,i),"_safeDecode"),fE=Hs(_e),Xs=o(e=>async(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Mu(e)(t,r,u)},"_safeEncodeAsync"),gE=Xs(_e),Ys=o(e=>async(t,r,i)=>Mu(e)(t,r,i),"_safeDecodeAsync"),hE=Ys(_e),it={};Ge(it,{base64:s(()=>Lm,"base64"),base64url:s(()=>ea,"base64url"),bigint:s(()=>Hm,"bigint"),boolean:s(()=>Ym,"boolean"),browserEmail:s(()=>$E,"browserEmail"),cidrv4:s(()=>Zm,"cidrv4"),cidrv6:s(()=>qm,"cidrv6"),cuid:s(()=>_m,"cuid"),cuid2:s(()=>Im,"cuid2"),date:s(()=>Gm,"date"),datetime:s(()=>ra,"datetime"),domain:s(()=>kE,"domain"),duration:s(()=>Nm,"duration"),e164:s(()=>Vm,"e164"),email:s(()=>Rm,"email"),emoji:s(()=>Qs,"emoji"),extendedDuration:s(()=>vE,"extendedDuration"),guid:s(()=>Om,"guid"),hex:s(()=>AE,"hex"),hostname:s(()=>xE,"hostname"),html5Email:s(()=>DE,"html5Email"),httpProtocol:s(()=>Jm,"httpProtocol"),idnEmail:s(()=>BE,"idnEmail"),integer:s(()=>Xm,"integer"),ipv4:s(()=>Mm,"ipv4"),ipv6:s(()=>Pm,"ipv6"),ksuid:s(()=>zm,"ksuid"),lowercase:s(()=>t4,"lowercase"),mac:s(()=>Um,"mac"),md5_base64:s(()=>IE,"md5_base64"),md5_base64url:s(()=>SE,"md5_base64url"),md5_hex:s(()=>_E,"md5_hex"),nanoid:s(()=>jm,"nanoid"),null:s(()=>Qm,"null"),number:s(()=>na,"number"),rfc5322Email:s(()=>wE,"rfc5322Email"),sha1_base64:s(()=>zE,"sha1_base64"),sha1_base64url:s(()=>jE,"sha1_base64url"),sha1_hex:s(()=>FE,"sha1_hex"),sha256_base64:s(()=>OE,"sha256_base64"),sha256_base64url:s(()=>RE,"sha256_base64url"),sha256_hex:s(()=>NE,"sha256_hex"),sha384_base64:s(()=>ME,"sha384_base64"),sha384_base64url:s(()=>PE,"sha384_base64url"),sha384_hex:s(()=>TE,"sha384_hex"),sha512_base64:s(()=>ZE,"sha512_base64"),sha512_base64url:s(()=>qE,"sha512_base64url"),sha512_hex:s(()=>UE,"sha512_hex"),string:s(()=>Km,"string"),time:s(()=>ua,"time"),ulid:s(()=>Sm,"ulid"),undefined:s(()=>e4,"undefined"),unicodeEmail:s(()=>Tm,"unicodeEmail"),uppercase:s(()=>u4,"uppercase"),uuid:s(()=>Wt,"uuid"),uuid4:s(()=>yE,"uuid4"),uuid6:s(()=>EE,"uuid6"),uuid7:s(()=>bE,"uuid7"),xid:s(()=>Fm,"xid")});var _m=/^[cC][0-9a-z]{6,}$/,Im=/^[0-9a-z]+$/,Sm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Fm=/^[0-9a-vA-V]{20}$/,zm=/^[A-Za-z0-9]{27}$/,jm=/^[a-zA-Z0-9_-]{21}$/,Nm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,vE=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Om=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Wt=o(e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,"uuid"),yE=Wt(4),EE=Wt(6),bE=Wt(7),Rm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,DE=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,wE=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Tm=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,BE=Tm,$E=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,CE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Qs(){return new RegExp(CE,"u")}s(Qs,"ec"),o(Qs,"emoji");var Mm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Pm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Um=o(e=>{let t=Ue(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},"mac"),Zm=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,qm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ea=/^[A-Za-z0-9_-]*$/,xE=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,kE=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Jm=/^https?$/,Vm=/^\+[1-9]\d{6,14}$/,Wm="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Gm=new RegExp(`^${Wm}$`);function ta(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}s(ta,"Cy"),o(ta,"timeSource");function ua(e){return new RegExp(`^${ta(e)}$`)}s(ua,"lc"),o(ua,"time");function ra(e){let t=ta({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Wm}T(?:${i})$`)}s(ra,"dc"),o(ra,"datetime");var Km=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Hm=/^-?\d+n?$/,Xm=/^-?\d+$/,na=/^-?\d+(?:\.\d+)?$/,Ym=/^(?:true|false)$/i,Qm=/^null$/i,e4=/^undefined$/i,t4=/^[^A-Z]*$/,u4=/^[^a-z]*$/,AE=/^[0-9a-fA-F]*$/;function Gt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}s(Gt,"mn"),o(Gt,"fixedBase64");function Kt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}s(Kt,"gn"),o(Kt,"fixedBase64url");var _E=/^[0-9a-fA-F]{32}$/,IE=Gt(22,"=="),SE=Kt(22),FE=/^[0-9a-fA-F]{40}$/,zE=Gt(27,"="),jE=Kt(27),NE=/^[0-9a-fA-F]{64}$/,OE=Gt(43,"="),RE=Kt(43),TE=/^[0-9a-fA-F]{96}$/,ME=Gt(64,""),PE=Kt(64),UE=/^[0-9a-fA-F]{128}$/,ZE=Gt(86,"=="),qE=Kt(86),oe=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),r4={number:"number",bigint:"bigint",object:"date"},ia=B("$ZodCheckLessThan",(e,t)=>{oe.init(e,t);let r=r4[typeof t.value];e._zod.onattach.push(i=>{let u=i._zod.bag,n=(t.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<n&&(t.inclusive?u.maximum=t.value:u.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),sa=B("$ZodCheckGreaterThan",(e,t)=>{oe.init(e,t);let r=r4[typeof t.value];e._zod.onattach.push(i=>{let u=i._zod.bag,n=(t.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>n&&(t.inclusive?u.minimum=t.value:u.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),n4=B("$ZodCheckMultipleOf",(e,t)=>{oe.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Ss(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),i4=B("$ZodCheckNumberFormat",(e,t)=>{oe.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[u,n]=pm[t.format];e._zod.onattach.push(a=>{let l=a._zod.bag;l.format=t.format,l.minimum=u,l.maximum=n,r&&(l.pattern=Xm)}),e._zod.check=a=>{let l=a.value;if(r){if(!Number.isInteger(l)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}l<u&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:u,inclusive:!0,inst:e,continue:!t.abort}),l>n&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),s4=B("$ZodCheckBigIntFormat",(e,t)=>{oe.init(e,t);let[r,i]=mm[t.format];e._zod.onattach.push(u=>{let n=u._zod.bag;n.format=t.format,n.minimum=r,n.maximum=i}),e._zod.check=u=>{let n=u.value;n<r&&u.issues.push({origin:"bigint",input:n,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),n>i&&u.issues.push({origin:"bigint",input:n,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),a4=B("$ZodCheckMaxSize",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ut(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<u&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let u=i.value;u.size<=t.maximum||i.issues.push({origin:zu(u),code:"too_big",maximum:t.maximum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),o4=B("$ZodCheckMinSize",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ut(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>u&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let u=i.value;u.size>=t.minimum||i.issues.push({origin:zu(u),code:"too_small",minimum:t.minimum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),l4=B("$ZodCheckSizeEquals",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ut(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag;u.minimum=t.size,u.maximum=t.size,u.size=t.size}),e._zod.check=i=>{let u=i.value,n=u.size;if(n===t.size)return;let a=n>t.size;i.issues.push({origin:zu(u),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),d4=B("$ZodCheckMaxLength",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ut(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<u&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let u=i.value;if(u.length<=t.maximum)return;let n=ju(u);i.issues.push({origin:n,code:"too_big",maximum:t.maximum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),c4=B("$ZodCheckMinLength",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ut(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>u&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let u=i.value;if(u.length>=t.minimum)return;let n=ju(u);i.issues.push({origin:n,code:"too_small",minimum:t.minimum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),p4=B("$ZodCheckLengthEquals",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ut(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag;u.minimum=t.length,u.maximum=t.length,u.length=t.length}),e._zod.check=i=>{let u=i.value,n=u.length;if(n===t.length)return;let a=ju(u),l=n>t.length;i.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Pu=B("$ZodCheckStringFormat",(e,t)=>{var r,i;oe.init(e,t),e._zod.onattach.push(u=>{let n=u._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=u=>{t.pattern.lastIndex=0,!t.pattern.test(u.value)&&u.issues.push({origin:"string",code:"invalid_format",format:t.format,input:u.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),m4=B("$ZodCheckRegex",(e,t)=>{Pu.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),f4=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=t4),Pu.init(e,t)}),g4=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=u4),Pu.init(e,t)}),h4=B("$ZodCheckIncludes",(e,t)=>{oe.init(e,t);let r=Ue(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(u=>{let n=u._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(i)}),e._zod.check=u=>{u.value.includes(t.includes,t.position)||u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:u.value,inst:e,continue:!t.abort})}}),v4=B("$ZodCheckStartsWith",(e,t)=>{oe.init(e,t);let r=new RegExp(`^${Ue(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let u=i._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),y4=B("$ZodCheckEndsWith",(e,t)=>{oe.init(e,t);let r=new RegExp(`.*${Ue(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let u=i._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function aa(e,t,r){e.issues.length&&t.issues.push(...Ae(r,e.issues))}s(aa,"Uy"),o(aa,"handleCheckPropertyResult");var E4=B("$ZodCheckProperty",(e,t)=>{oe.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(u=>aa(u,r,t.property));aa(i,r,t.property)}}),b4=B("$ZodCheckMimeType",(e,t)=>{oe.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),D4=B("$ZodCheckOverwrite",(e,t)=>{oe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),w4=class{static{s(this,"hn")}static{o(this,"Doc")}constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split(`
|
|
3
3
|
`).filter(u=>u),r=Math.min(...t.map(u=>u.length-u.trimStart().length)),i=t.map(u=>u.slice(r)).map(u=>" ".repeat(this.indent*2)+u);for(let u of i)this.content.push(u)}compile(){let e=Function,t=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...t,r.join(`
|
|
4
|
-
`))}},B4={major:4,minor:4,patch:3},K=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=B4;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let u of i)for(let n of u._zod.onattach)n(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let u=o((a,l,d)=>{let p=nt(a),c;for(let f of l){if(f._zod.def.when){if(Ns(a)||!f._zod.def.when(a))continue}else if(p)continue;let g=a.issues.length,m=f._zod.check(a);if(m instanceof Promise&&d?.async===!1)throw new Dt;if(c||m instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await m,a.issues.length!==g&&(p||(p=nt(a,g)))});else{if(a.issues.length===g)continue;p||(p=nt(a,g))}}return c?c.then(()=>a):a},"runChecks"),n=o((a,l,d)=>{if(nt(a))return a.aborted=!0,a;let p=u(l,i,d);if(p instanceof Promise){if(d.async===!1)throw new Dt;return p.then(c=>e._zod.parse(c,d))}return e._zod.parse(p,d)},"handleCanaryResult");e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){let p=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return p instanceof Promise?p.then(c=>n(c,a,l)):n(p,a,l)}let d=e._zod.parse(a,l);if(d instanceof Promise){if(l.async===!1)throw new Dt;return d.then(p=>u(p,i,l))}return u(d,i,l)}}Y(e,"~standard",()=>({validate:o(u=>{try{let n=km(e,u);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Am(e,u).then(n=>n.success?{value:n.data}:{issues:n.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Uu=B("$ZodString",(e,t)=>{K.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Km(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),se=B("$ZodStringFormat",(e,t)=>{Pu.init(e,t),Uu.init(e,t)}),$4=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Om),se.init(e,t)}),C4=B("$ZodUUID",(e,t)=>{if(t.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Wt(r))}else t.pattern??(t.pattern=Wt());se.init(e,t)}),x4=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Rm),se.init(e,t)}),k4=B("$ZodURL",(e,t)=>{se.init(e,t),e._zod.check=r=>{try{let i=r.value.trim();if(!t.normalize&&t.protocol?.source===Jm.source&&!/^https?:\/\//i.test(i)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let u=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(u.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=u.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),A4=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ys()),se.init(e,t)}),_4=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=jm),se.init(e,t)}),I4=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=_m),se.init(e,t)}),S4=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Im),se.init(e,t)}),F4=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Sm),se.init(e,t)}),z4=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Fm),se.init(e,t)}),j4=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=zm),se.init(e,t)}),N4=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ua(t)),se.init(e,t)}),O4=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Gm),se.init(e,t)}),R4=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=ta(t)),se.init(e,t)}),T4=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Nm),se.init(e,t)}),M4=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Mm),se.init(e,t),e._zod.bag.format="ipv4"}),P4=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Pm),se.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),U4=B("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Um(t.delimiter)),se.init(e,t),e._zod.bag.format="mac"}),Z4=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Zm),se.init(e,t)}),q4=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=qm),se.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[u,n]=i;if(!n)throw new Error;let a=Number(n);if(`${a}`!==n)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${u}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function sn(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}s(sn,"iu"),o(sn,"isValidBase64");var L4=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Lm),se.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{sn(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function aa(e){if(!Qs.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return sn(r)}s(aa,"rb"),o(aa,"isValidBase64URL");var J4=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Qs),se.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{aa(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),V4=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Vm),se.init(e,t)});function oa(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let u=JSON.parse(atob(i));return!("typ"in u&&u?.typ!=="JWT"||!u.alg||t&&(!("alg"in u)||u.alg!==t))}catch{return!1}}s(oa,"nb"),o(oa,"isValidJWT");var W4=B("$ZodJWT",(e,t)=>{se.init(e,t),e._zod.check=r=>{oa(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),G4=B("$ZodCustomStringFormat",(e,t)=>{se.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),la=B("$ZodNumber",(e,t)=>{K.init(e,t),e._zod.pattern=e._zod.bag.pattern??ra,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let u=r.value;if(typeof u=="number"&&!Number.isNaN(u)&&Number.isFinite(u))return r;let n=typeof u=="number"?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:u,inst:e,...n?{received:n}:{}}),r}}),K4=B("$ZodNumberFormat",(e,t)=>{i4.init(e,t),la.init(e,t)}),da=B("$ZodBoolean",(e,t)=>{K.init(e,t),e._zod.pattern=Ym,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let u=r.value;return typeof u=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),r}}),ca=B("$ZodBigInt",(e,t)=>{K.init(e,t),e._zod.pattern=Hm,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),H4=B("$ZodBigIntFormat",(e,t)=>{s4.init(e,t),ca.init(e,t)}),X4=B("$ZodSymbol",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return typeof u=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:u,inst:e}),r}}),Y4=B("$ZodUndefined",(e,t)=>{K.init(e,t),e._zod.pattern=e4,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{let u=r.value;return typeof u>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:u,inst:e}),r}}),Q4=B("$ZodNull",(e,t)=>{K.init(e,t),e._zod.pattern=Qm,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let u=r.value;return u===null||r.issues.push({expected:"null",code:"invalid_type",input:u,inst:e}),r}}),ef=B("$ZodAny",(e,t)=>{K.init(e,t),e._zod.parse=r=>r}),tf=B("$ZodUnknown",(e,t)=>{K.init(e,t),e._zod.parse=r=>r}),uf=B("$ZodNever",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),rf=B("$ZodVoid",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return typeof u>"u"||r.issues.push({expected:"void",code:"invalid_type",input:u,inst:e}),r}}),nf=B("$ZodDate",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let u=r.value,n=u instanceof Date;return n&&!Number.isNaN(u.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:u,...n?{received:"Invalid Date"}:{},inst:e}),r}});function pa(e,t,r){e.issues.length&&t.issues.push(...Ae(r,e.issues)),t.value[r]=e.value}s(pa,"Zy"),o(pa,"handleArrayResult");var sf=B("$ZodArray",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!Array.isArray(u))return r.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),r;r.value=Array(u.length);let n=[];for(let a=0;a<u.length;a++){let l=u[a],d=t.element._zod.run({value:l,issues:[]},i);d instanceof Promise?n.push(d.then(p=>pa(p,r,a))):pa(d,r,a)}return n.length?Promise.all(n).then(()=>r):r}});function Zu(e,t,r,i,u,n){let a=r in i;if(e.issues.length){if(u&&n&&!a)return;t.issues.push(...Ae(r,e.issues))}if(!a&&!u){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}s(Zu,"Ko"),o(Zu,"handlePropertyResult");function ma(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=js(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}s(ma,"ob"),o(ma,"normalizeDef");function fa(e,t,r,i,u,n){let a=[],l=u.keySet,d=u.catchall._zod,p=d.def.type,c=d.optin==="optional",f=d.optout==="optional";for(let g in t){if(g==="__proto__"||l.has(g))continue;if(p==="never"){a.push(g);continue}let m=d.run({value:t[g],issues:[]},i);m instanceof Promise?e.push(m.then(h=>Zu(h,r,g,t,c,f))):Zu(m,r,g,t,c,f)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:n}),e.length?Promise.all(e).then(()=>r):r}s(fa,"ib"),o(fa,"handleCatchall");var af=B("$ZodObject",(e,t)=>{if(K.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let l={...a};return Object.defineProperty(t,"shape",{value:l}),l},"get")})}let r=Jt(()=>ma(t));Y(e._zod,"propValues",()=>{let a=t.shape,l={};for(let d in a){let p=a[d]._zod;if(p.values){l[d]??(l[d]=new Set);for(let c of p.values)l[d].add(c)}}return l});let i=wt,u=t.catchall,n;e._zod.parse=(a,l)=>{n??(n=r.value);let d=a.value;if(!i(d))return a.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),a;a.value={};let p=[],c=n.shape;for(let f of n.keys){let g=c[f],m=g._zod.optin==="optional",h=g._zod.optout==="optional",E=g._zod.run({value:d[f],issues:[]},l);E instanceof Promise?p.push(E.then(D=>Zu(D,a,f,d,m,h))):Zu(E,a,f,d,m,h)}return u?fa(p,d,a,l,r.value,e):p.length?Promise.all(p).then(()=>a):a}}),of=B("$ZodObjectJIT",(e,t)=>{af.init(e,t);let r=e._zod.parse,i=Jt(()=>ma(t)),u=o(f=>{let g=new w4(["shape","payload","ctx"]),m=i.value,h=o(A=>{let I=tn(A);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`},"parseStr");g.write("const input = payload.value;");let E=Object.create(null),D=0;for(let A of m.keys)E[A]=`key_${D++}`;g.write("const newResult = {};");for(let A of m.keys){let I=E[A],j=tn(A),F=f[A],b=F?._zod?.optin==="optional",w=F?._zod?.optout==="optional";g.write(`const ${I} = ${h(A)};`),b&&w?g.write(`
|
|
4
|
+
`))}},B4={major:4,minor:4,patch:3},K=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=B4;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let u of i)for(let n of u._zod.onattach)n(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let u=o((a,l,d)=>{let p=nt(a),c;for(let f of l){if(f._zod.def.when){if(Os(a)||!f._zod.def.when(a))continue}else if(p)continue;let g=a.issues.length,m=f._zod.check(a);if(m instanceof Promise&&d?.async===!1)throw new Dt;if(c||m instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await m,a.issues.length!==g&&(p||(p=nt(a,g)))});else{if(a.issues.length===g)continue;p||(p=nt(a,g))}}return c?c.then(()=>a):a},"runChecks"),n=o((a,l,d)=>{if(nt(a))return a.aborted=!0,a;let p=u(l,i,d);if(p instanceof Promise){if(d.async===!1)throw new Dt;return p.then(c=>e._zod.parse(c,d))}return e._zod.parse(p,d)},"handleCanaryResult");e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){let p=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return p instanceof Promise?p.then(c=>n(c,a,l)):n(p,a,l)}let d=e._zod.parse(a,l);if(d instanceof Promise){if(l.async===!1)throw new Dt;return d.then(p=>u(p,i,l))}return u(d,i,l)}}Y(e,"~standard",()=>({validate:o(u=>{try{let n=km(e,u);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Am(e,u).then(n=>n.success?{value:n.data}:{issues:n.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Uu=B("$ZodString",(e,t)=>{K.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Km(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),se=B("$ZodStringFormat",(e,t)=>{Pu.init(e,t),Uu.init(e,t)}),$4=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Om),se.init(e,t)}),C4=B("$ZodUUID",(e,t)=>{if(t.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Wt(r))}else t.pattern??(t.pattern=Wt());se.init(e,t)}),x4=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Rm),se.init(e,t)}),k4=B("$ZodURL",(e,t)=>{se.init(e,t),e._zod.check=r=>{try{let i=r.value.trim();if(!t.normalize&&t.protocol?.source===Jm.source&&!/^https?:\/\//i.test(i)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let u=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(u.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=u.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),A4=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Qs()),se.init(e,t)}),_4=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=jm),se.init(e,t)}),I4=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=_m),se.init(e,t)}),S4=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Im),se.init(e,t)}),F4=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Sm),se.init(e,t)}),z4=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Fm),se.init(e,t)}),j4=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=zm),se.init(e,t)}),N4=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ra(t)),se.init(e,t)}),O4=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Gm),se.init(e,t)}),R4=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=ua(t)),se.init(e,t)}),T4=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Nm),se.init(e,t)}),M4=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Mm),se.init(e,t),e._zod.bag.format="ipv4"}),P4=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Pm),se.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),U4=B("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Um(t.delimiter)),se.init(e,t),e._zod.bag.format="mac"}),Z4=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Zm),se.init(e,t)}),q4=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=qm),se.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[u,n]=i;if(!n)throw new Error;let a=Number(n);if(`${a}`!==n)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${u}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function sn(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}s(sn,"su"),o(sn,"isValidBase64");var L4=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Lm),se.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{sn(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function oa(e){if(!ea.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return sn(r)}s(oa,"rb"),o(oa,"isValidBase64URL");var J4=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ea),se.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{oa(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),V4=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Vm),se.init(e,t)});function la(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let u=JSON.parse(atob(i));return!("typ"in u&&u?.typ!=="JWT"||!u.alg||t&&(!("alg"in u)||u.alg!==t))}catch{return!1}}s(la,"nb"),o(la,"isValidJWT");var W4=B("$ZodJWT",(e,t)=>{se.init(e,t),e._zod.check=r=>{la(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),G4=B("$ZodCustomStringFormat",(e,t)=>{se.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),da=B("$ZodNumber",(e,t)=>{K.init(e,t),e._zod.pattern=e._zod.bag.pattern??na,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let u=r.value;if(typeof u=="number"&&!Number.isNaN(u)&&Number.isFinite(u))return r;let n=typeof u=="number"?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:u,inst:e,...n?{received:n}:{}}),r}}),K4=B("$ZodNumberFormat",(e,t)=>{i4.init(e,t),da.init(e,t)}),ca=B("$ZodBoolean",(e,t)=>{K.init(e,t),e._zod.pattern=Ym,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let u=r.value;return typeof u=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),r}}),pa=B("$ZodBigInt",(e,t)=>{K.init(e,t),e._zod.pattern=Hm,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),H4=B("$ZodBigIntFormat",(e,t)=>{s4.init(e,t),pa.init(e,t)}),X4=B("$ZodSymbol",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return typeof u=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:u,inst:e}),r}}),Y4=B("$ZodUndefined",(e,t)=>{K.init(e,t),e._zod.pattern=e4,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{let u=r.value;return typeof u>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:u,inst:e}),r}}),Q4=B("$ZodNull",(e,t)=>{K.init(e,t),e._zod.pattern=Qm,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let u=r.value;return u===null||r.issues.push({expected:"null",code:"invalid_type",input:u,inst:e}),r}}),ef=B("$ZodAny",(e,t)=>{K.init(e,t),e._zod.parse=r=>r}),tf=B("$ZodUnknown",(e,t)=>{K.init(e,t),e._zod.parse=r=>r}),uf=B("$ZodNever",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),rf=B("$ZodVoid",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return typeof u>"u"||r.issues.push({expected:"void",code:"invalid_type",input:u,inst:e}),r}}),nf=B("$ZodDate",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let u=r.value,n=u instanceof Date;return n&&!Number.isNaN(u.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:u,...n?{received:"Invalid Date"}:{},inst:e}),r}});function ma(e,t,r){e.issues.length&&t.issues.push(...Ae(r,e.issues)),t.value[r]=e.value}s(ma,"Zy"),o(ma,"handleArrayResult");var sf=B("$ZodArray",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!Array.isArray(u))return r.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),r;r.value=Array(u.length);let n=[];for(let a=0;a<u.length;a++){let l=u[a],d=t.element._zod.run({value:l,issues:[]},i);d instanceof Promise?n.push(d.then(p=>ma(p,r,a))):ma(d,r,a)}return n.length?Promise.all(n).then(()=>r):r}});function Zu(e,t,r,i,u,n){let a=r in i;if(e.issues.length){if(u&&n&&!a)return;t.issues.push(...Ae(r,e.issues))}if(!a&&!u){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}s(Zu,"Ko"),o(Zu,"handlePropertyResult");function fa(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=Ns(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}s(fa,"ob"),o(fa,"normalizeDef");function ga(e,t,r,i,u,n){let a=[],l=u.keySet,d=u.catchall._zod,p=d.def.type,c=d.optin==="optional",f=d.optout==="optional";for(let g in t){if(g==="__proto__"||l.has(g))continue;if(p==="never"){a.push(g);continue}let m=d.run({value:t[g],issues:[]},i);m instanceof Promise?e.push(m.then(h=>Zu(h,r,g,t,c,f))):Zu(m,r,g,t,c,f)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:n}),e.length?Promise.all(e).then(()=>r):r}s(ga,"ib"),o(ga,"handleCatchall");var af=B("$ZodObject",(e,t)=>{if(K.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let l={...a};return Object.defineProperty(t,"shape",{value:l}),l},"get")})}let r=Jt(()=>fa(t));Y(e._zod,"propValues",()=>{let a=t.shape,l={};for(let d in a){let p=a[d]._zod;if(p.values){l[d]??(l[d]=new Set);for(let c of p.values)l[d].add(c)}}return l});let i=wt,u=t.catchall,n;e._zod.parse=(a,l)=>{n??(n=r.value);let d=a.value;if(!i(d))return a.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),a;a.value={};let p=[],c=n.shape;for(let f of n.keys){let g=c[f],m=g._zod.optin==="optional",h=g._zod.optout==="optional",E=g._zod.run({value:d[f],issues:[]},l);E instanceof Promise?p.push(E.then(D=>Zu(D,a,f,d,m,h))):Zu(E,a,f,d,m,h)}return u?ga(p,d,a,l,r.value,e):p.length?Promise.all(p).then(()=>a):a}}),of=B("$ZodObjectJIT",(e,t)=>{af.init(e,t);let r=e._zod.parse,i=Jt(()=>fa(t)),u=o(f=>{let g=new w4(["shape","payload","ctx"]),m=i.value,h=o(A=>{let I=tn(A);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`},"parseStr");g.write("const input = payload.value;");let E=Object.create(null),D=0;for(let A of m.keys)E[A]=`key_${D++}`;g.write("const newResult = {};");for(let A of m.keys){let I=E[A],j=tn(A),F=f[A],b=F?._zod?.optin==="optional",w=F?._zod?.optout==="optional";g.write(`const ${I} = ${h(A)};`),b&&w?g.write(`
|
|
5
5
|
if (${I}.issues.length) {
|
|
6
6
|
if (${j} in input) {
|
|
7
7
|
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
@@ -60,41 +60,41 @@
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
`)}g.write("payload.value = newResult;"),g.write("return payload;");let $=g.compile();return(A,I)=>$(f,A,I)},"generateFastpass"),n,a=wt,l=!Iu.jitless,d=l&&om.value,p=t.catchall,c;e._zod.parse=(f,g)=>{c??(c=i.value);let m=f.value;return a(m)?l&&d&&g?.async===!1&&g.jitless!==!0?(n||(n=u(t.shape)),f=n(f,g),p?fa([],m,f,g,c,e):f):r(f,g):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f)}});function ga(e,t,r,i){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let u=e.filter(n=>!nt(n));return u.length===1?(t.value=u[0].value,u[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(a=>$e(a,i,he())))}),t)}s(ga,"By"),o(ga,"handleUnionResults");var an=B("$ZodUnion",(e,t)=>{K.init(e,t),Y(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Y(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Y(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Y(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>Fu(u.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,u)=>{if(r)return r(i,u);let n=!1,a=[];for(let l of t.options){let d=l._zod.run({value:i.value,issues:[]},u);if(d instanceof Promise)a.push(d),n=!0;else{if(d.issues.length===0)return d;a.push(d)}}return n?Promise.all(a).then(l=>ga(l,i,e,u)):ga(a,i,e,u)}});function ha(e,t,r,i){let u=e.filter(n=>n.issues.length===0);return u.length===1?(t.value=u[0].value,t):(u.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(a=>$e(a,i,he())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}s(ha,"qy"),o(ha,"handleExclusiveUnionResults");var lf=B("$ZodXor",(e,t)=>{an.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,u)=>{if(r)return r(i,u);let n=!1,a=[];for(let l of t.options){let d=l._zod.run({value:i.value,issues:[]},u);d instanceof Promise?(a.push(d),n=!0):a.push(d)}return n?Promise.all(a).then(l=>ha(l,i,e,u)):ha(a,i,e,u)}}),df=B("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,an.init(e,t);let r=e._zod.parse;Y(e._zod,"propValues",()=>{let u={};for(let n of t.options){let a=n._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[l,d]of Object.entries(a)){u[l]||(u[l]=new Set);for(let p of d)u[l].add(p)}}return u});let i=Jt(()=>{let u=t.options,n=new Map;for(let a of u){let l=a._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let d of l){if(n.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);n.set(d,a)}}return n});e._zod.parse=(u,n)=>{let a=u.value;if(!wt(a))return u.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),u;let l=i.value.get(a?.[t.discriminator]);return l?l._zod.run(u,n):t.unionFallback||n.direction==="backward"?r(u,n):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),u)}}),cf=B("$ZodIntersection",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value,n=t.left._zod.run({value:u,issues:[]},i),a=t.right._zod.run({value:u,issues:[]},i);return n instanceof Promise||a instanceof Promise?Promise.all([n,a]).then(([l,d])=>va(r,l,d)):va(r,n,a)}});function on(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(rt(e)&&rt(t)){let r=Object.keys(t),i=Object.keys(e).filter(n=>r.indexOf(n)!==-1),u={...e,...t};for(let n of i){let a=on(e[n],t[n]);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};u[n]=a.data}return{valid:!0,data:u}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let u=e[i],n=t[i],a=on(u,n);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}s(on,"Cc"),o(on,"mergeValues");function va(e,t,r){let i=new Map,u;for(let l of t.issues)if(l.code==="unrecognized_keys"){u??(u=l);for(let d of l.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(l);for(let l of r.issues)if(l.code==="unrecognized_keys")for(let d of l.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(l);let n=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(n.length&&u&&e.issues.push({...u,keys:n}),nt(e))return e;let a=on(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}s(va,"Vy"),o(va,"handleIntersectionResults");var ya=B("$ZodTuple",(e,t)=>{K.init(e,t);let r=t.items;e._zod.parse=(i,u)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({input:n,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],l=Ea(r,"optin"),d=Ea(r,"optout");if(!t.rest){if(n.length<l)return i.issues.push({code:"too_small",minimum:l,inclusive:!0,input:n,inst:e,origin:"array"}),i;n.length>r.length&&i.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:n,inst:e,origin:"array"})}let p=new Array(r.length);for(let c=0;c<r.length;c++){let f=r[c]._zod.run({value:n[c],issues:[]},u);f instanceof Promise?a.push(f.then(g=>{p[c]=g})):p[c]=f}if(t.rest){let c=r.length-1,f=n.slice(r.length);for(let g of f){c++;let m=t.rest._zod.run({value:g,issues:[]},u);m instanceof Promise?a.push(m.then(h=>ba(h,i,c))):ba(m,i,c)}}return a.length?Promise.all(a).then(()=>Da(p,i,r,n,d)):Da(p,i,r,n,d)}});function Ea(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}s(Ea,"Gy"),o(Ea,"getTupleOptStart");function ba(e,t,r){e.issues.length&&t.issues.push(...Ae(r,e.issues)),t.value[r]=e.value}s(ba,"Jy"),o(ba,"handleTupleResult");function Da(e,t,r,i,u){for(let n=0;n<r.length;n++){let a=e[n],l=n<i.length;if(a.issues.length){if(!l&&n>=u){t.value.length=n;break}t.issues.push(...Ae(n,a.issues))}t.value[n]=a.value}for(let n=t.value.length-1;n>=i.length&&r[n]._zod.optout==="optional"&&t.value[n]===void 0;n--)t.value.length=n;return t}s(Da,"Ky"),o(Da,"handleTupleResults");var pf=B("$ZodRecord",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!rt(u))return r.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),r;let n=[],a=t.keyType._zod.values;if(a){r.value={};let l=new Set;for(let p of a)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){l.add(typeof p=="number"?p.toString():p);let c=t.keyType._zod.run({value:p,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(m=>$e(m,i,he())),input:p,path:[p],inst:e});continue}let f=c.value,g=t.valueType._zod.run({value:u[p],issues:[]},i);g instanceof Promise?n.push(g.then(m=>{m.issues.length&&r.issues.push(...Ae(p,m.issues)),r.value[f]=m.value})):(g.issues.length&&r.issues.push(...Ae(p,g.issues)),r.value[f]=g.value)}let d;for(let p in u)l.has(p)||(d=d??[],d.push(p));d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:d})}else{r.value={};for(let l of Reflect.ownKeys(u)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(u,l))continue;let d=t.keyType._zod.run({value:l,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&ra.test(l)&&d.issues.length){let c=t.keyType._zod.run({value:Number(l),issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");c.issues.length===0&&(d=c)}if(d.issues.length){t.mode==="loose"?r.value[l]=u[l]:r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(c=>$e(c,i,he())),input:l,path:[l],inst:e});continue}let p=t.valueType._zod.run({value:u[l],issues:[]},i);p instanceof Promise?n.push(p.then(c=>{c.issues.length&&r.issues.push(...Ae(l,c.issues)),r.value[d.value]=c.value})):(p.issues.length&&r.issues.push(...Ae(l,p.issues)),r.value[d.value]=p.value)}}return n.length?Promise.all(n).then(()=>r):r}}),mf=B("$ZodMap",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!(u instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:u,inst:e}),r;let n=[];r.value=new Map;for(let[a,l]of u){let d=t.keyType._zod.run({value:a,issues:[]},i),p=t.valueType._zod.run({value:l,issues:[]},i);d instanceof Promise||p instanceof Promise?n.push(Promise.all([d,p]).then(([c,f])=>{wa(c,f,r,a,u,e,i)})):wa(d,p,r,a,u,e,i)}return n.length?Promise.all(n).then(()=>r):r}});function wa(e,t,r,i,u,n,a){e.issues.length&&(un.has(typeof i)?r.issues.push(...Ae(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:u,inst:n,issues:e.issues.map(l=>$e(l,a,he()))})),t.issues.length&&(un.has(typeof i)?r.issues.push(...Ae(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:u,inst:n,key:i,issues:t.issues.map(l=>$e(l,a,he()))})),r.value.set(e.value,t.value)}s(wa,"Wy"),o(wa,"handleMapResult");var ff=B("$ZodSet",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!(u instanceof Set))return r.issues.push({input:u,inst:e,expected:"set",code:"invalid_type"}),r;let n=[];r.value=new Set;for(let a of u){let l=t.valueType._zod.run({value:a,issues:[]},i);l instanceof Promise?n.push(l.then(d=>Ba(d,r))):Ba(l,r)}return n.length?Promise.all(n).then(()=>r):r}});function Ba(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}s(Ba,"Xy"),o(Ba,"handleSetResult");var gf=B("$ZodEnum",(e,t)=>{K.init(e,t);let r=en(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(u=>un.has(typeof u)).map(u=>typeof u=="string"?Ue(u):u.toString()).join("|")})$`),e._zod.parse=(u,n)=>{let a=u.value;return i.has(a)||u.issues.push({code:"invalid_value",values:r,input:a,inst:e}),u}}),hf=B("$ZodLiteral",(e,t)=>{if(K.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Ue(i):i?Ue(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,u)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),vf=B("$ZodFile",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return u instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:u,inst:e}),r}}),yf=B("$ZodTransform",(e,t)=>{K.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Qr(e.constructor.name);let u=t.transform(r.value,r);if(i.async)return(u instanceof Promise?u:Promise.resolve(u)).then(n=>(r.value=n,r.fallback=!0,r));if(u instanceof Promise)throw new Dt;return r.value=u,r.fallback=!0,r}});function $a(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}s($a,"Hy"),o($a,"handleOptionalResult");var Ca=B("$ZodOptional",(e,t)=>{K.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Y(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Fu(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){let u=r.value,n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(a=>$a(a,u)):$a(n,u)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),Ef=B("$ZodExactOptional",(e,t)=>{Ca.init(e,t),Y(e._zod,"values",()=>t.innerType._zod.values),Y(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),bf=B("$ZodNullable",(e,t)=>{K.init(e,t),Y(e._zod,"optin",()=>t.innerType._zod.optin),Y(e._zod,"optout",()=>t.innerType._zod.optout),Y(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Fu(r.source)}|null)$`):void 0}),Y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),Df=B("$ZodDefault",(e,t)=>{K.init(e,t),e._zod.optin="optional",Y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>xa(n,t)):xa(u,t)}});function xa(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}s(xa,"Yy"),o(xa,"handleDefaultResult");var wf=B("$ZodPrefault",(e,t)=>{K.init(e,t),e._zod.optin="optional",Y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),Bf=B("$ZodNonOptional",(e,t)=>{K.init(e,t),Y(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>ka(n,e)):ka(u,e)}});function ka(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}s(ka,"Qy"),o(ka,"handleNonOptionalResult");var $f=B("$ZodSuccess",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Qr("ZodSuccess");let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>(r.value=n.issues.length===0,r)):(r.value=u.issues.length===0,r)}}),Cf=B("$ZodCatch",(e,t)=>{K.init(e,t),e._zod.optin="optional",Y(e._zod,"optout",()=>t.innerType._zod.optout),Y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(a=>$e(a,i,he()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=u.value,u.issues.length&&(r.value=t.catchValue({...r,error:{issues:u.issues.map(n=>$e(n,i,he()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),xf=B("$ZodNaN",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Aa=B("$ZodPipe",(e,t)=>{K.init(e,t),Y(e._zod,"values",()=>t.in._zod.values),Y(e._zod,"optin",()=>t.in._zod.optin),Y(e._zod,"optout",()=>t.out._zod.optout),Y(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let n=t.out._zod.run(r,i);return n instanceof Promise?n.then(a=>qu(a,t.in,i)):qu(n,t.in,i)}let u=t.in._zod.run(r,i);return u instanceof Promise?u.then(n=>qu(n,t.out,i)):qu(u,t.out,i)}});function qu(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}s(qu,"Vo"),o(qu,"handlePipeResult");var _a=B("$ZodCodec",(e,t)=>{K.init(e,t),Y(e._zod,"values",()=>t.in._zod.values),Y(e._zod,"optin",()=>t.in._zod.optin),Y(e._zod,"optout",()=>t.out._zod.optout),Y(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let u=t.in._zod.run(r,i);return u instanceof Promise?u.then(n=>Lu(n,t,i)):Lu(u,t,i)}else{let u=t.out._zod.run(r,i);return u instanceof Promise?u.then(n=>Lu(n,t,i)):Lu(u,t,i)}}});function Lu(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(u=>Ju(e,u,t.out,r)):Ju(e,i,t.out,r)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(u=>Ju(e,u,t.in,r)):Ju(e,i,t.in,r)}}s(Lu,"Go"),o(Lu,"handleCodecAResult");function Ju(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}s(Ju,"Jo"),o(Ju,"handleCodecTxResult");var kf=B("$ZodPreprocess",(e,t)=>{Aa.init(e,t)}),Af=B("$ZodReadonly",(e,t)=>{K.init(e,t),Y(e._zod,"propValues",()=>t.innerType._zod.propValues),Y(e._zod,"values",()=>t.innerType._zod.values),Y(e._zod,"optin",()=>t.innerType?._zod?.optin),Y(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(Ia):Ia(u)}});function Ia(e){return e.value=Object.freeze(e.value),e}s(Ia,"eb"),o(Ia,"handleReadonlyResult");var _f=B("$ZodTemplateLiteral",(e,t)=>{K.init(e,t);let r=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let u=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!u)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let n=u.startsWith("^")?1:0,a=u.endsWith("$")?u.length-1:u.length;r.push(u.slice(n,a))}else if(i===null||dm.has(typeof i))r.push(Ue(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,u)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),If=B("$ZodFunction",(e,t)=>(K.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let u=e._def.input?Zs(e._def.input,i):i,n=Reflect.apply(r,this,u);return e._def.output?Zs(e._def.output,n):n}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let u=e._def.input?await qs(e._def.input,i):i,n=await Reflect.apply(r,this,u);return e._def.output?await qs(e._def.output,n):n}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new ya({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),Sf=B("$ZodPromise",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(u=>t.innerType._zod.run({value:u,issues:[]},i))}),Ff=B("$ZodLazy",(e,t)=>{K.init(e,t),Y(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),Y(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Y(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Y(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Y(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),zf=B("$ZodCustom",(e,t)=>{oe.init(e,t),K.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,u=t.fn(i);if(u instanceof Promise)return u.then(n=>Sa(n,r,i,e));Sa(u,r,i,e)}});function Sa(e,t,r,i){if(!e){let u={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(u.params=i._zod.def.params),t.issues.push(Nu(u))}}s(Sa,"tb"),o(Sa,"handleRefineResult");var Fa={};Ge(Fa,{ar:s(()=>jf,"ar"),az:s(()=>Nf,"az"),be:s(()=>Of,"be"),bg:s(()=>Rf,"bg"),ca:s(()=>Tf,"ca"),cs:s(()=>Mf,"cs"),da:s(()=>Pf,"da"),de:s(()=>Uf,"de"),el:s(()=>Zf,"el"),en:s(()=>ja,"en"),eo:s(()=>qf,"eo"),es:s(()=>Lf,"es"),fa:s(()=>Jf,"fa"),fi:s(()=>Vf,"fi"),fr:s(()=>Wf,"fr"),frCA:s(()=>Gf,"frCA"),he:s(()=>Kf,"he"),hr:s(()=>Hf,"hr"),hu:s(()=>Xf,"hu"),hy:s(()=>Yf,"hy"),id:s(()=>Qf,"id"),is:s(()=>eg,"is"),it:s(()=>tg,"it"),ja:s(()=>ug,"ja"),ka:s(()=>rg,"ka"),kh:s(()=>ng,"kh"),km:s(()=>Oa,"km"),ko:s(()=>ig,"ko"),lt:s(()=>sg,"lt"),mk:s(()=>ag,"mk"),ms:s(()=>og,"ms"),nl:s(()=>lg,"nl"),no:s(()=>dg,"no"),ota:s(()=>cg,"ota"),pl:s(()=>mg,"pl"),ps:s(()=>pg,"ps"),pt:s(()=>fg,"pt"),ro:s(()=>gg,"ro"),ru:s(()=>hg,"ru"),sl:s(()=>vg,"sl"),sv:s(()=>yg,"sv"),ta:s(()=>Eg,"ta"),th:s(()=>bg,"th"),tr:s(()=>Dg,"tr"),ua:s(()=>wg,"ua"),uk:s(()=>Ma,"uk"),ur:s(()=>Bg,"ur"),uz:s(()=>$g,"uz"),vi:s(()=>Cg,"vi"),yo:s(()=>Ag,"yo"),zhCN:s(()=>xg,"zhCN"),zhTW:s(()=>kg,"zhTW")});var LE=o(()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${u.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`}case"invalid_value":return u.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${V(u.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${u.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${u.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${u.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${u.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${u.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${u.prefix}"`:n.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${n.suffix}"`:n.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${n.includes}"`:n.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${n.pattern}`:`${r[n.format]??u.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${u.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${u.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${u.keys.length>1?"\u0629":""}: ${z(u.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${u.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${u.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function jf(){return{localeError:LE()}}s(jf,"Ku"),o(jf,"default");var JE=o(()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${u.expected}, daxil olan ${l}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n}, daxil olan ${l}`}case"invalid_value":return u.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${V(u.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${u.origin??"d\u0259y\u0259r"} ${n}${u.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${u.origin??"d\u0259y\u0259r"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${n.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:n.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${n.suffix}" il\u0259 bitm\u0259lidir`:n.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${n.includes}" daxil olmal\u0131d\u0131r`:n.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${n.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[n.format]??u.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${u.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${u.keys.length>1?"lar":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${u.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function Nf(){return{localeError:JE()}}s(Nf,"Wu"),o(Nf,"default");function za(e,t,r,i){let u=Math.abs(e),n=u%10,a=u%100;return a>=11&&a<=19?i:n===1?t:n>=2&&n<=4?r:i}s(za,"ab"),o(za,"getBelarusianPlural");var VE=o(()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${u.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${V(u.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=za(l,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${u.maximum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=za(l,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${u.minimum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${n.includes}"`:n.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${u.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${u.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${u.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function Of(){return{localeError:VE()}}s(Of,"Xu"),o(Of,"default");var WE=o(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${u.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${V(u.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${u.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${u.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;if(n.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${u.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${u.keys.length>1?"\u043E\u0432\u0435":""}: ${z(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${u.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${u.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}},"error");function Rf(){return{localeError:WE()}}s(Rf,"Hu"),o(Rf,"default");var GE=o(()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${u.expected}, s'ha rebut ${l}`:`Tipus inv\xE0lid: s'esperava ${n}, s'ha rebut ${l}`}case"invalid_value":return u.values.length===1?`Valor inv\xE0lid: s'esperava ${V(u.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${z(u.values," o ")}`;case"too_big":{let n=u.inclusive?"com a m\xE0xim":"menys de",a=t(u.origin);return a?`Massa gran: s'esperava que ${u.origin??"el valor"} contingu\xE9s ${n} ${u.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${u.origin??"el valor"} fos ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(u.origin);return a?`Massa petit: s'esperava que ${u.origin} contingu\xE9s ${n} ${u.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${u.origin} fos ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${n.prefix}"`:n.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${n.suffix}"`:n.format==="includes"?`Format inv\xE0lid: ha d'incloure "${n.includes}"`:n.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${n.pattern}`:`Format inv\xE0lid per a ${r[n.format]??u.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${u.divisor}`;case"unrecognized_keys":return`Clau${u.keys.length>1?"s":""} no reconeguda${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${u.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${u.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function Tf(){return{localeError:GE()}}s(Tf,"Yu"),o(Tf,"default");var KE=o(()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${u.expected}, obdr\u017Eeno ${l}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n}, obdr\u017Eeno ${l}`}case"invalid_value":return u.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${V(u.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${u.origin??"hodnota"} mus\xED m\xEDt ${n}${u.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${u.origin??"hodnota"} mus\xED b\xFDt ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${u.origin??"hodnota"} mus\xED m\xEDt ${n}${u.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${u.origin??"hodnota"} mus\xED b\xFDt ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${n.prefix}"`:n.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${n.suffix}"`:n.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${n.includes}"`:n.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${n.pattern}`:`Neplatn\xFD form\xE1t ${r[n.format]??u.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${u.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${z(u.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${u.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${u.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function Mf(){return{localeError:KE()}}s(Mf,"Qu"),o(Mf,"default");var HE=o(()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ugyldigt input: forventede instanceof ${u.expected}, fik ${l}`:`Ugyldigt input: forventede ${n}, fik ${l}`}case"invalid_value":return u.values.length===1?`Ugyldig v\xE6rdi: forventede ${V(u.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`For stor: forventede ${l??"value"} ${a.verb} ${n} ${u.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`For lille: forventede ${l} ${a.verb} ${n} ${u.minimum.toString()} ${a.unit}`:`For lille: forventede ${l} havde ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ugyldig streng: skal starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: skal ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: skal indeholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${r[n.format]??u.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${z(u.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${u.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${u.origin}`;default:return"Ugyldigt input"}}},"error");function Pf(){return{localeError:HE()}}s(Pf,"el"),o(Pf,"default");var XE=o(()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${u.expected}, erhalten ${l}`:`Ung\xFCltige Eingabe: erwartet ${n}, erhalten ${l}`}case"invalid_value":return u.values.length===1?`Ung\xFCltige Eingabe: erwartet ${V(u.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Zu gro\xDF: erwartet, dass ${u.origin??"Wert"} ${n}${u.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${u.origin??"Wert"} ${n}${u.maximum.toString()} ist`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Zu klein: erwartet, dass ${u.origin} ${n}${u.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${u.origin} ${n}${u.minimum.toString()} ist`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ung\xFCltiger String: muss mit "${n.prefix}" beginnen`:n.format==="ends_with"?`Ung\xFCltiger String: muss mit "${n.suffix}" enden`:n.format==="includes"?`Ung\xFCltiger String: muss "${n.includes}" enthalten`:n.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${n.pattern} entsprechen`:`Ung\xFCltig: ${r[n.format]??u.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${u.divisor} sein`;case"unrecognized_keys":return`${u.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${z(u.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${u.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${u.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function Uf(){return{localeError:XE()}}s(Uf,"tl"),o(Uf,"default");var YE=o(()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return typeof u.expected=="string"&&/^[A-Z]/.test(u.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${u.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`}case"invalid_value":return u.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${V(u.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${u.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${u.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${n.prefix}"`:n.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${n.suffix}"`:n.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${n.includes}"`:n.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${n.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[n.format]??u.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${u.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${u.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${u.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${u.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${u.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}},"error");function Zf(){return{localeError:YE()}}s(Zf,"rl"),o(Zf,"default");var QE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return`Invalid input: expected ${n}, received ${l}`}case"invalid_value":return u.values.length===1?`Invalid input: expected ${V(u.values[0])}`:`Invalid option: expected one of ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Too big: expected ${u.origin??"value"} to have ${n}${u.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${u.origin??"value"} to be ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Too small: expected ${u.origin} to have ${n}${u.minimum.toString()} ${a.unit}`:`Too small: expected ${u.origin} to be ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??u.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${u.divisor}`;case"unrecognized_keys":return`Unrecognized key${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Invalid key in ${u.origin}`;case"invalid_union":return u.options&&Array.isArray(u.options)&&u.options.length>0?`Invalid discriminator value. Expected ${u.options.map(n=>`'${n}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${u.origin}`;default:return"Invalid input"}}},"error");function ja(){return{localeError:QE()}}s(ja,"wn"),o(ja,"default");var e5=o(()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${u.expected}, ricevi\u011Dis ${l}`:`Nevalida enigo: atendi\u011Dis ${n}, ricevi\u011Dis ${l}`}case"invalid_value":return u.values.length===1?`Nevalida enigo: atendi\u011Dis ${V(u.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Tro granda: atendi\u011Dis ke ${u.origin??"valoro"} havu ${n}${u.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${u.origin??"valoro"} havu ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Tro malgranda: atendi\u011Dis ke ${u.origin} havu ${n}${u.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${u.origin} estu ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??u.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${u.divisor}`;case"unrecognized_keys":return`Nekonata${u.keys.length>1?"j":""} \u015Dlosilo${u.keys.length>1?"j":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${u.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${u.origin}`;default:return"Nevalida enigo"}}},"error");function qf(){return{localeError:e5()}}s(qf,"nl"),o(qf,"default");var t5=o(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${u.expected}, recibido ${l}`:`Entrada inv\xE1lida: se esperaba ${n}, recibido ${l}`}case"invalid_value":return u.values.length===1?`Entrada inv\xE1lida: se esperaba ${V(u.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${n}${u.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Demasiado peque\xF1o: se esperaba que ${l} tuviera ${n}${u.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${l} fuera ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${n.prefix}"`:n.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${n.suffix}"`:n.format==="includes"?`Cadena inv\xE1lida: debe incluir "${n.includes}"`:n.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${n.pattern}`:`Inv\xE1lido ${r[n.format]??u.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${u.divisor}`;case"unrecognized_keys":return`Llave${u.keys.length>1?"s":""} desconocida${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[u.origin]??u.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[u.origin]??u.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function Lf(){return{localeError:t5()}}s(Lf,"ol"),o(Lf,"default");var u5=o(()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${u.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return u.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${V(u.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${z(u.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${u.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${u.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:n.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:n.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${n.includes}" \u0628\u0627\u0634\u062F`:n.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${n.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[n.format]??u.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${u.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${u.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${z(u.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${u.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${u.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function Jf(){return{localeError:u5()}}s(Jf,"il"),o(Jf,"default");var r5=o(()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Virheellinen tyyppi: odotettiin instanceof ${u.expected}, oli ${l}`:`Virheellinen tyyppi: odotettiin ${n}, oli ${l}`}case"invalid_value":return u.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${V(u.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${n}${u.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${n}${u.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${n.prefix}"`:n.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${n.suffix}"`:n.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${n.includes}"`:n.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${n.pattern}`:`Virheellinen ${r[n.format]??u.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${u.divisor} monikerta`;case"unrecognized_keys":return`${u.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${z(u.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}},"error");function Vf(){return{localeError:r5()}}s(Vf,"sl"),o(Vf,"default");var n5=o(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entr\xE9e invalide : instanceof ${u.expected} attendu, ${l} re\xE7u`:`Entr\xE9e invalide : ${n} attendu, ${l} re\xE7u`}case"invalid_value":return u.values.length===1?`Entr\xE9e invalide : ${V(u.values[0])} attendu`:`Option invalide : une valeur parmi ${z(u.values,"|")} attendue`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Trop grand : ${i[u.origin]??"valeur"} doit ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[u.origin]??"valeur"} doit \xEAtre ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Trop petit : ${i[u.origin]??"valeur"} doit ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Trop petit : ${i[u.origin]??"valeur"} doit \xEAtre ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${n.pattern}`:`${r[n.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${u.divisor}`;case"unrecognized_keys":return`Cl\xE9${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${z(u.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${u.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Wf(){return{localeError:n5()}}s(Wf,"al"),o(Wf,"default");var i5=o(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entr\xE9e invalide : attendu instanceof ${u.expected}, re\xE7u ${l}`:`Entr\xE9e invalide : attendu ${n}, re\xE7u ${l}`}case"invalid_value":return u.values.length===1?`Entr\xE9e invalide : attendu ${V(u.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"\u2264":"<",a=t(u.origin);return a?`Trop grand : attendu que ${u.origin??"la valeur"} ait ${n}${u.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${u.origin??"la valeur"} soit ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"\u2265":">",a=t(u.origin);return a?`Trop petit : attendu que ${u.origin} ait ${n}${u.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${u.origin} soit ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${n.pattern}`:`${r[n.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${u.divisor}`;case"unrecognized_keys":return`Cl\xE9${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${z(u.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${u.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Gf(){return{localeError:i5()}}s(Gf,"cl"),o(Gf,"default");var s5=o(()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=o(p=>p?e[p]:void 0,"typeEntry"),i=o(p=>{let c=r(p);return c?c.label:p??e.unknown.label},"typeLabel"),u=o(p=>`\u05D4${i(p)}`,"withDefinite"),n=o(p=>(r(p)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA","verbFor"),a=o(p=>p?t[p]??null:null,"getSizing"),l={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},d={nan:"NaN"};return p=>{switch(p.code){case"invalid_type":{let c=p.expected,f=d[c??""]??i(c),g=G(p.input),m=d[g]??e[g]?.label??g;return/^[A-Z]/.test(p.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${p.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(p.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${V(p.values[0])}`;let c=p.values.map(g=>V(g));if(p.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${c[0]} \u05D0\u05D5 ${c[1]}`;let f=c[c.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${c.slice(0,-1).join(", ")} \u05D0\u05D5 ${f}`}case"too_big":{let c=a(p.origin),f=u(p.origin??"value");if(p.origin==="string")return`${c?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${p.maximum.toString()} ${c?.unit??""} ${p.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(p.origin==="number"){let h=p.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${p.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${p.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(p.origin==="array"||p.origin==="set"){let h=p.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",E=p.inclusive?`${p.maximum} ${c?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${p.maximum} ${c?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${f} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`.trim()}let g=p.inclusive?"<=":"<",m=n(p.origin??"value");return c?.unit?`${c.longLabel} \u05DE\u05D3\u05D9: ${f} ${m} ${g}${p.maximum.toString()} ${c.unit}`:`${c?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${f} ${m} ${g}${p.maximum.toString()}`}case"too_small":{let c=a(p.origin),f=u(p.origin??"value");if(p.origin==="string")return`${c?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${p.minimum.toString()} ${c?.unit??""} ${p.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(p.origin==="number"){let h=p.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${p.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${p.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(p.origin==="array"||p.origin==="set"){let h=p.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(p.minimum===1&&p.inclusive){let D=(p.origin,"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${f} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${D}`}let E=p.inclusive?`${p.minimum} ${c?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${p.minimum} ${c?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${f} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`.trim()}let g=p.inclusive?">=":">",m=n(p.origin??"value");return c?.unit?`${c.shortLabel} \u05DE\u05D3\u05D9: ${f} ${m} ${g}${p.minimum.toString()} ${c.unit}`:`${c?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${f} ${m} ${g}${p.minimum.toString()}`}case"invalid_format":{let c=p;if(c.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${c.prefix}"`;if(c.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${c.suffix}"`;if(c.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${c.includes}"`;if(c.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${c.pattern}`;let f=l[c.format],g=f?.label??c.format,m=(f?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${m}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${p.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${p.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${p.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${z(p.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${u(p.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function Kf(){return{localeError:s5()}}s(Kf,"ul"),o(Kf,"default");var a5=o(()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${u.expected}, a primljeno je ${l}`:`Neispravan unos: o\u010Dekuje se ${n}, a primljeno je ${l}`}case"invalid_value":return u.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${V(u.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Preveliko: o\u010Dekivano da ${l??"vrijednost"} ima ${n}${u.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${l??"vrijednost"} bude ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Premalo: o\u010Dekivano da ${l} ima ${n}${u.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${l} bude ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${n.prefix}"`:n.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${n.suffix}"`:n.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${n.includes}"`:n.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${n.pattern}`:`Neispravna ${r[n.format]??u.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${u.divisor}`;case"unrecognized_keys":return`Neprepoznat${u.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${z(u.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[u.origin]??u.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[u.origin]??u.origin}`;default:return"Neispravan unos"}}},"error");function Hf(){return{localeError:a5()}}s(Hf,"ll"),o(Hf,"default");var o5=o(()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${u.expected}, a kapott \xE9rt\xE9k ${l}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n}, a kapott \xE9rt\xE9k ${l}`}case"invalid_value":return u.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${V(u.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`T\xFAl nagy: ${u.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${n}${u.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${u.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${u.origin} m\xE9rete t\xFAl kicsi ${n}${u.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${u.origin} t\xFAl kicsi ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\xC9rv\xE9nytelen string: "${n.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:n.format==="ends_with"?`\xC9rv\xE9nytelen string: "${n.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:n.format==="includes"?`\xC9rv\xE9nytelen string: "${n.includes}" \xE9rt\xE9ket kell tartalmaznia`:n.format==="regex"?`\xC9rv\xE9nytelen string: ${n.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[n.format]??u.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${u.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${u.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${u.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function Xf(){return{localeError:o5()}}s(Xf,"dl"),o(Xf,"default");function Na(e,t,r){return Math.abs(e)===1?t:r}s(Na,"cb"),o(Na,"getArmenianPlural");function Bt(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}s(Bt,"dr"),o(Bt,"withDefiniteArticle");var l5=o(()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${u.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${n}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`}case"invalid_value":return u.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${V(u.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=Na(l,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Bt(u.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${u.maximum.toString()} ${d}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Bt(u.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=Na(l,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Bt(u.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${u.minimum.toString()} ${d}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Bt(u.origin)} \u056C\u056B\u0576\u056B ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${n.prefix}"-\u0578\u057E`:n.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${n.suffix}"-\u0578\u057E`:n.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${n.includes}"`:n.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${n.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[n.format]??u.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${u.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${u.keys.length>1?"\u0576\u0565\u0580":""}. ${z(u.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Bt(u.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Bt(u.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function Yf(){return{localeError:l5()}}s(Yf,"pl"),o(Yf,"default");var d5=o(()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input tidak valid: diharapkan instanceof ${u.expected}, diterima ${l}`:`Input tidak valid: diharapkan ${n}, diterima ${l}`}case"invalid_value":return u.values.length===1?`Input tidak valid: diharapkan ${V(u.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Terlalu besar: diharapkan ${u.origin??"value"} memiliki ${n}${u.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${u.origin??"value"} menjadi ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Terlalu kecil: diharapkan ${u.origin} memiliki ${n}${u.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${u.origin} menjadi ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`String tidak valid: harus dimulai dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak valid: harus berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak valid: harus menyertakan "${n.includes}"`:n.format==="regex"?`String tidak valid: harus sesuai pola ${n.pattern}`:`${r[n.format]??u.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${u.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${u.origin}`;default:return"Input tidak valid"}}},"error");function Qf(){return{localeError:d5()}}s(Qf,"fl"),o(Qf,"default");var c5=o(()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera instanceof ${u.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera ${n}`}case"invalid_value":return u.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${V(u.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin??"gildi"} hafi ${n}${u.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin??"gildi"} s\xE9 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin} hafi ${n}${u.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin} s\xE9 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??u.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${u.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${u.keys.length>1?"ir lyklar":"ur lykill"}: ${z(u.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${u.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${u.origin}`;default:return"Rangt gildi"}}},"error");function eg(){return{localeError:c5()}}s(eg,"ml"),o(eg,"default");var p5=o(()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input non valido: atteso instanceof ${u.expected}, ricevuto ${l}`:`Input non valido: atteso ${n}, ricevuto ${l}`}case"invalid_value":return u.values.length===1?`Input non valido: atteso ${V(u.values[0])}`:`Opzione non valida: atteso uno tra ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Troppo grande: ${u.origin??"valore"} deve avere ${n}${u.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${u.origin??"valore"} deve essere ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Troppo piccolo: ${u.origin} deve avere ${n}${u.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${u.origin} deve essere ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Stringa non valida: deve iniziare con "${n.prefix}"`:n.format==="ends_with"?`Stringa non valida: deve terminare con "${n.suffix}"`:n.format==="includes"?`Stringa non valida: deve includere "${n.includes}"`:n.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${n.pattern}`:`Input non valido: ${r[n.format]??u.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${u.divisor}`;case"unrecognized_keys":return`Chiav${u.keys.length>1?"i":"e"} non riconosciut${u.keys.length>1?"e":"a"}: ${z(u.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${u.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${u.origin}`;default:return"Input non valido"}}},"error");function tg(){return{localeError:p5()}}s(tg,"gl"),o(tg,"default");var m5=o(()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${u.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${n}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return u.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${V(u.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${z(u.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let n=u.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(u.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${u.origin??"\u5024"}\u306F${u.maximum.toString()}${a.unit??"\u8981\u7D20"}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${u.origin??"\u5024"}\u306F${u.maximum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let n=u.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(u.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${u.origin}\u306F${u.minimum.toString()}${a.unit}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${u.origin}\u306F${u.minimum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${n.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[n.format]??u.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${u.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${u.keys.length>1?"\u7FA4":""}: ${z(u.keys,"\u3001")}`;case"invalid_key":return`${u.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${u.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function ug(){return{localeError:m5()}}s(ug,"hl"),o(ug,"default");var f5=o(()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${u.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`}case"invalid_value":return u.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${V(u.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${z(u.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${u.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${u.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${u.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${u.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}},"error");function rg(){return{localeError:f5()}}s(rg,"vl"),o(rg,"default");var g5=o(()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${u.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`}case"invalid_value":return u.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${V(u.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${u.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin} ${n} ${u.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin} ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${n.prefix}"`:n.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${n.suffix}"`:n.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${n.includes}"`:n.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${n.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${u.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${z(u.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${u.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${u.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function Oa(){return{localeError:g5()}}s(Oa,"xn"),o(Oa,"default");function ng(){return Oa()}s(ng,"yl"),o(ng,"default");var h5=o(()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${u.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`}case"invalid_value":return u.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${V(u.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${z(u.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let n=u.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=n==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(u.origin),d=l?.unit??"\uC694\uC18C";return l?`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${u.maximum.toString()}${d} ${n}${a}`:`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${u.maximum.toString()} ${n}${a}`}case"too_small":{let n=u.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=n==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(u.origin),d=l?.unit??"\uC694\uC18C";return l?`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${u.minimum.toString()}${d} ${n}${a}`:`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${u.minimum.toString()} ${n}${a}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:n.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${n.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[n.format]??u.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${u.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${z(u.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${u.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${u.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function ig(){return{localeError:h5()}}s(ig,"bl"),o(ig,"default");var Vu=o(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function Ra(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}s(Ra,"ub"),o(Ra,"getUnitTypeFromNumber");var v5=o(()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(u,n,a,l){let d=e[u]??null;return d===null?d:{unit:d.unit[n],verb:d.verb[l][a?"inclusive":"notInclusive"]}}s(t,"t"),o(t,"getSizing");let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Gautas tipas ${l}, o tik\u0117tasi - instanceof ${u.expected}`:`Gautas tipas ${l}, o tik\u0117tasi - ${n}`}case"invalid_value":return u.values.length===1?`Privalo b\u016Bti ${V(u.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${z(u.values,"|")} pasirinkim\u0173`;case"too_big":{let n=i[u.origin]??u.origin,a=t(u.origin,Ra(Number(u.maximum)),u.inclusive??!1,"smaller");if(a?.verb)return`${Vu(n??u.origin??"reik\u0161m\u0117")} ${a.verb} ${u.maximum.toString()} ${a.unit??"element\u0173"}`;let l=u.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Vu(n??u.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${u.maximum.toString()} ${a?.unit}`}case"too_small":{let n=i[u.origin]??u.origin,a=t(u.origin,Ra(Number(u.minimum)),u.inclusive??!1,"bigger");if(a?.verb)return`${Vu(n??u.origin??"reik\u0161m\u0117")} ${a.verb} ${u.minimum.toString()} ${a.unit??"element\u0173"}`;let l=u.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Vu(n??u.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${u.minimum.toString()} ${a?.unit}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??u.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${u.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${u.keys.length>1?"i":"as"} rakt${u.keys.length>1?"ai":"as"}: ${z(u.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let n=i[u.origin]??u.origin;return`${Vu(n??u.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function sg(){return{localeError:v5()}}s(sg,"wl"),o(sg,"default");var y5=o(()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${u.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`Invalid input: expected ${V(u.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${n}${u.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin} \u0434\u0430 \u0438\u043C\u0430 ${n}${u.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${n.pattern}`:`Invalid ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${u.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${u.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function ag(){return{localeError:y5()}}s(ag,"xl"),o(ag,"default");var E5=o(()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input tidak sah: dijangka instanceof ${u.expected}, diterima ${l}`:`Input tidak sah: dijangka ${n}, diterima ${l}`}case"invalid_value":return u.values.length===1?`Input tidak sah: dijangka ${V(u.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Terlalu besar: dijangka ${u.origin??"nilai"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${u.origin??"nilai"} adalah ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Terlalu kecil: dijangka ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${u.origin} adalah ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`String tidak sah: mesti bermula dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak sah: mesti mengandungi "${n.includes}"`:n.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${n.pattern}`:`${r[n.format]??u.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${z(u.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${u.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${u.origin}`;default:return"Input tidak sah"}}},"error");function og(){return{localeError:E5()}}s(og,"$l"),o(og,"default");var b5=o(()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ongeldige invoer: verwacht instanceof ${u.expected}, ontving ${l}`:`Ongeldige invoer: verwacht ${n}, ontving ${l}`}case"invalid_value":return u.values.length===1?`Ongeldige invoer: verwacht ${V(u.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=u.origin==="date"?"laat":u.origin==="string"?"lang":"groot";return a?`Te ${l}: verwacht dat ${u.origin??"waarde"} ${n}${u.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${l}: verwacht dat ${u.origin??"waarde"} ${n}${u.maximum.toString()} is`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=u.origin==="date"?"vroeg":u.origin==="string"?"kort":"klein";return a?`Te ${l}: verwacht dat ${u.origin} ${n}${u.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${l}: verwacht dat ${u.origin} ${n}${u.minimum.toString()} is`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ongeldige tekst: moet met "${n.prefix}" beginnen`:n.format==="ends_with"?`Ongeldige tekst: moet op "${n.suffix}" eindigen`:n.format==="includes"?`Ongeldige tekst: moet "${n.includes}" bevatten`:n.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${n.pattern}`:`Ongeldig: ${r[n.format]??u.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${u.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${u.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${u.origin}`;default:return"Ongeldige invoer"}}},"error");function lg(){return{localeError:b5()}}s(lg,"_l"),o(lg,"default");var D5=o(()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ugyldig input: forventet instanceof ${u.expected}, fikk ${l}`:`Ugyldig input: forventet ${n}, fikk ${l}`}case"invalid_value":return u.values.length===1?`Ugyldig verdi: forventet ${V(u.values[0])}`:`Ugyldig valg: forventet en av ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`For stor(t): forventet ${u.origin??"value"} til \xE5 ha ${n}${u.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${u.origin??"value"} til \xE5 ha ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`For lite(n): forventet ${u.origin} til \xE5 ha ${n}${u.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${u.origin} til \xE5 ha ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${r[n.format]??u.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${z(u.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${u.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${u.origin}`;default:return"Ugyldig input"}}},"error");function dg(){return{localeError:D5()}}s(dg,"kl"),o(dg,"default");var w5=o(()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`F\xE2sit giren: umulan instanceof ${u.expected}, al\u0131nan ${l}`:`F\xE2sit giren: umulan ${n}, al\u0131nan ${l}`}case"invalid_value":return u.values.length===1?`F\xE2sit giren: umulan ${V(u.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Fazla b\xFCy\xFCk: ${u.origin??"value"}, ${n}${u.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${u.origin??"value"}, ${n}${u.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Fazla k\xFC\xE7\xFCk: ${u.origin}, ${n}${u.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${u.origin}, ${n}${u.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let n=u;return n.format==="starts_with"?`F\xE2sit metin: "${n.prefix}" ile ba\u015Flamal\u0131.`:n.format==="ends_with"?`F\xE2sit metin: "${n.suffix}" ile bitmeli.`:n.format==="includes"?`F\xE2sit metin: "${n.includes}" ihtiv\xE2 etmeli.`:n.format==="regex"?`F\xE2sit metin: ${n.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[n.format]??u.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${u.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${u.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function cg(){return{localeError:w5()}}s(cg,"Sl"),o(cg,"default");var B5=o(()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${u.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return u.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${V(u.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${z(u.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${u.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${u.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} \u0648\u064A`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} \u0648\u064A`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:n.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:n.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${n.includes}" \u0648\u0644\u0631\u064A`:n.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${n.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[n.format]??u.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${u.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${u.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${u.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${u.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function pg(){return{localeError:B5()}}s(pg,"Il"),o(pg,"default");var $5=o(()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${u.expected}, otrzymano ${l}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n}, otrzymano ${l}`}case"invalid_value":return u.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${V(u.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${u.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${u.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${n.prefix}"`:n.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${n.suffix}"`:n.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${n.includes}"`:n.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${n.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[n.format]??u.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${u.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${u.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${u.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function mg(){return{localeError:$5()}}s(mg,"Rl"),o(mg,"default");var C5=o(()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Tipo inv\xE1lido: esperado instanceof ${u.expected}, recebido ${l}`:`Tipo inv\xE1lido: esperado ${n}, recebido ${l}`}case"invalid_value":return u.values.length===1?`Entrada inv\xE1lida: esperado ${V(u.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Muito grande: esperado que ${u.origin??"valor"} tivesse ${n}${u.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${u.origin??"valor"} fosse ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Muito pequeno: esperado que ${u.origin} tivesse ${n}${u.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${u.origin} fosse ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${n.prefix}"`:n.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${n.suffix}"`:n.format==="includes"?`Texto inv\xE1lido: deve incluir "${n.includes}"`:n.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${n.pattern}`:`${r[n.format]??u.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${u.divisor}`;case"unrecognized_keys":return`Chave${u.keys.length>1?"s":""} desconhecida${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${u.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${u.origin}`;default:return"Campo inv\xE1lido"}}},"error");function fg(){return{localeError:C5()}}s(fg,"Tl"),o(fg,"default");var x5=o(()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${n}, primit ${l}`}case"invalid_value":return u.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${V(u.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Prea mare: a\u0219teptat ca ${u.origin??"valoarea"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${u.origin??"valoarea"} s\u0103 fie ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Prea mic: a\u0219teptat ca ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${u.origin} s\u0103 fie ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${n.prefix}"`:n.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${n.suffix}"`:n.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${n.includes}"`:n.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${n.pattern}`:`Format invalid: ${r[n.format]??u.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${u.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${z(u.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${u.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${u.origin}`;default:return"Intrare invalid\u0103"}}},"error");function gg(){return{localeError:x5()}}s(gg,"El"),o(gg,"default");function Ta(e,t,r,i){let u=Math.abs(e),n=u%10,a=u%100;return a>=11&&a<=19?i:n===1?t:n>=2&&n<=4?r:i}s(Ta,"lb"),o(Ta,"getRussianPlural");var k5=o(()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${u.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${V(u.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=Ta(l,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${u.maximum.toString()} ${d}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=Ta(l,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${u.minimum.toString()} ${d}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin} \u0431\u0443\u0434\u0435\u0442 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${u.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${u.keys.length>1?"\u0438":""}: ${z(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${u.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${u.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function hg(){return{localeError:k5()}}s(hg,"Al"),o(hg,"default");var A5=o(()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${u.expected}, prejeto ${l}`:`Neveljaven vnos: pri\u010Dakovano ${n}, prejeto ${l}`}case"invalid_value":return u.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${V(u.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${u.origin??"vrednost"} imelo ${n}${u.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${u.origin??"vrednost"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${u.origin} imelo ${n}${u.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${n.prefix}"`:n.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${n.suffix}"`:n.format==="includes"?`Neveljaven niz: mora vsebovati "${n.includes}"`:n.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${n.pattern}`:`Neveljaven ${r[n.format]??u.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${u.divisor}`;case"unrecognized_keys":return`Neprepoznan${u.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${z(u.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${u.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${u.origin}`;default:return"Neveljaven vnos"}}},"error");function vg(){return{localeError:A5()}}s(vg,"zl"),o(vg,"default");var _5=o(()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${u.expected}, fick ${l}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${n}, fick ${l}`}case"invalid_value":return u.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${V(u.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${u.origin??"v\xE4rdet"} att ha ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${n.prefix}"`:n.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${n.suffix}"`:n.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${n.includes}"`:n.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${n.pattern}"`:`Ogiltig(t) ${r[n.format]??u.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${z(u.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${u.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${u.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function yg(){return{localeError:_5()}}s(yg,"jl"),o(yg,"default");var I5=o(()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${u.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`}case"invalid_value":return u.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${V(u.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${z(u.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${u.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${u.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin} ${n}${u.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin} ${n}${u.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${n.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${u.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${u.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${u.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}},"error");function Eg(){return{localeError:I5()}}s(Eg,"Ol"),o(Eg,"default");var S5=o(()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${u.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`}case"invalid_value":return u.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${V(u.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(u.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(u.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${n.prefix}"`:n.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${n.suffix}"`:n.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${n.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:n.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${n.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${u.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${z(u.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${u.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${u.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function bg(){return{localeError:S5()}}s(bg,"Nl"),o(bg,"default");var F5=o(()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${u.expected}, al\u0131nan ${l}`:`Ge\xE7ersiz de\u011Fer: beklenen ${n}, al\u0131nan ${l}`}case"invalid_value":return u.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${V(u.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${u.origin??"de\u011Fer"} ${n}${u.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${u.origin??"de\u011Fer"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??u.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${u.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${u.keys.length>1?"lar":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${u.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function Dg(){return{localeError:F5()}}s(Dg,"Pl"),o(Dg,"default");var z5=o(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${u.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${V(u.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin} \u0431\u0443\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${u.keys.length>1?"\u0456":""}: ${z(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${u.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${u.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function Ma(){return{localeError:z5()}}s(Ma,"_n"),o(Ma,"default");function wg(){return Ma()}s(wg,"Dl"),o(wg,"default");var j5=o(()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${u.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return u.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${V(u.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${z(u.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${u.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${u.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${n}${u.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${u.origin} \u06A9\u06D2 ${n}${u.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${u.origin} \u06A9\u0627 ${n}${u.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${n.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${u.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${u.keys.length>1?"\u0632":""}: ${z(u.keys,"\u060C ")}`;case"invalid_key":return`${u.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${u.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function Bg(){return{localeError:j5()}}s(Bg,"Ml"),o(Bg,"default");var N5=o(()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${u.expected}, qabul qilingan ${l}`:`Noto\u2018g\u2018ri kirish: kutilgan ${n}, qabul qilingan ${l}`}case"invalid_value":return u.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${V(u.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Juda katta: kutilgan ${u.origin??"qiymat"} ${n}${u.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${u.origin??"qiymat"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Juda kichik: kutilgan ${u.origin} ${n}${u.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${n.prefix}" bilan boshlanishi kerak`:n.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${n.suffix}" bilan tugashi kerak`:n.format==="includes"?`Noto\u2018g\u2018ri satr: "${n.includes}" ni o\u2018z ichiga olishi kerak`:n.format==="regex"?`Noto\u2018g\u2018ri satr: ${n.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[n.format]??u.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${u.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${u.keys.length>1?"lar":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${u.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}},"error");function $g(){return{localeError:N5()}}s($g,"Cl"),o($g,"default");var O5=o(()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${u.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`}case"invalid_value":return u.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${V(u.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${u.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${u.origin??"gi\xE1 tr\u1ECB"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${n.prefix}"`:n.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${n.suffix}"`:n.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${n.includes}"`:n.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${n.pattern}`:`${r[n.format]??u.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${u.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${z(u.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${u.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${u.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function Cg(){return{localeError:O5()}}s(Cg,"Ul"),o(Cg,"default");var R5=o(()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${u.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`}case"invalid_value":return u.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${V(u.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${u.origin??"\u503C"} ${n}${u.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${u.origin??"\u503C"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.prefix}" \u5F00\u5934`:n.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.suffix}" \u7ED3\u5C3E`:n.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${n.pattern}`:`\u65E0\u6548${r[n.format]??u.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${u.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${u.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function xg(){return{localeError:R5()}}s(xg,"Ll"),o(xg,"default");var T5=o(()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${u.expected}\uFF0C\u4F46\u6536\u5230 ${l}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n}\uFF0C\u4F46\u6536\u5230 ${l}`}case"invalid_value":return u.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${V(u.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${u.origin??"\u503C"} \u61C9\u70BA ${n}${u.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${u.origin??"\u503C"} \u61C9\u70BA ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${u.origin} \u61C9\u70BA ${n}${u.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${u.origin} \u61C9\u70BA ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.prefix}" \u958B\u982D`:n.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.suffix}" \u7D50\u5C3E`:n.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${n.pattern}`:`\u7121\u6548\u7684 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${u.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${u.keys.length>1?"\u5011":""}\uFF1A${z(u.keys,"\u3001")}`;case"invalid_key":return`${u.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${u.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function kg(){return{localeError:T5()}}s(kg,"Fl"),o(kg,"default");var M5=o(()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${u.expected}, \xE0m\u1ECD\u0300 a r\xED ${l}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n}, \xE0m\u1ECD\u0300 a r\xED ${l}`}case"invalid_value":return u.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${V(u.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${u.origin??"iye"} ${a.verb} ${n}${u.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${u.maximum}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${u.origin} ${a.verb} ${n}${u.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${u.minimum}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${n.prefix}"`:n.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${n.suffix}"`:n.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${n.includes}"`:n.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${n.pattern}`:`A\u1E63\xEC\u1E63e: ${r[n.format]??u.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${u.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${z(u.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${u.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${u.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}},"error");function Ag(){return{localeError:M5()}}s(Ag,"Zl"),o(Ag,"default");var _g,Ig=Symbol("ZodOutput"),Sg=Symbol("ZodInput"),Fg=class{static{s(this,"ei")}static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...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 ln(){return new Fg}s(ln,"ti"),o(ln,"registry"),(_g=globalThis).__zod_globalRegistry??(_g.__zod_globalRegistry=ln());var Ne=globalThis.__zod_globalRegistry;function Pa(e,t){return new e({type:"string",...T(t)})}s(Pa,"Vl"),o(Pa,"_string");function Ua(e,t){return new e({type:"string",coerce:!0,...T(t)})}s(Ua,"Gl"),o(Ua,"_coercedString");function dn(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...T(t)})}s(dn,"ri"),o(dn,"_email");function Wu(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...T(t)})}s(Wu,"Sn"),o(Wu,"_guid");function cn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...T(t)})}s(cn,"ni"),o(cn,"_uuid");function pn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...T(t)})}s(pn,"oi"),o(pn,"_uuidv4");function mn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...T(t)})}s(mn,"ii"),o(mn,"_uuidv6");function fn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...T(t)})}s(fn,"si"),o(fn,"_uuidv7");function Gu(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...T(t)})}s(Gu,"In"),o(Gu,"_url");function gn(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...T(t)})}s(gn,"ai"),o(gn,"_emoji");function hn(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...T(t)})}s(hn,"ci"),o(hn,"_nanoid");function vn(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...T(t)})}s(vn,"ui"),o(vn,"_cuid");function yn(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...T(t)})}s(yn,"li"),o(yn,"_cuid2");function En(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...T(t)})}s(En,"di"),o(En,"_ulid");function bn(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...T(t)})}s(bn,"pi"),o(bn,"_xid");function Dn(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...T(t)})}s(Dn,"fi"),o(Dn,"_ksuid");function wn(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...T(t)})}s(wn,"mi"),o(wn,"_ipv4");function Bn(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...T(t)})}s(Bn,"gi"),o(Bn,"_ipv6");function Za(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...T(t)})}s(Za,"Jl"),o(Za,"_mac");function $n(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...T(t)})}s($n,"hi"),o($n,"_cidrv4");function Cn(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...T(t)})}s(Cn,"vi"),o(Cn,"_cidrv6");function xn(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...T(t)})}s(xn,"yi"),o(xn,"_base64");function kn(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...T(t)})}s(kn,"bi"),o(kn,"_base64url");function An(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...T(t)})}s(An,"wi"),o(An,"_e164");function _n(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...T(t)})}s(_n,"xi"),o(_n,"_jwt");var zg={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function qa(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...T(t)})}s(qa,"Wl"),o(qa,"_isoDateTime");function La(e,t){return new e({type:"string",format:"date",check:"string_format",...T(t)})}s(La,"Xl"),o(La,"_isoDate");function Ja(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...T(t)})}s(Ja,"Hl"),o(Ja,"_isoTime");function Va(e,t){return new e({type:"string",format:"duration",check:"string_format",...T(t)})}s(Va,"Yl"),o(Va,"_isoDuration");function Wa(e,t){return new e({type:"number",checks:[],...T(t)})}s(Wa,"Ql"),o(Wa,"_number");function Ga(e,t){return new e({type:"number",coerce:!0,checks:[],...T(t)})}s(Ga,"ed"),o(Ga,"_coercedNumber");function Ka(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...T(t)})}s(Ka,"td"),o(Ka,"_int");function Ha(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...T(t)})}s(Ha,"rd"),o(Ha,"_float32");function Xa(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...T(t)})}s(Xa,"nd"),o(Xa,"_float64");function Ya(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...T(t)})}s(Ya,"od"),o(Ya,"_int32");function Qa(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...T(t)})}s(Qa,"id"),o(Qa,"_uint32");function eo(e,t){return new e({type:"boolean",...T(t)})}s(eo,"sd"),o(eo,"_boolean");function to(e,t){return new e({type:"boolean",coerce:!0,...T(t)})}s(to,"ad"),o(to,"_coercedBoolean");function uo(e,t){return new e({type:"bigint",...T(t)})}s(uo,"cd"),o(uo,"_bigint");function ro(e,t){return new e({type:"bigint",coerce:!0,...T(t)})}s(ro,"ud"),o(ro,"_coercedBigint");function no(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...T(t)})}s(no,"ld"),o(no,"_int64");function io(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...T(t)})}s(io,"dd"),o(io,"_uint64");function so(e,t){return new e({type:"symbol",...T(t)})}s(so,"pd"),o(so,"_symbol");function ao(e,t){return new e({type:"undefined",...T(t)})}s(ao,"fd"),o(ao,"_undefined");function oo(e,t){return new e({type:"null",...T(t)})}s(oo,"md"),o(oo,"_null");function lo(e){return new e({type:"any"})}s(lo,"gd"),o(lo,"_any");function co(e){return new e({type:"unknown"})}s(co,"hd"),o(co,"_unknown");function po(e,t){return new e({type:"never",...T(t)})}s(po,"vd"),o(po,"_never");function mo(e,t){return new e({type:"void",...T(t)})}s(mo,"yd"),o(mo,"_void");function fo(e,t){return new e({type:"date",...T(t)})}s(fo,"bd"),o(fo,"_date");function go(e,t){return new e({type:"date",coerce:!0,...T(t)})}s(go,"wd"),o(go,"_coercedDate");function ho(e,t){return new e({type:"nan",...T(t)})}s(ho,"xd"),o(ho,"_nan");function He(e,t){return new na({check:"less_than",...T(t),value:e,inclusive:!1})}s(He,"We"),o(He,"_lt");function Ie(e,t){return new na({check:"less_than",...T(t),value:e,inclusive:!0})}s(Ie,"De"),o(Ie,"_lte");function Xe(e,t){return new ia({check:"greater_than",...T(t),value:e,inclusive:!1})}s(Xe,"Xe"),o(Xe,"_gt");function we(e,t){return new ia({check:"greater_than",...T(t),value:e,inclusive:!0})}s(we,"Se"),o(we,"_gte");function In(e){return Xe(0,e)}s(In,"$i"),o(In,"_positive");function Sn(e){return He(0,e)}s(Sn,"_i"),o(Sn,"_negative");function Fn(e){return Ie(0,e)}s(Fn,"ki"),o(Fn,"_nonpositive");function zn(e){return we(0,e)}s(zn,"Si"),o(zn,"_nonnegative");function $t(e,t){return new n4({check:"multiple_of",...T(t),value:e})}s($t,"ht"),o($t,"_multipleOf");function Ct(e,t){return new a4({check:"max_size",...T(t),maximum:e})}s(Ct,"vt"),o(Ct,"_maxSize");function Ye(e,t){return new o4({check:"min_size",...T(t),minimum:e})}s(Ye,"He"),o(Ye,"_minSize");function Ht(e,t){return new l4({check:"size_equals",...T(t),size:e})}s(Ht,"Ct"),o(Ht,"_size");function Xt(e,t){return new d4({check:"max_length",...T(t),maximum:e})}s(Xt,"Ut"),o(Xt,"_maxLength");function st(e,t){return new c4({check:"min_length",...T(t),minimum:e})}s(st,"at"),o(st,"_minLength");function Yt(e,t){return new p4({check:"length_equals",...T(t),length:e})}s(Yt,"Lt"),o(Yt,"_length");function Ku(e,t){return new m4({check:"string_format",format:"regex",...T(t),pattern:e})}s(Ku,"pr"),o(Ku,"_regex");function Hu(e){return new f4({check:"string_format",format:"lowercase",...T(e)})}s(Hu,"fr"),o(Hu,"_lowercase");function Xu(e){return new g4({check:"string_format",format:"uppercase",...T(e)})}s(Xu,"mr"),o(Xu,"_uppercase");function Yu(e,t){return new h4({check:"string_format",format:"includes",...T(t),includes:e})}s(Yu,"gr"),o(Yu,"_includes");function Qu(e,t){return new v4({check:"string_format",format:"starts_with",...T(t),prefix:e})}s(Qu,"hr"),o(Qu,"_startsWith");function er(e,t){return new y4({check:"string_format",format:"ends_with",...T(t),suffix:e})}s(er,"vr"),o(er,"_endsWith");function jn(e,t,r){return new E4({check:"property",property:e,schema:t,...T(r)})}s(jn,"Ii"),o(jn,"_property");function tr(e,t){return new b4({check:"mime_type",mime:e,...T(t)})}s(tr,"yr"),o(tr,"_mime");function Ze(e){return new D4({check:"overwrite",tx:e})}s(Ze,"Je"),o(Ze,"_overwrite");function ur(e){return Ze(t=>t.normalize(e))}s(ur,"br"),o(ur,"_normalize");function rr(){return Ze(e=>e.trim())}s(rr,"wr"),o(rr,"_trim");function nr(){return Ze(e=>e.toLowerCase())}s(nr,"xr"),o(nr,"_toLowerCase");function ir(){return Ze(e=>e.toUpperCase())}s(ir,"$r"),o(ir,"_toUpperCase");function sr(){return Ze(e=>Ss(e))}s(sr,"_r"),o(sr,"_slugify");function vo(e,t,r){return new e({type:"array",element:t,...T(r)})}s(vo,"$d"),o(vo,"_array");function jg(e,t,r){return new e({type:"union",options:t,...T(r)})}s(jg,"NS"),o(jg,"_union");function Ng(e,t,r){return new e({type:"union",options:t,inclusive:!1,...T(r)})}s(Ng,"PS"),o(Ng,"_xor");function Og(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...T(i)})}s(Og,"DS"),o(Og,"_discriminatedUnion");function Rg(e,t,r){return new e({type:"intersection",left:t,right:r})}s(Rg,"MS"),o(Rg,"_intersection");function Tg(e,t,r,i){let u=r instanceof K,n=u?i:r,a=u?r:null;return new e({type:"tuple",items:t,rest:a,...T(n)})}s(Tg,"CS"),o(Tg,"_tuple");function Mg(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...T(i)})}s(Mg,"US"),o(Mg,"_record");function Pg(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...T(i)})}s(Pg,"LS"),o(Pg,"_map");function Ug(e,t,r){return new e({type:"set",valueType:t,...T(r)})}s(Ug,"FS"),o(Ug,"_set");function Zg(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(u=>[u,u])):t;return new e({type:"enum",entries:i,...T(r)})}s(Zg,"ZS"),o(Zg,"_enum");function qg(e,t,r){return new e({type:"enum",entries:t,...T(r)})}s(qg,"BS"),o(qg,"_nativeEnum");function Lg(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...T(r)})}s(Lg,"qS"),o(Lg,"_literal");function yo(e,t){return new e({type:"file",...T(t)})}s(yo,"_d"),o(yo,"_file");function Jg(e,t){return new e({type:"transform",transform:t})}s(Jg,"VS"),o(Jg,"_transform");function Vg(e,t){return new e({type:"optional",innerType:t})}s(Vg,"GS"),o(Vg,"_optional");function Wg(e,t){return new e({type:"nullable",innerType:t})}s(Wg,"JS"),o(Wg,"_nullable");function Gg(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():zs(r)}})}s(Gg,"KS"),o(Gg,"_default");function Kg(e,t,r){return new e({type:"nonoptional",innerType:t,...T(r)})}s(Kg,"WS"),o(Kg,"_nonoptional");function Hg(e,t){return new e({type:"success",innerType:t})}s(Hg,"XS"),o(Hg,"_success");function Xg(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}s(Xg,"HS"),o(Xg,"_catch");function Yg(e,t,r){return new e({type:"pipe",in:t,out:r})}s(Yg,"YS"),o(Yg,"_pipe");function Qg(e,t){return new e({type:"readonly",innerType:t})}s(Qg,"QS"),o(Qg,"_readonly");function eh(e,t,r){return new e({type:"template_literal",parts:t,...T(r)})}s(eh,"eI"),o(eh,"_templateLiteral");function th(e,t){return new e({type:"lazy",getter:t})}s(th,"tI"),o(th,"_lazy");function uh(e,t){return new e({type:"promise",innerType:t})}s(uh,"rI"),o(uh,"_promise");function Eo(e,t,r){let i=T(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}s(Eo,"kd"),o(Eo,"_custom");function bo(e,t,r){return new e({type:"custom",check:"custom",fn:t,...T(r)})}s(bo,"Sd"),o(bo,"_refine");function Do(e,t){let r=wo(i=>(i.addIssue=u=>{if(typeof u=="string")i.issues.push(Nu(u,i.value,r._zod.def));else{let n=u;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=i.value),n.inst??(n.inst=r),n.continue??(n.continue=!r._zod.def.abort),i.issues.push(Nu(n))}},e(i.value,i)),t);return r}s(Do,"Id"),o(Do,"_superRefine");function wo(e,t){let r=new oe({check:"custom",...T(t)});return r._zod.check=e,r}s(wo,"pb"),o(wo,"_check");function Bo(e){let t=new oe({check:"describe"});return t._zod.onattach=[r=>{let i=Ne.get(r)??{};Ne.add(r,{...i,description:e})}],t._zod.check=()=>{},t}s(Bo,"Rd"),o(Bo,"describe");function $o(e){let t=new oe({check:"meta"});return t._zod.onattach=[r=>{let i=Ne.get(r)??{};Ne.add(r,{...i,...e})}],t._zod.check=()=>{},t}s($o,"Td"),o($o,"meta");function Co(e,t){let r=T(t),i=r.truthy??["true","1","yes","on","y","enabled"],u=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(m=>typeof m=="string"?m.toLowerCase():m),u=u.map(m=>typeof m=="string"?m.toLowerCase():m));let n=new Set(i),a=new Set(u),l=e.Codec??_a,d=e.Boolean??da,p=e.String??Uu,c=new p({type:"string",error:r.error}),f=new d({type:"boolean",error:r.error}),g=new l({type:"pipe",in:c,out:f,transform:o(((m,h)=>{let E=m;return r.case!=="sensitive"&&(E=E.toLowerCase()),n.has(E)?!0:a.has(E)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...n,...a],input:h.value,inst:g,continue:!1}),{})}),"transform"),reverseTransform:o(((m,h)=>m===!0?i[0]||"true":u[0]||"false"),"reverseTransform"),error:r.error});return g}s(Co,"Ed"),o(Co,"_stringbool");function Qt(e,t,r,i={}){let u=T(i),n={...T(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...u};return r instanceof RegExp&&(n.pattern=r),new e(n)}s(Qt,"kr"),o(Qt,"_stringFormat");function xt(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Ne,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}}s(xt,"yt"),o(xt,"initializeContext");function re(e,t,r={path:[],schemaPath:[]}){var i;let u=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let l=e._zod.toJSONSchema?.();if(l)a.schema=l;else{let p={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,p);else{let f=a.schema,g=t.processors[u.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);g(e,t,f,p)}let c=e._zod.parent;c&&(a.ref||(a.ref=c),re(c,t,p),t.seen.get(c).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),t.io==="input"&&be(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}s(re,"te"),o(re,"process");function kt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let l=e.metadataRegistry.get(a[0])?.id;if(l){let d=i.get(l);if(d&&d!==a[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(l,a[0])}}let u=o(a=>{let l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let c=e.external.registry.get(a[0])?.id,f=e.external.uri??(m=>m);if(c)return{ref:f(c)};let g=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=g,{defId:g,ref:`${f("__shared")}#/${l}/${g}`}}if(a[1]===r)return{ref:"#"};let d=`#/${l}/`,p=a[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:d+p}},"makeURI"),n=o(a=>{if(a[1].schema.$ref)return;let l=a[1],{ref:d,defId:p}=u(a);l.def={...l.schema},p&&(l.defId=p);let c=l.schema;for(let f in c)delete c[f];c.$ref=d},"extractToDef");if(e.cycles==="throw")for(let a of e.seen.entries()){let l=a[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
|
|
63
|
+
`)}g.write("payload.value = newResult;"),g.write("return payload;");let $=g.compile();return(A,I)=>$(f,A,I)},"generateFastpass"),n,a=wt,l=!Iu.jitless,d=l&&om.value,p=t.catchall,c;e._zod.parse=(f,g)=>{c??(c=i.value);let m=f.value;return a(m)?l&&d&&g?.async===!1&&g.jitless!==!0?(n||(n=u(t.shape)),f=n(f,g),p?ga([],m,f,g,c,e):f):r(f,g):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f)}});function ha(e,t,r,i){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let u=e.filter(n=>!nt(n));return u.length===1?(t.value=u[0].value,u[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(a=>$e(a,i,he())))}),t)}s(ha,"By"),o(ha,"handleUnionResults");var an=B("$ZodUnion",(e,t)=>{K.init(e,t),Y(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Y(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Y(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Y(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>Fu(u.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,u)=>{if(r)return r(i,u);let n=!1,a=[];for(let l of t.options){let d=l._zod.run({value:i.value,issues:[]},u);if(d instanceof Promise)a.push(d),n=!0;else{if(d.issues.length===0)return d;a.push(d)}}return n?Promise.all(a).then(l=>ha(l,i,e,u)):ha(a,i,e,u)}});function va(e,t,r,i){let u=e.filter(n=>n.issues.length===0);return u.length===1?(t.value=u[0].value,t):(u.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(a=>$e(a,i,he())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}s(va,"qy"),o(va,"handleExclusiveUnionResults");var lf=B("$ZodXor",(e,t)=>{an.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,u)=>{if(r)return r(i,u);let n=!1,a=[];for(let l of t.options){let d=l._zod.run({value:i.value,issues:[]},u);d instanceof Promise?(a.push(d),n=!0):a.push(d)}return n?Promise.all(a).then(l=>va(l,i,e,u)):va(a,i,e,u)}}),df=B("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,an.init(e,t);let r=e._zod.parse;Y(e._zod,"propValues",()=>{let u={};for(let n of t.options){let a=n._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[l,d]of Object.entries(a)){u[l]||(u[l]=new Set);for(let p of d)u[l].add(p)}}return u});let i=Jt(()=>{let u=t.options,n=new Map;for(let a of u){let l=a._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let d of l){if(n.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);n.set(d,a)}}return n});e._zod.parse=(u,n)=>{let a=u.value;if(!wt(a))return u.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),u;let l=i.value.get(a?.[t.discriminator]);return l?l._zod.run(u,n):t.unionFallback||n.direction==="backward"?r(u,n):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),u)}}),cf=B("$ZodIntersection",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value,n=t.left._zod.run({value:u,issues:[]},i),a=t.right._zod.run({value:u,issues:[]},i);return n instanceof Promise||a instanceof Promise?Promise.all([n,a]).then(([l,d])=>ya(r,l,d)):ya(r,n,a)}});function on(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(rt(e)&&rt(t)){let r=Object.keys(t),i=Object.keys(e).filter(n=>r.indexOf(n)!==-1),u={...e,...t};for(let n of i){let a=on(e[n],t[n]);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};u[n]=a.data}return{valid:!0,data:u}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let u=e[i],n=t[i],a=on(u,n);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}s(on,"Uc"),o(on,"mergeValues");function ya(e,t,r){let i=new Map,u;for(let l of t.issues)if(l.code==="unrecognized_keys"){u??(u=l);for(let d of l.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(l);for(let l of r.issues)if(l.code==="unrecognized_keys")for(let d of l.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(l);let n=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(n.length&&u&&e.issues.push({...u,keys:n}),nt(e))return e;let a=on(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}s(ya,"Vy"),o(ya,"handleIntersectionResults");var Ea=B("$ZodTuple",(e,t)=>{K.init(e,t);let r=t.items;e._zod.parse=(i,u)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({input:n,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],l=ba(r,"optin"),d=ba(r,"optout");if(!t.rest){if(n.length<l)return i.issues.push({code:"too_small",minimum:l,inclusive:!0,input:n,inst:e,origin:"array"}),i;n.length>r.length&&i.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:n,inst:e,origin:"array"})}let p=new Array(r.length);for(let c=0;c<r.length;c++){let f=r[c]._zod.run({value:n[c],issues:[]},u);f instanceof Promise?a.push(f.then(g=>{p[c]=g})):p[c]=f}if(t.rest){let c=r.length-1,f=n.slice(r.length);for(let g of f){c++;let m=t.rest._zod.run({value:g,issues:[]},u);m instanceof Promise?a.push(m.then(h=>Da(h,i,c))):Da(m,i,c)}}return a.length?Promise.all(a).then(()=>wa(p,i,r,n,d)):wa(p,i,r,n,d)}});function ba(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}s(ba,"Gy"),o(ba,"getTupleOptStart");function Da(e,t,r){e.issues.length&&t.issues.push(...Ae(r,e.issues)),t.value[r]=e.value}s(Da,"Jy"),o(Da,"handleTupleResult");function wa(e,t,r,i,u){for(let n=0;n<r.length;n++){let a=e[n],l=n<i.length;if(a.issues.length){if(!l&&n>=u){t.value.length=n;break}t.issues.push(...Ae(n,a.issues))}t.value[n]=a.value}for(let n=t.value.length-1;n>=i.length&&r[n]._zod.optout==="optional"&&t.value[n]===void 0;n--)t.value.length=n;return t}s(wa,"Ky"),o(wa,"handleTupleResults");var pf=B("$ZodRecord",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!rt(u))return r.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),r;let n=[],a=t.keyType._zod.values;if(a){r.value={};let l=new Set;for(let p of a)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){l.add(typeof p=="number"?p.toString():p);let c=t.keyType._zod.run({value:p,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(m=>$e(m,i,he())),input:p,path:[p],inst:e});continue}let f=c.value,g=t.valueType._zod.run({value:u[p],issues:[]},i);g instanceof Promise?n.push(g.then(m=>{m.issues.length&&r.issues.push(...Ae(p,m.issues)),r.value[f]=m.value})):(g.issues.length&&r.issues.push(...Ae(p,g.issues)),r.value[f]=g.value)}let d;for(let p in u)l.has(p)||(d=d??[],d.push(p));d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:d})}else{r.value={};for(let l of Reflect.ownKeys(u)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(u,l))continue;let d=t.keyType._zod.run({value:l,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&na.test(l)&&d.issues.length){let c=t.keyType._zod.run({value:Number(l),issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");c.issues.length===0&&(d=c)}if(d.issues.length){t.mode==="loose"?r.value[l]=u[l]:r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(c=>$e(c,i,he())),input:l,path:[l],inst:e});continue}let p=t.valueType._zod.run({value:u[l],issues:[]},i);p instanceof Promise?n.push(p.then(c=>{c.issues.length&&r.issues.push(...Ae(l,c.issues)),r.value[d.value]=c.value})):(p.issues.length&&r.issues.push(...Ae(l,p.issues)),r.value[d.value]=p.value)}}return n.length?Promise.all(n).then(()=>r):r}}),mf=B("$ZodMap",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!(u instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:u,inst:e}),r;let n=[];r.value=new Map;for(let[a,l]of u){let d=t.keyType._zod.run({value:a,issues:[]},i),p=t.valueType._zod.run({value:l,issues:[]},i);d instanceof Promise||p instanceof Promise?n.push(Promise.all([d,p]).then(([c,f])=>{Ba(c,f,r,a,u,e,i)})):Ba(d,p,r,a,u,e,i)}return n.length?Promise.all(n).then(()=>r):r}});function Ba(e,t,r,i,u,n,a){e.issues.length&&(un.has(typeof i)?r.issues.push(...Ae(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:u,inst:n,issues:e.issues.map(l=>$e(l,a,he()))})),t.issues.length&&(un.has(typeof i)?r.issues.push(...Ae(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:u,inst:n,key:i,issues:t.issues.map(l=>$e(l,a,he()))})),r.value.set(e.value,t.value)}s(Ba,"Wy"),o(Ba,"handleMapResult");var ff=B("$ZodSet",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!(u instanceof Set))return r.issues.push({input:u,inst:e,expected:"set",code:"invalid_type"}),r;let n=[];r.value=new Set;for(let a of u){let l=t.valueType._zod.run({value:a,issues:[]},i);l instanceof Promise?n.push(l.then(d=>$a(d,r))):$a(l,r)}return n.length?Promise.all(n).then(()=>r):r}});function $a(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}s($a,"Xy"),o($a,"handleSetResult");var gf=B("$ZodEnum",(e,t)=>{K.init(e,t);let r=en(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(u=>un.has(typeof u)).map(u=>typeof u=="string"?Ue(u):u.toString()).join("|")})$`),e._zod.parse=(u,n)=>{let a=u.value;return i.has(a)||u.issues.push({code:"invalid_value",values:r,input:a,inst:e}),u}}),hf=B("$ZodLiteral",(e,t)=>{if(K.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Ue(i):i?Ue(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,u)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),vf=B("$ZodFile",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return u instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:u,inst:e}),r}}),yf=B("$ZodTransform",(e,t)=>{K.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Qr(e.constructor.name);let u=t.transform(r.value,r);if(i.async)return(u instanceof Promise?u:Promise.resolve(u)).then(n=>(r.value=n,r.fallback=!0,r));if(u instanceof Promise)throw new Dt;return r.value=u,r.fallback=!0,r}});function Ca(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}s(Ca,"Hy"),o(Ca,"handleOptionalResult");var xa=B("$ZodOptional",(e,t)=>{K.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Y(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Fu(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){let u=r.value,n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(a=>Ca(a,u)):Ca(n,u)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),Ef=B("$ZodExactOptional",(e,t)=>{xa.init(e,t),Y(e._zod,"values",()=>t.innerType._zod.values),Y(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),bf=B("$ZodNullable",(e,t)=>{K.init(e,t),Y(e._zod,"optin",()=>t.innerType._zod.optin),Y(e._zod,"optout",()=>t.innerType._zod.optout),Y(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Fu(r.source)}|null)$`):void 0}),Y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),Df=B("$ZodDefault",(e,t)=>{K.init(e,t),e._zod.optin="optional",Y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>ka(n,t)):ka(u,t)}});function ka(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}s(ka,"Yy"),o(ka,"handleDefaultResult");var wf=B("$ZodPrefault",(e,t)=>{K.init(e,t),e._zod.optin="optional",Y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),Bf=B("$ZodNonOptional",(e,t)=>{K.init(e,t),Y(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>Aa(n,e)):Aa(u,e)}});function Aa(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}s(Aa,"Qy"),o(Aa,"handleNonOptionalResult");var $f=B("$ZodSuccess",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Qr("ZodSuccess");let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>(r.value=n.issues.length===0,r)):(r.value=u.issues.length===0,r)}}),Cf=B("$ZodCatch",(e,t)=>{K.init(e,t),e._zod.optin="optional",Y(e._zod,"optout",()=>t.innerType._zod.optout),Y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(a=>$e(a,i,he()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=u.value,u.issues.length&&(r.value=t.catchValue({...r,error:{issues:u.issues.map(n=>$e(n,i,he()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),xf=B("$ZodNaN",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),_a=B("$ZodPipe",(e,t)=>{K.init(e,t),Y(e._zod,"values",()=>t.in._zod.values),Y(e._zod,"optin",()=>t.in._zod.optin),Y(e._zod,"optout",()=>t.out._zod.optout),Y(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let n=t.out._zod.run(r,i);return n instanceof Promise?n.then(a=>qu(a,t.in,i)):qu(n,t.in,i)}let u=t.in._zod.run(r,i);return u instanceof Promise?u.then(n=>qu(n,t.out,i)):qu(u,t.out,i)}});function qu(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}s(qu,"Vo"),o(qu,"handlePipeResult");var Ia=B("$ZodCodec",(e,t)=>{K.init(e,t),Y(e._zod,"values",()=>t.in._zod.values),Y(e._zod,"optin",()=>t.in._zod.optin),Y(e._zod,"optout",()=>t.out._zod.optout),Y(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let u=t.in._zod.run(r,i);return u instanceof Promise?u.then(n=>Lu(n,t,i)):Lu(u,t,i)}else{let u=t.out._zod.run(r,i);return u instanceof Promise?u.then(n=>Lu(n,t,i)):Lu(u,t,i)}}});function Lu(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(u=>Ju(e,u,t.out,r)):Ju(e,i,t.out,r)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(u=>Ju(e,u,t.in,r)):Ju(e,i,t.in,r)}}s(Lu,"Go"),o(Lu,"handleCodecAResult");function Ju(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}s(Ju,"Jo"),o(Ju,"handleCodecTxResult");var kf=B("$ZodPreprocess",(e,t)=>{_a.init(e,t)}),Af=B("$ZodReadonly",(e,t)=>{K.init(e,t),Y(e._zod,"propValues",()=>t.innerType._zod.propValues),Y(e._zod,"values",()=>t.innerType._zod.values),Y(e._zod,"optin",()=>t.innerType?._zod?.optin),Y(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(Sa):Sa(u)}});function Sa(e){return e.value=Object.freeze(e.value),e}s(Sa,"eb"),o(Sa,"handleReadonlyResult");var _f=B("$ZodTemplateLiteral",(e,t)=>{K.init(e,t);let r=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let u=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!u)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let n=u.startsWith("^")?1:0,a=u.endsWith("$")?u.length-1:u.length;r.push(u.slice(n,a))}else if(i===null||dm.has(typeof i))r.push(Ue(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,u)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),If=B("$ZodFunction",(e,t)=>(K.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let u=e._def.input?qs(e._def.input,i):i,n=Reflect.apply(r,this,u);return e._def.output?qs(e._def.output,n):n}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let u=e._def.input?await Ls(e._def.input,i):i,n=await Reflect.apply(r,this,u);return e._def.output?await Ls(e._def.output,n):n}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Ea({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),Sf=B("$ZodPromise",(e,t)=>{K.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(u=>t.innerType._zod.run({value:u,issues:[]},i))}),Ff=B("$ZodLazy",(e,t)=>{K.init(e,t),Y(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),Y(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Y(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Y(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Y(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),zf=B("$ZodCustom",(e,t)=>{oe.init(e,t),K.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,u=t.fn(i);if(u instanceof Promise)return u.then(n=>Fa(n,r,i,e));Fa(u,r,i,e)}});function Fa(e,t,r,i){if(!e){let u={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(u.params=i._zod.def.params),t.issues.push(Nu(u))}}s(Fa,"tb"),o(Fa,"handleRefineResult");var za={};Ge(za,{ar:s(()=>jf,"ar"),az:s(()=>Nf,"az"),be:s(()=>Of,"be"),bg:s(()=>Rf,"bg"),ca:s(()=>Tf,"ca"),cs:s(()=>Mf,"cs"),da:s(()=>Pf,"da"),de:s(()=>Uf,"de"),el:s(()=>Zf,"el"),en:s(()=>Na,"en"),eo:s(()=>qf,"eo"),es:s(()=>Lf,"es"),fa:s(()=>Jf,"fa"),fi:s(()=>Vf,"fi"),fr:s(()=>Wf,"fr"),frCA:s(()=>Gf,"frCA"),he:s(()=>Kf,"he"),hr:s(()=>Hf,"hr"),hu:s(()=>Xf,"hu"),hy:s(()=>Yf,"hy"),id:s(()=>Qf,"id"),is:s(()=>eg,"is"),it:s(()=>tg,"it"),ja:s(()=>ug,"ja"),ka:s(()=>rg,"ka"),kh:s(()=>ng,"kh"),km:s(()=>Ra,"km"),ko:s(()=>ig,"ko"),lt:s(()=>sg,"lt"),mk:s(()=>ag,"mk"),ms:s(()=>og,"ms"),nl:s(()=>lg,"nl"),no:s(()=>dg,"no"),ota:s(()=>cg,"ota"),pl:s(()=>mg,"pl"),ps:s(()=>pg,"ps"),pt:s(()=>fg,"pt"),ro:s(()=>gg,"ro"),ru:s(()=>hg,"ru"),sl:s(()=>vg,"sl"),sv:s(()=>yg,"sv"),ta:s(()=>Eg,"ta"),th:s(()=>bg,"th"),tr:s(()=>Dg,"tr"),ua:s(()=>wg,"ua"),uk:s(()=>Pa,"uk"),ur:s(()=>Bg,"ur"),uz:s(()=>$g,"uz"),vi:s(()=>Cg,"vi"),yo:s(()=>Ag,"yo"),zhCN:s(()=>xg,"zhCN"),zhTW:s(()=>kg,"zhTW")});var LE=o(()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${u.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`}case"invalid_value":return u.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${V(u.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${u.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${u.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${u.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${u.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${u.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${u.prefix}"`:n.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${n.suffix}"`:n.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${n.includes}"`:n.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${n.pattern}`:`${r[n.format]??u.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${u.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${u.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${u.keys.length>1?"\u0629":""}: ${z(u.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${u.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${u.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function jf(){return{localeError:LE()}}s(jf,"Wu"),o(jf,"default");var JE=o(()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${u.expected}, daxil olan ${l}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n}, daxil olan ${l}`}case"invalid_value":return u.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${V(u.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${u.origin??"d\u0259y\u0259r"} ${n}${u.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${u.origin??"d\u0259y\u0259r"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${n.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:n.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${n.suffix}" il\u0259 bitm\u0259lidir`:n.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${n.includes}" daxil olmal\u0131d\u0131r`:n.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${n.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[n.format]??u.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${u.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${u.keys.length>1?"lar":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${u.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function Nf(){return{localeError:JE()}}s(Nf,"Xu"),o(Nf,"default");function ja(e,t,r,i){let u=Math.abs(e),n=u%10,a=u%100;return a>=11&&a<=19?i:n===1?t:n>=2&&n<=4?r:i}s(ja,"ab"),o(ja,"getBelarusianPlural");var VE=o(()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${u.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${V(u.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=ja(l,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${u.maximum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=ja(l,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${u.minimum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${n.includes}"`:n.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${u.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${u.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${u.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function Of(){return{localeError:VE()}}s(Of,"Hu"),o(Of,"default");var WE=o(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${u.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${V(u.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${u.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${u.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;if(n.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${u.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${u.keys.length>1?"\u043E\u0432\u0435":""}: ${z(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${u.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${u.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}},"error");function Rf(){return{localeError:WE()}}s(Rf,"Yu"),o(Rf,"default");var GE=o(()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${u.expected}, s'ha rebut ${l}`:`Tipus inv\xE0lid: s'esperava ${n}, s'ha rebut ${l}`}case"invalid_value":return u.values.length===1?`Valor inv\xE0lid: s'esperava ${V(u.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${z(u.values," o ")}`;case"too_big":{let n=u.inclusive?"com a m\xE0xim":"menys de",a=t(u.origin);return a?`Massa gran: s'esperava que ${u.origin??"el valor"} contingu\xE9s ${n} ${u.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${u.origin??"el valor"} fos ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(u.origin);return a?`Massa petit: s'esperava que ${u.origin} contingu\xE9s ${n} ${u.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${u.origin} fos ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${n.prefix}"`:n.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${n.suffix}"`:n.format==="includes"?`Format inv\xE0lid: ha d'incloure "${n.includes}"`:n.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${n.pattern}`:`Format inv\xE0lid per a ${r[n.format]??u.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${u.divisor}`;case"unrecognized_keys":return`Clau${u.keys.length>1?"s":""} no reconeguda${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${u.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${u.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function Tf(){return{localeError:GE()}}s(Tf,"Qu"),o(Tf,"default");var KE=o(()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${u.expected}, obdr\u017Eeno ${l}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n}, obdr\u017Eeno ${l}`}case"invalid_value":return u.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${V(u.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${u.origin??"hodnota"} mus\xED m\xEDt ${n}${u.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${u.origin??"hodnota"} mus\xED b\xFDt ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${u.origin??"hodnota"} mus\xED m\xEDt ${n}${u.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${u.origin??"hodnota"} mus\xED b\xFDt ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${n.prefix}"`:n.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${n.suffix}"`:n.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${n.includes}"`:n.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${n.pattern}`:`Neplatn\xFD form\xE1t ${r[n.format]??u.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${u.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${z(u.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${u.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${u.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function Mf(){return{localeError:KE()}}s(Mf,"el"),o(Mf,"default");var HE=o(()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ugyldigt input: forventede instanceof ${u.expected}, fik ${l}`:`Ugyldigt input: forventede ${n}, fik ${l}`}case"invalid_value":return u.values.length===1?`Ugyldig v\xE6rdi: forventede ${V(u.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`For stor: forventede ${l??"value"} ${a.verb} ${n} ${u.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`For lille: forventede ${l} ${a.verb} ${n} ${u.minimum.toString()} ${a.unit}`:`For lille: forventede ${l} havde ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ugyldig streng: skal starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: skal ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: skal indeholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${r[n.format]??u.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${z(u.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${u.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${u.origin}`;default:return"Ugyldigt input"}}},"error");function Pf(){return{localeError:HE()}}s(Pf,"tl"),o(Pf,"default");var XE=o(()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${u.expected}, erhalten ${l}`:`Ung\xFCltige Eingabe: erwartet ${n}, erhalten ${l}`}case"invalid_value":return u.values.length===1?`Ung\xFCltige Eingabe: erwartet ${V(u.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Zu gro\xDF: erwartet, dass ${u.origin??"Wert"} ${n}${u.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${u.origin??"Wert"} ${n}${u.maximum.toString()} ist`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Zu klein: erwartet, dass ${u.origin} ${n}${u.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${u.origin} ${n}${u.minimum.toString()} ist`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ung\xFCltiger String: muss mit "${n.prefix}" beginnen`:n.format==="ends_with"?`Ung\xFCltiger String: muss mit "${n.suffix}" enden`:n.format==="includes"?`Ung\xFCltiger String: muss "${n.includes}" enthalten`:n.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${n.pattern} entsprechen`:`Ung\xFCltig: ${r[n.format]??u.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${u.divisor} sein`;case"unrecognized_keys":return`${u.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${z(u.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${u.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${u.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function Uf(){return{localeError:XE()}}s(Uf,"rl"),o(Uf,"default");var YE=o(()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return typeof u.expected=="string"&&/^[A-Z]/.test(u.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${u.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`}case"invalid_value":return u.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${V(u.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${u.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${u.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${n.prefix}"`:n.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${n.suffix}"`:n.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${n.includes}"`:n.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${n.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[n.format]??u.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${u.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${u.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${u.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${u.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${u.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}},"error");function Zf(){return{localeError:YE()}}s(Zf,"nl"),o(Zf,"default");var QE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return`Invalid input: expected ${n}, received ${l}`}case"invalid_value":return u.values.length===1?`Invalid input: expected ${V(u.values[0])}`:`Invalid option: expected one of ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Too big: expected ${u.origin??"value"} to have ${n}${u.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${u.origin??"value"} to be ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Too small: expected ${u.origin} to have ${n}${u.minimum.toString()} ${a.unit}`:`Too small: expected ${u.origin} to be ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??u.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${u.divisor}`;case"unrecognized_keys":return`Unrecognized key${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Invalid key in ${u.origin}`;case"invalid_union":return u.options&&Array.isArray(u.options)&&u.options.length>0?`Invalid discriminator value. Expected ${u.options.map(n=>`'${n}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${u.origin}`;default:return"Invalid input"}}},"error");function Na(){return{localeError:QE()}}s(Na,"wn"),o(Na,"default");var e5=o(()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${u.expected}, ricevi\u011Dis ${l}`:`Nevalida enigo: atendi\u011Dis ${n}, ricevi\u011Dis ${l}`}case"invalid_value":return u.values.length===1?`Nevalida enigo: atendi\u011Dis ${V(u.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Tro granda: atendi\u011Dis ke ${u.origin??"valoro"} havu ${n}${u.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${u.origin??"valoro"} havu ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Tro malgranda: atendi\u011Dis ke ${u.origin} havu ${n}${u.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${u.origin} estu ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??u.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${u.divisor}`;case"unrecognized_keys":return`Nekonata${u.keys.length>1?"j":""} \u015Dlosilo${u.keys.length>1?"j":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${u.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${u.origin}`;default:return"Nevalida enigo"}}},"error");function qf(){return{localeError:e5()}}s(qf,"ol"),o(qf,"default");var t5=o(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${u.expected}, recibido ${l}`:`Entrada inv\xE1lida: se esperaba ${n}, recibido ${l}`}case"invalid_value":return u.values.length===1?`Entrada inv\xE1lida: se esperaba ${V(u.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${n}${u.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Demasiado peque\xF1o: se esperaba que ${l} tuviera ${n}${u.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${l} fuera ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${n.prefix}"`:n.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${n.suffix}"`:n.format==="includes"?`Cadena inv\xE1lida: debe incluir "${n.includes}"`:n.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${n.pattern}`:`Inv\xE1lido ${r[n.format]??u.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${u.divisor}`;case"unrecognized_keys":return`Llave${u.keys.length>1?"s":""} desconocida${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[u.origin]??u.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[u.origin]??u.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function Lf(){return{localeError:t5()}}s(Lf,"il"),o(Lf,"default");var u5=o(()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${u.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return u.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${V(u.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${z(u.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${u.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${u.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:n.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:n.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${n.includes}" \u0628\u0627\u0634\u062F`:n.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${n.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[n.format]??u.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${u.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${u.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${z(u.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${u.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${u.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function Jf(){return{localeError:u5()}}s(Jf,"sl"),o(Jf,"default");var r5=o(()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Virheellinen tyyppi: odotettiin instanceof ${u.expected}, oli ${l}`:`Virheellinen tyyppi: odotettiin ${n}, oli ${l}`}case"invalid_value":return u.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${V(u.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${n}${u.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${n}${u.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${n.prefix}"`:n.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${n.suffix}"`:n.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${n.includes}"`:n.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${n.pattern}`:`Virheellinen ${r[n.format]??u.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${u.divisor} monikerta`;case"unrecognized_keys":return`${u.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${z(u.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}},"error");function Vf(){return{localeError:r5()}}s(Vf,"al"),o(Vf,"default");var n5=o(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entr\xE9e invalide : instanceof ${u.expected} attendu, ${l} re\xE7u`:`Entr\xE9e invalide : ${n} attendu, ${l} re\xE7u`}case"invalid_value":return u.values.length===1?`Entr\xE9e invalide : ${V(u.values[0])} attendu`:`Option invalide : une valeur parmi ${z(u.values,"|")} attendue`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Trop grand : ${i[u.origin]??"valeur"} doit ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[u.origin]??"valeur"} doit \xEAtre ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Trop petit : ${i[u.origin]??"valeur"} doit ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Trop petit : ${i[u.origin]??"valeur"} doit \xEAtre ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${n.pattern}`:`${r[n.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${u.divisor}`;case"unrecognized_keys":return`Cl\xE9${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${z(u.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${u.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Wf(){return{localeError:n5()}}s(Wf,"cl"),o(Wf,"default");var i5=o(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entr\xE9e invalide : attendu instanceof ${u.expected}, re\xE7u ${l}`:`Entr\xE9e invalide : attendu ${n}, re\xE7u ${l}`}case"invalid_value":return u.values.length===1?`Entr\xE9e invalide : attendu ${V(u.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"\u2264":"<",a=t(u.origin);return a?`Trop grand : attendu que ${u.origin??"la valeur"} ait ${n}${u.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${u.origin??"la valeur"} soit ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"\u2265":">",a=t(u.origin);return a?`Trop petit : attendu que ${u.origin} ait ${n}${u.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${u.origin} soit ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${n.pattern}`:`${r[n.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${u.divisor}`;case"unrecognized_keys":return`Cl\xE9${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${z(u.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${u.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Gf(){return{localeError:i5()}}s(Gf,"ul"),o(Gf,"default");var s5=o(()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=o(p=>p?e[p]:void 0,"typeEntry"),i=o(p=>{let c=r(p);return c?c.label:p??e.unknown.label},"typeLabel"),u=o(p=>`\u05D4${i(p)}`,"withDefinite"),n=o(p=>(r(p)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA","verbFor"),a=o(p=>p?t[p]??null:null,"getSizing"),l={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},d={nan:"NaN"};return p=>{switch(p.code){case"invalid_type":{let c=p.expected,f=d[c??""]??i(c),g=G(p.input),m=d[g]??e[g]?.label??g;return/^[A-Z]/.test(p.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${p.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(p.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${V(p.values[0])}`;let c=p.values.map(g=>V(g));if(p.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${c[0]} \u05D0\u05D5 ${c[1]}`;let f=c[c.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${c.slice(0,-1).join(", ")} \u05D0\u05D5 ${f}`}case"too_big":{let c=a(p.origin),f=u(p.origin??"value");if(p.origin==="string")return`${c?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${p.maximum.toString()} ${c?.unit??""} ${p.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(p.origin==="number"){let h=p.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${p.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${p.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(p.origin==="array"||p.origin==="set"){let h=p.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",E=p.inclusive?`${p.maximum} ${c?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${p.maximum} ${c?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${f} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`.trim()}let g=p.inclusive?"<=":"<",m=n(p.origin??"value");return c?.unit?`${c.longLabel} \u05DE\u05D3\u05D9: ${f} ${m} ${g}${p.maximum.toString()} ${c.unit}`:`${c?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${f} ${m} ${g}${p.maximum.toString()}`}case"too_small":{let c=a(p.origin),f=u(p.origin??"value");if(p.origin==="string")return`${c?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${p.minimum.toString()} ${c?.unit??""} ${p.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(p.origin==="number"){let h=p.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${p.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${p.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(p.origin==="array"||p.origin==="set"){let h=p.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(p.minimum===1&&p.inclusive){let D=(p.origin,"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${f} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${D}`}let E=p.inclusive?`${p.minimum} ${c?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${p.minimum} ${c?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${f} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`.trim()}let g=p.inclusive?">=":">",m=n(p.origin??"value");return c?.unit?`${c.shortLabel} \u05DE\u05D3\u05D9: ${f} ${m} ${g}${p.minimum.toString()} ${c.unit}`:`${c?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${f} ${m} ${g}${p.minimum.toString()}`}case"invalid_format":{let c=p;if(c.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${c.prefix}"`;if(c.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${c.suffix}"`;if(c.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${c.includes}"`;if(c.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${c.pattern}`;let f=l[c.format],g=f?.label??c.format,m=(f?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${m}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${p.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${p.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${p.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${z(p.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${u(p.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function Kf(){return{localeError:s5()}}s(Kf,"ll"),o(Kf,"default");var a5=o(()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${u.expected}, a primljeno je ${l}`:`Neispravan unos: o\u010Dekuje se ${n}, a primljeno je ${l}`}case"invalid_value":return u.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${V(u.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Preveliko: o\u010Dekivano da ${l??"vrijednost"} ima ${n}${u.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${l??"vrijednost"} bude ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Premalo: o\u010Dekivano da ${l} ima ${n}${u.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${l} bude ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${n.prefix}"`:n.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${n.suffix}"`:n.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${n.includes}"`:n.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${n.pattern}`:`Neispravna ${r[n.format]??u.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${u.divisor}`;case"unrecognized_keys":return`Neprepoznat${u.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${z(u.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[u.origin]??u.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[u.origin]??u.origin}`;default:return"Neispravan unos"}}},"error");function Hf(){return{localeError:a5()}}s(Hf,"dl"),o(Hf,"default");var o5=o(()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${u.expected}, a kapott \xE9rt\xE9k ${l}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n}, a kapott \xE9rt\xE9k ${l}`}case"invalid_value":return u.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${V(u.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`T\xFAl nagy: ${u.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${n}${u.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${u.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${u.origin} m\xE9rete t\xFAl kicsi ${n}${u.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${u.origin} t\xFAl kicsi ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\xC9rv\xE9nytelen string: "${n.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:n.format==="ends_with"?`\xC9rv\xE9nytelen string: "${n.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:n.format==="includes"?`\xC9rv\xE9nytelen string: "${n.includes}" \xE9rt\xE9ket kell tartalmaznia`:n.format==="regex"?`\xC9rv\xE9nytelen string: ${n.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[n.format]??u.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${u.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${u.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${u.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function Xf(){return{localeError:o5()}}s(Xf,"pl"),o(Xf,"default");function Oa(e,t,r){return Math.abs(e)===1?t:r}s(Oa,"cb"),o(Oa,"getArmenianPlural");function Bt(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}s(Bt,"dr"),o(Bt,"withDefiniteArticle");var l5=o(()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${u.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${n}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`}case"invalid_value":return u.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${V(u.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=Oa(l,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Bt(u.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${u.maximum.toString()} ${d}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Bt(u.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=Oa(l,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Bt(u.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${u.minimum.toString()} ${d}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Bt(u.origin)} \u056C\u056B\u0576\u056B ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${n.prefix}"-\u0578\u057E`:n.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${n.suffix}"-\u0578\u057E`:n.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${n.includes}"`:n.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${n.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[n.format]??u.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${u.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${u.keys.length>1?"\u0576\u0565\u0580":""}. ${z(u.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Bt(u.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Bt(u.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function Yf(){return{localeError:l5()}}s(Yf,"fl"),o(Yf,"default");var d5=o(()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input tidak valid: diharapkan instanceof ${u.expected}, diterima ${l}`:`Input tidak valid: diharapkan ${n}, diterima ${l}`}case"invalid_value":return u.values.length===1?`Input tidak valid: diharapkan ${V(u.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Terlalu besar: diharapkan ${u.origin??"value"} memiliki ${n}${u.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${u.origin??"value"} menjadi ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Terlalu kecil: diharapkan ${u.origin} memiliki ${n}${u.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${u.origin} menjadi ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`String tidak valid: harus dimulai dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak valid: harus berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak valid: harus menyertakan "${n.includes}"`:n.format==="regex"?`String tidak valid: harus sesuai pola ${n.pattern}`:`${r[n.format]??u.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${u.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${u.origin}`;default:return"Input tidak valid"}}},"error");function Qf(){return{localeError:d5()}}s(Qf,"ml"),o(Qf,"default");var c5=o(()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera instanceof ${u.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera ${n}`}case"invalid_value":return u.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${V(u.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin??"gildi"} hafi ${n}${u.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin??"gildi"} s\xE9 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin} hafi ${n}${u.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin} s\xE9 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??u.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${u.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${u.keys.length>1?"ir lyklar":"ur lykill"}: ${z(u.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${u.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${u.origin}`;default:return"Rangt gildi"}}},"error");function eg(){return{localeError:c5()}}s(eg,"gl"),o(eg,"default");var p5=o(()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input non valido: atteso instanceof ${u.expected}, ricevuto ${l}`:`Input non valido: atteso ${n}, ricevuto ${l}`}case"invalid_value":return u.values.length===1?`Input non valido: atteso ${V(u.values[0])}`:`Opzione non valida: atteso uno tra ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Troppo grande: ${u.origin??"valore"} deve avere ${n}${u.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${u.origin??"valore"} deve essere ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Troppo piccolo: ${u.origin} deve avere ${n}${u.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${u.origin} deve essere ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Stringa non valida: deve iniziare con "${n.prefix}"`:n.format==="ends_with"?`Stringa non valida: deve terminare con "${n.suffix}"`:n.format==="includes"?`Stringa non valida: deve includere "${n.includes}"`:n.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${n.pattern}`:`Input non valido: ${r[n.format]??u.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${u.divisor}`;case"unrecognized_keys":return`Chiav${u.keys.length>1?"i":"e"} non riconosciut${u.keys.length>1?"e":"a"}: ${z(u.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${u.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${u.origin}`;default:return"Input non valido"}}},"error");function tg(){return{localeError:p5()}}s(tg,"hl"),o(tg,"default");var m5=o(()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${u.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${n}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return u.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${V(u.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${z(u.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let n=u.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(u.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${u.origin??"\u5024"}\u306F${u.maximum.toString()}${a.unit??"\u8981\u7D20"}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${u.origin??"\u5024"}\u306F${u.maximum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let n=u.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(u.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${u.origin}\u306F${u.minimum.toString()}${a.unit}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${u.origin}\u306F${u.minimum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${n.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[n.format]??u.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${u.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${u.keys.length>1?"\u7FA4":""}: ${z(u.keys,"\u3001")}`;case"invalid_key":return`${u.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${u.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function ug(){return{localeError:m5()}}s(ug,"vl"),o(ug,"default");var f5=o(()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${u.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`}case"invalid_value":return u.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${V(u.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${z(u.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${u.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${u.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${u.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${u.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}},"error");function rg(){return{localeError:f5()}}s(rg,"yl"),o(rg,"default");var g5=o(()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${u.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`}case"invalid_value":return u.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${V(u.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${u.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin} ${n} ${u.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin} ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${n.prefix}"`:n.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${n.suffix}"`:n.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${n.includes}"`:n.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${n.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${u.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${z(u.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${u.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${u.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function Ra(){return{localeError:g5()}}s(Ra,"xn"),o(Ra,"default");function ng(){return Ra()}s(ng,"bl"),o(ng,"default");var h5=o(()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${u.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`}case"invalid_value":return u.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${V(u.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${z(u.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let n=u.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=n==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(u.origin),d=l?.unit??"\uC694\uC18C";return l?`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${u.maximum.toString()}${d} ${n}${a}`:`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${u.maximum.toString()} ${n}${a}`}case"too_small":{let n=u.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=n==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(u.origin),d=l?.unit??"\uC694\uC18C";return l?`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${u.minimum.toString()}${d} ${n}${a}`:`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${u.minimum.toString()} ${n}${a}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:n.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${n.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[n.format]??u.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${u.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${z(u.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${u.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${u.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function ig(){return{localeError:h5()}}s(ig,"wl"),o(ig,"default");var Vu=o(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function Ta(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}s(Ta,"ub"),o(Ta,"getUnitTypeFromNumber");var v5=o(()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(u,n,a,l){let d=e[u]??null;return d===null?d:{unit:d.unit[n],verb:d.verb[l][a?"inclusive":"notInclusive"]}}s(t,"t"),o(t,"getSizing");let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Gautas tipas ${l}, o tik\u0117tasi - instanceof ${u.expected}`:`Gautas tipas ${l}, o tik\u0117tasi - ${n}`}case"invalid_value":return u.values.length===1?`Privalo b\u016Bti ${V(u.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${z(u.values,"|")} pasirinkim\u0173`;case"too_big":{let n=i[u.origin]??u.origin,a=t(u.origin,Ta(Number(u.maximum)),u.inclusive??!1,"smaller");if(a?.verb)return`${Vu(n??u.origin??"reik\u0161m\u0117")} ${a.verb} ${u.maximum.toString()} ${a.unit??"element\u0173"}`;let l=u.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Vu(n??u.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${u.maximum.toString()} ${a?.unit}`}case"too_small":{let n=i[u.origin]??u.origin,a=t(u.origin,Ta(Number(u.minimum)),u.inclusive??!1,"bigger");if(a?.verb)return`${Vu(n??u.origin??"reik\u0161m\u0117")} ${a.verb} ${u.minimum.toString()} ${a.unit??"element\u0173"}`;let l=u.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Vu(n??u.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${u.minimum.toString()} ${a?.unit}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??u.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${u.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${u.keys.length>1?"i":"as"} rakt${u.keys.length>1?"ai":"as"}: ${z(u.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let n=i[u.origin]??u.origin;return`${Vu(n??u.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function sg(){return{localeError:v5()}}s(sg,"xl"),o(sg,"default");var y5=o(()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${u.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`Invalid input: expected ${V(u.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${n}${u.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin} \u0434\u0430 \u0438\u043C\u0430 ${n}${u.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${n.pattern}`:`Invalid ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${u.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${u.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function ag(){return{localeError:y5()}}s(ag,"$l"),o(ag,"default");var E5=o(()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input tidak sah: dijangka instanceof ${u.expected}, diterima ${l}`:`Input tidak sah: dijangka ${n}, diterima ${l}`}case"invalid_value":return u.values.length===1?`Input tidak sah: dijangka ${V(u.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Terlalu besar: dijangka ${u.origin??"nilai"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${u.origin??"nilai"} adalah ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Terlalu kecil: dijangka ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${u.origin} adalah ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`String tidak sah: mesti bermula dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak sah: mesti mengandungi "${n.includes}"`:n.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${n.pattern}`:`${r[n.format]??u.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${z(u.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${u.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${u.origin}`;default:return"Input tidak sah"}}},"error");function og(){return{localeError:E5()}}s(og,"_l"),o(og,"default");var b5=o(()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ongeldige invoer: verwacht instanceof ${u.expected}, ontving ${l}`:`Ongeldige invoer: verwacht ${n}, ontving ${l}`}case"invalid_value":return u.values.length===1?`Ongeldige invoer: verwacht ${V(u.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=u.origin==="date"?"laat":u.origin==="string"?"lang":"groot";return a?`Te ${l}: verwacht dat ${u.origin??"waarde"} ${n}${u.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${l}: verwacht dat ${u.origin??"waarde"} ${n}${u.maximum.toString()} is`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=u.origin==="date"?"vroeg":u.origin==="string"?"kort":"klein";return a?`Te ${l}: verwacht dat ${u.origin} ${n}${u.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${l}: verwacht dat ${u.origin} ${n}${u.minimum.toString()} is`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ongeldige tekst: moet met "${n.prefix}" beginnen`:n.format==="ends_with"?`Ongeldige tekst: moet op "${n.suffix}" eindigen`:n.format==="includes"?`Ongeldige tekst: moet "${n.includes}" bevatten`:n.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${n.pattern}`:`Ongeldig: ${r[n.format]??u.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${u.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${u.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${u.origin}`;default:return"Ongeldige invoer"}}},"error");function lg(){return{localeError:b5()}}s(lg,"kl"),o(lg,"default");var D5=o(()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ugyldig input: forventet instanceof ${u.expected}, fikk ${l}`:`Ugyldig input: forventet ${n}, fikk ${l}`}case"invalid_value":return u.values.length===1?`Ugyldig verdi: forventet ${V(u.values[0])}`:`Ugyldig valg: forventet en av ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`For stor(t): forventet ${u.origin??"value"} til \xE5 ha ${n}${u.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${u.origin??"value"} til \xE5 ha ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`For lite(n): forventet ${u.origin} til \xE5 ha ${n}${u.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${u.origin} til \xE5 ha ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${r[n.format]??u.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${z(u.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${u.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${u.origin}`;default:return"Ugyldig input"}}},"error");function dg(){return{localeError:D5()}}s(dg,"Sl"),o(dg,"default");var w5=o(()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`F\xE2sit giren: umulan instanceof ${u.expected}, al\u0131nan ${l}`:`F\xE2sit giren: umulan ${n}, al\u0131nan ${l}`}case"invalid_value":return u.values.length===1?`F\xE2sit giren: umulan ${V(u.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Fazla b\xFCy\xFCk: ${u.origin??"value"}, ${n}${u.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${u.origin??"value"}, ${n}${u.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Fazla k\xFC\xE7\xFCk: ${u.origin}, ${n}${u.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${u.origin}, ${n}${u.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let n=u;return n.format==="starts_with"?`F\xE2sit metin: "${n.prefix}" ile ba\u015Flamal\u0131.`:n.format==="ends_with"?`F\xE2sit metin: "${n.suffix}" ile bitmeli.`:n.format==="includes"?`F\xE2sit metin: "${n.includes}" ihtiv\xE2 etmeli.`:n.format==="regex"?`F\xE2sit metin: ${n.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[n.format]??u.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${u.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${u.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function cg(){return{localeError:w5()}}s(cg,"Il"),o(cg,"default");var B5=o(()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${u.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return u.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${V(u.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${z(u.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${u.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${u.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} \u0648\u064A`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} \u0648\u064A`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:n.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:n.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${n.includes}" \u0648\u0644\u0631\u064A`:n.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${n.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[n.format]??u.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${u.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${u.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${u.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${u.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function pg(){return{localeError:B5()}}s(pg,"Rl"),o(pg,"default");var $5=o(()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${u.expected}, otrzymano ${l}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n}, otrzymano ${l}`}case"invalid_value":return u.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${V(u.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${u.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${u.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${n.prefix}"`:n.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${n.suffix}"`:n.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${n.includes}"`:n.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${n.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[n.format]??u.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${u.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${u.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${u.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function mg(){return{localeError:$5()}}s(mg,"Tl"),o(mg,"default");var C5=o(()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Tipo inv\xE1lido: esperado instanceof ${u.expected}, recebido ${l}`:`Tipo inv\xE1lido: esperado ${n}, recebido ${l}`}case"invalid_value":return u.values.length===1?`Entrada inv\xE1lida: esperado ${V(u.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Muito grande: esperado que ${u.origin??"valor"} tivesse ${n}${u.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${u.origin??"valor"} fosse ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Muito pequeno: esperado que ${u.origin} tivesse ${n}${u.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${u.origin} fosse ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${n.prefix}"`:n.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${n.suffix}"`:n.format==="includes"?`Texto inv\xE1lido: deve incluir "${n.includes}"`:n.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${n.pattern}`:`${r[n.format]??u.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${u.divisor}`;case"unrecognized_keys":return`Chave${u.keys.length>1?"s":""} desconhecida${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${u.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${u.origin}`;default:return"Campo inv\xE1lido"}}},"error");function fg(){return{localeError:C5()}}s(fg,"El"),o(fg,"default");var x5=o(()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${n}, primit ${l}`}case"invalid_value":return u.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${V(u.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Prea mare: a\u0219teptat ca ${u.origin??"valoarea"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${u.origin??"valoarea"} s\u0103 fie ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Prea mic: a\u0219teptat ca ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${u.origin} s\u0103 fie ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${n.prefix}"`:n.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${n.suffix}"`:n.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${n.includes}"`:n.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${n.pattern}`:`Format invalid: ${r[n.format]??u.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${u.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${z(u.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${u.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${u.origin}`;default:return"Intrare invalid\u0103"}}},"error");function gg(){return{localeError:x5()}}s(gg,"Al"),o(gg,"default");function Ma(e,t,r,i){let u=Math.abs(e),n=u%10,a=u%100;return a>=11&&a<=19?i:n===1?t:n>=2&&n<=4?r:i}s(Ma,"lb"),o(Ma,"getRussianPlural");var k5=o(()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${u.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${V(u.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=Ma(l,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${u.maximum.toString()} ${d}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=Ma(l,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${u.minimum.toString()} ${d}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin} \u0431\u0443\u0434\u0435\u0442 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${u.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${u.keys.length>1?"\u0438":""}: ${z(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${u.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${u.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function hg(){return{localeError:k5()}}s(hg,"zl"),o(hg,"default");var A5=o(()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${u.expected}, prejeto ${l}`:`Neveljaven vnos: pri\u010Dakovano ${n}, prejeto ${l}`}case"invalid_value":return u.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${V(u.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${u.origin??"vrednost"} imelo ${n}${u.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${u.origin??"vrednost"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${u.origin} imelo ${n}${u.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${n.prefix}"`:n.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${n.suffix}"`:n.format==="includes"?`Neveljaven niz: mora vsebovati "${n.includes}"`:n.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${n.pattern}`:`Neveljaven ${r[n.format]??u.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${u.divisor}`;case"unrecognized_keys":return`Neprepoznan${u.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${z(u.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${u.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${u.origin}`;default:return"Neveljaven vnos"}}},"error");function vg(){return{localeError:A5()}}s(vg,"jl"),o(vg,"default");var _5=o(()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${u.expected}, fick ${l}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${n}, fick ${l}`}case"invalid_value":return u.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${V(u.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${u.origin??"v\xE4rdet"} att ha ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${n.prefix}"`:n.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${n.suffix}"`:n.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${n.includes}"`:n.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${n.pattern}"`:`Ogiltig(t) ${r[n.format]??u.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${z(u.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${u.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${u.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function yg(){return{localeError:_5()}}s(yg,"Ol"),o(yg,"default");var I5=o(()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${u.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`}case"invalid_value":return u.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${V(u.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${z(u.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${u.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${u.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin} ${n}${u.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin} ${n}${u.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${n.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${u.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${u.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${u.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}},"error");function Eg(){return{localeError:I5()}}s(Eg,"Nl"),o(Eg,"default");var S5=o(()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${u.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`}case"invalid_value":return u.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${V(u.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(u.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(u.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${n.prefix}"`:n.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${n.suffix}"`:n.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${n.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:n.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${n.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${u.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${z(u.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${u.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${u.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function bg(){return{localeError:S5()}}s(bg,"Pl"),o(bg,"default");var F5=o(()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${u.expected}, al\u0131nan ${l}`:`Ge\xE7ersiz de\u011Fer: beklenen ${n}, al\u0131nan ${l}`}case"invalid_value":return u.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${V(u.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${u.origin??"de\u011Fer"} ${n}${u.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${u.origin??"de\u011Fer"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??u.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${u.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${u.keys.length>1?"lar":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${u.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function Dg(){return{localeError:F5()}}s(Dg,"Dl"),o(Dg,"default");var z5=o(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${u.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${V(u.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin} \u0431\u0443\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${u.keys.length>1?"\u0456":""}: ${z(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${u.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${u.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function Pa(){return{localeError:z5()}}s(Pa,"_n"),o(Pa,"default");function wg(){return Pa()}s(wg,"Ml"),o(wg,"default");var j5=o(()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${u.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return u.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${V(u.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${z(u.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${u.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${u.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${n}${u.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${u.origin} \u06A9\u06D2 ${n}${u.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${u.origin} \u06A9\u0627 ${n}${u.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${n.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${u.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${u.keys.length>1?"\u0632":""}: ${z(u.keys,"\u060C ")}`;case"invalid_key":return`${u.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${u.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function Bg(){return{localeError:j5()}}s(Bg,"Cl"),o(Bg,"default");var N5=o(()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${u.expected}, qabul qilingan ${l}`:`Noto\u2018g\u2018ri kirish: kutilgan ${n}, qabul qilingan ${l}`}case"invalid_value":return u.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${V(u.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Juda katta: kutilgan ${u.origin??"qiymat"} ${n}${u.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${u.origin??"qiymat"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Juda kichik: kutilgan ${u.origin} ${n}${u.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${n.prefix}" bilan boshlanishi kerak`:n.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${n.suffix}" bilan tugashi kerak`:n.format==="includes"?`Noto\u2018g\u2018ri satr: "${n.includes}" ni o\u2018z ichiga olishi kerak`:n.format==="regex"?`Noto\u2018g\u2018ri satr: ${n.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[n.format]??u.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${u.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${u.keys.length>1?"lar":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${u.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}},"error");function $g(){return{localeError:N5()}}s($g,"Ul"),o($g,"default");var O5=o(()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${u.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`}case"invalid_value":return u.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${V(u.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${u.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${u.origin??"gi\xE1 tr\u1ECB"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${n.prefix}"`:n.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${n.suffix}"`:n.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${n.includes}"`:n.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${n.pattern}`:`${r[n.format]??u.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${u.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${z(u.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${u.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${u.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function Cg(){return{localeError:O5()}}s(Cg,"Ll"),o(Cg,"default");var R5=o(()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${u.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`}case"invalid_value":return u.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${V(u.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${u.origin??"\u503C"} ${n}${u.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${u.origin??"\u503C"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.prefix}" \u5F00\u5934`:n.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.suffix}" \u7ED3\u5C3E`:n.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${n.pattern}`:`\u65E0\u6548${r[n.format]??u.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${u.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${u.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function xg(){return{localeError:R5()}}s(xg,"Fl"),o(xg,"default");var T5=o(()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${u.expected}\uFF0C\u4F46\u6536\u5230 ${l}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n}\uFF0C\u4F46\u6536\u5230 ${l}`}case"invalid_value":return u.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${V(u.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${u.origin??"\u503C"} \u61C9\u70BA ${n}${u.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${u.origin??"\u503C"} \u61C9\u70BA ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${u.origin} \u61C9\u70BA ${n}${u.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${u.origin} \u61C9\u70BA ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.prefix}" \u958B\u982D`:n.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.suffix}" \u7D50\u5C3E`:n.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${n.pattern}`:`\u7121\u6548\u7684 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${u.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${u.keys.length>1?"\u5011":""}\uFF1A${z(u.keys,"\u3001")}`;case"invalid_key":return`${u.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${u.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function kg(){return{localeError:T5()}}s(kg,"Zl"),o(kg,"default");var M5=o(()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${u.expected}, \xE0m\u1ECD\u0300 a r\xED ${l}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n}, \xE0m\u1ECD\u0300 a r\xED ${l}`}case"invalid_value":return u.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${V(u.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${u.origin??"iye"} ${a.verb} ${n}${u.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${u.maximum}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${u.origin} ${a.verb} ${n}${u.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${u.minimum}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${n.prefix}"`:n.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${n.suffix}"`:n.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${n.includes}"`:n.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${n.pattern}`:`A\u1E63\xEC\u1E63e: ${r[n.format]??u.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${u.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${z(u.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${u.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${u.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}},"error");function Ag(){return{localeError:M5()}}s(Ag,"Bl"),o(Ag,"default");var _g,Ig=Symbol("ZodOutput"),Sg=Symbol("ZodInput"),Fg=class{static{s(this,"ei")}static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...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 ln(){return new Fg}s(ln,"ti"),o(ln,"registry"),(_g=globalThis).__zod_globalRegistry??(_g.__zod_globalRegistry=ln());var Ne=globalThis.__zod_globalRegistry;function Ua(e,t){return new e({type:"string",...T(t)})}s(Ua,"Gl"),o(Ua,"_string");function Za(e,t){return new e({type:"string",coerce:!0,...T(t)})}s(Za,"Jl"),o(Za,"_coercedString");function dn(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...T(t)})}s(dn,"ri"),o(dn,"_email");function Wu(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...T(t)})}s(Wu,"Sn"),o(Wu,"_guid");function cn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...T(t)})}s(cn,"ni"),o(cn,"_uuid");function pn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...T(t)})}s(pn,"oi"),o(pn,"_uuidv4");function mn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...T(t)})}s(mn,"ii"),o(mn,"_uuidv6");function fn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...T(t)})}s(fn,"si"),o(fn,"_uuidv7");function Gu(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...T(t)})}s(Gu,"In"),o(Gu,"_url");function gn(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...T(t)})}s(gn,"ai"),o(gn,"_emoji");function hn(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...T(t)})}s(hn,"ci"),o(hn,"_nanoid");function vn(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...T(t)})}s(vn,"ui"),o(vn,"_cuid");function yn(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...T(t)})}s(yn,"li"),o(yn,"_cuid2");function En(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...T(t)})}s(En,"di"),o(En,"_ulid");function bn(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...T(t)})}s(bn,"pi"),o(bn,"_xid");function Dn(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...T(t)})}s(Dn,"fi"),o(Dn,"_ksuid");function wn(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...T(t)})}s(wn,"mi"),o(wn,"_ipv4");function Bn(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...T(t)})}s(Bn,"gi"),o(Bn,"_ipv6");function qa(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...T(t)})}s(qa,"Kl"),o(qa,"_mac");function $n(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...T(t)})}s($n,"hi"),o($n,"_cidrv4");function Cn(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...T(t)})}s(Cn,"vi"),o(Cn,"_cidrv6");function xn(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...T(t)})}s(xn,"yi"),o(xn,"_base64");function kn(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...T(t)})}s(kn,"bi"),o(kn,"_base64url");function An(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...T(t)})}s(An,"wi"),o(An,"_e164");function _n(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...T(t)})}s(_n,"xi"),o(_n,"_jwt");var zg={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function La(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...T(t)})}s(La,"Xl"),o(La,"_isoDateTime");function Ja(e,t){return new e({type:"string",format:"date",check:"string_format",...T(t)})}s(Ja,"Hl"),o(Ja,"_isoDate");function Va(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...T(t)})}s(Va,"Yl"),o(Va,"_isoTime");function Wa(e,t){return new e({type:"string",format:"duration",check:"string_format",...T(t)})}s(Wa,"Ql"),o(Wa,"_isoDuration");function Ga(e,t){return new e({type:"number",checks:[],...T(t)})}s(Ga,"ed"),o(Ga,"_number");function Ka(e,t){return new e({type:"number",coerce:!0,checks:[],...T(t)})}s(Ka,"td"),o(Ka,"_coercedNumber");function Ha(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...T(t)})}s(Ha,"rd"),o(Ha,"_int");function Xa(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...T(t)})}s(Xa,"nd"),o(Xa,"_float32");function Ya(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...T(t)})}s(Ya,"od"),o(Ya,"_float64");function Qa(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...T(t)})}s(Qa,"id"),o(Qa,"_int32");function eo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...T(t)})}s(eo,"sd"),o(eo,"_uint32");function to(e,t){return new e({type:"boolean",...T(t)})}s(to,"ad"),o(to,"_boolean");function uo(e,t){return new e({type:"boolean",coerce:!0,...T(t)})}s(uo,"cd"),o(uo,"_coercedBoolean");function ro(e,t){return new e({type:"bigint",...T(t)})}s(ro,"ud"),o(ro,"_bigint");function no(e,t){return new e({type:"bigint",coerce:!0,...T(t)})}s(no,"ld"),o(no,"_coercedBigint");function io(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...T(t)})}s(io,"dd"),o(io,"_int64");function so(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...T(t)})}s(so,"pd"),o(so,"_uint64");function ao(e,t){return new e({type:"symbol",...T(t)})}s(ao,"fd"),o(ao,"_symbol");function oo(e,t){return new e({type:"undefined",...T(t)})}s(oo,"md"),o(oo,"_undefined");function lo(e,t){return new e({type:"null",...T(t)})}s(lo,"gd"),o(lo,"_null");function co(e){return new e({type:"any"})}s(co,"hd"),o(co,"_any");function po(e){return new e({type:"unknown"})}s(po,"vd"),o(po,"_unknown");function mo(e,t){return new e({type:"never",...T(t)})}s(mo,"yd"),o(mo,"_never");function fo(e,t){return new e({type:"void",...T(t)})}s(fo,"bd"),o(fo,"_void");function go(e,t){return new e({type:"date",...T(t)})}s(go,"wd"),o(go,"_date");function ho(e,t){return new e({type:"date",coerce:!0,...T(t)})}s(ho,"xd"),o(ho,"_coercedDate");function vo(e,t){return new e({type:"nan",...T(t)})}s(vo,"$d"),o(vo,"_nan");function He(e,t){return new ia({check:"less_than",...T(t),value:e,inclusive:!1})}s(He,"We"),o(He,"_lt");function Ie(e,t){return new ia({check:"less_than",...T(t),value:e,inclusive:!0})}s(Ie,"De"),o(Ie,"_lte");function Xe(e,t){return new sa({check:"greater_than",...T(t),value:e,inclusive:!1})}s(Xe,"Xe"),o(Xe,"_gt");function we(e,t){return new sa({check:"greater_than",...T(t),value:e,inclusive:!0})}s(we,"Se"),o(we,"_gte");function In(e){return Xe(0,e)}s(In,"$i"),o(In,"_positive");function Sn(e){return He(0,e)}s(Sn,"_i"),o(Sn,"_negative");function Fn(e){return Ie(0,e)}s(Fn,"ki"),o(Fn,"_nonpositive");function zn(e){return we(0,e)}s(zn,"Si"),o(zn,"_nonnegative");function $t(e,t){return new n4({check:"multiple_of",...T(t),value:e})}s($t,"ht"),o($t,"_multipleOf");function Ct(e,t){return new a4({check:"max_size",...T(t),maximum:e})}s(Ct,"vt"),o(Ct,"_maxSize");function Ye(e,t){return new o4({check:"min_size",...T(t),minimum:e})}s(Ye,"He"),o(Ye,"_minSize");function Ht(e,t){return new l4({check:"size_equals",...T(t),size:e})}s(Ht,"Ct"),o(Ht,"_size");function Xt(e,t){return new d4({check:"max_length",...T(t),maximum:e})}s(Xt,"Ut"),o(Xt,"_maxLength");function st(e,t){return new c4({check:"min_length",...T(t),minimum:e})}s(st,"at"),o(st,"_minLength");function Yt(e,t){return new p4({check:"length_equals",...T(t),length:e})}s(Yt,"Lt"),o(Yt,"_length");function Ku(e,t){return new m4({check:"string_format",format:"regex",...T(t),pattern:e})}s(Ku,"pr"),o(Ku,"_regex");function Hu(e){return new f4({check:"string_format",format:"lowercase",...T(e)})}s(Hu,"fr"),o(Hu,"_lowercase");function Xu(e){return new g4({check:"string_format",format:"uppercase",...T(e)})}s(Xu,"mr"),o(Xu,"_uppercase");function Yu(e,t){return new h4({check:"string_format",format:"includes",...T(t),includes:e})}s(Yu,"gr"),o(Yu,"_includes");function Qu(e,t){return new v4({check:"string_format",format:"starts_with",...T(t),prefix:e})}s(Qu,"hr"),o(Qu,"_startsWith");function er(e,t){return new y4({check:"string_format",format:"ends_with",...T(t),suffix:e})}s(er,"vr"),o(er,"_endsWith");function jn(e,t,r){return new E4({check:"property",property:e,schema:t,...T(r)})}s(jn,"Ii"),o(jn,"_property");function tr(e,t){return new b4({check:"mime_type",mime:e,...T(t)})}s(tr,"yr"),o(tr,"_mime");function Ze(e){return new D4({check:"overwrite",tx:e})}s(Ze,"Je"),o(Ze,"_overwrite");function ur(e){return Ze(t=>t.normalize(e))}s(ur,"br"),o(ur,"_normalize");function rr(){return Ze(e=>e.trim())}s(rr,"wr"),o(rr,"_trim");function nr(){return Ze(e=>e.toLowerCase())}s(nr,"xr"),o(nr,"_toLowerCase");function ir(){return Ze(e=>e.toUpperCase())}s(ir,"$r"),o(ir,"_toUpperCase");function sr(){return Ze(e=>Fs(e))}s(sr,"_r"),o(sr,"_slugify");function yo(e,t,r){return new e({type:"array",element:t,...T(r)})}s(yo,"_d"),o(yo,"_array");function jg(e,t,r){return new e({type:"union",options:t,...T(r)})}s(jg,"NS"),o(jg,"_union");function Ng(e,t,r){return new e({type:"union",options:t,inclusive:!1,...T(r)})}s(Ng,"PS"),o(Ng,"_xor");function Og(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...T(i)})}s(Og,"DS"),o(Og,"_discriminatedUnion");function Rg(e,t,r){return new e({type:"intersection",left:t,right:r})}s(Rg,"MS"),o(Rg,"_intersection");function Tg(e,t,r,i){let u=r instanceof K,n=u?i:r,a=u?r:null;return new e({type:"tuple",items:t,rest:a,...T(n)})}s(Tg,"CS"),o(Tg,"_tuple");function Mg(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...T(i)})}s(Mg,"US"),o(Mg,"_record");function Pg(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...T(i)})}s(Pg,"LS"),o(Pg,"_map");function Ug(e,t,r){return new e({type:"set",valueType:t,...T(r)})}s(Ug,"FS"),o(Ug,"_set");function Zg(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(u=>[u,u])):t;return new e({type:"enum",entries:i,...T(r)})}s(Zg,"ZS"),o(Zg,"_enum");function qg(e,t,r){return new e({type:"enum",entries:t,...T(r)})}s(qg,"BS"),o(qg,"_nativeEnum");function Lg(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...T(r)})}s(Lg,"qS"),o(Lg,"_literal");function Eo(e,t){return new e({type:"file",...T(t)})}s(Eo,"kd"),o(Eo,"_file");function Jg(e,t){return new e({type:"transform",transform:t})}s(Jg,"VS"),o(Jg,"_transform");function Vg(e,t){return new e({type:"optional",innerType:t})}s(Vg,"GS"),o(Vg,"_optional");function Wg(e,t){return new e({type:"nullable",innerType:t})}s(Wg,"JS"),o(Wg,"_nullable");function Gg(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():js(r)}})}s(Gg,"KS"),o(Gg,"_default");function Kg(e,t,r){return new e({type:"nonoptional",innerType:t,...T(r)})}s(Kg,"WS"),o(Kg,"_nonoptional");function Hg(e,t){return new e({type:"success",innerType:t})}s(Hg,"XS"),o(Hg,"_success");function Xg(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}s(Xg,"HS"),o(Xg,"_catch");function Yg(e,t,r){return new e({type:"pipe",in:t,out:r})}s(Yg,"YS"),o(Yg,"_pipe");function Qg(e,t){return new e({type:"readonly",innerType:t})}s(Qg,"QS"),o(Qg,"_readonly");function eh(e,t,r){return new e({type:"template_literal",parts:t,...T(r)})}s(eh,"eI"),o(eh,"_templateLiteral");function th(e,t){return new e({type:"lazy",getter:t})}s(th,"tI"),o(th,"_lazy");function uh(e,t){return new e({type:"promise",innerType:t})}s(uh,"rI"),o(uh,"_promise");function bo(e,t,r){let i=T(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}s(bo,"Sd"),o(bo,"_custom");function Do(e,t,r){return new e({type:"custom",check:"custom",fn:t,...T(r)})}s(Do,"Id"),o(Do,"_refine");function wo(e,t){let r=Bo(i=>(i.addIssue=u=>{if(typeof u=="string")i.issues.push(Nu(u,i.value,r._zod.def));else{let n=u;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=i.value),n.inst??(n.inst=r),n.continue??(n.continue=!r._zod.def.abort),i.issues.push(Nu(n))}},e(i.value,i)),t);return r}s(wo,"Rd"),o(wo,"_superRefine");function Bo(e,t){let r=new oe({check:"custom",...T(t)});return r._zod.check=e,r}s(Bo,"pb"),o(Bo,"_check");function $o(e){let t=new oe({check:"describe"});return t._zod.onattach=[r=>{let i=Ne.get(r)??{};Ne.add(r,{...i,description:e})}],t._zod.check=()=>{},t}s($o,"Td"),o($o,"describe");function Co(e){let t=new oe({check:"meta"});return t._zod.onattach=[r=>{let i=Ne.get(r)??{};Ne.add(r,{...i,...e})}],t._zod.check=()=>{},t}s(Co,"Ed"),o(Co,"meta");function xo(e,t){let r=T(t),i=r.truthy??["true","1","yes","on","y","enabled"],u=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(m=>typeof m=="string"?m.toLowerCase():m),u=u.map(m=>typeof m=="string"?m.toLowerCase():m));let n=new Set(i),a=new Set(u),l=e.Codec??Ia,d=e.Boolean??ca,p=e.String??Uu,c=new p({type:"string",error:r.error}),f=new d({type:"boolean",error:r.error}),g=new l({type:"pipe",in:c,out:f,transform:o(((m,h)=>{let E=m;return r.case!=="sensitive"&&(E=E.toLowerCase()),n.has(E)?!0:a.has(E)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...n,...a],input:h.value,inst:g,continue:!1}),{})}),"transform"),reverseTransform:o(((m,h)=>m===!0?i[0]||"true":u[0]||"false"),"reverseTransform"),error:r.error});return g}s(xo,"Ad"),o(xo,"_stringbool");function Qt(e,t,r,i={}){let u=T(i),n={...T(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...u};return r instanceof RegExp&&(n.pattern=r),new e(n)}s(Qt,"kr"),o(Qt,"_stringFormat");function xt(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Ne,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}}s(xt,"yt"),o(xt,"initializeContext");function re(e,t,r={path:[],schemaPath:[]}){var i;let u=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let l=e._zod.toJSONSchema?.();if(l)a.schema=l;else{let p={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,p);else{let f=a.schema,g=t.processors[u.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);g(e,t,f,p)}let c=e._zod.parent;c&&(a.ref||(a.ref=c),re(c,t,p),t.seen.get(c).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),t.io==="input"&&be(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}s(re,"te"),o(re,"process");function kt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let l=e.metadataRegistry.get(a[0])?.id;if(l){let d=i.get(l);if(d&&d!==a[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(l,a[0])}}let u=o(a=>{let l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let c=e.external.registry.get(a[0])?.id,f=e.external.uri??(m=>m);if(c)return{ref:f(c)};let g=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=g,{defId:g,ref:`${f("__shared")}#/${l}/${g}`}}if(a[1]===r)return{ref:"#"};let d=`#/${l}/`,p=a[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:d+p}},"makeURI"),n=o(a=>{if(a[1].schema.$ref)return;let l=a[1],{ref:d,defId:p}=u(a);l.def={...l.schema},p&&(l.defId=p);let c=l.schema;for(let f in c)delete c[f];c.$ref=d},"extractToDef");if(e.cycles==="throw")for(let a of e.seen.entries()){let l=a[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
|
|
64
64
|
|
|
65
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let l=a[1];if(t===a[0]){n(a);continue}if(e.external){let d=e.external.registry.get(a[0])?.id;if(t!==a[0]&&d){n(a);continue}}if(e.metadataRegistry.get(a[0])?.id){n(a);continue}if(l.cycle){n(a);continue}if(l.count>1&&e.reused==="ref"){n(a);continue}}}s(kt,"bt"),o(kt,"extractDefs");function At(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=o(l=>{let d=e.seen.get(l);if(d.ref===null)return;let p=d.def??d.schema,c={...p},f=d.ref;if(d.ref=null,f){i(f);let m=e.seen.get(f),h=m.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(h)):Object.assign(p,h),Object.assign(p,c),l._zod.parent===f)for(let E in p)E==="$ref"||E==="allOf"||E in c||delete p[E];if(h.$ref&&m.def)for(let E in p)E==="$ref"||E==="allOf"||E in m.def&&JSON.stringify(p[E])===JSON.stringify(m.def[E])&&delete p[E]}let g=l._zod.parent;if(g&&g!==f){i(g);let m=e.seen.get(g);if(m?.schema.$ref&&(p.$ref=m.schema.$ref,m.def))for(let h in p)h==="$ref"||h==="allOf"||h in m.def&&JSON.stringify(p[h])===JSON.stringify(m.def[h])&&delete p[h]}e.override({zodSchema:l,jsonSchema:p,path:d.path??[]})},"flattenRef");for(let l of[...e.seen.entries()].reverse())i(l[0]);let u={};if(e.target==="draft-2020-12"?u.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?u.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?u.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");u.$id=e.external.uri(l)}Object.assign(u,r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;n!==void 0&&u.id===n&&delete u.id;let a=e.external?.defs??{};for(let l of e.seen.entries()){let d=l[1];d.def&&d.defId&&(d.def.id===d.defId&&delete d.def.id,a[d.defId]=d.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?u.$defs=a:u.definitions=a);try{let l=JSON.parse(JSON.stringify(u));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:ar(t,"input",e.processors),output:ar(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}s(At,"wt"),o(At,"finalize");function be(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return be(i.element,r);if(i.type==="set")return be(i.valueType,r);if(i.type==="lazy")return be(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return be(i.innerType,r);if(i.type==="intersection")return be(i.left,r)||be(i.right,r);if(i.type==="record"||i.type==="map")return be(i.keyType,r)||be(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:be(i.in,r)||be(i.out,r);if(i.type==="object"){for(let u in i.shape)if(be(i.shape[u],r))return!0;return!1}if(i.type==="union"){for(let u of i.options)if(be(u,r))return!0;return!1}if(i.type==="tuple"){for(let u of i.items)if(be(u,r))return!0;return!!(i.rest&&be(i.rest,r))}return!1}s(be,"Ie"),o(be,"isTransforming");var rh=o((e,t={})=>r=>{let i=xt({...r,processors:t});return re(e,i),kt(i,e),At(i,e)},"createToJSONSchemaMethod"),ar=o((e,t,r={})=>i=>{let{libraryOptions:u,target:n}=i??{},a=xt({...u??{},target:n,io:t,processors:r});return re(e,a),kt(a,e),At(a,e)},"createStandardJSONSchemaMethod"),P5={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},nh=o((e,t,r,i)=>{let u=r;u.type="string";let{minimum:n,maximum:a,format:l,patterns:d,contentEncoding:p}=e._zod.bag;if(typeof n=="number"&&(u.minLength=n),typeof a=="number"&&(u.maxLength=a),l&&(u.format=P5[l]??l,u.format===""&&delete u.format,l==="time"&&delete u.format),p&&(u.contentEncoding=p),d&&d.size>0){let c=[...d];c.length===1?u.pattern=c[0].source:c.length>1&&(u.allOf=[...c.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},"stringProcessor"),ih=o((e,t,r,i)=>{let u=r,{minimum:n,maximum:a,format:l,multipleOf:d,exclusiveMaximum:p,exclusiveMinimum:c}=e._zod.bag;typeof l=="string"&&l.includes("int")?u.type="integer":u.type="number";let f=typeof c=="number"&&c>=(n??Number.NEGATIVE_INFINITY),g=typeof p=="number"&&p<=(a??Number.POSITIVE_INFINITY),m=t.target==="draft-04"||t.target==="openapi-3.0";f?m?(u.minimum=c,u.exclusiveMinimum=!0):u.exclusiveMinimum=c:typeof n=="number"&&(u.minimum=n),g?m?(u.maximum=p,u.exclusiveMaximum=!0):u.exclusiveMaximum=p:typeof a=="number"&&(u.maximum=a),typeof d=="number"&&(u.multipleOf=d)},"numberProcessor"),sh=o((e,t,r,i)=>{r.type="boolean"},"booleanProcessor"),ah=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),oh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),lh=o((e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},"nullProcessor"),dh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),ch=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),ph=o((e,t,r,i)=>{r.not={}},"neverProcessor"),mh=o((e,t,r,i)=>{},"anyProcessor"),fh=o((e,t,r,i)=>{},"unknownProcessor"),gh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),hh=o((e,t,r,i)=>{let u=e._zod.def,n=en(u.entries);n.every(a=>typeof a=="number")&&(r.type="number"),n.every(a=>typeof a=="string")&&(r.type="string"),r.enum=n},"enumProcessor"),vh=o((e,t,r,i)=>{let u=e._zod.def,n=[];for(let a of u.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");n.push(Number(a))}else n.push(a);if(n.length!==0)if(n.length===1){let a=n[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else n.every(a=>typeof a=="number")&&(r.type="number"),n.every(a=>typeof a=="string")&&(r.type="string"),n.every(a=>typeof a=="boolean")&&(r.type="boolean"),n.every(a=>a===null)&&(r.type="null"),r.enum=n},"literalProcessor"),yh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),Eh=o((e,t,r,i)=>{let u=r,n=e._zod.pattern;if(!n)throw new Error("Pattern not found in template literal");u.type="string",u.pattern=n.source},"templateLiteralProcessor"),bh=o((e,t,r,i)=>{let u=r,n={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:l,mime:d}=e._zod.bag;a!==void 0&&(n.minLength=a),l!==void 0&&(n.maxLength=l),d?d.length===1?(n.contentMediaType=d[0],Object.assign(u,n)):(Object.assign(u,n),u.anyOf=d.map(p=>({contentMediaType:p}))):Object.assign(u,n)},"fileProcessor"),Dh=o((e,t,r,i)=>{r.type="boolean"},"successProcessor"),wh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),Bh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),$h=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),Ch=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),xh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),kh=o((e,t,r,i)=>{let u=r,n=e._zod.def,{minimum:a,maximum:l}=e._zod.bag;typeof a=="number"&&(u.minItems=a),typeof l=="number"&&(u.maxItems=l),u.type="array",u.items=re(n.element,t,{...i,path:[...i.path,"items"]})},"arrayProcessor"),Ah=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="object",u.properties={};let a=n.shape;for(let p in a)u.properties[p]=re(a[p],t,{...i,path:[...i.path,"properties",p]});let l=new Set(Object.keys(a)),d=new Set([...l].filter(p=>{let c=n.shape[p]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));d.size>0&&(u.required=Array.from(d)),n.catchall?._zod.def.type==="never"?u.additionalProperties=!1:n.catchall?n.catchall&&(u.additionalProperties=re(n.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(u.additionalProperties=!1)},"objectProcessor"),xo=o((e,t,r,i)=>{let u=e._zod.def,n=u.inclusive===!1,a=u.options.map((l,d)=>re(l,t,{...i,path:[...i.path,n?"oneOf":"anyOf",d]}));n?r.oneOf=a:r.anyOf=a},"unionProcessor"),_h=o((e,t,r,i)=>{let u=e._zod.def,n=re(u.left,t,{...i,path:[...i.path,"allOf",0]}),a=re(u.right,t,{...i,path:[...i.path,"allOf",1]}),l=o(p=>"allOf"in p&&Object.keys(p).length===1,"isSimpleIntersection"),d=[...l(n)?n.allOf:[n],...l(a)?a.allOf:[a]];r.allOf=d},"intersectionProcessor"),Ih=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",l=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=n.items.map((g,m)=>re(g,t,{...i,path:[...i.path,a,m]})),p=n.rest?re(n.rest,t,{...i,path:[...i.path,l,...t.target==="openapi-3.0"?[n.items.length]:[]]}):null;t.target==="draft-2020-12"?(u.prefixItems=d,p&&(u.items=p)):t.target==="openapi-3.0"?(u.items={anyOf:d},p&&u.items.anyOf.push(p),u.minItems=d.length,p||(u.maxItems=d.length)):(u.items=d,p&&(u.additionalItems=p));let{minimum:c,maximum:f}=e._zod.bag;typeof c=="number"&&(u.minItems=c),typeof f=="number"&&(u.maxItems=f)},"tupleProcessor"),Sh=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="object";let a=n.keyType,l=a._zod.bag?.patterns;if(n.mode==="loose"&&l&&l.size>0){let p=re(n.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});u.patternProperties={};for(let c of l)u.patternProperties[c.source]=p}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(u.propertyNames=re(n.keyType,t,{...i,path:[...i.path,"propertyNames"]})),u.additionalProperties=re(n.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let d=a._zod.values;if(d){let p=[...d].filter(c=>typeof c=="string"||typeof c=="number");p.length>0&&(u.required=p)}},"recordProcessor"),Fh=o((e,t,r,i)=>{let u=e._zod.def,n=re(u.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=u.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},"nullableProcessor"),zh=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"nonoptionalProcessor"),jh=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,r.default=JSON.parse(JSON.stringify(u.defaultValue))},"defaultProcessor"),Nh=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(u.defaultValue)))},"prefaultProcessor"),Oh=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType;let a;try{a=u.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},"catchProcessor"),Rh=o((e,t,r,i)=>{let u=e._zod.def,n=u.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?n?u.out:u.in:u.out;re(a,t,i);let l=t.seen.get(e);l.ref=a},"pipeProcessor"),Th=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,r.readOnly=!0},"readonlyProcessor"),Mh=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"promiseProcessor"),ko=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"optionalProcessor"),Ph=o((e,t,r,i)=>{let u=e._zod.innerType;re(u,t,i);let n=t.seen.get(e);n.ref=u},"lazyProcessor"),Ao={string:nh,number:ih,boolean:sh,bigint:ah,symbol:oh,null:lh,undefined:dh,void:ch,never:ph,any:mh,unknown:fh,date:gh,enum:hh,literal:vh,nan:yh,template_literal:Eh,file:bh,success:Dh,custom:wh,function:Bh,transform:$h,map:Ch,set:xh,array:kh,object:Ah,union:xo,intersection:_h,tuple:Ih,record:Sh,nullable:Fh,nonoptional:zh,default:jh,prefault:Nh,catch:Oh,pipe:Rh,readonly:Th,promise:Mh,optional:ko,lazy:Ph};function _o(e,t){if("_idmap"in e){let i=e,u=xt({...t,processors:Ao}),n={};for(let d of i._idmap.entries()){let[p,c]=d;re(c,u)}let a={},l={registry:i,uri:t?.uri,defs:n};u.external=l;for(let d of i._idmap.entries()){let[p,c]=d;kt(u,c),a[p]=At(u,c)}if(Object.keys(n).length>0){let d=u.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[d]:n}}return{schemas:a}}let r=xt({...t,processors:Ao});return re(e,r),kt(r,e),At(r,e)}s(_o,"Ai"),o(_o,"toJSONSchema");var U5=class{static{s(this,"zi")}static{o(this,"JSONSchemaGenerator")}get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),this.ctx=xt({processors:Ao,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return re(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),kt(this.ctx,e);let r=At(this.ctx,e),{"~standard":i,...u}=r;return u}},Z5={},Uh={};Ge(Uh,{ZodAny:s(()=>x0,"ZodAny"),ZodArray:s(()=>z0,"ZodArray"),ZodBase64:s(()=>Gn,"ZodBase64"),ZodBase64URL:s(()=>Kn,"ZodBase64URL"),ZodBigInt:s(()=>fr,"ZodBigInt"),ZodBigIntFormat:s(()=>ei,"ZodBigIntFormat"),ZodBoolean:s(()=>mr,"ZodBoolean"),ZodCIDRv4:s(()=>Vn,"ZodCIDRv4"),ZodCIDRv6:s(()=>Wn,"ZodCIDRv6"),ZodCUID:s(()=>Mn,"ZodCUID"),ZodCUID2:s(()=>Pn,"ZodCUID2"),ZodCatch:s(()=>ll,"ZodCatch"),ZodCodec:s(()=>Br,"ZodCodec"),ZodCustom:s(()=>Cr,"ZodCustom"),ZodCustomStringFormat:s(()=>uu,"ZodCustomStringFormat"),ZodDate:s(()=>ui,"ZodDate"),ZodDefault:s(()=>il,"ZodDefault"),ZodDiscriminatedUnion:s(()=>P0,"ZodDiscriminatedUnion"),ZodE164:s(()=>Hn,"ZodE164"),ZodEmail:s(()=>On,"ZodEmail"),ZodEmoji:s(()=>Rn,"ZodEmoji"),ZodEnum:s(()=>iu,"ZodEnum"),ZodExactOptional:s(()=>ul,"ZodExactOptional"),ZodFile:s(()=>Q0,"ZodFile"),ZodFunction:s(()=>Dl,"ZodFunction"),ZodGUID:s(()=>lr,"ZodGUID"),ZodIPv4:s(()=>Ln,"ZodIPv4"),ZodIPv6:s(()=>Jn,"ZodIPv6"),ZodIntersection:s(()=>Z0,"ZodIntersection"),ZodJWT:s(()=>Xn,"ZodJWT"),ZodKSUID:s(()=>qn,"ZodKSUID"),ZodLazy:s(()=>yl,"ZodLazy"),ZodLiteral:s(()=>X0,"ZodLiteral"),ZodMAC:s(()=>t0,"ZodMAC"),ZodMap:s(()=>V0,"ZodMap"),ZodNaN:s(()=>dl,"ZodNaN"),ZodNanoID:s(()=>Tn,"ZodNanoID"),ZodNever:s(()=>_0,"ZodNever"),ZodNonOptional:s(()=>di,"ZodNonOptional"),ZodNull:s(()=>C0,"ZodNull"),ZodNullable:s(()=>rl,"ZodNullable"),ZodNumber:s(()=>cr,"ZodNumber"),ZodNumberFormat:s(()=>_t,"ZodNumberFormat"),ZodObject:s(()=>hr,"ZodObject"),ZodOptional:s(()=>si,"ZodOptional"),ZodPipe:s(()=>Dr,"ZodPipe"),ZodPrefault:s(()=>sl,"ZodPrefault"),ZodPreprocess:s(()=>fl,"ZodPreprocess"),ZodPromise:s(()=>El,"ZodPromise"),ZodReadonly:s(()=>gl,"ZodReadonly"),ZodRecord:s(()=>nu,"ZodRecord"),ZodSet:s(()=>G0,"ZodSet"),ZodString:s(()=>or,"ZodString"),ZodStringFormat:s(()=>ae,"ZodStringFormat"),ZodSuccess:s(()=>al,"ZodSuccess"),ZodSymbol:s(()=>D0,"ZodSymbol"),ZodTemplateLiteral:s(()=>hl,"ZodTemplateLiteral"),ZodTransform:s(()=>tl,"ZodTransform"),ZodTuple:s(()=>q0,"ZodTuple"),ZodType:s(()=>X,"ZodType"),ZodULID:s(()=>Un,"ZodULID"),ZodURL:s(()=>dr,"ZodURL"),ZodUUID:s(()=>qe,"ZodUUID"),ZodUndefined:s(()=>B0,"ZodUndefined"),ZodUnion:s(()=>vr,"ZodUnion"),ZodUnknown:s(()=>A0,"ZodUnknown"),ZodVoid:s(()=>I0,"ZodVoid"),ZodXID:s(()=>Zn,"ZodXID"),ZodXor:s(()=>T0,"ZodXor"),_ZodString:s(()=>Nn,"_ZodString"),_default:s(()=>oi,"_default"),_function:s(()=>$r,"_function"),any:s(()=>k0,"any"),array:s(()=>ru,"array"),base64:s(()=>s0,"base64"),base64url:s(()=>a0,"base64url"),bigint:s(()=>y0,"bigint"),boolean:s(()=>Qn,"boolean"),catch:s(()=>pi,"catch"),check:s(()=>wl,"check"),cidrv4:s(()=>n0,"cidrv4"),cidrv6:s(()=>i0,"cidrv6"),codec:s(()=>pl,"codec"),cuid:s(()=>Ko,"cuid"),cuid2:s(()=>Ho,"cuid2"),custom:s(()=>Bl,"custom"),date:s(()=>F0,"date"),describe:s(()=>rv,"describe"),discriminatedUnion:s(()=>U0,"discriminatedUnion"),e164:s(()=>o0,"e164"),email:s(()=>Mo,"email"),emoji:s(()=>Wo,"emoji"),enum:s(()=>Er,"enum"),exactOptional:s(()=>ai,"exactOptional"),file:s(()=>el,"file"),float32:s(()=>f0,"float32"),float64:s(()=>g0,"float64"),function:s(()=>$r,"function"),guid:s(()=>Po,"guid"),hash:s(()=>m0,"hash"),hex:s(()=>p0,"hex"),hostname:s(()=>c0,"hostname"),httpUrl:s(()=>Vo,"httpUrl"),instanceof:s(()=>$l,"instanceof"),int:s(()=>pr,"int"),int32:s(()=>h0,"int32"),int64:s(()=>E0,"int64"),intersection:s(()=>ri,"intersection"),invertCodec:s(()=>ml,"invertCodec"),ipv4:s(()=>e0,"ipv4"),ipv6:s(()=>r0,"ipv6"),json:s(()=>Cl,"json"),jwt:s(()=>l0,"jwt"),keyof:s(()=>j0,"keyof"),ksuid:s(()=>Qo,"ksuid"),lazy:s(()=>fi,"lazy"),literal:s(()=>Y0,"literal"),looseObject:s(()=>R0,"looseObject"),looseRecord:s(()=>J0,"looseRecord"),mac:s(()=>u0,"mac"),map:s(()=>W0,"map"),meta:s(()=>nv,"meta"),nan:s(()=>cl,"nan"),nanoid:s(()=>Go,"nanoid"),nativeEnum:s(()=>H0,"nativeEnum"),never:s(()=>gr,"never"),nonoptional:s(()=>ci,"nonoptional"),null:s(()=>ti,"null"),nullable:s(()=>au,"nullable"),nullish:s(()=>nl,"nullish"),number:s(()=>Yn,"number"),object:s(()=>N0,"object"),optional:s(()=>su,"optional"),partialRecord:s(()=>L0,"partialRecord"),pipe:s(()=>wr,"pipe"),prefault:s(()=>li,"prefault"),preprocess:s(()=>xl,"preprocess"),promise:s(()=>bl,"promise"),readonly:s(()=>mi,"readonly"),record:s(()=>ii,"record"),refine:s(()=>gi,"refine"),set:s(()=>K0,"set"),strictObject:s(()=>O0,"strictObject"),string:s(()=>tu,"string"),stringFormat:s(()=>d0,"stringFormat"),stringbool:s(()=>iv,"stringbool"),success:s(()=>ol,"success"),superRefine:s(()=>hi,"superRefine"),symbol:s(()=>w0,"symbol"),templateLiteral:s(()=>vl,"templateLiteral"),transform:s(()=>br,"transform"),tuple:s(()=>ni,"tuple"),uint32:s(()=>v0,"uint32"),uint64:s(()=>b0,"uint64"),ulid:s(()=>Xo,"ulid"),undefined:s(()=>$0,"undefined"),union:s(()=>yr,"union"),unknown:s(()=>at,"unknown"),url:s(()=>Jo,"url"),uuid:s(()=>Uo,"uuid"),uuidv4:s(()=>Zo,"uuidv4"),uuidv6:s(()=>qo,"uuidv6"),uuidv7:s(()=>Lo,"uuidv7"),void:s(()=>S0,"void"),xid:s(()=>Yo,"xid"),xor:s(()=>M0,"xor")});var Zh={};Ge(Zh,{endsWith:s(()=>er,"endsWith"),gt:s(()=>Xe,"gt"),gte:s(()=>we,"gte"),includes:s(()=>Yu,"includes"),length:s(()=>Yt,"length"),lowercase:s(()=>Hu,"lowercase"),lt:s(()=>He,"lt"),lte:s(()=>Ie,"lte"),maxLength:s(()=>Xt,"maxLength"),maxSize:s(()=>Ct,"maxSize"),mime:s(()=>tr,"mime"),minLength:s(()=>st,"minLength"),minSize:s(()=>Ye,"minSize"),multipleOf:s(()=>$t,"multipleOf"),negative:s(()=>Sn,"negative"),nonnegative:s(()=>zn,"nonnegative"),nonpositive:s(()=>Fn,"nonpositive"),normalize:s(()=>ur,"normalize"),overwrite:s(()=>Ze,"overwrite"),positive:s(()=>In,"positive"),property:s(()=>jn,"property"),regex:s(()=>Ku,"regex"),size:s(()=>Ht,"size"),slugify:s(()=>sr,"slugify"),startsWith:s(()=>Qu,"startsWith"),toLowerCase:s(()=>nr,"toLowerCase"),toUpperCase:s(()=>ir,"toUpperCase"),trim:s(()=>rr,"trim"),uppercase:s(()=>Xu,"uppercase")});var Io={};Ge(Io,{ZodISODate:s(()=>zo,"ZodISODate"),ZodISODateTime:s(()=>So,"ZodISODateTime"),ZodISODuration:s(()=>Ro,"ZodISODuration"),ZodISOTime:s(()=>No,"ZodISOTime"),date:s(()=>jo,"date"),datetime:s(()=>Fo,"datetime"),duration:s(()=>To,"duration"),time:s(()=>Oo,"time")});var So=B("ZodISODateTime",(e,t)=>{N4.init(e,t),ae.init(e,t)});function Fo(e){return qa(So,e)}s(Fo,"mp"),o(Fo,"datetime");var zo=B("ZodISODate",(e,t)=>{O4.init(e,t),ae.init(e,t)});function jo(e){return La(zo,e)}s(jo,"gp"),o(jo,"date");var No=B("ZodISOTime",(e,t)=>{R4.init(e,t),ae.init(e,t)});function Oo(e){return Ja(No,e)}s(Oo,"hp"),o(Oo,"time");var Ro=B("ZodISODuration",(e,t)=>{T4.init(e,t),ae.init(e,t)});function To(e){return Va(Ro,e)}s(To,"vp"),o(To,"duration");var qh=o((e,t)=>{Ts.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:o(r=>nn(e,r),"value")},flatten:{value:o(r=>rn(e,r),"value")},addIssue:{value:o(r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Su,2)},"value")},addIssues:{value:o(r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Su,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),q5=B("ZodError",qh),Se=B("ZodError",qh,{Parent:Error}),Lh=Ou(Se),Jh=Ru(Se),Vh=Tu(Se),Wh=Mu(Se),Gh=Ls(Se),Kh=Js(Se),Hh=Vs(Se),Xh=Ws(Se),Yh=Gs(Se),Qh=Ks(Se),ev=Hs(Se),tv=Xs(Se),uv=new WeakMap;function eu(e,t,r){let i=Object.getPrototypeOf(e),u=uv.get(i);if(u||(u=new Set,uv.set(i,u)),!u.has(t)){u.add(t);for(let n in r){let a=r[n];Object.defineProperty(i,n,{configurable:!0,enumerable:!1,get(){let l=a.bind(this);return Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}s(eu,"jn"),o(eu,"_installLazyMethods");var X=B("ZodType",(e,t)=>(K.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ar(e,"input"),output:ar(e,"output")}}),e.toJSONSchema=rh(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,i)=>Lh(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Vh(e,r,i),e.parseAsync=async(r,i)=>Jh(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Wh(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>Gh(e,r,i),e.decode=(r,i)=>Kh(e,r,i),e.encodeAsync=async(r,i)=>Hh(e,r,i),e.decodeAsync=async(r,i)=>Xh(e,r,i),e.safeEncode=(r,i)=>Yh(e,r,i),e.safeDecode=(r,i)=>Qh(e,r,i),e.safeEncodeAsync=async(r,i)=>ev(e,r,i),e.safeDecodeAsync=async(r,i)=>tv(e,r,i),eu(e,"ZodType",{check(...r){let i=this.def;return this.clone(Q.mergeDefs(i,{checks:[...i.checks??[],...r.map(u=>typeof u=="function"?{_zod:{check:u,def:{check:"custom"},onattach:[]}}:u)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,i){return ke(this,r,i)},brand(){return this},register(r,i){return r.add(this,i),this},refine(r,i){return this.check(gi(r,i))},superRefine(r,i){return this.check(hi(r,i))},overwrite(r){return this.check(Ze(r))},optional(){return su(this)},exactOptional(){return ai(this)},nullable(){return au(this)},nullish(){return su(au(this))},nonoptional(r){return ci(this,r)},array(){return ru(this)},or(r){return yr([this,r])},and(r){return ri(this,r)},transform(r){return wr(this,br(r))},default(r){return oi(this,r)},prefault(r){return li(this,r)},catch(r){return pi(this,r)},pipe(r){return wr(this,r)},readonly(){return mi(this)},describe(r){let i=this.clone();return Ne.add(i,{description:r}),i},meta(...r){if(r.length===0)return Ne.get(this);let i=this.clone();return Ne.add(i,r[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return Ne.get(e)?.description},configurable:!0}),e)),Nn=B("_ZodString",(e,t)=>{Uu.init(e,t),X.init(e,t),e._zod.processJSONSchema=(i,u,n)=>nh(e,i,u,n);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,eu(e,"_ZodString",{regex(...i){return this.check(Ku(...i))},includes(...i){return this.check(Yu(...i))},startsWith(...i){return this.check(Qu(...i))},endsWith(...i){return this.check(er(...i))},min(...i){return this.check(st(...i))},max(...i){return this.check(Xt(...i))},length(...i){return this.check(Yt(...i))},nonempty(...i){return this.check(st(1,...i))},lowercase(i){return this.check(Hu(i))},uppercase(i){return this.check(Xu(i))},trim(){return this.check(rr())},normalize(...i){return this.check(ur(...i))},toLowerCase(){return this.check(nr())},toUpperCase(){return this.check(ir())},slugify(){return this.check(sr())}})}),or=B("ZodString",(e,t)=>{Uu.init(e,t),Nn.init(e,t),e.email=r=>e.check(dn(On,r)),e.url=r=>e.check(Gu(dr,r)),e.jwt=r=>e.check(_n(Xn,r)),e.emoji=r=>e.check(gn(Rn,r)),e.guid=r=>e.check(Wu(lr,r)),e.uuid=r=>e.check(cn(qe,r)),e.uuidv4=r=>e.check(pn(qe,r)),e.uuidv6=r=>e.check(mn(qe,r)),e.uuidv7=r=>e.check(fn(qe,r)),e.nanoid=r=>e.check(hn(Tn,r)),e.guid=r=>e.check(Wu(lr,r)),e.cuid=r=>e.check(vn(Mn,r)),e.cuid2=r=>e.check(yn(Pn,r)),e.ulid=r=>e.check(En(Un,r)),e.base64=r=>e.check(xn(Gn,r)),e.base64url=r=>e.check(kn(Kn,r)),e.xid=r=>e.check(bn(Zn,r)),e.ksuid=r=>e.check(Dn(qn,r)),e.ipv4=r=>e.check(wn(Ln,r)),e.ipv6=r=>e.check(Bn(Jn,r)),e.cidrv4=r=>e.check($n(Vn,r)),e.cidrv6=r=>e.check(Cn(Wn,r)),e.e164=r=>e.check(An(Hn,r)),e.datetime=r=>e.check(Fo(r)),e.date=r=>e.check(jo(r)),e.time=r=>e.check(Oo(r)),e.duration=r=>e.check(To(r))});function tu(e){return Pa(or,e)}s(tu,"Tn"),o(tu,"string");var ae=B("ZodStringFormat",(e,t)=>{se.init(e,t),Nn.init(e,t)}),On=B("ZodEmail",(e,t)=>{x4.init(e,t),ae.init(e,t)});function Mo(e){return dn(On,e)}s(Mo,"hb"),o(Mo,"email");var lr=B("ZodGUID",(e,t)=>{$4.init(e,t),ae.init(e,t)});function Po(e){return Wu(lr,e)}s(Po,"vb"),o(Po,"guid");var qe=B("ZodUUID",(e,t)=>{C4.init(e,t),ae.init(e,t)});function Uo(e){return cn(qe,e)}s(Uo,"yb"),o(Uo,"uuid");function Zo(e){return pn(qe,e)}s(Zo,"bb"),o(Zo,"uuidv4");function qo(e){return mn(qe,e)}s(qo,"wb"),o(qo,"uuidv6");function Lo(e){return fn(qe,e)}s(Lo,"xb"),o(Lo,"uuidv7");var dr=B("ZodURL",(e,t)=>{k4.init(e,t),ae.init(e,t)});function Jo(e){return Gu(dr,e)}s(Jo,"$b"),o(Jo,"url");function Vo(e){return Gu(dr,{protocol:it.httpProtocol,hostname:it.domain,...Q.normalizeParams(e)})}s(Vo,"_b"),o(Vo,"httpUrl");var Rn=B("ZodEmoji",(e,t)=>{A4.init(e,t),ae.init(e,t)});function Wo(e){return gn(Rn,e)}s(Wo,"kb"),o(Wo,"emoji");var Tn=B("ZodNanoID",(e,t)=>{_4.init(e,t),ae.init(e,t)});function Go(e){return hn(Tn,e)}s(Go,"Sb"),o(Go,"nanoid");var Mn=B("ZodCUID",(e,t)=>{I4.init(e,t),ae.init(e,t)});function Ko(e){return vn(Mn,e)}s(Ko,"Ib"),o(Ko,"cuid");var Pn=B("ZodCUID2",(e,t)=>{S4.init(e,t),ae.init(e,t)});function Ho(e){return yn(Pn,e)}s(Ho,"Rb"),o(Ho,"cuid2");var Un=B("ZodULID",(e,t)=>{F4.init(e,t),ae.init(e,t)});function Xo(e){return En(Un,e)}s(Xo,"Tb"),o(Xo,"ulid");var Zn=B("ZodXID",(e,t)=>{z4.init(e,t),ae.init(e,t)});function Yo(e){return bn(Zn,e)}s(Yo,"Eb"),o(Yo,"xid");var qn=B("ZodKSUID",(e,t)=>{j4.init(e,t),ae.init(e,t)});function Qo(e){return Dn(qn,e)}s(Qo,"Ab"),o(Qo,"ksuid");var Ln=B("ZodIPv4",(e,t)=>{M4.init(e,t),ae.init(e,t)});function e0(e){return wn(Ln,e)}s(e0,"zb"),o(e0,"ipv4");var t0=B("ZodMAC",(e,t)=>{U4.init(e,t),ae.init(e,t)});function u0(e){return Za(t0,e)}s(u0,"jb"),o(u0,"mac");var Jn=B("ZodIPv6",(e,t)=>{P4.init(e,t),ae.init(e,t)});function r0(e){return Bn(Jn,e)}s(r0,"Ob"),o(r0,"ipv6");var Vn=B("ZodCIDRv4",(e,t)=>{Z4.init(e,t),ae.init(e,t)});function n0(e){return $n(Vn,e)}s(n0,"Nb"),o(n0,"cidrv4");var Wn=B("ZodCIDRv6",(e,t)=>{q4.init(e,t),ae.init(e,t)});function i0(e){return Cn(Wn,e)}s(i0,"Pb"),o(i0,"cidrv6");var Gn=B("ZodBase64",(e,t)=>{L4.init(e,t),ae.init(e,t)});function s0(e){return xn(Gn,e)}s(s0,"Db"),o(s0,"base64");var Kn=B("ZodBase64URL",(e,t)=>{J4.init(e,t),ae.init(e,t)});function a0(e){return kn(Kn,e)}s(a0,"Mb"),o(a0,"base64url");var Hn=B("ZodE164",(e,t)=>{V4.init(e,t),ae.init(e,t)});function o0(e){return An(Hn,e)}s(o0,"Cb"),o(o0,"e164");var Xn=B("ZodJWT",(e,t)=>{W4.init(e,t),ae.init(e,t)});function l0(e){return _n(Xn,e)}s(l0,"Ub"),o(l0,"jwt");var uu=B("ZodCustomStringFormat",(e,t)=>{G4.init(e,t),ae.init(e,t)});function d0(e,t,r={}){return Qt(uu,e,t,r)}s(d0,"Lb"),o(d0,"stringFormat");function c0(e){return Qt(uu,"hostname",it.hostname,e)}s(c0,"Fb"),o(c0,"hostname");function p0(e){return Qt(uu,"hex",it.hex,e)}s(p0,"Zb"),o(p0,"hex");function m0(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,u=it[i];if(!u)throw new Error(`Unrecognized hash format: ${i}`);return Qt(uu,i,u,t)}s(m0,"Bb"),o(m0,"hash");var cr=B("ZodNumber",(e,t)=>{la.init(e,t),X.init(e,t),e._zod.processJSONSchema=(i,u,n)=>ih(e,i,u,n),eu(e,"ZodNumber",{gt(i,u){return this.check(Xe(i,u))},gte(i,u){return this.check(we(i,u))},min(i,u){return this.check(we(i,u))},lt(i,u){return this.check(He(i,u))},lte(i,u){return this.check(Ie(i,u))},max(i,u){return this.check(Ie(i,u))},int(i){return this.check(pr(i))},safe(i){return this.check(pr(i))},positive(i){return this.check(Xe(0,i))},nonnegative(i){return this.check(we(0,i))},negative(i){return this.check(He(0,i))},nonpositive(i){return this.check(Ie(0,i))},multipleOf(i,u){return this.check($t(i,u))},step(i,u){return this.check($t(i,u))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Yn(e){return Wa(cr,e)}s(Yn,"zp"),o(Yn,"number");var _t=B("ZodNumberFormat",(e,t)=>{K4.init(e,t),cr.init(e,t)});function pr(e){return Ka(_t,e)}s(pr,"Mi"),o(pr,"int");function f0(e){return Ha(_t,e)}s(f0,"qb"),o(f0,"float32");function g0(e){return Xa(_t,e)}s(g0,"Vb"),o(g0,"float64");function h0(e){return Ya(_t,e)}s(h0,"Gb"),o(h0,"int32");function v0(e){return Qa(_t,e)}s(v0,"Jb"),o(v0,"uint32");var mr=B("ZodBoolean",(e,t)=>{da.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>sh(e,r,i,u)});function Qn(e){return eo(mr,e)}s(Qn,"jp"),o(Qn,"boolean");var fr=B("ZodBigInt",(e,t)=>{ca.init(e,t),X.init(e,t),e._zod.processJSONSchema=(i,u,n)=>ah(e,i,u,n),e.gte=(i,u)=>e.check(we(i,u)),e.min=(i,u)=>e.check(we(i,u)),e.gt=(i,u)=>e.check(Xe(i,u)),e.gte=(i,u)=>e.check(we(i,u)),e.min=(i,u)=>e.check(we(i,u)),e.lt=(i,u)=>e.check(He(i,u)),e.lte=(i,u)=>e.check(Ie(i,u)),e.max=(i,u)=>e.check(Ie(i,u)),e.positive=i=>e.check(Xe(BigInt(0),i)),e.negative=i=>e.check(He(BigInt(0),i)),e.nonpositive=i=>e.check(Ie(BigInt(0),i)),e.nonnegative=i=>e.check(we(BigInt(0),i)),e.multipleOf=(i,u)=>e.check($t(i,u));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function y0(e){return uo(fr,e)}s(y0,"Kb"),o(y0,"bigint");var ei=B("ZodBigIntFormat",(e,t)=>{H4.init(e,t),fr.init(e,t)});function E0(e){return no(ei,e)}s(E0,"Wb"),o(E0,"int64");function b0(e){return io(ei,e)}s(b0,"Xb"),o(b0,"uint64");var D0=B("ZodSymbol",(e,t)=>{X4.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>oh(e,r,i,u)});function w0(e){return so(D0,e)}s(w0,"Hb"),o(w0,"symbol");var B0=B("ZodUndefined",(e,t)=>{Y4.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>dh(e,r,i,u)});function $0(e){return ao(B0,e)}s($0,"Yb"),o($0,"_undefined");var C0=B("ZodNull",(e,t)=>{Q4.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>lh(e,r,i,u)});function ti(e){return oo(C0,e)}s(ti,"Dp"),o(ti,"_null");var x0=B("ZodAny",(e,t)=>{ef.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>mh(e,r,i,u)});function k0(){return lo(x0)}s(k0,"Qb"),o(k0,"any");var A0=B("ZodUnknown",(e,t)=>{tf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>fh(e,r,i,u)});function at(){return co(A0)}s(at,"Ft"),o(at,"unknown");var _0=B("ZodNever",(e,t)=>{uf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ph(e,r,i,u)});function gr(e){return po(_0,e)}s(gr,"ns"),o(gr,"never");var I0=B("ZodVoid",(e,t)=>{rf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ch(e,r,i,u)});function S0(e){return mo(I0,e)}s(S0,"ew"),o(S0,"_void");var ui=B("ZodDate",(e,t)=>{nf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(i,u,n)=>gh(e,i,u,n),e.min=(i,u)=>e.check(we(i,u)),e.max=(i,u)=>e.check(Ie(i,u));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function F0(e){return fo(ui,e)}s(F0,"tw"),o(F0,"date");var z0=B("ZodArray",(e,t)=>{sf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>kh(e,r,i,u),e.element=t.element,eu(e,"ZodArray",{min(r,i){return this.check(st(r,i))},nonempty(r){return this.check(st(1,r))},max(r,i){return this.check(Xt(r,i))},length(r,i){return this.check(Yt(r,i))},unwrap(){return this.element}})});function ru(e,t){return vo(z0,e,t)}s(ru,"Pn"),o(ru,"array");function j0(e){let t=e._zod.def.shape;return Er(Object.keys(t))}s(j0,"rw"),o(j0,"keyof");var hr=B("ZodObject",(e,t)=>{of.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ah(e,r,i,u),Q.defineLazy(e,"shape",()=>t.shape),eu(e,"ZodObject",{keyof(){return Er(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:at()})},loose(){return this.clone({...this._zod.def,catchall:at()})},strict(){return this.clone({...this._zod.def,catchall:gr()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Q.extend(this,r)},safeExtend(r){return Q.safeExtend(this,r)},merge(r){return Q.merge(this,r)},pick(r){return Q.pick(this,r)},omit(r){return Q.omit(this,r)},partial(...r){return Q.partial(si,this,r[0])},required(...r){return Q.required(di,this,r[0])}})});function N0(e,t){let r={type:"object",shape:e??{},...Q.normalizeParams(t)};return new hr(r)}s(N0,"nw"),o(N0,"object");function O0(e,t){return new hr({type:"object",shape:e,catchall:gr(),...Q.normalizeParams(t)})}s(O0,"ow"),o(O0,"strictObject");function R0(e,t){return new hr({type:"object",shape:e,catchall:at(),...Q.normalizeParams(t)})}s(R0,"iw"),o(R0,"looseObject");var vr=B("ZodUnion",(e,t)=>{an.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>xo(e,r,i,u),e.options=t.options});function yr(e,t){return new vr({type:"union",options:e,...Q.normalizeParams(t)})}s(yr,"os"),o(yr,"union");var T0=B("ZodXor",(e,t)=>{vr.init(e,t),lf.init(e,t),e._zod.processJSONSchema=(r,i,u)=>xo(e,r,i,u),e.options=t.options});function M0(e,t){return new T0({type:"union",options:e,inclusive:!1,...Q.normalizeParams(t)})}s(M0,"sw"),o(M0,"xor");var P0=B("ZodDiscriminatedUnion",(e,t)=>{vr.init(e,t),df.init(e,t)});function U0(e,t,r){return new P0({type:"union",options:t,discriminator:e,...Q.normalizeParams(r)})}s(U0,"aw"),o(U0,"discriminatedUnion");var Z0=B("ZodIntersection",(e,t)=>{cf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>_h(e,r,i,u)});function ri(e,t){return new Z0({type:"intersection",left:e,right:t})}s(ri,"Vp"),o(ri,"intersection");var q0=B("ZodTuple",(e,t)=>{ya.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ih(e,r,i,u),e.rest=r=>e.clone({...e._zod.def,rest:r})});function ni(e,t,r){let i=t instanceof K,u=i?r:t,n=i?t:null;return new q0({type:"tuple",items:e,rest:n,...Q.normalizeParams(u)})}s(ni,"Jp"),o(ni,"tuple");var nu=B("ZodRecord",(e,t)=>{pf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Sh(e,r,i,u),e.keyType=t.keyType,e.valueType=t.valueType});function ii(e,t,r){return!t||!t._zod?new nu({type:"record",keyType:tu(),valueType:e,...Q.normalizeParams(t)}):new nu({type:"record",keyType:e,valueType:t,...Q.normalizeParams(r)})}s(ii,"Kp"),o(ii,"record");function L0(e,t,r){let i=ke(e);return i._zod.values=void 0,new nu({type:"record",keyType:i,valueType:t,...Q.normalizeParams(r)})}s(L0,"cw"),o(L0,"partialRecord");function J0(e,t,r){return new nu({type:"record",keyType:e,valueType:t,mode:"loose",...Q.normalizeParams(r)})}s(J0,"uw"),o(J0,"looseRecord");var V0=B("ZodMap",(e,t)=>{mf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ch(e,r,i,u),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Ye(...r)),e.nonempty=r=>e.check(Ye(1,r)),e.max=(...r)=>e.check(Ct(...r)),e.size=(...r)=>e.check(Ht(...r))});function W0(e,t,r){return new V0({type:"map",keyType:e,valueType:t,...Q.normalizeParams(r)})}s(W0,"lw"),o(W0,"map");var G0=B("ZodSet",(e,t)=>{ff.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>xh(e,r,i,u),e.min=(...r)=>e.check(Ye(...r)),e.nonempty=r=>e.check(Ye(1,r)),e.max=(...r)=>e.check(Ct(...r)),e.size=(...r)=>e.check(Ht(...r))});function K0(e,t){return new G0({type:"set",valueType:e,...Q.normalizeParams(t)})}s(K0,"dw"),o(K0,"set");var iu=B("ZodEnum",(e,t)=>{gf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(i,u,n)=>hh(e,i,u,n),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(i,u)=>{let n={};for(let a of i)if(r.has(a))n[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new iu({...t,checks:[],...Q.normalizeParams(u),entries:n})},e.exclude=(i,u)=>{let n={...t.entries};for(let a of i)if(r.has(a))delete n[a];else throw new Error(`Key ${a} not found in enum`);return new iu({...t,checks:[],...Q.normalizeParams(u),entries:n})}});function Er(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new iu({type:"enum",entries:r,...Q.normalizeParams(t)})}s(Er,"is"),o(Er,"_enum");function H0(e,t){return new iu({type:"enum",entries:e,...Q.normalizeParams(t)})}s(H0,"pw"),o(H0,"nativeEnum");var X0=B("ZodLiteral",(e,t)=>{hf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>vh(e,r,i,u),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Y0(e,t){return new X0({type:"literal",values:Array.isArray(e)?e:[e],...Q.normalizeParams(t)})}s(Y0,"fw"),o(Y0,"literal");var Q0=B("ZodFile",(e,t)=>{vf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>bh(e,r,i,u),e.min=(r,i)=>e.check(Ye(r,i)),e.max=(r,i)=>e.check(Ct(r,i)),e.mime=(r,i)=>e.check(tr(Array.isArray(r)?r:[r],i))});function el(e){return yo(Q0,e)}s(el,"mw"),o(el,"file");var tl=B("ZodTransform",(e,t)=>{yf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>$h(e,r,i,u),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Qr(e.constructor.name);r.addIssue=n=>{if(typeof n=="string")r.issues.push(Q.issue(n,r.value,t));else{let a=n;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Q.issue(a))}};let u=t.transform(r.value,r);return u instanceof Promise?u.then(n=>(r.value=n,r.fallback=!0,r)):(r.value=u,r.fallback=!0,r)}});function br(e){return new tl({type:"transform",transform:e})}s(br,"ss"),o(br,"transform");var si=B("ZodOptional",(e,t)=>{Ca.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ko(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function su(e){return new si({type:"optional",innerType:e})}s(su,"An"),o(su,"optional");var ul=B("ZodExactOptional",(e,t)=>{Ef.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ko(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function ai(e){return new ul({type:"optional",innerType:e})}s(ai,"tf"),o(ai,"exactOptional");var rl=B("ZodNullable",(e,t)=>{bf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Fh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function au(e){return new rl({type:"nullable",innerType:e})}s(au,"zn"),o(au,"nullable");function nl(e){return su(au(e))}s(nl,"gw"),o(nl,"nullish");var il=B("ZodDefault",(e,t)=>{Df.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>jh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function oi(e,t){return new il({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Q.shallowClone(t)}})}s(oi,"of"),o(oi,"_default");var sl=B("ZodPrefault",(e,t)=>{wf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Nh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function li(e,t){return new sl({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Q.shallowClone(t)}})}s(li,"af"),o(li,"prefault");var di=B("ZodNonOptional",(e,t)=>{Bf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>zh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function ci(e,t){return new di({type:"nonoptional",innerType:e,...Q.normalizeParams(t)})}s(ci,"cf"),o(ci,"nonoptional");var al=B("ZodSuccess",(e,t)=>{$f.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Dh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function ol(e){return new al({type:"success",innerType:e})}s(ol,"hw"),o(ol,"success");var ll=B("ZodCatch",(e,t)=>{Cf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Oh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pi(e,t){return new ll({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}s(pi,"df"),o(pi,"_catch");var dl=B("ZodNaN",(e,t)=>{xf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>yh(e,r,i,u)});function cl(e){return ho(dl,e)}s(cl,"vw"),o(cl,"nan");var Dr=B("ZodPipe",(e,t)=>{Aa.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Rh(e,r,i,u),e.in=t.in,e.out=t.out});function wr(e,t){return new Dr({type:"pipe",in:e,out:t})}s(wr,"Ci"),o(wr,"pipe");var Br=B("ZodCodec",(e,t)=>{Dr.init(e,t),_a.init(e,t)});function pl(e,t,r){return new Br({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}s(pl,"yw"),o(pl,"codec");function ml(e){let t=e._zod.def;return new Br({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}s(ml,"bw"),o(ml,"invertCodec");var fl=B("ZodPreprocess",(e,t)=>{Dr.init(e,t),kf.init(e,t)}),gl=B("ZodReadonly",(e,t)=>{Af.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Th(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function mi(e){return new gl({type:"readonly",innerType:e})}s(mi,"gf"),o(mi,"readonly");var hl=B("ZodTemplateLiteral",(e,t)=>{_f.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Eh(e,r,i,u)});function vl(e,t){return new hl({type:"template_literal",parts:e,...Q.normalizeParams(t)})}s(vl,"ww"),o(vl,"templateLiteral");var yl=B("ZodLazy",(e,t)=>{Ff.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ph(e,r,i,u),e.unwrap=()=>e._zod.def.getter()});function fi(e){return new yl({type:"lazy",getter:e})}s(fi,"yf"),o(fi,"lazy");var El=B("ZodPromise",(e,t)=>{Sf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Mh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function bl(e){return new El({type:"promise",innerType:e})}s(bl,"xw"),o(bl,"promise");var Dl=B("ZodFunction",(e,t)=>{If.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Bh(e,r,i,u)});function $r(e){return new Dl({type:"function",input:Array.isArray(e?.input)?ni(e?.input):e?.input??ru(at()),output:e?.output??at()})}s($r,"$w"),o($r,"_function");var Cr=B("ZodCustom",(e,t)=>{zf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>wh(e,r,i,u)});function wl(e){let t=new oe({check:"custom"});return t._zod.check=e,t}s(wl,"_w"),o(wl,"check");function Bl(e,t){return Eo(Cr,e??(()=>!0),t)}s(Bl,"kw"),o(Bl,"custom");function gi(e,t={}){return bo(Cr,e,t)}s(gi,"xf"),o(gi,"refine");function hi(e,t){return Do(e,t)}s(hi,"$f"),o(hi,"superRefine");var rv=Bo,nv=$o;function $l(e,t={}){let r=new Cr({type:"custom",check:"custom",fn:o(i=>i instanceof e,"fn"),abort:!0,...Q.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}s($l,"Rw"),o($l,"_instanceof");var iv=o((...e)=>Co({Codec:Br,Boolean:mr,String:or},...e),"stringbool");function Cl(e){let t=fi(()=>yr([tu(e),Yn(),Qn(),ti(),ru(t),ii(tu(),t)]));return t}s(Cl,"Ew"),o(Cl,"json");function xl(e,t){return new fl({type:"pipe",in:br(e),out:t})}s(xl,"Aw"),o(xl,"preprocess");var L5={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function sv(e){he({customError:e})}s(sv,"cI"),o(sv,"setErrorMap");function av(){return he().customError}s(av,"uI"),o(av,"getErrorMap");var kl;kl||(kl={});var Z={...Uh,...Zh,iso:Io},J5=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function ov(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}s(ov,"dI"),o(ov,"detectVersion");function lv(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let u=r[1];if(!u||!t.defs[u])throw new Error(`Reference not found: ${e}`);return t.defs[u]}throw new Error(`Reference not found: ${e}`)}s(lv,"pI"),o(lv,"resolveRef");function Al(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Z.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let u=e.$ref;if(t.refs.has(u))return t.refs.get(u);if(t.processing.has(u))return Z.lazy(()=>{if(!t.refs.has(u))throw new Error(`Circular reference not resolved: ${u}`);return t.refs.get(u)});t.processing.add(u);let n=lv(u,t),a=ye(n,t);return t.refs.set(u,a),t.processing.delete(u),a}if(e.enum!==void 0){let u=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&u.length===1&&u[0]===null)return Z.null();if(u.length===0)return Z.never();if(u.length===1)return Z.literal(u[0]);if(u.every(a=>typeof a=="string"))return Z.enum(u);let n=u.map(a=>Z.literal(a));return n.length<2?n[0]:Z.union([n[0],n[1],...n.slice(2)])}if(e.const!==void 0)return Z.literal(e.const);let r=e.type;if(Array.isArray(r)){let u=r.map(n=>{let a={...e,type:n};return Al(a,t)});return u.length===0?Z.never():u.length===1?u[0]:Z.union(u)}if(!r)return Z.any();let i;switch(r){case"string":{let u=Z.string();if(e.format){let n=e.format;n==="email"?u=u.check(Z.email()):n==="uri"||n==="uri-reference"?u=u.check(Z.url()):n==="uuid"||n==="guid"?u=u.check(Z.uuid()):n==="date-time"?u=u.check(Z.iso.datetime()):n==="date"?u=u.check(Z.iso.date()):n==="time"?u=u.check(Z.iso.time()):n==="duration"?u=u.check(Z.iso.duration()):n==="ipv4"?u=u.check(Z.ipv4()):n==="ipv6"?u=u.check(Z.ipv6()):n==="mac"?u=u.check(Z.mac()):n==="cidr"?u=u.check(Z.cidrv4()):n==="cidr-v6"?u=u.check(Z.cidrv6()):n==="base64"?u=u.check(Z.base64()):n==="base64url"?u=u.check(Z.base64url()):n==="e164"?u=u.check(Z.e164()):n==="jwt"?u=u.check(Z.jwt()):n==="emoji"?u=u.check(Z.emoji()):n==="nanoid"?u=u.check(Z.nanoid()):n==="cuid"?u=u.check(Z.cuid()):n==="cuid2"?u=u.check(Z.cuid2()):n==="ulid"?u=u.check(Z.ulid()):n==="xid"?u=u.check(Z.xid()):n==="ksuid"&&(u=u.check(Z.ksuid()))}typeof e.minLength=="number"&&(u=u.min(e.minLength)),typeof e.maxLength=="number"&&(u=u.max(e.maxLength)),e.pattern&&(u=u.regex(new RegExp(e.pattern))),i=u;break}case"number":case"integer":{let u=r==="integer"?Z.number().int():Z.number();typeof e.minimum=="number"&&(u=u.min(e.minimum)),typeof e.maximum=="number"&&(u=u.max(e.maximum)),typeof e.exclusiveMinimum=="number"?u=u.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(u=u.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?u=u.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(u=u.lt(e.maximum)),typeof e.multipleOf=="number"&&(u=u.multipleOf(e.multipleOf)),i=u;break}case"boolean":{i=Z.boolean();break}case"null":{i=Z.null();break}case"object":{let u={},n=e.properties||{},a=new Set(e.required||[]);for(let[d,p]of Object.entries(n)){let c=ye(p,t);u[d]=a.has(d)?c:c.optional()}if(e.propertyNames){let d=ye(e.propertyNames,t),p=e.additionalProperties&&typeof e.additionalProperties=="object"?ye(e.additionalProperties,t):Z.any();if(Object.keys(u).length===0){i=Z.record(d,p);break}let c=Z.object(u).passthrough(),f=Z.looseRecord(d,p);i=Z.intersection(c,f);break}if(e.patternProperties){let d=e.patternProperties,p=Object.keys(d),c=[];for(let g of p){let m=ye(d[g],t),h=Z.string().regex(new RegExp(g));c.push(Z.looseRecord(h,m))}let f=[];if(Object.keys(u).length>0&&f.push(Z.object(u).passthrough()),f.push(...c),f.length===0)i=Z.object({}).passthrough();else if(f.length===1)i=f[0];else{let g=Z.intersection(f[0],f[1]);for(let m=2;m<f.length;m++)g=Z.intersection(g,f[m]);i=g}break}let l=Z.object(u);e.additionalProperties===!1?i=l.strict():typeof e.additionalProperties=="object"?i=l.catchall(ye(e.additionalProperties,t)):i=l.passthrough();break}case"array":{let u=e.prefixItems,n=e.items;if(u&&Array.isArray(u)){let a=u.map(d=>ye(d,t)),l=n&&typeof n=="object"&&!Array.isArray(n)?ye(n,t):void 0;l?i=Z.tuple(a).rest(l):i=Z.tuple(a),typeof e.minItems=="number"&&(i=i.check(Z.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(Z.maxLength(e.maxItems)))}else if(Array.isArray(n)){let a=n.map(d=>ye(d,t)),l=e.additionalItems&&typeof e.additionalItems=="object"?ye(e.additionalItems,t):void 0;l?i=Z.tuple(a).rest(l):i=Z.tuple(a),typeof e.minItems=="number"&&(i=i.check(Z.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(Z.maxLength(e.maxItems)))}else if(n!==void 0){let a=ye(n,t),l=Z.array(a);typeof e.minItems=="number"&&(l=l.min(e.minItems)),typeof e.maxItems=="number"&&(l=l.max(e.maxItems)),i=l}else i=Z.array(Z.any());break}default:throw new Error(`Unsupported type: ${r}`)}return i}s(Al,"zw"),o(Al,"convertBaseSchema");function ye(e,t){if(typeof e=="boolean")return e?Z.any():Z.never();let r=Al(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let l=e.anyOf.map(p=>ye(p,t)),d=Z.union(l);r=i?Z.intersection(r,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let l=e.oneOf.map(p=>ye(p,t)),d=Z.xor(l);r=i?Z.intersection(r,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:Z.any();else{let l=i?r:ye(e.allOf[0],t),d=i?0:1;for(let p=d;p<e.allOf.length;p++)l=Z.intersection(l,ye(e.allOf[p],t));r=l}e.nullable===!0&&t.version==="openapi-3.0"&&(r=Z.nullable(r)),e.readOnly===!0&&(r=Z.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let u={},n=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let l of n)l in e&&(u[l]=e[l]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let l of a)l in e&&(u[l]=e[l]);for(let l of Object.keys(e))J5.has(l)||(u[l]=e[l]);return Object.keys(u).length>0&&t.registry.add(r,u),e.description&&(r=r.describe(e.description)),r}s(ye,"xe"),o(ye,"convertSchema");function dv(e,t){if(typeof e=="boolean")return e?Z.any():Z.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=ov(r,t?.defaultTarget),u=r.$defs||r.definitions||{},n={version:i,defs:u,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??Ne};return ye(r,n)}s(dv,"jw"),o(dv,"fromJSONSchema");var cv={};Ge(cv,{bigint:s(()=>gv,"bigint"),boolean:s(()=>fv,"boolean"),date:s(()=>hv,"date"),number:s(()=>mv,"number"),string:s(()=>pv,"string")});function pv(e){return Ua(or,e)}s(pv,"fI"),o(pv,"string");function mv(e){return Ga(cr,e)}s(mv,"mI"),o(mv,"number");function fv(e){return to(mr,e)}s(fv,"gI"),o(fv,"boolean");function gv(e){return ro(fr,e)}s(gv,"hI"),o(gv,"bigint");function hv(e){return go(ui,e)}s(hv,"vI"),o(hv,"date"),he(ja());var _l=v.object({file:v.string(),line:v.number().int().nonnegative().optional(),column:v.number().int().nonnegative().optional(),symbol:v.string().optional(),componentName:v.string().optional(),hookName:v.string().optional()}),V5=v.enum(["user-click","user-input","keyboard","route-load","effect","memo-recompute","timer","raf","idle-callback","websocket-message","broadcast-channel","post-message","storage-event","service-worker-message","media-query-change","visibility-change","resize","intersection-observer","mutation-observer","backend-response","hmr-update","ai-turn","page-load","form-submit","input-change"]),vv=v.object({sessionId:v.string(),browserContextId:v.string().optional(),tabId:v.string().optional(),frameId:v.string().optional(),route:v.string().optional(),url:v.string().optional(),flowId:v.string().optional(),originType:V5.optional(),originNodeId:v.string().optional(),causedByNodeId:v.string().optional(),requestId:v.string().optional(),parentRequestId:v.string().optional(),traceparent:v.string().optional(),projectName:v.string().optional(),userActionId:v.string().optional(),userIdHash:v.string().optional(),tenantIdHash:v.string().optional()}),W5=v.enum(["nx","vite","typescript","eslint","rollup","client-runtime","chrome","react","valtio","nestjs","nextjs","db","redis","queue","memory","visual","perf","security","gateway","external","ai"]),G5=v.enum(["build","lint","typecheck","test","runtime","render","visual","trace","state","network","backend","db","memory","performance","security","deps","cluster","ai"]),Il=v.enum(["debug","info","warning","error","fatal"]),c7=v.object({id:v.string(),sessionId:v.string(),timestamp:v.number().int().nonnegative(),source:W5,category:G5,severity:Il,context:vv,fingerprint:v.string(),title:v.string(),message:v.string().optional(),location:_l.optional(),relatedFiles:v.array(v.string()).optional(),relatedUrls:v.array(v.string()).optional(),raw:v.unknown().optional()}),K5=v.enum(["session","browser-context","tab","renderer","router","route","page","component","element","slot","render","react-mount","react-unmount","hook","effect","effect-run","memo","memo-compute","ui-event","handler","animation","animation-frame","transition","timer","api-client-call","http-request","http-response","server-process","nest-app","nest-module","nest-provider","singleton-instance","server-request","guard","controller","service-method","loop","loop-iteration","queue-job","db-query","redis-op","promise","promise-continuation","state-store","state-update","selector","selector-update","visual-frame","visual-violation","style-change","layout-change","memory-owner","memory-mutation","memory-retention","heap-snapshot","build-event","lint-event","typecheck-event","test-event","bundle-report","hmr-update"]),H5=v.enum(["created","active","completed","disposed","errored"]),p7=v.object({id:v.string(),parentTraceNodeId:v.string().optional(),type:K5,logicalId:v.string().optional(),instanceId:v.string().optional(),generation:v.number().int().nonnegative().optional(),lifecycle:H5,context:vv,name:v.string(),startTime:v.number().int().nonnegative(),endTime:v.number().int().nonnegative().optional(),durationMs:v.number().nonnegative().optional(),location:_l.optional(),attributes:v.record(v.string(),v.unknown())}),X5=v.enum(["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"]),m7=v.object({id:v.string(),from:v.string(),to:v.string(),axis:X5,type:v.string(),timestamp:v.number().int().nonnegative(),attributes:v.record(v.string(),v.unknown()).optional()}),Y5=v.enum(["mount","update"]),Q5=v.discriminatedUnion("type",[v.object({type:v.literal("props"),changedKeys:v.array(v.string())}),v.object({type:v.literal("react-state"),hookIndex:v.number().int()}),v.object({type:v.literal("context"),contextName:v.string()}),v.object({type:v.literal("valtio-path"),path:v.string(),changedKeys:v.array(v.string())}),v.object({type:v.literal("parent-render"),parentRenderId:v.string()}),v.object({type:v.literal("hook-dep-changed"),hookInstanceId:v.string(),depsHashBefore:v.string(),depsHashAfter:v.string()}),v.object({type:v.literal("force"),reason:v.string()})]),f7=v.object({phase:Y5,actualDurationMs:v.number().nonnegative(),baseDurationMs:v.number().nonnegative(),startTime:v.number().nonnegative(),commitTime:v.number().nonnegative(),why:v.array(Q5)}),g7=v.object({hookInstanceId:v.string(),depsHash:v.string(),prevDepsHash:v.string().optional(),durationMs:v.number().nonnegative(),cleanupRan:v.boolean().optional()}),h7=v.object({storeId:v.string(),path:v.string(),changedKeys:v.array(v.string()),beforeHash:v.string(),afterHash:v.string(),preview:v.unknown().optional()}),v7=v.object({method:v.string(),route:v.string(),status:v.number().int().optional(),durationMs:v.number().nonnegative().optional(),traceparent:v.string().optional()}),eb=v.enum(["N+1","sequential-await","growing-allocation"]),y7=v.object({iterations:v.number().int().nonnegative(),durationMs:v.number().nonnegative(),dbCallsInsideLoop:v.number().int().nonnegative(),redisCallsInsideLoop:v.number().int().nonnegative(),awaitedOperationsInsideLoop:v.number().int().nonnegative(),slowestIterations:v.array(v.object({index:v.number().int().nonnegative(),durationMs:v.number().nonnegative(),childNodeIds:v.array(v.string())})).optional(),patterns:v.array(eb).optional()}),tb=v.enum(["Map","Set","Array","EventEmitter","Queue","RxSubject","Timer","Interval","Custom"]),E7=v.object({ownerInstanceId:v.string(),containerKind:tb,fieldName:v.string(),itemCount:v.number().int().nonnegative(),estimatedBytes:v.number().nonnegative(),retainedBytes:v.number().nonnegative().optional(),growthSinceStart:v.number()}),ub=v.enum(["set","push","add","delete","clear","subscribe","listen","schedule"]),b7=v.object({ownerNodeId:v.string(),operation:ub,beforeCount:v.number().int().nonnegative(),afterCount:v.number().int().nonnegative(),estimatedDeltaBytes:v.number(),keyPreview:v.string().optional(),valueType:v.string().optional()}),yv=v.object({x:v.number(),y:v.number(),width:v.number().nonnegative(),height:v.number().nonnegative()}),rb=v.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]),nb=v.enum(["computed-style","layout","paint-order"]),D7=v.object({causedBy:rb,viewport:yv,layoutSnapshotId:v.string(),styleSnapshotId:v.string(),screenshotId:v.string().optional(),changedNodes:v.array(v.object({uid:v.string(),component:v.string().optional(),change:nb,property:v.string().optional(),before:v.unknown().optional(),after:v.unknown().optional()}))}),ib=v.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]),sb=v.enum(["always","after-animation","stable-only","during-animation"]),ab=v.enum(["info","warning","error"]),w7=v.object({ruleId:v.string(),ruleType:ib,severity:ab,timing:sb,element:v.object({uid:v.string(),component:v.string().optional(),rect:yv}),expected:v.record(v.string(),v.unknown()),actual:v.record(v.string(),v.unknown()),evidence:v.object({computedStyle:v.string().optional(),screenshotCrop:v.string().optional(),trace:v.string().optional(),cssCause:v.object({selector:v.string(),file:v.string().optional(),line:v.number().int().optional(),declaration:v.string().optional()}).optional()})}),ob=v.enum(["none","connected"]),lb=v.enum(["running","clean","failing","error"]),db=v.object({id:v.string(),tool:v.string(),project:v.string().optional(),firstReportedAt:v.number().int().nonnegative(),lastReportedAt:v.number().int().nonnegative(),lastRunStatus:lb,lastRunDurationMs:v.number().int().nonnegative().optional(),errorCount:v.number().int().nonnegative(),warningCount:v.number().int().nonnegative().optional(),error:v.string().optional()}),vi=v.object({producer:ob,producers:v.array(db),lastReportedAt:v.number().int().nonnegative().optional(),ageMs:v.number().int().nonnegative().optional(),stale:v.boolean(),detail:v.string()}),Ev=10*6e4;function yi(e){let t=e.now??Date.now(),r=[...e.producers].sort((p,c)=>c.lastReportedAt-p.lastReportedAt);if(r.length===0)return{producer:"none",producers:[],stale:!1,detail:`No ${e.domain} producer has ever reported into this session \u2014 this is NOT a clean result, nothing is watching. ${e.noProducerHint}`};let i=r[0].lastReportedAt,u=Math.max(0,t-i),n=u>Ev,a=r.filter(p=>p.lastRunStatus==="failing"),l=r.filter(p=>p.lastRunStatus==="error"),d=[`${r.length} ${e.domain} producer${r.length===1?"":"s"} reporting (${r.map(p=>p.id).join(", ")}); newest report ${bv(u)}.`];return l.length>0&&d.push(`${l.length} produced NO verdict (the tool itself failed): ${l.map(p=>`${p.id} \u2014 ${p.error??"unknown error"}`).join("; ")}.`),a.length>0&&d.push(`${a.length} reporting errors.`),n&&d.push(`Older than ${Math.round(Ev/6e4)}m \u2014 the verdict may predate the current source.`),{producer:"connected",producers:r,lastReportedAt:i,ageMs:u,stale:n,detail:d.join(" ")}}s(yi,"Pr"),o(yi,"summariseProducers");function bv(e){return e<1e3?"just now":e<6e4?`${Math.round(e/1e3)}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:`${Math.round(e/36e5)}h ago`}s(bv,"MI"),o(bv,"describeAge");var ou=v.object({$schema:v.string().optional(),schemaVersion:v.literal(1),revision:v.number().int().nonnegative(),updatedAt:v.string().datetime().optional()}),cb=v.enum(["starting","clean","warning","failing"]),Dv=v.object({source:v.string(),severity:Il,title:v.string(),fingerprint:v.string(),resource:v.string(),pageId:v.string().optional(),flowId:v.string().optional(),location:_l.optional()}),pb=v.object({typecheck:v.enum(["passed","failed","unknown"]).optional(),lint:v.enum(["passed","failed","unknown"]).optional(),build:v.enum(["passed","failed","unknown"]).optional(),runtime:v.enum(["passed","failed","warning","unknown"]).optional(),visual:v.enum(["passed","failed","warning","unknown"]).optional(),memory:v.enum(["passed","failed","warning","unknown"]).optional()}),mb=v.enum(["embedded","shared"]),fb=v.object({mode:mb,pid:v.number(),startedAt:v.string(),url:v.string().optional()}),B7=ou.extend({sessionId:v.string(),status:cb,activeTab:v.string().optional(),tabsWithIssues:v.array(v.string()).optional(),blocking:v.array(Dv),warnings:v.array(Dv).default([]),suggestedReads:v.array(v.string()),checks:pb.optional(),server:fb.optional()}),gb=v.object({eventsResident:v.number().int().nonnegative(),eventsResidentBytes:v.number().int().nonnegative(),eventsIngested:v.number().int().nonnegative(),eventsDropped:v.number().int().nonnegative(),eventsDroppedForBytes:v.number().int().nonnegative().optional(),eventCap:v.number().int().nonnegative().optional(),eventByteCap:v.number().int().nonnegative().optional(),artifactsResident:v.number().int().nonnegative().optional(),artifactsResidentBytes:v.number().int().nonnegative().optional(),artifactsDropped:v.number().int().nonnegative().optional(),artifactByteCap:v.number().int().nonnegative().optional(),truncatedEvents:v.number().int().nonnegative().optional(),truncatedBytesReclaimed:v.number().int().nonnegative().optional(),rawByteLimit:v.number().int().nonnegative().optional(),reducers:v.record(v.string(),v.object({residentEvents:v.number().int().nonnegative(),residentBytes:v.number().int().nonnegative(),evictedEvents:v.number().int().nonnegative(),evictedForBytes:v.number().int().nonnegative(),eventCap:v.number().int().nonnegative(),byteCap:v.number().int().nonnegative()})).optional()}),$7=ou.extend({sessionId:v.string(),supportedResources:v.array(v.string()),supportedTools:v.array(v.string()),supportedJobs:v.array(v.string()),supportedChannels:v.array(v.string()),subscribedByDefault:v.array(v.string()),transports:v.array(v.enum(["stdio","http","socket"])),host:v.object({platform:v.string(),node:v.string()}),project:v.object({name:v.string(),nxVersion:v.string().optional()}),storage:gb.optional()}),hb=v.object({id:v.string(),timestamp:v.number().int().nonnegative(),message:v.string(),fingerprint:v.string(),code:v.string().optional(),rule:v.string().optional(),severity:Il.optional(),file:v.string().optional(),line:v.number().int().nonnegative().optional(),column:v.number().int().nonnegative().optional(),project:v.string().optional()}),C7=ou.merge(vi).extend({status:v.enum(["unknown","clean","failing"]),errorCount:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),x7=ou.merge(vi).extend({errors:v.array(hb)}),k7=ou.merge(vi).extend({status:v.enum(["unknown","clean","warning","failing"]),errorCount:v.number().int().nonnegative(),warningCount:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),A7=ou.merge(vi).extend({status:v.enum(["unknown","clean","warning","failing"]),hmrUpdates:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),Sl=Symbol.for("@lensmcp/session/Session"),Fl=Symbol.for("@lensmcp/core/EventBus"),vb=Symbol.for("@lensmcp/core/GraphStore"),q=Symbol.for("@lensmcp/core/ResourceStore"),yb=Symbol.for("@lensmcp/storage/Storage"),Eb="capture-request.json",bb="capture-runner.json",wv="__lensmcpTruncation",Db="__lensmcpTruncated";function Le(e,t=Number.POSITIVE_INFINITY,r=12){return It(e,t,r,32)}s(Le,"Ze"),o(Le,"estimateJsonBytes");function zl(e,t,r=12){return It(e,t,r,Number.POSITIVE_INFINITY)>t}s(zl,"ps"),o(zl,"exceedsJsonByteBudget");function It(e,t,r,i){switch(typeof e){case"undefined":case"function":case"symbol":return 0;case"boolean":return 5;case"number":return Number.isFinite(e)?8:4;case"bigint":return 20;case"string":return e.length+2;default:break}if(e===null)return 4;if(r<=0)return i;if(e instanceof Date)return 26;if(Array.isArray(e)){let a=2;for(let l=0;l<e.length;l++)if(a+=It(e[l],t-a,r-1,i)+1,a>t)return a;return a}let u=2,n=e;for(let a in n){if(!Object.prototype.hasOwnProperty.call(n,a))continue;let l=It(n[a],t-u,r-1,i);if(l!==0&&(u+=a.length+4+l,u>t))return u}return u}s(It,"Ur"),o(It,"walk");function Ei(e,t){e.truncatedAnything=!0,e.paths.length<20&&e.paths.push(t||"<root>")}s(Ei,"Sf"),o(Ei,"record");function Bv(e,t,r){return Ei(e,r),{[Db]:!0,originalBytes:Le(t,Number.POSITIVE_INFINITY,64)}}s(Bv,"qI"),o(Bv,"stub");function $v(e){if(e===null)return!0;let t=typeof e;return t==="number"||t==="boolean"||t==="string"||t==="bigint"}s($v,"VI"),o($v,"isScalar");function lu(e,t,r,i){if(typeof e=="string"){let u=t.budget<=0?256:t.maxStringBytes;if(e.length+2<=u)return t.budget-=e.length+2,e;let n=Math.max(0,u-64);return Ei(t,i),t.budget-=n,`${e.slice(0,n)}\u2026[lensmcp truncated: ${e.length-n} more chars]`}return e===null||typeof e!="object"?(t.budget-=It(e,Number.POSITIVE_INFINITY,1,32),e):r<=0?Bv(t,e,i):e instanceof Date?(t.budget-=26,e):Array.isArray(e)?Cv(e,t,r,i):xv(e,t,r,i)}s(lu,"Lr"),o(lu,"clampValue");function Cv(e,t,r,i){let u=[],n=Math.min(e.length,t.maxArrayItems);for(let a=0;a<n&&!(t.budget<=0);a++)u.push(lu(e[a],t,r-1,`${i}[${a}]`));return u.length<e.length&&Ei(t,`${i}[] (+${e.length-u.length} items dropped)`),u}s(Cv,"GI"),o(Cv,"clampArray");function xv(e,t,r,i){let u={},n,a=t.budget<=0;for(let l in e){if(!Object.prototype.hasOwnProperty.call(e,l))continue;let d=e[l],p=It(d,512,r-1,Number.POSITIVE_INFINITY);if(p<=512&&(!a||$v(d))){u[l]=d,t.budget-=l.length+4+p;continue}(n??=[]).push({key:l,bytes:p})}if(!n)return u;n.sort((l,d)=>l.bytes===d.bytes?0:l.bytes<d.bytes?-1:1);for(let{key:l}of n){let d=i?`${i}.${l}`:l;u[l]=lu(e[l],t,r-1,d)}return u}s(xv,"JI"),o(xv,"clampObject");function kv(e,t={}){let r=t.rawByteLimit??32768,i=t.maxDepth??12;if(r<=0)return{value:void 0,truncated:!1,originalBytes:0,keptBytes:0,paths:[]};if(e==null)return{value:e,truncated:!1,originalBytes:0,keptBytes:0,paths:[]};if(!zl(e,r,i)){let d=Le(e,r,i),p={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1};return{value:lu(e,p,i,""),truncated:!1,originalBytes:d,keptBytes:d,paths:[]}}let u=Le(e,Number.POSITIVE_INFINITY,64),n={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1},a=lu(e,n,i,""),l=Le(a,Number.POSITIVE_INFINITY,i);if(n.truncatedAnything&&a!==null&&typeof a=="object"&&!Array.isArray(a)){let d={truncated:!0,originalBytes:u,keptBytes:l,paths:n.paths};a[wv]=d}return{value:a,truncated:n.truncatedAnything,originalBytes:u,keptBytes:l,paths:n.paths}}s(kv,"If"),o(kv,"boundedClone");function St(e,t){if(e.size<=t)return 0;let r=0,i=e.keys();for(;e.size>t;){let u=i.next();if(u.done)break;e.delete(u.value)&&(r+=1)}return r}s(St,"Ke"),o(St,"capMap");var xr=256;function jl(e){let{source:t,category:r,title:i,kind:u}=e;return t==="ai"?"ai":u?.startsWith("memory")||u==="db-query"?"data":t==="gateway"||u==="gateway-request"?"gateway":u==="queue-process"||u==="queue-active"||u==="queue-completed"||u==="queue-failed"?"services":t==="db"||t==="redis"||t==="queue"||u==="redis-op"||u?.startsWith("queue-")?"data":t==="external"||u==="egress"?"network":t==="nestjs"||t==="nest"?/(?:Repository|Repo|Dao|Store)\./.test(i)?"data":"services":t==="valtio"?"state":r==="network"?"network":"browser"}s(jl,"Tf"),o(jl,"areaOf");var Av=240,wb=new Set(["systemPrompt","prompt","prompts","messages","completion","completions","input","output","draft","text","content","result","arguments","params"]),Bb=new Set(["tenantId","caller","userId","accountId","email","subject"]),$b=8;function _v(e){let t=bi(e,0);return kv(_u({redacted:!0,...t}),{rawByteLimit:16*1024}).value}s(_v,"HI"),o(_v,"aiProjection");function bi(e,t){if(typeof e=="string")return Iv(e);if(e===null||typeof e!="object")return e;if(t>=$b)return;if(Array.isArray(e))return e.slice(0,32).map(i=>bi(i,t+1));let r={};for(let[i,u]of Object.entries(e))if(!Bb.has(i)){if(wb.has(i)){typeof u=="string"?r[`${i}Chars`]=u.length:Array.isArray(u)?r[`${i}Count`]=u.length:u!=null&&(r[`${i}Present`]=!0);continue}r[i]=bi(u,t+1)}return r}s(bi,"Rf"),o(bi,"projectAi");function Iv(e){return e.length<=Av?tt(e):`${tt(e.slice(0,Av))}\u2026`}s(Iv,"YI"),o(Iv,"clipText");function Sv(e,t={}){let r=e.raw??{},i=r.render??{},u=r.span??{},n=r.request??{},a=o(b=>typeof b=="number"?b:void 0,"num"),l=r.loop??{},d=r.effect??{},p=a(r.durationMs)??a(u.durationMs)??a(n.durationMs)??a(l.durationMs)??a(i.actualDurationMs)??a(d.durationMs),c=typeof r.kind=="string"?r.kind:void 0,f=c==="fetch-done"||c==="fetch-error",g=a(i.commitTime),m=c==="render"&&g!==void 0&&Math.abs(g-e.timestamp)<6e4,h=f?e.timestamp:m?g:a(r.startedAt)??a(u.startTime)??a(n.startedAt)??a(l.startedAt)??(p!==void 0?e.timestamp-p:e.timestamp),E;if(typeof r.query=="string"){let b=Array.isArray(r.params)?` [${r.params.join(", ")}]`:"",w=typeof r.result=="string"?` \u2192 ${r.result}`:"";E=r.query+b+w}else if(typeof r.command=="string"){let b=typeof r.value=="string"?` \u2192 ${r.value}`:r.hit===!1?" \u2192 (miss)":"";E=r.command+b}else if(c==="state-update"){let b=r.update??{},w="";try{w=JSON.stringify(b.preview)}catch{}E=`${b.storeId??""}.${b.path??""} = ${w}`}else c==="queue-completed"&&typeof r.returned=="string"?E=`returned ${r.returned}`:c==="queue-enqueued"&&(E=`${r.job??"job"}#${r.jobId??"?"} \u2192 ${r.queue??""}${typeof r.data=="string"?" "+r.data:""}`);let D;if(c==="gateway-request")D=`${r.host??""}${String(r.url??"").split("?")[0]}`;else if(c==="fetch-start"||c==="fetch-done"||c==="fetch-error")try{let b=new URL(String(r.href??r.url??""));D=`${b.hostname}${b.pathname}`}catch{}let $;if(c==="gateway-request"&&Array.isArray(r.steps))$=r.steps.map(b=>{let w=[String(b.step)];return b.project&&w.push(String(b.project)),b.prefix&&w.push(String(b.prefix)),b.mode&&w.push(String(b.mode)+(b.ok===!1?" \u2717":b.ok===!0?" \u2713":"")),b.caller&&w.push("by "+String(b.caller)),b.pod&&w.push(String(b.pod)),typeof b.atMs=="number"&&w.push(`@${b.atMs}ms`),w.join(" ")}),E=$.map(b=>b.replace(/ @\d+ms$/,"")).join(" \u2192 ");else if(c==="egress")E=`${r.method??"GET"} ${r.host??""} \u2192 ${r.status??"?"}`;else if(e.source==="ai"){if(c==="ai-call"){let b=r.usage??{},w=b.promptTokens!==void 0||b.completionTokens!==void 0?` \xB7 ${a(b.promptTokens)??"?"}\u2192${a(b.completionTokens)??"?"} tok`:"",C=r.status!==void 0?` \xB7 ${String(r.status)}`:r.error?" \xB7 failed":"",N=a(r.toolCallCount)?` \xB7 ${a(r.toolCallCount)} tool call${a(r.toolCallCount)===1?"":"s"}`:"",O=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${r.provider??""}/${r.model??"?"}${w}${C}${N}${O}${r.stream===!0?" \xB7 stream":""}`}else if(c==="ai-round"){let b=r.model??{},w=r.usage??{},C=Array.isArray(r.toolCalls)?r.toolCalls:[],N=`${a(w.promptTokens)??"?"}\u2192${a(w.completionTokens)??"?"} tok`,O=C.length?` \xB7 ${C.length} tool call${C.length===1?"":"s"}`:"",te=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${b.provider??""}/${b.model??""} \xB7 ${N}${O}${te}`}else if(c==="ai-turn-start"){let b=Array.isArray(r.tools)?r.tools:[];E=`skill ${r.skill??""} \xB7 ${r.output??""}${b.length?" \xB7 tools: "+b.join(", "):""}`}else if(c==="ai-tool-call"){let b=r.call??{},w=r.result??{},C=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${b.name??"tool"} ${w.error!=null?"\u2717 "+String(w.error):"\u2713"}${C}`}else if(c==="ai-turn-end"){let b=r.usage??{},w=a(r.rounds)!==void 0?` \xB7 ${a(r.rounds)} round${a(r.rounds)===1?"":"s"}`:"",C=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${r.ok===!1?"FAILED":"ok"} \xB7 ${a(b.promptTokens)??"?"}+${a(b.completionTokens)??"?"} tok${w}${C}`}}let A;c==="db-query"&&typeof r.query=="string"?A=r.query:c==="redis-op"?A=`${r.op??""} ${String(r.key??"").replace(/\d+/g,"#")}`:c==="egress"?A=`${r.method??"GET"} ${r.host??""}`:c==="ai-call"?A=`ai ${r.provider??""} ${r.model??""} ${r.api??""}`:c==="queue-enqueued"?A=`enqueue ${r.queue??""}`:c==="span"&&typeof u.name=="string"?A=u.name:c==="memory-mutation"&&(A=e.title);let I=e.context??{},j=i.commitId??d.commitId??r.commitId,F=Array.isArray(i.why)?i.why.map(b=>typeof b?.type=="string"?b.type:void 0).filter(b=>!!b):[];return{id:e.id,t:e.timestamp,start:h,...A?{sig:A}:{},...D?{urlKey:D}:{},...typeof r.queue=="string"?{queue:r.queue}:{},...r.jobId!=null?{jobId:String(r.jobId)}:{},source:e.source,category:e.category,severity:e.severity,title:e.title,kind:c,area:jl({source:e.source,category:e.category,title:e.title,kind:c}),...typeof u.role=="string"?{role:u.role}:{},...typeof I.requestId=="string"?{requestId:I.requestId}:{},...typeof I.parentRequestId=="string"?{parentRequestId:I.parentRequestId}:{},...typeof j=="string"?{commitId:j}:{},...typeof i.componentName=="string"?{component:i.componentName}:{},...typeof i.phase=="string"?{phase:i.phase}:{},...F.length?{why:F}:{},...c==="effect-run"&&typeof d.hookLogicalId=="string"?{hook:d.hookLogicalId}:{},...c==="effect-run"&&d.cleanupRan===!0?{cleanup:!0}:{},...c==="render-commit-truncated"?{renderTotal:a(r.total),renderPublished:a(r.published)}:{},...typeof I.projectName=="string"?{project:I.projectName}:typeof r.project=="string"?{project:r.project}:{},...p!==void 0?{durationMs:p}:{},...f&&a(r.startedAt)!==void 0?{fetchStartedAt:a(r.startedAt)}:{},...e.source==="ai"?{ai:t.includeRaw?r:_v(r)}:{},...E?{detail:E}:{},...$?{steps:$}:{}}}s(Sv,"QI"),o(Sv,"trimFlowEvent");var Fv=1;function zv(e){return e==="flow-origin"?0:e?.endsWith("-start")?1:e==="gateway-request"?2:e==="server-request"?3:e==="span"?4:e==="render"||e==="render-commit-truncated"?6:e==="effect-run"?7:5}s(zv,"e0"),o(zv,"kindRank");function du(e){return e.kind==="span"&&e.role==="controller"?3.5:e.kind==="queue-process"?3:zv(e.kind)}s(du,"Bn"),o(du,"causalRank");function Di(e,t={}){let r=e.slice().filter(y=>{let x=y.raw??{},k=typeof x.kind=="string"?x.kind:"";if(k==="subscription-added"||k==="subscription-removed"||k==="hook-run"||k==="store-created"||k==="singleton-instance")return!1;let _=x.span;return!(typeof _?.name=="string"&&_.name.startsWith("nest.request "))}).map(y=>Sv(y,t)),i=new Set;for(let y=r.length-1;y>=0;y--)i.has(r[y].id)?r.splice(y,1):i.add(r[y].id);let u=new Map;for(let y of r)(y.kind==="gateway-request"||y.kind==="queue-process")&&y.requestId&&!u.has(y.requestId)&&u.set(y.requestId,y.start);let n=o(y=>y.source!=="react"&&y.source!=="valtio"&&y.requestId&&u.has(y.requestId)?u.get(y.requestId):y.start,"anchorOf");r.sort((y,x)=>n(y)-n(x)||y.start-x.start||du(y)-du(x)||(x.durationMs??0)-(y.durationMs??0)||y.t-x.t);let a=o(y=>(y.kind==="span"||y.kind==="server-request"||y.kind==="gateway-request"||y.kind==="queue-process")&&(y.durationMs??0)>0,"spanLike"),l=r;for(let y of l)y.group=y.source==="react"||y.source==="valtio"||y.source==="client-runtime"||y.source==="visual"?"browser":"server";let d=new Map;for(let y of l)if((y.kind==="gateway-request"||y.kind==="queue-process")&&y.requestId&&y.project){let x=d.get(y.requestId)??[];x.push({project:y.project,start:y.start,end:y.start+(y.durationMs??0)}),d.set(y.requestId,x)}let p=o((y,x)=>{let k=d.get(y);if(k?.length)return k.every(_=>_.project===k[0].project)?k[0].project:k.filter(_=>_.start<=x+1&&_.end>=x-1).sort((_,U)=>U.start-_.start)[0]?.project},"projectOf");for(let y of l)if(!y.project&&y.source==="nestjs"&&y.requestId){let x=p(y.requestId,y.start);x&&(y.project=x)}for(let y of l){let x,k=y.requestId;for(let _ of l){if(_===y||!a(_)||_.group!==y.group||_.requestId!==k)continue;let U=_.project,W=y.project;if(_.kind!=="gateway-request"&&y.kind!=="gateway-request"&&U!==void 0&&W!==void 0&&U!==W)continue;let ee=_.durationMs??0,ue=y.durationMs??0,L=Math.abs(_.start-y.start)<=Fv,J=du(_),H=du(y),ie=_.start<=y.start;if(!(_.start+ee>y.start&&(ie||L&&J<H)&&(!L||(J!==H?J<H:ie&&ee>ue))))continue;let ge=x?du(x):-1,le=x?Math.abs(_.start-x.start)<=Fv:!1;(!x||!le&&_.start>x.start||le&&J>ge||le&&J===ge&&(_.durationMs??0)<(x.durationMs??0))&&(x=_)}x&&(y.parent=x.id)}let c=new Map;for(let y of l){if(!y.requestId)continue;let x=c.get(y.requestId);x?x.push(y):c.set(y.requestId,[y])}let f=new Map(l.map(y=>[y.id,y])),g=o((y,x)=>{let k=(c.get(y)??[]).filter(_=>a(_)&&_.start<=x&&_.start+(_.durationMs??0)>=x);if(k.length!==0)return k.sort((_,U)=>U.start-_.start||(_.durationMs??0)-(U.durationMs??0)),k[0]},"callerNodeFor");for(let y of l){if(!y.parentRequestId||y.kind!=="server-request"&&y.kind!=="gateway-request")continue;let x=y.parent?f.get(y.parent):void 0;if(x&&x.requestId===y.requestId)continue;let k=g(y.parentRequestId,y.start);k&&k!==y&&k.start<=y.start&&(y.parent=k.id)}let m=l,h=new Map;for(let y of m)y.kind==="gateway-request"&&y.requestId&&!h.has(y.requestId)&&h.set(y.requestId,y);for(let y of m)if(y.group==="server"&&!y.parent&&y.requestId&&y.kind!=="gateway-request"){let x=h.get(y.requestId);x&&x!==y&&x.start<=y.start&&(y.parent=x.id)}let E=new Set,D=new Set,$=[];for(let y of m){if(y.kind!=="gateway-request")continue;if(!y.requestId){$.push(y);continue}let x=c.get(y.requestId)??[];if(x.filter(U=>U.kind==="gateway-request").sort((U,W)=>U.start-W.start)[0]!==y)continue;let k=x.find(U=>U.kind==="fetch-start"),_=x.find(U=>U.kind==="fetch-done"||U.kind==="fetch-error");if(!k&&!_){$.push(y);continue}k&&(y.fetchStartId=k.id,E.add(k.id)),_&&(y.fetchDoneId=_.id,D.add(_.id))}let A=new Map;for(let y of m){if(!y.urlKey)continue;let x=A.get(y.urlKey)??{gws:[],starts:[],dones:[]};y.kind==="gateway-request"?$.includes(y)&&x.gws.push(y):y.kind==="fetch-start"?E.has(y.id)||x.starts.push(y):(y.kind==="fetch-done"||y.kind==="fetch-error")&&(D.has(y.id)||x.dones.push(y)),A.set(y.urlKey,x)}for(let{gws:y,starts:x,dones:k}of A.values()){y.sort((U,W)=>U.start-W.start),x.sort((U,W)=>U.start-W.start);let _=new Set;y.forEach((U,W)=>{let ee=x[W];ee&&(U.fetchStartId=ee.id);let ue=ee?ee.t:U.start,L,J=1/0;for(let H of k){if(_.has(H.id))continue;let ie=H.fetchStartedAt??H.start-(H.durationMs??0),ge=Math.abs(ie-ue);ge<J&&(J=ge,L=H)}L&&(U.fetchDoneId=L.id,_.add(L.id))})}let I=new Map,j=new Map;for(let y of m)!y.queue||!y.jobId||(y.kind==="queue-enqueued"&&I.set(`${y.queue}#${y.jobId}`,y),y.kind==="queue-process"&&j.set(`${y.queue}#${y.jobId}`,y));for(let y of m){if(!y.queue||!y.jobId)continue;let x=`${y.queue}#${y.jobId}`;if(y.kind==="queue-process"&&!y.parent){let k=I.get(x);k&&k!==y&&k.start<=y.start&&(y.parent=k.id)}else if(y.kind==="queue-active"||y.kind==="queue-completed"||y.kind==="queue-failed"){let k=j.get(x);k&&k!==y&&k.start<=y.start&&(y.parent=k.id)}}let F=l;{let y=new Map;for(let k of F)k.kind==="fetch-start"&&y.set(k.id,k);let x=new Map;for(let k of F){if(k.kind!=="fetch-done"&&k.kind!=="fetch-error")continue;let _=[...y.values()].find(ee=>ee.requestId&&ee.requestId===k.requestId)?.id,U=_?y.get(_):void 0;if(!U)continue;let W=k.fetchStartedAt??U.start;U.title=k.title,U.severity=k.severity,U.durationMs=k.durationMs??Math.max(0,k.t-W),U.kind="fetch",k.detail&&!U.detail&&(U.detail=k.detail),x.set(k.id,U.id)}if(x.size>0){F=F.filter(k=>!x.has(k.id));for(let k of F)for(k.fetchDoneId&&x.has(k.fetchDoneId)&&(k.fetchDoneId=x.get(k.fetchDoneId));k.parent&&x.has(k.parent);)k.parent=x.get(k.parent)}}let b=o(y=>!!y.commitId&&(y.kind==="render"||y.kind==="effect-run"||y.kind==="render-commit-truncated"),"commitMember"),w=o(y=>[...new Set(y)],"uniq"),C=o(y=>w(y.map(x=>x.component).filter(x=>!!x)),"named"),N=o(y=>y.length<=2?y.join(" + "):`${y[0]} + ${y.length-1} more`,"nameList"),O=o(y=>{let x=new Map;for(let k of y)k.component&&x.set(k.component,(x.get(k.component)??0)+1);return[...x].map(([k,_])=>_>1?`${k} \xD7${_}`:k).join(", ")},"tally"),te=o(y=>{if(!y)return"effect";let x=/([^/\\]+?):(\d+)(?::\d+)?$/.exec(y);return x?`${x[1]}:${x[2]}`:y},"shortHook"),ne=o(y=>`${te(y.hook)}${y.cleanup?" (cleanup)":""}`,"hookLabel"),ht=o(y=>{let x=Math.min(...y.map(_=>_.start)),k=Math.max(...y.map(_=>_.start+(_.durationMs??0)));return{start:x,durationMs:k-x}},"extent"),We=o(y=>(delete y.component,delete y.why,delete y.phase,delete y.hook,delete y.cleanup,delete y.renderTotal,delete y.renderPublished,y),"asGroup");function Me(y){let x=y[0],k=y.filter(me=>me.kind==="render"),_=y.filter(me=>me.kind==="effect-run"),U=y.find(me=>me.kind==="render-commit-truncated"),W=[...k].sort((me,Au)=>(Au.durationMs??0)-(me.durationMs??0)),ee=W.filter(me=>(me.why??[]).some(Au=>Au!=="parent-render")),ue=w(ee.flatMap(me=>(me.why??[]).filter(Au=>Au!=="parent-render"))),L=C(ee),J=k.filter(me=>me.phase==="mount"),H=k.filter(me=>me.phase!=="mount"&&!ee.includes(me)),ie=W[0]?.component??"view",ge=k.length>0&&J.length===k.length,le=ue.length?ue.join(" + "):void 0,Et=ge?"mount":"update",bt=L.length?`view update \xB7 ${N(L)} \u2190 ${le}`:ge?`view mount \xB7 ${ie}`:`view update \xB7 ${ie}`,Ip=U?.renderTotal??k.length,Zy=[J.length?`mounted ${O(J)}`:"",H.length?`re-rendered ${O(H)}`:"",!L.length&&!ge&&k.length?"trigger not recorded \u2014 every captured render came from its parent":"",U?`${Ip} renders, ${U.renderPublished??k.length} recorded (per-commit cap)`:`${k.length} render${k.length===1?"":"s"}`,_.length?`${_.length} effect${_.length===1?"":"s"}: ${_.map(ne).join(", ")}`:""].filter(Boolean).join(" \xB7 "),Sp=C(k);return We({...x,...ht(y),kind:"view-update",title:bt,detail:Zy,commitId:x.commitId,viewPhase:Et,...le?{cause:le}:{},causeComponents:L,components:Sp,mounted:C(J),renderCount:Ip,recordedRenders:k.length,effects:_.length,effectHooks:_.map(ne),memberIds:y.map(me=>me.id),sig:`commit:${Et}:${le??"-"}:${L.join(",")}:${Sp.slice().sort().join(",")}`,severity:y.some(me=>me.severity==="error")?"error":x.severity})}s(Me,"rt"),o(Me,"viewUpdateNode");function vt(y){let x=y[0],k=y.map(ne);return We({...x,...ht(y),kind:"commit-effects",title:y.length===1?`effect \xB7 ${k[0]}`:`effects \xB7 ${k[0]} + ${y.length-1} more`,detail:k.join(", "),commitId:x.commitId,effects:y.length,effectHooks:k,memberIds:y.map(_=>_.id),sig:`effects:${k.slice().sort().join(",")}`})}s(vt,"Yt"),o(vt,"effectsNode");let et=o(y=>w(y.map(x=>x==="state-update"?"state update":x==="fetch-start"?"request":x==="flow-origin"?"interaction":"response")).join(" + "),"describeInputs");function ku(y,x){let k=y[0],_=y[y.length-1],U=y.length,W=k.detail,ee=Math.min(...y.map(H=>H.start)),ue=Math.max(...y.map(H=>H.start+(H.durationMs??0))),L=Math.round(y.reduce((H,ie)=>H+(ie.durationMs??0),0)/U*10)/10,J=Math.round((ue-ee)*10)/10;k.count=U,k.avgMs=L,k.wallMs=J,k.durationMs=ue-ee,k.items=y.slice(0,12).map(H=>({start:H.start-ee,...H.durationMs!=null?{durationMs:H.durationMs}:{}})),k.memberIds=y.flatMap(H=>H.memberIds??[H.id]),k.title=`\xD7${U} ${k.title}`,y.some(H=>H.severity==="error")&&(k.severity="error"),k.kind==="view-update"?k.detail=[`${U} commits, ${x.length?`one per ${et(x)}`:"back to back"}`,`avg ${L}ms \xB7 wall ${J}ms`,W??""].filter(Boolean).join(" \xB7 "):k.kind==="state-update"&&W&&_.detail?k.detail=`${U} updates in a row \xB7 wall ${J}ms \xB7 first ${W} \xB7 last ${_.detail}`:k.detail=[`${U} in a row \xB7 wall ${J}ms`,W??""].filter(Boolean).join(" \xB7 ")}s(ku,"ko"),o(ku,"collapseRepeat");let yt=[],je=new Map,Ap=new Set;for(let y=0;y<F.length;y++){if(Ap.has(y))continue;let x=F[y];if(!b(x)){yt.push(x);continue}let k=[y];for(let W=y+1;W<F.length;W++){let ee=F[W];if(ee.group==="browser"){if(!b(ee)||ee.commitId!==x.commitId)break;k.push(W)}}for(let W of k)Ap.add(W);let _=k.map(W=>F[W]),U=_.some(W=>W.kind!=="effect-run")?Me(_):vt(_);for(let W of _)W.id!==U.id&&je.set(W.id,U.id);yt.push(U)}if(je.size>0||yt.some(y=>y.kind==="view-update"||y.kind==="commit-effects")){F=yt;for(let y of F)for(;y.parent&&je.has(y.parent);)y.parent=je.get(y.parent)}{let y=new Map;for(let x of F)x.kind==="view-update"&&x.commitId&&!y.has(x.commitId)&&y.set(x.commitId,x);for(let x of F){if(x.kind!=="commit-effects"||x.parent||!x.commitId)continue;let k=y.get(x.commitId);k&&k.start<=x.start&&(x.parent=k.id)}}{let y=new Set(["state-update","fetch","fetch-start","fetch-done","fetch-error","flow-origin"]),x=F.map((L,J)=>L.group==="browser"?J:-1).filter(L=>L>=0),k=o(L=>`${L.kind}|${L.sig??L.title}`,"keyOf"),_=x.map(L=>k(F[L])),U=o((L,J,H)=>{for(let ie=0;ie<H;ie++)if(_[L+ie]!==_[J+ie])return!1;return!0},"sameBlock"),W=o(L=>_[L].split("|")[0],"kindAt"),ee=o(L=>{let J=0,H=1;for(let ie=1;ie<=4&&L+ie<=_.length;ie++){let ge=1;for(;L+(ge+1)*ie<=_.length&&U(L,L+ge*ie,ie);)ge+=1;ge>=3&&ie*ge>J*H&&(J=ie,H=ge)}return{k:J,r:H}},"bestBlockAt"),ue=new Map;for(let L=0;L<_.length;){let{k:J,r:H}=ee(L);if(J===0){L+=1;continue}let ie=[...Array(J).keys()].find(le=>y.has(W(L+le)));if(ie!==void 0&&ie>0){let le=ee(L+ie);if(le.k===J&&le.r>=3&&le.r>=H-1){L+=ie;continue}}let ge=_.slice(L,L+J).map(le=>le.split("|")[0]).filter(le=>y.has(le));for(let le=0;le<J;le++){let Et=[];for(let bt=0;bt<H;bt++)Et.push(F[x[L+le+bt*J]]);ku(Et,ge);for(let bt of Et.slice(1))ue.set(bt.id,Et[0].id)}L+=J*H}if(ue.size>0){F=F.filter(L=>!ue.has(L.id));for(let L of F)for(;L.parent&&ue.has(L.parent);)L.parent=ue.get(L.parent)}}{let y=new Map(F.map(x=>[x.id,x]));for(let x of F){let k=new Set([x.id]),_=x;for(;_?.parent;){if(k.has(_.parent)){_.parent=void 0;break}k.add(_.parent),_=y.get(_.parent)}}}let _p=o(y=>{let x=new Map;for(let _ of F){if(!_.sig||a(_)!==y||_.kind==="server-request"||_.kind==="gateway-request"||_.group==="browser")continue;let U=`${_.parent??"root"}|${_.kind}|${_.sig}`,W=x.get(U);W?W.push(_):x.set(U,[_])}let k=new Map;for(let _ of x.values()){if(_.length<3)continue;_.sort((J,H)=>J.start-H.start);let U=_[0],W=!1;for(let J=0;J+1<_.length;J++)if(_[J+1].start<_[J].start+(_[J].durationMs??0)){W=!0;break}let ee=U.start,ue=Math.max(..._.map(J=>J.start+(J.durationMs??0))),L=_.reduce((J,H)=>J+(H.durationMs??0),0);U.count=_.length,U.parallel=W,U.avgMs=Math.round(L/_.length*10)/10,U.wallMs=ue-ee,U.durationMs=ue-ee,U.title=`\xD7${_.length} ${U.title.replace(/\s*\((?:\d+ rows?, )?\d+ms\)$/,"")}`,U.detail=`${U.sig} \xD7${_.length} ${W?"\u2016 parallel":"\u21BB sequential loop"} \xB7 avg ${U.avgMs}ms \xB7 wall ${U.wallMs}ms`,U.items=_.slice(0,12).map(J=>({start:J.start-ee,...J.durationMs!=null?{durationMs:J.durationMs}:{}})),U.memberIds=_.flatMap(J=>J.memberIds??[J.id]),_.some(J=>J.severity==="error")&&(U.severity="error");for(let J of _.slice(1))k.set(J.id,U.id)}if(k.size!==0){F=F.filter(_=>!k.has(_.id));for(let _ of F)for(;_.parent&&k.has(_.parent);)_.parent=k.get(_.parent)}},"aggregatePass");_p(!0),_p(!1);for(let y of F){if(!a(y))continue;let x=y.durationMs??0;if(x<40)continue;let k=F.filter(ue=>ue.parent===y.id&&(ue.durationMs??0)>0).map(ue=>[ue.start,ue.start+(ue.durationMs??0)]).sort((ue,L)=>ue[0]-L[0]),_=0,U=-1,W=-1;for(let[ue,L]of k)ue>W?(W>U&&(_+=W-U),U=ue,W=L):L>W&&(W=L);W>U&&(_+=W-U);let ee=Math.max(0,x-_);(ee>=50||ee/x>=.7&&x>=40)&&(y.selfMs=ee,y.detail=`\u26A0 cpu-heavy: ${ee}ms self-time of ${x}ms${y.detail?" \xB7 "+y.detail:""}`)}return{events:F}}s(Di,"qn"),o(Di,"buildFlowDetail");var jv={phaseGapMs:1500,burstGapMs:250,attachWindowMs:400,maxSegmentEvents:400,occurrenceSlackMs:10},Cb=new Set(["subscription-added","subscription-removed","hook-run","store-created","singleton-instance","visual-frame"]),xb=new Set(["react","valtio","client-runtime","chrome","visual"]),kr=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),fe=o(e=>typeof e=="string"&&e!==""?e:void 0,"str"),Ft=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"num");function Nv(e){let t=kr(e.raw)?e.raw:{},r=kr(t.request)?t.request:{},i=kr(t.span)?t.span:{},u=e.context??{},n=Ft(e.timestamp)??0,a=fe(t.kind)??"",l=Ft(r.startedAt)??Ft(i.startTime)??Ft(t.startedAt),d=Ft(r.endedAt)??Ft(i.endTime)??(l!==void 0&&Ft(t.durationMs)!==void 0?l+t.durationMs:void 0),p=Math.min(n,l??n),c=Math.max(n,d??n),f=kr(t.render)?t.render:{},g=kr(t.update)?t.update:{},m=a==="render"?fe(f.componentName):a==="state-update"?fe(g.path)?.split(".").slice(0,2).join("."):void 0,h=fe(t.queue),E=fe(t.jobId),D=String(e.source),$=fe(t.project)??fe(u.projectName);return{event:e,id:e.id,ts:n,from:p,to:c,kind:a,source:D,...fe(u.requestId)?{requestId:fe(u.requestId)}:{},...fe(u.parentRequestId)?{parentRequestId:fe(u.parentRequestId)}:{},...h&&E?{queueKey:`${h}#${E}`}:{},browser:xb.has(D)||D==="memory"&&$===void 0,bookkeeping:Cb.has(a),...$?{project:$}:{},...m?{subject:m}:{},...a==="fetch-start"||a==="fetch-done"?{route:Nl(fe(t.url)),method:fe(t.method)}:a==="server-request"?{route:fe(r.route),method:fe(r.method)}:a==="gateway-request"?{route:Nl(fe(t.url)),method:fe(t.method)}:{}}}s(Nv,"n0"),o(Nv,"readItem");function Nl(e){if(!e)return;let t=e.search(/[?#]/),r=t===-1?e:e.slice(0,t),i=/^[a-z][a-z0-9+.-]*:\/\/[^/]*(\/.*)?$/i.exec(r);return i?i[1]??"/":r}s(Nl,"Bw"),o(Nl,"pathOnly");var kb=o(e=>e.split(".")[0],"rootOf"),Ov=o((e,t)=>e.reduce((r,i)=>Math.min(r,t(i)),1/0),"minOf"),Rv=o((e,t)=>e.reduce((r,i)=>Math.max(r,t(i)),-1/0),"maxOf"),Ol=o((e,t)=>e.ts-t.ts||(e.id<t.id?-1:e.id>t.id?1:0),"compare"),Rl=o(e=>e.requestId&&!e.requestId.startsWith("job:")?kb(e.requestId):void 0,"directFamilyOf");function Tv(e){if(e.requestId?.startsWith("job:"))return e.requestId.slice(4);if(e.queueKey&&e.kind!=="queue-enqueued"&&!e.requestId)return e.queueKey}s(Tv,"i0"),o(Tv,"jobKeyOf");function Mv(e,t){let r=e.filter(n=>!n.parentRequestId&&(n.kind==="server-request"||n.kind==="gateway-request"||n.kind==="fetch-start"||n.kind==="fetch-done")).sort((n,a)=>n.from-a.from||Ol(n,a));if(r.length<2)return[e];let i=[];for(let n of r){let a=i[i.length-1];a&&n.from<=a.to+t?a.to=Math.max(a.to,n.to):i.push({from:n.from,to:n.to})}if(i.length<2)return[e];let u=i.map(()=>[]);for(let n of e){let a=i.findIndex(l=>n.ts>=l.from-t&&n.ts<=l.to+t);if(a===-1){a=0;for(let l=0;l<i.length;l+=1)i[l].from<=n.ts&&(a=l)}u[a].push(n)}return u.filter(n=>n.length>0)}s(Mv,"s0"),o(Mv,"occurrencesOf");var Pv={debug:0,info:1,warning:2,error:3,fatal:4};function Tl(e,t){let r=[],i=[];for(let u of e){let n=i[i.length-1];n&&u.ts-n.ts>=t&&(r.push(i),i=[]),i.push(u)}return i.length&&r.push(i),r}s(Tl,"Vw"),o(Tl,"runs");function Uv(e,t={}){let r={...jv};for(let[D,$]of Object.entries(t))typeof $=="number"&&Number.isFinite($)&&(r[D]=$);let i=new Set,u=[];for(let D of e)i.has(D.id)||(i.add(D.id),u.push(Nv(D)));u.sort(Ol);let n=fe(u[0]?.event.context?.flowId)??fe(u[0]?.event.raw?.flowId)??"",a=new Map;for(let D of u)D.kind==="queue-enqueued"&&D.queueKey&&D.requestId&&!D.requestId.startsWith("job:")&&!a.has(D.queueKey)&&a.set(D.queueKey,D);let l=new Map,d=new Map,p=[];for(let D of u){let $=Tv(D),A=Rl(D);if($!==void 0){let I=d.get($);I?I.push(D):d.set($,[D])}else if(A!==void 0){let I=l.get(A);I?I.push(D):l.set(A,[D])}else p.push(D)}let c=[],f=new Map;for(let[D,$]of l)Mv($,r.occurrenceSlackMs).forEach((A,I)=>{let j={id:`${n}~r:${D}${I===0?"":`@${I+1}`}`,kind:"request",items:A,requestId:D};c.push(j);for(let F of A)f.set(F,j)});for(let[D,$]of d){let A=a.get(D),I=A?f.get(A):void 0;I?I.items.push(...$):c.push({id:`${n}~r:job:${D}`,kind:"request",items:$,requestId:`job:${D}`})}let g=u.filter(D=>D.kind==="fetch-done"&&Rl(D)!==void 0),m=new Map;for(let D of c)D.requestId&&m.set(D.requestId,[...m.get(D.requestId)??[],D]);let h=o((D,$)=>{let A=m.get(D);if(A)return A.find(I=>I.items.some(j=>j.kind==="fetch-done"&&j.ts===$))??A[A.length-1]},"owningUnit"),E=p.filter(D=>D.browser);for(let D of Tl(E,r.burstGapMs)){let $=D[0].ts,A=g.filter(F=>F.ts<=$&&$-F.ts<=r.attachWindowMs),I=[...new Set(A.map(F=>Rl(F)))];if(I.length===1){let F=h(I[0],A[A.length-1].ts);if(F){F.items.push(...D);continue}}let j=D.some(F=>F.kind==="flow-origin");c.push({id:`${n}~${j?"o":"u"}:${D[0].id}`,kind:j?"origin":"ui",items:D,...I.length>1?{after:I.sort()}:{}})}for(let D of Tl(p.filter($=>!$.browser),r.phaseGapMs))c.push({id:`${n}~a:${D[0].id}`,kind:"ambient",items:D});return Zv(n,u.length,c,r)}s(Uv,"Kw"),o(Uv,"segmentFlow");function Zv(e,t,r,i){for(let g of r)g.items.sort(Ol);let u=r.map(g=>({unit:g,from:Ov(g.items,m=>m.from),to:Rv(g.items,m=>m.to)}));u.sort((g,m)=>g.from-m.from||(g.unit.id<m.unit.id?-1:1));let n=new Map,a=0,l=-1/0;for(let g of u)(a===0||g.from-l>=i.phaseGapMs)&&(a+=1),l=Math.max(l,g.to),n.set(g.unit,a);let d=[];for(let g of u){let m=qv(g.unit.items,i.maxSegmentEvents);m.forEach((h,E)=>{d.push(Lv(e,g.unit,h,n.get(g.unit),m.length>1?{index:E+1,total:m.length}:void 0))})}let p={};for(let g of d)for(let m of g.eventIds)p[m]=g.id;let c=[];for(let g of d){let m=c[g.phase-1];m||(m={index:g.phase,start:g.start,end:g.end,segmentIds:[]},c[g.phase-1]=m),m.start=Math.min(m.start,g.start),m.end=Math.max(m.end,g.end),m.segmentIds.push(g.id)}let f=d.reduce((g,m)=>g+m.counts.signal,0);return{flowId:e,segments:d,phases:c.filter(Boolean),assignment:p,stats:{events:t,signal:f,bookkeeping:t-f,segments:d.length,phases:c.filter(Boolean).length,largestSegment:d.reduce((g,m)=>Math.max(g,m.counts.total),0)}}}s(Zv,"a0"),o(Zv,"assemble");function qv(e,t){if(e.filter(n=>!n.bookkeeping).length<=t)return[e];let r=[],i=[],u=0;for(let n of e)!n.bookkeeping&&u===t&&(r.push(i),i=[],u=0),i.push(n),n.bookkeeping||(u+=1);return i.length&&r.push(i),r}s(qv,"c0"),o(qv,"chunk");function Lv(e,t,r,i,u){let n={total:r.length,signal:0,bookkeeping:0,errors:0,warnings:0},a=new Set,l="debug";for(let m of r){m.bookkeeping?n.bookkeeping+=1:n.signal+=1;let h=String(m.event.severity);h==="error"||h==="fatal"?n.errors+=1:h==="warning"&&(n.warnings+=1),(Pv[h]??1)>(Pv[l]??0)&&(l=h),m.project&&a.add(m.project)}let d=t.kind==="ui"||t.kind==="origin"?Vv(r):[],p=Ov(r,m=>m.from),c=Rv(r,m=>m.to),f=Jv(t.items),g=t.id;return{id:u&&u.index>1?`${g}#${u.index}`:g,flowId:e,kind:t.kind,label:Wv(t,r,f,u,d),phase:i,start:p,end:c,durationMs:c-p,eventIds:r.map(m=>m.id),counts:n,projects:[...a].sort(),...f.route?{route:f.route}:{},...f.method?{method:f.method}:{},...t.requestId?{requestId:t.requestId}:{},...t.after?{after:t.after}:{},...d.length?{hot:d}:{},...u?{part:u}:{},worstSeverity:l}}s(Lv,"u0"),o(Lv,"toSegment");function Jv(e){let t=e.find(r=>r.kind==="fetch-start"&&r.route)??e.find(r=>r.kind==="server-request"&&!r.parentRequestId&&r.route)??e.find(r=>r.kind==="gateway-request"&&r.route)??e.find(r=>r.kind==="fetch-done"&&r.route);return{...t?.route?{route:t.route}:{},...t?.method?{method:t.method.toUpperCase()}:{}}}s(Jv,"l0"),o(Jv,"routeOf");function Vv(e){let t=new Map;for(let r of e)r.subject&&!r.bookkeeping&&t.set(r.subject,(t.get(r.subject)??0)+1);return[...t.entries()].sort((r,i)=>i[1]-r[1]||(r[0]<i[0]?-1:1)).slice(0,3).map(([r,i])=>i>1?`${r} \xD7${i}`:r)}s(Vv,"d0"),o(Vv,"hotOf");function Wv(e,t,r,i,u){let n=i?` (part ${i.index}/${i.total})`:"";if(e.kind==="request"){if(r.route)return`${r.method?`${r.method} `:""}${r.route}${n}`;let a=t.find(l=>l.queueKey);return a?`job ${a.queueKey}${n}`:`request ${e.requestId??""}${n}`}return e.kind==="origin"?`${t.find(a=>a.kind==="flow-origin")?.event.title||"start"}${u.length?` \xB7 ${u.join(", ")}`:""}${n}`:e.kind==="ui"?`UI update${u.length?` \xB7 ${u.join(", ")}`:""}${n}`:`background${n}`}s(Wv,"p0"),o(Wv,"labelOf");var wi=["user-action","page-load","navigation","api","ai","background","test","system","other"],Bi=new Map;function cu(e,t){let r=Bi.get(e);return r||(r=new RegExp(`^${e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".")}$`),Bi.size>500&&Bi.clear(),Bi.set(e,r)),r.test(t)}s(cu,"Gn"),o(cu,"globMatch");var Ab=o(e=>/^[A-Z]+ /.test(e),"hasMethod");function Gv(e,t){return t.some(r=>r.route?Ab(e)?cu(e,`${r.method??"GET"} ${r.route}`):cu(e,r.route):!1)}s(Gv,"m0"),o(Gv,"routeMatches");function Ml(e,t){return!([e.flowId,e.originType,e.origin,e.route,e.project].filter(r=>r!==void 0).length===0||e.flowId!==void 0&&!cu(e.flowId,t.flowId)||e.originType!==void 0&&e.originType!==t.origin.type||e.origin!==void 0&&!(t.origin.nodeId!==void 0&&cu(e.origin,t.origin.nodeId))||e.route!==void 0&&!Gv(e.route,t.segments)||e.project!==void 0&&!t.segments.some(r=>r.projects.some(i=>cu(e.project,i))))}s(Ml,"Ww"),o(Ml,"ruleMatches");var Pl=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),ot=o(e=>typeof e=="string"&&e!==""?e:void 0,"str"),$i=o(e=>Pl(e.raw)?ot(e.raw.kind)??"":"","kindOf");function Kv(e){let t=[...e].sort((l,d)=>(Number(l.timestamp)||0)-(Number(d.timestamp)||0)||(l.id<d.id?-1:1)),r=t.find(l=>$i(l)==="flow-origin"),i=r??t.find(l=>ot(l.context?.originType));if(!i)return{};let u=Pl(i.raw)?i.raw:{},n=ot(i.context?.originType)??(r?ot(i.title):void 0),a=ot(u.originNodeId)??ot(i.context?.originNodeId);return{...n?{type:n}:{},...a?{nodeId:a}:{}}}s(Kv,"g0"),o(Kv,"originOf");var _b=/^(verify|e2e|test|smoke|load)[-_:]/i,Ib=o((e,t)=>_b.test(e)||t!==void 0&&/^(ui:)?(tools|scripts?|e2e)\//.test(t),"isTestFlow"),Hv={"page-load":"page-load","user-click":"user-action","form-submit":"user-action","input-change":"user-action","double-click":"user-action","context-menu":"user-action","key-press":"user-action","route-load":"navigation","route-change":"navigation",navigation:"navigation","ai-turn":"ai",timer:"background",cron:"background",interval:"background",queue:"background",job:"background","websocket-message":"background","hmr-update":"system"},Sb=new Set(["page-load","user-action","navigation"]),Fb=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Ci(e){return e.replace(/[?#].*$/,"").split("/").map(t=>Fb.test(t)||/^[0-9a-f]{16,}$/i.test(t)||/^\d{2,}$/.test(t)?":id":t).join("/")}s(Ci,"jf"),o(Ci,"templatePath");function Xv(e){let t=/^ui:(?:.*\/)?([^/:]+?)(?:\.[a-z]+)?:\d+:([A-Za-z]+)$/.exec(e);return t?`${t[1]} \xB7 ${t[2]}`:e}s(Xv,"w0"),o(Xv,"componentOf");function Yv(e){let t=e.replace(/[-_:][0-9a-f]{6,}(?:-[0-9a-f]+)*$/i,"");return t=t.replace(/[-_:](?=[a-z0-9]*\d)[a-z0-9]{6,}$/i,""),t=t.replace(/[-_:]\d+$/,""),t||e}s(Yv,"x0"),o(Yv,"scriptFamily");function Qv(e,t,r,i){let u=t.nodeId,n=u?/^(page|route|ambient):(.*)$/.exec(u):null;if(n)return`${n[1]}:${Ci(n[2])}`;if(t.type&&Hv[t.type]==="user-action"&&u)return Xv(u);if(e==="test")return Yv(r.flowId);let a=r.segments.find(d=>d.kind==="request"&&d.route);if(a?.route)return`${a.method??"GET"} ${Ci(a.route)}`;let l=i.find(d=>$i(d)==="ai-call");return l&&Pl(l.raw)?`ai \xB7 ${ot(l.raw.model)??ot(l.raw.provider)??"call"}`:u?Ci(u):void 0}s(Qv,"$0"),o(Qv,"subjectOf");var zb=10,jb=1e3,Nb=3,Ob=500,Rb=1e3;function e1(e,t){let r=new Set,i=t.segments.filter(n=>n.kind==="request");t.segments.some(n=>n.counts.errors>0)&&r.add("has-error"),i.some(n=>n.durationMs>=jb)&&r.add("slow"),i.length>=zb&&r.add("fan-out"),new Set(t.segments.flatMap(n=>n.projects)).size>=3&&r.add("multi-service"),e.some(n=>$i(n)==="queue-enqueued")&&r.add("queue"),e.some(n=>$i(n)==="ai-call"||n.source==="ai")&&r.add("ai"),t.stats.bookkeeping>=Ob&&t.stats.bookkeeping*2>=t.stats.events&&r.add("storm"),t.stats.events>=Rb&&r.add("large");let u=new Map;for(let n of i)(!n.part||n.part.index===1)&&u.set(n.label,(u.get(n.label)??0)+1);return[...u.values()].some(n=>n>=Nb)&&r.add("repeated-requests"),[...r].sort()}s(e1,"T0"),o(e1,"tagsOf");function t1(e,t,r=[]){let i=Kv(e),u={flowId:t.flowId,origin:i,segments:t.segments},n=e1(e,t),a=o((c,f,g)=>{let m=Qv(c,i,t,e);return{category:c,decidedBy:f,...g!==void 0?{ruleIndex:g}:{},tags:n,origin:i,...m?{subject:m}:{}}},"done"),l=r.findIndex(c=>c.category&&Ml(c,u));if(l!==-1)return a(r[l].category,"rule",l);if(Ib(t.flowId,i.nodeId))return a("test","test");let d=i.type?Hv[i.type]:void 0;if(d)return a(d,"origin");if(n.includes("ai"))return a("ai","shape");let p=t.segments.filter(c=>c.kind==="request");return p.length>0?a(p.every(c=>c.requestId?.startsWith("job:"))?"background":"api","shape"):t.segments.length>0&&t.segments.every(c=>c.kind==="ambient")?a("system","shape"):a("other","shape")}s(t1,"Hw"),o(t1,"classifyFlow");function u1(e,t,r=[]){let i=r.find(u=>u.category&&(u.route!==void 0||u.project!==void 0)&&u.flowId===void 0&&u.origin===void 0&&u.originType===void 0&&Ml(u,{flowId:e.flowId,origin:t.origin,segments:[e]}));return i?i.category:e.kind==="request"?e.requestId?.startsWith("job:")?"background":"api":e.kind==="ambient"?"system":e.kind==="origin"&&Sb.has(t.category)?t.category:"ui"}s(u1,"Yw"),o(u1,"categoryOfSegment");function r1(e){return n1(e).map(t=>{let r=new Map;for(let u of t.items){let n=r.get(u.subject);n?n.push(u):r.set(u.subject,[u])}let i=[...r.entries()].sort((u,n)=>(u[0]===void 0?1:0)-(n[0]===void 0?1:0)||n[1].length-u[1].length||String(u[0]).localeCompare(String(n[0]))).map(([u,n])=>({subject:u,count:n.length,items:n}));return{...t,subjects:i}})}s(r1,"Qw"),o(r1,"groupFlows");function n1(e){let t=new Map;for(let i of e){let u=t.get(i.category);u?u.push(i):t.set(i.category,[i])}let r=o(i=>{let u=wi.indexOf(i);return u===-1?wi.length:u},"rank");return[...t.entries()].sort((i,u)=>r(i[0])-r(u[0])||(i[0]<u[0]?-1:i[0]>u[0]?1:0)).map(([i,u])=>({category:i,count:u.length,items:u}))}s(n1,"E0"),o(n1,"groupByCategory");var lt={categories:[],segments:{},problems:[]},Ul=200,i1=200,s1=64,Tb=/^[A-Za-z0-9][A-Za-z0-9 ._:/-]*$/,Mb=["category","flowId","originType","origin","route","project"],Pb={phaseGapMs:[50,6e5],burstGapMs:[10,6e4],attachWindowMs:[0,6e4],maxSegmentEvents:[20,1e4],occurrenceSlackMs:[0,1e3]},Zl=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj");function a1(e,t){if(!Zl(e))return{problems:[`${t}: not an object`]};let r=[];for(let l of Object.keys(e))Mb.includes(l)||r.push(`${t}: unknown field "${l}" ignored`);let i=e.category;if(typeof i!="string"||i.trim()==="")return{problems:[...r,`${t}: "category" must be a non-empty string \u2014 rule dropped`]};let u=i.trim();if(u.length>s1||!Tb.test(u))return{problems:[...r,`${t}: category "${u.slice(0,40)}" is not a usable name (letters, digits, space . _ : / -; up to ${s1}) \u2014 rule dropped`]};let n={category:u},a=0;for(let l of["flowId","originType","origin","route","project"]){let d=e[l];if(d!==void 0){if(typeof d!="string"||d===""||d.length>i1)return{problems:[...r,`${t}: "${l}" must be a non-empty string of up to ${i1} characters \u2014 rule dropped`]};n[l]=d,a+=1}}return a===0?{problems:[...r,`${t}: "${u}" has no match field (flowId, originType, origin, route or project) \u2014 rule dropped`]}:{rule:n,problems:r}}s(a1,"O0"),o(a1,"parseRule");function o1(e){if(e==null)return lt;if(!Zl(e))return{...lt,problems:["lensmcp.flows must be an object \u2014 ignored"]};let t=[],r=[],i=e.categories;i!==void 0&&(Array.isArray(i)?(i.length>Ul&&t.push(`flows.categories has ${i.length} rules; only the first ${Ul} are used`),i.slice(0,Ul).forEach((a,l)=>{let d=a1(a,`flows.categories[${l}]`);t.push(...d.problems),d.rule&&r.push(d.rule)})):t.push("flows.categories must be an array \u2014 ignored"));let u={},n=e.segments;if(n!==void 0)if(!Zl(n))t.push("flows.segments must be an object \u2014 ignored");else for(let[a,l]of Object.entries(n)){let d=Pb[a];if(!d){t.push(`flows.segments.${a}: unknown option ignored`);continue}if(typeof l!="number"||!Number.isFinite(l)||l<d[0]||l>d[1]){t.push(`flows.segments.${a}: ${JSON.stringify(l)} is outside ${d[0]}\u2013${d[1]}; using the default (${jv[a]})`);continue}u[a]=l}return{categories:r,segments:u,problems:t}}s(o1,"rx"),o(o1,"parseFlowsConfig");function xi(e,t=lt){let r=Uv(e,t.segments),i=t1(e,r,t.categories),u={};for(let n of r.segments)u[n.id]=u1(n,i,t.categories);return{segmentation:r,classification:i,segmentCategories:u}}s(xi,"Fr"),o(xi,"analyzeFlow");function ql(e,t={}){let r=t.threshold??5,i=[];for(let u of e){let n=u.raw??null;if(n?.kind!=="loop"||!n.loop)continue;let a=n.loop.dbCallsInsideLoop??0;a>r&&i.push({kind:"db-in-loop",severity:"warning",title:`${a} DB calls inside a loop (${n.loop.iterations??"?"} iterations)`,evidence:[u.id],details:{dbCallsInsideLoop:a,iterations:n.loop.iterations,durationMs:n.loop.durationMs,threshold:r},detectedAt:u.timestamp})}return i}s(ql,"gs"),o(ql,"detectDbInLoop");function l1(e,t={}){let r=t.threshold??3,i=new Map;for(let n of e){let a=n.raw??null;if(a?.kind!=="db-query"||!a.query?.signature)continue;let l=a.query.signature,d=i.get(l);d||(d=[],i.set(l,d)),d.push(n)}let u=[];for(let[n,a]of i)a.length>=r&&u.push({kind:"n+1-query",severity:"warning",title:`Query repeated ${a.length}\xD7 \u2014 likely N+1`,evidence:a.map(l=>l.id),details:{signature:n,count:a.length,threshold:r},detectedAt:a[a.length-1].timestamp});return u}s(l1,"nx"),o(l1,"detectNPlusOne");function d1(e,t={}){let r=t.threshold??5,i=t.windowMs??250,u=new Map;for(let a of e){if(a.source!=="react")continue;let l=a.raw??null;if(l?.kind!=="render"||!l.render?.componentInstanceId)continue;let d=l.render.componentInstanceId,p=u.get(d);p||(p=[],u.set(d,p)),p.push(a)}let n=[];for(let[a,l]of u){l.sort((p,c)=>p.timestamp-c.timestamp);let d=0;for(let p=0;p<l.length;p++){for(;l[p].timestamp-l[d].timestamp>i;)d++;let c=p-d+1;if(c>r){let f=l.slice(d,p+1),g=f[0].raw.render?.componentName??a;n.push({kind:"render-storm",severity:"warning",title:`${g} rendered ${c}\xD7 in ${i}ms`,evidence:f.map(m=>m.id),details:{componentInstanceId:a,count:c,windowMs:i,threshold:r},detectedAt:f[f.length-1].timestamp});break}}}return n}s(d1,"ox"),o(d1,"detectRenderStorm");function c1(e,t,r){let i=new Map,u=new Set;function n(l){let d=i.get(l);if(d)return d;if(u.has(l))return{path:[l],totalDurationMs:r(l)};u.add(l);let p=r(l),c=t.get(l)??[],f;for(let m of c){let h=n(m);(!f||h.totalDurationMs>f.totalDurationMs)&&(f=h)}u.delete(l);let g=f?{path:[l,...f.path],totalDurationMs:p+f.totalDurationMs}:{path:[l],totalDurationMs:p};return i.set(l,g),g}s(n,"i"),o(n,"best");let a={path:[],totalDurationMs:0};for(let l of e){let d=n(l);d.totalDurationMs>a.totalDurationMs&&(a=d)}return a}s(c1,"ix"),o(c1,"findSlowPath");var p1={dbInLoop:5,nPlusOne:3,renderStorm:5,slowRouteMs:500,slowRenderMs:16,slowQueryMs:100,duplicateRequestPeak:3,slowEgressMs:1e3};function Je(e){let t={...p1};if(e)for(let r of Object.keys(p1)){let i=e[r];typeof i=="number"&&Number.isFinite(i)&&i>=0&&(t[r]=i)}return t}s(Je,"$e"),o(Je,"resolveThresholds");function m1(e){let t=e.raw??null,r=t?.kind,i=e.context,u={id:e.id,parentTraceNodeId:i.causedByNodeId??i.originNodeId,lifecycle:"completed",context:i,startTime:e.timestamp,attributes:{...t??{}}};if(e.source==="react"&&r==="render"){let n=t;return{parentAxis:"render",node:{...u,type:"render",logicalId:n.render?.componentLogicalId,instanceId:n.render?.componentInstanceId,name:`render ${n.render?.componentName??"?"}`,durationMs:n.render?.actualDurationMs}}}if(e.source==="valtio"&&r==="state-update"){let n=t;return{parentAxis:"state",node:{...u,type:"state-update",logicalId:n.update?.storeId,name:`${n.update?.storeId??"?"}.${n.update?.path??"?"}`}}}if(e.source==="nestjs"&&r==="server-request"){let n=t;return{parentAxis:"backend",node:{...u,type:"server-request",name:`${n.request?.method??"?"} ${n.request?.route??"?"}`,durationMs:n.request?.durationMs}}}if(r==="db-query"){let n=t,a=[n.op,n.table].filter(Boolean).join(" ")||(n.name??"query");return{parentAxis:"backend",node:{...u,type:"db-query",logicalId:n.table?`db:${n.op??"query"}:${n.table}`:void 0,name:n.error?`${a} (failed)`:a,durationMs:n.durationMs}}}if(r==="loop")return{parentAxis:"performance",node:{...u,type:"loop",name:"loop",durationMs:t.loop?.durationMs}};if(e.source==="client-runtime"&&r==="user-action"){let n=t;return{parentAxis:"caused",node:{...u,type:"ui-event",logicalId:n.origin?.nodeId,name:n.origin?.label??e.title}}}}s(m1,"N0"),o(m1,"eventToNode");function f1(e,t){let r=[...t].sort((l,d)=>l.timestamp-d.timestamp),i=[];for(let l of r){let d=m1(l);d&&(e.addNode(d.node),i.push(d))}let u=0,n=o((l,d,p,c)=>{let f={id:`${p}:${l}->${d}`,from:l,to:d,axis:p,type:c,timestamp:e.getNode(d)?.startTime??0};e.addEdge(f),u++},"addEdge");for(let l of i){let d=l.node.context.causedByNodeId;d&&e.getNode(d)&&n(d,l.node.id,l.parentAxis??"caused","caused-by")}let a=new Map;for(let l of i){let d=l.node.context.flowId;if(!d)continue;let p=a.get(d);p||(p=[],a.set(d,p)),p.push(l)}for(let l of a.values())for(let d=1;d<l.length;d++){let p=l[d-1].node,c=l[d].node;c.context.causedByNodeId!==p.id&&n(p.id,c.id,"caused","flow-sequence")}return{nodeCount:i.length,edgeCount:u}}s(f1,"ax"),o(f1,"buildGraphFromEvents");var g1=new WeakMap;function ki(e){let t=g1.get(e);if(t!==void 0)return t;let r=Le(e);return g1.set(e,r),r}s(ki,"Zr"),o(ki,"estimateEventBytes");function h1(e,t={}){let r=t.rawByteLimit??32768,i=t.maxDepth??12,u=e.raw;if(u==null)return{event:e,truncated:!1,originalBytes:0,keptBytes:0};if(!zl(u,r,i)){let p=Le(u,r,i);return{event:e,truncated:!1,originalBytes:p,keptBytes:p}}let n=Le(u,Number.POSITIVE_INFINITY,64),a={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1},l=lu(u,a,i,""),d=Le(l,Number.POSITIVE_INFINITY,i);if(a.truncatedAnything&&l!==null&&typeof l=="object"&&!Array.isArray(l)){let p={truncated:!0,originalBytes:n,keptBytes:d,paths:a.paths};l[wv]=p}return{event:{...e,raw:l},truncated:a.truncatedAnything,originalBytes:n,keptBytes:d}}s(h1,"U0"),o(h1,"clampEventRaw");function v1(e={}){let t=0,r=0,i=0,u=e.rawByteLimit??32768;return{clamp(n){t+=1;let a=h1(n,e);return a.truncated&&(r+=1,i+=Math.max(0,a.originalBytes-a.keptBytes)),a.event},stats(){return{inspected:t,truncated:r,bytesReclaimed:i,rawByteLimit:u}},reset(){t=0,r=0,i=0}}}s(v1,"ux"),o(v1,"createEventClamp");var Ub={screenshot:50,"visual-crop":50,"visual-frame":200,"build-report":20,"heap-snapshot":3,"trace-with-errors":20,verification:10},Zb=64*1024*1024,qb=32*1024*1024,Lb=class{static{s(this,"hs")}static{o(this,"InMemoryRingBuffer")}constructor(e={}){this.events=[],this.eventBytes=[],this.residentEventBytes=0,this.ingested=0,this.dropped=0,this.droppedForBytes=0,this.artifactsByKind=new Map,this.artifactsById=new Map,this.artifactBytesById=new Map,this.artifactOrder=[],this.residentArtifactBytes=0,this.artifactsDropped=0,this.eventCap=e.eventCap??5e3,this.eventByteCap=e.eventByteCap??Zb,this.artifactCaps={...Ub,...e.artifactCapacities},this.artifactByteCap=e.artifactByteCap??qb}appendEvent(e){let t=ki(e);for(this.events.push(e),this.eventBytes.push(t),this.residentEventBytes+=t,this.ingested+=1,this.events.length>this.eventCap&&this.evictOldestEvents(this.events.length-this.eventCap);this.residentEventBytes>this.eventByteCap&&this.events.length>1;)this.evictOldestEvents(1),this.droppedForBytes+=1}evictOldestEvents(e){if(e<=0)return;let t=Math.min(e,this.events.length);for(let r=0;r<t;r++)this.residentEventBytes-=this.eventBytes[r]??0;this.events.splice(0,t),this.eventBytes.splice(0,t),this.dropped+=t,this.events.length===0&&(this.residentEventBytes=0)}recentEvents(e){return e===void 0||e>=this.events.length?[...this.events]:this.events.slice(this.events.length-e)}totalEventsIngested(){return this.ingested}totalEventsDropped(){return this.dropped}putArtifact(e){let t=this.artifactCaps[e.kind]??0;if(t<=0)return;let r=this.artifactsByKind.get(e.kind);r||(r=[],this.artifactsByKind.set(e.kind,r)),this.artifactsById.has(e.id)&&this.removeArtifact(e.id);let i=Le(e.data);for(r.push(e),this.artifactsById.set(e.id,e),this.artifactBytesById.set(e.id,i),this.artifactOrder.push(e.id),this.residentArtifactBytes+=i;r.length>t;){let u=r.shift();u&&(this.forgetArtifact(u.id),this.artifactsDropped+=1)}for(;this.residentArtifactBytes>this.artifactByteCap&&this.artifactOrder.length>1;){let u=this.artifactOrder[0];if(u===void 0)break;this.removeArtifact(u),this.artifactsDropped+=1}}removeArtifact(e){let t=this.artifactsById.get(e);if(t){let r=this.artifactsByKind.get(t.kind);if(r){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}this.forgetArtifact(e)}forgetArtifact(e){this.artifactsById.delete(e),this.residentArtifactBytes-=this.artifactBytesById.get(e)??0,this.artifactBytesById.delete(e);let t=this.artifactOrder.indexOf(e);t!==-1&&this.artifactOrder.splice(t,1),this.artifactsById.size===0&&(this.residentArtifactBytes=0)}getArtifact(e){return this.artifactsById.get(e)}listArtifacts(e){return[...this.artifactsByKind.get(e)??[]]}approximateSizeBytes(){return this.residentEventBytes+this.residentArtifactBytes}stats(){let e={};for(let[t,r]of this.artifactsByKind)r.length>0&&(e[t]=r.length);return{events:{resident:this.events.length,residentBytes:this.residentEventBytes,ingested:this.ingested,dropped:this.dropped,droppedForBytes:this.droppedForBytes,cap:this.eventCap,byteCap:this.eventByteCap},artifacts:{resident:this.artifactsById.size,residentBytes:this.residentArtifactBytes,dropped:this.artifactsDropped,byteCap:this.artifactByteCap,byKind:e}}}},Jb=class{static{s(this,"vs")}static{o(this,"Session")}constructor(e={}){this.state="idle",this.hooks=[],this.reducerRetention=new Map,this.id=e.sessionId??qt(),this.storage=e.storage??new Lb,this.clamp=e.clamp===!1?void 0:v1(e.clamp??{}),this.redactor=e.redact===!1?void 0:Zp(e.redact??{});let t=[this.clamp?.clamp,this.redactor?.redact].filter(r=>r!==void 0);this.bus=new Wy({capacity:e.eventBusCapacity,...t.length?{transform:o(r=>t.reduce((i,u)=>u(i),r),"transform")}:{}}),this.graph=new qp,this.resources=new iE,this.reducers=new sE,this.bus.subscribe(r=>{this.storage.appendEvent(r),this.reducers.dispatch(r)})}get lifecycle(){return this.state}storageStats(){let e=Object.fromEntries([...this.reducerRetention].map(([t,r])=>[t,r()]));return{...this.storage.stats?{storage:this.storage.stats()}:{},...this.clamp?{clamp:this.clamp.stats()}:{},...Object.keys(e).length>0?{reducers:e}:{}}}registerReducerRetention(e,t){this.reducerRetention.set(e,t)}start(){this.state==="idle"&&(this.state="active")}onShutdown(e){this.hooks.push(e)}async stop(){if(!(this.state==="closed"||this.state==="stopping")){this.state="stopping";for(let e=this.hooks.length-1;e>=0;e--){let t=this.hooks[e];try{let r=t.stop();r&&typeof r.then=="function"&&await r}catch{}}this.state="closed"}}};import{AsyncProvider as Ar,ProviderScope as _r}from"@frontmcp/sdk";var Ll;function y1(e){Ll=e}s(y1,"lx"),o(y1,"setActiveSession");function pu(){if(!Ll)throw new Error("No LensMCP session is active. Did you call bootstrapLensmcp() before the FrontMCP container started?");return Ll}s(pu,"Xn"),o(pu,"requireSession");var Vb=Ar({provide:Sl,name:"LensmcpSession",description:"The active LensMCP Session instance.",scope:_r.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>pu(),"useFactory")}),Wb=Ar({provide:Fl,name:"LensmcpEventBus",description:"The session's normalised event bus.",scope:_r.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>pu().bus,"useFactory")}),Gb=Ar({provide:vb,name:"LensmcpGraphStore",description:"The typed multi-axis trace graph.",scope:_r.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>pu().graph,"useFactory")}),Kb=Ar({provide:q,name:"LensmcpResourceStore",description:"Registry of agent-readable MCP resources.",scope:_r.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>pu().resources,"useFactory")}),Hb=Ar({provide:yb,name:"LensmcpStorage",description:"Hot-tier storage backend (in-memory ring buffer by default).",scope:_r.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>pu().storage,"useFactory")}),Xb=[Vb,Wb,Gb,Kb,Hb];function E1(e={}){let t=new Jb(e);return t.start(),y1(t),{session:t,providers:Xb}}s(E1,"px"),o(E1,"bootstrapLensmcp");var I7=new RegExp("\x1B\\[[0-9;]*[A-Za-z]","g"),S7=["ai/agents/hazard-analyst/src/hazard-analyst.agent.ts(52,12): error TS2416: Property 'outputSchema' in type 'HazardAnalystAgent' is not assignable to the same property in base type 'BaseAgent<HazardInput, HazardOutput>'.","server/apps/haccp/src/modules/plan/plan.service.ts(118,7): error TS2322: Type 'string' is not assignable to type 'PlanStatus'.","web/libs/ui/src/report/report-renderer.tsx(9,3): warning TS6133: {0} is declared but its value is never read."].join(`
|
|
65
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let l=a[1];if(t===a[0]){n(a);continue}if(e.external){let d=e.external.registry.get(a[0])?.id;if(t!==a[0]&&d){n(a);continue}}if(e.metadataRegistry.get(a[0])?.id){n(a);continue}if(l.cycle){n(a);continue}if(l.count>1&&e.reused==="ref"){n(a);continue}}}s(kt,"bt"),o(kt,"extractDefs");function At(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=o(l=>{let d=e.seen.get(l);if(d.ref===null)return;let p=d.def??d.schema,c={...p},f=d.ref;if(d.ref=null,f){i(f);let m=e.seen.get(f),h=m.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(h)):Object.assign(p,h),Object.assign(p,c),l._zod.parent===f)for(let E in p)E==="$ref"||E==="allOf"||E in c||delete p[E];if(h.$ref&&m.def)for(let E in p)E==="$ref"||E==="allOf"||E in m.def&&JSON.stringify(p[E])===JSON.stringify(m.def[E])&&delete p[E]}let g=l._zod.parent;if(g&&g!==f){i(g);let m=e.seen.get(g);if(m?.schema.$ref&&(p.$ref=m.schema.$ref,m.def))for(let h in p)h==="$ref"||h==="allOf"||h in m.def&&JSON.stringify(p[h])===JSON.stringify(m.def[h])&&delete p[h]}e.override({zodSchema:l,jsonSchema:p,path:d.path??[]})},"flattenRef");for(let l of[...e.seen.entries()].reverse())i(l[0]);let u={};if(e.target==="draft-2020-12"?u.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?u.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?u.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");u.$id=e.external.uri(l)}Object.assign(u,r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;n!==void 0&&u.id===n&&delete u.id;let a=e.external?.defs??{};for(let l of e.seen.entries()){let d=l[1];d.def&&d.defId&&(d.def.id===d.defId&&delete d.def.id,a[d.defId]=d.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?u.$defs=a:u.definitions=a);try{let l=JSON.parse(JSON.stringify(u));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:ar(t,"input",e.processors),output:ar(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}s(At,"wt"),o(At,"finalize");function be(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return be(i.element,r);if(i.type==="set")return be(i.valueType,r);if(i.type==="lazy")return be(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return be(i.innerType,r);if(i.type==="intersection")return be(i.left,r)||be(i.right,r);if(i.type==="record"||i.type==="map")return be(i.keyType,r)||be(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:be(i.in,r)||be(i.out,r);if(i.type==="object"){for(let u in i.shape)if(be(i.shape[u],r))return!0;return!1}if(i.type==="union"){for(let u of i.options)if(be(u,r))return!0;return!1}if(i.type==="tuple"){for(let u of i.items)if(be(u,r))return!0;return!!(i.rest&&be(i.rest,r))}return!1}s(be,"Ie"),o(be,"isTransforming");var rh=o((e,t={})=>r=>{let i=xt({...r,processors:t});return re(e,i),kt(i,e),At(i,e)},"createToJSONSchemaMethod"),ar=o((e,t,r={})=>i=>{let{libraryOptions:u,target:n}=i??{},a=xt({...u??{},target:n,io:t,processors:r});return re(e,a),kt(a,e),At(a,e)},"createStandardJSONSchemaMethod"),P5={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},nh=o((e,t,r,i)=>{let u=r;u.type="string";let{minimum:n,maximum:a,format:l,patterns:d,contentEncoding:p}=e._zod.bag;if(typeof n=="number"&&(u.minLength=n),typeof a=="number"&&(u.maxLength=a),l&&(u.format=P5[l]??l,u.format===""&&delete u.format,l==="time"&&delete u.format),p&&(u.contentEncoding=p),d&&d.size>0){let c=[...d];c.length===1?u.pattern=c[0].source:c.length>1&&(u.allOf=[...c.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},"stringProcessor"),ih=o((e,t,r,i)=>{let u=r,{minimum:n,maximum:a,format:l,multipleOf:d,exclusiveMaximum:p,exclusiveMinimum:c}=e._zod.bag;typeof l=="string"&&l.includes("int")?u.type="integer":u.type="number";let f=typeof c=="number"&&c>=(n??Number.NEGATIVE_INFINITY),g=typeof p=="number"&&p<=(a??Number.POSITIVE_INFINITY),m=t.target==="draft-04"||t.target==="openapi-3.0";f?m?(u.minimum=c,u.exclusiveMinimum=!0):u.exclusiveMinimum=c:typeof n=="number"&&(u.minimum=n),g?m?(u.maximum=p,u.exclusiveMaximum=!0):u.exclusiveMaximum=p:typeof a=="number"&&(u.maximum=a),typeof d=="number"&&(u.multipleOf=d)},"numberProcessor"),sh=o((e,t,r,i)=>{r.type="boolean"},"booleanProcessor"),ah=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),oh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),lh=o((e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},"nullProcessor"),dh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),ch=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),ph=o((e,t,r,i)=>{r.not={}},"neverProcessor"),mh=o((e,t,r,i)=>{},"anyProcessor"),fh=o((e,t,r,i)=>{},"unknownProcessor"),gh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),hh=o((e,t,r,i)=>{let u=e._zod.def,n=en(u.entries);n.every(a=>typeof a=="number")&&(r.type="number"),n.every(a=>typeof a=="string")&&(r.type="string"),r.enum=n},"enumProcessor"),vh=o((e,t,r,i)=>{let u=e._zod.def,n=[];for(let a of u.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");n.push(Number(a))}else n.push(a);if(n.length!==0)if(n.length===1){let a=n[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else n.every(a=>typeof a=="number")&&(r.type="number"),n.every(a=>typeof a=="string")&&(r.type="string"),n.every(a=>typeof a=="boolean")&&(r.type="boolean"),n.every(a=>a===null)&&(r.type="null"),r.enum=n},"literalProcessor"),yh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),Eh=o((e,t,r,i)=>{let u=r,n=e._zod.pattern;if(!n)throw new Error("Pattern not found in template literal");u.type="string",u.pattern=n.source},"templateLiteralProcessor"),bh=o((e,t,r,i)=>{let u=r,n={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:l,mime:d}=e._zod.bag;a!==void 0&&(n.minLength=a),l!==void 0&&(n.maxLength=l),d?d.length===1?(n.contentMediaType=d[0],Object.assign(u,n)):(Object.assign(u,n),u.anyOf=d.map(p=>({contentMediaType:p}))):Object.assign(u,n)},"fileProcessor"),Dh=o((e,t,r,i)=>{r.type="boolean"},"successProcessor"),wh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),Bh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),$h=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),Ch=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),xh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),kh=o((e,t,r,i)=>{let u=r,n=e._zod.def,{minimum:a,maximum:l}=e._zod.bag;typeof a=="number"&&(u.minItems=a),typeof l=="number"&&(u.maxItems=l),u.type="array",u.items=re(n.element,t,{...i,path:[...i.path,"items"]})},"arrayProcessor"),Ah=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="object",u.properties={};let a=n.shape;for(let p in a)u.properties[p]=re(a[p],t,{...i,path:[...i.path,"properties",p]});let l=new Set(Object.keys(a)),d=new Set([...l].filter(p=>{let c=n.shape[p]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));d.size>0&&(u.required=Array.from(d)),n.catchall?._zod.def.type==="never"?u.additionalProperties=!1:n.catchall?n.catchall&&(u.additionalProperties=re(n.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(u.additionalProperties=!1)},"objectProcessor"),ko=o((e,t,r,i)=>{let u=e._zod.def,n=u.inclusive===!1,a=u.options.map((l,d)=>re(l,t,{...i,path:[...i.path,n?"oneOf":"anyOf",d]}));n?r.oneOf=a:r.anyOf=a},"unionProcessor"),_h=o((e,t,r,i)=>{let u=e._zod.def,n=re(u.left,t,{...i,path:[...i.path,"allOf",0]}),a=re(u.right,t,{...i,path:[...i.path,"allOf",1]}),l=o(p=>"allOf"in p&&Object.keys(p).length===1,"isSimpleIntersection"),d=[...l(n)?n.allOf:[n],...l(a)?a.allOf:[a]];r.allOf=d},"intersectionProcessor"),Ih=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",l=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=n.items.map((g,m)=>re(g,t,{...i,path:[...i.path,a,m]})),p=n.rest?re(n.rest,t,{...i,path:[...i.path,l,...t.target==="openapi-3.0"?[n.items.length]:[]]}):null;t.target==="draft-2020-12"?(u.prefixItems=d,p&&(u.items=p)):t.target==="openapi-3.0"?(u.items={anyOf:d},p&&u.items.anyOf.push(p),u.minItems=d.length,p||(u.maxItems=d.length)):(u.items=d,p&&(u.additionalItems=p));let{minimum:c,maximum:f}=e._zod.bag;typeof c=="number"&&(u.minItems=c),typeof f=="number"&&(u.maxItems=f)},"tupleProcessor"),Sh=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="object";let a=n.keyType,l=a._zod.bag?.patterns;if(n.mode==="loose"&&l&&l.size>0){let p=re(n.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});u.patternProperties={};for(let c of l)u.patternProperties[c.source]=p}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(u.propertyNames=re(n.keyType,t,{...i,path:[...i.path,"propertyNames"]})),u.additionalProperties=re(n.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let d=a._zod.values;if(d){let p=[...d].filter(c=>typeof c=="string"||typeof c=="number");p.length>0&&(u.required=p)}},"recordProcessor"),Fh=o((e,t,r,i)=>{let u=e._zod.def,n=re(u.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=u.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},"nullableProcessor"),zh=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"nonoptionalProcessor"),jh=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,r.default=JSON.parse(JSON.stringify(u.defaultValue))},"defaultProcessor"),Nh=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(u.defaultValue)))},"prefaultProcessor"),Oh=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType;let a;try{a=u.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},"catchProcessor"),Rh=o((e,t,r,i)=>{let u=e._zod.def,n=u.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?n?u.out:u.in:u.out;re(a,t,i);let l=t.seen.get(e);l.ref=a},"pipeProcessor"),Th=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,r.readOnly=!0},"readonlyProcessor"),Mh=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"promiseProcessor"),Ao=o((e,t,r,i)=>{let u=e._zod.def;re(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"optionalProcessor"),Ph=o((e,t,r,i)=>{let u=e._zod.innerType;re(u,t,i);let n=t.seen.get(e);n.ref=u},"lazyProcessor"),_o={string:nh,number:ih,boolean:sh,bigint:ah,symbol:oh,null:lh,undefined:dh,void:ch,never:ph,any:mh,unknown:fh,date:gh,enum:hh,literal:vh,nan:yh,template_literal:Eh,file:bh,success:Dh,custom:wh,function:Bh,transform:$h,map:Ch,set:xh,array:kh,object:Ah,union:ko,intersection:_h,tuple:Ih,record:Sh,nullable:Fh,nonoptional:zh,default:jh,prefault:Nh,catch:Oh,pipe:Rh,readonly:Th,promise:Mh,optional:Ao,lazy:Ph};function Io(e,t){if("_idmap"in e){let i=e,u=xt({...t,processors:_o}),n={};for(let d of i._idmap.entries()){let[p,c]=d;re(c,u)}let a={},l={registry:i,uri:t?.uri,defs:n};u.external=l;for(let d of i._idmap.entries()){let[p,c]=d;kt(u,c),a[p]=At(u,c)}if(Object.keys(n).length>0){let d=u.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[d]:n}}return{schemas:a}}let r=xt({...t,processors:_o});return re(e,r),kt(r,e),At(r,e)}s(Io,"Ai"),o(Io,"toJSONSchema");var U5=class{static{s(this,"zi")}static{o(this,"JSONSchemaGenerator")}get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),this.ctx=xt({processors:_o,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return re(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),kt(this.ctx,e);let r=At(this.ctx,e),{"~standard":i,...u}=r;return u}},Z5={},Uh={};Ge(Uh,{ZodAny:s(()=>k0,"ZodAny"),ZodArray:s(()=>j0,"ZodArray"),ZodBase64:s(()=>Gn,"ZodBase64"),ZodBase64URL:s(()=>Kn,"ZodBase64URL"),ZodBigInt:s(()=>fr,"ZodBigInt"),ZodBigIntFormat:s(()=>ei,"ZodBigIntFormat"),ZodBoolean:s(()=>mr,"ZodBoolean"),ZodCIDRv4:s(()=>Vn,"ZodCIDRv4"),ZodCIDRv6:s(()=>Wn,"ZodCIDRv6"),ZodCUID:s(()=>Mn,"ZodCUID"),ZodCUID2:s(()=>Pn,"ZodCUID2"),ZodCatch:s(()=>dl,"ZodCatch"),ZodCodec:s(()=>Br,"ZodCodec"),ZodCustom:s(()=>Cr,"ZodCustom"),ZodCustomStringFormat:s(()=>uu,"ZodCustomStringFormat"),ZodDate:s(()=>ui,"ZodDate"),ZodDefault:s(()=>sl,"ZodDefault"),ZodDiscriminatedUnion:s(()=>U0,"ZodDiscriminatedUnion"),ZodE164:s(()=>Hn,"ZodE164"),ZodEmail:s(()=>On,"ZodEmail"),ZodEmoji:s(()=>Rn,"ZodEmoji"),ZodEnum:s(()=>iu,"ZodEnum"),ZodExactOptional:s(()=>rl,"ZodExactOptional"),ZodFile:s(()=>el,"ZodFile"),ZodFunction:s(()=>wl,"ZodFunction"),ZodGUID:s(()=>lr,"ZodGUID"),ZodIPv4:s(()=>Ln,"ZodIPv4"),ZodIPv6:s(()=>Jn,"ZodIPv6"),ZodIntersection:s(()=>q0,"ZodIntersection"),ZodJWT:s(()=>Xn,"ZodJWT"),ZodKSUID:s(()=>qn,"ZodKSUID"),ZodLazy:s(()=>El,"ZodLazy"),ZodLiteral:s(()=>Y0,"ZodLiteral"),ZodMAC:s(()=>u0,"ZodMAC"),ZodMap:s(()=>W0,"ZodMap"),ZodNaN:s(()=>cl,"ZodNaN"),ZodNanoID:s(()=>Tn,"ZodNanoID"),ZodNever:s(()=>I0,"ZodNever"),ZodNonOptional:s(()=>di,"ZodNonOptional"),ZodNull:s(()=>x0,"ZodNull"),ZodNullable:s(()=>nl,"ZodNullable"),ZodNumber:s(()=>cr,"ZodNumber"),ZodNumberFormat:s(()=>_t,"ZodNumberFormat"),ZodObject:s(()=>hr,"ZodObject"),ZodOptional:s(()=>si,"ZodOptional"),ZodPipe:s(()=>Dr,"ZodPipe"),ZodPrefault:s(()=>al,"ZodPrefault"),ZodPreprocess:s(()=>gl,"ZodPreprocess"),ZodPromise:s(()=>bl,"ZodPromise"),ZodReadonly:s(()=>hl,"ZodReadonly"),ZodRecord:s(()=>nu,"ZodRecord"),ZodSet:s(()=>K0,"ZodSet"),ZodString:s(()=>or,"ZodString"),ZodStringFormat:s(()=>ae,"ZodStringFormat"),ZodSuccess:s(()=>ol,"ZodSuccess"),ZodSymbol:s(()=>w0,"ZodSymbol"),ZodTemplateLiteral:s(()=>vl,"ZodTemplateLiteral"),ZodTransform:s(()=>ul,"ZodTransform"),ZodTuple:s(()=>L0,"ZodTuple"),ZodType:s(()=>X,"ZodType"),ZodULID:s(()=>Un,"ZodULID"),ZodURL:s(()=>dr,"ZodURL"),ZodUUID:s(()=>qe,"ZodUUID"),ZodUndefined:s(()=>$0,"ZodUndefined"),ZodUnion:s(()=>vr,"ZodUnion"),ZodUnknown:s(()=>_0,"ZodUnknown"),ZodVoid:s(()=>S0,"ZodVoid"),ZodXID:s(()=>Zn,"ZodXID"),ZodXor:s(()=>M0,"ZodXor"),_ZodString:s(()=>Nn,"_ZodString"),_default:s(()=>oi,"_default"),_function:s(()=>$r,"_function"),any:s(()=>A0,"any"),array:s(()=>ru,"array"),base64:s(()=>a0,"base64"),base64url:s(()=>o0,"base64url"),bigint:s(()=>E0,"bigint"),boolean:s(()=>Qn,"boolean"),catch:s(()=>pi,"catch"),check:s(()=>Bl,"check"),cidrv4:s(()=>i0,"cidrv4"),cidrv6:s(()=>s0,"cidrv6"),codec:s(()=>ml,"codec"),cuid:s(()=>Ho,"cuid"),cuid2:s(()=>Xo,"cuid2"),custom:s(()=>$l,"custom"),date:s(()=>z0,"date"),describe:s(()=>rv,"describe"),discriminatedUnion:s(()=>Z0,"discriminatedUnion"),e164:s(()=>l0,"e164"),email:s(()=>Po,"email"),emoji:s(()=>Go,"emoji"),enum:s(()=>Er,"enum"),exactOptional:s(()=>ai,"exactOptional"),file:s(()=>tl,"file"),float32:s(()=>g0,"float32"),float64:s(()=>h0,"float64"),function:s(()=>$r,"function"),guid:s(()=>Uo,"guid"),hash:s(()=>f0,"hash"),hex:s(()=>m0,"hex"),hostname:s(()=>p0,"hostname"),httpUrl:s(()=>Wo,"httpUrl"),instanceof:s(()=>Cl,"instanceof"),int:s(()=>pr,"int"),int32:s(()=>v0,"int32"),int64:s(()=>b0,"int64"),intersection:s(()=>ri,"intersection"),invertCodec:s(()=>fl,"invertCodec"),ipv4:s(()=>t0,"ipv4"),ipv6:s(()=>n0,"ipv6"),json:s(()=>xl,"json"),jwt:s(()=>d0,"jwt"),keyof:s(()=>N0,"keyof"),ksuid:s(()=>e0,"ksuid"),lazy:s(()=>fi,"lazy"),literal:s(()=>Q0,"literal"),looseObject:s(()=>T0,"looseObject"),looseRecord:s(()=>V0,"looseRecord"),mac:s(()=>r0,"mac"),map:s(()=>G0,"map"),meta:s(()=>nv,"meta"),nan:s(()=>pl,"nan"),nanoid:s(()=>Ko,"nanoid"),nativeEnum:s(()=>X0,"nativeEnum"),never:s(()=>gr,"never"),nonoptional:s(()=>ci,"nonoptional"),null:s(()=>ti,"null"),nullable:s(()=>au,"nullable"),nullish:s(()=>il,"nullish"),number:s(()=>Yn,"number"),object:s(()=>O0,"object"),optional:s(()=>su,"optional"),partialRecord:s(()=>J0,"partialRecord"),pipe:s(()=>wr,"pipe"),prefault:s(()=>li,"prefault"),preprocess:s(()=>kl,"preprocess"),promise:s(()=>Dl,"promise"),readonly:s(()=>mi,"readonly"),record:s(()=>ii,"record"),refine:s(()=>gi,"refine"),set:s(()=>H0,"set"),strictObject:s(()=>R0,"strictObject"),string:s(()=>tu,"string"),stringFormat:s(()=>c0,"stringFormat"),stringbool:s(()=>iv,"stringbool"),success:s(()=>ll,"success"),superRefine:s(()=>hi,"superRefine"),symbol:s(()=>B0,"symbol"),templateLiteral:s(()=>yl,"templateLiteral"),transform:s(()=>br,"transform"),tuple:s(()=>ni,"tuple"),uint32:s(()=>y0,"uint32"),uint64:s(()=>D0,"uint64"),ulid:s(()=>Yo,"ulid"),undefined:s(()=>C0,"undefined"),union:s(()=>yr,"union"),unknown:s(()=>at,"unknown"),url:s(()=>Vo,"url"),uuid:s(()=>Zo,"uuid"),uuidv4:s(()=>qo,"uuidv4"),uuidv6:s(()=>Lo,"uuidv6"),uuidv7:s(()=>Jo,"uuidv7"),void:s(()=>F0,"void"),xid:s(()=>Qo,"xid"),xor:s(()=>P0,"xor")});var Zh={};Ge(Zh,{endsWith:s(()=>er,"endsWith"),gt:s(()=>Xe,"gt"),gte:s(()=>we,"gte"),includes:s(()=>Yu,"includes"),length:s(()=>Yt,"length"),lowercase:s(()=>Hu,"lowercase"),lt:s(()=>He,"lt"),lte:s(()=>Ie,"lte"),maxLength:s(()=>Xt,"maxLength"),maxSize:s(()=>Ct,"maxSize"),mime:s(()=>tr,"mime"),minLength:s(()=>st,"minLength"),minSize:s(()=>Ye,"minSize"),multipleOf:s(()=>$t,"multipleOf"),negative:s(()=>Sn,"negative"),nonnegative:s(()=>zn,"nonnegative"),nonpositive:s(()=>Fn,"nonpositive"),normalize:s(()=>ur,"normalize"),overwrite:s(()=>Ze,"overwrite"),positive:s(()=>In,"positive"),property:s(()=>jn,"property"),regex:s(()=>Ku,"regex"),size:s(()=>Ht,"size"),slugify:s(()=>sr,"slugify"),startsWith:s(()=>Qu,"startsWith"),toLowerCase:s(()=>nr,"toLowerCase"),toUpperCase:s(()=>ir,"toUpperCase"),trim:s(()=>rr,"trim"),uppercase:s(()=>Xu,"uppercase")});var So={};Ge(So,{ZodISODate:s(()=>jo,"ZodISODate"),ZodISODateTime:s(()=>Fo,"ZodISODateTime"),ZodISODuration:s(()=>To,"ZodISODuration"),ZodISOTime:s(()=>Oo,"ZodISOTime"),date:s(()=>No,"date"),datetime:s(()=>zo,"datetime"),duration:s(()=>Mo,"duration"),time:s(()=>Ro,"time")});var Fo=B("ZodISODateTime",(e,t)=>{N4.init(e,t),ae.init(e,t)});function zo(e){return La(Fo,e)}s(zo,"gp"),o(zo,"datetime");var jo=B("ZodISODate",(e,t)=>{O4.init(e,t),ae.init(e,t)});function No(e){return Ja(jo,e)}s(No,"hp"),o(No,"date");var Oo=B("ZodISOTime",(e,t)=>{R4.init(e,t),ae.init(e,t)});function Ro(e){return Va(Oo,e)}s(Ro,"vp"),o(Ro,"time");var To=B("ZodISODuration",(e,t)=>{T4.init(e,t),ae.init(e,t)});function Mo(e){return Wa(To,e)}s(Mo,"yp"),o(Mo,"duration");var qh=o((e,t)=>{Ms.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:o(r=>nn(e,r),"value")},flatten:{value:o(r=>rn(e,r),"value")},addIssue:{value:o(r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Su,2)},"value")},addIssues:{value:o(r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Su,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),q5=B("ZodError",qh),Se=B("ZodError",qh,{Parent:Error}),Lh=Ou(Se),Jh=Ru(Se),Vh=Tu(Se),Wh=Mu(Se),Gh=Js(Se),Kh=Vs(Se),Hh=Ws(Se),Xh=Gs(Se),Yh=Ks(Se),Qh=Hs(Se),ev=Xs(Se),tv=Ys(Se),uv=new WeakMap;function eu(e,t,r){let i=Object.getPrototypeOf(e),u=uv.get(i);if(u||(u=new Set,uv.set(i,u)),!u.has(t)){u.add(t);for(let n in r){let a=r[n];Object.defineProperty(i,n,{configurable:!0,enumerable:!1,get(){let l=a.bind(this);return Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}s(eu,"jn"),o(eu,"_installLazyMethods");var X=B("ZodType",(e,t)=>(K.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ar(e,"input"),output:ar(e,"output")}}),e.toJSONSchema=rh(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,i)=>Lh(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Vh(e,r,i),e.parseAsync=async(r,i)=>Jh(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Wh(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>Gh(e,r,i),e.decode=(r,i)=>Kh(e,r,i),e.encodeAsync=async(r,i)=>Hh(e,r,i),e.decodeAsync=async(r,i)=>Xh(e,r,i),e.safeEncode=(r,i)=>Yh(e,r,i),e.safeDecode=(r,i)=>Qh(e,r,i),e.safeEncodeAsync=async(r,i)=>ev(e,r,i),e.safeDecodeAsync=async(r,i)=>tv(e,r,i),eu(e,"ZodType",{check(...r){let i=this.def;return this.clone(Q.mergeDefs(i,{checks:[...i.checks??[],...r.map(u=>typeof u=="function"?{_zod:{check:u,def:{check:"custom"},onattach:[]}}:u)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,i){return ke(this,r,i)},brand(){return this},register(r,i){return r.add(this,i),this},refine(r,i){return this.check(gi(r,i))},superRefine(r,i){return this.check(hi(r,i))},overwrite(r){return this.check(Ze(r))},optional(){return su(this)},exactOptional(){return ai(this)},nullable(){return au(this)},nullish(){return su(au(this))},nonoptional(r){return ci(this,r)},array(){return ru(this)},or(r){return yr([this,r])},and(r){return ri(this,r)},transform(r){return wr(this,br(r))},default(r){return oi(this,r)},prefault(r){return li(this,r)},catch(r){return pi(this,r)},pipe(r){return wr(this,r)},readonly(){return mi(this)},describe(r){let i=this.clone();return Ne.add(i,{description:r}),i},meta(...r){if(r.length===0)return Ne.get(this);let i=this.clone();return Ne.add(i,r[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return Ne.get(e)?.description},configurable:!0}),e)),Nn=B("_ZodString",(e,t)=>{Uu.init(e,t),X.init(e,t),e._zod.processJSONSchema=(i,u,n)=>nh(e,i,u,n);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,eu(e,"_ZodString",{regex(...i){return this.check(Ku(...i))},includes(...i){return this.check(Yu(...i))},startsWith(...i){return this.check(Qu(...i))},endsWith(...i){return this.check(er(...i))},min(...i){return this.check(st(...i))},max(...i){return this.check(Xt(...i))},length(...i){return this.check(Yt(...i))},nonempty(...i){return this.check(st(1,...i))},lowercase(i){return this.check(Hu(i))},uppercase(i){return this.check(Xu(i))},trim(){return this.check(rr())},normalize(...i){return this.check(ur(...i))},toLowerCase(){return this.check(nr())},toUpperCase(){return this.check(ir())},slugify(){return this.check(sr())}})}),or=B("ZodString",(e,t)=>{Uu.init(e,t),Nn.init(e,t),e.email=r=>e.check(dn(On,r)),e.url=r=>e.check(Gu(dr,r)),e.jwt=r=>e.check(_n(Xn,r)),e.emoji=r=>e.check(gn(Rn,r)),e.guid=r=>e.check(Wu(lr,r)),e.uuid=r=>e.check(cn(qe,r)),e.uuidv4=r=>e.check(pn(qe,r)),e.uuidv6=r=>e.check(mn(qe,r)),e.uuidv7=r=>e.check(fn(qe,r)),e.nanoid=r=>e.check(hn(Tn,r)),e.guid=r=>e.check(Wu(lr,r)),e.cuid=r=>e.check(vn(Mn,r)),e.cuid2=r=>e.check(yn(Pn,r)),e.ulid=r=>e.check(En(Un,r)),e.base64=r=>e.check(xn(Gn,r)),e.base64url=r=>e.check(kn(Kn,r)),e.xid=r=>e.check(bn(Zn,r)),e.ksuid=r=>e.check(Dn(qn,r)),e.ipv4=r=>e.check(wn(Ln,r)),e.ipv6=r=>e.check(Bn(Jn,r)),e.cidrv4=r=>e.check($n(Vn,r)),e.cidrv6=r=>e.check(Cn(Wn,r)),e.e164=r=>e.check(An(Hn,r)),e.datetime=r=>e.check(zo(r)),e.date=r=>e.check(No(r)),e.time=r=>e.check(Ro(r)),e.duration=r=>e.check(Mo(r))});function tu(e){return Ua(or,e)}s(tu,"Tn"),o(tu,"string");var ae=B("ZodStringFormat",(e,t)=>{se.init(e,t),Nn.init(e,t)}),On=B("ZodEmail",(e,t)=>{x4.init(e,t),ae.init(e,t)});function Po(e){return dn(On,e)}s(Po,"hb"),o(Po,"email");var lr=B("ZodGUID",(e,t)=>{$4.init(e,t),ae.init(e,t)});function Uo(e){return Wu(lr,e)}s(Uo,"vb"),o(Uo,"guid");var qe=B("ZodUUID",(e,t)=>{C4.init(e,t),ae.init(e,t)});function Zo(e){return cn(qe,e)}s(Zo,"yb"),o(Zo,"uuid");function qo(e){return pn(qe,e)}s(qo,"bb"),o(qo,"uuidv4");function Lo(e){return mn(qe,e)}s(Lo,"wb"),o(Lo,"uuidv6");function Jo(e){return fn(qe,e)}s(Jo,"xb"),o(Jo,"uuidv7");var dr=B("ZodURL",(e,t)=>{k4.init(e,t),ae.init(e,t)});function Vo(e){return Gu(dr,e)}s(Vo,"$b"),o(Vo,"url");function Wo(e){return Gu(dr,{protocol:it.httpProtocol,hostname:it.domain,...Q.normalizeParams(e)})}s(Wo,"_b"),o(Wo,"httpUrl");var Rn=B("ZodEmoji",(e,t)=>{A4.init(e,t),ae.init(e,t)});function Go(e){return gn(Rn,e)}s(Go,"kb"),o(Go,"emoji");var Tn=B("ZodNanoID",(e,t)=>{_4.init(e,t),ae.init(e,t)});function Ko(e){return hn(Tn,e)}s(Ko,"Sb"),o(Ko,"nanoid");var Mn=B("ZodCUID",(e,t)=>{I4.init(e,t),ae.init(e,t)});function Ho(e){return vn(Mn,e)}s(Ho,"Ib"),o(Ho,"cuid");var Pn=B("ZodCUID2",(e,t)=>{S4.init(e,t),ae.init(e,t)});function Xo(e){return yn(Pn,e)}s(Xo,"Rb"),o(Xo,"cuid2");var Un=B("ZodULID",(e,t)=>{F4.init(e,t),ae.init(e,t)});function Yo(e){return En(Un,e)}s(Yo,"Tb"),o(Yo,"ulid");var Zn=B("ZodXID",(e,t)=>{z4.init(e,t),ae.init(e,t)});function Qo(e){return bn(Zn,e)}s(Qo,"Eb"),o(Qo,"xid");var qn=B("ZodKSUID",(e,t)=>{j4.init(e,t),ae.init(e,t)});function e0(e){return Dn(qn,e)}s(e0,"Ab"),o(e0,"ksuid");var Ln=B("ZodIPv4",(e,t)=>{M4.init(e,t),ae.init(e,t)});function t0(e){return wn(Ln,e)}s(t0,"zb"),o(t0,"ipv4");var u0=B("ZodMAC",(e,t)=>{U4.init(e,t),ae.init(e,t)});function r0(e){return qa(u0,e)}s(r0,"jb"),o(r0,"mac");var Jn=B("ZodIPv6",(e,t)=>{P4.init(e,t),ae.init(e,t)});function n0(e){return Bn(Jn,e)}s(n0,"Ob"),o(n0,"ipv6");var Vn=B("ZodCIDRv4",(e,t)=>{Z4.init(e,t),ae.init(e,t)});function i0(e){return $n(Vn,e)}s(i0,"Nb"),o(i0,"cidrv4");var Wn=B("ZodCIDRv6",(e,t)=>{q4.init(e,t),ae.init(e,t)});function s0(e){return Cn(Wn,e)}s(s0,"Pb"),o(s0,"cidrv6");var Gn=B("ZodBase64",(e,t)=>{L4.init(e,t),ae.init(e,t)});function a0(e){return xn(Gn,e)}s(a0,"Db"),o(a0,"base64");var Kn=B("ZodBase64URL",(e,t)=>{J4.init(e,t),ae.init(e,t)});function o0(e){return kn(Kn,e)}s(o0,"Mb"),o(o0,"base64url");var Hn=B("ZodE164",(e,t)=>{V4.init(e,t),ae.init(e,t)});function l0(e){return An(Hn,e)}s(l0,"Cb"),o(l0,"e164");var Xn=B("ZodJWT",(e,t)=>{W4.init(e,t),ae.init(e,t)});function d0(e){return _n(Xn,e)}s(d0,"Ub"),o(d0,"jwt");var uu=B("ZodCustomStringFormat",(e,t)=>{G4.init(e,t),ae.init(e,t)});function c0(e,t,r={}){return Qt(uu,e,t,r)}s(c0,"Lb"),o(c0,"stringFormat");function p0(e){return Qt(uu,"hostname",it.hostname,e)}s(p0,"Fb"),o(p0,"hostname");function m0(e){return Qt(uu,"hex",it.hex,e)}s(m0,"Zb"),o(m0,"hex");function f0(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,u=it[i];if(!u)throw new Error(`Unrecognized hash format: ${i}`);return Qt(uu,i,u,t)}s(f0,"Bb"),o(f0,"hash");var cr=B("ZodNumber",(e,t)=>{da.init(e,t),X.init(e,t),e._zod.processJSONSchema=(i,u,n)=>ih(e,i,u,n),eu(e,"ZodNumber",{gt(i,u){return this.check(Xe(i,u))},gte(i,u){return this.check(we(i,u))},min(i,u){return this.check(we(i,u))},lt(i,u){return this.check(He(i,u))},lte(i,u){return this.check(Ie(i,u))},max(i,u){return this.check(Ie(i,u))},int(i){return this.check(pr(i))},safe(i){return this.check(pr(i))},positive(i){return this.check(Xe(0,i))},nonnegative(i){return this.check(we(0,i))},negative(i){return this.check(He(0,i))},nonpositive(i){return this.check(Ie(0,i))},multipleOf(i,u){return this.check($t(i,u))},step(i,u){return this.check($t(i,u))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Yn(e){return Ga(cr,e)}s(Yn,"jp"),o(Yn,"number");var _t=B("ZodNumberFormat",(e,t)=>{K4.init(e,t),cr.init(e,t)});function pr(e){return Ha(_t,e)}s(pr,"Mi"),o(pr,"int");function g0(e){return Xa(_t,e)}s(g0,"qb"),o(g0,"float32");function h0(e){return Ya(_t,e)}s(h0,"Vb"),o(h0,"float64");function v0(e){return Qa(_t,e)}s(v0,"Gb"),o(v0,"int32");function y0(e){return eo(_t,e)}s(y0,"Jb"),o(y0,"uint32");var mr=B("ZodBoolean",(e,t)=>{ca.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>sh(e,r,i,u)});function Qn(e){return to(mr,e)}s(Qn,"Op"),o(Qn,"boolean");var fr=B("ZodBigInt",(e,t)=>{pa.init(e,t),X.init(e,t),e._zod.processJSONSchema=(i,u,n)=>ah(e,i,u,n),e.gte=(i,u)=>e.check(we(i,u)),e.min=(i,u)=>e.check(we(i,u)),e.gt=(i,u)=>e.check(Xe(i,u)),e.gte=(i,u)=>e.check(we(i,u)),e.min=(i,u)=>e.check(we(i,u)),e.lt=(i,u)=>e.check(He(i,u)),e.lte=(i,u)=>e.check(Ie(i,u)),e.max=(i,u)=>e.check(Ie(i,u)),e.positive=i=>e.check(Xe(BigInt(0),i)),e.negative=i=>e.check(He(BigInt(0),i)),e.nonpositive=i=>e.check(Ie(BigInt(0),i)),e.nonnegative=i=>e.check(we(BigInt(0),i)),e.multipleOf=(i,u)=>e.check($t(i,u));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function E0(e){return ro(fr,e)}s(E0,"Kb"),o(E0,"bigint");var ei=B("ZodBigIntFormat",(e,t)=>{H4.init(e,t),fr.init(e,t)});function b0(e){return io(ei,e)}s(b0,"Wb"),o(b0,"int64");function D0(e){return so(ei,e)}s(D0,"Xb"),o(D0,"uint64");var w0=B("ZodSymbol",(e,t)=>{X4.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>oh(e,r,i,u)});function B0(e){return ao(w0,e)}s(B0,"Hb"),o(B0,"symbol");var $0=B("ZodUndefined",(e,t)=>{Y4.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>dh(e,r,i,u)});function C0(e){return oo($0,e)}s(C0,"Yb"),o(C0,"_undefined");var x0=B("ZodNull",(e,t)=>{Q4.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>lh(e,r,i,u)});function ti(e){return lo(x0,e)}s(ti,"Mp"),o(ti,"_null");var k0=B("ZodAny",(e,t)=>{ef.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>mh(e,r,i,u)});function A0(){return co(k0)}s(A0,"Qb"),o(A0,"any");var _0=B("ZodUnknown",(e,t)=>{tf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>fh(e,r,i,u)});function at(){return po(_0)}s(at,"Ft"),o(at,"unknown");var I0=B("ZodNever",(e,t)=>{uf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ph(e,r,i,u)});function gr(e){return mo(I0,e)}s(gr,"ns"),o(gr,"never");var S0=B("ZodVoid",(e,t)=>{rf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ch(e,r,i,u)});function F0(e){return fo(S0,e)}s(F0,"ew"),o(F0,"_void");var ui=B("ZodDate",(e,t)=>{nf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(i,u,n)=>gh(e,i,u,n),e.min=(i,u)=>e.check(we(i,u)),e.max=(i,u)=>e.check(Ie(i,u));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function z0(e){return go(ui,e)}s(z0,"tw"),o(z0,"date");var j0=B("ZodArray",(e,t)=>{sf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>kh(e,r,i,u),e.element=t.element,eu(e,"ZodArray",{min(r,i){return this.check(st(r,i))},nonempty(r){return this.check(st(1,r))},max(r,i){return this.check(Xt(r,i))},length(r,i){return this.check(Yt(r,i))},unwrap(){return this.element}})});function ru(e,t){return yo(j0,e,t)}s(ru,"Pn"),o(ru,"array");function N0(e){let t=e._zod.def.shape;return Er(Object.keys(t))}s(N0,"rw"),o(N0,"keyof");var hr=B("ZodObject",(e,t)=>{of.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ah(e,r,i,u),Q.defineLazy(e,"shape",()=>t.shape),eu(e,"ZodObject",{keyof(){return Er(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:at()})},loose(){return this.clone({...this._zod.def,catchall:at()})},strict(){return this.clone({...this._zod.def,catchall:gr()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Q.extend(this,r)},safeExtend(r){return Q.safeExtend(this,r)},merge(r){return Q.merge(this,r)},pick(r){return Q.pick(this,r)},omit(r){return Q.omit(this,r)},partial(...r){return Q.partial(si,this,r[0])},required(...r){return Q.required(di,this,r[0])}})});function O0(e,t){let r={type:"object",shape:e??{},...Q.normalizeParams(t)};return new hr(r)}s(O0,"nw"),o(O0,"object");function R0(e,t){return new hr({type:"object",shape:e,catchall:gr(),...Q.normalizeParams(t)})}s(R0,"ow"),o(R0,"strictObject");function T0(e,t){return new hr({type:"object",shape:e,catchall:at(),...Q.normalizeParams(t)})}s(T0,"iw"),o(T0,"looseObject");var vr=B("ZodUnion",(e,t)=>{an.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ko(e,r,i,u),e.options=t.options});function yr(e,t){return new vr({type:"union",options:e,...Q.normalizeParams(t)})}s(yr,"os"),o(yr,"union");var M0=B("ZodXor",(e,t)=>{vr.init(e,t),lf.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ko(e,r,i,u),e.options=t.options});function P0(e,t){return new M0({type:"union",options:e,inclusive:!1,...Q.normalizeParams(t)})}s(P0,"sw"),o(P0,"xor");var U0=B("ZodDiscriminatedUnion",(e,t)=>{vr.init(e,t),df.init(e,t)});function Z0(e,t,r){return new U0({type:"union",options:t,discriminator:e,...Q.normalizeParams(r)})}s(Z0,"aw"),o(Z0,"discriminatedUnion");var q0=B("ZodIntersection",(e,t)=>{cf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>_h(e,r,i,u)});function ri(e,t){return new q0({type:"intersection",left:e,right:t})}s(ri,"Gp"),o(ri,"intersection");var L0=B("ZodTuple",(e,t)=>{Ea.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ih(e,r,i,u),e.rest=r=>e.clone({...e._zod.def,rest:r})});function ni(e,t,r){let i=t instanceof K,u=i?r:t,n=i?t:null;return new L0({type:"tuple",items:e,rest:n,...Q.normalizeParams(u)})}s(ni,"Kp"),o(ni,"tuple");var nu=B("ZodRecord",(e,t)=>{pf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Sh(e,r,i,u),e.keyType=t.keyType,e.valueType=t.valueType});function ii(e,t,r){return!t||!t._zod?new nu({type:"record",keyType:tu(),valueType:e,...Q.normalizeParams(t)}):new nu({type:"record",keyType:e,valueType:t,...Q.normalizeParams(r)})}s(ii,"Wp"),o(ii,"record");function J0(e,t,r){let i=ke(e);return i._zod.values=void 0,new nu({type:"record",keyType:i,valueType:t,...Q.normalizeParams(r)})}s(J0,"cw"),o(J0,"partialRecord");function V0(e,t,r){return new nu({type:"record",keyType:e,valueType:t,mode:"loose",...Q.normalizeParams(r)})}s(V0,"uw"),o(V0,"looseRecord");var W0=B("ZodMap",(e,t)=>{mf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ch(e,r,i,u),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Ye(...r)),e.nonempty=r=>e.check(Ye(1,r)),e.max=(...r)=>e.check(Ct(...r)),e.size=(...r)=>e.check(Ht(...r))});function G0(e,t,r){return new W0({type:"map",keyType:e,valueType:t,...Q.normalizeParams(r)})}s(G0,"lw"),o(G0,"map");var K0=B("ZodSet",(e,t)=>{ff.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>xh(e,r,i,u),e.min=(...r)=>e.check(Ye(...r)),e.nonempty=r=>e.check(Ye(1,r)),e.max=(...r)=>e.check(Ct(...r)),e.size=(...r)=>e.check(Ht(...r))});function H0(e,t){return new K0({type:"set",valueType:e,...Q.normalizeParams(t)})}s(H0,"dw"),o(H0,"set");var iu=B("ZodEnum",(e,t)=>{gf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(i,u,n)=>hh(e,i,u,n),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(i,u)=>{let n={};for(let a of i)if(r.has(a))n[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new iu({...t,checks:[],...Q.normalizeParams(u),entries:n})},e.exclude=(i,u)=>{let n={...t.entries};for(let a of i)if(r.has(a))delete n[a];else throw new Error(`Key ${a} not found in enum`);return new iu({...t,checks:[],...Q.normalizeParams(u),entries:n})}});function Er(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new iu({type:"enum",entries:r,...Q.normalizeParams(t)})}s(Er,"is"),o(Er,"_enum");function X0(e,t){return new iu({type:"enum",entries:e,...Q.normalizeParams(t)})}s(X0,"pw"),o(X0,"nativeEnum");var Y0=B("ZodLiteral",(e,t)=>{hf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>vh(e,r,i,u),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Q0(e,t){return new Y0({type:"literal",values:Array.isArray(e)?e:[e],...Q.normalizeParams(t)})}s(Q0,"fw"),o(Q0,"literal");var el=B("ZodFile",(e,t)=>{vf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>bh(e,r,i,u),e.min=(r,i)=>e.check(Ye(r,i)),e.max=(r,i)=>e.check(Ct(r,i)),e.mime=(r,i)=>e.check(tr(Array.isArray(r)?r:[r],i))});function tl(e){return Eo(el,e)}s(tl,"mw"),o(tl,"file");var ul=B("ZodTransform",(e,t)=>{yf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>$h(e,r,i,u),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Qr(e.constructor.name);r.addIssue=n=>{if(typeof n=="string")r.issues.push(Q.issue(n,r.value,t));else{let a=n;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Q.issue(a))}};let u=t.transform(r.value,r);return u instanceof Promise?u.then(n=>(r.value=n,r.fallback=!0,r)):(r.value=u,r.fallback=!0,r)}});function br(e){return new ul({type:"transform",transform:e})}s(br,"ss"),o(br,"transform");var si=B("ZodOptional",(e,t)=>{xa.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ao(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function su(e){return new si({type:"optional",innerType:e})}s(su,"An"),o(su,"optional");var rl=B("ZodExactOptional",(e,t)=>{Ef.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ao(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function ai(e){return new rl({type:"optional",innerType:e})}s(ai,"rf"),o(ai,"exactOptional");var nl=B("ZodNullable",(e,t)=>{bf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Fh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function au(e){return new nl({type:"nullable",innerType:e})}s(au,"zn"),o(au,"nullable");function il(e){return su(au(e))}s(il,"gw"),o(il,"nullish");var sl=B("ZodDefault",(e,t)=>{Df.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>jh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function oi(e,t){return new sl({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Q.shallowClone(t)}})}s(oi,"sf"),o(oi,"_default");var al=B("ZodPrefault",(e,t)=>{wf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Nh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function li(e,t){return new al({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Q.shallowClone(t)}})}s(li,"cf"),o(li,"prefault");var di=B("ZodNonOptional",(e,t)=>{Bf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>zh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function ci(e,t){return new di({type:"nonoptional",innerType:e,...Q.normalizeParams(t)})}s(ci,"uf"),o(ci,"nonoptional");var ol=B("ZodSuccess",(e,t)=>{$f.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Dh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function ll(e){return new ol({type:"success",innerType:e})}s(ll,"hw"),o(ll,"success");var dl=B("ZodCatch",(e,t)=>{Cf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Oh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pi(e,t){return new dl({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}s(pi,"pf"),o(pi,"_catch");var cl=B("ZodNaN",(e,t)=>{xf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>yh(e,r,i,u)});function pl(e){return vo(cl,e)}s(pl,"vw"),o(pl,"nan");var Dr=B("ZodPipe",(e,t)=>{_a.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Rh(e,r,i,u),e.in=t.in,e.out=t.out});function wr(e,t){return new Dr({type:"pipe",in:e,out:t})}s(wr,"Ci"),o(wr,"pipe");var Br=B("ZodCodec",(e,t)=>{Dr.init(e,t),Ia.init(e,t)});function ml(e,t,r){return new Br({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}s(ml,"yw"),o(ml,"codec");function fl(e){let t=e._zod.def;return new Br({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}s(fl,"bw"),o(fl,"invertCodec");var gl=B("ZodPreprocess",(e,t)=>{Dr.init(e,t),kf.init(e,t)}),hl=B("ZodReadonly",(e,t)=>{Af.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Th(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function mi(e){return new hl({type:"readonly",innerType:e})}s(mi,"hf"),o(mi,"readonly");var vl=B("ZodTemplateLiteral",(e,t)=>{_f.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Eh(e,r,i,u)});function yl(e,t){return new vl({type:"template_literal",parts:e,...Q.normalizeParams(t)})}s(yl,"ww"),o(yl,"templateLiteral");var El=B("ZodLazy",(e,t)=>{Ff.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ph(e,r,i,u),e.unwrap=()=>e._zod.def.getter()});function fi(e){return new El({type:"lazy",getter:e})}s(fi,"bf"),o(fi,"lazy");var bl=B("ZodPromise",(e,t)=>{Sf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Mh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function Dl(e){return new bl({type:"promise",innerType:e})}s(Dl,"xw"),o(Dl,"promise");var wl=B("ZodFunction",(e,t)=>{If.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Bh(e,r,i,u)});function $r(e){return new wl({type:"function",input:Array.isArray(e?.input)?ni(e?.input):e?.input??ru(at()),output:e?.output??at()})}s($r,"$w"),o($r,"_function");var Cr=B("ZodCustom",(e,t)=>{zf.init(e,t),X.init(e,t),e._zod.processJSONSchema=(r,i,u)=>wh(e,r,i,u)});function Bl(e){let t=new oe({check:"custom"});return t._zod.check=e,t}s(Bl,"_w"),o(Bl,"check");function $l(e,t){return bo(Cr,e??(()=>!0),t)}s($l,"kw"),o($l,"custom");function gi(e,t={}){return Do(Cr,e,t)}s(gi,"$f"),o(gi,"refine");function hi(e,t){return wo(e,t)}s(hi,"_f"),o(hi,"superRefine");var rv=$o,nv=Co;function Cl(e,t={}){let r=new Cr({type:"custom",check:"custom",fn:o(i=>i instanceof e,"fn"),abort:!0,...Q.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}s(Cl,"Rw"),o(Cl,"_instanceof");var iv=o((...e)=>xo({Codec:Br,Boolean:mr,String:or},...e),"stringbool");function xl(e){let t=fi(()=>yr([tu(e),Yn(),Qn(),ti(),ru(t),ii(tu(),t)]));return t}s(xl,"Ew"),o(xl,"json");function kl(e,t){return new gl({type:"pipe",in:br(e),out:t})}s(kl,"Aw"),o(kl,"preprocess");var L5={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function sv(e){he({customError:e})}s(sv,"cI"),o(sv,"setErrorMap");function av(){return he().customError}s(av,"uI"),o(av,"getErrorMap");var Al;Al||(Al={});var Z={...Uh,...Zh,iso:So},J5=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function ov(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}s(ov,"dI"),o(ov,"detectVersion");function lv(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let u=r[1];if(!u||!t.defs[u])throw new Error(`Reference not found: ${e}`);return t.defs[u]}throw new Error(`Reference not found: ${e}`)}s(lv,"pI"),o(lv,"resolveRef");function _l(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Z.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let u=e.$ref;if(t.refs.has(u))return t.refs.get(u);if(t.processing.has(u))return Z.lazy(()=>{if(!t.refs.has(u))throw new Error(`Circular reference not resolved: ${u}`);return t.refs.get(u)});t.processing.add(u);let n=lv(u,t),a=ye(n,t);return t.refs.set(u,a),t.processing.delete(u),a}if(e.enum!==void 0){let u=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&u.length===1&&u[0]===null)return Z.null();if(u.length===0)return Z.never();if(u.length===1)return Z.literal(u[0]);if(u.every(a=>typeof a=="string"))return Z.enum(u);let n=u.map(a=>Z.literal(a));return n.length<2?n[0]:Z.union([n[0],n[1],...n.slice(2)])}if(e.const!==void 0)return Z.literal(e.const);let r=e.type;if(Array.isArray(r)){let u=r.map(n=>{let a={...e,type:n};return _l(a,t)});return u.length===0?Z.never():u.length===1?u[0]:Z.union(u)}if(!r)return Z.any();let i;switch(r){case"string":{let u=Z.string();if(e.format){let n=e.format;n==="email"?u=u.check(Z.email()):n==="uri"||n==="uri-reference"?u=u.check(Z.url()):n==="uuid"||n==="guid"?u=u.check(Z.uuid()):n==="date-time"?u=u.check(Z.iso.datetime()):n==="date"?u=u.check(Z.iso.date()):n==="time"?u=u.check(Z.iso.time()):n==="duration"?u=u.check(Z.iso.duration()):n==="ipv4"?u=u.check(Z.ipv4()):n==="ipv6"?u=u.check(Z.ipv6()):n==="mac"?u=u.check(Z.mac()):n==="cidr"?u=u.check(Z.cidrv4()):n==="cidr-v6"?u=u.check(Z.cidrv6()):n==="base64"?u=u.check(Z.base64()):n==="base64url"?u=u.check(Z.base64url()):n==="e164"?u=u.check(Z.e164()):n==="jwt"?u=u.check(Z.jwt()):n==="emoji"?u=u.check(Z.emoji()):n==="nanoid"?u=u.check(Z.nanoid()):n==="cuid"?u=u.check(Z.cuid()):n==="cuid2"?u=u.check(Z.cuid2()):n==="ulid"?u=u.check(Z.ulid()):n==="xid"?u=u.check(Z.xid()):n==="ksuid"&&(u=u.check(Z.ksuid()))}typeof e.minLength=="number"&&(u=u.min(e.minLength)),typeof e.maxLength=="number"&&(u=u.max(e.maxLength)),e.pattern&&(u=u.regex(new RegExp(e.pattern))),i=u;break}case"number":case"integer":{let u=r==="integer"?Z.number().int():Z.number();typeof e.minimum=="number"&&(u=u.min(e.minimum)),typeof e.maximum=="number"&&(u=u.max(e.maximum)),typeof e.exclusiveMinimum=="number"?u=u.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(u=u.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?u=u.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(u=u.lt(e.maximum)),typeof e.multipleOf=="number"&&(u=u.multipleOf(e.multipleOf)),i=u;break}case"boolean":{i=Z.boolean();break}case"null":{i=Z.null();break}case"object":{let u={},n=e.properties||{},a=new Set(e.required||[]);for(let[d,p]of Object.entries(n)){let c=ye(p,t);u[d]=a.has(d)?c:c.optional()}if(e.propertyNames){let d=ye(e.propertyNames,t),p=e.additionalProperties&&typeof e.additionalProperties=="object"?ye(e.additionalProperties,t):Z.any();if(Object.keys(u).length===0){i=Z.record(d,p);break}let c=Z.object(u).passthrough(),f=Z.looseRecord(d,p);i=Z.intersection(c,f);break}if(e.patternProperties){let d=e.patternProperties,p=Object.keys(d),c=[];for(let g of p){let m=ye(d[g],t),h=Z.string().regex(new RegExp(g));c.push(Z.looseRecord(h,m))}let f=[];if(Object.keys(u).length>0&&f.push(Z.object(u).passthrough()),f.push(...c),f.length===0)i=Z.object({}).passthrough();else if(f.length===1)i=f[0];else{let g=Z.intersection(f[0],f[1]);for(let m=2;m<f.length;m++)g=Z.intersection(g,f[m]);i=g}break}let l=Z.object(u);e.additionalProperties===!1?i=l.strict():typeof e.additionalProperties=="object"?i=l.catchall(ye(e.additionalProperties,t)):i=l.passthrough();break}case"array":{let u=e.prefixItems,n=e.items;if(u&&Array.isArray(u)){let a=u.map(d=>ye(d,t)),l=n&&typeof n=="object"&&!Array.isArray(n)?ye(n,t):void 0;l?i=Z.tuple(a).rest(l):i=Z.tuple(a),typeof e.minItems=="number"&&(i=i.check(Z.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(Z.maxLength(e.maxItems)))}else if(Array.isArray(n)){let a=n.map(d=>ye(d,t)),l=e.additionalItems&&typeof e.additionalItems=="object"?ye(e.additionalItems,t):void 0;l?i=Z.tuple(a).rest(l):i=Z.tuple(a),typeof e.minItems=="number"&&(i=i.check(Z.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(Z.maxLength(e.maxItems)))}else if(n!==void 0){let a=ye(n,t),l=Z.array(a);typeof e.minItems=="number"&&(l=l.min(e.minItems)),typeof e.maxItems=="number"&&(l=l.max(e.maxItems)),i=l}else i=Z.array(Z.any());break}default:throw new Error(`Unsupported type: ${r}`)}return i}s(_l,"zw"),o(_l,"convertBaseSchema");function ye(e,t){if(typeof e=="boolean")return e?Z.any():Z.never();let r=_l(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let l=e.anyOf.map(p=>ye(p,t)),d=Z.union(l);r=i?Z.intersection(r,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let l=e.oneOf.map(p=>ye(p,t)),d=Z.xor(l);r=i?Z.intersection(r,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:Z.any();else{let l=i?r:ye(e.allOf[0],t),d=i?0:1;for(let p=d;p<e.allOf.length;p++)l=Z.intersection(l,ye(e.allOf[p],t));r=l}e.nullable===!0&&t.version==="openapi-3.0"&&(r=Z.nullable(r)),e.readOnly===!0&&(r=Z.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let u={},n=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let l of n)l in e&&(u[l]=e[l]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let l of a)l in e&&(u[l]=e[l]);for(let l of Object.keys(e))J5.has(l)||(u[l]=e[l]);return Object.keys(u).length>0&&t.registry.add(r,u),e.description&&(r=r.describe(e.description)),r}s(ye,"xe"),o(ye,"convertSchema");function dv(e,t){if(typeof e=="boolean")return e?Z.any():Z.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=ov(r,t?.defaultTarget),u=r.$defs||r.definitions||{},n={version:i,defs:u,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??Ne};return ye(r,n)}s(dv,"jw"),o(dv,"fromJSONSchema");var cv={};Ge(cv,{bigint:s(()=>gv,"bigint"),boolean:s(()=>fv,"boolean"),date:s(()=>hv,"date"),number:s(()=>mv,"number"),string:s(()=>pv,"string")});function pv(e){return Za(or,e)}s(pv,"fI"),o(pv,"string");function mv(e){return Ka(cr,e)}s(mv,"mI"),o(mv,"number");function fv(e){return uo(mr,e)}s(fv,"gI"),o(fv,"boolean");function gv(e){return no(fr,e)}s(gv,"hI"),o(gv,"bigint");function hv(e){return ho(ui,e)}s(hv,"vI"),o(hv,"date"),he(Na());var Il=v.object({file:v.string(),line:v.number().int().nonnegative().optional(),column:v.number().int().nonnegative().optional(),symbol:v.string().optional(),componentName:v.string().optional(),hookName:v.string().optional()}),V5=v.enum(["user-click","user-input","keyboard","route-load","effect","memo-recompute","timer","raf","idle-callback","websocket-message","broadcast-channel","post-message","storage-event","service-worker-message","media-query-change","visibility-change","resize","intersection-observer","mutation-observer","backend-response","hmr-update","ai-turn","page-load","form-submit","input-change"]),vv=v.object({sessionId:v.string(),browserContextId:v.string().optional(),tabId:v.string().optional(),frameId:v.string().optional(),route:v.string().optional(),url:v.string().optional(),flowId:v.string().optional(),originType:V5.optional(),originNodeId:v.string().optional(),causedByNodeId:v.string().optional(),requestId:v.string().optional(),parentRequestId:v.string().optional(),traceparent:v.string().optional(),projectName:v.string().optional(),userActionId:v.string().optional(),userIdHash:v.string().optional(),tenantIdHash:v.string().optional()}),W5=v.enum(["nx","vite","typescript","eslint","rollup","client-runtime","chrome","react","valtio","nestjs","nextjs","db","redis","queue","memory","visual","perf","security","gateway","external","ai"]),G5=v.enum(["build","lint","typecheck","test","runtime","render","visual","trace","state","network","backend","db","memory","performance","security","deps","cluster","ai"]),Sl=v.enum(["debug","info","warning","error","fatal"]),c7=v.object({id:v.string(),sessionId:v.string(),timestamp:v.number().int().nonnegative(),source:W5,category:G5,severity:Sl,context:vv,fingerprint:v.string(),title:v.string(),message:v.string().optional(),location:Il.optional(),relatedFiles:v.array(v.string()).optional(),relatedUrls:v.array(v.string()).optional(),raw:v.unknown().optional()}),K5=v.enum(["session","browser-context","tab","renderer","router","route","page","component","element","slot","render","react-mount","react-unmount","hook","effect","effect-run","memo","memo-compute","ui-event","handler","animation","animation-frame","transition","timer","api-client-call","http-request","http-response","server-process","nest-app","nest-module","nest-provider","singleton-instance","server-request","guard","controller","service-method","loop","loop-iteration","queue-job","db-query","redis-op","promise","promise-continuation","state-store","state-update","selector","selector-update","visual-frame","visual-violation","style-change","layout-change","memory-owner","memory-mutation","memory-retention","heap-snapshot","build-event","lint-event","typecheck-event","test-event","bundle-report","hmr-update"]),H5=v.enum(["created","active","completed","disposed","errored"]),p7=v.object({id:v.string(),parentTraceNodeId:v.string().optional(),type:K5,logicalId:v.string().optional(),instanceId:v.string().optional(),generation:v.number().int().nonnegative().optional(),lifecycle:H5,context:vv,name:v.string(),startTime:v.number().int().nonnegative(),endTime:v.number().int().nonnegative().optional(),durationMs:v.number().nonnegative().optional(),location:Il.optional(),attributes:v.record(v.string(),v.unknown())}),X5=v.enum(["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"]),m7=v.object({id:v.string(),from:v.string(),to:v.string(),axis:X5,type:v.string(),timestamp:v.number().int().nonnegative(),attributes:v.record(v.string(),v.unknown()).optional()}),Y5=v.enum(["mount","update"]),Q5=v.discriminatedUnion("type",[v.object({type:v.literal("props"),changedKeys:v.array(v.string())}),v.object({type:v.literal("react-state"),hookIndex:v.number().int()}),v.object({type:v.literal("context"),contextName:v.string()}),v.object({type:v.literal("valtio-path"),path:v.string(),changedKeys:v.array(v.string())}),v.object({type:v.literal("parent-render"),parentRenderId:v.string()}),v.object({type:v.literal("hook-dep-changed"),hookInstanceId:v.string(),depsHashBefore:v.string(),depsHashAfter:v.string()}),v.object({type:v.literal("force"),reason:v.string()})]),f7=v.object({phase:Y5,actualDurationMs:v.number().nonnegative(),baseDurationMs:v.number().nonnegative(),startTime:v.number().nonnegative(),commitTime:v.number().nonnegative(),why:v.array(Q5)}),g7=v.object({hookInstanceId:v.string(),depsHash:v.string(),prevDepsHash:v.string().optional(),durationMs:v.number().nonnegative(),cleanupRan:v.boolean().optional()}),h7=v.object({storeId:v.string(),path:v.string(),changedKeys:v.array(v.string()),beforeHash:v.string(),afterHash:v.string(),preview:v.unknown().optional()}),v7=v.object({method:v.string(),route:v.string(),status:v.number().int().optional(),durationMs:v.number().nonnegative().optional(),traceparent:v.string().optional()}),eb=v.enum(["N+1","sequential-await","growing-allocation"]),y7=v.object({iterations:v.number().int().nonnegative(),durationMs:v.number().nonnegative(),dbCallsInsideLoop:v.number().int().nonnegative(),redisCallsInsideLoop:v.number().int().nonnegative(),awaitedOperationsInsideLoop:v.number().int().nonnegative(),slowestIterations:v.array(v.object({index:v.number().int().nonnegative(),durationMs:v.number().nonnegative(),childNodeIds:v.array(v.string())})).optional(),patterns:v.array(eb).optional()}),tb=v.enum(["Map","Set","Array","EventEmitter","Queue","RxSubject","Timer","Interval","Custom"]),E7=v.object({ownerInstanceId:v.string(),containerKind:tb,fieldName:v.string(),itemCount:v.number().int().nonnegative(),estimatedBytes:v.number().nonnegative(),retainedBytes:v.number().nonnegative().optional(),growthSinceStart:v.number()}),ub=v.enum(["set","push","add","delete","clear","subscribe","listen","schedule"]),b7=v.object({ownerNodeId:v.string(),operation:ub,beforeCount:v.number().int().nonnegative(),afterCount:v.number().int().nonnegative(),estimatedDeltaBytes:v.number(),keyPreview:v.string().optional(),valueType:v.string().optional()}),yv=v.object({x:v.number(),y:v.number(),width:v.number().nonnegative(),height:v.number().nonnegative()}),rb=v.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]),nb=v.enum(["computed-style","layout","paint-order"]),D7=v.object({causedBy:rb,viewport:yv,layoutSnapshotId:v.string(),styleSnapshotId:v.string(),screenshotId:v.string().optional(),changedNodes:v.array(v.object({uid:v.string(),component:v.string().optional(),change:nb,property:v.string().optional(),before:v.unknown().optional(),after:v.unknown().optional()}))}),ib=v.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]),sb=v.enum(["always","after-animation","stable-only","during-animation"]),ab=v.enum(["info","warning","error"]),w7=v.object({ruleId:v.string(),ruleType:ib,severity:ab,timing:sb,element:v.object({uid:v.string(),component:v.string().optional(),rect:yv}),expected:v.record(v.string(),v.unknown()),actual:v.record(v.string(),v.unknown()),evidence:v.object({computedStyle:v.string().optional(),screenshotCrop:v.string().optional(),trace:v.string().optional(),cssCause:v.object({selector:v.string(),file:v.string().optional(),line:v.number().int().optional(),declaration:v.string().optional()}).optional()})}),ob=v.enum(["none","connected"]),lb=v.enum(["running","clean","failing","error"]),db=v.object({id:v.string(),tool:v.string(),project:v.string().optional(),firstReportedAt:v.number().int().nonnegative(),lastReportedAt:v.number().int().nonnegative(),lastRunStatus:lb,lastRunDurationMs:v.number().int().nonnegative().optional(),errorCount:v.number().int().nonnegative(),warningCount:v.number().int().nonnegative().optional(),error:v.string().optional()}),vi=v.object({producer:ob,producers:v.array(db),lastReportedAt:v.number().int().nonnegative().optional(),ageMs:v.number().int().nonnegative().optional(),stale:v.boolean(),detail:v.string()}),Ev=10*6e4;function yi(e){let t=e.now??Date.now(),r=[...e.producers].sort((p,c)=>c.lastReportedAt-p.lastReportedAt);if(r.length===0)return{producer:"none",producers:[],stale:!1,detail:`No ${e.domain} producer has ever reported into this session \u2014 this is NOT a clean result, nothing is watching. ${e.noProducerHint}`};let i=r[0].lastReportedAt,u=Math.max(0,t-i),n=u>Ev,a=r.filter(p=>p.lastRunStatus==="failing"),l=r.filter(p=>p.lastRunStatus==="error"),d=[`${r.length} ${e.domain} producer${r.length===1?"":"s"} reporting (${r.map(p=>p.id).join(", ")}); newest report ${bv(u)}.`];return l.length>0&&d.push(`${l.length} produced NO verdict (the tool itself failed): ${l.map(p=>`${p.id} \u2014 ${p.error??"unknown error"}`).join("; ")}.`),a.length>0&&d.push(`${a.length} reporting errors.`),n&&d.push(`Older than ${Math.round(Ev/6e4)}m \u2014 the verdict may predate the current source.`),{producer:"connected",producers:r,lastReportedAt:i,ageMs:u,stale:n,detail:d.join(" ")}}s(yi,"Pr"),o(yi,"summariseProducers");function bv(e){return e<1e3?"just now":e<6e4?`${Math.round(e/1e3)}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:`${Math.round(e/36e5)}h ago`}s(bv,"MI"),o(bv,"describeAge");var ou=v.object({$schema:v.string().optional(),schemaVersion:v.literal(1),revision:v.number().int().nonnegative(),updatedAt:v.string().datetime().optional()}),cb=v.enum(["starting","clean","warning","failing"]),Dv=v.object({source:v.string(),severity:Sl,title:v.string(),fingerprint:v.string(),resource:v.string(),pageId:v.string().optional(),flowId:v.string().optional(),location:Il.optional()}),pb=v.object({typecheck:v.enum(["passed","failed","unknown"]).optional(),lint:v.enum(["passed","failed","unknown"]).optional(),build:v.enum(["passed","failed","unknown"]).optional(),runtime:v.enum(["passed","failed","warning","unknown"]).optional(),visual:v.enum(["passed","failed","warning","unknown"]).optional(),memory:v.enum(["passed","failed","warning","unknown"]).optional()}),mb=v.enum(["embedded","shared"]),fb=v.object({mode:mb,pid:v.number(),startedAt:v.string(),url:v.string().optional()}),B7=ou.extend({sessionId:v.string(),status:cb,activeTab:v.string().optional(),tabsWithIssues:v.array(v.string()).optional(),blocking:v.array(Dv),warnings:v.array(Dv).default([]),suggestedReads:v.array(v.string()),checks:pb.optional(),server:fb.optional()}),gb=v.object({eventsResident:v.number().int().nonnegative(),eventsResidentBytes:v.number().int().nonnegative(),eventsIngested:v.number().int().nonnegative(),eventsDropped:v.number().int().nonnegative(),eventsDroppedForBytes:v.number().int().nonnegative().optional(),eventCap:v.number().int().nonnegative().optional(),eventByteCap:v.number().int().nonnegative().optional(),artifactsResident:v.number().int().nonnegative().optional(),artifactsResidentBytes:v.number().int().nonnegative().optional(),artifactsDropped:v.number().int().nonnegative().optional(),artifactByteCap:v.number().int().nonnegative().optional(),truncatedEvents:v.number().int().nonnegative().optional(),truncatedBytesReclaimed:v.number().int().nonnegative().optional(),rawByteLimit:v.number().int().nonnegative().optional(),reducers:v.record(v.string(),v.object({residentEvents:v.number().int().nonnegative(),residentBytes:v.number().int().nonnegative(),evictedEvents:v.number().int().nonnegative(),evictedForBytes:v.number().int().nonnegative(),eventCap:v.number().int().nonnegative(),byteCap:v.number().int().nonnegative()})).optional()}),$7=ou.extend({sessionId:v.string(),supportedResources:v.array(v.string()),supportedTools:v.array(v.string()),supportedJobs:v.array(v.string()),supportedChannels:v.array(v.string()),subscribedByDefault:v.array(v.string()),transports:v.array(v.enum(["stdio","http","socket"])),host:v.object({platform:v.string(),node:v.string()}),project:v.object({name:v.string(),nxVersion:v.string().optional()}),storage:gb.optional()}),hb=v.object({id:v.string(),timestamp:v.number().int().nonnegative(),message:v.string(),fingerprint:v.string(),code:v.string().optional(),rule:v.string().optional(),severity:Sl.optional(),file:v.string().optional(),line:v.number().int().nonnegative().optional(),column:v.number().int().nonnegative().optional(),project:v.string().optional()}),C7=ou.merge(vi).extend({status:v.enum(["unknown","clean","failing"]),errorCount:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),x7=ou.merge(vi).extend({errors:v.array(hb)}),k7=ou.merge(vi).extend({status:v.enum(["unknown","clean","warning","failing"]),errorCount:v.number().int().nonnegative(),warningCount:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),A7=ou.merge(vi).extend({status:v.enum(["unknown","clean","warning","failing"]),hmrUpdates:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),Fl=Symbol.for("@lensmcp/session/Session"),zl=Symbol.for("@lensmcp/core/EventBus"),vb=Symbol.for("@lensmcp/core/GraphStore"),q=Symbol.for("@lensmcp/core/ResourceStore"),yb=Symbol.for("@lensmcp/storage/Storage"),Eb="capture-request.json",bb="capture-runner.json",wv="__lensmcpTruncation",Db="__lensmcpTruncated";function Le(e,t=Number.POSITIVE_INFINITY,r=12){return It(e,t,r,32)}s(Le,"Ze"),o(Le,"estimateJsonBytes");function jl(e,t,r=12){return It(e,t,r,Number.POSITIVE_INFINITY)>t}s(jl,"ps"),o(jl,"exceedsJsonByteBudget");function It(e,t,r,i){switch(typeof e){case"undefined":case"function":case"symbol":return 0;case"boolean":return 5;case"number":return Number.isFinite(e)?8:4;case"bigint":return 20;case"string":return e.length+2;default:break}if(e===null)return 4;if(r<=0)return i;if(e instanceof Date)return 26;if(Array.isArray(e)){let a=2;for(let l=0;l<e.length;l++)if(a+=It(e[l],t-a,r-1,i)+1,a>t)return a;return a}let u=2,n=e;for(let a in n){if(!Object.prototype.hasOwnProperty.call(n,a))continue;let l=It(n[a],t-u,r-1,i);if(l!==0&&(u+=a.length+4+l,u>t))return u}return u}s(It,"Ur"),o(It,"walk");function Ei(e,t){e.truncatedAnything=!0,e.paths.length<20&&e.paths.push(t||"<root>")}s(Ei,"If"),o(Ei,"record");function Bv(e,t,r){return Ei(e,r),{[Db]:!0,originalBytes:Le(t,Number.POSITIVE_INFINITY,64)}}s(Bv,"qI"),o(Bv,"stub");function $v(e){if(e===null)return!0;let t=typeof e;return t==="number"||t==="boolean"||t==="string"||t==="bigint"}s($v,"VI"),o($v,"isScalar");function lu(e,t,r,i){if(typeof e=="string"){let u=t.budget<=0?256:t.maxStringBytes;if(e.length+2<=u)return t.budget-=e.length+2,e;let n=Math.max(0,u-64);return Ei(t,i),t.budget-=n,`${e.slice(0,n)}\u2026[lensmcp truncated: ${e.length-n} more chars]`}return e===null||typeof e!="object"?(t.budget-=It(e,Number.POSITIVE_INFINITY,1,32),e):r<=0?Bv(t,e,i):e instanceof Date?(t.budget-=26,e):Array.isArray(e)?Cv(e,t,r,i):xv(e,t,r,i)}s(lu,"Lr"),o(lu,"clampValue");function Cv(e,t,r,i){let u=[],n=Math.min(e.length,t.maxArrayItems);for(let a=0;a<n&&!(t.budget<=0);a++)u.push(lu(e[a],t,r-1,`${i}[${a}]`));return u.length<e.length&&Ei(t,`${i}[] (+${e.length-u.length} items dropped)`),u}s(Cv,"GI"),o(Cv,"clampArray");function xv(e,t,r,i){let u={},n,a=t.budget<=0;for(let l in e){if(!Object.prototype.hasOwnProperty.call(e,l))continue;let d=e[l],p=It(d,512,r-1,Number.POSITIVE_INFINITY);if(p<=512&&(!a||$v(d))){u[l]=d,t.budget-=l.length+4+p;continue}(n??=[]).push({key:l,bytes:p})}if(!n)return u;n.sort((l,d)=>l.bytes===d.bytes?0:l.bytes<d.bytes?-1:1);for(let{key:l}of n){let d=i?`${i}.${l}`:l;u[l]=lu(e[l],t,r-1,d)}return u}s(xv,"JI"),o(xv,"clampObject");function kv(e,t={}){let r=t.rawByteLimit??32768,i=t.maxDepth??12;if(r<=0)return{value:void 0,truncated:!1,originalBytes:0,keptBytes:0,paths:[]};if(e==null)return{value:e,truncated:!1,originalBytes:0,keptBytes:0,paths:[]};if(!jl(e,r,i)){let d=Le(e,r,i),p={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1};return{value:lu(e,p,i,""),truncated:!1,originalBytes:d,keptBytes:d,paths:[]}}let u=Le(e,Number.POSITIVE_INFINITY,64),n={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1},a=lu(e,n,i,""),l=Le(a,Number.POSITIVE_INFINITY,i);if(n.truncatedAnything&&a!==null&&typeof a=="object"&&!Array.isArray(a)){let d={truncated:!0,originalBytes:u,keptBytes:l,paths:n.paths};a[wv]=d}return{value:a,truncated:n.truncatedAnything,originalBytes:u,keptBytes:l,paths:n.paths}}s(kv,"Rf"),o(kv,"boundedClone");function St(e,t){if(e.size<=t)return 0;let r=0,i=e.keys();for(;e.size>t;){let u=i.next();if(u.done)break;e.delete(u.value)&&(r+=1)}return r}s(St,"Ke"),o(St,"capMap");var xr=256;function Nl(e){let{source:t,category:r,title:i,kind:u}=e;return t==="ai"?"ai":u?.startsWith("memory")||u==="db-query"?"data":t==="gateway"||u==="gateway-request"?"gateway":u==="queue-process"||u==="queue-active"||u==="queue-completed"||u==="queue-failed"?"services":t==="db"||t==="redis"||t==="queue"||u==="redis-op"||u?.startsWith("queue-")?"data":t==="external"||u==="egress"?"network":t==="nestjs"||t==="nest"?/(?:Repository|Repo|Dao|Store)\./.test(i)?"data":"services":t==="valtio"?"state":r==="network"?"network":"browser"}s(Nl,"Ef"),o(Nl,"areaOf");var Av=240,wb=new Set(["systemPrompt","prompt","prompts","messages","completion","completions","input","output","draft","text","content","result","arguments","params"]),Bb=new Set(["tenantId","caller","userId","accountId","email","subject"]),$b=8;function _v(e){let t=bi(e,0);return kv(_u({redacted:!0,...t}),{rawByteLimit:16*1024}).value}s(_v,"HI"),o(_v,"aiProjection");function bi(e,t){if(typeof e=="string")return Iv(e);if(e===null||typeof e!="object")return e;if(t>=$b)return;if(Array.isArray(e))return e.slice(0,32).map(i=>bi(i,t+1));let r={};for(let[i,u]of Object.entries(e))if(!Bb.has(i)){if(wb.has(i)){typeof u=="string"?r[`${i}Chars`]=u.length:Array.isArray(u)?r[`${i}Count`]=u.length:u!=null&&(r[`${i}Present`]=!0);continue}r[i]=bi(u,t+1)}return r}s(bi,"Tf"),o(bi,"projectAi");function Iv(e){return e.length<=Av?tt(e):`${tt(e.slice(0,Av))}\u2026`}s(Iv,"YI"),o(Iv,"clipText");function Sv(e,t={}){let r=e.raw??{},i=r.render??{},u=r.span??{},n=r.request??{},a=o(b=>typeof b=="number"?b:void 0,"num"),l=r.loop??{},d=r.effect??{},p=a(r.durationMs)??a(u.durationMs)??a(n.durationMs)??a(l.durationMs)??a(i.actualDurationMs)??a(d.durationMs),c=typeof r.kind=="string"?r.kind:void 0,f=c==="fetch-done"||c==="fetch-error",g=a(i.commitTime),m=c==="render"&&g!==void 0&&Math.abs(g-e.timestamp)<6e4,h=f?e.timestamp:m?g:a(r.startedAt)??a(u.startTime)??a(n.startedAt)??a(l.startedAt)??(p!==void 0?e.timestamp-p:e.timestamp),E;if(typeof r.query=="string"){let b=Array.isArray(r.params)?` [${r.params.join(", ")}]`:"",w=typeof r.result=="string"?` \u2192 ${r.result}`:"";E=r.query+b+w}else if(typeof r.command=="string"){let b=typeof r.value=="string"?` \u2192 ${r.value}`:r.hit===!1?" \u2192 (miss)":"";E=r.command+b}else if(c==="state-update"){let b=r.update??{},w="";try{w=JSON.stringify(b.preview)}catch{}E=`${b.storeId??""}.${b.path??""} = ${w}`}else c==="queue-completed"&&typeof r.returned=="string"?E=`returned ${r.returned}`:c==="queue-enqueued"&&(E=`${r.job??"job"}#${r.jobId??"?"} \u2192 ${r.queue??""}${typeof r.data=="string"?" "+r.data:""}`);let D;if(c==="gateway-request")D=`${r.host??""}${String(r.url??"").split("?")[0]}`;else if(c==="fetch-start"||c==="fetch-done"||c==="fetch-error")try{let b=new URL(String(r.href??r.url??""));D=`${b.hostname}${b.pathname}`}catch{}let $;if(c==="gateway-request"&&Array.isArray(r.steps))$=r.steps.map(b=>{let w=[String(b.step)];return b.project&&w.push(String(b.project)),b.prefix&&w.push(String(b.prefix)),b.mode&&w.push(String(b.mode)+(b.ok===!1?" \u2717":b.ok===!0?" \u2713":"")),b.caller&&w.push("by "+String(b.caller)),b.pod&&w.push(String(b.pod)),typeof b.atMs=="number"&&w.push(`@${b.atMs}ms`),w.join(" ")}),E=$.map(b=>b.replace(/ @\d+ms$/,"")).join(" \u2192 ");else if(c==="egress")E=`${r.method??"GET"} ${r.host??""} \u2192 ${r.status??"?"}`;else if(e.source==="ai"){if(c==="ai-call"){let b=r.usage??{},w=b.promptTokens!==void 0||b.completionTokens!==void 0?` \xB7 ${a(b.promptTokens)??"?"}\u2192${a(b.completionTokens)??"?"} tok`:"",C=r.status!==void 0?` \xB7 ${String(r.status)}`:r.error?" \xB7 failed":"",N=a(r.toolCallCount)?` \xB7 ${a(r.toolCallCount)} tool call${a(r.toolCallCount)===1?"":"s"}`:"",O=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${r.provider??""}/${r.model??"?"}${w}${C}${N}${O}${r.stream===!0?" \xB7 stream":""}`}else if(c==="ai-round"){let b=r.model??{},w=r.usage??{},C=Array.isArray(r.toolCalls)?r.toolCalls:[],N=`${a(w.promptTokens)??"?"}\u2192${a(w.completionTokens)??"?"} tok`,O=C.length?` \xB7 ${C.length} tool call${C.length===1?"":"s"}`:"",te=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${b.provider??""}/${b.model??""} \xB7 ${N}${O}${te}`}else if(c==="ai-turn-start"){let b=Array.isArray(r.tools)?r.tools:[];E=`skill ${r.skill??""} \xB7 ${r.output??""}${b.length?" \xB7 tools: "+b.join(", "):""}`}else if(c==="ai-tool-call"){let b=r.call??{},w=r.result??{},C=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${b.name??"tool"} ${w.error!=null?"\u2717 "+String(w.error):"\u2713"}${C}`}else if(c==="ai-turn-end"){let b=r.usage??{},w=a(r.rounds)!==void 0?` \xB7 ${a(r.rounds)} round${a(r.rounds)===1?"":"s"}`:"",C=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${r.ok===!1?"FAILED":"ok"} \xB7 ${a(b.promptTokens)??"?"}+${a(b.completionTokens)??"?"} tok${w}${C}`}}let A;c==="db-query"&&typeof r.query=="string"?A=r.query:c==="redis-op"?A=`${r.op??""} ${String(r.key??"").replace(/\d+/g,"#")}`:c==="egress"?A=`${r.method??"GET"} ${r.host??""}`:c==="ai-call"?A=`ai ${r.provider??""} ${r.model??""} ${r.api??""}`:c==="queue-enqueued"?A=`enqueue ${r.queue??""}`:c==="span"&&typeof u.name=="string"?A=u.name:c==="memory-mutation"&&(A=e.title);let I=e.context??{},j=i.commitId??d.commitId??r.commitId,F=Array.isArray(i.why)?i.why.map(b=>typeof b?.type=="string"?b.type:void 0).filter(b=>!!b):[];return{id:e.id,t:e.timestamp,start:h,...A?{sig:A}:{},...D?{urlKey:D}:{},...typeof r.queue=="string"?{queue:r.queue}:{},...r.jobId!=null?{jobId:String(r.jobId)}:{},source:e.source,category:e.category,severity:e.severity,title:e.title,kind:c,area:Nl({source:e.source,category:e.category,title:e.title,kind:c}),...typeof u.role=="string"?{role:u.role}:{},...typeof I.requestId=="string"?{requestId:I.requestId}:{},...typeof I.parentRequestId=="string"?{parentRequestId:I.parentRequestId}:{},...typeof j=="string"?{commitId:j}:{},...typeof i.componentName=="string"?{component:i.componentName}:{},...typeof i.phase=="string"?{phase:i.phase}:{},...F.length?{why:F}:{},...c==="effect-run"&&typeof d.hookLogicalId=="string"?{hook:d.hookLogicalId}:{},...c==="effect-run"&&d.cleanupRan===!0?{cleanup:!0}:{},...c==="render-commit-truncated"?{renderTotal:a(r.total),renderPublished:a(r.published)}:{},...typeof I.projectName=="string"?{project:I.projectName}:typeof r.project=="string"?{project:r.project}:{},...p!==void 0?{durationMs:p}:{},...f&&a(r.startedAt)!==void 0?{fetchStartedAt:a(r.startedAt)}:{},...e.source==="ai"?{ai:t.includeRaw?r:_v(r)}:{},...E?{detail:E}:{},...$?{steps:$}:{}}}s(Sv,"QI"),o(Sv,"trimFlowEvent");var Fv=1;function zv(e){return e==="flow-origin"?0:e?.endsWith("-start")?1:e==="gateway-request"?2:e==="server-request"?3:e==="span"?4:e==="render"||e==="render-commit-truncated"?6:e==="effect-run"?7:5}s(zv,"e0"),o(zv,"kindRank");function du(e){return e.kind==="span"&&e.role==="controller"?3.5:e.kind==="queue-process"?3:zv(e.kind)}s(du,"Bn"),o(du,"causalRank");function Di(e,t={}){let r=e.slice().filter(y=>{let x=y.raw??{},k=typeof x.kind=="string"?x.kind:"";if(k==="subscription-added"||k==="subscription-removed"||k==="hook-run"||k==="store-created"||k==="singleton-instance")return!1;let _=x.span;return!(typeof _?.name=="string"&&_.name.startsWith("nest.request "))}).map(y=>Sv(y,t)),i=new Set;for(let y=r.length-1;y>=0;y--)i.has(r[y].id)?r.splice(y,1):i.add(r[y].id);let u=new Map;for(let y of r)(y.kind==="gateway-request"||y.kind==="queue-process")&&y.requestId&&!u.has(y.requestId)&&u.set(y.requestId,y.start);let n=o(y=>y.source!=="react"&&y.source!=="valtio"&&y.requestId&&u.has(y.requestId)?u.get(y.requestId):y.start,"anchorOf");r.sort((y,x)=>n(y)-n(x)||y.start-x.start||du(y)-du(x)||(x.durationMs??0)-(y.durationMs??0)||y.t-x.t);let a=o(y=>(y.kind==="span"||y.kind==="server-request"||y.kind==="gateway-request"||y.kind==="queue-process")&&(y.durationMs??0)>0,"spanLike"),l=r;for(let y of l)y.group=y.source==="react"||y.source==="valtio"||y.source==="client-runtime"||y.source==="visual"?"browser":"server";let d=new Map;for(let y of l)if((y.kind==="gateway-request"||y.kind==="queue-process")&&y.requestId&&y.project){let x=d.get(y.requestId)??[];x.push({project:y.project,start:y.start,end:y.start+(y.durationMs??0)}),d.set(y.requestId,x)}let p=o((y,x)=>{let k=d.get(y);if(k?.length)return k.every(_=>_.project===k[0].project)?k[0].project:k.filter(_=>_.start<=x+1&&_.end>=x-1).sort((_,U)=>U.start-_.start)[0]?.project},"projectOf");for(let y of l)if(!y.project&&y.source==="nestjs"&&y.requestId){let x=p(y.requestId,y.start);x&&(y.project=x)}for(let y of l){let x,k=y.requestId;for(let _ of l){if(_===y||!a(_)||_.group!==y.group||_.requestId!==k)continue;let U=_.project,W=y.project;if(_.kind!=="gateway-request"&&y.kind!=="gateway-request"&&U!==void 0&&W!==void 0&&U!==W)continue;let ee=_.durationMs??0,ue=y.durationMs??0,L=Math.abs(_.start-y.start)<=Fv,J=du(_),H=du(y),ie=_.start<=y.start;if(!(_.start+ee>y.start&&(ie||L&&J<H)&&(!L||(J!==H?J<H:ie&&ee>ue))))continue;let ge=x?du(x):-1,le=x?Math.abs(_.start-x.start)<=Fv:!1;(!x||!le&&_.start>x.start||le&&J>ge||le&&J===ge&&(_.durationMs??0)<(x.durationMs??0))&&(x=_)}x&&(y.parent=x.id)}let c=new Map;for(let y of l){if(!y.requestId)continue;let x=c.get(y.requestId);x?x.push(y):c.set(y.requestId,[y])}let f=new Map(l.map(y=>[y.id,y])),g=o((y,x)=>{let k=(c.get(y)??[]).filter(_=>a(_)&&_.start<=x&&_.start+(_.durationMs??0)>=x);if(k.length!==0)return k.sort((_,U)=>U.start-_.start||(_.durationMs??0)-(U.durationMs??0)),k[0]},"callerNodeFor");for(let y of l){if(!y.parentRequestId||y.kind!=="server-request"&&y.kind!=="gateway-request")continue;let x=y.parent?f.get(y.parent):void 0;if(x&&x.requestId===y.requestId)continue;let k=g(y.parentRequestId,y.start);k&&k!==y&&k.start<=y.start&&(y.parent=k.id)}let m=l,h=new Map;for(let y of m)y.kind==="gateway-request"&&y.requestId&&!h.has(y.requestId)&&h.set(y.requestId,y);for(let y of m)if(y.group==="server"&&!y.parent&&y.requestId&&y.kind!=="gateway-request"){let x=h.get(y.requestId);x&&x!==y&&x.start<=y.start&&(y.parent=x.id)}let E=new Set,D=new Set,$=[];for(let y of m){if(y.kind!=="gateway-request")continue;if(!y.requestId){$.push(y);continue}let x=c.get(y.requestId)??[];if(x.filter(U=>U.kind==="gateway-request").sort((U,W)=>U.start-W.start)[0]!==y)continue;let k=x.find(U=>U.kind==="fetch-start"),_=x.find(U=>U.kind==="fetch-done"||U.kind==="fetch-error");if(!k&&!_){$.push(y);continue}k&&(y.fetchStartId=k.id,E.add(k.id)),_&&(y.fetchDoneId=_.id,D.add(_.id))}let A=new Map;for(let y of m){if(!y.urlKey)continue;let x=A.get(y.urlKey)??{gws:[],starts:[],dones:[]};y.kind==="gateway-request"?$.includes(y)&&x.gws.push(y):y.kind==="fetch-start"?E.has(y.id)||x.starts.push(y):(y.kind==="fetch-done"||y.kind==="fetch-error")&&(D.has(y.id)||x.dones.push(y)),A.set(y.urlKey,x)}for(let{gws:y,starts:x,dones:k}of A.values()){y.sort((U,W)=>U.start-W.start),x.sort((U,W)=>U.start-W.start);let _=new Set;y.forEach((U,W)=>{let ee=x[W];ee&&(U.fetchStartId=ee.id);let ue=ee?ee.t:U.start,L,J=1/0;for(let H of k){if(_.has(H.id))continue;let ie=H.fetchStartedAt??H.start-(H.durationMs??0),ge=Math.abs(ie-ue);ge<J&&(J=ge,L=H)}L&&(U.fetchDoneId=L.id,_.add(L.id))})}let I=new Map,j=new Map;for(let y of m)!y.queue||!y.jobId||(y.kind==="queue-enqueued"&&I.set(`${y.queue}#${y.jobId}`,y),y.kind==="queue-process"&&j.set(`${y.queue}#${y.jobId}`,y));for(let y of m){if(!y.queue||!y.jobId)continue;let x=`${y.queue}#${y.jobId}`;if(y.kind==="queue-process"&&!y.parent){let k=I.get(x);k&&k!==y&&k.start<=y.start&&(y.parent=k.id)}else if(y.kind==="queue-active"||y.kind==="queue-completed"||y.kind==="queue-failed"){let k=j.get(x);k&&k!==y&&k.start<=y.start&&(y.parent=k.id)}}let F=l;{let y=new Map;for(let k of F)k.kind==="fetch-start"&&y.set(k.id,k);let x=new Map;for(let k of F){if(k.kind!=="fetch-done"&&k.kind!=="fetch-error")continue;let _=[...y.values()].find(ee=>ee.requestId&&ee.requestId===k.requestId)?.id,U=_?y.get(_):void 0;if(!U)continue;let W=k.fetchStartedAt??U.start;U.title=k.title,U.severity=k.severity,U.durationMs=k.durationMs??Math.max(0,k.t-W),U.kind="fetch",k.detail&&!U.detail&&(U.detail=k.detail),x.set(k.id,U.id)}if(x.size>0){F=F.filter(k=>!x.has(k.id));for(let k of F)for(k.fetchDoneId&&x.has(k.fetchDoneId)&&(k.fetchDoneId=x.get(k.fetchDoneId));k.parent&&x.has(k.parent);)k.parent=x.get(k.parent)}}let b=o(y=>!!y.commitId&&(y.kind==="render"||y.kind==="effect-run"||y.kind==="render-commit-truncated"),"commitMember"),w=o(y=>[...new Set(y)],"uniq"),C=o(y=>w(y.map(x=>x.component).filter(x=>!!x)),"named"),N=o(y=>y.length<=2?y.join(" + "):`${y[0]} + ${y.length-1} more`,"nameList"),O=o(y=>{let x=new Map;for(let k of y)k.component&&x.set(k.component,(x.get(k.component)??0)+1);return[...x].map(([k,_])=>_>1?`${k} \xD7${_}`:k).join(", ")},"tally"),te=o(y=>{if(!y)return"effect";let x=/([^/\\]+?):(\d+)(?::\d+)?$/.exec(y);return x?`${x[1]}:${x[2]}`:y},"shortHook"),ne=o(y=>`${te(y.hook)}${y.cleanup?" (cleanup)":""}`,"hookLabel"),ht=o(y=>{let x=Math.min(...y.map(_=>_.start)),k=Math.max(...y.map(_=>_.start+(_.durationMs??0)));return{start:x,durationMs:k-x}},"extent"),We=o(y=>(delete y.component,delete y.why,delete y.phase,delete y.hook,delete y.cleanup,delete y.renderTotal,delete y.renderPublished,y),"asGroup");function Me(y){let x=y[0],k=y.filter(me=>me.kind==="render"),_=y.filter(me=>me.kind==="effect-run"),U=y.find(me=>me.kind==="render-commit-truncated"),W=[...k].sort((me,Au)=>(Au.durationMs??0)-(me.durationMs??0)),ee=W.filter(me=>(me.why??[]).some(Au=>Au!=="parent-render")),ue=w(ee.flatMap(me=>(me.why??[]).filter(Au=>Au!=="parent-render"))),L=C(ee),J=k.filter(me=>me.phase==="mount"),H=k.filter(me=>me.phase!=="mount"&&!ee.includes(me)),ie=W[0]?.component??"view",ge=k.length>0&&J.length===k.length,le=ue.length?ue.join(" + "):void 0,Et=ge?"mount":"update",bt=L.length?`view update \xB7 ${N(L)} \u2190 ${le}`:ge?`view mount \xB7 ${ie}`:`view update \xB7 ${ie}`,Ip=U?.renderTotal??k.length,Zy=[J.length?`mounted ${O(J)}`:"",H.length?`re-rendered ${O(H)}`:"",!L.length&&!ge&&k.length?"trigger not recorded \u2014 every captured render came from its parent":"",U?`${Ip} renders, ${U.renderPublished??k.length} recorded (per-commit cap)`:`${k.length} render${k.length===1?"":"s"}`,_.length?`${_.length} effect${_.length===1?"":"s"}: ${_.map(ne).join(", ")}`:""].filter(Boolean).join(" \xB7 "),Sp=C(k);return We({...x,...ht(y),kind:"view-update",title:bt,detail:Zy,commitId:x.commitId,viewPhase:Et,...le?{cause:le}:{},causeComponents:L,components:Sp,mounted:C(J),renderCount:Ip,recordedRenders:k.length,effects:_.length,effectHooks:_.map(ne),memberIds:y.map(me=>me.id),sig:`commit:${Et}:${le??"-"}:${L.join(",")}:${Sp.slice().sort().join(",")}`,severity:y.some(me=>me.severity==="error")?"error":x.severity})}s(Me,"rt"),o(Me,"viewUpdateNode");function vt(y){let x=y[0],k=y.map(ne);return We({...x,...ht(y),kind:"commit-effects",title:y.length===1?`effect \xB7 ${k[0]}`:`effects \xB7 ${k[0]} + ${y.length-1} more`,detail:k.join(", "),commitId:x.commitId,effects:y.length,effectHooks:k,memberIds:y.map(_=>_.id),sig:`effects:${k.slice().sort().join(",")}`})}s(vt,"Yt"),o(vt,"effectsNode");let et=o(y=>w(y.map(x=>x==="state-update"?"state update":x==="fetch-start"?"request":x==="flow-origin"?"interaction":"response")).join(" + "),"describeInputs");function ku(y,x){let k=y[0],_=y[y.length-1],U=y.length,W=k.detail,ee=Math.min(...y.map(H=>H.start)),ue=Math.max(...y.map(H=>H.start+(H.durationMs??0))),L=Math.round(y.reduce((H,ie)=>H+(ie.durationMs??0),0)/U*10)/10,J=Math.round((ue-ee)*10)/10;k.count=U,k.avgMs=L,k.wallMs=J,k.durationMs=ue-ee,k.items=y.slice(0,12).map(H=>({start:H.start-ee,...H.durationMs!=null?{durationMs:H.durationMs}:{}})),k.memberIds=y.flatMap(H=>H.memberIds??[H.id]),k.title=`\xD7${U} ${k.title}`,y.some(H=>H.severity==="error")&&(k.severity="error"),k.kind==="view-update"?k.detail=[`${U} commits, ${x.length?`one per ${et(x)}`:"back to back"}`,`avg ${L}ms \xB7 wall ${J}ms`,W??""].filter(Boolean).join(" \xB7 "):k.kind==="state-update"&&W&&_.detail?k.detail=`${U} updates in a row \xB7 wall ${J}ms \xB7 first ${W} \xB7 last ${_.detail}`:k.detail=[`${U} in a row \xB7 wall ${J}ms`,W??""].filter(Boolean).join(" \xB7 ")}s(ku,"ko"),o(ku,"collapseRepeat");let yt=[],je=new Map,Ap=new Set;for(let y=0;y<F.length;y++){if(Ap.has(y))continue;let x=F[y];if(!b(x)){yt.push(x);continue}let k=[y];for(let W=y+1;W<F.length;W++){let ee=F[W];if(ee.group==="browser"){if(!b(ee)||ee.commitId!==x.commitId)break;k.push(W)}}for(let W of k)Ap.add(W);let _=k.map(W=>F[W]),U=_.some(W=>W.kind!=="effect-run")?Me(_):vt(_);for(let W of _)W.id!==U.id&&je.set(W.id,U.id);yt.push(U)}if(je.size>0||yt.some(y=>y.kind==="view-update"||y.kind==="commit-effects")){F=yt;for(let y of F)for(;y.parent&&je.has(y.parent);)y.parent=je.get(y.parent)}{let y=new Map;for(let x of F)x.kind==="view-update"&&x.commitId&&!y.has(x.commitId)&&y.set(x.commitId,x);for(let x of F){if(x.kind!=="commit-effects"||x.parent||!x.commitId)continue;let k=y.get(x.commitId);k&&k.start<=x.start&&(x.parent=k.id)}}{let y=new Set(["state-update","fetch","fetch-start","fetch-done","fetch-error","flow-origin"]),x=F.map((L,J)=>L.group==="browser"?J:-1).filter(L=>L>=0),k=o(L=>`${L.kind}|${L.sig??L.title}`,"keyOf"),_=x.map(L=>k(F[L])),U=o((L,J,H)=>{for(let ie=0;ie<H;ie++)if(_[L+ie]!==_[J+ie])return!1;return!0},"sameBlock"),W=o(L=>_[L].split("|")[0],"kindAt"),ee=o(L=>{let J=0,H=1;for(let ie=1;ie<=4&&L+ie<=_.length;ie++){let ge=1;for(;L+(ge+1)*ie<=_.length&&U(L,L+ge*ie,ie);)ge+=1;ge>=3&&ie*ge>J*H&&(J=ie,H=ge)}return{k:J,r:H}},"bestBlockAt"),ue=new Map;for(let L=0;L<_.length;){let{k:J,r:H}=ee(L);if(J===0){L+=1;continue}let ie=[...Array(J).keys()].find(le=>y.has(W(L+le)));if(ie!==void 0&&ie>0){let le=ee(L+ie);if(le.k===J&&le.r>=3&&le.r>=H-1){L+=ie;continue}}let ge=_.slice(L,L+J).map(le=>le.split("|")[0]).filter(le=>y.has(le));for(let le=0;le<J;le++){let Et=[];for(let bt=0;bt<H;bt++)Et.push(F[x[L+le+bt*J]]);ku(Et,ge);for(let bt of Et.slice(1))ue.set(bt.id,Et[0].id)}L+=J*H}if(ue.size>0){F=F.filter(L=>!ue.has(L.id));for(let L of F)for(;L.parent&&ue.has(L.parent);)L.parent=ue.get(L.parent)}}{let y=new Map(F.map(x=>[x.id,x]));for(let x of F){let k=new Set([x.id]),_=x;for(;_?.parent;){if(k.has(_.parent)){_.parent=void 0;break}k.add(_.parent),_=y.get(_.parent)}}}let _p=o(y=>{let x=new Map;for(let _ of F){if(!_.sig||a(_)!==y||_.kind==="server-request"||_.kind==="gateway-request"||_.group==="browser")continue;let U=`${_.parent??"root"}|${_.kind}|${_.sig}`,W=x.get(U);W?W.push(_):x.set(U,[_])}let k=new Map;for(let _ of x.values()){if(_.length<3)continue;_.sort((J,H)=>J.start-H.start);let U=_[0],W=!1;for(let J=0;J+1<_.length;J++)if(_[J+1].start<_[J].start+(_[J].durationMs??0)){W=!0;break}let ee=U.start,ue=Math.max(..._.map(J=>J.start+(J.durationMs??0))),L=_.reduce((J,H)=>J+(H.durationMs??0),0);U.count=_.length,U.parallel=W,U.avgMs=Math.round(L/_.length*10)/10,U.wallMs=ue-ee,U.durationMs=ue-ee,U.title=`\xD7${_.length} ${U.title.replace(/\s*\((?:\d+ rows?, )?\d+ms\)$/,"")}`,U.detail=`${U.sig} \xD7${_.length} ${W?"\u2016 parallel":"\u21BB sequential loop"} \xB7 avg ${U.avgMs}ms \xB7 wall ${U.wallMs}ms`,U.items=_.slice(0,12).map(J=>({start:J.start-ee,...J.durationMs!=null?{durationMs:J.durationMs}:{}})),U.memberIds=_.flatMap(J=>J.memberIds??[J.id]),_.some(J=>J.severity==="error")&&(U.severity="error");for(let J of _.slice(1))k.set(J.id,U.id)}if(k.size!==0){F=F.filter(_=>!k.has(_.id));for(let _ of F)for(;_.parent&&k.has(_.parent);)_.parent=k.get(_.parent)}},"aggregatePass");_p(!0),_p(!1);for(let y of F){if(!a(y))continue;let x=y.durationMs??0;if(x<40)continue;let k=F.filter(ue=>ue.parent===y.id&&(ue.durationMs??0)>0).map(ue=>[ue.start,ue.start+(ue.durationMs??0)]).sort((ue,L)=>ue[0]-L[0]),_=0,U=-1,W=-1;for(let[ue,L]of k)ue>W?(W>U&&(_+=W-U),U=ue,W=L):L>W&&(W=L);W>U&&(_+=W-U);let ee=Math.max(0,x-_);(ee>=50||ee/x>=.7&&x>=40)&&(y.selfMs=ee,y.detail=`\u26A0 cpu-heavy: ${ee}ms self-time of ${x}ms${y.detail?" \xB7 "+y.detail:""}`)}return{events:F}}s(Di,"qn"),o(Di,"buildFlowDetail");var jv={phaseGapMs:1500,burstGapMs:250,attachWindowMs:400,maxSegmentEvents:400,occurrenceSlackMs:10},Cb=new Set(["subscription-added","subscription-removed","hook-run","store-created","singleton-instance","visual-frame"]),xb=new Set(["react","valtio","client-runtime","chrome","visual"]),kr=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),fe=o(e=>typeof e=="string"&&e!==""?e:void 0,"str"),Ft=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"num");function Nv(e){let t=kr(e.raw)?e.raw:{},r=kr(t.request)?t.request:{},i=kr(t.span)?t.span:{},u=e.context??{},n=Ft(e.timestamp)??0,a=fe(t.kind)??"",l=Ft(r.startedAt)??Ft(i.startTime)??Ft(t.startedAt),d=Ft(r.endedAt)??Ft(i.endTime)??(l!==void 0&&Ft(t.durationMs)!==void 0?l+t.durationMs:void 0),p=Math.min(n,l??n),c=Math.max(n,d??n),f=kr(t.render)?t.render:{},g=kr(t.update)?t.update:{},m=a==="render"?fe(f.componentName):a==="state-update"?fe(g.path)?.split(".").slice(0,2).join("."):void 0,h=fe(t.queue),E=fe(t.jobId),D=String(e.source),$=fe(t.project)??fe(u.projectName);return{event:e,id:e.id,ts:n,from:p,to:c,kind:a,source:D,...fe(u.requestId)?{requestId:fe(u.requestId)}:{},...fe(u.parentRequestId)?{parentRequestId:fe(u.parentRequestId)}:{},...h&&E?{queueKey:`${h}#${E}`}:{},browser:xb.has(D)||D==="memory"&&$===void 0,bookkeeping:Cb.has(a),...$?{project:$}:{},...m?{subject:m}:{},...a==="fetch-start"||a==="fetch-done"?{route:Ol(fe(t.url)),method:fe(t.method)}:a==="server-request"?{route:fe(r.route),method:fe(r.method)}:a==="gateway-request"?{route:Ol(fe(t.url)),method:fe(t.method)}:{}}}s(Nv,"n0"),o(Nv,"readItem");function Ol(e){if(!e)return;let t=e.search(/[?#]/),r=t===-1?e:e.slice(0,t),i=/^[a-z][a-z0-9+.-]*:\/\/[^/]*(\/.*)?$/i.exec(r);return i?i[1]??"/":r}s(Ol,"Bw"),o(Ol,"pathOnly");var kb=o(e=>e.split(".")[0],"rootOf"),Ov=o((e,t)=>e.reduce((r,i)=>Math.min(r,t(i)),1/0),"minOf"),Rv=o((e,t)=>e.reduce((r,i)=>Math.max(r,t(i)),-1/0),"maxOf"),Rl=o((e,t)=>e.ts-t.ts||(e.id<t.id?-1:e.id>t.id?1:0),"compare"),Tl=o(e=>e.requestId&&!e.requestId.startsWith("job:")?kb(e.requestId):void 0,"directFamilyOf");function Tv(e){if(e.requestId?.startsWith("job:"))return e.requestId.slice(4);if(e.queueKey&&e.kind!=="queue-enqueued"&&!e.requestId)return e.queueKey}s(Tv,"i0"),o(Tv,"jobKeyOf");function Mv(e,t){let r=e.filter(n=>!n.parentRequestId&&(n.kind==="server-request"||n.kind==="gateway-request"||n.kind==="fetch-start"||n.kind==="fetch-done")).sort((n,a)=>n.from-a.from||Rl(n,a));if(r.length<2)return[e];let i=[];for(let n of r){let a=i[i.length-1];a&&n.from<=a.to+t?a.to=Math.max(a.to,n.to):i.push({from:n.from,to:n.to})}if(i.length<2)return[e];let u=i.map(()=>[]);for(let n of e){let a=i.findIndex(l=>n.ts>=l.from-t&&n.ts<=l.to+t);if(a===-1){a=0;for(let l=0;l<i.length;l+=1)i[l].from<=n.ts&&(a=l)}u[a].push(n)}return u.filter(n=>n.length>0)}s(Mv,"s0"),o(Mv,"occurrencesOf");var Pv={debug:0,info:1,warning:2,error:3,fatal:4};function Ml(e,t){let r=[],i=[];for(let u of e){let n=i[i.length-1];n&&u.ts-n.ts>=t&&(r.push(i),i=[]),i.push(u)}return i.length&&r.push(i),r}s(Ml,"Vw"),o(Ml,"runs");function Uv(e,t={}){let r={...jv};for(let[D,$]of Object.entries(t))typeof $=="number"&&Number.isFinite($)&&(r[D]=$);let i=new Set,u=[];for(let D of e)i.has(D.id)||(i.add(D.id),u.push(Nv(D)));u.sort(Rl);let n=fe(u[0]?.event.context?.flowId)??fe(u[0]?.event.raw?.flowId)??"",a=new Map;for(let D of u)D.kind==="queue-enqueued"&&D.queueKey&&D.requestId&&!D.requestId.startsWith("job:")&&!a.has(D.queueKey)&&a.set(D.queueKey,D);let l=new Map,d=new Map,p=[];for(let D of u){let $=Tv(D),A=Tl(D);if($!==void 0){let I=d.get($);I?I.push(D):d.set($,[D])}else if(A!==void 0){let I=l.get(A);I?I.push(D):l.set(A,[D])}else p.push(D)}let c=[],f=new Map;for(let[D,$]of l)Mv($,r.occurrenceSlackMs).forEach((A,I)=>{let j={id:`${n}~r:${D}${I===0?"":`@${I+1}`}`,kind:"request",items:A,requestId:D};c.push(j);for(let F of A)f.set(F,j)});for(let[D,$]of d){let A=a.get(D),I=A?f.get(A):void 0;I?I.items.push(...$):c.push({id:`${n}~r:job:${D}`,kind:"request",items:$,requestId:`job:${D}`})}let g=u.filter(D=>D.kind==="fetch-done"&&Tl(D)!==void 0),m=new Map;for(let D of c)D.requestId&&m.set(D.requestId,[...m.get(D.requestId)??[],D]);let h=o((D,$)=>{let A=m.get(D);if(A)return A.find(I=>I.items.some(j=>j.kind==="fetch-done"&&j.ts===$))??A[A.length-1]},"owningUnit"),E=p.filter(D=>D.browser);for(let D of Ml(E,r.burstGapMs)){let $=D[0].ts,A=g.filter(F=>F.ts<=$&&$-F.ts<=r.attachWindowMs),I=[...new Set(A.map(F=>Tl(F)))];if(I.length===1){let F=h(I[0],A[A.length-1].ts);if(F){F.items.push(...D);continue}}let j=D.some(F=>F.kind==="flow-origin");c.push({id:`${n}~${j?"o":"u"}:${D[0].id}`,kind:j?"origin":"ui",items:D,...I.length>1?{after:I.sort()}:{}})}for(let D of Ml(p.filter($=>!$.browser),r.phaseGapMs))c.push({id:`${n}~a:${D[0].id}`,kind:"ambient",items:D});return Zv(n,u.length,c,r)}s(Uv,"Kw"),o(Uv,"segmentFlow");function Zv(e,t,r,i){for(let g of r)g.items.sort(Rl);let u=r.map(g=>({unit:g,from:Ov(g.items,m=>m.from),to:Rv(g.items,m=>m.to)}));u.sort((g,m)=>g.from-m.from||(g.unit.id<m.unit.id?-1:1));let n=new Map,a=0,l=-1/0;for(let g of u)(a===0||g.from-l>=i.phaseGapMs)&&(a+=1),l=Math.max(l,g.to),n.set(g.unit,a);let d=[];for(let g of u){let m=qv(g.unit.items,i.maxSegmentEvents);m.forEach((h,E)=>{d.push(Lv(e,g.unit,h,n.get(g.unit),m.length>1?{index:E+1,total:m.length}:void 0))})}let p={};for(let g of d)for(let m of g.eventIds)p[m]=g.id;let c=[];for(let g of d){let m=c[g.phase-1];m||(m={index:g.phase,start:g.start,end:g.end,segmentIds:[]},c[g.phase-1]=m),m.start=Math.min(m.start,g.start),m.end=Math.max(m.end,g.end),m.segmentIds.push(g.id)}let f=d.reduce((g,m)=>g+m.counts.signal,0);return{flowId:e,segments:d,phases:c.filter(Boolean),assignment:p,stats:{events:t,signal:f,bookkeeping:t-f,segments:d.length,phases:c.filter(Boolean).length,largestSegment:d.reduce((g,m)=>Math.max(g,m.counts.total),0)}}}s(Zv,"a0"),o(Zv,"assemble");function qv(e,t){if(e.filter(n=>!n.bookkeeping).length<=t)return[e];let r=[],i=[],u=0;for(let n of e)!n.bookkeeping&&u===t&&(r.push(i),i=[],u=0),i.push(n),n.bookkeeping||(u+=1);return i.length&&r.push(i),r}s(qv,"c0"),o(qv,"chunk");function Lv(e,t,r,i,u){let n={total:r.length,signal:0,bookkeeping:0,errors:0,warnings:0},a=new Set,l="debug";for(let m of r){m.bookkeeping?n.bookkeeping+=1:n.signal+=1;let h=String(m.event.severity);h==="error"||h==="fatal"?n.errors+=1:h==="warning"&&(n.warnings+=1),(Pv[h]??1)>(Pv[l]??0)&&(l=h),m.project&&a.add(m.project)}let d=t.kind==="ui"||t.kind==="origin"?Vv(r):[],p=Ov(r,m=>m.from),c=Rv(r,m=>m.to),f=Jv(t.items),g=t.id;return{id:u&&u.index>1?`${g}#${u.index}`:g,flowId:e,kind:t.kind,label:Wv(t,r,f,u,d),phase:i,start:p,end:c,durationMs:c-p,eventIds:r.map(m=>m.id),counts:n,projects:[...a].sort(),...f.route?{route:f.route}:{},...f.method?{method:f.method}:{},...t.requestId?{requestId:t.requestId}:{},...t.after?{after:t.after}:{},...d.length?{hot:d}:{},...u?{part:u}:{},worstSeverity:l}}s(Lv,"u0"),o(Lv,"toSegment");function Jv(e){let t=e.find(r=>r.kind==="fetch-start"&&r.route)??e.find(r=>r.kind==="server-request"&&!r.parentRequestId&&r.route)??e.find(r=>r.kind==="gateway-request"&&r.route)??e.find(r=>r.kind==="fetch-done"&&r.route);return{...t?.route?{route:t.route}:{},...t?.method?{method:t.method.toUpperCase()}:{}}}s(Jv,"l0"),o(Jv,"routeOf");function Vv(e){let t=new Map;for(let r of e)r.subject&&!r.bookkeeping&&t.set(r.subject,(t.get(r.subject)??0)+1);return[...t.entries()].sort((r,i)=>i[1]-r[1]||(r[0]<i[0]?-1:1)).slice(0,3).map(([r,i])=>i>1?`${r} \xD7${i}`:r)}s(Vv,"d0"),o(Vv,"hotOf");function Wv(e,t,r,i,u){let n=i?` (part ${i.index}/${i.total})`:"";if(e.kind==="request"){if(r.route)return`${r.method?`${r.method} `:""}${r.route}${n}`;let a=t.find(l=>l.queueKey);return a?`job ${a.queueKey}${n}`:`request ${e.requestId??""}${n}`}return e.kind==="origin"?`${t.find(a=>a.kind==="flow-origin")?.event.title||"start"}${u.length?` \xB7 ${u.join(", ")}`:""}${n}`:e.kind==="ui"?`UI update${u.length?` \xB7 ${u.join(", ")}`:""}${n}`:`background${n}`}s(Wv,"p0"),o(Wv,"labelOf");var wi=["user-action","page-load","navigation","api","ai","background","test","system","other"],Bi=new Map;function cu(e,t){let r=Bi.get(e);return r||(r=new RegExp(`^${e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".")}$`),Bi.size>500&&Bi.clear(),Bi.set(e,r)),r.test(t)}s(cu,"Gn"),o(cu,"globMatch");var Ab=o(e=>/^[A-Z]+ /.test(e),"hasMethod");function Gv(e,t){return t.some(r=>r.route?Ab(e)?cu(e,`${r.method??"GET"} ${r.route}`):cu(e,r.route):!1)}s(Gv,"m0"),o(Gv,"routeMatches");function Pl(e,t){return!([e.flowId,e.originType,e.origin,e.route,e.project].filter(r=>r!==void 0).length===0||e.flowId!==void 0&&!cu(e.flowId,t.flowId)||e.originType!==void 0&&e.originType!==t.origin.type||e.origin!==void 0&&!(t.origin.nodeId!==void 0&&cu(e.origin,t.origin.nodeId))||e.route!==void 0&&!Gv(e.route,t.segments)||e.project!==void 0&&!t.segments.some(r=>r.projects.some(i=>cu(e.project,i))))}s(Pl,"Ww"),o(Pl,"ruleMatches");var Ul=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),ot=o(e=>typeof e=="string"&&e!==""?e:void 0,"str"),$i=o(e=>Ul(e.raw)?ot(e.raw.kind)??"":"","kindOf");function Kv(e){let t=[...e].sort((l,d)=>(Number(l.timestamp)||0)-(Number(d.timestamp)||0)||(l.id<d.id?-1:1)),r=t.find(l=>$i(l)==="flow-origin"),i=r??t.find(l=>ot(l.context?.originType));if(!i)return{};let u=Ul(i.raw)?i.raw:{},n=ot(i.context?.originType)??(r?ot(i.title):void 0),a=ot(u.originNodeId)??ot(i.context?.originNodeId);return{...n?{type:n}:{},...a?{nodeId:a}:{}}}s(Kv,"g0"),o(Kv,"originOf");var _b=/^(verify|e2e|test|smoke|load)[-_:]/i,Ib=o((e,t)=>_b.test(e)||t!==void 0&&/^(ui:)?(tools|scripts?|e2e)\//.test(t),"isTestFlow"),Hv={"page-load":"page-load","user-click":"user-action","form-submit":"user-action","input-change":"user-action","double-click":"user-action","context-menu":"user-action","key-press":"user-action","route-load":"navigation","route-change":"navigation",navigation:"navigation","ai-turn":"ai",timer:"background",cron:"background",interval:"background",queue:"background",job:"background","websocket-message":"background","hmr-update":"system"},Sb=new Set(["page-load","user-action","navigation"]),Fb=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Ci(e){return e.replace(/[?#].*$/,"").split("/").map(t=>Fb.test(t)||/^[0-9a-f]{16,}$/i.test(t)||/^\d{2,}$/.test(t)?":id":t).join("/")}s(Ci,"Of"),o(Ci,"templatePath");function Xv(e){let t=/^ui:(?:.*\/)?([^/:]+?)(?:\.[a-z]+)?:\d+:([A-Za-z]+)$/.exec(e);return t?`${t[1]} \xB7 ${t[2]}`:e}s(Xv,"w0"),o(Xv,"componentOf");function Yv(e){let t=e.replace(/[-_:][0-9a-f]{6,}(?:-[0-9a-f]+)*$/i,"");return t=t.replace(/[-_:](?=[a-z0-9]*\d)[a-z0-9]{6,}$/i,""),t=t.replace(/[-_:]\d+$/,""),t||e}s(Yv,"x0"),o(Yv,"scriptFamily");function Qv(e,t,r,i){let u=t.nodeId,n=u?/^(page|route|ambient):(.*)$/.exec(u):null;if(n)return`${n[1]}:${Ci(n[2])}`;if(t.type&&Hv[t.type]==="user-action"&&u)return Xv(u);if(e==="test")return Yv(r.flowId);let a=r.segments.find(d=>d.kind==="request"&&d.route);if(a?.route)return`${a.method??"GET"} ${Ci(a.route)}`;let l=i.find(d=>$i(d)==="ai-call");return l&&Ul(l.raw)?`ai \xB7 ${ot(l.raw.model)??ot(l.raw.provider)??"call"}`:u?Ci(u):void 0}s(Qv,"$0"),o(Qv,"subjectOf");var zb=10,jb=1e3,Nb=3,Ob=500,Rb=1e3;function e1(e,t){let r=new Set,i=t.segments.filter(n=>n.kind==="request");t.segments.some(n=>n.counts.errors>0)&&r.add("has-error"),i.some(n=>n.durationMs>=jb)&&r.add("slow"),i.length>=zb&&r.add("fan-out"),new Set(t.segments.flatMap(n=>n.projects)).size>=3&&r.add("multi-service"),e.some(n=>$i(n)==="queue-enqueued")&&r.add("queue"),e.some(n=>$i(n)==="ai-call"||n.source==="ai")&&r.add("ai"),t.stats.bookkeeping>=Ob&&t.stats.bookkeeping*2>=t.stats.events&&r.add("storm"),t.stats.events>=Rb&&r.add("large");let u=new Map;for(let n of i)(!n.part||n.part.index===1)&&u.set(n.label,(u.get(n.label)??0)+1);return[...u.values()].some(n=>n>=Nb)&&r.add("repeated-requests"),[...r].sort()}s(e1,"T0"),o(e1,"tagsOf");function t1(e,t,r=[]){let i=Kv(e),u={flowId:t.flowId,origin:i,segments:t.segments},n=e1(e,t),a=o((c,f,g)=>{let m=Qv(c,i,t,e);return{category:c,decidedBy:f,...g!==void 0?{ruleIndex:g}:{},tags:n,origin:i,...m?{subject:m}:{}}},"done"),l=r.findIndex(c=>c.category&&Pl(c,u));if(l!==-1)return a(r[l].category,"rule",l);if(Ib(t.flowId,i.nodeId))return a("test","test");let d=i.type?Hv[i.type]:void 0;if(d)return a(d,"origin");if(n.includes("ai"))return a("ai","shape");let p=t.segments.filter(c=>c.kind==="request");return p.length>0?a(p.every(c=>c.requestId?.startsWith("job:"))?"background":"api","shape"):t.segments.length>0&&t.segments.every(c=>c.kind==="ambient")?a("system","shape"):a("other","shape")}s(t1,"Hw"),o(t1,"classifyFlow");function u1(e,t,r=[]){let i=r.find(u=>u.category&&(u.route!==void 0||u.project!==void 0)&&u.flowId===void 0&&u.origin===void 0&&u.originType===void 0&&Pl(u,{flowId:e.flowId,origin:t.origin,segments:[e]}));return i?i.category:e.kind==="request"?e.requestId?.startsWith("job:")?"background":"api":e.kind==="ambient"?"system":e.kind==="origin"&&Sb.has(t.category)?t.category:"ui"}s(u1,"Yw"),o(u1,"categoryOfSegment");function r1(e){return n1(e).map(t=>{let r=new Map;for(let u of t.items){let n=r.get(u.subject);n?n.push(u):r.set(u.subject,[u])}let i=[...r.entries()].sort((u,n)=>(u[0]===void 0?1:0)-(n[0]===void 0?1:0)||n[1].length-u[1].length||String(u[0]).localeCompare(String(n[0]))).map(([u,n])=>({subject:u,count:n.length,items:n}));return{...t,subjects:i}})}s(r1,"Qw"),o(r1,"groupFlows");function n1(e){let t=new Map;for(let i of e){let u=t.get(i.category);u?u.push(i):t.set(i.category,[i])}let r=o(i=>{let u=wi.indexOf(i);return u===-1?wi.length:u},"rank");return[...t.entries()].sort((i,u)=>r(i[0])-r(u[0])||(i[0]<u[0]?-1:i[0]>u[0]?1:0)).map(([i,u])=>({category:i,count:u.length,items:u}))}s(n1,"E0"),o(n1,"groupByCategory");var lt={categories:[],segments:{},problems:[]},Zl=200,i1=200,s1=64,Tb=/^[A-Za-z0-9][A-Za-z0-9 ._:/-]*$/,Mb=["category","flowId","originType","origin","route","project"],Pb={phaseGapMs:[50,6e5],burstGapMs:[10,6e4],attachWindowMs:[0,6e4],maxSegmentEvents:[20,1e4],occurrenceSlackMs:[0,1e3]},ql=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj");function a1(e,t){if(!ql(e))return{problems:[`${t}: not an object`]};let r=[];for(let l of Object.keys(e))Mb.includes(l)||r.push(`${t}: unknown field "${l}" ignored`);let i=e.category;if(typeof i!="string"||i.trim()==="")return{problems:[...r,`${t}: "category" must be a non-empty string \u2014 rule dropped`]};let u=i.trim();if(u.length>s1||!Tb.test(u))return{problems:[...r,`${t}: category "${u.slice(0,40)}" is not a usable name (letters, digits, space . _ : / -; up to ${s1}) \u2014 rule dropped`]};let n={category:u},a=0;for(let l of["flowId","originType","origin","route","project"]){let d=e[l];if(d!==void 0){if(typeof d!="string"||d===""||d.length>i1)return{problems:[...r,`${t}: "${l}" must be a non-empty string of up to ${i1} characters \u2014 rule dropped`]};n[l]=d,a+=1}}return a===0?{problems:[...r,`${t}: "${u}" has no match field (flowId, originType, origin, route or project) \u2014 rule dropped`]}:{rule:n,problems:r}}s(a1,"O0"),o(a1,"parseRule");function o1(e){if(e==null)return lt;if(!ql(e))return{...lt,problems:["lensmcp.flows must be an object \u2014 ignored"]};let t=[],r=[],i=e.categories;i!==void 0&&(Array.isArray(i)?(i.length>Zl&&t.push(`flows.categories has ${i.length} rules; only the first ${Zl} are used`),i.slice(0,Zl).forEach((a,l)=>{let d=a1(a,`flows.categories[${l}]`);t.push(...d.problems),d.rule&&r.push(d.rule)})):t.push("flows.categories must be an array \u2014 ignored"));let u={},n=e.segments;if(n!==void 0)if(!ql(n))t.push("flows.segments must be an object \u2014 ignored");else for(let[a,l]of Object.entries(n)){let d=Pb[a];if(!d){t.push(`flows.segments.${a}: unknown option ignored`);continue}if(typeof l!="number"||!Number.isFinite(l)||l<d[0]||l>d[1]){t.push(`flows.segments.${a}: ${JSON.stringify(l)} is outside ${d[0]}\u2013${d[1]}; using the default (${jv[a]})`);continue}u[a]=l}return{categories:r,segments:u,problems:t}}s(o1,"rx"),o(o1,"parseFlowsConfig");function xi(e,t=lt){let r=Uv(e,t.segments),i=t1(e,r,t.categories),u={};for(let n of r.segments)u[n.id]=u1(n,i,t.categories);return{segmentation:r,classification:i,segmentCategories:u}}s(xi,"Fr"),o(xi,"analyzeFlow");function Ll(e,t={}){let r=t.threshold??5,i=[];for(let u of e){let n=u.raw??null;if(n?.kind!=="loop"||!n.loop)continue;let a=n.loop.dbCallsInsideLoop??0;a>r&&i.push({kind:"db-in-loop",severity:"warning",title:`${a} DB calls inside a loop (${n.loop.iterations??"?"} iterations)`,evidence:[u.id],details:{dbCallsInsideLoop:a,iterations:n.loop.iterations,durationMs:n.loop.durationMs,threshold:r},detectedAt:u.timestamp})}return i}s(Ll,"gs"),o(Ll,"detectDbInLoop");function l1(e,t={}){let r=t.threshold??3,i=new Map;for(let n of e){let a=n.raw??null;if(a?.kind!=="db-query"||!a.query?.signature)continue;let l=a.query.signature,d=i.get(l);d||(d=[],i.set(l,d)),d.push(n)}let u=[];for(let[n,a]of i)a.length>=r&&u.push({kind:"n+1-query",severity:"warning",title:`Query repeated ${a.length}\xD7 \u2014 likely N+1`,evidence:a.map(l=>l.id),details:{signature:n,count:a.length,threshold:r},detectedAt:a[a.length-1].timestamp});return u}s(l1,"nx"),o(l1,"detectNPlusOne");function d1(e,t={}){let r=t.threshold??5,i=t.windowMs??250,u=new Map;for(let a of e){if(a.source!=="react")continue;let l=a.raw??null;if(l?.kind!=="render"||!l.render?.componentInstanceId)continue;let d=l.render.componentInstanceId,p=u.get(d);p||(p=[],u.set(d,p)),p.push(a)}let n=[];for(let[a,l]of u){l.sort((p,c)=>p.timestamp-c.timestamp);let d=0;for(let p=0;p<l.length;p++){for(;l[p].timestamp-l[d].timestamp>i;)d++;let c=p-d+1;if(c>r){let f=l.slice(d,p+1),g=f[0].raw.render?.componentName??a;n.push({kind:"render-storm",severity:"warning",title:`${g} rendered ${c}\xD7 in ${i}ms`,evidence:f.map(m=>m.id),details:{componentInstanceId:a,count:c,windowMs:i,threshold:r},detectedAt:f[f.length-1].timestamp});break}}}return n}s(d1,"ox"),o(d1,"detectRenderStorm");function c1(e,t,r){let i=new Map,u=new Set;function n(l){let d=i.get(l);if(d)return d;if(u.has(l))return{path:[l],totalDurationMs:r(l)};u.add(l);let p=r(l),c=t.get(l)??[],f;for(let m of c){let h=n(m);(!f||h.totalDurationMs>f.totalDurationMs)&&(f=h)}u.delete(l);let g=f?{path:[l,...f.path],totalDurationMs:p+f.totalDurationMs}:{path:[l],totalDurationMs:p};return i.set(l,g),g}s(n,"i"),o(n,"best");let a={path:[],totalDurationMs:0};for(let l of e){let d=n(l);d.totalDurationMs>a.totalDurationMs&&(a=d)}return a}s(c1,"ix"),o(c1,"findSlowPath");var p1={dbInLoop:5,nPlusOne:3,renderStorm:5,slowRouteMs:500,slowRenderMs:16,slowQueryMs:100,duplicateRequestPeak:3,slowEgressMs:1e3};function Je(e){let t={...p1};if(e)for(let r of Object.keys(p1)){let i=e[r];typeof i=="number"&&Number.isFinite(i)&&i>=0&&(t[r]=i)}return t}s(Je,"$e"),o(Je,"resolveThresholds");function m1(e){let t=e.raw??null,r=t?.kind,i=e.context,u={id:e.id,parentTraceNodeId:i.causedByNodeId??i.originNodeId,lifecycle:"completed",context:i,startTime:e.timestamp,attributes:{...t??{}}};if(e.source==="react"&&r==="render"){let n=t;return{parentAxis:"render",node:{...u,type:"render",logicalId:n.render?.componentLogicalId,instanceId:n.render?.componentInstanceId,name:`render ${n.render?.componentName??"?"}`,durationMs:n.render?.actualDurationMs}}}if(e.source==="valtio"&&r==="state-update"){let n=t;return{parentAxis:"state",node:{...u,type:"state-update",logicalId:n.update?.storeId,name:`${n.update?.storeId??"?"}.${n.update?.path??"?"}`}}}if(e.source==="nestjs"&&r==="server-request"){let n=t;return{parentAxis:"backend",node:{...u,type:"server-request",name:`${n.request?.method??"?"} ${n.request?.route??"?"}`,durationMs:n.request?.durationMs}}}if(r==="db-query"){let n=t,a=[n.op,n.table].filter(Boolean).join(" ")||(n.name??"query");return{parentAxis:"backend",node:{...u,type:"db-query",logicalId:n.table?`db:${n.op??"query"}:${n.table}`:void 0,name:n.error?`${a} (failed)`:a,durationMs:n.durationMs}}}if(r==="loop")return{parentAxis:"performance",node:{...u,type:"loop",name:"loop",durationMs:t.loop?.durationMs}};if(e.source==="client-runtime"&&r==="user-action"){let n=t;return{parentAxis:"caused",node:{...u,type:"ui-event",logicalId:n.origin?.nodeId,name:n.origin?.label??e.title}}}}s(m1,"N0"),o(m1,"eventToNode");function f1(e,t){let r=[...t].sort((l,d)=>l.timestamp-d.timestamp),i=[];for(let l of r){let d=m1(l);d&&(e.addNode(d.node),i.push(d))}let u=0,n=o((l,d,p,c)=>{let f={id:`${p}:${l}->${d}`,from:l,to:d,axis:p,type:c,timestamp:e.getNode(d)?.startTime??0};e.addEdge(f),u++},"addEdge");for(let l of i){let d=l.node.context.causedByNodeId;d&&e.getNode(d)&&n(d,l.node.id,l.parentAxis??"caused","caused-by")}let a=new Map;for(let l of i){let d=l.node.context.flowId;if(!d)continue;let p=a.get(d);p||(p=[],a.set(d,p)),p.push(l)}for(let l of a.values())for(let d=1;d<l.length;d++){let p=l[d-1].node,c=l[d].node;c.context.causedByNodeId!==p.id&&n(p.id,c.id,"caused","flow-sequence")}return{nodeCount:i.length,edgeCount:u}}s(f1,"ax"),o(f1,"buildGraphFromEvents");var g1=new WeakMap;function ki(e){let t=g1.get(e);if(t!==void 0)return t;let r=Le(e);return g1.set(e,r),r}s(ki,"Zr"),o(ki,"estimateEventBytes");function h1(e,t={}){let r=t.rawByteLimit??32768,i=t.maxDepth??12,u=e.raw;if(u==null)return{event:e,truncated:!1,originalBytes:0,keptBytes:0};if(!jl(u,r,i)){let p=Le(u,r,i);return{event:e,truncated:!1,originalBytes:p,keptBytes:p}}let n=Le(u,Number.POSITIVE_INFINITY,64),a={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1},l=lu(u,a,i,""),d=Le(l,Number.POSITIVE_INFINITY,i);if(a.truncatedAnything&&l!==null&&typeof l=="object"&&!Array.isArray(l)){let p={truncated:!0,originalBytes:n,keptBytes:d,paths:a.paths};l[wv]=p}return{event:{...e,raw:l},truncated:a.truncatedAnything,originalBytes:n,keptBytes:d}}s(h1,"U0"),o(h1,"clampEventRaw");function v1(e={}){let t=0,r=0,i=0,u=e.rawByteLimit??32768;return{clamp(n){t+=1;let a=h1(n,e);return a.truncated&&(r+=1,i+=Math.max(0,a.originalBytes-a.keptBytes)),a.event},stats(){return{inspected:t,truncated:r,bytesReclaimed:i,rawByteLimit:u}},reset(){t=0,r=0,i=0}}}s(v1,"ux"),o(v1,"createEventClamp");var Ub={screenshot:50,"visual-crop":50,"visual-frame":200,"build-report":20,"heap-snapshot":3,"trace-with-errors":20,verification:10},Zb=64*1024*1024,qb=32*1024*1024,Lb=class{static{s(this,"hs")}static{o(this,"InMemoryRingBuffer")}constructor(e={}){this.events=[],this.eventBytes=[],this.residentEventBytes=0,this.ingested=0,this.dropped=0,this.droppedForBytes=0,this.artifactsByKind=new Map,this.artifactsById=new Map,this.artifactBytesById=new Map,this.artifactOrder=[],this.residentArtifactBytes=0,this.artifactsDropped=0,this.eventCap=e.eventCap??5e3,this.eventByteCap=e.eventByteCap??Zb,this.artifactCaps={...Ub,...e.artifactCapacities},this.artifactByteCap=e.artifactByteCap??qb}appendEvent(e){let t=ki(e);for(this.events.push(e),this.eventBytes.push(t),this.residentEventBytes+=t,this.ingested+=1,this.events.length>this.eventCap&&this.evictOldestEvents(this.events.length-this.eventCap);this.residentEventBytes>this.eventByteCap&&this.events.length>1;)this.evictOldestEvents(1),this.droppedForBytes+=1}evictOldestEvents(e){if(e<=0)return;let t=Math.min(e,this.events.length);for(let r=0;r<t;r++)this.residentEventBytes-=this.eventBytes[r]??0;this.events.splice(0,t),this.eventBytes.splice(0,t),this.dropped+=t,this.events.length===0&&(this.residentEventBytes=0)}recentEvents(e){return e===void 0||e>=this.events.length?[...this.events]:this.events.slice(this.events.length-e)}totalEventsIngested(){return this.ingested}totalEventsDropped(){return this.dropped}putArtifact(e){let t=this.artifactCaps[e.kind]??0;if(t<=0)return;let r=this.artifactsByKind.get(e.kind);r||(r=[],this.artifactsByKind.set(e.kind,r)),this.artifactsById.has(e.id)&&this.removeArtifact(e.id);let i=Le(e.data);for(r.push(e),this.artifactsById.set(e.id,e),this.artifactBytesById.set(e.id,i),this.artifactOrder.push(e.id),this.residentArtifactBytes+=i;r.length>t;){let u=r.shift();u&&(this.forgetArtifact(u.id),this.artifactsDropped+=1)}for(;this.residentArtifactBytes>this.artifactByteCap&&this.artifactOrder.length>1;){let u=this.artifactOrder[0];if(u===void 0)break;this.removeArtifact(u),this.artifactsDropped+=1}}removeArtifact(e){let t=this.artifactsById.get(e);if(t){let r=this.artifactsByKind.get(t.kind);if(r){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}this.forgetArtifact(e)}forgetArtifact(e){this.artifactsById.delete(e),this.residentArtifactBytes-=this.artifactBytesById.get(e)??0,this.artifactBytesById.delete(e);let t=this.artifactOrder.indexOf(e);t!==-1&&this.artifactOrder.splice(t,1),this.artifactsById.size===0&&(this.residentArtifactBytes=0)}getArtifact(e){return this.artifactsById.get(e)}listArtifacts(e){return[...this.artifactsByKind.get(e)??[]]}approximateSizeBytes(){return this.residentEventBytes+this.residentArtifactBytes}stats(){let e={};for(let[t,r]of this.artifactsByKind)r.length>0&&(e[t]=r.length);return{events:{resident:this.events.length,residentBytes:this.residentEventBytes,ingested:this.ingested,dropped:this.dropped,droppedForBytes:this.droppedForBytes,cap:this.eventCap,byteCap:this.eventByteCap},artifacts:{resident:this.artifactsById.size,residentBytes:this.residentArtifactBytes,dropped:this.artifactsDropped,byteCap:this.artifactByteCap,byKind:e}}}},Jb=class{static{s(this,"vs")}static{o(this,"Session")}constructor(e={}){this.state="idle",this.hooks=[],this.reducerRetention=new Map,this.id=e.sessionId??qt(),this.storage=e.storage??new Lb,this.clamp=e.clamp===!1?void 0:v1(e.clamp??{}),this.redactor=e.redact===!1?void 0:Zp(e.redact??{});let t=[this.clamp?.clamp,this.redactor?.redact].filter(r=>r!==void 0);this.bus=new Wy({capacity:e.eventBusCapacity,...t.length?{transform:o(r=>t.reduce((i,u)=>u(i),r),"transform")}:{}}),this.graph=new qp,this.resources=new iE,this.reducers=new sE,this.bus.subscribe(r=>{this.storage.appendEvent(r),this.reducers.dispatch(r)})}get lifecycle(){return this.state}storageStats(){let e=Object.fromEntries([...this.reducerRetention].map(([t,r])=>[t,r()]));return{...this.storage.stats?{storage:this.storage.stats()}:{},...this.clamp?{clamp:this.clamp.stats()}:{},...Object.keys(e).length>0?{reducers:e}:{}}}registerReducerRetention(e,t){this.reducerRetention.set(e,t)}start(){this.state==="idle"&&(this.state="active")}onShutdown(e){this.hooks.push(e)}async stop(){if(!(this.state==="closed"||this.state==="stopping")){this.state="stopping";for(let e=this.hooks.length-1;e>=0;e--){let t=this.hooks[e];try{let r=t.stop();r&&typeof r.then=="function"&&await r}catch{}}this.state="closed"}}};import{AsyncProvider as Ar,ProviderScope as _r}from"@frontmcp/sdk";var Jl;function y1(e){Jl=e}s(y1,"lx"),o(y1,"setActiveSession");function pu(){if(!Jl)throw new Error("No LensMCP session is active. Did you call bootstrapLensmcp() before the FrontMCP container started?");return Jl}s(pu,"Xn"),o(pu,"requireSession");var Vb=Ar({provide:Fl,name:"LensmcpSession",description:"The active LensMCP Session instance.",scope:_r.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>pu(),"useFactory")}),Wb=Ar({provide:zl,name:"LensmcpEventBus",description:"The session's normalised event bus.",scope:_r.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>pu().bus,"useFactory")}),Gb=Ar({provide:vb,name:"LensmcpGraphStore",description:"The typed multi-axis trace graph.",scope:_r.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>pu().graph,"useFactory")}),Kb=Ar({provide:q,name:"LensmcpResourceStore",description:"Registry of agent-readable MCP resources.",scope:_r.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>pu().resources,"useFactory")}),Hb=Ar({provide:yb,name:"LensmcpStorage",description:"Hot-tier storage backend (in-memory ring buffer by default).",scope:_r.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>pu().storage,"useFactory")}),Xb=[Vb,Wb,Gb,Kb,Hb];function E1(e={}){let t=new Jb(e);return t.start(),y1(t),{session:t,providers:Xb}}s(E1,"px"),o(E1,"bootstrapLensmcp");var I7=new RegExp("\x1B\\[[0-9;]*[A-Za-z]","g"),S7=["ai/agents/hazard-analyst/src/hazard-analyst.agent.ts(52,12): error TS2416: Property 'outputSchema' in type 'HazardAnalystAgent' is not assignable to the same property in base type 'BaseAgent<HazardInput, HazardOutput>'.","server/apps/haccp/src/modules/plan/plan.service.ts(118,7): error TS2322: Type 'string' is not assignable to type 'PlanStatus'.","web/libs/ui/src/report/report-renderer.tsx(9,3): warning TS6133: {0} is declared but its value is never read."].join(`
|
|
66
66
|
`);import{createSocket as Yb}from"node:dgram";import{closeSync as Qb,existsSync as b1,openSync as eD,readSync as tD,statSync as D1}from"node:fs";import{createServer as uD}from"node:net";import{existsSync as w1,unlinkSync as B1}from"node:fs";var rD=1024*1024;function $1(e){let t=e.onError??(()=>{});try{w1(e.path)&&B1(e.path)}catch{}let r=new Set,i=e.maxFrameBytes??rD,u=uD(n=>{r.add(n);let a="";n.setEncoding("utf8"),n.on("data",l=>{a+=l;let d;for(;(d=a.indexOf(`
|
|
67
|
-
`))!==-1;){let p=a.slice(0,d);a=a.slice(d+1),p&&e.onMessage(p)}a.length>i&&(t(new Error(`uds: frame exceeded ${i} bytes without a newline \u2014 connection dropped`)),a="",n.destroy())}),n.on("error",l=>t(l)),n.on("close",()=>r.delete(n))});return u.on("error",n=>t(n)),u.listen(e.path,()=>e.onListening?.()),u.unref(),{close:o(()=>new Promise(n=>{for(let a of r)try{a.destroy()}catch{}r.clear();try{u.close(()=>{try{w1(e.path)&&B1(e.path)}catch{}n()})}catch{n()}}),"close")}}s($1,"
|
|
68
|
-
`))!==-1;){let w=m.slice(0,b);if(m=m.slice(b+1),h){h=!1;continue}a(w)}}finally{Qb(I)}}},"drain"),e.pollMs??50);$.unref?.(),l.push(()=>clearInterval($))}if(r){let[g,m]=r.split(":"),h=Number(m);if(g&&Number.isFinite(h)){p=!0;let E;try{E=Yb("udp4"),E.on("message",D=>a(D.toString("utf8"))),E.on("error",D=>u(D)),E.bind(h,g),E.unref()}catch(D){u(D),p=!1}if(E){let D=E;l.push(()=>new Promise($=>{try{D.close(()=>$())}catch{$()}}))}}}if(i)try{let g=$1({path:i,onMessage:o(m=>a(m),"onMessage"),onError:u});c=!0,l.push(()=>g.close())}catch(g){u(g)}let f=[];return d&&f.push("file"),p&&f.push("udp"),c&&f.push("uds"),{mode:f.join("+")||"none",count:o(()=>n,"count"),async stop(){for(let g of l)try{await g()}catch{}}}}s(C1,"Uf"),o(C1,"startEventIngest");import{existsSync as nD,readFileSync as x1}from"node:fs";import{dirname as iD,join as sD}from"node:path";function k1(e=process.cwd()){let t=Jl("nx.json",e);if(!t)return Je();try{let r=JSON.parse(x1(t,"utf8"));return Je(r.lensmcp?.thresholds)}catch{return Je()}}s(k1,"Lf"),o(k1,"loadWorkspaceThresholds");function A1(e=process.cwd()){let t=Jl("nx.json",e);if(!t)return lt;try{let r=JSON.parse(x1(t,"utf8"));return o1(r.lensmcp?.flows)}catch(r){return{...lt,problems:[`${t} could not be read as JSON (${r instanceof Error?r.message:String(r)}) \u2014 flow config ignored`]}}}s(A1,"Ff"),o(A1,"loadWorkspaceFlowsConfig");function Jl(e,t){let r=t;for(let i=0;i<8;i++){let u=sD(r,e);if(nD(u))return u;let n=iD(r);if(n===r)break;r=n}}s(Jl,"yx"),o(Jl,"findUp");function S(e,t,r,i){var u=arguments.length,n=u<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(n=(u<3?a(n):u>3?a(t,r,n):a(t,r))||n);return u>3&&n&&Object.defineProperty(t,r,n),n}s(S,"x"),o(S,"__decorate");import{App as aD}from"@frontmcp/sdk";import{Resource as oD,ResourceContext as lD}from"@frontmcp/sdk";var dD=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,"asRecord"),cD=o(e=>Array.isArray(e)?e.length:void 0,"arrayLen"),dt=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"asCount"),Vl=o(e=>typeof e=="string"?e:void 0,"asString");function de(e,...t){for(let r of t){let i=cD(e[r])??dt(e[r]);if(i!==void 0)return i}}s(de,"fe"),o(de,"countOf");var Ee=o((e,t,r=`${t}s`)=>`${e} ${e===1?t:r}`,"plural");function Ai(e,t,r,i,u){if(t>0)return{state:"failed",count:t,detail:`${Ee(t,`${i} error`)} \u2014 read ${u}`};if(r>0)return{state:"warning",count:r,detail:Ee(r,`${i} warning`)};let n=Vl(e.status);return n==="clean"||n==="passed"?{state:"passed",count:0,detail:`${i} clean`}:{state:"unknown",detail:`${i} has not reported a result yet (status=${n??"absent"})`}}s(Ai,"Zf"),o(Ai,"fromStatusField");var Wl=[{kind:"typecheck",resource:"typecheck://current",reads:o(()=>["typecheck://errors"],"reads"),blocking:!0,source:"typescript",read:o(e=>Ai(e,de(e,"errorCount","errors")??0,0,"typecheck","typecheck://errors"),"read")},{kind:"lint",resource:"lint://current",reads:o(e=>e==="warning"?["lint://warnings"]:["lint://errors"],"reads"),blocking:!0,source:"eslint",read:o(e=>Ai(e,de(e,"errorCount","errors")??0,de(e,"warningCount","warnings")??0,"lint","lint://errors"),"read")},{kind:"build",resource:"build://current",reads:o(e=>e==="warning"?["build://current"]:["build://failures"],"reads"),blocking:!0,source:"vite",read:o(e=>Ai(e,de(e,"failures","failureCount")??0,de(e,"warnings","warningCount")??0,"build","build://failures"),"read")},{kind:"runtime",resource:"runtime://browser/errors",reads:o(()=>["runtime://browser/errors","runtime://browser/failed-requests"],"reads"),blocking:!0,source:"client-runtime",read:o(e=>{let t=de(e,"count","entries")??0;return t>0?{state:"failed",count:t,detail:`${Ee(t,"browser runtime error")} \u2014 read runtime://browser/errors`}:{state:"unknown",count:0,detail:"no browser runtime errors recorded (a browser may never have connected)"}},"read")},{kind:"runtime",resource:"runtime://errors",reads:o(()=>["runtime://errors"],"reads"),blocking:!0,source:"nestjs",read:o(e=>{let t=de(e,"count","entries")??0;return t>0?{state:"failed",count:t,detail:`${Ee(t,"server-side error")} \u2014 read runtime://errors (route, status, request id and stack)`}:{state:"unknown",count:0,detail:"no server-side errors recorded (no pod may have handled a request yet)"}},"read")},{kind:"cluster",resource:"process://cluster",reads:o(()=>["process://cluster"],"reads"),blocking:!0,source:"gateway",read:o(e=>{if((de(e,"services")??0)===0)return{state:"unknown",detail:"no cluster lifecycle events seen (the gateway may not be running)"};let t=de(e,"crashLooping")??0,r=de(e,"wedged")??0,i=de(e,"buildFailed")??0,u=de(e,"down")??0,n=dt(e.restarts)??0;if(t>0||r>0||i>0){let l=[t>0?`${Ee(t,"service")} crash-looping`:void 0,r>0?`${Ee(r,"service")} wedged`:void 0,i>0?`${Ee(i,"service")} failing to build`:void 0].filter(Boolean);return{state:"failed",count:t+r+i,detail:`${l.join(", ")} \u2014 read process://cluster (requests to them 502)`}}if(u>0)return{state:"warning",count:u,detail:`${Ee(u,"service")} down (idle scale-to-zero is normal; the next request restarts it)`};let a=de(e,"up")??0;return{state:"passed",count:0,detail:`${Ee(a,"service")} up${n>0?`, ${Ee(n,"restart")} this session`:""}`}},"read")},{kind:"memory",resource:"memory://leaks/suspected",reads:o(()=>["memory://leaks/suspected","memory://owners/growing"],"reads"),blocking:!1,source:"memory",read:o(e=>{let t=de(e,"suspected","leaks")??0;return t>0?{state:"warning",count:t,detail:`${Ee(t,"suspected leak")} \u2014 read memory://leaks/suspected`}:{state:"passed",count:0,detail:"no suspected leaks"}},"read")},{kind:"visual",resource:"visual://violations/current",reads:o(()=>["visual://violations/current"],"reads"),blocking:!1,source:"visual",read:o(e=>{let t=de(e,"violations")??0;return t>0?{state:"warning",count:t,detail:`${Ee(t,"visual violation")} \u2014 read visual://violations/current`}:{state:"passed",count:0,detail:"no visual violations"}},"read")},{kind:"perf",resource:"perf://slow-routes",reads:o(()=>["perf://slow-routes"],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=de(e,"routes")??0,r=dt(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${Ee(t,"route")} over${r?` ${r}ms`:" the slow-route threshold"} \u2014 read perf://slow-routes`}:{state:"passed",count:0,detail:"no slow routes"}},"read")},{kind:"duplicate-requests",resource:"perf://duplicate-requests",reads:o(()=>["perf://duplicate-requests"],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=de(e,"endpoints")??0,r=dt(e.peakThreshold);return t>0?{state:"warning",count:t,detail:`${Ee(t,"endpoint")} called ${r?`\u2265${r}\xD7`:"several times"} concurrently by one page \u2014 read perf://duplicate-requests`}:{state:"passed",count:0,detail:"no duplicated requests"}},"read")},{kind:"db",resource:"db://slow-queries",reads:o(()=>["db://slow-queries","db://analysis"],"reads"),blocking:!1,source:"db",read:o(e=>{let t=de(e,"queries")??0,r=dt(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${Ee(t,"query shape")} over${r?` ${r}ms`:" the slow-query threshold"} \u2014 read db://slow-queries`}:{state:"passed",count:0,detail:"no slow query shapes"}},"read")},{kind:"egress",resource:"net://egress/hosts",reads:o(e=>e==="warning"?["net://egress/hosts","net://egress/failures"]:["net://egress/hosts"],"reads"),blocking:!1,source:"external",read:o(e=>{let t=de(e,"failingHosts")??0,r=de(e,"slowHosts")??0,i=dt(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${Ee(t,"external host")} failing \u2014 read net://egress/failures`}:r>0?{state:"warning",count:r,detail:`${Ee(r,"external host")} over${i?` ${i}ms`:" the slow-egress threshold"} \u2014 read net://egress/hosts`}:{state:"passed",count:0,detail:"no failing or slow external calls"}},"read")}],U7=Wl.map(e=>e.resource);async function _1(e,t){let r={kind:t.kind,resource:t.resource},i;try{i=dD(await e.read(t.resource))}catch{return{...r,producer:"none",state:"unknown",detail:`no producer for ${t.resource} \u2014 this signal is unmonitored, not healthy`,reads:t.reads("unknown")}}if(!i)return{...r,producer:"none",state:"unknown",detail:`${t.resource} produced no readable payload`,reads:t.reads("unknown")};let u=Vl(i.producer),n=(e.revision(t.resource)??0)>0,a=u==="none"?"none":u==="connected"||n?"connected":"none",l=Vl(i.detail);if(a==="none")return{...r,producer:a,state:"unknown",detail:l??(u==="none"?`${t.resource} reports no producer attached \u2014 this signal is unmonitored, not healthy`:`${t.resource} is registered but has never reported \u2014 this signal is unmonitored, not healthy`),reads:t.reads("unknown")};let d;try{d=t.read(i)}catch{d={state:"unknown",detail:`${t.resource} payload could not be interpreted`}}let p=i.stale===!0,c=p?`${d.detail} (as of ${dt(i.ageMs)!==void 0?I1(dt(i.ageMs)):"a while ago"}; nothing has re-checked since)`:d.detail;return{...r,producer:a,state:d.state,...d.count===void 0?{}:{count:d.count},...p?{stale:!0}:{},detail:c,reads:t.reads(d.state)}}s(_1,"pR"),o(_1,"readSignal");function I1(e){return e<6e4?`${Math.max(1,Math.round(e/1e3))}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:`${Math.round(e/36e5)}h ago`}s(I1,"fR"),o(I1,"describeAge");async function Gl(e){return Promise.all(Wl.map(t=>_1(e,t)))}s(Gl,"ys"),o(Gl,"readSignals");var Ir=o(e=>Wl.find(t=>t.kind===e),"specFor");function Kl(e){return{source:Ir(e.kind).source,severity:e.state==="failed"?"error":"warning",title:e.detail,fingerprint:`agent-status:${e.kind}:${e.state}`,resource:e.reads[0]??e.resource}}s(Kl,"bx"),o(Kl,"toItem");function S1(e){let t={failed:3,warning:2,unknown:1,passed:0},r=o(n=>{let a=e.filter(l=>l.kind===n);return a.length===0?"unknown":a.reduce((l,d)=>t[d.state]>t[l]?d.state:l,a[0].state)},"pick"),i=o(n=>n==="failed"?"failed":n==="passed"||n==="warning"?"passed":"unknown","tri"),u=o(n=>n,"quad");return{typecheck:i(r("typecheck")),lint:i(r("lint")),build:i(r("build")),runtime:u(r("runtime")),visual:u(r("visual")),memory:u(r("memory"))}}s(S1,"mR"),o(S1,"toChecks");function F1(e){let t=e.filter(p=>p.state==="failed"),r=e.filter(p=>p.state==="warning"),i=e.filter(p=>p.state==="passed"),u=t.filter(p=>Ir(p.kind).blocking).map(Kl),n=[...t.filter(p=>!Ir(p.kind).blocking),...r].map(Kl),a=u.length>0?"failing":n.length>0?"warning":i.length>0?"clean":"starting",l=[...t.filter(p=>Ir(p.kind).blocking).flatMap(p=>p.reads),...t.filter(p=>!Ir(p.kind).blocking).flatMap(p=>p.reads),...r.flatMap(p=>p.reads)],d=[...new Set(l)];return d.length===0&&d.push("events://recent"),{status:a,blocking:u,warnings:n,suggestedReads:d,checks:S1(e)}}s(F1,"wx"),o(F1,"deriveVerdict");function z1(e=process.env){let t=e.LENSMCP_TRANSPORT==="http"||e.LENSMCP_TRANSPORT==="socket",r=e.LENSMCP_PORT;return{mode:t?"shared":"embedded",pid:process.pid,startedAt:new Date(Date.now()-Math.round(process.uptime()*1e3)).toISOString(),...t&&r?{url:`http://127.0.0.1:${r}/mcp`}:{}}}s(z1,"gR"),o(z1,"readServerInfo");async function _i(e){let t=await Gl(e.resources),r=F1(t);return{schemaVersion:1,revision:e.revision,updatedAt:new Date().toISOString(),sessionId:e.sessionId,server:z1(),status:r.status,blocking:r.blocking,warnings:r.warnings,suggestedReads:r.suggestedReads,checks:r.checks,signals:t}}s(_i,"qt"),o(_i,"aggregateStatus");var Hl="agent://current-status",Xl=class extends lD{static{s(this,"Gf")}static{o(this,"AgentCurrentStatusResource")}async execute(){let e=this.get(q);try{return await e.read(Hl)}catch{}let t=this.get(Sl);return _i({resources:e,sessionId:t.id,revision:e.revision(Hl)??0})}};Xl=S([oD({name:"agent-current-status",uri:Hl,mimeType:"application/json",description:'Workspace health in one read: status (clean/warning/failing/starting), what is BLOCKING (typecheck/lint/build errors, browser runtime errors, wedged or crash-looping services), warnings, and the exact resources to read next. Signals with no producer report `producer: "none"` \u2014 unmonitored, not healthy.'})],Xl);var pD=Xl;import{Resource as mD,ResourceContext as fD}from"@frontmcp/sdk";var Yl=class extends fD{static{s(this,"Kf")}static{o(this,"ProcessClusterResource")}async execute(){return this.get(q).read("process://cluster")}};Yl=S([mD({name:"process-cluster",uri:"process://cluster",mimeType:"application/json",description:"Dev-cluster service health: which services are up / down / wedged / crash-looping, restart counts, and the error lines services printed (ERROR in, error TS\u2026, EADDRINUSE). Read this when a request 502s or a dev server stopped responding."})],Yl);var gD=Yl;import{Tool as hD,ToolContext as vD}from"@frontmcp/sdk";var j1=["typecheck","lint","build","runtime","cluster"],yD=[...j1,"all"],ED={typecheck:{resource:"typecheck://errors",keys:["errors"],hint:"TypeScript diagnostics from the watching tsc. Already computed \u2014 no need to run `nx typecheck`."},lint:{resource:"lint://errors",keys:["errors"],hint:"ESLint errors from the watching lint pass. Already computed \u2014 no need to run `nx lint`."},build:{resource:"build://failures",keys:["failures"],hint:"Bundler/compile failures. The dev server is serving a stale or broken bundle until these clear."},runtime:{resource:"runtime://browser/errors",keys:["entries"],hint:"Uncaught errors from the browser. Pair with flow_list_recent to see what the user did first."},cluster:{resource:"process://cluster",keys:["errors"],hint:"Error lines printed by dev services (ERROR in / error TS / EADDRINUSE). A wedged or crash-looping service 502s every request routed to it."}},bD=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,"asRecord");async function N1(e,t){let r;try{r=bD(await e.read(t.resource))}catch{return[]}if(!r)return[];for(let i of t.keys){let u=r[i];if(Array.isArray(u))return u}return[]}s(N1,"$R"),o(N1,"readItems");async function O1(e){let t=e.kind==="all"?j1:[e.kind],r=await Gl(e.resources),i=new Map(r.map(n=>[n.kind,n])),u=[];for(let n of t){let a=ED[n],l=i.get(n),d=l?.producer??"none",p=l?.state??"unknown",c=d==="none"?[]:await N1(e.resources,a);u.push({kind:n,resource:a.resource,producer:d,state:p,count:c.length,returned:Math.min(c.length,e.limit),items:c.slice(0,e.limit),detail:l?.detail??`no producer for ${a.resource} \u2014 unmonitored, not healthy`,hint:a.hint})}return{kind:e.kind,totalErrors:u.reduce((n,a)=>n+a.count,0),unmonitored:u.filter(n=>n.producer==="none").map(n=>n.kind),groups:u}}s(O1,"Yf"),o(O1,"collectErrors");var R1={name:"observe.current_status",description:'Workspace health in one call: whether anything is BLOCKING right now (typecheck errors, lint errors, build failures, browser runtime errors, wedged or crash-looping dev services), plus warnings and the exact resources to read next. Call this FIRST when a build, dev server, or page looks broken \u2014 and before running `nx typecheck` / `nx lint` for a project the dev cluster already watches, because those results are already computed here. Signals reporting `producer: "none"` are UNMONITORED, not healthy. Use observe.errors for the individual error items.'},zt={name:"observe.errors",description:"The actual error items the lens already computed: TypeScript diagnostics, ESLint errors, build failures, uncaught browser errors, and error lines printed by dev services (ERROR in\u2026, error TS\u2026, EADDRINUSE). Filter with `kind`. Prefer this over running `nx typecheck` / `nx lint` or tailing a dev-server log for a project the dev cluster watches: the watching producers already have the answer, so this costs one call instead of a rebuild. Each group reports `producer` \u2014 `none` means nothing is feeding that check, so an empty list there is NOT proof it is clean.",kinds:yD,defaultKind:"all",defaultLimit:25,maxLimit:200},T1="agent://current-status",Ql=class extends vD{static{s(this,"em")}static{o(this,"ObserveCurrentStatusTool")}async execute(){let e=this.get(q);try{return await e.read(T1)}catch{}let t=this.get(Sl);return _i({resources:e,sessionId:t.id,revision:e.revision(T1)??0})}};Ql=S([hD({name:R1.name,description:R1.description,inputSchema:{}})],Ql);var DD=Ql;import{Tool as wD,ToolContext as BD,z as M1}from"@frontmcp/sdk";var ed=class extends BD{static{s(this,"rm")}static{o(this,"ObserveErrorsTool")}async execute(e){let t=this.get(q);return O1({resources:t,kind:e.kind,limit:e.limit})}};ed=S([wD({name:zt.name,description:zt.description,inputSchema:{kind:M1.enum(zt.kinds).default(zt.defaultKind).describe("Which failures to return. 'cluster' = dev-service/pod errors (the 502 case). Default 'all'."),limit:M1.number().int().positive().max(zt.maxLimit).default(zt.defaultLimit).describe(`Max items per kind (default ${zt.defaultLimit}). \`count\` still reports the true total.`)}})],ed);var $D=ed;import{spawn as CD}from"node:child_process";import{existsSync as td,readFileSync as xD}from"node:fs";import{join as P1}from"node:path";import{Job as kD,JobContext as AD,z as Ce}from"@frontmcp/sdk";import{existsSync as _D}from"node:fs";import{dirname as ID,join as SD,relative as FD,resolve as jt,isAbsolute as zD}from"node:path";var jD=6;function U1(e=process.env,t=process.cwd()){return jt(e.LENSMCP_WORKSPACE_ROOT??t)}s(U1,"_x"),o(U1,"resolveAllowedRoot");function Ii(e,t){let r=FD(jt(e),jt(t));return r===""||!r.startsWith("..")&&!zD(r)}s(Ii,"om"),o(Ii,"isWithinRoot");function Z1(e,t){let r=jt(e);if(t===void 0)return{ok:!0,cwd:r};let i=jt(r,t);return Ii(r,i)?{ok:!0,cwd:i}:{ok:!1,reason:`cwd ${i} is outside this server's workspace (${r}). verify_fix runs a workspace-defined Nx target, so it only runs in the workspace this server was started for. Set LENSMCP_WORKSPACE_ROOT to serve a different one.`}}s(Z1,"kx"),o(Z1,"confineToWorkspace");function q1(e,t){let r=jt(t),i=jt(e);if(Ii(r,i))for(let u=0;u<jD;u++){if(_D(SD(i,"nx.json")))return i;if(i===r)break;let n=ID(i);if(n===i||!Ii(r,n))break;i=n}}s(q1,"Sx"),o(q1,"findNxWorkspaceRootWithin");var ND=/^[@A-Za-z0-9][\w./-]*$/;function L1(e){return e.length<=214&&ND.test(e)}s(L1,"Ix"),o(L1,"isValidProjectName");var ud=class extends AD{static{s(this,"sm")}static{o(this,"VerifyFixJob")}async execute(e){let t=Date.now(),r=e.project??process.env.LENSMCP_VERIFY_PROJECT??"example-web",i=U1(),u=Z1(i,e.cwd);if(!u.ok)return this.log(`[verify_fix] refused: ${u.reason}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let n=u.cwd;if(!L1(r))return this.log(`[verify_fix] refused: ${r} is not a valid Nx project name`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let a=q1(n,i);if(!a)return this.log(`No nx.json found between ${n} and ${i}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let l=J1("nx",[a]);if(!l)return this.log(`Could not find node_modules/.bin/nx under ${a}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};this.log(`[verify_fix] nx run ${r}:agent-verify (cwd=${a})`);let d=CD(l,["run",`${r}:agent-verify`],{cwd:a,env:{...process.env},stdio:["ignore","pipe","pipe"]}),p=[],c=o(D=>{let $=/\[agent-verify\] ([a-z]+): (passed|failed|skipped|errored)/.exec(D);$&&$[1]&&$[2]&&(p.push({name:$[1],result:$[2],durationMs:0}),this.log(` ${$[1]}: ${$[2]}`))},"captureLine");rd(d.stdout,c),rd(d.stderr,c);let f=!1,g=setTimeout(()=>{f=!0;try{d.kill("SIGTERM")}catch{}},e.timeoutMs),m=await new Promise(D=>{d.on("exit",$=>D($??1))});if(clearTimeout(g),f)return{status:"timeout",project:r,durationMs:Date.now()-t,stages:p,reportPath:null};let h=P1(a,".lensmcp","verifications","latest.json"),E;if(td(h))try{E=JSON.parse(xD(h,"utf-8"))}catch{E=void 0}return{status:E?.status??(m===0?"passed":"failed"),project:r,durationMs:E?.durationMs??Date.now()-t,stages:E?.stages??p,reportPath:td(h)?h:null}}};ud=S([kD({name:"observe.verify_fix",description:"Run the deterministic verification loop (typecheck \u2192 lint \u2192 build) for a host project. Returns a per-stage report; suggested next read on failure is the relevant *://errors resource.",inputSchema:{project:Ce.string().describe('Nx project name in the host workspace to verify. Defaults to LENSMCP_VERIFY_PROJECT or "example-web".').optional(),cwd:Ce.string().describe("Directory to verify from. MUST be inside the workspace this server was started for (LENSMCP_WORKSPACE_ROOT, else the server's cwd); a path outside it is refused. Defaults to that workspace root.").optional(),timeoutMs:Ce.number().int().positive().default(5*6e4).describe("How long to wait for the verify pipeline before declaring it stuck.")},outputSchema:{status:Ce.enum(["passed","failed","errored","timeout"]),project:Ce.string().nullable(),durationMs:Ce.number(),stages:Ce.array(Ce.object({name:Ce.string(),result:Ce.enum(["passed","failed","skipped","errored"]),durationMs:Ce.number(),exitCode:Ce.number().optional(),summary:Ce.string().optional()})),reportPath:Ce.string().nullable()}})],ud);var OD=ud;function J1(e,t){for(let r of t){let i=P1(r,"node_modules",".bin",e);if(td(i))return i}}s(J1,"CR"),o(J1,"locateBin");function rd(e,t){if(!e)return;let r="";e.setEncoding("utf-8"),e.on("data",i=>{r+=typeof i=="string"?i:i.toString("utf-8");let u;for(;(u=r.indexOf(`
|
|
69
|
-
`))!==-1;){let n=r.slice(0,u);r=r.slice(u+1),t(n)}}),e.on("end",()=>{r.length&&t(r)})}s(rd,"Rx"),o(rd,"bufferLines");var V1=class{static{s(this,"cm")}static{o(this,"AgentApp")}};V1=S([aD({id:"agent",name:"Agent",description:"Agent-facing summary, suggested reads, verification.",resources:[pD,gD],tools:[DD,$D],jobs:[OD]})],V1);var RD={"service-starting":"starting","service-respawn":"starting","lens-app-up":"starting","service-up":"up","cold-start":"up","service-down":"down","idle-kill":"idle","service-recycle":"wedged","pod-recycle":"wedged","service-crash-loop":"crash-looping","lens-handoff-complete":"up","gateway-up":"up","gateway-down":"down","lens-child-starting":"starting","lens-child-up":"up","lens-child-exit":"down"},TD=new Set(["service-respawn","service-recycle","pod-recycle","lens-handoff-complete"]),MD=class{static{s(this,"Yn")}static{o(this,"ClusterHealth")}constructor(){this.services=new Map,this.errors=[]}ingest(e){if(e.source!=="gateway"||e.category!=="cluster")return!1;let t=e.raw??{},r=typeof t.kind=="string"?t.kind:void 0;if(!r)return!1;let i=typeof t.project=="string"?t.project:void 0;if(!i)return!1;if(r==="service-error"){let a=typeof t.line=="string"?t.line:e.message??e.title;this.errors.push({project:i,timestamp:e.timestamp,line:a,fingerprint:e.fingerprint}),this.errors.length>50&&this.errors.splice(0,this.errors.length-50);let l=this.touch(i,e.timestamp);return l.buildFailed=!0,l.lastTitle=e.title,!0}if(r==="lens-handoff-start"){let a=this.touch(i,e.timestamp);return t.oldServing!==!0&&(a.state="starting"),a.lastTitle=e.title,!0}if(r==="lens-handoff-failed"){let a=this.touch(i,e.timestamp);return t.oldKept!==!0&&(a.state="down"),a.lastTitle=e.title,!0}let u=RD[r];if(!u)return!1;let n=this.touch(i,e.timestamp);return n.state=u,n.lastTitle=e.title,TD.has(r)&&(n.restarts+=1),u==="up"&&(n.buildFailed=!1),!0}snapshot(){let e=[...this.services.values()].sort((r,i)=>r.project.localeCompare(i.project)),t=o(r=>e.filter(i=>i.state===r).map(i=>i.project),"byState");return{services:e,up:t("up"),down:t("down"),wedged:t("wedged"),crashLooping:t("crash-looping"),idle:t("idle"),buildFailed:e.filter(r=>r.buildFailed).map(r=>r.project),restarts:e.reduce((r,i)=>r+i.restarts,0),errors:this.errors.slice()}}touch(e,t){let r=this.services.get(e);if(!r){if(this.services.size>=100){let i;for(let u of this.services.values())(!i||u.lastSeenAt<i.lastSeenAt)&&(i=u);i&&this.services.delete(i.project)}r={project:e,state:"starting",restarts:0,buildFailed:!1,lastTitle:"",lastSeenAt:t},this.services.set(e,r)}return r.lastSeenAt=t,r}},Si="agent://current-status",Fi="process://cluster",PD=250,UD=new Set(["build","lint","typecheck","runtime","cluster","memory","visual","performance"]);function W1(e){let t=new MD,r=e.sessionId??"pending",i,u=o(()=>{i||(i=setTimeout(()=>{i=void 0,e.resources.markDirty(Si)},PD),i.unref?.())},"scheduleStatusRefresh"),n=o(l=>{let d=t.ingest(l);d&&e.resources.markDirty(Fi),(d||UD.has(l.category))&&u()},"handler"),a=e.bus.subscribe(n);return e.resources.register(Fi,()=>({schemaVersion:1,revision:e.resources.revision(Fi)??0,updatedAt:new Date().toISOString(),...t.snapshot()})),e.resources.register(Si,()=>_i({resources:e.resources,sessionId:r,revision:e.resources.revision(Si)??0})),{unsubscribe:o(()=>{a(),i&&(clearTimeout(i),i=void 0)},"unsubscribe"),uris:[Si,Fi]}}s(W1,"um"),o(W1,"installAgentReducer");import{App as ZD}from"@frontmcp/sdk";import{Resource as qD,ResourceContext as LD}from"@frontmcp/sdk";var nd=class extends LD{static{s(this,"lm")}static{o(this,"FlowRecentResource")}async execute(){return this.get(q).read("flow://recent")}};nd=S([qD({name:"flow-recent",uri:"flow://recent",mimeType:"application/json",description:"Last 50 flows seen this session, most recent first."})],nd);var JD=nd;import{Resource as VD,ResourceContext as WD}from"@frontmcp/sdk";var id=class extends WD{static{s(this,"pm")}static{o(this,"FlowCurrentResource")}async execute(){return this.get(q).read("flow://current")}};id=S([VD({name:"flow-current",uri:"flow://current",mimeType:"application/json",description:"The most recently active flow (origin + event count + headline)."})],id);var GD=id;import{Resource as KD,ResourceContext as HD}from"@frontmcp/sdk";var sd=class extends HD{static{s(this,"mm")}static{o(this,"FlowOriginsRecentResource")}async execute(){return this.get(q).read("flow://origins/recent")}};sd=S([KD({name:"flow-origins-recent",uri:"flow://origins/recent",mimeType:"application/json",description:"Last 50 flow-origin events (one per detected flow start)."})],sd);var XD=sd;import{Tool as YD,ToolContext as QD,z as zi}from"@frontmcp/sdk";var G1;function ad(e){G1=e}s(ad,"xs"),o(ad,"setActiveFlowLookups");function Ve(){return G1}s(Ve,"be"),o(Ve,"activeFlowLookups");var ew=120;function od(e,t,r){return{id:e.id,kind:e.kind,label:e.label,category:t,phase:e.phase,startOffsetMs:Math.max(0,e.start-r),durationMs:e.durationMs,events:e.counts.total,signal:e.counts.signal,errors:e.counts.errors,worstSeverity:e.worstSeverity,projects:e.projects,...e.route?{route:e.route}:{},...e.method?{method:e.method}:{},...e.part?{part:e.part}:{},...e.hot?{hot:e.hot}:{},...e.after?{after:e.after}:{}}}s(od,"hm"),o(od,"segmentView");function ld(e,t={}){let{segmentation:r,classification:i,segmentCategories:u}=e,n=Math.max(1,t.maxSegments??ew),a=r.segments.reduce((p,c)=>Math.min(p,c.start),1/0),l=Number.isFinite(a)?a:0,d=r.segments;if(d.length>n){let p=o(f=>f.counts.errors*1e6+f.counts.signal,"rank"),c=new Set([...d].sort((f,g)=>p(g)-p(f)||(f.id<g.id?-1:1)).slice(0,n).map(f=>f.id));d=d.filter(f=>c.has(f.id))}return{flowId:r.flowId,category:i.category,decidedBy:i.decidedBy,...i.subject?{subject:i.subject}:{},tags:i.tags,origin:i.origin,stats:{events:r.stats.events,signal:r.stats.signal,bookkeeping:r.stats.bookkeeping,segments:r.stats.segments,phases:r.stats.phases},phases:r.phases.map(p=>({index:p.index,startOffsetMs:Math.max(0,p.start-l),endOffsetMs:Math.max(0,p.end-l),segmentIds:p.segmentIds})),segments:d.map(p=>od(p,u[p.id]??"other",l)),segmentsTruncated:d.length<r.segments.length}}s(ld,"vm"),o(ld,"overviewOf");function K1(e,t,r){let i=t.segmentation.segments.find(n=>n.id===r);if(!i)return;let u=new Set(i.eventIds);return e.filter(n=>u.has(n.id))}s(K1,"Ax"),o(K1,"eventsOfSegment");function H1(e,t){return e.filter(r=>(t.category===void 0||r.category===t.category)&&(t.tag===void 0||r.tags.includes(t.tag))&&(t.subject===void 0||r.subject===t.subject))}s(H1,"zx"),o(H1,"filterClassified");function X1(e){let t=e.map(r=>({category:r.category,...r.subject?{subject:r.subject}:{},id:r.summary.flowId}));return r1(t).map(r=>({category:r.category,count:r.count,subjects:r.subjects.map(i=>({...i.subject!==void 0?{subject:i.subject}:{},count:i.count,flowIds:i.items.map(u=>u.id)}))}))}s(X1,"jx"),o(X1,"groupClassified");function Y1(e){let t={};for(let r of e)t[r.category]=(t[r.category]??0)+1;return t}s(Y1,"Ox"),o(Y1,"categoryCounts");function Q1(e,t){if(!e)return{found:!1,reason:"no active flow reducer"};let r=e.getFlowSummary(t.flowId),i=e.getFlowEvents(t.flowId);if(!r||!i)return{found:!1,flowId:t.flowId};let u=e.analyzeFlow(t.flowId);if(t.segmentId){let a=u?K1(i,u,t.segmentId):void 0,l=u?.segmentation.segments.find(c=>c.id===t.segmentId);if(!u||!a||!l)return{found:!1,flowId:t.flowId,segmentId:t.segmentId,reason:"unknown segment id for this flow (the flow may have changed \u2014 re-read overview.segments)",segmentIds:u?.segmentation.segments.map(c=>c.id)??[]};let d=u.segmentation.segments.reduce((c,f)=>Math.min(c,f.start),1/0),{events:p}=Di(a,{includeRaw:t.includeRaw});return{found:!0,summary:r,segment:od(l,u.segmentCategories[l.id]??"other",Number.isFinite(d)?d:l.start),truncated:p.length>t.limit,events:p.slice(0,t.limit)}}let{events:n}=Di(i,{includeRaw:t.includeRaw});if(t.expand){let a=n.find(p=>p.id===t.expand);if(!a)return{found:!1,flowId:t.flowId,expand:t.expand};let l=new Set(a.memberIds??[a.id]),d=i.filter(p=>l.has(p.id));return{found:!0,flowId:t.flowId,expanded:{id:a.id,title:a.title,count:d.length},events:d.map(p=>({id:p.id,timestamp:p.timestamp,source:p.source,category:p.category,severity:p.severity,title:p.title,message:p.message,...t.includeRaw?{raw:p.raw}:{}}))}}return{found:!0,summary:r,...u?{overview:ld(u)}:{},truncated:n.length>t.limit,events:n.slice(0,t.limit)}}s(Q1,"Nx"),o(Q1,"getFlowDetail");async function e3(e,t,r){if(e){let u=e.classifiedRecent(),n=H1(u,{...t.category?{category:t.category}:{},...t.tag?{tag:t.tag}:{}}),a=n.slice(0,t.limit);return{flows:a.map(l=>({...l.summary,category:l.category,decidedBy:l.decidedBy,...l.subject?{subject:l.subject}:{},tags:l.tags,segmentCount:l.segmentCount,phaseCount:l.phaseCount,signalCount:l.signalCount})),totalKnown:u.length,matching:n.length,categories:Y1(u),...t.groupBy==="category"?{groups:X1(a)}:{}}}let i=await r();return{flows:i.flows.slice(0,t.limit),totalKnown:i.flows.length}}s(e3,"Px"),o(e3,"listRecentFlows");function t3(e,t){if(!e)return{found:!1,reason:"no active flow reducer"};let r=e.analyzeFlow(t.flowId);return r?{found:!0,...ld(r,{maxSegments:t.maxSegments})}:{found:!1,flowId:t.flowId}}s(t3,"Dx"),o(t3,"getFlowSegments");var dd=class extends QD{static{s(this,"ym")}static{o(this,"FlowListRecentTool")}async execute(e){return e3(Ve(),e,async()=>await this.get(q).read("flow://recent"))}};dd=S([YD({name:"flow.list_recent",description:'Lists the last N flows with their origin + event count + headline, and what each one IS: `category` (page-load, user-action, api, ai, test, or one you defined in nx.json#lensmcp.flows), `subject` (the templated page, component or route), `tags` (fan-out, has-error, slow, storm\u2026), `segmentCount`/`phaseCount`. Filter with `category` / `tag`; pass `groupBy: "category"` to also get the flows grouped category \u2192 subject; `categories` always counts every known flow per category. Same data as flow://recent but with a tunable limit.',inputSchema:{limit:zi.number().int().positive().max(50).default(10).describe("How many flows to return (default 10, max 50)."),category:zi.string().optional().describe('Only flows in this category, e.g. "page-load" or "checkout".'),tag:zi.string().optional().describe('Only flows carrying this tag, e.g. "has-error" or "fan-out".'),groupBy:zi.enum(["none","category"]).default("none").describe('"category" adds `groups`: the returned flows grouped category \u2192 subject.')}})],dd);var tw=dd;import{Tool as uw,ToolContext as rw,z as Sr}from"@frontmcp/sdk";var cd=class extends rw{static{s(this,"wm")}static{o(this,"FlowGetTool")}async execute(e){return Q1(Ve(),e)}};cd=S([uw({name:"flow.get",description:'Returns one flow as the ordered, parented mechanism tree the dashboard renders: each node has `parent`, `area`, `start`, `durationMs`, and repeated work is collapsed (`count`, `memberIds`). Pass `expand: "<node id>"` to list the individual events a collapsed node stands for, or `includeRaw: true` for the full `event.raw` payloads. The response also carries `overview`: the flow cut into segments (one backend request each, UI bursts, the origin) grouped into phases, with its category, subject and tags \u2014 for a big flow read that first, then pass `segmentId: "<segment id>"` to get just that unit as a mechanism tree.',inputSchema:{flowId:Sr.string().describe("Flow id from flow://recent."),includeRaw:Sr.boolean().default(!1),limit:Sr.number().int().positive().max(500).default(200),expand:Sr.string().optional().describe("A node id from a previous call: returns the individual events it collapsed."),segmentId:Sr.string().optional().describe("A segment id from `overview.segments` (or flow.segments): returns only that unit of the flow, shaped like the whole.")}})],cd);var nw=cd;import{Tool as iw,ToolContext as sw,z as aw}from"@frontmcp/sdk";var pd=class extends sw{static{s(this,"$m")}static{o(this,"FlowFindByOriginTool")}async execute(e){let t=Ve();if(!t)return{found:!1,reason:"no active flow reducer"};let r=t.findFlowsByOrigin(e.originNodeId);return{found:r.length>0,count:r.length,flows:r}}};pd=S([iw({name:"flow.find_by_origin",description:"Returns all flows whose origin node id matches `originNodeId` (e.g. a data-agent-component target).",inputSchema:{originNodeId:aw.string().describe("Origin node id \u2014 usually the value of data-agent-component on the originating element.")}})],pd);var ow=pd;import{Tool as lw,ToolContext as dw,z as cw}from"@frontmcp/sdk";import*as pw from"node:fs";import{dirname as mw,join as u3}from"node:path";var fw="ai",gw=/^ai_[0-9a-z]{8,40}$/,ji=o(e=>typeof e=="string"&&gw.test(e),"isAiCallId");function r3(e){return u3(mw(e),fw)}s(r3,"aT"),o(r3,"aiContentDir");function n3(e,t){if(!ji(t))throw new Error("invalid ai call id");return u3(r3(e),`${t}.json`)}s(n3,"cT"),o(n3,"aiContentFile");function md(e,t){if(ji(t))try{let r=JSON.parse(pw.readFileSync(n3(e,t),"utf8"));return r&&r.schemaVersion===1&&r.id===t?r:void 0}catch{return}}s(md,"_s"),o(md,"readAiContent");var fd=class extends dw{static{s(this,"km")}static{o(this,"AiGetCallTool")}async execute(e){if(!ji(e.callId))return{found:!1,reason:"invalid call id"};let t=md(process.env.LENSMCP_EVENT_FILE??`${process.cwd()}/.lensmcp/events.jsonl`,e.callId);return t?{found:!0,call:t}:{found:!1,callId:e.callId,reason:"no captured content for this call \u2014 it was not captured (LENSMCP_AI_CAPTURE=content), or it has been rotated away"}}};fd=S([lw({name:"ai.get_call",description:"Returns the prompt and completion of ONE AI call (OpenAI, Anthropic, \u2026) captured by the node tap: system prompt, messages, tools offered, completion, tool calls, usage. `callId` is the `ai.contentRef` of a flow node whose kind is `ai-call` (see flow.get). Only exists when the service ran with LENSMCP_AI_CAPTURE=content; the text was redacted and size-capped when it was captured, and `truncated: true` says if anything was cut.",inputSchema:{callId:cw.string().describe('The contentRef of an ai-call flow node, e.g. "ai_0abc12345xyz78".')}})],fd);var hw=fd;import{Tool as vw,ToolContext as yw,z as i3}from"@frontmcp/sdk";var gd=class extends yw{static{s(this,"Sm")}static{o(this,"FlowSegmentsTool")}async execute(e){return t3(Ve(),e)}};gd=S([vw({name:"flow.segments",description:"Returns one flow cut into segments and phases \u2014 the right first read for a flow with hundreds or thousands of events. Each segment is a backend request (its browser fetch, every service hop, db/redis/ai work and any queue worker it enqueued), a UI burst (state updates and renders, named by what churned), the origin that started the flow, or background noise; with times relative to the flow start, event/error counts, and a category. Also returns the flow's category, subject and tags. Open one unit with flow.get { flowId, segmentId }.",inputSchema:{flowId:i3.string().describe("Flow id from flow://recent or flow.list_recent."),maxSegments:i3.number().int().positive().max(500).default(120).describe("Cap on segments listed (failing and heaviest are kept first when it truncates).")}})],gd);var Ew=gd,s3=class{static{s(this,"Im")}static{o(this,"FlowApp")}};s3=S([ZD({id:"flow",name:"Flow",description:"Causal-chain index: every event carries a flowId; the app surfaces recent flows + origin events. story.compile turns one of these into a phase summary.",resources:[JD,GD,XD],tools:[tw,nw,Ew,ow,hw]})],s3);var Ni="flow://recent",Oi="flow://current",Ri="flow://origins/recent",Fr=50,a3=50,hd=2e3,bw=4*1024*1024,vd=32*1024*1024,Dw=Fr+10;function o3(e){let t={flows:new Map,origins:[],recentOrder:[],retainedEvents:0,retainedBytes:0,evictedEvents:0,evictedForBytes:0},r=o((c,f,g,m=!0)=>{let h=Math.min(f,c.events.length);if(h<=0)return;if(m&&h>0&&(c.events[0]?.raw??{}).kind==="flow-origin"&&c.events.length>1){let D=c.eventBytes[1]??0;if(c.events.splice(1,1),c.eventBytes.splice(1,1),c.retainedBytes=Math.max(0,c.retainedBytes-D),t.retainedEvents=Math.max(0,t.retainedEvents-1),t.retainedBytes=Math.max(0,t.retainedBytes-D),t.evictedEvents+=1,g&&(t.evictedForBytes+=1),h-=1,h<=0)return}let E=0;for(let D=0;D<h;D+=1)E+=c.eventBytes[D]??0;c.events.splice(0,h),c.eventBytes.splice(0,h),c.retainedBytes=Math.max(0,c.retainedBytes-E),t.retainedEvents=Math.max(0,t.retainedEvents-h),t.retainedBytes=Math.max(0,t.retainedBytes-E),t.evictedEvents+=h,g&&(t.evictedForBytes+=h)},"evictPrefix"),i=o(c=>{let f=0,g=c.retainedBytes;for(;g>bw&&f<c.eventBytes.length;)g-=c.eventBytes[f]??0,f+=1;r(c,f,!0)},"enforceEntryByteCap"),u=o(()=>{for(let c=t.recentOrder.length-1;t.retainedBytes>vd&&c>=0;c-=1){let f=t.flows.get(t.recentOrder[c]);if(!f)continue;let g=0,m=t.retainedBytes;for(;m>vd&&g<f.eventBytes.length;)m-=f.eventBytes[g]??0,g+=1;r(f,g,!0)}},"enforceGlobalByteCap"),n=o(c=>{let f=c.context.flowId;if(!f)return;let g=(c.raw??{}).kind;if(g==="subscription-added"||g==="subscription-removed"||g==="hook-run"||g==="store-created"||g==="singleton-instance"||g==="visual-frame")return;let m=g==="flow-origin",h=t.flows.get(f);if(!h){h={summary:{flowId:f,originType:c.context.originType,originNodeId:c.context.originNodeId,startedAt:c.timestamp,lastSeenAt:c.timestamp,eventCount:0,headline:c.title},events:[],eventBytes:[],retainedBytes:0,hasOrigin:!1},t.flows.set(f,h);let $={flowId:f,originType:c.context.originType,originNodeId:c.context.originNodeId,at:c.timestamp,label:c.title,eventId:c.id};t.origins.push($),t.origins.length>a3&&t.origins.splice(0,t.origins.length-a3),e.resources.markDirty(Ri)}m&&!h.hasOrigin&&(h.hasOrigin=!0,h.summary.headline=c.title,c.context.originType&&(h.summary.originType=c.context.originType),c.context.originNodeId&&(h.summary.originNodeId=c.context.originNodeId)),c.timestamp<h.summary.startedAt&&(h.summary.startedAt=c.timestamp);let E=ki(c);h.events.push(c),h.eventBytes.push(E),h.retainedBytes+=E,t.retainedEvents+=1,t.retainedBytes+=E,h.events.length>hd&&r(h,h.events.length-hd,!1),i(h),h.summary.eventCount+=1,h.summary.lastSeenAt=c.timestamp;let D=t.recentOrder.indexOf(f);if(D>=0&&t.recentOrder.splice(D,1),t.recentOrder.unshift(f),t.recentOrder.length>Fr){let $=t.recentOrder.splice(Fr);for(let A of $){let I=t.flows.get(A);I&&r(I,I.events.length,!1,!1),t.flows.delete(A)}}u(),t.currentFlowId!==f&&(t.currentFlowId=f,e.resources.markDirty(Oi)),e.resources.markDirty(Ni)},"handler"),a=e.bus.subscribe(n);e.resources.register(Ni,()=>({schemaVersion:1,revision:e.resources.revision(Ni)??0,updatedAt:new Date().toISOString(),flows:t.recentOrder.map(c=>t.flows.get(c)?.summary).filter(c=>!!c)})),e.resources.register(Oi,()=>{let c=t.currentFlowId,f=c?t.flows.get(c):void 0;return{schemaVersion:1,revision:e.resources.revision(Oi)??0,updatedAt:new Date().toISOString(),flow:f?.summary??null}}),e.resources.register(Ri,()=>({schemaVersion:1,revision:e.resources.revision(Ri)??0,updatedAt:new Date().toISOString(),origins:t.origins.slice().reverse()}));let l=e.flows??lt,d=new Map,p={getFlowEvents(c){return t.flows.get(c)?.events.slice().sort((f,g)=>f.timestamp-g.timestamp)},getFlowSummary(c){return t.flows.get(c)?.summary},recentFlowIds(){return t.recentOrder.slice()},findFlowsByOrigin(c){return[...t.flows.values()].filter(f=>f.summary.originNodeId===c).map(f=>f.summary)},flowsConfig:l,analyzeFlow(c){let f=t.flows.get(c);if(!f)return;let g=`${f.summary.eventCount}:${f.events.length}:${f.summary.lastSeenAt}`,m=d.get(c);if(m&&m.key===g)return d.delete(c),d.set(c,m),m.analysis;let h=xi(p.getFlowEvents(c)??[],l);for(d.delete(c),d.set(c,{key:g,analysis:h});d.size>Dw;)d.delete(d.keys().next().value);return h},classifiedRecent(c=Fr){let f=[];for(let g of t.recentOrder){if(f.length>=c)break;let m=t.flows.get(g)?.summary,h=p.analyzeFlow(g);!m||!h||f.push({summary:m,category:h.classification.category,decidedBy:h.classification.decidedBy,...h.classification.subject?{subject:h.classification.subject}:{},tags:h.classification.tags,segmentCount:h.segmentation.stats.segments,phaseCount:h.segmentation.stats.phases,signalCount:h.segmentation.stats.signal})}return f}};return ad(p),{unsubscribe:o(()=>{ad(void 0),a()},"unsubscribe"),uris:[Ni,Oi,Ri],lookups:p,retentionStats:o(()=>({residentEvents:t.retainedEvents,residentBytes:t.retainedBytes,evictedEvents:t.evictedEvents,evictedForBytes:t.evictedForBytes,eventCap:Fr*hd,byteCap:vd}),"retentionStats")}}s(o3,"Em"),o(o3,"installFlowReducer");import{App as ww}from"@frontmcp/sdk";import{Resource as Bw,ResourceContext as $w}from"@frontmcp/sdk";var yd=class extends $w{static{s(this,"Am")}static{o(this,"StoryRecentResource")}async execute(){return this.get(q).read("story://recent")}};yd=S([Bw({name:"story-recent",uri:"story://recent",mimeType:"application/json",description:"Last 50 compiled stories (one per flow), most recent first."})],yd);var Cw=yd;import{Resource as xw,ResourceContext as kw}from"@frontmcp/sdk";var Ed=class extends kw{static{s(this,"jm")}static{o(this,"StoryLastResource")}async execute(){return this.get(q).read("story://last")}};Ed=S([xw({name:"story-last",uri:"story://last",mimeType:"application/json",description:"The most recently compiled story (full phase list)."})],Ed);var Aw=Ed;import{Tool as _w,ToolContext as Iw,z as Sw}from"@frontmcp/sdk";var Ti="story://recent",Mi="story://last",Oe={byFlowId:new Map,order:[]},l3=!1;function d3(e){return l3||(e.resources.register(Ti,()=>({schemaVersion:1,revision:e.resources.revision(Ti)??0,updatedAt:new Date().toISOString(),stories:Oe.order.map(t=>Oe.byFlowId.get(t)).filter(t=>!!t).map(t=>({flowId:t.flowId,origin:t.origin,phaseCount:t.phases.length,startedAt:t.startedAt,endedAt:t.endedAt,eventCount:t.eventCount,finalState:t.finalState}))})),e.resources.register(Mi,()=>{let t=Oe.order[0],r=t?Oe.byFlowId.get(t):void 0;return{schemaVersion:1,revision:e.resources.revision(Mi)??0,updatedAt:new Date().toISOString(),story:r??null}}),l3=!0),c3(e.resources),{uris:[Ti,Mi]}}s(d3,"Pm"),o(d3,"installStoryReducer");var bd;function c3(e){bd=o(t=>{e.markDirty(t)},"markDirty")}s(c3,"xT"),o(c3,"setMarkDirty");function Dd(e){Oe.byFlowId.set(e.flowId,e);let t=Oe.order.indexOf(e.flowId);if(t>=0&&Oe.order.splice(t,1),Oe.order.unshift(e.flowId),Oe.order.length>50){let r=Oe.order.splice(50);for(let i of r)Oe.byFlowId.delete(i)}bd?.(Ti),bd?.(Mi)}s(Dd,"to"),o(Dd,"recordCompiledStory");function p3(e){return Oe.byFlowId.get(e)}s(p3,"Dm"),o(p3,"getCompiledStory");var wd=class extends Iw{static{s(this,"Mm")}static{o(this,"StoryCompileTool")}async execute(e){let t=Ve();if(!t)return{compiled:!1,reason:"no active flow reducer"};let r=t.getFlowEvents(e.flowId);if(!r)return{compiled:!1,flowId:e.flowId};let i=_s(r,{flowId:e.flowId});return i?(Dd(i),{compiled:!0,story:i}):{compiled:!1,flowId:e.flowId}}};wd=S([_w({name:"story.compile",description:"Compile a flow into a `FlowStory` (origin, phases, finalState). Caches the result; subsequent story.get(flowId) calls return it directly.",inputSchema:{flowId:Sw.string().describe("Flow id (from flow://recent).")}})],wd);var Fw=wd;import{Tool as zw,ToolContext as jw,z as Nw}from"@frontmcp/sdk";var Bd=class extends jw{static{s(this,"Um")}static{o(this,"StoryGetTool")}async execute(e){let t=p3(e.flowId);return t?{found:!0,story:t}:{found:!1,flowId:e.flowId}}};Bd=S([zw({name:"story.get",description:"Returns a previously compiled story. If the story has not been compiled yet, returns `found: false`; call story.compile first.",inputSchema:{flowId:Nw.string().describe("Flow id.")}})],Bd);var Ow=Bd,m3=class{static{s(this,"Fm")}static{o(this,"StoryApp")}};m3=S([ww({id:"story",name:"Story",description:"Compiles flows into phase summaries (user-action / loading-ui / backend-request / state-update / final-render).",resources:[Cw,Aw],tools:[Fw,Ow]})],m3);import{App as Rw}from"@frontmcp/sdk";import{Resource as Tw,ResourceContext as Mw}from"@frontmcp/sdk";var $d=class extends Mw{static{s(this,"Zm")}static{o(this,"BuildCurrentResource")}async execute(){return this.get(q).read("build://current")}};$d=S([Tw({name:"build-current",uri:"build://current",mimeType:"application/json",description:"Current build status (clean / warning / failing), open failures and warnings."})],$d);var Pw=$d;import{Resource as Uw,ResourceContext as Zw}from"@frontmcp/sdk";var Cd=class extends Zw{static{s(this,"qm")}static{o(this,"BuildFailuresResource")}async execute(){return this.get(q).read("build://failures")}};Cd=S([Uw({name:"build-failures",uri:"build://failures",mimeType:"application/json",description:"Currently-open build failures (deduped by fingerprint)."})],Cd);var qw=Cd;import{Resource as Lw,ResourceContext as Jw}from"@frontmcp/sdk";var xd=class extends Jw{static{s(this,"Gm")}static{o(this,"BuildRecentResource")}async execute(){return this.get(q).read("build://events/recent")}};xd=S([Lw({name:"build-events-recent",uri:"build://events/recent",mimeType:"application/json",description:"Last 50 build/lint/typecheck/HMR events in chronological order."})],xd);var Vw=xd,f3=class{static{s(this,"Km")}static{o(this,"BuildApp")}};f3=S([Rw({id:"build",name:"Build",description:"Vite / TS / lint / HMR state.",resources:[Pw,qw,Vw]})],f3);var Pi="build://current",Ui="build://failures",Zi="build://events/recent",Ww=new Set(["vite","rollup","typescript","eslint"]),g3=new Set(["build","typecheck","lint"]),h3=50,Gw="Install the LensMCP Vite plugin (@lensmcp/vite-plugin) in the dev server, or run under the dev cluster, so build events reach this session.";function v3(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(v3,"CT"),o(v3,"readRaw");function y3(e,t){return e==="typecheck"?"tsc":e==="lint"?"eslint":t}s(y3,"UT"),o(y3,"defaultTool");function E3(e){let t={status:"unknown",recent:[],failures:new Map,warnings:new Map,hmrUpdates:0,producers:new Map,sawVerdict:!1},r=o((g,m)=>{let h=t.producers.get(g);t.producers.set(g,{id:g,tool:m.tool,...m.project?{project:m.project}:{},firstReportedAt:h?.firstReportedAt??m.at,lastReportedAt:Math.max(h?.lastReportedAt??0,m.at),lastRunStatus:m.runStatus,errorCount:m.errorCount??h?.errorCount??0,...m.warningCount!==void 0?{warningCount:m.warningCount}:h?.warningCount!==void 0?{warningCount:h.warningCount}:{},...m.durationMs!==void 0?{lastRunDurationMs:m.durationMs}:h?.lastRunDurationMs!==void 0?{lastRunDurationMs:h.lastRunDurationMs}:{},...m.error?{error:m.error}:{}}),St(t.producers,xr)},"touchProducer"),i=o(g=>{for(let[m,h]of t.failures)g(h)&&t.failures.delete(m);for(let[m,h]of t.warnings)g(h)&&t.warnings.delete(m)},"drop"),u=o((g,m)=>{i(h=>h.domain===g&&(m===void 0||h.project===m))},"clearScope"),n=o((g,m)=>{if(m.length===0)return;let h=new Set(m);i(E=>E.domain===g&&E.file!==void 0&&h.has(E.file))},"clearFiles"),a=o(()=>{if(t.failures.size>0){t.status="failing";return}if(t.warnings.size>0){t.status="warning";return}let g=[...t.producers.values()].some(m=>m.lastRunStatus==="error");t.status=g||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),l=o(()=>{e.resources.markDirty(Pi),e.resources.markDirty(Ui),e.resources.markDirty(Zi)},"markDirty"),d=o(g=>{if([...t.failures.values()].some(m=>m.project===g)||[...t.warnings.values()].some(m=>m.project===g)||[...t.producers.values()].some(m=>m.project===g)){for(let m of g3)u(m,g);for(let[m,h]of t.producers)h.project===g&&t.producers.delete(m);t.sawVerdict=[...t.producers.values()].some(m=>m.lastRunStatus!=="error"),a(),l()}},"supersedeProject"),p=o(g=>{if(g.source==="gateway"&&g.category==="cluster"){let j=g.raw??null,F=j?.kind;(F==="service-starting"||F==="service-respawn")&&j?.project&&d(j.project);return}if(!Ww.has(g.source)||!g3.has(g.category))return;let m=g.category,h=v3(g),E=h.project,D=h.tool??y3(m,g.source),$=`${D}:${E??"*"}`,A=typeof h.kind=="string"&&h.kind.endsWith("-run"),I={id:g.id,timestamp:g.timestamp,severity:g.severity,title:g.title,...g.message!==void 0?{message:g.message}:{},...g.location?.file?{file:g.location.file}:h.file?{file:h.file}:{},domain:m,...E?{project:E}:{},fingerprint:g.fingerprint};if(g.severity==="info"&&(A&&h.phase==="start"||g.title.startsWith("tsc clear")||g.title.startsWith("ESLint clear"))){u(m,E),t.lastRunAt=g.timestamp,zr(t,I),r($,{tool:D,...E?{project:E}:{},at:g.timestamp,runStatus:"running"}),A||(t.sawVerdict=!0),a(),l();return}if(A&&h.phase==="end"){let j=h.status==="error"?"error":h.status==="failing"?"failing":"clean";j==="clean"&&u(m,E),j!=="error"&&(t.sawVerdict=!0),t.lastRunAt=g.timestamp,zr(t,I),r($,{tool:D,...E?{project:E}:{},at:g.timestamp,runStatus:j,...h.durationMs!==void 0?{durationMs:h.durationMs}:{},...h.errorCount!==void 0?{errorCount:h.errorCount}:{},...h.warningCount!==void 0?{warningCount:h.warningCount}:{},...h.error?{error:h.error}:{}}),a(),l();return}if(h.kind==="hmr"||g.title.startsWith("HMR ")){t.hmrUpdates+=1;let j=[...I.file?[I.file]:[],...g.relatedFiles??[]];n("build",j),t.lastRunAt=g.timestamp,t.sawVerdict=!0,zr(t,I),r($,{tool:D,...E?{project:E}:{},at:g.timestamp,runStatus:"clean"}),a(),l();return}zr(t,I),g.severity==="error"||g.severity==="fatal"?(t.failures.set(I.fingerprint,I),t.warnings.delete(I.fingerprint)):g.severity==="warning"?t.failures.has(I.fingerprint)||t.warnings.set(I.fingerprint,I):(t.failures.delete(I.fingerprint),t.warnings.delete(I.fingerprint)),t.lastRunAt=g.timestamp,t.sawVerdict=!0,r($,{tool:D,...E?{project:E}:{},at:g.timestamp,runStatus:t.failures.size>0?"failing":"clean"}),a(),l()},"handler"),c=e.bus.subscribe(p),f=o(()=>yi({producers:[...t.producers.values()],domain:"build",noProducerHint:Gw}),"health");return e.resources.register(Pi,()=>({schemaVersion:1,revision:e.resources.revision(Pi)??0,updatedAt:new Date().toISOString(),status:t.status,failures:[...t.failures.values()],warnings:[...t.warnings.values()],hmrUpdates:t.hmrUpdates,lastRunAt:t.lastRunAt,...f()})),e.resources.register(Ui,()=>({schemaVersion:1,revision:e.resources.revision(Ui)??0,updatedAt:new Date().toISOString(),failures:[...t.failures.values()],...f()})),e.resources.register(Zi,()=>({schemaVersion:1,revision:e.resources.revision(Zi)??0,updatedAt:new Date().toISOString(),events:t.recent.slice()})),{unsubscribe:c,uris:[Pi,Ui,Zi]}}s(E3,"Wm"),o(E3,"installBuildReducer");function zr(e,t){e.recent.push(t),e.recent.length>h3&&e.recent.splice(0,e.recent.length-h3)}s(zr,"js"),o(zr,"pushRecent");import{App as Kw}from"@frontmcp/sdk";import{Resource as Hw,ResourceContext as Xw}from"@frontmcp/sdk";var kd=class extends Xw{static{s(this,"Xm")}static{o(this,"LintCurrentResource")}async execute(){return this.get(q).read("lint://current")}};kd=S([Hw({name:"lint-current",uri:"lint://current",mimeType:"application/json",description:"Current lint status (clean / warning / failing) + counts."})],kd);var Yw=kd;import{Resource as Qw,ResourceContext as eB}from"@frontmcp/sdk";var Ad=class extends eB{static{s(this,"Ym")}static{o(this,"LintErrorsResource")}async execute(){return this.get(q).read("lint://errors")}};Ad=S([Qw({name:"lint-errors",uri:"lint://errors",mimeType:"application/json",description:"Currently-open ESLint errors (deduped by fingerprint)."})],Ad);var tB=Ad;import{Resource as uB,ResourceContext as rB}from"@frontmcp/sdk";var _d=class extends rB{static{s(this,"eg")}static{o(this,"LintWarningsResource")}async execute(){return this.get(q).read("lint://warnings")}};_d=S([uB({name:"lint-warnings",uri:"lint://warnings",mimeType:"application/json",description:"Currently-open ESLint warnings."})],_d);var nB=_d,b3=class{static{s(this,"rg")}static{o(this,"LintApp")}};b3=S([Kw({id:"lint",name:"Lint",description:"ESLint state.",resources:[Yw,tB,nB]})],b3);var qi="lint://current",Li="lint://errors",Ji="lint://warnings",iB="Nothing runs ESLint in the dev loop, so this is expected. Call `runEslintOnce()` from @lensmcp/session to publish a run; until then treat lint as UNCHECKED, not passing.";function D3(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(D3,"KT"),o(D3,"readRaw");function w3(e){let t={status:"unknown",errors:new Map,warnings:new Map,producers:new Map,sawVerdict:!1},r=o((c,f)=>{let g=t.producers.get(c);t.producers.set(c,{id:c,tool:f.tool,...f.project?{project:f.project}:{},firstReportedAt:g?.firstReportedAt??f.at,lastReportedAt:Math.max(g?.lastReportedAt??0,f.at),lastRunStatus:f.runStatus,errorCount:f.errorCount??g?.errorCount??0,...f.warningCount!==void 0?{warningCount:f.warningCount}:g?.warningCount!==void 0?{warningCount:g.warningCount}:{},...f.durationMs!==void 0?{lastRunDurationMs:f.durationMs}:g?.lastRunDurationMs!==void 0?{lastRunDurationMs:g.lastRunDurationMs}:{},...f.error?{error:f.error}:{}}),St(t.producers,xr)},"touchProducer"),i=o((c,f)=>{let g=o((m,h)=>{for(let[E,D]of m)h(D)&&m.delete(E)},"drop");if(c){g(t.errors,m=>m.project===c),g(t.warnings,m=>m.project===c);return}if(f){g(t.errors,m=>m.file===f),g(t.warnings,m=>m.file===f);return}t.errors.clear(),t.warnings.clear()},"clearScope"),u=o(()=>{if(t.errors.size>0){t.status="failing";return}if(t.warnings.size>0){t.status="warning";return}let c=[...t.producers.values()].some(f=>f.lastRunStatus==="error");t.status=c||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),n=o(()=>{e.resources.markDirty(qi),e.resources.markDirty(Li),e.resources.markDirty(Ji)},"markDirty"),a=o(c=>{if([...t.errors.values()].some(f=>f.project===c)||[...t.warnings.values()].some(f=>f.project===c)||[...t.producers.values()].some(f=>f.project===c)){i(c,void 0);for(let[f,g]of t.producers)g.project===c&&t.producers.delete(f);t.sawVerdict=[...t.producers.values()].some(f=>f.lastRunStatus!=="error"),u(),n()}},"supersedeProject"),l=o(c=>{if(c.source==="gateway"&&c.category==="cluster"){let A=c.raw??null,I=A?.kind;(I==="service-starting"||I==="service-respawn")&&A?.project&&a(A.project);return}if(c.source!=="eslint"||c.category!=="lint")return;let f=D3(c),g=f.project,m=f.tool??"eslint",h=`${m}:${g??"*"}`,E=f.kind==="lint-run";if(c.severity==="info"&&(E&&f.phase==="start"||c.title.startsWith("ESLint clear"))){i(g,c.location?.file),t.lastRunAt=c.timestamp,r(h,{tool:m,...g?{project:g}:{},at:c.timestamp,runStatus:"running"}),E||(t.sawVerdict=!0),u(),n();return}if(E&&f.phase==="end"){let A=f.status==="error"?"error":f.status==="failing"?"failing":"clean";A!=="error"&&(t.sawVerdict=!0),t.lastRunAt=c.timestamp,r(h,{tool:m,...g?{project:g}:{},at:c.timestamp,runStatus:A,...f.durationMs!==void 0?{durationMs:f.durationMs}:{},...f.errorCount!==void 0?{errorCount:f.errorCount}:{},...f.warningCount!==void 0?{warningCount:f.warningCount}:{},...f.error?{error:f.error}:{}}),u(),n();return}let D=c.title.match(/^\[([^\]]+)\]/),$={id:c.id,timestamp:c.timestamp,severity:c.severity,...f.rule?{rule:f.rule}:D?.[1]?{rule:D[1]}:{},message:c.message??c.title,...c.location?.file?{file:c.location.file}:{},...c.location?.line!==void 0?{line:c.location.line}:{},...c.location?.column!==void 0?{column:c.location.column}:{},...g?{project:g}:{},fingerprint:c.fingerprint};if(c.severity==="error"||c.severity==="fatal")t.errors.set($.fingerprint,$),t.warnings.delete($.fingerprint);else if(c.severity==="warning")t.errors.has($.fingerprint)||t.warnings.set($.fingerprint,$);else return;t.lastRunAt=c.timestamp,t.sawVerdict=!0,r(h,{tool:m,...g?{project:g}:{},at:c.timestamp,runStatus:t.errors.size>0?"failing":"clean"}),u(),n()},"handler"),d=e.bus.subscribe(l),p=o(()=>yi({producers:[...t.producers.values()],domain:"lint",noProducerHint:iB}),"health");return e.resources.register(qi,()=>({schemaVersion:1,revision:e.resources.revision(qi)??0,updatedAt:new Date().toISOString(),status:t.status,errorCount:t.errors.size,warningCount:t.warnings.size,lastRunAt:t.lastRunAt,...p()})),e.resources.register(Li,()=>({schemaVersion:1,revision:e.resources.revision(Li)??0,updatedAt:new Date().toISOString(),errors:[...t.errors.values()],...p()})),e.resources.register(Ji,()=>({schemaVersion:1,revision:e.resources.revision(Ji)??0,updatedAt:new Date().toISOString(),warnings:[...t.warnings.values()],...p()})),{unsubscribe:d,uris:[qi,Li,Ji]}}s(w3,"ng"),o(w3,"installLintReducer");import{App as sB}from"@frontmcp/sdk";import{Resource as aB,ResourceContext as oB}from"@frontmcp/sdk";var Id=class extends oB{static{s(this,"og")}static{o(this,"TypecheckCurrentResource")}async execute(){return this.get(q).read("typecheck://current")}};Id=S([aB({name:"typecheck-current",uri:"typecheck://current",mimeType:"application/json",description:"Current TypeScript typecheck status + error count."})],Id);var lB=Id;import{Resource as dB,ResourceContext as cB}from"@frontmcp/sdk";var Sd=class extends cB{static{s(this,"sg")}static{o(this,"TypecheckErrorsResource")}async execute(){return this.get(q).read("typecheck://errors")}};Sd=S([dB({name:"typecheck-errors",uri:"typecheck://errors",mimeType:"application/json",description:"Current TypeScript errors (deduped by fingerprint)."})],Sd);var pB=Sd,B3=class{static{s(this,"cg")}static{o(this,"TypecheckApp")}};B3=S([sB({id:"typecheck",name:"Typecheck",description:"TypeScript diagnostics from `tsc --watch`.",resources:[lB,pB]})],B3);var Vi="typecheck://current",Wi="typecheck://errors",mB="Wire one: the dev cluster publishes from `TsgoCheckPlugin` when `LENSMCP_TYPECHECK=tsgo` (@lensmcp/cluster), or call `startTscCollector()` from @lensmcp/session for a `tsc --watch` workspace.";function $3(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s($3,"tE"),o($3,"readRaw");function C3(e){let t={status:"unknown",errors:new Map,producers:new Map,sawVerdict:!1},r=o((c,f)=>{let g=t.producers.get(c),m={id:c,tool:f.tool,...f.project?{project:f.project}:{},firstReportedAt:g?.firstReportedAt??f.at,lastReportedAt:Math.max(g?.lastReportedAt??0,f.at),lastRunStatus:f.runStatus,errorCount:f.errorCount??g?.errorCount??0,...f.durationMs!==void 0?{lastRunDurationMs:f.durationMs}:g?.lastRunDurationMs!==void 0?{lastRunDurationMs:g.lastRunDurationMs}:{},...f.warningCount!==void 0?{warningCount:f.warningCount}:{},...f.error?{error:f.error}:{}};t.producers.set(c,m),St(t.producers,xr)},"touchProducer"),i=o(c=>{if(!c){t.errors.clear();return}for(let[f,g]of t.errors)g.project===c&&t.errors.delete(f)},"clearScope"),u=o(()=>{if(t.errors.size>0){t.status="failing";return}let c=[...t.producers.values()].some(f=>f.lastRunStatus==="error");t.status=c||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),n=o(()=>{e.resources.markDirty(Vi),e.resources.markDirty(Wi)},"markDirty"),a=o(c=>{let f=[...t.errors.values()].some(m=>m.project===c),g=[...t.producers.values()].some(m=>m.project===c);if(!(!f&&!g)){i(c);for(let[m,h]of t.producers)h.project===c&&t.producers.delete(m);t.sawVerdict=[...t.producers.values()].some(m=>m.lastRunStatus!=="error"),u(),n()}},"supersedeProject"),l=o(c=>{if(c.source==="gateway"&&c.category==="cluster"){let A=c.raw??null,I=A?.kind;(I==="service-starting"||I==="service-respawn")&&A?.project&&a(A.project);return}if(c.source!=="typescript"||c.category!=="typecheck")return;let f=$3(c),g=f.project,m=f.tool??"tsc",h=`${m}:${g??"*"}`,E=f.kind==="typecheck-run";if(c.severity==="info"&&(E&&f.phase==="start"||c.title.startsWith("tsc clear"))){i(g),t.lastRunAt=c.timestamp,r(h,{tool:m,...g?{project:g}:{},at:c.timestamp,runStatus:"running"}),E||(t.sawVerdict=!0),u(),n();return}if(E&&f.phase==="end"){let A=f.status==="error"?"error":f.status==="failing"?"failing":"clean";A!=="error"&&(t.sawVerdict=!0),t.lastRunAt=c.timestamp,r(h,{tool:m,...g?{project:g}:{},at:c.timestamp,runStatus:A,...f.durationMs!==void 0?{durationMs:f.durationMs}:{},...f.errorCount!==void 0?{errorCount:f.errorCount}:{},...f.warningCount!==void 0?{warningCount:f.warningCount}:{},...f.error?{error:f.error}:{}}),u(),n();return}if(c.severity!=="error"&&c.severity!=="fatal")return;let D=c.title.match(/\bTS(\d+):/),$={id:c.id,timestamp:c.timestamp,...f.code?{code:f.code}:D?{code:`TS${D[1]}`}:{},message:c.message??c.title,...c.location?.file?{file:c.location.file}:{},...c.location?.line!==void 0?{line:c.location.line}:{},...c.location?.column!==void 0?{column:c.location.column}:{},...g?{project:g}:{},fingerprint:c.fingerprint};t.errors.set($.fingerprint,$),t.lastRunAt=c.timestamp,t.sawVerdict=!0,r(h,{tool:m,...g?{project:g}:{},at:c.timestamp,runStatus:"failing"}),u(),n()},"handler"),d=e.bus.subscribe(l),p=o(()=>yi({producers:[...t.producers.values()],domain:"typecheck",noProducerHint:mB}),"health");return e.resources.register(Vi,()=>({schemaVersion:1,revision:e.resources.revision(Vi)??0,updatedAt:new Date().toISOString(),status:t.status,errorCount:t.errors.size,lastRunAt:t.lastRunAt,...p()})),e.resources.register(Wi,()=>({schemaVersion:1,revision:e.resources.revision(Wi)??0,updatedAt:new Date().toISOString(),errors:[...t.errors.values()],...p()})),{unsubscribe:d,uris:[Vi,Wi]}}s(C3,"ug"),o(C3,"installTypecheckReducer");import{App as fB}from"@frontmcp/sdk";import{Resource as gB,ResourceContext as hB}from"@frontmcp/sdk";var Fd=class extends hB{static{s(this,"lg")}static{o(this,"BundleCurrentResource")}async execute(){return this.get(q).read("bundle://current")}};Fd=S([gB({name:"bundle-current",uri:"bundle://current",mimeType:"application/json",description:"Most recent Vite/Rollup bundle report (chunks + sizes)."})],Fd);var vB=Fd;import{Resource as yB,ResourceContext as EB}from"@frontmcp/sdk";var zd=class extends EB{static{s(this,"pg")}static{o(this,"BundleChunksResource")}async execute(){return this.get(q).read("bundle://chunks")}};zd=S([yB({name:"bundle-chunks",uri:"bundle://chunks",mimeType:"application/json",description:"Per-chunk bundle sizes (most recent build)."})],zd);var bB=zd;import{Resource as DB,ResourceContext as wB}from"@frontmcp/sdk";var jd=class extends wB{static{s(this,"mg")}static{o(this,"BundleModulesResource")}async execute(){return this.get(q).read("bundle://modules")}};jd=S([DB({name:"bundle-modules",uri:"bundle://modules",mimeType:"application/json",description:"Flattened per-module bundle sizes (most recent build)."})],jd);var BB=jd;import{Resource as $B,ResourceContext as CB}from"@frontmcp/sdk";var Nd=class extends CB{static{s(this,"hg")}static{o(this,"BundleRegressionsResource")}async execute(){return this.get(q).read("bundle://regressions")}};Nd=S([$B({name:"bundle-regressions",uri:"bundle://regressions",mimeType:"application/json",description:"Chunks/modules that grew, were added, or were removed vs the baseline."})],Nd);var xB=Nd;import{Resource as kB,ResourceContext as AB}from"@frontmcp/sdk";var Od=class extends AB{static{s(this,"yg")}static{o(this,"BundleCompareResource")}async execute(){return this.get(q).read("bundle://compare/latest")}};Od=S([kB({name:"bundle-compare-latest",uri:"bundle://compare/latest",mimeType:"application/json",description:"Most recent build vs baseline: totals + delta."})],Od);var _B=Od,x3=class{static{s(this,"wg")}static{o(this,"BundleApp")}};x3=S([fB({id:"bundle",name:"Bundle",description:"Vite/Rollup bundle reports + regressions against baseline.",resources:[vB,bB,BB,xB,_B]})],x3);function Rd(e,t){let r=[],i=new Map(e.chunks.map(n=>[n.name,n])),u=new Map(t.chunks.map(n=>[n.name,n]));for(let[n,a]of u){let l=i.get(n);if(!l){r.push({kind:"chunk-added",name:n,afterBytes:a.sizeBytes,deltaBytes:a.sizeBytes});continue}let d=a.sizeBytes-l.sizeBytes;d>256&&r.push({kind:"chunk-grew",name:n,beforeBytes:l.sizeBytes,afterBytes:a.sizeBytes,deltaBytes:d}),r.push(...k3(l,a))}for(let[n,a]of i)u.has(n)||r.push({kind:"chunk-removed",name:n,beforeBytes:a.sizeBytes,deltaBytes:-a.sizeBytes});return r.sort((n,a)=>Math.abs(a.deltaBytes)-Math.abs(n.deltaBytes))}s(Rd,"Cs"),o(Rd,"compareReports");function k3(e,t){let r=[],i=new Map(e.modules.map(u=>[u.id,u.sizeBytes]));for(let u of t.modules){let n=i.get(u.id);if(n===void 0)u.sizeBytes>256&&r.push({kind:"module-added",name:`${t.name}::${u.id}`,afterBytes:u.sizeBytes,deltaBytes:u.sizeBytes});else{let a=u.sizeBytes-n;a>256&&r.push({kind:"module-grew",name:`${t.name}::${u.id}`,beforeBytes:n,afterBytes:u.sizeBytes,deltaBytes:a})}}return r}s(k3,"fE"),o(k3,"compareModules");var Gi="bundle://current",Ki="bundle://chunks",Hi="bundle://modules",jr="bundle://regressions",Nr="bundle://compare/latest";function A3(e){let t={baseline:e.initialBaseline,regressions:[]},r=o(u=>{if(u.source!=="rollup"&&u.source!=="vite"||u.category!=="build")return;let n=u.raw;if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="bundle-report")return;let a=n.report;!a||!Array.isArray(a.chunks)||(t.current=a,t.regressions=t.baseline?Rd(t.baseline,a):[],e.resources.markDirty(Gi),e.resources.markDirty(Ki),e.resources.markDirty(Hi),e.resources.markDirty(jr),e.resources.markDirty(Nr))},"handler"),i=e.bus.subscribe(r);return e.resources.register(Gi,()=>({schemaVersion:1,revision:e.resources.revision(Gi)??0,updatedAt:new Date().toISOString(),report:t.current??null})),e.resources.register(Ki,()=>({schemaVersion:1,revision:e.resources.revision(Ki)??0,updatedAt:new Date().toISOString(),chunks:t.current?.chunks??[]})),e.resources.register(Hi,()=>{let u=t.current?.chunks.flatMap(n=>n.modules.map(a=>({...a,chunk:n.name})))??[];return{schemaVersion:1,revision:e.resources.revision(Hi)??0,updatedAt:new Date().toISOString(),modules:u}}),e.resources.register(jr,()=>({schemaVersion:1,revision:e.resources.revision(jr)??0,updatedAt:new Date().toISOString(),regressions:t.regressions.slice()})),e.resources.register(Nr,()=>({schemaVersion:1,revision:e.resources.revision(Nr)??0,updatedAt:new Date().toISOString(),baseline:t.baseline??null,current:t.current??null,deltaBytes:t.baseline&&t.current?t.current.totalBytes-t.baseline.totalBytes:0})),{unsubscribe:i,uris:[Gi,Ki,Hi,jr,Nr],setBaseline:o(u=>{t.baseline=u,t.current&&(t.regressions=Rd(t.baseline,t.current)),e.resources.markDirty(jr),e.resources.markDirty(Nr)},"setBaseline")}}s(A3,"xg"),o(A3,"installBundleReducer");import{App as IB}from"@frontmcp/sdk";import{Resource as SB,ResourceContext as FB}from"@frontmcp/sdk";var Td=class extends FB{static{s(this,"$g")}static{o(this,"RuntimeBrowserConsoleResource")}async execute(){return this.get(q).read("runtime://browser/console")}};Td=S([SB({name:"runtime-browser-console",uri:"runtime://browser/console",mimeType:"application/json",description:"Most recent 200 console.* messages from any tab."})],Td);var zB=Td;import{Resource as jB,ResourceContext as NB}from"@frontmcp/sdk";var Md=class extends NB{static{s(this,"kg")}static{o(this,"RuntimeBrowserErrorsResource")}async execute(){return this.get(q).read("runtime://browser/errors")}};Md=S([jB({name:"runtime-browser-errors",uri:"runtime://browser/errors",mimeType:"application/json",description:"Uncaught browser errors + promise rejections, per tab, since that tab's current page load (a reload retracts the previous document's errors)."})],Md);var OB=Md;import{Resource as RB,ResourceContext as TB}from"@frontmcp/sdk";var Pd=class extends TB{static{s(this,"Ig")}static{o(this,"RuntimeServerErrorsResource")}async execute(){return this.get(q).read("runtime://errors")}};Pd=S([RB({name:"runtime-errors",uri:"runtime://errors",mimeType:"application/json",description:"Errors raised INSIDE a backend pod, with no browser involved \u2014 the 500s a curl, an e2e runner or a queue job produces. Each entry carries the route, the status, the request id the gateway stamped, and the stack. Use this when a server-side call failed and no browser flow exists to explain it; `runtime://browser/errors` is the browser-side counterpart."})],Pd);var MB=Pd;import{Resource as PB,ResourceContext as UB}from"@frontmcp/sdk";var Ud=class extends UB{static{s(this,"Tg")}static{o(this,"RuntimeBrowserNetworkResource")}async execute(){return this.get(q).read("runtime://browser/network")}};Ud=S([PB({name:"runtime-browser-network",uri:"runtime://browser/network",mimeType:"application/json",description:"Recent fetch / XHR / browser network activity."})],Ud);var ZB=Ud;import{Resource as qB,ResourceContext as LB}from"@frontmcp/sdk";var Zd=class extends LB{static{s(this,"Ag")}static{o(this,"RuntimeBrowserFailedRequestsResource")}async execute(){return this.get(q).read("runtime://browser/failed-requests")}};Zd=S([qB({name:"runtime-browser-failed-requests",uri:"runtime://browser/failed-requests",mimeType:"application/json",description:"Recent failed network requests (status >= 400 or transport errors)."})],Zd);var JB=Zd,_3=class{static{s(this,"jg")}static{o(this,"RuntimeApp")}};_3=S([IB({id:"runtime",name:"Runtime",description:"Live browser/node runtime state (console, errors, network).",resources:[zB,OB,MB,ZB,JB]})],_3);var mu="runtime://browser/console",fu="runtime://browser/errors",gu="runtime://browser/network",hu="runtime://browser/failed-requests",vu="runtime://errors",VB="default",qd=o(e=>e??VB,"tabOf");function I3(e){if(e.category!=="runtime")return!1;let t=e.raw;return t&&typeof t=="object"&&t.kind==="ready"?!0:e.title==="Client runtime ready"}s(I3,"IE"),o(I3,"isDocumentBoundary");function S3(e){if(e.category!=="runtime")return!1;let t=e.raw;return!!(t&&typeof t=="object"&&t.kind==="gone")}s(S3,"RE"),o(S3,"isTabGone");function F3(e){let t=(e.now??(()=>Date.now()))(),r={console:[],errors:[],network:[],failed:[],serverErrors:[],readyByTab:new Map,changedAt:new Map},i=o((d,p)=>{r.changedAt.set(d,p),e.resources.markDirty(d)},"touch"),u=o((d,p,c)=>{let f=d.filter(g=>!(qd(g.tabId)===p&&g.timestamp<c));f.length!==d.length&&(d.length=0,d.push(...f))},"retract"),n=o(d=>{if(z3(d)){let c=d.raw?.project;if(c){let f=r.serverErrors.length;r.serverErrors=r.serverErrors.filter(g=>g.project!==c),r.serverErrors.length!==f&&i(vu,d.timestamp)}return}if(j3(d)){r.lastServerEventAt=Math.max(r.lastServerEventAt??0,d.timestamp),yu(r.serverErrors,N3(d),100),i(vu,d.timestamp);return}if(!(d.source==="client-runtime"||d.source==="chrome")&&!(d.source==="react"&&d.category==="network"))return;if(r.lastEventAt=Math.max(r.lastEventAt??0,d.timestamp),S3(d)){let c=qd(d.context.tabId);u(r.errors,c,Number.POSITIVE_INFINITY),u(r.failed,c,Number.POSITIVE_INFINITY),r.readyByTab.delete(c);for(let f of[fu,hu,mu,gu])i(f,d.timestamp);return}if(I3(d)){let c=qd(d.context.tabId);r.readyByTab.set(c,Math.max(r.readyByTab.get(c)??0,d.timestamp)),r.lastReadyAt=Math.max(r.lastReadyAt??0,d.timestamp);let f=d.timestamp-1e3;u(r.errors,c,f),u(r.failed,c,f);for(let g of[fu,hu,mu,gu])i(g,d.timestamp);return}let p={id:d.id,timestamp:d.timestamp,severity:d.severity,title:d.title,message:d.message,source:d.source,fingerprint:d.fingerprint,tabId:d.context.tabId,url:d.context.url,raw:d.raw};if(d.category==="network"){yu(r.network,p,200),i(gu,d.timestamp),d.severity==="error"&&(yu(r.failed,p,50),i(hu,d.timestamp));return}(d.severity==="error"||d.severity==="fatal")&&(yu(r.errors,p,100),i(fu,d.timestamp)),d.title?.startsWith("console.")&&(yu(r.console,p,200),i(mu,d.timestamp))},"handler"),a=e.bus.subscribe(n),l=o((d,p)=>O3(e.resources,d,p,r,t),"snap");return e.resources.register(vu,()=>l(vu,r.serverErrors)),e.resources.register(mu,()=>l(mu,r.console)),e.resources.register(fu,()=>l(fu,r.errors)),e.resources.register(gu,()=>l(gu,r.network)),e.resources.register(hu,()=>l(hu,r.failed)),{unsubscribe:a,uris:[mu,fu,gu,hu,vu]}}s(F3,"Ng"),o(F3,"installRuntimeReducer");function Ld(e){let t=e.raw??null,r=e.context;return t?.project??r.projectName}s(Ld,"Gx"),o(Ld,"projectOf");function z3(e){if(e.source!=="gateway"||e.category!=="cluster")return!1;let t=e.raw?.kind;return t==="service-starting"||t==="service-respawn"}s(z3,"TE"),o(z3,"isGenerationBoundary");function j3(e){if(e.source!=="nestjs"||e.severity!=="error"&&e.severity!=="fatal")return!1;let t=e.raw??{};return t.kind==="server-request"||t.kind==="uncaught"?!0:t.kind!=="log"?!1:t.request?.error?!0:/\b[A-Za-z0-9_$]*(?:Error|Exception)\b|\b(?:ERROR|FATAL)\b/.test(e.title??"")}s(j3,"EE"),o(j3,"isServerError");function N3(e){let t=(e.raw??{}).request??{},r=t.error;return{id:e.id,timestamp:e.timestamp,severity:e.severity,title:e.title,message:e.message??r?.message,source:e.source,fingerprint:e.fingerprint,...e.context.requestId?{requestId:e.context.requestId}:{},...Ld(e)?{project:Ld(e)}:{},...typeof t.route=="string"?{route:t.route}:{},...typeof t.status=="number"?{status:t.status}:{},...r?.stack?{stack:r.stack}:{},raw:e.raw}}s(N3,"AE"),o(N3,"serverEntry");function O3(e,t,r,i,u){let n=t===vu,a=n?i.lastServerEventAt:i.lastEventAt,l=a!==void 0;return{schemaVersion:1,revision:e.revision(t)??0,updatedAt:new Date(i.changedAt.get(t)??u).toISOString(),count:r.length,entries:r.slice(),producer:l?"connected":"none",lastEventAt:a,lastReadyAt:i.lastReadyAt,detail:n?l?r.length===0?"No server-side errors held. Pods HAVE reported, but a new pod generation retracts the errors of the one it replaced \u2014 so this is NOT evidence the routes are healthy: nobody may have re-made the failing request since.":`${r.length} server-side error${r.length===1?"":"s"} from ${new Set(r.map(d=>d.project??"unknown")).size} project${new Set(r.map(d=>d.project??"unknown")).size===1?"":"s"}`:"No pod has ever reported into this session \u2014 this is NOT evidence the backend is healthy, nothing is watching. Run the backend under the dev cluster so pod errors reach this session.":l?`browser attached; ${r.length} entr${r.length===1?"y":"ies"} from ${i.readyByTab.size} open tab${i.readyByTab.size===1?"":"s"}`+(i.lastReadyAt===void 0?" (no page load observed yet)":""):"No browser has ever reported into this session \u2014 this is NOT evidence the app is healthy, nothing is watching. Open the app under the dev cluster (or the Vite dev server with @lensmcp/vite-plugin installed) so browser events reach this session."}}s(O3,"zE"),o(O3,"snapshot");function yu(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(yu,"oo"),o(yu,"pushBounded");import{App as WB}from"@frontmcp/sdk";import{Resource as GB,ResourceContext as KB}from"@frontmcp/sdk";var Jd=class extends KB{static{s(this,"Pg")}static{o(this,"BrowserTabsResource")}async execute(){return this.get(q).read("browser://tabs")}};Jd=S([GB({name:"browser-tabs",uri:"browser://tabs",mimeType:"application/json",description:"Open browser tabs with per-tab status, url, and event counts. `status` reflects the tab's CURRENT page load \u2014 a reload resets it."})],Jd);var HB=Jd;import{Resource as XB,ResourceContext as YB}from"@frontmcp/sdk";var Vd=class extends YB{static{s(this,"Mg")}static{o(this,"BrowserActiveTabResource")}async execute(){return this.get(q).read("browser://active-tab")}};Vd=S([XB({name:"browser-active-tab",uri:"browser://active-tab",mimeType:"application/json",description:"The currently-focused browser tab."})],Vd);var QB=Vd,R3=class{static{s(this,"Ug")}static{o(this,"BrowserApp")}};R3=S([WB({id:"browser",name:"Browser",description:"Per-tab browser state (multi-tab refinement comes in Phase 6).",resources:[HB,QB]})],R3);var ct="browser://tabs",pt="browser://active-tab";function T3(e){if(e.category!=="runtime")return!1;let t=e.raw;return t&&typeof t=="object"&&t.kind==="ready"?!0:e.title==="Client runtime ready"}s(T3,"ME"),o(T3,"isDocumentBoundary");function M3(e){if(e.category!=="runtime")return!1;let t=e.raw;return!!(t&&typeof t=="object"&&t.kind==="gone")}s(M3,"CE"),o(M3,"isTabGone");function P3(e){let t=(e.now??(()=>Date.now()))(),r={tabs:new Map,changedAt:new Map},i=o(a=>{if(a.source!=="chrome"&&a.source!=="client-runtime")return;let l=a.context.tabId??"default";if(M3(a)){if(r.tabs.delete(l),r.activePageId===l){let p=[...r.tabs.keys()];r.activePageId=p[p.length-1]}r.lastEventAt=Math.max(r.lastEventAt??0,a.timestamp),r.changedAt.set(ct,a.timestamp),r.changedAt.set(pt,a.timestamp),e.resources.markDirty(ct),e.resources.markDirty(pt);return}let d=r.tabs.get(l);if(d||(d={pageId:l,url:a.context.url??"",status:"unknown",unreadEvents:0,totalEvents:0,loads:0}),r.tabs.delete(l),r.tabs.set(l,d),r.tabs.size>100){let p=r.tabs.keys().next().value;p!==void 0&&p!==l&&r.tabs.delete(p)}a.context.url&&(d.url=a.context.url),d.totalEvents+=1,d.lastEventAt=a.timestamp,r.activePageId=l,r.lastEventAt=Math.max(r.lastEventAt??0,a.timestamp),T3(a)?(d.status="clean",d.unreadEvents=0,d.loads+=1,d.lastReadyAt=a.timestamp):(d.unreadEvents+=1,a.severity==="error"||a.severity==="fatal"?d.status="failing":d.status!=="failing"&&a.severity==="warning"?d.status="warning":d.status==="unknown"&&(d.status="clean")),r.changedAt.set(ct,a.timestamp),r.changedAt.set(pt,a.timestamp),e.resources.markDirty(ct),e.resources.markDirty(pt)},"handler"),u=e.bus.subscribe(i),n=o(a=>new Date(r.changedAt.get(a)??t).toISOString(),"stamp");return e.resources.register(ct,()=>({schemaVersion:1,revision:e.resources.revision(ct)??0,updatedAt:n(ct),activePageId:r.activePageId,tabs:[...r.tabs.values()],lastEventAt:r.lastEventAt,producer:r.lastEventAt===void 0?"none":"connected"})),e.resources.register(pt,()=>{let a=r.activePageId;return{schemaVersion:1,revision:e.resources.revision(pt)??0,updatedAt:n(pt),tab:a?r.tabs.get(a)??null:null,lastEventAt:r.lastEventAt,producer:r.lastEventAt===void 0?"none":"connected"}}),{unsubscribe:u,uris:[ct,pt]}}s(P3,"Lg"),o(P3,"installBrowserReducer");import{App as e$}from"@frontmcp/sdk";import{Resource as t$,ResourceContext as u$}from"@frontmcp/sdk";var Wd=class extends u${static{s(this,"Fg")}static{o(this,"NestProvidersResource")}async execute(){return this.get(q).read("nest://providers")}};Wd=S([t$({name:"nest-providers",uri:"nest://providers",mimeType:"application/json",description:"All known NestJS singleton-instance generations (with lifecycle)."})],Wd);var r$=Wd;import{Resource as n$,ResourceContext as i$}from"@frontmcp/sdk";var Gd=class extends i${static{s(this,"Bg")}static{o(this,"NestRequestsResource")}async execute(){return this.get(q).read("nest://requests/recent")}};Gd=S([n$({name:"nest-requests-recent",uri:"nest://requests/recent",mimeType:"application/json",description:"Last 50 NestJS server requests with status + duration."})],Gd);var s$=Gd,U3=class{static{s(this,"Vg")}static{o(this,"NestApp")}};U3=S([e$({id:"nest",name:"Nest",description:"NestJS providers, request lifecycle, singleton generations.",resources:[r$,s$]})],U3);var Xi="nest://providers",Yi="nest://requests/recent";function Z3(e){let t={providers:new Map,recentRequests:[]},r=o(u=>{if(u.source!=="nestjs")return;let n=u.raw??null;if(n?.kind==="singleton-instance"&&n.provider){let a=n.provider;if(t.providers.delete(a.instanceId),t.providers.set(a.instanceId,{...a}),t.providers.size>500){for(let l of t.providers.keys())if(t.providers.delete(l),t.providers.size<=500)break}e.resources.markDirty(Xi);return}if(n?.kind==="server-request"&&n.request){let a={...n.request,fingerprint:u.fingerprint,id:u.id};t.recentRequests.push(a),t.recentRequests.length>50&&t.recentRequests.splice(0,t.recentRequests.length-50),e.resources.markDirty(Yi);return}},"handler"),i=e.bus.subscribe(r);return e.resources.register(Xi,()=>({schemaVersion:1,revision:e.resources.revision(Xi)??0,updatedAt:new Date().toISOString(),providers:[...t.providers.values()]})),e.resources.register(Yi,()=>({schemaVersion:1,revision:e.resources.revision(Yi)??0,updatedAt:new Date().toISOString(),requests:t.recentRequests.slice()})),{unsubscribe:i,uris:[Xi,Yi]}}s(Z3,"Gg"),o(Z3,"installNestReducer");import{App as a$}from"@frontmcp/sdk";import{Resource as o$,ResourceContext as l$}from"@frontmcp/sdk";var Kd=class extends l${static{s(this,"Jg")}static{o(this,"TraceRecentResource")}async execute(){return this.get(q).read("trace://recent")}};Kd=S([o$({name:"trace-recent",uri:"trace://recent",mimeType:"application/json",description:"Last 100 trace spans (flattened)."})],Kd);var d$=Kd;import{Resource as c$,ResourceContext as p$}from"@frontmcp/sdk";var Hd=class extends p${static{s(this,"Wg")}static{o(this,"TraceFailedResource")}async execute(){return this.get(q).read("trace://failed")}};Hd=S([c$({name:"trace-failed",uri:"trace://failed",mimeType:"application/json",description:"Trace spans that ended with status=error."})],Hd);var m$=Hd,q3=class{static{s(this,"Hg")}static{o(this,"TraceApp")}};q3=S([a$({id:"trace",name:"Trace",description:"Cross-process span timeline (Phase 3 \u2014 flat; Phase 7 promotes to multi-axis graph).",resources:[d$,m$]})],q3);var Qi="trace://recent",es="trace://failed";function L3(e){let t={recent:[],failed:[]},r=o(u=>{let n=u.raw??null;if(!n||n.kind!=="span"||!n.span?.name)return;let a={id:u.id,traceId:n.span.traceId,parentSpanId:n.span.parentSpanId,flowId:n.span.flowId??u.context.flowId,requestId:n.span.requestId??u.context.requestId,name:n.span.name,source:u.source,startTime:n.span.startTime??u.timestamp,endTime:n.span.endTime,durationMs:n.span.durationMs,status:n.span.status??(u.severity==="error"?"error":"ok")};Xd(t.recent,a,100),a.status==="error"&&Xd(t.failed,a,50),e.resources.markDirty(Qi),a.status==="error"&&e.resources.markDirty(es)},"handler"),i=e.bus.subscribe(r);return e.resources.register(Qi,()=>({schemaVersion:1,revision:e.resources.revision(Qi)??0,updatedAt:new Date().toISOString(),spans:t.recent.slice()})),e.resources.register(es,()=>({schemaVersion:1,revision:e.resources.revision(es)??0,updatedAt:new Date().toISOString(),spans:t.failed.slice()})),{unsubscribe:i,uris:[Qi,es]}}s(L3,"Yg"),o(L3,"installTraceReducer");function Xd(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(Xd,"Jx"),o(Xd,"pushBounded");import{App as f$}from"@frontmcp/sdk";import{Resource as g$,ResourceContext as h$}from"@frontmcp/sdk";var Yd=class extends h${static{s(this,"Qg")}static{o(this,"PerfSlowRoutesResource")}async execute(){return this.get(q).read("perf://slow-routes")}};Yd=S([g$({name:"perf-slow-routes",uri:"perf://slow-routes",mimeType:"application/json",description:"Routes that are slow NOW (\u2265 threshold on their latest call, or repeatedly lately). A one-off spike is retracted once later calls prove the route recovered; worstEver keeps the history."})],Yd);var v$=Yd;import{Resource as y$,ResourceContext as E$}from"@frontmcp/sdk";var Qd=class extends E${static{s(this,"th")}static{o(this,"PerfDuplicateRequestsResource")}async execute(){return this.get(q).read("perf://duplicate-requests")}};Qd=S([y$({name:"perf-duplicate-requests",uri:"perf://duplicate-requests",mimeType:"application/json",description:"Endpoints one page called SEVERAL TIMES CONCURRENTLY \u2014 the missing-dedupe signal (a hook fetching outside the shared resource cache, multiplied by however many components mount it). Concurrency, not count: sequential repeats are a caching question and are not reported. The threshold sits above 2 so React StrictMode\u2019s double-invoke never fires it. Two consecutive clean loads retract a finding, so a fix clears it without a restart."})],Qd);var b$=Qd,J3=class{static{s(this,"nh")}static{o(this,"PerfApp")}};J3=S([f$({id:"perf",name:"Perf",description:"Performance signals: slow server routes, and endpoints one page calls concurrently (the missing-dedupe signal).",resources:[v$,b$]})],J3);var ts="perf://slow-routes",us=20,V3=2,D$=200;function W3(e){let t=Je(e.thresholds).slowRouteMs,r=(e.now??(()=>Date.now()))(),i={routes:new Map},u=o(d=>{let p=d.raw??null;if(p?.kind!=="server-request"||!p.request)return;let{method:c,route:f}=p.request,g=p.request.durationMs??0,m=`${c} ${f}`,h=i.routes.get(m);if(h||(h={method:c,route:f,recent:[],samples:0,slowSamples:0,lastDurationMs:g,lastSeenAt:d.timestamp,worstEverMs:0,worstEverAt:d.timestamp}),i.routes.delete(m),i.routes.set(m,h),h.recent.push(g),h.recent.length>us&&h.recent.splice(0,h.recent.length-us),h.samples+=1,g>=t&&(h.slowSamples+=1),h.lastDurationMs=g,h.lastSeenAt=d.timestamp,g>h.worstEverMs&&(h.worstEverMs=g,h.worstEverAt=d.timestamp),i.routes.size>D$){let E=i.routes.keys().next().value;E!==void 0&&i.routes.delete(E)}i.lastSampleAt=Math.max(i.lastSampleAt??0,d.timestamp),i.changedAt=d.timestamp,e.resources.markDirty(ts)},"handler"),n=e.bus.subscribe(u),a=o(d=>d.recent.reduce((p,c)=>c>=t?p+1:p,0),"recentSlowCount"),l=o(d=>d.lastDurationMs>=t||a(d)>=V3,"currentlySlow");return e.resources.register(ts,()=>{let d=[...i.routes.values()].filter(l);return{schemaVersion:1,revision:e.resources.revision(ts)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,routes:d.map(p=>({method:p.method,route:p.route,worstRecentMs:Math.max(...p.recent),lastDurationMs:p.lastDurationMs,lastSeenAt:p.lastSeenAt,samples:p.samples,slowSamples:p.slowSamples,recentSlowSamples:a(p),worstEverMs:p.worstEverMs,worstEverAt:p.worstEverAt})).sort((p,c)=>c.worstRecentMs-p.worstRecentMs),routesTracked:i.routes.size,recentSampleWindow:us,minRecentSlowToKeep:V3,lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No server request has ever been observed \u2014 this is NOT evidence the backend is fast, nothing is watching. Run the backend under the dev cluster (or with @lensmcp/nest-instrumentation) so request timings reach this session.":`${i.routes.size} route${i.routes.size===1?"":"s"} observed; ${d.length} slow in the last ${us} calls each (\u2265${t}ms).`}}),{unsubscribe:n,uris:[ts]}}s(W3,"oh"),o(W3,"installPerfReducer");var rs="perf://duplicate-requests",ec=10,G3=2,w$=200,K3=300,B$=new Set(["t","_","cacheBust","ts"]);function H3(e){try{let t=new URL(e,"http://lensmcp.invalid");for(let u of[...t.searchParams.keys()])B$.has(u)&&t.searchParams.delete(u);let r=t.searchParams.toString(),i=`${t.pathname}${r?`?${r}`:""}`;return t.host==="lensmcp.invalid"?i:`${t.origin}${i}`}catch{return e}}s(H3,"Hx"),o(H3,"normalizeRequestUrl");function X3(e){if(e.length===0)return 0;let t=[];for(let{start:u,end:n}of e)t.push({at:u,delta:1}),t.push({at:n+1,delta:-1});t.sort((u,n)=>u.at-n.at||u.delta-n.delta);let r=0,i=0;for(let{delta:u}of t)r+=u,r>i&&(i=r);return i}s(X3,"Yx"),o(X3,"peakConcurrency");function Y3(e){let t=Je(e.thresholds).duplicateRequestPeak,r=(e.now??(()=>Date.now()))(),i={endpoints:new Map},u=o(d=>{if(d.category!=="network")return;let p=d.raw??null;if(p?.kind!=="fetch-done"&&p?.kind!=="fetch-error"||!p.url||!p.method)return;let c=H3(p.url),f=p.method.toUpperCase();if(typeof p.startedAt!="number")return;let g=p.startedAt,m=g+(typeof p.durationMs=="number"?p.durationMs:0),h=d.context?.originNodeId??null,E=d.context?.flowId??null,D=`${f} ${c} @ ${h??"-"}`,$=i.endpoints.get(D);if($||($={method:f,url:c,originNodeId:h,currentFlowId:E,currentIntervals:[],currentPeak:0,recentPeaks:[],totalRequests:0,lastSeenAt:d.timestamp,worstEverPeak:0,worstEverAt:d.timestamp}),i.endpoints.delete(D),i.endpoints.set(D,$),E!==$.currentFlowId&&($.currentIntervals.length>0&&($.recentPeaks.push($.currentPeak),$.recentPeaks.length>ec&&$.recentPeaks.splice(0,$.recentPeaks.length-ec)),$.currentFlowId=E,$.currentIntervals=[],$.currentPeak=0),$.currentIntervals.push({start:g,end:m}),$.currentIntervals.length>K3&&$.currentIntervals.splice(0,$.currentIntervals.length-K3),$.currentPeak=X3($.currentIntervals),$.totalRequests+=1,$.lastSeenAt=d.timestamp,$.currentPeak>$.worstEverPeak&&($.worstEverPeak=$.currentPeak,$.worstEverAt=d.timestamp),i.endpoints.size>w$){let A=i.endpoints.keys().next().value;A!==void 0&&i.endpoints.delete(A)}i.lastSampleAt=Math.max(i.lastSampleAt??0,d.timestamp),i.changedAt=d.timestamp,e.resources.markDirty(rs)},"handler"),n=e.bus.subscribe(u),a=o(d=>{let p=[...d.recentPeaks,...d.currentIntervals.length>0?[d.currentPeak]:[]],c=0;for(let f=p.length-1;f>=0&&!((p[f]??0)>=t);f-=1)c+=1;return c},"consecutiveCleanFlows"),l=o(d=>d.worstEverPeak>=t&&a(d)<G3,"currentlyDuplicated");return e.resources.register(rs,()=>{let d=[...i.endpoints.values()].filter(l);return{schemaVersion:1,revision:e.resources.revision(rs)??0,updatedAt:new Date(i.changedAt??r).toISOString(),peakThreshold:t,endpoints:d.map(p=>({method:p.method,url:p.url,originNodeId:p.originNodeId,peakConcurrent:p.currentPeak,cleanFlowsSince:a(p),flowsObserved:p.recentPeaks.length+(p.currentIntervals.length>0?1:0),totalRequests:p.totalRequests,worstEverPeak:p.worstEverPeak,worstEverAt:p.worstEverAt,lastSeenAt:p.lastSeenAt})).sort((p,c)=>c.peakConcurrent-p.peakConcurrent),endpointsTracked:i.endpoints.size,recentFlowWindow:ec,minCleanFlowsToRetract:G3,lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No browser fetch has ever been observed \u2014 this is NOT evidence the app fetches cleanly, nothing is watching. Load a page under the dev cluster so flow-fetch events reach this session.":d.length===0?`${i.endpoints.size} endpoint${i.endpoints.size===1?"":"s"} observed; none exceeded ${t} concurrent identical calls.`:`${d.length} endpoint${d.length===1?"":"s"} called \u2265${t}\xD7 concurrently \u2014 usually a hook fetching outside the shared resource cache, multiplied by however many components mount it.`}}),{unsubscribe:n,uris:[rs]}}s(Y3,"sh"),o(Y3,"installDuplicateRequestsReducer");import{App as $$}from"@frontmcp/sdk";import{Resource as C$,ResourceContext as x$}from"@frontmcp/sdk";var tc=class extends x${static{s(this,"ah")}static{o(this,"DbSlowQueriesResource")}async execute(){return this.get(q).read("db://slow-queries")}};tc=S([C$({name:"db-slow-queries",uri:"db://slow-queries",mimeType:"application/json",description:"Query shapes (project\xB7op\xB7table) whose worst observed duration crosses the slowQueryMs threshold, aggregated live from the pg instrumentation. counts are an undercount for hot shapes (the emitter flood-guards per shape); suppressedEvents carries the drop count."})],tc);var k$=tc;import{Resource as A$,ResourceContext as _$}from"@frontmcp/sdk";var uc=class extends _${static{s(this,"uh")}static{o(this,"DbAnalysisResource")}async execute(){return this.get(q).read("db://analysis")}};uc=S([A$({name:"db-analysis",uri:"db://analysis",mimeType:"application/json",description:"The latest DB analyzer run per project (missing indexes, seq-scan hot spots, unused indexes, migration-parity drift, slow statements) \u2014 ingested from the workspace analyzer's `db-analyze-run` events on the lens bus file."})],uc);var I$=uc,Q3=class{static{s(this,"dh")}static{o(this,"DbApp")}};Q3=S([$$({id:"db",name:"Db",description:"Database signals: slow query shapes observed live from the pg instrumentation, and the latest externally-ingested analyzer run (missing indexes, migration parity, unused indexes).",resources:[k$,I$]})],Q3);var ns="db://slow-queries",is="db://analysis",e6=50,S$=20,F$=200;function t6(e){let t=Je(e.thresholds).slowQueryMs,r=(e.now??(()=>Date.now()))(),i={shapes:new Map,analyzeRuns:new Map},u=o(l=>{let d=l.raw??null;if(d){if(d.kind==="db-query"){let p=d.project??"unknown",c=d.op??"query",f=d.table??"query",g=d.durationMs??0,m=`${p}|${c}|${f}`,h=i.shapes.get(m);if(h||(h={project:p,op:c,table:f,count:0,errorCount:0,totalMs:0,maxMs:0,maxAt:l.timestamp,recent:[],rowsTotal:0,lastSql:"",lastDurationMs:0,lastSeenAt:l.timestamp,suppressed:0}),i.shapes.delete(m),i.shapes.set(m,h),h.count+=1,d.error!==void 0&&(h.errorCount+=1),h.totalMs+=g,g>h.maxMs&&(h.maxMs=g,h.maxAt=l.timestamp),h.recent.push(g),h.recent.length>e6&&h.recent.splice(0,h.recent.length-e6),h.rowsTotal+=d.rows??0,d.query&&(h.lastSql=d.query),h.lastDurationMs=g,h.lastSeenAt=l.timestamp,h.suppressed+=d.floodSuppressed??0,i.shapes.size>F$){let E=i.shapes.keys().next().value;E!==void 0&&i.shapes.delete(E)}i.lastQueryAt=Math.max(i.lastQueryAt??0,l.timestamp),i.changedAt=l.timestamp,e.resources.markDirty(ns);return}if(d.kind==="db-analyze-run"){let p=d.project??"unknown";i.analyzeRuns.set(p,{project:p,runAt:d.runAt??l.timestamp,tool:d.tool??"unknown",findings:Array.isArray(d.findings)?d.findings:[]}),St(i.analyzeRuns,xr),i.lastAnalyzeAt=Math.max(i.lastAnalyzeAt??0,l.timestamp),i.changedAt=l.timestamp,e.resources.markDirty(is)}}},"handler"),n=e.bus.subscribe(u),a=o(l=>{if(l.length===0)return 0;let d=[...l].sort((p,c)=>p-c);return d[Math.min(d.length-1,Math.floor(d.length*.95))]??0},"p95");return e.resources.register(ns,()=>{let l=[...i.shapes.values()].filter(d=>d.maxMs>=t);return{schemaVersion:1,revision:e.resources.revision(ns)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,queries:l.map(d=>({project:d.project,op:d.op,table:d.table,count:d.count,errorCount:d.errorCount,maxMs:d.maxMs,maxAt:d.maxAt,avgMs:Math.round(d.totalMs/Math.max(d.count,1)*10)/10,p95Ms:a(d.recent),rowsTotal:d.rowsTotal,lastDurationMs:d.lastDurationMs,lastSeenAt:d.lastSeenAt,lastSql:d.lastSql,suppressedEvents:d.suppressed})).sort((d,p)=>p.maxMs-d.maxMs).slice(0,S$),shapesTracked:i.shapes.size,note:"count/avg are an UNDERCOUNT for hot shapes: the emitter flood-guards each query-shape fingerprint at 30 burst / 5 events/s; suppressedEvents is the emitter's own count of dropped events.",lastSampleAt:i.lastQueryAt,producer:i.lastQueryAt===void 0?"none":"connected",detail:i.lastQueryAt===void 0?"No db-query event has ever been observed \u2014 this is NOT evidence queries are fast, nothing is watching. Run the backend under the dev cluster (the @lensmcp/cluster serve preload taps pg) so query timings reach this session.":`${i.shapes.size} query shape${i.shapes.size===1?"":"s"} observed; ${l.length} with a worst duration \u2265${t}ms.`}}),e.resources.register(is,()=>{let l=[...i.analyzeRuns.values()].sort((p,c)=>c.runAt-p.runAt),d=l.reduce((p,c)=>p+c.findings.length,0);return{schemaVersion:1,revision:e.resources.revision(is)??0,updatedAt:new Date(i.changedAt??r).toISOString(),runs:l,findingCount:d,lastSampleAt:i.lastAnalyzeAt,producer:i.lastAnalyzeAt===void 0?"none":"connected",detail:i.lastAnalyzeAt===void 0?"No db-analyze run has ever been ingested \u2014 this is NOT evidence the schema is healthy, nothing has analyzed it. Run the workspace's DB analyzer (it appends a `db-analyze-run` event to the lens bus file) to populate this.":`${l.length} analyze run${l.length===1?"":"s"} held (latest per project); ${d} finding${d===1?"":"s"}.`}}),{unsubscribe:n,uris:[ns,is]}}s(t6,"ph"),o(t6,"installDbReducer");import{App as z$}from"@frontmcp/sdk";import{Resource as j$,ResourceContext as N$}from"@frontmcp/sdk";var rc=class extends N${static{s(this,"fh")}static{o(this,"NetEgressHostsResource")}async execute(){return this.get(q).read("net://egress/hosts")}};rc=S([j$({name:"net-egress-hosts",uri:"net://egress/hosts",mimeType:"application/json",description:"External hosts this backend called (pod \u2192 third party), rolled up per project\xB7host with count, error/4xx/5xx counters, p95 and worst duration, plus the top endpoints under each. `slow` and `failing` are retracted by later healthy responses, so a one-off blip does not warn all day."})],rc);var O$=rc;import{Resource as R$,ResourceContext as T$}from"@frontmcp/sdk";var nc=class extends T${static{s(this,"gh")}static{o(this,"NetEgressRecentResource")}async execute(){return this.get(q).read("net://egress/recent")}};nc=S([R$({name:"net-egress-recent",uri:"net://egress/recent",mimeType:"application/json",description:"The last 200 outbound calls with their RAW path and the flowId that caused them \u2014 the evidence behind net://egress/hosts. Query strings are never captured; treat this as the sensitive view, since a path segment can itself be a secret."})],nc);var M$=nc;import{Resource as P$,ResourceContext as U$}from"@frontmcp/sdk";var ic=class extends U${static{s(this,"vh")}static{o(this,"NetEgressFailuresResource")}async execute(){return this.get(q).read("net://egress/failures")}};ic=S([P$({name:"net-egress-failures",uri:"net://egress/failures",mimeType:"application/json",description:"Outbound calls that failed \u2014 transport errors and any status \u2265 400 \u2014 kept in their own ring so a high-volume host cannot evict the one failure you need. Empty is NOT proof nothing failed: check `producer`."})],ic);var Z$=ic,u6=class{static{s(this,"bh")}static{o(this,"NetApp")}};u6=S([z$({id:"net",name:"Net",description:"Outbound (egress) HTTP the backend makes to THIRD PARTIES \u2014 which external services, how often, how slow, and whether they failed. The server-side twin of runtime://browser/network. Internal service-to-service traffic is deliberately absent: the gateway already attributes it.",resources:[O$,M$,Z$]})],u6);var ss="net://egress/hosts",as="net://egress/recent",os="net://egress/failures",Eu=20,q$=25,L$=200,J$=20,V$=5,r6=200,n6=50,i6=2;function s6(e){return e.length===0?!1:!!(/^\d{2,}$/.test(e)||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[A-Z][A-Z0-9]*-\d+$/.test(e)||e.length>=16&&/^[A-Za-z0-9_-]+$/.test(e)&&/\d/.test(e))}s(s6,"xA"),o(s6,"isIdSegment");function a6(e){let[t="/"]=e.split("?"),r=t.split("/"),i=[];for(let n of r){if(i.length>12){i.push("\u2026");break}i.push(s6(n)?":id":n)}let u=i.join("/");return u.length===0?"/":u}s(a6,"n$"),o(a6,"templatisePath");function o6(e){let t=Je(e.thresholds).slowEgressMs,r=(e.now??(()=>Date.now()))(),i={hosts:new Map,recent:[],failures:[]},u=o(c=>{let f=c.raw??null;if(!f||f.kind!=="egress")return;let g=f.project??"unknown",m=f.host??"unknown",h=(f.method??"GET").toUpperCase(),E=f.durationMs??0,D=typeof f.status=="number"?f.status:void 0,$=f.error===void 0?void 0:String(f.error),A=$!==void 0||D!==void 0&&D>=400,I=f.path??"(path not captured \u2014 upgrade @lensmcp/node-instrumentation)",j=`${g}|${m}`,F=i.hosts.get(j);F||(F={project:g,host:m,count:0,errorCount:0,status4xx:0,status5xx:0,totalMs:0,maxMs:0,maxAt:c.timestamp,recent:[],outcomes:[],firstSeenAt:c.timestamp,lastSeenAt:c.timestamp,lastDurationMs:0,lastBad:!1,suppressed:0,endpoints:new Map}),i.hosts.delete(j),i.hosts.set(j,F),F.count+=1,$!==void 0&&(F.errorCount+=1),D!==void 0&&D>=400&&D<500&&(F.status4xx+=1),D!==void 0&&D>=500&&(F.status5xx+=1),F.totalMs+=E,E>F.maxMs&&(F.maxMs=E,F.maxAt=c.timestamp),F.recent.push(E),F.recent.length>Eu&&F.recent.splice(0,F.recent.length-Eu),F.outcomes.push(A),F.outcomes.length>Eu&&F.outcomes.splice(0,F.outcomes.length-Eu),F.lastDurationMs=E,F.lastBad=A,F.lastSeenAt=c.timestamp,F.suppressed+=f.floodSuppressed??0;let b=a6(I),w=`${h} ${b}`,C=F.endpoints.get(w);if(C||(C={method:h,path:b,count:0,errorCount:0,status4xx:0,status5xx:0,totalMs:0,maxMs:0,recent:[],lastDurationMs:0,lastSeenAt:c.timestamp}),F.endpoints.delete(w),F.endpoints.set(w,C),C.count+=1,$!==void 0&&(C.errorCount+=1,C.lastError=$),D!==void 0&&D>=400&&D<500&&(C.status4xx+=1),D!==void 0&&D>=500&&(C.status5xx+=1),C.totalMs+=E,E>C.maxMs&&(C.maxMs=E),C.recent.push(E),C.recent.length>Eu&&C.recent.splice(0,C.recent.length-Eu),C.lastStatus=D,C.lastDurationMs=E,C.lastSeenAt=c.timestamp,F.endpoints.size>J$){let te=F.endpoints.keys().next().value;te!==void 0&&F.endpoints.delete(te)}if(i.hosts.size>L$){let te=i.hosts.keys().next().value;te!==void 0&&i.hosts.delete(te)}let N=c.context??{},O={id:c.id,timestamp:c.timestamp,project:g,method:h,host:m,path:I,...D!==void 0?{status:D}:{},...$!==void 0?{error:$}:{},durationMs:E,...N.flowId?{flowId:N.flowId}:{},...N.requestId?{requestId:N.requestId}:{}};i.recent.push(O),i.recent.length>r6&&i.recent.splice(0,i.recent.length-r6),A&&(i.failures.push(O),i.failures.length>n6&&i.failures.splice(0,i.failures.length-n6),e.resources.markDirty(os)),i.lastSampleAt=Math.max(i.lastSampleAt??0,c.timestamp),i.changedAt=c.timestamp,e.resources.markDirty(ss),e.resources.markDirty(as)},"handler"),n=e.bus.subscribe(u),a=o(c=>{if(c.length===0)return 0;let f=[...c].sort((g,m)=>g-m);return f[Math.min(f.length-1,Math.floor(f.length*.95))]??0},"p95"),l=o(c=>c.lastDurationMs>=t||c.recent.filter(f=>f>=t).length>=i6,"isSlow"),d=o(c=>c.lastBad||c.outcomes.filter(Boolean).length>=i6,"isFailing"),p=o(c=>{let f=c.outcomes.filter(Boolean).length;return d(c)?`${f} of the last ${c.outcomes.length} call${c.outcomes.length===1?"":"s"} failed`:l(c)?`${c.recent.filter(g=>g>=t).length} of the last ${c.recent.length} call${c.recent.length===1?"":"s"} took \u2265${t}ms`:"healthy"},"describe");return e.resources.register(ss,()=>{let c=[...i.hosts.values()],f=c.filter(d),g=c.filter(m=>!d(m)&&l(m));return{schemaVersion:1,revision:e.resources.revision(ss)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,hosts:c.map(m=>({project:m.project,host:m.host,count:m.count,errorCount:m.errorCount,status4xx:m.status4xx,status5xx:m.status5xx,avgMs:Math.round(m.totalMs/Math.max(m.count,1)*10)/10,p95Ms:a(m.recent),maxMs:m.maxMs,maxAt:m.maxAt,lastDurationMs:m.lastDurationMs,firstSeenAt:m.firstSeenAt,lastSeenAt:m.lastSeenAt,slow:l(m),failing:d(m),detail:p(m),suppressedEvents:m.suppressed,endpoints:[...m.endpoints.values()].map(h=>({method:h.method,path:h.path,count:h.count,errorCount:h.errorCount,status4xx:h.status4xx,status5xx:h.status5xx,avgMs:Math.round(h.totalMs/Math.max(h.count,1)*10)/10,p95Ms:a(h.recent),maxMs:h.maxMs,...h.lastStatus!==void 0?{lastStatus:h.lastStatus}:{},...h.lastError!==void 0?{lastError:h.lastError}:{},lastSeenAt:h.lastSeenAt})).sort((h,E)=>E.maxMs-h.maxMs).slice(0,V$)})).sort((m,h)=>m.failing!==h.failing?m.failing?-1:1:h.maxMs-m.maxMs).slice(0,q$),hostsTracked:i.hosts.size,failingHosts:f.length,slowHosts:g.length,note:"count/avg are an UNDERCOUNT for hot hosts: the emitter flood-guards each host fingerprint at 30 burst / 5 events/s; suppressedEvents is the emitter's own count of dropped events. Query strings are not captured; endpoint paths are templatised (\u2026/:id).",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 this is NOT evidence the app makes no external calls, nothing is watching. Run the backend under the dev cluster (the @lensmcp/cluster serve preload taps fetch and http/https) so outbound calls reach this session. Internal destinations (*.local, loopback, RFC1918) are skipped by design \u2014 the gateway already attributes service-to-service traffic.":`${i.hosts.size} external host${i.hosts.size===1?"":"s"} observed; ${f.length} failing, ${g.length} slower than ${t}ms.`}}),e.resources.register(as,()=>({schemaVersion:1,revision:e.resources.revision(as)??0,updatedAt:new Date(i.changedAt??r).toISOString(),entries:[...i.recent],count:i.recent.length,note:"Raw paths, as requested. flowId joins an outbound call back to the click that caused it. Treat this as the sensitive view: a path segment can itself be a secret (a presigned key, a reset token), which the templatised rollup collapses but this does not.",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 this is NOT evidence the app makes no external calls, nothing is watching.":`${i.recent.length} recent outbound call${i.recent.length===1?"":"s"}.`})),e.resources.register(os,()=>({schemaVersion:1,revision:e.resources.revision(os)??0,updatedAt:new Date(i.changedAt??r).toISOString(),entries:[...i.failures],count:i.failures.length,note:"A separate ring from net://egress/recent on purpose: a host called 200\xD7/min would otherwise evict the one 503 you need.",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 an empty list here is NOT evidence that nothing failed, nothing is watching.":`${i.failures.length} failed outbound call${i.failures.length===1?"":"s"} held.`})),{unsubscribe:n,uris:[ss,as,os]}}s(o6,"wh"),o(o6,"installNetReducer");import{App as W$}from"@frontmcp/sdk";import{Resource as G$,ResourceContext as K$}from"@frontmcp/sdk";var sc=class extends K${static{s(this,"xh")}static{o(this,"VisualCurrentResource")}async execute(){return this.get(q).read("visual://current")}};sc=S([G$({name:"visual-current",uri:"visual://current",mimeType:"application/json",description:"Most recent visual-frame (causedBy, changedNodes, stable)."})],sc);var H$=sc;import{Resource as X$,ResourceContext as Y$}from"@frontmcp/sdk";var ac=class extends Y${static{s(this,"_h")}static{o(this,"VisualViolationsCurrentResource")}async execute(){return this.get(q).read("visual://violations/current")}};ac=S([X$({name:"visual-violations-current",uri:"visual://violations/current",mimeType:"application/json",description:"Violations of the CURRENT frame, regardless of timing mode. Every rule re-runs per frame, so a fixed violation simply stops being reported."})],ac);var Q$=ac;import{Resource as e2,ResourceContext as t2}from"@frontmcp/sdk";var oc=class extends t2{static{s(this,"Sh")}static{o(this,"VisualViolationsStableResource")}async execute(){return this.get(q).read("visual://violations/stable")}};oc=S([e2({name:"visual-violations-stable",uri:"visual://violations/stable",mimeType:"application/json",description:'Violations from rules with timing "after-animation" | "stable-only" | "always".'})],oc);var u2=oc;import{Resource as r2,ResourceContext as n2}from"@frontmcp/sdk";var lc=class extends n2{static{s(this,"Rh")}static{o(this,"VisualViolationsDuringAnimationResource")}async execute(){return this.get(q).read("visual://violations/during-animation")}};lc=S([r2({name:"visual-violations-during-animation",uri:"visual://violations/during-animation",mimeType:"application/json",description:"Violations seen on midpoint (during-animation) samples only."})],lc);var i2=lc;import{Resource as s2,ResourceContext as a2}from"@frontmcp/sdk";var dc=class extends a2{static{s(this,"Eh")}static{o(this,"VisualRulesResource")}async execute(){return this.get(q).read("visual://rules")}};dc=S([s2({name:"visual-rules",uri:"visual://rules",mimeType:"application/json",description:"All registered visual rules (builtins + lensmcp.rules.json + visual.register_rule)."})],dc);var o2=dc;import{Resource as l2,ResourceContext as d2}from"@frontmcp/sdk";var cc=class extends d2{static{s(this,"zh")}static{o(this,"VisualTokensResource")}async execute(){return this.get(q).read("visual://tokens")}};cc=S([l2({name:"visual-tokens",uri:"visual://tokens",mimeType:"application/json",description:"Resolved design tokens from lensmcp.tokens.json."})],cc);var c2=cc;import{Tool as p2,ToolContext as m2,z as l6}from"@frontmcp/sdk";import{existsSync as f2,mkdirSync as g2,readFileSync as h2,writeFileSync as v2}from"node:fs";import{dirname as y2,join as pc}from"node:path";function d6(e=process.env,t=process.cwd()){let r=e.LENSMCP_EVENT_FILE;return r?y2(r):pc(t,".lensmcp")}s(d6,"o$"),o(d6,"captureDir");function c6(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(c6,"UA"),o(c6,"pidAlive");function p6(e,t=c6){let r=pc(e,bb);try{if(!f2(r))return;let i=JSON.parse(h2(r,"utf8"));return typeof i?.pid!="number"||!Number.isFinite(i.pid)?void 0:t(i.pid)?i:void 0}catch{return}}s(p6,"i$"),o(p6,"liveRunner");function m6(e,t){try{return g2(e,{recursive:!0}),v2(pc(e,Eb),JSON.stringify(t)),!0}catch{return!1}}s(m6,"s$"),o(m6,"publishCaptureRequest");var mc;async function f6(e,t){let r=mc;if(r)return{fresh:await r.promise,coalesced:!0,requestId:r.requestId};let i=t().finally(()=>{mc=void 0});return mc={promise:i,requestId:e},{fresh:await i,coalesced:!1,requestId:e}}s(f6,"a$"),o(f6,"captureSingleFlight");async function g6(e){let t=e.now??(()=>Date.now()),r=e.sleep??(a=>new Promise(l=>setTimeout(l,a))),i=e.budgetMs??8e3,u=e.pollMs??100,n=t()+i;for(;t()<n;){await r(u);let a=await e.readFrameId();if(a!==void 0&&a!==e.before)return!0}return!1}s(g6,"c$"),o(g6,"waitForFreshFrame");var fc=class extends m2{static{s(this,"Ph")}static{o(this,"VisualCaptureFrameTool")}async execute(e){let t=this.get(Fl),r=this.get(q),i=o(async()=>(await r.read("visual://current"))?.frame?.id,"readFrameId"),u=await i(),n=qt(),a=Date.now();t.publish({id:qt(),sessionId:"visual.capture_frame",timestamp:a,source:"visual",category:"visual",severity:"info",context:{sessionId:"visual.capture_frame"},fingerprint:`visual-capture-request:${e.cause}`,title:`visual.capture_frame(${e.cause})`,raw:{kind:"visual-capture-request",cause:e.cause,stable:e.stable,requestId:n}});let l=d6(),d=p6(l),p=!1,c=await f6(n,async()=>(p=m6(l,{requestedAt:a,cause:e.cause,stable:e.stable,requestId:n}),p&&d?await g6({readFrameId:i,before:u}):!1));return{requested:c.coalesced?!0:p,cause:e.cause,stable:e.stable,fresh:c.fresh,coalesced:c.coalesced,requestId:c.requestId,waitedMs:Date.now()-a,runner:d?{pid:d.pid,url:d.url}:void 0,latest:await r.read("visual://current")}}};fc=S([p2({name:"visual.capture_frame",description:"Capture a fresh visual frame. Signals the host capture runner (which launches a headless browser on demand), waits for the new frame, and returns it. Frames are captured per request \u2014 no browser is held open between calls.",inputSchema:{cause:l6.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]).default("user-action").describe("Hint why this frame is being requested."),stable:l6.boolean().default(!0).describe("Whether to treat the captured frame as the stable final state.")}})],fc);var E2=fc;import{Tool as b2,ToolContext as D2,z as w2}from"@frontmcp/sdk";var gc=class extends D2{static{s(this,"Mh")}static{o(this,"VisualInspectNodeTool")}async execute(e){let t=await this.get(q).read("visual://current");if(!t.frame)return{found:!1,uid:e.uid};let r=t.frame.changedNodes.filter(i=>i.uid===e.uid);return{found:r.length>0,uid:e.uid,frameId:t.frame.id,changes:r}}};gc=S([b2({name:"visual.inspect_node",description:"Returns the changedNodes entry for `uid` from visual://current \u2014 the per-property before/after used to compute the latest frame.",inputSchema:{uid:w2.string().describe('Node uid as it appeared in visual://current.changedNodes (e.g. "hero-card" or "bid:42").')}})],gc);var B2=gc;import{Tool as $2,ToolContext as C2,z as x2}from"@frontmcp/sdk";var hc=class extends C2{static{s(this,"Uh")}static{o(this,"VisualCompareFramesTool")}async execute(e){let t=await this.get(q).read("visual://current");return t.frame?e.frameId&&e.frameId!==t.frame.id?{found:!1,reason:"Only the latest frame is retained in Phase 4."}:{found:!0,frameId:t.frame.id,causedBy:t.frame.causedBy,changedCount:t.frame.changedNodes.length,appeared:t.frame.appearedNodes.length,disappeared:t.frame.disappearedNodes.length,changedNodes:t.frame.changedNodes.slice(0,50)}:{found:!1}}};hc=S([$2({name:"visual.compare_frames",description:"Summarises the last visual-frame. Phase 4 ships a single-frame view (Phase 6 adds story-relative deltas).",inputSchema:{frameId:x2.string().optional().describe("Optional frame id; defaults to the latest.")}})],hc);var k2=hc;import{Tool as A2,ToolContext as _2,z as I2}from"@frontmcp/sdk";var vc=class extends _2{static{s(this,"Fh")}static{o(this,"VisualExplainViolationTool")}async execute(e){let t=(await this.get(q).read("visual://violations/current")).violations.find(r=>r.id===e.violationId);return t?{found:!0,violation:t,explanation:h6(t)}:{found:!1,violationId:e.violationId}}};vc=S([A2({name:"visual.explain_violation",description:"Returns the full violation record (rule id + expected/actual + evidence.cssCause / trace / screenshot crop URIs) for a given violationId.",inputSchema:{violationId:I2.string().describe("Id of the violation as seen in visual://violations/current.")}})],vc);var S2=vc;function h6(e){let t=[`Rule ${e.ruleId} (${e.ruleType}) at ${e.element.component??e.element.uid}.`,`Expected: ${JSON.stringify(e.expected)}`,`Actual: ${JSON.stringify(e.actual)}`];return e.evidence.cssCause&&t.push(`CSS cause: ${e.evidence.cssCause.selector} { ${e.evidence.cssCause.declaration??"?"} }`+(e.evidence.cssCause.file?` @ ${e.evidence.cssCause.file}:${e.evidence.cssCause.line??"?"}`:"")),e.evidence.trace&&t.push(`Trace: ${e.evidence.trace}`),e.evidence.screenshotCrop&&t.push(`Crop: ${e.evidence.screenshotCrop}`),t.join(`
|
|
70
|
-
`)}s(h6,"HA"),o(h6,"buildExplanation");import{Tool as F2,ToolContext as z2,z as Fe}from"@frontmcp/sdk";var yc=class extends z2{static{s(this,"Bh")}static{o(this,"VisualRegisterRuleTool")}async execute(e){let t=this.get(Fl),r=this.get(q);return t.publish({id:qt(),sessionId:"visual.register_rule",timestamp:Date.now(),source:"visual",category:"visual",severity:"info",context:{sessionId:"visual.register_rule"},fingerprint:`visual-rule-registered:${e.id}`,title:`visual.register_rule(${e.id})`,raw:{kind:"visual-rule-registered",rule:{id:e.id,type:e.type,target:e.target,severity:e.severity,timing:e.timing,expected:e.expected,breakpoints:e.breakpoints}}}),{registered:!0,rule:{id:e.id,type:e.type,target:e.target},rules:await r.read("visual://rules")}}};yc=S([F2({name:"visual.register_rule",description:"Register (or replace) a visual rule. Publishes a `visual-rule-registered` event; the host driver (and reducer) pick it up. The rule applies to subsequent frames only.",inputSchema:{id:Fe.string().describe("Stable rule id; replaces a prior rule with the same id."),type:Fe.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]).describe("Built-in rule type to evaluate."),target:Fe.string().optional().describe('CSS-like selector / role:label / [data-agent-component="\u2026"]; default = every node.'),severity:Fe.enum(["info","warning","error"]).default("warning"),timing:Fe.enum(["always","after-animation","stable-only","during-animation"]).default("always"),expected:Fe.record(Fe.string(),Fe.unknown()).default({}).describe('Rule-type-specific expectations (e.g. { gap: "spacing.6" }).'),breakpoints:Fe.record(Fe.string(),Fe.record(Fe.string(),Fe.unknown())).optional().describe("Per-breakpoint expectation overrides for the responsive rule type.")}})],yc);var j2=yc,v6=class{static{s(this,"Vh")}static{o(this,"VisualApp")}};v6=S([W$({id:"visual",name:"Visual",description:"Visual rule engine: DOMSnapshot/LayerTree diffs, grid/alignment/overflow/contrast/z-index rules, design tokens.",resources:[H$,Q$,u2,i2,o2,c2],tools:[E2,B2,k2,S2,j2]})],v6);var Or="visual://current",Rr="visual://violations/current",Tr="visual://violations/stable",Mr="visual://violations/during-animation",Pr="visual://rules",Ur="visual://tokens";function y6(e){let t=(e.now??(()=>Date.now()))(),r={violations:[],rules:[],framesSeen:0,changedAt:new Map},i=o((p,c)=>{r.changedAt.set(p,c),e.resources.markDirty(p)},"touch"),u=o(p=>{i(Rr,p),i(Tr,p),i(Mr,p)},"touchViolationViews"),n=o(p=>{let c=p.raw??null;if(c?.kind)switch(c.kind){case"visual-frame":{let f=c.frame;if(!f)return;r.currentFrame=f,r.lastFrameAt=p.timestamp,r.framesSeen+=1,i(Or,p.timestamp);let g=r.violations.length;r.violations=r.violations.filter(m=>m.frameId===f.id),g!==r.violations.length&&u(p.timestamp);return}case"visual-violation":if(!c.violation)return;r.violations.push(c.violation),r.violations.length>50&&r.violations.splice(0,r.violations.length-50),u(p.timestamp);return;case"visual-rule-registered":{let f=c.rule;if(!f)return;let g=r.rules.findIndex(m=>m.id===f.id);g>=0&&r.rules.splice(g,1),r.rules.push(f),r.rules.length>500&&r.rules.splice(0,r.rules.length-500),i(Pr,p.timestamp);return}case"visual-tokens-loaded":if(!c.tokens)return;r.tokens=c.tokens,i(Ur,p.timestamp);return;default:return}},"handler"),a=e.bus.subscribe(n),l=o(p=>new Date(r.changedAt.get(p)??t).toISOString(),"stamp"),d=o(()=>({framesSeen:r.framesSeen,lastFrameAt:r.lastFrameAt,currentFrameId:r.currentFrame?.id,producer:r.framesSeen===0?"none":"connected",detail:r.framesSeen===0?"No visual frame has ever been captured \u2014 an empty violation list is NOT evidence the UI is correct, nothing is looking. Drive a capture (visual_capture_frame) or run the browser-capture loop so frames reach this session.":`${r.framesSeen} frame${r.framesSeen===1?"":"s"} captured; ${r.rules.length} rule${r.rules.length===1?"":"s"} registered. Violations are those of the CURRENT frame \u2014 every rule is re-run per frame, so anything fixed simply stops being reported.`}),"captureHealth");return e.resources.register(Or,()=>({schemaVersion:1,revision:e.resources.revision(Or)??0,updatedAt:l(Or),frame:r.currentFrame??null,...d()})),e.resources.register(Rr,()=>({schemaVersion:1,revision:e.resources.revision(Rr)??0,updatedAt:l(Rr),violations:r.violations.slice(),...d()})),e.resources.register(Tr,()=>({schemaVersion:1,revision:e.resources.revision(Tr)??0,updatedAt:l(Tr),violations:r.violations.filter(p=>p.timing==="after-animation"||p.timing==="stable-only"||p.timing==="always"),...d()})),e.resources.register(Mr,()=>({schemaVersion:1,revision:e.resources.revision(Mr)??0,updatedAt:l(Mr),violations:r.violations.filter(p=>p.timing==="during-animation"),...d()})),e.resources.register(Pr,()=>({schemaVersion:1,revision:e.resources.revision(Pr)??0,updatedAt:l(Pr),rules:r.rules.slice()})),e.resources.register(Ur,()=>({schemaVersion:1,revision:e.resources.revision(Ur)??0,updatedAt:l(Ur),tokens:r.tokens??null})),{unsubscribe:a,uris:[Or,Rr,Tr,Mr,Pr,Ur]}}s(y6,"Gh"),o(y6,"installVisualReducer");import{App as N2}from"@frontmcp/sdk";import{Resource as O2,ResourceContext as R2}from"@frontmcp/sdk";var Ec=class extends R2{static{s(this,"Jh")}static{o(this,"ReactPagesCurrentResource")}async execute(){return this.get(q).read("react://pages/current")}};Ec=S([O2({name:"react-pages-current",uri:"react://pages/current",mimeType:"application/json",description:"The most recently active React page (from <LensmcpRoot>)."})],Ec);var T2=Ec;import{Resource as M2,ResourceContext as P2}from"@frontmcp/sdk";var bc=class extends P2{static{s(this,"Wh")}static{o(this,"ReactComponentsHotResource")}async execute(){return this.get(q).read("react://components/hot")}};bc=S([M2({name:"react-components-hot",uri:"react://components/hot",mimeType:"application/json",description:"Components ranked by render count this session."})],bc);var U2=bc;import{Resource as Z2,ResourceContext as q2}from"@frontmcp/sdk";var Dc=class extends q2{static{s(this,"Hh")}static{o(this,"ReactRendersSlowResource")}async execute(){return this.get(q).read("react://renders/slow")}};Dc=S([Z2({name:"react-renders-slow",uri:"react://renders/slow",mimeType:"application/json",description:"Renders with actualDurationMs >= threshold (default 16ms)."})],Dc);var L2=Dc;import{Resource as J2,ResourceContext as V2}from"@frontmcp/sdk";var wc=class extends V2{static{s(this,"Qh")}static{o(this,"ReactRendersRecentResource")}async execute(){return this.get(q).read("react://renders/recent")}};wc=S([J2({name:"react-renders-recent",uri:"react://renders/recent",mimeType:"application/json",description:"Last 100 render commits with attribution (why)."})],wc);var W2=wc;import{Resource as G2,ResourceContext as K2}from"@frontmcp/sdk";var Bc=class extends K2{static{s(this,"tv")}static{o(this,"ReactEffectsRecentResource")}async execute(){return this.get(q).read("react://effects/recent")}};Bc=S([G2({name:"react-effects-recent",uri:"react://effects/recent",mimeType:"application/json",description:"Last 100 useEffect runs/cleanups from tracedUseEffect."})],Bc);var H2=Bc;import{Resource as X2,ResourceContext as Y2}from"@frontmcp/sdk";var $c=class extends Y2{static{s(this,"nv")}static{o(this,"ReactMemosRecomputedResource")}async execute(){return this.get(q).read("react://memos/recomputed")}};$c=S([X2({name:"react-memos-recomputed",uri:"react://memos/recomputed",mimeType:"application/json",description:"Recent useMemo recomputations (depsHash changed)."})],$c);var Q2=$c;import{Resource as eC,ResourceContext as tC}from"@frontmcp/sdk";var Cc=class extends tC{static{s(this,"iv")}static{o(this,"ReactHooksRecentResource")}async execute(){return this.get(q).read("react://hooks/recent")}};Cc=S([eC({name:"react-hooks-recent",uri:"react://hooks/recent",mimeType:"application/json",description:"Recent hook-run events (useMemo / useCallback)."})],Cc);var uC=Cc;import{Tool as rC,ToolContext as nC,z as xc}from"@frontmcp/sdk";var kc=class extends nC{static{s(this,"cv")}static{o(this,"GraphExplainRerenderTool")}async execute(e){let t=await this.get(q).read("react://renders/recent"),r;if(e.renderNodeId)r=t.renders.find(u=>u.id===e.renderNodeId);else if(e.componentInstanceId)for(let u=t.renders.length-1;u>=0;u--){let n=t.renders[u];if(n&&n.componentInstanceId===e.componentInstanceId){r=n;break}}else if(e.componentLogicalId)for(let u=t.renders.length-1;u>=0;u--){let n=t.renders[u];if(n&&n.componentLogicalId===e.componentLogicalId){r=n;break}}if(!r)return{found:!1,searched:e};let i=(r.why??[]).map(u=>({...u,summary:E6(u)}));return{found:!0,renderNodeId:r.id,componentInstanceId:r.componentInstanceId,componentLogicalId:r.componentLogicalId,componentName:r.componentName,page:r.page,route:r.route,phase:r.phase,actualDurationMs:r.actualDurationMs,why:i,parentRenderId:r.parentRenderId}}};kc=S([rC({name:"graph.explain_rerender",description:"Returns the most recent render record for a component (by `renderNodeId`, `componentInstanceId`, or `componentLogicalId`), with its `why` causal list (valtio-path / parent-render / hook-dep-changed / props / context / react-state / force).",inputSchema:{renderNodeId:xc.string().optional().describe("Exact render commit id from react://renders/recent."),componentInstanceId:xc.string().optional().describe("Component instance id; resolves to that instance\u2019s last render."),componentLogicalId:xc.string().optional().describe("Component logical id (e.g. react:component:src/App.tsx:CardGrid); resolves to its most recent render across HMR generations.")}})],kc);var iC=kc;function E6(e){switch(e.type){case"valtio-path":return`valtio path ${String(e.path)} changed (${e.changedKeys?.join(",")??""})`;case"react-state":return`useState hook #${String(e.hookIndex)} changed`;case"context":return`context ${String(e.contextName)} changed`;case"props":return`prop(s) changed: ${e.changedKeys?.join(",")??""}`;case"parent-render":return`parent render ${String(e.parentRenderId)} triggered this`;case"hook-dep-changed":return`hook ${String(e.hookInstanceId)} deps changed`;case"force":return`forced render: ${String(e.reason)}`;default:return`unknown cause: ${JSON.stringify(e)}`}}s(E6,"vz"),o(E6,"summariseWhy");var b6=class{static{s(this,"lv")}static{o(this,"ReactApp")}};b6=S([N2({id:"react",name:"React",description:"React render attribution: pages, hot components, slow renders, hook + effect + memo events. Hosts graph.explain_rerender.",resources:[T2,U2,L2,W2,H2,Q2,uC],tools:[iC]})],b6);var Zr="react://pages/current",ls="react://components/hot",ds="react://renders/slow",cs="react://renders/recent",ps="react://effects/recent",ms="react://memos/recomputed",fs="react://hooks/recent",gs=100,Ac=50,D6=500;function w6(e){let t=Je(e.thresholds).slowRenderMs,r={rendersRecent:[],rendersSlow:[],effectsRecent:[],hooksRecent:[],memosRecomputed:[],rendersByInstance:new Map,hotByLogical:new Map},i=o(n=>{if(n.source!=="react")return;let a=n.raw??null;if(a?.kind)switch(a.kind){case"render":{let l=a.render;if(!l)return;if(bu(r.rendersRecent,l,gs),r.rendersByInstance.delete(l.componentInstanceId),r.rendersByInstance.set(l.componentInstanceId,l),r.rendersByInstance.size>D6){for(let p of r.rendersByInstance.keys())if(r.rendersByInstance.delete(p),r.rendersByInstance.size<=D6)break}l.actualDurationMs>=t&&(bu(r.rendersSlow,l,Ac),r.rendersSlow.sort((p,c)=>c.actualDurationMs-p.actualDurationMs),r.rendersSlow.length>Ac&&(r.rendersSlow.length=Ac));let d=r.hotByLogical.get(l.componentLogicalId);d?(d.renderCount+=1,d.totalActualMs+=l.actualDurationMs,d.lastRenderId=l.id):r.hotByLogical.set(l.componentLogicalId,{componentLogicalId:l.componentLogicalId,componentName:l.componentName,renderCount:1,totalActualMs:l.actualDurationMs,lastRenderId:l.id}),(l.page||l.route)&&(r.currentPage={page:l.page??"(unknown)",route:l.route,updatedAt:n.timestamp},e.resources.markDirty(Zr)),e.resources.markDirty(cs),e.resources.markDirty(ls),l.actualDurationMs>=t&&e.resources.markDirty(ds);return}case"effect-run":{let l=a.effect;if(!l)return;bu(r.effectsRecent,l,gs),e.resources.markDirty(ps);return}case"hook-run":{let l=a.hook;if(!l)return;bu(r.hooksRecent,l,gs),e.resources.markDirty(fs),l.recomputed&&l.hookType==="useMemo"&&(bu(r.memosRecomputed,l,gs),e.resources.markDirty(ms));return}case"component-mount":case"component-unmount":{let l=a.component;if(!l)return;(l.page||l.route)&&(r.currentPage={page:l.page??"(unknown)",route:l.route,updatedAt:n.timestamp},e.resources.markDirty(Zr));return}default:return}},"handler"),u=e.bus.subscribe(i);return e.resources.register(Zr,()=>({schemaVersion:1,revision:e.resources.revision(Zr)??0,updatedAt:new Date().toISOString(),page:r.currentPage??null})),e.resources.register(ls,()=>({schemaVersion:1,revision:e.resources.revision(ls)??0,updatedAt:new Date().toISOString(),components:[...r.hotByLogical.values()].sort((n,a)=>a.renderCount-n.renderCount)})),e.resources.register(ds,()=>({schemaVersion:1,revision:e.resources.revision(ds)??0,updatedAt:new Date().toISOString(),thresholdMs:t,renders:r.rendersSlow.slice()})),e.resources.register(cs,()=>({schemaVersion:1,revision:e.resources.revision(cs)??0,updatedAt:new Date().toISOString(),renders:r.rendersRecent.slice()})),e.resources.register(ps,()=>({schemaVersion:1,revision:e.resources.revision(ps)??0,updatedAt:new Date().toISOString(),effects:r.effectsRecent.slice()})),e.resources.register(ms,()=>({schemaVersion:1,revision:e.resources.revision(ms)??0,updatedAt:new Date().toISOString(),memos:r.memosRecomputed.slice()})),e.resources.register(fs,()=>({schemaVersion:1,revision:e.resources.revision(fs)??0,updatedAt:new Date().toISOString(),hooks:r.hooksRecent.slice()})),{unsubscribe:u,uris:[Zr,ls,ds,cs,ps,ms,fs],lookups:{latestRenderFor(n){return r.rendersByInstance.get(n)},latestRenderForLogical(n){if(r.hotByLogical.get(n))for(let a=r.rendersRecent.length-1;a>=0;a--){let l=r.rendersRecent[a];if(l&&l.componentLogicalId===n)return l}}}}}s(w6,"pv"),o(w6,"installReactReducer");function bu(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(bu,"fo"),o(bu,"pushBounded");import{App as sC}from"@frontmcp/sdk";import{Resource as aC,ResourceContext as oC}from"@frontmcp/sdk";var _c=class extends oC{static{s(this,"fv")}static{o(this,"ValtioUpdatesRecentResource")}async execute(){return this.get(q).read("valtio://updates/recent")}};_c=S([aC({name:"valtio-updates-recent",uri:"valtio://updates/recent",mimeType:"application/json",description:"Last 100 Valtio state-update events with path + changedKeys + subscribers."})],_c);var lC=_c;import{Resource as dC,ResourceContext as cC}from"@frontmcp/sdk";var Ic=class extends cC{static{s(this,"gv")}static{o(this,"ValtioStoresResource")}async execute(){return this.get(q).read("valtio://stores")}};Ic=S([dC({name:"valtio-stores",uri:"valtio://stores",mimeType:"application/json",description:"Registered Valtio stores (created via lensmcp-wrapped proxy())."})],Ic);var pC=Ic;import{Resource as mC,ResourceContext as fC}from"@frontmcp/sdk";var Sc=class extends fC{static{s(this,"vv")}static{o(this,"ValtioSubscribersResource")}async execute(){return this.get(q).read("valtio://subscribers")}};Sc=S([mC({name:"valtio-subscribers",uri:"valtio://subscribers",mimeType:"application/json",description:"Per-(storeId, path) list of component instance ids currently subscribed via tracked useSnapshot."})],Sc);var gC=Sc,B6=class{static{s(this,"bv")}static{o(this,"ValtioApp")}};B6=S([sC({id:"valtio",name:"Valtio",description:"Valtio store + subscription tracking. Phase 5 ships updates/stores/subscribers; per-path subscriber walks land via graph.explain_rerender.",resources:[lC,pC,gC]})],B6);var hs="valtio://updates/recent",vs="valtio://stores",qr="valtio://subscribers",$6=100,C6=1e3,hC=1e3,vC=256,yC=256;function x6(e,t){if(e.size<=t)return;let r=e.values();for(;e.size>t;){let i=r.next();if(i.done)break;e.delete(i.value)}}s(x6,"Ez"),o(x6,"capSet");function Fc(e){let t=Array.isArray(e.paths)?e.paths.filter(r=>typeof r=="string"):void 0;return t&&t.length>0?t.slice(0,vC):typeof e.path=="string"?[e.path]:[]}s(Fc,"f$"),o(Fc,"subscriptionPaths");function zc(e){return e.componentLogicalId??e.componentInstanceId??"react:component:anonymous"}s(zc,"m$"),o(zc,"subscriberId");function k6(e){let t={updates:[],stores:new Map,subscribers:new Map,latestUpdateByPath:new Map},r=o(u=>{if(u.source!=="valtio")return;let n=u.raw??null;if(n?.kind)switch(n.kind){case"state-update":{let a=n.update;if(!a)return;let l={...a,emittedAt:u.timestamp};t.updates.push(l),t.updates.length>$6&&t.updates.splice(0,t.updates.length-$6);let d=`${a.storeId}::${a.path}`;if(t.latestUpdateByPath.delete(d),t.latestUpdateByPath.set(d,l),t.latestUpdateByPath.size>C6){for(let p of t.latestUpdateByPath.keys())if(t.latestUpdateByPath.delete(p),t.latestUpdateByPath.size<=C6)break}e.resources.markDirty(hs);return}case"store-created":{let a=n.store;if(!a)return;t.stores.set(a.storeId,{...a,createdAt:u.timestamp}),e.resources.markDirty(vs);return}case"subscription-added":{let a=n.subscription;if(!a||!a.componentInstanceId)return;let l=zc(a);for(let d of Fc(a)){let p=`${a.storeId}::${d}`,c=t.subscribers.get(p);c||(c=new Map,t.subscribers.set(p,c));let f=c.get(l);f||(f=new Set,c.set(l,f)),f.add(a.componentInstanceId),St(c,xr),x6(f,yC)}St(t.subscribers,hC),e.resources.markDirty(qr);return}case"subscription-removed":{let a=n.subscription;if(!a||!a.componentInstanceId)return;let l=zc(a);for(let d of Fc(a)){let p=`${a.storeId}::${d}`,c=t.subscribers.get(p);if(!c)continue;let f=c.get(l);f&&(f.delete(a.componentInstanceId),f.size===0&&c.delete(l)),c.size===0&&t.subscribers.delete(p)}e.resources.markDirty(qr);return}default:return}},"handler"),i=e.bus.subscribe(r);return e.resources.register(hs,()=>({schemaVersion:1,revision:e.resources.revision(hs)??0,updatedAt:new Date().toISOString(),updates:t.updates.slice()})),e.resources.register(vs,()=>({schemaVersion:1,revision:e.resources.revision(vs)??0,updatedAt:new Date().toISOString(),stores:[...t.stores.values()]})),e.resources.register(qr,()=>({schemaVersion:1,revision:e.resources.revision(qr)??0,updatedAt:new Date().toISOString(),subscriptions:[...t.subscribers.entries()].map(([u,n])=>{let[a,l]=u.split("::");return{storeId:a,path:l,componentInstanceIds:[...n.keys()]}})})),{unsubscribe:i,uris:[hs,vs,qr],lookups:{latestUpdateForPath(u,n){return t.latestUpdateByPath.get(`${u}::${n}`)},subscribersFor(u,n){return[...t.subscribers.get(`${u}::${n}`)?.keys()??[]]}}}}s(k6,"wv"),o(k6,"installValtioReducer");import{App as EC}from"@frontmcp/sdk";import{Resource as bC,ResourceContext as DC}from"@frontmcp/sdk";var jc=class extends DC{static{s(this,"xv")}static{o(this,"GraphPatternsResource")}async execute(){return this.get(q).read("graph://patterns")}};jc=S([bC({name:"graph-patterns",uri:"graph://patterns",mimeType:"application/json",description:"Recent detected anti-patterns (db-in-loop, n+1-query, render-storm)."})],jc);var wC=jc;import{Resource as BC,ResourceContext as $C}from"@frontmcp/sdk";var Nc=class extends $C{static{s(this,"_v")}static{o(this,"GraphEventLoopLagResource")}async execute(){return this.get(q).read("graph://performance/event-loop-lag")}};Nc=S([BC({name:"graph-event-loop-lag",uri:"graph://performance/event-loop-lag",mimeType:"application/json",description:"Recent event-loop-lag samples + the max lag seen."})],Nc);var CC=Nc;import{Tool as xC,ToolContext as kC,z as AC}from"@frontmcp/sdk";var A6;function Oc(e){A6=e}s(Oc,"ua"),o(Oc,"setActiveGraphBuffer");function Lr(){return A6?.events??[]}s(Lr,"It"),o(Lr,"currentEvents");function Nt(){let e=new qp;return f1(e,Lr()),e}s(Nt,"Ce"),o(Nt,"buildGraph");var Rc=class extends kC{static{s(this,"Sv")}static{o(this,"GraphGetNodeTool")}async execute(e){let t=Nt().getNode(e.nodeId);return t?{found:!0,node:t}:{found:!1,nodeId:e.nodeId}}};Rc=S([xC({name:"graph.get_node",description:"Returns a single graph node by id (built from the current event window).",inputSchema:{nodeId:AC.string().describe("Node id (usually the originating event id).")}})],Rc);var _C=Rc;import{Tool as IC,ToolContext as SC,z as Du}from"@frontmcp/sdk";var FC=["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"],Tc=class extends SC{static{s(this,"Rv")}static{o(this,"GraphTraverseTool")}async execute(e){let t=Nt().traverse({from:e.from,lens:e.lens,depth:e.depth,direction:e.direction,maxNodes:e.maxNodes});return{nodeCount:t.nodes.length,edgeCount:t.edges.length,nodes:t.nodes.map(r=>({id:r.id,type:r.type,name:r.name,durationMs:r.durationMs,flowId:r.context.flowId})),edges:t.edges.map(r=>({from:r.from,to:r.to,axis:r.axis,type:r.type}))}}};Tc=S([IC({name:"graph.traverse",description:'Walk the multi-axis trace graph from a node along one or more edge axes (the "lens"). Bounded by depth + node count.',inputSchema:{from:Du.string().describe("Start node id."),lens:Du.array(Du.enum(FC)).min(1).describe('Edge axes to follow (e.g. ["caused","backend"]).'),depth:Du.number().int().positive().max(12).default(4),direction:Du.enum(["out","in","both"]).default("both"),maxNodes:Du.number().int().positive().max(1e3).default(200)}})],Tc);var zC=Tc;import{Tool as jC,ToolContext as NC,z as OC}from"@frontmcp/sdk";var Mc=class extends NC{static{s(this,"Ev")}static{o(this,"GraphFindDbInLoopTool")}async execute(e){let t=ql(Lr(),{threshold:e.threshold});return{count:t.length,matches:t}}};Mc=S([jC({name:"graph.find_db_in_loop",description:"Scan the current event window for loops that issued more than `threshold` DB calls (N+1-ish backend anti-pattern).",inputSchema:{threshold:OC.number().int().positive().default(5)}})],Mc);var RC=Mc;import{Tool as TC,ToolContext as MC,z as PC}from"@frontmcp/sdk";var Pc=class extends MC{static{s(this,"zv")}static{o(this,"GraphFindSlowPathTool")}async execute(e){let t=Nt(),r=new Map,i=Lr(),u=e.from?[e.from]:i.filter(l=>l.context.originNodeId===void 0&&l.context.flowId).map(l=>l.id);for(let l of i){let d=t.traverse({from:l.id,lens:["caused","async","backend"],depth:1,direction:"out",maxNodes:50});r.set(l.id,d.edges.filter(p=>p.from===l.id).map(p=>p.to))}let n=o(l=>t.getNode(l)?.durationMs??0,"durationOf"),a=c1(u.length?u:i.map(l=>l.id),r,n);return{totalDurationMs:a.totalDurationMs,path:a.path.map(l=>{let d=t.getNode(l);return{id:l,name:d?.name,type:d?.type,durationMs:d?.durationMs}})}}};Pc=S([TC({name:"graph.find_slow_path",description:"Find the slowest cumulative chain on the caused/async/backend axes starting from a node (or every flow origin if `from` is omitted).",inputSchema:{from:PC.string().optional().describe("Start node id; defaults to all flow origins.")}})],Pc);var UC=Pc;import{Tool as ZC,ToolContext as qC,z as _6}from"@frontmcp/sdk";var Uc=class extends qC{static{s(this,"Ov")}static{o(this,"GraphTraceFromOriginTool")}async execute(e){let t=Nt(),r=e.originNodeId;if(!t.getNode(r)){let n=Lr().find(a=>a.context.originNodeId===e.originNodeId||a.raw?.origin?.nodeId===e.originNodeId);n&&(r=n.id)}let i=t.getNode(r);if(!i)return{found:!1,originNodeId:e.originNodeId};let u=t.traverse({from:r,lens:["caused","render","state","backend","async"],depth:e.depth,direction:"out",maxNodes:500});return{found:!0,origin:{id:r,name:i.name,type:i.type},nodeCount:u.nodes.length,nodes:u.nodes.map(n=>({id:n.id,type:n.type,name:n.name,durationMs:n.durationMs}))}}};Uc=S([ZC({name:"graph.trace_from_origin",description:'Given an origin node id (e.g. a data-agent-component value or an event id), returns every node reachable on the caused/render/state/backend axes \u2014 "what did this cause?".',inputSchema:{originNodeId:_6.string().describe("Origin node id, logicalId, or originating event id."),depth:_6.number().int().positive().max(12).default(6)}})],Uc);var LC=Uc;import{Tool as JC,ToolContext as VC,z as I6}from"@frontmcp/sdk";var Zc=class extends VC{static{s(this,"Pv")}static{o(this,"GraphFindStateUpdatesCausedByTool")}async execute(e){let t=Nt();if(!t.getNode(e.from))return{found:!1,from:e.from};let r=t.traverse({from:e.from,lens:["caused","state"],depth:e.depth,direction:"out",maxNodes:500}).nodes.filter(i=>i.type==="state-update");return{found:!0,count:r.length,stateUpdates:r.map(i=>({id:i.id,name:i.name,logicalId:i.logicalId}))}}};Zc=S([JC({name:"graph.find_state_updates_caused_by",description:'From an origin node, returns the state-update nodes reachable on the caused/state axes \u2014 "what state changed because of this?".',inputSchema:{from:I6.string().describe("Origin node id."),depth:I6.number().int().positive().max(12).default(6)}})],Zc);var WC=Zc;import{Tool as GC,ToolContext as KC,z as S6}from"@frontmcp/sdk";var qc=class extends KC{static{s(this,"Mv")}static{o(this,"GraphFindBackendWorkCausedByClickTool")}async execute(e){let t=Nt();if(!t.getNode(e.from))return{found:!1,from:e.from};let r=t.traverse({from:e.from,lens:["caused","backend","async"],depth:e.depth,direction:"out",maxNodes:500}).nodes.filter(i=>i.type==="server-request");return{found:!0,count:r.length,requests:r.map(i=>({id:i.id,name:i.name,durationMs:i.durationMs}))}}};qc=S([GC({name:"graph.find_backend_work_caused_by_click",description:'From a UI origin node, returns the server-request nodes reachable on the caused/backend/async axes \u2014 "what backend work did this click trigger?".',inputSchema:{from:S6.string().describe("UI origin node id (e.g. the user-action event id)."),depth:S6.number().int().positive().max(12).default(8)}})],qc);var HC=qc,F6=class{static{s(this,"Uv")}static{o(this,"GraphApp")}};F6=S([EC({id:"graph",name:"Graph",description:"Multi-axis causal graph: traverse by lens, trace from origin, find slow paths + db-in-loop / n+1 / render-storm patterns.",resources:[wC,CC],tools:[_C,zC,RC,UC,LC,WC,HC]})],F6);var wu="graph://patterns",Bu="graph://performance/event-loop-lag",Lc=2e3,z6=8*1024*1024,XC=100,j6=100;function N6(e){let t=Je(e.thresholds),r=(e.now??(()=>Date.now()))(),i={events:[]},u=[],n=0,a=0,l=0,d=new Set,p=[],c=new Map,f,g=new Map,m=o(j=>{switch(j.kind){case"n+1-query":return`n+1:${String(j.details.signature??"")}`;case"render-storm":return`storm:${String(j.details.componentInstanceId??"")}`;case"db-in-loop":return`dbloop:${j.evidence[0]??""}`;default:return`${j.kind}:${j.evidence.join(",")}`}},"patternKey"),h=o(j=>{c.set(wu,j),e.resources.markDirty(wu)},"markPatterns"),E=o((j,F)=>{let b=m(j);if(g.delete(b),g.set(b,j),g.size>XC){let w=g.keys().next().value;w!==void 0&&g.delete(w)}h(F)},"pushPattern"),D=o(j=>{let F=!1;for(let[b,w]of g){if(w.evidence.length===0)continue;let C=w.evidence.filter(N=>d.has(N));if(C.length===0){g.delete(b),F=!0;continue}C.length!==w.evidence.length&&(w.evidence=C,F=!0)}F&&h(j)},"dropUnevidencedPatterns"),$=o(j=>{f=j.timestamp;let F=ki(j);i.events.push(j),u.push(F),n+=F,d.add(j.id);let b=Math.max(0,i.events.length-Lc),w=n;for(let O=0;O<b;O+=1)w-=u[O]??0;let C=0;for(;w>z6&&b<u.length;)w-=u[b]??0,b+=1,C+=1;if(b>0){let O=i.events.splice(0,b);u.splice(0,b),n=Math.max(0,w),a+=O.length,l+=C;for(let te of O)d.delete(te.id);D(j.timestamp)}let N=j.raw??null;if(N?.kind==="loop")for(let O of ql(i.events,{threshold:t.dbInLoop}))E(O,j.timestamp);if(N?.kind==="db-query")for(let O of l1(i.events,{threshold:t.nPlusOne}))E(O,j.timestamp);if(j.source==="react"&&N?.kind==="render")for(let O of d1(i.events,{threshold:t.renderStorm}))E(O,j.timestamp);j.source==="perf"&&N?.kind==="event-loop-lag"&&typeof N.lagMs=="number"&&(p.push({at:j.timestamp,lagMs:N.lagMs,source:j.source}),p.length>j6&&p.splice(0,p.length-j6),c.set(Bu,j.timestamp),e.resources.markDirty(Bu))},"handler"),A=e.bus.subscribe($);Oc(i);let I=o(j=>new Date(c.get(j)??r).toISOString(),"stamp");return e.resources.register(wu,()=>({schemaVersion:1,revision:e.resources.revision(wu)??0,updatedAt:I(wu),patterns:[...g.values()],eventsBuffered:i.events.length,eventBufferCapacity:Lc,lastEventAt:f,producer:f===void 0?"none":"connected"})),e.resources.register(Bu,()=>({schemaVersion:1,revision:e.resources.revision(Bu)??0,updatedAt:I(Bu),samples:p.slice(),maxLagMs:p.reduce((j,F)=>Math.max(j,F.lagMs),0),lastEventAt:f})),{unsubscribe:o(()=>{Oc(void 0),A()},"unsubscribe"),uris:[wu,Bu],retentionStats:o(()=>({residentEvents:i.events.length,residentBytes:n,evictedEvents:a,evictedForBytes:l,eventCap:Lc,byteCap:z6}),"retentionStats")}}s(N6,"Fv"),o(N6,"installGraphReducer");import{App as YC}from"@frontmcp/sdk";import{Resource as QC,ResourceContext as ex}from"@frontmcp/sdk";var Jc=class extends ex{static{s(this,"Zv")}static{o(this,"MemoryCurrentResource")}async execute(){return this.get(q).read("memory://current")}};Jc=S([QC({name:"memory-current",uri:"memory://current",mimeType:"application/json",description:"Last process-memory sample (heapUsed / rss)."})],Jc);var tx=Jc;import{Resource as ux,ResourceContext as rx}from"@frontmcp/sdk";var Vc=class extends rx{static{s(this,"qv")}static{o(this,"MemoryOwnersResource")}async execute(){return this.get(q).read("memory://owners")}};Vc=S([ux({name:"memory-owners",uri:"memory://owners",mimeType:"application/json",description:"All tracked container owners with current item count + byte estimate."})],Vc);var nx=Vc;import{Resource as ix,ResourceContext as sx}from"@frontmcp/sdk";var Wc=class extends sx{static{s(this,"Gv")}static{o(this,"MemoryOwnersGrowingResource")}async execute(){return this.get(q).read("memory://owners/growing")}};Wc=S([ix({name:"memory-owners-growing",uri:"memory://owners/growing",mimeType:"application/json",description:"Top 20 container owners by growth-since-start."})],Wc);var ax=Wc;import{Resource as ox,ResourceContext as lx}from"@frontmcp/sdk";var Gc=class extends lx{static{s(this,"Kv")}static{o(this,"MemoryLeaksSuspectedResource")}async execute(){return this.get(q).read("memory://leaks/suspected")}};Gc=S([ox({name:"memory-leaks-suspected",uri:"memory://leaks/suspected",mimeType:"application/json",description:"Suspected leaks: per-flow retentions + stale-generation singletons."})],Gc);var dx=Gc;import{Tool as cx,ToolContext as px,z as mx}from"@frontmcp/sdk";var O6;function Kc(e){O6=e}s(Kc,"la"),o(Kc,"setActiveMemoryLookups");function ys(){return O6}s(ys,"Gt"),o(ys,"activeMemoryLookups");var Hc=class extends px{static{s(this,"Xv")}static{o(this,"MemoryFindGrowthByFlowTool")}async execute(e){let t=ys();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.growthByFlow(e.flowId);return{found:!0,flowId:e.flowId,owners:r}}};Hc=S([cx({name:"memory.find_growth_by_flow",description:'Returns the container owners mutated during a flow and how much each grew \u2014 "what did this flow allocate?".',inputSchema:{flowId:mx.string().describe("Flow id.")}})],Hc);var fx=Hc;import{Tool as gx,ToolContext as hx,z as vx}from"@frontmcp/sdk";var Xc=class extends hx{static{s(this,"Yv")}static{o(this,"MemoryFindFlowsThatMutatedOwnerTool")}async execute(e){let t=ys();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.flowsThatMutatedOwner(e.ownerId);return{found:!0,ownerId:e.ownerId,flowIds:r}}};Xc=S([gx({name:"memory.find_flows_that_mutated_owner",description:"Returns the flow ids that mutated a given container owner.",inputSchema:{ownerId:vx.string().describe("Owner id (<ownerInstanceId>::<fieldName>).")}})],Xc);var yx=Xc;import{Tool as Ex,ToolContext as bx,z as Dx}from"@frontmcp/sdk";var Yc=class extends bx{static{s(this,"ey")}static{o(this,"MemoryExplainLeakTool")}async execute(e){let t=ys();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.getLeak(e.leakIndex);if(!r)return{found:!1,leakIndex:e.leakIndex};let i,u;if(r.kind==="retention"){let n=r.detail;i=`Owner ${n.ownerId} grew by ${n.growth} items during flow ${n.flowId} and did not shrink after the flow settled.`,u="Add a TTL / max-size eviction policy to this container, or clear it when the owning scope is disposed. If it is a request-scoped cache, move it off the singleton."}else{let n=r.detail;i=`Disposed singleton ${n.logicalId} (generation ${n.generation}) still retains ${n.retainedBytes} bytes \u2014 a stale generation kept alive after HMR/reload.`,u="Ensure listeners/timers registered by the old instance are removed in the dispose hook (OnModuleDestroy / cleanup), so the previous generation can be garbage-collected."}return{found:!0,leak:r,narrative:i,recommendation:u}}};Yc=S([Ex({name:"memory.explain_leak",description:"Returns a narrative explanation of a suspected leak (by index in memory://leaks/suspected): which owner, which flow, what grew, and a remediation hint.",inputSchema:{leakIndex:Dx.number().int().nonnegative().describe("Index into memory://leaks/suspected.")}})],Yc);var wx=Yc,R6=class{static{s(this,"ry")}static{o(this,"MemoryApp")}};R6=S([YC({id:"memory",name:"Memory",description:"Container-owner growth tracking + suspect-leak / stale-generation detection. Hosts memory.explain_leak.",resources:[tx,nx,ax,dx],tools:[fx,yx,wx]})],R6);var Jr="memory://current",Vr="memory://owners",Wr="memory://owners/growing",Ot="memory://leaks/suspected",Bx=200,T6=50,$x=500;function M6(e){let t=(e.now??(()=>Date.now()))(),r={owners:new Map,leaks:new Map,changedAt:new Map},i=o((E,D)=>{r.changedAt.set(E,D),e.resources.markDirty(E)},"touch"),u=o((E,D)=>{if(r.leaks.delete(E),r.leaks.set(E,D),r.leaks.size>Bx){let $=r.leaks.keys().next().value;$!==void 0&&r.leaks.delete($)}},"pushLeak"),n=new Map,a=o((E,D)=>{E!==D&&(n.delete(E),n.set(E,D),n.size>5e3&&n.delete(n.keys().next().value))},"noteRequestFlow"),l=o((E,D)=>{if(E.flowIds.add(D),E.flowIds.size>T6){for(let $ of E.flowIds)if(E.flowIds.delete($),E.flowIds.size<=T6)break}},"noteFlow"),d=o((E,D,$)=>{let A=r.owners.get(E);if(A||(A={ownerId:E,itemCount:D,estimatedBytes:0,startCount:D,mutations:0,flowIds:new Set,lastMutatedAt:$}),r.owners.delete(E),r.owners.set(E,A),r.owners.size>$x){let I=r.owners.keys().next().value;I!==void 0&&I!==E&&r.owners.delete(I)}return A},"ensure"),p=o((E,D)=>{let $=!1;for(let[A,I]of r.leaks){if(I.kind!=="retention"||I.ownerId!==E)continue;let j=I.detail.startCount;typeof j=="number"&&D<=j&&(r.leaks.delete(A),$=!0)}return $},"retractReleasedRetentions"),c=o(E=>{if(E.source!=="memory"&&E.source!=="perf")return;let D=E.raw??null;if(D?.kind)switch(r.lastEventAt=Math.max(r.lastEventAt??0,E.timestamp),D.kind){case"memory-mutation":{if(!D.mutation)return;let $=D.mutation,A=d($.ownerNodeId,$.beforeCount??$.afterCount,E.timestamp);A.itemCount=$.afterCount,A.estimatedBytes=$.afterCount*64,A.mutations+=1,A.lastMutatedAt=E.timestamp,E.context.flowId&&l(A,E.context.flowId),E.context.requestId&&E.context.flowId&&a(E.context.requestId,E.context.flowId),i(Vr,E.timestamp),i(Wr,E.timestamp),p($.ownerNodeId,$.afterCount)&&i(Ot,E.timestamp);return}case"memory-retention":{if(!D.retention)return;let $=D.retention,A=$.requestId?$.flowId:n.get($.flowId)??$.flowId;u(`retention:${$.ownerId}:${A}`,{kind:"retention",ownerId:$.ownerId,flowId:A,detail:{...$,flowId:A},at:E.timestamp}),i(Ot,E.timestamp);return}case"singleton-stale-generation":{if(!D.staleGeneration)return;let $=D.staleGeneration;u(`stale:${$.logicalId}:${$.generation}`,{kind:"stale-generation",logicalId:$.logicalId,detail:{...$},at:E.timestamp}),i(Ot,E.timestamp);return}case"process-memory":{if(!D.memory)return;r.current={...D.role?{role:D.role}:{},heapUsed:D.memory.heapUsed,heapTotal:D.memory.heapTotal,rss:D.memory.rss,external:D.memory.external,arrayBuffers:D.memory.arrayBuffers,at:E.timestamp},i(Jr,E.timestamp);return}default:return}},"handler"),f=e.bus.subscribe(c),g=o(E=>new Date(r.changedAt.get(E)??t).toISOString(),"stamp"),m=o(()=>({lastEventAt:r.lastEventAt,ownersTracked:r.owners.size,producer:r.lastEventAt===void 0?"none":"connected",detail:r.lastEventAt===void 0?"No memory event has ever been observed \u2014 an empty leak list is NOT evidence there is no leak, nothing is watching. Run under the dev cluster with @lensmcp/memory-tracker wired.":`${r.owners.size} owner${r.owners.size===1?"":"s"} tracked; ${r.leaks.size} suspected leak${r.leaks.size===1?"":"s"}.`}),"health");e.resources.register(Jr,()=>({schemaVersion:1,revision:e.resources.revision(Jr)??0,updatedAt:g(Jr),current:r.current??null})),e.resources.register(Vr,()=>({schemaVersion:1,revision:e.resources.revision(Vr)??0,updatedAt:g(Vr),owners:[...r.owners.values()].map(Qc),...m()})),e.resources.register(Wr,()=>({schemaVersion:1,revision:e.resources.revision(Wr)??0,updatedAt:g(Wr),owners:[...r.owners.values()].map(Qc).filter(E=>E.growthSinceStart>0).sort((E,D)=>D.growthSinceStart-E.growthSinceStart).slice(0,20),...m()})),e.resources.register(Ot,()=>({schemaVersion:1,revision:e.resources.revision(Ot)??0,updatedAt:g(Ot),suspected:[...r.leaks.values()],...m()}));let h={ownersMutatedByFlow(E){return[...r.owners.values()].filter(D=>D.flowIds.has(E))},growthByFlow(E){return[...r.owners.values()].filter(D=>D.flowIds.has(E)).map(D=>({ownerId:D.ownerId,growth:D.itemCount-D.startCount}))},flowsThatMutatedOwner(E){let D=r.owners.get(E);return D?[...D.flowIds]:[]},getLeak(E){return[...r.leaks.values()][E]},allLeaks(){return[...r.leaks.values()]}};return Kc(h),{unsubscribe:o(()=>{Kc(void 0),f()},"unsubscribe"),uris:[Jr,Vr,Wr,Ot],lookups:h}}s(M6,"ny"),o(M6,"installMemoryReducer");function Qc(e){return{ownerId:e.ownerId,itemCount:e.itemCount,estimatedBytes:e.estimatedBytes,mutations:e.mutations,startCount:e.startCount,growthSinceStart:e.itemCount-e.startCount,lastMutatedAt:e.lastMutatedAt,flowIds:[...e.flowIds]}}s(Qc,"_$"),o(Qc,"toOwnerView");function P6(){let{session:e,providers:t}=E1(),r=k1(),i=A1();for(let E of i.problems)console.error(`[lensmcp] nx.json lensmcp.flows: ${E}`);E3({bus:e.bus,resources:e.resources}),w3({bus:e.bus,resources:e.resources}),C3({bus:e.bus,resources:e.resources}),A3({bus:e.bus,resources:e.resources}),F3({bus:e.bus,resources:e.resources}),P3({bus:e.bus,resources:e.resources}),Z3({bus:e.bus,resources:e.resources}),L3({bus:e.bus,resources:e.resources}),W3({bus:e.bus,resources:e.resources,thresholds:r}),Y3({bus:e.bus,resources:e.resources,thresholds:r}),t6({bus:e.bus,resources:e.resources,thresholds:r}),o6({bus:e.bus,resources:e.resources,thresholds:r}),y6({bus:e.bus,resources:e.resources}),w6({bus:e.bus,resources:e.resources,thresholds:r}),k6({bus:e.bus,resources:e.resources});let u=o3({bus:e.bus,resources:e.resources,flows:i});e.registerReducerRetention("flow",u.retentionStats),d3({resources:e.resources});let n=N6({bus:e.bus,resources:e.resources,thresholds:r});e.registerReducerRetention("graph",n.retentionStats),M6({bus:e.bus,resources:e.resources}),W1({bus:e.bus,resources:e.resources,sessionId:e.id});let a=3e4,l=512*1024*1024,d=0,p=o(()=>{let E=process.memoryUsage(),D=Date.now(),$=E.rss>=l;$&&D-d>=5*6e4&&(d=D,console.warn(`[lensmcp] high process memory: rss=${Math.round(E.rss/1024/1024)}MB heap=${Math.round(E.heapUsed/1024/1024)}MB`)),e.bus.publish({id:qt(),sessionId:e.id,timestamp:D,source:"perf",category:"runtime",severity:$?"warning":"info",context:{sessionId:e.id},fingerprint:Jp({kind:"process-memory",identity:process.env.LENSMCP_PROCESS_ROLE??"session"}),title:`LensMCP process memory (${process.env.LENSMCP_PROCESS_ROLE??"session"})`,raw:{kind:"process-memory",role:process.env.LENSMCP_PROCESS_ROLE??"session",memory:{rss:E.rss,heapUsed:E.heapUsed,heapTotal:E.heapTotal,external:E.external,arrayBuffers:E.arrayBuffers}}})},"publishProcessMemory");p();let c=setInterval(p,a);c.unref?.(),e.onShutdown({name:"process-memory",stop:o(()=>clearInterval(c),"stop")});let f=1200,g=new Map,m=e.bus.subscribe(E=>{let D=E.context.flowId;if(!D)return;let $=g.get(D);$&&clearTimeout($);let A=setTimeout(()=>{g.delete(D);try{let I=Ve()?.getFlowEvents(D);if(!I||I.length===0)return;let j=_s(I,{flowId:D});j&&Dd(j)}catch{}},f);A.unref?.(),g.set(D,A)});e.onShutdown({name:"story-autocompile",stop:o(()=>{m();for(let E of g.values())clearTimeout(E);g.clear()},"stop")});let h=C1({bus:e.bus,sessionId:e.id,onError:o(E=>console.error("[lensmcp] ingest error:",E),"onError")});return h.mode!=="none"&&console.error(`[lensmcp] event ingest active (mode=${h.mode})`),e.onShutdown({name:"event-ingest",stop:o(()=>h.stop(),"stop")}),{session:e,providers:t,ingest:h,flows:i}}s(P6,"k$"),o(P6,"createLensSession");var Cx=new Set(["localhost","127.0.0.1","lensmcp.local"]);function U6(e){if(!e)return!1;let t=e.trim().toLowerCase();if(t.startsWith("[")){let r=t.indexOf("]");return r!==-1&&t.slice(1,r)==="::1"}return t.indexOf(":")===t.lastIndexOf(":")&&(t=t.split(":")[0]??""),Cx.has(t)}s(U6,"xj"),o(U6,"hostHeaderIsLocal");function Z6(e,t){if(!e||U6(t))return{ok:!0};let r=(t??"").replace(/[^\x20-\x7e]/g,"?").slice(0,80);return{ok:!1,status:403,error:"this dashboard answers only requests addressed to this machine (localhost, 127.0.0.1, [::1] or lensmcp.local)"+(r?`; this one was addressed to "${r}"`:"")}}s(Z6,"S$"),o(Z6,"dashboardHostVerdict");import{randomBytes as xx,timingSafeEqual as kx}from"node:crypto";import{chmodSync as Ax,mkdirSync as _x,readFileSync as Ix,writeFileSync as Sx}from"node:fs";import{dirname as Fx,join as zx}from"node:path";var ep="__lensmcp_token";function tp(e){return zx(e,".lensmcp","dashboard-token")}s(tp,"oy"),o(tp,"dashboardTokenPath");function q6(e,t,r,i={}){if(r)return{source:"loopback"};if(e.LENSMCP_ALLOW_INSECURE==="1")return{source:"disabled"};let u=e.LENSMCP_DASHBOARD_TOKEN?.trim();if(u)return{token:u,source:"env"};let n=i.read??(c=>Ix(c,"utf8")),a=i.write??((c,f)=>Sx(c,f,{mode:384})),l=i.ensureDir??(c=>{_x(c,{recursive:!0,mode:448})}),d=i.chmod??((c,f)=>Ax(c,f)),p=tp(t);try{let c=n(p).trim();if(c){try{d(p,384)}catch{}return{token:c,source:"file"}}}catch{}try{l(Fx(p));let c=xx(32).toString("hex");a(p,`${c}
|
|
67
|
+
`))!==-1;){let p=a.slice(0,d);a=a.slice(d+1),p&&e.onMessage(p)}a.length>i&&(t(new Error(`uds: frame exceeded ${i} bytes without a newline \u2014 connection dropped`)),a="",n.destroy())}),n.on("error",l=>t(l)),n.on("close",()=>r.delete(n))});return u.on("error",n=>t(n)),u.listen(e.path,()=>e.onListening?.()),u.unref(),{close:o(()=>new Promise(n=>{for(let a of r)try{a.destroy()}catch{}r.clear();try{u.close(()=>{try{w1(e.path)&&B1(e.path)}catch{}n()})}catch{n()}}),"close")}}s($1,"Uf"),o($1,"createUdsServer");function C1(e){let t=e.eventFile??process.env.LENSMCP_EVENT_FILE,r=e.socketPath??process.env.LENSMCP_IPC_SOCKET,i=e.udsPath??process.env.LENSMCP_UDS,u=e.onError??(()=>{}),n=0,a=o(g=>{let m=g.trim();if(!m)return;let h;try{h=JSON.parse(m)}catch{return}if(!(!h||typeof h!="object"||!("id"in h)||!("source"in h)))try{e.sessionId&&h.sessionId==="pending"&&(h.sessionId=e.sessionId,h.context&&h.context.sessionId==="pending"&&(h.context.sessionId=e.sessionId)),e.bus.publish(h),n+=1}catch(E){u(E)}},"publish"),l=[],d=!1,p=!1,c=!1;if(t){d=!0;let g=0,m="",h=!1,E=e.replayBytes??Number(process.env.LENSMCP_REPLAY_BYTES??4*1024*1024);if(b1(t))try{let A=D1(t).size;Number.isFinite(E)&&E>0&&A>0?(g=Math.max(0,A-E),h=g>0):g=A}catch{g=0}let D=Buffer.alloc(64*1024),$=setInterval(o(()=>{if(!b1(t))return;let A;try{A=D1(t).size}catch{return}for(A<g&&(g=0,m="");g<A;){let I;try{I=eD(t,"r")}catch(j){u(j);return}try{let j=Math.min(D.length,A-g),F=tD(I,D,0,j,g);if(F<=0)break;g+=F,m+=D.toString("utf8",0,F);let b;for(;(b=m.indexOf(`
|
|
68
|
+
`))!==-1;){let w=m.slice(0,b);if(m=m.slice(b+1),h){h=!1;continue}a(w)}}finally{Qb(I)}}},"drain"),e.pollMs??50);$.unref?.(),l.push(()=>clearInterval($))}if(r){let[g,m]=r.split(":"),h=Number(m);if(g&&Number.isFinite(h)){p=!0;let E;try{E=Yb("udp4"),E.on("message",D=>a(D.toString("utf8"))),E.on("error",D=>u(D)),E.bind(h,g),E.unref()}catch(D){u(D),p=!1}if(E){let D=E;l.push(()=>new Promise($=>{try{D.close(()=>$())}catch{$()}}))}}}if(i)try{let g=$1({path:i,onMessage:o(m=>a(m),"onMessage"),onError:u});c=!0,l.push(()=>g.close())}catch(g){u(g)}let f=[];return d&&f.push("file"),p&&f.push("udp"),c&&f.push("uds"),{mode:f.join("+")||"none",count:o(()=>n,"count"),async stop(){for(let g of l)try{await g()}catch{}}}}s(C1,"Lf"),o(C1,"startEventIngest");import{existsSync as nD,readFileSync as x1}from"node:fs";import{dirname as iD,join as sD}from"node:path";function k1(e=process.cwd()){let t=Vl("nx.json",e);if(!t)return Je();try{let r=JSON.parse(x1(t,"utf8"));return Je(r.lensmcp?.thresholds)}catch{return Je()}}s(k1,"Ff"),o(k1,"loadWorkspaceThresholds");function A1(e=process.cwd()){let t=Vl("nx.json",e);if(!t)return lt;try{let r=JSON.parse(x1(t,"utf8"));return o1(r.lensmcp?.flows)}catch(r){return{...lt,problems:[`${t} could not be read as JSON (${r instanceof Error?r.message:String(r)}) \u2014 flow config ignored`]}}}s(A1,"Zf"),o(A1,"loadWorkspaceFlowsConfig");function Vl(e,t){let r=t;for(let i=0;i<8;i++){let u=sD(r,e);if(nD(u))return u;let n=iD(r);if(n===r)break;r=n}}s(Vl,"yx"),o(Vl,"findUp");function S(e,t,r,i){var u=arguments.length,n=u<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(n=(u<3?a(n):u>3?a(t,r,n):a(t,r))||n);return u>3&&n&&Object.defineProperty(t,r,n),n}s(S,"x"),o(S,"__decorate");import{App as aD}from"@frontmcp/sdk";import{Resource as oD,ResourceContext as lD}from"@frontmcp/sdk";var dD=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,"asRecord"),cD=o(e=>Array.isArray(e)?e.length:void 0,"arrayLen"),dt=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"asCount"),Wl=o(e=>typeof e=="string"?e:void 0,"asString");function de(e,...t){for(let r of t){let i=cD(e[r])??dt(e[r]);if(i!==void 0)return i}}s(de,"fe"),o(de,"countOf");var Ee=o((e,t,r=`${t}s`)=>`${e} ${e===1?t:r}`,"plural");function Ai(e,t,r,i,u){if(t>0)return{state:"failed",count:t,detail:`${Ee(t,`${i} error`)} \u2014 read ${u}`};if(r>0)return{state:"warning",count:r,detail:Ee(r,`${i} warning`)};let n=Wl(e.status);return n==="clean"||n==="passed"?{state:"passed",count:0,detail:`${i} clean`}:{state:"unknown",detail:`${i} has not reported a result yet (status=${n??"absent"})`}}s(Ai,"Bf"),o(Ai,"fromStatusField");var _i=[{kind:"typecheck",resource:"typecheck://current",reads:o(()=>["typecheck://errors"],"reads"),blocking:!0,source:"typescript",read:o(e=>Ai(e,de(e,"errorCount","errors")??0,0,"typecheck","typecheck://errors"),"read")},{kind:"lint",resource:"lint://current",reads:o(e=>e==="warning"?["lint://warnings"]:["lint://errors"],"reads"),blocking:!0,source:"eslint",read:o(e=>Ai(e,de(e,"errorCount","errors")??0,de(e,"warningCount","warnings")??0,"lint","lint://errors"),"read")},{kind:"build",resource:"build://current",reads:o(e=>e==="warning"?["build://current"]:["build://failures"],"reads"),blocking:!0,source:"vite",read:o(e=>Ai(e,de(e,"failures","failureCount")??0,de(e,"warnings","warningCount")??0,"build","build://failures"),"read")},{kind:"runtime",resource:"runtime://browser/errors",reads:o(()=>["runtime://browser/errors","runtime://browser/failed-requests"],"reads"),blocking:!0,source:"client-runtime",read:o(e=>{let t=de(e,"count","entries")??0;return t>0?{state:"failed",count:t,detail:`${Ee(t,"browser runtime error")} \u2014 read runtime://browser/errors`}:{state:"unknown",count:0,detail:"no browser runtime errors recorded (a browser may never have connected)"}},"read")},{kind:"runtime",resource:"runtime://errors",reads:o(()=>["runtime://errors"],"reads"),blocking:!0,source:"nestjs",read:o(e=>{let t=de(e,"count","entries")??0;return t>0?{state:"failed",count:t,detail:`${Ee(t,"server-side error")} \u2014 read runtime://errors (route, status, request id and stack)`}:{state:"unknown",count:0,detail:"no server-side errors recorded (no pod may have handled a request yet)"}},"read")},{kind:"cluster",resource:"process://cluster",reads:o(()=>["process://cluster"],"reads"),blocking:!0,source:"gateway",read:o(e=>{if((de(e,"services")??0)===0)return{state:"unknown",detail:"no cluster lifecycle events seen (the gateway may not be running)"};let t=de(e,"crashLooping")??0,r=de(e,"wedged")??0,i=de(e,"buildFailed")??0,u=de(e,"down")??0,n=dt(e.restarts)??0;if(t>0||r>0||i>0){let l=[t>0?`${Ee(t,"service")} crash-looping`:void 0,r>0?`${Ee(r,"service")} wedged`:void 0,i>0?`${Ee(i,"service")} failing to build`:void 0].filter(Boolean);return{state:"failed",count:t+r+i,detail:`${l.join(", ")} \u2014 read process://cluster (requests to them 502)`}}if(u>0)return{state:"warning",count:u,detail:`${Ee(u,"service")} down (idle scale-to-zero is normal; the next request restarts it)`};let a=de(e,"up")??0;return{state:"passed",count:0,detail:`${Ee(a,"service")} up${n>0?`, ${Ee(n,"restart")} this session`:""}`}},"read")},{kind:"memory",resource:"memory://leaks/suspected",reads:o(()=>["memory://leaks/suspected","memory://owners/growing"],"reads"),blocking:!1,source:"memory",read:o(e=>{let t=de(e,"suspected","leaks")??0;return t>0?{state:"warning",count:t,detail:`${Ee(t,"suspected leak")} \u2014 read memory://leaks/suspected`}:{state:"passed",count:0,detail:"no suspected leaks"}},"read")},{kind:"visual",resource:"visual://violations/current",reads:o(()=>["visual://violations/current"],"reads"),blocking:!1,source:"visual",read:o(e=>{let t=de(e,"violations")??0;return t>0?{state:"warning",count:t,detail:`${Ee(t,"visual violation")} \u2014 read visual://violations/current`}:{state:"passed",count:0,detail:"no visual violations"}},"read")},{kind:"perf",resource:"perf://slow-routes",reads:o(()=>["perf://slow-routes"],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=de(e,"routes")??0,r=dt(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${Ee(t,"route")} over${r?` ${r}ms`:" the slow-route threshold"} \u2014 read perf://slow-routes`}:{state:"passed",count:0,detail:"no slow routes"}},"read")},{kind:"duplicate-requests",resource:"perf://duplicate-requests",reads:o(()=>["perf://duplicate-requests"],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=de(e,"endpoints")??0,r=dt(e.peakThreshold);return t>0?{state:"warning",count:t,detail:`${Ee(t,"endpoint")} called ${r?`\u2265${r}\xD7`:"several times"} concurrently by one page \u2014 read perf://duplicate-requests`}:{state:"passed",count:0,detail:"no duplicated requests"}},"read")},{kind:"db",resource:"db://slow-queries",reads:o(()=>["db://slow-queries","db://analysis"],"reads"),blocking:!1,source:"db",read:o(e=>{let t=de(e,"queries")??0,r=dt(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${Ee(t,"query shape")} over${r?` ${r}ms`:" the slow-query threshold"} \u2014 read db://slow-queries`}:{state:"passed",count:0,detail:"no slow query shapes"}},"read")},{kind:"egress",resource:"net://egress/hosts",reads:o(e=>e==="warning"?["net://egress/hosts","net://egress/failures"]:["net://egress/hosts"],"reads"),blocking:!1,source:"external",read:o(e=>{let t=de(e,"failingHosts")??0,r=de(e,"slowHosts")??0,i=dt(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${Ee(t,"external host")} failing \u2014 read net://egress/failures`}:r>0?{state:"warning",count:r,detail:`${Ee(r,"external host")} over${i?` ${i}ms`:" the slow-egress threshold"} \u2014 read net://egress/hosts`}:{state:"passed",count:0,detail:"no failing or slow external calls"}},"read")}],U7=_i.map(e=>e.resource);async function _1(e,t){let r={kind:t.kind,resource:t.resource},i;try{i=dD(await e.read(t.resource))}catch{return{...r,producer:"none",state:"unknown",detail:`no producer for ${t.resource} \u2014 this signal is unmonitored, not healthy`,reads:t.reads("unknown")}}if(!i)return{...r,producer:"none",state:"unknown",detail:`${t.resource} produced no readable payload`,reads:t.reads("unknown")};let u=Wl(i.producer),n=(e.revision(t.resource)??0)>0,a=u==="none"?"none":u==="connected"||n?"connected":"none",l=Wl(i.detail);if(a==="none")return{...r,producer:a,state:"unknown",detail:l??(u==="none"?`${t.resource} reports no producer attached \u2014 this signal is unmonitored, not healthy`:`${t.resource} is registered but has never reported \u2014 this signal is unmonitored, not healthy`),reads:t.reads("unknown")};let d;try{d=t.read(i)}catch{d={state:"unknown",detail:`${t.resource} payload could not be interpreted`}}let p=i.stale===!0,c=p?`${d.detail} (as of ${dt(i.ageMs)!==void 0?I1(dt(i.ageMs)):"a while ago"}; nothing has re-checked since)`:d.detail;return{...r,producer:a,state:d.state,...d.count===void 0?{}:{count:d.count},...p?{stale:!0}:{},detail:c,reads:t.reads(d.state)}}s(_1,"pR"),o(_1,"readSignal");function I1(e){return e<6e4?`${Math.max(1,Math.round(e/1e3))}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:`${Math.round(e/36e5)}h ago`}s(I1,"fR"),o(I1,"describeAge");async function Gl(e){return Promise.all(_i.map(t=>_1(e,t)))}s(Gl,"bs"),o(Gl,"readSignals");var Ir=o(e=>_i.find(t=>t.resource===e.resource)??_i.find(t=>t.kind===e.kind),"specFor");function Kl(e){return{source:Ir(e).source,severity:e.state==="failed"?"error":"warning",title:e.detail,fingerprint:`agent-status:${e.kind}:${e.state}`,resource:e.reads[0]??e.resource}}s(Kl,"bx"),o(Kl,"toItem");function S1(e){let t={failed:3,warning:2,unknown:1,passed:0},r=o(n=>{let a=e.filter(l=>l.kind===n);return a.length===0?"unknown":a.reduce((l,d)=>t[d.state]>t[l]?d.state:l,a[0].state)},"pick"),i=o(n=>n==="failed"?"failed":n==="passed"||n==="warning"?"passed":"unknown","tri"),u=o(n=>n,"quad");return{typecheck:i(r("typecheck")),lint:i(r("lint")),build:i(r("build")),runtime:u(r("runtime")),visual:u(r("visual")),memory:u(r("memory"))}}s(S1,"mR"),o(S1,"toChecks");function F1(e){let t=e.filter(p=>p.state==="failed"),r=e.filter(p=>p.state==="warning"),i=e.filter(p=>p.state==="passed"),u=t.filter(p=>Ir(p).blocking).map(Kl),n=[...t.filter(p=>!Ir(p).blocking),...r].map(Kl),a=u.length>0?"failing":n.length>0?"warning":i.length>0?"clean":"starting",l=[...t.filter(p=>Ir(p).blocking).flatMap(p=>p.reads),...t.filter(p=>!Ir(p).blocking).flatMap(p=>p.reads),...r.flatMap(p=>p.reads)],d=[...new Set(l)];return d.length===0&&d.push("events://recent"),{status:a,blocking:u,warnings:n,suggestedReads:d,checks:S1(e)}}s(F1,"wx"),o(F1,"deriveVerdict");function z1(e=process.env){let t=e.LENSMCP_TRANSPORT==="http"||e.LENSMCP_TRANSPORT==="socket",r=e.LENSMCP_PORT;return{mode:t?"shared":"embedded",pid:process.pid,startedAt:new Date(Date.now()-Math.round(process.uptime()*1e3)).toISOString(),...t&&r?{url:`http://127.0.0.1:${r}/mcp`}:{}}}s(z1,"gR"),o(z1,"readServerInfo");async function Ii(e){let t=await Gl(e.resources),r=F1(t);return{schemaVersion:1,revision:e.revision,updatedAt:new Date().toISOString(),sessionId:e.sessionId,server:z1(),status:r.status,blocking:r.blocking,warnings:r.warnings,suggestedReads:r.suggestedReads,checks:r.checks,signals:t}}s(Ii,"qt"),o(Ii,"aggregateStatus");var Hl="agent://current-status",Xl=class extends lD{static{s(this,"Gf")}static{o(this,"AgentCurrentStatusResource")}async execute(){let e=this.get(q);try{return await e.read(Hl)}catch{}let t=this.get(Fl);return Ii({resources:e,sessionId:t.id,revision:e.revision(Hl)??0})}};Xl=S([oD({name:"agent-current-status",uri:Hl,mimeType:"application/json",description:'Workspace health in one read: status (clean/warning/failing/starting), what is BLOCKING (typecheck/lint/build errors, browser runtime errors, wedged or crash-looping services), warnings, and the exact resources to read next. Signals with no producer report `producer: "none"` \u2014 unmonitored, not healthy.'})],Xl);var pD=Xl;import{Resource as mD,ResourceContext as fD}from"@frontmcp/sdk";var Yl=class extends fD{static{s(this,"Kf")}static{o(this,"ProcessClusterResource")}async execute(){return this.get(q).read("process://cluster")}};Yl=S([mD({name:"process-cluster",uri:"process://cluster",mimeType:"application/json",description:"Dev-cluster service health: which services are up / down / wedged / crash-looping, restart counts, and the error lines services printed (ERROR in, error TS\u2026, EADDRINUSE). Read this when a request 502s or a dev server stopped responding."})],Yl);var gD=Yl;import{Tool as hD,ToolContext as vD}from"@frontmcp/sdk";var j1=["typecheck","lint","build","runtime","cluster"],yD=[...j1,"all"],ED={typecheck:[{signal:"typecheck://current",resource:"typecheck://errors",keys:["errors"],hint:"TypeScript diagnostics from the watching tsc. Already computed \u2014 no need to run `nx typecheck`."}],lint:[{signal:"lint://current",resource:"lint://errors",keys:["errors"],hint:"ESLint errors from the watching lint pass. Already computed \u2014 no need to run `nx lint`."}],build:[{signal:"build://current",resource:"build://failures",keys:["failures"],hint:"Bundler/compile failures. The dev server is serving a stale or broken bundle until these clear."}],runtime:[{signal:"runtime://browser/errors",resource:"runtime://browser/errors",keys:["entries"],hint:"Uncaught errors from the browser. Pair with flow_list_recent to see what the user did first."},{signal:"runtime://errors",resource:"runtime://errors",keys:["entries"],hint:"Errors a dev service raised while handling a request (a 500 from a curl, an e2e runner or the page) \u2014 route, status, request id and stack. No browser is involved."}],cluster:[{signal:"process://cluster",resource:"process://cluster",keys:["errors"],hint:"Error lines printed by dev services (ERROR in / error TS / EADDRINUSE). A wedged or crash-looping service 502s every request routed to it."}]},bD=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,"asRecord");async function N1(e,t){let r;try{r=bD(await e.read(t.resource))}catch{return[]}if(!r)return[];for(let i of t.keys){let u=r[i];if(Array.isArray(u))return u}return[]}s(N1,"$R"),o(N1,"readItems");async function O1(e){let t=e.kind==="all"?j1:[e.kind],r=await Gl(e.resources),i=new Map(r.map(n=>[n.resource,n])),u=[];for(let n of t)for(let a of ED[n]){let l=i.get(a.signal),d=l?.producer??"none",p=l?.state??"unknown",c=d==="none"?[]:await N1(e.resources,a);u.push({kind:n,resource:a.resource,producer:d,state:p,count:c.length,returned:Math.min(c.length,e.limit),items:c.slice(0,e.limit),detail:l?.detail??`no producer for ${a.resource} \u2014 unmonitored, not healthy`,hint:a.hint})}return{kind:e.kind,totalErrors:u.reduce((n,a)=>n+a.count,0),unmonitored:[...new Set(u.filter(n=>n.producer==="none").map(n=>n.kind))],groups:u}}s(O1,"Yf"),o(O1,"collectErrors");var R1={name:"observe.current_status",description:'Workspace health in one call: whether anything is BLOCKING right now (typecheck errors, lint errors, build failures, browser runtime errors, wedged or crash-looping dev services), plus warnings and the exact resources to read next. Call this FIRST when a build, dev server, or page looks broken \u2014 and before running `nx typecheck` / `nx lint` for a project the dev cluster already watches, because those results are already computed here. Signals reporting `producer: "none"` are UNMONITORED, not healthy. Use observe.errors for the individual error items.'},zt={name:"observe.errors",description:"The actual error items the lens already computed: TypeScript diagnostics, ESLint errors, build failures, uncaught browser errors, server-side request errors (a dev service's 500: route, status, stack), and error lines printed by dev services (ERROR in\u2026, error TS\u2026, EADDRINUSE). Filter with `kind`. Prefer this over running `nx typecheck` / `nx lint` or tailing a dev-server log for a project the dev cluster watches: the watching producers already have the answer, so this costs one call instead of a rebuild. Each group reports `producer` \u2014 `none` means nothing is feeding that check, so an empty list there is NOT proof it is clean.",kinds:yD,defaultKind:"all",defaultLimit:25,maxLimit:200},T1="agent://current-status",Ql=class extends vD{static{s(this,"em")}static{o(this,"ObserveCurrentStatusTool")}async execute(){let e=this.get(q);try{return await e.read(T1)}catch{}let t=this.get(Fl);return Ii({resources:e,sessionId:t.id,revision:e.revision(T1)??0})}};Ql=S([hD({name:R1.name,description:R1.description,inputSchema:{}})],Ql);var DD=Ql;import{Tool as wD,ToolContext as BD,z as M1}from"@frontmcp/sdk";var ed=class extends BD{static{s(this,"rm")}static{o(this,"ObserveErrorsTool")}async execute(e){let t=this.get(q);return O1({resources:t,kind:e.kind,limit:e.limit})}};ed=S([wD({name:zt.name,description:zt.description,inputSchema:{kind:M1.enum(zt.kinds).default(zt.defaultKind).describe("Which failures to return. 'runtime' = browser errors AND a service's own request errors (the 500 case); 'cluster' = dev-service/pod errors (the 502 case). Default 'all'."),limit:M1.number().int().positive().max(zt.maxLimit).default(zt.defaultLimit).describe(`Max items per kind (default ${zt.defaultLimit}). \`count\` still reports the true total.`)}})],ed);var $D=ed;import{spawn as CD}from"node:child_process";import{existsSync as td,readFileSync as xD}from"node:fs";import{join as P1}from"node:path";import{Job as kD,JobContext as AD,z as Ce}from"@frontmcp/sdk";import{existsSync as _D}from"node:fs";import{dirname as ID,join as SD,relative as FD,resolve as jt,isAbsolute as zD}from"node:path";var jD=6;function U1(e=process.env,t=process.cwd()){return jt(e.LENSMCP_WORKSPACE_ROOT??t)}s(U1,"_x"),o(U1,"resolveAllowedRoot");function Si(e,t){let r=FD(jt(e),jt(t));return r===""||!r.startsWith("..")&&!zD(r)}s(Si,"om"),o(Si,"isWithinRoot");function Z1(e,t){let r=jt(e);if(t===void 0)return{ok:!0,cwd:r};let i=jt(r,t);return Si(r,i)?{ok:!0,cwd:i}:{ok:!1,reason:`cwd ${i} is outside this server's workspace (${r}). verify_fix runs a workspace-defined Nx target, so it only runs in the workspace this server was started for. Set LENSMCP_WORKSPACE_ROOT to serve a different one.`}}s(Z1,"kx"),o(Z1,"confineToWorkspace");function q1(e,t){let r=jt(t),i=jt(e);if(Si(r,i))for(let u=0;u<jD;u++){if(_D(SD(i,"nx.json")))return i;if(i===r)break;let n=ID(i);if(n===i||!Si(r,n))break;i=n}}s(q1,"Sx"),o(q1,"findNxWorkspaceRootWithin");var ND=/^[@A-Za-z0-9][\w./-]*$/;function L1(e){return e.length<=214&&ND.test(e)}s(L1,"Ix"),o(L1,"isValidProjectName");var ud=class extends AD{static{s(this,"sm")}static{o(this,"VerifyFixJob")}async execute(e){let t=Date.now(),r=e.project??process.env.LENSMCP_VERIFY_PROJECT??"example-web",i=U1(),u=Z1(i,e.cwd);if(!u.ok)return this.log(`[verify_fix] refused: ${u.reason}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let n=u.cwd;if(!L1(r))return this.log(`[verify_fix] refused: ${r} is not a valid Nx project name`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let a=q1(n,i);if(!a)return this.log(`No nx.json found between ${n} and ${i}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let l=J1("nx",[a]);if(!l)return this.log(`Could not find node_modules/.bin/nx under ${a}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};this.log(`[verify_fix] nx run ${r}:agent-verify (cwd=${a})`);let d=CD(l,["run",`${r}:agent-verify`],{cwd:a,env:{...process.env},stdio:["ignore","pipe","pipe"]}),p=[],c=o(D=>{let $=/\[agent-verify\] ([a-z]+): (passed|failed|skipped|errored)/.exec(D);$&&$[1]&&$[2]&&(p.push({name:$[1],result:$[2],durationMs:0}),this.log(` ${$[1]}: ${$[2]}`))},"captureLine");rd(d.stdout,c),rd(d.stderr,c);let f=!1,g=setTimeout(()=>{f=!0;try{d.kill("SIGTERM")}catch{}},e.timeoutMs),m=await new Promise(D=>{d.on("exit",$=>D($??1))});if(clearTimeout(g),f)return{status:"timeout",project:r,durationMs:Date.now()-t,stages:p,reportPath:null};let h=P1(a,".lensmcp","verifications","latest.json"),E;if(td(h))try{E=JSON.parse(xD(h,"utf-8"))}catch{E=void 0}return{status:E?.status??(m===0?"passed":"failed"),project:r,durationMs:E?.durationMs??Date.now()-t,stages:E?.stages??p,reportPath:td(h)?h:null}}};ud=S([kD({name:"observe.verify_fix",description:"Run the deterministic verification loop (typecheck \u2192 lint \u2192 build) for a host project. Returns a per-stage report; suggested next read on failure is the relevant *://errors resource.",inputSchema:{project:Ce.string().describe('Nx project name in the host workspace to verify. Defaults to LENSMCP_VERIFY_PROJECT or "example-web".').optional(),cwd:Ce.string().describe("Directory to verify from. MUST be inside the workspace this server was started for (LENSMCP_WORKSPACE_ROOT, else the server's cwd); a path outside it is refused. Defaults to that workspace root.").optional(),timeoutMs:Ce.number().int().positive().default(5*6e4).describe("How long to wait for the verify pipeline before declaring it stuck.")},outputSchema:{status:Ce.enum(["passed","failed","errored","timeout"]),project:Ce.string().nullable(),durationMs:Ce.number(),stages:Ce.array(Ce.object({name:Ce.string(),result:Ce.enum(["passed","failed","skipped","errored"]),durationMs:Ce.number(),exitCode:Ce.number().optional(),summary:Ce.string().optional()})),reportPath:Ce.string().nullable()}})],ud);var OD=ud;function J1(e,t){for(let r of t){let i=P1(r,"node_modules",".bin",e);if(td(i))return i}}s(J1,"CR"),o(J1,"locateBin");function rd(e,t){if(!e)return;let r="";e.setEncoding("utf-8"),e.on("data",i=>{r+=typeof i=="string"?i:i.toString("utf-8");let u;for(;(u=r.indexOf(`
|
|
69
|
+
`))!==-1;){let n=r.slice(0,u);r=r.slice(u+1),t(n)}}),e.on("end",()=>{r.length&&t(r)})}s(rd,"Rx"),o(rd,"bufferLines");var V1=class{static{s(this,"cm")}static{o(this,"AgentApp")}};V1=S([aD({id:"agent",name:"Agent",description:"Agent-facing summary, suggested reads, verification.",resources:[pD,gD],tools:[DD,$D],jobs:[OD]})],V1);var RD={"service-starting":"starting","service-respawn":"starting","lens-app-up":"starting","service-up":"up","cold-start":"up","service-down":"down","idle-kill":"idle","service-recycle":"wedged","pod-recycle":"wedged","service-crash-loop":"crash-looping","lens-handoff-complete":"up","gateway-up":"up","gateway-down":"down","lens-child-starting":"starting","lens-child-up":"up","lens-child-exit":"down"},TD=new Set(["service-respawn","service-recycle","pod-recycle","lens-handoff-complete"]),MD=class{static{s(this,"Yn")}static{o(this,"ClusterHealth")}constructor(){this.services=new Map,this.errors=[]}ingest(e){if(e.source!=="gateway"||e.category!=="cluster")return!1;let t=e.raw??{},r=typeof t.kind=="string"?t.kind:void 0;if(!r)return!1;let i=typeof t.project=="string"?t.project:void 0;if(!i)return!1;if(r==="service-error"){let a=typeof t.line=="string"?t.line:e.message??e.title;this.errors.push({project:i,timestamp:e.timestamp,line:a,fingerprint:e.fingerprint}),this.errors.length>50&&this.errors.splice(0,this.errors.length-50);let l=this.touch(i,e.timestamp);return l.buildFailed=!0,l.lastTitle=e.title,!0}if(r==="lens-handoff-start"){let a=this.touch(i,e.timestamp);return t.oldServing!==!0&&(a.state="starting"),a.lastTitle=e.title,!0}if(r==="lens-handoff-failed"){let a=this.touch(i,e.timestamp);return t.oldKept!==!0&&(a.state="down"),a.lastTitle=e.title,!0}let u=RD[r];if(!u)return!1;let n=this.touch(i,e.timestamp);return n.state=u,n.lastTitle=e.title,TD.has(r)&&(n.restarts+=1),u==="up"&&(n.buildFailed=!1),!0}snapshot(){let e=[...this.services.values()].sort((r,i)=>r.project.localeCompare(i.project)),t=o(r=>e.filter(i=>i.state===r).map(i=>i.project),"byState");return{services:e,up:t("up"),down:t("down"),wedged:t("wedged"),crashLooping:t("crash-looping"),idle:t("idle"),buildFailed:e.filter(r=>r.buildFailed).map(r=>r.project),restarts:e.reduce((r,i)=>r+i.restarts,0),errors:this.errors.slice()}}touch(e,t){let r=this.services.get(e);if(!r){if(this.services.size>=100){let i;for(let u of this.services.values())(!i||u.lastSeenAt<i.lastSeenAt)&&(i=u);i&&this.services.delete(i.project)}r={project:e,state:"starting",restarts:0,buildFailed:!1,lastTitle:"",lastSeenAt:t},this.services.set(e,r)}return r.lastSeenAt=t,r}},Fi="agent://current-status",zi="process://cluster",PD=250,UD=new Set(["build","lint","typecheck","runtime","cluster","memory","visual","performance"]);function W1(e){let t=new MD,r=e.sessionId??"pending",i,u=o(()=>{i||(i=setTimeout(()=>{i=void 0,e.resources.markDirty(Fi)},PD),i.unref?.())},"scheduleStatusRefresh"),n=o(l=>{let d=t.ingest(l);d&&e.resources.markDirty(zi),(d||UD.has(l.category))&&u()},"handler"),a=e.bus.subscribe(n);return e.resources.register(zi,()=>({schemaVersion:1,revision:e.resources.revision(zi)??0,updatedAt:new Date().toISOString(),...t.snapshot()})),e.resources.register(Fi,()=>Ii({resources:e.resources,sessionId:r,revision:e.resources.revision(Fi)??0})),{unsubscribe:o(()=>{a(),i&&(clearTimeout(i),i=void 0)},"unsubscribe"),uris:[Fi,zi]}}s(W1,"um"),o(W1,"installAgentReducer");import{App as ZD}from"@frontmcp/sdk";import{Resource as qD,ResourceContext as LD}from"@frontmcp/sdk";var nd=class extends LD{static{s(this,"lm")}static{o(this,"FlowRecentResource")}async execute(){return this.get(q).read("flow://recent")}};nd=S([qD({name:"flow-recent",uri:"flow://recent",mimeType:"application/json",description:"Last 50 flows seen this session, most recent first."})],nd);var JD=nd;import{Resource as VD,ResourceContext as WD}from"@frontmcp/sdk";var id=class extends WD{static{s(this,"pm")}static{o(this,"FlowCurrentResource")}async execute(){return this.get(q).read("flow://current")}};id=S([VD({name:"flow-current",uri:"flow://current",mimeType:"application/json",description:"The most recently active flow (origin + event count + headline)."})],id);var GD=id;import{Resource as KD,ResourceContext as HD}from"@frontmcp/sdk";var sd=class extends HD{static{s(this,"mm")}static{o(this,"FlowOriginsRecentResource")}async execute(){return this.get(q).read("flow://origins/recent")}};sd=S([KD({name:"flow-origins-recent",uri:"flow://origins/recent",mimeType:"application/json",description:"Last 50 flow-origin events (one per detected flow start)."})],sd);var XD=sd;import{Tool as YD,ToolContext as QD,z as ji}from"@frontmcp/sdk";var G1;function ad(e){G1=e}s(ad,"$s"),o(ad,"setActiveFlowLookups");function Ve(){return G1}s(Ve,"be"),o(Ve,"activeFlowLookups");var ew=120;function od(e,t,r){return{id:e.id,kind:e.kind,label:e.label,category:t,phase:e.phase,startOffsetMs:Math.max(0,e.start-r),durationMs:e.durationMs,events:e.counts.total,signal:e.counts.signal,errors:e.counts.errors,worstSeverity:e.worstSeverity,projects:e.projects,...e.route?{route:e.route}:{},...e.method?{method:e.method}:{},...e.part?{part:e.part}:{},...e.hot?{hot:e.hot}:{},...e.after?{after:e.after}:{}}}s(od,"hm"),o(od,"segmentView");function ld(e,t={}){let{segmentation:r,classification:i,segmentCategories:u}=e,n=Math.max(1,t.maxSegments??ew),a=r.segments.reduce((p,c)=>Math.min(p,c.start),1/0),l=Number.isFinite(a)?a:0,d=r.segments;if(d.length>n){let p=o(f=>f.counts.errors*1e6+f.counts.signal,"rank"),c=new Set([...d].sort((f,g)=>p(g)-p(f)||(f.id<g.id?-1:1)).slice(0,n).map(f=>f.id));d=d.filter(f=>c.has(f.id))}return{flowId:r.flowId,category:i.category,decidedBy:i.decidedBy,...i.subject?{subject:i.subject}:{},tags:i.tags,origin:i.origin,stats:{events:r.stats.events,signal:r.stats.signal,bookkeeping:r.stats.bookkeeping,segments:r.stats.segments,phases:r.stats.phases},phases:r.phases.map(p=>({index:p.index,startOffsetMs:Math.max(0,p.start-l),endOffsetMs:Math.max(0,p.end-l),segmentIds:p.segmentIds})),segments:d.map(p=>od(p,u[p.id]??"other",l)),segmentsTruncated:d.length<r.segments.length}}s(ld,"vm"),o(ld,"overviewOf");function K1(e,t,r){let i=t.segmentation.segments.find(n=>n.id===r);if(!i)return;let u=new Set(i.eventIds);return e.filter(n=>u.has(n.id))}s(K1,"Ax"),o(K1,"eventsOfSegment");function H1(e,t){return e.filter(r=>(t.category===void 0||r.category===t.category)&&(t.tag===void 0||r.tags.includes(t.tag))&&(t.subject===void 0||r.subject===t.subject))}s(H1,"zx"),o(H1,"filterClassified");function X1(e){let t=e.map(r=>({category:r.category,...r.subject?{subject:r.subject}:{},id:r.summary.flowId}));return r1(t).map(r=>({category:r.category,count:r.count,subjects:r.subjects.map(i=>({...i.subject!==void 0?{subject:i.subject}:{},count:i.count,flowIds:i.items.map(u=>u.id)}))}))}s(X1,"jx"),o(X1,"groupClassified");function Y1(e){let t={};for(let r of e)t[r.category]=(t[r.category]??0)+1;return t}s(Y1,"Ox"),o(Y1,"categoryCounts");function Q1(e,t){if(!e)return{found:!1,reason:"no active flow reducer"};let r=e.getFlowSummary(t.flowId),i=e.getFlowEvents(t.flowId);if(!r||!i)return{found:!1,flowId:t.flowId};let u=e.analyzeFlow(t.flowId);if(t.segmentId){let a=u?K1(i,u,t.segmentId):void 0,l=u?.segmentation.segments.find(c=>c.id===t.segmentId);if(!u||!a||!l)return{found:!1,flowId:t.flowId,segmentId:t.segmentId,reason:"unknown segment id for this flow (the flow may have changed \u2014 re-read overview.segments)",segmentIds:u?.segmentation.segments.map(c=>c.id)??[]};let d=u.segmentation.segments.reduce((c,f)=>Math.min(c,f.start),1/0),{events:p}=Di(a,{includeRaw:t.includeRaw});return{found:!0,summary:r,segment:od(l,u.segmentCategories[l.id]??"other",Number.isFinite(d)?d:l.start),truncated:p.length>t.limit,events:p.slice(0,t.limit)}}let{events:n}=Di(i,{includeRaw:t.includeRaw});if(t.expand){let a=n.find(p=>p.id===t.expand);if(!a)return{found:!1,flowId:t.flowId,expand:t.expand};let l=new Set(a.memberIds??[a.id]),d=i.filter(p=>l.has(p.id));return{found:!0,flowId:t.flowId,expanded:{id:a.id,title:a.title,count:d.length},events:d.map(p=>({id:p.id,timestamp:p.timestamp,source:p.source,category:p.category,severity:p.severity,title:p.title,message:p.message,...t.includeRaw?{raw:p.raw}:{}}))}}return{found:!0,summary:r,...u?{overview:ld(u)}:{},truncated:n.length>t.limit,events:n.slice(0,t.limit)}}s(Q1,"Nx"),o(Q1,"getFlowDetail");async function e3(e,t,r){if(e){let u=e.classifiedRecent(),n=H1(u,{...t.category?{category:t.category}:{},...t.tag?{tag:t.tag}:{}}),a=n.slice(0,t.limit);return{flows:a.map(l=>({...l.summary,category:l.category,decidedBy:l.decidedBy,...l.subject?{subject:l.subject}:{},tags:l.tags,segmentCount:l.segmentCount,phaseCount:l.phaseCount,signalCount:l.signalCount})),totalKnown:u.length,matching:n.length,categories:Y1(u),...t.groupBy==="category"?{groups:X1(a)}:{}}}let i=await r();return{flows:i.flows.slice(0,t.limit),totalKnown:i.flows.length}}s(e3,"Px"),o(e3,"listRecentFlows");function t3(e,t){if(!e)return{found:!1,reason:"no active flow reducer"};let r=e.analyzeFlow(t.flowId);return r?{found:!0,...ld(r,{maxSegments:t.maxSegments})}:{found:!1,flowId:t.flowId}}s(t3,"Dx"),o(t3,"getFlowSegments");var dd=class extends QD{static{s(this,"ym")}static{o(this,"FlowListRecentTool")}async execute(e){return e3(Ve(),e,async()=>await this.get(q).read("flow://recent"))}};dd=S([YD({name:"flow.list_recent",description:'Lists the last N flows with their origin + event count + headline, and what each one IS: `category` (page-load, user-action, api, ai, test, or one you defined in nx.json#lensmcp.flows), `subject` (the templated page, component or route), `tags` (fan-out, has-error, slow, storm\u2026), `segmentCount`/`phaseCount`. Filter with `category` / `tag`; pass `groupBy: "category"` to also get the flows grouped category \u2192 subject; `categories` always counts every known flow per category. Same data as flow://recent but with a tunable limit.',inputSchema:{limit:ji.number().int().positive().max(50).default(10).describe("How many flows to return (default 10, max 50)."),category:ji.string().optional().describe('Only flows in this category, e.g. "page-load" or "checkout".'),tag:ji.string().optional().describe('Only flows carrying this tag, e.g. "has-error" or "fan-out".'),groupBy:ji.enum(["none","category"]).default("none").describe('"category" adds `groups`: the returned flows grouped category \u2192 subject.')}})],dd);var tw=dd;import{Tool as uw,ToolContext as rw,z as Sr}from"@frontmcp/sdk";var cd=class extends rw{static{s(this,"wm")}static{o(this,"FlowGetTool")}async execute(e){return Q1(Ve(),e)}};cd=S([uw({name:"flow.get",description:'Returns one flow as the ordered, parented mechanism tree the dashboard renders: each node has `parent`, `area`, `start`, `durationMs`, and repeated work is collapsed (`count`, `memberIds`). Pass `expand: "<node id>"` to list the individual events a collapsed node stands for, or `includeRaw: true` for the full `event.raw` payloads. The response also carries `overview`: the flow cut into segments (one backend request each, UI bursts, the origin) grouped into phases, with its category, subject and tags \u2014 for a big flow read that first, then pass `segmentId: "<segment id>"` to get just that unit as a mechanism tree.',inputSchema:{flowId:Sr.string().describe("Flow id from flow://recent."),includeRaw:Sr.boolean().default(!1),limit:Sr.number().int().positive().max(500).default(200),expand:Sr.string().optional().describe("A node id from a previous call: returns the individual events it collapsed."),segmentId:Sr.string().optional().describe("A segment id from `overview.segments` (or flow.segments): returns only that unit of the flow, shaped like the whole.")}})],cd);var nw=cd;import{Tool as iw,ToolContext as sw,z as aw}from"@frontmcp/sdk";var pd=class extends sw{static{s(this,"$m")}static{o(this,"FlowFindByOriginTool")}async execute(e){let t=Ve();if(!t)return{found:!1,reason:"no active flow reducer"};let r=t.findFlowsByOrigin(e.originNodeId);return{found:r.length>0,count:r.length,flows:r}}};pd=S([iw({name:"flow.find_by_origin",description:"Returns all flows whose origin node id matches `originNodeId` (e.g. a data-agent-component target).",inputSchema:{originNodeId:aw.string().describe("Origin node id \u2014 usually the value of data-agent-component on the originating element.")}})],pd);var ow=pd;import{Tool as lw,ToolContext as dw,z as cw}from"@frontmcp/sdk";import*as pw from"node:fs";import{dirname as mw,join as u3}from"node:path";var fw="ai",gw=/^ai_[0-9a-z]{8,40}$/,Ni=o(e=>typeof e=="string"&&gw.test(e),"isAiCallId");function r3(e){return u3(mw(e),fw)}s(r3,"aT"),o(r3,"aiContentDir");function n3(e,t){if(!Ni(t))throw new Error("invalid ai call id");return u3(r3(e),`${t}.json`)}s(n3,"cT"),o(n3,"aiContentFile");function md(e,t){if(Ni(t))try{let r=JSON.parse(pw.readFileSync(n3(e,t),"utf8"));return r&&r.schemaVersion===1&&r.id===t?r:void 0}catch{return}}s(md,"ks"),o(md,"readAiContent");var fd=class extends dw{static{s(this,"km")}static{o(this,"AiGetCallTool")}async execute(e){if(!Ni(e.callId))return{found:!1,reason:"invalid call id"};let t=md(process.env.LENSMCP_EVENT_FILE??`${process.cwd()}/.lensmcp/events.jsonl`,e.callId);return t?{found:!0,call:t}:{found:!1,callId:e.callId,reason:"no captured content for this call \u2014 it was not captured (LENSMCP_AI_CAPTURE=content), or it has been rotated away"}}};fd=S([lw({name:"ai.get_call",description:"Returns the prompt and completion of ONE AI call (OpenAI, Anthropic, \u2026) captured by the node tap: system prompt, messages, tools offered, completion, tool calls, usage. `callId` is the `ai.contentRef` of a flow node whose kind is `ai-call` (see flow.get). Only exists when the service ran with LENSMCP_AI_CAPTURE=content; the text was redacted and size-capped when it was captured, and `truncated: true` says if anything was cut.",inputSchema:{callId:cw.string().describe('The contentRef of an ai-call flow node, e.g. "ai_0abc12345xyz78".')}})],fd);var hw=fd;import{Tool as vw,ToolContext as yw,z as i3}from"@frontmcp/sdk";var gd=class extends yw{static{s(this,"Sm")}static{o(this,"FlowSegmentsTool")}async execute(e){return t3(Ve(),e)}};gd=S([vw({name:"flow.segments",description:"Returns one flow cut into segments and phases \u2014 the right first read for a flow with hundreds or thousands of events. Each segment is a backend request (its browser fetch, every service hop, db/redis/ai work and any queue worker it enqueued), a UI burst (state updates and renders, named by what churned), the origin that started the flow, or background noise; with times relative to the flow start, event/error counts, and a category. Also returns the flow's category, subject and tags. Open one unit with flow.get { flowId, segmentId }.",inputSchema:{flowId:i3.string().describe("Flow id from flow://recent or flow.list_recent."),maxSegments:i3.number().int().positive().max(500).default(120).describe("Cap on segments listed (failing and heaviest are kept first when it truncates).")}})],gd);var Ew=gd,s3=class{static{s(this,"Im")}static{o(this,"FlowApp")}};s3=S([ZD({id:"flow",name:"Flow",description:"Causal-chain index: every event carries a flowId; the app surfaces recent flows + origin events. story.compile turns one of these into a phase summary.",resources:[JD,GD,XD],tools:[tw,nw,Ew,ow,hw]})],s3);var Oi="flow://recent",Ri="flow://current",Ti="flow://origins/recent",Fr=50,a3=50,hd=2e3,bw=4*1024*1024,vd=32*1024*1024,Dw=Fr+10;function o3(e){let t={flows:new Map,origins:[],recentOrder:[],retainedEvents:0,retainedBytes:0,evictedEvents:0,evictedForBytes:0},r=o((c,f,g,m=!0)=>{let h=Math.min(f,c.events.length);if(h<=0)return;if(m&&h>0&&(c.events[0]?.raw??{}).kind==="flow-origin"&&c.events.length>1){let D=c.eventBytes[1]??0;if(c.events.splice(1,1),c.eventBytes.splice(1,1),c.retainedBytes=Math.max(0,c.retainedBytes-D),t.retainedEvents=Math.max(0,t.retainedEvents-1),t.retainedBytes=Math.max(0,t.retainedBytes-D),t.evictedEvents+=1,g&&(t.evictedForBytes+=1),h-=1,h<=0)return}let E=0;for(let D=0;D<h;D+=1)E+=c.eventBytes[D]??0;c.events.splice(0,h),c.eventBytes.splice(0,h),c.retainedBytes=Math.max(0,c.retainedBytes-E),t.retainedEvents=Math.max(0,t.retainedEvents-h),t.retainedBytes=Math.max(0,t.retainedBytes-E),t.evictedEvents+=h,g&&(t.evictedForBytes+=h)},"evictPrefix"),i=o(c=>{let f=0,g=c.retainedBytes;for(;g>bw&&f<c.eventBytes.length;)g-=c.eventBytes[f]??0,f+=1;r(c,f,!0)},"enforceEntryByteCap"),u=o(()=>{for(let c=t.recentOrder.length-1;t.retainedBytes>vd&&c>=0;c-=1){let f=t.flows.get(t.recentOrder[c]);if(!f)continue;let g=0,m=t.retainedBytes;for(;m>vd&&g<f.eventBytes.length;)m-=f.eventBytes[g]??0,g+=1;r(f,g,!0)}},"enforceGlobalByteCap"),n=o(c=>{let f=c.context.flowId;if(!f)return;let g=(c.raw??{}).kind;if(g==="subscription-added"||g==="subscription-removed"||g==="hook-run"||g==="store-created"||g==="singleton-instance"||g==="visual-frame")return;let m=g==="flow-origin",h=t.flows.get(f);if(!h){h={summary:{flowId:f,originType:c.context.originType,originNodeId:c.context.originNodeId,startedAt:c.timestamp,lastSeenAt:c.timestamp,eventCount:0,headline:c.title},events:[],eventBytes:[],retainedBytes:0,hasOrigin:!1},t.flows.set(f,h);let $={flowId:f,originType:c.context.originType,originNodeId:c.context.originNodeId,at:c.timestamp,label:c.title,eventId:c.id};t.origins.push($),t.origins.length>a3&&t.origins.splice(0,t.origins.length-a3),e.resources.markDirty(Ti)}m&&!h.hasOrigin&&(h.hasOrigin=!0,h.summary.headline=c.title,c.context.originType&&(h.summary.originType=c.context.originType),c.context.originNodeId&&(h.summary.originNodeId=c.context.originNodeId)),c.timestamp<h.summary.startedAt&&(h.summary.startedAt=c.timestamp);let E=ki(c);h.events.push(c),h.eventBytes.push(E),h.retainedBytes+=E,t.retainedEvents+=1,t.retainedBytes+=E,h.events.length>hd&&r(h,h.events.length-hd,!1),i(h),h.summary.eventCount+=1,h.summary.lastSeenAt=c.timestamp;let D=t.recentOrder.indexOf(f);if(D>=0&&t.recentOrder.splice(D,1),t.recentOrder.unshift(f),t.recentOrder.length>Fr){let $=t.recentOrder.splice(Fr);for(let A of $){let I=t.flows.get(A);I&&r(I,I.events.length,!1,!1),t.flows.delete(A)}}u(),t.currentFlowId!==f&&(t.currentFlowId=f,e.resources.markDirty(Ri)),e.resources.markDirty(Oi)},"handler"),a=e.bus.subscribe(n);e.resources.register(Oi,()=>({schemaVersion:1,revision:e.resources.revision(Oi)??0,updatedAt:new Date().toISOString(),flows:t.recentOrder.map(c=>t.flows.get(c)?.summary).filter(c=>!!c)})),e.resources.register(Ri,()=>{let c=t.currentFlowId,f=c?t.flows.get(c):void 0;return{schemaVersion:1,revision:e.resources.revision(Ri)??0,updatedAt:new Date().toISOString(),flow:f?.summary??null}}),e.resources.register(Ti,()=>({schemaVersion:1,revision:e.resources.revision(Ti)??0,updatedAt:new Date().toISOString(),origins:t.origins.slice().reverse()}));let l=e.flows??lt,d=new Map,p={getFlowEvents(c){return t.flows.get(c)?.events.slice().sort((f,g)=>f.timestamp-g.timestamp)},getFlowSummary(c){return t.flows.get(c)?.summary},recentFlowIds(){return t.recentOrder.slice()},findFlowsByOrigin(c){return[...t.flows.values()].filter(f=>f.summary.originNodeId===c).map(f=>f.summary)},flowsConfig:l,analyzeFlow(c){let f=t.flows.get(c);if(!f)return;let g=`${f.summary.eventCount}:${f.events.length}:${f.summary.lastSeenAt}`,m=d.get(c);if(m&&m.key===g)return d.delete(c),d.set(c,m),m.analysis;let h=xi(p.getFlowEvents(c)??[],l);for(d.delete(c),d.set(c,{key:g,analysis:h});d.size>Dw;)d.delete(d.keys().next().value);return h},classifiedRecent(c=Fr){let f=[];for(let g of t.recentOrder){if(f.length>=c)break;let m=t.flows.get(g)?.summary,h=p.analyzeFlow(g);!m||!h||f.push({summary:m,category:h.classification.category,decidedBy:h.classification.decidedBy,...h.classification.subject?{subject:h.classification.subject}:{},tags:h.classification.tags,segmentCount:h.segmentation.stats.segments,phaseCount:h.segmentation.stats.phases,signalCount:h.segmentation.stats.signal})}return f}};return ad(p),{unsubscribe:o(()=>{ad(void 0),a()},"unsubscribe"),uris:[Oi,Ri,Ti],lookups:p,retentionStats:o(()=>({residentEvents:t.retainedEvents,residentBytes:t.retainedBytes,evictedEvents:t.evictedEvents,evictedForBytes:t.evictedForBytes,eventCap:Fr*hd,byteCap:vd}),"retentionStats")}}s(o3,"Em"),o(o3,"installFlowReducer");import{App as ww}from"@frontmcp/sdk";import{Resource as Bw,ResourceContext as $w}from"@frontmcp/sdk";var yd=class extends $w{static{s(this,"Am")}static{o(this,"StoryRecentResource")}async execute(){return this.get(q).read("story://recent")}};yd=S([Bw({name:"story-recent",uri:"story://recent",mimeType:"application/json",description:"Last 50 compiled stories (one per flow), most recent first."})],yd);var Cw=yd;import{Resource as xw,ResourceContext as kw}from"@frontmcp/sdk";var Ed=class extends kw{static{s(this,"jm")}static{o(this,"StoryLastResource")}async execute(){return this.get(q).read("story://last")}};Ed=S([xw({name:"story-last",uri:"story://last",mimeType:"application/json",description:"The most recently compiled story (full phase list)."})],Ed);var Aw=Ed;import{Tool as _w,ToolContext as Iw,z as Sw}from"@frontmcp/sdk";var Mi="story://recent",Pi="story://last",Oe={byFlowId:new Map,order:[]},l3=!1;function d3(e){return l3||(e.resources.register(Mi,()=>({schemaVersion:1,revision:e.resources.revision(Mi)??0,updatedAt:new Date().toISOString(),stories:Oe.order.map(t=>Oe.byFlowId.get(t)).filter(t=>!!t).map(t=>({flowId:t.flowId,origin:t.origin,phaseCount:t.phases.length,startedAt:t.startedAt,endedAt:t.endedAt,eventCount:t.eventCount,finalState:t.finalState}))})),e.resources.register(Pi,()=>{let t=Oe.order[0],r=t?Oe.byFlowId.get(t):void 0;return{schemaVersion:1,revision:e.resources.revision(Pi)??0,updatedAt:new Date().toISOString(),story:r??null}}),l3=!0),c3(e.resources),{uris:[Mi,Pi]}}s(d3,"Pm"),o(d3,"installStoryReducer");var bd;function c3(e){bd=o(t=>{e.markDirty(t)},"markDirty")}s(c3,"xT"),o(c3,"setMarkDirty");function Dd(e){Oe.byFlowId.set(e.flowId,e);let t=Oe.order.indexOf(e.flowId);if(t>=0&&Oe.order.splice(t,1),Oe.order.unshift(e.flowId),Oe.order.length>50){let r=Oe.order.splice(50);for(let i of r)Oe.byFlowId.delete(i)}bd?.(Mi),bd?.(Pi)}s(Dd,"to"),o(Dd,"recordCompiledStory");function p3(e){return Oe.byFlowId.get(e)}s(p3,"Dm"),o(p3,"getCompiledStory");var wd=class extends Iw{static{s(this,"Mm")}static{o(this,"StoryCompileTool")}async execute(e){let t=Ve();if(!t)return{compiled:!1,reason:"no active flow reducer"};let r=t.getFlowEvents(e.flowId);if(!r)return{compiled:!1,flowId:e.flowId};let i=Is(r,{flowId:e.flowId});return i?(Dd(i),{compiled:!0,story:i}):{compiled:!1,flowId:e.flowId}}};wd=S([_w({name:"story.compile",description:"Compile a flow into a `FlowStory` (origin, phases, finalState). Caches the result; subsequent story.get(flowId) calls return it directly.",inputSchema:{flowId:Sw.string().describe("Flow id (from flow://recent).")}})],wd);var Fw=wd;import{Tool as zw,ToolContext as jw,z as Nw}from"@frontmcp/sdk";var Bd=class extends jw{static{s(this,"Um")}static{o(this,"StoryGetTool")}async execute(e){let t=p3(e.flowId);return t?{found:!0,story:t}:{found:!1,flowId:e.flowId}}};Bd=S([zw({name:"story.get",description:"Returns a previously compiled story. If the story has not been compiled yet, returns `found: false`; call story.compile first.",inputSchema:{flowId:Nw.string().describe("Flow id.")}})],Bd);var Ow=Bd,m3=class{static{s(this,"Fm")}static{o(this,"StoryApp")}};m3=S([ww({id:"story",name:"Story",description:"Compiles flows into phase summaries (user-action / loading-ui / backend-request / state-update / final-render).",resources:[Cw,Aw],tools:[Fw,Ow]})],m3);import{App as Rw}from"@frontmcp/sdk";import{Resource as Tw,ResourceContext as Mw}from"@frontmcp/sdk";var $d=class extends Mw{static{s(this,"Zm")}static{o(this,"BuildCurrentResource")}async execute(){return this.get(q).read("build://current")}};$d=S([Tw({name:"build-current",uri:"build://current",mimeType:"application/json",description:"Current build status (clean / warning / failing), open failures and warnings."})],$d);var Pw=$d;import{Resource as Uw,ResourceContext as Zw}from"@frontmcp/sdk";var Cd=class extends Zw{static{s(this,"qm")}static{o(this,"BuildFailuresResource")}async execute(){return this.get(q).read("build://failures")}};Cd=S([Uw({name:"build-failures",uri:"build://failures",mimeType:"application/json",description:"Currently-open build failures (deduped by fingerprint)."})],Cd);var qw=Cd;import{Resource as Lw,ResourceContext as Jw}from"@frontmcp/sdk";var xd=class extends Jw{static{s(this,"Gm")}static{o(this,"BuildRecentResource")}async execute(){return this.get(q).read("build://events/recent")}};xd=S([Lw({name:"build-events-recent",uri:"build://events/recent",mimeType:"application/json",description:"Last 50 build/lint/typecheck/HMR events in chronological order."})],xd);var Vw=xd,f3=class{static{s(this,"Km")}static{o(this,"BuildApp")}};f3=S([Rw({id:"build",name:"Build",description:"Vite / TS / lint / HMR state.",resources:[Pw,qw,Vw]})],f3);var Ui="build://current",Zi="build://failures",qi="build://events/recent",Ww=new Set(["vite","rollup","typescript","eslint"]),g3=new Set(["build","typecheck","lint"]),h3=50,Gw="Install the LensMCP Vite plugin (@lensmcp/vite-plugin) in the dev server, or run under the dev cluster, so build events reach this session.";function v3(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(v3,"CT"),o(v3,"readRaw");function y3(e,t){return e==="typecheck"?"tsc":e==="lint"?"eslint":t}s(y3,"UT"),o(y3,"defaultTool");function E3(e){let t={status:"unknown",recent:[],failures:new Map,warnings:new Map,hmrUpdates:0,producers:new Map,sawVerdict:!1},r=o((g,m)=>{let h=t.producers.get(g);t.producers.set(g,{id:g,tool:m.tool,...m.project?{project:m.project}:{},firstReportedAt:h?.firstReportedAt??m.at,lastReportedAt:Math.max(h?.lastReportedAt??0,m.at),lastRunStatus:m.runStatus,errorCount:m.errorCount??h?.errorCount??0,...m.warningCount!==void 0?{warningCount:m.warningCount}:h?.warningCount!==void 0?{warningCount:h.warningCount}:{},...m.durationMs!==void 0?{lastRunDurationMs:m.durationMs}:h?.lastRunDurationMs!==void 0?{lastRunDurationMs:h.lastRunDurationMs}:{},...m.error?{error:m.error}:{}}),St(t.producers,xr)},"touchProducer"),i=o(g=>{for(let[m,h]of t.failures)g(h)&&t.failures.delete(m);for(let[m,h]of t.warnings)g(h)&&t.warnings.delete(m)},"drop"),u=o((g,m)=>{i(h=>h.domain===g&&(m===void 0||h.project===m))},"clearScope"),n=o((g,m)=>{if(m.length===0)return;let h=new Set(m);i(E=>E.domain===g&&E.file!==void 0&&h.has(E.file))},"clearFiles"),a=o(()=>{if(t.failures.size>0){t.status="failing";return}if(t.warnings.size>0){t.status="warning";return}let g=[...t.producers.values()].some(m=>m.lastRunStatus==="error");t.status=g||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),l=o(()=>{e.resources.markDirty(Ui),e.resources.markDirty(Zi),e.resources.markDirty(qi)},"markDirty"),d=o(g=>{if([...t.failures.values()].some(m=>m.project===g)||[...t.warnings.values()].some(m=>m.project===g)||[...t.producers.values()].some(m=>m.project===g)){for(let m of g3)u(m,g);for(let[m,h]of t.producers)h.project===g&&t.producers.delete(m);t.sawVerdict=[...t.producers.values()].some(m=>m.lastRunStatus!=="error"),a(),l()}},"supersedeProject"),p=o(g=>{if(g.source==="gateway"&&g.category==="cluster"){let j=g.raw??null,F=j?.kind;(F==="service-starting"||F==="service-respawn")&&j?.project&&d(j.project);return}if(!Ww.has(g.source)||!g3.has(g.category))return;let m=g.category,h=v3(g),E=h.project,D=h.tool??y3(m,g.source),$=`${D}:${E??"*"}`,A=typeof h.kind=="string"&&h.kind.endsWith("-run"),I={id:g.id,timestamp:g.timestamp,severity:g.severity,title:g.title,...g.message!==void 0?{message:g.message}:{},...g.location?.file?{file:g.location.file}:h.file?{file:h.file}:{},domain:m,...E?{project:E}:{},fingerprint:g.fingerprint};if(g.severity==="info"&&(A&&h.phase==="start"||g.title.startsWith("tsc clear")||g.title.startsWith("ESLint clear"))){u(m,E),t.lastRunAt=g.timestamp,zr(t,I),r($,{tool:D,...E?{project:E}:{},at:g.timestamp,runStatus:"running"}),A||(t.sawVerdict=!0),a(),l();return}if(A&&h.phase==="end"){let j=h.status==="error"?"error":h.status==="failing"?"failing":"clean";j==="clean"&&u(m,E),j!=="error"&&(t.sawVerdict=!0),t.lastRunAt=g.timestamp,zr(t,I),r($,{tool:D,...E?{project:E}:{},at:g.timestamp,runStatus:j,...h.durationMs!==void 0?{durationMs:h.durationMs}:{},...h.errorCount!==void 0?{errorCount:h.errorCount}:{},...h.warningCount!==void 0?{warningCount:h.warningCount}:{},...h.error?{error:h.error}:{}}),a(),l();return}if(h.kind==="hmr"||g.title.startsWith("HMR ")){t.hmrUpdates+=1;let j=[...I.file?[I.file]:[],...g.relatedFiles??[]];n("build",j),t.lastRunAt=g.timestamp,t.sawVerdict=!0,zr(t,I),r($,{tool:D,...E?{project:E}:{},at:g.timestamp,runStatus:"clean"}),a(),l();return}zr(t,I),g.severity==="error"||g.severity==="fatal"?(t.failures.set(I.fingerprint,I),t.warnings.delete(I.fingerprint)):g.severity==="warning"?t.failures.has(I.fingerprint)||t.warnings.set(I.fingerprint,I):(t.failures.delete(I.fingerprint),t.warnings.delete(I.fingerprint)),t.lastRunAt=g.timestamp,t.sawVerdict=!0,r($,{tool:D,...E?{project:E}:{},at:g.timestamp,runStatus:t.failures.size>0?"failing":"clean"}),a(),l()},"handler"),c=e.bus.subscribe(p),f=o(()=>yi({producers:[...t.producers.values()],domain:"build",noProducerHint:Gw}),"health");return e.resources.register(Ui,()=>({schemaVersion:1,revision:e.resources.revision(Ui)??0,updatedAt:new Date().toISOString(),status:t.status,failures:[...t.failures.values()],warnings:[...t.warnings.values()],hmrUpdates:t.hmrUpdates,lastRunAt:t.lastRunAt,...f()})),e.resources.register(Zi,()=>({schemaVersion:1,revision:e.resources.revision(Zi)??0,updatedAt:new Date().toISOString(),failures:[...t.failures.values()],...f()})),e.resources.register(qi,()=>({schemaVersion:1,revision:e.resources.revision(qi)??0,updatedAt:new Date().toISOString(),events:t.recent.slice()})),{unsubscribe:c,uris:[Ui,Zi,qi]}}s(E3,"Wm"),o(E3,"installBuildReducer");function zr(e,t){e.recent.push(t),e.recent.length>h3&&e.recent.splice(0,e.recent.length-h3)}s(zr,"Os"),o(zr,"pushRecent");import{App as Kw}from"@frontmcp/sdk";import{Resource as Hw,ResourceContext as Xw}from"@frontmcp/sdk";var kd=class extends Xw{static{s(this,"Xm")}static{o(this,"LintCurrentResource")}async execute(){return this.get(q).read("lint://current")}};kd=S([Hw({name:"lint-current",uri:"lint://current",mimeType:"application/json",description:"Current lint status (clean / warning / failing) + counts."})],kd);var Yw=kd;import{Resource as Qw,ResourceContext as eB}from"@frontmcp/sdk";var Ad=class extends eB{static{s(this,"Ym")}static{o(this,"LintErrorsResource")}async execute(){return this.get(q).read("lint://errors")}};Ad=S([Qw({name:"lint-errors",uri:"lint://errors",mimeType:"application/json",description:"Currently-open ESLint errors (deduped by fingerprint)."})],Ad);var tB=Ad;import{Resource as uB,ResourceContext as rB}from"@frontmcp/sdk";var _d=class extends rB{static{s(this,"eg")}static{o(this,"LintWarningsResource")}async execute(){return this.get(q).read("lint://warnings")}};_d=S([uB({name:"lint-warnings",uri:"lint://warnings",mimeType:"application/json",description:"Currently-open ESLint warnings."})],_d);var nB=_d,b3=class{static{s(this,"rg")}static{o(this,"LintApp")}};b3=S([Kw({id:"lint",name:"Lint",description:"ESLint state.",resources:[Yw,tB,nB]})],b3);var Li="lint://current",Ji="lint://errors",Vi="lint://warnings",iB="Nothing runs ESLint in the dev loop, so this is expected. Call `runEslintOnce()` from @lensmcp/session to publish a run; until then treat lint as UNCHECKED, not passing.";function D3(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(D3,"KT"),o(D3,"readRaw");function w3(e){let t={status:"unknown",errors:new Map,warnings:new Map,producers:new Map,sawVerdict:!1},r=o((c,f)=>{let g=t.producers.get(c);t.producers.set(c,{id:c,tool:f.tool,...f.project?{project:f.project}:{},firstReportedAt:g?.firstReportedAt??f.at,lastReportedAt:Math.max(g?.lastReportedAt??0,f.at),lastRunStatus:f.runStatus,errorCount:f.errorCount??g?.errorCount??0,...f.warningCount!==void 0?{warningCount:f.warningCount}:g?.warningCount!==void 0?{warningCount:g.warningCount}:{},...f.durationMs!==void 0?{lastRunDurationMs:f.durationMs}:g?.lastRunDurationMs!==void 0?{lastRunDurationMs:g.lastRunDurationMs}:{},...f.error?{error:f.error}:{}}),St(t.producers,xr)},"touchProducer"),i=o((c,f)=>{let g=o((m,h)=>{for(let[E,D]of m)h(D)&&m.delete(E)},"drop");if(c){g(t.errors,m=>m.project===c),g(t.warnings,m=>m.project===c);return}if(f){g(t.errors,m=>m.file===f),g(t.warnings,m=>m.file===f);return}t.errors.clear(),t.warnings.clear()},"clearScope"),u=o(()=>{if(t.errors.size>0){t.status="failing";return}if(t.warnings.size>0){t.status="warning";return}let c=[...t.producers.values()].some(f=>f.lastRunStatus==="error");t.status=c||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),n=o(()=>{e.resources.markDirty(Li),e.resources.markDirty(Ji),e.resources.markDirty(Vi)},"markDirty"),a=o(c=>{if([...t.errors.values()].some(f=>f.project===c)||[...t.warnings.values()].some(f=>f.project===c)||[...t.producers.values()].some(f=>f.project===c)){i(c,void 0);for(let[f,g]of t.producers)g.project===c&&t.producers.delete(f);t.sawVerdict=[...t.producers.values()].some(f=>f.lastRunStatus!=="error"),u(),n()}},"supersedeProject"),l=o(c=>{if(c.source==="gateway"&&c.category==="cluster"){let A=c.raw??null,I=A?.kind;(I==="service-starting"||I==="service-respawn")&&A?.project&&a(A.project);return}if(c.source!=="eslint"||c.category!=="lint")return;let f=D3(c),g=f.project,m=f.tool??"eslint",h=`${m}:${g??"*"}`,E=f.kind==="lint-run";if(c.severity==="info"&&(E&&f.phase==="start"||c.title.startsWith("ESLint clear"))){i(g,c.location?.file),t.lastRunAt=c.timestamp,r(h,{tool:m,...g?{project:g}:{},at:c.timestamp,runStatus:"running"}),E||(t.sawVerdict=!0),u(),n();return}if(E&&f.phase==="end"){let A=f.status==="error"?"error":f.status==="failing"?"failing":"clean";A!=="error"&&(t.sawVerdict=!0),t.lastRunAt=c.timestamp,r(h,{tool:m,...g?{project:g}:{},at:c.timestamp,runStatus:A,...f.durationMs!==void 0?{durationMs:f.durationMs}:{},...f.errorCount!==void 0?{errorCount:f.errorCount}:{},...f.warningCount!==void 0?{warningCount:f.warningCount}:{},...f.error?{error:f.error}:{}}),u(),n();return}let D=c.title.match(/^\[([^\]]+)\]/),$={id:c.id,timestamp:c.timestamp,severity:c.severity,...f.rule?{rule:f.rule}:D?.[1]?{rule:D[1]}:{},message:c.message??c.title,...c.location?.file?{file:c.location.file}:{},...c.location?.line!==void 0?{line:c.location.line}:{},...c.location?.column!==void 0?{column:c.location.column}:{},...g?{project:g}:{},fingerprint:c.fingerprint};if(c.severity==="error"||c.severity==="fatal")t.errors.set($.fingerprint,$),t.warnings.delete($.fingerprint);else if(c.severity==="warning")t.errors.has($.fingerprint)||t.warnings.set($.fingerprint,$);else return;t.lastRunAt=c.timestamp,t.sawVerdict=!0,r(h,{tool:m,...g?{project:g}:{},at:c.timestamp,runStatus:t.errors.size>0?"failing":"clean"}),u(),n()},"handler"),d=e.bus.subscribe(l),p=o(()=>yi({producers:[...t.producers.values()],domain:"lint",noProducerHint:iB}),"health");return e.resources.register(Li,()=>({schemaVersion:1,revision:e.resources.revision(Li)??0,updatedAt:new Date().toISOString(),status:t.status,errorCount:t.errors.size,warningCount:t.warnings.size,lastRunAt:t.lastRunAt,...p()})),e.resources.register(Ji,()=>({schemaVersion:1,revision:e.resources.revision(Ji)??0,updatedAt:new Date().toISOString(),errors:[...t.errors.values()],...p()})),e.resources.register(Vi,()=>({schemaVersion:1,revision:e.resources.revision(Vi)??0,updatedAt:new Date().toISOString(),warnings:[...t.warnings.values()],...p()})),{unsubscribe:d,uris:[Li,Ji,Vi]}}s(w3,"ng"),o(w3,"installLintReducer");import{App as sB}from"@frontmcp/sdk";import{Resource as aB,ResourceContext as oB}from"@frontmcp/sdk";var Id=class extends oB{static{s(this,"og")}static{o(this,"TypecheckCurrentResource")}async execute(){return this.get(q).read("typecheck://current")}};Id=S([aB({name:"typecheck-current",uri:"typecheck://current",mimeType:"application/json",description:"Current TypeScript typecheck status + error count."})],Id);var lB=Id;import{Resource as dB,ResourceContext as cB}from"@frontmcp/sdk";var Sd=class extends cB{static{s(this,"sg")}static{o(this,"TypecheckErrorsResource")}async execute(){return this.get(q).read("typecheck://errors")}};Sd=S([dB({name:"typecheck-errors",uri:"typecheck://errors",mimeType:"application/json",description:"Current TypeScript errors (deduped by fingerprint)."})],Sd);var pB=Sd,B3=class{static{s(this,"cg")}static{o(this,"TypecheckApp")}};B3=S([sB({id:"typecheck",name:"Typecheck",description:"TypeScript diagnostics from `tsc --watch`.",resources:[lB,pB]})],B3);var Wi="typecheck://current",Gi="typecheck://errors",mB="Wire one: the dev cluster publishes from `TsgoCheckPlugin` when `LENSMCP_TYPECHECK=tsgo` (@lensmcp/cluster), or call `startTscCollector()` from @lensmcp/session for a `tsc --watch` workspace.";function $3(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s($3,"tE"),o($3,"readRaw");function C3(e){let t={status:"unknown",errors:new Map,producers:new Map,sawVerdict:!1},r=o((c,f)=>{let g=t.producers.get(c),m={id:c,tool:f.tool,...f.project?{project:f.project}:{},firstReportedAt:g?.firstReportedAt??f.at,lastReportedAt:Math.max(g?.lastReportedAt??0,f.at),lastRunStatus:f.runStatus,errorCount:f.errorCount??g?.errorCount??0,...f.durationMs!==void 0?{lastRunDurationMs:f.durationMs}:g?.lastRunDurationMs!==void 0?{lastRunDurationMs:g.lastRunDurationMs}:{},...f.warningCount!==void 0?{warningCount:f.warningCount}:{},...f.error?{error:f.error}:{}};t.producers.set(c,m),St(t.producers,xr)},"touchProducer"),i=o(c=>{if(!c){t.errors.clear();return}for(let[f,g]of t.errors)g.project===c&&t.errors.delete(f)},"clearScope"),u=o(()=>{if(t.errors.size>0){t.status="failing";return}let c=[...t.producers.values()].some(f=>f.lastRunStatus==="error");t.status=c||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),n=o(()=>{e.resources.markDirty(Wi),e.resources.markDirty(Gi)},"markDirty"),a=o(c=>{let f=[...t.errors.values()].some(m=>m.project===c),g=[...t.producers.values()].some(m=>m.project===c);if(!(!f&&!g)){i(c);for(let[m,h]of t.producers)h.project===c&&t.producers.delete(m);t.sawVerdict=[...t.producers.values()].some(m=>m.lastRunStatus!=="error"),u(),n()}},"supersedeProject"),l=o(c=>{if(c.source==="gateway"&&c.category==="cluster"){let A=c.raw??null,I=A?.kind;(I==="service-starting"||I==="service-respawn")&&A?.project&&a(A.project);return}if(c.source!=="typescript"||c.category!=="typecheck")return;let f=$3(c),g=f.project,m=f.tool??"tsc",h=`${m}:${g??"*"}`,E=f.kind==="typecheck-run";if(c.severity==="info"&&(E&&f.phase==="start"||c.title.startsWith("tsc clear"))){i(g),t.lastRunAt=c.timestamp,r(h,{tool:m,...g?{project:g}:{},at:c.timestamp,runStatus:"running"}),E||(t.sawVerdict=!0),u(),n();return}if(E&&f.phase==="end"){let A=f.status==="error"?"error":f.status==="failing"?"failing":"clean";A!=="error"&&(t.sawVerdict=!0),t.lastRunAt=c.timestamp,r(h,{tool:m,...g?{project:g}:{},at:c.timestamp,runStatus:A,...f.durationMs!==void 0?{durationMs:f.durationMs}:{},...f.errorCount!==void 0?{errorCount:f.errorCount}:{},...f.warningCount!==void 0?{warningCount:f.warningCount}:{},...f.error?{error:f.error}:{}}),u(),n();return}if(c.severity!=="error"&&c.severity!=="fatal")return;let D=c.title.match(/\bTS(\d+):/),$={id:c.id,timestamp:c.timestamp,...f.code?{code:f.code}:D?{code:`TS${D[1]}`}:{},message:c.message??c.title,...c.location?.file?{file:c.location.file}:{},...c.location?.line!==void 0?{line:c.location.line}:{},...c.location?.column!==void 0?{column:c.location.column}:{},...g?{project:g}:{},fingerprint:c.fingerprint};t.errors.set($.fingerprint,$),t.lastRunAt=c.timestamp,t.sawVerdict=!0,r(h,{tool:m,...g?{project:g}:{},at:c.timestamp,runStatus:"failing"}),u(),n()},"handler"),d=e.bus.subscribe(l),p=o(()=>yi({producers:[...t.producers.values()],domain:"typecheck",noProducerHint:mB}),"health");return e.resources.register(Wi,()=>({schemaVersion:1,revision:e.resources.revision(Wi)??0,updatedAt:new Date().toISOString(),status:t.status,errorCount:t.errors.size,lastRunAt:t.lastRunAt,...p()})),e.resources.register(Gi,()=>({schemaVersion:1,revision:e.resources.revision(Gi)??0,updatedAt:new Date().toISOString(),errors:[...t.errors.values()],...p()})),{unsubscribe:d,uris:[Wi,Gi]}}s(C3,"ug"),o(C3,"installTypecheckReducer");import{App as fB}from"@frontmcp/sdk";import{Resource as gB,ResourceContext as hB}from"@frontmcp/sdk";var Fd=class extends hB{static{s(this,"lg")}static{o(this,"BundleCurrentResource")}async execute(){return this.get(q).read("bundle://current")}};Fd=S([gB({name:"bundle-current",uri:"bundle://current",mimeType:"application/json",description:"Most recent Vite/Rollup bundle report (chunks + sizes)."})],Fd);var vB=Fd;import{Resource as yB,ResourceContext as EB}from"@frontmcp/sdk";var zd=class extends EB{static{s(this,"pg")}static{o(this,"BundleChunksResource")}async execute(){return this.get(q).read("bundle://chunks")}};zd=S([yB({name:"bundle-chunks",uri:"bundle://chunks",mimeType:"application/json",description:"Per-chunk bundle sizes (most recent build)."})],zd);var bB=zd;import{Resource as DB,ResourceContext as wB}from"@frontmcp/sdk";var jd=class extends wB{static{s(this,"mg")}static{o(this,"BundleModulesResource")}async execute(){return this.get(q).read("bundle://modules")}};jd=S([DB({name:"bundle-modules",uri:"bundle://modules",mimeType:"application/json",description:"Flattened per-module bundle sizes (most recent build)."})],jd);var BB=jd;import{Resource as $B,ResourceContext as CB}from"@frontmcp/sdk";var Nd=class extends CB{static{s(this,"hg")}static{o(this,"BundleRegressionsResource")}async execute(){return this.get(q).read("bundle://regressions")}};Nd=S([$B({name:"bundle-regressions",uri:"bundle://regressions",mimeType:"application/json",description:"Chunks/modules that grew, were added, or were removed vs the baseline."})],Nd);var xB=Nd;import{Resource as kB,ResourceContext as AB}from"@frontmcp/sdk";var Od=class extends AB{static{s(this,"yg")}static{o(this,"BundleCompareResource")}async execute(){return this.get(q).read("bundle://compare/latest")}};Od=S([kB({name:"bundle-compare-latest",uri:"bundle://compare/latest",mimeType:"application/json",description:"Most recent build vs baseline: totals + delta."})],Od);var _B=Od,x3=class{static{s(this,"wg")}static{o(this,"BundleApp")}};x3=S([fB({id:"bundle",name:"Bundle",description:"Vite/Rollup bundle reports + regressions against baseline.",resources:[vB,bB,BB,xB,_B]})],x3);function Rd(e,t){let r=[],i=new Map(e.chunks.map(n=>[n.name,n])),u=new Map(t.chunks.map(n=>[n.name,n]));for(let[n,a]of u){let l=i.get(n);if(!l){r.push({kind:"chunk-added",name:n,afterBytes:a.sizeBytes,deltaBytes:a.sizeBytes});continue}let d=a.sizeBytes-l.sizeBytes;d>256&&r.push({kind:"chunk-grew",name:n,beforeBytes:l.sizeBytes,afterBytes:a.sizeBytes,deltaBytes:d}),r.push(...k3(l,a))}for(let[n,a]of i)u.has(n)||r.push({kind:"chunk-removed",name:n,beforeBytes:a.sizeBytes,deltaBytes:-a.sizeBytes});return r.sort((n,a)=>Math.abs(a.deltaBytes)-Math.abs(n.deltaBytes))}s(Rd,"Us"),o(Rd,"compareReports");function k3(e,t){let r=[],i=new Map(e.modules.map(u=>[u.id,u.sizeBytes]));for(let u of t.modules){let n=i.get(u.id);if(n===void 0)u.sizeBytes>256&&r.push({kind:"module-added",name:`${t.name}::${u.id}`,afterBytes:u.sizeBytes,deltaBytes:u.sizeBytes});else{let a=u.sizeBytes-n;a>256&&r.push({kind:"module-grew",name:`${t.name}::${u.id}`,beforeBytes:n,afterBytes:u.sizeBytes,deltaBytes:a})}}return r}s(k3,"fE"),o(k3,"compareModules");var Ki="bundle://current",Hi="bundle://chunks",Xi="bundle://modules",jr="bundle://regressions",Nr="bundle://compare/latest";function A3(e){let t={baseline:e.initialBaseline,regressions:[]},r=o(u=>{if(u.source!=="rollup"&&u.source!=="vite"||u.category!=="build")return;let n=u.raw;if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="bundle-report")return;let a=n.report;!a||!Array.isArray(a.chunks)||(t.current=a,t.regressions=t.baseline?Rd(t.baseline,a):[],e.resources.markDirty(Ki),e.resources.markDirty(Hi),e.resources.markDirty(Xi),e.resources.markDirty(jr),e.resources.markDirty(Nr))},"handler"),i=e.bus.subscribe(r);return e.resources.register(Ki,()=>({schemaVersion:1,revision:e.resources.revision(Ki)??0,updatedAt:new Date().toISOString(),report:t.current??null})),e.resources.register(Hi,()=>({schemaVersion:1,revision:e.resources.revision(Hi)??0,updatedAt:new Date().toISOString(),chunks:t.current?.chunks??[]})),e.resources.register(Xi,()=>{let u=t.current?.chunks.flatMap(n=>n.modules.map(a=>({...a,chunk:n.name})))??[];return{schemaVersion:1,revision:e.resources.revision(Xi)??0,updatedAt:new Date().toISOString(),modules:u}}),e.resources.register(jr,()=>({schemaVersion:1,revision:e.resources.revision(jr)??0,updatedAt:new Date().toISOString(),regressions:t.regressions.slice()})),e.resources.register(Nr,()=>({schemaVersion:1,revision:e.resources.revision(Nr)??0,updatedAt:new Date().toISOString(),baseline:t.baseline??null,current:t.current??null,deltaBytes:t.baseline&&t.current?t.current.totalBytes-t.baseline.totalBytes:0})),{unsubscribe:i,uris:[Ki,Hi,Xi,jr,Nr],setBaseline:o(u=>{t.baseline=u,t.current&&(t.regressions=Rd(t.baseline,t.current)),e.resources.markDirty(jr),e.resources.markDirty(Nr)},"setBaseline")}}s(A3,"xg"),o(A3,"installBundleReducer");import{App as IB}from"@frontmcp/sdk";import{Resource as SB,ResourceContext as FB}from"@frontmcp/sdk";var Td=class extends FB{static{s(this,"$g")}static{o(this,"RuntimeBrowserConsoleResource")}async execute(){return this.get(q).read("runtime://browser/console")}};Td=S([SB({name:"runtime-browser-console",uri:"runtime://browser/console",mimeType:"application/json",description:"Most recent 200 console.* messages from any tab."})],Td);var zB=Td;import{Resource as jB,ResourceContext as NB}from"@frontmcp/sdk";var Md=class extends NB{static{s(this,"kg")}static{o(this,"RuntimeBrowserErrorsResource")}async execute(){return this.get(q).read("runtime://browser/errors")}};Md=S([jB({name:"runtime-browser-errors",uri:"runtime://browser/errors",mimeType:"application/json",description:"Uncaught browser errors + promise rejections, per tab, since that tab's current page load (a reload retracts the previous document's errors)."})],Md);var OB=Md;import{Resource as RB,ResourceContext as TB}from"@frontmcp/sdk";var Pd=class extends TB{static{s(this,"Ig")}static{o(this,"RuntimeServerErrorsResource")}async execute(){return this.get(q).read("runtime://errors")}};Pd=S([RB({name:"runtime-errors",uri:"runtime://errors",mimeType:"application/json",description:"Errors raised INSIDE a backend pod, with no browser involved \u2014 the 500s a curl, an e2e runner or a queue job produces. Each entry carries the route, the status, the request id the gateway stamped, and the stack. Use this when a server-side call failed and no browser flow exists to explain it; `runtime://browser/errors` is the browser-side counterpart."})],Pd);var MB=Pd;import{Resource as PB,ResourceContext as UB}from"@frontmcp/sdk";var Ud=class extends UB{static{s(this,"Tg")}static{o(this,"RuntimeBrowserNetworkResource")}async execute(){return this.get(q).read("runtime://browser/network")}};Ud=S([PB({name:"runtime-browser-network",uri:"runtime://browser/network",mimeType:"application/json",description:"Recent fetch / XHR / browser network activity."})],Ud);var ZB=Ud;import{Resource as qB,ResourceContext as LB}from"@frontmcp/sdk";var Zd=class extends LB{static{s(this,"Ag")}static{o(this,"RuntimeBrowserFailedRequestsResource")}async execute(){return this.get(q).read("runtime://browser/failed-requests")}};Zd=S([qB({name:"runtime-browser-failed-requests",uri:"runtime://browser/failed-requests",mimeType:"application/json",description:"Recent failed network requests (status >= 400 or transport errors)."})],Zd);var JB=Zd,_3=class{static{s(this,"jg")}static{o(this,"RuntimeApp")}};_3=S([IB({id:"runtime",name:"Runtime",description:"Live browser/node runtime state (console, errors, network).",resources:[zB,OB,MB,ZB,JB]})],_3);var mu="runtime://browser/console",fu="runtime://browser/errors",gu="runtime://browser/network",hu="runtime://browser/failed-requests",vu="runtime://errors",VB="default",qd=o(e=>e??VB,"tabOf");function I3(e){if(e.category!=="runtime")return!1;let t=e.raw;return t&&typeof t=="object"&&t.kind==="ready"?!0:e.title==="Client runtime ready"}s(I3,"IE"),o(I3,"isDocumentBoundary");function S3(e){if(e.category!=="runtime")return!1;let t=e.raw;return!!(t&&typeof t=="object"&&t.kind==="gone")}s(S3,"RE"),o(S3,"isTabGone");function F3(e){let t=(e.now??(()=>Date.now()))(),r={console:[],errors:[],network:[],failed:[],serverErrors:[],readyByTab:new Map,changedAt:new Map},i=o((d,p)=>{r.changedAt.set(d,p),e.resources.markDirty(d)},"touch"),u=o((d,p,c)=>{let f=d.filter(g=>!(qd(g.tabId)===p&&g.timestamp<c));f.length!==d.length&&(d.length=0,d.push(...f))},"retract"),n=o(d=>{if(z3(d)){let c=d.raw?.project;if(c){let f=r.serverErrors.length;r.serverErrors=r.serverErrors.filter(g=>g.project!==c),r.serverErrors.length!==f&&i(vu,d.timestamp)}return}if(j3(d)){r.lastServerEventAt=Math.max(r.lastServerEventAt??0,d.timestamp),yu(r.serverErrors,N3(d),100),i(vu,d.timestamp);return}if(!(d.source==="client-runtime"||d.source==="chrome")&&!(d.source==="react"&&d.category==="network"))return;if(r.lastEventAt=Math.max(r.lastEventAt??0,d.timestamp),S3(d)){let c=qd(d.context.tabId);u(r.errors,c,Number.POSITIVE_INFINITY),u(r.failed,c,Number.POSITIVE_INFINITY),r.readyByTab.delete(c);for(let f of[fu,hu,mu,gu])i(f,d.timestamp);return}if(I3(d)){let c=qd(d.context.tabId);r.readyByTab.set(c,Math.max(r.readyByTab.get(c)??0,d.timestamp)),r.lastReadyAt=Math.max(r.lastReadyAt??0,d.timestamp);let f=d.timestamp-1e3;u(r.errors,c,f),u(r.failed,c,f);for(let g of[fu,hu,mu,gu])i(g,d.timestamp);return}let p={id:d.id,timestamp:d.timestamp,severity:d.severity,title:d.title,message:d.message,source:d.source,fingerprint:d.fingerprint,tabId:d.context.tabId,url:d.context.url,raw:d.raw};if(d.category==="network"){yu(r.network,p,200),i(gu,d.timestamp),d.severity==="error"&&(yu(r.failed,p,50),i(hu,d.timestamp));return}(d.severity==="error"||d.severity==="fatal")&&(yu(r.errors,p,100),i(fu,d.timestamp)),d.title?.startsWith("console.")&&(yu(r.console,p,200),i(mu,d.timestamp))},"handler"),a=e.bus.subscribe(n),l=o((d,p)=>O3(e.resources,d,p,r,t),"snap");return e.resources.register(vu,()=>l(vu,r.serverErrors)),e.resources.register(mu,()=>l(mu,r.console)),e.resources.register(fu,()=>l(fu,r.errors)),e.resources.register(gu,()=>l(gu,r.network)),e.resources.register(hu,()=>l(hu,r.failed)),{unsubscribe:a,uris:[mu,fu,gu,hu,vu]}}s(F3,"Ng"),o(F3,"installRuntimeReducer");function Ld(e){let t=e.raw??null,r=e.context;return t?.project??r.projectName}s(Ld,"Gx"),o(Ld,"projectOf");function z3(e){if(e.source!=="gateway"||e.category!=="cluster")return!1;let t=e.raw?.kind;return t==="service-starting"||t==="service-respawn"}s(z3,"TE"),o(z3,"isGenerationBoundary");function j3(e){if(e.source!=="nestjs"||e.severity!=="error"&&e.severity!=="fatal")return!1;let t=e.raw??{};return t.kind==="server-request"||t.kind==="uncaught"?!0:t.kind!=="log"?!1:t.request?.error?!0:/\b[A-Za-z0-9_$]*(?:Error|Exception)\b|\b(?:ERROR|FATAL)\b/.test(e.title??"")}s(j3,"EE"),o(j3,"isServerError");function N3(e){let t=(e.raw??{}).request??{},r=t.error;return{id:e.id,timestamp:e.timestamp,severity:e.severity,title:e.title,message:e.message??r?.message,source:e.source,fingerprint:e.fingerprint,...e.context.requestId?{requestId:e.context.requestId}:{},...Ld(e)?{project:Ld(e)}:{},...typeof t.route=="string"?{route:t.route}:{},...typeof t.status=="number"?{status:t.status}:{},...r?.stack?{stack:r.stack}:{},raw:e.raw}}s(N3,"AE"),o(N3,"serverEntry");function O3(e,t,r,i,u){let n=t===vu,a=n?i.lastServerEventAt:i.lastEventAt,l=a!==void 0;return{schemaVersion:1,revision:e.revision(t)??0,updatedAt:new Date(i.changedAt.get(t)??u).toISOString(),count:r.length,entries:r.slice(),producer:l?"connected":"none",lastEventAt:a,lastReadyAt:i.lastReadyAt,detail:n?l?r.length===0?"No server-side errors held. Pods HAVE reported, but a new pod generation retracts the errors of the one it replaced \u2014 so this is NOT evidence the routes are healthy: nobody may have re-made the failing request since.":`${r.length} server-side error${r.length===1?"":"s"} from ${new Set(r.map(d=>d.project??"unknown")).size} project${new Set(r.map(d=>d.project??"unknown")).size===1?"":"s"}`:"No pod has ever reported into this session \u2014 this is NOT evidence the backend is healthy, nothing is watching. Run the backend under the dev cluster so pod errors reach this session.":l?`browser attached; ${r.length} entr${r.length===1?"y":"ies"} from ${i.readyByTab.size} open tab${i.readyByTab.size===1?"":"s"}`+(i.lastReadyAt===void 0?" (no page load observed yet)":""):"No browser has ever reported into this session \u2014 this is NOT evidence the app is healthy, nothing is watching. Open the app under the dev cluster (or the Vite dev server with @lensmcp/vite-plugin installed) so browser events reach this session."}}s(O3,"zE"),o(O3,"snapshot");function yu(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(yu,"oo"),o(yu,"pushBounded");import{App as WB}from"@frontmcp/sdk";import{Resource as GB,ResourceContext as KB}from"@frontmcp/sdk";var Jd=class extends KB{static{s(this,"Pg")}static{o(this,"BrowserTabsResource")}async execute(){return this.get(q).read("browser://tabs")}};Jd=S([GB({name:"browser-tabs",uri:"browser://tabs",mimeType:"application/json",description:"Open browser tabs with per-tab status, url, and event counts. `status` reflects the tab's CURRENT page load \u2014 a reload resets it."})],Jd);var HB=Jd;import{Resource as XB,ResourceContext as YB}from"@frontmcp/sdk";var Vd=class extends YB{static{s(this,"Mg")}static{o(this,"BrowserActiveTabResource")}async execute(){return this.get(q).read("browser://active-tab")}};Vd=S([XB({name:"browser-active-tab",uri:"browser://active-tab",mimeType:"application/json",description:"The currently-focused browser tab."})],Vd);var QB=Vd,R3=class{static{s(this,"Ug")}static{o(this,"BrowserApp")}};R3=S([WB({id:"browser",name:"Browser",description:"Per-tab browser state (multi-tab refinement comes in Phase 6).",resources:[HB,QB]})],R3);var ct="browser://tabs",pt="browser://active-tab";function T3(e){if(e.category!=="runtime")return!1;let t=e.raw;return t&&typeof t=="object"&&t.kind==="ready"?!0:e.title==="Client runtime ready"}s(T3,"ME"),o(T3,"isDocumentBoundary");function M3(e){if(e.category!=="runtime")return!1;let t=e.raw;return!!(t&&typeof t=="object"&&t.kind==="gone")}s(M3,"CE"),o(M3,"isTabGone");function P3(e){let t=(e.now??(()=>Date.now()))(),r={tabs:new Map,changedAt:new Map},i=o(a=>{if(a.source!=="chrome"&&a.source!=="client-runtime")return;let l=a.context.tabId??"default";if(M3(a)){if(r.tabs.delete(l),r.activePageId===l){let p=[...r.tabs.keys()];r.activePageId=p[p.length-1]}r.lastEventAt=Math.max(r.lastEventAt??0,a.timestamp),r.changedAt.set(ct,a.timestamp),r.changedAt.set(pt,a.timestamp),e.resources.markDirty(ct),e.resources.markDirty(pt);return}let d=r.tabs.get(l);if(d||(d={pageId:l,url:a.context.url??"",status:"unknown",unreadEvents:0,totalEvents:0,loads:0}),r.tabs.delete(l),r.tabs.set(l,d),r.tabs.size>100){let p=r.tabs.keys().next().value;p!==void 0&&p!==l&&r.tabs.delete(p)}a.context.url&&(d.url=a.context.url),d.totalEvents+=1,d.lastEventAt=a.timestamp,r.activePageId=l,r.lastEventAt=Math.max(r.lastEventAt??0,a.timestamp),T3(a)?(d.status="clean",d.unreadEvents=0,d.loads+=1,d.lastReadyAt=a.timestamp):(d.unreadEvents+=1,a.severity==="error"||a.severity==="fatal"?d.status="failing":d.status!=="failing"&&a.severity==="warning"?d.status="warning":d.status==="unknown"&&(d.status="clean")),r.changedAt.set(ct,a.timestamp),r.changedAt.set(pt,a.timestamp),e.resources.markDirty(ct),e.resources.markDirty(pt)},"handler"),u=e.bus.subscribe(i),n=o(a=>new Date(r.changedAt.get(a)??t).toISOString(),"stamp");return e.resources.register(ct,()=>({schemaVersion:1,revision:e.resources.revision(ct)??0,updatedAt:n(ct),activePageId:r.activePageId,tabs:[...r.tabs.values()],lastEventAt:r.lastEventAt,producer:r.lastEventAt===void 0?"none":"connected"})),e.resources.register(pt,()=>{let a=r.activePageId;return{schemaVersion:1,revision:e.resources.revision(pt)??0,updatedAt:n(pt),tab:a?r.tabs.get(a)??null:null,lastEventAt:r.lastEventAt,producer:r.lastEventAt===void 0?"none":"connected"}}),{unsubscribe:u,uris:[ct,pt]}}s(P3,"Lg"),o(P3,"installBrowserReducer");import{App as e$}from"@frontmcp/sdk";import{Resource as t$,ResourceContext as u$}from"@frontmcp/sdk";var Wd=class extends u${static{s(this,"Fg")}static{o(this,"NestProvidersResource")}async execute(){return this.get(q).read("nest://providers")}};Wd=S([t$({name:"nest-providers",uri:"nest://providers",mimeType:"application/json",description:"All known NestJS singleton-instance generations (with lifecycle)."})],Wd);var r$=Wd;import{Resource as n$,ResourceContext as i$}from"@frontmcp/sdk";var Gd=class extends i${static{s(this,"Bg")}static{o(this,"NestRequestsResource")}async execute(){return this.get(q).read("nest://requests/recent")}};Gd=S([n$({name:"nest-requests-recent",uri:"nest://requests/recent",mimeType:"application/json",description:"Last 50 NestJS server requests with status + duration."})],Gd);var s$=Gd,U3=class{static{s(this,"Vg")}static{o(this,"NestApp")}};U3=S([e$({id:"nest",name:"Nest",description:"NestJS providers, request lifecycle, singleton generations.",resources:[r$,s$]})],U3);var Yi="nest://providers",Qi="nest://requests/recent";function Z3(e){let t={providers:new Map,recentRequests:[]},r=o(u=>{if(u.source!=="nestjs")return;let n=u.raw??null;if(n?.kind==="singleton-instance"&&n.provider){let a=n.provider;if(t.providers.delete(a.instanceId),t.providers.set(a.instanceId,{...a}),t.providers.size>500){for(let l of t.providers.keys())if(t.providers.delete(l),t.providers.size<=500)break}e.resources.markDirty(Yi);return}if(n?.kind==="server-request"&&n.request){let a={...n.request,fingerprint:u.fingerprint,id:u.id};t.recentRequests.push(a),t.recentRequests.length>50&&t.recentRequests.splice(0,t.recentRequests.length-50),e.resources.markDirty(Qi);return}},"handler"),i=e.bus.subscribe(r);return e.resources.register(Yi,()=>({schemaVersion:1,revision:e.resources.revision(Yi)??0,updatedAt:new Date().toISOString(),providers:[...t.providers.values()]})),e.resources.register(Qi,()=>({schemaVersion:1,revision:e.resources.revision(Qi)??0,updatedAt:new Date().toISOString(),requests:t.recentRequests.slice()})),{unsubscribe:i,uris:[Yi,Qi]}}s(Z3,"Gg"),o(Z3,"installNestReducer");import{App as a$}from"@frontmcp/sdk";import{Resource as o$,ResourceContext as l$}from"@frontmcp/sdk";var Kd=class extends l${static{s(this,"Jg")}static{o(this,"TraceRecentResource")}async execute(){return this.get(q).read("trace://recent")}};Kd=S([o$({name:"trace-recent",uri:"trace://recent",mimeType:"application/json",description:"Last 100 trace spans (flattened)."})],Kd);var d$=Kd;import{Resource as c$,ResourceContext as p$}from"@frontmcp/sdk";var Hd=class extends p${static{s(this,"Wg")}static{o(this,"TraceFailedResource")}async execute(){return this.get(q).read("trace://failed")}};Hd=S([c$({name:"trace-failed",uri:"trace://failed",mimeType:"application/json",description:"Trace spans that ended with status=error."})],Hd);var m$=Hd,q3=class{static{s(this,"Hg")}static{o(this,"TraceApp")}};q3=S([a$({id:"trace",name:"Trace",description:"Cross-process span timeline (Phase 3 \u2014 flat; Phase 7 promotes to multi-axis graph).",resources:[d$,m$]})],q3);var es="trace://recent",ts="trace://failed";function L3(e){let t={recent:[],failed:[]},r=o(u=>{let n=u.raw??null;if(!n||n.kind!=="span"||!n.span?.name)return;let a={id:u.id,traceId:n.span.traceId,parentSpanId:n.span.parentSpanId,flowId:n.span.flowId??u.context.flowId,requestId:n.span.requestId??u.context.requestId,name:n.span.name,source:u.source,startTime:n.span.startTime??u.timestamp,endTime:n.span.endTime,durationMs:n.span.durationMs,status:n.span.status??(u.severity==="error"?"error":"ok")};Xd(t.recent,a,100),a.status==="error"&&Xd(t.failed,a,50),e.resources.markDirty(es),a.status==="error"&&e.resources.markDirty(ts)},"handler"),i=e.bus.subscribe(r);return e.resources.register(es,()=>({schemaVersion:1,revision:e.resources.revision(es)??0,updatedAt:new Date().toISOString(),spans:t.recent.slice()})),e.resources.register(ts,()=>({schemaVersion:1,revision:e.resources.revision(ts)??0,updatedAt:new Date().toISOString(),spans:t.failed.slice()})),{unsubscribe:i,uris:[es,ts]}}s(L3,"Yg"),o(L3,"installTraceReducer");function Xd(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(Xd,"Jx"),o(Xd,"pushBounded");import{App as f$}from"@frontmcp/sdk";import{Resource as g$,ResourceContext as h$}from"@frontmcp/sdk";var Yd=class extends h${static{s(this,"Qg")}static{o(this,"PerfSlowRoutesResource")}async execute(){return this.get(q).read("perf://slow-routes")}};Yd=S([g$({name:"perf-slow-routes",uri:"perf://slow-routes",mimeType:"application/json",description:"Routes that are slow NOW (\u2265 threshold on their latest call, or repeatedly lately). A one-off spike is retracted once later calls prove the route recovered; worstEver keeps the history."})],Yd);var v$=Yd;import{Resource as y$,ResourceContext as E$}from"@frontmcp/sdk";var Qd=class extends E${static{s(this,"th")}static{o(this,"PerfDuplicateRequestsResource")}async execute(){return this.get(q).read("perf://duplicate-requests")}};Qd=S([y$({name:"perf-duplicate-requests",uri:"perf://duplicate-requests",mimeType:"application/json",description:"Endpoints one page called SEVERAL TIMES CONCURRENTLY \u2014 the missing-dedupe signal (a hook fetching outside the shared resource cache, multiplied by however many components mount it). Concurrency, not count: sequential repeats are a caching question and are not reported. The threshold sits above 2 so React StrictMode\u2019s double-invoke never fires it. Two consecutive clean loads retract a finding, so a fix clears it without a restart."})],Qd);var b$=Qd,J3=class{static{s(this,"nh")}static{o(this,"PerfApp")}};J3=S([f$({id:"perf",name:"Perf",description:"Performance signals: slow server routes, and endpoints one page calls concurrently (the missing-dedupe signal).",resources:[v$,b$]})],J3);var us="perf://slow-routes",rs=20,V3=2,D$=200;function W3(e){let t=Je(e.thresholds).slowRouteMs,r=(e.now??(()=>Date.now()))(),i={routes:new Map},u=o(d=>{let p=d.raw??null;if(p?.kind!=="server-request"||!p.request)return;let{method:c,route:f}=p.request,g=p.request.durationMs??0,m=`${c} ${f}`,h=i.routes.get(m);if(h||(h={method:c,route:f,recent:[],samples:0,slowSamples:0,lastDurationMs:g,lastSeenAt:d.timestamp,worstEverMs:0,worstEverAt:d.timestamp}),i.routes.delete(m),i.routes.set(m,h),h.recent.push(g),h.recent.length>rs&&h.recent.splice(0,h.recent.length-rs),h.samples+=1,g>=t&&(h.slowSamples+=1),h.lastDurationMs=g,h.lastSeenAt=d.timestamp,g>h.worstEverMs&&(h.worstEverMs=g,h.worstEverAt=d.timestamp),i.routes.size>D$){let E=i.routes.keys().next().value;E!==void 0&&i.routes.delete(E)}i.lastSampleAt=Math.max(i.lastSampleAt??0,d.timestamp),i.changedAt=d.timestamp,e.resources.markDirty(us)},"handler"),n=e.bus.subscribe(u),a=o(d=>d.recent.reduce((p,c)=>c>=t?p+1:p,0),"recentSlowCount"),l=o(d=>d.lastDurationMs>=t||a(d)>=V3,"currentlySlow");return e.resources.register(us,()=>{let d=[...i.routes.values()].filter(l);return{schemaVersion:1,revision:e.resources.revision(us)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,routes:d.map(p=>({method:p.method,route:p.route,worstRecentMs:Math.max(...p.recent),lastDurationMs:p.lastDurationMs,lastSeenAt:p.lastSeenAt,samples:p.samples,slowSamples:p.slowSamples,recentSlowSamples:a(p),worstEverMs:p.worstEverMs,worstEverAt:p.worstEverAt})).sort((p,c)=>c.worstRecentMs-p.worstRecentMs),routesTracked:i.routes.size,recentSampleWindow:rs,minRecentSlowToKeep:V3,lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No server request has ever been observed \u2014 this is NOT evidence the backend is fast, nothing is watching. Run the backend under the dev cluster (or with @lensmcp/nest-instrumentation) so request timings reach this session.":`${i.routes.size} route${i.routes.size===1?"":"s"} observed; ${d.length} slow in the last ${rs} calls each (\u2265${t}ms).`}}),{unsubscribe:n,uris:[us]}}s(W3,"oh"),o(W3,"installPerfReducer");var ns="perf://duplicate-requests",ec=10,G3=2,w$=200,K3=300,B$=new Set(["t","_","cacheBust","ts"]);function H3(e){try{let t=new URL(e,"http://lensmcp.invalid");for(let u of[...t.searchParams.keys()])B$.has(u)&&t.searchParams.delete(u);let r=t.searchParams.toString(),i=`${t.pathname}${r?`?${r}`:""}`;return t.host==="lensmcp.invalid"?i:`${t.origin}${i}`}catch{return e}}s(H3,"Hx"),o(H3,"normalizeRequestUrl");function X3(e){if(e.length===0)return 0;let t=[];for(let{start:u,end:n}of e)t.push({at:u,delta:1}),t.push({at:n+1,delta:-1});t.sort((u,n)=>u.at-n.at||u.delta-n.delta);let r=0,i=0;for(let{delta:u}of t)r+=u,r>i&&(i=r);return i}s(X3,"Yx"),o(X3,"peakConcurrency");function Y3(e){let t=Je(e.thresholds).duplicateRequestPeak,r=(e.now??(()=>Date.now()))(),i={endpoints:new Map},u=o(d=>{if(d.category!=="network")return;let p=d.raw??null;if(p?.kind!=="fetch-done"&&p?.kind!=="fetch-error"||!p.url||!p.method)return;let c=H3(p.url),f=p.method.toUpperCase();if(typeof p.startedAt!="number")return;let g=p.startedAt,m=g+(typeof p.durationMs=="number"?p.durationMs:0),h=d.context?.originNodeId??null,E=d.context?.flowId??null,D=`${f} ${c} @ ${h??"-"}`,$=i.endpoints.get(D);if($||($={method:f,url:c,originNodeId:h,currentFlowId:E,currentIntervals:[],currentPeak:0,recentPeaks:[],totalRequests:0,lastSeenAt:d.timestamp,worstEverPeak:0,worstEverAt:d.timestamp}),i.endpoints.delete(D),i.endpoints.set(D,$),E!==$.currentFlowId&&($.currentIntervals.length>0&&($.recentPeaks.push($.currentPeak),$.recentPeaks.length>ec&&$.recentPeaks.splice(0,$.recentPeaks.length-ec)),$.currentFlowId=E,$.currentIntervals=[],$.currentPeak=0),$.currentIntervals.push({start:g,end:m}),$.currentIntervals.length>K3&&$.currentIntervals.splice(0,$.currentIntervals.length-K3),$.currentPeak=X3($.currentIntervals),$.totalRequests+=1,$.lastSeenAt=d.timestamp,$.currentPeak>$.worstEverPeak&&($.worstEverPeak=$.currentPeak,$.worstEverAt=d.timestamp),i.endpoints.size>w$){let A=i.endpoints.keys().next().value;A!==void 0&&i.endpoints.delete(A)}i.lastSampleAt=Math.max(i.lastSampleAt??0,d.timestamp),i.changedAt=d.timestamp,e.resources.markDirty(ns)},"handler"),n=e.bus.subscribe(u),a=o(d=>{let p=[...d.recentPeaks,...d.currentIntervals.length>0?[d.currentPeak]:[]],c=0;for(let f=p.length-1;f>=0&&!((p[f]??0)>=t);f-=1)c+=1;return c},"consecutiveCleanFlows"),l=o(d=>d.worstEverPeak>=t&&a(d)<G3,"currentlyDuplicated");return e.resources.register(ns,()=>{let d=[...i.endpoints.values()].filter(l);return{schemaVersion:1,revision:e.resources.revision(ns)??0,updatedAt:new Date(i.changedAt??r).toISOString(),peakThreshold:t,endpoints:d.map(p=>({method:p.method,url:p.url,originNodeId:p.originNodeId,peakConcurrent:p.currentPeak,cleanFlowsSince:a(p),flowsObserved:p.recentPeaks.length+(p.currentIntervals.length>0?1:0),totalRequests:p.totalRequests,worstEverPeak:p.worstEverPeak,worstEverAt:p.worstEverAt,lastSeenAt:p.lastSeenAt})).sort((p,c)=>c.peakConcurrent-p.peakConcurrent),endpointsTracked:i.endpoints.size,recentFlowWindow:ec,minCleanFlowsToRetract:G3,lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No browser fetch has ever been observed \u2014 this is NOT evidence the app fetches cleanly, nothing is watching. Load a page under the dev cluster so flow-fetch events reach this session.":d.length===0?`${i.endpoints.size} endpoint${i.endpoints.size===1?"":"s"} observed; none exceeded ${t} concurrent identical calls.`:`${d.length} endpoint${d.length===1?"":"s"} called \u2265${t}\xD7 concurrently \u2014 usually a hook fetching outside the shared resource cache, multiplied by however many components mount it.`}}),{unsubscribe:n,uris:[ns]}}s(Y3,"sh"),o(Y3,"installDuplicateRequestsReducer");import{App as $$}from"@frontmcp/sdk";import{Resource as C$,ResourceContext as x$}from"@frontmcp/sdk";var tc=class extends x${static{s(this,"ah")}static{o(this,"DbSlowQueriesResource")}async execute(){return this.get(q).read("db://slow-queries")}};tc=S([C$({name:"db-slow-queries",uri:"db://slow-queries",mimeType:"application/json",description:"Query shapes (project\xB7op\xB7table) whose worst observed duration crosses the slowQueryMs threshold, aggregated live from the pg instrumentation. counts are an undercount for hot shapes (the emitter flood-guards per shape); suppressedEvents carries the drop count."})],tc);var k$=tc;import{Resource as A$,ResourceContext as _$}from"@frontmcp/sdk";var uc=class extends _${static{s(this,"uh")}static{o(this,"DbAnalysisResource")}async execute(){return this.get(q).read("db://analysis")}};uc=S([A$({name:"db-analysis",uri:"db://analysis",mimeType:"application/json",description:"The latest DB analyzer run per project (missing indexes, seq-scan hot spots, unused indexes, migration-parity drift, slow statements) \u2014 ingested from the workspace analyzer's `db-analyze-run` events on the lens bus file."})],uc);var I$=uc,Q3=class{static{s(this,"dh")}static{o(this,"DbApp")}};Q3=S([$$({id:"db",name:"Db",description:"Database signals: slow query shapes observed live from the pg instrumentation, and the latest externally-ingested analyzer run (missing indexes, migration parity, unused indexes).",resources:[k$,I$]})],Q3);var is="db://slow-queries",ss="db://analysis",e6=50,S$=20,F$=200;function t6(e){let t=Je(e.thresholds).slowQueryMs,r=(e.now??(()=>Date.now()))(),i={shapes:new Map,analyzeRuns:new Map},u=o(l=>{let d=l.raw??null;if(d){if(d.kind==="db-query"){let p=d.project??"unknown",c=d.op??"query",f=d.table??"query",g=d.durationMs??0,m=`${p}|${c}|${f}`,h=i.shapes.get(m);if(h||(h={project:p,op:c,table:f,count:0,errorCount:0,totalMs:0,maxMs:0,maxAt:l.timestamp,recent:[],rowsTotal:0,lastSql:"",lastDurationMs:0,lastSeenAt:l.timestamp,suppressed:0}),i.shapes.delete(m),i.shapes.set(m,h),h.count+=1,d.error!==void 0&&(h.errorCount+=1),h.totalMs+=g,g>h.maxMs&&(h.maxMs=g,h.maxAt=l.timestamp),h.recent.push(g),h.recent.length>e6&&h.recent.splice(0,h.recent.length-e6),h.rowsTotal+=d.rows??0,d.query&&(h.lastSql=d.query),h.lastDurationMs=g,h.lastSeenAt=l.timestamp,h.suppressed+=d.floodSuppressed??0,i.shapes.size>F$){let E=i.shapes.keys().next().value;E!==void 0&&i.shapes.delete(E)}i.lastQueryAt=Math.max(i.lastQueryAt??0,l.timestamp),i.changedAt=l.timestamp,e.resources.markDirty(is);return}if(d.kind==="db-analyze-run"){let p=d.project??"unknown";i.analyzeRuns.set(p,{project:p,runAt:d.runAt??l.timestamp,tool:d.tool??"unknown",findings:Array.isArray(d.findings)?d.findings:[]}),St(i.analyzeRuns,xr),i.lastAnalyzeAt=Math.max(i.lastAnalyzeAt??0,l.timestamp),i.changedAt=l.timestamp,e.resources.markDirty(ss)}}},"handler"),n=e.bus.subscribe(u),a=o(l=>{if(l.length===0)return 0;let d=[...l].sort((p,c)=>p-c);return d[Math.min(d.length-1,Math.floor(d.length*.95))]??0},"p95");return e.resources.register(is,()=>{let l=[...i.shapes.values()].filter(d=>d.maxMs>=t);return{schemaVersion:1,revision:e.resources.revision(is)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,queries:l.map(d=>({project:d.project,op:d.op,table:d.table,count:d.count,errorCount:d.errorCount,maxMs:d.maxMs,maxAt:d.maxAt,avgMs:Math.round(d.totalMs/Math.max(d.count,1)*10)/10,p95Ms:a(d.recent),rowsTotal:d.rowsTotal,lastDurationMs:d.lastDurationMs,lastSeenAt:d.lastSeenAt,lastSql:d.lastSql,suppressedEvents:d.suppressed})).sort((d,p)=>p.maxMs-d.maxMs).slice(0,S$),shapesTracked:i.shapes.size,note:"count/avg are an UNDERCOUNT for hot shapes: the emitter flood-guards each query-shape fingerprint at 30 burst / 5 events/s; suppressedEvents is the emitter's own count of dropped events.",lastSampleAt:i.lastQueryAt,producer:i.lastQueryAt===void 0?"none":"connected",detail:i.lastQueryAt===void 0?"No db-query event has ever been observed \u2014 this is NOT evidence queries are fast, nothing is watching. Run the backend under the dev cluster (the @lensmcp/cluster serve preload taps pg) so query timings reach this session.":`${i.shapes.size} query shape${i.shapes.size===1?"":"s"} observed; ${l.length} with a worst duration \u2265${t}ms.`}}),e.resources.register(ss,()=>{let l=[...i.analyzeRuns.values()].sort((p,c)=>c.runAt-p.runAt),d=l.reduce((p,c)=>p+c.findings.length,0);return{schemaVersion:1,revision:e.resources.revision(ss)??0,updatedAt:new Date(i.changedAt??r).toISOString(),runs:l,findingCount:d,lastSampleAt:i.lastAnalyzeAt,producer:i.lastAnalyzeAt===void 0?"none":"connected",detail:i.lastAnalyzeAt===void 0?"No db-analyze run has ever been ingested \u2014 this is NOT evidence the schema is healthy, nothing has analyzed it. Run the workspace's DB analyzer (it appends a `db-analyze-run` event to the lens bus file) to populate this.":`${l.length} analyze run${l.length===1?"":"s"} held (latest per project); ${d} finding${d===1?"":"s"}.`}}),{unsubscribe:n,uris:[is,ss]}}s(t6,"ph"),o(t6,"installDbReducer");import{App as z$}from"@frontmcp/sdk";import{Resource as j$,ResourceContext as N$}from"@frontmcp/sdk";var rc=class extends N${static{s(this,"fh")}static{o(this,"NetEgressHostsResource")}async execute(){return this.get(q).read("net://egress/hosts")}};rc=S([j$({name:"net-egress-hosts",uri:"net://egress/hosts",mimeType:"application/json",description:"External hosts this backend called (pod \u2192 third party), rolled up per project\xB7host with count, error/4xx/5xx counters, p95 and worst duration, plus the top endpoints under each. `slow` and `failing` are retracted by later healthy responses, so a one-off blip does not warn all day."})],rc);var O$=rc;import{Resource as R$,ResourceContext as T$}from"@frontmcp/sdk";var nc=class extends T${static{s(this,"gh")}static{o(this,"NetEgressRecentResource")}async execute(){return this.get(q).read("net://egress/recent")}};nc=S([R$({name:"net-egress-recent",uri:"net://egress/recent",mimeType:"application/json",description:"The last 200 outbound calls with their RAW path and the flowId that caused them \u2014 the evidence behind net://egress/hosts. Query strings are never captured; treat this as the sensitive view, since a path segment can itself be a secret."})],nc);var M$=nc;import{Resource as P$,ResourceContext as U$}from"@frontmcp/sdk";var ic=class extends U${static{s(this,"vh")}static{o(this,"NetEgressFailuresResource")}async execute(){return this.get(q).read("net://egress/failures")}};ic=S([P$({name:"net-egress-failures",uri:"net://egress/failures",mimeType:"application/json",description:"Outbound calls that failed \u2014 transport errors and any status \u2265 400 \u2014 kept in their own ring so a high-volume host cannot evict the one failure you need. Empty is NOT proof nothing failed: check `producer`."})],ic);var Z$=ic,u6=class{static{s(this,"bh")}static{o(this,"NetApp")}};u6=S([z$({id:"net",name:"Net",description:"Outbound (egress) HTTP the backend makes to THIRD PARTIES \u2014 which external services, how often, how slow, and whether they failed. The server-side twin of runtime://browser/network. Internal service-to-service traffic is deliberately absent: the gateway already attributes it.",resources:[O$,M$,Z$]})],u6);var as="net://egress/hosts",os="net://egress/recent",ls="net://egress/failures",Eu=20,q$=25,L$=200,J$=20,V$=5,r6=200,n6=50,i6=2;function s6(e){return e.length===0?!1:!!(/^\d{2,}$/.test(e)||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[A-Z][A-Z0-9]*-\d+$/.test(e)||e.length>=16&&/^[A-Za-z0-9_-]+$/.test(e)&&/\d/.test(e))}s(s6,"xA"),o(s6,"isIdSegment");function a6(e){let[t="/"]=e.split("?"),r=t.split("/"),i=[];for(let n of r){if(i.length>12){i.push("\u2026");break}i.push(s6(n)?":id":n)}let u=i.join("/");return u.length===0?"/":u}s(a6,"n$"),o(a6,"templatisePath");function o6(e){let t=Je(e.thresholds).slowEgressMs,r=(e.now??(()=>Date.now()))(),i={hosts:new Map,recent:[],failures:[]},u=o(c=>{let f=c.raw??null;if(!f||f.kind!=="egress")return;let g=f.project??"unknown",m=f.host??"unknown",h=(f.method??"GET").toUpperCase(),E=f.durationMs??0,D=typeof f.status=="number"?f.status:void 0,$=f.error===void 0?void 0:String(f.error),A=$!==void 0||D!==void 0&&D>=400,I=f.path??"(path not captured \u2014 upgrade @lensmcp/node-instrumentation)",j=`${g}|${m}`,F=i.hosts.get(j);F||(F={project:g,host:m,count:0,errorCount:0,status4xx:0,status5xx:0,totalMs:0,maxMs:0,maxAt:c.timestamp,recent:[],outcomes:[],firstSeenAt:c.timestamp,lastSeenAt:c.timestamp,lastDurationMs:0,lastBad:!1,suppressed:0,endpoints:new Map}),i.hosts.delete(j),i.hosts.set(j,F),F.count+=1,$!==void 0&&(F.errorCount+=1),D!==void 0&&D>=400&&D<500&&(F.status4xx+=1),D!==void 0&&D>=500&&(F.status5xx+=1),F.totalMs+=E,E>F.maxMs&&(F.maxMs=E,F.maxAt=c.timestamp),F.recent.push(E),F.recent.length>Eu&&F.recent.splice(0,F.recent.length-Eu),F.outcomes.push(A),F.outcomes.length>Eu&&F.outcomes.splice(0,F.outcomes.length-Eu),F.lastDurationMs=E,F.lastBad=A,F.lastSeenAt=c.timestamp,F.suppressed+=f.floodSuppressed??0;let b=a6(I),w=`${h} ${b}`,C=F.endpoints.get(w);if(C||(C={method:h,path:b,count:0,errorCount:0,status4xx:0,status5xx:0,totalMs:0,maxMs:0,recent:[],lastDurationMs:0,lastSeenAt:c.timestamp}),F.endpoints.delete(w),F.endpoints.set(w,C),C.count+=1,$!==void 0&&(C.errorCount+=1,C.lastError=$),D!==void 0&&D>=400&&D<500&&(C.status4xx+=1),D!==void 0&&D>=500&&(C.status5xx+=1),C.totalMs+=E,E>C.maxMs&&(C.maxMs=E),C.recent.push(E),C.recent.length>Eu&&C.recent.splice(0,C.recent.length-Eu),C.lastStatus=D,C.lastDurationMs=E,C.lastSeenAt=c.timestamp,F.endpoints.size>J$){let te=F.endpoints.keys().next().value;te!==void 0&&F.endpoints.delete(te)}if(i.hosts.size>L$){let te=i.hosts.keys().next().value;te!==void 0&&i.hosts.delete(te)}let N=c.context??{},O={id:c.id,timestamp:c.timestamp,project:g,method:h,host:m,path:I,...D!==void 0?{status:D}:{},...$!==void 0?{error:$}:{},durationMs:E,...N.flowId?{flowId:N.flowId}:{},...N.requestId?{requestId:N.requestId}:{}};i.recent.push(O),i.recent.length>r6&&i.recent.splice(0,i.recent.length-r6),A&&(i.failures.push(O),i.failures.length>n6&&i.failures.splice(0,i.failures.length-n6),e.resources.markDirty(ls)),i.lastSampleAt=Math.max(i.lastSampleAt??0,c.timestamp),i.changedAt=c.timestamp,e.resources.markDirty(as),e.resources.markDirty(os)},"handler"),n=e.bus.subscribe(u),a=o(c=>{if(c.length===0)return 0;let f=[...c].sort((g,m)=>g-m);return f[Math.min(f.length-1,Math.floor(f.length*.95))]??0},"p95"),l=o(c=>c.lastDurationMs>=t||c.recent.filter(f=>f>=t).length>=i6,"isSlow"),d=o(c=>c.lastBad||c.outcomes.filter(Boolean).length>=i6,"isFailing"),p=o(c=>{let f=c.outcomes.filter(Boolean).length;return d(c)?`${f} of the last ${c.outcomes.length} call${c.outcomes.length===1?"":"s"} failed`:l(c)?`${c.recent.filter(g=>g>=t).length} of the last ${c.recent.length} call${c.recent.length===1?"":"s"} took \u2265${t}ms`:"healthy"},"describe");return e.resources.register(as,()=>{let c=[...i.hosts.values()],f=c.filter(d),g=c.filter(m=>!d(m)&&l(m));return{schemaVersion:1,revision:e.resources.revision(as)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,hosts:c.map(m=>({project:m.project,host:m.host,count:m.count,errorCount:m.errorCount,status4xx:m.status4xx,status5xx:m.status5xx,avgMs:Math.round(m.totalMs/Math.max(m.count,1)*10)/10,p95Ms:a(m.recent),maxMs:m.maxMs,maxAt:m.maxAt,lastDurationMs:m.lastDurationMs,firstSeenAt:m.firstSeenAt,lastSeenAt:m.lastSeenAt,slow:l(m),failing:d(m),detail:p(m),suppressedEvents:m.suppressed,endpoints:[...m.endpoints.values()].map(h=>({method:h.method,path:h.path,count:h.count,errorCount:h.errorCount,status4xx:h.status4xx,status5xx:h.status5xx,avgMs:Math.round(h.totalMs/Math.max(h.count,1)*10)/10,p95Ms:a(h.recent),maxMs:h.maxMs,...h.lastStatus!==void 0?{lastStatus:h.lastStatus}:{},...h.lastError!==void 0?{lastError:h.lastError}:{},lastSeenAt:h.lastSeenAt})).sort((h,E)=>E.maxMs-h.maxMs).slice(0,V$)})).sort((m,h)=>m.failing!==h.failing?m.failing?-1:1:h.maxMs-m.maxMs).slice(0,q$),hostsTracked:i.hosts.size,failingHosts:f.length,slowHosts:g.length,note:"count/avg are an UNDERCOUNT for hot hosts: the emitter flood-guards each host fingerprint at 30 burst / 5 events/s; suppressedEvents is the emitter's own count of dropped events. Query strings are not captured; endpoint paths are templatised (\u2026/:id).",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 this is NOT evidence the app makes no external calls, nothing is watching. Run the backend under the dev cluster (the @lensmcp/cluster serve preload taps fetch and http/https) so outbound calls reach this session. Internal destinations (*.local, loopback, RFC1918) are skipped by design \u2014 the gateway already attributes service-to-service traffic.":`${i.hosts.size} external host${i.hosts.size===1?"":"s"} observed; ${f.length} failing, ${g.length} slower than ${t}ms.`}}),e.resources.register(os,()=>({schemaVersion:1,revision:e.resources.revision(os)??0,updatedAt:new Date(i.changedAt??r).toISOString(),entries:[...i.recent],count:i.recent.length,note:"Raw paths, as requested. flowId joins an outbound call back to the click that caused it. Treat this as the sensitive view: a path segment can itself be a secret (a presigned key, a reset token), which the templatised rollup collapses but this does not.",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 this is NOT evidence the app makes no external calls, nothing is watching.":`${i.recent.length} recent outbound call${i.recent.length===1?"":"s"}.`})),e.resources.register(ls,()=>({schemaVersion:1,revision:e.resources.revision(ls)??0,updatedAt:new Date(i.changedAt??r).toISOString(),entries:[...i.failures],count:i.failures.length,note:"A separate ring from net://egress/recent on purpose: a host called 200\xD7/min would otherwise evict the one 503 you need.",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 an empty list here is NOT evidence that nothing failed, nothing is watching.":`${i.failures.length} failed outbound call${i.failures.length===1?"":"s"} held.`})),{unsubscribe:n,uris:[as,os,ls]}}s(o6,"wh"),o(o6,"installNetReducer");import{App as W$}from"@frontmcp/sdk";import{Resource as G$,ResourceContext as K$}from"@frontmcp/sdk";var sc=class extends K${static{s(this,"xh")}static{o(this,"VisualCurrentResource")}async execute(){return this.get(q).read("visual://current")}};sc=S([G$({name:"visual-current",uri:"visual://current",mimeType:"application/json",description:"Most recent visual-frame (causedBy, changedNodes, stable)."})],sc);var H$=sc;import{Resource as X$,ResourceContext as Y$}from"@frontmcp/sdk";var ac=class extends Y${static{s(this,"_h")}static{o(this,"VisualViolationsCurrentResource")}async execute(){return this.get(q).read("visual://violations/current")}};ac=S([X$({name:"visual-violations-current",uri:"visual://violations/current",mimeType:"application/json",description:"Violations of the CURRENT frame, regardless of timing mode. Every rule re-runs per frame, so a fixed violation simply stops being reported."})],ac);var Q$=ac;import{Resource as e2,ResourceContext as t2}from"@frontmcp/sdk";var oc=class extends t2{static{s(this,"Sh")}static{o(this,"VisualViolationsStableResource")}async execute(){return this.get(q).read("visual://violations/stable")}};oc=S([e2({name:"visual-violations-stable",uri:"visual://violations/stable",mimeType:"application/json",description:'Violations from rules with timing "after-animation" | "stable-only" | "always".'})],oc);var u2=oc;import{Resource as r2,ResourceContext as n2}from"@frontmcp/sdk";var lc=class extends n2{static{s(this,"Rh")}static{o(this,"VisualViolationsDuringAnimationResource")}async execute(){return this.get(q).read("visual://violations/during-animation")}};lc=S([r2({name:"visual-violations-during-animation",uri:"visual://violations/during-animation",mimeType:"application/json",description:"Violations seen on midpoint (during-animation) samples only."})],lc);var i2=lc;import{Resource as s2,ResourceContext as a2}from"@frontmcp/sdk";var dc=class extends a2{static{s(this,"Eh")}static{o(this,"VisualRulesResource")}async execute(){return this.get(q).read("visual://rules")}};dc=S([s2({name:"visual-rules",uri:"visual://rules",mimeType:"application/json",description:"All registered visual rules (builtins + lensmcp.rules.json + visual.register_rule)."})],dc);var o2=dc;import{Resource as l2,ResourceContext as d2}from"@frontmcp/sdk";var cc=class extends d2{static{s(this,"zh")}static{o(this,"VisualTokensResource")}async execute(){return this.get(q).read("visual://tokens")}};cc=S([l2({name:"visual-tokens",uri:"visual://tokens",mimeType:"application/json",description:"Resolved design tokens from lensmcp.tokens.json."})],cc);var c2=cc;import{Tool as p2,ToolContext as m2,z as l6}from"@frontmcp/sdk";import{existsSync as f2,mkdirSync as g2,readFileSync as h2,writeFileSync as v2}from"node:fs";import{dirname as y2,join as pc}from"node:path";function d6(e=process.env,t=process.cwd()){let r=e.LENSMCP_EVENT_FILE;return r?y2(r):pc(t,".lensmcp")}s(d6,"o$"),o(d6,"captureDir");function c6(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(c6,"UA"),o(c6,"pidAlive");function p6(e,t=c6){let r=pc(e,bb);try{if(!f2(r))return;let i=JSON.parse(h2(r,"utf8"));return typeof i?.pid!="number"||!Number.isFinite(i.pid)?void 0:t(i.pid)?i:void 0}catch{return}}s(p6,"i$"),o(p6,"liveRunner");function m6(e,t){try{return g2(e,{recursive:!0}),v2(pc(e,Eb),JSON.stringify(t)),!0}catch{return!1}}s(m6,"s$"),o(m6,"publishCaptureRequest");var mc;async function f6(e,t){let r=mc;if(r)return{fresh:await r.promise,coalesced:!0,requestId:r.requestId};let i=t().finally(()=>{mc=void 0});return mc={promise:i,requestId:e},{fresh:await i,coalesced:!1,requestId:e}}s(f6,"a$"),o(f6,"captureSingleFlight");async function g6(e){let t=e.now??(()=>Date.now()),r=e.sleep??(a=>new Promise(l=>setTimeout(l,a))),i=e.budgetMs??8e3,u=e.pollMs??100,n=t()+i;for(;t()<n;){await r(u);let a=await e.readFrameId();if(a!==void 0&&a!==e.before)return!0}return!1}s(g6,"c$"),o(g6,"waitForFreshFrame");var fc=class extends m2{static{s(this,"Ph")}static{o(this,"VisualCaptureFrameTool")}async execute(e){let t=this.get(zl),r=this.get(q),i=o(async()=>(await r.read("visual://current"))?.frame?.id,"readFrameId"),u=await i(),n=qt(),a=Date.now();t.publish({id:qt(),sessionId:"visual.capture_frame",timestamp:a,source:"visual",category:"visual",severity:"info",context:{sessionId:"visual.capture_frame"},fingerprint:`visual-capture-request:${e.cause}`,title:`visual.capture_frame(${e.cause})`,raw:{kind:"visual-capture-request",cause:e.cause,stable:e.stable,requestId:n}});let l=d6(),d=p6(l),p=!1,c=await f6(n,async()=>(p=m6(l,{requestedAt:a,cause:e.cause,stable:e.stable,requestId:n}),p&&d?await g6({readFrameId:i,before:u}):!1));return{requested:c.coalesced?!0:p,cause:e.cause,stable:e.stable,fresh:c.fresh,coalesced:c.coalesced,requestId:c.requestId,waitedMs:Date.now()-a,runner:d?{pid:d.pid,url:d.url}:void 0,latest:await r.read("visual://current")}}};fc=S([p2({name:"visual.capture_frame",description:"Capture a fresh visual frame. Signals the host capture runner (which launches a headless browser on demand), waits for the new frame, and returns it. Frames are captured per request \u2014 no browser is held open between calls.",inputSchema:{cause:l6.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]).default("user-action").describe("Hint why this frame is being requested."),stable:l6.boolean().default(!0).describe("Whether to treat the captured frame as the stable final state.")}})],fc);var E2=fc;import{Tool as b2,ToolContext as D2,z as w2}from"@frontmcp/sdk";var gc=class extends D2{static{s(this,"Mh")}static{o(this,"VisualInspectNodeTool")}async execute(e){let t=await this.get(q).read("visual://current");if(!t.frame)return{found:!1,uid:e.uid};let r=t.frame.changedNodes.filter(i=>i.uid===e.uid);return{found:r.length>0,uid:e.uid,frameId:t.frame.id,changes:r}}};gc=S([b2({name:"visual.inspect_node",description:"Returns the changedNodes entry for `uid` from visual://current \u2014 the per-property before/after used to compute the latest frame.",inputSchema:{uid:w2.string().describe('Node uid as it appeared in visual://current.changedNodes (e.g. "hero-card" or "bid:42").')}})],gc);var B2=gc;import{Tool as $2,ToolContext as C2,z as x2}from"@frontmcp/sdk";var hc=class extends C2{static{s(this,"Uh")}static{o(this,"VisualCompareFramesTool")}async execute(e){let t=await this.get(q).read("visual://current");return t.frame?e.frameId&&e.frameId!==t.frame.id?{found:!1,reason:"Only the latest frame is retained in Phase 4."}:{found:!0,frameId:t.frame.id,causedBy:t.frame.causedBy,changedCount:t.frame.changedNodes.length,appeared:t.frame.appearedNodes.length,disappeared:t.frame.disappearedNodes.length,changedNodes:t.frame.changedNodes.slice(0,50)}:{found:!1}}};hc=S([$2({name:"visual.compare_frames",description:"Summarises the last visual-frame. Phase 4 ships a single-frame view (Phase 6 adds story-relative deltas).",inputSchema:{frameId:x2.string().optional().describe("Optional frame id; defaults to the latest.")}})],hc);var k2=hc;import{Tool as A2,ToolContext as _2,z as I2}from"@frontmcp/sdk";var vc=class extends _2{static{s(this,"Fh")}static{o(this,"VisualExplainViolationTool")}async execute(e){let t=(await this.get(q).read("visual://violations/current")).violations.find(r=>r.id===e.violationId);return t?{found:!0,violation:t,explanation:h6(t)}:{found:!1,violationId:e.violationId}}};vc=S([A2({name:"visual.explain_violation",description:"Returns the full violation record (rule id + expected/actual + evidence.cssCause / trace / screenshot crop URIs) for a given violationId.",inputSchema:{violationId:I2.string().describe("Id of the violation as seen in visual://violations/current.")}})],vc);var S2=vc;function h6(e){let t=[`Rule ${e.ruleId} (${e.ruleType}) at ${e.element.component??e.element.uid}.`,`Expected: ${JSON.stringify(e.expected)}`,`Actual: ${JSON.stringify(e.actual)}`];return e.evidence.cssCause&&t.push(`CSS cause: ${e.evidence.cssCause.selector} { ${e.evidence.cssCause.declaration??"?"} }`+(e.evidence.cssCause.file?` @ ${e.evidence.cssCause.file}:${e.evidence.cssCause.line??"?"}`:"")),e.evidence.trace&&t.push(`Trace: ${e.evidence.trace}`),e.evidence.screenshotCrop&&t.push(`Crop: ${e.evidence.screenshotCrop}`),t.join(`
|
|
70
|
+
`)}s(h6,"HA"),o(h6,"buildExplanation");import{Tool as F2,ToolContext as z2,z as Fe}from"@frontmcp/sdk";var yc=class extends z2{static{s(this,"Bh")}static{o(this,"VisualRegisterRuleTool")}async execute(e){let t=this.get(zl),r=this.get(q);return t.publish({id:qt(),sessionId:"visual.register_rule",timestamp:Date.now(),source:"visual",category:"visual",severity:"info",context:{sessionId:"visual.register_rule"},fingerprint:`visual-rule-registered:${e.id}`,title:`visual.register_rule(${e.id})`,raw:{kind:"visual-rule-registered",rule:{id:e.id,type:e.type,target:e.target,severity:e.severity,timing:e.timing,expected:e.expected,breakpoints:e.breakpoints}}}),{registered:!0,rule:{id:e.id,type:e.type,target:e.target},rules:await r.read("visual://rules")}}};yc=S([F2({name:"visual.register_rule",description:"Register (or replace) a visual rule. Publishes a `visual-rule-registered` event; the host driver (and reducer) pick it up. The rule applies to subsequent frames only.",inputSchema:{id:Fe.string().describe("Stable rule id; replaces a prior rule with the same id."),type:Fe.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]).describe("Built-in rule type to evaluate."),target:Fe.string().optional().describe('CSS-like selector / role:label / [data-agent-component="\u2026"]; default = every node.'),severity:Fe.enum(["info","warning","error"]).default("warning"),timing:Fe.enum(["always","after-animation","stable-only","during-animation"]).default("always"),expected:Fe.record(Fe.string(),Fe.unknown()).default({}).describe('Rule-type-specific expectations (e.g. { gap: "spacing.6" }).'),breakpoints:Fe.record(Fe.string(),Fe.record(Fe.string(),Fe.unknown())).optional().describe("Per-breakpoint expectation overrides for the responsive rule type.")}})],yc);var j2=yc,v6=class{static{s(this,"Vh")}static{o(this,"VisualApp")}};v6=S([W$({id:"visual",name:"Visual",description:"Visual rule engine: DOMSnapshot/LayerTree diffs, grid/alignment/overflow/contrast/z-index rules, design tokens.",resources:[H$,Q$,u2,i2,o2,c2],tools:[E2,B2,k2,S2,j2]})],v6);var Or="visual://current",Rr="visual://violations/current",Tr="visual://violations/stable",Mr="visual://violations/during-animation",Pr="visual://rules",Ur="visual://tokens";function y6(e){let t=(e.now??(()=>Date.now()))(),r={violations:[],rules:[],framesSeen:0,changedAt:new Map},i=o((p,c)=>{r.changedAt.set(p,c),e.resources.markDirty(p)},"touch"),u=o(p=>{i(Rr,p),i(Tr,p),i(Mr,p)},"touchViolationViews"),n=o(p=>{let c=p.raw??null;if(c?.kind)switch(c.kind){case"visual-frame":{let f=c.frame;if(!f)return;r.currentFrame=f,r.lastFrameAt=p.timestamp,r.framesSeen+=1,i(Or,p.timestamp);let g=r.violations.length;r.violations=r.violations.filter(m=>m.frameId===f.id),g!==r.violations.length&&u(p.timestamp);return}case"visual-violation":if(!c.violation)return;r.violations.push(c.violation),r.violations.length>50&&r.violations.splice(0,r.violations.length-50),u(p.timestamp);return;case"visual-rule-registered":{let f=c.rule;if(!f)return;let g=r.rules.findIndex(m=>m.id===f.id);g>=0&&r.rules.splice(g,1),r.rules.push(f),r.rules.length>500&&r.rules.splice(0,r.rules.length-500),i(Pr,p.timestamp);return}case"visual-tokens-loaded":if(!c.tokens)return;r.tokens=c.tokens,i(Ur,p.timestamp);return;default:return}},"handler"),a=e.bus.subscribe(n),l=o(p=>new Date(r.changedAt.get(p)??t).toISOString(),"stamp"),d=o(()=>({framesSeen:r.framesSeen,lastFrameAt:r.lastFrameAt,currentFrameId:r.currentFrame?.id,producer:r.framesSeen===0?"none":"connected",detail:r.framesSeen===0?"No visual frame has ever been captured \u2014 an empty violation list is NOT evidence the UI is correct, nothing is looking. Drive a capture (visual_capture_frame) or run the browser-capture loop so frames reach this session.":`${r.framesSeen} frame${r.framesSeen===1?"":"s"} captured; ${r.rules.length} rule${r.rules.length===1?"":"s"} registered. Violations are those of the CURRENT frame \u2014 every rule is re-run per frame, so anything fixed simply stops being reported.`}),"captureHealth");return e.resources.register(Or,()=>({schemaVersion:1,revision:e.resources.revision(Or)??0,updatedAt:l(Or),frame:r.currentFrame??null,...d()})),e.resources.register(Rr,()=>({schemaVersion:1,revision:e.resources.revision(Rr)??0,updatedAt:l(Rr),violations:r.violations.slice(),...d()})),e.resources.register(Tr,()=>({schemaVersion:1,revision:e.resources.revision(Tr)??0,updatedAt:l(Tr),violations:r.violations.filter(p=>p.timing==="after-animation"||p.timing==="stable-only"||p.timing==="always"),...d()})),e.resources.register(Mr,()=>({schemaVersion:1,revision:e.resources.revision(Mr)??0,updatedAt:l(Mr),violations:r.violations.filter(p=>p.timing==="during-animation"),...d()})),e.resources.register(Pr,()=>({schemaVersion:1,revision:e.resources.revision(Pr)??0,updatedAt:l(Pr),rules:r.rules.slice()})),e.resources.register(Ur,()=>({schemaVersion:1,revision:e.resources.revision(Ur)??0,updatedAt:l(Ur),tokens:r.tokens??null})),{unsubscribe:a,uris:[Or,Rr,Tr,Mr,Pr,Ur]}}s(y6,"Gh"),o(y6,"installVisualReducer");import{App as N2}from"@frontmcp/sdk";import{Resource as O2,ResourceContext as R2}from"@frontmcp/sdk";var Ec=class extends R2{static{s(this,"Jh")}static{o(this,"ReactPagesCurrentResource")}async execute(){return this.get(q).read("react://pages/current")}};Ec=S([O2({name:"react-pages-current",uri:"react://pages/current",mimeType:"application/json",description:"The most recently active React page (from <LensmcpRoot>)."})],Ec);var T2=Ec;import{Resource as M2,ResourceContext as P2}from"@frontmcp/sdk";var bc=class extends P2{static{s(this,"Wh")}static{o(this,"ReactComponentsHotResource")}async execute(){return this.get(q).read("react://components/hot")}};bc=S([M2({name:"react-components-hot",uri:"react://components/hot",mimeType:"application/json",description:"Components ranked by render count this session."})],bc);var U2=bc;import{Resource as Z2,ResourceContext as q2}from"@frontmcp/sdk";var Dc=class extends q2{static{s(this,"Hh")}static{o(this,"ReactRendersSlowResource")}async execute(){return this.get(q).read("react://renders/slow")}};Dc=S([Z2({name:"react-renders-slow",uri:"react://renders/slow",mimeType:"application/json",description:"Renders with actualDurationMs >= threshold (default 16ms)."})],Dc);var L2=Dc;import{Resource as J2,ResourceContext as V2}from"@frontmcp/sdk";var wc=class extends V2{static{s(this,"Qh")}static{o(this,"ReactRendersRecentResource")}async execute(){return this.get(q).read("react://renders/recent")}};wc=S([J2({name:"react-renders-recent",uri:"react://renders/recent",mimeType:"application/json",description:"Last 100 render commits with attribution (why)."})],wc);var W2=wc;import{Resource as G2,ResourceContext as K2}from"@frontmcp/sdk";var Bc=class extends K2{static{s(this,"tv")}static{o(this,"ReactEffectsRecentResource")}async execute(){return this.get(q).read("react://effects/recent")}};Bc=S([G2({name:"react-effects-recent",uri:"react://effects/recent",mimeType:"application/json",description:"Last 100 useEffect runs/cleanups from tracedUseEffect."})],Bc);var H2=Bc;import{Resource as X2,ResourceContext as Y2}from"@frontmcp/sdk";var $c=class extends Y2{static{s(this,"nv")}static{o(this,"ReactMemosRecomputedResource")}async execute(){return this.get(q).read("react://memos/recomputed")}};$c=S([X2({name:"react-memos-recomputed",uri:"react://memos/recomputed",mimeType:"application/json",description:"Recent useMemo recomputations (depsHash changed)."})],$c);var Q2=$c;import{Resource as eC,ResourceContext as tC}from"@frontmcp/sdk";var Cc=class extends tC{static{s(this,"iv")}static{o(this,"ReactHooksRecentResource")}async execute(){return this.get(q).read("react://hooks/recent")}};Cc=S([eC({name:"react-hooks-recent",uri:"react://hooks/recent",mimeType:"application/json",description:"Recent hook-run events (useMemo / useCallback)."})],Cc);var uC=Cc;import{Tool as rC,ToolContext as nC,z as xc}from"@frontmcp/sdk";var kc=class extends nC{static{s(this,"cv")}static{o(this,"GraphExplainRerenderTool")}async execute(e){let t=await this.get(q).read("react://renders/recent"),r;if(e.renderNodeId)r=t.renders.find(u=>u.id===e.renderNodeId);else if(e.componentInstanceId)for(let u=t.renders.length-1;u>=0;u--){let n=t.renders[u];if(n&&n.componentInstanceId===e.componentInstanceId){r=n;break}}else if(e.componentLogicalId)for(let u=t.renders.length-1;u>=0;u--){let n=t.renders[u];if(n&&n.componentLogicalId===e.componentLogicalId){r=n;break}}if(!r)return{found:!1,searched:e};let i=(r.why??[]).map(u=>({...u,summary:E6(u)}));return{found:!0,renderNodeId:r.id,componentInstanceId:r.componentInstanceId,componentLogicalId:r.componentLogicalId,componentName:r.componentName,page:r.page,route:r.route,phase:r.phase,actualDurationMs:r.actualDurationMs,why:i,parentRenderId:r.parentRenderId}}};kc=S([rC({name:"graph.explain_rerender",description:"Returns the most recent render record for a component (by `renderNodeId`, `componentInstanceId`, or `componentLogicalId`), with its `why` causal list (valtio-path / parent-render / hook-dep-changed / props / context / react-state / force).",inputSchema:{renderNodeId:xc.string().optional().describe("Exact render commit id from react://renders/recent."),componentInstanceId:xc.string().optional().describe("Component instance id; resolves to that instance\u2019s last render."),componentLogicalId:xc.string().optional().describe("Component logical id (e.g. react:component:src/App.tsx:CardGrid); resolves to its most recent render across HMR generations.")}})],kc);var iC=kc;function E6(e){switch(e.type){case"valtio-path":return`valtio path ${String(e.path)} changed (${e.changedKeys?.join(",")??""})`;case"react-state":return`useState hook #${String(e.hookIndex)} changed`;case"context":return`context ${String(e.contextName)} changed`;case"props":return`prop(s) changed: ${e.changedKeys?.join(",")??""}`;case"parent-render":return`parent render ${String(e.parentRenderId)} triggered this`;case"hook-dep-changed":return`hook ${String(e.hookInstanceId)} deps changed`;case"force":return`forced render: ${String(e.reason)}`;default:return`unknown cause: ${JSON.stringify(e)}`}}s(E6,"vz"),o(E6,"summariseWhy");var b6=class{static{s(this,"lv")}static{o(this,"ReactApp")}};b6=S([N2({id:"react",name:"React",description:"React render attribution: pages, hot components, slow renders, hook + effect + memo events. Hosts graph.explain_rerender.",resources:[T2,U2,L2,W2,H2,Q2,uC],tools:[iC]})],b6);var Zr="react://pages/current",ds="react://components/hot",cs="react://renders/slow",ps="react://renders/recent",ms="react://effects/recent",fs="react://memos/recomputed",gs="react://hooks/recent",hs=100,Ac=50,D6=500;function w6(e){let t=Je(e.thresholds).slowRenderMs,r={rendersRecent:[],rendersSlow:[],effectsRecent:[],hooksRecent:[],memosRecomputed:[],rendersByInstance:new Map,hotByLogical:new Map},i=o(n=>{if(n.source!=="react")return;let a=n.raw??null;if(a?.kind)switch(a.kind){case"render":{let l=a.render;if(!l)return;if(bu(r.rendersRecent,l,hs),r.rendersByInstance.delete(l.componentInstanceId),r.rendersByInstance.set(l.componentInstanceId,l),r.rendersByInstance.size>D6){for(let p of r.rendersByInstance.keys())if(r.rendersByInstance.delete(p),r.rendersByInstance.size<=D6)break}l.actualDurationMs>=t&&(bu(r.rendersSlow,l,Ac),r.rendersSlow.sort((p,c)=>c.actualDurationMs-p.actualDurationMs),r.rendersSlow.length>Ac&&(r.rendersSlow.length=Ac));let d=r.hotByLogical.get(l.componentLogicalId);d?(d.renderCount+=1,d.totalActualMs+=l.actualDurationMs,d.lastRenderId=l.id):r.hotByLogical.set(l.componentLogicalId,{componentLogicalId:l.componentLogicalId,componentName:l.componentName,renderCount:1,totalActualMs:l.actualDurationMs,lastRenderId:l.id}),(l.page||l.route)&&(r.currentPage={page:l.page??"(unknown)",route:l.route,updatedAt:n.timestamp},e.resources.markDirty(Zr)),e.resources.markDirty(ps),e.resources.markDirty(ds),l.actualDurationMs>=t&&e.resources.markDirty(cs);return}case"effect-run":{let l=a.effect;if(!l)return;bu(r.effectsRecent,l,hs),e.resources.markDirty(ms);return}case"hook-run":{let l=a.hook;if(!l)return;bu(r.hooksRecent,l,hs),e.resources.markDirty(gs),l.recomputed&&l.hookType==="useMemo"&&(bu(r.memosRecomputed,l,hs),e.resources.markDirty(fs));return}case"component-mount":case"component-unmount":{let l=a.component;if(!l)return;(l.page||l.route)&&(r.currentPage={page:l.page??"(unknown)",route:l.route,updatedAt:n.timestamp},e.resources.markDirty(Zr));return}default:return}},"handler"),u=e.bus.subscribe(i);return e.resources.register(Zr,()=>({schemaVersion:1,revision:e.resources.revision(Zr)??0,updatedAt:new Date().toISOString(),page:r.currentPage??null})),e.resources.register(ds,()=>({schemaVersion:1,revision:e.resources.revision(ds)??0,updatedAt:new Date().toISOString(),components:[...r.hotByLogical.values()].sort((n,a)=>a.renderCount-n.renderCount)})),e.resources.register(cs,()=>({schemaVersion:1,revision:e.resources.revision(cs)??0,updatedAt:new Date().toISOString(),thresholdMs:t,renders:r.rendersSlow.slice()})),e.resources.register(ps,()=>({schemaVersion:1,revision:e.resources.revision(ps)??0,updatedAt:new Date().toISOString(),renders:r.rendersRecent.slice()})),e.resources.register(ms,()=>({schemaVersion:1,revision:e.resources.revision(ms)??0,updatedAt:new Date().toISOString(),effects:r.effectsRecent.slice()})),e.resources.register(fs,()=>({schemaVersion:1,revision:e.resources.revision(fs)??0,updatedAt:new Date().toISOString(),memos:r.memosRecomputed.slice()})),e.resources.register(gs,()=>({schemaVersion:1,revision:e.resources.revision(gs)??0,updatedAt:new Date().toISOString(),hooks:r.hooksRecent.slice()})),{unsubscribe:u,uris:[Zr,ds,cs,ps,ms,fs,gs],lookups:{latestRenderFor(n){return r.rendersByInstance.get(n)},latestRenderForLogical(n){if(r.hotByLogical.get(n))for(let a=r.rendersRecent.length-1;a>=0;a--){let l=r.rendersRecent[a];if(l&&l.componentLogicalId===n)return l}}}}}s(w6,"pv"),o(w6,"installReactReducer");function bu(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(bu,"fo"),o(bu,"pushBounded");import{App as sC}from"@frontmcp/sdk";import{Resource as aC,ResourceContext as oC}from"@frontmcp/sdk";var _c=class extends oC{static{s(this,"fv")}static{o(this,"ValtioUpdatesRecentResource")}async execute(){return this.get(q).read("valtio://updates/recent")}};_c=S([aC({name:"valtio-updates-recent",uri:"valtio://updates/recent",mimeType:"application/json",description:"Last 100 Valtio state-update events with path + changedKeys + subscribers."})],_c);var lC=_c;import{Resource as dC,ResourceContext as cC}from"@frontmcp/sdk";var Ic=class extends cC{static{s(this,"gv")}static{o(this,"ValtioStoresResource")}async execute(){return this.get(q).read("valtio://stores")}};Ic=S([dC({name:"valtio-stores",uri:"valtio://stores",mimeType:"application/json",description:"Registered Valtio stores (created via lensmcp-wrapped proxy())."})],Ic);var pC=Ic;import{Resource as mC,ResourceContext as fC}from"@frontmcp/sdk";var Sc=class extends fC{static{s(this,"vv")}static{o(this,"ValtioSubscribersResource")}async execute(){return this.get(q).read("valtio://subscribers")}};Sc=S([mC({name:"valtio-subscribers",uri:"valtio://subscribers",mimeType:"application/json",description:"Per-(storeId, path) list of component instance ids currently subscribed via tracked useSnapshot."})],Sc);var gC=Sc,B6=class{static{s(this,"bv")}static{o(this,"ValtioApp")}};B6=S([sC({id:"valtio",name:"Valtio",description:"Valtio store + subscription tracking. Phase 5 ships updates/stores/subscribers; per-path subscriber walks land via graph.explain_rerender.",resources:[lC,pC,gC]})],B6);var vs="valtio://updates/recent",ys="valtio://stores",qr="valtio://subscribers",$6=100,C6=1e3,hC=1e3,vC=256,yC=256;function x6(e,t){if(e.size<=t)return;let r=e.values();for(;e.size>t;){let i=r.next();if(i.done)break;e.delete(i.value)}}s(x6,"Ez"),o(x6,"capSet");function Fc(e){let t=Array.isArray(e.paths)?e.paths.filter(r=>typeof r=="string"):void 0;return t&&t.length>0?t.slice(0,vC):typeof e.path=="string"?[e.path]:[]}s(Fc,"f$"),o(Fc,"subscriptionPaths");function zc(e){return e.componentLogicalId??e.componentInstanceId??"react:component:anonymous"}s(zc,"m$"),o(zc,"subscriberId");function k6(e){let t={updates:[],stores:new Map,subscribers:new Map,latestUpdateByPath:new Map},r=o(u=>{if(u.source!=="valtio")return;let n=u.raw??null;if(n?.kind)switch(n.kind){case"state-update":{let a=n.update;if(!a)return;let l={...a,emittedAt:u.timestamp};t.updates.push(l),t.updates.length>$6&&t.updates.splice(0,t.updates.length-$6);let d=`${a.storeId}::${a.path}`;if(t.latestUpdateByPath.delete(d),t.latestUpdateByPath.set(d,l),t.latestUpdateByPath.size>C6){for(let p of t.latestUpdateByPath.keys())if(t.latestUpdateByPath.delete(p),t.latestUpdateByPath.size<=C6)break}e.resources.markDirty(vs);return}case"store-created":{let a=n.store;if(!a)return;t.stores.set(a.storeId,{...a,createdAt:u.timestamp}),e.resources.markDirty(ys);return}case"subscription-added":{let a=n.subscription;if(!a||!a.componentInstanceId)return;let l=zc(a);for(let d of Fc(a)){let p=`${a.storeId}::${d}`,c=t.subscribers.get(p);c||(c=new Map,t.subscribers.set(p,c));let f=c.get(l);f||(f=new Set,c.set(l,f)),f.add(a.componentInstanceId),St(c,xr),x6(f,yC)}St(t.subscribers,hC),e.resources.markDirty(qr);return}case"subscription-removed":{let a=n.subscription;if(!a||!a.componentInstanceId)return;let l=zc(a);for(let d of Fc(a)){let p=`${a.storeId}::${d}`,c=t.subscribers.get(p);if(!c)continue;let f=c.get(l);f&&(f.delete(a.componentInstanceId),f.size===0&&c.delete(l)),c.size===0&&t.subscribers.delete(p)}e.resources.markDirty(qr);return}default:return}},"handler"),i=e.bus.subscribe(r);return e.resources.register(vs,()=>({schemaVersion:1,revision:e.resources.revision(vs)??0,updatedAt:new Date().toISOString(),updates:t.updates.slice()})),e.resources.register(ys,()=>({schemaVersion:1,revision:e.resources.revision(ys)??0,updatedAt:new Date().toISOString(),stores:[...t.stores.values()]})),e.resources.register(qr,()=>({schemaVersion:1,revision:e.resources.revision(qr)??0,updatedAt:new Date().toISOString(),subscriptions:[...t.subscribers.entries()].map(([u,n])=>{let[a,l]=u.split("::");return{storeId:a,path:l,componentInstanceIds:[...n.keys()]}})})),{unsubscribe:i,uris:[vs,ys,qr],lookups:{latestUpdateForPath(u,n){return t.latestUpdateByPath.get(`${u}::${n}`)},subscribersFor(u,n){return[...t.subscribers.get(`${u}::${n}`)?.keys()??[]]}}}}s(k6,"wv"),o(k6,"installValtioReducer");import{App as EC}from"@frontmcp/sdk";import{Resource as bC,ResourceContext as DC}from"@frontmcp/sdk";var jc=class extends DC{static{s(this,"xv")}static{o(this,"GraphPatternsResource")}async execute(){return this.get(q).read("graph://patterns")}};jc=S([bC({name:"graph-patterns",uri:"graph://patterns",mimeType:"application/json",description:"Recent detected anti-patterns (db-in-loop, n+1-query, render-storm)."})],jc);var wC=jc;import{Resource as BC,ResourceContext as $C}from"@frontmcp/sdk";var Nc=class extends $C{static{s(this,"_v")}static{o(this,"GraphEventLoopLagResource")}async execute(){return this.get(q).read("graph://performance/event-loop-lag")}};Nc=S([BC({name:"graph-event-loop-lag",uri:"graph://performance/event-loop-lag",mimeType:"application/json",description:"Recent event-loop-lag samples + the max lag seen."})],Nc);var CC=Nc;import{Tool as xC,ToolContext as kC,z as AC}from"@frontmcp/sdk";var A6;function Oc(e){A6=e}s(Oc,"la"),o(Oc,"setActiveGraphBuffer");function Lr(){return A6?.events??[]}s(Lr,"It"),o(Lr,"currentEvents");function Nt(){let e=new qp;return f1(e,Lr()),e}s(Nt,"Ce"),o(Nt,"buildGraph");var Rc=class extends kC{static{s(this,"Sv")}static{o(this,"GraphGetNodeTool")}async execute(e){let t=Nt().getNode(e.nodeId);return t?{found:!0,node:t}:{found:!1,nodeId:e.nodeId}}};Rc=S([xC({name:"graph.get_node",description:"Returns a single graph node by id (built from the current event window).",inputSchema:{nodeId:AC.string().describe("Node id (usually the originating event id).")}})],Rc);var _C=Rc;import{Tool as IC,ToolContext as SC,z as Du}from"@frontmcp/sdk";var FC=["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"],Tc=class extends SC{static{s(this,"Rv")}static{o(this,"GraphTraverseTool")}async execute(e){let t=Nt().traverse({from:e.from,lens:e.lens,depth:e.depth,direction:e.direction,maxNodes:e.maxNodes});return{nodeCount:t.nodes.length,edgeCount:t.edges.length,nodes:t.nodes.map(r=>({id:r.id,type:r.type,name:r.name,durationMs:r.durationMs,flowId:r.context.flowId})),edges:t.edges.map(r=>({from:r.from,to:r.to,axis:r.axis,type:r.type}))}}};Tc=S([IC({name:"graph.traverse",description:'Walk the multi-axis trace graph from a node along one or more edge axes (the "lens"). Bounded by depth + node count.',inputSchema:{from:Du.string().describe("Start node id."),lens:Du.array(Du.enum(FC)).min(1).describe('Edge axes to follow (e.g. ["caused","backend"]).'),depth:Du.number().int().positive().max(12).default(4),direction:Du.enum(["out","in","both"]).default("both"),maxNodes:Du.number().int().positive().max(1e3).default(200)}})],Tc);var zC=Tc;import{Tool as jC,ToolContext as NC,z as OC}from"@frontmcp/sdk";var Mc=class extends NC{static{s(this,"Ev")}static{o(this,"GraphFindDbInLoopTool")}async execute(e){let t=Ll(Lr(),{threshold:e.threshold});return{count:t.length,matches:t}}};Mc=S([jC({name:"graph.find_db_in_loop",description:"Scan the current event window for loops that issued more than `threshold` DB calls (N+1-ish backend anti-pattern).",inputSchema:{threshold:OC.number().int().positive().default(5)}})],Mc);var RC=Mc;import{Tool as TC,ToolContext as MC,z as PC}from"@frontmcp/sdk";var Pc=class extends MC{static{s(this,"zv")}static{o(this,"GraphFindSlowPathTool")}async execute(e){let t=Nt(),r=new Map,i=Lr(),u=e.from?[e.from]:i.filter(l=>l.context.originNodeId===void 0&&l.context.flowId).map(l=>l.id);for(let l of i){let d=t.traverse({from:l.id,lens:["caused","async","backend"],depth:1,direction:"out",maxNodes:50});r.set(l.id,d.edges.filter(p=>p.from===l.id).map(p=>p.to))}let n=o(l=>t.getNode(l)?.durationMs??0,"durationOf"),a=c1(u.length?u:i.map(l=>l.id),r,n);return{totalDurationMs:a.totalDurationMs,path:a.path.map(l=>{let d=t.getNode(l);return{id:l,name:d?.name,type:d?.type,durationMs:d?.durationMs}})}}};Pc=S([TC({name:"graph.find_slow_path",description:"Find the slowest cumulative chain on the caused/async/backend axes starting from a node (or every flow origin if `from` is omitted).",inputSchema:{from:PC.string().optional().describe("Start node id; defaults to all flow origins.")}})],Pc);var UC=Pc;import{Tool as ZC,ToolContext as qC,z as _6}from"@frontmcp/sdk";var Uc=class extends qC{static{s(this,"Ov")}static{o(this,"GraphTraceFromOriginTool")}async execute(e){let t=Nt(),r=e.originNodeId;if(!t.getNode(r)){let n=Lr().find(a=>a.context.originNodeId===e.originNodeId||a.raw?.origin?.nodeId===e.originNodeId);n&&(r=n.id)}let i=t.getNode(r);if(!i)return{found:!1,originNodeId:e.originNodeId};let u=t.traverse({from:r,lens:["caused","render","state","backend","async"],depth:e.depth,direction:"out",maxNodes:500});return{found:!0,origin:{id:r,name:i.name,type:i.type},nodeCount:u.nodes.length,nodes:u.nodes.map(n=>({id:n.id,type:n.type,name:n.name,durationMs:n.durationMs}))}}};Uc=S([ZC({name:"graph.trace_from_origin",description:'Given an origin node id (e.g. a data-agent-component value or an event id), returns every node reachable on the caused/render/state/backend axes \u2014 "what did this cause?".',inputSchema:{originNodeId:_6.string().describe("Origin node id, logicalId, or originating event id."),depth:_6.number().int().positive().max(12).default(6)}})],Uc);var LC=Uc;import{Tool as JC,ToolContext as VC,z as I6}from"@frontmcp/sdk";var Zc=class extends VC{static{s(this,"Pv")}static{o(this,"GraphFindStateUpdatesCausedByTool")}async execute(e){let t=Nt();if(!t.getNode(e.from))return{found:!1,from:e.from};let r=t.traverse({from:e.from,lens:["caused","state"],depth:e.depth,direction:"out",maxNodes:500}).nodes.filter(i=>i.type==="state-update");return{found:!0,count:r.length,stateUpdates:r.map(i=>({id:i.id,name:i.name,logicalId:i.logicalId}))}}};Zc=S([JC({name:"graph.find_state_updates_caused_by",description:'From an origin node, returns the state-update nodes reachable on the caused/state axes \u2014 "what state changed because of this?".',inputSchema:{from:I6.string().describe("Origin node id."),depth:I6.number().int().positive().max(12).default(6)}})],Zc);var WC=Zc;import{Tool as GC,ToolContext as KC,z as S6}from"@frontmcp/sdk";var qc=class extends KC{static{s(this,"Mv")}static{o(this,"GraphFindBackendWorkCausedByClickTool")}async execute(e){let t=Nt();if(!t.getNode(e.from))return{found:!1,from:e.from};let r=t.traverse({from:e.from,lens:["caused","backend","async"],depth:e.depth,direction:"out",maxNodes:500}).nodes.filter(i=>i.type==="server-request");return{found:!0,count:r.length,requests:r.map(i=>({id:i.id,name:i.name,durationMs:i.durationMs}))}}};qc=S([GC({name:"graph.find_backend_work_caused_by_click",description:'From a UI origin node, returns the server-request nodes reachable on the caused/backend/async axes \u2014 "what backend work did this click trigger?".',inputSchema:{from:S6.string().describe("UI origin node id (e.g. the user-action event id)."),depth:S6.number().int().positive().max(12).default(8)}})],qc);var HC=qc,F6=class{static{s(this,"Uv")}static{o(this,"GraphApp")}};F6=S([EC({id:"graph",name:"Graph",description:"Multi-axis causal graph: traverse by lens, trace from origin, find slow paths + db-in-loop / n+1 / render-storm patterns.",resources:[wC,CC],tools:[_C,zC,RC,UC,LC,WC,HC]})],F6);var wu="graph://patterns",Bu="graph://performance/event-loop-lag",Lc=2e3,z6=8*1024*1024,XC=100,j6=100;function N6(e){let t=Je(e.thresholds),r=(e.now??(()=>Date.now()))(),i={events:[]},u=[],n=0,a=0,l=0,d=new Set,p=[],c=new Map,f,g=new Map,m=o(j=>{switch(j.kind){case"n+1-query":return`n+1:${String(j.details.signature??"")}`;case"render-storm":return`storm:${String(j.details.componentInstanceId??"")}`;case"db-in-loop":return`dbloop:${j.evidence[0]??""}`;default:return`${j.kind}:${j.evidence.join(",")}`}},"patternKey"),h=o(j=>{c.set(wu,j),e.resources.markDirty(wu)},"markPatterns"),E=o((j,F)=>{let b=m(j);if(g.delete(b),g.set(b,j),g.size>XC){let w=g.keys().next().value;w!==void 0&&g.delete(w)}h(F)},"pushPattern"),D=o(j=>{let F=!1;for(let[b,w]of g){if(w.evidence.length===0)continue;let C=w.evidence.filter(N=>d.has(N));if(C.length===0){g.delete(b),F=!0;continue}C.length!==w.evidence.length&&(w.evidence=C,F=!0)}F&&h(j)},"dropUnevidencedPatterns"),$=o(j=>{f=j.timestamp;let F=ki(j);i.events.push(j),u.push(F),n+=F,d.add(j.id);let b=Math.max(0,i.events.length-Lc),w=n;for(let O=0;O<b;O+=1)w-=u[O]??0;let C=0;for(;w>z6&&b<u.length;)w-=u[b]??0,b+=1,C+=1;if(b>0){let O=i.events.splice(0,b);u.splice(0,b),n=Math.max(0,w),a+=O.length,l+=C;for(let te of O)d.delete(te.id);D(j.timestamp)}let N=j.raw??null;if(N?.kind==="loop")for(let O of Ll(i.events,{threshold:t.dbInLoop}))E(O,j.timestamp);if(N?.kind==="db-query")for(let O of l1(i.events,{threshold:t.nPlusOne}))E(O,j.timestamp);if(j.source==="react"&&N?.kind==="render")for(let O of d1(i.events,{threshold:t.renderStorm}))E(O,j.timestamp);j.source==="perf"&&N?.kind==="event-loop-lag"&&typeof N.lagMs=="number"&&(p.push({at:j.timestamp,lagMs:N.lagMs,source:j.source}),p.length>j6&&p.splice(0,p.length-j6),c.set(Bu,j.timestamp),e.resources.markDirty(Bu))},"handler"),A=e.bus.subscribe($);Oc(i);let I=o(j=>new Date(c.get(j)??r).toISOString(),"stamp");return e.resources.register(wu,()=>({schemaVersion:1,revision:e.resources.revision(wu)??0,updatedAt:I(wu),patterns:[...g.values()],eventsBuffered:i.events.length,eventBufferCapacity:Lc,lastEventAt:f,producer:f===void 0?"none":"connected"})),e.resources.register(Bu,()=>({schemaVersion:1,revision:e.resources.revision(Bu)??0,updatedAt:I(Bu),samples:p.slice(),maxLagMs:p.reduce((j,F)=>Math.max(j,F.lagMs),0),lastEventAt:f})),{unsubscribe:o(()=>{Oc(void 0),A()},"unsubscribe"),uris:[wu,Bu],retentionStats:o(()=>({residentEvents:i.events.length,residentBytes:n,evictedEvents:a,evictedForBytes:l,eventCap:Lc,byteCap:z6}),"retentionStats")}}s(N6,"Fv"),o(N6,"installGraphReducer");import{App as YC}from"@frontmcp/sdk";import{Resource as QC,ResourceContext as ex}from"@frontmcp/sdk";var Jc=class extends ex{static{s(this,"Zv")}static{o(this,"MemoryCurrentResource")}async execute(){return this.get(q).read("memory://current")}};Jc=S([QC({name:"memory-current",uri:"memory://current",mimeType:"application/json",description:"Last process-memory sample (heapUsed / rss)."})],Jc);var tx=Jc;import{Resource as ux,ResourceContext as rx}from"@frontmcp/sdk";var Vc=class extends rx{static{s(this,"qv")}static{o(this,"MemoryOwnersResource")}async execute(){return this.get(q).read("memory://owners")}};Vc=S([ux({name:"memory-owners",uri:"memory://owners",mimeType:"application/json",description:"All tracked container owners with current item count + byte estimate."})],Vc);var nx=Vc;import{Resource as ix,ResourceContext as sx}from"@frontmcp/sdk";var Wc=class extends sx{static{s(this,"Gv")}static{o(this,"MemoryOwnersGrowingResource")}async execute(){return this.get(q).read("memory://owners/growing")}};Wc=S([ix({name:"memory-owners-growing",uri:"memory://owners/growing",mimeType:"application/json",description:"Top 20 container owners by growth-since-start."})],Wc);var ax=Wc;import{Resource as ox,ResourceContext as lx}from"@frontmcp/sdk";var Gc=class extends lx{static{s(this,"Kv")}static{o(this,"MemoryLeaksSuspectedResource")}async execute(){return this.get(q).read("memory://leaks/suspected")}};Gc=S([ox({name:"memory-leaks-suspected",uri:"memory://leaks/suspected",mimeType:"application/json",description:"Suspected leaks: per-flow retentions + stale-generation singletons."})],Gc);var dx=Gc;import{Tool as cx,ToolContext as px,z as mx}from"@frontmcp/sdk";var O6;function Kc(e){O6=e}s(Kc,"da"),o(Kc,"setActiveMemoryLookups");function Es(){return O6}s(Es,"Gt"),o(Es,"activeMemoryLookups");var Hc=class extends px{static{s(this,"Xv")}static{o(this,"MemoryFindGrowthByFlowTool")}async execute(e){let t=Es();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.growthByFlow(e.flowId);return{found:!0,flowId:e.flowId,owners:r}}};Hc=S([cx({name:"memory.find_growth_by_flow",description:'Returns the container owners mutated during a flow and how much each grew \u2014 "what did this flow allocate?".',inputSchema:{flowId:mx.string().describe("Flow id.")}})],Hc);var fx=Hc;import{Tool as gx,ToolContext as hx,z as vx}from"@frontmcp/sdk";var Xc=class extends hx{static{s(this,"Yv")}static{o(this,"MemoryFindFlowsThatMutatedOwnerTool")}async execute(e){let t=Es();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.flowsThatMutatedOwner(e.ownerId);return{found:!0,ownerId:e.ownerId,flowIds:r}}};Xc=S([gx({name:"memory.find_flows_that_mutated_owner",description:"Returns the flow ids that mutated a given container owner.",inputSchema:{ownerId:vx.string().describe("Owner id (<ownerInstanceId>::<fieldName>).")}})],Xc);var yx=Xc;import{Tool as Ex,ToolContext as bx,z as Dx}from"@frontmcp/sdk";var Yc=class extends bx{static{s(this,"ey")}static{o(this,"MemoryExplainLeakTool")}async execute(e){let t=Es();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.getLeak(e.leakIndex);if(!r)return{found:!1,leakIndex:e.leakIndex};let i,u;if(r.kind==="retention"){let n=r.detail;i=`Owner ${n.ownerId} grew by ${n.growth} items during flow ${n.flowId} and did not shrink after the flow settled.`,u="Add a TTL / max-size eviction policy to this container, or clear it when the owning scope is disposed. If it is a request-scoped cache, move it off the singleton."}else{let n=r.detail;i=`Disposed singleton ${n.logicalId} (generation ${n.generation}) still retains ${n.retainedBytes} bytes \u2014 a stale generation kept alive after HMR/reload.`,u="Ensure listeners/timers registered by the old instance are removed in the dispose hook (OnModuleDestroy / cleanup), so the previous generation can be garbage-collected."}return{found:!0,leak:r,narrative:i,recommendation:u}}};Yc=S([Ex({name:"memory.explain_leak",description:"Returns a narrative explanation of a suspected leak (by index in memory://leaks/suspected): which owner, which flow, what grew, and a remediation hint.",inputSchema:{leakIndex:Dx.number().int().nonnegative().describe("Index into memory://leaks/suspected.")}})],Yc);var wx=Yc,R6=class{static{s(this,"ry")}static{o(this,"MemoryApp")}};R6=S([YC({id:"memory",name:"Memory",description:"Container-owner growth tracking + suspect-leak / stale-generation detection. Hosts memory.explain_leak.",resources:[tx,nx,ax,dx],tools:[fx,yx,wx]})],R6);var Jr="memory://current",Vr="memory://owners",Wr="memory://owners/growing",Ot="memory://leaks/suspected",Bx=200,T6=50,$x=500;function M6(e){let t=(e.now??(()=>Date.now()))(),r={owners:new Map,leaks:new Map,changedAt:new Map},i=o((E,D)=>{r.changedAt.set(E,D),e.resources.markDirty(E)},"touch"),u=o((E,D)=>{if(r.leaks.delete(E),r.leaks.set(E,D),r.leaks.size>Bx){let $=r.leaks.keys().next().value;$!==void 0&&r.leaks.delete($)}},"pushLeak"),n=new Map,a=o((E,D)=>{E!==D&&(n.delete(E),n.set(E,D),n.size>5e3&&n.delete(n.keys().next().value))},"noteRequestFlow"),l=o((E,D)=>{if(E.flowIds.add(D),E.flowIds.size>T6){for(let $ of E.flowIds)if(E.flowIds.delete($),E.flowIds.size<=T6)break}},"noteFlow"),d=o((E,D,$)=>{let A=r.owners.get(E);if(A||(A={ownerId:E,itemCount:D,estimatedBytes:0,startCount:D,mutations:0,flowIds:new Set,lastMutatedAt:$}),r.owners.delete(E),r.owners.set(E,A),r.owners.size>$x){let I=r.owners.keys().next().value;I!==void 0&&I!==E&&r.owners.delete(I)}return A},"ensure"),p=o((E,D)=>{let $=!1;for(let[A,I]of r.leaks){if(I.kind!=="retention"||I.ownerId!==E)continue;let j=I.detail.startCount;typeof j=="number"&&D<=j&&(r.leaks.delete(A),$=!0)}return $},"retractReleasedRetentions"),c=o(E=>{if(E.source!=="memory"&&E.source!=="perf")return;let D=E.raw??null;if(D?.kind)switch(r.lastEventAt=Math.max(r.lastEventAt??0,E.timestamp),D.kind){case"memory-mutation":{if(!D.mutation)return;let $=D.mutation,A=d($.ownerNodeId,$.beforeCount??$.afterCount,E.timestamp);A.itemCount=$.afterCount,A.estimatedBytes=$.afterCount*64,A.mutations+=1,A.lastMutatedAt=E.timestamp,E.context.flowId&&l(A,E.context.flowId),E.context.requestId&&E.context.flowId&&a(E.context.requestId,E.context.flowId),i(Vr,E.timestamp),i(Wr,E.timestamp),p($.ownerNodeId,$.afterCount)&&i(Ot,E.timestamp);return}case"memory-retention":{if(!D.retention)return;let $=D.retention,A=$.requestId?$.flowId:n.get($.flowId)??$.flowId;u(`retention:${$.ownerId}:${A}`,{kind:"retention",ownerId:$.ownerId,flowId:A,detail:{...$,flowId:A},at:E.timestamp}),i(Ot,E.timestamp);return}case"singleton-stale-generation":{if(!D.staleGeneration)return;let $=D.staleGeneration;u(`stale:${$.logicalId}:${$.generation}`,{kind:"stale-generation",logicalId:$.logicalId,detail:{...$},at:E.timestamp}),i(Ot,E.timestamp);return}case"process-memory":{if(!D.memory)return;r.current={...D.role?{role:D.role}:{},heapUsed:D.memory.heapUsed,heapTotal:D.memory.heapTotal,rss:D.memory.rss,external:D.memory.external,arrayBuffers:D.memory.arrayBuffers,at:E.timestamp},i(Jr,E.timestamp);return}default:return}},"handler"),f=e.bus.subscribe(c),g=o(E=>new Date(r.changedAt.get(E)??t).toISOString(),"stamp"),m=o(()=>({lastEventAt:r.lastEventAt,ownersTracked:r.owners.size,producer:r.lastEventAt===void 0?"none":"connected",detail:r.lastEventAt===void 0?"No memory event has ever been observed \u2014 an empty leak list is NOT evidence there is no leak, nothing is watching. Run under the dev cluster with @lensmcp/memory-tracker wired.":`${r.owners.size} owner${r.owners.size===1?"":"s"} tracked; ${r.leaks.size} suspected leak${r.leaks.size===1?"":"s"}.`}),"health");e.resources.register(Jr,()=>({schemaVersion:1,revision:e.resources.revision(Jr)??0,updatedAt:g(Jr),current:r.current??null})),e.resources.register(Vr,()=>({schemaVersion:1,revision:e.resources.revision(Vr)??0,updatedAt:g(Vr),owners:[...r.owners.values()].map(Qc),...m()})),e.resources.register(Wr,()=>({schemaVersion:1,revision:e.resources.revision(Wr)??0,updatedAt:g(Wr),owners:[...r.owners.values()].map(Qc).filter(E=>E.growthSinceStart>0).sort((E,D)=>D.growthSinceStart-E.growthSinceStart).slice(0,20),...m()})),e.resources.register(Ot,()=>({schemaVersion:1,revision:e.resources.revision(Ot)??0,updatedAt:g(Ot),suspected:[...r.leaks.values()],...m()}));let h={ownersMutatedByFlow(E){return[...r.owners.values()].filter(D=>D.flowIds.has(E))},growthByFlow(E){return[...r.owners.values()].filter(D=>D.flowIds.has(E)).map(D=>({ownerId:D.ownerId,growth:D.itemCount-D.startCount}))},flowsThatMutatedOwner(E){let D=r.owners.get(E);return D?[...D.flowIds]:[]},getLeak(E){return[...r.leaks.values()][E]},allLeaks(){return[...r.leaks.values()]}};return Kc(h),{unsubscribe:o(()=>{Kc(void 0),f()},"unsubscribe"),uris:[Jr,Vr,Wr,Ot],lookups:h}}s(M6,"ny"),o(M6,"installMemoryReducer");function Qc(e){return{ownerId:e.ownerId,itemCount:e.itemCount,estimatedBytes:e.estimatedBytes,mutations:e.mutations,startCount:e.startCount,growthSinceStart:e.itemCount-e.startCount,lastMutatedAt:e.lastMutatedAt,flowIds:[...e.flowIds]}}s(Qc,"_$"),o(Qc,"toOwnerView");function P6(){let{session:e,providers:t}=E1(),r=k1(),i=A1();for(let E of i.problems)console.error(`[lensmcp] nx.json lensmcp.flows: ${E}`);E3({bus:e.bus,resources:e.resources}),w3({bus:e.bus,resources:e.resources}),C3({bus:e.bus,resources:e.resources}),A3({bus:e.bus,resources:e.resources}),F3({bus:e.bus,resources:e.resources}),P3({bus:e.bus,resources:e.resources}),Z3({bus:e.bus,resources:e.resources}),L3({bus:e.bus,resources:e.resources}),W3({bus:e.bus,resources:e.resources,thresholds:r}),Y3({bus:e.bus,resources:e.resources,thresholds:r}),t6({bus:e.bus,resources:e.resources,thresholds:r}),o6({bus:e.bus,resources:e.resources,thresholds:r}),y6({bus:e.bus,resources:e.resources}),w6({bus:e.bus,resources:e.resources,thresholds:r}),k6({bus:e.bus,resources:e.resources});let u=o3({bus:e.bus,resources:e.resources,flows:i});e.registerReducerRetention("flow",u.retentionStats),d3({resources:e.resources});let n=N6({bus:e.bus,resources:e.resources,thresholds:r});e.registerReducerRetention("graph",n.retentionStats),M6({bus:e.bus,resources:e.resources}),W1({bus:e.bus,resources:e.resources,sessionId:e.id});let a=3e4,l=512*1024*1024,d=0,p=o(()=>{let E=process.memoryUsage(),D=Date.now(),$=E.rss>=l;$&&D-d>=5*6e4&&(d=D,console.warn(`[lensmcp] high process memory: rss=${Math.round(E.rss/1024/1024)}MB heap=${Math.round(E.heapUsed/1024/1024)}MB`)),e.bus.publish({id:qt(),sessionId:e.id,timestamp:D,source:"perf",category:"runtime",severity:$?"warning":"info",context:{sessionId:e.id},fingerprint:Jp({kind:"process-memory",identity:process.env.LENSMCP_PROCESS_ROLE??"session"}),title:`LensMCP process memory (${process.env.LENSMCP_PROCESS_ROLE??"session"})`,raw:{kind:"process-memory",role:process.env.LENSMCP_PROCESS_ROLE??"session",memory:{rss:E.rss,heapUsed:E.heapUsed,heapTotal:E.heapTotal,external:E.external,arrayBuffers:E.arrayBuffers}}})},"publishProcessMemory");p();let c=setInterval(p,a);c.unref?.(),e.onShutdown({name:"process-memory",stop:o(()=>clearInterval(c),"stop")});let f=1200,g=new Map,m=e.bus.subscribe(E=>{let D=E.context.flowId;if(!D)return;let $=g.get(D);$&&clearTimeout($);let A=setTimeout(()=>{g.delete(D);try{let I=Ve()?.getFlowEvents(D);if(!I||I.length===0)return;let j=Is(I,{flowId:D});j&&Dd(j)}catch{}},f);A.unref?.(),g.set(D,A)});e.onShutdown({name:"story-autocompile",stop:o(()=>{m();for(let E of g.values())clearTimeout(E);g.clear()},"stop")});let h=C1({bus:e.bus,sessionId:e.id,onError:o(E=>console.error("[lensmcp] ingest error:",E),"onError")});return h.mode!=="none"&&console.error(`[lensmcp] event ingest active (mode=${h.mode})`),e.onShutdown({name:"event-ingest",stop:o(()=>h.stop(),"stop")}),{session:e,providers:t,ingest:h,flows:i}}s(P6,"k$"),o(P6,"createLensSession");var Cx=new Set(["localhost","127.0.0.1","lensmcp.local"]);function U6(e){if(!e)return!1;let t=e.trim().toLowerCase();if(t.startsWith("[")){let r=t.indexOf("]");return r!==-1&&t.slice(1,r)==="::1"}return t.indexOf(":")===t.lastIndexOf(":")&&(t=t.split(":")[0]??""),Cx.has(t)}s(U6,"xj"),o(U6,"hostHeaderIsLocal");function Z6(e,t){if(!e||U6(t))return{ok:!0};let r=(t??"").replace(/[^\x20-\x7e]/g,"?").slice(0,80);return{ok:!1,status:403,error:"this dashboard answers only requests addressed to this machine (localhost, 127.0.0.1, [::1] or lensmcp.local)"+(r?`; this one was addressed to "${r}"`:"")}}s(Z6,"S$"),o(Z6,"dashboardHostVerdict");import{randomBytes as xx,timingSafeEqual as kx}from"node:crypto";import{chmodSync as Ax,mkdirSync as _x,readFileSync as Ix,writeFileSync as Sx}from"node:fs";import{dirname as Fx,join as zx}from"node:path";var ep="__lensmcp_token";function tp(e){return zx(e,".lensmcp","dashboard-token")}s(tp,"oy"),o(tp,"dashboardTokenPath");function q6(e,t,r,i={}){if(r)return{source:"loopback"};if(e.LENSMCP_ALLOW_INSECURE==="1")return{source:"disabled"};let u=e.LENSMCP_DASHBOARD_TOKEN?.trim();if(u)return{token:u,source:"env"};let n=i.read??(c=>Ix(c,"utf8")),a=i.write??((c,f)=>Sx(c,f,{mode:384})),l=i.ensureDir??(c=>{_x(c,{recursive:!0,mode:448})}),d=i.chmod??((c,f)=>Ax(c,f)),p=tp(t);try{let c=n(p).trim();if(c){try{d(p,384)}catch{}return{token:c,source:"file"}}}catch{}try{l(Fx(p));let c=xx(32).toString("hex");a(p,`${c}
|
|
71
71
|
`);try{d(p,384)}catch{}return{token:c,source:"created"}}catch(c){return{source:"unavailable",reason:c instanceof Error?c.message:String(c)}}}s(q6,"R$"),o(q6,"resolveDashboardToken");function up(e,t){let r=Buffer.from(e,"utf8"),i=Buffer.from(t,"utf8");return r.length!==i.length?!1:kx(r,i)}s(up,"I$"),o(up,"sameSecret");function L6(e,t,r){if(!e)return!0;let i=Array.isArray(t)?t[0]:t,u=/^Bearer\s+(.+)$/i.exec((i??"").trim())?.[1]?.trim();if(u&&up(u,e))return!0;let n=r?.trim();return!!n&&up(n,e)}s(L6,"T$"),o(L6,"dashboardAuthorized");function J6(e){return e==="/api"||e.startsWith("/api/")}s(J6,"E$"),o(J6,"isDataEndpoint");function V6(e){let t=Number(process.env.LENSMCP_PARENT_PID??0);!Number.isInteger(t)||t<=0||setInterval(()=>{process.ppid!==t&&(console.error(`[lensmcp] ${e}: parent gateway (pid ${t}) is gone \u2014 exiting to free the port.`),process.exit(0))},5e3).unref()}s(V6,"A$"),o(V6,"watchParentGateway");import{closeSync as jx,openSync as Nx,readSync as Ox,statSync as Rx}from"node:fs";function W6(e,t,r){let i=Rx(e).size;if(i===0)return[];let u=Math.max(0,i-t),n=Buffer.alloc(i-u),a=Nx(e,"r");try{Ox(a,n,0,n.length,u)}finally{jx(a)}let l=n.toString("utf8").trim().split(`
|
|
72
|
-
`);return u>0&&l.shift(),l.slice(-r)}s(W6,"z$"),o(W6,"readEventTailLines");import{execFileSync as Tx}from"node:child_process";import{createHash as Mx}from"node:crypto";import{readdirSync as G6,readFileSync as
|
|
73
|
-
`).map(n=>n.trim()).filter(n=>n&&!n.startsWith("#")).map(n=>n.split(/\s+/)),i=o((n,a)=>r.some(l=>l[0]===n&&l.slice(1).includes(a)),"has"),u=[];for(let n of e)n.host&&!n.host.includes("*")&&(u.push(n.host),n.service&&n.internalHost!==!1&&u.push(typeof n.internalHost=="string"?n.internalHost:`internal.${n.host}`));return[...new Set(u)].map(n=>({host:n,v4:i("127.0.0.1",n),v6:i("::1",n)}))}serviceKeyView(){let e;try{e=JSON.parse(Es(`${this.opts.root}/${Zx}`,"utf8"))}catch{return{}}let t={};for(let[r,i]of Object.entries(e))typeof i!="string"||i===""||(t[r]={fingerprint:Mx("sha256").update(i).digest("hex").slice(0,12)});return t}liveDecls(){let e=this.discoverDecls();for(let t of e)t.service&&(t.podNames=this.podNames(t.service));return e}legacyView(){let e=this.liveDecls();return{at:Date.now(),gateway:this.gateway,decls:e,hostsSetup:this.hostsSetup(e),trustCommand:this.trustCommand(),serviceKeys:this.serviceKeyView(),services:[...this.services.values()].sort((t,r)=>t.project.localeCompare(r.project)),edges:[...this.edges.values()].sort((t,r)=>r.lastSeenAt-t.lastSeenAt),dataNodes:[...this.dataNodes.values()].sort((t,r)=>r.count-t.count).slice(0,24),recent:this.recent.slice(-20).reverse()}}gatewayLiveness(e=Date.now()){let t=this.opts.env??process.env,r=(t.LENSMCP_GATEWAY_PORTS??"").split(",").map(d=>Number(d.trim())).filter(d=>Number.isInteger(d)&&d>0),i=this.gateway?.ports??[],u=r.length?r:i,n=Number(t.LENSMCP_PARENT_PID??0);if(n>0)return rp(n)?{state:"live",role:"gateway-child",ports:u,since:this.gateway?.at,evidence:`served by the gateway process (pid ${n})`}:{state:"down",role:"gateway-child",ports:u,evidence:`the gateway that started this dashboard (pid ${n}) is gone`};if(i.length>0)return{state:"live",role:"standalone",ports:u,since:this.gateway?.at,evidence:"gateway-up event on this workspace\u2019s bus"};let a=this.registeredGateway(e);if(a)return{state:"live",role:"standalone",ports:u,evidence:`registered with the gateway daemon (pid ${a})`};let l=this.gateway?.aliveAt??0;return l>e-3e4?{state:"live",role:"standalone",ports:u,since:l,evidence:`gateway traffic ${Math.round((e-l)/1e3)}s ago`}:this.gateway?{state:"down",role:"standalone",ports:u,evidence:"no gateway traffic in the last 30s"}:{state:"unknown",role:"standalone",ports:u,evidence:"no gateway events seen \u2014 is this dashboard running without the gateway?"}}registeredGateway(e){if(e-this.registryCache.at<15e3)return this.registryCache.pid;let t;try{let r=`${(this.opts.env??process.env).LENSMCP_HOME||Px()}/.lensmcp/workspaces.json`,i=JSON.parse(Es(r,"utf8")),u=Array.isArray(i)?i.find(n=>n.root===this.opts.root):void 0;u&&typeof u.pid=="number"&&u.pid>0&&rp(u.pid)&&(!u.procStamp||X6(u.pid)===u.procStamp)&&(t=u.pid)}catch{}return this.registryCache={at:e,...t?{pid:t}:{}},t}view(e){let t=e.now??Date.now(),r=this.liveDecls(),i=this.hostsSetup(r),u=this.serviceKeyView(),n=new Map((e.processCluster?.services??[]).map(m=>[m.project,m])),a=new Map;for(let m of e.processCluster?.errors??[]){if(!m.project||!m.line)continue;let h=a.get(m.project)??[];h.push(m.line),a.set(m.project,h.slice(-6))}let l=[...this.edges.values()].filter(m=>!m.caller),d=r.map(m=>{let h=m.service?m.eager?"eager":"lazy":"web",E=this.services.get(m.project),D=n.get(m.project),{state:$,reason:A}=Y6(h,E,D,m.podNames.length),I=l.filter(N=>N.project===m.project),j=I.reduce((N,O)=>N+O.count,0),F=I.reduce((N,O)=>N+O.errors,0),b=I.slice().sort((N,O)=>O.lastSeenAt-N.lastSeenAt)[0],w=e.kpis?.projectStats(m.project,t),C=m.service&&m.internalHost!==!1&&m.host?typeof m.internalHost=="string"?m.internalHost:`internal.${m.host}`:void 0;return{project:m.project,kind:h,state:$,...A?{stateReason:A}:{},...m.host?{host:m.host}:{},...m.path?{path:m.path}:{},...C?{internalHost:C}:{},...m.port!==void 0?{port:m.port}:{},...m.internalPort!==void 0?{internalPort:m.internalPort}:{},pods:{running:m.podNames.length,names:m.podNames,...m.minPods!==void 0?{min:m.minPods}:{},...m.maxPods!==void 0?{max:m.maxPods}:{}},workers:m.workers??[],...E?.lastColdStartMs!==void 0?{lastColdStartMs:E.lastColdStartMs}:{},restarts:D?.restarts??0,buildFailed:D?.buildFailed??!1,errorLines:a.get(m.project)??[],...m.auth?{auth:{...m.auth.default?{default:m.auth.default}:{},overrides:m.auth.overrides?.length??0}}:{},traffic:{count:j,errors:F,avgMs:b?b.avgMs:null,...b?{lastSeenAt:b.lastSeenAt}:{}},...w?{window:w}:{},...u[m.project]?{keyFingerprint:u[m.project].fingerprint}:{},...E?{lastEvent:{at:E.lastEventAt,title:E.lastEvent}}:D?.lastTitle?{lastEvent:{at:D.lastSeenAt??0,title:D.lastTitle}}:{}}}).sort((m,h)=>H6[m.kind]-H6[h.kind]||m.project.localeCompare(h.project)),p=l.map(m=>({host:m.host,project:m.project,count:m.count,errors:m.errors,avgMs:m.avgMs,lastSeenAt:m.lastSeenAt})).sort((m,h)=>h.count-m.count);for(let m of r)m.host&&!p.some(h=>h.host===m.host&&h.project===m.project)&&p.push({host:m.host,project:m.project,count:0,errors:0,avgMs:null});let c=[...this.edges.values()].filter(m=>!!m.caller).map(m=>({caller:m.caller,callee:m.project,host:m.host,count:m.count,errors:m.errors,avgMs:m.avgMs,lastSeenAt:m.lastSeenAt})).sort((m,h)=>h.count-m.count),f=[...this.dataNodes.values()].filter(m=>m.kind!=="memory").map(m=>({id:m.id,kind:m.kind,name:m.name,usedBy:m.usedBy??(m.viaProject&&m.viaProject!=="unknown"?[m.viaProject]:[]),ops:m.count,lastSeenAt:m.lastSeenAt,...m.kind==="queue"&&(m.counts||m.recent)?{queue:{counts:m.counts??{},recent:(m.recent??[]).slice(0,8).map(h=>({id:String(h.id??""),...typeof h.name=="string"?{name:h.name}:{},...typeof h.state=="string"?{state:h.state}:typeof h.status=="string"?{state:h.status}:{},...typeof h.finishedOn=="number"?{at:h.finishedOn}:typeof h.timestamp=="number"?{at:h.timestamp}:{}}))}}:{}})).sort((m,h)=>h.ops-m.ops).slice(0,24),g=i.filter(m=>!m.v4||!m.v6);return{at:t,gateway:this.gatewayLiveness(t),services:d,routes:p,edges:c,backends:f,hosts:i,...g.length?{hostsFix:Q6(g)}:{},trustCommand:this.trustCommand(),recent:this.recent.slice(-20).reverse()}}},H6={web:0,eager:1,lazy:2},Zx="node_modules/.cache/davnx-webpack/service-keys.json";function X6(e){if(process.platform==="win32")return"";try{return Tx("ps",["-p",String(e),"-o","lstart="],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).trim()}catch{return""}}s(X6,"Cj"),o(X6,"processStamp");function rp(e){if(process.ppid===e)return!0;try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(rp,"N$"),o(rp,"pidAlive");function Y6(e,t,r,i){let u=r?.state;return u==="crash-looping"?{state:"crash-looping",reason:"keeps exiting right after start"}:u==="wedged"?{state:"wedged",reason:"running but not answering"}:r?.buildFailed?{state:"down",reason:"build failed \u2014 see the error lines"}:u==="up"||t?.state==="up"?{state:"up"}:u==="starting"||t?.state==="starting"?{state:"starting",reason:e==="lazy"?"cold start in progress":"starting"}:!u&&!t&&i>0?{state:"up",reason:`${i} pod socket${i===1?"":"s"} live`}:u==="idle"||t?.idle||e==="lazy"&&(u==="down"||t?.state==="down"||!t)?{state:"idle",reason:"scaled to zero \u2014 starts on the next request"}:u==="down"||t?.state==="down"?{state:"down",reason:"not running"}:{state:"unknown",reason:"no lifecycle events seen yet"}}s(Y6,"Uj"),o(Y6,"serviceState");function Q6(e){let t=e.filter(i=>!i.v4).map(i=>i.host),r=e.filter(i=>!i.v6).map(i=>i.host);return`printf '${[...t.length?[`127.0.0.1 ${t.join(" ")}`]:[],...r.length?[`::1 ${r.join(" ")}`]:[]].join("\\n")}\\n' | sudo tee -a /etc/hosts`}s(Q6,"Lj"),o(Q6,"hostsFixCommand");var qx=class{static{s(this,"fa")}static{o(this,"LogRing")}constructor(e=5e3){this.cap=e,this.lines=[],this.seqN=0,this.sourceSet=new Set}get seq(){return this.seqN}get size(){return this.lines.length}sources(){return[...this.sourceSet].sort()}append(e){let t=ey(e,++this.seqN);return this.sourceSet.add(t.source),this.lines.push(t),this.lines.length>this.cap+Math.ceil(this.cap/10)&&this.lines.splice(0,this.lines.length-this.cap),t}since(e,t=this.cap){let r=this.indexAfter(e),i=this.lines.slice(r);return i.length>t?i.slice(i.length-t):i}recent(e){return this.lines.slice(Math.max(0,this.lines.length-e))}query(e){let t=e.limit??2e3,r=e.q?.toLowerCase(),i=e.since&&e.since>0?this.lines.slice(this.indexAfter(e.since)):this.lines,u=[];for(let n=i.length-1;n>=0&&u.length<t;n--){let a=i[n];e.flowId&&a.flowId!==e.flowId||e.from!==void 0&&a.at<e.from||e.to!==void 0&&a.at>e.to||r&&!`${a.title} ${a.message??""} ${a.source}`.toLowerCase().includes(r)||u.push(a)}return u.reverse()}indexAfter(e){let t=0,r=this.lines.length;for(;t<r;){let i=t+r>>>1;this.lines[i].seq<=e?t=i+1:r=i}return t}};function ey(e,t){let r=e.raw??{},i=e.context??{},u=typeof r.project=="string"&&r.project?r.project:e.source,n=typeof i.flowId=="string"?i.flowId:typeof i.traceId=="string"?i.traceId:void 0;return{seq:t,at:e.timestamp,source:u,category:e.category,severity:e.severity,title:e.title,...e.message?{message:e.message}:{},...n?{flowId:n}:{}}}s(ey,"Fj"),o(ey,"logLineOf");var ty=class{static{s(this,"bo")}static{o(this,"SeenIds")}constructor(e=5e4){this.cap=e,this.set=new Set,this.order=[]}firstTime(e){if(!e)return!0;if(this.set.has(e))return!1;if(this.set.add(e),this.order.push(e),this.order.length>this.cap)for(let t of this.order.splice(0,this.order.length-this.cap))this.set.delete(t);return!0}},uy=class{static{s(this,"ma")}static{o(this,"Series")}constructor(e){this.horizonSec=e,this.buckets=new Map}bucket(e){let t=this.buckets.get(e);return t||(t={sec:e,count:0,errors:0,lat:[],latReq:[]},this.buckets.set(e,t)),t}addTraffic(e,t,r){let i=this.bucket(e);i.count+=t,i.errors+=r}addLatency(e,t,r){let i=this.bucket(e),u=r?i.lat:i.latReq;u.length<256&&u.push(t)}prune(e){for(let t of this.buckets.keys())t<=e-this.horizonSec&&this.buckets.delete(t)}range(e,t){let r=[];for(let i of this.buckets.values())i.sec>e&&i.sec<=t&&r.push(i);return r}},Lx=class{static{s(this,"ga")}static{o(this,"KpiWindow")}constructor(e={}){this.byProject=new Map,this.windowSec=e.windowSec??300,this.sparkBuckets=e.sparkBuckets??30,this.sparkBucketSec=e.sparkBucketSec??10,this.horizonSec=Math.max(this.windowSec,this.sparkBuckets*this.sparkBucketSec)+5,this.global=new uy(this.horizonSec)}project(e){let t=this.byProject.get(e);return t||(t=new uy(this.horizonSec),this.byProject.set(e,t)),t}observe(e){if(e.source!=="gateway")return;let t=e.raw??{},r=t.kind,i=Math.floor(e.timestamp/1e3),u=typeof t.project=="string"?t.project:"",n=typeof t.caller=="string"&&t.caller?t.caller:void 0;if(r==="gateway-traffic"){let a=np(t.count),l=np(t.errors);if(a===0&&l===0)return;n||this.global.addTraffic(i,a,l),u&&this.project(u).addTraffic(i,a,l);let d=Array.isArray(t.durationsMs)?t.durationsMs:[];for(let p of d){let c=Number(p);!Number.isFinite(c)||c<0||(n||this.global.addLatency(i,c,!0),u&&this.project(u).addLatency(i,c,!0))}}else if(r==="gateway-request"){let a=Number(t.durationMs);if(!Number.isFinite(a)||a<0)return;n||this.global.addLatency(i,a,!1),u&&this.project(u).addLatency(i,a,!1)}}snapshot(e=Date.now()){let t=Math.floor(e/1e3);this.global.prune(t);for(let u of this.byProject.values())u.prune(t);let r=this.global,i=ap(r,t,this.sparkBuckets,this.sparkBucketSec);return{at:e,windowSec:this.windowSec,req60:Rt(r.range(t-60,t),"count"),last:sp(r.range(t-this.windowSec,t)),sparkBucketSec:this.sparkBucketSec,spark:i}}projectStats(e,t=Date.now()){let r=this.byProject.get(e);if(!r)return;let i=Math.floor(t/1e3);return r.prune(i),{...sp(r.range(i-this.windowSec,i)),req60:Rt(r.range(i-60,i),"count"),spark:ap(r,i,this.sparkBuckets,this.sparkBucketSec).req}}};function np(e){let t=Number(e??0);return Number.isFinite(t)&&t>0?t:0}s(np,"P$"),o(np,"nonNeg");function Rt(e,t){let r=0;for(let i of e)r+=i[t];return r}s(Rt,"Qr"),o(Rt,"sum");function ip(e){let t=[];for(let i of e)for(let u of i.lat)t.push(u);if(t.length)return{lat:t.sort((i,u)=>i-u),complete:!0};let r=[];for(let i of e)for(let u of i.latReq)r.push(u);return{lat:r.sort((i,u)=>i-u),complete:!1}}s(ip,"C$"),o(ip,"latencies");function sp(e){let t=Rt(e,"count"),r=Rt(e,"errors"),{lat:i,complete:u}=ip(e),n=i.length?i.reduce((a,l)=>a+l,0)/i.length:null;return{count:t,errors:r,errorRate:t>0?r/t:null,p50:bs(i,.5),p95:bs(i,.95),avgMs:n===null?null:Math.round(n),samples:i.length,sampled:!u||i.length<t}}s(sp,"D$"),o(sp,"statsOf");function bs(e,t){if(e.length===0)return null;let r=Math.min(e.length-1,Math.max(0,Math.ceil(t*e.length)-1));return Math.round(e[r])}s(bs,"sy"),o(bs,"percentile");function ap(e,t,r,i){let u=[],n=[],a=[];for(let l=r-1;l>=0;l--){let d=t-l*i,p=e.range(d-i,d);u.push(Rt(p,"count")),n.push(Rt(p,"errors")),a.push(bs(ip(p).lat,.95))}return{req:u,errors:n,p95:a}}s(ap,"M$"),o(ap,"sparkOf");var Jx=class{static{s(this,"ha")}static{o(this,"FlowIndex")}constructor(e={flows:2e3,events:5e4},t=lt){this.caps=e,this.config=t,this.revs=new Map,this.pending=new Set,this.eventFlow=new Map,this.cache=new Map,this.evidenceCache=new Map}observe(e){let t=op(e);if(!t)return;let r=(this.revs.get(t)??0)+1;this.revs.delete(t),this.revs.set(t,r),this.revs.size>this.caps.flows&&this.revs.delete(this.revs.keys().next().value),this.pending.add(t),e.id&&(this.eventFlow.set(e.id,t),this.eventFlow.size>this.caps.events&&this.eventFlow.delete(this.eventFlow.keys().next().value))}rev(e){return this.revs.get(e)??0}drainRevs(){let e=[...this.pending].map(t=>({flowId:t,rev:this.rev(t)}));return this.pending.clear(),e}flowOfEvent(e){return this.eventFlow.get(e)}summaries(e,t=50){if(!e)return[];let r=[];for(let u of e.recentFlowIds().slice(0,t)){let n=this.rev(u),a=this.cache.get(u);if(a&&a.rev===n&&n>0){r.push(a.summary);continue}let l=e.getFlowSummary(u);if(!l)continue;let d=e.getFlowEvents(u)??[],p=e.analyzeFlow?.(u)??(d.length?xi(d,this.config):void 0),c=ly(l,d,n,p);this.cache.set(u,{rev:n,summary:c}),r.push(c)}let i=new Set(r.map(u=>u.flowId));for(let u of this.cache.keys())i.has(u)||this.cache.delete(u);return r.sort((u,n)=>n.lastSeenAt-u.lastSeenAt)}evidence(e,t=50){let r=[];if(e){for(let i of e.recentFlowIds().slice(0,t)){let u=this.rev(i),n=this.evidenceCache.get(i);if(n&&n.rev===u&&u>0){r.push(...n.samples);continue}let a=ry(i,e.getFlowEvents(i)??[]);this.evidenceCache.set(i,{rev:u,samples:a}),r.push(...a)}if(this.evidenceCache.size>t*2){let i=new Set(e.recentFlowIds().slice(0,t));for(let u of this.evidenceCache.keys())i.has(u)||this.evidenceCache.delete(u)}}return new Vx(r)}findByRoute(e,t,r){let i=Ds(r);return e.find(u=>u.request&&u.request.method===t&&i.test(u.request.path))?.flowId}};function ry(e,t){let r=[],i=new Map;for(let n of t){let a=n.raw??{};if(a.kind==="server-request"&&n.id){let l=a.request??{},d=iy(n)??(typeof l.requestId=="string"?l.requestId:void 0);if(!d)continue;let p=typeof l.endedAt=="number"?l.endedAt:ny(n),c=typeof l.startedAt=="number"?l.startedAt:p-(typeof l.durationMs=="number"?l.durationMs:0);i.set(d,[...i.get(d)??[],{id:n.id,start:c,end:p}])}}let u=o((n,a)=>{let l=n?i.get(n):void 0;if(l?.length)return l.length===1?l[0].id:l.filter(d=>d.start-5<=a&&a<=d.end+5).sort((d,p)=>p.start-d.start)[0]?.id},"handlerAt");for(let n of t){if(!n.id)continue;let a=n.raw??{},l=ny(n),d=o(c=>typeof c=="number"&&Number.isFinite(c)?c:0,"num"),p=a.kind;if(p==="server-request"){let c=a.request??{};if(typeof c.route!="string")continue;r.push({key:`route:${String(c.method??"GET")} ${c.route}`,flowId:e,eventId:n.id,ms:d(c.durationMs),at:l,failed:d(c.status)>=500})}else if(p==="db-query"&&typeof a.project=="string"){let c=`${String(a.op??"query")} ${String(a.table??"")}`.trim(),f=n.title.replace(/\s*\(.*$/,"").trim();for(let g of new Set([c,f]))r.push({key:`sql:${a.project}:${g}`,flowId:e,eventId:n.id,ms:d(a.durationMs),at:l,failed:n.severity==="error"})}else if(p==="egress"&&typeof a.project=="string"&&typeof a.host=="string"){let c=typeof a.error=="string"||d(a.status)>=500||n.severity==="error";r.push({key:`egress:${a.project}:${a.host}`,flowId:e,eventId:n.id,ms:d(a.durationMs),at:l,failed:c})}else if(p==="memory-mutation"){let c=(a.mutation??{}).ownerNodeId;if(typeof c!="string")continue;r.push({key:`mem:${c}`,flowId:e,eventId:u(iy(n),l)??n.id,ms:0,at:l,failed:!1})}}return r}s(ry,"Zj"),o(ry,"evidenceSamples");var ny=o(e=>typeof e.timestamp=="number"?e.timestamp:Date.parse(String(e.timestamp))||0,"tsOf"),iy=o(e=>{let t=e.context??{};return typeof t.requestId=="string"&&t.requestId?t.requestId:void 0},"requestIdOf"),Vx=class{static{s(this,"ay")}static{o(this,"EvidenceLookup")}constructor(e){this.samples=e}find(e,t,r={}){let i;for(let u of this.samples)!e(u.key)||r.inFlow!==void 0&&u.flowId!==r.inFlow||t==="failing"&&!u.failed||r.minMs!==void 0&&u.ms<r.minMs||(i?(t==="slowest"?u.ms>i.ms||u.ms===i.ms&&u.at>i.at:u.at>i.at)&&(i=u):i=u);return i?{flowId:i.flowId,nodeId:i.eventId}:void 0}};function op(e){let t=e.context??{};return typeof t.flowId=="string"&&t.flowId?t.flowId:void 0}s(op,"cy"),o(op,"flowIdOf");function Ds(e){let t=e.split("/").map(r=>r.startsWith(":")?"[^/?#]+":r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("/");return new RegExp(`^${t}(?:[?#].*)?$`)}s(Ds,"va"),o(Ds,"routeRegex");var Wx=new Set(["memory-mutation","memory-retention","singleton-instance","subscription-added","subscription-removed","store-created","hook-run"]),Gx={"user-click":"click","user-input":"input","input-change":"input",keyboard:"key press","route-load":"navigate","page-load":"page load","form-submit":"submit",effect:"effect",timer:"timer","websocket-message":"socket message","backend-response":"response","hmr-update":"hot reload","ai-turn":"AI turn"};function sy(e){return e?Gx[e]??e.replace(/-/g," "):"request"}s(sy,"Vj"),o(sy,"originLabelOf");function ay(e){if(!e)return;if(e.startsWith("page:"))return e.slice(5)||"/";let t=/([^/:]+\.[cm]?[jt]sx?):(\d+)/.exec(e);if(t)return`${t[1]}:${t[2]}`;let r=e.replace(/^[a-z]+:/,"");return r.length>40?"\u2026"+r.slice(-39):r}s(ay,"Gj"),o(ay,"originWhereOf");function oy(e){let t=wi.indexOf(e);return t===-1?wi.length:t}s(oy,"Jj"),o(oy,"categoryRankOf");function ly(e,t,r,i){let u={},n=new Set,a="ok",l,d=1/0,p,c=1/0,f=1/0,g=-1/0,m=new Set,h=0,E=0,D,$=o(N=>{(N==="error"||N==="warn"&&a==="ok")&&(a=N)},"bump");for(let N of t){let O=N.raw??{},te=N.context??{},ne=typeof O.kind=="string"?O.kind:void 0,ht=jl({source:N.source,category:N.category,title:N.title,kind:ne});u[ht]=(u[ht]??0)+1;let We=typeof O.project=="string"?O.project:typeof te.projectName=="string"?te.projectName:void 0;We&&N.source!=="gateway"&&n.add(We),N.severity==="error"||N.severity==="fatal"?($("error"),E++,(!D||N.timestamp<D.at)&&(D={at:N.timestamp,title:N.title})):N.severity==="warning"&&$("warn");let Me=Number(O.status??O.request?.status);if(Number.isFinite(Me)&&(Me>=500?$("error"):Me>=400&&$("warn")),(ne==="fetch-start"||ne==="fetch-done"||ne==="fetch-error")&&typeof O.url=="string"){let je=Number(O.startedAt??N.timestamp);(je<d||je===d&&l&&l.status===void 0)&&(d=je,l={method:String(O.method??"GET"),path:O.url,...Number.isFinite(Me)?{status:Me}:l?.status!==void 0?{status:l.status}:{}})}if(m.size<80)if(ne==="gateway-request"&&typeof O.url=="string")m.add(`${String(O.method??"GET")} ${lp(O.url)}`);else if(ne==="server-request"){let je=O.request??{};typeof je.route=="string"&&m.add(`${String(je.method??"GET")} ${je.route}`)}else ne==="db-query"&&We?m.add(`sql:${We}:${N.title.replace(/\s*\(.*$/,"")}`):ne==="egress"&&We&&typeof O.host=="string"&&m.add(`egress:${We}:${O.host}`);if(ne==="gateway-request"&&!O.caller&&N.source==="gateway"&&h++,ne==="gateway-request"&&!O.caller&&typeof O.url=="string"&&N.timestamp<c&&(c=N.timestamp,p={method:String(O.method??"GET"),path:O.url,...Number.isFinite(Me)?{status:Me}:{}}),ne&&Wx.has(ne))continue;let vt=Number(O.durationMs??O.request?.durationMs??0),et=Number(O.startedAt),ku=Number.isFinite(et)&&et>0?et:N.timestamp-(Number.isFinite(vt)?vt:0),yt=Number.isFinite(et)&&et>0&&Number.isFinite(vt)?et+vt:N.timestamp;ku<f&&(f=ku),yt>g&&(g=yt)}!l&&p&&(l=p);let A=sy(e.originType),I=ay(e.originNodeId),j=l?`${l.method} ${lp(l.path)}`:void 0,F=e.headline&&e.headline!==e.originType?e.headline:void 0,b=!e.originType&&h>1?` +${h-1} more request${h===2?"":"s"}`:"",w=e.originType?`${A}${I?` \xB7 ${I}`:""}`:j?`${j}${b}`:F??A,C=e.originType&&j?`${w} \u2192 ${j}`:w;return{flowId:e.flowId,...e.originType?{originType:e.originType}:{},...e.originNodeId?{originNodeId:e.originNodeId}:{},startedAt:e.startedAt,lastSeenAt:e.lastSeenAt,eventCount:e.eventCount,headline:C,originLabel:A,...I?{originWhere:I}:{},...l?{request:l}:{},worst:a,durationMs:Number.isFinite(f)&&g>=f?Math.round(g-f):0,lanes:u,projects:[...n].sort(),rev:r,...h?{requestCount:h}:{},...E?{errorCount:E,firstError:cy(D.title)}:{},...m.size?{touches:[...m]}:{},...i?dy(i):{}}}s(ly,"Kj"),o(ly,"summarizeFlow");function dy(e){let t=e.classification,r=e.segmentation.stats;return{category:t.category,categoryRank:oy(t.category),decidedBy:t.decidedBy,...t.subject?{subject:t.subject}:{},tags:t.tags,segmentCount:r.segments,phaseCount:r.phases,signalCount:r.signal}}s(dy,"Wj"),o(dy,"analysisFields");function cy(e){return e.replace(/\s*✗\s*$/,"").replace(/\s*\((?:\d+ rows?, )?[\d.]+ ?ms\)$/,"")}s(cy,"Xj"),o(cy,"cleanTitle");function lp(e){let t=e.indexOf("?");return t>=0?e.slice(0,t):e}s(lp,"F$"),o(lp,"stripQuery");function dp(e,t){return{id:e.id,kind:e.kind,label:e.label,phase:e.phase,start:e.start,end:e.end,durationMs:e.durationMs,counts:e.counts,projects:e.projects,...e.method?{method:e.method}:{},...e.route?{route:e.route}:{},...e.requestId?{requestId:e.requestId}:{},...e.after?{after:e.after}:{},...e.hot?{hot:e.hot}:{},...e.part?{part:e.part}:{},worstSeverity:e.worstSeverity,category:t}}s(dp,"Z$"),o(dp,"toDashSegment");function py(e,t,r){if(!e)return{flowId:t,summary:null,events:[],rev:r.rev};let i=e.getFlowSummary(t)??null,u=e.getFlowEvents(t)??[],n=e.analyzeFlow?.(t)??(u.length?xi(u,r.config??lt):void 0),a,l=u;if(r.segmentId!==void 0){a=n?.segmentation.segments.find(h=>h.id===r.segmentId);let m=new Set(a?.eventIds??[]);l=u.filter(h=>m.has(h.id))}let d=Di(l,{includeRaw:r.includeRaw===!0}),p={flowId:t,summary:i,...d,rev:r.rev};if(!n)return p;let c=n.segmentation.assignment;p.events=p.events.map(m=>{let h=c[m.id]??(m.memberIds?.[0]?c[m.memberIds[0]]:void 0);return h?{...m,segmentId:h}:m});let f=o(m=>n.segmentCategories[m.id]??"other","category");p.segments=n.segmentation.segments.map(m=>dp(m,f(m))),p.phases=n.segmentation.phases,p.segmentCategories=n.segmentCategories,p.segmentStats=n.segmentation.stats;let g=n.classification;return p.classification={category:g.category,decidedBy:g.decidedBy,...g.ruleIndex!==void 0?{ruleIndex:g.ruleIndex}:{},...g.subject?{subject:g.subject}:{},tags:g.tags,origin:g.origin},a&&(p.focus=dp(a,f(a))),p}s(py,"B$"),o(py,"flowDetailPayload");var my=["graph://patterns","perf://slow-routes","perf://duplicate-requests","db://slow-queries","db://analysis","memory://leaks/suspected","memory://owners/growing","memory://current","react://components/hot","runtime://errors","runtime://browser/errors","trace://failed","net://egress/hosts","typecheck://current","typecheck://errors","build://current","build://failures","lint://current","process://cluster","visual://violations/current"],ce=o(e=>e&&typeof e=="object"?e:{},"obj"),pe=o(e=>Array.isArray(e)?e.filter(t=>t&&typeof t=="object"):[],"arr"),R=o(e=>typeof e=="string"&&e?e:void 0,"str"),M=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"num");function fy(e){let t=e.resources,r=[],i=o(b=>{for(let w of b){let C=e.flowOfEvent(w);if(C)return{flowId:C,nodeId:w,eventIds:b.slice(0,50)}}return b.length?{eventIds:b.slice(0,50)}:void 0},"evidenceOf"),u=o((b,w)=>{let C=Ds(w),N=o(O=>O.startsWith(`${b} `)&&C.test(O.slice(b.length+1)),"hit");return e.flows.find(O=>O.request&&O.request.method===b&&C.test(O.request.path)||O.touches?.some(N))?.flowId},"flowForRoute"),n=o(b=>e.flows.find(w=>w.touches?.includes(b))?.flowId,"flowTouching"),a=o((b,w)=>b?{flowId:b.flowId,nodeId:b.nodeId}:w?{flowId:w}:void 0,"at"),l=o((b,w)=>{let C=Ds(w),N=`route:${b} `;return O=>O.startsWith(N)&&(O.slice(N.length)===w||C.test(O.slice(N.length)))},"routeKey");for(let b of pe(ce(t["graph://patterns"]).patterns)){let w=R(b.kind),C=ce(b.details),N=(Array.isArray(b.evidence)?b.evidence:[]).filter(ht=>typeof ht=="string"),O=R(b.title)??w??"pattern",te=w==="n+1-query"?"n-plus-one":w==="db-in-loop"?"db-in-loop":w==="render-storm"?"render-storm":w==="slow-path"?"slow-path":w==="leak"?"leak":"other",ne=R(C.signature)??R(C.componentInstanceId)??O;r.push({id:`graph:${w}:${ne}`,kind:te,severity:b.severity==="error"?"high":"medium",title:O,...R(C.signature)?{code:R(C.signature)}:{},...te==="render-storm"&&R(C.componentInstanceId)?{where:cp(R(C.componentInstanceId))}:{},detail:Dy(te,C),...M(C.count)!==void 0?{count:M(C.count)}:M(C.dbCallsInsideLoop)!==void 0?{count:M(C.dbCallsInsideLoop)}:{},evidence:i(N),resource:"graph://patterns",at:M(b.detectedAt)})}let d=ce(t["perf://slow-routes"]),p=M(d.thresholdMs)??500;for(let b of pe(d.routes)){let w=R(b.method)??"GET",C=R(b.route)??"?",N=M(b.worstRecentMs)??0,O=a(e.evidence?.find(l(w,C),"latest",{minMs:p})??e.evidence?.find(l(w,C),"slowest"),u(w,C));r.push({id:`perf:slow-route:${w} ${C}`,kind:"slow-route",severity:N>=p*3?"high":"medium",title:`${w} ${C} is slow`,where:`${w} ${C}`,detail:`worst ${Te(N)} recently \u2014 ${M(b.recentSlowSamples)??0} of the last ${Math.min(M(b.samples)??0,M(d.recentSampleWindow)??20)} calls over the ${Te(p)} budget (last call ${Te(M(b.lastDurationMs)??0)})`,count:M(b.slowSamples),...O?{evidence:O}:{},resource:"perf://slow-routes",at:M(b.lastSeenAt)})}for(let b of pe(ce(t["perf://duplicate-requests"]).endpoints)){let w=R(b.method)??"GET",C=R(b.url)??"?";r.push({id:`perf:dup:${w} ${C}`,kind:"duplicate-requests",severity:"medium",title:`${w} ${C} fired ${M(b.peakConcurrent)??"?"}\xD7 at once`,where:`${w} ${C}`,detail:`${M(b.peakConcurrent)??"?"} identical requests in flight together \u2014 the browser asked for the same thing repeatedly`,count:M(b.totalRequests),resource:"perf://duplicate-requests",at:M(b.lastSeenAt)})}let c=ce(t["db://slow-queries"]),f=M(c.thresholdMs)??100;for(let b of pe(c.queries)){let w=M(b.p95Ms)??0,C=M(b.maxMs)??0,N=`${R(b.op)??"query"} ${R(b.table)??""}`.trim();r.push({id:`db:slow:${R(b.project)??"?"}:${N}`,kind:"slow-query",severity:w>=f*5?"high":w>=f?"medium":"low",title:w>=f?`Slow query: ${N}`:`Occasionally slow query: ${N}`,where:`${R(b.project)??"?"} \xB7 ${N}`,detail:`p95 ${Te(w)} \xB7 max ${Te(C)} \xB7 avg ${Te(M(b.avgMs)??0)} over ${M(b.count)??0} runs (budget ${Te(f)})`,...R(b.lastSql)?{code:R(b.lastSql)}:{},count:M(b.count),...(()=>{let O=`sql:${R(b.project)??"?"}:${N}`,te=a(e.evidence?.find(ne=>ne===O,"latest",{minMs:f})??e.evidence?.find(ne=>ne===O,"slowest"),n(O));return te?{evidence:te}:{}})(),resource:"db://slow-queries",at:M(b.lastSeenAt)})}for(let b of pe(ce(t["db://analysis"]).runs))for(let w of pe(b.findings)){let C=R(w.kind)??"finding";r.push({id:`db:analysis:${R(b.project)??"?"}:${C}:${R(w.table)??""}`,kind:C==="missing-index"?"missing-index":"slow-query",severity:w.severity==="error"?"high":w.severity==="info"?"low":"medium",title:`${C.replace(/-/g," ")} on ${R(w.table)??"a table"}`,where:`${R(b.project)??"?"} \xB7 ${R(w.table)??""}`,...R(w.detail)?{detail:R(w.detail)}:{},resource:"db://analysis",at:M(b.runAt)})}let g=new Map;for(let b of pe(ce(t["memory://leaks/suspected"]).suspected)){let w=R(b.ownerId)??"?",C=g.get(w);(!C||(M(b.at)??0)>=(M(C.at)??0))&&g.set(w,b)}for(let b of g.values()){let w=R(b.ownerId)??"?",C=ce(b.detail),N=R(b.flowId),O=a(N?e.evidence?.find(te=>te===`mem:${w}`,"latest",{inFlow:N}):void 0,N);r.push({id:`memory:leak:${pp(w)}`,kind:"leak",severity:"high",title:`Suspected leak: ${pp(w)}`,where:w,detail:`grew by ${M(C.growth)??"?"} (${M(C.startCount)??"?"} \u2192 ${M(C.endCount)??"?"}) during one flow and did not shrink`,...O?{evidence:O}:{},resource:"memory://leaks/suspected",at:M(b.at)})}let m=new Map;for(let b of pe(ce(t["runtime://errors"]).entries)){let w=R(b.fingerprint)??R(b.title)??"?",C=m.get(w),N=!C||(M(b.timestamp)??0)>(M(C.e.timestamp)??0),O=N?R(b.stack)??C?.stack:C?.stack??R(b.stack);m.set(w,{e:N?b:C.e,n:(C?.n??0)+1,...O?{stack:O}:{}})}let h=new Set;for(let[b,{e:w,n:C,stack:N}]of m){let O=R(w.id),te=R(w.requestId);te&&h.add(te),r.push({id:`runtime:server:${b}`,kind:"server-error",severity:"high",title:R(w.title)??"Server error",where:[R(w.source),R(w.route)].filter(Boolean).join(" \xB7 ")||void 0,...R(w.message)?{detail:R(w.message)}:{},...N?{code:mp(N)}:{},count:C,evidence:i(O?[O]:[]),resource:"runtime://errors",at:M(w.timestamp)})}let E=new Map;for(let b of pe(ce(t["runtime://browser/errors"]).entries)){let w=R(b.fingerprint)??R(b.title)??R(b.message)??"?",C=E.get(w);E.set(w,{e:C&&(M(C.e.timestamp)??0)>(M(b.timestamp)??0)?C.e:b,n:(C?.n??0)+1})}for(let[b,{e:w,n:C}]of E){let N=R(w.id);r.push({id:`runtime:browser:${b}`,kind:"browser-error",severity:"high",title:R(w.title)??R(w.message)??"Browser error",...R(w.url)?{where:R(w.url)}:{},...R(w.message)&&R(w.message)!==R(w.title)?{detail:R(w.message)}:{},...R(w.stack)?{code:mp(R(w.stack))}:{},count:C,evidence:i(N?[N]:[]),resource:"runtime://browser/errors",at:M(w.timestamp)})}let D=new Map;for(let b of pe(ce(t["trace://failed"]).spans)){let w=R(b.name)??"?";if(w.startsWith("nest.request ")||R(b.requestId)&&h.has(R(b.requestId)))continue;let C=D.get(w);D.set(w,{s:C&&(M(C.s.startTime)??0)>(M(b.startTime)??0)?C.s:b,n:(C?.n??0)+1})}for(let[b,{s:w,n:C}]of D){let N=R(w.id);r.push({id:`trace:failed:${b}`,kind:"failed-span",severity:"medium",title:`${b} failed`,where:b,count:C,evidence:i(N?[N]:[])??(R(w.flowId)?{flowId:R(w.flowId)}:void 0),resource:"trace://failed",at:M(w.startTime)})}for(let b of pe(ce(t["net://egress/hosts"]).hosts)){let w=R(b.host)??"?",C=R(b.project)??"?",N=pe(b.endpoints).find(O=>(M(O.errorCount)??0)+(M(O.status5xx)??0)>0);b.failing===!0?r.push({id:`net:failing:${C}:${w}`,kind:"egress-failing",severity:"high",title:`Calls to ${w} are failing`,where:`${C} \u2192 ${w}`,detail:R(b.detail)??`${M(b.errorCount)??0} errors, ${M(b.status5xx)??0}\xD7 5xx`,...N?{code:`${R(N.method)??"GET"} ${w}${R(N.path)??""}${R(N.lastError)?`
|
|
72
|
+
`);return u>0&&l.shift(),l.slice(-r)}s(W6,"z$"),o(W6,"readEventTailLines");import{execFileSync as Tx}from"node:child_process";import{createHash as Mx}from"node:crypto";import{readdirSync as G6,readFileSync as bs}from"node:fs";import{homedir as Px}from"node:os";var K6=new Set(["db","redis","queue","memory","external","fs","exec"]);function Qe(e){let t=Number(e??0);return Number.isFinite(t)&&t>=0?t:0}s(Qe,"Rt"),o(Qe,"finite");var Ux=class{static{s(this,"fa")}static{o(this,"ClusterState")}constructor(e){this.opts=e,this.gateway=null,this.services=new Map,this.edges=new Map,this.recent=[],this.dataNodes=new Map,this.declCache={at:0,decls:[]},this.registryCache={at:0}}reduce(e){if(K6.has(e.source)){let u=e.raw??{},n=e.context??{},a=String(u.queue??u.store??u.name??e.source),l=n.projectName??u.project,d=typeof l=="string"&&l?l:void 0,p=e.source+":"+a,c=this.dataNodes.get(p),f=u.kind==="queue-state",g=u.kind==="fs-ops"?Qe(u.reads)+Qe(u.writes):f?0:1,m=new Set(c?.usedBy??[]);d&&m.add(d),this.dataNodes.set(p,{id:p,kind:e.source,name:a,viaProject:c?.viaProject??d??"unknown",usedBy:[...m].sort(),count:(c?.count??0)+g,lastSeenAt:e.timestamp,counts:f?u.counts:c?.counts,recent:f?u.recent:c?.recent}),this.opts.onChange?.();return}if(e.source!=="gateway")return;let t=e.raw??{},r=typeof t.kind=="string"?t.kind:"",i=e.timestamp;if(r==="gateway-up")this.gateway={at:i,ports:t.ports??[],routes:t.routes??[]};else if(r==="gateway-down")this.gateway&&(this.gateway={...this.gateway,ports:[]});else if(r==="gateway-traffic"){this.gateway||(this.gateway={at:i,ports:[],routes:[]}),this.gateway.aliveAt=i;let u=String(t.host??""),n=String(t.project??""),a=typeof t.caller=="string"?t.caller:void 0,l=(a?a+"\u21D2":"")+u+"\u2192"+n,d=this.edges.get(l);this.edges.set(l,{host:u,project:n,caller:a,count:(d?.count??0)+Qe(t.count),avgMs:Qe(t.avgMs),errors:(d?.errors??0)+Qe(t.errors),lastSeenAt:i})}else if(r.startsWith("service-")||r==="cold-start"||r==="autoscale"||r==="idle-kill"){let u=String(t.project??"");if(!u)return;let n=this.services.get(u),a={project:u,state:n?.state??"unknown",pods:n?.pods,lastColdStartMs:n?.lastColdStartMs,lastEventAt:i,lastEvent:e.title};r==="service-starting"&&(a.state="starting"),r==="service-up"&&(a.state="up",a.pods=Qe(t.pods??a.pods)),r==="cold-start"&&(a.state="up",a.pods=Qe(t.pods??a.pods),typeof t.durationMs=="number"&&(a.lastColdStartMs=t.durationMs)),r==="autoscale"&&(a.pods=Qe(t.to??a.pods)),(r==="service-down"||r==="idle-kill")&&(a.state="down",a.pods=0,r==="idle-kill"&&(a.idle=!0)),this.services.set(u,a)}this.recent.push({at:i,title:e.title,severity:e.severity}),this.recent.length>40&&this.recent.splice(0,this.recent.length-40),this.opts.onChange?.()}discoverDecls(){if(Date.now()-this.declCache.at<1e4)return this.declCache.decls;let e=[],t,r=o((i,u)=>{if(u>4)return;let n;try{n=G6(i,{withFileTypes:!0})}catch{return}for(let a of n){if(a.name==="node_modules"||a.name.startsWith("."))continue;let l=`${i}/${a.name}`;if(a.isDirectory())r(l,u+1);else if(a.name==="project.json")try{let d=JSON.parse(bs(l,"utf8")),p=d.targets??{};!t&&/cluster:trust$/.test(p.trust?.executor??"")&&(t=String(d.name??""));let c=d.cluster??d.davnx;if(!c)continue;let f=p["serve-hmr"]?.options?.internalPort,g=(p["serve-hmr"]?.options?.workers??[]).map(h=>h.name),m=typeof c.service=="string"?c.service:void 0;e.push({project:String(d.name??l),host:c.host,path:c.path,internalHost:c.internalHost,service:m,port:c.port,upstream:c.upstream,prependPrefix:c.prependPrefix,default:c.default,internalPort:f,workers:g,podNames:m?this.podNames(m):[],eager:c.eager,minPods:c.minPods,maxPods:c.maxPods,auth:c.auth})}catch{}}},"walk");return r(this.opts.root,0),this.declCache={at:Date.now(),decls:e,...t?{trustProject:t}:{}},e}trustCommand(){return this.discoverDecls(),`yarn nx run ${this.declCache.trustProject||"gateway"}:trust`}podNames(e){try{return G6(this.opts.podSockDir(e)).filter(t=>t.endsWith(".sock")).map(t=>t.replace(".sock","")).sort()}catch{return[]}}hostsSetup(e){let t="";try{t=(this.opts.readHosts??(()=>bs("/etc/hosts","utf8")))()}catch{}let r=t.split(`
|
|
73
|
+
`).map(n=>n.trim()).filter(n=>n&&!n.startsWith("#")).map(n=>n.split(/\s+/)),i=o((n,a)=>r.some(l=>l[0]===n&&l.slice(1).includes(a)),"has"),u=[];for(let n of e)n.host&&!n.host.includes("*")&&(u.push(n.host),n.service&&n.internalHost!==!1&&u.push(typeof n.internalHost=="string"?n.internalHost:`internal.${n.host}`));return[...new Set(u)].map(n=>({host:n,v4:i("127.0.0.1",n),v6:i("::1",n)}))}serviceKeyView(){let e;try{e=JSON.parse(bs(`${this.opts.root}/${Zx}`,"utf8"))}catch{return{}}let t={};for(let[r,i]of Object.entries(e))typeof i!="string"||i===""||(t[r]={fingerprint:Mx("sha256").update(i).digest("hex").slice(0,12)});return t}liveDecls(){let e=this.discoverDecls();for(let t of e)t.service&&(t.podNames=this.podNames(t.service));return e}legacyView(){let e=this.liveDecls();return{at:Date.now(),gateway:this.gateway,decls:e,hostsSetup:this.hostsSetup(e),trustCommand:this.trustCommand(),serviceKeys:this.serviceKeyView(),services:[...this.services.values()].sort((t,r)=>t.project.localeCompare(r.project)),edges:[...this.edges.values()].sort((t,r)=>r.lastSeenAt-t.lastSeenAt),dataNodes:[...this.dataNodes.values()].sort((t,r)=>r.count-t.count).slice(0,24),recent:this.recent.slice(-20).reverse()}}gatewayLiveness(e=Date.now()){let t=this.opts.env??process.env,r=(t.LENSMCP_GATEWAY_PORTS??"").split(",").map(d=>Number(d.trim())).filter(d=>Number.isInteger(d)&&d>0),i=this.gateway?.ports??[],u=r.length?r:i,n=Number(t.LENSMCP_PARENT_PID??0);if(n>0)return rp(n)?{state:"live",role:"gateway-child",ports:u,since:this.gateway?.at,evidence:`served by the gateway process (pid ${n})`}:{state:"down",role:"gateway-child",ports:u,evidence:`the gateway that started this dashboard (pid ${n}) is gone`};if(i.length>0)return{state:"live",role:"standalone",ports:u,since:this.gateway?.at,evidence:"gateway-up event on this workspace\u2019s bus"};let a=this.registeredGateway(e);if(a)return{state:"live",role:"standalone",ports:u,evidence:`registered with the gateway daemon (pid ${a})`};let l=this.gateway?.aliveAt??0;return l>e-3e4?{state:"live",role:"standalone",ports:u,since:l,evidence:`gateway traffic ${Math.round((e-l)/1e3)}s ago`}:this.gateway?{state:"down",role:"standalone",ports:u,evidence:"no gateway traffic in the last 30s"}:{state:"unknown",role:"standalone",ports:u,evidence:"no gateway events seen \u2014 is this dashboard running without the gateway?"}}registeredGateway(e){if(e-this.registryCache.at<15e3)return this.registryCache.pid;let t;try{let r=`${(this.opts.env??process.env).LENSMCP_HOME||Px()}/.lensmcp/workspaces.json`,i=JSON.parse(bs(r,"utf8")),u=Array.isArray(i)?i.find(n=>n.root===this.opts.root):void 0;u&&typeof u.pid=="number"&&u.pid>0&&rp(u.pid)&&(!u.procStamp||X6(u.pid)===u.procStamp)&&(t=u.pid)}catch{}return this.registryCache={at:e,...t?{pid:t}:{}},t}view(e){let t=e.now??Date.now(),r=this.liveDecls(),i=this.hostsSetup(r),u=this.serviceKeyView(),n=new Map((e.processCluster?.services??[]).map(m=>[m.project,m])),a=new Map;for(let m of e.processCluster?.errors??[]){if(!m.project||!m.line)continue;let h=a.get(m.project)??[];h.push(m.line),a.set(m.project,h.slice(-6))}let l=[...this.edges.values()].filter(m=>!m.caller),d=r.map(m=>{let h=m.service?m.eager?"eager":"lazy":"web",E=this.services.get(m.project),D=n.get(m.project),{state:$,reason:A}=Y6(h,E,D,m.podNames.length),I=l.filter(N=>N.project===m.project),j=I.reduce((N,O)=>N+O.count,0),F=I.reduce((N,O)=>N+O.errors,0),b=I.slice().sort((N,O)=>O.lastSeenAt-N.lastSeenAt)[0],w=e.kpis?.projectStats(m.project,t),C=m.service&&m.internalHost!==!1&&m.host?typeof m.internalHost=="string"?m.internalHost:`internal.${m.host}`:void 0;return{project:m.project,kind:h,state:$,...A?{stateReason:A}:{},...m.host?{host:m.host}:{},...m.path?{path:m.path}:{},...C?{internalHost:C}:{},...m.port!==void 0?{port:m.port}:{},...m.internalPort!==void 0?{internalPort:m.internalPort}:{},pods:{running:m.podNames.length,names:m.podNames,...m.minPods!==void 0?{min:m.minPods}:{},...m.maxPods!==void 0?{max:m.maxPods}:{}},workers:m.workers??[],...E?.lastColdStartMs!==void 0?{lastColdStartMs:E.lastColdStartMs}:{},restarts:D?.restarts??0,buildFailed:D?.buildFailed??!1,errorLines:a.get(m.project)??[],...m.auth?{auth:{...m.auth.default?{default:m.auth.default}:{},overrides:m.auth.overrides?.length??0}}:{},traffic:{count:j,errors:F,avgMs:b?b.avgMs:null,...b?{lastSeenAt:b.lastSeenAt}:{}},...w?{window:w}:{},...u[m.project]?{keyFingerprint:u[m.project].fingerprint}:{},...E?{lastEvent:{at:E.lastEventAt,title:E.lastEvent}}:D?.lastTitle?{lastEvent:{at:D.lastSeenAt??0,title:D.lastTitle}}:{}}}).sort((m,h)=>H6[m.kind]-H6[h.kind]||m.project.localeCompare(h.project)),p=l.map(m=>({host:m.host,project:m.project,count:m.count,errors:m.errors,avgMs:m.avgMs,lastSeenAt:m.lastSeenAt})).sort((m,h)=>h.count-m.count);for(let m of r)m.host&&!p.some(h=>h.host===m.host&&h.project===m.project)&&p.push({host:m.host,project:m.project,count:0,errors:0,avgMs:null});let c=[...this.edges.values()].filter(m=>!!m.caller).map(m=>({caller:m.caller,callee:m.project,host:m.host,count:m.count,errors:m.errors,avgMs:m.avgMs,lastSeenAt:m.lastSeenAt})).sort((m,h)=>h.count-m.count),f=[...this.dataNodes.values()].filter(m=>m.kind!=="memory").map(m=>({id:m.id,kind:m.kind,name:m.name,usedBy:m.usedBy??(m.viaProject&&m.viaProject!=="unknown"?[m.viaProject]:[]),ops:m.count,lastSeenAt:m.lastSeenAt,...m.kind==="queue"&&(m.counts||m.recent)?{queue:{counts:m.counts??{},recent:(m.recent??[]).slice(0,8).map(h=>({id:String(h.id??""),...typeof h.name=="string"?{name:h.name}:{},...typeof h.state=="string"?{state:h.state}:typeof h.status=="string"?{state:h.status}:{},...typeof h.finishedOn=="number"?{at:h.finishedOn}:typeof h.timestamp=="number"?{at:h.timestamp}:{}}))}}:{}})).sort((m,h)=>h.ops-m.ops).slice(0,24),g=i.filter(m=>!m.v4||!m.v6);return{at:t,gateway:this.gatewayLiveness(t),services:d,routes:p,edges:c,backends:f,hosts:i,...g.length?{hostsFix:Q6(g)}:{},trustCommand:this.trustCommand(),recent:this.recent.slice(-20).reverse()}}},H6={web:0,eager:1,lazy:2},Zx="node_modules/.cache/davnx-webpack/service-keys.json";function X6(e){if(process.platform==="win32")return"";try{return Tx("ps",["-p",String(e),"-o","lstart="],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).trim()}catch{return""}}s(X6,"Cj"),o(X6,"processStamp");function rp(e){if(process.ppid===e)return!0;try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(rp,"N$"),o(rp,"pidAlive");function Y6(e,t,r,i){let u=r?.state;return u==="crash-looping"?{state:"crash-looping",reason:"keeps exiting right after start"}:u==="wedged"?{state:"wedged",reason:"running but not answering"}:r?.buildFailed?{state:"down",reason:"build failed \u2014 see the error lines"}:u==="up"||t?.state==="up"?{state:"up"}:u==="starting"||t?.state==="starting"?{state:"starting",reason:e==="lazy"?"cold start in progress":"starting"}:!u&&!t&&i>0?{state:"up",reason:`${i} pod socket${i===1?"":"s"} live`}:u==="idle"||t?.idle||e==="lazy"&&(u==="down"||t?.state==="down"||!t)?{state:"idle",reason:"scaled to zero \u2014 starts on the next request"}:u==="down"||t?.state==="down"?{state:"down",reason:"not running"}:{state:"unknown",reason:"no lifecycle events seen yet"}}s(Y6,"Uj"),o(Y6,"serviceState");function Q6(e){let t=e.filter(i=>!i.v4).map(i=>i.host),r=e.filter(i=>!i.v6).map(i=>i.host);return`printf '${[...t.length?[`127.0.0.1 ${t.join(" ")}`]:[],...r.length?[`::1 ${r.join(" ")}`]:[]].join("\\n")}\\n' | sudo tee -a /etc/hosts`}s(Q6,"Lj"),o(Q6,"hostsFixCommand");var qx=class{static{s(this,"ma")}static{o(this,"LogRing")}constructor(e=5e3){this.cap=e,this.lines=[],this.seqN=0,this.sourceSet=new Set}get seq(){return this.seqN}get size(){return this.lines.length}sources(){return[...this.sourceSet].sort()}append(e){let t=ey(e,++this.seqN);return this.sourceSet.add(t.source),this.lines.push(t),this.lines.length>this.cap+Math.ceil(this.cap/10)&&this.lines.splice(0,this.lines.length-this.cap),t}since(e,t=this.cap){let r=this.indexAfter(e),i=this.lines.slice(r);return i.length>t?i.slice(i.length-t):i}recent(e){return this.lines.slice(Math.max(0,this.lines.length-e))}query(e){let t=e.limit??2e3,r=e.q?.toLowerCase(),i=e.since&&e.since>0?this.lines.slice(this.indexAfter(e.since)):this.lines,u=[];for(let n=i.length-1;n>=0&&u.length<t;n--){let a=i[n];e.flowId&&a.flowId!==e.flowId||e.from!==void 0&&a.at<e.from||e.to!==void 0&&a.at>e.to||r&&!`${a.title} ${a.message??""} ${a.source}`.toLowerCase().includes(r)||u.push(a)}return u.reverse()}indexAfter(e){let t=0,r=this.lines.length;for(;t<r;){let i=t+r>>>1;this.lines[i].seq<=e?t=i+1:r=i}return t}};function ey(e,t){let r=e.raw??{},i=e.context??{},u=typeof r.project=="string"&&r.project?r.project:e.source,n=typeof i.flowId=="string"?i.flowId:typeof i.traceId=="string"?i.traceId:void 0;return{seq:t,at:e.timestamp,source:u,category:e.category,severity:e.severity,title:e.title,...e.message?{message:e.message}:{},...n?{flowId:n}:{}}}s(ey,"Fj"),o(ey,"logLineOf");var ty=class{static{s(this,"bo")}static{o(this,"SeenIds")}constructor(e=5e4){this.cap=e,this.set=new Set,this.order=[]}firstTime(e){if(!e)return!0;if(this.set.has(e))return!1;if(this.set.add(e),this.order.push(e),this.order.length>this.cap)for(let t of this.order.splice(0,this.order.length-this.cap))this.set.delete(t);return!0}},uy=class{static{s(this,"ga")}static{o(this,"Series")}constructor(e){this.horizonSec=e,this.buckets=new Map}bucket(e){let t=this.buckets.get(e);return t||(t={sec:e,count:0,errors:0,lat:[],latReq:[]},this.buckets.set(e,t)),t}addTraffic(e,t,r){let i=this.bucket(e);i.count+=t,i.errors+=r}addLatency(e,t,r){let i=this.bucket(e),u=r?i.lat:i.latReq;u.length<256&&u.push(t)}prune(e){for(let t of this.buckets.keys())t<=e-this.horizonSec&&this.buckets.delete(t)}range(e,t){let r=[];for(let i of this.buckets.values())i.sec>e&&i.sec<=t&&r.push(i);return r}},Lx=class{static{s(this,"ha")}static{o(this,"KpiWindow")}constructor(e={}){this.byProject=new Map,this.windowSec=e.windowSec??300,this.sparkBuckets=e.sparkBuckets??30,this.sparkBucketSec=e.sparkBucketSec??10,this.horizonSec=Math.max(this.windowSec,this.sparkBuckets*this.sparkBucketSec)+5,this.global=new uy(this.horizonSec)}project(e){let t=this.byProject.get(e);return t||(t=new uy(this.horizonSec),this.byProject.set(e,t)),t}observe(e){if(e.source!=="gateway")return;let t=e.raw??{},r=t.kind,i=Math.floor(e.timestamp/1e3),u=typeof t.project=="string"?t.project:"",n=typeof t.caller=="string"&&t.caller?t.caller:void 0;if(r==="gateway-traffic"){let a=np(t.count),l=np(t.errors);if(a===0&&l===0)return;n||this.global.addTraffic(i,a,l),u&&this.project(u).addTraffic(i,a,l);let d=Array.isArray(t.durationsMs)?t.durationsMs:[];for(let p of d){let c=Number(p);!Number.isFinite(c)||c<0||(n||this.global.addLatency(i,c,!0),u&&this.project(u).addLatency(i,c,!0))}}else if(r==="gateway-request"){let a=Number(t.durationMs);if(!Number.isFinite(a)||a<0)return;n||this.global.addLatency(i,a,!1),u&&this.project(u).addLatency(i,a,!1)}}snapshot(e=Date.now()){let t=Math.floor(e/1e3);this.global.prune(t);for(let u of this.byProject.values())u.prune(t);let r=this.global,i=ap(r,t,this.sparkBuckets,this.sparkBucketSec);return{at:e,windowSec:this.windowSec,req60:Rt(r.range(t-60,t),"count"),last:sp(r.range(t-this.windowSec,t)),sparkBucketSec:this.sparkBucketSec,spark:i}}projectStats(e,t=Date.now()){let r=this.byProject.get(e);if(!r)return;let i=Math.floor(t/1e3);return r.prune(i),{...sp(r.range(i-this.windowSec,i)),req60:Rt(r.range(i-60,i),"count"),spark:ap(r,i,this.sparkBuckets,this.sparkBucketSec).req}}};function np(e){let t=Number(e??0);return Number.isFinite(t)&&t>0?t:0}s(np,"P$"),o(np,"nonNeg");function Rt(e,t){let r=0;for(let i of e)r+=i[t];return r}s(Rt,"Qr"),o(Rt,"sum");function ip(e){let t=[];for(let i of e)for(let u of i.lat)t.push(u);if(t.length)return{lat:t.sort((i,u)=>i-u),complete:!0};let r=[];for(let i of e)for(let u of i.latReq)r.push(u);return{lat:r.sort((i,u)=>i-u),complete:!1}}s(ip,"C$"),o(ip,"latencies");function sp(e){let t=Rt(e,"count"),r=Rt(e,"errors"),{lat:i,complete:u}=ip(e),n=i.length?i.reduce((a,l)=>a+l,0)/i.length:null;return{count:t,errors:r,errorRate:t>0?r/t:null,p50:Ds(i,.5),p95:Ds(i,.95),avgMs:n===null?null:Math.round(n),samples:i.length,sampled:!u||i.length<t}}s(sp,"D$"),o(sp,"statsOf");function Ds(e,t){if(e.length===0)return null;let r=Math.min(e.length-1,Math.max(0,Math.ceil(t*e.length)-1));return Math.round(e[r])}s(Ds,"sy"),o(Ds,"percentile");function ap(e,t,r,i){let u=[],n=[],a=[];for(let l=r-1;l>=0;l--){let d=t-l*i,p=e.range(d-i,d);u.push(Rt(p,"count")),n.push(Rt(p,"errors")),a.push(Ds(ip(p).lat,.95))}return{req:u,errors:n,p95:a}}s(ap,"M$"),o(ap,"sparkOf");var Jx=class{static{s(this,"va")}static{o(this,"FlowIndex")}constructor(e={flows:2e3,events:5e4},t=lt){this.caps=e,this.config=t,this.revs=new Map,this.pending=new Set,this.eventFlow=new Map,this.cache=new Map,this.evidenceCache=new Map}observe(e){let t=op(e);if(!t)return;let r=(this.revs.get(t)??0)+1;this.revs.delete(t),this.revs.set(t,r),this.revs.size>this.caps.flows&&this.revs.delete(this.revs.keys().next().value),this.pending.add(t),e.id&&(this.eventFlow.set(e.id,t),this.eventFlow.size>this.caps.events&&this.eventFlow.delete(this.eventFlow.keys().next().value))}rev(e){return this.revs.get(e)??0}drainRevs(){let e=[...this.pending].map(t=>({flowId:t,rev:this.rev(t)}));return this.pending.clear(),e}flowOfEvent(e){return this.eventFlow.get(e)}summaries(e,t=50){if(!e)return[];let r=[];for(let u of e.recentFlowIds().slice(0,t)){let n=this.rev(u),a=this.cache.get(u);if(a&&a.rev===n&&n>0){r.push(a.summary);continue}let l=e.getFlowSummary(u);if(!l)continue;let d=e.getFlowEvents(u)??[],p=e.analyzeFlow?.(u)??(d.length?xi(d,this.config):void 0),c=ly(l,d,n,p);this.cache.set(u,{rev:n,summary:c}),r.push(c)}let i=new Set(r.map(u=>u.flowId));for(let u of this.cache.keys())i.has(u)||this.cache.delete(u);return r.sort((u,n)=>n.lastSeenAt-u.lastSeenAt)}evidence(e,t=50){let r=[];if(e){for(let i of e.recentFlowIds().slice(0,t)){let u=this.rev(i),n=this.evidenceCache.get(i);if(n&&n.rev===u&&u>0){r.push(...n.samples);continue}let a=ry(i,e.getFlowEvents(i)??[]);this.evidenceCache.set(i,{rev:u,samples:a}),r.push(...a)}if(this.evidenceCache.size>t*2){let i=new Set(e.recentFlowIds().slice(0,t));for(let u of this.evidenceCache.keys())i.has(u)||this.evidenceCache.delete(u)}}return new Vx(r)}findByRoute(e,t,r){let i=ws(r);return e.find(u=>u.request&&u.request.method===t&&i.test(u.request.path))?.flowId}};function ry(e,t){let r=[],i=new Map;for(let n of t){let a=n.raw??{};if(a.kind==="server-request"&&n.id){let l=a.request??{},d=iy(n)??(typeof l.requestId=="string"?l.requestId:void 0);if(!d)continue;let p=typeof l.endedAt=="number"?l.endedAt:ny(n),c=typeof l.startedAt=="number"?l.startedAt:p-(typeof l.durationMs=="number"?l.durationMs:0);i.set(d,[...i.get(d)??[],{id:n.id,start:c,end:p}])}}let u=o((n,a)=>{let l=n?i.get(n):void 0;if(l?.length)return l.length===1?l[0].id:l.filter(d=>d.start-5<=a&&a<=d.end+5).sort((d,p)=>p.start-d.start)[0]?.id},"handlerAt");for(let n of t){if(!n.id)continue;let a=n.raw??{},l=ny(n),d=o(c=>typeof c=="number"&&Number.isFinite(c)?c:0,"num"),p=a.kind;if(p==="server-request"){let c=a.request??{};if(typeof c.route!="string")continue;r.push({key:`route:${String(c.method??"GET")} ${c.route}`,flowId:e,eventId:n.id,ms:d(c.durationMs),at:l,failed:d(c.status)>=500})}else if(p==="db-query"&&typeof a.project=="string"){let c=`${String(a.op??"query")} ${String(a.table??"")}`.trim(),f=n.title.replace(/\s*\(.*$/,"").trim();for(let g of new Set([c,f]))r.push({key:`sql:${a.project}:${g}`,flowId:e,eventId:n.id,ms:d(a.durationMs),at:l,failed:n.severity==="error"})}else if(p==="egress"&&typeof a.project=="string"&&typeof a.host=="string"){let c=typeof a.error=="string"||d(a.status)>=500||n.severity==="error";r.push({key:`egress:${a.project}:${a.host}`,flowId:e,eventId:n.id,ms:d(a.durationMs),at:l,failed:c})}else if(p==="memory-mutation"){let c=(a.mutation??{}).ownerNodeId;if(typeof c!="string")continue;r.push({key:`mem:${c}`,flowId:e,eventId:u(iy(n),l)??n.id,ms:0,at:l,failed:!1})}}return r}s(ry,"Zj"),o(ry,"evidenceSamples");var ny=o(e=>typeof e.timestamp=="number"?e.timestamp:Date.parse(String(e.timestamp))||0,"tsOf"),iy=o(e=>{let t=e.context??{};return typeof t.requestId=="string"&&t.requestId?t.requestId:void 0},"requestIdOf"),Vx=class{static{s(this,"ay")}static{o(this,"EvidenceLookup")}constructor(e){this.samples=e}find(e,t,r={}){let i;for(let u of this.samples)!e(u.key)||r.inFlow!==void 0&&u.flowId!==r.inFlow||t==="failing"&&!u.failed||r.minMs!==void 0&&u.ms<r.minMs||(i?(t==="slowest"?u.ms>i.ms||u.ms===i.ms&&u.at>i.at:u.at>i.at)&&(i=u):i=u);return i?{flowId:i.flowId,nodeId:i.eventId}:void 0}};function op(e){let t=e.context??{};return typeof t.flowId=="string"&&t.flowId?t.flowId:void 0}s(op,"cy"),o(op,"flowIdOf");function ws(e){let t=e.split("/").map(r=>r.startsWith(":")?"[^/?#]+":r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("/");return new RegExp(`^${t}(?:[?#].*)?$`)}s(ws,"ya"),o(ws,"routeRegex");var Wx=new Set(["memory-mutation","memory-retention","singleton-instance","subscription-added","subscription-removed","store-created","hook-run"]),Gx={"user-click":"click","user-input":"input","input-change":"input",keyboard:"key press","route-load":"navigate","page-load":"page load","form-submit":"submit",effect:"effect",timer:"timer","websocket-message":"socket message","backend-response":"response","hmr-update":"hot reload","ai-turn":"AI turn"};function sy(e){return e?Gx[e]??e.replace(/-/g," "):"request"}s(sy,"Vj"),o(sy,"originLabelOf");function ay(e){if(!e)return;if(e.startsWith("page:"))return e.slice(5)||"/";let t=/([^/:]+\.[cm]?[jt]sx?):(\d+)/.exec(e);if(t)return`${t[1]}:${t[2]}`;let r=e.replace(/^[a-z]+:/,"");return r.length>40?"\u2026"+r.slice(-39):r}s(ay,"Gj"),o(ay,"originWhereOf");function oy(e){let t=wi.indexOf(e);return t===-1?wi.length:t}s(oy,"Jj"),o(oy,"categoryRankOf");function ly(e,t,r,i){let u={},n=new Set,a="ok",l,d=1/0,p,c=1/0,f=1/0,g=-1/0,m=new Set,h=0,E=0,D,$=o(N=>{(N==="error"||N==="warn"&&a==="ok")&&(a=N)},"bump");for(let N of t){let O=N.raw??{},te=N.context??{},ne=typeof O.kind=="string"?O.kind:void 0,ht=Nl({source:N.source,category:N.category,title:N.title,kind:ne});u[ht]=(u[ht]??0)+1;let We=typeof O.project=="string"?O.project:typeof te.projectName=="string"?te.projectName:void 0;We&&N.source!=="gateway"&&n.add(We),N.severity==="error"||N.severity==="fatal"?($("error"),E++,(!D||N.timestamp<D.at)&&(D={at:N.timestamp,title:N.title})):N.severity==="warning"&&$("warn");let Me=Number(O.status??O.request?.status);if(Number.isFinite(Me)&&(Me>=500?$("error"):Me>=400&&$("warn")),(ne==="fetch-start"||ne==="fetch-done"||ne==="fetch-error")&&typeof O.url=="string"){let je=Number(O.startedAt??N.timestamp);(je<d||je===d&&l&&l.status===void 0)&&(d=je,l={method:String(O.method??"GET"),path:O.url,...Number.isFinite(Me)?{status:Me}:l?.status!==void 0?{status:l.status}:{}})}if(m.size<80)if(ne==="gateway-request"&&typeof O.url=="string")m.add(`${String(O.method??"GET")} ${lp(O.url)}`);else if(ne==="server-request"){let je=O.request??{};typeof je.route=="string"&&m.add(`${String(je.method??"GET")} ${je.route}`)}else ne==="db-query"&&We?m.add(`sql:${We}:${N.title.replace(/\s*\(.*$/,"")}`):ne==="egress"&&We&&typeof O.host=="string"&&m.add(`egress:${We}:${O.host}`);if(ne==="gateway-request"&&!O.caller&&N.source==="gateway"&&h++,ne==="gateway-request"&&!O.caller&&typeof O.url=="string"&&N.timestamp<c&&(c=N.timestamp,p={method:String(O.method??"GET"),path:O.url,...Number.isFinite(Me)?{status:Me}:{}}),ne&&Wx.has(ne))continue;let vt=Number(O.durationMs??O.request?.durationMs??0),et=Number(O.startedAt),ku=Number.isFinite(et)&&et>0?et:N.timestamp-(Number.isFinite(vt)?vt:0),yt=Number.isFinite(et)&&et>0&&Number.isFinite(vt)?et+vt:N.timestamp;ku<f&&(f=ku),yt>g&&(g=yt)}!l&&p&&(l=p);let A=sy(e.originType),I=ay(e.originNodeId),j=l?`${l.method} ${lp(l.path)}`:void 0,F=e.headline&&e.headline!==e.originType?e.headline:void 0,b=!e.originType&&h>1?` +${h-1} more request${h===2?"":"s"}`:"",w=e.originType?`${A}${I?` \xB7 ${I}`:""}`:j?`${j}${b}`:F??A,C=e.originType&&j?`${w} \u2192 ${j}`:w;return{flowId:e.flowId,...e.originType?{originType:e.originType}:{},...e.originNodeId?{originNodeId:e.originNodeId}:{},startedAt:e.startedAt,lastSeenAt:e.lastSeenAt,eventCount:e.eventCount,headline:C,originLabel:A,...I?{originWhere:I}:{},...l?{request:l}:{},worst:a,durationMs:Number.isFinite(f)&&g>=f?Math.round(g-f):0,lanes:u,projects:[...n].sort(),rev:r,...h?{requestCount:h}:{},...E?{errorCount:E,firstError:cy(D.title)}:{},...m.size?{touches:[...m]}:{},...i?dy(i):{}}}s(ly,"Kj"),o(ly,"summarizeFlow");function dy(e){let t=e.classification,r=e.segmentation.stats;return{category:t.category,categoryRank:oy(t.category),decidedBy:t.decidedBy,...t.subject?{subject:t.subject}:{},tags:t.tags,segmentCount:r.segments,phaseCount:r.phases,signalCount:r.signal}}s(dy,"Wj"),o(dy,"analysisFields");function cy(e){return e.replace(/\s*✗\s*$/,"").replace(/\s*\((?:\d+ rows?, )?[\d.]+ ?ms\)$/,"")}s(cy,"Xj"),o(cy,"cleanTitle");function lp(e){let t=e.indexOf("?");return t>=0?e.slice(0,t):e}s(lp,"F$"),o(lp,"stripQuery");function dp(e,t){return{id:e.id,kind:e.kind,label:e.label,phase:e.phase,start:e.start,end:e.end,durationMs:e.durationMs,counts:e.counts,projects:e.projects,...e.method?{method:e.method}:{},...e.route?{route:e.route}:{},...e.requestId?{requestId:e.requestId}:{},...e.after?{after:e.after}:{},...e.hot?{hot:e.hot}:{},...e.part?{part:e.part}:{},worstSeverity:e.worstSeverity,category:t}}s(dp,"Z$"),o(dp,"toDashSegment");function py(e,t,r){if(!e)return{flowId:t,summary:null,events:[],rev:r.rev};let i=e.getFlowSummary(t)??null,u=e.getFlowEvents(t)??[],n=e.analyzeFlow?.(t)??(u.length?xi(u,r.config??lt):void 0),a,l=u;if(r.segmentId!==void 0){a=n?.segmentation.segments.find(h=>h.id===r.segmentId);let m=new Set(a?.eventIds??[]);l=u.filter(h=>m.has(h.id))}let d=Di(l,{includeRaw:r.includeRaw===!0}),p={flowId:t,summary:i,...d,rev:r.rev};if(!n)return p;let c=n.segmentation.assignment;p.events=p.events.map(m=>{let h=c[m.id]??(m.memberIds?.[0]?c[m.memberIds[0]]:void 0);return h?{...m,segmentId:h}:m});let f=o(m=>n.segmentCategories[m.id]??"other","category");p.segments=n.segmentation.segments.map(m=>dp(m,f(m))),p.phases=n.segmentation.phases,p.segmentCategories=n.segmentCategories,p.segmentStats=n.segmentation.stats;let g=n.classification;return p.classification={category:g.category,decidedBy:g.decidedBy,...g.ruleIndex!==void 0?{ruleIndex:g.ruleIndex}:{},...g.subject?{subject:g.subject}:{},tags:g.tags,origin:g.origin},a&&(p.focus=dp(a,f(a))),p}s(py,"B$"),o(py,"flowDetailPayload");var my=["graph://patterns","perf://slow-routes","perf://duplicate-requests","db://slow-queries","db://analysis","memory://leaks/suspected","memory://owners/growing","memory://current","react://components/hot","runtime://errors","runtime://browser/errors","trace://failed","net://egress/hosts","typecheck://current","typecheck://errors","build://current","build://failures","lint://current","process://cluster","visual://violations/current"],ce=o(e=>e&&typeof e=="object"?e:{},"obj"),pe=o(e=>Array.isArray(e)?e.filter(t=>t&&typeof t=="object"):[],"arr"),R=o(e=>typeof e=="string"&&e?e:void 0,"str"),M=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"num");function fy(e){let t=e.resources,r=[],i=o(b=>{for(let w of b){let C=e.flowOfEvent(w);if(C)return{flowId:C,nodeId:w,eventIds:b.slice(0,50)}}return b.length?{eventIds:b.slice(0,50)}:void 0},"evidenceOf"),u=o((b,w)=>{let C=ws(w),N=o(O=>O.startsWith(`${b} `)&&C.test(O.slice(b.length+1)),"hit");return e.flows.find(O=>O.request&&O.request.method===b&&C.test(O.request.path)||O.touches?.some(N))?.flowId},"flowForRoute"),n=o(b=>e.flows.find(w=>w.touches?.includes(b))?.flowId,"flowTouching"),a=o((b,w)=>b?{flowId:b.flowId,nodeId:b.nodeId}:w?{flowId:w}:void 0,"at"),l=o((b,w)=>{let C=ws(w),N=`route:${b} `;return O=>O.startsWith(N)&&(O.slice(N.length)===w||C.test(O.slice(N.length)))},"routeKey");for(let b of pe(ce(t["graph://patterns"]).patterns)){let w=R(b.kind),C=ce(b.details),N=(Array.isArray(b.evidence)?b.evidence:[]).filter(ht=>typeof ht=="string"),O=R(b.title)??w??"pattern",te=w==="n+1-query"?"n-plus-one":w==="db-in-loop"?"db-in-loop":w==="render-storm"?"render-storm":w==="slow-path"?"slow-path":w==="leak"?"leak":"other",ne=R(C.signature)??R(C.componentInstanceId)??O;r.push({id:`graph:${w}:${ne}`,kind:te,severity:b.severity==="error"?"high":"medium",title:O,...R(C.signature)?{code:R(C.signature)}:{},...te==="render-storm"&&R(C.componentInstanceId)?{where:cp(R(C.componentInstanceId))}:{},detail:Dy(te,C),...M(C.count)!==void 0?{count:M(C.count)}:M(C.dbCallsInsideLoop)!==void 0?{count:M(C.dbCallsInsideLoop)}:{},evidence:i(N),resource:"graph://patterns",at:M(b.detectedAt)})}let d=ce(t["perf://slow-routes"]),p=M(d.thresholdMs)??500;for(let b of pe(d.routes)){let w=R(b.method)??"GET",C=R(b.route)??"?",N=M(b.worstRecentMs)??0,O=a(e.evidence?.find(l(w,C),"latest",{minMs:p})??e.evidence?.find(l(w,C),"slowest"),u(w,C));r.push({id:`perf:slow-route:${w} ${C}`,kind:"slow-route",severity:N>=p*3?"high":"medium",title:`${w} ${C} is slow`,where:`${w} ${C}`,detail:`worst ${Te(N)} recently \u2014 ${M(b.recentSlowSamples)??0} of the last ${Math.min(M(b.samples)??0,M(d.recentSampleWindow)??20)} calls over the ${Te(p)} budget (last call ${Te(M(b.lastDurationMs)??0)})`,count:M(b.slowSamples),...O?{evidence:O}:{},resource:"perf://slow-routes",at:M(b.lastSeenAt)})}for(let b of pe(ce(t["perf://duplicate-requests"]).endpoints)){let w=R(b.method)??"GET",C=R(b.url)??"?";r.push({id:`perf:dup:${w} ${C}`,kind:"duplicate-requests",severity:"medium",title:`${w} ${C} fired ${M(b.peakConcurrent)??"?"}\xD7 at once`,where:`${w} ${C}`,detail:`${M(b.peakConcurrent)??"?"} identical requests in flight together \u2014 the browser asked for the same thing repeatedly`,count:M(b.totalRequests),resource:"perf://duplicate-requests",at:M(b.lastSeenAt)})}let c=ce(t["db://slow-queries"]),f=M(c.thresholdMs)??100;for(let b of pe(c.queries)){let w=M(b.p95Ms)??0,C=M(b.maxMs)??0,N=`${R(b.op)??"query"} ${R(b.table)??""}`.trim();r.push({id:`db:slow:${R(b.project)??"?"}:${N}`,kind:"slow-query",severity:w>=f*5?"high":w>=f?"medium":"low",title:w>=f?`Slow query: ${N}`:`Occasionally slow query: ${N}`,where:`${R(b.project)??"?"} \xB7 ${N}`,detail:`p95 ${Te(w)} \xB7 max ${Te(C)} \xB7 avg ${Te(M(b.avgMs)??0)} over ${M(b.count)??0} runs (budget ${Te(f)})`,...R(b.lastSql)?{code:R(b.lastSql)}:{},count:M(b.count),...(()=>{let O=`sql:${R(b.project)??"?"}:${N}`,te=a(e.evidence?.find(ne=>ne===O,"latest",{minMs:f})??e.evidence?.find(ne=>ne===O,"slowest"),n(O));return te?{evidence:te}:{}})(),resource:"db://slow-queries",at:M(b.lastSeenAt)})}for(let b of pe(ce(t["db://analysis"]).runs))for(let w of pe(b.findings)){let C=R(w.kind)??"finding";r.push({id:`db:analysis:${R(b.project)??"?"}:${C}:${R(w.table)??""}`,kind:C==="missing-index"?"missing-index":"slow-query",severity:w.severity==="error"?"high":w.severity==="info"?"low":"medium",title:`${C.replace(/-/g," ")} on ${R(w.table)??"a table"}`,where:`${R(b.project)??"?"} \xB7 ${R(w.table)??""}`,...R(w.detail)?{detail:R(w.detail)}:{},resource:"db://analysis",at:M(b.runAt)})}let g=new Map;for(let b of pe(ce(t["memory://leaks/suspected"]).suspected)){let w=R(b.ownerId)??"?",C=g.get(w);(!C||(M(b.at)??0)>=(M(C.at)??0))&&g.set(w,b)}for(let b of g.values()){let w=R(b.ownerId)??"?",C=ce(b.detail),N=R(b.flowId),O=a(N?e.evidence?.find(te=>te===`mem:${w}`,"latest",{inFlow:N}):void 0,N);r.push({id:`memory:leak:${pp(w)}`,kind:"leak",severity:"high",title:`Suspected leak: ${pp(w)}`,where:w,detail:`grew by ${M(C.growth)??"?"} (${M(C.startCount)??"?"} \u2192 ${M(C.endCount)??"?"}) during one flow and did not shrink`,...O?{evidence:O}:{},resource:"memory://leaks/suspected",at:M(b.at)})}let m=new Map;for(let b of pe(ce(t["runtime://errors"]).entries)){let w=R(b.fingerprint)??R(b.title)??"?",C=m.get(w),N=!C||(M(b.timestamp)??0)>(M(C.e.timestamp)??0),O=N?R(b.stack)??C?.stack:C?.stack??R(b.stack);m.set(w,{e:N?b:C.e,n:(C?.n??0)+1,...O?{stack:O}:{}})}let h=new Set;for(let[b,{e:w,n:C,stack:N}]of m){let O=R(w.id),te=R(w.requestId);te&&h.add(te),r.push({id:`runtime:server:${b}`,kind:"server-error",severity:"high",title:R(w.title)??"Server error",where:[R(w.source),R(w.route)].filter(Boolean).join(" \xB7 ")||void 0,...R(w.message)?{detail:R(w.message)}:{},...N?{code:mp(N)}:{},count:C,evidence:i(O?[O]:[]),resource:"runtime://errors",at:M(w.timestamp)})}let E=new Map;for(let b of pe(ce(t["runtime://browser/errors"]).entries)){let w=R(b.fingerprint)??R(b.title)??R(b.message)??"?",C=E.get(w);E.set(w,{e:C&&(M(C.e.timestamp)??0)>(M(b.timestamp)??0)?C.e:b,n:(C?.n??0)+1})}for(let[b,{e:w,n:C}]of E){let N=R(w.id);r.push({id:`runtime:browser:${b}`,kind:"browser-error",severity:"high",title:R(w.title)??R(w.message)??"Browser error",...R(w.url)?{where:R(w.url)}:{},...R(w.message)&&R(w.message)!==R(w.title)?{detail:R(w.message)}:{},...R(w.stack)?{code:mp(R(w.stack))}:{},count:C,evidence:i(N?[N]:[]),resource:"runtime://browser/errors",at:M(w.timestamp)})}let D=new Map;for(let b of pe(ce(t["trace://failed"]).spans)){let w=R(b.name)??"?";if(w.startsWith("nest.request ")||R(b.requestId)&&h.has(R(b.requestId)))continue;let C=D.get(w);D.set(w,{s:C&&(M(C.s.startTime)??0)>(M(b.startTime)??0)?C.s:b,n:(C?.n??0)+1})}for(let[b,{s:w,n:C}]of D){let N=R(w.id);r.push({id:`trace:failed:${b}`,kind:"failed-span",severity:"medium",title:`${b} failed`,where:b,count:C,evidence:i(N?[N]:[])??(R(w.flowId)?{flowId:R(w.flowId)}:void 0),resource:"trace://failed",at:M(w.startTime)})}for(let b of pe(ce(t["net://egress/hosts"]).hosts)){let w=R(b.host)??"?",C=R(b.project)??"?",N=pe(b.endpoints).find(O=>(M(O.errorCount)??0)+(M(O.status5xx)??0)>0);b.failing===!0?r.push({id:`net:failing:${C}:${w}`,kind:"egress-failing",severity:"high",title:`Calls to ${w} are failing`,where:`${C} \u2192 ${w}`,detail:R(b.detail)??`${M(b.errorCount)??0} errors, ${M(b.status5xx)??0}\xD7 5xx`,...N?{code:`${R(N.method)??"GET"} ${w}${R(N.path)??""}${R(N.lastError)?`
|
|
74
74
|
${R(N.lastError)}`:M(N.lastStatus)?` \u2192 ${M(N.lastStatus)}`:""}`}:{},count:M(b.count),...(()=>{let O=`egress:${C}:${w}`,te=a(e.evidence?.find(ne=>ne===O,"failing")??e.evidence?.find(ne=>ne===O,"latest"),n(O));return te?{evidence:te}:{}})(),resource:"net://egress/hosts",at:M(b.lastSeenAt)}):b.slow===!0&&r.push({id:`net:slow:${C}:${w}`,kind:"egress-slow",severity:"medium",title:`${w} is slow`,where:`${C} \u2192 ${w}`,detail:`p95 ${Te(M(b.p95Ms)??0)} \xB7 max ${Te(M(b.maxMs)??0)} over ${M(b.count)??0} calls`,count:M(b.count),...(()=>{let O=`egress:${C}:${w}`,te=a(e.evidence?.find(ne=>ne===O,"slowest"),n(O));return te?{evidence:te}:{}})(),resource:"net://egress/hosts",at:M(b.lastSeenAt)})}for(let b of pe(ce(t["build://failures"]).failures)){let w=R(b.file);r.push({id:`build:${R(b.fingerprint)??R(b.message)??w??"?"}`,kind:"build",severity:"high",title:`Build error${R(b.project)?` in ${R(b.project)}`:""}`,...w?{where:w}:{},...R(b.message)?{detail:R(b.message)}:{},resource:"build://failures",at:M(b.timestamp)})}let $=pe(ce(t["typecheck://errors"]).errors),A=new Map;for(let b of $){let w=R(b.project)??"workspace";A.set(w,[...A.get(w)??[],b])}for(let[b,w]of A){let C=w[0];r.push({id:`typecheck:${b}`,kind:"typecheck",severity:"high",title:`${w.length} type error${w.length===1?"":"s"} in ${b}`,where:[R(C.file),M(C.line)].filter(N=>N!==void 0).join(":")||void 0,detail:`${R(C.code)?R(C.code)+": ":""}${R(C.message)??""}`,count:w.length,resource:"typecheck://errors",at:Math.max(...w.map(N=>M(N.timestamp)??0))})}let I=ce(t["process://cluster"]),j=pe(I.errors);for(let b of pe(I.services)){let w=R(b.state),C=R(b.project)??"?";if(w!=="crash-looping"&&w!=="wedged"&&b.buildFailed!==!0)continue;let N=j.filter(O=>O.project===C).map(O=>R(O.line)).filter(Boolean);r.push({id:`service:${C}:${w}`,kind:"service",severity:"high",title:w==="crash-looping"?`${C} keeps crashing`:w==="wedged"?`${C} is not answering`:`${C} failed to build`,where:C,...R(b.lastTitle)?{detail:R(b.lastTitle)}:{},...N.length?{code:N.slice(-6).join(`
|
|
75
|
-
`)}:{},count:M(b.restarts),resource:"process://cluster",at:M(b.lastSeenAt)})}let F=new Map;for(let b of r){let w=F.get(b.id);(!w||(b.at??0)>=(w.at??0))&&F.set(b.id,b)}return[...F.values()]}s(fy,"Hj"),o(fy,"collectProblems");function gy(e,t=Date.now()){let r=[],i=o((u,n,a,l)=>{let d=ce(e[u]);if(!e[u])return;let p,c=R(d.detail)??"",f=l(d);d.producer==="none"?(p="unchecked",c=c||"nothing is reporting this yet \u2014 not a pass"):f?(p="fail",c=f):d.stale===!0?p="stale":p="pass",r.push({id:n,label:a,status:p,detail:wy(c),resource:u})},"health");return i("build://current","build","Build",u=>{let n=pe(u.failures).length;return n>0||u.status==="failing"?`${n||"some"} build failure${n===1?"":"s"}`:void 0}),i("typecheck://current","typecheck","Typecheck",u=>{let n=M(u.errorCount)??0;return n>0?`${n} type error${n===1?"":"s"}`:void 0}),i("lint://current","lint","Lint",u=>{let n=M(u.errorCount)??0;return n>0?`${n} lint error${n===1?"":"s"}`:void 0}),i("runtime://browser/errors","browser","Browser capture",u=>{let n=M(u.count)??0;return n>0?`${n} browser error${n===1?"":"s"}`:void 0}),i("visual://violations/current","visual","Visual rules",u=>{let n=pe(u.violations).length;return n>0?`${n} visual violation${n===1?"":"s"}`:void 0}),i("db://analysis","db-analysis","DB analysis",u=>{let n=M(u.findingCount)??0;return n>0?`${n} finding${n===1?"":"s"}`:void 0}),r}s(gy,"Yj"),o(gy,"collectChecks");function hy(e){let t=ce(ce(e["memory://current"]).current),r=new Set(pe(ce(e["memory://leaks/suspected"]).suspected).map(u=>R(u.ownerId))),i=pe(ce(e["memory://owners/growing"]).owners).map(u=>({ownerId:R(u.ownerId)??"?",itemCount:M(u.itemCount)??0,growth:M(u.growthSinceStart)??0,mutations:M(u.mutations)??0,...M(u.lastMutatedAt)!==void 0?{lastMutatedAt:M(u.lastMutatedAt)}:{},suspected:r.has(R(u.ownerId)),flowIds:(Array.isArray(u.flowIds)?u.flowIds:[]).filter(n=>typeof n=="string").slice(-5)})).filter(u=>!/^Lensmcp/i.test(u.ownerId)).sort((u,n)=>Number(n.suspected)-Number(u.suspected)||n.growth-u.growth).slice(0,8);return{...M(t.heapUsed)!==void 0?{heapUsed:M(t.heapUsed)}:{},...M(t.rss)!==void 0?{rss:M(t.rss)}:{},owners:i}}s(hy,"Qj"),o(hy,"collectMemory");function vy(e){return{hot:pe(ce(e["react://components/hot"]).components).map(t=>({component:R(t.componentName)??cp(R(t.componentLogicalId)??"?"),renders:M(t.renderCount)??0,totalMs:Math.round((M(t.totalActualMs)??0)*10)/10})).sort((t,r)=>r.renders-t.renders).slice(0,8)}}s(vy,"eO"),o(vy,"collectReact");var Kx=class{static{s(this,"
|
|
75
|
+
`)}:{},count:M(b.restarts),resource:"process://cluster",at:M(b.lastSeenAt)})}let F=new Map;for(let b of r){let w=F.get(b.id);(!w||(b.at??0)>=(w.at??0))&&F.set(b.id,b)}return[...F.values()]}s(fy,"Hj"),o(fy,"collectProblems");function gy(e,t=Date.now()){let r=[],i=o((u,n,a,l)=>{let d=ce(e[u]);if(!e[u])return;let p,c=R(d.detail)??"",f=l(d);d.producer==="none"?(p="unchecked",c=c||"nothing is reporting this yet \u2014 not a pass"):f?(p="fail",c=f):d.stale===!0?p="stale":p="pass",r.push({id:n,label:a,status:p,detail:wy(c),resource:u})},"health");return i("build://current","build","Build",u=>{let n=pe(u.failures).length;return n>0||u.status==="failing"?`${n||"some"} build failure${n===1?"":"s"}`:void 0}),i("typecheck://current","typecheck","Typecheck",u=>{let n=M(u.errorCount)??0;return n>0?`${n} type error${n===1?"":"s"}`:void 0}),i("lint://current","lint","Lint",u=>{let n=M(u.errorCount)??0;return n>0?`${n} lint error${n===1?"":"s"}`:void 0}),i("runtime://browser/errors","browser","Browser capture",u=>{let n=M(u.count)??0;return n>0?`${n} browser error${n===1?"":"s"}`:void 0}),i("visual://violations/current","visual","Visual rules",u=>{let n=pe(u.violations).length;return n>0?`${n} visual violation${n===1?"":"s"}`:void 0}),i("db://analysis","db-analysis","DB analysis",u=>{let n=M(u.findingCount)??0;return n>0?`${n} finding${n===1?"":"s"}`:void 0}),r}s(gy,"Yj"),o(gy,"collectChecks");function hy(e){let t=ce(ce(e["memory://current"]).current),r=new Set(pe(ce(e["memory://leaks/suspected"]).suspected).map(u=>R(u.ownerId))),i=pe(ce(e["memory://owners/growing"]).owners).map(u=>({ownerId:R(u.ownerId)??"?",itemCount:M(u.itemCount)??0,growth:M(u.growthSinceStart)??0,mutations:M(u.mutations)??0,...M(u.lastMutatedAt)!==void 0?{lastMutatedAt:M(u.lastMutatedAt)}:{},suspected:r.has(R(u.ownerId)),flowIds:(Array.isArray(u.flowIds)?u.flowIds:[]).filter(n=>typeof n=="string").slice(-5)})).filter(u=>!/^Lensmcp/i.test(u.ownerId)).sort((u,n)=>Number(n.suspected)-Number(u.suspected)||n.growth-u.growth).slice(0,8);return{...M(t.heapUsed)!==void 0?{heapUsed:M(t.heapUsed)}:{},...M(t.rss)!==void 0?{rss:M(t.rss)}:{},owners:i}}s(hy,"Qj"),o(hy,"collectMemory");function vy(e){return{hot:pe(ce(e["react://components/hot"]).components).map(t=>({component:R(t.componentName)??cp(R(t.componentLogicalId)??"?"),renders:M(t.renderCount)??0,totalMs:Math.round((M(t.totalActualMs)??0)*10)/10})).sort((t,r)=>r.renders-t.renders).slice(0,8)}}s(vy,"eO"),o(vy,"collectReact");var Kx=class{static{s(this,"ba")}static{o(this,"ProblemLedger")}constructor(e=10*6e4){this.keepResolvedMs=e,this.known=new Map}update(e,t=Date.now()){let r=new Set;for(let i of e){if(r.has(i.id))continue;r.add(i.id);let{at:u,...n}=i,a=this.known.get(i.id),l=u??a?.lastSeenAt??t,d={...n,firstSeenAt:a?.firstSeenAt??Math.min(l,t),lastSeenAt:l};this.known.set(i.id,{firstSeenAt:d.firstSeenAt,lastSeenAt:l,problem:d})}for(let[i,u]of this.known)r.has(i)||(u.resolvedAt===void 0?u.resolvedAt=t:t-u.resolvedAt>this.keepResolvedMs&&this.known.delete(i));return[...this.known.values()].map(i=>i.resolvedAt!==void 0?{...i.problem,resolvedAt:i.resolvedAt}:i.problem).sort(Ey)}},yy={high:0,medium:1,low:2};function Ey(e,t){let r=e.resolvedAt!==void 0?1:0,i=t.resolvedAt!==void 0?1:0;return r-i||yy[e.severity]-yy[t.severity]||t.lastSeenAt-e.lastSeenAt}s(Ey,"tO"),o(Ey,"problemOrder");function by(e,t){let r=e.now??Date.now();return{at:r,problems:t.update(fy(e),r),checks:gy(e.resources,r),memory:hy(e.resources),react:vy(e.resources)}}s(by,"J$"),o(by,"buildDiagnostics");function Dy(e,t){return e==="n-plus-one"?`the same query ran ${M(t.count)??"?"}\xD7 in one request (threshold ${M(t.threshold)??"?"}) \u2014 one round-trip per row`:e==="db-in-loop"?`${M(t.dbCallsInsideLoop)??"?"} database calls inside one loop of ${M(t.iterations)??"?"} iterations${M(t.durationMs)!==void 0?` (${Te(M(t.durationMs))})`:""}`:e==="render-storm"?`rendered ${M(t.count)??"?"}\xD7 within ${M(t.windowMs)??"?"}ms (threshold ${M(t.threshold)??"?"})`:e==="slow-path"?R(t.summary)??"the longest causal chain in the flow":R(t.summary)??""}s(Dy,"rO"),o(Dy,"patternDetail");function cp(e){let t=e.split(":").pop()??e;return t.split("#")[0]||t}s(cp,"K$"),o(cp,"componentName");function pp(e){let[t,r]=e.split("::"),i=(t??e).split("#")[0];return r?`${i}.${r}`:i??e}s(pp,"V$"),o(pp,"ownerName");function mp(e){return e.split(`
|
|
76
76
|
`).filter(t=>!/node_modules|node:internal|node:async_hooks/.test(t)).slice(0,5).join(`
|
|
77
|
-
`)}s(mp,"G$"),o(mp,"firstFrames");function Te(e){return e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}s`:`${Math.round(e)}ms`}s(Te,"et"),o(Te,"fmtMs");function wy(e,t=160){return e.length>t?e.slice(0,t-1)+"\u2026":e}s(wy,"nO"),o(wy,"shorten");function
|
|
77
|
+
`)}s(mp,"G$"),o(mp,"firstFrames");function Te(e){return e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}s`:`${Math.round(e)}ms`}s(Te,"et"),o(Te,"fmtMs");function wy(e,t=160){return e.length>t?e.slice(0,t-1)+"\u2026":e}s(wy,"nO"),o(wy,"shorten");function Bs(e,t){return`event: ${e.type}
|
|
78
78
|
${t!==void 0?`id: ${t}
|
|
79
79
|
`:""}data: ${JSON.stringify(e.data)}
|
|
80
80
|
|
|
81
|
-
`}s(
|
|
81
|
+
`}s(Bs,"ly"),o(Bs,"sseFrame");var Hx=class{static{s(this,"wa")}static{o(this,"StreamHub")}constructor(e=15e3){this.clients=new Set,this.latest=new Map,this.latestJson=new Map,this.frameId=0,this.currentLogSeq=0,this.pinger=setInterval(()=>this.writeAll(`:ping
|
|
82
82
|
|
|
83
83
|
`),e),this.pinger.unref()}get size(){return this.clients.size}attach(e,t){e.writeHead(200,{"content-type":"text/event-stream; charset=utf-8","cache-control":"no-store",connection:"keep-alive","x-accel-buffering":"no"}),e.write(`retry: 3000
|
|
84
84
|
|
|
85
|
-
`);let r={res:e,logsDropped:!1};for(let i of t)e.write(
|
|
85
|
+
`);let r={res:e,logsDropped:!1};for(let i of t)e.write(Bs(i,++this.frameId));for(let[i,u]of this.latest)i!=="logs"&&i!=="logs-resync"&&e.write(u);this.clients.add(r),e.on("drain",()=>{r.logsDropped&&(r.logsDropped=!1,this.safeWrite(r,Bs({type:"logs-resync",data:{seq:this.currentLogSeq}},++this.frameId)))}),e.on("close",()=>this.clients.delete(r))}publish(e){let t=JSON.stringify(e.data);if(this.latestJson.get(e.type)===t)return!1;this.latestJson.set(e.type,t);let r=`event: ${e.type}
|
|
86
86
|
id: ${++this.frameId}
|
|
87
87
|
data: ${t}
|
|
88
88
|
|
|
89
|
-
`;return this.latest.set(e.type,r),this.writeAll(r),!0}publishLogs(e){if(this.currentLogSeq=e.data.seq,this.clients.size===0)return;let t=
|
|
89
|
+
`;return this.latest.set(e.type,r),this.writeAll(r),!0}publishLogs(e){if(this.currentLogSeq=e.data.seq,this.clients.size===0)return;let t=Bs(e,++this.frameId);for(let r of this.clients)if(!r.logsDropped){if(r.res.writableNeedDrain){r.logsDropped=!0;continue}this.safeWrite(r,t)}}latestData(e){let t=this.latestJson.get(e);return t===void 0?void 0:JSON.parse(t)}close(){clearInterval(this.pinger);for(let e of this.clients)try{e.res.end()}catch{}this.clients.clear()}writeAll(e){for(let t of this.clients)this.safeWrite(t,e)}safeWrite(e,t){try{e.res.write(t)}catch{this.clients.delete(e)}}};function mt(e,t){let r,i=0,u=!1,n=!1,a=o(async()=>{if(r=void 0,u){n=!0;return}u=!0,i=Date.now();try{await e()}catch(d){console.error("[lensmcp] dashboard: stream producer failed (contained):",d)}finally{u=!1,n&&(n=!1,l())}},"fire"),l=o(()=>{if(r)return;let d=Math.max(0,t-(Date.now()-i));r=setTimeout(()=>{a()},d),r.unref()},"kick");return{kick:l}}s(mt,"Tt"),o(mt,"coalesce");var ve=o(e=>e&&typeof e=="object"?e:{},"obj"),P=o(e=>typeof e=="string"&&e?e:void 0,"str"),ze=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"num"),Xx=class{static{s(this,"_a")}static{o(this,"ErrorLog")}constructor(e=Date.now){this.now=e,this.groups=new Map,this.pending=[],this.byRequest=new Map,this.projectOfRequest=new Map,this.seen=new Set,this.changed=!1}observe(e){if(e.id){if(this.seen.has(e.id))return!1;this.seen.add(e.id),this.seen.size>2e4&&this.seen.delete(this.seen.values().next().value)}let t=ve(e.raw),r=ve(e.context),i=P(t.kind),u=P(r.requestId);i==="gateway-request"&&u&&P(t.project)&&(this.projectOfRequest.set(u,P(t.project)),this.projectOfRequest.size>5e3&&this.projectOfRequest.delete(this.projectOfRequest.keys().next().value));let n=e.severity==="error"||e.severity==="fatal",a=ve(t.request),l=ze(t.status)??ze(a.status);return i==="server-request"&&(n||(l??0)>=500)?this.defer(e,"server"):e.source==="client-runtime"&&n&&(i==="error"||i==="unhandledrejection"||i==="resource-error"||i==="console")?this.browser(e,t,r):i==="egress"&&(P(t.error)||(l??0)>=500)?this.external(e,t,r,l):i==="queue-failed"?this.queue(e,t,r):i==="span"&&n?this.defer(e,"span"):i==="gateway-request"&&((l??0)>=500||l===0)?this.defer(e,"gateway"):i==="fetch-done"&&(l??0)>=500||i==="fetch-error"?this.defer(e,"fetch"):i==="log"&&n&&(e.source==="nestjs"||e.source==="nest")?this.defer(e,"log"):!1}flush(e=!1){let t=this.now(),r=o(a=>e||t-a.arrivedAt>=1500,"ready"),i=o(a=>P(ve(a.event.context).requestId),"requestOf");for(let a of this.pending.filter(l=>l.kind==="server"&&r(l))){this.pending.splice(this.pending.indexOf(a),1);let l=ve(a.event.raw);this.server(a.event,l,ve(l.request),ve(a.event.context))}let u=new Set(this.pending.filter(a=>a.kind==="server").map(i).filter(Boolean));for(let a of this.pending.filter(l=>l.kind!=="server"&&r(l)&&!(i(l)&&u.has(i(l)))))this.pending.splice(this.pending.indexOf(a),1),this.settle(a);let n=this.changed;return this.changed=!1,n}snapshot(e=[],t=15*6e4){let r=this.now(),i=Math.floor(r/6e4),u=[...this.groups.values()].map(l=>{let d=[];for(let g=i-30+1;g<=i;g++)d.push(l.perMinute.get(g)??0);let{flows:p,perMinute:c,...f}=l;return{...f,occurrences:[...f.occurrences],flowCount:p.size,spark:d}}),n=[...e,...u].sort((l,d)=>+!!d.ongoing-+!!l.ongoing||d.lastSeenAt-l.lastSeenAt),a=n.filter(l=>l.ongoing||r-l.lastSeenAt<=t);return{at:r,recentMs:t,groups:n,recentGroups:a.length,recentOccurrences:a.reduce((l,d)=>l+(d.ongoing?1:d.occurrences.filter(p=>r-p.at<=t).length),0)}}server(e,t,r,i){let u=P(i.requestId)??P(r.requestId),n=P(i.projectName)??P(t.project)??(u?this.projectOfRequest.get(u):void 0),a=P(r.method)??"GET",l=P(r.route)??"?",d=ze(r.status)??ze(t.status),p=ve(r.error),c=P(p.message)??P(e.message),f=P(p.name),g=`${a} ${l}${d?` \u2192 ${d}`:""}`,m=`server:${n??"?"}:${a} ${l}:${d??""}:${f??""}:${Tt(c)}`,h=this.record(m,"server",e,{title:g,...n?{where:n,project:n}:{},...c?{message:c}:{},...P(p.stack)?{stack:Gr(P(p.stack))}:{},...d!==void 0?{status:d}:{}},u,d);return u&&this.byRequest.set(u,{group:this.groups.get(m),occ:h}),this.trimRequests(),!0}browser(e,t,r){let i=P(t.message)??e.title,u=P(r.url)??P(r.route),n=`browser:${P(t.kind)}:${Tt(i)}`;return this.record(n,"browser",e,{title:i.split(`
|
|
90
90
|
`)[0].slice(0,160),...u?{where:$y(u)}:{},message:i,...P(t.stack)?{stack:Gr(P(t.stack))}:{}},P(r.requestId)),!0}external(e,t,r,i){let u=P(t.project)??P(r.projectName),n=P(t.host)??"?",a=P(t.method)??"GET",l=P(t.path)??"",d=P(t.error),p=i?String(i):d??"failed",c=`external:${u??"?"}:${n}:${a} ${$u(l)}:${i??Tt(d)}`;return this.record(c,"external",e,{title:`${a} ${n}${$u(l)} \u2192 ${p}`,where:`${u??"?"} \u2192 ${n}`,...u?{project:u}:{},...d?{message:d}:{},...i?{status:i}:{}},P(r.requestId),i),!0}queue(e,t,r){let i=P(t.queue)??"?",u=P(t.failedReason)??P(t.error)??e.message,n=P(t.project)??P(r.projectName),a=`queue:${i}:${P(t.name)??""}:${Tt(u)}`;return this.record(a,"queue",e,{title:`Job ${P(t.name)??""} failed on ${i}`.replace(/\s+/g," "),where:n?`${n} \xB7 ${i}`:i,...n?{project:n}:{},...u?{message:u}:{},...P(t.stack)?{stack:Gr(P(t.stack))}:{}},P(r.requestId)),!0}defer(e,t){return this.pending.push({event:e,kind:t,arrivedAt:this.now()}),this.pending.length>2e3&&this.pending.splice(0,this.pending.length-2e3),!1}settle(e){let t=e.event,r=ve(t.raw),i=ve(t.context),u=P(i.requestId),n=u?this.byRequest.get(u):void 0;if(n){e.kind==="span"&&!n.occ.stepId&&(n.occ.stepId=t.id),!n.occ.flowId&&P(i.flowId)&&(n.occ.flowId=P(i.flowId)),this.changed=!0;return}if(e.kind==="log"){let E=P(r.project)??P(i.projectName);if([...this.groups.values()].some(A=>A.kind==="server"&&(A.project===E||!A.project)&&Math.abs(A.lastSeenAt-t.timestamp)<3e3))return;let D=ve(ve(r.request).error),$=fp(P(D.message)??t.title);this.record(`log:${E??"?"}:${Tt($)}`,"log",t,{title:$.split(`
|
|
91
91
|
`)[0].slice(0,160),...E?{where:E,project:E}:{},message:$,...P(D.stack)?{stack:Gr(fp(P(D.stack)))}:{}},u);return}if(e.kind==="span"){let E=ve(r.span),D=P(E.name)??t.title.replace(/\s*\(\d+ms\)\s*✗?$/,""),$=P(i.projectName)??(u?this.projectOfRequest.get(u):void 0),A=P(t.message)??P(ve(E.error).message),I=this.record(`exception:${$??"?"}:${D}:${Tt(A)}`,"exception",t,{title:`${D} threw${A?`: ${A.split(`
|
|
92
|
-
`)[0].slice(0,100)}`:""}`,...$?{where:$,project:$}:{},...A?{message:A}:{}},u);u&&this.byRequest.set(u,{group:[...this.groups.values()].find(j=>j.occurrences.includes(I)),occ:I});return}let a=ze(r.status),l=P(r.method)??"GET",d=P(r.url)??"?",p=P(r.project),c=P(r.host),f=e.kind==="fetch"&&!a?"network error":String(a??"failed"),g=e.kind==="gateway"?`${l} ${c??""}${$u(d)} \u2192 ${f}`:`${l} ${$u(d)} \u2192 ${f}`,m=`request:${e.kind}:${p??c??""}:${l} ${$u(d)}:${f}`,h=this.record(m,"request",t,{title:g,where:e.kind==="gateway"?`gateway \u2192 ${p??c??"?"}`:"browser",...p?{project:p}:{},...a!==void 0?{status:a}:{},...e.kind==="gateway"?{message:Cy(r,a)}:{}},u,a);u&&this.byRequest.set(u,{group:this.groups.get(m),occ:h})}record(e,t,r,i,u,n){let a=ve(r.context),l=P(a.flowId),d=this.groups.get(e);d||(d={id:e,kind:t,...i,count:0,firstSeenAt:r.timestamp,lastSeenAt:r.timestamp,occurrences:[],flows:new Set,perMinute:new Map},this.groups.set(e,d),this.evict()),d.count+=1,d.firstSeenAt=Math.min(d.firstSeenAt,r.timestamp),r.timestamp>=d.lastSeenAt&&(d.lastSeenAt=r.timestamp,i.stack&&(d.stack=i.stack),i.message&&(d.message=i.message)),l&&d.flows.add(l);let p=Math.floor(r.timestamp/6e4);d.perMinute.set(p,(d.perMinute.get(p)??0)+1);for(let f of d.perMinute.keys())f<p-30&&d.perMinute.delete(f);let c={id:r.id,at:r.timestamp,...l?{flowId:l}:{},...u?{requestId:u}:{},...n!==void 0?{status:n}:{}};return d.occurrences.unshift(c),d.occurrences.sort((f,g)=>g.at-f.at),d.occurrences.length>20&&(d.occurrences.length=20),this.changed=!0,c}evict(){if(this.groups.size<=300)return;let e=[...this.groups.values()].sort((t,r)=>t.lastSeenAt-r.lastSeenAt)[0];e&&this.groups.delete(e.id)}trimRequests(){this.byRequest.size>5e3&&this.byRequest.delete(this.byRequest.keys().next().value)}};function By(e,t=Date.now()){let r=[],i=o(d=>({...d,count:d.count??1,firstSeenAt:d.at??t,lastSeenAt:d.at??t,occurrences:[],flowCount:0,spark:[],ongoing:!0}),"base");for(let d of
|
|
93
|
-
`),count:p.length,resource:"typecheck://errors",at:Math.max(...p.map(f=>ze(f.timestamp)??0))||t}))}let a=ve(e["process://cluster"]),l
|
|
94
|
-
`)}:P(d.lastTitle)?{message:P(d.lastTitle)}:{},resource:"process://cluster",...ze(d.lastSeenAt)!==void 0?{at:ze(d.lastSeenAt)}:{}}))}return r}s(By,"X$"),o(By,"standingErrors");var
|
|
92
|
+
`)[0].slice(0,100)}`:""}`,...$?{where:$,project:$}:{},...A?{message:A}:{}},u);u&&this.byRequest.set(u,{group:[...this.groups.values()].find(j=>j.occurrences.includes(I)),occ:I});return}let a=ze(r.status),l=P(r.method)??"GET",d=P(r.url)??"?",p=P(r.project),c=P(r.host),f=e.kind==="fetch"&&!a?"network error":String(a??"failed"),g=e.kind==="gateway"?`${l} ${c??""}${$u(d)} \u2192 ${f}`:`${l} ${$u(d)} \u2192 ${f}`,m=`request:${e.kind}:${p??c??""}:${l} ${$u(d)}:${f}`,h=this.record(m,"request",t,{title:g,where:e.kind==="gateway"?`gateway \u2192 ${p??c??"?"}`:"browser",...p?{project:p}:{},...a!==void 0?{status:a}:{},...e.kind==="gateway"?{message:Cy(r,a)}:{}},u,a);u&&this.byRequest.set(u,{group:this.groups.get(m),occ:h})}record(e,t,r,i,u,n){let a=ve(r.context),l=P(a.flowId),d=this.groups.get(e);d||(d={id:e,kind:t,...i,count:0,firstSeenAt:r.timestamp,lastSeenAt:r.timestamp,occurrences:[],flows:new Set,perMinute:new Map},this.groups.set(e,d),this.evict()),d.count+=1,d.firstSeenAt=Math.min(d.firstSeenAt,r.timestamp),r.timestamp>=d.lastSeenAt&&(d.lastSeenAt=r.timestamp,i.stack&&(d.stack=i.stack),i.message&&(d.message=i.message)),l&&d.flows.add(l);let p=Math.floor(r.timestamp/6e4);d.perMinute.set(p,(d.perMinute.get(p)??0)+1);for(let f of d.perMinute.keys())f<p-30&&d.perMinute.delete(f);let c={id:r.id,at:r.timestamp,...l?{flowId:l}:{},...u?{requestId:u}:{},...n!==void 0?{status:n}:{}};return d.occurrences.unshift(c),d.occurrences.sort((f,g)=>g.at-f.at),d.occurrences.length>20&&(d.occurrences.length=20),this.changed=!0,c}evict(){if(this.groups.size<=300)return;let e=[...this.groups.values()].sort((t,r)=>t.lastSeenAt-r.lastSeenAt)[0];e&&this.groups.delete(e.id)}trimRequests(){this.byRequest.size>5e3&&this.byRequest.delete(this.byRequest.keys().next().value)}};function By(e,t=Date.now()){let r=[],i=o(d=>({...d,count:d.count??1,firstSeenAt:d.at??t,lastSeenAt:d.at??t,occurrences:[],flowCount:0,spark:[],ongoing:!0}),"base");for(let d of $s(ve(e["build://failures"]).failures))r.push(i({id:`build:${P(d.fingerprint)??P(d.message)??"?"}`,kind:"build",title:`Build error${P(d.project)?` in ${P(d.project)}`:""}`,...P(d.file)?{where:P(d.file)}:{},...P(d.project)?{project:P(d.project)}:{},...P(d.message)?{message:P(d.message)}:{},resource:"build://failures",...ze(d.timestamp)!==void 0?{at:ze(d.timestamp)}:{}}));let u=$s(ve(e["typecheck://errors"]).errors),n=new Map;for(let d of u)n.set(P(d.project)??"workspace",[...n.get(P(d.project)??"workspace")??[],d]);for(let[d,p]of n){let c=p[0];r.push(i({id:`typecheck:${d}`,kind:"typecheck",title:`${p.length} type error${p.length===1?"":"s"} in ${d}`,where:[P(c.file),ze(c.line)].filter(f=>f!==void 0).join(":")||d,project:d,message:p.slice(0,5).map(f=>`${P(f.file)??""}${ze(f.line)!==void 0?`:${ze(f.line)}`:""} ${P(f.code)??""} ${P(f.message)??""}`.trim()).join(`
|
|
93
|
+
`),count:p.length,resource:"typecheck://errors",at:Math.max(...p.map(f=>ze(f.timestamp)??0))||t}))}let a=ve(e["process://cluster"]),l=$s(a.errors);for(let d of $s(a.services)){let p=P(d.state),c=P(d.project)??"?";if(p!=="crash-looping"&&p!=="wedged"&&d.buildFailed!==!0)continue;let f=l.filter(g=>g.project===c).map(g=>P(g.line)).filter(Boolean);r.push(i({id:`service:${c}:${p}`,kind:"service",title:p==="crash-looping"?`${c} keeps crashing`:p==="wedged"?`${c} is not answering`:`${c} failed to build`,where:c,project:c,...f.length?{message:f.slice(-6).join(`
|
|
94
|
+
`)}:P(d.lastTitle)?{message:P(d.lastTitle)}:{},resource:"process://cluster",...ze(d.lastSeenAt)!==void 0?{at:ze(d.lastSeenAt)}:{}}))}return r}s(By,"X$"),o(By,"standingErrors");var $s=o(e=>Array.isArray(e)?e.filter(t=>t&&typeof t=="object"):[],"arr");function Tt(e){return e?e.split(`
|
|
95
95
|
`)[0].replace(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,"<id>").replace(/\b[0-9A-HJKMNP-TV-Z]{26}\b/g,"<id>").replace(/0x[0-9a-f]+/gi,"<hex>").replace(/\d+/g,"#").slice(0,140):""}s(Tt,"en"),o(Tt,"norm");function $u(e){let t=(e.split("?")[0]??e).split("/");return t.map((r,i)=>{let u=t[i-1]??"";return/^\d+$/.test(r)&&!(/^(?:api|v)$/i.test(u)&&r.length<=2)||/^[0-9a-f]{16,}$/i.test(r)||/^[0-9a-f]{8}-[0-9a-f-]{27}$/i.test(r)?":id":r}).join("/")}s($u,"wo"),o($u,"routeShape");function $y(e){try{return new URL(e).pathname}catch{return e}}s($y,"oO"),o($y,"pagePath");function Gr(e){let t=e.split(`
|
|
96
96
|
`),r=t[0]??"",i=t.slice(1).filter(a=>/^\s*at /.test(a)),u=i.filter(a=>!/node_modules|node:internal|node:async_hooks|\(native\)|<anonymous>/.test(a)),n=(u.length?u:i).slice(0,8);return[r,...n].join(`
|
|
97
|
-
`)}s(Gr,"
|
|
97
|
+
`)}s(Gr,"$a"),o(Gr,"appFrames");function fp(e){return e.replace(/^\[Nest\]\s+\d+\s+-\s+[^A-Z]*?\s+(?:ERROR|WARN)\s+(?:\[[^\]]+\]\s+)?/,"")}s(fp,"W$"),o(fp,"stripNestPrefix");function Cy(e,t){let r=Array.isArray(e.steps)?e.steps:[],i=r[r.length-1],u=i?P(i.step):void 0;return t===503?`the gateway answered 503${u?` after "${u}"`:""} \u2014 the service did not become ready (cold start or crash)`:t===502?"the gateway could not reach the service (502)":t===504?"the service did not answer in time (504)":`the gateway answered ${t??"with a failure"}${u?` after "${u}"`:""}`}s(Cy,"iO"),o(Cy,"gatewayReason");function xy(e){let t=JSON.stringify(e.base),r=encodeURIComponent(e.assetVersion),i=`${ky(e.base)}/assets/dashboard-ui`,u=e.assetsReady?"":'<div class="lm-missing"><strong>The dashboard UI is not built.</strong><br>Run <code>yarn nx run @lensmcp/lensmcp-mcp:bundle</code> and reload. The data endpoints under <code>/api</code> are live.</div>';return`<!doctype html>
|
|
98
98
|
<html lang="en">
|
|
99
99
|
<head>
|
|
100
100
|
<meta charset="utf-8">
|
|
@@ -121,10 +121,10 @@ ${e.assetsReady?`<link rel="stylesheet" href="${i}/app.css?v=${r}">
|
|
|
121
121
|
<div id="root">${u}</div>
|
|
122
122
|
<noscript><div class="lm-missing">The LensMCP dashboard needs JavaScript.</div></noscript>
|
|
123
123
|
</body>
|
|
124
|
-
</html>`}s(xy,"H$"),o(xy,"renderShell");var Yx='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect x="3" y="3" width="26" height="26" fill="#0a1826" stroke="#79dcff" stroke-width="2"/><path d="M16 3v26M3 16h26" stroke="#79dcff" stroke-opacity=".5"/><circle cx="16" cy="16" r="4" fill="#79dcff"/></svg>';function gp(e){return e.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}s(gp,"Y$"),o(gp,"escapeHtml");function ky(e){return gp(e)}s(ky,"aO"),o(ky,"escapeAttr"),process.env.LENSMCP_EVENT_FILE??=`${process.cwd()}/.lensmcp/events.jsonl`,V6("dashboard");var{session:Be,flows:Ay}=P6(),Qx=Date.now(),Mt=process.cwd()
|
|
124
|
+
</html>`}s(xy,"H$"),o(xy,"renderShell");var Yx='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect x="3" y="3" width="26" height="26" fill="#0a1826" stroke="#79dcff" stroke-width="2"/><path d="M16 3v26M3 16h26" stroke="#79dcff" stroke-opacity=".5"/><circle cx="16" cy="16" r="4" fill="#79dcff"/></svg>';function gp(e){return e.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}s(gp,"Y$"),o(gp,"escapeHtml");function ky(e){return gp(e)}s(ky,"aO"),o(ky,"escapeAttr"),process.env.LENSMCP_EVENT_FILE??=`${process.cwd()}/.lensmcp/events.jsonl`,V6("dashboard");var{session:Be,flows:Ay}=P6(),Qx=Date.now(),Mt=process.cwd(),Cs=Number(process.env.LENSMCP_DASHBOARD_PORT??4321),ft=(process.env.LENSMCP_DASHBOARD_BASE??"").replace(/\/+$/,""),hp=process.env.LENSMCP_WS_KEY||ft.replace(/^\//,"")||Vy(Mt),_y=process.env.LENSMCP_WS_KEY??"",vp=(()=>{try{let e=JSON.parse(jp(`${Mt}/.lensmcp/config.json`,"utf8")).key;return typeof e=="string"&&/^[\w.-]+$/.test(e)?e:""}catch{return""}})();function Iy(e){let t=process.env.TMPDIR??"/tmp";if(_y)return`${t}/${_y}/${e}-devserver`;let r=`${t}/${e}-devserver`;return vp&&!zp(r)&&zp(`${t}/${vp}/${e}-devserver`)?`${t}/${vp}/${e}-devserver`:r}s(Iy,"fO"),o(Iy,"podSockDir");var gt=process.env.LENSMCP_DASHBOARD_BIND??"127.0.0.1",Pt=gt==="127.0.0.1"||gt==="::1"||gt==="localhost",xs=q6(process.env,Mt,Pt),yp=xs.token,Re=new Hx,xe=new qx(5e3),ks=new Lx,Cu=new Jx(void 0,Ay),e7=new Kx,Ep=new Xx,Ut=new Ux({root:Mt,podSockDir:Iy,onChange:o(()=>{wp.kick(),Ry.kick()},"onChange")});async function Kr(e){try{return await Be.resources.read(e)}catch{return}}s(Kr,"Ra"),o(Kr,"readResource");async function bp(e){let t={};return await Promise.all(e.map(async r=>{let i=await Kr(r);i!==void 0&&(t[r]=i)})),t}s(bp,"o_"),o(bp,"readResources");var t7=new ty,Sy=new ty,Zt=[];function Fy(e){t7.firstTime(e.id)&&(Zt.push(xe.append(e)),Zt.length>2e3&&Zt.splice(0,Zt.length-2e3),ks.observe(e),Cu.observe(e),op(e)&&u7.kick(),Ep.observe(e)&&Xr.kick(),Sy.firstTime(e.id)&&Ut.reduce(e))}s(Fy,"hO"),o(Fy,"onBusEvent");function zy(){try{let e=process.env.LENSMCP_EVENT_FILE??`${Mt}/.lensmcp/events.jsonl`;for(let t of W6(e,8*1024*1024,25e3))try{let r=JSON.parse(t);if(!r||r.source!=="gateway"&&!K6.has(r.source))continue;Sy.firstTime(r.id)&&Ut.reduce(r)}catch{}}catch{}}s(zy,"vO"),o(zy,"replayClusterTail");var Dp,Hr=[],wp=mt(async()=>{let e=await Kr("process://cluster");Dp=Ut.view({processCluster:e,kpis:ks}),Re.publish({type:"cluster",data:Dp}),Yr.kick()},250),Bp=mt(()=>{Hr=Cu.summaries(Ve()),Re.publish({type:"flows",data:{flows:Hr}})&&Yr.kick()},300),u7=mt(()=>{let e=Cu.drainRevs();e.length&&Re.publish({type:"flow-rev",data:e}),Bp.kick()},300),$p=mt(async()=>{let e=await bp(my),t=by({resources:e,flows:Hr,flowOfEvent:o(r=>Cu.flowOfEvent(r),"flowOfEvent"),evidence:Cu.evidence(Ve())},e7);Re.publish({type:"diagnostics",data:t})},1e3),jy=["build://failures","typecheck://errors","process://cluster"],Xr=mt(async()=>{let e=By(await bp(jy));Re.publish({type:"errors",data:Ep.snapshot(e)})},500),Yr=mt(async()=>{Re.publish({type:"session",data:await Oy()})},500),Ny=o(()=>{Re.publish({type:"kpis",data:ks.snapshot()})},"kpiPush");setInterval(()=>{if(Zt.length===0)return;let e=Zt.splice(0,Zt.length);Re.publishLogs({type:"logs",data:{seq:xe.seq,sources:xe.sources(),lines:e.slice(-500)}})},250).unref(),setInterval(Ny,2e3).unref(),setInterval(()=>wp.kick(),3e3).unref(),setInterval(()=>$p.kick(),1e4).unref(),setInterval(()=>{Ep.flush()&&Xr.kick()},500).unref(),setInterval(()=>Xr.kick(),15e3).unref(),setInterval(()=>Yr.kick(),5e3).unref(),Be.bus.subscribe(Fy),zy(),Be.resources.subscribe("flow://recent",()=>Bp.kick());for(let e of my)Be.resources.subscribe(e,()=>$p.kick());Be.resources.subscribe("agent://current-status",()=>Yr.kick());for(let e of jy)Be.resources.subscribe(e,()=>Xr.kick());async function Oy(){let e=await Kr("agent://current-status")??{},t=Dp??Ut.view({kpis:ks}),r=[],i=t.hosts.filter(l=>!l.v4||!l.v6);i.length&&r.push({id:"hosts",title:`${i.length} host${i.length===1?" does":"s do"} not resolve to this machine`,detail:`${i.map(l=>l.host).join(", ")} \u2014 requests to ${i.length===1?"it":"them"} fail until /etc/hosts maps ${i.length===1?"it":"them"} to 127.0.0.1 and ::1.`,...t.hostsFix?{fix:t.hostsFix}:{}}),t.gateway.state==="down"&&r.push({id:"gateway",title:"The dev gateway is not running",detail:t.gateway.evidence,fix:"lensmcp gateway start"});let u=[...e.blocking??[],...e.warnings??[]].map(l=>(l.title??"").split(" \u2014 ")[0].trim()).filter(Boolean),n=e.status??"starting",a=u.length?u.slice(0,3).join(" \xB7 ")+(u.length>3?` \xB7 +${u.length-3} more`:""):n==="clean"?"Nothing is failing":"Waiting for the first signals";return{phase:r.length?"setup-incomplete":Hr.length===0?"empty":"live",gateway:t.gateway,status:n,headline:a,flowCount:Hr.length,eventCount:xe.seq,setupIssues:r}}s(Oy,"bO"),o(Oy,"sessionView");var xu=new Set,Ry=mt(()=>{if(xu.size===0)return;let e=`event: update
|
|
125
125
|
data: `+JSON.stringify(Ut.legacyView())+`
|
|
126
126
|
|
|
127
127
|
`;for(let t of xu)try{t.write(e)}catch{xu.delete(t)}},80);setInterval(()=>{xu.size>0&&Ry.kick()},3e3).unref();function Ty(e,t=!1,r){return py(Ve(),e,{includeRaw:t,rev:Cu.rev(e),config:Ay,...r!==void 0?{segmentId:r}:{}})}s(Ty,"wO"),o(Ty,"flowDetail");async function My(){let e=Be.resources.list().sort(),t={};return await Promise.all(e.map(async r=>{try{t[r]=await Be.resources.read(r)}catch(i){t[r]={__error:i instanceof Error?i.message:String(i)}}})),{at:Date.now(),count:e.length,resources:t}}s(My,"xO"),o(My,"snapshot");var Py=["./dashboard-ui/","../../../libs/cli/bundled/dashboard-ui/"].map(e=>new URL(e,import.meta.url)),r7=/^[A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]+)*$/,n7={js:"application/javascript; charset=utf-8",css:"text/css; charset=utf-8",woff2:"font/woff2",woff:"font/woff",svg:"image/svg+xml",png:"image/png",json:"application/json",map:"application/json"};function Uy(e){if(!(!r7.test(e)||e.split("/").some(t=>t===".."||t===".")))for(let t of Py)try{let r=new URL(e,t),i=Np(r);if(!i.isFile())continue;return{body:jp(r),mtimeMs:i.mtimeMs}}catch{}}s(Uy,"kO"),o(Uy,"findAsset");function Cp(){for(let e of Py)try{return String(Math.round(Np(new URL("app.js",e)).mtimeMs))}catch{}}s(Cp,"l_"),o(Cp,"uiAssetVersion"),Cp()||console.warn("[lensmcp] dashboard: the UI bundle (dashboard-ui/app.js) was not found beside the dashboard or in libs/cli/bundled/ \u2014 the page will ask for a rebuild. Build it: yarn nx run @lensmcp/lensmcp-mcp:bundle");function De(e,t,r){e.writeHead(t,{"content-type":"application/json","cache-control":"no-store"}),e.end(JSON.stringify(r))}s(De,"Re"),o(De,"json");var xp=Jy((e,t)=>{let r;try{r=new URL(e.url??"/","http://localhost")}catch{t.writeHead(400,{"content-type":"text/plain"}),t.end("bad request target");return}let i=Z6(Pt,e.headers.host);if(!i.ok){De(t,i.status,{error:i.error});return}let u=r.pathname;if(ft){if(u===ft){t.writeHead(302,{location:ft+"/"+r.search}),t.end();return}u.startsWith(ft+"/")&&(u=u.slice(ft.length))}if(yp&&J6(u)&&!L6(yp,e.headers.authorization,r.searchParams.get(ep))){t.writeHead(401,{"content-type":"application/json","www-authenticate":'Bearer realm="lensmcp-dashboard"',"cache-control":"no-store"}),t.end(JSON.stringify({error:`unauthorized \u2014 this dashboard is bound to ${gt}, so it requires the workspace token`}));return}if(u==="/api/stream"){let a=Number(r.searchParams.get("logsSince")??"0"),l=a>0?xe.since(a,2e3):xe.recent(1500),d=[{type:"hello",data:{protocol:1,sessionId:Be.id,startedAt:Qx,rawAllowed:Pt,workspace:{key:hp,name:hp,base:ft},logSeq:xe.seq}},{type:"logs",data:{seq:xe.seq,sources:xe.sources(),lines:l}}];Re.attach(t,d);for(let[p,c]of[["cluster",wp],["flows",Bp],["diagnostics",$p],["session",Yr],["errors",Xr]])Re.latestData(p)===void 0&&c.kick();Re.latestData("kpis")===void 0&&Ny();return}if(u==="/api/cluster/stream"){t.writeHead(200,{"content-type":"text/event-stream","cache-control":"no-store",connection:"keep-alive"}),t.write(`event: snapshot
|
|
128
128
|
data: `+JSON.stringify(Ut.legacyView())+`
|
|
129
129
|
|
|
130
|
-
`),xu.add(t),e.on("close",()=>xu.delete(t));return}if(u==="/api/cluster"){De(t,200,Ut.legacyView());return}if(u==="/api/snapshot"){My().then(a=>De(t,200,a)).catch(a=>De(t,500,{error:a instanceof Error?a.message:String(a)}));return}if(u==="/api/resources"){let a=Be.resources.list().sort().map(l=>({uri:l,scheme:l.split("://")[0]??l,revision:Be.resources.revision(l)}));De(t,200,{resources:a});return}if(u==="/api/resource"){let a=r.searchParams.get("uri")??"";if(!Be.resources.list().includes(a)){De(t,404,{error:`unknown resource: ${a}`});return}Kr(a).then(l=>De(t,200,{uri:a,revision:Be.resources.revision(a),value:l}));return}if(u==="/api/flow"){let a=r.searchParams.get("id")??"",l=r.searchParams.get("raw")==="1";if(l&&!Pt){De(t,403,{error:"raw AI payloads are served only on a loopback-bound dashboard; unset LENSMCP_DASHBOARD_BIND"});return}let d=r.searchParams.get("segment");De(t,200,Ty(a,l,d!==null&&d.length>0&&d.length<=512?d:void 0));return}if(u==="/api/ai-call"){if(!Pt){De(t,403,{error:"AI call content is served only on a loopback-bound dashboard; unset LENSMCP_DASHBOARD_BIND"});return}let a=r.searchParams.get("id")??"";if(!
|
|
130
|
+
`),xu.add(t),e.on("close",()=>xu.delete(t));return}if(u==="/api/cluster"){De(t,200,Ut.legacyView());return}if(u==="/api/snapshot"){My().then(a=>De(t,200,a)).catch(a=>De(t,500,{error:a instanceof Error?a.message:String(a)}));return}if(u==="/api/resources"){let a=Be.resources.list().sort().map(l=>({uri:l,scheme:l.split("://")[0]??l,revision:Be.resources.revision(l)}));De(t,200,{resources:a});return}if(u==="/api/resource"){let a=r.searchParams.get("uri")??"";if(!Be.resources.list().includes(a)){De(t,404,{error:`unknown resource: ${a}`});return}Kr(a).then(l=>De(t,200,{uri:a,revision:Be.resources.revision(a),value:l}));return}if(u==="/api/flow"){let a=r.searchParams.get("id")??"",l=r.searchParams.get("raw")==="1";if(l&&!Pt){De(t,403,{error:"raw AI payloads are served only on a loopback-bound dashboard; unset LENSMCP_DASHBOARD_BIND"});return}let d=r.searchParams.get("segment");De(t,200,Ty(a,l,d!==null&&d.length>0&&d.length<=512?d:void 0));return}if(u==="/api/ai-call"){if(!Pt){De(t,403,{error:"AI call content is served only on a loopback-bound dashboard; unset LENSMCP_DASHBOARD_BIND"});return}let a=r.searchParams.get("id")??"";if(!Ni(a)){De(t,400,{error:"invalid ai call id"});return}let l=md(process.env.LENSMCP_EVENT_FILE??`${Mt}/.lensmcp/events.jsonl`,a);if(!l){De(t,404,{error:"no captured content for this call \u2014 not captured (LENSMCP_AI_CAPTURE=content), or rotated away"});return}De(t,200,l);return}if(u==="/api/logs"){let a=Number(r.searchParams.get("since")??"0"),l=r.searchParams.get("flow")??void 0,d=r.searchParams.get("q")??void 0,p=Number(r.searchParams.get("around")??""),c=Math.min(6e4,Math.max(100,Number(r.searchParams.get("window")??"5000")||5e3)),f=Math.min(5e3,Math.max(1,Number(r.searchParams.get("limit")??"2000")||2e3)),g=l||d||Number.isFinite(p)&&p>0?xe.query({since:a,...l?{flowId:l}:{},...d?{q:d}:{},...Number.isFinite(p)&&p>0?{from:p-c,to:p+c}:{},limit:f}):a>0?xe.since(a,f):xe.recent(f);De(t,200,{seq:xe.seq,sources:xe.sources(),events:g});return}if(u.startsWith("/api/")){De(t,404,{error:`no such endpoint: ${u}`});return}if(u.startsWith("/assets/dashboard-ui/")){let a=u.slice(21),l=Uy(a);if(!l){t.writeHead(404,{"content-type":"text/plain"}),t.end("asset not bundled");return}let d=a.split(".").pop()??"",p=/^(?:chunks|media)\//.test(a),c=`"${Ly("sha1").update(l.body).digest("hex").slice(0,16)}"`;if(!p&&e.headers["if-none-match"]===c){t.writeHead(304,{etag:c}),t.end();return}t.writeHead(200,{"content-type":n7[d]??"application/octet-stream","cache-control":p?"public, max-age=31536000, immutable":"no-cache",...p?{}:{etag:c}}),t.end(l.body);return}let n=Cp();t.writeHead(200,{"content-type":"text/html; charset=utf-8","cache-control":"no-store"}),t.end(xy({base:ft,title:`LensMCP \xB7 ${hp}`,assetsReady:!!n,assetVersion:n??"0"}))});xp.on("error",e=>{throw e.code==="EADDRINUSE"&&(console.error(`[lensmcp] dashboard: port ${Cs} is already in use (an orphaned dashboard from a crashed gateway?) \u2014 exiting.`),process.exit(1)),e}),xp.listen(Cs,gt,()=>{let e=Be.resources.list().length;console.error(`[lensmcp] dashboard \u2192 http://${Pt?"localhost":gt}:${Cs} (${e} resources registered)`),Pt||(console.error(`[lensmcp] WARNING: dashboard bound to ${gt} \u2014 reachable beyond this machine.`),console.error(yp?`[lensmcp] its data endpoints require a token (${xs.source==="env"?"LENSMCP_DASHBOARD_TOKEN":tp(Mt)}). Open the page as http://${gt}:${Cs}/?${ep}=YOUR_TOKEN`:`[lensmcp] WARNING: it serves workspace telemetry with NO authentication${xs.source==="unavailable"?` (could not establish a token: ${xs.reason})`:" (LENSMCP_ALLOW_INSECURE=1)"}. Unset LENSMCP_DASHBOARD_BIND to restore loopback.`))}),process.on("uncaughtException",e=>{console.error("[lensmcp] dashboard: uncaught exception (contained):",e)});function kp(e){Re.close(),xp.close(),Be.stop().catch(()=>{}).finally(()=>process.exit(e==="SIGINT"?130:0))}s(kp,"d_"),o(kp,"shutdown"),process.on("SIGINT",kp),process.on("SIGTERM",kp);
|