@ls-stack/agent-eval 0.26.2 → 0.26.3
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-BxR4SbjA.mjs → app-C-yzV9J8.mjs} +3 -3
- package/dist/apps/web/dist/assets/{index-CFF1eYUm.js → index-DR2haqvV.js} +1 -1
- package/dist/apps/web/dist/index.html +1 -1
- package/dist/bin.mjs +1 -1
- package/dist/{cli-C4yumCXE.mjs → cli-T6FYE2Bk.mjs} +3 -3
- package/dist/index.d.mts +3 -4
- package/dist/index.mjs +3 -3
- package/dist/runChild.mjs +1 -1
- package/dist/{runOrchestration-B31SV_Bq.mjs → runOrchestration-CW_Fzr2c.mjs} +10 -6
- package/dist/{runner-LHN7L-xk.mjs → runner-BsRloAm3.mjs} +2 -2
- package/dist/{runner-D5QMY3B_.mjs → runner-DesCrD7Z.mjs} +1 -1
- package/dist/src-CbVnqjW3.mjs +3 -0
- package/package.json +1 -1
- package/skills/agent-eval/SKILL.md +20 -13
- package/dist/src-CLMrRle2.mjs +0 -3
|
@@ -44,7 +44,7 @@ Error generating stack: `+m.message+`
|
|
|
44
44
|
|
|
45
45
|
`)}g.write("payload.value = newResult;"),g.write("return payload;");const C=g.compile();return(A,O)=>C(v,A,O)};let a;const o=Of,u=!lP.jitless,f=u&&W8.value,h=t.catchall;let p;e._zod.parse=(v,g)=>{p??(p=r.value);const y=v.value;return o(y)?u&&f&&g?.async===!1&&g.jitless!==!0?(a||(a=i(t.shape)),v=a(v,g),h?EP([],y,v,g,p,e):v):n(v,g):(v.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),v)}});function TC(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const i=e.filter(a=>!uu(a));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(o=>Il(o,r,zl())))}),t)}const kP=pe("$ZodUnion",(e,t)=>{Xt.init(e,t),mt(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),mt(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),mt(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),mt(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${i.map(a=>Nw(a.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1;const u=[];for(const c of t.options){const f=c._zod.run({value:i.value,issues:[]},a);if(f instanceof Promise)u.push(f),o=!0;else{if(f.issues.length===0)return f;u.push(f)}}return o?Promise.all(u).then(c=>TC(c,i,e,a)):TC(u,i,e,a)}}),LF=pe("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,kP.init(e,t);const n=e._zod.parse;mt(e._zod,"propValues",()=>{const i={};for(const a of t.options){const o=a._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const[u,c]of Object.entries(o)){i[u]||(i[u]=new Set);for(const f of c)i[u].add(f)}}return i});const r=Ym(()=>{const i=t.options,a=new Map;for(const o of i){const u=o._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const c of u){if(a.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);a.set(c,o)}}return a});e._zod.parse=(i,a)=>{const o=i.value;if(!Of(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),i;const u=r.value.get(o?.[t.discriminator]);return u?u._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),$F=pe("$ZodIntersection",(e,t)=>{Xt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,a=t.left._zod.run({value:i,issues:[]},r),o=t.right._zod.run({value:i,issues:[]},r);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([c,f])=>NC(n,c,f)):NC(n,a,o)}});function Zb(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(Eu(e)&&Eu(t)){const n=Object.keys(t),r=Object.keys(e).filter(a=>n.indexOf(a)!==-1),i={...e,...t};for(const a of r){const o=Zb(e[a],t[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};i[a]=o.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=e[r],a=t[r],o=Zb(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function NC(e,t,n){const r=new Map;let i;for(const u of t.issues)if(u.code==="unrecognized_keys"){i??(i=u);for(const c of u.keys)r.has(c)||r.set(c,{}),r.get(c).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const c of u.keys)r.has(c)||r.set(c,{}),r.get(c).r=!0;else e.issues.push(u);const a=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length&&i&&e.issues.push({...i,keys:a}),uu(e))return e;const o=Zb(t.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const BF=pe("$ZodRecord",(e,t)=>{Xt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Eu(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const a=[],o=t.keyType._zod.values;if(o){n.value={};const u=new Set;for(const f of o)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){u.add(typeof f=="number"?f.toString():f);const h=t.valueType._zod.run({value:i[f],issues:[]},r);h instanceof Promise?a.push(h.then(p=>{p.issues.length&&n.issues.push(...cu(f,p.issues)),n.value[f]=p.value})):(h.issues.length&&n.issues.push(...cu(f,h.issues)),n.value[f]=h.value)}let c;for(const f in i)u.has(f)||(c=c??[],c.push(f));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c})}else{n.value={};for(const u of Reflect.ownKeys(i)){if(u==="__proto__")continue;let c=t.keyType._zod.run({value:u,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&vP.test(u)&&c.issues.length){const p=t.keyType._zod.run({value:Number(u),issues:[]},r);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(c=p)}if(c.issues.length){t.mode==="loose"?n.value[u]=i[u]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>Il(p,r,zl())),input:u,path:[u],inst:e});continue}const h=t.valueType._zod.run({value:i[u],issues:[]},r);h instanceof Promise?a.push(h.then(p=>{p.issues.length&&n.issues.push(...cu(u,p.issues)),n.value[c.value]=p.value})):(h.issues.length&&n.issues.push(...cu(u,h.issues)),n.value[c.value]=h.value)}}return a.length?Promise.all(a).then(()=>n):n}}),FF=pe("$ZodEnum",(e,t)=>{Xt.init(e,t);const n=oP(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>X8.has(typeof i)).map(i=>typeof i=="string"?ku(i):i.toString()).join("|")})$`),e._zod.parse=(i,a)=>{const o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:n,input:o,inst:e}),i}}),UF=pe("$ZodLiteral",(e,t)=>{if(Xt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?ku(r):r?ku(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,i)=>{const a=r.value;return n.has(a)||r.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),r}}),qF=pe("$ZodTransform",(e,t)=>{Xt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new aP(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(n.value=o,n));if(i instanceof Promise)throw new pu;return n.value=i,n}});function RC(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const _P=pe("$ZodOptional",(e,t)=>{Xt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",mt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),mt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Nw(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>RC(a,n.value)):RC(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),HF=pe("$ZodExactOptional",(e,t)=>{_P.init(e,t),mt(e._zod,"values",()=>t.innerType._zod.values),mt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),ZF=pe("$ZodNullable",(e,t)=>{Xt.init(e,t),mt(e._zod,"optin",()=>t.innerType._zod.optin),mt(e._zod,"optout",()=>t.innerType._zod.optout),mt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Nw(n.source)}|null)$`):void 0}),mt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),KF=pe("$ZodDefault",(e,t)=>{Xt.init(e,t),e._zod.optin="optional",mt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>PC(a,t)):PC(i,t)}});function PC(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const VF=pe("$ZodPrefault",(e,t)=>{Xt.init(e,t),e._zod.optin="optional",mt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),YF=pe("$ZodNonOptional",(e,t)=>{Xt.init(e,t),mt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>MC(a,e)):MC(i,e)}});function MC(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const GF=pe("$ZodCatch",(e,t)=>{Xt.init(e,t),mt(e._zod,"optin",()=>t.innerType._zod.optin),mt(e._zod,"optout",()=>t.innerType._zod.optout),mt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(o=>Il(o,r,zl()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>Il(a,r,zl()))},input:n.value}),n.issues=[]),n)}}),WF=pe("$ZodPipe",(e,t)=>{Xt.init(e,t),mt(e._zod,"values",()=>t.in._zod.values),mt(e._zod,"optin",()=>t.in._zod.optin),mt(e._zod,"optout",()=>t.out._zod.optout),mt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const a=t.out._zod.run(n,r);return a instanceof Promise?a.then(o=>Zh(o,t.in,r)):Zh(a,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(a=>Zh(a,t.out,r)):Zh(i,t.out,r)}});function Zh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const XF=pe("$ZodReadonly",(e,t)=>{Xt.init(e,t),mt(e._zod,"propValues",()=>t.innerType._zod.propValues),mt(e._zod,"values",()=>t.innerType._zod.values),mt(e._zod,"optin",()=>t.innerType?._zod?.optin),mt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(DC):DC(i)}});function DC(e){return e.value=Object.freeze(e.value),e}const QF=pe("$ZodLazy",(e,t)=>{Xt.init(e,t),mt(e._zod,"innerType",()=>t.getter()),mt(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),mt(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),mt(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),mt(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),JF=pe("$ZodCustom",(e,t)=>{Mr.init(e,t),Xt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(a=>zC(a,n,r,e));zC(i,n,r,e)}});function zC(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(jf(i))}}var IC;class eU{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const 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){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function tU(){return new eU}(IC=globalThis).__zod_globalRegistry??(IC.__zod_globalRegistry=tU());const df=globalThis.__zod_globalRegistry;function nU(e,t){return new e({type:"string",...Me(t)})}function rU(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Me(t)})}function LC(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Me(t)})}function iU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Me(t)})}function aU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Me(t)})}function lU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Me(t)})}function oU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Me(t)})}function sU(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Me(t)})}function uU(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Me(t)})}function cU(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Me(t)})}function fU(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Me(t)})}function dU(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Me(t)})}function hU(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Me(t)})}function pU(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Me(t)})}function mU(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Me(t)})}function vU(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Me(t)})}function gU(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Me(t)})}function yU(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Me(t)})}function bU(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Me(t)})}function xU(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Me(t)})}function wU(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Me(t)})}function SU(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Me(t)})}function EU(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Me(t)})}function kU(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Me(t)})}function _U(e,t){return new e({type:"string",format:"date",check:"string_format",...Me(t)})}function AU(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Me(t)})}function CU(e,t){return new e({type:"string",format:"duration",check:"string_format",...Me(t)})}function OU(e,t){return new e({type:"number",checks:[],...Me(t)})}function jU(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Me(t)})}function TU(e,t){return new e({type:"boolean",...Me(t)})}function NU(e,t){return new e({type:"null",...Me(t)})}function RU(e){return new e({type:"unknown"})}function PU(e,t){return new e({type:"never",...Me(t)})}function $C(e,t){return new yP({check:"less_than",...Me(t),value:e,inclusive:!1})}function A0(e,t){return new yP({check:"less_than",...Me(t),value:e,inclusive:!0})}function BC(e,t){return new bP({check:"greater_than",...Me(t),value:e,inclusive:!1})}function C0(e,t){return new bP({check:"greater_than",...Me(t),value:e,inclusive:!0})}function FC(e,t){return new ZB({check:"multiple_of",...Me(t),value:e})}function AP(e,t){return new VB({check:"max_length",...Me(t),maximum:e})}function Dp(e,t){return new YB({check:"min_length",...Me(t),minimum:e})}function CP(e,t){return new GB({check:"length_equals",...Me(t),length:e})}function MU(e,t){return new WB({check:"string_format",format:"regex",...Me(t),pattern:e})}function DU(e){return new XB({check:"string_format",format:"lowercase",...Me(e)})}function zU(e){return new QB({check:"string_format",format:"uppercase",...Me(e)})}function IU(e,t){return new JB({check:"string_format",format:"includes",...Me(t),includes:e})}function LU(e,t){return new eF({check:"string_format",format:"starts_with",...Me(t),prefix:e})}function $U(e,t){return new tF({check:"string_format",format:"ends_with",...Me(t),suffix:e})}function $u(e){return new nF({check:"overwrite",tx:e})}function BU(e){return $u(t=>t.normalize(e))}function FU(){return $u(e=>e.trim())}function UU(){return $u(e=>e.toLowerCase())}function qU(){return $u(e=>e.toUpperCase())}function HU(){return $u(e=>G8(e))}function ZU(e,t,n){return new e({type:"array",element:t,...Me(n)})}function KU(e,t,n){const r=Me(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function VU(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Me(n)})}function YU(e){const t=GU(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(jf(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(jf(i))}},e(n.value,n)));return t}function GU(e,t){const n=new Mr({check:"custom",...Me(t)});return n._zod.check=e,n}function OP(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??df,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 mn(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);const u=e._zod.toJSONSchema?.();if(u)o.schema=u;else{const h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,h);else{const v=o.schema,g=t.processors[i.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);g(e,t,v,h)}const p=e._zod.parent;p&&(o.ref||(o.ref=p),mn(p,t,h),t.seen.get(p).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io==="input"&&dr(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function jP(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const o of e.seen.entries()){const u=e.metadataRegistry.get(o[0])?.id;if(u){const c=r.get(u);if(c&&c!==o[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(u,o[0])}}const i=o=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(o[0])?.id,v=e.external.uri??(y=>y);if(p)return{ref:v(p)};const g=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=g,{defId:g,ref:`${v("__shared")}#/${u}/${g}`}}if(o[1]===n)return{ref:"#"};const f=`#/${u}/`,h=o[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:f+h}},a=o=>{if(o[1].schema.$ref)return;const u=o[1],{ref:c,defId:f}=i(o);u.def={...u.schema},f&&(u.defId=f);const h=u.schema;for(const p in h)delete h[p];h.$ref=c};if(e.cycles==="throw")for(const o of e.seen.entries()){const u=o[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
|
|
46
46
|
|
|
47
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of e.seen.entries()){const u=o[1];if(t===o[0]){a(o);continue}if(e.external){const f=e.external.registry.get(o[0])?.id;if(t!==o[0]&&f){a(o);continue}}if(e.metadataRegistry.get(o[0])?.id){a(o);continue}if(u.cycle){a(o);continue}if(u.count>1&&e.reused==="ref"){a(o);continue}}}function TP(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=o=>{const u=e.seen.get(o);if(u.ref===null)return;const c=u.def??u.schema,f={...c},h=u.ref;if(u.ref=null,h){r(h);const v=e.seen.get(h),g=v.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,f),o._zod.parent===h)for(const x in c)x==="$ref"||x==="allOf"||x in f||delete c[x];if(g.$ref&&v.def)for(const x in c)x==="$ref"||x==="allOf"||x in v.def&&JSON.stringify(c[x])===JSON.stringify(v.def[x])&&delete c[x]}const p=o._zod.parent;if(p&&p!==h){r(p);const v=e.seen.get(p);if(v?.schema.$ref&&(c.$ref=v.schema.$ref,v.def))for(const g in c)g==="$ref"||g==="allOf"||g in v.def&&JSON.stringify(c[g])===JSON.stringify(v.def[g])&&delete c[g]}e.override({zodSchema:o,jsonSchema:c,path:u.path??[]})};for(const o of[...e.seen.entries()].reverse())r(o[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(o)}Object.assign(i,n.def??n.schema);const a=e.external?.defs??{};for(const o of e.seen.entries()){const u=o[1];u.def&&u.defId&&(a[u.defId]=u.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:zp(t,"input",e.processors),output:zp(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function dr(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return dr(r.element,n);if(r.type==="set")return dr(r.valueType,n);if(r.type==="lazy")return dr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return dr(r.innerType,n);if(r.type==="intersection")return dr(r.left,n)||dr(r.right,n);if(r.type==="record"||r.type==="map")return dr(r.keyType,n)||dr(r.valueType,n);if(r.type==="pipe")return dr(r.in,n)||dr(r.out,n);if(r.type==="object"){for(const i in r.shape)if(dr(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(dr(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(dr(i,n))return!0;return!!(r.rest&&dr(r.rest,n))}return!1}const WU=(e,t={})=>n=>{const r=OP({...n,processors:t});return mn(e,r),jP(r,e),TP(r,e)},zp=(e,t,n={})=>r=>{const{libraryOptions:i,target:a}=r??{},o=OP({...i??{},target:a,io:t,processors:n});return mn(e,o),jP(o,e),TP(o,e)},XU={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},QU=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:a,maximum:o,format:u,patterns:c,contentEncoding:f}=e._zod.bag;if(typeof a=="number"&&(i.minLength=a),typeof o=="number"&&(i.maxLength=o),u&&(i.format=XU[u]??u,i.format===""&&delete i.format,u==="time"&&delete i.format),f&&(i.contentEncoding=f),c&&c.size>0){const h=[...c];h.length===1?i.pattern=h[0].source:h.length>1&&(i.allOf=[...h.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},JU=(e,t,n,r)=>{const i=n,{minimum:a,maximum:o,format:u,multipleOf:c,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof u=="string"&&u.includes("int")?i.type="integer":i.type="number",typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=h,i.exclusiveMinimum=!0):i.exclusiveMinimum=h),typeof a=="number"&&(i.minimum=a,typeof h=="number"&&t.target!=="draft-04"&&(h>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=f,i.exclusiveMaximum=!0):i.exclusiveMaximum=f),typeof o=="number"&&(i.maximum=o,typeof f=="number"&&t.target!=="draft-04"&&(f<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},eq=(e,t,n,r)=>{n.type="boolean"},tq=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},nq=(e,t,n,r)=>{n.not={}},rq=(e,t,n,r)=>{},iq=(e,t,n,r)=>{const i=e._zod.def,a=oP(i.entries);a.every(o=>typeof o=="number")&&(n.type="number"),a.every(o=>typeof o=="string")&&(n.type="string"),n.enum=a},aq=(e,t,n,r)=>{const i=e._zod.def,a=[];for(const o of i.values)if(o===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){const o=a[0];n.type=o===null?"null":typeof o,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[o]:n.const=o}else a.every(o=>typeof o=="number")&&(n.type="number"),a.every(o=>typeof o=="string")&&(n.type="string"),a.every(o=>typeof o=="boolean")&&(n.type="boolean"),a.every(o=>o===null)&&(n.type="null"),n.enum=a},lq=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},oq=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},sq=(e,t,n,r)=>{const i=n,a=e._zod.def,{minimum:o,maximum:u}=e._zod.bag;typeof o=="number"&&(i.minItems=o),typeof u=="number"&&(i.maxItems=u),i.type="array",i.items=mn(a.element,t,{...r,path:[...r.path,"items"]})},uq=(e,t,n,r)=>{const i=n,a=e._zod.def;i.type="object",i.properties={};const o=a.shape;for(const f in o)i.properties[f]=mn(o[f],t,{...r,path:[...r.path,"properties",f]});const u=new Set(Object.keys(o)),c=new Set([...u].filter(f=>{const h=a.shape[f]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type==="never"?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=mn(a.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},cq=(e,t,n,r)=>{const i=e._zod.def,a=i.inclusive===!1,o=i.options.map((u,c)=>mn(u,t,{...r,path:[...r.path,a?"oneOf":"anyOf",c]}));a?n.oneOf=o:n.anyOf=o},fq=(e,t,n,r)=>{const i=e._zod.def,a=mn(i.left,t,{...r,path:[...r.path,"allOf",0]}),o=mn(i.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,c=[...u(a)?a.allOf:[a],...u(o)?o.allOf:[o]];n.allOf=c},dq=(e,t,n,r)=>{const i=n,a=e._zod.def;i.type="object";const o=a.keyType,c=o._zod.bag?.patterns;if(a.mode==="loose"&&c&&c.size>0){const h=mn(a.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(const p of c)i.patternProperties[p.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=mn(a.keyType,t,{...r,path:[...r.path,"propertyNames"]})),i.additionalProperties=mn(a.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=o._zod.values;if(f){const h=[...f].filter(p=>typeof p=="string"||typeof p=="number");h.length>0&&(i.required=h)}},hq=(e,t,n,r)=>{const i=e._zod.def,a=mn(i.innerType,t,r),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},pq=(e,t,n,r)=>{const i=e._zod.def;mn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType},mq=(e,t,n,r)=>{const i=e._zod.def;mn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},vq=(e,t,n,r)=>{const i=e._zod.def;mn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},gq=(e,t,n,r)=>{const i=e._zod.def;mn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},yq=(e,t,n,r)=>{const i=e._zod.def,a=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;mn(a,t,r);const o=t.seen.get(e);o.ref=a},bq=(e,t,n,r)=>{const i=e._zod.def;mn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},NP=(e,t,n,r)=>{const i=e._zod.def;mn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType},xq=(e,t,n,r)=>{const i=e._zod.innerType;mn(i,t,r);const a=t.seen.get(e);a.ref=i},wq=pe("ZodISODateTime",(e,t)=>{vF.init(e,t),an.init(e,t)});function Sq(e){return kU(wq,e)}const Eq=pe("ZodISODate",(e,t)=>{gF.init(e,t),an.init(e,t)});function kq(e){return _U(Eq,e)}const _q=pe("ZodISOTime",(e,t)=>{yF.init(e,t),an.init(e,t)});function Aq(e){return AU(_q,e)}const Cq=pe("ZodISODuration",(e,t)=>{bF.init(e,t),an.init(e,t)});function Oq(e){return CU(Cq,e)}const jq=(e,t)=>{fP.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>sB(e,n)},flatten:{value:n=>oB(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Hb,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Hb,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ei=pe("ZodError",jq,{Parent:Error}),Tq=Pw(Ei),Nq=Mw(Ei),Rq=Gm(Ei),Pq=Wm(Ei),Mq=fB(Ei),Dq=dB(Ei),zq=hB(Ei),Iq=pB(Ei),Lq=mB(Ei),$q=vB(Ei),Bq=gB(Ei),Fq=yB(Ei),Qt=pe("ZodType",(e,t)=>(Xt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:zp(e,"input"),output:zp(e,"output")}}),e.toJSONSchema=WU(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ql(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Hl(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>Tq(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Rq(e,n,r),e.parseAsync=async(n,r)=>Nq(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Pq(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Mq(e,n,r),e.decode=(n,r)=>Dq(e,n,r),e.encodeAsync=async(n,r)=>zq(e,n,r),e.decodeAsync=async(n,r)=>Iq(e,n,r),e.safeEncode=(n,r)=>Lq(e,n,r),e.safeDecode=(n,r)=>$q(e,n,r),e.safeEncodeAsync=async(n,r)=>Bq(e,n,r),e.safeDecodeAsync=async(n,r)=>Fq(e,n,r),e.refine=(n,r)=>e.check(DH(n,r)),e.superRefine=n=>e.check(zH(n)),e.overwrite=n=>e.check($u(n)),e.optional=()=>HC(e),e.exactOptional=()=>SH(e),e.nullable=()=>ZC(e),e.nullish=()=>HC(ZC(e)),e.nonoptional=n=>OH(e,n),e.array=()=>ze(e),e.or=n=>rs([e,n]),e.and=n=>gH(e,n),e.transform=n=>Vb(e,DP(n)),e.default=n=>_H(e,n),e.prefault=n=>CH(e,n),e.catch=n=>TH(e,n),e.pipe=n=>Vb(e,n),e.readonly=()=>PH(e),e.describe=n=>{const r=e.clone();return df.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return df.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return df.get(e);const r=e.clone();return df.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),RP=pe("_ZodString",(e,t)=>{Dw.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(r,i,a)=>QU(e,r,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(MU(...r)),e.includes=(...r)=>e.check(IU(...r)),e.startsWith=(...r)=>e.check(LU(...r)),e.endsWith=(...r)=>e.check($U(...r)),e.min=(...r)=>e.check(Dp(...r)),e.max=(...r)=>e.check(AP(...r)),e.length=(...r)=>e.check(CP(...r)),e.nonempty=(...r)=>e.check(Dp(1,...r)),e.lowercase=r=>e.check(DU(r)),e.uppercase=r=>e.check(zU(r)),e.trim=()=>e.check(FU()),e.normalize=(...r)=>e.check(BU(...r)),e.toLowerCase=()=>e.check(UU()),e.toUpperCase=()=>e.check(qU()),e.slugify=()=>e.check(HU())}),Uq=pe("ZodString",(e,t)=>{Dw.init(e,t),RP.init(e,t),e.email=n=>e.check(rU(qq,n)),e.url=n=>e.check(sU(Hq,n)),e.jwt=n=>e.check(EU(aH,n)),e.emoji=n=>e.check(uU(Zq,n)),e.guid=n=>e.check(LC(UC,n)),e.uuid=n=>e.check(iU(Kh,n)),e.uuidv4=n=>e.check(aU(Kh,n)),e.uuidv6=n=>e.check(lU(Kh,n)),e.uuidv7=n=>e.check(oU(Kh,n)),e.nanoid=n=>e.check(cU(Kq,n)),e.guid=n=>e.check(LC(UC,n)),e.cuid=n=>e.check(fU(Vq,n)),e.cuid2=n=>e.check(dU(Yq,n)),e.ulid=n=>e.check(hU(Gq,n)),e.base64=n=>e.check(xU(nH,n)),e.base64url=n=>e.check(wU(rH,n)),e.xid=n=>e.check(pU(Wq,n)),e.ksuid=n=>e.check(mU(Xq,n)),e.ipv4=n=>e.check(vU(Qq,n)),e.ipv6=n=>e.check(gU(Jq,n)),e.cidrv4=n=>e.check(yU(eH,n)),e.cidrv6=n=>e.check(bU(tH,n)),e.e164=n=>e.check(SU(iH,n)),e.datetime=n=>e.check(Sq(n)),e.date=n=>e.check(kq(n)),e.time=n=>e.check(Aq(n)),e.duration=n=>e.check(Oq(n))});function W(e){return nU(Uq,e)}const an=pe("ZodStringFormat",(e,t)=>{tn.init(e,t),RP.init(e,t)}),qq=pe("ZodEmail",(e,t)=>{oF.init(e,t),an.init(e,t)}),UC=pe("ZodGUID",(e,t)=>{aF.init(e,t),an.init(e,t)}),Kh=pe("ZodUUID",(e,t)=>{lF.init(e,t),an.init(e,t)}),Hq=pe("ZodURL",(e,t)=>{sF.init(e,t),an.init(e,t)}),Zq=pe("ZodEmoji",(e,t)=>{uF.init(e,t),an.init(e,t)}),Kq=pe("ZodNanoID",(e,t)=>{cF.init(e,t),an.init(e,t)}),Vq=pe("ZodCUID",(e,t)=>{fF.init(e,t),an.init(e,t)}),Yq=pe("ZodCUID2",(e,t)=>{dF.init(e,t),an.init(e,t)}),Gq=pe("ZodULID",(e,t)=>{hF.init(e,t),an.init(e,t)}),Wq=pe("ZodXID",(e,t)=>{pF.init(e,t),an.init(e,t)}),Xq=pe("ZodKSUID",(e,t)=>{mF.init(e,t),an.init(e,t)}),Qq=pe("ZodIPv4",(e,t)=>{xF.init(e,t),an.init(e,t)}),Jq=pe("ZodIPv6",(e,t)=>{wF.init(e,t),an.init(e,t)}),eH=pe("ZodCIDRv4",(e,t)=>{SF.init(e,t),an.init(e,t)}),tH=pe("ZodCIDRv6",(e,t)=>{EF.init(e,t),an.init(e,t)}),nH=pe("ZodBase64",(e,t)=>{kF.init(e,t),an.init(e,t)}),rH=pe("ZodBase64URL",(e,t)=>{AF.init(e,t),an.init(e,t)}),iH=pe("ZodE164",(e,t)=>{CF.init(e,t),an.init(e,t)}),aH=pe("ZodJWT",(e,t)=>{jF.init(e,t),an.init(e,t)}),PP=pe("ZodNumber",(e,t)=>{wP.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(r,i,a)=>JU(e,r,i),e.gt=(r,i)=>e.check(BC(r,i)),e.gte=(r,i)=>e.check(C0(r,i)),e.min=(r,i)=>e.check(C0(r,i)),e.lt=(r,i)=>e.check($C(r,i)),e.lte=(r,i)=>e.check(A0(r,i)),e.max=(r,i)=>e.check(A0(r,i)),e.int=r=>e.check(qC(r)),e.safe=r=>e.check(qC(r)),e.positive=r=>e.check(BC(0,r)),e.nonnegative=r=>e.check(C0(0,r)),e.negative=r=>e.check($C(0,r)),e.nonpositive=r=>e.check(A0(0,r)),e.multipleOf=(r,i)=>e.check(FC(r,i)),e.step=(r,i)=>e.check(FC(r,i)),e.finite=()=>e;const 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 Ke(e){return OU(PP,e)}const lH=pe("ZodNumberFormat",(e,t)=>{TF.init(e,t),PP.init(e,t)});function qC(e){return jU(lH,e)}const oH=pe("ZodBoolean",(e,t)=>{NF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>eq(e,n,r)});function Yr(e){return TU(oH,e)}const sH=pe("ZodNull",(e,t)=>{RF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>tq(e,n,r)});function uH(e){return NU(sH,e)}const cH=pe("ZodUnknown",(e,t)=>{PF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>rq()});function tr(){return RU(cH)}const fH=pe("ZodNever",(e,t)=>{MF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>nq(e,n,r)});function dH(e){return PU(fH,e)}const hH=pe("ZodArray",(e,t)=>{DF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>sq(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(Dp(n,r)),e.nonempty=n=>e.check(Dp(1,n)),e.max=(n,r)=>e.check(AP(n,r)),e.length=(n,r)=>e.check(CP(n,r)),e.unwrap=()=>e.element});function ze(e,t){return ZU(hH,e,t)}const pH=pe("ZodObject",(e,t)=>{IF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>uq(e,n,r,i),mt(e,"shape",()=>t.shape),e.keyof=()=>Ve(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:tr()}),e.loose=()=>e.clone({...e._zod.def,catchall:tr()}),e.strict=()=>e.clone({...e._zod.def,catchall:dH()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>nB(e,n),e.safeExtend=n=>rB(e,n),e.merge=n=>iB(e,n),e.pick=n=>eB(e,n),e.omit=n=>tB(e,n),e.partial=(...n)=>aB(zP,e,n[0]),e.required=(...n)=>lB(IP,e,n[0])});function Se(e,t){const n={type:"object",shape:e??{},...Me(t)};return new pH(n)}const MP=pe("ZodUnion",(e,t)=>{kP.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>cq(e,n,r,i),e.options=t.options});function rs(e,t){return new MP({type:"union",options:e,...Me(t)})}const mH=pe("ZodDiscriminatedUnion",(e,t)=>{MP.init(e,t),LF.init(e,t)});function Qm(e,t,n){return new mH({type:"union",options:t,discriminator:e,...Me(n)})}const vH=pe("ZodIntersection",(e,t)=>{$F.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>fq(e,n,r,i)});function gH(e,t){return new vH({type:"intersection",left:e,right:t})}const yH=pe("ZodRecord",(e,t)=>{BF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>dq(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function Rr(e,t,n){return new yH({type:"record",keyType:e,valueType:t,...Me(n)})}const Kb=pe("ZodEnum",(e,t)=>{FF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(r,i,a)=>iq(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const a={};for(const o of r)if(n.has(o))a[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Kb({...t,checks:[],...Me(i),entries:a})},e.exclude=(r,i)=>{const a={...t.entries};for(const o of r)if(n.has(o))delete a[o];else throw new Error(`Key ${o} not found in enum`);return new Kb({...t,checks:[],...Me(i),entries:a})}});function Ve(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Kb({type:"enum",entries:n,...Me(t)})}const bH=pe("ZodLiteral",(e,t)=>{UF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>aq(e,n,r),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 nn(e,t){return new bH({type:"literal",values:Array.isArray(e)?e:[e],...Me(t)})}const xH=pe("ZodTransform",(e,t)=>{qF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>oq(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new aP(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(jf(a,n.value,t));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(jf(o))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(a=>(n.value=a,n)):(n.value=i,n)}});function DP(e){return new xH({type:"transform",transform:e})}const zP=pe("ZodOptional",(e,t)=>{_P.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>NP(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function HC(e){return new zP({type:"optional",innerType:e})}const wH=pe("ZodExactOptional",(e,t)=>{HF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>NP(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function SH(e){return new wH({type:"optional",innerType:e})}const EH=pe("ZodNullable",(e,t)=>{ZF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>hq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function ZC(e){return new EH({type:"nullable",innerType:e})}const kH=pe("ZodDefault",(e,t)=>{KF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>mq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function _H(e,t){return new kH({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():uP(t)}})}const AH=pe("ZodPrefault",(e,t)=>{VF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>vq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function CH(e,t){return new AH({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():uP(t)}})}const IP=pe("ZodNonOptional",(e,t)=>{YF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>pq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function OH(e,t){return new IP({type:"nonoptional",innerType:e,...Me(t)})}const jH=pe("ZodCatch",(e,t)=>{GF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>gq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function TH(e,t){return new jH({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const NH=pe("ZodPipe",(e,t)=>{WF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>yq(e,n,r,i),e.in=t.in,e.out=t.out});function Vb(e,t){return new NH({type:"pipe",in:e,out:t})}const RH=pe("ZodReadonly",(e,t)=>{XF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>bq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function PH(e){return new RH({type:"readonly",innerType:e})}const MH=pe("ZodLazy",(e,t)=>{QF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>xq(e,n,r,i),e.unwrap=()=>e._zod.def.getter()});function LP(e){return new MH({type:"lazy",getter:e})}const $P=pe("ZodCustom",(e,t)=>{JF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>lq(e,n)});function BP(e,t){return KU($P,e??(()=>!0),t)}function DH(e,t={}){return VU($P,e,t)}function zH(e){return YU(e)}function KC(e,t){return Vb(DP(e),t)}const IH=rs([W(),Ke(),Yr(),uH()]),Yb=LP(()=>rs([IH,ze(Yb),Rr(W(),Yb)])),LH=Se({source:nn("repo"),path:W(),mimeType:W().optional()}),$H=Se({source:nn("run"),artifactId:W(),mimeType:W(),fileName:W().optional()}),BH=rs([LH,$H]),FH=Se({notation:Ve(["standard","compact"]).optional(),compactDisplay:Ve(["short","long"]).optional(),prefix:W().optional(),suffix:W().optional(),minDecimalPlaces:Ke().int().min(0).optional(),maxDecimalPlaces:Ke().int().min(0).optional()}),Bu=FH.refine(e=>e.minDecimalPlaces===void 0||e.maxDecimalPlaces===void 0?!0:e.minDecimalPlaces<=e.maxDecimalPlaces,{message:"minDecimalPlaces must be less than or equal to maxDecimalPlaces",path:["minDecimalPlaces"]}),UH=Ve(["string","number","boolean"]),FP=Ve(["boolean","markdown","json","image","audio","video","file","duration","percent","number","passFail","stars"]),qH=Se({key:W(),label:W(),kind:UH,format:FP.optional(),numberFormat:Bu.optional(),isScore:Yr().optional(),isManualScore:Yr().optional(),passThreshold:Ke().optional(),maxStars:Ke().int().min(2).optional(),hideInTable:Yr().optional(),align:Ve(["left","center","right"]).optional()}),UP=rs([Yb,BH]),Jm=W().min(1),qP=Ve(["string","number","duration","json"]),HP=Ve(["tree","detail","section"]),HH=Se({key:W().optional(),path:W(),label:W().optional(),format:qP.optional(),numberFormat:Bu.optional(),placements:ze(HP).optional(),scope:Ve(["self","subtree"]).optional(),mode:Ve(["all","last","sum"]).optional()}),ZP=Se({attributes:ze(HH).optional()}),ZH=Se({key:W().optional(),path:W(),label:W().optional(),format:qP.optional(),numberFormat:Bu.optional(),placements:ze(HP).optional(),scope:Ve(["self","subtree"]).optional(),mode:Ve(["all","last","sum"]).optional(),transform:BP(e=>e===void 0||typeof e=="function",{message:"Expected a transform function"}).optional()}),KH=Se({attributes:ze(ZH).optional()}),Bo=Se({name:W().optional(),message:W(),stack:W().optional(),capturedAt:W().optional()}).catchall(tr()),_u=Bo,KP=Se({id:W(),parentId:W().nullable(),caseId:W(),kind:Jm,name:W(),startedAt:W(),endedAt:W().nullable(),status:Ve(["running","ok","error","cancelled"]),attributes:Rr(W(),tr()).optional(),error:Bo.optional(),errors:ze(Bo).optional(),warning:_u.optional(),warnings:ze(_u).optional()}),VP=Ve(["use","bypass","refresh"]);Se({key:tr(),namespace:W().optional(),serializeFileBytes:Yr().optional()});const zw=Ve(["span","value"]),YP=Ve(["hit","miss","refresh","bypass"]),GP=Se({type:nn("value"),name:W(),namespace:W(),key:W(),status:YP,storedAt:W().optional(),age:Ke().optional()});Se({key:W(),namespace:W(),operationType:zw,operationName:W(),spanName:W().optional(),spanKind:Jm.optional(),storedAt:W(),codeFingerprint:W(),sizeBytes:Ke()});const VH=Se({kind:Jm,name:W(),attributes:Rr(W(),tr()).optional(),status:Ve(["running","ok","error","cancelled"]),error:Bo.optional(),errors:ze(Bo).optional(),warning:_u.optional(),warnings:ze(_u).optional()}),WP=VH.extend({children:LP(()=>ze(WP))}),YH=Qm("kind",[Se({kind:nn("setOutput"),key:W(),value:tr()}),Se({kind:nn("appendOutput"),key:W(),value:tr()}),Se({kind:nn("mergeOutput"),key:W(),patch:Rr(W(),tr())}),Se({kind:nn("incrementOutput"),key:W(),delta:Ke()}),Se({kind:nn("checkpoint"),name:W(),data:tr()}),Se({kind:nn("subSpan"),span:WP})]),GH=Se({returnValue:tr(),finalAttributes:Rr(W(),tr()),finalStatus:Ve(["running","ok","error","cancelled"]).optional(),finalError:Bo.optional(),finalErrors:ze(Bo).optional(),finalWarning:_u.optional(),finalWarnings:ze(_u).optional(),ops:ze(YH)}),XP=Se({version:nn(1),key:W(),namespace:W(),operationType:zw.optional(),operationName:W().optional(),spanName:W().optional(),spanKind:Jm.optional(),storedAt:W(),codeFingerprint:W(),recording:GH}),QP=Se({version:nn(1),key:W(),namespace:W(),operationType:zw,operationName:W(),storedAt:W(),codeFingerprint:W(),rawKey:tr()}),WH=XP.extend({debugKey:QP.optional()});Se({version:nn(1),owner:W(),entries:Rr(W(),XP)});Se({version:nn(1),owner:W(),entries:Rr(W(),QP)});const XH=Ve(["area","line","bar"]),JP=Ve(["passRate","durationMs"]),e5=Ve(["avg","sum","min","max","latest","passThresholdRate"]),VC=Ve(["accent","accentDim","success","error","warning","textMuted"]),YC=Ve(["left","right"]),QH=Qm("source",[Se({source:nn("builtin"),metric:JP,label:W().optional(),color:VC.optional(),axis:YC.optional()}),Se({source:nn("column"),key:W().min(1),aggregate:e5,label:W().optional(),color:VC.optional(),axis:YC.optional()})]),JH=Qm("source",[Se({source:nn("builtin"),metric:JP,label:W().optional()}),Se({source:nn("column"),key:W().min(1),aggregate:e5,label:W().optional()})]),eZ=Se({heading:W().optional(),type:XH,metrics:ze(QH).min(1),yDomain:Se({left:Se({min:Ke().optional(),max:Ke().optional()}).optional(),right:Se({min:Ke().optional(),max:Ke().optional()}).optional()}).optional(),tooltipExtras:ze(JH).optional()}),tZ=ze(eZ),nZ=Ve(["fresh","stale","outdated"]),rZ=Ve(["avg","min","max","sum","last"]),iZ=Qm("kind",[Se({kind:nn("cases")}),Se({kind:nn("passRate"),accent:Yr().optional()}),Se({kind:nn("duration")}),Se({kind:nn("column"),key:W(),label:W().optional(),aggregate:rZ,format:FP.optional(),numberFormat:Bu.optional(),accent:Yr().optional()})]),aZ=ze(iZ),lZ=Se({key:W().default(""),id:W(),title:W().optional(),filePath:W(),stale:Yr(),outdated:Yr(),freshnessStatus:nZ,latestRunAt:W().nullable(),latestRunCommitSha:W().nullable(),currentCommitSha:W().nullable(),columnDefs:ze(qH),caseCount:Ke().nullable(),lastRunStatus:Ve(["pass","fail","error","running","cancelled","unscored"]).nullable(),stats:aZ.optional(),charts:tZ.optional()}),Iw=Se({evalKey:W().optional(),caseKey:W().optional(),caseId:W(),evalId:W(),status:Ve(["pending","running","pass","fail","error","cancelled"]),durationMs:Ke().nullable(),costUsd:Ke().nullable().optional(),columns:Rr(W(),UP),trial:Ke()}),oZ=Se({message:W(),stack:W().optional()}),sZ=W().transform(e=>({message:e})),uZ=Ve(["log","info","warn","error"]),cZ=Ve(["eval","derive","outputsSchema","scorer"]),fZ=Se({file:W(),line:Ke(),column:Ke()}),dZ=Se({timestamp:W(),level:uZ,phase:cZ,message:W(),args:ze(tr()).default([]),truncated:Yr().default(!1),location:fZ.optional(),source:W().optional()}),hZ=Se({trace:ze(KP),traceDisplay:ZP}),t5=Se({evalKey:W().optional(),caseKey:W().optional(),caseId:W(),evalId:W(),status:Ve(["pending","running","pass","fail","error","cancelled"]),input:tr(),trace:ze(KP),traceDisplay:ZP,scoringTraces:Rr(W(),hZ).optional(),columns:Rr(W(),UP),assertionFailures:ze(rs([oZ,sZ])),logs:ze(dZ).default([]),error:Se({name:W().optional(),message:W(),stack:W().optional()}).nullable(),trial:Ke(),cacheRefs:ze(GP).default([])}),pZ=Se({type:Ve(["duplicate-eval-id"]),severity:Ve(["error"]),filePath:W(),evalId:W(),message:W()}),n5=Ve(["lowestScore","median"]),mZ=Ve(["apiCalls","costUsd","llmTurns","inputTokens","outputTokens","totalTokens","cachedInputTokens","cacheCreationInputTokens","reasoningTokens","llmDurationMs"]),vZ=rs([nn(!0),ze(mZ)]),r5=Ve(["string","number","duration","json","boolean"]),gZ=r5,i5=Ve(["header","body"]),yZ=i5,a5=BP(e=>typeof e=="function",{message:"Expected a derived attribute function"}),bZ=Se({label:W().min(1),tooltip:W().min(1).optional(),path:W().min(1),format:r5.optional(),numberFormat:Bu.optional(),placements:ze(i5).nonempty().optional()}),xZ=Se({label:W().min(1),tooltip:W().min(1).optional(),path:W().min(1),format:gZ.optional(),numberFormat:Bu.optional(),placements:ze(yZ).nonempty().optional()}),wZ=Se({model:W().min(1),provider:W().min(1).optional(),inputUsdPerMillion:Ke().nonnegative().optional(),outputUsdPerMillion:Ke().nonnegative().optional(),cachedInputUsdPerMillion:Ke().nonnegative().optional(),cacheCreationInputUsdPerMillion:Ke().nonnegative().optional(),cacheCreationInput1hUsdPerMillion:Ke().nonnegative().optional(),reasoningUsdPerMillion:Ke().nonnegative().optional()}),SZ=Se({kinds:ze(W().min(1)).optional(),attributes:Se({model:W().optional(),provider:W().optional(),inputTokens:W().optional(),outputTokens:W().optional(),cachedInputTokens:W().optional(),cacheCreationInputTokens:W().optional(),cacheCreationInput1hTokens:W().optional(),reasoningTokens:W().optional(),latencyMs:W().optional(),steps:W().optional(),finishReason:W().optional(),input:W().optional(),output:W().optional(),reasoning:W().optional(),toolCalls:W().optional()}).optional(),derivedAttributes:Rr(W().min(1),a5).optional(),pricing:ze(wZ).optional(),metrics:ze(bZ).optional()}),EZ=Se({kinds:ze(W().min(1)).optional(),attributes:Se({method:W().optional(),url:W().optional(),statusCode:W().optional(),request:W().optional(),response:W().optional(),requestBody:W().optional(),responseBody:W().optional(),headers:W().optional(),durationMs:W().optional(),error:W().optional()}).optional(),derivedAttributes:Rr(W().min(1),a5).optional(),metrics:ze(xZ).optional()}),kZ=Se({captureConsole:Yr().optional()}),_Z={kinds:["llm"],attributes:{model:"model",provider:"provider",inputTokens:"usage.inputTokens",outputTokens:"usage.outputTokens",cachedInputTokens:"usage.cachedInputTokens",cacheCreationInputTokens:"usage.cacheCreationInputTokens",cacheCreationInput1hTokens:"usage.cacheCreationInput1hTokens",reasoningTokens:"usage.reasoningTokens",latencyMs:"latencyMs",steps:"steps",finishReason:"finishReason",input:"input",output:"output",reasoning:"reasoning",toolCalls:"toolCalls"},derivedAttributes:[],metrics:[],pricing:[]},AZ={kinds:["api","http","http.client","fetch"],attributes:{method:"method",url:"url",statusCode:"statusCode",request:"request",response:"response",requestBody:"requestBody",responseBody:"responseBody",headers:"headers",durationMs:"durationMs",error:"error"},derivedAttributes:[],metrics:[]};Se({workspaceRoot:W().optional(),include:ze(W()),defaultTrials:Ke().optional(),trialSelection:n5.optional(),concurrency:Ke().optional(),staleAfterDays:Ke().optional(),allowCliRunAll:Yr().optional(),traceDisplay:KH.optional(),llmCalls:SZ.optional(),removeDefaultConfig:vZ.optional(),apiCalls:EZ.optional(),runLogs:kZ.optional(),cache:Se({enabled:Yr().optional(),dir:W().optional(),maxEntriesPerNamespace:KC(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,Ke().optional()),maxEntriesByNamespace:Rr(W(),Ke()).optional(),maxEntriesPerEval:KC(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,Ke().optional())}).optional()});const Lw=Se({id:W(),shortId:W(),status:Ve(["pending","running","completed","cancelled","error"]),startedAt:W(),endedAt:W().nullable(),commitSha:W().nullable().optional().default(null),evalSourceFingerprints:Rr(W(),W()).optional().default({}),target:Se({mode:Ve(["all","evalIds","caseIds"]),evalKeys:ze(W()).optional(),files:ze(W()).optional(),evalIds:ze(W()).optional(),caseIds:ze(W()).optional()}),trials:Ke(),trialSelection:n5.optional().default("lowestScore"),cacheMode:VP.optional()}),$w=Se({runId:W(),status:Ve(["pending","running","completed","cancelled","error"]),totalCases:Ke(),passedCases:Ke(),failedCases:Ke(),errorCases:Ke(),cancelledCases:Ke(),totalDurationMs:Ke().nullable(),errorMessage:W().nullable().default(null)});function CZ(e){return e==="pending"||e==="running"||e==="cancelled"||e==="error"?e:null}function OZ(e){const t=CZ(e.lifecycleStatus);if(t!==null)return t;let n=!1,r=!1,i=!1,a=!1,o=!1,u=!1;for(const c of e.statuses)c!=null&&(c==="running"?i=!0:c==="error"?o=!0:c==="fail"?u=!0:c==="cancelled"?a=!0:c==="pass"?n=!0:r=!0);return i?"running":o?"error":u?"fail":a?"cancelled":r||!n?"pending":"pass"}function l5(e){return OZ({statuses:Array.from(e.caseRows,t=>t.status),lifecycleStatus:e.lifecycleStatus})}function o5(e){const t=[...e.caseRows];let n=0,r=0,i=0,a=0,o=0,u=0,c=0,f=!1;for(const h of t)h.status==="pass"?n+=1:h.status==="fail"?r+=1:h.status==="error"?i+=1:h.status==="cancelled"?a+=1:h.status==="running"?u+=1:o+=1,h.durationMs!==null&&(c+=h.durationMs,f=!0);return{status:l5({caseRows:t,lifecycleStatus:e.lifecycleStatus}),totalCases:t.length,passedCases:n,failedCases:r,errorCases:i,cancelledCases:a,pendingCases:o,runningCases:u,totalDurationMs:f?c:null}}function s5(e){const{stale:t,outdated:n,lastRunStatus:r,isRunning:i=!1}=e;if(i||r==="running")return"running";if(r==="pass"){if(t)return"stale";if(n)return"outdated"}return r??"pending"}function jZ(e){const t=e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[-_\s]+/g," ").trim();return t.length===0?e:t.split(" ").map(n=>{const r=n.slice(0,1),i=n.slice(1);return`${r.toUpperCase()}${i}`}).join(" ")}function Au(e){return e.title!==void 0?e.title:jZ(e.id)}function TZ(e){return typeof e=="object"&&e!==null}function Vn(e,t){const n=t.split(".");let r=e;for(const i of n){if(!TZ(r)||!(i in r))return;r=r[i]}return r}function go(e,t){const n=Vn(e,t);return typeof n=="number"&&Number.isFinite(n)?n:null}function O0(e,t){const n=Vn(e,t);return typeof n=="string"&&n.length>0?n:null}function Oo(e,t){return e===null?null:e===0?0:t===void 0?null:e/1e6*t}function NZ({cacheCreationInputTokens:e,cacheCreationInput1hTokens:t,usdPerMillion:n,oneHourUsdPerMillion:r}){if(e===null)return null;if(e===0)return 0;if(t===null)return Oo(e,n);const i=Math.min(t,e),a=e-i,o=Oo(a,n),u=Oo(i,r);return o===null||u===null?null:o+u}function RZ({inputTokens:e,cachedInputTokens:t,cacheCreationInputTokens:n}){if(e===null)return null;const r=(t??0)+(n??0);return Math.max(e-r,0)}function PZ({pricing:e,model:t,provider:n}){if(t===null)return null;let r=null;for(const i of e)if(i.model===t){if(i.provider===void 0){r??=i;continue}if(i.provider===n)return i}return r}function MZ({inputTokens:e,inputCostUsd:t,outputTokens:n,outputCostUsd:r,cachedInputTokens:i,cachedInputCostUsd:a,cacheCreationInputTokens:o,cacheCreationInputCostUsd:u,reasoningTokens:c,reasoningCostUsd:f}){const h=[{tokens:e,cost:t},{tokens:n,cost:r},{tokens:i,cost:a},{tokens:o,cost:u},{tokens:c,cost:f}];let p=0,v=!1,g=!1;for(const y of h)if(y.tokens!==null&&(g=!0,y.tokens!==0)){if(y.cost===null)return null;p+=y.cost,v=!0}return v?p:g?0:null}function DZ(e){if(e.endedAt===null)return null;const t=Date.parse(e.startedAt),n=Date.parse(e.endedAt);if(!Number.isFinite(t)||!Number.isFinite(n))return null;const r=n-t;return r>=0?r:null}function zZ({input:e,output:t}){return e===null&&t===null?null:(e??0)+(t??0)}function IZ({outputTokens:e,durationMs:t,latencyMs:n}){if(e===null||t===null)return null;if(e===0)return 0;const r=n===null?t:t-n;return r<=0?null:e/(r/1e3)}function LZ(e,t){const n=Vn(e,t);return Array.isArray(n)?{stepCount:n.length,stepDetails:n}:{stepCount:null,stepDetails:null}}function $Z(e){const t=[];return e.warning&&t.push(e.warning),e.warnings&&t.push(...e.warnings),t}function BZ(e){return e.error?e.error:e.errors&&e.errors.length>0?e.errors[0]??null:null}function FZ(e,t){const n=new Set(t.kinds),r=[];for(const i of e){if(!n.has(i.kind))continue;const a=i.attributes,o=O0(a,t.attributes.model),u=O0(a,t.attributes.provider),c=go(a,t.attributes.inputTokens),f=go(a,t.attributes.outputTokens),h=go(a,t.attributes.cachedInputTokens),p=go(a,t.attributes.cacheCreationInputTokens),v=go(a,t.attributes.cacheCreationInput1hTokens),g=go(a,t.attributes.reasoningTokens),y=go(a,t.attributes.latencyMs),x=DZ(i),E=PZ({pricing:t.pricing,model:o,provider:u}),k=RZ({inputTokens:c,cachedInputTokens:h,cacheCreationInputTokens:p}),C=Oo(k,E?.inputUsdPerMillion),A=Oo(f,E?.outputUsdPerMillion),O=Oo(h,E?.cachedInputUsdPerMillion),T=NZ({cacheCreationInputTokens:p,cacheCreationInput1hTokens:v,usdPerMillion:E?.cacheCreationInputUsdPerMillion,oneHourUsdPerMillion:E?.cacheCreationInput1hUsdPerMillion}),j=Oo(g,E?.reasoningUsdPerMillion),R=MZ({inputTokens:c,inputCostUsd:C,outputTokens:f,outputCostUsd:A,cachedInputTokens:h,cachedInputCostUsd:O,cacheCreationInputTokens:p,cacheCreationInputCostUsd:T,reasoningTokens:g,reasoningCostUsd:j}),I=[];for(const M of t.metrics){const P=Vn(a,M.path);P!==void 0&&I.push({label:M.label,tooltip:M.tooltip,rawValue:P,format:M.format,numberFormat:M.numberFormat,placements:M.placements})}r.push({id:i.id,name:i.name,kind:i.kind,status:i.status,model:o,provider:u,inputTokens:c,outputTokens:f,cachedInputTokens:h,cacheCreationInputTokens:p,reasoningTokens:g,totalTokens:zZ({input:c,output:f}),latencyMs:y,tokensPerSecond:IZ({outputTokens:f,durationMs:x,latencyMs:y}),costUsd:R,inputCostUsd:C,outputCostUsd:A,cachedInputCostUsd:O,cacheCreationInputCostUsd:T,reasoningCostUsd:j,...LZ(a,t.attributes.steps),finishReason:O0(a,t.attributes.finishReason),durationMs:x,input:Vn(a,t.attributes.input),output:Vn(a,t.attributes.output),reasoning:Vn(a,t.attributes.reasoning),toolCalls:Vn(a,t.attributes.toolCalls),metrics:I,warnings:$Z(i),error:BZ(i)})}return r}function GC(e,t){const n=Vn(e,t);if(typeof n=="number"&&Number.isFinite(n))return n;if(typeof n!="string")return null;const r=Number(n);return Number.isFinite(r)?r:null}function WC(e,t){const n=Vn(e,t);return typeof n=="string"&&n.length>0?n:null}function UZ(e){if(e.endedAt===null)return null;const t=Date.parse(e.startedAt),n=Date.parse(e.endedAt);if(!Number.isFinite(t)||!Number.isFinite(n))return null;const r=n-t;return r>=0?r:null}function qZ(e){const t=[];return e.warning&&t.push(e.warning),e.warnings&&t.push(...e.warnings),t}function HZ(e){return e.error?e.error:e.errors&&e.errors.length>0?e.errors[0]??null:null}function ZZ(e,t){const n=new Set(t.kinds),r=[];for(const i of e){if(!n.has(i.kind))continue;const a=i.attributes,o=[];for(const u of t.metrics){const c=Vn(a,u.path);c!==void 0&&o.push({label:u.label,tooltip:u.tooltip,rawValue:c,format:u.format,numberFormat:u.numberFormat,placements:u.placements})}r.push({id:i.id,name:i.name,kind:i.kind,status:i.status,method:WC(a,t.attributes.method),url:WC(a,t.attributes.url),statusCode:GC(a,t.attributes.statusCode),durationMs:GC(a,t.attributes.durationMs)??UZ(i),request:Vn(a,t.attributes.request),response:Vn(a,t.attributes.response),requestBody:Vn(a,t.attributes.requestBody),responseBody:Vn(a,t.attributes.responseBody),headers:Vn(a,t.attributes.headers),errorPayload:Vn(a,t.attributes.error),metrics:o,warnings:qZ(i),error:HZ(i)})}return r}function ev(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function j0(e,t){if(!ev(e))return;const n=e[t];return typeof n=="string"&&n.length>0?n:void 0}function KZ(e,t){if(!ev(e))return;const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function VZ(e,t){if(!ev(e))return[];const n=e[t];return Array.isArray(n)?n:[]}function YZ(e){if(!ev(e))return;const t=YP.safeParse(e["cache.status"]);if(!(!t.success||t.data==="bypass"))return t.data}function GZ(e,t){const n=[];for(const r of e){const i=YZ(r.attributes);if(i!==void 0){const o=j0(r.attributes,"cache.key"),u=j0(r.attributes,"cache.namespace");if(o!==void 0&&u!==void 0){const c=i==="hit";n.push({id:r.id,source:"span",origin:"span",action:c?"hit":"added",status:i,name:r.name,namespace:u,key:o,storedAt:c?j0(r.attributes,"cache.storedAt"):void 0,age:c?KZ(r.attributes,"cache.age"):void 0,spanId:r.id})}}const a=VZ(r.attributes,"cache.refs");for(const[o,u]of a.entries()){const c=GP.safeParse(u);if(!c.success)continue;const f=c.data;if(f.status==="bypass")continue;const h=f.status==="hit";n.push({id:`${r.id}:value:${String(o)}`,source:"value",origin:"span",action:h?"hit":"added",status:f.status,name:f.name,namespace:f.namespace,key:f.key,storedAt:h?f.storedAt:void 0,age:h?f.age:void 0,spanId:r.id})}}for(const[r,i]of t.entries()){if(i.status==="bypass")continue;const a=i.status==="hit";n.push({id:`case:value:${String(r)}`,source:"value",origin:"caseRoot",action:a?"hit":"added",status:i.status,name:i.name,namespace:i.namespace,key:i.key,storedAt:a?i.storedAt:void 0,age:a?i.age:void 0,spanId:void 0})}return n}Ve(["discovery.updated","run.started","run.summary","case.started","case.updated","case.finished","trace.span","run.finished","run.cancelled","run.error"]);Se({type:W(),runId:W().optional(),timestamp:W(),payload:tr()});Se({target:Se({mode:Ve(["all","evalIds","caseIds"]),evalKeys:ze(W()).optional(),files:ze(W()).optional(),evalIds:ze(W()).optional(),caseIds:ze(W()).optional()}),trials:Ke().min(1),cache:Se({mode:VP.default("use")}).optional()});Se({value:Ke().min(0).max(1).nullable()});const u5=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const WZ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const XZ=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const XC=e=>{const t=XZ(e);return t.charAt(0).toUpperCase()+t.slice(1)};var T0={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"};const QZ=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},JZ=_.createContext({}),eK=()=>_.useContext(JZ),tK=_.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...u},c)=>{const{size:f=24,strokeWidth:h=2,absoluteStrokeWidth:p=!1,color:v="currentColor",className:g=""}=eK()??{},y=r??p?Number(n??h)*24/Number(t??f):n??h;return _.createElement("svg",{ref:c,...T0,width:t??f??T0.width,height:t??f??T0.height,stroke:e??v,strokeWidth:y,className:u5("lucide",g,i),...!a&&!QZ(u)&&{"aria-hidden":"true"},...u},[...o.map(([x,E])=>_.createElement(x,E)),...Array.isArray(a)?a:[a]])});const jn=(e,t)=>{const n=_.forwardRef(({className:r,...i},a)=>_.createElement(tK,{ref:a,iconNode:t,className:u5(`lucide-${WZ(XC(e))}`,`lucide-${e}`,r),...i}));return n.displayName=XC(e),n};const nK=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],rK=jn("check",nK);const iK=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ll=jn("chevron-down",iK);const aK=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Zl=jn("chevron-right",aK);const lK=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],c5=jn("chevrons-down-up",lK);const oK=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],f5=jn("chevrons-up-down",oK);const sK=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],uK=jn("clock-3",sK);const cK=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],fK=jn("ellipsis",cK);const dK=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],hK=jn("git-fork",dK);const pK=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],mK=jn("maximize-2",pK);const vK=[["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"}]],gK=jn("minimize-2",vK);const yK=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],bK=jn("panel-right-close",yK);const xK=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]],wK=jn("panel-right-open",xK);const SK=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],d5=jn("play",SK);const EK=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],kK=jn("search",EK);const _K=[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]],Bw=jn("square-arrow-out-up-right",_K);const AK=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],Fw=jn("square-stop",AK);const CK=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],h5=jn("star",CK);const OK=[["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"}]],jK=jn("trash-2",OK);const TK=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Jf=jn("x",TK);function NK(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function u(h){try{f(r.next(h))}catch(p){o(p)}}function c(h){try{f(r.throw(h))}catch(p){o(p)}}function f(h){h.done?a(h.value):i(h.value).then(u,c)}f((r=r.apply(e,[])).next())})}var RK=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(i){e.addRange(i)}),t&&t.focus()}},PK=RK,QC={"text/plain":"Text","text/html":"Url",default:"Text"},MK="Copy to clipboard: #{key}, Enter";function DK(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function zK(e,t){var n,r,i,a,o,u,c=!1;t||(t={}),n=t.debug||!1;try{i=PK(),a=document.createRange(),o=document.getSelection(),u=document.createElement("span"),u.textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(h){if(h.stopPropagation(),t.format)if(h.preventDefault(),typeof h.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var p=QC[t.format]||QC.default;window.clipboardData.setData(p,e)}else h.clipboardData.clearData(),h.clipboardData.setData(t.format,e);t.onCopy&&(h.preventDefault(),t.onCopy(h.clipboardData))}),document.body.appendChild(u),a.selectNodeContents(u),o.addRange(a);var f=document.execCommand("copy");if(!f)throw new Error("copy command was unsuccessful");c=!0}catch(h){n&&console.error("unable to copy using execCommand: ",h),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),r=DK("message"in t?t.message:MK),window.prompt(r,e)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(a):o.removeAllRanges()),u&&document.body.removeChild(u),i()}return c}var IK=zK;function Kl(e){return Object.prototype.toString.call(e)==="[object Object]"}function bf(e){return Array.isArray(e)?e.length:Kl(e)?Object.keys(e).length:0}function LK(e,t){if(typeof e=="string")return e;try{return JSON.stringify(e,(n,r)=>{switch(typeof r){case"bigint":return String(r)+"n";case"number":case"boolean":case"object":case"string":return r;default:return String(r)}},t)}catch(n){return`${n.name}: ${n.message}`||"JSON.stringify failed"}}function $K(e){return NK(this,void 0,void 0,function*(){try{yield navigator.clipboard.writeText(e)}catch{IK(e)}})}function JC(e,t,n,r,i,a){if(a&&a.collapsed!==void 0)return!!a.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const o=bf(e);if(typeof r=="function"){const u=Uw(r,[{node:e,depth:t,indexOrName:n,size:o}]);if(typeof u=="boolean")return u}return!!(Array.isArray(e)&&o>i||Kl(e)&&o>i)}function eO(e,t,n,r,i,a){if(a&&a.collapsed!==void 0)return!!a.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const o=Math.ceil(e.length/100);if(typeof r=="function"){const u=Uw(r,[{node:e,depth:t,indexOrName:n,size:o}]);if(typeof u=="boolean")return u}return!!(Array.isArray(e)&&o>i||Kl(e)&&o>i)}function mu(e,t,n){return typeof e=="boolean"?e:!!(typeof e=="number"&&t>e||e==="collapsed"&&n||e==="expanded"&&!n)}function Uw(e,t){try{return e(...t)}catch(n){reportError(n)}}function p5(e){if(e===!0||Kl(e)&&e.add===!0)return!0}function tO(e){if(e===!0||Kl(e)&&e.edit===!0)return!0}function qw(e){if(e===!0||Kl(e)&&e.delete===!0)return!0}function BK(e){return typeof e=="function"}function m5(e){return!e||e.add===void 0||!!e.add}function nO(e){return!e||e.edit===void 0||!!e.edit}function Hw(e){return!e||e.delete===void 0||!!e.delete}function tv(e){return!e||e.enableClipboard===void 0||!!e.enableClipboard}function FK(e){return!e||e.matchesURL===void 0||!!e.matchesURL}function UK(e,t){return e==="string"?t.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):t}var rO;function Gb(){return Gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gb.apply(this,arguments)}var Zw=function(t){return _.createElement("svg",Gb({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},t),rO||(rO=_.createElement("path",{fill:"currentColor",d:"M12.473 5.806a.666.666 0 0 0-.946 0L8.473 8.86a.667.667 0 0 1-.946 0L4.473 5.806a.667.667 0 1 0-.946.94l3.06 3.06a2 2 0 0 0 2.826 0l3.06-3.06a.667.667 0 0 0 0-.94Z"})))},iO;function Wb(){return Wb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wb.apply(this,arguments)}var qK=function(t){return _.createElement("svg",Wb({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),iO||(iO=_.createElement("path",{fill:"currentColor",d:"M17.542 2.5h-4.75a3.963 3.963 0 0 0-3.959 3.958v4.75a3.963 3.963 0 0 0 3.959 3.959h4.75a3.963 3.963 0 0 0 3.958-3.959v-4.75A3.963 3.963 0 0 0 17.542 2.5Zm2.375 8.708a2.378 2.378 0 0 1-2.375 2.375h-4.75a2.378 2.378 0 0 1-2.375-2.375v-4.75a2.378 2.378 0 0 1 2.375-2.375h4.75a2.378 2.378 0 0 1 2.375 2.375v4.75Zm-4.75 6.334a3.963 3.963 0 0 1-3.959 3.958h-4.75A3.963 3.963 0 0 1 2.5 17.542v-4.75a3.963 3.963 0 0 1 3.958-3.959.791.791 0 1 1 0 1.584 2.378 2.378 0 0 0-2.375 2.375v4.75a2.378 2.378 0 0 0 2.375 2.375h4.75a2.378 2.378 0 0 0 2.375-2.375.792.792 0 1 1 1.584 0Z"})))},aO,lO;function Xb(){return Xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xb.apply(this,arguments)}var HK=function(t){return _.createElement("svg",Xb({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),aO||(aO=_.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.755 3.755 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.755 3.755 0 0 0 17.25 3Zm2.25 14.25a2.25 2.25 0 0 1-2.25 2.25H6.75a2.25 2.25 0 0 1-2.25-2.25V6.75A2.25 2.25 0 0 1 6.75 4.5h10.5a2.25 2.25 0 0 1 2.25 2.25v10.5Z"})),lO||(lO=_.createElement("path",{fill:"#14C786",d:"M10.312 14.45 7.83 11.906a.625.625 0 0 0-.896 0 .659.659 0 0 0 0 .918l2.481 2.546a1.264 1.264 0 0 0 .896.381 1.237 1.237 0 0 0 .895-.38l5.858-6.011a.658.658 0 0 0 0-.919.625.625 0 0 0-.896 0l-5.857 6.01Z"})))};function nv({node:e,nodeMeta:t}){const{customizeCopy:n,CopyComponent:r,CopiedComponent:i}=_.useContext(Vl),[a,o]=_.useState(!1),u=c=>{c.stopPropagation();const f=n(e,t);typeof f=="string"&&f&&$K(f),o(!0),setTimeout(()=>o(!1),3e3)};return a?typeof i=="function"?w.jsx(i,{className:"json-view--copy",style:{display:"inline-block"}}):w.jsx(HK,{className:"json-view--copy",style:{display:"inline-block"}}):typeof r=="function"?w.jsx(r,{onClick:u,className:"json-view--copy"}):w.jsx(qK,{onClick:u,className:"json-view--copy"})}function Qb({indexOrName:e,value:t,depth:n,deleteHandle:r,editHandle:i,parent:a,parentPath:o}){const{displayArrayIndex:u}=_.useContext(Vl),c=Array.isArray(a);return w.jsxs("div",Object.assign({className:"json-view--pair"},{children:[!c||c&&u?w.jsxs(w.Fragment,{children:[w.jsx("span",Object.assign({className:typeof e=="number"?"json-view--index":"json-view--property"},{children:e})),":"," "]}):w.jsx(w.Fragment,{}),w.jsx(g5,{node:t,depth:n+1,deleteHandle:(f,h)=>r(f,h),editHandle:(f,h,p,v)=>i(f,h,p,v),parent:a,indexOrName:e,parentPath:o})]}))}var oO,sO;function Jb(){return Jb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jb.apply(this,arguments)}var Kw=function(t){return _.createElement("svg",Jb({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),oO||(oO=_.createElement("path",{fill:"currentColor",d:"M18.75 6h-2.325a3.757 3.757 0 0 0-3.675-3h-1.5a3.757 3.757 0 0 0-3.675 3H5.25a.75.75 0 0 0 0 1.5H6v9.75A3.754 3.754 0 0 0 9.75 21h4.5A3.754 3.754 0 0 0 18 17.25V7.5h.75a.75.75 0 1 0 0-1.5Zm-7.5-1.5h1.5A2.255 2.255 0 0 1 14.872 6H9.128a2.255 2.255 0 0 1 2.122-1.5Zm5.25 12.75a2.25 2.25 0 0 1-2.25 2.25h-4.5a2.25 2.25 0 0 1-2.25-2.25V7.5h9v9.75Z"})),sO||(sO=_.createElement("path",{fill:"#DA0000",d:"M10.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM13.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z"})))},uO,cO;function ex(){return ex=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ex.apply(this,arguments)}var v5=function(t){return _.createElement("svg",ex({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),uO||(uO=_.createElement("path",{fill:"currentColor",d:"M21 6.75v10.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3h10.5A3.754 3.754 0 0 1 21 6.75Zm-1.5 0c0-1.24-1.01-2.25-2.25-2.25H6.75C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25V6.75Z"})),cO||(cO=_.createElement("path",{fill:"#14C786",d:"M15 12.75a.75.75 0 1 0 0-1.5h-2.25V9a.75.75 0 1 0-1.5 0v2.25H9a.75.75 0 1 0 0 1.5h2.25V15a.75.75 0 1 0 1.5 0v-2.25H15Z"})))},fO,dO;function tx(){return tx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tx.apply(this,arguments)}var Vw=function(t){return _.createElement("svg",tx({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),fO||(fO=_.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})),dO||(dO=_.createElement("path",{fill:"#14C786",d:"m10.85 13.96-1.986-2.036a.5.5 0 0 0-.716 0 .527.527 0 0 0 0 .735l1.985 2.036a1.01 1.01 0 0 0 .717.305.99.99 0 0 0 .716-.305l4.686-4.808a.526.526 0 0 0 0-.735.5.5 0 0 0-.716 0l-4.687 4.809Z"})))},hO,pO;function nx(){return nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nx.apply(this,arguments)}var Yw=function(t){return _.createElement("svg",nx({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),hO||(hO=_.createElement("path",{fill:"#DA0000",d:"M15 9a.75.75 0 0 0-1.06 0L12 10.94 10.06 9A.75.75 0 0 0 9 10.06L10.94 12 9 13.94A.75.75 0 0 0 10.06 15L12 13.06 13.94 15A.75.75 0 0 0 15 13.94L13.06 12 15 10.06A.75.75 0 0 0 15 9Z"})),pO||(pO=_.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})))};function ZK({originNode:e,node:t,depth:n,index:r,deleteHandle:i,customOptions:a,startIndex:o,parent:u,parentPath:c}){const{enableClipboard:f,src:h,onEdit:p,onChange:v,forceUpdate:g,displaySize:y,CustomOperation:x}=_.useContext(Vl),E=[...c,String(r)],[k,C]=_.useState(!0),A=_.useCallback((j,R,I)=>{e[j]=R,p&&p({newValue:R,oldValue:I,depth:n,src:h,indexOrName:j,parentType:"array",parentPath:c}),v&&v({type:"edit",depth:n,src:h,indexOrName:j,parentType:"array",parentPath:c}),g()},[t,p,v,g]),O=j=>{e.splice(j,1),i&&i(j,c),g()},T=w.jsxs(w.Fragment,{children:[!k&&w.jsxs("span",Object.assign({onClick:()=>C(!0),className:"jv-size-chevron"},{children:[mu(y,n,k)&&w.jsxs("span",Object.assign({className:"jv-size"},{children:[bf(t)," Items"]})),w.jsx(Zw,{className:"jv-chevron"})]})),!k&&f&&tv(a)&&w.jsx(nv,{node:t,nodeMeta:{depth:n,indexOrName:r,parent:u,parentPath:c,currentPath:E}}),typeof x=="function"?w.jsx(x,{node:t}):null]});return w.jsxs("div",{children:[w.jsx("span",{children:"["}),T,k?w.jsxs("button",Object.assign({onClick:()=>C(!1),className:"jv-button"},{children:[o," ... ",o+t.length-1]})):w.jsx("div",Object.assign({className:"jv-indent"},{children:t.map((j,R)=>w.jsx(Qb,{indexOrName:R+o,value:j,depth:n,parent:t,deleteHandle:O,editHandle:A,parentPath:c},String(r)+String(R)))})),w.jsx("span",{children:"]"})]})}function KK({node:e,depth:t,deleteHandle:n,indexOrName:r,customOptions:i,parent:a,parentPath:o}){const u=typeof r<"u"?[...o,String(r)]:o,c=[];for(let Z=0;Z<e.length;Z+=100)c.push(e.slice(Z,Z+100));const{collapsed:f,enableClipboard:h,collapseObjectsAfterLength:p,editable:v,onDelete:g,src:y,onAdd:x,CustomOperation:E,onChange:k,forceUpdate:C,displaySize:A}=_.useContext(Vl),[O,T]=_.useState(eO(e,t,r,f,p,i));_.useEffect(()=>{T(eO(e,t,r,f,p,i))},[f,p]);const[j,R]=_.useState(!1),I=()=>{R(!1),n&&n(r,o),g&&g({value:e,depth:t,src:y,indexOrName:r,parentType:"array",parentPath:o}),k&&k({type:"delete",depth:t,src:y,indexOrName:r,parentType:"array",parentPath:o})},[M,P]=_.useState(!1),B=()=>{const Z=e;Z.push(null),x&&x({indexOrName:Z.length-1,depth:t,src:y,parentType:"array",parentPath:o}),k&&k({type:"add",indexOrName:Z.length-1,depth:t,src:y,parentType:"array",parentPath:o}),C()},$=j||M,G=()=>{R(!1),P(!1)},H=w.jsxs(w.Fragment,{children:[!O&&!$&&w.jsxs("span",Object.assign({onClick:()=>T(!0),className:"jv-size-chevron"},{children:[mu(A,t,O)&&w.jsxs("span",Object.assign({className:"jv-size"},{children:[e.length," Items"]})),w.jsx(Zw,{className:"jv-chevron"})]})),$&&w.jsx(Vw,{className:"json-view--edit",style:{display:"inline-block"},onClick:M?B:I}),$&&w.jsx(Yw,{className:"json-view--edit",style:{display:"inline-block"},onClick:G}),!O&&!$&&h&&tv(i)&&w.jsx(nv,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:a,parentPath:o,currentPath:u}}),!O&&!$&&p5(v)&&m5(i)&&w.jsx(v5,{className:"json-view--edit",onClick:()=>{B()}}),!O&&!$&&qw(v)&&Hw(i)&&n&&w.jsx(Kw,{className:"json-view--edit",onClick:()=>R(!0)}),typeof E=="function"?w.jsx(E,{node:e}):null]});return w.jsxs(w.Fragment,{children:[w.jsx("span",{children:"["}),H,O?w.jsx("button",Object.assign({onClick:()=>T(!1),className:"jv-button"},{children:"..."})):w.jsx("div",Object.assign({className:"jv-indent"},{children:c.map((Z,U)=>w.jsx(ZK,{originNode:e,node:Z,depth:t,index:U,startIndex:U*100,deleteHandle:n,customOptions:i,parentPath:o},String(r)+String(U)))})),w.jsx("span",{children:"]"}),O&&mu(A,t,O)&&w.jsxs("span",Object.assign({onClick:()=>T(!1),className:"jv-size"},{children:[e.length," Items"]}))]})}function VK({node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:i,parent:a,parentPath:o}){const{collapsed:u,onCollapse:c,enableClipboard:f,ignoreLargeArray:h,collapseObjectsAfterLength:p,editable:v,onDelete:g,src:y,onAdd:x,onEdit:E,onChange:k,forceUpdate:C,displaySize:A,CustomOperation:O}=_.useContext(Vl),T=typeof n<"u"?[...o,String(n)]:o;if(!h&&Array.isArray(e)&&e.length>100)return w.jsx(KK,{node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:i,parentPath:T});const j=Kl(e),[R,I]=_.useState(JC(e,t,n,u,p,i)),M=D=>{c?.({isCollapsing:!D,node:e,depth:t,indexOrName:n}),I(D)};_.useEffect(()=>{M(JC(e,t,n,u,p,i))},[u,p]);const P=_.useCallback((D,re,ne)=>{Array.isArray(e)?e[+D]=re:e&&(e[D]=re),E&&E({newValue:re,oldValue:ne,depth:t,src:y,indexOrName:D,parentType:j?"object":"array",parentPath:T}),k&&k({type:"edit",depth:t,src:y,indexOrName:D,parentType:j?"object":"array",parentPath:T}),C()},[e,E,k,C]),B=D=>{Array.isArray(e)?e.splice(+D,1):e&&delete e[D],C()},[$,G]=_.useState(!1),H=()=>{G(!1),r&&r(n,T),g&&g({value:e,depth:t,src:y,indexOrName:n,parentType:j?"object":"array",parentPath:T}),k&&k({type:"delete",depth:t,src:y,indexOrName:n,parentType:j?"object":"array",parentPath:T})},[Z,U]=_.useState(!1),q=_.useRef(null),K=()=>{var D;if(j){const re=(D=q.current)===null||D===void 0?void 0:D.value;re&&(e[re]=null,q.current&&(q.current.value=""),U(!1),x&&x({indexOrName:re,depth:t,src:y,parentType:"object",parentPath:T}),k&&k({type:"add",indexOrName:re,depth:t,src:y,parentType:"object",parentPath:T}))}else if(Array.isArray(e)){const re=e;re.push(null),x&&x({indexOrName:re.length-1,depth:t,src:y,parentType:"array",parentPath:T}),k&&k({type:"add",indexOrName:re.length-1,depth:t,src:y,parentType:"array",parentPath:T})}C()},Q=D=>{D.key==="Enter"?(D.preventDefault(),K()):D.key==="Escape"&&F()},z=$||Z,F=()=>{G(!1),U(!1)},V=w.jsxs(w.Fragment,{children:[!R&&!z&&w.jsxs("span",Object.assign({onClick:()=>M(!0),className:"jv-size-chevron"},{children:[mu(A,t,R)&&w.jsxs("span",Object.assign({className:"jv-size"},{children:[bf(e)," Items"]})),w.jsx(Zw,{className:"jv-chevron"})]})),Z&&j&&w.jsx("input",{className:"json-view--input",placeholder:"property",ref:q,onKeyDown:Q}),z&&w.jsx(Vw,{className:"json-view--edit",style:{display:"inline-block"},onClick:Z?K:H}),z&&w.jsx(Yw,{className:"json-view--edit",style:{display:"inline-block"},onClick:F}),!R&&!z&&f&&tv(i)&&w.jsx(nv,{node:e,nodeMeta:{depth:t,indexOrName:n,parent:a,parentPath:o,currentPath:T}}),!R&&!z&&p5(v)&&m5(i)&&w.jsx(v5,{className:"json-view--edit",onClick:()=>{j?(U(!0),setTimeout(()=>{var D;return(D=q.current)===null||D===void 0?void 0:D.focus()})):K()}}),!R&&!z&&qw(v)&&Hw(i)&&r&&w.jsx(Kw,{className:"json-view--edit",onClick:()=>G(!0)}),typeof O=="function"?w.jsx(O,{node:e}):null]});return Array.isArray(e)?w.jsxs(w.Fragment,{children:[w.jsx("span",{children:"["}),V,R?w.jsx("button",Object.assign({onClick:()=>M(!1),className:"jv-button"},{children:"..."})):w.jsx("div",Object.assign({className:"jv-indent"},{children:e.map((D,re)=>w.jsx(Qb,{indexOrName:re,value:D,depth:t,parent:e,deleteHandle:B,editHandle:P,parentPath:T},String(n)+String(re)))})),w.jsx("span",{children:"]"}),R&&mu(A,t,R)&&w.jsxs("span",Object.assign({onClick:()=>M(!1),className:"jv-size"},{children:[bf(e)," Items"]}))]}):j?w.jsxs(w.Fragment,{children:[w.jsx("span",{children:"{"}),V,R?w.jsx("button",Object.assign({onClick:()=>M(!1),className:"jv-button"},{children:"..."})):w.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(e).map(([D,re])=>w.jsx(Qb,{indexOrName:D,value:re,depth:t,parent:e,deleteHandle:B,editHandle:P,parentPath:T},String(n)+String(D)))})),w.jsx("span",{children:"}"}),R&&mu(A,t,R)&&w.jsxs("span",Object.assign({onClick:()=>M(!1),className:"jv-size"},{children:[bf(e)," Items"]}))]}):w.jsx("span",{children:String(e)})}const YK=rP.forwardRef(({str:e,className:t,ctrlClick:n},r)=>{let{collapseStringMode:i,collapseStringsAfterLength:a,customizeCollapseStringUI:o}=_.useContext(Vl);const[u,c]=_.useState(!0),f=_.useRef(null);a=a>0?a:0;const h=e.replace(/\s+/g," "),p=typeof o=="function"?o(h,u):typeof o=="string"?o:"...",v=g=>{var y;if((g.ctrlKey||g.metaKey)&&n)n(g);else{const x=window.getSelection();if(x&&x.anchorOffset!==x.focusOffset&&((y=x.anchorNode)===null||y===void 0?void 0:y.parentElement)===f.current)return;c(!u)}};if(e.length<=a)return w.jsxs("span",Object.assign({ref:f,className:t,onClick:n},{children:['"',e,'"']}));if(i==="address")return e.length<=10?w.jsxs("span",Object.assign({ref:f,className:t,onClick:n},{children:['"',e,'"']})):w.jsxs("span",Object.assign({ref:f,onClick:v,className:t+" cursor-pointer"},{children:['"',u?[h.slice(0,6),p,h.slice(-4)]:e,'"']}));if(i==="directly")return w.jsxs("span",Object.assign({ref:f,onClick:v,className:t+" cursor-pointer"},{children:['"',u?[h.slice(0,a),p]:e,'"']}));if(i==="word"){let g=a,y=a+1,x=h,E=1;for(;;){if(/\W/.test(e[g])){x=e.slice(0,g);break}if(/\W/.test(e[y])){x=e.slice(0,y);break}if(E===6){x=e.slice(0,a);break}E++,g--,y++}return w.jsxs("span",Object.assign({ref:f,onClick:v,className:t+" cursor-pointer"},{children:['"',u?[x,p]:e,'"']}))}return w.jsxs("span",Object.assign({ref:f,className:t},{children:['"',e,'"']}))});var mO;function rx(){return rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rx.apply(this,arguments)}var GK=function(t){return _.createElement("svg",rx({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),mO||(mO=_.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.754 3.754 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.754 3.754 0 0 0 17.25 3Zm2.25 14.25c0 1.24-1.01 2.25-2.25 2.25H6.75c-1.24 0-2.25-1.01-2.25-2.25V6.75c0-1.24 1.01-2.25 2.25-2.25h10.5c1.24 0 2.25 1.01 2.25 2.25v10.5Zm-6.09-9.466-5.031 5.03a2.981 2.981 0 0 0-.879 2.121v1.19c0 .415.336.75.75.75h1.19c.8 0 1.554-.312 2.12-.879l5.03-5.03a2.252 2.252 0 0 0 0-3.182c-.85-.85-2.331-.85-3.18 0Zm-2.91 7.151c-.28.28-.666.44-1.06.44H9v-.44c0-.4.156-.777.44-1.06l3.187-3.188 1.06 1.061-3.187 3.188Zm5.03-5.03-.782.783-1.06-1.061.782-.782a.766.766 0 0 1 1.06 0 .75.75 0 0 1 0 1.06Z"})))},vO,gO;function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ix.apply(this,arguments)}var WK=function(t){return _.createElement("svg",ix({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),vO||(vO=_.createElement("path",{fill:"currentColor",d:"M6.75 3h5.5v1.5h-5.5C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25v-5.5H21v5.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3Z"})),gO||(gO=_.createElement("path",{fill:"currentColor",d:"M20.013 3h-3.946a.987.987 0 0 0 0 1.973h1.564l-6.342 6.342a1.004 1.004 0 0 0 0 1.396 1.004 1.004 0 0 0 1.396 0l6.342-6.342v1.564a.987.987 0 0 0 1.973 0V3.987A.987.987 0 0 0 20.013 3Z"})))};function g5({node:e,depth:t,deleteHandle:n,indexOrName:r,parent:i,editHandle:a,parentPath:o}){const{collapseStringsAfterLength:u,enableClipboard:c,editable:f,src:h,onDelete:p,onChange:v,customizeNode:g,matchesURL:y,urlRegExp:x,EditComponent:E,DoneComponent:k,CancelComponent:C,CustomOperation:A}=_.useContext(Vl);let O;if(typeof g=="function"&&(O=Uw(g,[{node:e,depth:t,indexOrName:r}])),O){if(_.isValidElement(O))return O;if(BK(O)){const T=O;return w.jsx(T,{node:e,depth:t,indexOrName:r})}}if(Array.isArray(e)||Kl(e))return w.jsx(VK,{parent:i,node:e,depth:t,indexOrName:r,deleteHandle:n,parentPath:o,customOptions:typeof O=="object"?O:void 0});{const T=typeof e,j=typeof r<"u"?[...o,String(r)]:o,[R,I]=_.useState(!1),[M,P]=_.useState(!1),B=_.useRef(null),$=()=>{I(!0),setTimeout(()=>{var D,re;(D=window.getSelection())===null||D===void 0||D.selectAllChildren(B.current),(re=B.current)===null||re===void 0||re.focus()})},G=_.useCallback(()=>{let D=B.current.innerText;try{const re=JSON.parse(D);a&&a(r,re,e,o)}catch{const ne=UK(T,D);a&&a(r,ne,e,o)}I(!1)},[a,r,e,o,T]),H=()=>{I(!1),P(!1)},Z=()=>{P(!1),n&&n(r,o),p&&p({value:e,depth:t,src:h,indexOrName:r,parentType:Array.isArray(i)?"array":"object",parentPath:o}),v&&v({depth:t,src:h,indexOrName:r,parentType:Array.isArray(i)?"array":"object",type:"delete",parentPath:o})},U=_.useCallback(D=>{D.key==="Enter"?(D.preventDefault(),G()):D.key==="Escape"&&H()},[G]),q=R||M,K=!q&&tO(f)&&nO(O)&&a?D=>{(D.ctrlKey||D.metaKey)&&$()}:void 0,Q=w.jsxs(w.Fragment,{children:[q&&(typeof k=="function"?w.jsx(k,{className:"json-view--edit",style:{display:"inline-block"},onClick:M?Z:G}):w.jsx(Vw,{className:"json-view--edit",style:{display:"inline-block"},onClick:M?Z:G})),q&&(typeof C=="function"?w.jsx(C,{className:"json-view--edit",style:{display:"inline-block"},onClick:H}):w.jsx(Yw,{className:"json-view--edit",style:{display:"inline-block"},onClick:H})),!q&&c&&tv(O)&&w.jsx(nv,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:i,parentPath:o,currentPath:j}}),!q&&y&&T==="string"&&x.test(e)&&FK(O)&&w.jsx("a",Object.assign({href:e,target:"_blank",className:"json-view--link"},{children:w.jsx(WK,{})})),!q&&tO(f)&&nO(O)&&a&&(typeof E=="function"?w.jsx(E,{className:"json-view--edit",onClick:$}):w.jsx(GK,{className:"json-view--edit",onClick:$})),!q&&qw(f)&&Hw(O)&&n&&w.jsx(Kw,{className:"json-view--edit",onClick:()=>P(!0)}),typeof A=="function"?w.jsx(A,{node:e}):null]});let z="json-view--string";switch(T){case"number":case"bigint":z="json-view--number";break;case"boolean":z="json-view--boolean";break;case"object":z="json-view--null";break}typeof O?.className=="string"&&(z+=" "+O.className),M&&(z+=" json-view--deleting");let F=String(e);T==="bigint"&&(F+="n");const V=_.useMemo(()=>w.jsx("span",{contentEditable:!0,className:z,dangerouslySetInnerHTML:{__html:T==="string"?`"${F}"`:F},ref:B,onKeyDown:U}),[F,T,U]);return T==="string"?w.jsxs(w.Fragment,{children:[R?V:e.length>u?w.jsx(YK,{str:e,ref:B,className:z,ctrlClick:K}):w.jsxs("span",Object.assign({className:z,onClick:K},{children:['"',F,'"']})),Q]}):w.jsxs(w.Fragment,{children:[R?V:w.jsx("span",Object.assign({className:z,onClick:K},{children:F})),Q]})}}const y5=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,Vl=_.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",customizeCollapseStringUI:void 0,collapseObjectsAfterLength:20,collapsed:!1,onCollapse:void 0,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,customizeCopy:(()=>{}),displaySize:void 0,displayArrayIndex:!0,matchesURL:!1,urlRegExp:y5,ignoreLargeArray:!1,CopyComponent:void 0,CopiedComponent:void 0,EditComponent:void 0,CancelComponent:void 0,DoneComponent:void 0,CustomOperation:void 0});function XK({src:e,collapseStringsAfterLength:t=99,collapseStringMode:n="directly",customizeCollapseStringUI:r,collapseObjectsAfterLength:i=99,collapsed:a,onCollapse:o,enableClipboard:u=!0,editable:c=!1,onEdit:f,onDelete:h,onAdd:p,onChange:v,dark:g=!1,theme:y="default",customizeNode:x,customizeCopy:E=H=>LK(H),displaySize:k,displayArrayIndex:C=!0,style:A,className:O,matchesURL:T=!1,urlRegExp:j=y5,ignoreLargeArray:R=!1,CopyComponent:I,CopiedComponent:M,EditComponent:P,CancelComponent:B,DoneComponent:$,CustomOperation:G}){const[H,Z]=_.useState(0),U=_.useCallback(()=>Z(Q=>++Q),[]),[q,K]=_.useState(e);return _.useEffect(()=>K(e),[e]),w.jsx(Vl.Provider,Object.assign({value:{src:q,collapseStringsAfterLength:t,collapseStringMode:n,customizeCollapseStringUI:r,collapseObjectsAfterLength:i,collapsed:a,onCollapse:o,enableClipboard:u,editable:c,onEdit:f,onDelete:h,onAdd:p,onChange:v,forceUpdate:U,customizeNode:x,customizeCopy:E,displaySize:k,displayArrayIndex:C,matchesURL:T,urlRegExp:j,ignoreLargeArray:R,CopyComponent:I,CopiedComponent:M,EditComponent:P,CancelComponent:B,DoneComponent:$,CustomOperation:G}},{children:w.jsx("code",Object.assign({className:"json-view"+(g?" dark":"")+(y&&y!=="default"?" json-view_"+y:"")+(O?" "+O:""),style:A},{children:w.jsx(g5,{node:q,depth:1,editHandle:(Q,z,F,V)=>{K(z),f&&f({newValue:z,oldValue:F,depth:1,src:q,indexOrName:Q,parentType:null,parentPath:V}),v&&v({type:"edit",depth:1,src:q,indexOrName:Q,parentType:null,parentPath:V})},deleteHandle:(Q,z)=>{K(void 0),h&&h({value:q,depth:1,src:q,indexOrName:Q,parentType:null,parentPath:z}),v&&v({depth:1,src:q,indexOrName:Q,parentType:null,type:"delete",parentPath:z})},parentPath:[]})}))}))}function QK(e){const t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r);let o,u;const c=(i+a)/2;if(i===a)o=u=0;else{const f=i-a;switch(u=c>.5?f/(2-i-a):f/(i+a),i){case t:o=(n-r)/f+(n<r?6:0);break;case n:o=(r-t)/f+2;break;case r:o=(t-n)/f+4;break;default:o=0}o/=6}return{h:o*360,s:u*100,l:c*100}}function JK(e){const{l:t}=QK(e);return t>50}function eV(e){return JK(e)?"#000000":"#ffffff"}function tV(e){const t={};for(const[n,r]of Object.entries(e)){const i=eV(r),a=nV(r,i,i);t[n]={defaultHex:r,var:a.var,alpha:a.alpha,darker:a.darker,lighter:a.lighter,saturatedDarker:a.saturatedDarker,contrast:a.contrast}}return t}function nV(e,t,n){return{var:e,alpha:r=>`color-mix(in srgb, ${e} ${r*100}%, transparent)`,darker:r=>`color-mix(in srgb, ${e} ${(1-r)*100}%, #000)`,lighter:r=>`color-mix(in srgb, ${e} ${(1-r)*100}%, #fff)`,saturatedDarker:r=>`color-mix(in srgb, ${e} ${(1-r)*100}%, hsl(from ${e} h 100% 20%))`,contrast:{var:t,optimal:r=>r?.alpha?`color-mix(in srgb, ${n} ${r.alpha*100}%, transparent)`:n,alpha:r=>`color-mix(in srgb, ${t} ${r*100}%, transparent)`}}}new Proxy({},{get:(e,t)=>{throw new Error("styled cannot be called at runtime")}});function b5(...e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(r){if(typeof r=="string"||typeof r=="number")t.push(r);else if(typeof r=="object")for(let i=0,a=Object.keys(r);i<a.length;i++)r[a[i]]&&t.push(a[i])}}return t.join(" ")}function Gw(e,t){let n="";for(const r of e)if(typeof r=="string")n=r;else if(typeof r=="object"&&"className"in r){const i=r.className;typeof i=="string"&&(n=i)}return n?`${n} ${t}`:t}const yt=tV({bg:"#fcfcfc",bgElevated:"#f7f7f8",surface:"#f0f0f2",surfaceHover:"#ececee",surfaceActive:"#e4e4e7",border:"#e8e8eb",borderStrong:"#d4d4d8",text:"#0a0b0d",textMuted:"#6b6e76",textDim:"#a4a7af",accent:"#22d3ee",accentHover:"#06b6d4",accentDim:"#0e7490",accentInk:"#0a0b0d",success:"#16a34a",error:"#dc2626",warning:"#ea580c",cost:"#a16207",white:"#ffffff",black:"#000000"});function vr(e){const t=Be.c(26),{value:n,compact:r,maxHeight:i,collapsed:a,displaySize:o,collapseStringsAfterLength:u,collapseObjectsAfterLength:c,enableClipboard:f}=e,h=r===void 0?!1:r,p=a===void 0?!1:a,v=o===void 0?"collapsed":o,g=u===void 0?120:u,y=c===void 0?20:c,x=f===void 0?!0:f,E=_.useRef(null),[k,C]=_.useState(!1),[A,O]=_.useState(!1);let T;t[0]!==k||t[1]!==i?(T=()=>{if(!i||k)return;const Z=E.current;if(!Z)return;const U=()=>{O(Z.scrollHeight-Z.clientHeight>1)};U();const q=new ResizeObserver(U);return q.observe(Z),()=>q.disconnect()},t[0]=k,t[1]=i,t[2]=T):T=t[2];let j;t[3]!==k||t[4]!==i||t[5]!==n?(j=[i,k,n],t[3]=k,t[4]=i,t[5]=n,t[6]=j):j=t[6],_.useLayoutEffect(T,j);let R,I;t[7]!==i?(I=()=>{i||C(!1)},R=[i],t[7]=i,t[8]=R,t[9]=I):(R=t[8],I=t[9]),_.useEffect(I,R);const M=i!==void 0&&(A||k),P="vqnpbvz-2"+(h?" vh8ay32":"")+(i==="detail"?" v14y6o4h":"")+(i==="raw"?" valvosx":"")+(k?" vzt48hw":"");let B;t[10]!==y||t[11]!==g||t[12]!==p||t[13]!==v||t[14]!==x||t[15]!==n?(B=w.jsx(XK,{src:n,collapsed:p,displaySize:v,collapseStringsAfterLength:g,collapseObjectsAfterLength:y,enableClipboard:x}),t[10]=y,t[11]=g,t[12]=p,t[13]=v,t[14]=x,t[15]=n,t[16]=B):B=t[16];let $;t[17]!==P||t[18]!==B?($=w.jsx("div",{ref:E,className:P,children:B}),t[17]=P,t[18]=B,t[19]=$):$=t[19];let G;t[20]!==k||t[21]!==M?(G=M?w.jsx("button",{type:"button",onClick:()=>C(rV),"aria-expanded":k,className:"vqnpbvz-3",children:k?"Collapse":"Expand"}):null,t[20]=k,t[21]=M,t[22]=G):G=t[22];let H;return t[23]!==$||t[24]!==G?(H=w.jsxs("div",{className:"vqnpbvz-1",children:[$,G]}),t[23]=$,t[24]=G,t[25]=H):H=t[25],H}function rV(e){return!e}function x5(e){return e==="pass"?"pass":e==="fail"||e==="error"?"fail":e==="running"?"running":e==="cancelled"?"cancelled":e==="stale"?"stale":e==="outdated"?"outdated":e==="unscored"?"unscored":"pending"}function $l(e){const t=Be.c(6),{status:n}=e,r=x5(n),i="vno9i23-1"+(r==="pass"?" v1bls63k":"")+(r==="fail"?" v1843cka":"")+(r==="running"?" v1w33htl":"")+(r==="cancelled"?" v1o7znqr":"")+(r==="stale"?" v1ptx2rj":"")+(r==="outdated"?" vwlrmf0":"")+(r==="unscored"?" v1mlprpv":""),a="vno9i23-2"+(r==="pass"?" v1bls63k":"")+(r==="fail"?" v1843cka":"")+(r==="running"?" v1w33htl":"")+(r==="cancelled"?" v1o7znqr":"")+(r==="stale"?" v1ptx2rj":"")+(r==="outdated"?" vwlrmf0":"")+(r==="unscored"?" v1mlprpv":"");let o;t[0]!==a?(o=w.jsx("span",{className:a}),t[0]=a,t[1]=o):o=t[1];let u;return t[2]!==n||t[3]!==i||t[4]!==o?(u=w.jsxs("span",{className:i,children:[o,n]}),t[2]=n,t[3]=i,t[4]=o,t[5]=u):u=t[5],u}function Ww(e){const t=Be.c(2),{status:n}=e,r=x5(n),i="vno9i23-2"+(r==="pass"?" v1bls63k":"")+(r==="fail"?" v1843cka":"")+(r==="running"?" v1w33htl":"")+(r==="cancelled"?" v1o7znqr":"")+(r==="stale"?" v1ptx2rj":"")+(r==="outdated"?" vwlrmf0":"")+(r==="unscored"?" v1mlprpv":"");let a;return t[0]!==i?(a=w.jsx("span",{className:i}),t[0]=i,t[1]=a):a=t[1],a}function rv(){return typeof window<"u"}function Fu(e){return Xw(e)?(e.nodeName||"").toLowerCase():"#document"}function Nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function da(e){var t;return(t=(Xw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xw(e){return rv()?e instanceof Node||e instanceof Nr(e).Node:!1}function Gt(e){return rv()?e instanceof Element||e instanceof Nr(e).Element:!1}function ki(e){return rv()?e instanceof HTMLElement||e instanceof Nr(e).HTMLElement:!1}function ax(e){return!rv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nr(e).ShadowRoot}function ed(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=wi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function iV(e){return/^(table|td|th)$/.test(Fu(e))}function iv(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const aV=/transform|translate|scale|rotate|perspective|filter/,lV=/paint|layout|strict|content/,yo=e=>!!e&&e!=="none";let N0;function Qw(e){const t=Gt(e)?wi(e):e;return yo(t.transform)||yo(t.translate)||yo(t.scale)||yo(t.rotate)||yo(t.perspective)||!av()&&(yo(t.backdropFilter)||yo(t.filter))||aV.test(t.willChange||"")||lV.test(t.contain||"")}function oV(e){let t=Fa(e);for(;ki(t)&&!La(t);){if(Qw(t))return t;if(iv(t))return null;t=Fa(t)}return null}function av(){return N0==null&&(N0=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),N0}function La(e){return/^(html|body|#document)$/.test(Fu(e))}function wi(e){return Nr(e).getComputedStyle(e)}function lv(e){return Gt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fa(e){if(Fu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ax(e)&&e.host||da(e);return ax(t)?t.host:t}function w5(e){const t=Fa(e);return La(t)?e.ownerDocument?e.ownerDocument.body:e.body:ki(t)&&ed(t)?t:w5(t)}function Pl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=w5(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Nr(i);if(a){const u=lx(o);return t.concat(o,o.visualViewport||[],ed(i)?i:[],u&&n?Pl(u):[])}else return t.concat(i,Pl(i,[],n))}function lx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ip=Math.min,Do=Math.max,Lp=Math.round,Vh=Math.floor,na=e=>({x:e,y:e}),sV={left:"right",right:"left",bottom:"top",top:"bottom"};function yO(e,t,n){return Do(e,Ip(t,n))}function ov(e,t){return typeof e=="function"?e(t):e}function Fo(e){return e.split("-")[0]}function sv(e){return e.split("-")[1]}function S5(e){return e==="x"?"y":"x"}function E5(e){return e==="y"?"height":"width"}function jl(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function k5(e){return S5(jl(e))}function uV(e,t,n){n===void 0&&(n=!1);const r=sv(e),i=k5(e),a=E5(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=$p(o)),[o,$p(o)]}function cV(e){const t=$p(e);return[ox(e),t,ox(t)]}function ox(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const bO=["left","right"],xO=["right","left"],fV=["top","bottom"],dV=["bottom","top"];function hV(e,t,n){switch(e){case"top":case"bottom":return n?t?xO:bO:t?bO:xO;case"left":case"right":return t?fV:dV;default:return[]}}function pV(e,t,n,r){const i=sv(e);let a=hV(Fo(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(ox)))),a}function $p(e){const t=Fo(e);return sV[t]+e.slice(t.length)}function mV(e){return{top:0,right:0,bottom:0,left:0,...e}}function vV(e){return typeof e!="number"?mV(e):{top:e,right:e,bottom:e,left:e}}function Bp(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var gV=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],sx=gV.join(","),_5=typeof Element>"u",Tf=_5?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fp=!_5&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Up=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",o=a||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Up(t.parentNode));return o},yV=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},bV=function(t,n,r){if(Up(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(sx));return n&&Tf.call(t,sx)&&i.unshift(t),i=i.filter(r),i},ux=function(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!Up(o,!1))if(o.tagName==="SLOT"){var u=o.assignedElements(),c=u.length?u:o.children,f=ux(c,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:o,candidates:f})}else{var h=Tf.call(o,sx);h&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var p=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),v=!Up(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(p&&v){var g=ux(p===!0?o.children:p.children,!0,r);r.flatten?i.push.apply(i,g):i.push({scopeParent:o,candidates:g})}else a.unshift.apply(a,o.children)}}return i},A5=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},C5=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||yV(t))&&!A5(t)?0:t.tabIndex},xV=function(t,n){var r=C5(t);return r<0&&n&&!A5(t)?0:r},wV=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},O5=function(t){return t.tagName==="INPUT"},SV=function(t){return O5(t)&&t.type==="hidden"},EV=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},kV=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},_V=function(t){if(!t.name)return!0;var n=t.form||Fp(t),r=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=kV(i,t.form);return!a||a===t},AV=function(t){return O5(t)&&t.type==="radio"},CV=function(t){return AV(t)&&!_V(t)},OV=function(t){var n,r=t&&Fp(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var o,u,c;for(a=!!((o=i)!==null&&o!==void 0&&(u=o.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!a&&i;){var f,h,p;r=Fp(i),i=(f=r)===null||f===void 0?void 0:f.host,a=!!((h=i)!==null&&h!==void 0&&(p=h.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return a},wO=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},jV=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var a=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(t).visibility==="hidden")return!0;var o=Tf.call(t,"details>summary:first-of-type"),u=o?t.parentElement:t;if(Tf.call(u,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var c=t;t;){var f=t.parentElement,h=Fp(t);if(f&&!f.shadowRoot&&i(f)===!0)return wO(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=c}if(OV(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return wO(t);return!1},TV=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Tf.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},NV=function(t,n){return!(n.disabled||SV(n)||jV(n,t)||EV(n)||TV(n))},SO=function(t,n){return!(CV(n)||C5(n)<0||!NV(t,n))},RV=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},j5=function(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,u=o?i.scopeParent:i,c=xV(u,o),f=o?j5(i.candidates):u;c===0?o?n.push.apply(n,f):n.push(u):r.push({documentOrder:a,tabIndex:c,item:i,isScope:o,content:f})}),r.sort(wV).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},T5=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ux([t],n.includeContainer,{filter:SO.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:RV}):r=bV(t,n.includeContainer,SO.bind(null,n)),j5(r)};function PV(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function MV(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function N5(){return/apple/i.test(navigator.vendor)}function DV(){return PV().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function zV(){return MV().includes("jsdom/")}const EO="data-floating-ui-focusable",IV="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function cx(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Cu(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ax(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function lu(e){return"composedPath"in e?e.composedPath()[0]:e.target}function R0(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function LV(e){return e.matches("html,body")}function Ji(e){return e?.ownerDocument||document}function $V(e){return ki(e)&&e.matches(IV)}function BV(e){if(!e||zV())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function FV(e){return e?e.hasAttribute(EO)?e:e.querySelector("["+EO+"]")||e:null}function xp(e,t,n){return n===void 0&&(n=!0),e.filter(i=>{var a;return i.parentId===t&&(!n||((a=i.context)==null?void 0:a.open))}).flatMap(i=>[i,...xp(e,i.id,n)])}function UV(e){return"nativeEvent"in e}function fx(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}var qV=typeof document<"u",HV=function(){},xi=qV?_.useLayoutEffect:HV;const ZV={...jw};function Tl(e){const t=_.useRef(e);return xi(()=>{t.current=e}),t}const KV=ZV.useInsertionEffect,VV=KV||(e=>e());function Qi(e){const t=_.useRef(()=>{});return VV(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const R5=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function P5(e,t){const n=T5(e,R5()),r=n.length;if(r===0)return;const i=cx(Ji(e)),a=n.indexOf(i),o=a===-1?t===1?0:r-1:a+t;return n[o]}function YV(e){return P5(Ji(e).body,1)||e}function GV(e){return P5(Ji(e).body,-1)||e}function P0(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Cu(n,r)}function WV(e){T5(e,R5()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function kO(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function _O(e,t,n){let{reference:r,floating:i}=e;const a=jl(t),o=k5(t),u=E5(o),c=Fo(t),f=a==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,v=r[u]/2-i[u]/2;let g;switch(c){case"top":g={x:h,y:r.y-i.height};break;case"bottom":g={x:h,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-i.width,y:p};break;default:g={x:r.x,y:r.y}}switch(sv(t)){case"start":g[o]-=v*(n&&f?-1:1);break;case"end":g[o]+=v*(n&&f?-1:1);break}return g}async function XV(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:u,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:v=!1,padding:g=0}=ov(t,e),y=vV(g),E=u[v?p==="floating"?"reference":"floating":p],k=Bp(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(E)))==null||n?E:E.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:c})),C=p==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),O=await(a.isElement==null?void 0:a.isElement(A))?await(a.getScale==null?void 0:a.getScale(A))||{x:1,y:1}:{x:1,y:1},T=Bp(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:C,offsetParent:A,strategy:c}):C);return{top:(k.top-T.top+y.top)/O.y,bottom:(T.bottom-k.bottom+y.bottom)/O.y,left:(k.left-T.left+y.left)/O.x,right:(T.right-k.right+y.right)/O.x}}const QV=50,JV=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,u=o.detectOverflow?o:{...o,detectOverflow:XV},c=await(o.isRTL==null?void 0:o.isRTL(t));let f=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=_O(f,r,c),v=r,g=0;const y={};for(let x=0;x<a.length;x++){const E=a[x];if(!E)continue;const{name:k,fn:C}=E,{x:A,y:O,data:T,reset:j}=await C({x:h,y:p,initialPlacement:r,placement:v,strategy:i,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});h=A??h,p=O??p,y[k]={...y[k],...T},j&&g<QV&&(g++,typeof j=="object"&&(j.placement&&(v=j.placement),j.rects&&(f=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):j.rects),{x:h,y:p}=_O(f,v,c)),x=-1)}return{x:h,y:p,placement:v,strategy:i,middlewareData:y}},eY=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:u,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:x=!0,...E}=ov(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const k=Fo(i),C=jl(u),A=Fo(u)===u,O=await(c.isRTL==null?void 0:c.isRTL(f.floating)),T=v||(A||!x?[$p(u)]:cV(u)),j=y!=="none";!v&&j&&T.push(...pV(u,x,y,O));const R=[u,...T],I=await c.detectOverflow(t,E),M=[];let P=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&M.push(I[k]),p){const H=uV(i,o,O);M.push(I[H[0]],I[H[1]])}if(P=[...P,{placement:i,overflows:M}],!M.every(H=>H<=0)){var B,$;const H=(((B=a.flip)==null?void 0:B.index)||0)+1,Z=R[H];if(Z&&(!(p==="alignment"?C!==jl(Z):!1)||P.every(K=>jl(K.placement)===C?K.overflows[0]>0:!0)))return{data:{index:H,overflows:P},reset:{placement:Z}};let U=($=P.filter(q=>q.overflows[0]<=0).sort((q,K)=>q.overflows[1]-K.overflows[1])[0])==null?void 0:$.placement;if(!U)switch(g){case"bestFit":{var G;const q=(G=P.filter(K=>{if(j){const Q=jl(K.placement);return Q===C||Q==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(Q=>Q>0).reduce((Q,z)=>Q+z,0)]).sort((K,Q)=>K[1]-Q[1])[0])==null?void 0:G[0];q&&(U=q);break}case"initialPlacement":U=u;break}if(i!==U)return{reset:{placement:U}}}return{}}}},tY=new Set(["left","top"]);async function nY(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Fo(n),u=sv(n),c=jl(n)==="y",f=tY.has(o)?-1:1,h=a&&c?-1:1,p=ov(t,e);let{mainAxis:v,crossAxis:g,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof y=="number"&&(g=u==="end"?y*-1:y),c?{x:g*h,y:v*f}:{x:v*f,y:g*h}}const rY=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:u}=t,c=await nY(t,e);return o===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},iY=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:u=!1,limiter:c={fn:k=>{let{x:C,y:A}=k;return{x:C,y:A}}},...f}=ov(e,t),h={x:n,y:r},p=await a.detectOverflow(t,f),v=jl(Fo(i)),g=S5(v);let y=h[g],x=h[v];if(o){const k=g==="y"?"top":"left",C=g==="y"?"bottom":"right",A=y+p[k],O=y-p[C];y=yO(A,y,O)}if(u){const k=v==="y"?"top":"left",C=v==="y"?"bottom":"right",A=x+p[k],O=x-p[C];x=yO(A,x,O)}const E=c.fn({...t,[g]:y,[v]:x});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[g]:o,[v]:u}}}}}};function M5(e){const t=wi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ki(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,u=Lp(n)!==a||Lp(r)!==o;return u&&(n=a,r=o),{width:n,height:r,$:u}}function Jw(e){return Gt(e)?e:e.contextElement}function vu(e){const t=Jw(e);if(!ki(t))return na(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=M5(t);let o=(a?Lp(n.width):n.width)/r,u=(a?Lp(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const aY=na(0);function D5(e){const t=Nr(e);return!av()||!t.visualViewport?aY:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lY(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nr(e)?!1:t}function Uo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Jw(e);let o=na(1);t&&(r?Gt(r)&&(o=vu(r)):o=vu(e));const u=lY(a,n,r)?D5(a):na(0);let c=(i.left+u.x)/o.x,f=(i.top+u.y)/o.y,h=i.width/o.x,p=i.height/o.y;if(a){const v=Nr(a),g=r&&Gt(r)?Nr(r):r;let y=v,x=lx(y);for(;x&&r&&g!==y;){const E=vu(x),k=x.getBoundingClientRect(),C=wi(x),A=k.left+(x.clientLeft+parseFloat(C.paddingLeft))*E.x,O=k.top+(x.clientTop+parseFloat(C.paddingTop))*E.y;c*=E.x,f*=E.y,h*=E.x,p*=E.y,c+=A,f+=O,y=Nr(x),x=lx(y)}}return Bp({width:h,height:p,x:c,y:f})}function uv(e,t){const n=lv(e).scrollLeft;return t?t.left+n:Uo(da(e)).left+n}function z5(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-uv(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function oY(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=da(r),u=t?iv(t.floating):!1;if(r===o||u&&a)return n;let c={scrollLeft:0,scrollTop:0},f=na(1);const h=na(0),p=ki(r);if((p||!p&&!a)&&((Fu(r)!=="body"||ed(o))&&(c=lv(r)),p)){const g=Uo(r);f=vu(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}const v=o&&!p&&!a?z5(o,c):na(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+v.x,y:n.y*f.y-c.scrollTop*f.y+h.y+v.y}}function sY(e){return Array.from(e.getClientRects())}function uY(e){const t=da(e),n=lv(e),r=e.ownerDocument.body,i=Do(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Do(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+uv(e);const u=-n.scrollTop;return wi(r).direction==="rtl"&&(o+=Do(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:u}}const AO=25;function cY(e,t){const n=Nr(e),r=da(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,u=0,c=0;if(i){a=i.width,o=i.height;const h=av();(!h||h&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const f=uv(r);if(f<=0){const h=r.ownerDocument,p=h.body,v=getComputedStyle(p),g=h.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,y=Math.abs(r.clientWidth-p.clientWidth-g);y<=AO&&(a-=y)}else f<=AO&&(a+=f);return{width:a,height:o,x:u,y:c}}function fY(e,t){const n=Uo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ki(e)?vu(e):na(1),o=e.clientWidth*a.x,u=e.clientHeight*a.y,c=i*a.x,f=r*a.y;return{width:o,height:u,x:c,y:f}}function CO(e,t,n){let r;if(t==="viewport")r=cY(e,n);else if(t==="document")r=uY(da(e));else if(Gt(t))r=fY(t,n);else{const i=D5(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Bp(r)}function I5(e,t){const n=Fa(e);return n===t||!Gt(n)||La(n)?!1:wi(n).position==="fixed"||I5(n,t)}function dY(e,t){const n=t.get(e);if(n)return n;let r=Pl(e,[],!1).filter(u=>Gt(u)&&Fu(u)!=="body"),i=null;const a=wi(e).position==="fixed";let o=a?Fa(e):e;for(;Gt(o)&&!La(o);){const u=wi(o),c=Qw(o);!c&&u.position==="fixed"&&(i=null),(a?!c&&!i:!c&&u.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||ed(o)&&!c&&I5(e,o))?r=r.filter(h=>h!==o):i=u,o=Fa(o)}return t.set(e,r),r}function hY(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?iv(t)?[]:dY(t,this._c):[].concat(n),r],u=CO(t,o[0],i);let c=u.top,f=u.right,h=u.bottom,p=u.left;for(let v=1;v<o.length;v++){const g=CO(t,o[v],i);c=Do(g.top,c),f=Ip(g.right,f),h=Ip(g.bottom,h),p=Do(g.left,p)}return{width:f-p,height:h-c,x:p,y:c}}function pY(e){const{width:t,height:n}=M5(e);return{width:t,height:n}}function mY(e,t,n){const r=ki(t),i=da(t),a=n==="fixed",o=Uo(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const c=na(0);function f(){c.x=uv(i)}if(r||!r&&!a)if((Fu(t)!=="body"||ed(i))&&(u=lv(t)),r){const g=Uo(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else i&&f();a&&!r&&i&&f();const h=i&&!r&&!a?z5(i,u):na(0),p=o.left+u.scrollLeft-c.x-h.x,v=o.top+u.scrollTop-c.y-h.y;return{x:p,y:v,width:o.width,height:o.height}}function M0(e){return wi(e).position==="static"}function OO(e,t){if(!ki(e)||wi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return da(e)===n&&(n=n.ownerDocument.body),n}function L5(e,t){const n=Nr(e);if(iv(e))return n;if(!ki(e)){let i=Fa(e);for(;i&&!La(i);){if(Gt(i)&&!M0(i))return i;i=Fa(i)}return n}let r=OO(e,t);for(;r&&iV(r)&&M0(r);)r=OO(r,t);return r&&La(r)&&M0(r)&&!Qw(r)?n:r||oV(e)||n}const vY=async function(e){const t=this.getOffsetParent||L5,n=this.getDimensions,r=await n(e.floating);return{reference:mY(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gY(e){return wi(e).direction==="rtl"}const yY={convertOffsetParentRelativeRectToViewportRelativeRect:oY,getDocumentElement:da,getClippingRect:hY,getOffsetParent:L5,getElementRects:vY,getClientRects:sY,getDimensions:pY,getScale:vu,isElement:Gt,isRTL:gY};function $5(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bY(e,t){let n=null,r;const i=da(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function o(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),a();const f=e.getBoundingClientRect(),{left:h,top:p,width:v,height:g}=f;if(u||t(),!v||!g)return;const y=Vh(p),x=Vh(i.clientWidth-(h+v)),E=Vh(i.clientHeight-(p+g)),k=Vh(h),A={rootMargin:-y+"px "+-x+"px "+-E+"px "+-k+"px",threshold:Do(0,Ip(1,c))||1};let O=!0;function T(j){const R=j[0].intersectionRatio;if(R!==c){if(!O)return o();R?o(!1,R):r=setTimeout(()=>{o(!1,1e-7)},1e3)}R===1&&!$5(f,e.getBoundingClientRect())&&o(),O=!1}try{n=new IntersectionObserver(T,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,A)}n.observe(e)}return o(!0),a}function xY(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=Jw(e),h=i||a?[...f?Pl(f):[],...t?Pl(t):[]]:[];h.forEach(k=>{i&&k.addEventListener("scroll",n,{passive:!0}),a&&k.addEventListener("resize",n)});const p=f&&u?bY(f,n):null;let v=-1,g=null;o&&(g=new ResizeObserver(k=>{let[C]=k;C&&C.target===f&&g&&t&&(g.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var A;(A=g)==null||A.observe(t)})),n()}),f&&!c&&g.observe(f),t&&g.observe(t));let y,x=c?Uo(e):null;c&&E();function E(){const k=Uo(e);x&&!$5(x,k)&&n(),x=k,y=requestAnimationFrame(E)}return n(),()=>{var k;h.forEach(C=>{i&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),p?.(),(k=g)==null||k.disconnect(),g=null,c&&cancelAnimationFrame(y)}}const wY=rY,SY=iY,EY=eY,kY=(e,t,n)=>{const r=new Map,i={platform:yY,...n},a={...i.platform,_c:r};return JV(e,t,{...i,platform:a})};var _Y=typeof document<"u",AY=function(){},wp=_Y?_.useLayoutEffect:AY;function qp(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,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!qp(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!qp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function B5(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jO(e,t){const n=B5(e);return Math.round(t*n)/n}function D0(e){const t=_.useRef(e);return wp(()=>{t.current=e}),t}function CY(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:u=!0,whileElementsMounted:c,open:f}=e,[h,p]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,g]=_.useState(r);qp(v,r)||g(r);const[y,x]=_.useState(null),[E,k]=_.useState(null),C=_.useCallback(K=>{K!==j.current&&(j.current=K,x(K))},[]),A=_.useCallback(K=>{K!==R.current&&(R.current=K,k(K))},[]),O=a||y,T=o||E,j=_.useRef(null),R=_.useRef(null),I=_.useRef(h),M=c!=null,P=D0(c),B=D0(i),$=D0(f),G=_.useCallback(()=>{if(!j.current||!R.current)return;const K={placement:t,strategy:n,middleware:v};B.current&&(K.platform=B.current),kY(j.current,R.current,K).then(Q=>{const z={...Q,isPositioned:$.current!==!1};H.current&&!qp(I.current,z)&&(I.current=z,Qf.flushSync(()=>{p(z)}))})},[v,t,n,B,$]);wp(()=>{f===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,p(K=>({...K,isPositioned:!1})))},[f]);const H=_.useRef(!1);wp(()=>(H.current=!0,()=>{H.current=!1}),[]),wp(()=>{if(O&&(j.current=O),T&&(R.current=T),O&&T){if(P.current)return P.current(O,T,G);G()}},[O,T,G,P,M]);const Z=_.useMemo(()=>({reference:j,floating:R,setReference:C,setFloating:A}),[C,A]),U=_.useMemo(()=>({reference:O,floating:T}),[O,T]),q=_.useMemo(()=>{const K={position:n,left:0,top:0};if(!U.floating)return K;const Q=jO(U.floating,h.x),z=jO(U.floating,h.y);return u?{...K,transform:"translate("+Q+"px, "+z+"px)",...B5(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:z}},[n,u,U.floating,h.x,h.y]);return _.useMemo(()=>({...h,update:G,refs:Z,elements:U,floatingStyles:q}),[h,G,Z,U,q])}const OY=(e,t)=>{const n=wY(e);return{name:n.name,fn:n.fn,options:[e,t]}},jY=(e,t)=>{const n=SY(e);return{name:n.name,fn:n.fn,options:[e,t]}},TY=(e,t)=>{const n=EY(e);return{name:n.name,fn:n.fn,options:[e,t]}};function NY(e){const t=_.useRef(void 0),n=_.useCallback(r=>{const i=e.map(a=>{if(a!=null){if(typeof a=="function"){const o=a,u=o(r);return typeof u=="function"?u:()=>{o(null)}}return a.current=r,()=>{a.current=null}}});return()=>{i.forEach(a=>a?.())}},e);return _.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const RY="data-floating-ui-focusable",TO="active",NO="selected",PY={...jw};let RO=!1,MY=0;const PO=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+MY++;function DY(){const[e,t]=_.useState(()=>RO?PO():void 0);return xi(()=>{e==null&&t(PO())},[]),_.useEffect(()=>{RO=!0},[]),e}const zY=PY.useId,eS=zY||DY;function IY(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const LY=_.createContext(null),$Y=_.createContext(null),tS=()=>{var e;return((e=_.useContext(LY))==null?void 0:e.id)||null},nS=()=>_.useContext($Y);function td(e){return"data-floating-ui-"+e}function pi(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const MO=td("safe-polygon");function z0(e,t,n){if(n&&!fx(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function I0(e){return typeof e=="function"?e():e}function BY(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:u=!0,delay:c=0,handleClose:f=null,mouseOnly:h=!1,restMs:p=0,move:v=!0}=t,g=nS(),y=tS(),x=Tl(f),E=Tl(c),k=Tl(n),C=Tl(p),A=_.useRef(),O=_.useRef(-1),T=_.useRef(),j=_.useRef(-1),R=_.useRef(!0),I=_.useRef(!1),M=_.useRef(()=>{}),P=_.useRef(!1),B=Qi(()=>{var q;const K=(q=i.current.openEvent)==null?void 0:q.type;return K?.includes("mouse")&&K!=="mousedown"});_.useEffect(()=>{if(!u)return;function q(K){let{open:Q}=K;Q||(pi(O),pi(j),R.current=!0,P.current=!1)}return a.on("openchange",q),()=>{a.off("openchange",q)}},[u,a]),_.useEffect(()=>{if(!u||!x.current||!n)return;function q(Q){B()&&r(!1,Q,"hover")}const K=Ji(o.floating).documentElement;return K.addEventListener("mouseleave",q),()=>{K.removeEventListener("mouseleave",q)}},[o.floating,n,r,u,x,B]);const $=_.useCallback(function(q,K,Q){K===void 0&&(K=!0),Q===void 0&&(Q="hover");const z=z0(E.current,"close",A.current);z&&!T.current?(pi(O),O.current=window.setTimeout(()=>r(!1,q,Q),z)):K&&(pi(O),r(!1,q,Q))},[E,r]),G=Qi(()=>{M.current(),T.current=void 0}),H=Qi(()=>{if(I.current){const q=Ji(o.floating).body;q.style.pointerEvents="",q.removeAttribute(MO),I.current=!1}}),Z=Qi(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);_.useEffect(()=>{if(!u)return;function q(V){if(pi(O),R.current=!1,h&&!fx(A.current)||I0(C.current)>0&&!z0(E.current,"open"))return;const D=z0(E.current,"open",A.current);D?O.current=window.setTimeout(()=>{k.current||r(!0,V,"hover")},D):n||r(!0,V,"hover")}function K(V){if(Z()){H();return}M.current();const D=Ji(o.floating);if(pi(j),P.current=!1,x.current&&i.current.floatingContext){n||pi(O),T.current=x.current({...i.current.floatingContext,tree:g,x:V.clientX,y:V.clientY,onClose(){H(),G(),Z()||$(V,!0,"safe-polygon")}});const ne=T.current;D.addEventListener("mousemove",ne),M.current=()=>{D.removeEventListener("mousemove",ne)};return}(A.current!=="touch"||!Cu(o.floating,V.relatedTarget))&&$(V)}function Q(V){Z()||i.current.floatingContext&&(x.current==null||x.current({...i.current.floatingContext,tree:g,x:V.clientX,y:V.clientY,onClose(){H(),G(),Z()||$(V)}})(V))}function z(){pi(O)}function F(V){Z()||$(V,!1)}if(Gt(o.domReference)){const V=o.domReference,D=o.floating;return n&&V.addEventListener("mouseleave",Q),v&&V.addEventListener("mousemove",q,{once:!0}),V.addEventListener("mouseenter",q),V.addEventListener("mouseleave",K),D&&(D.addEventListener("mouseleave",Q),D.addEventListener("mouseenter",z),D.addEventListener("mouseleave",F)),()=>{n&&V.removeEventListener("mouseleave",Q),v&&V.removeEventListener("mousemove",q),V.removeEventListener("mouseenter",q),V.removeEventListener("mouseleave",K),D&&(D.removeEventListener("mouseleave",Q),D.removeEventListener("mouseenter",z),D.removeEventListener("mouseleave",F))}}},[o,u,e,h,v,$,G,H,r,n,k,g,E,x,i,Z,C]),xi(()=>{var q;if(u&&n&&(q=x.current)!=null&&(q=q.__options)!=null&&q.blockPointerEvents&&B()){I.current=!0;const Q=o.floating;if(Gt(o.domReference)&&Q){var K;const z=Ji(o.floating).body;z.setAttribute(MO,"");const F=o.domReference,V=g==null||(K=g.nodesRef.current.find(D=>D.id===y))==null||(K=K.context)==null?void 0:K.elements.floating;return V&&(V.style.pointerEvents=""),z.style.pointerEvents="none",F.style.pointerEvents="auto",Q.style.pointerEvents="auto",()=>{z.style.pointerEvents="",F.style.pointerEvents="",Q.style.pointerEvents=""}}}},[u,n,y,o,g,x,B]),xi(()=>{n||(A.current=void 0,P.current=!1,G(),H())},[n,G,H]),_.useEffect(()=>()=>{G(),pi(O),pi(j),H()},[u,o.domReference,G,H]);const U=_.useMemo(()=>{function q(K){A.current=K.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove(K){const{nativeEvent:Q}=K;function z(){!R.current&&!k.current&&r(!0,Q,"hover")}h&&!fx(A.current)||n||I0(C.current)===0||P.current&&K.movementX**2+K.movementY**2<2||(pi(j),A.current==="touch"?z():(P.current=!0,j.current=window.setTimeout(z,I0(C.current))))}}},[h,r,n,k,C]);return _.useMemo(()=>u?{reference:U}:{},[u,U])}const FY={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},DO=_.forwardRef(function(t,n){const[r,i]=_.useState();xi(()=>{N5()&&i("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[td("focus-guard")]:"",style:FY};return w.jsx("span",{...t,...a})}),UY={clipPath:"inset(50%)",position:"fixed",top:0,left:0},F5=_.createContext(null),zO=td("portal");function qY(e){e===void 0&&(e={});const{id:t,root:n}=e,r=eS(),i=ZY(),[a,o]=_.useState(null),u=_.useRef(null);return xi(()=>()=>{a?.remove(),queueMicrotask(()=>{u.current=null})},[a]),xi(()=>{if(!r||u.current)return;const c=t?document.getElementById(t):null;if(!c)return;const f=document.createElement("div");f.id=r,f.setAttribute(zO,""),c.appendChild(f),u.current=f,o(f)},[t,r]),xi(()=>{if(n===null||!r||u.current)return;let c=n||i?.portalNode;c&&!Xw(c)&&(c=c.current),c=c||document.body;let f=null;t&&(f=document.createElement("div"),f.id=t,c.appendChild(f));const h=document.createElement("div");h.id=r,h.setAttribute(zO,""),c=f||c,c.appendChild(h),u.current=h,o(h)},[t,n,r,i]),a}function HY(e){const{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=qY({id:n,root:r}),[o,u]=_.useState(null),c=_.useRef(null),f=_.useRef(null),h=_.useRef(null),p=_.useRef(null),v=o?.modal,g=o?.open,y=!!o&&!o.modal&&o.open&&i&&!!(r||a);return _.useEffect(()=>{if(!a||!i||v)return;function x(E){a&&P0(E)&&(E.type==="focusin"?kO:WV)(a)}return a.addEventListener("focusin",x,!0),a.addEventListener("focusout",x,!0),()=>{a.removeEventListener("focusin",x,!0),a.removeEventListener("focusout",x,!0)}},[a,i,v]),_.useEffect(()=>{a&&(g||kO(a))},[g,a]),w.jsxs(F5.Provider,{value:_.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:f,beforeInsideRef:h,afterInsideRef:p,portalNode:a,setFocusManagerState:u}),[i,a]),children:[y&&a&&w.jsx(DO,{"data-type":"outside",ref:c,onFocus:x=>{if(P0(x,a)){var E;(E=h.current)==null||E.focus()}else{const k=o?o.domReference:null,C=GV(k);C?.focus()}}}),y&&a&&w.jsx("span",{"aria-owns":a.id,style:UY}),a&&Qf.createPortal(t,a),y&&a&&w.jsx(DO,{"data-type":"outside",ref:f,onFocus:x=>{if(P0(x,a)){var E;(E=p.current)==null||E.focus()}else{const k=o?o.domReference:null,C=YV(k);C?.focus(),o?.closeOnFocusOut&&o?.onOpenChange(!1,x.nativeEvent,"focus-out")}}})]})}const ZY=()=>_.useContext(F5),KY={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},VY={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},IO=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function YY(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:u=!0,outsidePress:c=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:p="pointerdown",ancestorScroll:v=!1,bubbles:g,capture:y}=t,x=nS(),E=Qi(typeof c=="function"?c:()=>!1),k=typeof c=="function"?E:c,C=_.useRef(!1),{escapeKey:A,outsidePress:O}=IO(g),{escapeKey:T,outsidePress:j}=IO(y),R=_.useRef(!1),I=Qi(H=>{var Z;if(!n||!o||!u||H.key!=="Escape"||R.current)return;const U=(Z=a.current.floatingContext)==null?void 0:Z.nodeId,q=x?xp(x.nodesRef.current,U):[];if(!A&&(H.stopPropagation(),q.length>0)){let K=!0;if(q.forEach(Q=>{var z;if((z=Q.context)!=null&&z.open&&!Q.context.dataRef.current.__escapeKeyBubbles){K=!1;return}}),!K)return}r(!1,UV(H)?H.nativeEvent:H,"escape-key")}),M=Qi(H=>{var Z;const U=()=>{var q;I(H),(q=lu(H))==null||q.removeEventListener("keydown",U)};(Z=lu(H))==null||Z.addEventListener("keydown",U)}),P=Qi(H=>{var Z;const U=a.current.insideReactTree;a.current.insideReactTree=!1;const q=C.current;if(C.current=!1,f==="click"&&q||U||typeof k=="function"&&!k(H))return;const K=lu(H),Q="["+td("inert")+"]",z=Ji(i.floating).querySelectorAll(Q);let F=Gt(K)?K:null;for(;F&&!La(F);){const ne=Fa(F);if(La(ne)||!Gt(ne))break;F=ne}if(z.length&&Gt(K)&&!LV(K)&&!Cu(K,i.floating)&&Array.from(z).every(ne=>!Cu(F,ne)))return;if(ki(K)&&G){const ne=La(K),te=wi(K),fe=/auto|scroll/,ge=ne||fe.test(te.overflowX),ie=ne||fe.test(te.overflowY),le=ge&&K.clientWidth>0&&K.scrollWidth>K.clientWidth,ye=ie&&K.clientHeight>0&&K.scrollHeight>K.clientHeight,J=te.direction==="rtl",_e=ye&&(J?H.offsetX<=K.offsetWidth-K.clientWidth:H.offsetX>K.clientWidth),ke=le&&H.offsetY>K.clientHeight;if(_e||ke)return}const V=(Z=a.current.floatingContext)==null?void 0:Z.nodeId,D=x&&xp(x.nodesRef.current,V).some(ne=>{var te;return R0(H,(te=ne.context)==null?void 0:te.elements.floating)});if(R0(H,i.floating)||R0(H,i.domReference)||D)return;const re=x?xp(x.nodesRef.current,V):[];if(re.length>0){let ne=!0;if(re.forEach(te=>{var fe;if((fe=te.context)!=null&&fe.open&&!te.context.dataRef.current.__outsidePressBubbles){ne=!1;return}}),!ne)return}r(!1,H,"outside-press")}),B=Qi(H=>{var Z;const U=()=>{var q;P(H),(q=lu(H))==null||q.removeEventListener(f,U)};(Z=lu(H))==null||Z.addEventListener(f,U)});_.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=A,a.current.__outsidePressBubbles=O;let H=-1;function Z(z){r(!1,z,"ancestor-scroll")}function U(){window.clearTimeout(H),R.current=!0}function q(){H=window.setTimeout(()=>{R.current=!1},av()?5:0)}const K=Ji(i.floating);u&&(K.addEventListener("keydown",T?M:I,T),K.addEventListener("compositionstart",U),K.addEventListener("compositionend",q)),k&&K.addEventListener(f,j?B:P,j);let Q=[];return v&&(Gt(i.domReference)&&(Q=Pl(i.domReference)),Gt(i.floating)&&(Q=Q.concat(Pl(i.floating))),!Gt(i.reference)&&i.reference&&i.reference.contextElement&&(Q=Q.concat(Pl(i.reference.contextElement)))),Q=Q.filter(z=>{var F;return z!==((F=K.defaultView)==null?void 0:F.visualViewport)}),Q.forEach(z=>{z.addEventListener("scroll",Z,{passive:!0})}),()=>{u&&(K.removeEventListener("keydown",T?M:I,T),K.removeEventListener("compositionstart",U),K.removeEventListener("compositionend",q)),k&&K.removeEventListener(f,j?B:P,j),Q.forEach(z=>{z.removeEventListener("scroll",Z)}),window.clearTimeout(H)}},[a,i,u,k,f,n,r,v,o,A,O,I,T,M,P,j,B]),_.useEffect(()=>{a.current.insideReactTree=!1},[a,k,f]);const $=_.useMemo(()=>({onKeyDown:I,...h&&{[KY[p]]:H=>{r(!1,H.nativeEvent,"reference-press")},...p!=="click"&&{onClick(H){r(!1,H.nativeEvent,"reference-press")}}}}),[I,r,h,p]),G=_.useMemo(()=>{function H(Z){Z.button===0&&(C.current=!0)}return{onKeyDown:I,onMouseDown:H,onMouseUp:H,[VY[f]]:()=>{a.current.insideReactTree=!0}}},[I,f,a]);return _.useMemo(()=>o?{reference:$,floating:G}:{},[o,$,G])}function GY(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=eS(),a=_.useRef({}),[o]=_.useState(()=>IY()),u=tS()!=null,[c,f]=_.useState(r.reference),h=Qi((g,y,x)=>{a.current.openEvent=g?y:void 0,o.emit("openchange",{open:g,event:y,reason:x,nested:u}),n?.(g,y,x)}),p=_.useMemo(()=>({setPositionReference:f}),[]),v=_.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return _.useMemo(()=>({dataRef:a,open:t,onOpenChange:h,elements:v,events:o,floatingId:i,refs:p}),[t,h,v,o,i,p])}function WY(e){e===void 0&&(e={});const{nodeId:t}=e,n=GY({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=_.useState(null),[u,c]=_.useState(null),h=i?.domReference||a,p=_.useRef(null),v=nS();xi(()=>{h&&(p.current=h)},[h]);const g=CY({...e,elements:{...i,...u&&{reference:u}}}),y=_.useCallback(A=>{const O=Gt(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;c(O),g.refs.setReference(O)},[g.refs]),x=_.useCallback(A=>{(Gt(A)||A===null)&&(p.current=A,o(A)),(Gt(g.refs.reference.current)||g.refs.reference.current===null||A!==null&&!Gt(A))&&g.refs.setReference(A)},[g.refs]),E=_.useMemo(()=>({...g.refs,setReference:x,setPositionReference:y,domReference:p}),[g.refs,x,y]),k=_.useMemo(()=>({...g.elements,domReference:h}),[g.elements,h]),C=_.useMemo(()=>({...g,...r,refs:E,elements:k,nodeId:t}),[g,E,k,t,r]);return xi(()=>{r.dataRef.current.floatingContext=C;const A=v?.nodesRef.current.find(O=>O.id===t);A&&(A.context=C)}),_.useMemo(()=>({...g,context:C,refs:E,elements:k}),[g,E,k,C])}function L0(){return DV()&&N5()}function XY(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:u=!0,visibleOnly:c=!0}=t,f=_.useRef(!1),h=_.useRef(-1),p=_.useRef(!0);_.useEffect(()=>{if(!u)return;const g=Nr(o.domReference);function y(){!n&&ki(o.domReference)&&o.domReference===cx(Ji(o.domReference))&&(f.current=!0)}function x(){p.current=!0}function E(){p.current=!1}return g.addEventListener("blur",y),L0()&&(g.addEventListener("keydown",x,!0),g.addEventListener("pointerdown",E,!0)),()=>{g.removeEventListener("blur",y),L0()&&(g.removeEventListener("keydown",x,!0),g.removeEventListener("pointerdown",E,!0))}},[o.domReference,n,u]),_.useEffect(()=>{if(!u)return;function g(y){let{reason:x}=y;(x==="reference-press"||x==="escape-key")&&(f.current=!0)}return i.on("openchange",g),()=>{i.off("openchange",g)}},[i,u]),_.useEffect(()=>()=>{pi(h)},[]);const v=_.useMemo(()=>({onMouseLeave(){f.current=!1},onFocus(g){if(f.current)return;const y=lu(g.nativeEvent);if(c&&Gt(y)){if(L0()&&!g.relatedTarget){if(!p.current&&!$V(y))return}else if(!BV(y))return}r(!0,g.nativeEvent,"focus")},onBlur(g){f.current=!1;const y=g.relatedTarget,x=g.nativeEvent,E=Gt(y)&&y.hasAttribute(td("focus-guard"))&&y.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var k;const C=cx(o.domReference?o.domReference.ownerDocument:document);!y&&C===o.domReference||Cu((k=a.current.floatingContext)==null?void 0:k.refs.floating.current,C)||Cu(o.domReference,C)||E||r(!1,x,"focus")})}}),[a,o.domReference,r,c]);return _.useMemo(()=>u?{reference:v}:{},[u,v])}function $0(e,t,n){const r=new Map,i=n==="item";let a=e;if(i&&e){const{[TO]:o,[NO]:u,...c}=e;a=c}return{...n==="floating"&&{tabIndex:-1,[RY]:""},...a,...t.map(o=>{const u=o?o[n]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((o,u)=>(u&&Object.entries(u).forEach(c=>{let[f,h]=c;if(!(i&&[TO,NO].includes(f)))if(f.indexOf("on")===0){if(r.has(f)||r.set(f,[]),typeof h=="function"){var p;(p=r.get(f))==null||p.push(h),o[f]=function(){for(var v,g=arguments.length,y=new Array(g),x=0;x<g;x++)y[x]=arguments[x];return(v=r.get(f))==null?void 0:v.map(E=>E(...y)).find(E=>E!==void 0)}}}else o[f]=h}),o),{})}}function QY(e){e===void 0&&(e=[]);const t=e.map(u=>u?.reference),n=e.map(u=>u?.floating),r=e.map(u=>u?.item),i=_.useCallback(u=>$0(u,e,"reference"),t),a=_.useCallback(u=>$0(u,e,"floating"),n),o=_.useCallback(u=>$0(u,e,"item"),r);return _.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}const JY=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function eG(e,t){var n,r;t===void 0&&(t={});const{open:i,elements:a,floatingId:o}=e,{enabled:u=!0,role:c="dialog"}=t,f=eS(),h=((n=a.domReference)==null?void 0:n.id)||f,p=_.useMemo(()=>{var C;return((C=FV(a.floating))==null?void 0:C.id)||o},[a.floating,o]),v=(r=JY.get(c))!=null?r:c,y=tS()!=null,x=_.useMemo(()=>v==="tooltip"||c==="label"?{["aria-"+(c==="label"?"labelledby":"describedby")]:i?p:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":v==="alertdialog"?"dialog":v,"aria-controls":i?p:void 0,...v==="listbox"&&{role:"combobox"},...v==="menu"&&{id:h},...v==="menu"&&y&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[v,p,y,i,h,c]),E=_.useMemo(()=>{const C={id:p,...v&&{role:v}};return v==="tooltip"||c==="label"?C:{...C,...v==="menu"&&{"aria-labelledby":h}}},[v,p,h,c]),k=_.useCallback(C=>{let{active:A,selected:O}=C;const T={role:"option",...A&&{id:p+"-fui-option"}};switch(c){case"select":case"combobox":return{...T,"aria-selected":O}}return{}},[p,c]);return _.useMemo(()=>u?{reference:x,floating:E,item:k}:{},[u,x,E,k])}const LO=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ys(e,t){return typeof e=="function"?e(t):e}function tG(e,t){const[n,r]=_.useState(e);return e&&!n&&r(!0),_.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function nG(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,o=(typeof i=="number"?i:i.close)||0,[u,c]=_.useState("unmounted"),f=tG(n,o);return!f&&u==="close"&&c("unmounted"),xi(()=>{if(r){if(n){c("initial");const h=requestAnimationFrame(()=>{Qf.flushSync(()=>{c("open")})});return()=>{cancelAnimationFrame(h)}}c("close")}},[n,r]),{isMounted:f,status:u}}function rG(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:a,duration:o=250}=t,u=e.placement,c=u.split("-")[0],f=_.useMemo(()=>({side:c,placement:u}),[c,u]),h=typeof o=="number",p=(h?o:o.open)||0,v=(h?o:o.close)||0,[g,y]=_.useState(()=>({...Ys(a,f),...Ys(n,f)})),{isMounted:x,status:E}=nG(e,{duration:o}),k=Tl(n),C=Tl(r),A=Tl(i),O=Tl(a);return xi(()=>{const T=Ys(k.current,f),j=Ys(A.current,f),R=Ys(O.current,f),I=Ys(C.current,f)||Object.keys(T).reduce((M,P)=>(M[P]="",M),{});if(E==="initial"&&y(M=>({transitionProperty:M.transitionProperty,...R,...T})),E==="open"&&y({transitionProperty:Object.keys(I).map(LO).join(","),transitionDuration:p+"ms",...R,...I}),E==="close"){const M=j||T;y({transitionProperty:Object.keys(M).map(LO).join(","),transitionDuration:v+"ms",...R,...M})}},[v,A,k,C,O,p,E,f]),{isMounted:x,styles:g}}const On=({content:e,placement:t="top",children:n})=>{const[r,i]=_.useState(!1),{refs:a,floatingStyles:o,context:u}=WY({open:r,onOpenChange:i,placement:t,middleware:[OY(5),TY(),jY({padding:4})],whileElementsMounted:xY}),c=BY(u,{move:!1,delay:{open:400,close:0}}),f=XY(u),h=YY(u),p=eG(u,{role:"tooltip"}),{getReferenceProps:v,getFloatingProps:g}=QY([c,f,h,p]),y=v(),x=g(),{isMounted:E,styles:k}=rG(u,{duration:150,initial:{opacity:0}}),C=NY([a.setReference,n.props.ref]);return e?w.jsxs(w.Fragment,{children:[_.cloneElement(n,{ref:C,...y}),E&&w.jsx(HY,{children:w.jsx("div",{ref:a.setFloating,style:{...o,...k},...x,className:Gw([x],"v1fkevfp-1"),children:e})})]}):n},iG=3,aG=/0+$/;function lG(e){const t=e?.maxDecimalPlaces??iG;return{minimumFractionDigits:Math.min(e?.minDecimalPlaces??0,t),maximumFractionDigits:t}}function oG(e,t){const n=e.toFixed(t.maximumFractionDigits);if(t.minimumFractionDigits===0)return Number(n).toString();const[r="0",i=""]=n.split("."),o=i.replace(aG,"").padEnd(t.minimumFractionDigits,"0");return o.length>0?`${r}.${o}`:r}function nr(e,t=void 0){if(e==null)return"—";const n=lG(t),r=t?.notation==="compact"?new Intl.NumberFormat(void 0,{notation:"compact",compactDisplay:t.compactDisplay??"short",...n}).format(e):oG(e,n);return`${t?.prefix??""}${r}${t?.suffix??""}`}function qo(e,t){return e.format==="number"?nr(t,e.numberFormat):e.format==="duration"?Gn(t):e.format==="percent"?nd(t):e.format==="passFail"?cv(t):e.format==="stars"?iS(t,e.maxStars):e.isScore===!0?Nf(t):nr(t)}function Gn(e){if(e==null)return"—";if(e<1e3)return`${Math.round(e)}ms`;if(e<1e4)return`${(e/1e3).toFixed(2)}s`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;const t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return`${t}m ${n}s`}function Nf(e){return e==null?"—":e.toFixed(2)}function cv(e){return e==null?"—":e>=.5?"pass":"fail"}function Ou(e){return e===void 0||!Number.isFinite(e)?5:Math.max(2,Math.floor(e))}function rS(e,t){return e==null?null:Math.max(0,Math.min(Ou(t),Math.round(e*Ou(t))))}function sG(e,t){return Math.max(0,Math.min(1,e/Ou(t)))}function iS(e,t){const n=rS(e,t);return n===null?"—":`${n}/${String(Ou(t))}`}function nd(e){return e==null?"—":`${Math.round(e*100)}%`}function ju(e){const t=new Date(e),n=new Date,r=t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()&&t.getDate()===n.getDate(),i=t.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"});if(r)return`Today ${i}`;const a=new Date(n);return a.setDate(n.getDate()-1),t.getFullYear()===a.getFullYear()&&t.getMonth()===a.getMonth()&&t.getDate()===a.getDate()?`Yesterday ${i}`:`${t.toLocaleDateString(void 0,{month:"short",day:"numeric"})} ${i}`}const U5="—";function Vc(e){return typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):e===null?"null":e===void 0?U5:JSON.stringify(e)}function q5(e){const{rawValue:t,format:n,numberFormat:r}=e;return t===null?U5:n==="number"?typeof t=="number"&&Number.isFinite(t)?nr(t,r):Vc(t):n==="duration"?typeof t=="number"&&Number.isFinite(t)?Gn(t):Vc(t):n==="boolean"?typeof t=="boolean"?t?"Yes":"No":Vc(t):n==="json"?typeof t=="string"||typeof t=="number"?Vc(t):w.jsx(vr,{value:t,compact:!0,maxHeight:"raw",collapsed:6}):Vc(t)}function Gs(e){const t=Be.c(7),{label:n,data:r}=e;let i;t[0]!==n?(i=w.jsx("div",{className:"vaa4w49-21",children:n}),t[0]=n,t[1]=i):i=t[1];let a;t[2]!==r?(a=w.jsx(vr,{value:r,compact:!0,maxHeight:"raw",collapsed:6}),t[2]=r,t[3]=a):a=t[3];let o;return t[4]!==i||t[5]!==a?(o=w.jsxs("div",{className:"vaa4w49-20",children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function uG(e){if(!URL.canParse(e))return e;const t=new URL(e);return`${t.host}${t.pathname}${t.search}`}function H5(e){return`${e.label}-${e.placements.join(",")}`}function cG(e){if(e===null)return null;const t=e>=200&&e<300,n=e>=300&&e<400,r=e>=400;return w.jsx("span",{className:"vaa4w49-8"+(t?" vo1w49k":"")+(n?" vk87out":"")+(r?" vlmxlf9":""),children:e})}function fG(e){const t=Be.c(51),{entry:n}=e,[r,i]=_.useState(!1);let a;if(t[0]!==n.durationMs||t[1]!==n.error||t[2]!==n.errorPayload||t[3]!==n.headers||t[4]!==n.method||t[5]!==n.metrics||t[6]!==n.name||t[7]!==n.request||t[8]!==n.requestBody||t[9]!==n.response||t[10]!==n.responseBody||t[11]!==n.status||t[12]!==n.statusCode||t[13]!==n.url||t[14]!==n.warnings||t[15]!==r){const o=n.metrics.filter(gG),u=n.metrics.filter(vG);let c;t[17]!==n.durationMs?(c=n.durationMs===null?null:Gn(n.durationMs),t[17]=n.durationMs,t[18]=c):c=t[18];const f=c;let h;t[19]!==n.method?(h=n.method===null?null:n.method.toUpperCase(),t[19]=n.method,t[20]=h):h=t[20];const p=h;let v;t[21]!==n.url?(v=n.url===null?null:uG(n.url),t[21]=n.url,t[22]=v):v=t[22];const g=v;let y;t[23]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{i(mG)},t[23]=y):y=t[23];let x;t[24]!==r?(x=w.jsx("span",{className:"vaa4w49-3",children:r?w.jsx(Ll,{}):w.jsx(Zl,{})}),t[24]=r,t[25]=x):x=t[25];let E;t[26]!==n.name?(E=w.jsx("span",{className:"vaa4w49-4",children:n.name}),t[26]=n.name,t[27]=E):E=t[27];let k;t[28]!==n.status?(k=w.jsx($l,{status:n.status}),t[28]=n.status,t[29]=k):k=t[29];let C;t[30]!==p?(C=p!==null?w.jsx("span",{className:"vaa4w49-6",children:p}):null,t[30]=p,t[31]=C):C=t[31];let A;t[32]!==n.url||t[33]!==g?(A=g!==null?w.jsx(On,{content:n.url??void 0,children:w.jsx("span",{className:"vaa4w49-7",children:g})}):null,t[32]=n.url,t[33]=g,t[34]=A):A=t[34];let O;t[35]!==n.statusCode?(O=cG(n.statusCode),t[35]=n.statusCode,t[36]=O):O=t[36];let T;t[37]!==f?(T=f!==null?w.jsx("span",{children:f}):null,t[37]=f,t[38]=T):T=t[38];const j=o.map(pG);let R;t[39]!==A||t[40]!==O||t[41]!==T||t[42]!==j||t[43]!==k||t[44]!==C?(R=w.jsxs("span",{className:"vaa4w49-5",children:[k,C,A,O,T,j]}),t[39]=A,t[40]=O,t[41]=T,t[42]=j,t[43]=k,t[44]=C,t[45]=R):R=t[45];let I;t[46]!==r||t[47]!==R||t[48]!==x||t[49]!==E?(I=w.jsxs("button",{type:"button",onClick:y,"aria-expanded":r,className:"vaa4w49-2",children:[x,E,R]}),t[46]=r,t[47]=R,t[48]=x,t[49]=E,t[50]=I):I=t[50],a=w.jsxs("div",{className:"vaa4w49-1",children:[I,r?w.jsxs("div",{className:"vaa4w49-11",children:[n.url!==null||p!==null||n.statusCode!==null||f!==null?w.jsxs("div",{className:"vaa4w49-12",children:[p!==null?w.jsxs("div",{className:"vaa4w49-13",children:[w.jsx("span",{className:"vaa4w49-14",children:"Method"}),w.jsx("span",{className:"vaa4w49-15",children:p})]}):null,n.url!==null?w.jsxs("div",{className:"vaa4w49-13",children:[w.jsx("span",{className:"vaa4w49-14",children:"URL"}),w.jsx("span",{className:"vaa4w49-15",children:n.url})]}):null,n.statusCode!==null?w.jsxs("div",{className:"vaa4w49-13",children:[w.jsx("span",{className:"vaa4w49-14",children:"Status"}),w.jsx("span",{className:"vaa4w49-15",children:n.statusCode})]}):null,f!==null?w.jsxs("div",{className:"vaa4w49-13",children:[w.jsx("span",{className:"vaa4w49-14",children:"Duration"}),w.jsx("span",{className:"vaa4w49-15",children:f})]}):null]}):null,u.length>0?w.jsx("div",{className:"vaa4w49-19",children:u.map(hG)}):null,n.request!==void 0?w.jsx(Gs,{label:"Request",data:n.request}):null,n.requestBody!==void 0?w.jsx(Gs,{label:"Request body",data:n.requestBody}):null,n.response!==void 0?w.jsx(Gs,{label:"Response",data:n.response}):null,n.responseBody!==void 0?w.jsx(Gs,{label:"Response body",data:n.responseBody}):null,n.headers!==void 0?w.jsx(Gs,{label:"Headers",data:n.headers}):null,n.errorPayload!==void 0?w.jsx(Gs,{label:"Error",data:n.errorPayload}):null,n.warnings.map(dG),n.error!==null?w.jsxs("div",{className:"vaa4w49-22",children:[w.jsxs("div",{className:"vaa4w49-23",children:[n.error.name??"Error",": ",n.error.message]}),n.error.stack?w.jsx("pre",{className:"vaa4w49-24",children:n.error.stack}):null]}):null]}):null]}),t[0]=n.durationMs,t[1]=n.error,t[2]=n.errorPayload,t[3]=n.headers,t[4]=n.method,t[5]=n.metrics,t[6]=n.name,t[7]=n.request,t[8]=n.requestBody,t[9]=n.response,t[10]=n.responseBody,t[11]=n.status,t[12]=n.statusCode,t[13]=n.url,t[14]=n.warnings,t[15]=r,t[16]=a}else a=t[16];return a}function dG(e,t){return w.jsxs("div",{className:"vaa4w49-25",children:[w.jsxs("div",{className:"vaa4w49-26",children:[e.name??"Warning",": ",e.message]}),e.stack?w.jsx("pre",{className:"vaa4w49-24",children:e.stack}):null]},`${e.message}-${String(t)}`)}function hG(e){return w.jsxs("div",{className:"vaa4w49-16",children:[w.jsx(On,{content:e.tooltip,children:w.jsx("span",{className:"vaa4w49-17",children:e.label})}),w.jsx("span",{className:"vaa4w49-18",children:q5(e)})]},H5(e))}function pG(e){return w.jsx(On,{content:e.tooltip,children:w.jsxs("span",{className:"vaa4w49-9",children:[w.jsx("span",{className:"vaa4w49-10",children:e.label}),q5(e)]})},H5(e))}function mG(e){return!e}function vG(e){return e.placements.includes("body")}function gG(e){return e.placements.includes("header")}function Z5(e){const t=_.useRef(!1),[n,r]=_.useState(!1);return _.useMemo(()=>{async function i(...a){if(t.current)return null;t.current=!0,r(!0);try{return await e(...a)}finally{t.current=!1,r(!1)}}return{get isInProgress(){return t.current},call:i}},[e,n])}function K5(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function V5(e){return typeof e=="function"}function yG(e){return K5(e)&&"then"in e&&V5(e.then)}function $O(e){try{return JSON.stringify(e)}catch{return}}function B0(){return this.value}function bG(e){return this.ok?xf(e(this.value)):this}function xG(e){return this.ok?this:yu(e(this.error))}function Y5({ok:e,err:t}){return this.ok?xf(e(this.value)):yu(t(this.error))}function gu(){return this}function BO(e){return this.ok&&e(this.value),this}function FO(e){return this.ok||e(this.error),this}function xf(e=void 0){return{ok:!0,error:!1,value:e,...{unwrapOrNull:B0,unwrapOr:B0,unwrap:B0,mapOk:bG,mapErr:gu,mapOkAndErr:Y5,ifOk:BO,ifErr:gu,onOk:BO,onErr:gu}}}function yu(e){return{ok:!1,error:e,errorResult(){return yu(e)},...{unwrapOrNull:()=>null,unwrapOr:n=>n,unwrap:()=>{throw e instanceof Error?e:Sp(e)},mapOk:gu,mapErr:xG,mapOkAndErr:Y5,ifOk:gu,onOk:gu,ifErr:FO,onErr:FO}}}function it(e,t){if(!V5(e))return e.then(n=>xf(n)).catch(n=>yu(Sp(n)));try{const n=e();return yG(n)?n.then(r=>xf(r)).catch(r=>yu(t?t(r):Sp(r))):xf(n)}catch(n){return yu(Sp(n))}}function Sp(e){return e instanceof Error?e:typeof e=="string"?new Error(e):K5(e)?new Error("message"in e&&e.message&&typeof e.message=="string"?e.message:$O(e)??"unknown",{cause:e}):new Error($O(e)??"unknown",{cause:e})}function fv(e){const t=Be.c(14);let n,r,i,a,o,u;if(t[0]!==e){const{variant:f,leftIcon:h,rightIcon:p,children:v,...g}=e;r=h,i=p,n=v;const y=f===void 0?"secondary":f;a="button",o=g,u=b5(Gw([g],"v1yv3uow-1"),y==="primary"&&"v1d37md8",y==="secondary"&&"v1kpy128",y==="ghost"&&"vhmrut",y==="danger"&&"vs705h9"),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=u}else n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],u=t[6];let c;return t[7]!==n||t[8]!==r||t[9]!==i||t[10]!==a||t[11]!==o||t[12]!==u?(c=w.jsxs("button",{type:a,...o,className:u,children:[r,n,i]}),t[7]=n,t[8]=r,t[9]=i,t[10]=a,t[11]=o,t[12]=u,t[13]=c):c=t[13],c}function wG(e){return e.length<=14?e:`${e.slice(0,12)}…`}function UO(e){return`/api/cache/${encodeURIComponent(e.namespace)}/${encodeURIComponent(e.key)}`}function SG(e){const t=Be.c(70),{entry:n}=e,[r,i]=_.useState(!1);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={status:"idle"},t[0]=a):a=t[0];const[o,u]=_.useState(a),[c,f]=_.useState(null);let h;t[1]!==n||t[2]!==o.status?(h=async function(){if(o.status==="loading"||o.status==="loaded"||o.status==="deleted")return;u({status:"loading"});const ne=await it(()=>fetch(UO(n)));if(ne.error){u({status:"error",message:ne.error.message});return}const te=ne.value;if(!te.ok){u({status:"error",message:`cache entry not available (${String(te.status)})`});return}const fe=await it(()=>te.json());if(fe.error){u({status:"error",message:fe.error.message});return}const ge=it(()=>WH.parse(fe.value));if(ge.error){u({status:"error",message:ge.error.message});return}u({status:"loaded",entry:ge.value})},t[1]=n,t[2]=o.status,t[3]=h):h=t[3];const p=h;let v;t[4]!==n?(v=async()=>{if(!window.confirm("Delete this cached entry?"))return;f(null);const re=await it(()=>fetch(UO(n),{method:"DELETE"}));if(re.error){f(re.error.message);return}if(!re.value.ok&&re.value.status!==404){f(`cache entry could not be deleted (${String(re.value.status)})`);return}u({status:"deleted"})},t[4]=n,t[5]=v):v=t[5];const g=Z5(v);let y;t[6]!==r||t[7]!==p?(y=function(){if(r){i(!1);return}i(!0),p()},t[6]=r,t[7]=p,t[8]=y):y=t[8];const x=y;let E;t[9]!==n.age?(E=n.age!==void 0?Gn(n.age):null,t[9]=n.age,t[10]=E):E=t[10];const k=E,C=n.storedAt??(o.status==="loaded"?o.entry.storedAt:void 0),A=o.status==="loaded"?o.entry.recording.finalAttributes:null;let O;t[11]!==A?(O=A!==null&&Object.keys(A).length>0,t[11]=A,t[12]=O):O=t[12];const T=O;let j;t[13]!==r?(j=w.jsx("span",{className:"v1rexbf3-3",children:r?w.jsx(Ll,{}):w.jsx(Zl,{})}),t[13]=r,t[14]=j):j=t[14];const R="v1rexbf3-5"+(n.action==="hit"?" v1psnf3c":"")+(n.action==="added"?" v126sfoy":"");let I;t[15]!==n?(I=EG(n),t[15]=n,t[16]=I):I=t[16];let M;t[17]!==R||t[18]!==I?(M=w.jsx("span",{className:R,children:I}),t[17]=R,t[18]=I,t[19]=M):M=t[19];const P=n.source==="span"?"SPAN":"VALUE";let B;t[20]!==P?(B=w.jsx("span",{className:"v1rexbf3-4",children:P}),t[20]=P,t[21]=B):B=t[21];let $;t[22]!==n.name?($=w.jsx("span",{className:"v1rexbf3-6",children:n.name}),t[22]=n.name,t[23]=$):$=t[23];let G;t[24]!==n.origin?(G=n.origin==="caseRoot"?w.jsx("span",{className:"v1rexbf3-7",children:"(case root)"}):null,t[24]=n.origin,t[25]=G):G=t[25];let H;t[26]!==o.status?(H=o.status==="deleted"?w.jsx("span",{children:"deleted"}):null,t[26]=o.status,t[27]=H):H=t[27];let Z;t[28]!==k?(Z=k!==null?w.jsxs("span",{children:[k," old"]}):null,t[28]=k,t[29]=Z):Z=t[29];let U;t[30]!==n.action||t[31]!==n.status?(U=n.action==="added"&&n.status==="miss"?w.jsx("span",{children:"created"}):null,t[30]=n.action,t[31]=n.status,t[32]=U):U=t[32];let q;t[33]!==n.status?(q=n.status==="refresh"?w.jsx("span",{children:"refreshed"}):null,t[33]=n.status,t[34]=q):q=t[34];let K;t[35]!==n.key?(K=wG(n.key),t[35]=n.key,t[36]=K):K=t[36];let Q;t[37]!==K?(Q=w.jsx("span",{children:K}),t[37]=K,t[38]=Q):Q=t[38];let z;t[39]!==H||t[40]!==Z||t[41]!==U||t[42]!==q||t[43]!==Q?(z=w.jsxs("span",{className:"v1rexbf3-8",children:[H,Z,U,q,Q]}),t[39]=H,t[40]=Z,t[41]=U,t[42]=q,t[43]=Q,t[44]=z):z=t[44];let F;t[45]!==r||t[46]!==x||t[47]!==M||t[48]!==B||t[49]!==$||t[50]!==G||t[51]!==z||t[52]!==j?(F=w.jsxs("button",{type:"button",onClick:x,"aria-expanded":r,className:"v1rexbf3-2",children:[j,M,B,$,G,z]}),t[45]=r,t[46]=x,t[47]=M,t[48]=B,t[49]=$,t[50]=G,t[51]=z,t[52]=j,t[53]=F):F=t[53];let V;t[54]!==g||t[55]!==c||t[56]!==n.key||t[57]!==n.namespace||t[58]!==n.status||t[59]!==r||t[60]!==o.entry||t[61]!==o.message||t[62]!==o.status||t[63]!==A||t[64]!==T||t[65]!==C?(V=r?w.jsxs("div",{className:"v1rexbf3-9",children:[w.jsxs("div",{className:"v1rexbf3-10",children:[w.jsxs("span",{className:"v1rexbf3-11",children:[w.jsx("span",{className:"v1rexbf3-12",children:"NS"}),w.jsx("span",{className:"v1rexbf3-13",children:n.namespace})]}),C!==void 0?w.jsxs("span",{className:"v1rexbf3-11",children:[w.jsx("span",{className:"v1rexbf3-12",children:"STORED"}),w.jsx("span",{className:"v1rexbf3-13",children:ju(C)})]}):null,w.jsxs("span",{className:"v1rexbf3-11",children:[w.jsx("span",{className:"v1rexbf3-12",children:"STATUS"}),w.jsx("span",{className:"v1rexbf3-13",children:n.status})]}),w.jsxs("span",{className:"v1rexbf3-11",children:[w.jsx("span",{className:"v1rexbf3-12",children:"KEY"}),w.jsx("span",{className:"v1rexbf3-13",children:n.key})]})]}),o.status==="loading"?w.jsx("div",{className:"v1rexbf3-16",children:"Loading cached value…"}):null,o.status==="error"?w.jsxs("div",{className:"v1rexbf3-17",children:["Could not load cached value: ",o.message]}):null,c!==null?w.jsxs("div",{className:"v1rexbf3-17",children:["Could not delete cached value: ",c]}):null,o.status==="deleted"?w.jsx("div",{className:"v1rexbf3-16",children:"Cached entry deleted."}):null,o.status==="loaded"?w.jsxs(w.Fragment,{children:[o.entry.debugKey!==void 0?w.jsxs("div",{className:"v1rexbf3-14",children:[w.jsx("div",{className:"v1rexbf3-15",children:"Raw cache key"}),w.jsx(vr,{value:o.entry.debugKey.rawKey,compact:!0,maxHeight:"raw",collapsed:4})]}):null,w.jsxs("div",{className:"v1rexbf3-14",children:[w.jsx("div",{className:"v1rexbf3-15",children:"Cached return value"}),w.jsx(vr,{value:o.entry.recording.returnValue,compact:!0,maxHeight:"raw",collapsed:6})]}),T?w.jsxs("div",{className:"v1rexbf3-14",children:[w.jsx("div",{className:"v1rexbf3-15",children:"Replayed span attributes"}),w.jsx(vr,{value:A,compact:!0,maxHeight:"raw",collapsed:6})]}):null]}):null,w.jsx("div",{className:"v1rexbf3-18",children:w.jsx(fv,{variant:"danger",leftIcon:w.jsx(jK,{}),disabled:o.status==="deleted"||g.isInProgress,onClick:()=>{g.call()},children:o.status==="deleted"?"Deleted":"Delete cache entry"})})]}):null,t[54]=g,t[55]=c,t[56]=n.key,t[57]=n.namespace,t[58]=n.status,t[59]=r,t[60]=o.entry,t[61]=o.message,t[62]=o.status,t[63]=A,t[64]=T,t[65]=C,t[66]=V):V=t[66];let D;return t[67]!==F||t[68]!==V?(D=w.jsxs("div",{className:"v1rexbf3-1",children:[F,V]}),t[67]=F,t[68]=V,t[69]=D):D=t[69],D}function EG(e){return e.status==="hit"?"HIT":e.status==="refresh"?"REFRESHED":"ADDED"}function Ho(e){const t=Be.c(10);let n,r,i,a;if(t[0]!==e){const{children:u,size:c,...f}=e;n=u;const h=c===void 0?"sm":c;r="button",i=f,a=b5(Gw([f],"v4yt9wa-1"),h==="md"&&"van04w6"),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;return t[5]!==n||t[6]!==r||t[7]!==i||t[8]!==a?(o=w.jsx("button",{type:r,...i,className:a,children:n}),t[5]=n,t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}const dx={eval:"Execute",derive:"Derive",outputsSchema:"Outputs schema",scorer:"Scorer"},qO=220,kG=/[?#]/,_G=/\/$/;function AG(e){const t=["eval","derive","outputsSchema","scorer"],n=new Set(e.map(r=>r.phase));return t.filter(r=>n.has(r))}function CG(e){const t=Be.c(24),{logs:n,phases:r,selectedPhase:i,onPhaseChange:a,workspaceRoot:o}=e,u=String(n.length);let c;t[0]!==u?(c=w.jsxs("span",{className:"v1tlpqbe-2",children:[u," entries"]}),t[0]=u,t[1]=c):c=t[1];let f;t[2]!==a?(f=k=>{a(LG(k.currentTarget.value))},t[2]=a,t[3]=f):f=t[3];let h;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=w.jsx("option",{value:"all",children:"All phases"}),t[4]=h):h=t[4];let p;t[5]!==r?(p=r.map(OG),t[5]=r,t[6]=p):p=t[6];let v;t[7]!==i||t[8]!==f||t[9]!==p?(v=w.jsxs("select",{value:i,onChange:f,"aria-label":"Filter logs by phase",className:"v1tlpqbe-3",children:[h,p]}),t[7]=i,t[8]=f,t[9]=p,t[10]=v):v=t[10];let g;t[11]!==c||t[12]!==v?(g=w.jsxs("div",{className:"v1tlpqbe-1",children:[c,v]}),t[11]=c,t[12]=v,t[13]=g):g=t[13];let y;if(t[14]!==n||t[15]!==o){let k;t[17]!==o?(k=(C,A)=>w.jsx(jG,{entry:C,workspaceRoot:o},`${C.timestamp}-${String(A)}`),t[17]=o,t[18]=k):k=t[18],y=n.map(k),t[14]=n,t[15]=o,t[16]=y}else y=t[16];let x;t[19]!==y?(x=w.jsx("div",{className:"v1tlpqbe-4",children:y}),t[19]=y,t[20]=x):x=t[20];let E;return t[21]!==g||t[22]!==x?(E=w.jsxs(w.Fragment,{children:[g,x]}),t[21]=g,t[22]=x,t[23]=E):E=t[23],E}function OG(e){return w.jsx("option",{value:e,children:dx[e]},e)}function jG(e){const t=Be.c(41),{entry:n,workspaceRoot:r}=e,[i,a]=_.useState(!1),o=n.location;let u;if(t[0]!==n.args||t[1]!==n.level||t[2]!==n.message||t[3]!==n.phase||t[4]!==n.source||t[5]!==n.timestamp||t[6]!==n.truncated||t[7]!==i||t[8]!==o||t[9]!==r){const c=o?RG(o):void 0;let f;t[11]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a(TG),t[11]=f):f=t[11];let h;t[12]!==i?(h=w.jsx("span",{className:"v1tlpqbe-8",children:i?w.jsx(Ll,{}):w.jsx(Zl,{})}),t[12]=i,t[13]=h):h=t[13];const p="v1tlpqbe-11"+(n.level==="info"?" v1tefpko":"")+(n.level==="warn"?" vpsgjsu":"")+(n.level==="error"?" v10doxfa":"");let v;t[14]!==n.level||t[15]!==p?(v=w.jsx("span",{className:p,children:n.level}),t[14]=n.level,t[15]=p,t[16]=v):v=t[16];let g;t[17]!==n.message?(g=IG(n.message),t[17]=n.message,t[18]=g):g=t[18];let y;t[19]!==g?(y=w.jsx("span",{className:"v1tlpqbe-14",children:g}),t[19]=g,t[20]=y):y=t[20];let x;t[21]!==n.timestamp?(x=$G(n.timestamp),t[21]=n.timestamp,t[22]=x):x=t[22];let E;t[23]!==x?(E=w.jsx("span",{className:"v1tlpqbe-10",children:x}),t[23]=x,t[24]=E):E=t[24];const k=dx[n.phase],C=n.source?` / ${n.source}`:"";let A;t[25]!==k||t[26]!==C?(A=w.jsxs("span",{className:"v1tlpqbe-12",children:[k,C]}),t[25]=k,t[26]=C,t[27]=A):A=t[27];const O=c?w.jsx("span",{className:"v1tlpqbe-13",children:MG(c)}):null;let T;t[28]!==n.truncated?(T=n.truncated?w.jsx("span",{className:"v1tlpqbe-25",children:"truncated"}):null,t[28]=n.truncated,t[29]=T):T=t[29];let j;t[30]!==A||t[31]!==O||t[32]!==T||t[33]!==E?(j=w.jsxs("div",{className:"v1tlpqbe-9",children:[E,A,O,T]}),t[30]=A,t[31]=O,t[32]=T,t[33]=E,t[34]=j):j=t[34];let R;t[35]!==i||t[36]!==j||t[37]!==h||t[38]!==v||t[39]!==y?(R=w.jsx("div",{className:"v1tlpqbe-6",children:w.jsxs("button",{onClick:f,"aria-expanded":i,className:"v1tlpqbe-7",children:[h,v,y,j]})}),t[35]=i,t[36]=j,t[37]=h,t[38]=v,t[39]=y,t[40]=R):R=t[40],u=w.jsxs("div",{className:"v1tlpqbe-5",children:[R,i?w.jsxs("div",{className:"v1tlpqbe-18",children:[w.jsxs("div",{className:"v1tlpqbe-19",children:[w.jsxs("span",{className:"v1tlpqbe-20",children:[w.jsx("span",{className:"v1tlpqbe-22",children:"phase"}),w.jsx("span",{className:"v1tlpqbe-23",children:dx[n.phase]})]}),n.source?w.jsxs("span",{className:"v1tlpqbe-20",children:[w.jsx("span",{className:"v1tlpqbe-22",children:"source"}),w.jsx("span",{className:"v1tlpqbe-23",children:n.source})]}):null,w.jsxs("span",{className:"v1tlpqbe-20",children:[w.jsx("span",{className:"v1tlpqbe-22",children:"time"}),w.jsx("span",{className:"v1tlpqbe-23",children:n.timestamp})]}),c?w.jsxs("span",{className:"v1tlpqbe-21",children:[w.jsx("span",{className:"v1tlpqbe-22",children:"location"}),w.jsx("span",{className:"v1tlpqbe-24",children:DG(c,r)}),w.jsx(On,{content:"Open in editor",children:w.jsx(Ho,{"aria-label":"Open log location in editor",onClick:()=>{NG(c)},children:w.jsx(Bw,{})})})]}):null]}),n.args.length>0?w.jsxs("div",{className:"v1tlpqbe-16",children:[w.jsx("div",{className:"v1tlpqbe-17",children:"Arguments"}),w.jsx(vr,{value:n.args.length===1?n.args[0]:n.args,compact:!0,maxHeight:"raw",collapsed:1})]}):w.jsx("pre",{className:"v1tlpqbe-15",children:n.message})]}):null]}),t[0]=n.args,t[1]=n.level,t[2]=n.message,t[3]=n.phase,t[4]=n.source,t[5]=n.timestamp,t[6]=n.truncated,t[7]=i,t[8]=o,t[9]=r,t[10]=u}else u=t[10];return u}function TG(e){return!e}async function NG(e){await it(()=>fetch("/api/runs/actions/open-location",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}))}function RG(e){return{...e,file:PG(e.file)}}function PG(e){return e.split(kG,1)[0]??e}function MG(e){return e===void 0?"":`${e.file.split("/").at(-1)??e.file}:${String(e.line)}`}function DG(e,t){return e===void 0?"":`${zG(e.file,t)}:${String(e.line)}:${String(e.column)}`}function zG(e,t){if(t.length===0)return e;const n=e.replaceAll("\\","/"),r=t.replaceAll("\\","/").replace(_G,"");if(n===r)return".";const i=`${r}/`;return n.startsWith(i)?n.slice(i.length):e}function IG(e){const t=e.split(`
|
|
47
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of e.seen.entries()){const u=o[1];if(t===o[0]){a(o);continue}if(e.external){const f=e.external.registry.get(o[0])?.id;if(t!==o[0]&&f){a(o);continue}}if(e.metadataRegistry.get(o[0])?.id){a(o);continue}if(u.cycle){a(o);continue}if(u.count>1&&e.reused==="ref"){a(o);continue}}}function TP(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=o=>{const u=e.seen.get(o);if(u.ref===null)return;const c=u.def??u.schema,f={...c},h=u.ref;if(u.ref=null,h){r(h);const v=e.seen.get(h),g=v.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,f),o._zod.parent===h)for(const x in c)x==="$ref"||x==="allOf"||x in f||delete c[x];if(g.$ref&&v.def)for(const x in c)x==="$ref"||x==="allOf"||x in v.def&&JSON.stringify(c[x])===JSON.stringify(v.def[x])&&delete c[x]}const p=o._zod.parent;if(p&&p!==h){r(p);const v=e.seen.get(p);if(v?.schema.$ref&&(c.$ref=v.schema.$ref,v.def))for(const g in c)g==="$ref"||g==="allOf"||g in v.def&&JSON.stringify(c[g])===JSON.stringify(v.def[g])&&delete c[g]}e.override({zodSchema:o,jsonSchema:c,path:u.path??[]})};for(const o of[...e.seen.entries()].reverse())r(o[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(o)}Object.assign(i,n.def??n.schema);const a=e.external?.defs??{};for(const o of e.seen.entries()){const u=o[1];u.def&&u.defId&&(a[u.defId]=u.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:zp(t,"input",e.processors),output:zp(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function dr(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return dr(r.element,n);if(r.type==="set")return dr(r.valueType,n);if(r.type==="lazy")return dr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return dr(r.innerType,n);if(r.type==="intersection")return dr(r.left,n)||dr(r.right,n);if(r.type==="record"||r.type==="map")return dr(r.keyType,n)||dr(r.valueType,n);if(r.type==="pipe")return dr(r.in,n)||dr(r.out,n);if(r.type==="object"){for(const i in r.shape)if(dr(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(dr(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(dr(i,n))return!0;return!!(r.rest&&dr(r.rest,n))}return!1}const WU=(e,t={})=>n=>{const r=OP({...n,processors:t});return mn(e,r),jP(r,e),TP(r,e)},zp=(e,t,n={})=>r=>{const{libraryOptions:i,target:a}=r??{},o=OP({...i??{},target:a,io:t,processors:n});return mn(e,o),jP(o,e),TP(o,e)},XU={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},QU=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:a,maximum:o,format:u,patterns:c,contentEncoding:f}=e._zod.bag;if(typeof a=="number"&&(i.minLength=a),typeof o=="number"&&(i.maxLength=o),u&&(i.format=XU[u]??u,i.format===""&&delete i.format,u==="time"&&delete i.format),f&&(i.contentEncoding=f),c&&c.size>0){const h=[...c];h.length===1?i.pattern=h[0].source:h.length>1&&(i.allOf=[...h.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},JU=(e,t,n,r)=>{const i=n,{minimum:a,maximum:o,format:u,multipleOf:c,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof u=="string"&&u.includes("int")?i.type="integer":i.type="number",typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=h,i.exclusiveMinimum=!0):i.exclusiveMinimum=h),typeof a=="number"&&(i.minimum=a,typeof h=="number"&&t.target!=="draft-04"&&(h>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=f,i.exclusiveMaximum=!0):i.exclusiveMaximum=f),typeof o=="number"&&(i.maximum=o,typeof f=="number"&&t.target!=="draft-04"&&(f<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},eq=(e,t,n,r)=>{n.type="boolean"},tq=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},nq=(e,t,n,r)=>{n.not={}},rq=(e,t,n,r)=>{},iq=(e,t,n,r)=>{const i=e._zod.def,a=oP(i.entries);a.every(o=>typeof o=="number")&&(n.type="number"),a.every(o=>typeof o=="string")&&(n.type="string"),n.enum=a},aq=(e,t,n,r)=>{const i=e._zod.def,a=[];for(const o of i.values)if(o===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){const o=a[0];n.type=o===null?"null":typeof o,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[o]:n.const=o}else a.every(o=>typeof o=="number")&&(n.type="number"),a.every(o=>typeof o=="string")&&(n.type="string"),a.every(o=>typeof o=="boolean")&&(n.type="boolean"),a.every(o=>o===null)&&(n.type="null"),n.enum=a},lq=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},oq=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},sq=(e,t,n,r)=>{const i=n,a=e._zod.def,{minimum:o,maximum:u}=e._zod.bag;typeof o=="number"&&(i.minItems=o),typeof u=="number"&&(i.maxItems=u),i.type="array",i.items=mn(a.element,t,{...r,path:[...r.path,"items"]})},uq=(e,t,n,r)=>{const i=n,a=e._zod.def;i.type="object",i.properties={};const o=a.shape;for(const f in o)i.properties[f]=mn(o[f],t,{...r,path:[...r.path,"properties",f]});const u=new Set(Object.keys(o)),c=new Set([...u].filter(f=>{const h=a.shape[f]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type==="never"?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=mn(a.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},cq=(e,t,n,r)=>{const i=e._zod.def,a=i.inclusive===!1,o=i.options.map((u,c)=>mn(u,t,{...r,path:[...r.path,a?"oneOf":"anyOf",c]}));a?n.oneOf=o:n.anyOf=o},fq=(e,t,n,r)=>{const i=e._zod.def,a=mn(i.left,t,{...r,path:[...r.path,"allOf",0]}),o=mn(i.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,c=[...u(a)?a.allOf:[a],...u(o)?o.allOf:[o]];n.allOf=c},dq=(e,t,n,r)=>{const i=n,a=e._zod.def;i.type="object";const o=a.keyType,c=o._zod.bag?.patterns;if(a.mode==="loose"&&c&&c.size>0){const h=mn(a.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(const p of c)i.patternProperties[p.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=mn(a.keyType,t,{...r,path:[...r.path,"propertyNames"]})),i.additionalProperties=mn(a.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=o._zod.values;if(f){const h=[...f].filter(p=>typeof p=="string"||typeof p=="number");h.length>0&&(i.required=h)}},hq=(e,t,n,r)=>{const i=e._zod.def,a=mn(i.innerType,t,r),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},pq=(e,t,n,r)=>{const i=e._zod.def;mn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType},mq=(e,t,n,r)=>{const i=e._zod.def;mn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},vq=(e,t,n,r)=>{const i=e._zod.def;mn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},gq=(e,t,n,r)=>{const i=e._zod.def;mn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},yq=(e,t,n,r)=>{const i=e._zod.def,a=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;mn(a,t,r);const o=t.seen.get(e);o.ref=a},bq=(e,t,n,r)=>{const i=e._zod.def;mn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},NP=(e,t,n,r)=>{const i=e._zod.def;mn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType},xq=(e,t,n,r)=>{const i=e._zod.innerType;mn(i,t,r);const a=t.seen.get(e);a.ref=i},wq=pe("ZodISODateTime",(e,t)=>{vF.init(e,t),an.init(e,t)});function Sq(e){return kU(wq,e)}const Eq=pe("ZodISODate",(e,t)=>{gF.init(e,t),an.init(e,t)});function kq(e){return _U(Eq,e)}const _q=pe("ZodISOTime",(e,t)=>{yF.init(e,t),an.init(e,t)});function Aq(e){return AU(_q,e)}const Cq=pe("ZodISODuration",(e,t)=>{bF.init(e,t),an.init(e,t)});function Oq(e){return CU(Cq,e)}const jq=(e,t)=>{fP.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>sB(e,n)},flatten:{value:n=>oB(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Hb,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Hb,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ei=pe("ZodError",jq,{Parent:Error}),Tq=Pw(Ei),Nq=Mw(Ei),Rq=Gm(Ei),Pq=Wm(Ei),Mq=fB(Ei),Dq=dB(Ei),zq=hB(Ei),Iq=pB(Ei),Lq=mB(Ei),$q=vB(Ei),Bq=gB(Ei),Fq=yB(Ei),Qt=pe("ZodType",(e,t)=>(Xt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:zp(e,"input"),output:zp(e,"output")}}),e.toJSONSchema=WU(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ql(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Hl(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>Tq(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Rq(e,n,r),e.parseAsync=async(n,r)=>Nq(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Pq(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Mq(e,n,r),e.decode=(n,r)=>Dq(e,n,r),e.encodeAsync=async(n,r)=>zq(e,n,r),e.decodeAsync=async(n,r)=>Iq(e,n,r),e.safeEncode=(n,r)=>Lq(e,n,r),e.safeDecode=(n,r)=>$q(e,n,r),e.safeEncodeAsync=async(n,r)=>Bq(e,n,r),e.safeDecodeAsync=async(n,r)=>Fq(e,n,r),e.refine=(n,r)=>e.check(DH(n,r)),e.superRefine=n=>e.check(zH(n)),e.overwrite=n=>e.check($u(n)),e.optional=()=>HC(e),e.exactOptional=()=>SH(e),e.nullable=()=>ZC(e),e.nullish=()=>HC(ZC(e)),e.nonoptional=n=>OH(e,n),e.array=()=>ze(e),e.or=n=>rs([e,n]),e.and=n=>gH(e,n),e.transform=n=>Vb(e,DP(n)),e.default=n=>_H(e,n),e.prefault=n=>CH(e,n),e.catch=n=>TH(e,n),e.pipe=n=>Vb(e,n),e.readonly=()=>PH(e),e.describe=n=>{const r=e.clone();return df.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return df.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return df.get(e);const r=e.clone();return df.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),RP=pe("_ZodString",(e,t)=>{Dw.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(r,i,a)=>QU(e,r,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(MU(...r)),e.includes=(...r)=>e.check(IU(...r)),e.startsWith=(...r)=>e.check(LU(...r)),e.endsWith=(...r)=>e.check($U(...r)),e.min=(...r)=>e.check(Dp(...r)),e.max=(...r)=>e.check(AP(...r)),e.length=(...r)=>e.check(CP(...r)),e.nonempty=(...r)=>e.check(Dp(1,...r)),e.lowercase=r=>e.check(DU(r)),e.uppercase=r=>e.check(zU(r)),e.trim=()=>e.check(FU()),e.normalize=(...r)=>e.check(BU(...r)),e.toLowerCase=()=>e.check(UU()),e.toUpperCase=()=>e.check(qU()),e.slugify=()=>e.check(HU())}),Uq=pe("ZodString",(e,t)=>{Dw.init(e,t),RP.init(e,t),e.email=n=>e.check(rU(qq,n)),e.url=n=>e.check(sU(Hq,n)),e.jwt=n=>e.check(EU(aH,n)),e.emoji=n=>e.check(uU(Zq,n)),e.guid=n=>e.check(LC(UC,n)),e.uuid=n=>e.check(iU(Kh,n)),e.uuidv4=n=>e.check(aU(Kh,n)),e.uuidv6=n=>e.check(lU(Kh,n)),e.uuidv7=n=>e.check(oU(Kh,n)),e.nanoid=n=>e.check(cU(Kq,n)),e.guid=n=>e.check(LC(UC,n)),e.cuid=n=>e.check(fU(Vq,n)),e.cuid2=n=>e.check(dU(Yq,n)),e.ulid=n=>e.check(hU(Gq,n)),e.base64=n=>e.check(xU(nH,n)),e.base64url=n=>e.check(wU(rH,n)),e.xid=n=>e.check(pU(Wq,n)),e.ksuid=n=>e.check(mU(Xq,n)),e.ipv4=n=>e.check(vU(Qq,n)),e.ipv6=n=>e.check(gU(Jq,n)),e.cidrv4=n=>e.check(yU(eH,n)),e.cidrv6=n=>e.check(bU(tH,n)),e.e164=n=>e.check(SU(iH,n)),e.datetime=n=>e.check(Sq(n)),e.date=n=>e.check(kq(n)),e.time=n=>e.check(Aq(n)),e.duration=n=>e.check(Oq(n))});function W(e){return nU(Uq,e)}const an=pe("ZodStringFormat",(e,t)=>{tn.init(e,t),RP.init(e,t)}),qq=pe("ZodEmail",(e,t)=>{oF.init(e,t),an.init(e,t)}),UC=pe("ZodGUID",(e,t)=>{aF.init(e,t),an.init(e,t)}),Kh=pe("ZodUUID",(e,t)=>{lF.init(e,t),an.init(e,t)}),Hq=pe("ZodURL",(e,t)=>{sF.init(e,t),an.init(e,t)}),Zq=pe("ZodEmoji",(e,t)=>{uF.init(e,t),an.init(e,t)}),Kq=pe("ZodNanoID",(e,t)=>{cF.init(e,t),an.init(e,t)}),Vq=pe("ZodCUID",(e,t)=>{fF.init(e,t),an.init(e,t)}),Yq=pe("ZodCUID2",(e,t)=>{dF.init(e,t),an.init(e,t)}),Gq=pe("ZodULID",(e,t)=>{hF.init(e,t),an.init(e,t)}),Wq=pe("ZodXID",(e,t)=>{pF.init(e,t),an.init(e,t)}),Xq=pe("ZodKSUID",(e,t)=>{mF.init(e,t),an.init(e,t)}),Qq=pe("ZodIPv4",(e,t)=>{xF.init(e,t),an.init(e,t)}),Jq=pe("ZodIPv6",(e,t)=>{wF.init(e,t),an.init(e,t)}),eH=pe("ZodCIDRv4",(e,t)=>{SF.init(e,t),an.init(e,t)}),tH=pe("ZodCIDRv6",(e,t)=>{EF.init(e,t),an.init(e,t)}),nH=pe("ZodBase64",(e,t)=>{kF.init(e,t),an.init(e,t)}),rH=pe("ZodBase64URL",(e,t)=>{AF.init(e,t),an.init(e,t)}),iH=pe("ZodE164",(e,t)=>{CF.init(e,t),an.init(e,t)}),aH=pe("ZodJWT",(e,t)=>{jF.init(e,t),an.init(e,t)}),PP=pe("ZodNumber",(e,t)=>{wP.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(r,i,a)=>JU(e,r,i),e.gt=(r,i)=>e.check(BC(r,i)),e.gte=(r,i)=>e.check(C0(r,i)),e.min=(r,i)=>e.check(C0(r,i)),e.lt=(r,i)=>e.check($C(r,i)),e.lte=(r,i)=>e.check(A0(r,i)),e.max=(r,i)=>e.check(A0(r,i)),e.int=r=>e.check(qC(r)),e.safe=r=>e.check(qC(r)),e.positive=r=>e.check(BC(0,r)),e.nonnegative=r=>e.check(C0(0,r)),e.negative=r=>e.check($C(0,r)),e.nonpositive=r=>e.check(A0(0,r)),e.multipleOf=(r,i)=>e.check(FC(r,i)),e.step=(r,i)=>e.check(FC(r,i)),e.finite=()=>e;const 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 Ke(e){return OU(PP,e)}const lH=pe("ZodNumberFormat",(e,t)=>{TF.init(e,t),PP.init(e,t)});function qC(e){return jU(lH,e)}const oH=pe("ZodBoolean",(e,t)=>{NF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>eq(e,n,r)});function Yr(e){return TU(oH,e)}const sH=pe("ZodNull",(e,t)=>{RF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>tq(e,n,r)});function uH(e){return NU(sH,e)}const cH=pe("ZodUnknown",(e,t)=>{PF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>rq()});function tr(){return RU(cH)}const fH=pe("ZodNever",(e,t)=>{MF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>nq(e,n,r)});function dH(e){return PU(fH,e)}const hH=pe("ZodArray",(e,t)=>{DF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>sq(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(Dp(n,r)),e.nonempty=n=>e.check(Dp(1,n)),e.max=(n,r)=>e.check(AP(n,r)),e.length=(n,r)=>e.check(CP(n,r)),e.unwrap=()=>e.element});function ze(e,t){return ZU(hH,e,t)}const pH=pe("ZodObject",(e,t)=>{IF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>uq(e,n,r,i),mt(e,"shape",()=>t.shape),e.keyof=()=>Ve(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:tr()}),e.loose=()=>e.clone({...e._zod.def,catchall:tr()}),e.strict=()=>e.clone({...e._zod.def,catchall:dH()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>nB(e,n),e.safeExtend=n=>rB(e,n),e.merge=n=>iB(e,n),e.pick=n=>eB(e,n),e.omit=n=>tB(e,n),e.partial=(...n)=>aB(zP,e,n[0]),e.required=(...n)=>lB(IP,e,n[0])});function Se(e,t){const n={type:"object",shape:e??{},...Me(t)};return new pH(n)}const MP=pe("ZodUnion",(e,t)=>{kP.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>cq(e,n,r,i),e.options=t.options});function rs(e,t){return new MP({type:"union",options:e,...Me(t)})}const mH=pe("ZodDiscriminatedUnion",(e,t)=>{MP.init(e,t),LF.init(e,t)});function Qm(e,t,n){return new mH({type:"union",options:t,discriminator:e,...Me(n)})}const vH=pe("ZodIntersection",(e,t)=>{$F.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>fq(e,n,r,i)});function gH(e,t){return new vH({type:"intersection",left:e,right:t})}const yH=pe("ZodRecord",(e,t)=>{BF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>dq(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function Rr(e,t,n){return new yH({type:"record",keyType:e,valueType:t,...Me(n)})}const Kb=pe("ZodEnum",(e,t)=>{FF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(r,i,a)=>iq(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const a={};for(const o of r)if(n.has(o))a[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Kb({...t,checks:[],...Me(i),entries:a})},e.exclude=(r,i)=>{const a={...t.entries};for(const o of r)if(n.has(o))delete a[o];else throw new Error(`Key ${o} not found in enum`);return new Kb({...t,checks:[],...Me(i),entries:a})}});function Ve(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Kb({type:"enum",entries:n,...Me(t)})}const bH=pe("ZodLiteral",(e,t)=>{UF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>aq(e,n,r),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 nn(e,t){return new bH({type:"literal",values:Array.isArray(e)?e:[e],...Me(t)})}const xH=pe("ZodTransform",(e,t)=>{qF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>oq(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new aP(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(jf(a,n.value,t));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(jf(o))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(a=>(n.value=a,n)):(n.value=i,n)}});function DP(e){return new xH({type:"transform",transform:e})}const zP=pe("ZodOptional",(e,t)=>{_P.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>NP(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function HC(e){return new zP({type:"optional",innerType:e})}const wH=pe("ZodExactOptional",(e,t)=>{HF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>NP(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function SH(e){return new wH({type:"optional",innerType:e})}const EH=pe("ZodNullable",(e,t)=>{ZF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>hq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function ZC(e){return new EH({type:"nullable",innerType:e})}const kH=pe("ZodDefault",(e,t)=>{KF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>mq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function _H(e,t){return new kH({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():uP(t)}})}const AH=pe("ZodPrefault",(e,t)=>{VF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>vq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function CH(e,t){return new AH({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():uP(t)}})}const IP=pe("ZodNonOptional",(e,t)=>{YF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>pq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function OH(e,t){return new IP({type:"nonoptional",innerType:e,...Me(t)})}const jH=pe("ZodCatch",(e,t)=>{GF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>gq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function TH(e,t){return new jH({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const NH=pe("ZodPipe",(e,t)=>{WF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>yq(e,n,r,i),e.in=t.in,e.out=t.out});function Vb(e,t){return new NH({type:"pipe",in:e,out:t})}const RH=pe("ZodReadonly",(e,t)=>{XF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>bq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function PH(e){return new RH({type:"readonly",innerType:e})}const MH=pe("ZodLazy",(e,t)=>{QF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>xq(e,n,r,i),e.unwrap=()=>e._zod.def.getter()});function LP(e){return new MH({type:"lazy",getter:e})}const $P=pe("ZodCustom",(e,t)=>{JF.init(e,t),Qt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>lq(e,n)});function BP(e,t){return KU($P,e??(()=>!0),t)}function DH(e,t={}){return VU($P,e,t)}function zH(e){return YU(e)}function KC(e,t){return Vb(DP(e),t)}const IH=rs([W(),Ke(),Yr(),uH()]),Yb=LP(()=>rs([IH,ze(Yb),Rr(W(),Yb)])),LH=Se({source:nn("repo"),path:W(),mimeType:W().optional()}),$H=Se({source:nn("run"),artifactId:W(),mimeType:W(),fileName:W().optional()}),BH=rs([LH,$H]),FH=Se({notation:Ve(["standard","compact"]).optional(),compactDisplay:Ve(["short","long"]).optional(),prefix:W().optional(),suffix:W().optional(),minDecimalPlaces:Ke().int().min(0).optional(),maxDecimalPlaces:Ke().int().min(0).optional()}),Bu=FH.refine(e=>e.minDecimalPlaces===void 0||e.maxDecimalPlaces===void 0?!0:e.minDecimalPlaces<=e.maxDecimalPlaces,{message:"minDecimalPlaces must be less than or equal to maxDecimalPlaces",path:["minDecimalPlaces"]}),UH=Ve(["string","number","boolean"]),FP=Ve(["boolean","markdown","json","image","audio","video","file","duration","percent","number","passFail","stars"]),qH=Se({key:W(),label:W(),kind:UH,format:FP.optional(),numberFormat:Bu.optional(),isScore:Yr().optional(),isManualScore:Yr().optional(),passThreshold:Ke().optional(),maxStars:Ke().int().min(2).optional(),hideInTable:Yr().optional(),align:Ve(["left","center","right"]).optional()}),UP=rs([Yb,BH]),Jm=W().min(1),qP=Ve(["string","number","duration","json"]),HP=Ve(["tree","detail","section"]),HH=Se({key:W().optional(),path:W(),label:W().optional(),format:qP.optional(),numberFormat:Bu.optional(),placements:ze(HP).optional(),scope:Ve(["self","subtree"]).optional(),mode:Ve(["all","last","sum"]).optional()}),ZP=Se({attributes:ze(HH).optional()}),ZH=Se({key:W().optional(),path:W(),label:W().optional(),format:qP.optional(),numberFormat:Bu.optional(),placements:ze(HP).optional(),scope:Ve(["self","subtree"]).optional(),mode:Ve(["all","last","sum"]).optional(),transform:BP(e=>e===void 0||typeof e=="function",{message:"Expected a transform function"}).optional()}),KH=Se({attributes:ze(ZH).optional()}),Bo=Se({name:W().optional(),message:W(),stack:W().optional(),capturedAt:W().optional()}).catchall(tr()),_u=Bo,KP=Se({id:W(),parentId:W().nullable(),caseId:W(),kind:Jm,name:W(),startedAt:W(),endedAt:W().nullable(),status:Ve(["running","ok","error","cancelled"]),attributes:Rr(W(),tr()).optional(),error:Bo.optional(),errors:ze(Bo).optional(),warning:_u.optional(),warnings:ze(_u).optional()}),VP=Ve(["use","bypass","refresh"]);Se({key:tr(),namespace:W().min(1),serializeFileBytes:Yr().optional()});const zw=Ve(["span","value"]),YP=Ve(["hit","miss","refresh","bypass"]),GP=Se({type:nn("value"),name:W(),namespace:W(),key:W(),status:YP,storedAt:W().optional(),age:Ke().optional()});Se({key:W(),namespace:W(),operationType:zw,operationName:W(),spanName:W().optional(),spanKind:Jm.optional(),storedAt:W(),codeFingerprint:W(),sizeBytes:Ke()});const VH=Se({kind:Jm,name:W(),attributes:Rr(W(),tr()).optional(),status:Ve(["running","ok","error","cancelled"]),error:Bo.optional(),errors:ze(Bo).optional(),warning:_u.optional(),warnings:ze(_u).optional()}),WP=VH.extend({children:LP(()=>ze(WP))}),YH=Qm("kind",[Se({kind:nn("setOutput"),key:W(),value:tr()}),Se({kind:nn("appendOutput"),key:W(),value:tr()}),Se({kind:nn("mergeOutput"),key:W(),patch:Rr(W(),tr())}),Se({kind:nn("incrementOutput"),key:W(),delta:Ke()}),Se({kind:nn("checkpoint"),name:W(),data:tr()}),Se({kind:nn("subSpan"),span:WP})]),GH=Se({returnValue:tr(),finalAttributes:Rr(W(),tr()),finalStatus:Ve(["running","ok","error","cancelled"]).optional(),finalError:Bo.optional(),finalErrors:ze(Bo).optional(),finalWarning:_u.optional(),finalWarnings:ze(_u).optional(),ops:ze(YH)}),XP=Se({version:nn(1),key:W(),namespace:W(),operationType:zw.optional(),operationName:W().optional(),spanName:W().optional(),spanKind:Jm.optional(),storedAt:W(),codeFingerprint:W(),recording:GH}),QP=Se({version:nn(1),key:W(),namespace:W(),operationType:zw,operationName:W(),storedAt:W(),codeFingerprint:W(),rawKey:tr()}),WH=XP.extend({debugKey:QP.optional()});Se({version:nn(1),owner:W(),entries:Rr(W(),XP)});Se({version:nn(1),owner:W(),entries:Rr(W(),QP)});const XH=Ve(["area","line","bar"]),JP=Ve(["passRate","durationMs"]),e5=Ve(["avg","sum","min","max","latest","passThresholdRate"]),VC=Ve(["accent","accentDim","success","error","warning","textMuted"]),YC=Ve(["left","right"]),QH=Qm("source",[Se({source:nn("builtin"),metric:JP,label:W().optional(),color:VC.optional(),axis:YC.optional()}),Se({source:nn("column"),key:W().min(1),aggregate:e5,label:W().optional(),color:VC.optional(),axis:YC.optional()})]),JH=Qm("source",[Se({source:nn("builtin"),metric:JP,label:W().optional()}),Se({source:nn("column"),key:W().min(1),aggregate:e5,label:W().optional()})]),eZ=Se({heading:W().optional(),type:XH,metrics:ze(QH).min(1),yDomain:Se({left:Se({min:Ke().optional(),max:Ke().optional()}).optional(),right:Se({min:Ke().optional(),max:Ke().optional()}).optional()}).optional(),tooltipExtras:ze(JH).optional()}),tZ=ze(eZ),nZ=Ve(["fresh","stale","outdated"]),rZ=Ve(["avg","min","max","sum","last"]),iZ=Qm("kind",[Se({kind:nn("cases")}),Se({kind:nn("passRate"),accent:Yr().optional()}),Se({kind:nn("duration")}),Se({kind:nn("column"),key:W(),label:W().optional(),aggregate:rZ,format:FP.optional(),numberFormat:Bu.optional(),accent:Yr().optional()})]),aZ=ze(iZ),lZ=Se({key:W().default(""),id:W(),title:W().optional(),filePath:W(),stale:Yr(),outdated:Yr(),freshnessStatus:nZ,latestRunAt:W().nullable(),latestRunCommitSha:W().nullable(),currentCommitSha:W().nullable(),columnDefs:ze(qH),caseCount:Ke().nullable(),lastRunStatus:Ve(["pass","fail","error","running","cancelled","unscored"]).nullable(),stats:aZ.optional(),charts:tZ.optional()}),Iw=Se({evalKey:W().optional(),caseKey:W().optional(),caseId:W(),evalId:W(),status:Ve(["pending","running","pass","fail","error","cancelled"]),durationMs:Ke().nullable(),costUsd:Ke().nullable().optional(),columns:Rr(W(),UP),trial:Ke()}),oZ=Se({message:W(),stack:W().optional()}),sZ=W().transform(e=>({message:e})),uZ=Ve(["log","info","warn","error"]),cZ=Ve(["eval","derive","outputsSchema","scorer"]),fZ=Se({file:W(),line:Ke(),column:Ke()}),dZ=Se({timestamp:W(),level:uZ,phase:cZ,message:W(),args:ze(tr()).default([]),truncated:Yr().default(!1),location:fZ.optional(),source:W().optional()}),hZ=Se({trace:ze(KP),traceDisplay:ZP}),t5=Se({evalKey:W().optional(),caseKey:W().optional(),caseId:W(),evalId:W(),status:Ve(["pending","running","pass","fail","error","cancelled"]),input:tr(),trace:ze(KP),traceDisplay:ZP,scoringTraces:Rr(W(),hZ).optional(),columns:Rr(W(),UP),assertionFailures:ze(rs([oZ,sZ])),logs:ze(dZ).default([]),error:Se({name:W().optional(),message:W(),stack:W().optional()}).nullable(),trial:Ke(),cacheRefs:ze(GP).default([])}),pZ=Se({type:Ve(["duplicate-eval-id"]),severity:Ve(["error"]),filePath:W(),evalId:W(),message:W()}),n5=Ve(["lowestScore","median"]),mZ=Ve(["apiCalls","costUsd","llmTurns","inputTokens","outputTokens","totalTokens","cachedInputTokens","cacheCreationInputTokens","reasoningTokens","llmDurationMs"]),vZ=rs([nn(!0),ze(mZ)]),r5=Ve(["string","number","duration","json","boolean"]),gZ=r5,i5=Ve(["header","body"]),yZ=i5,a5=BP(e=>typeof e=="function",{message:"Expected a derived attribute function"}),bZ=Se({label:W().min(1),tooltip:W().min(1).optional(),path:W().min(1),format:r5.optional(),numberFormat:Bu.optional(),placements:ze(i5).nonempty().optional()}),xZ=Se({label:W().min(1),tooltip:W().min(1).optional(),path:W().min(1),format:gZ.optional(),numberFormat:Bu.optional(),placements:ze(yZ).nonempty().optional()}),wZ=Se({model:W().min(1),provider:W().min(1).optional(),inputUsdPerMillion:Ke().nonnegative().optional(),outputUsdPerMillion:Ke().nonnegative().optional(),cachedInputUsdPerMillion:Ke().nonnegative().optional(),cacheCreationInputUsdPerMillion:Ke().nonnegative().optional(),cacheCreationInput1hUsdPerMillion:Ke().nonnegative().optional(),reasoningUsdPerMillion:Ke().nonnegative().optional()}),SZ=Se({kinds:ze(W().min(1)).optional(),attributes:Se({model:W().optional(),provider:W().optional(),inputTokens:W().optional(),outputTokens:W().optional(),cachedInputTokens:W().optional(),cacheCreationInputTokens:W().optional(),cacheCreationInput1hTokens:W().optional(),reasoningTokens:W().optional(),latencyMs:W().optional(),steps:W().optional(),finishReason:W().optional(),input:W().optional(),output:W().optional(),reasoning:W().optional(),toolCalls:W().optional()}).optional(),derivedAttributes:Rr(W().min(1),a5).optional(),pricing:ze(wZ).optional(),metrics:ze(bZ).optional()}),EZ=Se({kinds:ze(W().min(1)).optional(),attributes:Se({method:W().optional(),url:W().optional(),statusCode:W().optional(),request:W().optional(),response:W().optional(),requestBody:W().optional(),responseBody:W().optional(),headers:W().optional(),durationMs:W().optional(),error:W().optional()}).optional(),derivedAttributes:Rr(W().min(1),a5).optional(),metrics:ze(xZ).optional()}),kZ=Se({captureConsole:Yr().optional()}),_Z={kinds:["llm"],attributes:{model:"model",provider:"provider",inputTokens:"usage.inputTokens",outputTokens:"usage.outputTokens",cachedInputTokens:"usage.cachedInputTokens",cacheCreationInputTokens:"usage.cacheCreationInputTokens",cacheCreationInput1hTokens:"usage.cacheCreationInput1hTokens",reasoningTokens:"usage.reasoningTokens",latencyMs:"latencyMs",steps:"steps",finishReason:"finishReason",input:"input",output:"output",reasoning:"reasoning",toolCalls:"toolCalls"},derivedAttributes:[],metrics:[],pricing:[]},AZ={kinds:["api","http","http.client","fetch"],attributes:{method:"method",url:"url",statusCode:"statusCode",request:"request",response:"response",requestBody:"requestBody",responseBody:"responseBody",headers:"headers",durationMs:"durationMs",error:"error"},derivedAttributes:[],metrics:[]};Se({workspaceRoot:W().optional(),include:ze(W()),defaultTrials:Ke().optional(),trialSelection:n5.optional(),concurrency:Ke().optional(),staleAfterDays:Ke().optional(),allowCliRunAll:Yr().optional(),traceDisplay:KH.optional(),llmCalls:SZ.optional(),removeDefaultConfig:vZ.optional(),apiCalls:EZ.optional(),runLogs:kZ.optional(),cache:Se({enabled:Yr().optional(),dir:W().optional(),maxEntriesPerNamespace:KC(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,Ke().optional()),maxEntriesByNamespace:Rr(W(),Ke()).optional(),maxEntriesPerEval:KC(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,Ke().optional())}).optional()});const Lw=Se({id:W(),shortId:W(),status:Ve(["pending","running","completed","cancelled","error"]),startedAt:W(),endedAt:W().nullable(),commitSha:W().nullable().optional().default(null),evalSourceFingerprints:Rr(W(),W()).optional().default({}),target:Se({mode:Ve(["all","evalIds","caseIds"]),evalKeys:ze(W()).optional(),files:ze(W()).optional(),evalIds:ze(W()).optional(),caseIds:ze(W()).optional()}),trials:Ke(),trialSelection:n5.optional().default("lowestScore"),cacheMode:VP.optional()}),$w=Se({runId:W(),status:Ve(["pending","running","completed","cancelled","error"]),totalCases:Ke(),passedCases:Ke(),failedCases:Ke(),errorCases:Ke(),cancelledCases:Ke(),totalDurationMs:Ke().nullable(),errorMessage:W().nullable().default(null)});function CZ(e){return e==="pending"||e==="running"||e==="cancelled"||e==="error"?e:null}function OZ(e){const t=CZ(e.lifecycleStatus);if(t!==null)return t;let n=!1,r=!1,i=!1,a=!1,o=!1,u=!1;for(const c of e.statuses)c!=null&&(c==="running"?i=!0:c==="error"?o=!0:c==="fail"?u=!0:c==="cancelled"?a=!0:c==="pass"?n=!0:r=!0);return i?"running":o?"error":u?"fail":a?"cancelled":r||!n?"pending":"pass"}function l5(e){return OZ({statuses:Array.from(e.caseRows,t=>t.status),lifecycleStatus:e.lifecycleStatus})}function o5(e){const t=[...e.caseRows];let n=0,r=0,i=0,a=0,o=0,u=0,c=0,f=!1;for(const h of t)h.status==="pass"?n+=1:h.status==="fail"?r+=1:h.status==="error"?i+=1:h.status==="cancelled"?a+=1:h.status==="running"?u+=1:o+=1,h.durationMs!==null&&(c+=h.durationMs,f=!0);return{status:l5({caseRows:t,lifecycleStatus:e.lifecycleStatus}),totalCases:t.length,passedCases:n,failedCases:r,errorCases:i,cancelledCases:a,pendingCases:o,runningCases:u,totalDurationMs:f?c:null}}function s5(e){const{stale:t,outdated:n,lastRunStatus:r,isRunning:i=!1}=e;if(i||r==="running")return"running";if(r==="pass"){if(t)return"stale";if(n)return"outdated"}return r??"pending"}function jZ(e){const t=e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[-_\s]+/g," ").trim();return t.length===0?e:t.split(" ").map(n=>{const r=n.slice(0,1),i=n.slice(1);return`${r.toUpperCase()}${i}`}).join(" ")}function Au(e){return e.title!==void 0?e.title:jZ(e.id)}function TZ(e){return typeof e=="object"&&e!==null}function Vn(e,t){const n=t.split(".");let r=e;for(const i of n){if(!TZ(r)||!(i in r))return;r=r[i]}return r}function go(e,t){const n=Vn(e,t);return typeof n=="number"&&Number.isFinite(n)?n:null}function O0(e,t){const n=Vn(e,t);return typeof n=="string"&&n.length>0?n:null}function Oo(e,t){return e===null?null:e===0?0:t===void 0?null:e/1e6*t}function NZ({cacheCreationInputTokens:e,cacheCreationInput1hTokens:t,usdPerMillion:n,oneHourUsdPerMillion:r}){if(e===null)return null;if(e===0)return 0;if(t===null)return Oo(e,n);const i=Math.min(t,e),a=e-i,o=Oo(a,n),u=Oo(i,r);return o===null||u===null?null:o+u}function RZ({inputTokens:e,cachedInputTokens:t,cacheCreationInputTokens:n}){if(e===null)return null;const r=(t??0)+(n??0);return Math.max(e-r,0)}function PZ({pricing:e,model:t,provider:n}){if(t===null)return null;let r=null;for(const i of e)if(i.model===t){if(i.provider===void 0){r??=i;continue}if(i.provider===n)return i}return r}function MZ({inputTokens:e,inputCostUsd:t,outputTokens:n,outputCostUsd:r,cachedInputTokens:i,cachedInputCostUsd:a,cacheCreationInputTokens:o,cacheCreationInputCostUsd:u,reasoningTokens:c,reasoningCostUsd:f}){const h=[{tokens:e,cost:t},{tokens:n,cost:r},{tokens:i,cost:a},{tokens:o,cost:u},{tokens:c,cost:f}];let p=0,v=!1,g=!1;for(const y of h)if(y.tokens!==null&&(g=!0,y.tokens!==0)){if(y.cost===null)return null;p+=y.cost,v=!0}return v?p:g?0:null}function DZ(e){if(e.endedAt===null)return null;const t=Date.parse(e.startedAt),n=Date.parse(e.endedAt);if(!Number.isFinite(t)||!Number.isFinite(n))return null;const r=n-t;return r>=0?r:null}function zZ({input:e,output:t}){return e===null&&t===null?null:(e??0)+(t??0)}function IZ({outputTokens:e,durationMs:t,latencyMs:n}){if(e===null||t===null)return null;if(e===0)return 0;const r=n===null?t:t-n;return r<=0?null:e/(r/1e3)}function LZ(e,t){const n=Vn(e,t);return Array.isArray(n)?{stepCount:n.length,stepDetails:n}:{stepCount:null,stepDetails:null}}function $Z(e){const t=[];return e.warning&&t.push(e.warning),e.warnings&&t.push(...e.warnings),t}function BZ(e){return e.error?e.error:e.errors&&e.errors.length>0?e.errors[0]??null:null}function FZ(e,t){const n=new Set(t.kinds),r=[];for(const i of e){if(!n.has(i.kind))continue;const a=i.attributes,o=O0(a,t.attributes.model),u=O0(a,t.attributes.provider),c=go(a,t.attributes.inputTokens),f=go(a,t.attributes.outputTokens),h=go(a,t.attributes.cachedInputTokens),p=go(a,t.attributes.cacheCreationInputTokens),v=go(a,t.attributes.cacheCreationInput1hTokens),g=go(a,t.attributes.reasoningTokens),y=go(a,t.attributes.latencyMs),x=DZ(i),E=PZ({pricing:t.pricing,model:o,provider:u}),k=RZ({inputTokens:c,cachedInputTokens:h,cacheCreationInputTokens:p}),C=Oo(k,E?.inputUsdPerMillion),A=Oo(f,E?.outputUsdPerMillion),O=Oo(h,E?.cachedInputUsdPerMillion),T=NZ({cacheCreationInputTokens:p,cacheCreationInput1hTokens:v,usdPerMillion:E?.cacheCreationInputUsdPerMillion,oneHourUsdPerMillion:E?.cacheCreationInput1hUsdPerMillion}),j=Oo(g,E?.reasoningUsdPerMillion),R=MZ({inputTokens:c,inputCostUsd:C,outputTokens:f,outputCostUsd:A,cachedInputTokens:h,cachedInputCostUsd:O,cacheCreationInputTokens:p,cacheCreationInputCostUsd:T,reasoningTokens:g,reasoningCostUsd:j}),I=[];for(const M of t.metrics){const P=Vn(a,M.path);P!==void 0&&I.push({label:M.label,tooltip:M.tooltip,rawValue:P,format:M.format,numberFormat:M.numberFormat,placements:M.placements})}r.push({id:i.id,name:i.name,kind:i.kind,status:i.status,model:o,provider:u,inputTokens:c,outputTokens:f,cachedInputTokens:h,cacheCreationInputTokens:p,reasoningTokens:g,totalTokens:zZ({input:c,output:f}),latencyMs:y,tokensPerSecond:IZ({outputTokens:f,durationMs:x,latencyMs:y}),costUsd:R,inputCostUsd:C,outputCostUsd:A,cachedInputCostUsd:O,cacheCreationInputCostUsd:T,reasoningCostUsd:j,...LZ(a,t.attributes.steps),finishReason:O0(a,t.attributes.finishReason),durationMs:x,input:Vn(a,t.attributes.input),output:Vn(a,t.attributes.output),reasoning:Vn(a,t.attributes.reasoning),toolCalls:Vn(a,t.attributes.toolCalls),metrics:I,warnings:$Z(i),error:BZ(i)})}return r}function GC(e,t){const n=Vn(e,t);if(typeof n=="number"&&Number.isFinite(n))return n;if(typeof n!="string")return null;const r=Number(n);return Number.isFinite(r)?r:null}function WC(e,t){const n=Vn(e,t);return typeof n=="string"&&n.length>0?n:null}function UZ(e){if(e.endedAt===null)return null;const t=Date.parse(e.startedAt),n=Date.parse(e.endedAt);if(!Number.isFinite(t)||!Number.isFinite(n))return null;const r=n-t;return r>=0?r:null}function qZ(e){const t=[];return e.warning&&t.push(e.warning),e.warnings&&t.push(...e.warnings),t}function HZ(e){return e.error?e.error:e.errors&&e.errors.length>0?e.errors[0]??null:null}function ZZ(e,t){const n=new Set(t.kinds),r=[];for(const i of e){if(!n.has(i.kind))continue;const a=i.attributes,o=[];for(const u of t.metrics){const c=Vn(a,u.path);c!==void 0&&o.push({label:u.label,tooltip:u.tooltip,rawValue:c,format:u.format,numberFormat:u.numberFormat,placements:u.placements})}r.push({id:i.id,name:i.name,kind:i.kind,status:i.status,method:WC(a,t.attributes.method),url:WC(a,t.attributes.url),statusCode:GC(a,t.attributes.statusCode),durationMs:GC(a,t.attributes.durationMs)??UZ(i),request:Vn(a,t.attributes.request),response:Vn(a,t.attributes.response),requestBody:Vn(a,t.attributes.requestBody),responseBody:Vn(a,t.attributes.responseBody),headers:Vn(a,t.attributes.headers),errorPayload:Vn(a,t.attributes.error),metrics:o,warnings:qZ(i),error:HZ(i)})}return r}function ev(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function j0(e,t){if(!ev(e))return;const n=e[t];return typeof n=="string"&&n.length>0?n:void 0}function KZ(e,t){if(!ev(e))return;const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function VZ(e,t){if(!ev(e))return[];const n=e[t];return Array.isArray(n)?n:[]}function YZ(e){if(!ev(e))return;const t=YP.safeParse(e["cache.status"]);if(!(!t.success||t.data==="bypass"))return t.data}function GZ(e,t){const n=[];for(const r of e){const i=YZ(r.attributes);if(i!==void 0){const o=j0(r.attributes,"cache.key"),u=j0(r.attributes,"cache.namespace");if(o!==void 0&&u!==void 0){const c=i==="hit";n.push({id:r.id,source:"span",origin:"span",action:c?"hit":"added",status:i,name:r.name,namespace:u,key:o,storedAt:c?j0(r.attributes,"cache.storedAt"):void 0,age:c?KZ(r.attributes,"cache.age"):void 0,spanId:r.id})}}const a=VZ(r.attributes,"cache.refs");for(const[o,u]of a.entries()){const c=GP.safeParse(u);if(!c.success)continue;const f=c.data;if(f.status==="bypass")continue;const h=f.status==="hit";n.push({id:`${r.id}:value:${String(o)}`,source:"value",origin:"span",action:h?"hit":"added",status:f.status,name:f.name,namespace:f.namespace,key:f.key,storedAt:h?f.storedAt:void 0,age:h?f.age:void 0,spanId:r.id})}}for(const[r,i]of t.entries()){if(i.status==="bypass")continue;const a=i.status==="hit";n.push({id:`case:value:${String(r)}`,source:"value",origin:"caseRoot",action:a?"hit":"added",status:i.status,name:i.name,namespace:i.namespace,key:i.key,storedAt:a?i.storedAt:void 0,age:a?i.age:void 0,spanId:void 0})}return n}Ve(["discovery.updated","run.started","run.summary","case.started","case.updated","case.finished","trace.span","run.finished","run.cancelled","run.error"]);Se({type:W(),runId:W().optional(),timestamp:W(),payload:tr()});Se({target:Se({mode:Ve(["all","evalIds","caseIds"]),evalKeys:ze(W()).optional(),files:ze(W()).optional(),evalIds:ze(W()).optional(),caseIds:ze(W()).optional()}),trials:Ke().min(1),cache:Se({mode:VP.default("use")}).optional()});Se({value:Ke().min(0).max(1).nullable()});const u5=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const WZ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const XZ=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const XC=e=>{const t=XZ(e);return t.charAt(0).toUpperCase()+t.slice(1)};var T0={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"};const QZ=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},JZ=_.createContext({}),eK=()=>_.useContext(JZ),tK=_.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...u},c)=>{const{size:f=24,strokeWidth:h=2,absoluteStrokeWidth:p=!1,color:v="currentColor",className:g=""}=eK()??{},y=r??p?Number(n??h)*24/Number(t??f):n??h;return _.createElement("svg",{ref:c,...T0,width:t??f??T0.width,height:t??f??T0.height,stroke:e??v,strokeWidth:y,className:u5("lucide",g,i),...!a&&!QZ(u)&&{"aria-hidden":"true"},...u},[...o.map(([x,E])=>_.createElement(x,E)),...Array.isArray(a)?a:[a]])});const jn=(e,t)=>{const n=_.forwardRef(({className:r,...i},a)=>_.createElement(tK,{ref:a,iconNode:t,className:u5(`lucide-${WZ(XC(e))}`,`lucide-${e}`,r),...i}));return n.displayName=XC(e),n};const nK=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],rK=jn("check",nK);const iK=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ll=jn("chevron-down",iK);const aK=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Zl=jn("chevron-right",aK);const lK=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],c5=jn("chevrons-down-up",lK);const oK=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],f5=jn("chevrons-up-down",oK);const sK=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],uK=jn("clock-3",sK);const cK=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],fK=jn("ellipsis",cK);const dK=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],hK=jn("git-fork",dK);const pK=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],mK=jn("maximize-2",pK);const vK=[["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"}]],gK=jn("minimize-2",vK);const yK=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],bK=jn("panel-right-close",yK);const xK=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]],wK=jn("panel-right-open",xK);const SK=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],d5=jn("play",SK);const EK=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],kK=jn("search",EK);const _K=[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]],Bw=jn("square-arrow-out-up-right",_K);const AK=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],Fw=jn("square-stop",AK);const CK=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],h5=jn("star",CK);const OK=[["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"}]],jK=jn("trash-2",OK);const TK=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Jf=jn("x",TK);function NK(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function u(h){try{f(r.next(h))}catch(p){o(p)}}function c(h){try{f(r.throw(h))}catch(p){o(p)}}function f(h){h.done?a(h.value):i(h.value).then(u,c)}f((r=r.apply(e,[])).next())})}var RK=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(i){e.addRange(i)}),t&&t.focus()}},PK=RK,QC={"text/plain":"Text","text/html":"Url",default:"Text"},MK="Copy to clipboard: #{key}, Enter";function DK(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function zK(e,t){var n,r,i,a,o,u,c=!1;t||(t={}),n=t.debug||!1;try{i=PK(),a=document.createRange(),o=document.getSelection(),u=document.createElement("span"),u.textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(h){if(h.stopPropagation(),t.format)if(h.preventDefault(),typeof h.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var p=QC[t.format]||QC.default;window.clipboardData.setData(p,e)}else h.clipboardData.clearData(),h.clipboardData.setData(t.format,e);t.onCopy&&(h.preventDefault(),t.onCopy(h.clipboardData))}),document.body.appendChild(u),a.selectNodeContents(u),o.addRange(a);var f=document.execCommand("copy");if(!f)throw new Error("copy command was unsuccessful");c=!0}catch(h){n&&console.error("unable to copy using execCommand: ",h),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),r=DK("message"in t?t.message:MK),window.prompt(r,e)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(a):o.removeAllRanges()),u&&document.body.removeChild(u),i()}return c}var IK=zK;function Kl(e){return Object.prototype.toString.call(e)==="[object Object]"}function bf(e){return Array.isArray(e)?e.length:Kl(e)?Object.keys(e).length:0}function LK(e,t){if(typeof e=="string")return e;try{return JSON.stringify(e,(n,r)=>{switch(typeof r){case"bigint":return String(r)+"n";case"number":case"boolean":case"object":case"string":return r;default:return String(r)}},t)}catch(n){return`${n.name}: ${n.message}`||"JSON.stringify failed"}}function $K(e){return NK(this,void 0,void 0,function*(){try{yield navigator.clipboard.writeText(e)}catch{IK(e)}})}function JC(e,t,n,r,i,a){if(a&&a.collapsed!==void 0)return!!a.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const o=bf(e);if(typeof r=="function"){const u=Uw(r,[{node:e,depth:t,indexOrName:n,size:o}]);if(typeof u=="boolean")return u}return!!(Array.isArray(e)&&o>i||Kl(e)&&o>i)}function eO(e,t,n,r,i,a){if(a&&a.collapsed!==void 0)return!!a.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const o=Math.ceil(e.length/100);if(typeof r=="function"){const u=Uw(r,[{node:e,depth:t,indexOrName:n,size:o}]);if(typeof u=="boolean")return u}return!!(Array.isArray(e)&&o>i||Kl(e)&&o>i)}function mu(e,t,n){return typeof e=="boolean"?e:!!(typeof e=="number"&&t>e||e==="collapsed"&&n||e==="expanded"&&!n)}function Uw(e,t){try{return e(...t)}catch(n){reportError(n)}}function p5(e){if(e===!0||Kl(e)&&e.add===!0)return!0}function tO(e){if(e===!0||Kl(e)&&e.edit===!0)return!0}function qw(e){if(e===!0||Kl(e)&&e.delete===!0)return!0}function BK(e){return typeof e=="function"}function m5(e){return!e||e.add===void 0||!!e.add}function nO(e){return!e||e.edit===void 0||!!e.edit}function Hw(e){return!e||e.delete===void 0||!!e.delete}function tv(e){return!e||e.enableClipboard===void 0||!!e.enableClipboard}function FK(e){return!e||e.matchesURL===void 0||!!e.matchesURL}function UK(e,t){return e==="string"?t.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):t}var rO;function Gb(){return Gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gb.apply(this,arguments)}var Zw=function(t){return _.createElement("svg",Gb({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},t),rO||(rO=_.createElement("path",{fill:"currentColor",d:"M12.473 5.806a.666.666 0 0 0-.946 0L8.473 8.86a.667.667 0 0 1-.946 0L4.473 5.806a.667.667 0 1 0-.946.94l3.06 3.06a2 2 0 0 0 2.826 0l3.06-3.06a.667.667 0 0 0 0-.94Z"})))},iO;function Wb(){return Wb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wb.apply(this,arguments)}var qK=function(t){return _.createElement("svg",Wb({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),iO||(iO=_.createElement("path",{fill:"currentColor",d:"M17.542 2.5h-4.75a3.963 3.963 0 0 0-3.959 3.958v4.75a3.963 3.963 0 0 0 3.959 3.959h4.75a3.963 3.963 0 0 0 3.958-3.959v-4.75A3.963 3.963 0 0 0 17.542 2.5Zm2.375 8.708a2.378 2.378 0 0 1-2.375 2.375h-4.75a2.378 2.378 0 0 1-2.375-2.375v-4.75a2.378 2.378 0 0 1 2.375-2.375h4.75a2.378 2.378 0 0 1 2.375 2.375v4.75Zm-4.75 6.334a3.963 3.963 0 0 1-3.959 3.958h-4.75A3.963 3.963 0 0 1 2.5 17.542v-4.75a3.963 3.963 0 0 1 3.958-3.959.791.791 0 1 1 0 1.584 2.378 2.378 0 0 0-2.375 2.375v4.75a2.378 2.378 0 0 0 2.375 2.375h4.75a2.378 2.378 0 0 0 2.375-2.375.792.792 0 1 1 1.584 0Z"})))},aO,lO;function Xb(){return Xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xb.apply(this,arguments)}var HK=function(t){return _.createElement("svg",Xb({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),aO||(aO=_.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.755 3.755 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.755 3.755 0 0 0 17.25 3Zm2.25 14.25a2.25 2.25 0 0 1-2.25 2.25H6.75a2.25 2.25 0 0 1-2.25-2.25V6.75A2.25 2.25 0 0 1 6.75 4.5h10.5a2.25 2.25 0 0 1 2.25 2.25v10.5Z"})),lO||(lO=_.createElement("path",{fill:"#14C786",d:"M10.312 14.45 7.83 11.906a.625.625 0 0 0-.896 0 .659.659 0 0 0 0 .918l2.481 2.546a1.264 1.264 0 0 0 .896.381 1.237 1.237 0 0 0 .895-.38l5.858-6.011a.658.658 0 0 0 0-.919.625.625 0 0 0-.896 0l-5.857 6.01Z"})))};function nv({node:e,nodeMeta:t}){const{customizeCopy:n,CopyComponent:r,CopiedComponent:i}=_.useContext(Vl),[a,o]=_.useState(!1),u=c=>{c.stopPropagation();const f=n(e,t);typeof f=="string"&&f&&$K(f),o(!0),setTimeout(()=>o(!1),3e3)};return a?typeof i=="function"?w.jsx(i,{className:"json-view--copy",style:{display:"inline-block"}}):w.jsx(HK,{className:"json-view--copy",style:{display:"inline-block"}}):typeof r=="function"?w.jsx(r,{onClick:u,className:"json-view--copy"}):w.jsx(qK,{onClick:u,className:"json-view--copy"})}function Qb({indexOrName:e,value:t,depth:n,deleteHandle:r,editHandle:i,parent:a,parentPath:o}){const{displayArrayIndex:u}=_.useContext(Vl),c=Array.isArray(a);return w.jsxs("div",Object.assign({className:"json-view--pair"},{children:[!c||c&&u?w.jsxs(w.Fragment,{children:[w.jsx("span",Object.assign({className:typeof e=="number"?"json-view--index":"json-view--property"},{children:e})),":"," "]}):w.jsx(w.Fragment,{}),w.jsx(g5,{node:t,depth:n+1,deleteHandle:(f,h)=>r(f,h),editHandle:(f,h,p,v)=>i(f,h,p,v),parent:a,indexOrName:e,parentPath:o})]}))}var oO,sO;function Jb(){return Jb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jb.apply(this,arguments)}var Kw=function(t){return _.createElement("svg",Jb({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),oO||(oO=_.createElement("path",{fill:"currentColor",d:"M18.75 6h-2.325a3.757 3.757 0 0 0-3.675-3h-1.5a3.757 3.757 0 0 0-3.675 3H5.25a.75.75 0 0 0 0 1.5H6v9.75A3.754 3.754 0 0 0 9.75 21h4.5A3.754 3.754 0 0 0 18 17.25V7.5h.75a.75.75 0 1 0 0-1.5Zm-7.5-1.5h1.5A2.255 2.255 0 0 1 14.872 6H9.128a2.255 2.255 0 0 1 2.122-1.5Zm5.25 12.75a2.25 2.25 0 0 1-2.25 2.25h-4.5a2.25 2.25 0 0 1-2.25-2.25V7.5h9v9.75Z"})),sO||(sO=_.createElement("path",{fill:"#DA0000",d:"M10.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM13.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z"})))},uO,cO;function ex(){return ex=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ex.apply(this,arguments)}var v5=function(t){return _.createElement("svg",ex({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),uO||(uO=_.createElement("path",{fill:"currentColor",d:"M21 6.75v10.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3h10.5A3.754 3.754 0 0 1 21 6.75Zm-1.5 0c0-1.24-1.01-2.25-2.25-2.25H6.75C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25V6.75Z"})),cO||(cO=_.createElement("path",{fill:"#14C786",d:"M15 12.75a.75.75 0 1 0 0-1.5h-2.25V9a.75.75 0 1 0-1.5 0v2.25H9a.75.75 0 1 0 0 1.5h2.25V15a.75.75 0 1 0 1.5 0v-2.25H15Z"})))},fO,dO;function tx(){return tx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tx.apply(this,arguments)}var Vw=function(t){return _.createElement("svg",tx({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),fO||(fO=_.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})),dO||(dO=_.createElement("path",{fill:"#14C786",d:"m10.85 13.96-1.986-2.036a.5.5 0 0 0-.716 0 .527.527 0 0 0 0 .735l1.985 2.036a1.01 1.01 0 0 0 .717.305.99.99 0 0 0 .716-.305l4.686-4.808a.526.526 0 0 0 0-.735.5.5 0 0 0-.716 0l-4.687 4.809Z"})))},hO,pO;function nx(){return nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nx.apply(this,arguments)}var Yw=function(t){return _.createElement("svg",nx({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),hO||(hO=_.createElement("path",{fill:"#DA0000",d:"M15 9a.75.75 0 0 0-1.06 0L12 10.94 10.06 9A.75.75 0 0 0 9 10.06L10.94 12 9 13.94A.75.75 0 0 0 10.06 15L12 13.06 13.94 15A.75.75 0 0 0 15 13.94L13.06 12 15 10.06A.75.75 0 0 0 15 9Z"})),pO||(pO=_.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})))};function ZK({originNode:e,node:t,depth:n,index:r,deleteHandle:i,customOptions:a,startIndex:o,parent:u,parentPath:c}){const{enableClipboard:f,src:h,onEdit:p,onChange:v,forceUpdate:g,displaySize:y,CustomOperation:x}=_.useContext(Vl),E=[...c,String(r)],[k,C]=_.useState(!0),A=_.useCallback((j,R,I)=>{e[j]=R,p&&p({newValue:R,oldValue:I,depth:n,src:h,indexOrName:j,parentType:"array",parentPath:c}),v&&v({type:"edit",depth:n,src:h,indexOrName:j,parentType:"array",parentPath:c}),g()},[t,p,v,g]),O=j=>{e.splice(j,1),i&&i(j,c),g()},T=w.jsxs(w.Fragment,{children:[!k&&w.jsxs("span",Object.assign({onClick:()=>C(!0),className:"jv-size-chevron"},{children:[mu(y,n,k)&&w.jsxs("span",Object.assign({className:"jv-size"},{children:[bf(t)," Items"]})),w.jsx(Zw,{className:"jv-chevron"})]})),!k&&f&&tv(a)&&w.jsx(nv,{node:t,nodeMeta:{depth:n,indexOrName:r,parent:u,parentPath:c,currentPath:E}}),typeof x=="function"?w.jsx(x,{node:t}):null]});return w.jsxs("div",{children:[w.jsx("span",{children:"["}),T,k?w.jsxs("button",Object.assign({onClick:()=>C(!1),className:"jv-button"},{children:[o," ... ",o+t.length-1]})):w.jsx("div",Object.assign({className:"jv-indent"},{children:t.map((j,R)=>w.jsx(Qb,{indexOrName:R+o,value:j,depth:n,parent:t,deleteHandle:O,editHandle:A,parentPath:c},String(r)+String(R)))})),w.jsx("span",{children:"]"})]})}function KK({node:e,depth:t,deleteHandle:n,indexOrName:r,customOptions:i,parent:a,parentPath:o}){const u=typeof r<"u"?[...o,String(r)]:o,c=[];for(let Z=0;Z<e.length;Z+=100)c.push(e.slice(Z,Z+100));const{collapsed:f,enableClipboard:h,collapseObjectsAfterLength:p,editable:v,onDelete:g,src:y,onAdd:x,CustomOperation:E,onChange:k,forceUpdate:C,displaySize:A}=_.useContext(Vl),[O,T]=_.useState(eO(e,t,r,f,p,i));_.useEffect(()=>{T(eO(e,t,r,f,p,i))},[f,p]);const[j,R]=_.useState(!1),I=()=>{R(!1),n&&n(r,o),g&&g({value:e,depth:t,src:y,indexOrName:r,parentType:"array",parentPath:o}),k&&k({type:"delete",depth:t,src:y,indexOrName:r,parentType:"array",parentPath:o})},[M,P]=_.useState(!1),B=()=>{const Z=e;Z.push(null),x&&x({indexOrName:Z.length-1,depth:t,src:y,parentType:"array",parentPath:o}),k&&k({type:"add",indexOrName:Z.length-1,depth:t,src:y,parentType:"array",parentPath:o}),C()},$=j||M,G=()=>{R(!1),P(!1)},H=w.jsxs(w.Fragment,{children:[!O&&!$&&w.jsxs("span",Object.assign({onClick:()=>T(!0),className:"jv-size-chevron"},{children:[mu(A,t,O)&&w.jsxs("span",Object.assign({className:"jv-size"},{children:[e.length," Items"]})),w.jsx(Zw,{className:"jv-chevron"})]})),$&&w.jsx(Vw,{className:"json-view--edit",style:{display:"inline-block"},onClick:M?B:I}),$&&w.jsx(Yw,{className:"json-view--edit",style:{display:"inline-block"},onClick:G}),!O&&!$&&h&&tv(i)&&w.jsx(nv,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:a,parentPath:o,currentPath:u}}),!O&&!$&&p5(v)&&m5(i)&&w.jsx(v5,{className:"json-view--edit",onClick:()=>{B()}}),!O&&!$&&qw(v)&&Hw(i)&&n&&w.jsx(Kw,{className:"json-view--edit",onClick:()=>R(!0)}),typeof E=="function"?w.jsx(E,{node:e}):null]});return w.jsxs(w.Fragment,{children:[w.jsx("span",{children:"["}),H,O?w.jsx("button",Object.assign({onClick:()=>T(!1),className:"jv-button"},{children:"..."})):w.jsx("div",Object.assign({className:"jv-indent"},{children:c.map((Z,U)=>w.jsx(ZK,{originNode:e,node:Z,depth:t,index:U,startIndex:U*100,deleteHandle:n,customOptions:i,parentPath:o},String(r)+String(U)))})),w.jsx("span",{children:"]"}),O&&mu(A,t,O)&&w.jsxs("span",Object.assign({onClick:()=>T(!1),className:"jv-size"},{children:[e.length," Items"]}))]})}function VK({node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:i,parent:a,parentPath:o}){const{collapsed:u,onCollapse:c,enableClipboard:f,ignoreLargeArray:h,collapseObjectsAfterLength:p,editable:v,onDelete:g,src:y,onAdd:x,onEdit:E,onChange:k,forceUpdate:C,displaySize:A,CustomOperation:O}=_.useContext(Vl),T=typeof n<"u"?[...o,String(n)]:o;if(!h&&Array.isArray(e)&&e.length>100)return w.jsx(KK,{node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:i,parentPath:T});const j=Kl(e),[R,I]=_.useState(JC(e,t,n,u,p,i)),M=D=>{c?.({isCollapsing:!D,node:e,depth:t,indexOrName:n}),I(D)};_.useEffect(()=>{M(JC(e,t,n,u,p,i))},[u,p]);const P=_.useCallback((D,re,ne)=>{Array.isArray(e)?e[+D]=re:e&&(e[D]=re),E&&E({newValue:re,oldValue:ne,depth:t,src:y,indexOrName:D,parentType:j?"object":"array",parentPath:T}),k&&k({type:"edit",depth:t,src:y,indexOrName:D,parentType:j?"object":"array",parentPath:T}),C()},[e,E,k,C]),B=D=>{Array.isArray(e)?e.splice(+D,1):e&&delete e[D],C()},[$,G]=_.useState(!1),H=()=>{G(!1),r&&r(n,T),g&&g({value:e,depth:t,src:y,indexOrName:n,parentType:j?"object":"array",parentPath:T}),k&&k({type:"delete",depth:t,src:y,indexOrName:n,parentType:j?"object":"array",parentPath:T})},[Z,U]=_.useState(!1),q=_.useRef(null),K=()=>{var D;if(j){const re=(D=q.current)===null||D===void 0?void 0:D.value;re&&(e[re]=null,q.current&&(q.current.value=""),U(!1),x&&x({indexOrName:re,depth:t,src:y,parentType:"object",parentPath:T}),k&&k({type:"add",indexOrName:re,depth:t,src:y,parentType:"object",parentPath:T}))}else if(Array.isArray(e)){const re=e;re.push(null),x&&x({indexOrName:re.length-1,depth:t,src:y,parentType:"array",parentPath:T}),k&&k({type:"add",indexOrName:re.length-1,depth:t,src:y,parentType:"array",parentPath:T})}C()},Q=D=>{D.key==="Enter"?(D.preventDefault(),K()):D.key==="Escape"&&F()},z=$||Z,F=()=>{G(!1),U(!1)},V=w.jsxs(w.Fragment,{children:[!R&&!z&&w.jsxs("span",Object.assign({onClick:()=>M(!0),className:"jv-size-chevron"},{children:[mu(A,t,R)&&w.jsxs("span",Object.assign({className:"jv-size"},{children:[bf(e)," Items"]})),w.jsx(Zw,{className:"jv-chevron"})]})),Z&&j&&w.jsx("input",{className:"json-view--input",placeholder:"property",ref:q,onKeyDown:Q}),z&&w.jsx(Vw,{className:"json-view--edit",style:{display:"inline-block"},onClick:Z?K:H}),z&&w.jsx(Yw,{className:"json-view--edit",style:{display:"inline-block"},onClick:F}),!R&&!z&&f&&tv(i)&&w.jsx(nv,{node:e,nodeMeta:{depth:t,indexOrName:n,parent:a,parentPath:o,currentPath:T}}),!R&&!z&&p5(v)&&m5(i)&&w.jsx(v5,{className:"json-view--edit",onClick:()=>{j?(U(!0),setTimeout(()=>{var D;return(D=q.current)===null||D===void 0?void 0:D.focus()})):K()}}),!R&&!z&&qw(v)&&Hw(i)&&r&&w.jsx(Kw,{className:"json-view--edit",onClick:()=>G(!0)}),typeof O=="function"?w.jsx(O,{node:e}):null]});return Array.isArray(e)?w.jsxs(w.Fragment,{children:[w.jsx("span",{children:"["}),V,R?w.jsx("button",Object.assign({onClick:()=>M(!1),className:"jv-button"},{children:"..."})):w.jsx("div",Object.assign({className:"jv-indent"},{children:e.map((D,re)=>w.jsx(Qb,{indexOrName:re,value:D,depth:t,parent:e,deleteHandle:B,editHandle:P,parentPath:T},String(n)+String(re)))})),w.jsx("span",{children:"]"}),R&&mu(A,t,R)&&w.jsxs("span",Object.assign({onClick:()=>M(!1),className:"jv-size"},{children:[bf(e)," Items"]}))]}):j?w.jsxs(w.Fragment,{children:[w.jsx("span",{children:"{"}),V,R?w.jsx("button",Object.assign({onClick:()=>M(!1),className:"jv-button"},{children:"..."})):w.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(e).map(([D,re])=>w.jsx(Qb,{indexOrName:D,value:re,depth:t,parent:e,deleteHandle:B,editHandle:P,parentPath:T},String(n)+String(D)))})),w.jsx("span",{children:"}"}),R&&mu(A,t,R)&&w.jsxs("span",Object.assign({onClick:()=>M(!1),className:"jv-size"},{children:[bf(e)," Items"]}))]}):w.jsx("span",{children:String(e)})}const YK=rP.forwardRef(({str:e,className:t,ctrlClick:n},r)=>{let{collapseStringMode:i,collapseStringsAfterLength:a,customizeCollapseStringUI:o}=_.useContext(Vl);const[u,c]=_.useState(!0),f=_.useRef(null);a=a>0?a:0;const h=e.replace(/\s+/g," "),p=typeof o=="function"?o(h,u):typeof o=="string"?o:"...",v=g=>{var y;if((g.ctrlKey||g.metaKey)&&n)n(g);else{const x=window.getSelection();if(x&&x.anchorOffset!==x.focusOffset&&((y=x.anchorNode)===null||y===void 0?void 0:y.parentElement)===f.current)return;c(!u)}};if(e.length<=a)return w.jsxs("span",Object.assign({ref:f,className:t,onClick:n},{children:['"',e,'"']}));if(i==="address")return e.length<=10?w.jsxs("span",Object.assign({ref:f,className:t,onClick:n},{children:['"',e,'"']})):w.jsxs("span",Object.assign({ref:f,onClick:v,className:t+" cursor-pointer"},{children:['"',u?[h.slice(0,6),p,h.slice(-4)]:e,'"']}));if(i==="directly")return w.jsxs("span",Object.assign({ref:f,onClick:v,className:t+" cursor-pointer"},{children:['"',u?[h.slice(0,a),p]:e,'"']}));if(i==="word"){let g=a,y=a+1,x=h,E=1;for(;;){if(/\W/.test(e[g])){x=e.slice(0,g);break}if(/\W/.test(e[y])){x=e.slice(0,y);break}if(E===6){x=e.slice(0,a);break}E++,g--,y++}return w.jsxs("span",Object.assign({ref:f,onClick:v,className:t+" cursor-pointer"},{children:['"',u?[x,p]:e,'"']}))}return w.jsxs("span",Object.assign({ref:f,className:t},{children:['"',e,'"']}))});var mO;function rx(){return rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rx.apply(this,arguments)}var GK=function(t){return _.createElement("svg",rx({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),mO||(mO=_.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.754 3.754 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.754 3.754 0 0 0 17.25 3Zm2.25 14.25c0 1.24-1.01 2.25-2.25 2.25H6.75c-1.24 0-2.25-1.01-2.25-2.25V6.75c0-1.24 1.01-2.25 2.25-2.25h10.5c1.24 0 2.25 1.01 2.25 2.25v10.5Zm-6.09-9.466-5.031 5.03a2.981 2.981 0 0 0-.879 2.121v1.19c0 .415.336.75.75.75h1.19c.8 0 1.554-.312 2.12-.879l5.03-5.03a2.252 2.252 0 0 0 0-3.182c-.85-.85-2.331-.85-3.18 0Zm-2.91 7.151c-.28.28-.666.44-1.06.44H9v-.44c0-.4.156-.777.44-1.06l3.187-3.188 1.06 1.061-3.187 3.188Zm5.03-5.03-.782.783-1.06-1.061.782-.782a.766.766 0 0 1 1.06 0 .75.75 0 0 1 0 1.06Z"})))},vO,gO;function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ix.apply(this,arguments)}var WK=function(t){return _.createElement("svg",ix({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),vO||(vO=_.createElement("path",{fill:"currentColor",d:"M6.75 3h5.5v1.5h-5.5C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25v-5.5H21v5.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3Z"})),gO||(gO=_.createElement("path",{fill:"currentColor",d:"M20.013 3h-3.946a.987.987 0 0 0 0 1.973h1.564l-6.342 6.342a1.004 1.004 0 0 0 0 1.396 1.004 1.004 0 0 0 1.396 0l6.342-6.342v1.564a.987.987 0 0 0 1.973 0V3.987A.987.987 0 0 0 20.013 3Z"})))};function g5({node:e,depth:t,deleteHandle:n,indexOrName:r,parent:i,editHandle:a,parentPath:o}){const{collapseStringsAfterLength:u,enableClipboard:c,editable:f,src:h,onDelete:p,onChange:v,customizeNode:g,matchesURL:y,urlRegExp:x,EditComponent:E,DoneComponent:k,CancelComponent:C,CustomOperation:A}=_.useContext(Vl);let O;if(typeof g=="function"&&(O=Uw(g,[{node:e,depth:t,indexOrName:r}])),O){if(_.isValidElement(O))return O;if(BK(O)){const T=O;return w.jsx(T,{node:e,depth:t,indexOrName:r})}}if(Array.isArray(e)||Kl(e))return w.jsx(VK,{parent:i,node:e,depth:t,indexOrName:r,deleteHandle:n,parentPath:o,customOptions:typeof O=="object"?O:void 0});{const T=typeof e,j=typeof r<"u"?[...o,String(r)]:o,[R,I]=_.useState(!1),[M,P]=_.useState(!1),B=_.useRef(null),$=()=>{I(!0),setTimeout(()=>{var D,re;(D=window.getSelection())===null||D===void 0||D.selectAllChildren(B.current),(re=B.current)===null||re===void 0||re.focus()})},G=_.useCallback(()=>{let D=B.current.innerText;try{const re=JSON.parse(D);a&&a(r,re,e,o)}catch{const ne=UK(T,D);a&&a(r,ne,e,o)}I(!1)},[a,r,e,o,T]),H=()=>{I(!1),P(!1)},Z=()=>{P(!1),n&&n(r,o),p&&p({value:e,depth:t,src:h,indexOrName:r,parentType:Array.isArray(i)?"array":"object",parentPath:o}),v&&v({depth:t,src:h,indexOrName:r,parentType:Array.isArray(i)?"array":"object",type:"delete",parentPath:o})},U=_.useCallback(D=>{D.key==="Enter"?(D.preventDefault(),G()):D.key==="Escape"&&H()},[G]),q=R||M,K=!q&&tO(f)&&nO(O)&&a?D=>{(D.ctrlKey||D.metaKey)&&$()}:void 0,Q=w.jsxs(w.Fragment,{children:[q&&(typeof k=="function"?w.jsx(k,{className:"json-view--edit",style:{display:"inline-block"},onClick:M?Z:G}):w.jsx(Vw,{className:"json-view--edit",style:{display:"inline-block"},onClick:M?Z:G})),q&&(typeof C=="function"?w.jsx(C,{className:"json-view--edit",style:{display:"inline-block"},onClick:H}):w.jsx(Yw,{className:"json-view--edit",style:{display:"inline-block"},onClick:H})),!q&&c&&tv(O)&&w.jsx(nv,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:i,parentPath:o,currentPath:j}}),!q&&y&&T==="string"&&x.test(e)&&FK(O)&&w.jsx("a",Object.assign({href:e,target:"_blank",className:"json-view--link"},{children:w.jsx(WK,{})})),!q&&tO(f)&&nO(O)&&a&&(typeof E=="function"?w.jsx(E,{className:"json-view--edit",onClick:$}):w.jsx(GK,{className:"json-view--edit",onClick:$})),!q&&qw(f)&&Hw(O)&&n&&w.jsx(Kw,{className:"json-view--edit",onClick:()=>P(!0)}),typeof A=="function"?w.jsx(A,{node:e}):null]});let z="json-view--string";switch(T){case"number":case"bigint":z="json-view--number";break;case"boolean":z="json-view--boolean";break;case"object":z="json-view--null";break}typeof O?.className=="string"&&(z+=" "+O.className),M&&(z+=" json-view--deleting");let F=String(e);T==="bigint"&&(F+="n");const V=_.useMemo(()=>w.jsx("span",{contentEditable:!0,className:z,dangerouslySetInnerHTML:{__html:T==="string"?`"${F}"`:F},ref:B,onKeyDown:U}),[F,T,U]);return T==="string"?w.jsxs(w.Fragment,{children:[R?V:e.length>u?w.jsx(YK,{str:e,ref:B,className:z,ctrlClick:K}):w.jsxs("span",Object.assign({className:z,onClick:K},{children:['"',F,'"']})),Q]}):w.jsxs(w.Fragment,{children:[R?V:w.jsx("span",Object.assign({className:z,onClick:K},{children:F})),Q]})}}const y5=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,Vl=_.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",customizeCollapseStringUI:void 0,collapseObjectsAfterLength:20,collapsed:!1,onCollapse:void 0,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,customizeCopy:(()=>{}),displaySize:void 0,displayArrayIndex:!0,matchesURL:!1,urlRegExp:y5,ignoreLargeArray:!1,CopyComponent:void 0,CopiedComponent:void 0,EditComponent:void 0,CancelComponent:void 0,DoneComponent:void 0,CustomOperation:void 0});function XK({src:e,collapseStringsAfterLength:t=99,collapseStringMode:n="directly",customizeCollapseStringUI:r,collapseObjectsAfterLength:i=99,collapsed:a,onCollapse:o,enableClipboard:u=!0,editable:c=!1,onEdit:f,onDelete:h,onAdd:p,onChange:v,dark:g=!1,theme:y="default",customizeNode:x,customizeCopy:E=H=>LK(H),displaySize:k,displayArrayIndex:C=!0,style:A,className:O,matchesURL:T=!1,urlRegExp:j=y5,ignoreLargeArray:R=!1,CopyComponent:I,CopiedComponent:M,EditComponent:P,CancelComponent:B,DoneComponent:$,CustomOperation:G}){const[H,Z]=_.useState(0),U=_.useCallback(()=>Z(Q=>++Q),[]),[q,K]=_.useState(e);return _.useEffect(()=>K(e),[e]),w.jsx(Vl.Provider,Object.assign({value:{src:q,collapseStringsAfterLength:t,collapseStringMode:n,customizeCollapseStringUI:r,collapseObjectsAfterLength:i,collapsed:a,onCollapse:o,enableClipboard:u,editable:c,onEdit:f,onDelete:h,onAdd:p,onChange:v,forceUpdate:U,customizeNode:x,customizeCopy:E,displaySize:k,displayArrayIndex:C,matchesURL:T,urlRegExp:j,ignoreLargeArray:R,CopyComponent:I,CopiedComponent:M,EditComponent:P,CancelComponent:B,DoneComponent:$,CustomOperation:G}},{children:w.jsx("code",Object.assign({className:"json-view"+(g?" dark":"")+(y&&y!=="default"?" json-view_"+y:"")+(O?" "+O:""),style:A},{children:w.jsx(g5,{node:q,depth:1,editHandle:(Q,z,F,V)=>{K(z),f&&f({newValue:z,oldValue:F,depth:1,src:q,indexOrName:Q,parentType:null,parentPath:V}),v&&v({type:"edit",depth:1,src:q,indexOrName:Q,parentType:null,parentPath:V})},deleteHandle:(Q,z)=>{K(void 0),h&&h({value:q,depth:1,src:q,indexOrName:Q,parentType:null,parentPath:z}),v&&v({depth:1,src:q,indexOrName:Q,parentType:null,type:"delete",parentPath:z})},parentPath:[]})}))}))}function QK(e){const t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r);let o,u;const c=(i+a)/2;if(i===a)o=u=0;else{const f=i-a;switch(u=c>.5?f/(2-i-a):f/(i+a),i){case t:o=(n-r)/f+(n<r?6:0);break;case n:o=(r-t)/f+2;break;case r:o=(t-n)/f+4;break;default:o=0}o/=6}return{h:o*360,s:u*100,l:c*100}}function JK(e){const{l:t}=QK(e);return t>50}function eV(e){return JK(e)?"#000000":"#ffffff"}function tV(e){const t={};for(const[n,r]of Object.entries(e)){const i=eV(r),a=nV(r,i,i);t[n]={defaultHex:r,var:a.var,alpha:a.alpha,darker:a.darker,lighter:a.lighter,saturatedDarker:a.saturatedDarker,contrast:a.contrast}}return t}function nV(e,t,n){return{var:e,alpha:r=>`color-mix(in srgb, ${e} ${r*100}%, transparent)`,darker:r=>`color-mix(in srgb, ${e} ${(1-r)*100}%, #000)`,lighter:r=>`color-mix(in srgb, ${e} ${(1-r)*100}%, #fff)`,saturatedDarker:r=>`color-mix(in srgb, ${e} ${(1-r)*100}%, hsl(from ${e} h 100% 20%))`,contrast:{var:t,optimal:r=>r?.alpha?`color-mix(in srgb, ${n} ${r.alpha*100}%, transparent)`:n,alpha:r=>`color-mix(in srgb, ${t} ${r*100}%, transparent)`}}}new Proxy({},{get:(e,t)=>{throw new Error("styled cannot be called at runtime")}});function b5(...e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(r){if(typeof r=="string"||typeof r=="number")t.push(r);else if(typeof r=="object")for(let i=0,a=Object.keys(r);i<a.length;i++)r[a[i]]&&t.push(a[i])}}return t.join(" ")}function Gw(e,t){let n="";for(const r of e)if(typeof r=="string")n=r;else if(typeof r=="object"&&"className"in r){const i=r.className;typeof i=="string"&&(n=i)}return n?`${n} ${t}`:t}const yt=tV({bg:"#fcfcfc",bgElevated:"#f7f7f8",surface:"#f0f0f2",surfaceHover:"#ececee",surfaceActive:"#e4e4e7",border:"#e8e8eb",borderStrong:"#d4d4d8",text:"#0a0b0d",textMuted:"#6b6e76",textDim:"#a4a7af",accent:"#22d3ee",accentHover:"#06b6d4",accentDim:"#0e7490",accentInk:"#0a0b0d",success:"#16a34a",error:"#dc2626",warning:"#ea580c",cost:"#a16207",white:"#ffffff",black:"#000000"});function vr(e){const t=Be.c(26),{value:n,compact:r,maxHeight:i,collapsed:a,displaySize:o,collapseStringsAfterLength:u,collapseObjectsAfterLength:c,enableClipboard:f}=e,h=r===void 0?!1:r,p=a===void 0?!1:a,v=o===void 0?"collapsed":o,g=u===void 0?120:u,y=c===void 0?20:c,x=f===void 0?!0:f,E=_.useRef(null),[k,C]=_.useState(!1),[A,O]=_.useState(!1);let T;t[0]!==k||t[1]!==i?(T=()=>{if(!i||k)return;const Z=E.current;if(!Z)return;const U=()=>{O(Z.scrollHeight-Z.clientHeight>1)};U();const q=new ResizeObserver(U);return q.observe(Z),()=>q.disconnect()},t[0]=k,t[1]=i,t[2]=T):T=t[2];let j;t[3]!==k||t[4]!==i||t[5]!==n?(j=[i,k,n],t[3]=k,t[4]=i,t[5]=n,t[6]=j):j=t[6],_.useLayoutEffect(T,j);let R,I;t[7]!==i?(I=()=>{i||C(!1)},R=[i],t[7]=i,t[8]=R,t[9]=I):(R=t[8],I=t[9]),_.useEffect(I,R);const M=i!==void 0&&(A||k),P="vqnpbvz-2"+(h?" vh8ay32":"")+(i==="detail"?" v14y6o4h":"")+(i==="raw"?" valvosx":"")+(k?" vzt48hw":"");let B;t[10]!==y||t[11]!==g||t[12]!==p||t[13]!==v||t[14]!==x||t[15]!==n?(B=w.jsx(XK,{src:n,collapsed:p,displaySize:v,collapseStringsAfterLength:g,collapseObjectsAfterLength:y,enableClipboard:x}),t[10]=y,t[11]=g,t[12]=p,t[13]=v,t[14]=x,t[15]=n,t[16]=B):B=t[16];let $;t[17]!==P||t[18]!==B?($=w.jsx("div",{ref:E,className:P,children:B}),t[17]=P,t[18]=B,t[19]=$):$=t[19];let G;t[20]!==k||t[21]!==M?(G=M?w.jsx("button",{type:"button",onClick:()=>C(rV),"aria-expanded":k,className:"vqnpbvz-3",children:k?"Collapse":"Expand"}):null,t[20]=k,t[21]=M,t[22]=G):G=t[22];let H;return t[23]!==$||t[24]!==G?(H=w.jsxs("div",{className:"vqnpbvz-1",children:[$,G]}),t[23]=$,t[24]=G,t[25]=H):H=t[25],H}function rV(e){return!e}function x5(e){return e==="pass"?"pass":e==="fail"||e==="error"?"fail":e==="running"?"running":e==="cancelled"?"cancelled":e==="stale"?"stale":e==="outdated"?"outdated":e==="unscored"?"unscored":"pending"}function $l(e){const t=Be.c(6),{status:n}=e,r=x5(n),i="vno9i23-1"+(r==="pass"?" v1bls63k":"")+(r==="fail"?" v1843cka":"")+(r==="running"?" v1w33htl":"")+(r==="cancelled"?" v1o7znqr":"")+(r==="stale"?" v1ptx2rj":"")+(r==="outdated"?" vwlrmf0":"")+(r==="unscored"?" v1mlprpv":""),a="vno9i23-2"+(r==="pass"?" v1bls63k":"")+(r==="fail"?" v1843cka":"")+(r==="running"?" v1w33htl":"")+(r==="cancelled"?" v1o7znqr":"")+(r==="stale"?" v1ptx2rj":"")+(r==="outdated"?" vwlrmf0":"")+(r==="unscored"?" v1mlprpv":"");let o;t[0]!==a?(o=w.jsx("span",{className:a}),t[0]=a,t[1]=o):o=t[1];let u;return t[2]!==n||t[3]!==i||t[4]!==o?(u=w.jsxs("span",{className:i,children:[o,n]}),t[2]=n,t[3]=i,t[4]=o,t[5]=u):u=t[5],u}function Ww(e){const t=Be.c(2),{status:n}=e,r=x5(n),i="vno9i23-2"+(r==="pass"?" v1bls63k":"")+(r==="fail"?" v1843cka":"")+(r==="running"?" v1w33htl":"")+(r==="cancelled"?" v1o7znqr":"")+(r==="stale"?" v1ptx2rj":"")+(r==="outdated"?" vwlrmf0":"")+(r==="unscored"?" v1mlprpv":"");let a;return t[0]!==i?(a=w.jsx("span",{className:i}),t[0]=i,t[1]=a):a=t[1],a}function rv(){return typeof window<"u"}function Fu(e){return Xw(e)?(e.nodeName||"").toLowerCase():"#document"}function Nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function da(e){var t;return(t=(Xw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xw(e){return rv()?e instanceof Node||e instanceof Nr(e).Node:!1}function Gt(e){return rv()?e instanceof Element||e instanceof Nr(e).Element:!1}function ki(e){return rv()?e instanceof HTMLElement||e instanceof Nr(e).HTMLElement:!1}function ax(e){return!rv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nr(e).ShadowRoot}function ed(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=wi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function iV(e){return/^(table|td|th)$/.test(Fu(e))}function iv(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const aV=/transform|translate|scale|rotate|perspective|filter/,lV=/paint|layout|strict|content/,yo=e=>!!e&&e!=="none";let N0;function Qw(e){const t=Gt(e)?wi(e):e;return yo(t.transform)||yo(t.translate)||yo(t.scale)||yo(t.rotate)||yo(t.perspective)||!av()&&(yo(t.backdropFilter)||yo(t.filter))||aV.test(t.willChange||"")||lV.test(t.contain||"")}function oV(e){let t=Fa(e);for(;ki(t)&&!La(t);){if(Qw(t))return t;if(iv(t))return null;t=Fa(t)}return null}function av(){return N0==null&&(N0=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),N0}function La(e){return/^(html|body|#document)$/.test(Fu(e))}function wi(e){return Nr(e).getComputedStyle(e)}function lv(e){return Gt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fa(e){if(Fu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ax(e)&&e.host||da(e);return ax(t)?t.host:t}function w5(e){const t=Fa(e);return La(t)?e.ownerDocument?e.ownerDocument.body:e.body:ki(t)&&ed(t)?t:w5(t)}function Pl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=w5(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Nr(i);if(a){const u=lx(o);return t.concat(o,o.visualViewport||[],ed(i)?i:[],u&&n?Pl(u):[])}else return t.concat(i,Pl(i,[],n))}function lx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ip=Math.min,Do=Math.max,Lp=Math.round,Vh=Math.floor,na=e=>({x:e,y:e}),sV={left:"right",right:"left",bottom:"top",top:"bottom"};function yO(e,t,n){return Do(e,Ip(t,n))}function ov(e,t){return typeof e=="function"?e(t):e}function Fo(e){return e.split("-")[0]}function sv(e){return e.split("-")[1]}function S5(e){return e==="x"?"y":"x"}function E5(e){return e==="y"?"height":"width"}function jl(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function k5(e){return S5(jl(e))}function uV(e,t,n){n===void 0&&(n=!1);const r=sv(e),i=k5(e),a=E5(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=$p(o)),[o,$p(o)]}function cV(e){const t=$p(e);return[ox(e),t,ox(t)]}function ox(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const bO=["left","right"],xO=["right","left"],fV=["top","bottom"],dV=["bottom","top"];function hV(e,t,n){switch(e){case"top":case"bottom":return n?t?xO:bO:t?bO:xO;case"left":case"right":return t?fV:dV;default:return[]}}function pV(e,t,n,r){const i=sv(e);let a=hV(Fo(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(ox)))),a}function $p(e){const t=Fo(e);return sV[t]+e.slice(t.length)}function mV(e){return{top:0,right:0,bottom:0,left:0,...e}}function vV(e){return typeof e!="number"?mV(e):{top:e,right:e,bottom:e,left:e}}function Bp(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var gV=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],sx=gV.join(","),_5=typeof Element>"u",Tf=_5?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fp=!_5&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Up=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",o=a||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Up(t.parentNode));return o},yV=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},bV=function(t,n,r){if(Up(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(sx));return n&&Tf.call(t,sx)&&i.unshift(t),i=i.filter(r),i},ux=function(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!Up(o,!1))if(o.tagName==="SLOT"){var u=o.assignedElements(),c=u.length?u:o.children,f=ux(c,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:o,candidates:f})}else{var h=Tf.call(o,sx);h&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var p=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),v=!Up(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(p&&v){var g=ux(p===!0?o.children:p.children,!0,r);r.flatten?i.push.apply(i,g):i.push({scopeParent:o,candidates:g})}else a.unshift.apply(a,o.children)}}return i},A5=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},C5=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||yV(t))&&!A5(t)?0:t.tabIndex},xV=function(t,n){var r=C5(t);return r<0&&n&&!A5(t)?0:r},wV=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},O5=function(t){return t.tagName==="INPUT"},SV=function(t){return O5(t)&&t.type==="hidden"},EV=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},kV=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},_V=function(t){if(!t.name)return!0;var n=t.form||Fp(t),r=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=kV(i,t.form);return!a||a===t},AV=function(t){return O5(t)&&t.type==="radio"},CV=function(t){return AV(t)&&!_V(t)},OV=function(t){var n,r=t&&Fp(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var o,u,c;for(a=!!((o=i)!==null&&o!==void 0&&(u=o.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!a&&i;){var f,h,p;r=Fp(i),i=(f=r)===null||f===void 0?void 0:f.host,a=!!((h=i)!==null&&h!==void 0&&(p=h.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return a},wO=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},jV=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var a=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(t).visibility==="hidden")return!0;var o=Tf.call(t,"details>summary:first-of-type"),u=o?t.parentElement:t;if(Tf.call(u,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var c=t;t;){var f=t.parentElement,h=Fp(t);if(f&&!f.shadowRoot&&i(f)===!0)return wO(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=c}if(OV(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return wO(t);return!1},TV=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Tf.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},NV=function(t,n){return!(n.disabled||SV(n)||jV(n,t)||EV(n)||TV(n))},SO=function(t,n){return!(CV(n)||C5(n)<0||!NV(t,n))},RV=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},j5=function(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,u=o?i.scopeParent:i,c=xV(u,o),f=o?j5(i.candidates):u;c===0?o?n.push.apply(n,f):n.push(u):r.push({documentOrder:a,tabIndex:c,item:i,isScope:o,content:f})}),r.sort(wV).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},T5=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ux([t],n.includeContainer,{filter:SO.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:RV}):r=bV(t,n.includeContainer,SO.bind(null,n)),j5(r)};function PV(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function MV(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function N5(){return/apple/i.test(navigator.vendor)}function DV(){return PV().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function zV(){return MV().includes("jsdom/")}const EO="data-floating-ui-focusable",IV="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function cx(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Cu(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ax(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function lu(e){return"composedPath"in e?e.composedPath()[0]:e.target}function R0(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function LV(e){return e.matches("html,body")}function Ji(e){return e?.ownerDocument||document}function $V(e){return ki(e)&&e.matches(IV)}function BV(e){if(!e||zV())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function FV(e){return e?e.hasAttribute(EO)?e:e.querySelector("["+EO+"]")||e:null}function xp(e,t,n){return n===void 0&&(n=!0),e.filter(i=>{var a;return i.parentId===t&&(!n||((a=i.context)==null?void 0:a.open))}).flatMap(i=>[i,...xp(e,i.id,n)])}function UV(e){return"nativeEvent"in e}function fx(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}var qV=typeof document<"u",HV=function(){},xi=qV?_.useLayoutEffect:HV;const ZV={...jw};function Tl(e){const t=_.useRef(e);return xi(()=>{t.current=e}),t}const KV=ZV.useInsertionEffect,VV=KV||(e=>e());function Qi(e){const t=_.useRef(()=>{});return VV(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const R5=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function P5(e,t){const n=T5(e,R5()),r=n.length;if(r===0)return;const i=cx(Ji(e)),a=n.indexOf(i),o=a===-1?t===1?0:r-1:a+t;return n[o]}function YV(e){return P5(Ji(e).body,1)||e}function GV(e){return P5(Ji(e).body,-1)||e}function P0(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Cu(n,r)}function WV(e){T5(e,R5()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function kO(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function _O(e,t,n){let{reference:r,floating:i}=e;const a=jl(t),o=k5(t),u=E5(o),c=Fo(t),f=a==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,v=r[u]/2-i[u]/2;let g;switch(c){case"top":g={x:h,y:r.y-i.height};break;case"bottom":g={x:h,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-i.width,y:p};break;default:g={x:r.x,y:r.y}}switch(sv(t)){case"start":g[o]-=v*(n&&f?-1:1);break;case"end":g[o]+=v*(n&&f?-1:1);break}return g}async function XV(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:u,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:v=!1,padding:g=0}=ov(t,e),y=vV(g),E=u[v?p==="floating"?"reference":"floating":p],k=Bp(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(E)))==null||n?E:E.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:c})),C=p==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),O=await(a.isElement==null?void 0:a.isElement(A))?await(a.getScale==null?void 0:a.getScale(A))||{x:1,y:1}:{x:1,y:1},T=Bp(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:C,offsetParent:A,strategy:c}):C);return{top:(k.top-T.top+y.top)/O.y,bottom:(T.bottom-k.bottom+y.bottom)/O.y,left:(k.left-T.left+y.left)/O.x,right:(T.right-k.right+y.right)/O.x}}const QV=50,JV=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,u=o.detectOverflow?o:{...o,detectOverflow:XV},c=await(o.isRTL==null?void 0:o.isRTL(t));let f=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=_O(f,r,c),v=r,g=0;const y={};for(let x=0;x<a.length;x++){const E=a[x];if(!E)continue;const{name:k,fn:C}=E,{x:A,y:O,data:T,reset:j}=await C({x:h,y:p,initialPlacement:r,placement:v,strategy:i,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});h=A??h,p=O??p,y[k]={...y[k],...T},j&&g<QV&&(g++,typeof j=="object"&&(j.placement&&(v=j.placement),j.rects&&(f=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):j.rects),{x:h,y:p}=_O(f,v,c)),x=-1)}return{x:h,y:p,placement:v,strategy:i,middlewareData:y}},eY=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:u,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:x=!0,...E}=ov(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const k=Fo(i),C=jl(u),A=Fo(u)===u,O=await(c.isRTL==null?void 0:c.isRTL(f.floating)),T=v||(A||!x?[$p(u)]:cV(u)),j=y!=="none";!v&&j&&T.push(...pV(u,x,y,O));const R=[u,...T],I=await c.detectOverflow(t,E),M=[];let P=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&M.push(I[k]),p){const H=uV(i,o,O);M.push(I[H[0]],I[H[1]])}if(P=[...P,{placement:i,overflows:M}],!M.every(H=>H<=0)){var B,$;const H=(((B=a.flip)==null?void 0:B.index)||0)+1,Z=R[H];if(Z&&(!(p==="alignment"?C!==jl(Z):!1)||P.every(K=>jl(K.placement)===C?K.overflows[0]>0:!0)))return{data:{index:H,overflows:P},reset:{placement:Z}};let U=($=P.filter(q=>q.overflows[0]<=0).sort((q,K)=>q.overflows[1]-K.overflows[1])[0])==null?void 0:$.placement;if(!U)switch(g){case"bestFit":{var G;const q=(G=P.filter(K=>{if(j){const Q=jl(K.placement);return Q===C||Q==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(Q=>Q>0).reduce((Q,z)=>Q+z,0)]).sort((K,Q)=>K[1]-Q[1])[0])==null?void 0:G[0];q&&(U=q);break}case"initialPlacement":U=u;break}if(i!==U)return{reset:{placement:U}}}return{}}}},tY=new Set(["left","top"]);async function nY(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Fo(n),u=sv(n),c=jl(n)==="y",f=tY.has(o)?-1:1,h=a&&c?-1:1,p=ov(t,e);let{mainAxis:v,crossAxis:g,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof y=="number"&&(g=u==="end"?y*-1:y),c?{x:g*h,y:v*f}:{x:v*f,y:g*h}}const rY=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:u}=t,c=await nY(t,e);return o===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},iY=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:u=!1,limiter:c={fn:k=>{let{x:C,y:A}=k;return{x:C,y:A}}},...f}=ov(e,t),h={x:n,y:r},p=await a.detectOverflow(t,f),v=jl(Fo(i)),g=S5(v);let y=h[g],x=h[v];if(o){const k=g==="y"?"top":"left",C=g==="y"?"bottom":"right",A=y+p[k],O=y-p[C];y=yO(A,y,O)}if(u){const k=v==="y"?"top":"left",C=v==="y"?"bottom":"right",A=x+p[k],O=x-p[C];x=yO(A,x,O)}const E=c.fn({...t,[g]:y,[v]:x});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[g]:o,[v]:u}}}}}};function M5(e){const t=wi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ki(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,u=Lp(n)!==a||Lp(r)!==o;return u&&(n=a,r=o),{width:n,height:r,$:u}}function Jw(e){return Gt(e)?e:e.contextElement}function vu(e){const t=Jw(e);if(!ki(t))return na(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=M5(t);let o=(a?Lp(n.width):n.width)/r,u=(a?Lp(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const aY=na(0);function D5(e){const t=Nr(e);return!av()||!t.visualViewport?aY:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lY(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nr(e)?!1:t}function Uo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Jw(e);let o=na(1);t&&(r?Gt(r)&&(o=vu(r)):o=vu(e));const u=lY(a,n,r)?D5(a):na(0);let c=(i.left+u.x)/o.x,f=(i.top+u.y)/o.y,h=i.width/o.x,p=i.height/o.y;if(a){const v=Nr(a),g=r&&Gt(r)?Nr(r):r;let y=v,x=lx(y);for(;x&&r&&g!==y;){const E=vu(x),k=x.getBoundingClientRect(),C=wi(x),A=k.left+(x.clientLeft+parseFloat(C.paddingLeft))*E.x,O=k.top+(x.clientTop+parseFloat(C.paddingTop))*E.y;c*=E.x,f*=E.y,h*=E.x,p*=E.y,c+=A,f+=O,y=Nr(x),x=lx(y)}}return Bp({width:h,height:p,x:c,y:f})}function uv(e,t){const n=lv(e).scrollLeft;return t?t.left+n:Uo(da(e)).left+n}function z5(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-uv(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function oY(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=da(r),u=t?iv(t.floating):!1;if(r===o||u&&a)return n;let c={scrollLeft:0,scrollTop:0},f=na(1);const h=na(0),p=ki(r);if((p||!p&&!a)&&((Fu(r)!=="body"||ed(o))&&(c=lv(r)),p)){const g=Uo(r);f=vu(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}const v=o&&!p&&!a?z5(o,c):na(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+v.x,y:n.y*f.y-c.scrollTop*f.y+h.y+v.y}}function sY(e){return Array.from(e.getClientRects())}function uY(e){const t=da(e),n=lv(e),r=e.ownerDocument.body,i=Do(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Do(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+uv(e);const u=-n.scrollTop;return wi(r).direction==="rtl"&&(o+=Do(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:u}}const AO=25;function cY(e,t){const n=Nr(e),r=da(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,u=0,c=0;if(i){a=i.width,o=i.height;const h=av();(!h||h&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const f=uv(r);if(f<=0){const h=r.ownerDocument,p=h.body,v=getComputedStyle(p),g=h.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,y=Math.abs(r.clientWidth-p.clientWidth-g);y<=AO&&(a-=y)}else f<=AO&&(a+=f);return{width:a,height:o,x:u,y:c}}function fY(e,t){const n=Uo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ki(e)?vu(e):na(1),o=e.clientWidth*a.x,u=e.clientHeight*a.y,c=i*a.x,f=r*a.y;return{width:o,height:u,x:c,y:f}}function CO(e,t,n){let r;if(t==="viewport")r=cY(e,n);else if(t==="document")r=uY(da(e));else if(Gt(t))r=fY(t,n);else{const i=D5(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Bp(r)}function I5(e,t){const n=Fa(e);return n===t||!Gt(n)||La(n)?!1:wi(n).position==="fixed"||I5(n,t)}function dY(e,t){const n=t.get(e);if(n)return n;let r=Pl(e,[],!1).filter(u=>Gt(u)&&Fu(u)!=="body"),i=null;const a=wi(e).position==="fixed";let o=a?Fa(e):e;for(;Gt(o)&&!La(o);){const u=wi(o),c=Qw(o);!c&&u.position==="fixed"&&(i=null),(a?!c&&!i:!c&&u.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||ed(o)&&!c&&I5(e,o))?r=r.filter(h=>h!==o):i=u,o=Fa(o)}return t.set(e,r),r}function hY(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?iv(t)?[]:dY(t,this._c):[].concat(n),r],u=CO(t,o[0],i);let c=u.top,f=u.right,h=u.bottom,p=u.left;for(let v=1;v<o.length;v++){const g=CO(t,o[v],i);c=Do(g.top,c),f=Ip(g.right,f),h=Ip(g.bottom,h),p=Do(g.left,p)}return{width:f-p,height:h-c,x:p,y:c}}function pY(e){const{width:t,height:n}=M5(e);return{width:t,height:n}}function mY(e,t,n){const r=ki(t),i=da(t),a=n==="fixed",o=Uo(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const c=na(0);function f(){c.x=uv(i)}if(r||!r&&!a)if((Fu(t)!=="body"||ed(i))&&(u=lv(t)),r){const g=Uo(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else i&&f();a&&!r&&i&&f();const h=i&&!r&&!a?z5(i,u):na(0),p=o.left+u.scrollLeft-c.x-h.x,v=o.top+u.scrollTop-c.y-h.y;return{x:p,y:v,width:o.width,height:o.height}}function M0(e){return wi(e).position==="static"}function OO(e,t){if(!ki(e)||wi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return da(e)===n&&(n=n.ownerDocument.body),n}function L5(e,t){const n=Nr(e);if(iv(e))return n;if(!ki(e)){let i=Fa(e);for(;i&&!La(i);){if(Gt(i)&&!M0(i))return i;i=Fa(i)}return n}let r=OO(e,t);for(;r&&iV(r)&&M0(r);)r=OO(r,t);return r&&La(r)&&M0(r)&&!Qw(r)?n:r||oV(e)||n}const vY=async function(e){const t=this.getOffsetParent||L5,n=this.getDimensions,r=await n(e.floating);return{reference:mY(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gY(e){return wi(e).direction==="rtl"}const yY={convertOffsetParentRelativeRectToViewportRelativeRect:oY,getDocumentElement:da,getClippingRect:hY,getOffsetParent:L5,getElementRects:vY,getClientRects:sY,getDimensions:pY,getScale:vu,isElement:Gt,isRTL:gY};function $5(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bY(e,t){let n=null,r;const i=da(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function o(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),a();const f=e.getBoundingClientRect(),{left:h,top:p,width:v,height:g}=f;if(u||t(),!v||!g)return;const y=Vh(p),x=Vh(i.clientWidth-(h+v)),E=Vh(i.clientHeight-(p+g)),k=Vh(h),A={rootMargin:-y+"px "+-x+"px "+-E+"px "+-k+"px",threshold:Do(0,Ip(1,c))||1};let O=!0;function T(j){const R=j[0].intersectionRatio;if(R!==c){if(!O)return o();R?o(!1,R):r=setTimeout(()=>{o(!1,1e-7)},1e3)}R===1&&!$5(f,e.getBoundingClientRect())&&o(),O=!1}try{n=new IntersectionObserver(T,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,A)}n.observe(e)}return o(!0),a}function xY(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=Jw(e),h=i||a?[...f?Pl(f):[],...t?Pl(t):[]]:[];h.forEach(k=>{i&&k.addEventListener("scroll",n,{passive:!0}),a&&k.addEventListener("resize",n)});const p=f&&u?bY(f,n):null;let v=-1,g=null;o&&(g=new ResizeObserver(k=>{let[C]=k;C&&C.target===f&&g&&t&&(g.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var A;(A=g)==null||A.observe(t)})),n()}),f&&!c&&g.observe(f),t&&g.observe(t));let y,x=c?Uo(e):null;c&&E();function E(){const k=Uo(e);x&&!$5(x,k)&&n(),x=k,y=requestAnimationFrame(E)}return n(),()=>{var k;h.forEach(C=>{i&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),p?.(),(k=g)==null||k.disconnect(),g=null,c&&cancelAnimationFrame(y)}}const wY=rY,SY=iY,EY=eY,kY=(e,t,n)=>{const r=new Map,i={platform:yY,...n},a={...i.platform,_c:r};return JV(e,t,{...i,platform:a})};var _Y=typeof document<"u",AY=function(){},wp=_Y?_.useLayoutEffect:AY;function qp(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,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!qp(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!qp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function B5(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jO(e,t){const n=B5(e);return Math.round(t*n)/n}function D0(e){const t=_.useRef(e);return wp(()=>{t.current=e}),t}function CY(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:u=!0,whileElementsMounted:c,open:f}=e,[h,p]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,g]=_.useState(r);qp(v,r)||g(r);const[y,x]=_.useState(null),[E,k]=_.useState(null),C=_.useCallback(K=>{K!==j.current&&(j.current=K,x(K))},[]),A=_.useCallback(K=>{K!==R.current&&(R.current=K,k(K))},[]),O=a||y,T=o||E,j=_.useRef(null),R=_.useRef(null),I=_.useRef(h),M=c!=null,P=D0(c),B=D0(i),$=D0(f),G=_.useCallback(()=>{if(!j.current||!R.current)return;const K={placement:t,strategy:n,middleware:v};B.current&&(K.platform=B.current),kY(j.current,R.current,K).then(Q=>{const z={...Q,isPositioned:$.current!==!1};H.current&&!qp(I.current,z)&&(I.current=z,Qf.flushSync(()=>{p(z)}))})},[v,t,n,B,$]);wp(()=>{f===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,p(K=>({...K,isPositioned:!1})))},[f]);const H=_.useRef(!1);wp(()=>(H.current=!0,()=>{H.current=!1}),[]),wp(()=>{if(O&&(j.current=O),T&&(R.current=T),O&&T){if(P.current)return P.current(O,T,G);G()}},[O,T,G,P,M]);const Z=_.useMemo(()=>({reference:j,floating:R,setReference:C,setFloating:A}),[C,A]),U=_.useMemo(()=>({reference:O,floating:T}),[O,T]),q=_.useMemo(()=>{const K={position:n,left:0,top:0};if(!U.floating)return K;const Q=jO(U.floating,h.x),z=jO(U.floating,h.y);return u?{...K,transform:"translate("+Q+"px, "+z+"px)",...B5(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:z}},[n,u,U.floating,h.x,h.y]);return _.useMemo(()=>({...h,update:G,refs:Z,elements:U,floatingStyles:q}),[h,G,Z,U,q])}const OY=(e,t)=>{const n=wY(e);return{name:n.name,fn:n.fn,options:[e,t]}},jY=(e,t)=>{const n=SY(e);return{name:n.name,fn:n.fn,options:[e,t]}},TY=(e,t)=>{const n=EY(e);return{name:n.name,fn:n.fn,options:[e,t]}};function NY(e){const t=_.useRef(void 0),n=_.useCallback(r=>{const i=e.map(a=>{if(a!=null){if(typeof a=="function"){const o=a,u=o(r);return typeof u=="function"?u:()=>{o(null)}}return a.current=r,()=>{a.current=null}}});return()=>{i.forEach(a=>a?.())}},e);return _.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const RY="data-floating-ui-focusable",TO="active",NO="selected",PY={...jw};let RO=!1,MY=0;const PO=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+MY++;function DY(){const[e,t]=_.useState(()=>RO?PO():void 0);return xi(()=>{e==null&&t(PO())},[]),_.useEffect(()=>{RO=!0},[]),e}const zY=PY.useId,eS=zY||DY;function IY(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const LY=_.createContext(null),$Y=_.createContext(null),tS=()=>{var e;return((e=_.useContext(LY))==null?void 0:e.id)||null},nS=()=>_.useContext($Y);function td(e){return"data-floating-ui-"+e}function pi(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const MO=td("safe-polygon");function z0(e,t,n){if(n&&!fx(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function I0(e){return typeof e=="function"?e():e}function BY(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:u=!0,delay:c=0,handleClose:f=null,mouseOnly:h=!1,restMs:p=0,move:v=!0}=t,g=nS(),y=tS(),x=Tl(f),E=Tl(c),k=Tl(n),C=Tl(p),A=_.useRef(),O=_.useRef(-1),T=_.useRef(),j=_.useRef(-1),R=_.useRef(!0),I=_.useRef(!1),M=_.useRef(()=>{}),P=_.useRef(!1),B=Qi(()=>{var q;const K=(q=i.current.openEvent)==null?void 0:q.type;return K?.includes("mouse")&&K!=="mousedown"});_.useEffect(()=>{if(!u)return;function q(K){let{open:Q}=K;Q||(pi(O),pi(j),R.current=!0,P.current=!1)}return a.on("openchange",q),()=>{a.off("openchange",q)}},[u,a]),_.useEffect(()=>{if(!u||!x.current||!n)return;function q(Q){B()&&r(!1,Q,"hover")}const K=Ji(o.floating).documentElement;return K.addEventListener("mouseleave",q),()=>{K.removeEventListener("mouseleave",q)}},[o.floating,n,r,u,x,B]);const $=_.useCallback(function(q,K,Q){K===void 0&&(K=!0),Q===void 0&&(Q="hover");const z=z0(E.current,"close",A.current);z&&!T.current?(pi(O),O.current=window.setTimeout(()=>r(!1,q,Q),z)):K&&(pi(O),r(!1,q,Q))},[E,r]),G=Qi(()=>{M.current(),T.current=void 0}),H=Qi(()=>{if(I.current){const q=Ji(o.floating).body;q.style.pointerEvents="",q.removeAttribute(MO),I.current=!1}}),Z=Qi(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);_.useEffect(()=>{if(!u)return;function q(V){if(pi(O),R.current=!1,h&&!fx(A.current)||I0(C.current)>0&&!z0(E.current,"open"))return;const D=z0(E.current,"open",A.current);D?O.current=window.setTimeout(()=>{k.current||r(!0,V,"hover")},D):n||r(!0,V,"hover")}function K(V){if(Z()){H();return}M.current();const D=Ji(o.floating);if(pi(j),P.current=!1,x.current&&i.current.floatingContext){n||pi(O),T.current=x.current({...i.current.floatingContext,tree:g,x:V.clientX,y:V.clientY,onClose(){H(),G(),Z()||$(V,!0,"safe-polygon")}});const ne=T.current;D.addEventListener("mousemove",ne),M.current=()=>{D.removeEventListener("mousemove",ne)};return}(A.current!=="touch"||!Cu(o.floating,V.relatedTarget))&&$(V)}function Q(V){Z()||i.current.floatingContext&&(x.current==null||x.current({...i.current.floatingContext,tree:g,x:V.clientX,y:V.clientY,onClose(){H(),G(),Z()||$(V)}})(V))}function z(){pi(O)}function F(V){Z()||$(V,!1)}if(Gt(o.domReference)){const V=o.domReference,D=o.floating;return n&&V.addEventListener("mouseleave",Q),v&&V.addEventListener("mousemove",q,{once:!0}),V.addEventListener("mouseenter",q),V.addEventListener("mouseleave",K),D&&(D.addEventListener("mouseleave",Q),D.addEventListener("mouseenter",z),D.addEventListener("mouseleave",F)),()=>{n&&V.removeEventListener("mouseleave",Q),v&&V.removeEventListener("mousemove",q),V.removeEventListener("mouseenter",q),V.removeEventListener("mouseleave",K),D&&(D.removeEventListener("mouseleave",Q),D.removeEventListener("mouseenter",z),D.removeEventListener("mouseleave",F))}}},[o,u,e,h,v,$,G,H,r,n,k,g,E,x,i,Z,C]),xi(()=>{var q;if(u&&n&&(q=x.current)!=null&&(q=q.__options)!=null&&q.blockPointerEvents&&B()){I.current=!0;const Q=o.floating;if(Gt(o.domReference)&&Q){var K;const z=Ji(o.floating).body;z.setAttribute(MO,"");const F=o.domReference,V=g==null||(K=g.nodesRef.current.find(D=>D.id===y))==null||(K=K.context)==null?void 0:K.elements.floating;return V&&(V.style.pointerEvents=""),z.style.pointerEvents="none",F.style.pointerEvents="auto",Q.style.pointerEvents="auto",()=>{z.style.pointerEvents="",F.style.pointerEvents="",Q.style.pointerEvents=""}}}},[u,n,y,o,g,x,B]),xi(()=>{n||(A.current=void 0,P.current=!1,G(),H())},[n,G,H]),_.useEffect(()=>()=>{G(),pi(O),pi(j),H()},[u,o.domReference,G,H]);const U=_.useMemo(()=>{function q(K){A.current=K.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove(K){const{nativeEvent:Q}=K;function z(){!R.current&&!k.current&&r(!0,Q,"hover")}h&&!fx(A.current)||n||I0(C.current)===0||P.current&&K.movementX**2+K.movementY**2<2||(pi(j),A.current==="touch"?z():(P.current=!0,j.current=window.setTimeout(z,I0(C.current))))}}},[h,r,n,k,C]);return _.useMemo(()=>u?{reference:U}:{},[u,U])}const FY={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},DO=_.forwardRef(function(t,n){const[r,i]=_.useState();xi(()=>{N5()&&i("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[td("focus-guard")]:"",style:FY};return w.jsx("span",{...t,...a})}),UY={clipPath:"inset(50%)",position:"fixed",top:0,left:0},F5=_.createContext(null),zO=td("portal");function qY(e){e===void 0&&(e={});const{id:t,root:n}=e,r=eS(),i=ZY(),[a,o]=_.useState(null),u=_.useRef(null);return xi(()=>()=>{a?.remove(),queueMicrotask(()=>{u.current=null})},[a]),xi(()=>{if(!r||u.current)return;const c=t?document.getElementById(t):null;if(!c)return;const f=document.createElement("div");f.id=r,f.setAttribute(zO,""),c.appendChild(f),u.current=f,o(f)},[t,r]),xi(()=>{if(n===null||!r||u.current)return;let c=n||i?.portalNode;c&&!Xw(c)&&(c=c.current),c=c||document.body;let f=null;t&&(f=document.createElement("div"),f.id=t,c.appendChild(f));const h=document.createElement("div");h.id=r,h.setAttribute(zO,""),c=f||c,c.appendChild(h),u.current=h,o(h)},[t,n,r,i]),a}function HY(e){const{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=qY({id:n,root:r}),[o,u]=_.useState(null),c=_.useRef(null),f=_.useRef(null),h=_.useRef(null),p=_.useRef(null),v=o?.modal,g=o?.open,y=!!o&&!o.modal&&o.open&&i&&!!(r||a);return _.useEffect(()=>{if(!a||!i||v)return;function x(E){a&&P0(E)&&(E.type==="focusin"?kO:WV)(a)}return a.addEventListener("focusin",x,!0),a.addEventListener("focusout",x,!0),()=>{a.removeEventListener("focusin",x,!0),a.removeEventListener("focusout",x,!0)}},[a,i,v]),_.useEffect(()=>{a&&(g||kO(a))},[g,a]),w.jsxs(F5.Provider,{value:_.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:f,beforeInsideRef:h,afterInsideRef:p,portalNode:a,setFocusManagerState:u}),[i,a]),children:[y&&a&&w.jsx(DO,{"data-type":"outside",ref:c,onFocus:x=>{if(P0(x,a)){var E;(E=h.current)==null||E.focus()}else{const k=o?o.domReference:null,C=GV(k);C?.focus()}}}),y&&a&&w.jsx("span",{"aria-owns":a.id,style:UY}),a&&Qf.createPortal(t,a),y&&a&&w.jsx(DO,{"data-type":"outside",ref:f,onFocus:x=>{if(P0(x,a)){var E;(E=p.current)==null||E.focus()}else{const k=o?o.domReference:null,C=YV(k);C?.focus(),o?.closeOnFocusOut&&o?.onOpenChange(!1,x.nativeEvent,"focus-out")}}})]})}const ZY=()=>_.useContext(F5),KY={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},VY={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},IO=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function YY(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:u=!0,outsidePress:c=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:p="pointerdown",ancestorScroll:v=!1,bubbles:g,capture:y}=t,x=nS(),E=Qi(typeof c=="function"?c:()=>!1),k=typeof c=="function"?E:c,C=_.useRef(!1),{escapeKey:A,outsidePress:O}=IO(g),{escapeKey:T,outsidePress:j}=IO(y),R=_.useRef(!1),I=Qi(H=>{var Z;if(!n||!o||!u||H.key!=="Escape"||R.current)return;const U=(Z=a.current.floatingContext)==null?void 0:Z.nodeId,q=x?xp(x.nodesRef.current,U):[];if(!A&&(H.stopPropagation(),q.length>0)){let K=!0;if(q.forEach(Q=>{var z;if((z=Q.context)!=null&&z.open&&!Q.context.dataRef.current.__escapeKeyBubbles){K=!1;return}}),!K)return}r(!1,UV(H)?H.nativeEvent:H,"escape-key")}),M=Qi(H=>{var Z;const U=()=>{var q;I(H),(q=lu(H))==null||q.removeEventListener("keydown",U)};(Z=lu(H))==null||Z.addEventListener("keydown",U)}),P=Qi(H=>{var Z;const U=a.current.insideReactTree;a.current.insideReactTree=!1;const q=C.current;if(C.current=!1,f==="click"&&q||U||typeof k=="function"&&!k(H))return;const K=lu(H),Q="["+td("inert")+"]",z=Ji(i.floating).querySelectorAll(Q);let F=Gt(K)?K:null;for(;F&&!La(F);){const ne=Fa(F);if(La(ne)||!Gt(ne))break;F=ne}if(z.length&&Gt(K)&&!LV(K)&&!Cu(K,i.floating)&&Array.from(z).every(ne=>!Cu(F,ne)))return;if(ki(K)&&G){const ne=La(K),te=wi(K),fe=/auto|scroll/,ge=ne||fe.test(te.overflowX),ie=ne||fe.test(te.overflowY),le=ge&&K.clientWidth>0&&K.scrollWidth>K.clientWidth,ye=ie&&K.clientHeight>0&&K.scrollHeight>K.clientHeight,J=te.direction==="rtl",_e=ye&&(J?H.offsetX<=K.offsetWidth-K.clientWidth:H.offsetX>K.clientWidth),ke=le&&H.offsetY>K.clientHeight;if(_e||ke)return}const V=(Z=a.current.floatingContext)==null?void 0:Z.nodeId,D=x&&xp(x.nodesRef.current,V).some(ne=>{var te;return R0(H,(te=ne.context)==null?void 0:te.elements.floating)});if(R0(H,i.floating)||R0(H,i.domReference)||D)return;const re=x?xp(x.nodesRef.current,V):[];if(re.length>0){let ne=!0;if(re.forEach(te=>{var fe;if((fe=te.context)!=null&&fe.open&&!te.context.dataRef.current.__outsidePressBubbles){ne=!1;return}}),!ne)return}r(!1,H,"outside-press")}),B=Qi(H=>{var Z;const U=()=>{var q;P(H),(q=lu(H))==null||q.removeEventListener(f,U)};(Z=lu(H))==null||Z.addEventListener(f,U)});_.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=A,a.current.__outsidePressBubbles=O;let H=-1;function Z(z){r(!1,z,"ancestor-scroll")}function U(){window.clearTimeout(H),R.current=!0}function q(){H=window.setTimeout(()=>{R.current=!1},av()?5:0)}const K=Ji(i.floating);u&&(K.addEventListener("keydown",T?M:I,T),K.addEventListener("compositionstart",U),K.addEventListener("compositionend",q)),k&&K.addEventListener(f,j?B:P,j);let Q=[];return v&&(Gt(i.domReference)&&(Q=Pl(i.domReference)),Gt(i.floating)&&(Q=Q.concat(Pl(i.floating))),!Gt(i.reference)&&i.reference&&i.reference.contextElement&&(Q=Q.concat(Pl(i.reference.contextElement)))),Q=Q.filter(z=>{var F;return z!==((F=K.defaultView)==null?void 0:F.visualViewport)}),Q.forEach(z=>{z.addEventListener("scroll",Z,{passive:!0})}),()=>{u&&(K.removeEventListener("keydown",T?M:I,T),K.removeEventListener("compositionstart",U),K.removeEventListener("compositionend",q)),k&&K.removeEventListener(f,j?B:P,j),Q.forEach(z=>{z.removeEventListener("scroll",Z)}),window.clearTimeout(H)}},[a,i,u,k,f,n,r,v,o,A,O,I,T,M,P,j,B]),_.useEffect(()=>{a.current.insideReactTree=!1},[a,k,f]);const $=_.useMemo(()=>({onKeyDown:I,...h&&{[KY[p]]:H=>{r(!1,H.nativeEvent,"reference-press")},...p!=="click"&&{onClick(H){r(!1,H.nativeEvent,"reference-press")}}}}),[I,r,h,p]),G=_.useMemo(()=>{function H(Z){Z.button===0&&(C.current=!0)}return{onKeyDown:I,onMouseDown:H,onMouseUp:H,[VY[f]]:()=>{a.current.insideReactTree=!0}}},[I,f,a]);return _.useMemo(()=>o?{reference:$,floating:G}:{},[o,$,G])}function GY(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=eS(),a=_.useRef({}),[o]=_.useState(()=>IY()),u=tS()!=null,[c,f]=_.useState(r.reference),h=Qi((g,y,x)=>{a.current.openEvent=g?y:void 0,o.emit("openchange",{open:g,event:y,reason:x,nested:u}),n?.(g,y,x)}),p=_.useMemo(()=>({setPositionReference:f}),[]),v=_.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return _.useMemo(()=>({dataRef:a,open:t,onOpenChange:h,elements:v,events:o,floatingId:i,refs:p}),[t,h,v,o,i,p])}function WY(e){e===void 0&&(e={});const{nodeId:t}=e,n=GY({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=_.useState(null),[u,c]=_.useState(null),h=i?.domReference||a,p=_.useRef(null),v=nS();xi(()=>{h&&(p.current=h)},[h]);const g=CY({...e,elements:{...i,...u&&{reference:u}}}),y=_.useCallback(A=>{const O=Gt(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;c(O),g.refs.setReference(O)},[g.refs]),x=_.useCallback(A=>{(Gt(A)||A===null)&&(p.current=A,o(A)),(Gt(g.refs.reference.current)||g.refs.reference.current===null||A!==null&&!Gt(A))&&g.refs.setReference(A)},[g.refs]),E=_.useMemo(()=>({...g.refs,setReference:x,setPositionReference:y,domReference:p}),[g.refs,x,y]),k=_.useMemo(()=>({...g.elements,domReference:h}),[g.elements,h]),C=_.useMemo(()=>({...g,...r,refs:E,elements:k,nodeId:t}),[g,E,k,t,r]);return xi(()=>{r.dataRef.current.floatingContext=C;const A=v?.nodesRef.current.find(O=>O.id===t);A&&(A.context=C)}),_.useMemo(()=>({...g,context:C,refs:E,elements:k}),[g,E,k,C])}function L0(){return DV()&&N5()}function XY(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:u=!0,visibleOnly:c=!0}=t,f=_.useRef(!1),h=_.useRef(-1),p=_.useRef(!0);_.useEffect(()=>{if(!u)return;const g=Nr(o.domReference);function y(){!n&&ki(o.domReference)&&o.domReference===cx(Ji(o.domReference))&&(f.current=!0)}function x(){p.current=!0}function E(){p.current=!1}return g.addEventListener("blur",y),L0()&&(g.addEventListener("keydown",x,!0),g.addEventListener("pointerdown",E,!0)),()=>{g.removeEventListener("blur",y),L0()&&(g.removeEventListener("keydown",x,!0),g.removeEventListener("pointerdown",E,!0))}},[o.domReference,n,u]),_.useEffect(()=>{if(!u)return;function g(y){let{reason:x}=y;(x==="reference-press"||x==="escape-key")&&(f.current=!0)}return i.on("openchange",g),()=>{i.off("openchange",g)}},[i,u]),_.useEffect(()=>()=>{pi(h)},[]);const v=_.useMemo(()=>({onMouseLeave(){f.current=!1},onFocus(g){if(f.current)return;const y=lu(g.nativeEvent);if(c&&Gt(y)){if(L0()&&!g.relatedTarget){if(!p.current&&!$V(y))return}else if(!BV(y))return}r(!0,g.nativeEvent,"focus")},onBlur(g){f.current=!1;const y=g.relatedTarget,x=g.nativeEvent,E=Gt(y)&&y.hasAttribute(td("focus-guard"))&&y.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var k;const C=cx(o.domReference?o.domReference.ownerDocument:document);!y&&C===o.domReference||Cu((k=a.current.floatingContext)==null?void 0:k.refs.floating.current,C)||Cu(o.domReference,C)||E||r(!1,x,"focus")})}}),[a,o.domReference,r,c]);return _.useMemo(()=>u?{reference:v}:{},[u,v])}function $0(e,t,n){const r=new Map,i=n==="item";let a=e;if(i&&e){const{[TO]:o,[NO]:u,...c}=e;a=c}return{...n==="floating"&&{tabIndex:-1,[RY]:""},...a,...t.map(o=>{const u=o?o[n]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((o,u)=>(u&&Object.entries(u).forEach(c=>{let[f,h]=c;if(!(i&&[TO,NO].includes(f)))if(f.indexOf("on")===0){if(r.has(f)||r.set(f,[]),typeof h=="function"){var p;(p=r.get(f))==null||p.push(h),o[f]=function(){for(var v,g=arguments.length,y=new Array(g),x=0;x<g;x++)y[x]=arguments[x];return(v=r.get(f))==null?void 0:v.map(E=>E(...y)).find(E=>E!==void 0)}}}else o[f]=h}),o),{})}}function QY(e){e===void 0&&(e=[]);const t=e.map(u=>u?.reference),n=e.map(u=>u?.floating),r=e.map(u=>u?.item),i=_.useCallback(u=>$0(u,e,"reference"),t),a=_.useCallback(u=>$0(u,e,"floating"),n),o=_.useCallback(u=>$0(u,e,"item"),r);return _.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}const JY=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function eG(e,t){var n,r;t===void 0&&(t={});const{open:i,elements:a,floatingId:o}=e,{enabled:u=!0,role:c="dialog"}=t,f=eS(),h=((n=a.domReference)==null?void 0:n.id)||f,p=_.useMemo(()=>{var C;return((C=FV(a.floating))==null?void 0:C.id)||o},[a.floating,o]),v=(r=JY.get(c))!=null?r:c,y=tS()!=null,x=_.useMemo(()=>v==="tooltip"||c==="label"?{["aria-"+(c==="label"?"labelledby":"describedby")]:i?p:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":v==="alertdialog"?"dialog":v,"aria-controls":i?p:void 0,...v==="listbox"&&{role:"combobox"},...v==="menu"&&{id:h},...v==="menu"&&y&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[v,p,y,i,h,c]),E=_.useMemo(()=>{const C={id:p,...v&&{role:v}};return v==="tooltip"||c==="label"?C:{...C,...v==="menu"&&{"aria-labelledby":h}}},[v,p,h,c]),k=_.useCallback(C=>{let{active:A,selected:O}=C;const T={role:"option",...A&&{id:p+"-fui-option"}};switch(c){case"select":case"combobox":return{...T,"aria-selected":O}}return{}},[p,c]);return _.useMemo(()=>u?{reference:x,floating:E,item:k}:{},[u,x,E,k])}const LO=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ys(e,t){return typeof e=="function"?e(t):e}function tG(e,t){const[n,r]=_.useState(e);return e&&!n&&r(!0),_.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function nG(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,o=(typeof i=="number"?i:i.close)||0,[u,c]=_.useState("unmounted"),f=tG(n,o);return!f&&u==="close"&&c("unmounted"),xi(()=>{if(r){if(n){c("initial");const h=requestAnimationFrame(()=>{Qf.flushSync(()=>{c("open")})});return()=>{cancelAnimationFrame(h)}}c("close")}},[n,r]),{isMounted:f,status:u}}function rG(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:a,duration:o=250}=t,u=e.placement,c=u.split("-")[0],f=_.useMemo(()=>({side:c,placement:u}),[c,u]),h=typeof o=="number",p=(h?o:o.open)||0,v=(h?o:o.close)||0,[g,y]=_.useState(()=>({...Ys(a,f),...Ys(n,f)})),{isMounted:x,status:E}=nG(e,{duration:o}),k=Tl(n),C=Tl(r),A=Tl(i),O=Tl(a);return xi(()=>{const T=Ys(k.current,f),j=Ys(A.current,f),R=Ys(O.current,f),I=Ys(C.current,f)||Object.keys(T).reduce((M,P)=>(M[P]="",M),{});if(E==="initial"&&y(M=>({transitionProperty:M.transitionProperty,...R,...T})),E==="open"&&y({transitionProperty:Object.keys(I).map(LO).join(","),transitionDuration:p+"ms",...R,...I}),E==="close"){const M=j||T;y({transitionProperty:Object.keys(M).map(LO).join(","),transitionDuration:v+"ms",...R,...M})}},[v,A,k,C,O,p,E,f]),{isMounted:x,styles:g}}const On=({content:e,placement:t="top",children:n})=>{const[r,i]=_.useState(!1),{refs:a,floatingStyles:o,context:u}=WY({open:r,onOpenChange:i,placement:t,middleware:[OY(5),TY(),jY({padding:4})],whileElementsMounted:xY}),c=BY(u,{move:!1,delay:{open:400,close:0}}),f=XY(u),h=YY(u),p=eG(u,{role:"tooltip"}),{getReferenceProps:v,getFloatingProps:g}=QY([c,f,h,p]),y=v(),x=g(),{isMounted:E,styles:k}=rG(u,{duration:150,initial:{opacity:0}}),C=NY([a.setReference,n.props.ref]);return e?w.jsxs(w.Fragment,{children:[_.cloneElement(n,{ref:C,...y}),E&&w.jsx(HY,{children:w.jsx("div",{ref:a.setFloating,style:{...o,...k},...x,className:Gw([x],"v1fkevfp-1"),children:e})})]}):n},iG=3,aG=/0+$/;function lG(e){const t=e?.maxDecimalPlaces??iG;return{minimumFractionDigits:Math.min(e?.minDecimalPlaces??0,t),maximumFractionDigits:t}}function oG(e,t){const n=e.toFixed(t.maximumFractionDigits);if(t.minimumFractionDigits===0)return Number(n).toString();const[r="0",i=""]=n.split("."),o=i.replace(aG,"").padEnd(t.minimumFractionDigits,"0");return o.length>0?`${r}.${o}`:r}function nr(e,t=void 0){if(e==null)return"—";const n=lG(t),r=t?.notation==="compact"?new Intl.NumberFormat(void 0,{notation:"compact",compactDisplay:t.compactDisplay??"short",...n}).format(e):oG(e,n);return`${t?.prefix??""}${r}${t?.suffix??""}`}function qo(e,t){return e.format==="number"?nr(t,e.numberFormat):e.format==="duration"?Gn(t):e.format==="percent"?nd(t):e.format==="passFail"?cv(t):e.format==="stars"?iS(t,e.maxStars):e.isScore===!0?Nf(t):nr(t)}function Gn(e){if(e==null)return"—";if(e<1e3)return`${Math.round(e)}ms`;if(e<1e4)return`${(e/1e3).toFixed(2)}s`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;const t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return`${t}m ${n}s`}function Nf(e){return e==null?"—":e.toFixed(2)}function cv(e){return e==null?"—":e>=.5?"pass":"fail"}function Ou(e){return e===void 0||!Number.isFinite(e)?5:Math.max(2,Math.floor(e))}function rS(e,t){return e==null?null:Math.max(0,Math.min(Ou(t),Math.round(e*Ou(t))))}function sG(e,t){return Math.max(0,Math.min(1,e/Ou(t)))}function iS(e,t){const n=rS(e,t);return n===null?"—":`${n}/${String(Ou(t))}`}function nd(e){return e==null?"—":`${Math.round(e*100)}%`}function ju(e){const t=new Date(e),n=new Date,r=t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()&&t.getDate()===n.getDate(),i=t.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"});if(r)return`Today ${i}`;const a=new Date(n);return a.setDate(n.getDate()-1),t.getFullYear()===a.getFullYear()&&t.getMonth()===a.getMonth()&&t.getDate()===a.getDate()?`Yesterday ${i}`:`${t.toLocaleDateString(void 0,{month:"short",day:"numeric"})} ${i}`}const U5="—";function Vc(e){return typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):e===null?"null":e===void 0?U5:JSON.stringify(e)}function q5(e){const{rawValue:t,format:n,numberFormat:r}=e;return t===null?U5:n==="number"?typeof t=="number"&&Number.isFinite(t)?nr(t,r):Vc(t):n==="duration"?typeof t=="number"&&Number.isFinite(t)?Gn(t):Vc(t):n==="boolean"?typeof t=="boolean"?t?"Yes":"No":Vc(t):n==="json"?typeof t=="string"||typeof t=="number"?Vc(t):w.jsx(vr,{value:t,compact:!0,maxHeight:"raw",collapsed:6}):Vc(t)}function Gs(e){const t=Be.c(7),{label:n,data:r}=e;let i;t[0]!==n?(i=w.jsx("div",{className:"vaa4w49-21",children:n}),t[0]=n,t[1]=i):i=t[1];let a;t[2]!==r?(a=w.jsx(vr,{value:r,compact:!0,maxHeight:"raw",collapsed:6}),t[2]=r,t[3]=a):a=t[3];let o;return t[4]!==i||t[5]!==a?(o=w.jsxs("div",{className:"vaa4w49-20",children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function uG(e){if(!URL.canParse(e))return e;const t=new URL(e);return`${t.host}${t.pathname}${t.search}`}function H5(e){return`${e.label}-${e.placements.join(",")}`}function cG(e){if(e===null)return null;const t=e>=200&&e<300,n=e>=300&&e<400,r=e>=400;return w.jsx("span",{className:"vaa4w49-8"+(t?" vo1w49k":"")+(n?" vk87out":"")+(r?" vlmxlf9":""),children:e})}function fG(e){const t=Be.c(51),{entry:n}=e,[r,i]=_.useState(!1);let a;if(t[0]!==n.durationMs||t[1]!==n.error||t[2]!==n.errorPayload||t[3]!==n.headers||t[4]!==n.method||t[5]!==n.metrics||t[6]!==n.name||t[7]!==n.request||t[8]!==n.requestBody||t[9]!==n.response||t[10]!==n.responseBody||t[11]!==n.status||t[12]!==n.statusCode||t[13]!==n.url||t[14]!==n.warnings||t[15]!==r){const o=n.metrics.filter(gG),u=n.metrics.filter(vG);let c;t[17]!==n.durationMs?(c=n.durationMs===null?null:Gn(n.durationMs),t[17]=n.durationMs,t[18]=c):c=t[18];const f=c;let h;t[19]!==n.method?(h=n.method===null?null:n.method.toUpperCase(),t[19]=n.method,t[20]=h):h=t[20];const p=h;let v;t[21]!==n.url?(v=n.url===null?null:uG(n.url),t[21]=n.url,t[22]=v):v=t[22];const g=v;let y;t[23]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{i(mG)},t[23]=y):y=t[23];let x;t[24]!==r?(x=w.jsx("span",{className:"vaa4w49-3",children:r?w.jsx(Ll,{}):w.jsx(Zl,{})}),t[24]=r,t[25]=x):x=t[25];let E;t[26]!==n.name?(E=w.jsx("span",{className:"vaa4w49-4",children:n.name}),t[26]=n.name,t[27]=E):E=t[27];let k;t[28]!==n.status?(k=w.jsx($l,{status:n.status}),t[28]=n.status,t[29]=k):k=t[29];let C;t[30]!==p?(C=p!==null?w.jsx("span",{className:"vaa4w49-6",children:p}):null,t[30]=p,t[31]=C):C=t[31];let A;t[32]!==n.url||t[33]!==g?(A=g!==null?w.jsx(On,{content:n.url??void 0,children:w.jsx("span",{className:"vaa4w49-7",children:g})}):null,t[32]=n.url,t[33]=g,t[34]=A):A=t[34];let O;t[35]!==n.statusCode?(O=cG(n.statusCode),t[35]=n.statusCode,t[36]=O):O=t[36];let T;t[37]!==f?(T=f!==null?w.jsx("span",{children:f}):null,t[37]=f,t[38]=T):T=t[38];const j=o.map(pG);let R;t[39]!==A||t[40]!==O||t[41]!==T||t[42]!==j||t[43]!==k||t[44]!==C?(R=w.jsxs("span",{className:"vaa4w49-5",children:[k,C,A,O,T,j]}),t[39]=A,t[40]=O,t[41]=T,t[42]=j,t[43]=k,t[44]=C,t[45]=R):R=t[45];let I;t[46]!==r||t[47]!==R||t[48]!==x||t[49]!==E?(I=w.jsxs("button",{type:"button",onClick:y,"aria-expanded":r,className:"vaa4w49-2",children:[x,E,R]}),t[46]=r,t[47]=R,t[48]=x,t[49]=E,t[50]=I):I=t[50],a=w.jsxs("div",{className:"vaa4w49-1",children:[I,r?w.jsxs("div",{className:"vaa4w49-11",children:[n.url!==null||p!==null||n.statusCode!==null||f!==null?w.jsxs("div",{className:"vaa4w49-12",children:[p!==null?w.jsxs("div",{className:"vaa4w49-13",children:[w.jsx("span",{className:"vaa4w49-14",children:"Method"}),w.jsx("span",{className:"vaa4w49-15",children:p})]}):null,n.url!==null?w.jsxs("div",{className:"vaa4w49-13",children:[w.jsx("span",{className:"vaa4w49-14",children:"URL"}),w.jsx("span",{className:"vaa4w49-15",children:n.url})]}):null,n.statusCode!==null?w.jsxs("div",{className:"vaa4w49-13",children:[w.jsx("span",{className:"vaa4w49-14",children:"Status"}),w.jsx("span",{className:"vaa4w49-15",children:n.statusCode})]}):null,f!==null?w.jsxs("div",{className:"vaa4w49-13",children:[w.jsx("span",{className:"vaa4w49-14",children:"Duration"}),w.jsx("span",{className:"vaa4w49-15",children:f})]}):null]}):null,u.length>0?w.jsx("div",{className:"vaa4w49-19",children:u.map(hG)}):null,n.request!==void 0?w.jsx(Gs,{label:"Request",data:n.request}):null,n.requestBody!==void 0?w.jsx(Gs,{label:"Request body",data:n.requestBody}):null,n.response!==void 0?w.jsx(Gs,{label:"Response",data:n.response}):null,n.responseBody!==void 0?w.jsx(Gs,{label:"Response body",data:n.responseBody}):null,n.headers!==void 0?w.jsx(Gs,{label:"Headers",data:n.headers}):null,n.errorPayload!==void 0?w.jsx(Gs,{label:"Error",data:n.errorPayload}):null,n.warnings.map(dG),n.error!==null?w.jsxs("div",{className:"vaa4w49-22",children:[w.jsxs("div",{className:"vaa4w49-23",children:[n.error.name??"Error",": ",n.error.message]}),n.error.stack?w.jsx("pre",{className:"vaa4w49-24",children:n.error.stack}):null]}):null]}):null]}),t[0]=n.durationMs,t[1]=n.error,t[2]=n.errorPayload,t[3]=n.headers,t[4]=n.method,t[5]=n.metrics,t[6]=n.name,t[7]=n.request,t[8]=n.requestBody,t[9]=n.response,t[10]=n.responseBody,t[11]=n.status,t[12]=n.statusCode,t[13]=n.url,t[14]=n.warnings,t[15]=r,t[16]=a}else a=t[16];return a}function dG(e,t){return w.jsxs("div",{className:"vaa4w49-25",children:[w.jsxs("div",{className:"vaa4w49-26",children:[e.name??"Warning",": ",e.message]}),e.stack?w.jsx("pre",{className:"vaa4w49-24",children:e.stack}):null]},`${e.message}-${String(t)}`)}function hG(e){return w.jsxs("div",{className:"vaa4w49-16",children:[w.jsx(On,{content:e.tooltip,children:w.jsx("span",{className:"vaa4w49-17",children:e.label})}),w.jsx("span",{className:"vaa4w49-18",children:q5(e)})]},H5(e))}function pG(e){return w.jsx(On,{content:e.tooltip,children:w.jsxs("span",{className:"vaa4w49-9",children:[w.jsx("span",{className:"vaa4w49-10",children:e.label}),q5(e)]})},H5(e))}function mG(e){return!e}function vG(e){return e.placements.includes("body")}function gG(e){return e.placements.includes("header")}function Z5(e){const t=_.useRef(!1),[n,r]=_.useState(!1);return _.useMemo(()=>{async function i(...a){if(t.current)return null;t.current=!0,r(!0);try{return await e(...a)}finally{t.current=!1,r(!1)}}return{get isInProgress(){return t.current},call:i}},[e,n])}function K5(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function V5(e){return typeof e=="function"}function yG(e){return K5(e)&&"then"in e&&V5(e.then)}function $O(e){try{return JSON.stringify(e)}catch{return}}function B0(){return this.value}function bG(e){return this.ok?xf(e(this.value)):this}function xG(e){return this.ok?this:yu(e(this.error))}function Y5({ok:e,err:t}){return this.ok?xf(e(this.value)):yu(t(this.error))}function gu(){return this}function BO(e){return this.ok&&e(this.value),this}function FO(e){return this.ok||e(this.error),this}function xf(e=void 0){return{ok:!0,error:!1,value:e,...{unwrapOrNull:B0,unwrapOr:B0,unwrap:B0,mapOk:bG,mapErr:gu,mapOkAndErr:Y5,ifOk:BO,ifErr:gu,onOk:BO,onErr:gu}}}function yu(e){return{ok:!1,error:e,errorResult(){return yu(e)},...{unwrapOrNull:()=>null,unwrapOr:n=>n,unwrap:()=>{throw e instanceof Error?e:Sp(e)},mapOk:gu,mapErr:xG,mapOkAndErr:Y5,ifOk:gu,onOk:gu,ifErr:FO,onErr:FO}}}function it(e,t){if(!V5(e))return e.then(n=>xf(n)).catch(n=>yu(Sp(n)));try{const n=e();return yG(n)?n.then(r=>xf(r)).catch(r=>yu(t?t(r):Sp(r))):xf(n)}catch(n){return yu(Sp(n))}}function Sp(e){return e instanceof Error?e:typeof e=="string"?new Error(e):K5(e)?new Error("message"in e&&e.message&&typeof e.message=="string"?e.message:$O(e)??"unknown",{cause:e}):new Error($O(e)??"unknown",{cause:e})}function fv(e){const t=Be.c(14);let n,r,i,a,o,u;if(t[0]!==e){const{variant:f,leftIcon:h,rightIcon:p,children:v,...g}=e;r=h,i=p,n=v;const y=f===void 0?"secondary":f;a="button",o=g,u=b5(Gw([g],"v1yv3uow-1"),y==="primary"&&"v1d37md8",y==="secondary"&&"v1kpy128",y==="ghost"&&"vhmrut",y==="danger"&&"vs705h9"),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=u}else n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],u=t[6];let c;return t[7]!==n||t[8]!==r||t[9]!==i||t[10]!==a||t[11]!==o||t[12]!==u?(c=w.jsxs("button",{type:a,...o,className:u,children:[r,n,i]}),t[7]=n,t[8]=r,t[9]=i,t[10]=a,t[11]=o,t[12]=u,t[13]=c):c=t[13],c}function wG(e){return e.length<=14?e:`${e.slice(0,12)}…`}function UO(e){return`/api/cache/${encodeURIComponent(e.namespace)}/${encodeURIComponent(e.key)}`}function SG(e){const t=Be.c(70),{entry:n}=e,[r,i]=_.useState(!1);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={status:"idle"},t[0]=a):a=t[0];const[o,u]=_.useState(a),[c,f]=_.useState(null);let h;t[1]!==n||t[2]!==o.status?(h=async function(){if(o.status==="loading"||o.status==="loaded"||o.status==="deleted")return;u({status:"loading"});const ne=await it(()=>fetch(UO(n)));if(ne.error){u({status:"error",message:ne.error.message});return}const te=ne.value;if(!te.ok){u({status:"error",message:`cache entry not available (${String(te.status)})`});return}const fe=await it(()=>te.json());if(fe.error){u({status:"error",message:fe.error.message});return}const ge=it(()=>WH.parse(fe.value));if(ge.error){u({status:"error",message:ge.error.message});return}u({status:"loaded",entry:ge.value})},t[1]=n,t[2]=o.status,t[3]=h):h=t[3];const p=h;let v;t[4]!==n?(v=async()=>{if(!window.confirm("Delete this cached entry?"))return;f(null);const re=await it(()=>fetch(UO(n),{method:"DELETE"}));if(re.error){f(re.error.message);return}if(!re.value.ok&&re.value.status!==404){f(`cache entry could not be deleted (${String(re.value.status)})`);return}u({status:"deleted"})},t[4]=n,t[5]=v):v=t[5];const g=Z5(v);let y;t[6]!==r||t[7]!==p?(y=function(){if(r){i(!1);return}i(!0),p()},t[6]=r,t[7]=p,t[8]=y):y=t[8];const x=y;let E;t[9]!==n.age?(E=n.age!==void 0?Gn(n.age):null,t[9]=n.age,t[10]=E):E=t[10];const k=E,C=n.storedAt??(o.status==="loaded"?o.entry.storedAt:void 0),A=o.status==="loaded"?o.entry.recording.finalAttributes:null;let O;t[11]!==A?(O=A!==null&&Object.keys(A).length>0,t[11]=A,t[12]=O):O=t[12];const T=O;let j;t[13]!==r?(j=w.jsx("span",{className:"v1rexbf3-3",children:r?w.jsx(Ll,{}):w.jsx(Zl,{})}),t[13]=r,t[14]=j):j=t[14];const R="v1rexbf3-5"+(n.action==="hit"?" v1psnf3c":"")+(n.action==="added"?" v126sfoy":"");let I;t[15]!==n?(I=EG(n),t[15]=n,t[16]=I):I=t[16];let M;t[17]!==R||t[18]!==I?(M=w.jsx("span",{className:R,children:I}),t[17]=R,t[18]=I,t[19]=M):M=t[19];const P=n.source==="span"?"SPAN":"VALUE";let B;t[20]!==P?(B=w.jsx("span",{className:"v1rexbf3-4",children:P}),t[20]=P,t[21]=B):B=t[21];let $;t[22]!==n.name?($=w.jsx("span",{className:"v1rexbf3-6",children:n.name}),t[22]=n.name,t[23]=$):$=t[23];let G;t[24]!==n.origin?(G=n.origin==="caseRoot"?w.jsx("span",{className:"v1rexbf3-7",children:"(case root)"}):null,t[24]=n.origin,t[25]=G):G=t[25];let H;t[26]!==o.status?(H=o.status==="deleted"?w.jsx("span",{children:"deleted"}):null,t[26]=o.status,t[27]=H):H=t[27];let Z;t[28]!==k?(Z=k!==null?w.jsxs("span",{children:[k," old"]}):null,t[28]=k,t[29]=Z):Z=t[29];let U;t[30]!==n.action||t[31]!==n.status?(U=n.action==="added"&&n.status==="miss"?w.jsx("span",{children:"created"}):null,t[30]=n.action,t[31]=n.status,t[32]=U):U=t[32];let q;t[33]!==n.status?(q=n.status==="refresh"?w.jsx("span",{children:"refreshed"}):null,t[33]=n.status,t[34]=q):q=t[34];let K;t[35]!==n.key?(K=wG(n.key),t[35]=n.key,t[36]=K):K=t[36];let Q;t[37]!==K?(Q=w.jsx("span",{children:K}),t[37]=K,t[38]=Q):Q=t[38];let z;t[39]!==H||t[40]!==Z||t[41]!==U||t[42]!==q||t[43]!==Q?(z=w.jsxs("span",{className:"v1rexbf3-8",children:[H,Z,U,q,Q]}),t[39]=H,t[40]=Z,t[41]=U,t[42]=q,t[43]=Q,t[44]=z):z=t[44];let F;t[45]!==r||t[46]!==x||t[47]!==M||t[48]!==B||t[49]!==$||t[50]!==G||t[51]!==z||t[52]!==j?(F=w.jsxs("button",{type:"button",onClick:x,"aria-expanded":r,className:"v1rexbf3-2",children:[j,M,B,$,G,z]}),t[45]=r,t[46]=x,t[47]=M,t[48]=B,t[49]=$,t[50]=G,t[51]=z,t[52]=j,t[53]=F):F=t[53];let V;t[54]!==g||t[55]!==c||t[56]!==n.key||t[57]!==n.namespace||t[58]!==n.status||t[59]!==r||t[60]!==o.entry||t[61]!==o.message||t[62]!==o.status||t[63]!==A||t[64]!==T||t[65]!==C?(V=r?w.jsxs("div",{className:"v1rexbf3-9",children:[w.jsxs("div",{className:"v1rexbf3-10",children:[w.jsxs("span",{className:"v1rexbf3-11",children:[w.jsx("span",{className:"v1rexbf3-12",children:"NS"}),w.jsx("span",{className:"v1rexbf3-13",children:n.namespace})]}),C!==void 0?w.jsxs("span",{className:"v1rexbf3-11",children:[w.jsx("span",{className:"v1rexbf3-12",children:"STORED"}),w.jsx("span",{className:"v1rexbf3-13",children:ju(C)})]}):null,w.jsxs("span",{className:"v1rexbf3-11",children:[w.jsx("span",{className:"v1rexbf3-12",children:"STATUS"}),w.jsx("span",{className:"v1rexbf3-13",children:n.status})]}),w.jsxs("span",{className:"v1rexbf3-11",children:[w.jsx("span",{className:"v1rexbf3-12",children:"KEY"}),w.jsx("span",{className:"v1rexbf3-13",children:n.key})]})]}),o.status==="loading"?w.jsx("div",{className:"v1rexbf3-16",children:"Loading cached value…"}):null,o.status==="error"?w.jsxs("div",{className:"v1rexbf3-17",children:["Could not load cached value: ",o.message]}):null,c!==null?w.jsxs("div",{className:"v1rexbf3-17",children:["Could not delete cached value: ",c]}):null,o.status==="deleted"?w.jsx("div",{className:"v1rexbf3-16",children:"Cached entry deleted."}):null,o.status==="loaded"?w.jsxs(w.Fragment,{children:[o.entry.debugKey!==void 0?w.jsxs("div",{className:"v1rexbf3-14",children:[w.jsx("div",{className:"v1rexbf3-15",children:"Raw cache key"}),w.jsx(vr,{value:o.entry.debugKey.rawKey,compact:!0,maxHeight:"raw",collapsed:4})]}):null,w.jsxs("div",{className:"v1rexbf3-14",children:[w.jsx("div",{className:"v1rexbf3-15",children:"Cached return value"}),w.jsx(vr,{value:o.entry.recording.returnValue,compact:!0,maxHeight:"raw",collapsed:6})]}),T?w.jsxs("div",{className:"v1rexbf3-14",children:[w.jsx("div",{className:"v1rexbf3-15",children:"Replayed span attributes"}),w.jsx(vr,{value:A,compact:!0,maxHeight:"raw",collapsed:6})]}):null]}):null,w.jsx("div",{className:"v1rexbf3-18",children:w.jsx(fv,{variant:"danger",leftIcon:w.jsx(jK,{}),disabled:o.status==="deleted"||g.isInProgress,onClick:()=>{g.call()},children:o.status==="deleted"?"Deleted":"Delete cache entry"})})]}):null,t[54]=g,t[55]=c,t[56]=n.key,t[57]=n.namespace,t[58]=n.status,t[59]=r,t[60]=o.entry,t[61]=o.message,t[62]=o.status,t[63]=A,t[64]=T,t[65]=C,t[66]=V):V=t[66];let D;return t[67]!==F||t[68]!==V?(D=w.jsxs("div",{className:"v1rexbf3-1",children:[F,V]}),t[67]=F,t[68]=V,t[69]=D):D=t[69],D}function EG(e){return e.status==="hit"?"HIT":e.status==="refresh"?"REFRESHED":"ADDED"}function Ho(e){const t=Be.c(10);let n,r,i,a;if(t[0]!==e){const{children:u,size:c,...f}=e;n=u;const h=c===void 0?"sm":c;r="button",i=f,a=b5(Gw([f],"v4yt9wa-1"),h==="md"&&"van04w6"),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;return t[5]!==n||t[6]!==r||t[7]!==i||t[8]!==a?(o=w.jsx("button",{type:r,...i,className:a,children:n}),t[5]=n,t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}const dx={eval:"Execute",derive:"Derive",outputsSchema:"Outputs schema",scorer:"Scorer"},qO=220,kG=/[?#]/,_G=/\/$/;function AG(e){const t=["eval","derive","outputsSchema","scorer"],n=new Set(e.map(r=>r.phase));return t.filter(r=>n.has(r))}function CG(e){const t=Be.c(24),{logs:n,phases:r,selectedPhase:i,onPhaseChange:a,workspaceRoot:o}=e,u=String(n.length);let c;t[0]!==u?(c=w.jsxs("span",{className:"v1tlpqbe-2",children:[u," entries"]}),t[0]=u,t[1]=c):c=t[1];let f;t[2]!==a?(f=k=>{a(LG(k.currentTarget.value))},t[2]=a,t[3]=f):f=t[3];let h;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=w.jsx("option",{value:"all",children:"All phases"}),t[4]=h):h=t[4];let p;t[5]!==r?(p=r.map(OG),t[5]=r,t[6]=p):p=t[6];let v;t[7]!==i||t[8]!==f||t[9]!==p?(v=w.jsxs("select",{value:i,onChange:f,"aria-label":"Filter logs by phase",className:"v1tlpqbe-3",children:[h,p]}),t[7]=i,t[8]=f,t[9]=p,t[10]=v):v=t[10];let g;t[11]!==c||t[12]!==v?(g=w.jsxs("div",{className:"v1tlpqbe-1",children:[c,v]}),t[11]=c,t[12]=v,t[13]=g):g=t[13];let y;if(t[14]!==n||t[15]!==o){let k;t[17]!==o?(k=(C,A)=>w.jsx(jG,{entry:C,workspaceRoot:o},`${C.timestamp}-${String(A)}`),t[17]=o,t[18]=k):k=t[18],y=n.map(k),t[14]=n,t[15]=o,t[16]=y}else y=t[16];let x;t[19]!==y?(x=w.jsx("div",{className:"v1tlpqbe-4",children:y}),t[19]=y,t[20]=x):x=t[20];let E;return t[21]!==g||t[22]!==x?(E=w.jsxs(w.Fragment,{children:[g,x]}),t[21]=g,t[22]=x,t[23]=E):E=t[23],E}function OG(e){return w.jsx("option",{value:e,children:dx[e]},e)}function jG(e){const t=Be.c(41),{entry:n,workspaceRoot:r}=e,[i,a]=_.useState(!1),o=n.location;let u;if(t[0]!==n.args||t[1]!==n.level||t[2]!==n.message||t[3]!==n.phase||t[4]!==n.source||t[5]!==n.timestamp||t[6]!==n.truncated||t[7]!==i||t[8]!==o||t[9]!==r){const c=o?RG(o):void 0;let f;t[11]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a(TG),t[11]=f):f=t[11];let h;t[12]!==i?(h=w.jsx("span",{className:"v1tlpqbe-8",children:i?w.jsx(Ll,{}):w.jsx(Zl,{})}),t[12]=i,t[13]=h):h=t[13];const p="v1tlpqbe-11"+(n.level==="info"?" v1tefpko":"")+(n.level==="warn"?" vpsgjsu":"")+(n.level==="error"?" v10doxfa":"");let v;t[14]!==n.level||t[15]!==p?(v=w.jsx("span",{className:p,children:n.level}),t[14]=n.level,t[15]=p,t[16]=v):v=t[16];let g;t[17]!==n.message?(g=IG(n.message),t[17]=n.message,t[18]=g):g=t[18];let y;t[19]!==g?(y=w.jsx("span",{className:"v1tlpqbe-14",children:g}),t[19]=g,t[20]=y):y=t[20];let x;t[21]!==n.timestamp?(x=$G(n.timestamp),t[21]=n.timestamp,t[22]=x):x=t[22];let E;t[23]!==x?(E=w.jsx("span",{className:"v1tlpqbe-10",children:x}),t[23]=x,t[24]=E):E=t[24];const k=dx[n.phase],C=n.source?` / ${n.source}`:"";let A;t[25]!==k||t[26]!==C?(A=w.jsxs("span",{className:"v1tlpqbe-12",children:[k,C]}),t[25]=k,t[26]=C,t[27]=A):A=t[27];const O=c?w.jsx("span",{className:"v1tlpqbe-13",children:MG(c)}):null;let T;t[28]!==n.truncated?(T=n.truncated?w.jsx("span",{className:"v1tlpqbe-25",children:"truncated"}):null,t[28]=n.truncated,t[29]=T):T=t[29];let j;t[30]!==A||t[31]!==O||t[32]!==T||t[33]!==E?(j=w.jsxs("div",{className:"v1tlpqbe-9",children:[E,A,O,T]}),t[30]=A,t[31]=O,t[32]=T,t[33]=E,t[34]=j):j=t[34];let R;t[35]!==i||t[36]!==j||t[37]!==h||t[38]!==v||t[39]!==y?(R=w.jsx("div",{className:"v1tlpqbe-6",children:w.jsxs("button",{onClick:f,"aria-expanded":i,className:"v1tlpqbe-7",children:[h,v,y,j]})}),t[35]=i,t[36]=j,t[37]=h,t[38]=v,t[39]=y,t[40]=R):R=t[40],u=w.jsxs("div",{className:"v1tlpqbe-5",children:[R,i?w.jsxs("div",{className:"v1tlpqbe-18",children:[w.jsxs("div",{className:"v1tlpqbe-19",children:[w.jsxs("span",{className:"v1tlpqbe-20",children:[w.jsx("span",{className:"v1tlpqbe-22",children:"phase"}),w.jsx("span",{className:"v1tlpqbe-23",children:dx[n.phase]})]}),n.source?w.jsxs("span",{className:"v1tlpqbe-20",children:[w.jsx("span",{className:"v1tlpqbe-22",children:"source"}),w.jsx("span",{className:"v1tlpqbe-23",children:n.source})]}):null,w.jsxs("span",{className:"v1tlpqbe-20",children:[w.jsx("span",{className:"v1tlpqbe-22",children:"time"}),w.jsx("span",{className:"v1tlpqbe-23",children:n.timestamp})]}),c?w.jsxs("span",{className:"v1tlpqbe-21",children:[w.jsx("span",{className:"v1tlpqbe-22",children:"location"}),w.jsx("span",{className:"v1tlpqbe-24",children:DG(c,r)}),w.jsx(On,{content:"Open in editor",children:w.jsx(Ho,{"aria-label":"Open log location in editor",onClick:()=>{NG(c)},children:w.jsx(Bw,{})})})]}):null]}),n.args.length>0?w.jsxs("div",{className:"v1tlpqbe-16",children:[w.jsx("div",{className:"v1tlpqbe-17",children:"Arguments"}),w.jsx(vr,{value:n.args.length===1?n.args[0]:n.args,compact:!0,maxHeight:"raw",collapsed:1})]}):w.jsx("pre",{className:"v1tlpqbe-15",children:n.message})]}):null]}),t[0]=n.args,t[1]=n.level,t[2]=n.message,t[3]=n.phase,t[4]=n.source,t[5]=n.timestamp,t[6]=n.truncated,t[7]=i,t[8]=o,t[9]=r,t[10]=u}else u=t[10];return u}function TG(e){return!e}async function NG(e){await it(()=>fetch("/api/runs/actions/open-location",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}))}function RG(e){return{...e,file:PG(e.file)}}function PG(e){return e.split(kG,1)[0]??e}function MG(e){return e===void 0?"":`${e.file.split("/").at(-1)??e.file}:${String(e.line)}`}function DG(e,t){return e===void 0?"":`${zG(e.file,t)}:${String(e.line)}:${String(e.column)}`}function zG(e,t){if(t.length===0)return e;const n=e.replaceAll("\\","/"),r=t.replaceAll("\\","/").replace(_G,"");if(n===r)return".";const i=`${r}/`;return n.startsWith(i)?n.slice(i.length):e}function IG(e){const t=e.split(`
|
|
48
48
|
`,1)[0]??"";return t.length===0?"(empty log)":t.length<=qO?t:`${t.slice(0,qO)}...`}function LG(e){return e==="eval"||e==="derive"||e==="outputsSchema"||e==="scorer"?e:"all"}function $G(e){const t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3}):e}function BG(e){const t=Be.c(7),{scoreColumns:n,columns:r}=e;let i;if(t[0]!==r||t[1]!==n){let o;t[3]!==r?(o=u=>{const c=r[u.key],f=typeof c=="number"&&Number.isFinite(c)?c:null,h=u.passThreshold,p=f!==null&&h!==void 0&&f>=h,v=f!==null&&h!==void 0&&f<h,g=f===null?0:Math.max(0,Math.min(1,f))*100;return w.jsxs("div",{className:"vv93a47-2",children:[w.jsxs("div",{className:"vv93a47-3",children:[w.jsx("div",{className:"vv93a47-4",children:u.label}),w.jsx("span",{className:"vv93a47-5",children:f===null?"—":qo(u,f)})]}),f!==null?w.jsx("div",{className:"vv93a47-6",children:w.jsx("div",{style:{width:`${g}%`},className:"vv93a47-7"+(p?" vvj7fxg":"")+(v?" v3q58b":"")})}):null,w.jsxs("div",{className:"vv93a47-8",children:[h!==void 0?w.jsx("span",{className:"vv93a47-9"+(p?" vvj7fxg":"")+(v?" v3q58b":""),children:f===null?"NO VALUE":p?"PASS":"FAIL"}):w.jsx("span",{className:"vv93a47-9",children:"INFO"}),h!==void 0?w.jsxs("span",{children:["threshold ",Nf(h)]}):w.jsx("span",{children:"informational"})]})]},u.key)},t[3]=r,t[4]=o):o=t[4],i=n.map(o),t[0]=r,t[1]=n,t[2]=i}else i=t[2];let a;return t[5]!==i?(a=w.jsx("div",{className:"vv93a47-1",children:i}),t[5]=i,t[6]=a):a=t[6],a}function jo(e){const t=Be.c(12),{icon:n,title:r,description:i,action:a}=e;let o;t[0]!==n?(o=n?w.jsx("div",{className:"v1f0s106-2",children:n}):null,t[0]=n,t[1]=o):o=t[1];let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=w.jsx("div",{className:"v1f0s106-3",children:"Agent evals"}),t[2]=u):u=t[2];let c;t[3]!==r?(c=w.jsx("div",{className:"v1f0s106-4",children:r}),t[3]=r,t[4]=c):c=t[4];let f;t[5]!==i?(f=i?w.jsx("div",{className:"v1f0s106-5",children:i}):null,t[5]=i,t[6]=f):f=t[6];let h;return t[7]!==a||t[8]!==o||t[9]!==c||t[10]!==f?(h=w.jsxs("div",{className:"v1f0s106-1",children:[o,u,c,f,a]}),t[7]=a,t[8]=o,t[9]=c,t[10]=f,t[11]=h):h=t[11],h}function FG(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const UG=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qG=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HG={};function HO(e,t){return(HG.jsx?qG:UG).test(e)}const ZG=/[ \t\n\f\r]/g;function KG(e){return typeof e=="object"?e.type==="text"?ZO(e.value):!1:ZO(e)}function ZO(e){return e.replace(ZG,"")===""}class rd{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}rd.prototype.normal={};rd.prototype.property={};rd.prototype.space=void 0;function G5(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new rd(n,r,t)}function hx(e){return e.toLowerCase()}class Dr{constructor(t,n){this.attribute=n,this.property=t}}Dr.prototype.attribute="";Dr.prototype.booleanish=!1;Dr.prototype.boolean=!1;Dr.prototype.commaOrSpaceSeparated=!1;Dr.prototype.commaSeparated=!1;Dr.prototype.defined=!1;Dr.prototype.mustUseProperty=!1;Dr.prototype.number=!1;Dr.prototype.overloadedBoolean=!1;Dr.prototype.property="";Dr.prototype.spaceSeparated=!1;Dr.prototype.space=void 0;let VG=0;const rt=is(),wn=is(),px=is(),xe=is(),qt=is(),bu=is(),Hr=is();function is(){return 2**++VG}const mx=Object.freeze(Object.defineProperty({__proto__:null,boolean:rt,booleanish:wn,commaOrSpaceSeparated:Hr,commaSeparated:bu,number:xe,overloadedBoolean:px,spaceSeparated:qt},Symbol.toStringTag,{value:"Module"})),F0=Object.keys(mx);class aS extends Dr{constructor(t,n,r,i){let a=-1;if(super(t,n),KO(this,"space",i),typeof r=="number")for(;++a<F0.length;){const o=F0[a];KO(this,F0[a],(r&mx[o])===mx[o])}}}aS.prototype.defined=!0;function KO(e,t,n){n&&(e[t]=n)}function Uu(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new aS(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[hx(r)]=r,n[hx(a.attribute)]=r}return new rd(t,n,e.space)}const W5=Uu({properties:{ariaActiveDescendant:null,ariaAtomic:wn,ariaAutoComplete:null,ariaBusy:wn,ariaChecked:wn,ariaColCount:xe,ariaColIndex:xe,ariaColSpan:xe,ariaControls:qt,ariaCurrent:null,ariaDescribedBy:qt,ariaDetails:null,ariaDisabled:wn,ariaDropEffect:qt,ariaErrorMessage:null,ariaExpanded:wn,ariaFlowTo:qt,ariaGrabbed:wn,ariaHasPopup:null,ariaHidden:wn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qt,ariaLevel:xe,ariaLive:null,ariaModal:wn,ariaMultiLine:wn,ariaMultiSelectable:wn,ariaOrientation:null,ariaOwns:qt,ariaPlaceholder:null,ariaPosInSet:xe,ariaPressed:wn,ariaReadOnly:wn,ariaRelevant:null,ariaRequired:wn,ariaRoleDescription:qt,ariaRowCount:xe,ariaRowIndex:xe,ariaRowSpan:xe,ariaSelected:wn,ariaSetSize:xe,ariaSort:null,ariaValueMax:xe,ariaValueMin:xe,ariaValueNow:xe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function X5(e,t){return t in e?e[t]:t}function Q5(e,t){return X5(e,t.toLowerCase())}const YG=Uu({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:bu,acceptCharset:qt,accessKey:qt,action:null,allow:null,allowFullScreen:rt,allowPaymentRequest:rt,allowUserMedia:rt,alt:null,as:null,async:rt,autoCapitalize:null,autoComplete:qt,autoFocus:rt,autoPlay:rt,blocking:qt,capture:null,charSet:null,checked:rt,cite:null,className:qt,cols:xe,colSpan:null,content:null,contentEditable:wn,controls:rt,controlsList:qt,coords:xe|bu,crossOrigin:null,data:null,dateTime:null,decoding:null,default:rt,defer:rt,dir:null,dirName:null,disabled:rt,download:px,draggable:wn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:rt,formTarget:null,headers:qt,height:xe,hidden:px,high:xe,href:null,hrefLang:null,htmlFor:qt,httpEquiv:qt,id:null,imageSizes:null,imageSrcSet:null,inert:rt,inputMode:null,integrity:null,is:null,isMap:rt,itemId:null,itemProp:qt,itemRef:qt,itemScope:rt,itemType:qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:rt,low:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,multiple:rt,muted:rt,name:null,nonce:null,noModule:rt,noValidate:rt,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:rt,optimum:xe,pattern:null,ping:qt,placeholder:null,playsInline:rt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:rt,referrerPolicy:null,rel:qt,required:rt,reversed:rt,rows:xe,rowSpan:xe,sandbox:qt,scope:null,scoped:rt,seamless:rt,selected:rt,shadowRootClonable:rt,shadowRootDelegatesFocus:rt,shadowRootMode:null,shape:null,size:xe,sizes:null,slot:null,span:xe,spellCheck:wn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:xe,step:null,style:null,tabIndex:xe,target:null,title:null,translate:null,type:null,typeMustMatch:rt,useMap:null,value:wn,width:xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qt,axis:null,background:null,bgColor:null,border:xe,borderColor:null,bottomMargin:xe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:rt,declare:rt,event:null,face:null,frame:null,frameBorder:null,hSpace:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:rt,noHref:rt,noShade:rt,noWrap:rt,object:null,profile:null,prompt:null,rev:null,rightMargin:xe,rules:null,scheme:null,scrolling:wn,standby:null,summary:null,text:null,topMargin:xe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:xe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:rt,disableRemotePlayback:rt,prefix:null,property:null,results:xe,security:null,unselectable:null},space:"html",transform:Q5}),GG=Uu({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:Hr,accentHeight:xe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:xe,amplitude:xe,arabicForm:null,ascent:xe,attributeName:null,attributeType:null,azimuth:xe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:xe,by:null,calcMode:null,capHeight:xe,className:qt,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:xe,diffuseConstant:xe,direction:null,display:null,dur:null,divisor:xe,dominantBaseline:null,download:rt,dx:null,dy:null,edgeMode:null,editable:null,elevation:xe,enableBackground:null,end:null,event:null,exponent:xe,externalResourcesRequired:null,fill:null,fillOpacity:xe,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:bu,g2:bu,glyphName:bu,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:xe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:xe,horizOriginX:xe,horizOriginY:xe,id:null,ideographic:xe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:xe,k:xe,k1:xe,k2:xe,k3:xe,k4:xe,kernelMatrix:Hr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:xe,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:xe,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:xe,overlineThickness:xe,paintOrder:null,panose1:null,path:null,pathLength:xe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xe,pointsAtY:xe,pointsAtZ:xe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hr,rev:Hr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hr,requiredFeatures:Hr,requiredFonts:Hr,requiredFormats:Hr,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:xe,specularExponent:xe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:xe,strikethroughThickness:xe,string:null,stroke:null,strokeDashArray:Hr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:xe,strokeOpacity:xe,strokeWidth:null,style:null,surfaceScale:xe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Hr,tabIndex:xe,tableValues:null,target:null,targetX:xe,targetY:xe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Hr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:xe,underlineThickness:xe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:xe,values:null,vAlphabetic:xe,vMathematical:xe,vectorEffect:null,vHanging:xe,vIdeographic:xe,version:null,vertAdvY:xe,vertOriginX:xe,vertOriginY:xe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:xe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:X5}),J5=Uu({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()}}),eM=Uu({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Q5}),tM=Uu({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),WG={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},XG=/[A-Z]/g,VO=/-[a-z]/g,QG=/^data[-\w.:]+$/i;function JG(e,t){const n=hx(t);let r=t,i=Dr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&QG.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(VO,tW);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!VO.test(a)){let o=a.replace(XG,eW);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=aS}return new i(r,t)}function eW(e){return"-"+e.toLowerCase()}function tW(e){return e.charAt(1).toUpperCase()}const nW=G5([W5,YG,J5,eM,tM],"html"),lS=G5([W5,GG,J5,eM,tM],"svg");function rW(e){return e.join(" ").trim()}var Ws={},U0,YO;function iW(){if(YO)return U0;YO=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,u=/^\s+|\s+$/g,c=`
|
|
49
49
|
`,f="/",h="*",p="",v="comment",g="declaration";function y(E,k){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];k=k||{};var C=1,A=1;function O(H){var Z=H.match(t);Z&&(C+=Z.length);var U=H.lastIndexOf(c);A=~U?H.length-U:A+H.length}function T(){var H={line:C,column:A};return function(Z){return Z.position=new j(H),M(),Z}}function j(H){this.start=H,this.end={line:C,column:A},this.source=k.source}j.prototype.content=E;function R(H){var Z=new Error(k.source+":"+C+":"+A+": "+H);if(Z.reason=H,Z.filename=k.source,Z.line=C,Z.column=A,Z.source=E,!k.silent)throw Z}function I(H){var Z=H.exec(E);if(Z){var U=Z[0];return O(U),E=E.slice(U.length),Z}}function M(){I(n)}function P(H){var Z;for(H=H||[];Z=B();)Z!==!1&&H.push(Z);return H}function B(){var H=T();if(!(f!=E.charAt(0)||h!=E.charAt(1))){for(var Z=2;p!=E.charAt(Z)&&(h!=E.charAt(Z)||f!=E.charAt(Z+1));)++Z;if(Z+=2,p===E.charAt(Z-1))return R("End of comment missing");var U=E.slice(2,Z-2);return A+=2,O(U),E=E.slice(Z),A+=2,H({type:v,comment:U})}}function $(){var H=T(),Z=I(r);if(Z){if(B(),!I(i))return R("property missing ':'");var U=I(a),q=H({type:g,property:x(Z[0].replace(e,p)),value:U?x(U[0].replace(e,p)):p});return I(o),q}}function G(){var H=[];P(H);for(var Z;Z=$();)Z!==!1&&(H.push(Z),P(H));return H}return M(),G()}function x(E){return E?E.replace(u,p):p}return U0=y,U0}var GO;function aW(){if(GO)return Ws;GO=1;var e=Ws&&Ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.default=n;const t=e(iW());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const o=(0,t.default)(r),u=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:f,value:h}=c;u?i(f,h,c):h&&(a=a||{},a[f]=h)}),a}return Ws}var Yc={},WO;function lW(){if(WO)return Yc;WO=1,Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},o=function(f,h){return h.toUpperCase()},u=function(f,h){return"".concat(h,"-")},c=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(i,u):f=f.replace(r,u),f.replace(t,o))};return Yc.camelCase=c,Yc}var Gc,XO;function oW(){if(XO)return Gc;XO=1;var e=Gc&&Gc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(aW()),n=lW();function r(i,a){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(u,c){u&&c&&(o[(0,n.camelCase)(u,a)]=c)}),o}return r.default=r,Gc=r,Gc}var sW=oW();const uW=fa(sW),nM=rM("end"),oS=rM("start");function rM(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function cW(e){const t=oS(e),n=nM(e);if(t&&n)return{start:t,end:n}}function wf(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?QO(e.position):"start"in e||"end"in e?QO(e):"line"in e||"column"in e?vx(e):""}function vx(e){return JO(e&&e.line)+":"+JO(e&&e.column)}function QO(e){return vx(e&&e.start)+"-"+vx(e&&e.end)}function JO(e){return e&&typeof e=="number"?e:1}class ar extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=wf(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ar.prototype.file="";ar.prototype.name="";ar.prototype.reason="";ar.prototype.message="";ar.prototype.stack="";ar.prototype.column=void 0;ar.prototype.line=void 0;ar.prototype.ancestors=void 0;ar.prototype.cause=void 0;ar.prototype.fatal=void 0;ar.prototype.place=void 0;ar.prototype.ruleId=void 0;ar.prototype.source=void 0;const sS={}.hasOwnProperty,fW=new Map,dW=/[A-Z]/g,hW=new Set(["table","tbody","thead","tfoot","tr"]),pW=new Set(["td","th"]),iM="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function mW(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=EW(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=SW(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?lS:nW,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=aM(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function aM(e,t,n){if(t.type==="element")return vW(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return gW(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return bW(e,t,n);if(t.type==="mdxjsEsm")return yW(e,t);if(t.type==="root")return xW(e,t,n);if(t.type==="text")return wW(e,t)}function vW(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=lS,e.schema=i),e.ancestors.push(t);const a=oM(e,t.tagName,!1),o=kW(e,t);let u=cS(e,t);return hW.has(t.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!KG(c):!0})),lM(e,o,a,t),uS(o,u),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function gW(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Rf(e,t.position)}function yW(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Rf(e,t.position)}function bW(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=lS,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:oM(e,t.name,!0),o=_W(e,t),u=cS(e,t);return lM(e,o,a,t),uS(o,u),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function xW(e,t,n){const r={};return uS(r,cS(e,t)),e.create(t,e.Fragment,r,n)}function wW(e,t){return t.value}function lM(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function uS(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function SW(e,t,n){return r;function r(i,a,o,u){const f=Array.isArray(o.children)?n:t;return u?f(a,o,u):f(a,o)}}function EW(e,t){return n;function n(r,i,a,o){const u=Array.isArray(a.children),c=oS(r);return t(i,a,o,u,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function kW(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&sS.call(t.properties,i)){const a=AW(e,i,t.properties[i]);if(a){const[o,u]=a;e.tableCellAlignToStyle&&o==="align"&&typeof u=="string"&&pW.has(t.tagName)?r=u:n[o]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function _W(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const u=o.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Rf(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else Rf(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function cS(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:fW;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const f=i.get(c)||0;o=c+"-"+f,i.set(c,f+1)}}const u=aM(e,a,o);u!==void 0&&n.push(u)}return n}function AW(e,t,n){const r=JG(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?FG(n):rW(n)),r.property==="style"){let i=typeof n=="object"?n:CW(e,String(n));return e.stylePropertyNameCase==="css"&&(i=OW(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?WG[r.property]||r.property:r.attribute,n]}}function CW(e,t){try{return uW(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ar("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=iM+"#cannot-parse-style-attribute",i}}function oM(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const u=HO(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=o}else r=HO(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return sS.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Rf(e)}function Rf(e,t){const n=new ar("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=iM+"#cannot-handle-mdx-estrees-without-createevaluater",n}function OW(e){const t={};let n;for(n in e)sS.call(e,n)&&(t[jW(n)]=e[n]);return t}function jW(e){let t=e.replace(dW,TW);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function TW(e){return"-"+e.toLowerCase()}const q0={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},NW={};function fS(e,t){const n=NW,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return sM(e,r,i)}function sM(e,t,n){if(RW(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ej(e.children,t,n)}return Array.isArray(e)?ej(e,t,n):""}function ej(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=sM(e[i],t,n);return r.join("")}function RW(e){return!!(e&&typeof e=="object")}const tj=document.createElement("i");function dS(e){const t="&"+e+";";tj.innerHTML=t;const n=tj.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Gr(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function vi(e,t){return e.length>0?(Gr(e,e.length,0,t),e):t}const nj={}.hasOwnProperty;function uM(e){const t={};let n=-1;for(;++n<e.length;)PW(t,e[n]);return t}function PW(e,t){let n;for(n in t){const i=(nj.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){nj.call(i,o)||(i[o]=[]);const u=a[o];MW(i[o],Array.isArray(u)?u:u?[u]:[])}}}function MW(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Gr(e,0,0,r)}function cM(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Pi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pr=Yl(/[A-Za-z]/),rr=Yl(/[\dA-Za-z]/),DW=Yl(/[#-'*+\--9=?A-Z^-~]/);function Hp(e){return e!==null&&(e<32||e===127)}const gx=Yl(/\d/),zW=Yl(/[\dA-Fa-f]/),IW=Yl(/[!-/:-@[-`{-~]/);function Ue(e){return e!==null&&e<-2}function Ut(e){return e!==null&&(e<0||e===32)}function ct(e){return e===-2||e===-1||e===32}const dv=Yl(new RegExp("\\p{P}|\\p{S}","u")),Zo=Yl(/\s/);function Yl(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qu(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&rr(e.charCodeAt(n+1))&&rr(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(o=String.fromCharCode(a,u),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function vt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return ct(c)?(e.enter(n),u(c)):t(c)}function u(c){return ct(c)&&a++<i?(e.consume(c),u):(e.exit(n),t(c))}}const LW={tokenize:$W};function $W(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),vt(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(u)}function o(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Ue(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),o)}}const BW={tokenize:FW},rj={tokenize:UW};function FW(e){const t=this,n=[];let r=0,i,a,o;return u;function u(A){if(r<n.length){const O=n[r];return t.containerState=O[1],e.attempt(O[0].continuation,c,f)(A)}return f(A)}function c(A){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&C();const O=t.events.length;let T=O,j;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){j=t.events[T][1].end;break}k(r);let R=O;for(;R<t.events.length;)t.events[R][1].end={...j},R++;return Gr(t.events,T+1,0,t.events.slice(O)),t.events.length=R,f(A)}return u(A)}function f(A){if(r===n.length){if(!i)return v(A);if(i.currentConstruct&&i.currentConstruct.concrete)return y(A);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(rj,h,p)(A)}function h(A){return i&&C(),k(r),v(A)}function p(A){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,y(A)}function v(A){return t.containerState={},e.attempt(rj,g,y)(A)}function g(A){return r++,n.push([t.currentConstruct,t.containerState]),v(A)}function y(A){if(A===null){i&&C(),k(0),e.consume(A);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),x(A)}function x(A){if(A===null){E(e.exit("chunkFlow"),!0),k(0),e.consume(A);return}return Ue(A)?(e.consume(A),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(A),x)}function E(A,O){const T=t.sliceStream(A);if(O&&T.push(null),A.previous=a,a&&(a.next=A),a=A,i.defineSkip(A.start),i.write(T),t.parser.lazy[A.start.line]){let j=i.events.length;for(;j--;)if(i.events[j][1].start.offset<o&&(!i.events[j][1].end||i.events[j][1].end.offset>o))return;const R=t.events.length;let I=R,M,P;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(M){P=t.events[I][1].end;break}M=!0}for(k(r),j=R;j<t.events.length;)t.events[j][1].end={...P},j++;Gr(t.events,I+1,0,t.events.slice(R)),t.events.length=j}}function k(A){let O=n.length;for(;O-- >A;){const T=n[O];t.containerState=T[1],T[0].exit.call(t,e)}n.length=A}function C(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function UW(e,t,n){return vt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Tu(e){if(e===null||Ut(e)||Zo(e))return 1;if(dv(e))return 2}function hv(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const yx={name:"attention",resolveAll:qW,tokenize:HW};function qW(e,t){let n=-1,r,i,a,o,u,c,f,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},v={...e[n][1].start};ij(p,-c),ij(v,c),o={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...u.end}},e[r][1].end={...o.start},e[n][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=vi(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=vi(f,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),f=vi(f,hv(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=vi(f,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=vi(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Gr(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function HW(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Tu(r);let a;return o;function o(c){return a=c,e.enter("attentionSequence"),u(c)}function u(c){if(c===a)return e.consume(c),u;const f=e.exit("attentionSequence"),h=Tu(c),p=!h||h===2&&i||n.includes(c),v=!i||i===2&&h||n.includes(r);return f._open=!!(a===42?p:p&&(i||!v)),f._close=!!(a===42?v:v&&(h||!p)),t(c)}}function ij(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ZW={name:"autolink",tokenize:KW};function KW(e,t,n){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(g){return pr(g)?(e.consume(g),o):g===64?n(g):f(g)}function o(g){return g===43||g===45||g===46||rr(g)?(r=1,u(g)):f(g)}function u(g){return g===58?(e.consume(g),r=0,c):(g===43||g===45||g===46||rr(g))&&r++<32?(e.consume(g),u):(r=0,f(g))}function c(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||Hp(g)?n(g):(e.consume(g),c)}function f(g){return g===64?(e.consume(g),h):DW(g)?(e.consume(g),f):n(g)}function h(g){return rr(g)?p(g):n(g)}function p(g){return g===46?(e.consume(g),r=0,h):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):v(g)}function v(g){if((g===45||rr(g))&&r++<63){const y=g===45?v:p;return e.consume(g),y}return n(g)}}const id={partial:!0,tokenize:VW};function VW(e,t,n){return r;function r(a){return ct(a)?vt(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Ue(a)?t(a):n(a)}}const fM={continuation:{tokenize:GW},exit:WW,name:"blockQuote",tokenize:YW};function YW(e,t,n){const r=this;return i;function i(o){if(o===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return ct(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function GW(e,t,n){const r=this;return i;function i(o){return ct(o)?vt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(fM,t,n)(o)}}function WW(e){e.exit("blockQuote")}const dM={name:"characterEscape",tokenize:XW};function XW(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return IW(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const hM={name:"characterReference",tokenize:QW};function QW(e,t,n){const r=this;let i=0,a,o;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,o=rr,h(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=zW,h):(e.enter("characterReferenceValue"),a=7,o=gx,h(p))}function h(p){if(p===59&&i){const v=e.exit("characterReferenceValue");return o===rr&&!dS(r.sliceSerialize(v))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(p)&&i++<a?(e.consume(p),h):n(p)}}const aj={partial:!0,tokenize:eX},lj={concrete:!0,name:"codeFenced",tokenize:JW};function JW(e,t,n){const r=this,i={partial:!0,tokenize:T};let a=0,o=0,u;return c;function c(j){return f(j)}function f(j){const R=r.events[r.events.length-1];return a=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,u=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(j)}function h(j){return j===u?(o++,e.consume(j),h):o<3?n(j):(e.exit("codeFencedFenceSequence"),ct(j)?vt(e,p,"whitespace")(j):p(j))}function p(j){return j===null||Ue(j)?(e.exit("codeFencedFence"),r.interrupt?t(j):e.check(aj,x,O)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(j))}function v(j){return j===null||Ue(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(j)):ct(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),vt(e,g,"whitespace")(j)):j===96&&j===u?n(j):(e.consume(j),v)}function g(j){return j===null||Ue(j)?p(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(j))}function y(j){return j===null||Ue(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(j)):j===96&&j===u?n(j):(e.consume(j),y)}function x(j){return e.attempt(i,O,E)(j)}function E(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),k}function k(j){return a>0&&ct(j)?vt(e,C,"linePrefix",a+1)(j):C(j)}function C(j){return j===null||Ue(j)?e.check(aj,x,O)(j):(e.enter("codeFlowValue"),A(j))}function A(j){return j===null||Ue(j)?(e.exit("codeFlowValue"),C(j)):(e.consume(j),A)}function O(j){return e.exit("codeFenced"),t(j)}function T(j,R,I){let M=0;return P;function P(Z){return j.enter("lineEnding"),j.consume(Z),j.exit("lineEnding"),B}function B(Z){return j.enter("codeFencedFence"),ct(Z)?vt(j,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):$(Z)}function $(Z){return Z===u?(j.enter("codeFencedFenceSequence"),G(Z)):I(Z)}function G(Z){return Z===u?(M++,j.consume(Z),G):M>=o?(j.exit("codeFencedFenceSequence"),ct(Z)?vt(j,H,"whitespace")(Z):H(Z)):I(Z)}function H(Z){return Z===null||Ue(Z)?(j.exit("codeFencedFence"),R(Z)):I(Z)}}}function eX(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const H0={name:"codeIndented",tokenize:nX},tX={partial:!0,tokenize:rX};function nX(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),vt(e,a,"linePrefix",5)(f)}function a(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(f):n(f)}function o(f){return f===null?c(f):Ue(f)?e.attempt(tX,o,c)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||Ue(f)?(e.exit("codeFlowValue"),o(f)):(e.consume(f),u)}function c(f){return e.exit("codeIndented"),t(f)}}function rX(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Ue(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):vt(e,a,"linePrefix",5)(o)}function a(o){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(o):Ue(o)?i(o):n(o)}}const iX={name:"codeText",previous:lX,resolve:aX,tokenize:oX};function aX(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function lX(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function oX(e,t,n){let r=0,i,a;return o;function o(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),c(p))}function c(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),c):p===96?(a=e.enter("codeTextSequence"),i=0,h(p)):Ue(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||Ue(p)?(e.exit("codeTextData"),c(p)):(e.consume(p),f)}function h(p){return p===96?(e.consume(p),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",f(p))}}class sX{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Wc(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Wc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Wc(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Wc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Wc(this.left,n.reverse())}}}function Wc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function pM(e){const t={};let n=-1,r,i,a,o,u,c,f;const h=new sX(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,uX(h,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=h.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return Gr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function uX(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const u=o.events,c=[],f={};let h,p,v=-1,g=n,y=0,x=0;const E=[x];for(;g;){for(;e.get(++i)[1]!==g;);a.push(i),g._tokenizer||(h=r.sliceStream(g),g.next||h.push(null),p&&o.defineSkip(g.start),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(h),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=g,g=g.next}for(g=n;++v<u.length;)u[v][0]==="exit"&&u[v-1][0]==="enter"&&u[v][1].type===u[v-1][1].type&&u[v][1].start.line!==u[v][1].end.line&&(x=v+1,E.push(x),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(o.events=[],g?(g._tokenizer=void 0,g.previous=void 0):E.pop(),v=E.length;v--;){const k=u.slice(E[v],E[v+1]),C=a.pop();c.push([C,C+k.length-1]),e.splice(C,2,k)}for(c.reverse(),v=-1;++v<c.length;)f[y+c[v][0]]=y+c[v][1],y+=c[v][1]-c[v][0]-1;return f}const cX={resolve:dX,tokenize:hX},fX={partial:!0,tokenize:pX};function dX(e){return pM(e),e}function hX(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):Ue(u)?e.check(fX,o,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function o(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function pX(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),vt(e,a,"linePrefix")}function a(o){if(o===null||Ue(o))return n(o);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function mM(e,t,n,r,i,a,o,u,c){const f=c||Number.POSITIVE_INFINITY;let h=0;return p;function p(k){return k===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(k),e.exit(a),v):k===null||k===32||k===41||Hp(k)?n(k):(e.enter(r),e.enter(o),e.enter(u),e.enter("chunkString",{contentType:"string"}),x(k))}function v(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===62?(e.exit("chunkString"),e.exit(u),v(k)):k===null||k===60||Ue(k)?n(k):(e.consume(k),k===92?y:g)}function y(k){return k===60||k===62||k===92?(e.consume(k),g):g(k)}function x(k){return!h&&(k===null||k===41||Ut(k))?(e.exit("chunkString"),e.exit(u),e.exit(o),e.exit(r),t(k)):h<f&&k===40?(e.consume(k),h++,x):k===41?(e.consume(k),h--,x):k===null||k===32||k===40||Hp(k)?n(k):(e.consume(k),k===92?E:x)}function E(k){return k===40||k===41||k===92?(e.consume(k),x):x(k)}}function vM(e,t,n,r,i,a){const o=this;let u=0,c;return f;function f(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(a),h}function h(g){return u>999||g===null||g===91||g===93&&!c||g===94&&!u&&"_hiddenFootnoteSupport"in o.parser.constructs?n(g):g===93?(e.exit(a),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):Ue(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===null||g===91||g===93||Ue(g)||u++>999?(e.exit("chunkString"),h(g)):(e.consume(g),c||(c=!ct(g)),g===92?v:p)}function v(g){return g===91||g===92||g===93?(e.consume(g),u++,p):p(g)}}function gM(e,t,n,r,i,a){let o;return u;function u(v){return v===34||v===39||v===40?(e.enter(r),e.enter(i),e.consume(v),e.exit(i),o=v===40?41:v,c):n(v)}function c(v){return v===o?(e.enter(i),e.consume(v),e.exit(i),e.exit(r),t):(e.enter(a),f(v))}function f(v){return v===o?(e.exit(a),c(o)):v===null?n(v):Ue(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),vt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===o||v===null||Ue(v)?(e.exit("chunkString"),f(v)):(e.consume(v),v===92?p:h)}function p(v){return v===o||v===92?(e.consume(v),h):h(v)}}function Sf(e,t){let n;return r;function r(i){return Ue(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ct(i)?vt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const mX={name:"definition",tokenize:gX},vX={partial:!0,tokenize:yX};function gX(e,t,n){const r=this;let i;return a;function a(g){return e.enter("definition"),o(g)}function o(g){return vM.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function u(g){return i=Pi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):n(g)}function c(g){return Ut(g)?Sf(e,f)(g):f(g)}function f(g){return mM(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function h(g){return e.attempt(vX,p,p)(g)}function p(g){return ct(g)?vt(e,v,"whitespace")(g):v(g)}function v(g){return g===null||Ue(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function yX(e,t,n){return r;function r(u){return Ut(u)?Sf(e,i)(u):n(u)}function i(u){return gM(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return ct(u)?vt(e,o,"whitespace")(u):o(u)}function o(u){return u===null||Ue(u)?t(u):n(u)}}const bX={name:"hardBreakEscape",tokenize:xX};function xX(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Ue(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const wX={name:"headingAtx",resolve:SX,tokenize:EX};function SX(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Gr(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function EX(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&r++<6?(e.consume(h),o):h===null||Ut(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Ue(h)?(e.exit("atxHeading"),t(h)):ct(h)?vt(e,u,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),u(h))}function f(h){return h===null||h===35||Ut(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),f)}}const kX=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],oj=["pre","script","style","textarea"],_X={concrete:!0,name:"htmlFlow",resolveTo:OX,tokenize:jX},AX={partial:!0,tokenize:NX},CX={partial:!0,tokenize:TX};function OX(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function jX(e,t,n){const r=this;let i,a,o,u,c;return f;function f(D){return h(D)}function h(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),p}function p(D){return D===33?(e.consume(D),v):D===47?(e.consume(D),a=!0,x):D===63?(e.consume(D),i=3,r.interrupt?t:z):pr(D)?(e.consume(D),o=String.fromCharCode(D),E):n(D)}function v(D){return D===45?(e.consume(D),i=2,g):D===91?(e.consume(D),i=5,u=0,y):pr(D)?(e.consume(D),i=4,r.interrupt?t:z):n(D)}function g(D){return D===45?(e.consume(D),r.interrupt?t:z):n(D)}function y(D){const re="CDATA[";return D===re.charCodeAt(u++)?(e.consume(D),u===re.length?r.interrupt?t:$:y):n(D)}function x(D){return pr(D)?(e.consume(D),o=String.fromCharCode(D),E):n(D)}function E(D){if(D===null||D===47||D===62||Ut(D)){const re=D===47,ne=o.toLowerCase();return!re&&!a&&oj.includes(ne)?(i=1,r.interrupt?t(D):$(D)):kX.includes(o.toLowerCase())?(i=6,re?(e.consume(D),k):r.interrupt?t(D):$(D)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(D):a?C(D):A(D))}return D===45||rr(D)?(e.consume(D),o+=String.fromCharCode(D),E):n(D)}function k(D){return D===62?(e.consume(D),r.interrupt?t:$):n(D)}function C(D){return ct(D)?(e.consume(D),C):P(D)}function A(D){return D===47?(e.consume(D),P):D===58||D===95||pr(D)?(e.consume(D),O):ct(D)?(e.consume(D),A):P(D)}function O(D){return D===45||D===46||D===58||D===95||rr(D)?(e.consume(D),O):T(D)}function T(D){return D===61?(e.consume(D),j):ct(D)?(e.consume(D),T):A(D)}function j(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),c=D,R):ct(D)?(e.consume(D),j):I(D)}function R(D){return D===c?(e.consume(D),c=null,M):D===null||Ue(D)?n(D):(e.consume(D),R)}function I(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||Ut(D)?T(D):(e.consume(D),I)}function M(D){return D===47||D===62||ct(D)?A(D):n(D)}function P(D){return D===62?(e.consume(D),B):n(D)}function B(D){return D===null||Ue(D)?$(D):ct(D)?(e.consume(D),B):n(D)}function $(D){return D===45&&i===2?(e.consume(D),U):D===60&&i===1?(e.consume(D),q):D===62&&i===4?(e.consume(D),F):D===63&&i===3?(e.consume(D),z):D===93&&i===5?(e.consume(D),Q):Ue(D)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(AX,V,G)(D)):D===null||Ue(D)?(e.exit("htmlFlowData"),G(D)):(e.consume(D),$)}function G(D){return e.check(CX,H,V)(D)}function H(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),Z}function Z(D){return D===null||Ue(D)?G(D):(e.enter("htmlFlowData"),$(D))}function U(D){return D===45?(e.consume(D),z):$(D)}function q(D){return D===47?(e.consume(D),o="",K):$(D)}function K(D){if(D===62){const re=o.toLowerCase();return oj.includes(re)?(e.consume(D),F):$(D)}return pr(D)&&o.length<8?(e.consume(D),o+=String.fromCharCode(D),K):$(D)}function Q(D){return D===93?(e.consume(D),z):$(D)}function z(D){return D===62?(e.consume(D),F):D===45&&i===2?(e.consume(D),z):$(D)}function F(D){return D===null||Ue(D)?(e.exit("htmlFlowData"),V(D)):(e.consume(D),F)}function V(D){return e.exit("htmlFlow"),t(D)}}function TX(e,t,n){const r=this;return i;function i(o){return Ue(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function NX(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(id,t,n)}}const RX={name:"htmlText",tokenize:PX};function PX(e,t,n){const r=this;let i,a,o;return u;function u(z){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(z),c}function c(z){return z===33?(e.consume(z),f):z===47?(e.consume(z),T):z===63?(e.consume(z),A):pr(z)?(e.consume(z),I):n(z)}function f(z){return z===45?(e.consume(z),h):z===91?(e.consume(z),a=0,y):pr(z)?(e.consume(z),C):n(z)}function h(z){return z===45?(e.consume(z),g):n(z)}function p(z){return z===null?n(z):z===45?(e.consume(z),v):Ue(z)?(o=p,q(z)):(e.consume(z),p)}function v(z){return z===45?(e.consume(z),g):p(z)}function g(z){return z===62?U(z):z===45?v(z):p(z)}function y(z){const F="CDATA[";return z===F.charCodeAt(a++)?(e.consume(z),a===F.length?x:y):n(z)}function x(z){return z===null?n(z):z===93?(e.consume(z),E):Ue(z)?(o=x,q(z)):(e.consume(z),x)}function E(z){return z===93?(e.consume(z),k):x(z)}function k(z){return z===62?U(z):z===93?(e.consume(z),k):x(z)}function C(z){return z===null||z===62?U(z):Ue(z)?(o=C,q(z)):(e.consume(z),C)}function A(z){return z===null?n(z):z===63?(e.consume(z),O):Ue(z)?(o=A,q(z)):(e.consume(z),A)}function O(z){return z===62?U(z):A(z)}function T(z){return pr(z)?(e.consume(z),j):n(z)}function j(z){return z===45||rr(z)?(e.consume(z),j):R(z)}function R(z){return Ue(z)?(o=R,q(z)):ct(z)?(e.consume(z),R):U(z)}function I(z){return z===45||rr(z)?(e.consume(z),I):z===47||z===62||Ut(z)?M(z):n(z)}function M(z){return z===47?(e.consume(z),U):z===58||z===95||pr(z)?(e.consume(z),P):Ue(z)?(o=M,q(z)):ct(z)?(e.consume(z),M):U(z)}function P(z){return z===45||z===46||z===58||z===95||rr(z)?(e.consume(z),P):B(z)}function B(z){return z===61?(e.consume(z),$):Ue(z)?(o=B,q(z)):ct(z)?(e.consume(z),B):M(z)}function $(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),i=z,G):Ue(z)?(o=$,q(z)):ct(z)?(e.consume(z),$):(e.consume(z),H)}function G(z){return z===i?(e.consume(z),i=void 0,Z):z===null?n(z):Ue(z)?(o=G,q(z)):(e.consume(z),G)}function H(z){return z===null||z===34||z===39||z===60||z===61||z===96?n(z):z===47||z===62||Ut(z)?M(z):(e.consume(z),H)}function Z(z){return z===47||z===62||Ut(z)?M(z):n(z)}function U(z){return z===62?(e.consume(z),e.exit("htmlTextData"),e.exit("htmlText"),t):n(z)}function q(z){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),K}function K(z){return ct(z)?vt(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):Q(z)}function Q(z){return e.enter("htmlTextData"),o(z)}}const hS={name:"labelEnd",resolveAll:IX,resolveTo:LX,tokenize:$X},MX={tokenize:BX},DX={tokenize:FX},zX={tokenize:UX};function IX(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Gr(e,0,e.length,n),e}function LX(e,t){let n=e.length,r=0,i,a,o,u;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return u=[["enter",c,t],["enter",f,t]],u=vi(u,e.slice(a+1,a+r+3)),u=vi(u,[["enter",h,t]]),u=vi(u,hv(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),u=vi(u,[["exit",h,t],e[o-2],e[o-1],["exit",f,t]]),u=vi(u,e.slice(o+1)),u=vi(u,[["exit",c,t]]),Gr(e,a,e.length,u),e}function $X(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(v){return a?a._inactive?p(v):(o=r.parser.defined.includes(Pi(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),c):n(v)}function c(v){return v===40?e.attempt(MX,h,o?h:p)(v):v===91?e.attempt(DX,h,o?f:p)(v):o?h(v):p(v)}function f(v){return e.attempt(zX,h,p)(v)}function h(v){return t(v)}function p(v){return a._balanced=!0,n(v)}}function BX(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return Ut(p)?Sf(e,a)(p):a(p)}function a(p){return p===41?h(p):mM(e,o,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return Ut(p)?Sf(e,c)(p):h(p)}function u(p){return n(p)}function c(p){return p===34||p===39||p===40?gM(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function f(p){return Ut(p)?Sf(e,h)(p):h(p)}function h(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function FX(e,t,n){const r=this;return i;function i(u){return vM.call(r,e,a,o,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(Pi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function o(u){return n(u)}}function UX(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const qX={name:"labelStartImage",resolveAll:hS.resolveAll,tokenize:HX};function HX(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),o):n(u)}function o(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const ZX={name:"labelStartLink",resolveAll:hS.resolveAll,tokenize:KX};function KX(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Z0={name:"lineEnding",tokenize:VX};function VX(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),vt(e,t,"linePrefix")}}const Ep={name:"thematicBreak",tokenize:YX};function YX(e,t,n){let r=0,i;return a;function a(f){return e.enter("thematicBreak"),o(f)}function o(f){return i=f,u(f)}function u(f){return f===i?(e.enter("thematicBreakSequence"),c(f)):r>=3&&(f===null||Ue(f))?(e.exit("thematicBreak"),t(f)):n(f)}function c(f){return f===i?(e.consume(f),r++,c):(e.exit("thematicBreakSequence"),ct(f)?vt(e,u,"whitespace")(f):u(f))}}const Cr={continuation:{tokenize:QX},exit:eQ,name:"list",tokenize:XX},GX={partial:!0,tokenize:tQ},WX={partial:!0,tokenize:JX};function XX(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return u;function u(g){const y=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:gx(g)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Ep,n,f)(g):f(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return n(g)}function c(g){return gx(g)&&++o<10?(e.consume(g),c):(!r.interrupt||o<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),f(g)):n(g)}function f(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(id,r.interrupt?n:h,e.attempt(GX,v,p))}function h(g){return r.containerState.initialBlankLine=!0,a++,v(g)}function p(g){return ct(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),v):n(g)}function v(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function QX(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(id,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,vt(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!ct(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(WX,t,o)(u))}function o(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,vt(e,e.attempt(Cr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function JX(e,t,n){const r=this;return vt(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function eQ(e){e.exit(this.containerState.type)}function tQ(e,t,n){const r=this;return vt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!ct(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const sj={name:"setextUnderline",resolveTo:nQ,tokenize:rQ};function nQ(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function rQ(e,t,n){const r=this;let i;return a;function a(f){let h=r.events.length,p;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){p=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=f,o(f)):n(f)}function o(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===i?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),ct(f)?vt(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||Ue(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const iQ={tokenize:aQ};function aQ(e){const t=this,n=e.attempt(id,r,e.attempt(this.parser.constructs.flowInitial,i,vt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(cX,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lQ={resolveAll:bM()},oQ=yM("string"),sQ=yM("text");function yM(e){return{resolveAll:bM(e==="text"?uQ:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,u);return o;function o(h){return f(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return f(h)?(n.exit("data"),a(h)):(n.consume(h),c)}function f(h){if(h===null)return!0;const p=i[h];let v=-1;if(p)for(;++v<p.length;){const g=p[v];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function bM(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function uQ(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,u=0,c;for(;a--;){const f=i[a];if(typeof f=="string"){for(o=f.length;f.charCodeAt(o-1)===32;)u++,o--;if(o)break;o=-1}else if(f===-2)c=!0,u++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||c||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const cQ={42:Cr,43:Cr,45:Cr,48:Cr,49:Cr,50:Cr,51:Cr,52:Cr,53:Cr,54:Cr,55:Cr,56:Cr,57:Cr,62:fM},fQ={91:mX},dQ={[-2]:H0,[-1]:H0,32:H0},hQ={35:wX,42:Ep,45:[sj,Ep],60:_X,61:sj,95:Ep,96:lj,126:lj},pQ={38:hM,92:dM},mQ={[-5]:Z0,[-4]:Z0,[-3]:Z0,33:qX,38:hM,42:yx,60:[ZW,RX],91:ZX,92:[bX,dM],93:hS,95:yx,96:iX},vQ={null:[yx,lQ]},gQ={null:[42,95]},yQ={null:[]},bQ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:gQ,contentInitial:fQ,disable:yQ,document:cQ,flow:hQ,flowInitial:dQ,insideSpan:vQ,string:pQ,text:mQ},Symbol.toStringTag,{value:"Module"}));function xQ(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],u=[];const c={attempt:R(T),check:R(j),consume:C,enter:A,exit:O,interrupt:R(j,{interrupt:!0})},f={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:e,previous:null,sliceSerialize:v,sliceStream:g,write:p};let h=t.tokenize.call(f,c);return t.resolveAll&&a.push(t),f;function p(B){return o=vi(o,B),E(),o[o.length-1]!==null?[]:(I(t,0),f.events=hv(a,f.events,f),f.events)}function v(B,$){return SQ(g(B),$)}function g(B){return wQ(o,B)}function y(){const{_bufferIndex:B,_index:$,line:G,column:H,offset:Z}=r;return{_bufferIndex:B,_index:$,line:G,column:H,offset:Z}}function x(B){i[B.line]=B.column,P()}function E(){let B;for(;r._index<o.length;){const $=o[r._index];if(typeof $=="string")for(B=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===B&&r._bufferIndex<$.length;)k($.charCodeAt(r._bufferIndex));else k($)}}function k(B){h=h(B)}function C(B){Ue(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,P()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=B}function A(B,$){const G=$||{};return G.type=B,G.start=y(),f.events.push(["enter",G,f]),u.push(G),G}function O(B){const $=u.pop();return $.end=y(),f.events.push(["exit",$,f]),$}function T(B,$){I(B,$.from)}function j(B,$){$.restore()}function R(B,$){return G;function G(H,Z,U){let q,K,Q,z;return Array.isArray(H)?V(H):"tokenize"in H?V([H]):F(H);function F(te){return fe;function fe(ge){const ie=ge!==null&&te[ge],le=ge!==null&&te.null,ye=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(le)?le:le?[le]:[]];return V(ye)(ge)}}function V(te){return q=te,K=0,te.length===0?U:D(te[K])}function D(te){return fe;function fe(ge){return z=M(),Q=te,te.partial||(f.currentConstruct=te),te.name&&f.parser.constructs.disable.null.includes(te.name)?ne():te.tokenize.call($?Object.assign(Object.create(f),$):f,c,re,ne)(ge)}}function re(te){return B(Q,z),Z}function ne(te){return z.restore(),++K<q.length?D(q[K]):U}}}function I(B,$){B.resolveAll&&!a.includes(B)&&a.push(B),B.resolve&&Gr(f.events,$,f.events.length-$,B.resolve(f.events.slice($),f)),B.resolveTo&&(f.events=B.resolveTo(f.events,f))}function M(){const B=y(),$=f.previous,G=f.currentConstruct,H=f.events.length,Z=Array.from(u);return{from:H,restore:U};function U(){r=B,f.previous=$,f.currentConstruct=G,f.events.length=H,u=Z,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function wQ(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const u=o[0];typeof u=="string"?o[0]=u.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function SQ(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
50
50
|
`;break}case-3:{o=`\r
|