@sentry/junior-dashboard 0.141.0 → 0.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +4 -1
- package/dist/client/api.d.ts +4 -0
- package/dist/client/components/Tooltip.d.ts +2 -1
- package/dist/client.js +3 -3
- package/dist/index.js +4 -1
- package/package.json +3 -3
- package/src/client/components/Tooltip.tsx +3 -1
- package/src/client/pages/system/GuardianActivity.tsx +2 -1
- package/src/client/pages/tasks/TaskDetailsDrawer.tsx +4 -4
- package/src/client/pages/tasks/TaskExecutionsPage.tsx +2 -2
- package/src/client/pages/tasks/TasksPage.tsx +5 -4
- package/src/mock-reporting/fixtures.ts +3 -0
package/dist/client.js
CHANGED
|
@@ -72,7 +72,7 @@ Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}
|
|
|
72
72
|
|
|
73
73
|
`)}g.write("payload.value = newResult;"),g.write("return payload;");let b=g.compile();return(B,C)=>b(p,B,C)},r,i=hs,A=!bs.jitless,c=A&&dk.value,u=t.catchall,l;e._zod.parse=(p,g)=>{l??(l=o.value);let m=p.value;return i(m)?A&&c&&g?.async===!1&&g.jitless!==!0?(r||(r=a(t.shape)),p=r(p,g),u?eL([],m,p,g,l,e):p):n(p,g):(p.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),p)}});function j3(e,t,n,o){for(let r of e)if(r.issues.length===0)return t.value=r.value,t;let a=e.filter(r=>!mA(r));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(r=>r.issues.map(i=>oa(i,o,Ut())))}),t)}var zl=I("$ZodUnion",(e,t)=>{ie.init(e,t),he(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),he(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),he(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),he(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>Nl(a.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,a)=>{if(n)return n(o,a);let r=!1,i=[];for(let A of t.options){let s=A._zod.run({value:o.value,issues:[]},a);if(s instanceof Promise)i.push(s),r=!0;else{if(s.issues.length===0)return s;i.push(s)}}return r?Promise.all(i).then(A=>j3(A,o,e,a)):j3(i,o,e,a)}});function P3(e,t,n,o){let a=e.filter(r=>r.issues.length===0);return a.length===1?(t.value=a[0].value,t):(a.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(r=>r.issues.map(i=>oa(i,o,Ut())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var tQ=I("$ZodXor",(e,t)=>{zl.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,a)=>{if(n)return n(o,a);let r=!1,i=[];for(let A of t.options){let s=A._zod.run({value:o.value,issues:[]},a);s instanceof Promise?(i.push(s),r=!0):i.push(s)}return r?Promise.all(i).then(A=>P3(A,o,e,a)):P3(i,o,e,a)}}),nQ=I("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,zl.init(e,t);let n=e._zod.parse;he(e._zod,"propValues",()=>{let a={};for(let r of t.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let[A,s]of Object.entries(i)){a[A]||(a[A]=new Set);for(let c of s)a[A].add(c)}}return a});let o=gu(()=>{let a=t.options,r=new Map;for(let i of a){let A=i._zod.propValues?.[t.discriminator];if(!A||A.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let s of A){if(r.has(s))throw new Error(`Duplicate discriminator value "${String(s)}"`);r.set(s,i)}}return r});e._zod.parse=(a,r)=>{let i=a.value;if(!hs(i))return a.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),a;let A=o.value.get(i?.[t.discriminator]);return A?A._zod.run(a,r):t.unionFallback||r.direction==="backward"?n(a,r):(a.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:i,path:[t.discriminator],inst:e}),a)}}),aQ=I("$ZodIntersection",(e,t)=>{ie.init(e,t),e._zod.parse=(n,o)=>{let a=n.value,r=t.left._zod.run({value:a,issues:[]},o),i=t.right._zod.run({value:a,issues:[]},o);return r instanceof Promise||i instanceof Promise?Promise.all([r,i]).then(([s,c])=>G3(n,s,c)):G3(n,r,i)}});function f0(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(gA(e)&&gA(t)){let n=Object.keys(t),o=Object.keys(e).filter(r=>n.indexOf(r)!==-1),a={...e,...t};for(let r of o){let i=f0(e[r],t[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};a[r]=i.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let a=e[o],r=t[o],i=f0(a,r);if(!i.valid)return{valid:!1,mergeErrorPath:[o,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function G3(e,t,n){let o=new Map,a;for(let A of t.issues)if(A.code==="unrecognized_keys"){a??(a=A);for(let s of A.keys)o.has(s)||o.set(s,{}),o.get(s).l=!0}else e.issues.push(A);for(let A of n.issues)if(A.code==="unrecognized_keys")for(let s of A.keys)o.has(s)||o.set(s,{}),o.get(s).r=!0;else e.issues.push(A);let r=[...o].filter(([,A])=>A.l&&A.r).map(([A])=>A);if(r.length&&a&&e.issues.push({...a,keys:r}),mA(e))return e;let i=f0(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}var db=I("$ZodTuple",(e,t)=>{ie.init(e,t);let n=t.items;e._zod.parse=(o,a)=>{let r=o.value;if(!Array.isArray(r))return o.issues.push({input:r,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let i=[],A=H3(n,"optin"),s=H3(n,"optout");if(!t.rest){if(r.length<A)return o.issues.push({code:"too_small",minimum:A,inclusive:!0,input:r,inst:e,origin:"array"}),o;r.length>n.length&&o.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:r,inst:e,origin:"array"})}let c=new Array(n.length);for(let u=0;u<n.length;u++){let l=n[u]._zod.run({value:r[u],issues:[]},a);l instanceof Promise?i.push(l.then(p=>{c[u]=p})):c[u]=l}if(t.rest){let u=n.length-1,l=r.slice(n.length);for(let p of l){u++;let g=t.rest._zod.run({value:p,issues:[]},a);g instanceof Promise?i.push(g.then(m=>U3(m,o,u))):U3(g,o,u)}}return i.length?Promise.all(i).then(()=>T3(c,o,n,r,s)):T3(c,o,n,r,s)}});function H3(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function U3(e,t,n){e.issues.length&&t.issues.push(...Ea(n,e.issues)),t.value[n]=e.value}function T3(e,t,n,o,a){for(let r=0;r<n.length;r++){let i=e[r],A=r<o.length;if(i.issues.length){if(!A&&r>=a){t.value.length=r;break}t.issues.push(...Ea(r,i.issues))}t.value[r]=i.value}for(let r=t.value.length-1;r>=o.length&&(n[r]._zod.optout==="optional"&&t.value[r]===void 0);r--)t.value.length=r;return t}var oQ=I("$ZodRecord",(e,t)=>{ie.init(e,t),e._zod.parse=(n,o)=>{let a=n.value;if(!gA(a))return n.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),n;let r=[],i=t.keyType._zod.values;if(i){n.value={};let A=new Set;for(let c of i)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){A.add(typeof c=="number"?c.toString():c);let u=t.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(g=>oa(g,o,Ut())),input:c,path:[c],inst:e});continue}let l=u.value,p=t.valueType._zod.run({value:a[c],issues:[]},o);p instanceof Promise?r.push(p.then(g=>{g.issues.length&&n.issues.push(...Ea(c,g.issues)),n.value[l]=g.value})):(p.issues.length&&n.issues.push(...Ea(c,p.issues)),n.value[l]=p.value)}let s;for(let c in a)A.has(c)||(s=s??[],s.push(c));s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:s})}else{n.value={};for(let A of Reflect.ownKeys(a)){if(A==="__proto__"||!Object.prototype.propertyIsEnumerable.call(a,A))continue;let s=t.keyType._zod.run({value:A,issues:[]},o);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof A=="string"&&nb.test(A)&&s.issues.length){let l=t.keyType._zod.run({value:Number(A),issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");l.issues.length===0&&(s=l)}if(s.issues.length){t.mode==="loose"?n.value[A]=a[A]:n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(l=>oa(l,o,Ut())),input:A,path:[A],inst:e});continue}let u=t.valueType._zod.run({value:a[A],issues:[]},o);u instanceof Promise?r.push(u.then(l=>{l.issues.length&&n.issues.push(...Ea(A,l.issues)),n.value[s.value]=l.value})):(u.issues.length&&n.issues.push(...Ea(A,u.issues)),n.value[s.value]=u.value)}}return r.length?Promise.all(r).then(()=>n):n}}),rQ=I("$ZodMap",(e,t)=>{ie.init(e,t),e._zod.parse=(n,o)=>{let a=n.value;if(!(a instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:a,inst:e}),n;let r=[];n.value=new Map;for(let[i,A]of a){let s=t.keyType._zod.run({value:i,issues:[]},o),c=t.valueType._zod.run({value:A,issues:[]},o);s instanceof Promise||c instanceof Promise?r.push(Promise.all([s,c]).then(([u,l])=>{O3(u,l,n,i,a,e,o)})):O3(s,c,n,i,a,e,o)}return r.length?Promise.all(r).then(()=>n):n}});function O3(e,t,n,o,a,r,i){e.issues.length&&($l.has(typeof o)?n.issues.push(...Ea(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:a,inst:r,issues:e.issues.map(A=>oa(A,i,Ut()))})),t.issues.length&&($l.has(typeof o)?n.issues.push(...Ea(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:a,inst:r,key:o,issues:t.issues.map(A=>oa(A,i,Ut()))})),n.value.set(e.value,t.value)}var iQ=I("$ZodSet",(e,t)=>{ie.init(e,t),e._zod.parse=(n,o)=>{let a=n.value;if(!(a instanceof Set))return n.issues.push({input:a,inst:e,expected:"set",code:"invalid_type"}),n;let r=[];n.value=new Set;for(let i of a){let A=t.valueType._zod.run({value:i,issues:[]},o);A instanceof Promise?r.push(A.then(s=>q3(s,n))):q3(A,n)}return r.length?Promise.all(r).then(()=>n):n}});function q3(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var AQ=I("$ZodEnum",(e,t)=>{ie.init(e,t);let n=Rl(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(a=>$l.has(typeof a)).map(a=>typeof a=="string"?po(a):a.toString()).join("|")})$`),e._zod.parse=(a,r)=>{let i=a.value;return o.has(i)||a.issues.push({code:"invalid_value",values:n,input:i,inst:e}),a}}),sQ=I("$ZodLiteral",(e,t)=>{if(ie.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?po(o):o?po(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,a)=>{let r=o.value;return n.has(r)||o.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),o}}),cQ=I("$ZodFile",(e,t)=>{ie.init(e,t),e._zod.parse=(n,o)=>{let a=n.value;return a instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:a,inst:e}),n}}),uQ=I("$ZodTransform",(e,t)=>{ie.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new dA(e.constructor.name);let a=t.transform(n.value,n);if(o.async)return(a instanceof Promise?a:Promise.resolve(a)).then(i=>(n.value=i,n.fallback=!0,n));if(a instanceof Promise)throw new Ro;return n.value=a,n.fallback=!0,n}});function z3(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var lb=I("$ZodOptional",(e,t)=>{ie.init(e,t),e._zod.optin="optional",e._zod.optout="optional",he(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),he(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Nl(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let a=n.value,r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>z3(i,a)):z3(r,a)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),dQ=I("$ZodExactOptional",(e,t)=>{lb.init(e,t),he(e._zod,"values",()=>t.innerType._zod.values),he(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),lQ=I("$ZodNullable",(e,t)=>{ie.init(e,t),he(e._zod,"optin",()=>t.innerType._zod.optin),he(e._zod,"optout",()=>t.innerType._zod.optout),he(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Nl(n.source)}|null)$`):void 0}),he(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),pQ=I("$ZodDefault",(e,t)=>{ie.init(e,t),e._zod.optin="optional",he(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let a=t.innerType._zod.run(n,o);return a instanceof Promise?a.then(r=>Y3(r,t)):Y3(a,t)}});function Y3(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var gQ=I("$ZodPrefault",(e,t)=>{ie.init(e,t),e._zod.optin="optional",he(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),mQ=I("$ZodNonOptional",(e,t)=>{ie.init(e,t),he(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let a=t.innerType._zod.run(n,o);return a instanceof Promise?a.then(r=>K3(r,e)):K3(a,e)}});function K3(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var fQ=I("$ZodSuccess",(e,t)=>{ie.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new dA("ZodSuccess");let a=t.innerType._zod.run(n,o);return a instanceof Promise?a.then(r=>(n.value=r.issues.length===0,n)):(n.value=a.issues.length===0,n)}}),bQ=I("$ZodCatch",(e,t)=>{ie.init(e,t),e._zod.optin="optional",he(e._zod,"optout",()=>t.innerType._zod.optout),he(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let a=t.innerType._zod.run(n,o);return a instanceof Promise?a.then(r=>(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>oa(i,o,Ut()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(r=>oa(r,o,Ut()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),hQ=I("$ZodNaN",(e,t)=>{ie.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),pb=I("$ZodPipe",(e,t)=>{ie.init(e,t),he(e._zod,"values",()=>t.in._zod.values),he(e._zod,"optin",()=>t.in._zod.optin),he(e._zod,"optout",()=>t.out._zod.optout),he(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let r=t.out._zod.run(n,o);return r instanceof Promise?r.then(i=>rb(i,t.in,o)):rb(r,t.in,o)}let a=t.in._zod.run(n,o);return a instanceof Promise?a.then(r=>rb(r,t.out,o)):rb(a,t.out,o)}});function rb(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Yl=I("$ZodCodec",(e,t)=>{ie.init(e,t),he(e._zod,"values",()=>t.in._zod.values),he(e._zod,"optin",()=>t.in._zod.optin),he(e._zod,"optout",()=>t.out._zod.optout),he(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>ib(i,t,o)):ib(r,t,o)}else{let r=t.out._zod.run(n,o);return r instanceof Promise?r.then(i=>ib(i,t,o)):ib(r,t,o)}}});function ib(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let a=t.transform(e.value,e);return a instanceof Promise?a.then(r=>Ab(e,r,t.out,n)):Ab(e,a,t.out,n)}else{let a=t.reverseTransform(e.value,e);return a instanceof Promise?a.then(r=>Ab(e,r,t.in,n)):Ab(e,a,t.in,n)}}function Ab(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}var BQ=I("$ZodPreprocess",(e,t)=>{pb.init(e,t)}),yQ=I("$ZodReadonly",(e,t)=>{ie.init(e,t),he(e._zod,"propValues",()=>t.innerType._zod.propValues),he(e._zod,"values",()=>t.innerType._zod.values),he(e._zod,"optin",()=>t.innerType?._zod?.optin),he(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let a=t.innerType._zod.run(n,o);return a instanceof Promise?a.then(J3):J3(a)}});function J3(e){return e.value=Object.freeze(e.value),e}var CQ=I("$ZodTemplateLiteral",(e,t)=>{ie.init(e,t);let n=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let a=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!a)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let r=a.startsWith("^")?1:0,i=a.endsWith("$")?a.length-1:a.length;n.push(a.slice(r,i))}else if(o===null||pk.has(typeof o))n.push(po(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,a)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),wQ=I("$ZodFunction",(e,t)=>(ie.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let a=e._def.input?qf(e._def.input,o):o,r=Reflect.apply(n,this,a);return e._def.output?qf(e._def.output,r):r}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let a=e._def.input?await zf(e._def.input,o):o,r=await Reflect.apply(n,this,a);return e._def.output?await zf(e._def.output,r):r}},e._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new db({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),EQ=I("$ZodPromise",(e,t)=>{ie.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(a=>t.innerType._zod.run({value:a,issues:[]},o))}),kQ=I("$ZodLazy",(e,t)=>{ie.init(e,t),he(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),he(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),he(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),he(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),he(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),QQ=I("$ZodCustom",(e,t)=>{ot.init(e,t),ie.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,a=t.fn(o);if(a instanceof Promise)return a.then(r=>W3(r,n,o,e));W3(a,n,o,e)}});function W3(e,t,n,o){if(!e){let a={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(a.params=o._zod.def.params),t.issues.push(mu(a))}}var Jl={};F(Jl,{ar:()=>nL,az:()=>aL,be:()=>rL,bg:()=>iL,ca:()=>AL,cs:()=>sL,da:()=>cL,de:()=>uL,el:()=>dL,en:()=>gb,eo:()=>lL,es:()=>pL,fa:()=>gL,fi:()=>mL,fr:()=>fL,frCA:()=>bL,he:()=>hL,hr:()=>BL,hu:()=>yL,hy:()=>wL,id:()=>EL,is:()=>kL,it:()=>QL,ja:()=>IL,ka:()=>_L,kh:()=>vL,km:()=>mb,ko:()=>xL,lt:()=>FL,mk:()=>SL,ms:()=>LL,nl:()=>RL,no:()=>NL,ota:()=>$L,pl:()=>jL,ps:()=>ML,pt:()=>PL,ro:()=>GL,ru:()=>UL,sl:()=>TL,sv:()=>OL,ta:()=>qL,th:()=>zL,tr:()=>YL,ua:()=>KL,uk:()=>fb,ur:()=>JL,uz:()=>WL,vi:()=>ZL,yo:()=>eR,zhCN:()=>VL,zhTW:()=>XL});var MV=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.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 ${a.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${A}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${r}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${A}`}case"invalid_value":return a.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 ${N(a.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: ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${a.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${r} ${a.maximum.toString()} ${i.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 ${a.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${r} ${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${a.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${r} ${a.minimum.toString()} ${i.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${a.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${r} ${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.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 "${a.prefix}"`:r.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 "${r.suffix}"`:r.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 "${r.includes}"`:r.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 ${r.pattern}`:`${n[r.format]??a.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 ${a.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${a.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${a.keys.length>1?"\u0629":""}: ${v(a.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${a.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 ${a.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function nL(){return{localeError:MV()}}var jV=()=>{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(a){return e[a]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",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"},o={nan:"NaN"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${a.expected}, daxil olan ${A}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${r}, daxil olan ${A}`}case"invalid_value":return a.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${N(a.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${a.origin??"d\u0259y\u0259r"} ${r}${a.maximum.toString()} ${i.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${a.origin??"d\u0259y\u0259r"} ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${a.origin} ${r}${a.minimum.toString()} ${i.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${a.origin} ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${r.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:r.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${r.suffix}" il\u0259 bitm\u0259lidir`:r.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${r.includes}" daxil olmal\u0131d\u0131r`:r.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${r.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[r.format]??a.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${a.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${a.keys.length>1?"lar":""}: ${v(a.keys,", ")}`;case"invalid_key":return`${a.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${a.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function aL(){return{localeError:jV()}}function oL(e,t,n,o){let a=Math.abs(e),r=a%10,i=a%100;return i>=11&&i<=19?o:r===1?t:r>=2&&r<=4?n:o}var PV=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${a.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${A}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${r}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${A}`}case"invalid_value":return a.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 ${N(a.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 ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);if(i){let A=Number(a.maximum),s=oL(A,i.unit.one,i.unit.few,i.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 ${a.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${i.verb} ${r}${a.maximum.toString()} ${s}`}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 ${a.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);if(i){let A=Number(a.minimum),s=oL(A,i.unit.one,i.unit.few,i.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 ${a.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${i.verb} ${r}${a.minimum.toString()} ${s}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${a.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.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 "${r.prefix}"`:r.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 "${r.suffix}"`:r.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 "${r.includes}"`:r.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 ${r.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[r.format]??a.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 ${a.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${a.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${v(a.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${a.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 ${a.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function rL(){return{localeError:PV()}}var GV=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${a.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${A}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${r}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${A}`}case"invalid_value":return a.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${N(a.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 ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${a.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${r}${a.maximum.toString()} ${i.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 ${a.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${a.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${r}${a.minimum.toString()} ${i.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${a.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;if(r.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 "${r.prefix}"`;if(r.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 "${r.suffix}"`;if(r.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 "${r.includes}"`;if(r.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 ${r.pattern}`;let i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return r.format==="emoji"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),r.format==="datetime"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),r.format==="date"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),r.format==="time"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),r.format==="duration"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${i} ${n[r.format]??a.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 ${a.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${a.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${a.keys.length>1?"\u043E\u0432\u0435":""}: ${v(a.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${a.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 ${a.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function iL(){return{localeError:GV()}}var HV=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${a.expected}, s'ha rebut ${A}`:`Tipus inv\xE0lid: s'esperava ${r}, s'ha rebut ${A}`}case"invalid_value":return a.values.length===1?`Valor inv\xE0lid: s'esperava ${N(a.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${v(a.values," o ")}`;case"too_big":{let r=a.inclusive?"com a m\xE0xim":"menys de",i=t(a.origin);return i?`Massa gran: s'esperava que ${a.origin??"el valor"} contingu\xE9s ${r} ${a.maximum.toString()} ${i.unit??"elements"}`:`Massa gran: s'esperava que ${a.origin??"el valor"} fos ${r} ${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?"com a m\xEDnim":"m\xE9s de",i=t(a.origin);return i?`Massa petit: s'esperava que ${a.origin} contingu\xE9s ${r} ${a.minimum.toString()} ${i.unit}`:`Massa petit: s'esperava que ${a.origin} fos ${r} ${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${r.prefix}"`:r.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${r.suffix}"`:r.format==="includes"?`Format inv\xE0lid: ha d'incloure "${r.includes}"`:r.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${r.pattern}`:`Format inv\xE0lid per a ${n[r.format]??a.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${a.divisor}`;case"unrecognized_keys":return`Clau${a.keys.length>1?"s":""} no reconeguda${a.keys.length>1?"s":""}: ${v(a.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${a.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${a.origin}`;default:return"Entrada inv\xE0lida"}}};function AL(){return{localeError:HV()}}var UV=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${a.expected}, obdr\u017Eeno ${A}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${r}, obdr\u017Eeno ${A}`}case"invalid_value":return a.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${N(a.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${a.origin??"hodnota"} mus\xED m\xEDt ${r}${a.maximum.toString()} ${i.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${a.origin??"hodnota"} mus\xED b\xFDt ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${a.origin??"hodnota"} mus\xED m\xEDt ${r}${a.minimum.toString()} ${i.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${a.origin??"hodnota"} mus\xED b\xFDt ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${r.prefix}"`:r.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${r.suffix}"`:r.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${r.includes}"`:r.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${r.pattern}`:`Neplatn\xFD form\xE1t ${n[r.format]??a.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${a.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${v(a.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${a.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${a.origin}`;default:return"Neplatn\xFD vstup"}}};function sL(){return{localeError:UV()}}var TV=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(a){return e[a]??null}let n={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"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Ugyldigt input: forventede instanceof ${a.expected}, fik ${A}`:`Ugyldigt input: forventede ${r}, fik ${A}`}case"invalid_value":return a.values.length===1?`Ugyldig v\xE6rdi: forventede ${N(a.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin),A=o[a.origin]??a.origin;return i?`For stor: forventede ${A??"value"} ${i.verb} ${r} ${a.maximum.toString()} ${i.unit??"elementer"}`:`For stor: forventede ${A??"value"} havde ${r} ${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin),A=o[a.origin]??a.origin;return i?`For lille: forventede ${A} ${i.verb} ${r} ${a.minimum.toString()} ${i.unit}`:`For lille: forventede ${A} havde ${r} ${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Ugyldig streng: skal starte med "${r.prefix}"`:r.format==="ends_with"?`Ugyldig streng: skal ende med "${r.suffix}"`:r.format==="includes"?`Ugyldig streng: skal indeholde "${r.includes}"`:r.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${r.pattern}`:`Ugyldig ${n[r.format]??a.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${v(a.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${a.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${a.origin}`;default:return"Ugyldigt input"}}};function cL(){return{localeError:TV()}}var OV=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"Zahl",array:"Array"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${a.expected}, erhalten ${A}`:`Ung\xFCltige Eingabe: erwartet ${r}, erhalten ${A}`}case"invalid_value":return a.values.length===1?`Ung\xFCltige Eingabe: erwartet ${N(a.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Zu gro\xDF: erwartet, dass ${a.origin??"Wert"} ${r}${a.maximum.toString()} ${i.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${a.origin??"Wert"} ${r}${a.maximum.toString()} ist`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Zu klein: erwartet, dass ${a.origin} ${r}${a.minimum.toString()} ${i.unit} hat`:`Zu klein: erwartet, dass ${a.origin} ${r}${a.minimum.toString()} ist`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Ung\xFCltiger String: muss mit "${r.prefix}" beginnen`:r.format==="ends_with"?`Ung\xFCltiger String: muss mit "${r.suffix}" enden`:r.format==="includes"?`Ung\xFCltiger String: muss "${r.includes}" enthalten`:r.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${r.pattern} entsprechen`:`Ung\xFCltig: ${n[r.format]??a.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${a.divisor} sein`;case"unrecognized_keys":return`${a.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${v(a.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${a.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${a.origin}`;default:return"Ung\xFCltige Eingabe"}}};function uL(){return{localeError:OV()}}var qV=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return typeof a.expected=="string"&&/^[A-Z]/.test(a.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 ${a.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${A}`:`\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 ${r}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${A}`}case"invalid_value":return a.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 ${N(a.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 ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${a.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${r}${a.maximum.toString()} ${i.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 ${a.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${a.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${r}${a.minimum.toString()} ${i.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${a.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.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 "${r.prefix}"`:r.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 "${r.suffix}"`:r.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 "${r.includes}"`:r.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 ${r.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[r.format]??a.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 ${a.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${a.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${a.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${v(a.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${a.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 ${a.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function dL(){return{localeError:qV()}}var zV=()=>{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(a){return e[a]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return`Invalid input: expected ${r}, received ${A}`}case"invalid_value":return a.values.length===1?`Invalid input: expected ${N(a.values[0])}`:`Invalid option: expected one of ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Too big: expected ${a.origin??"value"} to have ${r}${a.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${a.origin??"value"} to be ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Too small: expected ${a.origin} to have ${r}${a.minimum.toString()} ${i.unit}`:`Too small: expected ${a.origin} to be ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Invalid string: must start with "${r.prefix}"`:r.format==="ends_with"?`Invalid string: must end with "${r.suffix}"`:r.format==="includes"?`Invalid string: must include "${r.includes}"`:r.format==="regex"?`Invalid string: must match pattern ${r.pattern}`:`Invalid ${n[r.format]??a.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${a.divisor}`;case"unrecognized_keys":return`Unrecognized key${a.keys.length>1?"s":""}: ${v(a.keys,", ")}`;case"invalid_key":return`Invalid key in ${a.origin}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Invalid discriminator value. Expected ${a.options.map(i=>`'${i}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${a.origin}`;default:return"Invalid input"}}};function gb(){return{localeError:zV()}}var YV=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${a.expected}, ricevi\u011Dis ${A}`:`Nevalida enigo: atendi\u011Dis ${r}, ricevi\u011Dis ${A}`}case"invalid_value":return a.values.length===1?`Nevalida enigo: atendi\u011Dis ${N(a.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Tro granda: atendi\u011Dis ke ${a.origin??"valoro"} havu ${r}${a.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${a.origin??"valoro"} havu ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Tro malgranda: atendi\u011Dis ke ${a.origin} havu ${r}${a.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${a.origin} estu ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${r.prefix}"`:r.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${r.suffix}"`:r.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${r.includes}"`:r.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}`:`Nevalida ${n[r.format]??a.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${a.divisor}`;case"unrecognized_keys":return`Nekonata${a.keys.length>1?"j":""} \u015Dlosilo${a.keys.length>1?"j":""}: ${v(a.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${a.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${a.origin}`;default:return"Nevalida enigo"}}};function lL(){return{localeError:YV()}}var KV=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(a){return e[a]??null}let n={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"},o={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 a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${a.expected}, recibido ${A}`:`Entrada inv\xE1lida: se esperaba ${r}, recibido ${A}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: se esperaba ${N(a.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin),A=o[a.origin]??a.origin;return i?`Demasiado grande: se esperaba que ${A??"valor"} tuviera ${r}${a.maximum.toString()} ${i.unit??"elementos"}`:`Demasiado grande: se esperaba que ${A??"valor"} fuera ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin),A=o[a.origin]??a.origin;return i?`Demasiado peque\xF1o: se esperaba que ${A} tuviera ${r}${a.minimum.toString()} ${i.unit}`:`Demasiado peque\xF1o: se esperaba que ${A} fuera ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${r.prefix}"`:r.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${r.suffix}"`:r.format==="includes"?`Cadena inv\xE1lida: debe incluir "${r.includes}"`:r.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${r.pattern}`:`Inv\xE1lido ${n[r.format]??a.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":return`Llave${a.keys.length>1?"s":""} desconocida${a.keys.length>1?"s":""}: ${v(a.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[a.origin]??a.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[a.origin]??a.origin}`;default:return"Entrada inv\xE1lida"}}};function pL(){return{localeError:KV()}}var JV=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${a.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${A} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${r} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${A} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return a.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${N(a.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 ${v(a.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${a.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${r}${a.maximum.toString()} ${i.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${a.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${r}${a.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${a.origin} \u0628\u0627\u06CC\u062F ${r}${a.minimum.toString()} ${i.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${a.origin} \u0628\u0627\u06CC\u062F ${r}${a.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let r=a;return r.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${r.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:r.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${r.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:r.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${r.includes}" \u0628\u0627\u0634\u062F`:r.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${r.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[r.format]??a.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 ${a.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${a.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${v(a.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${a.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 ${a.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function gL(){return{localeError:JV()}}var WV=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Virheellinen tyyppi: odotettiin instanceof ${a.expected}, oli ${A}`:`Virheellinen tyyppi: odotettiin ${r}, oli ${A}`}case"invalid_value":return a.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${N(a.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Liian suuri: ${i.subject} t\xE4ytyy olla ${r}${a.maximum.toString()} ${i.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Liian pieni: ${i.subject} t\xE4ytyy olla ${r}${a.minimum.toString()} ${i.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${r.prefix}"`:r.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${r.suffix}"`:r.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${r.includes}"`:r.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${r.pattern}`:`Virheellinen ${n[r.format]??a.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${a.divisor} monikerta`;case"unrecognized_keys":return`${a.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${v(a.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function mL(){return{localeError:WV()}}var ZV=()=>{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(a){return e[a]??null}let n={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"},o={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 a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Entr\xE9e invalide : instanceof ${a.expected} attendu, ${A} re\xE7u`:`Entr\xE9e invalide : ${r} attendu, ${A} re\xE7u`}case"invalid_value":return a.values.length===1?`Entr\xE9e invalide : ${N(a.values[0])} attendu`:`Option invalide : une valeur parmi ${v(a.values,"|")} attendue`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Trop grand : ${o[a.origin]??"valeur"} doit ${i.verb} ${r}${a.maximum.toString()} ${i.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[a.origin]??"valeur"} doit \xEAtre ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Trop petit : ${o[a.origin]??"valeur"} doit ${i.verb} ${r}${a.minimum.toString()} ${i.unit}`:`Trop petit : ${o[a.origin]??"valeur"} doit \xEAtre ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${r.prefix}"`:r.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${r.suffix}"`:r.format==="includes"?`Cha\xEEne invalide : doit inclure "${r.includes}"`:r.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${r.pattern}`:`${n[r.format]??a.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${a.divisor}`;case"unrecognized_keys":return`Cl\xE9${a.keys.length>1?"s":""} non reconnue${a.keys.length>1?"s":""} : ${v(a.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${a.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${a.origin}`;default:return"Entr\xE9e invalide"}}};function fL(){return{localeError:ZV()}}var VV=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Entr\xE9e invalide : attendu instanceof ${a.expected}, re\xE7u ${A}`:`Entr\xE9e invalide : attendu ${r}, re\xE7u ${A}`}case"invalid_value":return a.values.length===1?`Entr\xE9e invalide : attendu ${N(a.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"\u2264":"<",i=t(a.origin);return i?`Trop grand : attendu que ${a.origin??"la valeur"} ait ${r}${a.maximum.toString()} ${i.unit}`:`Trop grand : attendu que ${a.origin??"la valeur"} soit ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?"\u2265":">",i=t(a.origin);return i?`Trop petit : attendu que ${a.origin} ait ${r}${a.minimum.toString()} ${i.unit}`:`Trop petit : attendu que ${a.origin} soit ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${r.prefix}"`:r.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${r.suffix}"`:r.format==="includes"?`Cha\xEEne invalide : doit inclure "${r.includes}"`:r.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${r.pattern}`:`${n[r.format]??a.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${a.divisor}`;case"unrecognized_keys":return`Cl\xE9${a.keys.length>1?"s":""} non reconnue${a.keys.length>1?"s":""} : ${v(a.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${a.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${a.origin}`;default:return"Entr\xE9e invalide"}}};function bL(){return{localeError:VV()}}var XV=()=>{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"}},n=c=>c?e[c]:void 0,o=c=>{let u=n(c);return u?u.label:c??e.unknown.label},a=c=>`\u05D4${o(c)}`,r=c=>(n(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",i=c=>c?t[c]??null:null,A={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},s={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let u=c.expected,l=s[u??""]??o(u),p=M(c.input),g=s[p]??e[p]?.label??p;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${g}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${l}, \u05D4\u05EA\u05E7\u05D1\u05DC ${g}`}case"invalid_value":{if(c.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 ${N(c.values[0])}`;let u=c.values.map(g=>N(g));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let l=u[u.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${l}`}case"too_big":{let u=i(c.origin),l=a(c.origin??"value");if(c.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${l} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let m=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${l} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(c.origin==="array"||c.origin==="set"){let m=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=c.inclusive?`${c.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${l} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=c.inclusive?"<=":"<",g=r(c.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${l} ${g} ${p}${c.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${l} ${g} ${p}${c.maximum.toString()}`}case"too_small":{let u=i(c.origin),l=a(c.origin??"value");if(c.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${l} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let m=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${l} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(c.origin==="array"||c.origin==="set"){let m=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let y=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${l} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`}let h=c.inclusive?`${c.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${l} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=c.inclusive?">=":">",g=r(c.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${l} ${g} ${p}${c.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${l} ${g} ${p}${c.minimum.toString()}`}case"invalid_format":{let u=c;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${u.pattern}`;let l=A[u.format],p=l?.label??u.format,m=(l?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \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 ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${v(c.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${a(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function hL(){return{localeError:XV()}}var eX=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(a){return e[a]??null}let n={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"},o={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 a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${a.expected}, a primljeno je ${A}`:`Neispravan unos: o\u010Dekuje se ${r}, a primljeno je ${A}`}case"invalid_value":return a.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${N(a.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin),A=o[a.origin]??a.origin;return i?`Preveliko: o\u010Dekivano da ${A??"vrijednost"} ima ${r}${a.maximum.toString()} ${i.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${A??"vrijednost"} bude ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin),A=o[a.origin]??a.origin;return i?`Premalo: o\u010Dekivano da ${A} ima ${r}${a.minimum.toString()} ${i.unit}`:`Premalo: o\u010Dekivano da ${A} bude ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${r.prefix}"`:r.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${r.suffix}"`:r.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${r.includes}"`:r.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${r.pattern}`:`Neispravna ${n[r.format]??a.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${a.divisor}`;case"unrecognized_keys":return`Neprepoznat${a.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${v(a.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[a.origin]??a.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[a.origin]??a.origin}`;default:return"Neispravan unos"}}};function BL(){return{localeError:eX()}}var tX=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${a.expected}, a kapott \xE9rt\xE9k ${A}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${r}, a kapott \xE9rt\xE9k ${A}`}case"invalid_value":return a.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${N(a.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`T\xFAl nagy: ${a.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${r}${a.maximum.toString()} ${i.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${a.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${a.origin} m\xE9rete t\xFAl kicsi ${r}${a.minimum.toString()} ${i.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${a.origin} t\xFAl kicsi ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`\xC9rv\xE9nytelen string: "${r.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:r.format==="ends_with"?`\xC9rv\xE9nytelen string: "${r.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:r.format==="includes"?`\xC9rv\xE9nytelen string: "${r.includes}" \xE9rt\xE9ket kell tartalmaznia`:r.format==="regex"?`\xC9rv\xE9nytelen string: ${r.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[r.format]??a.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${a.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${a.keys.length>1?"s":""}: ${v(a.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${a.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${a.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function yL(){return{localeError:tX()}}function CL(e,t,n){return Math.abs(e)===1?t:n}function Cu(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var nX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.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 ${a.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${A}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${r}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${A}`}case"invalid_value":return a.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 ${N(a.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 ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);if(i){let A=Number(a.maximum),s=CL(A,i.unit.one,i.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 ${Cu(a.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${r}${a.maximum.toString()} ${s}`}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 ${Cu(a.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);if(i){let A=Number(a.minimum),s=CL(A,i.unit.one,i.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 ${Cu(a.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${r}${a.minimum.toString()} ${s}`}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 ${Cu(a.origin)} \u056C\u056B\u0576\u056B ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${r.prefix}"-\u0578\u057E`:r.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${r.suffix}"-\u0578\u057E`:r.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${r.includes}"`:r.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 ${r.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[r.format]??a.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 ${a.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${a.keys.length>1?"\u0576\u0565\u0580":""}. ${v(a.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Cu(a.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 ${Cu(a.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function wL(){return{localeError:nX()}}var aX=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(a){return e[a]??null}let n={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"},o={nan:"NaN"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Input tidak valid: diharapkan instanceof ${a.expected}, diterima ${A}`:`Input tidak valid: diharapkan ${r}, diterima ${A}`}case"invalid_value":return a.values.length===1?`Input tidak valid: diharapkan ${N(a.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Terlalu besar: diharapkan ${a.origin??"value"} memiliki ${r}${a.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: diharapkan ${a.origin??"value"} menjadi ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Terlalu kecil: diharapkan ${a.origin} memiliki ${r}${a.minimum.toString()} ${i.unit}`:`Terlalu kecil: diharapkan ${a.origin} menjadi ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`String tidak valid: harus dimulai dengan "${r.prefix}"`:r.format==="ends_with"?`String tidak valid: harus berakhir dengan "${r.suffix}"`:r.format==="includes"?`String tidak valid: harus menyertakan "${r.includes}"`:r.format==="regex"?`String tidak valid: harus sesuai pola ${r.pattern}`:`${n[r.format]??a.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${a.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${a.keys.length>1?"s":""}: ${v(a.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${a.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${a.origin}`;default:return"Input tidak valid"}}};function EL(){return{localeError:aX()}}var oX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${A} \xFEar sem \xE1 a\xF0 vera instanceof ${a.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${A} \xFEar sem \xE1 a\xF0 vera ${r}`}case"invalid_value":return a.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${N(a.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${a.origin??"gildi"} hafi ${r}${a.maximum.toString()} ${i.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${a.origin??"gildi"} s\xE9 ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${a.origin} hafi ${r}${a.minimum.toString()} ${i.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${a.origin} s\xE9 ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${r.prefix}"`:r.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${r.suffix}"`:r.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${r.includes}"`:r.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${r.pattern}`:`Rangt ${n[r.format]??a.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${a.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${a.keys.length>1?"ir lyklar":"ur lykill"}: ${v(a.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${a.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${a.origin}`;default:return"Rangt gildi"}}};function kL(){return{localeError:oX()}}var rX=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"numero",array:"vettore"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Input non valido: atteso instanceof ${a.expected}, ricevuto ${A}`:`Input non valido: atteso ${r}, ricevuto ${A}`}case"invalid_value":return a.values.length===1?`Input non valido: atteso ${N(a.values[0])}`:`Opzione non valida: atteso uno tra ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Troppo grande: ${a.origin??"valore"} deve avere ${r}${a.maximum.toString()} ${i.unit??"elementi"}`:`Troppo grande: ${a.origin??"valore"} deve essere ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Troppo piccolo: ${a.origin} deve avere ${r}${a.minimum.toString()} ${i.unit}`:`Troppo piccolo: ${a.origin} deve essere ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Stringa non valida: deve iniziare con "${r.prefix}"`:r.format==="ends_with"?`Stringa non valida: deve terminare con "${r.suffix}"`:r.format==="includes"?`Stringa non valida: deve includere "${r.includes}"`:r.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${r.pattern}`:`Input non valido: ${n[r.format]??a.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${a.divisor}`;case"unrecognized_keys":return`Chiav${a.keys.length>1?"i":"e"} non riconosciut${a.keys.length>1?"e":"a"}: ${v(a.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${a.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${a.origin}`;default:return"Input non valido"}}};function QL(){return{localeError:rX()}}var iX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${a.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${A}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${r}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${A}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return a.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${N(a.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${v(a.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let r=a.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",i=t(a.origin);return i?`\u5927\u304D\u3059\u304E\u308B\u5024: ${a.origin??"\u5024"}\u306F${a.maximum.toString()}${i.unit??"\u8981\u7D20"}${r}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${a.origin??"\u5024"}\u306F${a.maximum.toString()}${r}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let r=a.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",i=t(a.origin);return i?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${a.origin}\u306F${a.minimum.toString()}${i.unit}${r}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${a.origin}\u306F${a.minimum.toString()}${r}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let r=a;return r.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${r.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:r.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${r.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:r.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${r.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:r.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${r.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[r.format]??a.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${a.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${a.keys.length>1?"\u7FA4":""}: ${v(a.keys,"\u3001")}`;case"invalid_key":return`${a.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${a.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function IL(){return{localeError:iX()}}var AX=()=>{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(a){return e[a]??null}let n={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"},o={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 a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.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 ${a.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${A}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${A}`}case"invalid_value":return a.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 ${N(a.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 ${v(a.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${a.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${i.verb} ${r}${a.maximum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${a.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\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 ${a.origin} ${i.verb} ${r}${a.minimum.toString()} ${i.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 ${a.origin} \u10D8\u10E7\u10DD\u10E1 ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.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 "${r.prefix}"-\u10D8\u10D7`:r.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 "${r.suffix}"-\u10D8\u10D7`:r.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 "${r.includes}"-\u10E1`:r.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 ${r.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[r.format]??a.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 ${a.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${a.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${v(a.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${a.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 ${a.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function _L(){return{localeError:AX()}}var sX=()=>{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(a){return e[a]??null}let n={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"},o={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 a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.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 ${a.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${A}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${A}`}case"invalid_value":return a.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 ${N(a.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 ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${a.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${r} ${a.maximum.toString()} ${i.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${a.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${r} ${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${a.origin} ${r} ${a.minimum.toString()} ${i.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${a.origin} ${r} ${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.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 "${r.prefix}"`:r.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 "${r.suffix}"`:r.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 "${r.includes}"`:r.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 ${r.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[r.format]??a.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 ${a.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${v(a.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 ${a.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 ${a.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function mb(){return{localeError:sX()}}function vL(){return mb()}var cX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${a.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${A}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${r}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${A}\uC785\uB2C8\uB2E4`}case"invalid_value":return a.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${N(a.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${v(a.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let r=a.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",i=r==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",A=t(a.origin),s=A?.unit??"\uC694\uC18C";return A?`${a.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${a.maximum.toString()}${s} ${r}${i}`:`${a.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${a.maximum.toString()} ${r}${i}`}case"too_small":{let r=a.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",i=r==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",A=t(a.origin),s=A?.unit??"\uC694\uC18C";return A?`${a.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${a.minimum.toString()}${s} ${r}${i}`:`${a.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${a.minimum.toString()} ${r}${i}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${r.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:r.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${r.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:r.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${r.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:r.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${r.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[r.format]??a.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${a.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${v(a.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${a.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${a.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function xL(){return{localeError:cX()}}var Kl=e=>e.charAt(0).toUpperCase()+e.slice(1);function DL(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}var uX=()=>{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(a,r,i,A){let s=e[a]??null;return s===null?s:{unit:s.unit[r],verb:s.verb[A][i?"inclusive":"notInclusive"]}}let n={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"},o={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 a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Gautas tipas ${A}, o tik\u0117tasi - instanceof ${a.expected}`:`Gautas tipas ${A}, o tik\u0117tasi - ${r}`}case"invalid_value":return a.values.length===1?`Privalo b\u016Bti ${N(a.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${v(a.values,"|")} pasirinkim\u0173`;case"too_big":{let r=o[a.origin]??a.origin,i=t(a.origin,DL(Number(a.maximum)),a.inclusive??!1,"smaller");if(i?.verb)return`${Kl(r??a.origin??"reik\u0161m\u0117")} ${i.verb} ${a.maximum.toString()} ${i.unit??"element\u0173"}`;let A=a.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Kl(r??a.origin??"reik\u0161m\u0117")} turi b\u016Bti ${A} ${a.maximum.toString()} ${i?.unit}`}case"too_small":{let r=o[a.origin]??a.origin,i=t(a.origin,DL(Number(a.minimum)),a.inclusive??!1,"bigger");if(i?.verb)return`${Kl(r??a.origin??"reik\u0161m\u0117")} ${i.verb} ${a.minimum.toString()} ${i.unit??"element\u0173"}`;let A=a.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Kl(r??a.origin??"reik\u0161m\u0117")} turi b\u016Bti ${A} ${a.minimum.toString()} ${i?.unit}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${r.prefix}"`:r.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${r.suffix}"`:r.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${r.includes}"`:r.format==="regex"?`Eilut\u0117 privalo atitikti ${r.pattern}`:`Neteisingas ${n[r.format]??a.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${a.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${a.keys.length>1?"i":"as"} rakt${a.keys.length>1?"ai":"as"}: ${v(a.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let r=o[a.origin]??a.origin;return`${Kl(r??a.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function FL(){return{localeError:uX()}}var dX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${a.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${A}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${A}`}case"invalid_value":return a.values.length===1?`Invalid input: expected ${N(a.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 ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${a.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${r}${a.maximum.toString()} ${i.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 ${a.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${a.origin} \u0434\u0430 \u0438\u043C\u0430 ${r}${a.minimum.toString()} ${i.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${a.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.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 "${r.prefix}"`:r.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 "${r.suffix}"`:r.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 "${r.includes}"`:r.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 ${r.pattern}`:`Invalid ${n[r.format]??a.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 ${a.divisor}`;case"unrecognized_keys":return`${a.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"}: ${v(a.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${a.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 ${a.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function SL(){return{localeError:dX()}}var lX=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"nombor"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Input tidak sah: dijangka instanceof ${a.expected}, diterima ${A}`:`Input tidak sah: dijangka ${r}, diterima ${A}`}case"invalid_value":return a.values.length===1?`Input tidak sah: dijangka ${N(a.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Terlalu besar: dijangka ${a.origin??"nilai"} ${i.verb} ${r}${a.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: dijangka ${a.origin??"nilai"} adalah ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Terlalu kecil: dijangka ${a.origin} ${i.verb} ${r}${a.minimum.toString()} ${i.unit}`:`Terlalu kecil: dijangka ${a.origin} adalah ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`String tidak sah: mesti bermula dengan "${r.prefix}"`:r.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${r.suffix}"`:r.format==="includes"?`String tidak sah: mesti mengandungi "${r.includes}"`:r.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${r.pattern}`:`${n[r.format]??a.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${a.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${v(a.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${a.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${a.origin}`;default:return"Input tidak sah"}}};function LL(){return{localeError:lX()}}var pX=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"getal"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Ongeldige invoer: verwacht instanceof ${a.expected}, ontving ${A}`:`Ongeldige invoer: verwacht ${r}, ontving ${A}`}case"invalid_value":return a.values.length===1?`Ongeldige invoer: verwacht ${N(a.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin),A=a.origin==="date"?"laat":a.origin==="string"?"lang":"groot";return i?`Te ${A}: verwacht dat ${a.origin??"waarde"} ${r}${a.maximum.toString()} ${i.unit??"elementen"} ${i.verb}`:`Te ${A}: verwacht dat ${a.origin??"waarde"} ${r}${a.maximum.toString()} is`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin),A=a.origin==="date"?"vroeg":a.origin==="string"?"kort":"klein";return i?`Te ${A}: verwacht dat ${a.origin} ${r}${a.minimum.toString()} ${i.unit} ${i.verb}`:`Te ${A}: verwacht dat ${a.origin} ${r}${a.minimum.toString()} is`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Ongeldige tekst: moet met "${r.prefix}" beginnen`:r.format==="ends_with"?`Ongeldige tekst: moet op "${r.suffix}" eindigen`:r.format==="includes"?`Ongeldige tekst: moet "${r.includes}" bevatten`:r.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${r.pattern}`:`Ongeldig: ${n[r.format]??a.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${a.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${a.keys.length>1?"s":""}: ${v(a.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${a.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${a.origin}`;default:return"Ongeldige invoer"}}};function RL(){return{localeError:pX()}}var gX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"tall",array:"liste"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Ugyldig input: forventet instanceof ${a.expected}, fikk ${A}`:`Ugyldig input: forventet ${r}, fikk ${A}`}case"invalid_value":return a.values.length===1?`Ugyldig verdi: forventet ${N(a.values[0])}`:`Ugyldig valg: forventet en av ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`For stor(t): forventet ${a.origin??"value"} til \xE5 ha ${r}${a.maximum.toString()} ${i.unit??"elementer"}`:`For stor(t): forventet ${a.origin??"value"} til \xE5 ha ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`For lite(n): forventet ${a.origin} til \xE5 ha ${r}${a.minimum.toString()} ${i.unit}`:`For lite(n): forventet ${a.origin} til \xE5 ha ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${r.prefix}"`:r.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${r.suffix}"`:r.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${r.includes}"`:r.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${r.pattern}`:`Ugyldig ${n[r.format]??a.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${v(a.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${a.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${a.origin}`;default:return"Ugyldig input"}}};function NL(){return{localeError:gX()}}var mX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`F\xE2sit giren: umulan instanceof ${a.expected}, al\u0131nan ${A}`:`F\xE2sit giren: umulan ${r}, al\u0131nan ${A}`}case"invalid_value":return a.values.length===1?`F\xE2sit giren: umulan ${N(a.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Fazla b\xFCy\xFCk: ${a.origin??"value"}, ${r}${a.maximum.toString()} ${i.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${a.origin??"value"}, ${r}${a.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Fazla k\xFC\xE7\xFCk: ${a.origin}, ${r}${a.minimum.toString()} ${i.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${a.origin}, ${r}${a.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let r=a;return r.format==="starts_with"?`F\xE2sit metin: "${r.prefix}" ile ba\u015Flamal\u0131.`:r.format==="ends_with"?`F\xE2sit metin: "${r.suffix}" ile bitmeli.`:r.format==="includes"?`F\xE2sit metin: "${r.includes}" ihtiv\xE2 etmeli.`:r.format==="regex"?`F\xE2sit metin: ${r.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[r.format]??a.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${a.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${a.keys.length>1?"s":""}: ${v(a.keys,", ")}`;case"invalid_key":return`${a.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${a.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function $L(){return{localeError:mX()}}var fX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${a.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${A} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${r} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${A} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return a.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${N(a.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${v(a.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${a.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${r}${a.maximum.toString()} ${i.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${a.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${r}${a.maximum.toString()} \u0648\u064A`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${a.origin} \u0628\u0627\u06CC\u062F ${r}${a.minimum.toString()} ${i.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${a.origin} \u0628\u0627\u06CC\u062F ${r}${a.minimum.toString()} \u0648\u064A`}case"invalid_format":{let r=a;return r.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${r.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:r.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${r.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:r.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${r.includes}" \u0648\u0644\u0631\u064A`:r.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${r.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[r.format]??a.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${a.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${a.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${v(a.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${a.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 ${a.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function ML(){return{localeError:fX()}}var bX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"liczba",array:"tablica"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${a.expected}, otrzymano ${A}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${r}, otrzymano ${A}`}case"invalid_value":return a.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${N(a.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${a.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${r}${a.maximum.toString()} ${i.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${a.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${a.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${r}${a.minimum.toString()} ${i.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${a.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${r.prefix}"`:r.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${r.suffix}"`:r.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${r.includes}"`:r.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${r.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[r.format]??a.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${a.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${a.keys.length>1?"s":""}: ${v(a.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${a.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${a.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function jL(){return{localeError:bX()}}var hX=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Tipo inv\xE1lido: esperado instanceof ${a.expected}, recebido ${A}`:`Tipo inv\xE1lido: esperado ${r}, recebido ${A}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperado ${N(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Muito grande: esperado que ${a.origin??"valor"} tivesse ${r}${a.maximum.toString()} ${i.unit??"elementos"}`:`Muito grande: esperado que ${a.origin??"valor"} fosse ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Muito pequeno: esperado que ${a.origin} tivesse ${r}${a.minimum.toString()} ${i.unit}`:`Muito pequeno: esperado que ${a.origin} fosse ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${r.prefix}"`:r.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${r.suffix}"`:r.format==="includes"?`Texto inv\xE1lido: deve incluir "${r.includes}"`:r.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${r.pattern}`:`${n[r.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":return`Chave${a.keys.length>1?"s":""} desconhecida${a.keys.length>1?"s":""}: ${v(a.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${a.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${a.origin}`;default:return"Campo inv\xE1lido"}}};function PL(){return{localeError:hX()}}var BX=()=>{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(a){return e[a]??null}let n={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"},o={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 a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return`Intrare invalid\u0103: a\u0219teptat ${r}, primit ${A}`}case"invalid_value":return a.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${N(a.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Prea mare: a\u0219teptat ca ${a.origin??"valoarea"} ${i.verb} ${r}${a.maximum.toString()} ${i.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${a.origin??"valoarea"} s\u0103 fie ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Prea mic: a\u0219teptat ca ${a.origin} ${i.verb} ${r}${a.minimum.toString()} ${i.unit}`:`Prea mic: a\u0219teptat ca ${a.origin} s\u0103 fie ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${r.prefix}"`:r.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${r.suffix}"`:r.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${r.includes}"`:r.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${r.pattern}`:`Format invalid: ${n[r.format]??a.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${a.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${v(a.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${a.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${a.origin}`;default:return"Intrare invalid\u0103"}}};function GL(){return{localeError:BX()}}function HL(e,t,n,o){let a=Math.abs(e),r=a%10,i=a%100;return i>=11&&i<=19?o:r===1?t:r>=2&&r<=4?n:o}var yX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${a.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${A}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${r}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${A}`}case"invalid_value":return a.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${N(a.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 ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);if(i){let A=Number(a.maximum),s=HL(A,i.unit.one,i.unit.few,i.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 ${a.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${r}${a.maximum.toString()} ${s}`}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 ${a.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);if(i){let A=Number(a.minimum),s=HL(A,i.unit.one,i.unit.few,i.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 ${a.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${r}${a.minimum.toString()} ${s}`}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 ${a.origin} \u0431\u0443\u0434\u0435\u0442 ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.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 "${r.prefix}"`:r.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 "${r.suffix}"`:r.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 "${r.includes}"`:r.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 ${r.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[r.format]??a.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 ${a.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${a.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${a.keys.length>1?"\u0438":""}: ${v(a.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${a.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 ${a.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function UL(){return{localeError:yX()}}var CX=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${a.expected}, prejeto ${A}`:`Neveljaven vnos: pri\u010Dakovano ${r}, prejeto ${A}`}case"invalid_value":return a.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${N(a.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Preveliko: pri\u010Dakovano, da bo ${a.origin??"vrednost"} imelo ${r}${a.maximum.toString()} ${i.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${a.origin??"vrednost"} ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Premajhno: pri\u010Dakovano, da bo ${a.origin} imelo ${r}${a.minimum.toString()} ${i.unit}`:`Premajhno: pri\u010Dakovano, da bo ${a.origin} ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${r.prefix}"`:r.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${r.suffix}"`:r.format==="includes"?`Neveljaven niz: mora vsebovati "${r.includes}"`:r.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${r.pattern}`:`Neveljaven ${n[r.format]??a.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${a.divisor}`;case"unrecognized_keys":return`Neprepoznan${a.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${v(a.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${a.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${a.origin}`;default:return"Neveljaven vnos"}}};function TL(){return{localeError:CX()}}var wX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"antal",array:"lista"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${a.expected}, fick ${A}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${r}, fick ${A}`}case"invalid_value":return a.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${N(a.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`F\xF6r stor(t): f\xF6rv\xE4ntade ${a.origin??"v\xE4rdet"} att ha ${r}${a.maximum.toString()} ${i.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${a.origin??"v\xE4rdet"} att ha ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`F\xF6r lite(t): f\xF6rv\xE4ntade ${a.origin??"v\xE4rdet"} att ha ${r}${a.minimum.toString()} ${i.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${a.origin??"v\xE4rdet"} att ha ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${r.prefix}"`:r.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${r.suffix}"`:r.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${r.includes}"`:r.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${r.pattern}"`:`Ogiltig(t) ${n[r.format]??a.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${v(a.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${a.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${a.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function OL(){return{localeError:wX()}}var EX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.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 ${a.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${A}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${A}`}case"invalid_value":return a.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 ${N(a.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 ${v(a.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\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 ${a.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${r}${a.maximum.toString()} ${i.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 ${a.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${r}${a.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\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 ${a.origin} ${r}${a.minimum.toString()} ${i.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 ${a.origin} ${r}${a.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let r=a;return r.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${r.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:r.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${r.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:r.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${r.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:r.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${r.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 ${n[r.format]??a.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${a.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${a.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${v(a.keys,", ")}`;case"invalid_key":return`${a.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`${a.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function qL(){return{localeError:EX()}}var kX=()=>{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(a){return e[a]??null}let n={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"},o={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 a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.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 ${a.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${A}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${r} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${A}`}case"invalid_value":return a.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${N(a.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 ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",i=t(a.origin);return i?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${a.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${r} ${a.maximum.toString()} ${i.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${a.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${r} ${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",i=t(a.origin);return i?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${a.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${r} ${a.minimum.toString()} ${i.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${a.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${r} ${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.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 "${r.prefix}"`:r.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 "${r.suffix}"`:r.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 "${r.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:r.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 ${r.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[r.format]??a.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 ${a.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: ${v(a.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${a.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 ${a.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function zL(){return{localeError:kX()}}var QX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${a.expected}, al\u0131nan ${A}`:`Ge\xE7ersiz de\u011Fer: beklenen ${r}, al\u0131nan ${A}`}case"invalid_value":return a.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${N(a.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${a.origin??"de\u011Fer"} ${r}${a.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${a.origin??"de\u011Fer"} ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${a.origin} ${r}${a.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${a.origin} ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Ge\xE7ersiz metin: "${r.prefix}" ile ba\u015Flamal\u0131`:r.format==="ends_with"?`Ge\xE7ersiz metin: "${r.suffix}" ile bitmeli`:r.format==="includes"?`Ge\xE7ersiz metin: "${r.includes}" i\xE7ermeli`:r.format==="regex"?`Ge\xE7ersiz metin: ${r.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[r.format]??a.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${a.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${a.keys.length>1?"lar":""}: ${v(a.keys,", ")}`;case"invalid_key":return`${a.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${a.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function YL(){return{localeError:QX()}}var IX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.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 ${a.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${A}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${r}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${A}`}case"invalid_value":return a.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 ${N(a.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 ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\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 ${a.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${i.verb} ${r}${a.maximum.toString()} ${i.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 ${a.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${a.origin} ${i.verb} ${r}${a.minimum.toString()} ${i.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${a.origin} \u0431\u0443\u0434\u0435 ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.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 "${r.prefix}"`:r.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 "${r.suffix}"`:r.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 "${r.includes}"`:r.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 ${r.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[r.format]??a.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 ${a.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${a.keys.length>1?"\u0456":""}: ${v(a.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${a.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 ${a.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function fb(){return{localeError:IX()}}function KL(){return fb()}var _X=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${a.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${A} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${r} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${A} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return a.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${N(a.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${v(a.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${a.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${r}${a.maximum.toString()} ${i.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${a.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${r}${a.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${a.origin} \u06A9\u06D2 ${r}${a.minimum.toString()} ${i.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${a.origin} \u06A9\u0627 ${r}${a.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let r=a;return r.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${r.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:r.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${r.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:r.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${r.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:r.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${r.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[r.format]??a.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${a.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${a.keys.length>1?"\u0632":""}: ${v(a.keys,"\u060C ")}`;case"invalid_key":return`${a.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${a.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function JL(){return{localeError:_X()}}var vX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"raqam",array:"massiv"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${a.expected}, qabul qilingan ${A}`:`Noto\u2018g\u2018ri kirish: kutilgan ${r}, qabul qilingan ${A}`}case"invalid_value":return a.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${N(a.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Juda katta: kutilgan ${a.origin??"qiymat"} ${r}${a.maximum.toString()} ${i.unit} ${i.verb}`:`Juda katta: kutilgan ${a.origin??"qiymat"} ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Juda kichik: kutilgan ${a.origin} ${r}${a.minimum.toString()} ${i.unit} ${i.verb}`:`Juda kichik: kutilgan ${a.origin} ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${r.prefix}" bilan boshlanishi kerak`:r.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${r.suffix}" bilan tugashi kerak`:r.format==="includes"?`Noto\u2018g\u2018ri satr: "${r.includes}" ni o\u2018z ichiga olishi kerak`:r.format==="regex"?`Noto\u2018g\u2018ri satr: ${r.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[r.format]??a.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${a.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${a.keys.length>1?"lar":""}: ${v(a.keys,", ")}`;case"invalid_key":return`${a.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${a.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function WL(){return{localeError:vX()}}var xX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${a.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${A}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${r}, nh\u1EADn \u0111\u01B0\u1EE3c ${A}`}case"invalid_value":return a.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${N(a.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${a.origin??"gi\xE1 tr\u1ECB"} ${i.verb} ${r}${a.maximum.toString()} ${i.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${a.origin??"gi\xE1 tr\u1ECB"} ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${a.origin} ${i.verb} ${r}${a.minimum.toString()} ${i.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${a.origin} ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${r.prefix}"`:r.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${r.suffix}"`:r.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${r.includes}"`:r.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${r.pattern}`:`${n[r.format]??a.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 ${a.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${v(a.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${a.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 ${a.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function ZL(){return{localeError:xX()}}var DX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${a.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${A}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${r}\uFF0C\u5B9E\u9645\u63A5\u6536 ${A}`}case"invalid_value":return a.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${N(a.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${a.origin??"\u503C"} ${r}${a.maximum.toString()} ${i.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${a.origin??"\u503C"} ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${a.origin} ${r}${a.minimum.toString()} ${i.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${a.origin} ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${r.prefix}" \u5F00\u5934`:r.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${r.suffix}" \u7ED3\u5C3E`:r.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${r.includes}"`:r.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${r.pattern}`:`\u65E0\u6548${n[r.format]??a.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${a.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${v(a.keys,", ")}`;case"invalid_key":return`${a.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${a.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function VL(){return{localeError:DX()}}var FX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${a.expected}\uFF0C\u4F46\u6536\u5230 ${A}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${r}\uFF0C\u4F46\u6536\u5230 ${A}`}case"invalid_value":return a.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${N(a.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${a.origin??"\u503C"} \u61C9\u70BA ${r}${a.maximum.toString()} ${i.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${a.origin??"\u503C"} \u61C9\u70BA ${r}${a.maximum.toString()}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${a.origin} \u61C9\u70BA ${r}${a.minimum.toString()} ${i.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${a.origin} \u61C9\u70BA ${r}${a.minimum.toString()}`}case"invalid_format":{let r=a;return r.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${r.prefix}" \u958B\u982D`:r.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${r.suffix}" \u7D50\u5C3E`:r.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${r.includes}"`:r.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${r.pattern}`:`\u7121\u6548\u7684 ${n[r.format]??a.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${a.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${a.keys.length>1?"\u5011":""}\uFF1A${v(a.keys,"\u3001")}`;case"invalid_key":return`${a.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${a.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function XL(){return{localeError:FX()}}var SX=()=>{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(a){return e[a]??null}let n={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"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return a=>{switch(a.code){case"invalid_type":{let r=o[a.expected]??a.expected,i=M(a.input),A=o[i]??i;return/^[A-Z]/.test(a.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${a.expected}, \xE0m\u1ECD\u0300 a r\xED ${A}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${r}, \xE0m\u1ECD\u0300 a r\xED ${A}`}case"invalid_value":return a.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${N(a.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${v(a.values,"|")}`;case"too_big":{let r=a.inclusive?"<=":"<",i=t(a.origin);return i?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${a.origin??"iye"} ${i.verb} ${r}${a.maximum} ${i.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${r}${a.maximum}`}case"too_small":{let r=a.inclusive?">=":">",i=t(a.origin);return i?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${a.origin} ${i.verb} ${r}${a.minimum} ${i.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${r}${a.minimum}`}case"invalid_format":{let r=a;return r.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 "${r.prefix}"`:r.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${r.suffix}"`:r.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${r.includes}"`:r.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${r.pattern}`:`A\u1E63\xEC\u1E63e: ${n[r.format]??a.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 ${a.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${v(a.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${a.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 ${a.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function eR(){return{localeError:SX()}}var tR,IQ=Symbol("ZodOutput"),_Q=Symbol("ZodInput"),bb=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let a={...o,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function hb(){return new bb}(tR=globalThis).__zod_globalRegistry??(tR.__zod_globalRegistry=hb());var Nn=globalThis.__zod_globalRegistry;function vQ(e,t){return new e({type:"string",...H(t)})}function xQ(e,t){return new e({type:"string",coerce:!0,...H(t)})}function Bb(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...H(t)})}function Wl(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...H(t)})}function yb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...H(t)})}function Cb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...H(t)})}function wb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...H(t)})}function Eb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...H(t)})}function Zl(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...H(t)})}function kb(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...H(t)})}function Qb(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...H(t)})}function Ib(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...H(t)})}function _b(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...H(t)})}function vb(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...H(t)})}function xb(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...H(t)})}function Db(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...H(t)})}function Fb(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...H(t)})}function Sb(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...H(t)})}function DQ(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...H(t)})}function Lb(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...H(t)})}function Rb(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...H(t)})}function Nb(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...H(t)})}function $b(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...H(t)})}function Mb(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...H(t)})}function jb(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...H(t)})}var FQ={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function SQ(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...H(t)})}function LQ(e,t){return new e({type:"string",format:"date",check:"string_format",...H(t)})}function RQ(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...H(t)})}function NQ(e,t){return new e({type:"string",format:"duration",check:"string_format",...H(t)})}function $Q(e,t){return new e({type:"number",checks:[],...H(t)})}function MQ(e,t){return new e({type:"number",coerce:!0,checks:[],...H(t)})}function jQ(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...H(t)})}function PQ(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...H(t)})}function GQ(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...H(t)})}function HQ(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...H(t)})}function UQ(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...H(t)})}function TQ(e,t){return new e({type:"boolean",...H(t)})}function OQ(e,t){return new e({type:"boolean",coerce:!0,...H(t)})}function qQ(e,t){return new e({type:"bigint",...H(t)})}function zQ(e,t){return new e({type:"bigint",coerce:!0,...H(t)})}function YQ(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...H(t)})}function KQ(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...H(t)})}function JQ(e,t){return new e({type:"symbol",...H(t)})}function WQ(e,t){return new e({type:"undefined",...H(t)})}function ZQ(e,t){return new e({type:"null",...H(t)})}function VQ(e){return new e({type:"any"})}function XQ(e){return new e({type:"unknown"})}function eI(e,t){return new e({type:"never",...H(t)})}function tI(e,t){return new e({type:"void",...H(t)})}function nI(e,t){return new e({type:"date",...H(t)})}function aI(e,t){return new e({type:"date",coerce:!0,...H(t)})}function oI(e,t){return new e({type:"nan",...H(t)})}function br(e,t){return new ab({check:"less_than",...H(t),value:e,inclusive:!1})}function Ta(e,t){return new ab({check:"less_than",...H(t),value:e,inclusive:!0})}function hr(e,t){return new ob({check:"greater_than",...H(t),value:e,inclusive:!1})}function ra(e,t){return new ob({check:"greater_than",...H(t),value:e,inclusive:!0})}function Pb(e){return hr(0,e)}function Gb(e){return br(0,e)}function Hb(e){return Ta(0,e)}function Ub(e){return ra(0,e)}function fA(e,t){return new Zk({check:"multiple_of",...H(t),value:e})}function bA(e,t){return new e0({check:"max_size",...H(t),maximum:e})}function Br(e,t){return new t0({check:"min_size",...H(t),minimum:e})}function Cs(e,t){return new n0({check:"size_equals",...H(t),size:e})}function ws(e,t){return new a0({check:"max_length",...H(t),maximum:e})}function pi(e,t){return new o0({check:"min_length",...H(t),minimum:e})}function Es(e,t){return new r0({check:"length_equals",...H(t),length:e})}function wu(e,t){return new i0({check:"string_format",format:"regex",...H(t),pattern:e})}function Eu(e){return new A0({check:"string_format",format:"lowercase",...H(e)})}function ku(e){return new s0({check:"string_format",format:"uppercase",...H(e)})}function Qu(e,t){return new c0({check:"string_format",format:"includes",...H(t),includes:e})}function Iu(e,t){return new u0({check:"string_format",format:"starts_with",...H(t),prefix:e})}function _u(e,t){return new d0({check:"string_format",format:"ends_with",...H(t),suffix:e})}function Tb(e,t,n){return new l0({check:"property",property:e,schema:t,...H(n)})}function vu(e,t){return new p0({check:"mime_type",mime:e,...H(t)})}function No(e){return new g0({check:"overwrite",tx:e})}function xu(e){return No(t=>t.normalize(e))}function Du(){return No(e=>e.trim())}function Fu(){return No(e=>e.toLowerCase())}function Su(){return No(e=>e.toUpperCase())}function Lu(){return No(e=>uk(e))}function rI(e,t,n){return new e({type:"array",element:t,...H(n)})}function RX(e,t,n){return new e({type:"union",options:t,...H(n)})}function NX(e,t,n){return new e({type:"union",options:t,inclusive:!1,...H(n)})}function $X(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...H(o)})}function MX(e,t,n){return new e({type:"intersection",left:t,right:n})}function jX(e,t,n,o){let a=n instanceof ie,r=a?o:n,i=a?n:null;return new e({type:"tuple",items:t,rest:i,...H(r)})}function PX(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...H(o)})}function GX(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...H(o)})}function HX(e,t,n){return new e({type:"set",valueType:t,...H(n)})}function UX(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(a=>[a,a])):t;return new e({type:"enum",entries:o,...H(n)})}function TX(e,t,n){return new e({type:"enum",entries:t,...H(n)})}function OX(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...H(n)})}function iI(e,t){return new e({type:"file",...H(t)})}function qX(e,t){return new e({type:"transform",transform:t})}function zX(e,t){return new e({type:"optional",innerType:t})}function YX(e,t){return new e({type:"nullable",innerType:t})}function KX(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():lk(n)}})}function JX(e,t,n){return new e({type:"nonoptional",innerType:t,...H(n)})}function WX(e,t){return new e({type:"success",innerType:t})}function ZX(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function VX(e,t,n){return new e({type:"pipe",in:t,out:n})}function XX(e,t){return new e({type:"readonly",innerType:t})}function eee(e,t,n){return new e({type:"template_literal",parts:t,...H(n)})}function tee(e,t){return new e({type:"lazy",getter:t})}function nee(e,t){return new e({type:"promise",innerType:t})}function AI(e,t,n){let o=H(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function sI(e,t,n){return new e({type:"custom",check:"custom",fn:t,...H(n)})}function cI(e,t){let n=nR(o=>(o.addIssue=a=>{if(typeof a=="string")o.issues.push(mu(a,o.value,n._zod.def));else{let r=a;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=o.value),r.inst??(r.inst=n),r.continue??(r.continue=!n._zod.def.abort),o.issues.push(mu(r))}},e(o.value,o)),t);return n}function nR(e,t){let n=new ot({check:"custom",...H(t)});return n._zod.check=e,n}function uI(e){let t=new ot({check:"describe"});return t._zod.onattach=[n=>{let o=Nn.get(n)??{};Nn.add(n,{...o,description:e})}],t._zod.check=()=>{},t}function dI(e){let t=new ot({check:"meta"});return t._zod.onattach=[n=>{let o=Nn.get(n)??{};Nn.add(n,{...o,...e})}],t._zod.check=()=>{},t}function lI(e,t){let n=H(t),o=n.truthy??["true","1","yes","on","y","enabled"],a=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(g=>typeof g=="string"?g.toLowerCase():g),a=a.map(g=>typeof g=="string"?g.toLowerCase():g));let r=new Set(o),i=new Set(a),A=e.Codec??Yl,s=e.Boolean??ql,c=e.String??ys,u=new c({type:"string",error:n.error}),l=new s({type:"boolean",error:n.error}),p=new A({type:"pipe",in:u,out:l,transform:((g,m)=>{let h=g;return n.case!=="sensitive"&&(h=h.toLowerCase()),r.has(h)?!0:i.has(h)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...r,...i],input:m.value,inst:p,continue:!1}),{})}),reverseTransform:((g,m)=>g===!0?o[0]||"true":a[0]||"false"),error:n.error});return p}function Ru(e,t,n,o={}){let a=H(o),r={...H(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:A=>n.test(A),...a};return n instanceof RegExp&&(r.pattern=n),new e(r)}function hA(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??Nn,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ue(e,t,n={path:[],schemaPath:[]}){var o;let a=e._zod.def,r=t.seen.get(e);if(r)return r.count++,n.schemaPath.includes(e)&&(r.cycle=n.path),r.schema;let i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);let A=e._zod.toJSONSchema?.();if(A)i.schema=A;else{let u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,u);else{let p=i.schema,g=t.processors[a.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);g(e,t,p,u)}let l=e._zod.parent;l&&(i.ref||(i.ref=l),Ue(l,t,u),t.seen.get(l).isParent=!0)}let s=t.metadataRegistry.get(e);return s&&Object.assign(i.schema,s),t.io==="input"&&ia(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&"_prefault"in i.schema&&((o=i.schema).default??(o.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function BA(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let i of e.seen.entries()){let A=e.metadataRegistry.get(i[0])?.id;if(A){let s=o.get(A);if(s&&s!==i[0])throw new Error(`Duplicate schema id "${A}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(A,i[0])}}let a=i=>{let A=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let l=e.external.registry.get(i[0])?.id,p=e.external.uri??(m=>m);if(l)return{ref:p(l)};let g=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=g,{defId:g,ref:`${p("__shared")}#/${A}/${g}`}}if(i[1]===n)return{ref:"#"};let c=`#/${A}/`,u=i[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},r=i=>{if(i[1].schema.$ref)return;let A=i[1],{ref:s,defId:c}=a(i);A.def={...A.schema},c&&(A.defId=c);let u=A.schema;for(let l in u)delete u[l];u.$ref=s};if(e.cycles==="throw")for(let i of e.seen.entries()){let A=i[1];if(A.cycle)throw new Error(`Cycle detected: #/${A.cycle?.join("/")}/<root>
|
|
74
74
|
|
|
75
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let i of e.seen.entries()){let A=i[1];if(t===i[0]){r(i);continue}if(e.external){let c=e.external.registry.get(i[0])?.id;if(t!==i[0]&&c){r(i);continue}}if(e.metadataRegistry.get(i[0])?.id){r(i);continue}if(A.cycle){r(i);continue}if(A.count>1&&e.reused==="ref"){r(i);continue}}}function yA(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=A=>{let s=e.seen.get(A);if(s.ref===null)return;let c=s.def??s.schema,u={...c},l=s.ref;if(s.ref=null,l){o(l);let g=e.seen.get(l),m=g.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(m)):Object.assign(c,m),Object.assign(c,u),A._zod.parent===l)for(let y in c)y==="$ref"||y==="allOf"||y in u||delete c[y];if(m.$ref&&g.def)for(let y in c)y==="$ref"||y==="allOf"||y in g.def&&JSON.stringify(c[y])===JSON.stringify(g.def[y])&&delete c[y]}let p=A._zod.parent;if(p&&p!==l){o(p);let g=e.seen.get(p);if(g?.schema.$ref&&(c.$ref=g.schema.$ref,g.def))for(let m in c)m==="$ref"||m==="allOf"||m in g.def&&JSON.stringify(c[m])===JSON.stringify(g.def[m])&&delete c[m]}e.override({zodSchema:A,jsonSchema:c,path:s.path??[]})};for(let A of[...e.seen.entries()].reverse())o(A[0]);let a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let A=e.external.registry.get(t)?.id;if(!A)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(A)}Object.assign(a,n.def??n.schema);let r=e.metadataRegistry.get(t)?.id;r!==void 0&&a.id===r&&delete a.id;let i=e.external?.defs??{};for(let A of e.seen.entries()){let s=A[1];s.def&&s.defId&&(s.def.id===s.defId&&delete s.def.id,i[s.defId]=s.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?a.$defs=i:a.definitions=i);try{let A=JSON.parse(JSON.stringify(a));return Object.defineProperty(A,"~standard",{value:{...t["~standard"],jsonSchema:{input:Nu(t,"input",e.processors),output:Nu(t,"output",e.processors)}},enumerable:!1,writable:!1}),A}catch{throw new Error("Error converting schema to JSON.")}}function ia(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return ia(o.element,n);if(o.type==="set")return ia(o.valueType,n);if(o.type==="lazy")return ia(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return ia(o.innerType,n);if(o.type==="intersection")return ia(o.left,n)||ia(o.right,n);if(o.type==="record"||o.type==="map")return ia(o.keyType,n)||ia(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:ia(o.in,n)||ia(o.out,n);if(o.type==="object"){for(let a in o.shape)if(ia(o.shape[a],n))return!0;return!1}if(o.type==="union"){for(let a of o.options)if(ia(a,n))return!0;return!1}if(o.type==="tuple"){for(let a of o.items)if(ia(a,n))return!0;return!!(o.rest&&ia(o.rest,n))}return!1}var pI=(e,t={})=>n=>{let o=hA({...n,processors:t});return Ue(e,o),BA(o,e),yA(o,e)},Nu=(e,t,n={})=>o=>{let{libraryOptions:a,target:r}=o??{},i=hA({...a??{},target:r,io:t,processors:n});return Ue(e,i),BA(i,e),yA(i,e)};var aee={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gI=(e,t,n,o)=>{let a=n;a.type="string";let{minimum:r,maximum:i,format:A,patterns:s,contentEncoding:c}=e._zod.bag;if(typeof r=="number"&&(a.minLength=r),typeof i=="number"&&(a.maxLength=i),A&&(a.format=aee[A]??A,a.format===""&&delete a.format,A==="time"&&delete a.format),c&&(a.contentEncoding=c),s&&s.size>0){let u=[...s];u.length===1?a.pattern=u[0].source:u.length>1&&(a.allOf=[...u.map(l=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:l.source}))])}},mI=(e,t,n,o)=>{let a=n,{minimum:r,maximum:i,format:A,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof A=="string"&&A.includes("int")?a.type="integer":a.type="number";let l=typeof u=="number"&&u>=(r??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(i??Number.POSITIVE_INFINITY),g=t.target==="draft-04"||t.target==="openapi-3.0";l?g?(a.minimum=u,a.exclusiveMinimum=!0):a.exclusiveMinimum=u:typeof r=="number"&&(a.minimum=r),p?g?(a.maximum=c,a.exclusiveMaximum=!0):a.exclusiveMaximum=c:typeof i=="number"&&(a.maximum=i),typeof s=="number"&&(a.multipleOf=s)},fI=(e,t,n,o)=>{n.type="boolean"},bI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},hI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},BI=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},yI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},CI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},wI=(e,t,n,o)=>{n.not={}},EI=(e,t,n,o)=>{},kI=(e,t,n,o)=>{},QI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},II=(e,t,n,o)=>{let a=e._zod.def,r=Rl(a.entries);r.every(i=>typeof i=="number")&&(n.type="number"),r.every(i=>typeof i=="string")&&(n.type="string"),n.enum=r},_I=(e,t,n,o)=>{let a=e._zod.def,r=[];for(let i of a.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");r.push(Number(i))}else r.push(i);if(r.length!==0)if(r.length===1){let i=r[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else r.every(i=>typeof i=="number")&&(n.type="number"),r.every(i=>typeof i=="string")&&(n.type="string"),r.every(i=>typeof i=="boolean")&&(n.type="boolean"),r.every(i=>i===null)&&(n.type="null"),n.enum=r},vI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},xI=(e,t,n,o)=>{let a=n,r=e._zod.pattern;if(!r)throw new Error("Pattern not found in template literal");a.type="string",a.pattern=r.source},DI=(e,t,n,o)=>{let a=n,r={type:"string",format:"binary",contentEncoding:"binary"},{minimum:i,maximum:A,mime:s}=e._zod.bag;i!==void 0&&(r.minLength=i),A!==void 0&&(r.maxLength=A),s?s.length===1?(r.contentMediaType=s[0],Object.assign(a,r)):(Object.assign(a,r),a.anyOf=s.map(c=>({contentMediaType:c}))):Object.assign(a,r)},FI=(e,t,n,o)=>{n.type="boolean"},SI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},LI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},RI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},NI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},$I=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},MI=(e,t,n,o)=>{let a=n,r=e._zod.def,{minimum:i,maximum:A}=e._zod.bag;typeof i=="number"&&(a.minItems=i),typeof A=="number"&&(a.maxItems=A),a.type="array",a.items=Ue(r.element,t,{...o,path:[...o.path,"items"]})},jI=(e,t,n,o)=>{let a=n,r=e._zod.def;a.type="object",a.properties={};let i=r.shape;for(let c in i)a.properties[c]=Ue(i[c],t,{...o,path:[...o.path,"properties",c]});let A=new Set(Object.keys(i)),s=new Set([...A].filter(c=>{let u=r.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));s.size>0&&(a.required=Array.from(s)),r.catchall?._zod.def.type==="never"?a.additionalProperties=!1:r.catchall?r.catchall&&(a.additionalProperties=Ue(r.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},qb=(e,t,n,o)=>{let a=e._zod.def,r=a.inclusive===!1,i=a.options.map((A,s)=>Ue(A,t,{...o,path:[...o.path,r?"oneOf":"anyOf",s]}));r?n.oneOf=i:n.anyOf=i},PI=(e,t,n,o)=>{let a=e._zod.def,r=Ue(a.left,t,{...o,path:[...o.path,"allOf",0]}),i=Ue(a.right,t,{...o,path:[...o.path,"allOf",1]}),A=c=>"allOf"in c&&Object.keys(c).length===1,s=[...A(r)?r.allOf:[r],...A(i)?i.allOf:[i]];n.allOf=s},GI=(e,t,n,o)=>{let a=n,r=e._zod.def;a.type="array";let i=t.target==="draft-2020-12"?"prefixItems":"items",A=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",s=r.items.map((p,g)=>Ue(p,t,{...o,path:[...o.path,i,g]})),c=r.rest?Ue(r.rest,t,{...o,path:[...o.path,A,...t.target==="openapi-3.0"?[r.items.length]:[]]}):null;t.target==="draft-2020-12"?(a.prefixItems=s,c&&(a.items=c)):t.target==="openapi-3.0"?(a.items={anyOf:s},c&&a.items.anyOf.push(c),a.minItems=s.length,c||(a.maxItems=s.length)):(a.items=s,c&&(a.additionalItems=c));let{minimum:u,maximum:l}=e._zod.bag;typeof u=="number"&&(a.minItems=u),typeof l=="number"&&(a.maxItems=l)},HI=(e,t,n,o)=>{let a=n,r=e._zod.def;a.type="object";let i=r.keyType,s=i._zod.bag?.patterns;if(r.mode==="loose"&&s&&s.size>0){let u=Ue(r.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});a.patternProperties={};for(let l of s)a.patternProperties[l.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(a.propertyNames=Ue(r.keyType,t,{...o,path:[...o.path,"propertyNames"]})),a.additionalProperties=Ue(r.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let c=i._zod.values;if(c){let u=[...c].filter(l=>typeof l=="string"||typeof l=="number");u.length>0&&(a.required=u)}},UI=(e,t,n,o)=>{let a=e._zod.def,r=Ue(a.innerType,t,o),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=a.innerType,n.nullable=!0):n.anyOf=[r,{type:"null"}]},TI=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType},OI=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},qI=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},zI=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType;let i;try{i=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},YI=(e,t,n,o)=>{let a=e._zod.def,r=a.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?r?a.out:a.in:a.out;Ue(i,t,o);let A=t.seen.get(e);A.ref=i},KI=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType,n.readOnly=!0},JI=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType},zb=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType},WI=(e,t,n,o)=>{let a=e._zod.innerType;Ue(a,t,o);let r=t.seen.get(e);r.ref=a},Ob={string:gI,number:mI,boolean:fI,bigint:bI,symbol:hI,null:BI,undefined:yI,void:CI,never:wI,any:EI,unknown:kI,date:QI,enum:II,literal:_I,nan:vI,template_literal:xI,file:DI,success:FI,custom:SI,function:LI,transform:RI,map:NI,set:$I,array:MI,object:jI,union:qb,intersection:PI,tuple:GI,record:HI,nullable:UI,nonoptional:TI,default:OI,prefault:qI,catch:zI,pipe:YI,readonly:KI,promise:JI,optional:zb,lazy:WI};function Yb(e,t){if("_idmap"in e){let o=e,a=hA({...t,processors:Ob}),r={};for(let s of o._idmap.entries()){let[c,u]=s;Ue(u,a)}let i={},A={registry:o,uri:t?.uri,defs:r};a.external=A;for(let s of o._idmap.entries()){let[c,u]=s;BA(a,u),i[c]=yA(a,u)}if(Object.keys(r).length>0){let s=a.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[s]:r}}return{schemas:i}}let n=hA({...t,processors:Ob});return Ue(e,n),BA(n,e),yA(n,e)}var Kb=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=hA({processors:Ob,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Ue(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),BA(this.ctx,t);let o=yA(this.ctx,t),{"~standard":a,...r}=o;return r}};var aR={};var Vl={};F(Vl,{ZodAny:()=>y_,ZodArray:()=>k_,ZodBase64:()=>mh,ZodBase64URL:()=>fh,ZodBigInt:()=>Tu,ZodBigIntFormat:()=>Bh,ZodBoolean:()=>Uu,ZodCIDRv4:()=>ph,ZodCIDRv6:()=>gh,ZodCUID:()=>ih,ZodCUID2:()=>Ah,ZodCatch:()=>z_,ZodCodec:()=>up,ZodCustom:()=>dp,ZodCustomStringFormat:()=>Gu,ZodDate:()=>rp,ZodDefault:()=>G_,ZodDiscriminatedUnion:()=>I_,ZodE164:()=>bh,ZodEmail:()=>ah,ZodEmoji:()=>oh,ZodEnum:()=>ju,ZodExactOptional:()=>M_,ZodFile:()=>N_,ZodFunction:()=>nv,ZodGUID:()=>ep,ZodIPv4:()=>dh,ZodIPv6:()=>lh,ZodIntersection:()=>__,ZodJWT:()=>hh,ZodKSUID:()=>uh,ZodLazy:()=>X_,ZodLiteral:()=>R_,ZodMAC:()=>p_,ZodMap:()=>S_,ZodNaN:()=>K_,ZodNanoID:()=>rh,ZodNever:()=>w_,ZodNonOptional:()=>Qh,ZodNull:()=>h_,ZodNullable:()=>P_,ZodNumber:()=>Hu,ZodNumberFormat:()=>Qs,ZodObject:()=>Ap,ZodOptional:()=>kh,ZodPipe:()=>cp,ZodPrefault:()=>U_,ZodPreprocess:()=>J_,ZodPromise:()=>tv,ZodReadonly:()=>W_,ZodRecord:()=>Mu,ZodSet:()=>L_,ZodString:()=>Pu,ZodStringFormat:()=>et,ZodSuccess:()=>q_,ZodSymbol:()=>f_,ZodTemplateLiteral:()=>V_,ZodTransform:()=>$_,ZodTuple:()=>x_,ZodType:()=>ge,ZodULID:()=>sh,ZodURL:()=>op,ZodUUID:()=>yr,ZodUndefined:()=>b_,ZodUnion:()=>sp,ZodUnknown:()=>C_,ZodVoid:()=>E_,ZodXID:()=>ch,ZodXor:()=>Q_,_ZodString:()=>nh,_default:()=>H_,_function:()=>lN,any:()=>TR,array:()=>ip,base64:()=>IR,base64url:()=>_R,bigint:()=>jR,boolean:()=>m_,catch:()=>Y_,check:()=>pN,cidrv4:()=>kR,cidrv6:()=>QR,codec:()=>sN,cuid:()=>fR,cuid2:()=>bR,custom:()=>gN,date:()=>qR,describe:()=>mN,discriminatedUnion:()=>ZR,e164:()=>vR,email:()=>iR,emoji:()=>gR,enum:()=>wh,exactOptional:()=>j_,file:()=>oN,float32:()=>RR,float64:()=>NR,function:()=>lN,guid:()=>AR,hash:()=>LR,hex:()=>SR,hostname:()=>FR,httpUrl:()=>pR,instanceof:()=>bN,int:()=>eh,int32:()=>$R,int64:()=>PR,intersection:()=>v_,invertCodec:()=>cN,ipv4:()=>CR,ipv6:()=>ER,json:()=>BN,jwt:()=>xR,keyof:()=>zR,ksuid:()=>yR,lazy:()=>ev,literal:()=>aN,looseObject:()=>JR,looseRecord:()=>XR,mac:()=>wR,map:()=>eN,meta:()=>fN,nan:()=>AN,nanoid:()=>mR,nativeEnum:()=>nN,never:()=>yh,nonoptional:()=>O_,null:()=>B_,nullable:()=>np,nullish:()=>rN,number:()=>g_,object:()=>YR,optional:()=>tp,partialRecord:()=>VR,pipe:()=>th,prefault:()=>T_,preprocess:()=>yN,promise:()=>dN,readonly:()=>Z_,record:()=>F_,refine:()=>av,set:()=>tN,strictObject:()=>KR,string:()=>Xl,stringFormat:()=>DR,stringbool:()=>hN,success:()=>iN,superRefine:()=>ov,symbol:()=>HR,templateLiteral:()=>uN,transform:()=>Eh,tuple:()=>D_,uint32:()=>MR,uint64:()=>GR,ulid:()=>hR,undefined:()=>UR,union:()=>Ch,unknown:()=>ks,url:()=>lR,uuid:()=>sR,uuidv4:()=>cR,uuidv6:()=>uR,uuidv7:()=>dR,void:()=>OR,xid:()=>BR,xor:()=>WR});var Jb={};F(Jb,{endsWith:()=>_u,gt:()=>hr,gte:()=>ra,includes:()=>Qu,length:()=>Es,lowercase:()=>Eu,lt:()=>br,lte:()=>Ta,maxLength:()=>ws,maxSize:()=>bA,mime:()=>vu,minLength:()=>pi,minSize:()=>Br,multipleOf:()=>fA,negative:()=>Gb,nonnegative:()=>Ub,nonpositive:()=>Hb,normalize:()=>xu,overwrite:()=>No,positive:()=>Pb,property:()=>Tb,regex:()=>wu,size:()=>Cs,slugify:()=>Lu,startsWith:()=>Iu,toLowerCase:()=>Fu,toUpperCase:()=>Su,trim:()=>Du,uppercase:()=>ku});var $u={};F($u,{ZodISODate:()=>Zb,ZodISODateTime:()=>Wb,ZodISODuration:()=>Xb,ZodISOTime:()=>Vb,date:()=>VI,datetime:()=>ZI,duration:()=>e_,time:()=>XI});var Wb=I("ZodISODateTime",(e,t)=>{v0.init(e,t),et.init(e,t)});function ZI(e){return SQ(Wb,e)}var Zb=I("ZodISODate",(e,t)=>{x0.init(e,t),et.init(e,t)});function VI(e){return LQ(Zb,e)}var Vb=I("ZodISOTime",(e,t)=>{D0.init(e,t),et.init(e,t)});function XI(e){return RQ(Vb,e)}var Xb=I("ZodISODuration",(e,t)=>{F0.init(e,t),et.init(e,t)});function e_(e){return NQ(Xb,e)}var oR=(e,t)=>{Pl.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Hl(e,n)},flatten:{value:n=>Gl(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,pu,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,pu,2)}},isEmpty:{get(){return e.issues.length===0}}})},ree=I("ZodError",oR),Qa=I("ZodError",oR,{Parent:Error});var t_=fu(Qa),n_=bu(Qa),a_=hu(Qa),o_=Bu(Qa),r_=Yf(Qa),i_=Kf(Qa),A_=Jf(Qa),s_=Wf(Qa),c_=Zf(Qa),u_=Vf(Qa),d_=Xf(Qa),l_=eb(Qa);var rR=new WeakMap;function ap(e,t,n){let o=Object.getPrototypeOf(e),a=rR.get(o);if(a||(a=new Set,rR.set(o,a)),!a.has(t)){a.add(t);for(let r in n){let i=n[r];Object.defineProperty(o,r,{configurable:!0,enumerable:!1,get(){let A=i.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!0,value:A}),A},set(A){Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!0,value:A})}})}}}var ge=I("ZodType",(e,t)=>(ie.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Nu(e,"input"),output:Nu(e,"output")}}),e.toJSONSchema=pI(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>t_(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>a_(e,n,o),e.parseAsync=async(n,o)=>n_(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>o_(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>r_(e,n,o),e.decode=(n,o)=>i_(e,n,o),e.encodeAsync=async(n,o)=>A_(e,n,o),e.decodeAsync=async(n,o)=>s_(e,n,o),e.safeEncode=(n,o)=>c_(e,n,o),e.safeDecode=(n,o)=>u_(e,n,o),e.safeEncodeAsync=async(n,o)=>d_(e,n,o),e.safeDecodeAsync=async(n,o)=>l_(e,n,o),ap(e,"ZodType",{check(...n){let o=this.def;return this.clone(j.mergeDefs(o,{checks:[...o.checks??[],...n.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return aa(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(av(n,o))},superRefine(n,o){return this.check(ov(n,o))},overwrite(n){return this.check(No(n))},optional(){return tp(this)},exactOptional(){return j_(this)},nullable(){return np(this)},nullish(){return tp(np(this))},nonoptional(n){return O_(this,n)},array(){return ip(this)},or(n){return Ch([this,n])},and(n){return v_(this,n)},transform(n){return th(this,Eh(n))},default(n){return H_(this,n)},prefault(n){return T_(this,n)},catch(n){return Y_(this,n)},pipe(n){return th(this,n)},readonly(){return Z_(this)},describe(n){let o=this.clone();return Nn.add(o,{description:n}),o},meta(...n){if(n.length===0)return Nn.get(this);let o=this.clone();return Nn.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Nn.get(e)?.description},configurable:!0}),e)),nh=I("_ZodString",(e,t)=>{ys.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(o,a,r)=>gI(e,o,a,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ap(e,"_ZodString",{regex(...o){return this.check(wu(...o))},includes(...o){return this.check(Qu(...o))},startsWith(...o){return this.check(Iu(...o))},endsWith(...o){return this.check(_u(...o))},min(...o){return this.check(pi(...o))},max(...o){return this.check(ws(...o))},length(...o){return this.check(Es(...o))},nonempty(...o){return this.check(pi(1,...o))},lowercase(o){return this.check(Eu(o))},uppercase(o){return this.check(ku(o))},trim(){return this.check(Du())},normalize(...o){return this.check(xu(...o))},toLowerCase(){return this.check(Fu())},toUpperCase(){return this.check(Su())},slugify(){return this.check(Lu())}})}),Pu=I("ZodString",(e,t)=>{ys.init(e,t),nh.init(e,t),e.email=n=>e.check(Bb(ah,n)),e.url=n=>e.check(Zl(op,n)),e.jwt=n=>e.check(jb(hh,n)),e.emoji=n=>e.check(kb(oh,n)),e.guid=n=>e.check(Wl(ep,n)),e.uuid=n=>e.check(yb(yr,n)),e.uuidv4=n=>e.check(Cb(yr,n)),e.uuidv6=n=>e.check(wb(yr,n)),e.uuidv7=n=>e.check(Eb(yr,n)),e.nanoid=n=>e.check(Qb(rh,n)),e.guid=n=>e.check(Wl(ep,n)),e.cuid=n=>e.check(Ib(ih,n)),e.cuid2=n=>e.check(_b(Ah,n)),e.ulid=n=>e.check(vb(sh,n)),e.base64=n=>e.check(Nb(mh,n)),e.base64url=n=>e.check($b(fh,n)),e.xid=n=>e.check(xb(ch,n)),e.ksuid=n=>e.check(Db(uh,n)),e.ipv4=n=>e.check(Fb(dh,n)),e.ipv6=n=>e.check(Sb(lh,n)),e.cidrv4=n=>e.check(Lb(ph,n)),e.cidrv6=n=>e.check(Rb(gh,n)),e.e164=n=>e.check(Mb(bh,n)),e.datetime=n=>e.check(ZI(n)),e.date=n=>e.check(VI(n)),e.time=n=>e.check(XI(n)),e.duration=n=>e.check(e_(n))});function Xl(e){return vQ(Pu,e)}var et=I("ZodStringFormat",(e,t)=>{Xe.init(e,t),nh.init(e,t)}),ah=I("ZodEmail",(e,t)=>{B0.init(e,t),et.init(e,t)});function iR(e){return Bb(ah,e)}var ep=I("ZodGUID",(e,t)=>{b0.init(e,t),et.init(e,t)});function AR(e){return Wl(ep,e)}var yr=I("ZodUUID",(e,t)=>{h0.init(e,t),et.init(e,t)});function sR(e){return yb(yr,e)}function cR(e){return Cb(yr,e)}function uR(e){return wb(yr,e)}function dR(e){return Eb(yr,e)}var op=I("ZodURL",(e,t)=>{y0.init(e,t),et.init(e,t)});function lR(e){return Zl(op,e)}function pR(e){return Zl(op,{protocol:Ua.httpProtocol,hostname:Ua.domain,...j.normalizeParams(e)})}var oh=I("ZodEmoji",(e,t)=>{C0.init(e,t),et.init(e,t)});function gR(e){return kb(oh,e)}var rh=I("ZodNanoID",(e,t)=>{w0.init(e,t),et.init(e,t)});function mR(e){return Qb(rh,e)}var ih=I("ZodCUID",(e,t)=>{E0.init(e,t),et.init(e,t)});function fR(e){return Ib(ih,e)}var Ah=I("ZodCUID2",(e,t)=>{k0.init(e,t),et.init(e,t)});function bR(e){return _b(Ah,e)}var sh=I("ZodULID",(e,t)=>{Q0.init(e,t),et.init(e,t)});function hR(e){return vb(sh,e)}var ch=I("ZodXID",(e,t)=>{I0.init(e,t),et.init(e,t)});function BR(e){return xb(ch,e)}var uh=I("ZodKSUID",(e,t)=>{_0.init(e,t),et.init(e,t)});function yR(e){return Db(uh,e)}var dh=I("ZodIPv4",(e,t)=>{S0.init(e,t),et.init(e,t)});function CR(e){return Fb(dh,e)}var p_=I("ZodMAC",(e,t)=>{R0.init(e,t),et.init(e,t)});function wR(e){return DQ(p_,e)}var lh=I("ZodIPv6",(e,t)=>{L0.init(e,t),et.init(e,t)});function ER(e){return Sb(lh,e)}var ph=I("ZodCIDRv4",(e,t)=>{N0.init(e,t),et.init(e,t)});function kR(e){return Lb(ph,e)}var gh=I("ZodCIDRv6",(e,t)=>{$0.init(e,t),et.init(e,t)});function QR(e){return Rb(gh,e)}var mh=I("ZodBase64",(e,t)=>{j0.init(e,t),et.init(e,t)});function IR(e){return Nb(mh,e)}var fh=I("ZodBase64URL",(e,t)=>{P0.init(e,t),et.init(e,t)});function _R(e){return $b(fh,e)}var bh=I("ZodE164",(e,t)=>{G0.init(e,t),et.init(e,t)});function vR(e){return Mb(bh,e)}var hh=I("ZodJWT",(e,t)=>{H0.init(e,t),et.init(e,t)});function xR(e){return jb(hh,e)}var Gu=I("ZodCustomStringFormat",(e,t)=>{U0.init(e,t),et.init(e,t)});function DR(e,t,n={}){return Ru(Gu,e,t,n)}function FR(e){return Ru(Gu,"hostname",Ua.hostname,e)}function SR(e){return Ru(Gu,"hex",Ua.hex,e)}function LR(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,a=Ua[o];if(!a)throw new Error(`Unrecognized hash format: ${o}`);return Ru(Gu,o,a,t)}var Hu=I("ZodNumber",(e,t)=>{cb.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(o,a,r)=>mI(e,o,a,r),ap(e,"ZodNumber",{gt(o,a){return this.check(hr(o,a))},gte(o,a){return this.check(ra(o,a))},min(o,a){return this.check(ra(o,a))},lt(o,a){return this.check(br(o,a))},lte(o,a){return this.check(Ta(o,a))},max(o,a){return this.check(Ta(o,a))},int(o){return this.check(eh(o))},safe(o){return this.check(eh(o))},positive(o){return this.check(hr(0,o))},nonnegative(o){return this.check(ra(0,o))},negative(o){return this.check(br(0,o))},nonpositive(o){return this.check(Ta(0,o))},multipleOf(o,a){return this.check(fA(o,a))},step(o,a){return this.check(fA(o,a))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function g_(e){return $Q(Hu,e)}var Qs=I("ZodNumberFormat",(e,t)=>{T0.init(e,t),Hu.init(e,t)});function eh(e){return jQ(Qs,e)}function RR(e){return PQ(Qs,e)}function NR(e){return GQ(Qs,e)}function $R(e){return HQ(Qs,e)}function MR(e){return UQ(Qs,e)}var Uu=I("ZodBoolean",(e,t)=>{ql.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>fI(e,n,o,a)});function m_(e){return TQ(Uu,e)}var Tu=I("ZodBigInt",(e,t)=>{ub.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(o,a,r)=>bI(e,o,a,r),e.gte=(o,a)=>e.check(ra(o,a)),e.min=(o,a)=>e.check(ra(o,a)),e.gt=(o,a)=>e.check(hr(o,a)),e.gte=(o,a)=>e.check(ra(o,a)),e.min=(o,a)=>e.check(ra(o,a)),e.lt=(o,a)=>e.check(br(o,a)),e.lte=(o,a)=>e.check(Ta(o,a)),e.max=(o,a)=>e.check(Ta(o,a)),e.positive=o=>e.check(hr(BigInt(0),o)),e.negative=o=>e.check(br(BigInt(0),o)),e.nonpositive=o=>e.check(Ta(BigInt(0),o)),e.nonnegative=o=>e.check(ra(BigInt(0),o)),e.multipleOf=(o,a)=>e.check(fA(o,a));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function jR(e){return qQ(Tu,e)}var Bh=I("ZodBigIntFormat",(e,t)=>{O0.init(e,t),Tu.init(e,t)});function PR(e){return YQ(Bh,e)}function GR(e){return KQ(Bh,e)}var f_=I("ZodSymbol",(e,t)=>{q0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>hI(e,n,o,a)});function HR(e){return JQ(f_,e)}var b_=I("ZodUndefined",(e,t)=>{z0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>yI(e,n,o,a)});function UR(e){return WQ(b_,e)}var h_=I("ZodNull",(e,t)=>{Y0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>BI(e,n,o,a)});function B_(e){return ZQ(h_,e)}var y_=I("ZodAny",(e,t)=>{K0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>EI(e,n,o,a)});function TR(){return VQ(y_)}var C_=I("ZodUnknown",(e,t)=>{J0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>kI(e,n,o,a)});function ks(){return XQ(C_)}var w_=I("ZodNever",(e,t)=>{W0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>wI(e,n,o,a)});function yh(e){return eI(w_,e)}var E_=I("ZodVoid",(e,t)=>{Z0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>CI(e,n,o,a)});function OR(e){return tI(E_,e)}var rp=I("ZodDate",(e,t)=>{V0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(o,a,r)=>QI(e,o,a,r),e.min=(o,a)=>e.check(ra(o,a)),e.max=(o,a)=>e.check(Ta(o,a));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function qR(e){return nI(rp,e)}var k_=I("ZodArray",(e,t)=>{X0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>MI(e,n,o,a),e.element=t.element,ap(e,"ZodArray",{min(n,o){return this.check(pi(n,o))},nonempty(n){return this.check(pi(1,n))},max(n,o){return this.check(ws(n,o))},length(n,o){return this.check(Es(n,o))},unwrap(){return this.element}})});function ip(e,t){return rI(k_,e,t)}function zR(e){let t=e._zod.def.shape;return wh(Object.keys(t))}var Ap=I("ZodObject",(e,t)=>{eQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>jI(e,n,o,a),j.defineLazy(e,"shape",()=>t.shape),ap(e,"ZodObject",{keyof(){return wh(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:ks()})},loose(){return this.clone({...this._zod.def,catchall:ks()})},strict(){return this.clone({...this._zod.def,catchall:yh()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return j.extend(this,n)},safeExtend(n){return j.safeExtend(this,n)},merge(n){return j.merge(this,n)},pick(n){return j.pick(this,n)},omit(n){return j.omit(this,n)},partial(...n){return j.partial(kh,this,n[0])},required(...n){return j.required(Qh,this,n[0])}})});function YR(e,t){let n={type:"object",shape:e??{},...j.normalizeParams(t)};return new Ap(n)}function KR(e,t){return new Ap({type:"object",shape:e,catchall:yh(),...j.normalizeParams(t)})}function JR(e,t){return new Ap({type:"object",shape:e,catchall:ks(),...j.normalizeParams(t)})}var sp=I("ZodUnion",(e,t)=>{zl.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>qb(e,n,o,a),e.options=t.options});function Ch(e,t){return new sp({type:"union",options:e,...j.normalizeParams(t)})}var Q_=I("ZodXor",(e,t)=>{sp.init(e,t),tQ.init(e,t),e._zod.processJSONSchema=(n,o,a)=>qb(e,n,o,a),e.options=t.options});function WR(e,t){return new Q_({type:"union",options:e,inclusive:!1,...j.normalizeParams(t)})}var I_=I("ZodDiscriminatedUnion",(e,t)=>{sp.init(e,t),nQ.init(e,t)});function ZR(e,t,n){return new I_({type:"union",options:t,discriminator:e,...j.normalizeParams(n)})}var __=I("ZodIntersection",(e,t)=>{aQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>PI(e,n,o,a)});function v_(e,t){return new __({type:"intersection",left:e,right:t})}var x_=I("ZodTuple",(e,t)=>{db.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>GI(e,n,o,a),e.rest=n=>e.clone({...e._zod.def,rest:n})});function D_(e,t,n){let o=t instanceof ie,a=o?n:t,r=o?t:null;return new x_({type:"tuple",items:e,rest:r,...j.normalizeParams(a)})}var Mu=I("ZodRecord",(e,t)=>{oQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>HI(e,n,o,a),e.keyType=t.keyType,e.valueType=t.valueType});function F_(e,t,n){return!t||!t._zod?new Mu({type:"record",keyType:Xl(),valueType:e,...j.normalizeParams(t)}):new Mu({type:"record",keyType:e,valueType:t,...j.normalizeParams(n)})}function VR(e,t,n){let o=aa(e);return o._zod.values=void 0,new Mu({type:"record",keyType:o,valueType:t,...j.normalizeParams(n)})}function XR(e,t,n){return new Mu({type:"record",keyType:e,valueType:t,mode:"loose",...j.normalizeParams(n)})}var S_=I("ZodMap",(e,t)=>{rQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>NI(e,n,o,a),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Br(...n)),e.nonempty=n=>e.check(Br(1,n)),e.max=(...n)=>e.check(bA(...n)),e.size=(...n)=>e.check(Cs(...n))});function eN(e,t,n){return new S_({type:"map",keyType:e,valueType:t,...j.normalizeParams(n)})}var L_=I("ZodSet",(e,t)=>{iQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>$I(e,n,o,a),e.min=(...n)=>e.check(Br(...n)),e.nonempty=n=>e.check(Br(1,n)),e.max=(...n)=>e.check(bA(...n)),e.size=(...n)=>e.check(Cs(...n))});function tN(e,t){return new L_({type:"set",valueType:e,...j.normalizeParams(t)})}var ju=I("ZodEnum",(e,t)=>{AQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(o,a,r)=>II(e,o,a,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,a)=>{let r={};for(let i of o)if(n.has(i))r[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new ju({...t,checks:[],...j.normalizeParams(a),entries:r})},e.exclude=(o,a)=>{let r={...t.entries};for(let i of o)if(n.has(i))delete r[i];else throw new Error(`Key ${i} not found in enum`);return new ju({...t,checks:[],...j.normalizeParams(a),entries:r})}});function wh(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ju({type:"enum",entries:n,...j.normalizeParams(t)})}function nN(e,t){return new ju({type:"enum",entries:e,...j.normalizeParams(t)})}var R_=I("ZodLiteral",(e,t)=>{sQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>_I(e,n,o,a),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 aN(e,t){return new R_({type:"literal",values:Array.isArray(e)?e:[e],...j.normalizeParams(t)})}var N_=I("ZodFile",(e,t)=>{cQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>DI(e,n,o,a),e.min=(n,o)=>e.check(Br(n,o)),e.max=(n,o)=>e.check(bA(n,o)),e.mime=(n,o)=>e.check(vu(Array.isArray(n)?n:[n],o))});function oN(e){return iI(N_,e)}var $_=I("ZodTransform",(e,t)=>{uQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>RI(e,n,o,a),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new dA(e.constructor.name);n.addIssue=r=>{if(typeof r=="string")n.issues.push(j.issue(r,n.value,t));else{let i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(j.issue(i))}};let a=t.transform(n.value,n);return a instanceof Promise?a.then(r=>(n.value=r,n.fallback=!0,n)):(n.value=a,n.fallback=!0,n)}});function Eh(e){return new $_({type:"transform",transform:e})}var kh=I("ZodOptional",(e,t)=>{lb.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>zb(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function tp(e){return new kh({type:"optional",innerType:e})}var M_=I("ZodExactOptional",(e,t)=>{dQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>zb(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function j_(e){return new M_({type:"optional",innerType:e})}var P_=I("ZodNullable",(e,t)=>{lQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>UI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function np(e){return new P_({type:"nullable",innerType:e})}function rN(e){return tp(np(e))}var G_=I("ZodDefault",(e,t)=>{pQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>OI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function H_(e,t){return new G_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():j.shallowClone(t)}})}var U_=I("ZodPrefault",(e,t)=>{gQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>qI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function T_(e,t){return new U_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():j.shallowClone(t)}})}var Qh=I("ZodNonOptional",(e,t)=>{mQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>TI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function O_(e,t){return new Qh({type:"nonoptional",innerType:e,...j.normalizeParams(t)})}var q_=I("ZodSuccess",(e,t)=>{fQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>FI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function iN(e){return new q_({type:"success",innerType:e})}var z_=I("ZodCatch",(e,t)=>{bQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>zI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Y_(e,t){return new z_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var K_=I("ZodNaN",(e,t)=>{hQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>vI(e,n,o,a)});function AN(e){return oI(K_,e)}var cp=I("ZodPipe",(e,t)=>{pb.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>YI(e,n,o,a),e.in=t.in,e.out=t.out});function th(e,t){return new cp({type:"pipe",in:e,out:t})}var up=I("ZodCodec",(e,t)=>{cp.init(e,t),Yl.init(e,t)});function sN(e,t,n){return new up({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function cN(e){let t=e._zod.def;return new up({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var J_=I("ZodPreprocess",(e,t)=>{cp.init(e,t),BQ.init(e,t)}),W_=I("ZodReadonly",(e,t)=>{yQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>KI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function Z_(e){return new W_({type:"readonly",innerType:e})}var V_=I("ZodTemplateLiteral",(e,t)=>{CQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>xI(e,n,o,a)});function uN(e,t){return new V_({type:"template_literal",parts:e,...j.normalizeParams(t)})}var X_=I("ZodLazy",(e,t)=>{kQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>WI(e,n,o,a),e.unwrap=()=>e._zod.def.getter()});function ev(e){return new X_({type:"lazy",getter:e})}var tv=I("ZodPromise",(e,t)=>{EQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>JI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function dN(e){return new tv({type:"promise",innerType:e})}var nv=I("ZodFunction",(e,t)=>{wQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>LI(e,n,o,a)});function lN(e){return new nv({type:"function",input:Array.isArray(e?.input)?D_(e?.input):e?.input??ip(ks()),output:e?.output??ks()})}var dp=I("ZodCustom",(e,t)=>{QQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>SI(e,n,o,a)});function pN(e){let t=new ot({check:"custom"});return t._zod.check=e,t}function gN(e,t){return AI(dp,e??(()=>!0),t)}function av(e,t={}){return sI(dp,e,t)}function ov(e,t){return cI(e,t)}var mN=uI,fN=dI;function bN(e,t={}){let n=new dp({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...j.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}var hN=(...e)=>lI({Codec:up,Boolean:Uu,String:Pu},...e);function BN(e){let t=ev(()=>Ch([Xl(e),g_(),m_(),B_(),ip(t),F_(Xl(),t)]));return t}function yN(e,t){return new J_({type:"pipe",in:Eh(e),out:t})}var Aee={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 see(e){Ut({customError:e})}function cee(){return Ut().customError}var rv;rv||(rv={});var K={...Vl,...Jb,iso:$u},uee=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 dee(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function lee(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let a=n[1];if(!a||!t.defs[a])throw new Error(`Reference not found: ${e}`);return t.defs[a]}throw new Error(`Reference not found: ${e}`)}function CN(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return K.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 a=e.$ref;if(t.refs.has(a))return t.refs.get(a);if(t.processing.has(a))return K.lazy(()=>{if(!t.refs.has(a))throw new Error(`Circular reference not resolved: ${a}`);return t.refs.get(a)});t.processing.add(a);let r=lee(a,t),i=zn(r,t);return t.refs.set(a,i),t.processing.delete(a),i}if(e.enum!==void 0){let a=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&a.length===1&&a[0]===null)return K.null();if(a.length===0)return K.never();if(a.length===1)return K.literal(a[0]);if(a.every(i=>typeof i=="string"))return K.enum(a);let r=a.map(i=>K.literal(i));return r.length<2?r[0]:K.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return K.literal(e.const);let n=e.type;if(Array.isArray(n)){let a=n.map(r=>{let i={...e,type:r};return CN(i,t)});return a.length===0?K.never():a.length===1?a[0]:K.union(a)}if(!n)return K.any();let o;switch(n){case"string":{let a=K.string();if(e.format){let r=e.format;r==="email"?a=a.check(K.email()):r==="uri"||r==="uri-reference"?a=a.check(K.url()):r==="uuid"||r==="guid"?a=a.check(K.uuid()):r==="date-time"?a=a.check(K.iso.datetime()):r==="date"?a=a.check(K.iso.date()):r==="time"?a=a.check(K.iso.time()):r==="duration"?a=a.check(K.iso.duration()):r==="ipv4"?a=a.check(K.ipv4()):r==="ipv6"?a=a.check(K.ipv6()):r==="mac"?a=a.check(K.mac()):r==="cidr"?a=a.check(K.cidrv4()):r==="cidr-v6"?a=a.check(K.cidrv6()):r==="base64"?a=a.check(K.base64()):r==="base64url"?a=a.check(K.base64url()):r==="e164"?a=a.check(K.e164()):r==="jwt"?a=a.check(K.jwt()):r==="emoji"?a=a.check(K.emoji()):r==="nanoid"?a=a.check(K.nanoid()):r==="cuid"?a=a.check(K.cuid()):r==="cuid2"?a=a.check(K.cuid2()):r==="ulid"?a=a.check(K.ulid()):r==="xid"?a=a.check(K.xid()):r==="ksuid"&&(a=a.check(K.ksuid()))}typeof e.minLength=="number"&&(a=a.min(e.minLength)),typeof e.maxLength=="number"&&(a=a.max(e.maxLength)),e.pattern&&(a=a.regex(new RegExp(e.pattern))),o=a;break}case"number":case"integer":{let a=n==="integer"?K.number().int():K.number();typeof e.minimum=="number"&&(a=a.min(e.minimum)),typeof e.maximum=="number"&&(a=a.max(e.maximum)),typeof e.exclusiveMinimum=="number"?a=a.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(a=a.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?a=a.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(a=a.lt(e.maximum)),typeof e.multipleOf=="number"&&(a=a.multipleOf(e.multipleOf)),o=a;break}case"boolean":{o=K.boolean();break}case"null":{o=K.null();break}case"object":{let a={},r=e.properties||{},i=new Set(e.required||[]);for(let[s,c]of Object.entries(r)){let u=zn(c,t);a[s]=i.has(s)?u:u.optional()}if(e.propertyNames){let s=zn(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?zn(e.additionalProperties,t):K.any();if(Object.keys(a).length===0){o=K.record(s,c);break}let u=K.object(a).passthrough(),l=K.looseRecord(s,c);o=K.intersection(u,l);break}if(e.patternProperties){let s=e.patternProperties,c=Object.keys(s),u=[];for(let p of c){let g=zn(s[p],t),m=K.string().regex(new RegExp(p));u.push(K.looseRecord(m,g))}let l=[];if(Object.keys(a).length>0&&l.push(K.object(a).passthrough()),l.push(...u),l.length===0)o=K.object({}).passthrough();else if(l.length===1)o=l[0];else{let p=K.intersection(l[0],l[1]);for(let g=2;g<l.length;g++)p=K.intersection(p,l[g]);o=p}break}let A=K.object(a);e.additionalProperties===!1?o=A.strict():typeof e.additionalProperties=="object"?o=A.catchall(zn(e.additionalProperties,t)):o=A.passthrough();break}case"array":{let a=e.prefixItems,r=e.items;if(a&&Array.isArray(a)){let i=a.map(s=>zn(s,t)),A=r&&typeof r=="object"&&!Array.isArray(r)?zn(r,t):void 0;A?o=K.tuple(i).rest(A):o=K.tuple(i),typeof e.minItems=="number"&&(o=o.check(K.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(K.maxLength(e.maxItems)))}else if(Array.isArray(r)){let i=r.map(s=>zn(s,t)),A=e.additionalItems&&typeof e.additionalItems=="object"?zn(e.additionalItems,t):void 0;A?o=K.tuple(i).rest(A):o=K.tuple(i),typeof e.minItems=="number"&&(o=o.check(K.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(K.maxLength(e.maxItems)))}else if(r!==void 0){let i=zn(r,t),A=K.array(i);typeof e.minItems=="number"&&(A=A.min(e.minItems)),typeof e.maxItems=="number"&&(A=A.max(e.maxItems)),o=A}else o=K.array(K.any());break}default:throw new Error(`Unsupported type: ${n}`)}return o}function zn(e,t){if(typeof e=="boolean")return e?K.any():K.never();let n=CN(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let A=e.anyOf.map(c=>zn(c,t)),s=K.union(A);n=o?K.intersection(n,s):s}if(e.oneOf&&Array.isArray(e.oneOf)){let A=e.oneOf.map(c=>zn(c,t)),s=K.xor(A);n=o?K.intersection(n,s):s}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:K.any();else{let A=o?n:zn(e.allOf[0],t),s=o?0:1;for(let c=s;c<e.allOf.length;c++)A=K.intersection(A,zn(e.allOf[c],t));n=A}e.nullable===!0&&t.version==="openapi-3.0"&&(n=K.nullable(n)),e.readOnly===!0&&(n=K.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let a={},r=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let A of r)A in e&&(a[A]=e[A]);let i=["contentEncoding","contentMediaType","contentSchema"];for(let A of i)A in e&&(a[A]=e[A]);for(let A of Object.keys(e))uee.has(A)||(a[A]=e[A]);return Object.keys(a).length>0&&t.registry.add(n,a),e.description&&(n=n.describe(e.description)),n}function wN(e,t){if(typeof e=="boolean")return e?K.any():K.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=dee(n,t?.defaultTarget),a=n.$defs||n.definitions||{},r={version:o,defs:a,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Nn};return zn(n,r)}var iv={};F(iv,{bigint:()=>fee,boolean:()=>mee,date:()=>bee,number:()=>gee,string:()=>pee});function pee(e){return xQ(Pu,e)}function gee(e){return MQ(Hu,e)}function mee(e){return OQ(Uu,e)}function fee(e){return zQ(Tu,e)}function bee(e){return aI(rp,e)}Ut(gb());var hee=d.object({input:d.number().finite().nonnegative().optional(),output:d.number().finite().nonnegative().optional(),cacheRead:d.number().finite().nonnegative().optional(),cacheWrite:d.number().finite().nonnegative().optional(),total:d.number().finite().nonnegative().optional()}).strict(),EN=d.object({inputTokens:d.number().int().nonnegative().optional(),outputTokens:d.number().int().nonnegative().optional(),cachedInputTokens:d.number().int().nonnegative().optional(),cacheCreationTokens:d.number().int().nonnegative().optional(),reasoningTokens:d.number().int().nonnegative().optional(),totalTokens:d.number().int().nonnegative().optional(),cost:hee.optional()}).strict();var _=Symbol.for("drizzle:entityKind");function dn(e,t){if(!e||typeof e!="object")return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,_))throw new Error(`Class "${t.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(_ in n&&n[_]===t[_])return!0;n=Object.getPrototypeOf(n)}return!1}var Is=class{constructor(t,n){this.table=t,this.config=n,this.name=n.name,this.keyAsName=n.keyAsName,this.notNull=n.notNull,this.default=n.default,this.defaultFn=n.defaultFn,this.onUpdateFn=n.onUpdateFn,this.hasDefault=n.hasDefault,this.primary=n.primaryKey,this.isUnique=n.isUnique,this.uniqueName=n.uniqueName,this.uniqueType=n.uniqueType,this.dataType=n.dataType,this.columnType=n.columnType,this.generated=n.generated,this.generatedIdentity=n.generatedIdentity}static[_]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}};var Ih=class{static[_]="ColumnBuilder";config;constructor(t,n,o){this.config={name:t,keyAsName:t==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:n,columnType:o,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(t){return this.config.default=t,this.config.hasDefault=!0,this}$defaultFn(t){return this.config.defaultFn=t,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(t){return this.config.onUpdateFn=t,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(t){this.config.name===""&&(this.config.name=t)}};var mi=Symbol.for("drizzle:Name");var _h=class{static[_]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor(t,n){this.reference=()=>{let{name:o,columns:a,foreignColumns:r}=t();return{name:o,columns:a,foreignTable:r[0].table,foreignColumns:r}},n&&(this._onUpdate=n.onUpdate,this._onDelete=n.onDelete)}onUpdate(t){return this._onUpdate=t===void 0?"no action":t,this}onDelete(t){return this._onDelete=t===void 0?"no action":t,this}build(t){return new Av(t,this)}},Av=class{constructor(t,n){this.table=t,this.reference=n.reference,this.onUpdate=n._onUpdate,this.onDelete=n._onDelete}static[_]="PgForeignKey";reference;onUpdate;onDelete;getName(){let{name:t,columns:n,foreignColumns:o}=this.reference(),a=n.map(A=>A.name),r=o.map(A=>A.name),i=[this.table[mi],...a,o[0].table[mi],...r];return t??`${i.join("_")}_fk`}};function vh(e,...t){return e(...t)}function uv(e,t){return`${e[mi]}_${t.join("_")}_unique`}var sv=class{constructor(t,n){this.name=n,this.columns=t}static[_]="PgUniqueConstraintBuilder";columns;nullsNotDistinctConfig=!1;nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(t){return new cv(t,this.columns,this.nullsNotDistinctConfig,this.name)}},kN=class{static[_]="PgUniqueOnConstraintBuilder";name;constructor(t){this.name=t}on(...t){return new sv(t,this.name)}},cv=class{constructor(t,n,o,a){this.table=t,this.columns=n,this.name=a??uv(this.table,this.columns.map(r=>r.name)),this.nullsNotDistinct=o}static[_]="PgUniqueConstraint";columns;name;nullsNotDistinct=!1;getName(){return this.name}};function QN(e,t,n){for(let o=t;o<e.length;o++){let a=e[o];if(a==="\\"){o++;continue}if(a==='"')return[e.slice(t,o).replace(/\\/g,""),o+1];if(!n&&(a===","||a==="}"))return[e.slice(t,o).replace(/\\/g,""),o]}return[e.slice(t).replace(/\\/g,""),e.length]}function IN(e,t=0){let n=[],o=t,a=!1;for(;o<e.length;){let r=e[o];if(r===","){(a||o===t)&&n.push(""),a=!0,o++;continue}if(a=!1,r==="\\"){o+=2;continue}if(r==='"'){let[s,c]=QN(e,o+1,!0);n.push(s),o=c;continue}if(r==="}")return[n,o+1];if(r==="{"){let[s,c]=IN(e,o+1);n.push(s),o=c;continue}let[i,A]=QN(e,o,!1);n.push(i),o=A}return[n,o]}function _N(e){let[t]=IN(e,1);return t}function dv(e){return`{${e.map(t=>Array.isArray(t)?dv(t):typeof t=="string"?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}var Z=class extends Ih{foreignKeyConfigs=[];static[_]="PgColumnBuilder";array(t){return new pv(this.config.name,this,t)}references(t,n={}){return this.foreignKeyConfigs.push({ref:t,actions:n}),this}unique(t,n){return this.config.isUnique=!0,this.config.uniqueName=t,this.config.uniqueType=n?.nulls,this}generatedAlwaysAs(t){return this.config.generated={as:t,type:"always",mode:"stored"},this}buildForeignKeys(t,n){return this.foreignKeyConfigs.map(({ref:o,actions:a})=>vh((r,i)=>{let A=new _h(()=>{let s=r();return{columns:[t],foreignColumns:[s]}});return i.onUpdate&&A.onUpdate(i.onUpdate),i.onDelete&&A.onDelete(i.onDelete),A.build(n)},o,a))}buildExtraConfigColumn(t){return new lv(t,this.config)}},z=class extends Is{constructor(t,n){n.uniqueName||(n.uniqueName=uv(t,[n.name])),super(t,n),this.table=t}static[_]="PgColumn"},lv=class extends z{static[_]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(t){return this.indexConfig.opClass=t,this}},Ou=class{static[_]="IndexedColumn";constructor(t,n,o,a){this.name=t,this.keyAsName=n,this.type=o,this.indexConfig=a}name;keyAsName;type;indexConfig},pv=class extends Z{static[_]="PgArrayBuilder";constructor(t,n,o){super(t,"array","PgArray"),this.config.baseBuilder=n,this.config.size=o}build(t){let n=this.config.baseBuilder.build(t);return new gv(t,this.config,n)}},gv=class e extends z{constructor(t,n,o,a){super(t,n),this.baseColumn=o,this.range=a,this.size=n.size}size;static[_]="PgArray";getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size=="number"?this.size:""}]`}mapFromDriverValue(t){return typeof t=="string"&&(t=_N(t)),t.map(n=>this.baseColumn.mapFromDriverValue(n))}mapToDriverValue(t,n=!1){let o=t.map(a=>a===null?null:dn(this.baseColumn,e)?this.baseColumn.mapToDriverValue(a,!0):this.baseColumn.mapToDriverValue(a));return n?o:dv(o)}};var vN=class extends Z{static[_]="PgEnumObjectColumnBuilder";constructor(t,n){super(t,"string","PgEnumObjectColumn"),this.config.enum=n}build(t){return new mv(t,this.config)}},mv=class extends z{static[_]="PgEnumObjectColumn";enum;enumValues=this.config.enum.enumValues;constructor(t,n){super(t,n),this.enum=n.enum}getSQLType(){return this.enum.enumName}},xN=Symbol.for("drizzle:isPgEnum");function FN(e){return!!e&&typeof e=="function"&&xN in e&&e[xN]===!0}var DN=class extends Z{static[_]="PgEnumColumnBuilder";constructor(t,n){super(t,"string","PgEnumColumn"),this.config.enum=n}build(t){return new fv(t,this.config)}},fv=class extends z{static[_]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor(t,n){super(t,n),this.enum=n.enum}getSQLType(){return this.enum.enumName}};var qu=class{static[_]="Subquery";constructor(t,n,o,a=!1,r=[]){this._={brand:"Subquery",sql:t,selectedFields:n,alias:o,isWith:a,usedTables:r}}},SN=class extends qu{static[_]="WithSubquery"};var LN="0.45.2";var bv,hv,RN={startActiveSpan(e,t){return bv?(hv||(hv=bv.trace.getTracer("drizzle-orm",LN)),vh((n,o)=>o.startActiveSpan(e,a=>{try{return t(a)}catch(r){throw a.setStatus({code:n.SpanStatusCode.ERROR,message:r instanceof Error?r.message:"Unknown error"}),r}finally{a.end()}}),bv,hv)):t()}};var zu=Symbol.for("drizzle:ViewBaseConfig");var Bv=Symbol.for("drizzle:Schema"),NN=Symbol.for("drizzle:Columns"),$N=Symbol.for("drizzle:ExtraConfigColumns"),yv=Symbol.for("drizzle:OriginalName"),Cv=Symbol.for("drizzle:BaseName"),lp=Symbol.for("drizzle:IsAlias"),MN=Symbol.for("drizzle:ExtraConfigBuilder"),Bee=Symbol.for("drizzle:IsDrizzleTable"),Zt=class{static[_]="Table";static Symbol={Name:mi,Schema:Bv,OriginalName:yv,Columns:NN,ExtraConfigColumns:$N,BaseName:Cv,IsAlias:lp,ExtraConfigBuilder:MN};[mi];[yv];[Bv];[NN];[$N];[Cv];[lp]=!1;[Bee]=!0;[MN]=void 0;constructor(t,n,o){this[mi]=this[yv]=t,this[Bv]=n,this[Cv]=o}};var jN=class{static[_]="FakePrimitiveParam"};function yee(e){return e!=null&&typeof e.getSQL=="function"}function Cee(e){let t={sql:"",params:[]};for(let n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var Oa=class{static[_]="StringChunk";value;constructor(t){this.value=Array.isArray(t)?t:[t]}getSQL(){return new Vt([this])}},Vt=class e{constructor(t){this.queryChunks=t;for(let n of t)if(dn(n,Zt)){let o=n[Zt.Symbol.Schema];this.usedTables.push(o===void 0?n[Zt.Symbol.Name]:o+"."+n[Zt.Symbol.Name])}}static[_]="SQL";decoder=PN;shouldInlineParams=!1;usedTables=[];append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return RN.startActiveSpan("drizzle.buildSQL",n=>{let o=this.buildQueryFromSourceParams(this.queryChunks,t);return n?.setAttributes({"drizzle.query.text":o.sql,"drizzle.query.params":JSON.stringify(o.params)}),o})}buildQueryFromSourceParams(t,n){let o=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:a,escapeName:r,escapeParam:i,prepareTyping:A,inlineParams:s,paramStartIndex:c}=o;return Cee(t.map(u=>{if(dn(u,Oa))return{sql:u.value.join(""),params:[]};if(dn(u,pp))return{sql:r(u.value),params:[]};if(u===void 0)return{sql:"",params:[]};if(Array.isArray(u)){let l=[new Oa("(")];for(let[p,g]of u.entries())l.push(g),p<u.length-1&&l.push(new Oa(", "));return l.push(new Oa(")")),this.buildQueryFromSourceParams(l,o)}if(dn(u,e))return this.buildQueryFromSourceParams(u.queryChunks,{...o,inlineParams:s||u.shouldInlineParams});if(dn(u,Zt)){let l=u[Zt.Symbol.Schema],p=u[Zt.Symbol.Name];return{sql:l===void 0||u[lp]?r(p):r(l)+"."+r(p),params:[]}}if(dn(u,Is)){let l=a.getColumnCasing(u);if(n.invokeSource==="indexes")return{sql:r(l),params:[]};let p=u.table[Zt.Symbol.Schema];return{sql:u.table[lp]||p===void 0?r(u.table[Zt.Symbol.Name])+"."+r(l):r(p)+"."+r(u.table[Zt.Symbol.Name])+"."+r(l),params:[]}}if(dn(u,wv)){let l=u[zu].schema,p=u[zu].name;return{sql:l===void 0||u[zu].isAlias?r(p):r(l)+"."+r(p),params:[]}}if(dn(u,xh)){if(dn(u.value,gp))return{sql:i(c.value++,u),params:[u],typings:["none"]};let l=u.value===null?null:u.encoder.mapToDriverValue(u.value);if(dn(l,e))return this.buildQueryFromSourceParams([l],o);if(s)return{sql:this.mapInlineParam(l,o),params:[]};let p=["none"];return A&&(p=[A(u.encoder)]),{sql:i(c.value++,l),params:[l],typings:p}}return dn(u,gp)?{sql:i(c.value++,u),params:[u],typings:["none"]}:dn(u,e.Aliased)&&u.fieldAlias!==void 0?{sql:r(u.fieldAlias),params:[]}:dn(u,qu)?u._.isWith?{sql:r(u._.alias),params:[]}:this.buildQueryFromSourceParams([new Oa("("),u._.sql,new Oa(") "),new pp(u._.alias)],o):FN(u)?u.schema?{sql:r(u.schema)+"."+r(u.enumName),params:[]}:{sql:r(u.enumName),params:[]}:yee(u)?u.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([u.getSQL()],o):this.buildQueryFromSourceParams([new Oa("("),u.getSQL(),new Oa(")")],o):s?{sql:this.mapInlineParam(u,o),params:[]}:{sql:i(c.value++,u),params:[u],typings:["none"]}}))}mapInlineParam(t,{escapeString:n}){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return t.toString();if(typeof t=="string")return n(t);if(typeof t=="object"){let o=t.toString();return n(o==="[object Object]"?JSON.stringify(t):o)}throw new Error("Unexpected param value: "+t)}getSQL(){return this}as(t){return t===void 0?this:new e.Aliased(this,t)}mapWith(t){return this.decoder=typeof t=="function"?{mapFromDriverValue:t}:t,this}inlineParams(){return this.shouldInlineParams=!0,this}if(t){return t?this:void 0}},pp=class{constructor(t){this.value=t}static[_]="Name";brand;getSQL(){return new Vt([this])}};var PN={mapFromDriverValue:e=>e},GN={mapToDriverValue:e=>e},eEe={...PN,...GN},xh=class{constructor(t,n=GN){this.value=t,this.encoder=n}static[_]="Param";brand;getSQL(){return new Vt([this])}};function Yu(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!=="")&&n.push(new Oa(e[0]));for(let[o,a]of t.entries())n.push(a,new Oa(e[o+1]));return new Vt(n)}(e=>{function t(){return new Vt([])}e.empty=t;function n(s){return new Vt(s)}e.fromList=n;function o(s){return new Vt([new Oa(s)])}e.raw=o;function a(s,c){let u=[];for(let[l,p]of s.entries())l>0&&c!==void 0&&u.push(c),u.push(p);return new Vt(u)}e.join=a;function r(s){return new pp(s)}e.identifier=r;function i(s){return new gp(s)}e.placeholder=i;function A(s,c){return new xh(s,c)}e.param=A})(Yu||(Yu={}));(e=>{class t{constructor(o,a){this.sql=o,this.fieldAlias=a}static[_]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(Vt||(Vt={}));var gp=class{constructor(t){this.name=t}static[_]="Placeholder";getSQL(){return new Vt([this])}};var wee=Symbol.for("drizzle:IsDrizzleView"),wv=class{static[_]="View";[zu];[wee]=!0;constructor({name:t,schema:n,selectedFields:o,query:a}){this[zu]={name:t,originalName:t,schema:n,selectedFields:o,query:a,isExisting:!a,isAlias:!1}}getSQL(){return new Vt([this])}};Is.prototype.getSQL=function(){return new Vt([this])};Zt.prototype.getSQL=function(){return new Vt([this])};qu.prototype.getSQL=function(){return new Vt([this])};function ve(e,t){return{name:typeof e=="string"&&e.length>0?e:"",config:typeof e=="object"?e:t}}var nEe=typeof TextDecoder>"u"?null:new TextDecoder;var fi=class extends Z{static[_]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(t){if(t){let{name:n,...o}=t;this.config.generatedIdentity={type:"always",sequenceName:n,sequenceOptions:o}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(t){if(t){let{name:n,...o}=t;this.config.generatedIdentity={type:"byDefault",sequenceName:n,sequenceOptions:o}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}};var Ev=class extends fi{static[_]="PgBigInt53Builder";constructor(t){super(t,"number","PgBigInt53")}build(t){return new kv(t,this.config)}},kv=class extends z{static[_]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},Qv=class extends fi{static[_]="PgBigInt64Builder";constructor(t){super(t,"bigint","PgBigInt64")}build(t){return new Iv(t,this.config)}},Iv=class extends z{static[_]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(t){return BigInt(t)}};function HN(e,t){let{name:n,config:o}=ve(e,t);return o.mode==="number"?new Ev(n):new Qv(n)}var _v=class extends Z{static[_]="PgBigSerial53Builder";constructor(t){super(t,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new vv(t,this.config)}},vv=class extends z{static[_]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},xv=class extends Z{static[_]="PgBigSerial64Builder";constructor(t){super(t,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(t){return new Dv(t,this.config)}},Dv=class extends z{static[_]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(t){return BigInt(t)}};function UN(e,t){let{name:n,config:o}=ve(e,t);return o.mode==="number"?new _v(n):new xv(n)}var Fv=class extends Z{static[_]="PgBooleanBuilder";constructor(t){super(t,"boolean","PgBoolean")}build(t){return new Sv(t,this.config)}},Sv=class extends z{static[_]="PgBoolean";getSQLType(){return"boolean"}};function TN(e){return new Fv(e??"")}var Lv=class extends Z{static[_]="PgCharBuilder";constructor(t,n){super(t,"string","PgChar"),this.config.length=n.length,this.config.enumValues=n.enum}build(t){return new Rv(t,this.config)}},Rv=class extends z{static[_]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"char":`char(${this.length})`}};function ON(e,t={}){let{name:n,config:o}=ve(e,t);return new Lv(n,o)}var Nv=class extends Z{static[_]="PgCidrBuilder";constructor(t){super(t,"string","PgCidr")}build(t){return new $v(t,this.config)}},$v=class extends z{static[_]="PgCidr";getSQLType(){return"cidr"}};function qN(e){return new Nv(e??"")}var Mv=class extends Z{static[_]="PgCustomColumnBuilder";constructor(t,n,o){super(t,"custom","PgCustomColumn"),this.config.fieldConfig=n,this.config.customTypeParams=o}build(t){return new jv(t,this.config)}},jv=class extends z{static[_]="PgCustomColumn";sqlName;mapTo;mapFrom;constructor(t,n){super(t,n),this.sqlName=n.customTypeParams.dataType(n.fieldConfig),this.mapTo=n.customTypeParams.toDriver,this.mapFrom=n.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(t){return typeof this.mapFrom=="function"?this.mapFrom(t):t}mapToDriverValue(t){return typeof this.mapTo=="function"?this.mapTo(t):t}};function zN(e){return(t,n)=>{let{name:o,config:a}=ve(t,n);return new Mv(o,a,e)}}var Cr=class extends Z{static[_]="PgDateColumnBaseBuilder";defaultNow(){return this.default(Yu`now()`)}};var Pv=class extends Cr{static[_]="PgDateBuilder";constructor(t){super(t,"date","PgDate")}build(t){return new Gv(t,this.config)}},Gv=class extends z{static[_]="PgDate";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?new Date(t):t}mapToDriverValue(t){return t.toISOString()}},Hv=class extends Cr{static[_]="PgDateStringBuilder";constructor(t){super(t,"string","PgDateString")}build(t){return new Uv(t,this.config)}},Uv=class extends z{static[_]="PgDateString";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?t:t.toISOString().slice(0,-14)}};function YN(e,t){let{name:n,config:o}=ve(e,t);return o?.mode==="date"?new Pv(n):new Hv(n)}var Tv=class extends Z{static[_]="PgDoublePrecisionBuilder";constructor(t){super(t,"number","PgDoublePrecision")}build(t){return new Ov(t,this.config)}},Ov=class extends z{static[_]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(t){return typeof t=="string"?Number.parseFloat(t):t}};function KN(e){return new Tv(e??"")}var qv=class extends Z{static[_]="PgInetBuilder";constructor(t){super(t,"string","PgInet")}build(t){return new zv(t,this.config)}},zv=class extends z{static[_]="PgInet";getSQLType(){return"inet"}};function JN(e){return new qv(e??"")}var Yv=class extends fi{static[_]="PgIntegerBuilder";constructor(t){super(t,"number","PgInteger")}build(t){return new Kv(t,this.config)}},Kv=class extends z{static[_]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(t){return typeof t=="string"?Number.parseInt(t):t}};function WN(e){return new Yv(e??"")}var Jv=class extends Z{static[_]="PgIntervalBuilder";constructor(t,n){super(t,"string","PgInterval"),this.config.intervalConfig=n}build(t){return new Wv(t,this.config)}},Wv=class extends z{static[_]="PgInterval";fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){let t=this.fields?` ${this.fields}`:"",n=this.precision?`(${this.precision})`:"";return`interval${t}${n}`}};function ZN(e,t={}){let{name:n,config:o}=ve(e,t);return new Jv(n,o)}var Zv=class extends Z{static[_]="PgJsonBuilder";constructor(t){super(t,"json","PgJson")}build(t){return new Vv(t,this.config)}},Vv=class extends z{static[_]="PgJson";constructor(t,n){super(t,n)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}};function VN(e){return new Zv(e??"")}var Xv=class extends Z{static[_]="PgJsonbBuilder";constructor(t){super(t,"json","PgJsonb")}build(t){return new ex(t,this.config)}},ex=class extends z{static[_]="PgJsonb";constructor(t,n){super(t,n)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}};function Dh(e){return new Xv(e??"")}var tx=class extends Z{static[_]="PgLineBuilder";constructor(t){super(t,"array","PgLine")}build(t){return new nx(t,this.config)}},nx=class extends z{static[_]="PgLine";getSQLType(){return"line"}mapFromDriverValue(t){let[n,o,a]=t.slice(1,-1).split(",");return[Number.parseFloat(n),Number.parseFloat(o),Number.parseFloat(a)]}mapToDriverValue(t){return`{${t[0]},${t[1]},${t[2]}}`}},ax=class extends Z{static[_]="PgLineABCBuilder";constructor(t){super(t,"json","PgLineABC")}build(t){return new ox(t,this.config)}},ox=class extends z{static[_]="PgLineABC";getSQLType(){return"line"}mapFromDriverValue(t){let[n,o,a]=t.slice(1,-1).split(",");return{a:Number.parseFloat(n),b:Number.parseFloat(o),c:Number.parseFloat(a)}}mapToDriverValue(t){return`{${t.a},${t.b},${t.c}}`}};function XN(e,t){let{name:n,config:o}=ve(e,t);return!o?.mode||o.mode==="tuple"?new tx(n):new ax(n)}var rx=class extends Z{static[_]="PgMacaddrBuilder";constructor(t){super(t,"string","PgMacaddr")}build(t){return new ix(t,this.config)}},ix=class extends z{static[_]="PgMacaddr";getSQLType(){return"macaddr"}};function e$(e){return new rx(e??"")}var Ax=class extends Z{static[_]="PgMacaddr8Builder";constructor(t){super(t,"string","PgMacaddr8")}build(t){return new sx(t,this.config)}},sx=class extends z{static[_]="PgMacaddr8";getSQLType(){return"macaddr8"}};function t$(e){return new Ax(e??"")}var cx=class extends Z{static[_]="PgNumericBuilder";constructor(t,n,o){super(t,"string","PgNumeric"),this.config.precision=n,this.config.scale=o}build(t){return new ux(t,this.config)}},ux=class extends z{static[_]="PgNumeric";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(t){return typeof t=="string"?t:String(t)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},dx=class extends Z{static[_]="PgNumericNumberBuilder";constructor(t,n,o){super(t,"number","PgNumericNumber"),this.config.precision=n,this.config.scale=o}build(t){return new lx(t,this.config)}},lx=class extends z{static[_]="PgNumericNumber";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},px=class extends Z{static[_]="PgNumericBigIntBuilder";constructor(t,n,o){super(t,"bigint","PgNumericBigInt"),this.config.precision=n,this.config.scale=o}build(t){return new gx(t,this.config)}},gx=class extends z{static[_]="PgNumericBigInt";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}};function n$(e,t){let{name:n,config:o}=ve(e,t),a=o?.mode;return a==="number"?new dx(n,o?.precision,o?.scale):a==="bigint"?new px(n,o?.precision,o?.scale):new cx(n,o?.precision,o?.scale)}var mx=class extends Z{static[_]="PgPointTupleBuilder";constructor(t){super(t,"array","PgPointTuple")}build(t){return new fx(t,this.config)}},fx=class extends z{static[_]="PgPointTuple";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){let[n,o]=t.slice(1,-1).split(",");return[Number.parseFloat(n),Number.parseFloat(o)]}return[t.x,t.y]}mapToDriverValue(t){return`(${t[0]},${t[1]})`}},bx=class extends Z{static[_]="PgPointObjectBuilder";constructor(t){super(t,"json","PgPointObject")}build(t){return new hx(t,this.config)}},hx=class extends z{static[_]="PgPointObject";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){let[n,o]=t.slice(1,-1).split(",");return{x:Number.parseFloat(n),y:Number.parseFloat(o)}}return t}mapToDriverValue(t){return`(${t.x},${t.y})`}};function a$(e,t){let{name:n,config:o}=ve(e,t);return!o?.mode||o.mode==="tuple"?new mx(n):new bx(n)}function Eee(e){let t=[];for(let n=0;n<e.length;n+=2)t.push(Number.parseInt(e.slice(n,n+2),16));return new Uint8Array(t)}function o$(e,t){let n=new ArrayBuffer(8),o=new DataView(n);for(let a=0;a<8;a++)o.setUint8(a,e[t+a]);return o.getFloat64(0,!0)}function Bx(e){let t=Eee(e),n=0,o=t[n];n+=1;let a=new DataView(t.buffer),r=a.getUint32(n,o===1);n+=4;let i;if(r&536870912&&(i=a.getUint32(n,o===1),n+=4),(r&65535)===1){let A=o$(t,n);n+=8;let s=o$(t,n);return n+=8,[A,s]}throw new Error("Unsupported geometry type")}var yx=class extends Z{static[_]="PgGeometryBuilder";constructor(t){super(t,"array","PgGeometry")}build(t){return new Cx(t,this.config)}},Cx=class extends z{static[_]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){return Bx(t)}mapToDriverValue(t){return`point(${t[0]} ${t[1]})`}},wx=class extends Z{static[_]="PgGeometryObjectBuilder";constructor(t){super(t,"json","PgGeometryObject")}build(t){return new Ex(t,this.config)}},Ex=class extends z{static[_]="PgGeometryObject";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){let n=Bx(t);return{x:n[0],y:n[1]}}mapToDriverValue(t){return`point(${t.x} ${t.y})`}};function r$(e,t){let{name:n,config:o}=ve(e,t);return!o?.mode||o.mode==="tuple"?new yx(n):new wx(n)}var kx=class extends Z{static[_]="PgRealBuilder";constructor(t,n){super(t,"number","PgReal"),this.config.length=n}build(t){return new Qx(t,this.config)}},Qx=class extends z{static[_]="PgReal";constructor(t,n){super(t,n)}getSQLType(){return"real"}mapFromDriverValue=t=>typeof t=="string"?Number.parseFloat(t):t};function i$(e){return new kx(e??"")}var Ix=class extends Z{static[_]="PgSerialBuilder";constructor(t){super(t,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new _x(t,this.config)}},_x=class extends z{static[_]="PgSerial";getSQLType(){return"serial"}};function A$(e){return new Ix(e??"")}var vx=class extends fi{static[_]="PgSmallIntBuilder";constructor(t){super(t,"number","PgSmallInt")}build(t){return new xx(t,this.config)}},xx=class extends z{static[_]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=t=>typeof t=="string"?Number(t):t};function s$(e){return new vx(e??"")}var Dx=class extends Z{static[_]="PgSmallSerialBuilder";constructor(t){super(t,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new Fx(t,this.config)}},Fx=class extends z{static[_]="PgSmallSerial";getSQLType(){return"smallserial"}};function c$(e){return new Dx(e??"")}var Sx=class extends Z{static[_]="PgTextBuilder";constructor(t,n){super(t,"string","PgText"),this.config.enumValues=n.enum}build(t){return new Lx(t,this.config)}},Lx=class extends z{static[_]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}};function $o(e,t={}){let{name:n,config:o}=ve(e,t);return new Sx(n,o)}var Rx=class extends Cr{constructor(t,n,o){super(t,"string","PgTime"),this.withTimezone=n,this.precision=o,this.config.withTimezone=n,this.config.precision=o}static[_]="PgTimeBuilder";build(t){return new Nx(t,this.config)}},Nx=class extends z{static[_]="PgTime";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}};function u$(e,t={}){let{name:n,config:o}=ve(e,t);return new Rx(n,o.withTimezone??!1,o.precision)}var $x=class extends Cr{static[_]="PgTimestampBuilder";constructor(t,n,o){super(t,"date","PgTimestamp"),this.config.withTimezone=n,this.config.precision=o}build(t){return new Mx(t,this.config)}},Mx=class extends z{static[_]="PgTimestamp";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){return typeof t=="string"?new Date(this.withTimezone?t:t+"+0000"):t}mapToDriverValue=t=>t.toISOString()},jx=class extends Cr{static[_]="PgTimestampStringBuilder";constructor(t,n,o){super(t,"string","PgTimestampString"),this.config.withTimezone=n,this.config.precision=o}build(t){return new Px(t,this.config)}},Px=class extends z{static[_]="PgTimestampString";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){if(typeof t=="string")return t;let n=t.toISOString().slice(0,-1).replace("T"," ");if(this.withTimezone){let o=t.getTimezoneOffset(),a=o<=0?"+":"-";return`${n}${a}${Math.floor(Math.abs(o)/60).toString().padStart(2,"0")}`}return n}};function Fh(e,t={}){let{name:n,config:o}=ve(e,t);return o?.mode==="string"?new jx(n,o.withTimezone??!1,o.precision):new $x(n,o?.withTimezone??!1,o?.precision)}var Gx=class extends Z{static[_]="PgUUIDBuilder";constructor(t){super(t,"string","PgUUID")}defaultRandom(){return this.default(Yu`gen_random_uuid()`)}build(t){return new Hx(t,this.config)}},Hx=class extends z{static[_]="PgUUID";getSQLType(){return"uuid"}};function d$(e){return new Gx(e??"")}var Ux=class extends Z{static[_]="PgVarcharBuilder";constructor(t,n){super(t,"string","PgVarchar"),this.config.length=n.length,this.config.enumValues=n.enum}build(t){return new Tx(t,this.config)}},Tx=class extends z{static[_]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}};function l$(e,t={}){let{name:n,config:o}=ve(e,t);return new Ux(n,o)}var Ox=class extends Z{static[_]="PgBinaryVectorBuilder";constructor(t,n){super(t,"string","PgBinaryVector"),this.config.dimensions=n.dimensions}build(t){return new qx(t,this.config)}},qx=class extends z{static[_]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}};function p$(e,t){let{name:n,config:o}=ve(e,t);return new Ox(n,o)}var zx=class extends Z{static[_]="PgHalfVectorBuilder";constructor(t,n){super(t,"array","PgHalfVector"),this.config.dimensions=n.dimensions}build(t){return new Yx(t,this.config)}},Yx=class extends z{static[_]="PgHalfVector";dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}};function g$(e,t){let{name:n,config:o}=ve(e,t);return new zx(n,o)}var Kx=class extends Z{static[_]="PgSparseVectorBuilder";constructor(t,n){super(t,"string","PgSparseVector"),this.config.dimensions=n.dimensions}build(t){return new Jx(t,this.config)}},Jx=class extends z{static[_]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}};function m$(e,t){let{name:n,config:o}=ve(e,t);return new Kx(n,o)}var Wx=class extends Z{static[_]="PgVectorBuilder";constructor(t,n){super(t,"array","PgVector"),this.config.dimensions=n.dimensions}build(t){return new Zx(t,this.config)}},Zx=class extends z{static[_]="PgVector";dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}};function f$(e,t){let{name:n,config:o}=ve(e,t);return new Wx(n,o)}function b$(){return{bigint:HN,bigserial:UN,boolean:TN,char:ON,cidr:qN,customType:zN,date:YN,doublePrecision:KN,inet:JN,integer:WN,interval:ZN,json:VN,jsonb:Dh,line:XN,macaddr:e$,macaddr8:t$,numeric:n$,point:a$,geometry:r$,real:i$,serial:A$,smallint:s$,smallserial:c$,text:$o,time:u$,timestamp:Fh,uuid:d$,varchar:l$,bit:p$,halfvec:g$,sparsevec:m$,vector:f$}}var Vx=Symbol.for("drizzle:PgInlineForeignKeys"),h$=Symbol.for("drizzle:EnableRLS"),mp=class extends Zt{static[_]="PgTable";static Symbol=Object.assign({},Zt.Symbol,{InlineForeignKeys:Vx,EnableRLS:h$});[Vx]=[];[h$]=!1;[Zt.Symbol.ExtraConfigBuilder]=void 0;[Zt.Symbol.ExtraConfigColumns]={}};function kee(e,t,n,o,a=e){let r=new mp(e,o,a),i=typeof t=="function"?t(b$()):t,A=Object.fromEntries(Object.entries(i).map(([u,l])=>{let p=l;p.setName(u);let g=p.build(r);return r[Vx].push(...p.buildForeignKeys(g,r)),[u,g]})),s=Object.fromEntries(Object.entries(i).map(([u,l])=>{let p=l;p.setName(u);let g=p.buildExtraConfigColumn(r);return[u,g]})),c=Object.assign(r,A);return c[Zt.Symbol.Columns]=A,c[Zt.Symbol.ExtraConfigColumns]=s,n&&(c[mp.Symbol.ExtraConfigBuilder]=n),Object.assign(c,{enableRLS:()=>(c[mp.Symbol.EnableRLS]=!0,c)})}var B$=(e,t,n)=>kee(e,t,n,void 0);var Sh=class{constructor(t,n){this.unique=t,this.name=n}static[_]="PgIndexBuilderOn";on(...t){return new fp(t.map(n=>{if(dn(n,Vt))return n;n=n;let o=new Ou(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=JSON.parse(JSON.stringify(n.defaultConfig)),o}),this.unique,!1,this.name)}onOnly(...t){return new fp(t.map(n=>{if(dn(n,Vt))return n;n=n;let o=new Ou(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=n.defaultConfig,o}),this.unique,!0,this.name)}using(t,...n){return new fp(n.map(o=>{if(dn(o,Vt))return o;o=o;let a=new Ou(o.name,!!o.keyAsName,o.columnType,o.indexConfig);return o.indexConfig=JSON.parse(JSON.stringify(o.defaultConfig)),a}),this.unique,!0,this.name,t)}},fp=class{static[_]="PgIndexBuilder";config;constructor(t,n,o,a,r="btree"){this.config={name:a,columns:t,unique:n,only:o,method:r}}concurrently(){return this.config.concurrently=!0,this}with(t){return this.config.with=t,this}where(t){return this.config.where=t,this}build(t){return new Xx(this.config,t)}},Xx=class{static[_]="PgIndex";config;constructor(t,n){this.config={...t,table:n}}};function y$(e){return new Sh(!1,e)}function C$(e){return new Sh(!0,e)}var w$=e=>Fh(e,{withTimezone:!0}),E$=d.enum(["channel","dm","group","local_conversation","thread","web_session"]),fQe=B$("junior_destinations",{id:$o("id").primaryKey(),provider:$o("provider").notNull(),providerTenantId:$o("provider_tenant_id").notNull().default(""),providerDestinationId:$o("provider_destination_id").notNull(),kind:$o("kind").$type().notNull(),parentDestinationId:$o("parent_destination_id"),displayName:$o("display_name"),visibility:$o("visibility").$type().notNull().default("unknown"),metadata:Dh("metadata_json"),createdAt:w$("created_at").notNull(),updatedAt:w$("updated_at").notNull()},e=>[C$("junior_destinations_provider_destination_uidx").on(e.provider,e.providerTenantId,e.providerDestinationId),y$("junior_destinations_provider_kind_idx").on(e.provider,e.kind)]);function Qee(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var Iee=d.object({kind:d.literal("resource_link"),key:d.string().trim().min(1).max(256),label:d.string().trim().min(1).max(256),url:d.string().url().max(2048).refine(Qee,"URL must use HTTP or HTTPS."),description:d.string().trim().min(1).max(512).optional(),status:d.enum(["open","draft","closed","merged","warning"]).optional()}).strict(),k$=d.discriminatedUnion("kind",[Iee]),yQe=d.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),_ee=d.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),vee=d.object({content:d.string().min(1).max(32*1024).optional(),description:d.string().trim().min(1).max(2e3).optional(),metadata:d.array(d.string().trim().min(1).max(120)).max(8).optional(),title:d.string().trim().min(1).max(4e3)}).strict(),Q$=d.object({details:d.array(vee).max(100).optional(),icon:_ee.optional(),preview:d.string().trim().min(1).max(500).optional(),title:d.string().trim().min(1).max(120)}).strict();var I$=d.string().regex(/^T[A-Z0-9]+$/),xee=d.string().regex(/^(C|G|D)[A-Z0-9]+$/),_$=d.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),Lh=d.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),Ae=d.string().refine(e=>e.trim().length>0),CA=Ae.refine(e=>e===e.trim()),wQe=d.enum(["slack","local"]),Dee=d.enum(["public","private"]),Fee=d.enum(["public","private"]),v$=d.object({platform:d.literal("slack"),teamId:I$,channelId:xee}).strict(),x$=v$,See=d.object({platform:d.literal("local"),conversationId:_$}).strict(),Lee=d.discriminatedUnion("platform",[x$,See]),Ree=v$.extend({visibility:Dee,messageTs:Ae.optional(),threadTs:Ae.optional()}).strict(),Nee=d.object({platform:d.literal("local"),visibility:d.literal("private"),conversationId:_$}).strict(),D$=d.discriminatedUnion("platform",[Ree,Nee]),$ee=d.discriminatedUnion("allowedWhen",[d.object({type:d.literal("user"),userId:Lh,allowedWhen:d.literal("private-direct-conversation")}).strict(),d.object({type:d.literal("user"),userId:Lh,allowedWhen:d.literal("scheduled-task"),taskId:CA}).strict()]),F$={email:Ae.optional(),fullName:Ae.optional(),userId:Lh,userName:Ae.optional()},Mee=d.object({...F$,platform:d.literal("slack"),teamId:I$}).strict(),jee=d.object({...F$,platform:d.literal("local")}).strict(),Pee=d.object({platform:d.literal("system"),name:Lh}).strict(),eD=d.discriminatedUnion("platform",[Mee,jee,Pee]),Gee=d.object({displayName:Ae.optional(),handle:Ae.optional(),id:CA,provider:CA,providerSubjectId:CA,providerTenantId:CA.optional()}).strict(),EQe=d.object({displayName:Ae.optional(),email:Ae.max(320),id:CA,identities:d.array(Gee).max(100)}).strict(),Hee=d.record(d.string(),d.string()).superRefine((e,t)=>{let n=Object.entries(e);if(n.length>20){t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata has too many keys"});return}for(let[o,a]of n){if(!o.trim()){t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata values must be strings",path:[o]});continue}o.length>128&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata key exceeds the maximum length",path:[o]}),/[\r\n]/.test(o)&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata keys must be single-line strings",path:[o]}),/[\r\n]/.test(a)&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata values must be single-line strings",path:[o]}),a.length>512&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata value exceeds the maximum length",path:[o]})}}),Uee=d.object({label:CA.pipe(d.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:CA.pipe(d.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),kQe=d.object({idempotencyKey:Ae.pipe(d.string().max(512)),credentialSubject:$ee.optional(),destination:x$,destinationVisibility:Fee,input:Ae.pipe(d.string().max(32e3)),metadata:Hee.optional(),replyAttribution:Uee.optional(),source:D$}).strict();var Tee=d.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),IQe=d.object({text:d.string().trim().min(1).max(8e3)}).strict(),_Qe=d.object({kind:Tee,version:d.number().int().positive(),content:d.record(d.string(),d.unknown())}).strict();var Oee=4e3,qee=8e3,bp=d.string().regex(/^[a-z][a-z0-9_-]*(?:\.[a-z][a-z0-9_-]*)+$/).describe("Canonical dotted event type, such as issue.closed or pull_request.review.changes_requested."),S$=d.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),zee=d.object({type:S$,supportedEvents:d.array(bp).min(1),suggestedEvents:d.array(bp).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.supportedEvents.forEach((a,r)=>{n.has(a)&&t.addIssue({code:"custom",message:`Duplicate supported resource event type "${a}".`,path:["supportedEvents",r]}),n.add(a)});let o=new Set;e.suggestedEvents?.forEach((a,r)=>{o.has(a)&&t.addIssue({code:"custom",message:`Duplicate suggested resource event type "${a}".`,path:["suggestedEvents",r]}),n.has(a)||t.addIssue({code:"custom",message:`Suggested resource event type "${a}" is not supported.`,path:["suggestedEvents",r]}),o.add(a)})}),xQe=d.object({resourceTypes:d.array(zee).min(1),isEnabled:d.function({input:[],output:d.boolean()}).optional(),normalizeIdentifier:d.function({input:[d.string()],output:d.string()}).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.resourceTypes.forEach((o,a)=>{n.has(o.type)&&t.addIssue({code:"custom",message:`Duplicate resource type "${o.type}".`,path:["resourceTypes",a,"type"]}),n.add(o.type)})});var DQe=d.object({identifier:d.string().min(1),label:d.string().min(1),namespace:d.string().min(1),suggestedEvents:d.array(bp).optional(),supportedEvents:d.array(bp),type:S$}).strict(),Yee=d.object({eventKey:d.string().min(1),eventType:bp,identifier:d.string().min(1),occurredAtMs:d.number().finite(),terminal:d.boolean().optional(),trustedSummary:d.string().min(1).transform(e=>e.slice(0,Oee)),untrustedText:d.string().transform(e=>e.slice(0,qee)).optional()}).strict(),FQe=Yee.extend({namespace:d.string().min(1)}),Kee=d.object({authority:d.enum(["instruction","context"]),actor:eD.optional()}).strict(),Jee=d.discriminatedUnion("type",[d.object({type:d.literal("message"),role:d.enum(["user","assistant"]),text:d.string().min(1),provenance:Kee.optional(),isRunActor:d.boolean().optional()}).strict(),d.object({type:d.literal("toolResult"),toolName:d.string().min(1),isError:d.boolean(),text:d.string().min(1).optional()}).strict()]),LQe=d.object({completedAtMs:d.number().finite(),conversationId:d.string().min(1),destination:Lee,actors:d.array(eD),actor:eD.optional(),runId:d.string().min(1),source:D$,transcript:d.array(Jee)}).strict();var NQe=d.discriminatedUnion("type",[d.object({type:d.literal("text"),text:d.string()}).strict(),d.object({type:d.literal("image"),data:d.string(),mimeType:d.string()}).strict()]),Wee=d.object({arguments:d.record(d.string(),d.unknown()),reason:d.string().min(1).optional()}).strict(),$Qe=d.object({target:d.string().min(1).optional(),truncated:d.boolean().optional(),continuation:Wee.optional()}).passthrough(),MQe=d.enum(["auto","review","approve"]);var PQe=d.object({auth:d.object({user:d.object({email:d.string().nullable().optional(),emailVerified:d.boolean().optional(),name:d.string().nullable().optional()}).strict()}).strict(),pluginName:Ae}).strict(),Zee=d.string().regex(/^[a-z][a-z0-9-]*$/),Vee=d.string().regex(/^[a-z][a-z0-9.-]*$/),Xee=d.union([d.literal("read"),d.literal("write")]),L$=d.object({provider:Zee,scope:Ae.optional(),type:d.literal("oauth")}).strict(),R$=d.object({id:Ae,label:Ae.optional(),url:Ae.optional()}).strict(),HQe=d.object({account:R$.optional(),accessToken:Ae,expiresAt:d.number().finite().optional(),refreshToken:Ae,refreshTokenExpiresAt:d.number().finite().optional(),scope:Ae.optional()}).strict(),UQe=d.object({access:Xee,leaseScope:Ae.optional(),name:Vee,reason:Ae.optional(),requirements:d.array(Ae).min(1).optional()}).strict(),ete=d.object({domain:d.string().min(1),headers:d.record(d.string(),d.string()).refine(e=>Object.keys(e).length>0)}).strict(),tte=d.object({account:R$.optional(),authorization:L$.optional(),expiresAt:d.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:d.array(ete).min(1)}).strict(),TQe=d.discriminatedUnion("type",[d.object({lease:tte,type:d.literal("lease")}).strict(),d.object({authorization:L$.optional(),message:Ae,type:d.literal("needed")}).strict(),d.object({message:Ae,type:d.literal("unavailable")}).strict()]);var nte=Ae.max(64).regex(/^[a-z][a-z0-9-]*$/),ate=Ae.max(80),ote=Ae.max(500),rte=d.enum(["primary","profile"]),ite=d.object({detail:Ae.max(500).optional(),label:Ae.max(80),tone:d.enum(["good","neutral","warning"]).optional(),value:Ae.max(120)}).strict(),Ate=d.object({label:Ae.max(80),value:Ae.max(500)}).strict(),ste=d.object({confirmation:Ae.max(500).optional(),href:Ae.max(500).regex(/^\/api\/plugins\/[a-z][a-z0-9-]*(?:\/|$)/),label:Ae.max(80),method:d.literal("DELETE"),tone:d.enum(["danger","neutral"]).optional()}).strict(),cte=d.object({actions:d.array(ste).max(4).optional(),description:Ae.max(1e3).optional(),id:Ae.max(128),metadata:d.array(Ate).max(8).optional(),title:Ae.max(4e3)}).strict(),qQe=d.object({emptyText:Ae.max(500).optional(),metrics:d.array(ite).max(6).optional(),nextCursor:Ae.max(1e3).optional(),records:d.array(cte).max(100),searchPlaceholder:Ae.max(120).optional(),type:d.literal("list")}).strict(),ute=d.object({description:ote,id:nte,label:ate,navigation:rte,pluginDisplayName:Ae.max(200),pluginName:Ae.max(100)}).strict(),zQe=d.array(ute),YQe=d.object({cursor:Ae.max(1e3).optional(),filter:Ae.max(64).optional(),limit:d.number().int().min(1).max(50),query:d.string().trim().max(200).optional()}).strict();var $$=d.object({active:d.number(),conversations:d.number(),date:d.string(),durationMs:d.number(),failed:d.number(),tokens:d.number().optional()}).strict();var dte=d.enum(["active","completed","failed"]),lte=d.enum(["api","internal","scheduler","slack"]),M$=EN,pte=d.object({conversationId:d.string().min(1)}).strict(),gte=d.object({limit:d.coerce.number().int().min(1).max(1e3).default(500)}).strict(),mte=d.object({before:d.string().min(1),limit:d.coerce.number().int().min(1).max(1e3).default(500)}).strict(),fte=d.object({actorEmail:d.string().trim().email().transform(e=>e.toLowerCase()).optional()}).strict(),bte=d.object({archived:d.boolean(),lastSeenAt:d.string().datetime()}).strict(),tD=d.object({archived:d.boolean()}).strict(),Rh=d.object({email:d.string().optional(),fullName:d.string().optional(),slackUserId:d.string().optional(),slackUserName:d.string().optional()}).strict(),j$=d.object({costUsd:d.number().finite().nonnegative(),operations:d.array(d.object({costUsd:d.number().finite().nonnegative(),events:d.number().int().positive(),name:d.string().min(1),namespace:d.string().min(1)}).strict()).min(1)}).strict(),hp=d.object({displayTitle:d.string(),cumulativeDurationMs:d.number(),cumulativeUsage:M$.optional(),auxiliaryCosts:j$.optional(),conversationId:d.string(),isParticipant:d.boolean(),status:dte,startedAt:d.string(),lastSeenAt:d.string(),lastProgressAt:d.string(),surface:lte,actorIdentity:Rh.optional(),archivedAt:d.string().optional(),channel:d.string().optional(),channelName:d.string().optional(),channelNameRedacted:d.boolean().optional(),locationId:d.string().optional(),sentryTraceUrl:d.string().optional(),sourceUrl:d.string().url().optional(),traceId:d.string().optional()}).strict(),hte=d.object({type:d.literal("message"),messageId:d.string().min(1),role:d.enum(["assistant","system","user"]),actorIdentity:Rh.optional(),eventType:d.string().min(1).optional(),text:d.string().optional(),redacted:d.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"message content must be text or explicitly redacted"}),e.redacted&&e.actorIdentity&&t.addIssue({code:"custom",message:"redacted messages must not expose actor identity"})}),Bte=d.object({type:d.literal("message_handled"),messageId:d.string().min(1)}).strict(),yte=d.object({toolCallId:d.string().min(1),name:d.string().min(1),status:d.enum(["running","completed","error"]),startedAt:d.string().datetime().optional(),startedSeq:d.number().int().nonnegative().optional(),input:d.unknown().optional(),output:d.unknown().optional()}).strict().superRefine((e,t)=>{e.startedAt===void 0!=(e.startedSeq===void 0)&&t.addIssue({code:"custom",message:"tool start sequence and timestamp must be provided together"})}),P$=d.object({type:d.literal("reasoning"),text:d.string().min(1).optional(),redacted:d.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"reasoning content must be text or explicitly redacted"})}),Cte=d.object({type:d.literal("tool_call"),toolCallId:d.string().min(1)}).strict(),wte=d.object({parts:d.array(d.discriminatedUnion("type",[P$,Cte])).min(1)}).strict(),Ete=d.object({type:d.literal("tool_calls"),calls:d.array(yte).min(1),assistant:wte.optional()}).strict().superRefine((e,t)=>{if(!e.assistant)return;let n=new Map;for(let a of e.calls)n.set(a.toolCallId,(n.get(a.toolCallId)??0)+1);let o=new Map;for(let a of e.assistant.parts)a.type==="tool_call"&&o.set(a.toolCallId,(o.get(a.toolCallId)??0)+1);(n.size!==o.size||[...n].some(([a,r])=>o.get(a)!==r))&&t.addIssue({code:"custom",path:["assistant","parts"],message:"assistant tool parts must reference every call exactly once"})}),kte=d.object({type:d.literal("assistant_message"),parts:d.array(P$).min(1)}).strict(),Qte=d.discriminatedUnion("state",[d.object({type:d.literal("turn_lifecycle"),turnId:d.string().min(1),state:d.enum(["started","succeeded","no_reply"])}).strict(),d.object({type:d.literal("turn_lifecycle"),turnId:d.string().min(1),state:d.literal("failed"),failureKind:d.enum(["agent","delivery"])}).strict()]),Ite=d.object({type:d.literal("turn_routed"),turnId:d.string().min(1),modelProfile:d.string().min(1),modelId:d.string().min(1),reasoningLevel:d.string().min(1),confidence:d.number().min(0).max(1).optional(),source:d.enum(["configured","inherited","router"])}).strict(),_te=d.object({type:d.literal("guardian_action_reviewed"),turnId:d.string().min(1),toolCallId:d.string().min(1),toolName:d.string().min(1),decision:d.enum(["allow","ask","deny"]),riskLevel:d.enum(["low","medium","high","critical"]),userAuthorization:d.enum(["high","medium","low","unknown"])}).strict(),vte=d.object({type:d.literal("turn_context"),turnId:d.string().min(1),pluginName:d.string().min(1),kind:d.string().min(1),version:d.number().int().positive(),content:d.record(d.string(),d.unknown())}).strict(),xte=d.object({type:d.literal("structured_event"),namespace:d.string().min(1),name:d.string().min(1),version:d.number().int().positive(),turnId:d.string().min(1).optional(),presentation:Q$}).strict(),Dte=d.object({type:d.literal("compaction"),modelProfile:d.string().min(1).optional(),modelId:d.string().min(1).optional(),summary:d.string().min(1).optional(),details:d.object({reason:d.literal("capacity"),estimatedInputTokens:d.number().int().nonnegative(),replacementInputTokens:d.number().int().nonnegative().optional(),triggerTokens:d.number().int().nonnegative(),inputLimitTokens:d.number().int().positive(),inputMessageCount:d.number().int().nonnegative(),retainedMessageCount:d.number().int().nonnegative(),summaryChars:d.number().int().nonnegative()}).strict().optional()}).strict(),Fte=d.object({type:d.literal("handoff"),modelProfile:d.string().min(1),modelId:d.string().min(1),reasoningLevel:d.string().min(1).optional(),triggeringToolCallId:d.string().min(1).optional(),summary:d.string().min(1).optional()}).strict(),Ste=d.object({type:d.literal("subagent"),startedSeq:d.number().int().nonnegative(),startedAt:d.string().datetime(),childConversationId:d.string().min(1),subagentKind:d.string().min(1),parentToolCallId:d.string().min(1).optional(),status:d.enum(["running","completed","error","aborted"])}).strict(),G$=d.discriminatedUnion("type",[hte,Bte,kte,Ete,Qte,vte,xte,Ite,_te,Dte,Fte,Ste]),nD=d.object({seq:d.number().int().nonnegative(),createdAt:d.string().datetime(),data:G$}).strict(),aD=d.discriminatedUnion("status",[d.object({status:d.literal("available")}).strict(),d.object({status:d.literal("redacted"),reason:d.literal("non_public_conversation")}).strict(),d.object({status:d.literal("expired"),expiredAt:d.string().datetime()}).strict()]),Lte=d.object({modelId:d.string(),usage:M$}).strict();function H$(e,t){e.eventHistory.status==="expired"&&e.events.length>0&&t.addIssue({code:"custom",path:["events"],message:"expired event history must not contain events"});for(let n=1;n<e.events.length;n+=1)e.events[n].seq<=e.events[n-1].seq&&t.addIssue({code:"custom",path:["events",n,"seq"],message:"report event sequences must be strictly increasing"});for(let[n,o]of e.events.entries())o.data.type==="message"&&(e.eventHistory.status==="redacted"&&o.data.redacted!==!0&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact messages"}),e.eventHistory.status==="available"&&o.data.redacted===!0&&t.addIssue({code:"custom",path:["events",n,"data"],message:"available event history must expose messages"})),e.eventHistory.status==="redacted"&&o.data.type==="tool_calls"&&o.data.calls.some(a=>a.input!==void 0||a.output!==void 0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact tool payloads"}),e.eventHistory.status==="redacted"&&o.data.type==="assistant_message"&&o.data.parts.some(a=>a.text!==void 0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact assistant messages"}),e.eventHistory.status==="available"&&o.data.type==="assistant_message"&&o.data.parts.some(a=>a.redacted===!0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"available event history must expose reasoning"}),o.data.type==="tool_calls"&&(e.eventHistory.status==="redacted"&&o.data.assistant?.parts.some(a=>a.type==="reasoning"&&a.text!==void 0)||e.eventHistory.status==="available"&&o.data.assistant?.parts.some(a=>a.type==="reasoning"&&a.redacted===!0))&&t.addIssue({code:"custom",path:["events",n,"data","assistant"],message:"assistant reasoning must match event history visibility"})}var oD=hp.extend({annotations:d.array(k$.and(d.object({plugin:d.string().min(1),createdAt:d.string().datetime(),updatedAt:d.string().datetime()}))).optional(),modelUsage:d.array(Lte).optional(),events:d.array(nD),eventHistory:aD,previousCursor:d.string().min(1).optional(),generatedAt:d.string(),sentryConversationUrl:d.string().optional()}).strict().superRefine(H$),rD=d.object({events:d.array(nD),eventHistory:aD,previousCursor:d.string().min(1).optional(),generatedAt:d.string()}).strict().superRefine(H$),iD=d.object({conversations:d.array(hp),source:d.literal("conversation_index"),generatedAt:d.string()}).strict(),Ku=d.object({active:d.number(),conversations:d.number(),durationMs:d.number(),failed:d.number(),label:d.string(),costUsd:d.number().optional(),tokens:d.number().optional()}).strict(),Rte=d.object({conversations:d.number(),costUsd:d.number().optional(),date:d.string(),durationMs:d.number(),tokens:d.number().optional()}).strict(),Nte=d.object({allow:d.number(),ask:d.number(),costUsd:d.number().optional(),date:d.string(),deny:d.number(),requests:d.number()}).strict(),$te=d.object({allow:d.number(),ask:d.number(),costUsd:d.number().optional(),deny:d.number(),metricDays:d.array(Nte),requests:d.number()}).strict(),AD=d.object({active:d.number(),conversations:d.number(),durationMs:d.number(),failed:d.number(),generatedAt:d.string(),guardian:$te,metricDays:d.array(Rte),locations:d.array(Ku),actors:d.array(Ku),source:d.literal("conversation_index"),costUsd:d.number().optional(),tokens:d.number().optional(),windowEnd:d.string(),windowStart:d.string()}).strict(),Mte=d.object({email:d.string().trim().min(1)}).strict(),N$=Ku.omit({costUsd:!0}),jte=d.object({active:d.number(),conversations:d.number(),costUsd:d.number().optional(),date:d.string(),durationMs:d.number(),failed:d.number(),tokens:d.number().optional()}).strict(),Pte=d.object({activePeople:d.number(),conversations:d.number(),date:d.string()}).strict(),U$=d.object({active:d.number(),activeDays:d.number(),conversations:d.number(),durationMs:d.number(),failed:d.number(),tokens:d.number().optional()}).strict(),T$=Rh.extend({email:d.string().min(1)}).strict(),Gte=U$.extend({firstSeenAt:d.string(),lastSeenAt:d.string(),actor:T$}).strict(),sD=d.object({activityDays:d.array(Pte),generatedAt:d.string(),people:d.array(Gte),source:d.literal("conversation_index"),windowEnd:d.string(),windowStart:d.string()}).strict(),cD=d.object({activityDays:d.array(jte),generatedAt:d.string(),locations:d.array(N$),recentConversations:d.array(hp),actor:T$,source:d.literal("conversation_index"),surfaces:d.array(N$),totals:U$,windowEnd:d.string(),windowStart:d.string()}).strict(),uD=d.object({generatedAt:d.string(),sevenDaysUsd:d.number().finite().nonnegative(),source:d.literal("conversation_index"),thirtyDaysUsd:d.number().finite().nonnegative(),windowEnd:d.string(),windowStart:d.string()}).strict(),Hte=d.object({locationId:d.string().min(1)}).strict(),O$=Ku.extend({id:d.string(),firstSeenAt:d.string(),kind:E$,lastSeenAt:d.string(),provider:d.string(),providerDestinationId:d.string(),visibility:d.literal("public")}).strict(),Ute=Ku.extend({actor:Rh}).strict(),q$=d.object({date:d.string(),privateConversations:d.number(),publicConversations:d.number()}).strict(),dD=d.object({activityDays:d.array(q$),generatedAt:d.string(),locations:d.array(O$),privateActivity:Ku,source:d.literal("conversation_index"),windowEnd:d.string(),windowStart:d.string()}).strict(),lD=O$.extend({activityDays:d.array($$),actors:d.array(Ute),generatedAt:d.string(),recentConversations:d.array(hp),source:d.literal("conversation_index"),windowEnd:d.string(),windowStart:d.string()}).strict(),Tte=d.object({error:d.string().min(1)}).strict(),pD=d.object({id:d.string().uuid(),name:d.string(),tokenSuffix:d.string(),createdAt:d.string().datetime(),expiresAt:d.string().datetime(),lastUsedAt:d.string().datetime().nullable()}).strict(),gD=d.object({tokens:d.array(pD)}).strict(),Ote=d.object({name:d.string().trim().min(1).max(80)}).strict(),mD=pD.extend({token:d.string().startsWith("jr_pat_")}).strict(),qte=d.object({id:d.string().uuid()}).strict(),zte=d.object({revoked:d.literal(!0)}).strict(),Yte=d.object({channelId:d.string().min(1),label:d.string().min(1),teamId:d.string().min(1),visibility:d.enum(["private","public"])}).strict(),z$=d.object({createdAt:d.string().datetime(),createdBy:d.string().min(1),createdByEmail:d.string().trim().email().optional(),destination:Yte,id:d.string().min(1),instruction:d.string().min(1),lastConversationId:d.string().min(1).optional(),lastRunAt:d.string().datetime().optional(),ownedByViewer:d.boolean(),runsLast7Days:d.number().int().nonnegative(),totalRuns:d.number().int().nonnegative()}),Y$=z$.extend({kind:d.literal("scheduled"),nextRunAt:d.string().datetime().optional(),schedule:d.string().min(1),status:d.enum(["active","blocked","completed"])}).strict(),K$=z$.extend({events:d.array(d.string().min(1)).min(1),kind:d.literal("event"),resource:d.string().min(1),source:d.string().min(1),triggerAvailable:d.boolean()}).strict(),fD=d.discriminatedUnion("kind",[Y$,K$]),Kte=d.object({date:d.string().min(1),event:d.number().int().nonnegative(),scheduled:d.number().int().nonnegative()}).strict(),bD=d.object({executionDays:d.array(Kte),tasks:d.array(fD),truncated:d.boolean()}).strict(),Jte=d.object({id:d.string().min(1),kind:d.enum(["scheduled","event"])}).strict(),J$=d.enum(["blocked","completed","failed"]),W$=d.object({conversationId:d.string().min(1).optional(),executedAt:d.string().datetime(),executionId:d.string().min(1),status:J$,title:d.string().min(1).optional()}).strict(),Z$=d.object({blocked:d.number().int().nonnegative(),completed:d.number().int().nonnegative(),date:d.string().min(1),failed:d.number().int().nonnegative()}).strict(),hD=d.object({executionDays:d.array(Z$),executions:d.array(W$),task:fD,truncated:d.boolean()}).strict(),V$=d.object({count:d.number().int().nonnegative(),date:d.string(),metric:d.string().min(1),name:d.string().min(1),namespace:d.string().min(1)}).strict(),Wte=d.object({generatedAt:d.string().datetime(),stats:d.array(V$),windowEnd:d.string(),windowStart:d.string()}).strict();var Zte=d.object({status:d.literal("ok"),service:d.string(),timestamp:d.string()}).strict(),X$=d.object({configKeys:d.array(d.string()),description:d.string(),displayName:d.string(),name:d.string()}).strict(),BD=d.array(X$),yD=d.object({name:d.string(),pluginProvider:d.string().optional()}).strict(),CD=d.array(yD),eM=d.object({dir:d.string(),hasMigrationsDir:d.boolean(),hasSkillsDir:d.boolean(),packageName:d.string()}).strict(),tM=d.object({packageNames:d.array(d.string()),packages:d.array(eM),manifestRoots:d.array(d.string()),skillRoots:d.array(d.string()),tracingIncludes:d.array(d.string())}).strict(),Vte=d.object({cwd:d.string(),homeDir:d.string(),descriptionText:d.string().optional(),providers:d.array(d.string()),skills:d.array(yD),packagedContent:tM}).strict(),wD=d.enum(["danger","good","neutral","warning"]),Xte=d.object({label:d.string(),tone:wD.optional(),value:d.string()}).strict(),ene=d.object({key:d.string(),label:d.string()}).strict(),tne=d.object({id:d.string(),tone:wD.optional(),values:d.record(d.string(),d.string())}).strict(),nne=d.object({fields:d.array(ene).optional(),emptyText:d.string().optional(),records:d.array(tne).optional(),title:d.string()}).strict(),ane=d.object({categories:d.array(d.object({id:d.string().min(1),label:d.string().min(1),values:d.record(d.string(),d.number().finite())}).strict()).max(100),description:d.string().optional(),emptyText:d.string().optional(),id:d.string().min(1),series:d.array(d.object({format:d.literal("usd").optional(),key:d.string().min(1),label:d.string().min(1),tone:wD.optional()}).strict()).min(1).max(8),timeRangeDays:d.array(d.union([d.literal(7),d.literal(30),d.literal(90)])).min(1).max(3).optional(),title:d.string().min(1),type:d.literal("bar_chart")}).strict(),nM=d.object({generatedAt:d.string().optional(),metrics:d.array(Xte).optional(),recordSets:d.array(nne).optional(),title:d.string().optional(),pluginName:d.string(),widgets:d.array(ane).max(12).optional()}).strict(),ED=d.object({generatedAt:d.string(),reports:d.array(nM),source:d.literal("plugins")}).strict();function one(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var rne=d.object({kind:d.literal("resource_link"),key:d.string().trim().min(1).max(256),label:d.string().trim().min(1).max(256),url:d.string().url().max(2048).refine(one,"URL must use HTTP or HTTPS."),description:d.string().trim().min(1).max(512).optional(),status:d.enum(["open","draft","closed","merged","warning"]).optional()}).strict(),bIe=d.discriminatedUnion("kind",[rne]),BIe=d.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),ine=d.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),Ane=d.object({content:d.string().min(1).max(32*1024).optional(),description:d.string().trim().min(1).max(2e3).optional(),metadata:d.array(d.string().trim().min(1).max(120)).max(8).optional(),title:d.string().trim().min(1).max(4e3)}).strict(),yIe=d.object({details:d.array(Ane).max(100).optional(),icon:ine.optional(),preview:d.string().trim().min(1).max(500).optional(),title:d.string().trim().min(1).max(120)}).strict();var aM=d.string().regex(/^T[A-Z0-9]+$/),sne=d.string().regex(/^(C|G|D)[A-Z0-9]+$/),oM=d.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),Nh=d.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),se=d.string().refine(e=>e.trim().length>0),wA=se.refine(e=>e===e.trim()),wIe=d.enum(["slack","local"]),cne=d.enum(["public","private"]),une=d.enum(["public","private"]),rM=d.object({platform:d.literal("slack"),teamId:aM,channelId:sne}).strict(),iM=rM,dne=d.object({platform:d.literal("local"),conversationId:oM}).strict(),lne=d.discriminatedUnion("platform",[iM,dne]),pne=rM.extend({visibility:cne,messageTs:se.optional(),threadTs:se.optional()}).strict(),gne=d.object({platform:d.literal("local"),visibility:d.literal("private"),conversationId:oM}).strict(),AM=d.discriminatedUnion("platform",[pne,gne]),mne=d.discriminatedUnion("allowedWhen",[d.object({type:d.literal("user"),userId:Nh,allowedWhen:d.literal("private-direct-conversation")}).strict(),d.object({type:d.literal("user"),userId:Nh,allowedWhen:d.literal("scheduled-task"),taskId:wA}).strict()]),sM={email:se.optional(),fullName:se.optional(),userId:Nh,userName:se.optional()},fne=d.object({...sM,platform:d.literal("slack"),teamId:aM}).strict(),bne=d.object({...sM,platform:d.literal("local")}).strict(),hne=d.object({platform:d.literal("system"),name:Nh}).strict(),kD=d.discriminatedUnion("platform",[fne,bne,hne]),Bne=d.object({displayName:se.optional(),handle:se.optional(),id:wA,provider:wA,providerSubjectId:wA,providerTenantId:wA.optional()}).strict(),EIe=d.object({displayName:se.optional(),email:se.max(320),id:wA,identities:d.array(Bne).max(100)}).strict(),yne=d.record(d.string(),d.string()).superRefine((e,t)=>{let n=Object.entries(e);if(n.length>20){t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata has too many keys"});return}for(let[o,a]of n){if(!o.trim()){t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata values must be strings",path:[o]});continue}o.length>128&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata key exceeds the maximum length",path:[o]}),/[\r\n]/.test(o)&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata keys must be single-line strings",path:[o]}),/[\r\n]/.test(a)&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata values must be single-line strings",path:[o]}),a.length>512&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata value exceeds the maximum length",path:[o]})}}),Cne=d.object({label:wA.pipe(d.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:wA.pipe(d.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),kIe=d.object({idempotencyKey:se.pipe(d.string().max(512)),credentialSubject:mne.optional(),destination:iM,destinationVisibility:une,input:se.pipe(d.string().max(32e3)),metadata:yne.optional(),replyAttribution:Cne.optional(),source:AM}).strict();var wne=d.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),IIe=d.object({text:d.string().trim().min(1).max(8e3)}).strict(),_Ie=d.object({kind:wne,version:d.number().int().positive(),content:d.record(d.string(),d.unknown())}).strict();var Ene=4e3,kne=8e3,Bp=d.string().regex(/^[a-z][a-z0-9_-]*(?:\.[a-z][a-z0-9_-]*)+$/).describe("Canonical dotted event type, such as issue.closed or pull_request.review.changes_requested."),cM=d.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),Qne=d.object({type:cM,supportedEvents:d.array(Bp).min(1),suggestedEvents:d.array(Bp).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.supportedEvents.forEach((a,r)=>{n.has(a)&&t.addIssue({code:"custom",message:`Duplicate supported resource event type "${a}".`,path:["supportedEvents",r]}),n.add(a)});let o=new Set;e.suggestedEvents?.forEach((a,r)=>{o.has(a)&&t.addIssue({code:"custom",message:`Duplicate suggested resource event type "${a}".`,path:["suggestedEvents",r]}),n.has(a)||t.addIssue({code:"custom",message:`Suggested resource event type "${a}" is not supported.`,path:["suggestedEvents",r]}),o.add(a)})}),xIe=d.object({resourceTypes:d.array(Qne).min(1),isEnabled:d.function({input:[],output:d.boolean()}).optional(),normalizeIdentifier:d.function({input:[d.string()],output:d.string()}).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.resourceTypes.forEach((o,a)=>{n.has(o.type)&&t.addIssue({code:"custom",message:`Duplicate resource type "${o.type}".`,path:["resourceTypes",a,"type"]}),n.add(o.type)})});var DIe=d.object({identifier:d.string().min(1),label:d.string().min(1),namespace:d.string().min(1),suggestedEvents:d.array(Bp).optional(),supportedEvents:d.array(Bp),type:cM}).strict(),Ine=d.object({eventKey:d.string().min(1),eventType:Bp,identifier:d.string().min(1),occurredAtMs:d.number().finite(),terminal:d.boolean().optional(),trustedSummary:d.string().min(1).transform(e=>e.slice(0,Ene)),untrustedText:d.string().transform(e=>e.slice(0,kne)).optional()}).strict(),FIe=Ine.extend({namespace:d.string().min(1)}),_ne=d.object({authority:d.enum(["instruction","context"]),actor:kD.optional()}).strict(),vne=d.discriminatedUnion("type",[d.object({type:d.literal("message"),role:d.enum(["user","assistant"]),text:d.string().min(1),provenance:_ne.optional(),isRunActor:d.boolean().optional()}).strict(),d.object({type:d.literal("toolResult"),toolName:d.string().min(1),isError:d.boolean(),text:d.string().min(1).optional()}).strict()]),LIe=d.object({completedAtMs:d.number().finite(),conversationId:d.string().min(1),destination:lne,actors:d.array(kD),actor:kD.optional(),runId:d.string().min(1),source:AM,transcript:d.array(vne)}).strict();var NIe=d.discriminatedUnion("type",[d.object({type:d.literal("text"),text:d.string()}).strict(),d.object({type:d.literal("image"),data:d.string(),mimeType:d.string()}).strict()]),xne=d.object({arguments:d.record(d.string(),d.unknown()),reason:d.string().min(1).optional()}).strict(),$Ie=d.object({target:d.string().min(1).optional(),truncated:d.boolean().optional(),continuation:xne.optional()}).passthrough(),MIe=d.enum(["auto","review","approve"]);var PIe=d.object({auth:d.object({user:d.object({email:d.string().nullable().optional(),emailVerified:d.boolean().optional(),name:d.string().nullable().optional()}).strict()}).strict(),pluginName:se}).strict(),Dne=d.string().regex(/^[a-z][a-z0-9-]*$/),Fne=d.string().regex(/^[a-z][a-z0-9.-]*$/),Sne=d.union([d.literal("read"),d.literal("write")]),uM=d.object({provider:Dne,scope:se.optional(),type:d.literal("oauth")}).strict(),dM=d.object({id:se,label:se.optional(),url:se.optional()}).strict(),HIe=d.object({account:dM.optional(),accessToken:se,expiresAt:d.number().finite().optional(),refreshToken:se,refreshTokenExpiresAt:d.number().finite().optional(),scope:se.optional()}).strict(),UIe=d.object({access:Sne,leaseScope:se.optional(),name:Fne,reason:se.optional(),requirements:d.array(se).min(1).optional()}).strict(),Lne=d.object({domain:d.string().min(1),headers:d.record(d.string(),d.string()).refine(e=>Object.keys(e).length>0)}).strict(),Rne=d.object({account:dM.optional(),authorization:uM.optional(),expiresAt:d.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:d.array(Lne).min(1)}).strict(),TIe=d.discriminatedUnion("type",[d.object({lease:Rne,type:d.literal("lease")}).strict(),d.object({authorization:uM.optional(),message:se,type:d.literal("needed")}).strict(),d.object({message:se,type:d.literal("unavailable")}).strict()]);var Nne=se.max(64).regex(/^[a-z][a-z0-9-]*$/),$ne=se.max(80),Mne=se.max(500),jne=d.enum(["primary","profile"]),Pne=d.object({detail:se.max(500).optional(),label:se.max(80),tone:d.enum(["good","neutral","warning"]).optional(),value:se.max(120)}).strict(),Gne=d.object({label:se.max(80),value:se.max(500)}).strict(),Hne=d.object({confirmation:se.max(500).optional(),href:se.max(500).regex(/^\/api\/plugins\/[a-z][a-z0-9-]*(?:\/|$)/),label:se.max(80),method:d.literal("DELETE"),tone:d.enum(["danger","neutral"]).optional()}).strict(),Une=d.object({actions:d.array(Hne).max(4).optional(),description:se.max(1e3).optional(),id:se.max(128),metadata:d.array(Gne).max(8).optional(),title:se.max(4e3)}).strict(),lM=d.object({emptyText:se.max(500).optional(),metrics:d.array(Pne).max(6).optional(),nextCursor:se.max(1e3).optional(),records:d.array(Une).max(100),searchPlaceholder:se.max(120).optional(),type:d.literal("list")}).strict(),Tne=d.object({description:Mne,id:Nne,label:$ne,navigation:jne,pluginDisplayName:se.max(200),pluginName:se.max(100)}).strict(),pM=d.array(Tne),qIe=d.object({cursor:se.max(1e3).optional(),filter:se.max(64).optional(),limit:d.number().int().min(1).max(50),query:d.string().trim().max(200).optional()}).strict();var gM=d.object({user:d.object({email:d.string().trim().email(),emailVerified:d.boolean().optional(),name:d.string().nullable().optional()}).strict()}).strict(),mM=d.object({allowedEmailCount:d.number(),allowedGoogleDomainCount:d.number(),authRequired:d.boolean(),authPath:d.string(),basePath:d.string(),componentGallery:d.boolean(),sentryConversationLinks:d.boolean(),timeZone:d.string()}).strict();var Mo=class extends Error{status;constructor(t,n){super(`${t} returned ${n}`),this.status=n}};function $h(){if(typeof window>"u")return;let e=window.__JUNIOR_DASHBOARD_BASE_PATH__??"/",t=e==="/"?"/auth/login":`${e}/auth/login`;if(window.location.pathname!==t){let n=`${window.location.pathname}${window.location.search||""}`,o=new URLSearchParams;n!=="/"&&o.set("next",n);let a=o.toString();window.location.assign(a?`${t}?${a}`:t)}}async function fM(e,t,n){let o=await fetch(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PATCH"});if(o.status===401&&$h(),!o.ok)throw new Mo(t,o.status);return e.parse(await o.json())}async function bM(e,t,n){let o=await fetch(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"POST"});if(o.status===401&&$h(),!o.ok)throw new Mo(t,o.status);return e.parse(await o.json())}async function Ju(e){let t=await fetch(e,{credentials:"same-origin",method:"DELETE"});if(t.status===401&&$h(),!t.ok)throw new Mo(e,t.status)}async function rt(e,t,n){let o=await fetch(t,{credentials:"same-origin",...n?{signal:n}:{}});if(o.status===401)throw $h(),new Mo(t,o.status);if(!o.ok)throw new Mo(t,o.status);return e.parse(await o.json())}var Mh=5*6e4,QD=5*6e4,One=1e3;function qne(e,t=Date.now()){if(!e)return QD;let n=Date.parse(e);if(!Number.isFinite(n))return QD;let o=Math.max(0,t-n);return Math.max(One,QD-o)}function hM(){return ct({queryKey:["dashboard","core"],queryFn:async({signal:e})=>{let[t,n]=await Promise.all([rt(gM,"/api/me",e),rt(mM,"/api/config",e)]);return{config:n,me:t}},retry:!1,staleTime:Mh})}function zne(){return ct({queryKey:["dashboard","plugins"],queryFn:({signal:e})=>rt(BD,"/api/plugins",e),retry:!1,staleTime:Mh})}function BM(){return ct({queryKey:["dashboard","plugin-user-pages"],queryFn:({signal:e})=>rt(pM,"/api/user-pages",e),retry:!1,staleTime:Mh})}function yM(e){return ct({queryKey:["dashboard","conversations",e??"all"],queryFn:({signal:t})=>{let n=new URLSearchParams;e&&n.set("actorEmail",e);let o=n.toString();return rt(iD,`/api/conversations${o?`?${o}`:""}`,t)},retry:!1})}function CM(e){return ct({enabled:e,queryKey:["dashboard","tasks"],queryFn:({signal:t})=>rt(bD,"/api/tasks",t),retry:!1})}function wM(e,t,n){return ct({enabled:e&&!!(t&&n),queryKey:["dashboard","tasks",t,n,"executions"],queryFn:({signal:o})=>rt(hD,`/api/tasks/${t}/${encodeURIComponent(n)}/executions`,o),retry:!1})}function EM(){return ct({queryKey:["dashboard","people"],queryFn:({signal:e})=>rt(sD,"/api/people",e),retry:!1})}function kM(e){return ct({enabled:!!e,queryKey:["dashboard","people",e],queryFn:async({signal:t})=>rt(cD,`/api/people/${encodeURIComponent(e)}`,t),retry:!1})}function QM(e){return ct({enabled:e,queryKey:["dashboard","personal-spend"],queryFn:({signal:t})=>rt(uD,"/api/people/me/spend",t),refetchInterval:t=>qne(t.state.data?.generatedAt),retry:!1,staleTime:0})}function IM(){return ct({queryKey:["dashboard","locations"],queryFn:({signal:e})=>rt(dD,"/api/locations",e),retry:!1})}function _M(e){return ct({enabled:!!e,queryKey:["dashboard","locations",e],queryFn:async({signal:t})=>rt(lD,`/api/locations/${encodeURIComponent(e)}`,t),retry:!1})}function Yne(){return ct({queryKey:["dashboard","skills"],queryFn:({signal:e})=>rt(CD,"/api/skills",e),retry:!1,staleTime:Mh})}function Kne(){return ct({queryKey:["dashboard","plugin-reports"],queryFn:({signal:e})=>rt(ED,"/api/plugin-reports",e),retry:!1})}function vM(e){let t=zne(),n=ct({queryKey:["dashboard","conversation-stats"],queryFn:({signal:i})=>rt(AD,"/api/conversations/stats",i),retry:!1}),o=Yne(),a=Kne();return{data:t.data&&o.data?{...e,conversationStatsError:!!n.error,...n.data?{conversationStats:n.data}:{},conversationStatsLoading:n.isPending,pluginReportsError:!!a.error,...a.data?{pluginReports:a.data}:{},pluginReportsLoading:a.isPending,plugins:t.data,skills:o.data}:void 0,error:t.error??o.error,isPending:t.isPending||o.isPending}}var xM="Junior";function it(){return typeof window>"u"?xM:window.__JUNIOR_DASHBOARD_AGENT_NAME__?.trim()||xM}function DM(e=it()){return e.endsWith("s")?`${e}'`:`${e}'s`}var ID=w(k(),1);function jh(){return(0,ID.jsx)("div",{className:"relative grid size-10 shrink-0 select-none place-items-center overflow-visible",children:(0,ID.jsx)("img",{alt:"",className:"relative size-11 max-w-none -translate-y-0.5 object-contain opacity-90 drop-shadow-[0_0_7px_rgba(255,255,255,0.16)]",draggable:!1,src:"/_junior/dashboard/avatar.png"})})}var FM=["relative","overflow-hidden","bg-white/15","before:absolute","before:inset-0","before:content-['']","before:bg-[linear-gradient(90deg,#ff4d6d,#ffb703,#56f39a,#4cc9f0,#9b5de5,#ff4d6d)]","before:bg-[length:200%_100%]","before:animate-[junior-rainbow-flow_1.2s_linear_infinite]","motion-reduce:before:animate-none"].join(" ");function S(...e){return e.filter(Boolean).join(" ")}var Ft="mx-auto w-full min-w-0 max-w-screen-xl",EA="text-dashboard-text-muted hover:text-dashboard-text";var kA=w(k(),1);function Qe(e){return(0,kA.jsx)("div",{className:S(Ft,"grid min-h-[calc(100vh-5rem)] place-items-center px-4 py-8 md:px-8"),children:(0,kA.jsxs)("section",{className:"grid w-full max-w-lg grid-cols-[auto_minmax(0,1fr)] items-center gap-3 rounded-lg border border-white/15 bg-dashboard-surface-raised p-4",children:[(0,kA.jsx)(jh,{}),(0,kA.jsxs)("div",{children:[(0,kA.jsx)("div",{className:"font-bold",children:e.label}),(0,kA.jsx)("div",{"aria-label":e.label,className:`${FM} mt-3 h-1.5 w-full`,role:"progressbar"})]})]})})}var Hh=w(Y(),1);var Ph=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();var SM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var LM=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase());var _D=e=>{let t=LM(e);return t.charAt(0).toUpperCase()+t.slice(1)};var yp=w(Y(),1);var Gh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var RM=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var Wu=w(Y(),1);var Jne=(0,Wu.createContext)({});var NM=()=>(0,Wu.useContext)(Jne);var $M=(0,yp.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:o,className:a="",children:r,iconNode:i,...A},s)=>{let{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:l=!1,color:p="currentColor",className:g=""}=NM()??{},m=o??l?Number(n??u)*24/Number(t??c):n??u;return(0,yp.createElement)("svg",{ref:s,...Gh,width:t??c??Gh.width,height:t??c??Gh.height,stroke:e??p,strokeWidth:m,className:Ph("lucide",g,a),...!r&&!RM(A)&&{"aria-hidden":"true"},...A},[...i.map(([h,y])=>(0,yp.createElement)(h,y)),...Array.isArray(r)?r:[r]])});var P=(e,t)=>{let n=(0,Hh.forwardRef)(({className:o,...a},r)=>(0,Hh.createElement)($M,{ref:r,iconNode:t,className:Ph(`lucide-${SM(_D(e))}`,`lucide-${e}`,o),...a}));return n.displayName=_D(e),n};var Wne=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],jo=P("activity",Wne);var Zne=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Cp=P("archive",Zne);var Vne=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],wp=P("arrow-down-to-line",Vne);var Xne=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],wr=P("arrow-left",Xne);var eae=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ep=P("arrow-right",eae);var tae=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],kp=P("bookmark",tae);var nae=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Er=P("bot",nae);var aae=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],qa=P("boxes",aae);var oae=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],kr=P("braces",oae);var rae=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],bi=P("brain-circuit",rae);var iae=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],_s=P("brain",iae);var Aae=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],Qp=P("calendar-clock",Aae);var sae=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Ip=P("calendar",sae);var cae=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vs=P("check",cae);var uae=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_p=P("chevron-down",uae);var dae=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],hi=P("chevron-right",dae);var lae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Po=P("circle-alert",lae);var pae=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],vp=P("circle-dashed",pae);var gae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],xp=P("circle-dot",gae);var mae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],QA=P("circle-x",mae);var fae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Go=P("clock-3",fae);var bae=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],xs=P("coins",bae);var hae=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ds=P("copy",hae);var Bae=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],IA=P("database",Bae);var yae=[["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 10h14",key:"elsbfy"}],["path",{d:"M5 21h14",key:"11awu3"}]],Dp=P("diff",yae);var Cae=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],go=P("earth",Cae);var wae=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Fp=P("external-link",wae);var Eae=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Sp=P("git-merge",Eae);var kae=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Lp=P("hash",kae);var Qae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Rp=P("info",Qae);var Iae=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Ho=P("key-round",Iae);var _ae=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],Np=P("lightbulb",_ae);var vae=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],$p=P("link",vae);var xae=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],Bi=P("lock-keyhole",xae);var Dae=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Mp=P("log-out",Dae);var Fae=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Fs=P("map-pin",Fae);var Sae=[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]],jp=P("map-pinned",Sae);var Lae=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],za=P("message-square",Lae);var Rae=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],Pp=P("minimize-2",Rae);var Nae=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],Gp=P("radio-tower",Nae);var $ae=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yi=P("search",$ae);var Mae=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Hp=P("send",Mae);var jae=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Yn=P("sparkles",jae);var Pae=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],Up=P("timer",Pae);var Gae=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Uo=P("trash-2",Gae);var Hae=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ia=P("triangle-alert",Hae);var Uae=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],_a=P("user-round",Uae);var Tae=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Ss=P("users",Tae);var Oae=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],To=P("x",Oae);var Gr=w(Y(),1);var vD=Object.defineProperty,qae=Object.getOwnPropertyDescriptor,zae=Object.getOwnPropertyNames,Yae=Object.prototype.hasOwnProperty,jM=(e,t)=>{let n={};for(var o in e)vD(n,o,{get:e[o],enumerable:!0});return t||vD(n,Symbol.toStringTag,{value:"Module"}),n},MM=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=zae(t),r=0,i=a.length,A;r<i;r++)A=a[r],!Yae.call(e,A)&&A!==n&&vD(e,A,{get:(s=>t[s]).bind(null,A),enumerable:!(o=qae(t,A))||o.enumerable});return e},PM=(e,t,n)=>(MM(e,t,"default"),n&&MM(n,t,"default"));var SD={};F(SD,{createOnigurumaEngine:()=>uoe,getDefaultWasmLoader:()=>coe,loadWasm:()=>HM,setDefaultWasmLoader:()=>soe});var FD=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Kae(){return 2147483648}function Jae(){return typeof performance<"u"?performance.now():Date.now()}var Wae=(e,t)=>e+(t-e%t)%t;async function Zae(e){let t,n,o={};function a(g){n=g,o.HEAPU8=new Uint8Array(g),o.HEAPU32=new Uint32Array(g)}function r(g,m,h){o.HEAPU8.copyWithin(g,m,m+h)}function i(g){try{return t.grow(g-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function A(g){let m=o.HEAPU8.length;g=g>>>0;let h=Kae();if(g>h)return!1;for(let y=1;y<=4;y*=2){let f=m*(1+.2/y);f=Math.min(f,g+100663296);let b=Math.min(h,Wae(Math.max(g,f),65536));if(i(b))return!0}return!1}let s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(g,m,h=1024){let y=m+h,f=m;for(;g[f]&&!(f>=y);)++f;if(f-m>16&&g.buffer&&s)return s.decode(g.subarray(m,f));let b="";for(;m<f;){let B=g[m++];if(!(B&128)){b+=String.fromCharCode(B);continue}let C=g[m++]&63;if((B&224)===192){b+=String.fromCharCode((B&31)<<6|C);continue}let E=g[m++]&63;if((B&240)===224?B=(B&15)<<12|C<<6|E:B=(B&7)<<18|C<<12|E<<6|g[m++]&63,B<65536)b+=String.fromCharCode(B);else{let x=B-65536;b+=String.fromCharCode(55296|x>>10,56320|x&1023)}}return b}function u(g,m){return g?c(o.HEAPU8,g,m):""}let l={emscripten_get_now:Jae,emscripten_memcpy_big:r,emscripten_resize_heap:A,fd_write:()=>0};async function p(){let m=await e({env:l,wasi_snapshot_preview1:l});t=m.memory,a(t.buffer),Object.assign(o,m),o.UTF8ToString=u}return await p(),o}var Vae=Object.defineProperty,Xae=(e,t,n)=>t in e?Vae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bn=(e,t,n)=>Xae(e,typeof t!="symbol"?t+"":t,n),Qn=null;function eoe(e){throw new FD(e.UTF8ToString(e.getLastOnigError()))}var Th=class e{constructor(t){bn(this,"utf16Length"),bn(this,"utf8Length"),bn(this,"utf16Value"),bn(this,"utf8Value"),bn(this,"utf16OffsetToUtf8"),bn(this,"utf8OffsetToUtf16");let n=t.length,o=e._utf8ByteLength(t),a=o!==n,r=a?new Uint32Array(n+1):null;a&&(r[n]=o);let i=a?new Uint32Array(o+1):null;a&&(i[o]=n);let A=new Uint8Array(o),s=0;for(let c=0;c<n;c++){let u=t.charCodeAt(c),l=u,p=!1;if(u>=55296&&u<=56319&&c+1<n){let g=t.charCodeAt(c+1);g>=56320&&g<=57343&&(l=(u-55296<<10)+65536|g-56320,p=!0)}a&&(r[c]=s,p&&(r[c+1]=s),l<=127?i[s+0]=c:l<=2047?(i[s+0]=c,i[s+1]=c):l<=65535?(i[s+0]=c,i[s+1]=c,i[s+2]=c):(i[s+0]=c,i[s+1]=c,i[s+2]=c,i[s+3]=c)),l<=127?A[s++]=l:l<=2047?(A[s++]=192|(l&1984)>>>6,A[s++]=128|(l&63)>>>0):l<=65535?(A[s++]=224|(l&61440)>>>12,A[s++]=128|(l&4032)>>>6,A[s++]=128|(l&63)>>>0):(A[s++]=240|(l&1835008)>>>18,A[s++]=128|(l&258048)>>>12,A[s++]=128|(l&4032)>>>6,A[s++]=128|(l&63)>>>0),p&&c++}this.utf16Length=n,this.utf8Length=o,this.utf16Value=t,this.utf8Value=A,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=i}static _utf8ByteLength(t){let n=0;for(let o=0,a=t.length;o<a;o++){let r=t.charCodeAt(o),i=r,A=!1;if(r>=55296&&r<=56319&&o+1<a){let s=t.charCodeAt(o+1);s>=56320&&s<=57343&&(i=(r-55296<<10)+65536|s-56320,A=!0)}i<=127?n+=1:i<=2047?n+=2:i<=65535?n+=3:n+=4,A&&o++}return n}createString(t){let n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}},Oh=class Qr{constructor(t){if(bn(this,"id",++Qr.LAST_ID),bn(this,"_onigBinding"),bn(this,"content"),bn(this,"utf16Length"),bn(this,"utf8Length"),bn(this,"utf16OffsetToUtf8"),bn(this,"utf8OffsetToUtf16"),bn(this,"ptr"),!Qn)throw new FD("Must invoke loadWasm first.");this._onigBinding=Qn,this.content=t;let n=new Th(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Qr._sharedPtrInUse?(Qr._sharedPtr||(Qr._sharedPtr=Qn.omalloc(1e4)),Qr._sharedPtrInUse=!0,Qn.HEAPU8.set(n.utf8Value,Qr._sharedPtr),this.ptr=Qr._sharedPtr):this.ptr=n.createString(Qn)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Qr._sharedPtr?Qr._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};bn(Oh,"LAST_ID",0);bn(Oh,"_sharedPtr",0);bn(Oh,"_sharedPtrInUse",!1);var GM=Oh,DD=class{constructor(t){if(bn(this,"_onigBinding"),bn(this,"_ptr"),!Qn)throw new FD("Must invoke loadWasm first.");let n=[],o=[];for(let A=0,s=t.length;A<s;A++){let c=new Th(t[A]);n[A]=c.createString(Qn),o[A]=c.utf8Length}let a=Qn.omalloc(4*t.length);Qn.HEAPU32.set(n,a/4);let r=Qn.omalloc(4*t.length);Qn.HEAPU32.set(o,r/4);let i=Qn.createOnigScanner(a,r,t.length);for(let A=0,s=t.length;A<s;A++)Qn.ofree(n[A]);Qn.ofree(r),Qn.ofree(a),i===0&&eoe(Qn),this._onigBinding=Qn,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,o){let a=0;if(typeof o=="number"&&(a=o),typeof t=="string"){t=new GM(t);let r=this._findNextMatchSync(t,n,!1,a);return t.dispose(),r}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,o,a){let r=this._onigBinding,i=r.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(i===0)return null;let A=r.HEAPU32,s=i/4,c=A[s++],u=A[s++],l=[];for(let p=0;p<u;p++){let g=t.convertUtf8OffsetToUtf16(A[s++]),m=t.convertUtf8OffsetToUtf16(A[s++]);l[p]={start:g,end:m,length:m-g}}return{index:c,captureIndices:l}}};function toe(e){return typeof e.instantiator=="function"}function noe(e){return typeof e.default=="function"}function aoe(e){return typeof e.data<"u"}function ooe(e){return typeof Response<"u"&&e instanceof Response}function roe(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}var Uh;function HM(e){if(Uh)return Uh;async function t(){Qn=await Zae(async n=>{let o=e;return o=await o,typeof o=="function"&&(o=await o(n)),typeof o=="function"&&(o=await o(n)),toe(o)?o=await o.instantiator(n):noe(o)?o=await o.default(n):(aoe(o)&&(o=o.data),ooe(o)?typeof WebAssembly.instantiateStreaming=="function"?o=await ioe(o)(n):o=await Aoe(o)(n):roe(o)?o=await xD(o)(n):o instanceof WebAssembly.Module?o=await xD(o)(n):"default"in o&&o.default instanceof WebAssembly.Module&&(o=await xD(o.default)(n))),"instance"in o&&(o=o.instance),"exports"in o&&(o=o.exports),o})}return Uh=t(),Uh}function xD(e){return t=>WebAssembly.instantiate(e,t)}function ioe(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Aoe(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var UM;function soe(e){UM=e}function coe(){return UM}async function uoe(e){return e&&await HM(e),{createScanner(t){return new DD(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new GM(t)}}}var LD=jM({});PM(LD,SD);var dP=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>Promise.resolve().then(()=>(OM(),TM)))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>Promise.resolve().then(()=>(zM(),qM)))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(KM(),YM)))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>Promise.resolve().then(()=>(WM(),JM)))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>Promise.resolve().then(()=>(VM(),ZM)))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xE9",type:"dark",import:(()=>Promise.resolve().then(()=>(ej(),XM)))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>Promise.resolve().then(()=>(nj(),tj)))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>Promise.resolve().then(()=>(oj(),aj)))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>Promise.resolve().then(()=>(ij(),rj)))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>Promise.resolve().then(()=>(sj(),Aj)))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(uj(),cj)))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(lj(),dj)))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(gj(),pj)))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>Promise.resolve().then(()=>(fj(),mj)))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(hj(),bj)))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>Promise.resolve().then(()=>(yj(),Bj)))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>Promise.resolve().then(()=>(wj(),Cj)))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>Promise.resolve().then(()=>(kj(),Ej)))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>Promise.resolve().then(()=>(Ij(),Qj)))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>Promise.resolve().then(()=>(vj(),_j)))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>Promise.resolve().then(()=>(Dj(),xj)))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>Promise.resolve().then(()=>(Sj(),Fj)))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>Promise.resolve().then(()=>(Rj(),Lj)))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>Promise.resolve().then(()=>($j(),Nj)))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>Promise.resolve().then(()=>(jj(),Mj)))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>Promise.resolve().then(()=>(Gj(),Pj)))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>Promise.resolve().then(()=>(Uj(),Hj)))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>Promise.resolve().then(()=>(Oj(),Tj)))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>Promise.resolve().then(()=>(zj(),qj)))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>Promise.resolve().then(()=>(Kj(),Yj)))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>Promise.resolve().then(()=>(Wj(),Jj)))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>Promise.resolve().then(()=>(Vj(),Zj)))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>Promise.resolve().then(()=>(e7(),Xj)))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>Promise.resolve().then(()=>(n7(),t7)))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>Promise.resolve().then(()=>(o7(),a7)))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(i7(),r7)))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>Promise.resolve().then(()=>(s7(),A7)))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>Promise.resolve().then(()=>(u7(),c7)))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>Promise.resolve().then(()=>(l7(),d7)))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>Promise.resolve().then(()=>(g7(),p7)))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(f7(),m7)))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>Promise.resolve().then(()=>(h7(),b7)))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>Promise.resolve().then(()=>(y7(),B7)))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>Promise.resolve().then(()=>(w7(),C7)))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>Promise.resolve().then(()=>(k7(),E7)))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>Promise.resolve().then(()=>(I7(),Q7)))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>Promise.resolve().then(()=>(v7(),_7)))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>Promise.resolve().then(()=>(D7(),x7)))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>Promise.resolve().then(()=>(S7(),F7)))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>Promise.resolve().then(()=>(R7(),L7)))},{id:"red",displayName:"Red",type:"dark",import:(()=>Promise.resolve().then(()=>($7(),N7)))},{id:"rose-pine",displayName:"Ros\xE9 Pine",type:"dark",import:(()=>Promise.resolve().then(()=>(j7(),M7)))},{id:"rose-pine-dawn",displayName:"Ros\xE9 Pine Dawn",type:"light",import:(()=>Promise.resolve().then(()=>(G7(),P7)))},{id:"rose-pine-moon",displayName:"Ros\xE9 Pine Moon",type:"dark",import:(()=>Promise.resolve().then(()=>(U7(),H7)))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(O7(),T7)))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>Promise.resolve().then(()=>(z7(),q7)))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>Promise.resolve().then(()=>(K7(),Y7)))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(W7(),J7)))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>Promise.resolve().then(()=>(V7(),Z7)))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>Promise.resolve().then(()=>(eP(),X7)))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>Promise.resolve().then(()=>(nP(),tP)))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>Promise.resolve().then(()=>(oP(),aP)))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>Promise.resolve().then(()=>(iP(),rP)))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(sP(),AP)))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>Promise.resolve().then(()=>(uP(),cP)))}],lP=Object.fromEntries(dP.map(e=>[e.id,e.import]));var qe=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function wre(e){return TD(e)}function TD(e){return Array.isArray(e)?Ere(e):e instanceof RegExp?e:typeof e=="object"?kre(e):e}function Ere(e){let t=[];for(let n=0,o=e.length;n<o;n++)t[n]=TD(e[n]);return t}function kre(e){let t={};for(let n in e)t[n]=TD(e[n]);return t}function CP(e,...t){return t.forEach(n=>{for(let o in n)e[o]=n[o]}),e}function wP(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?wP(e.substring(0,e.length-1)):e.substr(~t+1)}var RD=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,qh=class{static hasCaptures(e){return e===null?!1:(RD.lastIndex=0,RD.test(e))}static replaceCaptures(e,t,n){return e.replace(RD,(o,a,r,i)=>{let A=n[parseInt(a||r,10)];if(A){let s=t.substring(A.start,A.end);for(;s[0]===".";)s=s.substring(1);switch(i){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return o})}};function EP(e,t){return e<t?-1:e>t?1:0}function kP(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,o=t.length;if(n===o){for(let a=0;a<n;a++){let r=EP(e[a],t[a]);if(r!==0)return r}return 0}return n-o}function pP(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function QP(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var IP=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},qp=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(_re(e),t)}static createFromParsedTheme(e,t){return xre(e,t)}_cachedMatchRoot=new IP(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,o=this._cachedMatchRoot.get(t).find(a=>Qre(e.parent,a.parentScopes));return o?new _P(o.fontStyle,o.foreground,o.background):null}},ND=class zh{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(let o of n)t=new zh(t,o);return t}static from(...t){let n=null;for(let o=0;o<t.length;o++)n=new zh(n,t[o]);return n}push(t){return new zh(this,t)}getSegments(){let t=this,n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){let n=[],o=this;for(;o&&o!==t;)n.push(o.scopeName),o=o.parent;return o===t?n.reverse():void 0}};function Qre(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let o=t[n],a=!1;if(o===">"){if(n===t.length-1)return!1;o=t[++n],a=!0}for(;e&&!Ire(e.scopeName,o);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Ire(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var _P=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function _re(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],o=0;for(let a=0,r=t.length;a<r;a++){let i=t[a];if(!i.settings)continue;let A;if(typeof i.scope=="string"){let l=i.scope;l=l.replace(/^[,]+/,""),l=l.replace(/[,]+$/,""),A=l.split(",")}else Array.isArray(i.scope)?A=i.scope:A=[""];let s=-1;if(typeof i.settings.fontStyle=="string"){s=0;let l=i.settings.fontStyle.split(" ");for(let p=0,g=l.length;p<g;p++)switch(l[p]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let c=null;typeof i.settings.foreground=="string"&&pP(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&pP(i.settings.background)&&(u=i.settings.background);for(let l=0,p=A.length;l<p;l++){let m=A[l].trim().split(" "),h=m[m.length-1],y=null;m.length>1&&(y=m.slice(0,m.length-1),y.reverse()),n[o++]=new vre(h,y,a,s,c,u)}}return n}var vre=class{constructor(e,t,n,o,a,r){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=o,this.foreground=a,this.background=r}},$n=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($n||{});function xre(e,t){e.sort((s,c)=>{let u=EP(s.scope,c.scope);return u!==0||(u=kP(s.parentScopes,c.parentScopes),u!==0)?u:s.index-c.index});let n=0,o="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let s=e.shift();s.fontStyle!==-1&&(n=s.fontStyle),s.foreground!==null&&(o=s.foreground),s.background!==null&&(a=s.background)}let r=new Dre(t),i=new _P(n,r.getId(o),r.getId(a)),A=new Sre(new MD(0,null,-1,0,0),[]);for(let s=0,c=e.length;s<c;s++){let u=e[s];A.insert(0,u.scope,u.parentScopes,u.fontStyle,r.getId(u.foreground),r.getId(u.background))}return new qp(r,i,A)}var Dre=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Fre=Object.freeze([]),MD=class vP{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,o,a,r){this.scopeDepth=t,this.parentScopes=n||Fre,this.fontStyle=o,this.foreground=a,this.background=r}clone(){return new vP(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let o=0,a=t.length;o<a;o++)n[o]=t[o].clone();return n}acceptOverwrite(t,n,o,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),o!==0&&(this.foreground=o),a!==0&&(this.background=a)}},Sre=class jD{constructor(t,n=[],o={}){this._mainRule=t,this._children=o,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let o=0,a=0;for(;t.parentScopes[o]===">"&&o++,n.parentScopes[a]===">"&&a++,!(o>=t.parentScopes.length||a>=n.parentScopes.length);){let r=n.parentScopes[a].length-t.parentScopes[o].length;if(r!==0)return r;o++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let o=t.indexOf("."),a,r;if(o===-1?(a=t,r=""):(a=t.substring(0,o),r=t.substring(o+1)),this._children.hasOwnProperty(a))return this._children[a].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(jD._cmpBySpecificity),n}insert(t,n,o,a,r,i){if(n===""){this._doInsertHere(t,o,a,r,i);return}let A=n.indexOf("."),s,c;A===-1?(s=n,c=""):(s=n.substring(0,A),c=n.substring(A+1));let u;this._children.hasOwnProperty(s)?u=this._children[s]:(u=new jD(this._mainRule.clone(),MD.cloneArr(this._rulesWithParentScopes)),this._children[s]=u),u.insert(t+1,c,o,a,r,i)}_doInsertHere(t,n,o,a,r){if(n===null){this._mainRule.acceptOverwrite(t,o,a,r);return}for(let i=0,A=this._rulesWithParentScopes.length;i<A;i++){let s=this._rulesWithParentScopes[i];if(kP(s.parentScopes,n)===0){s.acceptOverwrite(t,o,a,r);return}}o===-1&&(o=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),r===0&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new MD(t,n,o,a,r))}},Rs=class mo{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){let n=mo.getLanguageId(t),o=mo.getTokenType(t),a=mo.getFontStyle(t),r=mo.getForeground(t),i=mo.getBackground(t);console.log({languageId:n,tokenType:o,fontStyle:a,foreground:r,background:i})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,o,a,r,i,A){let s=mo.getLanguageId(t),c=mo.getTokenType(t),u=mo.containsBalancedBrackets(t)?1:0,l=mo.getFontStyle(t),p=mo.getForeground(t),g=mo.getBackground(t);return n!==0&&(s=n),o!==8&&(c=o),a!==null&&(u=a?1:0),r!==-1&&(l=r),i!==0&&(p=i),A!==0&&(g=A),(s<<0|c<<8|u<<10|l<<11|p<<15|g<<24)>>>0}};function Kh(e,t){let n=[],o=Lre(e),a=o.next();for(;a!==null;){let s=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=o.next()}let c=i();if(n.push({matcher:c,priority:s}),a!==",")break;a=o.next()}return n;function r(){if(a==="-"){a=o.next();let s=r();return c=>!!s&&!s(c)}if(a==="("){a=o.next();let s=A();return a===")"&&(a=o.next()),s}if(gP(a)){let s=[];do s.push(a),a=o.next();while(gP(a));return c=>t(s,c)}return null}function i(){let s=[],c=r();for(;c;)s.push(c),c=r();return u=>s.every(l=>l(u))}function A(){let s=[],c=i();for(;c&&(s.push(c),a==="|"||a===",");){do a=o.next();while(a==="|"||a===",");c=i()}return u=>s.some(l=>l(u))}}function gP(e){return!!e&&!!e.match(/[\w\.:]+/)}function Lre(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let o=n[0];return n=t.exec(e),o}}}function xP(e){typeof e.dispose=="function"&&e.dispose()}var zp=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Rre=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Nre=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},$re=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new zp(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Nre;for(let n of e)Mre(n,this.initialScopeName,this.repo,t);for(let n of t.references)if(n instanceof zp){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Mre(e,t,n,o){let a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}let r=n.lookup(t);e instanceof zp?Yh({baseGrammar:r,selfGrammar:a},o):PD(e.ruleName,{baseGrammar:r,selfGrammar:a,repository:a.repository},o);let i=n.injections(e.scopeName);if(i)for(let A of i)o.add(new zp(A))}function PD(e,t,n){if(t.repository&&t.repository[e]){let o=t.repository[e];Jh([o],t,n)}}function Yh(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Jh(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Jh(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Jh(e,t,n){for(let o of e){if(n.visitedRule.has(o))continue;n.visitedRule.add(o);let a=o.repository?CP({},t.repository,o.repository):t.repository;Array.isArray(o.patterns)&&Jh(o.patterns,{...t,repository:a},n);let r=o.include;if(!r)continue;let i=DP(r);switch(i.kind){case 0:Yh({...t,selfGrammar:t.baseGrammar},n);break;case 1:Yh(t,n);break;case 2:PD(i.ruleName,{...t,repository:a},n);break;case 3:case 4:let A=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(A){let s={baseGrammar:t.baseGrammar,selfGrammar:A,repository:a};i.kind===4?PD(i.ruleName,s,n):Yh(s,n)}else i.kind===4?n.add(new Rre(i.scopeName,i.ruleName)):n.add(new zp(i.scopeName));break}}}var jre=class{kind=0},Pre=class{kind=1},Gre=class{constructor(e){this.ruleName=e}kind=2},Hre=class{constructor(e){this.scopeName=e}kind=3},Ure=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function DP(e){if(e==="$base")return new jre;if(e==="$self")return new Pre;let t=e.indexOf("#");if(t===-1)return new Hre(e);if(t===0)return new Gre(e.substring(1));{let n=e.substring(0,t),o=e.substring(t+1);return new Ure(n,o)}}var Tre=/\\(\d+)/,mP=/\\(\d+)/g;var Ore=-1,FP=-2;var Jp=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,o){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=qh.hasCaptures(this._name),this._contentName=o||null,this._contentNameIsCapturing=qh.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${wP(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:qh.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:qh.replaceCaptures(this._contentName,e,t)}},qre=class extends Jp{retokenizeCapturedWithRuleId;constructor(e,t,n,o,a){super(e,t,n,o),this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,o){throw new Error("Not supported!")}},zre=class extends Jp{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,o,a){super(e,t,n,null),this._match=new Yp(o,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,o){return this._getCachedCompiledPatterns(e).compileAG(e,n,o)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Kp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},fP=class extends Jp{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,o,a){super(e,t,n,o),this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,o){return this._getCachedCompiledPatterns(e).compileAG(e,n,o)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Kp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},GD=class extends Jp{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,o,a,r,i,A,s,c){super(e,t,n,o),this._begin=new Yp(a,this.id),this.beginCaptures=r,this._end=new Yp(i||"\uFFFF",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=A,this.applyEndPatternLast=s||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,o){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,o)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Kp;for(let n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Wh=class extends Jp{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,o,a,r,i,A,s){super(e,t,n,o),this._begin=new Yp(a,this.id),this.beginCaptures=r,this.whileCaptures=A,this._while=new Yp(i,FP),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,o){return this._getCachedCompiledPatterns(e).compileAG(e,n,o)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Kp;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,o){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,o)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Kp,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"\uFFFF"),this._cachedCompiledWhilePatterns}},SP=class Kn{static createCaptureRule(t,n,o,a,r){return t.registerRule(i=>new qre(n,i,o,a,r))}static getCompiledRuleId(t,n,o){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new zre(t.$vscodeTextmateLocation,t.id,t.name,t.match,Kn._compileCaptures(t.captures,n,o));if(typeof t.begin>"u"){t.repository&&(o=CP({},o,t.repository));let r=t.patterns;return typeof r>"u"&&t.include&&(r=[{include:t.include}]),new fP(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Kn._compilePatterns(r,n,o))}return t.while?new Wh(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Kn._compileCaptures(t.beginCaptures||t.captures,n,o),t.while,Kn._compileCaptures(t.whileCaptures||t.captures,n,o),Kn._compilePatterns(t.patterns,n,o)):new GD(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Kn._compileCaptures(t.beginCaptures||t.captures,n,o),t.end,Kn._compileCaptures(t.endCaptures||t.captures,n,o),t.applyEndPatternLast,Kn._compilePatterns(t.patterns,n,o))}),t.id}static _compileCaptures(t,n,o){let a=[];if(t){let r=0;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let A=parseInt(i,10);A>r&&(r=A)}for(let i=0;i<=r;i++)a[i]=null;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let A=parseInt(i,10),s=0;t[i].patterns&&(s=Kn.getCompiledRuleId(t[i],n,o)),a[A]=Kn.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,s)}}return a}static _compilePatterns(t,n,o){let a=[];if(t)for(let r=0,i=t.length;r<i;r++){let A=t[r],s=-1;if(A.include){let c=DP(A.include);switch(c.kind){case 0:case 1:s=Kn.getCompiledRuleId(o[A.include],n,o);break;case 2:let u=o[c.ruleName];u&&(s=Kn.getCompiledRuleId(u,n,o));break;case 3:case 4:let l=c.scopeName,p=c.kind===4?c.ruleName:null,g=n.getExternalGrammar(l,o);if(g)if(p){let m=g.repository[p];m&&(s=Kn.getCompiledRuleId(m,n,g.repository))}else s=Kn.getCompiledRuleId(g.repository.$self,n,g.repository);break}}else s=Kn.getCompiledRuleId(A,n,o);if(s!==-1){let c=n.getRule(s),u=!1;if((c instanceof fP||c instanceof GD||c instanceof Wh)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;a.push(s)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},Yp=class LP{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){let o=t.length,a=0,r=[],i=!1;for(let A=0;A<o;A++)if(t.charAt(A)==="\\"&&A+1<o){let c=t.charAt(A+1);c==="z"?(r.push(t.substring(a,A)),r.push("$(?!\\n)(?<!\\n)"),a=A+2):(c==="A"||c==="G")&&(i=!0),A++}this.hasAnchor=i,a===0?this.source=t:(r.push(t.substring(a,o)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Tre.test(this.source):this.hasBackReferences=!1}clone(){return new LP(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let o=n.map(a=>t.substring(a.start,a.end));return mP.lastIndex=0,this.source.replace(mP,(a,r)=>QP(o[parseInt(r,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],o=[],a=[],r,i,A,s;for(r=0,i=this.source.length;r<i;r++)A=this.source.charAt(r),t[r]=A,n[r]=A,o[r]=A,a[r]=A,A==="\\"&&r+1<i&&(s=this.source.charAt(r+1),s==="A"?(t[r+1]="\uFFFF",n[r+1]="\uFFFF",o[r+1]="A",a[r+1]="A"):s==="G"?(t[r+1]="\uFFFF",n[r+1]="G",o[r+1]="\uFFFF",a[r+1]="G"):(t[r+1]=s,n[r+1]=s,o[r+1]=s,a[r+1]=s),r++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:o.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Kp=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new bP(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let o=this._items.map(a=>a.resolveAnchors(t,n));return new bP(e,o,this._items.map(a=>a.ruleId))}},bP=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
75
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let i of e.seen.entries()){let A=i[1];if(t===i[0]){r(i);continue}if(e.external){let c=e.external.registry.get(i[0])?.id;if(t!==i[0]&&c){r(i);continue}}if(e.metadataRegistry.get(i[0])?.id){r(i);continue}if(A.cycle){r(i);continue}if(A.count>1&&e.reused==="ref"){r(i);continue}}}function yA(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=A=>{let s=e.seen.get(A);if(s.ref===null)return;let c=s.def??s.schema,u={...c},l=s.ref;if(s.ref=null,l){o(l);let g=e.seen.get(l),m=g.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(m)):Object.assign(c,m),Object.assign(c,u),A._zod.parent===l)for(let y in c)y==="$ref"||y==="allOf"||y in u||delete c[y];if(m.$ref&&g.def)for(let y in c)y==="$ref"||y==="allOf"||y in g.def&&JSON.stringify(c[y])===JSON.stringify(g.def[y])&&delete c[y]}let p=A._zod.parent;if(p&&p!==l){o(p);let g=e.seen.get(p);if(g?.schema.$ref&&(c.$ref=g.schema.$ref,g.def))for(let m in c)m==="$ref"||m==="allOf"||m in g.def&&JSON.stringify(c[m])===JSON.stringify(g.def[m])&&delete c[m]}e.override({zodSchema:A,jsonSchema:c,path:s.path??[]})};for(let A of[...e.seen.entries()].reverse())o(A[0]);let a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let A=e.external.registry.get(t)?.id;if(!A)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(A)}Object.assign(a,n.def??n.schema);let r=e.metadataRegistry.get(t)?.id;r!==void 0&&a.id===r&&delete a.id;let i=e.external?.defs??{};for(let A of e.seen.entries()){let s=A[1];s.def&&s.defId&&(s.def.id===s.defId&&delete s.def.id,i[s.defId]=s.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?a.$defs=i:a.definitions=i);try{let A=JSON.parse(JSON.stringify(a));return Object.defineProperty(A,"~standard",{value:{...t["~standard"],jsonSchema:{input:Nu(t,"input",e.processors),output:Nu(t,"output",e.processors)}},enumerable:!1,writable:!1}),A}catch{throw new Error("Error converting schema to JSON.")}}function ia(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return ia(o.element,n);if(o.type==="set")return ia(o.valueType,n);if(o.type==="lazy")return ia(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return ia(o.innerType,n);if(o.type==="intersection")return ia(o.left,n)||ia(o.right,n);if(o.type==="record"||o.type==="map")return ia(o.keyType,n)||ia(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:ia(o.in,n)||ia(o.out,n);if(o.type==="object"){for(let a in o.shape)if(ia(o.shape[a],n))return!0;return!1}if(o.type==="union"){for(let a of o.options)if(ia(a,n))return!0;return!1}if(o.type==="tuple"){for(let a of o.items)if(ia(a,n))return!0;return!!(o.rest&&ia(o.rest,n))}return!1}var pI=(e,t={})=>n=>{let o=hA({...n,processors:t});return Ue(e,o),BA(o,e),yA(o,e)},Nu=(e,t,n={})=>o=>{let{libraryOptions:a,target:r}=o??{},i=hA({...a??{},target:r,io:t,processors:n});return Ue(e,i),BA(i,e),yA(i,e)};var aee={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gI=(e,t,n,o)=>{let a=n;a.type="string";let{minimum:r,maximum:i,format:A,patterns:s,contentEncoding:c}=e._zod.bag;if(typeof r=="number"&&(a.minLength=r),typeof i=="number"&&(a.maxLength=i),A&&(a.format=aee[A]??A,a.format===""&&delete a.format,A==="time"&&delete a.format),c&&(a.contentEncoding=c),s&&s.size>0){let u=[...s];u.length===1?a.pattern=u[0].source:u.length>1&&(a.allOf=[...u.map(l=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:l.source}))])}},mI=(e,t,n,o)=>{let a=n,{minimum:r,maximum:i,format:A,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof A=="string"&&A.includes("int")?a.type="integer":a.type="number";let l=typeof u=="number"&&u>=(r??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(i??Number.POSITIVE_INFINITY),g=t.target==="draft-04"||t.target==="openapi-3.0";l?g?(a.minimum=u,a.exclusiveMinimum=!0):a.exclusiveMinimum=u:typeof r=="number"&&(a.minimum=r),p?g?(a.maximum=c,a.exclusiveMaximum=!0):a.exclusiveMaximum=c:typeof i=="number"&&(a.maximum=i),typeof s=="number"&&(a.multipleOf=s)},fI=(e,t,n,o)=>{n.type="boolean"},bI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},hI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},BI=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},yI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},CI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},wI=(e,t,n,o)=>{n.not={}},EI=(e,t,n,o)=>{},kI=(e,t,n,o)=>{},QI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},II=(e,t,n,o)=>{let a=e._zod.def,r=Rl(a.entries);r.every(i=>typeof i=="number")&&(n.type="number"),r.every(i=>typeof i=="string")&&(n.type="string"),n.enum=r},_I=(e,t,n,o)=>{let a=e._zod.def,r=[];for(let i of a.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");r.push(Number(i))}else r.push(i);if(r.length!==0)if(r.length===1){let i=r[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else r.every(i=>typeof i=="number")&&(n.type="number"),r.every(i=>typeof i=="string")&&(n.type="string"),r.every(i=>typeof i=="boolean")&&(n.type="boolean"),r.every(i=>i===null)&&(n.type="null"),n.enum=r},vI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},xI=(e,t,n,o)=>{let a=n,r=e._zod.pattern;if(!r)throw new Error("Pattern not found in template literal");a.type="string",a.pattern=r.source},DI=(e,t,n,o)=>{let a=n,r={type:"string",format:"binary",contentEncoding:"binary"},{minimum:i,maximum:A,mime:s}=e._zod.bag;i!==void 0&&(r.minLength=i),A!==void 0&&(r.maxLength=A),s?s.length===1?(r.contentMediaType=s[0],Object.assign(a,r)):(Object.assign(a,r),a.anyOf=s.map(c=>({contentMediaType:c}))):Object.assign(a,r)},FI=(e,t,n,o)=>{n.type="boolean"},SI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},LI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},RI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},NI=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},$I=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},MI=(e,t,n,o)=>{let a=n,r=e._zod.def,{minimum:i,maximum:A}=e._zod.bag;typeof i=="number"&&(a.minItems=i),typeof A=="number"&&(a.maxItems=A),a.type="array",a.items=Ue(r.element,t,{...o,path:[...o.path,"items"]})},jI=(e,t,n,o)=>{let a=n,r=e._zod.def;a.type="object",a.properties={};let i=r.shape;for(let c in i)a.properties[c]=Ue(i[c],t,{...o,path:[...o.path,"properties",c]});let A=new Set(Object.keys(i)),s=new Set([...A].filter(c=>{let u=r.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));s.size>0&&(a.required=Array.from(s)),r.catchall?._zod.def.type==="never"?a.additionalProperties=!1:r.catchall?r.catchall&&(a.additionalProperties=Ue(r.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},qb=(e,t,n,o)=>{let a=e._zod.def,r=a.inclusive===!1,i=a.options.map((A,s)=>Ue(A,t,{...o,path:[...o.path,r?"oneOf":"anyOf",s]}));r?n.oneOf=i:n.anyOf=i},PI=(e,t,n,o)=>{let a=e._zod.def,r=Ue(a.left,t,{...o,path:[...o.path,"allOf",0]}),i=Ue(a.right,t,{...o,path:[...o.path,"allOf",1]}),A=c=>"allOf"in c&&Object.keys(c).length===1,s=[...A(r)?r.allOf:[r],...A(i)?i.allOf:[i]];n.allOf=s},GI=(e,t,n,o)=>{let a=n,r=e._zod.def;a.type="array";let i=t.target==="draft-2020-12"?"prefixItems":"items",A=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",s=r.items.map((p,g)=>Ue(p,t,{...o,path:[...o.path,i,g]})),c=r.rest?Ue(r.rest,t,{...o,path:[...o.path,A,...t.target==="openapi-3.0"?[r.items.length]:[]]}):null;t.target==="draft-2020-12"?(a.prefixItems=s,c&&(a.items=c)):t.target==="openapi-3.0"?(a.items={anyOf:s},c&&a.items.anyOf.push(c),a.minItems=s.length,c||(a.maxItems=s.length)):(a.items=s,c&&(a.additionalItems=c));let{minimum:u,maximum:l}=e._zod.bag;typeof u=="number"&&(a.minItems=u),typeof l=="number"&&(a.maxItems=l)},HI=(e,t,n,o)=>{let a=n,r=e._zod.def;a.type="object";let i=r.keyType,s=i._zod.bag?.patterns;if(r.mode==="loose"&&s&&s.size>0){let u=Ue(r.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});a.patternProperties={};for(let l of s)a.patternProperties[l.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(a.propertyNames=Ue(r.keyType,t,{...o,path:[...o.path,"propertyNames"]})),a.additionalProperties=Ue(r.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let c=i._zod.values;if(c){let u=[...c].filter(l=>typeof l=="string"||typeof l=="number");u.length>0&&(a.required=u)}},UI=(e,t,n,o)=>{let a=e._zod.def,r=Ue(a.innerType,t,o),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=a.innerType,n.nullable=!0):n.anyOf=[r,{type:"null"}]},TI=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType},OI=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},qI=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},zI=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType;let i;try{i=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},YI=(e,t,n,o)=>{let a=e._zod.def,r=a.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?r?a.out:a.in:a.out;Ue(i,t,o);let A=t.seen.get(e);A.ref=i},KI=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType,n.readOnly=!0},JI=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType},zb=(e,t,n,o)=>{let a=e._zod.def;Ue(a.innerType,t,o);let r=t.seen.get(e);r.ref=a.innerType},WI=(e,t,n,o)=>{let a=e._zod.innerType;Ue(a,t,o);let r=t.seen.get(e);r.ref=a},Ob={string:gI,number:mI,boolean:fI,bigint:bI,symbol:hI,null:BI,undefined:yI,void:CI,never:wI,any:EI,unknown:kI,date:QI,enum:II,literal:_I,nan:vI,template_literal:xI,file:DI,success:FI,custom:SI,function:LI,transform:RI,map:NI,set:$I,array:MI,object:jI,union:qb,intersection:PI,tuple:GI,record:HI,nullable:UI,nonoptional:TI,default:OI,prefault:qI,catch:zI,pipe:YI,readonly:KI,promise:JI,optional:zb,lazy:WI};function Yb(e,t){if("_idmap"in e){let o=e,a=hA({...t,processors:Ob}),r={};for(let s of o._idmap.entries()){let[c,u]=s;Ue(u,a)}let i={},A={registry:o,uri:t?.uri,defs:r};a.external=A;for(let s of o._idmap.entries()){let[c,u]=s;BA(a,u),i[c]=yA(a,u)}if(Object.keys(r).length>0){let s=a.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[s]:r}}return{schemas:i}}let n=hA({...t,processors:Ob});return Ue(e,n),BA(n,e),yA(n,e)}var Kb=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=hA({processors:Ob,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Ue(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),BA(this.ctx,t);let o=yA(this.ctx,t),{"~standard":a,...r}=o;return r}};var aR={};var Vl={};F(Vl,{ZodAny:()=>y_,ZodArray:()=>k_,ZodBase64:()=>mh,ZodBase64URL:()=>fh,ZodBigInt:()=>Tu,ZodBigIntFormat:()=>Bh,ZodBoolean:()=>Uu,ZodCIDRv4:()=>ph,ZodCIDRv6:()=>gh,ZodCUID:()=>ih,ZodCUID2:()=>Ah,ZodCatch:()=>z_,ZodCodec:()=>up,ZodCustom:()=>dp,ZodCustomStringFormat:()=>Gu,ZodDate:()=>rp,ZodDefault:()=>G_,ZodDiscriminatedUnion:()=>I_,ZodE164:()=>bh,ZodEmail:()=>ah,ZodEmoji:()=>oh,ZodEnum:()=>ju,ZodExactOptional:()=>M_,ZodFile:()=>N_,ZodFunction:()=>nv,ZodGUID:()=>ep,ZodIPv4:()=>dh,ZodIPv6:()=>lh,ZodIntersection:()=>__,ZodJWT:()=>hh,ZodKSUID:()=>uh,ZodLazy:()=>X_,ZodLiteral:()=>R_,ZodMAC:()=>p_,ZodMap:()=>S_,ZodNaN:()=>K_,ZodNanoID:()=>rh,ZodNever:()=>w_,ZodNonOptional:()=>Qh,ZodNull:()=>h_,ZodNullable:()=>P_,ZodNumber:()=>Hu,ZodNumberFormat:()=>Qs,ZodObject:()=>Ap,ZodOptional:()=>kh,ZodPipe:()=>cp,ZodPrefault:()=>U_,ZodPreprocess:()=>J_,ZodPromise:()=>tv,ZodReadonly:()=>W_,ZodRecord:()=>Mu,ZodSet:()=>L_,ZodString:()=>Pu,ZodStringFormat:()=>et,ZodSuccess:()=>q_,ZodSymbol:()=>f_,ZodTemplateLiteral:()=>V_,ZodTransform:()=>$_,ZodTuple:()=>x_,ZodType:()=>ge,ZodULID:()=>sh,ZodURL:()=>op,ZodUUID:()=>yr,ZodUndefined:()=>b_,ZodUnion:()=>sp,ZodUnknown:()=>C_,ZodVoid:()=>E_,ZodXID:()=>ch,ZodXor:()=>Q_,_ZodString:()=>nh,_default:()=>H_,_function:()=>lN,any:()=>TR,array:()=>ip,base64:()=>IR,base64url:()=>_R,bigint:()=>jR,boolean:()=>m_,catch:()=>Y_,check:()=>pN,cidrv4:()=>kR,cidrv6:()=>QR,codec:()=>sN,cuid:()=>fR,cuid2:()=>bR,custom:()=>gN,date:()=>qR,describe:()=>mN,discriminatedUnion:()=>ZR,e164:()=>vR,email:()=>iR,emoji:()=>gR,enum:()=>wh,exactOptional:()=>j_,file:()=>oN,float32:()=>RR,float64:()=>NR,function:()=>lN,guid:()=>AR,hash:()=>LR,hex:()=>SR,hostname:()=>FR,httpUrl:()=>pR,instanceof:()=>bN,int:()=>eh,int32:()=>$R,int64:()=>PR,intersection:()=>v_,invertCodec:()=>cN,ipv4:()=>CR,ipv6:()=>ER,json:()=>BN,jwt:()=>xR,keyof:()=>zR,ksuid:()=>yR,lazy:()=>ev,literal:()=>aN,looseObject:()=>JR,looseRecord:()=>XR,mac:()=>wR,map:()=>eN,meta:()=>fN,nan:()=>AN,nanoid:()=>mR,nativeEnum:()=>nN,never:()=>yh,nonoptional:()=>O_,null:()=>B_,nullable:()=>np,nullish:()=>rN,number:()=>g_,object:()=>YR,optional:()=>tp,partialRecord:()=>VR,pipe:()=>th,prefault:()=>T_,preprocess:()=>yN,promise:()=>dN,readonly:()=>Z_,record:()=>F_,refine:()=>av,set:()=>tN,strictObject:()=>KR,string:()=>Xl,stringFormat:()=>DR,stringbool:()=>hN,success:()=>iN,superRefine:()=>ov,symbol:()=>HR,templateLiteral:()=>uN,transform:()=>Eh,tuple:()=>D_,uint32:()=>MR,uint64:()=>GR,ulid:()=>hR,undefined:()=>UR,union:()=>Ch,unknown:()=>ks,url:()=>lR,uuid:()=>sR,uuidv4:()=>cR,uuidv6:()=>uR,uuidv7:()=>dR,void:()=>OR,xid:()=>BR,xor:()=>WR});var Jb={};F(Jb,{endsWith:()=>_u,gt:()=>hr,gte:()=>ra,includes:()=>Qu,length:()=>Es,lowercase:()=>Eu,lt:()=>br,lte:()=>Ta,maxLength:()=>ws,maxSize:()=>bA,mime:()=>vu,minLength:()=>pi,minSize:()=>Br,multipleOf:()=>fA,negative:()=>Gb,nonnegative:()=>Ub,nonpositive:()=>Hb,normalize:()=>xu,overwrite:()=>No,positive:()=>Pb,property:()=>Tb,regex:()=>wu,size:()=>Cs,slugify:()=>Lu,startsWith:()=>Iu,toLowerCase:()=>Fu,toUpperCase:()=>Su,trim:()=>Du,uppercase:()=>ku});var $u={};F($u,{ZodISODate:()=>Zb,ZodISODateTime:()=>Wb,ZodISODuration:()=>Xb,ZodISOTime:()=>Vb,date:()=>VI,datetime:()=>ZI,duration:()=>e_,time:()=>XI});var Wb=I("ZodISODateTime",(e,t)=>{v0.init(e,t),et.init(e,t)});function ZI(e){return SQ(Wb,e)}var Zb=I("ZodISODate",(e,t)=>{x0.init(e,t),et.init(e,t)});function VI(e){return LQ(Zb,e)}var Vb=I("ZodISOTime",(e,t)=>{D0.init(e,t),et.init(e,t)});function XI(e){return RQ(Vb,e)}var Xb=I("ZodISODuration",(e,t)=>{F0.init(e,t),et.init(e,t)});function e_(e){return NQ(Xb,e)}var oR=(e,t)=>{Pl.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Hl(e,n)},flatten:{value:n=>Gl(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,pu,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,pu,2)}},isEmpty:{get(){return e.issues.length===0}}})},ree=I("ZodError",oR),Qa=I("ZodError",oR,{Parent:Error});var t_=fu(Qa),n_=bu(Qa),a_=hu(Qa),o_=Bu(Qa),r_=Yf(Qa),i_=Kf(Qa),A_=Jf(Qa),s_=Wf(Qa),c_=Zf(Qa),u_=Vf(Qa),d_=Xf(Qa),l_=eb(Qa);var rR=new WeakMap;function ap(e,t,n){let o=Object.getPrototypeOf(e),a=rR.get(o);if(a||(a=new Set,rR.set(o,a)),!a.has(t)){a.add(t);for(let r in n){let i=n[r];Object.defineProperty(o,r,{configurable:!0,enumerable:!1,get(){let A=i.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!0,value:A}),A},set(A){Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!0,value:A})}})}}}var ge=I("ZodType",(e,t)=>(ie.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Nu(e,"input"),output:Nu(e,"output")}}),e.toJSONSchema=pI(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>t_(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>a_(e,n,o),e.parseAsync=async(n,o)=>n_(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>o_(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>r_(e,n,o),e.decode=(n,o)=>i_(e,n,o),e.encodeAsync=async(n,o)=>A_(e,n,o),e.decodeAsync=async(n,o)=>s_(e,n,o),e.safeEncode=(n,o)=>c_(e,n,o),e.safeDecode=(n,o)=>u_(e,n,o),e.safeEncodeAsync=async(n,o)=>d_(e,n,o),e.safeDecodeAsync=async(n,o)=>l_(e,n,o),ap(e,"ZodType",{check(...n){let o=this.def;return this.clone(j.mergeDefs(o,{checks:[...o.checks??[],...n.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return aa(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(av(n,o))},superRefine(n,o){return this.check(ov(n,o))},overwrite(n){return this.check(No(n))},optional(){return tp(this)},exactOptional(){return j_(this)},nullable(){return np(this)},nullish(){return tp(np(this))},nonoptional(n){return O_(this,n)},array(){return ip(this)},or(n){return Ch([this,n])},and(n){return v_(this,n)},transform(n){return th(this,Eh(n))},default(n){return H_(this,n)},prefault(n){return T_(this,n)},catch(n){return Y_(this,n)},pipe(n){return th(this,n)},readonly(){return Z_(this)},describe(n){let o=this.clone();return Nn.add(o,{description:n}),o},meta(...n){if(n.length===0)return Nn.get(this);let o=this.clone();return Nn.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Nn.get(e)?.description},configurable:!0}),e)),nh=I("_ZodString",(e,t)=>{ys.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(o,a,r)=>gI(e,o,a,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ap(e,"_ZodString",{regex(...o){return this.check(wu(...o))},includes(...o){return this.check(Qu(...o))},startsWith(...o){return this.check(Iu(...o))},endsWith(...o){return this.check(_u(...o))},min(...o){return this.check(pi(...o))},max(...o){return this.check(ws(...o))},length(...o){return this.check(Es(...o))},nonempty(...o){return this.check(pi(1,...o))},lowercase(o){return this.check(Eu(o))},uppercase(o){return this.check(ku(o))},trim(){return this.check(Du())},normalize(...o){return this.check(xu(...o))},toLowerCase(){return this.check(Fu())},toUpperCase(){return this.check(Su())},slugify(){return this.check(Lu())}})}),Pu=I("ZodString",(e,t)=>{ys.init(e,t),nh.init(e,t),e.email=n=>e.check(Bb(ah,n)),e.url=n=>e.check(Zl(op,n)),e.jwt=n=>e.check(jb(hh,n)),e.emoji=n=>e.check(kb(oh,n)),e.guid=n=>e.check(Wl(ep,n)),e.uuid=n=>e.check(yb(yr,n)),e.uuidv4=n=>e.check(Cb(yr,n)),e.uuidv6=n=>e.check(wb(yr,n)),e.uuidv7=n=>e.check(Eb(yr,n)),e.nanoid=n=>e.check(Qb(rh,n)),e.guid=n=>e.check(Wl(ep,n)),e.cuid=n=>e.check(Ib(ih,n)),e.cuid2=n=>e.check(_b(Ah,n)),e.ulid=n=>e.check(vb(sh,n)),e.base64=n=>e.check(Nb(mh,n)),e.base64url=n=>e.check($b(fh,n)),e.xid=n=>e.check(xb(ch,n)),e.ksuid=n=>e.check(Db(uh,n)),e.ipv4=n=>e.check(Fb(dh,n)),e.ipv6=n=>e.check(Sb(lh,n)),e.cidrv4=n=>e.check(Lb(ph,n)),e.cidrv6=n=>e.check(Rb(gh,n)),e.e164=n=>e.check(Mb(bh,n)),e.datetime=n=>e.check(ZI(n)),e.date=n=>e.check(VI(n)),e.time=n=>e.check(XI(n)),e.duration=n=>e.check(e_(n))});function Xl(e){return vQ(Pu,e)}var et=I("ZodStringFormat",(e,t)=>{Xe.init(e,t),nh.init(e,t)}),ah=I("ZodEmail",(e,t)=>{B0.init(e,t),et.init(e,t)});function iR(e){return Bb(ah,e)}var ep=I("ZodGUID",(e,t)=>{b0.init(e,t),et.init(e,t)});function AR(e){return Wl(ep,e)}var yr=I("ZodUUID",(e,t)=>{h0.init(e,t),et.init(e,t)});function sR(e){return yb(yr,e)}function cR(e){return Cb(yr,e)}function uR(e){return wb(yr,e)}function dR(e){return Eb(yr,e)}var op=I("ZodURL",(e,t)=>{y0.init(e,t),et.init(e,t)});function lR(e){return Zl(op,e)}function pR(e){return Zl(op,{protocol:Ua.httpProtocol,hostname:Ua.domain,...j.normalizeParams(e)})}var oh=I("ZodEmoji",(e,t)=>{C0.init(e,t),et.init(e,t)});function gR(e){return kb(oh,e)}var rh=I("ZodNanoID",(e,t)=>{w0.init(e,t),et.init(e,t)});function mR(e){return Qb(rh,e)}var ih=I("ZodCUID",(e,t)=>{E0.init(e,t),et.init(e,t)});function fR(e){return Ib(ih,e)}var Ah=I("ZodCUID2",(e,t)=>{k0.init(e,t),et.init(e,t)});function bR(e){return _b(Ah,e)}var sh=I("ZodULID",(e,t)=>{Q0.init(e,t),et.init(e,t)});function hR(e){return vb(sh,e)}var ch=I("ZodXID",(e,t)=>{I0.init(e,t),et.init(e,t)});function BR(e){return xb(ch,e)}var uh=I("ZodKSUID",(e,t)=>{_0.init(e,t),et.init(e,t)});function yR(e){return Db(uh,e)}var dh=I("ZodIPv4",(e,t)=>{S0.init(e,t),et.init(e,t)});function CR(e){return Fb(dh,e)}var p_=I("ZodMAC",(e,t)=>{R0.init(e,t),et.init(e,t)});function wR(e){return DQ(p_,e)}var lh=I("ZodIPv6",(e,t)=>{L0.init(e,t),et.init(e,t)});function ER(e){return Sb(lh,e)}var ph=I("ZodCIDRv4",(e,t)=>{N0.init(e,t),et.init(e,t)});function kR(e){return Lb(ph,e)}var gh=I("ZodCIDRv6",(e,t)=>{$0.init(e,t),et.init(e,t)});function QR(e){return Rb(gh,e)}var mh=I("ZodBase64",(e,t)=>{j0.init(e,t),et.init(e,t)});function IR(e){return Nb(mh,e)}var fh=I("ZodBase64URL",(e,t)=>{P0.init(e,t),et.init(e,t)});function _R(e){return $b(fh,e)}var bh=I("ZodE164",(e,t)=>{G0.init(e,t),et.init(e,t)});function vR(e){return Mb(bh,e)}var hh=I("ZodJWT",(e,t)=>{H0.init(e,t),et.init(e,t)});function xR(e){return jb(hh,e)}var Gu=I("ZodCustomStringFormat",(e,t)=>{U0.init(e,t),et.init(e,t)});function DR(e,t,n={}){return Ru(Gu,e,t,n)}function FR(e){return Ru(Gu,"hostname",Ua.hostname,e)}function SR(e){return Ru(Gu,"hex",Ua.hex,e)}function LR(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,a=Ua[o];if(!a)throw new Error(`Unrecognized hash format: ${o}`);return Ru(Gu,o,a,t)}var Hu=I("ZodNumber",(e,t)=>{cb.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(o,a,r)=>mI(e,o,a,r),ap(e,"ZodNumber",{gt(o,a){return this.check(hr(o,a))},gte(o,a){return this.check(ra(o,a))},min(o,a){return this.check(ra(o,a))},lt(o,a){return this.check(br(o,a))},lte(o,a){return this.check(Ta(o,a))},max(o,a){return this.check(Ta(o,a))},int(o){return this.check(eh(o))},safe(o){return this.check(eh(o))},positive(o){return this.check(hr(0,o))},nonnegative(o){return this.check(ra(0,o))},negative(o){return this.check(br(0,o))},nonpositive(o){return this.check(Ta(0,o))},multipleOf(o,a){return this.check(fA(o,a))},step(o,a){return this.check(fA(o,a))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function g_(e){return $Q(Hu,e)}var Qs=I("ZodNumberFormat",(e,t)=>{T0.init(e,t),Hu.init(e,t)});function eh(e){return jQ(Qs,e)}function RR(e){return PQ(Qs,e)}function NR(e){return GQ(Qs,e)}function $R(e){return HQ(Qs,e)}function MR(e){return UQ(Qs,e)}var Uu=I("ZodBoolean",(e,t)=>{ql.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>fI(e,n,o,a)});function m_(e){return TQ(Uu,e)}var Tu=I("ZodBigInt",(e,t)=>{ub.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(o,a,r)=>bI(e,o,a,r),e.gte=(o,a)=>e.check(ra(o,a)),e.min=(o,a)=>e.check(ra(o,a)),e.gt=(o,a)=>e.check(hr(o,a)),e.gte=(o,a)=>e.check(ra(o,a)),e.min=(o,a)=>e.check(ra(o,a)),e.lt=(o,a)=>e.check(br(o,a)),e.lte=(o,a)=>e.check(Ta(o,a)),e.max=(o,a)=>e.check(Ta(o,a)),e.positive=o=>e.check(hr(BigInt(0),o)),e.negative=o=>e.check(br(BigInt(0),o)),e.nonpositive=o=>e.check(Ta(BigInt(0),o)),e.nonnegative=o=>e.check(ra(BigInt(0),o)),e.multipleOf=(o,a)=>e.check(fA(o,a));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function jR(e){return qQ(Tu,e)}var Bh=I("ZodBigIntFormat",(e,t)=>{O0.init(e,t),Tu.init(e,t)});function PR(e){return YQ(Bh,e)}function GR(e){return KQ(Bh,e)}var f_=I("ZodSymbol",(e,t)=>{q0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>hI(e,n,o,a)});function HR(e){return JQ(f_,e)}var b_=I("ZodUndefined",(e,t)=>{z0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>yI(e,n,o,a)});function UR(e){return WQ(b_,e)}var h_=I("ZodNull",(e,t)=>{Y0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>BI(e,n,o,a)});function B_(e){return ZQ(h_,e)}var y_=I("ZodAny",(e,t)=>{K0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>EI(e,n,o,a)});function TR(){return VQ(y_)}var C_=I("ZodUnknown",(e,t)=>{J0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>kI(e,n,o,a)});function ks(){return XQ(C_)}var w_=I("ZodNever",(e,t)=>{W0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>wI(e,n,o,a)});function yh(e){return eI(w_,e)}var E_=I("ZodVoid",(e,t)=>{Z0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>CI(e,n,o,a)});function OR(e){return tI(E_,e)}var rp=I("ZodDate",(e,t)=>{V0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(o,a,r)=>QI(e,o,a,r),e.min=(o,a)=>e.check(ra(o,a)),e.max=(o,a)=>e.check(Ta(o,a));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function qR(e){return nI(rp,e)}var k_=I("ZodArray",(e,t)=>{X0.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>MI(e,n,o,a),e.element=t.element,ap(e,"ZodArray",{min(n,o){return this.check(pi(n,o))},nonempty(n){return this.check(pi(1,n))},max(n,o){return this.check(ws(n,o))},length(n,o){return this.check(Es(n,o))},unwrap(){return this.element}})});function ip(e,t){return rI(k_,e,t)}function zR(e){let t=e._zod.def.shape;return wh(Object.keys(t))}var Ap=I("ZodObject",(e,t)=>{eQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>jI(e,n,o,a),j.defineLazy(e,"shape",()=>t.shape),ap(e,"ZodObject",{keyof(){return wh(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:ks()})},loose(){return this.clone({...this._zod.def,catchall:ks()})},strict(){return this.clone({...this._zod.def,catchall:yh()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return j.extend(this,n)},safeExtend(n){return j.safeExtend(this,n)},merge(n){return j.merge(this,n)},pick(n){return j.pick(this,n)},omit(n){return j.omit(this,n)},partial(...n){return j.partial(kh,this,n[0])},required(...n){return j.required(Qh,this,n[0])}})});function YR(e,t){let n={type:"object",shape:e??{},...j.normalizeParams(t)};return new Ap(n)}function KR(e,t){return new Ap({type:"object",shape:e,catchall:yh(),...j.normalizeParams(t)})}function JR(e,t){return new Ap({type:"object",shape:e,catchall:ks(),...j.normalizeParams(t)})}var sp=I("ZodUnion",(e,t)=>{zl.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>qb(e,n,o,a),e.options=t.options});function Ch(e,t){return new sp({type:"union",options:e,...j.normalizeParams(t)})}var Q_=I("ZodXor",(e,t)=>{sp.init(e,t),tQ.init(e,t),e._zod.processJSONSchema=(n,o,a)=>qb(e,n,o,a),e.options=t.options});function WR(e,t){return new Q_({type:"union",options:e,inclusive:!1,...j.normalizeParams(t)})}var I_=I("ZodDiscriminatedUnion",(e,t)=>{sp.init(e,t),nQ.init(e,t)});function ZR(e,t,n){return new I_({type:"union",options:t,discriminator:e,...j.normalizeParams(n)})}var __=I("ZodIntersection",(e,t)=>{aQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>PI(e,n,o,a)});function v_(e,t){return new __({type:"intersection",left:e,right:t})}var x_=I("ZodTuple",(e,t)=>{db.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>GI(e,n,o,a),e.rest=n=>e.clone({...e._zod.def,rest:n})});function D_(e,t,n){let o=t instanceof ie,a=o?n:t,r=o?t:null;return new x_({type:"tuple",items:e,rest:r,...j.normalizeParams(a)})}var Mu=I("ZodRecord",(e,t)=>{oQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>HI(e,n,o,a),e.keyType=t.keyType,e.valueType=t.valueType});function F_(e,t,n){return!t||!t._zod?new Mu({type:"record",keyType:Xl(),valueType:e,...j.normalizeParams(t)}):new Mu({type:"record",keyType:e,valueType:t,...j.normalizeParams(n)})}function VR(e,t,n){let o=aa(e);return o._zod.values=void 0,new Mu({type:"record",keyType:o,valueType:t,...j.normalizeParams(n)})}function XR(e,t,n){return new Mu({type:"record",keyType:e,valueType:t,mode:"loose",...j.normalizeParams(n)})}var S_=I("ZodMap",(e,t)=>{rQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>NI(e,n,o,a),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Br(...n)),e.nonempty=n=>e.check(Br(1,n)),e.max=(...n)=>e.check(bA(...n)),e.size=(...n)=>e.check(Cs(...n))});function eN(e,t,n){return new S_({type:"map",keyType:e,valueType:t,...j.normalizeParams(n)})}var L_=I("ZodSet",(e,t)=>{iQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>$I(e,n,o,a),e.min=(...n)=>e.check(Br(...n)),e.nonempty=n=>e.check(Br(1,n)),e.max=(...n)=>e.check(bA(...n)),e.size=(...n)=>e.check(Cs(...n))});function tN(e,t){return new L_({type:"set",valueType:e,...j.normalizeParams(t)})}var ju=I("ZodEnum",(e,t)=>{AQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(o,a,r)=>II(e,o,a,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,a)=>{let r={};for(let i of o)if(n.has(i))r[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new ju({...t,checks:[],...j.normalizeParams(a),entries:r})},e.exclude=(o,a)=>{let r={...t.entries};for(let i of o)if(n.has(i))delete r[i];else throw new Error(`Key ${i} not found in enum`);return new ju({...t,checks:[],...j.normalizeParams(a),entries:r})}});function wh(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ju({type:"enum",entries:n,...j.normalizeParams(t)})}function nN(e,t){return new ju({type:"enum",entries:e,...j.normalizeParams(t)})}var R_=I("ZodLiteral",(e,t)=>{sQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>_I(e,n,o,a),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 aN(e,t){return new R_({type:"literal",values:Array.isArray(e)?e:[e],...j.normalizeParams(t)})}var N_=I("ZodFile",(e,t)=>{cQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>DI(e,n,o,a),e.min=(n,o)=>e.check(Br(n,o)),e.max=(n,o)=>e.check(bA(n,o)),e.mime=(n,o)=>e.check(vu(Array.isArray(n)?n:[n],o))});function oN(e){return iI(N_,e)}var $_=I("ZodTransform",(e,t)=>{uQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>RI(e,n,o,a),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new dA(e.constructor.name);n.addIssue=r=>{if(typeof r=="string")n.issues.push(j.issue(r,n.value,t));else{let i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(j.issue(i))}};let a=t.transform(n.value,n);return a instanceof Promise?a.then(r=>(n.value=r,n.fallback=!0,n)):(n.value=a,n.fallback=!0,n)}});function Eh(e){return new $_({type:"transform",transform:e})}var kh=I("ZodOptional",(e,t)=>{lb.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>zb(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function tp(e){return new kh({type:"optional",innerType:e})}var M_=I("ZodExactOptional",(e,t)=>{dQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>zb(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function j_(e){return new M_({type:"optional",innerType:e})}var P_=I("ZodNullable",(e,t)=>{lQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>UI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function np(e){return new P_({type:"nullable",innerType:e})}function rN(e){return tp(np(e))}var G_=I("ZodDefault",(e,t)=>{pQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>OI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function H_(e,t){return new G_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():j.shallowClone(t)}})}var U_=I("ZodPrefault",(e,t)=>{gQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>qI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function T_(e,t){return new U_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():j.shallowClone(t)}})}var Qh=I("ZodNonOptional",(e,t)=>{mQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>TI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function O_(e,t){return new Qh({type:"nonoptional",innerType:e,...j.normalizeParams(t)})}var q_=I("ZodSuccess",(e,t)=>{fQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>FI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function iN(e){return new q_({type:"success",innerType:e})}var z_=I("ZodCatch",(e,t)=>{bQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>zI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Y_(e,t){return new z_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var K_=I("ZodNaN",(e,t)=>{hQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>vI(e,n,o,a)});function AN(e){return oI(K_,e)}var cp=I("ZodPipe",(e,t)=>{pb.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>YI(e,n,o,a),e.in=t.in,e.out=t.out});function th(e,t){return new cp({type:"pipe",in:e,out:t})}var up=I("ZodCodec",(e,t)=>{cp.init(e,t),Yl.init(e,t)});function sN(e,t,n){return new up({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function cN(e){let t=e._zod.def;return new up({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var J_=I("ZodPreprocess",(e,t)=>{cp.init(e,t),BQ.init(e,t)}),W_=I("ZodReadonly",(e,t)=>{yQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>KI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function Z_(e){return new W_({type:"readonly",innerType:e})}var V_=I("ZodTemplateLiteral",(e,t)=>{CQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>xI(e,n,o,a)});function uN(e,t){return new V_({type:"template_literal",parts:e,...j.normalizeParams(t)})}var X_=I("ZodLazy",(e,t)=>{kQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>WI(e,n,o,a),e.unwrap=()=>e._zod.def.getter()});function ev(e){return new X_({type:"lazy",getter:e})}var tv=I("ZodPromise",(e,t)=>{EQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>JI(e,n,o,a),e.unwrap=()=>e._zod.def.innerType});function dN(e){return new tv({type:"promise",innerType:e})}var nv=I("ZodFunction",(e,t)=>{wQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>LI(e,n,o,a)});function lN(e){return new nv({type:"function",input:Array.isArray(e?.input)?D_(e?.input):e?.input??ip(ks()),output:e?.output??ks()})}var dp=I("ZodCustom",(e,t)=>{QQ.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,a)=>SI(e,n,o,a)});function pN(e){let t=new ot({check:"custom"});return t._zod.check=e,t}function gN(e,t){return AI(dp,e??(()=>!0),t)}function av(e,t={}){return sI(dp,e,t)}function ov(e,t){return cI(e,t)}var mN=uI,fN=dI;function bN(e,t={}){let n=new dp({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...j.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}var hN=(...e)=>lI({Codec:up,Boolean:Uu,String:Pu},...e);function BN(e){let t=ev(()=>Ch([Xl(e),g_(),m_(),B_(),ip(t),F_(Xl(),t)]));return t}function yN(e,t){return new J_({type:"pipe",in:Eh(e),out:t})}var Aee={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 see(e){Ut({customError:e})}function cee(){return Ut().customError}var rv;rv||(rv={});var K={...Vl,...Jb,iso:$u},uee=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 dee(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function lee(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let a=n[1];if(!a||!t.defs[a])throw new Error(`Reference not found: ${e}`);return t.defs[a]}throw new Error(`Reference not found: ${e}`)}function CN(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return K.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 a=e.$ref;if(t.refs.has(a))return t.refs.get(a);if(t.processing.has(a))return K.lazy(()=>{if(!t.refs.has(a))throw new Error(`Circular reference not resolved: ${a}`);return t.refs.get(a)});t.processing.add(a);let r=lee(a,t),i=zn(r,t);return t.refs.set(a,i),t.processing.delete(a),i}if(e.enum!==void 0){let a=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&a.length===1&&a[0]===null)return K.null();if(a.length===0)return K.never();if(a.length===1)return K.literal(a[0]);if(a.every(i=>typeof i=="string"))return K.enum(a);let r=a.map(i=>K.literal(i));return r.length<2?r[0]:K.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return K.literal(e.const);let n=e.type;if(Array.isArray(n)){let a=n.map(r=>{let i={...e,type:r};return CN(i,t)});return a.length===0?K.never():a.length===1?a[0]:K.union(a)}if(!n)return K.any();let o;switch(n){case"string":{let a=K.string();if(e.format){let r=e.format;r==="email"?a=a.check(K.email()):r==="uri"||r==="uri-reference"?a=a.check(K.url()):r==="uuid"||r==="guid"?a=a.check(K.uuid()):r==="date-time"?a=a.check(K.iso.datetime()):r==="date"?a=a.check(K.iso.date()):r==="time"?a=a.check(K.iso.time()):r==="duration"?a=a.check(K.iso.duration()):r==="ipv4"?a=a.check(K.ipv4()):r==="ipv6"?a=a.check(K.ipv6()):r==="mac"?a=a.check(K.mac()):r==="cidr"?a=a.check(K.cidrv4()):r==="cidr-v6"?a=a.check(K.cidrv6()):r==="base64"?a=a.check(K.base64()):r==="base64url"?a=a.check(K.base64url()):r==="e164"?a=a.check(K.e164()):r==="jwt"?a=a.check(K.jwt()):r==="emoji"?a=a.check(K.emoji()):r==="nanoid"?a=a.check(K.nanoid()):r==="cuid"?a=a.check(K.cuid()):r==="cuid2"?a=a.check(K.cuid2()):r==="ulid"?a=a.check(K.ulid()):r==="xid"?a=a.check(K.xid()):r==="ksuid"&&(a=a.check(K.ksuid()))}typeof e.minLength=="number"&&(a=a.min(e.minLength)),typeof e.maxLength=="number"&&(a=a.max(e.maxLength)),e.pattern&&(a=a.regex(new RegExp(e.pattern))),o=a;break}case"number":case"integer":{let a=n==="integer"?K.number().int():K.number();typeof e.minimum=="number"&&(a=a.min(e.minimum)),typeof e.maximum=="number"&&(a=a.max(e.maximum)),typeof e.exclusiveMinimum=="number"?a=a.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(a=a.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?a=a.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(a=a.lt(e.maximum)),typeof e.multipleOf=="number"&&(a=a.multipleOf(e.multipleOf)),o=a;break}case"boolean":{o=K.boolean();break}case"null":{o=K.null();break}case"object":{let a={},r=e.properties||{},i=new Set(e.required||[]);for(let[s,c]of Object.entries(r)){let u=zn(c,t);a[s]=i.has(s)?u:u.optional()}if(e.propertyNames){let s=zn(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?zn(e.additionalProperties,t):K.any();if(Object.keys(a).length===0){o=K.record(s,c);break}let u=K.object(a).passthrough(),l=K.looseRecord(s,c);o=K.intersection(u,l);break}if(e.patternProperties){let s=e.patternProperties,c=Object.keys(s),u=[];for(let p of c){let g=zn(s[p],t),m=K.string().regex(new RegExp(p));u.push(K.looseRecord(m,g))}let l=[];if(Object.keys(a).length>0&&l.push(K.object(a).passthrough()),l.push(...u),l.length===0)o=K.object({}).passthrough();else if(l.length===1)o=l[0];else{let p=K.intersection(l[0],l[1]);for(let g=2;g<l.length;g++)p=K.intersection(p,l[g]);o=p}break}let A=K.object(a);e.additionalProperties===!1?o=A.strict():typeof e.additionalProperties=="object"?o=A.catchall(zn(e.additionalProperties,t)):o=A.passthrough();break}case"array":{let a=e.prefixItems,r=e.items;if(a&&Array.isArray(a)){let i=a.map(s=>zn(s,t)),A=r&&typeof r=="object"&&!Array.isArray(r)?zn(r,t):void 0;A?o=K.tuple(i).rest(A):o=K.tuple(i),typeof e.minItems=="number"&&(o=o.check(K.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(K.maxLength(e.maxItems)))}else if(Array.isArray(r)){let i=r.map(s=>zn(s,t)),A=e.additionalItems&&typeof e.additionalItems=="object"?zn(e.additionalItems,t):void 0;A?o=K.tuple(i).rest(A):o=K.tuple(i),typeof e.minItems=="number"&&(o=o.check(K.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(K.maxLength(e.maxItems)))}else if(r!==void 0){let i=zn(r,t),A=K.array(i);typeof e.minItems=="number"&&(A=A.min(e.minItems)),typeof e.maxItems=="number"&&(A=A.max(e.maxItems)),o=A}else o=K.array(K.any());break}default:throw new Error(`Unsupported type: ${n}`)}return o}function zn(e,t){if(typeof e=="boolean")return e?K.any():K.never();let n=CN(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let A=e.anyOf.map(c=>zn(c,t)),s=K.union(A);n=o?K.intersection(n,s):s}if(e.oneOf&&Array.isArray(e.oneOf)){let A=e.oneOf.map(c=>zn(c,t)),s=K.xor(A);n=o?K.intersection(n,s):s}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:K.any();else{let A=o?n:zn(e.allOf[0],t),s=o?0:1;for(let c=s;c<e.allOf.length;c++)A=K.intersection(A,zn(e.allOf[c],t));n=A}e.nullable===!0&&t.version==="openapi-3.0"&&(n=K.nullable(n)),e.readOnly===!0&&(n=K.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let a={},r=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let A of r)A in e&&(a[A]=e[A]);let i=["contentEncoding","contentMediaType","contentSchema"];for(let A of i)A in e&&(a[A]=e[A]);for(let A of Object.keys(e))uee.has(A)||(a[A]=e[A]);return Object.keys(a).length>0&&t.registry.add(n,a),e.description&&(n=n.describe(e.description)),n}function wN(e,t){if(typeof e=="boolean")return e?K.any():K.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=dee(n,t?.defaultTarget),a=n.$defs||n.definitions||{},r={version:o,defs:a,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Nn};return zn(n,r)}var iv={};F(iv,{bigint:()=>fee,boolean:()=>mee,date:()=>bee,number:()=>gee,string:()=>pee});function pee(e){return xQ(Pu,e)}function gee(e){return MQ(Hu,e)}function mee(e){return OQ(Uu,e)}function fee(e){return zQ(Tu,e)}function bee(e){return aI(rp,e)}Ut(gb());var hee=d.object({input:d.number().finite().nonnegative().optional(),output:d.number().finite().nonnegative().optional(),cacheRead:d.number().finite().nonnegative().optional(),cacheWrite:d.number().finite().nonnegative().optional(),total:d.number().finite().nonnegative().optional()}).strict(),EN=d.object({inputTokens:d.number().int().nonnegative().optional(),outputTokens:d.number().int().nonnegative().optional(),cachedInputTokens:d.number().int().nonnegative().optional(),cacheCreationTokens:d.number().int().nonnegative().optional(),reasoningTokens:d.number().int().nonnegative().optional(),totalTokens:d.number().int().nonnegative().optional(),cost:hee.optional()}).strict();var _=Symbol.for("drizzle:entityKind");function dn(e,t){if(!e||typeof e!="object")return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,_))throw new Error(`Class "${t.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(_ in n&&n[_]===t[_])return!0;n=Object.getPrototypeOf(n)}return!1}var Is=class{constructor(t,n){this.table=t,this.config=n,this.name=n.name,this.keyAsName=n.keyAsName,this.notNull=n.notNull,this.default=n.default,this.defaultFn=n.defaultFn,this.onUpdateFn=n.onUpdateFn,this.hasDefault=n.hasDefault,this.primary=n.primaryKey,this.isUnique=n.isUnique,this.uniqueName=n.uniqueName,this.uniqueType=n.uniqueType,this.dataType=n.dataType,this.columnType=n.columnType,this.generated=n.generated,this.generatedIdentity=n.generatedIdentity}static[_]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}};var Ih=class{static[_]="ColumnBuilder";config;constructor(t,n,o){this.config={name:t,keyAsName:t==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:n,columnType:o,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(t){return this.config.default=t,this.config.hasDefault=!0,this}$defaultFn(t){return this.config.defaultFn=t,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(t){return this.config.onUpdateFn=t,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(t){this.config.name===""&&(this.config.name=t)}};var mi=Symbol.for("drizzle:Name");var _h=class{static[_]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor(t,n){this.reference=()=>{let{name:o,columns:a,foreignColumns:r}=t();return{name:o,columns:a,foreignTable:r[0].table,foreignColumns:r}},n&&(this._onUpdate=n.onUpdate,this._onDelete=n.onDelete)}onUpdate(t){return this._onUpdate=t===void 0?"no action":t,this}onDelete(t){return this._onDelete=t===void 0?"no action":t,this}build(t){return new Av(t,this)}},Av=class{constructor(t,n){this.table=t,this.reference=n.reference,this.onUpdate=n._onUpdate,this.onDelete=n._onDelete}static[_]="PgForeignKey";reference;onUpdate;onDelete;getName(){let{name:t,columns:n,foreignColumns:o}=this.reference(),a=n.map(A=>A.name),r=o.map(A=>A.name),i=[this.table[mi],...a,o[0].table[mi],...r];return t??`${i.join("_")}_fk`}};function vh(e,...t){return e(...t)}function uv(e,t){return`${e[mi]}_${t.join("_")}_unique`}var sv=class{constructor(t,n){this.name=n,this.columns=t}static[_]="PgUniqueConstraintBuilder";columns;nullsNotDistinctConfig=!1;nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(t){return new cv(t,this.columns,this.nullsNotDistinctConfig,this.name)}},kN=class{static[_]="PgUniqueOnConstraintBuilder";name;constructor(t){this.name=t}on(...t){return new sv(t,this.name)}},cv=class{constructor(t,n,o,a){this.table=t,this.columns=n,this.name=a??uv(this.table,this.columns.map(r=>r.name)),this.nullsNotDistinct=o}static[_]="PgUniqueConstraint";columns;name;nullsNotDistinct=!1;getName(){return this.name}};function QN(e,t,n){for(let o=t;o<e.length;o++){let a=e[o];if(a==="\\"){o++;continue}if(a==='"')return[e.slice(t,o).replace(/\\/g,""),o+1];if(!n&&(a===","||a==="}"))return[e.slice(t,o).replace(/\\/g,""),o]}return[e.slice(t).replace(/\\/g,""),e.length]}function IN(e,t=0){let n=[],o=t,a=!1;for(;o<e.length;){let r=e[o];if(r===","){(a||o===t)&&n.push(""),a=!0,o++;continue}if(a=!1,r==="\\"){o+=2;continue}if(r==='"'){let[s,c]=QN(e,o+1,!0);n.push(s),o=c;continue}if(r==="}")return[n,o+1];if(r==="{"){let[s,c]=IN(e,o+1);n.push(s),o=c;continue}let[i,A]=QN(e,o,!1);n.push(i),o=A}return[n,o]}function _N(e){let[t]=IN(e,1);return t}function dv(e){return`{${e.map(t=>Array.isArray(t)?dv(t):typeof t=="string"?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}var Z=class extends Ih{foreignKeyConfigs=[];static[_]="PgColumnBuilder";array(t){return new pv(this.config.name,this,t)}references(t,n={}){return this.foreignKeyConfigs.push({ref:t,actions:n}),this}unique(t,n){return this.config.isUnique=!0,this.config.uniqueName=t,this.config.uniqueType=n?.nulls,this}generatedAlwaysAs(t){return this.config.generated={as:t,type:"always",mode:"stored"},this}buildForeignKeys(t,n){return this.foreignKeyConfigs.map(({ref:o,actions:a})=>vh((r,i)=>{let A=new _h(()=>{let s=r();return{columns:[t],foreignColumns:[s]}});return i.onUpdate&&A.onUpdate(i.onUpdate),i.onDelete&&A.onDelete(i.onDelete),A.build(n)},o,a))}buildExtraConfigColumn(t){return new lv(t,this.config)}},z=class extends Is{constructor(t,n){n.uniqueName||(n.uniqueName=uv(t,[n.name])),super(t,n),this.table=t}static[_]="PgColumn"},lv=class extends z{static[_]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(t){return this.indexConfig.opClass=t,this}},Ou=class{static[_]="IndexedColumn";constructor(t,n,o,a){this.name=t,this.keyAsName=n,this.type=o,this.indexConfig=a}name;keyAsName;type;indexConfig},pv=class extends Z{static[_]="PgArrayBuilder";constructor(t,n,o){super(t,"array","PgArray"),this.config.baseBuilder=n,this.config.size=o}build(t){let n=this.config.baseBuilder.build(t);return new gv(t,this.config,n)}},gv=class e extends z{constructor(t,n,o,a){super(t,n),this.baseColumn=o,this.range=a,this.size=n.size}size;static[_]="PgArray";getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size=="number"?this.size:""}]`}mapFromDriverValue(t){return typeof t=="string"&&(t=_N(t)),t.map(n=>this.baseColumn.mapFromDriverValue(n))}mapToDriverValue(t,n=!1){let o=t.map(a=>a===null?null:dn(this.baseColumn,e)?this.baseColumn.mapToDriverValue(a,!0):this.baseColumn.mapToDriverValue(a));return n?o:dv(o)}};var vN=class extends Z{static[_]="PgEnumObjectColumnBuilder";constructor(t,n){super(t,"string","PgEnumObjectColumn"),this.config.enum=n}build(t){return new mv(t,this.config)}},mv=class extends z{static[_]="PgEnumObjectColumn";enum;enumValues=this.config.enum.enumValues;constructor(t,n){super(t,n),this.enum=n.enum}getSQLType(){return this.enum.enumName}},xN=Symbol.for("drizzle:isPgEnum");function FN(e){return!!e&&typeof e=="function"&&xN in e&&e[xN]===!0}var DN=class extends Z{static[_]="PgEnumColumnBuilder";constructor(t,n){super(t,"string","PgEnumColumn"),this.config.enum=n}build(t){return new fv(t,this.config)}},fv=class extends z{static[_]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor(t,n){super(t,n),this.enum=n.enum}getSQLType(){return this.enum.enumName}};var qu=class{static[_]="Subquery";constructor(t,n,o,a=!1,r=[]){this._={brand:"Subquery",sql:t,selectedFields:n,alias:o,isWith:a,usedTables:r}}},SN=class extends qu{static[_]="WithSubquery"};var LN="0.45.2";var bv,hv,RN={startActiveSpan(e,t){return bv?(hv||(hv=bv.trace.getTracer("drizzle-orm",LN)),vh((n,o)=>o.startActiveSpan(e,a=>{try{return t(a)}catch(r){throw a.setStatus({code:n.SpanStatusCode.ERROR,message:r instanceof Error?r.message:"Unknown error"}),r}finally{a.end()}}),bv,hv)):t()}};var zu=Symbol.for("drizzle:ViewBaseConfig");var Bv=Symbol.for("drizzle:Schema"),NN=Symbol.for("drizzle:Columns"),$N=Symbol.for("drizzle:ExtraConfigColumns"),yv=Symbol.for("drizzle:OriginalName"),Cv=Symbol.for("drizzle:BaseName"),lp=Symbol.for("drizzle:IsAlias"),MN=Symbol.for("drizzle:ExtraConfigBuilder"),Bee=Symbol.for("drizzle:IsDrizzleTable"),Zt=class{static[_]="Table";static Symbol={Name:mi,Schema:Bv,OriginalName:yv,Columns:NN,ExtraConfigColumns:$N,BaseName:Cv,IsAlias:lp,ExtraConfigBuilder:MN};[mi];[yv];[Bv];[NN];[$N];[Cv];[lp]=!1;[Bee]=!0;[MN]=void 0;constructor(t,n,o){this[mi]=this[yv]=t,this[Bv]=n,this[Cv]=o}};var jN=class{static[_]="FakePrimitiveParam"};function yee(e){return e!=null&&typeof e.getSQL=="function"}function Cee(e){let t={sql:"",params:[]};for(let n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var Oa=class{static[_]="StringChunk";value;constructor(t){this.value=Array.isArray(t)?t:[t]}getSQL(){return new Vt([this])}},Vt=class e{constructor(t){this.queryChunks=t;for(let n of t)if(dn(n,Zt)){let o=n[Zt.Symbol.Schema];this.usedTables.push(o===void 0?n[Zt.Symbol.Name]:o+"."+n[Zt.Symbol.Name])}}static[_]="SQL";decoder=PN;shouldInlineParams=!1;usedTables=[];append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return RN.startActiveSpan("drizzle.buildSQL",n=>{let o=this.buildQueryFromSourceParams(this.queryChunks,t);return n?.setAttributes({"drizzle.query.text":o.sql,"drizzle.query.params":JSON.stringify(o.params)}),o})}buildQueryFromSourceParams(t,n){let o=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:a,escapeName:r,escapeParam:i,prepareTyping:A,inlineParams:s,paramStartIndex:c}=o;return Cee(t.map(u=>{if(dn(u,Oa))return{sql:u.value.join(""),params:[]};if(dn(u,pp))return{sql:r(u.value),params:[]};if(u===void 0)return{sql:"",params:[]};if(Array.isArray(u)){let l=[new Oa("(")];for(let[p,g]of u.entries())l.push(g),p<u.length-1&&l.push(new Oa(", "));return l.push(new Oa(")")),this.buildQueryFromSourceParams(l,o)}if(dn(u,e))return this.buildQueryFromSourceParams(u.queryChunks,{...o,inlineParams:s||u.shouldInlineParams});if(dn(u,Zt)){let l=u[Zt.Symbol.Schema],p=u[Zt.Symbol.Name];return{sql:l===void 0||u[lp]?r(p):r(l)+"."+r(p),params:[]}}if(dn(u,Is)){let l=a.getColumnCasing(u);if(n.invokeSource==="indexes")return{sql:r(l),params:[]};let p=u.table[Zt.Symbol.Schema];return{sql:u.table[lp]||p===void 0?r(u.table[Zt.Symbol.Name])+"."+r(l):r(p)+"."+r(u.table[Zt.Symbol.Name])+"."+r(l),params:[]}}if(dn(u,wv)){let l=u[zu].schema,p=u[zu].name;return{sql:l===void 0||u[zu].isAlias?r(p):r(l)+"."+r(p),params:[]}}if(dn(u,xh)){if(dn(u.value,gp))return{sql:i(c.value++,u),params:[u],typings:["none"]};let l=u.value===null?null:u.encoder.mapToDriverValue(u.value);if(dn(l,e))return this.buildQueryFromSourceParams([l],o);if(s)return{sql:this.mapInlineParam(l,o),params:[]};let p=["none"];return A&&(p=[A(u.encoder)]),{sql:i(c.value++,l),params:[l],typings:p}}return dn(u,gp)?{sql:i(c.value++,u),params:[u],typings:["none"]}:dn(u,e.Aliased)&&u.fieldAlias!==void 0?{sql:r(u.fieldAlias),params:[]}:dn(u,qu)?u._.isWith?{sql:r(u._.alias),params:[]}:this.buildQueryFromSourceParams([new Oa("("),u._.sql,new Oa(") "),new pp(u._.alias)],o):FN(u)?u.schema?{sql:r(u.schema)+"."+r(u.enumName),params:[]}:{sql:r(u.enumName),params:[]}:yee(u)?u.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([u.getSQL()],o):this.buildQueryFromSourceParams([new Oa("("),u.getSQL(),new Oa(")")],o):s?{sql:this.mapInlineParam(u,o),params:[]}:{sql:i(c.value++,u),params:[u],typings:["none"]}}))}mapInlineParam(t,{escapeString:n}){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return t.toString();if(typeof t=="string")return n(t);if(typeof t=="object"){let o=t.toString();return n(o==="[object Object]"?JSON.stringify(t):o)}throw new Error("Unexpected param value: "+t)}getSQL(){return this}as(t){return t===void 0?this:new e.Aliased(this,t)}mapWith(t){return this.decoder=typeof t=="function"?{mapFromDriverValue:t}:t,this}inlineParams(){return this.shouldInlineParams=!0,this}if(t){return t?this:void 0}},pp=class{constructor(t){this.value=t}static[_]="Name";brand;getSQL(){return new Vt([this])}};var PN={mapFromDriverValue:e=>e},GN={mapToDriverValue:e=>e},eEe={...PN,...GN},xh=class{constructor(t,n=GN){this.value=t,this.encoder=n}static[_]="Param";brand;getSQL(){return new Vt([this])}};function Yu(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!=="")&&n.push(new Oa(e[0]));for(let[o,a]of t.entries())n.push(a,new Oa(e[o+1]));return new Vt(n)}(e=>{function t(){return new Vt([])}e.empty=t;function n(s){return new Vt(s)}e.fromList=n;function o(s){return new Vt([new Oa(s)])}e.raw=o;function a(s,c){let u=[];for(let[l,p]of s.entries())l>0&&c!==void 0&&u.push(c),u.push(p);return new Vt(u)}e.join=a;function r(s){return new pp(s)}e.identifier=r;function i(s){return new gp(s)}e.placeholder=i;function A(s,c){return new xh(s,c)}e.param=A})(Yu||(Yu={}));(e=>{class t{constructor(o,a){this.sql=o,this.fieldAlias=a}static[_]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(Vt||(Vt={}));var gp=class{constructor(t){this.name=t}static[_]="Placeholder";getSQL(){return new Vt([this])}};var wee=Symbol.for("drizzle:IsDrizzleView"),wv=class{static[_]="View";[zu];[wee]=!0;constructor({name:t,schema:n,selectedFields:o,query:a}){this[zu]={name:t,originalName:t,schema:n,selectedFields:o,query:a,isExisting:!a,isAlias:!1}}getSQL(){return new Vt([this])}};Is.prototype.getSQL=function(){return new Vt([this])};Zt.prototype.getSQL=function(){return new Vt([this])};qu.prototype.getSQL=function(){return new Vt([this])};function ve(e,t){return{name:typeof e=="string"&&e.length>0?e:"",config:typeof e=="object"?e:t}}var nEe=typeof TextDecoder>"u"?null:new TextDecoder;var fi=class extends Z{static[_]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(t){if(t){let{name:n,...o}=t;this.config.generatedIdentity={type:"always",sequenceName:n,sequenceOptions:o}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(t){if(t){let{name:n,...o}=t;this.config.generatedIdentity={type:"byDefault",sequenceName:n,sequenceOptions:o}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}};var Ev=class extends fi{static[_]="PgBigInt53Builder";constructor(t){super(t,"number","PgBigInt53")}build(t){return new kv(t,this.config)}},kv=class extends z{static[_]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},Qv=class extends fi{static[_]="PgBigInt64Builder";constructor(t){super(t,"bigint","PgBigInt64")}build(t){return new Iv(t,this.config)}},Iv=class extends z{static[_]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(t){return BigInt(t)}};function HN(e,t){let{name:n,config:o}=ve(e,t);return o.mode==="number"?new Ev(n):new Qv(n)}var _v=class extends Z{static[_]="PgBigSerial53Builder";constructor(t){super(t,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new vv(t,this.config)}},vv=class extends z{static[_]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},xv=class extends Z{static[_]="PgBigSerial64Builder";constructor(t){super(t,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(t){return new Dv(t,this.config)}},Dv=class extends z{static[_]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(t){return BigInt(t)}};function UN(e,t){let{name:n,config:o}=ve(e,t);return o.mode==="number"?new _v(n):new xv(n)}var Fv=class extends Z{static[_]="PgBooleanBuilder";constructor(t){super(t,"boolean","PgBoolean")}build(t){return new Sv(t,this.config)}},Sv=class extends z{static[_]="PgBoolean";getSQLType(){return"boolean"}};function TN(e){return new Fv(e??"")}var Lv=class extends Z{static[_]="PgCharBuilder";constructor(t,n){super(t,"string","PgChar"),this.config.length=n.length,this.config.enumValues=n.enum}build(t){return new Rv(t,this.config)}},Rv=class extends z{static[_]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"char":`char(${this.length})`}};function ON(e,t={}){let{name:n,config:o}=ve(e,t);return new Lv(n,o)}var Nv=class extends Z{static[_]="PgCidrBuilder";constructor(t){super(t,"string","PgCidr")}build(t){return new $v(t,this.config)}},$v=class extends z{static[_]="PgCidr";getSQLType(){return"cidr"}};function qN(e){return new Nv(e??"")}var Mv=class extends Z{static[_]="PgCustomColumnBuilder";constructor(t,n,o){super(t,"custom","PgCustomColumn"),this.config.fieldConfig=n,this.config.customTypeParams=o}build(t){return new jv(t,this.config)}},jv=class extends z{static[_]="PgCustomColumn";sqlName;mapTo;mapFrom;constructor(t,n){super(t,n),this.sqlName=n.customTypeParams.dataType(n.fieldConfig),this.mapTo=n.customTypeParams.toDriver,this.mapFrom=n.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(t){return typeof this.mapFrom=="function"?this.mapFrom(t):t}mapToDriverValue(t){return typeof this.mapTo=="function"?this.mapTo(t):t}};function zN(e){return(t,n)=>{let{name:o,config:a}=ve(t,n);return new Mv(o,a,e)}}var Cr=class extends Z{static[_]="PgDateColumnBaseBuilder";defaultNow(){return this.default(Yu`now()`)}};var Pv=class extends Cr{static[_]="PgDateBuilder";constructor(t){super(t,"date","PgDate")}build(t){return new Gv(t,this.config)}},Gv=class extends z{static[_]="PgDate";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?new Date(t):t}mapToDriverValue(t){return t.toISOString()}},Hv=class extends Cr{static[_]="PgDateStringBuilder";constructor(t){super(t,"string","PgDateString")}build(t){return new Uv(t,this.config)}},Uv=class extends z{static[_]="PgDateString";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?t:t.toISOString().slice(0,-14)}};function YN(e,t){let{name:n,config:o}=ve(e,t);return o?.mode==="date"?new Pv(n):new Hv(n)}var Tv=class extends Z{static[_]="PgDoublePrecisionBuilder";constructor(t){super(t,"number","PgDoublePrecision")}build(t){return new Ov(t,this.config)}},Ov=class extends z{static[_]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(t){return typeof t=="string"?Number.parseFloat(t):t}};function KN(e){return new Tv(e??"")}var qv=class extends Z{static[_]="PgInetBuilder";constructor(t){super(t,"string","PgInet")}build(t){return new zv(t,this.config)}},zv=class extends z{static[_]="PgInet";getSQLType(){return"inet"}};function JN(e){return new qv(e??"")}var Yv=class extends fi{static[_]="PgIntegerBuilder";constructor(t){super(t,"number","PgInteger")}build(t){return new Kv(t,this.config)}},Kv=class extends z{static[_]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(t){return typeof t=="string"?Number.parseInt(t):t}};function WN(e){return new Yv(e??"")}var Jv=class extends Z{static[_]="PgIntervalBuilder";constructor(t,n){super(t,"string","PgInterval"),this.config.intervalConfig=n}build(t){return new Wv(t,this.config)}},Wv=class extends z{static[_]="PgInterval";fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){let t=this.fields?` ${this.fields}`:"",n=this.precision?`(${this.precision})`:"";return`interval${t}${n}`}};function ZN(e,t={}){let{name:n,config:o}=ve(e,t);return new Jv(n,o)}var Zv=class extends Z{static[_]="PgJsonBuilder";constructor(t){super(t,"json","PgJson")}build(t){return new Vv(t,this.config)}},Vv=class extends z{static[_]="PgJson";constructor(t,n){super(t,n)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}};function VN(e){return new Zv(e??"")}var Xv=class extends Z{static[_]="PgJsonbBuilder";constructor(t){super(t,"json","PgJsonb")}build(t){return new ex(t,this.config)}},ex=class extends z{static[_]="PgJsonb";constructor(t,n){super(t,n)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}};function Dh(e){return new Xv(e??"")}var tx=class extends Z{static[_]="PgLineBuilder";constructor(t){super(t,"array","PgLine")}build(t){return new nx(t,this.config)}},nx=class extends z{static[_]="PgLine";getSQLType(){return"line"}mapFromDriverValue(t){let[n,o,a]=t.slice(1,-1).split(",");return[Number.parseFloat(n),Number.parseFloat(o),Number.parseFloat(a)]}mapToDriverValue(t){return`{${t[0]},${t[1]},${t[2]}}`}},ax=class extends Z{static[_]="PgLineABCBuilder";constructor(t){super(t,"json","PgLineABC")}build(t){return new ox(t,this.config)}},ox=class extends z{static[_]="PgLineABC";getSQLType(){return"line"}mapFromDriverValue(t){let[n,o,a]=t.slice(1,-1).split(",");return{a:Number.parseFloat(n),b:Number.parseFloat(o),c:Number.parseFloat(a)}}mapToDriverValue(t){return`{${t.a},${t.b},${t.c}}`}};function XN(e,t){let{name:n,config:o}=ve(e,t);return!o?.mode||o.mode==="tuple"?new tx(n):new ax(n)}var rx=class extends Z{static[_]="PgMacaddrBuilder";constructor(t){super(t,"string","PgMacaddr")}build(t){return new ix(t,this.config)}},ix=class extends z{static[_]="PgMacaddr";getSQLType(){return"macaddr"}};function e$(e){return new rx(e??"")}var Ax=class extends Z{static[_]="PgMacaddr8Builder";constructor(t){super(t,"string","PgMacaddr8")}build(t){return new sx(t,this.config)}},sx=class extends z{static[_]="PgMacaddr8";getSQLType(){return"macaddr8"}};function t$(e){return new Ax(e??"")}var cx=class extends Z{static[_]="PgNumericBuilder";constructor(t,n,o){super(t,"string","PgNumeric"),this.config.precision=n,this.config.scale=o}build(t){return new ux(t,this.config)}},ux=class extends z{static[_]="PgNumeric";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(t){return typeof t=="string"?t:String(t)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},dx=class extends Z{static[_]="PgNumericNumberBuilder";constructor(t,n,o){super(t,"number","PgNumericNumber"),this.config.precision=n,this.config.scale=o}build(t){return new lx(t,this.config)}},lx=class extends z{static[_]="PgNumericNumber";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},px=class extends Z{static[_]="PgNumericBigIntBuilder";constructor(t,n,o){super(t,"bigint","PgNumericBigInt"),this.config.precision=n,this.config.scale=o}build(t){return new gx(t,this.config)}},gx=class extends z{static[_]="PgNumericBigInt";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}};function n$(e,t){let{name:n,config:o}=ve(e,t),a=o?.mode;return a==="number"?new dx(n,o?.precision,o?.scale):a==="bigint"?new px(n,o?.precision,o?.scale):new cx(n,o?.precision,o?.scale)}var mx=class extends Z{static[_]="PgPointTupleBuilder";constructor(t){super(t,"array","PgPointTuple")}build(t){return new fx(t,this.config)}},fx=class extends z{static[_]="PgPointTuple";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){let[n,o]=t.slice(1,-1).split(",");return[Number.parseFloat(n),Number.parseFloat(o)]}return[t.x,t.y]}mapToDriverValue(t){return`(${t[0]},${t[1]})`}},bx=class extends Z{static[_]="PgPointObjectBuilder";constructor(t){super(t,"json","PgPointObject")}build(t){return new hx(t,this.config)}},hx=class extends z{static[_]="PgPointObject";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){let[n,o]=t.slice(1,-1).split(",");return{x:Number.parseFloat(n),y:Number.parseFloat(o)}}return t}mapToDriverValue(t){return`(${t.x},${t.y})`}};function a$(e,t){let{name:n,config:o}=ve(e,t);return!o?.mode||o.mode==="tuple"?new mx(n):new bx(n)}function Eee(e){let t=[];for(let n=0;n<e.length;n+=2)t.push(Number.parseInt(e.slice(n,n+2),16));return new Uint8Array(t)}function o$(e,t){let n=new ArrayBuffer(8),o=new DataView(n);for(let a=0;a<8;a++)o.setUint8(a,e[t+a]);return o.getFloat64(0,!0)}function Bx(e){let t=Eee(e),n=0,o=t[n];n+=1;let a=new DataView(t.buffer),r=a.getUint32(n,o===1);n+=4;let i;if(r&536870912&&(i=a.getUint32(n,o===1),n+=4),(r&65535)===1){let A=o$(t,n);n+=8;let s=o$(t,n);return n+=8,[A,s]}throw new Error("Unsupported geometry type")}var yx=class extends Z{static[_]="PgGeometryBuilder";constructor(t){super(t,"array","PgGeometry")}build(t){return new Cx(t,this.config)}},Cx=class extends z{static[_]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){return Bx(t)}mapToDriverValue(t){return`point(${t[0]} ${t[1]})`}},wx=class extends Z{static[_]="PgGeometryObjectBuilder";constructor(t){super(t,"json","PgGeometryObject")}build(t){return new Ex(t,this.config)}},Ex=class extends z{static[_]="PgGeometryObject";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){let n=Bx(t);return{x:n[0],y:n[1]}}mapToDriverValue(t){return`point(${t.x} ${t.y})`}};function r$(e,t){let{name:n,config:o}=ve(e,t);return!o?.mode||o.mode==="tuple"?new yx(n):new wx(n)}var kx=class extends Z{static[_]="PgRealBuilder";constructor(t,n){super(t,"number","PgReal"),this.config.length=n}build(t){return new Qx(t,this.config)}},Qx=class extends z{static[_]="PgReal";constructor(t,n){super(t,n)}getSQLType(){return"real"}mapFromDriverValue=t=>typeof t=="string"?Number.parseFloat(t):t};function i$(e){return new kx(e??"")}var Ix=class extends Z{static[_]="PgSerialBuilder";constructor(t){super(t,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new _x(t,this.config)}},_x=class extends z{static[_]="PgSerial";getSQLType(){return"serial"}};function A$(e){return new Ix(e??"")}var vx=class extends fi{static[_]="PgSmallIntBuilder";constructor(t){super(t,"number","PgSmallInt")}build(t){return new xx(t,this.config)}},xx=class extends z{static[_]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=t=>typeof t=="string"?Number(t):t};function s$(e){return new vx(e??"")}var Dx=class extends Z{static[_]="PgSmallSerialBuilder";constructor(t){super(t,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new Fx(t,this.config)}},Fx=class extends z{static[_]="PgSmallSerial";getSQLType(){return"smallserial"}};function c$(e){return new Dx(e??"")}var Sx=class extends Z{static[_]="PgTextBuilder";constructor(t,n){super(t,"string","PgText"),this.config.enumValues=n.enum}build(t){return new Lx(t,this.config)}},Lx=class extends z{static[_]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}};function $o(e,t={}){let{name:n,config:o}=ve(e,t);return new Sx(n,o)}var Rx=class extends Cr{constructor(t,n,o){super(t,"string","PgTime"),this.withTimezone=n,this.precision=o,this.config.withTimezone=n,this.config.precision=o}static[_]="PgTimeBuilder";build(t){return new Nx(t,this.config)}},Nx=class extends z{static[_]="PgTime";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}};function u$(e,t={}){let{name:n,config:o}=ve(e,t);return new Rx(n,o.withTimezone??!1,o.precision)}var $x=class extends Cr{static[_]="PgTimestampBuilder";constructor(t,n,o){super(t,"date","PgTimestamp"),this.config.withTimezone=n,this.config.precision=o}build(t){return new Mx(t,this.config)}},Mx=class extends z{static[_]="PgTimestamp";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){return typeof t=="string"?new Date(this.withTimezone?t:t+"+0000"):t}mapToDriverValue=t=>t.toISOString()},jx=class extends Cr{static[_]="PgTimestampStringBuilder";constructor(t,n,o){super(t,"string","PgTimestampString"),this.config.withTimezone=n,this.config.precision=o}build(t){return new Px(t,this.config)}},Px=class extends z{static[_]="PgTimestampString";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){if(typeof t=="string")return t;let n=t.toISOString().slice(0,-1).replace("T"," ");if(this.withTimezone){let o=t.getTimezoneOffset(),a=o<=0?"+":"-";return`${n}${a}${Math.floor(Math.abs(o)/60).toString().padStart(2,"0")}`}return n}};function Fh(e,t={}){let{name:n,config:o}=ve(e,t);return o?.mode==="string"?new jx(n,o.withTimezone??!1,o.precision):new $x(n,o?.withTimezone??!1,o?.precision)}var Gx=class extends Z{static[_]="PgUUIDBuilder";constructor(t){super(t,"string","PgUUID")}defaultRandom(){return this.default(Yu`gen_random_uuid()`)}build(t){return new Hx(t,this.config)}},Hx=class extends z{static[_]="PgUUID";getSQLType(){return"uuid"}};function d$(e){return new Gx(e??"")}var Ux=class extends Z{static[_]="PgVarcharBuilder";constructor(t,n){super(t,"string","PgVarchar"),this.config.length=n.length,this.config.enumValues=n.enum}build(t){return new Tx(t,this.config)}},Tx=class extends z{static[_]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}};function l$(e,t={}){let{name:n,config:o}=ve(e,t);return new Ux(n,o)}var Ox=class extends Z{static[_]="PgBinaryVectorBuilder";constructor(t,n){super(t,"string","PgBinaryVector"),this.config.dimensions=n.dimensions}build(t){return new qx(t,this.config)}},qx=class extends z{static[_]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}};function p$(e,t){let{name:n,config:o}=ve(e,t);return new Ox(n,o)}var zx=class extends Z{static[_]="PgHalfVectorBuilder";constructor(t,n){super(t,"array","PgHalfVector"),this.config.dimensions=n.dimensions}build(t){return new Yx(t,this.config)}},Yx=class extends z{static[_]="PgHalfVector";dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}};function g$(e,t){let{name:n,config:o}=ve(e,t);return new zx(n,o)}var Kx=class extends Z{static[_]="PgSparseVectorBuilder";constructor(t,n){super(t,"string","PgSparseVector"),this.config.dimensions=n.dimensions}build(t){return new Jx(t,this.config)}},Jx=class extends z{static[_]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}};function m$(e,t){let{name:n,config:o}=ve(e,t);return new Kx(n,o)}var Wx=class extends Z{static[_]="PgVectorBuilder";constructor(t,n){super(t,"array","PgVector"),this.config.dimensions=n.dimensions}build(t){return new Zx(t,this.config)}},Zx=class extends z{static[_]="PgVector";dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}};function f$(e,t){let{name:n,config:o}=ve(e,t);return new Wx(n,o)}function b$(){return{bigint:HN,bigserial:UN,boolean:TN,char:ON,cidr:qN,customType:zN,date:YN,doublePrecision:KN,inet:JN,integer:WN,interval:ZN,json:VN,jsonb:Dh,line:XN,macaddr:e$,macaddr8:t$,numeric:n$,point:a$,geometry:r$,real:i$,serial:A$,smallint:s$,smallserial:c$,text:$o,time:u$,timestamp:Fh,uuid:d$,varchar:l$,bit:p$,halfvec:g$,sparsevec:m$,vector:f$}}var Vx=Symbol.for("drizzle:PgInlineForeignKeys"),h$=Symbol.for("drizzle:EnableRLS"),mp=class extends Zt{static[_]="PgTable";static Symbol=Object.assign({},Zt.Symbol,{InlineForeignKeys:Vx,EnableRLS:h$});[Vx]=[];[h$]=!1;[Zt.Symbol.ExtraConfigBuilder]=void 0;[Zt.Symbol.ExtraConfigColumns]={}};function kee(e,t,n,o,a=e){let r=new mp(e,o,a),i=typeof t=="function"?t(b$()):t,A=Object.fromEntries(Object.entries(i).map(([u,l])=>{let p=l;p.setName(u);let g=p.build(r);return r[Vx].push(...p.buildForeignKeys(g,r)),[u,g]})),s=Object.fromEntries(Object.entries(i).map(([u,l])=>{let p=l;p.setName(u);let g=p.buildExtraConfigColumn(r);return[u,g]})),c=Object.assign(r,A);return c[Zt.Symbol.Columns]=A,c[Zt.Symbol.ExtraConfigColumns]=s,n&&(c[mp.Symbol.ExtraConfigBuilder]=n),Object.assign(c,{enableRLS:()=>(c[mp.Symbol.EnableRLS]=!0,c)})}var B$=(e,t,n)=>kee(e,t,n,void 0);var Sh=class{constructor(t,n){this.unique=t,this.name=n}static[_]="PgIndexBuilderOn";on(...t){return new fp(t.map(n=>{if(dn(n,Vt))return n;n=n;let o=new Ou(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=JSON.parse(JSON.stringify(n.defaultConfig)),o}),this.unique,!1,this.name)}onOnly(...t){return new fp(t.map(n=>{if(dn(n,Vt))return n;n=n;let o=new Ou(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=n.defaultConfig,o}),this.unique,!0,this.name)}using(t,...n){return new fp(n.map(o=>{if(dn(o,Vt))return o;o=o;let a=new Ou(o.name,!!o.keyAsName,o.columnType,o.indexConfig);return o.indexConfig=JSON.parse(JSON.stringify(o.defaultConfig)),a}),this.unique,!0,this.name,t)}},fp=class{static[_]="PgIndexBuilder";config;constructor(t,n,o,a,r="btree"){this.config={name:a,columns:t,unique:n,only:o,method:r}}concurrently(){return this.config.concurrently=!0,this}with(t){return this.config.with=t,this}where(t){return this.config.where=t,this}build(t){return new Xx(this.config,t)}},Xx=class{static[_]="PgIndex";config;constructor(t,n){this.config={...t,table:n}}};function y$(e){return new Sh(!1,e)}function C$(e){return new Sh(!0,e)}var w$=e=>Fh(e,{withTimezone:!0}),E$=d.enum(["channel","dm","group","local_conversation","thread","web_session"]),fQe=B$("junior_destinations",{id:$o("id").primaryKey(),provider:$o("provider").notNull(),providerTenantId:$o("provider_tenant_id").notNull().default(""),providerDestinationId:$o("provider_destination_id").notNull(),kind:$o("kind").$type().notNull(),parentDestinationId:$o("parent_destination_id"),displayName:$o("display_name"),visibility:$o("visibility").$type().notNull().default("unknown"),metadata:Dh("metadata_json"),createdAt:w$("created_at").notNull(),updatedAt:w$("updated_at").notNull()},e=>[C$("junior_destinations_provider_destination_uidx").on(e.provider,e.providerTenantId,e.providerDestinationId),y$("junior_destinations_provider_kind_idx").on(e.provider,e.kind)]);function Qee(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var Iee=d.object({kind:d.literal("resource_link"),key:d.string().trim().min(1).max(256),label:d.string().trim().min(1).max(256),url:d.string().url().max(2048).refine(Qee,"URL must use HTTP or HTTPS."),description:d.string().trim().min(1).max(512).optional(),status:d.enum(["open","draft","closed","merged","warning"]).optional()}).strict(),k$=d.discriminatedUnion("kind",[Iee]),yQe=d.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),_ee=d.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),vee=d.object({content:d.string().min(1).max(32*1024).optional(),description:d.string().trim().min(1).max(2e3).optional(),metadata:d.array(d.string().trim().min(1).max(120)).max(8).optional(),title:d.string().trim().min(1).max(4e3)}).strict(),Q$=d.object({details:d.array(vee).max(100).optional(),icon:_ee.optional(),preview:d.string().trim().min(1).max(500).optional(),title:d.string().trim().min(1).max(120)}).strict();var I$=d.string().regex(/^T[A-Z0-9]+$/),xee=d.string().regex(/^(C|G|D)[A-Z0-9]+$/),_$=d.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),Lh=d.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),Ae=d.string().refine(e=>e.trim().length>0),CA=Ae.refine(e=>e===e.trim()),wQe=d.enum(["slack","local"]),Dee=d.enum(["public","private"]),Fee=d.enum(["public","private"]),v$=d.object({platform:d.literal("slack"),teamId:I$,channelId:xee}).strict(),x$=v$,See=d.object({platform:d.literal("local"),conversationId:_$}).strict(),Lee=d.discriminatedUnion("platform",[x$,See]),Ree=v$.extend({visibility:Dee,messageTs:Ae.optional(),threadTs:Ae.optional()}).strict(),Nee=d.object({platform:d.literal("local"),visibility:d.literal("private"),conversationId:_$}).strict(),D$=d.discriminatedUnion("platform",[Ree,Nee]),$ee=d.discriminatedUnion("allowedWhen",[d.object({type:d.literal("user"),userId:Lh,allowedWhen:d.literal("private-direct-conversation")}).strict(),d.object({type:d.literal("user"),userId:Lh,allowedWhen:d.literal("scheduled-task"),taskId:CA}).strict()]),F$={email:Ae.optional(),fullName:Ae.optional(),userId:Lh,userName:Ae.optional()},Mee=d.object({...F$,platform:d.literal("slack"),teamId:I$}).strict(),jee=d.object({...F$,platform:d.literal("local")}).strict(),Pee=d.object({platform:d.literal("system"),name:Lh}).strict(),eD=d.discriminatedUnion("platform",[Mee,jee,Pee]),Gee=d.object({displayName:Ae.optional(),handle:Ae.optional(),id:CA,provider:CA,providerSubjectId:CA,providerTenantId:CA.optional()}).strict(),EQe=d.object({displayName:Ae.optional(),email:Ae.max(320),id:CA,identities:d.array(Gee).max(100)}).strict(),Hee=d.record(d.string(),d.string()).superRefine((e,t)=>{let n=Object.entries(e);if(n.length>20){t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata has too many keys"});return}for(let[o,a]of n){if(!o.trim()){t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata values must be strings",path:[o]});continue}o.length>128&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata key exceeds the maximum length",path:[o]}),/[\r\n]/.test(o)&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata keys must be single-line strings",path:[o]}),/[\r\n]/.test(a)&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata values must be single-line strings",path:[o]}),a.length>512&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata value exceeds the maximum length",path:[o]})}}),Uee=d.object({label:CA.pipe(d.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:CA.pipe(d.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),kQe=d.object({idempotencyKey:Ae.pipe(d.string().max(512)),credentialSubject:$ee.optional(),destination:x$,destinationVisibility:Fee,input:Ae.pipe(d.string().max(32e3)),metadata:Hee.optional(),replyAttribution:Uee.optional(),source:D$}).strict();var Tee=d.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),IQe=d.object({text:d.string().trim().min(1).max(8e3)}).strict(),_Qe=d.object({kind:Tee,version:d.number().int().positive(),content:d.record(d.string(),d.unknown())}).strict();var Oee=4e3,qee=8e3,bp=d.string().regex(/^[a-z][a-z0-9_-]*(?:\.[a-z][a-z0-9_-]*)+$/).describe("Canonical dotted event type, such as issue.closed or pull_request.review.changes_requested."),S$=d.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),zee=d.object({type:S$,supportedEvents:d.array(bp).min(1),suggestedEvents:d.array(bp).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.supportedEvents.forEach((a,r)=>{n.has(a)&&t.addIssue({code:"custom",message:`Duplicate supported resource event type "${a}".`,path:["supportedEvents",r]}),n.add(a)});let o=new Set;e.suggestedEvents?.forEach((a,r)=>{o.has(a)&&t.addIssue({code:"custom",message:`Duplicate suggested resource event type "${a}".`,path:["suggestedEvents",r]}),n.has(a)||t.addIssue({code:"custom",message:`Suggested resource event type "${a}" is not supported.`,path:["suggestedEvents",r]}),o.add(a)})}),xQe=d.object({resourceTypes:d.array(zee).min(1),isEnabled:d.function({input:[],output:d.boolean()}).optional(),normalizeIdentifier:d.function({input:[d.string()],output:d.string()}).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.resourceTypes.forEach((o,a)=>{n.has(o.type)&&t.addIssue({code:"custom",message:`Duplicate resource type "${o.type}".`,path:["resourceTypes",a,"type"]}),n.add(o.type)})});var DQe=d.object({identifier:d.string().min(1),label:d.string().min(1),namespace:d.string().min(1),suggestedEvents:d.array(bp).optional(),supportedEvents:d.array(bp),type:S$}).strict(),Yee=d.object({eventKey:d.string().min(1),eventType:bp,identifier:d.string().min(1),occurredAtMs:d.number().finite(),terminal:d.boolean().optional(),trustedSummary:d.string().min(1).transform(e=>e.slice(0,Oee)),untrustedText:d.string().transform(e=>e.slice(0,qee)).optional()}).strict(),FQe=Yee.extend({namespace:d.string().min(1)}),Kee=d.object({authority:d.enum(["instruction","context"]),actor:eD.optional()}).strict(),Jee=d.discriminatedUnion("type",[d.object({type:d.literal("message"),role:d.enum(["user","assistant"]),text:d.string().min(1),provenance:Kee.optional(),isRunActor:d.boolean().optional()}).strict(),d.object({type:d.literal("toolResult"),toolName:d.string().min(1),isError:d.boolean(),text:d.string().min(1).optional()}).strict()]),LQe=d.object({completedAtMs:d.number().finite(),conversationId:d.string().min(1),destination:Lee,actors:d.array(eD),actor:eD.optional(),runId:d.string().min(1),source:D$,transcript:d.array(Jee)}).strict();var NQe=d.discriminatedUnion("type",[d.object({type:d.literal("text"),text:d.string()}).strict(),d.object({type:d.literal("image"),data:d.string(),mimeType:d.string()}).strict()]),Wee=d.object({arguments:d.record(d.string(),d.unknown()),reason:d.string().min(1).optional()}).strict(),$Qe=d.object({target:d.string().min(1).optional(),truncated:d.boolean().optional(),continuation:Wee.optional()}).passthrough(),MQe=d.enum(["auto","review","approve"]);var PQe=d.object({auth:d.object({user:d.object({email:d.string().nullable().optional(),emailVerified:d.boolean().optional(),name:d.string().nullable().optional()}).strict()}).strict(),pluginName:Ae}).strict(),Zee=d.string().regex(/^[a-z][a-z0-9-]*$/),Vee=d.string().regex(/^[a-z][a-z0-9.-]*$/),Xee=d.union([d.literal("read"),d.literal("write")]),L$=d.object({provider:Zee,scope:Ae.optional(),type:d.literal("oauth")}).strict(),R$=d.object({id:Ae,label:Ae.optional(),url:Ae.optional()}).strict(),HQe=d.object({account:R$.optional(),accessToken:Ae,expiresAt:d.number().finite().optional(),refreshToken:Ae,refreshTokenExpiresAt:d.number().finite().optional(),scope:Ae.optional()}).strict(),UQe=d.object({access:Xee,leaseScope:Ae.optional(),name:Vee,reason:Ae.optional(),requirements:d.array(Ae).min(1).optional()}).strict(),ete=d.object({domain:d.string().min(1),headers:d.record(d.string(),d.string()).refine(e=>Object.keys(e).length>0)}).strict(),tte=d.object({account:R$.optional(),authorization:L$.optional(),expiresAt:d.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:d.array(ete).min(1)}).strict(),TQe=d.discriminatedUnion("type",[d.object({lease:tte,type:d.literal("lease")}).strict(),d.object({authorization:L$.optional(),message:Ae,type:d.literal("needed")}).strict(),d.object({message:Ae,type:d.literal("unavailable")}).strict()]);var nte=Ae.max(64).regex(/^[a-z][a-z0-9-]*$/),ate=Ae.max(80),ote=Ae.max(500),rte=d.enum(["primary","profile"]),ite=d.object({detail:Ae.max(500).optional(),label:Ae.max(80),tone:d.enum(["good","neutral","warning"]).optional(),value:Ae.max(120)}).strict(),Ate=d.object({label:Ae.max(80),value:Ae.max(500)}).strict(),ste=d.object({confirmation:Ae.max(500).optional(),href:Ae.max(500).regex(/^\/api\/plugins\/[a-z][a-z0-9-]*(?:\/|$)/),label:Ae.max(80),method:d.literal("DELETE"),tone:d.enum(["danger","neutral"]).optional()}).strict(),cte=d.object({actions:d.array(ste).max(4).optional(),description:Ae.max(1e3).optional(),id:Ae.max(128),metadata:d.array(Ate).max(8).optional(),title:Ae.max(4e3)}).strict(),qQe=d.object({emptyText:Ae.max(500).optional(),metrics:d.array(ite).max(6).optional(),nextCursor:Ae.max(1e3).optional(),records:d.array(cte).max(100),searchPlaceholder:Ae.max(120).optional(),type:d.literal("list")}).strict(),ute=d.object({description:ote,id:nte,label:ate,navigation:rte,pluginDisplayName:Ae.max(200),pluginName:Ae.max(100)}).strict(),zQe=d.array(ute),YQe=d.object({cursor:Ae.max(1e3).optional(),filter:Ae.max(64).optional(),limit:d.number().int().min(1).max(50),query:d.string().trim().max(200).optional()}).strict();var $$=d.object({active:d.number(),conversations:d.number(),date:d.string(),durationMs:d.number(),failed:d.number(),tokens:d.number().optional()}).strict();var dte=d.enum(["active","completed","failed"]),lte=d.enum(["api","internal","scheduler","slack"]),M$=EN,pte=d.object({conversationId:d.string().min(1)}).strict(),gte=d.object({limit:d.coerce.number().int().min(1).max(1e3).default(500)}).strict(),mte=d.object({before:d.string().min(1),limit:d.coerce.number().int().min(1).max(1e3).default(500)}).strict(),fte=d.object({actorEmail:d.string().trim().email().transform(e=>e.toLowerCase()).optional()}).strict(),bte=d.object({archived:d.boolean(),lastSeenAt:d.string().datetime()}).strict(),tD=d.object({archived:d.boolean()}).strict(),Rh=d.object({email:d.string().optional(),fullName:d.string().optional(),slackUserId:d.string().optional(),slackUserName:d.string().optional()}).strict(),j$=d.object({costUsd:d.number().finite().nonnegative(),operations:d.array(d.object({costUsd:d.number().finite().nonnegative(),events:d.number().int().positive(),name:d.string().min(1),namespace:d.string().min(1)}).strict()).min(1)}).strict(),hp=d.object({displayTitle:d.string(),cumulativeDurationMs:d.number(),cumulativeUsage:M$.optional(),auxiliaryCosts:j$.optional(),conversationId:d.string(),isParticipant:d.boolean(),status:dte,startedAt:d.string(),lastSeenAt:d.string(),lastProgressAt:d.string(),surface:lte,actorIdentity:Rh.optional(),archivedAt:d.string().optional(),channel:d.string().optional(),channelName:d.string().optional(),channelNameRedacted:d.boolean().optional(),locationId:d.string().optional(),sentryTraceUrl:d.string().optional(),sourceUrl:d.string().url().optional(),traceId:d.string().optional()}).strict(),hte=d.object({type:d.literal("message"),messageId:d.string().min(1),role:d.enum(["assistant","system","user"]),actorIdentity:Rh.optional(),eventType:d.string().min(1).optional(),text:d.string().optional(),redacted:d.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"message content must be text or explicitly redacted"}),e.redacted&&e.actorIdentity&&t.addIssue({code:"custom",message:"redacted messages must not expose actor identity"})}),Bte=d.object({type:d.literal("message_handled"),messageId:d.string().min(1)}).strict(),yte=d.object({toolCallId:d.string().min(1),name:d.string().min(1),status:d.enum(["running","completed","error"]),startedAt:d.string().datetime().optional(),startedSeq:d.number().int().nonnegative().optional(),input:d.unknown().optional(),output:d.unknown().optional()}).strict().superRefine((e,t)=>{e.startedAt===void 0!=(e.startedSeq===void 0)&&t.addIssue({code:"custom",message:"tool start sequence and timestamp must be provided together"})}),P$=d.object({type:d.literal("reasoning"),text:d.string().min(1).optional(),redacted:d.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"reasoning content must be text or explicitly redacted"})}),Cte=d.object({type:d.literal("tool_call"),toolCallId:d.string().min(1)}).strict(),wte=d.object({parts:d.array(d.discriminatedUnion("type",[P$,Cte])).min(1)}).strict(),Ete=d.object({type:d.literal("tool_calls"),calls:d.array(yte).min(1),assistant:wte.optional()}).strict().superRefine((e,t)=>{if(!e.assistant)return;let n=new Map;for(let a of e.calls)n.set(a.toolCallId,(n.get(a.toolCallId)??0)+1);let o=new Map;for(let a of e.assistant.parts)a.type==="tool_call"&&o.set(a.toolCallId,(o.get(a.toolCallId)??0)+1);(n.size!==o.size||[...n].some(([a,r])=>o.get(a)!==r))&&t.addIssue({code:"custom",path:["assistant","parts"],message:"assistant tool parts must reference every call exactly once"})}),kte=d.object({type:d.literal("assistant_message"),parts:d.array(P$).min(1)}).strict(),Qte=d.discriminatedUnion("state",[d.object({type:d.literal("turn_lifecycle"),turnId:d.string().min(1),state:d.enum(["started","succeeded","no_reply"])}).strict(),d.object({type:d.literal("turn_lifecycle"),turnId:d.string().min(1),state:d.literal("failed"),failureKind:d.enum(["agent","delivery"])}).strict()]),Ite=d.object({type:d.literal("turn_routed"),turnId:d.string().min(1),modelProfile:d.string().min(1),modelId:d.string().min(1),reasoningLevel:d.string().min(1),confidence:d.number().min(0).max(1).optional(),source:d.enum(["configured","inherited","router"])}).strict(),_te=d.object({type:d.literal("guardian_action_reviewed"),turnId:d.string().min(1),toolCallId:d.string().min(1),toolName:d.string().min(1),decision:d.enum(["allow","ask","deny"]),riskLevel:d.enum(["low","medium","high","critical"]),userAuthorization:d.enum(["high","medium","low","unknown"])}).strict(),vte=d.object({type:d.literal("turn_context"),turnId:d.string().min(1),pluginName:d.string().min(1),kind:d.string().min(1),version:d.number().int().positive(),content:d.record(d.string(),d.unknown())}).strict(),xte=d.object({type:d.literal("structured_event"),namespace:d.string().min(1),name:d.string().min(1),version:d.number().int().positive(),turnId:d.string().min(1).optional(),presentation:Q$}).strict(),Dte=d.object({type:d.literal("compaction"),modelProfile:d.string().min(1).optional(),modelId:d.string().min(1).optional(),summary:d.string().min(1).optional(),details:d.object({reason:d.literal("capacity"),estimatedInputTokens:d.number().int().nonnegative(),replacementInputTokens:d.number().int().nonnegative().optional(),triggerTokens:d.number().int().nonnegative(),inputLimitTokens:d.number().int().positive(),inputMessageCount:d.number().int().nonnegative(),retainedMessageCount:d.number().int().nonnegative(),summaryChars:d.number().int().nonnegative()}).strict().optional()}).strict(),Fte=d.object({type:d.literal("handoff"),modelProfile:d.string().min(1),modelId:d.string().min(1),reasoningLevel:d.string().min(1).optional(),triggeringToolCallId:d.string().min(1).optional(),summary:d.string().min(1).optional()}).strict(),Ste=d.object({type:d.literal("subagent"),startedSeq:d.number().int().nonnegative(),startedAt:d.string().datetime(),childConversationId:d.string().min(1),subagentKind:d.string().min(1),parentToolCallId:d.string().min(1).optional(),status:d.enum(["running","completed","error","aborted"])}).strict(),G$=d.discriminatedUnion("type",[hte,Bte,kte,Ete,Qte,vte,xte,Ite,_te,Dte,Fte,Ste]),nD=d.object({seq:d.number().int().nonnegative(),createdAt:d.string().datetime(),data:G$}).strict(),aD=d.discriminatedUnion("status",[d.object({status:d.literal("available")}).strict(),d.object({status:d.literal("redacted"),reason:d.literal("non_public_conversation")}).strict(),d.object({status:d.literal("expired"),expiredAt:d.string().datetime()}).strict()]),Lte=d.object({modelId:d.string(),usage:M$}).strict();function H$(e,t){e.eventHistory.status==="expired"&&e.events.length>0&&t.addIssue({code:"custom",path:["events"],message:"expired event history must not contain events"});for(let n=1;n<e.events.length;n+=1)e.events[n].seq<=e.events[n-1].seq&&t.addIssue({code:"custom",path:["events",n,"seq"],message:"report event sequences must be strictly increasing"});for(let[n,o]of e.events.entries())o.data.type==="message"&&(e.eventHistory.status==="redacted"&&o.data.redacted!==!0&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact messages"}),e.eventHistory.status==="available"&&o.data.redacted===!0&&t.addIssue({code:"custom",path:["events",n,"data"],message:"available event history must expose messages"})),e.eventHistory.status==="redacted"&&o.data.type==="tool_calls"&&o.data.calls.some(a=>a.input!==void 0||a.output!==void 0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact tool payloads"}),e.eventHistory.status==="redacted"&&o.data.type==="assistant_message"&&o.data.parts.some(a=>a.text!==void 0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact assistant messages"}),e.eventHistory.status==="available"&&o.data.type==="assistant_message"&&o.data.parts.some(a=>a.redacted===!0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"available event history must expose reasoning"}),o.data.type==="tool_calls"&&(e.eventHistory.status==="redacted"&&o.data.assistant?.parts.some(a=>a.type==="reasoning"&&a.text!==void 0)||e.eventHistory.status==="available"&&o.data.assistant?.parts.some(a=>a.type==="reasoning"&&a.redacted===!0))&&t.addIssue({code:"custom",path:["events",n,"data","assistant"],message:"assistant reasoning must match event history visibility"})}var oD=hp.extend({annotations:d.array(k$.and(d.object({plugin:d.string().min(1),createdAt:d.string().datetime(),updatedAt:d.string().datetime()}))).optional(),modelUsage:d.array(Lte).optional(),events:d.array(nD),eventHistory:aD,previousCursor:d.string().min(1).optional(),generatedAt:d.string(),sentryConversationUrl:d.string().optional()}).strict().superRefine(H$),rD=d.object({events:d.array(nD),eventHistory:aD,previousCursor:d.string().min(1).optional(),generatedAt:d.string()}).strict().superRefine(H$),iD=d.object({conversations:d.array(hp),source:d.literal("conversation_index"),generatedAt:d.string()}).strict(),Ku=d.object({active:d.number(),conversations:d.number(),durationMs:d.number(),failed:d.number(),label:d.string(),costUsd:d.number().optional(),tokens:d.number().optional()}).strict(),Rte=d.object({conversations:d.number(),costUsd:d.number().optional(),date:d.string(),durationMs:d.number(),tokens:d.number().optional()}).strict(),Nte=d.object({allow:d.number(),ask:d.number(),costUsd:d.number().optional(),date:d.string(),deny:d.number(),requests:d.number()}).strict(),$te=d.object({allow:d.number(),ask:d.number(),costUsd:d.number().optional(),deny:d.number(),metricDays:d.array(Nte),requests:d.number()}).strict(),AD=d.object({active:d.number(),conversations:d.number(),durationMs:d.number(),failed:d.number(),generatedAt:d.string(),guardian:$te,metricDays:d.array(Rte),locations:d.array(Ku),actors:d.array(Ku),source:d.literal("conversation_index"),costUsd:d.number().optional(),tokens:d.number().optional(),windowEnd:d.string(),windowStart:d.string()}).strict(),Mte=d.object({email:d.string().trim().min(1)}).strict(),N$=Ku.omit({costUsd:!0}),jte=d.object({active:d.number(),conversations:d.number(),costUsd:d.number().optional(),date:d.string(),durationMs:d.number(),failed:d.number(),tokens:d.number().optional()}).strict(),Pte=d.object({activePeople:d.number(),conversations:d.number(),date:d.string()}).strict(),U$=d.object({active:d.number(),activeDays:d.number(),conversations:d.number(),durationMs:d.number(),failed:d.number(),tokens:d.number().optional()}).strict(),T$=Rh.extend({email:d.string().min(1)}).strict(),Gte=U$.extend({firstSeenAt:d.string(),lastSeenAt:d.string(),actor:T$}).strict(),sD=d.object({activityDays:d.array(Pte),generatedAt:d.string(),people:d.array(Gte),source:d.literal("conversation_index"),windowEnd:d.string(),windowStart:d.string()}).strict(),cD=d.object({activityDays:d.array(jte),generatedAt:d.string(),locations:d.array(N$),recentConversations:d.array(hp),actor:T$,source:d.literal("conversation_index"),surfaces:d.array(N$),totals:U$,windowEnd:d.string(),windowStart:d.string()}).strict(),uD=d.object({generatedAt:d.string(),sevenDaysUsd:d.number().finite().nonnegative(),source:d.literal("conversation_index"),thirtyDaysUsd:d.number().finite().nonnegative(),windowEnd:d.string(),windowStart:d.string()}).strict(),Hte=d.object({locationId:d.string().min(1)}).strict(),O$=Ku.extend({id:d.string(),firstSeenAt:d.string(),kind:E$,lastSeenAt:d.string(),provider:d.string(),providerDestinationId:d.string(),visibility:d.literal("public")}).strict(),Ute=Ku.extend({actor:Rh}).strict(),q$=d.object({date:d.string(),privateConversations:d.number(),publicConversations:d.number()}).strict(),dD=d.object({activityDays:d.array(q$),generatedAt:d.string(),locations:d.array(O$),privateActivity:Ku,source:d.literal("conversation_index"),windowEnd:d.string(),windowStart:d.string()}).strict(),lD=O$.extend({activityDays:d.array($$),actors:d.array(Ute),generatedAt:d.string(),recentConversations:d.array(hp),source:d.literal("conversation_index"),windowEnd:d.string(),windowStart:d.string()}).strict(),Tte=d.object({error:d.string().min(1)}).strict(),pD=d.object({id:d.string().uuid(),name:d.string(),tokenSuffix:d.string(),createdAt:d.string().datetime(),expiresAt:d.string().datetime(),lastUsedAt:d.string().datetime().nullable()}).strict(),gD=d.object({tokens:d.array(pD)}).strict(),Ote=d.object({name:d.string().trim().min(1).max(80)}).strict(),mD=pD.extend({token:d.string().startsWith("jr_pat_")}).strict(),qte=d.object({id:d.string().uuid()}).strict(),zte=d.object({revoked:d.literal(!0)}).strict(),Yte=d.object({channelId:d.string().min(1),label:d.string().min(1),teamId:d.string().min(1),visibility:d.enum(["private","public"])}).strict(),z$=d.object({createdAt:d.string().datetime(),createdBy:d.string().min(1),createdByEmail:d.string().trim().email().optional(),destination:Yte,id:d.string().min(1),instruction:d.string().min(1),lastConversationId:d.string().min(1).optional(),lastRunAt:d.string().datetime().optional(),ownedByViewer:d.boolean(),runsLast7Days:d.number().int().nonnegative(),title:d.string().min(1),totalRuns:d.number().int().nonnegative()}),Y$=z$.extend({kind:d.literal("scheduled"),nextRunAt:d.string().datetime().optional(),schedule:d.string().min(1),status:d.enum(["active","blocked","completed"])}).strict(),K$=z$.extend({events:d.array(d.string().min(1)).min(1),kind:d.literal("event"),resource:d.string().min(1),source:d.string().min(1),triggerAvailable:d.boolean()}).strict(),fD=d.discriminatedUnion("kind",[Y$,K$]),Kte=d.object({date:d.string().min(1),event:d.number().int().nonnegative(),scheduled:d.number().int().nonnegative()}).strict(),bD=d.object({executionDays:d.array(Kte),tasks:d.array(fD),truncated:d.boolean()}).strict(),Jte=d.object({id:d.string().min(1),kind:d.enum(["scheduled","event"])}).strict(),J$=d.enum(["blocked","completed","failed"]),W$=d.object({conversationId:d.string().min(1).optional(),executedAt:d.string().datetime(),executionId:d.string().min(1),status:J$,title:d.string().min(1).optional()}).strict(),Z$=d.object({blocked:d.number().int().nonnegative(),completed:d.number().int().nonnegative(),date:d.string().min(1),failed:d.number().int().nonnegative()}).strict(),hD=d.object({executionDays:d.array(Z$),executions:d.array(W$),task:fD,truncated:d.boolean()}).strict(),V$=d.object({count:d.number().int().nonnegative(),date:d.string(),metric:d.string().min(1),name:d.string().min(1),namespace:d.string().min(1)}).strict(),Wte=d.object({generatedAt:d.string().datetime(),stats:d.array(V$),windowEnd:d.string(),windowStart:d.string()}).strict();var Zte=d.object({status:d.literal("ok"),service:d.string(),timestamp:d.string()}).strict(),X$=d.object({configKeys:d.array(d.string()),description:d.string(),displayName:d.string(),name:d.string()}).strict(),BD=d.array(X$),yD=d.object({name:d.string(),pluginProvider:d.string().optional()}).strict(),CD=d.array(yD),eM=d.object({dir:d.string(),hasMigrationsDir:d.boolean(),hasSkillsDir:d.boolean(),packageName:d.string()}).strict(),tM=d.object({packageNames:d.array(d.string()),packages:d.array(eM),manifestRoots:d.array(d.string()),skillRoots:d.array(d.string()),tracingIncludes:d.array(d.string())}).strict(),Vte=d.object({cwd:d.string(),homeDir:d.string(),descriptionText:d.string().optional(),providers:d.array(d.string()),skills:d.array(yD),packagedContent:tM}).strict(),wD=d.enum(["danger","good","neutral","warning"]),Xte=d.object({label:d.string(),tone:wD.optional(),value:d.string()}).strict(),ene=d.object({key:d.string(),label:d.string()}).strict(),tne=d.object({id:d.string(),tone:wD.optional(),values:d.record(d.string(),d.string())}).strict(),nne=d.object({fields:d.array(ene).optional(),emptyText:d.string().optional(),records:d.array(tne).optional(),title:d.string()}).strict(),ane=d.object({categories:d.array(d.object({id:d.string().min(1),label:d.string().min(1),values:d.record(d.string(),d.number().finite())}).strict()).max(100),description:d.string().optional(),emptyText:d.string().optional(),id:d.string().min(1),series:d.array(d.object({format:d.literal("usd").optional(),key:d.string().min(1),label:d.string().min(1),tone:wD.optional()}).strict()).min(1).max(8),timeRangeDays:d.array(d.union([d.literal(7),d.literal(30),d.literal(90)])).min(1).max(3).optional(),title:d.string().min(1),type:d.literal("bar_chart")}).strict(),nM=d.object({generatedAt:d.string().optional(),metrics:d.array(Xte).optional(),recordSets:d.array(nne).optional(),title:d.string().optional(),pluginName:d.string(),widgets:d.array(ane).max(12).optional()}).strict(),ED=d.object({generatedAt:d.string(),reports:d.array(nM),source:d.literal("plugins")}).strict();function one(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var rne=d.object({kind:d.literal("resource_link"),key:d.string().trim().min(1).max(256),label:d.string().trim().min(1).max(256),url:d.string().url().max(2048).refine(one,"URL must use HTTP or HTTPS."),description:d.string().trim().min(1).max(512).optional(),status:d.enum(["open","draft","closed","merged","warning"]).optional()}).strict(),bIe=d.discriminatedUnion("kind",[rne]),BIe=d.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),ine=d.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),Ane=d.object({content:d.string().min(1).max(32*1024).optional(),description:d.string().trim().min(1).max(2e3).optional(),metadata:d.array(d.string().trim().min(1).max(120)).max(8).optional(),title:d.string().trim().min(1).max(4e3)}).strict(),yIe=d.object({details:d.array(Ane).max(100).optional(),icon:ine.optional(),preview:d.string().trim().min(1).max(500).optional(),title:d.string().trim().min(1).max(120)}).strict();var aM=d.string().regex(/^T[A-Z0-9]+$/),sne=d.string().regex(/^(C|G|D)[A-Z0-9]+$/),oM=d.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),Nh=d.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),se=d.string().refine(e=>e.trim().length>0),wA=se.refine(e=>e===e.trim()),wIe=d.enum(["slack","local"]),cne=d.enum(["public","private"]),une=d.enum(["public","private"]),rM=d.object({platform:d.literal("slack"),teamId:aM,channelId:sne}).strict(),iM=rM,dne=d.object({platform:d.literal("local"),conversationId:oM}).strict(),lne=d.discriminatedUnion("platform",[iM,dne]),pne=rM.extend({visibility:cne,messageTs:se.optional(),threadTs:se.optional()}).strict(),gne=d.object({platform:d.literal("local"),visibility:d.literal("private"),conversationId:oM}).strict(),AM=d.discriminatedUnion("platform",[pne,gne]),mne=d.discriminatedUnion("allowedWhen",[d.object({type:d.literal("user"),userId:Nh,allowedWhen:d.literal("private-direct-conversation")}).strict(),d.object({type:d.literal("user"),userId:Nh,allowedWhen:d.literal("scheduled-task"),taskId:wA}).strict()]),sM={email:se.optional(),fullName:se.optional(),userId:Nh,userName:se.optional()},fne=d.object({...sM,platform:d.literal("slack"),teamId:aM}).strict(),bne=d.object({...sM,platform:d.literal("local")}).strict(),hne=d.object({platform:d.literal("system"),name:Nh}).strict(),kD=d.discriminatedUnion("platform",[fne,bne,hne]),Bne=d.object({displayName:se.optional(),handle:se.optional(),id:wA,provider:wA,providerSubjectId:wA,providerTenantId:wA.optional()}).strict(),EIe=d.object({displayName:se.optional(),email:se.max(320),id:wA,identities:d.array(Bne).max(100)}).strict(),yne=d.record(d.string(),d.string()).superRefine((e,t)=>{let n=Object.entries(e);if(n.length>20){t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata has too many keys"});return}for(let[o,a]of n){if(!o.trim()){t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata values must be strings",path:[o]});continue}o.length>128&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata key exceeds the maximum length",path:[o]}),/[\r\n]/.test(o)&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata keys must be single-line strings",path:[o]}),/[\r\n]/.test(a)&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata values must be single-line strings",path:[o]}),a.length>512&&t.addIssue({code:d.ZodIssueCode.custom,message:"Dispatch metadata value exceeds the maximum length",path:[o]})}}),Cne=d.object({label:wA.pipe(d.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:wA.pipe(d.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),kIe=d.object({idempotencyKey:se.pipe(d.string().max(512)),credentialSubject:mne.optional(),destination:iM,destinationVisibility:une,input:se.pipe(d.string().max(32e3)),metadata:yne.optional(),replyAttribution:Cne.optional(),source:AM}).strict();var wne=d.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),IIe=d.object({text:d.string().trim().min(1).max(8e3)}).strict(),_Ie=d.object({kind:wne,version:d.number().int().positive(),content:d.record(d.string(),d.unknown())}).strict();var Ene=4e3,kne=8e3,Bp=d.string().regex(/^[a-z][a-z0-9_-]*(?:\.[a-z][a-z0-9_-]*)+$/).describe("Canonical dotted event type, such as issue.closed or pull_request.review.changes_requested."),cM=d.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),Qne=d.object({type:cM,supportedEvents:d.array(Bp).min(1),suggestedEvents:d.array(Bp).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.supportedEvents.forEach((a,r)=>{n.has(a)&&t.addIssue({code:"custom",message:`Duplicate supported resource event type "${a}".`,path:["supportedEvents",r]}),n.add(a)});let o=new Set;e.suggestedEvents?.forEach((a,r)=>{o.has(a)&&t.addIssue({code:"custom",message:`Duplicate suggested resource event type "${a}".`,path:["suggestedEvents",r]}),n.has(a)||t.addIssue({code:"custom",message:`Suggested resource event type "${a}" is not supported.`,path:["suggestedEvents",r]}),o.add(a)})}),xIe=d.object({resourceTypes:d.array(Qne).min(1),isEnabled:d.function({input:[],output:d.boolean()}).optional(),normalizeIdentifier:d.function({input:[d.string()],output:d.string()}).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.resourceTypes.forEach((o,a)=>{n.has(o.type)&&t.addIssue({code:"custom",message:`Duplicate resource type "${o.type}".`,path:["resourceTypes",a,"type"]}),n.add(o.type)})});var DIe=d.object({identifier:d.string().min(1),label:d.string().min(1),namespace:d.string().min(1),suggestedEvents:d.array(Bp).optional(),supportedEvents:d.array(Bp),type:cM}).strict(),Ine=d.object({eventKey:d.string().min(1),eventType:Bp,identifier:d.string().min(1),occurredAtMs:d.number().finite(),terminal:d.boolean().optional(),trustedSummary:d.string().min(1).transform(e=>e.slice(0,Ene)),untrustedText:d.string().transform(e=>e.slice(0,kne)).optional()}).strict(),FIe=Ine.extend({namespace:d.string().min(1)}),_ne=d.object({authority:d.enum(["instruction","context"]),actor:kD.optional()}).strict(),vne=d.discriminatedUnion("type",[d.object({type:d.literal("message"),role:d.enum(["user","assistant"]),text:d.string().min(1),provenance:_ne.optional(),isRunActor:d.boolean().optional()}).strict(),d.object({type:d.literal("toolResult"),toolName:d.string().min(1),isError:d.boolean(),text:d.string().min(1).optional()}).strict()]),LIe=d.object({completedAtMs:d.number().finite(),conversationId:d.string().min(1),destination:lne,actors:d.array(kD),actor:kD.optional(),runId:d.string().min(1),source:AM,transcript:d.array(vne)}).strict();var NIe=d.discriminatedUnion("type",[d.object({type:d.literal("text"),text:d.string()}).strict(),d.object({type:d.literal("image"),data:d.string(),mimeType:d.string()}).strict()]),xne=d.object({arguments:d.record(d.string(),d.unknown()),reason:d.string().min(1).optional()}).strict(),$Ie=d.object({target:d.string().min(1).optional(),truncated:d.boolean().optional(),continuation:xne.optional()}).passthrough(),MIe=d.enum(["auto","review","approve"]);var PIe=d.object({auth:d.object({user:d.object({email:d.string().nullable().optional(),emailVerified:d.boolean().optional(),name:d.string().nullable().optional()}).strict()}).strict(),pluginName:se}).strict(),Dne=d.string().regex(/^[a-z][a-z0-9-]*$/),Fne=d.string().regex(/^[a-z][a-z0-9.-]*$/),Sne=d.union([d.literal("read"),d.literal("write")]),uM=d.object({provider:Dne,scope:se.optional(),type:d.literal("oauth")}).strict(),dM=d.object({id:se,label:se.optional(),url:se.optional()}).strict(),HIe=d.object({account:dM.optional(),accessToken:se,expiresAt:d.number().finite().optional(),refreshToken:se,refreshTokenExpiresAt:d.number().finite().optional(),scope:se.optional()}).strict(),UIe=d.object({access:Sne,leaseScope:se.optional(),name:Fne,reason:se.optional(),requirements:d.array(se).min(1).optional()}).strict(),Lne=d.object({domain:d.string().min(1),headers:d.record(d.string(),d.string()).refine(e=>Object.keys(e).length>0)}).strict(),Rne=d.object({account:dM.optional(),authorization:uM.optional(),expiresAt:d.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:d.array(Lne).min(1)}).strict(),TIe=d.discriminatedUnion("type",[d.object({lease:Rne,type:d.literal("lease")}).strict(),d.object({authorization:uM.optional(),message:se,type:d.literal("needed")}).strict(),d.object({message:se,type:d.literal("unavailable")}).strict()]);var Nne=se.max(64).regex(/^[a-z][a-z0-9-]*$/),$ne=se.max(80),Mne=se.max(500),jne=d.enum(["primary","profile"]),Pne=d.object({detail:se.max(500).optional(),label:se.max(80),tone:d.enum(["good","neutral","warning"]).optional(),value:se.max(120)}).strict(),Gne=d.object({label:se.max(80),value:se.max(500)}).strict(),Hne=d.object({confirmation:se.max(500).optional(),href:se.max(500).regex(/^\/api\/plugins\/[a-z][a-z0-9-]*(?:\/|$)/),label:se.max(80),method:d.literal("DELETE"),tone:d.enum(["danger","neutral"]).optional()}).strict(),Une=d.object({actions:d.array(Hne).max(4).optional(),description:se.max(1e3).optional(),id:se.max(128),metadata:d.array(Gne).max(8).optional(),title:se.max(4e3)}).strict(),lM=d.object({emptyText:se.max(500).optional(),metrics:d.array(Pne).max(6).optional(),nextCursor:se.max(1e3).optional(),records:d.array(Une).max(100),searchPlaceholder:se.max(120).optional(),type:d.literal("list")}).strict(),Tne=d.object({description:Mne,id:Nne,label:$ne,navigation:jne,pluginDisplayName:se.max(200),pluginName:se.max(100)}).strict(),pM=d.array(Tne),qIe=d.object({cursor:se.max(1e3).optional(),filter:se.max(64).optional(),limit:d.number().int().min(1).max(50),query:d.string().trim().max(200).optional()}).strict();var gM=d.object({user:d.object({email:d.string().trim().email(),emailVerified:d.boolean().optional(),name:d.string().nullable().optional()}).strict()}).strict(),mM=d.object({allowedEmailCount:d.number(),allowedGoogleDomainCount:d.number(),authRequired:d.boolean(),authPath:d.string(),basePath:d.string(),componentGallery:d.boolean(),sentryConversationLinks:d.boolean(),timeZone:d.string()}).strict();var Mo=class extends Error{status;constructor(t,n){super(`${t} returned ${n}`),this.status=n}};function $h(){if(typeof window>"u")return;let e=window.__JUNIOR_DASHBOARD_BASE_PATH__??"/",t=e==="/"?"/auth/login":`${e}/auth/login`;if(window.location.pathname!==t){let n=`${window.location.pathname}${window.location.search||""}`,o=new URLSearchParams;n!=="/"&&o.set("next",n);let a=o.toString();window.location.assign(a?`${t}?${a}`:t)}}async function fM(e,t,n){let o=await fetch(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PATCH"});if(o.status===401&&$h(),!o.ok)throw new Mo(t,o.status);return e.parse(await o.json())}async function bM(e,t,n){let o=await fetch(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"POST"});if(o.status===401&&$h(),!o.ok)throw new Mo(t,o.status);return e.parse(await o.json())}async function Ju(e){let t=await fetch(e,{credentials:"same-origin",method:"DELETE"});if(t.status===401&&$h(),!t.ok)throw new Mo(e,t.status)}async function rt(e,t,n){let o=await fetch(t,{credentials:"same-origin",...n?{signal:n}:{}});if(o.status===401)throw $h(),new Mo(t,o.status);if(!o.ok)throw new Mo(t,o.status);return e.parse(await o.json())}var Mh=5*6e4,QD=5*6e4,One=1e3;function qne(e,t=Date.now()){if(!e)return QD;let n=Date.parse(e);if(!Number.isFinite(n))return QD;let o=Math.max(0,t-n);return Math.max(One,QD-o)}function hM(){return ct({queryKey:["dashboard","core"],queryFn:async({signal:e})=>{let[t,n]=await Promise.all([rt(gM,"/api/me",e),rt(mM,"/api/config",e)]);return{config:n,me:t}},retry:!1,staleTime:Mh})}function zne(){return ct({queryKey:["dashboard","plugins"],queryFn:({signal:e})=>rt(BD,"/api/plugins",e),retry:!1,staleTime:Mh})}function BM(){return ct({queryKey:["dashboard","plugin-user-pages"],queryFn:({signal:e})=>rt(pM,"/api/user-pages",e),retry:!1,staleTime:Mh})}function yM(e){return ct({queryKey:["dashboard","conversations",e??"all"],queryFn:({signal:t})=>{let n=new URLSearchParams;e&&n.set("actorEmail",e);let o=n.toString();return rt(iD,`/api/conversations${o?`?${o}`:""}`,t)},retry:!1})}function CM(e){return ct({enabled:e,queryKey:["dashboard","tasks"],queryFn:({signal:t})=>rt(bD,"/api/tasks",t),retry:!1})}function wM(e,t,n){return ct({enabled:e&&!!(t&&n),queryKey:["dashboard","tasks",t,n,"executions"],queryFn:({signal:o})=>rt(hD,`/api/tasks/${t}/${encodeURIComponent(n)}/executions`,o),retry:!1})}function EM(){return ct({queryKey:["dashboard","people"],queryFn:({signal:e})=>rt(sD,"/api/people",e),retry:!1})}function kM(e){return ct({enabled:!!e,queryKey:["dashboard","people",e],queryFn:async({signal:t})=>rt(cD,`/api/people/${encodeURIComponent(e)}`,t),retry:!1})}function QM(e){return ct({enabled:e,queryKey:["dashboard","personal-spend"],queryFn:({signal:t})=>rt(uD,"/api/people/me/spend",t),refetchInterval:t=>qne(t.state.data?.generatedAt),retry:!1,staleTime:0})}function IM(){return ct({queryKey:["dashboard","locations"],queryFn:({signal:e})=>rt(dD,"/api/locations",e),retry:!1})}function _M(e){return ct({enabled:!!e,queryKey:["dashboard","locations",e],queryFn:async({signal:t})=>rt(lD,`/api/locations/${encodeURIComponent(e)}`,t),retry:!1})}function Yne(){return ct({queryKey:["dashboard","skills"],queryFn:({signal:e})=>rt(CD,"/api/skills",e),retry:!1,staleTime:Mh})}function Kne(){return ct({queryKey:["dashboard","plugin-reports"],queryFn:({signal:e})=>rt(ED,"/api/plugin-reports",e),retry:!1})}function vM(e){let t=zne(),n=ct({queryKey:["dashboard","conversation-stats"],queryFn:({signal:i})=>rt(AD,"/api/conversations/stats",i),retry:!1}),o=Yne(),a=Kne();return{data:t.data&&o.data?{...e,conversationStatsError:!!n.error,...n.data?{conversationStats:n.data}:{},conversationStatsLoading:n.isPending,pluginReportsError:!!a.error,...a.data?{pluginReports:a.data}:{},pluginReportsLoading:a.isPending,plugins:t.data,skills:o.data}:void 0,error:t.error??o.error,isPending:t.isPending||o.isPending}}var xM="Junior";function it(){return typeof window>"u"?xM:window.__JUNIOR_DASHBOARD_AGENT_NAME__?.trim()||xM}function DM(e=it()){return e.endsWith("s")?`${e}'`:`${e}'s`}var ID=w(k(),1);function jh(){return(0,ID.jsx)("div",{className:"relative grid size-10 shrink-0 select-none place-items-center overflow-visible",children:(0,ID.jsx)("img",{alt:"",className:"relative size-11 max-w-none -translate-y-0.5 object-contain opacity-90 drop-shadow-[0_0_7px_rgba(255,255,255,0.16)]",draggable:!1,src:"/_junior/dashboard/avatar.png"})})}var FM=["relative","overflow-hidden","bg-white/15","before:absolute","before:inset-0","before:content-['']","before:bg-[linear-gradient(90deg,#ff4d6d,#ffb703,#56f39a,#4cc9f0,#9b5de5,#ff4d6d)]","before:bg-[length:200%_100%]","before:animate-[junior-rainbow-flow_1.2s_linear_infinite]","motion-reduce:before:animate-none"].join(" ");function S(...e){return e.filter(Boolean).join(" ")}var Ft="mx-auto w-full min-w-0 max-w-screen-xl",EA="text-dashboard-text-muted hover:text-dashboard-text";var kA=w(k(),1);function Qe(e){return(0,kA.jsx)("div",{className:S(Ft,"grid min-h-[calc(100vh-5rem)] place-items-center px-4 py-8 md:px-8"),children:(0,kA.jsxs)("section",{className:"grid w-full max-w-lg grid-cols-[auto_minmax(0,1fr)] items-center gap-3 rounded-lg border border-white/15 bg-dashboard-surface-raised p-4",children:[(0,kA.jsx)(jh,{}),(0,kA.jsxs)("div",{children:[(0,kA.jsx)("div",{className:"font-bold",children:e.label}),(0,kA.jsx)("div",{"aria-label":e.label,className:`${FM} mt-3 h-1.5 w-full`,role:"progressbar"})]})]})})}var Hh=w(Y(),1);var Ph=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();var SM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var LM=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase());var _D=e=>{let t=LM(e);return t.charAt(0).toUpperCase()+t.slice(1)};var yp=w(Y(),1);var Gh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var RM=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var Wu=w(Y(),1);var Jne=(0,Wu.createContext)({});var NM=()=>(0,Wu.useContext)(Jne);var $M=(0,yp.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:o,className:a="",children:r,iconNode:i,...A},s)=>{let{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:l=!1,color:p="currentColor",className:g=""}=NM()??{},m=o??l?Number(n??u)*24/Number(t??c):n??u;return(0,yp.createElement)("svg",{ref:s,...Gh,width:t??c??Gh.width,height:t??c??Gh.height,stroke:e??p,strokeWidth:m,className:Ph("lucide",g,a),...!r&&!RM(A)&&{"aria-hidden":"true"},...A},[...i.map(([h,y])=>(0,yp.createElement)(h,y)),...Array.isArray(r)?r:[r]])});var P=(e,t)=>{let n=(0,Hh.forwardRef)(({className:o,...a},r)=>(0,Hh.createElement)($M,{ref:r,iconNode:t,className:Ph(`lucide-${SM(_D(e))}`,`lucide-${e}`,o),...a}));return n.displayName=_D(e),n};var Wne=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],jo=P("activity",Wne);var Zne=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Cp=P("archive",Zne);var Vne=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],wp=P("arrow-down-to-line",Vne);var Xne=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],wr=P("arrow-left",Xne);var eae=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ep=P("arrow-right",eae);var tae=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],kp=P("bookmark",tae);var nae=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Er=P("bot",nae);var aae=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],qa=P("boxes",aae);var oae=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],kr=P("braces",oae);var rae=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],bi=P("brain-circuit",rae);var iae=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],_s=P("brain",iae);var Aae=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],Qp=P("calendar-clock",Aae);var sae=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Ip=P("calendar",sae);var cae=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vs=P("check",cae);var uae=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_p=P("chevron-down",uae);var dae=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],hi=P("chevron-right",dae);var lae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Po=P("circle-alert",lae);var pae=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],vp=P("circle-dashed",pae);var gae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],xp=P("circle-dot",gae);var mae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],QA=P("circle-x",mae);var fae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Go=P("clock-3",fae);var bae=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],xs=P("coins",bae);var hae=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ds=P("copy",hae);var Bae=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],IA=P("database",Bae);var yae=[["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 10h14",key:"elsbfy"}],["path",{d:"M5 21h14",key:"11awu3"}]],Dp=P("diff",yae);var Cae=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],go=P("earth",Cae);var wae=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Fp=P("external-link",wae);var Eae=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Sp=P("git-merge",Eae);var kae=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Lp=P("hash",kae);var Qae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Rp=P("info",Qae);var Iae=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Ho=P("key-round",Iae);var _ae=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],Np=P("lightbulb",_ae);var vae=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],$p=P("link",vae);var xae=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],Bi=P("lock-keyhole",xae);var Dae=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Mp=P("log-out",Dae);var Fae=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Fs=P("map-pin",Fae);var Sae=[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]],jp=P("map-pinned",Sae);var Lae=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],za=P("message-square",Lae);var Rae=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],Pp=P("minimize-2",Rae);var Nae=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],Gp=P("radio-tower",Nae);var $ae=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yi=P("search",$ae);var Mae=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Hp=P("send",Mae);var jae=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Yn=P("sparkles",jae);var Pae=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],Up=P("timer",Pae);var Gae=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Uo=P("trash-2",Gae);var Hae=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ia=P("triangle-alert",Hae);var Uae=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],_a=P("user-round",Uae);var Tae=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Ss=P("users",Tae);var Oae=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],To=P("x",Oae);var Gr=w(Y(),1);var vD=Object.defineProperty,qae=Object.getOwnPropertyDescriptor,zae=Object.getOwnPropertyNames,Yae=Object.prototype.hasOwnProperty,jM=(e,t)=>{let n={};for(var o in e)vD(n,o,{get:e[o],enumerable:!0});return t||vD(n,Symbol.toStringTag,{value:"Module"}),n},MM=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=zae(t),r=0,i=a.length,A;r<i;r++)A=a[r],!Yae.call(e,A)&&A!==n&&vD(e,A,{get:(s=>t[s]).bind(null,A),enumerable:!(o=qae(t,A))||o.enumerable});return e},PM=(e,t,n)=>(MM(e,t,"default"),n&&MM(n,t,"default"));var SD={};F(SD,{createOnigurumaEngine:()=>uoe,getDefaultWasmLoader:()=>coe,loadWasm:()=>HM,setDefaultWasmLoader:()=>soe});var FD=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Kae(){return 2147483648}function Jae(){return typeof performance<"u"?performance.now():Date.now()}var Wae=(e,t)=>e+(t-e%t)%t;async function Zae(e){let t,n,o={};function a(g){n=g,o.HEAPU8=new Uint8Array(g),o.HEAPU32=new Uint32Array(g)}function r(g,m,h){o.HEAPU8.copyWithin(g,m,m+h)}function i(g){try{return t.grow(g-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function A(g){let m=o.HEAPU8.length;g=g>>>0;let h=Kae();if(g>h)return!1;for(let y=1;y<=4;y*=2){let f=m*(1+.2/y);f=Math.min(f,g+100663296);let b=Math.min(h,Wae(Math.max(g,f),65536));if(i(b))return!0}return!1}let s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(g,m,h=1024){let y=m+h,f=m;for(;g[f]&&!(f>=y);)++f;if(f-m>16&&g.buffer&&s)return s.decode(g.subarray(m,f));let b="";for(;m<f;){let B=g[m++];if(!(B&128)){b+=String.fromCharCode(B);continue}let C=g[m++]&63;if((B&224)===192){b+=String.fromCharCode((B&31)<<6|C);continue}let E=g[m++]&63;if((B&240)===224?B=(B&15)<<12|C<<6|E:B=(B&7)<<18|C<<12|E<<6|g[m++]&63,B<65536)b+=String.fromCharCode(B);else{let x=B-65536;b+=String.fromCharCode(55296|x>>10,56320|x&1023)}}return b}function u(g,m){return g?c(o.HEAPU8,g,m):""}let l={emscripten_get_now:Jae,emscripten_memcpy_big:r,emscripten_resize_heap:A,fd_write:()=>0};async function p(){let m=await e({env:l,wasi_snapshot_preview1:l});t=m.memory,a(t.buffer),Object.assign(o,m),o.UTF8ToString=u}return await p(),o}var Vae=Object.defineProperty,Xae=(e,t,n)=>t in e?Vae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bn=(e,t,n)=>Xae(e,typeof t!="symbol"?t+"":t,n),Qn=null;function eoe(e){throw new FD(e.UTF8ToString(e.getLastOnigError()))}var Th=class e{constructor(t){bn(this,"utf16Length"),bn(this,"utf8Length"),bn(this,"utf16Value"),bn(this,"utf8Value"),bn(this,"utf16OffsetToUtf8"),bn(this,"utf8OffsetToUtf16");let n=t.length,o=e._utf8ByteLength(t),a=o!==n,r=a?new Uint32Array(n+1):null;a&&(r[n]=o);let i=a?new Uint32Array(o+1):null;a&&(i[o]=n);let A=new Uint8Array(o),s=0;for(let c=0;c<n;c++){let u=t.charCodeAt(c),l=u,p=!1;if(u>=55296&&u<=56319&&c+1<n){let g=t.charCodeAt(c+1);g>=56320&&g<=57343&&(l=(u-55296<<10)+65536|g-56320,p=!0)}a&&(r[c]=s,p&&(r[c+1]=s),l<=127?i[s+0]=c:l<=2047?(i[s+0]=c,i[s+1]=c):l<=65535?(i[s+0]=c,i[s+1]=c,i[s+2]=c):(i[s+0]=c,i[s+1]=c,i[s+2]=c,i[s+3]=c)),l<=127?A[s++]=l:l<=2047?(A[s++]=192|(l&1984)>>>6,A[s++]=128|(l&63)>>>0):l<=65535?(A[s++]=224|(l&61440)>>>12,A[s++]=128|(l&4032)>>>6,A[s++]=128|(l&63)>>>0):(A[s++]=240|(l&1835008)>>>18,A[s++]=128|(l&258048)>>>12,A[s++]=128|(l&4032)>>>6,A[s++]=128|(l&63)>>>0),p&&c++}this.utf16Length=n,this.utf8Length=o,this.utf16Value=t,this.utf8Value=A,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=i}static _utf8ByteLength(t){let n=0;for(let o=0,a=t.length;o<a;o++){let r=t.charCodeAt(o),i=r,A=!1;if(r>=55296&&r<=56319&&o+1<a){let s=t.charCodeAt(o+1);s>=56320&&s<=57343&&(i=(r-55296<<10)+65536|s-56320,A=!0)}i<=127?n+=1:i<=2047?n+=2:i<=65535?n+=3:n+=4,A&&o++}return n}createString(t){let n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}},Oh=class Qr{constructor(t){if(bn(this,"id",++Qr.LAST_ID),bn(this,"_onigBinding"),bn(this,"content"),bn(this,"utf16Length"),bn(this,"utf8Length"),bn(this,"utf16OffsetToUtf8"),bn(this,"utf8OffsetToUtf16"),bn(this,"ptr"),!Qn)throw new FD("Must invoke loadWasm first.");this._onigBinding=Qn,this.content=t;let n=new Th(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Qr._sharedPtrInUse?(Qr._sharedPtr||(Qr._sharedPtr=Qn.omalloc(1e4)),Qr._sharedPtrInUse=!0,Qn.HEAPU8.set(n.utf8Value,Qr._sharedPtr),this.ptr=Qr._sharedPtr):this.ptr=n.createString(Qn)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Qr._sharedPtr?Qr._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};bn(Oh,"LAST_ID",0);bn(Oh,"_sharedPtr",0);bn(Oh,"_sharedPtrInUse",!1);var GM=Oh,DD=class{constructor(t){if(bn(this,"_onigBinding"),bn(this,"_ptr"),!Qn)throw new FD("Must invoke loadWasm first.");let n=[],o=[];for(let A=0,s=t.length;A<s;A++){let c=new Th(t[A]);n[A]=c.createString(Qn),o[A]=c.utf8Length}let a=Qn.omalloc(4*t.length);Qn.HEAPU32.set(n,a/4);let r=Qn.omalloc(4*t.length);Qn.HEAPU32.set(o,r/4);let i=Qn.createOnigScanner(a,r,t.length);for(let A=0,s=t.length;A<s;A++)Qn.ofree(n[A]);Qn.ofree(r),Qn.ofree(a),i===0&&eoe(Qn),this._onigBinding=Qn,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,o){let a=0;if(typeof o=="number"&&(a=o),typeof t=="string"){t=new GM(t);let r=this._findNextMatchSync(t,n,!1,a);return t.dispose(),r}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,o,a){let r=this._onigBinding,i=r.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(i===0)return null;let A=r.HEAPU32,s=i/4,c=A[s++],u=A[s++],l=[];for(let p=0;p<u;p++){let g=t.convertUtf8OffsetToUtf16(A[s++]),m=t.convertUtf8OffsetToUtf16(A[s++]);l[p]={start:g,end:m,length:m-g}}return{index:c,captureIndices:l}}};function toe(e){return typeof e.instantiator=="function"}function noe(e){return typeof e.default=="function"}function aoe(e){return typeof e.data<"u"}function ooe(e){return typeof Response<"u"&&e instanceof Response}function roe(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}var Uh;function HM(e){if(Uh)return Uh;async function t(){Qn=await Zae(async n=>{let o=e;return o=await o,typeof o=="function"&&(o=await o(n)),typeof o=="function"&&(o=await o(n)),toe(o)?o=await o.instantiator(n):noe(o)?o=await o.default(n):(aoe(o)&&(o=o.data),ooe(o)?typeof WebAssembly.instantiateStreaming=="function"?o=await ioe(o)(n):o=await Aoe(o)(n):roe(o)?o=await xD(o)(n):o instanceof WebAssembly.Module?o=await xD(o)(n):"default"in o&&o.default instanceof WebAssembly.Module&&(o=await xD(o.default)(n))),"instance"in o&&(o=o.instance),"exports"in o&&(o=o.exports),o})}return Uh=t(),Uh}function xD(e){return t=>WebAssembly.instantiate(e,t)}function ioe(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Aoe(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var UM;function soe(e){UM=e}function coe(){return UM}async function uoe(e){return e&&await HM(e),{createScanner(t){return new DD(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new GM(t)}}}var LD=jM({});PM(LD,SD);var dP=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>Promise.resolve().then(()=>(OM(),TM)))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>Promise.resolve().then(()=>(zM(),qM)))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(KM(),YM)))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>Promise.resolve().then(()=>(WM(),JM)))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>Promise.resolve().then(()=>(VM(),ZM)))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xE9",type:"dark",import:(()=>Promise.resolve().then(()=>(ej(),XM)))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>Promise.resolve().then(()=>(nj(),tj)))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>Promise.resolve().then(()=>(oj(),aj)))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>Promise.resolve().then(()=>(ij(),rj)))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>Promise.resolve().then(()=>(sj(),Aj)))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(uj(),cj)))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(lj(),dj)))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(gj(),pj)))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>Promise.resolve().then(()=>(fj(),mj)))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(hj(),bj)))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>Promise.resolve().then(()=>(yj(),Bj)))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>Promise.resolve().then(()=>(wj(),Cj)))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>Promise.resolve().then(()=>(kj(),Ej)))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>Promise.resolve().then(()=>(Ij(),Qj)))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>Promise.resolve().then(()=>(vj(),_j)))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>Promise.resolve().then(()=>(Dj(),xj)))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>Promise.resolve().then(()=>(Sj(),Fj)))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>Promise.resolve().then(()=>(Rj(),Lj)))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>Promise.resolve().then(()=>($j(),Nj)))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>Promise.resolve().then(()=>(jj(),Mj)))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>Promise.resolve().then(()=>(Gj(),Pj)))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>Promise.resolve().then(()=>(Uj(),Hj)))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>Promise.resolve().then(()=>(Oj(),Tj)))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>Promise.resolve().then(()=>(zj(),qj)))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>Promise.resolve().then(()=>(Kj(),Yj)))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>Promise.resolve().then(()=>(Wj(),Jj)))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>Promise.resolve().then(()=>(Vj(),Zj)))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>Promise.resolve().then(()=>(e7(),Xj)))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>Promise.resolve().then(()=>(n7(),t7)))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>Promise.resolve().then(()=>(o7(),a7)))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(i7(),r7)))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>Promise.resolve().then(()=>(s7(),A7)))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>Promise.resolve().then(()=>(u7(),c7)))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>Promise.resolve().then(()=>(l7(),d7)))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>Promise.resolve().then(()=>(g7(),p7)))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(f7(),m7)))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>Promise.resolve().then(()=>(h7(),b7)))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>Promise.resolve().then(()=>(y7(),B7)))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>Promise.resolve().then(()=>(w7(),C7)))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>Promise.resolve().then(()=>(k7(),E7)))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>Promise.resolve().then(()=>(I7(),Q7)))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>Promise.resolve().then(()=>(v7(),_7)))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>Promise.resolve().then(()=>(D7(),x7)))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>Promise.resolve().then(()=>(S7(),F7)))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>Promise.resolve().then(()=>(R7(),L7)))},{id:"red",displayName:"Red",type:"dark",import:(()=>Promise.resolve().then(()=>($7(),N7)))},{id:"rose-pine",displayName:"Ros\xE9 Pine",type:"dark",import:(()=>Promise.resolve().then(()=>(j7(),M7)))},{id:"rose-pine-dawn",displayName:"Ros\xE9 Pine Dawn",type:"light",import:(()=>Promise.resolve().then(()=>(G7(),P7)))},{id:"rose-pine-moon",displayName:"Ros\xE9 Pine Moon",type:"dark",import:(()=>Promise.resolve().then(()=>(U7(),H7)))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(O7(),T7)))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>Promise.resolve().then(()=>(z7(),q7)))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>Promise.resolve().then(()=>(K7(),Y7)))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(W7(),J7)))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>Promise.resolve().then(()=>(V7(),Z7)))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>Promise.resolve().then(()=>(eP(),X7)))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>Promise.resolve().then(()=>(nP(),tP)))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>Promise.resolve().then(()=>(oP(),aP)))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>Promise.resolve().then(()=>(iP(),rP)))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(sP(),AP)))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>Promise.resolve().then(()=>(uP(),cP)))}],lP=Object.fromEntries(dP.map(e=>[e.id,e.import]));var qe=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function wre(e){return TD(e)}function TD(e){return Array.isArray(e)?Ere(e):e instanceof RegExp?e:typeof e=="object"?kre(e):e}function Ere(e){let t=[];for(let n=0,o=e.length;n<o;n++)t[n]=TD(e[n]);return t}function kre(e){let t={};for(let n in e)t[n]=TD(e[n]);return t}function CP(e,...t){return t.forEach(n=>{for(let o in n)e[o]=n[o]}),e}function wP(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?wP(e.substring(0,e.length-1)):e.substr(~t+1)}var RD=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,qh=class{static hasCaptures(e){return e===null?!1:(RD.lastIndex=0,RD.test(e))}static replaceCaptures(e,t,n){return e.replace(RD,(o,a,r,i)=>{let A=n[parseInt(a||r,10)];if(A){let s=t.substring(A.start,A.end);for(;s[0]===".";)s=s.substring(1);switch(i){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return o})}};function EP(e,t){return e<t?-1:e>t?1:0}function kP(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,o=t.length;if(n===o){for(let a=0;a<n;a++){let r=EP(e[a],t[a]);if(r!==0)return r}return 0}return n-o}function pP(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function QP(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var IP=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},qp=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(_re(e),t)}static createFromParsedTheme(e,t){return xre(e,t)}_cachedMatchRoot=new IP(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,o=this._cachedMatchRoot.get(t).find(a=>Qre(e.parent,a.parentScopes));return o?new _P(o.fontStyle,o.foreground,o.background):null}},ND=class zh{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(let o of n)t=new zh(t,o);return t}static from(...t){let n=null;for(let o=0;o<t.length;o++)n=new zh(n,t[o]);return n}push(t){return new zh(this,t)}getSegments(){let t=this,n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){let n=[],o=this;for(;o&&o!==t;)n.push(o.scopeName),o=o.parent;return o===t?n.reverse():void 0}};function Qre(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let o=t[n],a=!1;if(o===">"){if(n===t.length-1)return!1;o=t[++n],a=!0}for(;e&&!Ire(e.scopeName,o);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Ire(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var _P=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function _re(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],o=0;for(let a=0,r=t.length;a<r;a++){let i=t[a];if(!i.settings)continue;let A;if(typeof i.scope=="string"){let l=i.scope;l=l.replace(/^[,]+/,""),l=l.replace(/[,]+$/,""),A=l.split(",")}else Array.isArray(i.scope)?A=i.scope:A=[""];let s=-1;if(typeof i.settings.fontStyle=="string"){s=0;let l=i.settings.fontStyle.split(" ");for(let p=0,g=l.length;p<g;p++)switch(l[p]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let c=null;typeof i.settings.foreground=="string"&&pP(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&pP(i.settings.background)&&(u=i.settings.background);for(let l=0,p=A.length;l<p;l++){let m=A[l].trim().split(" "),h=m[m.length-1],y=null;m.length>1&&(y=m.slice(0,m.length-1),y.reverse()),n[o++]=new vre(h,y,a,s,c,u)}}return n}var vre=class{constructor(e,t,n,o,a,r){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=o,this.foreground=a,this.background=r}},$n=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($n||{});function xre(e,t){e.sort((s,c)=>{let u=EP(s.scope,c.scope);return u!==0||(u=kP(s.parentScopes,c.parentScopes),u!==0)?u:s.index-c.index});let n=0,o="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let s=e.shift();s.fontStyle!==-1&&(n=s.fontStyle),s.foreground!==null&&(o=s.foreground),s.background!==null&&(a=s.background)}let r=new Dre(t),i=new _P(n,r.getId(o),r.getId(a)),A=new Sre(new MD(0,null,-1,0,0),[]);for(let s=0,c=e.length;s<c;s++){let u=e[s];A.insert(0,u.scope,u.parentScopes,u.fontStyle,r.getId(u.foreground),r.getId(u.background))}return new qp(r,i,A)}var Dre=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Fre=Object.freeze([]),MD=class vP{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,o,a,r){this.scopeDepth=t,this.parentScopes=n||Fre,this.fontStyle=o,this.foreground=a,this.background=r}clone(){return new vP(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let o=0,a=t.length;o<a;o++)n[o]=t[o].clone();return n}acceptOverwrite(t,n,o,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),o!==0&&(this.foreground=o),a!==0&&(this.background=a)}},Sre=class jD{constructor(t,n=[],o={}){this._mainRule=t,this._children=o,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let o=0,a=0;for(;t.parentScopes[o]===">"&&o++,n.parentScopes[a]===">"&&a++,!(o>=t.parentScopes.length||a>=n.parentScopes.length);){let r=n.parentScopes[a].length-t.parentScopes[o].length;if(r!==0)return r;o++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let o=t.indexOf("."),a,r;if(o===-1?(a=t,r=""):(a=t.substring(0,o),r=t.substring(o+1)),this._children.hasOwnProperty(a))return this._children[a].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(jD._cmpBySpecificity),n}insert(t,n,o,a,r,i){if(n===""){this._doInsertHere(t,o,a,r,i);return}let A=n.indexOf("."),s,c;A===-1?(s=n,c=""):(s=n.substring(0,A),c=n.substring(A+1));let u;this._children.hasOwnProperty(s)?u=this._children[s]:(u=new jD(this._mainRule.clone(),MD.cloneArr(this._rulesWithParentScopes)),this._children[s]=u),u.insert(t+1,c,o,a,r,i)}_doInsertHere(t,n,o,a,r){if(n===null){this._mainRule.acceptOverwrite(t,o,a,r);return}for(let i=0,A=this._rulesWithParentScopes.length;i<A;i++){let s=this._rulesWithParentScopes[i];if(kP(s.parentScopes,n)===0){s.acceptOverwrite(t,o,a,r);return}}o===-1&&(o=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),r===0&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new MD(t,n,o,a,r))}},Rs=class mo{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){let n=mo.getLanguageId(t),o=mo.getTokenType(t),a=mo.getFontStyle(t),r=mo.getForeground(t),i=mo.getBackground(t);console.log({languageId:n,tokenType:o,fontStyle:a,foreground:r,background:i})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,o,a,r,i,A){let s=mo.getLanguageId(t),c=mo.getTokenType(t),u=mo.containsBalancedBrackets(t)?1:0,l=mo.getFontStyle(t),p=mo.getForeground(t),g=mo.getBackground(t);return n!==0&&(s=n),o!==8&&(c=o),a!==null&&(u=a?1:0),r!==-1&&(l=r),i!==0&&(p=i),A!==0&&(g=A),(s<<0|c<<8|u<<10|l<<11|p<<15|g<<24)>>>0}};function Kh(e,t){let n=[],o=Lre(e),a=o.next();for(;a!==null;){let s=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=o.next()}let c=i();if(n.push({matcher:c,priority:s}),a!==",")break;a=o.next()}return n;function r(){if(a==="-"){a=o.next();let s=r();return c=>!!s&&!s(c)}if(a==="("){a=o.next();let s=A();return a===")"&&(a=o.next()),s}if(gP(a)){let s=[];do s.push(a),a=o.next();while(gP(a));return c=>t(s,c)}return null}function i(){let s=[],c=r();for(;c;)s.push(c),c=r();return u=>s.every(l=>l(u))}function A(){let s=[],c=i();for(;c&&(s.push(c),a==="|"||a===",");){do a=o.next();while(a==="|"||a===",");c=i()}return u=>s.some(l=>l(u))}}function gP(e){return!!e&&!!e.match(/[\w\.:]+/)}function Lre(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let o=n[0];return n=t.exec(e),o}}}function xP(e){typeof e.dispose=="function"&&e.dispose()}var zp=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Rre=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Nre=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},$re=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new zp(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Nre;for(let n of e)Mre(n,this.initialScopeName,this.repo,t);for(let n of t.references)if(n instanceof zp){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Mre(e,t,n,o){let a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}let r=n.lookup(t);e instanceof zp?Yh({baseGrammar:r,selfGrammar:a},o):PD(e.ruleName,{baseGrammar:r,selfGrammar:a,repository:a.repository},o);let i=n.injections(e.scopeName);if(i)for(let A of i)o.add(new zp(A))}function PD(e,t,n){if(t.repository&&t.repository[e]){let o=t.repository[e];Jh([o],t,n)}}function Yh(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Jh(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Jh(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Jh(e,t,n){for(let o of e){if(n.visitedRule.has(o))continue;n.visitedRule.add(o);let a=o.repository?CP({},t.repository,o.repository):t.repository;Array.isArray(o.patterns)&&Jh(o.patterns,{...t,repository:a},n);let r=o.include;if(!r)continue;let i=DP(r);switch(i.kind){case 0:Yh({...t,selfGrammar:t.baseGrammar},n);break;case 1:Yh(t,n);break;case 2:PD(i.ruleName,{...t,repository:a},n);break;case 3:case 4:let A=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(A){let s={baseGrammar:t.baseGrammar,selfGrammar:A,repository:a};i.kind===4?PD(i.ruleName,s,n):Yh(s,n)}else i.kind===4?n.add(new Rre(i.scopeName,i.ruleName)):n.add(new zp(i.scopeName));break}}}var jre=class{kind=0},Pre=class{kind=1},Gre=class{constructor(e){this.ruleName=e}kind=2},Hre=class{constructor(e){this.scopeName=e}kind=3},Ure=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function DP(e){if(e==="$base")return new jre;if(e==="$self")return new Pre;let t=e.indexOf("#");if(t===-1)return new Hre(e);if(t===0)return new Gre(e.substring(1));{let n=e.substring(0,t),o=e.substring(t+1);return new Ure(n,o)}}var Tre=/\\(\d+)/,mP=/\\(\d+)/g;var Ore=-1,FP=-2;var Jp=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,o){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=qh.hasCaptures(this._name),this._contentName=o||null,this._contentNameIsCapturing=qh.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${wP(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:qh.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:qh.replaceCaptures(this._contentName,e,t)}},qre=class extends Jp{retokenizeCapturedWithRuleId;constructor(e,t,n,o,a){super(e,t,n,o),this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,o){throw new Error("Not supported!")}},zre=class extends Jp{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,o,a){super(e,t,n,null),this._match=new Yp(o,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,o){return this._getCachedCompiledPatterns(e).compileAG(e,n,o)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Kp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},fP=class extends Jp{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,o,a){super(e,t,n,o),this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,o){return this._getCachedCompiledPatterns(e).compileAG(e,n,o)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Kp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},GD=class extends Jp{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,o,a,r,i,A,s,c){super(e,t,n,o),this._begin=new Yp(a,this.id),this.beginCaptures=r,this._end=new Yp(i||"\uFFFF",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=A,this.applyEndPatternLast=s||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,o){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,o)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Kp;for(let n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Wh=class extends Jp{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,o,a,r,i,A,s){super(e,t,n,o),this._begin=new Yp(a,this.id),this.beginCaptures=r,this.whileCaptures=A,this._while=new Yp(i,FP),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,o){return this._getCachedCompiledPatterns(e).compileAG(e,n,o)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Kp;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,o){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,o)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Kp,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"\uFFFF"),this._cachedCompiledWhilePatterns}},SP=class Kn{static createCaptureRule(t,n,o,a,r){return t.registerRule(i=>new qre(n,i,o,a,r))}static getCompiledRuleId(t,n,o){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new zre(t.$vscodeTextmateLocation,t.id,t.name,t.match,Kn._compileCaptures(t.captures,n,o));if(typeof t.begin>"u"){t.repository&&(o=CP({},o,t.repository));let r=t.patterns;return typeof r>"u"&&t.include&&(r=[{include:t.include}]),new fP(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Kn._compilePatterns(r,n,o))}return t.while?new Wh(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Kn._compileCaptures(t.beginCaptures||t.captures,n,o),t.while,Kn._compileCaptures(t.whileCaptures||t.captures,n,o),Kn._compilePatterns(t.patterns,n,o)):new GD(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Kn._compileCaptures(t.beginCaptures||t.captures,n,o),t.end,Kn._compileCaptures(t.endCaptures||t.captures,n,o),t.applyEndPatternLast,Kn._compilePatterns(t.patterns,n,o))}),t.id}static _compileCaptures(t,n,o){let a=[];if(t){let r=0;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let A=parseInt(i,10);A>r&&(r=A)}for(let i=0;i<=r;i++)a[i]=null;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let A=parseInt(i,10),s=0;t[i].patterns&&(s=Kn.getCompiledRuleId(t[i],n,o)),a[A]=Kn.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,s)}}return a}static _compilePatterns(t,n,o){let a=[];if(t)for(let r=0,i=t.length;r<i;r++){let A=t[r],s=-1;if(A.include){let c=DP(A.include);switch(c.kind){case 0:case 1:s=Kn.getCompiledRuleId(o[A.include],n,o);break;case 2:let u=o[c.ruleName];u&&(s=Kn.getCompiledRuleId(u,n,o));break;case 3:case 4:let l=c.scopeName,p=c.kind===4?c.ruleName:null,g=n.getExternalGrammar(l,o);if(g)if(p){let m=g.repository[p];m&&(s=Kn.getCompiledRuleId(m,n,g.repository))}else s=Kn.getCompiledRuleId(g.repository.$self,n,g.repository);break}}else s=Kn.getCompiledRuleId(A,n,o);if(s!==-1){let c=n.getRule(s),u=!1;if((c instanceof fP||c instanceof GD||c instanceof Wh)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;a.push(s)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},Yp=class LP{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){let o=t.length,a=0,r=[],i=!1;for(let A=0;A<o;A++)if(t.charAt(A)==="\\"&&A+1<o){let c=t.charAt(A+1);c==="z"?(r.push(t.substring(a,A)),r.push("$(?!\\n)(?<!\\n)"),a=A+2):(c==="A"||c==="G")&&(i=!0),A++}this.hasAnchor=i,a===0?this.source=t:(r.push(t.substring(a,o)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Tre.test(this.source):this.hasBackReferences=!1}clone(){return new LP(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let o=n.map(a=>t.substring(a.start,a.end));return mP.lastIndex=0,this.source.replace(mP,(a,r)=>QP(o[parseInt(r,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],o=[],a=[],r,i,A,s;for(r=0,i=this.source.length;r<i;r++)A=this.source.charAt(r),t[r]=A,n[r]=A,o[r]=A,a[r]=A,A==="\\"&&r+1<i&&(s=this.source.charAt(r+1),s==="A"?(t[r+1]="\uFFFF",n[r+1]="\uFFFF",o[r+1]="A",a[r+1]="A"):s==="G"?(t[r+1]="\uFFFF",n[r+1]="G",o[r+1]="\uFFFF",a[r+1]="G"):(t[r+1]=s,n[r+1]=s,o[r+1]=s,a[r+1]=s),r++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:o.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Kp=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new bP(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let o=this._items.map(a=>a.resolveAnchors(t,n));return new bP(e,o,this._items.map(a=>a.ruleId))}},bP=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
76
76
|
`)}findNextMatchSync(e,t,n){let o=this.scanner.findNextMatchSync(e,t,n);return o?{ruleId:this.rules[o.index],captureIndices:o.captureIndices}:null}},$D=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Yre=class HD{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new $D(t,8),this._embeddedLanguagesMatcher=new Kre(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?HD._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new $D(0,0);_getBasicScopeAttributes=new IP(t=>{let n=this._scopeToLanguage(t),o=this._toStandardTokenType(t);return new $D(n,o)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){let n=t.match(HD.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Kre=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([n,o])=>QP(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},kDe={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},RP=!1,hP=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function NP(e,t,n,o,a,r,i,A){let s=t.content.length,c=!1,u=-1;if(i){let g=Jre(e,t,n,o,a,r);a=g.stack,o=g.linePos,n=g.isFirstLine,u=g.anchorPosition}let l=Date.now();for(;!c;){if(A!==0&&Date.now()-l>A)return new hP(a,!0);p()}return new hP(a,!1);function p(){let g=Wre(e,t,n,o,a,u);if(!g){r.produce(a,s),c=!0;return}let m=g.captureIndices,h=g.matchedRuleId,y=m&&m.length>0?m[0].end>o:!1;if(h===Ore){let f=a.getRule(e);r.produce(a,m[0].start),a=a.withContentNameScopesList(a.nameScopesList),Tp(e,t,n,a,r,f.endCaptures,m),r.produce(a,m[0].end);let b=a;if(a=a.parent,u=b.getAnchorPos(),!y&&b.getEnterPos()===o){a=b,r.produce(a,s),c=!0;return}}else{let f=e.getRule(h);r.produce(a,m[0].start);let b=a,B=f.getName(t.content,m),C=a.contentNameScopesList.pushAttributed(B,e);if(a=a.push(h,o,u,m[0].end===s,null,C,C),f instanceof GD){let E=f;Tp(e,t,n,a,r,E.beginCaptures,m),r.produce(a,m[0].end),u=m[0].end;let x=E.getContentName(t.content,m),Q=C.pushAttributed(x,e);if(a=a.withContentNameScopesList(Q),E.endHasBackReferences&&(a=a.withEndRule(E.getEndWithResolvedBackReferences(t.content,m))),!y&&b.hasSameRuleAs(a)){a=a.pop(),r.produce(a,s),c=!0;return}}else if(f instanceof Wh){let E=f;Tp(e,t,n,a,r,E.beginCaptures,m),r.produce(a,m[0].end),u=m[0].end;let x=E.getContentName(t.content,m),Q=C.pushAttributed(x,e);if(a=a.withContentNameScopesList(Q),E.whileHasBackReferences&&(a=a.withEndRule(E.getWhileWithResolvedBackReferences(t.content,m))),!y&&b.hasSameRuleAs(a)){a=a.pop(),r.produce(a,s),c=!0;return}}else if(Tp(e,t,n,a,r,f.captures,m),r.produce(a,m[0].end),a=a.pop(),!y){a=a.safePop(),r.produce(a,s),c=!0;return}}m[0].end>o&&(o=m[0].end,n=!1)}}function Jre(e,t,n,o,a,r){let i=a.beginRuleCapturedEOL?0:-1,A=[];for(let s=a;s;s=s.pop()){let c=s.getRule(e);c instanceof Wh&&A.push({rule:c,stack:s})}for(let s=A.pop();s;s=A.pop()){let{ruleScanner:c,findOptions:u}=Xre(s.rule,e,s.stack.endRule,n,o===i),l=c.findNextMatchSync(t,o,u);if(l){if(l.ruleId!==FP){a=s.stack.pop();break}l.captureIndices&&l.captureIndices.length&&(r.produce(s.stack,l.captureIndices[0].start),Tp(e,t,n,s.stack,r,s.rule.whileCaptures,l.captureIndices),r.produce(s.stack,l.captureIndices[0].end),i=l.captureIndices[0].end,l.captureIndices[0].end>o&&(o=l.captureIndices[0].end,n=!1))}else{a=s.stack.pop();break}}return{stack:a,linePos:o,anchorPosition:i,isFirstLine:n}}function Wre(e,t,n,o,a,r){let i=Zre(e,t,n,o,a,r),A=e.getInjections();if(A.length===0)return i;let s=Vre(A,e,t,n,o,a,r);if(!s)return i;if(!i)return s;let c=i.captureIndices[0].start,u=s.captureIndices[0].start;return u<c||s.priorityMatch&&u===c?s:i}function Zre(e,t,n,o,a,r){let i=a.getRule(e),{ruleScanner:A,findOptions:s}=$P(i,e,a.endRule,n,o===r),c=A.findNextMatchSync(t,o,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Vre(e,t,n,o,a,r,i){let A=Number.MAX_VALUE,s=null,c,u=0,l=r.contentNameScopesList.getScopeNames();for(let p=0,g=e.length;p<g;p++){let m=e[p];if(!m.matcher(l))continue;let h=t.getRule(m.ruleId),{ruleScanner:y,findOptions:f}=$P(h,t,null,o,a===i),b=y.findNextMatchSync(n,a,f);if(!b)continue;let B=b.captureIndices[0].start;if(!(B>=A)&&(A=B,s=b.captureIndices,c=b.ruleId,u=m.priority,A===a))break}return s?{priorityMatch:u===-1,captureIndices:s,matchedRuleId:c}:null}function $P(e,t,n,o,a){if(RP){let i=e.compile(t,n),A=MP(o,a);return{ruleScanner:i,findOptions:A}}return{ruleScanner:e.compileAG(t,n,o,a),findOptions:0}}function Xre(e,t,n,o,a){if(RP){let i=e.compileWhile(t,n),A=MP(o,a);return{ruleScanner:i,findOptions:A}}return{ruleScanner:e.compileWhileAG(t,n,o,a),findOptions:0}}function MP(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function Tp(e,t,n,o,a,r,i){if(r.length===0)return;let A=t.content,s=Math.min(r.length,i.length),c=[],u=i[0].end;for(let l=0;l<s;l++){let p=r[l];if(p===null)continue;let g=i[l];if(g.length===0)continue;if(g.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=g.start;)a.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?a.produceFromScopes(c[c.length-1].scopes,g.start):a.produce(o,g.start),p.retokenizeCapturedWithRuleId){let h=p.getName(A,i),y=o.contentNameScopesList.pushAttributed(h,e),f=p.getContentName(A,i),b=y.pushAttributed(f,e),B=o.push(p.retokenizeCapturedWithRuleId,g.start,-1,!1,null,y,b),C=e.createOnigString(A.substring(0,g.end));NP(e,C,n&&g.start===0,g.start,B,a,!1,0),xP(C);continue}let m=p.getName(A,i);if(m!==null){let y=(c.length>0?c[c.length-1].scopes:o.contentNameScopesList).pushAttributed(m,e);c.push(new eie(y,g.end))}}for(;c.length>0;)a.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var eie=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function tie(e,t,n,o,a,r,i,A){return new aie(e,t,n,o,a,r,i,A)}function BP(e,t,n,o,a){let r=Kh(t,Zh),i=SP.getCompiledRuleId(n,o,a.repository);for(let A of r)e.push({debugSelector:t,matcher:A.matcher,ruleId:i,grammar:a,priority:A.priority})}function Zh(e,t){if(t.length<e.length)return!1;let n=0;return e.every(o=>{for(let a=n;a<t.length;a++)if(nie(t[a],o))return n=a+1,!0;return!1})}function nie(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var aie=class{constructor(e,t,n,o,a,r,i,A){if(this._rootScopeName=e,this.balancedBracketSelectors=r,this._onigLib=A,this._basicScopeAttributesProvider=new Yre(n,o),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=yP(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(let s of Object.keys(a)){let c=Kh(s,Zh);for(let u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:a[s]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:a=>a===this._rootScopeName?this._grammar:this.getExternalGrammar(a),injections:a=>this._grammarRepository.injections(a)},t=[],n=this._rootScopeName,o=e.lookup(n);if(o){let a=o.injections;if(a)for(let i in a)BP(t,i,a[i],this,o);let r=this._grammarRepository.injections(n);r&&r.forEach(i=>{let A=this.getExternalGrammar(i);if(A){let s=A.injectionSelector;s&&BP(t,s,A,this,A)}})}return t.sort((a,r)=>a.priority-r.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=yP(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let o=this._tokenize(e,t,!1,n);return{tokens:o.lineTokens.getResult(o.ruleStack,o.lineLength),ruleStack:o.ruleStack,stoppedEarly:o.stoppedEarly}}tokenizeLine2(e,t,n=0){let o=this._tokenize(e,t,!0,n);return{tokens:o.lineTokens.getBinaryResult(o.ruleStack,o.lineLength),ruleStack:o.ruleStack,stoppedEarly:o.stoppedEarly}}_tokenize(e,t,n,o){this._rootId===-1&&(this._rootId=SP.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===UD.NULL){a=!0;let c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),l=Rs.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),p=this.getRule(this._rootId).getName(null,null),g;p?g=Op.createRootAndLookUpScopeName(p,l,this):g=Op.createRoot("unknown",l),t=new UD(null,this._rootId,-1,-1,!1,null,g,g)}else a=!1,t.reset();e=e+`
|
|
77
77
|
`;let r=this.createOnigString(e),i=r.content.length,A=new rie(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),s=NP(this,r,a,0,t,A,!0,o);return xP(r),{lineLength:i,lineTokens:A,ruleStack:s.stack,stoppedEarly:s.stoppedEarly}}};function yP(e,t){return e=wre(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Op=class Ir{constructor(t,n,o){this.parent=t,this.scopePath=n,this.tokenAttributes=o}static fromExtension(t,n){let o=t,a=t?.scopePath??null;for(let r of n)a=ND.push(a,r.scopeNames),o=new Ir(o,a,r.encodedTokenAttributes);return o}static createRoot(t,n){return new Ir(null,new ND(null,t),n)}static createRootAndLookUpScopeName(t,n,o){let a=o.getMetadataForScope(t),r=new ND(null,t),i=o.themeProvider.themeMatch(r),A=Ir.mergeAttributes(n,a,i);return new Ir(null,r,A)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Ir.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,o){let a=-1,r=0,i=0;return o!==null&&(a=o.fontStyle,r=o.foregroundId,i=o.backgroundId),Rs.set(t,n.languageId,n.tokenType,null,a,r,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Ir._pushAttributed(this,t,n);let o=t.split(/ /g),a=this;for(let r of o)a=Ir._pushAttributed(a,r,n);return a}static _pushAttributed(t,n,o){let a=o.getMetadataForScope(n),r=t.scopePath.push(n),i=o.themeProvider.themeMatch(r),A=Ir.mergeAttributes(t.tokenAttributes,a,i);return new Ir(t,r,A)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){let n=[],o=this;for(;o&&o!==t;)n.push({encodedTokenAttributes:o.tokenAttributes,scopeNames:o.scopePath.getExtensionIfDefined(o.parent?.scopePath??null)}),o=o.parent;return o===t?n.reverse():void 0}},UD=class Ls{constructor(t,n,o,a,r,i,A,s){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=r,this.endRule=i,this.nameScopesList=A,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=o,this._anchorPos=a}_stackElementBrand=void 0;static NULL=new Ls(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Ls._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Op.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Ls._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,o,a,r,i,A){return new Ls(this,t,n,o,a,r,i,A)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){let t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Ls(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let o=Op.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Ls(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,o,Op.fromExtension(o,n.contentNameScopesList))}},oie=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Kh(n,Zh).map(o=>o.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Kh(n,Zh).map(o=>o.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},rie=class{constructor(e,t,n,o){this.balancedBracketSelectors=o,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let o=e?.tokenAttributes??0,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let r=e?.getScopeNames()??[];for(let i of this._tokenTypeOverrides)i.matcher(r)&&(o=Rs.set(o,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(r))}if(a&&(o=Rs.set(o,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===o){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(o),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let o=0,a=this._binaryTokens.length;o<a;o++)n[o]=this._binaryTokens[o];return n}},iie=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,o,a){if(!this._grammars.has(e)){let r=this._rawGrammars.get(e);if(!r)return null;this._grammars.set(e,tie(e,r,t,n,o,a,this,this._onigLib))}return this._grammars.get(e)}},jP=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new iie(qp.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(qp.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new oie(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,o,a){let r=new $re(this._syncRegistry,e);for(;r.Q.length>0;)r.Q.map(i=>this._loadSingleGrammar(i.scopeName)),r.processQueue();return this._grammarForScopeName(e,t,n,o,a)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,o=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,o)}_grammarForScopeName(e,t=0,n=null,o=null,a=null){return this._syncRegistry.grammarForScopeName(e,t,n,o,a)}},Vh=UD.NULL;function Zp(e,t){let n=typeof e=="string"?{}:{...e.colorReplacements},o=typeof e=="string"?e:e.name;for(let[a,r]of Object.entries(t?.colorReplacements||{}))typeof r=="string"?n[a]=r:a===o&&Object.assign(n,r);return n}function Ci(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function TP(e){return Array.isArray(e)?e:[e]}async function OD(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Vp(e){return!e||["plaintext","txt","text","plain"].includes(e)}function qD(e){return e==="ansi"||Vp(e)}function Xp(e){return e==="none"}function zD(e){return Xp(e)}var Aie=/(\r?\n)/g;function Zu(e,t=!1){if(e.length===0)return[["",0]];let n=e.split(Aie),o=0,a=[];for(let r=0;r<n.length;r+=2){let i=t?n[r]+(n[r+1]||""):n[r];a.push([i,o]),o+=n[r].length,o+=n[r+1]?.length||0}return a}var PP={light:"#333333",dark:"#bbbbbb"},GP={light:"#fffffe",dark:"#1e1e1e"},HP="__shiki_resolved";function Xh(e){if(e?.[HP])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:o}=t;if(!n||!o){let A=t.settings?t.settings.find(s=>!s.name&&!s.scope):void 0;A?.settings?.foreground&&(o=A.settings.foreground),A?.settings?.background&&(n=A.settings.background),!o&&t?.colors?.["editor.foreground"]&&(o=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),o||(o=t.type==="light"?PP.light:PP.dark),n||(n=t.type==="light"?GP.light:GP.dark),t.fg=o,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0,r=new Map;function i(A){if(r.has(A))return r.get(A);a+=1;let s=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${s}`]?i(A):(r.set(A,s),s)}t.settings=t.settings.map(A=>{let s=A.settings?.foreground&&!A.settings.foreground.startsWith("#"),c=A.settings?.background&&!A.settings.background.startsWith("#");if(!s&&!c)return A;let u={...A,settings:{...A.settings}};if(s){let l=i(A.settings.foreground);t.colorReplacements[l]=A.settings.foreground,u.settings.foreground=l}if(c){let l=i(A.settings.background);t.colorReplacements[l]=A.settings.background,u.settings.background=l}return u});for(let A of Object.keys(t.colors||{}))if((A==="editor.foreground"||A==="editor.background"||A.startsWith("terminal.ansi"))&&!t.colors[A]?.startsWith("#")){let s=i(t.colors[A]);t.colorReplacements[s]=t.colors[A],t.colors[A]=s}return Object.defineProperty(t,HP,{enumerable:!1,writable:!1,value:!0}),t}async function OP(e){return[...new Set((await Promise.all(e.filter(t=>!qD(t)).map(async t=>await OD(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function qP(e){return(await Promise.all(e.map(async t=>zD(t)?null:Xh(await OD(t))))).filter(t=>!!t)}function zP(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new qe(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var sie=class extends jP{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,o={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=o,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Xh(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=qp.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=zP(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(a=>a.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let o=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(o.name=e.name,this._resolvedGrammars.set(e.name,o),e.aliases&&e.aliases.forEach(a=>{this._alias[a]=e.name}),this._loadedLanguagesCache=null,t.size)for(let a of t)this._resolvedGrammars.delete(a.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(a.scopeName),this._syncRegistry?._grammars?.delete(a.scopeName),this.loadLanguage(this._langMap.get(a.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let o of e)this.resolveEmbeddedLanguages(o);let t=[...this._langGraph.entries()],n=t.filter(([o,a])=>!a);if(n.length){let o=t.filter(([a,r])=>r?(r.embeddedLanguages||r.embeddedLangs)?.some(i=>n.map(([A])=>A).includes(i)):!1).filter(a=>!n.includes(a));throw new qe(`Missing languages ${n.map(([a])=>`\`${a}\``).join(", ")}, required by ${o.map(([a])=>`\`${a}\``).join(", ")}`)}for(let[o,a]of t)this._resolver.addLanguage(a);for(let[o,a]of t)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let n of t)this._langGraph.set(n,this._langMap.get(n))}},cie=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let o=1;o<=t.length;o++){let a=t.slice(0,o).join(".");n=[...n,...this._injections.get(a)||[]]}return n}},Wp=0;function YD(e){Wp+=1,e.warnings!==!1&&Wp>=10&&Wp%10===0&&console.warn(`[Shiki] ${Wp} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new qe("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),o=(e.themes||[]).flat(1).map(Xh),a=new sie(new cie(e.engine,n),o,n,e.langAlias),r;function i(b){return zP(b,e.langAlias)}function A(b){y();let B=a.getGrammar(typeof b=="string"?b:b.name);if(!B)throw new qe(`Language \`${b}\` not found, you may need to load it first`);return B}function s(b){if(b==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();let B=a.getTheme(b);if(!B)throw new qe(`Theme \`${b}\` not found, you may need to load it first`);return B}function c(b){y();let B=s(b);return r!==b&&(a.setTheme(B),r=b),{theme:B,colorMap:a.getColorMap()}}function u(){return y(),a.getLoadedThemes()}function l(){return y(),a.getLoadedLanguages()}function p(...b){y(),a.loadLanguages(b.flat(1))}async function g(...b){return p(await OP(b))}function m(...b){y();for(let B of b.flat(1))a.loadTheme(B)}async function h(...b){return y(),m(await qP(b))}function y(){if(t)throw new qe("Shiki instance has been disposed")}function f(){t||(t=!0,a.dispose(),Wp-=1)}return{setTheme:c,getTheme:s,getLanguage:A,getLoadedThemes:u,getLoadedLanguages:l,resolveLangAlias:i,loadLanguage:g,loadLanguageSync:p,loadTheme:h,loadThemeSync:m,dispose:f,[Symbol.dispose]:f}}async function KD(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,o]=await Promise.all([qP(e.themes||[]),OP(e.langs||[]),e.engine]);return YD({...e,themes:t,langs:n,engine:o})}var YP=new WeakMap;function eg(e,t){YP.set(e,t)}function Vu(e){return YP.get(e)}var eB=class KP{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new KP(Object.fromEntries(TP(n).map(o=>[o,Vh])),t)}constructor(...t){if(t.length===2){let[n,o]=t;this.lang=o,this._stacks=n}else{let[n,o,a]=t;this.lang=o,this._stacks={[a]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return uie(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function uie(e){let t=[],n=new Set;function o(a){if(n.has(a))return;n.add(a);let r=a?.nameScopesList?.scopeName;r&&t.push(r),a.parent&&o(a.parent)}return o(e),t}function die(e,t){if(!(e instanceof eB))throw new qe("Invalid grammar state");return e.getInternalStack(t)}var lie=/,/,pie=/ /;function JD(e,t,n={}){let{theme:o=e.getLoadedThemes()[0]}=n;if(Vp(e.resolveLangAlias(n.lang||"text"))||Xp(o))return Zu(t).map(A=>[{content:A[0],offset:A[1]}]);let{theme:a,colorMap:r}=e.setTheme(o),i=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==i.name)throw new qe(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(a.name))throw new qe(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return WP(t,i,a,r,n)}function JP(...e){if(e.length===2)return Vu(e[1]);let[t,n,o={}]=e,{lang:a="text",theme:r=t.getLoadedThemes()[0]}=o;if(Vp(a)||Xp(r))throw new qe("Plain language does not have grammar state");if(a==="ansi")throw new qe("ANSI language does not have grammar state");let{theme:i,colorMap:A}=t.setTheme(r),s=t.getLanguage(a);return new eB(WD(n,s,i,A,o).stateStack,s.name,i.name)}function WP(e,t,n,o,a){let r=WD(e,t,n,o,a),i=new eB(r.stateStack,t.name,n.name);return eg(r.tokens,i),r.tokens}function WD(e,t,n,o,a){let r=Zp(n,a),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:A=500}=a,s=Zu(e),c=a.grammarState?die(a.grammarState,n.name)??Vh:a.grammarContextCode!=null?WD(a.grammarContextCode,t,n,o,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:Vh,u=[],l=[];for(let p=0,g=s.length;p<g;p++){let[m,h]=s[p];if(m===""){u=[],l.push([]);continue}if(i>0&&m.length>=i){u=[],l.push([{content:m,offset:h,color:"",fontStyle:0}]);continue}let y,f,b;a.includeExplanation&&(y=t.tokenizeLine(m,c,A),f=y.tokens,b=0);let B=t.tokenizeLine2(m,c,A),C=B.tokens.length/2;for(let E=0;E<C;E++){let x=B.tokens[2*E],Q=E+1<C?B.tokens[2*E+2]:m.length;if(x===Q)continue;let R=B.tokens[2*E+1],q=Ci(o[Rs.getForeground(R)],r),J=Rs.getFontStyle(R),Re={content:m.substring(x,Q),offset:h+x,color:q,fontStyle:J};if(a.includeExplanation){let ue=[];if(a.includeExplanation!=="scopeName")for(let we of n.settings){let He;switch(typeof we.scope){case"string":He=we.scope.split(lie).map(wt=>wt.trim());break;case"object":He=we.scope;break;default:continue}ue.push({settings:we,selectors:He.map(wt=>wt.split(pie))})}Re.explanation=[];let Se=0;for(;x+Se<Q;){let we=f[b],He=m.substring(we.startIndex,we.endIndex);Se+=He.length,Re.explanation.push({content:He,scopes:a.includeExplanation==="scopeName"?gie(we.scopes):mie(ue,we.scopes)}),b+=1}}u.push(Re)}l.push(u),u=[],c=B.ruleStack}return{tokens:l,stateStack:c}}function gie(e){return e.map(t=>({scopeName:t}))}function mie(e,t){let n=[];for(let o=0,a=t.length;o<a;o++){let r=t[o];n[o]={scopeName:r,themeMatches:bie(e,r,t.slice(0,o))}}return n}function UP(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function fie(e,t,n){if(!UP(e.at(-1),t))return!1;let o=e.length-2,a=n.length-1;for(;o>=0&&a>=0;)UP(e[o],n[a])&&(o-=1),a-=1;return o===-1}function bie(e,t,n){let o=[];for(let{selectors:a,settings:r}of e)for(let i of a)if(fie(i,t,n)){o.push(r);break}return o}function tB(e,t,n,o=JD){let a=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),r=a.map(c=>{let u=o(e,t,{...n,theme:c.theme});return{tokens:u,state:Vu(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),i=hie(...r.map(c=>c.tokens)),A=i[0].map((c,u)=>c.map((l,p)=>{let g={content:l.content,variants:{},offset:l.offset};return"includeExplanation"in n&&n.includeExplanation&&(g.explanation=l.explanation),i.forEach((m,h)=>{let{content:y,explanation:f,offset:b,...B}=m[u][p];g.variants[a[h].color]=B}),g})),s=r[0].state?new eB(Object.fromEntries(r.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),r[0].state.lang):void 0;return s&&eg(A,s),A}function hie(...e){let t=e.map(()=>[]),n=e.length;for(let o=0;o<e[0].length;o++){let a=e.map(s=>s[o]),r=t.map(()=>[]);t.forEach((s,c)=>s.push(r[c]));let i=a.map(()=>0),A=a.map(s=>s[0]);for(;A.every(s=>s);){let s=Math.min(...A.map(c=>c.content.length));for(let c=0;c<n;c++){let u=A[c];u.content.length===s?(r[c].push(u),i[c]+=1,A[c]=a[c][i[c]]):(r[c].push({...u,content:u.content.slice(0,s)}),A[c]={...u,content:u.content.slice(s),offset:u.offset+s})}}}return t}var ZP=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var wi=class{constructor(t,n,o){this.normal=n,this.property=t,o&&(this.space=o)}};wi.prototype.normal={};wi.prototype.property={};wi.prototype.space=void 0;function ZD(e,t){let n={},o={};for(let a of e)Object.assign(n,a.property),Object.assign(o,a.normal);return new wi(n,o,t)}function tg(e){return e.toLowerCase()}var In=class{constructor(t,n){this.attribute=n,this.property=t}};In.prototype.attribute="";In.prototype.booleanish=!1;In.prototype.boolean=!1;In.prototype.commaOrSpaceSeparated=!1;In.prototype.commaSeparated=!1;In.prototype.defined=!1;In.prototype.mustUseProperty=!1;In.prototype.number=!1;In.prototype.overloadedBoolean=!1;In.prototype.property="";In.prototype.spaceSeparated=!1;In.prototype.space=void 0;var ng={};F(ng,{boolean:()=>le,booleanish:()=>Tt,commaOrSpaceSeparated:()=>va,commaSeparated:()=>_A,number:()=>G,overloadedBoolean:()=>nB,spaceSeparated:()=>ze});var Bie=0,le=Ns(),Tt=Ns(),nB=Ns(),G=Ns(),ze=Ns(),_A=Ns(),va=Ns();function Ns(){return 2**++Bie}var VD=Object.keys(ng),$s=class extends In{constructor(t,n,o,a){let r=-1;if(super(t,n),VP(this,"space",a),typeof o=="number")for(;++r<VD.length;){let i=VD[r];VP(this,VD[r],(o&ng[i])===ng[i])}}};$s.prototype.defined=!0;function VP(e,t,n){n&&(e[t]=n)}function fo(e){let t={},n={};for(let[o,a]of Object.entries(e.properties)){let r=new $s(o,e.transform(e.attributes||{},o),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(r.mustUseProperty=!0),t[o]=r,n[tg(o)]=o,n[tg(r.attribute)]=o}return new wi(t,n,e.space)}var XD=fo({properties:{ariaActiveDescendant:null,ariaAtomic:Tt,ariaAutoComplete:null,ariaBusy:Tt,ariaChecked:Tt,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:ze,ariaCurrent:null,ariaDescribedBy:ze,ariaDetails:null,ariaDisabled:Tt,ariaDropEffect:ze,ariaErrorMessage:null,ariaExpanded:Tt,ariaFlowTo:ze,ariaGrabbed:Tt,ariaHasPopup:null,ariaHidden:Tt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ze,ariaLevel:G,ariaLive:null,ariaModal:Tt,ariaMultiLine:Tt,ariaMultiSelectable:Tt,ariaOrientation:null,ariaOwns:ze,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:Tt,ariaReadOnly:Tt,ariaRelevant:null,ariaRequired:Tt,ariaRoleDescription:ze,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:Tt,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function aB(e,t){return t in e?e[t]:t}function oB(e,t){return aB(e,t.toLowerCase())}var XP=fo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_A,acceptCharset:ze,accessKey:ze,action:null,allow:null,allowFullScreen:le,allowPaymentRequest:le,allowUserMedia:le,alt:null,as:null,async:le,autoCapitalize:null,autoComplete:ze,autoFocus:le,autoPlay:le,blocking:ze,capture:null,charSet:null,checked:le,cite:null,className:ze,cols:G,colSpan:null,content:null,contentEditable:Tt,controls:le,controlsList:ze,coords:G|_A,crossOrigin:null,data:null,dateTime:null,decoding:null,default:le,defer:le,dir:null,dirName:null,disabled:le,download:nB,draggable:Tt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:le,formTarget:null,headers:ze,height:G,hidden:nB,high:G,href:null,hrefLang:null,htmlFor:ze,httpEquiv:ze,id:null,imageSizes:null,imageSrcSet:null,inert:le,inputMode:null,integrity:null,is:null,isMap:le,itemId:null,itemProp:ze,itemRef:ze,itemScope:le,itemType:ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:le,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:le,muted:le,name:null,nonce:null,noModule:le,noValidate:le,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:le,optimum:G,pattern:null,ping:ze,placeholder:null,playsInline:le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:le,referrerPolicy:null,rel:ze,required:le,reversed:le,rows:G,rowSpan:G,sandbox:ze,scope:null,scoped:le,seamless:le,selected:le,shadowRootClonable:le,shadowRootDelegatesFocus:le,shadowRootMode:null,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:Tt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:le,useMap:null,value:Tt,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ze,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:le,declare:le,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:le,noHref:le,noShade:le,noWrap:le,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:Tt,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:le,disableRemotePlayback:le,prefix:null,property:null,results:G,security:null,unselectable:null},space:"html",transform:oB});var eG=fo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:va,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:ze,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:le,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:_A,g2:_A,glyphName:_A,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:va,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:G,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:va,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:va,rev:va,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:va,requiredFeatures:va,requiredFonts:va,requiredFormats:va,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:va,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:va,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:va,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:aB});var e1=fo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}});var t1=fo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:oB});var n1=fo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}});var yie=/[A-Z]/g,tG=/-[a-z]/g,Cie=/^data[-\w.:]+$/i;function a1(e,t){let n=tg(t),o=t,a=In;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Cie.test(t)){if(t.charAt(4)==="-"){let r=t.slice(5).replace(tG,Eie);o="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{let r=t.slice(4);if(!tG.test(r)){let i=r.replace(yie,wie);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}a=$s}return new a(o,t)}function wie(e){return"-"+e.toLowerCase()}function Eie(e){return e.charAt(1).toUpperCase()}var nG=ZD([XD,XP,e1,t1,n1],"html"),rB=ZD([XD,eG,e1,t1,n1],"svg");var aG={}.hasOwnProperty;function oG(e,t){let n=t||{};function o(a,...r){let i=o.invalid,A=o.handlers;if(a&&aG.call(a,e)){let s=String(a[e]);i=aG.call(A,s)?A[s]:o.unknown}if(i)return i.call(this,a,...r)}return o.handlers=n.handlers||{},o.invalid=n.invalid,o.unknown=n.unknown,o}var kie=/["&'<>`]/g,Qie=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Iie=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,_ie=/[|\\{}()[\]^$+*?.]/g,rG=new WeakMap;function iG(e,t){if(e=e.replace(t.subset?vie(t.subset):kie,o),t.subset||t.escapeOnly)return e;return e.replace(Qie,n).replace(Iie,o);function n(a,r,i){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,i.charCodeAt(r+2),t)}function o(a,r,i){return t.format(a.charCodeAt(0),i.charCodeAt(r+1),t)}}function vie(e){let t=rG.get(e);return t||(t=xie(e),rG.set(e,t)),t}function xie(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(_ie,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}var Die=/[\dA-Fa-f]/;function AG(e,t,n){let o="&#x"+e.toString(16).toUpperCase();return n&&t&&!Die.test(String.fromCharCode(t))?o:o+";"}var Fie=/\d/;function sG(e,t,n){let o="&#"+String(e);return n&&t&&!Fie.test(String.fromCharCode(t))?o:o+";"}var cG=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var iB={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var uG=["cent","copy","divide","gt","lt","not","para","times"];var dG={}.hasOwnProperty,o1={},AB;for(AB in iB)dG.call(iB,AB)&&(o1[iB[AB]]=AB);var Sie=/[^\dA-Za-z]/;function lG(e,t,n,o){let a=String.fromCharCode(e);if(dG.call(o1,a)){let r=o1[a],i="&"+r;return n&&cG.includes(r)&&!uG.includes(r)&&(!o||t&&t!==61&&Sie.test(String.fromCharCode(t)))?i:i+";"}return""}function pG(e,t,n){let o=AG(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=lG(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){let r=sG(e,t,n.omitOptionalSemicolons);r.length<o.length&&(o=r)}return a&&(!n.useShortestReferences||a.length<o.length)?a:o}function Ei(e,t){return iG(e,Object.assign({format:pG},t))}var Lie=/^>|^->|<!--|-->|--!>|<!-$/g,Rie=[">"],Nie=["<",">"];function gG(e,t,n,o){return o.settings.bogusComments?"<?"+Ei(e.value,Object.assign({},o.settings.characterReferences,{subset:Rie}))+">":"<!--"+e.value.replace(Lie,a)+"-->";function a(r){return Ei(r,Object.assign({},o.settings.characterReferences,{subset:Nie}))}}function mG(e,t,n,o){return"<!"+(o.settings.upperDoctype?"DOCTYPE":"doctype")+(o.settings.tightDoctype?"":" ")+"html>"}function r1(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let o=0,a=n.indexOf(t);for(;a!==-1;)o++,a=n.indexOf(t,a+t.length);return o}function fG(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function bG(e){return e.join(" ").trim()}var $ie=/[ \t\n\f\r]/g;function Ms(e){return typeof e=="object"?e.type==="text"?hG(e.value):!1:hG(e)}function hG(e){return e.replace($ie,"")===""}var Xt=BG(1),i1=BG(-1),Mie=[];function BG(e){return t;function t(n,o,a){let r=n?n.children:Mie,i=(o||0)+e,A=r[i];if(!a)for(;A&&Ms(A);)i+=e,A=r[i];return A}}var jie={}.hasOwnProperty;function sB(e){return t;function t(n,o,a){return jie.call(e,n.tagName)&&e[n.tagName](n,o,a)}}var ag=sB({body:Gie,caption:A1,colgroup:A1,dd:Oie,dt:Tie,head:A1,html:Pie,li:Uie,optgroup:qie,option:zie,p:Hie,rp:yG,rt:yG,tbody:Kie,td:CG,tfoot:Jie,th:CG,thead:Yie,tr:Wie});function A1(e,t,n){let o=Xt(n,t,!0);return!o||o.type!=="comment"&&!(o.type==="text"&&Ms(o.value.charAt(0)))}function Pie(e,t,n){let o=Xt(n,t);return!o||o.type!=="comment"}function Gie(e,t,n){let o=Xt(n,t);return!o||o.type!=="comment"}function Hie(e,t,n){let o=Xt(n,t);return o?o.type==="element"&&(o.tagName==="address"||o.tagName==="article"||o.tagName==="aside"||o.tagName==="blockquote"||o.tagName==="details"||o.tagName==="div"||o.tagName==="dl"||o.tagName==="fieldset"||o.tagName==="figcaption"||o.tagName==="figure"||o.tagName==="footer"||o.tagName==="form"||o.tagName==="h1"||o.tagName==="h2"||o.tagName==="h3"||o.tagName==="h4"||o.tagName==="h5"||o.tagName==="h6"||o.tagName==="header"||o.tagName==="hgroup"||o.tagName==="hr"||o.tagName==="main"||o.tagName==="menu"||o.tagName==="nav"||o.tagName==="ol"||o.tagName==="p"||o.tagName==="pre"||o.tagName==="section"||o.tagName==="table"||o.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function Uie(e,t,n){let o=Xt(n,t);return!o||o.type==="element"&&o.tagName==="li"}function Tie(e,t,n){let o=Xt(n,t);return!!(o&&o.type==="element"&&(o.tagName==="dt"||o.tagName==="dd"))}function Oie(e,t,n){let o=Xt(n,t);return!o||o.type==="element"&&(o.tagName==="dt"||o.tagName==="dd")}function yG(e,t,n){let o=Xt(n,t);return!o||o.type==="element"&&(o.tagName==="rp"||o.tagName==="rt")}function qie(e,t,n){let o=Xt(n,t);return!o||o.type==="element"&&o.tagName==="optgroup"}function zie(e,t,n){let o=Xt(n,t);return!o||o.type==="element"&&(o.tagName==="option"||o.tagName==="optgroup")}function Yie(e,t,n){let o=Xt(n,t);return!!(o&&o.type==="element"&&(o.tagName==="tbody"||o.tagName==="tfoot"))}function Kie(e,t,n){let o=Xt(n,t);return!o||o.type==="element"&&(o.tagName==="tbody"||o.tagName==="tfoot")}function Jie(e,t,n){return!Xt(n,t)}function Wie(e,t,n){let o=Xt(n,t);return!o||o.type==="element"&&o.tagName==="tr"}function CG(e,t,n){let o=Xt(n,t);return!o||o.type==="element"&&(o.tagName==="td"||o.tagName==="th")}var wG=sB({body:Xie,colgroup:eAe,head:Vie,html:Zie,tbody:tAe});function Zie(e){let t=Xt(e,-1);return!t||t.type!=="comment"}function Vie(e){let t=new Set;for(let o of e.children)if(o.type==="element"&&(o.tagName==="base"||o.tagName==="title")){if(t.has(o.tagName))return!1;t.add(o.tagName)}let n=e.children[0];return!n||n.type==="element"}function Xie(e){let t=Xt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Ms(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function eAe(e,t,n){let o=i1(n,t),a=Xt(e,-1,!0);return n&&o&&o.type==="element"&&o.tagName==="colgroup"&&ag(o,n.children.indexOf(o),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function tAe(e,t,n){let o=i1(n,t),a=Xt(e,-1);return n&&o&&o.type==="element"&&(o.tagName==="thead"||o.tagName==="tbody")&&ag(o,n.children.indexOf(o),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}var cB={name:[[`
|
|
78
78
|
\f\r &/=>`.split(""),`
|
|
@@ -93,7 +93,7 @@ status ${t.status}`:t.type==="structured_event"?[t.presentation.title,t.presenta
|
|
|
93
93
|
`)}var Lr=w(k(),1),uue={query:"",normalizedQuery:"",active:!1},lU=(0,SB.createContext)(uue);function pU({children:e,query:t}){let n=t.trim().toLowerCase();return(0,Lr.jsx)(lU.Provider,{value:{query:t,normalizedQuery:n,active:n.length>0},children:e})}function Mn(){return(0,SB.useContext)(lU)}function Ye({text:e}){let{normalizedQuery:t,active:n}=Mn();if(!n||!e)return(0,Lr.jsx)(Lr.Fragment,{children:e});let o=e.toLowerCase();if(!o.includes(t))return(0,Lr.jsx)(Lr.Fragment,{children:e});let a=[],r=0,i=o.indexOf(t),A=0;for(;i!==-1;)i>r&&a.push(e.slice(r,i)),a.push((0,Lr.jsx)("mark",{className:"rounded-[2px] bg-amber-400/20 px-0.5 text-inherit not-italic",children:e.slice(i,i+t.length)},A++)),r=i+t.length,i=o.indexOf(t,r);return r<e.length&&a.push(e.slice(r)),(0,Lr.jsx)(Lr.Fragment,{children:a})}function gU(e,t){if(!t||!e)return[];let n=e.toLowerCase(),o=[],a=n.indexOf(t);for(;a!==-1;)o.push({end:a+t.length,properties:{class:"search-match"},start:a,tagName:"mark"}),a=n.indexOf(t,a+t.length);return o}function z1(e,t){if(!t)return!0;if(e.kind==="message")return Sr(e.message.eventType,t)||Sr(SA(e.message),t);if(e.kind==="failure")return Sr(e.outcome==="delivery_failed"?"message delivery failed":"agent response failed error",t);if(e.kind==="tool")return[e.part.name,e.part.status,Bo(e.part.input),Bo(e.part.output)].some(n=>Sr(n,t));if(e.kind==="reasoning")return Sr(e.part.redacted?"reasoning redacted":e.part.text,t);if(e.kind==="subagent")return Sr(e.part.subagentKind,t)||Sr(e.part.status,t);if(e.kind==="structured_event"){let n=e.part.presentation;return[n.title,n.preview,...(n.details??[]).flatMap(o=>[o.title,o.description,o.content,...o.metadata??[]])].some(o=>Sr(o,t))}if(e.kind==="context"){let n=e.part.event;return n.type==="handoff"?["model handoff",n.modelProfile,n.modelId,n.reasoningLevel,n.summary].some(o=>Sr(o,t)):["context compacted",n.summary].some(o=>Sr(o,t))}return!1}function Sr(e,t){return e?e.toLowerCase().includes(t):!1}var td=w(k(),1);function LA(e){let t=Mn(),n=t.active?t.normalizedQuery:void 0,o=ct({queryKey:["highlight",e.language,e.code,n],queryFn:async()=>{let a=n?gU(e.code,n):[];return await O5(e.code,{decorations:a.length?a:void 0,lang:e.language,theme:"github-dark"})},staleTime:1/0});return o.data?(0,td.jsx)(lue,{html:o.data}):(0,td.jsx)(due,{children:e.code})}function due(e){return(0,td.jsx)("pre",{className:S("m-0 min-w-0 whitespace-pre-wrap break-words bg-transparent p-0 text-dashboard-text",e.variant==="prose"?"font-display text-base leading-7":"font-mono text-sm leading-relaxed"),children:(0,td.jsx)("code",{children:e.children})})}function lue(e){return(0,td.jsx)("div",{className:S("min-w-0 overflow-hidden [&_.line]:block [&_.line]:max-w-full [&_.line]:whitespace-pre-wrap [&_.line]:break-words [&_.line]:[overflow-wrap:anywhere] [&_code]:block [&_code]:max-w-full [&_code]:whitespace-normal [&_code]:break-words [&_code]:[overflow-wrap:anywhere] [&_pre]:!m-0 [&_pre]:!max-w-full [&_pre]:!overflow-hidden [&_pre]:!bg-transparent [&_pre]:!p-0 [&_pre]:whitespace-normal [&_pre]:break-words [&_pre]:[overflow-wrap:anywhere] [&_span]:whitespace-pre-wrap [&_span]:break-words [&_span]:[overflow-wrap:anywhere] [&_mark.search-match]:bg-amber-400/20 [&_mark.search-match]:rounded-[2px] [&_mark.search-match]:text-inherit [&_mark.search-match]:not-italic",e.variant==="prose"?"[&_pre]:font-display [&_pre]:text-base [&_pre]:leading-7":"[&_pre]:font-mono [&_pre]:text-sm [&_pre]:leading-relaxed"),dangerouslySetInnerHTML:{__html:e.html}})}var fU="font-medium text-cyan-100 underline decoration-cyan-300/35 underline-offset-2 transition-colors hover:text-dashboard-text hover:decoration-white";function bU(e){let t=Bue(e),n=mue(e,t),o=pue(e,t),a=fue(e,mU([...t,...n])),r=mU([...t,...n,...a]);return[...o,...a,...hue(e,r)].sort((i,A)=>i.start-A.start||i.end-A.end)}function pue(e,t){let n=[],o=0;for(;o<e.length;){let a=gue(e,o,t);if(!a)break;n.push(a),o=a.end}return n}function gue(e,t,n){for(let o=e.indexOf("[",t);o>=0;o=e.indexOf("[",o+1)){if(LB(o,n)||nd(e,o))continue;let a=e.indexOf("]",o+1);if(a<0)return;if(e[a+1]!=="(")continue;let r=e.slice(o+1,a);if(!hU(r))continue;let i=Y1(e,a+2);if(!i)continue;let A=Eue(i.href);if(A)return{end:i.end,href:A,label:r,start:o}}}function mue(e,t){let n=[];for(let o=e.indexOf("[");o>=0;o=e.indexOf("[",o+1)){if(LB(o,t)||nd(e,o))continue;let a=e.indexOf("]",o+1);if(a<0||e[a+1]!=="(")continue;let r=e.slice(o+1,a);if(!hU(r))continue;let i=Y1(e,a+2);i&&n.push({start:o,end:i.end})}return n}function hU(e){return!!e&&!e.includes(`
|
|
94
94
|
`)&&!e.includes("[")}function Y1(e,t){let n=0;for(let o=t;o<e.length;o+=1){let a=e[o];if(a==="\\"){o+=1;continue}if(a==="("){n+=1;continue}if(a!==")")continue;if(n>0){n-=1;continue}let r=e.slice(t,o);return r?{end:o+1,href:r}:void 0}}function fue(e,t){let n=[],o=/<(https?:\/\/[^<>\s]+|mailto:[^<>\s]+)>/gi,a;for(;a=o.exec(e);){if(LB(a.index,t)||nd(e,a.index))continue;let r=K1(a[1]??"");r&&n.push({end:a.index+a[0].length,href:r,label:r,start:a.index})}return n}function bue(e,t,n){let o=/(https?:\/\/[^\s<>"']+|mailto:[^\s<>"']+)/gi;o.lastIndex=t;let a;for(;a=o.exec(e);){if(LB(a.index,n))continue;let r=Que(a[0]),i=K1(r);if(i)return{end:a.index+r.length,href:i,label:i,start:a.index}}}function hue(e,t){let n=[],o=0;for(;o<e.length;){let a=bue(e,o,t);if(!a)break;n.push(a),o=a.end}return n}function Bue(e){return[...yue(e),...wue(e)].filter(t=>t.end>t.start).sort((t,n)=>t.start-n.start||t.end-n.end)}function yue(e){let t=[];for(let n=0;n<e.length;n+=1){if(e[n]!=="`"||nd(e,n))continue;let o=BU(e,n,"`"),a=Cue(e,n+o,o);if(a<0){n+=o-1;continue}t.push({start:n,end:a+o}),n=a+o-1}return t}function Cue(e,t,n){for(let o=t;o<e.length;o+=1){if(e[o]!=="`"||nd(e,o))continue;let a=BU(e,o,"`");if(a===n)return o;o+=a-1}return-1}function wue(e){let t=[];for(let n=e.indexOf("[");n>=0;n=e.indexOf("[",n+1)){if(!nd(e,n))continue;let o=e.indexOf("]",n+1);if(o<0||e[o+1]!=="(")continue;let a=Y1(e,o+2);a&&t.push({start:n,end:a.end})}return t}function LB(e,t){for(let n of t){if(e<n.start)return!1;if(e>=n.start&&e<n.end)return!0}return!1}function nd(e,t){let n=0;for(let o=t-1;o>=0&&e[o]==="\\";o-=1)n+=1;return n%2===1}function BU(e,t,n){let o=0;for(let a=t;a<e.length&&e[a]===n;a+=1)o+=1;return o}function Eue(e){let t=kue(e);return t?K1(t):void 0}function kue(e){let t=e.trim(),o=/^(<[^>\n]+>|[^\s]+)(?:\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?$/.exec(t)?.[1];if(o)return o.startsWith("<")&&o.endsWith(">")?o.slice(1,-1):o}function K1(e){let t=e.trim(),n=[...t].some(o=>{let a=o.charCodeAt(0);return a<32||a===127});if(!(!t||n||/\s/.test(t)))try{let o=new URL(t);return o.protocol==="http:"||o.protocol==="https:"||o.protocol==="mailto:"?t:void 0}catch{return}}function Que(e){let t=e;for(;Iue(t);)t=t.slice(0,-1);return t}function Iue(e){let t=e.at(-1);return t?/[.,;:!?]/.test(t)?!0:t===")"&&_ue(e):!1}function _ue(e){let t=0;for(let n of e)n==="("&&(t+=1),n===")"&&(t-=1);return t<0}function mU(e){let t=e.filter(o=>o.end>o.start).sort((o,a)=>o.start-a.start||o.end-a.end),n=[];for(let o of t){let a=n.at(-1);if(!a||o.start>a.end){n.push({...o});continue}a.end=Math.max(a.end,o.end)}return n}var Ke=w(k(),1);function Cg(e){let t=xue(e.text);return t.length===0?null:(0,Ke.jsx)("div",{className:S("min-w-0 break-words text-dashboard-text [overflow-wrap:anywhere]",e.compact?"font-display text-base leading-[1.6rem]":"font-display text-base leading-7"),children:(0,Ke.jsx)("div",{className:"grid min-w-0 gap-2",children:t.map((n,o)=>(0,Ke.jsx)(vue,{block:n},o))})})}function vue(e){switch(e.block.type){case"heading":{let t=S("m-0 min-w-0 font-semibold tracking-[-0.01em] text-dashboard-text",e.block.level<=2?"text-[1.05em]":"text-[1em]"),n=Z1(e.block.text);switch(e.block.level){case 1:return(0,Ke.jsx)("h1",{className:t,children:n});case 2:return(0,Ke.jsx)("h2",{className:t,children:n});case 3:return(0,Ke.jsx)("h3",{className:t,children:n});case 4:return(0,Ke.jsx)("h4",{className:t,children:n});case 5:return(0,Ke.jsx)("h5",{className:t,children:n});default:return(0,Ke.jsx)("h6",{className:t,children:n})}}case"list":{let t=e.block.ordered?"ol":"ul";return(0,Ke.jsx)(t,{className:S("m-0 grid min-w-0 list-outside gap-1 pl-5 text-dashboard-text",e.block.ordered?"list-decimal":"list-disc"),children:e.block.items.map((n,o)=>(0,Ke.jsx)("li",{className:"min-w-0 pl-1",children:Z1(n)},o))})}case"paragraph":return(0,Ke.jsx)("p",{className:"m-0 min-w-0 whitespace-normal text-dashboard-text",children:e.block.lines.map((t,n)=>(0,Ke.jsxs)("span",{children:[n>0?(0,Ke.jsx)("br",{}):null,Z1(t)]},n))})}}function xue(e){let t=e.replace(/\r\n?/g,`
|
|
95
95
|
`).replace(/^\n+|\n+$/g,"");if(!t)return[];let n=[];for(let o of t.split(/\n{2,}/)){let a=o.split(`
|
|
96
|
-
`),r=0;for(;r<a.length;){let i=a[r]??"",A=yU(i);if(A){n.push(A),r+=1;continue}let s=W1(i),c=J1(i);if(s||c){let l=[];for(;r<a.length&&(s?W1(a[r]??""):J1(a[r]??""));)l.push((a[r]??"").replace(s?/^\s*\d+\.\s+/:/^\s*[-*+]\s+/,"")),r+=1;n.push({items:l,ordered:s,type:"list"});continue}let u=[];for(;r<a.length&&!yU(a[r]??"")&&!W1(a[r]??"")&&!J1(a[r]??"");)u.push(a[r]??""),r+=1;n.push({lines:u,type:"paragraph"})}}return n}function yU(e){let t=/^(#{1,6})\s+(.+)$/.exec(e);if(t)return{level:t[1].length,text:t[2].trimEnd(),type:"heading"}}function J1(e){return/^\s*[-*+]\s+\S/.test(e)}function W1(e){return/^\s*\d+\.\s+\S/.test(e)}function Z1(e){let t=bU(e),n=[],o=0,a=0;for(let r of t)r.start>o&&n.push(...CU(e.slice(o,r.start),a++)),n.push((0,Ke.jsx)(Fue,{href:r.href,children:(0,Ke.jsx)(Due,{href:r.href,label:r.label})},`link-${r.start}`)),o=r.end;return o<e.length&&n.push(...CU(e.slice(o),a)),n}function CU(e,t){if(!e)return[];let n=[],o=/(`+)([^`]+?)\1/g,a=0,r,i=0;for(;r=o.exec(e);)r.index>a&&n.push(...wU(e.slice(a,r.index),`${t}-${i++}`)),n.push((0,Ke.jsx)("code",{className:"rounded-[0.25rem] bg-white/[0.08] px-1 py-0.5 font-mono text-[0.9em] text-cyan-50",children:(0,Ke.jsx)(Ye,{text:r[2]??""})},`code-${t}-${i++}`)),a=r.index+r[0].length;return a<e.length&&n.push(...wU(e.slice(a),`${t}-${i}`)),n}function wU(e,t){if(!e)return[];let n=[],o=/(\*\*|__)(.+?)\1|\*([^*]+?)\*/g,a=0,r,i=0;for(;r=o.exec(e);)r.index>a&&n.push((0,Ke.jsx)(Ye,{text:e.slice(a,r.index)},`${t}-t-${i++}`)),n.push(r[1]?(0,Ke.jsx)("strong",{className:"font-semibold text-dashboard-text",children:(0,Ke.jsx)(Ye,{text:r[2]??""})},`${t}-b-${i++}`):(0,Ke.jsx)("em",{className:"italic text-dashboard-text",children:(0,Ke.jsx)(Ye,{text:r[3]??""})},`${t}-i-${i++}`)),a=r.index+r[0].length;return a<e.length&&n.push((0,Ke.jsx)(Ye,{text:e.slice(a)},`${t}-t-${i}`)),n}function Due(e){let t=Mn(),n=t.active&&e.href.toLowerCase().includes(t.normalizedQuery),o=e.label.toLowerCase().includes(t.normalizedQuery);return n&&!o?(0,Ke.jsx)("mark",{className:"rounded-[2px] bg-amber-400/20 px-0.5 text-inherit not-italic",title:`Matched URL: ${e.href}`,children:e.label}):(0,Ke.jsx)(Ye,{text:e.label})}function Fue(e){let t=/^https?:/i.test(e.href);return(0,Ke.jsx)("a",{className:fU,href:e.href,rel:t?"noreferrer":void 0,target:t?"_blank":void 0,children:e.children})}var RB=w(k(),1);function yo(e){let t=Qi(e.role??""),n=iU(e.text);return(0,RB.jsx)("div",{className:"grid min-w-0 gap-2",children:n.map((o,a)=>o.language==="markdown"&&!o.fenced?(0,RB.jsx)(Cg,{compact:t==="assistant"||t==="user",text:o.code},a):(0,RB.jsx)(LA,{code:o.code,language:o.language},a))})}var Ne=w(k(),1),Sue=["a[href]","button:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function EU(e){let t=(0,Vs.useRef)(null),n=(0,Vs.useRef)(e.onClose),o=(0,Vs.useRef)(void 0),a=e.record?.id;if(n.current=e.onClose,(0,Vs.useEffect)(()=>{a&&e.action.reset()},[a]),(0,Vs.useEffect)(()=>{if(!a)return;o.current=document.activeElement instanceof HTMLElement?document.activeElement:void 0;let f=document.body.style.overflow;document.body.style.overflow="hidden";let b=requestAnimationFrame(()=>{t.current?.querySelector("[data-memory-drawer-close]")?.focus()}),B=C=>{if(C.key==="Escape"){C.preventDefault(),n.current();return}if(C.key!=="Tab")return;let E=t.current,x=Array.from(E?.querySelectorAll(Sue)??[]).filter(J=>J.tabIndex>=0&&J.getClientRects().length>0),Q=x.at(0),R=x.at(-1);if(!E||!Q||!R){C.preventDefault();return}let q=document.activeElement;C.shiftKey&&(q===Q||!E.contains(q))?(C.preventDefault(),R.focus()):!C.shiftKey&&(q===R||!E.contains(q))&&(C.preventDefault(),Q.focus())};return window.addEventListener("keydown",B),()=>{cancelAnimationFrame(b),window.removeEventListener("keydown",B),document.body.style.overflow=f;let C=o.current;o.current=void 0,C?.isConnected&&C.focus()}},[a]),!e.record)return null;let{record:r}=e,i=wg(r,"Type"),A=wg(r,"Learned"),s=wg(r,"Remembered"),c=wg(r,"Source"),u=wg(r,"Visibility"),l=u==="Public",p=A==="Automatic"?`Junior learned this from a ${c} conversation on ${Eg(s)}.`:A==="Explicit"?l?`Someone asked Junior to remember this on ${Eg(s)}.`:`You asked Junior to remember this on ${Eg(s)}.`:`Junior recorded this on ${Eg(s)}.`,g=l?`It is stored as workspace ${i.toLowerCase()} for future channels.`:`It is stored as a ${i.toLowerCase()} for future conversations.`,m=(r.metadata??[]).filter(f=>!["Learned","Source","Memory ID"].includes(f.label)),h=r.actions?.find(f=>f.tone==="danger"),y="memory-details-drawer-title";return(0,Ne.jsxs)("div",{"aria-labelledby":y,"aria-modal":"true",className:"fixed inset-0 z-50",ref:t,role:"dialog",children:[(0,Ne.jsx)("button",{"aria-label":"Dismiss memory details",className:"absolute inset-0 cursor-default bg-black/55",onClick:e.onClose,tabIndex:-1,type:"button"}),(0,Ne.jsxs)("aside",{className:"absolute top-0 right-0 grid h-full w-full grid-rows-[auto_minmax(0,1fr)] bg-[#070707] shadow-[-20px_0_60px_rgba(0,0,0,0.45)] md:w-[min(560px,94vw)] md:border-l md:border-white/12",children:[(0,Ne.jsxs)("header",{className:"relative border-b border-white/10 bg-dashboard-surface-raised px-4 py-3 md:px-5",children:[(0,Ne.jsxs)("div",{className:"min-w-0 pr-12",children:[(0,Ne.jsx)("h2",{className:"m-0 font-display text-lg font-medium tracking-normal text-dashboard-text",id:y,children:"What Junior remembers"}),(0,Ne.jsxs)("div",{className:"mt-1 break-words font-mono text-xs leading-snug text-dashboard-text-muted",children:[i," \xB7 ",u," \xB7 ",Eg(s)]})]}),(0,Ne.jsx)("div",{className:"absolute top-3 right-4 md:right-5",children:(0,Ne.jsx)(pt,{"aria-label":"Close memory details","data-memory-drawer-close":!0,onClick:e.onClose,size:"icon",title:"Close",children:(0,Ne.jsx)(To,{"aria-hidden":"true",size:15,strokeWidth:2.25})})})]}),(0,Ne.jsx)("div",{className:"min-h-0 overflow-auto px-4 py-4 md:px-5",children:(0,Ne.jsxs)("section",{className:"grid gap-5",children:[(0,Ne.jsxs)("div",{children:[(0,Ne.jsx)("div",{className:"mb-2 font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:"Memory"}),(0,Ne.jsx)(yo,{text:r.title}),r.description?(0,Ne.jsx)("div",{className:"mt-3",children:(0,Ne.jsx)(yo,{text:r.description})}):null]}),(0,Ne.jsxs)("div",{className:"flex items-start gap-3 rounded border border-cyan-300/12 bg-cyan-300/[0.035] p-3",children:[(0,Ne.jsx)(bi,{"aria-hidden":"true",className:"mt-0.5 shrink-0 text-cyan-200/70",size:15}),(0,Ne.jsxs)("div",{children:[(0,Ne.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.12em] text-cyan-200/65",children:"Why Junior remembers this"}),(0,Ne.jsxs)("div",{className:"mt-1 font-mono text-xs leading-relaxed text-dashboard-text",children:[p," ",g]})]})]}),m.length?(0,Ne.jsx)("dl",{className:"grid gap-px overflow-hidden rounded border border-white/[0.06] bg-white/[0.055]",children:m.map(f=>(0,Ne.jsx)(Lue,{label:f.label,children:f.value},f.label))}):null,h?(0,Ne.jsxs)("button",{className:"inline-flex w-fit cursor-pointer items-center gap-2 rounded border border-rose-300/15 bg-rose-300/[0.035] px-3 py-2 font-mono text-xs uppercase tracking-[0.08em] text-rose-200/75 transition-colors hover:border-rose-300/30 hover:bg-rose-300/[0.07] hover:text-rose-100",disabled:e.action.isPending,onClick:()=>{h.confirmation&&!window.confirm(h.confirmation)||(e.onClose(),e.onAction({...h,confirmation:void 0}))},type:"button",children:[(0,Ne.jsx)(Uo,{"aria-hidden":"true",size:13}),"Forget this memory"]}):l?(0,Ne.jsxs)("div",{className:"inline-flex w-fit items-center gap-2 rounded border border-white/[0.08] px-3 py-2 font-mono text-xs uppercase tracking-[0.08em] text-dashboard-text-muted",children:[(0,Ne.jsx)(go,{"aria-hidden":"true",size:13}),"View only \xB7 public memories can't be deleted"]}):null]})})]})]})}function Lue(e){return(0,Ne.jsxs)("div",{className:"min-w-0 bg-[#09090b] px-3 py-3",children:[(0,Ne.jsx)("dt",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:e.label}),(0,Ne.jsx)("dd",{className:"mt-1.5 ml-0 break-words font-mono text-sm leading-relaxed text-dashboard-text",children:e.children})]})}function wg(e,t){return e.metadata?.find(n=>n.label===t)?.value??"\u2014"}function Eg(e){return e.split(",").slice(0,2).join(",")}var bO=w(Y(),1);var _i=w(k(),1);function xa(e){return{bottom:36,height:e,left:56,plotHeight:e-24-36,plotWidth:886,right:18,top:24,width:960}}function Ot(e){return new Date(`${e}T00:00:00.000Z`).toLocaleDateString(void 0,{day:"numeric",month:"short",timeZone:"UTC"})}function Rue(e){return[...new Set([0,Math.floor((e-1)/2),e-1])].filter(t=>t>=0)}function Co(e){return[0,.5,1].map(t=>{let n=e.layout.top+t*e.layout.plotHeight;return(0,_i.jsxs)("g",{children:[(0,_i.jsx)("line",{stroke:"rgba(255,255,255,0.07)",strokeDasharray:"3 5",x1:e.layout.left,x2:e.layout.width-e.layout.right,y1:n,y2:n}),(0,_i.jsx)("text",{fill:"rgba(255,255,255,0.5)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:"end",x:e.layout.left-8,y:n+3,children:Math.round(e.maximum*(1-t))})]},t)})}function Da(e){return Rue(e.dates.length).map(t=>{let n=e.dates[t];return n?(0,_i.jsx)("text",{fill:"rgba(255,255,255,0.5)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:t===0?"start":t===e.dates.length-1?"end":"middle",x:e.xPosition(t),y:e.layout.height-8,children:Ot(n)},n):null})}function Jn(e){return(0,_i.jsx)("div",{className:"grid grid-cols-[auto_auto] gap-x-4 gap-y-0.5",children:e.rows.flatMap(([t,n],o)=>[(0,_i.jsx)("span",{className:"text-dashboard-text-muted",children:t},`${o}-label`),(0,_i.jsx)("span",{className:"text-right text-dashboard-text",children:n},`${o}-value`)])})}var nn=w(Y(),1);var Nue=Object.defineProperty,ad=(e,t)=>Nue(e,"name",{value:t,configurable:!0}),kU=!!(typeof window<"u"&&window.document&&window.document.createElement);function ca(e,t,{checkForDefaultPrevented:n=!0}={}){return ad(function(a){if(e?.(a),n===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}ad(ca,"composeEventHandlers");function $ue(e){if(!kU)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}ad($ue,"getOwnerWindow");function V1(e){if(!kU)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}ad(V1,"getOwnerDocument");function QU(e,t=!1){let{activeElement:n}=V1(e);if(!n?.nodeName)return null;if(IU(n)&&n.contentDocument)return QU(n.contentDocument.body,t);if(t){let o=n.getAttribute("aria-activedescendant");if(o){let a=V1(n).getElementById(o);if(a)return a}}return n}ad(QU,"getActiveElement");function IU(e){return e.tagName==="IFRAME"}ad(IU,"isFrame");var Eo=w(Y(),1),X1=w(k(),1),Mue=Object.defineProperty,wo=(e,t)=>Mue(e,"name",{value:t,configurable:!0});function jue(e,t){let n=Eo.createContext(t);n.displayName=e+"Context";let o=wo(r=>{let{children:i,...A}=r,s=Eo.useMemo(()=>A,Object.values(A));return(0,X1.jsx)(n.Provider,{value:s,children:i})},"Provider");o.displayName=e+"Provider";function a(r,i={}){let{optional:A=!1}=i,s=Eo.useContext(n);if(s)return s;if(t!==void 0)return t;if(!A)throw new Error(`\`${r}\` must be used within \`${e}\``)}return wo(a,"useContext"),[o,a]}wo(jue,"createContext");function kg(e,t=[]){let n=[];function o(r,i){let A=Eo.createContext(i);A.displayName=r+"Context";let s=n.length;n=[...n,i];let c=wo(l=>{let{scope:p,children:g,...m}=l,h=p?.[e]?.[s]||A,y=Eo.useMemo(()=>m,Object.values(m));return(0,X1.jsx)(h.Provider,{value:y,children:g})},"Provider");c.displayName=r+"Provider";function u(l,p,g={}){let{optional:m=!1}=g,h=p?.[e]?.[s]||A,y=Eo.useContext(h);if(y)return y;if(i!==void 0)return i;if(!m)throw new Error(`\`${l}\` must be used within \`${r}\``)}return wo(u,"useContext"),[c,u]}wo(o,"createContext");let a=wo(()=>{let r=n.map(i=>Eo.createContext(i));return wo(function(A){let s=A?.[e]||r;return Eo.useMemo(()=>({[`__scope${e}`]:{...A,[e]:s}}),[A,s])},"useScope")},"createScope");return a.scopeName=e,[o,_U(a,...t)]}wo(kg,"createContextScope");function _U(...e){let t=e[0];if(e.length===1)return t;let n=wo(()=>{let o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return wo(function(r){let i=o.reduce((A,{useScope:s,scopeName:c})=>{let l=s(r)[`__scope${c}`];return{...A,...l}},{});return Eo.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}wo(_U,"composeContextScopes");var ko=w(Y(),1);var NB=!1;var vU=w(Y(),1),ua=globalThis?.document?vU.useLayoutEffect:()=>{};var Ko=w(Y(),1);var od=w(Y(),1),Pue=Object.defineProperty,Gue=(e,t)=>Pue(e,"name",{value:t,configurable:!0}),xU=od[" useEffectEvent ".trim().toString()],DU=od[" useInsertionEffect ".trim().toString()];function eF(e){if(typeof xU=="function")return xU(e);let t=od.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof DU=="function"?DU(()=>{t.current=e}):ua(()=>{t.current=e}),od.useMemo(()=>((...n)=>t.current?.(...n)),[])}Gue(eF,"useEffectEvent");var Hue=Object.defineProperty,Qg=(e,t)=>Hue(e,"name",{value:t,configurable:!0}),Uue=ko[" useInsertionEffect ".trim().toString()]||ua;function tF({prop:e,defaultProp:t,onChange:n=Qg(()=>{},"onChange"),caller:o}){let[a,r,i]=SU({defaultProp:t,onChange:n}),A=e!==void 0,s=A?e:a;if(NB){let u=ko.useRef(e!==void 0);ko.useEffect(()=>{let l=u.current;l!==A&&console.warn(`${o} is changing from ${l?"controlled":"uncontrolled"} to ${A?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=A},[A,o])}let c=ko.useCallback(u=>{if(A){let l=LU(u)?u(e):u;l!==e&&i.current?.(l)}else r(u)},[A,e,r,i]);return[s,c]}Qg(tF,"useControllableState");function SU({defaultProp:e,onChange:t}){let[n,o]=ko.useState(e),a=ko.useRef(n),r=ko.useRef(t);return Uue(()=>{r.current=t},[t]),ko.useEffect(()=>{a.current!==n&&(r.current?.(n),a.current=n)},[n,a]),[n,o,r]}Qg(SU,"useUncontrolledState");function LU(e){return typeof e=="function"}Qg(LU,"isFunction");var FU=Symbol("RADIX:SYNC_STATE");function Tue(e,t,n,o){let{prop:a,defaultProp:r,onChange:i,caller:A}=t,s=a!==void 0,c=eF(i);if(NB){let y=Ko.useRef(a!==void 0);Ko.useEffect(()=>{let f=y.current;f!==s&&console.warn(`${A} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=s},[s,A])}let u=[{...n,state:r}];o&&u.push(o);let[l,p]=Ko.useReducer((y,f)=>{if(f.type===FU)return{...y,state:f.state};let b=e(y,f);return s&&!Object.is(b.state,y.state)&&c(b.state),b},...u),g=l.state,m=Ko.useRef(g);Ko.useEffect(()=>{m.current!==g&&(m.current=g,s||c(g))},[g,m,s]);let h=Ko.useMemo(()=>a!==void 0?{...l,state:a}:l,[l,a]);return Ko.useEffect(()=>{s&&!Object.is(a,l.state)&&p({type:FU,state:a})},[a,l.state,s]),[h,p]}Qg(Tue,"useControllableStateReducer");var RU=w(Y(),1),Oue=Object.defineProperty,aF=(e,t)=>Oue(e,"name",{value:t,configurable:!0});function nF(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}aF(nF,"setRef");function NU(...e){return t=>{let n=!1,o=e.map(a=>{let r=nF(a,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let a=0;a<o.length;a++){let r=o[a];typeof r=="function"?r():nF(e[a],null)}}}}aF(NU,"composeRefs");function Rr(...e){return RU.useCallback(NU(...e),e)}aF(Rr,"useComposedRefs");var Wn=w(Y(),1);var jU=["top","right","bottom","left"];var Nr=Math.min,Jo=Math.max,_g=Math.round,vg=Math.floor,$r=e=>({x:e,y:e}),que={left:"right",right:"left",bottom:"top",top:"bottom"};function oF(e,t,n){return Jo(e,Nr(t,n))}function Mr(e,t){return typeof e=="function"?e(t):e}function vi(e){return e.split("-")[0]}function Xs(e){return e.split("-")[1]}function MB(e){return e==="x"?"y":"x"}function jB(e){return e==="y"?"height":"width"}function Wo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function PB(e){return MB(Wo(e))}function PU(e,t,n){n===void 0&&(n=!1);let o=Xs(e),a=PB(e),r=jB(a),i=a==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=Ig(i)),[i,Ig(i)]}function GU(e){let t=Ig(e);return[$B(e),t,$B(t)]}function $B(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var $U=["left","right"],MU=["right","left"],zue=["top","bottom"],Yue=["bottom","top"];function Kue(e,t,n){switch(e){case"top":case"bottom":return n?t?MU:$U:t?$U:MU;case"left":case"right":return t?zue:Yue;default:return[]}}function HU(e,t,n,o){let a=Xs(e),r=Kue(vi(e),n==="start",o);return a&&(r=r.map(i=>i+"-"+a),t&&(r=r.concat(r.map($B)))),r}function Ig(e){let t=vi(e);return que[t]+e.slice(t.length)}function Jue(e){var t,n,o,a;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(a=e.left)!=null?a:0}}function rF(e){return typeof e!="number"?Jue(e):{top:e,right:e,bottom:e,left:e}}function ec(e){let{x:t,y:n,width:o,height:a}=e;return{width:o,height:a,top:n,left:t,right:t+o,bottom:n+a,x:t,y:n}}function UU(e,t,n){let{reference:o,floating:a}=e,r=Wo(t),i=PB(t),A=jB(i),s=vi(t),c=r==="y",u=o.x+o.width/2-a.width/2,l=o.y+o.height/2-a.height/2,p=o[A]/2-a[A]/2,g;switch(s){case"top":g={x:u,y:o.y-a.height};break;case"bottom":g={x:u,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:l};break;case"left":g={x:o.x-a.width,y:l};break;default:g={x:o.x,y:o.y}}let m=Xs(t);return m&&(g[i]+=p*(m==="end"?1:-1)*(n&&c?-1:1)),g}async function qU(e,t){var n;t===void 0&&(t={});let{x:o,y:a,platform:r,rects:i,elements:A,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:l="floating",altBoundary:p=!1,padding:g=0}=Mr(t,e),m=rF(g),y=A[p?l==="floating"?"reference":"floating":l],f=ec(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(A.floating)),boundary:c,rootBoundary:u,strategy:s})),b=l==="floating"?{x:o,y:a,width:i.floating.width,height:i.floating.height}:i.reference,B=await(r.getOffsetParent==null?void 0:r.getOffsetParent(A.floating)),C=await(r.isElement==null?void 0:r.isElement(B))&&await(r.getScale==null?void 0:r.getScale(B))||{x:1,y:1},E=ec(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:A,rect:b,offsetParent:B,strategy:s}):b);return{top:(f.top-E.top+m.top)/C.y,bottom:(E.bottom-f.bottom+m.bottom)/C.y,left:(f.left-E.left+m.left)/C.x,right:(E.right-f.right+m.right)/C.x}}var Wue=50,zU=async(e,t,n)=>{let{placement:o="bottom",strategy:a="absolute",middleware:r=[],platform:i}=n,A=i.detectOverflow?i:{...i,detectOverflow:qU},s=await(i.isRTL==null?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:l}=UU(c,o,s),p=o,g=0,m={};for(let h=0;h<r.length;h++){let y=r[h];if(!y)continue;let{name:f,fn:b}=y,{x:B,y:C,data:E,reset:x}=await b({x:u,y:l,initialPlacement:o,placement:p,strategy:a,middlewareData:m,rects:c,platform:A,elements:{reference:e,floating:t}});u=B??u,l=C??l,m[f]={...m[f],...E},x&&g<Wue&&(g++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:a}):x.rects),{x:u,y:l}=UU(c,p,s)),h=-1)}return{x:u,y:l,placement:p,strategy:a,middlewareData:m}},YU=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:o,placement:a,rects:r,platform:i,elements:A,middlewareData:s}=t,{element:c,padding:u=0}=Mr(e,t)||{};if(c==null)return{};let l=rF(u),p={x:n,y:o},g=PB(a),m=jB(g),h=await i.getDimensions(c),y=g==="y",f=y?"top":"left",b=y?"bottom":"right",B=y?"clientHeight":"clientWidth",C=r.reference[m]+r.reference[g]-p[g]-r.floating[m],E=p[g]-r.reference[g],x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c)),Q=x?x[B]:0;(!Q||!await(i.isElement==null?void 0:i.isElement(x)))&&(Q=A.floating[B]||r.floating[m]);let R=C/2-E/2,q=Q/2-h[m]/2-1,J=Nr(l[f],q),Re=Nr(l[b],q),ue=Q-h[m]-Re,Se=Q/2-h[m]/2+R,we=oF(J,Se,ue),He=!s.arrow&&Xs(a)!=null&&Se!==we&&r.reference[m]/2-(Se<J?J:Re)-h[m]/2<0,wt=He?Se<J?Se-J:Se-ue:0;return{[g]:p[g]+wt,data:{[g]:we,centerOffset:Se-we-wt,...He&&{alignmentOffset:wt}},reset:He}}});var KU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;let{placement:a,middlewareData:r,rects:i,initialPlacement:A,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:l=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...y}=Mr(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let f=vi(a),b=Wo(A),B=vi(A)===A,C=await(s.isRTL==null?void 0:s.isRTL(c.floating)),E=p||(B||!h?[Ig(A)]:GU(A)),x=m!=="none";!p&&x&&E.push(...HU(A,h,m,C));let Q=[A,...E],R=await s.detectOverflow(t,y),q=[],J=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&q.push(R[f]),l){let we=PU(a,i,C);q.push(R[we[0]],R[we[1]])}if(J=[...J,{placement:a,overflows:q}],!q.every(we=>we<=0)){var Re,ue;let we=(((Re=r.flip)==null?void 0:Re.index)||0)+1,He=Q[we];if(He&&(!(l==="alignment"?b!==Wo(He):!1)||J.every($e=>Wo($e.placement)===b?$e.overflows[0]>0:!0)))return{data:{index:we,overflows:J},reset:{placement:He}};let wt=(ue=J.filter(la=>la.overflows[0]<=0).sort((la,$e)=>la.overflows[1]-$e.overflows[1])[0])==null?void 0:ue.placement;if(!wt)switch(g){case"bestFit":{var Se;let la=(Se=J.filter($e=>{if(x){let rn=Wo($e.placement);return rn===b||rn==="y"}return!0}).map($e=>[$e.placement,$e.overflows.filter(rn=>rn>0).reduce((rn,Za)=>rn+Za,0)]).sort(($e,rn)=>$e[1]-rn[1])[0])==null?void 0:Se[0];la&&(wt=la);break}case"initialPlacement":wt=A;break}if(a!==wt)return{reset:{placement:wt}}}return{}}}};function TU(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function OU(e){return jU.some(t=>e[t]>=0)}var JU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:o}=t,{strategy:a="referenceHidden",...r}=Mr(e,t);switch(a){case"referenceHidden":{let i=await o.detectOverflow(t,{...r,elementContext:"reference"}),A=TU(i,n.reference);return{data:{referenceHiddenOffsets:A,referenceHidden:OU(A)}}}case"escaped":{let i=await o.detectOverflow(t,{...r,altBoundary:!0}),A=TU(i,n.floating);return{data:{escapedOffsets:A,escaped:OU(A)}}}default:return{}}}}};var WU=new Set(["left","top"]);async function Zue(e,t){let{placement:n,platform:o,elements:a}=e,r=await(o.isRTL==null?void 0:o.isRTL(a.floating)),i=vi(n),A=Xs(n),s=Wo(n)==="y",c=WU.has(i)?-1:1,u=r&&s?-1:1,l=Mr(t,e),{mainAxis:p,crossAxis:g,alignmentAxis:m}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return A&&typeof m=="number"&&(g=A==="end"?m*-1:m),s?{x:g*u,y:p*c}:{x:p*c,y:g*u}}var ZU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;let{x:a,y:r,placement:i,middlewareData:A}=t,s=await Zue(t,e);return i===((n=A.offset)==null?void 0:n.placement)&&(o=A.arrow)!=null&&o.alignmentOffset?{}:{x:a+s.x,y:r+s.y,data:{...s,placement:i}}}}},VU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:a,platform:r}=t,{mainAxis:i=!0,crossAxis:A=!1,limiter:s={fn:b=>{let{x:B,y:C}=b;return{x:B,y:C}}},...c}=Mr(e,t),u={x:n,y:o},l=await r.detectOverflow(t,c),p=Wo(a),g=MB(p),m=u[g],h=u[p],y=(b,B)=>oF(B+l[b==="y"?"top":"left"],B,B-l[b==="y"?"bottom":"right"]);i&&(m=y(g,m)),A&&(h=y(p,h));let f=s.fn({...t,[g]:m,[p]:h});return{...f,data:{x:f.x-n,y:f.y-o,enabled:{[g]:i,[p]:A}}}}}},XU=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;let{x:a,y:r,placement:i,rects:A,middlewareData:s}=t,{offset:c=0,mainAxis:u=!0,crossAxis:l=!0}=Mr(e,t),p={x:a,y:r},g=Wo(i),m=MB(g),h=p[m],y=p[g],f=Mr(c,t),b=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:(n=f.mainAxis)!=null?n:0,crossAxis:(o=f.crossAxis)!=null?o:0};if(u){let E=m==="y"?"height":"width",x=A.reference[m]-A.floating[E]+b.mainAxis,Q=A.reference[m]+A.reference[E]-b.mainAxis;h<x?h=x:h>Q&&(h=Q)}if(l){var B,C;let E=m==="y"?"width":"height",x=WU.has(vi(i)),Q=A.reference[g]-A.floating[E]+(x&&((B=s.offset)==null?void 0:B[g])||0)+(x?0:b.crossAxis),R=A.reference[g]+A.reference[E]+(x?0:((C=s.offset)==null?void 0:C[g])||0)-(x?b.crossAxis:0);y<Q?y=Q:y>R&&(y=R)}return{[m]:h,[g]:y}}}},eT=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:n,rects:o,platform:a,elements:r}=t,{apply:i=()=>{},...A}=Mr(e,t),s=await a.detectOverflow(t,A),c=vi(n),u=Xs(n),l=Wo(n)==="y",{width:p,height:g}=o.floating,m,h;c==="top"||c==="bottom"?(m=c,h=u===(await(a.isRTL==null?void 0:a.isRTL(r.floating))?"start":"end")?"left":"right"):(h=c,m=u==="end"?"top":"bottom");let y=g-s.top-s.bottom,f=p-s.left-s.right,b=Nr(g-s[m],y),B=Nr(p-s[h],f),C=t.middlewareData.shift,E=!C,x=b,Q=B;C!=null&&C.enabled.x&&(Q=f),C!=null&&C.enabled.y&&(x=y),E&&!u&&(l?Q=p-2*Jo(s.left,s.right):x=g-2*Jo(s.top,s.bottom)),await i({...t,availableWidth:Q,availableHeight:x});let R=await a.getDimensions(r.floating);return p!==R.width||g!==R.height?{reset:{rects:!0}}:{}}}};function GB(){return typeof window<"u"}function ac(e){return nT(e)?(e.nodeName||"").toLowerCase():"#document"}function da(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jr(e){var t;return(t=(nT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nT(e){return GB()?e instanceof Node||e instanceof da(e).Node:!1}function Zo(e){return GB()?e instanceof Element||e instanceof da(e).Element:!1}function xi(e){return GB()?e instanceof HTMLElement||e instanceof da(e).HTMLElement:!1}function tT(e){return!GB()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof da(e).ShadowRoot}function xg(e){let{overflow:t,overflowX:n,overflowY:o,display:a}=Vo(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&a!=="inline"&&a!=="contents"}function aT(e){return/^(table|td|th)$/.test(ac(e))}function Dg(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Vue=/transform|translate|scale|rotate|perspective|filter/,Xue=/paint|layout|strict|content/,tc=e=>!!e&&e!=="none",iF;function HB(e){let t=Zo(e)?Vo(e):e;return tc(t.transform)||tc(t.translate)||tc(t.scale)||tc(t.rotate)||tc(t.perspective)||!UB()&&(tc(t.backdropFilter)||tc(t.filter))||Vue.test(t.willChange||"")||Xue.test(t.contain||"")}function oT(e){let t=RA(e);for(;xi(t)&&!rd(t);){if(HB(t))return t;if(Dg(t))return null;t=RA(t)}return null}function UB(){return iF==null&&(iF=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),iF}function rd(e){return/^(html|body|#document)$/.test(ac(e))}function Vo(e){return da(e).getComputedStyle(e)}function Fg(e){return Zo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function RA(e){if(ac(e)==="html")return e;let t=e.assignedSlot||e.parentNode||tT(e)&&e.host||jr(e);return tT(t)?t.host:t}function rT(e){let t=RA(e);return rd(t)?(e.ownerDocument||e).body:xi(t)&&xg(t)?t:rT(t)}function nc(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);let a=rT(e),r=a===((o=e.ownerDocument)==null?void 0:o.body),i=da(a);if(r){let A=TB(i);return t.concat(i,i.visualViewport||[],xg(a)?a:[],A&&n?nc(A):[])}else return t.concat(a,nc(a,[],n))}function TB(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sT(e){let t=Vo(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,a=xi(e),r=a?e.offsetWidth:n,i=a?e.offsetHeight:o,A=_g(n)!==r||_g(o)!==i;return A&&(n=r,o=i),{width:n,height:o,$:A}}function sF(e){return Zo(e)?e:e.contextElement}function id(e){let t=sF(e);if(!xi(t))return $r(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:r}=sT(t),i=(r?_g(n.width):n.width)/o,A=(r?_g(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!A||!Number.isFinite(A))&&(A=1),{x:i,y:A}}var ede=$r(0);function cT(e){let t=da(e);return!UB()||!t.visualViewport?ede:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tde(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===da(e)}function oc(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),r=sF(e),i=$r(1);t&&(o?Zo(o)&&(i=id(o)):i=id(e));let A=tde(r,n,o)?cT(r):$r(0),s=(a.left+A.x)/i.x,c=(a.top+A.y)/i.y,u=a.width/i.x,l=a.height/i.y;if(r&&o){let p=da(r),g=Zo(o)?da(o):o,m=p,h=TB(m);for(;h&&g!==m;){let y=id(h),f=h.getBoundingClientRect(),b=Vo(h),B=f.left+(h.clientLeft+parseFloat(b.paddingLeft))*y.x,C=f.top+(h.clientTop+parseFloat(b.paddingTop))*y.y;s*=y.x,c*=y.y,u*=y.x,l*=y.y,s+=B,c+=C,m=da(h),h=TB(m)}}return ec({width:u,height:l,x:s,y:c})}function OB(e,t){let n=Fg(e).scrollLeft;return t?t.left+n:oc(jr(e)).left+n}function uT(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-OB(e,n),a=n.top+t.scrollTop;return{x:o,y:a}}function nde(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e,r=a==="fixed",i=jr(o),A=t?Dg(t.floating):!1;if(o===i||A&&r)return n;let s={scrollLeft:0,scrollTop:0},c=$r(1),u=$r(0),l=xi(o);if((l||!r)&&((ac(o)!=="body"||xg(i))&&(s=Fg(o)),l)){let g=oc(o);c=id(o),u.x=g.x+o.clientLeft,u.y=g.y+o.clientTop}let p=i&&!l&&!r?uT(i,s):$r(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-s.scrollTop*c.y+u.y+p.y}}function ade(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ode(e){let t=Fg(e),n=e.ownerDocument.body,o=Jo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Jo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),r=-t.scrollLeft+OB(e),i=-t.scrollTop;return Vo(n).direction==="rtl"&&(r+=Jo(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:r,y:i}}var rde=25;function ide(e,t,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",a=da(e),r=jr(e),i=a.visualViewport,A=r.clientWidth,s=r.clientHeight,c=0,u=0;if(i){let p=!UB()||t==="fixed";o?p||(c=-i.offsetLeft,u=-i.offsetTop):(A=i.width,s=i.height,p&&(c=i.offsetLeft,u=i.offsetTop))}if(OB(r)<=0){let p=r.ownerDocument,g=p.body,m=getComputedStyle(g),h=p.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,y=Math.abs(r.clientWidth-g.clientWidth-h),f=getComputedStyle(r).scrollbarGutter==="stable both-edges"?y/2:y;f<=rde&&(A-=f)}return{width:A,height:s,x:c,y:u}}function Ade(e,t){let n=oc(e,!0,t==="fixed"),o=n.top+e.clientTop,a=n.left+e.clientLeft,r=id(e),i=e.clientWidth*r.x,A=e.clientHeight*r.y,s=a*r.x,c=o*r.y;return{width:i,height:A,x:s,y:c}}function iT(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=ide(e,n,t);else if(t==="document")o=ode(jr(e));else if(Zo(t))o=Ade(t,n);else{let a=cT(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return ec(o)}function sde(e,t){let n=t.get(e);if(n)return n;let o=nc(e,[],!1).filter(A=>Zo(A)&&ac(A)!=="body"),a=null,r=Vo(e).position==="fixed",i=r?RA(e):e;for(;Zo(i)&&!rd(i);){let A=Vo(i),s=HB(i),c=a?a.position:r?"fixed":"";!s&&(c==="fixed"||c==="absolute"&&A.position==="static")?o=o.filter(l=>l!==i):a=A,i=RA(i)}return t.set(e,o),o}function cde(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e,i=[...n==="clippingAncestors"?Dg(t)?[]:sde(t,this._c):[].concat(n),o],A=iT(t,i[0],a),s=A.top,c=A.right,u=A.bottom,l=A.left;for(let p=1;p<i.length;p++){let g=iT(t,i[p],a);s=Jo(g.top,s),c=Nr(g.right,c),u=Nr(g.bottom,u),l=Jo(g.left,l)}return{width:c-l,height:u-s,x:l,y:s}}function ude(e){let{width:t,height:n}=sT(e);return{width:t,height:n}}function dde(e,t,n){let o=xi(t),a=jr(t),r=n==="fixed",i=oc(e,!0,r,t),A={scrollLeft:0,scrollTop:0},s=$r(0);if((o||!r)&&((ac(t)!=="body"||xg(a))&&(A=Fg(t)),o)){let p=oc(t,!0,r,t);s.x=p.x+t.clientLeft,s.y=p.y+t.clientTop}!o&&a&&(s.x=OB(a));let c=a&&!o&&!r?uT(a,A):$r(0),u=i.left+A.scrollLeft-s.x-c.x,l=i.top+A.scrollTop-s.y-c.y;return{x:u,y:l,width:i.width,height:i.height}}function AF(e){return Vo(e).position==="static"}function AT(e,t){if(!xi(e)||Vo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return jr(e)===n&&(n=n.ownerDocument.body),n}function dT(e,t){let n=da(e);if(Dg(e))return n;if(!xi(e)){let a=RA(e);for(;a&&!rd(a);){if(Zo(a)&&!AF(a))return a;a=RA(a)}return n}let o=AT(e,t);for(;o&&aT(o)&&AF(o);)o=AT(o,t);return o&&rd(o)&&AF(o)&&!HB(o)?n:o||oT(e)||n}var lde=async function(e){let t=this.getOffsetParent||dT,n=this.getDimensions,o=await n(e.floating);return{reference:dde(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function pde(e){return Vo(e).direction==="rtl"}var lT={convertOffsetParentRelativeRectToViewportRelativeRect:nde,getDocumentElement:jr,getClippingRect:cde,getOffsetParent:dT,getElementRects:lde,getClientRects:ade,getDimensions:ude,getScale:id,isElement:Zo,isRTL:pde};function pT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gde(e,t,n){let o=null,a,r=jr(e);function i(){var u;clearTimeout(a),(u=o)==null||u.disconnect(),o=null}function A(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),i();let p=e.getBoundingClientRect(),{left:g,top:m,width:h,height:y}=p;if(u||t(),!h||!y)return;let f=vg(m),b=vg(r.clientWidth-(g+h)),B=vg(r.clientHeight-(m+y)),C=vg(g),x={rootMargin:-f+"px "+-b+"px "+-B+"px "+-C+"px",threshold:Jo(0,Nr(1,l))||1},Q=!0;function R(q){let J=q[0].intersectionRatio;if(!pT(p,e.getBoundingClientRect()))return A();if(J!==l){if(!Q)return A();J?A(!1,J):a=setTimeout(()=>{A(!1,1e-7)},1e3)}Q=!1}try{o=new IntersectionObserver(R,{...x,root:r.ownerDocument})}catch{o=new IntersectionObserver(R,x)}o.observe(e)}let s=da(e),c=()=>A(n);return s.addEventListener("resize",c),A(!0),()=>{s.removeEventListener("resize",c),i()}}function cF(e,t,n,o){o===void 0&&(o={});let{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:A=typeof IntersectionObserver=="function",animationFrame:s=!1}=o,c=sF(e),u=a||r?[...c?nc(c):[],...t?nc(t):[]]:[];u.forEach(f=>{a&&f.addEventListener("scroll",n),r&&f.addEventListener("resize",n)});let l=c&&A?gde(c,n,r):null,p=-1,g=null;i&&(g=new ResizeObserver(f=>{let[b]=f;b&&b.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var B;(B=g)==null||B.observe(t)})),n()}),c&&!s&&g.observe(c),t&&g.observe(t));let m,h=s?oc(e):null;s&&y();function y(){let f=oc(e);h&&!pT(h,f)&&n(),h=f,m=requestAnimationFrame(y)}return n(),()=>{var f;u.forEach(b=>{a&&b.removeEventListener("scroll",n),r&&b.removeEventListener("resize",n)}),l?.(),(f=g)==null||f.disconnect(),g=null,s&&cancelAnimationFrame(m)}}var gT=ZU;var mT=VU,fT=KU,bT=eT,hT=JU,uF=YU;var BT=XU,dF=(e,t,n)=>{let o=new Map,a=n??{},r={...lT,...a.platform,_c:o};return zU(e,t,{...a,platform:r})};var ln=w(Y(),1),CT=w(Y(),1),wT=w(Sd(),1),mde=typeof document<"u",fde=function(){},qB=mde?CT.useLayoutEffect:fde;function zB(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!zB(e[o],t[o]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,a[o]))return!1;for(o=n;o--!==0;){let r=a[o];if(!(r==="_owner"&&e.$$typeof)&&!zB(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function ET(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yT(e,t){let n=ET(e);return Math.round(t*n)/n}function lF(e){let t=ln.useRef(e);return qB(()=>{t.current=e}),t}function kT(e){e===void 0&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:a,elements:{reference:r,floating:i}={},transform:A=!0,whileElementsMounted:s,open:c}=e,[u,l]=ln.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=ln.useState(o);zB(p,o)||g(o);let[m,h]=ln.useState(null),[y,f]=ln.useState(null),b=ln.useCallback($e=>{$e!==x.current&&(x.current=$e,h($e))},[]),B=ln.useCallback($e=>{$e!==Q.current&&(Q.current=$e,f($e))},[]),C=r||m,E=i||y,x=ln.useRef(null),Q=ln.useRef(null),R=ln.useRef(u),q=s!=null,J=lF(s),Re=lF(a),ue=lF(c),Se=ln.useCallback(()=>{if(!x.current||!Q.current)return;let $e={placement:t,strategy:n,middleware:p};Re.current&&($e.platform=Re.current),dF(x.current,Q.current,$e).then(rn=>{let Za={...rn,isPositioned:ue.current!==!1};we.current&&!zB(R.current,Za)&&(R.current=Za,wT.flushSync(()=>{l(Za)}))})},[p,t,n,Re,ue]);qB(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,l($e=>({...$e,isPositioned:!1})))},[c]);let we=ln.useRef(!1);qB(()=>(we.current=!0,()=>{we.current=!1}),[]),qB(()=>{if(C&&(x.current=C),E&&(Q.current=E),C&&E){if(J.current)return J.current(C,E,Se);Se()}},[C,E,Se,J,q]);let He=ln.useMemo(()=>({reference:x,floating:Q,setReference:b,setFloating:B}),[b,B]),wt=ln.useMemo(()=>({reference:C,floating:E}),[C,E]),la=ln.useMemo(()=>{let $e={position:n,left:0,top:0};if(!wt.floating)return $e;let rn=yT(wt.floating,u.x),Za=yT(wt.floating,u.y);return A?{...$e,transform:"translate("+rn+"px, "+Za+"px)",...ET(wt.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:rn,top:Za}},[n,A,wt.floating,u.x,u.y]);return ln.useMemo(()=>({...u,update:Se,refs:He,elements:wt,floatingStyles:la}),[u,Se,He,wt,la])}var bde=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){let{element:o,padding:a}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?uF({element:o.current,padding:a}).fn(n):{}:o?uF({element:o,padding:a}).fn(n):{}}}},QT=(e,t)=>{let n=gT(e);return{name:n.name,fn:n.fn,options:[e,t]}},IT=(e,t)=>{let n=mT(e);return{name:n.name,fn:n.fn,options:[e,t]}},_T=(e,t)=>({fn:BT(e).fn,options:[e,t]}),vT=(e,t)=>{let n=fT(e);return{name:n.name,fn:n.fn,options:[e,t]}},xT=(e,t)=>{let n=bT(e);return{name:n.name,fn:n.fn,options:[e,t]}};var DT=(e,t)=>{let n=hT(e);return{name:n.name,fn:n.fn,options:[e,t]}};var FT=(e,t)=>{let n=bde(e);return{name:n.name,fn:n.fn,options:[e,t]}};var MT=w(Y(),1),jT=w(Sd(),1);var jn=w(Y(),1);var hde=Object.defineProperty,Xo=(e,t)=>hde(e,"name",{value:t,configurable:!0});function gF(e){let t=jn.forwardRef((n,o)=>{let{children:a,...r}=n,i=null,A=!1,s=[];pF(a)&&typeof YB=="function"&&(a=YB(a._payload)),jn.Children.forEach(a,p=>{if(NT(p)){A=!0;let g=p,m="child"in g.props?g.props.child:g.props.children;pF(m)&&typeof YB=="function"&&(m=YB(m._payload)),i=yde(g,m),s.push(i?.props?.children)}else s.push(p)}),i?i=jn.cloneElement(i,void 0,s):!A&&jn.Children.count(a)===1&&jn.isValidElement(a)&&(i=a);let c=i?RT(i):void 0,u=Rr(o,c);if(!i){if(a||a===0)throw new Error(A?Ede(e):wde(e));return a}let l=LT(r,i.props??{});return i.type!==jn.Fragment&&(l.ref=o?u:c),jn.cloneElement(i,l)});return t.displayName=`${e}.Slot`,t}Xo(gF,"createSlot");var ST=Symbol.for("radix.slottable");function Bde(e){let t=Xo(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=ST,t}Xo(Bde,"createSlottable");var yde=Xo((e,t)=>{if("child"in e.props){let n=e.props.child;return jn.isValidElement(n)?jn.cloneElement(n,void 0,e.props.children(n.props.children)):null}return jn.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function LT(e,t){let n={...t};for(let o in t){let a=e[o],r=t[o];/^on[A-Z]/.test(o)?a&&r?n[o]=(...A)=>{let s=r(...A);return a(...A),s}:a&&(n[o]=a):o==="style"?n[o]={...a,...r}:o==="className"&&(n[o]=[a,r].filter(Boolean).join(" "))}return{...e,...n}}Xo(LT,"mergeProps");function RT(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Xo(RT,"getElementRef");function NT(e){return jn.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ST}Xo(NT,"isSlottable");var Cde=Symbol.for("react.lazy");function pF(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Cde&&"_payload"in e&&$T(e._payload)}Xo(pF,"isLazyComponent");function $T(e){return typeof e=="object"&&e!==null&&"then"in e}Xo($T,"isPromiseLike");var wde=Xo(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Ede=Xo(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),YB=jn[" use ".trim().toString()];var PT=w(k(),1),kde=Object.defineProperty,Qde=(e,t)=>kde(e,"name",{value:t,configurable:!0}),Ide=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Di=Ide.reduce((e,t)=>{let n=gF(`Primitive.${t}`),o=MT.forwardRef((a,r)=>{let{asChild:i,...A}=a,s=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,PT.jsx)(s,{...A,ref:r})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function mF(e,t){e&&jT.flushSync(()=>e.dispatchEvent(t))}Qde(mF,"dispatchDiscreteCustomEvent");var Ad=w(Y(),1),_de=Object.defineProperty,vde=(e,t)=>_de(e,"name",{value:t,configurable:!0});function rc(e){let t=Ad.useRef(e);return Ad.useEffect(()=>{t.current=e}),Ad.useMemo(()=>((...n)=>t.current?.(...n)),[])}vde(rc,"useCallbackRef");var GT=w(Y(),1);var xde=Object.defineProperty,Dde=(e,t)=>xde(e,"name",{value:t,configurable:!0});function fF(e){let[t,n]=GT.useState(void 0);return ua(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let o=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;let r=a[0],i,A;if("borderBoxSize"in r){let s=r.borderBoxSize,c=Array.isArray(s)?s[0]:s;i=c.inlineSize,A=c.blockSize}else i=e.offsetWidth,A=e.offsetHeight;n({width:i,height:A})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}Dde(fF,"useSize");var sd=w(k(),1),Fde=Object.defineProperty,NA=(e,t)=>Fde(e,"name",{value:t,configurable:!0});var HT="Popper",[UT,bF]=kg(HT),[Sde,TT]=UT(HT),Lde=NA(e=>{let{__scopePopper:t,children:n}=e,[o,a]=Wn.useState(null),[r,i]=Wn.useState(void 0);return(0,sd.jsx)(Sde,{scope:t,anchor:o,onAnchorChange:a,placementState:r,setPlacementState:i,children:n})},"Popper"),Rde="PopperAnchor",Nde=Wn.forwardRef(NA(function(t,n){let{__scopePopper:o,virtualRef:a,...r}=t,i=TT(Rde,o),A=Wn.useRef(null),s=i.onAnchorChange,c=Wn.useCallback(h=>{A.current=h,h&&s(h)},[s]),u=Rr(n,c),l=Wn.useRef(null);Wn.useEffect(()=>{if(!a)return;let h=l.current;l.current=a.current,h!==l.current&&s(l.current)});let p=i.placementState&&KB(i.placementState),g=p?.[0],m=p?.[1];return a?null:(0,sd.jsx)(Di.div,{"data-radix-popper-side":g,"data-radix-popper-align":m,...r,ref:u})},"PopperAnchor")),OT="PopperContent",[$de,n6e]=UT(OT),Mde=Wn.forwardRef(NA(function(t,n){let{__scopePopper:o,side:a="bottom",sideOffset:r=0,align:i="center",alignOffset:A=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:l=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:h,...y}=t,f=TT(OT,o),[b,B]=Wn.useState(null),C=Rr(n,B),[E,x]=Wn.useState(null),Q=fF(E),R=Q?.width??0,q=Q?.height??0,J=a+(i!=="center"?"-"+i:""),Re=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},ue=Array.isArray(u)?u:[u],Se=ue.length>0,we={padding:Re,boundary:ue.filter(qT),altBoundary:Se},{refs:He,floatingStyles:wt,placement:la,isPositioned:$e,middlewareData:rn}=kT({strategy:"fixed",placement:J,whileElementsMounted:NA((...Ry)=>cF(...Ry,{animationFrame:m==="always"}),"whileElementsMounted"),elements:{reference:f.anchor},middleware:[QT({mainAxis:r+q,alignmentAxis:A}),c&&IT({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?_T():void 0,...we}),c&&vT({...we}),xT({...we,apply:NA(({elements:Ry,rects:c8,availableWidth:Hz,availableHeight:Uz})=>{let{width:Tz,height:Oz}=c8.reference,qg=Ry.floating.style;qg.setProperty("--radix-popper-available-width",`${Hz}px`),qg.setProperty("--radix-popper-available-height",`${Uz}px`),qg.setProperty("--radix-popper-anchor-width",`${Tz}px`),qg.setProperty("--radix-popper-anchor-height",`${Oz}px`)},"apply")}),E&&FT({element:E,padding:s}),jde({arrowWidth:R,arrowHeight:q}),g&&DT({strategy:"referenceHidden",...we,boundary:Se?we.boundary:void 0})]}),Za=f.setPlacementState;ua(()=>(Za(la),()=>{Za(void 0)}),[la,Za]);let[i8,A8]=KB(la),s8=rc(h);ua(()=>{$e&&s8?.()},[$e,s8]);let $z=rn.arrow?.x,Mz=rn.arrow?.y,jz=rn.arrow?.centerOffset!==0,[Pz,Gz]=Wn.useState();return ua(()=>{b&&Gz(window.getComputedStyle(b).zIndex)},[b]),(0,sd.jsx)("div",{ref:He.setFloating,"data-radix-popper-content-wrapper":"",style:{...wt,transform:$e?wt.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Pz,"--radix-popper-transform-origin":[rn.transformOrigin?.x,rn.transformOrigin?.y].join(" "),...rn.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,sd.jsx)($de,{scope:o,placedSide:i8,placedAlign:A8,onArrowChange:x,arrowX:$z,arrowY:Mz,shouldHideArrow:jz,children:(0,sd.jsx)(Di.div,{"data-side":i8,"data-align":A8,...y,ref:C,style:{...y.style,animation:$e?y.style?.animation:"none"}})})})},"PopperContent"));function qT(e){return e!==null}NA(qT,"isNotNull");var jde=NA(e=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:o,middlewareData:a}=t,i=a.arrow?.centerOffset!==0,A=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[c,u]=KB(n),l={start:"0%",center:"50%",end:"100%"}[u],p=(a.arrow?.x??0)+A/2,g=(a.arrow?.y??0)+s/2,m="",h="";return c==="bottom"?(m=i?l:`${p}px`,h=`${-s}px`):c==="top"?(m=i?l:`${p}px`,h=`${o.floating.height+s}px`):c==="right"?(m=`${-s}px`,h=i?l:`${g}px`):c==="left"&&(m=`${o.floating.width+s}px`,h=i?l:`${g}px`),{data:{x:m,y:h}}}}),"transformOrigin");function KB(e){let[t,n="center"]=e.split("-");return[t,n]}NA(KB,"getSideAndAlignFromPlacement");var zT=Lde,YT=Nde,KT=Mde;var JB=w(Y(),1),JT=w(Sd(),1);var WT=w(k(),1),Gde=Object.defineProperty,Hde=(e,t)=>Gde(e,"name",{value:t,configurable:!0}),ZT=JB.forwardRef(Hde(function(t,n){let{container:o,...a}=t,[r,i]=JB.useState(!1);ua(()=>i(!0),[]);let A=o||r&&globalThis?.document?.body;return A?JT.createPortal((0,WT.jsx)(Di.div,{...a,ref:n}),A):null},"Portal"));var Pn=w(Y(),1);var VT=w(Y(),1),Ude=Object.defineProperty,Fi=(e,t)=>Ude(e,"name",{value:t,configurable:!0});function XT(e,t){return VT.useReducer((n,o)=>t[n][o]??n,e)}Fi(XT,"useStateMachine");var BF=Fi(e=>{let{present:t,children:n}=e,o=eO(t),a=typeof n=="function"?n({present:o.isPresent}):Pn.Children.only(n),r=tO(o.ref,nO(a));return typeof n=="function"||o.isPresent?Pn.cloneElement(a,{ref:r}):null},"Presence");function eO(e){let[t,n]=Pn.useState(),o=Pn.useRef(null),a=Pn.useRef(e),r=Pn.useRef("none"),i=Pn.useRef(void 0),A=e?"mounted":"unmounted",[s,c]=XT(A,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Pn.useEffect(()=>{s==="mounted"?(r.current=i.current??cd(o.current),i.current=void 0):r.current="none"},[s]),ua(()=>{let u=o.current,l=a.current;if(l!==e){let g=r.current,m=cd(u);e?(i.current=m,c("MOUNT")):m==="none"||u?.display==="none"?c("UNMOUNT"):c(l&&g!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),ua(()=>{if(t){let u,l=t.ownerDocument.defaultView??window,p=Fi(m=>{let y=cd(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&y&&(c("ANIMATION_END"),!a.current)){let f=t.style.animationFillMode;t.style.animationFillMode="forwards",u=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=f)})}},"handleAnimationEnd"),g=Fi(m=>{m.target===t&&(r.current=cd(o.current))},"handleAnimationStart");return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{l.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Pn.useCallback(u=>{if(u){let l=getComputedStyle(u);o.current=l,i.current=cd(l)}else o.current=null;n(u)},[])}}Fi(eO,"usePresence");function hF(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Fi(hF,"setRef");function tO(...e){let t=Pn.useRef(e);return t.current=e,Pn.useCallback(n=>{let o=t.current,a=!1,r=o.map(i=>{let A=hF(i,n);return!a&&typeof A=="function"&&(a=!0),A});if(a)return()=>{for(let i=0;i<r.length;i++){let A=r[i];typeof A=="function"?A():hF(o[i],null)}}},[])}Fi(tO,"useStableComposedRefs");function cd(e){return e?.animationName||"none"}Fi(cd,"getAnimationName");function nO(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Fi(nO,"getElementRef");var tt=w(Y(),1);var oO=w(k(),1),Tde=Object.defineProperty,_n=(e,t)=>Tde(e,"name",{value:t,configurable:!0}),yF="dismissableLayer.update",Ode="dismissableLayer.pointerDownOutside",qde="dismissableLayer.focusOutside",aO,rO=tt.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),iO=tt.forwardRef(_n(function(t,n){let{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:A,onInteractOutside:s,onDismiss:c,...u}=t,l=tt.useContext(rO),[p,g]=tt.useState(null),m=p?.ownerDocument??globalThis?.document,[,h]=tt.useState({}),y=Rr(n,g),f=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),B=b?f.indexOf(b):-1,C=p?f.indexOf(p):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,x=C>=B,Q=tt.useRef(!1),R=AO(ue=>{i?.(ue),s?.(ue),ue.defaultPrevented||c?.()},{ownerDocument:m,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:Q,dismissableSurfaces:l.dismissableSurfaces,shouldHandlePointerDownOutside:tt.useCallback(ue=>{if(!(ue instanceof Node))return!1;let Se=[...l.branches].some(we=>we.contains(ue));return x&&!Se},[l.branches,x])}),q=sO(ue=>{if(a&&Q.current)return;let Se=ue.target;[...l.branches].some(He=>He.contains(Se))||(A?.(ue),s?.(ue),ue.defaultPrevented||c?.())},m),J=p?C===f.length-1:!1,Re=rc(ue=>{ue.key==="Escape"&&(r?.(ue),!ue.defaultPrevented&&c&&(ue.preventDefault(),c()))});return tt.useEffect(()=>{if(J)return m.addEventListener("keydown",Re,{capture:!0}),()=>m.removeEventListener("keydown",Re,{capture:!0})},[m,J,Re]),tt.useEffect(()=>{if(p)return o&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(aO=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(p)),l.layers.add(p),CF(),()=>{o&&(l.layersWithOutsidePointerEventsDisabled.delete(p),l.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=aO))}},[p,m,o,l]),tt.useEffect(()=>()=>{p&&(l.layers.delete(p),l.layersWithOutsidePointerEventsDisabled.delete(p),CF())},[p,l]),tt.useEffect(()=>{let ue=_n(()=>h({}),"handleUpdate");return document.addEventListener(yF,ue),()=>document.removeEventListener(yF,ue)},[]),(0,oO.jsx)(Di.div,{...u,ref:y,style:{pointerEvents:E?x?"auto":"none":void 0,...t.style},onFocusCapture:ca(t.onFocusCapture,q.onFocusCapture),onBlurCapture:ca(t.onBlurCapture,q.onBlurCapture),onPointerDownCapture:ca(t.onPointerDownCapture,R.onPointerDownCapture)})},"DismissableLayer"));function zde(){let e=tt.useContext(rO),[t,n]=tt.useState(null);return tt.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}_n(zde,"useDismissableLayerSurface");var Yde=_n(()=>!0,"IS_TRUE");function AO(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:r,shouldHandlePointerDownOutside:i=Yde}=t,A=rc(e),s=tt.useRef(!1),c=tt.useRef(!1),u=tt.useRef(new Map),l=tt.useRef(()=>{});return tt.useEffect(()=>{function p(){c.current=!1,a.current=!1,u.current.clear()}_n(p,"resetOutsideInteraction");function g(){return Array.from(u.current.values()).some(Boolean)}_n(g,"isOutsideInteractionIntercepted");function m(B){if(!c.current)return;let C=B.target;C instanceof Node&&[...r].some(x=>x.contains(C))||u.current.set(B.type,!0),B.type==="click"&&window.setTimeout(()=>{c.current&&l.current()},0)}_n(m,"handleInteractionCapture");function h(B){c.current&&u.current.set(B.type,!1)}_n(h,"handleInteractionBubble");let y=_n(B=>{if(B.target&&!s.current){let E=function(){n.removeEventListener("click",l.current);let Q=g();p(),Q||wF(Ode,A,x,{discrete:!0})};var C=E;if(_n(E,"handleAndDispatchPointerDownOutsideEvent"),!i(B.target)){n.removeEventListener("click",l.current),p(),s.current=!1;return}let x={originalEvent:B};c.current=!0,a.current=o&&B.button===0,u.current.clear(),!o||B.button!==0?E():(n.removeEventListener("click",l.current),l.current=E,n.addEventListener("click",l.current,{once:!0}))}else n.removeEventListener("click",l.current),p();s.current=!1},"handlePointerDown"),f=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let B of f)n.addEventListener(B,m,!0),n.addEventListener(B,h);let b=window.setTimeout(()=>{n.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(b),n.removeEventListener("pointerdown",y),n.removeEventListener("click",l.current);for(let B of f)n.removeEventListener(B,m,!0),n.removeEventListener(B,h)}},[n,A,o,a,r,i]),{onPointerDownCapture:_n(()=>s.current=!0,"onPointerDownCapture")}}_n(AO,"usePointerDownOutside");function sO(e,t=globalThis?.document){let n=rc(e),o=tt.useRef(!1);return tt.useEffect(()=>{let a=_n(r=>{r.target&&!o.current&&wF(qde,n,{originalEvent:r},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:_n(()=>o.current=!0,"onFocusCapture"),onBlurCapture:_n(()=>o.current=!1,"onBlurCapture")}}_n(sO,"useFocusOutside");function CF(){let e=new CustomEvent(yF);document.dispatchEvent(e)}_n(CF,"dispatchUpdate");function wF(e,t,n,{discrete:o}){let a=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),o?mF(a,r):a.dispatchEvent(r)}_n(wF,"handleAndDispatchCustomEvent");var Qo=w(k(),1),Kde=Object.defineProperty,Si=(e,t)=>Kde(e,"name",{value:t,configurable:!0}),EF,QF="HoverCard",[cO,E6e]=kg(QF,[bF]),IF=bF(),[Jde,WB]=cO(QF),Wde=Si(e=>{let{__scopeHoverCard:t,children:n,open:o,defaultOpen:a,onOpenChange:r,openDelay:i=700,closeDelay:A=300}=e,s=IF(t),c=nn.useRef(0),u=nn.useRef(0),l=nn.useRef(!1),p=nn.useRef(!1),[g,m]=tF({prop:o,defaultProp:a??!1,onChange:r,caller:QF}),h=nn.useCallback(()=>{clearTimeout(u.current),c.current=window.setTimeout(()=>m(!0),i)},[i,m]),y=nn.useCallback(()=>{clearTimeout(c.current),!l.current&&!p.current&&(u.current=window.setTimeout(()=>m(!1),A))},[A,m]),f=nn.useCallback(()=>m(!1),[m]);return nn.useEffect(()=>()=>{clearTimeout(c.current),clearTimeout(u.current)},[]),(0,Qo.jsx)(Jde,{scope:t,open:g,onOpenChange:m,onOpen:h,onClose:y,onDismiss:f,hasSelectionRef:l,isPointerDownOnContentRef:p,children:(0,Qo.jsx)(zT,{...s,children:n})})},"HoverCard"),Zde="HoverCardTrigger",Vde=nn.forwardRef(Si(function(t,n){let{__scopeHoverCard:o,...a}=t,r=WB(Zde,o),i=IF(o);return(0,Qo.jsx)(YT,{asChild:!0,...i,children:(0,Qo.jsx)(Di.a,{"data-state":r.open?"open":"closed",...a,ref:n,onPointerEnter:ca(t.onPointerEnter,Sg(r.onOpen)),onPointerLeave:ca(t.onPointerLeave,Sg(r.onClose)),onFocus:ca(t.onFocus,r.onOpen),onBlur:ca(t.onBlur,r.onClose),onTouchStart:ca(t.onTouchStart,A=>A.preventDefault())})})},"HoverCardTrigger")),uO="HoverCardPortal",[Xde,ele]=cO(uO,{forceMount:void 0}),tle=Si(e=>{let{__scopeHoverCard:t,forceMount:n,children:o,container:a}=e,r=WB(uO,t);return(0,Qo.jsx)(Xde,{scope:t,forceMount:n,children:(0,Qo.jsx)(BF,{present:n||r.open,children:(0,Qo.jsx)(ZT,{asChild:!0,container:a,children:o})})})},"HoverCardPortal"),kF="HoverCardContent",nle=nn.forwardRef(Si(function(t,n){let o=ele(kF,t.__scopeHoverCard),{forceMount:a=o.forceMount,...r}=t,i=WB(kF,t.__scopeHoverCard);return(0,Qo.jsx)(BF,{present:a||i.open,children:(0,Qo.jsx)(ale,{"data-state":i.open?"open":"closed",...r,onPointerEnter:ca(t.onPointerEnter,Sg(i.onOpen)),onPointerLeave:ca(t.onPointerLeave,Sg(i.onClose)),ref:n})})},"HoverCardContent")),ale=nn.forwardRef(Si(function(t,n){let{__scopeHoverCard:o,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:A,...s}=t,c=WB(kF,o),u=IF(o),l=nn.useRef(null),p=Rr(n,l),[g,m]=nn.useState(!1);return nn.useEffect(()=>{if(g){let h=document.body;return EF=h.style.userSelect||h.style.webkitUserSelect,h.style.userSelect="none",h.style.webkitUserSelect="none",()=>{h.style.userSelect=EF,h.style.webkitUserSelect=EF}}},[g]),nn.useEffect(()=>{if(l.current){let h=Si(()=>{m(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(c.hasSelectionRef.current=!0)})},"handlePointerUp");return document.addEventListener("pointerup",h),()=>{document.removeEventListener("pointerup",h),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),nn.useEffect(()=>{l.current&&dO(l.current).forEach(y=>y.setAttribute("tabindex","-1"))}),(0,Qo.jsx)(iO,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:A,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:ca(i,h=>{h.preventDefault()}),onDismiss:c.onDismiss,children:(0,Qo.jsx)(KT,{...u,...s,onPointerDown:ca(s.onPointerDown,h=>{h.currentTarget.contains(h.target)&&m(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:p,style:{...s.style,userSelect:g?"text":void 0,WebkitUserSelect:g?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})},"HoverCardContentImpl"));function Sg(e){return t=>t.pointerType==="touch"?void 0:e()}Si(Sg,"excludeTouch");function dO(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Si(o=>o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}Si(dO,"getTabbableNodes");var lO=Wde,pO=Vde,gO=tle,mO=nle;var Pr=w(Y(),1);var $A=w(k(),1),rle=8,ile=10,_F=150,Ale=new Set(["circle","ellipse","g","line","path","polygon","polyline","rect","svg","text"]);function sle(e){return typeof e.type=="string"&&Ale.has(e.type)}function gt({align:e="center",children:t,className:n,content:o,label:a,placement:r="above"}){let i=(0,Pr.useId)(),A=(0,Pr.useRef)(null),s=(0,Pr.useRef)(null),c=(0,Pr.useRef)(0),[u,l]=(0,Pr.useState)(!1),p=sle(t);(0,Pr.useEffect)(()=>{if(!u)return;let m=h=>{let y=A.current,f=h.target;!(f instanceof Node)||y?.contains(f)||document.getElementById(i)?.contains(f)||(c.current=performance.now()+_F+50,l(!1))};return document.addEventListener("pointerdown",m,!0),()=>{document.removeEventListener("pointerdown",m,!0)}},[u,i]);let g=(0,$A.jsxs)(lO,{closeDelay:_F,onOpenChange:m=>{m&&performance.now()<c.current||l(m)},open:u,openDelay:0,children:[(0,$A.jsx)(pO,{"aria-describedby":u?i:void 0,asChild:!0,onPointerCancel:()=>{s.current=null},onPointerDown:m=>{m.pointerType==="touch"&&(s.current=u)},onPointerUp:m=>{if(m.pointerType!=="touch"||s.current===null)return;let h=!s.current;h||(c.current=performance.now()+_F+50),l(h),s.current=null},ref:p?m=>{A.current=m}:void 0,children:t}),(0,$A.jsx)(gO,{children:(0,$A.jsxs)(mO,{align:e==="left"?"start":e==="right"?"end":"center",className:S("z-50 select-text outline-none",n??"min-w-36 max-w-64 rounded-md border border-white/15 bg-dashboard-surface-raised px-3 py-2 font-mono text-xs leading-relaxed text-dashboard-text-muted shadow-2xl shadow-black/70"),collisionPadding:rle,hideWhenDetached:!0,id:i,role:"tooltip",side:r==="above"?"top":"bottom",sideOffset:ile,children:[a?(0,$A.jsx)("div",{className:"mb-1 font-semibold uppercase tracking-[0.1em] text-dashboard-text-muted",children:a}):null,o]})})]});return p?g:(0,$A.jsx)("span",{className:"inline-flex",ref:A,children:g})}var qt=w(k(),1),fO=[{color:"#67e8f9",key:"personal",label:"Personal"},{color:"#6ee7b7",key:"public",label:"Public"}];function hO(e){let[t,n]=(0,bO.useState)(30),o=e.days.slice(-t),a=xa(200),r=o.length>0?a.plotWidth/o.length:a.plotWidth,i=Math.max(2,Math.min(13,r*.68)),A=o.map(u=>u.personal+u.public),s=Math.max(1,...A),c=A.some(u=>u>0);return(0,qt.jsxs)(O,{className:"min-h-[17rem] p-4 sm:p-5",children:[(0,qt.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,qt.jsxs)("div",{children:[(0,qt.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:"Activity over time"}),(0,qt.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Stacked personal + public memories created each day."})]}),(0,qt.jsx)("div",{"aria-label":"Memory timeline range",className:"inline-flex rounded border border-white/[0.08] bg-black/20 p-0.5",children:[7,30,90].map(u=>(0,qt.jsxs)("button",{"aria-pressed":t===u,className:S("cursor-pointer rounded-sm border-0 px-2.5 py-1.5 font-mono text-xs uppercase tracking-[0.1em] transition-colors",t===u?"bg-cyan-300/10 text-cyan-100":"bg-transparent text-dashboard-text-muted hover:text-dashboard-text"),onClick:()=>n(u),type:"button",children:[u,"d"]},u))})]}),(0,qt.jsx)("div",{"aria-label":"Memory visibility legend",className:"mt-4 flex flex-wrap gap-4",children:fO.map(u=>(0,qt.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-dashboard-text-muted",children:[(0,qt.jsx)("i",{className:"size-2 rounded-sm",style:{backgroundColor:u.color}}),u.label]},u.key))}),(0,qt.jsxs)("div",{className:"relative mt-3 overflow-hidden",children:[(0,qt.jsxs)("svg",{"aria-label":`Memories learned during the last ${t} days`,className:"block h-auto min-h-40 w-full",role:"img",viewBox:`0 0 ${a.width} ${a.height}`,children:[(0,qt.jsx)(Co,{layout:a,maximum:s}),o.map((u,l)=>{let p=0,g=a.left+l*r+(r-i)/2,m=A[l]??0;return(0,qt.jsx)(gt,{content:(0,qt.jsx)(Jn,{rows:[["personal",u.personal],["public",u.public],["total",m]]}),label:Ot(u.date),children:(0,qt.jsxs)("g",{"aria-label":`${Ot(u.date)}: ${u.personal} personal, ${u.public} public, ${m} total memories`,tabIndex:0,children:[fO.map(h=>{let f=u[h.key]/s*a.plotHeight;return p+=f,(0,qt.jsx)("rect",{fill:h.color,height:f,opacity:.82,rx:"1",width:i,x:g,y:a.top+a.plotHeight-p},h.key)}),(0,qt.jsx)("rect",{fill:"transparent",height:a.plotHeight,width:Math.max(i,8),x:g-(Math.max(i,8)-i)/2,y:a.top})]})},u.date)}),(0,qt.jsx)(Da,{dates:o.map(u=>u.date),layout:a,xPosition:u=>a.left+u*r+r/2})]}),c?null:(0,qt.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center pt-12 font-mono text-xs text-dashboard-text-muted",children:"No memories were learned in this period."})]})]})}var BO=w(Y(),1);var st=w(k(),1);function yO(e){let[t,n]=(0,BO.useState)(30),o=new Map(e.recallDays.map(h=>[h.date,h])),a=e.extractionDays.slice(-t).map(h=>({date:h.date,extraction:h,recall:o.get(h.date)??{costUsd:0,date:h.date,events:0}})),r=a.reduce((h,y)=>h+y.extraction.costUsd,0),i=a.reduce((h,y)=>h+y.recall.costUsd,0),A=r+i,s=a.reduce((h,y)=>h+y.extraction.events+y.recall.events,0),c=Math.max(.01,...a.map(h=>h.extraction.costUsd+h.recall.costUsd)),u=xa(200),l=64,p=u.width-l-u.right,g=a.length>0?p/a.length:p,m=Math.max(2,Math.min(13,g*.68));return(0,st.jsxs)(O,{className:"min-h-[17rem] p-4 sm:p-5",children:[(0,st.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,st.jsxs)("div",{children:[(0,st.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:Qt({total:A})}),(0,st.jsxs)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:["System-wide estimate across ",Lg(s)," spanning extraction and recall."]}),(0,st.jsxs)("div",{className:"mt-2 flex flex-wrap gap-x-4 gap-y-1 font-mono text-xs text-dashboard-text-muted",children:[(0,st.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,st.jsx)("span",{"aria-hidden":"true",className:"h-2 w-2 rounded-[1px] bg-cyan-300"}),"Extraction ",Qt({total:r})]}),(0,st.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,st.jsx)("span",{"aria-hidden":"true",className:"h-2 w-2 rounded-[1px] bg-fuchsia-400"}),"Recall ",Qt({total:i})]})]})]}),(0,st.jsx)("div",{"aria-label":"Memory cost range",className:"inline-flex rounded border border-white/[0.08] bg-black/20 p-0.5",children:[7,30,90].map(h=>(0,st.jsxs)("button",{"aria-pressed":t===h,className:S("cursor-pointer rounded-sm border-0 px-2.5 py-1.5 font-mono text-xs uppercase tracking-[0.1em] transition-colors",t===h?"bg-cyan-300/10 text-cyan-100":"bg-transparent text-dashboard-text-muted hover:text-dashboard-text"),onClick:()=>n(h),type:"button",children:[h,"d"]},h))})]}),(0,st.jsxs)("div",{className:"relative mt-4 overflow-hidden",children:[(0,st.jsxs)("svg",{"aria-label":`Memory extraction and recall cost during the last ${t} days`,className:"block h-auto min-h-40 w-full",role:"img",viewBox:`0 0 ${u.width} ${u.height}`,children:[[c,c/2,0].map((h,y)=>{let f=u.top+y*(u.plotHeight/2);return(0,st.jsxs)("g",{children:[(0,st.jsx)("line",{stroke:"rgba(255,255,255,0.07)",strokeDasharray:"3 5",x1:l,x2:u.width-u.right,y1:f,y2:f}),(0,st.jsx)("text",{fill:"rgba(255,255,255,0.34)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:"end",x:l-7,y:f+3,children:Qt({total:h})})]},y)}),a.map((h,y)=>{let f=h.extraction.costUsd/c*u.plotHeight,b=h.recall.costUsd/c*u.plotHeight,B=l+y*g+(g-m)/2,C=h.extraction.costUsd+h.recall.costUsd;return(0,st.jsx)(gt,{content:(0,st.jsx)(Jn,{rows:[["extraction",`${Qt({total:h.extraction.costUsd})} \xB7 ${Lg(h.extraction.events)}`],["recall",`${Qt({total:h.recall.costUsd})} \xB7 ${Lg(h.recall.events)}`],["total",Qt({total:C})]]}),label:Ot(h.date),children:(0,st.jsxs)("g",{"aria-label":`${Ot(h.date)}: extraction ${Qt({total:h.extraction.costUsd})}, ${Lg(h.extraction.events)}; recall ${Qt({total:h.recall.costUsd})}, ${Lg(h.recall.events)}`,tabIndex:0,children:[(0,st.jsx)("rect",{fill:"#67e8f9",height:f,opacity:h.extraction.costUsd>0?.82:.1,rx:"1",width:m,x:B,y:u.top+u.plotHeight-f}),(0,st.jsx)("rect",{fill:"#e879f9",height:b,opacity:h.recall.costUsd>0?.82:.1,rx:"1",width:m,x:B,y:u.top+u.plotHeight-f-b}),(0,st.jsx)("rect",{fill:"transparent",height:u.plotHeight,width:Math.max(m,8),x:B-(Math.max(m,8)-m)/2,y:u.top})]})},h.date)}),(0,st.jsx)(Da,{dates:a.map(h=>h.date),layout:{...u,left:l},xPosition:h=>l+h*g+g/2})]}),s===0?(0,st.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center pt-12 font-mono text-xs text-dashboard-text-muted",children:"No memory extraction or recall ran in this period."}):null]})]})}function Lg(e){return`${e.toLocaleString()} ${e===1?"run":"runs"}`}var cle=d.object({content:d.string().min(1),createdAt:d.iso.datetime(),expiresAt:d.iso.datetime().optional(),id:d.string().min(1),kind:d.enum(["preference","procedure","knowledge"]),observedAt:d.iso.datetime(),origin:d.enum(["automatic","explicit","other"]),sourcePlatform:d.enum(["local","slack"]),visibility:d.enum(["private","public"])}).strict();function vF(e){return e.charAt(0).toUpperCase()+e.slice(1)}function xF(e){return new Intl.DateTimeFormat("en-US",{dateStyle:"medium",timeStyle:"short",timeZone:"UTC"}).format(new Date(e))}function ule(e){let t=e.origin==="automatic"?"Automatic":e.origin==="explicit"?"Explicit":"Other";return{actions:e.visibility==="private"?[{confirmation:"Forget this memory?",href:`/api/plugins/memory/memories/${encodeURIComponent(e.id)}`,label:"Forget",method:"DELETE",tone:"danger"}]:[],id:e.id,metadata:[{label:"Type",value:vF(e.kind)},{label:"Learned",value:t},{label:"Source",value:vF(e.sourcePlatform)},{label:"Visibility",value:vF(e.visibility)},{label:"Remembered",value:xF(e.createdAt)},{label:"Observed",value:xF(e.observedAt)},{label:"Expires",value:e.expiresAt?xF(e.expiresAt):"Never"}],title:e.content}}function CO(e){return ct({enabled:!!e,queryFn:async({signal:t})=>ule(await rt(cle,`/api/plugins/memory/memories/${encodeURIComponent(e)}`,t)),queryKey:["dashboard","plugin-user-page","memory","record",e],retry:!1})}var $=w(k(),1);function kO(e){let t=lt(),{memoryId:n}=qn(),o="/memories",a=`${o}/library`,r=t.pathname===o,i=t.pathname===a||!!n;if(!r&&!i)return(0,$.jsx)(Dt,{replace:!0,to:o});let A=Fr(a,t.search),s=({isActive:c})=>S("relative px-1 py-3 font-mono text-xs uppercase tracking-[0.12em] no-underline after:absolute after:inset-x-0 after:bottom-0 after:h-px",c?"text-cyan-100 after:bg-cyan-300":"text-dashboard-text-muted after:bg-transparent hover:text-dashboard-text");return(0,$.jsxs)("div",{className:S(Ft,"grid content-start gap-6 px-4 py-6 sm:gap-8 sm:px-6 sm:py-8 md:px-8"),children:[(0,$.jsx)(St,{description:e.page.description,title:e.page.label}),(0,$.jsxs)("nav",{"aria-label":"Memory navigation",className:"flex gap-6 border-b border-white/[0.06]",children:[(0,$.jsx)(wa,{className:s,end:!0,to:o,children:"Overview"}),(0,$.jsx)(wa,{className:s,to:A,children:"Memories"})]}),r?(0,$.jsx)(dle,{}):(0,$.jsx)(lle,{libraryPath:a,page:e.page})]})}function dle(){let e=q1();return e.error?(0,$.jsxs)(O,{className:"flex items-center gap-3 border-rose-300/20 p-5 text-sm text-rose-200",children:[(0,$.jsx)(Po,{"aria-hidden":"true",size:18}),"Memory history is temporarily unavailable."]}):e.data?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("section",{className:"grid gap-4 xl:grid-cols-2",children:[(0,$.jsx)(hO,{days:e.data.days}),(0,$.jsx)(yO,{extractionDays:e.data.extractionDays,recallDays:e.data.recallDays})]}),(0,$.jsx)(mle,{data:e.data}),(0,$.jsxs)("section",{className:"grid gap-4 md:grid-cols-2",children:[(0,$.jsx)(fle,{data:e.data}),(0,$.jsx)(ble,{data:e.data})]})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(O,{className:"min-h-64 animate-pulse",children:(0,$.jsx)("span",{className:"sr-only",children:"Loading memory history"})}),(0,$.jsx)("div",{className:"h-24 animate-pulse border-y border-white/[0.06]",children:(0,$.jsx)("span",{className:"sr-only",children:"Loading memory summary"})})]})}function lle(e){let{action:t,content:n,filter:o,query:a,records:r,runAction:i,searchQuery:A,searchText:s,setFilter:c,setSearchText:u}=FB(e.page),l=q1(),p=lo(),g=lt(),{memoryId:m}=qn(),h=CO(m),y=h.data??r.find(b=>b.id===m),f=b=>Fr(b,g.search);return(0,EO.useEffect)(()=>{!m||y||h.isFetching||h.isPending||(h.isError||h.isFetched)&&p(Fr(e.libraryPath,g.search),{replace:!0})},[g.search,m,h.isError,h.isFetched,h.isFetching,h.isPending,p,e.libraryPath,y]),!a.data&&!a.error?(0,$.jsx)(Qe,{label:"Loading memories"}):(0,$.jsxs)("section",{className:"grid gap-4","aria-labelledby":"memory-library-title",children:[(0,$.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[(0,$.jsx)("div",{children:(0,$.jsx)("h2",{className:"m-0 font-display text-xl font-medium tracking-[-0.02em] text-dashboard-text",id:"memory-library-title",children:A?"Search results":"What Junior remembers"})}),n?.searchPlaceholder?(0,$.jsxs)("label",{className:"relative w-full max-w-md sm:w-auto",children:[(0,$.jsx)("span",{className:"sr-only",children:n.searchPlaceholder}),(0,$.jsx)(yi,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-dashboard-text-muted",size:15}),(0,$.jsx)("input",{className:"h-10 w-full min-w-0 rounded border border-white/10 bg-black/20 pr-3 pl-9 font-mono text-xs text-dashboard-text outline-none transition-colors placeholder:text-dashboard-text-muted/70 focus:border-cyan-300/35",onChange:b=>u(b.target.value),placeholder:n.searchPlaceholder,type:"search",value:s})]}):null]}),(0,$.jsx)(gle,{activeFilter:o,onSelect:c,stats:l.data?.stats}),a.error?(0,$.jsxs)(O,{className:"flex items-center gap-3 border-rose-300/20 p-5 text-sm text-rose-200",children:[(0,$.jsx)(Po,{"aria-hidden":"true",size:18}),a.error.message]}):r.length===0?(0,$.jsx)(O,{className:"grid min-h-56 place-items-center p-8 text-center",children:(0,$.jsxs)("div",{children:[(0,$.jsx)(IA,{"aria-hidden":"true",className:"mx-auto text-dashboard-text-muted",size:26}),(0,$.jsx)("p",{className:"mt-4 mb-0 text-sm text-dashboard-text-muted",children:n?.emptyText??"No memories yet."})]})}):(0,$.jsxs)("div",{className:"grid gap-3",children:[(0,$.jsxs)(O,{padding:"none",children:[(0,$.jsx)(ple,{}),r.map((b,B)=>(0,$.jsx)(hle,{first:B===0,onSelect:()=>p(f(m===b.id?e.libraryPath:`/memories/${encodeURIComponent(b.id)}`)),record:b,selected:b.id===m},b.id))]}),!a.isPlaceholderData&&a.hasNextPage?(0,$.jsx)(pt,{className:"mt-2 justify-self-center",disabled:a.isFetchingNextPage,onClick:()=>{a.fetchNextPage()},children:a.isFetchingNextPage?"Loading\u2026":"Load more"}):null,t.error?(0,$.jsx)("p",{className:"m-0 text-center text-sm text-rose-300",children:"Could not complete this action. Try again."}):null]}),(0,$.jsx)(EU,{action:t,onAction:i,onClose:()=>p(f(e.libraryPath)),record:y})]})}function ple(){return(0,$.jsxs)("div",{"aria-hidden":"true",className:"hidden grid-cols-[minmax(0,1fr)_7rem_7rem_9rem_auto] items-center gap-3 border-b border-white/[0.07] px-4 py-2.5 text-left font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted sm:grid",children:[(0,$.jsx)("span",{children:"Memory"}),(0,$.jsx)("span",{children:"Visibility"}),(0,$.jsx)("span",{children:"Type"}),(0,$.jsx)("span",{children:"Learned"}),(0,$.jsx)("span",{"aria-hidden":"true",className:"size-4"})]})}function gle(e){let t=[{count:e.stats?.active,filter:"",label:"All"},{count:e.stats?.personal,filter:"private",label:"Private"},{count:e.stats?.public,filter:"public",label:"Public"}];return(0,$.jsx)("div",{"aria-label":"Memory collections",className:"grid min-w-0 grid-cols-3 gap-1 border-b border-white/[0.06] sm:flex sm:overflow-x-auto",role:"tablist",children:t.map(n=>{let o=e.activeFilter===n.filter;return(0,$.jsxs)("button",{"aria-selected":o,className:S("relative flex min-w-0 cursor-pointer items-center justify-between gap-2 border-0 bg-transparent px-3 py-2.5 font-mono text-xs uppercase tracking-[0.1em] transition-colors after:absolute after:inset-x-2 after:bottom-0 after:h-px sm:shrink-0 sm:justify-start",o?"text-cyan-100 after:bg-cyan-300":"text-dashboard-text-muted after:bg-transparent hover:text-dashboard-text"),onClick:()=>e.onSelect(n.filter),role:"tab",type:"button",children:[n.label,n.count!==void 0?(0,$.jsx)("span",{className:S("rounded-sm border px-1.5 py-0.5 text-xs",o?"border-cyan-300/20 bg-cyan-300/10 text-cyan-100":"border-white/[0.07] bg-white/[0.025] text-dashboard-text-muted"),children:n.count.toLocaleString("en-US")}):null]},n.filter||"all")})})}function mle(e){let{stats:t}=e.data,n=[{detail:"personal + public",label:"Total active",value:t.active.toLocaleString("en-US")},{detail:"private to you",label:"Personal",value:t.personal.toLocaleString("en-US")},{detail:"workspace shareable",label:"Public",tone:"text-cyan-100",value:t.public.toLocaleString("en-US")},{detail:"in the last 30 days",label:"Added \xB7 30d",value:`+${t.createdThirtyDays.toLocaleString("en-US")}`}];return(0,$.jsx)("section",{"aria-label":"Memory summary",className:"grid grid-cols-2 gap-px border-y border-white/[0.06] bg-white/[0.06] lg:grid-cols-4",children:n.map(o=>(0,$.jsxs)("div",{className:"bg-[#050507] px-4 py-4 sm:px-5",children:[(0,$.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:o.label}),(0,$.jsx)("div",{className:S("mt-2 font-display text-3xl font-light tracking-[-0.04em] text-dashboard-text",o.tone),children:o.value}),(0,$.jsx)("div",{className:"mt-1 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:o.detail})]},o.label))})}function fle(e){let{stats:t}=e.data;return(0,$.jsxs)(O,{className:"p-5 sm:p-6",children:[(0,$.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:"What Junior remembers"}),(0,$.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Across personal and public scopes."}),(0,$.jsxs)("div",{className:"mt-5 grid gap-px overflow-hidden rounded border border-white/[0.06] bg-white/[0.055]",children:[(0,$.jsx)(ud,{detail:"Almost entirely personal",icon:_a,label:"Preferences",value:t.preference}),(0,$.jsx)(ud,{detail:"How work should get done",icon:IA,label:"Procedures",value:t.procedure}),(0,$.jsx)(ud,{detail:"Facts and durable context",icon:bi,label:"Knowledge",value:t.knowledge})]})]})}function ble(e){let{stats:t}=e.data,n=Math.max(0,t.active-t.automatic-t.explicit);return(0,$.jsxs)(O,{className:"p-5 sm:p-6",children:[(0,$.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:"How they got here"}),(0,$.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Same totals, split by how they were written."}),(0,$.jsxs)("div",{className:"mt-5 grid gap-px overflow-hidden rounded border border-white/[0.06] bg-white/[0.055]",children:[(0,$.jsx)(ud,{detail:"Passive extraction after runs",icon:Yn,label:"Learned by Junior",value:t.automatic}),(0,$.jsx)(ud,{detail:"Someone asked to remember it",icon:kp,label:"Saved explicitly",value:t.explicit}),(0,$.jsx)(ud,{detail:"Before origin tracking",icon:bi,label:"Older records",value:n})]})]})}function ud(e){let t=e.icon;return(0,$.jsxs)("div",{className:"flex items-center gap-3 bg-[#09090b] px-3 py-3",children:[(0,$.jsx)("div",{className:"grid size-9 shrink-0 place-items-center rounded border border-white/[0.07] bg-white/[0.025] text-dashboard-text-muted",children:(0,$.jsx)(t,{"aria-hidden":"true",size:15})}),(0,$.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,$.jsx)("div",{className:"font-display text-base font-medium text-dashboard-text",children:e.label}),(0,$.jsx)("div",{className:"mt-0.5 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.detail})]}),(0,$.jsx)("div",{className:"font-display text-2xl font-light text-dashboard-text",children:e.value.toLocaleString("en-US")})]})}function hle(e){let t=ZB(e.record,"Type"),n=ZB(e.record,"Remembered"),o=ZB(e.record,"Source"),a=ZB(e.record,"Visibility"),r=a==="Public";return(0,$.jsx)(xB,{className:S("flex items-stretch",!e.first&&"border-t border-white/[0.055]"),onSelect:e.onSelect,selected:e.selected,children:(0,$.jsxs)("button",{"aria-expanded":e.selected,"aria-label":`View memory details: ${e.record.title}`,className:"grid min-w-0 flex-1 cursor-pointer grid-cols-[minmax(0,1fr)_auto] items-center gap-3 border-0 bg-transparent px-4 py-3 text-left sm:grid-cols-[minmax(0,1fr)_7rem_7rem_9rem_auto]",onClick:e.onSelect,type:"button",children:[(0,$.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,$.jsx)("div",{className:S("grid size-8 shrink-0 place-items-center rounded border",e.selected?"border-cyan-300/20 bg-cyan-300/10 text-cyan-100":"border-white/10 bg-white/[0.025] text-dashboard-text-muted"),children:(0,$.jsx)(bi,{"aria-hidden":"true",size:15})}),(0,$.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,$.jsx)("h3",{className:"m-0 truncate font-display text-base font-medium leading-snug text-dashboard-text",children:e.record.title}),(0,$.jsxs)("div",{className:"mt-1.5 flex min-w-0 items-center gap-x-2 font-mono text-xs text-dashboard-text-muted",children:[(0,$.jsxs)("span",{className:"truncate",children:["Source: ",o]}),(0,$.jsx)("span",{"aria-hidden":"true",className:"text-dashboard-text-muted opacity-30 sm:hidden",children:"\xB7"}),(0,$.jsxs)("span",{className:"truncate sm:hidden",children:[t," \xB7 ",a," \xB7 ",wO(n)]})]})]})]}),(0,$.jsxs)("span",{className:S("hidden items-center gap-1.5 rounded border px-2 py-1 font-mono text-2xs uppercase tracking-[0.08em] sm:inline-flex",r?"border-emerald-300/20 bg-emerald-300/[0.07] text-emerald-100":"border-white/[0.08] bg-white/[0.025] text-dashboard-text-muted"),children:[r?(0,$.jsx)(go,{"aria-hidden":"true",size:11}):(0,$.jsx)(Bi,{"aria-hidden":"true",size:11}),a]}),(0,$.jsx)("span",{className:S("hidden w-fit rounded border px-2 py-1 font-mono text-2xs uppercase tracking-[0.08em] sm:block",Ble(t)),children:t}),(0,$.jsx)("span",{className:"hidden truncate font-mono text-xs text-dashboard-text sm:block",children:wO(n)}),(0,$.jsx)(hi,{"aria-hidden":"true",className:S("shrink-0 transition-transform",e.selected?"translate-x-0.5 text-cyan-200":"text-dashboard-text-muted group-hover:text-dashboard-text"),size:16})]})})}function ZB(e,t){return e.metadata?.find(n=>n.label===t)?.value??"\u2014"}function wO(e){return e.split(",").slice(0,2).join(",")}function Ble(e){return e==="Preference"?"border-cyan-300/20 bg-cyan-300/[0.07] text-cyan-100":e==="Procedure"?"border-amber-300/20 bg-amber-300/[0.07] text-amber-100":"border-violet-300/20 bg-violet-300/[0.07] text-violet-100"}var fe=w(k(),1);function VB(e,t){return e==="memory"&&t==="memories"?"/memories":`/plugins/${encodeURIComponent(e)}/${encodeURIComponent(t)}`}function DF(e){let t=e.pages.find(n=>n.pluginName==="memory"&&n.id==="memories");return t?(0,fe.jsx)(kO,{page:t}):(0,fe.jsx)(Dt,{replace:!0,to:"/"})}function QO(e){let t=lt(),{"*":n,pageId:o,pluginName:a}=qn(),r=e.pages.find(i=>i.pluginName===a&&i.id===o);if(!r)return(0,fe.jsx)(Dt,{replace:!0,to:"/"});if(r.pluginName==="memory"&&r.id==="memories"){let i=n?`/${n}`:"";return(0,fe.jsx)(Dt,{replace:!0,to:Fr(`/memories${i}`,t.search)})}return(0,fe.jsx)(yle,{page:r})}function yle(e){let{action:t,content:n,query:o,records:a,runAction:r,searchText:i,setSearchText:A}=FB(e.page);return!o.data&&!o.error?(0,fe.jsx)(Qe,{label:`Loading ${e.page.label}`}):(0,fe.jsx)("div",{className:`${Ft} px-4 py-8 md:px-8`,children:(0,fe.jsxs)("section",{className:"mx-auto grid w-full max-w-3xl gap-6",children:[(0,fe.jsx)(St,{description:e.page.description,title:e.page.label}),n?.metrics?.length?(0,fe.jsx)("section",{"aria-label":`${e.page.label} overview`,className:"grid gap-3 sm:grid-cols-2",children:n.metrics.map(s=>(0,fe.jsxs)(O,{className:"p-4",children:[(0,fe.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:s.label}),(0,fe.jsx)("div",{className:"mt-3 font-display text-2xl font-light text-dashboard-text",children:s.value}),s.detail?(0,fe.jsx)("div",{className:"mt-1 font-mono text-xs text-dashboard-text-muted",children:s.detail}):null]},s.label))}):null,n?.searchPlaceholder?(0,fe.jsxs)("label",{className:"relative block",children:[(0,fe.jsx)(yi,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-dashboard-text-muted",size:15}),(0,fe.jsx)("span",{className:"sr-only",children:n.searchPlaceholder}),(0,fe.jsx)("input",{className:"w-full rounded border border-white/15 bg-black py-2 pr-3 pl-9 text-sm text-dashboard-text placeholder:text-dashboard-text-muted focus:border-cyan-300/50 focus:outline-none",onChange:s=>A(s.target.value),placeholder:n.searchPlaceholder,type:"search",value:i})]}):null,o.error?(0,fe.jsx)(O,{padding:"md",children:(0,fe.jsxs)("p",{className:"m-0 text-sm text-rose-300",children:["Could not load ",e.page.label.toLowerCase(),". Try again."]})}):a.length===0?(0,fe.jsx)(O,{padding:"md",children:(0,fe.jsxs)("div",{className:"flex items-center gap-4",children:[(0,fe.jsx)("div",{className:"grid size-10 shrink-0 place-items-center rounded border border-white/[0.07] bg-white/[0.025] text-dashboard-text-muted",children:(0,fe.jsx)(qa,{"aria-hidden":"true",size:17})}),(0,fe.jsx)("p",{className:"m-0 text-sm text-dashboard-text-muted",children:n?.emptyText??`No ${e.page.label.toLowerCase()}.`})]})}):(0,fe.jsxs)("div",{className:"grid gap-3",children:[a.map(s=>(0,fe.jsxs)(O,{padding:"md",children:[(0,fe.jsxs)("div",{className:"flex items-start gap-3",children:[(0,fe.jsx)("h2",{className:"m-0 min-w-0 flex-1 font-display text-base font-medium text-dashboard-text",children:s.title}),s.actions?.map(c=>(0,fe.jsx)("button",{"aria-label":`${c.label}: ${s.title}`,className:`cursor-pointer border-0 bg-transparent p-1 text-dashboard-text-muted transition-colors ${c.tone==="danger"?"hover:text-rose-300":"hover:text-dashboard-text"}`,disabled:t.isPending,onClick:()=>r(c),title:c.label,type:"button",children:c.tone==="danger"?(0,fe.jsx)(Uo,{"aria-hidden":"true",size:16}):c.label},`${c.method}:${c.href}`))]}),s.description?(0,fe.jsx)("p",{className:"mt-2 mb-0 text-sm text-dashboard-text-muted",children:s.description}):null,s.metadata?.length?(0,fe.jsx)("dl",{className:"mt-4 flex flex-wrap gap-x-6 gap-y-2",children:s.metadata.map(c=>(0,fe.jsxs)("div",{children:[(0,fe.jsx)("dt",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:c.label}),(0,fe.jsx)("dd",{className:"mt-1 ml-0 font-mono text-xs text-dashboard-text-muted",children:c.value})]},c.label))}):null]},s.id)),!o.isPlaceholderData&&o.hasNextPage?(0,fe.jsx)(pt,{className:"justify-self-center",disabled:o.isFetchingNextPage,onClick:()=>{o.fetchNextPage()},children:o.isFetchingNextPage?"Loading\u2026":"Load more"}):null,t.error?(0,fe.jsx)("p",{className:"m-0 text-center text-sm text-rose-300",children:"Could not complete this action. Try again."}):null]})]})})}var mt=w(k(),1),Cle=80,wle=140;function Ele(e,t){let n=e?.trim().split(/\s+/).filter(Boolean)??[];return n.length>0?n.slice(0,2).map(o=>o[0]).join("").toUpperCase():t.slice(0,1).toUpperCase()}function IO({identity:e,onSignOut:t,spend:n,userPages:o}){let[a,r]=(0,Gr.useState)(!1),i=(0,Gr.useRef)(null),A=(0,Gr.useRef)(null),s=(0,Gr.useRef)(void 0),c=(0,Gr.useRef)(void 0),u=e.user.email,l=e.user.name?.trim()||u,p=n?Qt({total:n.sevenDaysUsd}):"\u2014",g=n?Qt({total:n.thirtyDaysUsd}):"\u2014";function m(){s.current&&clearTimeout(s.current),c.current&&clearTimeout(c.current),s.current=void 0,c.current=void 0}function h(f){f.pointerType==="mouse"&&(m(),s.current=setTimeout(()=>r(!0),Cle))}function y(f){f.pointerType==="mouse"&&(m(),c.current=setTimeout(()=>r(!1),wle))}return(0,Gr.useEffect)(()=>m,[]),(0,Gr.useEffect)(()=>{if(!a)return;function f(B){i.current?.contains(B.target)||r(!1)}function b(B){B.key==="Escape"&&(r(!1),A.current?.focus())}return document.addEventListener("pointerdown",f),document.addEventListener("keydown",b),()=>{document.removeEventListener("pointerdown",f),document.removeEventListener("keydown",b)}},[a]),(0,mt.jsxs)("div",{className:"relative",onBlurCapture:f=>{f.currentTarget.contains(f.relatedTarget)||r(!1)},onPointerEnter:h,onPointerLeave:y,ref:i,children:[(0,mt.jsxs)("button",{"aria-controls":"profile-popover","aria-expanded":a,"aria-haspopup":"true","aria-label":`${a?"Close":"Open"} profile menu for ${l}. Personal model spend: 7 days ${p}, 30 days ${g}.`,className:S("group flex h-10 cursor-pointer items-center gap-2 rounded-lg border-0 bg-transparent px-1.5 text-dashboard-text transition-colors hover:bg-white/[0.06] hover:text-dashboard-text focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#beaaff]/70",a&&"bg-white/[0.08] text-dashboard-text"),onClick:f=>{m(),r(f.detail===0?b=>!b:!0)},ref:A,type:"button",children:[(0,mt.jsxs)("span",{className:"hidden items-center gap-2 sm:flex",children:[(0,mt.jsxs)("span",{className:"flex items-baseline gap-1 whitespace-nowrap tabular-nums",children:[(0,mt.jsx)("span",{className:"text-xs font-medium uppercase tracking-[0.1em] text-dashboard-text-muted",children:"7d"}),(0,mt.jsx)("span",{className:"text-xs font-semibold text-dashboard-text",children:p})]}),(0,mt.jsx)("span",{"aria-hidden":"true",className:"h-3 w-px bg-white/10"}),(0,mt.jsxs)("span",{className:"flex items-baseline gap-1 whitespace-nowrap tabular-nums",children:[(0,mt.jsx)("span",{className:"text-xs font-medium uppercase tracking-[0.1em] text-dashboard-text-muted",children:"30d"}),(0,mt.jsx)("span",{className:"text-xs font-semibold text-dashboard-text",children:g})]})]}),(0,mt.jsx)("span",{"aria-hidden":"true",className:"grid size-7 place-items-center rounded-full bg-[#beaaff] text-xs font-bold tracking-wide text-black shadow-sm shadow-black/40",children:Ele(e.user.name,u)}),(0,mt.jsx)(_p,{"aria-hidden":"true",className:S("text-dashboard-text-muted transition-[color,transform] group-hover:text-dashboard-text",a&&"rotate-180 text-dashboard-text"),size:14,strokeWidth:2})]}),a?(0,mt.jsxs)("div",{className:"absolute right-0 top-[calc(100%+0.5rem)] z-20 w-64 rounded-xl bg-dashboard-surface-raised/95 p-1.5 shadow-2xl shadow-black/75 backdrop-blur-xl",id:"profile-popover",children:[(0,mt.jsxs)("div",{className:"border-b border-white/10 px-2.5 py-2.5",children:[(0,mt.jsx)("p",{className:"m-0 truncate text-sm font-semibold text-dashboard-text",children:l}),l!==u?(0,mt.jsx)("p",{className:"mt-1 mb-0 truncate text-xs text-dashboard-text-muted",children:u}):null]}),(0,mt.jsxs)(Fe,{className:"mt-1 flex items-center gap-2.5 rounded-md px-2.5 py-2 text-sm font-semibold text-dashboard-text no-underline transition-colors hover:bg-white/10 hover:text-dashboard-text focus-visible:bg-white/10 focus-visible:text-dashboard-text focus-visible:outline-none",onClick:()=>r(!1),to:Dr(u),children:[(0,mt.jsx)(_a,{"aria-hidden":"true",size:16,strokeWidth:2}),"My profile"]}),(0,mt.jsxs)(Fe,{className:"flex items-center gap-2.5 rounded-md px-2.5 py-2 text-sm font-semibold text-dashboard-text no-underline transition-colors hover:bg-white/10 hover:text-dashboard-text focus-visible:bg-white/10 focus-visible:text-dashboard-text focus-visible:outline-none",onClick:()=>r(!1),to:"/settings/api-tokens",children:[(0,mt.jsx)(Ho,{"aria-hidden":"true",size:16,strokeWidth:2}),"API tokens"]}),o.filter(f=>f.navigation==="profile").map(f=>(0,mt.jsxs)(Fe,{className:"flex items-center gap-2.5 rounded-md px-2.5 py-2 text-sm font-semibold text-dashboard-text no-underline transition-colors hover:bg-white/10 hover:text-dashboard-text focus-visible:bg-white/10 focus-visible:text-dashboard-text focus-visible:outline-none",onClick:()=>r(!1),to:VB(f.pluginName,f.id),children:[(0,mt.jsx)(qa,{"aria-hidden":"true",size:16,strokeWidth:2}),f.label]},`${f.pluginName}:${f.id}`)),(0,mt.jsxs)("button",{className:"flex w-full cursor-pointer items-center gap-2.5 rounded-md border-0 bg-transparent px-2.5 py-2 text-left text-sm font-semibold text-dashboard-text transition-colors hover:bg-white/10 hover:text-dashboard-text focus-visible:bg-white/10 focus-visible:text-dashboard-text focus-visible:outline-none",onClick:()=>{r(!1),t()},type:"button",children:[(0,mt.jsx)(Mp,{"aria-hidden":"true",size:16,strokeWidth:2}),"Log out"]})]}):null]})}var Li=w(Y(),1);var RF=w(Y(),1);var ic=w(Y(),1);function FF(e,t){if(e.eventHistory.status!=="available")return _O(e);let n=t.find(o=>o.eventHistory.status!=="available");return n?_O({...e,eventHistory:n.eventHistory,events:n.events,previousCursor:n.previousCursor}):{...e,events:Qle([...t.flatMap(o=>o.events),...e.events]),previousCursor:XB(e.previousCursor,t)??(t.length?LO(t):e.previousCursor)}}async function vO(e){let t=new Map(e.historyPages.map(r=>[r.requestedBefore,r])),n=[],o=new Set,a=e.detail.previousCursor;for(;a;){if(o.has(a))throw new Error("Conversation history cursor did not advance");o.add(a);let r=t.get(a)??{...await e.readPage(a),requestedBefore:a};n.push(r),a=r.previousCursor}return FF(e.detail,n)}function xO(e){let t=SO(e);return t===void 0?"empty":String(t)}function DO(e,t){return XB(e,t)??LO(t)}function XB(e,t){if(!e)return;let n=new Map(t.map(i=>[i.requestedBefore,i])),o=new Set,a=new Set,r=e;for(;r;){if(a.has(r))return;a.add(r);let i=n.get(r);if(!i)return o.size>0&&o.size===t.length?void 0:r;o.add(i);let A=SO(o),s=kle(t.filter(c=>!o.has(c)));if(A!==void 0&&s!==void 0&&A<=s+1)return;r=i.previousCursor}}function FO(e,t){return t.some(n=>n.eventHistory.status!==e.eventHistory.status)}function SO(e){let t;for(let n of e){let o=n.events[0]?.seq;o!==void 0&&(t===void 0||o<t)&&(t=o)}return t}function kle(e){let t;for(let n of e){let o=n.events.at(-1)?.seq;o!==void 0&&(t===void 0||o>t)&&(t=o)}return t}function LO(e){let t;for(let n of e){let o=n.events[0]?.seq,a=t?.events[0]?.seq;o!==void 0&&(a===void 0||o<a)&&(t=n)}return t?.previousCursor}function Qle(e){return[...new Map(e.map(t=>[t.seq,t])).values()].sort((t,n)=>t.seq-n.seq)}function _O(e){let{modelUsage:t,...n}=e;return n}function SF(e){return["conversation",e,"detail"]}function RO(e){return["dashboard","archived-conversation",e]}var $O=["dashboard","archive-conversation"];function MO(){return aC({filters:{mutationKey:$O,status:"pending"},select:e=>{let t=e.state.variables,n=e.state.context,o=e.options.mutationKey?.[2];return{archived:t.archived,conversation:n?.archivedSnapshot?.conversation,conversationId:typeof o=="string"?o:""}}})}function Ile(e){return{enabled:!!e,queryKey:SF(e),queryFn:({signal:t})=>vle(e,t),refetchInterval:t=>t.state.data?.status==="active"?2e3:!1,retry:!1}}function Rg(e,t){let n=Un();return sr({mutationKey:[...$O,e],mutationFn:o=>fM(tD,`/api/conversations/${encodeURIComponent(e)}/archive`,o),onMutate:async o=>{let a={queryKey:["dashboard","conversations"]},r=SF(e),i=RO(e);await Promise.all([n.cancelQueries(a),n.cancelQueries({queryKey:r})]);let A=n.getQueriesData(a),s=n.getQueryData(r),c=n.getQueryData(i),u=o.archived?new Date().toISOString():void 0,l=o.archived?_le(A,e)??c:c;return A.forEach(([p,g])=>{if(!g)return;let m=g.conversations.some(f=>f.conversationId===e),y=!o.archived&&!m&&!!l?.feedQueryHashes.includes(JSON.stringify(p))?[...g.conversations,{...l.conversation,archivedAt:void 0}].sort((f,b)=>b.lastSeenAt.localeCompare(f.lastSeenAt)):g.conversations.map(f=>f.conversationId===e?{...f,archivedAt:u}:f);n.setQueryData(p,{...g,conversations:y})}),n.setQueryData(r,p=>p&&{...p,archivedAt:u}),l&&n.setQueryData(i,l),{archivedQueryKey:i,archivedSnapshot:l,detailQueryKey:r,previousArchivedSnapshot:c,previousDetail:s,previousFeeds:A}},onError:(o,a,r)=>{r?.previousFeeds.forEach(([i,A])=>{n.setQueryData(i,A)}),r&&(n.setQueryData(r.detailQueryKey,r.previousDetail),r.previousArchivedSnapshot?n.setQueryData(r.archivedQueryKey,r.previousArchivedSnapshot):n.removeQueries({exact:!0,queryKey:r.archivedQueryKey})),t?.onError?.()},onSuccess:(o,a)=>{a.archived||n.removeQueries({exact:!0,queryKey:RO(e)}),t?.onSuccess?.(a.archived)},onSettled:async()=>{await Promise.all([n.invalidateQueries({queryKey:["dashboard","conversations"]}),n.invalidateQueries({queryKey:["dashboard","locations"]}),n.invalidateQueries({queryKey:["dashboard","people"]}),n.invalidateQueries({exact:!0,queryKey:SF(e)})])}})}function _le(e,t){let n,o=[];for(let[a,r]of e){let i=r?.conversations.find(A=>A.conversationId===t);i&&(n??=i,o.push(JSON.stringify(a)))}return n?{conversation:n,feedQueryHashes:o}:void 0}function ey(e){let t=Un(),n=ct(Ile(e)),o=n.data?.eventHistory.status,a=(0,ic.useMemo)(()=>["conversation",e,"history",o],[e,o]),r=_d({enabled:!1,queryKey:a,queryFn:async({pageParam:g,signal:m})=>({...await NO(e,g,m),requestedBefore:g}),initialPageParam:n.data?.previousCursor??"",getNextPageParam:(g,m)=>DO(n.data?.previousCursor,m),retry:!1}),i=r.data?.pages,A=(0,ic.useMemo)(()=>n.data?FF(n.data,i??[]):void 0,[n.data,i]),s=xle(r.error),c=!!(n.data&&(FO(n.data,i??[])||s)),u=s?null:r.error,l=!!(n.data?.previousCursor&&r.data&&XB(n.data.previousCursor,r.data.pages)&&!c&&!r.error&&!r.isFetchingNextPage),p=r.isFetchingNextPage||l;return(0,ic.useEffect)(()=>{c&&n.refetch()},[n.refetch,c]),(0,ic.useEffect)(()=>{s&&t.resetQueries({exact:!0,queryKey:a})},[a,s,t]),(0,ic.useEffect)(()=>{l&&r.fetchNextPage()},[r.fetchNextPage,l]),{data:A,error:n.error,historyError:u,historyVersion:xO(i??[]),hasPreviousPage:r.data?r.hasNextPage:!!n.data?.previousCursor,isPending:n.isPending,isLoadingPreviousPage:p,loadCompleteTranscript:()=>{if(!e||!n.data)throw new Error("Cannot load a conversation without an id");return vO({detail:n.data,historyPages:r.data?.pages??[],readPage:g=>NO(e,g)})},loadPreviousPage:()=>{let g=r.data?r.hasNextPage:!!n.data?.previousCursor;e&&g&&!r.isFetchingNextPage&&r.fetchNextPage()}}}function vle(e,t){return rt(oD,`/api/conversations/${encodeURIComponent(e)}`,t)}function NO(e,t,n){let o=new URLSearchParams({before:t});return rt(rD,`/api/conversations/${encodeURIComponent(e)}/events?${o}`,n).then(a=>{if(a.previousCursor===t)throw new Error("Conversation history cursor did not advance");return a})}function xle(e){return e instanceof Mo&&e.status===400}var jO=w(k(),1);function ty(e){return(0,jO.jsx)("span",{"aria-hidden":"true",className:S("shrink-0 rounded-full bg-emerald-300 shadow-[0_0_10px_rgba(110,231,183,0.55)] animate-[junior-active-indicator_1.8s_ease-in-out_infinite] motion-reduce:animate-none",e.className)})}var Ka=w(Y(),1);var Ng=w(k(),1);function GO(e){let t=Sle(),n=t?0:e.durationMs??180,[o,a]=(0,Ka.useState)(()=>e.items.map(s=>({item:s,key:e.getKey(s),state:"present"}))),r=(0,Ka.useRef)(e.items.length>0),i=o.some(s=>s.state==="exiting"),A=(0,Ka.useCallback)(s=>{a(c=>c.filter(u=>u.key!==s))},[]);return(0,Ka.useLayoutEffect)(()=>{a(s=>Dle(s,e.items,e.getKey,r.current)),e.items.length>0&&(r.current=!0)},[e.getKey,e.items]),(0,Ka.useEffect)(()=>{if(!o.some(c=>c.state==="entering"))return;if(t){a(c=>PO(c));return}let s=window.requestAnimationFrame(()=>{a(c=>PO(c))});return()=>window.cancelAnimationFrame(s)},[o,t]),(0,Ng.jsx)("div",{"aria-label":o.length>0?e.ariaLabel:void 0,className:S(e.className,i&&"pointer-events-none"),role:o.length>0?e.role:void 0,children:o.length>0?o.map(s=>(0,Ng.jsx)(Fle,{animatedItem:s,durationMs:n,onExited:A,renderItem:e.renderItem},s.key)):e.empty})}function Dle(e,t,n,o){let a=new Map(e.map(A=>[A.key,A])),r=new Set(t.map(n)),i=t.map(A=>{let s=n(A),c=a.get(s);return{item:A,key:s,state:c?.state==="exiting"?"entering":c?.state??(o?"entering":"present")}});return e.forEach((A,s)=>{r.has(A.key)||i.splice(Math.min(s,i.length),0,{...A,state:"exiting"})}),i}function Fle(e){let{animatedItem:t}=e;return(0,Ka.useEffect)(()=>{if(t.state!=="exiting")return;let n=window.setTimeout(()=>e.onExited(t.key),e.durationMs);return()=>window.clearTimeout(n)},[t.key,t.state,e.durationMs,e.onExited]),(0,Ng.jsx)("div",{"aria-hidden":t.state==="exiting"?!0:void 0,className:S("grid min-w-0 origin-center transition-[grid-template-rows,opacity,transform] motion-reduce:transition-none",t.state==="present"?"grid-rows-[1fr] translate-x-0 scale-100 opacity-100":"pointer-events-none grid-rows-[0fr] translate-x-2 scale-[0.98] opacity-0"),"data-presence":t.state,inert:t.state==="exiting"?!0:void 0,style:{transitionDuration:`${e.durationMs}ms`,transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.2, 1)"},children:(0,Ng.jsx)("div",{className:"min-h-0 min-w-0 overflow-hidden",children:e.renderItem(t.item)})})}function PO(e){return e.map(t=>t.state==="entering"?{...t,state:"present"}:t)}function Sle(){let[e,t]=(0,Ka.useState)(!1);return(0,Ka.useEffect)(()=>{let n=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>t(n.matches);return o(),n.addEventListener("change",o),()=>n.removeEventListener("change",o)},[]),e}function HO(e,t){let n=UO(t.nowMs,t.timeZone),o=new Map,a=[...e].sort((r,i)=>LF(i)-LF(r));for(let r of a){let i=LF(r),A=Lle(i,n,t.timeZone),s=o.get(A.key);s?s.conversations.push(r):o.set(A.key,{...A,conversations:[r]})}return[...o.values()]}function LF(e){let t=Date.parse(e.lastSeenAt);return Number.isFinite(t)?t:Number.NEGATIVE_INFINITY}function Lle(e,t,n){if(!Number.isFinite(e))return{key:"older",label:"Older"};let o=UO(e,n),a=Math.max(0,Math.floor((t-o)/864e5));return a===0?{key:"today",label:"Today"}:a===1?{key:"yesterday",label:"Yesterday"}:a<7?{key:`day-${o}`,label:new Intl.DateTimeFormat("en-US",{timeZone:n,weekday:"long"}).format(e)}:a<14?{key:"last-week",label:"Last week"}:a<21?{key:"2-weeks",label:"2 weeks ago"}:a<28?{key:"3-weeks",label:"3 weeks ago"}:{key:"older",label:"Older"}}function UO(e,t){let n=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"numeric",timeZone:t,year:"numeric"}).formatToParts(e),o=new Map(n.map(a=>[a.type,Number(a.value)]));return Date.UTC(o.get("year")??0,(o.get("month")??1)-1,o.get("day")??1)}var TO=w(k(),1);function an(e){return(0,TO.jsx)("div",{className:"min-w-0 rounded-lg border border-white/10 bg-[#050505] px-4 py-3 text-base leading-relaxed text-dashboard-text-muted",children:e.children})}var $g=w(k(),1);function Hr(e){let t=e.size??"compact";return(0,$g.jsxs)("div",{className:S("relative min-w-0",e.className),children:[(0,$g.jsx)(yi,{"aria-hidden":"true",className:S("pointer-events-none absolute top-1/2 -translate-y-1/2 text-dashboard-text-muted",Rle[t]),size:t==="compact"?13:14,strokeWidth:2.5}),(0,$g.jsx)("input",{"aria-label":e.label,className:S("w-full rounded-lg border border-white/[0.08] font-mono text-xs text-dashboard-text outline-none transition-colors placeholder:text-dashboard-text-muted hover:border-white/15",Nle[t]),onChange:n=>e.onChange(n.currentTarget.value),placeholder:e.placeholder,type:"search",value:e.value})]})}var Rle={compact:"left-2.5",default:"left-3"},Nle={compact:"h-9 bg-black/25 pr-3 pl-8 focus:border-cyan-400/30 focus:ring-1 focus:ring-cyan-400/15",default:"h-10 bg-black/20 pr-3 pl-9 focus:border-cyan-300/35 focus:ring-2 focus:ring-cyan-300/10"};var ye=w(k(),1),$le=e=>e.key;function OO(e){let[t,n]=(0,RF.useState)(),[o,a]=(0,RF.useState)(),r=Mle(HO(e.conversations,{nowMs:Date.now(),timeZone:e.timeZone}));return(0,ye.jsxs)("aside",{className:"relative grid h-full min-h-0 min-w-0 grid-rows-[auto_auto_minmax(0,1fr)] overflow-hidden border-r border-white/[0.07] bg-white/[0.02]",children:[(0,ye.jsx)("div",{className:"px-5 pb-3 pt-5",children:(0,ye.jsxs)("div",{className:"flex items-end justify-between gap-3",children:[(0,ye.jsx)("h2",{className:"m-0 font-display text-xl font-medium leading-tight text-dashboard-text",children:"Conversations"}),(0,ye.jsx)("div",{className:"rounded border border-white/[0.08] bg-black/20 px-2.5 py-1 font-mono text-xs text-dashboard-text-muted",children:e.loading?"\u2026":e.conversations.length})]})}),(0,ye.jsx)("div",{className:"px-3 pb-3",children:(0,ye.jsx)(Hr,{label:"Search your conversations",onChange:e.onQueryChange,placeholder:"Search conversations\u2026",size:"default",value:e.query})}),(0,ye.jsx)("div",{className:"min-h-0 overflow-y-auto overscroll-contain px-2 pb-2",children:e.error?(0,ye.jsx)("div",{className:"p-3",children:(0,ye.jsx)(an,{children:e.error})}):(0,ye.jsx)(GO,{ariaLabel:"Your conversations",className:"grid gap-1",empty:e.loading?void 0:(0,ye.jsx)("div",{className:"p-3",children:(0,ye.jsx)(an,{children:"No conversations match this view."})}),getKey:$le,items:r,renderItem:i=>i.kind==="section"?(0,ye.jsx)("h3",{className:"m-0 px-3 pb-1 pt-4 font-display text-xs font-semibold uppercase tracking-[0.08em] text-dashboard-text-muted/60",children:i.label}):(0,ye.jsx)(jle,{conversation:i.conversation,onArchiveError:a,onArchived:A=>{a(s=>s?.id===A.id?void 0:s),n(A)},selected:i.conversation.id===e.selectedId}),role:"navigation"})}),t||o?(0,ye.jsxs)("div",{className:"absolute bottom-3 left-3 right-3 z-20 grid gap-2",children:[o?(0,ye.jsx)(Ple,{conversation:o,onDismiss:()=>a(void 0)}):null,t?(0,ye.jsx)(Gle,{conversation:t,onRestored:()=>n(void 0)}):null]}):null]})}function Mle(e){return e.flatMap(t=>[{key:`section-${t.key}`,kind:"section",label:t.label},...t.conversations.map(n=>({conversation:n,key:`conversation-${n.id}`,kind:"conversation"}))])}function jle(e){let t=Rg(e.conversation.id,{onError:()=>e.onArchiveError(e.conversation),onSuccess:r=>{r&&e.onArchived(e.conversation)}}),n=_B(e.conversation),o=Ys(e.conversation,{includeId:!1}),a=DA(e.conversation);return(0,ye.jsxs)("div",{className:"group relative min-w-0",children:[(0,ye.jsxs)(Fe,{"aria-current":e.selected?"page":void 0,className:S("block min-w-0 rounded-lg border border-transparent px-3 py-3 text-inherit no-underline transition-all hover:bg-white/[0.035]",e.selected&&"border-cyan-300/20 bg-cyan-300/[0.07]"),to:xr(e.conversation.id),children:[(0,ye.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[n==="active"?(0,ye.jsx)(ty,{className:"size-1.5"}):(0,ye.jsx)("span",{"aria-hidden":"true",className:S("size-1.5 shrink-0 rounded-full",n==="failed"&&"bg-rose-300",n==="idle"&&"bg-white/25")}),(0,ye.jsx)("div",{className:"truncate font-display text-base font-medium leading-tight text-dashboard-text",children:a})]}),o?(0,ye.jsx)("div",{className:"ml-3.5 mt-1.5 truncate font-mono text-xs leading-tight text-dashboard-text-muted",children:o}):null]}),(0,ye.jsx)("button",{"aria-label":`Archive ${a}`,className:"pointer-events-none absolute right-2 top-1/2 z-10 grid size-8 -translate-y-1/2 place-items-center rounded-md bg-[#111719] text-dashboard-text-muted opacity-0 shadow-[-8px_0_12px_rgba(9,12,14,0.8)] transition hover:text-dashboard-text focus:pointer-events-auto focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-cyan-300/35 group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100",disabled:t.isPending,onClick:()=>t.mutate({archived:!0,lastSeenAt:e.conversation.lastSeenAt}),title:`Archive ${a}`,type:"button",children:(0,ye.jsx)(Cp,{"aria-hidden":"true",size:15})})]})}function Ple(e){let t=DA(e.conversation);return(0,ye.jsx)("div",{className:"rounded-lg border border-rose-300/25 bg-[#111719] px-3 py-2.5 shadow-[0_12px_32px_rgba(0,0,0,0.45)]",children:(0,ye.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,ye.jsxs)("div",{className:"min-w-0 flex-1 font-mono text-xs text-rose-200/80",role:"alert",children:["Could not archive ",t,"."]}),(0,ye.jsx)("button",{className:"shrink-0 rounded border border-white/15 px-2 py-1 font-mono text-xs text-dashboard-text-muted transition hover:border-white/30 hover:text-dashboard-text focus:outline-none focus:ring-2 focus:ring-cyan-300/35",onClick:e.onDismiss,type:"button",children:"Dismiss"})]})})}function Gle(e){let t=Rg(e.conversation.id,{onSuccess:o=>{o||e.onRestored()}}),n=DA(e.conversation);return(0,ye.jsxs)("div",{className:"rounded-lg border border-white/15 bg-[#111719] px-3 py-2.5 shadow-[0_12px_32px_rgba(0,0,0,0.45)]",children:[(0,ye.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,ye.jsxs)("div",{className:"min-w-0 flex-1 truncate font-mono text-xs text-dashboard-text-muted",role:"status",children:[n," archived"]}),(0,ye.jsx)("button",{"aria-label":`Undo archive for ${n}`,className:"shrink-0 rounded border border-white/15 px-2 py-1 font-mono text-xs text-cyan-100/75 transition hover:border-white/30 hover:text-cyan-50 focus:outline-none focus:ring-2 focus:ring-cyan-300/35 disabled:opacity-40",disabled:t.isPending,onClick:()=>t.mutate({archived:!1,lastSeenAt:e.conversation.lastSeenAt}),type:"button",children:t.isPending?"Restoring\u2026":"Undo"})]}),t.error?(0,ye.jsx)("div",{className:"mt-1 font-mono text-xs text-rose-200/80",role:"alert",children:"Could not restore the conversation."}):null]})}var Lq=w(Y(),1);var Hle=d.object({memories:d.array(d.object({id:d.string(),content:d.string(),observedAtMs:d.number(),scope:d.enum(["personal","conversation"]),kind:d.enum(["preference","procedure","knowledge"])}).strict())}).strict();function ny(e){if(e.pluginName!=="memory"||e.kind!=="recall"||e.version!==1)return;let t=Hle.safeParse(e.content);return t.success?t.data:void 0}function ay(e,t){if(e.previousCursor)throw new Error("Cannot export a partial conversation transcript");let n=[];return n.push(`# ${dd(Zle(e,t))}`,""),Lt(n,"Conversation ID",qO(e.conversationId)),Lt(n,"Generated",e.generatedAt),Lt(n,"Actor",Vle(t,e)),Lt(n,"Location",Xle(t,e)),Lt(n,"Usage",[V5(e.cumulativeUsage),eU(e.cumulativeUsage,e.auxiliaryCosts)].filter(Boolean).join(" \xB7 ")),Lt(n,"Sentry conversation",e.sentryConversationUrl),n.push("","## Transcript"),Ule(n,e),ape(n)}function Ule(e,t){let n=ki(t);if(t.eventHistory.status==="available"){NF(e,t,n,!1);return}if(t.eventHistory.status==="redacted"&&n.length){e.push("","Transcript hidden because this conversation is not public."),NF(e,t,n,!0);return}if(n.length){NF(e,t,n,!1);return}e.push("",vB(t))}function NF(e,t,n,o){for(let a of yg(n)){if(a.kind==="message"){a.message.eventType?zle(e,t,a.message,o):Yle(e,t,a.message,o);continue}if(a.kind==="failure"){Ole(e,t,a.outcome,a.timestamp);continue}if(a.kind==="subagent"){Jle(e,t,a.part,a.timestamp);continue}if(a.kind==="context"){qle(e,t,a.part,a.timestamp);continue}if(a.kind==="reasoning"){Tle(e,t,a.part,a.timestamp);continue}if(a.kind==="structured_event"){e.push("",`### ${a.part.presentation.title}`),MA(e,t,a.timestamp),a.part.presentation.preview&&e.push("",a.part.presentation.preview);for(let r of a.part.presentation.details??[])e.push("",`- ${r.title}`),r.description&&e.push(` ${r.description}`),r.content&&e.push("",$F(r.content,"md")),r.metadata?.length&&e.push(` ${r.metadata.join(" \xB7 ")}`);continue}Wle(e,t,a.part,a.timestamp)}}function Tle(e,t,n,o){e.push("","### Reasoning"),MA(e,t,o),e.push("",n.redacted?"<redacted>":n.text)}function Ole(e,t,n,o){e.push("",n==="delivery_failed"?"### Message delivery failed":"### Agent response failed"),MA(e,t,o),e.push("",n==="delivery_failed"?`${it()} could not deliver this message to its destination.`:`The model response ended before ${it()} could complete this turn.`)}function qle(e,t,n,o){let a=n.event;e.push("",a.type==="handoff"?"### Model handoff":"### Context compacted"),MA(e,t,o),a.type==="handoff"?(Lt(e,"Profile",a.modelProfile),Lt(e,"Model",a.modelId),Lt(e,"Reasoning",a.reasoningLevel)):(Lt(e,"Profile",a.modelProfile),Lt(e,"Model",a.modelId),a.details&&(Lt(e,"Estimated input tokens",String(a.details.estimatedInputTokens)),a.details.replacementInputTokens!==void 0&&Lt(e,"Replacement input tokens",String(a.details.replacementInputTokens)),Lt(e,"Compaction trigger",String(a.details.triggerTokens)),Lt(e,"Input limit",String(a.details.inputLimitTokens)),Lt(e,"Input messages",String(a.details.inputMessageCount)),Lt(e,"Retained messages",String(a.details.retainedMessageCount)),Lt(e,"Summary characters",String(a.details.summaryChars)))),a.summary&&e.push("","#### Continuation summary","",a.summary)}function zle(e,t,n,o){if(e.push("",`### Event: ${dd(n.eventType??"")}`),MA(e,t,n.timestamp),o){e.push("","- <redacted>");return}let a=SA(n);e.push("",a.trim().length?a:"_No content._")}function Yle(e,t,n,o){if(e.push("",`### ${epe(n,t)}`),MA(e,t,n.timestamp),o){e.push("",...n.parts.map(()=>"- <redacted>"));return}let a=SA(n);e.push("",a.trim().length?a:"_No content._"),Kle(e,n.contexts)}function Kle(e,t){for(let n of t??[]){let o=ny(n);if(e.push("",o?"#### Recalled memories":`#### ${dd(n.kind)} context`),Lt(e,"Plugin",n.pluginName),Lt(e,"Loaded",n.loadedAt),!o){e.push("","```json",JSON.stringify(n.content,null,2),"```");continue}for(let a of o.memories)e.push("",`- ${a.content}`,` - ID: ${qO(a.id)}`,` - Observed: ${new Date(a.observedAtMs).toISOString()}`,` - Scope: ${a.scope}`,` - Kind: ${a.kind}`)}}function Jle(e,t,n,o){e.push("",`### Subagent: ${dd(n.subagentKind)}`),MA(e,t,o),Lt(e,"Status",n.status)}function Wle(e,t,n,o){e.push("",`### Tool: ${dd(n.name)}`),MA(e,t,o),Lt(e,"Status",n.status),Lt(e,"Duration",QB(o,n.resultTimestamp)),n.input!==void 0&&e.push("","#### Arguments","",$F(Bo(n.input),"json")),n.output!==void 0&&e.push("","#### Result","",$F(Bo(n.output),"json"))}function MA(e,t,n){let o=[tpe(n),npe(t,n)].filter(ope);o.length&&e.push("",`_${o.join(" - ")}_`)}function Zle(e,t){let n=e.displayTitle.trim();return n||(t?DA(t):"Conversation")}function Vle(e,t){return fg(e?.actorIdentity??t?.actorIdentity)??""}function Xle(e,t){return e?Ys(e)??"":t?Ys(t)??"":""}function epe(e,t){return dd(bg(t,e))}function tpe(e){return typeof e!="number"||!Number.isFinite(e)?"":new Date(e).toISOString()}function npe(e,t){if(typeof t!="number"||!Number.isFinite(t))return"";let n=Date.parse(e.startedAt);return!Number.isFinite(n)||t<n?"":`+${P1(t-n)}`}function Lt(e,t,n){n&&e.push(`- ${t}: ${n}`)}function dd(e){return e.replace(/\s+/g," ").trim()||"Untitled"}function qO(e){let t=e.includes("`")?"``":"`";return`${t}${e}${t}`}function $F(e,t){let n=[...e.matchAll(/`+/g)].reduce((a,r)=>Math.max(a,r[0].length),0),o="`".repeat(Math.max(3,n+1));return`${o}${t}
|
|
96
|
+
`),r=0;for(;r<a.length;){let i=a[r]??"",A=yU(i);if(A){n.push(A),r+=1;continue}let s=W1(i),c=J1(i);if(s||c){let l=[];for(;r<a.length&&(s?W1(a[r]??""):J1(a[r]??""));)l.push((a[r]??"").replace(s?/^\s*\d+\.\s+/:/^\s*[-*+]\s+/,"")),r+=1;n.push({items:l,ordered:s,type:"list"});continue}let u=[];for(;r<a.length&&!yU(a[r]??"")&&!W1(a[r]??"")&&!J1(a[r]??"");)u.push(a[r]??""),r+=1;n.push({lines:u,type:"paragraph"})}}return n}function yU(e){let t=/^(#{1,6})\s+(.+)$/.exec(e);if(t)return{level:t[1].length,text:t[2].trimEnd(),type:"heading"}}function J1(e){return/^\s*[-*+]\s+\S/.test(e)}function W1(e){return/^\s*\d+\.\s+\S/.test(e)}function Z1(e){let t=bU(e),n=[],o=0,a=0;for(let r of t)r.start>o&&n.push(...CU(e.slice(o,r.start),a++)),n.push((0,Ke.jsx)(Fue,{href:r.href,children:(0,Ke.jsx)(Due,{href:r.href,label:r.label})},`link-${r.start}`)),o=r.end;return o<e.length&&n.push(...CU(e.slice(o),a)),n}function CU(e,t){if(!e)return[];let n=[],o=/(`+)([^`]+?)\1/g,a=0,r,i=0;for(;r=o.exec(e);)r.index>a&&n.push(...wU(e.slice(a,r.index),`${t}-${i++}`)),n.push((0,Ke.jsx)("code",{className:"rounded-[0.25rem] bg-white/[0.08] px-1 py-0.5 font-mono text-[0.9em] text-cyan-50",children:(0,Ke.jsx)(Ye,{text:r[2]??""})},`code-${t}-${i++}`)),a=r.index+r[0].length;return a<e.length&&n.push(...wU(e.slice(a),`${t}-${i}`)),n}function wU(e,t){if(!e)return[];let n=[],o=/(\*\*|__)(.+?)\1|\*([^*]+?)\*/g,a=0,r,i=0;for(;r=o.exec(e);)r.index>a&&n.push((0,Ke.jsx)(Ye,{text:e.slice(a,r.index)},`${t}-t-${i++}`)),n.push(r[1]?(0,Ke.jsx)("strong",{className:"font-semibold text-dashboard-text",children:(0,Ke.jsx)(Ye,{text:r[2]??""})},`${t}-b-${i++}`):(0,Ke.jsx)("em",{className:"italic text-dashboard-text",children:(0,Ke.jsx)(Ye,{text:r[3]??""})},`${t}-i-${i++}`)),a=r.index+r[0].length;return a<e.length&&n.push((0,Ke.jsx)(Ye,{text:e.slice(a)},`${t}-t-${i}`)),n}function Due(e){let t=Mn(),n=t.active&&e.href.toLowerCase().includes(t.normalizedQuery),o=e.label.toLowerCase().includes(t.normalizedQuery);return n&&!o?(0,Ke.jsx)("mark",{className:"rounded-[2px] bg-amber-400/20 px-0.5 text-inherit not-italic",title:`Matched URL: ${e.href}`,children:e.label}):(0,Ke.jsx)(Ye,{text:e.label})}function Fue(e){let t=/^https?:/i.test(e.href);return(0,Ke.jsx)("a",{className:fU,href:e.href,rel:t?"noreferrer":void 0,target:t?"_blank":void 0,children:e.children})}var RB=w(k(),1);function yo(e){let t=Qi(e.role??""),n=iU(e.text);return(0,RB.jsx)("div",{className:"grid min-w-0 gap-2",children:n.map((o,a)=>o.language==="markdown"&&!o.fenced?(0,RB.jsx)(Cg,{compact:t==="assistant"||t==="user",text:o.code},a):(0,RB.jsx)(LA,{code:o.code,language:o.language},a))})}var Ne=w(k(),1),Sue=["a[href]","button:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function EU(e){let t=(0,Vs.useRef)(null),n=(0,Vs.useRef)(e.onClose),o=(0,Vs.useRef)(void 0),a=e.record?.id;if(n.current=e.onClose,(0,Vs.useEffect)(()=>{a&&e.action.reset()},[a]),(0,Vs.useEffect)(()=>{if(!a)return;o.current=document.activeElement instanceof HTMLElement?document.activeElement:void 0;let f=document.body.style.overflow;document.body.style.overflow="hidden";let b=requestAnimationFrame(()=>{t.current?.querySelector("[data-memory-drawer-close]")?.focus()}),B=C=>{if(C.key==="Escape"){C.preventDefault(),n.current();return}if(C.key!=="Tab")return;let E=t.current,x=Array.from(E?.querySelectorAll(Sue)??[]).filter(J=>J.tabIndex>=0&&J.getClientRects().length>0),Q=x.at(0),R=x.at(-1);if(!E||!Q||!R){C.preventDefault();return}let q=document.activeElement;C.shiftKey&&(q===Q||!E.contains(q))?(C.preventDefault(),R.focus()):!C.shiftKey&&(q===R||!E.contains(q))&&(C.preventDefault(),Q.focus())};return window.addEventListener("keydown",B),()=>{cancelAnimationFrame(b),window.removeEventListener("keydown",B),document.body.style.overflow=f;let C=o.current;o.current=void 0,C?.isConnected&&C.focus()}},[a]),!e.record)return null;let{record:r}=e,i=wg(r,"Type"),A=wg(r,"Learned"),s=wg(r,"Remembered"),c=wg(r,"Source"),u=wg(r,"Visibility"),l=u==="Public",p=A==="Automatic"?`Junior learned this from a ${c} conversation on ${Eg(s)}.`:A==="Explicit"?l?`Someone asked Junior to remember this on ${Eg(s)}.`:`You asked Junior to remember this on ${Eg(s)}.`:`Junior recorded this on ${Eg(s)}.`,g=l?`It is stored as workspace ${i.toLowerCase()} for future channels.`:`It is stored as a ${i.toLowerCase()} for future conversations.`,m=(r.metadata??[]).filter(f=>!["Learned","Source","Memory ID"].includes(f.label)),h=r.actions?.find(f=>f.tone==="danger"),y="memory-details-drawer-title";return(0,Ne.jsxs)("div",{"aria-labelledby":y,"aria-modal":"true",className:"fixed inset-0 z-50",ref:t,role:"dialog",children:[(0,Ne.jsx)("button",{"aria-label":"Dismiss memory details",className:"absolute inset-0 cursor-default bg-black/55",onClick:e.onClose,tabIndex:-1,type:"button"}),(0,Ne.jsxs)("aside",{className:"absolute top-0 right-0 grid h-full w-full grid-rows-[auto_minmax(0,1fr)] bg-[#070707] shadow-[-20px_0_60px_rgba(0,0,0,0.45)] md:w-[min(560px,94vw)] md:border-l md:border-white/12",children:[(0,Ne.jsxs)("header",{className:"relative border-b border-white/10 bg-dashboard-surface-raised px-4 py-3 md:px-5",children:[(0,Ne.jsxs)("div",{className:"min-w-0 pr-12",children:[(0,Ne.jsx)("h2",{className:"m-0 font-display text-lg font-medium tracking-normal text-dashboard-text",id:y,children:"What Junior remembers"}),(0,Ne.jsxs)("div",{className:"mt-1 break-words font-mono text-xs leading-snug text-dashboard-text-muted",children:[i," \xB7 ",u," \xB7 ",Eg(s)]})]}),(0,Ne.jsx)("div",{className:"absolute top-3 right-4 md:right-5",children:(0,Ne.jsx)(pt,{"aria-label":"Close memory details","data-memory-drawer-close":!0,onClick:e.onClose,size:"icon",title:"Close",children:(0,Ne.jsx)(To,{"aria-hidden":"true",size:15,strokeWidth:2.25})})})]}),(0,Ne.jsx)("div",{className:"min-h-0 overflow-auto px-4 py-4 md:px-5",children:(0,Ne.jsxs)("section",{className:"grid gap-5",children:[(0,Ne.jsxs)("div",{children:[(0,Ne.jsx)("div",{className:"mb-2 font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:"Memory"}),(0,Ne.jsx)(yo,{text:r.title}),r.description?(0,Ne.jsx)("div",{className:"mt-3",children:(0,Ne.jsx)(yo,{text:r.description})}):null]}),(0,Ne.jsxs)("div",{className:"flex items-start gap-3 rounded border border-cyan-300/12 bg-cyan-300/[0.035] p-3",children:[(0,Ne.jsx)(bi,{"aria-hidden":"true",className:"mt-0.5 shrink-0 text-cyan-200/70",size:15}),(0,Ne.jsxs)("div",{children:[(0,Ne.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.12em] text-cyan-200/65",children:"Why Junior remembers this"}),(0,Ne.jsxs)("div",{className:"mt-1 font-mono text-xs leading-relaxed text-dashboard-text",children:[p," ",g]})]})]}),m.length?(0,Ne.jsx)("dl",{className:"grid gap-px overflow-hidden rounded border border-white/[0.06] bg-white/[0.055]",children:m.map(f=>(0,Ne.jsx)(Lue,{label:f.label,children:f.value},f.label))}):null,h?(0,Ne.jsxs)("button",{className:"inline-flex w-fit cursor-pointer items-center gap-2 rounded border border-rose-300/15 bg-rose-300/[0.035] px-3 py-2 font-mono text-xs uppercase tracking-[0.08em] text-rose-200/75 transition-colors hover:border-rose-300/30 hover:bg-rose-300/[0.07] hover:text-rose-100",disabled:e.action.isPending,onClick:()=>{h.confirmation&&!window.confirm(h.confirmation)||(e.onClose(),e.onAction({...h,confirmation:void 0}))},type:"button",children:[(0,Ne.jsx)(Uo,{"aria-hidden":"true",size:13}),"Forget this memory"]}):l?(0,Ne.jsxs)("div",{className:"inline-flex w-fit items-center gap-2 rounded border border-white/[0.08] px-3 py-2 font-mono text-xs uppercase tracking-[0.08em] text-dashboard-text-muted",children:[(0,Ne.jsx)(go,{"aria-hidden":"true",size:13}),"View only \xB7 public memories can't be deleted"]}):null]})})]})]})}function Lue(e){return(0,Ne.jsxs)("div",{className:"min-w-0 bg-[#09090b] px-3 py-3",children:[(0,Ne.jsx)("dt",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:e.label}),(0,Ne.jsx)("dd",{className:"mt-1.5 ml-0 break-words font-mono text-sm leading-relaxed text-dashboard-text",children:e.children})]})}function wg(e,t){return e.metadata?.find(n=>n.label===t)?.value??"\u2014"}function Eg(e){return e.split(",").slice(0,2).join(",")}var bO=w(Y(),1);var _i=w(k(),1);function xa(e){return{bottom:36,height:e,left:56,plotHeight:e-24-36,plotWidth:886,right:18,top:24,width:960}}function Ot(e){return new Date(`${e}T00:00:00.000Z`).toLocaleDateString(void 0,{day:"numeric",month:"short",timeZone:"UTC"})}function Rue(e){return[...new Set([0,Math.floor((e-1)/2),e-1])].filter(t=>t>=0)}function Co(e){return[0,.5,1].map(t=>{let n=e.layout.top+t*e.layout.plotHeight;return(0,_i.jsxs)("g",{children:[(0,_i.jsx)("line",{stroke:"rgba(255,255,255,0.07)",strokeDasharray:"3 5",x1:e.layout.left,x2:e.layout.width-e.layout.right,y1:n,y2:n}),(0,_i.jsx)("text",{fill:"rgba(255,255,255,0.5)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:"end",x:e.layout.left-8,y:n+3,children:Math.round(e.maximum*(1-t))})]},t)})}function Da(e){return Rue(e.dates.length).map(t=>{let n=e.dates[t];return n?(0,_i.jsx)("text",{fill:"rgba(255,255,255,0.5)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:t===0?"start":t===e.dates.length-1?"end":"middle",x:e.xPosition(t),y:e.layout.height-8,children:Ot(n)},n):null})}function Jn(e){return(0,_i.jsx)("div",{className:"grid grid-cols-[auto_auto] gap-x-4 gap-y-0.5",children:e.rows.flatMap(([t,n],o)=>[(0,_i.jsx)("span",{className:"text-dashboard-text-muted",children:t},`${o}-label`),(0,_i.jsx)("span",{className:"text-right text-dashboard-text",children:n},`${o}-value`)])})}var nn=w(Y(),1);var Nue=Object.defineProperty,ad=(e,t)=>Nue(e,"name",{value:t,configurable:!0}),kU=!!(typeof window<"u"&&window.document&&window.document.createElement);function ca(e,t,{checkForDefaultPrevented:n=!0}={}){return ad(function(a){if(e?.(a),n===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}ad(ca,"composeEventHandlers");function $ue(e){if(!kU)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}ad($ue,"getOwnerWindow");function V1(e){if(!kU)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}ad(V1,"getOwnerDocument");function QU(e,t=!1){let{activeElement:n}=V1(e);if(!n?.nodeName)return null;if(IU(n)&&n.contentDocument)return QU(n.contentDocument.body,t);if(t){let o=n.getAttribute("aria-activedescendant");if(o){let a=V1(n).getElementById(o);if(a)return a}}return n}ad(QU,"getActiveElement");function IU(e){return e.tagName==="IFRAME"}ad(IU,"isFrame");var Eo=w(Y(),1),X1=w(k(),1),Mue=Object.defineProperty,wo=(e,t)=>Mue(e,"name",{value:t,configurable:!0});function jue(e,t){let n=Eo.createContext(t);n.displayName=e+"Context";let o=wo(r=>{let{children:i,...A}=r,s=Eo.useMemo(()=>A,Object.values(A));return(0,X1.jsx)(n.Provider,{value:s,children:i})},"Provider");o.displayName=e+"Provider";function a(r,i={}){let{optional:A=!1}=i,s=Eo.useContext(n);if(s)return s;if(t!==void 0)return t;if(!A)throw new Error(`\`${r}\` must be used within \`${e}\``)}return wo(a,"useContext"),[o,a]}wo(jue,"createContext");function kg(e,t=[]){let n=[];function o(r,i){let A=Eo.createContext(i);A.displayName=r+"Context";let s=n.length;n=[...n,i];let c=wo(l=>{let{scope:p,children:g,...m}=l,h=p?.[e]?.[s]||A,y=Eo.useMemo(()=>m,Object.values(m));return(0,X1.jsx)(h.Provider,{value:y,children:g})},"Provider");c.displayName=r+"Provider";function u(l,p,g={}){let{optional:m=!1}=g,h=p?.[e]?.[s]||A,y=Eo.useContext(h);if(y)return y;if(i!==void 0)return i;if(!m)throw new Error(`\`${l}\` must be used within \`${r}\``)}return wo(u,"useContext"),[c,u]}wo(o,"createContext");let a=wo(()=>{let r=n.map(i=>Eo.createContext(i));return wo(function(A){let s=A?.[e]||r;return Eo.useMemo(()=>({[`__scope${e}`]:{...A,[e]:s}}),[A,s])},"useScope")},"createScope");return a.scopeName=e,[o,_U(a,...t)]}wo(kg,"createContextScope");function _U(...e){let t=e[0];if(e.length===1)return t;let n=wo(()=>{let o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return wo(function(r){let i=o.reduce((A,{useScope:s,scopeName:c})=>{let l=s(r)[`__scope${c}`];return{...A,...l}},{});return Eo.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}wo(_U,"composeContextScopes");var ko=w(Y(),1);var NB=!1;var vU=w(Y(),1),ua=globalThis?.document?vU.useLayoutEffect:()=>{};var Ko=w(Y(),1);var od=w(Y(),1),Pue=Object.defineProperty,Gue=(e,t)=>Pue(e,"name",{value:t,configurable:!0}),xU=od[" useEffectEvent ".trim().toString()],DU=od[" useInsertionEffect ".trim().toString()];function eF(e){if(typeof xU=="function")return xU(e);let t=od.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof DU=="function"?DU(()=>{t.current=e}):ua(()=>{t.current=e}),od.useMemo(()=>((...n)=>t.current?.(...n)),[])}Gue(eF,"useEffectEvent");var Hue=Object.defineProperty,Qg=(e,t)=>Hue(e,"name",{value:t,configurable:!0}),Uue=ko[" useInsertionEffect ".trim().toString()]||ua;function tF({prop:e,defaultProp:t,onChange:n=Qg(()=>{},"onChange"),caller:o}){let[a,r,i]=SU({defaultProp:t,onChange:n}),A=e!==void 0,s=A?e:a;if(NB){let u=ko.useRef(e!==void 0);ko.useEffect(()=>{let l=u.current;l!==A&&console.warn(`${o} is changing from ${l?"controlled":"uncontrolled"} to ${A?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=A},[A,o])}let c=ko.useCallback(u=>{if(A){let l=LU(u)?u(e):u;l!==e&&i.current?.(l)}else r(u)},[A,e,r,i]);return[s,c]}Qg(tF,"useControllableState");function SU({defaultProp:e,onChange:t}){let[n,o]=ko.useState(e),a=ko.useRef(n),r=ko.useRef(t);return Uue(()=>{r.current=t},[t]),ko.useEffect(()=>{a.current!==n&&(r.current?.(n),a.current=n)},[n,a]),[n,o,r]}Qg(SU,"useUncontrolledState");function LU(e){return typeof e=="function"}Qg(LU,"isFunction");var FU=Symbol("RADIX:SYNC_STATE");function Tue(e,t,n,o){let{prop:a,defaultProp:r,onChange:i,caller:A}=t,s=a!==void 0,c=eF(i);if(NB){let y=Ko.useRef(a!==void 0);Ko.useEffect(()=>{let f=y.current;f!==s&&console.warn(`${A} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=s},[s,A])}let u=[{...n,state:r}];o&&u.push(o);let[l,p]=Ko.useReducer((y,f)=>{if(f.type===FU)return{...y,state:f.state};let b=e(y,f);return s&&!Object.is(b.state,y.state)&&c(b.state),b},...u),g=l.state,m=Ko.useRef(g);Ko.useEffect(()=>{m.current!==g&&(m.current=g,s||c(g))},[g,m,s]);let h=Ko.useMemo(()=>a!==void 0?{...l,state:a}:l,[l,a]);return Ko.useEffect(()=>{s&&!Object.is(a,l.state)&&p({type:FU,state:a})},[a,l.state,s]),[h,p]}Qg(Tue,"useControllableStateReducer");var RU=w(Y(),1),Oue=Object.defineProperty,aF=(e,t)=>Oue(e,"name",{value:t,configurable:!0});function nF(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}aF(nF,"setRef");function NU(...e){return t=>{let n=!1,o=e.map(a=>{let r=nF(a,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let a=0;a<o.length;a++){let r=o[a];typeof r=="function"?r():nF(e[a],null)}}}}aF(NU,"composeRefs");function Rr(...e){return RU.useCallback(NU(...e),e)}aF(Rr,"useComposedRefs");var Wn=w(Y(),1);var jU=["top","right","bottom","left"];var Nr=Math.min,Jo=Math.max,_g=Math.round,vg=Math.floor,$r=e=>({x:e,y:e}),que={left:"right",right:"left",bottom:"top",top:"bottom"};function oF(e,t,n){return Jo(e,Nr(t,n))}function Mr(e,t){return typeof e=="function"?e(t):e}function vi(e){return e.split("-")[0]}function Xs(e){return e.split("-")[1]}function MB(e){return e==="x"?"y":"x"}function jB(e){return e==="y"?"height":"width"}function Wo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function PB(e){return MB(Wo(e))}function PU(e,t,n){n===void 0&&(n=!1);let o=Xs(e),a=PB(e),r=jB(a),i=a==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=Ig(i)),[i,Ig(i)]}function GU(e){let t=Ig(e);return[$B(e),t,$B(t)]}function $B(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var $U=["left","right"],MU=["right","left"],zue=["top","bottom"],Yue=["bottom","top"];function Kue(e,t,n){switch(e){case"top":case"bottom":return n?t?MU:$U:t?$U:MU;case"left":case"right":return t?zue:Yue;default:return[]}}function HU(e,t,n,o){let a=Xs(e),r=Kue(vi(e),n==="start",o);return a&&(r=r.map(i=>i+"-"+a),t&&(r=r.concat(r.map($B)))),r}function Ig(e){let t=vi(e);return que[t]+e.slice(t.length)}function Jue(e){var t,n,o,a;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(a=e.left)!=null?a:0}}function rF(e){return typeof e!="number"?Jue(e):{top:e,right:e,bottom:e,left:e}}function ec(e){let{x:t,y:n,width:o,height:a}=e;return{width:o,height:a,top:n,left:t,right:t+o,bottom:n+a,x:t,y:n}}function UU(e,t,n){let{reference:o,floating:a}=e,r=Wo(t),i=PB(t),A=jB(i),s=vi(t),c=r==="y",u=o.x+o.width/2-a.width/2,l=o.y+o.height/2-a.height/2,p=o[A]/2-a[A]/2,g;switch(s){case"top":g={x:u,y:o.y-a.height};break;case"bottom":g={x:u,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:l};break;case"left":g={x:o.x-a.width,y:l};break;default:g={x:o.x,y:o.y}}let m=Xs(t);return m&&(g[i]+=p*(m==="end"?1:-1)*(n&&c?-1:1)),g}async function qU(e,t){var n;t===void 0&&(t={});let{x:o,y:a,platform:r,rects:i,elements:A,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:l="floating",altBoundary:p=!1,padding:g=0}=Mr(t,e),m=rF(g),y=A[p?l==="floating"?"reference":"floating":l],f=ec(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(A.floating)),boundary:c,rootBoundary:u,strategy:s})),b=l==="floating"?{x:o,y:a,width:i.floating.width,height:i.floating.height}:i.reference,B=await(r.getOffsetParent==null?void 0:r.getOffsetParent(A.floating)),C=await(r.isElement==null?void 0:r.isElement(B))&&await(r.getScale==null?void 0:r.getScale(B))||{x:1,y:1},E=ec(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:A,rect:b,offsetParent:B,strategy:s}):b);return{top:(f.top-E.top+m.top)/C.y,bottom:(E.bottom-f.bottom+m.bottom)/C.y,left:(f.left-E.left+m.left)/C.x,right:(E.right-f.right+m.right)/C.x}}var Wue=50,zU=async(e,t,n)=>{let{placement:o="bottom",strategy:a="absolute",middleware:r=[],platform:i}=n,A=i.detectOverflow?i:{...i,detectOverflow:qU},s=await(i.isRTL==null?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:l}=UU(c,o,s),p=o,g=0,m={};for(let h=0;h<r.length;h++){let y=r[h];if(!y)continue;let{name:f,fn:b}=y,{x:B,y:C,data:E,reset:x}=await b({x:u,y:l,initialPlacement:o,placement:p,strategy:a,middlewareData:m,rects:c,platform:A,elements:{reference:e,floating:t}});u=B??u,l=C??l,m[f]={...m[f],...E},x&&g<Wue&&(g++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:a}):x.rects),{x:u,y:l}=UU(c,p,s)),h=-1)}return{x:u,y:l,placement:p,strategy:a,middlewareData:m}},YU=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:o,placement:a,rects:r,platform:i,elements:A,middlewareData:s}=t,{element:c,padding:u=0}=Mr(e,t)||{};if(c==null)return{};let l=rF(u),p={x:n,y:o},g=PB(a),m=jB(g),h=await i.getDimensions(c),y=g==="y",f=y?"top":"left",b=y?"bottom":"right",B=y?"clientHeight":"clientWidth",C=r.reference[m]+r.reference[g]-p[g]-r.floating[m],E=p[g]-r.reference[g],x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c)),Q=x?x[B]:0;(!Q||!await(i.isElement==null?void 0:i.isElement(x)))&&(Q=A.floating[B]||r.floating[m]);let R=C/2-E/2,q=Q/2-h[m]/2-1,J=Nr(l[f],q),Re=Nr(l[b],q),ue=Q-h[m]-Re,Se=Q/2-h[m]/2+R,we=oF(J,Se,ue),He=!s.arrow&&Xs(a)!=null&&Se!==we&&r.reference[m]/2-(Se<J?J:Re)-h[m]/2<0,wt=He?Se<J?Se-J:Se-ue:0;return{[g]:p[g]+wt,data:{[g]:we,centerOffset:Se-we-wt,...He&&{alignmentOffset:wt}},reset:He}}});var KU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;let{placement:a,middlewareData:r,rects:i,initialPlacement:A,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:l=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...y}=Mr(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let f=vi(a),b=Wo(A),B=vi(A)===A,C=await(s.isRTL==null?void 0:s.isRTL(c.floating)),E=p||(B||!h?[Ig(A)]:GU(A)),x=m!=="none";!p&&x&&E.push(...HU(A,h,m,C));let Q=[A,...E],R=await s.detectOverflow(t,y),q=[],J=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&q.push(R[f]),l){let we=PU(a,i,C);q.push(R[we[0]],R[we[1]])}if(J=[...J,{placement:a,overflows:q}],!q.every(we=>we<=0)){var Re,ue;let we=(((Re=r.flip)==null?void 0:Re.index)||0)+1,He=Q[we];if(He&&(!(l==="alignment"?b!==Wo(He):!1)||J.every($e=>Wo($e.placement)===b?$e.overflows[0]>0:!0)))return{data:{index:we,overflows:J},reset:{placement:He}};let wt=(ue=J.filter(la=>la.overflows[0]<=0).sort((la,$e)=>la.overflows[1]-$e.overflows[1])[0])==null?void 0:ue.placement;if(!wt)switch(g){case"bestFit":{var Se;let la=(Se=J.filter($e=>{if(x){let rn=Wo($e.placement);return rn===b||rn==="y"}return!0}).map($e=>[$e.placement,$e.overflows.filter(rn=>rn>0).reduce((rn,Za)=>rn+Za,0)]).sort(($e,rn)=>$e[1]-rn[1])[0])==null?void 0:Se[0];la&&(wt=la);break}case"initialPlacement":wt=A;break}if(a!==wt)return{reset:{placement:wt}}}return{}}}};function TU(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function OU(e){return jU.some(t=>e[t]>=0)}var JU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:o}=t,{strategy:a="referenceHidden",...r}=Mr(e,t);switch(a){case"referenceHidden":{let i=await o.detectOverflow(t,{...r,elementContext:"reference"}),A=TU(i,n.reference);return{data:{referenceHiddenOffsets:A,referenceHidden:OU(A)}}}case"escaped":{let i=await o.detectOverflow(t,{...r,altBoundary:!0}),A=TU(i,n.floating);return{data:{escapedOffsets:A,escaped:OU(A)}}}default:return{}}}}};var WU=new Set(["left","top"]);async function Zue(e,t){let{placement:n,platform:o,elements:a}=e,r=await(o.isRTL==null?void 0:o.isRTL(a.floating)),i=vi(n),A=Xs(n),s=Wo(n)==="y",c=WU.has(i)?-1:1,u=r&&s?-1:1,l=Mr(t,e),{mainAxis:p,crossAxis:g,alignmentAxis:m}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return A&&typeof m=="number"&&(g=A==="end"?m*-1:m),s?{x:g*u,y:p*c}:{x:p*c,y:g*u}}var ZU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;let{x:a,y:r,placement:i,middlewareData:A}=t,s=await Zue(t,e);return i===((n=A.offset)==null?void 0:n.placement)&&(o=A.arrow)!=null&&o.alignmentOffset?{}:{x:a+s.x,y:r+s.y,data:{...s,placement:i}}}}},VU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:a,platform:r}=t,{mainAxis:i=!0,crossAxis:A=!1,limiter:s={fn:b=>{let{x:B,y:C}=b;return{x:B,y:C}}},...c}=Mr(e,t),u={x:n,y:o},l=await r.detectOverflow(t,c),p=Wo(a),g=MB(p),m=u[g],h=u[p],y=(b,B)=>oF(B+l[b==="y"?"top":"left"],B,B-l[b==="y"?"bottom":"right"]);i&&(m=y(g,m)),A&&(h=y(p,h));let f=s.fn({...t,[g]:m,[p]:h});return{...f,data:{x:f.x-n,y:f.y-o,enabled:{[g]:i,[p]:A}}}}}},XU=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;let{x:a,y:r,placement:i,rects:A,middlewareData:s}=t,{offset:c=0,mainAxis:u=!0,crossAxis:l=!0}=Mr(e,t),p={x:a,y:r},g=Wo(i),m=MB(g),h=p[m],y=p[g],f=Mr(c,t),b=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:(n=f.mainAxis)!=null?n:0,crossAxis:(o=f.crossAxis)!=null?o:0};if(u){let E=m==="y"?"height":"width",x=A.reference[m]-A.floating[E]+b.mainAxis,Q=A.reference[m]+A.reference[E]-b.mainAxis;h<x?h=x:h>Q&&(h=Q)}if(l){var B,C;let E=m==="y"?"width":"height",x=WU.has(vi(i)),Q=A.reference[g]-A.floating[E]+(x&&((B=s.offset)==null?void 0:B[g])||0)+(x?0:b.crossAxis),R=A.reference[g]+A.reference[E]+(x?0:((C=s.offset)==null?void 0:C[g])||0)-(x?b.crossAxis:0);y<Q?y=Q:y>R&&(y=R)}return{[m]:h,[g]:y}}}},eT=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:n,rects:o,platform:a,elements:r}=t,{apply:i=()=>{},...A}=Mr(e,t),s=await a.detectOverflow(t,A),c=vi(n),u=Xs(n),l=Wo(n)==="y",{width:p,height:g}=o.floating,m,h;c==="top"||c==="bottom"?(m=c,h=u===(await(a.isRTL==null?void 0:a.isRTL(r.floating))?"start":"end")?"left":"right"):(h=c,m=u==="end"?"top":"bottom");let y=g-s.top-s.bottom,f=p-s.left-s.right,b=Nr(g-s[m],y),B=Nr(p-s[h],f),C=t.middlewareData.shift,E=!C,x=b,Q=B;C!=null&&C.enabled.x&&(Q=f),C!=null&&C.enabled.y&&(x=y),E&&!u&&(l?Q=p-2*Jo(s.left,s.right):x=g-2*Jo(s.top,s.bottom)),await i({...t,availableWidth:Q,availableHeight:x});let R=await a.getDimensions(r.floating);return p!==R.width||g!==R.height?{reset:{rects:!0}}:{}}}};function GB(){return typeof window<"u"}function ac(e){return nT(e)?(e.nodeName||"").toLowerCase():"#document"}function da(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jr(e){var t;return(t=(nT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nT(e){return GB()?e instanceof Node||e instanceof da(e).Node:!1}function Zo(e){return GB()?e instanceof Element||e instanceof da(e).Element:!1}function xi(e){return GB()?e instanceof HTMLElement||e instanceof da(e).HTMLElement:!1}function tT(e){return!GB()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof da(e).ShadowRoot}function xg(e){let{overflow:t,overflowX:n,overflowY:o,display:a}=Vo(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&a!=="inline"&&a!=="contents"}function aT(e){return/^(table|td|th)$/.test(ac(e))}function Dg(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Vue=/transform|translate|scale|rotate|perspective|filter/,Xue=/paint|layout|strict|content/,tc=e=>!!e&&e!=="none",iF;function HB(e){let t=Zo(e)?Vo(e):e;return tc(t.transform)||tc(t.translate)||tc(t.scale)||tc(t.rotate)||tc(t.perspective)||!UB()&&(tc(t.backdropFilter)||tc(t.filter))||Vue.test(t.willChange||"")||Xue.test(t.contain||"")}function oT(e){let t=RA(e);for(;xi(t)&&!rd(t);){if(HB(t))return t;if(Dg(t))return null;t=RA(t)}return null}function UB(){return iF==null&&(iF=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),iF}function rd(e){return/^(html|body|#document)$/.test(ac(e))}function Vo(e){return da(e).getComputedStyle(e)}function Fg(e){return Zo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function RA(e){if(ac(e)==="html")return e;let t=e.assignedSlot||e.parentNode||tT(e)&&e.host||jr(e);return tT(t)?t.host:t}function rT(e){let t=RA(e);return rd(t)?(e.ownerDocument||e).body:xi(t)&&xg(t)?t:rT(t)}function nc(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);let a=rT(e),r=a===((o=e.ownerDocument)==null?void 0:o.body),i=da(a);if(r){let A=TB(i);return t.concat(i,i.visualViewport||[],xg(a)?a:[],A&&n?nc(A):[])}else return t.concat(a,nc(a,[],n))}function TB(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sT(e){let t=Vo(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,a=xi(e),r=a?e.offsetWidth:n,i=a?e.offsetHeight:o,A=_g(n)!==r||_g(o)!==i;return A&&(n=r,o=i),{width:n,height:o,$:A}}function sF(e){return Zo(e)?e:e.contextElement}function id(e){let t=sF(e);if(!xi(t))return $r(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:r}=sT(t),i=(r?_g(n.width):n.width)/o,A=(r?_g(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!A||!Number.isFinite(A))&&(A=1),{x:i,y:A}}var ede=$r(0);function cT(e){let t=da(e);return!UB()||!t.visualViewport?ede:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tde(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===da(e)}function oc(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),r=sF(e),i=$r(1);t&&(o?Zo(o)&&(i=id(o)):i=id(e));let A=tde(r,n,o)?cT(r):$r(0),s=(a.left+A.x)/i.x,c=(a.top+A.y)/i.y,u=a.width/i.x,l=a.height/i.y;if(r&&o){let p=da(r),g=Zo(o)?da(o):o,m=p,h=TB(m);for(;h&&g!==m;){let y=id(h),f=h.getBoundingClientRect(),b=Vo(h),B=f.left+(h.clientLeft+parseFloat(b.paddingLeft))*y.x,C=f.top+(h.clientTop+parseFloat(b.paddingTop))*y.y;s*=y.x,c*=y.y,u*=y.x,l*=y.y,s+=B,c+=C,m=da(h),h=TB(m)}}return ec({width:u,height:l,x:s,y:c})}function OB(e,t){let n=Fg(e).scrollLeft;return t?t.left+n:oc(jr(e)).left+n}function uT(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-OB(e,n),a=n.top+t.scrollTop;return{x:o,y:a}}function nde(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e,r=a==="fixed",i=jr(o),A=t?Dg(t.floating):!1;if(o===i||A&&r)return n;let s={scrollLeft:0,scrollTop:0},c=$r(1),u=$r(0),l=xi(o);if((l||!r)&&((ac(o)!=="body"||xg(i))&&(s=Fg(o)),l)){let g=oc(o);c=id(o),u.x=g.x+o.clientLeft,u.y=g.y+o.clientTop}let p=i&&!l&&!r?uT(i,s):$r(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-s.scrollTop*c.y+u.y+p.y}}function ade(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ode(e){let t=Fg(e),n=e.ownerDocument.body,o=Jo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Jo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),r=-t.scrollLeft+OB(e),i=-t.scrollTop;return Vo(n).direction==="rtl"&&(r+=Jo(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:r,y:i}}var rde=25;function ide(e,t,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",a=da(e),r=jr(e),i=a.visualViewport,A=r.clientWidth,s=r.clientHeight,c=0,u=0;if(i){let p=!UB()||t==="fixed";o?p||(c=-i.offsetLeft,u=-i.offsetTop):(A=i.width,s=i.height,p&&(c=i.offsetLeft,u=i.offsetTop))}if(OB(r)<=0){let p=r.ownerDocument,g=p.body,m=getComputedStyle(g),h=p.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,y=Math.abs(r.clientWidth-g.clientWidth-h),f=getComputedStyle(r).scrollbarGutter==="stable both-edges"?y/2:y;f<=rde&&(A-=f)}return{width:A,height:s,x:c,y:u}}function Ade(e,t){let n=oc(e,!0,t==="fixed"),o=n.top+e.clientTop,a=n.left+e.clientLeft,r=id(e),i=e.clientWidth*r.x,A=e.clientHeight*r.y,s=a*r.x,c=o*r.y;return{width:i,height:A,x:s,y:c}}function iT(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=ide(e,n,t);else if(t==="document")o=ode(jr(e));else if(Zo(t))o=Ade(t,n);else{let a=cT(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return ec(o)}function sde(e,t){let n=t.get(e);if(n)return n;let o=nc(e,[],!1).filter(A=>Zo(A)&&ac(A)!=="body"),a=null,r=Vo(e).position==="fixed",i=r?RA(e):e;for(;Zo(i)&&!rd(i);){let A=Vo(i),s=HB(i),c=a?a.position:r?"fixed":"";!s&&(c==="fixed"||c==="absolute"&&A.position==="static")?o=o.filter(l=>l!==i):a=A,i=RA(i)}return t.set(e,o),o}function cde(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e,i=[...n==="clippingAncestors"?Dg(t)?[]:sde(t,this._c):[].concat(n),o],A=iT(t,i[0],a),s=A.top,c=A.right,u=A.bottom,l=A.left;for(let p=1;p<i.length;p++){let g=iT(t,i[p],a);s=Jo(g.top,s),c=Nr(g.right,c),u=Nr(g.bottom,u),l=Jo(g.left,l)}return{width:c-l,height:u-s,x:l,y:s}}function ude(e){let{width:t,height:n}=sT(e);return{width:t,height:n}}function dde(e,t,n){let o=xi(t),a=jr(t),r=n==="fixed",i=oc(e,!0,r,t),A={scrollLeft:0,scrollTop:0},s=$r(0);if((o||!r)&&((ac(t)!=="body"||xg(a))&&(A=Fg(t)),o)){let p=oc(t,!0,r,t);s.x=p.x+t.clientLeft,s.y=p.y+t.clientTop}!o&&a&&(s.x=OB(a));let c=a&&!o&&!r?uT(a,A):$r(0),u=i.left+A.scrollLeft-s.x-c.x,l=i.top+A.scrollTop-s.y-c.y;return{x:u,y:l,width:i.width,height:i.height}}function AF(e){return Vo(e).position==="static"}function AT(e,t){if(!xi(e)||Vo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return jr(e)===n&&(n=n.ownerDocument.body),n}function dT(e,t){let n=da(e);if(Dg(e))return n;if(!xi(e)){let a=RA(e);for(;a&&!rd(a);){if(Zo(a)&&!AF(a))return a;a=RA(a)}return n}let o=AT(e,t);for(;o&&aT(o)&&AF(o);)o=AT(o,t);return o&&rd(o)&&AF(o)&&!HB(o)?n:o||oT(e)||n}var lde=async function(e){let t=this.getOffsetParent||dT,n=this.getDimensions,o=await n(e.floating);return{reference:dde(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function pde(e){return Vo(e).direction==="rtl"}var lT={convertOffsetParentRelativeRectToViewportRelativeRect:nde,getDocumentElement:jr,getClippingRect:cde,getOffsetParent:dT,getElementRects:lde,getClientRects:ade,getDimensions:ude,getScale:id,isElement:Zo,isRTL:pde};function pT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gde(e,t,n){let o=null,a,r=jr(e);function i(){var u;clearTimeout(a),(u=o)==null||u.disconnect(),o=null}function A(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),i();let p=e.getBoundingClientRect(),{left:g,top:m,width:h,height:y}=p;if(u||t(),!h||!y)return;let f=vg(m),b=vg(r.clientWidth-(g+h)),B=vg(r.clientHeight-(m+y)),C=vg(g),x={rootMargin:-f+"px "+-b+"px "+-B+"px "+-C+"px",threshold:Jo(0,Nr(1,l))||1},Q=!0;function R(q){let J=q[0].intersectionRatio;if(!pT(p,e.getBoundingClientRect()))return A();if(J!==l){if(!Q)return A();J?A(!1,J):a=setTimeout(()=>{A(!1,1e-7)},1e3)}Q=!1}try{o=new IntersectionObserver(R,{...x,root:r.ownerDocument})}catch{o=new IntersectionObserver(R,x)}o.observe(e)}let s=da(e),c=()=>A(n);return s.addEventListener("resize",c),A(!0),()=>{s.removeEventListener("resize",c),i()}}function cF(e,t,n,o){o===void 0&&(o={});let{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:A=typeof IntersectionObserver=="function",animationFrame:s=!1}=o,c=sF(e),u=a||r?[...c?nc(c):[],...t?nc(t):[]]:[];u.forEach(f=>{a&&f.addEventListener("scroll",n),r&&f.addEventListener("resize",n)});let l=c&&A?gde(c,n,r):null,p=-1,g=null;i&&(g=new ResizeObserver(f=>{let[b]=f;b&&b.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var B;(B=g)==null||B.observe(t)})),n()}),c&&!s&&g.observe(c),t&&g.observe(t));let m,h=s?oc(e):null;s&&y();function y(){let f=oc(e);h&&!pT(h,f)&&n(),h=f,m=requestAnimationFrame(y)}return n(),()=>{var f;u.forEach(b=>{a&&b.removeEventListener("scroll",n),r&&b.removeEventListener("resize",n)}),l?.(),(f=g)==null||f.disconnect(),g=null,s&&cancelAnimationFrame(m)}}var gT=ZU;var mT=VU,fT=KU,bT=eT,hT=JU,uF=YU;var BT=XU,dF=(e,t,n)=>{let o=new Map,a=n??{},r={...lT,...a.platform,_c:o};return zU(e,t,{...a,platform:r})};var ln=w(Y(),1),CT=w(Y(),1),wT=w(Sd(),1),mde=typeof document<"u",fde=function(){},qB=mde?CT.useLayoutEffect:fde;function zB(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!zB(e[o],t[o]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,a[o]))return!1;for(o=n;o--!==0;){let r=a[o];if(!(r==="_owner"&&e.$$typeof)&&!zB(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function ET(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yT(e,t){let n=ET(e);return Math.round(t*n)/n}function lF(e){let t=ln.useRef(e);return qB(()=>{t.current=e}),t}function kT(e){e===void 0&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:a,elements:{reference:r,floating:i}={},transform:A=!0,whileElementsMounted:s,open:c}=e,[u,l]=ln.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=ln.useState(o);zB(p,o)||g(o);let[m,h]=ln.useState(null),[y,f]=ln.useState(null),b=ln.useCallback($e=>{$e!==x.current&&(x.current=$e,h($e))},[]),B=ln.useCallback($e=>{$e!==Q.current&&(Q.current=$e,f($e))},[]),C=r||m,E=i||y,x=ln.useRef(null),Q=ln.useRef(null),R=ln.useRef(u),q=s!=null,J=lF(s),Re=lF(a),ue=lF(c),Se=ln.useCallback(()=>{if(!x.current||!Q.current)return;let $e={placement:t,strategy:n,middleware:p};Re.current&&($e.platform=Re.current),dF(x.current,Q.current,$e).then(rn=>{let Za={...rn,isPositioned:ue.current!==!1};we.current&&!zB(R.current,Za)&&(R.current=Za,wT.flushSync(()=>{l(Za)}))})},[p,t,n,Re,ue]);qB(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,l($e=>({...$e,isPositioned:!1})))},[c]);let we=ln.useRef(!1);qB(()=>(we.current=!0,()=>{we.current=!1}),[]),qB(()=>{if(C&&(x.current=C),E&&(Q.current=E),C&&E){if(J.current)return J.current(C,E,Se);Se()}},[C,E,Se,J,q]);let He=ln.useMemo(()=>({reference:x,floating:Q,setReference:b,setFloating:B}),[b,B]),wt=ln.useMemo(()=>({reference:C,floating:E}),[C,E]),la=ln.useMemo(()=>{let $e={position:n,left:0,top:0};if(!wt.floating)return $e;let rn=yT(wt.floating,u.x),Za=yT(wt.floating,u.y);return A?{...$e,transform:"translate("+rn+"px, "+Za+"px)",...ET(wt.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:rn,top:Za}},[n,A,wt.floating,u.x,u.y]);return ln.useMemo(()=>({...u,update:Se,refs:He,elements:wt,floatingStyles:la}),[u,Se,He,wt,la])}var bde=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){let{element:o,padding:a}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?uF({element:o.current,padding:a}).fn(n):{}:o?uF({element:o,padding:a}).fn(n):{}}}},QT=(e,t)=>{let n=gT(e);return{name:n.name,fn:n.fn,options:[e,t]}},IT=(e,t)=>{let n=mT(e);return{name:n.name,fn:n.fn,options:[e,t]}},_T=(e,t)=>({fn:BT(e).fn,options:[e,t]}),vT=(e,t)=>{let n=fT(e);return{name:n.name,fn:n.fn,options:[e,t]}},xT=(e,t)=>{let n=bT(e);return{name:n.name,fn:n.fn,options:[e,t]}};var DT=(e,t)=>{let n=hT(e);return{name:n.name,fn:n.fn,options:[e,t]}};var FT=(e,t)=>{let n=bde(e);return{name:n.name,fn:n.fn,options:[e,t]}};var MT=w(Y(),1),jT=w(Sd(),1);var jn=w(Y(),1);var hde=Object.defineProperty,Xo=(e,t)=>hde(e,"name",{value:t,configurable:!0});function gF(e){let t=jn.forwardRef((n,o)=>{let{children:a,...r}=n,i=null,A=!1,s=[];pF(a)&&typeof YB=="function"&&(a=YB(a._payload)),jn.Children.forEach(a,p=>{if(NT(p)){A=!0;let g=p,m="child"in g.props?g.props.child:g.props.children;pF(m)&&typeof YB=="function"&&(m=YB(m._payload)),i=yde(g,m),s.push(i?.props?.children)}else s.push(p)}),i?i=jn.cloneElement(i,void 0,s):!A&&jn.Children.count(a)===1&&jn.isValidElement(a)&&(i=a);let c=i?RT(i):void 0,u=Rr(o,c);if(!i){if(a||a===0)throw new Error(A?Ede(e):wde(e));return a}let l=LT(r,i.props??{});return i.type!==jn.Fragment&&(l.ref=o?u:c),jn.cloneElement(i,l)});return t.displayName=`${e}.Slot`,t}Xo(gF,"createSlot");var ST=Symbol.for("radix.slottable");function Bde(e){let t=Xo(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=ST,t}Xo(Bde,"createSlottable");var yde=Xo((e,t)=>{if("child"in e.props){let n=e.props.child;return jn.isValidElement(n)?jn.cloneElement(n,void 0,e.props.children(n.props.children)):null}return jn.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function LT(e,t){let n={...t};for(let o in t){let a=e[o],r=t[o];/^on[A-Z]/.test(o)?a&&r?n[o]=(...A)=>{let s=r(...A);return a(...A),s}:a&&(n[o]=a):o==="style"?n[o]={...a,...r}:o==="className"&&(n[o]=[a,r].filter(Boolean).join(" "))}return{...e,...n}}Xo(LT,"mergeProps");function RT(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Xo(RT,"getElementRef");function NT(e){return jn.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ST}Xo(NT,"isSlottable");var Cde=Symbol.for("react.lazy");function pF(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Cde&&"_payload"in e&&$T(e._payload)}Xo(pF,"isLazyComponent");function $T(e){return typeof e=="object"&&e!==null&&"then"in e}Xo($T,"isPromiseLike");var wde=Xo(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Ede=Xo(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),YB=jn[" use ".trim().toString()];var PT=w(k(),1),kde=Object.defineProperty,Qde=(e,t)=>kde(e,"name",{value:t,configurable:!0}),Ide=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Di=Ide.reduce((e,t)=>{let n=gF(`Primitive.${t}`),o=MT.forwardRef((a,r)=>{let{asChild:i,...A}=a,s=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,PT.jsx)(s,{...A,ref:r})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function mF(e,t){e&&jT.flushSync(()=>e.dispatchEvent(t))}Qde(mF,"dispatchDiscreteCustomEvent");var Ad=w(Y(),1),_de=Object.defineProperty,vde=(e,t)=>_de(e,"name",{value:t,configurable:!0});function rc(e){let t=Ad.useRef(e);return Ad.useEffect(()=>{t.current=e}),Ad.useMemo(()=>((...n)=>t.current?.(...n)),[])}vde(rc,"useCallbackRef");var GT=w(Y(),1);var xde=Object.defineProperty,Dde=(e,t)=>xde(e,"name",{value:t,configurable:!0});function fF(e){let[t,n]=GT.useState(void 0);return ua(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let o=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;let r=a[0],i,A;if("borderBoxSize"in r){let s=r.borderBoxSize,c=Array.isArray(s)?s[0]:s;i=c.inlineSize,A=c.blockSize}else i=e.offsetWidth,A=e.offsetHeight;n({width:i,height:A})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}Dde(fF,"useSize");var sd=w(k(),1),Fde=Object.defineProperty,NA=(e,t)=>Fde(e,"name",{value:t,configurable:!0});var HT="Popper",[UT,bF]=kg(HT),[Sde,TT]=UT(HT),Lde=NA(e=>{let{__scopePopper:t,children:n}=e,[o,a]=Wn.useState(null),[r,i]=Wn.useState(void 0);return(0,sd.jsx)(Sde,{scope:t,anchor:o,onAnchorChange:a,placementState:r,setPlacementState:i,children:n})},"Popper"),Rde="PopperAnchor",Nde=Wn.forwardRef(NA(function(t,n){let{__scopePopper:o,virtualRef:a,...r}=t,i=TT(Rde,o),A=Wn.useRef(null),s=i.onAnchorChange,c=Wn.useCallback(h=>{A.current=h,h&&s(h)},[s]),u=Rr(n,c),l=Wn.useRef(null);Wn.useEffect(()=>{if(!a)return;let h=l.current;l.current=a.current,h!==l.current&&s(l.current)});let p=i.placementState&&KB(i.placementState),g=p?.[0],m=p?.[1];return a?null:(0,sd.jsx)(Di.div,{"data-radix-popper-side":g,"data-radix-popper-align":m,...r,ref:u})},"PopperAnchor")),OT="PopperContent",[$de,n6e]=UT(OT),Mde=Wn.forwardRef(NA(function(t,n){let{__scopePopper:o,side:a="bottom",sideOffset:r=0,align:i="center",alignOffset:A=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:l=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:h,...y}=t,f=TT(OT,o),[b,B]=Wn.useState(null),C=Rr(n,B),[E,x]=Wn.useState(null),Q=fF(E),R=Q?.width??0,q=Q?.height??0,J=a+(i!=="center"?"-"+i:""),Re=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},ue=Array.isArray(u)?u:[u],Se=ue.length>0,we={padding:Re,boundary:ue.filter(qT),altBoundary:Se},{refs:He,floatingStyles:wt,placement:la,isPositioned:$e,middlewareData:rn}=kT({strategy:"fixed",placement:J,whileElementsMounted:NA((...Ry)=>cF(...Ry,{animationFrame:m==="always"}),"whileElementsMounted"),elements:{reference:f.anchor},middleware:[QT({mainAxis:r+q,alignmentAxis:A}),c&&IT({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?_T():void 0,...we}),c&&vT({...we}),xT({...we,apply:NA(({elements:Ry,rects:c8,availableWidth:Hz,availableHeight:Uz})=>{let{width:Tz,height:Oz}=c8.reference,qg=Ry.floating.style;qg.setProperty("--radix-popper-available-width",`${Hz}px`),qg.setProperty("--radix-popper-available-height",`${Uz}px`),qg.setProperty("--radix-popper-anchor-width",`${Tz}px`),qg.setProperty("--radix-popper-anchor-height",`${Oz}px`)},"apply")}),E&&FT({element:E,padding:s}),jde({arrowWidth:R,arrowHeight:q}),g&&DT({strategy:"referenceHidden",...we,boundary:Se?we.boundary:void 0})]}),Za=f.setPlacementState;ua(()=>(Za(la),()=>{Za(void 0)}),[la,Za]);let[i8,A8]=KB(la),s8=rc(h);ua(()=>{$e&&s8?.()},[$e,s8]);let $z=rn.arrow?.x,Mz=rn.arrow?.y,jz=rn.arrow?.centerOffset!==0,[Pz,Gz]=Wn.useState();return ua(()=>{b&&Gz(window.getComputedStyle(b).zIndex)},[b]),(0,sd.jsx)("div",{ref:He.setFloating,"data-radix-popper-content-wrapper":"",style:{...wt,transform:$e?wt.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Pz,"--radix-popper-transform-origin":[rn.transformOrigin?.x,rn.transformOrigin?.y].join(" "),...rn.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,sd.jsx)($de,{scope:o,placedSide:i8,placedAlign:A8,onArrowChange:x,arrowX:$z,arrowY:Mz,shouldHideArrow:jz,children:(0,sd.jsx)(Di.div,{"data-side":i8,"data-align":A8,...y,ref:C,style:{...y.style,animation:$e?y.style?.animation:"none"}})})})},"PopperContent"));function qT(e){return e!==null}NA(qT,"isNotNull");var jde=NA(e=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:o,middlewareData:a}=t,i=a.arrow?.centerOffset!==0,A=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[c,u]=KB(n),l={start:"0%",center:"50%",end:"100%"}[u],p=(a.arrow?.x??0)+A/2,g=(a.arrow?.y??0)+s/2,m="",h="";return c==="bottom"?(m=i?l:`${p}px`,h=`${-s}px`):c==="top"?(m=i?l:`${p}px`,h=`${o.floating.height+s}px`):c==="right"?(m=`${-s}px`,h=i?l:`${g}px`):c==="left"&&(m=`${o.floating.width+s}px`,h=i?l:`${g}px`),{data:{x:m,y:h}}}}),"transformOrigin");function KB(e){let[t,n="center"]=e.split("-");return[t,n]}NA(KB,"getSideAndAlignFromPlacement");var zT=Lde,YT=Nde,KT=Mde;var JB=w(Y(),1),JT=w(Sd(),1);var WT=w(k(),1),Gde=Object.defineProperty,Hde=(e,t)=>Gde(e,"name",{value:t,configurable:!0}),ZT=JB.forwardRef(Hde(function(t,n){let{container:o,...a}=t,[r,i]=JB.useState(!1);ua(()=>i(!0),[]);let A=o||r&&globalThis?.document?.body;return A?JT.createPortal((0,WT.jsx)(Di.div,{...a,ref:n}),A):null},"Portal"));var Pn=w(Y(),1);var VT=w(Y(),1),Ude=Object.defineProperty,Fi=(e,t)=>Ude(e,"name",{value:t,configurable:!0});function XT(e,t){return VT.useReducer((n,o)=>t[n][o]??n,e)}Fi(XT,"useStateMachine");var BF=Fi(e=>{let{present:t,children:n}=e,o=eO(t),a=typeof n=="function"?n({present:o.isPresent}):Pn.Children.only(n),r=tO(o.ref,nO(a));return typeof n=="function"||o.isPresent?Pn.cloneElement(a,{ref:r}):null},"Presence");function eO(e){let[t,n]=Pn.useState(),o=Pn.useRef(null),a=Pn.useRef(e),r=Pn.useRef("none"),i=Pn.useRef(void 0),A=e?"mounted":"unmounted",[s,c]=XT(A,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Pn.useEffect(()=>{s==="mounted"?(r.current=i.current??cd(o.current),i.current=void 0):r.current="none"},[s]),ua(()=>{let u=o.current,l=a.current;if(l!==e){let g=r.current,m=cd(u);e?(i.current=m,c("MOUNT")):m==="none"||u?.display==="none"?c("UNMOUNT"):c(l&&g!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),ua(()=>{if(t){let u,l=t.ownerDocument.defaultView??window,p=Fi(m=>{let y=cd(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&y&&(c("ANIMATION_END"),!a.current)){let f=t.style.animationFillMode;t.style.animationFillMode="forwards",u=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=f)})}},"handleAnimationEnd"),g=Fi(m=>{m.target===t&&(r.current=cd(o.current))},"handleAnimationStart");return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{l.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Pn.useCallback(u=>{if(u){let l=getComputedStyle(u);o.current=l,i.current=cd(l)}else o.current=null;n(u)},[])}}Fi(eO,"usePresence");function hF(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Fi(hF,"setRef");function tO(...e){let t=Pn.useRef(e);return t.current=e,Pn.useCallback(n=>{let o=t.current,a=!1,r=o.map(i=>{let A=hF(i,n);return!a&&typeof A=="function"&&(a=!0),A});if(a)return()=>{for(let i=0;i<r.length;i++){let A=r[i];typeof A=="function"?A():hF(o[i],null)}}},[])}Fi(tO,"useStableComposedRefs");function cd(e){return e?.animationName||"none"}Fi(cd,"getAnimationName");function nO(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Fi(nO,"getElementRef");var tt=w(Y(),1);var oO=w(k(),1),Tde=Object.defineProperty,_n=(e,t)=>Tde(e,"name",{value:t,configurable:!0}),yF="dismissableLayer.update",Ode="dismissableLayer.pointerDownOutside",qde="dismissableLayer.focusOutside",aO,rO=tt.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),iO=tt.forwardRef(_n(function(t,n){let{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:A,onInteractOutside:s,onDismiss:c,...u}=t,l=tt.useContext(rO),[p,g]=tt.useState(null),m=p?.ownerDocument??globalThis?.document,[,h]=tt.useState({}),y=Rr(n,g),f=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),B=b?f.indexOf(b):-1,C=p?f.indexOf(p):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,x=C>=B,Q=tt.useRef(!1),R=AO(ue=>{i?.(ue),s?.(ue),ue.defaultPrevented||c?.()},{ownerDocument:m,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:Q,dismissableSurfaces:l.dismissableSurfaces,shouldHandlePointerDownOutside:tt.useCallback(ue=>{if(!(ue instanceof Node))return!1;let Se=[...l.branches].some(we=>we.contains(ue));return x&&!Se},[l.branches,x])}),q=sO(ue=>{if(a&&Q.current)return;let Se=ue.target;[...l.branches].some(He=>He.contains(Se))||(A?.(ue),s?.(ue),ue.defaultPrevented||c?.())},m),J=p?C===f.length-1:!1,Re=rc(ue=>{ue.key==="Escape"&&(r?.(ue),!ue.defaultPrevented&&c&&(ue.preventDefault(),c()))});return tt.useEffect(()=>{if(J)return m.addEventListener("keydown",Re,{capture:!0}),()=>m.removeEventListener("keydown",Re,{capture:!0})},[m,J,Re]),tt.useEffect(()=>{if(p)return o&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(aO=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(p)),l.layers.add(p),CF(),()=>{o&&(l.layersWithOutsidePointerEventsDisabled.delete(p),l.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=aO))}},[p,m,o,l]),tt.useEffect(()=>()=>{p&&(l.layers.delete(p),l.layersWithOutsidePointerEventsDisabled.delete(p),CF())},[p,l]),tt.useEffect(()=>{let ue=_n(()=>h({}),"handleUpdate");return document.addEventListener(yF,ue),()=>document.removeEventListener(yF,ue)},[]),(0,oO.jsx)(Di.div,{...u,ref:y,style:{pointerEvents:E?x?"auto":"none":void 0,...t.style},onFocusCapture:ca(t.onFocusCapture,q.onFocusCapture),onBlurCapture:ca(t.onBlurCapture,q.onBlurCapture),onPointerDownCapture:ca(t.onPointerDownCapture,R.onPointerDownCapture)})},"DismissableLayer"));function zde(){let e=tt.useContext(rO),[t,n]=tt.useState(null);return tt.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}_n(zde,"useDismissableLayerSurface");var Yde=_n(()=>!0,"IS_TRUE");function AO(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:r,shouldHandlePointerDownOutside:i=Yde}=t,A=rc(e),s=tt.useRef(!1),c=tt.useRef(!1),u=tt.useRef(new Map),l=tt.useRef(()=>{});return tt.useEffect(()=>{function p(){c.current=!1,a.current=!1,u.current.clear()}_n(p,"resetOutsideInteraction");function g(){return Array.from(u.current.values()).some(Boolean)}_n(g,"isOutsideInteractionIntercepted");function m(B){if(!c.current)return;let C=B.target;C instanceof Node&&[...r].some(x=>x.contains(C))||u.current.set(B.type,!0),B.type==="click"&&window.setTimeout(()=>{c.current&&l.current()},0)}_n(m,"handleInteractionCapture");function h(B){c.current&&u.current.set(B.type,!1)}_n(h,"handleInteractionBubble");let y=_n(B=>{if(B.target&&!s.current){let E=function(){n.removeEventListener("click",l.current);let Q=g();p(),Q||wF(Ode,A,x,{discrete:!0})};var C=E;if(_n(E,"handleAndDispatchPointerDownOutsideEvent"),!i(B.target)){n.removeEventListener("click",l.current),p(),s.current=!1;return}let x={originalEvent:B};c.current=!0,a.current=o&&B.button===0,u.current.clear(),!o||B.button!==0?E():(n.removeEventListener("click",l.current),l.current=E,n.addEventListener("click",l.current,{once:!0}))}else n.removeEventListener("click",l.current),p();s.current=!1},"handlePointerDown"),f=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let B of f)n.addEventListener(B,m,!0),n.addEventListener(B,h);let b=window.setTimeout(()=>{n.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(b),n.removeEventListener("pointerdown",y),n.removeEventListener("click",l.current);for(let B of f)n.removeEventListener(B,m,!0),n.removeEventListener(B,h)}},[n,A,o,a,r,i]),{onPointerDownCapture:_n(()=>s.current=!0,"onPointerDownCapture")}}_n(AO,"usePointerDownOutside");function sO(e,t=globalThis?.document){let n=rc(e),o=tt.useRef(!1);return tt.useEffect(()=>{let a=_n(r=>{r.target&&!o.current&&wF(qde,n,{originalEvent:r},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:_n(()=>o.current=!0,"onFocusCapture"),onBlurCapture:_n(()=>o.current=!1,"onBlurCapture")}}_n(sO,"useFocusOutside");function CF(){let e=new CustomEvent(yF);document.dispatchEvent(e)}_n(CF,"dispatchUpdate");function wF(e,t,n,{discrete:o}){let a=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),o?mF(a,r):a.dispatchEvent(r)}_n(wF,"handleAndDispatchCustomEvent");var Qo=w(k(),1),Kde=Object.defineProperty,Si=(e,t)=>Kde(e,"name",{value:t,configurable:!0}),EF,QF="HoverCard",[cO,E6e]=kg(QF,[bF]),IF=bF(),[Jde,WB]=cO(QF),Wde=Si(e=>{let{__scopeHoverCard:t,children:n,open:o,defaultOpen:a,onOpenChange:r,openDelay:i=700,closeDelay:A=300}=e,s=IF(t),c=nn.useRef(0),u=nn.useRef(0),l=nn.useRef(!1),p=nn.useRef(!1),[g,m]=tF({prop:o,defaultProp:a??!1,onChange:r,caller:QF}),h=nn.useCallback(()=>{clearTimeout(u.current),c.current=window.setTimeout(()=>m(!0),i)},[i,m]),y=nn.useCallback(()=>{clearTimeout(c.current),!l.current&&!p.current&&(u.current=window.setTimeout(()=>m(!1),A))},[A,m]),f=nn.useCallback(()=>m(!1),[m]);return nn.useEffect(()=>()=>{clearTimeout(c.current),clearTimeout(u.current)},[]),(0,Qo.jsx)(Jde,{scope:t,open:g,onOpenChange:m,onOpen:h,onClose:y,onDismiss:f,hasSelectionRef:l,isPointerDownOnContentRef:p,children:(0,Qo.jsx)(zT,{...s,children:n})})},"HoverCard"),Zde="HoverCardTrigger",Vde=nn.forwardRef(Si(function(t,n){let{__scopeHoverCard:o,...a}=t,r=WB(Zde,o),i=IF(o);return(0,Qo.jsx)(YT,{asChild:!0,...i,children:(0,Qo.jsx)(Di.a,{"data-state":r.open?"open":"closed",...a,ref:n,onPointerEnter:ca(t.onPointerEnter,Sg(r.onOpen)),onPointerLeave:ca(t.onPointerLeave,Sg(r.onClose)),onFocus:ca(t.onFocus,r.onOpen),onBlur:ca(t.onBlur,r.onClose),onTouchStart:ca(t.onTouchStart,A=>A.preventDefault())})})},"HoverCardTrigger")),uO="HoverCardPortal",[Xde,ele]=cO(uO,{forceMount:void 0}),tle=Si(e=>{let{__scopeHoverCard:t,forceMount:n,children:o,container:a}=e,r=WB(uO,t);return(0,Qo.jsx)(Xde,{scope:t,forceMount:n,children:(0,Qo.jsx)(BF,{present:n||r.open,children:(0,Qo.jsx)(ZT,{asChild:!0,container:a,children:o})})})},"HoverCardPortal"),kF="HoverCardContent",nle=nn.forwardRef(Si(function(t,n){let o=ele(kF,t.__scopeHoverCard),{forceMount:a=o.forceMount,...r}=t,i=WB(kF,t.__scopeHoverCard);return(0,Qo.jsx)(BF,{present:a||i.open,children:(0,Qo.jsx)(ale,{"data-state":i.open?"open":"closed",...r,onPointerEnter:ca(t.onPointerEnter,Sg(i.onOpen)),onPointerLeave:ca(t.onPointerLeave,Sg(i.onClose)),ref:n})})},"HoverCardContent")),ale=nn.forwardRef(Si(function(t,n){let{__scopeHoverCard:o,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:A,...s}=t,c=WB(kF,o),u=IF(o),l=nn.useRef(null),p=Rr(n,l),[g,m]=nn.useState(!1);return nn.useEffect(()=>{if(g){let h=document.body;return EF=h.style.userSelect||h.style.webkitUserSelect,h.style.userSelect="none",h.style.webkitUserSelect="none",()=>{h.style.userSelect=EF,h.style.webkitUserSelect=EF}}},[g]),nn.useEffect(()=>{if(l.current){let h=Si(()=>{m(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(c.hasSelectionRef.current=!0)})},"handlePointerUp");return document.addEventListener("pointerup",h),()=>{document.removeEventListener("pointerup",h),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),nn.useEffect(()=>{l.current&&dO(l.current).forEach(y=>y.setAttribute("tabindex","-1"))}),(0,Qo.jsx)(iO,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:A,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:ca(i,h=>{h.preventDefault()}),onDismiss:c.onDismiss,children:(0,Qo.jsx)(KT,{...u,...s,onPointerDown:ca(s.onPointerDown,h=>{h.currentTarget.contains(h.target)&&m(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:p,style:{...s.style,userSelect:g?"text":void 0,WebkitUserSelect:g?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})},"HoverCardContentImpl"));function Sg(e){return t=>t.pointerType==="touch"?void 0:e()}Si(Sg,"excludeTouch");function dO(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Si(o=>o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}Si(dO,"getTabbableNodes");var lO=Wde,pO=Vde,gO=tle,mO=nle;var Pr=w(Y(),1);var $A=w(k(),1),rle=8,ile=10,_F=150,Ale=new Set(["circle","ellipse","g","line","path","polygon","polyline","rect","svg","text"]);function sle(e){return typeof e.type=="string"&&Ale.has(e.type)}function gt({align:e="center",children:t,className:n,content:o,label:a,placement:r="above",triggerClassName:i}){let A=(0,Pr.useId)(),s=(0,Pr.useRef)(null),c=(0,Pr.useRef)(null),u=(0,Pr.useRef)(0),[l,p]=(0,Pr.useState)(!1),g=sle(t);(0,Pr.useEffect)(()=>{if(!l)return;let h=y=>{let f=s.current,b=y.target;!(b instanceof Node)||f?.contains(b)||document.getElementById(A)?.contains(b)||(u.current=performance.now()+_F+50,p(!1))};return document.addEventListener("pointerdown",h,!0),()=>{document.removeEventListener("pointerdown",h,!0)}},[l,A]);let m=(0,$A.jsxs)(lO,{closeDelay:_F,onOpenChange:h=>{h&&performance.now()<u.current||p(h)},open:l,openDelay:0,children:[(0,$A.jsx)(pO,{"aria-describedby":l?A:void 0,asChild:!0,onPointerCancel:()=>{c.current=null},onPointerDown:h=>{h.pointerType==="touch"&&(c.current=l)},onPointerUp:h=>{if(h.pointerType!=="touch"||c.current===null)return;let y=!c.current;y||(u.current=performance.now()+_F+50),p(y),c.current=null},ref:g?h=>{s.current=h}:void 0,children:t}),(0,$A.jsx)(gO,{children:(0,$A.jsxs)(mO,{align:e==="left"?"start":e==="right"?"end":"center",className:S("z-50 select-text outline-none",n??"min-w-36 max-w-64 rounded-md border border-white/15 bg-dashboard-surface-raised px-3 py-2 font-mono text-xs leading-relaxed text-dashboard-text-muted shadow-2xl shadow-black/70"),collisionPadding:rle,hideWhenDetached:!0,id:A,role:"tooltip",side:r==="above"?"top":"bottom",sideOffset:ile,children:[a?(0,$A.jsx)("div",{className:"mb-1 font-semibold uppercase tracking-[0.1em] text-dashboard-text-muted",children:a}):null,o]})})]});return g?m:(0,$A.jsx)("span",{className:S("inline-flex",i),ref:s,children:m})}var qt=w(k(),1),fO=[{color:"#67e8f9",key:"personal",label:"Personal"},{color:"#6ee7b7",key:"public",label:"Public"}];function hO(e){let[t,n]=(0,bO.useState)(30),o=e.days.slice(-t),a=xa(200),r=o.length>0?a.plotWidth/o.length:a.plotWidth,i=Math.max(2,Math.min(13,r*.68)),A=o.map(u=>u.personal+u.public),s=Math.max(1,...A),c=A.some(u=>u>0);return(0,qt.jsxs)(O,{className:"min-h-[17rem] p-4 sm:p-5",children:[(0,qt.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,qt.jsxs)("div",{children:[(0,qt.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:"Activity over time"}),(0,qt.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Stacked personal + public memories created each day."})]}),(0,qt.jsx)("div",{"aria-label":"Memory timeline range",className:"inline-flex rounded border border-white/[0.08] bg-black/20 p-0.5",children:[7,30,90].map(u=>(0,qt.jsxs)("button",{"aria-pressed":t===u,className:S("cursor-pointer rounded-sm border-0 px-2.5 py-1.5 font-mono text-xs uppercase tracking-[0.1em] transition-colors",t===u?"bg-cyan-300/10 text-cyan-100":"bg-transparent text-dashboard-text-muted hover:text-dashboard-text"),onClick:()=>n(u),type:"button",children:[u,"d"]},u))})]}),(0,qt.jsx)("div",{"aria-label":"Memory visibility legend",className:"mt-4 flex flex-wrap gap-4",children:fO.map(u=>(0,qt.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-dashboard-text-muted",children:[(0,qt.jsx)("i",{className:"size-2 rounded-sm",style:{backgroundColor:u.color}}),u.label]},u.key))}),(0,qt.jsxs)("div",{className:"relative mt-3 overflow-hidden",children:[(0,qt.jsxs)("svg",{"aria-label":`Memories learned during the last ${t} days`,className:"block h-auto min-h-40 w-full",role:"img",viewBox:`0 0 ${a.width} ${a.height}`,children:[(0,qt.jsx)(Co,{layout:a,maximum:s}),o.map((u,l)=>{let p=0,g=a.left+l*r+(r-i)/2,m=A[l]??0;return(0,qt.jsx)(gt,{content:(0,qt.jsx)(Jn,{rows:[["personal",u.personal],["public",u.public],["total",m]]}),label:Ot(u.date),children:(0,qt.jsxs)("g",{"aria-label":`${Ot(u.date)}: ${u.personal} personal, ${u.public} public, ${m} total memories`,tabIndex:0,children:[fO.map(h=>{let f=u[h.key]/s*a.plotHeight;return p+=f,(0,qt.jsx)("rect",{fill:h.color,height:f,opacity:.82,rx:"1",width:i,x:g,y:a.top+a.plotHeight-p},h.key)}),(0,qt.jsx)("rect",{fill:"transparent",height:a.plotHeight,width:Math.max(i,8),x:g-(Math.max(i,8)-i)/2,y:a.top})]})},u.date)}),(0,qt.jsx)(Da,{dates:o.map(u=>u.date),layout:a,xPosition:u=>a.left+u*r+r/2})]}),c?null:(0,qt.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center pt-12 font-mono text-xs text-dashboard-text-muted",children:"No memories were learned in this period."})]})]})}var BO=w(Y(),1);var st=w(k(),1);function yO(e){let[t,n]=(0,BO.useState)(30),o=new Map(e.recallDays.map(h=>[h.date,h])),a=e.extractionDays.slice(-t).map(h=>({date:h.date,extraction:h,recall:o.get(h.date)??{costUsd:0,date:h.date,events:0}})),r=a.reduce((h,y)=>h+y.extraction.costUsd,0),i=a.reduce((h,y)=>h+y.recall.costUsd,0),A=r+i,s=a.reduce((h,y)=>h+y.extraction.events+y.recall.events,0),c=Math.max(.01,...a.map(h=>h.extraction.costUsd+h.recall.costUsd)),u=xa(200),l=64,p=u.width-l-u.right,g=a.length>0?p/a.length:p,m=Math.max(2,Math.min(13,g*.68));return(0,st.jsxs)(O,{className:"min-h-[17rem] p-4 sm:p-5",children:[(0,st.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,st.jsxs)("div",{children:[(0,st.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:Qt({total:A})}),(0,st.jsxs)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:["System-wide estimate across ",Lg(s)," spanning extraction and recall."]}),(0,st.jsxs)("div",{className:"mt-2 flex flex-wrap gap-x-4 gap-y-1 font-mono text-xs text-dashboard-text-muted",children:[(0,st.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,st.jsx)("span",{"aria-hidden":"true",className:"h-2 w-2 rounded-[1px] bg-cyan-300"}),"Extraction ",Qt({total:r})]}),(0,st.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,st.jsx)("span",{"aria-hidden":"true",className:"h-2 w-2 rounded-[1px] bg-fuchsia-400"}),"Recall ",Qt({total:i})]})]})]}),(0,st.jsx)("div",{"aria-label":"Memory cost range",className:"inline-flex rounded border border-white/[0.08] bg-black/20 p-0.5",children:[7,30,90].map(h=>(0,st.jsxs)("button",{"aria-pressed":t===h,className:S("cursor-pointer rounded-sm border-0 px-2.5 py-1.5 font-mono text-xs uppercase tracking-[0.1em] transition-colors",t===h?"bg-cyan-300/10 text-cyan-100":"bg-transparent text-dashboard-text-muted hover:text-dashboard-text"),onClick:()=>n(h),type:"button",children:[h,"d"]},h))})]}),(0,st.jsxs)("div",{className:"relative mt-4 overflow-hidden",children:[(0,st.jsxs)("svg",{"aria-label":`Memory extraction and recall cost during the last ${t} days`,className:"block h-auto min-h-40 w-full",role:"img",viewBox:`0 0 ${u.width} ${u.height}`,children:[[c,c/2,0].map((h,y)=>{let f=u.top+y*(u.plotHeight/2);return(0,st.jsxs)("g",{children:[(0,st.jsx)("line",{stroke:"rgba(255,255,255,0.07)",strokeDasharray:"3 5",x1:l,x2:u.width-u.right,y1:f,y2:f}),(0,st.jsx)("text",{fill:"rgba(255,255,255,0.34)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:"end",x:l-7,y:f+3,children:Qt({total:h})})]},y)}),a.map((h,y)=>{let f=h.extraction.costUsd/c*u.plotHeight,b=h.recall.costUsd/c*u.plotHeight,B=l+y*g+(g-m)/2,C=h.extraction.costUsd+h.recall.costUsd;return(0,st.jsx)(gt,{content:(0,st.jsx)(Jn,{rows:[["extraction",`${Qt({total:h.extraction.costUsd})} \xB7 ${Lg(h.extraction.events)}`],["recall",`${Qt({total:h.recall.costUsd})} \xB7 ${Lg(h.recall.events)}`],["total",Qt({total:C})]]}),label:Ot(h.date),children:(0,st.jsxs)("g",{"aria-label":`${Ot(h.date)}: extraction ${Qt({total:h.extraction.costUsd})}, ${Lg(h.extraction.events)}; recall ${Qt({total:h.recall.costUsd})}, ${Lg(h.recall.events)}`,tabIndex:0,children:[(0,st.jsx)("rect",{fill:"#67e8f9",height:f,opacity:h.extraction.costUsd>0?.82:.1,rx:"1",width:m,x:B,y:u.top+u.plotHeight-f}),(0,st.jsx)("rect",{fill:"#e879f9",height:b,opacity:h.recall.costUsd>0?.82:.1,rx:"1",width:m,x:B,y:u.top+u.plotHeight-f-b}),(0,st.jsx)("rect",{fill:"transparent",height:u.plotHeight,width:Math.max(m,8),x:B-(Math.max(m,8)-m)/2,y:u.top})]})},h.date)}),(0,st.jsx)(Da,{dates:a.map(h=>h.date),layout:{...u,left:l},xPosition:h=>l+h*g+g/2})]}),s===0?(0,st.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center pt-12 font-mono text-xs text-dashboard-text-muted",children:"No memory extraction or recall ran in this period."}):null]})]})}function Lg(e){return`${e.toLocaleString()} ${e===1?"run":"runs"}`}var cle=d.object({content:d.string().min(1),createdAt:d.iso.datetime(),expiresAt:d.iso.datetime().optional(),id:d.string().min(1),kind:d.enum(["preference","procedure","knowledge"]),observedAt:d.iso.datetime(),origin:d.enum(["automatic","explicit","other"]),sourcePlatform:d.enum(["local","slack"]),visibility:d.enum(["private","public"])}).strict();function vF(e){return e.charAt(0).toUpperCase()+e.slice(1)}function xF(e){return new Intl.DateTimeFormat("en-US",{dateStyle:"medium",timeStyle:"short",timeZone:"UTC"}).format(new Date(e))}function ule(e){let t=e.origin==="automatic"?"Automatic":e.origin==="explicit"?"Explicit":"Other";return{actions:e.visibility==="private"?[{confirmation:"Forget this memory?",href:`/api/plugins/memory/memories/${encodeURIComponent(e.id)}`,label:"Forget",method:"DELETE",tone:"danger"}]:[],id:e.id,metadata:[{label:"Type",value:vF(e.kind)},{label:"Learned",value:t},{label:"Source",value:vF(e.sourcePlatform)},{label:"Visibility",value:vF(e.visibility)},{label:"Remembered",value:xF(e.createdAt)},{label:"Observed",value:xF(e.observedAt)},{label:"Expires",value:e.expiresAt?xF(e.expiresAt):"Never"}],title:e.content}}function CO(e){return ct({enabled:!!e,queryFn:async({signal:t})=>ule(await rt(cle,`/api/plugins/memory/memories/${encodeURIComponent(e)}`,t)),queryKey:["dashboard","plugin-user-page","memory","record",e],retry:!1})}var $=w(k(),1);function kO(e){let t=lt(),{memoryId:n}=qn(),o="/memories",a=`${o}/library`,r=t.pathname===o,i=t.pathname===a||!!n;if(!r&&!i)return(0,$.jsx)(Dt,{replace:!0,to:o});let A=Fr(a,t.search),s=({isActive:c})=>S("relative px-1 py-3 font-mono text-xs uppercase tracking-[0.12em] no-underline after:absolute after:inset-x-0 after:bottom-0 after:h-px",c?"text-cyan-100 after:bg-cyan-300":"text-dashboard-text-muted after:bg-transparent hover:text-dashboard-text");return(0,$.jsxs)("div",{className:S(Ft,"grid content-start gap-6 px-4 py-6 sm:gap-8 sm:px-6 sm:py-8 md:px-8"),children:[(0,$.jsx)(St,{description:e.page.description,title:e.page.label}),(0,$.jsxs)("nav",{"aria-label":"Memory navigation",className:"flex gap-6 border-b border-white/[0.06]",children:[(0,$.jsx)(wa,{className:s,end:!0,to:o,children:"Overview"}),(0,$.jsx)(wa,{className:s,to:A,children:"Memories"})]}),r?(0,$.jsx)(dle,{}):(0,$.jsx)(lle,{libraryPath:a,page:e.page})]})}function dle(){let e=q1();return e.error?(0,$.jsxs)(O,{className:"flex items-center gap-3 border-rose-300/20 p-5 text-sm text-rose-200",children:[(0,$.jsx)(Po,{"aria-hidden":"true",size:18}),"Memory history is temporarily unavailable."]}):e.data?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("section",{className:"grid gap-4 xl:grid-cols-2",children:[(0,$.jsx)(hO,{days:e.data.days}),(0,$.jsx)(yO,{extractionDays:e.data.extractionDays,recallDays:e.data.recallDays})]}),(0,$.jsx)(mle,{data:e.data}),(0,$.jsxs)("section",{className:"grid gap-4 md:grid-cols-2",children:[(0,$.jsx)(fle,{data:e.data}),(0,$.jsx)(ble,{data:e.data})]})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(O,{className:"min-h-64 animate-pulse",children:(0,$.jsx)("span",{className:"sr-only",children:"Loading memory history"})}),(0,$.jsx)("div",{className:"h-24 animate-pulse border-y border-white/[0.06]",children:(0,$.jsx)("span",{className:"sr-only",children:"Loading memory summary"})})]})}function lle(e){let{action:t,content:n,filter:o,query:a,records:r,runAction:i,searchQuery:A,searchText:s,setFilter:c,setSearchText:u}=FB(e.page),l=q1(),p=lo(),g=lt(),{memoryId:m}=qn(),h=CO(m),y=h.data??r.find(b=>b.id===m),f=b=>Fr(b,g.search);return(0,EO.useEffect)(()=>{!m||y||h.isFetching||h.isPending||(h.isError||h.isFetched)&&p(Fr(e.libraryPath,g.search),{replace:!0})},[g.search,m,h.isError,h.isFetched,h.isFetching,h.isPending,p,e.libraryPath,y]),!a.data&&!a.error?(0,$.jsx)(Qe,{label:"Loading memories"}):(0,$.jsxs)("section",{className:"grid gap-4","aria-labelledby":"memory-library-title",children:[(0,$.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[(0,$.jsx)("div",{children:(0,$.jsx)("h2",{className:"m-0 font-display text-xl font-medium tracking-[-0.02em] text-dashboard-text",id:"memory-library-title",children:A?"Search results":"What Junior remembers"})}),n?.searchPlaceholder?(0,$.jsxs)("label",{className:"relative w-full max-w-md sm:w-auto",children:[(0,$.jsx)("span",{className:"sr-only",children:n.searchPlaceholder}),(0,$.jsx)(yi,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-dashboard-text-muted",size:15}),(0,$.jsx)("input",{className:"h-10 w-full min-w-0 rounded border border-white/10 bg-black/20 pr-3 pl-9 font-mono text-xs text-dashboard-text outline-none transition-colors placeholder:text-dashboard-text-muted/70 focus:border-cyan-300/35",onChange:b=>u(b.target.value),placeholder:n.searchPlaceholder,type:"search",value:s})]}):null]}),(0,$.jsx)(gle,{activeFilter:o,onSelect:c,stats:l.data?.stats}),a.error?(0,$.jsxs)(O,{className:"flex items-center gap-3 border-rose-300/20 p-5 text-sm text-rose-200",children:[(0,$.jsx)(Po,{"aria-hidden":"true",size:18}),a.error.message]}):r.length===0?(0,$.jsx)(O,{className:"grid min-h-56 place-items-center p-8 text-center",children:(0,$.jsxs)("div",{children:[(0,$.jsx)(IA,{"aria-hidden":"true",className:"mx-auto text-dashboard-text-muted",size:26}),(0,$.jsx)("p",{className:"mt-4 mb-0 text-sm text-dashboard-text-muted",children:n?.emptyText??"No memories yet."})]})}):(0,$.jsxs)("div",{className:"grid gap-3",children:[(0,$.jsxs)(O,{padding:"none",children:[(0,$.jsx)(ple,{}),r.map((b,B)=>(0,$.jsx)(hle,{first:B===0,onSelect:()=>p(f(m===b.id?e.libraryPath:`/memories/${encodeURIComponent(b.id)}`)),record:b,selected:b.id===m},b.id))]}),!a.isPlaceholderData&&a.hasNextPage?(0,$.jsx)(pt,{className:"mt-2 justify-self-center",disabled:a.isFetchingNextPage,onClick:()=>{a.fetchNextPage()},children:a.isFetchingNextPage?"Loading\u2026":"Load more"}):null,t.error?(0,$.jsx)("p",{className:"m-0 text-center text-sm text-rose-300",children:"Could not complete this action. Try again."}):null]}),(0,$.jsx)(EU,{action:t,onAction:i,onClose:()=>p(f(e.libraryPath)),record:y})]})}function ple(){return(0,$.jsxs)("div",{"aria-hidden":"true",className:"hidden grid-cols-[minmax(0,1fr)_7rem_7rem_9rem_auto] items-center gap-3 border-b border-white/[0.07] px-4 py-2.5 text-left font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted sm:grid",children:[(0,$.jsx)("span",{children:"Memory"}),(0,$.jsx)("span",{children:"Visibility"}),(0,$.jsx)("span",{children:"Type"}),(0,$.jsx)("span",{children:"Learned"}),(0,$.jsx)("span",{"aria-hidden":"true",className:"size-4"})]})}function gle(e){let t=[{count:e.stats?.active,filter:"",label:"All"},{count:e.stats?.personal,filter:"private",label:"Private"},{count:e.stats?.public,filter:"public",label:"Public"}];return(0,$.jsx)("div",{"aria-label":"Memory collections",className:"grid min-w-0 grid-cols-3 gap-1 border-b border-white/[0.06] sm:flex sm:overflow-x-auto",role:"tablist",children:t.map(n=>{let o=e.activeFilter===n.filter;return(0,$.jsxs)("button",{"aria-selected":o,className:S("relative flex min-w-0 cursor-pointer items-center justify-between gap-2 border-0 bg-transparent px-3 py-2.5 font-mono text-xs uppercase tracking-[0.1em] transition-colors after:absolute after:inset-x-2 after:bottom-0 after:h-px sm:shrink-0 sm:justify-start",o?"text-cyan-100 after:bg-cyan-300":"text-dashboard-text-muted after:bg-transparent hover:text-dashboard-text"),onClick:()=>e.onSelect(n.filter),role:"tab",type:"button",children:[n.label,n.count!==void 0?(0,$.jsx)("span",{className:S("rounded-sm border px-1.5 py-0.5 text-xs",o?"border-cyan-300/20 bg-cyan-300/10 text-cyan-100":"border-white/[0.07] bg-white/[0.025] text-dashboard-text-muted"),children:n.count.toLocaleString("en-US")}):null]},n.filter||"all")})})}function mle(e){let{stats:t}=e.data,n=[{detail:"personal + public",label:"Total active",value:t.active.toLocaleString("en-US")},{detail:"private to you",label:"Personal",value:t.personal.toLocaleString("en-US")},{detail:"workspace shareable",label:"Public",tone:"text-cyan-100",value:t.public.toLocaleString("en-US")},{detail:"in the last 30 days",label:"Added \xB7 30d",value:`+${t.createdThirtyDays.toLocaleString("en-US")}`}];return(0,$.jsx)("section",{"aria-label":"Memory summary",className:"grid grid-cols-2 gap-px border-y border-white/[0.06] bg-white/[0.06] lg:grid-cols-4",children:n.map(o=>(0,$.jsxs)("div",{className:"bg-[#050507] px-4 py-4 sm:px-5",children:[(0,$.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:o.label}),(0,$.jsx)("div",{className:S("mt-2 font-display text-3xl font-light tracking-[-0.04em] text-dashboard-text",o.tone),children:o.value}),(0,$.jsx)("div",{className:"mt-1 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:o.detail})]},o.label))})}function fle(e){let{stats:t}=e.data;return(0,$.jsxs)(O,{className:"p-5 sm:p-6",children:[(0,$.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:"What Junior remembers"}),(0,$.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Across personal and public scopes."}),(0,$.jsxs)("div",{className:"mt-5 grid gap-px overflow-hidden rounded border border-white/[0.06] bg-white/[0.055]",children:[(0,$.jsx)(ud,{detail:"Almost entirely personal",icon:_a,label:"Preferences",value:t.preference}),(0,$.jsx)(ud,{detail:"How work should get done",icon:IA,label:"Procedures",value:t.procedure}),(0,$.jsx)(ud,{detail:"Facts and durable context",icon:bi,label:"Knowledge",value:t.knowledge})]})]})}function ble(e){let{stats:t}=e.data,n=Math.max(0,t.active-t.automatic-t.explicit);return(0,$.jsxs)(O,{className:"p-5 sm:p-6",children:[(0,$.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:"How they got here"}),(0,$.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Same totals, split by how they were written."}),(0,$.jsxs)("div",{className:"mt-5 grid gap-px overflow-hidden rounded border border-white/[0.06] bg-white/[0.055]",children:[(0,$.jsx)(ud,{detail:"Passive extraction after runs",icon:Yn,label:"Learned by Junior",value:t.automatic}),(0,$.jsx)(ud,{detail:"Someone asked to remember it",icon:kp,label:"Saved explicitly",value:t.explicit}),(0,$.jsx)(ud,{detail:"Before origin tracking",icon:bi,label:"Older records",value:n})]})]})}function ud(e){let t=e.icon;return(0,$.jsxs)("div",{className:"flex items-center gap-3 bg-[#09090b] px-3 py-3",children:[(0,$.jsx)("div",{className:"grid size-9 shrink-0 place-items-center rounded border border-white/[0.07] bg-white/[0.025] text-dashboard-text-muted",children:(0,$.jsx)(t,{"aria-hidden":"true",size:15})}),(0,$.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,$.jsx)("div",{className:"font-display text-base font-medium text-dashboard-text",children:e.label}),(0,$.jsx)("div",{className:"mt-0.5 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.detail})]}),(0,$.jsx)("div",{className:"font-display text-2xl font-light text-dashboard-text",children:e.value.toLocaleString("en-US")})]})}function hle(e){let t=ZB(e.record,"Type"),n=ZB(e.record,"Remembered"),o=ZB(e.record,"Source"),a=ZB(e.record,"Visibility"),r=a==="Public";return(0,$.jsx)(xB,{className:S("flex items-stretch",!e.first&&"border-t border-white/[0.055]"),onSelect:e.onSelect,selected:e.selected,children:(0,$.jsxs)("button",{"aria-expanded":e.selected,"aria-label":`View memory details: ${e.record.title}`,className:"grid min-w-0 flex-1 cursor-pointer grid-cols-[minmax(0,1fr)_auto] items-center gap-3 border-0 bg-transparent px-4 py-3 text-left sm:grid-cols-[minmax(0,1fr)_7rem_7rem_9rem_auto]",onClick:e.onSelect,type:"button",children:[(0,$.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,$.jsx)("div",{className:S("grid size-8 shrink-0 place-items-center rounded border",e.selected?"border-cyan-300/20 bg-cyan-300/10 text-cyan-100":"border-white/10 bg-white/[0.025] text-dashboard-text-muted"),children:(0,$.jsx)(bi,{"aria-hidden":"true",size:15})}),(0,$.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,$.jsx)("h3",{className:"m-0 truncate font-display text-base font-medium leading-snug text-dashboard-text",children:e.record.title}),(0,$.jsxs)("div",{className:"mt-1.5 flex min-w-0 items-center gap-x-2 font-mono text-xs text-dashboard-text-muted",children:[(0,$.jsxs)("span",{className:"truncate",children:["Source: ",o]}),(0,$.jsx)("span",{"aria-hidden":"true",className:"text-dashboard-text-muted opacity-30 sm:hidden",children:"\xB7"}),(0,$.jsxs)("span",{className:"truncate sm:hidden",children:[t," \xB7 ",a," \xB7 ",wO(n)]})]})]})]}),(0,$.jsxs)("span",{className:S("hidden items-center gap-1.5 rounded border px-2 py-1 font-mono text-2xs uppercase tracking-[0.08em] sm:inline-flex",r?"border-emerald-300/20 bg-emerald-300/[0.07] text-emerald-100":"border-white/[0.08] bg-white/[0.025] text-dashboard-text-muted"),children:[r?(0,$.jsx)(go,{"aria-hidden":"true",size:11}):(0,$.jsx)(Bi,{"aria-hidden":"true",size:11}),a]}),(0,$.jsx)("span",{className:S("hidden w-fit rounded border px-2 py-1 font-mono text-2xs uppercase tracking-[0.08em] sm:block",Ble(t)),children:t}),(0,$.jsx)("span",{className:"hidden truncate font-mono text-xs text-dashboard-text sm:block",children:wO(n)}),(0,$.jsx)(hi,{"aria-hidden":"true",className:S("shrink-0 transition-transform",e.selected?"translate-x-0.5 text-cyan-200":"text-dashboard-text-muted group-hover:text-dashboard-text"),size:16})]})})}function ZB(e,t){return e.metadata?.find(n=>n.label===t)?.value??"\u2014"}function wO(e){return e.split(",").slice(0,2).join(",")}function Ble(e){return e==="Preference"?"border-cyan-300/20 bg-cyan-300/[0.07] text-cyan-100":e==="Procedure"?"border-amber-300/20 bg-amber-300/[0.07] text-amber-100":"border-violet-300/20 bg-violet-300/[0.07] text-violet-100"}var fe=w(k(),1);function VB(e,t){return e==="memory"&&t==="memories"?"/memories":`/plugins/${encodeURIComponent(e)}/${encodeURIComponent(t)}`}function DF(e){let t=e.pages.find(n=>n.pluginName==="memory"&&n.id==="memories");return t?(0,fe.jsx)(kO,{page:t}):(0,fe.jsx)(Dt,{replace:!0,to:"/"})}function QO(e){let t=lt(),{"*":n,pageId:o,pluginName:a}=qn(),r=e.pages.find(i=>i.pluginName===a&&i.id===o);if(!r)return(0,fe.jsx)(Dt,{replace:!0,to:"/"});if(r.pluginName==="memory"&&r.id==="memories"){let i=n?`/${n}`:"";return(0,fe.jsx)(Dt,{replace:!0,to:Fr(`/memories${i}`,t.search)})}return(0,fe.jsx)(yle,{page:r})}function yle(e){let{action:t,content:n,query:o,records:a,runAction:r,searchText:i,setSearchText:A}=FB(e.page);return!o.data&&!o.error?(0,fe.jsx)(Qe,{label:`Loading ${e.page.label}`}):(0,fe.jsx)("div",{className:`${Ft} px-4 py-8 md:px-8`,children:(0,fe.jsxs)("section",{className:"mx-auto grid w-full max-w-3xl gap-6",children:[(0,fe.jsx)(St,{description:e.page.description,title:e.page.label}),n?.metrics?.length?(0,fe.jsx)("section",{"aria-label":`${e.page.label} overview`,className:"grid gap-3 sm:grid-cols-2",children:n.metrics.map(s=>(0,fe.jsxs)(O,{className:"p-4",children:[(0,fe.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:s.label}),(0,fe.jsx)("div",{className:"mt-3 font-display text-2xl font-light text-dashboard-text",children:s.value}),s.detail?(0,fe.jsx)("div",{className:"mt-1 font-mono text-xs text-dashboard-text-muted",children:s.detail}):null]},s.label))}):null,n?.searchPlaceholder?(0,fe.jsxs)("label",{className:"relative block",children:[(0,fe.jsx)(yi,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-dashboard-text-muted",size:15}),(0,fe.jsx)("span",{className:"sr-only",children:n.searchPlaceholder}),(0,fe.jsx)("input",{className:"w-full rounded border border-white/15 bg-black py-2 pr-3 pl-9 text-sm text-dashboard-text placeholder:text-dashboard-text-muted focus:border-cyan-300/50 focus:outline-none",onChange:s=>A(s.target.value),placeholder:n.searchPlaceholder,type:"search",value:i})]}):null,o.error?(0,fe.jsx)(O,{padding:"md",children:(0,fe.jsxs)("p",{className:"m-0 text-sm text-rose-300",children:["Could not load ",e.page.label.toLowerCase(),". Try again."]})}):a.length===0?(0,fe.jsx)(O,{padding:"md",children:(0,fe.jsxs)("div",{className:"flex items-center gap-4",children:[(0,fe.jsx)("div",{className:"grid size-10 shrink-0 place-items-center rounded border border-white/[0.07] bg-white/[0.025] text-dashboard-text-muted",children:(0,fe.jsx)(qa,{"aria-hidden":"true",size:17})}),(0,fe.jsx)("p",{className:"m-0 text-sm text-dashboard-text-muted",children:n?.emptyText??`No ${e.page.label.toLowerCase()}.`})]})}):(0,fe.jsxs)("div",{className:"grid gap-3",children:[a.map(s=>(0,fe.jsxs)(O,{padding:"md",children:[(0,fe.jsxs)("div",{className:"flex items-start gap-3",children:[(0,fe.jsx)("h2",{className:"m-0 min-w-0 flex-1 font-display text-base font-medium text-dashboard-text",children:s.title}),s.actions?.map(c=>(0,fe.jsx)("button",{"aria-label":`${c.label}: ${s.title}`,className:`cursor-pointer border-0 bg-transparent p-1 text-dashboard-text-muted transition-colors ${c.tone==="danger"?"hover:text-rose-300":"hover:text-dashboard-text"}`,disabled:t.isPending,onClick:()=>r(c),title:c.label,type:"button",children:c.tone==="danger"?(0,fe.jsx)(Uo,{"aria-hidden":"true",size:16}):c.label},`${c.method}:${c.href}`))]}),s.description?(0,fe.jsx)("p",{className:"mt-2 mb-0 text-sm text-dashboard-text-muted",children:s.description}):null,s.metadata?.length?(0,fe.jsx)("dl",{className:"mt-4 flex flex-wrap gap-x-6 gap-y-2",children:s.metadata.map(c=>(0,fe.jsxs)("div",{children:[(0,fe.jsx)("dt",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:c.label}),(0,fe.jsx)("dd",{className:"mt-1 ml-0 font-mono text-xs text-dashboard-text-muted",children:c.value})]},c.label))}):null]},s.id)),!o.isPlaceholderData&&o.hasNextPage?(0,fe.jsx)(pt,{className:"justify-self-center",disabled:o.isFetchingNextPage,onClick:()=>{o.fetchNextPage()},children:o.isFetchingNextPage?"Loading\u2026":"Load more"}):null,t.error?(0,fe.jsx)("p",{className:"m-0 text-center text-sm text-rose-300",children:"Could not complete this action. Try again."}):null]})]})})}var mt=w(k(),1),Cle=80,wle=140;function Ele(e,t){let n=e?.trim().split(/\s+/).filter(Boolean)??[];return n.length>0?n.slice(0,2).map(o=>o[0]).join("").toUpperCase():t.slice(0,1).toUpperCase()}function IO({identity:e,onSignOut:t,spend:n,userPages:o}){let[a,r]=(0,Gr.useState)(!1),i=(0,Gr.useRef)(null),A=(0,Gr.useRef)(null),s=(0,Gr.useRef)(void 0),c=(0,Gr.useRef)(void 0),u=e.user.email,l=e.user.name?.trim()||u,p=n?Qt({total:n.sevenDaysUsd}):"\u2014",g=n?Qt({total:n.thirtyDaysUsd}):"\u2014";function m(){s.current&&clearTimeout(s.current),c.current&&clearTimeout(c.current),s.current=void 0,c.current=void 0}function h(f){f.pointerType==="mouse"&&(m(),s.current=setTimeout(()=>r(!0),Cle))}function y(f){f.pointerType==="mouse"&&(m(),c.current=setTimeout(()=>r(!1),wle))}return(0,Gr.useEffect)(()=>m,[]),(0,Gr.useEffect)(()=>{if(!a)return;function f(B){i.current?.contains(B.target)||r(!1)}function b(B){B.key==="Escape"&&(r(!1),A.current?.focus())}return document.addEventListener("pointerdown",f),document.addEventListener("keydown",b),()=>{document.removeEventListener("pointerdown",f),document.removeEventListener("keydown",b)}},[a]),(0,mt.jsxs)("div",{className:"relative",onBlurCapture:f=>{f.currentTarget.contains(f.relatedTarget)||r(!1)},onPointerEnter:h,onPointerLeave:y,ref:i,children:[(0,mt.jsxs)("button",{"aria-controls":"profile-popover","aria-expanded":a,"aria-haspopup":"true","aria-label":`${a?"Close":"Open"} profile menu for ${l}. Personal model spend: 7 days ${p}, 30 days ${g}.`,className:S("group flex h-10 cursor-pointer items-center gap-2 rounded-lg border-0 bg-transparent px-1.5 text-dashboard-text transition-colors hover:bg-white/[0.06] hover:text-dashboard-text focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#beaaff]/70",a&&"bg-white/[0.08] text-dashboard-text"),onClick:f=>{m(),r(f.detail===0?b=>!b:!0)},ref:A,type:"button",children:[(0,mt.jsxs)("span",{className:"hidden items-center gap-2 sm:flex",children:[(0,mt.jsxs)("span",{className:"flex items-baseline gap-1 whitespace-nowrap tabular-nums",children:[(0,mt.jsx)("span",{className:"text-xs font-medium uppercase tracking-[0.1em] text-dashboard-text-muted",children:"7d"}),(0,mt.jsx)("span",{className:"text-xs font-semibold text-dashboard-text",children:p})]}),(0,mt.jsx)("span",{"aria-hidden":"true",className:"h-3 w-px bg-white/10"}),(0,mt.jsxs)("span",{className:"flex items-baseline gap-1 whitespace-nowrap tabular-nums",children:[(0,mt.jsx)("span",{className:"text-xs font-medium uppercase tracking-[0.1em] text-dashboard-text-muted",children:"30d"}),(0,mt.jsx)("span",{className:"text-xs font-semibold text-dashboard-text",children:g})]})]}),(0,mt.jsx)("span",{"aria-hidden":"true",className:"grid size-7 place-items-center rounded-full bg-[#beaaff] text-xs font-bold tracking-wide text-black shadow-sm shadow-black/40",children:Ele(e.user.name,u)}),(0,mt.jsx)(_p,{"aria-hidden":"true",className:S("text-dashboard-text-muted transition-[color,transform] group-hover:text-dashboard-text",a&&"rotate-180 text-dashboard-text"),size:14,strokeWidth:2})]}),a?(0,mt.jsxs)("div",{className:"absolute right-0 top-[calc(100%+0.5rem)] z-20 w-64 rounded-xl bg-dashboard-surface-raised/95 p-1.5 shadow-2xl shadow-black/75 backdrop-blur-xl",id:"profile-popover",children:[(0,mt.jsxs)("div",{className:"border-b border-white/10 px-2.5 py-2.5",children:[(0,mt.jsx)("p",{className:"m-0 truncate text-sm font-semibold text-dashboard-text",children:l}),l!==u?(0,mt.jsx)("p",{className:"mt-1 mb-0 truncate text-xs text-dashboard-text-muted",children:u}):null]}),(0,mt.jsxs)(Fe,{className:"mt-1 flex items-center gap-2.5 rounded-md px-2.5 py-2 text-sm font-semibold text-dashboard-text no-underline transition-colors hover:bg-white/10 hover:text-dashboard-text focus-visible:bg-white/10 focus-visible:text-dashboard-text focus-visible:outline-none",onClick:()=>r(!1),to:Dr(u),children:[(0,mt.jsx)(_a,{"aria-hidden":"true",size:16,strokeWidth:2}),"My profile"]}),(0,mt.jsxs)(Fe,{className:"flex items-center gap-2.5 rounded-md px-2.5 py-2 text-sm font-semibold text-dashboard-text no-underline transition-colors hover:bg-white/10 hover:text-dashboard-text focus-visible:bg-white/10 focus-visible:text-dashboard-text focus-visible:outline-none",onClick:()=>r(!1),to:"/settings/api-tokens",children:[(0,mt.jsx)(Ho,{"aria-hidden":"true",size:16,strokeWidth:2}),"API tokens"]}),o.filter(f=>f.navigation==="profile").map(f=>(0,mt.jsxs)(Fe,{className:"flex items-center gap-2.5 rounded-md px-2.5 py-2 text-sm font-semibold text-dashboard-text no-underline transition-colors hover:bg-white/10 hover:text-dashboard-text focus-visible:bg-white/10 focus-visible:text-dashboard-text focus-visible:outline-none",onClick:()=>r(!1),to:VB(f.pluginName,f.id),children:[(0,mt.jsx)(qa,{"aria-hidden":"true",size:16,strokeWidth:2}),f.label]},`${f.pluginName}:${f.id}`)),(0,mt.jsxs)("button",{className:"flex w-full cursor-pointer items-center gap-2.5 rounded-md border-0 bg-transparent px-2.5 py-2 text-left text-sm font-semibold text-dashboard-text transition-colors hover:bg-white/10 hover:text-dashboard-text focus-visible:bg-white/10 focus-visible:text-dashboard-text focus-visible:outline-none",onClick:()=>{r(!1),t()},type:"button",children:[(0,mt.jsx)(Mp,{"aria-hidden":"true",size:16,strokeWidth:2}),"Log out"]})]}):null]})}var Li=w(Y(),1);var RF=w(Y(),1);var ic=w(Y(),1);function FF(e,t){if(e.eventHistory.status!=="available")return _O(e);let n=t.find(o=>o.eventHistory.status!=="available");return n?_O({...e,eventHistory:n.eventHistory,events:n.events,previousCursor:n.previousCursor}):{...e,events:Qle([...t.flatMap(o=>o.events),...e.events]),previousCursor:XB(e.previousCursor,t)??(t.length?LO(t):e.previousCursor)}}async function vO(e){let t=new Map(e.historyPages.map(r=>[r.requestedBefore,r])),n=[],o=new Set,a=e.detail.previousCursor;for(;a;){if(o.has(a))throw new Error("Conversation history cursor did not advance");o.add(a);let r=t.get(a)??{...await e.readPage(a),requestedBefore:a};n.push(r),a=r.previousCursor}return FF(e.detail,n)}function xO(e){let t=SO(e);return t===void 0?"empty":String(t)}function DO(e,t){return XB(e,t)??LO(t)}function XB(e,t){if(!e)return;let n=new Map(t.map(i=>[i.requestedBefore,i])),o=new Set,a=new Set,r=e;for(;r;){if(a.has(r))return;a.add(r);let i=n.get(r);if(!i)return o.size>0&&o.size===t.length?void 0:r;o.add(i);let A=SO(o),s=kle(t.filter(c=>!o.has(c)));if(A!==void 0&&s!==void 0&&A<=s+1)return;r=i.previousCursor}}function FO(e,t){return t.some(n=>n.eventHistory.status!==e.eventHistory.status)}function SO(e){let t;for(let n of e){let o=n.events[0]?.seq;o!==void 0&&(t===void 0||o<t)&&(t=o)}return t}function kle(e){let t;for(let n of e){let o=n.events.at(-1)?.seq;o!==void 0&&(t===void 0||o>t)&&(t=o)}return t}function LO(e){let t;for(let n of e){let o=n.events[0]?.seq,a=t?.events[0]?.seq;o!==void 0&&(a===void 0||o<a)&&(t=n)}return t?.previousCursor}function Qle(e){return[...new Map(e.map(t=>[t.seq,t])).values()].sort((t,n)=>t.seq-n.seq)}function _O(e){let{modelUsage:t,...n}=e;return n}function SF(e){return["conversation",e,"detail"]}function RO(e){return["dashboard","archived-conversation",e]}var $O=["dashboard","archive-conversation"];function MO(){return aC({filters:{mutationKey:$O,status:"pending"},select:e=>{let t=e.state.variables,n=e.state.context,o=e.options.mutationKey?.[2];return{archived:t.archived,conversation:n?.archivedSnapshot?.conversation,conversationId:typeof o=="string"?o:""}}})}function Ile(e){return{enabled:!!e,queryKey:SF(e),queryFn:({signal:t})=>vle(e,t),refetchInterval:t=>t.state.data?.status==="active"?2e3:!1,retry:!1}}function Rg(e,t){let n=Un();return sr({mutationKey:[...$O,e],mutationFn:o=>fM(tD,`/api/conversations/${encodeURIComponent(e)}/archive`,o),onMutate:async o=>{let a={queryKey:["dashboard","conversations"]},r=SF(e),i=RO(e);await Promise.all([n.cancelQueries(a),n.cancelQueries({queryKey:r})]);let A=n.getQueriesData(a),s=n.getQueryData(r),c=n.getQueryData(i),u=o.archived?new Date().toISOString():void 0,l=o.archived?_le(A,e)??c:c;return A.forEach(([p,g])=>{if(!g)return;let m=g.conversations.some(f=>f.conversationId===e),y=!o.archived&&!m&&!!l?.feedQueryHashes.includes(JSON.stringify(p))?[...g.conversations,{...l.conversation,archivedAt:void 0}].sort((f,b)=>b.lastSeenAt.localeCompare(f.lastSeenAt)):g.conversations.map(f=>f.conversationId===e?{...f,archivedAt:u}:f);n.setQueryData(p,{...g,conversations:y})}),n.setQueryData(r,p=>p&&{...p,archivedAt:u}),l&&n.setQueryData(i,l),{archivedQueryKey:i,archivedSnapshot:l,detailQueryKey:r,previousArchivedSnapshot:c,previousDetail:s,previousFeeds:A}},onError:(o,a,r)=>{r?.previousFeeds.forEach(([i,A])=>{n.setQueryData(i,A)}),r&&(n.setQueryData(r.detailQueryKey,r.previousDetail),r.previousArchivedSnapshot?n.setQueryData(r.archivedQueryKey,r.previousArchivedSnapshot):n.removeQueries({exact:!0,queryKey:r.archivedQueryKey})),t?.onError?.()},onSuccess:(o,a)=>{a.archived||n.removeQueries({exact:!0,queryKey:RO(e)}),t?.onSuccess?.(a.archived)},onSettled:async()=>{await Promise.all([n.invalidateQueries({queryKey:["dashboard","conversations"]}),n.invalidateQueries({queryKey:["dashboard","locations"]}),n.invalidateQueries({queryKey:["dashboard","people"]}),n.invalidateQueries({exact:!0,queryKey:SF(e)})])}})}function _le(e,t){let n,o=[];for(let[a,r]of e){let i=r?.conversations.find(A=>A.conversationId===t);i&&(n??=i,o.push(JSON.stringify(a)))}return n?{conversation:n,feedQueryHashes:o}:void 0}function ey(e){let t=Un(),n=ct(Ile(e)),o=n.data?.eventHistory.status,a=(0,ic.useMemo)(()=>["conversation",e,"history",o],[e,o]),r=_d({enabled:!1,queryKey:a,queryFn:async({pageParam:g,signal:m})=>({...await NO(e,g,m),requestedBefore:g}),initialPageParam:n.data?.previousCursor??"",getNextPageParam:(g,m)=>DO(n.data?.previousCursor,m),retry:!1}),i=r.data?.pages,A=(0,ic.useMemo)(()=>n.data?FF(n.data,i??[]):void 0,[n.data,i]),s=xle(r.error),c=!!(n.data&&(FO(n.data,i??[])||s)),u=s?null:r.error,l=!!(n.data?.previousCursor&&r.data&&XB(n.data.previousCursor,r.data.pages)&&!c&&!r.error&&!r.isFetchingNextPage),p=r.isFetchingNextPage||l;return(0,ic.useEffect)(()=>{c&&n.refetch()},[n.refetch,c]),(0,ic.useEffect)(()=>{s&&t.resetQueries({exact:!0,queryKey:a})},[a,s,t]),(0,ic.useEffect)(()=>{l&&r.fetchNextPage()},[r.fetchNextPage,l]),{data:A,error:n.error,historyError:u,historyVersion:xO(i??[]),hasPreviousPage:r.data?r.hasNextPage:!!n.data?.previousCursor,isPending:n.isPending,isLoadingPreviousPage:p,loadCompleteTranscript:()=>{if(!e||!n.data)throw new Error("Cannot load a conversation without an id");return vO({detail:n.data,historyPages:r.data?.pages??[],readPage:g=>NO(e,g)})},loadPreviousPage:()=>{let g=r.data?r.hasNextPage:!!n.data?.previousCursor;e&&g&&!r.isFetchingNextPage&&r.fetchNextPage()}}}function vle(e,t){return rt(oD,`/api/conversations/${encodeURIComponent(e)}`,t)}function NO(e,t,n){let o=new URLSearchParams({before:t});return rt(rD,`/api/conversations/${encodeURIComponent(e)}/events?${o}`,n).then(a=>{if(a.previousCursor===t)throw new Error("Conversation history cursor did not advance");return a})}function xle(e){return e instanceof Mo&&e.status===400}var jO=w(k(),1);function ty(e){return(0,jO.jsx)("span",{"aria-hidden":"true",className:S("shrink-0 rounded-full bg-emerald-300 shadow-[0_0_10px_rgba(110,231,183,0.55)] animate-[junior-active-indicator_1.8s_ease-in-out_infinite] motion-reduce:animate-none",e.className)})}var Ka=w(Y(),1);var Ng=w(k(),1);function GO(e){let t=Sle(),n=t?0:e.durationMs??180,[o,a]=(0,Ka.useState)(()=>e.items.map(s=>({item:s,key:e.getKey(s),state:"present"}))),r=(0,Ka.useRef)(e.items.length>0),i=o.some(s=>s.state==="exiting"),A=(0,Ka.useCallback)(s=>{a(c=>c.filter(u=>u.key!==s))},[]);return(0,Ka.useLayoutEffect)(()=>{a(s=>Dle(s,e.items,e.getKey,r.current)),e.items.length>0&&(r.current=!0)},[e.getKey,e.items]),(0,Ka.useEffect)(()=>{if(!o.some(c=>c.state==="entering"))return;if(t){a(c=>PO(c));return}let s=window.requestAnimationFrame(()=>{a(c=>PO(c))});return()=>window.cancelAnimationFrame(s)},[o,t]),(0,Ng.jsx)("div",{"aria-label":o.length>0?e.ariaLabel:void 0,className:S(e.className,i&&"pointer-events-none"),role:o.length>0?e.role:void 0,children:o.length>0?o.map(s=>(0,Ng.jsx)(Fle,{animatedItem:s,durationMs:n,onExited:A,renderItem:e.renderItem},s.key)):e.empty})}function Dle(e,t,n,o){let a=new Map(e.map(A=>[A.key,A])),r=new Set(t.map(n)),i=t.map(A=>{let s=n(A),c=a.get(s);return{item:A,key:s,state:c?.state==="exiting"?"entering":c?.state??(o?"entering":"present")}});return e.forEach((A,s)=>{r.has(A.key)||i.splice(Math.min(s,i.length),0,{...A,state:"exiting"})}),i}function Fle(e){let{animatedItem:t}=e;return(0,Ka.useEffect)(()=>{if(t.state!=="exiting")return;let n=window.setTimeout(()=>e.onExited(t.key),e.durationMs);return()=>window.clearTimeout(n)},[t.key,t.state,e.durationMs,e.onExited]),(0,Ng.jsx)("div",{"aria-hidden":t.state==="exiting"?!0:void 0,className:S("grid min-w-0 origin-center transition-[grid-template-rows,opacity,transform] motion-reduce:transition-none",t.state==="present"?"grid-rows-[1fr] translate-x-0 scale-100 opacity-100":"pointer-events-none grid-rows-[0fr] translate-x-2 scale-[0.98] opacity-0"),"data-presence":t.state,inert:t.state==="exiting"?!0:void 0,style:{transitionDuration:`${e.durationMs}ms`,transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.2, 1)"},children:(0,Ng.jsx)("div",{className:"min-h-0 min-w-0 overflow-hidden",children:e.renderItem(t.item)})})}function PO(e){return e.map(t=>t.state==="entering"?{...t,state:"present"}:t)}function Sle(){let[e,t]=(0,Ka.useState)(!1);return(0,Ka.useEffect)(()=>{let n=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>t(n.matches);return o(),n.addEventListener("change",o),()=>n.removeEventListener("change",o)},[]),e}function HO(e,t){let n=UO(t.nowMs,t.timeZone),o=new Map,a=[...e].sort((r,i)=>LF(i)-LF(r));for(let r of a){let i=LF(r),A=Lle(i,n,t.timeZone),s=o.get(A.key);s?s.conversations.push(r):o.set(A.key,{...A,conversations:[r]})}return[...o.values()]}function LF(e){let t=Date.parse(e.lastSeenAt);return Number.isFinite(t)?t:Number.NEGATIVE_INFINITY}function Lle(e,t,n){if(!Number.isFinite(e))return{key:"older",label:"Older"};let o=UO(e,n),a=Math.max(0,Math.floor((t-o)/864e5));return a===0?{key:"today",label:"Today"}:a===1?{key:"yesterday",label:"Yesterday"}:a<7?{key:`day-${o}`,label:new Intl.DateTimeFormat("en-US",{timeZone:n,weekday:"long"}).format(e)}:a<14?{key:"last-week",label:"Last week"}:a<21?{key:"2-weeks",label:"2 weeks ago"}:a<28?{key:"3-weeks",label:"3 weeks ago"}:{key:"older",label:"Older"}}function UO(e,t){let n=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"numeric",timeZone:t,year:"numeric"}).formatToParts(e),o=new Map(n.map(a=>[a.type,Number(a.value)]));return Date.UTC(o.get("year")??0,(o.get("month")??1)-1,o.get("day")??1)}var TO=w(k(),1);function an(e){return(0,TO.jsx)("div",{className:"min-w-0 rounded-lg border border-white/10 bg-[#050505] px-4 py-3 text-base leading-relaxed text-dashboard-text-muted",children:e.children})}var $g=w(k(),1);function Hr(e){let t=e.size??"compact";return(0,$g.jsxs)("div",{className:S("relative min-w-0",e.className),children:[(0,$g.jsx)(yi,{"aria-hidden":"true",className:S("pointer-events-none absolute top-1/2 -translate-y-1/2 text-dashboard-text-muted",Rle[t]),size:t==="compact"?13:14,strokeWidth:2.5}),(0,$g.jsx)("input",{"aria-label":e.label,className:S("w-full rounded-lg border border-white/[0.08] font-mono text-xs text-dashboard-text outline-none transition-colors placeholder:text-dashboard-text-muted hover:border-white/15",Nle[t]),onChange:n=>e.onChange(n.currentTarget.value),placeholder:e.placeholder,type:"search",value:e.value})]})}var Rle={compact:"left-2.5",default:"left-3"},Nle={compact:"h-9 bg-black/25 pr-3 pl-8 focus:border-cyan-400/30 focus:ring-1 focus:ring-cyan-400/15",default:"h-10 bg-black/20 pr-3 pl-9 focus:border-cyan-300/35 focus:ring-2 focus:ring-cyan-300/10"};var ye=w(k(),1),$le=e=>e.key;function OO(e){let[t,n]=(0,RF.useState)(),[o,a]=(0,RF.useState)(),r=Mle(HO(e.conversations,{nowMs:Date.now(),timeZone:e.timeZone}));return(0,ye.jsxs)("aside",{className:"relative grid h-full min-h-0 min-w-0 grid-rows-[auto_auto_minmax(0,1fr)] overflow-hidden border-r border-white/[0.07] bg-white/[0.02]",children:[(0,ye.jsx)("div",{className:"px-5 pb-3 pt-5",children:(0,ye.jsxs)("div",{className:"flex items-end justify-between gap-3",children:[(0,ye.jsx)("h2",{className:"m-0 font-display text-xl font-medium leading-tight text-dashboard-text",children:"Conversations"}),(0,ye.jsx)("div",{className:"rounded border border-white/[0.08] bg-black/20 px-2.5 py-1 font-mono text-xs text-dashboard-text-muted",children:e.loading?"\u2026":e.conversations.length})]})}),(0,ye.jsx)("div",{className:"px-3 pb-3",children:(0,ye.jsx)(Hr,{label:"Search your conversations",onChange:e.onQueryChange,placeholder:"Search conversations\u2026",size:"default",value:e.query})}),(0,ye.jsx)("div",{className:"min-h-0 overflow-y-auto overscroll-contain px-2 pb-2",children:e.error?(0,ye.jsx)("div",{className:"p-3",children:(0,ye.jsx)(an,{children:e.error})}):(0,ye.jsx)(GO,{ariaLabel:"Your conversations",className:"grid gap-1",empty:e.loading?void 0:(0,ye.jsx)("div",{className:"p-3",children:(0,ye.jsx)(an,{children:"No conversations match this view."})}),getKey:$le,items:r,renderItem:i=>i.kind==="section"?(0,ye.jsx)("h3",{className:"m-0 px-3 pb-1 pt-4 font-display text-xs font-semibold uppercase tracking-[0.08em] text-dashboard-text-muted/60",children:i.label}):(0,ye.jsx)(jle,{conversation:i.conversation,onArchiveError:a,onArchived:A=>{a(s=>s?.id===A.id?void 0:s),n(A)},selected:i.conversation.id===e.selectedId}),role:"navigation"})}),t||o?(0,ye.jsxs)("div",{className:"absolute bottom-3 left-3 right-3 z-20 grid gap-2",children:[o?(0,ye.jsx)(Ple,{conversation:o,onDismiss:()=>a(void 0)}):null,t?(0,ye.jsx)(Gle,{conversation:t,onRestored:()=>n(void 0)}):null]}):null]})}function Mle(e){return e.flatMap(t=>[{key:`section-${t.key}`,kind:"section",label:t.label},...t.conversations.map(n=>({conversation:n,key:`conversation-${n.id}`,kind:"conversation"}))])}function jle(e){let t=Rg(e.conversation.id,{onError:()=>e.onArchiveError(e.conversation),onSuccess:r=>{r&&e.onArchived(e.conversation)}}),n=_B(e.conversation),o=Ys(e.conversation,{includeId:!1}),a=DA(e.conversation);return(0,ye.jsxs)("div",{className:"group relative min-w-0",children:[(0,ye.jsxs)(Fe,{"aria-current":e.selected?"page":void 0,className:S("block min-w-0 rounded-lg border border-transparent px-3 py-3 text-inherit no-underline transition-all hover:bg-white/[0.035]",e.selected&&"border-cyan-300/20 bg-cyan-300/[0.07]"),to:xr(e.conversation.id),children:[(0,ye.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[n==="active"?(0,ye.jsx)(ty,{className:"size-1.5"}):(0,ye.jsx)("span",{"aria-hidden":"true",className:S("size-1.5 shrink-0 rounded-full",n==="failed"&&"bg-rose-300",n==="idle"&&"bg-white/25")}),(0,ye.jsx)("div",{className:"truncate font-display text-base font-medium leading-tight text-dashboard-text",children:a})]}),o?(0,ye.jsx)("div",{className:"ml-3.5 mt-1.5 truncate font-mono text-xs leading-tight text-dashboard-text-muted",children:o}):null]}),(0,ye.jsx)("button",{"aria-label":`Archive ${a}`,className:"pointer-events-none absolute right-2 top-1/2 z-10 grid size-8 -translate-y-1/2 place-items-center rounded-md bg-[#111719] text-dashboard-text-muted opacity-0 shadow-[-8px_0_12px_rgba(9,12,14,0.8)] transition hover:text-dashboard-text focus:pointer-events-auto focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-cyan-300/35 group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100",disabled:t.isPending,onClick:()=>t.mutate({archived:!0,lastSeenAt:e.conversation.lastSeenAt}),title:`Archive ${a}`,type:"button",children:(0,ye.jsx)(Cp,{"aria-hidden":"true",size:15})})]})}function Ple(e){let t=DA(e.conversation);return(0,ye.jsx)("div",{className:"rounded-lg border border-rose-300/25 bg-[#111719] px-3 py-2.5 shadow-[0_12px_32px_rgba(0,0,0,0.45)]",children:(0,ye.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,ye.jsxs)("div",{className:"min-w-0 flex-1 font-mono text-xs text-rose-200/80",role:"alert",children:["Could not archive ",t,"."]}),(0,ye.jsx)("button",{className:"shrink-0 rounded border border-white/15 px-2 py-1 font-mono text-xs text-dashboard-text-muted transition hover:border-white/30 hover:text-dashboard-text focus:outline-none focus:ring-2 focus:ring-cyan-300/35",onClick:e.onDismiss,type:"button",children:"Dismiss"})]})})}function Gle(e){let t=Rg(e.conversation.id,{onSuccess:o=>{o||e.onRestored()}}),n=DA(e.conversation);return(0,ye.jsxs)("div",{className:"rounded-lg border border-white/15 bg-[#111719] px-3 py-2.5 shadow-[0_12px_32px_rgba(0,0,0,0.45)]",children:[(0,ye.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,ye.jsxs)("div",{className:"min-w-0 flex-1 truncate font-mono text-xs text-dashboard-text-muted",role:"status",children:[n," archived"]}),(0,ye.jsx)("button",{"aria-label":`Undo archive for ${n}`,className:"shrink-0 rounded border border-white/15 px-2 py-1 font-mono text-xs text-cyan-100/75 transition hover:border-white/30 hover:text-cyan-50 focus:outline-none focus:ring-2 focus:ring-cyan-300/35 disabled:opacity-40",disabled:t.isPending,onClick:()=>t.mutate({archived:!1,lastSeenAt:e.conversation.lastSeenAt}),type:"button",children:t.isPending?"Restoring\u2026":"Undo"})]}),t.error?(0,ye.jsx)("div",{className:"mt-1 font-mono text-xs text-rose-200/80",role:"alert",children:"Could not restore the conversation."}):null]})}var Lq=w(Y(),1);var Hle=d.object({memories:d.array(d.object({id:d.string(),content:d.string(),observedAtMs:d.number(),scope:d.enum(["personal","conversation"]),kind:d.enum(["preference","procedure","knowledge"])}).strict())}).strict();function ny(e){if(e.pluginName!=="memory"||e.kind!=="recall"||e.version!==1)return;let t=Hle.safeParse(e.content);return t.success?t.data:void 0}function ay(e,t){if(e.previousCursor)throw new Error("Cannot export a partial conversation transcript");let n=[];return n.push(`# ${dd(Zle(e,t))}`,""),Lt(n,"Conversation ID",qO(e.conversationId)),Lt(n,"Generated",e.generatedAt),Lt(n,"Actor",Vle(t,e)),Lt(n,"Location",Xle(t,e)),Lt(n,"Usage",[V5(e.cumulativeUsage),eU(e.cumulativeUsage,e.auxiliaryCosts)].filter(Boolean).join(" \xB7 ")),Lt(n,"Sentry conversation",e.sentryConversationUrl),n.push("","## Transcript"),Ule(n,e),ape(n)}function Ule(e,t){let n=ki(t);if(t.eventHistory.status==="available"){NF(e,t,n,!1);return}if(t.eventHistory.status==="redacted"&&n.length){e.push("","Transcript hidden because this conversation is not public."),NF(e,t,n,!0);return}if(n.length){NF(e,t,n,!1);return}e.push("",vB(t))}function NF(e,t,n,o){for(let a of yg(n)){if(a.kind==="message"){a.message.eventType?zle(e,t,a.message,o):Yle(e,t,a.message,o);continue}if(a.kind==="failure"){Ole(e,t,a.outcome,a.timestamp);continue}if(a.kind==="subagent"){Jle(e,t,a.part,a.timestamp);continue}if(a.kind==="context"){qle(e,t,a.part,a.timestamp);continue}if(a.kind==="reasoning"){Tle(e,t,a.part,a.timestamp);continue}if(a.kind==="structured_event"){e.push("",`### ${a.part.presentation.title}`),MA(e,t,a.timestamp),a.part.presentation.preview&&e.push("",a.part.presentation.preview);for(let r of a.part.presentation.details??[])e.push("",`- ${r.title}`),r.description&&e.push(` ${r.description}`),r.content&&e.push("",$F(r.content,"md")),r.metadata?.length&&e.push(` ${r.metadata.join(" \xB7 ")}`);continue}Wle(e,t,a.part,a.timestamp)}}function Tle(e,t,n,o){e.push("","### Reasoning"),MA(e,t,o),e.push("",n.redacted?"<redacted>":n.text)}function Ole(e,t,n,o){e.push("",n==="delivery_failed"?"### Message delivery failed":"### Agent response failed"),MA(e,t,o),e.push("",n==="delivery_failed"?`${it()} could not deliver this message to its destination.`:`The model response ended before ${it()} could complete this turn.`)}function qle(e,t,n,o){let a=n.event;e.push("",a.type==="handoff"?"### Model handoff":"### Context compacted"),MA(e,t,o),a.type==="handoff"?(Lt(e,"Profile",a.modelProfile),Lt(e,"Model",a.modelId),Lt(e,"Reasoning",a.reasoningLevel)):(Lt(e,"Profile",a.modelProfile),Lt(e,"Model",a.modelId),a.details&&(Lt(e,"Estimated input tokens",String(a.details.estimatedInputTokens)),a.details.replacementInputTokens!==void 0&&Lt(e,"Replacement input tokens",String(a.details.replacementInputTokens)),Lt(e,"Compaction trigger",String(a.details.triggerTokens)),Lt(e,"Input limit",String(a.details.inputLimitTokens)),Lt(e,"Input messages",String(a.details.inputMessageCount)),Lt(e,"Retained messages",String(a.details.retainedMessageCount)),Lt(e,"Summary characters",String(a.details.summaryChars)))),a.summary&&e.push("","#### Continuation summary","",a.summary)}function zle(e,t,n,o){if(e.push("",`### Event: ${dd(n.eventType??"")}`),MA(e,t,n.timestamp),o){e.push("","- <redacted>");return}let a=SA(n);e.push("",a.trim().length?a:"_No content._")}function Yle(e,t,n,o){if(e.push("",`### ${epe(n,t)}`),MA(e,t,n.timestamp),o){e.push("",...n.parts.map(()=>"- <redacted>"));return}let a=SA(n);e.push("",a.trim().length?a:"_No content._"),Kle(e,n.contexts)}function Kle(e,t){for(let n of t??[]){let o=ny(n);if(e.push("",o?"#### Recalled memories":`#### ${dd(n.kind)} context`),Lt(e,"Plugin",n.pluginName),Lt(e,"Loaded",n.loadedAt),!o){e.push("","```json",JSON.stringify(n.content,null,2),"```");continue}for(let a of o.memories)e.push("",`- ${a.content}`,` - ID: ${qO(a.id)}`,` - Observed: ${new Date(a.observedAtMs).toISOString()}`,` - Scope: ${a.scope}`,` - Kind: ${a.kind}`)}}function Jle(e,t,n,o){e.push("",`### Subagent: ${dd(n.subagentKind)}`),MA(e,t,o),Lt(e,"Status",n.status)}function Wle(e,t,n,o){e.push("",`### Tool: ${dd(n.name)}`),MA(e,t,o),Lt(e,"Status",n.status),Lt(e,"Duration",QB(o,n.resultTimestamp)),n.input!==void 0&&e.push("","#### Arguments","",$F(Bo(n.input),"json")),n.output!==void 0&&e.push("","#### Result","",$F(Bo(n.output),"json"))}function MA(e,t,n){let o=[tpe(n),npe(t,n)].filter(ope);o.length&&e.push("",`_${o.join(" - ")}_`)}function Zle(e,t){let n=e.displayTitle.trim();return n||(t?DA(t):"Conversation")}function Vle(e,t){return fg(e?.actorIdentity??t?.actorIdentity)??""}function Xle(e,t){return e?Ys(e)??"":t?Ys(t)??"":""}function epe(e,t){return dd(bg(t,e))}function tpe(e){return typeof e!="number"||!Number.isFinite(e)?"":new Date(e).toISOString()}function npe(e,t){if(typeof t!="number"||!Number.isFinite(t))return"";let n=Date.parse(e.startedAt);return!Number.isFinite(n)||t<n?"":`+${P1(t-n)}`}function Lt(e,t,n){n&&e.push(`- ${t}: ${n}`)}function dd(e){return e.replace(/\s+/g," ").trim()||"Untitled"}function qO(e){let t=e.includes("`")?"``":"`";return`${t}${e}${t}`}function $F(e,t){let n=[...e.matchAll(/`+/g)].reduce((a,r)=>Math.max(a,r[0].length),0),o="`".repeat(Math.max(3,n+1));return`${o}${t}
|
|
97
97
|
${e}
|
|
98
98
|
${o}`}function ape(e){return`${e.join(`
|
|
99
99
|
`)}
|
|
@@ -132,7 +132,7 @@ Findings:
|
|
|
132
132
|
- the notifier stores real newlines
|
|
133
133
|
- the dashboard preserves single breaks as \`<br>\`
|
|
134
134
|
|
|
135
|
-
See https://docs.sentry.io for product docs.`,Mq=By(14).map((e,t)=>({conversations:4+t*5%17,costUsd:.7+t*7%11*.18,date:e,durationMs:9e4+t*41%13*24e3,tokens:18e3+t*17%19*2300})),mge=By(30).map((e,t)=>({activePeople:4+t*7%13,conversations:18+t*11%31,date:e})),fge=By(30).map((e,t)=>({date:e,privateConversations:3+t*5%12,publicConversations:12+t*9%28})),bge=By(70).map((e,t)=>({conversations:t%9===0?0:1+t*7%18,date:e,durationMs:t%9===0?0:45e3+t*13%20*18e3})),_o=Date.UTC(2026,4,1,16),hge=[{description:"Default completed tool with normalized arguments",part:{id:"gallery-search",input:{query:"release regression",limit:25,options:{includeArchived:!1}},name:"searchIssues",output:{matches:3},resultTimestamp:_o+1842,status:"completed",type:"tool_call"},timestamp:_o},{description:"Running webSearch with name-only shimmer",part:{id:"gallery-running",input:{query:"service:checkout status:error",max_results:50},name:"webSearch",status:"running",type:"tool_call"},timestamp:_o+3e3},{description:"Failed tool with warning rail marker",part:{id:"gallery-error",input:{command:"jr-rpc config get github.repo",timeout_ms:1e4},name:"bash",output:{error:"configuration unavailable"},resultTimestamp:_o+6416,status:"error",type:"tool_call"},timestamp:_o+6e3},{description:"Known loadSkill signature",part:{id:"gallery-load-skill",input:{skill_name:"junior-qa"},name:"loadSkill",output:{skill_name:"junior-qa"},resultTimestamp:_o+8105,status:"completed",type:"tool_call"},timestamp:_o+8e3},{description:"Known executeTool signature with nested arguments",part:{id:"gallery-execute-tool",input:{tool_name:"github_search",arguments:{query:"is:pr is:open",limit:25}},name:"executeTool",output:{matches:3},resultTimestamp:_o+10723,status:"completed",type:"tool_call"},timestamp:_o+1e4},{description:"Long generic arguments exercise both truncation limits",part:{id:"gallery-long",input:{project:"payments-checkout-platform",query:"Find every regression associated with the most recent production deployment and include the complete evidence trail",environment:"production",includeResolved:!1,ignoredAfterFourEntries:"not shown in the collapsed preview"},name:"investigateDeploy",output:{channel_id:"C123"},resultTimestamp:_o+13250,status:"completed",type:"tool_call"},timestamp:_o+12e3},{description:"Completed tool without argument or result payloads",part:{id:"gallery-empty",name:"systemTime",status:"completed",type:"tool_call"},timestamp:_o+15e3}];function jq(){let[e,t]=(0,WF.useState)(30),[n,o]=(0,WF.useState)(!0);return(0,ee.jsxs)("div",{className:S(Ft,"grid min-w-0 gap-8 px-4 py-4 sm:px-8 sm:py-8"),children:[(0,ee.jsx)(St,{description:"Reusable dashboard fixtures for visual and interaction checks.",title:"Component gallery"}),(0,ee.jsxs)(JF,{description:"Shared actions, filters, metrics, and feedback surfaces.",title:"Foundations",children:[(0,ee.jsx)(cc,{title:"Buttons and controls",children:(0,ee.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,ee.jsxs)(pt,{children:[(0,ee.jsx)(Ds,{"aria-hidden":"true",size:14}),"Copy"]}),(0,ee.jsx)(pt,{disabled:!0,children:"Disabled"}),(0,ee.jsx)(pt,{"aria-label":"Bot action",size:"icon",children:(0,ee.jsx)(Er,{"aria-hidden":"true",size:16})}),(0,ee.jsx)(Ii,{pressed:n,variant:"pill",onClick:()=>o(a=>!a),children:"Toggle"}),(0,ee.jsx)(Ii,{pressed:!n,variant:"text",onClick:()=>o(a=>!a),children:"Alternate"}),(0,ee.jsx)(nr,{onChange:t,value:e})]})}),(0,ee.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:[(0,ee.jsx)(_t,{detail:"Across the selected period",icon:za,label:"Conversations",value:"1,284"}),(0,ee.jsx)(_t,{detail:"94% completed successfully",icon:jo,label:"Completed",value:"1,207"}),(0,ee.jsx)(_t,{detail:"Cumulative agent runtime",icon:Up,label:"Runtime",value:"18.4h"}),(0,ee.jsx)(_t,{detail:"Model and tool workers",icon:Er,label:"Active agents",value:"7"})]}),(0,ee.jsx)(cc,{title:"Metadata and empty state",children:(0,ee.jsxs)("div",{className:"grid gap-4",children:[(0,ee.jsx)(ry,{items:[{content:(0,ee.jsx)(Ur,{tooltip:[{label:"input",value:"12.4k"},{label:"output",value:"3.1k"}],children:"15.5k tokens"}),key:"tokens"},{content:(0,ee.jsx)(Ur,{children:"$0.42"}),key:"cost"},{content:(0,ee.jsx)(Ur,{children:"38s"}),key:"duration"}]}),(0,ee.jsx)(an,{children:"No activity was recorded for this period."})]})})]}),(0,ee.jsxs)(JF,{description:"Production chart components rendered with deterministic fixtures.",title:"Charts",children:[(0,ee.jsx)(hy,{days:Mq}),(0,ee.jsx)(fd,{days:Mq}),(0,ee.jsx)(by,{days:mge}),(0,ee.jsx)(my,{days:fge}),(0,ee.jsxs)(O,{children:[(0,ee.jsx)(Io,{description:"Daily conversation intensity over ten weeks.",title:"Contribution activity"}),(0,ee.jsx)(fy,{days:bge})]})]}),(0,ee.jsxs)(JF,{description:"Markdown, event notifications, and transcript role treatments.",title:"Transcripts",children:[(0,ee.jsx)(cc,{title:"Event notification",children:(0,ee.jsx)(Cg,{compact:!0,text:$q})}),(0,ee.jsx)(cc,{title:"GFM sample",children:(0,ee.jsx)(Cg,{text:pge})}),(0,ee.jsx)(cc,{title:"TranscriptText assistant",children:(0,ee.jsx)(yo,{role:"assistant",text:gge})}),(0,ee.jsx)(cc,{title:"TranscriptText user",children:(0,ee.jsx)(yo,{role:"user",text:$q})}),(0,ee.jsx)(cc,{title:"Tool calls",children:(0,ee.jsx)(Bge,{})})]})]})}function Bge(){return(0,ee.jsxs)("div",{className:"grid min-w-0 grid-cols-[0.875rem_minmax(0,1fr)] gap-3",children:[(0,ee.jsx)("div",{"aria-hidden":"true",className:"flex justify-center",children:(0,ee.jsx)("span",{className:"w-px bg-cyan-300/15"})}),(0,ee.jsxs)("div",{className:"grid min-w-0 gap-3",children:[(0,ee.jsx)("p",{className:"m-0 text-xs leading-relaxed text-dashboard-text-muted",children:"Click any row to compare its collapsed signature with the full arguments and result."}),hge.map(e=>(0,ee.jsxs)("div",{className:"grid min-w-0 gap-1",children:[(0,ee.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.08em] text-dashboard-text-muted",children:e.description}),(0,ee.jsx)(Gg,{part:e.part,timestamp:e.timestamp})]},e.part.id))]})]})}function JF(e){return(0,ee.jsxs)("section",{className:"grid min-w-0 gap-4",children:[(0,ee.jsxs)("div",{children:[(0,ee.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:e.title}),(0,ee.jsx)("p",{className:"mt-1 mb-0 text-sm text-dashboard-text-muted",children:e.description})]}),e.children]})}function cc(e){return(0,ee.jsxs)(O,{className:"grid min-w-0 gap-3 p-4 sm:p-5",padding:"none",children:[(0,ee.jsx)("div",{className:"border-b border-white/[0.05] pb-3 font-mono text-xs font-medium uppercase tracking-[0.14em] text-dashboard-text-muted",children:e.title}),(0,ee.jsx)("div",{className:"min-w-0",children:e.children})]})}function By(e){let t=Date.UTC(2026,4,1);return Array.from({length:e},(n,o)=>new Date(t+o*864e5).toISOString().slice(0,10))}var Pq=w(k(),1);function yy(e){return(0,Pq.jsx)("div",{className:S(Ft,"grid min-w-0 content-start gap-4 px-4 py-4 sm:gap-6 sm:px-8 sm:py-8",e.className),children:e.children})}var uc="/system/plugins";function Gq(e){let t=new Map(e.plugins.map(n=>[n.name,{...n,reports:[],skills:[]}]));for(let n of e.skills){let o=n.pluginProvider?t.get(n.pluginProvider):void 0;o&&o.skills.push(n)}for(let n of e.reports)t.get(n.pluginName)?.reports.push(n);return[...t.values()].map(n=>({...n,reports:[...n.reports],skills:[...n.skills].sort((o,a)=>o.name.localeCompare(a.name))})).sort((n,o)=>n.displayName.localeCompare(o.displayName))}function Cy(e){return`${uc}/${encodeURIComponent(e)}`}function Hq(e){return e.replace(/\/+$/,"")||"/"}var TA=w(k(),1);function Uq(){let e=({isActive:t})=>S("relative flex h-12 shrink-0 items-center px-3 font-display text-xs font-medium no-underline transition-colors after:absolute after:inset-x-3 after:bottom-0 after:h-0.5 after:transition-colors sm:text-sm",t?"text-dashboard-text after:bg-cyan-300":S("after:bg-transparent hover:bg-white/[0.025]",EA));return(0,TA.jsx)("div",{className:"border-b border-white/[0.06] bg-white/[0.018]",children:(0,TA.jsxs)("nav",{"aria-label":"System navigation",className:S(Ft,"flex min-w-0 gap-1 overflow-x-auto px-4 [scrollbar-width:none] md:px-8 [&::-webkit-scrollbar]:hidden"),children:[(0,TA.jsx)(wa,{className:e,end:!0,to:"/system",children:"Overview"}),(0,TA.jsx)(wa,{className:e,to:"/system/people",children:"People"}),(0,TA.jsx)(wa,{className:e,to:"/system/locations",children:"Locations"}),(0,TA.jsx)(wa,{className:e,to:uc,children:"Plugins"})]})})}var Hg=w(k(),1);function OA(e){return(0,Hg.jsxs)("div",{className:"min-w-0",children:[(0,Hg.jsx)(Uq,{}),(0,Hg.jsx)(yy,{children:e.children})]})}var Hn=w(k(),1);function Tq(e){let t=xa(240),n=Math.max(1,...e.days.map(r=>r.conversations)),o=t.plotWidth/Math.max(1,e.days.length),a=Math.max(4,Math.min(20,o*.55));return(0,Hn.jsxs)(O,{children:[(0,Hn.jsx)(Io,{description:"Daily persisted conversations for this location.",title:"Conversation activity",trailing:(0,Hn.jsxs)("span",{className:"flex items-center gap-2",children:[(0,Hn.jsx)("span",{className:"size-2 rounded-full bg-cyan-400 shadow-[0_0_12px_rgba(34,211,238,0.5)]"}),"90 days"]})}),(0,Hn.jsx)("div",{className:"px-2 py-3 sm:px-4 sm:py-4",children:(0,Hn.jsxs)("svg",{"aria-label":"Daily conversations for this location",className:"block h-auto min-h-52 w-full overflow-visible",role:"img",viewBox:`0 0 ${t.width} ${t.height}`,children:[(0,Hn.jsx)("defs",{children:(0,Hn.jsxs)("linearGradient",{id:"location-bars",x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,Hn.jsx)("stop",{offset:"0%",stopColor:"#22d3ee"}),(0,Hn.jsx)("stop",{offset:"100%",stopColor:"#f59e0b",stopOpacity:"0.65"})]})}),(0,Hn.jsx)(Co,{layout:t,maximum:n}),e.days.map((r,i)=>{let A=r.conversations/n*t.plotHeight,s=t.left+i*o+(o-a)/2,c=t.top+t.plotHeight-A;return(0,Hn.jsx)(gt,{content:(0,Hn.jsx)(Jn,{rows:[["conversations",r.conversations],["active",r.active],["failed",r.failed]]}),label:Ot(r.date),children:(0,Hn.jsx)("rect",{"aria-label":`${Ot(r.date)}: ${r.conversations} conversations, ${r.active} active, ${r.failed} failed`,fill:"url(#location-bars)",height:Math.max(r.conversations?2:0,A),opacity:r.conversations?.9:.18,rx:"2",tabIndex:0,width:a,x:s,y:c})},r.date)}),(0,Hn.jsx)(Da,{dates:e.days.map(r=>r.date),layout:t,xPosition:r=>t.left+r*o+o/2})]})})]})}var xe=w(k(),1);function Oq(){let e=qn(),t=_M(e.locationId);return(0,xe.jsx)(yge,{data:t.data,error:t.error})}function yge(e){return!e.data&&!e.error?(0,xe.jsx)(Qe,{label:"Loading location"}):(0,xe.jsxs)(OA,{children:[e.error?(0,xe.jsx)(O,{padding:"sm",children:(0,xe.jsx)(an,{children:e.data?"Location telemetry refresh failed. Showing cached data.":"Location failed to load."})}):null,e.data?(0,xe.jsx)(Cge,{detail:e.data}):null]})}function Cge(e){let t=e.detail;return(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(St,{description:`${t.provider} public ${t.kind} / ${t.providerDestinationId} / last active ${ed(t.lastSeenAt)}`,title:t.label}),(0,xe.jsxs)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[(0,xe.jsx)(_t,{detail:"Persisted conversations",icon:za,label:"Conversations",value:ae(t.conversations)}),(0,xe.jsx)(_t,{detail:"Verified people seen here",icon:Ss,label:"People",value:ae(t.actors.length)}),(0,xe.jsx)(_t,{detail:"Persisted model usage",icon:xs,label:"Tokens",value:ae(t.tokens??0)}),(0,xe.jsx)(_t,{detail:"Cumulative conversation runtime",icon:Go,label:"Runtime",value:(0,xe.jsx)(Yo,{value:t.durationMs})})]}),(0,xe.jsx)(Tq,{days:t.activityDays}),(0,xe.jsxs)(O,{children:[(0,xe.jsxs)("div",{className:"flex items-center gap-3 border-b border-white/[0.06] px-4 py-4",children:[(0,xe.jsx)("span",{className:"grid size-9 place-items-center rounded border border-cyan-400/15 bg-cyan-400/[0.06] text-cyan-300",children:(0,xe.jsx)(Fs,{"aria-hidden":"true",size:16})}),(0,xe.jsxs)("div",{children:[(0,xe.jsx)("h3",{className:"m-0 font-mono text-xs font-medium uppercase tracking-[0.14em] text-dashboard-text-muted",children:"People seen here"}),(0,xe.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs text-dashboard-text-muted",children:"Verified contributors across persisted conversations."})]})]}),t.actors.length?(0,xe.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3",children:t.actors.slice(0,9).map((n,o)=>{let a=[n.actor.email,n.actor.slackUserId,n.actor.slackUserName,n.actor.fullName,o].join(":"),r=(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)("div",{className:"truncate font-display text-base font-medium text-dashboard-text",children:n.label}),(0,xe.jsxs)("div",{className:"mt-1 font-mono text-xs text-dashboard-text-muted",children:[ae(n.conversations)," conversations /"," ",(0,xe.jsx)(Yo,{value:n.durationMs})]})]}),i="min-w-0 border-b border-r border-white/[0.055] px-4 py-3.5 transition-colors hover:bg-white/[0.03]";return n.actor.email?(0,xe.jsx)(Fe,{className:`${i} text-inherit no-underline`,to:Dr(n.actor.email),children:r},a):(0,xe.jsx)("div",{className:i,children:r},a)})}):(0,xe.jsx)("div",{className:"p-4",children:(0,xe.jsx)(an,{children:"No verified people have been recorded here."})})]})]})}var _y=w(Y(),1);var bd=w(k(),1);function wy(e){return(0,bd.jsxs)("label",{className:"grid h-9 min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center overflow-hidden rounded-lg border border-white/10 bg-white/[0.025] transition-colors hover:border-white/20 focus-within:border-amber-500/35 focus-within:ring-1 focus-within:ring-amber-500/15",children:[(0,bd.jsx)("span",{className:"flex h-full items-center border-r border-white/[0.07] px-2 font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:"Sort"}),(0,bd.jsx)("select",{"aria-label":e.ariaLabel,className:"h-full min-w-0 bg-dashboard-control px-2 font-mono text-xs text-dashboard-text-muted outline-none [color-scheme:dark]",value:e.value,onChange:t=>e.onChange(t.currentTarget.value),children:e.options.map(t=>(0,bd.jsx)("option",{className:"bg-dashboard-control text-dashboard-text",value:t.value,children:t.label},t.value))})]})}var ar=w(k(),1);function qq(e){let t=e.wideRuntime?"grid-cols-[minmax(14rem,1fr)_repeat(2,minmax(5rem,auto))_minmax(8rem,auto)] max-md:grid-cols-3":"grid-cols-[minmax(14rem,1fr)_repeat(3,minmax(5rem,auto))] max-md:grid-cols-3";return(0,ar.jsxs)("div",{"aria-label":"Loading sorted results",className:"min-w-0 animate-pulse",role:"status",children:[Array.from({length:5},(n,o)=>(0,ar.jsxs)("div",{"aria-hidden":"true",className:`grid min-w-0 ${t} items-center gap-4 border-b border-white/[0.055] px-4 py-3.5 last:border-b-0 max-md:gap-x-3 max-md:gap-y-4`,children:[(0,ar.jsxs)("div",{className:"flex min-w-0 items-center gap-3 max-md:col-span-3",children:[(0,ar.jsx)("span",{className:"size-9 shrink-0 rounded bg-white/[0.07]"}),(0,ar.jsxs)("div",{className:"grid min-w-0 flex-1 gap-2",children:[(0,ar.jsx)("span",{className:"h-3.5 w-2/5 rounded bg-white/[0.08]"}),(0,ar.jsx)("span",{className:"h-2.5 w-3/5 rounded bg-white/[0.045]"})]})]}),[0,1,2].map(a=>(0,ar.jsx)("span",{className:"h-4 w-10 justify-self-end rounded bg-white/[0.06]"},a))]},o)),(0,ar.jsx)("span",{className:"sr-only",children:"Loading sorted results"})]})}var Fa=w(k(),1),zq="grid-cols-[minmax(14rem,1fr)_repeat(2,minmax(5rem,auto))_minmax(8rem,auto)]";function Ey(e){return(0,Fa.jsx)("div",{className:S("grid min-w-0 gap-2 border-b border-white/[0.06] bg-black/15 p-3",e.columnsClassName),children:e.children})}function ky(e){return e.loading?(0,Fa.jsx)(qq,{wideRuntime:!0}):e.empty?(0,Fa.jsx)("div",{className:"p-4",children:e.empty}):(0,Fa.jsxs)("div",{"aria-label":e.ariaLabel,className:"min-w-0",children:[(0,Fa.jsx)("div",{"aria-hidden":"true",className:S("grid items-center gap-4 border-b border-white/[0.06] bg-black/20 px-4 py-2.5 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted max-md:hidden",zq),children:e.headers.map((t,n)=>(0,Fa.jsx)("div",{className:n?"justify-self-end":void 0,children:t},t))}),e.children]})}function Qy(e){return(0,Fa.jsx)(Fe,{className:S("group grid min-w-0 items-center gap-4 border-b border-white/[0.055] px-4 py-3.5 text-inherit no-underline transition-colors last:border-b-0 hover:bg-white/[0.035] max-md:grid-cols-3 max-md:gap-x-3 max-md:gap-y-4",zq),to:e.to,children:e.children})}function Iy(e){return(0,Fa.jsxs)("div",{className:"flex min-w-0 items-center gap-3 max-md:col-span-3",children:[(0,Fa.jsx)("span",{className:S("grid size-9 shrink-0 place-items-center rounded border border-white/10 transition-colors",e.iconClassName),children:e.icon}),(0,Fa.jsxs)("div",{className:"min-w-0",children:[(0,Fa.jsx)("div",{className:"truncate font-display text-base font-medium leading-tight text-dashboard-text",children:e.title}),e.description?(0,Fa.jsx)("div",{className:"mt-1 truncate font-mono text-xs leading-tight text-dashboard-text-muted",children:e.description}):null]})]})}var hd=w(k(),1);function qA(e){return(0,hd.jsxs)("div",{className:"justify-self-end text-right max-md:justify-self-stretch max-md:text-left",children:[(0,hd.jsx)("div",{"aria-hidden":"true",className:"mb-1 hidden font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted max-md:block",children:e.label}),(0,hd.jsxs)("div",{className:"font-display text-xl font-light leading-none text-dashboard-text md:font-mono md:text-xs md:text-dashboard-text-muted",children:[(0,hd.jsxs)("span",{className:"sr-only",children:[e.label,": "]}),e.value]})]})}var Cn=w(k(),1);function Yq(e){return(0,Cn.jsxs)(O,{children:[(0,Cn.jsx)(Io,{description:`${e.locations.length} of ${e.totalLocations} public locations`,title:"Public directory"}),(0,Cn.jsxs)(Ey,{columnsClassName:"md:grid-cols-[minmax(14rem,1fr)_minmax(11rem,15rem)]",children:[(0,Cn.jsx)(Hr,{label:"Search locations",placeholder:"Search channel name...",value:e.query,onChange:e.onQueryChange}),(0,Cn.jsx)(wy,{ariaLabel:"Sort locations",onChange:t=>e.onSortChange(t),options:[{label:"Most conversations",value:"conversations"},{label:"Recently active",value:"recent"},{label:"Most tokens",value:"tokens"},{label:"Most runtime",value:"runtime"}],value:e.sort})]}),(0,Cn.jsx)(ky,{ariaLabel:"Public location directory results",empty:e.locations.length===0?(0,Cn.jsx)(an,{children:"No public locations match this search."}):void 0,headers:["Location","Conversations","Tokens","Runtime"],loading:e.loading,children:e.locations.map(t=>(0,Cn.jsxs)(Qy,{to:nU(t.id),children:[(0,Cn.jsx)(Iy,{description:(0,Cn.jsxs)(Cn.Fragment,{children:["Last active ",ed(t.lastSeenAt)]}),icon:(0,Cn.jsx)(Lp,{"aria-hidden":"true",size:16,strokeWidth:1.8}),iconClassName:"bg-cyan-400/[0.06] text-cyan-300 group-hover:border-cyan-400/25",title:t.label}),(0,Cn.jsx)(qA,{label:"Conversations",value:ae(t.conversations)}),(0,Cn.jsx)(qA,{label:"Tokens",value:ae(t.tokens??0)}),(0,Cn.jsx)(qA,{label:"Runtime",value:(0,Cn.jsx)(Yo,{value:t.durationMs})})]},t.id))})]})}var vo=w(k(),1);function Kq(e){return(0,vo.jsx)(O,{className:"opacity-80",padding:"sm",children:(0,vo.jsxs)("div",{className:"grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 max-sm:grid-cols-[auto_minmax(0,1fr)]",children:[(0,vo.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded border border-white/[0.08] bg-white/[0.025] text-dashboard-text-muted",children:(0,vo.jsx)(Bi,{"aria-hidden":"true",size:15})}),(0,vo.jsxs)("div",{className:"min-w-0",children:[(0,vo.jsx)("div",{className:"font-display text-base font-medium text-dashboard-text",children:"Private activity"}),(0,vo.jsx)("div",{className:"mt-1 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"DMs, private channels, and unknown visibility stay combined and unlinked."})]}),(0,vo.jsxs)("div",{className:"text-right max-sm:col-start-2 max-sm:text-left",children:[(0,vo.jsx)("div",{className:"font-display text-2xl font-light text-dashboard-text",children:ae(e.item.conversations)}),(0,vo.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:"conversations"})]})]})})}var on=w(k(),1),wge=["conversations","recent","runtime","tokens"];function Jq(){let e=IM();return(0,on.jsx)(Ege,{data:e.data,error:e.error})}function Ege(e){let[t,n]=(0,_y.useState)(90),[o,a]=Zs("sort","conversations",wge),r=(0,_y.useDeferredValue)(o),[i,A,s]=FA();if(!e.data&&!e.error)return(0,on.jsx)(Qe,{label:"Loading locations"});let c=kge(e.data?.locations??[],s,r),u=e.data?.activityDays.slice(-t)??[],l=e.data?.locations.reduce((g,m)=>g+m.conversations,0)??0,p=e.data?.locations.reduce((g,m)=>g+m.durationMs,0)??0;return(0,on.jsxs)(OA,{children:[(0,on.jsx)(St,{actions:(0,on.jsx)(nr,{onChange:n,value:t}),description:e.error&&!e.data?"Locations failed to load.":`See the public channels where ${it()} has been working and how busy they've been.`,title:"Locations"}),e.error?(0,on.jsx)(O,{padding:"sm",children:(0,on.jsx)(an,{children:e.data?"Location telemetry refresh failed. Showing cached data.":"Location telemetry is unavailable. Try refreshing the dashboard."})}):null,e.data?(0,on.jsxs)(on.Fragment,{children:[(0,on.jsxs)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[(0,on.jsx)(_t,{detail:"Named public destinations",icon:jp,label:"Public locations",value:ae(e.data.locations.length)}),(0,on.jsx)(_t,{detail:"Across public destinations",icon:za,label:"Conversations",value:ae(l)}),(0,on.jsx)(_t,{detail:"Cumulative public runtime",icon:Go,label:"Runtime",value:(0,on.jsx)(Yo,{value:p})}),(0,on.jsx)(_t,{detail:"Combined to preserve privacy",icon:Bi,label:"Private conversations",value:ae(e.data.privateActivity.conversations)})]}),(0,on.jsx)(my,{days:u}),(0,on.jsx)(Yq,{loading:o!==r,locations:c,onQueryChange:A,onSortChange:a,query:i,sort:o,totalLocations:e.data.locations.length}),e.data.privateActivity.conversations>0?(0,on.jsx)(Kq,{item:e.data.privateActivity}):null]}):null]})}function kge(e,t,n){let o=t.trim().toLowerCase();return[...o?e.filter(r=>r.label.toLowerCase().includes(o)):e].sort((r,i)=>n==="conversations"?i.conversations-r.conversations:n==="runtime"?i.durationMs-r.durationMs:n==="tokens"?(i.tokens??0)-(r.tokens??0):Date.parse(i.lastSeenAt)-Date.parse(r.lastSeenAt))}var vy=w(Y(),1);var gn=w(k(),1);function Zq(e){return e.actor.fullName??e.actor.slackUserName??e.actor.email}function Qge(e){return Zq(e)===e.actor.email?void 0:e.actor.email}function Wq(e,t,n){if(e<=0&&t>0)return"unknown";let o=ho(e);return n?o.split(" ").slice(0,n).join(" "):o}function Vq(e,t,n){let o=t.trim().toLowerCase();return[...o?e.filter(r=>[r.actor.email,r.actor.fullName,r.actor.slackUserName].some(i=>i?.toLowerCase().includes(o))):e].sort((r,i)=>n==="conversations"?i.conversations-r.conversations:n==="activeDays"?i.activeDays-r.activeDays:n==="runtime"?i.durationMs-r.durationMs:Date.parse(i.lastSeenAt)-Date.parse(r.lastSeenAt))}function Xq(e){return(0,gn.jsxs)(O,{children:[(0,gn.jsx)(Io,{description:`${e.people.length} of ${e.totalPeople} verified actors`,title:"People directory"}),(0,gn.jsxs)(Ey,{columnsClassName:"md:grid-cols-[minmax(14rem,1fr)_minmax(10rem,14rem)]",children:[(0,gn.jsx)(Hr,{label:"Search people",placeholder:"Search name, email, Slack handle...",value:e.query,onChange:e.onQueryChange}),(0,gn.jsx)(wy,{ariaLabel:"Sort people",onChange:t=>e.onSortChange(t),options:[{label:"Most conversations",value:"conversations"},{label:"Recently active",value:"recent"},{label:"Most active days",value:"activeDays"},{label:"Most runtime",value:"runtime"}],value:e.sort})]}),(0,gn.jsx)(ky,{ariaLabel:"People directory results",empty:e.people.length===0?(0,gn.jsx)(an,{children:"No people match this search."}):void 0,headers:["Person","Conversations","Active days","Runtime"],loading:e.loading,children:e.people.map(t=>(0,gn.jsxs)(Qy,{to:Dr(t.actor.email),children:[(0,gn.jsx)(Iy,{description:Qge(t),icon:(0,gn.jsx)(_a,{"aria-hidden":"true",size:16,strokeWidth:1.8}),iconClassName:"bg-amber-500/[0.07] text-amber-300 group-hover:border-amber-500/25",title:Zq(t)}),(0,gn.jsx)(qA,{label:"Conversations",value:ae(t.conversations)}),(0,gn.jsx)(qA,{label:"Active days",value:ae(t.activeDays)}),(0,gn.jsx)(qA,{label:"Runtime",value:(0,gn.jsxs)(gn.Fragment,{children:[(0,gn.jsx)("span",{className:"whitespace-nowrap md:hidden",children:Wq(t.durationMs,t.conversations,2)}),(0,gn.jsx)("span",{className:"hidden whitespace-nowrap md:inline",children:Wq(t.durationMs,t.conversations)})]})})]},t.actor.email))})]})}var Yt=w(k(),1),Ige=["activeDays","conversations","recent","runtime"];function ez(){let e=EM();return(0,Yt.jsx)(_ge,{data:e.data,error:e.error})}function _ge(e){let[t,n,o]=FA(),[a,r]=(0,vy.useState)(90),[i,A]=Zs("sort","conversations",Ige),s=(0,vy.useDeferredValue)(i);if(!e.data&&!e.error)return(0,Yt.jsx)(Qe,{label:"Loading people"});let c=e.data,u=c?.activityDays.slice(-a)??[],l=c?Vq(c.people,o,s):[],p=c?.people.reduce((f,b)=>f+b.conversations,0)??0,g=c?.people.reduce((f,b)=>f+b.durationMs,0)??0,m=u[0]?.date,h=m?c?.people.filter(f=>f.lastSeenAt.slice(0,10)>=m).length??0:0,y=Math.max(0,...u.map(f=>f.activePeople));return(0,Yt.jsxs)(OA,{children:[(0,Yt.jsx)(St,{actions:(0,Yt.jsx)(nr,{onChange:r,value:a}),description:e.error?"People failed to load.":`See who's been working with ${it()}, how often, and for how long.`,title:"People"}),e.error?(0,Yt.jsx)(O,{padding:"md",children:(0,Yt.jsx)(an,{children:"People telemetry is unavailable. Try refreshing the dashboard."})}):c?.people.length?(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsxs)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[(0,Yt.jsx)(_t,{detail:`Verified actors seen in the last ${a} days`,icon:Ss,label:"Active people",value:ae(h)}),(0,Yt.jsx)(_t,{detail:"Across the complete conversation index",icon:za,label:"Conversations",value:ae(p)}),(0,Yt.jsx)(_t,{detail:"Cumulative persisted conversation runtime",icon:Go,label:"Total runtime",value:(0,Yt.jsx)(Yo,{value:g})}),(0,Yt.jsx)(_t,{detail:`Highest distinct daily count in ${a} days`,icon:jo,label:"Peak daily active",value:ae(y)})]}),(0,Yt.jsx)(by,{days:u}),(0,Yt.jsx)(Xq,{loading:i!==s,onQueryChange:n,onSortChange:A,people:l,query:t,sort:i,totalPeople:c.people.length})]}):(0,Yt.jsx)(O,{padding:"md",children:(0,Yt.jsx)(an,{children:"No actor telemetry with trusted email."})})]})}var Dy=w(Y(),1);var Ct=w(k(),1),xy=["dashboard","personal-tokens"];function tz(){let e=Un(),t=(0,Dy.useRef)(!1),[n,o]=(0,Dy.useState)("Local agent"),a=()=>e.cancelQueries({exact:!0,queryKey:xy}),r=ct({queryKey:xy,queryFn:({signal:g})=>rt(gD,"/api/personal-tokens",g),retry:!1}),i=sr({gcTime:0,mutationFn:g=>bM(mD,"/api/personal-tokens",{name:g}),onMutate:()=>a(),onSuccess:async g=>{let{token:m,...h}=g;await a(),e.setQueryData(xy,y=>({tokens:[h,...(y?.tokens??[]).filter(f=>f.id!==h.id)]}))},onSettled:()=>{t.current=!1}}),A=sr({mutationFn:g=>Ju(`/api/personal-tokens/${encodeURIComponent(g.id)}`),onMutate:()=>a(),onSuccess:async(g,m)=>{await a(),e.setQueryData(xy,h=>({tokens:(h?.tokens??[]).filter(y=>y.id!==m.id)})),i.data?.id===m.id&&i.reset()}}),s=i.data,c=r.data?.tokens??[],u=r.isPending,l=i.isPending||A.isPending,p=(i.isError?"Could not create the API token. Try again.":A.isError?"Could not revoke the API token. Try again.":void 0)??(!r.data&&r.isError?"Could not load API tokens. Try again.":void 0);return(0,Ct.jsx)("div",{className:`${Ft} px-4 py-8 md:px-8`,children:(0,Ct.jsxs)("section",{className:"mx-auto w-full max-w-3xl",children:[(0,Ct.jsx)("h1",{className:"m-0 text-2xl font-bold",children:"Personal API Tokens"}),(0,Ct.jsxs)("p",{className:"mt-2 mb-0 max-w-2xl text-sm text-dashboard-text-muted",children:["Use a token to read ",it()," APIs from a local agent or script. Tokens expire after 90 days."]}),(0,Ct.jsxs)("div",{className:"mt-6 rounded-lg border border-white/15 bg-dashboard-surface-raised p-5",children:[s?(0,Ct.jsxs)("div",{className:"mt-5 rounded border border-emerald-400/40 bg-emerald-400/5 p-3",children:[(0,Ct.jsx)("p",{className:"mt-0 mb-2 text-sm font-semibold",children:"Copy this token now. It won't be shown again."}),(0,Ct.jsx)("code",{className:"block overflow-x-auto rounded bg-black p-2 text-xs text-emerald-300",children:s.token}),(0,Ct.jsx)(pt,{className:"mt-3",onClick:()=>{i.reset(),o("Local agent")},children:"Create another token"})]}):(0,Ct.jsxs)("div",{className:"mt-5 flex gap-2",children:[(0,Ct.jsx)("input",{"aria-label":"Token name",className:"min-w-0 flex-1 rounded border border-white/15 bg-black px-3 py-2 text-sm text-dashboard-text",maxLength:80,onChange:g=>o(g.target.value),value:n}),(0,Ct.jsx)(pt,{disabled:u||l||!n.trim(),onClick:()=>{t.current||(A.reset(),t.current=!0,i.mutate(n))},children:"Create token"})]}),p?(0,Ct.jsx)("p",{className:"mb-0 text-sm text-rose-300",children:p}):null,(0,Ct.jsx)("div",{className:"mt-5 space-y-2",children:u?(0,Ct.jsx)("p",{className:"text-sm text-dashboard-text-muted",children:"Loading API tokens\u2026"}):c.length===0?(0,Ct.jsx)("p",{className:"text-sm text-dashboard-text-muted",children:"No active API tokens."}):c.map(g=>(0,Ct.jsxs)("div",{className:"flex items-center gap-3 rounded border border-white/10 p-3",children:[(0,Ct.jsx)(Ho,{className:"text-[#beaaff]",size:16}),(0,Ct.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,Ct.jsx)("p",{className:"m-0 truncate text-sm font-semibold",children:g.name}),(0,Ct.jsxs)("p",{className:"mt-1 mb-0 text-xs text-dashboard-text-muted",children:["Ends in ",g.tokenSuffix," \xB7 Expires"," ",new Date(g.expiresAt).toLocaleDateString()]})]}),(0,Ct.jsx)("button",{"aria-label":`Revoke ${g.name}`,className:"cursor-pointer border-0 bg-transparent p-1 text-dashboard-text-muted hover:text-rose-300",disabled:l,onClick:()=>{i.isError&&i.reset(),A.mutate(g)},type:"button",children:(0,Ct.jsx)(Uo,{size:16})})]},g.id))})]})]})})}var oz=w(Y(),1);var Ug=w(k(),1);function ZF(e){return(0,Ug.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-white/[0.06] bg-black/15 px-4 py-3 max-md:flex-col max-md:items-stretch",children:[(0,Ug.jsx)("div",{className:"min-w-0",children:e.children}),e.actions?(0,Ug.jsx)("div",{className:"shrink-0 max-md:w-full",children:e.actions}):null]})}var Tg=w(k(),1);function zA(e){return(0,Tg.jsxs)("div",{className:e.className,children:[(0,Tg.jsx)("h2",{className:"m-0 font-display text-xl font-medium tracking-[-0.02em] text-dashboard-text",id:e.id,children:e.title}),e.description?(0,Tg.jsx)("p",{className:"mt-1.5 mb-0 max-w-2xl font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.description}):null]})}var nz=w(k(),1);function VF(e){return(0,nz.jsx)("div",{className:"min-w-0 break-words font-mono text-xs font-medium uppercase leading-tight tracking-[0.14em] text-dashboard-text-muted",children:e.children})}var ce=w(k(),1);function vge(e,t){return e<=0&&t>0?"unknown":ho(e)}function rz(){let e=qn(),t=e.email?decodeURIComponent(e.email):void 0,n=kM(t);return!n.data&&!n.error?(0,ce.jsx)(Qe,{label:"Loading profile"}):(0,ce.jsx)(yy,{children:n.data?(0,ce.jsx)(xge,{profile:n.data}):(0,ce.jsx)(O,{padding:"md",children:(0,ce.jsx)(an,{children:"Profile failed to load."})})})}function xge(e){let[t,n]=(0,oz.useState)(30),o=e.profile,a=o.actor.fullName??o.actor.slackUserName??o.actor.email;return(0,ce.jsxs)("div",{className:"grid min-w-0 gap-5",children:[(0,ce.jsxs)(Fe,{className:"flex w-fit items-center gap-2 font-display text-sm font-medium text-dashboard-text-muted no-underline transition-colors hover:text-dashboard-text",to:"/system/people",children:[(0,ce.jsx)(wr,{"aria-hidden":"true",size:15,strokeWidth:1.8}),"Back to people"]}),(0,ce.jsx)(St,{actions:(0,ce.jsx)(nr,{onChange:n,value:t}),description:(0,ce.jsxs)(ce.Fragment,{children:[o.actor.email,o.actor.slackUserName?` / @${o.actor.slackUserName}`:""]}),title:a}),(0,ce.jsxs)("section",{className:"grid gap-4","aria-labelledby":"profile-metrics-title",children:[(0,ce.jsx)(zA,{id:"profile-metrics-title",title:"Usage over time"}),(0,ce.jsx)(fd,{days:o.activityDays.slice(-t)})]}),(0,ce.jsxs)("div",{className:"grid min-w-0 gap-5 lg:grid-cols-[minmax(0,1fr)_19rem] lg:items-start",children:[(0,ce.jsx)("aside",{className:"grid min-w-0 gap-4 lg:order-2",children:(0,ce.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3 lg:grid-cols-1",children:[(0,ce.jsx)(_t,{detail:"Across the complete conversation index",icon:za,label:"Conversations",value:ae(o.totals.conversations)}),(0,ce.jsx)(_t,{detail:"Cumulative persisted conversation runtime",icon:Go,label:"Runtime",value:(0,ce.jsx)(Yo,{value:o.totals.durationMs})}),(0,ce.jsx)(_t,{detail:"Persisted model token usage",icon:xs,label:"Tokens",value:ae(o.totals.tokens??0)})]})}),(0,ce.jsxs)("div",{className:"grid min-w-0 gap-5 lg:order-1",children:[(0,ce.jsxs)(O,{as:"section",className:"mb-0",variant:"section",children:[(0,ce.jsx)(ZF,{actions:(0,ce.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:"52 weeks"}),children:(0,ce.jsx)(VF,{children:"Activity"})}),(0,ce.jsx)(fy,{days:o.activityDays})]}),(0,ce.jsxs)("div",{className:"grid min-w-0 gap-5 md:grid-cols-2",children:[(0,ce.jsx)(az,{items:o.locations,title:"Places"}),(0,ce.jsx)(az,{items:o.surfaces,title:"Surfaces"})]})]})]})]})}function az(e){return e.items.length<=1?null:(0,ce.jsxs)(O,{as:"section",className:"mb-0",variant:"section",children:[(0,ce.jsx)(ZF,{children:(0,ce.jsx)(VF,{children:e.title})}),(0,ce.jsx)("ol",{className:"m-0 list-none p-0",children:e.items.slice(0,6).map((t,n)=>(0,ce.jsxs)("li",{className:"grid min-w-0 grid-cols-[2rem_minmax(0,1fr)_auto] items-center gap-3 border-b border-white/[0.06] px-4 py-3 last:border-b-0",children:[(0,ce.jsx)("div",{className:"font-mono text-xs leading-none text-dashboard-text-muted",children:n+1}),(0,ce.jsxs)("div",{className:"min-w-0",children:[(0,ce.jsx)("div",{className:"truncate font-display text-base font-medium leading-tight text-dashboard-text",children:t.label}),(0,ce.jsxs)("div",{className:"mt-1 truncate font-mono text-xs leading-tight text-dashboard-text-muted",children:[vge(t.durationMs,t.conversations),t.tokens?` / ${ae(t.tokens)} tokens`:"",t.failed?` / ${ae(t.failed)} errors`:""]})]}),(0,ce.jsx)("div",{className:"font-display text-xl font-light leading-none text-dashboard-text",children:ae(t.conversations)})]},t.label))})]})}var hz=w(Y(),1);var Mt=w(k(),1);function Az(e){return(0,Mt.jsxs)("section",{"aria-labelledby":"plugin-details-heading",className:"grid gap-3",children:[(0,Mt.jsx)(zA,{className:"px-1",id:"plugin-details-heading",title:"Details"}),(0,Mt.jsxs)(O,{children:[(0,Mt.jsxs)("div",{className:"grid grid-cols-1 gap-px bg-white/[0.055] sm:grid-cols-3",children:[(0,Mt.jsx)(XF,{icon:qa,label:"Identifier",value:e.plugin.name}),(0,Mt.jsx)(XF,{icon:Yn,label:"Skills",value:String(e.plugin.skills.length)}),(0,Mt.jsx)(XF,{icon:Ho,label:"Configuration",value:String(e.plugin.configKeys.length)})]}),(0,Mt.jsxs)("div",{className:"grid gap-5 border-t border-white/[0.06] p-4 sm:p-5 lg:grid-cols-2",children:[(0,Mt.jsx)(iz,{emptyText:"No plugin-provided skills were discovered.",items:e.plugin.skills.map(t=>t.name),title:"Skills"}),e.plugin.configKeys.length?(0,Mt.jsx)("div",{className:"lg:col-span-2",children:(0,Mt.jsx)(iz,{emptyText:"",items:e.plugin.configKeys,title:"Configuration keys"})}):null]})]})]})}function XF(e){let t=e.icon;return(0,Mt.jsxs)("div",{className:"flex items-center gap-3 bg-dashboard-surface-panel px-4 py-3.5",children:[(0,Mt.jsx)(t,{"aria-hidden":"true",className:"text-cyan-200/60",size:15}),(0,Mt.jsxs)("div",{className:"min-w-0",children:[(0,Mt.jsx)("div",{className:"truncate font-display text-base font-medium text-dashboard-text",children:e.value}),(0,Mt.jsx)("div",{className:"mt-0.5 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:e.label})]})]})}function iz(e){return(0,Mt.jsxs)("div",{children:[(0,Mt.jsx)("h3",{className:"m-0 font-mono text-xs font-medium uppercase tracking-[0.12em] text-dashboard-text-muted",children:e.title}),e.items.length?(0,Mt.jsx)("div",{className:"mt-2.5 flex flex-wrap gap-2",children:e.items.map(t=>(0,Mt.jsx)("span",{className:"rounded border border-white/[0.07] bg-black/20 px-2.5 py-1.5 font-mono text-xs text-dashboard-text-muted",children:t},t))}):(0,Mt.jsx)("p",{className:"mt-2 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.emptyText})]})}var vt=w(k(),1);function sz(e){return(0,vt.jsx)("section",{"aria-label":"Plugins",className:"grid gap-3",children:e.plugins.length?(0,vt.jsx)("div",{className:"grid gap-3",children:e.plugins.map(t=>(0,vt.jsx)(Dge,{plugin:t},t.name))}):(0,vt.jsx)(O,{padding:"md",children:(0,vt.jsx)("div",{className:"font-mono text-xs text-dashboard-text-muted",children:"No plugin inventory has been reported yet."})})})}function Dge(e){let t=e.plugin.reports.flatMap(n=>n.metrics??[]);return(0,vt.jsxs)(Fe,{className:"group grid min-w-0 gap-4 rounded-lg border border-white/[0.07] bg-dashboard-surface-panel/85 p-4 no-underline transition-colors hover:border-cyan-300/20 hover:bg-cyan-300/[0.025] sm:p-5",to:Cy(e.plugin.name),children:[(0,vt.jsxs)("div",{className:"flex min-w-0 items-start justify-between gap-4",children:[(0,vt.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,vt.jsx)("div",{className:"grid size-9 shrink-0 place-items-center rounded border border-cyan-300/15 bg-cyan-300/[0.075] text-cyan-200",children:(0,vt.jsx)(qa,{"aria-hidden":"true",size:16,strokeWidth:1.8})}),(0,vt.jsxs)("div",{className:"min-w-0",children:[(0,vt.jsx)("h3",{className:"m-0 truncate font-display text-lg font-medium text-dashboard-text",children:e.plugin.displayName}),(0,vt.jsx)("p",{className:"mt-1 mb-0 line-clamp-2 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.plugin.description})]})]}),(0,vt.jsx)(Ep,{"aria-hidden":"true",className:"mt-1 shrink-0 text-dashboard-text-muted transition-transform group-hover:translate-x-0.5 group-hover:text-cyan-200/70",size:16})]}),t.length?(0,vt.jsx)("div",{className:`grid ${t.length===1?"grid-cols-1":"grid-cols-2"} gap-px overflow-hidden rounded border border-white/[0.06] bg-white/[0.055]`,children:t.slice(0,2).map(n=>(0,vt.jsxs)("div",{className:"min-w-0 bg-dashboard-surface-panel px-3 py-2.5",children:[(0,vt.jsx)("div",{className:"truncate font-display text-lg font-light text-dashboard-text",children:n.value}),(0,vt.jsx)("div",{className:"mt-1 truncate font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:n.label})]},n.label))}):null,(0,vt.jsx)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 border-t border-white/[0.055] pt-3",children:(0,vt.jsx)(Fge,{icon:Yn,label:`${e.plugin.skills.length} skills`})})]})}function Fge(e){let t=e.icon;return(0,vt.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs uppercase tracking-[0.08em] text-dashboard-text-muted",children:[(0,vt.jsx)(t,{"aria-hidden":"true",size:11}),e.label]})}var xn=w(k(),1),Fy=["#67e8f9","#6ee7b7","#fbbf24","#fb7185","#a78bfa"],cz={danger:"#fb7185",good:"#6ee7b7",neutral:"#67e8f9",warning:"#fbbf24"};function dz(e){let{widget:t}=e,n=t.timeRangeDays?t.categories.slice(-Sge(t,e.range)):t.categories,o=$ge(t),a=520,r=250,i=o==="usd"?72:56,A=16,c=r-A-36,u=(a-i-12)/n.length,l=Math.min(72,u*.72),p=l/t.series.length,g=n.flatMap(B=>t.series.map(C=>B.values[C.key]??0)),m=Math.min(0,...g),h=Math.max(0,...g),y=h===m?m+1:h,f=y-m,b=A+y/f*c;return(0,xn.jsxs)("div",{className:"overflow-hidden rounded border border-white/[0.07] bg-dashboard-surface-panel",children:[(0,xn.jsxs)("div",{className:"border-b border-white/[0.06] px-4 py-3",children:[(0,xn.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:(0,xn.jsx)("h4",{className:"m-0 font-mono text-xs font-medium uppercase tracking-[0.14em] text-dashboard-text-muted",children:t.title})}),t.description?(0,xn.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs text-dashboard-text-muted",children:t.description}):null,t.series.length>1?(0,xn.jsx)("div",{"aria-label":"Chart legend",className:"mt-3 flex flex-wrap gap-3",children:t.series.map((B,C)=>(0,xn.jsxs)("span",{className:"flex items-center gap-1.5 font-mono text-xs text-dashboard-text-muted",children:[(0,xn.jsx)("i",{className:"size-2 rounded-sm",style:{backgroundColor:B.tone?cz[B.tone]:Fy[C%Fy.length]}}),B.label]},B.key))}):null]}),n.length===0?(0,xn.jsx)("p",{className:"m-0 p-4 font-mono text-xs text-dashboard-text-muted",children:t.emptyText??"No chart data."}):(0,xn.jsxs)("svg",{"aria-label":t.title,className:"block h-auto min-h-48 w-full",role:"img",viewBox:`0 0 ${a} ${r}`,children:[[y,y-f/2,m].map((B,C)=>{let E=A+C*(c/2);return(0,xn.jsxs)("g",{children:[(0,xn.jsx)("line",{stroke:"rgba(255,255,255,0.07)",strokeDasharray:"3 5",x1:i,x2:a-12,y1:E,y2:E}),(0,xn.jsx)("text",{fill:"rgba(255,255,255,0.35)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:"end",x:i-6,y:E+3,children:uz(B,o)})]},C)}),n.flatMap((B,C)=>t.series.map((E,x)=>{let Q=B.values[E.key]??0,R=Math.max(Q?2:0,Math.abs(Q)/f*c),q=uz(Q,E.format);return(0,xn.jsx)(gt,{content:`${E.label}: ${q}`,label:B.label,children:(0,xn.jsx)("rect",{"aria-label":`${B.label}, ${E.label}: ${q}`,fill:E.tone?cz[E.tone]:Fy[x%Fy.length],height:R,opacity:Q?.82:.1,rx:"1.5",tabIndex:Q?0:-1,width:p*.75,x:i+C*u+(u-l)/2+x*p,y:Q>=0?b-R:b})},`${B.id}:${E.key}`)})),Lge(n.length).map(B=>{let C=n[B];return(0,xn.jsx)("text",{fill:"rgba(255,255,255,0.4)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:"middle",x:i+B*u+u/2,y:r-9,children:Rge(C.label)},C.id)})]})]})}function Sge(e,t){let n=e.timeRangeDays??[];return t&&n.includes(t)?t:n.includes(30)?30:n[0]??30}function Lge(e){return[0,Math.floor((e-1)/2),e-1].filter((t,n,o)=>t>=0&&o.indexOf(t)===n)}function Rge(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00.000Z`).toLocaleDateString(void 0,{day:"numeric",month:"short",timeZone:"UTC"}):e}function Nge(e){return String(Number(e.toPrecision(12)))}function $ge(e){return new Set(e.series.map(n=>n.format)).size===1?e.series[0]?.format:void 0}function uz(e,t){return t==="usd"?Qt({total:e}):Nge(e)}var re=w(k(),1);function pz(e){return e.reports.length===0&&!e.emptyText?null:e.reports.length===0?(0,re.jsx)(O,{padding:"md",children:(0,re.jsxs)("div",{className:"flex items-center gap-4",children:[(0,re.jsx)("div",{className:"grid size-10 shrink-0 place-items-center rounded border border-white/[0.07] bg-white/[0.025] text-dashboard-text-muted",children:(0,re.jsx)(Gp,{"aria-hidden":"true",size:17})}),(0,re.jsxs)("div",{children:[(0,re.jsx)("h2",{className:"m-0 font-display text-base font-medium text-dashboard-text-muted",children:"Operational reports"}),(0,re.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.emptyText})]})]})}):(0,re.jsxs)("div",{className:"grid gap-3",children:[(0,re.jsx)(zA,{className:"px-1",title:"Operational reports"}),e.reports.map(t=>(0,re.jsx)(Mge,{fallbackTitle:e.fallbackTitle,range:e.range,report:t},t.pluginName))]})}function Mge(e){let n=(e.report.title===e.report.pluginName?void 0:e.report.title)??e.fallbackTitle??e.report.pluginName,o=e.report.metrics??[];return(0,re.jsxs)(O,{children:[(0,re.jsxs)("div",{className:"flex items-start justify-between gap-4 border-b border-white/[0.06] px-5 py-4",children:[(0,re.jsxs)("div",{className:"min-w-0",children:[(0,re.jsx)("h3",{className:"m-0 truncate font-display text-lg font-medium text-dashboard-text",children:n}),(0,re.jsx)("div",{className:"mt-1 hidden font-mono text-xs text-dashboard-text-muted sm:block",children:e.report.pluginName})]}),e.report.generatedAt?(0,re.jsxs)("div",{className:"hidden shrink-0 font-mono text-xs text-dashboard-text-muted sm:block",children:["updated ",sa(e.report.generatedAt)]}):null]}),o.length?(0,re.jsx)("div",{className:S("grid gap-px bg-white/[0.055]",o.length===1?"grid-cols-1":"grid-cols-2",o.length===3?"lg:grid-cols-3":o.length===5?"lg:grid-cols-5":o.length>=4?"lg:grid-cols-4":void 0),children:o.map(a=>(0,re.jsxs)("div",{className:S("min-w-0 bg-dashboard-surface-panel px-4 py-4",o.length>1&&o.length%2===1&&"last:col-span-2 lg:last:col-span-1",Pge(a.tone)),children:[(0,re.jsx)("div",{className:"truncate font-display text-2xl font-light leading-none text-dashboard-text",children:a.value}),(0,re.jsx)("div",{className:"mt-2 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:a.label})]},a.label))}):null,e.report.widgets?.length?(0,re.jsx)("div",{className:"grid gap-3 border-t border-white/[0.06] bg-black/15 p-3 lg:grid-cols-2",children:e.report.widgets.map(a=>(0,re.jsx)(dz,{range:e.range,widget:a},a.id))}):null,e.report.recordSets?.map(a=>(0,re.jsx)(jge,{recordSet:a},`${e.report.pluginName}:${a.title}`))]})}function jge(e){let t=e.recordSet.fields??[],n=e.recordSet.records??[];return(0,re.jsxs)("div",{className:"border-t border-white/[0.06]",children:[(0,re.jsxs)("div",{className:"flex items-center justify-between gap-4 px-5 py-3",children:[(0,re.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:e.recordSet.title}),(0,re.jsxs)("div",{className:"hidden font-mono text-xs text-dashboard-text-muted sm:block",children:[n.length," records"]})]}),n.length===0?(0,re.jsx)("div",{className:"px-5 pb-5 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.recordSet.emptyText??"No records."}):t.length===0?(0,re.jsx)("div",{className:"px-5 pb-5 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Report records are unavailable because no fields were declared."}):(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)("div",{className:"grid gap-2 border-t border-white/[0.05] p-3 sm:hidden",children:n.map(o=>(0,re.jsx)("div",{className:S("grid gap-3 rounded-md border border-white/[0.06] bg-black/15 p-3",lz(o.tone)),children:t.map(a=>(0,re.jsxs)("div",{children:[(0,re.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:a.label}),(0,re.jsx)("div",{className:"mt-1 break-words font-mono text-xs leading-relaxed text-dashboard-text-muted",children:o.values[a.key]??""})]},a.key))},o.id))}),(0,re.jsx)("div",{className:"hidden overflow-x-auto border-t border-white/[0.05] sm:block",children:(0,re.jsxs)("table",{className:"w-full min-w-[36rem] border-collapse text-left",children:[(0,re.jsx)("thead",{className:"bg-black/15 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:(0,re.jsx)("tr",{children:t.map(o=>(0,re.jsx)("th",{className:"border-b border-white/[0.055] px-5 py-2.5 font-medium",scope:"col",children:o.label},o.key))})}),(0,re.jsx)("tbody",{children:n.map(o=>(0,re.jsx)("tr",{className:S("transition-colors hover:bg-white/[0.025]",lz(o.tone)),children:t.map(a=>(0,re.jsx)("td",{className:"max-w-72 truncate border-b border-white/[0.05] px-5 py-3 font-mono text-xs text-dashboard-text-muted",children:o.values[a.key]??""},a.key))},o.id))})]})})]})]})}function Pge(e){return e==="danger"?"shadow-[inset_0_2px_0_rgba(251,113,133,0.65)]":e==="warning"?"shadow-[inset_0_2px_0_rgba(251,191,36,0.65)]":e==="good"?"shadow-[inset_0_2px_0_rgba(110,231,183,0.55)]":""}function lz(e){return e==="danger"?"bg-rose-500/[0.07]":e==="warning"?"bg-amber-300/[0.045]":e==="good"?"bg-emerald-400/[0.055]":""}var We=w(k(),1);function mz(e){let t=Hge(e.skills),n=e.skills.filter(o=>o.pluginProvider).length;return(0,We.jsxs)(O,{children:[(0,We.jsxs)("div",{className:"flex items-start justify-between gap-4 border-b border-white/[0.06] px-5 py-4 max-sm:flex-col",children:[(0,We.jsx)(zA,{description:(0,We.jsxs)(We.Fragment,{children:["The task-specific instructions ",it()," ","discovered, grouped by their plugin provider when one is registered."]}),title:"Skills"}),(0,We.jsxs)("div",{className:"grid min-w-[12rem] grid-cols-2 overflow-hidden rounded-lg border border-white/[0.07] bg-black/15 max-sm:w-full max-sm:min-w-0",children:[(0,We.jsx)(gz,{label:"discovered",value:e.skills.length}),(0,We.jsx)(gz,{label:"from plugins",value:n})]})]}),(0,We.jsx)("div",{className:"grid gap-3 p-3 sm:p-4",children:t.length?t.map(o=>(0,We.jsx)(Gge,{group:o},o.pluginProvider??"standalone")):(0,We.jsx)("div",{className:"rounded-lg border border-dashed border-white/[0.08] px-4 py-8 text-center font-mono text-xs text-dashboard-text-muted",children:"No skills have been discovered yet."})})]})}function Gge(e){let t=e.group.pluginProvider??"Standalone";return(0,We.jsxs)("article",{className:"rounded-lg border border-white/[0.065] bg-white/[0.025] p-4",children:[(0,We.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,We.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,We.jsx)("div",{className:"grid size-8 shrink-0 place-items-center rounded border border-cyan-300/15 bg-cyan-300/[0.075] text-cyan-200",children:e.group.pluginProvider?(0,We.jsx)(qa,{"aria-hidden":"true",size:15,strokeWidth:1.8}):(0,We.jsx)(Yn,{"aria-hidden":"true",size:15,strokeWidth:1.8})}),(0,We.jsxs)("div",{children:[(0,We.jsx)("h3",{className:"m-0 truncate font-display text-base font-medium text-dashboard-text",children:t}),(0,We.jsx)("div",{className:"mt-0.5 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:e.group.pluginProvider?"plugin provider":"core or local"})]})]}),(0,We.jsxs)("span",{className:"font-mono text-xs text-dashboard-text-muted",children:[ae(e.group.skills.length)," skill",e.group.skills.length===1?"":"s"]})]}),(0,We.jsx)("div",{className:"flex flex-wrap gap-2",children:e.group.skills.map(n=>(0,We.jsx)("span",{className:"rounded border border-white/[0.07] bg-black/20 px-2.5 py-1.5 font-mono text-xs text-dashboard-text-muted",children:n.name},n.name))})]})}function gz(e){return(0,We.jsxs)("div",{className:"border-r border-white/[0.06] px-3 py-2.5 text-center last:border-r-0",children:[(0,We.jsx)("div",{className:"font-display text-xl font-light leading-none text-dashboard-text",children:ae(e.value)}),(0,We.jsx)("div",{className:"mt-1.5 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:e.label})]})}function Hge(e){let t=new Map;for(let n of e){let o=t.get(n.pluginProvider)??[];o.push(n),t.set(n.pluginProvider,o)}return[...t.entries()].map(([n,o])=>({pluginProvider:n,skills:[...o].sort((a,r)=>a.name.localeCompare(r.name))})).sort((n,o)=>n.pluginProvider?o.pluginProvider?n.pluginProvider.localeCompare(o.pluginProvider):-1:1)}var be=w(k(),1);function e8(e){return new Date(`${e}T00:00:00.000Z`).toLocaleDateString(void 0,{day:"numeric",month:"short",timeZone:"UTC"})}function Uge(e){return e.reduce((t,n)=>({allow:t.allow+n.allow,ask:t.ask+n.ask,costUsd:t.costUsd+(n.costUsd??0),deny:t.deny+n.deny,requests:t.requests+n.requests}),{allow:0,ask:0,costUsd:0,deny:0,requests:0})}function Og(e){return(0,be.jsxs)("div",{className:"rounded-md border border-white/[0.05] bg-black/10 px-3 py-3",children:[(0,be.jsx)("div",{className:"font-display text-xl font-light text-dashboard-text",children:(0,be.jsx)("span",{className:e.valueClassName,children:e.value})}),(0,be.jsx)("div",{className:"mt-1 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.label})]})}function fz(e){let t=Uge(e.days),n=Math.max(1,...e.days.map(a=>a.requests)),o=[0,Math.floor((e.days.length-1)/2),e.days.length-1].filter((a,r,i)=>a>=0&&i.indexOf(a)===r);return(0,be.jsxs)(O,{children:[(0,be.jsxs)("div",{className:"border-b border-white/[0.06] px-4 py-4",children:[(0,be.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,be.jsxs)("div",{children:[(0,be.jsx)("h3",{className:"m-0 font-mono text-xs font-medium uppercase tracking-[0.14em] text-dashboard-text-muted",children:"Guardian reviews"}),(0,be.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Daily decisions before reviewed actions execute."})]}),(0,be.jsxs)("div",{className:"font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:[(0,be.jsx)("span",{className:"mr-3 text-emerald-200/75",children:"Allow"}),(0,be.jsx)("span",{className:"mr-3 text-amber-200/75",children:"Ask"}),(0,be.jsx)("span",{className:"text-rose-200/75",children:"Deny"})]})]}),(0,be.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-5",children:[(0,be.jsx)(Og,{label:"Requests",value:ae(t.requests)}),(0,be.jsx)(Og,{label:"Allowed",value:ae(t.allow),valueClassName:"text-emerald-100"}),(0,be.jsx)(Og,{label:"Asked",value:ae(t.ask),valueClassName:"text-amber-100"}),(0,be.jsx)(Og,{label:"Denied",value:ae(t.deny),valueClassName:"text-rose-100"}),(0,be.jsx)(Og,{label:"Estimated cost",value:Qt({total:t.costUsd})})]})]}),(0,be.jsxs)("div",{className:"px-4 pt-5 pb-3",children:[(0,be.jsx)("div",{"aria-label":"Daily Guardian review results",className:"flex h-36 items-end gap-px",role:"img",children:e.days.map(a=>{let r=Math.max(2,a.requests/n*100);return(0,be.jsx)(gt,{content:(0,be.jsxs)("div",{className:"grid grid-cols-[auto_auto] gap-x-4",children:[(0,be.jsx)("span",{children:"Allow"}),(0,be.jsx)("span",{className:"text-right",children:a.allow}),(0,be.jsx)("span",{children:"Ask"}),(0,be.jsx)("span",{className:"text-right",children:a.ask}),(0,be.jsx)("span",{children:"Deny"}),(0,be.jsx)("span",{className:"text-right",children:a.deny}),(0,be.jsx)("span",{children:"Cost"}),(0,be.jsx)("span",{className:"text-right",children:Qt({total:a.costUsd??0})})]}),label:e8(a.date),children:(0,be.jsxs)("button",{"aria-label":`${e8(a.date)}: ${a.allow} allowed, ${a.ask} asked, ${a.deny} denied, ${Qt({total:a.costUsd??0})}`,className:"flex min-w-0 flex-1 flex-col justify-end overflow-hidden rounded-t-sm bg-white/[0.035] focus-visible:outline-1 focus-visible:outline-cyan-300",style:{height:`${r}%`},type:"button",children:[a.deny?(0,be.jsx)("span",{className:"block w-full bg-rose-400/75",style:{flex:a.deny}}):null,a.ask?(0,be.jsx)("span",{className:"block w-full bg-amber-300/75",style:{flex:a.ask}}):null,a.allow?(0,be.jsx)("span",{className:"block w-full bg-emerald-300/70",style:{flex:a.allow}}):null]})},a.date)})}),(0,be.jsx)("div",{className:"relative mt-2 h-4 font-mono text-xs text-dashboard-text-muted",children:o.map(a=>{let r=e.days[a];return r?(0,be.jsx)("span",{className:"absolute -translate-x-1/2",style:{left:`${(a+.5)/e.days.length*100}%`},children:e8(r.date)},r.date):null})})]})]})}var Ri=w(k(),1);function bz(e){if(!e.stats)return(0,Ri.jsx)(O,{padding:"sm",children:(0,Ri.jsx)(an,{children:e.error?"Conversation metrics failed to load.":e.loading?"Loading conversation metrics.":"No conversation metrics have been reported yet."})});let t=e.stats.metricDays.slice(-e.range),n=e.stats.guardian.metricDays.slice(-e.range);return(0,Ri.jsxs)("section",{"aria-label":"Runtime telemetry",className:"grid gap-4",children:[e.error?(0,Ri.jsx)("p",{className:"m-0 font-mono text-xs text-rose-200/65",children:"Metrics refresh failed. Showing cached data."}):null,(0,Ri.jsx)(hy,{days:t}),(0,Ri.jsx)(fd,{days:t}),(0,Ri.jsx)(fz,{days:n})]})}var Le=w(k(),1);function Bz(e){let[t,n]=(0,hz.useState)(30),o=lt(),a=e.data.pluginReports?.reports??[],r=Gq({plugins:e.data.plugins,reports:a,skills:e.data.skills}),i=Hq(o.pathname),A=i===uc,s=r.find(u=>Cy(u.name)===i);return i.startsWith(`${uc}/`)&&!s?(0,Le.jsx)(Dt,{replace:!0,to:uc}):i!=="/system"&&!A&&!s?(0,Le.jsx)(Dt,{replace:!0,to:"/system"}):(0,Le.jsx)(OA,{children:s?(0,Le.jsx)(qge,{data:e.data,onRangeChange:n,plugin:s,range:t}):A?(0,Le.jsx)(Oge,{data:e.data,plugins:r}):(0,Le.jsx)(Tge,{data:e.data,range:t,onRangeChange:n})})}function Tge(e){return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(St,{actions:(0,Le.jsx)(nr,{onChange:e.onRangeChange,value:e.range}),description:`A live read on ${DM()} runtime and model usage.`,title:"System"}),(0,Le.jsx)(bz,{error:e.data.conversationStatsError,range:e.range,loading:e.data.conversationStatsLoading,stats:e.data.conversationStats})]})}function Oge(e){return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(St,{description:`Loaded capabilities and operational reports for ${it()}.`,title:"Plugins"}),e.data.pluginReportsError?(0,Le.jsx)(yz,{showingReports:e.plugins.some(t=>t.reports.length)}):null,(0,Le.jsx)(sz,{plugins:e.plugins}),e.data.skills.length?(0,Le.jsx)(mz,{skills:e.data.skills}):null]})}function qge(e){let t=e.plugin.reports,n=t.some(o=>o.widgets?.some(a=>a.timeRangeDays?.length));return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(St,{actions:n?(0,Le.jsx)(nr,{onChange:e.onRangeChange,value:e.range}):void 0,description:e.plugin.description,title:e.plugin.displayName}),e.data.pluginReportsError?(0,Le.jsx)(yz,{showingReports:!!t.length}):null,(0,Le.jsx)(Az,{plugin:e.plugin}),(0,Le.jsx)(pz,{fallbackTitle:e.plugin.displayName,...!e.data.pluginReportsLoading&&!e.data.pluginReportsError?{emptyText:"This plugin does not expose operational activity yet."}:{},range:e.range,reports:t})]})}function yz(e){return(0,Le.jsx)(O,{className:"border-amber-300/10 bg-amber-300/[0.025]",padding:"sm",children:(0,Le.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Le.jsx)("div",{className:"grid size-9 shrink-0 place-items-center rounded border border-amber-300/15 bg-amber-300/[0.055] text-amber-200/70",children:(0,Le.jsx)(Ia,{"aria-hidden":"true",size:15})}),(0,Le.jsxs)("div",{children:[(0,Le.jsx)("div",{className:"font-display text-sm font-medium text-dashboard-text-muted",children:"Plugin stats failed to load."}),(0,Le.jsx)("div",{className:"mt-1 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.showingReports?`Showing the last operational reports ${it()} received.`:"Plugin details and capabilities are still available."})]})]})})}var kz=w(Y(),1);var wz=w(Y(),1);var Kt=w(k(),1),Cz=[{color:"#6ee7b7",key:"completed",label:"Completed"},{color:"#fda4af",key:"failed",label:"Failed"},{color:"#fcd34d",key:"blocked",label:"Blocked"}];function Ez(e){let[t,n]=(0,wz.useState)(30),o=e.days.slice(-t),a=xa(220),r=o.map(u=>u.completed+u.failed+u.blocked),i=Math.max(1,...r),A=o.length>0?a.plotWidth/o.length:a.plotWidth,s=Math.max(2,Math.min(13,A*.68)),c=r.some(u=>u>0);return(0,Kt.jsxs)(O,{className:"min-h-[15rem] p-4 sm:p-5",children:[(0,Kt.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,Kt.jsxs)("div",{children:[(0,Kt.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:"Executions over time"}),(0,Kt.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Terminal runs for this task each day."})]}),(0,Kt.jsx)("div",{"aria-label":"Task execution range",className:"inline-flex rounded border border-white/[0.08] bg-black/20 p-0.5",children:[7,30,90].map(u=>(0,Kt.jsxs)("button",{"aria-pressed":t===u,className:S("cursor-pointer rounded-sm border-0 px-2.5 py-1.5 font-mono text-xs uppercase tracking-[0.1em] transition-colors",t===u?"bg-cyan-300/10 text-cyan-100":"bg-transparent text-dashboard-text-muted hover:text-dashboard-text"),onClick:()=>n(u),type:"button",children:[u,"d"]},u))})]}),(0,Kt.jsx)("div",{"aria-label":"Task execution status legend",className:"mt-4 flex flex-wrap gap-4",children:Cz.map(u=>(0,Kt.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-dashboard-text-muted",children:[(0,Kt.jsx)("i",{className:"size-2 rounded-sm",style:{backgroundColor:u.color}}),u.label]},u.key))}),(0,Kt.jsxs)("div",{className:"relative mt-3 overflow-hidden",children:[(0,Kt.jsxs)("svg",{"aria-label":`Task executions during the last ${t} days`,className:"block h-auto min-h-40 w-full",role:"img",viewBox:`0 0 ${a.width} ${a.height}`,children:[(0,Kt.jsx)(Co,{layout:a,maximum:i}),o.map((u,l)=>{let p=0,g=a.left+l*A+(A-s)/2,m=r[l]??0;return(0,Kt.jsx)(gt,{content:(0,Kt.jsx)(Jn,{rows:[["completed",u.completed],["failed",u.failed],["blocked",u.blocked],["total",m]]}),label:Ot(u.date),children:(0,Kt.jsxs)("g",{"aria-label":`${Ot(u.date)}: ${u.completed} completed, ${u.failed} failed, ${u.blocked} blocked, ${m} total`,tabIndex:0,children:[Cz.map(h=>{let f=u[h.key]/i*a.plotHeight;return p+=f,(0,Kt.jsx)("rect",{fill:h.color,height:f,opacity:.82,rx:"1",width:s,x:g,y:a.top+a.plotHeight-p},h.key)}),(0,Kt.jsx)("rect",{fill:"transparent",height:a.plotHeight,width:Math.max(s,8),x:g-(Math.max(s,8)-s)/2,y:a.top})]})},u.date)}),(0,Kt.jsx)(Da,{dates:o.map(u=>u.date),layout:a,xPosition:u=>a.left+u*A+A/2})]}),c?null:(0,Kt.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center pt-12 font-mono text-xs text-dashboard-text-muted",children:"No task executions in this period."})]})]})}var Ce=w(k(),1);function Qz(e){let{taskId:t,kind:n}=qn(),[o]=uA(),a=n==="scheduled"||n==="event"?n:void 0,r=wM(e.enabled&&!!(t&&a),a,t),i=Fr(t?`/tasks/${encodeURIComponent(t)}`:"/tasks",o);return!t||!a?(0,Ce.jsx)(Dt,{replace:!0,to:"/tasks"}):!r.data&&!r.error?(0,Ce.jsx)(Qe,{label:"Loading task executions"}):r.error||!r.data?(0,Ce.jsx)("div",{className:`${Ft} px-4 py-8 md:px-8`,children:(0,Ce.jsxs)("section",{className:"mx-auto grid w-full max-w-4xl gap-5",children:[(0,Ce.jsx)(St,{description:"Terminal runs for one scheduled or event task.",title:"Task executions"}),(0,Ce.jsxs)(O,{padding:"md",children:[(0,Ce.jsx)("p",{className:"m-0 text-sm text-rose-300",children:r.error instanceof Mo&&r.error.status===404?"This task was not found or is not visible to you.":"Task executions could not be loaded. Try again."}),(0,Ce.jsxs)(Fe,{className:"mt-3 inline-flex items-center gap-2 font-mono text-xs text-dashboard-text-muted no-underline hover:text-dashboard-text",to:"/tasks",children:[(0,Ce.jsx)(wr,{"aria-hidden":"true",size:14}),"Back to tasks"]})]})]})}):(0,Ce.jsx)(zge,{backTo:i,data:r.data})}function zge(e){let{data:t}=e,n=(0,kz.useMemo)(()=>Jge(t.executions),[t.executions]),o=`${n.completed} completed \xB7 ${n.failed} failed \xB7 ${n.blocked} blocked`,a=t.truncated?`${t.task.totalRuns} total \xB7 loaded runs: ${o}`:`${t.task.totalRuns} total \xB7 ${o}`;return(0,Ce.jsx)("div",{className:`${Ft} px-4 py-8 md:px-8`,children:(0,Ce.jsxs)("section",{className:"mx-auto grid w-full max-w-4xl gap-5",children:[(0,Ce.jsxs)("div",{children:[(0,Ce.jsxs)(Fe,{className:"mb-3 inline-flex items-center gap-2 font-mono text-xs text-dashboard-text-muted no-underline hover:text-dashboard-text",to:e.backTo,children:[(0,Ce.jsx)(wr,{"aria-hidden":"true",size:14}),"Back to task"]}),(0,Ce.jsx)(St,{description:`${t.task.kind} task \xB7 ${t.task.destination.label} \xB7 ${a}`,title:t.task.instruction})]}),t.executionDays.length>0?(0,Ce.jsx)(Ez,{days:t.executionDays}):null,(0,Ce.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-5 gap-y-1 border-b border-white/[0.07] pb-3",children:[(0,Ce.jsxs)("p",{className:"m-0 font-display text-lg text-dashboard-text",children:[t.executions.length," ",t.executions.length===1?"run":"runs"]}),(0,Ce.jsx)("p",{className:"m-0 text-xs text-dashboard-text-muted",children:"Newest first. Click a run to open its conversation."})]}),t.executions.length===0?(0,Ce.jsx)(O,{padding:"md",children:(0,Ce.jsx)("p",{className:"m-0 text-sm text-dashboard-text-muted",children:"This task has not produced any terminal executions yet."})}):(0,Ce.jsxs)(O,{children:[(0,Ce.jsxs)("div",{className:"sticky top-0 z-[1] hidden grid-cols-[minmax(13rem,1.7fr)_minmax(10rem,1fr)] items-center gap-3 border-b border-white/[0.06] bg-black/25 px-3 py-2.5 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted md:grid",role:"row",children:[(0,Ce.jsx)("div",{children:"Conversation"}),(0,Ce.jsx)("div",{className:"justify-self-end",children:"Status"})]}),(0,Ce.jsx)("div",{className:"min-w-0",role:"table",children:t.executions.map(r=>(0,Ce.jsx)(Yge,{execution:r,fallbackTitle:t.task.instruction},r.executionId))})]}),t.truncated?(0,Ce.jsx)("p",{className:"m-0 text-center text-xs text-dashboard-text-muted",children:"Showing the 100 most recent executions."}):null]})})}function Yge(e){let{execution:t,fallbackTitle:n}=e,o=lo(),a=t.title?.trim()||(t.conversationId?n:"No conversation"),r=[Wge(t.executedAt),t.conversationId??"not linked"].join(" \xB7 "),i=()=>{t.conversationId&&o(xr(t.conversationId))};return(0,Ce.jsxs)("div",{"aria-disabled":!t.conversationId,className:S("group grid min-w-0 grid-cols-[minmax(13rem,1.7fr)_minmax(10rem,1fr)] items-center gap-3 overflow-hidden border-b border-b-white/[0.055] px-3 py-3 text-left text-inherit transition-colors max-md:grid-cols-1 max-md:px-4 max-md:py-4",t.conversationId?"cursor-pointer hover:bg-white/[0.035]":"cursor-default opacity-80"),onClick:i,onKeyDown:A=>{t.conversationId&&(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),i())},role:t.conversationId?"link":"row",tabIndex:t.conversationId?0:void 0,children:[(0,Ce.jsxs)("div",{className:"min-w-0",children:[(0,Ce.jsx)("div",{className:"min-w-0 truncate text-base font-bold leading-tight text-dashboard-text",children:a}),(0,Ce.jsx)("div",{className:"mt-1 break-words text-sm leading-relaxed text-dashboard-text-muted md:truncate",children:r})]}),(0,Ce.jsx)("div",{className:"grid min-w-0 justify-items-end gap-1 text-right max-md:justify-items-start max-md:text-left",children:(0,Ce.jsx)(Kge,{status:t.status})})]})}function Kge(e){return(0,Ce.jsx)("span",{className:S("inline-flex items-center rounded border px-2 py-1 font-mono text-xs uppercase tracking-[0.1em]",e.status==="completed"&&"border-emerald-400/25 bg-emerald-400/10 text-emerald-200",e.status==="failed"&&"border-rose-400/25 bg-rose-400/10 text-rose-200",e.status==="blocked"&&"border-amber-400/25 bg-amber-400/10 text-amber-100"),children:e.status})}function Jge(e){return e.reduce((t,n)=>(t[n.status]+=1,t),{blocked:0,completed:0,failed:0})}function Wge(e){return sa(e,{day:"numeric",hour:"numeric",minute:"2-digit",month:"short",timeZoneName:"short",year:"numeric"})}var Ly=w(Y(),1);var Bd=w(Y(),1);var me=w(k(),1),Zge=["a[href]","button:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function _z(e){let t=(0,Bd.useRef)(null),n=(0,Bd.useRef)(e.onClose),o=(0,Bd.useRef)(void 0),a=e.task?`${e.task.kind}:${e.task.id}`:void 0;if(n.current=e.onClose,(0,Bd.useEffect)(()=>{if(!a)return;o.current=document.activeElement instanceof HTMLElement?document.activeElement:void 0;let u=document.body.style.overflow;document.body.style.overflow="hidden";let l=requestAnimationFrame(()=>{t.current?.querySelector("[data-task-drawer-close]")?.focus()}),p=g=>{if(g.key==="Escape"){g.preventDefault(),n.current();return}if(g.key!=="Tab")return;let m=t.current,h=Array.from(m?.querySelectorAll(Zge)??[]).filter(B=>B.tabIndex>=0&&B.getClientRects().length>0),y=h.at(0),f=h.at(-1);if(!m||!y||!f){g.preventDefault();return}let b=document.activeElement;g.shiftKey&&(b===y||!m.contains(b))?(g.preventDefault(),f.focus()):!g.shiftKey&&(b===f||!m.contains(b))&&(g.preventDefault(),y.focus())};return window.addEventListener("keydown",p),()=>{cancelAnimationFrame(l),window.removeEventListener("keydown",p),document.body.style.overflow=u;let g=o.current;o.current=void 0,g?.isConnected&&g.focus()}},[a]),!e.task)return null;let{task:r}=e,i=r.createdByEmail?(0,me.jsx)(Fe,{className:"font-semibold text-dashboard-text underline decoration-white/20 underline-offset-2 transition-colors hover:decoration-white/60",to:Dr(r.createdByEmail),children:r.ownedByViewer?"you":r.createdBy}):r.ownedByViewer?"you":r.createdBy,A=r.kind==="scheduled"?[{label:"Schedule",value:r.schedule},{label:"Next run",value:r.nextRunAt?t8(r.nextRunAt):"None"}]:[{label:"Resource",value:r.resource},{label:"Events",value:r.events.join(", ")}],s=r.kind==="scheduled"?r.status:r.triggerAvailable?"ready":"unavailable",c="task-details-drawer-title";return(0,me.jsxs)("div",{"aria-labelledby":c,"aria-modal":"true",className:"fixed inset-0 z-50",ref:t,role:"dialog",children:[(0,me.jsx)("button",{"aria-label":"Dismiss task details",className:"absolute inset-0 cursor-default bg-black/55",onClick:e.onClose,tabIndex:-1,type:"button"}),(0,me.jsxs)("aside",{className:"absolute top-0 right-0 grid h-full w-full grid-rows-[auto_minmax(0,1fr)] bg-[#070707] shadow-[-20px_0_60px_rgba(0,0,0,0.45)] md:w-[min(560px,94vw)] md:border-l md:border-white/12",children:[(0,me.jsxs)("header",{className:"relative border-b border-white/10 bg-dashboard-surface-raised px-4 py-3 md:px-5",children:[(0,me.jsxs)("div",{className:"min-w-0 pr-12",children:[(0,me.jsxs)("h2",{className:"m-0 font-display text-lg font-medium tracking-normal text-dashboard-text capitalize",id:c,children:[r.kind," task"]}),(0,me.jsxs)("div",{className:"mt-1 break-words font-mono text-xs leading-snug text-dashboard-text-muted",children:[s," \xB7 ",Iz(r.createdAt)]})]}),(0,me.jsx)("div",{className:"absolute top-3 right-4 md:right-5",children:(0,me.jsx)(pt,{"aria-label":"Close task details","data-task-drawer-close":!0,onClick:e.onClose,size:"icon",title:"Close",children:(0,me.jsx)(To,{"aria-hidden":"true",size:15,strokeWidth:2.25})})})]}),(0,me.jsx)("div",{className:"min-h-0 overflow-auto px-4 py-4 md:px-5",children:(0,me.jsxs)("section",{className:"grid gap-5",children:[(0,me.jsxs)("div",{children:[(0,me.jsx)("div",{className:"mb-2 font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:"Instruction"}),(0,me.jsx)(yo,{text:r.instruction})]}),(0,me.jsxs)("dl",{className:"grid gap-px overflow-hidden rounded border border-white/[0.06] bg-white/[0.055]",children:[A.map(u=>(0,me.jsx)(Sy,{label:u.label,children:u.value},u.label)),(0,me.jsx)(Sy,{label:"Destination",children:(0,me.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,me.jsx)(Fs,{"aria-hidden":"true",className:"text-cyan-300/70",size:13}),r.destination.label," \xB7 ",r.destination.visibility]})}),(0,me.jsxs)(Sy,{label:"Created",children:[i," \xB7 ",Iz(r.createdAt)]}),(0,me.jsx)(Sy,{label:"Executions",children:(0,me.jsx)(Vge,{task:r})})]}),r.totalRuns>0?(0,me.jsx)("div",{className:"pt-1",children:(0,me.jsx)(Fe,{className:"inline-flex items-center justify-center rounded border border-white/12 bg-white/[0.03] px-3 py-2 font-mono text-xs font-medium text-dashboard-text no-underline transition-colors hover:border-white/25 hover:bg-white/[0.06]",to:`/tasks/${r.kind}/${encodeURIComponent(r.id)}/executions`,children:"View all executions"})}):null]})})]})]})}function Sy(e){return(0,me.jsxs)("div",{className:"min-w-0 bg-[#09090b] px-3 py-3",children:[(0,me.jsx)("dt",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:e.label}),(0,me.jsx)("dd",{className:"mt-1.5 ml-0 break-words text-sm leading-relaxed text-dashboard-text",children:e.children})]})}function Vge(e){let{task:t}=e,n=`/tasks/${t.kind}/${encodeURIComponent(t.id)}/executions`;return(0,me.jsxs)("div",{className:"text-sm text-dashboard-text-muted",children:[t.totalRuns>0?(0,me.jsxs)(Fe,{className:"text-dashboard-text underline decoration-white/20 underline-offset-2 hover:decoration-white/60",to:n,children:[t.runsLast7Days," runs / 7d"]}):(0,me.jsxs)("span",{className:"text-dashboard-text",children:[t.runsLast7Days," runs / 7d"]}),(0,me.jsx)("span",{className:"mx-2 opacity-45",children:"\xB7"}),(0,me.jsxs)("span",{children:[t.totalRuns>0?(0,me.jsxs)(Fe,{className:"text-dashboard-text underline decoration-white/20 underline-offset-2 hover:decoration-white/60",to:n,children:[t.totalRuns," total"]}):(0,me.jsxs)(me.Fragment,{children:[t.totalRuns," total"]}),t.lastRunAt?" \xB7 Last execution ":" \xB7 Never run",t.lastRunAt&&t.lastConversationId?(0,me.jsx)(Fe,{className:"text-dashboard-text underline decoration-white/20 underline-offset-2 hover:decoration-white/60",to:xr(t.lastConversationId),children:t8(t.lastRunAt)}):t.lastRunAt?t8(t.lastRunAt):null]})]})}function Iz(e){return sa(e,{dateStyle:"medium",timeStyle:"short"})}function t8(e){return sa(e,{day:"numeric",hour:"numeric",minute:"2-digit",month:"short",timeZoneName:"short",year:"numeric"})}var xz=w(Y(),1);var xt=w(k(),1),vz=[{color:"#6ee7b7",key:"scheduled",label:"Scheduled"},{color:"#c4b5fd",key:"event",label:"Event"}];function Dz(e){let[t,n]=(0,xz.useState)(30),o=e.days.slice(-t),a=720,r=200,i=56,A=12,s=14,u=r-s-34,l=a-i-A,p=o.length>0?l/o.length:l,g=Math.max(2,Math.min(13,p*.68)),m=o.map(f=>f.scheduled+f.event),h=Math.max(1,...m),y=m.some(f=>f>0);return(0,xt.jsxs)(O,{className:"min-h-[17rem] p-4 sm:p-5",children:[(0,xt.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,xt.jsxs)("div",{children:[(0,xt.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:"Activity over time"}),(0,xt.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Completed scheduled and event task runs each day."})]}),(0,xt.jsx)("div",{"aria-label":"Task execution range",className:"inline-flex rounded border border-white/[0.08] bg-black/20 p-0.5",children:[7,30,90].map(f=>(0,xt.jsxs)("button",{"aria-pressed":t===f,className:S("cursor-pointer rounded-sm border-0 px-2.5 py-1.5 font-mono text-xs uppercase tracking-[0.1em] transition-colors",t===f?"bg-cyan-300/10 text-cyan-100":"bg-transparent text-dashboard-text-muted hover:text-dashboard-text"),onClick:()=>n(f),type:"button",children:[f,"d"]},f))})]}),(0,xt.jsx)("div",{"aria-label":"Task execution legend",className:"mt-4 flex flex-wrap gap-4",children:vz.map(f=>(0,xt.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-dashboard-text-muted",children:[(0,xt.jsx)("i",{className:"size-2 rounded-sm",style:{backgroundColor:f.color}}),f.label]},f.key))}),(0,xt.jsxs)("div",{className:"relative mt-3 overflow-hidden",children:[(0,xt.jsxs)("svg",{"aria-label":`Task executions during the last ${t} days`,className:"block h-auto min-h-40 w-full",role:"img",viewBox:`0 0 ${a} ${r}`,children:[[h,h/2,0].map((f,b)=>{let B=s+b*(u/2);return(0,xt.jsxs)("g",{children:[(0,xt.jsx)("line",{stroke:"rgba(255,255,255,0.07)",strokeDasharray:"3 5",x1:i,x2:a-A,y1:B,y2:B}),(0,xt.jsx)("text",{fill:"rgba(255,255,255,0.34)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:"end",x:i-7,y:B+3,children:Math.round(f)})]},b)}),o.map((f,b)=>{let B=0,C=i+b*p+(p-g)/2,E=m[b]??0;return(0,xt.jsx)(gt,{content:(0,xt.jsx)(Jn,{rows:[["scheduled",f.scheduled],["event",f.event],["total",E]]}),label:n8(f.date),children:(0,xt.jsxs)("g",{"aria-label":`${n8(f.date)}: ${f.scheduled} scheduled, ${f.event} event, ${E} total executions`,tabIndex:0,children:[vz.map(x=>{let R=f[x.key]/h*u;return B+=R,(0,xt.jsx)("rect",{fill:x.color,height:R,opacity:.82,rx:"1",width:g,x:C,y:s+u-B},x.key)}),(0,xt.jsx)("rect",{fill:"transparent",height:u,width:Math.max(g,8),x:C-(Math.max(g,8)-g)/2,y:s})]})},f.date)}),[0,Math.floor((o.length-1)/2),o.length-1].map(f=>{let b=o[f];return b?(0,xt.jsx)("text",{fill:"rgba(255,255,255,0.34)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:f===0?"start":f===o.length-1?"end":"middle",x:f===0?i:f===o.length-1?a-A:i+f*p+p/2,y:r-9,children:n8(b.date)},b.date):null})]}),y?null:(0,xt.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center pt-12 font-mono text-xs text-dashboard-text-muted",children:"No task executions in this period."})]})]})}function n8(e){return new Intl.DateTimeFormat("en-US",{day:"numeric",month:"short",timeZone:"UTC"}).format(new Date(`${e}T00:00:00.000Z`))}var W=w(k(),1),Xge=["all","scheduled","event"],eme=["mine","public"];function tme(e){return sa(e,{dateStyle:"medium",timeStyle:"short"})}function nme(e){return sa(e,{day:"numeric",hour:"numeric",minute:"2-digit",month:"short",timeZoneName:"short",year:"numeric"})}function ame(e,t){return[e.createdBy,e.destination.channelId,e.destination.label,e.destination.teamId,e.instruction,e.kind,e.kind==="scheduled"?e.schedule:e.resource,...e.kind==="event"?[e.source]:[],...e.kind==="event"?e.events:[]].join(" ").toLowerCase().includes(t)}function Fz(e){let t=CM(e.enabled),n=Un(),o=lo(),a=lt(),{taskId:r}=qn(),[i,A]=Zs("type","all",Xge),[s,c]=Zs("scope","mine",eme),[u,l,p]=FA(),g=p.toLowerCase(),m=Q=>Fr(Q,a.search),h=t.data?.tasks??[],y=h.filter(Q=>Q.ownedByViewer).length,f=h.filter(Q=>Q.destination.visibility==="public").length,b=(0,Ly.useMemo)(()=>h.filter(Q=>s==="mine"?Q.ownedByViewer:Q.destination.visibility==="public"),[s,h]),B=(0,Ly.useMemo)(()=>b.filter(Q=>(i==="all"||Q.kind===i)&&(!g||ame(Q,g))),[i,b,g]),C=B.length,E=(0,Ly.useMemo)(()=>h.find(Q=>Q.id===r),[r,h]),x=sr({mutationFn:async Q=>{await Ju(`/api/tasks/${Q.kind}/${encodeURIComponent(Q.id)}`)},onSuccess:async()=>{await n.invalidateQueries({queryKey:["dashboard","tasks"]})}});return!t.data&&!t.error?(0,W.jsx)(Qe,{label:"Loading tasks"}):(0,W.jsxs)("div",{className:`${Ft} px-4 py-8 md:px-8`,children:[(0,W.jsxs)("section",{className:"mx-auto grid w-full max-w-6xl gap-5",children:[(0,W.jsx)(St,{description:"Scheduled and event-driven work created by users.",title:"Tasks"}),t.data?.executionDays?.length?(0,W.jsx)(Dz,{days:t.data.executionDays}):null,(0,W.jsxs)(O,{className:"grid gap-4 p-4 lg:grid-cols-[auto_auto_minmax(16rem,1fr)] lg:items-end",children:[(0,W.jsxs)(a8,{label:"Scope",children:[(0,W.jsxs)(Ii,{className:"inline-flex items-center gap-1.5",onClick:()=>c("mine"),pressed:s==="mine",variant:"pill",children:[(0,W.jsx)(_a,{"aria-hidden":"true",size:13}),"Mine ",(0,W.jsx)("span",{className:"opacity-65",children:y})]}),(0,W.jsxs)(Ii,{className:"inline-flex items-center gap-1.5",onClick:()=>c("public"),pressed:s==="public",variant:"pill",children:[(0,W.jsx)(go,{"aria-hidden":"true",size:13}),"Public ",(0,W.jsx)("span",{className:"opacity-65",children:f})]})]}),(0,W.jsx)(a8,{label:"Type",children:["all","scheduled","event"].map(Q=>(0,W.jsx)(Ii,{onClick:()=>A(Q),pressed:i===Q,variant:"pill",children:Q},Q))}),(0,W.jsx)(a8,{label:"Search",children:(0,W.jsx)(Hr,{className:"w-full lg:max-w-sm",label:"Search tasks",onChange:l,placeholder:"Instruction, location, or creator",value:u})})]}),(0,W.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-5 gap-y-1 border-b border-white/[0.07] pb-3",children:[(0,W.jsxs)("p",{className:"m-0 font-display text-lg text-dashboard-text",children:[C," ",C===1?"task":"tasks"]}),(0,W.jsx)("p",{className:"m-0 text-xs text-dashboard-text-muted",children:s==="mine"?"Tasks you created, including private destinations.":"All tasks assigned to public destinations in your linked workspaces."})]}),t.error?(0,W.jsx)(O,{padding:"md",children:(0,W.jsx)("p",{className:"m-0 text-sm text-rose-300",children:"Tasks could not be loaded. Try again."})}):C===0?(0,W.jsx)(O,{padding:"md",children:(0,W.jsx)("p",{className:"m-0 text-sm text-dashboard-text-muted",children:ome({filter:i,mineCount:y,publicCount:f,scope:s,search:g})})}):(0,W.jsxs)(O,{children:[(0,W.jsx)(rme,{}),(0,W.jsx)("div",{className:"divide-y divide-white/[0.07]",role:"list",children:B.map(Q=>{let R=`${Q.kind}:${Q.id}`;return(0,W.jsx)(ime,{deleting:x.isPending&&x.variables?.id===Q.id,onDelete:()=>{window.confirm(`Delete this ${Q.kind} task?`)&&x.mutate(Q)},onSelect:()=>o(m(r===Q.id?"/tasks":`/tasks/${encodeURIComponent(Q.id)}`)),selected:r===Q.id,task:Q},R)})})]}),t.data?.truncated?(0,W.jsx)("p",{className:"m-0 text-center text-xs text-dashboard-text-muted",children:"Showing up to 100 recent tasks in each scope."}):null,x.error?(0,W.jsx)("p",{className:"m-0 text-center text-sm text-rose-300",children:"The task could not be deleted. Try again."}):null]}),(0,W.jsx)(_z,{onClose:()=>o(m("/tasks")),task:E})]})}function ome(e){return e.search||e.filter!=="all"?"No tasks matched these filters.":e.scope==="mine"&&e.mineCount===0?"You have no active or completed tasks.":e.scope==="public"&&e.publicCount===0?"No tasks are assigned to public destinations in your linked workspaces.":"No tasks are available."}function a8(e){return(0,W.jsxs)("div",{children:[(0,W.jsx)("div",{className:"mb-2 font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:e.label}),(0,W.jsx)("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":e.label,children:e.children})]})}function rme(){return(0,W.jsxs)("div",{"aria-hidden":"true",className:"hidden grid-cols-[repeat(3,minmax(0,1fr))_auto_auto] items-center gap-3 border-b border-white/[0.07] px-4 py-2.5 text-left font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted lg:grid",children:[(0,W.jsx)("span",{children:"Task"}),(0,W.jsx)("span",{children:"Destination"}),(0,W.jsx)("span",{children:"Trigger"}),(0,W.jsx)("span",{"aria-hidden":"true",className:"size-8"}),(0,W.jsx)("span",{"aria-hidden":"true",className:"size-9"})]})}function ime(e){let{task:t}=e;return(0,W.jsx)("article",{role:"listitem",children:(0,W.jsxs)(xB,{className:"grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-3 px-4 py-3 md:grid-cols-[repeat(2,minmax(0,1fr))_auto_auto] lg:grid-cols-[repeat(3,minmax(0,1fr))_auto_auto]",onSelect:e.onSelect,selected:e.selected,children:[(0,W.jsxs)("button",{"aria-expanded":e.selected,className:"flex min-w-0 cursor-pointer items-center gap-3 border-0 bg-transparent p-0 text-left",onClick:e.onSelect,type:"button",children:[(0,W.jsx)(Ame,{task:t}),(0,W.jsxs)("span",{className:"min-w-0",children:[(0,W.jsx)("span",{className:"block truncate font-display text-base font-medium text-dashboard-text",children:t.instruction}),(0,W.jsxs)("span",{className:"mt-1 block truncate font-mono text-xs uppercase tracking-[0.08em] text-dashboard-text-muted",children:[(0,W.jsx)("span",{className:"md:hidden",children:t.destination.label}),(0,W.jsx)("span",{className:"hidden md:inline",children:tme(t.createdAt)})]})]})]}),(0,W.jsxs)("div",{className:"hidden min-w-0 md:block",children:[(0,W.jsx)("div",{className:"truncate text-sm font-medium text-dashboard-text",children:t.destination.label}),(0,W.jsx)("div",{className:"mt-1 font-mono text-xs uppercase tracking-[0.08em] text-dashboard-text-muted",children:t.destination.visibility})]}),(0,W.jsxs)("div",{className:"hidden min-w-0 lg:block",children:[(0,W.jsx)("div",{className:"truncate text-sm text-dashboard-text",children:t.kind==="scheduled"?t.schedule:t.resource}),(0,W.jsx)("div",{className:"mt-1 truncate font-mono text-xs text-dashboard-text-muted",children:t.kind==="scheduled"?t.nextRunAt?`Next ${nme(t.nextRunAt)}`:"No next run":t.events.join(", ")})]}),(0,W.jsx)("button",{"aria-expanded":e.selected,"aria-label":`View task details: ${t.instruction}`,className:"grid size-8 cursor-pointer place-items-center rounded border border-transparent bg-transparent text-dashboard-text-muted transition-colors hover:border-white/10 hover:bg-white/[0.04] hover:text-dashboard-text",onClick:e.onSelect,type:"button",children:(0,W.jsx)(hi,{"aria-hidden":"true",className:S("transition-transform",e.selected&&"translate-x-0.5 text-cyan-200"),size:16})}),t.ownedByViewer?(0,W.jsx)(pt,{"aria-label":`Delete: ${t.instruction}`,disabled:e.deleting,onClick:e.onDelete,size:"icon",title:"Delete task",children:(0,W.jsx)(Uo,{"aria-hidden":"true",size:15})}):(0,W.jsx)("span",{"aria-hidden":"true",className:"size-8"})]})})}function Ame(e){let{task:t}=e;if(t.kind==="scheduled")return(0,W.jsx)("div",{"aria-label":"Scheduled task",className:"grid size-9 shrink-0 place-items-center rounded border border-white/[0.08] bg-white/[0.03] text-cyan-300/75",role:"img",title:"Scheduled task",children:(0,W.jsx)(Qp,{"aria-hidden":"true",size:16})});let n=t.source.trim(),o=n.toLowerCase(),a=o==="github",r=a?"GitHub":o==="pagerduty"?"PagerDuty":n,i=o==="pagerduty"?"PD":n.slice(0,2).toUpperCase();return(0,W.jsx)("div",{"aria-label":`${r} event task`,className:"grid size-9 shrink-0 place-items-center rounded border border-white/[0.08] bg-white/[0.03] text-cyan-300/75",role:"img",title:`${r} event task`,children:a?(0,W.jsx)(sme,{}):(0,W.jsx)("span",{className:"font-mono text-xs font-semibold uppercase tracking-[0.08em]",children:i})})}function sme(){return(0,W.jsx)("svg",{"aria-hidden":"true",className:"size-[18px]",fill:"currentColor",viewBox:"0 0 24 24",children:(0,W.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.418-1.305.762-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.793 1.23 1.1-.306 2.28-.459 3.45-.465 1.17.006 2.35.159 3.45.465 2.79-1.552 3.795-1.23 3.795-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.435.375.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}var T=w(k(),1),cme={backgroundColor:"#050507",backgroundImage:"radial-gradient(ellipse at 50% 0%, transparent 0%, #050507 70%), linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px)",backgroundSize:"100% 100%, 40px 40px, 40px 40px"},ume={backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.7'/%3E%3C/svg%3E")`};function Sz(){let e=lt(),t=hM(),n=BM(),o=t.data,a=n.data??[];o&&z5(o.config.timeZone);let r=!o&&!t.error,i=!!(o?.config.authRequired&&o.me.user.email),A=QM(i),s=i?a.filter(g=>g.navigation==="primary"):[],c=e.pathname==="/"||e.pathname==="/conversations"||e.pathname.startsWith("/conversations/"),u=e.pathname.startsWith("/conversations/")&&e.pathname!=="/conversations/";async function l(){await fetch(`${o?.config.authPath??"/api/auth"}/sign-out`,{credentials:"same-origin",method:"POST"}),window.location.assign(o?.config.basePath??"/")}let p=({isActive:g})=>S("shrink-0 whitespace-nowrap rounded-md px-2.5 py-2 font-mono text-xs font-medium uppercase tracking-[0.08em] no-underline transition-colors sm:tracking-[0.12em]",g?"bg-cyan-300/[0.1] text-cyan-50":S("hover:bg-white/[0.035]",EA));return(0,T.jsxs)("main",{className:S("relative grid font-mono text-dashboard-text",c?S("h-dvh min-h-0 overflow-hidden",u?"grid-rows-[minmax(0,1fr)] md:grid-rows-[auto_minmax(0,1fr)]":"grid-rows-[auto_minmax(0,1fr)]"):"min-h-screen grid-rows-[auto_1fr]"),style:cme,children:[(0,T.jsx)("header",{className:S("sticky top-0 z-10 border-b border-white/[0.05] bg-[#050507]/95",u&&"max-md:hidden"),children:(0,T.jsxs)("div",{className:S(Ft,"grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-2 px-4 py-3 md:gap-x-5 md:gap-y-3 md:py-4",i?"md:grid-cols-[auto_minmax(0,1fr)_auto]":"md:grid-cols-[auto_minmax(0,1fr)]",c?"md:px-4":"md:px-8"),children:[(0,T.jsx)(Fe,{"aria-label":`${it()} home`,className:"flex min-w-0 max-w-full items-center justify-self-start text-inherit no-underline",to:"/",children:(0,T.jsx)(jh,{})}),(0,T.jsxs)("nav",{className:"col-span-2 row-start-2 flex min-w-0 items-center gap-1 overflow-x-auto [scrollbar-width:none] md:col-span-1 md:col-start-2 md:row-start-1 md:justify-self-start md:overflow-visible [&::-webkit-scrollbar]:hidden",children:[(0,T.jsx)(Fe,{"aria-current":c?"page":void 0,className:p({isActive:c}),to:"/",children:"Conversations"}),i?(0,T.jsx)(wa,{className:p,to:"/tasks",children:"Tasks"}):null,s.map(g=>(0,T.jsx)(wa,{className:p,to:VB(g.pluginName,g.id),children:g.label},`${g.pluginName}:${g.id}`)),(0,T.jsx)(wa,{className:p,to:"/system",children:"System"})]}),i?(0,T.jsx)("div",{className:"col-start-2 row-start-1 justify-self-end md:col-start-3",children:(0,T.jsx)(IO,{identity:o.me,onSignOut:l,spend:A.data,userPages:a})}):null]})}),(0,T.jsxs)(VE,{children:[(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading task executions"}):i?(0,T.jsx)(Qz,{enabled:i}):(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/tasks/:kind/:taskId/executions"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading tasks"}):i?(0,T.jsx)(Fz,{enabled:i}):(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/tasks/:taskId?"}),(0,T.jsx)(Ht,{element:(0,T.jsx)(o8,{section:"locations"}),path:"/locations"}),(0,T.jsx)(Ht,{element:(0,T.jsx)(o8,{section:"locations"}),path:"/locations/:locationId"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading locations"}):(0,T.jsx)(Jq,{}),path:"/system/locations"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading location"}):(0,T.jsx)(Oq,{}),path:"/system/locations/:locationId"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading your conversations"}):o?(0,T.jsx)(KF,{data:o}):(0,T.jsx)(Qe,{label:t.error?.message??"Dashboard unavailable"}),path:"/"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading your conversations"}):o?(0,T.jsx)(KF,{data:o}):(0,T.jsx)(Qe,{label:t.error?.message??"Dashboard unavailable"}),path:"/conversations/:conversationId"}),(0,T.jsx)(Ht,{element:(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/conversations"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading components"}):o?o.config.componentGallery?(0,T.jsx)(jq,{}):(0,T.jsx)(Dt,{replace:!0,to:"/"}):(0,T.jsx)(Qe,{label:t.error?.message??"Dashboard unavailable"}),path:"/dev/*"}),(0,T.jsx)(Ht,{element:(0,T.jsx)(o8,{section:"people"}),path:"/people"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading profile"}):(0,T.jsx)(rz,{}),path:"/people/:email"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading people"}):(0,T.jsx)(ez,{}),path:"/system/people"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading system"}):o?(0,T.jsx)(dme,{coreData:o}):(0,T.jsx)(Qe,{label:t.error?.message??"Dashboard unavailable"}),path:"/system/*"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading API tokens"}):i?(0,T.jsx)(tz,{}):(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/settings/api-tokens"}),(0,T.jsx)(Ht,{element:r||n.isPending?(0,T.jsx)(Qe,{label:"Loading memory"}):i&&n.data?(0,T.jsx)(DF,{pages:n.data}):(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/memories/:memoryId?"}),(0,T.jsx)(Ht,{element:r||n.isPending?(0,T.jsx)(Qe,{label:"Loading memories"}):i&&n.data?(0,T.jsx)(DF,{pages:n.data}):(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/memories/library"}),(0,T.jsx)(Ht,{element:r||n.isPending?(0,T.jsx)(Qe,{label:"Loading page"}):i&&n.data?(0,T.jsx)(QO,{pages:n.data}):(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/plugins/:pluginName/:pageId/*"}),(0,T.jsx)(Ht,{element:(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"*"})]}),(0,T.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none fixed inset-0 z-50 block opacity-[0.018]",style:ume})]})}function o8(e){let t=lt(),n=`/${e.section}`,o=t.pathname.slice(n.length);return(0,T.jsx)(Dt,{replace:!0,to:`/system/${e.section}${o}${t.search}${t.hash}`})}function dme(e){let t=vM(e.coreData);return!t.data&&!t.error?(0,T.jsx)(Qe,{label:"Loading system"}):t.data?(0,T.jsx)(Bz,{data:t.data}):(0,T.jsx)(Qe,{label:t.error?.message??"System unavailable"})}var Wa=w(k(),1),r8=class extends Lz.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){let o=t.stack??n.componentStack;window.__JUNIOR_DASHBOARD_SHOW_ERROR__?.(o?new Error(o):t)}render(){return this.state.error?(0,Wa.jsx)(lme,{error:this.state.error}):this.props.children}};function lme(e){return(0,Wa.jsx)("main",{className:"grid min-h-screen place-items-center bg-black p-8 text-white",children:(0,Wa.jsxs)("section",{className:"w-full max-w-5xl border border-rose-400/50 bg-[#0b0b0b] p-5 font-sans",children:[(0,Wa.jsx)("div",{className:"font-mono text-xs uppercase leading-none text-[#888]",children:"Dashboard Error"}),(0,Wa.jsxs)("h1",{className:"mt-2 text-3xl font-bold leading-tight tracking-normal",children:[it()," failed to render"]}),(0,Wa.jsx)("p",{className:"my-4 max-w-3xl text-[#b8b8b8]",children:"The dashboard hit a client-side exception. The stack trace is shown here so the page does not fail blank."}),(0,Wa.jsx)("pre",{className:"max-h-[60vh] overflow-auto whitespace-pre-wrap break-words border border-white/10 bg-black p-4 font-mono text-sm leading-relaxed text-white",children:e.error.stack??e.error.message})]})})}var Nz=document.getElementById("dashboard-root");if(!Nz)throw new Error("Junior dashboard root element was not found");var pme=new zy({defaultOptions:{queries:{staleTime:3e4}}});(0,Rz.createRoot)(Nz).render((0,Wa.jsx)(r8,{children:(0,Wa.jsx)(tC,{client:pme,children:(0,Wa.jsx)(ak,{basename:window.__JUNIOR_DASHBOARD_BASE_PATH__??"/",children:(0,Wa.jsx)(Sz,{})})})}));
|
|
135
|
+
See https://docs.sentry.io for product docs.`,Mq=By(14).map((e,t)=>({conversations:4+t*5%17,costUsd:.7+t*7%11*.18,date:e,durationMs:9e4+t*41%13*24e3,tokens:18e3+t*17%19*2300})),mge=By(30).map((e,t)=>({activePeople:4+t*7%13,conversations:18+t*11%31,date:e})),fge=By(30).map((e,t)=>({date:e,privateConversations:3+t*5%12,publicConversations:12+t*9%28})),bge=By(70).map((e,t)=>({conversations:t%9===0?0:1+t*7%18,date:e,durationMs:t%9===0?0:45e3+t*13%20*18e3})),_o=Date.UTC(2026,4,1,16),hge=[{description:"Default completed tool with normalized arguments",part:{id:"gallery-search",input:{query:"release regression",limit:25,options:{includeArchived:!1}},name:"searchIssues",output:{matches:3},resultTimestamp:_o+1842,status:"completed",type:"tool_call"},timestamp:_o},{description:"Running webSearch with name-only shimmer",part:{id:"gallery-running",input:{query:"service:checkout status:error",max_results:50},name:"webSearch",status:"running",type:"tool_call"},timestamp:_o+3e3},{description:"Failed tool with warning rail marker",part:{id:"gallery-error",input:{command:"jr-rpc config get github.repo",timeout_ms:1e4},name:"bash",output:{error:"configuration unavailable"},resultTimestamp:_o+6416,status:"error",type:"tool_call"},timestamp:_o+6e3},{description:"Known loadSkill signature",part:{id:"gallery-load-skill",input:{skill_name:"junior-qa"},name:"loadSkill",output:{skill_name:"junior-qa"},resultTimestamp:_o+8105,status:"completed",type:"tool_call"},timestamp:_o+8e3},{description:"Known executeTool signature with nested arguments",part:{id:"gallery-execute-tool",input:{tool_name:"github_search",arguments:{query:"is:pr is:open",limit:25}},name:"executeTool",output:{matches:3},resultTimestamp:_o+10723,status:"completed",type:"tool_call"},timestamp:_o+1e4},{description:"Long generic arguments exercise both truncation limits",part:{id:"gallery-long",input:{project:"payments-checkout-platform",query:"Find every regression associated with the most recent production deployment and include the complete evidence trail",environment:"production",includeResolved:!1,ignoredAfterFourEntries:"not shown in the collapsed preview"},name:"investigateDeploy",output:{channel_id:"C123"},resultTimestamp:_o+13250,status:"completed",type:"tool_call"},timestamp:_o+12e3},{description:"Completed tool without argument or result payloads",part:{id:"gallery-empty",name:"systemTime",status:"completed",type:"tool_call"},timestamp:_o+15e3}];function jq(){let[e,t]=(0,WF.useState)(30),[n,o]=(0,WF.useState)(!0);return(0,ee.jsxs)("div",{className:S(Ft,"grid min-w-0 gap-8 px-4 py-4 sm:px-8 sm:py-8"),children:[(0,ee.jsx)(St,{description:"Reusable dashboard fixtures for visual and interaction checks.",title:"Component gallery"}),(0,ee.jsxs)(JF,{description:"Shared actions, filters, metrics, and feedback surfaces.",title:"Foundations",children:[(0,ee.jsx)(cc,{title:"Buttons and controls",children:(0,ee.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,ee.jsxs)(pt,{children:[(0,ee.jsx)(Ds,{"aria-hidden":"true",size:14}),"Copy"]}),(0,ee.jsx)(pt,{disabled:!0,children:"Disabled"}),(0,ee.jsx)(pt,{"aria-label":"Bot action",size:"icon",children:(0,ee.jsx)(Er,{"aria-hidden":"true",size:16})}),(0,ee.jsx)(Ii,{pressed:n,variant:"pill",onClick:()=>o(a=>!a),children:"Toggle"}),(0,ee.jsx)(Ii,{pressed:!n,variant:"text",onClick:()=>o(a=>!a),children:"Alternate"}),(0,ee.jsx)(nr,{onChange:t,value:e})]})}),(0,ee.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:[(0,ee.jsx)(_t,{detail:"Across the selected period",icon:za,label:"Conversations",value:"1,284"}),(0,ee.jsx)(_t,{detail:"94% completed successfully",icon:jo,label:"Completed",value:"1,207"}),(0,ee.jsx)(_t,{detail:"Cumulative agent runtime",icon:Up,label:"Runtime",value:"18.4h"}),(0,ee.jsx)(_t,{detail:"Model and tool workers",icon:Er,label:"Active agents",value:"7"})]}),(0,ee.jsx)(cc,{title:"Metadata and empty state",children:(0,ee.jsxs)("div",{className:"grid gap-4",children:[(0,ee.jsx)(ry,{items:[{content:(0,ee.jsx)(Ur,{tooltip:[{label:"input",value:"12.4k"},{label:"output",value:"3.1k"}],children:"15.5k tokens"}),key:"tokens"},{content:(0,ee.jsx)(Ur,{children:"$0.42"}),key:"cost"},{content:(0,ee.jsx)(Ur,{children:"38s"}),key:"duration"}]}),(0,ee.jsx)(an,{children:"No activity was recorded for this period."})]})})]}),(0,ee.jsxs)(JF,{description:"Production chart components rendered with deterministic fixtures.",title:"Charts",children:[(0,ee.jsx)(hy,{days:Mq}),(0,ee.jsx)(fd,{days:Mq}),(0,ee.jsx)(by,{days:mge}),(0,ee.jsx)(my,{days:fge}),(0,ee.jsxs)(O,{children:[(0,ee.jsx)(Io,{description:"Daily conversation intensity over ten weeks.",title:"Contribution activity"}),(0,ee.jsx)(fy,{days:bge})]})]}),(0,ee.jsxs)(JF,{description:"Markdown, event notifications, and transcript role treatments.",title:"Transcripts",children:[(0,ee.jsx)(cc,{title:"Event notification",children:(0,ee.jsx)(Cg,{compact:!0,text:$q})}),(0,ee.jsx)(cc,{title:"GFM sample",children:(0,ee.jsx)(Cg,{text:pge})}),(0,ee.jsx)(cc,{title:"TranscriptText assistant",children:(0,ee.jsx)(yo,{role:"assistant",text:gge})}),(0,ee.jsx)(cc,{title:"TranscriptText user",children:(0,ee.jsx)(yo,{role:"user",text:$q})}),(0,ee.jsx)(cc,{title:"Tool calls",children:(0,ee.jsx)(Bge,{})})]})]})}function Bge(){return(0,ee.jsxs)("div",{className:"grid min-w-0 grid-cols-[0.875rem_minmax(0,1fr)] gap-3",children:[(0,ee.jsx)("div",{"aria-hidden":"true",className:"flex justify-center",children:(0,ee.jsx)("span",{className:"w-px bg-cyan-300/15"})}),(0,ee.jsxs)("div",{className:"grid min-w-0 gap-3",children:[(0,ee.jsx)("p",{className:"m-0 text-xs leading-relaxed text-dashboard-text-muted",children:"Click any row to compare its collapsed signature with the full arguments and result."}),hge.map(e=>(0,ee.jsxs)("div",{className:"grid min-w-0 gap-1",children:[(0,ee.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.08em] text-dashboard-text-muted",children:e.description}),(0,ee.jsx)(Gg,{part:e.part,timestamp:e.timestamp})]},e.part.id))]})]})}function JF(e){return(0,ee.jsxs)("section",{className:"grid min-w-0 gap-4",children:[(0,ee.jsxs)("div",{children:[(0,ee.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:e.title}),(0,ee.jsx)("p",{className:"mt-1 mb-0 text-sm text-dashboard-text-muted",children:e.description})]}),e.children]})}function cc(e){return(0,ee.jsxs)(O,{className:"grid min-w-0 gap-3 p-4 sm:p-5",padding:"none",children:[(0,ee.jsx)("div",{className:"border-b border-white/[0.05] pb-3 font-mono text-xs font-medium uppercase tracking-[0.14em] text-dashboard-text-muted",children:e.title}),(0,ee.jsx)("div",{className:"min-w-0",children:e.children})]})}function By(e){let t=Date.UTC(2026,4,1);return Array.from({length:e},(n,o)=>new Date(t+o*864e5).toISOString().slice(0,10))}var Pq=w(k(),1);function yy(e){return(0,Pq.jsx)("div",{className:S(Ft,"grid min-w-0 content-start gap-4 px-4 py-4 sm:gap-6 sm:px-8 sm:py-8",e.className),children:e.children})}var uc="/system/plugins";function Gq(e){let t=new Map(e.plugins.map(n=>[n.name,{...n,reports:[],skills:[]}]));for(let n of e.skills){let o=n.pluginProvider?t.get(n.pluginProvider):void 0;o&&o.skills.push(n)}for(let n of e.reports)t.get(n.pluginName)?.reports.push(n);return[...t.values()].map(n=>({...n,reports:[...n.reports],skills:[...n.skills].sort((o,a)=>o.name.localeCompare(a.name))})).sort((n,o)=>n.displayName.localeCompare(o.displayName))}function Cy(e){return`${uc}/${encodeURIComponent(e)}`}function Hq(e){return e.replace(/\/+$/,"")||"/"}var TA=w(k(),1);function Uq(){let e=({isActive:t})=>S("relative flex h-12 shrink-0 items-center px-3 font-display text-xs font-medium no-underline transition-colors after:absolute after:inset-x-3 after:bottom-0 after:h-0.5 after:transition-colors sm:text-sm",t?"text-dashboard-text after:bg-cyan-300":S("after:bg-transparent hover:bg-white/[0.025]",EA));return(0,TA.jsx)("div",{className:"border-b border-white/[0.06] bg-white/[0.018]",children:(0,TA.jsxs)("nav",{"aria-label":"System navigation",className:S(Ft,"flex min-w-0 gap-1 overflow-x-auto px-4 [scrollbar-width:none] md:px-8 [&::-webkit-scrollbar]:hidden"),children:[(0,TA.jsx)(wa,{className:e,end:!0,to:"/system",children:"Overview"}),(0,TA.jsx)(wa,{className:e,to:"/system/people",children:"People"}),(0,TA.jsx)(wa,{className:e,to:"/system/locations",children:"Locations"}),(0,TA.jsx)(wa,{className:e,to:uc,children:"Plugins"})]})})}var Hg=w(k(),1);function OA(e){return(0,Hg.jsxs)("div",{className:"min-w-0",children:[(0,Hg.jsx)(Uq,{}),(0,Hg.jsx)(yy,{children:e.children})]})}var Hn=w(k(),1);function Tq(e){let t=xa(240),n=Math.max(1,...e.days.map(r=>r.conversations)),o=t.plotWidth/Math.max(1,e.days.length),a=Math.max(4,Math.min(20,o*.55));return(0,Hn.jsxs)(O,{children:[(0,Hn.jsx)(Io,{description:"Daily persisted conversations for this location.",title:"Conversation activity",trailing:(0,Hn.jsxs)("span",{className:"flex items-center gap-2",children:[(0,Hn.jsx)("span",{className:"size-2 rounded-full bg-cyan-400 shadow-[0_0_12px_rgba(34,211,238,0.5)]"}),"90 days"]})}),(0,Hn.jsx)("div",{className:"px-2 py-3 sm:px-4 sm:py-4",children:(0,Hn.jsxs)("svg",{"aria-label":"Daily conversations for this location",className:"block h-auto min-h-52 w-full overflow-visible",role:"img",viewBox:`0 0 ${t.width} ${t.height}`,children:[(0,Hn.jsx)("defs",{children:(0,Hn.jsxs)("linearGradient",{id:"location-bars",x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,Hn.jsx)("stop",{offset:"0%",stopColor:"#22d3ee"}),(0,Hn.jsx)("stop",{offset:"100%",stopColor:"#f59e0b",stopOpacity:"0.65"})]})}),(0,Hn.jsx)(Co,{layout:t,maximum:n}),e.days.map((r,i)=>{let A=r.conversations/n*t.plotHeight,s=t.left+i*o+(o-a)/2,c=t.top+t.plotHeight-A;return(0,Hn.jsx)(gt,{content:(0,Hn.jsx)(Jn,{rows:[["conversations",r.conversations],["active",r.active],["failed",r.failed]]}),label:Ot(r.date),children:(0,Hn.jsx)("rect",{"aria-label":`${Ot(r.date)}: ${r.conversations} conversations, ${r.active} active, ${r.failed} failed`,fill:"url(#location-bars)",height:Math.max(r.conversations?2:0,A),opacity:r.conversations?.9:.18,rx:"2",tabIndex:0,width:a,x:s,y:c})},r.date)}),(0,Hn.jsx)(Da,{dates:e.days.map(r=>r.date),layout:t,xPosition:r=>t.left+r*o+o/2})]})})]})}var xe=w(k(),1);function Oq(){let e=qn(),t=_M(e.locationId);return(0,xe.jsx)(yge,{data:t.data,error:t.error})}function yge(e){return!e.data&&!e.error?(0,xe.jsx)(Qe,{label:"Loading location"}):(0,xe.jsxs)(OA,{children:[e.error?(0,xe.jsx)(O,{padding:"sm",children:(0,xe.jsx)(an,{children:e.data?"Location telemetry refresh failed. Showing cached data.":"Location failed to load."})}):null,e.data?(0,xe.jsx)(Cge,{detail:e.data}):null]})}function Cge(e){let t=e.detail;return(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(St,{description:`${t.provider} public ${t.kind} / ${t.providerDestinationId} / last active ${ed(t.lastSeenAt)}`,title:t.label}),(0,xe.jsxs)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[(0,xe.jsx)(_t,{detail:"Persisted conversations",icon:za,label:"Conversations",value:ae(t.conversations)}),(0,xe.jsx)(_t,{detail:"Verified people seen here",icon:Ss,label:"People",value:ae(t.actors.length)}),(0,xe.jsx)(_t,{detail:"Persisted model usage",icon:xs,label:"Tokens",value:ae(t.tokens??0)}),(0,xe.jsx)(_t,{detail:"Cumulative conversation runtime",icon:Go,label:"Runtime",value:(0,xe.jsx)(Yo,{value:t.durationMs})})]}),(0,xe.jsx)(Tq,{days:t.activityDays}),(0,xe.jsxs)(O,{children:[(0,xe.jsxs)("div",{className:"flex items-center gap-3 border-b border-white/[0.06] px-4 py-4",children:[(0,xe.jsx)("span",{className:"grid size-9 place-items-center rounded border border-cyan-400/15 bg-cyan-400/[0.06] text-cyan-300",children:(0,xe.jsx)(Fs,{"aria-hidden":"true",size:16})}),(0,xe.jsxs)("div",{children:[(0,xe.jsx)("h3",{className:"m-0 font-mono text-xs font-medium uppercase tracking-[0.14em] text-dashboard-text-muted",children:"People seen here"}),(0,xe.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs text-dashboard-text-muted",children:"Verified contributors across persisted conversations."})]})]}),t.actors.length?(0,xe.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3",children:t.actors.slice(0,9).map((n,o)=>{let a=[n.actor.email,n.actor.slackUserId,n.actor.slackUserName,n.actor.fullName,o].join(":"),r=(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)("div",{className:"truncate font-display text-base font-medium text-dashboard-text",children:n.label}),(0,xe.jsxs)("div",{className:"mt-1 font-mono text-xs text-dashboard-text-muted",children:[ae(n.conversations)," conversations /"," ",(0,xe.jsx)(Yo,{value:n.durationMs})]})]}),i="min-w-0 border-b border-r border-white/[0.055] px-4 py-3.5 transition-colors hover:bg-white/[0.03]";return n.actor.email?(0,xe.jsx)(Fe,{className:`${i} text-inherit no-underline`,to:Dr(n.actor.email),children:r},a):(0,xe.jsx)("div",{className:i,children:r},a)})}):(0,xe.jsx)("div",{className:"p-4",children:(0,xe.jsx)(an,{children:"No verified people have been recorded here."})})]})]})}var _y=w(Y(),1);var bd=w(k(),1);function wy(e){return(0,bd.jsxs)("label",{className:"grid h-9 min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center overflow-hidden rounded-lg border border-white/10 bg-white/[0.025] transition-colors hover:border-white/20 focus-within:border-amber-500/35 focus-within:ring-1 focus-within:ring-amber-500/15",children:[(0,bd.jsx)("span",{className:"flex h-full items-center border-r border-white/[0.07] px-2 font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:"Sort"}),(0,bd.jsx)("select",{"aria-label":e.ariaLabel,className:"h-full min-w-0 bg-dashboard-control px-2 font-mono text-xs text-dashboard-text-muted outline-none [color-scheme:dark]",value:e.value,onChange:t=>e.onChange(t.currentTarget.value),children:e.options.map(t=>(0,bd.jsx)("option",{className:"bg-dashboard-control text-dashboard-text",value:t.value,children:t.label},t.value))})]})}var ar=w(k(),1);function qq(e){let t=e.wideRuntime?"grid-cols-[minmax(14rem,1fr)_repeat(2,minmax(5rem,auto))_minmax(8rem,auto)] max-md:grid-cols-3":"grid-cols-[minmax(14rem,1fr)_repeat(3,minmax(5rem,auto))] max-md:grid-cols-3";return(0,ar.jsxs)("div",{"aria-label":"Loading sorted results",className:"min-w-0 animate-pulse",role:"status",children:[Array.from({length:5},(n,o)=>(0,ar.jsxs)("div",{"aria-hidden":"true",className:`grid min-w-0 ${t} items-center gap-4 border-b border-white/[0.055] px-4 py-3.5 last:border-b-0 max-md:gap-x-3 max-md:gap-y-4`,children:[(0,ar.jsxs)("div",{className:"flex min-w-0 items-center gap-3 max-md:col-span-3",children:[(0,ar.jsx)("span",{className:"size-9 shrink-0 rounded bg-white/[0.07]"}),(0,ar.jsxs)("div",{className:"grid min-w-0 flex-1 gap-2",children:[(0,ar.jsx)("span",{className:"h-3.5 w-2/5 rounded bg-white/[0.08]"}),(0,ar.jsx)("span",{className:"h-2.5 w-3/5 rounded bg-white/[0.045]"})]})]}),[0,1,2].map(a=>(0,ar.jsx)("span",{className:"h-4 w-10 justify-self-end rounded bg-white/[0.06]"},a))]},o)),(0,ar.jsx)("span",{className:"sr-only",children:"Loading sorted results"})]})}var Fa=w(k(),1),zq="grid-cols-[minmax(14rem,1fr)_repeat(2,minmax(5rem,auto))_minmax(8rem,auto)]";function Ey(e){return(0,Fa.jsx)("div",{className:S("grid min-w-0 gap-2 border-b border-white/[0.06] bg-black/15 p-3",e.columnsClassName),children:e.children})}function ky(e){return e.loading?(0,Fa.jsx)(qq,{wideRuntime:!0}):e.empty?(0,Fa.jsx)("div",{className:"p-4",children:e.empty}):(0,Fa.jsxs)("div",{"aria-label":e.ariaLabel,className:"min-w-0",children:[(0,Fa.jsx)("div",{"aria-hidden":"true",className:S("grid items-center gap-4 border-b border-white/[0.06] bg-black/20 px-4 py-2.5 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted max-md:hidden",zq),children:e.headers.map((t,n)=>(0,Fa.jsx)("div",{className:n?"justify-self-end":void 0,children:t},t))}),e.children]})}function Qy(e){return(0,Fa.jsx)(Fe,{className:S("group grid min-w-0 items-center gap-4 border-b border-white/[0.055] px-4 py-3.5 text-inherit no-underline transition-colors last:border-b-0 hover:bg-white/[0.035] max-md:grid-cols-3 max-md:gap-x-3 max-md:gap-y-4",zq),to:e.to,children:e.children})}function Iy(e){return(0,Fa.jsxs)("div",{className:"flex min-w-0 items-center gap-3 max-md:col-span-3",children:[(0,Fa.jsx)("span",{className:S("grid size-9 shrink-0 place-items-center rounded border border-white/10 transition-colors",e.iconClassName),children:e.icon}),(0,Fa.jsxs)("div",{className:"min-w-0",children:[(0,Fa.jsx)("div",{className:"truncate font-display text-base font-medium leading-tight text-dashboard-text",children:e.title}),e.description?(0,Fa.jsx)("div",{className:"mt-1 truncate font-mono text-xs leading-tight text-dashboard-text-muted",children:e.description}):null]})]})}var hd=w(k(),1);function qA(e){return(0,hd.jsxs)("div",{className:"justify-self-end text-right max-md:justify-self-stretch max-md:text-left",children:[(0,hd.jsx)("div",{"aria-hidden":"true",className:"mb-1 hidden font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted max-md:block",children:e.label}),(0,hd.jsxs)("div",{className:"font-display text-xl font-light leading-none text-dashboard-text md:font-mono md:text-xs md:text-dashboard-text-muted",children:[(0,hd.jsxs)("span",{className:"sr-only",children:[e.label,": "]}),e.value]})]})}var Cn=w(k(),1);function Yq(e){return(0,Cn.jsxs)(O,{children:[(0,Cn.jsx)(Io,{description:`${e.locations.length} of ${e.totalLocations} public locations`,title:"Public directory"}),(0,Cn.jsxs)(Ey,{columnsClassName:"md:grid-cols-[minmax(14rem,1fr)_minmax(11rem,15rem)]",children:[(0,Cn.jsx)(Hr,{label:"Search locations",placeholder:"Search channel name...",value:e.query,onChange:e.onQueryChange}),(0,Cn.jsx)(wy,{ariaLabel:"Sort locations",onChange:t=>e.onSortChange(t),options:[{label:"Most conversations",value:"conversations"},{label:"Recently active",value:"recent"},{label:"Most tokens",value:"tokens"},{label:"Most runtime",value:"runtime"}],value:e.sort})]}),(0,Cn.jsx)(ky,{ariaLabel:"Public location directory results",empty:e.locations.length===0?(0,Cn.jsx)(an,{children:"No public locations match this search."}):void 0,headers:["Location","Conversations","Tokens","Runtime"],loading:e.loading,children:e.locations.map(t=>(0,Cn.jsxs)(Qy,{to:nU(t.id),children:[(0,Cn.jsx)(Iy,{description:(0,Cn.jsxs)(Cn.Fragment,{children:["Last active ",ed(t.lastSeenAt)]}),icon:(0,Cn.jsx)(Lp,{"aria-hidden":"true",size:16,strokeWidth:1.8}),iconClassName:"bg-cyan-400/[0.06] text-cyan-300 group-hover:border-cyan-400/25",title:t.label}),(0,Cn.jsx)(qA,{label:"Conversations",value:ae(t.conversations)}),(0,Cn.jsx)(qA,{label:"Tokens",value:ae(t.tokens??0)}),(0,Cn.jsx)(qA,{label:"Runtime",value:(0,Cn.jsx)(Yo,{value:t.durationMs})})]},t.id))})]})}var vo=w(k(),1);function Kq(e){return(0,vo.jsx)(O,{className:"opacity-80",padding:"sm",children:(0,vo.jsxs)("div",{className:"grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 max-sm:grid-cols-[auto_minmax(0,1fr)]",children:[(0,vo.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded border border-white/[0.08] bg-white/[0.025] text-dashboard-text-muted",children:(0,vo.jsx)(Bi,{"aria-hidden":"true",size:15})}),(0,vo.jsxs)("div",{className:"min-w-0",children:[(0,vo.jsx)("div",{className:"font-display text-base font-medium text-dashboard-text",children:"Private activity"}),(0,vo.jsx)("div",{className:"mt-1 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"DMs, private channels, and unknown visibility stay combined and unlinked."})]}),(0,vo.jsxs)("div",{className:"text-right max-sm:col-start-2 max-sm:text-left",children:[(0,vo.jsx)("div",{className:"font-display text-2xl font-light text-dashboard-text",children:ae(e.item.conversations)}),(0,vo.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:"conversations"})]})]})})}var on=w(k(),1),wge=["conversations","recent","runtime","tokens"];function Jq(){let e=IM();return(0,on.jsx)(Ege,{data:e.data,error:e.error})}function Ege(e){let[t,n]=(0,_y.useState)(90),[o,a]=Zs("sort","conversations",wge),r=(0,_y.useDeferredValue)(o),[i,A,s]=FA();if(!e.data&&!e.error)return(0,on.jsx)(Qe,{label:"Loading locations"});let c=kge(e.data?.locations??[],s,r),u=e.data?.activityDays.slice(-t)??[],l=e.data?.locations.reduce((g,m)=>g+m.conversations,0)??0,p=e.data?.locations.reduce((g,m)=>g+m.durationMs,0)??0;return(0,on.jsxs)(OA,{children:[(0,on.jsx)(St,{actions:(0,on.jsx)(nr,{onChange:n,value:t}),description:e.error&&!e.data?"Locations failed to load.":`See the public channels where ${it()} has been working and how busy they've been.`,title:"Locations"}),e.error?(0,on.jsx)(O,{padding:"sm",children:(0,on.jsx)(an,{children:e.data?"Location telemetry refresh failed. Showing cached data.":"Location telemetry is unavailable. Try refreshing the dashboard."})}):null,e.data?(0,on.jsxs)(on.Fragment,{children:[(0,on.jsxs)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[(0,on.jsx)(_t,{detail:"Named public destinations",icon:jp,label:"Public locations",value:ae(e.data.locations.length)}),(0,on.jsx)(_t,{detail:"Across public destinations",icon:za,label:"Conversations",value:ae(l)}),(0,on.jsx)(_t,{detail:"Cumulative public runtime",icon:Go,label:"Runtime",value:(0,on.jsx)(Yo,{value:p})}),(0,on.jsx)(_t,{detail:"Combined to preserve privacy",icon:Bi,label:"Private conversations",value:ae(e.data.privateActivity.conversations)})]}),(0,on.jsx)(my,{days:u}),(0,on.jsx)(Yq,{loading:o!==r,locations:c,onQueryChange:A,onSortChange:a,query:i,sort:o,totalLocations:e.data.locations.length}),e.data.privateActivity.conversations>0?(0,on.jsx)(Kq,{item:e.data.privateActivity}):null]}):null]})}function kge(e,t,n){let o=t.trim().toLowerCase();return[...o?e.filter(r=>r.label.toLowerCase().includes(o)):e].sort((r,i)=>n==="conversations"?i.conversations-r.conversations:n==="runtime"?i.durationMs-r.durationMs:n==="tokens"?(i.tokens??0)-(r.tokens??0):Date.parse(i.lastSeenAt)-Date.parse(r.lastSeenAt))}var vy=w(Y(),1);var gn=w(k(),1);function Zq(e){return e.actor.fullName??e.actor.slackUserName??e.actor.email}function Qge(e){return Zq(e)===e.actor.email?void 0:e.actor.email}function Wq(e,t,n){if(e<=0&&t>0)return"unknown";let o=ho(e);return n?o.split(" ").slice(0,n).join(" "):o}function Vq(e,t,n){let o=t.trim().toLowerCase();return[...o?e.filter(r=>[r.actor.email,r.actor.fullName,r.actor.slackUserName].some(i=>i?.toLowerCase().includes(o))):e].sort((r,i)=>n==="conversations"?i.conversations-r.conversations:n==="activeDays"?i.activeDays-r.activeDays:n==="runtime"?i.durationMs-r.durationMs:Date.parse(i.lastSeenAt)-Date.parse(r.lastSeenAt))}function Xq(e){return(0,gn.jsxs)(O,{children:[(0,gn.jsx)(Io,{description:`${e.people.length} of ${e.totalPeople} verified actors`,title:"People directory"}),(0,gn.jsxs)(Ey,{columnsClassName:"md:grid-cols-[minmax(14rem,1fr)_minmax(10rem,14rem)]",children:[(0,gn.jsx)(Hr,{label:"Search people",placeholder:"Search name, email, Slack handle...",value:e.query,onChange:e.onQueryChange}),(0,gn.jsx)(wy,{ariaLabel:"Sort people",onChange:t=>e.onSortChange(t),options:[{label:"Most conversations",value:"conversations"},{label:"Recently active",value:"recent"},{label:"Most active days",value:"activeDays"},{label:"Most runtime",value:"runtime"}],value:e.sort})]}),(0,gn.jsx)(ky,{ariaLabel:"People directory results",empty:e.people.length===0?(0,gn.jsx)(an,{children:"No people match this search."}):void 0,headers:["Person","Conversations","Active days","Runtime"],loading:e.loading,children:e.people.map(t=>(0,gn.jsxs)(Qy,{to:Dr(t.actor.email),children:[(0,gn.jsx)(Iy,{description:Qge(t),icon:(0,gn.jsx)(_a,{"aria-hidden":"true",size:16,strokeWidth:1.8}),iconClassName:"bg-amber-500/[0.07] text-amber-300 group-hover:border-amber-500/25",title:Zq(t)}),(0,gn.jsx)(qA,{label:"Conversations",value:ae(t.conversations)}),(0,gn.jsx)(qA,{label:"Active days",value:ae(t.activeDays)}),(0,gn.jsx)(qA,{label:"Runtime",value:(0,gn.jsxs)(gn.Fragment,{children:[(0,gn.jsx)("span",{className:"whitespace-nowrap md:hidden",children:Wq(t.durationMs,t.conversations,2)}),(0,gn.jsx)("span",{className:"hidden whitespace-nowrap md:inline",children:Wq(t.durationMs,t.conversations)})]})})]},t.actor.email))})]})}var Yt=w(k(),1),Ige=["activeDays","conversations","recent","runtime"];function ez(){let e=EM();return(0,Yt.jsx)(_ge,{data:e.data,error:e.error})}function _ge(e){let[t,n,o]=FA(),[a,r]=(0,vy.useState)(90),[i,A]=Zs("sort","conversations",Ige),s=(0,vy.useDeferredValue)(i);if(!e.data&&!e.error)return(0,Yt.jsx)(Qe,{label:"Loading people"});let c=e.data,u=c?.activityDays.slice(-a)??[],l=c?Vq(c.people,o,s):[],p=c?.people.reduce((f,b)=>f+b.conversations,0)??0,g=c?.people.reduce((f,b)=>f+b.durationMs,0)??0,m=u[0]?.date,h=m?c?.people.filter(f=>f.lastSeenAt.slice(0,10)>=m).length??0:0,y=Math.max(0,...u.map(f=>f.activePeople));return(0,Yt.jsxs)(OA,{children:[(0,Yt.jsx)(St,{actions:(0,Yt.jsx)(nr,{onChange:r,value:a}),description:e.error?"People failed to load.":`See who's been working with ${it()}, how often, and for how long.`,title:"People"}),e.error?(0,Yt.jsx)(O,{padding:"md",children:(0,Yt.jsx)(an,{children:"People telemetry is unavailable. Try refreshing the dashboard."})}):c?.people.length?(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsxs)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[(0,Yt.jsx)(_t,{detail:`Verified actors seen in the last ${a} days`,icon:Ss,label:"Active people",value:ae(h)}),(0,Yt.jsx)(_t,{detail:"Across the complete conversation index",icon:za,label:"Conversations",value:ae(p)}),(0,Yt.jsx)(_t,{detail:"Cumulative persisted conversation runtime",icon:Go,label:"Total runtime",value:(0,Yt.jsx)(Yo,{value:g})}),(0,Yt.jsx)(_t,{detail:`Highest distinct daily count in ${a} days`,icon:jo,label:"Peak daily active",value:ae(y)})]}),(0,Yt.jsx)(by,{days:u}),(0,Yt.jsx)(Xq,{loading:i!==s,onQueryChange:n,onSortChange:A,people:l,query:t,sort:i,totalPeople:c.people.length})]}):(0,Yt.jsx)(O,{padding:"md",children:(0,Yt.jsx)(an,{children:"No actor telemetry with trusted email."})})]})}var Dy=w(Y(),1);var Ct=w(k(),1),xy=["dashboard","personal-tokens"];function tz(){let e=Un(),t=(0,Dy.useRef)(!1),[n,o]=(0,Dy.useState)("Local agent"),a=()=>e.cancelQueries({exact:!0,queryKey:xy}),r=ct({queryKey:xy,queryFn:({signal:g})=>rt(gD,"/api/personal-tokens",g),retry:!1}),i=sr({gcTime:0,mutationFn:g=>bM(mD,"/api/personal-tokens",{name:g}),onMutate:()=>a(),onSuccess:async g=>{let{token:m,...h}=g;await a(),e.setQueryData(xy,y=>({tokens:[h,...(y?.tokens??[]).filter(f=>f.id!==h.id)]}))},onSettled:()=>{t.current=!1}}),A=sr({mutationFn:g=>Ju(`/api/personal-tokens/${encodeURIComponent(g.id)}`),onMutate:()=>a(),onSuccess:async(g,m)=>{await a(),e.setQueryData(xy,h=>({tokens:(h?.tokens??[]).filter(y=>y.id!==m.id)})),i.data?.id===m.id&&i.reset()}}),s=i.data,c=r.data?.tokens??[],u=r.isPending,l=i.isPending||A.isPending,p=(i.isError?"Could not create the API token. Try again.":A.isError?"Could not revoke the API token. Try again.":void 0)??(!r.data&&r.isError?"Could not load API tokens. Try again.":void 0);return(0,Ct.jsx)("div",{className:`${Ft} px-4 py-8 md:px-8`,children:(0,Ct.jsxs)("section",{className:"mx-auto w-full max-w-3xl",children:[(0,Ct.jsx)("h1",{className:"m-0 text-2xl font-bold",children:"Personal API Tokens"}),(0,Ct.jsxs)("p",{className:"mt-2 mb-0 max-w-2xl text-sm text-dashboard-text-muted",children:["Use a token to read ",it()," APIs from a local agent or script. Tokens expire after 90 days."]}),(0,Ct.jsxs)("div",{className:"mt-6 rounded-lg border border-white/15 bg-dashboard-surface-raised p-5",children:[s?(0,Ct.jsxs)("div",{className:"mt-5 rounded border border-emerald-400/40 bg-emerald-400/5 p-3",children:[(0,Ct.jsx)("p",{className:"mt-0 mb-2 text-sm font-semibold",children:"Copy this token now. It won't be shown again."}),(0,Ct.jsx)("code",{className:"block overflow-x-auto rounded bg-black p-2 text-xs text-emerald-300",children:s.token}),(0,Ct.jsx)(pt,{className:"mt-3",onClick:()=>{i.reset(),o("Local agent")},children:"Create another token"})]}):(0,Ct.jsxs)("div",{className:"mt-5 flex gap-2",children:[(0,Ct.jsx)("input",{"aria-label":"Token name",className:"min-w-0 flex-1 rounded border border-white/15 bg-black px-3 py-2 text-sm text-dashboard-text",maxLength:80,onChange:g=>o(g.target.value),value:n}),(0,Ct.jsx)(pt,{disabled:u||l||!n.trim(),onClick:()=>{t.current||(A.reset(),t.current=!0,i.mutate(n))},children:"Create token"})]}),p?(0,Ct.jsx)("p",{className:"mb-0 text-sm text-rose-300",children:p}):null,(0,Ct.jsx)("div",{className:"mt-5 space-y-2",children:u?(0,Ct.jsx)("p",{className:"text-sm text-dashboard-text-muted",children:"Loading API tokens\u2026"}):c.length===0?(0,Ct.jsx)("p",{className:"text-sm text-dashboard-text-muted",children:"No active API tokens."}):c.map(g=>(0,Ct.jsxs)("div",{className:"flex items-center gap-3 rounded border border-white/10 p-3",children:[(0,Ct.jsx)(Ho,{className:"text-[#beaaff]",size:16}),(0,Ct.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,Ct.jsx)("p",{className:"m-0 truncate text-sm font-semibold",children:g.name}),(0,Ct.jsxs)("p",{className:"mt-1 mb-0 text-xs text-dashboard-text-muted",children:["Ends in ",g.tokenSuffix," \xB7 Expires"," ",new Date(g.expiresAt).toLocaleDateString()]})]}),(0,Ct.jsx)("button",{"aria-label":`Revoke ${g.name}`,className:"cursor-pointer border-0 bg-transparent p-1 text-dashboard-text-muted hover:text-rose-300",disabled:l,onClick:()=>{i.isError&&i.reset(),A.mutate(g)},type:"button",children:(0,Ct.jsx)(Uo,{size:16})})]},g.id))})]})]})})}var oz=w(Y(),1);var Ug=w(k(),1);function ZF(e){return(0,Ug.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-white/[0.06] bg-black/15 px-4 py-3 max-md:flex-col max-md:items-stretch",children:[(0,Ug.jsx)("div",{className:"min-w-0",children:e.children}),e.actions?(0,Ug.jsx)("div",{className:"shrink-0 max-md:w-full",children:e.actions}):null]})}var Tg=w(k(),1);function zA(e){return(0,Tg.jsxs)("div",{className:e.className,children:[(0,Tg.jsx)("h2",{className:"m-0 font-display text-xl font-medium tracking-[-0.02em] text-dashboard-text",id:e.id,children:e.title}),e.description?(0,Tg.jsx)("p",{className:"mt-1.5 mb-0 max-w-2xl font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.description}):null]})}var nz=w(k(),1);function VF(e){return(0,nz.jsx)("div",{className:"min-w-0 break-words font-mono text-xs font-medium uppercase leading-tight tracking-[0.14em] text-dashboard-text-muted",children:e.children})}var ce=w(k(),1);function vge(e,t){return e<=0&&t>0?"unknown":ho(e)}function rz(){let e=qn(),t=e.email?decodeURIComponent(e.email):void 0,n=kM(t);return!n.data&&!n.error?(0,ce.jsx)(Qe,{label:"Loading profile"}):(0,ce.jsx)(yy,{children:n.data?(0,ce.jsx)(xge,{profile:n.data}):(0,ce.jsx)(O,{padding:"md",children:(0,ce.jsx)(an,{children:"Profile failed to load."})})})}function xge(e){let[t,n]=(0,oz.useState)(30),o=e.profile,a=o.actor.fullName??o.actor.slackUserName??o.actor.email;return(0,ce.jsxs)("div",{className:"grid min-w-0 gap-5",children:[(0,ce.jsxs)(Fe,{className:"flex w-fit items-center gap-2 font-display text-sm font-medium text-dashboard-text-muted no-underline transition-colors hover:text-dashboard-text",to:"/system/people",children:[(0,ce.jsx)(wr,{"aria-hidden":"true",size:15,strokeWidth:1.8}),"Back to people"]}),(0,ce.jsx)(St,{actions:(0,ce.jsx)(nr,{onChange:n,value:t}),description:(0,ce.jsxs)(ce.Fragment,{children:[o.actor.email,o.actor.slackUserName?` / @${o.actor.slackUserName}`:""]}),title:a}),(0,ce.jsxs)("section",{className:"grid gap-4","aria-labelledby":"profile-metrics-title",children:[(0,ce.jsx)(zA,{id:"profile-metrics-title",title:"Usage over time"}),(0,ce.jsx)(fd,{days:o.activityDays.slice(-t)})]}),(0,ce.jsxs)("div",{className:"grid min-w-0 gap-5 lg:grid-cols-[minmax(0,1fr)_19rem] lg:items-start",children:[(0,ce.jsx)("aside",{className:"grid min-w-0 gap-4 lg:order-2",children:(0,ce.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3 lg:grid-cols-1",children:[(0,ce.jsx)(_t,{detail:"Across the complete conversation index",icon:za,label:"Conversations",value:ae(o.totals.conversations)}),(0,ce.jsx)(_t,{detail:"Cumulative persisted conversation runtime",icon:Go,label:"Runtime",value:(0,ce.jsx)(Yo,{value:o.totals.durationMs})}),(0,ce.jsx)(_t,{detail:"Persisted model token usage",icon:xs,label:"Tokens",value:ae(o.totals.tokens??0)})]})}),(0,ce.jsxs)("div",{className:"grid min-w-0 gap-5 lg:order-1",children:[(0,ce.jsxs)(O,{as:"section",className:"mb-0",variant:"section",children:[(0,ce.jsx)(ZF,{actions:(0,ce.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:"52 weeks"}),children:(0,ce.jsx)(VF,{children:"Activity"})}),(0,ce.jsx)(fy,{days:o.activityDays})]}),(0,ce.jsxs)("div",{className:"grid min-w-0 gap-5 md:grid-cols-2",children:[(0,ce.jsx)(az,{items:o.locations,title:"Places"}),(0,ce.jsx)(az,{items:o.surfaces,title:"Surfaces"})]})]})]})]})}function az(e){return e.items.length<=1?null:(0,ce.jsxs)(O,{as:"section",className:"mb-0",variant:"section",children:[(0,ce.jsx)(ZF,{children:(0,ce.jsx)(VF,{children:e.title})}),(0,ce.jsx)("ol",{className:"m-0 list-none p-0",children:e.items.slice(0,6).map((t,n)=>(0,ce.jsxs)("li",{className:"grid min-w-0 grid-cols-[2rem_minmax(0,1fr)_auto] items-center gap-3 border-b border-white/[0.06] px-4 py-3 last:border-b-0",children:[(0,ce.jsx)("div",{className:"font-mono text-xs leading-none text-dashboard-text-muted",children:n+1}),(0,ce.jsxs)("div",{className:"min-w-0",children:[(0,ce.jsx)("div",{className:"truncate font-display text-base font-medium leading-tight text-dashboard-text",children:t.label}),(0,ce.jsxs)("div",{className:"mt-1 truncate font-mono text-xs leading-tight text-dashboard-text-muted",children:[vge(t.durationMs,t.conversations),t.tokens?` / ${ae(t.tokens)} tokens`:"",t.failed?` / ${ae(t.failed)} errors`:""]})]}),(0,ce.jsx)("div",{className:"font-display text-xl font-light leading-none text-dashboard-text",children:ae(t.conversations)})]},t.label))})]})}var hz=w(Y(),1);var Mt=w(k(),1);function Az(e){return(0,Mt.jsxs)("section",{"aria-labelledby":"plugin-details-heading",className:"grid gap-3",children:[(0,Mt.jsx)(zA,{className:"px-1",id:"plugin-details-heading",title:"Details"}),(0,Mt.jsxs)(O,{children:[(0,Mt.jsxs)("div",{className:"grid grid-cols-1 gap-px bg-white/[0.055] sm:grid-cols-3",children:[(0,Mt.jsx)(XF,{icon:qa,label:"Identifier",value:e.plugin.name}),(0,Mt.jsx)(XF,{icon:Yn,label:"Skills",value:String(e.plugin.skills.length)}),(0,Mt.jsx)(XF,{icon:Ho,label:"Configuration",value:String(e.plugin.configKeys.length)})]}),(0,Mt.jsxs)("div",{className:"grid gap-5 border-t border-white/[0.06] p-4 sm:p-5 lg:grid-cols-2",children:[(0,Mt.jsx)(iz,{emptyText:"No plugin-provided skills were discovered.",items:e.plugin.skills.map(t=>t.name),title:"Skills"}),e.plugin.configKeys.length?(0,Mt.jsx)("div",{className:"lg:col-span-2",children:(0,Mt.jsx)(iz,{emptyText:"",items:e.plugin.configKeys,title:"Configuration keys"})}):null]})]})]})}function XF(e){let t=e.icon;return(0,Mt.jsxs)("div",{className:"flex items-center gap-3 bg-dashboard-surface-panel px-4 py-3.5",children:[(0,Mt.jsx)(t,{"aria-hidden":"true",className:"text-cyan-200/60",size:15}),(0,Mt.jsxs)("div",{className:"min-w-0",children:[(0,Mt.jsx)("div",{className:"truncate font-display text-base font-medium text-dashboard-text",children:e.value}),(0,Mt.jsx)("div",{className:"mt-0.5 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:e.label})]})]})}function iz(e){return(0,Mt.jsxs)("div",{children:[(0,Mt.jsx)("h3",{className:"m-0 font-mono text-xs font-medium uppercase tracking-[0.12em] text-dashboard-text-muted",children:e.title}),e.items.length?(0,Mt.jsx)("div",{className:"mt-2.5 flex flex-wrap gap-2",children:e.items.map(t=>(0,Mt.jsx)("span",{className:"rounded border border-white/[0.07] bg-black/20 px-2.5 py-1.5 font-mono text-xs text-dashboard-text-muted",children:t},t))}):(0,Mt.jsx)("p",{className:"mt-2 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.emptyText})]})}var vt=w(k(),1);function sz(e){return(0,vt.jsx)("section",{"aria-label":"Plugins",className:"grid gap-3",children:e.plugins.length?(0,vt.jsx)("div",{className:"grid gap-3",children:e.plugins.map(t=>(0,vt.jsx)(Dge,{plugin:t},t.name))}):(0,vt.jsx)(O,{padding:"md",children:(0,vt.jsx)("div",{className:"font-mono text-xs text-dashboard-text-muted",children:"No plugin inventory has been reported yet."})})})}function Dge(e){let t=e.plugin.reports.flatMap(n=>n.metrics??[]);return(0,vt.jsxs)(Fe,{className:"group grid min-w-0 gap-4 rounded-lg border border-white/[0.07] bg-dashboard-surface-panel/85 p-4 no-underline transition-colors hover:border-cyan-300/20 hover:bg-cyan-300/[0.025] sm:p-5",to:Cy(e.plugin.name),children:[(0,vt.jsxs)("div",{className:"flex min-w-0 items-start justify-between gap-4",children:[(0,vt.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,vt.jsx)("div",{className:"grid size-9 shrink-0 place-items-center rounded border border-cyan-300/15 bg-cyan-300/[0.075] text-cyan-200",children:(0,vt.jsx)(qa,{"aria-hidden":"true",size:16,strokeWidth:1.8})}),(0,vt.jsxs)("div",{className:"min-w-0",children:[(0,vt.jsx)("h3",{className:"m-0 truncate font-display text-lg font-medium text-dashboard-text",children:e.plugin.displayName}),(0,vt.jsx)("p",{className:"mt-1 mb-0 line-clamp-2 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.plugin.description})]})]}),(0,vt.jsx)(Ep,{"aria-hidden":"true",className:"mt-1 shrink-0 text-dashboard-text-muted transition-transform group-hover:translate-x-0.5 group-hover:text-cyan-200/70",size:16})]}),t.length?(0,vt.jsx)("div",{className:`grid ${t.length===1?"grid-cols-1":"grid-cols-2"} gap-px overflow-hidden rounded border border-white/[0.06] bg-white/[0.055]`,children:t.slice(0,2).map(n=>(0,vt.jsxs)("div",{className:"min-w-0 bg-dashboard-surface-panel px-3 py-2.5",children:[(0,vt.jsx)("div",{className:"truncate font-display text-lg font-light text-dashboard-text",children:n.value}),(0,vt.jsx)("div",{className:"mt-1 truncate font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:n.label})]},n.label))}):null,(0,vt.jsx)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 border-t border-white/[0.055] pt-3",children:(0,vt.jsx)(Fge,{icon:Yn,label:`${e.plugin.skills.length} skills`})})]})}function Fge(e){let t=e.icon;return(0,vt.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs uppercase tracking-[0.08em] text-dashboard-text-muted",children:[(0,vt.jsx)(t,{"aria-hidden":"true",size:11}),e.label]})}var xn=w(k(),1),Fy=["#67e8f9","#6ee7b7","#fbbf24","#fb7185","#a78bfa"],cz={danger:"#fb7185",good:"#6ee7b7",neutral:"#67e8f9",warning:"#fbbf24"};function dz(e){let{widget:t}=e,n=t.timeRangeDays?t.categories.slice(-Sge(t,e.range)):t.categories,o=$ge(t),a=520,r=250,i=o==="usd"?72:56,A=16,c=r-A-36,u=(a-i-12)/n.length,l=Math.min(72,u*.72),p=l/t.series.length,g=n.flatMap(B=>t.series.map(C=>B.values[C.key]??0)),m=Math.min(0,...g),h=Math.max(0,...g),y=h===m?m+1:h,f=y-m,b=A+y/f*c;return(0,xn.jsxs)("div",{className:"overflow-hidden rounded border border-white/[0.07] bg-dashboard-surface-panel",children:[(0,xn.jsxs)("div",{className:"border-b border-white/[0.06] px-4 py-3",children:[(0,xn.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:(0,xn.jsx)("h4",{className:"m-0 font-mono text-xs font-medium uppercase tracking-[0.14em] text-dashboard-text-muted",children:t.title})}),t.description?(0,xn.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs text-dashboard-text-muted",children:t.description}):null,t.series.length>1?(0,xn.jsx)("div",{"aria-label":"Chart legend",className:"mt-3 flex flex-wrap gap-3",children:t.series.map((B,C)=>(0,xn.jsxs)("span",{className:"flex items-center gap-1.5 font-mono text-xs text-dashboard-text-muted",children:[(0,xn.jsx)("i",{className:"size-2 rounded-sm",style:{backgroundColor:B.tone?cz[B.tone]:Fy[C%Fy.length]}}),B.label]},B.key))}):null]}),n.length===0?(0,xn.jsx)("p",{className:"m-0 p-4 font-mono text-xs text-dashboard-text-muted",children:t.emptyText??"No chart data."}):(0,xn.jsxs)("svg",{"aria-label":t.title,className:"block h-auto min-h-48 w-full",role:"img",viewBox:`0 0 ${a} ${r}`,children:[[y,y-f/2,m].map((B,C)=>{let E=A+C*(c/2);return(0,xn.jsxs)("g",{children:[(0,xn.jsx)("line",{stroke:"rgba(255,255,255,0.07)",strokeDasharray:"3 5",x1:i,x2:a-12,y1:E,y2:E}),(0,xn.jsx)("text",{fill:"rgba(255,255,255,0.35)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:"end",x:i-6,y:E+3,children:uz(B,o)})]},C)}),n.flatMap((B,C)=>t.series.map((E,x)=>{let Q=B.values[E.key]??0,R=Math.max(Q?2:0,Math.abs(Q)/f*c),q=uz(Q,E.format);return(0,xn.jsx)(gt,{content:`${E.label}: ${q}`,label:B.label,children:(0,xn.jsx)("rect",{"aria-label":`${B.label}, ${E.label}: ${q}`,fill:E.tone?cz[E.tone]:Fy[x%Fy.length],height:R,opacity:Q?.82:.1,rx:"1.5",tabIndex:Q?0:-1,width:p*.75,x:i+C*u+(u-l)/2+x*p,y:Q>=0?b-R:b})},`${B.id}:${E.key}`)})),Lge(n.length).map(B=>{let C=n[B];return(0,xn.jsx)("text",{fill:"rgba(255,255,255,0.4)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:"middle",x:i+B*u+u/2,y:r-9,children:Rge(C.label)},C.id)})]})]})}function Sge(e,t){let n=e.timeRangeDays??[];return t&&n.includes(t)?t:n.includes(30)?30:n[0]??30}function Lge(e){return[0,Math.floor((e-1)/2),e-1].filter((t,n,o)=>t>=0&&o.indexOf(t)===n)}function Rge(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00.000Z`).toLocaleDateString(void 0,{day:"numeric",month:"short",timeZone:"UTC"}):e}function Nge(e){return String(Number(e.toPrecision(12)))}function $ge(e){return new Set(e.series.map(n=>n.format)).size===1?e.series[0]?.format:void 0}function uz(e,t){return t==="usd"?Qt({total:e}):Nge(e)}var re=w(k(),1);function pz(e){return e.reports.length===0&&!e.emptyText?null:e.reports.length===0?(0,re.jsx)(O,{padding:"md",children:(0,re.jsxs)("div",{className:"flex items-center gap-4",children:[(0,re.jsx)("div",{className:"grid size-10 shrink-0 place-items-center rounded border border-white/[0.07] bg-white/[0.025] text-dashboard-text-muted",children:(0,re.jsx)(Gp,{"aria-hidden":"true",size:17})}),(0,re.jsxs)("div",{children:[(0,re.jsx)("h2",{className:"m-0 font-display text-base font-medium text-dashboard-text-muted",children:"Operational reports"}),(0,re.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.emptyText})]})]})}):(0,re.jsxs)("div",{className:"grid gap-3",children:[(0,re.jsx)(zA,{className:"px-1",title:"Operational reports"}),e.reports.map(t=>(0,re.jsx)(Mge,{fallbackTitle:e.fallbackTitle,range:e.range,report:t},t.pluginName))]})}function Mge(e){let n=(e.report.title===e.report.pluginName?void 0:e.report.title)??e.fallbackTitle??e.report.pluginName,o=e.report.metrics??[];return(0,re.jsxs)(O,{children:[(0,re.jsxs)("div",{className:"flex items-start justify-between gap-4 border-b border-white/[0.06] px-5 py-4",children:[(0,re.jsxs)("div",{className:"min-w-0",children:[(0,re.jsx)("h3",{className:"m-0 truncate font-display text-lg font-medium text-dashboard-text",children:n}),(0,re.jsx)("div",{className:"mt-1 hidden font-mono text-xs text-dashboard-text-muted sm:block",children:e.report.pluginName})]}),e.report.generatedAt?(0,re.jsxs)("div",{className:"hidden shrink-0 font-mono text-xs text-dashboard-text-muted sm:block",children:["updated ",sa(e.report.generatedAt)]}):null]}),o.length?(0,re.jsx)("div",{className:S("grid gap-px bg-white/[0.055]",o.length===1?"grid-cols-1":"grid-cols-2",o.length===3?"lg:grid-cols-3":o.length===5?"lg:grid-cols-5":o.length>=4?"lg:grid-cols-4":void 0),children:o.map(a=>(0,re.jsxs)("div",{className:S("min-w-0 bg-dashboard-surface-panel px-4 py-4",o.length>1&&o.length%2===1&&"last:col-span-2 lg:last:col-span-1",Pge(a.tone)),children:[(0,re.jsx)("div",{className:"truncate font-display text-2xl font-light leading-none text-dashboard-text",children:a.value}),(0,re.jsx)("div",{className:"mt-2 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:a.label})]},a.label))}):null,e.report.widgets?.length?(0,re.jsx)("div",{className:"grid gap-3 border-t border-white/[0.06] bg-black/15 p-3 lg:grid-cols-2",children:e.report.widgets.map(a=>(0,re.jsx)(dz,{range:e.range,widget:a},a.id))}):null,e.report.recordSets?.map(a=>(0,re.jsx)(jge,{recordSet:a},`${e.report.pluginName}:${a.title}`))]})}function jge(e){let t=e.recordSet.fields??[],n=e.recordSet.records??[];return(0,re.jsxs)("div",{className:"border-t border-white/[0.06]",children:[(0,re.jsxs)("div",{className:"flex items-center justify-between gap-4 px-5 py-3",children:[(0,re.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:e.recordSet.title}),(0,re.jsxs)("div",{className:"hidden font-mono text-xs text-dashboard-text-muted sm:block",children:[n.length," records"]})]}),n.length===0?(0,re.jsx)("div",{className:"px-5 pb-5 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.recordSet.emptyText??"No records."}):t.length===0?(0,re.jsx)("div",{className:"px-5 pb-5 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Report records are unavailable because no fields were declared."}):(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)("div",{className:"grid gap-2 border-t border-white/[0.05] p-3 sm:hidden",children:n.map(o=>(0,re.jsx)("div",{className:S("grid gap-3 rounded-md border border-white/[0.06] bg-black/15 p-3",lz(o.tone)),children:t.map(a=>(0,re.jsxs)("div",{children:[(0,re.jsx)("div",{className:"font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:a.label}),(0,re.jsx)("div",{className:"mt-1 break-words font-mono text-xs leading-relaxed text-dashboard-text-muted",children:o.values[a.key]??""})]},a.key))},o.id))}),(0,re.jsx)("div",{className:"hidden overflow-x-auto border-t border-white/[0.05] sm:block",children:(0,re.jsxs)("table",{className:"w-full min-w-[36rem] border-collapse text-left",children:[(0,re.jsx)("thead",{className:"bg-black/15 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:(0,re.jsx)("tr",{children:t.map(o=>(0,re.jsx)("th",{className:"border-b border-white/[0.055] px-5 py-2.5 font-medium",scope:"col",children:o.label},o.key))})}),(0,re.jsx)("tbody",{children:n.map(o=>(0,re.jsx)("tr",{className:S("transition-colors hover:bg-white/[0.025]",lz(o.tone)),children:t.map(a=>(0,re.jsx)("td",{className:"max-w-72 truncate border-b border-white/[0.05] px-5 py-3 font-mono text-xs text-dashboard-text-muted",children:o.values[a.key]??""},a.key))},o.id))})]})})]})]})}function Pge(e){return e==="danger"?"shadow-[inset_0_2px_0_rgba(251,113,133,0.65)]":e==="warning"?"shadow-[inset_0_2px_0_rgba(251,191,36,0.65)]":e==="good"?"shadow-[inset_0_2px_0_rgba(110,231,183,0.55)]":""}function lz(e){return e==="danger"?"bg-rose-500/[0.07]":e==="warning"?"bg-amber-300/[0.045]":e==="good"?"bg-emerald-400/[0.055]":""}var We=w(k(),1);function mz(e){let t=Hge(e.skills),n=e.skills.filter(o=>o.pluginProvider).length;return(0,We.jsxs)(O,{children:[(0,We.jsxs)("div",{className:"flex items-start justify-between gap-4 border-b border-white/[0.06] px-5 py-4 max-sm:flex-col",children:[(0,We.jsx)(zA,{description:(0,We.jsxs)(We.Fragment,{children:["The task-specific instructions ",it()," ","discovered, grouped by their plugin provider when one is registered."]}),title:"Skills"}),(0,We.jsxs)("div",{className:"grid min-w-[12rem] grid-cols-2 overflow-hidden rounded-lg border border-white/[0.07] bg-black/15 max-sm:w-full max-sm:min-w-0",children:[(0,We.jsx)(gz,{label:"discovered",value:e.skills.length}),(0,We.jsx)(gz,{label:"from plugins",value:n})]})]}),(0,We.jsx)("div",{className:"grid gap-3 p-3 sm:p-4",children:t.length?t.map(o=>(0,We.jsx)(Gge,{group:o},o.pluginProvider??"standalone")):(0,We.jsx)("div",{className:"rounded-lg border border-dashed border-white/[0.08] px-4 py-8 text-center font-mono text-xs text-dashboard-text-muted",children:"No skills have been discovered yet."})})]})}function Gge(e){let t=e.group.pluginProvider??"Standalone";return(0,We.jsxs)("article",{className:"rounded-lg border border-white/[0.065] bg-white/[0.025] p-4",children:[(0,We.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,We.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,We.jsx)("div",{className:"grid size-8 shrink-0 place-items-center rounded border border-cyan-300/15 bg-cyan-300/[0.075] text-cyan-200",children:e.group.pluginProvider?(0,We.jsx)(qa,{"aria-hidden":"true",size:15,strokeWidth:1.8}):(0,We.jsx)(Yn,{"aria-hidden":"true",size:15,strokeWidth:1.8})}),(0,We.jsxs)("div",{children:[(0,We.jsx)("h3",{className:"m-0 truncate font-display text-base font-medium text-dashboard-text",children:t}),(0,We.jsx)("div",{className:"mt-0.5 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:e.group.pluginProvider?"plugin provider":"core or local"})]})]}),(0,We.jsxs)("span",{className:"font-mono text-xs text-dashboard-text-muted",children:[ae(e.group.skills.length)," skill",e.group.skills.length===1?"":"s"]})]}),(0,We.jsx)("div",{className:"flex flex-wrap gap-2",children:e.group.skills.map(n=>(0,We.jsx)("span",{className:"rounded border border-white/[0.07] bg-black/20 px-2.5 py-1.5 font-mono text-xs text-dashboard-text-muted",children:n.name},n.name))})]})}function gz(e){return(0,We.jsxs)("div",{className:"border-r border-white/[0.06] px-3 py-2.5 text-center last:border-r-0",children:[(0,We.jsx)("div",{className:"font-display text-xl font-light leading-none text-dashboard-text",children:ae(e.value)}),(0,We.jsx)("div",{className:"mt-1.5 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:e.label})]})}function Hge(e){let t=new Map;for(let n of e){let o=t.get(n.pluginProvider)??[];o.push(n),t.set(n.pluginProvider,o)}return[...t.entries()].map(([n,o])=>({pluginProvider:n,skills:[...o].sort((a,r)=>a.name.localeCompare(r.name))})).sort((n,o)=>n.pluginProvider?o.pluginProvider?n.pluginProvider.localeCompare(o.pluginProvider):-1:1)}var be=w(k(),1);function e8(e){return new Date(`${e}T00:00:00.000Z`).toLocaleDateString(void 0,{day:"numeric",month:"short",timeZone:"UTC"})}function Uge(e){return e.reduce((t,n)=>({allow:t.allow+n.allow,ask:t.ask+n.ask,costUsd:t.costUsd+(n.costUsd??0),deny:t.deny+n.deny,requests:t.requests+n.requests}),{allow:0,ask:0,costUsd:0,deny:0,requests:0})}function Og(e){return(0,be.jsxs)("div",{className:"rounded-md border border-white/[0.05] bg-black/10 px-3 py-3",children:[(0,be.jsx)("div",{className:"font-display text-xl font-light text-dashboard-text",children:(0,be.jsx)("span",{className:e.valueClassName,children:e.value})}),(0,be.jsx)("div",{className:"mt-1 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.label})]})}function fz(e){let t=Uge(e.days),n=Math.max(1,...e.days.map(a=>a.requests)),o=[0,Math.floor((e.days.length-1)/2),e.days.length-1].filter((a,r,i)=>a>=0&&i.indexOf(a)===r);return(0,be.jsxs)(O,{children:[(0,be.jsxs)("div",{className:"border-b border-white/[0.06] px-4 py-4",children:[(0,be.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,be.jsxs)("div",{children:[(0,be.jsx)("h3",{className:"m-0 font-mono text-xs font-medium uppercase tracking-[0.14em] text-dashboard-text-muted",children:"Guardian reviews"}),(0,be.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Daily decisions before reviewed actions execute."})]}),(0,be.jsxs)("div",{className:"font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted",children:[(0,be.jsx)("span",{className:"mr-3 text-emerald-200/75",children:"Allow"}),(0,be.jsx)("span",{className:"mr-3 text-amber-200/75",children:"Ask"}),(0,be.jsx)("span",{className:"text-rose-200/75",children:"Deny"})]})]}),(0,be.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-5",children:[(0,be.jsx)(Og,{label:"Requests",value:ae(t.requests)}),(0,be.jsx)(Og,{label:"Allowed",value:ae(t.allow),valueClassName:"text-emerald-100"}),(0,be.jsx)(Og,{label:"Asked",value:ae(t.ask),valueClassName:"text-amber-100"}),(0,be.jsx)(Og,{label:"Denied",value:ae(t.deny),valueClassName:"text-rose-100"}),(0,be.jsx)(Og,{label:"Estimated cost",value:Qt({total:t.costUsd})})]})]}),(0,be.jsxs)("div",{className:"px-4 pt-5 pb-3",children:[(0,be.jsx)("div",{"aria-label":"Daily Guardian review results",className:"flex h-36 items-end gap-px",role:"img",children:e.days.map(a=>{let r=Math.max(2,a.requests/n*100);return(0,be.jsx)(gt,{content:(0,be.jsxs)("div",{className:"grid grid-cols-[auto_auto] gap-x-4",children:[(0,be.jsx)("span",{children:"Allow"}),(0,be.jsx)("span",{className:"text-right",children:a.allow}),(0,be.jsx)("span",{children:"Ask"}),(0,be.jsx)("span",{className:"text-right",children:a.ask}),(0,be.jsx)("span",{children:"Deny"}),(0,be.jsx)("span",{className:"text-right",children:a.deny}),(0,be.jsx)("span",{children:"Cost"}),(0,be.jsx)("span",{className:"text-right",children:Qt({total:a.costUsd??0})})]}),label:e8(a.date),triggerClassName:"h-full min-w-0 flex-1 items-end",children:(0,be.jsxs)("button",{"aria-label":`${e8(a.date)}: ${a.allow} allowed, ${a.ask} asked, ${a.deny} denied, ${Qt({total:a.costUsd??0})}`,className:"flex w-full min-w-0 flex-col justify-end overflow-hidden rounded-t-sm bg-white/[0.035] focus-visible:outline-1 focus-visible:outline-cyan-300",style:{height:`${r}%`},type:"button",children:[a.deny?(0,be.jsx)("span",{className:"block w-full bg-rose-400/75",style:{flex:a.deny}}):null,a.ask?(0,be.jsx)("span",{className:"block w-full bg-amber-300/75",style:{flex:a.ask}}):null,a.allow?(0,be.jsx)("span",{className:"block w-full bg-emerald-300/70",style:{flex:a.allow}}):null]})},a.date)})}),(0,be.jsx)("div",{className:"relative mt-2 h-4 font-mono text-xs text-dashboard-text-muted",children:o.map(a=>{let r=e.days[a];return r?(0,be.jsx)("span",{className:"absolute -translate-x-1/2",style:{left:`${(a+.5)/e.days.length*100}%`},children:e8(r.date)},r.date):null})})]})]})}var Ri=w(k(),1);function bz(e){if(!e.stats)return(0,Ri.jsx)(O,{padding:"sm",children:(0,Ri.jsx)(an,{children:e.error?"Conversation metrics failed to load.":e.loading?"Loading conversation metrics.":"No conversation metrics have been reported yet."})});let t=e.stats.metricDays.slice(-e.range),n=e.stats.guardian.metricDays.slice(-e.range);return(0,Ri.jsxs)("section",{"aria-label":"Runtime telemetry",className:"grid gap-4",children:[e.error?(0,Ri.jsx)("p",{className:"m-0 font-mono text-xs text-rose-200/65",children:"Metrics refresh failed. Showing cached data."}):null,(0,Ri.jsx)(hy,{days:t}),(0,Ri.jsx)(fd,{days:t}),(0,Ri.jsx)(fz,{days:n})]})}var Le=w(k(),1);function Bz(e){let[t,n]=(0,hz.useState)(30),o=lt(),a=e.data.pluginReports?.reports??[],r=Gq({plugins:e.data.plugins,reports:a,skills:e.data.skills}),i=Hq(o.pathname),A=i===uc,s=r.find(u=>Cy(u.name)===i);return i.startsWith(`${uc}/`)&&!s?(0,Le.jsx)(Dt,{replace:!0,to:uc}):i!=="/system"&&!A&&!s?(0,Le.jsx)(Dt,{replace:!0,to:"/system"}):(0,Le.jsx)(OA,{children:s?(0,Le.jsx)(qge,{data:e.data,onRangeChange:n,plugin:s,range:t}):A?(0,Le.jsx)(Oge,{data:e.data,plugins:r}):(0,Le.jsx)(Tge,{data:e.data,range:t,onRangeChange:n})})}function Tge(e){return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(St,{actions:(0,Le.jsx)(nr,{onChange:e.onRangeChange,value:e.range}),description:`A live read on ${DM()} runtime and model usage.`,title:"System"}),(0,Le.jsx)(bz,{error:e.data.conversationStatsError,range:e.range,loading:e.data.conversationStatsLoading,stats:e.data.conversationStats})]})}function Oge(e){return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(St,{description:`Loaded capabilities and operational reports for ${it()}.`,title:"Plugins"}),e.data.pluginReportsError?(0,Le.jsx)(yz,{showingReports:e.plugins.some(t=>t.reports.length)}):null,(0,Le.jsx)(sz,{plugins:e.plugins}),e.data.skills.length?(0,Le.jsx)(mz,{skills:e.data.skills}):null]})}function qge(e){let t=e.plugin.reports,n=t.some(o=>o.widgets?.some(a=>a.timeRangeDays?.length));return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(St,{actions:n?(0,Le.jsx)(nr,{onChange:e.onRangeChange,value:e.range}):void 0,description:e.plugin.description,title:e.plugin.displayName}),e.data.pluginReportsError?(0,Le.jsx)(yz,{showingReports:!!t.length}):null,(0,Le.jsx)(Az,{plugin:e.plugin}),(0,Le.jsx)(pz,{fallbackTitle:e.plugin.displayName,...!e.data.pluginReportsLoading&&!e.data.pluginReportsError?{emptyText:"This plugin does not expose operational activity yet."}:{},range:e.range,reports:t})]})}function yz(e){return(0,Le.jsx)(O,{className:"border-amber-300/10 bg-amber-300/[0.025]",padding:"sm",children:(0,Le.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Le.jsx)("div",{className:"grid size-9 shrink-0 place-items-center rounded border border-amber-300/15 bg-amber-300/[0.055] text-amber-200/70",children:(0,Le.jsx)(Ia,{"aria-hidden":"true",size:15})}),(0,Le.jsxs)("div",{children:[(0,Le.jsx)("div",{className:"font-display text-sm font-medium text-dashboard-text-muted",children:"Plugin stats failed to load."}),(0,Le.jsx)("div",{className:"mt-1 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:e.showingReports?`Showing the last operational reports ${it()} received.`:"Plugin details and capabilities are still available."})]})]})})}var kz=w(Y(),1);var wz=w(Y(),1);var Kt=w(k(),1),Cz=[{color:"#6ee7b7",key:"completed",label:"Completed"},{color:"#fda4af",key:"failed",label:"Failed"},{color:"#fcd34d",key:"blocked",label:"Blocked"}];function Ez(e){let[t,n]=(0,wz.useState)(30),o=e.days.slice(-t),a=xa(220),r=o.map(u=>u.completed+u.failed+u.blocked),i=Math.max(1,...r),A=o.length>0?a.plotWidth/o.length:a.plotWidth,s=Math.max(2,Math.min(13,A*.68)),c=r.some(u=>u>0);return(0,Kt.jsxs)(O,{className:"min-h-[15rem] p-4 sm:p-5",children:[(0,Kt.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,Kt.jsxs)("div",{children:[(0,Kt.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:"Executions over time"}),(0,Kt.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Terminal runs for this task each day."})]}),(0,Kt.jsx)("div",{"aria-label":"Task execution range",className:"inline-flex rounded border border-white/[0.08] bg-black/20 p-0.5",children:[7,30,90].map(u=>(0,Kt.jsxs)("button",{"aria-pressed":t===u,className:S("cursor-pointer rounded-sm border-0 px-2.5 py-1.5 font-mono text-xs uppercase tracking-[0.1em] transition-colors",t===u?"bg-cyan-300/10 text-cyan-100":"bg-transparent text-dashboard-text-muted hover:text-dashboard-text"),onClick:()=>n(u),type:"button",children:[u,"d"]},u))})]}),(0,Kt.jsx)("div",{"aria-label":"Task execution status legend",className:"mt-4 flex flex-wrap gap-4",children:Cz.map(u=>(0,Kt.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-dashboard-text-muted",children:[(0,Kt.jsx)("i",{className:"size-2 rounded-sm",style:{backgroundColor:u.color}}),u.label]},u.key))}),(0,Kt.jsxs)("div",{className:"relative mt-3 overflow-hidden",children:[(0,Kt.jsxs)("svg",{"aria-label":`Task executions during the last ${t} days`,className:"block h-auto min-h-40 w-full",role:"img",viewBox:`0 0 ${a.width} ${a.height}`,children:[(0,Kt.jsx)(Co,{layout:a,maximum:i}),o.map((u,l)=>{let p=0,g=a.left+l*A+(A-s)/2,m=r[l]??0;return(0,Kt.jsx)(gt,{content:(0,Kt.jsx)(Jn,{rows:[["completed",u.completed],["failed",u.failed],["blocked",u.blocked],["total",m]]}),label:Ot(u.date),children:(0,Kt.jsxs)("g",{"aria-label":`${Ot(u.date)}: ${u.completed} completed, ${u.failed} failed, ${u.blocked} blocked, ${m} total`,tabIndex:0,children:[Cz.map(h=>{let f=u[h.key]/i*a.plotHeight;return p+=f,(0,Kt.jsx)("rect",{fill:h.color,height:f,opacity:.82,rx:"1",width:s,x:g,y:a.top+a.plotHeight-p},h.key)}),(0,Kt.jsx)("rect",{fill:"transparent",height:a.plotHeight,width:Math.max(s,8),x:g-(Math.max(s,8)-s)/2,y:a.top})]})},u.date)}),(0,Kt.jsx)(Da,{dates:o.map(u=>u.date),layout:a,xPosition:u=>a.left+u*A+A/2})]}),c?null:(0,Kt.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center pt-12 font-mono text-xs text-dashboard-text-muted",children:"No task executions in this period."})]})]})}var Ce=w(k(),1);function Qz(e){let{taskId:t,kind:n}=qn(),[o]=uA(),a=n==="scheduled"||n==="event"?n:void 0,r=wM(e.enabled&&!!(t&&a),a,t),i=Fr(t?`/tasks/${encodeURIComponent(t)}`:"/tasks",o);return!t||!a?(0,Ce.jsx)(Dt,{replace:!0,to:"/tasks"}):!r.data&&!r.error?(0,Ce.jsx)(Qe,{label:"Loading task executions"}):r.error||!r.data?(0,Ce.jsx)("div",{className:`${Ft} px-4 py-8 md:px-8`,children:(0,Ce.jsxs)("section",{className:"mx-auto grid w-full max-w-4xl gap-5",children:[(0,Ce.jsx)(St,{description:"Terminal runs for one scheduled or event task.",title:"Task executions"}),(0,Ce.jsxs)(O,{padding:"md",children:[(0,Ce.jsx)("p",{className:"m-0 text-sm text-rose-300",children:r.error instanceof Mo&&r.error.status===404?"This task was not found or is not visible to you.":"Task executions could not be loaded. Try again."}),(0,Ce.jsxs)(Fe,{className:"mt-3 inline-flex items-center gap-2 font-mono text-xs text-dashboard-text-muted no-underline hover:text-dashboard-text",to:"/tasks",children:[(0,Ce.jsx)(wr,{"aria-hidden":"true",size:14}),"Back to tasks"]})]})]})}):(0,Ce.jsx)(zge,{backTo:i,data:r.data})}function zge(e){let{data:t}=e,n=(0,kz.useMemo)(()=>Jge(t.executions),[t.executions]),o=`${n.completed} completed \xB7 ${n.failed} failed \xB7 ${n.blocked} blocked`,a=t.truncated?`${t.task.totalRuns} total \xB7 loaded runs: ${o}`:`${t.task.totalRuns} total \xB7 ${o}`;return(0,Ce.jsx)("div",{className:`${Ft} px-4 py-8 md:px-8`,children:(0,Ce.jsxs)("section",{className:"mx-auto grid w-full max-w-4xl gap-5",children:[(0,Ce.jsxs)("div",{children:[(0,Ce.jsxs)(Fe,{className:"mb-3 inline-flex items-center gap-2 font-mono text-xs text-dashboard-text-muted no-underline hover:text-dashboard-text",to:e.backTo,children:[(0,Ce.jsx)(wr,{"aria-hidden":"true",size:14}),"Back to task"]}),(0,Ce.jsx)(St,{description:`${t.task.kind} task \xB7 ${t.task.destination.label} \xB7 ${a}`,title:t.task.title})]}),t.executionDays.length>0?(0,Ce.jsx)(Ez,{days:t.executionDays}):null,(0,Ce.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-5 gap-y-1 border-b border-white/[0.07] pb-3",children:[(0,Ce.jsxs)("p",{className:"m-0 font-display text-lg text-dashboard-text",children:[t.executions.length," ",t.executions.length===1?"run":"runs"]}),(0,Ce.jsx)("p",{className:"m-0 text-xs text-dashboard-text-muted",children:"Newest first. Click a run to open its conversation."})]}),t.executions.length===0?(0,Ce.jsx)(O,{padding:"md",children:(0,Ce.jsx)("p",{className:"m-0 text-sm text-dashboard-text-muted",children:"This task has not produced any terminal executions yet."})}):(0,Ce.jsxs)(O,{children:[(0,Ce.jsxs)("div",{className:"sticky top-0 z-[1] hidden grid-cols-[minmax(13rem,1.7fr)_minmax(10rem,1fr)] items-center gap-3 border-b border-white/[0.06] bg-black/25 px-3 py-2.5 font-mono text-xs uppercase tracking-[0.1em] text-dashboard-text-muted md:grid",role:"row",children:[(0,Ce.jsx)("div",{children:"Conversation"}),(0,Ce.jsx)("div",{className:"justify-self-end",children:"Status"})]}),(0,Ce.jsx)("div",{className:"min-w-0",role:"table",children:t.executions.map(r=>(0,Ce.jsx)(Yge,{execution:r,fallbackTitle:t.task.title},r.executionId))})]}),t.truncated?(0,Ce.jsx)("p",{className:"m-0 text-center text-xs text-dashboard-text-muted",children:"Showing the 100 most recent executions."}):null]})})}function Yge(e){let{execution:t,fallbackTitle:n}=e,o=lo(),a=t.title?.trim()||(t.conversationId?n:"No conversation"),r=[Wge(t.executedAt),t.conversationId??"not linked"].join(" \xB7 "),i=()=>{t.conversationId&&o(xr(t.conversationId))};return(0,Ce.jsxs)("div",{"aria-disabled":!t.conversationId,className:S("group grid min-w-0 grid-cols-[minmax(13rem,1.7fr)_minmax(10rem,1fr)] items-center gap-3 overflow-hidden border-b border-b-white/[0.055] px-3 py-3 text-left text-inherit transition-colors max-md:grid-cols-1 max-md:px-4 max-md:py-4",t.conversationId?"cursor-pointer hover:bg-white/[0.035]":"cursor-default opacity-80"),onClick:i,onKeyDown:A=>{t.conversationId&&(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),i())},role:t.conversationId?"link":"row",tabIndex:t.conversationId?0:void 0,children:[(0,Ce.jsxs)("div",{className:"min-w-0",children:[(0,Ce.jsx)("div",{className:"min-w-0 truncate text-base font-bold leading-tight text-dashboard-text",children:a}),(0,Ce.jsx)("div",{className:"mt-1 break-words text-sm leading-relaxed text-dashboard-text-muted md:truncate",children:r})]}),(0,Ce.jsx)("div",{className:"grid min-w-0 justify-items-end gap-1 text-right max-md:justify-items-start max-md:text-left",children:(0,Ce.jsx)(Kge,{status:t.status})})]})}function Kge(e){return(0,Ce.jsx)("span",{className:S("inline-flex items-center rounded border px-2 py-1 font-mono text-xs uppercase tracking-[0.1em]",e.status==="completed"&&"border-emerald-400/25 bg-emerald-400/10 text-emerald-200",e.status==="failed"&&"border-rose-400/25 bg-rose-400/10 text-rose-200",e.status==="blocked"&&"border-amber-400/25 bg-amber-400/10 text-amber-100"),children:e.status})}function Jge(e){return e.reduce((t,n)=>(t[n.status]+=1,t),{blocked:0,completed:0,failed:0})}function Wge(e){return sa(e,{day:"numeric",hour:"numeric",minute:"2-digit",month:"short",timeZoneName:"short",year:"numeric"})}var Ly=w(Y(),1);var Bd=w(Y(),1);var me=w(k(),1),Zge=["a[href]","button:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function _z(e){let t=(0,Bd.useRef)(null),n=(0,Bd.useRef)(e.onClose),o=(0,Bd.useRef)(void 0),a=e.task?`${e.task.kind}:${e.task.id}`:void 0;if(n.current=e.onClose,(0,Bd.useEffect)(()=>{if(!a)return;o.current=document.activeElement instanceof HTMLElement?document.activeElement:void 0;let u=document.body.style.overflow;document.body.style.overflow="hidden";let l=requestAnimationFrame(()=>{t.current?.querySelector("[data-task-drawer-close]")?.focus()}),p=g=>{if(g.key==="Escape"){g.preventDefault(),n.current();return}if(g.key!=="Tab")return;let m=t.current,h=Array.from(m?.querySelectorAll(Zge)??[]).filter(B=>B.tabIndex>=0&&B.getClientRects().length>0),y=h.at(0),f=h.at(-1);if(!m||!y||!f){g.preventDefault();return}let b=document.activeElement;g.shiftKey&&(b===y||!m.contains(b))?(g.preventDefault(),f.focus()):!g.shiftKey&&(b===f||!m.contains(b))&&(g.preventDefault(),y.focus())};return window.addEventListener("keydown",p),()=>{cancelAnimationFrame(l),window.removeEventListener("keydown",p),document.body.style.overflow=u;let g=o.current;o.current=void 0,g?.isConnected&&g.focus()}},[a]),!e.task)return null;let{task:r}=e,i=r.createdByEmail?(0,me.jsx)(Fe,{className:"font-semibold text-dashboard-text underline decoration-white/20 underline-offset-2 transition-colors hover:decoration-white/60",to:Dr(r.createdByEmail),children:r.ownedByViewer?"you":r.createdBy}):r.ownedByViewer?"you":r.createdBy,A=r.kind==="scheduled"?[{label:"Schedule",value:r.schedule},{label:"Next run",value:r.nextRunAt?t8(r.nextRunAt):"None"}]:[{label:"Resource",value:r.resource},{label:"Events",value:r.events.join(", ")}],s=r.kind==="scheduled"?r.status:r.triggerAvailable?"ready":"unavailable",c="task-details-drawer-title";return(0,me.jsxs)("div",{"aria-labelledby":c,"aria-modal":"true",className:"fixed inset-0 z-50",ref:t,role:"dialog",children:[(0,me.jsx)("button",{"aria-label":"Dismiss task details",className:"absolute inset-0 cursor-default bg-black/55",onClick:e.onClose,tabIndex:-1,type:"button"}),(0,me.jsxs)("aside",{className:"absolute top-0 right-0 grid h-full w-full grid-rows-[auto_minmax(0,1fr)] bg-[#070707] shadow-[-20px_0_60px_rgba(0,0,0,0.45)] md:w-[min(560px,94vw)] md:border-l md:border-white/12",children:[(0,me.jsxs)("header",{className:"relative border-b border-white/10 bg-dashboard-surface-raised px-4 py-3 md:px-5",children:[(0,me.jsxs)("div",{className:"min-w-0 pr-12",children:[(0,me.jsx)("h2",{className:"m-0 font-display text-lg font-medium tracking-normal text-dashboard-text",id:c,children:r.title}),(0,me.jsxs)("div",{className:"mt-1 break-words font-mono text-xs leading-snug text-dashboard-text-muted capitalize",children:[r.kind," task \xB7 ",s," \xB7 ",Iz(r.createdAt)]})]}),(0,me.jsx)("div",{className:"absolute top-3 right-4 md:right-5",children:(0,me.jsx)(pt,{"aria-label":"Close task details","data-task-drawer-close":!0,onClick:e.onClose,size:"icon",title:"Close",children:(0,me.jsx)(To,{"aria-hidden":"true",size:15,strokeWidth:2.25})})})]}),(0,me.jsx)("div",{className:"min-h-0 overflow-auto px-4 py-4 md:px-5",children:(0,me.jsxs)("section",{className:"grid gap-5",children:[(0,me.jsxs)("div",{children:[(0,me.jsx)("div",{className:"mb-2 font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:"Instruction"}),(0,me.jsx)(yo,{text:r.instruction})]}),(0,me.jsxs)("dl",{className:"grid gap-px overflow-hidden rounded border border-white/[0.06] bg-white/[0.055]",children:[A.map(u=>(0,me.jsx)(Sy,{label:u.label,children:u.value},u.label)),(0,me.jsx)(Sy,{label:"Destination",children:(0,me.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,me.jsx)(Fs,{"aria-hidden":"true",className:"text-cyan-300/70",size:13}),r.destination.label," \xB7 ",r.destination.visibility]})}),(0,me.jsxs)(Sy,{label:"Created",children:[i," \xB7 ",Iz(r.createdAt)]}),(0,me.jsx)(Sy,{label:"Executions",children:(0,me.jsx)(Vge,{task:r})})]}),r.totalRuns>0?(0,me.jsx)("div",{className:"pt-1",children:(0,me.jsx)(Fe,{className:"inline-flex items-center justify-center rounded border border-white/12 bg-white/[0.03] px-3 py-2 font-mono text-xs font-medium text-dashboard-text no-underline transition-colors hover:border-white/25 hover:bg-white/[0.06]",to:`/tasks/${r.kind}/${encodeURIComponent(r.id)}/executions`,children:"View all executions"})}):null]})})]})]})}function Sy(e){return(0,me.jsxs)("div",{className:"min-w-0 bg-[#09090b] px-3 py-3",children:[(0,me.jsx)("dt",{className:"font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:e.label}),(0,me.jsx)("dd",{className:"mt-1.5 ml-0 break-words text-sm leading-relaxed text-dashboard-text",children:e.children})]})}function Vge(e){let{task:t}=e,n=`/tasks/${t.kind}/${encodeURIComponent(t.id)}/executions`;return(0,me.jsxs)("div",{className:"text-sm text-dashboard-text-muted",children:[t.totalRuns>0?(0,me.jsxs)(Fe,{className:"text-dashboard-text underline decoration-white/20 underline-offset-2 hover:decoration-white/60",to:n,children:[t.runsLast7Days," runs / 7d"]}):(0,me.jsxs)("span",{className:"text-dashboard-text",children:[t.runsLast7Days," runs / 7d"]}),(0,me.jsx)("span",{className:"mx-2 opacity-45",children:"\xB7"}),(0,me.jsxs)("span",{children:[t.totalRuns>0?(0,me.jsxs)(Fe,{className:"text-dashboard-text underline decoration-white/20 underline-offset-2 hover:decoration-white/60",to:n,children:[t.totalRuns," total"]}):(0,me.jsxs)(me.Fragment,{children:[t.totalRuns," total"]}),t.lastRunAt?" \xB7 Last execution ":" \xB7 Never run",t.lastRunAt&&t.lastConversationId?(0,me.jsx)(Fe,{className:"text-dashboard-text underline decoration-white/20 underline-offset-2 hover:decoration-white/60",to:xr(t.lastConversationId),children:t8(t.lastRunAt)}):t.lastRunAt?t8(t.lastRunAt):null]})]})}function Iz(e){return sa(e,{dateStyle:"medium",timeStyle:"short"})}function t8(e){return sa(e,{day:"numeric",hour:"numeric",minute:"2-digit",month:"short",timeZoneName:"short",year:"numeric"})}var xz=w(Y(),1);var xt=w(k(),1),vz=[{color:"#6ee7b7",key:"scheduled",label:"Scheduled"},{color:"#c4b5fd",key:"event",label:"Event"}];function Dz(e){let[t,n]=(0,xz.useState)(30),o=e.days.slice(-t),a=720,r=200,i=56,A=12,s=14,u=r-s-34,l=a-i-A,p=o.length>0?l/o.length:l,g=Math.max(2,Math.min(13,p*.68)),m=o.map(f=>f.scheduled+f.event),h=Math.max(1,...m),y=m.some(f=>f>0);return(0,xt.jsxs)(O,{className:"min-h-[17rem] p-4 sm:p-5",children:[(0,xt.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,xt.jsxs)("div",{children:[(0,xt.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:"Activity over time"}),(0,xt.jsx)("p",{className:"mt-1 mb-0 font-mono text-xs leading-relaxed text-dashboard-text-muted",children:"Completed scheduled and event task runs each day."})]}),(0,xt.jsx)("div",{"aria-label":"Task execution range",className:"inline-flex rounded border border-white/[0.08] bg-black/20 p-0.5",children:[7,30,90].map(f=>(0,xt.jsxs)("button",{"aria-pressed":t===f,className:S("cursor-pointer rounded-sm border-0 px-2.5 py-1.5 font-mono text-xs uppercase tracking-[0.1em] transition-colors",t===f?"bg-cyan-300/10 text-cyan-100":"bg-transparent text-dashboard-text-muted hover:text-dashboard-text"),onClick:()=>n(f),type:"button",children:[f,"d"]},f))})]}),(0,xt.jsx)("div",{"aria-label":"Task execution legend",className:"mt-4 flex flex-wrap gap-4",children:vz.map(f=>(0,xt.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-dashboard-text-muted",children:[(0,xt.jsx)("i",{className:"size-2 rounded-sm",style:{backgroundColor:f.color}}),f.label]},f.key))}),(0,xt.jsxs)("div",{className:"relative mt-3 overflow-hidden",children:[(0,xt.jsxs)("svg",{"aria-label":`Task executions during the last ${t} days`,className:"block h-auto min-h-40 w-full",role:"img",viewBox:`0 0 ${a} ${r}`,children:[[h,h/2,0].map((f,b)=>{let B=s+b*(u/2);return(0,xt.jsxs)("g",{children:[(0,xt.jsx)("line",{stroke:"rgba(255,255,255,0.07)",strokeDasharray:"3 5",x1:i,x2:a-A,y1:B,y2:B}),(0,xt.jsx)("text",{fill:"rgba(255,255,255,0.34)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:"end",x:i-7,y:B+3,children:Math.round(f)})]},b)}),o.map((f,b)=>{let B=0,C=i+b*p+(p-g)/2,E=m[b]??0;return(0,xt.jsx)(gt,{content:(0,xt.jsx)(Jn,{rows:[["scheduled",f.scheduled],["event",f.event],["total",E]]}),label:n8(f.date),children:(0,xt.jsxs)("g",{"aria-label":`${n8(f.date)}: ${f.scheduled} scheduled, ${f.event} event, ${E} total executions`,tabIndex:0,children:[vz.map(x=>{let R=f[x.key]/h*u;return B+=R,(0,xt.jsx)("rect",{fill:x.color,height:R,opacity:.82,rx:"1",width:g,x:C,y:s+u-B},x.key)}),(0,xt.jsx)("rect",{fill:"transparent",height:u,width:Math.max(g,8),x:C-(Math.max(g,8)-g)/2,y:s})]})},f.date)}),[0,Math.floor((o.length-1)/2),o.length-1].map(f=>{let b=o[f];return b?(0,xt.jsx)("text",{fill:"rgba(255,255,255,0.34)",fontFamily:"ui-monospace, monospace",fontSize:"12",textAnchor:f===0?"start":f===o.length-1?"end":"middle",x:f===0?i:f===o.length-1?a-A:i+f*p+p/2,y:r-9,children:n8(b.date)},b.date):null})]}),y?null:(0,xt.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center pt-12 font-mono text-xs text-dashboard-text-muted",children:"No task executions in this period."})]})]})}function n8(e){return new Intl.DateTimeFormat("en-US",{day:"numeric",month:"short",timeZone:"UTC"}).format(new Date(`${e}T00:00:00.000Z`))}var W=w(k(),1),Xge=["all","scheduled","event"],eme=["mine","public"];function tme(e){return sa(e,{dateStyle:"medium",timeStyle:"short"})}function nme(e){return sa(e,{day:"numeric",hour:"numeric",minute:"2-digit",month:"short",timeZoneName:"short",year:"numeric"})}function ame(e,t){return[e.createdBy,e.destination.channelId,e.destination.label,e.destination.teamId,e.instruction,e.kind,e.title,e.kind==="scheduled"?e.schedule:e.resource,...e.kind==="event"?[e.source]:[],...e.kind==="event"?e.events:[]].join(" ").toLowerCase().includes(t)}function Fz(e){let t=CM(e.enabled),n=Un(),o=lo(),a=lt(),{taskId:r}=qn(),[i,A]=Zs("type","all",Xge),[s,c]=Zs("scope","mine",eme),[u,l,p]=FA(),g=p.toLowerCase(),m=Q=>Fr(Q,a.search),h=t.data?.tasks??[],y=h.filter(Q=>Q.ownedByViewer).length,f=h.filter(Q=>Q.destination.visibility==="public").length,b=(0,Ly.useMemo)(()=>h.filter(Q=>s==="mine"?Q.ownedByViewer:Q.destination.visibility==="public"),[s,h]),B=(0,Ly.useMemo)(()=>b.filter(Q=>(i==="all"||Q.kind===i)&&(!g||ame(Q,g))),[i,b,g]),C=B.length,E=(0,Ly.useMemo)(()=>h.find(Q=>Q.id===r),[r,h]),x=sr({mutationFn:async Q=>{await Ju(`/api/tasks/${Q.kind}/${encodeURIComponent(Q.id)}`)},onSuccess:async()=>{await n.invalidateQueries({queryKey:["dashboard","tasks"]})}});return!t.data&&!t.error?(0,W.jsx)(Qe,{label:"Loading tasks"}):(0,W.jsxs)("div",{className:`${Ft} px-4 py-8 md:px-8`,children:[(0,W.jsxs)("section",{className:"mx-auto grid w-full max-w-6xl gap-5",children:[(0,W.jsx)(St,{description:"Scheduled and event-driven work created by users.",title:"Tasks"}),t.data?.executionDays?.length?(0,W.jsx)(Dz,{days:t.data.executionDays}):null,(0,W.jsxs)(O,{className:"grid gap-4 p-4 lg:grid-cols-[auto_auto_minmax(16rem,1fr)] lg:items-end",children:[(0,W.jsxs)(a8,{label:"Scope",children:[(0,W.jsxs)(Ii,{className:"inline-flex items-center gap-1.5",onClick:()=>c("mine"),pressed:s==="mine",variant:"pill",children:[(0,W.jsx)(_a,{"aria-hidden":"true",size:13}),"Mine ",(0,W.jsx)("span",{className:"opacity-65",children:y})]}),(0,W.jsxs)(Ii,{className:"inline-flex items-center gap-1.5",onClick:()=>c("public"),pressed:s==="public",variant:"pill",children:[(0,W.jsx)(go,{"aria-hidden":"true",size:13}),"Public ",(0,W.jsx)("span",{className:"opacity-65",children:f})]})]}),(0,W.jsx)(a8,{label:"Type",children:["all","scheduled","event"].map(Q=>(0,W.jsx)(Ii,{onClick:()=>A(Q),pressed:i===Q,variant:"pill",children:Q},Q))}),(0,W.jsx)(a8,{label:"Search",children:(0,W.jsx)(Hr,{className:"w-full lg:max-w-sm",label:"Search tasks",onChange:l,placeholder:"Title, instruction, location, or creator",value:u})})]}),(0,W.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-5 gap-y-1 border-b border-white/[0.07] pb-3",children:[(0,W.jsxs)("p",{className:"m-0 font-display text-lg text-dashboard-text",children:[C," ",C===1?"task":"tasks"]}),(0,W.jsx)("p",{className:"m-0 text-xs text-dashboard-text-muted",children:s==="mine"?"Tasks you created, including private destinations.":"All tasks assigned to public destinations in your linked workspaces."})]}),t.error?(0,W.jsx)(O,{padding:"md",children:(0,W.jsx)("p",{className:"m-0 text-sm text-rose-300",children:"Tasks could not be loaded. Try again."})}):C===0?(0,W.jsx)(O,{padding:"md",children:(0,W.jsx)("p",{className:"m-0 text-sm text-dashboard-text-muted",children:ome({filter:i,mineCount:y,publicCount:f,scope:s,search:g})})}):(0,W.jsxs)(O,{children:[(0,W.jsx)(rme,{}),(0,W.jsx)("div",{className:"divide-y divide-white/[0.07]",role:"list",children:B.map(Q=>{let R=`${Q.kind}:${Q.id}`;return(0,W.jsx)(ime,{deleting:x.isPending&&x.variables?.id===Q.id,onDelete:()=>{window.confirm(`Delete this ${Q.kind} task?`)&&x.mutate(Q)},onSelect:()=>o(m(r===Q.id?"/tasks":`/tasks/${encodeURIComponent(Q.id)}`)),selected:r===Q.id,task:Q},R)})})]}),t.data?.truncated?(0,W.jsx)("p",{className:"m-0 text-center text-xs text-dashboard-text-muted",children:"Showing up to 100 recent tasks in each scope."}):null,x.error?(0,W.jsx)("p",{className:"m-0 text-center text-sm text-rose-300",children:"The task could not be deleted. Try again."}):null]}),(0,W.jsx)(_z,{onClose:()=>o(m("/tasks")),task:E})]})}function ome(e){return e.search||e.filter!=="all"?"No tasks matched these filters.":e.scope==="mine"&&e.mineCount===0?"You have no active or completed tasks.":e.scope==="public"&&e.publicCount===0?"No tasks are assigned to public destinations in your linked workspaces.":"No tasks are available."}function a8(e){return(0,W.jsxs)("div",{children:[(0,W.jsx)("div",{className:"mb-2 font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted",children:e.label}),(0,W.jsx)("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":e.label,children:e.children})]})}function rme(){return(0,W.jsxs)("div",{"aria-hidden":"true",className:"hidden grid-cols-[repeat(3,minmax(0,1fr))_auto_auto] items-center gap-3 border-b border-white/[0.07] px-4 py-2.5 text-left font-mono text-xs uppercase tracking-[0.12em] text-dashboard-text-muted lg:grid",children:[(0,W.jsx)("span",{children:"Task"}),(0,W.jsx)("span",{children:"Destination"}),(0,W.jsx)("span",{children:"Trigger"}),(0,W.jsx)("span",{"aria-hidden":"true",className:"size-8"}),(0,W.jsx)("span",{"aria-hidden":"true",className:"size-9"})]})}function ime(e){let{task:t}=e;return(0,W.jsx)("article",{role:"listitem",children:(0,W.jsxs)(xB,{className:"grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-3 px-4 py-3 md:grid-cols-[repeat(2,minmax(0,1fr))_auto_auto] lg:grid-cols-[repeat(3,minmax(0,1fr))_auto_auto]",onSelect:e.onSelect,selected:e.selected,children:[(0,W.jsxs)("button",{"aria-expanded":e.selected,className:"flex min-w-0 cursor-pointer items-center gap-3 border-0 bg-transparent p-0 text-left",onClick:e.onSelect,type:"button",children:[(0,W.jsx)(Ame,{task:t}),(0,W.jsxs)("span",{className:"min-w-0",children:[(0,W.jsx)("span",{className:"block truncate font-display text-base font-medium text-dashboard-text",children:t.title}),(0,W.jsxs)("span",{className:"mt-1 block truncate font-mono text-xs uppercase tracking-[0.08em] text-dashboard-text-muted",children:[(0,W.jsx)("span",{className:"md:hidden",children:t.destination.label}),(0,W.jsx)("span",{className:"hidden md:inline",children:tme(t.createdAt)})]})]})]}),(0,W.jsxs)("div",{className:"hidden min-w-0 md:block",children:[(0,W.jsx)("div",{className:"truncate text-sm font-medium text-dashboard-text",children:t.destination.label}),(0,W.jsx)("div",{className:"mt-1 font-mono text-xs uppercase tracking-[0.08em] text-dashboard-text-muted",children:t.destination.visibility})]}),(0,W.jsxs)("div",{className:"hidden min-w-0 lg:block",children:[(0,W.jsx)("div",{className:"truncate text-sm text-dashboard-text",children:t.kind==="scheduled"?t.schedule:t.resource}),(0,W.jsx)("div",{className:"mt-1 truncate font-mono text-xs text-dashboard-text-muted",children:t.kind==="scheduled"?t.nextRunAt?`Next ${nme(t.nextRunAt)}`:"No next run":t.events.join(", ")})]}),(0,W.jsx)("button",{"aria-expanded":e.selected,"aria-label":`View task details: ${t.title}`,className:"grid size-8 cursor-pointer place-items-center rounded border border-transparent bg-transparent text-dashboard-text-muted transition-colors hover:border-white/10 hover:bg-white/[0.04] hover:text-dashboard-text",onClick:e.onSelect,type:"button",children:(0,W.jsx)(hi,{"aria-hidden":"true",className:S("transition-transform",e.selected&&"translate-x-0.5 text-cyan-200"),size:16})}),t.ownedByViewer?(0,W.jsx)(pt,{"aria-label":`Delete: ${t.title}`,disabled:e.deleting,onClick:e.onDelete,size:"icon",title:"Delete task",children:(0,W.jsx)(Uo,{"aria-hidden":"true",size:15})}):(0,W.jsx)("span",{"aria-hidden":"true",className:"size-8"})]})})}function Ame(e){let{task:t}=e;if(t.kind==="scheduled")return(0,W.jsx)("div",{"aria-label":"Scheduled task",className:"grid size-9 shrink-0 place-items-center rounded border border-white/[0.08] bg-white/[0.03] text-cyan-300/75",role:"img",title:"Scheduled task",children:(0,W.jsx)(Qp,{"aria-hidden":"true",size:16})});let n=t.source.trim(),o=n.toLowerCase(),a=o==="github",r=a?"GitHub":o==="pagerduty"?"PagerDuty":n,i=o==="pagerduty"?"PD":n.slice(0,2).toUpperCase();return(0,W.jsx)("div",{"aria-label":`${r} event task`,className:"grid size-9 shrink-0 place-items-center rounded border border-white/[0.08] bg-white/[0.03] text-cyan-300/75",role:"img",title:`${r} event task`,children:a?(0,W.jsx)(sme,{}):(0,W.jsx)("span",{className:"font-mono text-xs font-semibold uppercase tracking-[0.08em]",children:i})})}function sme(){return(0,W.jsx)("svg",{"aria-hidden":"true",className:"size-[18px]",fill:"currentColor",viewBox:"0 0 24 24",children:(0,W.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.418-1.305.762-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.793 1.23 1.1-.306 2.28-.459 3.45-.465 1.17.006 2.35.159 3.45.465 2.79-1.552 3.795-1.23 3.795-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.435.375.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}var T=w(k(),1),cme={backgroundColor:"#050507",backgroundImage:"radial-gradient(ellipse at 50% 0%, transparent 0%, #050507 70%), linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px)",backgroundSize:"100% 100%, 40px 40px, 40px 40px"},ume={backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.7'/%3E%3C/svg%3E")`};function Sz(){let e=lt(),t=hM(),n=BM(),o=t.data,a=n.data??[];o&&z5(o.config.timeZone);let r=!o&&!t.error,i=!!(o?.config.authRequired&&o.me.user.email),A=QM(i),s=i?a.filter(g=>g.navigation==="primary"):[],c=e.pathname==="/"||e.pathname==="/conversations"||e.pathname.startsWith("/conversations/"),u=e.pathname.startsWith("/conversations/")&&e.pathname!=="/conversations/";async function l(){await fetch(`${o?.config.authPath??"/api/auth"}/sign-out`,{credentials:"same-origin",method:"POST"}),window.location.assign(o?.config.basePath??"/")}let p=({isActive:g})=>S("shrink-0 whitespace-nowrap rounded-md px-2.5 py-2 font-mono text-xs font-medium uppercase tracking-[0.08em] no-underline transition-colors sm:tracking-[0.12em]",g?"bg-cyan-300/[0.1] text-cyan-50":S("hover:bg-white/[0.035]",EA));return(0,T.jsxs)("main",{className:S("relative grid font-mono text-dashboard-text",c?S("h-dvh min-h-0 overflow-hidden",u?"grid-rows-[minmax(0,1fr)] md:grid-rows-[auto_minmax(0,1fr)]":"grid-rows-[auto_minmax(0,1fr)]"):"min-h-screen grid-rows-[auto_1fr]"),style:cme,children:[(0,T.jsx)("header",{className:S("sticky top-0 z-10 border-b border-white/[0.05] bg-[#050507]/95",u&&"max-md:hidden"),children:(0,T.jsxs)("div",{className:S(Ft,"grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-2 px-4 py-3 md:gap-x-5 md:gap-y-3 md:py-4",i?"md:grid-cols-[auto_minmax(0,1fr)_auto]":"md:grid-cols-[auto_minmax(0,1fr)]",c?"md:px-4":"md:px-8"),children:[(0,T.jsx)(Fe,{"aria-label":`${it()} home`,className:"flex min-w-0 max-w-full items-center justify-self-start text-inherit no-underline",to:"/",children:(0,T.jsx)(jh,{})}),(0,T.jsxs)("nav",{className:"col-span-2 row-start-2 flex min-w-0 items-center gap-1 overflow-x-auto [scrollbar-width:none] md:col-span-1 md:col-start-2 md:row-start-1 md:justify-self-start md:overflow-visible [&::-webkit-scrollbar]:hidden",children:[(0,T.jsx)(Fe,{"aria-current":c?"page":void 0,className:p({isActive:c}),to:"/",children:"Conversations"}),i?(0,T.jsx)(wa,{className:p,to:"/tasks",children:"Tasks"}):null,s.map(g=>(0,T.jsx)(wa,{className:p,to:VB(g.pluginName,g.id),children:g.label},`${g.pluginName}:${g.id}`)),(0,T.jsx)(wa,{className:p,to:"/system",children:"System"})]}),i?(0,T.jsx)("div",{className:"col-start-2 row-start-1 justify-self-end md:col-start-3",children:(0,T.jsx)(IO,{identity:o.me,onSignOut:l,spend:A.data,userPages:a})}):null]})}),(0,T.jsxs)(VE,{children:[(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading task executions"}):i?(0,T.jsx)(Qz,{enabled:i}):(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/tasks/:kind/:taskId/executions"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading tasks"}):i?(0,T.jsx)(Fz,{enabled:i}):(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/tasks/:taskId?"}),(0,T.jsx)(Ht,{element:(0,T.jsx)(o8,{section:"locations"}),path:"/locations"}),(0,T.jsx)(Ht,{element:(0,T.jsx)(o8,{section:"locations"}),path:"/locations/:locationId"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading locations"}):(0,T.jsx)(Jq,{}),path:"/system/locations"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading location"}):(0,T.jsx)(Oq,{}),path:"/system/locations/:locationId"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading your conversations"}):o?(0,T.jsx)(KF,{data:o}):(0,T.jsx)(Qe,{label:t.error?.message??"Dashboard unavailable"}),path:"/"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading your conversations"}):o?(0,T.jsx)(KF,{data:o}):(0,T.jsx)(Qe,{label:t.error?.message??"Dashboard unavailable"}),path:"/conversations/:conversationId"}),(0,T.jsx)(Ht,{element:(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/conversations"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading components"}):o?o.config.componentGallery?(0,T.jsx)(jq,{}):(0,T.jsx)(Dt,{replace:!0,to:"/"}):(0,T.jsx)(Qe,{label:t.error?.message??"Dashboard unavailable"}),path:"/dev/*"}),(0,T.jsx)(Ht,{element:(0,T.jsx)(o8,{section:"people"}),path:"/people"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading profile"}):(0,T.jsx)(rz,{}),path:"/people/:email"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading people"}):(0,T.jsx)(ez,{}),path:"/system/people"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading system"}):o?(0,T.jsx)(dme,{coreData:o}):(0,T.jsx)(Qe,{label:t.error?.message??"Dashboard unavailable"}),path:"/system/*"}),(0,T.jsx)(Ht,{element:r?(0,T.jsx)(Qe,{label:"Loading API tokens"}):i?(0,T.jsx)(tz,{}):(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/settings/api-tokens"}),(0,T.jsx)(Ht,{element:r||n.isPending?(0,T.jsx)(Qe,{label:"Loading memory"}):i&&n.data?(0,T.jsx)(DF,{pages:n.data}):(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/memories/:memoryId?"}),(0,T.jsx)(Ht,{element:r||n.isPending?(0,T.jsx)(Qe,{label:"Loading memories"}):i&&n.data?(0,T.jsx)(DF,{pages:n.data}):(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/memories/library"}),(0,T.jsx)(Ht,{element:r||n.isPending?(0,T.jsx)(Qe,{label:"Loading page"}):i&&n.data?(0,T.jsx)(QO,{pages:n.data}):(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"/plugins/:pluginName/:pageId/*"}),(0,T.jsx)(Ht,{element:(0,T.jsx)(Dt,{replace:!0,to:"/"}),path:"*"})]}),(0,T.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none fixed inset-0 z-50 block opacity-[0.018]",style:ume})]})}function o8(e){let t=lt(),n=`/${e.section}`,o=t.pathname.slice(n.length);return(0,T.jsx)(Dt,{replace:!0,to:`/system/${e.section}${o}${t.search}${t.hash}`})}function dme(e){let t=vM(e.coreData);return!t.data&&!t.error?(0,T.jsx)(Qe,{label:"Loading system"}):t.data?(0,T.jsx)(Bz,{data:t.data}):(0,T.jsx)(Qe,{label:t.error?.message??"System unavailable"})}var Wa=w(k(),1),r8=class extends Lz.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){let o=t.stack??n.componentStack;window.__JUNIOR_DASHBOARD_SHOW_ERROR__?.(o?new Error(o):t)}render(){return this.state.error?(0,Wa.jsx)(lme,{error:this.state.error}):this.props.children}};function lme(e){return(0,Wa.jsx)("main",{className:"grid min-h-screen place-items-center bg-black p-8 text-white",children:(0,Wa.jsxs)("section",{className:"w-full max-w-5xl border border-rose-400/50 bg-[#0b0b0b] p-5 font-sans",children:[(0,Wa.jsx)("div",{className:"font-mono text-xs uppercase leading-none text-[#888]",children:"Dashboard Error"}),(0,Wa.jsxs)("h1",{className:"mt-2 text-3xl font-bold leading-tight tracking-normal",children:[it()," failed to render"]}),(0,Wa.jsx)("p",{className:"my-4 max-w-3xl text-[#b8b8b8]",children:"The dashboard hit a client-side exception. The stack trace is shown here so the page does not fail blank."}),(0,Wa.jsx)("pre",{className:"max-h-[60vh] overflow-auto whitespace-pre-wrap break-words border border-white/10 bg-black p-4 font-mono text-sm leading-relaxed text-white",children:e.error.stack??e.error.message})]})})}var Nz=document.getElementById("dashboard-root");if(!Nz)throw new Error("Junior dashboard root element was not found");var pme=new zy({defaultOptions:{queries:{staleTime:3e4}}});(0,Rz.createRoot)(Nz).render((0,Wa.jsx)(r8,{children:(0,Wa.jsx)(tC,{client:pme,children:(0,Wa.jsx)(ak,{basename:window.__JUNIOR_DASHBOARD_BASE_PATH__??"/",children:(0,Wa.jsx)(Sz,{})})})}));
|
|
136
136
|
/*! Bundled license information:
|
|
137
137
|
|
|
138
138
|
react/cjs/react.production.js:
|