@authup/client-auth-console 1.0.0-beta.60 → 1.0.0-beta.61

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.
@@ -67,7 +67,7 @@ var e=Object.defineProperty,t=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=nu
67
67
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function $b(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:nx(t,`input`,e.processors),output:nx(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ex(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ex(r.element,n);if(r.type===`set`)return ex(r.valueType,n);if(r.type===`lazy`)return ex(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 ex(r.innerType,n);if(r.type===`intersection`)return ex(r.left,n)||ex(r.right,n);if(r.type===`record`||r.type===`map`)return ex(r.keyType,n)||ex(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ex(r.in,n)||ex(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ex(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ex(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ex(e,n))return!0;return!!(r.rest&&ex(r.rest,n))}return!1}var tx=(e,t={})=>n=>{let r=Xb({...n,processors:t});return Zb(e,r),Qb(r,e),$b(r,e)},nx=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Xb({...i??{},target:a,io:t,processors:n});return Zb(e,o),Qb(o,e),$b(o,e)},rx={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ix=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=rx[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},ax=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},ox=(e,t,n,r)=>{n.type=`boolean`},sx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},cx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},lx=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},ux=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},dx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},fx=(e,t,n,r)=>{n.not={}},px=(e,t,n,r)=>{},mx=(e,t,n,r)=>{},hx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},gx=(e,t,n,r)=>{let i=e._zod.def,a=Kd(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},_x=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},vx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},yx=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},bx=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},xx=(e,t,n,r)=>{n.type=`boolean`},Sx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Cx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},wx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Tx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},Ex=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},Dx=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Zb(a.element,t,{...r,path:[...r.path,`items`]})},Ox=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Zb(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.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=Zb(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},kx=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Zb(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ax=(e,t,n,r)=>{let i=e._zod.def,a=Zb(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Zb(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},jx=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>Zb(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?Zb(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},Mx=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Zb(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=Zb(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Zb(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Nx=(e,t,n,r)=>{let i=e._zod.def,a=Zb(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`}]},Px=(e,t,n,r)=>{let i=e._zod.def;Zb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Fx=(e,t,n,r)=>{let i=e._zod.def;Zb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ix=(e,t,n,r)=>{let i=e._zod.def;Zb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Lx=(e,t,n,r)=>{let i=e._zod.def;Zb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Rx=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;Zb(o,t,r);let s=t.seen.get(e);s.ref=o},zx=(e,t,n,r)=>{let i=e._zod.def;Zb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Bx=(e,t,n,r)=>{let i=e._zod.def;Zb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Vx=(e,t,n,r)=>{let i=e._zod.def;Zb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Hx=(e,t,n,r)=>{let i=e._zod.innerType;Zb(i,t,r);let a=t.seen.get(e);a.ref=i},Ux={string:ix,number:ax,boolean:ox,bigint:sx,symbol:cx,null:lx,undefined:ux,void:dx,never:fx,any:px,unknown:mx,date:hx,enum:gx,literal:_x,nan:vx,template_literal:yx,file:bx,success:xx,custom:Sx,function:Cx,transform:wx,map:Tx,set:Ex,array:Dx,object:Ox,union:kx,intersection:Ax,tuple:jx,record:Mx,nullable:Nx,nonoptional:Px,default:Fx,prefault:Ix,catch:Lx,pipe:Rx,readonly:zx,promise:Bx,optional:Vx,lazy:Hx};function Wx(e,t){if(`_idmap`in e){let n=e,r=Xb({...t,processors:Ux}),i={};for(let e of n._idmap.entries()){let[t,n]=e;Zb(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Qb(r,n),a[t]=$b(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=Xb({...t,processors:Ux});return Zb(e,n),Qb(n,e),$b(n,e)}var Gx=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=Xb({processors:Ux,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return Zb(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),Qb(this.ctx,e);let{"~standard":n,...r}=$b(this.ctx,e);return r}},Kx=n({}),qx=n({$ZodAny:()=>Uh,$ZodArray:()=>Yh,$ZodAsyncError:()=>Id,$ZodBase64:()=>Oh,$ZodBase64URL:()=>Ah,$ZodBigInt:()=>Rh,$ZodBigIntFormat:()=>zh,$ZodBoolean:()=>Lh,$ZodCIDRv4:()=>Th,$ZodCIDRv6:()=>Eh,$ZodCUID:()=>ph,$ZodCUID2:()=>mh,$ZodCatch:()=>Mg,$ZodCheck:()=>Mm,$ZodCheckBigIntFormat:()=>Rm,$ZodCheckEndsWith:()=>Zm,$ZodCheckGreaterThan:()=>Fm,$ZodCheckIncludes:()=>Ym,$ZodCheckLengthEquals:()=>Wm,$ZodCheckLessThan:()=>Pm,$ZodCheckLowerCase:()=>qm,$ZodCheckMaxLength:()=>Hm,$ZodCheckMaxSize:()=>zm,$ZodCheckMimeType:()=>eh,$ZodCheckMinLength:()=>Um,$ZodCheckMinSize:()=>Bm,$ZodCheckMultipleOf:()=>Im,$ZodCheckNumberFormat:()=>Lm,$ZodCheckOverwrite:()=>th,$ZodCheckProperty:()=>$m,$ZodCheckRegex:()=>Km,$ZodCheckSizeEquals:()=>Vm,$ZodCheckStartsWith:()=>Xm,$ZodCheckStringFormat:()=>Gm,$ZodCheckUpperCase:()=>Jm,$ZodCodec:()=>Ig,$ZodCustom:()=>Kg,$ZodCustomStringFormat:()=>Ph,$ZodDate:()=>qh,$ZodDefault:()=>Eg,$ZodDiscriminatedUnion:()=>ag,$ZodE164:()=>jh,$ZodEmail:()=>lh,$ZodEmoji:()=>dh,$ZodEncodeError:()=>Ld,$ZodEnum:()=>vg,$ZodError:()=>Wf,$ZodExactOptional:()=>wg,$ZodFile:()=>bg,$ZodFunction:()=>Ug,$ZodGUID:()=>sh,$ZodIPv4:()=>Sh,$ZodIPv6:()=>Ch,$ZodISODate:()=>yh,$ZodISODateTime:()=>vh,$ZodISODuration:()=>xh,$ZodISOTime:()=>bh,$ZodIntersection:()=>og,$ZodJWT:()=>Nh,$ZodKSUID:()=>_h,$ZodLazy:()=>Gg,$ZodLiteral:()=>yg,$ZodMAC:()=>wh,$ZodMap:()=>mg,$ZodNaN:()=>Ng,$ZodNanoID:()=>fh,$ZodNever:()=>Gh,$ZodNonOptional:()=>kg,$ZodNull:()=>Hh,$ZodNullable:()=>Tg,$ZodNumber:()=>Fh,$ZodNumberFormat:()=>Ih,$ZodObject:()=>$h,$ZodObjectJIT:()=>eg,$ZodOptional:()=>Cg,$ZodPipe:()=>Pg,$ZodPrefault:()=>Og,$ZodPreprocess:()=>zg,$ZodPromise:()=>Wg,$ZodReadonly:()=>Bg,$ZodRealError:()=>Gf,$ZodRecord:()=>pg,$ZodRegistry:()=>Qv,$ZodSet:()=>gg,$ZodString:()=>ah,$ZodStringFormat:()=>oh,$ZodSuccess:()=>jg,$ZodSymbol:()=>Bh,$ZodTemplateLiteral:()=>Hg,$ZodTransform:()=>xg,$ZodTuple:()=>lg,$ZodType:()=>ih,$ZodULID:()=>hh,$ZodURL:()=>uh,$ZodUUID:()=>ch,$ZodUndefined:()=>Vh,$ZodUnion:()=>ng,$ZodUnknown:()=>Wh,$ZodVoid:()=>Kh,$ZodXID:()=>gh,$ZodXor:()=>ig,$brand:()=>Fd,$constructor:()=>W,$input:()=>Zv,$output:()=>Xv,Doc:()=>nh,JSONSchema:()=>Kx,JSONSchemaGenerator:()=>Gx,NEVER:()=>Pd,TimePrecision:()=>Ey,_any:()=>qy,_array:()=>kb,_base64:()=>Sy,_base64url:()=>Cy,_bigint:()=>By,_boolean:()=>Ry,_catch:()=>Ib,_check:()=>Gb,_cidrv4:()=>by,_cidrv6:()=>xy,_coercedBigint:()=>Vy,_coercedBoolean:()=>zy,_coercedDate:()=>Qy,_coercedNumber:()=>My,_coercedString:()=>ny,_cuid:()=>fy,_cuid2:()=>py,_custom:()=>Hb,_date:()=>Zy,_decode:()=>sp,_decodeAsync:()=>dp,_default:()=>pte,_discriminatedUnion:()=>ate,_e164:()=>wy,_email:()=>ry,_emoji:()=>uy,_encode:()=>ap,_encodeAsync:()=>lp,_endsWith:()=>bb,_enum:()=>dte,_file:()=>Mb,_float32:()=>Py,_float64:()=>Fy,_gt:()=>nb,_gte:()=>rb,_guid:()=>iy,_includes:()=>vb,_int:()=>Ny,_int32:()=>Iy,_int64:()=>Hy,_intersection:()=>ote,_ipv4:()=>_y,_ipv6:()=>vy,_isoDate:()=>Oy,_isoDateTime:()=>Dy,_isoDuration:()=>Ay,_isoTime:()=>ky,_jwt:()=>Ty,_ksuid:()=>gy,_lazy:()=>Bb,_length:()=>mb,_literal:()=>jb,_lowercase:()=>gb,_lt:()=>eb,_lte:()=>tb,_mac:()=>yy,_map:()=>lte,_max:()=>tb,_maxLength:()=>fb,_maxSize:()=>lb,_mime:()=>Sb,_min:()=>rb,_minLength:()=>pb,_minSize:()=>ub,_multipleOf:()=>cb,_nan:()=>$y,_nanoid:()=>dy,_nativeEnum:()=>Ab,_negative:()=>ab,_never:()=>Yy,_nonnegative:()=>sb,_nonoptional:()=>mte,_nonpositive:()=>ob,_normalize:()=>wb,_null:()=>Ky,_nullable:()=>fte,_number:()=>jy,_optional:()=>Pb,_overwrite:()=>Cb,_parse:()=>Zf,_parseAsync:()=>$f,_pipe:()=>Lb,_positive:()=>ib,_promise:()=>Vb,_property:()=>xb,_readonly:()=>Rb,_record:()=>cte,_refine:()=>Ub,_regex:()=>hb,_safeDecode:()=>hp,_safeDecodeAsync:()=>yp,_safeEncode:()=>pp,_safeEncodeAsync:()=>_p,_safeParse:()=>tp,_safeParseAsync:()=>rp,_set:()=>ute,_size:()=>db,_slugify:()=>Ob,_startsWith:()=>yb,_string:()=>ty,_stringFormat:()=>Yb,_stringbool:()=>Jb,_success:()=>Fb,_superRefine:()=>Wb,_symbol:()=>Wy,_templateLiteral:()=>zb,_toLowerCase:()=>Eb,_toUpperCase:()=>Db,_transform:()=>Nb,_trim:()=>Tb,_tuple:()=>ste,_uint32:()=>Ly,_uint64:()=>Uy,_ulid:()=>my,_undefined:()=>Gy,_union:()=>rte,_unknown:()=>Jy,_uppercase:()=>_b,_url:()=>ly,_uuid:()=>ay,_uuidv4:()=>oy,_uuidv6:()=>sy,_uuidv7:()=>cy,_void:()=>Xy,_xid:()=>hy,_xor:()=>ite,clone:()=>pf,config:()=>zd,createStandardJSONSchemaMethod:()=>nx,createToJSONSchemaMethod:()=>tx,decode:()=>cp,decodeAsync:()=>fp,describe:()=>Kb,encode:()=>op,encodeAsync:()=>up,extractDefs:()=>Qb,finalize:()=>$b,flattenError:()=>Kf,formatError:()=>qf,globalConfig:()=>Rd,globalRegistry:()=>ey,initializeContext:()=>Xb,isValidBase64:()=>Dh,isValidBase64URL:()=>kh,isValidJWT:()=>Mh,locales:()=>Jv,meta:()=>qb,parse:()=>Qf,parseAsync:()=>ep,prettifyError:()=>Xf,process:()=>Zb,regexes:()=>xp,registry:()=>$v,safeDecode:()=>gp,safeDecodeAsync:()=>bp,safeEncode:()=>mp,safeEncodeAsync:()=>vp,safeParse:()=>np,safeParseAsync:()=>ip,toDotPath:()=>Yf,toJSONSchema:()=>Wx,treeifyError:()=>Jf,util:()=>Bd,version:()=>rh}),Jx=n({endsWith:()=>bb,gt:()=>nb,gte:()=>rb,includes:()=>vb,length:()=>mb,lowercase:()=>gb,lt:()=>eb,lte:()=>tb,maxLength:()=>fb,maxSize:()=>lb,mime:()=>Sb,minLength:()=>pb,minSize:()=>ub,multipleOf:()=>cb,negative:()=>ab,nonnegative:()=>sb,nonpositive:()=>ob,normalize:()=>wb,overwrite:()=>Cb,positive:()=>ib,property:()=>xb,regex:()=>hb,size:()=>db,slugify:()=>Ob,startsWith:()=>yb,toLowerCase:()=>Eb,toUpperCase:()=>Db,trim:()=>Tb,uppercase:()=>_b}),Yx=n({ZodISODate:()=>Qx,ZodISODateTime:()=>Xx,ZodISODuration:()=>nS,ZodISOTime:()=>eS,date:()=>$x,datetime:()=>Zx,duration:()=>rS,time:()=>tS}),Xx=W(`ZodISODateTime`,(e,t)=>{vh.init(e,t),ES.init(e,t)});function Zx(e){return Dy(Xx,e)}var Qx=W(`ZodISODate`,(e,t)=>{yh.init(e,t),ES.init(e,t)});function $x(e){return Oy(Qx,e)}var eS=W(`ZodISOTime`,(e,t)=>{bh.init(e,t),ES.init(e,t)});function tS(e){return ky(eS,e)}var nS=W(`ZodISODuration`,(e,t)=>{xh.init(e,t),ES.init(e,t)});function rS(e){return Ay(nS,e)}var iS=(e,t)=>{Wf.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>qf(e,t)},flatten:{value:t=>Kf(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,qd,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,qd,2)}},isEmpty:{get(){return e.issues.length===0}}})},aS=W(`ZodError`,iS),oS=W(`ZodError`,iS,{Parent:Error}),sS=Zf(oS),cS=$f(oS),lS=tp(oS),uS=rp(oS),dS=ap(oS),fS=sp(oS),pS=lp(oS),mS=dp(oS),hS=pp(oS),gS=hp(oS),_S=_p(oS),vS=yp(oS),yS=n({ZodAny:()=>UC,ZodArray:()=>$C,ZodBase64:()=>lC,ZodBase64URL:()=>dC,ZodBigInt:()=>MC,ZodBigIntFormat:()=>PC,ZodBoolean:()=>AC,ZodCIDRv4:()=>aC,ZodCIDRv6:()=>sC,ZodCUID:()=>US,ZodCUID2:()=>GS,ZodCatch:()=>Jw,ZodCodec:()=>eT,ZodCustom:()=>mT,ZodCustomStringFormat:()=>_C,ZodDate:()=>ZC,ZodDefault:()=>Bw,ZodDiscriminatedUnion:()=>uw,ZodE164:()=>pC,ZodEmail:()=>DS,ZodEmoji:()=>zS,ZodEnum:()=>ww,ZodExactOptional:()=>Fw,ZodFile:()=>kw,ZodFunction:()=>fT,ZodGUID:()=>kS,ZodIPv4:()=>$S,ZodIPv6:()=>rC,ZodIntersection:()=>fw,ZodJWT:()=>hC,ZodKSUID:()=>ZS,ZodLazy:()=>cT,ZodLiteral:()=>Dw,ZodMAC:()=>tC,ZodMap:()=>bw,ZodNaN:()=>Xw,ZodNanoID:()=>VS,ZodNever:()=>qC,ZodNonOptional:()=>Ww,ZodNull:()=>VC,ZodNullable:()=>Lw,ZodNumber:()=>SC,ZodNumberFormat:()=>wC,ZodObject:()=>nw,ZodOptional:()=>Nw,ZodPipe:()=>Qw,ZodPrefault:()=>Hw,ZodPreprocess:()=>rT,ZodPromise:()=>uT,ZodReadonly:()=>iT,ZodRecord:()=>gw,ZodSet:()=>Sw,ZodString:()=>wS,ZodStringFormat:()=>ES,ZodSuccess:()=>Kw,ZodSymbol:()=>LC,ZodTemplateLiteral:()=>oT,ZodTransform:()=>jw,ZodTuple:()=>mw,ZodType:()=>SS,ZodULID:()=>qS,ZodURL:()=>IS,ZodUUID:()=>jS,ZodUndefined:()=>zC,ZodUnion:()=>ow,ZodUnknown:()=>GC,ZodVoid:()=>YC,ZodXID:()=>YS,ZodXor:()=>cw,_ZodString:()=>CS,_default:()=>Vw,_function:()=>pT,any:()=>WC,array:()=>ew,base64:()=>uC,base64url:()=>fC,bigint:()=>NC,boolean:()=>jC,catch:()=>Yw,check:()=>hT,cidrv4:()=>oC,cidrv6:()=>cC,codec:()=>tT,cuid:()=>WS,cuid2:()=>KS,custom:()=>gT,date:()=>QC,describe:()=>yT,discriminatedUnion:()=>dw,e164:()=>mC,email:()=>OS,emoji:()=>BS,enum:()=>Tw,exactOptional:()=>Iw,file:()=>Aw,float32:()=>EC,float64:()=>DC,function:()=>pT,guid:()=>AS,hash:()=>xC,hex:()=>bC,hostname:()=>yC,httpUrl:()=>RS,instanceof:()=>xT,int:()=>TC,int32:()=>OC,int64:()=>FC,intersection:()=>pw,invertCodec:()=>nT,ipv4:()=>eC,ipv6:()=>iC,json:()=>CT,jwt:()=>gC,keyof:()=>tw,ksuid:()=>QS,lazy:()=>lT,literal:()=>Ow,looseObject:()=>aw,looseRecord:()=>yw,mac:()=>nC,map:()=>xw,meta:()=>bT,nan:()=>Zw,nanoid:()=>HS,nativeEnum:()=>Ew,never:()=>JC,nonoptional:()=>Gw,null:()=>HC,nullable:()=>Rw,nullish:()=>zw,number:()=>CC,object:()=>rw,optional:()=>Pw,partialRecord:()=>vw,pipe:()=>$w,prefault:()=>Uw,preprocess:()=>wT,promise:()=>dT,readonly:()=>aT,record:()=>_w,refine:()=>_T,set:()=>Cw,strictObject:()=>iw,string:()=>TS,stringFormat:()=>vC,stringbool:()=>ST,success:()=>qw,superRefine:()=>vT,symbol:()=>RC,templateLiteral:()=>sT,transform:()=>Mw,tuple:()=>hw,uint32:()=>kC,uint64:()=>IC,ulid:()=>JS,undefined:()=>BC,union:()=>sw,unknown:()=>KC,url:()=>LS,uuid:()=>MS,uuidv4:()=>NS,uuidv6:()=>PS,uuidv7:()=>FS,void:()=>XC,xid:()=>XS,xor:()=>lw}),bS=new WeakMap;function xS(e,t,n){let r=Object.getPrototypeOf(e),i=bS.get(r);if(i||(i=new Set,bS.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var SS=W(`ZodType`,(e,t)=>(ih.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:nx(e,`input`),output:nx(e,`output`)}}),e.toJSONSchema=tx(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>sS(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>lS(e,t,n),e.parseAsync=async(t,n)=>cS(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>uS(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>dS(e,t,n),e.decode=(t,n)=>fS(e,t,n),e.encodeAsync=async(t,n)=>pS(e,t,n),e.decodeAsync=async(t,n)=>mS(e,t,n),e.safeEncode=(t,n)=>hS(e,t,n),e.safeDecode=(t,n)=>gS(e,t,n),e.safeEncodeAsync=async(t,n)=>_S(e,t,n),e.safeDecodeAsync=async(t,n)=>vS(e,t,n),xS(e,`ZodType`,{check(...e){let t=this.def;return this.clone(tf(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return pf(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(_T(e,t))},superRefine(e,t){return this.check(vT(e,t))},overwrite(e){return this.check(Cb(e))},optional(){return Pw(this)},exactOptional(){return Iw(this)},nullable(){return Rw(this)},nullish(){return Pw(Rw(this))},nonoptional(e){return Gw(this,e)},array(){return ew(this)},or(e){return sw([this,e])},and(e){return pw(this,e)},transform(e){return $w(this,Mw(e))},default(e){return Vw(this,e)},prefault(e){return Uw(this,e)},catch(e){return Yw(this,e)},pipe(e){return $w(this,e)},readonly(){return aT(this)},describe(e){let t=this.clone();return ey.add(t,{description:e}),t},meta(...e){if(e.length===0)return ey.get(this);let t=this.clone();return ey.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return ey.get(e)?.description},configurable:!0}),e)),CS=W(`_ZodString`,(e,t)=>{ah.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ix(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,xS(e,`_ZodString`,{regex(...e){return this.check(hb(...e))},includes(...e){return this.check(vb(...e))},startsWith(...e){return this.check(yb(...e))},endsWith(...e){return this.check(bb(...e))},min(...e){return this.check(pb(...e))},max(...e){return this.check(fb(...e))},length(...e){return this.check(mb(...e))},nonempty(...e){return this.check(pb(1,...e))},lowercase(e){return this.check(gb(e))},uppercase(e){return this.check(_b(e))},trim(){return this.check(Tb())},normalize(...e){return this.check(wb(...e))},toLowerCase(){return this.check(Eb())},toUpperCase(){return this.check(Db())},slugify(){return this.check(Ob())}})}),wS=W(`ZodString`,(e,t)=>{ah.init(e,t),CS.init(e,t),e.email=t=>e.check(ry(DS,t)),e.url=t=>e.check(ly(IS,t)),e.jwt=t=>e.check(Ty(hC,t)),e.emoji=t=>e.check(uy(zS,t)),e.guid=t=>e.check(iy(kS,t)),e.uuid=t=>e.check(ay(jS,t)),e.uuidv4=t=>e.check(oy(jS,t)),e.uuidv6=t=>e.check(sy(jS,t)),e.uuidv7=t=>e.check(cy(jS,t)),e.nanoid=t=>e.check(dy(VS,t)),e.guid=t=>e.check(iy(kS,t)),e.cuid=t=>e.check(fy(US,t)),e.cuid2=t=>e.check(py(GS,t)),e.ulid=t=>e.check(my(qS,t)),e.base64=t=>e.check(Sy(lC,t)),e.base64url=t=>e.check(Cy(dC,t)),e.xid=t=>e.check(hy(YS,t)),e.ksuid=t=>e.check(gy(ZS,t)),e.ipv4=t=>e.check(_y($S,t)),e.ipv6=t=>e.check(vy(rC,t)),e.cidrv4=t=>e.check(by(aC,t)),e.cidrv6=t=>e.check(xy(sC,t)),e.e164=t=>e.check(wy(pC,t)),e.datetime=t=>e.check(Zx(t)),e.date=t=>e.check($x(t)),e.time=t=>e.check(tS(t)),e.duration=t=>e.check(rS(t))});function TS(e){return ty(wS,e)}var ES=W(`ZodStringFormat`,(e,t)=>{oh.init(e,t),CS.init(e,t)}),DS=W(`ZodEmail`,(e,t)=>{lh.init(e,t),ES.init(e,t)});function OS(e){return ry(DS,e)}var kS=W(`ZodGUID`,(e,t)=>{sh.init(e,t),ES.init(e,t)});function AS(e){return iy(kS,e)}var jS=W(`ZodUUID`,(e,t)=>{ch.init(e,t),ES.init(e,t)});function MS(e){return ay(jS,e)}function NS(e){return oy(jS,e)}function PS(e){return sy(jS,e)}function FS(e){return cy(jS,e)}var IS=W(`ZodURL`,(e,t)=>{uh.init(e,t),ES.init(e,t)});function LS(e){return ly(IS,e)}function RS(e){return ly(IS,{protocol:Qp,hostname:Zp,...K(e)})}var zS=W(`ZodEmoji`,(e,t)=>{dh.init(e,t),ES.init(e,t)});function BS(e){return uy(zS,e)}var VS=W(`ZodNanoID`,(e,t)=>{fh.init(e,t),ES.init(e,t)});function HS(e){return dy(VS,e)}var US=W(`ZodCUID`,(e,t)=>{ph.init(e,t),ES.init(e,t)});function WS(e){return fy(US,e)}var GS=W(`ZodCUID2`,(e,t)=>{mh.init(e,t),ES.init(e,t)});function KS(e){return py(GS,e)}var qS=W(`ZodULID`,(e,t)=>{hh.init(e,t),ES.init(e,t)});function JS(e){return my(qS,e)}var YS=W(`ZodXID`,(e,t)=>{gh.init(e,t),ES.init(e,t)});function XS(e){return hy(YS,e)}var ZS=W(`ZodKSUID`,(e,t)=>{_h.init(e,t),ES.init(e,t)});function QS(e){return gy(ZS,e)}var $S=W(`ZodIPv4`,(e,t)=>{Sh.init(e,t),ES.init(e,t)});function eC(e){return _y($S,e)}var tC=W(`ZodMAC`,(e,t)=>{wh.init(e,t),ES.init(e,t)});function nC(e){return yy(tC,e)}var rC=W(`ZodIPv6`,(e,t)=>{Ch.init(e,t),ES.init(e,t)});function iC(e){return vy(rC,e)}var aC=W(`ZodCIDRv4`,(e,t)=>{Th.init(e,t),ES.init(e,t)});function oC(e){return by(aC,e)}var sC=W(`ZodCIDRv6`,(e,t)=>{Eh.init(e,t),ES.init(e,t)});function cC(e){return xy(sC,e)}var lC=W(`ZodBase64`,(e,t)=>{Oh.init(e,t),ES.init(e,t)});function uC(e){return Sy(lC,e)}var dC=W(`ZodBase64URL`,(e,t)=>{Ah.init(e,t),ES.init(e,t)});function fC(e){return Cy(dC,e)}var pC=W(`ZodE164`,(e,t)=>{jh.init(e,t),ES.init(e,t)});function mC(e){return wy(pC,e)}var hC=W(`ZodJWT`,(e,t)=>{Nh.init(e,t),ES.init(e,t)});function gC(e){return Ty(hC,e)}var _C=W(`ZodCustomStringFormat`,(e,t)=>{Ph.init(e,t),ES.init(e,t)});function vC(e,t,n={}){return Yb(_C,e,t,n)}function yC(e){return Yb(_C,`hostname`,Xp,e)}function bC(e){return Yb(_C,`hex`,mm,e)}function xC(e,t){let n=`${e}_${t?.enc??`hex`}`,r=xp[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return Yb(_C,n,r,t)}var SC=W(`ZodNumber`,(e,t)=>{Fh.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ax(e,t,n,r),xS(e,`ZodNumber`,{gt(e,t){return this.check(nb(e,t))},gte(e,t){return this.check(rb(e,t))},min(e,t){return this.check(rb(e,t))},lt(e,t){return this.check(eb(e,t))},lte(e,t){return this.check(tb(e,t))},max(e,t){return this.check(tb(e,t))},int(e){return this.check(TC(e))},safe(e){return this.check(TC(e))},positive(e){return this.check(nb(0,e))},nonnegative(e){return this.check(rb(0,e))},negative(e){return this.check(eb(0,e))},nonpositive(e){return this.check(tb(0,e))},multipleOf(e,t){return this.check(cb(e,t))},step(e,t){return this.check(cb(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function CC(e){return jy(SC,e)}var wC=W(`ZodNumberFormat`,(e,t)=>{Ih.init(e,t),SC.init(e,t)});function TC(e){return Ny(wC,e)}function EC(e){return Py(wC,e)}function DC(e){return Fy(wC,e)}function OC(e){return Iy(wC,e)}function kC(e){return Ly(wC,e)}var AC=W(`ZodBoolean`,(e,t)=>{Lh.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ox(e,t,n,r)});function jC(e){return Ry(AC,e)}var MC=W(`ZodBigInt`,(e,t)=>{Rh.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sx(e,t,n,r),e.gte=(t,n)=>e.check(rb(t,n)),e.min=(t,n)=>e.check(rb(t,n)),e.gt=(t,n)=>e.check(nb(t,n)),e.gte=(t,n)=>e.check(rb(t,n)),e.min=(t,n)=>e.check(rb(t,n)),e.lt=(t,n)=>e.check(eb(t,n)),e.lte=(t,n)=>e.check(tb(t,n)),e.max=(t,n)=>e.check(tb(t,n)),e.positive=t=>e.check(nb(BigInt(0),t)),e.negative=t=>e.check(eb(BigInt(0),t)),e.nonpositive=t=>e.check(tb(BigInt(0),t)),e.nonnegative=t=>e.check(rb(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(cb(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function NC(e){return By(MC,e)}var PC=W(`ZodBigIntFormat`,(e,t)=>{zh.init(e,t),MC.init(e,t)});function FC(e){return Hy(PC,e)}function IC(e){return Uy(PC,e)}var LC=W(`ZodSymbol`,(e,t)=>{Bh.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cx(e,t,n,r)});function RC(e){return Wy(LC,e)}var zC=W(`ZodUndefined`,(e,t)=>{Vh.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ux(e,t,n,r)});function BC(e){return Gy(zC,e)}var VC=W(`ZodNull`,(e,t)=>{Hh.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lx(e,t,n,r)});function HC(e){return Ky(VC,e)}var UC=W(`ZodAny`,(e,t)=>{Uh.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function WC(){return qy(UC)}var GC=W(`ZodUnknown`,(e,t)=>{Wh.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function KC(){return Jy(GC)}var qC=W(`ZodNever`,(e,t)=>{Gh.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fx(e,t,n,r)});function JC(e){return Yy(qC,e)}var YC=W(`ZodVoid`,(e,t)=>{Kh.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dx(e,t,n,r)});function XC(e){return Xy(YC,e)}var ZC=W(`ZodDate`,(e,t)=>{qh.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hx(e,t,n,r),e.min=(t,n)=>e.check(rb(t,n)),e.max=(t,n)=>e.check(tb(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function QC(e){return Zy(ZC,e)}var $C=W(`ZodArray`,(e,t)=>{Yh.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dx(e,t,n,r),e.element=t.element,xS(e,`ZodArray`,{min(e,t){return this.check(pb(e,t))},nonempty(e){return this.check(pb(1,e))},max(e,t){return this.check(fb(e,t))},length(e,t){return this.check(mb(e,t))},unwrap(){return this.element}})});function ew(e,t){return kb($C,e,t)}function tw(e){let t=e._zod.def.shape;return Tw(Object.keys(t))}var nw=W(`ZodObject`,(e,t)=>{eg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ox(e,t,n,r),$d(e,`shape`,()=>t.shape),xS(e,`ZodObject`,{keyof(){return Tw(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:KC()})},loose(){return this.clone({...this._zod.def,catchall:KC()})},strict(){return this.clone({...this._zod.def,catchall:JC()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return xf(this,e)},safeExtend(e){return Sf(this,e)},merge(e){return Cf(this,e)},pick(e){return yf(this,e)},omit(e){return bf(this,e)},partial(...e){return wf(Nw,this,e[0])},required(...e){return Tf(Ww,this,e[0])}})});function rw(e,t){return new nw({type:`object`,shape:e??{},...K(t)})}function iw(e,t){return new nw({type:`object`,shape:e,catchall:JC(),...K(t)})}function aw(e,t){return new nw({type:`object`,shape:e,catchall:KC(),...K(t)})}var ow=W(`ZodUnion`,(e,t)=>{ng.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kx(e,t,n,r),e.options=t.options});function sw(e,t){return new ow({type:`union`,options:e,...K(t)})}var cw=W(`ZodXor`,(e,t)=>{ow.init(e,t),ig.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kx(e,t,n,r),e.options=t.options});function lw(e,t){return new cw({type:`union`,options:e,inclusive:!1,...K(t)})}var uw=W(`ZodDiscriminatedUnion`,(e,t)=>{ow.init(e,t),ag.init(e,t)});function dw(e,t,n){return new uw({type:`union`,options:t,discriminator:e,...K(n)})}var fw=W(`ZodIntersection`,(e,t)=>{og.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ax(e,t,n,r)});function pw(e,t){return new fw({type:`intersection`,left:e,right:t})}var mw=W(`ZodTuple`,(e,t)=>{lg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jx(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function hw(e,t,n){let r=t instanceof ih;return new mw({type:`tuple`,items:e,rest:r?t:null,...K(r?n:t)})}var gw=W(`ZodRecord`,(e,t)=>{pg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mx(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function _w(e,t,n){return!t||!t._zod?new gw({type:`record`,keyType:TS(),valueType:e,...K(t)}):new gw({type:`record`,keyType:e,valueType:t,...K(n)})}function vw(e,t,n){let r=pf(e);return r._zod.values=void 0,new gw({type:`record`,keyType:r,valueType:t,...K(n)})}function yw(e,t,n){return new gw({type:`record`,keyType:e,valueType:t,mode:`loose`,...K(n)})}var bw=W(`ZodMap`,(e,t)=>{mg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tx(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(ub(...t)),e.nonempty=t=>e.check(ub(1,t)),e.max=(...t)=>e.check(lb(...t)),e.size=(...t)=>e.check(db(...t))});function xw(e,t,n){return new bw({type:`map`,keyType:e,valueType:t,...K(n)})}var Sw=W(`ZodSet`,(e,t)=>{gg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ex(e,t,n,r),e.min=(...t)=>e.check(ub(...t)),e.nonempty=t=>e.check(ub(1,t)),e.max=(...t)=>e.check(lb(...t)),e.size=(...t)=>e.check(db(...t))});function Cw(e,t){return new Sw({type:`set`,valueType:e,...K(t)})}var ww=W(`ZodEnum`,(e,t)=>{vg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gx(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new ww({...t,checks:[],...K(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new ww({...t,checks:[],...K(r),entries:i})}});function Tw(e,t){return new ww({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...K(t)})}function Ew(e,t){return new ww({type:`enum`,entries:e,...K(t)})}var Dw=W(`ZodLiteral`,(e,t)=>{yg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_x(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ow(e,t){return new Dw({type:`literal`,values:Array.isArray(e)?e:[e],...K(t)})}var kw=W(`ZodFile`,(e,t)=>{bg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bx(e,t,n,r),e.min=(t,n)=>e.check(ub(t,n)),e.max=(t,n)=>e.check(lb(t,n)),e.mime=(t,n)=>e.check(Sb(Array.isArray(t)?t:[t],n))});function Aw(e){return Mb(kw,e)}var jw=W(`ZodTransform`,(e,t)=>{xg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wx(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ld(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Pf(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Pf(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Mw(e){return new jw({type:`transform`,transform:e})}var Nw=W(`ZodOptional`,(e,t)=>{Cg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vx(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Pw(e){return new Nw({type:`optional`,innerType:e})}var Fw=W(`ZodExactOptional`,(e,t)=>{wg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vx(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Iw(e){return new Fw({type:`optional`,innerType:e})}var Lw=W(`ZodNullable`,(e,t)=>{Tg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nx(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Rw(e){return new Lw({type:`nullable`,innerType:e})}function zw(e){return Pw(Rw(e))}var Bw=W(`ZodDefault`,(e,t)=>{Eg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fx(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Vw(e,t){return new Bw({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():lf(t)}})}var Hw=W(`ZodPrefault`,(e,t)=>{Og.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ix(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Uw(e,t){return new Hw({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():lf(t)}})}var Ww=W(`ZodNonOptional`,(e,t)=>{kg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Px(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Gw(e,t){return new Ww({type:`nonoptional`,innerType:e,...K(t)})}var Kw=W(`ZodSuccess`,(e,t)=>{jg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xx(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qw(e){return new Kw({type:`success`,innerType:e})}var Jw=W(`ZodCatch`,(e,t)=>{Mg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lx(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Yw(e,t){return new Jw({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Xw=W(`ZodNaN`,(e,t)=>{Ng.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vx(e,t,n,r)});function Zw(e){return $y(Xw,e)}var Qw=W(`ZodPipe`,(e,t)=>{Pg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rx(e,t,n,r),e.in=t.in,e.out=t.out});function $w(e,t){return new Qw({type:`pipe`,in:e,out:t})}var eT=W(`ZodCodec`,(e,t)=>{Qw.init(e,t),Ig.init(e,t)});function tT(e,t,n){return new eT({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function nT(e){let t=e._zod.def;return new eT({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var rT=W(`ZodPreprocess`,(e,t)=>{Qw.init(e,t),zg.init(e,t)}),iT=W(`ZodReadonly`,(e,t)=>{Bg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zx(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function aT(e){return new iT({type:`readonly`,innerType:e})}var oT=W(`ZodTemplateLiteral`,(e,t)=>{Hg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yx(e,t,n,r)});function sT(e,t){return new oT({type:`template_literal`,parts:e,...K(t)})}var cT=W(`ZodLazy`,(e,t)=>{Gg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hx(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function lT(e){return new cT({type:`lazy`,getter:e})}var uT=W(`ZodPromise`,(e,t)=>{Wg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bx(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function dT(e){return new uT({type:`promise`,innerType:e})}var fT=W(`ZodFunction`,(e,t)=>{Ug.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cx(e,t,n,r)});function pT(e){return new fT({type:`function`,input:Array.isArray(e?.input)?hw(e?.input):e?.input??ew(KC()),output:e?.output??KC()})}var mT=W(`ZodCustom`,(e,t)=>{Kg.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sx(e,t,n,r)});function hT(e){let t=new Mm({check:`custom`});return t._zod.check=e,t}function gT(e,t){return Hb(mT,e??(()=>!0),t)}function _T(e,t={}){return Ub(mT,e,t)}function vT(e,t){return Wb(e,t)}var yT=Kb,bT=qb;function xT(e,t={}){let n=new mT({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...K(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}var ST=(...e)=>Jb({Codec:eT,Boolean:AC,String:wS},...e);function CT(e){let t=lT(()=>sw([TS(e),CC(),jC(),HC(),ew(t),_w(TS(),t)]));return t}function wT(e,t){return new rT({type:`pipe`,in:Mw(e),out:t})}var TT={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`};function ET(e){zd({customError:e})}function DT(){return zd().customError}var OT;OT||={};var kT={...yS,...Jx,iso:Yx},AT=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`));function jT(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function MT(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function NT(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return kT.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return kT.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=PT(MT(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return kT.null();if(n.length===0)return kT.never();if(n.length===1)return kT.literal(n[0]);if(n.every(e=>typeof e==`string`))return kT.enum(n);let r=n.map(e=>kT.literal(e));return r.length<2?r[0]:kT.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return kT.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>NT({...e,type:n},t));return r.length===0?kT.never():r.length===1?r[0]:kT.union(r)}if(!n)return kT.any();let r;switch(n){case`string`:{let t=kT.string();if(e.format){let n=e.format;n===`email`?t=t.check(kT.email()):n===`uri`||n===`uri-reference`?t=t.check(kT.url()):n===`uuid`||n===`guid`?t=t.check(kT.uuid()):n===`date-time`?t=t.check(kT.iso.datetime()):n===`date`?t=t.check(kT.iso.date()):n===`time`?t=t.check(kT.iso.time()):n===`duration`?t=t.check(kT.iso.duration()):n===`ipv4`?t=t.check(kT.ipv4()):n===`ipv6`?t=t.check(kT.ipv6()):n===`mac`?t=t.check(kT.mac()):n===`cidr`?t=t.check(kT.cidrv4()):n===`cidr-v6`?t=t.check(kT.cidrv6()):n===`base64`?t=t.check(kT.base64()):n===`base64url`?t=t.check(kT.base64url()):n===`e164`?t=t.check(kT.e164()):n===`jwt`?t=t.check(kT.jwt()):n===`emoji`?t=t.check(kT.emoji()):n===`nanoid`?t=t.check(kT.nanoid()):n===`cuid`?t=t.check(kT.cuid()):n===`cuid2`?t=t.check(kT.cuid2()):n===`ulid`?t=t.check(kT.ulid()):n===`xid`?t=t.check(kT.xid()):n===`ksuid`&&(t=t.check(kT.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?kT.number().int():kT.number();typeof e.minimum==`number`&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=kT.boolean();break;case`null`:r=kT.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[e,r]of Object.entries(i)){let i=PT(r,t);n[e]=a.has(e)?i:i.optional()}if(e.propertyNames){let i=PT(e.propertyNames,t),a=e.additionalProperties&&typeof e.additionalProperties==`object`?PT(e.additionalProperties,t):kT.any();if(Object.keys(n).length===0){r=kT.record(i,a);break}let o=kT.object(n).passthrough(),s=kT.looseRecord(i,a);r=kT.intersection(o,s);break}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=PT(i[e],t),r=kT.string().regex(new RegExp(e));o.push(kT.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(kT.object(n).passthrough()),s.push(...o),s.length===0)r=kT.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=kT.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=kT.intersection(e,s[t]);r=e}break}let o=kT.object(n);r=e.additionalProperties===!1?o.strict():typeof e.additionalProperties==`object`?o.catchall(PT(e.additionalProperties,t)):o.passthrough();break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(e=>PT(e,t)),o=i&&typeof i==`object`&&!Array.isArray(i)?PT(i,t):void 0;r=o?kT.tuple(a).rest(o):kT.tuple(a),typeof e.minItems==`number`&&(r=r.check(kT.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(kT.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=i.map(e=>PT(e,t)),a=e.additionalItems&&typeof e.additionalItems==`object`?PT(e.additionalItems,t):void 0;r=a?kT.tuple(n).rest(a):kT.tuple(n),typeof e.minItems==`number`&&(r=r.check(kT.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(kT.maxLength(e.maxItems)))}else if(i!==void 0){let n=PT(i,t),a=kT.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=kT.array(kT.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function PT(e,t){if(typeof e==`boolean`)return e?kT.any():kT.never();let n=NT(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>PT(e,t)),a=kT.union(i);n=r?kT.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>PT(e,t)),a=kT.xor(i);n=r?kT.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:kT.any();else{let i=r?n:PT(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=kT.intersection(i,PT(e.allOf[n],t));n=i}e.nullable===!0&&t.version===`openapi-3.0`&&(n=kT.nullable(n)),e.readOnly===!0&&(n=kT.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);for(let t of Object.keys(e))AT.has(t)||(i[t]=e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function FT(e,t){if(typeof e==`boolean`)return e?kT.any():kT.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:jT(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??ey};return PT(n,r)}var IT=n({bigint:()=>BT,boolean:()=>zT,date:()=>VT,number:()=>RT,string:()=>LT});function LT(e){return ny(wS,e)}function RT(e){return My(SC,e)}function zT(e){return zy(AC,e)}function BT(e){return Vy(MC,e)}function VT(e){return Qy(ZC,e)}var HT=n({$brand:()=>Fd,$input:()=>Zv,$output:()=>Xv,NEVER:()=>Pd,TimePrecision:()=>Ey,ZodAny:()=>UC,ZodArray:()=>$C,ZodBase64:()=>lC,ZodBase64URL:()=>dC,ZodBigInt:()=>MC,ZodBigIntFormat:()=>PC,ZodBoolean:()=>AC,ZodCIDRv4:()=>aC,ZodCIDRv6:()=>sC,ZodCUID:()=>US,ZodCUID2:()=>GS,ZodCatch:()=>Jw,ZodCodec:()=>eT,ZodCustom:()=>mT,ZodCustomStringFormat:()=>_C,ZodDate:()=>ZC,ZodDefault:()=>Bw,ZodDiscriminatedUnion:()=>uw,ZodE164:()=>pC,ZodEmail:()=>DS,ZodEmoji:()=>zS,ZodEnum:()=>ww,ZodError:()=>aS,ZodExactOptional:()=>Fw,ZodFile:()=>kw,ZodFirstPartyTypeKind:()=>OT,ZodFunction:()=>fT,ZodGUID:()=>kS,ZodIPv4:()=>$S,ZodIPv6:()=>rC,ZodISODate:()=>Qx,ZodISODateTime:()=>Xx,ZodISODuration:()=>nS,ZodISOTime:()=>eS,ZodIntersection:()=>fw,ZodIssueCode:()=>TT,ZodJWT:()=>hC,ZodKSUID:()=>ZS,ZodLazy:()=>cT,ZodLiteral:()=>Dw,ZodMAC:()=>tC,ZodMap:()=>bw,ZodNaN:()=>Xw,ZodNanoID:()=>VS,ZodNever:()=>qC,ZodNonOptional:()=>Ww,ZodNull:()=>VC,ZodNullable:()=>Lw,ZodNumber:()=>SC,ZodNumberFormat:()=>wC,ZodObject:()=>nw,ZodOptional:()=>Nw,ZodPipe:()=>Qw,ZodPrefault:()=>Hw,ZodPreprocess:()=>rT,ZodPromise:()=>uT,ZodReadonly:()=>iT,ZodRealError:()=>oS,ZodRecord:()=>gw,ZodSet:()=>Sw,ZodString:()=>wS,ZodStringFormat:()=>ES,ZodSuccess:()=>Kw,ZodSymbol:()=>LC,ZodTemplateLiteral:()=>oT,ZodTransform:()=>jw,ZodTuple:()=>mw,ZodType:()=>SS,ZodULID:()=>qS,ZodURL:()=>IS,ZodUUID:()=>jS,ZodUndefined:()=>zC,ZodUnion:()=>ow,ZodUnknown:()=>GC,ZodVoid:()=>YC,ZodXID:()=>YS,ZodXor:()=>cw,_ZodString:()=>CS,_default:()=>Vw,_function:()=>pT,any:()=>WC,array:()=>ew,base64:()=>uC,base64url:()=>fC,bigint:()=>NC,boolean:()=>jC,catch:()=>Yw,check:()=>hT,cidrv4:()=>oC,cidrv6:()=>cC,clone:()=>pf,codec:()=>tT,coerce:()=>IT,config:()=>zd,core:()=>qx,cuid:()=>WS,cuid2:()=>KS,custom:()=>gT,date:()=>QC,decode:()=>fS,decodeAsync:()=>mS,describe:()=>yT,discriminatedUnion:()=>dw,e164:()=>mC,email:()=>OS,emoji:()=>BS,encode:()=>dS,encodeAsync:()=>pS,endsWith:()=>bb,enum:()=>Tw,exactOptional:()=>Iw,file:()=>Aw,flattenError:()=>Kf,float32:()=>EC,float64:()=>DC,formatError:()=>qf,fromJSONSchema:()=>FT,function:()=>pT,getErrorMap:()=>DT,globalRegistry:()=>ey,gt:()=>nb,gte:()=>rb,guid:()=>AS,hash:()=>xC,hex:()=>bC,hostname:()=>yC,httpUrl:()=>RS,includes:()=>vb,instanceof:()=>xT,int:()=>TC,int32:()=>OC,int64:()=>FC,intersection:()=>pw,invertCodec:()=>nT,ipv4:()=>eC,ipv6:()=>iC,iso:()=>Yx,json:()=>CT,jwt:()=>gC,keyof:()=>tw,ksuid:()=>QS,lazy:()=>lT,length:()=>mb,literal:()=>Ow,locales:()=>Jv,looseObject:()=>aw,looseRecord:()=>yw,lowercase:()=>gb,lt:()=>eb,lte:()=>tb,mac:()=>nC,map:()=>xw,maxLength:()=>fb,maxSize:()=>lb,meta:()=>bT,mime:()=>Sb,minLength:()=>pb,minSize:()=>ub,multipleOf:()=>cb,nan:()=>Zw,nanoid:()=>HS,nativeEnum:()=>Ew,negative:()=>ab,never:()=>JC,nonnegative:()=>sb,nonoptional:()=>Gw,nonpositive:()=>ob,normalize:()=>wb,null:()=>HC,nullable:()=>Rw,nullish:()=>zw,number:()=>CC,object:()=>rw,optional:()=>Pw,overwrite:()=>Cb,parse:()=>sS,parseAsync:()=>cS,partialRecord:()=>vw,pipe:()=>$w,positive:()=>ib,prefault:()=>Uw,preprocess:()=>wT,prettifyError:()=>Xf,promise:()=>dT,property:()=>xb,readonly:()=>aT,record:()=>_w,refine:()=>_T,regex:()=>hb,regexes:()=>xp,registry:()=>$v,safeDecode:()=>gS,safeDecodeAsync:()=>vS,safeEncode:()=>hS,safeEncodeAsync:()=>_S,safeParse:()=>lS,safeParseAsync:()=>uS,set:()=>Cw,setErrorMap:()=>ET,size:()=>db,slugify:()=>Ob,startsWith:()=>yb,strictObject:()=>iw,string:()=>TS,stringFormat:()=>vC,stringbool:()=>ST,success:()=>qw,superRefine:()=>vT,symbol:()=>RC,templateLiteral:()=>sT,toJSONSchema:()=>Wx,toLowerCase:()=>Eb,toUpperCase:()=>Db,transform:()=>Mw,treeifyError:()=>Jf,trim:()=>Tb,tuple:()=>hw,uint32:()=>kC,uint64:()=>IC,ulid:()=>JS,undefined:()=>BC,union:()=>sw,unknown:()=>KC,uppercase:()=>_b,url:()=>LS,util:()=>Bd,uuid:()=>MS,uuidv4:()=>NS,uuidv6:()=>PS,uuidv7:()=>FS,void:()=>XC,xid:()=>XS,xor:()=>lw});zd(m_());var UT=HT,WT=function(e){return e.AFFIRMATIVE=`affirmative`,e.UNANIMOUS=`unanimous`,e.CONSENSUS=`consensus`,e}({}),GT=function(e){return e.CREATE=`create`,e.UPDATE=`update`,e.PROVISIONING=`provisioning`,e}({});function KT(e){return btoa(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function qT(e){return[`$2a$`,`$2x$`,`$2y$`,`$2b$`].includes(e.substring(0,4))}function JT(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join(`-`)}var YT=[`agile amber ancient autumn azure blithe bold brave bright brisk calm clever`,`cobalt cosmic crimson crystal curious daring dapper eager electric elegant`,`fancy fearless fluffy gentle gilded golden happy hidden jolly keen lively`,`lucid lunar mellow merry mighty nimble noble polished proud quiet quick rapid`,`royal rustic serene shiny silent silver sleek smooth solar spry stellar`,`sturdy sunny swift tidy vivid witty zesty zealous`].join(` `).split(` `),XT=[`otter falcon willow comet harbor meadow cipher lynx maple heron cedar badger`,`finch glacier canyon beacon pebble ember birch raven sparrow marten walrus`,`puffin orchid cypress juniper aspen lotus quartz basalt tundra lagoon reef`,`delta fjord summit ridge grove thicket mantis cricket beetle newt gecko koala`,`panda bison moose osprey kestrel magpie robin wren salmon marlin coral kelp`,`fern moss lichen clover`].join(` `).split(` `);function ZT(e,t){return e[Math.floor(t()*e.length)]??``}function QT(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function $T(e){let t=e;return()=>{t|=0,t=t+1831565813|0;let e=Math.imul(t^t>>>15,1|t);return e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}}function eE(e){let t=e===void 0?Math.random:$T(QT(e)),n=Math.floor(t()*16777216).toString(16).padStart(6,`0`);return JT(`${ZT(YT,t)}-${ZT(XT,t)}-${n}`).slice(0,128)}var tE=e=>crypto.getRandomValues(new Uint8Array(e)),nE=(e,t,n)=>{let r=256-256%e.length;if(r===256){let r=e.length-1;return(i=t)=>{if(!i)return``;let a=``;for(;;){let t=n(i),o=i;for(;o--;)if(a+=e[t[o]&r],a.length>=i)return a}}}let i=Math.ceil(409.6*t/r);return(a=t)=>{if(!a)return``;let o=``;for(;;){let t=n(i),s=i;for(;s--;)if(t[s]<r&&(o+=e[t[s]%e.length],o.length>=a))return o}}},rE=(e,t=21)=>nE(e,t|0,tE);function iE(e,t){return typeof e==`string`?rE(e,t||21)():typeof e==`number`?rE(`0123456789abcdefghijklmnopqrstuvwxyz`,e)():rE(`0123456789abcdefghijklmnopqrstuvwxyz`,t||21)()}var aE=`0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_!.`,oE=32;function sE(){return iE(aE,oE)}function cE(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function lE(e){let t=e.indexOf(`://`),n=t===-1?0:t+3,r=e.slice(n).search(/[/?#\\]/),i=r===-1?e.length:n+r;return e.slice(n,i).includes(`**`)}function uE(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function dE(e,t){let n=Object.keys(t);for(let r of n)e[r]=t[r];return e}function fE(e){let t={},n=Object.keys(e);for(let r of n){let n=e[r];if(uE(n)){let e=fE(n),i=Object.keys(e);for(let n of i)t[`${r}.${n}`]=e[n];continue}t[r]=e[r]}return t}function pE(e,t){let n=Object.keys(e),r,i={};for(let a of n)r=t.indexOf(a),r===-1&&(i[a]=e[a]);return i}function mE(e,t){let n=e&&!e.endsWith(`/`)?`${e}/`:e;return new URL(t.replace(/^\/+/,``),n)}function hE(e){if(!e)return``;let t;try{t=new URL(e).pathname}catch{return``}let n=t.replace(/\/+$/,``).replace(/^\/{2,}/,`/`);return n===``||n===`/`?``:n}var gE=function(e){return e.SIGNATURE=`sig`,e.ENCRYPTION=`enc`,e}({});function _E(e){return e===H.JWK_INVALID||e===H.JWK_NOT_FOUND}var vE=function(e){return e.HS256=`HS256`,e.HS384=`HS384`,e.HS512=`HS512`,e.RS256=`RS256`,e.RS384=`RS384`,e.RS512=`RS512`,e.ES256=`ES256`,e.ES384=`ES384`,e.ES512=`ES512`,e.PS256=`PS256`,e.PS384=`PS384`,e.PS512=`PS512`,e}({});function yE(e){return e===H.JWT_EXPIRED||e===H.JWT_INVALID||e===H.JWT_INACTIVE}var bE=function(e){return e.AUTHORIZATION_CODE=`authorization_code`,e.CLIENT_CREDENTIALS=`client_credentials`,e.PASSWORD=`password`,e.REFRESH_TOKEN=`refresh_token`,e}({}),xE=function(e){return e.CLIENT=`client`,e.USER=`user`,e}({}),SE=function(e){return e.NONE=`none`,e.LOGIN=`login`,e.CONSENT=`consent`,e.SELECT_ACCOUNT=`select_account`,e}({}),CE=function(e){return e.INVALID_REQUEST=`invalid_request`,e.INVALID_CLIENT=`invalid_client`,e.INVALID_GRANT=`invalid_grant`,e.UNAUTHORIZED_CLIENT=`unauthorized_client`,e.UNSUPPORTED_GRANT_TYPE=`unsupported_grant_type`,e.UNSUPPORTED_RESPONSE_TYPE=`unsupported_response_type`,e.INVALID_SCOPE=`invalid_scope`,e.INSUFFICIENT_SCOPE=`insufficient_scope`,e.SERVER_ERROR=`server_error`,e.LOGIN_REQUIRED=`login_required`,e.INTERACTION_REQUIRED=`interaction_required`,e.ACCOUNT_SELECTION_REQUIRED=`account_selection_required`,e.CONSENT_REQUIRED=`consent_required`,e.MFA_REQUIRED=`mfa_required`,e.ACCESS_DENIED=`access_denied`,e}({}),wE=function(e){return e.PASSWORD=`urn:authup:pwd`,e.MFA=`urn:authup:mfa`,e}({}),TE=Symbol.for(`@authup/specs/OAuth2Error`);function EE(e){return typeof e==`string`?{message:e}:e??{}}var DE=class extends Td{constructor(e){let t=EE(e);super({code:H.OAUTH_REQUEST_INVALID,message:`OAuth2 request invalid`,...t,data:{error:CE.INVALID_REQUEST,...t.data??{}}}),Rl(this,TE)}};function OE(e){return e.split(/\s+|,+/).map(e=>e.toLowerCase())}function kE(e){return Array.isArray(e)?e.flatMap(e=>kE(e)):OE(e)}function AE(...e){return e.filter(e=>!!e).flatMap(e=>Array.isArray(e)?AE(...e):e.split(/\s+|,+/)).filter(e=>e.length>0)}function jE(e){return!(!uE(e)||typeof e.issuer!=`string`||typeof e.authorization_endpoint!=`string`||typeof e.jwks_uri!=`string`||!Array.isArray(e.response_types_supported)||!Array.isArray(e.subject_types_supported)||!Array.isArray(e.id_token_signing_alg_values_supported)||typeof e.token_endpoint!=`string`)}var ME=class extends ed{initialize(){super.initialize();let e=U(TS().trim().toLowerCase().min(3).max(128).check(e=>{try{kd(e.value,{throwOnFailure:!0})}catch(t){e.issues.push({input:e.value,code:`custom`,message:t instanceof Error?t.message:`The key name is not valid.`})}}));this.mount(`name`,{optional:!0},e),this.mount(`use`,{group:GT.CREATE},U(Tw(gE))),this.mount(`signatureAlgorithm`,{group:GT.CREATE,optional:!0},U(Tw(vE).nullable())),this.mount(`priority`,{optional:!0},U(RT().int().min(0))),this.mount(`status`,{optional:!0},U(Tw(Cd))),this.mount(`realmId`,{group:GT.CREATE,optional:!0},U(MS().nullable())),this.mount(`decryptionKey`,{group:GT.CREATE,optional:!0},U(TS().min(16).max(16384).nullable())),this.mount(`encryptionKey`,{group:GT.CREATE,optional:!0},U(TS().min(16).max(16384).nullable())),this.mount(`certificate`,{group:GT.CREATE,optional:!0},U(TS().min(64).max(16384).nullable()))}},NE=function(e){return e.NONE=`none`,e.SECRET=`secret`,e.TLS=`tls`,e}({}),PE=function(e){return e.NONE=`none`,e.TLS=`tls`,e}({}),FE=`urn:authup:client:`;function IE(e,t={}){return Od(e,t)}function LE(e){return`${FE}${e}`}function RE(e){return TS().check(t=>{let n=LS(),r=t.value.split(`,`);for(let i of r){try{n.parse(i)}catch(n){t.issues.push({input:i,code:`custom`,message:n instanceof Error?n.message:`The ${e} is not valid.`});continue}lE(i)&&t.issues.push({input:i,code:`custom`,message:`The ${e} must not use ** in the host, it would match every origin. Use a single * for a host wildcard.`})}}).nullable()}var zE=class extends ed{initialize(){super.initialize(),this.mount(`active`,{optional:!0},U(jC())),this.mount(`authMethod`,{optional:!0},U(Tw(NE))),this.mount(`tokenBindingMethod`,{optional:!0},U(Tw(PE)));let e=U(TS().trim().toLowerCase().min(3).max(128).check(e=>{try{IE(e.value,{throwOnFailure:!0})}catch(t){e.issues.push({input:e.value,code:`custom`,message:t instanceof Error?t.message:`The client name is not valid.`})}}));this.mount(`name`,{group:[GT.CREATE,GT.PROVISIONING]},e),this.mount(`name`,{group:GT.UPDATE,optional:!0},e),this.mount(`displayName`,{optional:!0},U(TS().min(3).max(256).nullable())),this.mount(`description`,{optional:!0},U(TS().min(3).max(4096).nullable())),this.mount(`secret`,{optional:!0},U(TS().min(3).max(256).nullable())),this.mount(`secretEncrypted`,{optional:!0},U(jC())),this.mount(`secretHashed`,{optional:!0},U(jC())),this.mount(`redirectUri`,{optional:!0},U(RE(`redirectUri`))),this.mount(`postLogoutRedirectUri`,{optional:!0},U(RE(`postLogoutRedirectUri`))),this.mount(`baseUrl`,{optional:!0},U(LS().nullable())),this.mount(`rootUrl`,{optional:!0},U(LS().nullable())),this.mount(`grantTypes`,{optional:!0},U(TS().min(3).max(512).nullable())),this.mount(`scope`,{optional:!0},U(TS().min(3).max(512).nullable())),this.mount(`accessPolicyId`,{optional:!0},U(MS().nullable())),this.mount(`realmId`,{group:[GT.CREATE,GT.PROVISIONING],optional:!0},U(MS())),this.mount(`builtIn`,{group:GT.PROVISIONING,optional:!0},U(jC()))}},BE={NONE:`none`,OWN:`own`,OWN_OR_NULL:`ownOrNull`,ANY:`any`};function hte(e,t={}){return Od(e,t)}var gte=class extends ed{initialize(){super.initialize();let e=U(TS().trim().toLowerCase().min(3).max(128).check(e=>{try{hte(e.value,{throwOnFailure:!0})}catch(t){e.issues.push({input:e.value,code:`custom`,message:t instanceof Error?t.message:`The permission name is not valid.`})}}));this.mount(`name`,{group:[GT.CREATE,GT.PROVISIONING]},e),this.mount(`name`,{group:GT.UPDATE,optional:!0},e),this.mount(`displayName`,{optional:!0},U(TS().min(3).max(256).nullable())),this.mount(`description`,{optional:!0},U(TS().min(5).max(4096).nullable())),this.mount(`clientId`,{optional:!0},U(MS().nullable())),this.mount(`realmId`,{group:[GT.CREATE,GT.PROVISIONING],optional:!0},U(MS().nullable().optional())),this.mount(`decisionStrategy`,{optional:!0},U(Tw(WT).nullable())),this.mount(`builtIn`,{group:GT.PROVISIONING,optional:!0},U(jC()))}},_te=function(e){return e.CLIENT=`client`,e.USER=`user`,e}({}),VE=function(e){return e.LDAP=`ldap`,e.OAUTH2=`oauth2`,e.OIDC=`oidc`,e}({}),HE=function(e){return e.FACEBOOK=`facebook`,e.GITHUB=`github`,e.GITLAB=`gitlab`,e.GOOGLE=`google`,e.PAYPAL=`paypal`,e.INSTAGRAM=`instagram`,e.STACKOVERFLOW=`stackoverflow`,e.TWITTER=`twitter`,e}({});function UE(e){switch(e){case HE.GITHUB:case HE.GITLAB:case HE.GOOGLE:case HE.FACEBOOK:case HE.INSTAGRAM:case HE.PAYPAL:case HE.STACKOVERFLOW:case HE.TWITTER:return VE.OIDC}return null}var WE=class extends ed{initialize(){super.initialize(),this.mount(`preset`,U(TS().optional().nullable().check(e=>{let t;typeof e.value==`string`&&(t=UE(e.value)),typeof t==`string`&&e.issues.push({input:e.value,code:`custom`,message:`The preset should not be defined.`})}))),this.mount(`clientId`,U(TS().min(3).max(128))),this.mount(`clientSecret`,{optional:!0},U(TS().min(3).max(128).optional().nullable())),this.mount(`tokenUrl`,U(LS())),this.mount(`tokenRevokeUrl`,{optional:!0},U(LS().optional().nullable())),this.mount(`authorizeUrl`,U(LS())),this.mount(`userInfoUrl`,{optional:!0},U(LS().optional().nullable())),this.mount(`scope`,{optional:!0},U(TS().min(3).max(2e3).optional().nullable()))}};function vte(e){return`/identity-providers/${e}/authorize-out`}function yte(e,t={}){return Od(e,t)}var bte=class extends ed{initialize(){super.initialize();let e=U(UT.string().trim().toLowerCase().min(3).max(128).check(e=>{try{yte(e.value,{throwOnFailure:!0})}catch(t){e.issues.push({input:e.value,code:`custom`,message:t instanceof Error?t.message:`The name is not valid.`})}}));this.mount(`name`,{group:GT.CREATE},e),this.mount(`name`,{group:GT.UPDATE,optional:!0},e),this.mount(`displayName`,{optional:!0},U(UT.string().min(3).max(256).nullable()));let t=U(UT.boolean());this.mount(`enabled`,{group:GT.CREATE},t),this.mount(`enabled`,{group:GT.UPDATE,optional:!0},t),this.mount(`realmId`,{group:GT.CREATE,optional:!0},U(UT.uuid())),this.mount(`protocol`,U(UT.enum(VE))),this.mount(`preset`,{optional:!0},U(UT.enum(HE).optional().nullable()))}};function xte(e,t={}){return Od(e,t)}var Ste=class extends ed{initialize(){super.initialize();let e=U(TS().trim().toLowerCase().min(3).max(128).check(e=>{try{xte(e.value,{throwOnFailure:!0})}catch(t){e.issues.push({input:e.value,code:`custom`,message:t instanceof Error?t.message:`The policy name is not valid.`})}}));this.mount(`name`,{group:[GT.CREATE,GT.PROVISIONING]},e),this.mount(`name`,{group:GT.UPDATE,optional:!0},e),this.mount(`displayName`,{optional:!0},U(TS().min(3).max(256).nullable())),this.mount(`invert`,{optional:!0},U(jC())),this.mount(`type`,{group:[GT.CREATE,GT.PROVISIONING]},U(TS().min(3).max(128))),this.mount(`parentId`,{optional:!0},U(MS().nullable())),this.mount(`realmId`,{group:[GT.CREATE,GT.PROVISIONING],optional:!0},U(MS().nullable())),this.mount(`builtIn`,{group:GT.PROVISIONING,optional:!0},U(jC()))}},Cte=`master`;function wte(e,t={}){return Od(e,t)}var Tte=class extends ed{initialize(){super.initialize();let e=U(TS().trim().toLowerCase().min(3).max(128).check(e=>{try{wte(e.value,{throwOnFailure:!0})}catch(t){e.issues.push({input:e.value,code:`custom`,message:t instanceof Error?t.message:`The realm name is not valid.`})}}));this.mount(`name`,{group:[GT.CREATE,GT.PROVISIONING]},e),this.mount(`name`,{group:GT.UPDATE,optional:!0},e),this.mount(`displayName`,{optional:!0},U(TS().min(3).max(256).nullable())),this.mount(`description`,{optional:!0},U(TS().min(5).max(4096).nullable())),this.mount(`builtIn`,{group:GT.PROVISIONING,optional:!0},U(jC()))}};function Ete(e,t={}){return Od(e,t)}var Dte=class extends ed{initialize(){super.initialize();let e=U(TS().trim().toLowerCase().min(3).max(128).check(e=>{try{Ete(e.value,{throwOnFailure:!0})}catch(t){e.issues.push({input:e.value,code:`custom`,message:t instanceof Error?t.message:`The role name is not valid.`})}}));this.mount(`name`,{group:[GT.CREATE,GT.PROVISIONING]},e),this.mount(`name`,{group:GT.UPDATE,optional:!0},e),this.mount(`displayName`,{optional:!0},U(TS().min(3).max(256).nullable())),this.mount(`description`,{optional:!0},U(TS().min(5).max(4096).nullable())),this.mount(`clientId`,{optional:!0},U(MS().nullable())),this.mount(`realmId`,{group:[GT.CREATE,GT.PROVISIONING],optional:!0},U(MS().nullable())),this.mount(`builtIn`,{group:GT.PROVISIONING,optional:!0},U(jC()))}};function Ote(e,t={}){return Od(e,t)}var kte=class extends ed{initialize(){super.initialize();let e=U(TS().trim().toLowerCase().min(3).max(128).check(e=>{try{Ote(e.value,{throwOnFailure:!0})}catch(t){e.issues.push({input:e.value,code:`custom`,message:t instanceof Error?t.message:`The scope name is not valid.`})}}));this.mount(`name`,{group:[GT.CREATE,GT.PROVISIONING]},e),this.mount(`name`,{group:GT.UPDATE,optional:!0},e),this.mount(`displayName`,{optional:!0},U(TS().min(3).max(256).nullable())),this.mount(`description`,{optional:!0},U(TS().min(5).max(4096).nullable())),this.mount(`realmId`,{group:[GT.CREATE,GT.PROVISIONING],optional:!0},U(MS().nullable())),this.mount(`builtIn`,{group:GT.PROVISIONING,optional:!0},U(jC()))}};function Ate(e,t={}){return Od(e,t)}var jte=class extends ed{initialize(){super.initialize();let e=U(TS().trim().toLowerCase().min(3).max(128).check(e=>{try{Ate(e.value,{throwOnFailure:!0})}catch(t){e.issues.push({input:e.value,code:`custom`,message:Ed(t)?t.message:`The trust anchor name is not valid.`})}}));this.mount(`name`,{group:GT.CREATE},e),this.mount(`name`,{group:GT.UPDATE,optional:!0},e),this.mount(`certificate`,{group:GT.CREATE},U(TS().min(64).max(65536))),this.mount(`enabled`,{optional:!0},U(jC())),this.mount(`realmId`,{group:GT.CREATE,optional:!0},U(MS().nullable()))}};function Mte(e,t={}){if(!Od(e,t))return!1;if(e=e.toLowerCase(),[`bot`,`system`,`everyone`,`here`].some(t=>e.startsWith(t))){if(t.throwOnFailure)throw new Td(`${e} is a reserved name.`);return!1}return!0}function GE(e){return KE(e)?e:`${e}@example.com`}function KE(e){return e.endsWith(`@example.com`)}var Nte=class extends ed{constructor(e={}){super(e)}initialize(){super.initialize();let e=U(TS().trim().toLowerCase().min(3).max(128).check(e=>{try{Mte(e.value,{throwOnFailure:!0})}catch(t){e.issues.push({input:e.value,code:`custom`,message:t instanceof Error?t.message:`The user name is not valid.`})}}));this.mount(`name`,{group:[GT.CREATE,GT.PROVISIONING]},e),this.mount(`name`,{group:GT.UPDATE,optional:!0},e),this.mount(`nameLocked`,{optional:!0},U(jC())),this.mount(`firstName`,{optional:!0},U(TS().min(3).max(128).nullable())),this.mount(`lastName`,{optional:!0},U(TS().min(3).max(128).nullable())),this.mount(`displayName`,{optional:!0},U(TS().min(3).max(256).nullable()));let t=U(OS().trim().toLowerCase().regex(/^[^A-Z]+$/,`Email must be lowercase.`));this.mount(`email`,{group:GT.CREATE},t),this.mount(`email`,{optional:!0,group:GT.UPDATE},t),this.mount(`email`,{optional:!0,group:GT.PROVISIONING},t),this.mount(`password`,{optional:!0},U(TS().min(this.options.passwordMinLength??10).max(512))),this.mount(`active`,{optional:!0},U(jC())),this.mount(`nameLocked`,{optional:!0},U(jC())),this.mount(`realmId`,{group:[GT.CREATE,GT.PROVISIONING],optional:!0},U(MS())),this.mount(`status`,{optional:!0},U(TS().min(3).max(256).nullable())),this.mount(`statusMessage`,{optional:!0},U(TS().min(3).max(256).nullable()))}},qE=function(e){return e.TOTP=`totp`,e.RECOVERY=`recovery`,e.EMAIL=`email`,e.WEBAUTHN=`webauthn`,e}({}),JE=function(e){return e.CLIENT=`client`,e.CLIENT_PERMISSION=`clientPermission`,e.CLIENT_ROLE=`clientRole`,e.CLIENT_SCOPE=`clientScope`,e.CONSENT=`consent`,e.EVENT=`event`,e.IDENTITY_PROVIDER=`identityProvider`,e.IDENTITY_PROVIDER_ACCOUNT=`identityProviderAccount`,e.IDENTITY_PROVIDER_ATTRIBUTE=`identityProviderAttribute`,e.IDENTITY_PROVIDER_ATTRIBUTE_MAPPING=`identityProviderAttributeMapping`,e.IDENTITY_PROVIDER_PERMISSION_MAPPING=`identityProviderPermissionMapping`,e.IDENTITY_PROVIDER_ROLE_MAPPING=`identityProviderRoleMapping`,e.KEY=`key`,e.POLICY=`policy`,e.POLICY_ATTRIBUTE=`policyAttribute`,e.PERMISSION=`permission`,e.PERMISSION_POLICY=`permissionPolicy`,e.REALM=`realm`,e.ROLE=`role`,e.ROLE_ATTRIBUTE=`roleAttribute`,e.ROLE_PERMISSION=`rolePermission`,e.SCOPE=`scope`,e.SESSION=`session`,e.SESSION_TOKEN=`sessionToken`,e.TRUST_ANCHOR=`trustAnchor`,e.USER=`user`,e.USER_ATTRIBUTE=`userAttribute`,e.USER_AUTHENTICATOR=`userAuthenticator`,e.USER_PERMISSION=`userPermission`,e.USER_ROLE=`userRole`,e}({}),YE=function(e){return e.CREATED=`created`,e.DELETED=`deleted`,e.UPDATED=`updated`,e}({});function Pte(e,t){return t?`${e}:${t}`:e}function XE(e){return{type:`translations`,data:e}}function ZE(e,t){return{type:`namespace`,name:e,data:t}}function QE(e,t){return{type:`locale`,name:e,data:t}}function $E(e){return{type:`catalog`,data:e}}function eD(e){return{type:`plural`,data:e}}var tD=new Set([`zero`,`one`,`two`,`few`,`many`,`other`]);function nD(e){if(!Yl(e))return!1;let t=e,n=Object.keys(t);if(n.length===0||typeof t.other!=`string`)return!1;for(let e of n)if(!tD.has(e)||typeof t[e]!=`string`)return!1;return!0}function rD(e){return Yl(e)&&e.type===`plural`&&nD(e.data)}function iD(e){return Yl(e)&&e.type===`translations`&&Yl(e.data)}function aD(e){return Yl(e)&&e.type===`namespace`&&typeof e.name==`string`&&Array.isArray(e.data)}function oD(e){return Yl(e)&&e.type===`locale`&&typeof e.name==`string`&&Array.isArray(e.data)}function sD(e){return Yl(e)&&e.type===`catalog`&&Array.isArray(e.data)}function cD(){try{return typeof process<`u`&&!0}catch{return!1}}var lD=``,uD=new Set;function dD(e,t){cD()||uD.has(e)||(uD.add(e),console.warn(`[ilingo] ${e}: expected a catalog descriptor node but received ${t===null?`null`:typeof t}. Catalog input is tree-only — build it with defineCatalog / defineLocale / defineNamespace / defineTranslations (see the catalog-design guide).`))}function fD(e,t){for(let n of Object.keys(t)){let r=t[n];if(typeof r==`string`||rD(r)){e[n]=r;continue}let i=e[n];e[n]=fD(i&&typeof i!=`string`&&!rD(i)?i:{},r)}return e}function pD(e,t,n){for(let r of n)iD(r)?e[t]=fD(e[t]||{},r.data):aD(r)?pD(e,t?`${t}.${r.name}`:r.name,r.data):dD(`namespace child`,r)}function mD(e){return sD(e)?e.data:Array.isArray(e)?e:[e]}function hD(e){let t={};for(let n of mD(e)){if(!oD(n)){dD(`catalog locale`,n);continue}let e=t[n.name]||(t[n.name]={});for(let t of n.data)aD(t)?pD(e,t.name,t.data):iD(t)?e[lD]=fD(e[lD]||{},t.data):dD(`locale child`,t)}return t}var gD=Symbol.for(`ilingo.error`),_D=class extends Error{static[Symbol.hasInstance](e){return yD(e,gD)}constructor(e,t){super(e,t),this.name=new.target.name,vD(this,gD)}};function vD(e,t){Object.defineProperty(e,t,{value:!0,enumerable:!1,configurable:!0})}function yD(e,t){return typeof e==`object`&&!!e&&e[t]===!0}var bD=Symbol.for(`ilingo.sync-unavailable-error`),xD=class extends _D{static[Symbol.hasInstance](e){return yD(e,bD)}locale;namespace;key;storeId;constructor(e,t={}){let{locale:n,namespace:r,key:i,storeId:a,...o}=t;super(e,o),this.locale=n,this.namespace=r,this.key=i,this.storeId=a,vD(this,gD),vD(this,bD)}};function SD(e){return yD(e,bD)}function CD(e){if(!e)return{};let t={};for(let n of e.split(`,`)){let e=n.indexOf(`=`);if(e===-1)continue;let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();!r||!i||(t[r]=i===`true`?!0:i===`false`?!1:/^-?\d+(\.\d+)?$/.test(i)?Number(i):i)}return t}var wD=/^[A-Za-z_][A-Za-z0-9_]*$/;function TD(e){let t=e.trim();if(!t)return;let n=t.indexOf(`(`);if(n===-1)return wD.test(t)?{name:t,options:void 0}:void 0;let r=t.indexOf(`)`,n);if(r!==t.length-1)return;let i=t.slice(0,n).trim();if(wD.test(i))return{name:i,options:t.slice(n+1,r).trim()}}var ED=class{entries=new Map;cache=new Map;constructor(){this.register(`number`,(e,t,n)=>{let r=typeof e==`number`?e:Number(e);if(Number.isNaN(r))return String(e);let i=this.intl(`number`,n,t,()=>new Intl.NumberFormat(n,t));return i?i.format(r):String(e)}),this.register(`date`,(e,t,n)=>{let r;if(e instanceof Date)r=e;else if(typeof e==`number`||typeof e==`string`)r=new Date(e);else return String(e);if(Number.isNaN(r.getTime()))return String(e);let i=this.intl(`date`,n,t,()=>new Intl.DateTimeFormat(n,t));return i?i.format(r):String(e)}),this.register(`list`,(e,t,n)=>{if(!Array.isArray(e))return String(e);let r=this.intl(`list`,n,t,()=>new Intl.ListFormat(n,t));return r?r.format(e.map(String)):e.map(String).join(`, `)})}register(e,t){this.entries.set(e,t)}get(e){return this.entries.get(e)}has(e){return this.entries.has(e)}intl(e,t,n,r){let i;try{let r=Object.keys(n).sort();i=`${e}|${t}|${JSON.stringify(n,r)}`}catch{return}let a=this.cache.get(i);if(!a){try{a=r()}catch{return}this.cache.set(i,a)}return a}};function DD(e){let t=e.split(`-`),n=[];for(let e=t.length-1;e>0;e--)n.push(t.slice(0,e).join(`-`));return n}function OD(e,t,n){if(t===!1)return[e];let r=[],i=!1;if(typeof t==`function`?(i=!0,r.push(...t(e))):Array.isArray(t)?(i=!0,r.push(...t)):typeof t==`string`?r.push(t):r.push(...DD(e)),i&&r.length===0)return[e];let a=new Set,o=[];for(let t of[e,...r])t!==n&&!a.has(t)&&(a.add(t),o.push(t));return o.push(n),o}var kD=/\{\{\s*([^,}]+?)(?:\s*,\s*([^}]+?))?\s*\}\}/g,AD=/\{\{\s*([^,}]+?)(?:\s*,\s*([^}]+?))?\s*\}\}|\{\s*([A-Za-z_][A-Za-z0-9_-]*)\s*\}/g;function jD(e){let t=[],n=0;for(let r of e.matchAll(AD)){let i=r.index??0;i>n&&t.push({kind:`text`,value:e.slice(n,i)});let[,a,o,s]=r;if(typeof s==`string`)t.push({kind:`slot`,name:s});else if(typeof a==`string`){let e={kind:`var`,name:a.trim()};typeof o==`string`&&(e.modifierExpression=o.trim()),t.push(e)}n=i+r[0].length}return n<e.length&&t.push({kind:`text`,value:e.slice(n)}),t}function MD(e,t,n){let r,i;return n instanceof RegExp?(r=n,i=void 0):(r=kD,i=n),e.replace(r,(e,n,r)=>{let a=n.trim();if(t[a]===void 0)return e;let o=t[a];if(!r||!i)return String(o);let s=TD(r);if(!s)return String(o);let c=i.formatters.get(s.name);return c?c(o,CD(s.options),i.locale):(i.onUnknownFormatter?.(s.name),String(o))})}var ND=class e{stores;locale;fallback;onMissingKey;pluralRulesCache;formatters;warnedKeys;warnedFormatters;constructor(e={}){if(this.locale=e.locale||`en`,this.fallback=e.fallback,this.onMissingKey=e.onMissingKey,this.pluralRulesCache=new Map,this.warnedKeys=new Set,this.warnedFormatters=new Set,this.formatters=new ED,e.formatters)for(let[t,n]of Object.entries(e.formatters))this.formatters.register(t,n);if(this.stores=new Map,e.store){let t=Array.isArray(e.store)?e.store:[e.store];for(let e of t)this.registerStore(e)}}registerStore(e){this.stores.has(e.id)||this.stores.set(e.id,e)}registerFormatter(e,t){this.formatters.register(e,t)}clone(t={}){let n=new e({store:t.store,locale:t.locale??this.locale,fallback:`fallback`in t?t.fallback:this.fallback,onMissingKey:`onMissingKey`in t?t.onMissingKey:this.onMissingKey});for(let[e,t]of this.stores)n.stores.set(e,t);if(n.formatters=this.formatters,t.formatters)for(let[e,r]of Object.entries(t.formatters))n.formatters.register(e,r);return n}merge(e){for(let[t,n]of e.stores)this.stores.has(t)||this.stores.set(t,n)}setLocale(e){this.locale=e}resetLocale(){this.locale=`en`}getLocale(){return this.locale}async getLocales(){let e=[];for(let t of this.stores.values())e.push(...await t.getLocales());return Array.from(new Set(e))}getResolvedLocaleChain(e){return OD(e.locale||this.getLocale(),this.fallback,`en`)}async getResolvedLocale(e){let t=this.getResolvedLocaleChain(e);return(await this.lookup(t,e))?.locale}async get(e){let t=e.locale??this.getLocale(),n=this.getResolvedLocaleChain({locale:t}),r=await this.lookup(n,e);return r?this.render(r.leaf,r.locale,e):this.handleMissingKey(e,t,n)}getSync(e){let t=e.locale??this.getLocale(),n=this.getResolvedLocaleChain({locale:t}),r=this.lookupSync(n,e);return r?this.render(r.leaf,r.locale,e):this.handleMissingKey(e,t,n)}render(e,t,n){let r=this.selectPluralForm(e,t,n.count),i={...n.data||{}};return typeof n.count==`number`&&i.count===void 0&&(i.count=n.count),this.format(r,i,t)}async lookup(e,t){if(this.stores.size!==0)for(let n of e)for(let e of this.stores.values()){let r=await e.get({locale:n,namespace:t.namespace,key:t.key});if(r!==void 0)return{locale:n,leaf:r}}}lookupSync(e,t){if(this.stores.size!==0)for(let n of e)for(let e of this.stores.values()){if(typeof e.getSync!=`function`)throw new xD(`[ilingo] store "${String(e.id)}" does not implement getSync(). Every IStore provides the read in both idioms; an adapter that cannot read without I/O should call throwSyncUnavailable(context, this.id).`,{locale:n,namespace:t.namespace,key:t.key,storeId:e.id});let r=e.getSync({locale:n,namespace:t.namespace,key:t.key});if(r!==void 0)return{locale:n,leaf:r}}}handleMissingKey(e,t,n){if(this.onMissingKey){let r=this.onMissingKey({...e,locale:t,resolvedLocale:n[n.length-1]});return typeof r==`string`?r:void 0}if(cD())return;let r=`${t}|${e.namespace}|${e.key}`;this.warnedKeys.has(r)||(this.warnedKeys.add(r),console.warn(`[ilingo] missing translation for "${e.namespace}.${e.key}" (locale=${t})`))}selectPluralForm(e,t,n){if(typeof e==`string`)return e;if(typeof n!=`number`)return e.other;let r=e[this.getPluralRules(t).select(n)];return typeof r==`string`?r:e.other}getPluralRules(e){let t=this.pluralRulesCache.get(e);return t||(t=new Intl.PluralRules(e),this.pluralRulesCache.set(e,t)),t}format(e,t,n){return MD(e,t||{},{locale:n??this.getLocale(),formatters:this.formatters,onUnknownFormatter:e=>this.handleUnknownFormatter(e)})}handleUnknownFormatter(e){cD()||this.warnedFormatters.has(e)||(this.warnedFormatters.add(e),console.warn(`[ilingo] unknown formatter "${e}" — falling back to raw value`))}},PD=class{id;data;constructor(e){this.id=e.id||Symbol(`MemoryStore`),this.data=hD(e.data)}async get(e){return this.resolve(e)}getSync(e){return this.resolve(e)}resolve(e){if(!this.data[e.locale]||!this.data[e.locale][e.namespace])return;let t=pu(this.data[e.locale][e.namespace],e.key);if(typeof t==`string`)return t;if(rD(t))return t.data}setSync(e){this.initLines(e.namespace,e.locale),_u(this.data[e.locale][e.namespace],e.key,e.value)}async set(e){this.setSync(e)}initLines(e,t){this.data[t]===void 0&&(this.data[t]={}),this.data[t][e]===void 0&&(this.data[t][e]={})}getLocalesSync(){return Object.keys(this.data)}async getLocales(){return this.getLocalesSync()}};function FD(e){return typeof e.invalidate==`function`&&typeof e.on==`function`}var q=function(e){return e.ENTITY=`authupEntity`,e.FIELD=`authupField`,e.ACTION=`authupAction`,e.COMMON=`authupCommon`,e.CLIENT=`authupClient`,e.VUECS=`vuecs`,e.ERROR=`authupError`,e.APP=`authupApp`,e.MAIL=`authupMail`,e}({}),ID=function(e){return e.NO_MORE=`noMore`,e}({}),J=function(e){return e.NAME_HINT=`nameHint`,e.DESCRIPTION_HINT=`descriptionHint`,e.REDIRECT_URI_HINT=`redirectURIHint`,e.POST_LOGOUT_REDIRECT_URI_HINT=`postLogoutRedirectURIHint`,e.GRANT_TYPES_HINT=`grantTypesHint`,e.AUTH_METHOD=`authMethod`,e.AUTH_METHOD_NONE=`authMethodNone`,e.AUTH_METHOD_SECRET=`authMethodSecret`,e.AUTH_METHOD_TLS=`authMethodTls`,e.TOKEN_BINDING_METHOD=`tokenBindingMethod`,e.TOKEN_BINDING_METHOD_NONE=`tokenBindingMethodNone`,e.TOKEN_BINDING_METHOD_TLS=`tokenBindingMethodTls`,e.CLIENT_CERTIFICATE_URI=`clientCertificateUri`,e.CLIENT_CERTIFICATE_URI_HINT=`clientCertificateUriHint`,e.IS_ACTIVE=`isActive`,e.HASH_SECRET=`hashSecret`,e.LOGIN_FAILED=`loginFailed`,e.SCOPE_GRANT_INTRO=`scopeGrantIntro`,e.ONCE_AUTHORIZED_REDIRECT=`onceAuthorizedRedirect`,e.GOVERNED_BY=`governedBy`,e.ACTIVE_SINCE=`activeSince`,e.VIEW_POLICY_DETAILS=`viewPolicyDetails`,e.PRIVACY_POLICY=`privacyPolicy`,e.TERMS_OF_SERVICE=`termsOfService`,e.POLICY_TYPE_COMPOSITE=`policyTypeComposite`,e.POLICY_TYPE_DATE=`policyTypeDate`,e.POLICY_TYPE_TIME=`policyTypeTime`,e.POLICY_TYPE_ATTRIBUTE_NAMES=`policyTypeAttributeNames`,e.POLICY_TYPE_ATTRIBUTES=`policyTypeAttributes`,e.POLICY_TYPE_REALM_MATCH=`policyTypeRealmMatch`,e.POLICY_TYPE_IDENTITY=`policyTypeIdentity`,e.POLICY_TYPE_PERMISSION_BINDING=`policyTypePermissionBinding`,e.DECISION_STRATEGY_HINT_UNANIMOUS=`decisionStrategyHintUnanimous`,e.DECISION_STRATEGY_HINT_AFFIRMATIVE=`decisionStrategyHintAffirmative`,e.DECISION_STRATEGY_HINT_CONSENSUS=`decisionStrategyHintConsensus`,e.DECISION_STRATEGY_HINT_DEFAULT=`decisionStrategyHintDefault`,e.OPTION_NONE_UNANIMOUS=`optionNoneUnanimous`,e.REALM_MATCH_STRICT_HINT=`realmMatchStrictHint`,e.REALM_MATCH_NULL_MATCH_ALL_HINT=`realmMatchNullMatchAllHint`,e.ENABLE_STARTTLS_HINT=`enableStartTlsHint`,e.PASSWORD_MUST_MATCH=`passwordMustMatch`,e.LOOKUP_FAILED=`lookupFailed`,e.PROTOCOL_NOT_SUPPORTED=`protocolNotSupported`,e.JUNCTION_POLICY=`junctionPolicy`,e.JUNCTION_REALM_SCOPE=`junctionRealmScope`,e.REALM_SCOPE_NONE=`realmScopeNone`,e.REALM_SCOPE_NONE_HINT=`realmScopeNoneHint`,e.REALM_SCOPE_OWN=`realmScopeOwn`,e.REALM_SCOPE_OWN_HINT=`realmScopeOwnHint`,e.REALM_SCOPE_OWN_OR_NULL=`realmScopeOwnOrNull`,e.REALM_SCOPE_OWN_OR_NULL_HINT=`realmScopeOwnOrNullHint`,e.REALM_SCOPE_ANY=`realmScopeAny`,e.REALM_SCOPE_ANY_HINT=`realmScopeAnyHint`,e.SELECTION_UPDATING=`selectionUpdating`,e.SELECTION_REMOVE=`selectionRemove`,e.SELECTION_ADD=`selectionAdd`,e.CREATE_ACCOUNT=`createAccount`,e.FORGOT_PASSWORD=`forgotPassword`,e.RESET_PASSWORD=`resetPassword`,e.ACTIVATE_ACCOUNT=`activateAccount`,e.BACK_TO_LOGIN=`backToLogin`,e.EMAIL_OR_NAME=`emailOrName`,e.CHECK_EMAIL_ACTIVATE=`checkEmailActivate`,e.CHECK_EMAIL_RESET=`checkEmailReset`,e.ACCOUNT_ACTIVATED=`accountActivated`,e.PASSWORD_RESET_DONE=`passwordResetDone`,e.WORKFLOW_DISABLED=`workflowDisabled`,e.REALM_MISMATCH_TITLE=`realmMismatchTitle`,e.REALM_MISMATCH_TEXT=`realmMismatchText`,e.SIGN_IN_TO_REALM=`signInToRealm`,e.RETURN_TO_APP=`returnToApp`,e.REAUTH_TEXT=`reauthText`,e.SELECT_ACCOUNT_TITLE=`selectAccountTitle`,e.CONTINUE_AS=`continueAs`,e.USE_ANOTHER_ACCOUNT=`useAnotherAccount`,e.SIGNED_IN_AS=`signedInAs`,e.NOT_YOU=`notYou`,e.AUTHORIZE_ABORTED=`authorizeAborted`,e.ACCESS_DENIED_TITLE=`accessDeniedTitle`,e.ACCESS_DENIED_TEXT=`accessDeniedText`,e.CLIENT_ACCESS_POLICY_HINT=`clientAccessPolicyHint`,e.CONSENT_STATUS_LOADING=`consentStatusLoading`,e.LOGOUT_CONFIRM_TITLE=`logoutConfirmTitle`,e.LOGOUT_CONFIRM_TEXT=`logoutConfirmText`,e.LOGOUT_DONE=`logoutDone`,e.SIGN_OUT=`signOut`,e.ACCOUNT_SIGN_IN_INTRO=`accountSignInIntro`,e.MFA_TITLE=`mfaTitle`,e.MFA_CHALLENGE_INTRO=`mfaChallengeIntro`,e.MFA_CODE=`mfaCode`,e.MFA_CODE_HINT=`mfaCodeHint`,e.MFA_VERIFY=`mfaVerify`,e.MFA_USE_RECOVERY=`mfaUseRecovery`,e.MFA_USE_AUTHENTICATOR=`mfaUseAuthenticator`,e.MFA_RECOVERY_CODE=`mfaRecoveryCode`,e.MFA_FAILED=`mfaFailed`,e.MFA_SETUP_REQUIRED=`mfaSetupRequired`,e.MFA_USE_EMAIL=`mfaUseEmail`,e.MFA_USE_PASSKEY=`mfaUsePasskey`,e.MFA_PASSKEY_PROMPT=`mfaPasskeyPrompt`,e.MFA_SEND_CODE=`mfaSendCode`,e.MFA_CODE_SENT=`mfaCodeSent`,e.MFA_ENROLL_TITLE=`mfaEnrollTitle`,e.MFA_ENROLL_TOTP=`mfaEnrollTotp`,e.MFA_ENROLL_RECOVERY=`mfaEnrollRecovery`,e.MFA_ENROLL_EMAIL=`mfaEnrollEmail`,e.MFA_ENROLL_WEBAUTHN=`mfaEnrollWebauthn`,e.KEY_USE_SIGNATURE=`keyUseSignature`,e.KEY_USE_ENCRYPTION=`keyUseEncryption`,e.KEY_IMPORT_MATERIAL=`keyImportMaterial`,e.KEY_MATERIAL_OCT=`keyMaterialOct`,e.KEY_MATERIAL_PRIVATE=`keyMaterialPrivate`,e.KEY_MATERIAL_PUBLIC=`keyMaterialPublic`,e.MFA_SCAN_QR=`mfaScanQr`,e.MFA_MANUAL_KEY=`mfaManualKey`,e.MFA_CONFIRM_INTRO=`mfaConfirmIntro`,e.MFA_CONFIRM=`mfaConfirm`,e.MFA_RECOVERY_INTRO=`mfaRecoveryIntro`,e.MFA_RECOVERY_SAVE=`mfaRecoverySave`,e.MFA_DOWNLOAD=`mfaDownload`,e.MFA_ENROLLED=`mfaEnrolled`,e.MFA_DEVICE_NAME=`mfaDeviceName`,e.MFA_NO_DEVICES=`mfaNoDevices`,e.MFA_DEVICE_UNCONFIRMED=`mfaDeviceUnconfirmed`,e.MFA_RECOVERY_NUDGE=`mfaRecoveryNudge`,e.MFA_RECOVERY_NUDGE_GENERATE=`mfaRecoveryNudgeGenerate`,e.MFA_RECOVERY_NUDGE_SKIP=`mfaRecoveryNudgeSkip`,e}({}),Y=function(e){return e.HOME=`home`,e.RESOURCES=`resources`,e.GENERAL=`general`,e.OTHER=`other`,e.SETTINGS=`settings`,e.LOGOUT=`logout`,e.ACCOUNT=`account`,e.MANAGE_ACCOUNT=`manageAccount`,e.SECURITY=`security`,e.MANAGEMENT=`management`,e.DETAILS=`details`,e.REALM_DESCRIPTION=`realmDescription`,e.CLIENT_DESCRIPTION=`clientDescription`,e.SCOPE_DESCRIPTION=`scopeDescription`,e.IDENTITY_PROVIDER_DESCRIPTION=`identityProviderDescription`,e.KEY_DESCRIPTION=`keyDescription`,e.TRUST_ANCHOR_DESCRIPTION=`trustAnchorDescription`,e.USER_DESCRIPTION=`userDescription`,e.ROLE_DESCRIPTION=`roleDescription`,e.PERMISSION_DESCRIPTION=`permissionDescription`,e.POLICY_DESCRIPTION=`policyDescription`,e.EVENT_DESCRIPTION=`eventDescription`,e.SESSION_DESCRIPTION=`sessionDescription`,e.SET_MANAGEMENT_REALM=`setManagementRealm`,e.API_DOCS=`apiDocs`,e.MADE_WITH=`madeWith`,e.LOGIN_TITLE=`loginTitle`,e.LOGIN_SUBTITLE=`loginSubtitle`,e.URL_GENERATOR=`urlGenerator`,e.URL_GENERATOR_HINT=`urlGeneratorHint`,e.REDIRECT_URL=`redirectUrl`,e.GENERATED_URL=`generatedUrl`,e.TOGGLE_NAVIGATION=`toggleNavigation`,e.SESSION_RENEW=`sessionRenew`,e.MINUTES=`minutes`,e.SECONDS=`seconds`,e.ENTITY_CREATED=`entityCreated`,e.ENTITY_UPDATED=`entityUpdated`,e.ENTITY_DELETED=`entityDeleted`,e.ACCOUNT_UPDATED=`accountUpdated`,e.DELETE_CONFIRM_TITLE=`deleteConfirmTitle`,e.DELETE_CONFIRM_DESCRIPTION=`deleteConfirmDescription`,e.REMOVE_CONFIRM_TITLE=`removeConfirmTitle`,e.REMOVE_CONFIRM_DESCRIPTION=`removeConfirmDescription`,e.SESSION_REVOKE_OTHERS=`sessionRevokeOthers`,e.SESSION_REVOKE_OTHERS_CONFIRM_TITLE=`sessionRevokeOthersConfirmTitle`,e.SESSION_REVOKE_OTHERS_CONFIRM_DESCRIPTION=`sessionRevokeOthersConfirmDescription`,e.SESSION_REVOKE_OTHERS_SUCCESS=`sessionRevokeOthersSuccess`,e.KEY_DELETE_FORCE_CONFIRM_TITLE=`keyDeleteForceConfirmTitle`,e.KEY_DELETE_FORCE_CONFIRM_DESCRIPTION=`keyDeleteForceConfirmDescription`,e.SESSION_REVOKE_ALL=`sessionRevokeAll`,e.SESSION_REVOKE_ALL_CONFIRM_TITLE=`sessionRevokeAllConfirmTitle`,e.SESSION_REVOKE_ALL_CONFIRM_DESCRIPTION=`sessionRevokeAllConfirmDescription`,e.SESSION_REVOKE_ALL_SUCCESS=`sessionRevokeAllSuccess`,e.SESSION_CURRENT=`sessionCurrent`,e.SESSION_TOKEN_STATUS_ACTIVE=`sessionTokenStatusActive`,e.SESSION_TOKEN_STATUS_CONSUMED=`sessionTokenStatusConsumed`,e.SESSION_TOKEN_STATUS_REVOKED=`sessionTokenStatusRevoked`,e.SESSION_TOKEN_STATUS_EXPIRED=`sessionTokenStatusExpired`,e.AUTHENTICATOR=`authenticator`,e.MFA_SECURITY_TITLE=`mfaSecurityTitle`,e.MFA_SECURITY_HINT=`mfaSecurityHint`,e.APPLICATIONS=`applications`,e.CONSENT_EMPTY=`consentEmpty`,e.CONSENT_REVOKE=`consentRevoke`,e.CONSENT_REVOKE_ALL=`consentRevokeAll`,e.CONSENT_REVOKE_ALL_SUCCESS=`consentRevokeAllSuccess`,e.CONSENT_REVOKE_ALL_TITLE=`consentRevokeAllTitle`,e.CONSENT_REVOKE_ALL_DESCRIPTION=`consentRevokeAllDescription`,e.CONSENT_SCOPES=`consentScopes`,e.CONNECTED_ACCOUNTS=`connectedAccounts`,e.CONNECTED_ACCOUNTS_NONE=`connectedAccountsNone`,e.IDENTITY_PROVIDER_CONNECT=`identityProviderConnect`,e.IDENTITY_PROVIDER_CONNECTED_AS=`identityProviderConnectedAs`,e.IDENTITY_PROVIDER_DISCONNECT=`identityProviderDisconnect`,e.IDENTITY_PROVIDER_DISCONNECT_CONFIRM_TITLE=`identityProviderDisconnectConfirmTitle`,e.IDENTITY_PROVIDER_DISCONNECT_CONFIRM_DESCRIPTION=`identityProviderDisconnectConfirmDescription`,e.IDENTITY_PROVIDER_LINK_SUCCESS=`identityProviderLinkSuccess`,e.IDENTITY_PROVIDER_LINK_FAILED=`identityProviderLinkFailed`,e.BACK_TO_APP=`backToApp`,e}({}),LD=function(e){return e.CODE=`code`,e.REGISTRATION_ACTIVATION_SUBJECT=`registrationActivationSubject`,e.REGISTRATION_ACTIVATION_INTRO=`registrationActivationIntro`,e.REGISTRATION_ACTIVATION_ACTION=`registrationActivationAction`,e.REGISTRATION_ACTIVATION_HINT=`registrationActivationHint`,e.PASSWORD_RESET_SUBJECT=`passwordResetSubject`,e.PASSWORD_RESET_INTRO=`passwordResetIntro`,e.PASSWORD_RESET_ACTION=`passwordResetAction`,e.PASSWORD_RESET_EXPIRY=`passwordResetExpiry`,e.PASSWORD_RESET_HINT=`passwordResetHint`,e.MFA_EMAIL_OTP_SUBJECT=`mfaEmailOtpSubject`,e.MFA_EMAIL_OTP_INTRO=`mfaEmailOtpIntro`,e.MFA_EMAIL_OTP_EXPIRY=`mfaEmailOtpExpiry`,e.MFA_EMAIL_OTP_HINT=`mfaEmailOtpHint`,e}({}),RD=function(e){return e.CLIENT=`client`,e.CONSENT=`consent`,e.EVENT=`event`,e.IDENTITY_PROVIDER=`identityProvider`,e.IDENTITY_PROVIDER_ACCOUNT=`identityProviderAccount`,e.KEY=`key`,e.PERMISSION=`permission`,e.POLICY=`policy`,e.REALM=`realm`,e.ROLE=`role`,e.SCOPE=`scope`,e.SESSION=`session`,e.SESSION_TOKEN=`sessionToken`,e.TRUST_ANCHOR=`trustAnchor`,e.USER=`user`,e}({}),X=function(e){return e.NAME=`name`,e.NAMES=`names`,e.DISPLAY_NAME=`displayName`,e.EMAIL=`email`,e.EXTERNAL_ID=`externalId`,e.DESCRIPTION=`description`,e.SECRET=`secret`,e.REDIRECT_URIS=`redirectUris`,e.POST_LOGOUT_REDIRECT_URIS=`postLogoutRedirectUris`,e.GRANT_TYPES=`grantTypes`,e.PASSWORD=`password`,e.PASSWORD_REPEAT=`passwordRepeat`,e.DECISION_STRATEGY=`decisionStrategy`,e.HASHED=`hashed`,e.URL=`url`,e.CLIENT_SCOPES=`clientScopes`,e.START=`start`,e.END=`end`,e.INTERVAL=`interval`,e.DAY_OF_WEEK=`dayOfWeek`,e.DAY_OF_MONTH=`dayOfMonth`,e.DAY_OF_YEAR=`dayOfYear`,e.VALUE_IS_REGEX=`valueIsRegex`,e.CODE=`code`,e.ID=`id`,e.TYPE=`type`,e.TYPES=`types`,e.INVERT=`invert`,e.ENABLED=`enabled`,e.CHILDREN=`children`,e.CREATED_AT=`createdAt`,e.UPDATED_AT=`updatedAt`,e.SEEN_AT=`seenAt`,e.EXPIRES_AT=`expiresAt`,e.IP_ADDRESS=`ipAddress`,e.USER_AGENT=`userAgent`,e.AUTH_METHOD=`authMethod`,e.KIND=`kind`,e.SUBJECT=`subject`,e.REFRESHED_AT=`refreshedAt`,e.MFA_AT=`mfaAt`,e.PROTOCOL=`protocol`,e.PROTOCOLS=`protocols`,e.PRESET=`preset`,e.PRESETS=`presets`,e.TIMEOUT=`timeout`,e.START_TLS=`startTls`,e.BASE_DN=`baseDn`,e.FILTER=`filter`,e.CLASS=`class`,e.NAME_ATTRIBUTE=`nameAttribute`,e.MAIL_ATTRIBUTE=`mailAttribute`,e.DISPLAY_NAME_ATTRIBUTE=`displayNameAttribute`,e.MEMBER_ATTRIBUTE=`memberAttribute`,e.MEMBER_USER_ATTRIBUTE=`memberUserAttribute`,e.CLIENT_ID=`clientId`,e.CLIENT_SECRET=`clientSecret`,e.SCOPE=`scope`,e.TOKEN=`token`,e.USER_INFO=`userInfo`,e.DISCOVERY=`discovery`,e.REDIRECT_URL=`redirectUrl`,e.ACCESS_POLICY=`accessPolicy`,e.ACTOR=`actor`,e.REF=`ref`,e.PATH=`path`,e.METHOD=`method`,e.USE=`use`,e.STATUS=`status`,e.PRIORITY=`priority`,e.SIGNATURE_ALGORITHM=`signatureAlgorithm`,e.CERTIFICATE=`certificate`,e}({}),Z=function(e){return e.ADD=`add`,e.CREATE=`create`,e.DELETE=`delete`,e.GENERATE=`generate`,e.UPDATE=`update`,e.AUTHORIZE=`authorize`,e.ABORT=`abort`,e.LOGIN=`login`,e.REGISTER=`register`,e.ACTIVATE=`activate`,e.RESET=`reset`,e.SEND=`send`,e.BACK=`back`,e.CLOSE=`close`,e.LOOKUP=`lookup`,e.SHOW=`show`,e.HIDE=`hide`,e.REMOVE=`remove`,e}({}),Q=function(e){return e.GENERAL=`general`,e.OVERVIEW=`overview`,e.ALL=`all`,e.LOADING=`loading`,e.ACTIVE=`active`,e.INACTIVE=`inactive`,e.LOCKED=`locked`,e.NOT_LOCKED=`notLocked`,e.APPLICATION=`application`,e.SEARCH=`search`,e.NO_RESULTS=`noResults`,e.SWITCH_TO_LIGHT_MODE=`switchToLightMode`,e.SWITCH_TO_DARK_MODE=`switchToDarkMode`,e.YES=`yes`,e.BUILT_IN=`builtIn`,e.GLOBAL=`global`,e.INVERTED=`inverted`,e.CONFIDENTIAL=`confidential`,e.BASIC=`basic`,e.SECURITY=`security`,e.CONNECTION=`connection`,e.ENDPOINTS=`endpoints`,e.DETAILS=`details`,e.GROUP=`group`,e.NO_ITEMS=`noItems`,e.PROCESSING=`processing`,e.REQUEST=`request`,e.DATA=`data`,e.BREADCRUMB=`breadcrumb`,e}({}),zD={[Z.ADD]:`Add`,[Z.CREATE]:`Create`,[Z.DELETE]:`Delete`,[Z.GENERATE]:`Generate`,[Z.UPDATE]:`Update`,[Z.AUTHORIZE]:`Authorize`,[Z.ABORT]:`Abort`,[Z.LOGIN]:`Login`,[Z.REGISTER]:`Register`,[Z.ACTIVATE]:`Activate`,[Z.RESET]:`Reset`,[Z.SEND]:`Send`,[Z.BACK]:`Back`,[Z.CLOSE]:`Close`,[Z.LOOKUP]:`Lookup`,[Z.SHOW]:`Show`,[Z.HIDE]:`Hide`,[Z.REMOVE]:`Remove`},BD={[Y.HOME]:`Home`,[Y.RESOURCES]:`Resources`,[Y.GENERAL]:`General`,[Y.OTHER]:`Other`,[Y.SETTINGS]:`Settings`,[Y.LOGOUT]:`Logout`,[Y.ACCOUNT]:`Account`,[Y.MANAGE_ACCOUNT]:`Manage account`,[Y.SECURITY]:`Security`,[Y.MANAGEMENT]:`Management`,[Y.DETAILS]:`Details`,[Y.REALM_DESCRIPTION]:`Isolated tenants, each with its own users, clients and keys.`,[Y.CLIENT_DESCRIPTION]:`Applications that authenticate against Authup.`,[Y.SCOPE_DESCRIPTION]:`Scopes a client may request when asking for access.`,[Y.IDENTITY_PROVIDER_DESCRIPTION]:`External providers users can sign in with.`,[Y.KEY_DESCRIPTION]:`Signing and encryption keys, one store per realm.`,[Y.TRUST_ANCHOR_DESCRIPTION]:`Trusted CA certificates for client certificate authentication.`,[Y.USER_DESCRIPTION]:`Accounts that sign in to applications.`,[Y.ROLE_DESCRIPTION]:`Named bundles of permissions, assigned to users and clients.`,[Y.PERMISSION_DESCRIPTION]:`Individual capabilities an identity can be granted.`,[Y.POLICY_DESCRIPTION]:`Rules that decide when a permission applies.`,[Y.EVENT_DESCRIPTION]:`Append-only audit trail of security relevant activity.`,[Y.SESSION_DESCRIPTION]:`Active sign-ins, with the devices and tokens behind them.`,[Y.SET_MANAGEMENT_REALM]:`Set as management realm`,[Y.API_DOCS]:`API Docs`,[Y.MADE_WITH]:`Made with`,[Y.LOGIN_TITLE]:`Sign in`,[Y.LOGIN_SUBTITLE]:`Select a realm to continue`,[Y.URL_GENERATOR]:`URL Generator`,[Y.URL_GENERATOR_HINT]:`Generate an authorize url by picking the scopes it needs to function.`,[Y.REDIRECT_URL]:`Redirect URL`,[Y.GENERATED_URL]:`Generated URL`,[Y.TOGGLE_NAVIGATION]:`Toggle navigation`,[Y.SESSION_RENEW]:`The session will be renewed in {countdown}.`,[Y.MINUTES]:`minute(s)`,[Y.SECONDS]:`second(s)`,[Y.ENTITY_CREATED]:`{{entity}} was successfully created.`,[Y.ENTITY_UPDATED]:`{{entity}} was successfully updated.`,[Y.ENTITY_DELETED]:`{{entity}} "{{name}}" was successfully deleted.`,[Y.ACCOUNT_UPDATED]:`The account was successfully updated.`,[Y.DELETE_CONFIRM_TITLE]:`Delete {{entity}}?`,[Y.DELETE_CONFIRM_DESCRIPTION]:`This action cannot be undone.`,[Y.REMOVE_CONFIRM_TITLE]:`Confirm removal`,[Y.REMOVE_CONFIRM_DESCRIPTION]:`Are you sure you want to remove this assignment? You can re-assign it at any time.`,[Y.SESSION_REVOKE_OTHERS]:`Log out other devices`,[Y.SESSION_REVOKE_OTHERS_CONFIRM_TITLE]:`Log out other devices?`,[Y.SESSION_REVOKE_OTHERS_CONFIRM_DESCRIPTION]:`This signs out all your other sessions. Your current session stays active.`,[Y.SESSION_REVOKE_OTHERS_SUCCESS]:`Logged out {{amount}} other session(s).`,[Y.SESSION_REVOKE_ALL]:`Log out everywhere`,[Y.SESSION_REVOKE_ALL_CONFIRM_TITLE]:`Log this user out everywhere?`,[Y.SESSION_REVOKE_ALL_CONFIRM_DESCRIPTION]:`This revokes every session of this user on all devices.`,[Y.SESSION_REVOKE_ALL_SUCCESS]:`Logged out {{amount}} session(s).`,[Y.SESSION_CURRENT]:`This device`,[Y.SESSION_TOKEN_STATUS_ACTIVE]:`Active`,[Y.SESSION_TOKEN_STATUS_CONSUMED]:`Consumed`,[Y.SESSION_TOKEN_STATUS_REVOKED]:`Revoked`,[Y.SESSION_TOKEN_STATUS_EXPIRED]:`Expired`,[Y.AUTHENTICATOR]:`Authenticators`,[Y.MFA_SECURITY_TITLE]:`Two-factor authentication`,[Y.MFA_SECURITY_HINT]:`Add an extra layer of security with an authenticator app or recovery codes.`,[Y.APPLICATIONS]:`Applications`,[Y.CONSENT_EMPTY]:`You have not granted any application access yet.`,[Y.CONSENT_REVOKE]:`Revoke`,[Y.CONSENT_REVOKE_ALL]:`Revoke access`,[Y.CONSENT_REVOKE_ALL_SUCCESS]:`Application access was revoked.`,[Y.CONSENT_REVOKE_ALL_TITLE]:`Revoke application access`,[Y.CONSENT_REVOKE_ALL_DESCRIPTION]:`The application will ask for your consent again on the next sign-in.`,[Y.CONSENT_SCOPES]:`Granted permissions`,[Y.CONNECTED_ACCOUNTS]:`Connected accounts`,[Y.CONNECTED_ACCOUNTS_NONE]:`No identity providers are configured.`,[Y.IDENTITY_PROVIDER_CONNECT]:`Connect`,[Y.IDENTITY_PROVIDER_CONNECTED_AS]:`Connected as {{name}}`,[Y.IDENTITY_PROVIDER_DISCONNECT]:`Disconnect`,[Y.IDENTITY_PROVIDER_DISCONNECT_CONFIRM_TITLE]:`Disconnect account?`,[Y.IDENTITY_PROVIDER_DISCONNECT_CONFIRM_DESCRIPTION]:`Signing in through this provider will stop working for this account.`,[Y.IDENTITY_PROVIDER_LINK_SUCCESS]:`The account was connected.`,[Y.IDENTITY_PROVIDER_LINK_FAILED]:`The account could not be connected.`,[Y.KEY_DELETE_FORCE_CONFIRM_TITLE]:`Crypto-shred encryption key?`,[Y.KEY_DELETE_FORCE_CONFIRM_DESCRIPTION]:`This key is still referenced by {{count}} encrypted secret(s). Deleting it makes them permanently unrecoverable.`,[Y.BACK_TO_APP]:`Back to {{host}}`},VD={[J.NAME_HINT]:`Something users will recognize and trust`,[J.DESCRIPTION_HINT]:`Displayed to all users of this application`,[J.REDIRECT_URI_HINT]:`URI pattern a browser can redirect to after a successful login`,[J.POST_LOGOUT_REDIRECT_URI_HINT]:`URI pattern an RP-initiated logout may redirect back to. Kept separate from the login redirect URIs. Leave empty to always end on the sign-out confirmation page.`,[J.GRANT_TYPES_HINT]:`Restrict which OAuth2 grants this client may use. Select none to allow every grant.`,[J.AUTH_METHOD]:`Authentication method`,[J.AUTH_METHOD_NONE]:`None`,[J.AUTH_METHOD_SECRET]:`Shared secret`,[J.AUTH_METHOD_TLS]:`TLS certificate`,[J.TOKEN_BINDING_METHOD]:`Token binding`,[J.TOKEN_BINDING_METHOD_NONE]:`Disabled`,[J.TOKEN_BINDING_METHOD_TLS]:`TLS certificate`,[J.CLIENT_CERTIFICATE_URI]:`Certificate client URI`,[J.CLIENT_CERTIFICATE_URI_HINT]:`The certificate must contain this exact URI SAN once.`,[J.IS_ACTIVE]:`Is active?`,[J.HASH_SECRET]:`Hash secret?`,[J.LOGIN_FAILED]:`The login operation failed`,[J.SCOPE_GRANT_INTRO]:`This will allow the {client} application to`,[J.ONCE_AUTHORIZED_REDIRECT]:`Once authorized, you will be redirected to {target}.`,[J.GOVERNED_BY]:`This application is governed by the {{client}} application's {privacyPolicy} and {termsOfService}.`,[J.ACTIVE_SINCE]:`Active since`,[J.VIEW_POLICY_DETAILS]:`View policy details`,[J.PRIVACY_POLICY]:`Privacy Policy`,[J.TERMS_OF_SERVICE]:`Terms of Service`,[J.POLICY_TYPE_COMPOSITE]:`Composite`,[J.POLICY_TYPE_DATE]:`Date`,[J.POLICY_TYPE_TIME]:`Time`,[J.POLICY_TYPE_ATTRIBUTE_NAMES]:`Attr Names`,[J.POLICY_TYPE_ATTRIBUTES]:`Attributes`,[J.POLICY_TYPE_REALM_MATCH]:`Realm Match`,[J.POLICY_TYPE_IDENTITY]:`Identity`,[J.POLICY_TYPE_PERMISSION_BINDING]:`Perm Binding`,[J.DECISION_STRATEGY_HINT_UNANIMOUS]:`All policies must evaluate positively.`,[J.DECISION_STRATEGY_HINT_AFFIRMATIVE]:`At least one policy must evaluate positively.`,[J.DECISION_STRATEGY_HINT_CONSENSUS]:`More policies must evaluate positively than negatively.`,[J.DECISION_STRATEGY_HINT_DEFAULT]:`No strategy selected. Defaults to unanimous (all policies must evaluate positively).`,[J.OPTION_NONE_UNANIMOUS]:`-- None (default: unanimous) --`,[J.REALM_MATCH_STRICT_HINT]:`Only match if the attribute is strict equal to the name?`,[J.REALM_MATCH_NULL_MATCH_ALL_HINT]:`Determines if resources with null realm-id/name value should match all identity realms.{br}If true, any identity realm can access resources with null realm-id/name values.`,[J.ENABLE_STARTTLS_HINT]:`Enable StartTLS process?`,[J.PASSWORD_MUST_MATCH]:`Must match the password.`,[J.LOOKUP_FAILED]:`Lookup failed with: {{message}}`,[J.PROTOCOL_NOT_SUPPORTED]:`{{name}} is not supported yet.`,[J.JUNCTION_POLICY]:`Junction Policy`,[J.JUNCTION_REALM_SCOPE]:`Realm Scope`,[J.REALM_SCOPE_NONE]:`None`,[J.REALM_SCOPE_NONE_HINT]:`No reach. Matches no realm; a disabled grant.`,[J.REALM_SCOPE_OWN]:`Own realm`,[J.REALM_SCOPE_OWN_HINT]:`Acts only on the holder's own realm.`,[J.REALM_SCOPE_OWN_OR_NULL]:`Own + global`,[J.REALM_SCOPE_OWN_OR_NULL_HINT]:`Own realm plus global (realm-less) resources.`,[J.REALM_SCOPE_ANY]:`Any realm`,[J.REALM_SCOPE_ANY_HINT]:`Acts on every realm, including global. Admin-level reach.`,[J.SELECTION_UPDATING]:`Updating selection`,[J.SELECTION_REMOVE]:`Remove from selection`,[J.SELECTION_ADD]:`Add to selection`,[J.CREATE_ACCOUNT]:`Create account`,[J.FORGOT_PASSWORD]:`Forgot password?`,[J.RESET_PASSWORD]:`Reset password`,[J.ACTIVATE_ACCOUNT]:`Activate account`,[J.BACK_TO_LOGIN]:`Back to login`,[J.EMAIL_OR_NAME]:`Email or name`,[J.CHECK_EMAIL_ACTIVATE]:`Check your email for the activation code.`,[J.CHECK_EMAIL_RESET]:`Check your email for the reset code.`,[J.ACCOUNT_ACTIVATED]:`The account was successfully activated.`,[J.PASSWORD_RESET_DONE]:`The password was successfully reset.`,[J.WORKFLOW_DISABLED]:`This feature is not enabled.`,[J.REALM_MISMATCH_TITLE]:`Sign in with a different account`,[J.REALM_MISMATCH_TEXT]:`{{client}} belongs to the {{realm}} realm, but you are signed in to a different realm. Sign in with a {{realm}} account to continue.`,[J.SIGN_IN_TO_REALM]:`Sign in to {{realm}}`,[J.RETURN_TO_APP]:`Return to application`,[J.REAUTH_TEXT]:`Please sign in again to continue.`,[J.SELECT_ACCOUNT_TITLE]:`Choose an account`,[J.CONTINUE_AS]:`Continue as {{name}}`,[J.USE_ANOTHER_ACCOUNT]:`Use another account`,[J.SIGNED_IN_AS]:`Signed in as {{name}}`,[J.NOT_YOU]:`Not you?`,[J.AUTHORIZE_ABORTED]:`The authorization request was denied. Returning to the application automatically is not possible. You can close this window.`,[J.ACCESS_DENIED_TITLE]:`Access denied`,[J.ACCESS_DENIED_TEXT]:`You are not permitted to access this application.`,[J.CLIENT_ACCESS_POLICY_HINT]:`Without a policy, every identity in the realm may sign in.`,[J.CONSENT_STATUS_LOADING]:`Checking granted permissions…`,[J.LOGOUT_CONFIRM_TITLE]:`Sign out`,[J.LOGOUT_CONFIRM_TEXT]:`Do you want to sign out?`,[J.LOGOUT_DONE]:`You have been signed out.`,[J.SIGN_OUT]:`Sign out`,[J.ACCOUNT_SIGN_IN_INTRO]:`Sign in to manage your account.`,[J.MFA_TITLE]:`Two-factor authentication`,[J.MFA_CHALLENGE_INTRO]:`Enter the code from your authenticator app to continue.`,[J.MFA_CODE]:`Verification code`,[J.MFA_CODE_HINT]:`The 6-digit code from your authenticator app.`,[J.MFA_VERIFY]:`Verify`,[J.MFA_USE_RECOVERY]:`Use a recovery code`,[J.MFA_USE_AUTHENTICATOR]:`Use your authenticator app`,[J.MFA_RECOVERY_CODE]:`Recovery code`,[J.MFA_FAILED]:`The verification code is not valid.`,[J.MFA_SETUP_REQUIRED]:`Set up two-factor authentication to continue.`,[J.MFA_ENROLL_TITLE]:`Add a second factor`,[J.MFA_ENROLL_TOTP]:`Authenticator app`,[J.MFA_ENROLL_RECOVERY]:`Recovery codes`,[J.MFA_SCAN_QR]:`Scan this QR code with your authenticator app.`,[J.MFA_MANUAL_KEY]:`Or enter this key manually:`,[J.MFA_CONFIRM_INTRO]:`Enter the generated code to confirm the setup.`,[J.MFA_CONFIRM]:`Confirm`,[J.MFA_RECOVERY_INTRO]:`Store these codes somewhere safe. Each code can be used once.`,[J.MFA_RECOVERY_SAVE]:`You will not be able to see these codes again.`,[J.MFA_DOWNLOAD]:`Download`,[J.MFA_ENROLLED]:`The second factor was added.`,[J.MFA_DEVICE_NAME]:`Device name`,[J.MFA_NO_DEVICES]:`No authenticator devices have been added yet.`,[J.MFA_DEVICE_UNCONFIRMED]:`not confirmed`,[J.MFA_RECOVERY_NUDGE]:`Add backup recovery codes so you can still sign in if you lose access to this second factor.`,[J.MFA_RECOVERY_NUDGE_GENERATE]:`Generate recovery codes`,[J.MFA_RECOVERY_NUDGE_SKIP]:`Skip for now`,[J.MFA_USE_EMAIL]:`Use an email code`,[J.MFA_SEND_CODE]:`Send code`,[J.MFA_CODE_SENT]:`A code was sent to your email address.`,[J.MFA_ENROLL_EMAIL]:`Email code`,[J.MFA_USE_PASSKEY]:`Use a passkey`,[J.MFA_PASSKEY_PROMPT]:`Use your passkey or security key to continue.`,[J.MFA_ENROLL_WEBAUTHN]:`Passkey / security key`,[J.KEY_USE_SIGNATURE]:`Signature (sig)`,[J.KEY_USE_ENCRYPTION]:`Encryption (enc)`,[J.KEY_IMPORT_MATERIAL]:`Import existing key material`,[J.KEY_MATERIAL_OCT]:`Key material (32 bytes, base64)`,[J.KEY_MATERIAL_PRIVATE]:`Private key (PKCS#8, base64 or PEM)`,[J.KEY_MATERIAL_PUBLIC]:`Public key (SPKI, base64 or PEM)`},HD={[Q.GENERAL]:`General`,[Q.OVERVIEW]:`Overview`,[Q.ALL]:`All`,[Q.LOADING]:`Loading...`,[Q.ACTIVE]:`Active`,[Q.INACTIVE]:`Inactive`,[Q.LOCKED]:`Locked`,[Q.NOT_LOCKED]:`Not locked`,[Q.APPLICATION]:`Application`,[Q.SEARCH]:`Search`,[Q.NO_RESULTS]:`No results found.`,[Q.SWITCH_TO_LIGHT_MODE]:`Switch to light mode`,[Q.SWITCH_TO_DARK_MODE]:`Switch to dark mode`,[Q.YES]:`Yes`,[Q.BUILT_IN]:`Built-in`,[Q.GLOBAL]:`Global`,[Q.INVERTED]:`Inverted`,[Q.CONFIDENTIAL]:`Confidential`,[Q.BASIC]:`Basic`,[Q.SECURITY]:`Security`,[Q.CONNECTION]:`Connection`,[Q.ENDPOINTS]:`Endpoints`,[Q.DETAILS]:`Details`,[Q.GROUP]:`Group`,[Q.NO_ITEMS]:`The list has no items yet.`,[Q.PROCESSING]:`Processing`,[Q.REQUEST]:`Request`,[Q.DATA]:`Data`,[Q.BREADCRUMB]:`Breadcrumb`},UD={[RD.CLIENT]:eD({one:`Client`,other:`Clients`}),[RD.CONSENT]:eD({one:`Consent`,other:`Consents`}),[RD.EVENT]:eD({one:`Event`,other:`Events`}),[RD.IDENTITY_PROVIDER]:eD({one:`Identity provider`,other:`Identity providers`}),[RD.IDENTITY_PROVIDER_ACCOUNT]:eD({one:`Connected account`,other:`Connected accounts`}),[RD.KEY]:eD({one:`Key`,other:`Keys`}),[RD.PERMISSION]:eD({one:`Permission`,other:`Permissions`}),[RD.POLICY]:eD({one:`Policy`,other:`Policies`}),[RD.REALM]:eD({one:`Realm`,other:`Realms`}),[RD.ROLE]:eD({one:`Role`,other:`Roles`}),[RD.SCOPE]:eD({one:`Scope`,other:`Scopes`}),[RD.SESSION]:eD({one:`Session`,other:`Sessions`}),[RD.SESSION_TOKEN]:eD({one:`Session token`,other:`Session tokens`}),[RD.TRUST_ANCHOR]:eD({one:`Trusted CA`,other:`Trusted CAs`}),[RD.USER]:eD({one:`User`,other:`Users`})},WD={[H.BAD_REQUEST]:`The request could not be processed.`,[H.INTERNAL_ERROR]:`An unexpected error occurred. Please try again later.`,[H.UPSTREAM_ERROR]:`A required service did not answer correctly. Please try again later.`,[H.HTTP_HEADER_AUTH_TYPE_UNSUPPORTED]:`The authorization header type is not supported.`,[H.HTTP_BEARER_TOKEN_MALFORMED]:`The bearer token is malformed.`,[H.IDENTITY_UNAUTHORIZED]:`You are not authenticated.`,[H.ENTITY_CREDENTIALS_INVALID]:`The provided credentials are invalid.`,[H.ENTITY_INACTIVE]:`The entity is inactive.`,[H.ENTITY_NOT_FOUND]:`The requested entity could not be found.`,[H.ENTITY_CONFLICT]:`An entity with these details already exists.`,[H.ENTITY_RELATION_INVALID]:`A referenced relation is invalid.`,[H.REGISTRATION_DISABLED]:`Registration is currently disabled.`,[H.PASSWORD_RECOVERY_DISABLED]:`Password recovery is currently disabled.`,[H.EMAIL_VERIFICATION_REQUIRED]:`Your email address must be verified first.`,[H.RESET_TOKEN_EXPIRED]:`The reset token has expired. Please request a new one.`,[H.LOGIN_ATTEMPT_THROTTLED]:`Too many failed login attempts. Please try again later.`,[H.MFA_ATTEMPT_THROTTLED]:`Too many failed verification attempts. Please try again later.`,[H.MFA_NOT_CONFIGURABLE]:`Multi-factor authentication is not available on this server.`,[H.IDENTITY_PROVIDER_ACCOUNT_ALREADY_LINKED]:`This external account is already connected to another user.`,[H.IDENTITY_PROVIDER_ACCOUNT_UNLINK_BLOCKED]:`This is the last way to sign in to this account. Set a password before disconnecting it.`,[H.STORAGE_INSUFFICIENT]:`There is not enough storage available to complete this action.`,[H.JWK_INVALID]:`The JSON web key is invalid.`,[H.JWK_NOT_FOUND]:`The JSON web key could not be found.`,[H.JWT_INVALID]:`The token is invalid.`,[H.JWT_INACTIVE]:`The token is not active yet.`,[H.JWT_EXPIRED]:`The token has expired. Please sign in again.`,[H.OAUTH_REDIRECT_URI_MISMATCH]:`The redirect URI does not match.`,[H.OAUTH_CLIENT_INVALID]:`The client is invalid.`,[H.OAUTH_CLIENT_UNAUTHORIZED]:`The client is not authorized to use this grant type.`,[H.OAUTH_GRANT_INVALID]:`The authorization grant is invalid.`,[H.OAUTH_GRANT_TYPE_UNSUPPORTED]:`The grant type is not supported.`,[H.OAUTH_REQUEST_INVALID]:`The request is invalid.`,[H.OAUTH_LOGIN_REQUIRED]:`You must sign in to continue.`,[H.OAUTH_MFA_REQUIRED]:`A second factor is required to continue.`,[H.OAUTH_ACCESS_DENIED]:`You are not permitted to access this application.`,[H.OAUTH_INTERACTION_REQUIRED]:`Interaction is required to continue.`,[H.OAUTH_ACCOUNT_SELECTION_REQUIRED]:`Please select an account to continue.`,[H.OAUTH_CONSENT_REQUIRED]:`Your consent is required to continue.`,[H.OAUTH_RESPONSE_TYPE_UNSUPPORTED]:`The response type is not supported.`,[H.OAUTH_SCOPE_INVALID]:`The requested scope is invalid.`,[H.OAUTH_SCOPE_INSUFFICIENT]:`The granted scope is insufficient for this action.`,[H.PERMISSION_NOT_FOUND]:`The permission could not be found.`,[H.PERMISSION_DENIED]:`You do not have permission to perform this action.`,[H.PERMISSION_EVALUATION_FAILED]:`The permission could not be evaluated.`,[H.POLICY_EVALUATOR_NOT_FOUND]:`No evaluator was found for this policy.`,[H.POLICY_EVALUATOR_NOT_PROCESSABLE]:`This policy could not be processed.`,[H.POLICY_EVALUATOR_CONTEXT_INVALID]:`The policy evaluation context is invalid.`},GD={[X.NAME]:`Name`,[X.DISPLAY_NAME]:`Display name`,[X.EMAIL]:`Email`,[X.EXTERNAL_ID]:`External ID`,[X.DESCRIPTION]:`Description`,[X.SECRET]:`Secret`,[X.REDIRECT_URIS]:`Redirect URI(s)`,[X.POST_LOGOUT_REDIRECT_URIS]:`Post-logout redirect URI(s)`,[X.GRANT_TYPES]:`Grant types`,[X.PASSWORD]:`Password`,[X.DECISION_STRATEGY]:`Decision strategy`,[X.HASHED]:`Hashed`,[X.URL]:`URL`,[X.CLIENT_SCOPES]:`Client scopes`,[X.START]:`Start`,[X.END]:`End`,[X.INTERVAL]:`Interval`,[X.DAY_OF_WEEK]:`Day of Week`,[X.DAY_OF_MONTH]:`Day of Month`,[X.DAY_OF_YEAR]:`Day of Year`,[X.VALUE_IS_REGEX]:`Is the value a regex pattern?`,[X.CODE]:`Code`,[X.NAMES]:`Names`,[X.PASSWORD_REPEAT]:`Password repeat`,[X.ID]:`ID`,[X.TYPE]:`Type`,[X.TYPES]:`Types`,[X.INVERT]:`Invert?`,[X.ENABLED]:`Enabled?`,[X.CHILDREN]:`Children`,[X.CREATED_AT]:`Created at`,[X.UPDATED_AT]:`Updated at`,[X.SEEN_AT]:`Last seen`,[X.EXPIRES_AT]:`Expires at`,[X.IP_ADDRESS]:`IP address`,[X.USER_AGENT]:`User agent`,[X.AUTH_METHOD]:`Auth method`,[X.KIND]:`Kind`,[X.SUBJECT]:`Subject`,[X.REFRESHED_AT]:`Refreshed at`,[X.MFA_AT]:`MFA verified at`,[X.PROTOCOL]:`Protocol`,[X.PROTOCOLS]:`Protocols`,[X.PRESET]:`Preset`,[X.PRESETS]:`Presets`,[X.TIMEOUT]:`Timeout`,[X.START_TLS]:`StartTLS`,[X.BASE_DN]:`Base DN`,[X.FILTER]:`Filter`,[X.CLASS]:`Class`,[X.NAME_ATTRIBUTE]:`Name attribute`,[X.MAIL_ATTRIBUTE]:`Mail attribute`,[X.DISPLAY_NAME_ATTRIBUTE]:`Display-name attribute`,[X.MEMBER_ATTRIBUTE]:`Member attribute`,[X.MEMBER_USER_ATTRIBUTE]:`Member user attribute`,[X.CLIENT_ID]:`Client ID`,[X.CLIENT_SECRET]:`Client secret`,[X.SCOPE]:`Scope`,[X.TOKEN]:`Token`,[X.USER_INFO]:`UserInfo`,[X.DISCOVERY]:`Discovery`,[X.REDIRECT_URL]:`Redirect URL`,[X.ACCESS_POLICY]:`Access policy`,[X.ACTOR]:`Actor`,[X.REF]:`Reference`,[X.PATH]:`Path`,[X.METHOD]:`Method`,[X.USE]:`Usage`,[X.STATUS]:`Status`,[X.PRIORITY]:`Priority`,[X.SIGNATURE_ALGORITHM]:`Signature algorithm`,[X.CERTIFICATE]:`Certificate`},KD={[LD.CODE]:`Code`,[LD.REGISTRATION_ACTIVATION_SUBJECT]:`Activate your account`,[LD.REGISTRATION_ACTIVATION_INTRO]:`Use the code below to activate your account and start using the platform.`,[LD.REGISTRATION_ACTIVATION_ACTION]:`Activate account`,[LD.REGISTRATION_ACTIVATION_HINT]:`If you did not create an account, you can safely ignore this email.`,[LD.PASSWORD_RESET_SUBJECT]:`Reset your password`,[LD.PASSWORD_RESET_INTRO]:`Use the code below to reset your account password.`,[LD.PASSWORD_RESET_ACTION]:`Reset password`,[LD.PASSWORD_RESET_EXPIRY]:`The code expires in {{minutes}} minutes.`,[LD.PASSWORD_RESET_HINT]:`If you did not request a password reset, you can safely ignore this email. Your password stays unchanged.`,[LD.MFA_EMAIL_OTP_SUBJECT]:`Your verification code`,[LD.MFA_EMAIL_OTP_INTRO]:`Use the code below to complete your sign-in.`,[LD.MFA_EMAIL_OTP_EXPIRY]:`The code expires in {{minutes}} minutes.`,[LD.MFA_EMAIL_OTP_HINT]:`If you did not try to sign in, you can safely ignore this email.`},qD={[ID.NO_MORE]:`No more {{name}} available`},JD={[Z.ADD]:`Hinzufügen`,[Z.CREATE]:`Erstellen`,[Z.DELETE]:`Löschen`,[Z.GENERATE]:`Generieren`,[Z.UPDATE]:`Aktualisieren`,[Z.AUTHORIZE]:`Autorisieren`,[Z.ABORT]:`Abbrechen`,[Z.LOGIN]:`Anmelden`,[Z.REGISTER]:`Registrieren`,[Z.ACTIVATE]:`Aktivieren`,[Z.RESET]:`Zurücksetzen`,[Z.SEND]:`Senden`,[Z.BACK]:`Zurück`,[Z.CLOSE]:`Schließen`,[Z.LOOKUP]:`Nachschlagen`,[Z.SHOW]:`Anzeigen`,[Z.HIDE]:`Verbergen`,[Z.REMOVE]:`Entfernen`},YD={[Y.HOME]:`Startseite`,[Y.RESOURCES]:`Ressourcen`,[Y.GENERAL]:`Allgemein`,[Y.OTHER]:`Sonstiges`,[Y.SETTINGS]:`Einstellungen`,[Y.LOGOUT]:`Abmelden`,[Y.ACCOUNT]:`Konto`,[Y.MANAGE_ACCOUNT]:`Konto verwalten`,[Y.SECURITY]:`Sicherheit`,[Y.MANAGEMENT]:`Verwaltung`,[Y.DETAILS]:`Details`,[Y.REALM_DESCRIPTION]:`Isolierte Organisationen, jede mit eigenen Benutzern, Clients und Schlüsseln.`,[Y.CLIENT_DESCRIPTION]:`Anwendungen, die sich gegenüber Authup authentifizieren.`,[Y.SCOPE_DESCRIPTION]:`Bereiche, die ein Client beim Zugriff anfordern kann.`,[Y.IDENTITY_PROVIDER_DESCRIPTION]:`Externe Anbieter, über die sich Benutzer anmelden können.`,[Y.KEY_DESCRIPTION]:`Signatur- und Verschlüsselungsschlüssel, ein Speicher pro Organisation.`,[Y.TRUST_ANCHOR_DESCRIPTION]:`Vertrauenswürdige CA-Zertifikate für die Authentifizierung mit Client-Zertifikaten.`,[Y.USER_DESCRIPTION]:`Konten, die sich an Anwendungen anmelden.`,[Y.ROLE_DESCRIPTION]:`Benannte Bündel von Berechtigungen, die Benutzern und Clients zugewiesen werden.`,[Y.PERMISSION_DESCRIPTION]:`Einzelne Fähigkeiten, die einer Identität gewährt werden können.`,[Y.POLICY_DESCRIPTION]:`Regeln, die bestimmen, wann eine Berechtigung gilt.`,[Y.EVENT_DESCRIPTION]:`Fortlaufendes Protokoll sicherheitsrelevanter Aktivitäten.`,[Y.SESSION_DESCRIPTION]:`Aktive Anmeldungen mit den zugehörigen Geräten und Tokens.`,[Y.SET_MANAGEMENT_REALM]:`Als Verwaltungs-Realm festlegen`,[Y.API_DOCS]:`API-Dokumentation`,[Y.MADE_WITH]:`Erstellt mit`,[Y.LOGIN_TITLE]:`Anmelden`,[Y.LOGIN_SUBTITLE]:`Wähle einen Realm aus, um fortzufahren`,[Y.URL_GENERATOR]:`URL-Generator`,[Y.URL_GENERATOR_HINT]:`Erzeuge eine Autorisierungs-URL, indem du die benötigten Bereiche auswählst.`,[Y.REDIRECT_URL]:`Weiterleitungs-URL`,[Y.GENERATED_URL]:`Generierte URL`,[Y.TOGGLE_NAVIGATION]:`Navigation umschalten`,[Y.SESSION_RENEW]:`Die Sitzung wird erneuert in {countdown}.`,[Y.MINUTES]:`Minute(n)`,[Y.SECONDS]:`Sekunde(n)`,[Y.ENTITY_CREATED]:`{{entity}} wurde erfolgreich erstellt.`,[Y.ENTITY_UPDATED]:`{{entity}} wurde erfolgreich aktualisiert.`,[Y.ENTITY_DELETED]:`{{entity}} "{{name}}" wurde erfolgreich gelöscht.`,[Y.ACCOUNT_UPDATED]:`Das Konto wurde erfolgreich aktualisiert.`,[Y.DELETE_CONFIRM_TITLE]:`{{entity}} wirklich löschen?`,[Y.DELETE_CONFIRM_DESCRIPTION]:`Diese Aktion kann nicht rückgängig gemacht werden.`,[Y.REMOVE_CONFIRM_TITLE]:`Entfernen bestätigen`,[Y.REMOVE_CONFIRM_DESCRIPTION]:`Möchten Sie diese Zuordnung wirklich entfernen? Sie können sie jederzeit erneut zuweisen.`,[Y.SESSION_REVOKE_OTHERS]:`Andere Geräte abmelden`,[Y.SESSION_REVOKE_OTHERS_CONFIRM_TITLE]:`Andere Geräte abmelden?`,[Y.SESSION_REVOKE_OTHERS_CONFIRM_DESCRIPTION]:`Dadurch werden alle anderen Sitzungen abgemeldet. Ihre aktuelle Sitzung bleibt aktiv.`,[Y.SESSION_REVOKE_OTHERS_SUCCESS]:`{{amount}} andere Sitzung(en) abgemeldet.`,[Y.SESSION_REVOKE_ALL]:`Überall abmelden`,[Y.SESSION_REVOKE_ALL_CONFIRM_TITLE]:`Diesen Benutzer überall abmelden?`,[Y.SESSION_REVOKE_ALL_CONFIRM_DESCRIPTION]:`Dadurch werden alle Sitzungen dieses Benutzers auf allen Geräten abgemeldet.`,[Y.SESSION_REVOKE_ALL_SUCCESS]:`{{amount}} Sitzung(en) abgemeldet.`,[Y.SESSION_CURRENT]:`Dieses Gerät`,[Y.SESSION_TOKEN_STATUS_ACTIVE]:`Aktiv`,[Y.SESSION_TOKEN_STATUS_CONSUMED]:`Verbraucht`,[Y.SESSION_TOKEN_STATUS_REVOKED]:`Widerrufen`,[Y.SESSION_TOKEN_STATUS_EXPIRED]:`Abgelaufen`,[Y.AUTHENTICATOR]:`Authentifikatoren`,[Y.MFA_SECURITY_TITLE]:`Zwei-Faktor-Authentifizierung`,[Y.MFA_SECURITY_HINT]:`Füge mit einer Authenticator-App oder Wiederherstellungscodes eine zusätzliche Sicherheitsebene hinzu.`,[Y.APPLICATIONS]:`Anwendungen`,[Y.CONSENT_EMPTY]:`Du hast noch keiner Anwendung Zugriff gewährt.`,[Y.CONSENT_REVOKE]:`Widerrufen`,[Y.CONSENT_REVOKE_ALL]:`Zugriff widerrufen`,[Y.CONSENT_REVOKE_ALL_SUCCESS]:`Der Anwendungszugriff wurde widerrufen.`,[Y.CONSENT_REVOKE_ALL_TITLE]:`Anwendungszugriff widerrufen`,[Y.CONSENT_REVOKE_ALL_DESCRIPTION]:`Die Anwendung wird bei der nächsten Anmeldung erneut um deine Einwilligung bitten.`,[Y.CONSENT_SCOPES]:`Gewährte Berechtigungen`,[Y.CONNECTED_ACCOUNTS]:`Verknüpfte Konten`,[Y.CONNECTED_ACCOUNTS_NONE]:`Es sind keine Identitätsanbieter konfiguriert.`,[Y.IDENTITY_PROVIDER_CONNECT]:`Verbinden`,[Y.IDENTITY_PROVIDER_CONNECTED_AS]:`Verbunden als {{name}}`,[Y.IDENTITY_PROVIDER_DISCONNECT]:`Trennen`,[Y.IDENTITY_PROVIDER_DISCONNECT_CONFIRM_TITLE]:`Konto trennen?`,[Y.IDENTITY_PROVIDER_DISCONNECT_CONFIRM_DESCRIPTION]:`Die Anmeldung über diesen Anbieter funktioniert für dieses Konto dann nicht mehr.`,[Y.IDENTITY_PROVIDER_LINK_SUCCESS]:`Das Konto wurde verbunden.`,[Y.IDENTITY_PROVIDER_LINK_FAILED]:`Das Konto konnte nicht verbunden werden.`,[Y.KEY_DELETE_FORCE_CONFIRM_TITLE]:`Verschlüsselungsschlüssel unwiderruflich löschen?`,[Y.KEY_DELETE_FORCE_CONFIRM_DESCRIPTION]:`Dieser Schlüssel wird noch von {{count}} verschlüsselten Geheimnissen referenziert. Das Löschen macht sie dauerhaft unlesbar.`,[Y.BACK_TO_APP]:`Zurück zu {{host}}`},XD={[J.NAME_HINT]:`Etwas, das Benutzer erkennen und dem sie vertrauen`,[J.DESCRIPTION_HINT]:`Wird allen Benutzern dieser Anwendung angezeigt`,[J.REDIRECT_URI_HINT]:`URI-Muster, zu dem ein Browser nach einem erfolgreichen Login weiterleiten kann`,[J.POST_LOGOUT_REDIRECT_URI_HINT]:`URI-Muster, zu dem ein RP-initiierter Logout zurückleiten darf. Getrennt von den Login-Weiterleitungs-URIs. Ohne Eintrag endet der Logout immer auf der Bestätigungsseite.`,[J.GRANT_TYPES_HINT]:`Schränkt ein, welche OAuth2-Grants dieser Client verwenden darf. Ohne Auswahl sind alle Grants erlaubt.`,[J.AUTH_METHOD]:`Authentifizierungsmethode`,[J.AUTH_METHOD_NONE]:`Keine`,[J.AUTH_METHOD_SECRET]:`Gemeinsames Geheimnis`,[J.AUTH_METHOD_TLS]:`TLS-Zertifikat`,[J.TOKEN_BINDING_METHOD]:`Tokenbindung`,[J.TOKEN_BINDING_METHOD_NONE]:`Deaktiviert`,[J.TOKEN_BINDING_METHOD_TLS]:`TLS-Zertifikat`,[J.CLIENT_CERTIFICATE_URI]:`Zertifikat-Client-URI`,[J.CLIENT_CERTIFICATE_URI_HINT]:`Das Zertifikat muss genau einmal diese exakte URI-SAN enthalten.`,[J.IS_ACTIVE]:`Ist aktiv?`,[J.HASH_SECRET]:`Geheimnis hashen?`,[J.LOGIN_FAILED]:`Der Anmeldevorgang ist fehlgeschlagen`,[J.SCOPE_GRANT_INTRO]:`Dies erlaubt der Anwendung {client},`,[J.ONCE_AUTHORIZED_REDIRECT]:`Nach der Autorisierung werden Sie weitergeleitet zu {target}.`,[J.GOVERNED_BY]:`Diese Anwendung unterliegt der {privacyPolicy} und den {termsOfService} der Anwendung {{client}}.`,[J.ACTIVE_SINCE]:`Aktiv seit`,[J.VIEW_POLICY_DETAILS]:`Richtliniendetails anzeigen`,[J.CREATE_ACCOUNT]:`Konto erstellen`,[J.FORGOT_PASSWORD]:`Passwort vergessen?`,[J.RESET_PASSWORD]:`Passwort zurücksetzen`,[J.ACTIVATE_ACCOUNT]:`Konto aktivieren`,[J.BACK_TO_LOGIN]:`Zurück zur Anmeldung`,[J.EMAIL_OR_NAME]:`E-Mail oder Name`,[J.CHECK_EMAIL_ACTIVATE]:`Prüfe deine E-Mails für den Aktivierungscode.`,[J.CHECK_EMAIL_RESET]:`Prüfe deine E-Mails für den Code zum Zurücksetzen.`,[J.ACCOUNT_ACTIVATED]:`Das Konto wurde erfolgreich aktiviert.`,[J.PASSWORD_RESET_DONE]:`Das Passwort wurde erfolgreich zurückgesetzt.`,[J.WORKFLOW_DISABLED]:`Diese Funktion ist nicht aktiviert.`,[J.PRIVACY_POLICY]:`Datenschutzerklärung`,[J.TERMS_OF_SERVICE]:`Nutzungsbedingungen`,[J.POLICY_TYPE_COMPOSITE]:`Komposit`,[J.POLICY_TYPE_DATE]:`Datum`,[J.POLICY_TYPE_TIME]:`Uhrzeit`,[J.POLICY_TYPE_ATTRIBUTE_NAMES]:`Attributnamen`,[J.POLICY_TYPE_ATTRIBUTES]:`Attribute`,[J.POLICY_TYPE_REALM_MATCH]:`Realm-Abgleich`,[J.POLICY_TYPE_IDENTITY]:`Identität`,[J.POLICY_TYPE_PERMISSION_BINDING]:`Berechtigungsbindung`,[J.DECISION_STRATEGY_HINT_UNANIMOUS]:`Alle Richtlinien müssen positiv ausfallen.`,[J.DECISION_STRATEGY_HINT_AFFIRMATIVE]:`Mindestens eine Richtlinie muss positiv ausfallen.`,[J.DECISION_STRATEGY_HINT_CONSENSUS]:`Es müssen mehr Richtlinien positiv als negativ ausfallen.`,[J.DECISION_STRATEGY_HINT_DEFAULT]:`Keine Strategie ausgewählt. Standard ist einstimmig (alle Richtlinien müssen positiv ausfallen).`,[J.OPTION_NONE_UNANIMOUS]:`-- Keine (Standard: einstimmig) --`,[J.REALM_MATCH_STRICT_HINT]:`Nur übereinstimmen, wenn das Attribut exakt dem Namen entspricht?`,[J.REALM_MATCH_NULL_MATCH_ALL_HINT]:`Bestimmt, ob Ressourcen mit leerem Realm-ID-/Namens-Wert mit allen Identitäts-Realms übereinstimmen.{br}Wenn aktiviert, kann jeder Identitäts-Realm auf Ressourcen mit leeren Realm-Werten zugreifen.`,[J.ENABLE_STARTTLS_HINT]:`StartTLS-Prozess aktivieren?`,[J.PASSWORD_MUST_MATCH]:`Muss mit dem Passwort übereinstimmen.`,[J.LOOKUP_FAILED]:`Abfrage fehlgeschlagen mit: {{message}}`,[J.PROTOCOL_NOT_SUPPORTED]:`{{name}} wird noch nicht unterstützt.`,[J.JUNCTION_POLICY]:`Verknüpfungsrichtlinie`,[J.JUNCTION_REALM_SCOPE]:`Realm-Geltungsbereich`,[J.REALM_SCOPE_NONE]:`Keiner`,[J.REALM_SCOPE_NONE_HINT]:`Keine Reichweite. Trifft auf keinen Realm zu; eine deaktivierte Berechtigung.`,[J.REALM_SCOPE_OWN]:`Eigener Realm`,[J.REALM_SCOPE_OWN_HINT]:`Wirkt nur im eigenen Realm des Inhabers.`,[J.REALM_SCOPE_OWN_OR_NULL]:`Eigener + global`,[J.REALM_SCOPE_OWN_OR_NULL_HINT]:`Eigener Realm sowie globale (realm-lose) Ressourcen.`,[J.REALM_SCOPE_ANY]:`Beliebiger Realm`,[J.REALM_SCOPE_ANY_HINT]:`Wirkt auf alle Realms, einschließlich global. Reichweite auf Administratorebene.`,[J.SELECTION_UPDATING]:`Auswahl wird aktualisiert`,[J.SELECTION_REMOVE]:`Aus der Auswahl entfernen`,[J.SELECTION_ADD]:`Zur Auswahl hinzufügen`,[J.REALM_MISMATCH_TITLE]:`Mit einem anderen Konto anmelden`,[J.REALM_MISMATCH_TEXT]:`{{client}} gehört zum Realm {{realm}}, aber Sie sind in einem anderen Realm angemeldet. Melden Sie sich mit einem {{realm}}-Konto an, um fortzufahren.`,[J.SIGN_IN_TO_REALM]:`Bei {{realm}} anmelden`,[J.RETURN_TO_APP]:`Zurück zur Anwendung`,[J.REAUTH_TEXT]:`Bitte melde dich erneut an, um fortzufahren.`,[J.SELECT_ACCOUNT_TITLE]:`Konto auswählen`,[J.CONTINUE_AS]:`Als {{name}} fortfahren`,[J.USE_ANOTHER_ACCOUNT]:`Anderes Konto verwenden`,[J.SIGNED_IN_AS]:`Angemeldet als {{name}}`,[J.NOT_YOU]:`Nicht Sie?`,[J.AUTHORIZE_ABORTED]:`Die Autorisierungsanfrage wurde abgelehnt. Eine automatische Rückkehr zur Anwendung ist nicht möglich. Sie können dieses Fenster schließen.`,[J.ACCESS_DENIED_TITLE]:`Zugriff verweigert`,[J.ACCESS_DENIED_TEXT]:`Sie sind nicht berechtigt, auf diese Anwendung zuzugreifen.`,[J.CLIENT_ACCESS_POLICY_HINT]:`Ohne Richtlinie darf sich jede Identität des Realms anmelden.`,[J.CONSENT_STATUS_LOADING]:`Gewährte Berechtigungen werden geprüft…`,[J.LOGOUT_CONFIRM_TITLE]:`Abmelden`,[J.LOGOUT_CONFIRM_TEXT]:`Möchten Sie sich abmelden?`,[J.LOGOUT_DONE]:`Sie wurden abgemeldet.`,[J.SIGN_OUT]:`Abmelden`,[J.ACCOUNT_SIGN_IN_INTRO]:`Melden Sie sich an, um Ihr Konto zu verwalten.`,[J.MFA_TITLE]:`Zwei-Faktor-Authentifizierung`,[J.MFA_CHALLENGE_INTRO]:`Gib den Code aus deiner Authenticator-App ein, um fortzufahren.`,[J.MFA_CODE]:`Bestätigungscode`,[J.MFA_CODE_HINT]:`Der 6-stellige Code aus deiner Authenticator-App.`,[J.MFA_VERIFY]:`Bestätigen`,[J.MFA_USE_RECOVERY]:`Wiederherstellungscode verwenden`,[J.MFA_USE_AUTHENTICATOR]:`Authenticator-App verwenden`,[J.MFA_RECOVERY_CODE]:`Wiederherstellungscode`,[J.MFA_FAILED]:`Der Bestätigungscode ist ungültig.`,[J.MFA_SETUP_REQUIRED]:`Richte die Zwei-Faktor-Authentifizierung ein, um fortzufahren.`,[J.MFA_ENROLL_TITLE]:`Zweiten Faktor hinzufügen`,[J.MFA_ENROLL_TOTP]:`Authenticator-App`,[J.MFA_ENROLL_RECOVERY]:`Wiederherstellungscodes`,[J.MFA_SCAN_QR]:`Scanne diesen QR-Code mit deiner Authenticator-App.`,[J.MFA_MANUAL_KEY]:`Oder gib diesen Schlüssel manuell ein:`,[J.MFA_CONFIRM_INTRO]:`Gib den generierten Code ein, um die Einrichtung zu bestätigen.`,[J.MFA_CONFIRM]:`Bestätigen`,[J.MFA_RECOVERY_INTRO]:`Bewahre diese Codes sicher auf. Jeder Code kann einmal verwendet werden.`,[J.MFA_RECOVERY_SAVE]:`Du wirst diese Codes nicht erneut sehen können.`,[J.MFA_DOWNLOAD]:`Herunterladen`,[J.MFA_ENROLLED]:`Der zweite Faktor wurde hinzugefügt.`,[J.MFA_DEVICE_NAME]:`Gerätename`,[J.MFA_NO_DEVICES]:`Es wurden noch keine Authenticator-Geräte hinzugefügt.`,[J.MFA_DEVICE_UNCONFIRMED]:`nicht bestätigt`,[J.MFA_RECOVERY_NUDGE]:`Hinterlege zusätzlich Wiederherstellungscodes, damit du dich weiterhin anmelden kannst, falls du den Zugriff auf diesen zweiten Faktor verlierst.`,[J.MFA_RECOVERY_NUDGE_GENERATE]:`Wiederherstellungscodes erstellen`,[J.MFA_RECOVERY_NUDGE_SKIP]:`Vorerst überspringen`,[J.MFA_USE_EMAIL]:`E-Mail-Code verwenden`,[J.MFA_SEND_CODE]:`Code senden`,[J.MFA_CODE_SENT]:`Ein Code wurde an deine E-Mail-Adresse gesendet.`,[J.MFA_ENROLL_EMAIL]:`E-Mail-Code`,[J.MFA_USE_PASSKEY]:`Passkey verwenden`,[J.MFA_PASSKEY_PROMPT]:`Verwende deinen Passkey oder Sicherheitsschlüssel, um fortzufahren.`,[J.MFA_ENROLL_WEBAUTHN]:`Passkey / Sicherheitsschlüssel`,[J.KEY_USE_SIGNATURE]:`Signatur (sig)`,[J.KEY_USE_ENCRYPTION]:`Verschlüsselung (enc)`,[J.KEY_IMPORT_MATERIAL]:`Vorhandenes Schlüsselmaterial importieren`,[J.KEY_MATERIAL_OCT]:`Schlüsselmaterial (32 Bytes, Base64)`,[J.KEY_MATERIAL_PRIVATE]:`Privater Schlüssel (PKCS#8, Base64 oder PEM)`,[J.KEY_MATERIAL_PUBLIC]:`Öffentlicher Schlüssel (SPKI, Base64 oder PEM)`},ZD={[Q.GENERAL]:`Allgemein`,[Q.OVERVIEW]:`Überblick`,[Q.ALL]:`Alle`,[Q.LOADING]:`Wird geladen...`,[Q.ACTIVE]:`Aktiv`,[Q.INACTIVE]:`Inaktiv`,[Q.LOCKED]:`Gesperrt`,[Q.NOT_LOCKED]:`Nicht gesperrt`,[Q.APPLICATION]:`Anwendung`,[Q.SEARCH]:`Suchen`,[Q.NO_RESULTS]:`Keine Ergebnisse gefunden.`,[Q.SWITCH_TO_LIGHT_MODE]:`Zum hellen Modus wechseln`,[Q.SWITCH_TO_DARK_MODE]:`Zum dunklen Modus wechseln`,[Q.YES]:`Ja`,[Q.BUILT_IN]:`Integriert`,[Q.GLOBAL]:`Global`,[Q.INVERTED]:`Invertiert`,[Q.CONFIDENTIAL]:`Vertraulich`,[Q.BASIC]:`Allgemein`,[Q.SECURITY]:`Sicherheit`,[Q.CONNECTION]:`Verbindung`,[Q.ENDPOINTS]:`Endpunkte`,[Q.DETAILS]:`Details`,[Q.GROUP]:`Gruppe`,[Q.NO_ITEMS]:`Die Liste enthält noch keine Einträge.`,[Q.PROCESSING]:`Wird verarbeitet`,[Q.REQUEST]:`Anfrage`,[Q.DATA]:`Daten`,[Q.BREADCRUMB]:`Navigationspfad`},QD={[RD.CLIENT]:eD({one:`Client`,other:`Clients`}),[RD.CONSENT]:eD({one:`Einwilligung`,other:`Einwilligungen`}),[RD.EVENT]:eD({one:`Ereignis`,other:`Ereignisse`}),[RD.IDENTITY_PROVIDER]:eD({one:`Identitätsanbieter`,other:`Identitätsanbieter`}),[RD.IDENTITY_PROVIDER_ACCOUNT]:eD({one:`Verknüpftes Konto`,other:`Verknüpfte Konten`}),[RD.KEY]:eD({one:`Schlüssel`,other:`Schlüssel`}),[RD.PERMISSION]:eD({one:`Berechtigung`,other:`Berechtigungen`}),[RD.POLICY]:eD({one:`Richtlinie`,other:`Richtlinien`}),[RD.REALM]:eD({one:`Organisation`,other:`Organisationen`}),[RD.ROLE]:eD({one:`Rolle`,other:`Rollen`}),[RD.SCOPE]:eD({one:`Bereich`,other:`Bereiche`}),[RD.SESSION]:eD({one:`Sitzung`,other:`Sitzungen`}),[RD.SESSION_TOKEN]:eD({one:`Sitzungstoken`,other:`Sitzungstoken`}),[RD.TRUST_ANCHOR]:eD({one:`Vertrauenswürdige Zertifizierungsstelle`,other:`Vertrauenswürdige Zertifizierungsstellen`}),[RD.USER]:eD({one:`Benutzer`,other:`Benutzer`})},$D={[H.BAD_REQUEST]:`Die Anfrage konnte nicht verarbeitet werden.`,[H.INTERNAL_ERROR]:`Ein unerwarteter Fehler ist aufgetreten. Bitte versuche es später erneut.`,[H.UPSTREAM_ERROR]:`Ein benötigter Dienst hat nicht korrekt geantwortet. Bitte versuche es später erneut.`,[H.HTTP_HEADER_AUTH_TYPE_UNSUPPORTED]:`Der Typ des Autorisierungs-Headers wird nicht unterstützt.`,[H.HTTP_BEARER_TOKEN_MALFORMED]:`Das Bearer-Token ist fehlerhaft.`,[H.IDENTITY_UNAUTHORIZED]:`Du bist nicht authentifiziert.`,[H.ENTITY_CREDENTIALS_INVALID]:`Die angegebenen Anmeldedaten sind ungültig.`,[H.ENTITY_INACTIVE]:`Der Eintrag ist inaktiv.`,[H.ENTITY_NOT_FOUND]:`Der angeforderte Eintrag konnte nicht gefunden werden.`,[H.ENTITY_CONFLICT]:`Ein Eintrag mit diesen Angaben existiert bereits.`,[H.ENTITY_RELATION_INVALID]:`Eine referenzierte Beziehung ist ungültig.`,[H.REGISTRATION_DISABLED]:`Die Registrierung ist derzeit deaktiviert.`,[H.PASSWORD_RECOVERY_DISABLED]:`Die Passwort-Wiederherstellung ist derzeit deaktiviert.`,[H.EMAIL_VERIFICATION_REQUIRED]:`Deine E-Mail-Adresse muss zuerst bestätigt werden.`,[H.RESET_TOKEN_EXPIRED]:`Das Reset-Token ist abgelaufen. Bitte fordere ein neues an.`,[H.LOGIN_ATTEMPT_THROTTLED]:`Zu viele fehlgeschlagene Anmeldeversuche. Bitte versuche es später erneut.`,[H.MFA_ATTEMPT_THROTTLED]:`Zu viele fehlgeschlagene Bestätigungsversuche. Bitte versuche es später erneut.`,[H.MFA_NOT_CONFIGURABLE]:`Multi-Faktor-Authentifizierung ist auf diesem Server nicht verfügbar.`,[H.IDENTITY_PROVIDER_ACCOUNT_ALREADY_LINKED]:`Dieses externe Konto ist bereits mit einem anderen Benutzer verknüpft.`,[H.IDENTITY_PROVIDER_ACCOUNT_UNLINK_BLOCKED]:`Dies ist die letzte Anmeldemöglichkeit für dieses Konto. Lege zuerst ein Passwort fest.`,[H.STORAGE_INSUFFICIENT]:`Es ist nicht genügend Speicherplatz verfügbar, um diese Aktion auszuführen.`,[H.JWK_INVALID]:`Der JSON Web Key ist ungültig.`,[H.JWK_NOT_FOUND]:`Der JSON Web Key konnte nicht gefunden werden.`,[H.JWT_INVALID]:`Das Token ist ungültig.`,[H.JWT_INACTIVE]:`Das Token ist noch nicht aktiv.`,[H.JWT_EXPIRED]:`Das Token ist abgelaufen. Bitte melde dich erneut an.`,[H.OAUTH_REDIRECT_URI_MISMATCH]:`Die Weiterleitungs-URI stimmt nicht überein.`,[H.OAUTH_CLIENT_INVALID]:`Der Client ist ungültig.`,[H.OAUTH_CLIENT_UNAUTHORIZED]:`Der Client ist nicht berechtigt, diesen Grant-Typ zu verwenden.`,[H.OAUTH_GRANT_INVALID]:`Die Autorisierungsfreigabe ist ungültig.`,[H.OAUTH_GRANT_TYPE_UNSUPPORTED]:`Der Grant-Typ wird nicht unterstützt.`,[H.OAUTH_REQUEST_INVALID]:`Die Anfrage ist ungültig.`,[H.OAUTH_LOGIN_REQUIRED]:`Sie müssen sich anmelden, um fortzufahren.`,[H.OAUTH_MFA_REQUIRED]:`Ein zweiter Faktor ist erforderlich, um fortzufahren.`,[H.OAUTH_ACCESS_DENIED]:`Sie sind nicht berechtigt, auf diese Anwendung zuzugreifen.`,[H.OAUTH_INTERACTION_REQUIRED]:`Eine Interaktion ist erforderlich, um fortzufahren.`,[H.OAUTH_ACCOUNT_SELECTION_REQUIRED]:`Bitte wählen Sie ein Konto aus, um fortzufahren.`,[H.OAUTH_CONSENT_REQUIRED]:`Ihre Zustimmung ist erforderlich, um fortzufahren.`,[H.OAUTH_RESPONSE_TYPE_UNSUPPORTED]:`Der Response-Typ wird nicht unterstützt.`,[H.OAUTH_SCOPE_INVALID]:`Der angeforderte Bereich ist ungültig.`,[H.OAUTH_SCOPE_INSUFFICIENT]:`Der gewährte Bereich reicht für diese Aktion nicht aus.`,[H.PERMISSION_NOT_FOUND]:`Die Berechtigung konnte nicht gefunden werden.`,[H.PERMISSION_DENIED]:`Du hast keine Berechtigung, diese Aktion auszuführen.`,[H.PERMISSION_EVALUATION_FAILED]:`Die Berechtigung konnte nicht ausgewertet werden.`,[H.POLICY_EVALUATOR_NOT_FOUND]:`Für diese Richtlinie wurde kein Evaluator gefunden.`,[H.POLICY_EVALUATOR_NOT_PROCESSABLE]:`Diese Richtlinie konnte nicht verarbeitet werden.`,[H.POLICY_EVALUATOR_CONTEXT_INVALID]:`Der Kontext der Richtlinienauswertung ist ungültig.`},eO={[X.NAME]:`Name`,[X.DISPLAY_NAME]:`Anzeigename`,[X.EMAIL]:`E-Mail`,[X.EXTERNAL_ID]:`Externe ID`,[X.DESCRIPTION]:`Beschreibung`,[X.SECRET]:`Geheimnis`,[X.REDIRECT_URIS]:`Weiterleitungs-URIs`,[X.POST_LOGOUT_REDIRECT_URIS]:`Post-Logout-Weiterleitungs-URIs`,[X.GRANT_TYPES]:`Grant-Typen`,[X.PASSWORD]:`Passwort`,[X.DECISION_STRATEGY]:`Entscheidungsstrategie`,[X.HASHED]:`Gehasht`,[X.URL]:`URL`,[X.CLIENT_SCOPES]:`Client-Bereiche`,[X.START]:`Start`,[X.END]:`Ende`,[X.INTERVAL]:`Intervall`,[X.DAY_OF_WEEK]:`Wochentag`,[X.DAY_OF_MONTH]:`Tag des Monats`,[X.DAY_OF_YEAR]:`Tag des Jahres`,[X.VALUE_IS_REGEX]:`Ist der Wert ein Regex-Muster?`,[X.CODE]:`Code`,[X.NAMES]:`Namen`,[X.PASSWORD_REPEAT]:`Passwort wiederholen`,[X.ID]:`ID`,[X.TYPE]:`Typ`,[X.TYPES]:`Typen`,[X.INVERT]:`Invertieren?`,[X.ENABLED]:`Aktiviert?`,[X.CHILDREN]:`Untergeordnete`,[X.CREATED_AT]:`Erstellt am`,[X.UPDATED_AT]:`Aktualisiert am`,[X.SEEN_AT]:`Zuletzt gesehen`,[X.EXPIRES_AT]:`Läuft ab am`,[X.IP_ADDRESS]:`IP-Adresse`,[X.USER_AGENT]:`User-Agent`,[X.AUTH_METHOD]:`Anmeldemethode`,[X.KIND]:`Art`,[X.SUBJECT]:`Subjekt`,[X.REFRESHED_AT]:`Erneuert am`,[X.MFA_AT]:`MFA bestätigt am`,[X.PROTOCOL]:`Protokoll`,[X.PROTOCOLS]:`Protokolle`,[X.PRESET]:`Voreinstellung`,[X.PRESETS]:`Voreinstellungen`,[X.TIMEOUT]:`Timeout`,[X.START_TLS]:`StartTLS`,[X.BASE_DN]:`Base DN`,[X.FILTER]:`Filter`,[X.CLASS]:`Klasse`,[X.NAME_ATTRIBUTE]:`Name-Attribut`,[X.MAIL_ATTRIBUTE]:`Mail-Attribut`,[X.DISPLAY_NAME_ATTRIBUTE]:`Anzeigename-Attribut`,[X.MEMBER_ATTRIBUTE]:`Mitglied-Attribut`,[X.MEMBER_USER_ATTRIBUTE]:`Mitglied-Benutzer-Attribut`,[X.CLIENT_ID]:`Client-ID`,[X.CLIENT_SECRET]:`Client-Secret`,[X.SCOPE]:`Scope`,[X.TOKEN]:`Token`,[X.USER_INFO]:`UserInfo`,[X.DISCOVERY]:`Discovery`,[X.REDIRECT_URL]:`Weiterleitungs-URL`,[X.ACCESS_POLICY]:`Zugriffsrichtlinie`,[X.ACTOR]:`Akteur`,[X.REF]:`Referenz`,[X.PATH]:`Pfad`,[X.METHOD]:`Methode`,[X.USE]:`Verwendung`,[X.STATUS]:`Status`,[X.PRIORITY]:`Priorität`,[X.SIGNATURE_ALGORITHM]:`Signaturalgorithmus`,[X.CERTIFICATE]:`Zertifikat`},tO={[LD.CODE]:`Code`,[LD.REGISTRATION_ACTIVATION_SUBJECT]:`Konto aktivieren`,[LD.REGISTRATION_ACTIVATION_INTRO]:`Verwende den folgenden Code, um dein Konto zu aktivieren und die Plattform zu nutzen.`,[LD.REGISTRATION_ACTIVATION_ACTION]:`Konto aktivieren`,[LD.REGISTRATION_ACTIVATION_HINT]:`Wenn du kein Konto erstellt hast, kannst du diese E-Mail ignorieren.`,[LD.PASSWORD_RESET_SUBJECT]:`Passwort zurücksetzen`,[LD.PASSWORD_RESET_INTRO]:`Verwende den folgenden Code, um dein Kontopasswort zurückzusetzen.`,[LD.PASSWORD_RESET_ACTION]:`Passwort zurücksetzen`,[LD.PASSWORD_RESET_EXPIRY]:`Der Code läuft in {{minutes}} Minuten ab.`,[LD.PASSWORD_RESET_HINT]:`Wenn du keine Zurücksetzung angefordert hast, kannst du diese E-Mail ignorieren – dein Passwort bleibt unverändert.`,[LD.MFA_EMAIL_OTP_SUBJECT]:`Dein Bestätigungscode`,[LD.MFA_EMAIL_OTP_INTRO]:`Verwende den folgenden Code, um deine Anmeldung abzuschließen.`,[LD.MFA_EMAIL_OTP_EXPIRY]:`Der Code läuft in {{minutes}} Minuten ab.`,[LD.MFA_EMAIL_OTP_HINT]:`Wenn du dich nicht anmelden wolltest, kannst du diese E-Mail ignorieren.`},nO={[ID.NO_MORE]:`Keine weiteren {{name}} verfügbar`},rO={[Z.ADD]:`Ajouter`,[Z.CREATE]:`Créer`,[Z.DELETE]:`Supprimer`,[Z.GENERATE]:`Générer`,[Z.UPDATE]:`Mettre à jour`,[Z.AUTHORIZE]:`Autoriser`,[Z.ABORT]:`Annuler`,[Z.LOGIN]:`Connexion`,[Z.REGISTER]:`S'inscrire`,[Z.ACTIVATE]:`Activer`,[Z.RESET]:`Réinitialiser`,[Z.SEND]:`Envoyer`,[Z.BACK]:`Retour`,[Z.CLOSE]:`Fermer`,[Z.LOOKUP]:`Rechercher`,[Z.SHOW]:`Afficher`,[Z.HIDE]:`Masquer`,[Z.REMOVE]:`Retirer`},iO={[Y.HOME]:`Accueil`,[Y.RESOURCES]:`Ressources`,[Y.GENERAL]:`Général`,[Y.OTHER]:`Autre`,[Y.SETTINGS]:`Paramètres`,[Y.LOGOUT]:`Déconnexion`,[Y.ACCOUNT]:`Compte`,[Y.MANAGE_ACCOUNT]:`Gérer le compte`,[Y.SECURITY]:`Sécurité`,[Y.MANAGEMENT]:`Gestion`,[Y.DETAILS]:`Détails`,[Y.REALM_DESCRIPTION]:`Domaines isolés, chacun avec ses propres utilisateurs, clients et clés.`,[Y.CLIENT_DESCRIPTION]:`Applications qui s'authentifient auprès d'Authup.`,[Y.SCOPE_DESCRIPTION]:`Portées qu'un client peut demander lors d'une demande d'accès.`,[Y.IDENTITY_PROVIDER_DESCRIPTION]:`Fournisseurs externes permettant aux utilisateurs de se connecter.`,[Y.KEY_DESCRIPTION]:`Clés de signature et de chiffrement, un magasin par domaine.`,[Y.TRUST_ANCHOR_DESCRIPTION]:`Certificats CA de confiance pour l'authentification par certificat client.`,[Y.USER_DESCRIPTION]:`Comptes qui se connectent aux applications.`,[Y.ROLE_DESCRIPTION]:`Ensembles nommés de permissions, attribués aux utilisateurs et aux clients.`,[Y.PERMISSION_DESCRIPTION]:`Capacités individuelles pouvant être accordées à une identité.`,[Y.POLICY_DESCRIPTION]:`Règles qui déterminent quand une permission s'applique.`,[Y.EVENT_DESCRIPTION]:`Journal d'audit inaltérable des activités liées à la sécurité.`,[Y.SESSION_DESCRIPTION]:`Connexions actives, avec les appareils et jetons associés.`,[Y.SET_MANAGEMENT_REALM]:`Définir comme realm de gestion`,[Y.API_DOCS]:`Documentation API`,[Y.MADE_WITH]:`Fait avec`,[Y.LOGIN_TITLE]:`Connexion`,[Y.LOGIN_SUBTITLE]:`Sélectionnez un realm pour continuer`,[Y.URL_GENERATOR]:`Générateur d'URL`,[Y.URL_GENERATOR_HINT]:`Générez une URL d'autorisation en choisissant les portées dont elle a besoin pour fonctionner.`,[Y.REDIRECT_URL]:`URL de redirection`,[Y.GENERATED_URL]:`URL générée`,[Y.TOGGLE_NAVIGATION]:`Basculer la navigation`,[Y.SESSION_RENEW]:`La session sera renouvelée dans {countdown}.`,[Y.MINUTES]:`minute(s)`,[Y.SECONDS]:`seconde(s)`,[Y.ENTITY_CREATED]:`{{entity}} a été créé avec succès.`,[Y.ENTITY_UPDATED]:`{{entity}} a été mis à jour avec succès.`,[Y.ENTITY_DELETED]:`{{entity}} « {{name}} » a été supprimé avec succès.`,[Y.ACCOUNT_UPDATED]:`Le compte a été mis à jour avec succès.`,[Y.DELETE_CONFIRM_TITLE]:`Supprimer {{entity}} ?`,[Y.DELETE_CONFIRM_DESCRIPTION]:`Cette action est irréversible.`,[Y.REMOVE_CONFIRM_TITLE]:`Confirmer le retrait`,[Y.REMOVE_CONFIRM_DESCRIPTION]:`Voulez-vous vraiment retirer cette attribution ? Vous pourrez la réattribuer à tout moment.`,[Y.SESSION_REVOKE_OTHERS]:`Déconnecter les autres appareils`,[Y.SESSION_REVOKE_OTHERS_CONFIRM_TITLE]:`Déconnecter les autres appareils ?`,[Y.SESSION_REVOKE_OTHERS_CONFIRM_DESCRIPTION]:`Cela déconnecte toutes vos autres sessions. Votre session actuelle reste active.`,[Y.SESSION_REVOKE_OTHERS_SUCCESS]:`{{amount}} autre(s) session(s) déconnectée(s).`,[Y.SESSION_REVOKE_ALL]:`Déconnecter partout`,[Y.SESSION_REVOKE_ALL_CONFIRM_TITLE]:`Déconnecter cet utilisateur partout ?`,[Y.SESSION_REVOKE_ALL_CONFIRM_DESCRIPTION]:`Cela révoque toutes les sessions de cet utilisateur sur tous les appareils.`,[Y.SESSION_REVOKE_ALL_SUCCESS]:`{{amount}} session(s) déconnectée(s).`,[Y.SESSION_CURRENT]:`Cet appareil`,[Y.SESSION_TOKEN_STATUS_ACTIVE]:`Actif`,[Y.SESSION_TOKEN_STATUS_CONSUMED]:`Consommé`,[Y.SESSION_TOKEN_STATUS_REVOKED]:`Révoqué`,[Y.SESSION_TOKEN_STATUS_EXPIRED]:`Expiré`,[Y.AUTHENTICATOR]:`Authentificateurs`,[Y.MFA_SECURITY_TITLE]:`Authentification à deux facteurs`,[Y.MFA_SECURITY_HINT]:`Ajoutez une couche de sécurité avec une application d'authentification ou des codes de récupération.`,[Y.APPLICATIONS]:`Applications`,[Y.CONSENT_EMPTY]:`Vous n'avez encore accordé l'accès à aucune application.`,[Y.CONSENT_REVOKE]:`Révoquer`,[Y.CONSENT_REVOKE_ALL]:`Révoquer l'accès`,[Y.CONSENT_REVOKE_ALL_SUCCESS]:`L'accès de l'application a été révoqué.`,[Y.CONSENT_REVOKE_ALL_TITLE]:`Révoquer l'accès de l'application`,[Y.CONSENT_REVOKE_ALL_DESCRIPTION]:`L'application demandera à nouveau votre consentement lors de la prochaine connexion.`,[Y.CONSENT_SCOPES]:`Permissions accordées`,[Y.CONNECTED_ACCOUNTS]:`Comptes liés`,[Y.CONNECTED_ACCOUNTS_NONE]:`Aucun fournisseur d'identité n'est configuré.`,[Y.IDENTITY_PROVIDER_CONNECT]:`Connecter`,[Y.IDENTITY_PROVIDER_CONNECTED_AS]:`Connecté en tant que {{name}}`,[Y.IDENTITY_PROVIDER_DISCONNECT]:`Déconnecter`,[Y.IDENTITY_PROVIDER_DISCONNECT_CONFIRM_TITLE]:`Déconnecter le compte ?`,[Y.IDENTITY_PROVIDER_DISCONNECT_CONFIRM_DESCRIPTION]:`La connexion via ce fournisseur ne fonctionnera plus pour ce compte.`,[Y.IDENTITY_PROVIDER_LINK_SUCCESS]:`Le compte a été connecté.`,[Y.IDENTITY_PROVIDER_LINK_FAILED]:`Le compte n'a pas pu être connecté.`,[Y.KEY_DELETE_FORCE_CONFIRM_TITLE]:`Détruire la clé de chiffrement ?`,[Y.KEY_DELETE_FORCE_CONFIRM_DESCRIPTION]:`Cette clé est encore référencée par {{count}} secret(s) chiffré(s). Sa suppression les rendra définitivement irrécupérables.`,[Y.BACK_TO_APP]:`Retour vers {{host}}`},aO={[J.NAME_HINT]:`Quelque chose que les utilisateurs reconnaîtront et auquel ils feront confiance`,[J.DESCRIPTION_HINT]:`Affiché à tous les utilisateurs de cette application`,[J.REDIRECT_URI_HINT]:`Modèle d'URI vers lequel un navigateur peut rediriger après une connexion réussie`,[J.POST_LOGOUT_REDIRECT_URI_HINT]:`Modèle d’URI vers lequel une déconnexion initiée par le RP peut rediriger. Distinct des URI de redirection de connexion. Sans entrée, la déconnexion se termine toujours sur la page de confirmation.`,[J.GRANT_TYPES_HINT]:`Restreint les types d’autorisation OAuth2 que ce client peut utiliser. Sans sélection, tous sont autorisés.`,[J.AUTH_METHOD]:`Méthode d’authentification`,[J.AUTH_METHOD_NONE]:`Aucune`,[J.AUTH_METHOD_SECRET]:`Secret partagé`,[J.AUTH_METHOD_TLS]:`Certificat TLS`,[J.TOKEN_BINDING_METHOD]:`Liaison du jeton`,[J.TOKEN_BINDING_METHOD_NONE]:`Désactivée`,[J.TOKEN_BINDING_METHOD_TLS]:`Certificat TLS`,[J.CLIENT_CERTIFICATE_URI]:`URI client du certificat`,[J.CLIENT_CERTIFICATE_URI_HINT]:`Le certificat doit contenir exactement une fois ce SAN URI.`,[J.IS_ACTIVE]:`Est actif ?`,[J.HASH_SECRET]:`Hacher le secret ?`,[J.LOGIN_FAILED]:`L'opération de connexion a échoué`,[J.SCOPE_GRANT_INTRO]:`Cela permettra à l'application {client} de`,[J.ONCE_AUTHORIZED_REDIRECT]:`Une fois autorisé, vous serez redirigé vers {target}.`,[J.GOVERNED_BY]:`Cette application est régie par la {privacyPolicy} et les {termsOfService} de l'application {{client}}.`,[J.ACTIVE_SINCE]:`Actif depuis`,[J.VIEW_POLICY_DETAILS]:`Voir les détails de la politique`,[J.CREATE_ACCOUNT]:`Créer un compte`,[J.FORGOT_PASSWORD]:`Mot de passe oublié ?`,[J.RESET_PASSWORD]:`Réinitialiser le mot de passe`,[J.ACTIVATE_ACCOUNT]:`Activer le compte`,[J.BACK_TO_LOGIN]:`Retour à la connexion`,[J.EMAIL_OR_NAME]:`E-mail ou nom`,[J.CHECK_EMAIL_ACTIVATE]:`Consultez vos e-mails pour obtenir le code d'activation.`,[J.CHECK_EMAIL_RESET]:`Consultez vos e-mails pour obtenir le code de réinitialisation.`,[J.ACCOUNT_ACTIVATED]:`Le compte a été activé avec succès.`,[J.PASSWORD_RESET_DONE]:`Le mot de passe a été réinitialisé avec succès.`,[J.WORKFLOW_DISABLED]:`Cette fonctionnalité n'est pas activée.`,[J.PRIVACY_POLICY]:`politique de confidentialité`,[J.TERMS_OF_SERVICE]:`conditions d'utilisation`,[J.POLICY_TYPE_COMPOSITE]:`Composite`,[J.POLICY_TYPE_DATE]:`Date`,[J.POLICY_TYPE_TIME]:`Heure`,[J.POLICY_TYPE_ATTRIBUTE_NAMES]:`Noms d'attributs`,[J.POLICY_TYPE_ATTRIBUTES]:`Attributs`,[J.POLICY_TYPE_REALM_MATCH]:`Correspondance de realm`,[J.POLICY_TYPE_IDENTITY]:`Identité`,[J.POLICY_TYPE_PERMISSION_BINDING]:`Liaison de permission`,[J.DECISION_STRATEGY_HINT_UNANIMOUS]:`Toutes les politiques doivent être évaluées positivement.`,[J.DECISION_STRATEGY_HINT_AFFIRMATIVE]:`Au moins une politique doit être évaluée positivement.`,[J.DECISION_STRATEGY_HINT_CONSENSUS]:`Plus de politiques doivent être évaluées positivement que négativement.`,[J.DECISION_STRATEGY_HINT_DEFAULT]:`Aucune stratégie sélectionnée. Par défaut : unanime (toutes les politiques doivent être évaluées positivement).`,[J.OPTION_NONE_UNANIMOUS]:`-- Aucune (défaut : unanime) --`,[J.REALM_MATCH_STRICT_HINT]:`Ne correspondre que si l'attribut est strictement égal au nom ?`,[J.REALM_MATCH_NULL_MATCH_ALL_HINT]:`Détermine si les ressources dont la valeur realm-id/nom est nulle correspondent à tous les realms d'identité.{br}Si activé, tout realm d'identité peut accéder aux ressources dont les valeurs realm-id/nom sont nulles.`,[J.ENABLE_STARTTLS_HINT]:`Activer le processus StartTLS ?`,[J.PASSWORD_MUST_MATCH]:`Doit correspondre au mot de passe.`,[J.LOOKUP_FAILED]:`La recherche a échoué avec : {{message}}`,[J.PROTOCOL_NOT_SUPPORTED]:`{{name}} n'est pas encore pris en charge.`,[J.JUNCTION_POLICY]:`Politique de liaison`,[J.JUNCTION_REALM_SCOPE]:`Portée du domaine`,[J.REALM_SCOPE_NONE]:`Aucune`,[J.REALM_SCOPE_NONE_HINT]:`Aucune portée. Ne correspond à aucun domaine ; une attribution désactivée.`,[J.REALM_SCOPE_OWN]:`Domaine propre`,[J.REALM_SCOPE_OWN_HINT]:`N'agit que sur le domaine propre du titulaire.`,[J.REALM_SCOPE_OWN_OR_NULL]:`Propre + global`,[J.REALM_SCOPE_OWN_OR_NULL_HINT]:`Domaine propre ainsi que les ressources globales (sans domaine).`,[J.REALM_SCOPE_ANY]:`Tout domaine`,[J.REALM_SCOPE_ANY_HINT]:`Agit sur tous les domaines, y compris global. Portée de niveau administrateur.`,[J.SELECTION_UPDATING]:`Mise à jour de la sélection`,[J.SELECTION_REMOVE]:`Retirer de la sélection`,[J.SELECTION_ADD]:`Ajouter à la sélection`,[J.REALM_MISMATCH_TITLE]:`Connectez-vous avec un autre compte`,[J.REALM_MISMATCH_TEXT]:`{{client}} appartient au realm {{realm}}, mais vous êtes connecté à un autre realm. Connectez-vous avec un compte {{realm}} pour continuer.`,[J.SIGN_IN_TO_REALM]:`Se connecter à {{realm}}`,[J.RETURN_TO_APP]:`Retour à l'application`,[J.REAUTH_TEXT]:`Veuillez vous reconnecter pour continuer.`,[J.SELECT_ACCOUNT_TITLE]:`Choisir un compte`,[J.CONTINUE_AS]:`Continuer en tant que {{name}}`,[J.USE_ANOTHER_ACCOUNT]:`Utiliser un autre compte`,[J.SIGNED_IN_AS]:`Connecté en tant que {{name}}`,[J.NOT_YOU]:`Pas vous ?`,[J.AUTHORIZE_ABORTED]:`La demande d'autorisation a été refusée. Un retour automatique vers l'application n'est pas possible. Vous pouvez fermer cette fenêtre.`,[J.ACCESS_DENIED_TITLE]:`Accès refusé`,[J.ACCESS_DENIED_TEXT]:`Vous n'êtes pas autorisé à accéder à cette application.`,[J.CLIENT_ACCESS_POLICY_HINT]:`Sans politique, toute identité du domaine peut se connecter.`,[J.CONSENT_STATUS_LOADING]:`Vérification des permissions accordées…`,[J.LOGOUT_CONFIRM_TITLE]:`Se déconnecter`,[J.LOGOUT_CONFIRM_TEXT]:`Voulez-vous vous déconnecter ?`,[J.LOGOUT_DONE]:`Vous avez été déconnecté.`,[J.SIGN_OUT]:`Se déconnecter`,[J.ACCOUNT_SIGN_IN_INTRO]:`Connectez-vous pour gérer votre compte.`,[J.MFA_TITLE]:`Authentification à deux facteurs`,[J.MFA_CHALLENGE_INTRO]:`Saisissez le code de votre application d'authentification pour continuer.`,[J.MFA_CODE]:`Code de vérification`,[J.MFA_CODE_HINT]:`Le code à 6 chiffres de votre application d'authentification.`,[J.MFA_VERIFY]:`Vérifier`,[J.MFA_USE_RECOVERY]:`Utiliser un code de récupération`,[J.MFA_USE_AUTHENTICATOR]:`Utiliser votre application d'authentification`,[J.MFA_RECOVERY_CODE]:`Code de récupération`,[J.MFA_FAILED]:`Le code de vérification n'est pas valide.`,[J.MFA_SETUP_REQUIRED]:`Configurez l'authentification à deux facteurs pour continuer.`,[J.MFA_ENROLL_TITLE]:`Ajouter un deuxième facteur`,[J.MFA_ENROLL_TOTP]:`Application d'authentification`,[J.MFA_ENROLL_RECOVERY]:`Codes de récupération`,[J.MFA_SCAN_QR]:`Scannez ce QR code avec votre application d'authentification.`,[J.MFA_MANUAL_KEY]:`Ou saisissez cette clé manuellement :`,[J.MFA_CONFIRM_INTRO]:`Saisissez le code généré pour confirmer la configuration.`,[J.MFA_CONFIRM]:`Confirmer`,[J.MFA_RECOVERY_INTRO]:`Conservez ces codes en lieu sûr. Chaque code est utilisable une fois.`,[J.MFA_RECOVERY_SAVE]:`Vous ne pourrez plus revoir ces codes.`,[J.MFA_DOWNLOAD]:`Télécharger`,[J.MFA_ENROLLED]:`Le deuxième facteur a été ajouté.`,[J.MFA_DEVICE_NAME]:`Nom de l'appareil`,[J.MFA_NO_DEVICES]:`Aucun appareil d'authentification n'a encore été ajouté.`,[J.MFA_DEVICE_UNCONFIRMED]:`non confirmé`,[J.MFA_RECOVERY_NUDGE]:`Ajoutez des codes de récupération de secours afin de pouvoir vous connecter même si vous perdez l'accès à ce deuxième facteur.`,[J.MFA_RECOVERY_NUDGE_GENERATE]:`Générer des codes de récupération`,[J.MFA_RECOVERY_NUDGE_SKIP]:`Ignorer pour l'instant`,[J.MFA_USE_EMAIL]:`Utiliser un code par e-mail`,[J.MFA_SEND_CODE]:`Envoyer le code`,[J.MFA_CODE_SENT]:`Un code a été envoyé à votre adresse e-mail.`,[J.MFA_ENROLL_EMAIL]:`Code par e-mail`,[J.MFA_USE_PASSKEY]:`Utiliser une clé d'accès`,[J.MFA_PASSKEY_PROMPT]:`Utilisez votre clé d'accès ou votre clé de sécurité pour continuer.`,[J.MFA_ENROLL_WEBAUTHN]:`Clé d'accès / clé de sécurité`,[J.KEY_USE_SIGNATURE]:`Signature (sig)`,[J.KEY_USE_ENCRYPTION]:`Chiffrement (enc)`,[J.KEY_IMPORT_MATERIAL]:`Importer du matériel de clé existant`,[J.KEY_MATERIAL_OCT]:`Matériel de clé (32 octets, base64)`,[J.KEY_MATERIAL_PRIVATE]:`Clé privée (PKCS#8, base64 ou PEM)`,[J.KEY_MATERIAL_PUBLIC]:`Clé publique (SPKI, base64 ou PEM)`},oO={[Q.GENERAL]:`Général`,[Q.OVERVIEW]:`Aperçu`,[Q.ALL]:`Tous`,[Q.LOADING]:`Chargement...`,[Q.ACTIVE]:`Actif`,[Q.INACTIVE]:`Inactif`,[Q.LOCKED]:`Verrouillé`,[Q.NOT_LOCKED]:`Non verrouillé`,[Q.APPLICATION]:`Application`,[Q.SEARCH]:`Rechercher`,[Q.NO_RESULTS]:`Aucun résultat trouvé.`,[Q.SWITCH_TO_LIGHT_MODE]:`Passer en mode clair`,[Q.SWITCH_TO_DARK_MODE]:`Passer en mode sombre`,[Q.YES]:`Oui`,[Q.BUILT_IN]:`Intégré`,[Q.GLOBAL]:`Global`,[Q.INVERTED]:`Inversé`,[Q.CONFIDENTIAL]:`Confidentiel`,[Q.BASIC]:`Base`,[Q.SECURITY]:`Sécurité`,[Q.CONNECTION]:`Connexion`,[Q.ENDPOINTS]:`Points de terminaison`,[Q.DETAILS]:`Détails`,[Q.GROUP]:`Groupe`,[Q.NO_ITEMS]:`La liste ne contient encore aucun élément.`,[Q.PROCESSING]:`Traitement en cours`,[Q.REQUEST]:`Requête`,[Q.DATA]:`Données`,[Q.BREADCRUMB]:`Fil d'Ariane`},sO={[RD.CLIENT]:eD({one:`Client`,other:`Clients`}),[RD.CONSENT]:eD({one:`Consentement`,other:`Consentements`}),[RD.EVENT]:eD({one:`Événement`,other:`Événements`}),[RD.IDENTITY_PROVIDER]:eD({one:`Fournisseur d'identité`,other:`Fournisseurs d'identité`}),[RD.IDENTITY_PROVIDER_ACCOUNT]:eD({one:`Compte lié`,other:`Comptes liés`}),[RD.KEY]:eD({one:`Clé`,other:`Clés`}),[RD.PERMISSION]:eD({one:`Permission`,other:`Permissions`}),[RD.POLICY]:eD({one:`Politique`,other:`Politiques`}),[RD.REALM]:eD({one:`Domaine`,other:`Domaines`}),[RD.ROLE]:eD({one:`Rôle`,other:`Rôles`}),[RD.SCOPE]:eD({one:`Portée`,other:`Portées`}),[RD.SESSION]:eD({one:`Session`,other:`Sessions`}),[RD.SESSION_TOKEN]:eD({one:`Jeton de session`,other:`Jetons de session`}),[RD.TRUST_ANCHOR]:eD({one:`Autorité de certification approuvée`,other:`Autorités de certification approuvées`}),[RD.USER]:eD({one:`Utilisateur`,other:`Utilisateurs`})},cO={[H.BAD_REQUEST]:`La requête n'a pas pu être traitée.`,[H.INTERNAL_ERROR]:`Une erreur inattendue est survenue. Veuillez réessayer plus tard.`,[H.UPSTREAM_ERROR]:`Un service requis n'a pas répondu correctement. Veuillez réessayer plus tard.`,[H.HTTP_HEADER_AUTH_TYPE_UNSUPPORTED]:`Le type d'en-tête d'autorisation n'est pas pris en charge.`,[H.HTTP_BEARER_TOKEN_MALFORMED]:`Le jeton bearer est mal formé.`,[H.IDENTITY_UNAUTHORIZED]:`Vous n'êtes pas authentifié.`,[H.ENTITY_CREDENTIALS_INVALID]:`Les identifiants fournis sont invalides.`,[H.ENTITY_INACTIVE]:`L'entité est inactive.`,[H.ENTITY_NOT_FOUND]:`L'entité demandée est introuvable.`,[H.ENTITY_CONFLICT]:`Une entité avec ces détails existe déjà.`,[H.ENTITY_RELATION_INVALID]:`Une relation référencée est invalide.`,[H.REGISTRATION_DISABLED]:`L'inscription est actuellement désactivée.`,[H.PASSWORD_RECOVERY_DISABLED]:`La récupération de mot de passe est actuellement désactivée.`,[H.EMAIL_VERIFICATION_REQUIRED]:`Votre adresse e-mail doit d'abord être vérifiée.`,[H.RESET_TOKEN_EXPIRED]:`Le jeton de réinitialisation a expiré. Veuillez en demander un nouveau.`,[H.LOGIN_ATTEMPT_THROTTLED]:`Trop de tentatives de connexion échouées. Veuillez réessayer plus tard.`,[H.MFA_ATTEMPT_THROTTLED]:`Trop de tentatives de vérification échouées. Veuillez réessayer plus tard.`,[H.MFA_NOT_CONFIGURABLE]:`L'authentification multifacteur n'est pas disponible sur ce serveur.`,[H.IDENTITY_PROVIDER_ACCOUNT_ALREADY_LINKED]:`Ce compte externe est déjà lié à un autre utilisateur.`,[H.IDENTITY_PROVIDER_ACCOUNT_UNLINK_BLOCKED]:`C'est le dernier moyen de connexion de ce compte. Définissez un mot de passe avant de le déconnecter.`,[H.STORAGE_INSUFFICIENT]:`L'espace de stockage disponible est insuffisant pour effectuer cette action.`,[H.JWK_INVALID]:`La clé web JSON est invalide.`,[H.JWK_NOT_FOUND]:`La clé web JSON est introuvable.`,[H.JWT_INVALID]:`Le jeton est invalide.`,[H.JWT_INACTIVE]:`Le jeton n'est pas encore actif.`,[H.JWT_EXPIRED]:`Le jeton a expiré. Veuillez vous reconnecter.`,[H.OAUTH_REDIRECT_URI_MISMATCH]:`L'URI de redirection ne correspond pas.`,[H.OAUTH_CLIENT_INVALID]:`Le client est invalide.`,[H.OAUTH_CLIENT_UNAUTHORIZED]:`Le client n'est pas autorisé à utiliser ce type d'autorisation.`,[H.OAUTH_GRANT_INVALID]:`L'autorisation d'accès est invalide.`,[H.OAUTH_GRANT_TYPE_UNSUPPORTED]:`Le type d'autorisation n'est pas pris en charge.`,[H.OAUTH_REQUEST_INVALID]:`La requête est invalide.`,[H.OAUTH_LOGIN_REQUIRED]:`Vous devez vous connecter pour continuer.`,[H.OAUTH_MFA_REQUIRED]:`Un second facteur est requis pour continuer.`,[H.OAUTH_ACCESS_DENIED]:`Vous n'êtes pas autorisé à accéder à cette application.`,[H.OAUTH_INTERACTION_REQUIRED]:`Une interaction est requise pour continuer.`,[H.OAUTH_ACCOUNT_SELECTION_REQUIRED]:`Veuillez sélectionner un compte pour continuer.`,[H.OAUTH_CONSENT_REQUIRED]:`Votre consentement est requis pour continuer.`,[H.OAUTH_RESPONSE_TYPE_UNSUPPORTED]:`Le type de réponse n'est pas pris en charge.`,[H.OAUTH_SCOPE_INVALID]:`La portée demandée est invalide.`,[H.OAUTH_SCOPE_INSUFFICIENT]:`La portée accordée est insuffisante pour cette action.`,[H.PERMISSION_NOT_FOUND]:`La permission est introuvable.`,[H.PERMISSION_DENIED]:`Vous n'avez pas la permission d'effectuer cette action.`,[H.PERMISSION_EVALUATION_FAILED]:`La permission n'a pas pu être évaluée.`,[H.POLICY_EVALUATOR_NOT_FOUND]:`Aucun évaluateur n'a été trouvé pour cette politique.`,[H.POLICY_EVALUATOR_NOT_PROCESSABLE]:`Cette politique n'a pas pu être traitée.`,[H.POLICY_EVALUATOR_CONTEXT_INVALID]:`Le contexte d'évaluation de la politique est invalide.`},lO={[X.NAME]:`Nom`,[X.DISPLAY_NAME]:`Nom d'affichage`,[X.EMAIL]:`E-mail`,[X.EXTERNAL_ID]:`ID externe`,[X.DESCRIPTION]:`Description`,[X.SECRET]:`Secret`,[X.REDIRECT_URIS]:`URI(s) de redirection`,[X.POST_LOGOUT_REDIRECT_URIS]:`URI(s) de redirection après déconnexion`,[X.GRANT_TYPES]:`Types d’autorisation`,[X.PASSWORD]:`Mot de passe`,[X.DECISION_STRATEGY]:`Stratégie de décision`,[X.HASHED]:`Haché`,[X.URL]:`URL`,[X.CLIENT_SCOPES]:`Portées du client`,[X.START]:`Début`,[X.END]:`Fin`,[X.INTERVAL]:`Intervalle`,[X.DAY_OF_WEEK]:`Jour de la semaine`,[X.DAY_OF_MONTH]:`Jour du mois`,[X.DAY_OF_YEAR]:`Jour de l'année`,[X.VALUE_IS_REGEX]:`La valeur est-elle un motif regex ?`,[X.CODE]:`Code`,[X.NAMES]:`Noms`,[X.PASSWORD_REPEAT]:`Répéter le mot de passe`,[X.ID]:`ID`,[X.TYPE]:`Type`,[X.TYPES]:`Types`,[X.INVERT]:`Inverser ?`,[X.ENABLED]:`Activé ?`,[X.CHILDREN]:`Enfants`,[X.CREATED_AT]:`Créé le`,[X.UPDATED_AT]:`Mis à jour le`,[X.SEEN_AT]:`Vu pour la dernière fois`,[X.EXPIRES_AT]:`Expire le`,[X.IP_ADDRESS]:`Adresse IP`,[X.USER_AGENT]:`Agent utilisateur`,[X.AUTH_METHOD]:`Méthode d'authentification`,[X.KIND]:`Type`,[X.SUBJECT]:`Sujet`,[X.REFRESHED_AT]:`Renouvelé le`,[X.MFA_AT]:`MFA vérifiée le`,[X.PROTOCOL]:`Protocole`,[X.PROTOCOLS]:`Protocoles`,[X.PRESET]:`Préréglage`,[X.PRESETS]:`Préréglages`,[X.TIMEOUT]:`Délai d'attente`,[X.START_TLS]:`StartTLS`,[X.BASE_DN]:`DN de base`,[X.FILTER]:`Filtre`,[X.CLASS]:`Classe`,[X.NAME_ATTRIBUTE]:`Attribut de nom`,[X.MAIL_ATTRIBUTE]:`Attribut d'e-mail`,[X.DISPLAY_NAME_ATTRIBUTE]:`Attribut du nom d'affichage`,[X.MEMBER_ATTRIBUTE]:`Attribut de membre`,[X.MEMBER_USER_ATTRIBUTE]:`Attribut d'utilisateur membre`,[X.CLIENT_ID]:`ID client`,[X.CLIENT_SECRET]:`Secret du client`,[X.SCOPE]:`Portée`,[X.TOKEN]:`Jeton`,[X.USER_INFO]:`UserInfo`,[X.DISCOVERY]:`Découverte`,[X.REDIRECT_URL]:`URL de redirection`,[X.ACCESS_POLICY]:`Politique d'accès`,[X.ACTOR]:`Acteur`,[X.REF]:`Référence`,[X.PATH]:`Chemin`,[X.METHOD]:`Méthode`,[X.USE]:`Utilisation`,[X.STATUS]:`Statut`,[X.PRIORITY]:`Priorité`,[X.SIGNATURE_ALGORITHM]:`Algorithme de signature`,[X.CERTIFICATE]:`Certificat`},uO={[LD.CODE]:`Code`,[LD.REGISTRATION_ACTIVATION_SUBJECT]:`Activez votre compte`,[LD.REGISTRATION_ACTIVATION_INTRO]:`Utilisez le code ci-dessous pour activer votre compte et commencer à utiliser la plateforme.`,[LD.REGISTRATION_ACTIVATION_ACTION]:`Activer le compte`,[LD.REGISTRATION_ACTIVATION_HINT]:`Si vous n'avez pas créé de compte, vous pouvez ignorer cet e-mail.`,[LD.PASSWORD_RESET_SUBJECT]:`Réinitialisez votre mot de passe`,[LD.PASSWORD_RESET_INTRO]:`Utilisez le code ci-dessous pour réinitialiser le mot de passe de votre compte.`,[LD.PASSWORD_RESET_ACTION]:`Réinitialiser le mot de passe`,[LD.PASSWORD_RESET_EXPIRY]:`Le code expire dans {{minutes}} minutes.`,[LD.PASSWORD_RESET_HINT]:`Si vous n'avez pas demandé de réinitialisation, vous pouvez ignorer cet e-mail – votre mot de passe reste inchangé.`,[LD.MFA_EMAIL_OTP_SUBJECT]:`Votre code de vérification`,[LD.MFA_EMAIL_OTP_INTRO]:`Utilisez le code ci-dessous pour finaliser votre connexion.`,[LD.MFA_EMAIL_OTP_EXPIRY]:`Le code expire dans {{minutes}} minutes.`,[LD.MFA_EMAIL_OTP_HINT]:`Si vous n'avez pas tenté de vous connecter, vous pouvez ignorer cet e-mail.`},dO={[ID.NO_MORE]:`Plus aucun {{name}} disponible`},fO={[Z.ADD]:`Añadir`,[Z.CREATE]:`Crear`,[Z.DELETE]:`Eliminar`,[Z.GENERATE]:`Generar`,[Z.UPDATE]:`Actualizar`,[Z.AUTHORIZE]:`Autorizar`,[Z.ABORT]:`Cancelar`,[Z.LOGIN]:`Iniciar sesión`,[Z.REGISTER]:`Registrarse`,[Z.ACTIVATE]:`Activar`,[Z.RESET]:`Restablecer`,[Z.SEND]:`Enviar`,[Z.BACK]:`Atrás`,[Z.CLOSE]:`Cerrar`,[Z.LOOKUP]:`Buscar`,[Z.SHOW]:`Mostrar`,[Z.HIDE]:`Ocultar`,[Z.REMOVE]:`Quitar`},pO={[Y.HOME]:`Inicio`,[Y.RESOURCES]:`Recursos`,[Y.GENERAL]:`General`,[Y.OTHER]:`Otro`,[Y.SETTINGS]:`Ajustes`,[Y.LOGOUT]:`Cerrar sesión`,[Y.ACCOUNT]:`Cuenta`,[Y.MANAGE_ACCOUNT]:`Administrar la cuenta`,[Y.SECURITY]:`Seguridad`,[Y.MANAGEMENT]:`Gestión`,[Y.DETAILS]:`Detalles`,[Y.REALM_DESCRIPTION]:`Dominios aislados, cada uno con sus propios usuarios, clientes y claves.`,[Y.CLIENT_DESCRIPTION]:`Aplicaciones que se autentican ante Authup.`,[Y.SCOPE_DESCRIPTION]:`Ámbitos que un cliente puede solicitar al pedir acceso.`,[Y.IDENTITY_PROVIDER_DESCRIPTION]:`Proveedores externos con los que los usuarios pueden iniciar sesión.`,[Y.KEY_DESCRIPTION]:`Claves de firma y cifrado, un almacén por dominio.`,[Y.TRUST_ANCHOR_DESCRIPTION]:`Certificados de CA de confianza para la autenticación con certificado de cliente.`,[Y.USER_DESCRIPTION]:`Cuentas que inician sesión en las aplicaciones.`,[Y.ROLE_DESCRIPTION]:`Conjuntos con nombre de permisos, asignados a usuarios y clientes.`,[Y.PERMISSION_DESCRIPTION]:`Capacidades individuales que se pueden conceder a una identidad.`,[Y.POLICY_DESCRIPTION]:`Reglas que deciden cuándo se aplica un permiso.`,[Y.EVENT_DESCRIPTION]:`Registro de auditoría inalterable de la actividad de seguridad.`,[Y.SESSION_DESCRIPTION]:`Inicios de sesión activos, con los dispositivos y tokens asociados.`,[Y.SET_MANAGEMENT_REALM]:`Establecer como realm de gestión`,[Y.API_DOCS]:`Documentación de la API`,[Y.MADE_WITH]:`Hecho con`,[Y.LOGIN_TITLE]:`Iniciar sesión`,[Y.LOGIN_SUBTITLE]:`Selecciona un realm para continuar`,[Y.URL_GENERATOR]:`Generador de URL`,[Y.URL_GENERATOR_HINT]:`Genere una URL de autorización eligiendo los ámbitos que necesita para funcionar.`,[Y.REDIRECT_URL]:`URL de redirección`,[Y.GENERATED_URL]:`URL generada`,[Y.TOGGLE_NAVIGATION]:`Alternar navegación`,[Y.SESSION_RENEW]:`La sesión se renovará en {countdown}.`,[Y.MINUTES]:`minuto(s)`,[Y.SECONDS]:`segundo(s)`,[Y.ENTITY_CREATED]:`{{entity}} se creó correctamente.`,[Y.ENTITY_UPDATED]:`{{entity}} se actualizó correctamente.`,[Y.ENTITY_DELETED]:`{{entity}} «{{name}}» se eliminó correctamente.`,[Y.ACCOUNT_UPDATED]:`La cuenta se actualizó correctamente.`,[Y.DELETE_CONFIRM_TITLE]:`¿Eliminar {{entity}}?`,[Y.DELETE_CONFIRM_DESCRIPTION]:`Esta acción no se puede deshacer.`,[Y.REMOVE_CONFIRM_TITLE]:`Confirmar eliminación`,[Y.REMOVE_CONFIRM_DESCRIPTION]:`¿Seguro que quieres quitar esta asignación? Puedes volver a asignarla en cualquier momento.`,[Y.SESSION_REVOKE_OTHERS]:`Cerrar sesión en otros dispositivos`,[Y.SESSION_REVOKE_OTHERS_CONFIRM_TITLE]:`¿Cerrar sesión en otros dispositivos?`,[Y.SESSION_REVOKE_OTHERS_CONFIRM_DESCRIPTION]:`Esto cierra todas tus otras sesiones. Tu sesión actual permanece activa.`,[Y.SESSION_REVOKE_OTHERS_SUCCESS]:`{{amount}} otra(s) sesión(es) cerradas.`,[Y.SESSION_REVOKE_ALL]:`Cerrar sesión en todas partes`,[Y.SESSION_REVOKE_ALL_CONFIRM_TITLE]:`¿Cerrar la sesión de este usuario en todas partes?`,[Y.SESSION_REVOKE_ALL_CONFIRM_DESCRIPTION]:`Esto revoca todas las sesiones de este usuario en todos los dispositivos.`,[Y.SESSION_REVOKE_ALL_SUCCESS]:`{{amount}} sesión(es) cerradas.`,[Y.SESSION_CURRENT]:`Este dispositivo`,[Y.SESSION_TOKEN_STATUS_ACTIVE]:`Activo`,[Y.SESSION_TOKEN_STATUS_CONSUMED]:`Consumido`,[Y.SESSION_TOKEN_STATUS_REVOKED]:`Revocado`,[Y.SESSION_TOKEN_STATUS_EXPIRED]:`Expirado`,[Y.AUTHENTICATOR]:`Autenticadores`,[Y.MFA_SECURITY_TITLE]:`Autenticación de dos factores`,[Y.MFA_SECURITY_HINT]:`Añade una capa de seguridad adicional con una aplicación de autenticación o códigos de recuperación.`,[Y.APPLICATIONS]:`Aplicaciones`,[Y.CONSENT_EMPTY]:`Aún no has concedido acceso a ninguna aplicación.`,[Y.CONSENT_REVOKE]:`Revocar`,[Y.CONSENT_REVOKE_ALL]:`Revocar acceso`,[Y.CONSENT_REVOKE_ALL_SUCCESS]:`Se revocó el acceso de la aplicación.`,[Y.CONSENT_REVOKE_ALL_TITLE]:`Revocar el acceso de la aplicación`,[Y.CONSENT_REVOKE_ALL_DESCRIPTION]:`La aplicación volverá a pedir tu consentimiento en el próximo inicio de sesión.`,[Y.CONSENT_SCOPES]:`Permisos concedidos`,[Y.CONNECTED_ACCOUNTS]:`Cuentas vinculadas`,[Y.CONNECTED_ACCOUNTS_NONE]:`No hay proveedores de identidad configurados.`,[Y.IDENTITY_PROVIDER_CONNECT]:`Conectar`,[Y.IDENTITY_PROVIDER_CONNECTED_AS]:`Conectado como {{name}}`,[Y.IDENTITY_PROVIDER_DISCONNECT]:`Desconectar`,[Y.IDENTITY_PROVIDER_DISCONNECT_CONFIRM_TITLE]:`¿Desconectar la cuenta?`,[Y.IDENTITY_PROVIDER_DISCONNECT_CONFIRM_DESCRIPTION]:`Iniciar sesión con este proveedor dejará de funcionar para esta cuenta.`,[Y.IDENTITY_PROVIDER_LINK_SUCCESS]:`La cuenta fue conectada.`,[Y.IDENTITY_PROVIDER_LINK_FAILED]:`La cuenta no pudo ser conectada.`,[Y.KEY_DELETE_FORCE_CONFIRM_TITLE]:`¿Destruir la clave de cifrado?`,[Y.KEY_DELETE_FORCE_CONFIRM_DESCRIPTION]:`Esta clave todavía es referenciada por {{count}} secreto(s) cifrado(s). Eliminarla los hará permanentemente irrecuperables.`,[Y.BACK_TO_APP]:`Volver a {{host}}`},mO={[J.NAME_HINT]:`Algo que los usuarios reconocerán y en lo que confiarán`,[J.DESCRIPTION_HINT]:`Se muestra a todos los usuarios de esta aplicación`,[J.REDIRECT_URI_HINT]:`Patrón de URI al que un navegador puede redirigir tras un inicio de sesión exitoso`,[J.POST_LOGOUT_REDIRECT_URI_HINT]:`Patrón de URI al que puede redirigir un cierre de sesión iniciado por el RP. Independiente de las URI de redirección de inicio de sesión. Sin entradas, el cierre de sesión termina siempre en la página de confirmación.`,[J.GRANT_TYPES_HINT]:`Restringe qué concesiones OAuth2 puede usar este cliente. Sin selección, se permiten todas.`,[J.AUTH_METHOD]:`Método de autenticación`,[J.AUTH_METHOD_NONE]:`Ninguno`,[J.AUTH_METHOD_SECRET]:`Secreto compartido`,[J.AUTH_METHOD_TLS]:`Certificado TLS`,[J.TOKEN_BINDING_METHOD]:`Vinculación del token`,[J.TOKEN_BINDING_METHOD_NONE]:`Desactivada`,[J.TOKEN_BINDING_METHOD_TLS]:`Certificado TLS`,[J.CLIENT_CERTIFICATE_URI]:`URI de cliente del certificado`,[J.CLIENT_CERTIFICATE_URI_HINT]:`El certificado debe contener exactamente una vez este SAN de URI.`,[J.IS_ACTIVE]:`¿Está activo?`,[J.HASH_SECRET]:`¿Aplicar hash al secreto?`,[J.LOGIN_FAILED]:`La operación de inicio de sesión falló`,[J.SCOPE_GRANT_INTRO]:`Esto permitirá que la aplicación {client}`,[J.ONCE_AUTHORIZED_REDIRECT]:`Una vez autorizado, será redirigido a {target}.`,[J.GOVERNED_BY]:`Esta aplicación se rige por la {privacyPolicy} y los {termsOfService} de la aplicación {{client}}.`,[J.ACTIVE_SINCE]:`Activo desde`,[J.VIEW_POLICY_DETAILS]:`Ver detalles de la política`,[J.CREATE_ACCOUNT]:`Crear cuenta`,[J.FORGOT_PASSWORD]:`¿Olvidaste la contraseña?`,[J.RESET_PASSWORD]:`Restablecer contraseña`,[J.ACTIVATE_ACCOUNT]:`Activar cuenta`,[J.BACK_TO_LOGIN]:`Volver al inicio de sesión`,[J.EMAIL_OR_NAME]:`Correo electrónico o nombre`,[J.CHECK_EMAIL_ACTIVATE]:`Revisa tu correo electrónico para obtener el código de activación.`,[J.CHECK_EMAIL_RESET]:`Revisa tu correo electrónico para obtener el código de restablecimiento.`,[J.ACCOUNT_ACTIVATED]:`La cuenta se activó correctamente.`,[J.PASSWORD_RESET_DONE]:`La contraseña se restableció correctamente.`,[J.WORKFLOW_DISABLED]:`Esta función no está habilitada.`,[J.PRIVACY_POLICY]:`Política de Privacidad`,[J.TERMS_OF_SERVICE]:`Términos de Servicio`,[J.POLICY_TYPE_COMPOSITE]:`Compuesta`,[J.POLICY_TYPE_DATE]:`Fecha`,[J.POLICY_TYPE_TIME]:`Hora`,[J.POLICY_TYPE_ATTRIBUTE_NAMES]:`Nombres de atributos`,[J.POLICY_TYPE_ATTRIBUTES]:`Atributos`,[J.POLICY_TYPE_REALM_MATCH]:`Coincidencia de realm`,[J.POLICY_TYPE_IDENTITY]:`Identidad`,[J.POLICY_TYPE_PERMISSION_BINDING]:`Vinculación de permiso`,[J.DECISION_STRATEGY_HINT_UNANIMOUS]:`Todas las políticas deben evaluarse positivamente.`,[J.DECISION_STRATEGY_HINT_AFFIRMATIVE]:`Al menos una política debe evaluarse positivamente.`,[J.DECISION_STRATEGY_HINT_CONSENSUS]:`Más políticas deben evaluarse positivamente que negativamente.`,[J.DECISION_STRATEGY_HINT_DEFAULT]:`Ninguna estrategia seleccionada. Por defecto: unánime (todas las políticas deben evaluarse positivamente).`,[J.OPTION_NONE_UNANIMOUS]:`-- Ninguna (predeterminado: unánime) --`,[J.REALM_MATCH_STRICT_HINT]:`¿Coincidir solo si el atributo es estrictamente igual al nombre?`,[J.REALM_MATCH_NULL_MATCH_ALL_HINT]:`Determina si los recursos con valor de realm-id/nombre nulo coinciden con todos los realms de identidad.{br}Si está activado, cualquier realm de identidad puede acceder a recursos con valores de realm nulos.`,[J.ENABLE_STARTTLS_HINT]:`¿Activar el proceso StartTLS?`,[J.PASSWORD_MUST_MATCH]:`Debe coincidir con la contraseña.`,[J.LOOKUP_FAILED]:`La búsqueda falló con: {{message}}`,[J.PROTOCOL_NOT_SUPPORTED]:`{{name}} aún no es compatible.`,[J.JUNCTION_POLICY]:`Política de unión`,[J.JUNCTION_REALM_SCOPE]:`Ámbito del dominio`,[J.REALM_SCOPE_NONE]:`Ninguno`,[J.REALM_SCOPE_NONE_HINT]:`Sin alcance. No coincide con ningún dominio; una concesión deshabilitada.`,[J.REALM_SCOPE_OWN]:`Dominio propio`,[J.REALM_SCOPE_OWN_HINT]:`Actúa solo en el dominio propio del titular.`,[J.REALM_SCOPE_OWN_OR_NULL]:`Propio + global`,[J.REALM_SCOPE_OWN_OR_NULL_HINT]:`Dominio propio más recursos globales (sin dominio).`,[J.REALM_SCOPE_ANY]:`Cualquier dominio`,[J.REALM_SCOPE_ANY_HINT]:`Actúa en todos los dominios, incluido el global. Alcance de nivel administrador.`,[J.SELECTION_UPDATING]:`Actualizando selección`,[J.SELECTION_REMOVE]:`Quitar de la selección`,[J.SELECTION_ADD]:`Añadir a la selección`,[J.REALM_MISMATCH_TITLE]:`Inicia sesión con otra cuenta`,[J.REALM_MISMATCH_TEXT]:`{{client}} pertenece al realm {{realm}}, pero has iniciado sesión en otro realm. Inicia sesión con una cuenta de {{realm}} para continuar.`,[J.SIGN_IN_TO_REALM]:`Iniciar sesión en {{realm}}`,[J.RETURN_TO_APP]:`Volver a la aplicación`,[J.REAUTH_TEXT]:`Vuelve a iniciar sesión para continuar.`,[J.SELECT_ACCOUNT_TITLE]:`Elegir una cuenta`,[J.CONTINUE_AS]:`Continuar como {{name}}`,[J.USE_ANOTHER_ACCOUNT]:`Usar otra cuenta`,[J.SIGNED_IN_AS]:`Sesión iniciada como {{name}}`,[J.NOT_YOU]:`¿No eres tú?`,[J.AUTHORIZE_ABORTED]:`La solicitud de autorización fue denegada. No es posible volver automáticamente a la aplicación. Puedes cerrar esta ventana.`,[J.ACCESS_DENIED_TITLE]:`Acceso denegado`,[J.ACCESS_DENIED_TEXT]:`No tienes permiso para acceder a esta aplicación.`,[J.CLIENT_ACCESS_POLICY_HINT]:`Sin política, cualquier identidad del realm puede iniciar sesión.`,[J.CONSENT_STATUS_LOADING]:`Comprobando los permisos concedidos…`,[J.LOGOUT_CONFIRM_TITLE]:`Cerrar sesión`,[J.LOGOUT_CONFIRM_TEXT]:`¿Quieres cerrar sesión?`,[J.LOGOUT_DONE]:`Has cerrado sesión.`,[J.SIGN_OUT]:`Cerrar sesión`,[J.ACCOUNT_SIGN_IN_INTRO]:`Inicia sesión para administrar tu cuenta.`,[J.MFA_TITLE]:`Autenticación de dos factores`,[J.MFA_CHALLENGE_INTRO]:`Introduce el código de tu aplicación de autenticación para continuar.`,[J.MFA_CODE]:`Código de verificación`,[J.MFA_CODE_HINT]:`El código de 6 dígitos de tu aplicación de autenticación.`,[J.MFA_VERIFY]:`Verificar`,[J.MFA_USE_RECOVERY]:`Usar un código de recuperación`,[J.MFA_USE_AUTHENTICATOR]:`Usar tu aplicación de autenticación`,[J.MFA_RECOVERY_CODE]:`Código de recuperación`,[J.MFA_FAILED]:`El código de verificación no es válido.`,[J.MFA_SETUP_REQUIRED]:`Configura la autenticación de dos factores para continuar.`,[J.MFA_ENROLL_TITLE]:`Añadir un segundo factor`,[J.MFA_ENROLL_TOTP]:`Aplicación de autenticación`,[J.MFA_ENROLL_RECOVERY]:`Códigos de recuperación`,[J.MFA_SCAN_QR]:`Escanea este código QR con tu aplicación de autenticación.`,[J.MFA_MANUAL_KEY]:`O introduce esta clave manualmente:`,[J.MFA_CONFIRM_INTRO]:`Introduce el código generado para confirmar la configuración.`,[J.MFA_CONFIRM]:`Confirmar`,[J.MFA_RECOVERY_INTRO]:`Guarda estos códigos en un lugar seguro. Cada código se puede usar una vez.`,[J.MFA_RECOVERY_SAVE]:`No podrás volver a ver estos códigos.`,[J.MFA_DOWNLOAD]:`Descargar`,[J.MFA_ENROLLED]:`El segundo factor se ha añadido.`,[J.MFA_DEVICE_NAME]:`Nombre del dispositivo`,[J.MFA_NO_DEVICES]:`Aún no se han añadido dispositivos de autenticación.`,[J.MFA_DEVICE_UNCONFIRMED]:`no confirmado`,[J.MFA_RECOVERY_NUDGE]:`Añade códigos de recuperación de respaldo para poder iniciar sesión aunque pierdas el acceso a este segundo factor.`,[J.MFA_RECOVERY_NUDGE_GENERATE]:`Generar códigos de recuperación`,[J.MFA_RECOVERY_NUDGE_SKIP]:`Omitir por ahora`,[J.MFA_USE_EMAIL]:`Usar un código por correo`,[J.MFA_SEND_CODE]:`Enviar código`,[J.MFA_CODE_SENT]:`Se envió un código a tu correo electrónico.`,[J.MFA_ENROLL_EMAIL]:`Código por correo`,[J.MFA_USE_PASSKEY]:`Usar una clave de acceso`,[J.MFA_PASSKEY_PROMPT]:`Usa tu clave de acceso o llave de seguridad para continuar.`,[J.MFA_ENROLL_WEBAUTHN]:`Clave de acceso / llave de seguridad`,[J.KEY_USE_SIGNATURE]:`Firma (sig)`,[J.KEY_USE_ENCRYPTION]:`Cifrado (enc)`,[J.KEY_IMPORT_MATERIAL]:`Importar material de clave existente`,[J.KEY_MATERIAL_OCT]:`Material de clave (32 bytes, base64)`,[J.KEY_MATERIAL_PRIVATE]:`Clave privada (PKCS#8, base64 o PEM)`,[J.KEY_MATERIAL_PUBLIC]:`Clave pública (SPKI, base64 o PEM)`},hO={[Q.GENERAL]:`General`,[Q.OVERVIEW]:`Resumen`,[Q.ALL]:`Todos`,[Q.LOADING]:`Cargando...`,[Q.ACTIVE]:`Activo`,[Q.INACTIVE]:`Inactivo`,[Q.LOCKED]:`Bloqueado`,[Q.NOT_LOCKED]:`No bloqueado`,[Q.APPLICATION]:`Aplicación`,[Q.SEARCH]:`Buscar`,[Q.NO_RESULTS]:`No se encontraron resultados.`,[Q.SWITCH_TO_LIGHT_MODE]:`Cambiar a modo claro`,[Q.SWITCH_TO_DARK_MODE]:`Cambiar a modo oscuro`,[Q.YES]:`Sí`,[Q.BUILT_IN]:`Integrado`,[Q.GLOBAL]:`Global`,[Q.INVERTED]:`Invertido`,[Q.CONFIDENTIAL]:`Confidencial`,[Q.BASIC]:`Básico`,[Q.SECURITY]:`Seguridad`,[Q.CONNECTION]:`Conexión`,[Q.ENDPOINTS]:`Puntos de conexión`,[Q.DETAILS]:`Detalles`,[Q.GROUP]:`Grupo`,[Q.NO_ITEMS]:`La lista aún no contiene elementos.`,[Q.PROCESSING]:`Procesando`,[Q.REQUEST]:`Solicitud`,[Q.DATA]:`Datos`,[Q.BREADCRUMB]:`Ruta de navegación`},gO={[RD.CLIENT]:eD({one:`Cliente`,other:`Clientes`}),[RD.CONSENT]:eD({one:`Consentimiento`,other:`Consentimientos`}),[RD.EVENT]:eD({one:`Evento`,other:`Eventos`}),[RD.IDENTITY_PROVIDER]:eD({one:`Proveedor de identidad`,other:`Proveedores de identidad`}),[RD.IDENTITY_PROVIDER_ACCOUNT]:eD({one:`Cuenta vinculada`,other:`Cuentas vinculadas`}),[RD.KEY]:eD({one:`Clave`,other:`Claves`}),[RD.PERMISSION]:eD({one:`Permiso`,other:`Permisos`}),[RD.POLICY]:eD({one:`Política`,other:`Políticas`}),[RD.REALM]:eD({one:`Dominio`,other:`Dominios`}),[RD.ROLE]:eD({one:`Rol`,other:`Roles`}),[RD.SCOPE]:eD({one:`Ámbito`,other:`Ámbitos`}),[RD.SESSION]:eD({one:`Sesión`,other:`Sesiones`}),[RD.SESSION_TOKEN]:eD({one:`Token de sesión`,other:`Tokens de sesión`}),[RD.TRUST_ANCHOR]:eD({one:`Autoridad de certificación de confianza`,other:`Autoridades de certificación de confianza`}),[RD.USER]:eD({one:`Usuario`,other:`Usuarios`})},_O={[H.BAD_REQUEST]:`No se pudo procesar la solicitud.`,[H.INTERNAL_ERROR]:`Se produjo un error inesperado. Inténtelo de nuevo más tarde.`,[H.UPSTREAM_ERROR]:`Un servicio necesario no respondió correctamente. Inténtelo de nuevo más tarde.`,[H.HTTP_HEADER_AUTH_TYPE_UNSUPPORTED]:`El tipo de encabezado de autorización no es compatible.`,[H.HTTP_BEARER_TOKEN_MALFORMED]:`El token bearer tiene un formato incorrecto.`,[H.IDENTITY_UNAUTHORIZED]:`No está autenticado.`,[H.ENTITY_CREDENTIALS_INVALID]:`Las credenciales proporcionadas no son válidas.`,[H.ENTITY_INACTIVE]:`La entidad está inactiva.`,[H.ENTITY_NOT_FOUND]:`No se pudo encontrar la entidad solicitada.`,[H.ENTITY_CONFLICT]:`Ya existe una entidad con estos datos.`,[H.ENTITY_RELATION_INVALID]:`Una relación referenciada no es válida.`,[H.REGISTRATION_DISABLED]:`El registro está deshabilitado actualmente.`,[H.PASSWORD_RECOVERY_DISABLED]:`La recuperación de contraseña está deshabilitada actualmente.`,[H.EMAIL_VERIFICATION_REQUIRED]:`Primero debe verificar su dirección de correo electrónico.`,[H.RESET_TOKEN_EXPIRED]:`El token de restablecimiento ha caducado. Solicite uno nuevo.`,[H.LOGIN_ATTEMPT_THROTTLED]:`Demasiados intentos de inicio de sesión fallidos. Inténtelo de nuevo más tarde.`,[H.MFA_ATTEMPT_THROTTLED]:`Demasiados intentos de verificación fallidos. Inténtelo de nuevo más tarde.`,[H.MFA_NOT_CONFIGURABLE]:`La autenticación multifactor no está disponible en este servidor.`,[H.IDENTITY_PROVIDER_ACCOUNT_ALREADY_LINKED]:`Esta cuenta externa ya está vinculada a otro usuario.`,[H.IDENTITY_PROVIDER_ACCOUNT_UNLINK_BLOCKED]:`Es la última forma de iniciar sesión en esta cuenta. Establezca una contraseña antes de desconectarla.`,[H.STORAGE_INSUFFICIENT]:`No hay suficiente almacenamiento disponible para completar esta acción.`,[H.JWK_INVALID]:`La clave web JSON no es válida.`,[H.JWK_NOT_FOUND]:`No se pudo encontrar la clave web JSON.`,[H.JWT_INVALID]:`El token no es válido.`,[H.JWT_INACTIVE]:`El token aún no está activo.`,[H.JWT_EXPIRED]:`El token ha caducado. Inicie sesión de nuevo.`,[H.OAUTH_REDIRECT_URI_MISMATCH]:`La URI de redirección no coincide.`,[H.OAUTH_CLIENT_INVALID]:`El cliente no es válido.`,[H.OAUTH_CLIENT_UNAUTHORIZED]:`El cliente no está autorizado para usar este tipo de concesión.`,[H.OAUTH_GRANT_INVALID]:`La concesión de autorización no es válida.`,[H.OAUTH_GRANT_TYPE_UNSUPPORTED]:`El tipo de concesión no es compatible.`,[H.OAUTH_REQUEST_INVALID]:`La solicitud no es válida.`,[H.OAUTH_LOGIN_REQUIRED]:`Debes iniciar sesión para continuar.`,[H.OAUTH_MFA_REQUIRED]:`Se requiere un segundo factor para continuar.`,[H.OAUTH_ACCESS_DENIED]:`No tienes permiso para acceder a esta aplicación.`,[H.OAUTH_INTERACTION_REQUIRED]:`Se requiere interacción para continuar.`,[H.OAUTH_ACCOUNT_SELECTION_REQUIRED]:`Selecciona una cuenta para continuar.`,[H.OAUTH_CONSENT_REQUIRED]:`Se requiere tu consentimiento para continuar.`,[H.OAUTH_RESPONSE_TYPE_UNSUPPORTED]:`El tipo de respuesta no es compatible.`,[H.OAUTH_SCOPE_INVALID]:`El ámbito solicitado no es válido.`,[H.OAUTH_SCOPE_INSUFFICIENT]:`El ámbito concedido es insuficiente para esta acción.`,[H.PERMISSION_NOT_FOUND]:`No se pudo encontrar el permiso.`,[H.PERMISSION_DENIED]:`No tiene permiso para realizar esta acción.`,[H.PERMISSION_EVALUATION_FAILED]:`No se pudo evaluar el permiso.`,[H.POLICY_EVALUATOR_NOT_FOUND]:`No se encontró ningún evaluador para esta política.`,[H.POLICY_EVALUATOR_NOT_PROCESSABLE]:`No se pudo procesar esta política.`,[H.POLICY_EVALUATOR_CONTEXT_INVALID]:`El contexto de evaluación de la política no es válido.`},vO={[X.NAME]:`Nombre`,[X.DISPLAY_NAME]:`Nombre para mostrar`,[X.EMAIL]:`Correo electrónico`,[X.EXTERNAL_ID]:`ID externo`,[X.DESCRIPTION]:`Descripción`,[X.SECRET]:`Secreto`,[X.REDIRECT_URIS]:`URI(s) de redirección`,[X.POST_LOGOUT_REDIRECT_URIS]:`URI(s) de redirección tras cierre de sesión`,[X.GRANT_TYPES]:`Tipos de concesión`,[X.PASSWORD]:`Contraseña`,[X.DECISION_STRATEGY]:`Estrategia de decisión`,[X.HASHED]:`Con hash`,[X.URL]:`URL`,[X.CLIENT_SCOPES]:`Ámbitos del cliente`,[X.START]:`Inicio`,[X.END]:`Fin`,[X.INTERVAL]:`Intervalo`,[X.DAY_OF_WEEK]:`Día de la semana`,[X.DAY_OF_MONTH]:`Día del mes`,[X.DAY_OF_YEAR]:`Día del año`,[X.VALUE_IS_REGEX]:`¿Es el valor un patrón regex?`,[X.CODE]:`Código`,[X.NAMES]:`Nombres`,[X.PASSWORD_REPEAT]:`Repetir contraseña`,[X.ID]:`ID`,[X.TYPE]:`Tipo`,[X.TYPES]:`Tipos`,[X.INVERT]:`¿Invertir?`,[X.ENABLED]:`¿Activado?`,[X.CHILDREN]:`Hijos`,[X.CREATED_AT]:`Creado el`,[X.UPDATED_AT]:`Actualizado el`,[X.SEEN_AT]:`Visto por última vez`,[X.EXPIRES_AT]:`Expira el`,[X.IP_ADDRESS]:`Dirección IP`,[X.USER_AGENT]:`Agente de usuario`,[X.AUTH_METHOD]:`Método de autenticación`,[X.KIND]:`Tipo`,[X.SUBJECT]:`Sujeto`,[X.REFRESHED_AT]:`Renovado el`,[X.MFA_AT]:`MFA verificada el`,[X.PROTOCOL]:`Protocolo`,[X.PROTOCOLS]:`Protocolos`,[X.PRESET]:`Preajuste`,[X.PRESETS]:`Preajustes`,[X.TIMEOUT]:`Tiempo de espera`,[X.START_TLS]:`StartTLS`,[X.BASE_DN]:`DN base`,[X.FILTER]:`Filtro`,[X.CLASS]:`Clase`,[X.NAME_ATTRIBUTE]:`Atributo de nombre`,[X.MAIL_ATTRIBUTE]:`Atributo de correo`,[X.DISPLAY_NAME_ATTRIBUTE]:`Atributo del nombre para mostrar`,[X.MEMBER_ATTRIBUTE]:`Atributo de miembro`,[X.MEMBER_USER_ATTRIBUTE]:`Atributo de usuario miembro`,[X.CLIENT_ID]:`ID de cliente`,[X.CLIENT_SECRET]:`Secreto del cliente`,[X.SCOPE]:`Ámbito`,[X.TOKEN]:`Token`,[X.USER_INFO]:`UserInfo`,[X.DISCOVERY]:`Descubrimiento`,[X.REDIRECT_URL]:`URL de redirección`,[X.ACCESS_POLICY]:`Política de acceso`,[X.ACTOR]:`Actor`,[X.REF]:`Referencia`,[X.PATH]:`Ruta`,[X.METHOD]:`Método`,[X.USE]:`Uso`,[X.STATUS]:`Estado`,[X.PRIORITY]:`Prioridad`,[X.SIGNATURE_ALGORITHM]:`Algoritmo de firma`,[X.CERTIFICATE]:`Certificado`},yO={[LD.CODE]:`Código`,[LD.REGISTRATION_ACTIVATION_SUBJECT]:`Activa tu cuenta`,[LD.REGISTRATION_ACTIVATION_INTRO]:`Usa el código de abajo para activar tu cuenta y empezar a usar la plataforma.`,[LD.REGISTRATION_ACTIVATION_ACTION]:`Activar cuenta`,[LD.REGISTRATION_ACTIVATION_HINT]:`Si no creaste una cuenta, puedes ignorar este correo.`,[LD.PASSWORD_RESET_SUBJECT]:`Restablece tu contraseña`,[LD.PASSWORD_RESET_INTRO]:`Usa el código de abajo para restablecer la contraseña de tu cuenta.`,[LD.PASSWORD_RESET_ACTION]:`Restablecer contraseña`,[LD.PASSWORD_RESET_EXPIRY]:`El código caduca en {{minutes}} minutos.`,[LD.PASSWORD_RESET_HINT]:`Si no solicitaste restablecer la contraseña, puedes ignorar este correo: tu contraseña no cambiará.`,[LD.MFA_EMAIL_OTP_SUBJECT]:`Tu código de verificación`,[LD.MFA_EMAIL_OTP_INTRO]:`Usa el código de abajo para completar tu inicio de sesión.`,[LD.MFA_EMAIL_OTP_EXPIRY]:`El código caduca en {{minutes}} minutos.`,[LD.MFA_EMAIL_OTP_HINT]:`Si no intentaste iniciar sesión, puedes ignorar este correo.`},bO={[ID.NO_MORE]:`No hay más {{name}} disponibles`};function xO(e,t){return QE(e,[ZE(q.ENTITY,[XE(t.entity)]),ZE(q.FIELD,[XE(t.field)]),ZE(q.ACTION,[XE(t.action)]),ZE(q.COMMON,[XE(t.common)]),ZE(q.CLIENT,[XE(t.client)]),ZE(q.APP,[XE(t.app)]),ZE(q.VUECS,[XE(t.vuecs)]),ZE(q.ERROR,[XE(t.error)]),ZE(q.MAIL,[XE(t.mail)])])}var SO=$E([xO(`en`,{entity:UD,field:GD,action:zD,common:HD,client:VD,app:BD,vuecs:qD,error:WD,mail:KD}),xO(`de`,{entity:QD,field:eO,action:JD,common:ZD,client:XD,app:YD,vuecs:nO,error:$D,mail:tO}),xO(`fr`,{entity:sO,field:lO,action:rO,common:oO,client:aO,app:iO,vuecs:dO,error:cO,mail:uO}),xO(`es`,{entity:gO,field:vO,action:fO,common:hO,client:mO,app:pO,vuecs:bO,error:_O,mail:yO})]),CO=[{code:`en`,nativeName:`English`},{code:`de`,nativeName:`Deutsch`},{code:`fr`,nativeName:`Français`},{code:`es`,nativeName:`Español`}],wO=CO.map(e=>e.code);function TO(e){return typeof e==`string`&&wO.includes(e)}function EO(e){if(!e)return;let[t]=e.toLowerCase().split(`-`);return TO(t)?t:void 0}function DO(e){let t=ss(),n=t?.type?.emits,r;r=Array.isArray(n)?n:n?Object.keys(n):[];let i={};return r.length?(r.forEach(t=>{i[de(se(t))]=(...n)=>e(t,...n)}),i):(console.warn(`[vuecs] No emitted event found. Please check component: ${t?.type?.__name??`<anonymous>`}`),i)}function OO(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&!!e}function kO(e){let t=ss(),n=t?.type?.props??{},r=Object.keys(n).reduce((e,t)=>{let r=n[t],i=OO(r)?r.default:void 0;return i!==void 0&&(e[t]=i),e},{}),i=Sn(e);return B(()=>{let e={},n=t?.vnode.props??{};return Object.keys(n).forEach(t=>{e[se(t)]=n[t]}),Object.keys({...r,...e}).reduce((e,t)=>(i.value[t]!==void 0&&(e[t]=i.value[t]),e),{})})}function AO(e,t){let n=kO(e),r=t?DO(t):{};return B(()=>({...n.value,...r}))}function jO(e,t=`vc`){if(e)return e;let n=Qr();return t?`${t}-${n}`:n}function MO(e){let t=E(null);return{mode:e.mode,value:e.value,isSelected:t=>{if(t===void 0)return!1;let n=e.value.value,r=e.mode.value;return r===`multi`?Array.isArray(n)&&n.includes(t):r===`single`&&n===t},toggle:(n,r={})=>{let i=e.mode.value;if(i===void 0)return;if(i===`single`){e.emit(e.value.value===n?null:n),t.value=n;return}let a=Array.isArray(e.value.value)?e.value.value:[];if(r.range&&t.value!==null){let r=t.value,i=PO(e.keyAt,r),o=PO(e.keyAt,n);if(i<0||o<0){t.value=n;return}let[s,c]=i<=o?[i,o]:[o,i],l=[];for(let t=s;t<=c;t+=1){let n=e.keyAt(t);n!==void 0&&l.push(n)}let u=new Set(a);for(let e of l)u.add(e);e.emit(Array.from(u));return}if(r.toggle){let r=a.indexOf(n),i=r>=0?[...a.slice(0,r),...a.slice(r+1)]:[...a,n];e.emit(i),t.value=n;return}let o=a.indexOf(n),s=o>=0?[...a.slice(0,o),...a.slice(o+1)]:[...a,n];e.emit(s),t.value=n},setValue:n=>{let r=e.mode.value;if(r===void 0)return;let i=n;if(r===`single`&&Array.isArray(n)?i=n.length>0?n[n.length-1]:null:r===`multi`&&n!==null&&!Array.isArray(n)&&(i=[n]),e.emit(i),i===null||Array.isArray(i)&&i.length===0){t.value=null;return}t.value=Array.isArray(i)?i[i.length-1]:i},rangeAnchor:t}}var NO=1e6;function PO(e,t){for(let n=0;n<NO;n+=1){let r=e(n);if(r===void 0)return-1;if(r===t)return n}return-1}function FO(e,t){if(t&&t._context&&t._context.provides&&t._context.provides[e])return t._context.provides[e];if(pr())return fr(e,void 0)}function IO(e){if(e==null||e===!1)return!1;if(typeof e==`string`)return e.trim().length>0;if(typeof e==`number`)return!0;if(Array.isArray(e))return e.some(e=>IO(e));if(typeof e!=`object`)return!1;let t=e;return t.type===Bo?!1:t.type===zo?typeof t.children==`string`&&t.children.trim().length>0:t.type!==Ro||IO(t.children)}function LO(e){return e?e.flatMap(e=>e.type===Ro?LO(e.children):[e]):[]}var RO=k({name:`VCPrimitiveSlot`,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=LO(n.default()),r=e.findIndex(e=>e.type!==Bo);if(r===-1)return e;let i=e[r];i.props&&delete i.props.ref;let a=i.props?z(t,i.props):t,o=es({...i,props:{}},a);return e.length===1?o:(e[r]=o,e)}}}),zO=[`area`,`img`,`input`],BO=k({name:`VCPrimitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object,Function],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&zO.includes(r)?()=>V(r,t):r===`template`?()=>V(RO,t,{default:n.default}):()=>V(e.as,t,{default:n.default})}});function VO(e,t,n){if(n===void 0){if(FO(e)!==void 0)return;dr(e,t);return}n&&n._context&&n._context.provides&&n._context.provides[e]||n.provide(e,t)}var HO=Symbol.for(`@vuecs/core/extend`);function UO(e){return{__extend:HO,value:e}}function WO(e){return OO(e)&&`__extend`in e&&e.__extend===HO}function GO(e,t){return e?t?`${e} ${t}`:e:t}function KO(e,t,n){return WO(t)?n(e||``,t.value):t}function qO(e,t,n){let r=Object.keys(t);for(let i of r){let r=t[i];r!==void 0&&(e[i]=KO(e[i],r,n))}}function JO(e,t,n,r){let i=Object.keys(n);for(let a of i){let i=n[a];if(i!==void 0)if(WO(i))e[a]=r(e[a]||``,i.value);else{let n=t[a];e[a]=n?r(n,i):i}}}function YO(e,t,n,r,i,a){let o=a||GO,s={...t.classes};for(let r of n){let n=r.elements[e];n?.classes&&JO(s,t.classes,n.classes,o)}if(r){let t=r[e];t?.classes&&qO(s,t.classes,o)}return i&&qO(s,i,o),s}function XO(e,t,n,r){let i={},a=[],o={};function s(e){if(!e)return;let t=Object.keys(e);for(let n of t){i[n]||(i[n]={});let t=e[n],r=Object.keys(t);for(let e of r)i[n][e]={...t[e]}}}function c(e){e&&Object.assign(o,e)}function l(e){if(e)for(let t of e)a.push(t)}s(t.variants),l(t.compoundVariants),c(t.defaultVariants);for(let t of n){let n=t.elements[e];n&&(s(n.variants),l(n.compoundVariants),c(n.defaultVariants))}if(r){let t=r[e];t&&(s(t.variants),l(t.compoundVariants),c(t.defaultVariants))}return{variants:i,compoundVariants:a,defaultVariants:o}}function ZO(e,t,n){let r=n||GO,i={},{variants:a,compoundVariants:o,defaultVariants:s}=e,c={},l=new Set([...Object.keys(a),...Object.keys(t),...Object.keys(s)]);for(let e of l){let n=t[e];n===void 0&&(n=s[e]),n!==void 0&&(c[e]=String(n))}let u=Object.keys(a);for(let e of u){let t=c[e];if(t===void 0)continue;let n=a[e][t];if(!n)continue;let o=Object.keys(n);for(let e of o){let t=n[e];t&&(i[e]=r(i[e]||``,t))}}for(let e of o){let t=e.variants,n=!0,a=Object.keys(t);for(let e of a)if(c[e]!==String(t[e])){n=!1;break}if(!n)continue;let o=Object.keys(e.class);for(let t of o){let n=e.class[t];n&&(i[t]=r(i[t]||``,n))}}return i}var QO=class{themesRef;overridesRef;constructor(e={}){this.themesRef=un(e.themes||[]),this.overridesRef=un(e.overrides)}get themes(){return this.themesRef.value}get overrides(){return this.overridesRef.value}setThemes(e){let t=this.themesRef.value===e;this.themesRef.value=e,t&&pn(this.themesRef)}setOverrides(e){let t=this.overridesRef.value===e;this.overridesRef.value=e,t&&pn(this.overridesRef)}resolve(e,t,n,r){let{themes:i}=this,{overrides:a}=this,o=a?.elements,s=a?.classesMergeFn;if(!s)for(let e=i.length-1;e>=0;--e){let t=i[e]?.classesMergeFn;if(t){s=t;break}}let c=YO(e,t,i,o,n,s),l=ZO(XO(e,t,i,o),r??{},s),u=s||GO,d=c,f=Object.keys(l);for(let e of f){let t=l[e];t&&(d[e]=u(d[e]||``,t))}return c}},$O=Symbol.for(`VCThemeManager`);function ek(e,t={}){let n=FO($O,e);if(n)return t.themes&&t.themes.length>0&&n.setThemes([...n.themes,...t.themes]),t.overrides!==void 0&&n.setOverrides(t.overrides),n;let r=new QO(t);return VO($O,r,e),r}function tk(e){return FO($O,e)}function nk(e,t,n){let r=tk();if(!r)throw Error(`ThemeManager is not installed. Call app.use(vuecs) or installThemeManager(app) before using components.`);return B(()=>r.resolve(e,n,t.themeClass,t.themeVariant))}function rk(e,t){let n={};for(let r of e){if(!r)continue;let e=Object.keys(r);for(let i of e){let e=r[i];e!==void 0&&(n[i]=WO(e)?t(n[i]||``,e.value):e)}}return n}function ik(e){let t={},n=!1;for(let r of e){if(!r)continue;n=!0;let e=Object.keys(r);for(let n of e){t[n]||(t[n]={});let e=r[n],i=Object.keys(e);for(let r of i)t[n][r]={...e[r]}}}return n?t:void 0}function ak(e){let t=[],n=!1;for(let r of e)if(r){n=!0;for(let e of r)t.push(e)}return n?t:void 0}function ok(e){let t={},n=!1;for(let r of e)r&&(n=!0,Object.assign(t,r));return n?t:void 0}function sk(e,t){let n={},r=e.map(e=>e.classes);r.some(e=>e!==void 0)&&(n.classes=rk(r,t));let i=ik(e.map(e=>e.variants));i&&(n.variants=i);let a=ak(e.map(e=>e.compoundVariants));a&&(n.compoundVariants=a);let o=ok(e.map(e=>e.defaultVariants));return o&&(n.defaultVariants=o),n}function ck(e){return e?Array.isArray(e)?e:[e]:[]}function lk(e){for(let t=e.length-1;t>=0;--t){let n=e[t]?.classesMergeFn;if(n)return n}}function uk(e){let t=e.map(e=>e.colorMode).filter(e=>!!e);if(t.length!==0)return t.length===1?t[0]:{handle(e,n){for(let r of t)r.handle(e,n)}}}function dk(e){for(let t=e.length-1;t>=0;--t){let n=e[t]?.palette;if(n)return n}}function fk(e){if(e.length===0)return{elements:{}};if(e.length===1)return{...e[0]};let t=lk(e),n=t||GO,r=new Set;for(let t of e){let e=t.elements;for(let t of Object.keys(e))r.add(t)}let i={};for(let t of r)i[t]=sk(e.map(e=>e.elements[t]).filter(e=>!!e),n);let a={elements:i};t&&(a.classesMergeFn=t);let o=uk(e);o&&(a.colorMode=o);let s=dk(e);return s&&(a.palette=s),a}function pk(e){let t=ck(e.extends),n={elements:e.elements??{}};return e.classesMergeFn&&(n.classesMergeFn=e.classesMergeFn),e.colorMode&&(n.colorMode=e.colorMode),e.palette&&(n.palette=e.palette),fk([...t,n])}function mk(){return{themeClass:{type:Object,default:void 0},themeVariant:{type:Object,default:void 0}}}function hk(e,...t){return{get themeClass(){return e.themeClass},get themeVariant(){let n={...e.themeVariant??{}};for(let r of t){let t=e[r];t!==void 0&&(n[r]=t)}return n}}}var gk=class{defaultsRef;constructor(e={}){this.defaultsRef=un(e.defaults||{})}get defaults(){return this.defaultsRef.value}setDefaults(e){let t=e||{},n=this.defaultsRef.value===t;this.defaultsRef.value=t,n&&pn(this.defaultsRef)}mergeDefaults(e){if(!e)return;let t={...this.defaultsRef.value};for(let[n,r]of Object.entries(e)){if(!OO(r))continue;let e=t[n]||Object.create(null),i=Object.fromEntries(Object.entries(r).filter(([,e])=>e!==void 0));t[n]={...e,...i}}this.defaultsRef.value=t}get(e){return this.defaultsRef.value[e]}},_k=Symbol.for(`VCDefaultsManager`);function vk(e,t={}){let n=FO(_k,e);if(n)return t.defaults&&n.mergeDefaults(t.defaults),n;let r=new gk(t);return VO(_k,r,e),r}function yk(e){return FO(_k,e)}function bk(e,t,n){let r=yk();if(!r)throw Error(`DefaultsManager is not installed. Call app.use(vuecs) or installDefaultsManager(app) before using components.`);return B(()=>{let i=r.get(e),a={},o=Object.keys(n);for(let e of o){let r=t[e];if(r!==void 0){a[e]=r;continue}if(i){let t=D(i[e]);if(t!==void 0){a[e]=t;continue}}a[e]=n[e]}return a})}var xk={dir:`ltr`,locale:`en-US`},Sk=class{configRef;defaultsMap;parent;constructor(e={}){this.configRef=un(e.config||{}),this.defaultsMap=e.parent?{...e.defaults}:{...xk,...e.defaults},this.parent=e.parent}get config(){return this.configRef.value}get defaults(){return{...this.defaultsMap}}setConfig(e){let t=e||{},n=this.configRef.value===t;this.configRef.value=t,n&&pn(this.configRef)}withDefaults(e){Object.assign(this.defaultsMap,e),pn(this.configRef)}get(e){let t=this.configRef.value?.[e],n=ln(t)?D(t):t;if(n==null){let t=this.defaultsMap[e];return t===void 0?this.parent?.get(e):t}return n}},Ck=Symbol.for(`VCConfigManager`);function wk(e,t={}){let n=FO(Ck,e);if(n)return t.config&&n.setConfig({...n.config,...t.config}),n;let r=new Sk(t);return VO(Ck,r,e),r}var Tk=`en-US`;function Ek(e,t){if(t){for(let[n,r]of Object.entries(t))if(OO(r)){let t=e[n]||Object.create(null),i=Object.fromEntries(Object.entries(r).filter(([,e])=>e!==void 0));e[n]={...t,...i}}}}function Dk(e,t){if(!e||e.length===0)return t||{};let n=Object.create(null);for(let t of e)Ek(n,t.defaults);return Ek(n,t),n}function Ok(e,t={}){ek(e,t),vk(e,{defaults:Dk(t.icons,t.defaults)}),wk(e,t)}var kk={install:Ok},Ak=/^[a-z0-9]+(-[a-z0-9]+)*$/,jk=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!Mk(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!Mk(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!Mk(e,n)?null:e}return null},Mk=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function Nk(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}var Pk=Object.freeze({left:0,top:0,width:16,height:16}),Fk=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ik=Object.freeze({...Pk,...Fk}),Lk=Object.freeze({...Ik,body:``,hidden:!1});function Rk(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function zk(e,t){let n=Rk(e,t);for(let r in Lk)r in Fk?r in e&&!(r in n)&&(n[r]=Fk[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Bk(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=zk(r[e]||i[e],a)}return o(t),n.forEach(o),zk(e,a)}function Vk(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=Nk(e);for(let i in r){let a=r[i];a&&(t(i,Bk(e,i,a)),n.push(i))}return n}var Hk={provider:``,aliases:{},not_found:{},...Pk};function Uk(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Wk(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!Uk(e,Hk))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!Uk(t,Lk))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!Uk(t,Lk))return null}return t}var Gk=Object.create(null);function Kk(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function qk(e,t){let n=Gk[e]||(Gk[e]=Object.create(null));return n[t]||(n[t]=Kk(e,t))}function Jk(e,t){return Wk(t)?Vk(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function Yk(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}var Xk=!1;function Zk(e){return typeof e==`boolean`&&(Xk=e),Xk}function Qk(e){let t=typeof e==`string`?jk(e,!0,Xk):e;if(t){let e=qk(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function $k(e,t){let n=jk(e,!0,Xk);if(!n)return!1;let r=qk(n.provider,n.prefix);return t?Yk(r,n.name,t):(r.missing.add(n.name),!0)}function eA(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),Xk&&!t&&!e.prefix){let t=!1;return Wk(e)&&(e.prefix=``,Vk(e,(e,n)=>{$k(e,n)&&(t=!0)})),t}let n=e.prefix;return Mk({prefix:n,name:`a`})?!!Jk(qk(t,n),e):!1}var tA=Object.freeze({width:null,height:null}),nA=Object.freeze({...tA,...Fk}),rA=/(-?[0-9.]*[0-9]+[0-9.]*)/g,iA=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function aA(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(rA);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=iA.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function oA(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function sA(e,t){return e?`<defs>`+e+`</defs>`+t:t}function cA(e,t,n){let r=oA(e);return sA(r.defs,t+r.content+n)}var lA=e=>e===`unset`||e===`undefined`||e===`none`;function uA(e,t){let n={...Ik,...e},r={...nA,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=cA(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=aA(d,c/l)):(u=o===`auto`?c:o,d=s===null?aA(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{lA(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var dA=/\sid="(\S+)"/g,fA=new Map;function pA(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=fA.get(e)||0;return fA.set(e,t+1),t?`${e}${t}`:e}function mA(e){let t=[],n;for(;n=dA.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=pA(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}var hA=Object.create(null);function gA(e,t){hA[e]=t}function _A(e){return hA[e]||hA[``]}function vA(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var yA=Object.create(null),bA=[`https://api.simplesvg.com`,`https://api.unisvg.com`],xA=[];bA.length>0;)bA.length===1||Math.random()>.5?xA.push(bA.shift()):xA.push(bA.pop());yA[``]=vA({resources:[`https://api.iconify.design`].concat(xA)});function SA(e,t){let n=vA(t);return n!==null&&(yA[e]=n,!0)}function CA(e){return yA[e]}var wA=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function TA(e,t){let n=CA(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function EA(e){return e===404}var DA=(e,t,n)=>{let r=[],i=TA(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function OA(e){if(typeof e==`string`){let t=CA(e);if(t)return t.path}return`/`}var kA={prepare:DA,send:(e,t,n)=>{if(!wA){n(`abort`,424);return}let r=OA(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;wA(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(EA(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function AA(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function jA(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||AA([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var MA=0;function NA(e,t,n){let r=MA++,i=AA.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function PA(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=qk(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function FA(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?jk(e,t,n):e;i&&r.push(i)}),r}var IA={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function LA(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function RA(e){let t={...IA,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=LA(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function zA(){}var BA=Object.create(null);function VA(e){if(!BA[e]){let t=CA(e);if(!t)return;BA[e]={config:t,redundancy:RA(t)}}return BA[e]}function HA(e,t,n){let r,i;if(typeof e==`string`){let t=_A(e);if(!t)return n(void 0,424),zA;i=t.send;let a=VA(e);a&&(r=a.redundancy)}else{let t=vA(e);if(t){r=RA(t);let n=_A(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),zA):r.query(t,i,n)().abort}function UA(){}function WA(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,jA(e)}))}function GA(e){let t=[],n=[];return e.forEach(e=>{(e.match(Ak)?t:n).push(e)}),{valid:t,invalid:n}}function KA(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!Jk(e,n).length){r();return}}catch(e){console.error(e)}r(),WA(e)}function qA(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function JA(e,t){e.iconsToLoad=e.iconsToLoad?e.iconsToLoad.concat(t).sort():t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){qA(e.loadIcons(r,n,t),t=>{KA(e,r,t)});return}if(i){r.forEach(r=>{qA(i(r,n,t),t=>{KA(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=GA(r);if(o.length&&KA(e,o,null),!a.length)return;let s=n.match(Ak)?_A(t):null;if(!s){KA(e,a,null);return}s.prepare(t,n,a).forEach(n=>{HA(t,n,t=>{KA(e,n.icons,t)})})}))}var YA=(e,t)=>{let n=PA(FA(e,!0,Zk()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,UA)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(qk(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=qk(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&JA(e,t)}),t?NA(t,n,i):UA};function XA(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in tA?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var ZA=/[\s,]+/;function QA(e,t){t.split(ZA).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}function $A(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}function ej(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function tj(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function nj(e){return`data:image/svg+xml,`+tj(e)}function rj(e){return`url("`+nj(e)+`")`}var ij={...nA,inline:!1},aj={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":!0,role:`img`},oj={display:`inline-block`},sj={backgroundColor:`currentColor`},cj={backgroundColor:`transparent`},lj={Image:`var(--svg)`,Repeat:`no-repeat`,Size:`100% 100%`},uj={webkitMask:sj,mask:sj,background:cj};for(let e in uj){let t=uj[e];for(let n in lj)t[e+n]=lj[n]}var dj={};[`horizontal`,`vertical`].forEach(e=>{let t=e.slice(0,1)+`Flip`;dj[e+`-flip`]=t,dj[e.slice(0,1)+`-flip`]=t,dj[e+`Flip`]=t});function fj(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}var pj=(e,t)=>{let n=XA(ij,t),r={...aj},i=t.mode||`svg`,a={},o=t.style,s=typeof o==`object`&&!(o instanceof Array)?o:{};for(let e in t){let i=t[e];if(i!==void 0)switch(e){case`icon`:case`style`:case`onLoad`:case`mode`:case`ssr`:case`customise`:break;case`inline`:case`hFlip`:case`vFlip`:n[e]=i===!0||i===`true`||i===1;break;case`flip`:typeof i==`string`&&QA(n,i);break;case`color`:a.color=i;break;case`rotate`:typeof i==`string`?n[e]=$A(i):typeof i==`number`&&(n[e]=i);break;case`ariaHidden`:case`aria-hidden`:i!==!0&&i!==`true`&&delete r[`aria-hidden`];break;default:{let t=dj[e];t?(i===!0||i===`true`||i===1)&&(n[t]=!0):ij[e]===void 0&&(r[e]=i)}}}let c=uA(e,n),l=c.attributes;if(n.inline&&(a.verticalAlign=`-0.125em`),i===`svg`)return r.style={...a,...s},Object.assign(r,l),r.innerHTML=mA(c.body),V(`svg`,r);let{body:u,width:d,height:f}=e,p=i===`mask`||i!==`bg`&&u.indexOf(`currentColor`)!==-1,m=ej(u,{...l,width:d+``,height:f+``});return r.style={...a,"--svg":rj(m),width:fj(l.width),height:fj(l.height),...oj,...p?sj:cj,...s},V(`span`,r)};if(Zk(!0),gA(``,kA),typeof document<`u`&&typeof window<`u`){let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!eA(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;SA(e,r)||console.error(n)}catch{console.error(n)}}}}var mj={...Ik,body:``},hj=k((e,{emit:t})=>{let n=E(null);function r(){n.value&&=(n.value.abort?.(),null)}let i=E(!!e.ssr),a=E(``),o=un(null);function s(){let i=e.icon;if(typeof i==`object`&&i&&typeof i.body==`string`)return a.value=``,{data:i};let o;if(typeof i!=`string`||(o=jk(i,!1,!0))===null)return null;let s=Qk(o);if(!s){let e=n.value;return(!e||e.name!==i)&&(s===null?n.value={name:i}:n.value={name:i,abort:YA([o],c)}),null}r(),a.value!==i&&(a.value=i,Gn(()=>{t(`load`,i)}));let l=e.customise;if(l){s=Object.assign({},s);let e=l(s.body,o.name,o.prefix,o.provider);typeof e==`string`&&(s.body=e)}let u=[`iconify`];return o.prefix!==``&&u.push(`iconify--`+o.prefix),o.provider!==``&&u.push(`iconify--`+o.provider),{data:s,classes:u}}function c(){let e=s();e?e.data!==o.value?.data&&(o.value=e):o.value=null}return i.value?c():Fi(()=>{i.value=!0,c()}),yr(()=>e.icon,c),zi(r),()=>{let t=o.value;if(!t)return pj(mj,e);let n=e;return t.classes&&(n={...e,class:t.classes.join(` `)}),pj({...Ik,...t.data},n)}},{props:[`icon`,`mode`,`ssr`,`width`,`height`,`style`,`color`,`inline`,`rotate`,`hFlip`,`horizontalFlip`,`vFlip`,`verticalFlip`,`flip`,`id`,`ariaHidden`,`customise`,`title`],emits:[`load`]}),gj=k({name:`VCIcon`,inheritAttrs:!1,props:{name:{type:String,required:!0}},setup(e,{attrs:t}){return()=>V(hj,{...t,icon:e.name})}});function _j(e){e.component(`VCIcon`,gj)}var vj={install:_j},yj={classes:{root:`vc-button`,leading:`vc-button-leading`,trailing:`vc-button-trailing`,label:`vc-button-label`}},bj=k({name:`VCButton`,props:{color:{type:String,default:void 0},variant:{type:String,default:void 0},size:{type:String,default:void 0},type:{type:String,default:`button`},as:{type:[String,Object,Function],default:`button`},tag:{type:[String,Object,Function],default:void 0},label:{type:String,default:void 0},iconLeft:{type:String,default:void 0},iconRight:{type:String,default:void 0},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},themeClass:{type:Object,default:void 0},themeVariant:{type:Object,default:void 0}},slots:Object,setup(e,{attrs:t,slots:n}){let r=e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()},i=nk(`button`,{get themeClass(){return e.themeClass},get themeVariant(){return{...e.themeVariant??{},...e.color===void 0?{}:{color:e.color},...e.variant===void 0?{}:{variant:e.variant},...e.size===void 0?{}:{size:e.size},...e.loading?{loading:!0}:{}}}},yj);return()=>{let a=i.value,o=e.disabled||e.loading,s={loading:e.loading,disabled:o},c=[];if(e.loading)c.push(V(`span`,{class:a.leading||void 0},[V(`span`,{class:`vc-button-spinner`,"aria-hidden":`true`}),V(`span`,{class:`vc-sr-only`},`Loading`)]));else if(n.leading){let e=n.leading(s);IO(e)&&c.push(V(`span`,{class:a.leading||void 0},e))}else e.iconLeft&&c.push(V(`span`,{class:a.leading||void 0},[V(gj,{name:e.iconLeft})]));let l=n.default?n.default(s):void 0;if(IO(l)?c.push(V(`span`,{class:a.label||void 0},l)):typeof e.label==`string`&&e.label!==``&&c.push(V(`span`,{class:a.label||void 0},e.label)),n.trailing){let e=n.trailing(s);IO(e)&&c.push(V(`span`,{class:a.trailing||void 0},e))}else e.iconRight&&c.push(V(`span`,{class:a.trailing||void 0},[V(gj,{name:e.iconRight})]));let u=e.tag??e.as,d=u===`button`;return V(u,z({class:[a.root||void 0,e.loading?`vc-button--busy`:void 0],...d?{type:e.type}:{},...d?{disabled:o||void 0}:{},...!d&&o?{"aria-disabled":`true`,tabindex:`-1`,onClickCapture:r}:{},...e.loading?{"aria-busy":`true`}:{}},t),c)}}});function xj(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Sj=k({name:`VCLink`,props:{active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},href:{type:String,default:void 0},prefetch:{type:Boolean,default:!0},target:{type:String,default:`_self`},to:{type:[String,Object],default:void 0},query:{type:Object}},emits:[`click`,`clicked`],setup(e,{emit:t,slots:n}){let r=Sn(e,`query`),i=qi(`RouterLink`),a=qi(`NuxtLink`),o=B(()=>typeof i==`string`||e.disabled||!e.to?`a`:typeof a==`string`?`router-link`:`nuxt-link`),s=(e,t)=>{let n=Object.keys(t);if(n.length===0)return e;let r=``,i=e.indexOf(`#`);i!==-1&&(r=e.slice(i),e=e.slice(0,i));let a;if(e.includes(`?`)){let r=new URL(e,`http://localhost:3000`);for(let e of n)r.searchParams.set(e,t[e]);a=r.searchParams,[e]=e.split(`?`)}else a=new URLSearchParams(t);return`${e}?${a.toString()}${r}`},c=B(()=>o.value!==`a`),l=B(()=>e.href?e.query&&r.value?s(e.href,r.value):e.href:c.value?null:`#`),u=B(()=>{if(!c.value)return{};let t;return e.query&&r.value?typeof e.to==`string`?t=s(e.to,r.value):xj(e.to)&&(t={...e.to,query:{...r.value,...e.to.query?{...e.to.query}:{}}}):t=e.to,{...t?{to:t}:{},...e.prefetch===void 0?{}:{prefetch:e.prefetch}}}),d=B(()=>({...e.href?{href:l.value}:{},...c.value?{}:{target:e.target}})),f=()=>{let n=n=>{let r=n.preventDefault!==void 0&&n.stopPropagation!==void 0&&n.stopImmediatePropagation!==void 0;r&&e.disabled?(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()):(c.value&&t(`click`,n),t(`clicked`,n)),r&&!c.value&&l.value===`#`&&(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation())};return{class:{active:e.active,disabled:e.disabled},"data-active":e.active?``:void 0,"data-disabled":e.disabled?``:void 0,...d.value,...u.value,onClick:n}},p=B(()=>{switch(o.value){case`router-link`:return i;case`nuxt-link`:return a;default:return`a`}});return()=>{let e=p.value;return typeof e==`string`?V(e,f(),[typeof n.default==`function`?n.default():[]]):V(e,f(),{default:()=>typeof n.default==`function`?n.default():[]})}}});function Cj(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function wj(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Cj(e.default)}var Tj=Object.assign;function Ej(e,t){let n={};for(let r in t){let i=t[r];n[r]=Oj(i)?i.map(e):e(i)}return n}var Dj=()=>{},Oj=Array.isArray;function kj(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var Aj=Symbol(``);function jj(e,t){return Tj(Error(),{type:e,[Aj]:!0},t)}function Mj(e,t){return e instanceof Error&&Aj in e&&(t==null||!!(e.type&t))}var Nj=Symbol(``),Pj=Symbol(``),Fj=Symbol(``),Ij=Symbol(``),Lj=Symbol(``),Rj=typeof document<`u`,zj=/#/g,Bj=/&/g,Vj=/\//g,Hj=/=/g,Uj=/\?/g,Wj=/\+/g,Gj=/%5B/g,Kj=/%5D/g,qj=/%5E/g,Jj=/%60/g,Yj=/%7B/g,Xj=/%7C/g,Zj=/%7D/g,Qj=/%20/g;function $j(e){return e==null?``:encodeURI(``+e).replace(Xj,`|`).replace(Gj,`[`).replace(Kj,`]`)}function eM(e){return $j(e).replace(Yj,`{`).replace(Zj,`}`).replace(qj,`^`)}function tM(e){return $j(e).replace(Wj,`%2B`).replace(Qj,`+`).replace(zj,`%23`).replace(Bj,`%26`).replace(Jj,"`").replace(Yj,`{`).replace(Zj,`}`).replace(qj,`^`)}function nM(e){return tM(e).replace(Hj,`%3D`)}function rM(e){return $j(e).replace(zj,`%23`).replace(Uj,`%3F`)}function iM(e){return rM(e).replace(Vj,`%2F`)}function aM(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var oM=/\/$/,sM=e=>e.replace(oM,``);function cM(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=gM(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:aM(o)}}function lM(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function uM(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function dM(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&fM(t.matched[r],n.matched[i])&&pM(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function fM(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function pM(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!mM(e[n],t[n]))return!1;return!0}function mM(e,t){return Oj(e)?hM(e,t):Oj(t)?hM(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function hM(e,t){return Oj(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function gM(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var _M={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function vM(e){if(!e)if(Rj){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),sM(e)}var yM=/^[^#]+#/;function bM(e,t){return e.replace(yM,`#`)+t}function xM(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var SM=()=>({left:window.scrollX,top:window.scrollY});function CM(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=xM(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function wM(e,t){return(history.state?history.state.position-t:-1)+e}var TM=new Map;function EM(e,t){TM.set(e,t)}function DM(e){let t=TM.get(e);return TM.delete(e),t}function OM(e){return typeof e==`string`||e&&typeof e==`object`}function kM(e){return typeof e==`string`||typeof e==`symbol`}function AM(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(Wj,` `),i=r.indexOf(`=`),a=aM(i<0?r:r.slice(0,i)),o=i<0?null:aM(r.slice(i+1));if(a in t){let e=t[a];Oj(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function jM(e){let t=``;for(let n in e){let r=e[n];if(n=nM(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(Oj(r)?r.map(e=>e&&tM(e)):[r&&tM(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function MM(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=Oj(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function NM(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function PM(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(jj(4,{from:n,to:t})):e instanceof Error?c(e):OM(e)?c(jj(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function FM(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(Cj(s)){let c=(s.__vccOpts||s)[t];c&&a.push(PM(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=wj(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&PM(c,n,r,o,e,i)()}))}}return a}function IM(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>fM(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>fM(e,s))||i.push(s))}return[n,r,i]}var LM=()=>location.protocol+`//`+location.host;function RM(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),uM(n,``)}return uM(n,e)+r+i}function zM(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=RM(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(Tj({},e.state,{scroll:SM()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function BM(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?SM():null}}function VM(e){let{history:t,location:n}=window,r={value:RM(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:LM()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,Tj({},t.state,BM(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=Tj({},i.value,t.state,{forward:e,scroll:SM()});a(o.current,o,!0),a(e,Tj({},BM(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function HM(e){e=vM(e);let t=VM(e),n=zM(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=Tj({location:``,base:e,go:r,createHref:bM.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function UM(e=``){let t=[],n=[[``,{}]],r=0;e=vM(e);function i(e,t={}){r++,r!==n.length&&n.splice(r),n.push([e,t])}function a(e,n,{direction:r,delta:i}){let a={direction:r,delta:i,type:`pop`};for(let r of t)r(e,n,a)}let o={location:``,state:{},base:e,createHref:bM.bind(null,e),replace(e,t){n.splice(r--,1),i(e,t)},push(e,t){i(e,t)},listen(e){return t.push(e),()=>{let n=t.indexOf(e);n>-1&&t.splice(n,1)}},destroy(){t=[],n=[[``,{}]],r=0},go(e,t=!0){let i=this.location,o=e<0?`back`:`forward`;r=Math.max(0,Math.min(r+e,n.length-1)),t&&a(this.location,i,{direction:o,delta:e})}};return Object.defineProperty(o,"location",{enumerable:!0,get:()=>n[r][0]}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>n[r][1]}),o}var WM={type:0,value:``},GM=/[a-zA-Z0-9_]/;function KM(e){if(!e)return[[]];if(e===`/`)return[[WM]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;)switch(c=e[s++],n){case 0:c===`\\`?(r=n,n=4):c===`/`?(l&&d(),o()):c===`:`?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:c===`(`?n=2:GM.test(c)?f():(d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case 2:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`)}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var qM=`[^/]+?`,JM={sensitive:!1,strict:!1,start:!0,end:!0},YM=/[.+*?^${}()[\]/\\]/g;function XM(e,t){let n=Tj({},JM,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=40+(n.sensitive?.25:0);if(o.type===0)r||(i+=`/`),i+=o.value.replace(YM,`\\$&`),s+=40;else if(o.type===1){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||qM;if(u!==qM){s+=10;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=20,c&&(s+=-8),n&&(s+=-20),u===`.*`&&(s+=-50)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===0)n+=e.value;else if(e.type===1){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(Oj(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=Oj(c)?c.join(`/`):c;if(!l)if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`);n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function ZM(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function QM(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=ZM(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if($M(r))return 1;if($M(i))return-1}return i.length-r.length}function $M(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var eN={strict:!1,end:!0,sensitive:!1};function tN(e,t,n){let r=Tj(XM(KM(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function nN(e,t){let n=[],r=new Map;t=kj(eN,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=iN(e);s.aliasOf=r&&r.record;let l=kj(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(iN(Tj({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=tN(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!oN(d)&&o(e.name)),uN(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:Dj}function o(e){if(kM(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=cN(e,n);n.splice(t,0,e),e.record.name&&!oN(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw jj(1,{location:e});s=i.record.name,a=Tj(rN(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&rN(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw jj(1,{location:e,currentLocation:t});s=i.record.name,a=Tj({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:sN(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function rN(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function iN(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:aN(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function aN(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function oN(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function sN(e){return e.reduce((e,t)=>Tj(e,t.meta),{})}function cN(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;QM(e,t[i])<0?r=i:n=i+1}let i=lN(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function lN(e){let t=e;for(;t=t.parent;)if(uN(t)&&QM(e,t)===0)return t}function uN({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function dN(e){let t=fr(Fj),n=fr(Ij),r=B(()=>{let n=D(e.to);return t.resolve(n)}),i=B(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(fM.bind(null,i));if(o>-1)return o;let s=gN(e[t-2]);return t>1&&gN(i)===s&&a[a.length-1].path!==s?a.findIndex(fM.bind(null,e[t-2])):o}),a=B(()=>i.value>-1&&hN(n.params,r.value.params)),o=B(()=>i.value>-1&&i.value===n.matched.length-1&&pM(n.params,r.value.params));function s(n={}){if(mN(n)){let n=t[D(e.replace)?`replace`:`push`](D(e.to)).catch(Dj);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:B(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function fN(e){return e.length===1?e[0]:e}var pN=k({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:dN,setup(e,{slots:t}){let n=Yt(dN(e)),{options:r}=fr(Fj),i=B(()=>({[_N(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[_N(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&fN(t.default(n));return e.custom?r:V(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function mN(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function hN(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!Oj(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function gN(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var _N=(e,t,n)=>e??t??n,vN=k({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=fr(Lj),i=B(()=>e.route||r.value),a=fr(Pj,0),o=B(()=>{let e=D(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=B(()=>i.value.matched[o.value]);dr(Pj,B(()=>o.value+1)),dr(Nj,s),dr(Lj,i);let c=E();return yr(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!fM(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return yN(n.default,{Component:l,route:r});let u=o.props[a],d=V(l,Tj({},u?u===!0?r.params:typeof u==`function`?u(r):u:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return yN(n.default,{Component:d,route:r})||d}}});function yN(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var bN=vN;function xN(e){let t=nN(e.routes,e),n=e.parseQuery||AM,r=e.stringifyQuery||jM,i=e.history,a=NM(),o=NM(),s=NM(),c=un(_M),l=_M;Rj&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=Ej.bind(null,e=>``+e),d=Ej.bind(null,iM),f=Ej.bind(null,aM);function p(e,n){let r,i;return kM(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=Tj({},a||c.value),typeof e==`string`){let r=cM(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return Tj(r,o,{params:f(o.params),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=Tj({},e,{path:cM(n,e.path,a.path).path});else{let t=Tj({},e.params);for(let e in t)t[e]??delete t[e];o=Tj({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=lM(r,Tj({},e,{hash:eM(l),path:s.path})),m=i.createHref(p);return Tj({fullPath:p,hash:l,query:r===jM?MM(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?cM(n,e,c.value.path):Tj({},e)}function y(e,t){if(l!==e)return jj(8,{from:t,to:e})}function b(e){return ee(e)}function x(e){return b(Tj(v(e),{replace:!0}))}function S(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),Tj({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function ee(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n,i);if(u)return ee(Tj(v(u),{state:typeof u==`object`?Tj({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&dM(r,i,n)&&(f=jj(16,{to:d,from:i}),fe(i,i,!0,!1)),(f?Promise.resolve(f):te(d,i)).catch(e=>Mj(e)?Mj(e,2)?e:de(e):le(e,d,i)).then(e=>{if(e){if(Mj(e,2))return ee(Tj({replace:s},v(e.to),{state:typeof e.to==`object`?Tj({},a,e.to.state):a,force:o}),t||d)}else e=re(d,i,!0,s,a);return ne(d,i,e),e})}function C(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function w(e){let t=he.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function te(e,t){let n,[r,i,s]=IM(e,t);n=FM(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(PM(r,e,t))});let c=C.bind(null,e,t);return n.push(c),_e(n).then(()=>{n=[];for(let r of a.list())n.push(PM(r,e,t));return n.push(c),_e(n)}).then(()=>{n=FM(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(PM(r,e,t))});return n.push(c),_e(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(Oj(r.beforeEnter))for(let i of r.beforeEnter)n.push(PM(i,e,t));else n.push(PM(r.beforeEnter,e,t));return n.push(c),_e(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=FM(s,`beforeRouteEnter`,e,t,w),n.push(c),_e(n))).then(()=>{n=[];for(let r of o.list())n.push(PM(r,e,t));return n.push(c),_e(n)}).catch(e=>Mj(e,8)?e:Promise.reject(e))}function ne(e,t,n){s.list().forEach(r=>w(()=>r(e,t,n)))}function re(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===_M,l=Rj?history.state:{};n&&(r||s?i.replace(e.fullPath,Tj({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,fe(e,t,n,s),de()}let ie;function ae(){ie||=i.listen((e,t,n)=>{if(!ge.listening)return;let r=_(e),a=S(r,ge.currentRoute.value);if(a){ee(Tj(a,{replace:!0,force:!0}),r).catch(Dj);return}l=r;let o=c.value;Rj&&EM(wM(o.fullPath,n.delta),SM()),te(r,o).catch(e=>Mj(e,12)?e:Mj(e,2)?(ee(Tj(v(e.to),{force:!0}),r).then(e=>{Mj(e,20)&&!n.delta&&n.type===`pop`&&i.go(-1,!1)}).catch(Dj),Promise.reject()):(n.delta&&i.go(-n.delta,!1),le(e,r,o))).then(e=>{e||=re(r,o,!1),e&&(n.delta&&!Mj(e,8)?i.go(-n.delta,!1):n.type===`pop`&&Mj(e,20)&&i.go(-1,!1)),ne(r,o,e)}).catch(Dj)})}let oe=NM(),se=NM(),ce;function le(e,t,n){de(e);let r=se.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function ue(){return ce&&c.value!==_M?Promise.resolve():new Promise((e,t)=>{oe.add([e,t])})}function de(e){return ce||(ce=!e,ae(),oe.list().forEach(([t,n])=>e?n(e):t()),oe.reset()),e}function fe(t,n,r,i){let{scrollBehavior:a}=e;if(!Rj||!a)return Promise.resolve();let o=!r&&DM(wM(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return Gn().then(()=>a(t,n,o)).then(e=>t===c.value&&e&&CM(e)).catch(e=>t===c.value&&le(e,t,n))}let pe=e=>i.go(e),me,he=new Set,ge={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:pe,back:()=>pe(-1),forward:()=>pe(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:se.add,isReady:ue,install(e){e.component(`RouterLink`,pN),e.component(`RouterView`,bN),e.config.globalProperties.$router=ge,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>D(c)}),Rj&&!me&&c.value===_M&&(me=!0,b(i.location).catch(e=>{}));let t={};for(let e in _M)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(Fj,ge),e.provide(Ij,Xt(t)),e.provide(Lj,c);let n=e.unmount;he.add(e),e.unmount=function(){he.delete(e),he.size<1&&(l=_M,ie&&ie(),ie=null,c.value=_M,me=!1,ce=!1),n()}}};function _e(e){return e.reduce((e,t)=>e.then(()=>w(t)),Promise.resolve())}return ge}function SN(e,t){return Be()?(Ve(e,t),!0):!1}function CN(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return SN(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t))),clear:()=>{e.clear()}}}function wN(e){let t=!1,n,r=ze(!0);return((...i)=>(t||=(n=r.run(()=>e(...i)),!0),n))}var TN=new WeakMap,EN=(...e)=>{let t=e[0],n=ss()?.proxy??Be();if(n==null&&!pr())throw Error(`injectLocal must be called in setup`);return n&&TN.has(n)&&t in TN.get(n)?TN.get(n)[t]:fr(...e)},DN=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var ON=e=>e!==void 0,kN=e=>e!=null,AN=Object.prototype.toString,jN=e=>AN.call(e)===`[object Object]`,MN=()=>{},NN=PN();function PN(){var e,t;return DN&&!!((e=window)!=null&&(e=e.navigator)!=null&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function FN(...e){if(e.length!==1)return Sn(...e);let t=e[0];return typeof t==`function`?Zt(vn(()=>({get:t,set:MN}))):E(t)}function IN(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return`cancel`in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}var LN=e=>e();function RN(e,t={}){let n,r,i=MN,a=MN,o=un(!1),s=e=>{clearTimeout(e),i(),i=MN},c;return Object.assign(l=>{let u=mn(e),d=mn(t.maxWait);return n&&s(n),u<=0||d!==void 0&&d<=0?(r&&=(s(r),void 0),o.value=!1,Promise.resolve(l())):(o.value=!0,new Promise((e,f)=>{i=t.rejectOnCancel?f:e,a=e,c=l,d&&!r&&(r=setTimeout(()=>{n&&s(n),r=void 0,o.value=!1,e(c())},d)),n=setTimeout(()=>{r&&s(r),r=void 0,o.value=!1,e(l())},u)}))},{cancel:()=>{n&&=(s(n),void 0),r&&=(s(r),void 0),o.value=!1,a=MN},flush:()=>{if(o.value){n&&=(clearTimeout(n),void 0),r&&=(clearTimeout(r),void 0),o.value=!1;let e=a;i=MN,a=MN,e(c())}},isPending:Qt(o)})}function zN(...e){let t=0,n,r=!0,i=MN,a,o,s,c,l;!ln(e[0])&&typeof e[0]==`object`?{delay:o,trailing:s=!0,leading:c=!0,rejectOnCancel:l=!1}=e[0]:[o,s=!0,c=!0,l=!1]=e;let u=()=>{n&&(clearTimeout(n),n=void 0,i(),i=MN)};return e=>{let d=mn(o),f=Date.now()-t,p=()=>a=e();return u(),d<=0?(t=Date.now(),p()):(f>d?(t=Date.now(),(c||!r)&&p()):s&&(a=new Promise((e,a)=>{i=l?a:e,n=setTimeout(()=>{t=Date.now(),r=!0,e(p()),u()},Math.max(0,d-f))})),!c&&!n&&(n=setTimeout(()=>r=!0,d)),r=!1,a)}}function BN(e=LN,t={}){let{initialState:n=`active`}=t,r=FN(n===`active`);function i(){r.value=!1}function a(){r.value=!0}return{isActive:Qt(r),pause:i,resume:a,eventFilter:(...t)=>{r.value&&e(...t)}}}function VN(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function HN(e){return Array.isArray(e)?e:[e]}function UN(e){return e||ss()}function WN(e){if(!DN)return e;let t=0,n,r,i=()=>{--t,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return((...a)=>(t+=1,r||(r=ze(!0),n=r.run(()=>e(...a))),SN(i),n))}function GN(e){return Yt(ln(e)?new Proxy({},{get(t,n,r){return D(Reflect.get(e.value,n,r))},set(t,n,r){return ln(e.value[n])&&!ln(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}):e)}function KN(e){return GN(B(e))}function qN(e,...t){let n=t.flat(),r=n[0];return KN(()=>Object.fromEntries(typeof r==`function`?Object.entries(yn(e)).filter(([e,t])=>!r(mn(t),e)):Object.entries(yn(e)).filter(e=>!n.includes(e[0]))))}function JN(e,t=1e4){return vn((n,r)=>{let i=mn(e),a,o=()=>setTimeout(()=>{i=mn(e),r()},mn(t));return SN(()=>{clearTimeout(a)}),{get(){return n(),i},set(e){i=e,r(),clearTimeout(a),a=o()}}})}function YN(e,t=200,n={}){return IN(RN(t,n),e)}function XN(e,t=200,n=!1,r=!0,i=!1){return IN(zN(t,n,r,i),e)}function ZN(e,t,n={}){let{eventFilter:r=LN,...i}=n;return yr(e,IN(r,t),i)}function QN(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=BN(r,{initialState:i});return{stop:ZN(e,t,{...a,eventFilter:o}),pause:s,resume:c,isActive:l}}function $N(e,t,...[n]){let{flush:r=`sync`,deep:i=!1,immediate:a=!0,direction:o=`both`,transform:s={}}=n||{},c=[],l=`ltr`in s&&s.ltr||(e=>e),u=`rtl`in s&&s.rtl||(e=>e);return(o===`both`||o===`ltr`)&&c.push(QN(e,e=>{c.forEach(e=>e.pause()),t.value=l(e),c.forEach(e=>e.resume())},{flush:r,deep:i,immediate:a})),(o===`both`||o===`rtl`)&&c.push(QN(t,t=>{c.forEach(e=>e.pause()),e.value=u(t),c.forEach(e=>e.resume())},{flush:r,deep:i,immediate:a})),()=>{c.forEach(e=>e.stop())}}function eP(e,t){UN(t)&&Ri(e,t)}function tP(e,t=!0,n){UN(n)?Fi(e,n):t?e():Gn(e)}function nP(e,t){UN(t)&&zi(e,t)}function rP(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=un(!1),o;function s(){o&&=(clearTimeout(o),void 0)}function c(){a.value=!1,s()}function l(...n){i&&e(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=void 0,e(...n)},mn(t))}return r&&(a.value=!0,DN&&l()),SN(c),{isPending:Qt(a),start:l,stop:c}}function iP(e=1e3,t={}){let{controls:n=!1,callback:r}=t,i=rP(r??MN,e,t),a=B(()=>!i.isPending.value);return n?{ready:a,...i}:a}function aP(e,t,n){return yr(e,t,{...n,immediate:!0})}function oP(e,t,n){return yr(e,t,{...n,once:!0})}function sP(e,t,n){let r;r=ln(n)?{evaluating:n}:n||{};let{lazy:i=!1,flush:a=`sync`,evaluating:o=void 0,shallow:s=!0,onError:c=globalThis.reportError??MN}=r,l=un(!i),u=s?un(t):E(t),d=0;return gr(async t=>{if(!l.value)return;d++;let n=d,r=!1;o&&Promise.resolve().then(()=>{o.value=!0});try{let i=await e(e=>{t(()=>{o&&(o.value=!1),r||e()})});n===d&&(u.value=i)}catch(e){c(e)}finally{o&&n===d&&(o.value=!1),r=!0}},{flush:a}),i?B(()=>(l.value=!0,u.value)):u}var cP=DN?window:void 0;DN&&window.document,DN&&window.navigator,DN&&window.location;function lP(e){let t=mn(e);return t?.$el??t}function uP(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=B(()=>{let t=HN(mn(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return aP(()=>[n.value?.map(e=>lP(e))??[cP].filter(e=>e!=null),HN(mn(n.value?e[1]:e[0])),HN(D(n.value?e[2]:e[1])),mn(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=jN(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}var dP=!1;function fP(e,t,n={}){let{window:r=cP,ignore:i=[],capture:a=!0,detectIframe:o=!1,controls:s=!1}=n;if(!r)return s?{stop:MN,cancel:MN,trigger:MN}:MN;if(NN&&!dP){dP=!0;let e={passive:!0};Array.from(r.document.body.children).forEach(t=>t.addEventListener(`click`,MN,e)),r.document.documentElement.addEventListener(`click`,MN,e)}let c=!0,l=e=>mn(i).some(t=>{if(typeof t==`string`)return Array.from(r.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{let n=lP(t);return n&&(e.target===n||e.composedPath().includes(n))}});function u(e){let t=mn(e);return t&&t.$.subTree.shapeFlag===16}function d(e,t){let n=mn(e),r=n.$.subTree&&n.$.subTree.children;return r==null||!Array.isArray(r)?!1:r.some(e=>e.el===t.target||t.composedPath().includes(e.el))}let f=n=>{let r=lP(e);if(n.target!=null&&!(!(r instanceof Element)&&u(e)&&d(e,n))&&!(!r||r===n.target||n.composedPath().includes(r))){if(`detail`in n&&n.detail===0&&(c=!l(n)),!c){c=!0;return}t(n)}},p=!1,m=[uP(r,`click`,e=>{p||(p=!0,setTimeout(()=>{p=!1},0),f(e))},{passive:!0,capture:a}),uP(r,`pointerdown`,t=>{let n=lP(e);c=!l(t)&&!!(n&&!t.composedPath().includes(n))},{passive:!0}),o&&uP(r,`blur`,n=>{setTimeout(()=>{let i=lP(e),a=r.document.activeElement;for(;a?.shadowRoot;)a=a.shadowRoot.activeElement;a?.tagName===`IFRAME`&&!i?.contains(r.document.activeElement)&&t(n)},0)},{passive:!0})].filter(Boolean),h=()=>m.forEach(e=>e());return s?{stop:h,cancel:()=>{c=!1},trigger:e=>{c=!0,f(e),c=!1}}:h}function pP(){let e=un(!1),t=ss();return t&&Fi(()=>{e.value=!0},t),e}function mP(e){let t=pP();return B(()=>(t.value,!!e()))}function hP(e,t,n={}){let{window:r=cP,...i}=n,a,o=mP(()=>r&&`MutationObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=yr(B(()=>{let t=HN(mn(e)).map(lP).filter(kN);return new Set(t)}),e=>{s(),o.value&&e.size&&(a=new MutationObserver(t),e.forEach(e=>a.observe(e,i)))},{immediate:!0,flush:`post`}),l=()=>a?.takeRecords(),u=()=>{c(),s()};return SN(u),{isSupported:o,stop:u,takeRecords:l}}function gP(e,t,n={}){let{window:r=cP,document:i=r?.document,flush:a=`sync`}=n;if(!r||!i)return MN;let o,s=e=>{o?.(),o=e},c=gr(()=>{let n=lP(e);if(n){let{stop:e}=hP(i,e=>{e.map(e=>[...e.removedNodes]).flat().some(e=>e===n||e.contains(n))&&t(e)},{window:r,childList:!0,subtree:!0});s(e)}},{flush:a}),l=()=>{c(),s()};return SN(l),l}function _P(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function vP(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=cP,eventName:a=`keydown`,passive:o=!1,dedupe:s=!1}=r,c=_P(t);return uP(i,a,e=>{e.repeat&&mn(s)||c(e)&&n(e)},o)}function yP(e={}){let{window:t=cP,deep:n=!0,triggerOnRemoval:r=!1}=e,i=e.document??t?.document,a=()=>{let e=i?.activeElement;if(n)for(var t;e?.shadowRoot;)e=e==null||(t=e.shadowRoot)==null?void 0:t.activeElement;return e},o=un(),s=()=>{o.value=a()};if(t){let e={capture:!0,passive:!0};uP(t,`blur`,e=>{e.relatedTarget===null&&s()},e),uP(t,`focus`,s,e)}return r&&gP(o,s,{document:i}),s(),o}function bP(e,t={}){let{immediate:n=!0,fpsLimit:r=null,window:i=cP,once:a=!1}=t,o=un(!1),s=B(()=>{let e=mn(r);return e?1e3/e:null}),c=0,l=null;function u(t){if(!o.value||!i)return;c||=t;let n=t-c;if(s.value&&n<s.value){l=i.requestAnimationFrame(u);return}if(c=t,e({delta:n,timestamp:t}),a){o.value=!1,l=null;return}l=i.requestAnimationFrame(u)}function d(){!o.value&&i&&(o.value=!0,c=0,l=i.requestAnimationFrame(u))}function f(){o.value=!1,l!=null&&i&&(i.cancelAnimationFrame(l),l=null)}return n&&d(),SN(f),{isActive:Qt(o),pause:f,resume:d}}var xP=Symbol(`vueuse-ssr-width`);function SP(){let e=pr()?EN(xP,null):null;return typeof e==`number`?e:void 0}function CP(e,t={}){let{window:n=cP,ssrWidth:r=SP()}=t,i=mP(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),a=un(typeof r==`number`),o=un(),s=un(!1);return gr(()=>{if(a.value){a.value=!i.value;let t=mn(e).split(`,`);s.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=VN(n[1])),i&&a&&(a=r<=VN(i[1])),t?!a:a});return}i.value&&(o.value=n.matchMedia(mn(e)),s.value=o.value.matches)}),uP(o,`change`,e=>{s.value=e.matches},{passive:!0}),B(()=>s.value)}function wP(e){return JSON.parse(JSON.stringify(e))}var TP=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},EP=`__vueuse_ssr_handlers__`,DP=OP();function OP(){return EP in TP||(TP[EP]=TP[EP]||{}),TP[EP]}function kP(e,t){return DP[e]||t}function AP(e){return CP(`(prefers-color-scheme: dark)`,e)}function jP(e){return e==null?`any`:e instanceof Set?`set`:e instanceof Map?`map`:e instanceof Date?`date`:typeof e==`boolean`?`boolean`:typeof e==`string`?`string`:typeof e==`object`?`object`:Number.isNaN(e)?`any`:`number`}var MP={boolean:{read:e=>e===`true`,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},NP=`vueuse-storage`;function PP(e,t,n,r={}){let{flush:i=`pre`,deep:a=!0,listenToStorageChanges:o=!0,writeDefaults:s=!0,mergeDefaults:c=!1,shallow:l,window:u=cP,eventFilter:d,onError:f=e=>{console.error(e)},initOnMounted:p}=r,m=(l?un:E)(typeof t==`function`?t():t),h=B(()=>mn(e));if(!n)try{n=kP(`getDefaultStorage`,()=>cP?.localStorage)()}catch(e){f(e)}if(!n)return m;let g=mn(t),_=jP(g),v=r.serializer??MP[_],{pause:y,resume:b}=QN(m,e=>ee(e),{flush:i,deep:a,eventFilter:d});yr(h,()=>w(),{flush:i});let x=!1;u&&o&&(n instanceof Storage?uP(u,`storage`,e=>{p&&!x||w(e)},{passive:!0}):uP(u,NP,e=>{p&&!x||te(e)})),p?tP(()=>{x=!0,w()}):w();function S(e,t){if(u){let r={key:h.value,oldValue:e,newValue:t,storageArea:n};u.dispatchEvent(n instanceof Storage?new StorageEvent(`storage`,r):new CustomEvent(NP,{detail:r}))}}function ee(e){try{let t=n.getItem(h.value);if(e==null)S(t,null),n.removeItem(h.value);else{let r=v.write(e);t!==r&&(n.setItem(h.value,r),S(t,r))}}catch(e){f(e)}}function C(e){let t=e?e.newValue:n.getItem(h.value);if(t==null)return s&&g!=null&&n.setItem(h.value,v.write(g)),g;if(!e&&c){let e=v.read(t);return typeof c==`function`?c(e,g):_===`object`&&!Array.isArray(e)?{...g,...e}:e}return typeof t==`string`?v.read(t):t}function w(e){if(!(e&&e.storageArea!==n)){if(e&&e.key==null){m.value=g;return}if(!(e&&e.key!==h.value)){y();try{let t=v.write(m.value);(e===void 0||e?.newValue!==t)&&(m.value=C(e))}catch(e){f(e)}finally{e?Gn(b):b()}}}}function te(e){w(e.detail)}return m}function Fte(e,t,n={}){let{window:r=cP,...i}=n,a,o=mP(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=yr(B(()=>{let t=mn(e);return Array.isArray(t)?t.map(e=>lP(e)):[lP(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),l=()=>{s(),c()};return SN(l),{isSupported:o,stop:l}}function FP(e,t,n={}){let{root:r,rootMargin:i,threshold:a=0,window:o=cP,immediate:s=!0}=n,c=mP(()=>o&&`IntersectionObserver`in o),l=B(()=>HN(mn(e)).map(lP).filter(kN)),u=MN,d=un(s),f=c.value?yr(()=>[l.value,lP(r),mn(i),d.value],([e,n,r])=>{if(u(),!d.value||!e.length)return;let i=new IntersectionObserver(t,{root:lP(n),rootMargin:r,threshold:a});e.forEach(e=>e&&i.observe(e)),u=()=>{i.disconnect(),u=MN}},{immediate:s,flush:`post`}):MN,p=()=>{u(),f(),d.value=!1};return SN(p),{isSupported:c,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:p}}function IP(e,t={}){let{window:n=cP,scrollTarget:r,threshold:i=0,rootMargin:a,once:o=!1,initialValue:s=!1}=t,c=un(s),l=FP(e,e=>{let t=c.value,n=0;for(let r of e)r.time>=n&&(n=r.time,t=r.isIntersecting);c.value=t,o&&oP(c,()=>{l.stop()})},{root:r,window:n,threshold:i,rootMargin:a});return t.controls?{...l,isVisible:c}:c}var LP=`focusin`,RP=`focusout`,zP=`:focus-within`;function BP(e,t={}){let{window:n=cP}=t,r=B(()=>lP(e)),i=un(!1),a=B(()=>i.value),o=yP(t);if(!n||!o.value)return{focused:a};let s={passive:!0};return uP(r,LP,()=>i.value=!0,s),uP(r,RP,()=>{var e,t;return i.value=((e=r.value)==null||(t=e.matches)==null?void 0:t.call(e,zP))??!1},s),{focused:a}}function VP(e){return typeof Window<`u`&&e instanceof Window?e.document.documentElement:typeof Document<`u`&&e instanceof Document?e.documentElement:e}var HP=1;function UP(e,t={}){let{throttle:n=0,idle:r=200,onStop:i=MN,onScroll:a=MN,offset:o={left:0,right:0,top:0,bottom:0},observe:s={mutation:!1},eventListenerOptions:c={capture:!1,passive:!0},behavior:l=`auto`,window:u=cP,onError:d=e=>{console.error(e)}}=t,f=typeof s==`boolean`?{mutation:s}:s,p=un(0),m=un(0),h=B({get(){return p.value},set(e){_(e,void 0)}}),g=B({get(){return m.value},set(e){_(void 0,e)}});function _(t,n){var r,i;if(!u)return;let a=mn(e);if(!a)return;(r=a instanceof Document?u.document.body:a)==null||r.scrollTo({top:mn(n)??g.value,left:mn(t)??h.value,behavior:mn(l)});let o=(a==null||(i=a.document)==null?void 0:i.documentElement)||a?.documentElement||a;h!=null&&(p.value=o.scrollLeft),g!=null&&(m.value=o.scrollTop)}let v=un(!1),y=Yt({left:!0,right:!1,top:!0,bottom:!1}),b=Yt({left:!1,right:!1,top:!1,bottom:!1}),x=e=>{v.value&&(v.value=!1,b.left=!1,b.right=!1,b.top=!1,b.bottom=!1,i(e))},S=YN(x,n+r),ee=e=>{var t;if(!u)return;let n=(e==null||(t=e.document)==null?void 0:t.documentElement)||e?.documentElement||lP(e),{display:r,flexDirection:i,direction:a}=u.getComputedStyle(n),s=a===`rtl`?-1:1,c=n.scrollLeft;b.left=c<p.value,b.right=c>p.value;let l=Math.abs(c*s)<=(o.left||0),d=Math.abs(c*s)+n.clientWidth>=n.scrollWidth-(o.right||0)-HP;r===`flex`&&i===`row-reverse`?(y.left=d,y.right=l):(y.left=l,y.right=d),p.value=c;let f=n.scrollTop;e===u.document&&!f&&(f=u.document.body.scrollTop),b.top=f<m.value,b.bottom=f>m.value;let h=Math.abs(f)<=(o.top||0),g=Math.abs(f)+n.clientHeight>=n.scrollHeight-(o.bottom||0)-HP;r===`flex`&&i===`column-reverse`?(y.top=g,y.bottom=h):(y.top=h,y.bottom=g),m.value=f},C=e=>{if(!u)return;let t=e.target.documentElement??e.target;ee(t),v.value=!0,S(e),a(e)};return uP(e,`scroll`,n?XN(C,n,!0,!1):C,c),tP(()=>{try{let t=mn(e);if(!t)return;ee(t)}catch(e){d(e)}}),f?.mutation&&e!=null&&e!==u&&e!==document&&hP(e,()=>{let t=mn(e);t&&ee(t)},{attributes:!0,childList:!0,subtree:!0}),uP(e,`scrollend`,x,c),{x:h,y:g,isScrolling:v,arrivedState:y,directions:b,measure(){let t=mn(e);u&&t&&ee(t)}}}function WP(e,t,n={}){let{direction:r=`bottom`,interval:i=100,canLoadMore:a=()=>!0}=n,o=Yt(UP(e,{...n,offset:{[r]:n.distance??0,...n.offset}})),s=un(),c=B(()=>!!s.value),l=B(()=>VP(mn(e))),u=IP(l),d=B(()=>l.value?a(l.value):!1);function f(){if(o.measure(),!l.value||!u.value||!d.value||s.value)return;let{scrollHeight:e,clientHeight:n,scrollWidth:a,clientWidth:c}=l.value,p=r===`bottom`||r===`top`?e<=n:a<=c;(o.arrivedState[r]||p)&&(s.value=Promise.all([t(o),new Promise(e=>setTimeout(e,i))]).finally(()=>{s.value=null,Gn(()=>f())}))}return nP(yr(()=>[o.arrivedState[r],u.value,d.value],f,{immediate:!0,flush:`post`})),{isLoading:c,reset(){Gn(()=>f())}}}function GP(e={}){let{window:t=cP}=e,n=t?.navigator,r=mP(()=>n&&`language`in n),i=un(n?.language);return uP(t,`languagechange`,()=>{n&&(i.value=n.language)},{passive:!0}),{isSupported:r,language:i}}function KP(e,t,n,r={}){var i,a;let{clone:o=!1,passive:s=!1,eventName:c,deep:l=!1,defaultValue:u,shouldEmit:d}=r,f=ss(),p=n||f?.emit||(f==null||(i=f.$emit)==null?void 0:i.bind(f))||(f==null||(a=f.proxy)==null||(a=a.$emit)==null?void 0:a.bind(f?.proxy)),m=c;t||=`modelValue`,m||=`update:${t.toString()}`;let h=e=>o?typeof o==`function`?o(e):wP(e):e,g=()=>ON(e[t])?h(e[t]):u,_=e=>{d?d(e)&&p(m,e):p(m,e)};if(s){let n=E(g()),r=!1;return yr(()=>e[t],e=>{r||(r=!0,n.value=h(e),Gn(()=>r=!1))}),yr(n,n=>{!r&&(n!==e[t]||l)&&_(n)},{deep:l}),n}return B({get(){return g()},set(e){_(e)}})}var qP=Symbol.for(`VCThemeManager`);function JP(){return fr(qP,void 0)}function YP(e,t={}){let{syncClass:n=!0}=t,r=AP(),i=B(()=>e.value===`dark`?`dark`:e.value===`light`?`light`:r.value?`dark`:`light`),a=B({get:()=>e.value,set:t=>{e.value=t}}),o=B({get:()=>i.value===`dark`,set:t=>{e.value=t?`dark`:`light`}});n&&typeof document<`u`&&yr(i,e=>{document.documentElement.classList.toggle(`dark`,e===`dark`),document.documentElement.classList.toggle(`light`,e===`light`)},{immediate:!0});let s=JP();typeof document<`u`&&yr([i,()=>s?.themes],([e,t])=>{if(t)for(let n of t)n.colorMode?.handle(document,e)},{immediate:!0});function c(){e.value=i.value===`dark`?`light`:`dark`}return{mode:a,resolved:i,isDark:o,toggle:c}}var XP=new Set([`light`,`dark`,`system`]);function ZP(e){return typeof e==`string`&&XP.has(e)}var QP=[`primary`,`neutral`,`success`,`warning`,`error`,`info`],$P=[`slate`,`gray`,`zinc`,`neutral`,`stone`,`red`,`orange`,`amber`,`yellow`,`lime`,`green`,`emerald`,`teal`,`cyan`,`sky`,`blue`,`indigo`,`violet`,`purple`,`fuchsia`,`pink`,`rose`],eF=[`50`,`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`,`950`];new Set(QP),new Set($P);function tF(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function nF(e){if(typeof document>`u`)return;let t=document.cookie.match(RegExp(`(?:^|;\\s*)${tF(e)}=([^;]+)`))?.[1];if(t)try{return decodeURIComponent(t)}catch{return}}function rF(e,t,n=``){let r=E(t||nF(e)||n);return typeof document<`u`&&yr(r,t=>{document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=31536000; SameSite=Lax`}),r}var iF=`vc-color-mode`;function aF(e){let t=rF(iF,e,`system`);return YP(B({get:()=>ZP(t.value)?t.value:`system`,set(e){t.value=e}}))}function oF(e){if(!uE(e))return{message:typeof e==`string`?e:void 0};let t=e,{response:n}=t,r=uE(n)&&uE(n.data)?n.data:t,i=uE(n)&&typeof n.status==`number`?n.status:void 0,a;return typeof r.message==`string`?a=r.message:typeof t.message==`string`&&(a=t.message),{code:typeof r.code==`string`?r.code:void 0,data:r,message:a,issues:Array.isArray(r.issues)&&r.issues.length>0?r.issues:void 0,status:i}}var sF=function(e){return e.ACCESS_TOKEN=`access_token`,e.ACCESS_TOKEN_EXPIRE_DATE=`access_token_expire_date`,e.REFRESH_TOKEN=`refresh_token`,e.ID_TOKEN=`id_token`,e.USER=`user`,e.REALM=`realm`,e.REALM_MANAGEMENT=`realm_management`,e}({});String.fromCharCode;var cF=/#/g,lF=/&/g,Ite=/\//g,Lte=/=/g,uF=/\+/g,Rte=/%5e/gi,zte=/%60/gi,Bte=/%7c/gi,Vte=/%20/gi;function Hte(e){return encodeURI(``+e).replace(Bte,`|`)}function dF(e){return Hte(typeof e==`string`?e:JSON.stringify(e)).replace(uF,`%2B`).replace(Vte,`+`).replace(cF,`%23`).replace(lF,`%26`).replace(zte,"`").replace(Rte,`^`).replace(Ite,`%2F`)}function fF(e){return dF(e).replace(Lte,`%3D`)}function pF(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function Ute(e){return pF(e.replace(uF,` `))}function Wte(e){return pF(e.replace(uF,` `))}function Gte(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=Ute(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=Wte(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function Kte(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${fF(e)}=${dF(t)}`).join(`&`):`${fF(e)}=${dF(t)}`:fF(e)}function qte(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>Kte(t,e[t])).filter(Boolean).join(`&`)}var Jte=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,Yte=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Xte=/^([/\\]\s*){2,}[^/\\]/,Zte=/\/$|\/\?|\/#/,Qte=/^\.?\//;function mF(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?Jte.test(e):Yte.test(e)||(t.acceptRelative?Xte.test(e):!1)}function hF(e=``,t){return t?Zte.test(e):e.endsWith(`/`)}function $te(e=``,t){if(!t)return(hF(e)?e.slice(0,-1):e)||`/`;if(!hF(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function ene(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(hF(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function tne(e,t){if(rne(t)||mF(e))return e;let n=$te(t);if(e.startsWith(n)){let t=e[n.length];if(!t||t===`/`||t===`?`)return e}return ane(n,e)}function nne(e,t){let n=_F(e);return n.search=qte({...Gte(n.search),...t}),one(n)}function rne(e){return!e||e===`/`}function ine(e){return e&&e!==`/`}function ane(e,...t){let n=e||``;for(let e of t.filter(e=>ine(e)))if(n){let t=e.replace(Qte,``);n=ene(n)+t}else n=e;return n}var gF=Symbol.for(`ufo:protocolRelative`);function _F(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!mF(e,{acceptRelative:!0}))return t?_F(t+e):vF(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=vF(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[gF]:!r}}function vF(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function one(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[gF]?(e.protocol||``)+`//`:``)+i+a+t+n+r}var sne=globalThis.Blob,cne=globalThis.File,lne=globalThis.FormData,une=globalThis.Headers;globalThis.Request,globalThis.Response,globalThis.AbortController;var dne=globalThis.fetch||(()=>{throw Error("[node-fetch-native] Failed to fetch: `globalThis.fetch` is not available!")}),fne=Object.defineProperty,yF=(e,t)=>fne(e,`name`,{value:t,configurable:!0}),pne=Object.defineProperty,bF=yF((e,t)=>pne(e,`name`,{value:t,configurable:!0}),`e`);function xF(){return{agent:void 0,dispatcher:void 0}}yF(xF,`createProxy`),bF(xF,`createProxy`);function SF(){return globalThis.fetch}yF(SF,`createFetch`),bF(SF,`createFetch`),globalThis.fetch;var CF=(()=>{if(typeof globalThis<`u`)return globalThis;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global;throw Error(`unable to locate global object`)})(),wF=CF.File||cne,TF=CF.FormData||lne;CF.AbortController;var mne=CF.fetch||dne,EF=CF.Headers||une,DF=CF.Blob||sne;function hne(e){return xF(e)}function OF(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function gne(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function kF(e,t){return e=e.toLowerCase(),gne(t)===e}function AF(e){return typeof e==`object`&&!!e&&!!e&&!Array.isArray(e)}function _ne(e){return AF(e)&&typeof e.pipe==`function`}function jF(e){if(TF!==void 0&&e instanceof TF)return!0;let t=`[object FormData]`;return Object.prototype.toString.call(e)===t||!!e&&typeof e.toString==`function`&&e.toString()===t}function vne(e){return typeof ArrayBuffer<`u`&&e instanceof ArrayBuffer||kF(`ArrayBuffer`,e)}function yne(e){return wF!==void 0&&e instanceof wF||kF(`File`,e)}function bne(e){return DF!==void 0&&e instanceof DF||kF(`Blob`,e)}function xne(e){return typeof URLSearchParams<`u`&&e instanceof URLSearchParams||kF(`URLSearchParams`,e)}function Sne(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null||t===`bigint`?!0:t===`object`?Array.isArray(e)?!0:AF(e)||typeof e==`function`&&e.toJSON===`function`:!1}function Cne(e){return JSON.stringify(e,(e,t)=>typeof t==`bigint`?t.toString():t)}function MF(e){return typeof e==`object`&&!!e&&(typeof Promise<`u`&&e instanceof Promise||typeof e.then==`function`)}function NF(e,t){if(Array.isArray(e)){for(let n=0;n<e.length;n++){if(AF(e[n])||Array.isArray(e[n])){e[n]=t(NF(e[n],t),`${n}`);continue}e[n]=t(e[n],`${n}`)}return e}let n=Object.keys(e);for(let r of n){let n=e[r];if(AF(n)||Array.isArray(n)){e[r]=t(NF(n,t),r);continue}e[r]=t(n,r)}return e}var PF=Symbol.for(`hapic/ClientTransport`);function wne(e){return zl(e,PF)?!0:AF(e)&&typeof e.dispatch==`function`}var Tne=class{fetch;constructor(e={}){this.fetch=e.fetch?e.fetch.bind(CF):mne.bind(CF),Rl(this,PF)}async dispatch(e){let{url:t,proxy:n,...r}=e;if(n===!1)return this.fetch(t,r);let i;return typeof n!=`boolean`&&n!==void 0&&(i=n),this.fetch(t,{...r,...hne(i)})}};function FF(e){return AF(e)?e.headers!==void 0&&typeof e.ok==`boolean`:!1}var Ene=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Dne(e){if(typeof e!=`string`||e.length===0)return`stream`;let t=e.split(`;`).shift()||``;return Ene.test(t)?`json`:[`image/svg`,`application/xml`,`application/xhtml`,`application/html`].includes(t)||t.startsWith(`text/`)?`text`:`json`}typeof globalThis<`u`&&globalThis.Response!==void 0&&globalThis.Response;var IF=function(e){return e.REQUEST=`request`,e.REQUEST_ERROR=`requestError`,e.RESPONSE=`response`,e.RESPONSE_ERROR=`responseError`,e}({}),One=Symbol.for(`hapic/HapicError`),kne=class extends Jl{constructor(e={}){super(e),Rl(this,One)}},LF=Symbol.for(`hapic/ClientError`),RF=class extends kne{request;response;status;statusCode;statusMessage;statusText;constructor(e){super({message:e.message,code:e.code,cause:e.error}),this.request=e.request,this.response=e.response,this.status=e.response&&e.response.status,this.statusCode=e.response&&e.response.status,this.statusMessage=e.response&&e.response.statusText,this.statusText=e.response&&e.response.statusText,Rl(this,LF)}},Ane=Symbol.for(`hapic/HttpResponseError`),jne=class extends RF{constructor(e){super(e),Rl(this,Ane)}},Mne=Symbol.for(`hapic/NetworkError`),Nne=class extends RF{constructor(e){super(e),Rl(this,Mne)}};function zF(e){return zl(e,LF)}function BF(e){if(e.url){let t=[];return e.method&&t.push(e.method),t.push(e.url),t.join(` `)}return e.toString()}function Pne(e){let t;e.request&&e.response?t=`${e.response.status} ${e.response.statusText} (${BF(e.request)})`:e.request&&(t=`${BF(e.request)}`),e.error&&e.error.message&&(t=`${e.error.message} (${t})`),t||=`An unknown error occurred.`;let n=!!e.error&&e.error.name===`AbortError`,r;return e.response||(r=n?`ECONNABORTED`:`ECONNRESET`),new(e.response?jne:Nne)({...e,code:r,message:t})}function Fne(e){if(e instanceof Error)return e;if(AF(e))return e.constructor.name===`TypeError`?(Object.setPrototypeOf(e,TypeError.prototype),e):(Ine(Error(e.message),e),e)}function Ine(e,t){let n=Object.getOwnPropertyNames(t);for(let r of n)e[r]=t[r]}function VF(e){switch(e.type){case`Basic`:return`Basic ${Buffer.from(`${e.username}:${e.password}`).toString(`base64`)}`;case`Bearer`:return`Bearer ${e.token}`;case`X-API-Key`:case`API-Key`:return`${e.type} ${e.key}`}return``}var HF=function(e){return e.ACCEPT=`accept`,e.AUTHORIZATION=`authorization`,e.CONTENT_TYPE=`content-type`,e}({});function UF(e){return EF!==void 0&&e instanceof EF}var WF=class e{container;constructor(e={}){this.container=e}has(e){return this.get(e)!==void 0}get(e){e=e.toLowerCase();let{container:t}=this;if(UF(t)){let n=t.get(e);return n===null?void 0:n}if(Array.isArray(t)){let n=t.find(t=>t.length===2&&t[0].toLowerCase()===e);return n?n[1]:void 0}let n=Object.keys(t).find(t=>t.toLowerCase()===e);return n===void 0?void 0:t[n]}set(e,t){e=e.toLowerCase();let{container:n}=this;if(UF(n))return n.set(e,t),this;if(Array.isArray(n)){let r=n.findIndex(t=>t.length===2&&t[0].toLowerCase()===e);return r===-1?n.push([e,t]):n[r]=[e,t],this}let r=Object.keys(n).find(t=>t.toLowerCase()===e);return n[r??e]=t,this}unset(e){e=e.toLowerCase();let{container:t}=this;if(UF(t))return t.delete(e),this;if(Array.isArray(t)){let n=t.findIndex(t=>t.length===2&&t[0].toLowerCase()===e);return n!==-1&&t.splice(n,1),this}let n=Object.keys(t).find(t=>t.toLowerCase()===e);return n!==void 0&&delete t[n],this}forEach(e){let{container:t}=this;if(UF(t)){t.forEach(e);return}if(Array.isArray(t)){for(let n of t)n.length===2&&e(n[1],n[0]);return}let n=t;for(let t of Object.keys(n))e(n[t],t)}merge(t,n={}){let r=n.overwrite??!0;return new e(t).forEach((e,t)=>{(r||!this.has(t))&&this.set(t,e)}),this}};function Lne(e,t,n){new WF(e).set(t,n)}function Rne(e,t){return new WF(e).get(t)}function GF(e,t){new WF(e).unset(t)}function zne(){return(e,t)=>{if(jF(e)&&t.delete(`content-type`),vne(e)||yne(e)||bne(e)||jF(e)||_ne(e))return e;if(xne(e))return t.set(`content-type`,`application/x-www-form-urlencoded;charset=utf-8`),e;let n=(t.get(`content-type`)||``).includes(`application/json`);return(Sne(e)||n)&&(e=typeof e==`string`?e:Cne(e),t.has(`content-type`)||t.set(`content-type`,`application/json`),t.has(`accept`)||t.set(`accept`,`application/json`)),e}}function Bne(e){return e.transform||=[zne()],e.proxy===void 0&&(e.proxy=!0),e}function Vne(e=`GET`){return e=e.toUpperCase(),e===`PATCH`||e===`POST`||e===`PUT`}function KF(e){return AF(e)?typeof e.url==`string`:!1}var Hne=class{items;constructor(){this.items={}}addListener(e,t){return this.items[e]=this.items[e]||[],this.items[e].push(t),this.items[e].length-1}removeListener(e,t){if(!this.items[e])return;if(typeof t==`number`){this.items[e][t]=void 0;return}let n=this.items[e].indexOf(t);n!==-1&&(this.items[e][n]=void 0)}removeListeners(e){delete this.items[e]}async triggerReqHook(e){let t=this.items.request||[],n=e;for(let e of t){if(!e)continue;let t=e(n);MF(t)&&(t=await t),KF(t)&&(n=t)}return n}async triggerResHook(e){let t=this.items.response||[],n=e;for(let e of t){if(!e)continue;let t=e(n);MF(t)&&(t=await t),FF(t)&&(n=t)}return n}async triggerErrorHook(e,t){let n=this.items[e]||[],r=t;for(let e of n)if(e)try{let t=e(r);if(MF(t)&&(t=await t),FF(t))return{type:`response`,response:t};if(KF(t))return{type:`retry`,options:t}}catch(e){r=e}throw r}},qF=Symbol.for(`hapic/Client`),JF=class{defaults;headers;hookManager;transport;constructor(e={}){let{transport:t,...n}=e||{};if(t!==void 0&&!wne(t))throw TypeError(`Invalid transport: expected an object with a dispatch(request): Promise<Response> method.`);this.defaults=Bne(n),this.headers=new EF(this.defaults.headers),this.hookManager=new Hne,this.transport=t??new Tne,Rl(this,qF)}getBaseURL(){return this.defaults.baseURL}setBaseURL(e){return this.defaults.baseURL=e,this}setHeader(e,t){return this.headers.set(e,t),this}getHeader(e){return this.headers.get(e)}unsetHeader(e){return this.headers.has(e)&&this.headers.delete(e),this}unsetHeaders(){return this.headers.forEach((e,t)=>{this.headers.delete(t)}),this}setAuthorizationHeader(e){return this.setHeader(`authorization`,VF(e)),this}getAuthorizationHeader(){let e=this.getHeader(`authorization`);if(e!==null)return e}unsetAuthorizationHeader(){return this.unsetHeader(`authorization`),this}async request(e){let t=new EF(e.headers);new WF(t).merge(this.headers,{overwrite:!1});let n=e.baseURL||this.defaults.baseURL,r={...this.defaults,...e,headers:t,url:n?tne(e.url,n):e.url};if((r.query||r.params)&&(r.url=nne(r.url,NF({...r.params,...r.query},e=>typeof e==`bigint`?e.toString():e))),r=await this.hookManager.triggerReqHook(r),r.transform){let e=Array.isArray(r.transform)?r.transform:[r.transform];for(let t of e)r.body=t(r.body,r.headers)}let i=async(e,t)=>{let n=Pne(t);Error.captureStackTrace&&Error.captureStackTrace(n,this.request);let r=await this.hookManager.triggerErrorHook(e===`request`?`requestError`:`responseError`,n);return r.type===`response`?r.response:this.request(r.options)},a;try{Vne(r.method)||delete r.body;let{baseURL:e,responseType:t,responseTransform:n,params:i,query:o,transform:s,...c}=r;a=await this.transport.dispatch(c)}catch(e){return i(`request`,{request:r,error:Fne(e)})}let o=r.responseType||Dne(a.headers.get(`content-type`)),s;switch(o){case`stream`:s=a.body;break;case`blob`:s=await a.blob();break;case`arrayBuffer`:s=await a.arrayBuffer();break;case`text`:s=await a.text();break;default:{let e=await a.text();try{s=JSON.parse(e)}catch{s=e}}}return Object.defineProperty(a,"data",{get(){return s},set(e){s=e}}),a.status>=400&&a.status<600?i(`response`,{response:a,request:r}):await this.hookManager.triggerResHook(a)}get(e,t){return this.request({...t||{},method:`GET`,url:e})}delete(e,t){return this.request({...t||{},method:`DELETE`,url:e})}head(e,t){return this.request({...t||{},method:`HEAD`,url:e})}post(e,t,n){return this.request({...n||{},method:`POST`,url:e,body:t})}put(e,t,n){return this.request({...n||{},method:`PUT`,url:e,body:t})}patch(e,t,n){return this.request({...n||{},method:`PATCH`,url:e,body:t})}on(e,t){return this.hookManager.addListener(e,t)}off(e,t){return t===void 0?(this.hookManager.removeListeners(e),this):(this.hookManager.removeListener(e,t),this)}};function YF(e){let t=Object.create(null),n=t=>e.create(t);return{hasClient:e=>OF(t,e||`default`),setClient:(e,n)=>(t[n||`default`]=e,e),useClient:e=>{if(e||=`default`,Object.prototype.hasOwnProperty.call(t,e))return t[e];let r=n();return t[e]=r,r},unsetClient:e=>{e||=`default`,OF(t,e)&&delete t[e]},createClient:n,isClient:t=>zl(t,e.id)}}var{hasClient:Une,setClient:Wne,useClient:Gne,unsetClient:Kne,createClient:XF,isClient:qne}=YF({create:e=>new JF(e),id:qF});XF();function Jne(e){return!uE(e)||!uE(e.response)||!uE(e.response.data)||typeof e.response.data.code!=`string`?null:e.response.data.code}function ZF(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function QF(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function $F(e,t){return QF(e,t)}function eI(e,t){if(t===void 0||Object.keys(t).length===0)return e;let n=e.split(`.`),r=[];for(;n.length>0;){let e=n.shift();if(e===void 0)break;if(QF(t,e))r.push(t[e]);else{let i=!1,a=[],o=[...n];for(;o.length>0;){let n=[e,...o].join(`.`);if(QF(t,n)){r.push(t[n]),i=!0;break}{let e=o.pop();e&&a.unshift(e)}}i?n=a:r.push(e)}}return r.length===0?e:r.join(`.`)}var Yne={field:`fields`,filter:`filters`,include:`relations`,limit:`pagination`,offset:`pagination`,page:`pagination`,relation:`relations`};function Xne(e){return Yne[e]}function tI(e,t,n){let r=Object.keys(e);for(let e of r)if(!t.includes(e))throw n(e,Xne(e))}function nI(e,t,n,r){let i=$F(e,t)&&e[t]!==void 0,a=$F(e,n)&&e[n]!==void 0;if(i&&a)throw r(t,n);if(i)return e[t];if(a)return e[n]}var Zne=/^(?:([0-9]+):)?((?:[a-zA-Z0-9-_]+\.)*)([a-zA-Z0-9-_]+)$/,rI=new Set([`__proto__`,`constructor`,`prototype`]);function iI(e){let t=e.indexOf(`:`),n=t===-1?e:e.substring(t+1);if(!n.includes(`.`))return rI.has(n);for(let e of n.split(`.`))if(rI.has(e))return!0;return!1}function aI(e){let t=Zne.exec(e);if(!t)return{name:e};let[,n,r,i]=t;return{group:n,path:r&&r.at(-1)===`.`?r.substring(0,r.length-1):r,name:i??e}}function oI(e){return`${e.group?`${e.group}:`:``}${e.path?`${e.path}.`:``}${e.name}`}function sI(e,t){return t===void 0?!0:Array.isArray(t)?t.includes(e):t.value.some(t=>t.name===e)}function cI(e,t){if(!ZF(e)||typeof e.accept!=`function`)return!1;let n=!1,r={[t]:()=>{n=!0}};try{e.accept(r)}catch{}return n}function lI(e){return/^[a-zA-Z_][a-zA-Z0-9_]*$/gu.test(e)}var uI=function(e){return e.FILTERS=`filters`,e.FIELDS=`fields`,e.PAGINATION=`pagination`,e.RELATIONS=`relations`,e.SORTS=`sorts`,e.SORT=`sort`,e}({}),dI=`__DEFAULT__`;function fI(e){return e===`sort`?`sorts`:e}var pI=function(e){return e.NONE=`none`,e.INPUT_INVALID=`inputInvalid`,e.SYNTAX_INVALID=`syntaxInvalid`,e.KEY_INVALID=`keyInvalid`,e.KEY_PATH_INVALID=`keyPathInvalid`,e.KEY_NOT_ALLOWED=`keyNotAllowed`,e.KEY_PATH_NOT_ALLOWED=`keyPathNotAllowed`,e.KEY_VALUE_INVALID=`keyValueInvalid`,e.KEY_VALIDATE_REJECTED=`keyValidateRejected`,e.KEY_UNKNOWN=`keyUnknown`,e.KEY_AMBIGUOUS=`keyAmbiguous`,e.KEY_COMBINATION_NOT_INDEXED=`keyCombinationNotIndexed`,e.LIMIT_EXCEEDED=`limitExceeded`,e.OPERATOR_UNSUPPORTED=`operatorUnsupported`,e.FEATURE_UNSUPPORTED=`featureUnsupported`,e.FIELDS_CONDITION_DISCARDED=`fieldsConditionDiscarded`,e.CONDITION_DETACHED=`conditionDetached`,e.CODEC_UNRESOLVABLE=`codecUnresolvable`,e.SCHEMA_ENTITY_INDEX_MISMATCH=`schemaEntityIndexMismatch`,e.SCHEMA_ENTITY_MISMATCH=`schemaEntityMismatch`,e.SCHEMA_KEY_VALIDATOR_CONFLICT=`schemaKeyValidatorConflict`,e.SCHEMA_NAME_INVALID=`schemaNameInvalid`,e.SCHEMA_PRESERVED_CONDITION_PRUNED=`schemaPreservedConditionPruned`,e.SCHEMA_UNRESOLVABLE=`schemaUnresolvable`,e.SCHEMA_VALIDATOR_ASYNC_REQUIRES_ASYNC_PARSER=`schemaValidatorAsyncRequiresAsyncParser`,e}({}),mI=class extends Error{code;constructor(e){typeof e==`string`?(super(e),this.code=`none`):(super(e.message),this.code=e.code||`none`)}},hI=class extends mI{constructor(e){ZF(e)&&(e.message=e.message||`An adapter error has occurred.`),super(e||`An adapter error has occurred.`)}static operatorUnsupported(e){return new this({message:`The filter operator ${e} is not supported.`,code:`operatorUnsupported`})}static conditionDetached(e){return new this({message:`The condition${e?` (${e})`:``} cannot be lowered by this built-in consumer. A custom condition needs a compatible consumer; detached transport data must be rebuilt with the condition helpers (eq, and, or, …) before passing it to an adapter.`,code:`conditionDetached`})}static featureUnsupported(e){return new this({message:`The feature ${e} is not supported by the dialect.`,code:`featureUnsupported`})}},gI=class extends mI{constructor(e){ZF(e)&&(e.message=e.message||`A building error has occurred.`),super(e||`A building error has occurred.`)}static inputInvalid(){return new this({message:`The shape of the input is not valid.`,code:`inputInvalid`})}static keyInvalid(e){return new this({message:`The key ${e} is invalid.`,code:`keyInvalid`})}static keyValueInvalid(e){return new this({message:`The value of the key ${e} is invalid.`,code:`keyValueInvalid`})}static operatorUnsupported(e){return new this({message:`The operator ${e} is not supported.`,code:`operatorUnsupported`})}static keyUnknown(e,t){return new this({message:t?`The key ${e} is unknown. Did you mean ${t}?`:`The key ${e} is unknown.`,code:`keyUnknown`})}static keyAmbiguous(e,t){return new this({message:`The keys ${e} and ${t} are two spellings of the same parameter. Use ${e}.`,code:`keyAmbiguous`})}},_I=class extends mI{constructor(e){ZF(e)&&(e.message=e.message||`A codec error has occurred.`),super(e||`A codec error has occurred.`)}static notResolvable(e){return new this({message:e?`The codec ${e} could not be resolved.`:`No codec could be resolved.`,code:`codecUnresolvable`})}},vI=class extends mI{constructor(e){ZF(e)&&(e.message=e.message||`A merging error has occurred.`),super(e||`A merging error has occurred.`)}static fieldsConditionDiscarded(e){return new this({message:`Merging fields would discard the visibility condition on "${e}". A gated field cannot be displaced; keep the gated query as the receiver or remove the colliding field first.`,code:`fieldsConditionDiscarded`})}},yI=class extends mI{constructor(e){ZF(e)&&(e.message=e.message||`A parsing error has occurred.`),super(e||`A parsing error has occurred.`)}static inputInvalid(){return new this({message:`The shape of the input is not valid.`,code:`inputInvalid`})}static syntaxInvalid(e){return new this({message:e?`The input syntax is invalid: ${e}`:`The input syntax is invalid.`,code:`syntaxInvalid`})}static keyNotPermitted(e){return new this({message:`The key ${e} is not permitted.`,code:`keyNotAllowed`})}static keyInvalid(e){return new this({message:`The key ${e} is invalid.`,code:`keyInvalid`})}static keyPathInvalid(e){return new this({message:`The key path ${e} is invalid.`,code:`keyPathInvalid`})}static keyPathNotPermitted(e){return new this({message:`The key path ${e} is not permitted.`,code:`keyPathNotAllowed`})}static keyValueInvalid(e){return new this({message:`The value of the key ${e} is invalid.`,code:`keyValueInvalid`})}static keyValidateRejected(e){return new this({message:`The key ${e} was rejected by the schema validator.`,code:`keyValidateRejected`})}static keyCombinationNotIndexed(e){return new this({message:`The key combination ${e.join(`, `)} is not indexed.`,code:`keyCombinationNotIndexed`})}static operatorUnsupported(e){return new this({message:`The operator ${e} is not supported.`,code:`operatorUnsupported`})}static featureUnsupported(e){return new this({message:`The feature ${e} is not supported.`,code:`featureUnsupported`})}static keyAmbiguous(e,t){return new this({message:`The keys ${e} and ${t} are two spellings of the same parameter. Use ${e}.`,code:`keyAmbiguous`})}},bI=class extends mI{constructor(e){ZF(e)&&(e.message=e.message||`A schema error has occurred.`),super(e||`A schema error has occurred.`)}static nameUndefined(){return new this({message:`The schema name is not defined.`,code:`schemaNameInvalid`})}static notResolvable(e){return new this({message:`The schema "${e}" could not be resolved.`,code:`schemaUnresolvable`})}static keyValidatorConflict(e){return new this({message:`The ${e} schema declares both validate and validateMany.`,code:`schemaKeyValidatorConflict`})}static preservedConditionPruned(e,t){return new this({message:`The relations validator rejected "${e}", but the preserved filter condition on "${t}" traverses it. A preserved condition must not be dropped, and a rejected relation must not be joined: align the relations validator with the filters validator that preserved it.`,code:`schemaPreservedConditionPruned`})}static preservedConditionNotIndexed(e){return new this({message:`The filter combination ${e.join(`, `)} violates the index policy, but the tree carries a preserved condition that must not be dropped: let the validator residual anchor a declared index, or enable throwOnFailure to reject the request instead.`,code:`schemaPreservedConditionPruned`})}static validatorAsyncRequiresAsyncParser(){return new this({message:`Asynchronous schema validators require parseAsync().`,code:`schemaValidatorAsyncRequiresAsyncParser`})}static keyUnknown(e,t){return new this({message:t?`The schema key ${e} is unknown. Did you mean ${t}?`:`The schema key ${e} is unknown.`,code:`keyUnknown`})}static keyAmbiguous(e,t){return new this({message:`The schema keys ${e} and ${t} are two spellings of the same parameter. Use ${e}.`,code:`keyAmbiguous`})}},xI=class{name;operator;condition;constructor(e,t,n){this.name=e,this.operator=t,this.condition=n}accept(e){return e.visitField(this)}},SI=function(e){return e.EQUAL=`eq`,e.NOT_EQUAL=`ne`,e.LESS_THAN_EQUAL=`lte`,e.LESS_THAN=`lt`,e.GREATER_THAN_EQUAL=`gte`,e.GREATER_THAN=`gt`,e.IN=`in`,e.NOT_IN=`nin`,e.STARTS_WITH=`startsWith`,e.NOT_STARTS_WITH=`notStartsWith`,e.ENDS_WITH=`endsWith`,e.NOT_ENDS_WITH=`notEndsWith`,e.CONTAINS=`contains`,e.NOT_CONTAINS=`notContains`,e.REGEX=`regex`,e.MOD=`mod`,e.SIZE=`size`,e.EXISTS=`exists`,e.ELEM_MATCH=`elemMatch`,e}({}),CI=function(e){return e.AND=`and`,e.OR=`or`,e.NOT=`not`,e}({});function wI(e){let t=aI(e);return{path:t.path??``,name:t.name}}function TI(e,t){let{path:n,name:r}=wI(e.field),i=t(n);return i?i.some(e=>e[0]===r):!1}function EI(e,t){if(!t)return!1;let n=new Set(e);return t.some(e=>{if(n.size>e.length)return!1;for(let t=0;t<n.size;t++)if(!n.has(e[t]))return!1;return!0})}function DI(e){let t=new Set(e.map(e=>wI(e.field).path)),[n]=t;return{path:t.size===1?n:``,keys:e.map(e=>e.field)}}function OI(e,t,n){for(let r of e)_L(r)?t.push(r):uL(r)&&r.operator===`and`?OI(r.value,t,n):n.push(r)}function kI(e,t,n,r){if(r===`cover`){let i=new Map;for(let t of e){let{path:e,name:n}=wI(t.field),r=i.get(e);r?r.push(n):i.set(e,[n])}for(let[e,t]of i)if(!EI(t,n(e)))return{pass:!1,anchors:!1,skipped:!1,violation:{path:e,keys:t}};let a=t.map(e=>AI(e,n,r));return a.find(e=>!e.pass)||(e.length>0||a.some(e=>!e.skipped)?{pass:!0,anchors:!0,skipped:!1}:{pass:!0,anchors:!1,skipped:!0})}if(e.some(e=>TI(e,n)))return{pass:!0,anchors:!0,skipped:!1};let i=t.map(e=>AI(e,n,r));return i.some(e=>e.anchors)?{pass:!0,anchors:!0,skipped:!1}:e.length>0||i.some(e=>!e.skipped)?{pass:!1,anchors:!1,skipped:!1,violation:i.find(e=>!e.pass)?.violation??DI(e)}:{pass:!0,anchors:!1,skipped:!0}}function AI(e,t,n){if(_L(e))return kI([e],[],t,n);if(uL(e)){if(e.operator===`or`){let r=!0;for(let i of e.value){let e=AI(i,t,n);if(!e.pass)return e;r&&=e.skipped}return{pass:!0,anchors:!r,skipped:r}}let r=[],i=[];return OI(e.value,r,i),kI(r,i,t,n)}return{pass:!0,anchors:!1,skipped:!0}}function jI(e,t,n){let r=AI(e,t,n);return r.pass?{ok:!0}:{ok:!1,...r.violation??{path:``,keys:[]}}}function MI(e,t){if(e.length===0)return{ok:!0};let n=e.map(wI),{path:r}=n[0],i={ok:!1,path:r,keys:e};if(n.some(e=>e.path!==r))return i;let a=t(r);if(!a)return i;let o=n.map(e=>e.name);for(let e of a)if(o.length<=e.length&&o.every((t,n)=>e[n]===t))return{ok:!0};return i}var NI=function(e){return e.INCLUDE=`+`,e.EXCLUDE=`-`,e}({}),PI=class{options;constructor(e){this.options=e}set name(e){this.options.name=e}get name(){return this.options.name}set throwOnFailure(e){this.options.throwOnFailure=e}get throwOnFailure(){return this.options.throwOnFailure}set strict(e){this.options.strict=e}get strict(){return this.options.strict}mapSchema(e){return this.options.schemaMapping&&this.options.schemaMapping[e]||e}},FI=class extends PI{parameter;constructor(e,t){if(super(e),this.parameter=t,this.options.validate!==void 0&&this.options.validateMany!==void 0)throw bI.keyValidatorConflict(t)}hasValidator(){return this.options.validate!==void 0||this.options.validateMany!==void 0}hasManyValidator(){return this.options.validateMany!==void 0}validate(e,t,n=``){return this.options.validate===void 0||this.options.validate(e,t,this.scope(n))}validateMany(e,t,n=``){return this.options.validateMany===void 0?{}:this.options.validateMany(e,t,this.scope(n))}scope(e){return{parameter:this.parameter,path:e,schema:this.name}}},II=class extends FI{default;defaultIsUndefined;allowed;allowedIsUndefined;reverseMapping;constructor(e={}){super(e,`fields`),this.allowed=[],this.allowedIsUndefined=!0,this.default=[],this.defaultIsUndefined=!0,this.reverseMapping={},this.setDefault(this.options.default),this.setAllowed(this.options.allowed),this.initReverseMapping()}get allDenied(){return!this.allowedIsUndefined&&this.allowed.length===0&&!this.defaultIsUndefined&&this.default.length===0}get mapping(){return this.options.mapping}setDefault(e){if(e===void 0){this.default=[],this.defaultIsUndefined=!0;return}this.default=e,this.defaultIsUndefined=!1}setAllowed(e){if(e===void 0){this.allowed=[],this.allowedIsUndefined=!0;return}this.allowed=e,this.allowedIsUndefined=!1}hasDefaults(){return!this.defaultIsUndefined&&this.default.length>0}describe(){return{default:this.defaultIsUndefined?null:[...this.default],allowed:this.allowedIsUndefined?null:[...this.allowed]}}isValid(e){return!this.allowedIsUndefined&&this.allowed.indexOf(e)!==-1||!this.defaultIsUndefined&&this.default.indexOf(e)!==-1?!0:this.allowedIsUndefined&&this.defaultIsUndefined?lI(e):!1}initReverseMapping(){this.options.mapping!==void 0&&(this.reverseMapping=this.buildReverseRecord(this.options.mapping))}buildReverseRecord(e){let t={};for(let[n,r]of Object.entries(e))t[r]=n;return t}};function LI(e={}){return new II(e)}var RI=class extends PI{default;defaultIsUndefined;allowed;allowedIsUndefined;caseSensitive;indexes;indexesIsUndefined;indexed;constructor(e={}){super(e),this.allowed=[],this.allowedIsUndefined=!0,this.default=void 0,this.defaultIsUndefined=!0,this.caseSensitive=[],this.indexes=[],this.indexesIsUndefined=!0,this.indexed=this.options.indexed===!0?`anchor`:this.options.indexed||!1,this.setDefault(this.options.default),this.setAllowed(this.options.allowed),this.setCaseSensitive(this.options.caseSensitive)}get mapping(){return this.options.mapping}hasDefaults(){return!this.defaultIsUndefined}describe(){return{allowed:this.allowedIsUndefined?null:[...this.allowed],indexed:this.indexed}}hasValidator(){return this.options.validate!==void 0}validate(e,t){return this.options.validate===void 0?e:this.options.validate(e,t)}setDefault(e){this.default=e,this.defaultIsUndefined=!e}setAllowed(e){if(e===void 0){this.allowed=[],this.allowedIsUndefined=!0;return}this.allowed=e,this.allowedIsUndefined=!1}setCaseSensitive(e){this.caseSensitive=e||[]}setIndexes(e){if(e===void 0){this.indexes=[],this.indexesIsUndefined=!0;return}this.indexes=e,this.indexesIsUndefined=!1}};function zI(e={}){return new RI(e)}var BI=class extends PI{get maxLimit(){return this.options.maxLimit}describe(){return{maxLimit:this.options.maxLimit??null}}};function VI(e={}){return new BI(e)}var HI=class extends FI{constructor(e={}){super(e,`relations`)}get allowed(){return this.options.allowed}get mapping(){return this.options.mapping||{}}describe(){return{allowed:this.options.allowed===void 0?null:[...this.options.allowed],schemas:null}}};function UI(e={}){return new HI(e)}var WI=function(e){return e.ASC=`ASC`,e.DESC=`DESC`,e}({}),GI=class extends FI{default;defaultKeys;defaultIsUndefined;allowed;allowedIsUndefined;indexes;indexesIsUndefined;indexed;constructor(e={}){super(e,`sorts`),this.allowed=[],this.allowedIsUndefined=!0,this.default={},this.defaultKeys=[],this.defaultIsUndefined=!0,this.indexes=[],this.indexesIsUndefined=!0,this.indexed=this.options.indexed??!1,this.buildDefault(),this.buildAllowed()}get mapping(){return this.options.mapping}describe(){return{allowed:this.allowedIsUndefined?null:[...this.allowed],default:this.defaultIsUndefined?null:{...this.default},indexed:this.indexed}}setIndexes(e){if(e===void 0){this.indexes=[],this.indexesIsUndefined=!0;return}this.indexes=e,this.indexesIsUndefined=!1}buildDefault(){if(!this.options.default){this.default={},this.defaultKeys=[],this.defaultIsUndefined=!0;return}this.default=this.options.default,this.defaultKeys=Object.keys(this.default),this.defaultIsUndefined=!1}buildAllowed(){if(this.options.allowed===void 0){if(this.options.default!==void 0){let e=this.options.default,t=Object.keys(e);if(t.length>0){this.allowed=t,this.allowedIsUndefined=!1;return}}this.allowed=[],this.allowedIsUndefined=!0;return}this.allowed=this.options.allowed,this.allowedIsUndefined=!1}};function KI(e={}){return new GI(e)}var qI=[`name`,`throwOnFailure`,`strict`,`schemaMapping`,`indexes`,`fields`,`filters`,`pagination`,`relations`,`sorts`,`sort`],JI=class extends PI{fields;filters;pagination;relations;sorts;sort;indexes;indexesIsUndefined;constructor(e={}){super(e),tI(e,qI,(e,t)=>bI.keyUnknown(e,t)),this.fields=e.fields instanceof II?e.fields:LI(e.fields),this.filters=e.filters instanceof RI?e.filters:zI(e.filters),this.pagination=e.pagination instanceof BI?e.pagination:VI(e.pagination),this.relations=e.relations instanceof HI?e.relations:UI(e.relations);let t=nI(e,`sorts`,`sort`,(e,t)=>bI.keyAmbiguous(e,t));this.sorts=t instanceof GI?t:KI(t),this.sort=this.sorts,e.indexes===void 0?(this.indexes=[],this.indexesIsUndefined=!0):(this.indexes=e.indexes.map(e=>[...e]),this.indexesIsUndefined=!1),this.extendSchemasOptions()}describe(e={}){let t={name:this.options.name??null,strict:this.options.strict??!1,indexes:this.indexesIsUndefined?null:this.indexes.map(e=>[...e])},n=(e.parameters||Object.values(uI)).map(e=>fI(e));if(n.includes(`fields`)&&(t.fields=this.fields.describe()),n.includes(`filters`)&&(t.filters=this.filters.describe()),n.includes(`pagination`)&&(t.pagination=this.pagination.describe()),n.includes(`relations`)&&(t.relations=this.relations.describe(),t.relations.allowed)){let e={};for(let n of t.relations.allowed)e[n]=this.mapSchema(n);t.relations.schemas=e}return n.includes(`sorts`)&&(t.sorts=this.sorts.describe()),t}extendSchemasOptions(){this.extendSchemaOptions(this.fields),this.extendSchemaOptions(this.filters),this.extendSchemaOptions(this.pagination),this.extendSchemaOptions(this.relations),this.extendSchemaOptions(this.sorts),this.indexesIsUndefined||(this.filters.setIndexes(this.indexes),this.sorts.setIndexes(this.indexes))}extendSchemaOptions(e){this.options.throwOnFailure!==void 0&&e.throwOnFailure===void 0&&(e.throwOnFailure=this.options.throwOnFailure),this.options.strict!==void 0&&e.strict===void 0&&(e.strict=this.options.strict),this.options.name!==void 0&&(e.name=this.options.name)}},YI=class{entities;constructor(){this.entities=new Map}add(e){if(e.name===void 0)throw bI.nameUndefined();this.entities.set(e.name,e)}drop(e){this.entities.delete(e)}get(e){return typeof e==`string`?this.entities.get(e):e}getOrFail(e){let t=this.get(e);if(t===void 0)throw bI.notResolvable(e);return t}getAll(){return Array.from(this.entities.values())}resolve(...e){let t=[];for(let n of e)typeof n==`string`?t.push(...n.split(`.`)):n instanceof JI&&t.push(n);let n;for(;t.length>0;){let e=t.shift();e&&(n=e instanceof JI?e:n?this.get(n.mapSchema(e)):this.get(e))}return n}},XI={KEY_INVALID:`keyInvalid`,KEY_NOT_PERMITTED:`keyNotPermitted`,PATH_NOT_PERMITTED:`pathNotPermitted`,SCHEMA_UNRESOLVABLE:`schemaUnresolvable`},ZI=class extends yI{},QI=class extends yI{},$I=class extends yI{static limitExceeded(e){return new this({code:`limitExceeded`,message:`The pagination limit must not exceed the value of ${e}.`})}},eL=class extends yI{},tL=class extends yI{},nL={fields:II,filters:RI,pagination:BI,relations:HI,sorts:GI,sort:GI},rL={fields:ZI,filters:QI,pagination:$I,relations:eL,sorts:tL,sort:tL},iL=/^[a-zA-Z0-9_-]+([.]*[a-zA-Z0-9_-])*$/u,aL=32,oL=class e{parameter;schema;rootSchema;relations;segment;path;registry;base;rootBase;obligationSink;bound;depth;throwOnFailureContext;strictContext;errors;constructor(e){this.registry=e.registry,this.parameter=e.parameter,this.schema=e.schema,this.rootSchema=e.rootSchema??e.schema,this.bound=e.bound,this.base=e.base,this.rootBase=e.rootBase,this.relations=e.relations,this.segment=e.segment,this.path=e.path??[],this.obligationSink=e.obligationSink,this.depth=e.depth??0,this.throwOnFailureContext=e.throwOnFailure,this.strictContext=e.strict,this.errors=e.errors}get throwOnFailure(){return this.throwOnFailureContext??this.schema.throwOnFailure??!1}get relationsThrowOnFailure(){return this.rootBase?this.rootBase.relations.throwOnFailure??!1:this.parameter===`relations`?this.rootSchema.throwOnFailure??!1:!1}get strict(){return this.strictContext??this.schema.strict??!1}static for(t,n,r,i={}){let a,o;typeof r==`string`||r instanceof JI?(a=t.getOrFail(r),o=a[n]):o=r instanceof nL[n]?r:sL(n);let s=a;return!s&&o.name&&(s=t.get(o.name)),new e({registry:t,parameter:n,schema:o,bound:r!==void 0,base:a,rootBase:s,relations:i.relations,throwOnFailure:i.throwOnFailure,strict:i.strict,obligationSink:i.obligationSink,errors:i.errors??rL[n]})}resolveKey(t){let n=eI(t,this.mapping),r=n.indexOf(`.`);if(r===-1){let e=this.checkName(n);return e?this.fail(e,t,n):(this.recordObligations(n),{success:!0,name:n,path:[],scope:this})}let i=n.substring(0,r),a=n.substring(r+1),o=this.descendSegment(i,t);if(!(o instanceof e))return o;let s=o.resolveKey(a);return s.success?{success:!0,name:s.name,path:[i,...s.path],scope:s.scope}:{...s,input:t}}descend(t){let n=eI(t,this.mapping);if(n.indexOf(`.`)===-1)return this.descendSegment(n,t);let r=n.split(`.`),i=this.descendSegment(r[0],t);for(let n of r.slice(1)){if(!(i instanceof e))return i;i=i.descendSegment(n,t)}return i instanceof e?i.withSegment(n):i}descendSegment(t,n){if(this.depth>=aL)return this.fail(XI.SCHEMA_UNRESOLVABLE,n,t);let r=this.checkSegment(t);if(r)return this.fail(r,n,t);let i=this.resolveBase(),a;if(a=i?this.registry.get(i.mapSchema(t)):this.registry.get(t),!a&&this.parameter!==`relations`&&!this.isUnbound())return this.fail(XI.SCHEMA_UNRESOLVABLE,n,t);let o;o=a?a[this.parameter]:sL(this.parameter);let s;return this.relations&&(s=this.relations.extract(t)),new e({registry:this.registry,parameter:this.parameter,schema:o,rootSchema:this.rootSchema,bound:!!a,base:a,rootBase:this.rootBase,relations:s,segment:t,path:[...this.path,t],obligationSink:this.obligationSink,depth:this.depth+1,throwOnFailure:this.throwOnFailureContext,strict:this.strictContext,errors:this.errors})}recordObligations(e){this.obligationSink&&(this.obligationSink.push(...this.relationObligations([])),this.obligationSink.push(...this.relationObligationForTerminal(e)))}relationObligations(e){let t=[...this.path,...e];if(t.length===0)return[];let n=[],r=this.rootBase,i=[];for(let e of t){if(!r)break;i.push(e),n.push({key:e,path:i.join(`.`),schema:r.relations}),r=this.registry.get(r.mapSchema(e))}return n}relationObligationForTerminal(e){let t=this.resolveBase();return t?this.parameter!==`relations`&&!this.registry.get(t.mapSchema(e))?[]:[{key:e,path:[...this.path,e].join(`.`),schema:t.relations}]:this.parameter===`relations`?[{key:e,path:[...this.path,e].join(`.`),schema:this.rootSchema}]:[]}checkName(e){switch(this.parameter){case`fields`:{let t=this.schema;return t.allowedIsUndefined&&t.defaultIsUndefined?this.strict?XI.KEY_NOT_PERMITTED:lI(e)?void 0:XI.KEY_INVALID:t.isValid(e)?void 0:XI.KEY_NOT_PERMITTED}case`filters`:{let t=this.schema;return t.allowedIsUndefined?this.strict?XI.KEY_NOT_PERMITTED:lI(e)?void 0:XI.KEY_INVALID:t.allowed.includes(e)?void 0:XI.KEY_NOT_PERMITTED}case`sorts`:case`sort`:{let t=this.schema;return t.allowedIsUndefined?this.strict?XI.KEY_NOT_PERMITTED:lI(e)?void 0:XI.KEY_INVALID:t.allowed.includes(e)?void 0:XI.KEY_NOT_PERMITTED}case`relations`:{let t=this.schema;return t.allowed===void 0?this.strict?XI.KEY_NOT_PERMITTED:iL.test(e)?void 0:XI.KEY_INVALID:sI(e,t.allowed)?void 0:XI.KEY_NOT_PERMITTED}default:return}}checkSegment(e){if(this.parameter===`relations`){let t=this.schema;return t.allowed===void 0?this.strict?XI.PATH_NOT_PERMITTED:void 0:sI(e,t.allowed)?void 0:XI.PATH_NOT_PERMITTED}return sI(e,this.relations)?void 0:XI.PATH_NOT_PERMITTED}resolveBase(){if(this.base)return this.base;if(this.schema.name)return this.registry.get(this.schema.name)}isUnbound(){return!this.bound}withSegment(t){return new e({registry:this.registry,parameter:this.parameter,schema:this.schema,rootSchema:this.rootSchema,bound:this.bound,base:this.base,rootBase:this.rootBase,relations:this.relations,segment:t,path:this.path,obligationSink:this.obligationSink,depth:this.depth,throwOnFailure:this.throwOnFailureContext,strict:this.strictContext,errors:this.errors})}fail(e,t,n){if(this.throwOnFailure)switch(e){case XI.KEY_INVALID:throw this.errors.keyInvalid(n??t);case XI.KEY_NOT_PERMITTED:throw this.errors.keyNotPermitted(n??t);case XI.PATH_NOT_PERMITTED:throw this.errors.keyPathNotPermitted(n??t);default:throw this.errors.keyPathInvalid(n??t)}let r={success:!1,code:e,input:t};return n!==void 0&&(r.segment=n),r}get mapping(){return this.schema.mapping}};function sL(e){let t=nL[e];return new t({})}function cL(e={}){return new JI(e)}var lL=class e{value;constructor(e=[]){this.value=e}accept(e){return e.visitFields(this)}merge(t){let n=[],r=new Map;for(let e of[...this.value,...t.value]){let t=r.get(e.name);if(t){if(e.condition!==void 0&&e.condition!==t.condition)throw vI.fieldsConditionDiscarded(e.name);continue}r.set(e.name,e),n.push(e)}return new e(n)}execute(t){let n=[],r=[],i=[];for(let e of this.value)e.operator===`-`?r.push(e.name):e.operator===`+`?n.push(e.name):i.push(e.name);if(t.default.length===0&&t.allowed.length===0)return i.length>0?new e(this.toUnique(i).map(e=>this.rebuild(e))):new e(this.toUnique(n).map(e=>this.rebuild(e)));let a=[];return this.applyExplicates(a,i,t),a.length===0&&a.push(...t.default),this.applyIncludes(a,n,t),a.length===0&&a.push(...t.allowed),new e(this.applyExcludes(this.toUnique(a),r).map(e=>this.rebuild(e)))}rebuild(e){return new xI(e,void 0,this.value.find(t=>t.name===e)?.condition)}toUnique(e){return Array.from(new Set([...e]))}applyExplicates(e,t,n){for(let r of t){let t=n.default.findIndex(e=>e===r);if(t!==-1){e.push(r);continue}t=n.allowed.findIndex(e=>e===r),t!==-1&&e.push(r)}}applyIncludes(e,t,n){for(let r of t){let t=n.default.findIndex(e=>e===r);if(t!==-1){e.push(r);continue}t=n.allowed.findIndex(e=>e===r),t!==-1&&e.push(r)}}applyExcludes(e,t){for(let n of t){let t=e.findIndex(e=>e===n);t!==-1&&e.splice(t,1)}return e}};function uL(e,t){return cI(e,`visitFilters`)?!t||t===e.operator:!1}var dL=Symbol.for(`@rapiq/core/condition`);function fL(e){return!ZF(e)||e[dL]!==!0||typeof e.operator!=`string`||!(`value`in e)?!1:e.preserved===void 0||typeof e.preserved==`boolean`}var pL=class{get[dL](){return!0}operator;value;constructor(e,t){this.operator=e,this.value=t}},mL=class e extends pL{preserved;constructor(e,t,n={}){super(e,t),n.preserved&&(this.preserved=!0)}accept(e){return e.visitFilters(this)}flatten(t){return new e(this.operator,this.flattenInternal(this.value,this.operator,t),{preserved:this.preserved})}flattenInternal(e,t,n){let r=n||[];for(let n of e)uL(n,t)&&t!==`not`&&!n.preserved?n.flatten(r):r.push(n);return r}merge(t){return this.value.length===0?t:t.value.length===0?this:new e(`and`,[...hL(this),...hL(t)])}and(...e){return this.wrap(`and`,e)}or(...e){return this.wrap(`or`,e)}wrap(t,n){return n.length===0?this:this.value.length===0?new e(t,n):this.operator===t&&t!==`not`&&!this.preserved?new e(t,[...this.value,...n]):new e(t,[this,...n])}};function hL(e){return e.operator===`and`&&!e.preserved?e.flatten().value:[e]}var gL=`$this`;function _L(e){return cI(e,`visitFilter`)}var vL=class extends pL{field;preserved;constructor(e,t,n,r={}){super(e,n),this.field=t,r.preserved&&(this.preserved=!0)}accept(e){return e.visitFilter(this)}};function yL(e,t){return new vL(`eq`,e,t)}function bL(e,t){return new vL(`in`,e,t)}function xL(e,t){return new vL(`nin`,e,t)}function SL(e,t){return new vL(`contains`,e,t)}function CL(...e){return new mL(`and`,e)}function wL(...e){return new mL(`or`,e)}function TL(...e){return new mL(`not`,e)}var EL={eq:{family:`equality`,foldable:!0},ne:{family:`equality`,complementOf:`eq`,foldable:!0},lt:{family:`ordering`,compare:{min:-1,max:-1},foldable:!1},lte:{family:`ordering`,compare:{min:-1,max:0},foldable:!1},gt:{family:`ordering`,compare:{min:1,max:1},foldable:!1},gte:{family:`ordering`,compare:{min:0,max:1},foldable:!1},in:{family:`membership`,foldable:!0},nin:{family:`membership`,complementOf:`in`,foldable:!0},startsWith:{family:`anchored`,anchor:{start:!0,end:!1},foldable:!1},notStartsWith:{family:`anchored`,complementOf:`startsWith`,anchor:{start:!0,end:!1},foldable:!1},endsWith:{family:`anchored`,anchor:{start:!1,end:!0},foldable:!1},notEndsWith:{family:`anchored`,complementOf:`endsWith`,anchor:{start:!1,end:!0},foldable:!1},contains:{family:`anchored`,anchor:{start:!1,end:!1},foldable:!1},notContains:{family:`anchored`,complementOf:`contains`,anchor:{start:!1,end:!1},foldable:!1},regex:{family:`regex`,foldable:!1},mod:{family:`arithmetic`,foldable:!1},size:{family:`cardinality`,foldable:!1},exists:{family:`existence`,foldable:!1},elemMatch:{family:`structural`,foldable:!1}},DL={};{let e=Object.entries(EL).filter(e=>e[1].family===`ordering`);for(let[t,n]of e){let r=e.find(([,e])=>e.compare.min===(n.compare.max===1?-1:n.compare.max+1)&&e.compare.max===(n.compare.min===-1?1:n.compare.min-1));r&&(DL[t]=r[0])}}function OL(e,t=0){let n=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),r;return t&8?(r=t&1?`^(?!${n}).*`:t&2?`^(?!.*${n}$).*`:`^(?!.*${n}).*`,r):(r=t&1?`^${n}`:t&2?`${n}$`:`${n}`,r)}function kL(e){return ZF(e)&&typeof e.operator==`string`}function AL(e,t={}){return new ML(t).lower(e)}function jL(e,t){if(`field`in e&&e.field===`$this`&&!t.itself)throw hI.featureUnsupported(`filters:itself`);switch(e.kind){case`compound`:return t.compound(e);case`constant`:return t.constant(e);case`null-check`:return t.nullCheck(e);case`compare`:return t.compare(e);case`one-of`:return t.oneOf(e);case`match`:return t.match(e);case`mod`:if(!t.mod)throw hI.featureUnsupported(`filters:mod`);return t.mod(e);case`size`:if(!t.size)throw hI.featureUnsupported(`filters:size`);return t.size(e);case`elem-match`:if(!t.elemMatch)throw hI.featureUnsupported(`filters:elemMatch`);return t.elemMatch(e);default:throw hI.featureUnsupported(`filters:${e.kind}`)}}var ML=class{caseSensitiveAll;caseSensitiveFields;fieldPrefix;elementDepth;constructor(e){this.caseSensitiveAll=e.caseSensitive===!0,this.caseSensitiveFields=new Set(Array.isArray(e.caseSensitive)?e.caseSensitive:[]),this.fieldPrefix=``,this.elementDepth=0}lower(e){if(uL(e))return this.lowerCompound(e);if(_L(e))return this.lowerLeaf(e);throw hI.conditionDetached(e?.operator)}lowerCompound(e){let t,n=!1;switch(e.operator){case`and`:t=`and`;break;case`or`:t=`or`;break;case`nor`:t=`or`,n=!0;break;case`not`:t=`and`,n=!0;break;default:throw hI.operatorUnsupported(e.operator)}let r=[];for(let t=0;t<e.value.length;t++){let n=e.value[t];if(n){if(_L(n)||uL(n)){let e=this.lower(n);e&&r.push(e);continue}throw hI.conditionDetached(n?.operator)}}if(r.length===0)return null;let[i]=r;return n&&r.length===1&&i?this.negatePlan(i):{kind:`compound`,operator:t,negated:n,children:r}}negatePlan(e){switch(e.kind){case`constant`:return{...e,verdict:!e.verdict};case`null-check`:case`one-of`:case`match`:return{...e,negated:!e.negated};case`compare`:if(e.op===`eq`)return{...e,negated:!e.negated};break;case`compound`:return{...e,negated:!e.negated}}return{kind:`compound`,operator:`and`,negated:!0,children:[e]}}lowerLeaf(e){let t=EL[e.operator];if(!t)throw hI.operatorUnsupported(e.operator);if(e.field===`$this`&&this.elementDepth===0)throw hI.featureUnsupported(`filters:itself`);let n=typeof t.complementOf==`string`,r=e.value===void 0?null:e.value;switch(t.family){case`equality`:return r===null?{kind:`null-check`,field:e.field,negated:n,elementwise:!0}:{kind:`compare`,field:e.field,op:`eq`,value:r,caseFold:typeof r==`string`&&this.isFoldableField(e.field),negated:n};case`ordering`:return{kind:`compare`,field:e.field,op:e.operator,value:r,caseFold:!1,negated:!1};case`membership`:return this.lowerMembership(e.field,r,n);case`anchored`:{let i=t.anchor||{start:!1,end:!1},a=`${r}`,o,s;return i.start?(o=`starts`,s=1):i.end?(o=`ends`,s=2):(o=`contains`,s=4),{kind:`match`,field:e.field,pattern:{mode:o,text:a},regexSource:OL(a,s),ignoreCase:!0,negated:n}}case`regex`:return this.lowerRegex(e.field,r);case`existence`:return{kind:`null-check`,field:e.field,negated:!!r,elementwise:!1};case`arithmetic`:return this.lowerMod(e.field,r);case`cardinality`:{let t=typeof r==`number`&&Number.isInteger(r)&&r>=0;return{kind:`size`,field:e.field,count:t?r:null}}case`structural`:return this.lowerElemMatch(e);default:throw hI.operatorUnsupported(e.operator)}}lowerMembership(e,t,n){if(!Array.isArray(t)||t.length===0)return{kind:`constant`,verdict:n};let r=t.map(e=>e===void 0?null:e),i=r.filter(e=>e!==null);return i.length===0?{kind:`null-check`,field:e,negated:n,elementwise:!0}:{kind:`one-of`,field:e,values:i,includesNull:i.length!==r.length,caseFold:this.isFoldableField(e),negated:n}}lowerRegex(e,t){if(t instanceof RegExp){let n=t.flags.replace(/[gy]/g,``);return{kind:`match`,field:e,pattern:{mode:`regex`,source:t.source,flags:n},regexSource:t.source,ignoreCase:t.ignoreCase,negated:!1}}if(typeof t==`string`)return{kind:`match`,field:e,pattern:{mode:`regex`,source:t,flags:``},regexSource:t,ignoreCase:!1,negated:!1};throw hI.featureUnsupported(`filters:regex:value`)}lowerMod(e,t){return!Array.isArray(t)||t.length!==2||typeof t[0]!=`number`||!Number.isFinite(t[0])||typeof t[1]!=`number`||!Number.isFinite(t[1])||t[0]===0?{kind:`constant`,verdict:!1}:{kind:`mod`,field:e,divisor:t[0],remainder:t[1]}}lowerElemMatch(e){let t=e.value;if(!_L(t)&&!uL(t))throw kL(t)?hI.conditionDetached(t.operator):hI.featureUnsupported(`filters:elemMatch:value`);let n=this.fieldPrefix;this.fieldPrefix=`${n}${e.field}.`,this.elementDepth+=1;try{let n=this.lower(t);return n?{kind:`elem-match`,field:e.field,condition:n}:null}finally{this.fieldPrefix=n,--this.elementDepth}}isFoldableField(e){return!this.caseSensitiveAll&&!this.caseSensitiveFields.has(`${this.fieldPrefix}${e}`)}};function NL(e){return _L(e)?e.preserved?e:new vL(e.operator,e.field,e.value,{preserved:!0}):uL(e)?e.preserved?e:new mL(e.operator,e.value,{preserved:!0}):new mL(`and`,[e],{preserved:!0})}var PL=class e{limit;offset;constructor(e,t){this.limit=e,this.offset=t}accept(e){return e.visitPagination(this)}merge(t){return new e(this.limit??t.limit,this.offset??t.offset)}},FL=class{name;constructor(e){this.name=e}accept(e){return e.visitRelation(this)}},IL=class e{value;constructor(e=[]){this.value=e}accept(e){return e.visitRelations(this)}extract(t){let n=new e,r=`${t}.`;for(let e of this.value)e.name.substring(0,r.length)===r&&n.value.push(new FL(e.name.substring(r.length)));return n}merge(t){let n=[],r=new Set;for(let e of[...this.value,...t.value])r.has(e.name)||(r.add(e.name),n.push(e));return new e(n)}},LL=class{name;operator;constructor(e,t){this.name=e,this.operator=t||`ASC`}accept(e){return e.visitSort(this)}},RL=class e{value;constructor(e=[]){this.value=e}accept(e){return e.visitSorts(this)}merge(t){let n=[],r=new Set;for(let e of[...this.value,...t.value])r.has(e.name)||(r.add(e.name),n.push(e));return new e(n)}};function zL(e){return cI(e,`visitQuery`)}var BL=class{fields;filters;relations;pagination;sorts;constructor(e={}){this.fields=e.fields||new lL,this.filters=e.filters||new mL(`and`,[]),this.relations=e.relations||new IL,this.pagination=e.pagination||new PL,this.sorts=e.sorts||new RL}accept(e){return e.visitQuery(this)}};function VL(...e){let[t,...n]=e;if(!t)return new BL;let{fields:r,filters:i,pagination:a,relations:o,sorts:s}=t;for(let e of n)r=r.merge(e.fields),i=i.merge(e.filters),a=a.merge(e.pagination),o=o.merge(e.relations),s=s.merge(e.sorts);return new BL({fields:r,filters:i,pagination:a,relations:o,sorts:s})}function HL(e){return ZF(e)&&typeof e.accept==`function`}function UL(e){if(HL(e))return e;let t=[];return WL(t,e),new lL(t)}function WL(e,t,n){if(typeof t==`string`){for(let r of t.split(`,`)){let t=r.trim();t&&GL(e,t,n)}return}if(Array.isArray(t)){if(t.length===2&&Array.isArray(t[0])&&ZF(t[1])){WL(e,t[0],n),WL(e,t[1],n);return}for(let r of t){if(typeof r!=`string`)throw gI.inputInvalid();GL(e,r,n)}return}if(ZF(t)){let r=Object.keys(t);for(let i of r)t[i]!==void 0&&WL(e,t[i],n?`${n}.${i}`:i);return}throw gI.inputInvalid()}function GL(e,t,n){let r=t,i,a=r.substring(0,1);(a===`+`||a===`-`)&&(i=a,r=r.substring(1)),e.push(new xI(n?`${n}.${r}`:r,i))}function KL(e,t){return ZF(t)&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)&&!fL(t)&&!HL(t)&&!Object.keys(t).some(e=>e.substring(0,1)===`$`)&&e!==`$this`}var qL={};for(let e of Object.values(SI))qL[`$${e}`]=e;function JL(e){if(fL(e))return $L(e,!1),uL(e)?e:new mL(`and`,[e]);if(YL(e))throw gI.inputInvalid();return new mL(`and`,XL(e))}function YL(e){if(!ZF(e))return!1;let t=Object.keys(e);if(t.length===0)return!1;for(let e of t)if(e!==`operator`&&e!==`value`&&e!==`preserved`&&e!==`field`)return!1;return!t.includes(`operator`)||!t.includes(`value`)&&!t.includes(`field`)||typeof e.operator!=`string`?!1:Object.values(SI).includes(e.operator)||Object.values(CI).includes(e.operator)}function XL(e,t,n=!1){if(!ZF(e))throw gI.inputInvalid();let r=[],i=Object.keys(e);for(let a of i){let i=e[a];if(i!==void 0){if(a.startsWith(`$`)&&!(a===`$this`&&n&&!t))throw gI.keyInvalid(a);r.push(...ZL(t?`${t}.${a}`:a,i,n))}}return r}function ZL(e,t,n=!1){if(e!==`$this`&&e.split(`.`).includes(`$this`))throw gI.keyInvalid(e);if(Array.isArray(t))return[new vL(`in`,e,t)];if(t instanceof RegExp)return[new vL(`regex`,e,t)];if(t instanceof Date)return[new vL(`eq`,e,t)];if(fL(t)||HL(t))throw gI.keyValueInvalid(e);if(ZF(t)){let r=Object.keys(t);if(r.some(e=>e.substring(0,1)===`$`)){let n=[];for(let i of r)t[i]!==void 0&&n.push(QL(e,i,t[i]));return n}if(!KL(e,t))throw gI.keyValueInvalid(e);return XL(t,e,n)}return[new vL(`eq`,e,t)]}function QL(e,t,n){if(t===`$elemMatch`){let t;if(fL(n))$L(n,!0),t=n;else{let e;e=ZF(n)&&Object.keys(n).every(e=>e.startsWith(`$`)&&e!==`$this`)?ZL(gL,n,!0):XL(n,void 0,!0);let[r]=e;t=r&&e.length===1?r:new mL(`and`,e)}return new vL(`elemMatch`,e,t)}if(t.substring(0,1)!==`$`)throw gI.keyInvalid(t);let r=qL[t];if(!r)throw gI.operatorUnsupported(t);return r===`in`||r===`nin`?new vL(r,e,Array.isArray(n)?n:[n]):new vL(r,e,n)}function $L(e,t){if(uL(e)){for(let n of e.value)fL(n)&&$L(n,t);return}if(_L(e)){if(e.field===`$this`){if(!t)throw gI.keyInvalid(e.field)}else if(e.field.split(`.`).includes(`$this`))throw gI.keyInvalid(e.field);e.operator===`elemMatch`&&fL(e.value)&&$L(e.value,!0)}}function eR(e){if(HL(e))return e;if(!ZF(e))throw gI.inputInvalid();return new PL(e.limit,e.offset)}function tR(e){if(HL(e))return e;let t=[];return nR(t,e),new IL(t)}function nR(e,t,n){if(typeof t==`string`){for(let r of t.split(`,`)){let t=r.trim();t&&e.push(new FL(n?`${n}.${t}`:t))}return}if(Array.isArray(t)){for(let r of t){if(typeof r!=`string`)throw gI.inputInvalid();e.push(new FL(n?`${n}.${r}`:r))}return}if(ZF(t)){let r=Object.keys(t);for(let i of r){let r=t[i];if(r===void 0||r===!1)continue;let a=n?`${n}.${i}`:i;if(r===!0){e.push(new FL(a));continue}nR(e,r,a)}return}throw gI.inputInvalid()}function rR(e){if(HL(e))return e;let t=[];return iR(t,e),new RL(t)}function iR(e,t,n){if(typeof t==`string`){for(let r of t.split(`,`)){let t=r.trim();t&&aR(e,t,n)}return}if(Array.isArray(t)){if(t.length===2&&Array.isArray(t[0])&&ZF(t[1])){iR(e,t[0],n),iR(e,t[1],n);return}for(let r of t){if(typeof r!=`string`)throw gI.inputInvalid();aR(e,r,n)}return}if(ZF(t)){let r=Object.keys(t);for(let i of r){let r=t[i];if(r===void 0)continue;let a=n?`${n}.${i}`:i;if(typeof r==`string`){let t=r.toLowerCase();if(t!==`asc`&&t!==`desc`)throw gI.keyInvalid(i);e.push(new LL(a,t===`desc`?`DESC`:`ASC`));continue}iR(e,r,a)}return}throw gI.inputInvalid()}function aR(e,t,n){let r=t,i=`ASC`;r.substring(0,1)===`-`&&(i=`DESC`,r=r.substring(1)),e.push(new LL(n?`${n}.${r}`:r,i))}var oR=[`fields`,`filters`,`pagination`,`relations`,`sorts`,`sort`];function sR(e={}){tI(e,oR,(e,t)=>gI.keyUnknown(e,t));let t={};e.fields!==void 0&&(t.fields=UL(e.fields)),e.filters!==void 0&&(t.filters=JL(e.filters)),e.pagination!==void 0&&(t.pagination=eR(e.pagination)),e.relations!==void 0&&(t.relations=tR(e.relations));let n=nI(e,`sorts`,`sort`,(e,t)=>gI.keyAmbiguous(e,t));return n!==void 0&&(t.sorts=rR(n)),new BL(t)}function cR(e){return e.default?Array.isArray(e.default)?e.default:[e.default]:[]}function lR(e){return e!==null&&(typeof e==`object`||typeof e==`function`)&&`then`in e&&typeof e.then==`function`}function uR(e,t,n){if(!t.hasValidator())return e;if(_L(e)){let r=e;if(e.operator===`elemMatch`&&fL(e.value)){let i=uR(e.value,t,n);if(!i)return;i!==e.value&&(r=new vL(e.operator,e.field,i,{preserved:e.preserved}))}let i=t.validate(r,n);if(lR(i))throw Promise.resolve(i).catch(()=>void 0),bI.validatorAsyncRequiresAsyncParser();return i?r.preserved?NL(i):i:void 0}if(!uL(e))return e;let r=[];for(let i of e.value){let e=uR(i,t,n);e&&r.push(e)}if(r.length!==0)return new mL(e.operator,r,{preserved:e.preserved})}async function dR(e,t,n){if(!t.hasValidator())return e;if(_L(e)){let r=e;if(e.operator===`elemMatch`&&fL(e.value)){let i=await dR(e.value,t,n);if(!i)return;i!==e.value&&(r=new vL(e.operator,e.field,i,{preserved:e.preserved}))}let i=await t.validate(r,n);return i?r.preserved?NL(i):i:void 0}if(!uL(e))return e;let r=[];for(let i of e.value){let e=await dR(i,t,n);e&&r.push(e)}if(r.length!==0)return new mL(e.operator,r,{preserved:e.preserved})}function fR(e,t,n){let r=[],i=yR(e),a=new mR;for(let e of i){if(!e.schema.hasValidator())continue;let o;if(o=e.schema.hasManyValidator?.()?bR(_R(a.resolve(e,i,(e,n,r)=>bR(e.validateMany(n,t,r))),e.key)):bR(e.schema.validate(e.key,t,hR(e))),!vR(o,e,n)){if(e.throwOnFailure??n.throwOnFailure)throw n.errors.keyValidateRejected(e.path);r.push(e.path)}}return r}async function pR(e,t,n){let r=[],i=yR(e),a=new mR;for(let e of i){if(!e.schema.hasValidator())continue;let o;if(o=e.schema.hasManyValidator?.()?await _R(await a.resolveAsync(e,i,(e,n,r)=>e.validateMany(n,t,r)),e.key):await e.schema.validate(e.key,t,hR(e)),!vR(o,e,n)){if(e.throwOnFailure??n.throwOnFailure)throw n.errors.keyValidateRejected(e.path);r.push(e.path)}}return r}var mR=class{records;constructor(){this.records=new Map}resolve(e,t,n){let r=hR(e),i=this.read(e.schema,r);if(i)return i;let a=n(e.schema,gR(t,e.schema,r),r);return this.write(e.schema,r,a)}async resolveAsync(e,t,n){let r=hR(e),i=this.read(e.schema,r);if(i)return i;let a=await n(e.schema,gR(t,e.schema,r),r);return this.write(e.schema,r,a)}read(e,t){return this.records.get(e)?.get(t)}write(e,t,n){let r=this.records.get(e);return r||(r=new Map,this.records.set(e,r)),r.set(t,n),n}};function hR(e){let t=e.path.length-e.key.length-1;return t<0||e.path.charAt(t)!==`.`||e.path.slice(t+1)!==e.key?``:e.path.slice(0,t)}function gR(e,t,n){let r=[];for(let i of e)i.schema===t&&hR(i)===n&&(r.includes(i.key)||r.push(i.key));return r}function _R(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:!1}function vR(e,t,n){return fL(e)?n.conditions&&t.schema.parameter===`fields`?(n.conditions.set(t.path,e),!0):!1:!!e}function yR(e){let t=new Map;return e.filter(e=>{let n=t.get(e.schema);n||(n=new Set,t.set(e.schema,n));let r=`${e.key} ${e.path}`;return!n.has(r)&&(n.add(r),!0)})}function bR(e){if(xR(e))throw Promise.resolve(e).catch(()=>void 0),bI.validatorAsyncRequiresAsyncParser();return e}function xR(e){return e!==null&&(typeof e==`object`||typeof e==`function`)&&`then`in e&&typeof e.then==`function`}var SR=class{registry;constructor(e){let t;t=e instanceof YI?e:new YI,this.registry=t}async parseAsync(e,t){return this.parse(e,t)}getBaseSchema(e){let t;return t=e?this.registry.getOrFail(e):cL(),t}expandObject(e,t={},n){let r=n?n.split(`.`).length:0,i=Object.keys(e);for(let a of i){if(r+a.split(`.`).length>32||iI(a))throw yI.inputInvalid();let i=n?`${n}.${a}`:a;ZF(e[a])?this.expandObject(e[a],t,i):_u(t,i,e[a])}return t}assertSafeObjectKeys(e,t=0){let n=Object.keys(e);for(let r of n){if(t+r.split(`.`).length>32||iI(r))throw yI.inputInvalid();ZF(e[r])&&this.assertSafeObjectKeys(e[r],t+r.split(`.`).length)}}groupObject(e){let t={attributes:Object.create(null),relations:Object.create(null)},n=Object.keys(e);for(let r of n){if(iI(r))throw yI.inputInvalid();ZF(e[r])?t.relations[r]=this.groupObject(e[r]):t.attributes[r]=e[r]}return t}groupObjectByBasePath(e){let t=Object.create(null),n=Object.keys(e);return this.groupByFieldPathWithFn(n,(r,i,a)=>{t[r]||(t[r]=Object.create(null));let o=n[a];o!==void 0&&(t[r][i]=e[o])}),t}groupArrayByBasePath(e){let t=Object.create(null);return this.groupByFieldPathWithFn(e,(e,n)=>{t[e]||(t[e]=[]),t[e].push(n)}),t}groupArrayByKeyPath(e){let t=Object.create(null);for(let n of e){let e,r;if(iI(n))throw yI.inputInvalid();let i=n.lastIndexOf(`.`);i===-1?(e=dI,r=n):(e=n.substring(0,i),r=n.substring(i+1));let a=t[e]??[];t[e]=a,a.push(r)}return t}groupByFieldPathWithFn(e,t){for(let[n,r]of e.entries()){if(iI(r))throw yI.inputInvalid();let e=aI(r),i;if(e.path){let t=e.path.indexOf(`.`);t===-1?(i=e.path,e.path=void 0):(i=e.path.substring(0,t),e.path=e.path.substring(t+1))}else i=dI;t(i,oI(e),n)}}};function CR(e,t){return t.find(t=>e===t||e.startsWith(`${t}.`))}function wR(e,t){return CR(e,t)!==void 0}function TR(e,t){return e?`${e}.${t}`:t}function ER(e,t){return t.length===0?e:new lL(e.value.filter(e=>!wR(e.name,t)).map(e=>new xI(e.name,e.operator,e.condition)))}function DR(e,t,n){if(t.length===0)return e;let r=e.value.filter(e=>!wR(e.name,t)).map(e=>new LL(e.name,e.operator));return r.length===0&&n?FR(n):new RL(r)}function OR(e,t){return t.length===0?e:new IL(e.value.filter(e=>!wR(e.name,t)).map(e=>new FL(e.name)))}function kR(e,t,n){if(t.length===0)return e;let r=MR(e,t,``,!1);if(r&&uL(r))return r;let i;if(r)i=[r];else{i=n?cR(n):[];for(let e of i)AR(e,t)}return new mL(`and`,i)}function AR(e,t){MR(e,t,``,!1)}function jR(e,t,n){if(n)throw bI.preservedConditionPruned(e,t)}function MR(e,t,n,r){let i=r||NR(e);if(_L(e)){let r=TR(n,e.field),a=CR(r,t);if(typeof a==`string`)return jR(a,r,i||PR(e));if(e.operator===`elemMatch`&&fL(e.value)){let n=MR(e.value,t,r,i);if(!n)return;if(n!==e.value)return new vL(e.operator,e.field,n,{preserved:e.preserved})}return e}if(!uL(e))return e;let a=[];for(let r of e.value){let e=MR(r,t,n,i);e&&a.push(e)}if(a.length!==0)return new mL(e.operator,a,{preserved:e.preserved})}function NR(e){return e.preserved===!0}function PR(e){return NR(e)?!0:uL(e)?e.value.some(e=>PR(e)):_L(e)&&fL(e.value)?PR(e.value):!1}function FR(e){let t=new RL;if(!e.default)return t;for(let n of Object.keys(e.default)){let r=aI(n),i=r.path?`${r.path}.${r.name}`:r.name;t.value.push(new LL(i,e.default[n]))}return t}function IR(e){let t=new Map;return n=>{let r=t.get(n);if(r!==void 0)return r;let i=e;if(n!==``){let r=e.descend(n);if(!(r instanceof oL))return t.set(n,null),null;i=r}let a=i.schema,o=a.indexesIsUndefined?null:a.indexes;return t.set(n,o),o}}function LR(e,t){return e===t?!0:_L(e)&&_L(t)?e.operator===t.operator&&e.field===t.field&&RR(e.value,t.value):uL(e)&&uL(t)?e.operator===t.operator&&e.value.length===t.value.length&&e.value.every((e,n)=>LR(e,t.value[n])):!1}function RR(e,t){return fL(e)&&fL(t)?LR(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function zR(e){return _L(e)?e.preserved?!0:fL(e.value)?zR(e.value):!1:uL(e)?e.preserved?!0:e.value.some(zR):!1}function BR(e,t){let n=cR(t);return n.length===0||e.value.length!==n.length?!1:e.value.every((e,t)=>{let r=n[t];return r!==void 0&&LR(e,r)})}function VR(e,t){let n=t.schema,r=n.defaultIsUndefined?null:n.default,i=new Map,a=[];for(let n of e.value){if(r&&r[n.name]===n.operator)continue;let e=aI(n.name),o=e.path??``,s=i.get(o);if(s===void 0){if(s=null,o!==``){let e=t.descend(o);if(e instanceof oL){let t=e.schema;t.defaultIsUndefined||(s=t.default)}}i.set(o,s)}s&&s[e.name]===n.operator||a.push(n.name)}return a}function HR(e,t,n,r={}){let i=oL.for(t,`filters`,n,{throwOnFailure:r.throwOnFailure}),a=i.schema;if(!a.indexed||BR(e,a))return e;let o=jI(e,IR(i),a.indexed);if(o.ok)return e;if(i.throwOnFailure)throw QI.keyCombinationNotIndexed(o.keys);if(zR(e))throw bI.preservedConditionNotIndexed(o.keys);let s=cR(a);if(s.length===0)throw QI.keyCombinationNotIndexed(o.keys);return new mL(`and`,s)}function UR(e,t,n,r={}){let i=oL.for(t,`sorts`,n,{throwOnFailure:r.throwOnFailure}),a=i.schema;if(!a.indexed||e.value.length===0)return e;let o=VR(e,i);if(o.length===0)return e;let s=MI(o,IR(i));if(s.ok)return e;if(i.throwOnFailure)throw tL.keyCombinationNotIndexed(s.keys);return FR(a)}var WR=class extends SR{parse(e,t={}){let n={},{data:r,parameterOptions:i}=this.prepareQueryContext(e,t),a=[];if(!this.skipParameter(t,`relations`)){let e=this.readParameter(r,`relations`),t=this.relationsParser.parseParameter(e,i,a);n.relations=t,this.gateRelations(i,e,t)}this.skipParameter(t,`fields`)||(n.fields=this.fieldsParser.parseParameter(this.readParameter(r,`fields`),i,a)),this.skipParameter(t,`filters`)||(n.filters=this.filtersParser.parseParameter(this.readParameter(r,`filters`),i,a)),this.skipParameter(t,`pagination`)||(n.pagination=this.paginationParser.parseParameter(this.readParameter(r,`pagination`),i,a)),this.skipParameter(t,`sorts`)||(n.sorts=this.sortParser.parseParameter(this.readParameter(r,`sorts`),i,a));let o=this.applyRelationValidations(a,t);return this.pruneByRelations(n,o,t),this.applyIndexPolicies(n,t),new BL(n)}async parseAsync(e,t={}){let n={},{data:r,parameterOptions:i}=this.prepareQueryContext(e,t),a=[];if(!this.skipParameter(t,`relations`)){let e=this.readParameter(r,`relations`),t=await this.relationsParser.parseParameterAsync(e,i,a);n.relations=t,this.gateRelations(i,e,t)}this.skipParameter(t,`fields`)||(n.fields=await this.fieldsParser.parseParameterAsync(this.readParameter(r,`fields`),i,a)),this.skipParameter(t,`filters`)||(n.filters=await this.filtersParser.parseParameterAsync(this.readParameter(r,`filters`),i,a)),this.skipParameter(t,`pagination`)||(n.pagination=await this.paginationParser.parseParameterAsync(this.readParameter(r,`pagination`),i,a)),this.skipParameter(t,`sorts`)||(n.sorts=await this.sortParser.parseParameterAsync(this.readParameter(r,`sorts`),i,a));let o=await this.applyRelationValidationsAsync(a,t);return this.pruneByRelations(n,o,t),this.applyIndexPolicies(n,t),new BL(n)}prepareQueryContext(e,t){let n=ZF(e)?e:{},r={};return t.schema&&(r.schema=t.schema),t.strict!==void 0&&(r.strict=t.strict),t.context!==void 0&&(r.context=t.context),{data:n,parameterOptions:r}}gateRelations(e,t,n){t!==void 0&&(e.relations=n)}applyRelationValidations(e,t){if(e.length===0||!t.schema)return[];let n=this.registry.getOrFail(t.schema);return fR(e,t.context,{throwOnFailure:n.relations.throwOnFailure??!1,errors:eL})}async applyRelationValidationsAsync(e,t){if(e.length===0||!t.schema)return[];let n=this.registry.getOrFail(t.schema);return pR(e,t.context,{throwOnFailure:n.relations.throwOnFailure??!1,errors:eL})}pruneByRelations(e,t,n){if(t.length===0)return;let r=n.schema?this.registry.getOrFail(n.schema):void 0;e.relations&&=OR(e.relations,t),e.fields&&=ER(e.fields,t),e.sorts&&=DR(e.sorts,t,r?.sort),e.filters&&=kR(e.filters,t,r?.filters)}applyIndexPolicies(e,t){e.filters&&=HR(e.filters,this.registry,t.schema),e.sorts&&=UR(e.sorts,this.registry,t.schema)}parseRelations(e,t={}){return this.relationsParser.parse(e,t)}parseRelationsAsync(e,t={}){return this.relationsParser.parseAsync(e,t)}parseFields(e,t={}){return this.fieldsParser.parse(e,t)}parseFieldsAsync(e,t={}){return this.fieldsParser.parseAsync(e,t)}parseFilters(e,t={}){return this.filtersParser.parse(e,t)}parseFiltersAsync(e,t={}){return this.filtersParser.parseAsync(e,t)}parsePagination(e,t={}){return this.paginationParser.parse(e,t)}parsePaginationAsync(e,t={}){return this.paginationParser.parseAsync(e,t)}parseSorts(e,t={}){return this.sortParser.parse(e,t)}parseSortsAsync(e,t={}){return this.sortParser.parseAsync(e,t)}parseSort(e,t={}){return this.parseSorts(e,t)}parseSortAsync(e,t={}){return this.parseSortsAsync(e,t)}readParameter(e,t){if(t===`sorts`)return nI(e,`sorts`,`sort`,(e,t)=>yI.keyAmbiguous(e,t));if($F(e,t))return e[t]}skipParameter(e,t){if(e.parameters!==void 0&&!e.parameters.map(e=>fI(e)).includes(fI(t)))return!0;let n=t===`sorts`?nI(e,`sorts`,`sort`,(e,t)=>yI.keyAmbiguous(e,t)):e[t];return typeof n==`boolean`&&!n}},GR=class extends SR{parse(e,t={}){let n=[],{output:r,scope:i}=this.build(e,t,n);return ER(r,fR(n,t.context,{throwOnFailure:i.relationsThrowOnFailure,errors:eL}))}async parseAsync(e,t={}){let n=[],{output:r,scope:i}=await this.buildAsync(e,t,n);return ER(r,await pR(n,t.context,{throwOnFailure:i.relationsThrowOnFailure,errors:eL}))}parseParameter(e,t,n){return this.build(e,t,n).output}async parseParameterAsync(e,t,n){return(await this.buildAsync(e,t,n)).output}build(e,t,n){let r=this.scopeFor(t,n),i=[],a=this.parseWithScope(e,r,i),o=new Map,s=fR(i,t.context,{throwOnFailure:r.throwOnFailure,errors:ZI,conditions:o});return{output:this.fallback(this.prune(a,s,o),a,s,t,n),scope:r}}async buildAsync(e,t,n){let r=this.scopeFor(t,n),i=[],a=this.parseWithScope(e,r,i),o=new Map,s=await pR(i,t.context,{throwOnFailure:r.throwOnFailure,errors:ZI,conditions:o});return{output:this.fallback(this.prune(a,s,o),a,s,t,n),scope:r}}fallback(e,t,n,r,i){return e.value.length>0||t.value.length===0?e:new lL(this.parseWithScope(void 0,this.scopeFor(r,i),[]).value.filter(e=>!n.includes(e.name)))}scopeFor(e,t){return oL.for(this.registry,uI.FIELDS,e.schema,{relations:e.relations,throwOnFailure:e.throwOnFailure,strict:e.strict,obligationSink:t})}prune(e,t,n){return t.length===0&&n.size===0?e:new lL(e.value.filter(e=>!t.includes(e.name)).map(e=>{let t=n.get(e.name);return t?new xI(e.name,e.operator,t):e}))}parseWithScope(e,t,n){let{schema:r}=t;if(r.allDenied)return new lL;let i=this.normalize(e,t.throwOnFailure);if(r.name){let e=i[r.name];e&&(i[dI]=e,delete i[r.name])}let a=i.__DEFAULT__||[];delete i[dI];let o=new lL;if(a.length>0)for(let e of a){let r,a=e.substring(0,1);(a===NI.INCLUDE||a===NI.EXCLUDE)&&(r=a,e=e.substring(1));let s=t.resolveKey(e);if(s.success){if(s.path.length>0){let e=s.path.join(`.`),t=i[e]??[];i[e]=t,t.push(`${r??``}${s.name}`);continue}o.value.push(new xI(s.name,r)),r!==NI.EXCLUDE&&n.push({key:s.name,path:s.name,schema:s.scope.schema,throwOnFailure:s.scope.throwOnFailure})}}let s=o.execute({default:r.default,allowed:r.allowed}),c=Object.keys(i);if(t.relations)for(let e of t.relations.value)c.indexOf(e.name)===-1&&(c.push(e.name),i[e.name]=[]);let l=Object.create(null);for(let e of c){let t,n,r=e.indexOf(`.`);r===-1?(t=e,n=dI):(t=e.substring(0,r),n=e.substring(r+1));let a=l[t]??Object.create(null);l[t]=a,a[n]=i[e]}let u=Object.keys(l);for(let e of u){let r=t.descend(e);if(!(r instanceof oL))continue;let i=[],a=this.parseWithScope(l[e],r,i);s.value.push(...a.value.map(e=>new xI(`${r.segment}.${e.name}`,e.operator)));for(let e of i)n.push({...e,path:`${r.segment}.${e.path}`})}let d=new Set;return new lL(s.value.filter(e=>!d.has(e.name)&&(d.add(e.name),!0)))}normalize(e,t){if(this.isTupleInput(e))return this.normalize({[dI]:e[0],...e[1]});if(typeof e==`string`||Array.isArray(e)){let n;n=typeof e==`string`?e.split(`,`):e;let r=[];for(let e of n){if(typeof e!=`string`){if(t)throw ZI.inputInvalid();continue}r.push(e)}return r.length>0?this.groupArrayByKeyPath(r):{}}if(ZF(e)){let n=Object.create(null),r=Object.keys(e);for(let i of r){let r=this.normalize(e[i],t);for(let[e,t]of Object.entries(r)){let r;r=e===`__DEFAULT__`?i:`${i}.${e}`,n[r]=t}}return n}if(e==null||e===``)return{};if(t)throw ZI.inputInvalid();return{}}isTupleInput(e){return!Array.isArray(e)||e.length!==2?!1:Array.isArray(e[0])&&ZF(e[1])}},KR={contains:{prefix:`~`,suffix:`~`,value:`raw`},endsWith:{prefix:`~`,suffix:``,value:`raw`},startsWith:{prefix:``,suffix:`~`,value:`raw`},lte:{prefix:`<=`,suffix:``,value:`coerced`},lt:{prefix:`<`,suffix:``,value:`coerced`},gte:{prefix:`>=`,suffix:``,value:`coerced`},gt:{prefix:`>`,suffix:``,value:`coerced`},eq:{prefix:``,suffix:``,value:`coerced`}},qR={VALUE_INVALID:`valueInvalid`,VALUE_EMPTY:`valueEmpty`};function JR(e){let t=e.trim();if(t.length===0)return t;let n=t.toLowerCase();if(n===`true`)return!0;if(n===`false`)return!1;if(n===`null`)return null;let r=Number(t);return Number.isNaN(r)?t:r}var YR=Object.entries(KR),XR={},ZR=Object.keys(EL);for(let e of ZR){let t=EL[e];`complementOf`in t&&(XR[t.complementOf]=e)}function QR(e){if(typeof e==`string`){let t=e.trim();if(t.length===0)return t;let n=t.split(`,`);return n.length>1?QR(n):JR(t)}if(typeof e==`number`||typeof e==`boolean`)return e;if(Array.isArray(e)){let t=[];for(let n of e){let e=QR(n);Array.isArray(e)?t.push(...e):t.push(e)}return t.filter(e=>e===0||e===!1||e===null||!!e)}if(e==null)return null;throw SyntaxError(`Value can not be normalized.`)}function $R(e){let t=e,n=!1;t.substring(0,1)===`!`&&(t=t.substring(1),n=!0);for(let[e,r]of YR){if(t.substring(0,r.prefix.length)!==r.prefix||t.substring(t.length-r.suffix.length)!==r.suffix)continue;let i=t.substring(r.prefix.length,t.length-r.suffix.length);return{operator:(n?XR[e]:void 0)??e,value:r.value===`raw`?i:QR(i)}}throw SyntaxError(`Value can not be normalized.`)}function ez(e){let t;try{t=QR(e)}catch{return{success:!1,code:qR.VALUE_INVALID}}let n;if(Array.isArray(t)){let[e,...r]=t,i;if(typeof e==`string`){let t=$R(e);t.operator===SI.NOT_EQUAL&&(i={operator:SI.NOT_IN,value:[t.value,...r]})}n=i??{operator:SI.IN,value:t}}else n=typeof t==`string`?$R(t):{operator:SI.EQUAL,value:t};return!Array.isArray(n.value)&&typeof n.value==`string`&&n.value.length===0?{success:!1,code:qR.VALUE_EMPTY}:{success:!0,condition:n}}function tz(e){if(typeof e==`string`){if(e.includes(`,`))throw hI.featureUnsupported(`filters:value:comma`);if(e.trim().length===0)throw hI.featureUnsupported(`filters:value:empty`);return e}if(e==null)return`null`;if(typeof e==`number`)return`${e}`;if(typeof e==`boolean`)return e?`true`:`false`;if(Array.isArray(e)){if(e.length===0)throw hI.featureUnsupported(`filters:value:empty`);return e.map(e=>tz(e)).join(`,`)}throw hI.featureUnsupported(`filters:value:type`)}function nz(e){if(typeof e==`string`){if(e.length===0)throw hI.featureUnsupported(`filters:value:empty`);return e}return tz(e)}function rz(e){let t=KR,n=t[e];if(n)return{spec:n,negated:!1};let r=EL[e];if(r&&r.complementOf){let e=t[r.complementOf];if(e)return{spec:e,negated:!0}}if(e===SI.IN)return{spec:KR.eq,negated:!1};if(e===SI.NOT_IN)return{spec:KR.eq,negated:!0};throw hI.operatorUnsupported(e)}function iz(e,t){let n=ez(t),r=n.success&&n.condition.operator===e.operator;if(!r&&n.success&&e.operator===SI.IN&&(r=n.condition.operator===SI.EQUAL),!r&&n.success&&e.operator===SI.NOT_IN&&(r=n.condition.operator===SI.NOT_EQUAL),!r)throw hI.featureUnsupported(`filters:value:${e.field??e.operator}`);return t}function az(e){let t=rz(e.operator),n=t.spec.value===`raw`?nz(e.value):tz(e.value);return iz(e,(t.negated?`!`:``)+t.spec.prefix+n+t.spec.suffix)}var oz=class extends SR{parse(e,t={}){let n=[],{output:r,scope:i}=this.build(e,t,n);return HR(kR(r,fR(n,t.context,{throwOnFailure:i.relationsThrowOnFailure,errors:eL}),i.schema),this.registry,t.schema,{throwOnFailure:t.throwOnFailure})}async parseAsync(e,t={}){let n=[],{output:r,scope:i}=await this.buildAsync(e,t,n);return HR(kR(r,await pR(n,t.context,{throwOnFailure:i.relationsThrowOnFailure,errors:eL}),i.schema),this.registry,t.schema,{throwOnFailure:t.throwOnFailure})}parseParameter(e,t,n){return this.build(e,t,n).output}async parseParameterAsync(e,t,n){return(await this.buildAsync(e,t,n)).output}build(e,t,n){let r=this.scopeFor(t,n),i=this.run(e,r);return i.length>0&&(i=i.map(e=>uR(e,r.schema,t.context)).filter(e=>e!==void 0)),i.length===0&&(i=cR(r.schema)),{output:new mL(CI.AND,i),scope:r}}async buildAsync(e,t,n){let r=this.scopeFor(t,n),i=[];for(let n of this.run(e,r)){let e=await dR(n,r.schema,t.context);e&&i.push(e)}return i.length===0&&(i=cR(r.schema)),{output:new mL(CI.AND,i),scope:r}}scopeFor(e,t){return oL.for(this.registry,uI.FILTERS,e.schema,{relations:e.relations,throwOnFailure:e.throwOnFailure,strict:e.strict,obligationSink:t})}parseTyped(e,t={}){return this.parse(e,t)}parseTypedAsync(e,t={}){return this.parseAsync(e,t)}run(e,t){let{schema:n}=t;if(!n.allowedIsUndefined&&n.allowed.length===0)return[];if(!ZF(e)){if(e!=null&&t.throwOnFailure)throw QI.inputInvalid();return[]}let{length:r}=Object.keys(e);if(r===0)return[];let i=this.groupObject(this.expandObject(e)),a=n.name?i.relations[n.name]:void 0;return n.name&&a&&(i.attributes={...i.attributes||{},...a.attributes},i.relations={...i.relations||{},...a.relations},delete i.relations[n.name]),this.runFor(dI,i,t)}runFor(e,t,n){let r=[],i=Object.keys(t.attributes);for(let a of i){let i=aI(a),o=n.resolveKey(i.name);if(!o.success)continue;let s=[...o.path,o.name].join(`.`),c=ez(t.attributes[a]);if(!c.success){if(n.throwOnFailure)throw QI.keyValueInvalid(s);continue}let l=new vL(c.condition.operator,e===`__DEFAULT__`?s:oI({path:e,name:s}),c.condition.value);r.push(l)}i=Object.keys(t.relations);for(let a of i){let i=n.descend(a);if(!(i instanceof oL))continue;let o=t.relations[a];if(o===void 0)continue;let s=this.runFor(i.segment,o,i);e===`__DEFAULT__`?r.push(...s):r.push(...s.map(t=>new vL(t.operator,oI({path:e,name:t.field}),t.value)))}return r}},sz=class extends SR{parse(e,t={}){let{schema:n,throwOnFailure:r}=oL.for(this.registry,uI.PAGINATION,t.schema,{throwOnFailure:t.throwOnFailure}),i=new PL;if(!ZF(e)){if(e!=null&&r)throw $I.inputInvalid();return this.finalizePagination(i,n,r)}this.assertSafeObjectKeys(e);let{limit:a,offset:o}=e;if(a!==void 0){if(a=Number.parseInt(a,10),!Number.isNaN(a)&&a>0)i.limit=a;else if(r)throw $I.keyValueInvalid(`limit`)}if(o!==void 0){if(o=Number.parseInt(o,10),!Number.isNaN(o)&&o>=0)i.offset=o;else if(r)throw $I.keyValueInvalid(`offset`)}return this.finalizePagination(i,n,r)}async parseAsync(e,t={}){return this.parse(e,t)}parseParameter(e,t,n){return this.parse(e,t)}parseParameterAsync(e,t,n){return this.parseAsync(e,t)}finalizePagination(e,t,n){if(t.maxLimit!==void 0){if(e.limit===void 0)e.limit=t.maxLimit;else if(e.limit>t.maxLimit){if(n)throw $I.limitExceeded(t.maxLimit);e.limit=t.maxLimit}}return e.limit!==void 0&&e.offset===void 0&&(e.offset=0),e}},cz=class extends SR{parse(e,t={}){let n=[],{output:r,scope:i}=this.build(e,t,n);return this.prune(r,fR(n,t.context,{throwOnFailure:i.relationsThrowOnFailure,errors:eL}))}async parseAsync(e,t={}){let n=[],{output:r,scope:i}=this.build(e,t,n);return this.prune(r,await pR(n,t.context,{throwOnFailure:i.relationsThrowOnFailure,errors:eL}))}parseParameter(e,t,n){return this.build(e,t,n).output}async parseParameterAsync(e,t,n){return this.build(e,t,n).output}build(e,t,n){let r=oL.for(this.registry,uI.RELATIONS,t.schema,{throwOnFailure:t.throwOnFailure,strict:t.strict,obligationSink:n});return{output:this.parseWithScope(e,r),scope:r}}prune(e,t){return t.length===0?e:new IL(e.value.filter(e=>!t.some(t=>e.name===t||e.name.startsWith(`${t}.`))))}parseWithScope(e,t){let{schema:n}=t,r=new IL;if(Array.isArray(n.allowed)&&n.allowed.length===0)return r;let i=this.includeParents(this.normalize(e,t.throwOnFailure)),{[dI]:a,...o}=this.groupArrayByBasePath(i);if(a)for(let e of a){let n=aI(e),i=t.resolveKey(n.name);i.success&&r.value.push(new FL([...i.path,i.name].join(`.`)))}let s=Object.keys(o);for(let e of s){let n=t.descend(e);if(!(n instanceof oL))continue;let i=this.parseWithScope(o[e],n);for(let e of i.value)r.value.push(new FL(`${n.segment}.${e.name}`))}return r}normalize(e,t){let n=[];if(typeof e==`string`||Array.isArray(e)){let r;r=typeof e==`string`?e.split(`,`):e;for(let e of r){if(typeof e!=`string`){if(t)throw eL.inputInvalid();continue}n.push(e)}return n}if(ZF(e)){let t=Object.keys(e);for(let r of t)if(typeof e[r]==`string`){let t=`${r}.${e[r]}`;n.push(t)}return n}if(e==null||e===``)return[];if(t)throw eL.inputInvalid();return[]}includeParents(e){let t=[...e].reverse();for(let n of e){let e=n.split(`.`);for(;e.length>0;)if(e.pop(),e.length>0){let n=e.join(`.`);t.includes(n)||t.push(n)}}return t.reverse()}},lz=class extends SR{parse(e,t={}){let n=[],{output:r,scope:i}=this.build(e,t,n);return UR(DR(r,fR(n,t.context,{throwOnFailure:i.relationsThrowOnFailure,errors:eL}),i.schema),this.registry,t.schema,{throwOnFailure:t.throwOnFailure})}async parseAsync(e,t={}){let n=[],{output:r,scope:i}=await this.buildAsync(e,t,n);return UR(DR(r,await pR(n,t.context,{throwOnFailure:i.relationsThrowOnFailure,errors:eL}),i.schema),this.registry,t.schema,{throwOnFailure:t.throwOnFailure})}parseParameter(e,t,n){return this.build(e,t,n).output}async parseParameterAsync(e,t,n){return(await this.buildAsync(e,t,n)).output}build(e,t,n){let r=this.scopeFor(t,n),i=[],a=this.parseWithScope(e,r,i);return{output:this.prune(a,fR(i,t.context,{throwOnFailure:r.throwOnFailure,errors:tL})),scope:r}}async buildAsync(e,t,n){let r=this.scopeFor(t,n),i=[],a=this.parseWithScope(e,r,i);return{output:this.prune(a,await pR(i,t.context,{throwOnFailure:r.throwOnFailure,errors:tL})),scope:r}}scopeFor(e,t){return oL.for(this.registry,uI.SORTS,e.schema,{relations:e.relations,throwOnFailure:e.throwOnFailure,strict:e.strict,obligationSink:t})}prune(e,t){return t.length===0?e:new RL(e.value.filter(e=>!t.includes(e.name)))}parseWithScope(e,t,n){let{schema:r}=t;if(!r.allowedIsUndefined&&r.allowed.length===0)return this.buildDefaults(r);let i=this.normalize(e,t.throwOnFailure),a=this.groupObjectByBasePath(i);if(r.name){let e=a[r.name];e&&(a[dI]=e,delete a[r.name])}let o=new RL,{[dI]:s,...c}=a;if(s){let e=Object.keys(s);for(let r of e){let e=aI(r),i=t.resolveKey(e.name);if(!i.success)continue;let a=[...i.path,i.name].join(`.`);o.value.push(new LL(a,s[r])),n.push({key:i.name,path:a,schema:i.scope.schema,throwOnFailure:i.scope.throwOnFailure})}}o.value.length===0&&o.value.push(...this.buildDefaults(r).value);let l=Object.keys(c);for(let e of l){let r=t.descend(e);if(!(r instanceof oL))continue;let i=[],a=this.parseWithScope(c[e],r,i);for(let e of a.value)o.value.push(new LL(`${r.segment}.${e.name}`,e.operator));for(let e of i)n.push({...e,path:`${r.segment}.${e.path}`})}return o}buildDefaults(e){let t=new RL;if(e.default){let n=Object.keys(e.default);for(let r of n){let n=aI(r),i;i=n.path?`${n.path}.${n.name}`:n.name,t.value.push(new LL(i,e.default[r]))}return t}return t}normalize(e,t){let n=Object.create(null);if(typeof e==`string`||Array.isArray(e)){let r;r=typeof e==`string`?e.split(`,`):e;for(let e of r){if(typeof e!=`string`){if(t)throw tL.inputInvalid();continue}e.substring(0,1)===`-`?n[e.substring(1)]=WI.DESC:n[e]=WI.ASC}return n}if(ZF(e)){let r=Object.keys(e);for(let i of r){let r=e[i];if(typeof r==`string`){let e=r.toLowerCase();if(e===`desc`||e===`asc`){n[i]=e===`desc`?WI.DESC:WI.ASC;continue}}let a=this.normalize(r,t);for(let[e,t]of Object.entries(a)){let r;r=e===`__DEFAULT__`?i:`${i}.${e}`,n[r]=t}}return n}if(e==null||e===``)return{};if(t)throw tL.inputInvalid();return{}}},uz=class extends WR{fieldsParser;filtersParser;paginationParser;relationsParser;sortParser;constructor(e){super(e),this.fieldsParser=new GR(this.registry),this.filtersParser=new oz(this.registry),this.paginationParser=new sz(this.registry),this.relationsParser=new cz(this.registry),this.sortParser=new lz(this.registry)}},dz=class extends GR{},fz={not:`NOT`,and:`AND`,or:`OR`,eq:`eq`,gt:`gt`,gte:`gte`,lt:`lt`,lte:`lte`,contains:`like`,startsWith:`startsWith`,endsWith:`endsWith`,in:`in`,nin:`nin`,elemMatch:`elemMatch`,size:`size`,null:`NULL`},pz=`[A-Za-z0-9_](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?`,mz=32,hz={};for(let[e,t]of Object.entries(EL)){let n=t.complementOf;n&&(hz[e]=n,hz[n]=e)}var gz=class extends SR{tokens=[];pos=0;elemMatchDepth=0;parse(e,t={}){let n=[],{output:r,scope:i}=this.build(e,t,n);return i?HR(kR(r,fR(n,t.context,{throwOnFailure:i.relationsThrowOnFailure,errors:eL}),i.schema),this.registry,t.schema,{throwOnFailure:t.throwOnFailure}):r}async parseAsync(e,t={}){let n=[],{output:r,scope:i}=await this.buildAsync(e,t,n);return i?HR(kR(r,await pR(n,t.context,{throwOnFailure:i.relationsThrowOnFailure,errors:eL}),i.schema),this.registry,t.schema,{throwOnFailure:t.throwOnFailure}):r}parseParameter(e,t,n){return this.build(e,t,n).output}async parseParameterAsync(e,t,n){return(await this.buildAsync(e,t,n)).output}parseExact(e,t={}){return this.parseValidated(e,t,[]).result}async parseExactAsync(e,t={}){return(await this.parseValidatedAsync(e,t,[])).result}build(e,t,n){if(e==null)return{output:this.buildAbsentOutput(t)};let{result:r,scope:i}=this.parseValidated(e,t,n);return{output:this.wrapRoot(r),scope:i}}async buildAsync(e,t,n){if(e==null)return{output:this.buildAbsentOutput(t)};let{result:r,scope:i}=await this.parseValidatedAsync(e,t,n);return{output:this.wrapRoot(r),scope:i}}parseValidated(e,t,n){let{expr:r,scope:i}=this.parseSource(e,t,n);return i?{result:uR(r,i.schema,t.context)??new mL(CI.AND,cR(i.schema)),scope:i}:{result:r}}async parseValidatedAsync(e,t,n){let{expr:r,scope:i}=this.parseSource(e,t,n);return i?{result:await dR(r,i.schema,t.context)??new mL(CI.AND,cR(i.schema)),scope:i}:{result:r}}parseSource(e,t,n){if(typeof e!=`string`)throw QI.inputInvalid();this.pos=0,this.elemMatchDepth=0,this.tokens=this.tokenize(e);let r;(t.schema||t.strict)&&(r=oL.for(this.registry,uI.FILTERS,t.schema,{relations:t.relations,throwOnFailure:!0,strict:t.strict,obligationSink:n}));let i=this.parseFilterExpression(r);if(this.peek().type!==`EOF`)throw QI.syntaxInvalid(`Unexpected token: ${this.peek().type}`);return{expr:i,scope:r}}buildAbsentOutput(e){let t=oL.for(this.registry,uI.FILTERS,e.schema,{relations:e.relations});return new mL(CI.AND,cR(t.schema))}wrapRoot(e){return uL(e,CI.AND)||uL(e,CI.OR)?e:new mL(CI.AND,[e])}peek(){return this.tokens[this.pos]||{type:`EOF`}}consume(e){let t=this.peek();if(e&&t.type!==e)throw QI.syntaxInvalid(`Expected ${e}, got ${t.type}`);return this.pos++,t}tokenize(e){let t=[],n=RegExp(`\\s+|\\(|\\)|,|\\.|'(?:''|[^'])*'|\\$[A-Za-z0-9_]*|${pz}`,`g`),r,i=0;for(;r=n.exec(e);){if(r.index!==i)throw QI.syntaxInvalid(`Unexpected character at position ${i}.`);let e=r[0];if(i=n.lastIndex,!/^\s+$/.test(e))switch(e){case`(`:t.push({type:`LPAREN`});break;case`)`:t.push({type:`RPAREN`});break;case`,`:t.push({type:`COMMA`});break;case`.`:t.push({type:`DOT`});break;default:if(e.startsWith(`$`)){if(e!==`$this`)throw QI.syntaxInvalid(`The marker ${e} is unknown.`);t.push({type:`ITSELF`});break}Object.prototype.hasOwnProperty.call(fz,e)?t.push({type:fz[e]}):e.startsWith(`'`)&&e.endsWith(`'`)?t.push({type:`ESCAPED_TEXT`,value:e}):t.push({type:`FIELD`,value:e})}}if(i!==e.length)throw QI.syntaxInvalid(`Unexpected character at position ${i}.`);return t.push({type:`EOF`}),t}parseFilterExpression(e,t=0){if(t>mz)throw QI.syntaxInvalid(`The maximum nesting depth was exceeded.`);let n=this.peek();switch(n.type){case`NOT`:return this.parseNotExpression(e,t);case`AND`:case`OR`:return this.parseLogicalExpression(e,t);case`eq`:case`gt`:case`gte`:case`lt`:case`lte`:return this.parseComparisonExpression(e);case`like`:case`startsWith`:case`endsWith`:return this.parseMatchExpression(e);case`in`:case`nin`:return this.parseInExpression(e);case`elemMatch`:return this.parseElemMatchExpression(e,t);case`size`:return this.parseSizeExpression(e);default:throw QI.syntaxInvalid(`Unexpected token in filter expression: ${n.type}`)}}parseNotExpression(e,t=0){this.consume(`NOT`),this.consume(`LPAREN`);let n=this.parseFilterExpression(e,t+1);if(this.consume(`RPAREN`),_L(n)){let e=hz[n.operator];if(e)return new vL(e,n.field,n.value)}return uL(n,CI.NOT)&&n.value.length===1?n.value[0]:new mL(CI.NOT,[n])}parseLogicalExpression(e,t=0){let n=this.consume().type;if(n!==`AND`&&n!==`OR`)throw QI.syntaxInvalid(`Expected AND or OR token type.`);this.consume(`LPAREN`);let r=[this.parseFilterExpression(e,t+1)];for(;this.peek().type===`COMMA`;)this.consume(`COMMA`),r.push(this.parseFilterExpression(e,t+1));return this.consume(`RPAREN`),n===`AND`?new mL(CI.AND,r):new mL(CI.OR,r)}parseComparisonExpression(e){let t=this.consume().type;this.consume(`LPAREN`);let n=this.parseExpressionFieldChain(e);this.consume(`COMMA`);let r=this.parseExpressionValue();switch(this.consume(`RPAREN`),t){case`eq`:return new vL(SI.EQUAL,n,r);case`gt`:return new vL(SI.GREATER_THAN,n,r);case`gte`:return new vL(SI.GREATER_THAN_EQUAL,n,r);case`lt`:return new vL(SI.LESS_THAN,n,r);case`lte`:return new vL(SI.LESS_THAN_EQUAL,n,r)}throw QI.syntaxInvalid(`Token type ${t} not supported as comparison operator.`)}parseMatchExpression(e){let t=this.consume().type;this.consume(`LPAREN`);let n=this.parseExpressionFieldChain(e);this.consume(`COMMA`);let r=this.consume(`ESCAPED_TEXT`).value;this.consume(`RPAREN`);let i=r.length>=2?r.slice(1,-1).replace(/''/g,`'`):r;switch(t){case`like`:return new vL(SI.CONTAINS,n,i);case`endsWith`:return new vL(SI.ENDS_WITH,n,i);default:return new vL(SI.STARTS_WITH,n,i)}}parseInExpression(e){let t=this.peek();t.type===`nin`?this.consume(`nin`):this.consume(`in`),this.consume(`LPAREN`);let n=this.parseExpressionFieldChain(e),r=[];for(;this.peek().type===`COMMA`;)this.consume(`COMMA`),r.push(this.parseExpressionValue());return this.consume(`RPAREN`),t.type===`nin`?new vL(SI.NOT_IN,n,r):new vL(SI.IN,n,r)}parseSizeExpression(e){this.consume(`size`),this.consume(`LPAREN`);let t=this.parseExpressionFieldChain(e);this.consume(`COMMA`);let n=this.parseExpressionValue();if(this.consume(`RPAREN`),typeof n!=`number`||!Number.isInteger(n)||n<0)throw QI.keyValueInvalid(t);return new vL(SI.SIZE,t,n)}parseElemMatchExpression(e,t=0){this.consume(`elemMatch`),this.consume(`LPAREN`);let n=this.parseElemMatchTarget(e);this.consume(`COMMA`),this.elemMatchDepth+=1;let r;try{r=this.parseFilterExpression(n.scope,t+1)}finally{--this.elemMatchDepth}return this.consume(`RPAREN`),new vL(SI.ELEM_MATCH,n.field,r)}parseElemMatchTarget(e){if(this.peek().type===`ITSELF`)return{field:this.parseExpressionFieldChain(e),scope:e?this.buildUnboundScope(e):void 0};let t=[this.consume(`FIELD`).value];for(;this.peek().type===`DOT`;)this.consume(`DOT`),t.push(this.consume(`FIELD`).value);if(!e)return{field:t.join(`.`)};t.length>1&&(t[0]===`__DEFAULT__`||t[0]===e.schema.name)&&t.shift();let n=e.resolveKey(t.join(`.`));if(!n.success)throw QI.keyInvalid(n.input);let r=[...n.path,n.name].join(`.`),i;try{let e=n.scope.descend(n.name);e instanceof oL&&(i=e)}catch(e){if(!(e instanceof yI)||e.code!==pI.KEY_PATH_INVALID)throw e}return{field:r,scope:i??this.buildUnboundScope(e)}}buildUnboundScope(e){return oL.for(this.registry,uI.FILTERS,void 0,{throwOnFailure:!0,strict:e.strict})}parseExpressionValue(){let e=this.consume();if(e.type!==`ESCAPED_TEXT`&&e.type!==`NULL`)throw QI.syntaxInvalid(`Unexpected token in value: ${e.type}`);return this.normalizeValue(e.value??`null`)}parseExpressionFieldChain(e){if(this.peek().type===`ITSELF`){if(this.consume(`ITSELF`),this.elemMatchDepth===0)throw QI.keyInvalid(gL);return gL}let t=this.consume(`FIELD`);if(t.type!==`FIELD`)throw QI.syntaxInvalid(`Unexpected token in field chain: ${t.type}`);let n=[t.value];for(;this.peek().type===`DOT`;)this.consume(`DOT`),n.push(this.consume(`FIELD`).value);if(e){n.length>1&&(n[0]===`__DEFAULT__`||n[0]===e.schema.name)&&n.shift();let t=e.resolveKey(n.join(`.`));if(!t.success)throw QI.keyInvalid(t.input);return[...t.path,t.name].join(`.`)}return n.join(`.`)}normalizeValue(e){if(typeof e==`string`){let t=e.trim();return t.length===0?t:t.startsWith(`'`)&&t.endsWith(`'`)&&t.length>=2?JR(t.slice(1,-1).replace(/''/g,`'`)):JR(t)}if(typeof e==`number`)return e;if(e==null)return null;throw SyntaxError(`Value can not be normalized.`)}},_z=class extends sz{},vz=class extends cz{},yz=class extends lz{},bz=class extends WR{fieldsParser;filtersParser;paginationParser;relationsParser;sortParser;constructor(e){super(e),this.fieldsParser=new dz(this.registry),this.filtersParser=new gz(this.registry),this.paginationParser=new _z(this.registry),this.relationsParser=new vz(this.registry),this.sortParser=new yz(this.registry)}},xz=t(((e,t)=>{t.exports=TypeError})),Sz=t(((e,t)=>{t.exports={}})),Cz=t(((e,t)=>{var n=typeof Map==`function`&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,i=n&&r&&typeof r.get==`function`?r.get:null,a=n&&Map.prototype.forEach,o=typeof Set==`function`&&Set.prototype,s=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,c=o&&s&&typeof s.get==`function`?s.get:null,l=o&&Set.prototype.forEach,u=typeof WeakMap==`function`&&WeakMap.prototype?WeakMap.prototype.has:null,d=typeof WeakSet==`function`&&WeakSet.prototype?WeakSet.prototype.has:null,f=typeof WeakRef==`function`&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,h=Function.prototype.toString,g=String.prototype.match,_=String.prototype.slice,v=String.prototype.replace,y=String.prototype.toUpperCase,b=String.prototype.toLowerCase,x=RegExp.prototype.test,S=Array.prototype.concat,ee=Array.prototype.join,C=Array.prototype.slice,w=Math.floor,te=typeof BigInt==`function`?BigInt.prototype.valueOf:null,ne=Object.getOwnPropertySymbols,re=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,ie=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,ae=typeof Symbol==`function`&&Symbol.toStringTag?Symbol.toStringTag:null,oe=Object.prototype.propertyIsEnumerable,se=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function ce(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||x.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-w(-e):w(e);if(r!==e){var i=String(r),a=_.call(t,i.length+1);return v.call(i,n,`$&_`)+`.`+v.call(v.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return v.call(t,n,`$&_`)}var le=Sz(),ue=le.custom,de=we(ue)?ue:null,fe={__proto__:null,double:`"`,single:`'`},pe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};t.exports=function e(t,n,r,o){var s=n||{};if(De(s,`quoteStyle`)&&!De(fe,s.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(De(s,`maxStringLength`)&&(typeof s.maxStringLength==`number`?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!De(s,`customInspect`)||s.customInspect;if(typeof u!=`boolean`&&u!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(De(s,`indent`)&&s.indent!==null&&s.indent!==` `&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(De(s,`numericSeparator`)&&typeof s.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return Ie(t,s);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var f=String(t);return d?ce(t,f):f}if(typeof t==`bigint`){var m=String(t)+`n`;return d?ce(t,m):m}var h=s.depth===void 0?5:s.depth;if(r===void 0&&(r=0),r>=h&&h>0&&typeof t==`object`)return _e(t)?`[Array]`:`[Object]`;var g=He(s,r);if(o===void 0)o=[];else if(Ae(o,t)>=0)return`[Circular]`;function y(t,n,i){if(n&&(o=C.call(o),o.push(n)),i){var a={depth:s.depth};return De(s,`quoteStyle`)&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if(typeof t==`function`&&!ye(t)){var x=ke(t),w=We(t,y);return`[Function`+(x?`: `+x:` (anonymous)`)+`]`+(w.length>0?` { `+ee.call(w,`, `)+` }`:``)}if(we(t)){var ne=ie?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):re.call(t);return typeof t==`object`&&!ie?Re(ne):ne}if(Fe(t)){for(var ue=`<`+b.call(String(t.nodeName)),pe=t.attributes||[],ge=0;ge<pe.length;ge++)ue+=` `+pe[ge].name+`=`+me(he(pe[ge].value),`double`,s);return ue+=`>`,t.childNodes&&t.childNodes.length&&(ue+=`...`),ue+=`</`+b.call(String(t.nodeName))+`>`,ue}if(_e(t)){if(t.length===0)return`[]`;var Ee=We(t,y);return g&&!Ve(Ee)?`[`+Ue(Ee,g)+`]`:`[ `+ee.call(Ee,`, `)+` ]`}if(be(t)){var Le=We(t,y);return!(`cause`in Error.prototype)&&`cause`in t&&!oe.call(t,`cause`)?`{ [`+String(t)+`] `+ee.call(S.call(`[cause]: `+y(t.cause),Le),`, `)+` }`:Le.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+ee.call(Le,`, `)+` }`}if(typeof t==`object`&&u){if(de&&typeof t[de]==`function`&&le)return le(t,{depth:h-r});if(u!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(je(t)){var Ge=[];return a&&a.call(t,function(e,n){Ge.push(y(n,t,!0)+` => `+y(e,t))}),Be(`Map`,i.call(t),Ge,g)}if(T(t)){var Ke=[];return l&&l.call(t,function(e){Ke.push(y(e,t))}),Be(`Set`,c.call(t),Ke,g)}if(Me(t))return ze(`WeakMap`);if(Pe(t))return ze(`WeakSet`);if(Ne(t))return ze(`WeakRef`);if(Se(t))return Re(y(Number(t)));if(Te(t))return Re(y(te.call(t)));if(Ce(t))return Re(p.call(t));if(xe(t))return Re(y(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||typeof global<`u`&&t===global)return`{ [object globalThis] }`;if(!ve(t)&&!ye(t)){var qe=We(t,y),Je=se?se(t)===Object.prototype:t instanceof Object||t.constructor===Object,Ye=t instanceof Object?``:`null prototype`,Xe=!Je&&ae&&Object(t)===t&&ae in t?_.call(Oe(t),8,-1):Ye?`Object`:``,Ze=(Je||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``)+(Xe||Ye?`[`+ee.call(S.call([],Xe||[],Ye||[]),`: `)+`] `:``);return qe.length===0?Ze+`{}`:g?Ze+`{`+Ue(qe,g)+`}`:Ze+`{ `+ee.call(qe,`, `)+` }`}return String(t)};function me(e,t,n){var r=fe[n.quoteStyle||t];return r+e+r}function he(e){return v.call(String(e),/"/g,`&quot;`)}function ge(e){return!ae||!(typeof e==`object`&&(ae in e||e[ae]!==void 0))}function _e(e){return Oe(e)===`[object Array]`&&ge(e)}function ve(e){return Oe(e)===`[object Date]`&&ge(e)}function ye(e){return Oe(e)===`[object RegExp]`&&ge(e)}function be(e){return Oe(e)===`[object Error]`&&ge(e)}function xe(e){return Oe(e)===`[object String]`&&ge(e)}function Se(e){return Oe(e)===`[object Number]`&&ge(e)}function Ce(e){return Oe(e)===`[object Boolean]`&&ge(e)}function we(e){if(ie)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||!re)return!1;try{return re.call(e),!0}catch{}return!1}function Te(e){if(!e||typeof e!=`object`||!te)return!1;try{return te.call(e),!0}catch{}return!1}var Ee=Object.prototype.hasOwnProperty||function(e){return e in this};function De(e,t){return Ee.call(e,t)}function Oe(e){return m.call(e)}function ke(e){if(e.name)return e.name;var t=g.call(h.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Ae(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function je(e){if(!i||!e||typeof e!=`object`)return!1;try{i.call(e);try{c.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Me(e){if(!u||!e||typeof e!=`object`)return!1;try{u.call(e,u);try{d.call(e,d)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Ne(e){if(!f||!e||typeof e!=`object`)return!1;try{return f.call(e),!0}catch{}return!1}function T(e){if(!c||!e||typeof e!=`object`)return!1;try{c.call(e);try{i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Pe(e){if(!d||!e||typeof e!=`object`)return!1;try{d.call(e,d);try{u.call(e,u)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Fe(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement||typeof e.nodeName==`string`&&typeof e.getAttribute==`function`}function Ie(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return Ie(_.call(e,0,t.maxStringLength),t)+r}var i=pe[t.quoteStyle||`single`];return i.lastIndex=0,me(v.call(v.call(e,i,`\\$1`),/[\x00-\x1f]/g,Le),`single`,t)}function Le(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+y.call(t.toString(16))}function Re(e){return`Object(`+e+`)`}function ze(e){return e+` { ? }`}function Be(e,t,n,r){var i=r?Ue(n,r):ee.call(n,`, `);return e+` (`+t+`) {`+i+`}`}function Ve(e){for(var t=0;t<e.length;t++)if(Ae(e[t],`
68
68
  `)>=0)return!1;return!0}function He(e,t){var n;if(e.indent===` `)n=` `;else if(typeof e.indent==`number`&&e.indent>0)n=ee.call(Array(e.indent+1),` `);else return null;return{base:n,prev:ee.call(Array(t+1),n)}}function Ue(e,t){if(e.length===0)return``;var n=`
69
69
  `+t.prev+t.base;return n+ee.call(e,`,`+n)+`
70
- `+t.prev}function We(e,t){var n=_e(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=De(e,i)?t(e[i],e):``}var a=typeof ne==`function`?ne(e):[],o;if(ie){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e)De(e,c)&&(n&&String(Number(c))===c&&c<e.length||ie&&o[`$`+c]instanceof Symbol||(x.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))));if(typeof ne==`function`)for(var l=0;l<a.length;l++)oe.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}})),wz=t(((e,t)=>{var n=Cz(),r=xz(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},s=function(e,t){return e?!!i(e,t):!1},c=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=c(e,t);return n&&e&&!e.next&&(e=void 0),!!n},get:function(t){return a(e,t)},has:function(t){return s(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}})),Tz=t(((e,t)=>{t.exports=Object})),Ez=t(((e,t)=>{t.exports=Error})),Dz=t(((e,t)=>{t.exports=EvalError})),Oz=t(((e,t)=>{t.exports=RangeError})),kz=t(((e,t)=>{t.exports=ReferenceError})),Az=t(((e,t)=>{t.exports=SyntaxError})),jz=t(((e,t)=>{t.exports=URIError})),Mz=t(((e,t)=>{t.exports=Math.abs})),Nz=t(((e,t)=>{t.exports=Math.floor})),Pz=t(((e,t)=>{t.exports=Math.max})),Fz=t(((e,t)=>{t.exports=Math.min})),Iz=t(((e,t)=>{t.exports=Math.pow})),Lz=t(((e,t)=>{t.exports=Math.round})),Rz=t(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),zz=t(((e,t)=>{var n=Rz();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),Bz=t(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),Vz=t(((e,t)=>{var n=Bz();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),Hz=t(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),Uz=t(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),Wz=t(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=Uz();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),Gz=t(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),Kz=t(((e,t)=>{t.exports=Tz().getPrototypeOf||null})),qz=t(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||n.apply(t)!==i)throw TypeError(`Function.prototype.bind called on incompatible `+t);for(var c=o(arguments,1),l,u=function(){if(this instanceof l){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},d=r(0,t.length-c.length),f=[],p=0;p<d;p++)f[p]=`$`+p;if(l=Function(`binder`,`return function (`+s(f,`,`)+`){ return binder.apply(this,arguments); }`)(u),t.prototype){var m=function(){};m.prototype=t.prototype,l.prototype=new m,m.prototype=null}return l}})),Jz=t(((e,t)=>{var n=qz();t.exports=Function.prototype.bind||n})),Yz=t(((e,t)=>{t.exports=Function.prototype.call})),Xz=t(((e,t)=>{t.exports=Function.prototype.apply})),Zz=t(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),Qz=t(((e,t)=>{var n=Jz(),r=Xz(),i=Yz();t.exports=Zz()||n.call(i,r)})),$z=t(((e,t)=>{var n=Jz(),r=xz(),i=Yz(),a=Qz();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),eB=t(((e,t)=>{var n=$z(),r=Vz(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`&&function(e){return s(e==null?e:o(e))}})),tB=t(((e,t)=>{var n=Gz(),r=Kz(),i=eB();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),nB=t(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=Jz().call(n,r)})),rB=t(((e,t)=>{var n,r=Tz(),i=Ez(),a=Dz(),o=Oz(),s=kz(),c=Az(),l=xz(),u=jz(),d=Mz(),f=Nz(),p=Pz(),m=Fz(),h=Iz(),g=Lz(),_=zz(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=Vz(),x=Hz(),S=function(){throw new l},ee=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}}():S,C=Wz()(),w=tB(),te=Kz(),ne=Gz(),re=Xz(),ie=Yz(),ae={},oe=typeof Uint8Array>`u`||!w?n:w(Uint8Array),se={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":C&&w?w([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":ae,"%AsyncGenerator%":ae,"%AsyncGeneratorFunction%":ae,"%AsyncIteratorPrototype%":ae,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":ae,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&w?w(w([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!C||!w?n:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!C||!w?n:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&w?w(``[Symbol.iterator]()):n,"%Symbol%":C?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":ee,"%TypedArray%":oe,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":ie,"%Function.prototype.apply%":re,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":te,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":ne};if(w)try{null.error}catch(e){se[`%Error.prototype%`]=w(w(e))}var ce=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&w&&(n=w(i.prototype))}return se[t]=n,n},le={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},ue=Jz(),de=nB(),fe=ue.call(ie,Array.prototype.concat),pe=ue.call(re,Array.prototype.splice),me=ue.call(ie,String.prototype.replace),he=ue.call(ie,String.prototype.slice),ge=ue.call(ie,RegExp.prototype.exec),_e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ve=/\\(\\)?/g,ye=function(e){var t=he(e,0,1),n=he(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return me(e,_e,function(e,t,n,i){r[r.length]=n?me(i,ve,`$1`):t||e}),r},be=function(e,t){var n=e,r;if(de(le,n)&&(r=le[n],n=`%`+r[0]+`%`),de(se,n)){var i=se[n];if(i===ae&&(i=ce(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(ge(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ye(e),r=n.length>0?n[0]:``,i=be(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],pe(n,fe([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=he(p,0,1),h=he(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,de(se,a))o=se[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=de(o,p),o=o[p];f&&!s&&(se[a]=o)}}return o}})),iB=t(((e,t)=>{var n=rB(),r=$z(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),aB=t(((e,t)=>{var n=rB(),r=iB(),i=Cz(),a=xz(),o=n(`%Map%`,!0),s=r(`Map.prototype.get`,!0),c=r(`Map.prototype.set`,!0),l=r(`Map.prototype.has`,!0),u=r(`Map.prototype.delete`,!0),d=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=u(e,t);return d(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return s(e,t)},has:function(t){return e?l(e,t):!1},set:function(t,n){e||=new o,c(e,t,n)}};return t}})),oB=t(((e,t)=>{var n=rB(),r=iB(),i=Cz(),a=aB(),o=xz(),s=n(`%WeakMap%`,!0),c=r(`WeakMap.prototype.get`,!0),l=r(`WeakMap.prototype.set`,!0),u=r(`WeakMap.prototype.has`,!0),d=r(`WeakMap.prototype.delete`,!0);t.exports=s?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(s&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return d(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?c(e,n):t&&t.get(n)},has:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?u(e,n):!!t&&t.has(n)},set:function(n,r){s&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new s,l(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a})),sB=t(((e,t)=>{var n=xz(),r=Cz(),i=wz(),a=aB(),o=oB()||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+(e&&Object(e)===e?`the given object key`:r(e)))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=o(),e.set(t,n)}};return t}})),cB=t(((e,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}})),lB=t(((e,t)=>{var n=cB(),r=sB(),i=Hz(),a=Object.prototype.hasOwnProperty,o=Array.isArray,s=r(),c=function(e,t){return s.set(e,t),e},l=function(e){return s.has(e)},u=function(e){return s.get(e)},d=function(e,t){s.set(e,t)},f=function(){for(var e=[],t=0;t<256;++t)e[e.length]=`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase();return e}(),p=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)n[i]!==void 0&&(r[r.length]=n[i]);t.obj[t.prop]=r}}},m=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},h=function(e,t,n){t===`__proto__`&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},g=function e(t,n,r){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(o(t)){var i=t.length;if(r&&typeof r.arrayLimit==`number`&&i>=r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(m(t.concat(n),r),i)}t[i]=n}else if(t&&typeof t==`object`)if(l(t)){var s=u(t)+1;t[s]=n,d(t,s)}else if(r&&r.strictMerge)return[t,n];else(r&&(r.plainObjects||r.allowPrototypes)||!a.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!=`object`){if(l(n)){for(var f=Object.keys(n),p=r&&r.plainObjects?{__proto__:null,0:t}:{0:t},g=0;g<f.length;g++){var _=parseInt(f[g],10);p[_+1]=n[f[g]]}return c(p,u(n)+1)}var v=[t].concat(n);if(r&&typeof r.arrayLimit==`number`&&v.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(m(v,r),v.length-1)}return v}var y=t;if(o(t)&&!o(n)&&(y=m(t,r)),o(t)&&o(n)){if(n.forEach(function(n,i){if(a.call(t,i)){var o=t[i];o&&typeof o==`object`&&n&&typeof n==`object`?t[i]=e(o,n,r):t[t.length]=n}else t[i]=n}),r&&typeof r.arrayLimit==`number`&&t.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(m(t,r),t.length-1)}return t}return Object.keys(n).reduce(function(t,i){var o=n[i];if(a.call(t,i)?h(t,i,e(t[i],o,r)):h(t,i,o),l(n)&&!l(t)&&c(t,u(n)),l(t)){var s=parseInt(i,10);String(s)===i&&s>=0&&s>u(t)&&d(t,s)}return t},y)},_=function(e,t){return Object.keys(t).reduce(function(e,n){return h(e,n,t[n]),e},e)},v=function(e,t,n){var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},y=1024;t.exports={arrayToObject:m,assign:_,combine:function(e,t,n,r,i){if(l(e)){if(i)throw RangeError(`Array limit exceeded. Only `+n+` element`+(n===1?``:`s`)+` allowed in an array.`);var a=u(e)+1;return e[a]=t,d(e,a),e}var o=[].concat(e,t);if(o.length>n){if(i)throw RangeError(`Array limit exceeded. Only `+n+` element`+(n===1?``:`s`)+` allowed in an array.`);return c(m(o,{plainObjects:r}),o.length-1)}return o},compact:function(e){for(var t=[{obj:{o:e},prop:`o`}],n=r(),i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],s=Object.keys(o),c=0;c<s.length;++c){var l=s[c],u=o[l];typeof u==`object`&&u&&!n.has(u)&&(t[t.length]={obj:o,prop:l},n.set(u,!0))}return p(t),e},decode:v,encode:function(e,t,r,i,a){if(e.length===0)return e;var o=e;if(typeof e==`symbol`?o=Symbol.prototype.toString.call(e):typeof e!=`string`&&(o=String(e)),r===`iso-8859-1`)return escape(o).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`});for(var s=``,c=0;c<o.length;c+=y){var l=o.length>=y?o.slice(c,c+y):o;if(c+y<o.length){var u=l.charCodeAt(l.length-1);u>=55296&&u<=56319&&(l=l.slice(0,-1),--c)}for(var d=[],p=0;p<l.length;++p){var m=l.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||a===n.RFC1738&&(m===40||m===41)){d[d.length]=l.charAt(p);continue}if(m<128){d[d.length]=f[m];continue}if(m<2048){d[d.length]=f[192|m>>6]+f[128|m&63];continue}if(m<55296||m>=57344){d[d.length]=f[224|m>>12]+f[128|m>>6&63]+f[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|l.charCodeAt(p)&1023),d[d.length]=f[240|m>>18]+f[128|m>>12&63]+f[128|m>>6&63]+f[128|m&63]}s+=d.join(``)}return s},isBuffer:function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:l,isRegExp:function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},markOverflow:c,maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n[n.length]=t(e[r]);return n}return t(e)},merge:g}})),uB=t(((e,t)=>{var n=sB(),r=lB(),i=cB(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,ee,C,w){for(var te=t,ne=w,re=0,ie=!1;(ne=ne.get(m))!==void 0&&!ie;){var ae=ne.get(t);if(re+=1,ae!==void 0){if(ae===re)throw RangeError(`Cyclic object value`);ie=!0}ne.get(m)===void 0&&(re=0)}if(typeof _==`function`?te=_(i,te):te instanceof Date?te=b(te):a===`comma`&&s(te)&&(te=r.maybeMap(te,function(e){return e instanceof Date?b(e):e})),te===null){if(u)return S(g&&!ee?g(i,f.encoder,C,`key`,x):i);te=``}if(p(te)||r.isBuffer(te))return g?[S(ee?i:g(i,f.encoder,C,`key`,x))+`=`+S(g(te,f.encoder,C,`value`,x))]:[S(i)+`=`+S(String(te))];var oe=[];if(te===void 0)return oe;var se;if(a===`comma`&&s(te))ee&&g&&(te=r.maybeMap(te,function(e){return e==null?e:g(e)})),se=[{value:te.length>0?te.join(`,`)||null:void 0}];else if(s(_))se=_;else{var ce=Object.keys(te);se=v?ce.sort(v):ce}var le=h?String(i).replace(/\./g,`%2E`):String(i),ue=o&&s(te)&&te.length===1?le+`[]`:le;if(c&&s(te)&&te.length===0)return ue+`[]`;for(var de=0;de<se.length;++de){var fe=se[de],pe=typeof fe==`object`&&fe&&fe.value!==void 0?fe.value:te[fe];if(!(d&&pe===null)){var me=y&&h?String(fe).replace(/\./g,`%2E`):String(fe),he=s(te)?typeof a==`function`?a(ue,me):ue:ue+(y?`.`+me:`[`+me+`]`);w.set(t,re);var ge=n();ge.set(m,w),l(oe,e(pe,he,a,o,c,u,d,h,a===`comma`&&ee&&s(te)?null:g,_,v,y,b,x,S,ee,C,ge))}}return oe},g=function(e){if(!e)return f;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||f.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=i.default;if(e.format!==void 0){if(!a.call(i.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r=i.formatters[n],c=f.filter;(typeof e.filter==`function`||s(e.filter))&&(c=e.filter);var l=e.arrayFormat in o?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:f.arrayFormat;if(`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=e.allowDots===void 0?e.encodeDotInKeys===!0||f.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?f.delimiter:e.delimiter,encode:typeof e.encode==`boolean`?e.encode:f.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:f.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:f.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:f.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:f.strictNullHandling}};t.exports=function(e,t){var r=e,i=g(t),a,c;typeof i.filter==`function`?(c=i.filter,r=c(``,r)):s(i.filter)&&(c=i.filter,a=c);var u=[];if(typeof r!=`object`||!r)return``;var d=o[i.arrayFormat],f=d===`comma`&&i.commaRoundTrip;a||=Object.keys(r),i.sort&&a.sort(i.sort);for(var p=n(),m=0;m<a.length;++m){var _=a[m];if(_!=null){var v=r[_];i.skipNulls&&v===null||l(u,h(v,_,d,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p))}}var y=u.join(i.delimiter),b=i.addQueryPrefix===!0?`?`:``;return i.charsetSentinel&&(i.charset===`iso-8859-1`?b+=`utf8=%26%2310003%3B`+i.delimiter:b+=`utf8=%E2%9C%93`+i.delimiter),y.length>0?b+y:``}})),dB=t(((e,t)=>{var n=lB(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n,r){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1){if(r&&t.throwOnLimitExceeded)for(var i=0,a=e.indexOf(`,`);a>-1;){if(i+=1,i>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);a=e.indexOf(`,`,a+1)}return e.split(`,`)}if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded&&f!==void 0?f+1:f);if(t.throwOnLimitExceeded&&f!==void 0&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h<p.length;++h)p[h].indexOf(`utf8=`)===0&&(p[h]===l?g=`utf-8`:p[h]===c&&(g=`iso-8859-1`),m=h,h=p.length);for(h=0;h<p.length;++h)if(h!==m){var _=p[h],v=_.indexOf(`]=`),y=v===-1?_.indexOf(`=`):v+1,b,x;if(y===-1?(b=t.decoder(_,a.decoder,g,`key`),x=t.strictNullHandling?null:``):(b=t.decoder(_.slice(0,y),a.decoder,g,`key`),b!==null&&(x=n.maybeMap(s(_.slice(y+1),t,i(u[b])?u[b].length:0,_.indexOf(`[]=`)===-1),function(e){return t.decoder(e,a.decoder,g,`value`)}))),x&&t.interpretNumericEntities&&g===`iso-8859-1`&&(x=o(String(x))),_.indexOf(`[]=`)>-1&&(x=i(x)?[x]:x),t.comma&&i(x)&&x.length>t.arrayLimit&&(x=n.combine([],x,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded)),b!==null){var S=r.call(u,b);S&&(t.duplicates===`combine`||_.indexOf(`[]=`)>-1)?u[b]=n.combine(u[b],x,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded):(!S||t.duplicates===`last`)&&(u[b]=x)}}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=n.isOverflow(c)?c:r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c,r.arrayLimit,r.plainObjects,r.throwOnLimitExceeded);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10),h=!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays;if(!r.parseArrays&&p===``)u={0:c};else if(h&&m<r.arrayLimit)u=[],u[m]=c;else if(h&&r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);else h?(u[m]=c,n.markOverflow(u,m)):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t){var n=t.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e;if(t.depth<=0)return!t.plainObjects&&r.call(Object.prototype,n)&&!t.allowPrototypes?void 0:[n];var i=[],a=n.indexOf(`[`),o=a>=0?n.slice(0,a):n;if(o){if(!t.plainObjects&&r.call(Object.prototype,o)&&!t.allowPrototypes)return;i[i.length]=o}for(var s=n.length,c=a,l=0;c>=0&&l<t.depth;){for(var u=1,d=c+1,f=-1;d<s&&f<0;){var p=n.charCodeAt(d);p===91?u+=1:p===93&&(--u,u===0&&(f=d)),d+=1}if(f<0)return i[i.length]=`[`+n.slice(c)+`]`,i;var m=n.slice(c,f+1),h=m.slice(1,-1);if(!t.plainObjects&&r.call(Object.prototype,h)&&!t.allowPrototypes)return;i[i.length]=m,l+=1,c=n.indexOf(`[`,f+1)}if(c>=0){if(t.strictDepth===!0)throw RangeError(`Input depth exceeded depth option of `+t.depth+` and strictDepth is true`);i[i.length]=`[`+n.slice(c)+`]`}return i},p=function(e,t,n,r){if(e){var i=f(e,n);if(i)return d(i,t,n,r)}},m=function(e){if(!e)return a;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.decodeDotInKeys!==void 0&&typeof e.decodeDotInKeys!=`boolean`)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!=`function`)throw TypeError(`Decoder has to be a function.`);if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);if(e.throwOnLimitExceeded!==void 0&&typeof e.throwOnLimitExceeded!=`boolean`)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=e.charset===void 0?a.charset:e.charset,r=e.duplicates===void 0?a.duplicates:e.duplicates;if(r!==`combine`&&r!==`first`&&r!==`last`)throw TypeError(`The duplicates option must be either combine, first, or last`);return{allowDots:e.allowDots===void 0?e.decodeDotInKeys===!0||a.allowDots:!!e.allowDots,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes==`boolean`?e.allowPrototypes:a.allowPrototypes,allowSparse:typeof e.allowSparse==`boolean`?e.allowSparse:a.allowSparse,arrayLimit:typeof e.arrayLimit==`number`?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:a.charsetSentinel,comma:typeof e.comma==`boolean`?e.comma:a.comma,decodeDotInKeys:typeof e.decodeDotInKeys==`boolean`?e.decodeDotInKeys:a.decodeDotInKeys,decoder:typeof e.decoder==`function`?e.decoder:a.decoder,delimiter:typeof e.delimiter==`string`||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:typeof e.depth==`number`||e.depth===!1?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities==`boolean`?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==`number`?e.parameterLimit:a.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects==`boolean`?e.plainObjects:a.plainObjects,strictDepth:typeof e.strictDepth==`boolean`?!!e.strictDepth:a.strictDepth,strictMerge:typeof e.strictMerge==`boolean`?!!e.strictMerge:a.strictMerge,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded==`boolean`&&e.throwOnLimitExceeded}};t.exports=function(e,t){var r=m(t);if(e===``||e==null)return r.plainObjects?{__proto__:null}:{};for(var i=typeof e==`string`?u(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),s=0;s<o.length;++s){var c=o[s],l=p(c,i[c],r,typeof e==`string`);a=n.merge(a,l,r)}return r.allowSparse===!0?a:n.compact(a)}})),fB=t(((e,t)=>{var n=uB(),r=dB();t.exports={formats:cB(),parse:r,stringify:n}}))(),pB=`codec`,mB=`$root`,hB=`url-expression`;function gB(e){let t=[];return e.fields.value.length>0&&t.push(uI.FIELDS),e.filters.value.length>0&&t.push(uI.FILTERS),(e.pagination.limit!==void 0||e.pagination.offset!==void 0)&&t.push(uI.PAGINATION),e.relations.value.length>0&&t.push(uI.RELATIONS),e.sorts.value.length>0&&t.push(uI.SORTS),t}function _B(e,t){if(t===void 0)return e;let n=t.map(e=>fI(e));return e.filter(e=>n.includes(fI(e)))}function vB(e,t){let n=fI(t);return e.map(e=>fI(e)).includes(n)}function yB(e){return e.schema!==void 0||e.strict!==void 0}function bB(e){let t=!1,n=e.value.map(e=>e.condition===void 0?e:(t=!0,new xI(e.name,e.operator)));return t?new lL(n):e}function xB(e){let t=bB(e.fields);return t===e.fields?e:new BL({fields:t,filters:e.filters,pagination:e.pagination,relations:e.relations,sorts:e.sorts})}function SB(e){return(0,fB.parse)(e.charAt(0)===`?`?e.substring(1):e)}var CB=[[`fields`,uI.FIELDS],[`filter`,uI.FILTERS],[`page`,uI.PAGINATION],[`include`,uI.RELATIONS],[`sort`,uI.SORTS]];function wB(e){if(!ZF(e)||!$F(e,`$root`))return e;let{[mB]:t,...n}=e;if(!$F(n,`__DEFAULT__`))return{[dI]:t,...n};let r=e=>Array.isArray(e)?e:[e];return{...n,[dI]:[...r(n[dI]),...r(t)]}}var TB=class{parser;constructor(e){this.parser=e}decode(e,t={}){let n=this.prepare(e);return n?this.parser.parse(n,t):null}async decodeAsync(e,t={}){let n=this.prepare(e);return n?this.parser.parseAsync(n,t):null}decodeFields(e,t={}){let n=SB(e);return ZF(n)?$F(n,`fields`)?this.parser.parseFields(wB(n.fields),t):this.parser.parseFields(wB(n),t):null}decodeFilters(e,t={}){let n=SB(e);return ZF(n)?$F(n,`filter`)?this.parser.parseFilters(n.filter,t):this.parser.parseFilters(this.filtersFallback(n),t):null}async decodeFiltersAsync(e,t={}){let n=SB(e);return ZF(n)?$F(n,`filter`)?this.parser.parseFiltersAsync(n.filter,t):this.parser.parseFiltersAsync(this.filtersFallback(n),t):null}decodePagination(e,t={}){let n=SB(e);return ZF(n)?$F(n,`page`)?this.parser.parsePagination(n.page,t):this.parser.parsePagination(n,t):null}decodeRelations(e,t={}){let n=SB(e);return ZF(n)?$F(n,`include`)?this.parser.parseRelations(n.include,t):this.parser.parseRelations(n,t):null}decodeSorts(e,t={}){let n=SB(e);return ZF(n)?$F(n,`sort`)?this.parser.parseSorts(n.sort,t):this.parser.parseSorts(n,t):null}filtersFallback(e){return e}prepare(e){let t=typeof e==`string`?SB(e):e;if(!ZF(t))return null;let n={};for(let[e,r]of CB)$F(t,e)&&(n[r]=r===uI.FIELDS?wB(t[e]):t[e]);return n}},EB=class extends TB{constructor(e){super(new bz(e))}filtersFallback(){}},DB=new Set(Object.keys(fz)),OB=RegExp(`^(?:${pz})$`);function kB(e){return e.value.length===0?null:e.value.length===1&&_L(e.value[0])&&(e.operator===CI.AND||e.operator===CI.OR)?jB(e.value[0],!1):AB(e,!1)}function AB(e,t){if(e.value.length===0)throw hI.featureUnsupported(`filters:compound:empty`);let n=e.value.map(e=>jB(e,t));switch(e.operator){case CI.AND:case CI.OR:return`${e.operator}(${n.join(`,`)})`;case CI.NOT:return n.length===1?`not(${n[0]})`:`not(and(${n.join(`,`)}))`;default:throw hI.operatorUnsupported(e.operator)}}function jB(e,t){if(uL(e))return AB(e,t);if(!_L(e))throw hI.featureUnsupported(`filters:condition`);let n=MB(e.field,t);switch(e.operator){case SI.EQUAL:return`eq(${n},${NB(e.value)})`;case SI.NOT_EQUAL:return`not(eq(${n},${NB(e.value)}))`;case SI.LESS_THAN:return`lt(${n},${NB(e.value)})`;case SI.LESS_THAN_EQUAL:return`lte(${n},${NB(e.value)})`;case SI.GREATER_THAN:return`gt(${n},${NB(e.value)})`;case SI.GREATER_THAN_EQUAL:return`gte(${n},${NB(e.value)})`;case SI.IN:return`in(${n}${FB(e.value)})`;case SI.NOT_IN:return`nin(${n}${FB(e.value)})`;case SI.CONTAINS:return`contains(${n},${IB(e.value)})`;case SI.NOT_CONTAINS:return`not(contains(${n},${IB(e.value)}))`;case SI.STARTS_WITH:return`startsWith(${n},${IB(e.value)})`;case SI.NOT_STARTS_WITH:return`not(startsWith(${n},${IB(e.value)}))`;case SI.ENDS_WITH:return`endsWith(${n},${IB(e.value)})`;case SI.NOT_ENDS_WITH:return`not(endsWith(${n},${IB(e.value)}))`;case SI.ELEM_MATCH:{let t=e.value;if(!_L(t)&&!uL(t))throw hI.featureUnsupported(`filters:elemMatch:value`);return`elemMatch(${n},${jB(t,!0)})`}case SI.SIZE:if(typeof e.value!=`number`||!Number.isInteger(e.value)||e.value<0)throw hI.featureUnsupported(`filters:size:value`);return`size(${n},${NB(e.value)})`;default:throw hI.operatorUnsupported(e.operator)}}function MB(e,t){if(e===`$this`){if(!t)throw hI.featureUnsupported(`filters:field:${e}`);return e}let n=e.split(`.`);for(let t of n)if(!OB.test(t)||DB.has(t))throw hI.featureUnsupported(`filters:field:${e}`);return e}function NB(e){if(e==null)return`null`;if(typeof e==`string`){let t=JR(e);if(!(typeof t==`string`?t===e:t!==null&&`${t}`===e))throw hI.featureUnsupported(`filters:value:text`);return PB(e)}if(typeof e==`number`){if(Number.isNaN(e))throw hI.featureUnsupported(`filters:value:number`);return PB(`${e}`)}if(typeof e==`boolean`)return PB(`${e}`);throw hI.featureUnsupported(`filters:value:type`)}function PB(e){return`'${e.replace(/'/g,`''`)}'`}function FB(e){return(Array.isArray(e)?e:[e]).map(e=>`,${NB(e)}`).join(``)}function IB(e){return PB(typeof e==`string`?e:`${e}`)}var LB=class extends TB{constructor(e){super(new uz(e))}};function RB(e){return e.reduce((e,t)=>e===``?t:`${e}[${t}]`,``)}function zB(e,t={}){let n=t.prefixParts||[],r=[];if(Array.isArray(e)){if(n.length===0)return``;let t=RB(n),i=e.map(e=>`${e}`).filter(Boolean).join(`,`);r.push(`${encodeURIComponent(t)}=${encodeURIComponent(i)}`)}if(ZF(e)){let i=Object.keys(e);if(i.length===0)return``;for(let a of i){let i=e[a];if(ZF(i)){r.push(zB(i,{...t,prefixParts:[...n,a]}));continue}if(Array.isArray(i)){r.push(zB(i,{...t,prefixParts:[...n,a]}));continue}if(i??=`null`,i!==``){let e=RB([...n,a]);r.push(`${encodeURIComponent(e)}=${encodeURIComponent(i)}`)}}}return r.filter(e=>e!==``).join(`&`)}var BB=class{prefix;value;constructor(e){this.prefix=e,this.value=[]}reset(){this.value=[]}add(e){this.value.push(e)}serialize(){return this.value.length===0?null:zB(this.value,{prefixParts:[...this.prefix?[this.prefix]:[]]})}},VB=class{prefix;value;constructor(e){this.prefix=e,this.value={}}reset(){this.value={}}set(e,t){this.value[e]=t}has(e){return Object.prototype.hasOwnProperty.call(this.value,e)}serialize(){return Object.keys(this.value).length===0?null:zB(this.value,{prefixParts:[...this.prefix?[this.prefix]:[]]})}},HB=class{prefix;value;constructor(e){this.prefix=e,this.value={}}reset(){this.value={}}add(e,t){this.value[e]||(this.value[e]=[]),this.value[e].push(t)}serialize(){let e=Object.keys(this.value);if(e.length===0)return null;if(e.length===1&&e[0]===`__DEFAULT__`)return zB(this.value[dI],{prefixParts:[...this.prefix?[this.prefix]:[]]});let{[dI]:t,...n}=this.value;return zB(t===void 0?n:{[mB]:t,...n},{prefixParts:[...this.prefix?[this.prefix]:[]]})}},UB=class{fields;filters;pagination;relations;sorts;constructor(){this.fields=new HB(`fields`),this.filters=new VB(`filter`),this.pagination=new VB(`page`),this.relations=new BB(`include`),this.sorts=new BB(`sort`)}reset(){this.fields.reset(),this.filters.reset(),this.pagination.reset(),this.relations.reset(),this.sorts.reset()}serialize(){let e=[this.fields.serialize(),this.filters.serialize(),this.pagination.serialize(),this.relations.serialize(),this.sorts.serialize()].filter(Boolean).join(`&`);return e.length===0?null:e}},WB=class{serializer;constructor(e){this.serializer=e||new HB(`fields`)}visitFields(e){for(let t of e.value)t.accept(this);return this.serializer}visitField(e){if(e.condition!==void 0)throw hI.featureUnsupported(`fields:condition`);let t=aI(e.name);return this.serializer.add(t.path||`__DEFAULT__`,e.operator?e.operator+t.name:t.name),this.serializer}},GB=class{serializer;constructor(e){this.serializer=e||new VB(`filter`)}visitFilters(e){if(e.operator===CI.OR&&e.value.length>1)throw hI.featureUnsupported(`filters:or`);if(e.operator!==CI.AND&&e.operator!==CI.OR)throw hI.featureUnsupported(`filters:${e.operator}`);for(let t of e.value){if(uL(t))throw hI.featureUnsupported(`filters:compound`);if(_L(t)){t.accept(this);continue}throw hI.conditionDetached(t.operator)}return this.serializer}visitFilter(e){if(this.serializer.has(e.field))throw hI.featureUnsupported(`filters:field:duplicate`);return this.serializer.set(e.field,az(e)),this.serializer}},KB=class{serializer;constructor(e){this.serializer=e||new VB(`page`)}visitPagination(e){if(e.limit!==void 0){if(!Number.isInteger(e.limit)||e.limit<=0)throw hI.featureUnsupported(`pagination:limit`);this.serializer.set(`limit`,e.limit)}if(e.offset!==void 0){if(!Number.isInteger(e.offset)||e.offset<0)throw hI.featureUnsupported(`pagination:offset`);e.offset>0&&this.serializer.set(`offset`,e.offset)}return this.serializer}},qB=class{serializer;constructor(e){this.serializer=e||new BB(`include`)}visitRelations(e){for(let t of e.value)t.accept(this);return this.serializer}visitRelation(e){return this.serializer.add(e.name),this.serializer}},JB=class{serializer;constructor(e){this.serializer=e||new BB(`sort`)}visitSorts(e){for(let t of e.value)t.accept(this);return this.serializer}visitSort(e){return e.operator===WI.DESC?this.serializer.add(`-${e.name}`):this.serializer.add(e.name),this.serializer}},YB=class{serializer;fields;filters;pagination;relations;sorts;constructor(){let e=new UB;this.serializer=e,this.fields=new WB(e.fields),this.filters=new GB(e.filters),this.pagination=new KB(e.pagination),this.relations=new qB(e.relations),this.sorts=new JB(e.sorts)}reset(){this.serializer.reset()}visitQuery(e,t){return(!t||t.includes(uI.FIELDS))&&e.fields.accept(this.fields),(!t||t.includes(uI.FILTERS))&&e.filters.accept(this.filters),(!t||t.includes(uI.PAGINATION))&&e.pagination.accept(this.pagination),(!t||t.includes(uI.RELATIONS))&&e.relations.accept(this.relations),(!t||vB(t,uI.SORTS))&&e.sorts.accept(this.sorts),this.serializer}visitFields(e){return e.accept(this.fields)}visitField(e){return e.accept(this.fields)}visitFilter(e){return e.accept(this.filters)}visitFilters(e){return e.accept(this.filters)}visitPagination(e){return e.accept(this.pagination)}visitRelation(e){return e.accept(this.relations)}visitRelations(e){return e.accept(this.relations)}visitSort(e){return e.accept(this.sorts)}visitSorts(e){return e.accept(this.sorts)}},XB=class{visitor;decoder;constructor(e,t={}){this.visitor=new YB,this.decoder=t.decoder||new LB(e)}encode(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitQuery(e,t.parameters));if(n===null||!yB(t))return n;let r=_B(gB(e),t.parameters),i=this.decoder.decode(n,{...t,parameters:r});return i?(this.visitor.reset(),this.runSerializer(this.visitor.visitQuery(xB(i),r))):null}async encodeAsync(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitQuery(e,t.parameters));if(n===null||!yB(t))return n;let r=_B(gB(e),t.parameters),i=await this.decoder.decodeAsync(n,{...t,parameters:r});return i?(this.visitor.reset(),this.runSerializer(this.visitor.visitQuery(xB(i),r))):null}encodeFields(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitFields(e));if(n===null||!yB(t))return n;let r=this.decoder.decodeFields(n,t);return r?(this.visitor.reset(),this.runSerializer(this.visitor.visitFields(bB(r)))):null}encodeField(e){return this.visitor.reset(),this.runSerializer(this.visitor.visitField(e))}encodeFilters(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitFilters(e));if(n===null||!yB(t))return n;let r=this.decoder.decodeFilters(n,t);return r?(this.visitor.reset(),this.runSerializer(this.visitor.visitFilters(r))):null}async encodeFiltersAsync(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitFilters(e));if(n===null||!yB(t))return n;let r=await this.decoder.decodeFiltersAsync(n,t);return r?(this.visitor.reset(),this.runSerializer(this.visitor.visitFilters(r))):null}encodeFilter(e){return this.visitor.reset(),this.runSerializer(this.visitor.visitFilter(e))}encodePagination(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitPagination(e));if(n===null||!yB(t))return n;let r=this.decoder.decodePagination(n,t);return r?(this.visitor.reset(),this.runSerializer(this.visitor.visitPagination(r))):null}encodeRelations(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitRelations(e));if(n===null||!yB(t))return n;let r=this.decoder.decodeRelations(n,t);return r?(this.visitor.reset(),this.runSerializer(this.visitor.visitRelations(r))):null}encodeSorts(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitSorts(e));if(n===null||!yB(t))return n;let r=this.decoder.decodeSorts(n,t);return r?(this.visitor.reset(),this.runSerializer(this.visitor.visitSorts(r))):null}runSerializer(e){let t=e.serialize();return e.reset(),t}},ZB=class{simple;decoder;constructor(e,t={}){this.simple=t.simple||new XB(e),this.decoder=t.decoder||new EB(e)}encode(e,t={}){let n=this.encodeParts(e,t.parameters);if(n===null||!yB(t))return n;let r=_B(gB(e),t.parameters),i=this.decoder.decode(n,{...t,parameters:r});return i?this.encodeParts(xB(i),r):null}async encodeAsync(e,t={}){let n=this.encodeParts(e,t.parameters);if(n===null||!yB(t))return n;let r=_B(gB(e),t.parameters),i=await this.decoder.decodeAsync(n,{...t,parameters:r});return i?this.encodeParts(xB(i),r):null}encodeFields(e,t={}){return this.simple.encodeFields(e,t)}encodeFilters(e,t={}){let n=this.serializeFilters(e);if(n===null||!yB(t))return n;let r=this.decoder.decodeFilters(n,t);return r?this.serializeFilters(r):null}async encodeFiltersAsync(e,t={}){let n=this.serializeFilters(e);if(n===null||!yB(t))return n;let r=await this.decoder.decodeFiltersAsync(n,t);return r?this.serializeFilters(r):null}encodePagination(e,t={}){return this.simple.encodePagination(e,t)}encodeRelations(e,t={}){return this.simple.encodeRelations(e,t)}encodeSorts(e,t={}){return this.simple.encodeSorts(e,t)}encodeParts(e,t){let n=[!t||t.includes(uI.FIELDS)?this.simple.encodeFields(e.fields):null,!t||t.includes(uI.FILTERS)?this.serializeFilters(e.filters):null,!t||t.includes(uI.PAGINATION)?this.simple.encodePagination(e.pagination):null,!t||t.includes(uI.RELATIONS)?this.simple.encodeRelations(e.relations):null,!t||vB(t,uI.SORTS)?this.simple.encodeSorts(e.sorts):null].filter(Boolean);return n.length===0?null:n.join(`&`)}serializeFilters(e){let t=kB(e);return t===null?null:`filter=${encodeURIComponent(t)}`}},QB=`url-simple`,$B=class{items;defaultName;constructor(){this.items=new Map}register(e,t){this.items.set(e.name,e),(t||this.defaultName===void 0)&&(this.defaultName=e.name)}encode(e,t={}){let{codec:n,stamp:r,...i}=t,a=this.resolve(n),o=a.encoder.encode(e,i);return this.stampEncoded(a,o,r)}async encodeAsync(e,t={}){let{codec:n,stamp:r,...i}=t,a=this.resolve(n),o=a.encoder.encodeAsync?await a.encoder.encodeAsync(e,i):a.encoder.encode(e,i);return this.stampEncoded(a,o,r)}decode(e,t={}){let n=this.prepareDecode(e);return n?n.codec.decoder.decode(n.payload,t):null}async decodeAsync(e,t={}){let n=this.prepareDecode(e);return n?n.codec.decoder.decodeAsync?n.codec.decoder.decodeAsync(n.payload,t):n.codec.decoder.decode(n.payload,t):null}prepareDecode(e){let t=typeof e==`string`?SB(e):e;if(!ZF(t))return null;let n,r=t[pB];if(r!==void 0&&r!==``){if(typeof r!=`string`)throw _I.notResolvable();n=r}let{[pB]:i,...a}=t;if(n===void 0){for(let e of this.items.values())if(e.detect&&e.detect(a))return{codec:e,payload:a}}return{codec:this.resolve(n),payload:a}}stampEncoded(e,t,n){return t===null||n===!1?t:`${pB}=${e.name}&${t}`}resolve(e){let t=e??this.defaultName;if(t===void 0)throw _I.notResolvable();let n=this.items.get(t);if(n===void 0)throw _I.notResolvable(t);return n}};function eV(e){let t=e.filter;return typeof t==`string`?t!==``:Array.isArray(t)&&t.length>0&&t.every(e=>typeof e==`string`&&e!==``)}function tV(e){return e.filter!==void 0&&!eV(e)}function nV(e){let t=new $B,n=new LB(e),r=new XB(e,{decoder:n}),i=new EB(e),a=new ZB(e,{simple:r,decoder:i});return t.register({name:QB,encoder:r,decoder:n,detect:tV}),t.register({name:hB,encoder:a,decoder:i,detect:eV},!0),t}var rV=nV();function iV(e){if(!e)return``;let t=zL(e)?e:sR(e),n=rV.encode(t);return n?`?${n}`:``}function aV(e){return e.includes(`://`)?e.split(`://`).map(e=>aV(e)).join(`://`):e.replace(/\/+/g,`/`)}function oV(e){let t={...e},n=Object.keys(t);for(let e of n)t[e]===``&&(t[e]=null);return t}function sV(e){if(!uE(e))return!1;let t=e;return typeof t.getBaseURL==`function`&&typeof t.get==`function`&&typeof t.post==`function`&&typeof t.put==`function`&&typeof t.delete==`function`}var cV=class{client;constructor(e={}){this.client=sV(e.client)?e.client:XF(e.client)}},lV=class extends cV{async getMany(e){return(await this.client.get(`clients${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`clients/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`clients/${e}`)).data}async create(e){return(await this.client.post(`clients`,oV(e))).data}async update(e,t){return(await this.client.post(`clients/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`clients/${e}`,oV(t))).data}},uV=class extends cV{async getMany(e){return(await this.client.get(`client-permissions${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`client-permissions/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`client-permissions/${e}`)).data}async create(e){return(await this.client.post(`client-permissions`,e)).data}async update(e,t){return(await this.client.post(`client-permissions/${e}`,t)).data}},dV=class extends cV{async getMany(e={}){return(await this.client.get(`client-roles${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`client-roles/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`client-roles/${e}`)).data}async create(e){return(await this.client.post(`client-roles`,e)).data}},fV=class extends cV{async getMany(e){return(await this.client.get(`client-scopes${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`client-scopes/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`client-scopes/${e}`)).data}async create(e){return(await this.client.post(`client-scopes`,e)).data}},pV=class extends cV{async getMany(e){return(await this.client.get(`consents${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`consents/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`consents/${e}`)).data}},mV=class extends cV{async getMany(e){return(await this.client.get(`events${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`events/${e}${iV(t)}`)).data}},hV=class extends cV{getAuthorizeUri(e){return aV(`${this.client.getBaseURL()}/${vte(e)}`)}async createLinkRequest(e){return(await this.client.post(`identity-providers/${e}/link-request`)).data}async getMany(e){return(await this.client.get(`identity-providers${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`identity-providers/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`identity-providers/${e}`)).data}async create(e){return(await this.client.post(`identity-providers`,oV(e))).data}async update(e,t){return(await this.client.post(`identity-providers/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`identity-providers/${e}`,oV(t))).data}},gV=class extends cV{async getMany(e){return(await this.client.get(`identity-provider-accounts${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`identity-provider-accounts/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`identity-provider-accounts/${e}`)).data}},_V=class extends cV{async getMany(e){return(await this.client.get(`identity-provider-role-mappings${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`identity-provider-role-mappings/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`identity-provider-role-mappings/${e}`)).data}async create(e){return(await this.client.post(`identity-provider-role-mappings`,oV(e))).data}async update(e,t){return(await this.client.post(`identity-provider-role-mappings/${e}`,t)).data}},vV=class extends cV{async getMany(e){return(await this.client.get(`keys${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`keys/${e}${iV(t)}`)).data}async create(e){return(await this.client.post(`keys`,oV(e))).data}async update(e,t){return(await this.client.post(`keys/${e}`,oV(t))).data}async delete(e,t){return(await this.client.delete(`keys/${e}${t&&t.force?`?force=true`:``}`)).data}},yV=class extends cV{async getMany(e){return(await this.client.get(`policies${iV(e)}`)).data}async delete(e){return(await this.client.delete(`policies/${e}`)).data}async getOne(e,t){return(await this.client.get(`policies/${e}${iV(t)}`)).data}async getOneExpanded(e,t){return(await this.client.get(`policies/${e}/expanded${iV(t)}`)).data}async create(e){return(await this.client.post(`policies`,oV(e))).data}async createBuiltIn(e){return this.create(e)}async update(e,t){return(await this.client.post(`policies/${e}`,oV(t))).data}async updateBuiltIn(e,t){return this.update(e,t)}async createOrUpdate(e,t){return(await this.client.put(`policies/${e}`,oV(t))).data}async createOrUpdateBuiltin(e,t){return this.createOrUpdate(e,t)}async check(e,t={}){return(await this.client.post(`policies/${e}/check`,oV(t))).data}},bV=class extends cV{async getMany(e){return(await this.client.get(`permissions${iV(e)}`)).data}async delete(e){return(await this.client.delete(`permissions/${e}`)).data}async getOne(e,t){return(await this.client.get(`permissions/${e}${iV(t)}`)).data}async create(e){return(await this.client.post(`permissions`,oV(e))).data}async update(e,t){return(await this.client.post(`permissions/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`permissions/${e}`,oV(t))).data}async check(e,t={}){return(await this.client.post(`permissions/${e}/check`,oV(t))).data}},xV=class extends cV{async getMany(e){return(await this.client.get(`permission-policies${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`permission-policies/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`permission-policies/${e}`)).data}async create(e){return(await this.client.post(`permission-policies`,e)).data}},SV=class extends cV{async getMany(e){return(await this.client.get(`realms${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`realms/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`realms/${e}`)).data}async create(e){return(await this.client.post(`realms`,oV(e))).data}async update(e,t){return(await this.client.post(`realms/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`realms/${e}`,oV(t))).data}},CV=class extends cV{async getMany(e){return(await this.client.get(`roles${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`roles/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`roles/${e}`)).data}async create(e){return(await this.client.post(`roles`,oV(e))).data}async update(e,t){return(await this.client.post(`roles/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`roles/${e}`,oV(t))).data}},wV=class extends cV{async getMany(e){return(await this.client.get(`role-attributes${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`role-attributes/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`role-attributes/${e}`)).data}async create(e){return(await this.client.post(`role-attributes`,oV(e))).data}async update(e,t){return(await this.client.post(`role-attributes/${e}`,oV(t))).data}},TV=class extends cV{async getMany(e){return(await this.client.get(`role-permissions${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`role-permissions/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`role-permissions/${e}`)).data}async create(e){return(await this.client.post(`role-permissions`,e)).data}async update(e,t){return(await this.client.post(`role-permissions/${e}`,t)).data}},EV=class extends cV{async getMany(e){return(await this.client.get(`scopes${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`scopes/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`scopes/${e}`)).data}async create(e){return(await this.client.post(`scopes`,oV(e))).data}async update(e,t){return(await this.client.post(`scopes/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`scopes/${e}`,oV(t))).data}},DV=class extends cV{async getMany(e){return(await this.client.get(`sessions${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`sessions/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`sessions/${e}`)).data}async deleteMany(e){return(await this.client.delete(`sessions${iV(e)}`)).data}},OV=class extends cV{async getMany(e){return(await this.client.get(`session-tokens${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`session-tokens/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`session-tokens/${e}`)).data}async deleteMany(e){return(await this.client.delete(`session-tokens${iV(e)}`)).data}},kV=class extends cV{async getMany(e){return(await this.client.get(`trust-anchors${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`trust-anchors/${e}${iV(t)}`)).data}async create(e){return(await this.client.post(`trust-anchors`,oV(e))).data}async update(e,t){return(await this.client.post(`trust-anchors/${e}`,oV(t))).data}async delete(e){return(await this.client.delete(`trust-anchors/${e}`)).data}},AV=class extends cV{async getMany(e){return(await this.client.get(`users${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`users/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`users/${e}`)).data}async create(e){return(await this.client.post(`users`,oV(e))).data}async update(e,t){return(await this.client.post(`users/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`users/${e}`,oV(t))).data}async activate(e){return(await this.client.post(`activate`,{token:e})).data}async register(e){return(await this.client.post(`register`,oV(e))).data}async passwordForgot(e){return(await this.client.post(`password-forgot`,oV(e))).data}async passwordReset(e){return(await this.client.post(`password-reset`,oV(e))).data}},jV=class extends cV{async getMany(e){return(await this.client.get(`user-attributes${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`user-attributes/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`user-attributes/${e}`)).data}async create(e){return(await this.client.post(`user-attributes`,oV(e))).data}async update(e,t){return(await this.client.post(`user-attributes/${e}`,oV(t))).data}},MV=class extends cV{async getMany(e,t){return(await this.client.get(`users/${e}/authenticators${iV(t)}`)).data}async getOne(e,t){return(await this.client.get(`users/${e}/authenticators/${t}`)).data}async enroll(e,t){return(await this.client.post(`users/${e}/authenticators`,oV(t))).data}async confirm(e,t,n){return(await this.client.post(`users/${e}/authenticators/${t}/confirm`,n)).data}async delete(e,t){return(await this.client.delete(`users/${e}/authenticators/${t}`)).data}async challenge(e){return(await this.client.get(`authenticators/challenge`,NV(e))).data}async sendChallenge(e,t){return(await this.client.post(`authenticators/challenge/send`,e,NV(t))).data}async verifyChallenge(e,t){return(await this.client.post(`authenticators/challenge`,e,NV(t))).data}};function NV(e){if(!(!e||!e.authorizationHeader))return{headers:{Authorization:typeof e.authorizationHeader==`string`?e.authorizationHeader:VF(e.authorizationHeader)}}}var PV=class extends cV{async getMany(e){return(await this.client.get(`user-permissions${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`user-permissions/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`user-permissions/${e}`)).data}async create(e){return(await this.client.post(`user-permissions`,oV(e))).data}async update(e,t){return(await this.client.post(`user-permissions/${e}`,oV(t))).data}},FV=class extends cV{async getMany(e={}){return(await this.client.get(`user-roles${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`user-roles/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`user-roles/${e}`)).data}async create(e){return(await this.client.post(`user-roles`,e)).data}};function IV(e){return typeof e==`string`?e:[...new Set(e)].join(` `)}function LV(e,t){let n=new URL(e);if(t.response_type?n.searchParams.set(`response_type`,Array.isArray(t.response_type)?IV(t.response_type):t.response_type):n.searchParams.set(`response_type`,`code`),t.client_id&&n.searchParams.set(`client_id`,t.client_id),t.redirect_uri&&n.searchParams.set(`redirect_uri`,t.redirect_uri),t.response_mode&&n.searchParams.set(`response_mode`,t.response_mode),t.scope){let e=Array.isArray(t.scope)?IV(t.scope):t.scope;n.searchParams.set(`scope`,e)}return t.state&&n.searchParams.set(`state`,t.state),t.code_challenge&&n.searchParams.set(`code_challenge`,t.code_challenge),t.code_challenge_method&&n.searchParams.set(`code_challenge_method`,t.code_challenge_method),n.href}var RV=class{client;options;constructor(e={}){this.setClient(e.client),this.setOptions(e.options)}setClient(e){this.client=qne(e)?e:XF(e)}setOptions(e){this.options=e||{}}setOption(e,t){this.options[e]=t}},zV=class extends RV{buildURL(e={}){let t;if(this.options.authorizationEndpoint)t=this.options.authorizationEndpoint;else{let e=this.client.defaults.baseURL;t=new URL(`authorize`,e).href}return LV(t,{...e,redirect_uri:e.redirect_uri||this.options.redirectUri,client_id:e.client_id||this.options.clientId,scope:e.scope||this.options.scope,response_type:e.response_type||`code`})}};function BV(e,t={}){if(e.set(`Content-Type`,`application/x-www-form-urlencoded`),!(t.authorizationHeaderInherit&&e.has(`Authorization`))){if(e.delete(`Authorization`),t.authorizationHeader){let n=typeof t.authorizationHeader==`string`?t.authorizationHeader:VF(t.authorizationHeader);e.set(`Authorization`,n);return}t.clientCredentialsAsHeader&&t.clientId&&t.clientSecret&&e.set(`Authorization`,VF({type:`Basic`,username:t.clientId,password:t.clientSecret}))}}function VV(e,t={}){return(n,r)=>{if(t.clientId||(t.clientId=e.client_id,t.clientSecret=e.client_secret),t.realmId||=e.realm_id,BV(r,t),t.clientCredentialsAsHeader){if(n instanceof URLSearchParams)return n.delete(`client_id`),n.delete(`client_secret`),n;AF(n)&&(n.client_id!==void 0&&delete n.client_id,n.client_secret!==void 0&&delete n.client_secret)}return n}}var HV=class extends RV{async createWithRefreshToken(e,t){return this.create({grant_type:`refresh_token`,...e},t)}async createWithClientCredentials(e={},t={}){return this.create({grant_type:`client_credentials`,...e},t)}async createWithPassword(e,t={}){return this.create({grant_type:`password`,...e},t)}async createWithAuthorizationCode(e,t={}){return this.create({grant_type:`authorization_code`,...e},t)}async createWithRobotCredentials(e,t={}){return this.create({grant_type:`robot_credentials`,...e},t)}async create(e,t={}){this.extendCreateParameters(e);let n=this.buildURLSearchParams(e),{data:r}=await this.client.post(this.options.tokenEndpoint||`/token`,n,{transform:this.buildRequestTransformers(e,t),headers:{[HF.ACCEPT]:`application/json`}}),i={access_token:r.access_token,expires_in:r.expires_in,token_type:r.token_type||`Bearer`};return r.refresh_token&&(i.refresh_token=r.refresh_token),typeof r.refresh_token_expires_in==`number`&&(i.refresh_token_expires_in=r.refresh_token_expires_in),typeof r.id_token==`string`&&(i.id_token=r.id_token),typeof r.mac_key==`string`&&(i.mac_key=r.mac_key),typeof r.mac_algorithm==`string`&&(i.mac_algorithm=r.mac_algorithm),i}async revoke(e={},t={}){let n=this.buildURLSearchParams(e);return this.client.post(this.options.revocationEndpoint||`/token/revoke`,n,{transform:this.buildRequestTransformers(e,t),headers:{[HF.ACCEPT]:`application/json`}})}async introspect(e={},t={}){let n=this.buildURLSearchParams(e),{data:r}=await this.client.post(this.options.introspectionEndpoint||`/token/introspect`,n,{transform:this.buildRequestTransformers(e,t),headers:{[HF.ACCEPT]:`application/json`}});return r}buildRequestTransformers(e,t={}){let n=[];return t.clientId||(this.options.clientId&&(t.clientId=this.options.clientId),this.options.clientSecret&&(t.clientSecret=this.options.clientSecret)),!t.realmId&&this.options.realmId&&(t.realmId=this.options.realmId),n.push(VV(e,t)),this.client.defaults.transform&&(Array.isArray(this.client.defaults.transform)?n.push(...this.client.defaults.transform):n.push(this.client.defaults.transform)),n}extendCreateParameters(e){return e.grant_type!==`authorization_code`&&e.grant_type!==`robot_credentials`&&!e.scope&&this.options.scope&&(e.scope=this.options.scope),e.grant_type===`authorization_code`&&!e.redirect_uri&&this.options.redirectUri&&(e.redirect_uri=this.options.redirectUri),e.client_id||(e.client_secret&&delete e.client_secret,this.options.clientId&&(e.client_id=this.options.clientId),this.options.clientSecret&&(e.client_secret=this.options.clientSecret)),!e.realm_id&&this.options.realmId&&(e.realm_id=this.options.realmId),e}buildURLSearchParams(e){let t=new URLSearchParams,n=Object.keys(e);for(let r of n){let n=e[r];if(typeof n==`string`&&n)t.append(r,n);else if(Array.isArray(n)){let e=n.filter(e=>e).join(` `);e&&t.append(r,e)}}return t}},UV=class extends RV{constructor(e){super(e)}async get(e){let t={[HF.ACCEPT]:`application/json`};e&&(t.Authorization=typeof e==`string`?e.includes(` `)?e:`Bearer ${e}`:VF(e));let{data:n}=await this.client.get(this.options.userinfoEndpoint||`/userinfo`,{headers:t});return n}},WV=Symbol.for(`@hapic/oauth2/OAuth2Client`),GV=class extends JF{options;authorize;token;userInfo;constructor(e={}){super(e.request),Rl(this,WV);let t=e.options||{};this.options=t,this.token=new HV({client:this,options:t}),this.authorize=new zV({client:this,options:t}),this.userInfo=new UV({client:this,options:t})}},{hasClient:Qne,setClient:$ne,useClient:ere,unsetClient:tre,createClient:KV,isClient:nre}=YF({create:e=>new GV(e),id:WV});KV();var qV=class extends zV{async confirm(e){return(await this.client.post(`authorize`,oV(e))).data}},JV=class extends HV{},YV=class extends UV{},XV=class extends cV{async get(){return(await this.client.get(``)).data}},ZV=class extends JF{token;authorize;client;clientPermission;clientRole;clientScope;consent;event;identityProvider;identityProviderAccount;identityProviderRoleMapping;key;policy;permission;permissionPolicy;realm;role;roleAttribute;rolePermission;scope;session;sessionToken;status;trustAnchor;user;userInfo;userAttribute;userAuthenticator;userPermission;userRole;constructor(e={}){super(e);let t={authorizationEndpoint:`authorize`,introspectionEndpoint:`token/introspect`,tokenEndpoint:`token`,userinfoEndpoint:`userinfo`},n=this.getBaseURL();if(typeof n==`string`){let e=Object.keys(t);for(let r of e){let e=t[r];typeof e==`string`&&(t[r]=mE(n,e).href)}}this.authorize=new qV({client:this,options:t}),this.token=new JV({client:this,options:t}),this.client=new lV({client:this}),this.clientPermission=new uV({client:this}),this.clientRole=new dV({client:this}),this.clientScope=new fV({client:this}),this.consent=new pV({client:this}),this.event=new mV({client:this}),this.identityProvider=new hV({client:this}),this.identityProviderAccount=new gV({client:this}),this.identityProviderRoleMapping=new _V({client:this}),this.key=new vV({client:this}),this.policy=new yV({client:this}),this.permission=new bV({client:this}),this.permissionPolicy=new xV({client:this}),this.realm=new SV({client:this}),this.role=new CV({client:this}),this.roleAttribute=new wV({client:this}),this.rolePermission=new TV({client:this}),this.scope=new EV({client:this}),this.session=new DV({client:this}),this.sessionToken=new OV({client:this}),this.status=new XV({client:this}),this.trustAnchor=new kV({client:this}),this.user=new AV({client:this}),this.userInfo=new YV({client:this,options:t}),this.userAttribute=new jV({client:this}),this.userAuthenticator=new MV({client:this}),this.userPermission=new PV({client:this}),this.userRole=new FV({client:this}),this.on(IF.RESPONSE_ERROR,(e=>{throw zF(e)&&e.response&&e.response.data&&typeof e.response.data.message==`string`&&(e.message=e.response.data.message),e}))}async getJwks(){return(await this.get(`jwks`)).data}async getJwk(e){return(await this.get(`jwks/${e}`)).data}async getWellKnownOpenIDConfiguration(){return(await this.get(`/.well-known/openid-configuration`)).data}};function QV(e,t){let n=e;if(cE(n,t))return n[t]}var $V=function(e){return e.REFRESH_FINISHED=`refreshFinished`,e.REFRESH_FAILED=`refreshFailed`,e.HEADER_SET=`headerSet`,e.HEADER_UNSET=`headerRemoved`,e}({}),eH=class{all;constructor(e){this.all=e||new Map}on(e,t){this.all.has(e)||this.all.set(e,[]);let n=this.all.get(e);return n.push(t),()=>n.splice(n.indexOf(t)>>>0,1)}off(e,t){if(!e)return this.all.clear();let n=this.all.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):this.all.delete(e))}emit(e,...t){let n=this.all.get(e);n?.slice().map(e=>{e(...t)}),n=this.all.get(`*`),n&&n.slice().map(n=>{n(e,t)})}};function tH(e){let t=e.retry||{};return t.retryCount=t.retryCount||0,e.retry=t,t}var nH=Symbol.for(`ClientResponseHook`),rH=class extends eH{isActive;authorizationHeader;clients;creator;options;timer;refreshPromise;constructor(e){super(),this.isActive=!0,this.authorizationHeader=void 0,this.clients=[],e.timer??=!0,this.options=e,this.creator=e.tokenCreator}enable(){this.isActive=!0}disable(){this.isActive=!1}setAuthorizationHeader(e){this.authorizationHeader=e;for(let t=0;t<this.clients.length;t++)this.clients[t].setAuthorizationHeader(e);this.emit($V.HEADER_SET)}unsetAuthorizationHeader(){this.authorizationHeader=void 0;for(let e=0;e<this.clients.length;e++)this.clients[e].unsetAuthorizationHeader();this.emit($V.HEADER_UNSET)}isAttached(e){return nH in e}attach(e){this.authorizationHeader?e.setAuthorizationHeader(this.authorizationHeader):e.unsetAuthorizationHeader(),this.clients.indexOf(e)===-1&&this.clients.push(e),this.isAttached(e)||Object.assign(e,{[nH]:e.on(IF.RESPONSE_ERROR,t=>{if(!this.isActive)return Promise.reject(t);let{request:n}=t,r=tH(n);if(r.retryCount>0)return Promise.reject(t);r.retryCount+=1;let i=Jne(t);return _E(i)?(this.unsetAuthorizationHeader(),n.headers&&GF(n.headers,HF.AUTHORIZATION),Promise.reject(t)):yE(i)||uE(t.response)&&(t.response.status===401||t.response.status===403&&n.headers&&!Rne(n.headers,HF.AUTHORIZATION))?this.refresh().then(t=>(n.headers&&Lne(n.headers,HF.AUTHORIZATION,VF({type:`Bearer`,token:t.access_token})),e.request(n))).catch(e=>(n.headers&&GF(n.headers,HF.AUTHORIZATION),Promise.reject(e))):Promise.reject(t)})})}detach(e){e.unsetAuthorizationHeader();let t=this.clients.indexOf(e);t!==-1&&this.clients.splice(t,1),this.isAttached(e)&&(e.off(IF.RESPONSE_ERROR,e[nH]),delete e[nH])}setTimer(e){if(!this.options.timer)return;this.clearTimer();let t=(e-60)*1e3;t>0&&(this.timer=setTimeout(async()=>this.refresh(),t))}clearTimer(){this.timer&&clearTimeout(this.timer)}async refresh(){return this.refreshPromise?this.refreshPromise:(this.refreshPromise=this.creator(),this.refreshPromise.then(e=>(this.setTimer(e.expires_in),this.refreshPromise=void 0,this.setAuthorizationHeader({type:`Bearer`,token:e.access_token}),this.emit($V.REFRESH_FINISHED,e),e)).catch(e=>(zF(e)?this.emit($V.REFRESH_FAILED,e):this.emit($V.REFRESH_FAILED,null),this.refreshPromise=void 0,this.unsetAuthorizationHeader(),Promise.reject(e))))}},iH=typeof window<`u`,aH,oH=e=>aH=e,sH=Symbol();function cH(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var lH=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function uH(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function dH(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){gH(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function fH(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function pH(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var mH=typeof navigator==`object`?navigator:{userAgent:``},hH=/Macintosh/.test(mH.userAgent)&&/AppleWebKit/.test(mH.userAgent)&&!/Safari/.test(mH.userAgent),gH=iH?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!hH?_H:`msSaveOrOpenBlob`in mH?vH:yH:()=>{};function _H(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?pH(r):fH(r.href)?dH(e,t,n):(r.target=`_blank`,pH(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){pH(r)},0))}function vH(e,t=`download`,n){if(typeof e==`string`)if(fH(e))dH(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){pH(t)})}else navigator.msSaveOrOpenBlob(uH(e,n),t)}function yH(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return dH(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(lH.HTMLElement))||`safari`in lH,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||hH)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:rre}=Object;function bH(){let e=ze(!0),t=e.run(()=>E({})),n=[],r=[],i=on({install(e){oH(i),i._a=e,e.provide(sH,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var xH=()=>{};function SH(e,t,n,r=xH){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&Be()&&Ve(i),i}function CH(e,...t){e.forEach(e=>{e(...t)})}var wH=e=>e(),TH=Symbol(),EH=Symbol();function DH(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!Object.hasOwn(t,n))continue;let r=t[n],i=e[n];e[n]=cH(i)&&cH(r)&&Object.hasOwn(e,n)&&!ln(r)&&!en(r)?DH(i,r):r}return e}var OH=Symbol();function kH(e){return!e||typeof e!=`object`||!Object.hasOwn(e,OH)}var{assign:AH}=Object;function jH(e){return!!(ln(e)&&e.effect)}function MH(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),AH(yn(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=on(B(()=>{oH(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=NH(e,l,t,n,r,!0),c}function NH(e,t,n={},r,i,a){let o,s=AH({actions:{}},n),c={deep:!0},l,u,d=new Set,f=new Set,p,m=r.state.value[e];!a&&!m&&(r.state.value[e]={});let h;function g(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:`patch function`,storeId:e,events:p}):(DH(r.state.value[e],t),n={type:`patch object`,payload:t,storeId:e,events:p});let i=h=Symbol();Gn().then(()=>{h===i&&(l=!0)}),u=!0,CH(d,n,r.state.value[e])}let _=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{AH(e,t)})}:xH;function v(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}let y=(t,n=``)=>{if(TH in t)return t[EH]=n,t;let i=function(){oH(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}CH(f,{args:n,name:i[EH],store:b,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:b,n)}catch(e){throw CH(o,e),e}return l instanceof Promise?l.then(e=>(CH(a,e),e)).catch(e=>(CH(o,e),Promise.reject(e))):(CH(a,l),l)};return i[TH]=!0,i[EH]=n,i},b=Yt({_p:r,$id:e,$onAction:SH.bind(null,f),$patch:g,$reset:_,$subscribe(t,n={}){if(d.has(t))return xH;let i=SH(d,t,n.detached,()=>a()),a=o.run(()=>yr(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:`direct`,events:p},r)},AH({},c,n)));return i},$dispose:v});r._s.set(e,b);let x=(r._a&&r._a.runWithContext||wH)(()=>r._e.run(()=>(o=ze()).run(()=>t({action:y}))));for(let t in x){let n=x[t];ln(n)&&!jH(n)||en(n)?a||(m&&kH(n)&&(ln(n)?n.value=m[t]:DH(n,m[t])),r.state.value[e][t]=n):typeof n==`function`&&(x[t]=y(n,t),s.actions[t]=n)}return AH(b,x),AH(an(b),x),Object.defineProperty(b,"$state",{get:()=>r.state.value[e],set:e=>{g(t=>{AH(t,e)})}}),r._p.forEach(e=>{let t=o.run(()=>e({store:b,app:r._a,pinia:r,options:s}));AH(b,t)}),m&&a&&n.hydrate&&n.hydrate(b.$state,m),l=!0,u=!0,b}function PH(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=pr();return n||=o?fr(sH,null):null,n&&oH(n),n=aH,n._s.has(e)||(i?NH(e,t,r,n):MH(e,r,n)),n._s.get(e)}return a.$id=e,a}function FH(e){let t=an(e),n={};for(let r in t){let i=t[r];i?.effect?n[r]=B({get:()=>e[r],set(t){e[r]=t}}):(ln(i)||en(i))&&(n[r]=Sn(e,r))}return n}function IH(e,t){if(t&&t._context&&t._context.provides&&t._context.provides[e])return t._context.provides[e];if(pr())return fr(e,void 0)}function LH(e,t,n){if(n===void 0){if(IH(e)!==void 0)return;dr(e,t);return}n&&n._context&&n._context.provides&&n._context.provides[e]||n.provide(e,t)}var RH=Symbol.for(`AuthupHTTPClientAuthenticationHook`);function zH(e){let t=IH(RH,e);if(!t)throw Error(`The http client authentication hook has not been injected in the app context.`);return t}function BH(e){try{return!!zH(e)}catch{return!1}}function VH(e,t){LH(RH,e,t)}var HH=`authup`,UH=function(e){return e.UNAUTHENTICATED=`unauthenticated`,e.AUTHENTICATING=`authenticating`,e.RESTORING=`restoring`,e.AUTHENTICATED=`authenticated`,e}({}),WH=function(e){return e.LOGIN=`login`,e.EXCHANGE=`exchange`,e.RESTORE=`restore`,e}({}),GH=Symbol.for(`@authup/access/PermissionError`),KH=class e extends Td{constructor(e={}){super({...e,message:e.message||`A permission error occurred.`,code:e.code||H.PERMISSION_DENIED}),Rl(this,GH)}addIssue(e){this.issues.push(e)}addIssues(e){this.issues.push(...e)}static notFound(t){return new e({message:`The permission ${t} was not found.`,code:H.PERMISSION_NOT_FOUND})}static denied(t){return new e({message:`The permission ${t} has not been granted.`,code:H.PERMISSION_DENIED})}static deniedAll(t){return new e({message:`None of the permissions ${t.join(`, `)} has been granted.`,code:H.PERMISSION_DENIED})}static evaluationFailed(t){return Array.isArray(t)?new e({message:`The evaluation of permissions ${t.join(`, `)} failed`,code:H.PERMISSION_EVALUATION_FAILED}):new e({message:`The evaluation of permission ${t} failed`,code:H.PERMISSION_EVALUATION_FAILED})}},qH=function(e){return e.NONE=`none`,e.OWN=`own`,e.OWN_OR_NULL=`ownOrNull`,e.ANY=`any`,e}({});function JH(e){return e===qH.ANY||e===qH.OWN_OR_NULL||e===qH.NONE?e:qH.OWN}function YH(e,t,n,r){return t===null?e===qH.OWN_OR_NULL:t===n||t===r}function XH(e,t,n,r){let i=JH(e);if(i===qH.ANY)return!0;if(i===qH.NONE)return!1;let a=n??null,o=r??null;return a===null&&o===null?!1:Array.isArray(t)?t.length!==0&&t.every(e=>YH(i,e??null,a,o)):YH(i,t??null,a,o)}function ZH(e){return e||`*`}function QH(e){return`${ZH(e.realmId)}/${ZH(e.clientId)}/${e.name}`}function $H(e){let t;return e.policies&&e.policies.length===1?t=e.policies[0]:e.policies&&e.policies.length>1&&(t={type:`composite`,decisionStrategy:e.permission.decisionStrategy||WT.UNANIMOUS,children:e.policies}),{realmScope:JH(e.realmScope),policy:t}}function eU(e){let t=e.reduce((e,t)=>{let n=QH(t.permission);return e[n]||(e[n]=[]),e[n].push(t),e},{}),n=[];for(let e of Object.keys(t)){let r=t[e];n.push({permission:r[0].permission,grants:r.map($H)})}return n}var tU=class{items={};constructor(e=[]){this.setMany(e)}async findOne(e){let t=QH({name:e.name,clientId:e.clientId,realmId:e.realmId});return this.items[t]||null}setMany(e){this.items=eU(e).reduce((e,t)=>{let n=QH(t.permission);return e[n]=t,e},{})}},nU=function(e){return e.DATA_MISSING=`DATA_MISSING`,e.DATA_INVALID=`DATA_INVALID`,e.INVALID=`INVALID`,e.TYPE_UNKNOWN=`TYPE_UNKNOWN`,e.FIELD_MISSING=`FIELD_MISSING`,e.FIELD_INVALID=`FIELD_INVALID`,e.CHILD_INVALID=`CHILD_INVALID`,e.CHILD_EVALUATION_FAILED=`CHILD_EVALUATION_FAILED`,e.EVALUATION_DENIED=`EVALUATION_DENIED`,e.EVALUATOR_NOT_FOUND=`EVALUATOR_NOT_FOUND`,e.EVALUATOR_ERROR=`EVALUATOR_ERROR`,e.SKIPPED_EXCLUDED=`SKIPPED_EXCLUDED`,e.SKIPPED_NOT_INCLUDED=`SKIPPED_NOT_INCLUDED`,e.INTERNAL_ERROR=`INTERNAL_ERROR`,e}({});function rU(e){return Iu(e)}function iU(e){return Lu(e)}var aU=Symbol.for(`@authup/access/PolicyError`),oU=class e extends Td{constructor(e,t){super({message:e,code:t??void 0}),Rl(this,aU)}addIssue(e){this.issues.push(e)}addIssues(e){this.issues.push(...e)}static evaluatorNotFound(t){return new e(`No evaluator is registered to handle the policy: ${t}`,H.POLICY_EVALUATOR_NOT_FOUND)}static evaluatorNotProcessable(){return new e(`The evaluator can not process the policy.`,H.POLICY_EVALUATOR_NOT_PROCESSABLE)}static evaluatorContextInvalid(){return new e(`The evaluator context is not valid.`,H.POLICY_EVALUATOR_CONTEXT_INVALID)}};function sU(e){return Vl(e,aU)?!0:Dd(e)?e.code===H.POLICY_EVALUATOR_NOT_FOUND||e.code===H.POLICY_EVALUATOR_NOT_PROCESSABLE||e.code===H.POLICY_EVALUATOR_CONTEXT_INVALID:!1}function cU(e){return typeof e==`object`&&e&&`message`in e&&typeof e.message==`string`?e.message:String(e)}var lU=class{evaluators;constructor(e={}){this.evaluators=e}registerEvaluator(e,t){this.evaluators[e]=t}registerEvaluators(e){let t=Object.keys(e);for(let n of t)this.registerEvaluator(n,e[n])}async evaluate(e,t){if(!e.type)return{success:!1,issues:[Iu({path:[],message:`The policy can not be handled by any evaluator.`,code:H.POLICY_EVALUATOR_NOT_FOUND})]};if(t.exclude&&t.exclude.length>0&&t.exclude.includes(e.type)||t.include&&t.include.length>0&&!t.include.includes(e.type))return{success:!0};let n=[],r=this.evaluators[e.type];if(!r)return n.push(Iu({path:[e.type],message:`The policy ${e.type} can not be handled by any evaluator.`,code:H.POLICY_EVALUATOR_NOT_FOUND})),{success:!1,issues:n};try{if(r.requires){let n=r.requires(e).filter(e=>!t.data||!t.data.has(e));if(n.length>0){let i={success:!1,pending:!0,issues:[rU({code:nU.DATA_MISSING,message:`The data propert${n.length>1?`ies`:`y`} ${n.join(`, `)} ${n.length>1?`are`:`is`} missing`,path:t.path})]};if(t.withConditions&&r.toCondition)try{let n=await r.toCondition(e,t);n&&(i.condition=n)}catch{}return i}}return await r.evaluate(e,{...t,evaluators:{...this.evaluators,...t.evaluators||{}}})}catch(t){return n.push(Iu({path:[e.type],message:`The ${e.type} evaluator threw: ${cU(t)}`,code:H.POLICY_EVALUATOR_NOT_PROCESSABLE})),{success:!1,issues:n}}}async evaluateOrFail(e,t){let n=[];try{let r=await this.evaluate(e,t);if(r.success)return;r.issues&&n.push(...r.issues)}catch(t){if(sU(t))throw t;n.push(Iu({path:e.type?[e.type]:[],message:cU(t),code:H.POLICY_EVALUATOR_NOT_PROCESSABLE}))}let r=new oU(`The policy ${e.type} evaluation failed.`);throw r.addIssues(n),r}},uU=class e{data;validated;constructor(e={},t=new Set){this.data=e,this.validated=t}set(e,t){this.data[e]=t,this.validated.delete(e)}get(e){if(e in this.data)return this.data[e];throw Error(`Policy data item ${e} does not exist.`)}has(e){return e in this.data}setValidated(e){this.validated.add(e)}isValidated(e){return this.validated.has(e)}clone(){return new e({...this.data},new Set(this.validated))}};function dU(e={}){return{evaluators:e.evaluators||{},path:e.path||[],data:e.data||new uU,include:e.include||[],exclude:e.exclude||[],withConditions:e.withConditions??!1}}function fU(e,t){return t===void 0?e:typeof t==`function`?t(e):t?!e:e}var pU=class extends ed{initialize(){super.initialize(),this.mount(`names`,U(ew(TS().min(3).max(128)))),this.mount(`invert`,U(jC().or(HC()).or(BC()).optional()))}};function mU(e){return e===void 0?null:e}function hU(e,t){return Zl(mU(e),mU(t))}function gU(e,t){let n=e instanceof Date&&t instanceof Date,r=n?e.getTime():e,i=n?t.getTime():t;if(typeof r==`number`&&typeof i==`number`)return Number.isNaN(r)||Number.isNaN(i)?void 0:r===i?0:r<i?-1:1;if(typeof r==`string`&&typeof i==`string`||typeof r==`boolean`&&typeof i==`boolean`)return r===i?0:r<i?-1:1}function _U(e){if(typeof e==`string`)return e;if(typeof e==`number`&&Number.isFinite(e))return`${e}`}function vU(e,t){return!ZF(e)||!$F(e,t)?null:mU(e[t])}function yU(e){return t=>Array.isArray(t)?t.some(t=>e(mU(t))):e(t)}var bU=class{paths;itself=!0;bindingPrefix;scopeSequence;constructor(){this.paths=new Set,this.bindingPrefix=``,this.scopeSequence=0}compound(e){let t=e.children.map(e=>jL(e,this)),n;return n=e.operator===`or`?(e,n)=>t.some(t=>t(e,n)):(e,n)=>t.every(t=>t(e,n)),e.negated?(e,t)=>!n(e,t):n}constant(e){return()=>e.verdict}nullCheck(e){let t=e=>mU(e)===null,n=e.elementwise?yU(t):t;return this.leaf(e.field,this.negate(n,e.negated))}compare(e){if(e.op===`eq`){let t=yU(this.buildValueEqualTest(e.value,e.caseFold));return this.leaf(e.field,this.negate(t,e.negated))}let t=EL[e.op].compare;return this.leaf(e.field,this.buildCompareTest(e.value,t.min,t.max))}oneOf(e){let t=e.values.map(t=>this.buildValueEqualTest(t,e.caseFold));e.includesNull&&t.push(e=>hU(e,null));let n=yU(e=>t.some(t=>t(e)));return this.leaf(e.field,this.negate(n,e.negated))}match(e){let t;if(e.pattern.mode===`regex`)try{t=new RegExp(e.pattern.source,e.pattern.flags)}catch{throw hI.featureUnsupported(`filters:regex:value`)}else t=new RegExp(e.regexSource,`i`);let n=yU(e=>{let n=_U(e);return n!==void 0&&t.test(n)});return this.leaf(e.field,this.negate(n,e.negated))}mod(e){return this.leaf(e.field,yU(t=>typeof t==`number`&&Number.isFinite(t)&&t%e.divisor===e.remainder))}size(e){if(e.count===null)return this.leaf(e.field,()=>!1);let{count:t}=e;return this.leaf(e.field,e=>Array.isArray(e)&&e.length===t)}elemMatch(e){let t=this.bindingPrefix;this.scopeSequence+=1,this.bindingPrefix=`${t}${e.field}${this.scopeSequence}.`;try{return jL(e.condition,this)}finally{this.bindingPrefix=t}}leaf(e,t){if(e===`$this`){if(!this.bindingPrefix)throw hI.featureUnsupported(`filters:itself`);let e=this.bindingPrefix.slice(0,-1),n=`${e}*`;return this.registerPath(e),r=>r.get(n)===!0&&t(mU(r.get(e)))}let n=`${this.bindingPrefix}${e}`,r=n.lastIndexOf(`.`);if(r===-1)return(e,r)=>t(vU(r,n));let i=n.slice(0,r),a=n.slice(r+1);return this.registerPath(i),e=>t(vU(e.get(i),a))}registerPath(e){let t=e.split(`.`);for(let e=0;e<t.length;e++)this.paths.add(t.slice(0,e+1).join(`.`))}negate(e,t){return t?t=>!e(t):e}buildValueEqualTest(e,t){let n=mU(e);if(t&&typeof n==`string`){let e=n.toLowerCase();return t=>typeof t==`string`&&t.toLowerCase()===e}return e=>hU(e,n)}buildCompareTest(e,t,n){let r=mU(e);return yU(e=>{let i=gU(e,r);return i!==void 0&&i>=t&&i<=n})}},xU=new Map;function SU(e,t){let n=t.indexOf(`\0`),r=n===-1?t:t.slice(0,n);return r===`$this`?e:vU(e,r)}function CU(e){return Array.isArray(e)?e.length>0?e:[null]:[e]}function wU(e,t){if(t.size===0)return t=>e(xU,t);let n=[...t].sort();return t=>{let r=new Map,i=a=>{if(a===n.length)return e(r,t);let o=n[a],s=o.lastIndexOf(`.`),c=SU(s===-1?t:r.get(o.slice(0,s)),s===-1?o:o.slice(s+1));r.set(`${o}*`,Array.isArray(c)&&c.length>0);let l=CU(c);for(let e of l)if(r.set(o,e),i(a+1))return!0;return r.delete(o),r.delete(`${o}*`),!1};return i(0)}}var TU=class{options;constructor(e={}){this.options=e}visitFilters(e){return this.compile(e)}visitFilter(e){return this.compile(e)}compile(e){let t=AL(e,{caseSensitive:this.options.caseSensitive});if(!t)return()=>!0;let n=this.createCompiler();return wU(jL(t,n),n.paths)}createCompiler(){return new bU}};function EU(e,t={}){return new TU(t).compile(e)}var DU=[`$and`,`$or`,`$nor`],OU={$eq:[SI.EQUAL,SI.NOT_EQUAL],$ne:[SI.NOT_EQUAL,SI.EQUAL],$lt:[SI.LESS_THAN,SI.GREATER_THAN_EQUAL],$lte:[SI.LESS_THAN_EQUAL,SI.GREATER_THAN],$gt:[SI.GREATER_THAN,SI.LESS_THAN_EQUAL],$gte:[SI.GREATER_THAN_EQUAL,SI.LESS_THAN],$in:[SI.IN,SI.NOT_IN],$nin:[SI.NOT_IN,SI.IN],$startsWith:[SI.STARTS_WITH,SI.NOT_STARTS_WITH],$notStartsWith:[SI.NOT_STARTS_WITH,SI.STARTS_WITH],$endsWith:[SI.ENDS_WITH,SI.NOT_ENDS_WITH],$notEndsWith:[SI.NOT_ENDS_WITH,SI.ENDS_WITH],$contains:[SI.CONTAINS,SI.NOT_CONTAINS],$notContains:[SI.NOT_CONTAINS,SI.CONTAINS]},kU=[...Object.keys(OU),`$regex`,`$options`,`$mod`,`$size`,`$exists`,`$elemMatch`,`$all`,`$not`],AU=[`$type`,`$where`,`$text`,`$expr`,`$jsonSchema`,`$geoWithin`,`$geoIntersects`,`$near`,`$nearSphere`,`$bitsAllSet`,`$bitsAllClear`,`$bitsAnySet`,`$bitsAnyClear`,`$comment`,`$slice`],jU=32,MU=class extends SR{parse(e,t={}){let n=[],{scope:r,parsed:i}=this.prepare(e,t,n);return HR(kR(i?uR(i,r.schema,t.context)??this.buildDefaultOutput(r):this.buildDefaultOutput(r),fR(n,t.context,{throwOnFailure:r.relationsThrowOnFailure,errors:eL}),r.schema),this.registry,t.schema,{throwOnFailure:t.throwOnFailure})}async parseAsync(e,t={}){let n=[],{scope:r,parsed:i}=this.prepare(e,t,n);return HR(kR(i?await dR(i,r.schema,t.context)??this.buildDefaultOutput(r):this.buildDefaultOutput(r),await pR(n,t.context,{throwOnFailure:r.relationsThrowOnFailure,errors:eL}),r.schema),this.registry,t.schema,{throwOnFailure:t.throwOnFailure})}parseParameter(e,t,n){let{scope:r,parsed:i}=this.prepare(e,t,n);return i?uR(i,r.schema,t.context)??this.buildDefaultOutput(r):this.buildDefaultOutput(r)}async parseParameterAsync(e,t,n){let{scope:r,parsed:i}=this.prepare(e,t,n);return i?await dR(i,r.schema,t.context)??this.buildDefaultOutput(r):this.buildDefaultOutput(r)}parseTyped(e,t={}){return this.parse(e,t)}parseTypedAsync(e,t={}){return this.parseAsync(e,t)}prepare(e,t,n){let r=oL.for(this.registry,uI.FILTERS,t.schema,{relations:t.relations,throwOnFailure:t.throwOnFailure,strict:t.strict,obligationSink:n});if(e==null)return{scope:r,parsed:null};if(!NU(e))throw QI.inputInvalid();if(!r.schema.allowedIsUndefined&&r.schema.allowed.length===0)return{scope:r,parsed:null};let i=this.parseDocument(e,r,!1,0);if(i.length===0)return{scope:r,parsed:null};let[a]=i;return{scope:r,parsed:i.length===1&&a&&uL(a)?a:new mL(CI.AND,i)}}buildDefaultOutput(e){return new mL(CI.AND,cR(e.schema))}parseDocument(e,t,n,r){if(r>jU)throw QI.syntaxInvalid(`The maximum nesting depth was exceeded.`);let i=[],a=Object.keys(e);for(let o of a){if(IU(o)){let a=this.parseCompound(o,e[o],t,n,r);a&&i.push(a);continue}if(o.startsWith(`$`))throw this.buildDocumentOperatorError(o);i.push(...this.parseFieldEntry(o,e[o],t,n,r))}return i}buildDocumentOperatorError(e){return kU.includes(e)?QI.syntaxInvalid(`The field operator ${e} is not permitted at document level.`):AU.includes(e)?QI.operatorUnsupported(e):QI.syntaxInvalid(`The operator ${e} is unknown.`)}parseCompound(e,t,n,r,i){if(!Array.isArray(t)||t.length===0)throw QI.syntaxInvalid(`The value of the operator ${e} must be a non-empty array.`);let a=e===`$nor`?!r:r,o;o=e===`$or`?r?CI.AND:CI.OR:r?CI.OR:CI.AND;let s=[];for(let r of t){if(!NU(r)||Object.keys(r).length===0)throw QI.syntaxInvalid(`The children of the operator ${e} must be non-empty objects.`);let t=this.parseDocument(r,n,a,i+1),o=this.combineDocument(t,a);o&&s.push(o)}if(s.length!==0)return new mL(o,s)}combineDocument(e,t){if(e.length!==0)return e.length===1?e[0]:new mL(t?CI.OR:CI.AND,e)}parseFieldEntry(e,t,n,r,i){if(i>jU)throw QI.syntaxInvalid(`The maximum nesting depth was exceeded.`);if(NU(t)){let a=Object.keys(t);if(a.length===0)throw QI.keyValueInvalid(e);let o=a.filter(e=>e.startsWith(`$`));if(o.length===a.length)return this.parseOperatorObject(e,t,n,r,i);if(o.length>0)throw QI.syntaxInvalid(`The value of the key ${e} mixes operator and field keys.`);let s=[];for(let o of a)s.push(...this.parseFieldEntry(`${e}.${o}`,t[o],n,r,i+1));return s}if(t instanceof RegExp){if(r)throw QI.operatorUnsupported(`$regex`);return this.buildLeaf(e,n,SI.REGEX,t)}if(Array.isArray(t))return this.validateInValue(e,t),this.buildLeaf(e,n,r?SI.NOT_IN:SI.IN,t);if(PU(t))return this.buildLeaf(e,n,r?SI.NOT_EQUAL:SI.EQUAL,t);throw QI.keyValueInvalid(e)}buildLeaf(e,t,n,r){let i=this.resolveField(e,t);return i?[new vL(n,i.field,r)]:[]}resolveField(e,t){let n=t.resolveKey(e);if(n.success)return{field:[...n.path,n.name].join(`.`),name:n.name,scope:n.scope}}parseOperatorObject(e,t,n,r,i){let a=this.validateOperatorObject(e,t,r),o=this.resolveField(e,n);return o?this.buildOperatorObject(t,o,r,i,a):[]}validateOperatorObject(e,t,n){let r=Object.keys(t);if(r.includes(`$options`)&&!r.includes(`$regex`))throw QI.syntaxInvalid(`The operator $options of the key ${e} requires a $regex sibling.`);let i;for(let a of r){if(IU(a))throw QI.syntaxInvalid(`The compound operator ${a} is not permitted at field level.`);if(AU.includes(a))throw QI.operatorUnsupported(a);switch(a){case`$eq`:case`$ne`:if(!PU(t[a]))throw QI.keyValueInvalid(e);break;case`$lt`:case`$lte`:case`$gt`:case`$gte`:if(!FU(t[a]))throw QI.keyValueInvalid(e);break;case`$in`:case`$nin`:this.validateInValue(e,t[a]);break;case`$startsWith`:case`$notStartsWith`:case`$endsWith`:case`$notEndsWith`:case`$contains`:case`$notContains`:if(typeof t[a]!=`string`)throw QI.keyValueInvalid(e);break;case`$regex`:i=this.validateRegex(e,t,n);break;case`$options`:if(typeof t[a]!=`string`)throw QI.keyValueInvalid(e);break;case`$mod`:{if(n)throw QI.operatorUnsupported(`$mod`);let r=t[a];if(!Array.isArray(r)||r.length!==2||typeof r[0]!=`number`||typeof r[1]!=`number`||r[0]===0)throw QI.keyValueInvalid(e);break}case`$size`:{if(n)throw QI.operatorUnsupported(`$size`);let r=t[a];if(typeof r!=`number`||!Number.isInteger(r)||r<0)throw QI.keyValueInvalid(e);break}case`$exists`:if(typeof t[a]!=`boolean`)throw QI.keyValueInvalid(e);break;case`$elemMatch`:if(n)throw QI.operatorUnsupported(`$elemMatch`);if(!NU(t[a])||Object.keys(t[a]).length===0)throw QI.keyValueInvalid(e);break;case`$all`:if(n)throw QI.operatorUnsupported(`$all`);this.validateInValue(e,t[a]);break;case`$not`:{if(n)throw QI.syntaxInvalid(`The operator $not can not be nested or negated.`);let r=t[a];if(r instanceof RegExp)throw QI.operatorUnsupported(`$regex`);if(!NU(r)||Object.keys(r).length===0)throw QI.syntaxInvalid(`The value of the operator $not of the key ${e} must be a non-empty object of field operators.`);this.validateOperatorObject(e,r,!0);break}default:throw QI.syntaxInvalid(`The operator ${a} is unknown.`)}}return i}validateRegex(e,t,n){if(n)throw QI.operatorUnsupported(`$regex`);let r=t.$regex;if(r instanceof RegExp){if(t.$options!==void 0)throw QI.syntaxInvalid(`The operator $options of the key ${e} can not be combined with a RegExp valued $regex.`);return r}if(typeof r!=`string`)throw QI.keyValueInvalid(e);let i=``;if(t.$options!==void 0){if(typeof t.$options!=`string`)throw QI.keyValueInvalid(e);i=t.$options}try{return new RegExp(r,i)}catch{throw QI.keyValueInvalid(e)}}validateInValue(e,t){if(!Array.isArray(t)||t.length===0)throw QI.keyValueInvalid(e);for(let n of t)if(!PU(n))throw QI.keyValueInvalid(e)}buildOperatorObject(e,t,n,r,i){let a=[],o=Object.keys(e);for(let s of o){if(LU(s)){let[r,i]=OU[s];a.push(new vL(n?i:r,t.field,e[s]));continue}switch(s){case`$regex`:a.push(new vL(SI.REGEX,t.field,i));break;case`$options`:break;case`$mod`:a.push(new vL(SI.MOD,t.field,e[s]));break;case`$size`:a.push(new vL(SI.SIZE,t.field,e[s]));break;case`$exists`:a.push(new vL(SI.EXISTS,t.field,n?!e[s]:e[s]));break;case`$elemMatch`:{let n=this.buildElemMatch(e[s],t,r);n&&a.push(n);break}case`$all`:for(let n of e[s])a.push(new vL(SI.ELEM_MATCH,t.field,new vL(SI.EQUAL,gL,n)));break;case`$not`:{let i=this.buildOperatorObject(e[s],t,!n,r),o=this.combineDocument(i,!n);o&&a.push(o);break}}}return a}buildElemMatch(e,t,n){if(n>jU)throw QI.syntaxInvalid(`The maximum nesting depth was exceeded.`);if(Object.keys(e).some(e=>kU.includes(e))){let r=this.validateOperatorObject(t.field,e,!1),i=this.buildOperatorObject(e,{field:gL,name:gL,scope:this.buildUnboundScope(t.scope)},!1,n+1,r),a=this.combineDocument(i,!1);return a?new vL(SI.ELEM_MATCH,t.field,a):void 0}let r;if(t.name===`$this`)r=this.buildUnboundScope(t.scope);else try{let e=t.scope.descend(t.name);if(e instanceof oL)r=e;else if(e.code!==XI.SCHEMA_UNRESOLVABLE)return}catch(e){if(!(e instanceof yI)||e.code!==pI.KEY_PATH_INVALID)throw e}r||=this.buildUnboundScope(t.scope);let i=this.parseDocument(e,r,!1,n+1),a=this.combineDocument(i,!1);if(a)return new vL(SI.ELEM_MATCH,t.field,a)}buildUnboundScope(e){return oL.for(this.registry,uI.FILTERS,void 0,{throwOnFailure:e.throwOnFailure,strict:e.strict})}};function NU(e){if(!ZF(e))return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function PU(e){return e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e instanceof Date}function FU(e){return typeof e==`string`||typeof e==`number`||e instanceof Date}function IU(e){return DU.includes(e)}function LU(e){return Object.prototype.hasOwnProperty.call(OU,e)}var RU=function(e){return e.COMPOSITE=`composite`,e.DATE=`date`,e.TIME=`time`,e.ATTRIBUTE_NAMES=`attributeNames`,e.ATTRIBUTES=`attributes`,e.REALM_MATCH=`realmMatch`,e.IDENTITY=`identity`,e.PERMISSION_BINDING=`permissionBinding`,e}({}),zU=class extends ed{initialize(){super.initialize(),this.mount(`query`,U(aw({}))),this.mount(`invert`,U(jC().or(HC()).or(BC()).optional()))}},BU=class{validator;parser;constructor(){this.validator=new zU,this.parser=new MU}requires(){return[RU.ATTRIBUTES]}async toCondition(e){let t,n;try{t=await this.validator.run(e),this.fixQuery(t.query),n=this.parser.parse(t.query)}catch{return null}return t.invert?TL(n):n}async accessData(e){if(!e.data.has(RU.ATTRIBUTES))return null;if(e.data.isValidated(RU.ATTRIBUTES))return e.data.get(RU.ATTRIBUTES);let t=e.data.get(RU.ATTRIBUTES);return e.data.set(RU.ATTRIBUTES,t),e.data.setValidated(RU.ATTRIBUTES),t}async evaluate(e,t){let n=await this.validator.run(e),r=await this.accessData(t);if(!r)return{success:!1,issues:[rU({code:nU.DATA_MISSING,message:`The data property attributes is missing`,path:t.path})]};this.fixQuery(n.query);let i;try{i=EU(this.parser.parse(n.query),{caseSensitive:!0})}catch(e){return{success:!1,issues:[rU({code:nU.FIELD_INVALID,message:e instanceof Error?e.message:`The query could not be parsed.`,path:t.path})]}}return{success:fU(i(r),n.invert)}}fixQuery(e){if(Array.isArray(e)){for(let t of e)this.fixQuery(t);return}if(uE(e)){let t=Object.keys(e);for(let n of t){let t=e[n];if(uE(t)||Array.isArray(t)){this.fixQuery(t);continue}if(n===`$regex`&&typeof t==`string`){let r=t.match(/\/(.*?)\/([a-z]*)?$/i);r&&r[1]!==void 0&&(e[n]=new RegExp(r[1],r[2]||``))}}}}},VU=class{validator;attributesEvaluator;constructor(){this.validator=new pU,this.attributesEvaluator=new BU}async evaluate(e,t){let n=t.data.has(RU.ATTRIBUTE_NAMES),r=t.data.has(RU.ATTRIBUTES);if(!n&&!r)return{success:!1,pending:!0,issues:[rU({code:nU.DATA_MISSING,message:`The data property attributeNames or attributes is missing`,path:t.path})]};let i=await this.validator.run(e),a=new Set;if(n){let e=t.data.get(RU.ATTRIBUTE_NAMES);if(!Array.isArray(e)||e.some(e=>typeof e!=`string`))return{success:!1,issues:[rU({code:nU.DATA_INVALID,message:`The data property attributeNames must be a list of attribute names`,path:t.path})]};for(let t of e)a.add(t)}if(r){let e=await this.attributesEvaluator.accessData(t);if(e){let t=fE(e);for(let e of Object.keys(t))a.add(e)}}let o=[];for(let e of a){let n=i.names.includes(e);(i.invert?n:!n)&&o.push(rU({code:nU.EVALUATION_DENIED,message:i.invert?`The attribute ${e} is denied`:`The attribute ${e} is not included`,path:[...t.path,e]}))}return{success:o.length===0,issues:o}}},HU=class extends ed{initialize(){super.initialize(),this.mount(`decisionStrategy`,U(Tw(WT).or(HC()).or(BC()).optional())),this.mount(`children`,U(ew(aw({type:TS().min(3)})))),this.mount(`invert`,U(jC().or(HC()).or(BC()).optional()))}},UU=class{validator;constructor(){this.validator=new HU}async evaluate(e,t){let n=await this.validator.run(e);if(n.children.length===0)return{success:!1,issues:[rU({code:nU.INVALID,message:`A composite policy must define at least one child policy.`,path:t.path})]};let r=0,i=0,a=n.decisionStrategy??WT.UNANIMOUS,o=new lU(t.evaluators),s=[],c=[],l=[],u=0;for(let e of n.children){let d=[...t.path||[],...e.type?[e.type]:[]],f=await o.evaluate(e,{...t,path:d});if(f.pending){i++,f.condition?l.push(f.condition):u++,f.issues&&f.issues.length>0&&c.push(Lu({message:`The evaluation of child policy ${e.type} is pending`,issues:f.issues,path:d}));continue}if(f.success){if(a===WT.AFFIRMATIVE)return{success:fU(!0,n.invert),issues:[]};r++}else{if(f.issues&&s.push(Lu({message:`The evaluation of child policy ${e.type} failed`,issues:f.issues||[],path:d})),a===WT.UNANIMOUS){let e=fU(!1,n.invert);return{success:e,issues:e?[]:[Lu({message:`The evaluation of composite policy failed (${WT.UNANIMOUS})`,issues:s,path:t.path})]}}r--}}let d;switch(a){case WT.AFFIRMATIVE:d=i>0&&null;break;case WT.UNANIMOUS:d=i>0?null:r>0;break;default:d=r-i>0?!0:r+i<=0?!1:null}if(d===null){let e=null;if(t.withConditions&&u===0&&l.length>0&&a!==WT.CONSENSUS){if(l.length===1){let[t]=l;e=t??null}else e=a===WT.AFFIRMATIVE?wL(...l):CL(...l);e&&n.invert&&(e=TL(e))}return{success:!1,pending:!0,...e?{condition:e}:{},issues:c}}if(d)return{success:fU(!0,n.invert)};let f=fU(!1,n.invert);return{success:f,issues:f?[]:[Lu({message:`The evaluation of composite policy failed (${a})`,issues:s||[],path:t.path})]}}},WU=class extends ed{initialize(){super.initialize(),this.mount(`start`,U(QC().or($x()).or(CC()).or(HC()).or(BC()).optional())),this.mount(`end`,U(QC().or($x()).or(CC()).or(HC()).or(BC()).optional())),this.mount(`invert`,U(jC().or(BC()).or(HC()).optional()))}};function GU(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function KU(e){return typeof e==`string`||typeof e==`number`?new Date(e):e}var qU=class{validator;constructor(){this.validator=new WU}async evaluate(e,t){let n=await this.validator.run(e),r;if(t.data.has(RU.DATE)?t.data.isValidated(RU.DATE)?r=t.data.get(RU.DATE):(r=GU(KU(t.data.get(RU.DATE))),t.data.set(RU.DATE,r),t.data.setValidated(RU.DATE)):r=GU(new Date),n.start){let e=GU(KU(n.start));if(r<e)return{success:fU(!1,n.invert)}}if(n.end){let e=GU(KU(n.end));if(r>e)return{success:fU(!1,n.invert)}}return{success:fU(!0,n.invert)}}},JU=class extends ed{initialize(){super.initialize(),this.mount(`type`,U(TS().min(3).max(128))),this.mount(`id`,U(MS())),this.mount(`clientId`,U(MS().or(HC()).or(BC()).optional())),this.mount(`realmId`,U(MS().or(HC()).or(BC()).optional())),this.mount(`realmName`,U(TS().min(3).max(128).or(HC()).or(BC()).optional()))}},YU=class extends ed{initialize(){this.mount(`types`,U(ew(TS()).or(HC()).or(BC()).optional())),this.mount(`invert`,U(jC().or(HC()).or(BC()).optional()))}},XU=class{validator;dataValidator;constructor(){this.validator=new YU,this.dataValidator=new JU}requires(){return[RU.IDENTITY]}async accessData(e){if(!e.data.has(`identity`))return null;if(e.data.isValidated(`identity`))return e.data.get(`identity`);let t=await this.dataValidator.run(e.data.get(`identity`));return e.data.set(`identity`,t),e.data.setValidated(`identity`),t}async evaluate(e,t){let n=await this.validator.run(e),r=await this.accessData(t);if(!r)return{success:!1,issues:[rU({code:nU.DATA_MISSING,message:`The data property identity is missing`,path:t.path})]};if(!n.types||n.types.length===0)return{success:!0};let i=n.types.includes(r.type);return i?{success:fU(i,n.invert)}:{success:fU(i,n.invert),issues:[rU({code:nU.EVALUATION_DENIED,message:`The type ${r.type} is not covered by the policy configuration`,path:t.path})]}}},ZU=class extends ed{initialize(){}},QU=class{validator;constructor(){this.validator=new ZU}requires(){return[RU.PERMISSION_BINDING]}async evaluate(e){return{success:fU(!0,(await this.validator.run(e)).invert)}}},$U=class extends ed{initialize(){super.initialize(),this.mount(`decisionStrategy`,U(Tw(WT).or(HC()).or(BC()).optional())),this.mount(`attributeName`,U(TS().min(3).or(ew(TS().min(3))).or(HC()).or(BC()).optional())),this.mount(`attributeNameStrict`,U(jC().or(HC()).or(BC()).optional())),this.mount(`attributeNullMatchAll`,U(jC().or(HC()).or(BC()).optional())),this.mount(`scope`,U(Tw(qH).or(HC()).or(BC()).optional())),this.mount(`invert`,U(jC().or(HC()).or(BC()).optional()))}},eW=class{validator;identityEvaluator;attributesEvaluator;constructor(){this.validator=new $U,this.identityEvaluator=new XU,this.attributesEvaluator=new BU}requires(e){return e.scope?[RU.IDENTITY]:[RU.IDENTITY,RU.ATTRIBUTES]}async toCondition(e,t){let n;try{n=await this.validator.run(e)}catch{return null}let r=await this.identityEvaluator.accessData(t);if(!r)return null;let i=r.realmId??null;if(n.scope){let e=JH(n.scope),t=typeof n.attributeName==`string`?n.attributeName:`realmId`,r;if(e===qH.ANY)r=xL(t,[]);else{let n=[];e!==qH.NONE&&i!==null&&n.push(yL(t,i)),e===qH.OWN_OR_NULL&&n.push(yL(t,null)),r=n.length===0?bL(t,[]):n.length===1?n[0]:wL(...n)}return n.invert?TL(r):r}if(typeof n.attributeName!=`string`||(n.attributeNameStrict??!0)===!1)return null;let a=n.attributeName,o=[];if(n.attributeNullMatchAll&&o.push(yL(a,null)),r.realmId!==void 0&&o.push(yL(a,r.realmId)),r.realmName!==void 0&&o.push(yL(a,r.realmName)),o.length===0)return n.invert?xL(a,[]):bL(a,[]);let s=o.length===1?o[0]:wL(...o);return n.invert?TL(s):s}async evaluate(e,t){let n=await this.validator.run(e),r=await this.identityEvaluator.accessData(t);if(!r)return{success:!1,issues:[rU({code:nU.DATA_MISSING,message:`The data property identity is missing`,path:t.path})]};if(n.scope){if(!t.data||!t.data.has(RU.REALM_MATCH)){if(t.withConditions){let n=await this.toCondition(e,t);return{success:!1,pending:!0,...n?{condition:n}:{}}}return{success:!0}}let i=t.data.get(RU.REALM_MATCH);return{success:fU(XH(n.scope,i??null,r.realmId,r.realmName),n.invert)}}let i=await this.attributesEvaluator.accessData(t);if(!i)return{success:!1,issues:[rU({code:nU.DATA_MISSING,message:`The data property attributes is missing`,path:t.path})]};let a;if(n.attributeName?a=Array.isArray(n.attributeName)?n.attributeName:[n.attributeName]:(a=[`realm_id`,`realm_name`,`realmId`,`realmName`],n.decisionStrategy=WT.CONSENSUS),!(n.attributeNameStrict??!0)){let e=Object.keys(i),t=[];for(let n of e){let e=!1;for(let t of a)if(n!==t&&n.includes(t)){e=!0;break}e&&t.push(n)}t.length>0&&a.push(...t)}let o=0,s=!1;for(let e of a){if(!cE(i,e))continue;s=!0;let t=!1,a=i[e];if((a===null&&n.attributeNullMatchAll||a===r.realmId||a===r.realmName)&&(t=!0),t){if(n.decisionStrategy===WT.AFFIRMATIVE)return{success:fU(!0,n.invert)};o++}else{if(n.decisionStrategy===WT.UNANIMOUS)return{success:fU(!1,n.invert)};o--}}return s?{success:fU(o>0,n.invert)}:{success:!0}}},tW=function(e){return e.DAILY=`daily`,e.WEEKLY=`weekly`,e.MONTHLY=`monthly`,e.YEARLY=`yearly`,e}({});function nW(e){return e===tW.WEEKLY||e===tW.MONTHLY||e===tW.YEARLY}function rW(e){return e===tW.MONTHLY||e===tW.YEARLY}function iW(e){return e===tW.YEARLY}var aW=class extends ed{initialize(){super.initialize(),this.mount(`dayOfWeek`,U(CC().min(0).max(6).or(HC()).or(BC()).optional())),this.mount(`dayOfMonth`,U(CC().min(1).max(31).or(HC()).or(BC()).optional())),this.mount(`dayOfYear`,U(CC().min(1).max(365).or(HC()).or(BC()).optional())),this.mount(`start`,U(QC().or(Zx()).or(tS()).or(CC()).or(HC()).or(BC()).optional())),this.mount(`end`,U(QC().or(Zx()).or(tS()).or(CC()).or(HC()).or(BC()).optional())),this.mount(`interval`,U(Tw(tW).or(HC()).or(BC()).optional())),this.mount(`invert`,U(jC().or(BC()).or(HC()).optional()))}},oW=/^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/;function sW(e,t){let n=t?new Date(t):new Date;return n.setHours(e.getHours(),e.getMinutes()),n}function cW(e,t){if(typeof e==`string`){if(oW.test(e)){let n=e.split(`:`),r=Number(n[0]),i=Number(n[1]),a=n[2]===void 0?0:Number(n[2]);if(Number.isFinite(r)&&Number.isFinite(i)&&Number.isFinite(a)){let e=t?new Date(t):new Date;return e.setHours(r,i,a,0),e}}return new Date(e)}return typeof e==`number`?new Date(e):e}var lW=class{validator;constructor(){this.validator=new aW}async evaluate(e,t){let n=await this.validator.run(e),r;if(t.data.has(RU.TIME)?t.data.isValidated(RU.TIME)?r=t.data.get(RU.TIME):(r=cW(t.data.get(RU.TIME)),t.data.set(RU.TIME,r),t.data.setValidated(RU.TIME)):r=new Date,n.start){let e=sW(cW(n.start,r),r);if(r<e)return{success:fU(!1,n.invert)}}if(n.end){let e=sW(cW(n.end,r),r);if(r>e)return{success:fU(!1,n.invert)}}if(n.interval){if(nW(n.interval)&&n.dayOfWeek&&r.getDay()!==n.dayOfWeek||rW(n.interval)&&n.dayOfMonth&&r.getDate()!==n.dayOfMonth)return{success:fU(!1,n.invert)};if(iW(n.interval)&&n.dayOfYear){let e=new Date(r.getFullYear(),0,0),t=r.getTime()-e.getTime()+(e.getTimezoneOffset()-r.getTimezoneOffset())*60*1e3;if(Math.floor(t/864e5)!==n.dayOfYear)return{success:fU(!1,n.invert)}}}return{success:fU(!0,n.invert)}}},uW={[RU.COMPOSITE]:new UU,[RU.ATTRIBUTES]:new BU,[RU.ATTRIBUTE_NAMES]:new VU,[RU.DATE]:new qU,[RU.IDENTITY]:new XU,[RU.PERMISSION_BINDING]:new QU,[RU.REALM_MATCH]:new eW,[RU.TIME]:new lW};function dW(e={}){return new uU(e)}var fW=class{provider;policyEngine;clientId;realmId;constructor(e){this.provider=e.provider,this.clientId=e.clientId||null,this.realmId=e.realmId||null,this.policyEngine=e.policyEngine?e.policyEngine:new lU(uW)}async findOne(e,t={}){return this.provider.findOne({name:e,clientId:t.clientId??this.clientId,realmId:t.realmId??this.realmId})}async evaluate(e){if(!Array.isArray(e.name)){await this.evaluate({...e,name:[e.name]});return}let{options:t={}}=e,n=t.decisionStrategy??WT.UNANIMOUS,r=[],i=0,a=e.data||new uU;for(let o of e.name){let s=await this.findOne(o,{realmId:e.realmId,clientId:e.clientId});if(!s){if(r.push(Iu({code:H.PERMISSION_NOT_FOUND,message:`The ${o} permission could not be resolved`,path:[o]})),n===WT.UNANIMOUS){let t=KH.evaluationFailed(e.name);throw t.addIssues(r),t}continue}let c=s.grants.map(e=>e.policy).filter(e=>!!e);if(c.length<s.grants.length){if(n===WT.AFFIRMATIVE)return;i++;continue}let l=a.clone();l.set(RU.PERMISSION_BINDING,s);let u={type:RU.COMPOSITE,decisionStrategy:WT.AFFIRMATIVE,children:c},d=await this.policyEngine.evaluate(u,dU({include:t.policiesIncluded,exclude:t.policiesExcluded,data:l}));if(d.success||t.pendingPolicies===`permit`&&d.pending){if(n===WT.AFFIRMATIVE)return;i++}else{if(r.push(iU({code:H.PERMISSION_EVALUATION_FAILED,issues:d.issues||[],message:`The ${s.permission.name} permissions policy evaluation failed`,path:[s.permission.name]})),n===WT.UNANIMOUS){let e=KH.evaluationFailed(s.permission.name);throw e.addIssues(r),e}i--}}if(!(i>0)){if(r.length===0)throw KH.deniedAll(e.name);{let t=KH.evaluationFailed(e.name);throw t.addIssues(r),t}}}async evaluateOneOf(e){return this.evaluate({...e,options:{...e.options||{},decisionStrategy:WT.AFFIRMATIVE}})}async preEvaluate(e){return this.evaluate({...e,options:{...e.options||{},pendingPolicies:`permit`}})}async preEvaluateOneOf(e){return this.preEvaluate({...e,options:{...e.options||{},decisionStrategy:WT.AFFIRMATIVE}})}async compile(e){let t=Array.isArray(e.name)?e.name:[e.name],n=e.data||new uU,r=[],i=!1;for(let a of t){let t=await this.findOne(a,{realmId:e.realmId,clientId:e.clientId});if(!t)continue;let o=t.grants.map(e=>e.policy).filter(e=>!!e);if(o.length<t.grants.length)return{verdict:`allow`};let s=n.clone();s.set(RU.PERMISSION_BINDING,t);let c={type:RU.COMPOSITE,decisionStrategy:WT.AFFIRMATIVE,children:o},l=await this.policyEngine.evaluate(c,dU({data:s,withConditions:!0}));if(l.success)return{verdict:`allow`};l.pending&&(l.condition?r.push(l.condition):i=!0)}if(i)return{verdict:`post`};if(r.length===0)return{verdict:`deny`};if(r.length===1){let[e]=r;return{verdict:`conditional`,condition:e}}return{verdict:`conditional`,condition:wL(...r)}}},pW=function(e){return e.LOGGING_IN=`loggingIn`,e.LOGGED_IN=`loggedIn`,e.LOGGING_OUT=`loggingOut`,e.LOGGED_OUT=`loggedOut`,e.SESSION_EXPIRED=`sessionExpired`,e.RESOLVING=`resolving`,e.RESOLVED=`resolved`,e.ACCESS_TOKEN_UPDATED=`accessTokenUpdated`,e.ACCESS_TOKEN_EXPIRE_DATE_UPDATED=`accessTokenExpireDateUpdated`,e.REFRESH_TOKEN_UPDATED=`refreshTokenUpdated`,e.ID_TOKEN_UPDATED=`idTokenUpdated`,e.USER_UPDATED=`userUpdated`,e.REALM_UPDATED=`realmUpdated`,e.REALM_MANAGEMENT_UPDATED=`realmManagementUpdated`,e}({});function mW(){return new eH}var hW=Symbol.for(`AuthupStoreEventBus`);function gW(e){let t=IH(hW,e);if(!t)throw Error(`The store dispatcher has not been injected in the app context.`);return t}function _W(e,t){LH(hW,e,t)}function vW(e){let t;return(...n)=>{if(t)return t;t=new Promise((t,r)=>{e(...n).then(e=>t(e)).catch(e=>r(e))});let r=()=>{setTimeout(()=>{t=void 0},0)};return t.then(r,r),t}}function yW(e){let t=e.httpClient??new ZV({baseURL:e.baseURL}),n=E(!1),r=e=>{n.value=e},i=E(null),a=t=>{i.value=t,e.dispatcher.emit(pW.ACCESS_TOKEN_UPDATED,t)},o=E(null),s=t=>{typeof t==`number`||typeof t==`string`?o.value=new Date(t):o.value=t,e.dispatcher.emit(pW.ACCESS_TOKEN_EXPIRE_DATE_UPDATED,o.value)},c=E(null),l=t=>{c.value=t,e.dispatcher.emit(pW.REFRESH_TOKEN_UPDATED,t)},u=E(null),d=t=>{u.value=t,e.dispatcher.emit(pW.ID_TOKEN_UPDATED,t)},f=E(null),p=B(()=>f.value?f.value.id:null),m=t=>{f.value=t,e.dispatcher.emit(pW.USER_UPDATED,t)},h=E(null),g=E(null),_=E(null),v=B(()=>_.value?_.value.id:void 0),y=B(()=>_.value?_.value.name:void 0),b=B(()=>_.value?_.value.name===Cte:!1),x=t=>{_.value=t,e.dispatcher.emit(pW.REALM_UPDATED,t)},S=E(null),ee=B(()=>S.value?S.value.id:v.value),C=B(()=>S.value?S.value.name:y.value),w=t=>{S.value=t,e.dispatcher.emit(pW.REALM_MANAGEMENT_UPDATED,t)},te=new tU,ne=new fW({provider:te,policyEngine:new lU}),re=E(null),ie=E(null),ae=B(()=>re.value?UH.AUTHENTICATING:i.value?_.value&&f.value?UH.AUTHENTICATED:UH.RESTORING:c.value?UH.RESTORING:UH.UNAUTHENTICATED),oe=E(0),se=E(!1),ce=E(!1),le=async()=>{let e=i.value,n=c.value;a(null),s(null),l(null),d(null),m(null),h.value=null,g.value=null,x(null),w(null),ie.value=null,te.setMany([]),se.value=!1,ce.value=!1,oe.value+=1;let r=oe.value;try{e&&await t.token.revoke({token:e})}catch{}try{n&&await t.token.revoke({token:n})}catch{}return r},ue=async e=>t.token.introspect({token:e},{authorizationHeader:{type:`Bearer`,token:e}}),de=async e=>t.userInfo.get(`Bearer ${e}`),fe=(e,t)=>!!e&&t.sub_kind===xE.USER&&t.sub===e.id,pe=e=>e.generation===oe.value&&(e.grant&&he(e.grant),e.introspection.exp&&e.token===i.value&&s(new Date(e.introspection.exp*1e3)),e.introspection.session_id&&(h.value=e.introspection.session_id),g.value=e.introspection.acr??null,e.introspection.realm_id&&e.introspection.realm_name&&(_.value={id:e.introspection.realm_id,name:e.introspection.realm_name},S.value||w(_.value)),e.user&&m(e.user),e.introspection.permissions&&te.setMany(e.introspection.permissions.map(e=>({permission:{name:e.name,realmId:e.realm_id,clientId:e.client_id}}))),se.value=!0,e.token===i.value&&(ce.value=!1),e.origin?ie.value=e.origin:ie.value||=WH.RESTORE,!0),me=async e=>{try{await t.token.revoke({token:e.access_token})}catch{}if(e.refresh_token)try{await t.token.revoke({token:e.refresh_token})}catch{}},he=e=>{let t=new Date(Date.now()+e.expires_in*1e3);s(t),a(e.access_token),e.refresh_token?l(e.refresh_token):l(null),e.id_token&&d(e.id_token),ce.value=!0},ge=vW(async()=>{if(!c.value)throw new DE(`The access token can not be renewed.`);let e=oe.value,n;try{n=await t.token.createWithRefreshToken({refresh_token:c.value})}catch(t){throw e===oe.value&&await le(),t}if(e!==oe.value)throw await me(n),new DE(`The session was torn down before the token could be refreshed.`);he(n)}),_e=async()=>{let e=oe.value,t=i.value;if(!t)return;let n=await ue(t),r=fe(f.value,n)?void 0:await de(t);pe({generation:e,token:t,introspection:n,user:r})},ve=vW(async()=>{if(e.dispatcher.emit(pW.RESOLVING),!i.value&&c.value&&await ge(),i.value&&(!se.value||ce.value))try{await _e()}catch(e){if(c.value)await ge(),await _e();else throw e}i.value&&!ie.value&&(ie.value=WH.RESTORE),e.dispatcher.emit(pW.RESOLVED)}),ye=B(()=>!!i.value),be=async(e,t,n)=>{let r=!1;try{let i=await ue(e.access_token),a=await de(e.access_token);r=pe({generation:n,token:e.access_token,grant:e,introspection:i,user:a,origin:t})}finally{r||await me(e)}if(!r)throw new DE(`The session was torn down before the login could be established.`)};return{cookiesRead:n,setCookiesRead:r,permissionEvaluator:ne,login:async n=>{e.dispatcher.emit(pW.LOGGING_IN),re.value=WH.LOGIN;try{let e=await t.token.createWithPassword({username:n.name,password:n.password,...n.realmId?{realm_id:n.realmId}:{},...n.otp?{otp:n.otp}:{}}),r=await le();await be(e,WH.LOGIN,r)}finally{re.value=null}e.dispatcher.emit(pW.LOGGED_IN)},loginWithTokenGrant:async t=>{e.dispatcher.emit(pW.LOGGING_IN),re.value=WH.LOGIN;try{let e=await le();await be(t,WH.LOGIN,e)}finally{re.value=null}e.dispatcher.emit(pW.LOGGED_IN)},logout:async()=>{e.dispatcher.emit(pW.LOGGING_OUT),await le(),e.dispatcher.emit(pW.LOGGED_OUT)},loggedIn:ye,status:ae,lastAuthOrigin:ie,resolve:ve,exchangeAuthorizationCode:async(e,n={})=>{re.value=WH.EXCHANGE;try{let r=await t.token.createWithAuthorizationCode({code:e,...n}),i=await le();await be(r,WH.EXCHANGE,i)}finally{re.value=null}},applyTokenGrantResponse:he,accessToken:i,setAccessToken:a,accessTokenExpireDate:o,setAccessTokenExpireDate:s,refreshToken:c,setRefreshToken:l,idToken:u,setIdToken:d,realm:_,realmId:v,realmIsRoot:b,realmName:y,setRealm:x,realmManagement:S,realmManagementId:ee,realmManagementName:C,setRealmManagement:w,user:f,userId:p,setUser:m,sessionId:h,acr:g}}var bW={},xW;function SW(){if(xW)return bW;xW=1,Object.defineProperty(bW,"__esModule",{value:!0}),bW.parseCookie=s,bW.parse=s,bW.stringifyCookie=c,bW.stringifySetCookie=l,bW.serialize=l,bW.parseSetCookie=u,bW.stringifySetCookie=l,bW.serialize=l;let e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=/^-?\d+$/,a=Object.prototype.toString,o=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function s(e,t){let n=new o,r=e.length;if(r<2)return n;let i=t?.decode||m,a=0;do{let t=f(e,a,r);if(t===-1)break;let o=d(e,a,r);if(t>o){a=e.lastIndexOf(`;`,t-1)+1;continue}let s=p(e,a,t);n[s]===void 0&&(n[s]=i(p(e,t+1,o))),a=o+1}while(a<r);return n}function c(n,r){let i=r?.encode||encodeURIComponent,a=[];for(let r of Object.keys(n)){let o=n[r];if(o===void 0)continue;if(!e.test(r))throw TypeError(`cookie name is invalid: ${r}`);let s=i(o);if(!t.test(s))throw TypeError(`cookie val is invalid: ${o}`);a.push(`${r}=${s}`)}return a.join(`; `)}function l(i,a,o){let s=typeof i==`object`?i:{...o,name:i,value:String(a)},c=(typeof a==`object`?a:o)?.encode||encodeURIComponent;if(!e.test(s.name))throw TypeError(`argument name is invalid: ${s.name}`);let l=s.value?c(s.value):``;if(!t.test(l))throw TypeError(`argument val is invalid: ${s.value}`);let u=s.name+`=`+l;if(s.maxAge!==void 0){if(!Number.isInteger(s.maxAge))throw TypeError(`option maxAge is invalid: ${s.maxAge}`);u+=`; Max-Age=`+s.maxAge}if(s.domain){if(!n.test(s.domain))throw TypeError(`option domain is invalid: ${s.domain}`);u+=`; Domain=`+s.domain}if(s.path){if(!r.test(s.path))throw TypeError(`option path is invalid: ${s.path}`);u+=`; Path=`+s.path}if(s.expires){if(!h(s.expires)||!Number.isFinite(s.expires.valueOf()))throw TypeError(`option expires is invalid: ${s.expires}`);u+=`; Expires=`+s.expires.toUTCString()}if(s.httpOnly&&(u+=`; HttpOnly`),s.secure&&(u+=`; Secure`),s.partitioned&&(u+=`; Partitioned`),s.priority)switch(typeof s.priority==`string`?s.priority.toLowerCase():void 0){case`low`:u+=`; Priority=Low`;break;case`medium`:u+=`; Priority=Medium`;break;case`high`:u+=`; Priority=High`;break;default:throw TypeError(`option priority is invalid: ${s.priority}`)}if(s.sameSite)switch(typeof s.sameSite==`string`?s.sameSite.toLowerCase():s.sameSite){case!0:case`strict`:u+=`; SameSite=Strict`;break;case`lax`:u+=`; SameSite=Lax`;break;case`none`:u+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid: ${s.sameSite}`)}return u}function u(e,t){let n=t?.decode||m,r=e.length,a=d(e,0,r),o=f(e,0,a),s=o===-1?{name:``,value:n(p(e,0,a))}:{name:p(e,0,o),value:n(p(e,o+1,a))},c=a+1;for(;c<r;){let t=d(e,c,r),n=f(e,c,t),a=n===-1?p(e,c,t):p(e,c,n),o=n===-1?void 0:p(e,n+1,t);switch(a.toLowerCase()){case`httponly`:s.httpOnly=!0;break;case`secure`:s.secure=!0;break;case`partitioned`:s.partitioned=!0;break;case`domain`:s.domain=o;break;case`path`:s.path=o;break;case`max-age`:o&&i.test(o)&&(s.maxAge=Number(o));break;case`expires`:if(!o)break;let e=new Date(o);Number.isFinite(e.valueOf())&&(s.expires=e);break;case`priority`:if(!o)break;let t=o.toLowerCase();(t===`low`||t===`medium`||t===`high`)&&(s.priority=t);break;case`samesite`:if(!o)break;let n=o.toLowerCase();(n===`lax`||n===`strict`||n===`none`)&&(s.sameSite=n)}c=t+1}return s}function d(e,t,n){let r=e.indexOf(`;`,t);return r===-1?n:r}function f(e,t,n){let r=e.indexOf(`=`,t);return r<n?r:-1}function p(e,t,n){let r=t,i=n;do{let t=e.charCodeAt(r);if(t!==32&&t!==9)break}while(++r<i);for(;i>r;){let t=e.charCodeAt(i-1);if(t!==32&&t!==9)break;i--}return e.slice(r,i)}function m(e){if(e.indexOf(`%`)===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function h(e){return a.call(e)===`[object Date]`}return bW}var CW=SW();function wW(){let e=typeof globalThis>`u`?void 0:globalThis.TEST_HAS_DOCUMENT_COOKIE;return typeof e==`boolean`?e:typeof document==`object`&&typeof document.cookie==`string`}function TW(e){return typeof e==`string`?CW.parse(e):typeof e==`object`&&e?e:{}}function EW(e,t={}){let n=DW(e);if(!t.doNotParse)try{return JSON.parse(n)}catch{}return e}function DW(e){return e&&e[0]===`j`&&e[1]===`:`?e.substr(2):e}var OW=class{constructor(e,t={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;let e=this.cookies;this.cookies=CW.parse(document.cookie),this._checkChanges(e)};let n=typeof document>`u`?``:document.cookie;this.cookies=TW(e||n),this.defaultSetOptions=t,this.HAS_DOCUMENT_COOKIE=wW()}_emitChange(e){for(let t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)}_checkChanges(e){new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach(t=>{e[t]!==this.cookies[t]&&this._emitChange({name:t,value:EW(this.cookies[t])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(e,t={}){return t.doNotUpdate||this.update(),EW(this.cookies[e],t)}getAll(e={}){e.doNotUpdate||this.update();let t={};for(let n in this.cookies)t[n]=EW(this.cookies[n],e);return t}set(e,t,n){n=n?Object.assign(Object.assign({},this.defaultSetOptions),n):this.defaultSetOptions;let r=typeof t==`string`?t:JSON.stringify(t);this.cookies=Object.assign(Object.assign({},this.cookies),{[e]:r}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=CW.serialize(e,r,n)),this._emitChange({name:e,value:t,options:n})}remove(e,t){let n=t=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=CW.serialize(e,``,n)),this._emitChange({name:e,value:void 0,options:t})}addChangeListener(e){this.changeListeners.push(e),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window==`object`&&`cookieStore`in window?window.cookieStore.addEventListener(`change`,this.update):this._startPolling())}removeChangeListener(e){let t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window==`object`&&`cookieStore`in window?window.cookieStore.removeEventListener(`change`,this.update):this._stopPolling())}removeAllChangeListeners(){for(;this.changeListeners.length>0;)this.removeChangeListener(this.changeListeners[0])}};function kW(e,{doNotParse:t=!1,autoUpdateDependencies:n=!1}={},r=new OW){let i=n?[...e||[]]:e,a=r.getAll({doNotParse:!0}),o=un(0),s=()=>{let e=r.getAll({doNotParse:!0});AW(i||null,e,a)&&o.value++,a=e};return r.addChangeListener(s),SN(()=>{r.removeChangeListener(s)}),{get:(...e)=>(n&&i&&!i.includes(e[0])&&i.push(e[0]),o.value,r.get(e[0],{doNotParse:t,...e[1]})),getAll:(...e)=>(o.value,r.getAll({doNotParse:t,...e[0]})),set:(...e)=>r.set(...e),remove:(...e)=>r.remove(...e),addChangeListener:(...e)=>r.addChangeListener(...e),removeChangeListener:(...e)=>r.removeChangeListener(...e)}}function AW(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}var jW=Symbol.for(`AuthupStore`);function MW(e,t){let n=NW(t);if(!n)throw Error(`The store has not been injected in the app context.`);return n(e)}function NW(e){let t=IH(jW,e);if(!t)throw Error(`The store factory has not been injected in the app context.`);return t}function PW(e){return!!IH(jW,e)}function FW(e,t){LH(jW,e,t)}function IW(e,t={}){if(PW(e))return;let n=mW();_W(n,e);let r=PH(HH,()=>yW({baseURL:t.baseURL,httpClient:t.httpClient,dispatcher:n})),i=r(t.pinia),a;a=t.cookieGet?t.cookieGet:kW().get;let o;o=t.cookieSet?t.cookieSet:kW().set;let s;s=t.cookieUnset?t.cookieUnset:t.cookieSet?(e,n)=>{t.cookieSet(e,null,n)}:kW().remove;let c=t.cookiePath||`/`,l=()=>{let e=typeof window>`u`?void 0:window.location?.pathname;if(typeof e!=`string`)return;let t=``;for(let n of e.split(`/`))if(n&&(t+=`/${n}`,t!==c))for(let e of Object.values(sF))s(e,{path:t})},u=()=>{if(i.cookiesRead)return;i.setCookiesRead(!0);let e=[sF.ACCESS_TOKEN_EXPIRE_DATE,...Object.values(sF).filter(e=>e!==sF.ACCESS_TOKEN_EXPIRE_DATE)],t;for(let n of e)if(t=a(n),t)switch(n){case sF.ACCESS_TOKEN:i.accessToken||i.setAccessToken(t);break;case sF.ACCESS_TOKEN_EXPIRE_DATE:i.accessTokenExpireDate||i.setAccessTokenExpireDate(t);break;case sF.REFRESH_TOKEN:i.refreshToken||i.setRefreshToken(t);break;case sF.ID_TOKEN:i.idToken||i.setIdToken(t);break;case sF.USER:i.user||i.setUser(t);break;case sF.REALM:i.realm||i.setRealm(t);break;case sF.REALM_MANAGEMENT:i.realmManagement||i.setRealmManagement(t)}},d=()=>{if(i.accessTokenExpireDate)return Math.floor(Math.max(1e3,new Date(`${i.accessTokenExpireDate}`).getTime()-Date.now())/1e3)};n.on(pW.ACCESS_TOKEN_EXPIRE_DATE_UPDATED,e=>{e?o(sF.ACCESS_TOKEN_EXPIRE_DATE,e,{maxAge:d(),path:c}):s(sF.ACCESS_TOKEN_EXPIRE_DATE,{path:c})}),n.on(pW.ACCESS_TOKEN_UPDATED,e=>{if(e){let t=d();o(sF.ACCESS_TOKEN,e,{maxAge:t,path:c})}else s(sF.ACCESS_TOKEN,{path:c})}),n.on(pW.REFRESH_TOKEN_UPDATED,e=>{e?o(sF.REFRESH_TOKEN,e,{path:c}):s(sF.REFRESH_TOKEN,{path:c})}),n.on(pW.ID_TOKEN_UPDATED,e=>{e?o(sF.ID_TOKEN,e,{path:c}):s(sF.ID_TOKEN,{path:c})}),n.on(pW.USER_UPDATED,e=>{e?o(sF.USER,e,{path:c}):s(sF.USER,{path:c})}),n.on(pW.REALM_UPDATED,e=>{e?o(sF.REALM,e,{path:c}):s(sF.REALM,{path:c})}),n.on(pW.REALM_MANAGEMENT_UPDATED,e=>{e?o(sF.REALM_MANAGEMENT,e,{path:c}):s(sF.REALM_MANAGEMENT,{path:c})}),l(),u(),FW(r,e)}function LW(e){e=an(e);let t={},n=Object.keys(e);for(let r of n){let n=e[r];(ln(n)||en(n))&&(t[r]=Sn(e,r))}return t}function RW(e,t={}){if(BH(e))return;let n=NW(e)(t.pinia),{refreshToken:r}=FH(n),i=null,a=new rH({baseURL:t.baseURL,tokenCreator:()=>{if(!r.value)throw Error(`No refresh token available.`);return i=r.value,(t.httpClient??new ZV({baseURL:t.baseURL})).token.createWithRefreshToken({refresh_token:i})},timer:!t.isServer}),o=gW(e);a.on($V.REFRESH_FINISHED,e=>{if(i===null||n.refreshToken!==i){c(),l();let n=t.httpClient??new ZV({baseURL:t.baseURL});if(Promise.resolve().then(()=>n.token.revoke({token:e.access_token})).catch(()=>{}),e.refresh_token){let t=e.refresh_token;Promise.resolve().then(()=>n.token.revoke({token:t})).catch(()=>{})}return}n.applyTokenGrantResponse(e)});let s=!1;a.on($V.HEADER_UNSET,()=>{s||Promise.resolve().then(()=>n.logout()).catch(()=>{}).finally(()=>{o.emit(pW.SESSION_EXPIRED)})});let c=()=>{s=!0,n.accessToken?(a.enable(),a.setAuthorizationHeader({type:`Bearer`,token:n.accessToken})):(a.disable(),a.unsetAuthorizationHeader()),s=!1},l=()=>{if(n.accessTokenExpireDate){let e=Math.floor((n.accessTokenExpireDate.getTime()-Date.now())/1e3);a.setTimer(e)}else a.clearTimer()};o.on(pW.ACCESS_TOKEN_UPDATED,()=>c()),o.on(pW.ACCESS_TOKEN_EXPIRE_DATE_UPDATED,()=>l()),c(),l(),VH(a,e)}var zW=Symbol.for(`AuthupHTTPClient`);function BW(e,t){LH(zW,e,t)}function VW(e){try{return!!HW(e)}catch{return!1}}function HW(e){let t=IH(zW,e);if(!t)throw Error(`The api client has not been injected.`);return t}function UW(e,t={}){if(VW(e))return;let n=t.httpClient??new ZV({baseURL:t.baseURL});zH(e).attach(n),BW(n,e)}function WW(e,t){if(t&&t._context&&t._context.provides&&t._context.provides[e])return t._context.provides[e];if(pr())return fr(e,void 0)}var GW=Symbol.for(`Ilingo`);function KW(e,t){if(t===void 0){dr(GW,e);return}t.provide(GW,e)}function qW(e){let t=WW(GW,e);if(!t)throw Error(`An ilingo instance is not present in the vue context.`);return t}function JW(e){return WW(GW,e)}var YW=Symbol.for(`ILocale`);function XW(e,t){let n=ln(e)?e:E(e);if(t===void 0){dr(YW,n);return}t.provide(YW,n)}function ZW(e){let t=WW(YW,e);if(!t)throw Error(`An ilingo locale is not present in the vue context.`);return t}function QW(e){return WW(YW,e)}var $W=new Set;function eG(e,t){try{return e.getSync(t)}catch(e){!SD(e)&&!cD()&&tG(e);return}}function tG(e){let t=e instanceof Error?`${e.name}: ${e.message}`:String(e);$W.has(t)||($W.add(t),console.warn(`[ilingo/vue] a synchronous translation lookup failed; falling back to the asynchronous one. ${t}`))}function nG(e){let t={},n=Object.keys(e);for(let r of n)t[r]=D(e[r]);return t}function rG(e){let t=qW(),n=ZW(),r=`${e.namespace}.${e.key}`,i=()=>({locale:e.locale?e.locale:n.value,data:e.data?nG(e.data):void 0,namespace:e.namespace,key:e.key,count:D(e.count)}),a=eG(t,i())||r,o=E(0),s=[];for(let r of t.stores.values()){if(!FD(r))continue;let t=r.on(`invalidate`,(t,r)=>{(t===void 0||t===(e.locale??n.value))&&(r===void 0||r===e.namespace)&&(o.value+=1)});s.push(t)}return Ve(()=>{for(let e of s)e()}),sP(async()=>(o.value,await t.get(i())||r),a)}var iG=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},aG=k({props:{path:{type:String,required:!0},data:{type:Object}},setup(e){let[t,n]=(e=>{let t=e.indexOf(`.`);if(t===-1)throw SyntaxError(`The key with required namespace prefix could not be parsed.`);let n=e.substring(0,t);return[n,e.substring(n.length+1)]})(e.path);return{text:rG({namespace:t,key:n,data:e.data})}}});function oG(e,t,n,r,i,a){return T(e.text)}var sG=iG(aG,[[`render`,oG],[`__file`,`/home/runner/work/ilingo/ilingo/packages/vue/src/component.vue`]]),cG=k({name:`ITranslateT`,props:{path:{type:String,required:!0},data:{type:Object},locale:{type:String},count:{type:Number},tag:{type:String,default:`span`}},setup(e,{slots:t}){let n=qW(),r=ZW();lG(e.path);let i=B(()=>lG(e.path)),a=()=>{let{namespace:t,key:n}=i.value;return{namespace:t,key:n,data:e.data?nG(e.data):void 0,locale:e.locale??r.value,count:e.count}},o=sP(async()=>{let e=a();return await n.get(e)??`${e.namespace}.${e.key}`},eG(n,a())??``),s=B(()=>jD(o.value));return()=>{let n=[];for(let r of s.value)if(r.kind===`text`)n.push(r.value);else if(r.kind===`var`){let t=e.data?.[r.name];t===void 0?n.push(r.modifierExpression?`{{${r.name}, ${r.modifierExpression}}}`:`{{${r.name}}}`):n.push(String(D(t)))}else{let e=t[r.name];if(e)for(let t of e())n.push(t);else n.push(`{${r.name}}`)}return e.tag?V(e.tag,n):n}}});function lG(e){let t=e.indexOf(`.`);if(t<=0||t>=e.length-1)throw SyntaxError(`[ilingo] <ITranslateT path="${e}"> requires a "namespace.key" path.`);return{namespace:e.slice(0,t),key:e.slice(t+1)}}function uG(e){if(typeof e==`string`)return dG(e);if(`path`in e){let{namespace:t,key:n}=dG(e.path);return{namespace:t,key:n,data:e.data,locale:e.locale,count:e.count}}return e}function dG(e){let t=e.indexOf(`.`);if(t<=0||t>=e.length-1)throw SyntaxError(`[ilingo] v-t="${e}" requires a "namespace.key" path.`);return{namespace:e.slice(0,t),key:e.slice(t+1)}}var fG=Symbol.for(`ilingo.v-t.stop`);function pG(e,t){function n(n,r){n[fG]?.();let i=uG(r);n[fG]=gr(r=>{let a=i.locale??t.value,o=!1;r(()=>{o=!0}),(async()=>{try{let t=await e.get({namespace:i.namespace,key:i.key,data:i.data,count:i.count,locale:a});if(o)return;n.textContent=t??`${i.namespace}.${i.key}`}catch{if(o)return;n.textContent=`${i.namespace}.${i.key}`}})()})}return{mounted(e,t){n(e,t.value)},updated(e,t){n(e,t.value)},unmounted(e){e[fG]?.()}}}function mG(e){return`stores`in e}function hG(e,t){let n=QW(e),r=n!==void 0&&!!n.value,i=JW(e),a=i!==void 0;return t?mG(t)?(i?i.merge(t):i=t,n||=E(i.getLocale())):(!n&&t.locale&&(n=E(t.locale)),i?i.registerStore(t.store):i=new ND({store:t.store})):i=new ND,n||=E(`en`),r||XW(n,e),a||KW(i,e),i}function gG(e,t){let n=hG(e,t);if(e.component(`ITranslate`,sG),e.component(`ITranslateT`,cG),!(t&&!mG(t)&&t.directives===!1)){let t=ZW(e);e.directive(`t`,pG(n,t))}}var _G=`validup`,vG=Symbol.for(`@ilingo/validup`),yG=function(e){return e.DEFAULT=`default`,e.CROSS_CUTTING=`cross-cutting`,e.GROUPS=`groups`,e.FIELDS=`fields`,e}({}),bG=new Set;function xG(e){if(!e)return;let t={};for(let[n,r]of Object.entries(e)){if(typeof r==`string`||typeof r==`number`){t[n]=r;continue}if(r==null){t[n]=``;continue}if(typeof r==`boolean`){t[n]=String(r);continue}let e;try{let t=JSON.stringify(r);e=typeof t==`string`?t:String(r)}catch{e=String(r)}if(t[n]=e,!cD()){let t=`${n}|${typeof r}`;bG.has(t)||(bG.add(t),console.warn(`[@ilingo/validup] Issue data key "${n}" carries a non-primitive value (${typeof r}); coerced to "${e}". Flatten the value at the validator or register a custom formatter.`))}}return t}async function SG(e,t,n={}){let{code:r}=e;if(typeof r==`string`&&r.length>0){let i=await t.get({namespace:n.namespace??`validup`,key:r,data:xG(e.data),locale:n.locale});if(typeof i==`string`&&i.length>0)return i}return e.message}function CG(e,t,n={}){let{code:r}=e;if(typeof r!=`string`||r.length===0)return e.message;let i;try{i=t.getSync({namespace:n.namespace??`validup`,key:r,data:xG(e.data),locale:n.locale})}catch(e){if(SD(e))return;throw e}return typeof i==`string`&&i.length>0?i:e.message}async function wG(e,t,n={}){let r=Ru(e),i=await Promise.all(r.map(e=>SG(e,t,n)));return r.map((e,t)=>({issue:e,message:i[t]}))}function TG(e,t,n={}){let r=Ru(e),i=[];for(let e of r){let r=CG(e,t,n);if(r===void 0)return;i.push({issue:e,message:r})}return i}var EG=XE({value_invalid:`The value is invalid`,one_of_failed:`None of the alternatives was successful`,required:`The value is required`,alpha:`The value must contain only letters`,alpha_num:`The value must be alphanumeric`,numeric:`The value must be numeric`,integer:`The value must be an integer`,decimal:`The value must be a decimal number`,min_length:`The minimum length allowed is {{min}}`,max_length:`The maximum length allowed is {{max}}`,min_value:`The value must be greater than or equal to {{min}}`,max_value:`The value must be less than or equal to {{max}}`,between:`The value must be between {{min}} and {{max}}`,email:`The value is not a valid email address`,url:`The value is not a valid URL`,ip_address:`The value is not a valid IP address`,mac_address:`The value is not a valid MAC address`,uuid:`The value is not a valid UUID`,date:`The value is not a valid date`,pattern:`The value does not match the expected pattern`,json:`The value is not valid JSON`,base64:`The value is not valid base64`,strong_password:`The value does not meet the password strength requirements`,same_as:`The value must equal {{other}}`}),DG=XE({value_invalid:`Der Wert ist ungültig`,one_of_failed:`Keine der Alternativen war erfolgreich`,required:`Der Wert ist erforderlich`,alpha:`Der Wert darf nur Buchstaben enthalten`,alpha_num:`Der Wert muss alphanumerisch sein`,numeric:`Der Wert muss numerisch sein`,integer:`Der Wert muss eine ganze Zahl sein`,decimal:`Der Wert muss eine Dezimalzahl sein`,min_length:`Die minimale Länge beträgt {{min}}`,max_length:`Die maximale Länge beträgt {{max}}`,min_value:`Der Wert muss größer oder gleich {{min}} sein`,max_value:`Der Wert muss kleiner oder gleich {{max}} sein`,between:`Der Wert muss zwischen {{min}} und {{max}} liegen`,email:`Der Wert ist keine gültige E-Mail-Adresse`,url:`Der Wert ist keine gültige URL`,ip_address:`Der Wert ist keine gültige IP-Adresse`,mac_address:`Der Wert ist keine gültige MAC-Adresse`,uuid:`Der Wert ist keine gültige UUID`,date:`Der Wert ist kein gültiges Datum`,pattern:`Der Wert entspricht nicht dem erwarteten Muster`,json:`Der Wert ist kein gültiges JSON`,base64:`Der Wert ist kein gültiges Base64`,strong_password:`Der Wert erfüllt nicht die Anforderungen an die Passwortstärke`,same_as:`Der Wert muss gleich {{other}} sein`}),OG=XE({value_invalid:`La valeur est invalide`,one_of_failed:`Aucune des alternatives n’a réussi`,required:`La valeur est requise`,alpha:`La valeur ne doit contenir que des lettres`,alpha_num:`La valeur doit être alphanumérique`,numeric:`La valeur doit être numérique`,integer:`La valeur doit être un entier`,decimal:`La valeur doit être un nombre décimal`,min_length:`La longueur minimale autorisée est {{min}}`,max_length:`La longueur maximale autorisée est {{max}}`,min_value:`La valeur doit être supérieure ou égale à {{min}}`,max_value:`La valeur doit être inférieure ou égale à {{max}}`,between:`La valeur doit être comprise entre {{min}} et {{max}}`,email:`La valeur n’est pas une adresse e-mail valide`,url:`La valeur n’est pas une URL valide`,ip_address:`La valeur n’est pas une adresse IP valide`,mac_address:`La valeur n’est pas une adresse MAC valide`,uuid:`La valeur n’est pas un UUID valide`,date:`La valeur n’est pas une date valide`,pattern:`La valeur ne correspond pas au motif attendu`,json:`La valeur n’est pas un JSON valide`,base64:`La valeur n’est pas une valeur base64 valide`,strong_password:`La valeur ne respecte pas les exigences de robustesse du mot de passe`,same_as:`La valeur doit être égale à {{other}}`}),kG=XE({value_invalid:`El valor no es válido`,one_of_failed:`Ninguna de las alternativas tuvo éxito`,required:`El valor es obligatorio`,alpha:`El valor solo debe contener letras`,alpha_num:`El valor debe ser alfanumérico`,numeric:`El valor debe ser numérico`,integer:`El valor debe ser un número entero`,decimal:`El valor debe ser un número decimal`,min_length:`La longitud mínima permitida es {{min}}`,max_length:`La longitud máxima permitida es {{max}}`,min_value:`El valor debe ser mayor o igual que {{min}}`,max_value:`El valor debe ser menor o igual que {{max}}`,between:`El valor debe estar entre {{min}} y {{max}}`,email:`El valor no es una dirección de correo electrónico válida`,url:`El valor no es una URL válida`,ip_address:`El valor no es una dirección IP válida`,mac_address:`El valor no es una dirección MAC válida`,uuid:`El valor no es un UUID válido`,date:`El valor no es una fecha válida`,pattern:`El valor no coincide con el patrón esperado`,json:`El valor no es un JSON válido`,base64:`El valor no es una codificación base64 válida`,strong_password:`El valor no cumple los requisitos de seguridad de la contraseña`,same_as:`El valor debe ser igual a {{other}}`}),AG=class extends PD{constructor(){super({id:vG,data:$E([QE(`en`,[ZE(_G,[EG])]),QE(`de`,[ZE(_G,[DG])]),QE(`fr`,[ZE(_G,[OG])]),QE(`es`,[ZE(_G,[kG])])])})}};function jG(){return new AG}function MG(e){try{return e()}catch{return}}function NG(e,t){let n=qW(),r=ZW(),i=un([]),a=MG(()=>TG(mn(e)??[],n,{locale:mn(t)??r.value}));return a&&(i.value=a),sP(async()=>{let a=mn(e);if(!a||a.length===0)return i.value=[],[];let o=mn(t)??r.value,s=await wG(a,n,{locale:o});return i.value=s,s},i.value)}function PG(e){return NG(B(()=>D(e).$errors.value))}function FG(e){let t=PG(e);return Yt({severity:B(()=>rd(D(e))),messages:B(()=>t.value.map(e=>({key:e.issue.code??`validation`,value:e.message}))),issues:t})}var IG=k({props:{field:{type:Object,required:!0}},slots:Object,setup(e,{slots:t}){let n=FG(Sn(e,`field`));return()=>{let e=t[yG.DEFAULT];return e?e({value:n}):[]}}});function LG(e){let t=JW(e);if(!t)throw Error("@ilingo/validup-vue: no Ilingo instance found in the app context. Install @ilingo/vue first — e.g. `app.use(ilingoVue, { ... })` before `app.use(ilingoValidupVue)`.");t.registerStore(jG())}var RG=Symbol.for(`AuthupHydrationStore`);function zG(e,t){LH(RG,e,t)}function BG(e){return IH(RG,e)}function VG(){return typeof window>`u`}function HG(e){let t=BG();if(!t)return;if(VG()){if(!ss())return;Bi(async()=>{try{let n=await e.resolve();if(n===void 0)return;e.apply(n),t.set(e.key,n)}catch{}});return}let n=t.get(e.key);n!==void 0&&e.apply(n)}function UG(e){let t={},n=Object.entries(e);for(let[e,r]of n)t[e]=D(r);return t}function WG(e){return`authup:translation:${e.locale}:${e.namespace}:${e.key}:${e.count??``}:${e.data?JSON.stringify(e.data):``}`}function GG(e,t){try{return e.getSync(t),!1}catch{return!0}}function KG(e){let t=rG(e);if(!BG())return t;let n=`${e.namespace}.${e.key}`;if(t.value!==n)return t;let r=qW(),i=ZW(),a=()=>({locale:e.locale?e.locale:i.value,namespace:e.namespace,key:e.key,count:D(e.count),data:e.data?UG(e.data):void 0});if(!GG(r,a()))return t;let o=E();return HG({key:WG(a()),resolve:()=>r.get(a()),apply:e=>{o.value=e}}),B(()=>t.value===n&&o.value?o.value:t.value)}function qG(){let e=qW(),t=ZW();return async n=>await e.get({...n,locale:t.value})??n.key}function JG(e){let t={};for(let n of e)t[n.key]=KG(n);return Yt(t)}function YG(e,t){return JG(t.map(t=>({...t,namespace:e})))}function XG(e,t={}){gG(e,{store:new PD({data:SO}),locale:t.locale}),LG(e)}var ZG=`auto`,QG=`vc-locale`,$G=Symbol.for(`VCLocaleManager`);function eK(e,t={}){let{initial:n=ZG,fallback:r=Tk,syncLang:i=!0,navigatorLanguage:a}=t,o=a??GP().language,s=B(()=>{let{value:t}=e;return t&&t!==`auto`?t:o.value||r}),c=B(()=>!e.value||e.value===`auto`);i&&typeof document<`u`&&yr(s,e=>{document.documentElement.lang=e},{immediate:!0});function l(t){e.value=t}function u(){e.value=n}return{source:e,resolved:s,isAuto:c,set:l,reset:u}}function tK(e,t={}){let{initial:n=ZG,persist:r=!0,storageKey:i=QG,source:a,...o}=t,s=ze(!0),c=s.run(()=>eK(a??(r?PP(i,n):E(n)),{initial:n,...o}));return wk(e,{config:{locale:c.resolved}}),VO($G,c,e),typeof e.onUnmount==`function`&&e.onUnmount(()=>s.stop()),c}function nK(){let e=FO($G);if(!e)throw Error("[@vuecs/locale] No locale manager found. Install the plugin via `app.use(locale, { /* options */ })`.");return e}function rK(){try{return nK()}catch{return}}function iK(){let e=rK(),t=ZW();return{code:B(()=>EO(e?e.resolved.value:t.value)??t.value),set:n=>{e?e.set(n):t.value=n}}}function aK(e){let t=e.runWithContext(()=>rK());if(!t)return;let n=e.runWithContext(()=>ZW());yr(t.resolved,e=>{let t=EO(e);t&&t!==n.value&&(n.value=t)},{immediate:!0})}function oK(){return{createText:KG({namespace:q.ACTION,key:Z.CREATE}),updateText:KG({namespace:q.ACTION,key:Z.UPDATE}),createIcon:`fa6-solid:plus`,updateIcon:`fa6-solid:floppy-disk`,createColor:`primary`,updateColor:`primary`}}function sK(e,t={},n={}){let r=Object.keys(e);for(let i of r){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let r=t[i],a=r===null?``:r;if(n.fields){let t=n.fields.at(i);if(t.$dirty.value){if(!Zl(e[i],a))continue;t.$reset()}}e[i]=a}return e}function cK(e){return _L(e)||uL(e)}function lK(e){return zL(e)?e:sR(e)}function uK(e){return e.value.some(e=>(e.name===`createdAt`||e.name===`updatedAt`)&&e.operator===WI.DESC)}function dK(e,t){return async(...n)=>e.value?Promise.resolve():(e.value=!0,t(...n).finally(()=>{e.value=!1}))}function fK(e,t){if(e.data)return;let n=Array.isArray(e.name)?[...e.name].sort().join(`,`):e.name;return[`authup:permission`,t.userId||``,t.realmId||``,n,e.realmId||``,e.clientId||``].join(`:`)}function pK(e={}){let t;t=e.store?e.store:MW(e.pinia,e.app);let n=LW(t);return e=>{let r=typeof e==`function`?e:()=>e,i=E(!1),a=0,o=async()=>{let e;n.userId.value&&(e={type:`user`,id:n.userId.value},n.realmId.value&&(e.realmId=n.realmId.value),n.realmName.value&&(e.realmName=n.realmName.value));let i=r(),a=i.data||new uU;a.set(RU.IDENTITY,e);try{return await t.permissionEvaluator.preEvaluateOneOf({...i,data:a}).then(()=>!0).catch(()=>!1)}catch{return!1}},s=()=>{a++;let e=a;return i.value=!1,Promise.resolve().then(()=>o()).then(t=>(e===a&&(i.value=t),t))},c=s(),l=fK(r(),{userId:n.userId.value,realmId:n.realmId.value});l&&HG({key:l,resolve:()=>c,apply:e=>{i.value=e}});let u;return Fi(()=>{u=yr([n.loggedIn,r],()=>s())}),zi(()=>{u!==void 0&&u()}),i}}var mK=Object.create(null);mK.open=`0`,mK.close=`1`,mK.ping=`2`,mK.pong=`3`,mK.message=`4`,mK.upgrade=`5`,mK.noop=`6`;var hK=Object.create(null);Object.keys(mK).forEach(e=>{hK[mK[e]]=e});var gK={type:`error`,data:`parser error`},_K=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,vK=typeof ArrayBuffer==`function`,yK=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,bK=({type:e,data:t},n,r)=>_K&&t instanceof Blob?n?r(t):xK(t,r):vK&&(t instanceof ArrayBuffer||yK(t))?n?r(t):xK(new Blob([t]),r):r(mK[e]+(t||``)),xK=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function SK(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var CK;function wK(e,t){if(_K&&e.data instanceof Blob)return e.data.arrayBuffer().then(SK).then(t);if(vK&&(e.data instanceof ArrayBuffer||yK(e.data)))return t(SK(e.data));bK(e,!1,e=>{CK||=new TextEncoder,t(CK.encode(e))})}var TK=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,EK=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)EK[TK.charCodeAt(e)]=e;var DK=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=EK[e.charCodeAt(r)],o=EK[e.charCodeAt(r+1)],s=EK[e.charCodeAt(r+2)],c=EK[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},OK=typeof ArrayBuffer==`function`,kK=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:jK(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:AK(e.substring(1),t)}:hK[n]?e.length>1?{type:hK[n],data:e.substring(1)}:{type:hK[n]}:gK},AK=(e,t)=>OK?jK(DK(e),t):{base64:!0,data:e},jK=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},MK=``,NK=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{bK(e,!1,e=>{r[a]=e,++i===n&&t(r.join(MK))})})},PK=(e,t)=>{let n=e.split(MK),r=[];for(let e=0;e<n.length;e++){let i=kK(n[e],t);if(r.push(i),i.type===`error`)break}return r};function FK(){return new TransformStream({transform(e,t){wK(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var IK;function LK(e){return e.reduce((e,t)=>e+t.length,0)}function RK(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function zK(e,t){IK||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(LK(n)<1)break;let e=RK(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(LK(n)<2)break;let e=RK(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(LK(n)<8)break;let e=RK(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue(gK);break}i=a*2**32+t.getUint32(4),r=3}else{if(LK(n)<i)break;let e=RK(n,i);s.enqueue(kK(a?e:IK.decode(e),t)),r=0}if(i===0||i>e){s.enqueue(gK);break}}}})}function BK(e){if(e)return VK(e)}function VK(e){for(var t in BK.prototype)e[t]=BK.prototype[t];return e}BK.prototype.on=BK.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},BK.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},BK.prototype.off=BK.prototype.removeListener=BK.prototype.removeAllListeners=BK.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},BK.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},BK.prototype.emitReserved=BK.prototype.emit,BK.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},BK.prototype.hasListeners=function(e){return!!this.listeners(e).length};var HK=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),UK=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),WK=`arraybuffer`;function GK(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var KK=UK.setTimeout,qK=UK.clearTimeout;function JK(e,t){t.useNativeTimers?(e.setTimeoutFn=KK.bind(UK),e.clearTimeoutFn=qK.bind(UK)):(e.setTimeoutFn=UK.setTimeout.bind(UK),e.clearTimeoutFn=UK.clearTimeout.bind(UK))}var YK=1.33;function XK(e){return typeof e==`string`?ZK(e):Math.ceil((e.byteLength||e.size)*YK)}function ZK(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function QK(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function $K(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function eq(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var tq=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},nq=class extends BK{constructor(e){super(),this.writable=!1,JK(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new tq(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=kK(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=$K(e);return t.length?`?`+t:``}},rq=class extends nq{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){PK(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,NK(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=QK()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},iq=!1;try{iq=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var aq=iq;function oq(){}var sq=class extends rq{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},cq=class e extends BK{constructor(e,t,n){super(),this.createRequest=e,JK(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=GK(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(this._xhr!==void 0&&this._xhr!==null){if(this._xhr.onreadystatechange=oq,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(cq.requestsCount=0,cq.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,lq);else if(typeof addEventListener==`function`){let e=`onpagehide`in UK?`pagehide`:`unload`;addEventListener(e,lq,!1)}}function lq(){for(let e in cq.requests)cq.requests.hasOwnProperty(e)&&cq.requests[e].abort()}var uq=(function(){let e=fq({xdomain:!1});return e&&e.responseType!==null})(),dq=class extends sq{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=uq&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new cq(fq,this.uri(),e)}};function fq(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||aq))return new XMLHttpRequest}catch{}if(!t)try{return new UK[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var pq=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,mq=class extends nq{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=pq?{}:GK(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;bK(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&HK(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=QK()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},hq=UK.WebSocket||UK.MozWebSocket,gq={websocket:class extends mq{createSocket(e,t,n){return pq?new hq(e,t,n):t?new hq(e,t):new hq(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends nq{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=zK(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=FK();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&HK(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:dq},_q=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vq=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function yq(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=_q.exec(e||``),a={},o=14;for(;o--;)a[vq[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=bq(a,a.path),a.queryKey=xq(a,a.query),a}function bq(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function xq(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var Sq=typeof addEventListener==`function`&&typeof removeEventListener==`function`,Cq=[];Sq&&addEventListener(`offline`,()=>{Cq.forEach(e=>e())},!1);var wq=class e extends BK{constructor(e,t){if(super(),this.binaryType=WK,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=yq(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=yq(t.host).host);JK(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=eq(this.opts.query)),Sq&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},Cq.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data)}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=XK(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,HK(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),Sq&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=Cq.indexOf(this._offlineEventListener);e!==-1&&Cq.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};wq.protocol=4;var Tq=class extends wq{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;wq.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;wq.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},Eq=class extends Tq{constructor(e,t={}){let n=typeof e==`object`,r=n?{...e}:{...t};(!r.transports||r.transports&&typeof r.transports[0]==`string`)&&(r.transports=(r.transports||[`polling`,`websocket`,`webtransport`]).map(e=>gq[e]).filter(e=>!!e)),super(n?r:e,r)}};Eq.protocol;function Dq(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=yq(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var Oq=typeof ArrayBuffer==`function`,kq=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Aq=Object.prototype.toString,jq=typeof Blob==`function`||typeof Blob<`u`&&Aq.call(Blob)===`[object BlobConstructor]`,Mq=typeof File==`function`||typeof File<`u`&&Aq.call(File)===`[object FileConstructor]`;function Nq(e){return Oq&&(e instanceof ArrayBuffer||kq(e))||jq&&e instanceof Blob||Mq&&e instanceof File}function Pq(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(Pq(e[t]))return!0;return!1}if(Nq(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return Pq(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&Pq(e[t]))return!0;return!1}function Fq(e){let t=[],n=e.data,r=e;return r.data=Iq(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Iq(e,t,n){if(!e)return e;if(Nq(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=Iq(e[r],t);return n}if(typeof e==`object`&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON==`function`&&!n)return Iq(e.toJSON(),t,!0);let r={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=Iq(e[n],t));return r}return e}function Lq(e,t){return e.data=Rq(e.data,t),delete e.attachments,e}function Rq(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Rq(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Rq(e[n],t));return e}var zq=n({Decoder:()=>Uq,Encoder:()=>Hq,PacketType:()=>Vq,isPacketValid:()=>Xq,protocol:()=>5}),Bq=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],Vq;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(Vq||={});var Hq=class{constructor(e){this.replacer=e}encode(e){return(e.type===Vq.EVENT||e.type===Vq.ACK)&&Pq(e)?this.encodeAsBinary({type:e.type===Vq.EVENT?Vq.BINARY_EVENT:Vq.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===Vq.BINARY_EVENT||e.type===Vq.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=Fq(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},Uq=class e extends BK{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===Vq.BINARY_EVENT;n||t.type===Vq.BINARY_ACK?(t.type=n?Vq.EVENT:Vq.ACK,this.reconstructor=new Wq(t)):super.emitReserved(`decoded`,t)}else if(Nq(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(Vq[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===Vq.BINARY_EVENT||r.type===Vq.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!Kq(a)||a<1)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&t.charAt(n)!==`,`&&n!==t.length;);r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case Vq.CONNECT:return Jq(t);case Vq.DISCONNECT:return t===void 0;case Vq.CONNECT_ERROR:return typeof t==`string`||Jq(t);case Vq.EVENT:case Vq.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&Bq.indexOf(t[0])===-1);case Vq.ACK:case Vq.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},Wq=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=Lq(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Gq(e){return typeof e==`string`}var Kq=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function qq(e){return e===void 0||Kq(e)}function Jq(e){return Object.prototype.toString.call(e)===`[object Object]`}function Yq(e,t){switch(e){case Vq.CONNECT:return t===void 0||Jq(t);case Vq.DISCONNECT:return t===void 0;case Vq.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&Bq.indexOf(t[0])===-1);case Vq.ACK:return Array.isArray(t);case Vq.CONNECT_ERROR:return typeof t==`string`||Jq(t);default:return!1}}function Xq(e){return Gq(e.nsp)&&qq(e.id)&&Yq(e.type,e.data)}function Zq(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var Qq=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),$q=class extends BK{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[Zq(e,`open`,this.onopen.bind(this)),Zq(e,`packet`,this.onpacket.bind(this)),Zq(e,`error`,this.onerror.bind(this)),Zq(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(Qq.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:Vq.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Vq.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Vq.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case Vq.EVENT:case Vq.BINARY_EVENT:this.onevent(e);break;case Vq.ACK:case Vq.BINARY_ACK:this.onack(e);break;case Vq.DISCONNECT:this.ondisconnect();break;case Vq.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t)}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:Vq.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Vq.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function eJ(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}eJ.prototype.duration=function(){var e=this.ms*this.factor**+this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},eJ.prototype.reset=function(){this.attempts=0},eJ.prototype.setMin=function(e){this.ms=e},eJ.prototype.setMax=function(e){this.max=e},eJ.prototype.setJitter=function(e){this.jitter=e};var tJ=class extends BK{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,JK(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new eJ({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||zq;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new Eq(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=Zq(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=Zq(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(Zq(e,`ping`,this.onping.bind(this)),Zq(e,`data`,this.ondata.bind(this)),Zq(e,`error`,this.onerror.bind(this)),Zq(e,`close`,this.onclose.bind(this)),Zq(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){HK(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new $q(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},nJ={};function rJ(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=Dq(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=nJ[i]&&a in nJ[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new tJ(r,t):(nJ[i]||(nJ[i]=new tJ(r,t)),c=nJ[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(rJ,{Manager:tJ,Socket:$q,io:rJ,connect:rJ});function iJ(e=``){return e.includes(`://`)?e.split(`://`).map(e=>iJ(e)).join(`://`):e.replace(/\/+/g,`/`)}function aJ(e){return e===void 0?()=>void 0:typeof e==`string`?()=>e:e}function oJ(e){return uE(e)&&typeof e.description==`string`}var sJ=class{manager;sockets;tokenFn;constructor(e){this.sockets=new Map;let t=new URL(e.url),n=`${t.protocol}//${t.host}`,r={...e.options||{}};r.path?t.pathname.endsWith(r.path)?r.path=t.pathname:t.pathname!==`/`&&(r.path=iJ(t.pathname+r.path)):t.pathname.endsWith(`/socket.io`)?r.path=t.pathname:t.pathname!==`/`&&(r.path=iJ(`${t.pathname}/socket.io`)),this.manager=new tJ(n,{autoConnect:!1,...r}),this.tokenFn=aJ(e.token)}get options(){return this.manager.opts}async connect(e=`/`){let t=this.inject(e);return t.connected?t:new Promise((e,n)=>{t.once(`connect`,()=>{e(t)}),t.once(`connect_error`,e=>{n(e)}),t.connect()})}async disconnect(e=`/`){let t=this.inject(e);t.connected&&await new Promise((e,n)=>{t.once(`disconnect`,(t,r)=>{if(t===`io client disconnect`){e();return}if(oJ(r)){n(Error(r.description));return}n(r)}),t.disconnect()})}async reconnect(e=`/`){return await this.disconnect(e),new Promise((t,n)=>{setTimeout(()=>{this.connect(e).then(e=>t(e)).catch(e=>n(e))})})}async reconnectAll(){let e=this.sockets.keys(),t=[];for(;;){let n=e.next();if(n.done)break;t.push(this.reconnect(n.value))}return Promise.all(t)}inject(e=`/`){let t=this.sockets.get(e);return t||(t=this.manager.socket(e,{auth:e=>{Promise.resolve().then(()=>this.tokenFn()).then(t=>{e({token:t})}).catch(()=>e())}}),this.sockets.set(e,t),t)}eject(e=`/`){let t=this.sockets.get(e);t&&(t.disconnect(),this.sockets.delete(e))}},cJ=function(e){return e.CREATED=`created`,e.DELETED=`deleted`,e.UPDATED=`updated`,e.SUBSCRIBE=`subscribe`,e.UNSUBSCRIBE=`unsubscribe`,e}({});function lJ(e,t){return e+(t.substring(0,1).toUpperCase()+t.substring(1))}var uJ=Symbol.for(`AuthupSocketManager`);function dJ(){return!!IH(uJ)}function fJ(e,t){LH(uJ,e,t)}function pJ(e){let t=IH(uJ,e);if(!t)throw Error(`The socket manager has not been injected in the app context.`);return t}function mJ(e,t){let n=NW(e)(t.pinia),{accessToken:r}=LW(n),i=new sJ({url:t.baseURL,token:()=>r.value??void 0}),a=E();n.$subscribe((e,t)=>{let n=t.accessToken??void 0;n!==a.value&&(a.value=n,Promise.resolve().then(()=>i.reconnect()))}),fJ(i,e)}var hJ=function(e){return e.DEFAULT=`default`,e.FOOTER=`footer`,e.HEADER=`header`,e.BODY=`body`,e.LOADING=`loading`,e.NO_MORE=`noMore`,e.ITEM=`item`,e.ITEM_ACTIONS=`itemActions`,e.ITEM_ACTIONS_EXTRA=`itemActionsExtra`,e}({});function gJ(e,t={}){return cE(t,e)}function _J(e,t={},n={}){return cE(n,e)?n[e](t):[]}function vJ(e,t,n){let r=e.$getResultsForChild(t);if(!r)return{};let i=n??Object.keys(r.fields),a={};for(let e of i){let t=r.fields[e];t&&(a[e]=t.$model.value)}return a}function yJ(){return{defaults:{pagination:{firstIcon:`fa6-solid:angles-left`,prevIcon:`fa6-solid:chevron-left`,nextIcon:`fa6-solid:chevron-right`,lastIcon:`fa6-solid:angles-right`},submitButton:{createIcon:`fa6-solid:plus`,updateIcon:`fa6-solid:floppy-disk`},collapseTrigger:{chevronIcon:`fa6-solid:chevron-down`},tableExpandTrigger:{chevronIcon:`fa6-solid:chevron-down`},breadcrumb:{separatorIcon:`fa6-solid:chevron-right`},alert:{infoIcon:`fa6-solid:circle-info`,successIcon:`fa6-solid:circle-check`,warningIcon:`fa6-solid:triangle-exclamation`,errorIcon:`fa6-solid:circle-xmark`}}}}function bJ(e={}){return{themes:e.themes,icons:[yJ()],defaults:{submitButton:oK()}}}var xJ=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};function SJ(e){return typeof e==`string`?`'${e}'`:new CJ().serialize(e)}var CJ=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}();function wJ(e,t){return e===t||SJ(e)===SJ(t)}function TJ(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}function EJ(e,t){let n=e,r=t.toString(),i=r.indexOf(`.`),a=i>=0?r.length-i:0;if(a>0){let e=10**a;n=Math.round(n*e)/e}return n}function DJ(e,t,n,r){t=Number(t),n=Number(n);let i=(e-(Number.isNaN(t)?0:t))%r,a=EJ(Math.abs(i)*2>=r?e+Math.sign(i)*(r-Math.abs(i)):e-i,r);return Number.isNaN(t)?!Number.isNaN(n)&&a>n&&(a=Math.floor(EJ(n/r,r))*r):a<t?a=t:!Number.isNaN(n)&&a>n&&(a=t+Math.floor(EJ((n-t)/r,r))*r),a=EJ(a,r),a}function OJ(e,t){let n=typeof e==`string`&&!t?`${e}Context`:t,r=Symbol(n);return[t=>{let n=fr(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},e=>(dr(r,e),e)]}function kJ(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function AJ(e,t,n){let r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function jJ(e){return e==null}function MJ(e,t){return jJ(e)?!1:Array.isArray(e)?e.some(e=>wJ(e,t)):wJ(e,t)}function NJ(e){return e?e.flatMap(e=>e.type===Ro?NJ(e.children):[e]):[]}var PJ=[`INPUT`,`TEXTAREA`];function FJ(e,t,n,r={}){if(!t||r.enableIgnoredElement&&PJ.includes(t.nodeName))return null;let{arrowKeyOptions:i=`both`,attributeName:a=`[data-reka-collection-item]`,itemsArray:o=[],loop:s=!0,dir:c=`ltr`,preventScroll:l=!0,focus:u=!1}=r,[d,f,p,m,h,g]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],_=p||m,v=d||f;if(!h&&!g&&(!_&&!v||i===`vertical`&&v||i===`horizontal`&&_))return null;let y=n?Array.from(n.querySelectorAll(a)):o;if(!y.length)return null;l&&e.preventDefault();let b=null;return v||_?b=IJ(y,t,{goForward:_?m:c===`ltr`?d:f,loop:s}):h?b=y.at(0)||null:g&&(b=y.at(-1)||null),u&&b?.focus(),b}function IJ(e,t,n,r=e.includes(t)?e.length:e.length+1){if(--r===0)return null;let i=e.indexOf(t),a;if(a=i===-1?n.goForward?0:e.length-1:n.goForward?i+1:i-1,!n.loop&&(a<0||a>=e.length))return null;let o=e[(a+e.length)%e.length];return o?o.hasAttribute(`disabled`)&&o.getAttribute(`disabled`)!==`false`?IJ(e,o,n,r):o:null}var[LJ,ire]=OJ(`ConfigProvider`);function RJ(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function zJ(e,t,n=`.`,r){if(!RJ(t))return zJ(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:RJ(a)&&RJ(i[t])?zJ(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function BJ(e){return(...t)=>t.reduce((t,n)=>zJ(t,n,``,e),{})}var VJ=BJ(),HJ=WN(()=>{let e=E(new Map),t=E(),n=B(()=>{for(let t of e.value.values())if(t)return!0;return!1}),r=LJ({scrollBody:E(!0)}),i=null,a=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.documentElement.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,NN&&i?.(),t.value=void 0};return yr(n,(e,o)=>{if(!DN)return;if(!e){o&&a();return}t.value===void 0&&(t.value=document.body.style.overflow);let s=window.innerWidth-document.documentElement.clientWidth,c={padding:s,margin:0},l=r.scrollBody?.value?typeof r.scrollBody.value==`object`?VJ({padding:r.scrollBody.value.padding===!0?s:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?s:r.scrollBody.value.margin},c):c:{padding:0,margin:0};s>0&&(document.body.style.paddingRight=typeof l.padding==`number`?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin==`number`?`${l.margin}px`:String(l.margin),document.documentElement.style.setProperty(`--scrollbar-width`,`${s}px`),document.body.style.overflow=`hidden`),NN&&(i=uP(document,`touchmove`,e=>GJ(e),{passive:!1})),Gn(()=>{n.value&&(document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`)})},{immediate:!0,flush:`sync`}),e});function UJ(e){let t=Math.random().toString(36).substring(2,7),n=HJ();n.value.set(t,e??!1);let r=B({get:()=>n.value.get(t)??!1,set:e=>n.value.set(t,e)});return eP(()=>{n.value.delete(t)}),r}function WJ(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth<e.scrollWidth||t.overflowY===`auto`&&e.clientHeight<e.scrollHeight)return!0;{let t=e.parentNode;return!(t instanceof Element)||t.tagName===`BODY`?!1:WJ(t)}}function GJ(e){let t=e||window.event,n=t.target;return n instanceof Element&&WJ(n)?!1:t.touches.length>1||(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function KJ(e){let t=E(!1);function n(){t.value=!0}function r(n){Gn(()=>{t.value=!1,e?.(n)})}return{isComposing:t,handleCompositionStart:n,handleCompositionEnd:r}}function qJ(e){let t=LJ({dir:E(`ltr`)});return B(()=>e?.value||t.dir?.value||`ltr`)}function JJ(e){let t=ss(),n=t?.type.emits,r={};return n?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),n?.forEach(t=>{r[de(se(t))]=(...n)=>e(t,...n)}),r}var YJ=0;function XJ(){gr(e=>{if(!DN)return;let t=document.querySelectorAll(`[data-reka-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,t[0]??ZJ()),document.body.insertAdjacentElement(`beforeend`,t[1]??ZJ()),YJ++,e(()=>{YJ===1&&document.querySelectorAll(`[data-reka-focus-guard]`).forEach(e=>e.remove()),YJ--})})}function ZJ(){let e=document.createElement(`span`);return e.setAttribute(`data-reka-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}function QJ(e){return B(()=>!mn(e)||!!lP(e)?.closest(`form`))}function $(){let e=ss(),t=E(),n=B(()=>r());Li(()=>{n.value!==r()&&pn(t)});function r(){return t.value&&`$el`in t.value&&[`#text`,`#comment`].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:lP(t)}let i=Object.assign({},e.exposed),a={};for(let t in e.props)Object.defineProperty(a,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(i).length>0)for(let e in i)Object.defineProperty(a,e,{enumerable:!0,configurable:!0,get:()=>i[e]});Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=a;function o(n){if(t.value=n,n&&(Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),!(n instanceof Element)&&!Object.hasOwn(n,`$el`))){let t=n.$.exposed,r=Object.assign({},a);for(let e in t)Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>t[e]});e.exposed=r}}return{forwardRef:o,currentRef:t,currentElement:n}}function $J(e){let t=ss(),n=Object.keys(t?.type.props??{}).reduce((e,n)=>{let r=(t?.type.props[n]).default;return r!==void 0&&(e[n]=r),e},{}),r=Sn(e);return B(()=>{let e={},i=t?.vnode.props??{};return Object.keys(i).forEach(t=>{e[se(t)]=i[t]}),Object.keys({...n,...e}).reduce((e,t)=>(r.value[t]!==void 0&&(e[t]=r.value[t]),e),{})})}function eY(e,t){let n=$J(e),r=t?JJ(t):{};return B(()=>({...n.value,...r}))}function tY(){let e=ss()?.vnode?.scopeId;return e?{[e]:``}:{}}function nY(e,t){let n=JN(!1,300);SN(()=>{n.value=!1});let r=E(null),i=CN();function a(){r.value=null,n.value=!1}function o(e,t){if(!t)return;let i=e.currentTarget,a={x:e.clientX,y:e.clientY},o=iY(a,rY(a,i.getBoundingClientRect()),1),s=aY(t.getBoundingClientRect()),c=sY([...o,...s]);r.value=c,n.value=!0}return gr(n=>{if(e.value&&t.value){let r=e=>o(e,t.value),i=t=>o(t,e.value);e.value.addEventListener(`pointerleave`,r),t.value.addEventListener(`pointerleave`,i),n(()=>{e.value?.removeEventListener(`pointerleave`,r),t.value?.removeEventListener(`pointerleave`,i)})}}),gr(n=>{if(r.value){let o=n=>{if(!r.value||!(n.target instanceof Element))return;let o=n.target,s={x:n.clientX,y:n.clientY},c=e.value?.contains(o)||t.value?.contains(o),l=!oY(s,r.value),u=!!o.closest(`[data-grace-area-trigger]`);c?a():(l||u)&&(a(),i.trigger())};e.value?.ownerDocument.addEventListener(`pointermove`,o),n(()=>e.value?.ownerDocument.removeEventListener(`pointermove`,o))}}),{isPointerInTransit:n,onPointerExit:i.on}}function rY(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function iY(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function aY(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function oY(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function sY(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),cY(t)}function cY(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t.at(-1),n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n.at(-1),t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var lY=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},uY=new WeakMap,dY=new WeakMap,fY={},pY=0,mY=function(e){return e&&(e.host||mY(e.parentNode))},hY=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=mY(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},gY=function(e,t,n,r){var i=hY(t,Array.isArray(e)?e:[e]);fY[n]||(fY[n]=new WeakMap);var a=fY[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(uY.get(e)||0)+1,l=(a.get(e)||0)+1;uY.set(e,c),a.set(e,l),o.push(e),c===1&&i&&dY.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),pY++,function(){o.forEach(function(e){var t=uY.get(e)-1,i=a.get(e)-1;uY.set(e,t),a.set(e,i),t||(dY.has(e)||e.removeAttribute(r),dY.delete(e)),i||e.removeAttribute(n)}),pY--,pY||(uY=new WeakMap,uY=new WeakMap,dY=new WeakMap,fY={})}},_Y=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||lY(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),gY(r,i,n,`aria-hidden`)):function(){return null}};function vY(e){let t;yr(()=>lP(e),e=>{let n=!1;try{n=!!e?.closest(`[popover]:not(:popover-open)`)}catch{}e&&!n?t=_Y(e):t&&t()}),zi(()=>{t&&t()})}var yY=0;function bY(e,t=`reka`){if(e)return e;let n,r=LJ({useId:void 0});return n=r.useId?r.useId():`useId`in jl?Qr?.():`${++yY}`,t?`${t}-${n}`:n}function xY(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}function SY(e){let t=LJ({locale:E(`en`)});return B(()=>e?.value||t.locale?.value||`en`)}function CY(e){let t=E(),n=B(()=>t.value?.width??0),r=B(()=>t.value?.height??0),i;return Fi(()=>{let n=lP(e);n?(t.value={width:n.offsetWidth,height:n.offsetHeight},i=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;let r=e[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=n.offsetWidth,a=n.offsetHeight;t.value={width:i,height:a}}),i.observe(n,{box:`border-box`})):t.value=void 0}),zi(()=>{i?.disconnect(),i=void 0}),{width:n,height:r}}function wY(e,t){let n=E(e);function r(e){return t[n.value][e]??n.value}return{state:n,dispatch:e=>{n.value=r(e)}}}function TY(e){let t=JN(``,1e3);return{search:t,handleTypeaheadSearch:(n,r)=>{if(t.value+=n,e)e(n);else{let e=kJ(),n=r.map(e=>({...e,textValue:e.value?.textValue??e.ref.textContent?.trim()??``})),i=n.find(t=>t.ref===e),a=DY(n.map(e=>e.textValue),t.value,i?.textValue),o=n.find(e=>e.textValue===a);return o&&o.ref.focus(),o?.ref}},resetTypeahead:()=>{t.value=``}}}function EY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function DY(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=EY(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function OY(e,t){let n=E({}),r=E(`none`),i=E(e),a=e.value?`mounted`:`unmounted`,o,s=t.value?.ownerDocument.defaultView??cP,{state:c,dispatch:l}=wY(a,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),u=e=>{if(DN){let n=new CustomEvent(e,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(n)}};yr(e,async(e,i)=>{let a=i!==e;if(await Gn(),a){let a=r.value,o=kY(t.value);e?(l(`MOUNT`),u(`enter`),o===`none`&&u(`after-enter`)):o===`none`||o===`undefined`||n.value?.display===`none`?(l(`UNMOUNT`),u(`leave`),u(`after-leave`)):i&&a!==o?(l(`ANIMATION_OUT`),u(`leave`)):(l(`UNMOUNT`),u(`after-leave`))}},{immediate:!0});let d=e=>{let n=kY(t.value),r=n.includes(CSS.escape(e.animationName)),a=c.value===`mounted`?`enter`:`leave`;if(e.target===t.value&&r&&(u(`after-${a}`),l(`ANIMATION_END`),!i.value)){let e=t.value.style.animationFillMode;t.value.style.animationFillMode=`forwards`,o=s?.setTimeout(()=>{t.value?.style.animationFillMode===`forwards`&&(t.value.style.animationFillMode=e)})}e.target===t.value&&n===`none`&&l(`ANIMATION_END`)},f=e=>{e.target===t.value&&(r.value=kY(t.value))},p=yr(t,(e,t)=>{e?(n.value=getComputedStyle(e),e.addEventListener(`animationstart`,f),e.addEventListener(`animationcancel`,d),e.addEventListener(`animationend`,d)):(l(`ANIMATION_END`),o!==void 0&&s?.clearTimeout(o),t?.removeEventListener(`animationstart`,f),t?.removeEventListener(`animationcancel`,d),t?.removeEventListener(`animationend`,d))},{immediate:!0}),m=yr(c,()=>{let e=kY(t.value);r.value=c.value===`mounted`?e:`none`});return zi(()=>{p(),m(),t.value&&(t.value.removeEventListener(`animationstart`,f),t.value.removeEventListener(`animationcancel`,d),t.value.removeEventListener(`animationend`,d)),o!==void 0&&s?.clearTimeout(o)}),{isPresent:B(()=>[`mounted`,`unmountSuspended`].includes(c.value))}}function kY(e){return e&&getComputedStyle(e).animationName||`none`}var AY=k({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){let{present:r,forceMount:i}=yn(e),a=E(),{isPresent:o}=OY(r,a);n({present:o});let s=t.default({present:o.value});s=NJ(s||[]);let c=ss();if(s&&s?.length>1){let e=c?.parent?.type.name?`<${c.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${e}\` for \`Presence\` component.`,``,"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",`You can apply a few solutions:`,["Provide a single child element so that `presence` directive attach correctly.",`Ensure the first child is an actual element instead of a raw text node or comment node.`].map(e=>` - ${e}`).join(`
70
+ `+t.prev}function We(e,t){var n=_e(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=De(e,i)?t(e[i],e):``}var a=typeof ne==`function`?ne(e):[],o;if(ie){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e)De(e,c)&&(n&&String(Number(c))===c&&c<e.length||ie&&o[`$`+c]instanceof Symbol||(x.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))));if(typeof ne==`function`)for(var l=0;l<a.length;l++)oe.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}})),wz=t(((e,t)=>{var n=Cz(),r=xz(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},s=function(e,t){return e?!!i(e,t):!1},c=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=c(e,t);return n&&e&&!e.next&&(e=void 0),!!n},get:function(t){return a(e,t)},has:function(t){return s(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}})),Tz=t(((e,t)=>{t.exports=Object})),Ez=t(((e,t)=>{t.exports=Error})),Dz=t(((e,t)=>{t.exports=EvalError})),Oz=t(((e,t)=>{t.exports=RangeError})),kz=t(((e,t)=>{t.exports=ReferenceError})),Az=t(((e,t)=>{t.exports=SyntaxError})),jz=t(((e,t)=>{t.exports=URIError})),Mz=t(((e,t)=>{t.exports=Math.abs})),Nz=t(((e,t)=>{t.exports=Math.floor})),Pz=t(((e,t)=>{t.exports=Math.max})),Fz=t(((e,t)=>{t.exports=Math.min})),Iz=t(((e,t)=>{t.exports=Math.pow})),Lz=t(((e,t)=>{t.exports=Math.round})),Rz=t(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),zz=t(((e,t)=>{var n=Rz();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),Bz=t(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),Vz=t(((e,t)=>{var n=Bz();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),Hz=t(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),Uz=t(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),Wz=t(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=Uz();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),Gz=t(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),Kz=t(((e,t)=>{t.exports=Tz().getPrototypeOf||null})),qz=t(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||n.apply(t)!==i)throw TypeError(`Function.prototype.bind called on incompatible `+t);for(var c=o(arguments,1),l,u=function(){if(this instanceof l){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},d=r(0,t.length-c.length),f=[],p=0;p<d;p++)f[p]=`$`+p;if(l=Function(`binder`,`return function (`+s(f,`,`)+`){ return binder.apply(this,arguments); }`)(u),t.prototype){var m=function(){};m.prototype=t.prototype,l.prototype=new m,m.prototype=null}return l}})),Jz=t(((e,t)=>{var n=qz();t.exports=Function.prototype.bind||n})),Yz=t(((e,t)=>{t.exports=Function.prototype.call})),Xz=t(((e,t)=>{t.exports=Function.prototype.apply})),Zz=t(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),Qz=t(((e,t)=>{var n=Jz(),r=Xz(),i=Yz();t.exports=Zz()||n.call(i,r)})),$z=t(((e,t)=>{var n=Jz(),r=xz(),i=Yz(),a=Qz();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),eB=t(((e,t)=>{var n=$z(),r=Vz(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`&&function(e){return s(e==null?e:o(e))}})),tB=t(((e,t)=>{var n=Gz(),r=Kz(),i=eB();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),nB=t(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=Jz().call(n,r)})),rB=t(((e,t)=>{var n,r=Tz(),i=Ez(),a=Dz(),o=Oz(),s=kz(),c=Az(),l=xz(),u=jz(),d=Mz(),f=Nz(),p=Pz(),m=Fz(),h=Iz(),g=Lz(),_=zz(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=Vz(),x=Hz(),S=function(){throw new l},ee=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}}():S,C=Wz()(),w=tB(),te=Kz(),ne=Gz(),re=Xz(),ie=Yz(),ae={},oe=typeof Uint8Array>`u`||!w?n:w(Uint8Array),se={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":C&&w?w([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":ae,"%AsyncGenerator%":ae,"%AsyncGeneratorFunction%":ae,"%AsyncIteratorPrototype%":ae,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":ae,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&w?w(w([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!C||!w?n:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!C||!w?n:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&w?w(``[Symbol.iterator]()):n,"%Symbol%":C?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":ee,"%TypedArray%":oe,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":ie,"%Function.prototype.apply%":re,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":te,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":ne};if(w)try{null.error}catch(e){se[`%Error.prototype%`]=w(w(e))}var ce=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&w&&(n=w(i.prototype))}return se[t]=n,n},le={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},ue=Jz(),de=nB(),fe=ue.call(ie,Array.prototype.concat),pe=ue.call(re,Array.prototype.splice),me=ue.call(ie,String.prototype.replace),he=ue.call(ie,String.prototype.slice),ge=ue.call(ie,RegExp.prototype.exec),_e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ve=/\\(\\)?/g,ye=function(e){var t=he(e,0,1),n=he(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return me(e,_e,function(e,t,n,i){r[r.length]=n?me(i,ve,`$1`):t||e}),r},be=function(e,t){var n=e,r;if(de(le,n)&&(r=le[n],n=`%`+r[0]+`%`),de(se,n)){var i=se[n];if(i===ae&&(i=ce(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(ge(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ye(e),r=n.length>0?n[0]:``,i=be(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],pe(n,fe([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=he(p,0,1),h=he(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,de(se,a))o=se[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=de(o,p),o=o[p];f&&!s&&(se[a]=o)}}return o}})),iB=t(((e,t)=>{var n=rB(),r=$z(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),aB=t(((e,t)=>{var n=rB(),r=iB(),i=Cz(),a=xz(),o=n(`%Map%`,!0),s=r(`Map.prototype.get`,!0),c=r(`Map.prototype.set`,!0),l=r(`Map.prototype.has`,!0),u=r(`Map.prototype.delete`,!0),d=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=u(e,t);return d(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return s(e,t)},has:function(t){return e?l(e,t):!1},set:function(t,n){e||=new o,c(e,t,n)}};return t}})),oB=t(((e,t)=>{var n=rB(),r=iB(),i=Cz(),a=aB(),o=xz(),s=n(`%WeakMap%`,!0),c=r(`WeakMap.prototype.get`,!0),l=r(`WeakMap.prototype.set`,!0),u=r(`WeakMap.prototype.has`,!0),d=r(`WeakMap.prototype.delete`,!0);t.exports=s?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(s&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return d(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?c(e,n):t&&t.get(n)},has:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?u(e,n):!!t&&t.has(n)},set:function(n,r){s&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new s,l(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a})),sB=t(((e,t)=>{var n=xz(),r=Cz(),i=wz(),a=aB(),o=oB()||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+(e&&Object(e)===e?`the given object key`:r(e)))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=o(),e.set(t,n)}};return t}})),cB=t(((e,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}})),lB=t(((e,t)=>{var n=cB(),r=sB(),i=Hz(),a=Object.prototype.hasOwnProperty,o=Array.isArray,s=r(),c=function(e,t){return s.set(e,t),e},l=function(e){return s.has(e)},u=function(e){return s.get(e)},d=function(e,t){s.set(e,t)},f=function(){for(var e=[],t=0;t<256;++t)e[e.length]=`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase();return e}(),p=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)n[i]!==void 0&&(r[r.length]=n[i]);t.obj[t.prop]=r}}},m=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},h=function(e,t,n){t===`__proto__`&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},g=function e(t,n,r){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(o(t)){var i=t.length;if(r&&typeof r.arrayLimit==`number`&&i>=r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(m(t.concat(n),r),i)}t[i]=n}else if(t&&typeof t==`object`)if(l(t)){var s=u(t)+1;t[s]=n,d(t,s)}else if(r&&r.strictMerge)return[t,n];else(r&&(r.plainObjects||r.allowPrototypes)||!a.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!=`object`){if(l(n)){for(var f=Object.keys(n),p=r&&r.plainObjects?{__proto__:null,0:t}:{0:t},g=0;g<f.length;g++){var _=parseInt(f[g],10);p[_+1]=n[f[g]]}return c(p,u(n)+1)}var v=[t].concat(n);if(r&&typeof r.arrayLimit==`number`&&v.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(m(v,r),v.length-1)}return v}var y=t;if(o(t)&&!o(n)&&(y=m(t,r)),o(t)&&o(n)){if(n.forEach(function(n,i){if(a.call(t,i)){var o=t[i];o&&typeof o==`object`&&n&&typeof n==`object`?t[i]=e(o,n,r):t[t.length]=n}else t[i]=n}),r&&typeof r.arrayLimit==`number`&&t.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(m(t,r),t.length-1)}return t}return Object.keys(n).reduce(function(t,i){var o=n[i];if(a.call(t,i)?h(t,i,e(t[i],o,r)):h(t,i,o),l(n)&&!l(t)&&c(t,u(n)),l(t)){var s=parseInt(i,10);String(s)===i&&s>=0&&s>u(t)&&d(t,s)}return t},y)},_=function(e,t){return Object.keys(t).reduce(function(e,n){return h(e,n,t[n]),e},e)},v=function(e,t,n){var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},y=1024;t.exports={arrayToObject:m,assign:_,combine:function(e,t,n,r,i){if(l(e)){if(i)throw RangeError(`Array limit exceeded. Only `+n+` element`+(n===1?``:`s`)+` allowed in an array.`);var a=u(e)+1;return e[a]=t,d(e,a),e}var o=[].concat(e,t);if(o.length>n){if(i)throw RangeError(`Array limit exceeded. Only `+n+` element`+(n===1?``:`s`)+` allowed in an array.`);return c(m(o,{plainObjects:r}),o.length-1)}return o},compact:function(e){for(var t=[{obj:{o:e},prop:`o`}],n=r(),i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],s=Object.keys(o),c=0;c<s.length;++c){var l=s[c],u=o[l];typeof u==`object`&&u&&!n.has(u)&&(t[t.length]={obj:o,prop:l},n.set(u,!0))}return p(t),e},decode:v,encode:function(e,t,r,i,a){if(e.length===0)return e;var o=e;if(typeof e==`symbol`?o=Symbol.prototype.toString.call(e):typeof e!=`string`&&(o=String(e)),r===`iso-8859-1`)return escape(o).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`});for(var s=``,c=0;c<o.length;c+=y){var l=o.length>=y?o.slice(c,c+y):o;if(c+y<o.length){var u=l.charCodeAt(l.length-1);u>=55296&&u<=56319&&(l=l.slice(0,-1),--c)}for(var d=[],p=0;p<l.length;++p){var m=l.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||a===n.RFC1738&&(m===40||m===41)){d[d.length]=l.charAt(p);continue}if(m<128){d[d.length]=f[m];continue}if(m<2048){d[d.length]=f[192|m>>6]+f[128|m&63];continue}if(m<55296||m>=57344){d[d.length]=f[224|m>>12]+f[128|m>>6&63]+f[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|l.charCodeAt(p)&1023),d[d.length]=f[240|m>>18]+f[128|m>>12&63]+f[128|m>>6&63]+f[128|m&63]}s+=d.join(``)}return s},isBuffer:function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:l,isRegExp:function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},markOverflow:c,maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n[n.length]=t(e[r]);return n}return t(e)},merge:g}})),uB=t(((e,t)=>{var n=sB(),r=lB(),i=cB(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,ee,C,w){for(var te=t,ne=w,re=0,ie=!1;(ne=ne.get(m))!==void 0&&!ie;){var ae=ne.get(t);if(re+=1,ae!==void 0){if(ae===re)throw RangeError(`Cyclic object value`);ie=!0}ne.get(m)===void 0&&(re=0)}if(typeof _==`function`?te=_(i,te):te instanceof Date?te=b(te):a===`comma`&&s(te)&&(te=r.maybeMap(te,function(e){return e instanceof Date?b(e):e})),te===null){if(u)return S(g&&!ee?g(i,f.encoder,C,`key`,x):i);te=``}if(p(te)||r.isBuffer(te))return g?[S(ee?i:g(i,f.encoder,C,`key`,x))+`=`+S(g(te,f.encoder,C,`value`,x))]:[S(i)+`=`+S(String(te))];var oe=[];if(te===void 0)return oe;var se;if(a===`comma`&&s(te))ee&&g&&(te=r.maybeMap(te,function(e){return e==null?e:g(e)})),se=[{value:te.length>0?te.join(`,`)||null:void 0}];else if(s(_))se=_;else{var ce=Object.keys(te);se=v?ce.sort(v):ce}var le=h?String(i).replace(/\./g,`%2E`):String(i),ue=o&&s(te)&&te.length===1?le+`[]`:le;if(c&&s(te)&&te.length===0)return ue+`[]`;for(var de=0;de<se.length;++de){var fe=se[de],pe=typeof fe==`object`&&fe&&fe.value!==void 0?fe.value:te[fe];if(!(d&&pe===null)){var me=y&&h?String(fe).replace(/\./g,`%2E`):String(fe),he=s(te)?typeof a==`function`?a(ue,me):ue:ue+(y?`.`+me:`[`+me+`]`);w.set(t,re);var ge=n();ge.set(m,w),l(oe,e(pe,he,a,o,c,u,d,h,a===`comma`&&ee&&s(te)?null:g,_,v,y,b,x,S,ee,C,ge))}}return oe},g=function(e){if(!e)return f;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||f.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=i.default;if(e.format!==void 0){if(!a.call(i.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r=i.formatters[n],c=f.filter;(typeof e.filter==`function`||s(e.filter))&&(c=e.filter);var l=e.arrayFormat in o?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:f.arrayFormat;if(`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=e.allowDots===void 0?e.encodeDotInKeys===!0||f.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?f.delimiter:e.delimiter,encode:typeof e.encode==`boolean`?e.encode:f.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:f.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:f.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:f.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:f.strictNullHandling}};t.exports=function(e,t){var r=e,i=g(t),a,c;typeof i.filter==`function`?(c=i.filter,r=c(``,r)):s(i.filter)&&(c=i.filter,a=c);var u=[];if(typeof r!=`object`||!r)return``;var d=o[i.arrayFormat],f=d===`comma`&&i.commaRoundTrip;a||=Object.keys(r),i.sort&&a.sort(i.sort);for(var p=n(),m=0;m<a.length;++m){var _=a[m];if(_!=null){var v=r[_];i.skipNulls&&v===null||l(u,h(v,_,d,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p))}}var y=u.join(i.delimiter),b=i.addQueryPrefix===!0?`?`:``;return i.charsetSentinel&&(i.charset===`iso-8859-1`?b+=`utf8=%26%2310003%3B`+i.delimiter:b+=`utf8=%E2%9C%93`+i.delimiter),y.length>0?b+y:``}})),dB=t(((e,t)=>{var n=lB(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n,r){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1){if(r&&t.throwOnLimitExceeded)for(var i=0,a=e.indexOf(`,`);a>-1;){if(i+=1,i>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);a=e.indexOf(`,`,a+1)}return e.split(`,`)}if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded&&f!==void 0?f+1:f);if(t.throwOnLimitExceeded&&f!==void 0&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h<p.length;++h)p[h].indexOf(`utf8=`)===0&&(p[h]===l?g=`utf-8`:p[h]===c&&(g=`iso-8859-1`),m=h,h=p.length);for(h=0;h<p.length;++h)if(h!==m){var _=p[h],v=_.indexOf(`]=`),y=v===-1?_.indexOf(`=`):v+1,b,x;if(y===-1?(b=t.decoder(_,a.decoder,g,`key`),x=t.strictNullHandling?null:``):(b=t.decoder(_.slice(0,y),a.decoder,g,`key`),b!==null&&(x=n.maybeMap(s(_.slice(y+1),t,i(u[b])?u[b].length:0,_.indexOf(`[]=`)===-1),function(e){return t.decoder(e,a.decoder,g,`value`)}))),x&&t.interpretNumericEntities&&g===`iso-8859-1`&&(x=o(String(x))),_.indexOf(`[]=`)>-1&&(x=i(x)?[x]:x),t.comma&&i(x)&&x.length>t.arrayLimit&&(x=n.combine([],x,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded)),b!==null){var S=r.call(u,b);S&&(t.duplicates===`combine`||_.indexOf(`[]=`)>-1)?u[b]=n.combine(u[b],x,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded):(!S||t.duplicates===`last`)&&(u[b]=x)}}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=n.isOverflow(c)?c:r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c,r.arrayLimit,r.plainObjects,r.throwOnLimitExceeded);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10),h=!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays;if(!r.parseArrays&&p===``)u={0:c};else if(h&&m<r.arrayLimit)u=[],u[m]=c;else if(h&&r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);else h?(u[m]=c,n.markOverflow(u,m)):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t){var n=t.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e;if(t.depth<=0)return!t.plainObjects&&r.call(Object.prototype,n)&&!t.allowPrototypes?void 0:[n];var i=[],a=n.indexOf(`[`),o=a>=0?n.slice(0,a):n;if(o){if(!t.plainObjects&&r.call(Object.prototype,o)&&!t.allowPrototypes)return;i[i.length]=o}for(var s=n.length,c=a,l=0;c>=0&&l<t.depth;){for(var u=1,d=c+1,f=-1;d<s&&f<0;){var p=n.charCodeAt(d);p===91?u+=1:p===93&&(--u,u===0&&(f=d)),d+=1}if(f<0)return i[i.length]=`[`+n.slice(c)+`]`,i;var m=n.slice(c,f+1),h=m.slice(1,-1);if(!t.plainObjects&&r.call(Object.prototype,h)&&!t.allowPrototypes)return;i[i.length]=m,l+=1,c=n.indexOf(`[`,f+1)}if(c>=0){if(t.strictDepth===!0)throw RangeError(`Input depth exceeded depth option of `+t.depth+` and strictDepth is true`);i[i.length]=`[`+n.slice(c)+`]`}return i},p=function(e,t,n,r){if(e){var i=f(e,n);if(i)return d(i,t,n,r)}},m=function(e){if(!e)return a;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.decodeDotInKeys!==void 0&&typeof e.decodeDotInKeys!=`boolean`)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!=`function`)throw TypeError(`Decoder has to be a function.`);if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);if(e.throwOnLimitExceeded!==void 0&&typeof e.throwOnLimitExceeded!=`boolean`)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=e.charset===void 0?a.charset:e.charset,r=e.duplicates===void 0?a.duplicates:e.duplicates;if(r!==`combine`&&r!==`first`&&r!==`last`)throw TypeError(`The duplicates option must be either combine, first, or last`);return{allowDots:e.allowDots===void 0?e.decodeDotInKeys===!0||a.allowDots:!!e.allowDots,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes==`boolean`?e.allowPrototypes:a.allowPrototypes,allowSparse:typeof e.allowSparse==`boolean`?e.allowSparse:a.allowSparse,arrayLimit:typeof e.arrayLimit==`number`?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:a.charsetSentinel,comma:typeof e.comma==`boolean`?e.comma:a.comma,decodeDotInKeys:typeof e.decodeDotInKeys==`boolean`?e.decodeDotInKeys:a.decodeDotInKeys,decoder:typeof e.decoder==`function`?e.decoder:a.decoder,delimiter:typeof e.delimiter==`string`||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:typeof e.depth==`number`||e.depth===!1?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities==`boolean`?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==`number`?e.parameterLimit:a.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects==`boolean`?e.plainObjects:a.plainObjects,strictDepth:typeof e.strictDepth==`boolean`?!!e.strictDepth:a.strictDepth,strictMerge:typeof e.strictMerge==`boolean`?!!e.strictMerge:a.strictMerge,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded==`boolean`&&e.throwOnLimitExceeded}};t.exports=function(e,t){var r=m(t);if(e===``||e==null)return r.plainObjects?{__proto__:null}:{};for(var i=typeof e==`string`?u(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),s=0;s<o.length;++s){var c=o[s],l=p(c,i[c],r,typeof e==`string`);a=n.merge(a,l,r)}return r.allowSparse===!0?a:n.compact(a)}})),fB=t(((e,t)=>{var n=uB(),r=dB();t.exports={formats:cB(),parse:r,stringify:n}}))(),pB=`codec`,mB=`$root`,hB=`url-expression`;function gB(e){let t=[];return e.fields.value.length>0&&t.push(uI.FIELDS),e.filters.value.length>0&&t.push(uI.FILTERS),(e.pagination.limit!==void 0||e.pagination.offset!==void 0)&&t.push(uI.PAGINATION),e.relations.value.length>0&&t.push(uI.RELATIONS),e.sorts.value.length>0&&t.push(uI.SORTS),t}function _B(e,t){if(t===void 0)return e;let n=t.map(e=>fI(e));return e.filter(e=>n.includes(fI(e)))}function vB(e,t){let n=fI(t);return e.map(e=>fI(e)).includes(n)}function yB(e){return e.schema!==void 0||e.strict!==void 0}function bB(e){let t=!1,n=e.value.map(e=>e.condition===void 0?e:(t=!0,new xI(e.name,e.operator)));return t?new lL(n):e}function xB(e){let t=bB(e.fields);return t===e.fields?e:new BL({fields:t,filters:e.filters,pagination:e.pagination,relations:e.relations,sorts:e.sorts})}function SB(e){return(0,fB.parse)(e.charAt(0)===`?`?e.substring(1):e)}var CB=[[`fields`,uI.FIELDS],[`filter`,uI.FILTERS],[`page`,uI.PAGINATION],[`include`,uI.RELATIONS],[`sort`,uI.SORTS]];function wB(e){if(!ZF(e)||!$F(e,`$root`))return e;let{[mB]:t,...n}=e;if(!$F(n,`__DEFAULT__`))return{[dI]:t,...n};let r=e=>Array.isArray(e)?e:[e];return{...n,[dI]:[...r(n[dI]),...r(t)]}}var TB=class{parser;constructor(e){this.parser=e}decode(e,t={}){let n=this.prepare(e);return n?this.parser.parse(n,t):null}async decodeAsync(e,t={}){let n=this.prepare(e);return n?this.parser.parseAsync(n,t):null}decodeFields(e,t={}){let n=SB(e);return ZF(n)?$F(n,`fields`)?this.parser.parseFields(wB(n.fields),t):this.parser.parseFields(wB(n),t):null}decodeFilters(e,t={}){let n=SB(e);return ZF(n)?$F(n,`filter`)?this.parser.parseFilters(n.filter,t):this.parser.parseFilters(this.filtersFallback(n),t):null}async decodeFiltersAsync(e,t={}){let n=SB(e);return ZF(n)?$F(n,`filter`)?this.parser.parseFiltersAsync(n.filter,t):this.parser.parseFiltersAsync(this.filtersFallback(n),t):null}decodePagination(e,t={}){let n=SB(e);return ZF(n)?$F(n,`page`)?this.parser.parsePagination(n.page,t):this.parser.parsePagination(n,t):null}decodeRelations(e,t={}){let n=SB(e);return ZF(n)?$F(n,`include`)?this.parser.parseRelations(n.include,t):this.parser.parseRelations(n,t):null}decodeSorts(e,t={}){let n=SB(e);return ZF(n)?$F(n,`sort`)?this.parser.parseSorts(n.sort,t):this.parser.parseSorts(n,t):null}filtersFallback(e){return e}prepare(e){let t=typeof e==`string`?SB(e):e;if(!ZF(t))return null;let n={};for(let[e,r]of CB)$F(t,e)&&(n[r]=r===uI.FIELDS?wB(t[e]):t[e]);return n}},EB=class extends TB{constructor(e){super(new bz(e))}filtersFallback(){}},DB=new Set(Object.keys(fz)),OB=RegExp(`^(?:${pz})$`);function kB(e){return e.value.length===0?null:e.value.length===1&&_L(e.value[0])&&(e.operator===CI.AND||e.operator===CI.OR)?jB(e.value[0],!1):AB(e,!1)}function AB(e,t){if(e.value.length===0)throw hI.featureUnsupported(`filters:compound:empty`);let n=e.value.map(e=>jB(e,t));switch(e.operator){case CI.AND:case CI.OR:return`${e.operator}(${n.join(`,`)})`;case CI.NOT:return n.length===1?`not(${n[0]})`:`not(and(${n.join(`,`)}))`;default:throw hI.operatorUnsupported(e.operator)}}function jB(e,t){if(uL(e))return AB(e,t);if(!_L(e))throw hI.featureUnsupported(`filters:condition`);let n=MB(e.field,t);switch(e.operator){case SI.EQUAL:return`eq(${n},${NB(e.value)})`;case SI.NOT_EQUAL:return`not(eq(${n},${NB(e.value)}))`;case SI.LESS_THAN:return`lt(${n},${NB(e.value)})`;case SI.LESS_THAN_EQUAL:return`lte(${n},${NB(e.value)})`;case SI.GREATER_THAN:return`gt(${n},${NB(e.value)})`;case SI.GREATER_THAN_EQUAL:return`gte(${n},${NB(e.value)})`;case SI.IN:return`in(${n}${FB(e.value)})`;case SI.NOT_IN:return`nin(${n}${FB(e.value)})`;case SI.CONTAINS:return`contains(${n},${IB(e.value)})`;case SI.NOT_CONTAINS:return`not(contains(${n},${IB(e.value)}))`;case SI.STARTS_WITH:return`startsWith(${n},${IB(e.value)})`;case SI.NOT_STARTS_WITH:return`not(startsWith(${n},${IB(e.value)}))`;case SI.ENDS_WITH:return`endsWith(${n},${IB(e.value)})`;case SI.NOT_ENDS_WITH:return`not(endsWith(${n},${IB(e.value)}))`;case SI.ELEM_MATCH:{let t=e.value;if(!_L(t)&&!uL(t))throw hI.featureUnsupported(`filters:elemMatch:value`);return`elemMatch(${n},${jB(t,!0)})`}case SI.SIZE:if(typeof e.value!=`number`||!Number.isInteger(e.value)||e.value<0)throw hI.featureUnsupported(`filters:size:value`);return`size(${n},${NB(e.value)})`;default:throw hI.operatorUnsupported(e.operator)}}function MB(e,t){if(e===`$this`){if(!t)throw hI.featureUnsupported(`filters:field:${e}`);return e}let n=e.split(`.`);for(let t of n)if(!OB.test(t)||DB.has(t))throw hI.featureUnsupported(`filters:field:${e}`);return e}function NB(e){if(e==null)return`null`;if(typeof e==`string`){let t=JR(e);if(!(typeof t==`string`?t===e:t!==null&&`${t}`===e))throw hI.featureUnsupported(`filters:value:text`);return PB(e)}if(typeof e==`number`){if(Number.isNaN(e))throw hI.featureUnsupported(`filters:value:number`);return PB(`${e}`)}if(typeof e==`boolean`)return PB(`${e}`);throw hI.featureUnsupported(`filters:value:type`)}function PB(e){return`'${e.replace(/'/g,`''`)}'`}function FB(e){return(Array.isArray(e)?e:[e]).map(e=>`,${NB(e)}`).join(``)}function IB(e){return PB(typeof e==`string`?e:`${e}`)}var LB=class extends TB{constructor(e){super(new uz(e))}};function RB(e){return e.reduce((e,t)=>e===``?t:`${e}[${t}]`,``)}function zB(e,t={}){let n=t.prefixParts||[],r=[];if(Array.isArray(e)){if(n.length===0)return``;let t=RB(n),i=e.map(e=>`${e}`).filter(Boolean).join(`,`);r.push(`${encodeURIComponent(t)}=${encodeURIComponent(i)}`)}if(ZF(e)){let i=Object.keys(e);if(i.length===0)return``;for(let a of i){let i=e[a];if(ZF(i)){r.push(zB(i,{...t,prefixParts:[...n,a]}));continue}if(Array.isArray(i)){r.push(zB(i,{...t,prefixParts:[...n,a]}));continue}if(i??=`null`,i!==``){let e=RB([...n,a]);r.push(`${encodeURIComponent(e)}=${encodeURIComponent(i)}`)}}}return r.filter(e=>e!==``).join(`&`)}var BB=class{prefix;value;constructor(e){this.prefix=e,this.value=[]}reset(){this.value=[]}add(e){this.value.push(e)}serialize(){return this.value.length===0?null:zB(this.value,{prefixParts:[...this.prefix?[this.prefix]:[]]})}},VB=class{prefix;value;constructor(e){this.prefix=e,this.value={}}reset(){this.value={}}set(e,t){this.value[e]=t}has(e){return Object.prototype.hasOwnProperty.call(this.value,e)}serialize(){return Object.keys(this.value).length===0?null:zB(this.value,{prefixParts:[...this.prefix?[this.prefix]:[]]})}},HB=class{prefix;value;constructor(e){this.prefix=e,this.value={}}reset(){this.value={}}add(e,t){this.value[e]||(this.value[e]=[]),this.value[e].push(t)}serialize(){let e=Object.keys(this.value);if(e.length===0)return null;if(e.length===1&&e[0]===`__DEFAULT__`)return zB(this.value[dI],{prefixParts:[...this.prefix?[this.prefix]:[]]});let{[dI]:t,...n}=this.value;return zB(t===void 0?n:{[mB]:t,...n},{prefixParts:[...this.prefix?[this.prefix]:[]]})}},UB=class{fields;filters;pagination;relations;sorts;constructor(){this.fields=new HB(`fields`),this.filters=new VB(`filter`),this.pagination=new VB(`page`),this.relations=new BB(`include`),this.sorts=new BB(`sort`)}reset(){this.fields.reset(),this.filters.reset(),this.pagination.reset(),this.relations.reset(),this.sorts.reset()}serialize(){let e=[this.fields.serialize(),this.filters.serialize(),this.pagination.serialize(),this.relations.serialize(),this.sorts.serialize()].filter(Boolean).join(`&`);return e.length===0?null:e}},WB=class{serializer;constructor(e){this.serializer=e||new HB(`fields`)}visitFields(e){for(let t of e.value)t.accept(this);return this.serializer}visitField(e){if(e.condition!==void 0)throw hI.featureUnsupported(`fields:condition`);let t=aI(e.name);return this.serializer.add(t.path||`__DEFAULT__`,e.operator?e.operator+t.name:t.name),this.serializer}},GB=class{serializer;constructor(e){this.serializer=e||new VB(`filter`)}visitFilters(e){if(e.operator===CI.OR&&e.value.length>1)throw hI.featureUnsupported(`filters:or`);if(e.operator!==CI.AND&&e.operator!==CI.OR)throw hI.featureUnsupported(`filters:${e.operator}`);for(let t of e.value){if(uL(t))throw hI.featureUnsupported(`filters:compound`);if(_L(t)){t.accept(this);continue}throw hI.conditionDetached(t.operator)}return this.serializer}visitFilter(e){if(this.serializer.has(e.field))throw hI.featureUnsupported(`filters:field:duplicate`);return this.serializer.set(e.field,az(e)),this.serializer}},KB=class{serializer;constructor(e){this.serializer=e||new VB(`page`)}visitPagination(e){if(e.limit!==void 0){if(!Number.isInteger(e.limit)||e.limit<=0)throw hI.featureUnsupported(`pagination:limit`);this.serializer.set(`limit`,e.limit)}if(e.offset!==void 0){if(!Number.isInteger(e.offset)||e.offset<0)throw hI.featureUnsupported(`pagination:offset`);e.offset>0&&this.serializer.set(`offset`,e.offset)}return this.serializer}},qB=class{serializer;constructor(e){this.serializer=e||new BB(`include`)}visitRelations(e){for(let t of e.value)t.accept(this);return this.serializer}visitRelation(e){return this.serializer.add(e.name),this.serializer}},JB=class{serializer;constructor(e){this.serializer=e||new BB(`sort`)}visitSorts(e){for(let t of e.value)t.accept(this);return this.serializer}visitSort(e){return e.operator===WI.DESC?this.serializer.add(`-${e.name}`):this.serializer.add(e.name),this.serializer}},YB=class{serializer;fields;filters;pagination;relations;sorts;constructor(){let e=new UB;this.serializer=e,this.fields=new WB(e.fields),this.filters=new GB(e.filters),this.pagination=new KB(e.pagination),this.relations=new qB(e.relations),this.sorts=new JB(e.sorts)}reset(){this.serializer.reset()}visitQuery(e,t){return(!t||t.includes(uI.FIELDS))&&e.fields.accept(this.fields),(!t||t.includes(uI.FILTERS))&&e.filters.accept(this.filters),(!t||t.includes(uI.PAGINATION))&&e.pagination.accept(this.pagination),(!t||t.includes(uI.RELATIONS))&&e.relations.accept(this.relations),(!t||vB(t,uI.SORTS))&&e.sorts.accept(this.sorts),this.serializer}visitFields(e){return e.accept(this.fields)}visitField(e){return e.accept(this.fields)}visitFilter(e){return e.accept(this.filters)}visitFilters(e){return e.accept(this.filters)}visitPagination(e){return e.accept(this.pagination)}visitRelation(e){return e.accept(this.relations)}visitRelations(e){return e.accept(this.relations)}visitSort(e){return e.accept(this.sorts)}visitSorts(e){return e.accept(this.sorts)}},XB=class{visitor;decoder;constructor(e,t={}){this.visitor=new YB,this.decoder=t.decoder||new LB(e)}encode(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitQuery(e,t.parameters));if(n===null||!yB(t))return n;let r=_B(gB(e),t.parameters),i=this.decoder.decode(n,{...t,parameters:r});return i?(this.visitor.reset(),this.runSerializer(this.visitor.visitQuery(xB(i),r))):null}async encodeAsync(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitQuery(e,t.parameters));if(n===null||!yB(t))return n;let r=_B(gB(e),t.parameters),i=await this.decoder.decodeAsync(n,{...t,parameters:r});return i?(this.visitor.reset(),this.runSerializer(this.visitor.visitQuery(xB(i),r))):null}encodeFields(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitFields(e));if(n===null||!yB(t))return n;let r=this.decoder.decodeFields(n,t);return r?(this.visitor.reset(),this.runSerializer(this.visitor.visitFields(bB(r)))):null}encodeField(e){return this.visitor.reset(),this.runSerializer(this.visitor.visitField(e))}encodeFilters(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitFilters(e));if(n===null||!yB(t))return n;let r=this.decoder.decodeFilters(n,t);return r?(this.visitor.reset(),this.runSerializer(this.visitor.visitFilters(r))):null}async encodeFiltersAsync(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitFilters(e));if(n===null||!yB(t))return n;let r=await this.decoder.decodeFiltersAsync(n,t);return r?(this.visitor.reset(),this.runSerializer(this.visitor.visitFilters(r))):null}encodeFilter(e){return this.visitor.reset(),this.runSerializer(this.visitor.visitFilter(e))}encodePagination(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitPagination(e));if(n===null||!yB(t))return n;let r=this.decoder.decodePagination(n,t);return r?(this.visitor.reset(),this.runSerializer(this.visitor.visitPagination(r))):null}encodeRelations(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitRelations(e));if(n===null||!yB(t))return n;let r=this.decoder.decodeRelations(n,t);return r?(this.visitor.reset(),this.runSerializer(this.visitor.visitRelations(r))):null}encodeSorts(e,t={}){this.visitor.reset();let n=this.runSerializer(this.visitor.visitSorts(e));if(n===null||!yB(t))return n;let r=this.decoder.decodeSorts(n,t);return r?(this.visitor.reset(),this.runSerializer(this.visitor.visitSorts(r))):null}runSerializer(e){let t=e.serialize();return e.reset(),t}},ZB=class{simple;decoder;constructor(e,t={}){this.simple=t.simple||new XB(e),this.decoder=t.decoder||new EB(e)}encode(e,t={}){let n=this.encodeParts(e,t.parameters);if(n===null||!yB(t))return n;let r=_B(gB(e),t.parameters),i=this.decoder.decode(n,{...t,parameters:r});return i?this.encodeParts(xB(i),r):null}async encodeAsync(e,t={}){let n=this.encodeParts(e,t.parameters);if(n===null||!yB(t))return n;let r=_B(gB(e),t.parameters),i=await this.decoder.decodeAsync(n,{...t,parameters:r});return i?this.encodeParts(xB(i),r):null}encodeFields(e,t={}){return this.simple.encodeFields(e,t)}encodeFilters(e,t={}){let n=this.serializeFilters(e);if(n===null||!yB(t))return n;let r=this.decoder.decodeFilters(n,t);return r?this.serializeFilters(r):null}async encodeFiltersAsync(e,t={}){let n=this.serializeFilters(e);if(n===null||!yB(t))return n;let r=await this.decoder.decodeFiltersAsync(n,t);return r?this.serializeFilters(r):null}encodePagination(e,t={}){return this.simple.encodePagination(e,t)}encodeRelations(e,t={}){return this.simple.encodeRelations(e,t)}encodeSorts(e,t={}){return this.simple.encodeSorts(e,t)}encodeParts(e,t){let n=[!t||t.includes(uI.FIELDS)?this.simple.encodeFields(e.fields):null,!t||t.includes(uI.FILTERS)?this.serializeFilters(e.filters):null,!t||t.includes(uI.PAGINATION)?this.simple.encodePagination(e.pagination):null,!t||t.includes(uI.RELATIONS)?this.simple.encodeRelations(e.relations):null,!t||vB(t,uI.SORTS)?this.simple.encodeSorts(e.sorts):null].filter(Boolean);return n.length===0?null:n.join(`&`)}serializeFilters(e){let t=kB(e);return t===null?null:`filter=${encodeURIComponent(t)}`}},QB=`url-simple`,$B=class{items;defaultName;constructor(){this.items=new Map}register(e,t){this.items.set(e.name,e),(t||this.defaultName===void 0)&&(this.defaultName=e.name)}encode(e,t={}){let{codec:n,stamp:r,...i}=t,a=this.resolve(n),o=a.encoder.encode(e,i);return this.stampEncoded(a,o,r)}async encodeAsync(e,t={}){let{codec:n,stamp:r,...i}=t,a=this.resolve(n),o=a.encoder.encodeAsync?await a.encoder.encodeAsync(e,i):a.encoder.encode(e,i);return this.stampEncoded(a,o,r)}decode(e,t={}){let n=this.prepareDecode(e);return n?n.codec.decoder.decode(n.payload,t):null}async decodeAsync(e,t={}){let n=this.prepareDecode(e);return n?n.codec.decoder.decodeAsync?n.codec.decoder.decodeAsync(n.payload,t):n.codec.decoder.decode(n.payload,t):null}prepareDecode(e){let t=typeof e==`string`?SB(e):e;if(!ZF(t))return null;let n,r=t[pB];if(r!==void 0&&r!==``){if(typeof r!=`string`)throw _I.notResolvable();n=r}let{[pB]:i,...a}=t;if(n===void 0){for(let e of this.items.values())if(e.detect&&e.detect(a))return{codec:e,payload:a}}return{codec:this.resolve(n),payload:a}}stampEncoded(e,t,n){return t===null||n===!1?t:`${pB}=${e.name}&${t}`}resolve(e){let t=e??this.defaultName;if(t===void 0)throw _I.notResolvable();let n=this.items.get(t);if(n===void 0)throw _I.notResolvable(t);return n}};function eV(e){let t=e.filter;return typeof t==`string`?t!==``:Array.isArray(t)&&t.length>0&&t.every(e=>typeof e==`string`&&e!==``)}function tV(e){return e.filter!==void 0&&!eV(e)}function nV(e){let t=new $B,n=new LB(e),r=new XB(e,{decoder:n}),i=new EB(e),a=new ZB(e,{simple:r,decoder:i});return t.register({name:QB,encoder:r,decoder:n,detect:tV}),t.register({name:hB,encoder:a,decoder:i,detect:eV},!0),t}var rV=nV();function iV(e){if(!e)return``;let t=zL(e)?e:sR(e),n=rV.encode(t);return n?`?${n}`:``}function aV(e){return e.includes(`://`)?e.split(`://`).map(e=>aV(e)).join(`://`):e.replace(/\/+/g,`/`)}function oV(e){let t={...e},n=Object.keys(t);for(let e of n)t[e]===``&&(t[e]=null);return t}function sV(e){if(!uE(e))return!1;let t=e;return typeof t.getBaseURL==`function`&&typeof t.get==`function`&&typeof t.post==`function`&&typeof t.put==`function`&&typeof t.delete==`function`}var cV=class{client;constructor(e={}){this.client=sV(e.client)?e.client:XF(e.client)}},lV=class extends cV{async getMany(e){return(await this.client.get(`clients${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`clients/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`clients/${e}`)).data}async create(e){return(await this.client.post(`clients`,oV(e))).data}async update(e,t){return(await this.client.post(`clients/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`clients/${e}`,oV(t))).data}},uV=class extends cV{async getMany(e){return(await this.client.get(`client-permissions${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`client-permissions/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`client-permissions/${e}`)).data}async create(e){return(await this.client.post(`client-permissions`,e)).data}async update(e,t){return(await this.client.post(`client-permissions/${e}`,t)).data}},dV=class extends cV{async getMany(e={}){return(await this.client.get(`client-roles${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`client-roles/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`client-roles/${e}`)).data}async create(e){return(await this.client.post(`client-roles`,e)).data}},fV=class extends cV{async getMany(e){return(await this.client.get(`client-scopes${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`client-scopes/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`client-scopes/${e}`)).data}async create(e){return(await this.client.post(`client-scopes`,e)).data}},pV=class extends cV{async getMany(e){return(await this.client.get(`consents${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`consents/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`consents/${e}`)).data}},mV=class extends cV{async getMany(e){return(await this.client.get(`events${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`events/${e}${iV(t)}`)).data}},hV=class extends cV{getAuthorizeUri(e){return aV(`${this.client.getBaseURL()}/${vte(e)}`)}async createLinkRequest(e){return(await this.client.post(`identity-providers/${e}/link-request`)).data}async confirmLinkRequest(e,t){let n={handle:t};return(await this.client.post(`identity-providers/${e}/link-confirm`,n)).data}async getMany(e){return(await this.client.get(`identity-providers${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`identity-providers/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`identity-providers/${e}`)).data}async create(e){return(await this.client.post(`identity-providers`,oV(e))).data}async update(e,t){return(await this.client.post(`identity-providers/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`identity-providers/${e}`,oV(t))).data}},gV=class extends cV{async getMany(e){return(await this.client.get(`identity-provider-accounts${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`identity-provider-accounts/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`identity-provider-accounts/${e}`)).data}},_V=class extends cV{async getMany(e){return(await this.client.get(`identity-provider-role-mappings${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`identity-provider-role-mappings/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`identity-provider-role-mappings/${e}`)).data}async create(e){return(await this.client.post(`identity-provider-role-mappings`,oV(e))).data}async update(e,t){return(await this.client.post(`identity-provider-role-mappings/${e}`,t)).data}},vV=class extends cV{async getMany(e){return(await this.client.get(`keys${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`keys/${e}${iV(t)}`)).data}async create(e){return(await this.client.post(`keys`,oV(e))).data}async update(e,t){return(await this.client.post(`keys/${e}`,oV(t))).data}async delete(e,t){return(await this.client.delete(`keys/${e}${t&&t.force?`?force=true`:``}`)).data}},yV=class extends cV{async getMany(e){return(await this.client.get(`policies${iV(e)}`)).data}async delete(e){return(await this.client.delete(`policies/${e}`)).data}async getOne(e,t){return(await this.client.get(`policies/${e}${iV(t)}`)).data}async getOneExpanded(e,t){return(await this.client.get(`policies/${e}/expanded${iV(t)}`)).data}async create(e){return(await this.client.post(`policies`,oV(e))).data}async createBuiltIn(e){return this.create(e)}async update(e,t){return(await this.client.post(`policies/${e}`,oV(t))).data}async updateBuiltIn(e,t){return this.update(e,t)}async createOrUpdate(e,t){return(await this.client.put(`policies/${e}`,oV(t))).data}async createOrUpdateBuiltin(e,t){return this.createOrUpdate(e,t)}async check(e,t={}){return(await this.client.post(`policies/${e}/check`,oV(t))).data}},bV=class extends cV{async getMany(e){return(await this.client.get(`permissions${iV(e)}`)).data}async delete(e){return(await this.client.delete(`permissions/${e}`)).data}async getOne(e,t){return(await this.client.get(`permissions/${e}${iV(t)}`)).data}async create(e){return(await this.client.post(`permissions`,oV(e))).data}async update(e,t){return(await this.client.post(`permissions/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`permissions/${e}`,oV(t))).data}async check(e,t={}){return(await this.client.post(`permissions/${e}/check`,oV(t))).data}},xV=class extends cV{async getMany(e){return(await this.client.get(`permission-policies${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`permission-policies/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`permission-policies/${e}`)).data}async create(e){return(await this.client.post(`permission-policies`,e)).data}},SV=class extends cV{async getMany(e){return(await this.client.get(`realms${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`realms/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`realms/${e}`)).data}async create(e){return(await this.client.post(`realms`,oV(e))).data}async update(e,t){return(await this.client.post(`realms/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`realms/${e}`,oV(t))).data}},CV=class extends cV{async getMany(e){return(await this.client.get(`roles${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`roles/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`roles/${e}`)).data}async create(e){return(await this.client.post(`roles`,oV(e))).data}async update(e,t){return(await this.client.post(`roles/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`roles/${e}`,oV(t))).data}},wV=class extends cV{async getMany(e){return(await this.client.get(`role-attributes${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`role-attributes/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`role-attributes/${e}`)).data}async create(e){return(await this.client.post(`role-attributes`,oV(e))).data}async update(e,t){return(await this.client.post(`role-attributes/${e}`,oV(t))).data}},TV=class extends cV{async getMany(e){return(await this.client.get(`role-permissions${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`role-permissions/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`role-permissions/${e}`)).data}async create(e){return(await this.client.post(`role-permissions`,e)).data}async update(e,t){return(await this.client.post(`role-permissions/${e}`,t)).data}},EV=class extends cV{async getMany(e){return(await this.client.get(`scopes${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`scopes/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`scopes/${e}`)).data}async create(e){return(await this.client.post(`scopes`,oV(e))).data}async update(e,t){return(await this.client.post(`scopes/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`scopes/${e}`,oV(t))).data}},DV=class extends cV{async getMany(e){return(await this.client.get(`sessions${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`sessions/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`sessions/${e}`)).data}async deleteMany(e){return(await this.client.delete(`sessions${iV(e)}`)).data}},OV=class extends cV{async getMany(e){return(await this.client.get(`session-tokens${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`session-tokens/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`session-tokens/${e}`)).data}async deleteMany(e){return(await this.client.delete(`session-tokens${iV(e)}`)).data}},kV=class extends cV{async getMany(e){return(await this.client.get(`trust-anchors${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`trust-anchors/${e}${iV(t)}`)).data}async create(e){return(await this.client.post(`trust-anchors`,oV(e))).data}async update(e,t){return(await this.client.post(`trust-anchors/${e}`,oV(t))).data}async delete(e){return(await this.client.delete(`trust-anchors/${e}`)).data}},AV=class extends cV{async getMany(e){return(await this.client.get(`users${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`users/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`users/${e}`)).data}async create(e){return(await this.client.post(`users`,oV(e))).data}async update(e,t){return(await this.client.post(`users/${e}`,oV(t))).data}async createOrUpdate(e,t){return(await this.client.put(`users/${e}`,oV(t))).data}async activate(e){return(await this.client.post(`activate`,{token:e})).data}async register(e){return(await this.client.post(`register`,oV(e))).data}async passwordForgot(e){return(await this.client.post(`password-forgot`,oV(e))).data}async passwordReset(e){return(await this.client.post(`password-reset`,oV(e))).data}},jV=class extends cV{async getMany(e){return(await this.client.get(`user-attributes${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`user-attributes/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`user-attributes/${e}`)).data}async create(e){return(await this.client.post(`user-attributes`,oV(e))).data}async update(e,t){return(await this.client.post(`user-attributes/${e}`,oV(t))).data}},MV=class extends cV{async getMany(e,t){return(await this.client.get(`users/${e}/authenticators${iV(t)}`)).data}async getOne(e,t){return(await this.client.get(`users/${e}/authenticators/${t}`)).data}async enroll(e,t){return(await this.client.post(`users/${e}/authenticators`,oV(t))).data}async confirm(e,t,n){return(await this.client.post(`users/${e}/authenticators/${t}/confirm`,n)).data}async delete(e,t){return(await this.client.delete(`users/${e}/authenticators/${t}`)).data}async challenge(e){return(await this.client.get(`authenticators/challenge`,NV(e))).data}async sendChallenge(e,t){return(await this.client.post(`authenticators/challenge/send`,e,NV(t))).data}async verifyChallenge(e,t){return(await this.client.post(`authenticators/challenge`,e,NV(t))).data}};function NV(e){if(!(!e||!e.authorizationHeader))return{headers:{Authorization:typeof e.authorizationHeader==`string`?e.authorizationHeader:VF(e.authorizationHeader)}}}var PV=class extends cV{async getMany(e){return(await this.client.get(`user-permissions${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`user-permissions/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`user-permissions/${e}`)).data}async create(e){return(await this.client.post(`user-permissions`,oV(e))).data}async update(e,t){return(await this.client.post(`user-permissions/${e}`,oV(t))).data}},FV=class extends cV{async getMany(e={}){return(await this.client.get(`user-roles${iV(e)}`)).data}async getOne(e,t){return(await this.client.get(`user-roles/${e}${iV(t)}`)).data}async delete(e){return(await this.client.delete(`user-roles/${e}`)).data}async create(e){return(await this.client.post(`user-roles`,e)).data}};function IV(e){return typeof e==`string`?e:[...new Set(e)].join(` `)}function LV(e,t){let n=new URL(e);if(t.response_type?n.searchParams.set(`response_type`,Array.isArray(t.response_type)?IV(t.response_type):t.response_type):n.searchParams.set(`response_type`,`code`),t.client_id&&n.searchParams.set(`client_id`,t.client_id),t.redirect_uri&&n.searchParams.set(`redirect_uri`,t.redirect_uri),t.response_mode&&n.searchParams.set(`response_mode`,t.response_mode),t.scope){let e=Array.isArray(t.scope)?IV(t.scope):t.scope;n.searchParams.set(`scope`,e)}return t.state&&n.searchParams.set(`state`,t.state),t.code_challenge&&n.searchParams.set(`code_challenge`,t.code_challenge),t.code_challenge_method&&n.searchParams.set(`code_challenge_method`,t.code_challenge_method),n.href}var RV=class{client;options;constructor(e={}){this.setClient(e.client),this.setOptions(e.options)}setClient(e){this.client=qne(e)?e:XF(e)}setOptions(e){this.options=e||{}}setOption(e,t){this.options[e]=t}},zV=class extends RV{buildURL(e={}){let t;if(this.options.authorizationEndpoint)t=this.options.authorizationEndpoint;else{let e=this.client.defaults.baseURL;t=new URL(`authorize`,e).href}return LV(t,{...e,redirect_uri:e.redirect_uri||this.options.redirectUri,client_id:e.client_id||this.options.clientId,scope:e.scope||this.options.scope,response_type:e.response_type||`code`})}};function BV(e,t={}){if(e.set(`Content-Type`,`application/x-www-form-urlencoded`),!(t.authorizationHeaderInherit&&e.has(`Authorization`))){if(e.delete(`Authorization`),t.authorizationHeader){let n=typeof t.authorizationHeader==`string`?t.authorizationHeader:VF(t.authorizationHeader);e.set(`Authorization`,n);return}t.clientCredentialsAsHeader&&t.clientId&&t.clientSecret&&e.set(`Authorization`,VF({type:`Basic`,username:t.clientId,password:t.clientSecret}))}}function VV(e,t={}){return(n,r)=>{if(t.clientId||(t.clientId=e.client_id,t.clientSecret=e.client_secret),t.realmId||=e.realm_id,BV(r,t),t.clientCredentialsAsHeader){if(n instanceof URLSearchParams)return n.delete(`client_id`),n.delete(`client_secret`),n;AF(n)&&(n.client_id!==void 0&&delete n.client_id,n.client_secret!==void 0&&delete n.client_secret)}return n}}var HV=class extends RV{async createWithRefreshToken(e,t){return this.create({grant_type:`refresh_token`,...e},t)}async createWithClientCredentials(e={},t={}){return this.create({grant_type:`client_credentials`,...e},t)}async createWithPassword(e,t={}){return this.create({grant_type:`password`,...e},t)}async createWithAuthorizationCode(e,t={}){return this.create({grant_type:`authorization_code`,...e},t)}async createWithRobotCredentials(e,t={}){return this.create({grant_type:`robot_credentials`,...e},t)}async create(e,t={}){this.extendCreateParameters(e);let n=this.buildURLSearchParams(e),{data:r}=await this.client.post(this.options.tokenEndpoint||`/token`,n,{transform:this.buildRequestTransformers(e,t),headers:{[HF.ACCEPT]:`application/json`}}),i={access_token:r.access_token,expires_in:r.expires_in,token_type:r.token_type||`Bearer`};return r.refresh_token&&(i.refresh_token=r.refresh_token),typeof r.refresh_token_expires_in==`number`&&(i.refresh_token_expires_in=r.refresh_token_expires_in),typeof r.id_token==`string`&&(i.id_token=r.id_token),typeof r.mac_key==`string`&&(i.mac_key=r.mac_key),typeof r.mac_algorithm==`string`&&(i.mac_algorithm=r.mac_algorithm),i}async revoke(e={},t={}){let n=this.buildURLSearchParams(e);return this.client.post(this.options.revocationEndpoint||`/token/revoke`,n,{transform:this.buildRequestTransformers(e,t),headers:{[HF.ACCEPT]:`application/json`}})}async introspect(e={},t={}){let n=this.buildURLSearchParams(e),{data:r}=await this.client.post(this.options.introspectionEndpoint||`/token/introspect`,n,{transform:this.buildRequestTransformers(e,t),headers:{[HF.ACCEPT]:`application/json`}});return r}buildRequestTransformers(e,t={}){let n=[];return t.clientId||(this.options.clientId&&(t.clientId=this.options.clientId),this.options.clientSecret&&(t.clientSecret=this.options.clientSecret)),!t.realmId&&this.options.realmId&&(t.realmId=this.options.realmId),n.push(VV(e,t)),this.client.defaults.transform&&(Array.isArray(this.client.defaults.transform)?n.push(...this.client.defaults.transform):n.push(this.client.defaults.transform)),n}extendCreateParameters(e){return e.grant_type!==`authorization_code`&&e.grant_type!==`robot_credentials`&&!e.scope&&this.options.scope&&(e.scope=this.options.scope),e.grant_type===`authorization_code`&&!e.redirect_uri&&this.options.redirectUri&&(e.redirect_uri=this.options.redirectUri),e.client_id||(e.client_secret&&delete e.client_secret,this.options.clientId&&(e.client_id=this.options.clientId),this.options.clientSecret&&(e.client_secret=this.options.clientSecret)),!e.realm_id&&this.options.realmId&&(e.realm_id=this.options.realmId),e}buildURLSearchParams(e){let t=new URLSearchParams,n=Object.keys(e);for(let r of n){let n=e[r];if(typeof n==`string`&&n)t.append(r,n);else if(Array.isArray(n)){let e=n.filter(e=>e).join(` `);e&&t.append(r,e)}}return t}},UV=class extends RV{constructor(e){super(e)}async get(e){let t={[HF.ACCEPT]:`application/json`};e&&(t.Authorization=typeof e==`string`?e.includes(` `)?e:`Bearer ${e}`:VF(e));let{data:n}=await this.client.get(this.options.userinfoEndpoint||`/userinfo`,{headers:t});return n}},WV=Symbol.for(`@hapic/oauth2/OAuth2Client`),GV=class extends JF{options;authorize;token;userInfo;constructor(e={}){super(e.request),Rl(this,WV);let t=e.options||{};this.options=t,this.token=new HV({client:this,options:t}),this.authorize=new zV({client:this,options:t}),this.userInfo=new UV({client:this,options:t})}},{hasClient:Qne,setClient:$ne,useClient:ere,unsetClient:tre,createClient:KV,isClient:nre}=YF({create:e=>new GV(e),id:WV});KV();var qV=class extends zV{async confirm(e){return(await this.client.post(`authorize`,oV(e))).data}},JV=class extends HV{},YV=class extends UV{},XV=class extends cV{async get(){return(await this.client.get(``)).data}},ZV=class extends JF{token;authorize;client;clientPermission;clientRole;clientScope;consent;event;identityProvider;identityProviderAccount;identityProviderRoleMapping;key;policy;permission;permissionPolicy;realm;role;roleAttribute;rolePermission;scope;session;sessionToken;status;trustAnchor;user;userInfo;userAttribute;userAuthenticator;userPermission;userRole;constructor(e={}){super(e);let t={authorizationEndpoint:`authorize`,introspectionEndpoint:`token/introspect`,tokenEndpoint:`token`,userinfoEndpoint:`userinfo`},n=this.getBaseURL();if(typeof n==`string`){let e=Object.keys(t);for(let r of e){let e=t[r];typeof e==`string`&&(t[r]=mE(n,e).href)}}this.authorize=new qV({client:this,options:t}),this.token=new JV({client:this,options:t}),this.client=new lV({client:this}),this.clientPermission=new uV({client:this}),this.clientRole=new dV({client:this}),this.clientScope=new fV({client:this}),this.consent=new pV({client:this}),this.event=new mV({client:this}),this.identityProvider=new hV({client:this}),this.identityProviderAccount=new gV({client:this}),this.identityProviderRoleMapping=new _V({client:this}),this.key=new vV({client:this}),this.policy=new yV({client:this}),this.permission=new bV({client:this}),this.permissionPolicy=new xV({client:this}),this.realm=new SV({client:this}),this.role=new CV({client:this}),this.roleAttribute=new wV({client:this}),this.rolePermission=new TV({client:this}),this.scope=new EV({client:this}),this.session=new DV({client:this}),this.sessionToken=new OV({client:this}),this.status=new XV({client:this}),this.trustAnchor=new kV({client:this}),this.user=new AV({client:this}),this.userInfo=new YV({client:this,options:t}),this.userAttribute=new jV({client:this}),this.userAuthenticator=new MV({client:this}),this.userPermission=new PV({client:this}),this.userRole=new FV({client:this}),this.on(IF.RESPONSE_ERROR,(e=>{throw zF(e)&&e.response&&e.response.data&&typeof e.response.data.message==`string`&&(e.message=e.response.data.message),e}))}async getJwks(){return(await this.get(`jwks`)).data}async getJwk(e){return(await this.get(`jwks/${e}`)).data}async getWellKnownOpenIDConfiguration(){return(await this.get(`/.well-known/openid-configuration`)).data}};function QV(e,t){let n=e;if(cE(n,t))return n[t]}var $V=function(e){return e.REFRESH_FINISHED=`refreshFinished`,e.REFRESH_FAILED=`refreshFailed`,e.HEADER_SET=`headerSet`,e.HEADER_UNSET=`headerRemoved`,e}({}),eH=class{all;constructor(e){this.all=e||new Map}on(e,t){this.all.has(e)||this.all.set(e,[]);let n=this.all.get(e);return n.push(t),()=>n.splice(n.indexOf(t)>>>0,1)}off(e,t){if(!e)return this.all.clear();let n=this.all.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):this.all.delete(e))}emit(e,...t){let n=this.all.get(e);n?.slice().map(e=>{e(...t)}),n=this.all.get(`*`),n&&n.slice().map(n=>{n(e,t)})}};function tH(e){let t=e.retry||{};return t.retryCount=t.retryCount||0,e.retry=t,t}var nH=Symbol.for(`ClientResponseHook`),rH=class extends eH{isActive;authorizationHeader;clients;creator;options;timer;refreshPromise;constructor(e){super(),this.isActive=!0,this.authorizationHeader=void 0,this.clients=[],e.timer??=!0,this.options=e,this.creator=e.tokenCreator}enable(){this.isActive=!0}disable(){this.isActive=!1}setAuthorizationHeader(e){this.authorizationHeader=e;for(let t=0;t<this.clients.length;t++)this.clients[t].setAuthorizationHeader(e);this.emit($V.HEADER_SET)}unsetAuthorizationHeader(){this.authorizationHeader=void 0;for(let e=0;e<this.clients.length;e++)this.clients[e].unsetAuthorizationHeader();this.emit($V.HEADER_UNSET)}isAttached(e){return nH in e}attach(e){this.authorizationHeader?e.setAuthorizationHeader(this.authorizationHeader):e.unsetAuthorizationHeader(),this.clients.indexOf(e)===-1&&this.clients.push(e),this.isAttached(e)||Object.assign(e,{[nH]:e.on(IF.RESPONSE_ERROR,t=>{if(!this.isActive)return Promise.reject(t);let{request:n}=t,r=tH(n);if(r.retryCount>0)return Promise.reject(t);r.retryCount+=1;let i=Jne(t);return _E(i)?(this.unsetAuthorizationHeader(),n.headers&&GF(n.headers,HF.AUTHORIZATION),Promise.reject(t)):yE(i)||uE(t.response)&&(t.response.status===401||t.response.status===403&&n.headers&&!Rne(n.headers,HF.AUTHORIZATION))?this.refresh().then(t=>(n.headers&&Lne(n.headers,HF.AUTHORIZATION,VF({type:`Bearer`,token:t.access_token})),e.request(n))).catch(e=>(n.headers&&GF(n.headers,HF.AUTHORIZATION),Promise.reject(e))):Promise.reject(t)})})}detach(e){e.unsetAuthorizationHeader();let t=this.clients.indexOf(e);t!==-1&&this.clients.splice(t,1),this.isAttached(e)&&(e.off(IF.RESPONSE_ERROR,e[nH]),delete e[nH])}setTimer(e){if(!this.options.timer)return;this.clearTimer();let t=(e-60)*1e3;t>0&&(this.timer=setTimeout(async()=>this.refresh(),t))}clearTimer(){this.timer&&clearTimeout(this.timer)}async refresh(){return this.refreshPromise?this.refreshPromise:(this.refreshPromise=this.creator(),this.refreshPromise.then(e=>(this.setTimer(e.expires_in),this.refreshPromise=void 0,this.setAuthorizationHeader({type:`Bearer`,token:e.access_token}),this.emit($V.REFRESH_FINISHED,e),e)).catch(e=>(zF(e)?this.emit($V.REFRESH_FAILED,e):this.emit($V.REFRESH_FAILED,null),this.refreshPromise=void 0,this.unsetAuthorizationHeader(),Promise.reject(e))))}},iH=typeof window<`u`,aH,oH=e=>aH=e,sH=Symbol();function cH(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var lH=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function uH(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function dH(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){gH(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function fH(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function pH(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var mH=typeof navigator==`object`?navigator:{userAgent:``},hH=/Macintosh/.test(mH.userAgent)&&/AppleWebKit/.test(mH.userAgent)&&!/Safari/.test(mH.userAgent),gH=iH?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!hH?_H:`msSaveOrOpenBlob`in mH?vH:yH:()=>{};function _H(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?pH(r):fH(r.href)?dH(e,t,n):(r.target=`_blank`,pH(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){pH(r)},0))}function vH(e,t=`download`,n){if(typeof e==`string`)if(fH(e))dH(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){pH(t)})}else navigator.msSaveOrOpenBlob(uH(e,n),t)}function yH(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return dH(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(lH.HTMLElement))||`safari`in lH,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||hH)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:rre}=Object;function bH(){let e=ze(!0),t=e.run(()=>E({})),n=[],r=[],i=on({install(e){oH(i),i._a=e,e.provide(sH,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var xH=()=>{};function SH(e,t,n,r=xH){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&Be()&&Ve(i),i}function CH(e,...t){e.forEach(e=>{e(...t)})}var wH=e=>e(),TH=Symbol(),EH=Symbol();function DH(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!Object.hasOwn(t,n))continue;let r=t[n],i=e[n];e[n]=cH(i)&&cH(r)&&Object.hasOwn(e,n)&&!ln(r)&&!en(r)?DH(i,r):r}return e}var OH=Symbol();function kH(e){return!e||typeof e!=`object`||!Object.hasOwn(e,OH)}var{assign:AH}=Object;function jH(e){return!!(ln(e)&&e.effect)}function MH(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),AH(yn(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=on(B(()=>{oH(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=NH(e,l,t,n,r,!0),c}function NH(e,t,n={},r,i,a){let o,s=AH({actions:{}},n),c={deep:!0},l,u,d=new Set,f=new Set,p,m=r.state.value[e];!a&&!m&&(r.state.value[e]={});let h;function g(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:`patch function`,storeId:e,events:p}):(DH(r.state.value[e],t),n={type:`patch object`,payload:t,storeId:e,events:p});let i=h=Symbol();Gn().then(()=>{h===i&&(l=!0)}),u=!0,CH(d,n,r.state.value[e])}let _=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{AH(e,t)})}:xH;function v(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}let y=(t,n=``)=>{if(TH in t)return t[EH]=n,t;let i=function(){oH(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}CH(f,{args:n,name:i[EH],store:b,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:b,n)}catch(e){throw CH(o,e),e}return l instanceof Promise?l.then(e=>(CH(a,e),e)).catch(e=>(CH(o,e),Promise.reject(e))):(CH(a,l),l)};return i[TH]=!0,i[EH]=n,i},b=Yt({_p:r,$id:e,$onAction:SH.bind(null,f),$patch:g,$reset:_,$subscribe(t,n={}){if(d.has(t))return xH;let i=SH(d,t,n.detached,()=>a()),a=o.run(()=>yr(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:`direct`,events:p},r)},AH({},c,n)));return i},$dispose:v});r._s.set(e,b);let x=(r._a&&r._a.runWithContext||wH)(()=>r._e.run(()=>(o=ze()).run(()=>t({action:y}))));for(let t in x){let n=x[t];ln(n)&&!jH(n)||en(n)?a||(m&&kH(n)&&(ln(n)?n.value=m[t]:DH(n,m[t])),r.state.value[e][t]=n):typeof n==`function`&&(x[t]=y(n,t),s.actions[t]=n)}return AH(b,x),AH(an(b),x),Object.defineProperty(b,"$state",{get:()=>r.state.value[e],set:e=>{g(t=>{AH(t,e)})}}),r._p.forEach(e=>{let t=o.run(()=>e({store:b,app:r._a,pinia:r,options:s}));AH(b,t)}),m&&a&&n.hydrate&&n.hydrate(b.$state,m),l=!0,u=!0,b}function PH(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=pr();return n||=o?fr(sH,null):null,n&&oH(n),n=aH,n._s.has(e)||(i?NH(e,t,r,n):MH(e,r,n)),n._s.get(e)}return a.$id=e,a}function FH(e){let t=an(e),n={};for(let r in t){let i=t[r];i?.effect?n[r]=B({get:()=>e[r],set(t){e[r]=t}}):(ln(i)||en(i))&&(n[r]=Sn(e,r))}return n}function IH(e,t){if(t&&t._context&&t._context.provides&&t._context.provides[e])return t._context.provides[e];if(pr())return fr(e,void 0)}function LH(e,t,n){if(n===void 0){if(IH(e)!==void 0)return;dr(e,t);return}n&&n._context&&n._context.provides&&n._context.provides[e]||n.provide(e,t)}var RH=Symbol.for(`AuthupHTTPClientAuthenticationHook`);function zH(e){let t=IH(RH,e);if(!t)throw Error(`The http client authentication hook has not been injected in the app context.`);return t}function BH(e){try{return!!zH(e)}catch{return!1}}function VH(e,t){LH(RH,e,t)}var HH=`authup`,UH=function(e){return e.UNAUTHENTICATED=`unauthenticated`,e.AUTHENTICATING=`authenticating`,e.RESTORING=`restoring`,e.AUTHENTICATED=`authenticated`,e}({}),WH=function(e){return e.LOGIN=`login`,e.EXCHANGE=`exchange`,e.RESTORE=`restore`,e}({}),GH=Symbol.for(`@authup/access/PermissionError`),KH=class e extends Td{constructor(e={}){super({...e,message:e.message||`A permission error occurred.`,code:e.code||H.PERMISSION_DENIED}),Rl(this,GH)}addIssue(e){this.issues.push(e)}addIssues(e){this.issues.push(...e)}static notFound(t){return new e({message:`The permission ${t} was not found.`,code:H.PERMISSION_NOT_FOUND})}static denied(t){return new e({message:`The permission ${t} has not been granted.`,code:H.PERMISSION_DENIED})}static deniedAll(t){return new e({message:`None of the permissions ${t.join(`, `)} has been granted.`,code:H.PERMISSION_DENIED})}static evaluationFailed(t){return Array.isArray(t)?new e({message:`The evaluation of permissions ${t.join(`, `)} failed`,code:H.PERMISSION_EVALUATION_FAILED}):new e({message:`The evaluation of permission ${t} failed`,code:H.PERMISSION_EVALUATION_FAILED})}},qH=function(e){return e.NONE=`none`,e.OWN=`own`,e.OWN_OR_NULL=`ownOrNull`,e.ANY=`any`,e}({});function JH(e){return e===qH.ANY||e===qH.OWN_OR_NULL||e===qH.NONE?e:qH.OWN}function YH(e,t,n,r){return t===null?e===qH.OWN_OR_NULL:t===n||t===r}function XH(e,t,n,r){let i=JH(e);if(i===qH.ANY)return!0;if(i===qH.NONE)return!1;let a=n??null,o=r??null;return a===null&&o===null?!1:Array.isArray(t)?t.length!==0&&t.every(e=>YH(i,e??null,a,o)):YH(i,t??null,a,o)}function ZH(e){return e||`*`}function QH(e){return`${ZH(e.realmId)}/${ZH(e.clientId)}/${e.name}`}function $H(e){let t;return e.policies&&e.policies.length===1?t=e.policies[0]:e.policies&&e.policies.length>1&&(t={type:`composite`,decisionStrategy:e.permission.decisionStrategy||WT.UNANIMOUS,children:e.policies}),{realmScope:JH(e.realmScope),policy:t}}function eU(e){let t=e.reduce((e,t)=>{let n=QH(t.permission);return e[n]||(e[n]=[]),e[n].push(t),e},{}),n=[];for(let e of Object.keys(t)){let r=t[e];n.push({permission:r[0].permission,grants:r.map($H)})}return n}var tU=class{items={};constructor(e=[]){this.setMany(e)}async findOne(e){let t=QH({name:e.name,clientId:e.clientId,realmId:e.realmId});return this.items[t]||null}setMany(e){this.items=eU(e).reduce((e,t)=>{let n=QH(t.permission);return e[n]=t,e},{})}},nU=function(e){return e.DATA_MISSING=`DATA_MISSING`,e.DATA_INVALID=`DATA_INVALID`,e.INVALID=`INVALID`,e.TYPE_UNKNOWN=`TYPE_UNKNOWN`,e.FIELD_MISSING=`FIELD_MISSING`,e.FIELD_INVALID=`FIELD_INVALID`,e.CHILD_INVALID=`CHILD_INVALID`,e.CHILD_EVALUATION_FAILED=`CHILD_EVALUATION_FAILED`,e.EVALUATION_DENIED=`EVALUATION_DENIED`,e.EVALUATOR_NOT_FOUND=`EVALUATOR_NOT_FOUND`,e.EVALUATOR_ERROR=`EVALUATOR_ERROR`,e.SKIPPED_EXCLUDED=`SKIPPED_EXCLUDED`,e.SKIPPED_NOT_INCLUDED=`SKIPPED_NOT_INCLUDED`,e.INTERNAL_ERROR=`INTERNAL_ERROR`,e}({});function rU(e){return Iu(e)}function iU(e){return Lu(e)}var aU=Symbol.for(`@authup/access/PolicyError`),oU=class e extends Td{constructor(e,t){super({message:e,code:t??void 0}),Rl(this,aU)}addIssue(e){this.issues.push(e)}addIssues(e){this.issues.push(...e)}static evaluatorNotFound(t){return new e(`No evaluator is registered to handle the policy: ${t}`,H.POLICY_EVALUATOR_NOT_FOUND)}static evaluatorNotProcessable(){return new e(`The evaluator can not process the policy.`,H.POLICY_EVALUATOR_NOT_PROCESSABLE)}static evaluatorContextInvalid(){return new e(`The evaluator context is not valid.`,H.POLICY_EVALUATOR_CONTEXT_INVALID)}};function sU(e){return Vl(e,aU)?!0:Dd(e)?e.code===H.POLICY_EVALUATOR_NOT_FOUND||e.code===H.POLICY_EVALUATOR_NOT_PROCESSABLE||e.code===H.POLICY_EVALUATOR_CONTEXT_INVALID:!1}function cU(e){return typeof e==`object`&&e&&`message`in e&&typeof e.message==`string`?e.message:String(e)}var lU=class{evaluators;constructor(e={}){this.evaluators=e}registerEvaluator(e,t){this.evaluators[e]=t}registerEvaluators(e){let t=Object.keys(e);for(let n of t)this.registerEvaluator(n,e[n])}async evaluate(e,t){if(!e.type)return{success:!1,issues:[Iu({path:[],message:`The policy can not be handled by any evaluator.`,code:H.POLICY_EVALUATOR_NOT_FOUND})]};if(t.exclude&&t.exclude.length>0&&t.exclude.includes(e.type)||t.include&&t.include.length>0&&!t.include.includes(e.type))return{success:!0};let n=[],r=this.evaluators[e.type];if(!r)return n.push(Iu({path:[e.type],message:`The policy ${e.type} can not be handled by any evaluator.`,code:H.POLICY_EVALUATOR_NOT_FOUND})),{success:!1,issues:n};try{if(r.requires){let n=r.requires(e).filter(e=>!t.data||!t.data.has(e));if(n.length>0){let i={success:!1,pending:!0,issues:[rU({code:nU.DATA_MISSING,message:`The data propert${n.length>1?`ies`:`y`} ${n.join(`, `)} ${n.length>1?`are`:`is`} missing`,path:t.path})]};if(t.withConditions&&r.toCondition)try{let n=await r.toCondition(e,t);n&&(i.condition=n)}catch{}return i}}return await r.evaluate(e,{...t,evaluators:{...this.evaluators,...t.evaluators||{}}})}catch(t){return n.push(Iu({path:[e.type],message:`The ${e.type} evaluator threw: ${cU(t)}`,code:H.POLICY_EVALUATOR_NOT_PROCESSABLE})),{success:!1,issues:n}}}async evaluateOrFail(e,t){let n=[];try{let r=await this.evaluate(e,t);if(r.success)return;r.issues&&n.push(...r.issues)}catch(t){if(sU(t))throw t;n.push(Iu({path:e.type?[e.type]:[],message:cU(t),code:H.POLICY_EVALUATOR_NOT_PROCESSABLE}))}let r=new oU(`The policy ${e.type} evaluation failed.`);throw r.addIssues(n),r}},uU=class e{data;validated;constructor(e={},t=new Set){this.data=e,this.validated=t}set(e,t){this.data[e]=t,this.validated.delete(e)}get(e){if(e in this.data)return this.data[e];throw Error(`Policy data item ${e} does not exist.`)}has(e){return e in this.data}setValidated(e){this.validated.add(e)}isValidated(e){return this.validated.has(e)}clone(){return new e({...this.data},new Set(this.validated))}};function dU(e={}){return{evaluators:e.evaluators||{},path:e.path||[],data:e.data||new uU,include:e.include||[],exclude:e.exclude||[],withConditions:e.withConditions??!1}}function fU(e,t){return t===void 0?e:typeof t==`function`?t(e):t?!e:e}var pU=class extends ed{initialize(){super.initialize(),this.mount(`names`,U(ew(TS().min(3).max(128)))),this.mount(`invert`,U(jC().or(HC()).or(BC()).optional()))}};function mU(e){return e===void 0?null:e}function hU(e,t){return Zl(mU(e),mU(t))}function gU(e,t){let n=e instanceof Date&&t instanceof Date,r=n?e.getTime():e,i=n?t.getTime():t;if(typeof r==`number`&&typeof i==`number`)return Number.isNaN(r)||Number.isNaN(i)?void 0:r===i?0:r<i?-1:1;if(typeof r==`string`&&typeof i==`string`||typeof r==`boolean`&&typeof i==`boolean`)return r===i?0:r<i?-1:1}function _U(e){if(typeof e==`string`)return e;if(typeof e==`number`&&Number.isFinite(e))return`${e}`}function vU(e,t){return!ZF(e)||!$F(e,t)?null:mU(e[t])}function yU(e){return t=>Array.isArray(t)?t.some(t=>e(mU(t))):e(t)}var bU=class{paths;itself=!0;bindingPrefix;scopeSequence;constructor(){this.paths=new Set,this.bindingPrefix=``,this.scopeSequence=0}compound(e){let t=e.children.map(e=>jL(e,this)),n;return n=e.operator===`or`?(e,n)=>t.some(t=>t(e,n)):(e,n)=>t.every(t=>t(e,n)),e.negated?(e,t)=>!n(e,t):n}constant(e){return()=>e.verdict}nullCheck(e){let t=e=>mU(e)===null,n=e.elementwise?yU(t):t;return this.leaf(e.field,this.negate(n,e.negated))}compare(e){if(e.op===`eq`){let t=yU(this.buildValueEqualTest(e.value,e.caseFold));return this.leaf(e.field,this.negate(t,e.negated))}let t=EL[e.op].compare;return this.leaf(e.field,this.buildCompareTest(e.value,t.min,t.max))}oneOf(e){let t=e.values.map(t=>this.buildValueEqualTest(t,e.caseFold));e.includesNull&&t.push(e=>hU(e,null));let n=yU(e=>t.some(t=>t(e)));return this.leaf(e.field,this.negate(n,e.negated))}match(e){let t;if(e.pattern.mode===`regex`)try{t=new RegExp(e.pattern.source,e.pattern.flags)}catch{throw hI.featureUnsupported(`filters:regex:value`)}else t=new RegExp(e.regexSource,`i`);let n=yU(e=>{let n=_U(e);return n!==void 0&&t.test(n)});return this.leaf(e.field,this.negate(n,e.negated))}mod(e){return this.leaf(e.field,yU(t=>typeof t==`number`&&Number.isFinite(t)&&t%e.divisor===e.remainder))}size(e){if(e.count===null)return this.leaf(e.field,()=>!1);let{count:t}=e;return this.leaf(e.field,e=>Array.isArray(e)&&e.length===t)}elemMatch(e){let t=this.bindingPrefix;this.scopeSequence+=1,this.bindingPrefix=`${t}${e.field}${this.scopeSequence}.`;try{return jL(e.condition,this)}finally{this.bindingPrefix=t}}leaf(e,t){if(e===`$this`){if(!this.bindingPrefix)throw hI.featureUnsupported(`filters:itself`);let e=this.bindingPrefix.slice(0,-1),n=`${e}*`;return this.registerPath(e),r=>r.get(n)===!0&&t(mU(r.get(e)))}let n=`${this.bindingPrefix}${e}`,r=n.lastIndexOf(`.`);if(r===-1)return(e,r)=>t(vU(r,n));let i=n.slice(0,r),a=n.slice(r+1);return this.registerPath(i),e=>t(vU(e.get(i),a))}registerPath(e){let t=e.split(`.`);for(let e=0;e<t.length;e++)this.paths.add(t.slice(0,e+1).join(`.`))}negate(e,t){return t?t=>!e(t):e}buildValueEqualTest(e,t){let n=mU(e);if(t&&typeof n==`string`){let e=n.toLowerCase();return t=>typeof t==`string`&&t.toLowerCase()===e}return e=>hU(e,n)}buildCompareTest(e,t,n){let r=mU(e);return yU(e=>{let i=gU(e,r);return i!==void 0&&i>=t&&i<=n})}},xU=new Map;function SU(e,t){let n=t.indexOf(`\0`),r=n===-1?t:t.slice(0,n);return r===`$this`?e:vU(e,r)}function CU(e){return Array.isArray(e)?e.length>0?e:[null]:[e]}function wU(e,t){if(t.size===0)return t=>e(xU,t);let n=[...t].sort();return t=>{let r=new Map,i=a=>{if(a===n.length)return e(r,t);let o=n[a],s=o.lastIndexOf(`.`),c=SU(s===-1?t:r.get(o.slice(0,s)),s===-1?o:o.slice(s+1));r.set(`${o}*`,Array.isArray(c)&&c.length>0);let l=CU(c);for(let e of l)if(r.set(o,e),i(a+1))return!0;return r.delete(o),r.delete(`${o}*`),!1};return i(0)}}var TU=class{options;constructor(e={}){this.options=e}visitFilters(e){return this.compile(e)}visitFilter(e){return this.compile(e)}compile(e){let t=AL(e,{caseSensitive:this.options.caseSensitive});if(!t)return()=>!0;let n=this.createCompiler();return wU(jL(t,n),n.paths)}createCompiler(){return new bU}};function EU(e,t={}){return new TU(t).compile(e)}var DU=[`$and`,`$or`,`$nor`],OU={$eq:[SI.EQUAL,SI.NOT_EQUAL],$ne:[SI.NOT_EQUAL,SI.EQUAL],$lt:[SI.LESS_THAN,SI.GREATER_THAN_EQUAL],$lte:[SI.LESS_THAN_EQUAL,SI.GREATER_THAN],$gt:[SI.GREATER_THAN,SI.LESS_THAN_EQUAL],$gte:[SI.GREATER_THAN_EQUAL,SI.LESS_THAN],$in:[SI.IN,SI.NOT_IN],$nin:[SI.NOT_IN,SI.IN],$startsWith:[SI.STARTS_WITH,SI.NOT_STARTS_WITH],$notStartsWith:[SI.NOT_STARTS_WITH,SI.STARTS_WITH],$endsWith:[SI.ENDS_WITH,SI.NOT_ENDS_WITH],$notEndsWith:[SI.NOT_ENDS_WITH,SI.ENDS_WITH],$contains:[SI.CONTAINS,SI.NOT_CONTAINS],$notContains:[SI.NOT_CONTAINS,SI.CONTAINS]},kU=[...Object.keys(OU),`$regex`,`$options`,`$mod`,`$size`,`$exists`,`$elemMatch`,`$all`,`$not`],AU=[`$type`,`$where`,`$text`,`$expr`,`$jsonSchema`,`$geoWithin`,`$geoIntersects`,`$near`,`$nearSphere`,`$bitsAllSet`,`$bitsAllClear`,`$bitsAnySet`,`$bitsAnyClear`,`$comment`,`$slice`],jU=32,MU=class extends SR{parse(e,t={}){let n=[],{scope:r,parsed:i}=this.prepare(e,t,n);return HR(kR(i?uR(i,r.schema,t.context)??this.buildDefaultOutput(r):this.buildDefaultOutput(r),fR(n,t.context,{throwOnFailure:r.relationsThrowOnFailure,errors:eL}),r.schema),this.registry,t.schema,{throwOnFailure:t.throwOnFailure})}async parseAsync(e,t={}){let n=[],{scope:r,parsed:i}=this.prepare(e,t,n);return HR(kR(i?await dR(i,r.schema,t.context)??this.buildDefaultOutput(r):this.buildDefaultOutput(r),await pR(n,t.context,{throwOnFailure:r.relationsThrowOnFailure,errors:eL}),r.schema),this.registry,t.schema,{throwOnFailure:t.throwOnFailure})}parseParameter(e,t,n){let{scope:r,parsed:i}=this.prepare(e,t,n);return i?uR(i,r.schema,t.context)??this.buildDefaultOutput(r):this.buildDefaultOutput(r)}async parseParameterAsync(e,t,n){let{scope:r,parsed:i}=this.prepare(e,t,n);return i?await dR(i,r.schema,t.context)??this.buildDefaultOutput(r):this.buildDefaultOutput(r)}parseTyped(e,t={}){return this.parse(e,t)}parseTypedAsync(e,t={}){return this.parseAsync(e,t)}prepare(e,t,n){let r=oL.for(this.registry,uI.FILTERS,t.schema,{relations:t.relations,throwOnFailure:t.throwOnFailure,strict:t.strict,obligationSink:n});if(e==null)return{scope:r,parsed:null};if(!NU(e))throw QI.inputInvalid();if(!r.schema.allowedIsUndefined&&r.schema.allowed.length===0)return{scope:r,parsed:null};let i=this.parseDocument(e,r,!1,0);if(i.length===0)return{scope:r,parsed:null};let[a]=i;return{scope:r,parsed:i.length===1&&a&&uL(a)?a:new mL(CI.AND,i)}}buildDefaultOutput(e){return new mL(CI.AND,cR(e.schema))}parseDocument(e,t,n,r){if(r>jU)throw QI.syntaxInvalid(`The maximum nesting depth was exceeded.`);let i=[],a=Object.keys(e);for(let o of a){if(IU(o)){let a=this.parseCompound(o,e[o],t,n,r);a&&i.push(a);continue}if(o.startsWith(`$`))throw this.buildDocumentOperatorError(o);i.push(...this.parseFieldEntry(o,e[o],t,n,r))}return i}buildDocumentOperatorError(e){return kU.includes(e)?QI.syntaxInvalid(`The field operator ${e} is not permitted at document level.`):AU.includes(e)?QI.operatorUnsupported(e):QI.syntaxInvalid(`The operator ${e} is unknown.`)}parseCompound(e,t,n,r,i){if(!Array.isArray(t)||t.length===0)throw QI.syntaxInvalid(`The value of the operator ${e} must be a non-empty array.`);let a=e===`$nor`?!r:r,o;o=e===`$or`?r?CI.AND:CI.OR:r?CI.OR:CI.AND;let s=[];for(let r of t){if(!NU(r)||Object.keys(r).length===0)throw QI.syntaxInvalid(`The children of the operator ${e} must be non-empty objects.`);let t=this.parseDocument(r,n,a,i+1),o=this.combineDocument(t,a);o&&s.push(o)}if(s.length!==0)return new mL(o,s)}combineDocument(e,t){if(e.length!==0)return e.length===1?e[0]:new mL(t?CI.OR:CI.AND,e)}parseFieldEntry(e,t,n,r,i){if(i>jU)throw QI.syntaxInvalid(`The maximum nesting depth was exceeded.`);if(NU(t)){let a=Object.keys(t);if(a.length===0)throw QI.keyValueInvalid(e);let o=a.filter(e=>e.startsWith(`$`));if(o.length===a.length)return this.parseOperatorObject(e,t,n,r,i);if(o.length>0)throw QI.syntaxInvalid(`The value of the key ${e} mixes operator and field keys.`);let s=[];for(let o of a)s.push(...this.parseFieldEntry(`${e}.${o}`,t[o],n,r,i+1));return s}if(t instanceof RegExp){if(r)throw QI.operatorUnsupported(`$regex`);return this.buildLeaf(e,n,SI.REGEX,t)}if(Array.isArray(t))return this.validateInValue(e,t),this.buildLeaf(e,n,r?SI.NOT_IN:SI.IN,t);if(PU(t))return this.buildLeaf(e,n,r?SI.NOT_EQUAL:SI.EQUAL,t);throw QI.keyValueInvalid(e)}buildLeaf(e,t,n,r){let i=this.resolveField(e,t);return i?[new vL(n,i.field,r)]:[]}resolveField(e,t){let n=t.resolveKey(e);if(n.success)return{field:[...n.path,n.name].join(`.`),name:n.name,scope:n.scope}}parseOperatorObject(e,t,n,r,i){let a=this.validateOperatorObject(e,t,r),o=this.resolveField(e,n);return o?this.buildOperatorObject(t,o,r,i,a):[]}validateOperatorObject(e,t,n){let r=Object.keys(t);if(r.includes(`$options`)&&!r.includes(`$regex`))throw QI.syntaxInvalid(`The operator $options of the key ${e} requires a $regex sibling.`);let i;for(let a of r){if(IU(a))throw QI.syntaxInvalid(`The compound operator ${a} is not permitted at field level.`);if(AU.includes(a))throw QI.operatorUnsupported(a);switch(a){case`$eq`:case`$ne`:if(!PU(t[a]))throw QI.keyValueInvalid(e);break;case`$lt`:case`$lte`:case`$gt`:case`$gte`:if(!FU(t[a]))throw QI.keyValueInvalid(e);break;case`$in`:case`$nin`:this.validateInValue(e,t[a]);break;case`$startsWith`:case`$notStartsWith`:case`$endsWith`:case`$notEndsWith`:case`$contains`:case`$notContains`:if(typeof t[a]!=`string`)throw QI.keyValueInvalid(e);break;case`$regex`:i=this.validateRegex(e,t,n);break;case`$options`:if(typeof t[a]!=`string`)throw QI.keyValueInvalid(e);break;case`$mod`:{if(n)throw QI.operatorUnsupported(`$mod`);let r=t[a];if(!Array.isArray(r)||r.length!==2||typeof r[0]!=`number`||typeof r[1]!=`number`||r[0]===0)throw QI.keyValueInvalid(e);break}case`$size`:{if(n)throw QI.operatorUnsupported(`$size`);let r=t[a];if(typeof r!=`number`||!Number.isInteger(r)||r<0)throw QI.keyValueInvalid(e);break}case`$exists`:if(typeof t[a]!=`boolean`)throw QI.keyValueInvalid(e);break;case`$elemMatch`:if(n)throw QI.operatorUnsupported(`$elemMatch`);if(!NU(t[a])||Object.keys(t[a]).length===0)throw QI.keyValueInvalid(e);break;case`$all`:if(n)throw QI.operatorUnsupported(`$all`);this.validateInValue(e,t[a]);break;case`$not`:{if(n)throw QI.syntaxInvalid(`The operator $not can not be nested or negated.`);let r=t[a];if(r instanceof RegExp)throw QI.operatorUnsupported(`$regex`);if(!NU(r)||Object.keys(r).length===0)throw QI.syntaxInvalid(`The value of the operator $not of the key ${e} must be a non-empty object of field operators.`);this.validateOperatorObject(e,r,!0);break}default:throw QI.syntaxInvalid(`The operator ${a} is unknown.`)}}return i}validateRegex(e,t,n){if(n)throw QI.operatorUnsupported(`$regex`);let r=t.$regex;if(r instanceof RegExp){if(t.$options!==void 0)throw QI.syntaxInvalid(`The operator $options of the key ${e} can not be combined with a RegExp valued $regex.`);return r}if(typeof r!=`string`)throw QI.keyValueInvalid(e);let i=``;if(t.$options!==void 0){if(typeof t.$options!=`string`)throw QI.keyValueInvalid(e);i=t.$options}try{return new RegExp(r,i)}catch{throw QI.keyValueInvalid(e)}}validateInValue(e,t){if(!Array.isArray(t)||t.length===0)throw QI.keyValueInvalid(e);for(let n of t)if(!PU(n))throw QI.keyValueInvalid(e)}buildOperatorObject(e,t,n,r,i){let a=[],o=Object.keys(e);for(let s of o){if(LU(s)){let[r,i]=OU[s];a.push(new vL(n?i:r,t.field,e[s]));continue}switch(s){case`$regex`:a.push(new vL(SI.REGEX,t.field,i));break;case`$options`:break;case`$mod`:a.push(new vL(SI.MOD,t.field,e[s]));break;case`$size`:a.push(new vL(SI.SIZE,t.field,e[s]));break;case`$exists`:a.push(new vL(SI.EXISTS,t.field,n?!e[s]:e[s]));break;case`$elemMatch`:{let n=this.buildElemMatch(e[s],t,r);n&&a.push(n);break}case`$all`:for(let n of e[s])a.push(new vL(SI.ELEM_MATCH,t.field,new vL(SI.EQUAL,gL,n)));break;case`$not`:{let i=this.buildOperatorObject(e[s],t,!n,r),o=this.combineDocument(i,!n);o&&a.push(o);break}}}return a}buildElemMatch(e,t,n){if(n>jU)throw QI.syntaxInvalid(`The maximum nesting depth was exceeded.`);if(Object.keys(e).some(e=>kU.includes(e))){let r=this.validateOperatorObject(t.field,e,!1),i=this.buildOperatorObject(e,{field:gL,name:gL,scope:this.buildUnboundScope(t.scope)},!1,n+1,r),a=this.combineDocument(i,!1);return a?new vL(SI.ELEM_MATCH,t.field,a):void 0}let r;if(t.name===`$this`)r=this.buildUnboundScope(t.scope);else try{let e=t.scope.descend(t.name);if(e instanceof oL)r=e;else if(e.code!==XI.SCHEMA_UNRESOLVABLE)return}catch(e){if(!(e instanceof yI)||e.code!==pI.KEY_PATH_INVALID)throw e}r||=this.buildUnboundScope(t.scope);let i=this.parseDocument(e,r,!1,n+1),a=this.combineDocument(i,!1);if(a)return new vL(SI.ELEM_MATCH,t.field,a)}buildUnboundScope(e){return oL.for(this.registry,uI.FILTERS,void 0,{throwOnFailure:e.throwOnFailure,strict:e.strict})}};function NU(e){if(!ZF(e))return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function PU(e){return e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e instanceof Date}function FU(e){return typeof e==`string`||typeof e==`number`||e instanceof Date}function IU(e){return DU.includes(e)}function LU(e){return Object.prototype.hasOwnProperty.call(OU,e)}var RU=function(e){return e.COMPOSITE=`composite`,e.DATE=`date`,e.TIME=`time`,e.ATTRIBUTE_NAMES=`attributeNames`,e.ATTRIBUTES=`attributes`,e.REALM_MATCH=`realmMatch`,e.IDENTITY=`identity`,e.PERMISSION_BINDING=`permissionBinding`,e}({}),zU=class extends ed{initialize(){super.initialize(),this.mount(`query`,U(aw({}))),this.mount(`invert`,U(jC().or(HC()).or(BC()).optional()))}},BU=class{validator;parser;constructor(){this.validator=new zU,this.parser=new MU}requires(){return[RU.ATTRIBUTES]}async toCondition(e){let t,n;try{t=await this.validator.run(e),this.fixQuery(t.query),n=this.parser.parse(t.query)}catch{return null}return t.invert?TL(n):n}async accessData(e){if(!e.data.has(RU.ATTRIBUTES))return null;if(e.data.isValidated(RU.ATTRIBUTES))return e.data.get(RU.ATTRIBUTES);let t=e.data.get(RU.ATTRIBUTES);return e.data.set(RU.ATTRIBUTES,t),e.data.setValidated(RU.ATTRIBUTES),t}async evaluate(e,t){let n=await this.validator.run(e),r=await this.accessData(t);if(!r)return{success:!1,issues:[rU({code:nU.DATA_MISSING,message:`The data property attributes is missing`,path:t.path})]};this.fixQuery(n.query);let i;try{i=EU(this.parser.parse(n.query),{caseSensitive:!0})}catch(e){return{success:!1,issues:[rU({code:nU.FIELD_INVALID,message:e instanceof Error?e.message:`The query could not be parsed.`,path:t.path})]}}return{success:fU(i(r),n.invert)}}fixQuery(e){if(Array.isArray(e)){for(let t of e)this.fixQuery(t);return}if(uE(e)){let t=Object.keys(e);for(let n of t){let t=e[n];if(uE(t)||Array.isArray(t)){this.fixQuery(t);continue}if(n===`$regex`&&typeof t==`string`){let r=t.match(/\/(.*?)\/([a-z]*)?$/i);r&&r[1]!==void 0&&(e[n]=new RegExp(r[1],r[2]||``))}}}}},VU=class{validator;attributesEvaluator;constructor(){this.validator=new pU,this.attributesEvaluator=new BU}async evaluate(e,t){let n=t.data.has(RU.ATTRIBUTE_NAMES),r=t.data.has(RU.ATTRIBUTES);if(!n&&!r)return{success:!1,pending:!0,issues:[rU({code:nU.DATA_MISSING,message:`The data property attributeNames or attributes is missing`,path:t.path})]};let i=await this.validator.run(e),a=new Set;if(n){let e=t.data.get(RU.ATTRIBUTE_NAMES);if(!Array.isArray(e)||e.some(e=>typeof e!=`string`))return{success:!1,issues:[rU({code:nU.DATA_INVALID,message:`The data property attributeNames must be a list of attribute names`,path:t.path})]};for(let t of e)a.add(t)}if(r){let e=await this.attributesEvaluator.accessData(t);if(e){let t=fE(e);for(let e of Object.keys(t))a.add(e)}}let o=[];for(let e of a){let n=i.names.includes(e);(i.invert?n:!n)&&o.push(rU({code:nU.EVALUATION_DENIED,message:i.invert?`The attribute ${e} is denied`:`The attribute ${e} is not included`,path:[...t.path,e]}))}return{success:o.length===0,issues:o}}},HU=class extends ed{initialize(){super.initialize(),this.mount(`decisionStrategy`,U(Tw(WT).or(HC()).or(BC()).optional())),this.mount(`children`,U(ew(aw({type:TS().min(3)})))),this.mount(`invert`,U(jC().or(HC()).or(BC()).optional()))}},UU=class{validator;constructor(){this.validator=new HU}async evaluate(e,t){let n=await this.validator.run(e);if(n.children.length===0)return{success:!1,issues:[rU({code:nU.INVALID,message:`A composite policy must define at least one child policy.`,path:t.path})]};let r=0,i=0,a=n.decisionStrategy??WT.UNANIMOUS,o=new lU(t.evaluators),s=[],c=[],l=[],u=0;for(let e of n.children){let d=[...t.path||[],...e.type?[e.type]:[]],f=await o.evaluate(e,{...t,path:d});if(f.pending){i++,f.condition?l.push(f.condition):u++,f.issues&&f.issues.length>0&&c.push(Lu({message:`The evaluation of child policy ${e.type} is pending`,issues:f.issues,path:d}));continue}if(f.success){if(a===WT.AFFIRMATIVE)return{success:fU(!0,n.invert),issues:[]};r++}else{if(f.issues&&s.push(Lu({message:`The evaluation of child policy ${e.type} failed`,issues:f.issues||[],path:d})),a===WT.UNANIMOUS){let e=fU(!1,n.invert);return{success:e,issues:e?[]:[Lu({message:`The evaluation of composite policy failed (${WT.UNANIMOUS})`,issues:s,path:t.path})]}}r--}}let d;switch(a){case WT.AFFIRMATIVE:d=i>0&&null;break;case WT.UNANIMOUS:d=i>0?null:r>0;break;default:d=r-i>0?!0:r+i<=0?!1:null}if(d===null){let e=null;if(t.withConditions&&u===0&&l.length>0&&a!==WT.CONSENSUS){if(l.length===1){let[t]=l;e=t??null}else e=a===WT.AFFIRMATIVE?wL(...l):CL(...l);e&&n.invert&&(e=TL(e))}return{success:!1,pending:!0,...e?{condition:e}:{},issues:c}}if(d)return{success:fU(!0,n.invert)};let f=fU(!1,n.invert);return{success:f,issues:f?[]:[Lu({message:`The evaluation of composite policy failed (${a})`,issues:s||[],path:t.path})]}}},WU=class extends ed{initialize(){super.initialize(),this.mount(`start`,U(QC().or($x()).or(CC()).or(HC()).or(BC()).optional())),this.mount(`end`,U(QC().or($x()).or(CC()).or(HC()).or(BC()).optional())),this.mount(`invert`,U(jC().or(BC()).or(HC()).optional()))}};function GU(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function KU(e){return typeof e==`string`||typeof e==`number`?new Date(e):e}var qU=class{validator;constructor(){this.validator=new WU}async evaluate(e,t){let n=await this.validator.run(e),r;if(t.data.has(RU.DATE)?t.data.isValidated(RU.DATE)?r=t.data.get(RU.DATE):(r=GU(KU(t.data.get(RU.DATE))),t.data.set(RU.DATE,r),t.data.setValidated(RU.DATE)):r=GU(new Date),n.start){let e=GU(KU(n.start));if(r<e)return{success:fU(!1,n.invert)}}if(n.end){let e=GU(KU(n.end));if(r>e)return{success:fU(!1,n.invert)}}return{success:fU(!0,n.invert)}}},JU=class extends ed{initialize(){super.initialize(),this.mount(`type`,U(TS().min(3).max(128))),this.mount(`id`,U(MS())),this.mount(`clientId`,U(MS().or(HC()).or(BC()).optional())),this.mount(`realmId`,U(MS().or(HC()).or(BC()).optional())),this.mount(`realmName`,U(TS().min(3).max(128).or(HC()).or(BC()).optional()))}},YU=class extends ed{initialize(){this.mount(`types`,U(ew(TS()).or(HC()).or(BC()).optional())),this.mount(`invert`,U(jC().or(HC()).or(BC()).optional()))}},XU=class{validator;dataValidator;constructor(){this.validator=new YU,this.dataValidator=new JU}requires(){return[RU.IDENTITY]}async accessData(e){if(!e.data.has(`identity`))return null;if(e.data.isValidated(`identity`))return e.data.get(`identity`);let t=await this.dataValidator.run(e.data.get(`identity`));return e.data.set(`identity`,t),e.data.setValidated(`identity`),t}async evaluate(e,t){let n=await this.validator.run(e),r=await this.accessData(t);if(!r)return{success:!1,issues:[rU({code:nU.DATA_MISSING,message:`The data property identity is missing`,path:t.path})]};if(!n.types||n.types.length===0)return{success:!0};let i=n.types.includes(r.type);return i?{success:fU(i,n.invert)}:{success:fU(i,n.invert),issues:[rU({code:nU.EVALUATION_DENIED,message:`The type ${r.type} is not covered by the policy configuration`,path:t.path})]}}},ZU=class extends ed{initialize(){}},QU=class{validator;constructor(){this.validator=new ZU}requires(){return[RU.PERMISSION_BINDING]}async evaluate(e){return{success:fU(!0,(await this.validator.run(e)).invert)}}},$U=class extends ed{initialize(){super.initialize(),this.mount(`decisionStrategy`,U(Tw(WT).or(HC()).or(BC()).optional())),this.mount(`attributeName`,U(TS().min(3).or(ew(TS().min(3))).or(HC()).or(BC()).optional())),this.mount(`attributeNameStrict`,U(jC().or(HC()).or(BC()).optional())),this.mount(`attributeNullMatchAll`,U(jC().or(HC()).or(BC()).optional())),this.mount(`scope`,U(Tw(qH).or(HC()).or(BC()).optional())),this.mount(`invert`,U(jC().or(HC()).or(BC()).optional()))}},eW=class{validator;identityEvaluator;attributesEvaluator;constructor(){this.validator=new $U,this.identityEvaluator=new XU,this.attributesEvaluator=new BU}requires(e){return e.scope?[RU.IDENTITY]:[RU.IDENTITY,RU.ATTRIBUTES]}async toCondition(e,t){let n;try{n=await this.validator.run(e)}catch{return null}let r=await this.identityEvaluator.accessData(t);if(!r)return null;let i=r.realmId??null;if(n.scope){let e=JH(n.scope),t=typeof n.attributeName==`string`?n.attributeName:`realmId`,r;if(e===qH.ANY)r=xL(t,[]);else{let n=[];e!==qH.NONE&&i!==null&&n.push(yL(t,i)),e===qH.OWN_OR_NULL&&n.push(yL(t,null)),r=n.length===0?bL(t,[]):n.length===1?n[0]:wL(...n)}return n.invert?TL(r):r}if(typeof n.attributeName!=`string`||(n.attributeNameStrict??!0)===!1)return null;let a=n.attributeName,o=[];if(n.attributeNullMatchAll&&o.push(yL(a,null)),r.realmId!==void 0&&o.push(yL(a,r.realmId)),r.realmName!==void 0&&o.push(yL(a,r.realmName)),o.length===0)return n.invert?xL(a,[]):bL(a,[]);let s=o.length===1?o[0]:wL(...o);return n.invert?TL(s):s}async evaluate(e,t){let n=await this.validator.run(e),r=await this.identityEvaluator.accessData(t);if(!r)return{success:!1,issues:[rU({code:nU.DATA_MISSING,message:`The data property identity is missing`,path:t.path})]};if(n.scope){if(!t.data||!t.data.has(RU.REALM_MATCH)){if(t.withConditions){let n=await this.toCondition(e,t);return{success:!1,pending:!0,...n?{condition:n}:{}}}return{success:!0}}let i=t.data.get(RU.REALM_MATCH);return{success:fU(XH(n.scope,i??null,r.realmId,r.realmName),n.invert)}}let i=await this.attributesEvaluator.accessData(t);if(!i)return{success:!1,issues:[rU({code:nU.DATA_MISSING,message:`The data property attributes is missing`,path:t.path})]};let a;if(n.attributeName?a=Array.isArray(n.attributeName)?n.attributeName:[n.attributeName]:(a=[`realm_id`,`realm_name`,`realmId`,`realmName`],n.decisionStrategy=WT.CONSENSUS),!(n.attributeNameStrict??!0)){let e=Object.keys(i),t=[];for(let n of e){let e=!1;for(let t of a)if(n!==t&&n.includes(t)){e=!0;break}e&&t.push(n)}t.length>0&&a.push(...t)}let o=0,s=!1;for(let e of a){if(!cE(i,e))continue;s=!0;let t=!1,a=i[e];if((a===null&&n.attributeNullMatchAll||a===r.realmId||a===r.realmName)&&(t=!0),t){if(n.decisionStrategy===WT.AFFIRMATIVE)return{success:fU(!0,n.invert)};o++}else{if(n.decisionStrategy===WT.UNANIMOUS)return{success:fU(!1,n.invert)};o--}}return s?{success:fU(o>0,n.invert)}:{success:!0}}},tW=function(e){return e.DAILY=`daily`,e.WEEKLY=`weekly`,e.MONTHLY=`monthly`,e.YEARLY=`yearly`,e}({});function nW(e){return e===tW.WEEKLY||e===tW.MONTHLY||e===tW.YEARLY}function rW(e){return e===tW.MONTHLY||e===tW.YEARLY}function iW(e){return e===tW.YEARLY}var aW=class extends ed{initialize(){super.initialize(),this.mount(`dayOfWeek`,U(CC().min(0).max(6).or(HC()).or(BC()).optional())),this.mount(`dayOfMonth`,U(CC().min(1).max(31).or(HC()).or(BC()).optional())),this.mount(`dayOfYear`,U(CC().min(1).max(365).or(HC()).or(BC()).optional())),this.mount(`start`,U(QC().or(Zx()).or(tS()).or(CC()).or(HC()).or(BC()).optional())),this.mount(`end`,U(QC().or(Zx()).or(tS()).or(CC()).or(HC()).or(BC()).optional())),this.mount(`interval`,U(Tw(tW).or(HC()).or(BC()).optional())),this.mount(`invert`,U(jC().or(BC()).or(HC()).optional()))}},oW=/^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/;function sW(e,t){let n=t?new Date(t):new Date;return n.setHours(e.getHours(),e.getMinutes()),n}function cW(e,t){if(typeof e==`string`){if(oW.test(e)){let n=e.split(`:`),r=Number(n[0]),i=Number(n[1]),a=n[2]===void 0?0:Number(n[2]);if(Number.isFinite(r)&&Number.isFinite(i)&&Number.isFinite(a)){let e=t?new Date(t):new Date;return e.setHours(r,i,a,0),e}}return new Date(e)}return typeof e==`number`?new Date(e):e}var lW=class{validator;constructor(){this.validator=new aW}async evaluate(e,t){let n=await this.validator.run(e),r;if(t.data.has(RU.TIME)?t.data.isValidated(RU.TIME)?r=t.data.get(RU.TIME):(r=cW(t.data.get(RU.TIME)),t.data.set(RU.TIME,r),t.data.setValidated(RU.TIME)):r=new Date,n.start){let e=sW(cW(n.start,r),r);if(r<e)return{success:fU(!1,n.invert)}}if(n.end){let e=sW(cW(n.end,r),r);if(r>e)return{success:fU(!1,n.invert)}}if(n.interval){if(nW(n.interval)&&n.dayOfWeek&&r.getDay()!==n.dayOfWeek||rW(n.interval)&&n.dayOfMonth&&r.getDate()!==n.dayOfMonth)return{success:fU(!1,n.invert)};if(iW(n.interval)&&n.dayOfYear){let e=new Date(r.getFullYear(),0,0),t=r.getTime()-e.getTime()+(e.getTimezoneOffset()-r.getTimezoneOffset())*60*1e3;if(Math.floor(t/864e5)!==n.dayOfYear)return{success:fU(!1,n.invert)}}}return{success:fU(!0,n.invert)}}},uW={[RU.COMPOSITE]:new UU,[RU.ATTRIBUTES]:new BU,[RU.ATTRIBUTE_NAMES]:new VU,[RU.DATE]:new qU,[RU.IDENTITY]:new XU,[RU.PERMISSION_BINDING]:new QU,[RU.REALM_MATCH]:new eW,[RU.TIME]:new lW};function dW(e={}){return new uU(e)}var fW=class{provider;policyEngine;clientId;realmId;constructor(e){this.provider=e.provider,this.clientId=e.clientId||null,this.realmId=e.realmId||null,this.policyEngine=e.policyEngine?e.policyEngine:new lU(uW)}async findOne(e,t={}){return this.provider.findOne({name:e,clientId:t.clientId??this.clientId,realmId:t.realmId??this.realmId})}async evaluate(e){if(!Array.isArray(e.name)){await this.evaluate({...e,name:[e.name]});return}let{options:t={}}=e,n=t.decisionStrategy??WT.UNANIMOUS,r=[],i=0,a=e.data||new uU;for(let o of e.name){let s=await this.findOne(o,{realmId:e.realmId,clientId:e.clientId});if(!s){if(r.push(Iu({code:H.PERMISSION_NOT_FOUND,message:`The ${o} permission could not be resolved`,path:[o]})),n===WT.UNANIMOUS){let t=KH.evaluationFailed(e.name);throw t.addIssues(r),t}continue}let c=s.grants.map(e=>e.policy).filter(e=>!!e);if(c.length<s.grants.length){if(n===WT.AFFIRMATIVE)return;i++;continue}let l=a.clone();l.set(RU.PERMISSION_BINDING,s);let u={type:RU.COMPOSITE,decisionStrategy:WT.AFFIRMATIVE,children:c},d=await this.policyEngine.evaluate(u,dU({include:t.policiesIncluded,exclude:t.policiesExcluded,data:l}));if(d.success||t.pendingPolicies===`permit`&&d.pending){if(n===WT.AFFIRMATIVE)return;i++}else{if(r.push(iU({code:H.PERMISSION_EVALUATION_FAILED,issues:d.issues||[],message:`The ${s.permission.name} permissions policy evaluation failed`,path:[s.permission.name]})),n===WT.UNANIMOUS){let e=KH.evaluationFailed(s.permission.name);throw e.addIssues(r),e}i--}}if(!(i>0)){if(r.length===0)throw KH.deniedAll(e.name);{let t=KH.evaluationFailed(e.name);throw t.addIssues(r),t}}}async evaluateOneOf(e){return this.evaluate({...e,options:{...e.options||{},decisionStrategy:WT.AFFIRMATIVE}})}async preEvaluate(e){return this.evaluate({...e,options:{...e.options||{},pendingPolicies:`permit`}})}async preEvaluateOneOf(e){return this.preEvaluate({...e,options:{...e.options||{},decisionStrategy:WT.AFFIRMATIVE}})}async compile(e){let t=Array.isArray(e.name)?e.name:[e.name],n=e.data||new uU,r=[],i=!1;for(let a of t){let t=await this.findOne(a,{realmId:e.realmId,clientId:e.clientId});if(!t)continue;let o=t.grants.map(e=>e.policy).filter(e=>!!e);if(o.length<t.grants.length)return{verdict:`allow`};let s=n.clone();s.set(RU.PERMISSION_BINDING,t);let c={type:RU.COMPOSITE,decisionStrategy:WT.AFFIRMATIVE,children:o},l=await this.policyEngine.evaluate(c,dU({data:s,withConditions:!0}));if(l.success)return{verdict:`allow`};l.pending&&(l.condition?r.push(l.condition):i=!0)}if(i)return{verdict:`post`};if(r.length===0)return{verdict:`deny`};if(r.length===1){let[e]=r;return{verdict:`conditional`,condition:e}}return{verdict:`conditional`,condition:wL(...r)}}},pW=function(e){return e.LOGGING_IN=`loggingIn`,e.LOGGED_IN=`loggedIn`,e.LOGGING_OUT=`loggingOut`,e.LOGGED_OUT=`loggedOut`,e.SESSION_EXPIRED=`sessionExpired`,e.RESOLVING=`resolving`,e.RESOLVED=`resolved`,e.ACCESS_TOKEN_UPDATED=`accessTokenUpdated`,e.ACCESS_TOKEN_EXPIRE_DATE_UPDATED=`accessTokenExpireDateUpdated`,e.REFRESH_TOKEN_UPDATED=`refreshTokenUpdated`,e.ID_TOKEN_UPDATED=`idTokenUpdated`,e.USER_UPDATED=`userUpdated`,e.REALM_UPDATED=`realmUpdated`,e.REALM_MANAGEMENT_UPDATED=`realmManagementUpdated`,e}({});function mW(){return new eH}var hW=Symbol.for(`AuthupStoreEventBus`);function gW(e){let t=IH(hW,e);if(!t)throw Error(`The store dispatcher has not been injected in the app context.`);return t}function _W(e,t){LH(hW,e,t)}function vW(e){let t;return(...n)=>{if(t)return t;t=new Promise((t,r)=>{e(...n).then(e=>t(e)).catch(e=>r(e))});let r=()=>{setTimeout(()=>{t=void 0},0)};return t.then(r,r),t}}function yW(e){let t=e.httpClient??new ZV({baseURL:e.baseURL}),n=E(!1),r=e=>{n.value=e},i=E(null),a=t=>{i.value=t,e.dispatcher.emit(pW.ACCESS_TOKEN_UPDATED,t)},o=E(null),s=t=>{typeof t==`number`||typeof t==`string`?o.value=new Date(t):o.value=t,e.dispatcher.emit(pW.ACCESS_TOKEN_EXPIRE_DATE_UPDATED,o.value)},c=E(null),l=t=>{c.value=t,e.dispatcher.emit(pW.REFRESH_TOKEN_UPDATED,t)},u=E(null),d=t=>{u.value=t,e.dispatcher.emit(pW.ID_TOKEN_UPDATED,t)},f=E(null),p=B(()=>f.value?f.value.id:null),m=t=>{f.value=t,e.dispatcher.emit(pW.USER_UPDATED,t)},h=E(null),g=E(null),_=E(null),v=B(()=>_.value?_.value.id:void 0),y=B(()=>_.value?_.value.name:void 0),b=B(()=>_.value?_.value.name===Cte:!1),x=t=>{_.value=t,e.dispatcher.emit(pW.REALM_UPDATED,t)},S=E(null),ee=B(()=>S.value?S.value.id:v.value),C=B(()=>S.value?S.value.name:y.value),w=t=>{S.value=t,e.dispatcher.emit(pW.REALM_MANAGEMENT_UPDATED,t)},te=new tU,ne=new fW({provider:te,policyEngine:new lU}),re=E(null),ie=E(null),ae=B(()=>re.value?UH.AUTHENTICATING:i.value?_.value&&f.value?UH.AUTHENTICATED:UH.RESTORING:c.value?UH.RESTORING:UH.UNAUTHENTICATED),oe=E(0),se=E(!1),ce=E(!1),le=async()=>{let e=i.value,n=c.value;a(null),s(null),l(null),d(null),m(null),h.value=null,g.value=null,x(null),w(null),ie.value=null,te.setMany([]),se.value=!1,ce.value=!1,oe.value+=1;let r=oe.value;try{e&&await t.token.revoke({token:e})}catch{}try{n&&await t.token.revoke({token:n})}catch{}return r},ue=async e=>t.token.introspect({token:e},{authorizationHeader:{type:`Bearer`,token:e}}),de=async e=>t.userInfo.get(`Bearer ${e}`),fe=(e,t)=>!!e&&t.sub_kind===xE.USER&&t.sub===e.id,pe=e=>e.generation===oe.value&&(e.grant&&he(e.grant),e.introspection.exp&&e.token===i.value&&s(new Date(e.introspection.exp*1e3)),e.introspection.session_id&&(h.value=e.introspection.session_id),g.value=e.introspection.acr??null,e.introspection.realm_id&&e.introspection.realm_name&&(_.value={id:e.introspection.realm_id,name:e.introspection.realm_name},S.value||w(_.value)),e.user&&m(e.user),e.introspection.permissions&&te.setMany(e.introspection.permissions.map(e=>({permission:{name:e.name,realmId:e.realm_id,clientId:e.client_id}}))),se.value=!0,e.token===i.value&&(ce.value=!1),e.origin?ie.value=e.origin:ie.value||=WH.RESTORE,!0),me=async e=>{try{await t.token.revoke({token:e.access_token})}catch{}if(e.refresh_token)try{await t.token.revoke({token:e.refresh_token})}catch{}},he=e=>{let t=new Date(Date.now()+e.expires_in*1e3);s(t),a(e.access_token),e.refresh_token?l(e.refresh_token):l(null),e.id_token&&d(e.id_token),ce.value=!0},ge=vW(async()=>{if(!c.value)throw new DE(`The access token can not be renewed.`);let e=oe.value,n;try{n=await t.token.createWithRefreshToken({refresh_token:c.value})}catch(t){throw e===oe.value&&await le(),t}if(e!==oe.value)throw await me(n),new DE(`The session was torn down before the token could be refreshed.`);he(n)}),_e=async()=>{let e=oe.value,t=i.value;if(!t)return;let n=await ue(t),r=fe(f.value,n)?void 0:await de(t);pe({generation:e,token:t,introspection:n,user:r})},ve=vW(async()=>{if(e.dispatcher.emit(pW.RESOLVING),!i.value&&c.value&&await ge(),i.value&&(!se.value||ce.value))try{await _e()}catch(e){if(c.value)await ge(),await _e();else throw e}i.value&&!ie.value&&(ie.value=WH.RESTORE),e.dispatcher.emit(pW.RESOLVED)}),ye=B(()=>!!i.value),be=async(e,t,n)=>{let r=!1;try{let i=await ue(e.access_token),a=await de(e.access_token);r=pe({generation:n,token:e.access_token,grant:e,introspection:i,user:a,origin:t})}finally{r||await me(e)}if(!r)throw new DE(`The session was torn down before the login could be established.`)};return{cookiesRead:n,setCookiesRead:r,permissionEvaluator:ne,login:async n=>{e.dispatcher.emit(pW.LOGGING_IN),re.value=WH.LOGIN;try{let e=await t.token.createWithPassword({username:n.name,password:n.password,...n.realmId?{realm_id:n.realmId}:{},...n.otp?{otp:n.otp}:{}}),r=await le();await be(e,WH.LOGIN,r)}finally{re.value=null}e.dispatcher.emit(pW.LOGGED_IN)},loginWithTokenGrant:async t=>{e.dispatcher.emit(pW.LOGGING_IN),re.value=WH.LOGIN;try{let e=await le();await be(t,WH.LOGIN,e)}finally{re.value=null}e.dispatcher.emit(pW.LOGGED_IN)},logout:async()=>{e.dispatcher.emit(pW.LOGGING_OUT),await le(),e.dispatcher.emit(pW.LOGGED_OUT)},loggedIn:ye,status:ae,lastAuthOrigin:ie,resolve:ve,exchangeAuthorizationCode:async(e,n={})=>{re.value=WH.EXCHANGE;try{let r=await t.token.createWithAuthorizationCode({code:e,...n}),i=await le();await be(r,WH.EXCHANGE,i)}finally{re.value=null}},applyTokenGrantResponse:he,accessToken:i,setAccessToken:a,accessTokenExpireDate:o,setAccessTokenExpireDate:s,refreshToken:c,setRefreshToken:l,idToken:u,setIdToken:d,realm:_,realmId:v,realmIsRoot:b,realmName:y,setRealm:x,realmManagement:S,realmManagementId:ee,realmManagementName:C,setRealmManagement:w,user:f,userId:p,setUser:m,sessionId:h,acr:g}}var bW={},xW;function SW(){if(xW)return bW;xW=1,Object.defineProperty(bW,"__esModule",{value:!0}),bW.parseCookie=s,bW.parse=s,bW.stringifyCookie=c,bW.stringifySetCookie=l,bW.serialize=l,bW.parseSetCookie=u,bW.stringifySetCookie=l,bW.serialize=l;let e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=/^-?\d+$/,a=Object.prototype.toString,o=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function s(e,t){let n=new o,r=e.length;if(r<2)return n;let i=t?.decode||m,a=0;do{let t=f(e,a,r);if(t===-1)break;let o=d(e,a,r);if(t>o){a=e.lastIndexOf(`;`,t-1)+1;continue}let s=p(e,a,t);n[s]===void 0&&(n[s]=i(p(e,t+1,o))),a=o+1}while(a<r);return n}function c(n,r){let i=r?.encode||encodeURIComponent,a=[];for(let r of Object.keys(n)){let o=n[r];if(o===void 0)continue;if(!e.test(r))throw TypeError(`cookie name is invalid: ${r}`);let s=i(o);if(!t.test(s))throw TypeError(`cookie val is invalid: ${o}`);a.push(`${r}=${s}`)}return a.join(`; `)}function l(i,a,o){let s=typeof i==`object`?i:{...o,name:i,value:String(a)},c=(typeof a==`object`?a:o)?.encode||encodeURIComponent;if(!e.test(s.name))throw TypeError(`argument name is invalid: ${s.name}`);let l=s.value?c(s.value):``;if(!t.test(l))throw TypeError(`argument val is invalid: ${s.value}`);let u=s.name+`=`+l;if(s.maxAge!==void 0){if(!Number.isInteger(s.maxAge))throw TypeError(`option maxAge is invalid: ${s.maxAge}`);u+=`; Max-Age=`+s.maxAge}if(s.domain){if(!n.test(s.domain))throw TypeError(`option domain is invalid: ${s.domain}`);u+=`; Domain=`+s.domain}if(s.path){if(!r.test(s.path))throw TypeError(`option path is invalid: ${s.path}`);u+=`; Path=`+s.path}if(s.expires){if(!h(s.expires)||!Number.isFinite(s.expires.valueOf()))throw TypeError(`option expires is invalid: ${s.expires}`);u+=`; Expires=`+s.expires.toUTCString()}if(s.httpOnly&&(u+=`; HttpOnly`),s.secure&&(u+=`; Secure`),s.partitioned&&(u+=`; Partitioned`),s.priority)switch(typeof s.priority==`string`?s.priority.toLowerCase():void 0){case`low`:u+=`; Priority=Low`;break;case`medium`:u+=`; Priority=Medium`;break;case`high`:u+=`; Priority=High`;break;default:throw TypeError(`option priority is invalid: ${s.priority}`)}if(s.sameSite)switch(typeof s.sameSite==`string`?s.sameSite.toLowerCase():s.sameSite){case!0:case`strict`:u+=`; SameSite=Strict`;break;case`lax`:u+=`; SameSite=Lax`;break;case`none`:u+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid: ${s.sameSite}`)}return u}function u(e,t){let n=t?.decode||m,r=e.length,a=d(e,0,r),o=f(e,0,a),s=o===-1?{name:``,value:n(p(e,0,a))}:{name:p(e,0,o),value:n(p(e,o+1,a))},c=a+1;for(;c<r;){let t=d(e,c,r),n=f(e,c,t),a=n===-1?p(e,c,t):p(e,c,n),o=n===-1?void 0:p(e,n+1,t);switch(a.toLowerCase()){case`httponly`:s.httpOnly=!0;break;case`secure`:s.secure=!0;break;case`partitioned`:s.partitioned=!0;break;case`domain`:s.domain=o;break;case`path`:s.path=o;break;case`max-age`:o&&i.test(o)&&(s.maxAge=Number(o));break;case`expires`:if(!o)break;let e=new Date(o);Number.isFinite(e.valueOf())&&(s.expires=e);break;case`priority`:if(!o)break;let t=o.toLowerCase();(t===`low`||t===`medium`||t===`high`)&&(s.priority=t);break;case`samesite`:if(!o)break;let n=o.toLowerCase();(n===`lax`||n===`strict`||n===`none`)&&(s.sameSite=n)}c=t+1}return s}function d(e,t,n){let r=e.indexOf(`;`,t);return r===-1?n:r}function f(e,t,n){let r=e.indexOf(`=`,t);return r<n?r:-1}function p(e,t,n){let r=t,i=n;do{let t=e.charCodeAt(r);if(t!==32&&t!==9)break}while(++r<i);for(;i>r;){let t=e.charCodeAt(i-1);if(t!==32&&t!==9)break;i--}return e.slice(r,i)}function m(e){if(e.indexOf(`%`)===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function h(e){return a.call(e)===`[object Date]`}return bW}var CW=SW();function wW(){let e=typeof globalThis>`u`?void 0:globalThis.TEST_HAS_DOCUMENT_COOKIE;return typeof e==`boolean`?e:typeof document==`object`&&typeof document.cookie==`string`}function TW(e){return typeof e==`string`?CW.parse(e):typeof e==`object`&&e?e:{}}function EW(e,t={}){let n=DW(e);if(!t.doNotParse)try{return JSON.parse(n)}catch{}return e}function DW(e){return e&&e[0]===`j`&&e[1]===`:`?e.substr(2):e}var OW=class{constructor(e,t={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;let e=this.cookies;this.cookies=CW.parse(document.cookie),this._checkChanges(e)};let n=typeof document>`u`?``:document.cookie;this.cookies=TW(e||n),this.defaultSetOptions=t,this.HAS_DOCUMENT_COOKIE=wW()}_emitChange(e){for(let t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)}_checkChanges(e){new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach(t=>{e[t]!==this.cookies[t]&&this._emitChange({name:t,value:EW(this.cookies[t])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(e,t={}){return t.doNotUpdate||this.update(),EW(this.cookies[e],t)}getAll(e={}){e.doNotUpdate||this.update();let t={};for(let n in this.cookies)t[n]=EW(this.cookies[n],e);return t}set(e,t,n){n=n?Object.assign(Object.assign({},this.defaultSetOptions),n):this.defaultSetOptions;let r=typeof t==`string`?t:JSON.stringify(t);this.cookies=Object.assign(Object.assign({},this.cookies),{[e]:r}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=CW.serialize(e,r,n)),this._emitChange({name:e,value:t,options:n})}remove(e,t){let n=t=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=CW.serialize(e,``,n)),this._emitChange({name:e,value:void 0,options:t})}addChangeListener(e){this.changeListeners.push(e),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window==`object`&&`cookieStore`in window?window.cookieStore.addEventListener(`change`,this.update):this._startPolling())}removeChangeListener(e){let t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window==`object`&&`cookieStore`in window?window.cookieStore.removeEventListener(`change`,this.update):this._stopPolling())}removeAllChangeListeners(){for(;this.changeListeners.length>0;)this.removeChangeListener(this.changeListeners[0])}};function kW(e,{doNotParse:t=!1,autoUpdateDependencies:n=!1}={},r=new OW){let i=n?[...e||[]]:e,a=r.getAll({doNotParse:!0}),o=un(0),s=()=>{let e=r.getAll({doNotParse:!0});AW(i||null,e,a)&&o.value++,a=e};return r.addChangeListener(s),SN(()=>{r.removeChangeListener(s)}),{get:(...e)=>(n&&i&&!i.includes(e[0])&&i.push(e[0]),o.value,r.get(e[0],{doNotParse:t,...e[1]})),getAll:(...e)=>(o.value,r.getAll({doNotParse:t,...e[0]})),set:(...e)=>r.set(...e),remove:(...e)=>r.remove(...e),addChangeListener:(...e)=>r.addChangeListener(...e),removeChangeListener:(...e)=>r.removeChangeListener(...e)}}function AW(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}var jW=Symbol.for(`AuthupStore`);function MW(e,t){let n=NW(t);if(!n)throw Error(`The store has not been injected in the app context.`);return n(e)}function NW(e){let t=IH(jW,e);if(!t)throw Error(`The store factory has not been injected in the app context.`);return t}function PW(e){return!!IH(jW,e)}function FW(e,t){LH(jW,e,t)}function IW(e,t={}){if(PW(e))return;let n=mW();_W(n,e);let r=PH(HH,()=>yW({baseURL:t.baseURL,httpClient:t.httpClient,dispatcher:n})),i=r(t.pinia),a;a=t.cookieGet?t.cookieGet:kW().get;let o;o=t.cookieSet?t.cookieSet:kW().set;let s;s=t.cookieUnset?t.cookieUnset:t.cookieSet?(e,n)=>{t.cookieSet(e,null,n)}:kW().remove;let c=t.cookiePath||`/`,l=()=>{let e=typeof window>`u`?void 0:window.location?.pathname;if(typeof e!=`string`)return;let t=``;for(let n of e.split(`/`))if(n&&(t+=`/${n}`,t!==c))for(let e of Object.values(sF))s(e,{path:t})},u=()=>{if(i.cookiesRead)return;i.setCookiesRead(!0);let e=[sF.ACCESS_TOKEN_EXPIRE_DATE,...Object.values(sF).filter(e=>e!==sF.ACCESS_TOKEN_EXPIRE_DATE)],t;for(let n of e)if(t=a(n),t)switch(n){case sF.ACCESS_TOKEN:i.accessToken||i.setAccessToken(t);break;case sF.ACCESS_TOKEN_EXPIRE_DATE:i.accessTokenExpireDate||i.setAccessTokenExpireDate(t);break;case sF.REFRESH_TOKEN:i.refreshToken||i.setRefreshToken(t);break;case sF.ID_TOKEN:i.idToken||i.setIdToken(t);break;case sF.USER:i.user||i.setUser(t);break;case sF.REALM:i.realm||i.setRealm(t);break;case sF.REALM_MANAGEMENT:i.realmManagement||i.setRealmManagement(t)}},d=()=>{if(i.accessTokenExpireDate)return Math.floor(Math.max(1e3,new Date(`${i.accessTokenExpireDate}`).getTime()-Date.now())/1e3)};n.on(pW.ACCESS_TOKEN_EXPIRE_DATE_UPDATED,e=>{e?o(sF.ACCESS_TOKEN_EXPIRE_DATE,e,{maxAge:d(),path:c}):s(sF.ACCESS_TOKEN_EXPIRE_DATE,{path:c})}),n.on(pW.ACCESS_TOKEN_UPDATED,e=>{if(e){let t=d();o(sF.ACCESS_TOKEN,e,{maxAge:t,path:c})}else s(sF.ACCESS_TOKEN,{path:c})}),n.on(pW.REFRESH_TOKEN_UPDATED,e=>{e?o(sF.REFRESH_TOKEN,e,{path:c}):s(sF.REFRESH_TOKEN,{path:c})}),n.on(pW.ID_TOKEN_UPDATED,e=>{e?o(sF.ID_TOKEN,e,{path:c}):s(sF.ID_TOKEN,{path:c})}),n.on(pW.USER_UPDATED,e=>{e?o(sF.USER,e,{path:c}):s(sF.USER,{path:c})}),n.on(pW.REALM_UPDATED,e=>{e?o(sF.REALM,e,{path:c}):s(sF.REALM,{path:c})}),n.on(pW.REALM_MANAGEMENT_UPDATED,e=>{e?o(sF.REALM_MANAGEMENT,e,{path:c}):s(sF.REALM_MANAGEMENT,{path:c})}),l(),u(),FW(r,e)}function LW(e){e=an(e);let t={},n=Object.keys(e);for(let r of n){let n=e[r];(ln(n)||en(n))&&(t[r]=Sn(e,r))}return t}function RW(e,t={}){if(BH(e))return;let n=NW(e)(t.pinia),{refreshToken:r}=FH(n),i=null,a=new rH({baseURL:t.baseURL,tokenCreator:()=>{if(!r.value)throw Error(`No refresh token available.`);return i=r.value,(t.httpClient??new ZV({baseURL:t.baseURL})).token.createWithRefreshToken({refresh_token:i})},timer:!t.isServer}),o=gW(e);a.on($V.REFRESH_FINISHED,e=>{if(i===null||n.refreshToken!==i){c(),l();let n=t.httpClient??new ZV({baseURL:t.baseURL});if(Promise.resolve().then(()=>n.token.revoke({token:e.access_token})).catch(()=>{}),e.refresh_token){let t=e.refresh_token;Promise.resolve().then(()=>n.token.revoke({token:t})).catch(()=>{})}return}n.applyTokenGrantResponse(e)});let s=!1;a.on($V.HEADER_UNSET,()=>{s||Promise.resolve().then(()=>n.logout()).catch(()=>{}).finally(()=>{o.emit(pW.SESSION_EXPIRED)})});let c=()=>{s=!0,n.accessToken?(a.enable(),a.setAuthorizationHeader({type:`Bearer`,token:n.accessToken})):(a.disable(),a.unsetAuthorizationHeader()),s=!1},l=()=>{if(n.accessTokenExpireDate){let e=Math.floor((n.accessTokenExpireDate.getTime()-Date.now())/1e3);a.setTimer(e)}else a.clearTimer()};o.on(pW.ACCESS_TOKEN_UPDATED,()=>c()),o.on(pW.ACCESS_TOKEN_EXPIRE_DATE_UPDATED,()=>l()),c(),l(),VH(a,e)}var zW=Symbol.for(`AuthupHTTPClient`);function BW(e,t){LH(zW,e,t)}function VW(e){try{return!!HW(e)}catch{return!1}}function HW(e){let t=IH(zW,e);if(!t)throw Error(`The api client has not been injected.`);return t}function UW(e,t={}){if(VW(e))return;let n=t.httpClient??new ZV({baseURL:t.baseURL});zH(e).attach(n),BW(n,e)}function WW(e,t){if(t&&t._context&&t._context.provides&&t._context.provides[e])return t._context.provides[e];if(pr())return fr(e,void 0)}var GW=Symbol.for(`Ilingo`);function KW(e,t){if(t===void 0){dr(GW,e);return}t.provide(GW,e)}function qW(e){let t=WW(GW,e);if(!t)throw Error(`An ilingo instance is not present in the vue context.`);return t}function JW(e){return WW(GW,e)}var YW=Symbol.for(`ILocale`);function XW(e,t){let n=ln(e)?e:E(e);if(t===void 0){dr(YW,n);return}t.provide(YW,n)}function ZW(e){let t=WW(YW,e);if(!t)throw Error(`An ilingo locale is not present in the vue context.`);return t}function QW(e){return WW(YW,e)}var $W=new Set;function eG(e,t){try{return e.getSync(t)}catch(e){!SD(e)&&!cD()&&tG(e);return}}function tG(e){let t=e instanceof Error?`${e.name}: ${e.message}`:String(e);$W.has(t)||($W.add(t),console.warn(`[ilingo/vue] a synchronous translation lookup failed; falling back to the asynchronous one. ${t}`))}function nG(e){let t={},n=Object.keys(e);for(let r of n)t[r]=D(e[r]);return t}function rG(e){let t=qW(),n=ZW(),r=`${e.namespace}.${e.key}`,i=()=>({locale:e.locale?e.locale:n.value,data:e.data?nG(e.data):void 0,namespace:e.namespace,key:e.key,count:D(e.count)}),a=eG(t,i())||r,o=E(0),s=[];for(let r of t.stores.values()){if(!FD(r))continue;let t=r.on(`invalidate`,(t,r)=>{(t===void 0||t===(e.locale??n.value))&&(r===void 0||r===e.namespace)&&(o.value+=1)});s.push(t)}return Ve(()=>{for(let e of s)e()}),sP(async()=>(o.value,await t.get(i())||r),a)}var iG=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},aG=k({props:{path:{type:String,required:!0},data:{type:Object}},setup(e){let[t,n]=(e=>{let t=e.indexOf(`.`);if(t===-1)throw SyntaxError(`The key with required namespace prefix could not be parsed.`);let n=e.substring(0,t);return[n,e.substring(n.length+1)]})(e.path);return{text:rG({namespace:t,key:n,data:e.data})}}});function oG(e,t,n,r,i,a){return T(e.text)}var sG=iG(aG,[[`render`,oG],[`__file`,`/home/runner/work/ilingo/ilingo/packages/vue/src/component.vue`]]),cG=k({name:`ITranslateT`,props:{path:{type:String,required:!0},data:{type:Object},locale:{type:String},count:{type:Number},tag:{type:String,default:`span`}},setup(e,{slots:t}){let n=qW(),r=ZW();lG(e.path);let i=B(()=>lG(e.path)),a=()=>{let{namespace:t,key:n}=i.value;return{namespace:t,key:n,data:e.data?nG(e.data):void 0,locale:e.locale??r.value,count:e.count}},o=sP(async()=>{let e=a();return await n.get(e)??`${e.namespace}.${e.key}`},eG(n,a())??``),s=B(()=>jD(o.value));return()=>{let n=[];for(let r of s.value)if(r.kind===`text`)n.push(r.value);else if(r.kind===`var`){let t=e.data?.[r.name];t===void 0?n.push(r.modifierExpression?`{{${r.name}, ${r.modifierExpression}}}`:`{{${r.name}}}`):n.push(String(D(t)))}else{let e=t[r.name];if(e)for(let t of e())n.push(t);else n.push(`{${r.name}}`)}return e.tag?V(e.tag,n):n}}});function lG(e){let t=e.indexOf(`.`);if(t<=0||t>=e.length-1)throw SyntaxError(`[ilingo] <ITranslateT path="${e}"> requires a "namespace.key" path.`);return{namespace:e.slice(0,t),key:e.slice(t+1)}}function uG(e){if(typeof e==`string`)return dG(e);if(`path`in e){let{namespace:t,key:n}=dG(e.path);return{namespace:t,key:n,data:e.data,locale:e.locale,count:e.count}}return e}function dG(e){let t=e.indexOf(`.`);if(t<=0||t>=e.length-1)throw SyntaxError(`[ilingo] v-t="${e}" requires a "namespace.key" path.`);return{namespace:e.slice(0,t),key:e.slice(t+1)}}var fG=Symbol.for(`ilingo.v-t.stop`);function pG(e,t){function n(n,r){n[fG]?.();let i=uG(r);n[fG]=gr(r=>{let a=i.locale??t.value,o=!1;r(()=>{o=!0}),(async()=>{try{let t=await e.get({namespace:i.namespace,key:i.key,data:i.data,count:i.count,locale:a});if(o)return;n.textContent=t??`${i.namespace}.${i.key}`}catch{if(o)return;n.textContent=`${i.namespace}.${i.key}`}})()})}return{mounted(e,t){n(e,t.value)},updated(e,t){n(e,t.value)},unmounted(e){e[fG]?.()}}}function mG(e){return`stores`in e}function hG(e,t){let n=QW(e),r=n!==void 0&&!!n.value,i=JW(e),a=i!==void 0;return t?mG(t)?(i?i.merge(t):i=t,n||=E(i.getLocale())):(!n&&t.locale&&(n=E(t.locale)),i?i.registerStore(t.store):i=new ND({store:t.store})):i=new ND,n||=E(`en`),r||XW(n,e),a||KW(i,e),i}function gG(e,t){let n=hG(e,t);if(e.component(`ITranslate`,sG),e.component(`ITranslateT`,cG),!(t&&!mG(t)&&t.directives===!1)){let t=ZW(e);e.directive(`t`,pG(n,t))}}var _G=`validup`,vG=Symbol.for(`@ilingo/validup`),yG=function(e){return e.DEFAULT=`default`,e.CROSS_CUTTING=`cross-cutting`,e.GROUPS=`groups`,e.FIELDS=`fields`,e}({}),bG=new Set;function xG(e){if(!e)return;let t={};for(let[n,r]of Object.entries(e)){if(typeof r==`string`||typeof r==`number`){t[n]=r;continue}if(r==null){t[n]=``;continue}if(typeof r==`boolean`){t[n]=String(r);continue}let e;try{let t=JSON.stringify(r);e=typeof t==`string`?t:String(r)}catch{e=String(r)}if(t[n]=e,!cD()){let t=`${n}|${typeof r}`;bG.has(t)||(bG.add(t),console.warn(`[@ilingo/validup] Issue data key "${n}" carries a non-primitive value (${typeof r}); coerced to "${e}". Flatten the value at the validator or register a custom formatter.`))}}return t}async function SG(e,t,n={}){let{code:r}=e;if(typeof r==`string`&&r.length>0){let i=await t.get({namespace:n.namespace??`validup`,key:r,data:xG(e.data),locale:n.locale});if(typeof i==`string`&&i.length>0)return i}return e.message}function CG(e,t,n={}){let{code:r}=e;if(typeof r!=`string`||r.length===0)return e.message;let i;try{i=t.getSync({namespace:n.namespace??`validup`,key:r,data:xG(e.data),locale:n.locale})}catch(e){if(SD(e))return;throw e}return typeof i==`string`&&i.length>0?i:e.message}async function wG(e,t,n={}){let r=Ru(e),i=await Promise.all(r.map(e=>SG(e,t,n)));return r.map((e,t)=>({issue:e,message:i[t]}))}function TG(e,t,n={}){let r=Ru(e),i=[];for(let e of r){let r=CG(e,t,n);if(r===void 0)return;i.push({issue:e,message:r})}return i}var EG=XE({value_invalid:`The value is invalid`,one_of_failed:`None of the alternatives was successful`,required:`The value is required`,alpha:`The value must contain only letters`,alpha_num:`The value must be alphanumeric`,numeric:`The value must be numeric`,integer:`The value must be an integer`,decimal:`The value must be a decimal number`,min_length:`The minimum length allowed is {{min}}`,max_length:`The maximum length allowed is {{max}}`,min_value:`The value must be greater than or equal to {{min}}`,max_value:`The value must be less than or equal to {{max}}`,between:`The value must be between {{min}} and {{max}}`,email:`The value is not a valid email address`,url:`The value is not a valid URL`,ip_address:`The value is not a valid IP address`,mac_address:`The value is not a valid MAC address`,uuid:`The value is not a valid UUID`,date:`The value is not a valid date`,pattern:`The value does not match the expected pattern`,json:`The value is not valid JSON`,base64:`The value is not valid base64`,strong_password:`The value does not meet the password strength requirements`,same_as:`The value must equal {{other}}`}),DG=XE({value_invalid:`Der Wert ist ungültig`,one_of_failed:`Keine der Alternativen war erfolgreich`,required:`Der Wert ist erforderlich`,alpha:`Der Wert darf nur Buchstaben enthalten`,alpha_num:`Der Wert muss alphanumerisch sein`,numeric:`Der Wert muss numerisch sein`,integer:`Der Wert muss eine ganze Zahl sein`,decimal:`Der Wert muss eine Dezimalzahl sein`,min_length:`Die minimale Länge beträgt {{min}}`,max_length:`Die maximale Länge beträgt {{max}}`,min_value:`Der Wert muss größer oder gleich {{min}} sein`,max_value:`Der Wert muss kleiner oder gleich {{max}} sein`,between:`Der Wert muss zwischen {{min}} und {{max}} liegen`,email:`Der Wert ist keine gültige E-Mail-Adresse`,url:`Der Wert ist keine gültige URL`,ip_address:`Der Wert ist keine gültige IP-Adresse`,mac_address:`Der Wert ist keine gültige MAC-Adresse`,uuid:`Der Wert ist keine gültige UUID`,date:`Der Wert ist kein gültiges Datum`,pattern:`Der Wert entspricht nicht dem erwarteten Muster`,json:`Der Wert ist kein gültiges JSON`,base64:`Der Wert ist kein gültiges Base64`,strong_password:`Der Wert erfüllt nicht die Anforderungen an die Passwortstärke`,same_as:`Der Wert muss gleich {{other}} sein`}),OG=XE({value_invalid:`La valeur est invalide`,one_of_failed:`Aucune des alternatives n’a réussi`,required:`La valeur est requise`,alpha:`La valeur ne doit contenir que des lettres`,alpha_num:`La valeur doit être alphanumérique`,numeric:`La valeur doit être numérique`,integer:`La valeur doit être un entier`,decimal:`La valeur doit être un nombre décimal`,min_length:`La longueur minimale autorisée est {{min}}`,max_length:`La longueur maximale autorisée est {{max}}`,min_value:`La valeur doit être supérieure ou égale à {{min}}`,max_value:`La valeur doit être inférieure ou égale à {{max}}`,between:`La valeur doit être comprise entre {{min}} et {{max}}`,email:`La valeur n’est pas une adresse e-mail valide`,url:`La valeur n’est pas une URL valide`,ip_address:`La valeur n’est pas une adresse IP valide`,mac_address:`La valeur n’est pas une adresse MAC valide`,uuid:`La valeur n’est pas un UUID valide`,date:`La valeur n’est pas une date valide`,pattern:`La valeur ne correspond pas au motif attendu`,json:`La valeur n’est pas un JSON valide`,base64:`La valeur n’est pas une valeur base64 valide`,strong_password:`La valeur ne respecte pas les exigences de robustesse du mot de passe`,same_as:`La valeur doit être égale à {{other}}`}),kG=XE({value_invalid:`El valor no es válido`,one_of_failed:`Ninguna de las alternativas tuvo éxito`,required:`El valor es obligatorio`,alpha:`El valor solo debe contener letras`,alpha_num:`El valor debe ser alfanumérico`,numeric:`El valor debe ser numérico`,integer:`El valor debe ser un número entero`,decimal:`El valor debe ser un número decimal`,min_length:`La longitud mínima permitida es {{min}}`,max_length:`La longitud máxima permitida es {{max}}`,min_value:`El valor debe ser mayor o igual que {{min}}`,max_value:`El valor debe ser menor o igual que {{max}}`,between:`El valor debe estar entre {{min}} y {{max}}`,email:`El valor no es una dirección de correo electrónico válida`,url:`El valor no es una URL válida`,ip_address:`El valor no es una dirección IP válida`,mac_address:`El valor no es una dirección MAC válida`,uuid:`El valor no es un UUID válido`,date:`El valor no es una fecha válida`,pattern:`El valor no coincide con el patrón esperado`,json:`El valor no es un JSON válido`,base64:`El valor no es una codificación base64 válida`,strong_password:`El valor no cumple los requisitos de seguridad de la contraseña`,same_as:`El valor debe ser igual a {{other}}`}),AG=class extends PD{constructor(){super({id:vG,data:$E([QE(`en`,[ZE(_G,[EG])]),QE(`de`,[ZE(_G,[DG])]),QE(`fr`,[ZE(_G,[OG])]),QE(`es`,[ZE(_G,[kG])])])})}};function jG(){return new AG}function MG(e){try{return e()}catch{return}}function NG(e,t){let n=qW(),r=ZW(),i=un([]),a=MG(()=>TG(mn(e)??[],n,{locale:mn(t)??r.value}));return a&&(i.value=a),sP(async()=>{let a=mn(e);if(!a||a.length===0)return i.value=[],[];let o=mn(t)??r.value,s=await wG(a,n,{locale:o});return i.value=s,s},i.value)}function PG(e){return NG(B(()=>D(e).$errors.value))}function FG(e){let t=PG(e);return Yt({severity:B(()=>rd(D(e))),messages:B(()=>t.value.map(e=>({key:e.issue.code??`validation`,value:e.message}))),issues:t})}var IG=k({props:{field:{type:Object,required:!0}},slots:Object,setup(e,{slots:t}){let n=FG(Sn(e,`field`));return()=>{let e=t[yG.DEFAULT];return e?e({value:n}):[]}}});function LG(e){let t=JW(e);if(!t)throw Error("@ilingo/validup-vue: no Ilingo instance found in the app context. Install @ilingo/vue first — e.g. `app.use(ilingoVue, { ... })` before `app.use(ilingoValidupVue)`.");t.registerStore(jG())}var RG=Symbol.for(`AuthupHydrationStore`);function zG(e,t){LH(RG,e,t)}function BG(e){return IH(RG,e)}function VG(){return typeof window>`u`}function HG(e){let t=BG();if(!t)return;if(VG()){if(!ss())return;Bi(async()=>{try{let n=await e.resolve();if(n===void 0)return;e.apply(n),t.set(e.key,n)}catch{}});return}let n=t.get(e.key);n!==void 0&&e.apply(n)}function UG(e){let t={},n=Object.entries(e);for(let[e,r]of n)t[e]=D(r);return t}function WG(e){return`authup:translation:${e.locale}:${e.namespace}:${e.key}:${e.count??``}:${e.data?JSON.stringify(e.data):``}`}function GG(e,t){try{return e.getSync(t),!1}catch{return!0}}function KG(e){let t=rG(e);if(!BG())return t;let n=`${e.namespace}.${e.key}`;if(t.value!==n)return t;let r=qW(),i=ZW(),a=()=>({locale:e.locale?e.locale:i.value,namespace:e.namespace,key:e.key,count:D(e.count),data:e.data?UG(e.data):void 0});if(!GG(r,a()))return t;let o=E();return HG({key:WG(a()),resolve:()=>r.get(a()),apply:e=>{o.value=e}}),B(()=>t.value===n&&o.value?o.value:t.value)}function qG(){let e=qW(),t=ZW();return async n=>await e.get({...n,locale:t.value})??n.key}function JG(e){let t={};for(let n of e)t[n.key]=KG(n);return Yt(t)}function YG(e,t){return JG(t.map(t=>({...t,namespace:e})))}function XG(e,t={}){gG(e,{store:new PD({data:SO}),locale:t.locale}),LG(e)}var ZG=`auto`,QG=`vc-locale`,$G=Symbol.for(`VCLocaleManager`);function eK(e,t={}){let{initial:n=ZG,fallback:r=Tk,syncLang:i=!0,navigatorLanguage:a}=t,o=a??GP().language,s=B(()=>{let{value:t}=e;return t&&t!==`auto`?t:o.value||r}),c=B(()=>!e.value||e.value===`auto`);i&&typeof document<`u`&&yr(s,e=>{document.documentElement.lang=e},{immediate:!0});function l(t){e.value=t}function u(){e.value=n}return{source:e,resolved:s,isAuto:c,set:l,reset:u}}function tK(e,t={}){let{initial:n=ZG,persist:r=!0,storageKey:i=QG,source:a,...o}=t,s=ze(!0),c=s.run(()=>eK(a??(r?PP(i,n):E(n)),{initial:n,...o}));return wk(e,{config:{locale:c.resolved}}),VO($G,c,e),typeof e.onUnmount==`function`&&e.onUnmount(()=>s.stop()),c}function nK(){let e=FO($G);if(!e)throw Error("[@vuecs/locale] No locale manager found. Install the plugin via `app.use(locale, { /* options */ })`.");return e}function rK(){try{return nK()}catch{return}}function iK(){let e=rK(),t=ZW();return{code:B(()=>EO(e?e.resolved.value:t.value)??t.value),set:n=>{e?e.set(n):t.value=n}}}function aK(e){let t=e.runWithContext(()=>rK());if(!t)return;let n=e.runWithContext(()=>ZW());yr(t.resolved,e=>{let t=EO(e);t&&t!==n.value&&(n.value=t)},{immediate:!0})}function oK(){return{createText:KG({namespace:q.ACTION,key:Z.CREATE}),updateText:KG({namespace:q.ACTION,key:Z.UPDATE}),createIcon:`fa6-solid:plus`,updateIcon:`fa6-solid:floppy-disk`,createColor:`primary`,updateColor:`primary`}}function sK(e,t={},n={}){let r=Object.keys(e);for(let i of r){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let r=t[i],a=r===null?``:r;if(n.fields){let t=n.fields.at(i);if(t.$dirty.value){if(!Zl(e[i],a))continue;t.$reset()}}e[i]=a}return e}function cK(e){return _L(e)||uL(e)}function lK(e){return zL(e)?e:sR(e)}function uK(e){return e.value.some(e=>(e.name===`createdAt`||e.name===`updatedAt`)&&e.operator===WI.DESC)}function dK(e,t){return async(...n)=>e.value?Promise.resolve():(e.value=!0,t(...n).finally(()=>{e.value=!1}))}function fK(e,t){if(e.data)return;let n=Array.isArray(e.name)?[...e.name].sort().join(`,`):e.name;return[`authup:permission`,t.userId||``,t.realmId||``,n,e.realmId||``,e.clientId||``].join(`:`)}function pK(e={}){let t;t=e.store?e.store:MW(e.pinia,e.app);let n=LW(t);return e=>{let r=typeof e==`function`?e:()=>e,i=E(!1),a=0,o=async()=>{let e;n.userId.value&&(e={type:`user`,id:n.userId.value},n.realmId.value&&(e.realmId=n.realmId.value),n.realmName.value&&(e.realmName=n.realmName.value));let i=r(),a=i.data||new uU;a.set(RU.IDENTITY,e);try{return await t.permissionEvaluator.preEvaluateOneOf({...i,data:a}).then(()=>!0).catch(()=>!1)}catch{return!1}},s=()=>{a++;let e=a;return i.value=!1,Promise.resolve().then(()=>o()).then(t=>(e===a&&(i.value=t),t))},c=s(),l=fK(r(),{userId:n.userId.value,realmId:n.realmId.value});l&&HG({key:l,resolve:()=>c,apply:e=>{i.value=e}});let u;return Fi(()=>{u=yr([n.loggedIn,r],()=>s())}),zi(()=>{u!==void 0&&u()}),i}}var mK=Object.create(null);mK.open=`0`,mK.close=`1`,mK.ping=`2`,mK.pong=`3`,mK.message=`4`,mK.upgrade=`5`,mK.noop=`6`;var hK=Object.create(null);Object.keys(mK).forEach(e=>{hK[mK[e]]=e});var gK={type:`error`,data:`parser error`},_K=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,vK=typeof ArrayBuffer==`function`,yK=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,bK=({type:e,data:t},n,r)=>_K&&t instanceof Blob?n?r(t):xK(t,r):vK&&(t instanceof ArrayBuffer||yK(t))?n?r(t):xK(new Blob([t]),r):r(mK[e]+(t||``)),xK=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function SK(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var CK;function wK(e,t){if(_K&&e.data instanceof Blob)return e.data.arrayBuffer().then(SK).then(t);if(vK&&(e.data instanceof ArrayBuffer||yK(e.data)))return t(SK(e.data));bK(e,!1,e=>{CK||=new TextEncoder,t(CK.encode(e))})}var TK=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,EK=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)EK[TK.charCodeAt(e)]=e;var DK=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=EK[e.charCodeAt(r)],o=EK[e.charCodeAt(r+1)],s=EK[e.charCodeAt(r+2)],c=EK[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},OK=typeof ArrayBuffer==`function`,kK=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:jK(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:AK(e.substring(1),t)}:hK[n]?e.length>1?{type:hK[n],data:e.substring(1)}:{type:hK[n]}:gK},AK=(e,t)=>OK?jK(DK(e),t):{base64:!0,data:e},jK=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},MK=``,NK=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{bK(e,!1,e=>{r[a]=e,++i===n&&t(r.join(MK))})})},PK=(e,t)=>{let n=e.split(MK),r=[];for(let e=0;e<n.length;e++){let i=kK(n[e],t);if(r.push(i),i.type===`error`)break}return r};function FK(){return new TransformStream({transform(e,t){wK(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var IK;function LK(e){return e.reduce((e,t)=>e+t.length,0)}function RK(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function zK(e,t){IK||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(LK(n)<1)break;let e=RK(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(LK(n)<2)break;let e=RK(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(LK(n)<8)break;let e=RK(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue(gK);break}i=a*2**32+t.getUint32(4),r=3}else{if(LK(n)<i)break;let e=RK(n,i);s.enqueue(kK(a?e:IK.decode(e),t)),r=0}if(i===0||i>e){s.enqueue(gK);break}}}})}function BK(e){if(e)return VK(e)}function VK(e){for(var t in BK.prototype)e[t]=BK.prototype[t];return e}BK.prototype.on=BK.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},BK.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},BK.prototype.off=BK.prototype.removeListener=BK.prototype.removeAllListeners=BK.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},BK.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},BK.prototype.emitReserved=BK.prototype.emit,BK.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},BK.prototype.hasListeners=function(e){return!!this.listeners(e).length};var HK=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),UK=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),WK=`arraybuffer`;function GK(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var KK=UK.setTimeout,qK=UK.clearTimeout;function JK(e,t){t.useNativeTimers?(e.setTimeoutFn=KK.bind(UK),e.clearTimeoutFn=qK.bind(UK)):(e.setTimeoutFn=UK.setTimeout.bind(UK),e.clearTimeoutFn=UK.clearTimeout.bind(UK))}var YK=1.33;function XK(e){return typeof e==`string`?ZK(e):Math.ceil((e.byteLength||e.size)*YK)}function ZK(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function QK(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function $K(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function eq(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var tq=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},nq=class extends BK{constructor(e){super(),this.writable=!1,JK(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new tq(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=kK(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=$K(e);return t.length?`?`+t:``}},rq=class extends nq{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){PK(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,NK(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=QK()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},iq=!1;try{iq=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var aq=iq;function oq(){}var sq=class extends rq{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},cq=class e extends BK{constructor(e,t,n){super(),this.createRequest=e,JK(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=GK(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(this._xhr!==void 0&&this._xhr!==null){if(this._xhr.onreadystatechange=oq,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(cq.requestsCount=0,cq.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,lq);else if(typeof addEventListener==`function`){let e=`onpagehide`in UK?`pagehide`:`unload`;addEventListener(e,lq,!1)}}function lq(){for(let e in cq.requests)cq.requests.hasOwnProperty(e)&&cq.requests[e].abort()}var uq=(function(){let e=fq({xdomain:!1});return e&&e.responseType!==null})(),dq=class extends sq{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=uq&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new cq(fq,this.uri(),e)}};function fq(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||aq))return new XMLHttpRequest}catch{}if(!t)try{return new UK[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var pq=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,mq=class extends nq{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=pq?{}:GK(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;bK(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&HK(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=QK()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},hq=UK.WebSocket||UK.MozWebSocket,gq={websocket:class extends mq{createSocket(e,t,n){return pq?new hq(e,t,n):t?new hq(e,t):new hq(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends nq{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=zK(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=FK();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&HK(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:dq},_q=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vq=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function yq(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=_q.exec(e||``),a={},o=14;for(;o--;)a[vq[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=bq(a,a.path),a.queryKey=xq(a,a.query),a}function bq(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function xq(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var Sq=typeof addEventListener==`function`&&typeof removeEventListener==`function`,Cq=[];Sq&&addEventListener(`offline`,()=>{Cq.forEach(e=>e())},!1);var wq=class e extends BK{constructor(e,t){if(super(),this.binaryType=WK,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=yq(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=yq(t.host).host);JK(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=eq(this.opts.query)),Sq&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},Cq.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data)}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=XK(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,HK(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),Sq&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=Cq.indexOf(this._offlineEventListener);e!==-1&&Cq.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};wq.protocol=4;var Tq=class extends wq{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;wq.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;wq.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},Eq=class extends Tq{constructor(e,t={}){let n=typeof e==`object`,r=n?{...e}:{...t};(!r.transports||r.transports&&typeof r.transports[0]==`string`)&&(r.transports=(r.transports||[`polling`,`websocket`,`webtransport`]).map(e=>gq[e]).filter(e=>!!e)),super(n?r:e,r)}};Eq.protocol;function Dq(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=yq(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var Oq=typeof ArrayBuffer==`function`,kq=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Aq=Object.prototype.toString,jq=typeof Blob==`function`||typeof Blob<`u`&&Aq.call(Blob)===`[object BlobConstructor]`,Mq=typeof File==`function`||typeof File<`u`&&Aq.call(File)===`[object FileConstructor]`;function Nq(e){return Oq&&(e instanceof ArrayBuffer||kq(e))||jq&&e instanceof Blob||Mq&&e instanceof File}function Pq(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(Pq(e[t]))return!0;return!1}if(Nq(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return Pq(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&Pq(e[t]))return!0;return!1}function Fq(e){let t=[],n=e.data,r=e;return r.data=Iq(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Iq(e,t,n){if(!e)return e;if(Nq(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=Iq(e[r],t);return n}if(typeof e==`object`&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON==`function`&&!n)return Iq(e.toJSON(),t,!0);let r={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=Iq(e[n],t));return r}return e}function Lq(e,t){return e.data=Rq(e.data,t),delete e.attachments,e}function Rq(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Rq(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Rq(e[n],t));return e}var zq=n({Decoder:()=>Uq,Encoder:()=>Hq,PacketType:()=>Vq,isPacketValid:()=>Xq,protocol:()=>5}),Bq=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],Vq;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(Vq||={});var Hq=class{constructor(e){this.replacer=e}encode(e){return(e.type===Vq.EVENT||e.type===Vq.ACK)&&Pq(e)?this.encodeAsBinary({type:e.type===Vq.EVENT?Vq.BINARY_EVENT:Vq.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===Vq.BINARY_EVENT||e.type===Vq.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=Fq(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},Uq=class e extends BK{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===Vq.BINARY_EVENT;n||t.type===Vq.BINARY_ACK?(t.type=n?Vq.EVENT:Vq.ACK,this.reconstructor=new Wq(t)):super.emitReserved(`decoded`,t)}else if(Nq(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(Vq[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===Vq.BINARY_EVENT||r.type===Vq.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!Kq(a)||a<1)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&t.charAt(n)!==`,`&&n!==t.length;);r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case Vq.CONNECT:return Jq(t);case Vq.DISCONNECT:return t===void 0;case Vq.CONNECT_ERROR:return typeof t==`string`||Jq(t);case Vq.EVENT:case Vq.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&Bq.indexOf(t[0])===-1);case Vq.ACK:case Vq.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},Wq=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=Lq(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Gq(e){return typeof e==`string`}var Kq=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function qq(e){return e===void 0||Kq(e)}function Jq(e){return Object.prototype.toString.call(e)===`[object Object]`}function Yq(e,t){switch(e){case Vq.CONNECT:return t===void 0||Jq(t);case Vq.DISCONNECT:return t===void 0;case Vq.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&Bq.indexOf(t[0])===-1);case Vq.ACK:return Array.isArray(t);case Vq.CONNECT_ERROR:return typeof t==`string`||Jq(t);default:return!1}}function Xq(e){return Gq(e.nsp)&&qq(e.id)&&Yq(e.type,e.data)}function Zq(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var Qq=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),$q=class extends BK{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[Zq(e,`open`,this.onopen.bind(this)),Zq(e,`packet`,this.onpacket.bind(this)),Zq(e,`error`,this.onerror.bind(this)),Zq(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(Qq.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:Vq.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Vq.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Vq.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case Vq.EVENT:case Vq.BINARY_EVENT:this.onevent(e);break;case Vq.ACK:case Vq.BINARY_ACK:this.onack(e);break;case Vq.DISCONNECT:this.ondisconnect();break;case Vq.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t)}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:Vq.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Vq.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function eJ(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}eJ.prototype.duration=function(){var e=this.ms*this.factor**+this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},eJ.prototype.reset=function(){this.attempts=0},eJ.prototype.setMin=function(e){this.ms=e},eJ.prototype.setMax=function(e){this.max=e},eJ.prototype.setJitter=function(e){this.jitter=e};var tJ=class extends BK{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,JK(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new eJ({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||zq;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new Eq(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=Zq(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=Zq(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(Zq(e,`ping`,this.onping.bind(this)),Zq(e,`data`,this.ondata.bind(this)),Zq(e,`error`,this.onerror.bind(this)),Zq(e,`close`,this.onclose.bind(this)),Zq(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){HK(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new $q(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},nJ={};function rJ(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=Dq(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=nJ[i]&&a in nJ[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new tJ(r,t):(nJ[i]||(nJ[i]=new tJ(r,t)),c=nJ[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(rJ,{Manager:tJ,Socket:$q,io:rJ,connect:rJ});function iJ(e=``){return e.includes(`://`)?e.split(`://`).map(e=>iJ(e)).join(`://`):e.replace(/\/+/g,`/`)}function aJ(e){return e===void 0?()=>void 0:typeof e==`string`?()=>e:e}function oJ(e){return uE(e)&&typeof e.description==`string`}var sJ=class{manager;sockets;tokenFn;constructor(e){this.sockets=new Map;let t=new URL(e.url),n=`${t.protocol}//${t.host}`,r={...e.options||{}};r.path?t.pathname.endsWith(r.path)?r.path=t.pathname:t.pathname!==`/`&&(r.path=iJ(t.pathname+r.path)):t.pathname.endsWith(`/socket.io`)?r.path=t.pathname:t.pathname!==`/`&&(r.path=iJ(`${t.pathname}/socket.io`)),this.manager=new tJ(n,{autoConnect:!1,...r}),this.tokenFn=aJ(e.token)}get options(){return this.manager.opts}async connect(e=`/`){let t=this.inject(e);return t.connected?t:new Promise((e,n)=>{t.once(`connect`,()=>{e(t)}),t.once(`connect_error`,e=>{n(e)}),t.connect()})}async disconnect(e=`/`){let t=this.inject(e);t.connected&&await new Promise((e,n)=>{t.once(`disconnect`,(t,r)=>{if(t===`io client disconnect`){e();return}if(oJ(r)){n(Error(r.description));return}n(r)}),t.disconnect()})}async reconnect(e=`/`){return await this.disconnect(e),new Promise((t,n)=>{setTimeout(()=>{this.connect(e).then(e=>t(e)).catch(e=>n(e))})})}async reconnectAll(){let e=this.sockets.keys(),t=[];for(;;){let n=e.next();if(n.done)break;t.push(this.reconnect(n.value))}return Promise.all(t)}inject(e=`/`){let t=this.sockets.get(e);return t||(t=this.manager.socket(e,{auth:e=>{Promise.resolve().then(()=>this.tokenFn()).then(t=>{e({token:t})}).catch(()=>e())}}),this.sockets.set(e,t),t)}eject(e=`/`){let t=this.sockets.get(e);t&&(t.disconnect(),this.sockets.delete(e))}},cJ=function(e){return e.CREATED=`created`,e.DELETED=`deleted`,e.UPDATED=`updated`,e.SUBSCRIBE=`subscribe`,e.UNSUBSCRIBE=`unsubscribe`,e}({});function lJ(e,t){return e+(t.substring(0,1).toUpperCase()+t.substring(1))}var uJ=Symbol.for(`AuthupSocketManager`);function dJ(){return!!IH(uJ)}function fJ(e,t){LH(uJ,e,t)}function pJ(e){let t=IH(uJ,e);if(!t)throw Error(`The socket manager has not been injected in the app context.`);return t}function mJ(e,t){let n=NW(e)(t.pinia),{accessToken:r}=LW(n),i=new sJ({url:t.baseURL,token:()=>r.value??void 0}),a=E();n.$subscribe((e,t)=>{let n=t.accessToken??void 0;n!==a.value&&(a.value=n,Promise.resolve().then(()=>i.reconnect()))}),fJ(i,e)}var hJ=function(e){return e.DEFAULT=`default`,e.FOOTER=`footer`,e.HEADER=`header`,e.BODY=`body`,e.LOADING=`loading`,e.NO_MORE=`noMore`,e.ITEM=`item`,e.ITEM_ACTIONS=`itemActions`,e.ITEM_ACTIONS_EXTRA=`itemActionsExtra`,e}({});function gJ(e,t={}){return cE(t,e)}function _J(e,t={},n={}){return cE(n,e)?n[e](t):[]}function vJ(e,t,n){let r=e.$getResultsForChild(t);if(!r)return{};let i=n??Object.keys(r.fields),a={};for(let e of i){let t=r.fields[e];t&&(a[e]=t.$model.value)}return a}function yJ(){return{defaults:{pagination:{firstIcon:`fa6-solid:angles-left`,prevIcon:`fa6-solid:chevron-left`,nextIcon:`fa6-solid:chevron-right`,lastIcon:`fa6-solid:angles-right`},submitButton:{createIcon:`fa6-solid:plus`,updateIcon:`fa6-solid:floppy-disk`},collapseTrigger:{chevronIcon:`fa6-solid:chevron-down`},tableExpandTrigger:{chevronIcon:`fa6-solid:chevron-down`},breadcrumb:{separatorIcon:`fa6-solid:chevron-right`},alert:{infoIcon:`fa6-solid:circle-info`,successIcon:`fa6-solid:circle-check`,warningIcon:`fa6-solid:triangle-exclamation`,errorIcon:`fa6-solid:circle-xmark`}}}}function bJ(e={}){return{themes:e.themes,icons:[yJ()],defaults:{submitButton:oK()}}}var xJ=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};function SJ(e){return typeof e==`string`?`'${e}'`:new CJ().serialize(e)}var CJ=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}();function wJ(e,t){return e===t||SJ(e)===SJ(t)}function TJ(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}function EJ(e,t){let n=e,r=t.toString(),i=r.indexOf(`.`),a=i>=0?r.length-i:0;if(a>0){let e=10**a;n=Math.round(n*e)/e}return n}function DJ(e,t,n,r){t=Number(t),n=Number(n);let i=(e-(Number.isNaN(t)?0:t))%r,a=EJ(Math.abs(i)*2>=r?e+Math.sign(i)*(r-Math.abs(i)):e-i,r);return Number.isNaN(t)?!Number.isNaN(n)&&a>n&&(a=Math.floor(EJ(n/r,r))*r):a<t?a=t:!Number.isNaN(n)&&a>n&&(a=t+Math.floor(EJ((n-t)/r,r))*r),a=EJ(a,r),a}function OJ(e,t){let n=typeof e==`string`&&!t?`${e}Context`:t,r=Symbol(n);return[t=>{let n=fr(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},e=>(dr(r,e),e)]}function kJ(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function AJ(e,t,n){let r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function jJ(e){return e==null}function MJ(e,t){return jJ(e)?!1:Array.isArray(e)?e.some(e=>wJ(e,t)):wJ(e,t)}function NJ(e){return e?e.flatMap(e=>e.type===Ro?NJ(e.children):[e]):[]}var PJ=[`INPUT`,`TEXTAREA`];function FJ(e,t,n,r={}){if(!t||r.enableIgnoredElement&&PJ.includes(t.nodeName))return null;let{arrowKeyOptions:i=`both`,attributeName:a=`[data-reka-collection-item]`,itemsArray:o=[],loop:s=!0,dir:c=`ltr`,preventScroll:l=!0,focus:u=!1}=r,[d,f,p,m,h,g]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],_=p||m,v=d||f;if(!h&&!g&&(!_&&!v||i===`vertical`&&v||i===`horizontal`&&_))return null;let y=n?Array.from(n.querySelectorAll(a)):o;if(!y.length)return null;l&&e.preventDefault();let b=null;return v||_?b=IJ(y,t,{goForward:_?m:c===`ltr`?d:f,loop:s}):h?b=y.at(0)||null:g&&(b=y.at(-1)||null),u&&b?.focus(),b}function IJ(e,t,n,r=e.includes(t)?e.length:e.length+1){if(--r===0)return null;let i=e.indexOf(t),a;if(a=i===-1?n.goForward?0:e.length-1:n.goForward?i+1:i-1,!n.loop&&(a<0||a>=e.length))return null;let o=e[(a+e.length)%e.length];return o?o.hasAttribute(`disabled`)&&o.getAttribute(`disabled`)!==`false`?IJ(e,o,n,r):o:null}var[LJ,ire]=OJ(`ConfigProvider`);function RJ(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function zJ(e,t,n=`.`,r){if(!RJ(t))return zJ(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:RJ(a)&&RJ(i[t])?zJ(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function BJ(e){return(...t)=>t.reduce((t,n)=>zJ(t,n,``,e),{})}var VJ=BJ(),HJ=WN(()=>{let e=E(new Map),t=E(),n=B(()=>{for(let t of e.value.values())if(t)return!0;return!1}),r=LJ({scrollBody:E(!0)}),i=null,a=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.documentElement.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,NN&&i?.(),t.value=void 0};return yr(n,(e,o)=>{if(!DN)return;if(!e){o&&a();return}t.value===void 0&&(t.value=document.body.style.overflow);let s=window.innerWidth-document.documentElement.clientWidth,c={padding:s,margin:0},l=r.scrollBody?.value?typeof r.scrollBody.value==`object`?VJ({padding:r.scrollBody.value.padding===!0?s:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?s:r.scrollBody.value.margin},c):c:{padding:0,margin:0};s>0&&(document.body.style.paddingRight=typeof l.padding==`number`?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin==`number`?`${l.margin}px`:String(l.margin),document.documentElement.style.setProperty(`--scrollbar-width`,`${s}px`),document.body.style.overflow=`hidden`),NN&&(i=uP(document,`touchmove`,e=>GJ(e),{passive:!1})),Gn(()=>{n.value&&(document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`)})},{immediate:!0,flush:`sync`}),e});function UJ(e){let t=Math.random().toString(36).substring(2,7),n=HJ();n.value.set(t,e??!1);let r=B({get:()=>n.value.get(t)??!1,set:e=>n.value.set(t,e)});return eP(()=>{n.value.delete(t)}),r}function WJ(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth<e.scrollWidth||t.overflowY===`auto`&&e.clientHeight<e.scrollHeight)return!0;{let t=e.parentNode;return!(t instanceof Element)||t.tagName===`BODY`?!1:WJ(t)}}function GJ(e){let t=e||window.event,n=t.target;return n instanceof Element&&WJ(n)?!1:t.touches.length>1||(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function KJ(e){let t=E(!1);function n(){t.value=!0}function r(n){Gn(()=>{t.value=!1,e?.(n)})}return{isComposing:t,handleCompositionStart:n,handleCompositionEnd:r}}function qJ(e){let t=LJ({dir:E(`ltr`)});return B(()=>e?.value||t.dir?.value||`ltr`)}function JJ(e){let t=ss(),n=t?.type.emits,r={};return n?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),n?.forEach(t=>{r[de(se(t))]=(...n)=>e(t,...n)}),r}var YJ=0;function XJ(){gr(e=>{if(!DN)return;let t=document.querySelectorAll(`[data-reka-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,t[0]??ZJ()),document.body.insertAdjacentElement(`beforeend`,t[1]??ZJ()),YJ++,e(()=>{YJ===1&&document.querySelectorAll(`[data-reka-focus-guard]`).forEach(e=>e.remove()),YJ--})})}function ZJ(){let e=document.createElement(`span`);return e.setAttribute(`data-reka-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}function QJ(e){return B(()=>!mn(e)||!!lP(e)?.closest(`form`))}function $(){let e=ss(),t=E(),n=B(()=>r());Li(()=>{n.value!==r()&&pn(t)});function r(){return t.value&&`$el`in t.value&&[`#text`,`#comment`].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:lP(t)}let i=Object.assign({},e.exposed),a={};for(let t in e.props)Object.defineProperty(a,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(i).length>0)for(let e in i)Object.defineProperty(a,e,{enumerable:!0,configurable:!0,get:()=>i[e]});Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=a;function o(n){if(t.value=n,n&&(Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),!(n instanceof Element)&&!Object.hasOwn(n,`$el`))){let t=n.$.exposed,r=Object.assign({},a);for(let e in t)Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>t[e]});e.exposed=r}}return{forwardRef:o,currentRef:t,currentElement:n}}function $J(e){let t=ss(),n=Object.keys(t?.type.props??{}).reduce((e,n)=>{let r=(t?.type.props[n]).default;return r!==void 0&&(e[n]=r),e},{}),r=Sn(e);return B(()=>{let e={},i=t?.vnode.props??{};return Object.keys(i).forEach(t=>{e[se(t)]=i[t]}),Object.keys({...n,...e}).reduce((e,t)=>(r.value[t]!==void 0&&(e[t]=r.value[t]),e),{})})}function eY(e,t){let n=$J(e),r=t?JJ(t):{};return B(()=>({...n.value,...r}))}function tY(){let e=ss()?.vnode?.scopeId;return e?{[e]:``}:{}}function nY(e,t){let n=JN(!1,300);SN(()=>{n.value=!1});let r=E(null),i=CN();function a(){r.value=null,n.value=!1}function o(e,t){if(!t)return;let i=e.currentTarget,a={x:e.clientX,y:e.clientY},o=iY(a,rY(a,i.getBoundingClientRect()),1),s=aY(t.getBoundingClientRect()),c=sY([...o,...s]);r.value=c,n.value=!0}return gr(n=>{if(e.value&&t.value){let r=e=>o(e,t.value),i=t=>o(t,e.value);e.value.addEventListener(`pointerleave`,r),t.value.addEventListener(`pointerleave`,i),n(()=>{e.value?.removeEventListener(`pointerleave`,r),t.value?.removeEventListener(`pointerleave`,i)})}}),gr(n=>{if(r.value){let o=n=>{if(!r.value||!(n.target instanceof Element))return;let o=n.target,s={x:n.clientX,y:n.clientY},c=e.value?.contains(o)||t.value?.contains(o),l=!oY(s,r.value),u=!!o.closest(`[data-grace-area-trigger]`);c?a():(l||u)&&(a(),i.trigger())};e.value?.ownerDocument.addEventListener(`pointermove`,o),n(()=>e.value?.ownerDocument.removeEventListener(`pointermove`,o))}}),{isPointerInTransit:n,onPointerExit:i.on}}function rY(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function iY(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function aY(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function oY(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function sY(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),cY(t)}function cY(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t.at(-1),n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n.at(-1),t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var lY=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},uY=new WeakMap,dY=new WeakMap,fY={},pY=0,mY=function(e){return e&&(e.host||mY(e.parentNode))},hY=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=mY(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},gY=function(e,t,n,r){var i=hY(t,Array.isArray(e)?e:[e]);fY[n]||(fY[n]=new WeakMap);var a=fY[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(uY.get(e)||0)+1,l=(a.get(e)||0)+1;uY.set(e,c),a.set(e,l),o.push(e),c===1&&i&&dY.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),pY++,function(){o.forEach(function(e){var t=uY.get(e)-1,i=a.get(e)-1;uY.set(e,t),a.set(e,i),t||(dY.has(e)||e.removeAttribute(r),dY.delete(e)),i||e.removeAttribute(n)}),pY--,pY||(uY=new WeakMap,uY=new WeakMap,dY=new WeakMap,fY={})}},_Y=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||lY(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),gY(r,i,n,`aria-hidden`)):function(){return null}};function vY(e){let t;yr(()=>lP(e),e=>{let n=!1;try{n=!!e?.closest(`[popover]:not(:popover-open)`)}catch{}e&&!n?t=_Y(e):t&&t()}),zi(()=>{t&&t()})}var yY=0;function bY(e,t=`reka`){if(e)return e;let n,r=LJ({useId:void 0});return n=r.useId?r.useId():`useId`in jl?Qr?.():`${++yY}`,t?`${t}-${n}`:n}function xY(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}function SY(e){let t=LJ({locale:E(`en`)});return B(()=>e?.value||t.locale?.value||`en`)}function CY(e){let t=E(),n=B(()=>t.value?.width??0),r=B(()=>t.value?.height??0),i;return Fi(()=>{let n=lP(e);n?(t.value={width:n.offsetWidth,height:n.offsetHeight},i=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;let r=e[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=n.offsetWidth,a=n.offsetHeight;t.value={width:i,height:a}}),i.observe(n,{box:`border-box`})):t.value=void 0}),zi(()=>{i?.disconnect(),i=void 0}),{width:n,height:r}}function wY(e,t){let n=E(e);function r(e){return t[n.value][e]??n.value}return{state:n,dispatch:e=>{n.value=r(e)}}}function TY(e){let t=JN(``,1e3);return{search:t,handleTypeaheadSearch:(n,r)=>{if(t.value+=n,e)e(n);else{let e=kJ(),n=r.map(e=>({...e,textValue:e.value?.textValue??e.ref.textContent?.trim()??``})),i=n.find(t=>t.ref===e),a=DY(n.map(e=>e.textValue),t.value,i?.textValue),o=n.find(e=>e.textValue===a);return o&&o.ref.focus(),o?.ref}},resetTypeahead:()=>{t.value=``}}}function EY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function DY(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=EY(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function OY(e,t){let n=E({}),r=E(`none`),i=E(e),a=e.value?`mounted`:`unmounted`,o,s=t.value?.ownerDocument.defaultView??cP,{state:c,dispatch:l}=wY(a,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),u=e=>{if(DN){let n=new CustomEvent(e,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(n)}};yr(e,async(e,i)=>{let a=i!==e;if(await Gn(),a){let a=r.value,o=kY(t.value);e?(l(`MOUNT`),u(`enter`),o===`none`&&u(`after-enter`)):o===`none`||o===`undefined`||n.value?.display===`none`?(l(`UNMOUNT`),u(`leave`),u(`after-leave`)):i&&a!==o?(l(`ANIMATION_OUT`),u(`leave`)):(l(`UNMOUNT`),u(`after-leave`))}},{immediate:!0});let d=e=>{let n=kY(t.value),r=n.includes(CSS.escape(e.animationName)),a=c.value===`mounted`?`enter`:`leave`;if(e.target===t.value&&r&&(u(`after-${a}`),l(`ANIMATION_END`),!i.value)){let e=t.value.style.animationFillMode;t.value.style.animationFillMode=`forwards`,o=s?.setTimeout(()=>{t.value?.style.animationFillMode===`forwards`&&(t.value.style.animationFillMode=e)})}e.target===t.value&&n===`none`&&l(`ANIMATION_END`)},f=e=>{e.target===t.value&&(r.value=kY(t.value))},p=yr(t,(e,t)=>{e?(n.value=getComputedStyle(e),e.addEventListener(`animationstart`,f),e.addEventListener(`animationcancel`,d),e.addEventListener(`animationend`,d)):(l(`ANIMATION_END`),o!==void 0&&s?.clearTimeout(o),t?.removeEventListener(`animationstart`,f),t?.removeEventListener(`animationcancel`,d),t?.removeEventListener(`animationend`,d))},{immediate:!0}),m=yr(c,()=>{let e=kY(t.value);r.value=c.value===`mounted`?e:`none`});return zi(()=>{p(),m(),t.value&&(t.value.removeEventListener(`animationstart`,f),t.value.removeEventListener(`animationcancel`,d),t.value.removeEventListener(`animationend`,d)),o!==void 0&&s?.clearTimeout(o)}),{isPresent:B(()=>[`mounted`,`unmountSuspended`].includes(c.value))}}function kY(e){return e&&getComputedStyle(e).animationName||`none`}var AY=k({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){let{present:r,forceMount:i}=yn(e),a=E(),{isPresent:o}=OY(r,a);n({present:o});let s=t.default({present:o.value});s=NJ(s||[]);let c=ss();if(s&&s?.length>1){let e=c?.parent?.type.name?`<${c.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${e}\` for \`Presence\` component.`,``,"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",`You can apply a few solutions:`,["Provide a single child element so that `presence` directive attach correctly.",`Ensure the first child is an actual element instead of a raw text node or comment node.`].map(e=>` - ${e}`).join(`
71
71
  `)].join(`
72
72
  `))}return()=>i.value||r.value||o.value?V(t.default({present:o.value})[0],{ref:e=>{let t=lP(e);return t?.hasAttribute===void 0||(t?.hasAttribute(`data-reka-popper-content-wrapper`)?a.value=t.firstElementChild:a.value=t),t}}):null}}),jY=k({name:`PrimitiveSlot`,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=NJ(n.default()),r=e.findIndex(e=>e.type!==Bo);if(r===-1)return e;let i=e[r];delete i.props?.ref;let a=i.props?z(t,i.props):t,o=es({...i,props:{}},a);return e.length===1?o:(e[r]=o,e)}}}),MY=[`area`,`img`,`input`],NY=k({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&MY.includes(r)?()=>V(r,t):r===`template`?()=>V(jY,t,{default:n.default}):()=>V(e.as,t,{default:n.default})}});function PY(){let e=E();return{primitiveElement:e,currentElement:B(()=>[`#text`,`#comment`].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:lP(e))}}var[are,ore]=OJ(`CollapsibleRoot`),[FY,IY]=OJ(`DialogRoot`),LY=k({inheritAttrs:!1,__name:`DialogRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=KP(n,`open`,t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=E(),a=E(),{modal:o,unmountOnHide:s}=yn(n);return IY({open:r,modal:o,unmountOnHide:s,openModal:()=>{r.value=!0},onOpenChange:e=>{r.value=e},onOpenToggle:()=>{r.value=!r.value},contentId:``,titleId:``,descriptionId:``,triggerElement:i,contentElement:a}),(e,t)=>j(e.$slots,`default`,{open:D(r),close:()=>r.value=!1})}}),RY=k({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;$();let n=FY();return(e,r)=>(M(),P(D(NY),z(t,{type:e.as===`button`?`button`:void 0,onClick:r[0]||=e=>D(n).onOpenChange(!1)}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`type`]))}}),zY=`dismissableLayer.pointerDownOutside`,BY=`dismissableLayer.focusOutside`;function VY(e,t){if(!(t instanceof Element))return!1;let n=t.closest(`[data-dismissable-layer]`),r=e.dataset.dismissableLayer===``?e:e.querySelector(`[data-dismissable-layer]`),i=Array.from(e.ownerDocument.querySelectorAll(`[data-dismissable-layer]`));return!!(n&&(r===n||i.indexOf(r)<i.indexOf(n)))}function HY(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=E(!1),a=E(()=>{});return gr(o=>{if(!DN||!mn(n))return;let s=async n=>{let o=n.target;if(!(!t?.value||!o)){if(VY(t.value,o)){i.value=!1;return}if(n.target&&!i.value){let t={originalEvent:n};function i(){AJ(zY,e,t)}n.pointerType===`touch`?(r.removeEventListener(`click`,a.value),a.value=i,r.addEventListener(`click`,a.value,{once:!0})):i()}else r.removeEventListener(`click`,a.value);i.value=!1}},c=window.setTimeout(()=>{r.addEventListener(`pointerdown`,s)},0);o(()=>{window.clearTimeout(c),r.removeEventListener(`pointerdown`,s),r.removeEventListener(`click`,a.value)})}),{onPointerDownCapture:()=>{mn(n)&&(i.value=!0)}}}function UY(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=E(!1);return gr(a=>{if(!DN||!mn(n))return;let o=async n=>{if(!t?.value)return;await Gn(),await Gn();let r=n.target;!t.value||!r||VY(t.value,r)||n.target&&!i.value&&AJ(BY,e,{originalEvent:n})};r.addEventListener(`focusin`,o),a(()=>r.removeEventListener(`focusin`,o))}),{onFocusCapture:()=>{mn(n)&&(i.value=!0)},onBlurCapture:()=>{mn(n)&&(i.value=!1)}}}var WY=Yt({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),GY=k({__name:`DismissableLayer`,props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1,default:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`dismiss`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=$(),o=B(()=>a.value?.ownerDocument??globalThis.document),s=B(()=>WY.layersRoot),c=B(()=>a.value?Array.from(s.value).indexOf(a.value):-1),l=B(()=>WY.layersWithOutsidePointerEventsDisabled.size>0),u=B(()=>{let e=Array.from(s.value),[t]=[...WY.layersWithOutsidePointerEventsDisabled].slice(-1),n=e.indexOf(t);return c.value>=n}),d=HY(async e=>{let t=[...WY.branches].some(t=>t?.contains(e.target));!n.present||!u.value||t||(r(`pointerDownOutside`,e),r(`interactOutside`,e),await Gn(),e.defaultPrevented||r(`dismiss`))},a),f=UY(e=>{let t=[...WY.branches].some(t=>t?.contains(e.target));!n.present||t||(r(`focusOutside`,e),r(`interactOutside`,e),e.defaultPrevented||r(`dismiss`))},a);return vP(`Escape`,e=>{n.present&&c.value===s.value.size-1&&(r(`escapeKeyDown`,e),e.defaultPrevented||r(`dismiss`))}),yr([a,()=>n.disableOutsidePointerEvents,()=>n.present],([e,t,n],r,i)=>{!e||!n||t&&(WY.layersWithOutsidePointerEventsDisabled.size===0&&(WY.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents=`none`),WY.layersWithOutsidePointerEventsDisabled.add(e),i(()=>{WY.layersWithOutsidePointerEventsDisabled.delete(e),WY.layersWithOutsidePointerEventsDisabled.size===0&&!jJ(WY.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=WY.originalBodyPointerEvents)}))},{immediate:!0}),yr([a,()=>n.present],([e,t],n,r)=>{!e||!t||(s.value.add(e),r(()=>{s.value.delete(e)}))},{immediate:!0}),gr(e=>{e(()=>{a.value&&(s.value.delete(a.value),WY.layersWithOutsidePointerEventsDisabled.delete(a.value))})}),(e,t)=>(M(),P(D(NY),{ref:D(i),"as-child":e.asChild,as:e.as,"data-dismissable-layer":``,style:be({pointerEvents:l.value?u.value?`auto`:`none`:void 0}),onFocusCapture:D(f).onFocusCapture,onBlurCapture:D(f).onBlurCapture,onPointerdownCapture:D(d).onPointerDownCapture},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`style`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),KY=k({__name:`DismissableLayerBranch`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{forwardRef:n,currentElement:r}=$();return Fi(()=>{WY.branches.add(r.value)}),zi(()=>{WY.branches.delete(r.value)}),(e,r)=>(M(),P(D(NY),z({ref:D(n)},t),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),qY=wN(()=>E([]));function JY(){let e=qY();return{add(t){let n=e.value[0];t!==n&&n?.pause(),e.value=YY(e.value,t),e.value.unshift(t)},remove(t){e.value=YY(e.value,t),e.value[0]?.resume()}}}function YY(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}var XY=`focusScope.autoFocusOnMount`,ZY=`focusScope.autoFocusOnUnmount`,QY={bubbles:!1,cancelable:!0};function $Y(e,{select:t=!1}={}){let n=kJ();for(let r of e)if(aX(r,{select:t}),kJ()!==n)return!0}function eX(e){let t=tX(e);return[nX(t,e),nX(t.reverse(),e)]}function tX(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function nX(e,t){for(let n of e)if(!rX(n,{upTo:t}))return n}function rX(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function iX(e){return e instanceof HTMLInputElement&&`select`in e}function aX(e,{select:t=!1}={}){if(e&&e.focus){let n=kJ();e.focus({preventScroll:!0}),e!==n&&iX(e)&&t&&e.select()}}var oX=k({__name:`FocusScope`,props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},present:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`mountAutoFocus`,`unmountAutoFocus`],setup(e,{emit:t}){let n=e,r=t,{currentRef:i,currentElement:a}=$(),o=E(null),s=JY(),c=Yt({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});gr(e=>{if(!DN)return;let t=a.value;if(!n.trapped)return;function r(e){if(c.paused||!t)return;let n=e.target;t.contains(n)?o.value=n:aX(o.value,{select:!0})}function i(e){if(c.paused||!t)return;let n=e.relatedTarget;n!==null&&(t.contains(n)||aX(o.value,{select:!0}))}function s(e){let n=o.value;n!==null&&e.some(e=>e.removedNodes.length>0)&&(t.contains(n)||aX(t))}document.addEventListener(`focusin`,r),document.addEventListener(`focusout`,i);let l=new MutationObserver(s);t&&l.observe(t,{childList:!0,subtree:!0}),e(()=>{document.removeEventListener(`focusin`,r),document.removeEventListener(`focusout`,i),l.disconnect()})});function l(e,t){let n=new CustomEvent(XY,QY),i=e=>r(`mountAutoFocus`,e);e.addEventListener(XY,i),e.dispatchEvent(n),e.removeEventListener(XY,i),n.defaultPrevented||($Y(tX(e),{select:!0}),kJ()===t&&aX(e))}gr(async e=>{let t=a.value;if(await Gn(),!t)return;n.present!==!1&&s.add(c);let i=kJ();!t.contains(i)&&n.present!==!1&&l(t,i),e(()=>{let e=new CustomEvent(ZY,QY),n=e=>{r(`unmountAutoFocus`,e)};t.addEventListener(ZY,n),t.dispatchEvent(e),t.setAttribute(`data-focus-scope-unmounting`,``),setTimeout(()=>{e.defaultPrevented||aX(i??document.body,{select:!0}),t.removeEventListener(ZY,n),s.remove(c),t.removeAttribute(`data-focus-scope-unmounting`)},0)})}),yr(()=>n.present,async(e,t)=>{if(!DN)return;if(e===!1&&t===!0){s.remove(c);return}if(e!==!0||t!==!1)return;s.add(c),await Gn();let n=a.value;if(!n)return;let r=kJ();n.contains(r)||l(n,r)});function u(e){if(!n.loop&&!n.trapped||c.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=kJ();if(t&&r){let t=e.currentTarget,[i,a]=eX(t);i&&a?!e.shiftKey&&r===a?(e.preventDefault(),n.loop&&aX(i,{select:!0})):e.shiftKey&&r===i&&(e.preventDefault(),n.loop&&aX(a,{select:!0})):r===t&&e.preventDefault()}}return(e,t)=>(M(),P(D(NY),{ref_key:`currentRef`,ref:i,tabindex:`-1`,"as-child":e.asChild,as:e.as,onKeydown:u},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`as-child`,`as`]))}}),sX=`menu.itemSelect`,cX=[`Enter`,` `],lX=[`ArrowDown`,`PageUp`,`Home`],uX=[`ArrowUp`,`PageDown`,`End`],dX=[...lX,...uX],fX={ltr:[...cX,`ArrowRight`],rtl:[...cX,`ArrowLeft`]},pX={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]};function mX(e){return e?`open`:`closed`}function hX(e){return e===`indeterminate`}function gX(e){return hX(e)?`indeterminate`:e?`checked`:`unchecked`}function _X(e){let t=kJ();for(let n of e)if(n===t||(n.focus(),kJ()!==t))return}function vX(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function yX(e,t){return t?vX({x:e.clientX,y:e.clientY},t):!1}function bX(e){return e.pointerType===`mouse`}var xX=k({__name:`DialogContentImpl`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=FY(),{forwardRef:a,currentElement:o}=$();return i.titleId||=bY(void 0,`reka-dialog-title`),i.descriptionId||=bY(void 0,`reka-dialog-description`),Fi(()=>{i.contentElement=o,kJ()!==document.body&&(i.triggerElement.value=kJ())}),(e,t)=>(M(),P(D(oX),{"as-child":``,loop:``,trapped:n.trapFocus,present:n.present,onMountAutoFocus:t[5]||=e=>r(`openAutoFocus`,e),onUnmountAutoFocus:t[6]||=e=>r(`closeAutoFocus`,e)},{default:O(()=>[I(D(GY),z({id:D(i).contentId,ref:D(a),as:e.as,"as-child":e.asChild,present:n.present,"disable-outside-pointer-events":e.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":D(i).descriptionId,"aria-labelledby":D(i).titleId,"data-state":D(mX)(D(i).open.value)},e.$attrs,{onDismiss:t[0]||=e=>D(i).onOpenChange(!1),onEscapeKeyDown:t[1]||=e=>r(`escapeKeyDown`,e),onFocusOutside:t[2]||=e=>r(`focusOutside`,e),onInteractOutside:t[3]||=e=>r(`interactOutside`,e),onPointerDownOutside:t[4]||=e=>r(`pointerDownOutside`,e)}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`id`,`as`,`as-child`,`present`,`disable-outside-pointer-events`,`aria-describedby`,`aria-labelledby`,`data-state`])]),_:3},8,[`trapped`,`present`]))}}),SX=k({__name:`DialogContentModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=FY(),a=JJ(r),{forwardRef:o,currentElement:s}=$();vY(B(()=>n.present?s.value:void 0));let c=B(()=>{let{present:e,...t}=n;return t});return yr(()=>n.present,(e,t)=>{!e&&t&&i.triggerElement.value?.focus()}),(e,t)=>(M(),P(xX,z({...c.value,...D(a)},{ref:D(o),present:e.present,"trap-focus":D(i).open.value,"disable-outside-pointer-events":n.disableOutsidePointerEvents,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(e.preventDefault(),D(i).triggerElement.value?.focus())},onPointerDownOutside:t[1]||=e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()},onFocusOutside:t[2]||=e=>{e.preventDefault()}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`present`,`trap-focus`,`disable-outside-pointer-events`]))}}),CX=k({__name:`DialogContentNonModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=JJ(t);$();let i=FY(),a=E(!1),o=E(!1),s=B(()=>{let{present:e,...t}=n;return t});return yr(()=>n.present,(e,t)=>{!e&&t&&(a.value||i.triggerElement.value?.focus(),a.value=!1,o.value=!1)}),(e,t)=>(M(),P(xX,z({...s.value,...D(r)},{present:e.present,"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(a.value||D(i).triggerElement.value?.focus(),e.preventDefault()),a.value=!1,o.value=!1},onInteractOutside:t[1]||=e=>{e.defaultPrevented||(a.value=!0,e.detail.originalEvent.type===`pointerdown`&&(o.value=!0));let t=e.target;D(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`present`]))}}),wX=k({__name:`DialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=FY(),a=JJ(r),{forwardRef:o}=$();return(e,t)=>(M(),P(D(AY),{present:e.forceMount||D(i).open.value,"force-mount":e.forceMount||!D(i).unmountOnHide.value},{default:O(({present:t})=>[D(i).modal.value?lr((M(),P(SX,z({key:0,ref:D(o),present:D(i).unmountOnHide.value||t},{...n,...D(a),...e.$attrs}),{default:O(()=>[j(e.$slots,`default`)]),_:2},1040,[`present`])),[[ac,D(i).unmountOnHide.value||t]]):lr((M(),P(CX,z({key:1,ref:D(o),present:D(i).unmountOnHide.value||t},{...n,...D(a),...e.$attrs}),{default:O(()=>[j(e.$slots,`default`)]),_:2},1040,[`present`])),[[ac,D(i).unmountOnHide.value||t]])]),_:3},8,[`present`,`force-mount`]))}}),TX=k({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;$();let n=FY();return(e,r)=>(M(),P(D(NY),z(t,{id:D(n).descriptionId}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`id`]))}}),EX=k({__name:`DialogOverlayImpl`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1,default:!0}},setup(e){let t=e,n=FY(),r=UJ(t.present);return yr(()=>t.present,e=>r.value=e),$(),(e,t)=>(M(),P(D(NY),{as:e.as,"as-child":e.asChild,"data-state":D(n).open.value?`open`:`closed`,style:{"pointer-events":`auto`},onPointerdown:t[0]||=hl(()=>{},[`left`,`self`,`prevent`])},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`]))}}),DX=k({__name:`DialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=FY(),{forwardRef:n}=$();return(e,r)=>D(t)?.modal.value?(M(),P(D(AY),{key:0,present:e.forceMount||D(t).open.value,"force-mount":e.forceMount||!D(t).unmountOnHide.value},{default:O(({present:r})=>[lr(I(EX,z(e.$attrs,{ref:D(n),as:e.as,"as-child":e.asChild,present:D(t).unmountOnHide.value||r}),{default:O(()=>[j(e.$slots,`default`)]),_:2},1040,[`as`,`as-child`,`present`]),[[ac,D(t).unmountOnHide.value||r]])]),_:3},8,[`present`,`force-mount`])):R(`v-if`,!0)}}),OX=k({__name:`Teleport`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e,n=LJ({}),r=B(()=>t.to??n.teleportTo?.value??`body`),i=pP();return(e,t)=>D(i)||e.forceMount?(M(),P(Pr,{key:0,to:r.value,disabled:e.disabled,defer:e.defer},[j(e.$slots,`default`)],8,[`to`,`disabled`,`defer`])):R(`v-if`,!0)}}),kX=k({__name:`DialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(M(),P(D(OX),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),AX=k({__name:`DialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let t=e,n=FY();return $(),(e,r)=>(M(),P(D(NY),z(t,{id:D(n).titleId}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`id`]))}}),jX=k({__name:`DialogTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=FY(),{forwardRef:r,currentElement:i}=$();return n.contentId||=bY(void 0,`reka-dialog-content`),Fi(()=>{n.triggerElement.value=i.value}),(e,i)=>(M(),P(D(NY),z(t,{ref:D(r),type:e.as===`button`?`button`:void 0,"aria-haspopup":`dialog`,"aria-expanded":D(n).open.value||!1,"aria-controls":D(n).open.value?D(n).contentId:void 0,"data-state":D(n).open.value?`open`:`closed`,onClick:D(n).onOpenToggle}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`onClick`]))}}),MX=k({__name:`AlertDialogAction`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(RY),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),[NX,PX]=OJ(`AlertDialogContent`),FX=k({__name:`AlertDialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=JJ(t);$();let i=E();return PX({onCancelElementChange:e=>{i.value=e}}),(e,t)=>(M(),P(D(wX),z({...n,...D(r)},{role:`alertdialog`,onPointerDownOutside:t[0]||=hl(()=>{},[`prevent`]),onInteractOutside:t[1]||=hl(()=>{},[`prevent`]),onOpenAutoFocus:t[2]||=()=>{Gn(()=>{i.value?.focus({preventScroll:!0})})}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),IX=k({__name:`AlertDialogCancel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=NX(),{forwardRef:r,currentElement:i}=$();return Fi(()=>{n.onCancelElementChange(i.value)}),(e,n)=>(M(),P(D(RY),z(t,{ref:D(r)}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),LX=k({__name:`AlertDialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(TX),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),RX=k({__name:`AlertDialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(DX),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),zX=k({__name:`AlertDialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(M(),P(D(OX),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),BX=k({__name:`AlertDialogRoot`,props:{open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1}},emits:[`update:open`],setup(e,{emit:t}){let n=eY(e,t);return $(),(e,t)=>(M(),P(D(LY),z(D(n),{modal:!0}),{default:O(t=>[j(e.$slots,`default`,Ee($o(t)))]),_:3},16))}}),VX=k({__name:`AlertDialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(AX),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),HX=k({__name:`AlertDialogTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(jX),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),UX=`data-reka-collection-item`;function WX(e={}){let{key:t=``,isProvider:n=!1}=e,r=`${t}CollectionProvider`,i;n?(i={collectionRef:E(),itemMap:E(new Map)},dr(r,i)):i=fr(r);let a=(e=!1)=>{let t=i.collectionRef.value;if(!t)return[];let n=Array.from(t.querySelectorAll(`[${UX}]`)),r=new Map(n.map((e,t)=>[e,t])),a=Array.from(i.itemMap.value.values()).sort((e,t)=>(r.get(e.ref)??-1)-(r.get(t.ref)??-1));return e?a:a.filter(e=>e.ref.dataset.disabled!==``)},o=k({name:`CollectionSlot`,inheritAttrs:!1,setup(e,{slots:t,attrs:n}){let{primitiveElement:r,currentElement:a}=PY();return yr(a,()=>{i.collectionRef.value=a.value}),()=>V(jY,{ref:r,...n},t)}}),s=k({name:`CollectionItem`,inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(e,{slots:t,attrs:n}){let{primitiveElement:r,currentElement:a}=PY();return gr(t=>{if(a.value){let n=on(a.value);i.itemMap.value.set(n,{ref:a.value,value:e.value}),t(()=>i.itemMap.value.delete(n))}}),()=>V(jY,{...n,[UX]:``,ref:r},t)}});return{getItems:a,reactiveItems:B(()=>Array.from(i.itemMap.value.values())),itemMapSize:B(()=>i.itemMap.value.size),CollectionSlot:o,CollectionItem:s}}var GX=k({__name:`VisuallyHidden`,props:{feature:{type:String,required:!1,default:`focusable`},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){return(e,t)=>(M(),P(D(NY),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature===`focusable`||e.feature===`fully-hidden`?`true`:void 0,"data-hidden":e.feature===`fully-hidden`?``:void 0,tabindex:e.feature===`fully-hidden`?`-1`:void 0,style:{position:`absolute`,border:0,width:`1px`,height:`1px`,padding:0,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,wordWrap:`normal`,top:`-1px`,left:`-1px`}},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}}),KX=k({inheritAttrs:!1,__name:`VisuallyHiddenInputBubble`,props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:`fully-hidden`}},setup(e){let t=e,{primitiveElement:n,currentElement:r}=PY();return yr(B(()=>t.checked??t.value),(e,t)=>{if(!r.value)return;let n=r.value,i=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(i,`value`).set;if(a&&e!==t){let t=new Event(`input`,{bubbles:!0}),r=new Event(`change`,{bubbles:!0});a.call(n,e),n.dispatchEvent(t),n.dispatchEvent(r)}}),(e,r)=>(M(),P(GX,z({ref_key:`primitiveElement`,ref:n},{...t,...e.$attrs},{as:`input`}),null,16))}}),qX=k({inheritAttrs:!1,__name:`VisuallyHiddenInput`,props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:`fully-hidden`}},setup(e){let t=e,n=B(()=>typeof t.value==`object`&&Array.isArray(t.value)&&t.value.length===0&&t.required),r=B(()=>typeof t.value==`string`||typeof t.value==`number`||typeof t.value==`boolean`||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value==`object`&&Array.isArray(t.value)?t.value.flatMap((e,n)=>typeof e==`object`?Object.entries(e).map(([e,r])=>({name:`${t.name}[${n}][${e}]`,value:r})):{name:`${t.name}[${n}]`,value:e}):t.value!==null&&typeof t.value==`object`&&!Array.isArray(t.value)?Object.entries(t.value).map(([e,n])=>({name:`${t.name}[${e}]`,value:n})):[]);return(e,i)=>(M(),N(Ro,null,[R(` We render single input if it's required `),n.value?(M(),P(KX,z({key:e.name},{...t,...e.$attrs},{name:e.name,value:e.value}),null,16,[`name`,`value`])):(M(!0),N(Ro,{key:1},Zi(r.value,n=>(M(),P(KX,z({key:n.name},{ref_for:!0},{...t,...e.$attrs},{name:n.name,value:n.value}),null,16,[`name`,`value`]))),128))],2112))}}),JX=`rovingFocusGroup.onEntryFocus`,YX={bubbles:!1,cancelable:!0},XX={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function ZX(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function QX(e,t,n){let r=ZX(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return XX[r]}function $X(e,t=!1){let n=kJ();for(let r of e)if(r===n||(r.focus({preventScroll:t}),kJ()!==n))return}function eZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var[tZ,nZ]=OJ(`PopperRoot`),rZ=k({inheritAttrs:!1,__name:`PopperRoot`,setup(e){let t=E();return nZ({anchor:t,onAnchorChange:e=>t.value=e}),(e,t)=>j(e.$slots,`default`)}}),iZ=k({__name:`PopperAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{forwardRef:n,currentElement:r}=$(),i=tZ();return _r(()=>{i.onAnchorChange(t.reference??r.value)}),(e,t)=>(M(),P(D(NY),{ref:D(n),as:e.as,"as-child":e.asChild},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`as`,`as-child`]))}}),aZ={key:0,d:`M0 0L6 6L12 0`},oZ={key:1,d:`M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0`},sZ=k({__name:`Arrow`,props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`svg`}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(NY),z(t,{width:e.width,height:e.height,viewBox:e.asChild?void 0:`0 0 12 6`,preserveAspectRatio:e.asChild?void 0:`none`}),{default:O(()=>[j(e.$slots,`default`,{},()=>[e.rounded?(M(),N(`path`,oZ)):(M(),N(`path`,aZ))])]),_:3},16,[`width`,`height`,`viewBox`,`preserveAspectRatio`]))}});function cZ(e){return e!==null}function lZ(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=uZ(n),u={start:e.dir===`rtl`?`100%`:`0%`,center:`50%`,end:e.dir===`rtl`?`0%`:`100%`}[l],d={start:`0%`,center:`50%`,end:`100%`}[l],f=(i.arrow?.x??0)+o/2,p=(i.arrow?.y??0)+s/2,m=``,h=``;return c===`bottom`?(m=a?u:`${f}px`,h=`${-s}px`):c===`top`?(m=a?u:`${f}px`,h=`${r.floating.height+s}px`):c===`right`?(m=`${-s}px`,h=a?d:`${p}px`):c===`left`&&(m=`${r.floating.width+s}px`,h=a?d:`${p}px`),{data:{x:m,y:h}}}}}function uZ(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var dZ=[`top`,`right`,`bottom`,`left`],fZ=Math.min,pZ=Math.max,mZ=Math.round,hZ=Math.floor,gZ=e=>({x:e,y:e}),_Z={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function vZ(e,t,n){return pZ(e,fZ(t,n))}function yZ(e,t){return typeof e==`function`?e(t):e}function bZ(e){return e.split(`-`)[0]}function xZ(e){return e.split(`-`)[1]}function SZ(e){return e===`x`?`y`:`x`}function CZ(e){return e===`y`?`height`:`width`}function wZ(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function TZ(e){return SZ(wZ(e))}function EZ(e,t,n){n===void 0&&(n=!1);let r=xZ(e),i=TZ(e),a=CZ(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=FZ(o)),[o,FZ(o)]}function DZ(e){let t=FZ(e);return[OZ(e),t,OZ(t)]}function OZ(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var kZ=[`left`,`right`],AZ=[`right`,`left`],jZ=[`top`,`bottom`],MZ=[`bottom`,`top`];function NZ(e,t,n){switch(e){case`top`:case`bottom`:return n?t?AZ:kZ:t?kZ:AZ;case`left`:case`right`:return t?jZ:MZ;default:return[]}}function PZ(e,t,n,r){let i=xZ(e),a=NZ(bZ(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(OZ)))),a}function FZ(e){let t=bZ(e);return _Z[t]+e.slice(t.length)}function IZ(e){return{top:0,right:0,bottom:0,left:0,...e}}function LZ(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:IZ(e)}function RZ(e){let{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}}function zZ(e,t,n){let{reference:r,floating:i}=e,a=wZ(t),o=TZ(t),s=CZ(o),c=bZ(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(xZ(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1)}return p}async function BZ(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=yZ(t,e),p=LZ(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=RZ(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=RZ(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var VZ=50,HZ=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:BZ},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=zZ(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<VZ&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=zZ(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},UZ=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=yZ(e,t)||{};if(l==null)return{};let d=LZ(u),f={x:n,y:r},p=TZ(i),m=CZ(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),ee=S?S[y]:0;(!ee||!await(o.isElement==null?void 0:o.isElement(S)))&&(ee=s.floating[y]||a.floating[m]);let C=b/2-x/2,w=ee/2-h[m]/2-1,te=fZ(d[_],w),ne=fZ(d[v],w),re=te,ie=ee-h[m]-ne,ae=ee/2-h[m]/2+C,oe=vZ(re,ae,ie),se=!c.arrow&&xZ(i)!=null&&ae!==oe&&a.reference[m]/2-(ae<re?te:ne)-h[m]/2<0,ce=se?ae<re?ae-re:ae-ie:0;return{[p]:f[p]+ce,data:{[p]:oe,centerOffset:ae-oe-ce,...se&&{alignmentOffset:ce}},reset:se}}}),WZ=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=yZ(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=bZ(r),_=wZ(o),v=bZ(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[FZ(o)]:DZ(o)),x=p!==`none`;!d&&x&&b.push(...PZ(o,m,p,y));let S=[o,...b],ee=await s.detectOverflow(t,h),C=[],w=i.flip?.overflows||[];if(l&&C.push(ee[g]),u){let e=EZ(r,a,y);C.push(ee[e[0]],ee[e[1]])}if(w=[...w,{placement:r,overflows:C}],!C.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===wZ(t)||w.every(e=>wZ(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:w},reset:{placement:t}};let n=w.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=w.filter(e=>{if(x){let t=wZ(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function GZ(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function KZ(e){return dZ.some(t=>e[t]>=0)}var qZ=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=yZ(e,t);switch(i){case`referenceHidden`:{let e=GZ(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:KZ(e)}}}case`escaped`:{let e=GZ(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:KZ(e)}}}default:return{}}}}},JZ=new Set([`left`,`top`]);async function YZ(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=bZ(n),s=xZ(n),c=wZ(n)===`y`,l=JZ.has(o)?-1:1,u=a&&c?-1:1,d=yZ(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var XZ=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await YZ(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ZZ=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=yZ(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=wZ(bZ(i)),p=SZ(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=vZ(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=vZ(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},QZ=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=yZ(e,t),u={x:n,y:r},d=wZ(i),f=SZ(d),p=u[f],m=u[d],h=yZ(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=JZ.has(bZ(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},$Z=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=yZ(e,t),u=await o.detectOverflow(t,l),d=bZ(i),f=xZ(i),p=wZ(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=fZ(h-u[g],v),x=fZ(m-u[_],y),S=!t.middlewareData.shift,ee=b,C=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(ee=v),S&&!f){let e=pZ(u.left,0),t=pZ(u.right,0),n=pZ(u.top,0),r=pZ(u.bottom,0);p?C=m-2*(e!==0||t!==0?e+t:pZ(u.left,u.right)):ee=h-2*(n!==0||r!==0?n+r:pZ(u.top,u.bottom))}await c({...t,availableWidth:C,availableHeight:ee});let w=await o.getDimensions(s.floating);return m!==w.width||h!==w.height?{reset:{rects:!0}}:{}}}};function eQ(){return typeof window<`u`}function tQ(e){return iQ(e)?(e.nodeName||``).toLowerCase():`#document`}function nQ(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rQ(e){return((iQ(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function iQ(e){return eQ()?e instanceof Node||e instanceof nQ(e).Node:!1}function aQ(e){return eQ()?e instanceof Element||e instanceof nQ(e).Element:!1}function oQ(e){return eQ()?e instanceof HTMLElement||e instanceof nQ(e).HTMLElement:!1}function sQ(e){return!eQ()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof nQ(e).ShadowRoot}function cQ(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=yQ(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function lQ(e){return/^(table|td|th)$/.test(tQ(e))}function uQ(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var dQ=/transform|translate|scale|rotate|perspective|filter/,fQ=/paint|layout|strict|content/,pQ=e=>!!e&&e!==`none`,mQ;function hQ(e){let t=aQ(e)?yQ(e):e;return pQ(t.transform)||pQ(t.translate)||pQ(t.scale)||pQ(t.rotate)||pQ(t.perspective)||!_Q()&&(pQ(t.backdropFilter)||pQ(t.filter))||dQ.test(t.willChange||``)||fQ.test(t.contain||``)}function gQ(e){let t=xQ(e);for(;oQ(t)&&!vQ(t);){if(hQ(t))return t;if(uQ(t))return null;t=xQ(t)}return null}function _Q(){return mQ??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),mQ}function vQ(e){return/^(html|body|#document)$/.test(tQ(e))}function yQ(e){return nQ(e).getComputedStyle(e)}function bQ(e){return aQ(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xQ(e){if(tQ(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||sQ(e)&&e.host||rQ(e);return sQ(t)?t.host:t}function SQ(e){let t=xQ(e);return vQ(t)?e.ownerDocument?e.ownerDocument.body:e.body:oQ(t)&&cQ(t)?t:SQ(t)}function CQ(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=SQ(e),i=r===e.ownerDocument?.body,a=nQ(r);if(i){let e=wQ(a);return t.concat(a,a.visualViewport||[],cQ(r)?r:[],e&&n?CQ(e):[])}return t.concat(r,CQ(r,[],n))}function wQ(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function TQ(e){let t=yQ(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=oQ(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=mZ(n)!==a||mZ(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function EQ(e){return aQ(e)?e:e.contextElement}function DQ(e){let t=EQ(e);if(!oQ(t))return gZ(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=TQ(t),o=(a?mZ(n.width):n.width)/r,s=(a?mZ(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var OQ=gZ(0);function kQ(e){let t=nQ(e);return!_Q()||!t.visualViewport?OQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AQ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==nQ(e)?!1:t}function jQ(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=EQ(e),o=gZ(1);t&&(r?aQ(r)&&(o=DQ(r)):o=DQ(e));let s=AQ(a,n,r)?kQ(a):gZ(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=nQ(a),t=r&&aQ(r)?nQ(r):r,n=e,i=wQ(n);for(;i&&r&&t!==n;){let e=DQ(i),t=i.getBoundingClientRect(),r=yQ(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=nQ(i),i=wQ(n)}}return RZ({width:u,height:d,x:c,y:l})}function MQ(e,t){let n=bQ(e).scrollLeft;return t?t.left+n:jQ(rQ(e)).left+n}function NQ(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-MQ(e,n),y:n.top+t.scrollTop}}function PQ(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=rQ(r),s=t?uQ(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=gZ(1),u=gZ(0),d=oQ(r);if((d||!d&&!a)&&((tQ(r)!==`body`||cQ(o))&&(c=bQ(r)),d)){let e=jQ(r);l=DQ(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?NQ(o,c):gZ(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function FQ(e){return Array.from(e.getClientRects())}function IQ(e){let t=rQ(e),n=bQ(e),r=e.ownerDocument.body,i=pZ(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=pZ(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+MQ(e),s=-n.scrollTop;return yQ(r).direction===`rtl`&&(o+=pZ(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var LQ=25;function RQ(e,t){let n=nQ(e),r=rQ(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=_Q();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=MQ(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=LQ&&(a-=o)}else l<=LQ&&(a+=l);return{width:a,height:o,x:s,y:c}}function zQ(e,t){let n=jQ(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=oQ(e)?DQ(e):gZ(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function BQ(e,t,n){let r;if(t===`viewport`)r=RQ(e,n);else if(t===`document`)r=IQ(rQ(e));else if(aQ(t))r=zQ(t,n);else{let n=kQ(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return RZ(r)}function VQ(e,t){let n=xQ(e);return n===t||!aQ(n)||vQ(n)?!1:yQ(n).position===`fixed`||VQ(n,t)}function HQ(e,t){let n=t.get(e);if(n)return n;let r=CQ(e,[],!1).filter(e=>aQ(e)&&tQ(e)!==`body`),i=null,a=yQ(e).position===`fixed`,o=a?xQ(e):e;for(;aQ(o)&&!vQ(o);){let t=yQ(o),n=hQ(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||cQ(o)&&!n&&VQ(e,o))?r=r.filter(e=>e!==o):i=t,o=xQ(o)}return t.set(e,r),r}function UQ(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?uQ(t)?[]:HQ(t,this._c):[].concat(n),r],o=BQ(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=BQ(t,a[e],i);s=pZ(n.top,s),c=fZ(n.right,c),l=fZ(n.bottom,l),u=pZ(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function WQ(e){let{width:t,height:n}=TQ(e);return{width:t,height:n}}function GQ(e,t,n){let r=oQ(t),i=rQ(t),a=n===`fixed`,o=jQ(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=gZ(0);function l(){c.x=MQ(i)}if(r||!r&&!a)if((tQ(t)!==`body`||cQ(i))&&(s=bQ(t)),r){let e=jQ(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?NQ(i,s):gZ(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function KQ(e){return yQ(e).position===`static`}function qQ(e,t){if(!oQ(e)||yQ(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return rQ(e)===n&&(n=n.ownerDocument.body),n}function JQ(e,t){let n=nQ(e);if(uQ(e))return n;if(!oQ(e)){let t=xQ(e);for(;t&&!vQ(t);){if(aQ(t)&&!KQ(t))return t;t=xQ(t)}return n}let r=qQ(e,t);for(;r&&lQ(r)&&KQ(r);)r=qQ(r,t);return r&&vQ(r)&&KQ(r)&&!hQ(r)?n:r||gQ(e)||n}var YQ=async function(e){let t=this.getOffsetParent||JQ,n=this.getDimensions,r=await n(e.floating);return{reference:GQ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function XQ(e){return yQ(e).direction===`rtl`}var ZQ={convertOffsetParentRelativeRectToViewportRelativeRect:PQ,getDocumentElement:rQ,getClippingRect:UQ,getOffsetParent:JQ,getElementRects:YQ,getClientRects:FQ,getDimensions:WQ,getScale:DQ,isElement:aQ,isRTL:XQ};function QQ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $Q(e,t){let n=null,r,i=rQ(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=hZ(d),h=hZ(i.clientWidth-(u+f)),g=hZ(i.clientHeight-(d+p)),_=hZ(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:pZ(0,fZ(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!QQ(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function e$(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=EQ(e),u=i||a?[...l?CQ(l):[],...t?CQ(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?$Q(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?jQ(e):null;c&&g();function g(){let t=jQ(e);h&&!QQ(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var t$=XZ,n$=ZZ,r$=WZ,i$=$Z,a$=qZ,o$=UZ,s$=QZ,c$=(e,t,n)=>{let r=new Map,i={platform:ZQ,...n},a={...i.platform,_c:r};return HZ(e,t,{...i,platform:a})};function l$(e){return typeof e==`object`&&!!e&&`$el`in e}function u$(e){if(l$(e)){let t=e.$el;return iQ(t)&&tQ(t)===`#comment`?null:t}return e}function d$(e){return typeof e==`function`?e():D(e)}function f$(e){return{name:`arrow`,options:e,fn(t){let n=u$(d$(e.element));return n==null?{}:o$({element:n,padding:e.padding}).fn(t)}}}function p$(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function m$(e,t){let n=p$(e);return Math.round(t*n)/n}function h$(e,t,n){n===void 0&&(n={});let r=n.whileElementsMounted,i=B(()=>d$(n.open)??!0),a=B(()=>d$(n.middleware)),o=B(()=>d$(n.placement)??`bottom`),s=B(()=>d$(n.strategy)??`absolute`),c=B(()=>d$(n.transform)??!0),l=B(()=>u$(e.value)),u=B(()=>u$(t.value)),d=E(0),f=E(0),p=E(s.value),m=E(o.value),h=un({}),g=E(!1),_=B(()=>{let e={position:p.value,left:`0`,top:`0`};if(!u.value)return e;let t=m$(u.value,d.value),n=m$(u.value,f.value);return c.value?{...e,transform:`translate(`+t+`px, `+n+`px)`,...p$(u.value)>=1.5&&{willChange:`transform`}}:{position:p.value,left:t+`px`,top:n+`px`}}),v;function y(){if(l.value==null||u.value==null)return;let e=i.value;c$(l.value,u.value,{middleware:a.value,placement:o.value,strategy:s.value}).then(t=>{d.value=t.x,f.value=t.y,p.value=t.strategy,m.value=t.placement,h.value=t.middlewareData,g.value=e!==!1})}function b(){typeof v==`function`&&(v(),v=void 0)}function x(){if(b(),r===void 0){y();return}if(l.value!=null&&u.value!=null){v=r(l.value,u.value,y);return}}function S(){i.value||(g.value=!1)}return yr([a,o,s,i],y,{flush:`sync`}),yr([l,u],x,{flush:`sync`}),yr(i,S,{flush:`sync`}),Be()&&Ve(b),{x:Qt(d),y:Qt(f),strategy:Qt(p),placement:Qt(m),middlewareData:Qt(h),isPositioned:Qt(g),floatingStyles:_,update:y}}var g$=[`dir`],_$={side:`bottom`,sideOffset:0,sideFlip:!0,align:`center`,alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:`partial`,hideWhenDetached:!1,positionStrategy:`fixed`,updatePositionStrategy:`optimized`,prioritizePosition:!1},[v$,y$]=OJ(`PopperContent`),b$=k({inheritAttrs:!1,__name:`PopperContent`,props:_a({memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{..._$}),emits:[`placed`],setup(e,{emit:t}){let n=e,r=t,i=tZ(),{forwardRef:a,currentElement:o}=$(),s=qJ(B(()=>n.dir)),c=E(),l=E(),{width:u,height:d}=CY(l),f=B(()=>n.side+(n.align===`center`?``:`-${n.align}`)),p=B(()=>typeof n.collisionPadding==`number`?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),m=B(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),h=B(()=>({padding:p.value,boundary:m.value.filter(cZ),altBoundary:m.value.length>0})),g=B(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),_=B(()=>[t$({mainAxis:n.sideOffset+d.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&r$({...h.value,...g.value}),n.avoidCollisions&&n$({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky===`partial`?s$():void 0,...h.value}),!n.prioritizePosition&&n.avoidCollisions&&r$({...h.value,...g.value}),i$({...h.value,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--reka-popper-available-width`,`${n}px`),o.setProperty(`--reka-popper-available-height`,`${r}px`),o.setProperty(`--reka-popper-anchor-width`,`${i}px`),o.setProperty(`--reka-popper-anchor-height`,`${a}px`)}}),l.value&&f$({element:l.value,padding:n.arrowPadding}),lZ({arrowWidth:u.value,arrowHeight:d.value,dir:s.value}),n.hideWhenDetached&&a$({strategy:`referenceHidden`,...h.value})]),{floatingStyles:v,placement:y,isPositioned:b,middlewareData:x,update:S}=h$(B(()=>n.reference??i.anchor.value),c,{strategy:n.positionStrategy,placement:f,whileElementsMounted:(...e)=>e$(...e,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy===`always`}),middleware:_}),ee=B(()=>uZ(y.value)[0]),C=B(()=>uZ(y.value)[1]);_r(()=>{b.value&&r(`placed`)});let w=B(()=>{let e=x.value.arrow?.centerOffset!==0;return n.hideShiftedArrow&&e}),te=E(``);return gr(()=>{o.value&&(te.value=window.getComputedStyle(o.value).zIndex)}),y$({placedSide:ee,onArrowChange:e=>l.value=e,arrowX:B(()=>x.value.arrow?.x??0),arrowY:B(()=>x.value.arrow?.y??0),shouldHideArrow:w}),(e,t)=>(M(),N(`div`,{ref_key:`floatingRef`,ref:c,"data-reka-popper-content-wrapper":``,dir:D(s),style:be({...D(v),transform:D(b)?D(v).transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:te.value,"--reka-popper-transform-origin":[D(x).transformOrigin?.x,D(x).transformOrigin?.y].join(` `),...D(x).hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}})},[n.memoDependencies?Ss([n.asChild,n.as,ee.value,C.value,D(b),...Object.values(e.$attrs),...n.memoDependencies],()=>(M(),P(D(NY),z({key:0,ref:D(a)},e.$attrs,{"as-child":n.asChild,as:n.as,"data-side":ee.value,"data-align":C.value,style:{animation:D(b)?void 0:`none`}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`as-child`,`as`,`data-side`,`data-align`,`style`])),t,0):(M(),P(D(NY),z({key:1,ref:D(a)},e.$attrs,{"as-child":n.asChild,as:n.as,"data-side":ee.value,"data-align":C.value,dir:D(s),style:{animation:D(b)?void 0:`none`}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`as-child`,`as`,`data-side`,`data-align`,`dir`,`style`]))],12,g$))}}),x$={top:`bottom`,right:`left`,bottom:`top`,left:`right`},S$=k({inheritAttrs:!1,__name:`PopperArrow`,props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`svg`}},setup(e){let{forwardRef:t}=$(),n=v$(),r=B(()=>x$[n.placedSide.value]);return(e,i)=>(M(),N(`span`,{ref:e=>{D(n).onArrowChange(e??void 0)},style:be({position:`absolute`,left:D(n).arrowX?.value?`${D(n).arrowX?.value}px`:void 0,top:D(n).arrowY?.value?`${D(n).arrowY?.value}px`:void 0,[r.value]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[D(n).placedSide.value],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[D(n).placedSide.value],visibility:D(n).shouldHideArrow.value?`hidden`:void 0})},[I(sZ,z(e.$attrs,{ref:D(t),style:{display:`block`},as:e.as,"as-child":e.asChild,rounded:e.rounded,width:e.width,height:e.height}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`as`,`as-child`,`rounded`,`width`,`height`])],4))}});function C$(e){let t=LJ({nonce:E()});return B(()=>e?.value||t.nonce?.value)}var[sre,cre]=OJ(`AvatarRoot`),[w$,T$]=OJ(`RovingFocusGroup`),E$=k({__name:`RovingFocusGroup`,props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`entryFocus`,`update:currentTabStopId`],setup(e,{expose:t,emit:n}){let r=e,i=n,{loop:a,orientation:o,dir:s}=yn(r),c=qJ(s),l=KP(r,`currentTabStopId`,i,{defaultValue:r.defaultCurrentTabStopId,passive:r.currentTabStopId===void 0}),u=E(!1),d=E(!1),f=E(0),{getItems:p,CollectionSlot:m}=WX({isProvider:!0});function h(e){let t=!d.value;if(e.currentTarget&&e.target===e.currentTarget&&t&&!u.value){let t=new CustomEvent(JX,YX);if(e.currentTarget.dispatchEvent(t),i(`entryFocus`,t),!t.defaultPrevented){let e=p().map(e=>e.ref).filter(e=>e.dataset.disabled!==``);$X([e.find(e=>e.getAttribute(`data-active`)===``),e.find(e=>e.getAttribute(`data-highlighted`)===``),e.find(e=>e.id===l.value),...e].filter(Boolean),r.preventScrollOnEntryFocus)}}d.value=!1}function g(){setTimeout(()=>{d.value=!1},1)}return t({getItems:p}),T$({loop:a,dir:c,orientation:o,currentTabStopId:l,onItemFocus:e=>{l.value=e},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(e,t)=>(M(),P(D(m),null,{default:O(()=>[I(D(NY),{tabindex:u.value||f.value===0?-1:0,"data-orientation":D(o),as:e.as,"as-child":e.asChild,dir:D(c),style:{outline:`none`},onMousedown:t[0]||=e=>d.value=!0,onMouseup:g,onFocus:h,onBlur:t[1]||=e=>u.value=!1},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`tabindex`,`data-orientation`,`as`,`as-child`,`dir`])]),_:3}))}}),D$=k({__name:`RovingFocusItem`,props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,n=w$(),r=bY(),i=B(()=>t.tabStopId||r),a=B(()=>n.currentTabStopId.value===i.value),{getItems:o,CollectionItem:s}=WX();Fi(()=>{t.focusable&&n.onFocusableItemAdd()}),zi(()=>{t.focusable&&n.onFocusableItemRemove()}),yr(()=>t.focusable,(e,t)=>{e!==t&&(e?n.onFocusableItemAdd():n.onFocusableItemRemove())});function c(e){if(e.key===`Tab`&&e.shiftKey){n.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let r=QX(e,n.orientation.value,n.dir.value);if(r!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||!t.allowShiftKey&&e.shiftKey)return;e.preventDefault();let i=[...o().map(e=>e.ref).filter(e=>e.dataset.disabled!==``)];if(r===`last`)i.reverse();else if(r===`prev`||r===`next`){r===`prev`&&i.reverse();let t=i.indexOf(e.currentTarget);i=n.loop.value?eZ(i,t+1):i.slice(t+1)}Gn(()=>$X(i))}}return(e,t)=>(M(),P(D(s),null,{default:O(()=>[I(D(NY),{tabindex:a.value?0:-1,"data-orientation":D(n).orientation.value,"data-active":e.active?``:void 0,"data-disabled":e.focusable?void 0:``,as:e.as,"as-child":e.asChild,onMousedown:t[0]||=t=>{e.focusable?D(n).onItemFocus(i.value):t.preventDefault()},onFocus:t[1]||=e=>D(n).onItemFocus(i.value),onKeydown:c},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`tabindex`,`data-orientation`,`data-active`,`data-disabled`,`as`,`as-child`])]),_:3}))}}),[O$,k$]=OJ(`CheckboxGroupRoot`),A$=k({__name:`CheckboxGroupRoot`,props:{defaultValue:{type:Array,required:!1},modelValue:{type:Array,required:!1},rovingFocus:{type:Boolean,required:!1,default:!0},disabled:{type:Boolean,required:!1},as:{type:null,required:!1},asChild:{type:Boolean,required:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1},loop:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{disabled:i,rovingFocus:a,dir:o}=yn(n),s=qJ(o),{primitiveElement:c,currentElement:l}=PY(),u=QJ(l),d=KP(n,`modelValue`,r,{defaultValue:n.defaultValue??[],passive:n.modelValue===void 0}),f=B(()=>a.value?{loop:n.loop,dir:s.value,orientation:n.orientation}:{});return k$({modelValue:d,rovingFocus:a,disabled:i}),(e,t)=>(M(),P(qi(D(a)?D(E$):D(NY)),z({ref_key:`primitiveElement`,ref:c,as:e.as,"as-child":e.asChild},f.value),{default:O(()=>[j(e.$slots,`default`),D(u)&&e.name?(M(),P(D(qX),{key:0,name:e.name,value:D(d),required:e.required},null,8,[`name`,`value`,`required`])):R(`v-if`,!0)]),_:3},16,[`as`,`as-child`]))}});function j$(e){return e===`indeterminate`}function M$(e){return j$(e)?`indeterminate`:e?`checked`:`unchecked`}var[N$,P$]=OJ(`CheckboxRoot`),F$=k({inheritAttrs:!1,__name:`CheckboxRoot`,props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:`on`},id:{type:String,required:!1},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=$(),o=O$(null),s=KP(n,`modelValue`,r,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),c=B(()=>o?.disabled.value||n.disabled),l=B(()=>wJ(s.value,n.trueValue)),u=B(()=>jJ(o?.modelValue.value)?s.value===`indeterminate`?`indeterminate`:l.value:MJ(o.modelValue.value,n.value));function d(){if(jJ(o?.modelValue.value))s.value===`indeterminate`?s.value=n.trueValue:s.value=l.value?n.falseValue:n.trueValue;else{let e=[...o.modelValue.value||[]];if(MJ(e,n.value)){let t=e.findIndex(e=>wJ(e,n.value));e.splice(t,1)}else e.push(n.value);o.modelValue.value=e}}let f=QJ(a),p=tY(),m=ma(),h=B(()=>{if(!m[`aria-label`])return n.id&&a.value?document.querySelector(`[for="${n.id}"]`)?.innerText:void 0});return P$({disabled:c,state:u}),(e,t)=>(M(),N(Ro,null,[(M(),P(qi(D(o)?.rovingFocus.value?D(D$):D(NY)),z({...e.$attrs,...D(p)},{id:e.id,ref:D(i),role:`checkbox`,"as-child":e.asChild,as:e.as,type:e.as===`button`?`button`:void 0,"aria-checked":D(j$)(u.value)?`mixed`:u.value,"aria-required":e.required,"aria-label":e.$attrs[`aria-label`]||h.value,"data-state":D(M$)(u.value),"data-disabled":c.value?``:void 0,disabled:c.value,focusable:D(o)?.rovingFocus.value?!c.value:void 0,onKeydown:_l(hl(()=>{},[`prevent`]),[`enter`]),onClick:d}),{default:O(()=>[j(e.$slots,`default`,{modelValue:D(s),state:u.value})]),_:3},16,[`id`,`as-child`,`as`,`type`,`aria-checked`,`aria-required`,`aria-label`,`data-state`,`data-disabled`,`disabled`,`focusable`,`onKeydown`])),D(f)&&e.name&&!D(o)?(M(),P(D(qX),z({key:0,type:`checkbox`,checked:!!u.value,name:e.name,value:e.value,disabled:c.value,required:e.required},D(p)),null,16,[`checked`,`name`,`value`,`disabled`,`required`])):R(`v-if`,!0)],64))}}),I$=k({__name:`CheckboxIndicator`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let{forwardRef:t}=$(),n=N$();return(e,r)=>(M(),P(D(AY),{present:e.forceMount||D(j$)(D(n).state.value)||D(n).state.value===!0},{default:O(()=>[I(D(NY),z({ref:D(t),"data-state":D(M$)(D(n).state.value),"data-disabled":D(n).disabled.value?``:void 0,style:{pointerEvents:`none`},"as-child":e.asChild,as:e.as},e.$attrs),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`data-state`,`data-disabled`,`as-child`,`as`])]),_:3},8,[`present`]))}});function L$(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function R$(e,t,n){return TJ(100/(n-t)*(e-t),0,100)}function z$(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function B$(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function V$(e,t,n){let r=e/2;return(r-W$([0,50],[0,r])(t)*n)*n}function H$(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function U$(e,t){if(t>0){let n=H$(e);return Math.min(...n)>=t}return!0}function W$(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function G$(e){return(String(e).split(`.`)[1]||``).length}function K$(e,t){let n=10**t;return Math.round(e*n)/n}var q$=[`PageUp`,`PageDown`],J$=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],Y$={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageUp`,`ArrowUp`,`ArrowLeft`]},[X$,Z$]=OJ([`SliderVertical`,`SliderHorizontal`]),Q$=k({__name:`SliderHorizontal`,props:{dir:{type:String,required:!1},min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:[`slideEnd`,`slideStart`,`slideMove`,`homeKeyDown`,`endKeyDown`,`stepKeyDown`],setup(e,{emit:t}){let n=e,r=t,{max:i,min:a,dir:o,inverted:s}=yn(n),{forwardRef:c,currentElement:l}=$(),u=e1(),d=E(),f=E(),p=B(()=>o?.value!==`rtl`&&!s.value||o?.value!==`ltr`&&s.value);function m(e,t){let n=f.value||l.value.getBoundingClientRect(),r=[...u.thumbElements.value][u.valueIndexToChangeRef.value],o=u.thumbAlignment.value===`contain`?r.clientWidth:0;!d.value&&!t&&u.thumbAlignment.value===`contain`&&(d.value=e.clientX-r.getBoundingClientRect().left);let s=W$([0,n.width-o],p.value?[a.value,i.value]:[i.value,a.value]);return f.value=n,s(t?e.clientX-n.left-o/2:e.clientX-n.left-(d.value??0))}return Z$({startEdge:B(()=>p.value?`left`:`right`),endEdge:B(()=>p.value?`right`:`left`),direction:B(()=>p.value?1:-1),size:`width`}),(e,t)=>(M(),P(r1,{ref:D(c),dir:D(o),"data-orientation":`horizontal`,style:be({"--reka-slider-thumb-transform":!p.value&&D(u).thumbAlignment.value===`overflow`?`translateX(50%)`:`translateX(-50%)`}),onSlideStart:t[0]||=e=>{let t=m(e,!0);r(`slideStart`,t)},onSlideMove:t[1]||=e=>{let t=m(e);r(`slideMove`,t)},onSlideEnd:t[2]||=()=>{f.value=void 0,d.value=void 0,r(`slideEnd`)},onStepKeyDown:t[3]||=e=>{let t=p.value?`from-left`:`from-right`,n=D(Y$)[t].includes(e.key);r(`stepKeyDown`,e,n?-1:1)},onEndKeyDown:t[4]||=e=>r(`endKeyDown`,e),onHomeKeyDown:t[5]||=e=>r(`homeKeyDown`,e)},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`dir`,`style`]))}}),$$=k({__name:`SliderVertical`,props:{min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:[`slideEnd`,`slideStart`,`slideMove`,`homeKeyDown`,`endKeyDown`,`stepKeyDown`],setup(e,{emit:t}){let n=e,r=t,{max:i,min:a,inverted:o}=yn(n),s=e1(),{forwardRef:c,currentElement:l}=$(),u=E(),d=E(),f=B(()=>!o.value);function p(e,t){let n=d.value||l.value.getBoundingClientRect(),r=[...s.thumbElements.value][s.valueIndexToChangeRef.value],o=s.thumbAlignment.value===`contain`?r.clientHeight:0;!u.value&&!t&&s.thumbAlignment.value===`contain`&&(u.value=e.clientY-r.getBoundingClientRect().top);let c=W$([0,n.height-o],f.value?[i.value,a.value]:[a.value,i.value]),p=t?e.clientY-n.top-o/2:e.clientY-n.top-(u.value??0);return d.value=n,c(p)}return Z$({startEdge:B(()=>f.value?`bottom`:`top`),endEdge:B(()=>f.value?`top`:`bottom`),direction:B(()=>f.value?1:-1),size:`height`}),(e,t)=>(M(),P(r1,{ref:D(c),"data-orientation":`vertical`,style:be({"--reka-slider-thumb-transform":!f.value&&D(s).thumbAlignment.value===`overflow`?`translateY(-50%)`:`translateY(50%)`}),onSlideStart:t[0]||=e=>{let t=p(e,!0);r(`slideStart`,t)},onSlideMove:t[1]||=e=>{let t=p(e);r(`slideMove`,t)},onSlideEnd:t[2]||=()=>{d.value=void 0,u.value=void 0,r(`slideEnd`)},onStepKeyDown:t[3]||=e=>{let t=f.value?`from-bottom`:`from-top`,n=D(Y$)[t].includes(e.key);r(`stepKeyDown`,e,n?-1:1)},onEndKeyDown:t[4]||=e=>r(`endKeyDown`,e),onHomeKeyDown:t[5]||=e=>r(`homeKeyDown`,e)},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`style`]))}}),[e1,t1]=OJ(`SliderRoot`),n1=k({inheritAttrs:!1,__name:`SliderRoot`,props:{defaultValue:{type:Array,required:!1,default:()=>[0]},modelValue:{type:[Array,null],required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:`horizontal`},dir:{type:String,required:!1},inverted:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},minStepsBetweenThumbs:{type:Number,required:!1,default:0},thumbAlignment:{type:String,required:!1,default:`contain`},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`valueCommit`],setup(e,{emit:t}){let n=e,r=t,{min:i,max:a,step:o,minStepsBetweenThumbs:s,orientation:c,disabled:l,thumbAlignment:u,dir:d}=yn(n),f=qJ(d),{forwardRef:p,currentElement:m}=$(),h=QJ(m),{CollectionSlot:g}=WX({isProvider:!0}),_=KP(n,`modelValue`,r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),v=B(()=>Array.isArray(_.value)?[..._.value]:[]),y=E(0),b=E(v.value);function x(e){C(e,B$(v.value,e))}function S(e){C(e,y.value)}function ee(){let e=b.value[y.value];v.value[y.value]!==e&&r(`valueCommit`,an(v.value))}function C(e,t,{commit:n}={commit:!1}){let c=G$(o.value),l=TJ(K$(Math.round((e-i.value)/o.value)*o.value+i.value,c),i.value,a.value),u=L$(v.value,l,t);if(U$(u,s.value*o.value)){y.value=u.indexOf(l);let e=String(u)!==String(_.value);e&&n&&r(`valueCommit`,u),e&&(w.value[y.value]?.focus(),_.value=u)}}let w=E([]);return t1({modelValue:_,currentModelValue:v,valueIndexToChangeRef:y,thumbElements:w,orientation:c,min:i,max:a,disabled:l,thumbAlignment:u}),(e,t)=>(M(),P(D(g),null,{default:O(()=>[(M(),P(qi(D(c)===`horizontal`?Q$:$$),z(e.$attrs,{ref:D(p),"as-child":e.asChild,as:e.as,min:D(i),max:D(a),dir:D(f),inverted:e.inverted,"aria-disabled":D(l),"data-disabled":D(l)?``:void 0,onPointerdown:t[0]||=()=>{D(l)||(b.value=v.value)},onSlideStart:t[1]||=e=>!D(l)&&x(e),onSlideMove:t[2]||=e=>!D(l)&&S(e),onSlideEnd:t[3]||=e=>!D(l)&&ee(),onHomeKeyDown:t[4]||=e=>!D(l)&&C(D(i),0,{commit:!0}),onEndKeyDown:t[5]||=e=>!D(l)&&C(D(a),v.value.length-1,{commit:!0}),onStepKeyDown:t[6]||=(e,t)=>{if(!D(l)){let n=D(q$).includes(e.key)||e.shiftKey&&D(J$).includes(e.key)?10:1,r=y.value,i=v.value[r];C(i+D(o)*n*t,r,{commit:!0})}}}),{default:O(()=>[j(e.$slots,`default`,{modelValue:D(_)}),D(h)&&e.name?(M(),P(D(qX),{key:0,type:`number`,value:D(_),name:e.name,required:e.required,disabled:D(l),step:D(o)},null,8,[`value`,`name`,`required`,`disabled`,`step`])):R(`v-if`,!0)]),_:3},16,[`as-child`,`as`,`min`,`max`,`dir`,`inverted`,`aria-disabled`,`data-disabled`]))]),_:3}))}}),r1=k({__name:`SliderImpl`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},emits:[`slideStart`,`slideMove`,`slideEnd`,`homeKeyDown`,`endKeyDown`,`stepKeyDown`],setup(e,{emit:t}){let n=e,r=t,i=e1();return(e,t)=>(M(),P(D(NY),z({"data-slider-impl":``},n,{onKeydown:t[0]||=e=>{e.key===`Home`?(r(`homeKeyDown`,e),e.preventDefault()):e.key===`End`?(r(`endKeyDown`,e),e.preventDefault()):D(q$).concat(D(J$)).includes(e.key)&&(r(`stepKeyDown`,e),e.preventDefault())},onPointerdown:t[1]||=e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),D(i).thumbElements.value.includes(t)?t.focus():r(`slideStart`,e)},onPointermove:t[2]||=e=>{e.target.hasPointerCapture(e.pointerId)&&r(`slideMove`,e)},onPointerup:t[3]||=e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),r(`slideEnd`,e))}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),i1=k({__name:`SliderRange`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e1(),n=X$();$();let r=B(()=>t.currentModelValue.value.map(e=>R$(e,t.min.value,t.max.value))),i=B(()=>t.currentModelValue.value.length>1?Math.min(...r.value):0),a=B(()=>100-Math.max(...r.value,0));return(e,r)=>(M(),P(D(NY),{"data-disabled":D(t).disabled.value?``:void 0,"data-orientation":D(t).orientation.value,"as-child":e.asChild,as:e.as,style:be({[D(n).startEdge.value]:`${i.value}%`,[D(n).endEdge.value]:`${a.value}%`})},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`data-disabled`,`data-orientation`,`as-child`,`as`,`style`]))}}),a1=k({inheritAttrs:!1,__name:`SliderThumbImpl`,props:{index:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=e1(),r=X$(),{forwardRef:i,currentElement:a}=$(),{CollectionItem:o}=WX(),s=B(()=>n.modelValue?.value?.[t.index]),c=B(()=>s.value===void 0?0:R$(s.value,n.min.value??0,n.max.value??100)),l=B(()=>z$(t.index,n.modelValue?.value?.length??0)),u=CY(a),d=B(()=>u[r.size].value),f=B(()=>n.thumbAlignment.value===`overflow`||!d.value?0:V$(d.value,c.value,r.direction.value)),p=pP();return Fi(()=>{n.thumbElements.value.push(a.value)}),zi(()=>{let e=n.thumbElements.value.findIndex(e=>e===a.value)??-1;n.thumbElements.value.splice(e,1)}),(e,t)=>(M(),P(D(o),null,{default:O(()=>[I(D(NY),z(e.$attrs,{ref:D(i),role:`slider`,tabindex:D(n).disabled.value?void 0:0,"aria-label":e.$attrs[`aria-label`]||l.value,"data-disabled":D(n).disabled.value?``:void 0,"data-orientation":D(n).orientation.value,"aria-valuenow":s.value,"aria-valuemin":D(n).min.value,"aria-valuemax":D(n).max.value,"aria-orientation":D(n).orientation.value,"as-child":e.asChild,as:e.as,style:{transform:`var(--reka-slider-thumb-transform)`,position:`absolute`,[D(r).startEdge.value]:`calc(${c.value}% + ${f.value}px)`,display:!D(p)&&s.value===void 0?`none`:void 0},onFocus:t[0]||=()=>{D(n).valueIndexToChangeRef.value=e.index}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`tabindex`,`aria-label`,`data-disabled`,`data-orientation`,`aria-valuenow`,`aria-valuemin`,`aria-valuemax`,`aria-orientation`,`as-child`,`as`,`style`])]),_:3}))}}),o1=k({__name:`SliderThumb`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,{getItems:n}=WX(),{forwardRef:r,currentElement:i}=$(),a=B(()=>i.value?n(!0).findIndex(e=>e.ref===i.value):-1);return(e,n)=>(M(),P(a1,z({ref:D(r)},t,{index:a.value}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`index`]))}}),s1=k({__name:`SliderTrack`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e1();return $(),(e,n)=>(M(),P(D(NY),{"as-child":e.asChild,as:e.as,"data-disabled":D(t).disabled.value?``:void 0,"data-orientation":D(t).orientation.value},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`data-disabled`,`data-orientation`]))}}),c1=k({__name:`MenuAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return(e,n)=>(M(),P(D(iZ),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),l1=k({__name:`MenuArrow`,props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return(e,n)=>(M(),P(D(S$),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}});function u1(){let e=E(!1);return Fi(()=>{uP(`keydown`,()=>{e.value=!0},{capture:!0,passive:!0}),uP([`pointerdown`,`pointermove`],()=>{e.value=!1},{capture:!0,passive:!0})}),e}var d1=WN(u1),[f1,p1]=OJ([`MenuRoot`,`MenuSub`],`MenuContext`),[m1,h1]=OJ(`MenuRoot`),g1=k({__name:`MenuRoot`,props:{open:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,{modal:i,dir:a}=yn(n),o=qJ(a),s=KP(n,`open`,r),c=E(),l=d1();return p1({open:s,onOpenChange:e=>{s.value=e},content:c,onContentChange:e=>{c.value=e}}),h1({onClose:()=>{s.value=!1},isUsingKeyboardRef:l,dir:o,modal:i}),(e,t)=>(M(),P(D(rZ),null,{default:O(()=>[j(e.$slots,`default`)]),_:3}))}}),[_1,v1]=OJ(`MenuContent`),y1=k({__name:`MenuContentImpl`,props:_a({loop:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},disableOutsideScroll:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{..._$}),emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`,`dismiss`],setup(e,{emit:t}){let n=e,r=t,i=f1(),a=m1(),{trapFocus:o,disableOutsidePointerEvents:s,loop:c}=yn(n);XJ(),UJ(s.value);let l=E(``),u=E(0),d=E(0),f=E(null),p=E(`right`),m=E(0),h=E(null),g=E(),{forwardRef:_,currentElement:v}=$(),{handleTypeaheadSearch:y}=TY(),b=E();function x(e){let t=FJ(e,b.value||kJ(),v.value,{loop:c.value,arrowKeyOptions:`vertical`,dir:a?.dir.value,focus:!1,attributeName:`[data-reka-collection-item]:not([data-disabled])`});t&&(b.value=t,t.scrollIntoView({block:`nearest`}))}function S(){b.value&&b.value.click()}let ee=E(),C=E();yr(b,e=>{if(C.value&&(e===void 0||e!==C.value.trigger.value)){if(e===void 0)return;C.value.onOpenChange(!1),C.value=void 0}}),yr(v,e=>{i.onContentChange(e)}),zi(()=>{window.clearTimeout(u.value)});function w(e){return p.value===f.value?.side&&yX(e,f.value?.area)}async function te(e){r(`openAutoFocus`,e),!e.defaultPrevented&&(e.preventDefault(),v.value?.focus({preventScroll:!0}))}function ne(e){if(e.defaultPrevented)return;let t=e.target,n=t.closest(`[data-reka-menu-content]`)===e.currentTarget,r=[`input`,`textarea`].includes(t.tagName.toLowerCase()),i=e.ctrlKey||e.altKey||e.metaKey,o=e.key.length===1,s=FJ(e,kJ(),v.value,{loop:c.value,arrowKeyOptions:`vertical`,dir:a?.dir.value,focus:!0,attributeName:`[data-reka-collection-item]:not([data-disabled])`});if(s)return s?.focus();if(e.code===`Space`)return;let l=g.value?.getItems()??[];if(n&&(e.key===`Tab`&&a.modal.value&&e.preventDefault(),!i&&o&&!r&&y(e.key,l)),e.target!==v.value||!dX.includes(e.key))return;e.preventDefault();let u=[...l.map(e=>e.ref)];uX.includes(e.key)&&u.reverse(),_X(u)}function re(e){e?.currentTarget?.contains?.(e.target)||(window.clearTimeout(u.value),l.value=``)}function ie(e){if(!bX(e))return;let t=e.target,n=m.value!==e.clientX;if((e?.currentTarget)?.contains(t)&&n){let t=e.clientX>m.value?`right`:`left`;p.value=t,m.value=e.clientX}}function ae(e){bX(e)&&ee.value&&ee.value.focus()}return v1({onItemEnter:e=>!!w(e),onItemLeave:e=>w(e)?!0:([`INPUT`,`TEXTAREA`].includes(kJ()?.tagName||``)||v.value?.focus(),h.value=null,!1),onTriggerLeave:e=>!!w(e),searchRef:l,highlightedElement:b,onKeydownNavigation:x,onKeydownEnter:S,filterElement:ee,onFilterElementChange:e=>{ee.value=e},activeSubmenuContext:C,pointerGraceTimerRef:d,onPointerGraceIntentChange:e=>{f.value=e}}),(e,t)=>(M(),P(D(oX),{"as-child":``,trapped:D(o),onMountAutoFocus:te,onUnmountAutoFocus:t[7]||=e=>r(`closeAutoFocus`,e)},{default:O(()=>[I(D(GY),{"as-child":``,"disable-outside-pointer-events":D(s),onEscapeKeyDown:t[2]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[3]||=e=>r(`pointerDownOutside`,e),onFocusOutside:t[4]||=e=>r(`focusOutside`,e),onInteractOutside:t[5]||=e=>r(`interactOutside`,e),onDismiss:t[6]||=e=>r(`dismiss`)},{default:O(()=>[I(D(E$),{ref_key:`rovingFocusGroupRef`,ref:g,"current-tab-stop-id":h.value,"onUpdate:currentTabStopId":t[0]||=e=>h.value=e,"as-child":``,orientation:`vertical`,dir:D(a).dir.value,loop:D(c),onEntryFocus:t[1]||=e=>{r(`entryFocus`,e),D(a).isUsingKeyboardRef.value||e.preventDefault()}},{default:O(()=>[I(D(b$),{ref:D(_),role:`menu`,as:e.as,"as-child":e.asChild,"aria-orientation":`vertical`,"data-reka-menu-content":``,"data-state":D(mX)(D(i).open.value),dir:D(a).dir.value,side:e.side,"side-offset":e.sideOffset,align:e.align,"align-offset":e.alignOffset,"avoid-collisions":e.avoidCollisions,"collision-boundary":e.collisionBoundary,"collision-padding":e.collisionPadding,"arrow-padding":e.arrowPadding,"prioritize-position":e.prioritizePosition,"position-strategy":e.positionStrategy,"update-position-strategy":e.updatePositionStrategy,sticky:e.sticky,"hide-when-detached":e.hideWhenDetached,reference:e.reference,onKeydown:ne,onBlur:re,onPointermove:ie,onPointerenter:ae},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`,`dir`,`side`,`side-offset`,`align`,`align-offset`,`avoid-collisions`,`collision-boundary`,`collision-padding`,`arrow-padding`,`prioritize-position`,`position-strategy`,`update-position-strategy`,`sticky`,`hide-when-detached`,`reference`])]),_:3},8,[`current-tab-stop-id`,`dir`,`loop`])]),_:3},8,[`disable-outside-pointer-events`])]),_:3},8,[`trapped`]))}}),b1=k({inheritAttrs:!1,__name:`MenuItemImpl`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=_1(),{forwardRef:r,currentElement:i}=$(),{CollectionItem:a}=WX(),o=E(!1),s=B(()=>o.value||i.value!=null&&n.highlightedElement.value===i.value);async function c(e){if(!(e.defaultPrevented||!bX(e))){if(t.disabled)n.onItemLeave(e);else if(!n.onItemEnter(e)){let t=e.currentTarget;n.highlightedElement.value=t,[`INPUT`,`TEXTAREA`].includes(kJ()?.tagName||``)||t.focus({preventScroll:!0})}}}async function l(e){await Gn(),!e.defaultPrevented&&bX(e)&&n.highlightedElement.value===i.value&&!n.onItemLeave(e)&&n.highlightedElement.value===i.value&&(n.highlightedElement.value=void 0)}return(e,t)=>(M(),P(D(a),{value:{textValue:e.textValue}},{default:O(()=>[I(D(NY),z({ref:D(r),role:`menuitem`,tabindex:`-1`},e.$attrs,{as:e.as,"as-child":e.asChild,"aria-disabled":e.disabled||void 0,"data-disabled":e.disabled?``:void 0,"data-highlighted":s.value?``:void 0,onPointermove:c,onPointerleave:l,onFocus:t[0]||=async t=>{await Gn(),!(t.defaultPrevented||e.disabled)&&(o.value=!0,D(n).highlightedElement.value=t.currentTarget)},onBlur:t[1]||=async e=>{await Gn(),!e.defaultPrevented&&(o.value=!1)}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`as`,`as-child`,`aria-disabled`,`data-disabled`,`data-highlighted`])]),_:3},8,[`value`]))}}),x1=k({__name:`MenuItem`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=$(),o=m1(),s=_1(),c=E(!1);async function l(){let e=a.value;if(!n.disabled&&e){let e=new CustomEvent(sX,{bubbles:!0,cancelable:!0});r(`select`,e),await Gn(),e.defaultPrevented?c.value=!1:o.onClose()}}return(e,t)=>(M(),P(b1,z(n,{ref:D(i),onClick:l,onPointerdown:t[0]||=()=>{c.value=!0},onPointerup:t[1]||=async e=>{await Gn(),!e.defaultPrevented&&(c.value||e.currentTarget?.click())},onKeydown:t[2]||=async t=>{let n=D(s).searchRef.value!==``;e.disabled||n&&t.key===` `||D(cX).includes(t.key)&&(t.currentTarget?.click(),t.preventDefault())}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),[S1,C1]=OJ([`MenuCheckboxItem`,`MenuRadioItem`],`MenuItemIndicatorContext`),w1=k({__name:`MenuItemIndicator`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=S1({modelValue:E(!1)});return(e,n)=>(M(),P(D(AY),{present:e.forceMount||D(hX)(D(t).modelValue.value)||D(t).modelValue.value===!0},{default:O(()=>[I(D(NY),{as:e.as,"as-child":e.asChild,"data-state":D(gX)(D(t).modelValue.value)},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`])]),_:3},8,[`present`]))}}),T1=k({__name:`MenuCheckboxItem`,props:{modelValue:{type:[Boolean,String],required:!1,default:!1},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`,`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=$J(qN(n,[`modelValue`])),a=KP(n,`modelValue`,r);return C1({modelValue:a}),(e,t)=>(M(),P(x1,z({role:`menuitemcheckbox`},D(i),{"aria-checked":D(hX)(D(a))?`mixed`:D(a),"data-state":D(gX)(D(a)),onSelect:t[0]||=async e=>{r(`select`,e),D(hX)(D(a))?a.value=!0:a.value=!D(a)}}),{default:O(()=>[j(e.$slots,`default`,{modelValue:D(a)})]),_:3},16,[`aria-checked`,`data-state`]))}}),E1=k({__name:`MenuRootContentModal`,props:{loop:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=eY(n,r),a=f1(),{forwardRef:o,currentElement:s}=$();return vY(s),(e,t)=>(M(),P(y1,z(D(i),{ref:D(o),"trap-focus":D(a).open.value,"disable-outside-pointer-events":D(a).open.value,"disable-outside-scroll":!0,onDismiss:t[0]||=e=>D(a).onOpenChange(!1),onFocusOutside:t[1]||=hl(e=>r(`focusOutside`,e),[`prevent`])}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`trap-focus`,`disable-outside-pointer-events`]))}}),D1=k({__name:`MenuRootContentNonModal`,props:{loop:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=eY(e,t),r=f1();return(e,t)=>(M(),P(y1,z(D(n),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:t[0]||=e=>D(r).onOpenChange(!1)}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),O1=k({__name:`MenuContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=eY(e,t),r=f1(),i=m1();return(e,t)=>(M(),P(D(AY),{present:e.forceMount||D(r).open.value},{default:O(()=>[D(i).modal.value?(M(),P(E1,Ee(z({key:0},{...e.$attrs,...D(n)})),{default:O(()=>[j(e.$slots,`default`)]),_:3},16)):(M(),P(D1,Ee(z({key:1},{...e.$attrs,...D(n)})),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),[k1,A1]=OJ(`MenuGroup`),j1=k({__name:`MenuGroup`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=bY(void 0,`reka-menu-group`);return A1({id:n}),(e,r)=>(M(),P(D(NY),z({role:`group`},t,{"aria-labelledby":D(n)}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`aria-labelledby`]))}}),M1=k({__name:`MenuLabel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(e){let t=e,n=k1({id:``});return(e,r)=>(M(),P(D(NY),z(t,{id:D(n).id||void 0}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`id`]))}}),N1=k({__name:`MenuPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(M(),P(D(OX),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),[P1,F1]=OJ(`MenuRadioGroup`),I1=k({__name:`MenuRadioGroup`,props:{modelValue:{type:null,required:!1,default:``},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=$J(qN(n,[`modelValue`])),a=KP(n,`modelValue`,r);return F1({modelValue:a,onValueChange:e=>{a.value=e}}),(e,t)=>(M(),P(j1,Ee($o(D(i))),{default:O(()=>[j(e.$slots,`default`,{modelValue:D(a)})]),_:3},16))}}),L1=k({__name:`MenuRadioItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=$J(qN(n,[`value`])),{value:a}=yn(n),o=P1(),s=B(()=>o.modelValue.value===a?.value);return C1({modelValue:s}),(e,t)=>(M(),P(x1,z({role:`menuitemradio`},D(i),{"aria-checked":s.value,"data-state":D(gX)(s.value),onSelect:t[0]||=async e=>{r(`select`,e),D(o).onValueChange(D(a))}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`aria-checked`,`data-state`]))}}),R1=k({__name:`MenuSeparator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return(e,n)=>(M(),P(D(NY),z(t,{role:`separator`,"aria-orientation":`horizontal`}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),[z1,B1]=OJ(`MenuSub`),V1=k({__name:`MenuSub`,props:{open:{type:Boolean,required:!1,default:void 0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=KP(n,`open`,t,{defaultValue:!1,passive:n.open===void 0}),i=f1(),a=E(),o=E();return gr(e=>{i?.open.value===!1&&(r.value=!1),e(()=>r.value=!1)}),p1({open:r,onOpenChange:e=>{r.value=e},content:o,onContentChange:e=>{o.value=e}}),B1({triggerId:``,contentId:``,trigger:a,onTriggerChange:e=>{a.value=e}}),(e,t)=>(M(),P(D(rZ),null,{default:O(()=>[j(e.$slots,`default`)]),_:3}))}}),H1=k({__name:`MenuSubContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1,default:!0},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=eY(e,t),r=f1(),i=m1(),a=z1(),o=_1(),{forwardRef:s,currentElement:c}=$();return a.contentId||=bY(void 0,`reka-menu-sub-content`),(e,t)=>(M(),P(D(AY),{present:e.forceMount||D(r).open.value},{default:O(()=>[I(y1,z(D(n),{id:D(a).contentId,ref:D(s),"aria-labelledby":D(a).triggerId,align:`start`,side:D(i).dir.value===`rtl`?`left`:`right`,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,"trap-focus":!1,onOpenAutoFocus:t[0]||=hl(e=>{D(i).isUsingKeyboardRef.value&&D(c)?.focus()},[`prevent`]),onCloseAutoFocus:t[1]||=hl(()=>{},[`prevent`]),onFocusOutside:t[2]||=e=>{if(e.defaultPrevented)return;let t=D(o).filterElement.value?.contains(e.target);e.target!==D(a).trigger.value&&!t&&D(r).onOpenChange(!1)},onEscapeKeyDown:t[3]||=e=>{D(i).onClose(),e.preventDefault()},onKeydown:t[4]||=e=>{let t=e.currentTarget?.contains(e.target),n=D(pX)[D(i).dir.value].includes(e.key);t&&n&&(D(r).onOpenChange(!1),D(o).filterElement.value?(D(o).filterElement.value.focus(),D(o).highlightedElement.value=D(a).trigger.value,D(a).trigger.value?.scrollIntoView({block:`nearest`})):D(a).trigger.value?.focus(),e.preventDefault())}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`id`,`aria-labelledby`,`side`])]),_:3},8,[`present`]))}}),U1=k({__name:`MenuSubTrigger`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=f1(),r=m1(),i=z1(),a=_1();yr(n.open,e=>{e?a.activeSubmenuContext.value={onOpenChange:n.onOpenChange,trigger:i.trigger}:a.activeSubmenuContext.value?.trigger.value===i.trigger.value&&(a.activeSubmenuContext.value=void 0)});let o=E(null);i.triggerId||=bY(void 0,`reka-menu-sub-trigger`);function s(){o.value&&window.clearTimeout(o.value),o.value=null}zi(()=>{s()});function c(e){bX(e)&&(a.onItemEnter(e)||!t.disabled&&!n.open.value&&!o.value&&(a.onPointerGraceIntentChange(null),o.value=window.setTimeout(()=>{n.onOpenChange(!0),s()},100)))}async function l(e){if(!bX(e))return;s();let t=n.content.value?.getBoundingClientRect();if(t?.width){let r=n.content.value?.dataset.side,i=r===`right`,o=i?-5:5,s=t[i?`left`:`right`],c=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(a.pointerGraceTimerRef.value),a.pointerGraceTimerRef.value=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e))return;a.onPointerGraceIntentChange(null)}}async function u(e){let i=a.searchRef.value!==``;t.disabled||i&&e.key===` `||fX[r.dir.value].includes(e.key)&&(n.onOpenChange(!0),await Gn(),n.content.value?.focus(),e.preventDefault())}return(e,r)=>(M(),P(c1,{"as-child":``},{default:O(()=>[I(b1,z(t,{id:D(i).triggerId,ref:e=>{e&&D(i)?.onTriggerChange(e?.$el)},"aria-haspopup":`menu`,"aria-expanded":D(n).open.value,"aria-controls":D(i).contentId,"data-state":D(mX)(D(n).open.value),onClick:r[0]||=async e=>{t.disabled||e.defaultPrevented||(e.currentTarget?.focus(),D(n).open.value||D(n).onOpenChange(!0))},onPointermove:c,onPointerleave:l,onKeydown:u}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`id`,`aria-expanded`,`aria-controls`,`data-state`])]),_:3}))}}),W1=k({__name:`ContextMenuCheckboxItem`,props:{modelValue:{type:[Boolean,String],required:!1},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`,`update:modelValue`],setup(e,{emit:t}){let n=e,r=JJ(t);return $(),(e,t)=>(M(),P(D(T1),Ee($o({...n,...D(r)})),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),[G1,K1]=OJ(`ContextMenuRoot`),q1=k({inheritAttrs:!1,__name:`ContextMenuRoot`,props:{pressOpenDelay:{type:Number,required:!1,default:700},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,{dir:i,modal:a,pressOpenDelay:o}=yn(n);$();let s=qJ(i),c=E(!1);return K1({open:c,onOpenChange:e=>{c.value=e},dir:s,modal:a,triggerElement:E(),pressOpenDelay:o}),yr(c,e=>{r(`update:open`,e)}),(e,t)=>(M(),P(D(g1),{open:c.value,"onUpdate:open":t[0]||=e=>c.value=e,dir:D(s),modal:D(a)},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`open`,`dir`,`modal`]))}}),J1=k({__name:`ContextMenuContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1,default:0},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1,default:!0},collisionBoundary:{type:null,required:!1,default:()=>[]},collisionPadding:{type:[Number,Object],required:!1,default:0},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1,default:`partial`},hideWhenDetached:{type:Boolean,required:!1,default:!1},positionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`closeAutoFocus`],setup(e,{emit:t}){let n=eY(e,t);$();let r=G1(),i=E(!1);return(e,t)=>(M(),P(D(O1),z(D(n),{side:`right`,"side-offset":2,align:`start`,"update-position-strategy":`always`,style:{"--reka-context-menu-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-context-menu-content-available-width":`var(--reka-popper-available-width)`,"--reka-context-menu-content-available-height":`var(--reka-popper-available-height)`,"--reka-context-menu-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-context-menu-trigger-height":`var(--reka-popper-anchor-height)`},onCloseAutoFocus:t[0]||=e=>{!e.defaultPrevented&&i.value&&e.preventDefault(),i.value=!1},onInteractOutside:t[1]||=e=>{e.detail.originalEvent.button===2&&e.target===D(r).triggerElement.value&&e.preventDefault(),!e.defaultPrevented&&!D(r).modal.value&&(i.value=!0)}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),Y1=k({__name:`ContextMenuGroup`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(j1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),X1=k({__name:`ContextMenuItem`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=JJ(t);return $(),(e,t)=>(M(),P(D(x1),Ee($o({...n,...D(r)})),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),Z1=k({__name:`ContextMenuItemIndicator`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(w1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),Q1=k({__name:`ContextMenuLabel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(M1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),$1=k({__name:`ContextMenuPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(M(),P(D(N1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),e0=k({__name:`ContextMenuRadioGroup`,props:{modelValue:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=JJ(t);return $(),(e,t)=>(M(),P(D(I1),Ee($o({...n,...D(r)})),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),t0=k({__name:`ContextMenuRadioItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=JJ(t);return $(),(e,t)=>(M(),P(D(L1),Ee($o({...n,...D(r)})),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),n0=k({__name:`ContextMenuSeparator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(R1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),r0=k({__name:`ContextMenuSub`,props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t;$();let i=KP(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0});return(e,t)=>(M(),P(D(V1),{open:D(i),"onUpdate:open":t[0]||=e=>ln(i)?i.value=e:null},{default:O(()=>[j(e.$slots,`default`,{open:D(i)})]),_:3},8,[`open`]))}}),i0=k({__name:`ContextMenuSubContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=eY(e,t);return $(),(e,t)=>(M(),P(D(H1),z(D(n),{style:{"--reka-context-menu-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-context-menu-content-available-width":`var(--reka-popper-available-width)`,"--reka-context-menu-content-available-height":`var(--reka-popper-available-height)`,"--reka-context-menu-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-context-menu-trigger-height":`var(--reka-popper-anchor-height)`}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),a0=k({__name:`ContextMenuSubTrigger`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(U1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}});function o0(e){return e.pointerType!==`mouse`}var s0=k({inheritAttrs:!1,__name:`ContextMenuTrigger`,props:{disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let{disabled:t}=yn(e),{forwardRef:n,currentElement:r}=$(),i=G1(),a=E({x:0,y:0}),o=B(()=>({getBoundingClientRect:()=>({width:0,height:0,left:a.value.x,right:a.value.x,top:a.value.y,bottom:a.value.y,...a.value})})),s=E(0);function c(){window.clearTimeout(s.value)}function l(e){a.value={x:e.clientX,y:e.clientY},i.onOpenChange(!0)}async function u(e){t.value||(await Gn(),e.defaultPrevented||(c(),l(e),e.preventDefault()))}async function d(e){t.value||(await Gn(),o0(e)&&!e.defaultPrevented&&(c(),s.value=window.setTimeout(l,i.pressOpenDelay.value,e)))}async function f(e){t.value||(await Gn(),o0(e)&&!e.defaultPrevented&&c())}return Fi(()=>{r.value&&(i.triggerElement.value=r.value)}),(e,r)=>(M(),N(Ro,null,[I(D(c1),{as:`template`,reference:o.value},null,8,[`reference`]),I(D(NY),z({ref:D(n),as:e.as,"as-child":e.asChild,"data-state":D(i).open.value?`open`:`closed`,"data-disabled":D(t)?``:void 0,style:{WebkitTouchCallout:`none`,pointerEvents:`auto`}},e.$attrs,{onContextmenu:u,onPointerdown:d,onPointermove:f,onPointercancel:f,onPointerup:f}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`as`,`as-child`,`data-state`,`data-disabled`])],64))}}),[c0,l0]=OJ(`PopoverRoot`),u0=k({__name:`PopoverRoot`,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,{modal:i}=yn(n),a=KP(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0});return l0({contentId:``,triggerId:``,modal:i,open:a,onOpenChange:e=>{a.value=e},onOpenToggle:()=>{a.value=!a.value},triggerElement:E(),hasCustomAnchor:E(!1)}),(e,t)=>(M(),P(D(rZ),null,{default:O(()=>[j(e.$slots,`default`,{open:D(a),close:()=>a.value=!1})]),_:3}))}}),d0=k({__name:`PopoverArrow`,props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`svg`}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(S$),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),f0=k({__name:`PopoverClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;$();let n=c0();return(e,r)=>(M(),P(D(NY),{type:e.as===`button`?`button`:void 0,as:e.as,"as-child":t.asChild,onClick:r[0]||=e=>D(n).onOpenChange(!1)},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`type`,`as`,`as-child`]))}}),p0=k({__name:`PopoverContentImpl`,props:{trapFocus:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=$J(qN(n,`trapFocus`,`disableOutsidePointerEvents`)),{forwardRef:a}=$(),o=c0();return XJ(),(e,t)=>(M(),P(D(oX),{"as-child":``,loop:``,trapped:e.trapFocus,onMountAutoFocus:t[5]||=e=>r(`openAutoFocus`,e),onUnmountAutoFocus:t[6]||=e=>r(`closeAutoFocus`,e)},{default:O(()=>[I(D(GY),{"as-child":``,"disable-outside-pointer-events":e.disableOutsidePointerEvents,onPointerDownOutside:t[0]||=e=>r(`pointerDownOutside`,e),onInteractOutside:t[1]||=e=>r(`interactOutside`,e),onEscapeKeyDown:t[2]||=e=>r(`escapeKeyDown`,e),onFocusOutside:t[3]||=e=>r(`focusOutside`,e),onDismiss:t[4]||=e=>D(o).onOpenChange(!1)},{default:O(()=>[I(D(b$),z(D(i),{id:D(o).contentId,ref:D(a),"data-state":D(o).open.value?`open`:`closed`,"aria-labelledby":D(o).triggerId,style:{"--reka-popover-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-popover-content-available-width":`var(--reka-popper-available-width)`,"--reka-popover-content-available-height":`var(--reka-popper-available-height)`,"--reka-popover-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-popover-trigger-height":`var(--reka-popper-anchor-height)`},role:`dialog`}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`id`,`data-state`,`aria-labelledby`])]),_:3},8,[`disable-outside-pointer-events`])]),_:3},8,[`trapped`]))}}),m0=k({__name:`PopoverContentModal`,props:{memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=c0(),a=E(!1);UJ(!0);let o=eY(n,r),{forwardRef:s,currentElement:c}=$();return vY(c),(e,t)=>(M(),P(p0,z(D(o),{ref:D(s),"trap-focus":D(i).open.value,"disable-outside-pointer-events":``,onCloseAutoFocus:t[0]||=hl(e=>{r(`closeAutoFocus`,e),a.value||D(i).triggerElement.value?.focus()},[`prevent`]),onPointerDownOutside:t[1]||=e=>{r(`pointerDownOutside`,e);let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,i=t.button===2||n;a.value=i},onFocusOutside:t[2]||=hl(()=>{},[`prevent`])}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`trap-focus`]))}}),h0=k({__name:`PopoverContentNonModal`,props:{memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=c0(),a=E(!1),o=E(!1),s=eY(n,r);return(e,t)=>(M(),P(p0,z(D(s),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{r(`closeAutoFocus`,e),e.defaultPrevented||(a.value||D(i).triggerElement.value?.focus(),e.preventDefault()),a.value=!1,o.value=!1},onInteractOutside:t[1]||=async e=>{r(`interactOutside`,e),e.defaultPrevented||(a.value=!0,e.detail.originalEvent.type===`pointerdown`&&(o.value=!0));let t=e.target;D(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),g0=k({__name:`PopoverContent`,props:{forceMount:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=c0(),a=eY(n,r),{forwardRef:o}=$();return i.contentId||=bY(void 0,`reka-popover-content`),(e,t)=>(M(),P(D(AY),{present:e.forceMount||D(i).open.value},{default:O(()=>[D(i).modal.value?(M(),P(m0,z({key:0},D(a),{ref:D(o)}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16)):(M(),P(h0,z({key:1},D(a),{ref:D(o)}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),_0=k({__name:`PopoverPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(M(),P(D(OX),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),v0=k({__name:`PopoverTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=c0(),{forwardRef:r,currentElement:i}=$();return n.triggerId||=bY(void 0,`reka-popover-trigger`),Fi(()=>{n.triggerElement.value=i.value}),(e,i)=>(M(),P(qi(D(n).hasCustomAnchor.value?D(NY):D(iZ)),{"as-child":``},{default:O(()=>[I(D(NY),{id:D(n).triggerId,ref:D(r),type:e.as===`button`?`button`:void 0,"aria-haspopup":`dialog`,"aria-expanded":D(n).open.value,"aria-controls":D(n).contentId,"data-state":D(n).open.value?`open`:`closed`,as:e.as,"as-child":t.asChild,onClick:D(n).onOpenToggle},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`id`,`type`,`aria-expanded`,`aria-controls`,`data-state`,`as`,`as-child`,`onClick`])]),_:3}))}}),y0=k({__name:`DropdownMenuArrow`,props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`svg`}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(l1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),b0=k({__name:`DropdownMenuCheckboxItem`,props:{modelValue:{type:[Boolean,String],required:!1},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`,`update:modelValue`],setup(e,{emit:t}){let n=e,r=JJ(t);return $(),(e,t)=>(M(),P(D(T1),Ee($o({...n,...D(r)})),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),[x0,S0]=OJ(`DropdownMenuRoot`),C0=k({__name:`DropdownMenuRoot`,props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t;$();let i=KP(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),a=E(),{modal:o,dir:s}=yn(n),c=qJ(s);return S0({open:i,onOpenChange:e=>{i.value=e},onOpenToggle:()=>{i.value=!i.value},triggerId:``,triggerElement:a,contentId:``,modal:o,dir:c}),(e,t)=>(M(),P(D(g1),{open:D(i),"onUpdate:open":t[0]||=e=>ln(i)?i.value=e:null,dir:D(c),modal:D(o)},{default:O(()=>[j(e.$slots,`default`,{open:D(i)})]),_:3},8,[`open`,`dir`,`modal`]))}}),w0=k({__name:`DropdownMenuContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`closeAutoFocus`],setup(e,{emit:t}){let n=eY(e,t);$();let r=x0(),i=E(!1);function a(e){e.defaultPrevented||(i.value||setTimeout(()=>{r.triggerElement.value?.focus()},0),i.value=!1,e.preventDefault())}return r.contentId||=bY(void 0,`reka-dropdown-menu-content`),(e,t)=>(M(),P(D(O1),z(D(n),{id:D(r).contentId,"aria-labelledby":D(r)?.triggerId,style:{"--reka-dropdown-menu-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-dropdown-menu-content-available-width":`var(--reka-popper-available-width)`,"--reka-dropdown-menu-content-available-height":`var(--reka-popper-available-height)`,"--reka-dropdown-menu-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-dropdown-menu-trigger-height":`var(--reka-popper-anchor-height)`},onCloseAutoFocus:a,onInteractOutside:t[0]||=e=>{if(e.defaultPrevented)return;let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,a=t.button===2||n;(!D(r).modal.value||a)&&(i.value=!0),D(r).triggerElement.value?.contains(e.target)&&e.preventDefault()}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`id`,`aria-labelledby`]))}}),T0=k({__name:`DropdownMenuGroup`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(j1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),E0=k({__name:`DropdownMenuItem`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=JJ(t);return $(),(e,t)=>(M(),P(D(x1),Ee($o({...n,...D(r)})),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),D0=k({__name:`DropdownMenuItemIndicator`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(w1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),O0=k({__name:`DropdownMenuLabel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(M1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),k0=k({__name:`DropdownMenuPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(M(),P(D(N1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),A0=k({__name:`DropdownMenuRadioGroup`,props:{modelValue:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=JJ(t);return $(),(e,t)=>(M(),P(D(I1),Ee($o({...n,...D(r)})),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),j0=k({__name:`DropdownMenuRadioItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=eY(e,t);return $(),(e,t)=>(M(),P(D(L1),Ee($o(D(n))),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),M0=k({__name:`DropdownMenuSeparator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(R1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),N0=k({__name:`DropdownMenuSub`,props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=KP(n,`open`,t,{passive:n.open===void 0,defaultValue:n.defaultOpen??!1});return $(),(e,t)=>(M(),P(D(V1),{open:D(r),"onUpdate:open":t[0]||=e=>ln(r)?r.value=e:null},{default:O(()=>[j(e.$slots,`default`,{open:D(r)})]),_:3},8,[`open`]))}}),P0=k({__name:`DropdownMenuSubContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=eY(e,t);return $(),(e,t)=>(M(),P(D(H1),z(D(n),{style:{"--reka-dropdown-menu-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-dropdown-menu-content-available-width":`var(--reka-popper-available-width)`,"--reka-dropdown-menu-content-available-height":`var(--reka-popper-available-height)`,"--reka-dropdown-menu-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-dropdown-menu-trigger-height":`var(--reka-popper-anchor-height)`}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),F0=k({__name:`DropdownMenuSubTrigger`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(U1),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),I0=k({__name:`DropdownMenuTrigger`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=x0(),{forwardRef:r,currentElement:i}=$();return Fi(()=>{n.triggerElement=i}),n.triggerId||=bY(void 0,`reka-dropdown-menu-trigger`),(e,i)=>(M(),P(D(c1),{"as-child":``},{default:O(()=>[I(D(NY),{id:D(n).triggerId,ref:D(r),type:e.as===`button`?`button`:void 0,"as-child":t.asChild,as:e.as,"aria-haspopup":`menu`,"aria-expanded":D(n).open.value,"aria-controls":D(n).open.value?D(n).contentId:void 0,"data-disabled":e.disabled?``:void 0,disabled:e.disabled,"data-state":D(n).open.value?`open`:`closed`,onClick:i[0]||=async t=>{!e.disabled&&t.button===0&&t.ctrlKey===!1&&(D(n)?.onOpenToggle(),await Gn(),D(n).open.value&&t.preventDefault())},onKeydown:i[1]||=_l(t=>{e.disabled||([`Enter`,` `].includes(t.key)&&D(n).onOpenToggle(),t.key===`ArrowDown`&&D(n).onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(t.key)&&t.preventDefault())},[`enter`,`space`,`arrow-down`])},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`id`,`type`,`as-child`,`as`,`aria-expanded`,`aria-controls`,`data-disabled`,`disabled`,`data-state`])]),_:3}))}}),L0=k({__name:`HoverCardArrow`,props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`svg`}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(S$),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),[R0,z0]=OJ(`HoverCardRoot`),B0=k({__name:`HoverCardRoot`,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},openDelay:{type:Number,required:!1,default:700},closeDelay:{type:Number,required:!1,default:300},enableTouch:{type:Boolean,required:!1,default:!1}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,{openDelay:i,closeDelay:a,enableTouch:o}=yn(n);$();let s=KP(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),c=E(0),l=E(0),u=E(!1),d=E(!1),f=E(!1),p=E();function m(){clearTimeout(l.value),c.value=window.setTimeout(()=>s.value=!0,i.value)}function h(){clearTimeout(c.value),!u.value&&!d.value&&(l.value=window.setTimeout(()=>s.value=!1,a.value))}function g(){clearTimeout(c.value),s.value=!1}return z0({open:s,onOpenChange(e){s.value=e},onOpen:m,onClose:h,onDismiss:g,hasSelectionRef:u,isPointerDownOnContentRef:d,isPointerInTransitRef:f,triggerElement:p,enableTouch:o}),(e,t)=>(M(),P(D(rZ),null,{default:O(()=>[j(e.$slots,`default`,{open:D(s)})]),_:3}))}});function V0(e){return t=>t.pointerType===`touch`?void 0:e()}function H0(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var U0=k({__name:`HoverCardContentImpl`,props:{memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(e,{emit:t}){let n=e,r=t,i=$J(n),{forwardRef:a,currentElement:o}=$(),s=R0(),{isPointerInTransit:c,onPointerExit:l}=nY(s.triggerElement,o);$N(s.isPointerInTransitRef,c,{direction:`rtl`}),l(()=>{s.onClose()});let u=E(!1),d;gr(e=>{if(u.value){let t=document.body;d=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect=`none`,t.style.webkitUserSelect=`none`,e(()=>{t.style.userSelect=d,t.style.webkitUserSelect=d})}});function f(){u.value=!1,s.isPointerDownOnContentRef.value=!1,Gn(()=>{document.getSelection()?.toString()!==``&&(s.hasSelectionRef.value=!0)})}return Fi(()=>{o.value&&(document.addEventListener(`pointerup`,f),H0(o.value).forEach(e=>e.setAttribute(`tabindex`,`-1`))),uP(window,`scroll`,e=>{e.target?.contains(s.triggerElement.value)&&s.onDismiss()},{capture:!0})}),zi(()=>{document.removeEventListener(`pointerup`,f),s.hasSelectionRef.value=!1,s.isPointerDownOnContentRef.value=!1}),(e,t)=>(M(),P(D(GY),{"as-child":``,"disable-outside-pointer-events":!1,onEscapeKeyDown:t[1]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[2]||=e=>r(`pointerDownOutside`,e),onFocusOutside:t[3]||=hl(e=>r(`focusOutside`,e),[`prevent`]),onDismiss:D(s).onDismiss},{default:O(()=>[I(D(b$),z({...D(i),...e.$attrs},{ref:D(a),"data-state":D(s).open.value?`open`:`closed`,style:{userSelect:u.value?`text`:void 0,WebkitUserSelect:u.value?`text`:void 0,"--reka-hover-card-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-hover-card-content-available-width":`var(--reka-popper-available-width)`,"--reka-hover-card-content-available-height":`var(--reka-popper-available-height)`,"--reka-hover-card-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-hover-card-trigger-height":`var(--reka-popper-anchor-height)`},onPointerdown:t[0]||=e=>{e.currentTarget.contains(e.target)&&(u.value=!0),D(s).hasSelectionRef.value=!1,D(s).isPointerDownOnContentRef.value=!0}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`data-state`,`style`])]),_:3},8,[`onDismiss`]))}}),W0=k({__name:`HoverCardContent`,props:{forceMount:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(e,{emit:t}){let n=eY(e,t),{forwardRef:r}=$(),i=R0();return(e,t)=>(M(),P(D(AY),{present:e.forceMount||D(i).open.value},{default:O(()=>[I(U0,z(D(n),{ref:D(r),onPointerenter:t[0]||=e=>D(V0)(D(i).onOpen)(e)}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16)]),_:3},8,[`present`]))}}),G0=k({__name:`HoverCardPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(M(),P(D(OX),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),K0=k({__name:`HoverCardTrigger`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`a`}},setup(e){let{forwardRef:t,currentElement:n}=$(),r=R0();r.triggerElement=n;function i(){setTimeout(()=>{!r.isPointerInTransitRef.value&&!r.open.value&&r.onClose()},0)}function a(e){!r.enableTouch.value||e.pointerType!==`touch`||(r.open.value?r.onDismiss():r.onOpenChange(!0))}return(e,n)=>(M(),P(D(iZ),{"as-child":``,reference:e.reference},{default:O(()=>[I(D(NY),{ref:D(t),"as-child":e.asChild,as:e.as,"data-state":D(r).open.value?`open`:`closed`,"data-grace-area-trigger":``,onPointerenter:n[0]||=e=>D(V0)(D(r).onOpen)(e),onPointerleave:n[1]||=e=>D(V0)(i)(e),onPointerup:a,onFocus:n[2]||=e=>D(r).onOpen(),onBlur:n[3]||=e=>D(r).onClose()},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`data-state`])]),_:3},8,[`reference`]))}}),q0=new Map,J0=!1;try{J0=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}var Y0=!1;try{Y0=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}var X0={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}},Z0=class{constructor(e,t={}){this.numberFormatter=Q0(e,t),this.options=t}format(e){let t=``;if(t=!J0&&this.options.signDisplay!=null?$0(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!Y0){let{unit:e,unitDisplay:n=`short`,locale:r}=this.resolvedOptions();if(!e)return t;let i=X0[e]?.[n];t+=i[r]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!J0&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Y0&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}};function Q0(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!Y0){let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!X0[e]?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(q0.has(r))return q0.get(r);let i=new Intl.NumberFormat(e,t);return q0.set(r,i),i}function $0(e,t,n){if(t===`auto`)return e.format(n);if(t===`never`)return e.format(Math.abs(n));{let r=!1;if(t===`always`?r=n>0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);return[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`),t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r)}return e.format(n)}}var e2=RegExp(`^.*\\(.*\\).*$`),t2=[`latn`,`arab`,`hanidec`,`deva`,`beng`,`fullwide`],n2=class{constructor(e,t={}){this.locale=e,this.options=t}parse(e){return i2(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return i2(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return i2(this.locale,this.options,e).options.numberingSystem}},r2=new Map;function i2(e,t,n){let r=a2(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of t2)if(i!==r.options.numberingSystem){let r=a2(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function a2(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``),r=r2.get(n);return r||(r=new o2(e,t),r2.set(n,r)),r}var o2=class{constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits??=t.maximumFractionDigits),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=l2(e,this.formatter,this.options,t),this.options.style===`percent`&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}parse(e){let t=this.formatter.resolvedOptions().useGrouping,n=this.sanitize(e);if(!t&&this.symbols.group&&n.includes(this.symbols.group))return NaN;if(this.symbols.group&&(n=n.replaceAll(this.symbols.group,``)),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,`.`)),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,`-`)),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style===`percent`){let e=n.indexOf(`-`);n=n.replace(`-`,``),n=n.replace(`+`,``);let t=n.indexOf(`.`);t===-1&&(t=n.length),n=n.replace(`.`,``),n=t-2==0?`0.${n}`:t-2==-1?`0.0${n}`:t-2==-2?`0.00`:`${n.slice(0,t-2)}.${n.slice(t-2)}`,e>-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style===`percent`){let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new n2(this.locale,e).parse(new Z0(this.locale,e).format(r))}return this.options.currencySign===`accounting`&&e2.test(e)&&(r=-1*r),r}sanitize(e){let t=this.formatter.resolvedOptions().useGrouping;return this.symbols.noNumeralUnits.length>0&&this.symbols.noNumeralUnits.find(t=>t.unit===e)?this.symbols.noNumeralUnits.find(t=>t.unit===e).value.toString():(e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=u2(e,`,`,this.symbols.decimal),e=u2(e,`،`,this.symbols.decimal)),this.symbols.group&&t&&(e=u2(e,`.`,this.symbols.group))),this.symbols.group===`’`&&e.includes(`'`)&&t&&(e=u2(e,`'`,this.symbols.group)),this.symbols.group===`'`&&e.includes(`’`)&&t&&(e=u2(e,`’`,this.symbols.group)),this.options.locale===`fr-FR`&&this.symbols.group&&t&&(e=u2(e,` `,this.symbols.group),e=u2(e,/\u00A0/g,this.symbols.group)),e)}isValidPartialNumber(e,t=-1/0,n=1/0){let r=this.formatter.resolvedOptions().useGrouping;return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&r&&(e=u2(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}},s2=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),c2=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function l2(e,t,n,r){let i=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`,useGrouping:!0}),a=i.formatToParts(-10000.111),o=i.formatToParts(10000.111),s=c2.map(e=>i.formatToParts(e)),c=s.map((e,t)=>{let n=e.find(e=>e.type===`unit`);return n&&!e.some(e=>e.type===`integer`||e.type===`fraction`)?{unit:n.value,value:c2[t]}:null}).filter(e=>!!e),l=a.find(e=>e.type===`minusSign`)?.value??`-`,u=o.find(e=>e.type===`plusSign`)?.value;!u&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(u=`+`);let d=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>e.type===`decimal`)?.value,f=a.find(e=>e.type===`group`)?.value,p=a.filter(e=>!s2.has(e.type)).map(e=>d2(e.value)),m=s.flatMap(e=>e.filter(e=>!s2.has(e.type)).map(e=>d2(e.value))),h=[...new Set([...p,...m])].sort((e,t)=>t.length-e.length),g=h.length===0?RegExp(`\\p{White_Space}|\\p{Cf}`,`gu`):RegExp(`${h.join(`|`)}|\\p{White_Space}|\\p{Cf}`,`gu`),_=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),v=new Map(_.map((e,t)=>[e,t])),y=RegExp(`[${_.join(``)}]`,`g`);return{minusSign:l,plusSign:u,decimal:d,group:f,literals:g,numeral:y,numerals:_,index:e=>String(v.get(e)),noNumeralUnits:c}}function u2(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function d2(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function f2(e){let{disabled:t}=e,n=E(),r=CN(),i=()=>window.clearTimeout(n.value),a=e=>{i(),!t.value&&(r.trigger(),n.value=window.setTimeout(()=>{a(60)},e))},o=()=>{a(400)},s=()=>{i()},c=E(!1),l=B(()=>lP(e.target)),u=e=>{e.button!==0||c.value||(e.preventDefault(),c.value=!0,o())},d=()=>{c.value=!1,s()};return DN&&(uP(l||window,`pointerdown`,u),uP(window,`pointerup`,d),uP(window,`pointercancel`,d)),{isPressed:c,onTrigger:r.on}}function p2(e,t=E({})){return KN(()=>new Z0(e.value,t.value))}function m2(e,t=E({})){return KN(()=>new n2(e.value,t.value))}function h2(e,t,n){let r=e===`+`?t+n:t-n;if(t%1!=0||n%1!=0){let i=t.toString().split(`.`),a=n.toString().split(`.`),o=i[1]&&i[1].length||0,s=a[1]&&a[1].length||0,c=10**Math.max(o,s);t=Math.round(t*c),n=Math.round(n*c),r=e===`+`?t+n:t-n,r/=c}return r}var[g2,_2]=OJ(`NumberFieldRoot`),v2=k({inheritAttrs:!1,__name:`NumberFieldRoot`,props:{defaultValue:{type:Number,required:!1,default:void 0},modelValue:{type:[Number,null],required:!1},min:{type:Number,required:!1},max:{type:Number,required:!1},step:{type:Number,required:!1,default:1},stepSnapping:{type:Boolean,required:!1,default:!0},focusOnChange:{type:Boolean,required:!1,default:!0},formatOptions:{type:null,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1},readonly:{type:Boolean,required:!1},disableWheelChange:{type:Boolean,required:!1},invertWheelChange:{type:Boolean,required:!1},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{disabled:i,readonly:a,disableWheelChange:o,invertWheelChange:s,min:c,max:l,step:u,stepSnapping:d,formatOptions:f,id:p,locale:m}=yn(n),h=KP(n,`modelValue`,r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),{primitiveElement:g,currentElement:_}=PY(),v=SY(m),y=QJ(_),b=E(),x=B(()=>jJ(h.value)||isNaN(h.value)?!1:ee(`decrease`,h.value)>=h.value),S=B(()=>jJ(h.value)||isNaN(h.value)?!1:ee(`increase`,h.value)<=h.value);function ee(e,t,n=1){let r=u.value??1,i=e===`increase`?`+`:`-`,a;if(d.value&&!isNaN(r)){let o=DJ(t,c.value,l.value,r);if(o===t)a=h2(i,t,r*n);else{let s=e===`increase`?o>t?o:h2(`+`,o,r):o<t?o:h2(`-`,o,r);a=n>1?h2(i,s,r*(n-1)):s}}else a=h2(i,t,r*n);return ue(a)}function C(e,t=1){if(n.focusOnChange&&b.value?.focus(),n.disabled||n.readonly)return;let r=ie.parse(b.value?.value??``);if(isNaN(r)){h.value=ue(c.value??0);return}h.value=ee(e,r,t)}function w(e=1){C(`increase`,e)}function te(e=1){C(`decrease`,e)}function ne(e){e===`min`&&c.value!==void 0?h.value=ue(c.value):e===`max`&&l.value!==void 0&&(h.value=ue(l.value))}let re=p2(v,f),ie=m2(v,f),ae=B(()=>re.resolvedOptions().maximumFractionDigits>0?`decimal`:`numeric`),oe=p2(v,f),se=B(()=>jJ(h.value)||isNaN(h.value)?``:oe.format(h.value));function ce(e){return ie.isValidPartialNumber(e,c.value,l.value)}function le(e){b.value&&(b.value.value=e)}function ue(e){let t;return t=u.value===void 0||isNaN(u.value)||!d.value?TJ(e,c.value,l.value):DJ(e,c.value,l.value,u.value),t=ie.parse(re.format(t)),t}function de(e){let t=ie.parse(e);return h.value=isNaN(t)?void 0:ue(t),e.length?le(se.value):le(e)}return _2({modelValue:h,handleDecrease:te,handleIncrease:w,handleMinMaxValue:ne,inputMode:ae,inputEl:b,onInputElement:e=>b.value=e,textValue:se,readonly:a,validate:ce,applyInputValue:de,disabled:i,disableWheelChange:o,invertWheelChange:s,max:l,min:c,isDecreaseDisabled:x,isIncreaseDisabled:S,id:p}),(e,t)=>(M(),P(D(NY),z(e.$attrs,{ref_key:`primitiveElement`,ref:g,role:`group`,as:e.as,"as-child":e.asChild,"data-disabled":D(i)?``:void 0,"data-readonly":D(a)?``:void 0}),{default:O(()=>[j(e.$slots,`default`,{modelValue:D(h),textValue:se.value,readonly:D(a)}),D(y)&&e.name?(M(),P(D(qX),{key:0,type:`text`,value:D(h),name:e.name,disabled:D(i),readonly:D(a),required:e.required},null,8,[`value`,`name`,`disabled`,`readonly`,`required`])):R(`v-if`,!0)]),_:3},16,[`as`,`as-child`,`data-disabled`,`data-readonly`]))}}),y2=k({__name:`NumberFieldDecrement`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=g2(),r=B(()=>n.disabled?.value||n.readonly.value||t.disabled||n.isDecreaseDisabled.value),{primitiveElement:i,currentElement:a}=PY(),{isPressed:o,onTrigger:s}=f2({target:a,disabled:r});return s(()=>{n.handleDecrease()}),(e,n)=>(M(),P(D(NY),z(t,{ref_key:`primitiveElement`,ref:i,tabindex:`-1`,"aria-label":`Decrease`,type:e.as===`button`?`button`:void 0,style:{userSelect:D(o)?`none`:void 0},disabled:r.value?``:void 0,"data-disabled":r.value?``:void 0,"data-pressed":D(o)?`true`:void 0,onContextmenu:n[0]||=hl(()=>{},[`prevent`])}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`type`,`style`,`disabled`,`data-disabled`,`data-pressed`]))}}),b2=k({__name:`NumberFieldIncrement`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=g2(),r=B(()=>n.disabled?.value||n.readonly.value||t.disabled||n.isIncreaseDisabled.value),{primitiveElement:i,currentElement:a}=PY(),{isPressed:o,onTrigger:s}=f2({target:a,disabled:r});return s(()=>{n.handleIncrease()}),(e,n)=>(M(),P(D(NY),z(t,{ref_key:`primitiveElement`,ref:i,tabindex:`-1`,"aria-label":`Increase`,type:e.as===`button`?`button`:void 0,style:{userSelect:D(o)?`none`:void 0},disabled:r.value?``:void 0,"data-disabled":r.value?``:void 0,"data-pressed":D(o)?`true`:void 0,onContextmenu:n[0]||=hl(()=>{},[`prevent`])}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`type`,`style`,`disabled`,`data-disabled`,`data-pressed`]))}}),x2=k({__name:`NumberFieldInput`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},setup(e){let t=e,{primitiveElement:n,currentElement:r}=PY(),i=g2(),a=xY(),{isComposing:o,handleCompositionStart:s,handleCompositionEnd:c}=KJ();function l(e){if(!(o.value||e.isComposing))switch(e.key){case a.ARROW_UP:e.preventDefault(),i.handleIncrease();break;case a.ARROW_DOWN:e.preventDefault(),i.handleDecrease();break;case a.PAGE_UP:e.preventDefault(),i.handleIncrease(10);break;case a.PAGE_DOWN:e.preventDefault(),i.handleDecrease(10);break;case a.HOME:e.preventDefault(),i.handleMinMaxValue(`min`);break;case a.END:e.preventDefault(),i.handleMinMaxValue(`max`);break;case a.ENTER:i.applyInputValue(e.target?.value)}}function u(e){i.disableWheelChange.value||e.target===kJ()&&(Math.abs(e.deltaY)<=Math.abs(e.deltaX)||(e.preventDefault(),e.deltaY>0?i.invertWheelChange.value?i.handleDecrease():i.handleIncrease():e.deltaY<0&&(i.invertWheelChange.value?i.handleIncrease():i.handleDecrease())))}Fi(()=>{i.onInputElement(r.value)});let d=E(i.textValue.value);yr(()=>i.textValue.value,()=>{d.value=i.textValue.value},{immediate:!0,deep:!0});function f(){requestAnimationFrame(()=>{d.value=i.textValue.value})}return(e,r)=>(M(),P(D(NY),z(t,{id:D(i).id.value,ref_key:`primitiveElement`,ref:n,value:d.value,role:`spinbutton`,type:`text`,tabindex:`0`,inputmode:D(i).inputMode.value,disabled:D(i).disabled.value?``:void 0,"data-disabled":D(i).disabled.value?``:void 0,readonly:D(i).readonly.value?``:void 0,"data-readonly":D(i).readonly.value?``:void 0,autocomplete:`off`,autocorrect:`off`,spellcheck:`false`,"aria-roledescription":`Number field`,"aria-valuenow":D(i).modelValue.value,"aria-valuemin":D(i).min.value,"aria-valuemax":D(i).max.value,onKeydown:l,onWheel:u,onBeforeinput:r[0]||=e=>{if(e.isComposing)return;let t=e.target,n=t.value.slice(0,t.selectionStart??void 0)+(e.data??``)+t.value.slice(t.selectionEnd??void 0);D(i).validate(n)||e.preventDefault()},onInput:r[1]||=e=>{let t=e.target;d.value=t.value},onChange:f,onBlur:r[2]||=e=>D(i).applyInputValue(e.target?.value),onCompositionstart:D(s),onCompositionend:D(c)}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`id`,`value`,`inputmode`,`disabled`,`data-disabled`,`readonly`,`data-readonly`,`aria-valuenow`,`aria-valuemin`,`aria-valuemax`,`onCompositionstart`,`onCompositionend`]))}}),S2=k({__name:`PaginationEllipsis`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return $(),(e,n)=>(M(),P(D(NY),z(t,{"data-type":`ellipsis`}),{default:O(()=>[j(e.$slots,`default`,{},()=>[n[0]||=L(`…`)])]),_:3},16))}}),[C2,w2]=OJ(`PaginationRoot`),T2=k({__name:`PaginationRoot`,props:{page:{type:Number,required:!1},defaultPage:{type:Number,required:!1,default:1},itemsPerPage:{type:Number,required:!0},total:{type:Number,required:!1,default:0},siblingCount:{type:Number,required:!1,default:2},disabled:{type:Boolean,required:!1},showEdges:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`nav`}},emits:[`update:page`],setup(e,{emit:t}){let n=e,r=t,{siblingCount:i,disabled:a,showEdges:o}=yn(n);$();let s=KP(n,`page`,r,{defaultValue:n.defaultPage,passive:n.page===void 0}),c=B(()=>Math.max(1,Math.ceil(n.total/(n.itemsPerPage||1))));return w2({page:s,onPageChange(e){s.value=e},pageCount:c,siblingCount:i,disabled:a,showEdges:o}),(e,t)=>(M(),P(D(NY),{as:e.as,"as-child":e.asChild},{default:O(()=>[j(e.$slots,`default`,{page:D(s),pageCount:c.value})]),_:3},8,[`as`,`as-child`]))}}),E2=k({__name:`PaginationFirst`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=C2();$();let r=B(()=>n.page.value===1||n.disabled.value);return(e,i)=>(M(),P(D(NY),z(t,{"aria-label":`First Page`,type:e.as===`button`?`button`:void 0,disabled:r.value,onClick:i[0]||=e=>!r.value&&D(n).onPageChange(1)}),{default:O(()=>[j(e.$slots,`default`,{},()=>[i[1]||=L(`First page`)])]),_:3},16,[`type`,`disabled`]))}}),D2=k({__name:`PaginationLast`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=C2();$();let r=B(()=>n.page.value===n.pageCount.value||n.disabled.value);return(e,i)=>(M(),P(D(NY),z(t,{"aria-label":`Last Page`,type:e.as===`button`?`button`:void 0,disabled:r.value,onClick:i[0]||=e=>!r.value&&D(n).onPageChange(D(n).pageCount.value)}),{default:O(()=>[j(e.$slots,`default`,{},()=>[i[1]||=L(`Last page`)])]),_:3},16,[`type`,`disabled`]))}});function O2(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}function k2(e){return e.map(e=>typeof e==`number`?{type:`page`,value:e}:{type:`ellipsis`})}var A2=`ellipsis`;function j2(e,t,n,r){let i=t,a=Math.max(e-n,1),o=Math.min(e+n,i);if(r){let e=Math.min(2*n+5,t)-2,r=a>3&&Math.abs(i-e-1+1)>2&&Math.abs(a-1)>2,s=o<i-2&&Math.abs(i-e)>2&&Math.abs(i-o)>2;return!r&&s?[...O2(1,e),A2,i]:r&&!s?[1,A2,...O2(i-e+1,i)]:r&&s?[1,A2,...O2(a,o),A2,i]:O2(1,i)}{let r=n*2+1;return t<r?O2(1,i):e<=n+1?O2(1,r):t-e<=n?O2(t-r+1,i):O2(a,o)}}var M2=k({__name:`PaginationList`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;$();let n=C2(),r=B(()=>k2(j2(n.page.value,n.pageCount.value,n.siblingCount.value,n.showEdges.value)));return(e,n)=>(M(),P(D(NY),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`,{items:r.value})]),_:3},16))}}),N2=k({__name:`PaginationListItem`,props:{value:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;$();let n=C2(),r=B(()=>n.page.value===t.value),i=B(()=>n.disabled.value);return(e,a)=>(M(),P(D(NY),z(t,{"data-type":`page`,"aria-label":`Page ${e.value}`,"aria-current":r.value?`page`:void 0,"data-selected":r.value?`true`:void 0,disabled:i.value,type:e.as===`button`?`button`:void 0,onClick:a[0]||=t=>!i.value&&D(n).onPageChange(e.value)}),{default:O(()=>[j(e.$slots,`default`,{},()=>[L(T(e.value),1)])]),_:3},16,[`aria-label`,`aria-current`,`data-selected`,`disabled`,`type`]))}}),P2=k({__name:`PaginationNext`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;$();let n=C2(),r=B(()=>n.page.value===n.pageCount.value||n.disabled.value);return(e,i)=>(M(),P(D(NY),z(t,{"aria-label":`Next Page`,type:e.as===`button`?`button`:void 0,disabled:r.value,onClick:i[0]||=e=>!r.value&&D(n).onPageChange(D(n).page.value+1)}),{default:O(()=>[j(e.$slots,`default`,{},()=>[i[1]||=L(`Next page`)])]),_:3},16,[`type`,`disabled`]))}}),F2=k({__name:`PaginationPrev`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;$();let n=C2(),r=B(()=>n.page.value===1||n.disabled.value);return(e,i)=>(M(),P(D(NY),z(t,{"aria-label":`Previous Page`,type:e.as===`button`?`button`:void 0,disabled:r.value,onClick:i[0]||=e=>!r.value&&D(n).onPageChange(D(n).page.value-1)}),{default:O(()=>[j(e.$slots,`default`,{},()=>[i[1]||=L(`Prev page`)])]),_:3},16,[`type`,`disabled`]))}}),[I2,L2]=OJ(`PinInputRoot`),R2=k({inheritAttrs:!1,__name:`PinInputRoot`,props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},placeholder:{type:String,required:!1,default:``},mask:{type:Boolean,required:!1},otp:{type:Boolean,required:!1},type:{type:null,required:!1,default:`text`},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`complete`],setup(e,{emit:t}){let n=e,r=t,{mask:i,otp:a,placeholder:o,type:s,disabled:c,dir:l}=yn(n),{forwardRef:u}=$(),d=qJ(l),f=KP(n,`modelValue`,r,{defaultValue:n.defaultValue??[],passive:!0,deep:!0}),p=B(()=>Array.isArray(f.value)?[...f.value]:[]),m=E(new Set);function h(e){m.value.add(e)}let g=B(()=>n.type===`number`),_=B(()=>p.value.filter(e=>!!e||g.value&&e===0).length===m.value.size);return yr(f,()=>{_.value&&r(`complete`,f.value)},{deep:!0}),L2({modelValue:f,currentModelValue:p,mask:i,otp:a,placeholder:o,type:s,dir:d,disabled:c,isCompleted:_,inputElements:m,onInputElementChange:h,isNumericMode:g}),(e,t)=>(M(),P(D(NY),z(e.$attrs,{ref:D(u),dir:D(d),"data-complete":_.value?``:void 0,"data-disabled":D(c)?``:void 0}),{default:O(()=>[j(e.$slots,`default`,{modelValue:D(f)}),I(qX,{id:e.id,as:`input`,feature:`focusable`,tabindex:`-1`,value:p.value.join(``),name:e.name??``,disabled:D(c),required:e.required,onFocus:t[0]||=e=>Array.from(m.value)?.[0]?.focus()},null,8,[`id`,`value`,`name`,`disabled`,`required`])]),_:3},16,[`dir`,`data-complete`,`data-disabled`]))}}),z2=k({__name:`PinInputInput`,props:{index:{type:Number,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},setup(e){let t=e,n=I2(),r=B(()=>[...n.inputElements.value]),i=B(()=>n.currentModelValue.value[t.index]),a=B(()=>t.disabled||n.disabled.value),o=B(()=>n.otp.value),s=B(()=>n.mask.value),c=/^\d*$/,l=/\D/g,{primitiveElement:u,currentElement:d}=PY(),{isComposing:f,handleCompositionStart:p,handleCompositionEnd:m}=KJ(e=>{let i=e.target,a=e.data||i.value;if(n.isNumericMode.value){let e=a.replace(l,``);if(!e){i.value=``;return}if(e.length>1){ee(e);return}i.value=e,w(t.index,e);let n=r.value[t.index+1];n&&n.focus();return}if(a.length>1){ee(a);return}i.value=a,w(t.index,a);let o=r.value[t.index+1];o&&o.focus()});function h(e){if(f.value||e.isComposing)return;let i=e.target;if((e.data?.length??0)>1){ee(i.value);return}if(n.isNumericMode.value&&!c.test(i.value)){i.value=i.value.replace(l,``);return}i.value=e.data||i.value.slice(-1),w(t.index,i.value);let a=r.value[t.index+1];a&&a.focus()}function g(){Gn(()=>{let e=d.value;e&&(e.placeholder=!e.value&&e===kJ()?``:n.placeholder.value)})}function _(e){f.value||e.isComposing||FJ(e,kJ(),void 0,{itemsArray:r.value,focus:!0,loop:!1,arrowKeyOptions:`horizontal`,dir:n.dir.value})}function v(e){if(e.preventDefault(),e.target.value)w(t.index,``);else{let e=r.value[t.index-1];e&&(e.focus(),w(t.index-1,``))}}function y(e){e.key===`Delete`&&(e.preventDefault(),w(t.index,``))}function b(e){if(n.otp.value){let e=r.value.findIndex((e,t)=>n.currentModelValue.value[t]===``||n.currentModelValue.value[t]===void 0);if(e!==-1&&e<t.index){r.value[e].focus();return}}e.target.setSelectionRange(1,1),g()}function x(e){g()}function S(e){e.preventDefault();let t=e.clipboardData;if(!t)return;let r=t.getData(`text`);ee(n.isNumericMode.value?r.replace(l,``):r)}function ee(e){let i=[...n.currentModelValue.value],a=e.length>=r.value.length?0:t.index,o=Math.min(a+e.length,r.value.length);for(let t=a;t<o;t++){let o=r.value[t],s=e[t-a];if(n.isNumericMode.value){let e=Number.parseInt(s);if(Number.isNaN(e))continue;i[t]=e}else i[t]=s;o.focus()}n.modelValue.value=i,r.value[o]?.focus()}function C(e){let t=e.length-1;for(;t>=0&&e[t]===``;)e.pop(),t--;return e}function w(e,t){let r=[...n.currentModelValue.value];if(n.isNumericMode.value){let n=+t;t===``||isNaN(n)?delete r[e]:r[e]=n}else r[e]=t;n.modelValue.value=C(r)}return yr(i,g),Fi(()=>{n.onInputElementChange(d.value)}),zi(()=>{n.inputElements?.value.delete(d.value)}),(e,t)=>(M(),P(D(NY),{ref_key:`primitiveElement`,ref:u,autocapitalize:`none`,as:e.as,"as-child":e.asChild,autocomplete:o.value?`one-time-code`:`false`,type:s.value?`password`:`text`,inputmode:D(n).isNumericMode.value?`numeric`:`text`,pattern:D(n).isNumericMode.value?`[0-9]*`:void 0,placeholder:D(n).placeholder.value,value:i.value,disabled:a.value,"data-disabled":a.value?``:void 0,"data-complete":D(n).isCompleted.value?``:void 0,"aria-label":`pin input ${e.index+1} of ${r.value.length}`,onInput:t[0]||=e=>h(e),onKeydown:[_l(_,[`left`,`right`,`up`,`down`,`home`,`end`]),_l(v,[`backspace`]),_l(y,[`delete`])],onFocus:b,onBlur:x,onPaste:S,onCompositionstart:D(p),onCompositionend:D(m)},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`autocomplete`,`type`,`inputmode`,`pattern`,`placeholder`,`value`,`disabled`,`data-disabled`,`data-complete`,`aria-label`,`onCompositionstart`,`onCompositionend`]))}}),B2=`radio.select`;function V2(e,t,n){AJ(B2,n,{originalEvent:e,value:t})}var H2=k({inheritAttrs:!1,__name:`Radio`,props:{id:{type:String,required:!1},value:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},checked:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:checked`,`select`],setup(e,{emit:t}){let n=e,r=t,i=KP(n,`checked`,r,{passive:n.checked===void 0}),{value:a}=yn(n),{forwardRef:o,currentElement:s}=$(),c=QJ(s),l=tY(),u=B(()=>n.id&&s.value?document.querySelector(`[for="${n.id}"]`)?.innerText??n.value:void 0);function d(e){n.disabled||V2(e,n.value,e=>{r(`select`,e),!e?.defaultPrevented&&(i.value=!0,c.value&&e.stopPropagation())})}return(e,t)=>(M(),N(Ro,null,[I(D(NY),z({id:e.id,ref:D(o),role:`radio`,type:e.as===`button`?`button`:void 0,as:e.as,"aria-checked":D(i)??!1,"aria-label":u.value,"as-child":e.asChild,disabled:e.disabled?``:void 0,"data-state":D(i)?`checked`:`unchecked`,"data-disabled":e.disabled?``:void 0,value:D(a),required:e.required,name:e.name},{...D(l),...e.$attrs},{onClick:hl(d,[`stop`])}),{default:O(()=>[j(e.$slots,`default`,{checked:D(i)})]),_:3},16,[`id`,`type`,`as`,`aria-checked`,`aria-label`,`as-child`,`disabled`,`data-state`,`data-disabled`,`value`,`required`,`name`]),D(c)&&e.name?(M(),P(D(qX),z({key:0,type:`radio`,tabindex:`-1`,value:D(a),checked:!!D(i),name:e.name,disabled:e.disabled,required:e.required},D(l)),null,16,[`value`,`checked`,`name`,`disabled`,`required`])):R(`v-if`,!0)],64))}}),[U2,W2]=OJ(`RadioGroupRoot`),G2=k({__name:`RadioGroupRoot`,props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1,default:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=$(),o=KP(n,`modelValue`,r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),{disabled:s,loop:c,orientation:l,name:u,required:d,dir:f}=yn(n),p=qJ(f),m=QJ(a);return W2({modelValue:o,changeModelValue:e=>{o.value=e},disabled:s,loop:c,orientation:l,name:u?.value,required:d}),(e,t)=>(M(),P(D(E$),{"as-child":``,orientation:D(l),dir:D(p),loop:D(c)},{default:O(()=>[I(D(NY),{ref:D(i),role:`radiogroup`,"data-disabled":D(s)?``:void 0,"as-child":e.asChild,as:e.as,"aria-orientation":D(l),"aria-required":D(d),dir:D(p)},{default:O(()=>[j(e.$slots,`default`,{modelValue:D(o)}),D(m)&&D(u)?(M(),P(D(qX),{key:0,required:D(d),disabled:D(s),value:D(o),name:D(u)},null,8,[`required`,`disabled`,`value`,`name`])):R(`v-if`,!0)]),_:3},8,[`data-disabled`,`as-child`,`as`,`aria-orientation`,`aria-required`,`dir`])]),_:3},8,[`orientation`,`dir`,`loop`]))}}),[K2,q2]=OJ(`RadioGroupItem`),J2=k({inheritAttrs:!1,__name:`RadioGroupItem`,props:{id:{type:String,required:!1},value:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=$(),o=U2(),s=B(()=>o.disabled.value||n.disabled),c=B(()=>o.required.value||n.required),l=B(()=>wJ(o.modelValue?.value,n.value));q2({disabled:s,checked:l});let u=E(!1),d=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`];uP(`keydown`,e=>{d.includes(e.key)&&(u.value=!0)}),uP(`keyup`,()=>{u.value=!1});function f(){setTimeout(()=>{u.value&&a.value?.click()},0)}let p=tY();return(e,t)=>(M(),P(D(D$),{checked:l.value,disabled:s.value,"as-child":``,focusable:!s.value,active:l.value},{default:O(()=>[I(H2,z({...D(p),...e.$attrs,...n},{ref:D(i),checked:l.value,required:c.value,disabled:s.value,"onUpdate:checked":t[0]||=t=>D(o).changeModelValue(e.value),onSelect:t[1]||=e=>r(`select`,e),onKeydown:t[2]||=_l(hl(()=>{},[`prevent`]),[`enter`]),onFocus:f}),{default:O(()=>[j(e.$slots,`default`,{checked:l.value,required:c.value,disabled:s.value})]),_:3},16,[`checked`,`required`,`disabled`])]),_:3},8,[`checked`,`disabled`,`focusable`,`active`]))}}),Y2=k({__name:`RadioGroupIndicator`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let{forwardRef:t}=$(),n=K2();return(e,r)=>(M(),P(D(AY),{present:e.forceMount||D(n).checked.value},{default:O(()=>[I(D(NY),z({ref:D(t),"data-state":D(n).checked.value?`checked`:`unchecked`,"data-disabled":D(n).disabled.value?``:void 0,"as-child":e.asChild,as:e.as},e.$attrs),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`data-state`,`data-disabled`,`as-child`,`as`])]),_:3},8,[`present`]))}}),X2=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Z2=[` `,`Enter`];function Q2(e,t,n){return e===void 0?!1:Array.isArray(e)?e.some(e=>$2(e,t,n)):$2(e,t,n)}function $2(e,t,n){return e===void 0||t===void 0?!1:typeof e==`string`?e===t:typeof n==`function`?n(e,t):typeof n==`string`?e?.[n]===t?.[n]:wJ(e,t)}function e4(e){return e==null||e===``||Array.isArray(e)&&e.length===0}var t4=[`value`],[n4,r4]=OJ(`SelectRoot`),i4=k({inheritAttrs:!1,__name:`SelectRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},nullableValue:{type:String,required:!1,default:``},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`update:open`],setup(e,{emit:t}){let n=e,r=t,{required:i,disabled:a,multiple:o,dir:s}=yn(n),c=KP(n,`modelValue`,r,{defaultValue:n.defaultValue??(o.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),l=KP(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),u=E(),d=E(),f=E({x:0,y:0}),p=B(()=>o.value&&Array.isArray(c.value)?c.value?.length===0:jJ(c.value));WX({isProvider:!0});let m=qJ(s),h=QJ(u),g=E(new Set),_=B(()=>Array.from(g.value).map(e=>e.value).join(`;`));function v(e){if(o.value){let t=Array.isArray(c.value)?[...c.value]:[],r=t.findIndex(t=>$2(t,e,n.by));r===-1?t.push(e):t.splice(r,1),c.value=[...t]}else c.value=e}function y(e){return Array.from(g.value).find(t=>Q2(e,t.value,n.by))}return r4({triggerElement:u,onTriggerChange:e=>{u.value=e},valueElement:d,onValueElementChange:e=>{d.value=e},contentId:``,modelValue:c,onValueChange:v,by:n.by,open:l,multiple:o,required:i,onOpenChange:e=>{l.value=e},dir:m,triggerPointerDownPosRef:f,disabled:a,isEmptyModelValue:p,optionsSet:g,onOptionAdd:e=>{let t=y(e.value);t&&g.value.delete(t),g.value.add(e)},onOptionRemove:e=>{let t=y(e.value);t&&g.value.delete(t)}}),(e,t)=>(M(),P(D(rZ),null,{default:O(()=>[j(e.$slots,`default`,{modelValue:D(c),open:D(l)}),D(h)&&e.name?(M(),P(a4,{key:_.value,"aria-hidden":`true`,tabindex:`-1`,multiple:D(o),required:D(i),name:e.name,autocomplete:e.autocomplete,disabled:D(a),value:D(c)},{default:O(()=>[D(jJ)(D(c))?(M(),N(`option`,{key:0,value:e.nullableValue},null,8,t4)):R(`v-if`,!0),(M(!0),N(Ro,null,Zi(Array.from(g.value),e=>(M(),N(`option`,z({key:e.value??``},{ref_for:!0},e),null,16))),128))]),_:1},8,[`multiple`,`required`,`name`,`autocomplete`,`disabled`,`value`])):R(`v-if`,!0)]),_:3}))}}),a4=k({__name:`BubbleSelect`,props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){let t=e,n=E(),r=n4();yr(()=>t.value,(e,t)=>{let r=window.HTMLSelectElement.prototype,i=Object.getOwnPropertyDescriptor(r,`value`).set;if(e!==t&&i&&n.value){let t=new Event(`change`,{bubbles:!0});i.call(n.value,e),n.value.dispatchEvent(t)}});function i(e){r.onValueChange(e.target.value)}return(e,r)=>(M(),P(D(GX),{"as-child":``},{default:O(()=>[F(`select`,z({ref_key:`selectElement`,ref:n},t,{onInput:i}),[j(e.$slots,`default`)],16)]),_:3}))}}),o4=k({__name:`SelectPopperPosition`,props:{memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:`start`},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:10},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=$J(e);return(e,n)=>(M(),P(D(b$),z(D(t),{style:{boxSizing:`border-box`,"--reka-select-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-select-content-available-width":`var(--reka-popper-available-width)`,"--reka-select-content-available-height":`var(--reka-popper-available-height)`,"--reka-select-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-select-trigger-height":`var(--reka-popper-anchor-height)`}}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),s4={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[c4,l4]=OJ(`SelectContent`),u4=k({__name:`SelectContentImpl`,props:{position:{type:String,required:!1,default:`item-aligned`},bodyLock:{type:Boolean,required:!1,default:!0},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:`start`},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:[`closeAutoFocus`,`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=t,i=n4();XJ(),UJ(n.bodyLock);let{CollectionSlot:a,getItems:o}=WX(),s=E();vY(s);let{search:c,handleTypeaheadSearch:l}=TY(),u=E(),d=E(),f=E(),p=E(!1),m=E(!1),h=E(!1);function g(){d.value&&s.value&&_X([d.value,s.value])}yr(p,()=>{g()});let{onOpenChange:_,triggerPointerDownPosRef:v}=i;gr(e=>{if(!s.value)return;let t={x:0,y:0},n=e=>{t={x:Math.abs(Math.round(e.pageX)-(v.value?.x??0)),y:Math.abs(Math.round(e.pageY)-(v.value?.y??0))}},r=e=>{e.pointerType!==`touch`&&(t.x<=10&&t.y<=10?e.preventDefault():s.value?.contains(e.target)||_(!1),document.removeEventListener(`pointermove`,n),v.value=null)};v.value!==null&&(document.addEventListener(`pointermove`,n),document.addEventListener(`pointerup`,r,{capture:!0,once:!0})),e(()=>{document.removeEventListener(`pointermove`,n),document.removeEventListener(`pointerup`,r,{capture:!0})})});function y(e){let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&l(e.key,o()),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=[...o().map(e=>e.ref)];if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>_X(t)),e.preventDefault()}}let b=$J(B(()=>n.position===`popper`?n:{}).value);return l4({content:s,viewport:u,onViewportChange:e=>{u.value=e},itemRefCallback:(e,t,n)=>{let r=!m.value&&!n,a=Q2(i.modelValue.value,t,i.by);if(i.multiple.value){if(h.value)return;(a||r)&&(d.value=e,a&&(h.value=!0))}else(a||r)&&(d.value=e);r&&(m.value=!0)},selectedItem:d,selectedItemText:f,onItemLeave:()=>{s.value?.focus()},itemTextRefCallback:(e,t,n)=>{let r=!m.value&&!n;(Q2(i.modelValue.value,t,i.by)||r)&&(f.value=e)},focusSelectedItem:g,position:n.position,isPositioned:p,searchRef:c}),(e,t)=>(M(),P(D(a),null,{default:O(()=>[I(D(oX),{"as-child":``,onMountAutoFocus:t[6]||=hl(()=>{},[`prevent`]),onUnmountAutoFocus:t[7]||=e=>{r(`closeAutoFocus`,e),!e.defaultPrevented&&(D(i).triggerElement.value?.focus({preventScroll:!0}),e.preventDefault())}},{default:O(()=>[I(D(GY),{"as-child":``,"disable-outside-pointer-events":e.disableOutsidePointerEvents,onFocusOutside:t[2]||=hl(()=>{},[`prevent`]),onDismiss:t[3]||=e=>D(i).onOpenChange(!1),onEscapeKeyDown:t[4]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[5]||=e=>r(`pointerDownOutside`,e)},{default:O(()=>[(M(),P(qi(e.position===`popper`?o4:p4),z({...e.$attrs,...D(b)},{id:D(i).contentId,ref:e=>{if(!e)return;let t=D(lP)(e);t?.hasAttribute(`data-reka-popper-content-wrapper`)?s.value=t.firstElementChild:s.value=t},role:`listbox`,"data-state":D(i).open.value?`open`:`closed`,dir:D(i).dir.value,style:{display:`flex`,flexDirection:`column`,outline:`none`},onContextmenu:t[0]||=hl(()=>{},[`prevent`]),onPlaced:t[1]||=e=>p.value=!0,onKeydown:y}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`id`,`data-state`,`dir`,`onKeydown`]))]),_:3},8,[`disable-outside-pointer-events`])]),_:3})]),_:3}))}}),[d4,f4]=OJ(`SelectItemAlignedPosition`),p4=k({inheritAttrs:!1,__name:`SelectItemAlignedPosition`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`placed`],setup(e,{emit:t}){let n=e,r=t,{getItems:i}=WX(),a=n4(),o=c4(),s=E(!1),c=E(!0),l=E(),{forwardRef:u,currentElement:d}=$(),{viewport:f,selectedItem:p,selectedItemText:m,focusSelectedItem:h}=o;function g(){if(a.triggerElement.value&&a.valueElement.value&&l.value&&d.value&&f?.value&&p?.value&&m?.value){let e=a.triggerElement.value.getBoundingClientRect(),t=d.value.getBoundingClientRect(),n=a.valueElement.value.getBoundingClientRect(),o=m.value.getBoundingClientRect();if(a.dir.value!==`rtl`){let r=o.left-t.left,i=n.left-r,a=e.left-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-10,d=TJ(i,10,Math.max(10,u-c));l.value.style.minWidth=`${s}px`,l.value.style.left=`${d}px`}else{let r=t.right-o.right,i=window.innerWidth-n.right-r,a=window.innerWidth-e.right-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-10,d=TJ(i,10,Math.max(10,u-c));l.value.style.minWidth=`${s}px`,l.value.style.right=`${d}px`}let c=i().map(e=>e.ref),u=window.innerHeight-20,h=f.value.scrollHeight,g=window.getComputedStyle(d.value),_=Number.parseInt(g.borderTopWidth,10),v=Number.parseInt(g.paddingTop,10),y=Number.parseInt(g.borderBottomWidth,10),b=Number.parseInt(g.paddingBottom,10),x=_+v+h+b+y,S=Math.min(p.value.offsetHeight*5,x),ee=window.getComputedStyle(f.value),C=Number.parseInt(ee.paddingTop,10),w=Number.parseInt(ee.paddingBottom,10),te=e.top+e.height/2-10,ne=u-te,re=p.value.offsetHeight/2,ie=p.value.offsetTop+re,ae=_+v+ie,oe=x-ae;if(ae<=te){let e=p.value===c.at(-1);l.value.style.bottom=`0px`;let t=d.value.clientHeight-f.value.offsetTop-f.value.offsetHeight,n=ae+Math.max(ne,re+(e?w:0)+t+y);l.value.style.height=`${n}px`}else{let e=p.value===c[0];l.value.style.top=`0px`;let t=Math.max(te,_+f.value.offsetTop+(e?C:0)+re)+oe;l.value.style.height=`${t}px`,f.value.scrollTop=ae-te+f.value.offsetTop}l.value.style.margin=`10px 0`,l.value.style.minHeight=`${S}px`,l.value.style.maxHeight=`${u}px`,r(`placed`),requestAnimationFrame(()=>s.value=!0)}}let _=E(``);Fi(async()=>{await Gn(),g(),d.value&&(_.value=window.getComputedStyle(d.value).zIndex)});function v(e){e&&c.value===!0&&(g(),h?.(),c.value=!1)}return Fte(a.triggerElement,()=>{g()}),f4({contentWrapper:l,shouldExpandOnScrollRef:s,onScrollButtonChange:v}),(e,t)=>(M(),N(`div`,{ref_key:`contentWrapperElement`,ref:l,style:be({display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:_.value})},[I(D(NY),z({ref:D(u),style:{boxSizing:`border-box`,maxHeight:`100%`}},{...e.$attrs,...n}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16)],4))}}),m4=k({inheritAttrs:!1,__name:`SelectProvider`,props:{context:{type:Object,required:!0}},setup(e){return r4(e.context),l4(s4),(e,t)=>j(e.$slots,`default`)}}),h4={key:1},g4=k({inheritAttrs:!1,__name:`SelectContent`,props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`closeAutoFocus`,`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=eY(n,t),i=n4(),a=E();Fi(()=>{a.value=new DocumentFragment});let o=E(),s=B(()=>n.forceMount||i.open.value),c=E(s.value),l;function u(){l&&=(clearTimeout(l),void 0)}return yr(s,(e,t,n)=>{u(),l=setTimeout(()=>{c.value=s.value,l=void 0}),n(u)}),zi(u),(e,t)=>s.value||c.value||o.value?.present?(M(),P(D(AY),{key:0,ref_key:`presenceRef`,ref:o,present:s.value},{default:O(()=>[I(u4,Ee($o({...D(r),...e.$attrs})),{default:O(()=>[j(e.$slots,`default`)]),_:3},16)]),_:3},8,[`present`])):a.value?(M(),N(`div`,h4,[(M(),P(Pr,{to:a.value},[I(m4,{context:D(i)},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`context`])],8,[`to`]))])):R(`v-if`,!0)}}),[_4,v4]=OJ(`SelectGroup`),y4=k({__name:`SelectGroup`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=bY(void 0,`reka-select-group`);return v4({id:n}),(e,r)=>(M(),P(D(NY),z({role:`group`},t,{"aria-labelledby":D(n)}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`aria-labelledby`]))}}),b4=k({__name:`SelectIcon`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){return(e,t)=>(M(),P(D(NY),{"aria-hidden":`true`,as:e.as,"as-child":e.asChild},{default:O(()=>[j(e.$slots,`default`,{},()=>[t[0]||=L(`▼`)])]),_:3},8,[`as`,`as-child`]))}}),[x4,S4]=OJ(`SelectItem`),C4=k({__name:`SelectItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,{disabled:i}=yn(n),a=n4(),o=c4(),{forwardRef:s,currentElement:c}=$(),{CollectionItem:l}=WX(),u=B(()=>Q2(a.modelValue?.value,n.value,a.by)),d=E(!1),f=E(n.textValue??``),p=bY(void 0,`reka-select-item-text`);async function m(e){e.defaultPrevented||AJ(`select.select`,h,{originalEvent:e,value:n.value})}async function h(e){await Gn(),r(`select`,e),!e.defaultPrevented&&(i.value||(a.onValueChange(n.value),a.multiple.value||a.onOpenChange(!1)))}async function g(e){await Gn(),!e.defaultPrevented&&(i.value?o.onItemLeave?.():e.currentTarget?.focus({preventScroll:!0}))}async function _(e){await Gn(),!e.defaultPrevented&&e.currentTarget===kJ()&&o.onItemLeave?.()}async function v(e){await Gn(),!e.defaultPrevented&&(o.searchRef?.value===``||e.key!==` `)&&(Z2.includes(e.key)&&m(e),e.key===` `&&e.preventDefault())}if(n.value===``)throw Error(`A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return Fi(()=>{c.value&&o.itemRefCallback(c.value,n.value,n.disabled)}),S4({value:n.value,disabled:i,textId:p,isSelected:u,onItemTextChange:e=>{f.value=((f.value||e?.textContent)??``).trim()}}),(e,t)=>(M(),P(D(l),{value:{textValue:f.value}},{default:O(()=>[I(D(NY),{ref:D(s),role:`option`,"aria-labelledby":D(p),"data-highlighted":d.value?``:void 0,"aria-selected":u.value,"data-state":u.value?`checked`:`unchecked`,"aria-disabled":D(i)||void 0,"data-disabled":D(i)?``:void 0,tabindex:D(i)?void 0:-1,as:e.as,"as-child":e.asChild,onFocus:t[0]||=e=>d.value=!0,onBlur:t[1]||=e=>d.value=!1,onPointerup:m,onPointerdown:t[2]||=e=>{e.currentTarget.focus({preventScroll:!0})},onTouchend:t[3]||=hl(()=>{},[`prevent`,`stop`]),onPointermove:g,onPointerleave:_,onKeydown:v},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`aria-labelledby`,`data-highlighted`,`aria-selected`,`data-state`,`aria-disabled`,`data-disabled`,`tabindex`,`as`,`as-child`])]),_:3},8,[`value`]))}}),w4=k({__name:`SelectItemIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,n=x4();return(e,r)=>D(n).isSelected.value?(M(),P(D(NY),z({key:0,"aria-hidden":`true`},t),{default:O(()=>[j(e.$slots,`default`)]),_:3},16)):R(`v-if`,!0)}}),T4=k({inheritAttrs:!1,__name:`SelectItemText`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,n=n4(),r=c4(),i=x4(),{forwardRef:a,currentElement:o}=$(),s=B(()=>({value:i.value,disabled:i.disabled.value,textContent:o.value?.textContent??i.value?.toString()??``}));return Fi(()=>{o.value&&(i.onItemTextChange(o.value),r.itemTextRefCallback(o.value,i.value,i.disabled.value),n.onOptionAdd(s.value))}),zi(()=>{n.onOptionRemove(s.value)}),(e,n)=>(M(),P(D(NY),z({id:D(i).textId,ref:D(a)},{...t,...e.$attrs}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`id`]))}}),E4=k({__name:`SelectLabel`,props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(e){let t=e,n=_4({id:``});return(e,r)=>(M(),P(D(NY),z(t,{id:D(n).id}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`id`]))}}),D4=k({__name:`SelectPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(M(),P(D(OX),Ee($o(t)),{default:O(()=>[j(e.$slots,`default`)]),_:3},16))}}),O4=k({__name:`SelectTrigger`,props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=n4(),{forwardRef:r,currentElement:i}=$(),a=B(()=>n.disabled?.value||t.disabled);n.contentId||=bY(void 0,`reka-select-content`),Fi(()=>{n.onTriggerChange(i.value)});let{getItems:o}=WX(),{search:s,handleTypeaheadSearch:c,resetTypeahead:l}=TY();function u(){a.value||(n.onOpenChange(!0),l())}function d(e){u(),n.triggerPointerDownPosRef.value={x:Math.round(e.pageX),y:Math.round(e.pageY)}}function f(e){return e.button===0&&e.ctrlKey===!1}let p=!1;function m(e){if(e.pointerType===`touch`)return e.preventDefault();let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),f(e)&&(d(e),p=!0)}function h(e){f(e)&&e.preventDefault()}function g(e){p||e.currentTarget?.focus(),p=!1}return(e,t)=>(M(),P(D(iZ),{"as-child":``,reference:e.reference},{default:O(()=>[I(D(NY),{ref:D(r),role:`combobox`,type:e.as===`button`?`button`:void 0,"aria-controls":D(n).contentId,"aria-expanded":D(n).open.value||!1,"aria-required":D(n).required?.value,"aria-autocomplete":`none`,disabled:a.value,dir:D(n)?.dir.value,"data-state":D(n)?.open.value?`open`:`closed`,"data-disabled":a.value?``:void 0,"data-placeholder":D(e4)(D(n).modelValue?.value)?``:void 0,"as-child":e.asChild,as:e.as,onClick:g,onPointerdown:m,onMousedown:h,onPointerup:t[0]||=hl(e=>{e.pointerType===`touch`&&d(e)},[`prevent`]),onKeydown:t[1]||=e=>{let t=D(s)!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&t&&e.key===` `||(D(c)(e.key,D(o)()),D(X2).includes(e.key)&&(u(),e.preventDefault()))}},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`type`,`aria-controls`,`aria-expanded`,`aria-required`,`disabled`,`dir`,`data-state`,`data-disabled`,`data-placeholder`,`as-child`,`as`])]),_:3},8,[`reference`]))}}),k4=k({__name:`SelectValue`,props:{placeholder:{type:String,required:!1,default:``},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,{forwardRef:n,currentElement:r}=$(),i=n4();Fi(()=>{i.valueElement=r});let a=B(()=>{let e=[],t=Array.from(i.optionsSet.value),n=e=>t.find(t=>Q2(e,t.value,i.by));return e=Array.isArray(i.modelValue.value)?i.modelValue.value.map(e=>n(e)?.textContent??``):[n(i.modelValue.value)?.textContent??``],e.filter(Boolean)}),o=B(()=>a.value.length?a.value.join(`, `):t.placeholder);return(e,r)=>(M(),P(D(NY),{ref:D(n),as:e.as,"as-child":e.asChild,style:{pointerEvents:`none`},"data-placeholder":a.value.length?void 0:t.placeholder},{default:O(()=>[j(e.$slots,`default`,{selectedLabel:a.value,modelValue:D(i).modelValue.value},()=>[L(T(o.value),1)])]),_:3},8,[`as`,`as-child`,`data-placeholder`]))}}),A4=k({__name:`SelectViewport`,props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{nonce:n}=yn(t),r=C$(n),i=c4(),a=i.position===`item-aligned`?d4():void 0,{forwardRef:o,currentElement:s}=$();Fi(()=>{i?.onViewportChange(s.value)});let c=E(0);function l(e){let t=e.currentTarget,{shouldExpandOnScrollRef:n,contentWrapper:r}=a??{};if(n?.value&&r?.value){let e=Math.abs(c.value-t.scrollTop);if(e>0){let n=window.innerHeight-20,i=Number.parseFloat(r.value.style.minHeight),a=Number.parseFloat(r.value.style.height),o=Math.max(i,a);if(o<n){let i=o+e,a=Math.min(n,i),s=i-a;r.value.style.height=`${a}px`,r.value.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,r.value.style.justifyContent=`flex-end`)}}}c.value=t.scrollTop}return(e,n)=>(M(),N(Ro,null,[I(D(NY),z({ref:D(o),"data-reka-select-viewport":``,role:`presentation`},{...e.$attrs,...t},{style:{position:`relative`,flex:1,overflow:`hidden auto`},onScroll:l}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16),I(D(NY),{as:`style`,nonce:D(r)},{default:O(()=>n[0]||=[L(` /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } `)]),_:1,__:[0]},8,[`nonce`])],64))}}),[j4,M4]=OJ(`SwitchRoot`),N4=k({inheritAttrs:!1,__name:`SwitchRoot`,props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:`on`},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{disabled:i}=yn(n),a=KP(n,`modelValue`,r,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),o=B(()=>a.value===n.trueValue);function s(){i.value||(a.value=o.value?n.falseValue:n.trueValue)}let{forwardRef:c,currentElement:l}=$(),u=QJ(l),d=tY(),f=B(()=>n.id&&l.value?document.querySelector(`[for="${n.id}"]`)?.innerText:void 0);return M4({checked:o,toggleCheck:s,disabled:i}),(e,t)=>(M(),N(Ro,null,[I(D(NY),z({id:e.id,ref:D(c),role:`switch`,type:e.as===`button`?`button`:void 0,value:e.value,"aria-label":e.$attrs[`aria-label`]||f.value,"aria-checked":o.value,"aria-required":e.required,"data-state":o.value?`checked`:`unchecked`,"data-disabled":D(i)?``:void 0,"as-child":e.asChild,as:e.as,disabled:D(i)},{...D(d),...e.$attrs},{onClick:s,onKeydown:_l(hl(s,[`prevent`]),[`enter`])}),{default:O(()=>[j(e.$slots,`default`,{modelValue:D(a),checked:o.value})]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]),D(u)&&e.name?(M(),P(D(qX),z({key:0,type:`checkbox`,name:e.name,disabled:D(i),required:e.required,value:e.value,checked:o.value},D(d)),null,16,[`name`,`disabled`,`required`,`value`,`checked`])):R(`v-if`,!0)],64))}}),P4=k({__name:`SwitchThumb`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=j4();return $(),(e,n)=>(M(),P(D(NY),{"data-state":D(t).checked.value?`checked`:`unchecked`,"data-disabled":D(t).disabled.value?``:void 0,"as-child":e.asChild,as:e.as},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`]))}}),[F4,I4]=OJ(`TagsInputRoot`),L4=k({__name:`TagsInputRoot`,props:{modelValue:{type:[Array,null],required:!1},defaultValue:{type:Array,required:!1,default:()=>[]},addOnPaste:{type:Boolean,required:!1},addOnTab:{type:Boolean,required:!1},addOnBlur:{type:Boolean,required:!1},duplicate:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},delimiter:{type:null,required:!1,default:`,`},dir:{type:String,required:!1},max:{type:Number,required:!1,default:0},id:{type:String,required:!1},convertValue:{type:Function,required:!1},displayValue:{type:Function,required:!1,default:e=>e.toString()},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`invalid`,`addTag`,`removeTag`],setup(e,{emit:t}){let n=e,r=t,{addOnPaste:i,disabled:a,delimiter:o,max:s,id:c,dir:l,addOnBlur:u,addOnTab:d}=yn(n),f=qJ(l),p=KP(n,`modelValue`,r,{defaultValue:n.defaultValue,passive:!0,deep:!0}),{forwardRef:m,currentElement:h}=$(),{focused:g}=BP(h),_=QJ(h),{getItems:v,CollectionSlot:y}=WX({isProvider:!0}),b=E(),x=E(!1),S=B(()=>Array.isArray(p.value)?[...p.value]:[]);function ee(e){if(e!==-1){let t=v().filter(e=>e.ref.dataset.disabled!==``);p.value=p.value.filter((t,n)=>n!==e),r(`removeTag`,t[e].value)}}return I4({modelValue:p,onAddValue:e=>{let t=[...S.value],i=t.length>0&&typeof t[0]==`object`,a=t.length>0&&typeof n.defaultValue[0]==`object`;if((i||a)&&typeof n.convertValue!=`function`)throw Error("You must provide a `convertValue` function when using objects as values.");let o=n.convertValue?n.convertValue(e):e;if(t.length>=s.value&&s.value)return r(`invalid`,o),!1;if(n.duplicate)return p.value=[...t,o],r(`addTag`,o),!0;if(t.includes(o))x.value=!0;else return p.value=[...t,o],r(`addTag`,o),!0;return r(`invalid`,o),!1},onRemoveValue:ee,onInputKeydown:e=>{if(e.isComposing)return;let t=e.target,n=v().map(e=>e.ref).filter(e=>e.dataset.disabled!==``);if(!n.length)return;let r=n.at(-1);switch(e.key){case`Delete`:case`Backspace`:if(t.selectionStart!==0||t.selectionEnd!==0)break;if(b.value){let t=n.findIndex(e=>e===b.value);ee(t),b.value=b.value===r?n.at(t-1):n.at(t+1),e.preventDefault()}else e.key===`Backspace`&&(b.value=r,e.preventDefault());break;case`Home`:case`End`:case`ArrowRight`:case`ArrowLeft`:{let i=e.key===`ArrowRight`&&f.value===`ltr`||e.key===`ArrowLeft`&&f.value===`rtl`,a=!i;if(t.selectionStart!==0||t.selectionEnd!==0)break;if(a&&!b.value)b.value=r,e.preventDefault();else if(i&&r&&b.value===r)b.value=void 0,e.preventDefault();else if(b.value){let t=FJ(e,b.value,void 0,{itemsArray:n,loop:!1,dir:f.value});t&&(b.value=t),e.preventDefault()}break}case`ArrowUp`:case`ArrowDown`:b.value&&e.preventDefault();break;default:b.value=void 0}},selectedElement:b,isInvalidInput:x,addOnPaste:i,addOnBlur:u,addOnTab:d,dir:f,disabled:a,delimiter:o,max:s,id:c,displayValue:n.displayValue}),(e,t)=>(M(),P(D(y),null,{default:O(()=>[I(D(NY),{ref:D(m),dir:D(f),as:e.as,"as-child":e.asChild,"data-invalid":x.value?``:void 0,"data-disabled":D(a)?``:void 0,"data-focused":D(g)?``:void 0},{default:O(()=>[j(e.$slots,`default`,{modelValue:D(p)}),D(_)&&e.name?(M(),P(D(qX),{key:0,name:e.name,value:D(p),required:e.required,disabled:D(a)},null,8,[`name`,`value`,`required`,`disabled`])):R(`v-if`,!0)]),_:3},8,[`dir`,`as`,`as-child`,`data-invalid`,`data-disabled`,`data-focused`])]),_:3}))}}),R4=k({__name:`TagsInputInput`,props:{placeholder:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},maxLength:{type:Number,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},setup(e){let t=e,n=F4(),{forwardRef:r,currentElement:i}=$();function a(e){if(n.selectedElement.value=void 0,!n.addOnBlur.value)return;let t=e.target,r=e.relatedTarget,i=t.getAttribute(`aria-controls`);i&&r?.closest(`#${CSS.escape(i)}`)||t.value&&n.onAddValue(t.value)&&(t.value=``)}function o(e){n.addOnTab.value&&u(e)}let{isComposing:s,handleCompositionStart:c,handleCompositionEnd:l}=KJ();async function u(e){if(s.value||(await Gn(),e.defaultPrevented))return;let t=e.target;t.value&&(n.onAddValue(t.value)&&(t.value=``),e.preventDefault())}function d(e){if(s.value||(n.isInvalidInput.value=!1,e.data===null))return;let t=n.delimiter.value;if(t===e.data||t instanceof RegExp&&t.test(e.data)){let r=e.target;if(r.value=r.value.replace(t,``),r.value.trim()===``){r.value=``;return}n.onAddValue(r.value)&&(r.value=``)}}function f(e){s.value||n.onInputKeydown(e)}function p(e){if(n.addOnPaste.value){e.preventDefault();let t=e.clipboardData;if(!t)return;let r=t.getData(`text`);n.delimiter.value?r.split(n.delimiter.value).forEach(e=>{n.onAddValue(e)}):n.onAddValue(r)}}return Fi(()=>{let e=i.value.nodeName===`INPUT`?i.value:i.value.querySelector(`input`);e&&setTimeout(()=>{t.autoFocus&&e?.focus()},1)}),(e,t)=>(M(),P(D(NY),{id:D(n).id?.value,ref:D(r),type:`text`,autocomplete:`off`,autocorrect:`off`,autocapitalize:`off`,as:e.as,"as-child":e.asChild,maxlength:e.maxLength,placeholder:e.placeholder,disabled:D(n).disabled.value,"data-invalid":D(n).isInvalidInput.value?``:void 0,onInput:d,onKeydown:[_l(u,[`enter`]),_l(o,[`tab`]),f],onBlur:a,onCompositionstart:D(c),onCompositionend:D(l),onPaste:p},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`id`,`as`,`as-child`,`maxlength`,`placeholder`,`disabled`,`data-invalid`,`onCompositionstart`,`onCompositionend`]))}}),[z4,B4]=OJ(`TagsInputItem`),V4=k({__name:`TagsInputItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{value:n}=yn(t),r=F4(),{forwardRef:i,currentElement:a}=$(),{CollectionItem:o}=WX(),s=B(()=>r.selectedElement.value===a.value),c=B(()=>t.disabled||r.disabled.value),l=B4({value:n,isSelected:s,disabled:c,textId:``,displayValue:B(()=>r.displayValue(n.value))});return(e,t)=>(M(),P(D(o),{value:D(n)},{default:O(()=>[I(D(NY),{ref:D(i),as:e.as,"as-child":e.asChild,"aria-labelledby":D(l).textId,"aria-current":s.value,"data-disabled":c.value?``:void 0,"data-state":s.value?`active`:`inactive`},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-labelledby`,`aria-current`,`data-disabled`,`data-state`])]),_:3},8,[`value`]))}}),H4=k({__name:`TagsInputItemDelete`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;$();let n=F4(),r=z4(),i=B(()=>r.disabled?.value||n.disabled.value);function a(){if(i.value)return;let e=n.modelValue.value.findIndex(e=>wJ(e,r.value.value));n.onRemoveValue(e)}return(e,n)=>(M(),P(D(NY),z({tabindex:`-1`},t,{"aria-labelledby":D(r).textId,"aria-current":D(r).isSelected.value,"data-state":D(r).isSelected.value?`active`:`inactive`,"data-disabled":i.value?``:void 0,type:e.as===`button`?`button`:void 0,onClick:a}),{default:O(()=>[j(e.$slots,`default`)]),_:3},16,[`aria-labelledby`,`aria-current`,`data-state`,`data-disabled`,`type`]))}}),U4=k({__name:`TagsInputItemText`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,n=z4();return $(),n.textId||=bY(void 0,`reka-tags-input-item-text`),(e,r)=>(M(),P(D(NY),z(t,{id:D(n).textId}),{default:O(()=>[j(e.$slots,`default`,{},()=>[L(T(D(n).displayValue.value),1)])]),_:3},16,[`id`]))}}),W4=k({__name:`ToastAnnounceExclude`,props:{altText:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){return(e,t)=>(M(),P(D(NY),{as:e.as,"as-child":e.asChild,"data-reka-toast-announce-exclude":``,"data-reka-toast-announce-alt":e.altText||void 0},{default:O(()=>[j(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-reka-toast-announce-alt`]))}}),[G4,K4]=OJ(`ToastProvider`),q4=k({inheritAttrs:!1,__name:`ToastProvider`,props:{label:{type:String,required:!1,default:`Notification`},duration:{type:Number,required:!1,default:5e3},disableSwipe:{type:Boolean,required:!1},swipeDirection:{type:String,required:!1,default:`right`},swipeThreshold:{type:Number,required:!1,default:50}},setup(e){let t=e,{label:n,duration:r,disableSwipe:i,swipeDirection:a,swipeThreshold:o}=yn(t);WX({isProvider:!0});let s=E(),c=E(0),l=E(!1),u=E(!1);if(t.label&&typeof t.label==`string`&&!t.label.trim())throw Error("Invalid prop `label` supplied to `ToastProvider`. Expected non-empty `string`.");return K4({label:n,duration:r,disableSwipe:i,swipeDirection:a,swipeThreshold:o,toastCount:c,viewport:s,onViewportChange(e){s.value=e},onToastAdd(){c.value++},onToastRemove(){c.value--},isFocusedToastEscapeKeyDownRef:l,isClosePausedRef:u}),(e,t)=>j(e.$slots,`default`)}}),J4=k({__name:`ToastAnnounce`,setup(e){let t=G4(),n=iP(1e3),r=E(!1),i=0,a=0;return DN&&(i=requestAnimationFrame(()=>{a=requestAnimationFrame(()=>{r.value=!0})}),Ve(()=>{cancelAnimationFrame(i),cancelAnimationFrame(a)})),(e,i)=>D(n)||r.value?(M(),P(D(GX),{key:0,feature:`fully-hidden`},{default:O(()=>[L(T(D(t).label.value)+` `,1),j(e.$slots,`default`)]),_:3})):R(`v-if`,!0)}}),Y4=`toast.viewportPause`,X4=`toast.viewportResume`;function Z4(e,t,n){let r=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function Q4(e,t,n=0){let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n}function $4(e){return e.nodeType===e.ELEMENT_NODE}function e3(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),$4(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.rekaToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.rekaToastAnnounceAlt;n&&t.push(n)}else t.push(...e3(e))}}),t}var[t3,n3]=OJ(`ToastRoot`),r3=k({inheritAttrs:!1,__name:`ToastRootImpl`,props:{type:{type:String,required:!1},open:{type:Boolean,required:!1,default:!1},duration:{type:Number,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`li`}},emits:[`close`,`escapeKeyDown`,`pause`,`resume`,`swipeStart`,`swipeMove`,`swipeCancel`,`swipeEnd`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=$(),{CollectionItem:o}=WX(),s=G4(),c=E(null),l=E(null),u=B(()=>typeof n.duration==`number`?n.duration:s.duration.value),d=E(0),f=E(u.value),p=E(0),m=E(u.value),h=bP(()=>{let e=Date.now()-d.value;m.value=Math.max(f.value-e,0)},{fpsLimit:60});function g(e){e<=0||e===1/0||DN&&(window.clearTimeout(p.value),d.value=Date.now(),p.value=window.setTimeout(_,e))}function _(e){let t=e?.pointerType===``;a.value?.contains(kJ())&&t&&s.viewport.value?.focus(),t&&(s.isClosePausedRef.value=!1),r(`close`)}let v=B(()=>a.value?e3(a.value):null);if(n.type&&![`foreground`,`background`].includes(n.type))throw Error("Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.");return gr(e=>{let t=s.viewport.value;if(t){let e=()=>{g(f.value),h.resume(),r(`resume`)},n=()=>{let e=Date.now()-d.value;f.value-=e,window.clearTimeout(p.value),h.pause(),r(`pause`)};return t.addEventListener(Y4,n),t.addEventListener(X4,e),()=>{t.removeEventListener(Y4,n),t.removeEventListener(X4,e)}}}),yr(()=>[n.open,u.value],()=>{f.value=u.value,n.open&&!s.isClosePausedRef.value&&g(u.value)},{immediate:!0}),vP(`Escape`,e=>{r(`escapeKeyDown`,e),e.defaultPrevented||(s.isFocusedToastEscapeKeyDownRef.value=!0,_())}),Fi(()=>{s.onToastAdd()}),zi(()=>{s.onToastRemove()}),n3({onClose:_}),(e,t)=>(M(),N(Ro,null,[v.value?(M(),P(J4,{key:0,role:`alert`,"aria-live":e.type===`foreground`?`assertive`:`polite`},{default:O(()=>[R(`
73
73
  Render each chunk as its own text node so screen readers get the