@hollware/admin 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/admin/assets/Alert-CMaqdPPm.js +1 -0
- package/dist/client/admin/assets/Callback-CTeaCQ1c.js +1 -0
- package/dist/client/admin/assets/Checkbox-CX1Z7ANx.js +1 -0
- package/dist/client/admin/assets/Collection-CipG9Wh2.js +1 -0
- package/dist/client/admin/assets/Collections-utASuXRR.js +1 -0
- package/dist/client/admin/assets/DashboardSidebarToggle-DiLFyMk8.js +1 -0
- package/dist/client/admin/assets/Entries-Dkqm8ivX.js +1 -0
- package/dist/client/admin/assets/Entry-ByVv3iGP.js +112 -0
- package/dist/client/admin/assets/FormField-BW-1Q8yL.js +1 -0
- package/dist/client/admin/assets/Home-DgLZiqMI.js +1 -0
- package/dist/client/admin/assets/InputNumber-BDjnMfc0.js +1 -0
- package/dist/client/admin/assets/InputTags-CXM25qrT.js +1 -0
- package/dist/client/admin/assets/NewEntry-B3jhZJwX.js +2 -0
- package/dist/client/admin/assets/Page-DiAoPkZK.js +1 -0
- package/dist/client/admin/assets/People-ChnT7l2-.js +1 -0
- package/dist/client/admin/assets/PopperArrow-BS1pa-ZI.js +1 -0
- package/dist/client/admin/assets/Reviews-GXuRFTtw.js +1 -0
- package/dist/client/admin/assets/RovingFocusItem-BXnbqPHm.js +1 -0
- package/dist/client/admin/assets/Select-C3_gJLfL.js +1 -0
- package/dist/client/admin/assets/Site-CPJ13O0q.js +1 -0
- package/dist/client/admin/assets/Textarea-B6SaL6Nm.js +1 -0
- package/dist/client/admin/assets/Tokens-Du08JWB5.js +1 -0
- package/dist/client/admin/assets/VerdictList-iJ1FBr2W.js +1 -0
- package/dist/client/admin/assets/bulk-report-BT91Ho7U.js +1 -0
- package/dist/client/admin/assets/columns-DwvnEvu1.js +4 -0
- package/dist/client/admin/assets/index-BFUeS7ic.js +28 -0
- package/dist/client/admin/assets/index-CsZc4d_V.css +2 -0
- package/dist/client/admin/assets/session-CzMvpLSp.js +3 -0
- package/dist/client/admin/assets/src-Cvyt4NDD.js +55 -0
- package/dist/client/admin/assets/useComposing-ELkCVDQg.js +1 -0
- package/dist/client/admin/assets/useFilter-CbKhrFc4.js +1 -0
- package/dist/client/admin/assets/useForwardScopeId-C4BUSLTt.js +1 -0
- package/dist/client/admin/assets/useKbd-CEpT28wF.js +1 -0
- package/dist/client/admin/assets/usePortal-C0d2q6c8.js +4 -0
- package/dist/client/admin/assets/utils-C5Ac3kcY.js +1 -0
- package/dist/client/admin/index.html +10 -5
- package/package.json +3 -2
- package/dist/client/admin/assets/Alert-BNqegYGY.js +0 -1
- package/dist/client/admin/assets/Badge-CUm0y7_3.js +0 -1
- package/dist/client/admin/assets/Button-gYrKAAPg.js +0 -1
- package/dist/client/admin/assets/Callback-CYEOMe-_.js +0 -1
- package/dist/client/admin/assets/Collection-BqZqvxD4.js +0 -1
- package/dist/client/admin/assets/Collections-h5teP9gk.js +0 -1
- package/dist/client/admin/assets/Entries-CCDREf-Z.js +0 -1
- package/dist/client/admin/assets/Entry-ToOSZZed.js +0 -112
- package/dist/client/admin/assets/FormField-A-XleJwz.js +0 -1
- package/dist/client/admin/assets/Home-BuQe24Wv.js +0 -1
- package/dist/client/admin/assets/Input-CJ_nv5ol.js +0 -1
- package/dist/client/admin/assets/InputNumber-BRcx3Ozf.js +0 -1
- package/dist/client/admin/assets/InputTags-BVQtV47x.js +0 -1
- package/dist/client/admin/assets/Modal-FM_ms2EK.js +0 -1
- package/dist/client/admin/assets/NewEntry-Cdo-HtVN.js +0 -2
- package/dist/client/admin/assets/People-C4WXD3c3.js +0 -1
- package/dist/client/admin/assets/Reviews-CvdX3MbK.js +0 -1
- package/dist/client/admin/assets/RovingFocusItem-B_oW7xIc.js +0 -1
- package/dist/client/admin/assets/Site-DIJ-5llg.js +0 -1
- package/dist/client/admin/assets/Textarea-DHB-lEZj.js +0 -1
- package/dist/client/admin/assets/Tokens-Cwe2MNqp.js +0 -1
- package/dist/client/admin/assets/VerdictList-Da-qipcx.js +0 -1
- package/dist/client/admin/assets/VisuallyHidden-CUiOLRpP.js +0 -4
- package/dist/client/admin/assets/VisuallyHiddenInput-9CeUtDLZ.js +0 -1
- package/dist/client/admin/assets/entries-CswbEbYi.js +0 -1
- package/dist/client/admin/assets/index-Bw9PriKb.js +0 -28
- package/dist/client/admin/assets/index-DLRJbMgK.css +0 -2
- package/dist/client/admin/assets/session-D_7iusJi.js +0 -3
- package/dist/client/admin/assets/src-CgvxW5Vk.js +0 -55
- package/dist/client/admin/assets/utils-gliHxok-.js +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import{$t as e,Bt as t,Dr as n,Fi as r,Jn as i,Qr as a,Qt as o,Xt as s,Zt as c,ci as l,d as u,en as d,er as f,f as p,ln as m,on as ee,r as te,sn as ne}from"./session-CzMvpLSp.js";import{o as re}from"./index-BFUeS7ic.js";import{t as ie}from"./Alert-CMaqdPPm.js";function ae(e){let t=a(!1),n=a(null),r=a([]),i=a(!1),o=a(null),s=null;async function c(a,c=!1){t.value=!0,r.value=[],o.value=null;try{let t=await a(c);switch(t.outcome){case`needs_confirmation`:s=a,n.value=t.impact??null;break;case`invalid`:r.value=t.problems??[];break;case`conflict`:i.value=!0;break;case`updated`:case`unchanged`:n.value=null,await e(t)}}catch(e){o.value=e instanceof te?`${e.message} ${e.fix}`:String(e)}finally{t.value=!1}}async function l(){let e=s;n.value=null,s=null,e!==null&&await c(e,!0)}function u(){n.value=null,s=null}return{busy:t,impact:n,problems:r,conflict:i,failure:o,run:c,confirmPending:l,cancel:u}}function oe(e,t){return[...e.removedCollections.map(e=>t.removedCollection(e.name,e.entries)),...e.removedLocales.map(e=>t.removedLocale(e.locale,e.entries)),...e.refused.map(e=>t.refused(e.collection,e.entries,e.examples.join(`, `)))]}var se={class:`mt-1 space-y-1`},ce={class:`font-mono text-xs`},le={class:`list-disc space-y-2 pl-5 text-sm`},ue={class:`mt-3 text-sm text-muted`},h=m({__name:`StructureDialogs`,props:{impact:{},problems:{},conflict:{type:Boolean},failure:{}},emits:[`confirm`,`cancel`,`reload`],setup(a,{emit:m}){let te=a,ae=m,h=u(),de=s(()=>te.impact===null?[]:oe(te.impact,h.value.structure)),fe=s({get:()=>te.impact!==null,set:e=>{e||ae(`cancel`)}});return(s,u)=>{let m=ie,te=p,oe=re;return i(),d(t,null,[a.failure===null?e(``,!0):(i(),o(m,{key:0,color:`error`,title:l(h).structure.notSaved,description:a.failure},null,8,[`title`,`description`])),a.problems.length>0?(i(),o(m,{key:1,color:`error`,title:l(h).structure.fixFirst},{description:n(()=>[c(`ul`,se,[(i(!0),d(t,null,f(a.problems,(e,t)=>(i(),d(`li`,{key:t},[c(`span`,ce,r(e.path),1),ee(` — `+r(e.message)+`. `+r(e.fix),1)]))),128))])]),_:1},8,[`title`])):e(``,!0),a.conflict?(i(),o(m,{key:2,color:`warning`,title:l(h).structure.conflictTitle,description:l(h).structure.conflictBody,actions:[{label:l(h).structure.loadAgain,onClick:()=>ae(`reload`)}]},null,8,[`title`,`description`,`actions`])):e(``,!0),ne(oe,{open:fe.value,"onUpdate:open":u[2]||=e=>fe.value=e,title:l(h).structure.impactTitle},{body:n(()=>[c(`ul`,le,[(i(!0),d(t,null,f(de.value,e=>(i(),d(`li`,{key:e},r(e),1))),128))]),c(`p`,ue,r(l(h).structure.noDelete),1)]),footer:n(()=>[ne(te,{label:l(h).common.cancel,variant:`ghost`,onClick:u[0]||=e=>ae(`cancel`)},null,8,[`label`]),ne(te,{label:l(h).structure.applyAnyway,color:`warning`,onClick:u[1]||=e=>ae(`confirm`)},null,8,[`label`])]),_:1},8,[`open`,`title`])],64)}}}),de=new WeakMap;function fe(e,t){return de.set(e,t),e}var pe=new WeakMap;function me(e,t){let n=pe.get(t);if(n===void 0)throw Error(`The built-in contract ${e} runs only through runContracts.`);return n}var he=80;function g(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ge(e,t=he){if(e.length<=t)return e;let n=e.slice(0,t),r=n.charCodeAt(t-1);return`${r>=55296&&r<=56319?n.slice(0,-1):n}…`}function _(e){return JSON.stringify(ge(e))}function _e(e,t){return`${e} ${t}${e===1?``:`s`}`}var ve=20;function ye(e){return(e.path??[]).map(e=>String(typeof e==`object`?e.key:e))}function be(e){return e.reduce((e,t)=>/^\d+$/.test(t)?`${e}[${t}]`:e===``?t:`${e}.${t}`,``)}function xe(e,t){let n=e;for(let e of t){let t=n.properties;if(g(t)&&Object.hasOwn(t,e)){let r=t[e];if(!g(r))return;n=r}else if(/^\d+$/.test(e)&&g(n.items))n=n.items;else return}return n}function Se(e,t){let n=e;for(let e of t)if(Array.isArray(n)&&/^\d+$/.test(e))n=n[Number(e)];else if(g(n)&&Object.hasOwn(n,e))n=n[e];else return;return n}function Ce(e){let t=e.slice(0,ve).map(e=>JSON.stringify(e)).join(`, `),n=e.length-ve;return n>0?`${t} and ${n} more`:t}function we(e,t,n){let r=typeof e==`number`?e:void 0,i=typeof t==`number`?t:void 0;if(r!==void 0&&i!==void 0)return r===i?`exactly ${_e(r,n)}`:`${r} to ${_e(i,n)}`;if(r!==void 0)return`at least ${_e(r,n)}`;if(i!==void 0)return`at most ${_e(i,n)}`}function Te(e){let t=we(e.minLength,e.maxLength,`character`),n=``;return typeof e.format==`string`?n=` in the format ${JSON.stringify(e.format)}`:typeof e.pattern==`string`&&(n=` matching the pattern ${e.pattern}`),`a string${t===void 0?``:` of ${t}`}${n}`}function Ee(e,t){let n=[typeof t.minimum==`number`?`at least ${t.minimum}`:void 0,typeof t.exclusiveMinimum==`number`?`greater than ${t.exclusiveMinimum}`:void 0,typeof t.maximum==`number`?`at most ${t.maximum}`:void 0,typeof t.exclusiveMaximum==`number`?`less than ${t.exclusiveMaximum}`:void 0].filter(e=>e!==void 0),r=e===`integer`?`an integer`:`a number`;return n.length===0?r:`${r} that is ${n.join(` and `)}`}function De(e){let t=we(e.minItems,e.maxItems,`item`),n=g(e.items)?Ae(e.items):void 0;return`an array${t===void 0?``:` of ${t}`}${n===void 0?``:`, each ${n}`}`}function Oe(e){let t=g(e.properties)?Object.keys(e.properties):[];return t.length===0?`an object`:`an object with the keys ${t.join(`, `)}`}function ke(e,t){switch(e){case`string`:return Te(t);case`integer`:case`number`:return Ee(e,t);case`boolean`:return`true or false`;case`null`:return`null`;case`array`:return De(t);case`object`:return Oe(t);default:return}}function Ae(e){if(`const`in e)return`exactly ${JSON.stringify(e.const)}`;if(Array.isArray(e.enum))return`one of ${Ce(e.enum)}`;let t=e.anyOf??e.oneOf,n=Array.isArray(t)?t.map(e=>g(e)?Ae(e):void 0):(Array.isArray(e.type)?e.type:[e.type]).map(t=>ke(t,e));return n.every(e=>e!==void 0)?n.join(` or `):void 0}function je(e,t){let{additionalProperties:n,properties:r}=e;return n!==!1||!g(r)||!g(t)?[]:Object.keys(t).filter(e=>!Object.hasOwn(r,e))}function Me({subject:e,schema:t,input:n,segments:r,message:i}){let a=r.length===0?e.container:`the ${e.noun} ${_(be(r))}`,o=t===null?void 0:xe(t,r);if(o!==void 0){let t=je(o,Se(n,r));if(t.length>0){let n=g(o.properties)?Object.keys(o.properties):[],r=t.length===1?e.noun:`${e.noun}s`,i=n.length===0?`no ${e.noun}s are allowed there`:`the ${e.noun}s allowed there are: ${n.join(`, `)}`;return`Remove the ${r} ${t.map(e=>_(e)).join(`, `)} from ${a}; ${i}.`}}let s=o===void 0?void 0:Ae(o);return s===void 0?`Change ${a} to a value that the schema of ${e.container} accepts: ${i}`:`Set ${a} to ${s}.`}var Ne=new WeakMap;function Pe(e){try{return e[`~standard`].jsonSchema.input({target:`draft-2020-12`})}catch{return null}}function Fe(e){let t=Ne.get(e);return t===void 0&&(t={frontmatter:Pe(e.schema),components:new Map([...e.components].map(([e,t])=>[e,Pe(t.props)]))},Ne.set(e,t)),t}fe({id:`components`,severity:`error`,description:`The props of every component in the body match the schema of that component.`,async check(e){let{collection:t}=me(`components`,e),n=Fe(t).components,r=[];for(let i of e.markdown.extracted.components){let e=t.components.get(i.name);if(e===void 0)continue;let a=await e.props[`~standard`].validate(i.props);if(!a.issues)continue;let o={container:`the component ${_(i.name)}`,noun:`prop`};for(let e of a.issues){let t=ye(e),a=t.length===0?`The props`:`The prop ${_(be(t))}`;r.push({path:`/body`,message:`${a} of the component ${_(i.name)} ${t.length===0?`are`:`is`} invalid: ${e.message}`,fix:Me({subject:o,schema:n.get(i.name)??null,input:i.props,segments:t,message:e.message}),line:i.line})}}return r}},{readsFrontmatter:!1});function Ie(e){return[...e.components.keys()].toSorted()}function Le(e,t,n){return fe({id:e,severity:`error`,description:t,check(t){let{collection:r}=me(e,t);return t.markdown.extracted.disallowed.filter(t=>t.kind===e).map(e=>({path:`/body`,...n(e,r),line:e.line}))}},{readsFrontmatter:!1})}Le(`raw-html`,`The body holds Markdown and the components of the collection, never raw HTML.`,(e,t)=>{let n=Ie(t);return{message:`Raw HTML is not allowed: the body has a <${ge(e.name)}> tag.`,fix:`Remove the HTML and use Markdown${n.length===0?``:` or one of the allowed components: ${n.join(`, `)}`}.`}}),Le(`unknown-component`,`The body uses only the components that the collection declares.`,(e,t)=>{let n=Ie(t);return{message:`The component ${_(e.name)} does not exist in this collection.`,fix:n.length===0?`This collection allows no components: remove it and use Markdown.`:`Use one of the allowed components: ${n.join(`, `)}.`}}),Le(`disallowed-attribute`,`Links, images and code carry only the attributes Markdown produces, and a component only the props its schema declares.`,e=>({message:`The attribute ${_(e.name)} is not allowed.`,fix:`Remove the attribute ${_(e.name)}. Links keep href and title, images keep src, alt, title, width and height, and a component takes only the props its schema declares.`})),Le(`unsafe-url`,`Links and images use an https:, http: or mailto: URL, a path of the site or an anchor.`,e=>({message:`The URL ${_(e.name)} is not allowed.`,fix:`Use an https: or http: URL, a mailto: address, a path of this site that starts with /, or an anchor that starts with #.`}));var Re=[`schema`,`components`,`raw-html`,`unknown-component`,`disallowed-attribute`,`unsafe-url`,`translation-pair`,`internal-links-resolve`,`images-have-alt`,`size-limit`,`frontmatter-syntax`,`comark-parse`,`unique-slug`,`unique-translation`];function ze(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Be(e,t=`|`){return e.map(e=>ot(e)).join(t)}function Ve(e,t){return typeof t==`bigint`?t.toString():t}var He=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Ue(e){return new He(e)}function We(e){return e==null}function Ge(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ke(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function v(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function qe(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function y(e){return qe(e._zod.def)??e._zod.def.shape}function Je(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return v(this,t,e),e},enumerable:!0,configurable:!0})}function Ye(e,t,n){t in e?v(e,t,n):e[t]=n}function b(e,t,n,r){let i=y(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Je(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Ye(e,a,r?r(n.value,a):n.value))}}function Xe(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Je(e,n,()=>t[n]):Ye(e,n,r.value))}}function x(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Ze(e){return JSON.stringify(e)}function Qe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var $e=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function et(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var tt=Ue(()=>{if(j.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function nt(e){if(et(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return et(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function rt(e){return nt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var it=new Set([`string`,`number`,`symbol`]);function at(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function S(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function C(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ot(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function st(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var ct={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},lt={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function ut(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return b(i,e,dt(e,t)),S(e,x(n,{shape:i,checks:[]}))}function dt(e,t){let n=y(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function ft(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(dt(e,t)),a={};return b(a,e,Reflect.ownKeys(y(e)).filter(e=>!i.has(e))),S(e,x(n,{shape:a,checks:[]}))}function pt(e,t){if(!nt(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=y(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return S(e,x(e._zod.def,{shape:mt(e,t)}))}function mt(e,t){let n={};return b(n,e,Reflect.ownKeys(y(e))),Xe(n,t),n}function ht(e,t){if(!nt(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return S(e,x(e._zod.def,{shape:mt(e,t)}))}function gt(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return b(n,e,Reflect.ownKeys(y(e))),b(n,t,Reflect.ownKeys(y(t))),S(e,x(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function _t(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(dt(t,n)):void 0,o={};return b(o,t,Reflect.ownKeys(y(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),S(t,x(t._zod.def,{shape:o,checks:[]}))}function vt(e,t,n){let r=n?new Set(dt(t,n)):void 0,i={};return b(i,t,Reflect.ownKeys(y(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),S(t,x(t._zod.def,{shape:i}))}function w(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function yt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function bt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function xt(e){return typeof e==`string`?e:e?.message}function St(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function T(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:xt(e.inst?._zod.def?.error?.(e))??xt(a?.(e))??xt(t?.error?.(e))??xt(n.customError?.(e))??xt(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Ct=/[\uD800-\uDBFF]/;function wt(e){let t=e.length;if(!Ct.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Tt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Et(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Dt(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ot(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):jt(e,n,r.value)}}function E(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function kt(e,t,n){return E(e,t,n,!1)}function At(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return E(this,n,r(this))},set(e){E(this,n,e)}})}return t}function jt(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:E(this,t,n.bind(this))},set(e){E(this,t,e)}})}function Mt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Nt,D=!1,Pt={configurable:!0,get(){D=!0}};function O(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Nt!==e._zod){Nt=void 0;return}Nt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Pt);let e=D;D=!1;try{let r=n(this);return D?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),D||=e,r}catch(n){throw delete this[t],D||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Ft(e,t,n,r){let i=Mt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var It=`~constantCatch`;function Lt(e){let t=()=>e;return t[It]=!0,t}var Rt,zt={value:void 0,enumerable:!1},Bt=`captureStackTrace`in Error?Error:null;function Vt(e){let t=Bt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Bt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function k(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){zt.value=new a(r);try{Object.defineProperty(n,"_zod",zt)}finally{zt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Ot(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Vt(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var A=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ht=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Rt=globalThis).__zod_globalConfig??(Rt.__zod_globalConfig={});var j=globalThis.__zod_globalConfig;function M(e){return e&&Object.assign(j,e),j}function Ut(){let e=this._zod;return e.message??=JSON.stringify(e.def,Ve,2),e.message}function Wt(e){this._zod.message=e}var Gt={get:Ut,set:Wt,enumerable:!0,configurable:!0},Kt={value:void 0,enumerable:!1},qt=new WeakSet([Object.prototype,Error.prototype]),Jt=(e,t)=>{e.name=`$ZodError`,Kt.value=t,Object.defineProperty(e,"issues",Kt),Kt.value=void 0,Object.defineProperty(e,"message",Gt);let n=Object.getPrototypeOf(e);qt.has(n)||(qt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Yt=k(`$ZodError`,Jt);k(`$ZodError`,Jt,void 0,{Parent:Error});function Xt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Zt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Xt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Qt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function $t(e,t){return{callee:t?.callee??e,Err:t?.Err}}var en=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new A;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>T(e,o,M())));throw $e(n,a?.callee??t),n}return s.value};return t},tn=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>T(e,o,M())));throw $e(n,a?.callee??t),n}return s.value};return t},nn=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new A;return a.issues.length?rn(e,a.issues,i):{success:!0,data:a.value}};function rn(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>T(e,n,M()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var an=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?rn(e,a.issues,i):{success:!0,data:a.value}},on=Symbol.for(`zod.compile.invalid`),sn=Symbol.for(`zod.compile.fallback`),cn=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==on)return!0;if(r.definite===!0&&n===void 0)return!1}return ln(e,t,n)});function ln(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[sn]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new A;return a.issues.length===0}var un=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},dn=e=>{let t=en(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,$t(n,a))};return n},fn=e=>{let t=en(e),n=(e,r,i,a)=>t(e,r,i,$t(n,a));return n},pn=e=>{let t=tn(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,$t(n,a))};return n},mn=e=>{let t=tn(e),n=async(e,r,i,a)=>await t(e,r,i,$t(n,a));return n},hn=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return nn(e)(t,n,i)},gn=e=>(t,n,r)=>nn(e)(t,n,r),_n=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return an(e)(t,n,i)},vn=e=>async(t,n,r)=>an(e)(t,n,r),yn=/^[cC][0-9a-z]{6,}$/,bn=/^[0-9a-z]+$/,xn=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Sn=/^[0-9a-vA-V]{20}$/,Cn=/^[A-Za-z0-9]{27}$/,wn=/^[a-zA-Z0-9_-]{21}$/;function Tn(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var En=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Dn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,On=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,kn=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,An=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function jn(){return new RegExp(An,`u`)}var Mn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Nn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Pn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Fn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,In=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ln=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Rn=/^https?$/,zn=/^\+[1-9]\d{6,14}$/,Bn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Vn(e){return RegExp(`^${e}$`)}var Hn=Vn(Bn);function Un(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Wn(e){return RegExp(`^${Un(e)}$`)}function Gn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Un({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Un({precision:e.precision})}`:n;return RegExp(`^${Bn}T(?:${r})$`)}var Kn=/^[\s\S]{0,}$/,qn=/^-?\d+$/,Jn=/^-?\d+(?:\.\d+)?$/,Yn=/^(?:true|false)$/i,Xn=/^[^A-Z]*$/,Zn=/^[^a-z]*$/,N=k(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Qn=e=>{let t=e.value;return!We(t)&&t.length!==void 0},$n={number:`number`,bigint:`bigint`,object:`date`},er=k(`$ZodCheckLessThan`,(e,t)=>{N.init(e,t);let n=$n[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:$n[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tr=k(`$ZodCheckGreaterThan`,(e,t)=>{N.init(e,t);let n=$n[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:$n[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nr=k(`$ZodCheckMultipleOf`,(e,t)=>{N.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Ke(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),rr=k(`$ZodCheckNumberFormat`,(e,t)=>{N.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ct[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ir=k(`$ZodCheckMaxLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Qn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?wt(r):i)<=t.maximum)return;let a=Tt(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ar=k(`$ZodCheckMinLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Qn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?wt(r):i)>=t.minimum)return;let a=Tt(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),or=k(`$ZodCheckLengthEquals`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Qn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?wt(r):i;if(a===t.length)return;let o=Tt(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),sr=k(`$ZodCheckStringFormat`,(e,t)=>{var n,r;N.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),cr=k(`$ZodCheckRegex`,(e,t)=>{sr.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),lr=k(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Xn,sr.init(e,t)}),ur=k(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Zn,sr.init(e,t)}),dr=k(`$ZodCheckIncludes`,(e,t)=>{N.init(e,t);let n=at(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),fr=k(`$ZodCheckStartsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`^${at(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),pr=k(`$ZodCheckEndsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`.*${at(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),mr=k(`$ZodCheckOverwrite`,(e,t)=>{N.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),hr=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
3
|
+
`)}\n};`)(...Object.values(this.closed))}},gr={major:4,minor:6,patch:5},P=k(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=gr;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=w(t),a;for(let o of n){if(o._zod.def.when){if(yt(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new A;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(St(t.issues,n,e),i||=w(t,n))});else{if(t.issues.length===n)continue;St(t.issues,n,e),i||=w(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(w(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new A;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new A;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return kt(this,`~standard`,yr(this))},set"~standard"(e){E(this,`~standard`,e)}}),_r=(e,t)=>e.issues.length?{issues:e.issues.map(e=>T(e,t,M()))}:{value:e.value};async function vr(e,t){let n={async:!0};return _r(await e._zod.run({value:t,issues:[]},n),n)}function yr(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return _r(r,n)}catch{}return vr(e,t)},vendor:`zod`,version:1}}var br=k(`$ZodString`,(e,t)=>{P.init(e,t),e._zod.pattern=t.pattern??Kn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),F=k(`$ZodStringFormat`,(e,t)=>{sr.init(e,t),br.init(e,t)}),xr=k(`$ZodGUID`,(e,t)=>{t.pattern??=Dn,F.init(e,t)}),Sr=k(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=On(e)}else t.pattern??=On();F.init(e,t)}),Cr=k(`$ZodEmail`,(e,t)=>{t.pattern??=kn,F.init(e,t)});function wr(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Tr(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?wr(e)||2:Er(e,t)}function Er(e,t){if(!t.normalize&&t.protocol?.source===Rn.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Dr=/[\t\n\r]/g;function Or(e){return e.replace(Dr,``)}function kr(e,t){return t.lastIndex=0,t.test(e.hostname)}function Ar(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var jr=k(`$ZodURL`,(e,t)=>{F.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Tr(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Or(r);return}t.hostname&&!kr(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Ar(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Or(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Mr=k(`$ZodEmoji`,(e,t)=>{t.pattern??=jn(),F.init(e,t)}),Nr=k(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?wn:Tn(t.length),F.init(e,t)}),Pr=k(`$ZodCUID`,(e,t)=>{t.pattern??=yn,F.init(e,t)}),Fr=k(`$ZodCUID2`,(e,t)=>{t.pattern??=bn,F.init(e,t)}),Ir=k(`$ZodULID`,(e,t)=>{t.pattern??=xn,F.init(e,t)}),Lr=k(`$ZodXID`,(e,t)=>{t.pattern??=Sn,F.init(e,t)}),Rr=k(`$ZodKSUID`,(e,t)=>{t.pattern??=Cn,F.init(e,t)}),zr=k(`$ZodISODateTime`,(e,t)=>{t.pattern??=Gn(t),F.init(e,t)}),Br=k(`$ZodISODate`,(e,t)=>{t.pattern??=Hn,F.init(e,t)}),Vr=k(`$ZodISOTime`,(e,t)=>{t.pattern??=Wn(t),F.init(e,t)}),Hr=k(`$ZodISODuration`,(e,t)=>{t.pattern??=En,F.init(e,t)}),Ur=k(`$ZodIPv4`,(e,t)=>{t.pattern??=Mn,F.init(e,t)}),Wr=/^[0-9a-fA-F:.]+$/;function Gr(e){return Wr.test(e)?wr(`http://[${e}]`):!1}var Kr=k(`$ZodIPv6`,(e,t)=>{t.pattern??=Nn,F.init(e,t),e._zod.check=n=>{Gr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),qr=k(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Pn,F.init(e,t)});function Jr(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Gr(n)}var Yr=k(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Fn,F.init(e,t),e._zod.check=n=>{Jr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Xr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Zr=/^[0-9a-zA-Z+/]*={0,2}$/,Qr=k(`$ZodBase64`,(e,t)=>{t.pattern??=Zr,F.init(e,t),e._zod.check=n=>{Xr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),$r=/^[A-Za-z0-9_-]*$/;function ei(e){if(!$r.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Xr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var ti=k(`$ZodBase64URL`,(e,t)=>{t.pattern??=$r,F.init(e,t),e._zod.check=n=>{ei(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),ni=k(`$ZodE164`,(e,t)=>{t.pattern??=zn,F.init(e,t)});function ri(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ii=k(`$ZodJWT`,(e,t)=>{F.init(e,t),e._zod.check=n=>{ri(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ai=k(`$ZodNumber`,(e,t)=>{P.init(e,t),e._zod.pattern=Jn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),oi=k(`$ZodNumberFormat`,(e,t)=>{rr.init(e,t),ai.init(e,t)}),si=k(`$ZodBoolean`,(e,t)=>{P.init(e,t),e._zod.pattern=Yn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),ci=k(`$ZodUnknown`,(e,t)=>{P.init(e,t),e._zod.parse=e=>e}),li=k(`$ZodNever`,(e,t)=>{P.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function ui(e,t,n){e.issues.length&&t.issues.push(...bt(n,e.issues)),t.value[n]=e.value}var di=k(`$ZodArray`,(e,t)=>{P.init(e,t);let n=j.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>ui(t,r,e)));else if(ui(c,r,e),s&&c.issues.length!==0&&w(c))break}return o.length?Promise.all(o).then(()=>r):r}});function fi(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...bt(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var pi=[];function mi(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:pi,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=st(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function hi(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(w(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>fi(e,n,i,t,d,f))):fi(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var gi=k(`$ZodObject`,(e,t)=>{P.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=Ue(()=>mi(t));O(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||v(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=et,o=t.catchall,s,c=j.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(w(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>fi(n,t,e,r,a,o))):fi(s,t,e,r,a,o)}return o?hi(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),_i=k(`$ZodObjectJIT`,(e,t)=>{gi.init(e,t);let n=e._zod.parse,r=Ue(()=>mi(t)),i=j.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new hr([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
4
|
+
let ${e}_ab = false;
|
|
5
|
+
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
6
|
+
const iss = ${e}.issues[i];
|
|
7
|
+
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
8
|
+
payload.issues.push(iss);
|
|
9
|
+
if (iss.continue !== true) ${e}_ab = true;
|
|
10
|
+
}
|
|
11
|
+
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
12
|
+
payload.value = newResult;
|
|
13
|
+
return payload;
|
|
14
|
+
}`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:Ze(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
|
|
15
|
+
const ${n}_present = ${i};
|
|
16
|
+
if (!${n}.issues.length || ${n}_present) {
|
|
17
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (${e}) {
|
|
21
|
+
newResult[${r}] = ${n}.value;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
`)}else f?(o.write(`
|
|
26
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
27
|
+
}
|
|
28
|
+
`),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
|
|
29
|
+
if (${n}.value !== undefined || ${i}) {
|
|
30
|
+
newResult[${r}] = ${n}.value;
|
|
31
|
+
}
|
|
32
|
+
`)):o.write(`
|
|
33
|
+
const ${n}_present = ${i};
|
|
34
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
35
|
+
}
|
|
36
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
37
|
+
payload.issues.push({
|
|
38
|
+
code: "invalid_type",
|
|
39
|
+
expected: "nonoptional",
|
|
40
|
+
input: undefined,
|
|
41
|
+
path: [${r}]
|
|
42
|
+
});
|
|
43
|
+
if (ctx && ctx.abortEarly) {
|
|
44
|
+
payload.value = newResult;
|
|
45
|
+
return payload;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (${n}_present) {
|
|
50
|
+
newResult[${r}] = ${n}.value;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=et,c=!j.jitless,l=c&&tt.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?hi([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function vi(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!w(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>T(e,r,M())))}),t)}var yi=k(`$ZodUnion`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),O(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),O(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),O(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>Ge(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>vi(t,r,e,i)):vi(o,r,e,i)}}),bi=k(`$ZodIntersection`,(e,t)=>{P.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Si(e,t,n)):Si(e,i,a)}});function xi(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(nt(e)&&nt(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=xi(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=xi(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Si(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=xi(t.value,n.value);if(!c.valid){if(w(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Ci=k(`$ZodRecord`,(e,t)=>{P.init(e,t);let n=j.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!nt(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>T(e,i,M())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...bt(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...bt(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Jn.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>T(e,i,M())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...bt(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...bt(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),wi=k(`$ZodEnum`,(e,t)=>{P.init(e,t);let n=ze(t.entries),r=new Set(n);e._zod.values=r,O(e,`pattern`,e=>{let t=ze(e.def.entries).filter(e=>it.has(typeof e));return RegExp(t.length?`^(${t.map(e=>at(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Ti=k(`$ZodTransform`,(e,t)=>{P.init(e,t),e._zod.optin=`optional`,j.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ht(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new A;return n.value=i,n}});function Ei(e,t){return e.value=t.issues.length?void 0:t.value,e}var Di=k(`$ZodOptional`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,O(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Ge(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Ei(e,t)):Ei(e,r)}return t.innerType._zod.run(e,n)}}),Oi=k(`$ZodExactOptional`,(e,t)=>{Di.init(e,t),O(e,`values`,e=>e.def.innerType._zod.values),O(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ki=k(`$ZodNullable`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Ge(t.source)}|null)$`):void 0}),O(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Ai=k(`$ZodDefault`,(e,t)=>{P.init(e,t),e._zod.optin=`defaulted`,O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ji(e,t)):ji(r,t)}});function ji(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Mi=k(`$ZodPrefault`,(e,t)=>{P.init(e,t),e._zod.optin=`defaulted`,O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Ni=k(`$ZodNonOptional`,(e,t)=>{P.init(e,t),O(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Pi(t,e)):Pi(i,e)}});function Pi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Fi(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>T(e,r,M()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Ii=k(`$ZodCatch`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Fi(e,r,t,n)):Fi(e,r,t,n)}}),Li=k(`$ZodPipe`,(e,t)=>{P.init(e,t),O(e,`values`,e=>e.def.in._zod.values),O(e,`optin`,e=>e.def.in._zod.optin),O(e,`optout`,e=>e.def.out._zod.optout),O(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ri(e,t.in,n)):Ri(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ri(e,t.out,n)):Ri(r,t.out,n)}});function Ri(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var zi=k(`$ZodReadonly`,(e,t)=>{P.init(e,t),O(e,`propValues`,e=>e.def.innerType._zod.propValues),O(e,`values`,e=>e.def.innerType._zod.values),O(e,`optin`,e=>e.def.innerType?._zod?.optin),O(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Bi):Bi(r)}});function Bi(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Vi=k(`$ZodCustom`,(e,t)=>{N.init(e,t),P.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Hi(t,n,r,e));Hi(i,n,r,e)}});function Hi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Dt(e))}}var Ui=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Wi=`~memo`,Gi=[];function Ki(e){return typeof e==`object`&&!!e}function qi(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Ji=new WeakMap,Yi=0,Xi=1,Zi=2;function Qi(e,t,n){let r=Ji.get(e);if(r!==void 0)return r?Zi:Yi;if(t.has(e))return Zi;t.add(e);let i=Yi,a=e=>{if(i!==Zi&&e?._zod){let r=Qi(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Yi;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Xi:o.value?._zod?Qi(o.value,t,n):Yi;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=qe(c);s(e?o(e,!0):Xi),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Qi(r,t,!1):Xi);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),$i(e,i)}function $i(e,t){return t!==Xi&&Ji.set(e,t===Zi),t}function ea(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var ta,na=[],ra={alloc(e,t,n){let r=ta;if(!r)return n;ta=void 0;let i={value:n,issues:null};return r.set(t.value,i),na.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&aa(n,e.value))throw new Ui;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Qi(e,new Set,!1);if(i===Yi)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Zi||r?n=!0:r=!0}let l=s.value;if(!Ki(l))return t(s,c);let u=c[Wi];u||(u={buckets:new WeakMap,backEdges:void 0},c[Wi]=u);let d;i===c?d=a:(d=ea(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...qi(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;ta=d;let p=na.length,m=t(s,c);ta=void 0;let ee=na.length>p?na.pop():void 0;return m instanceof Promise?m.then(e=>(ee&&(ee.issues=e.issues.length?qi(e.issues):Gi),e)):(ee&&(ee.issues=m.issues.length?qi(m.issues):Gi),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function ia(){return ra}function aa(e,t){let n=e[Wi]?.backEdges;return n!==void 0&&Ki(t)&&n.has(t)}var oa=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Et(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${ot(e.values[0])}`:`Invalid option: expected one of ${Be(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${Be(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function sa(){return{localeError:oa()}}var ca,la=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function ua(){return new la}(ca=globalThis).__zod_globalRegistry??(ca.__zod_globalRegistry=ua());var da=globalThis.__zod_globalRegistry;function fa(e){return e.checks&&=[...e.checks],e}function pa(e,t){return new e(fa({type:`string`,...C(t)}))}function ma(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...C(t)})}function ha(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...C(t)})}function ga(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...C(t)})}function _a(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...C(t)})}function va(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...C(t)})}function ya(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...C(t)})}function ba(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...C(t)})}function xa(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...C(t)})}function Sa(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...C(t)})}function Ca(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...C(t)})}function wa(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...C(t)})}function Ta(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...C(t)})}function Ea(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...C(t)})}function Da(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...C(t)})}function Oa(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...C(t)})}function ka(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...C(t)})}function Aa(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...C(t)})}function ja(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...C(t)})}function Ma(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...C(t)})}function Na(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...C(t)})}function Pa(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...C(t)})}function Fa(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...C(t)})}function Ia(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...C(t)})}function La(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...C(t)})}function Ra(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...C(t)})}function za(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...C(t)})}function Ba(e,t){return new e(fa({type:`number`,checks:[],...C(t)}))}function Va(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...C(t)})}function Ha(e,t){return new e({type:`boolean`,...C(t)})}function Ua(e){return new e({type:`unknown`})}function Wa(e,t){return new e({type:`never`,...C(t)})}function Ga(e,t){return new er({check:`less_than`,...C(t),value:e,inclusive:!1})}function Ka(e,t){return new er({check:`less_than`,...C(t),value:e,inclusive:!0})}function qa(e,t){return new tr({check:`greater_than`,...C(t),value:e,inclusive:!1})}function Ja(e,t){return new tr({check:`greater_than`,...C(t),value:e,inclusive:!0})}function Ya(e,t){return new nr({check:`multiple_of`,...C(t),value:e})}function Xa(e,t){return new ir({check:`max_length`,...C(t),maximum:e})}function Za(e,t){return new ar({check:`min_length`,...C(t),minimum:e})}function Qa(e,t){return new or({check:`length_equals`,...C(t),length:e})}function $a(e,t){return new cr({check:`string_format`,format:`regex`,...C(t),pattern:e})}function eo(e){return new lr({check:`string_format`,format:`lowercase`,...C(e)})}function to(e){return new ur({check:`string_format`,format:`uppercase`,...C(e)})}function no(e,t){return new dr({check:`string_format`,format:`includes`,...C(t),includes:e})}function ro(e,t){return new fr({check:`string_format`,format:`starts_with`,...C(t),prefix:e})}function io(e,t){return new pr({check:`string_format`,format:`ends_with`,...C(t),suffix:e})}function ao(e){return new mr({check:`overwrite`,tx:e})}function oo(e){return ao(t=>t.normalize(e))}function so(){return ao(e=>e.trim())}function co(){return ao(e=>e.toLowerCase())}function lo(){return ao(e=>e.toUpperCase())}function uo(){return ao(e=>Qe(e))}function fo(e,t,n){return new e({type:`array`,element:t,...C(n)})}function po(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...C(n)})}function mo(e,t){let n=ho(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Dt(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Dt(r))}},e(t.value,t)),t);return n}function ho(e,t){let n=new N({check:`custom`,...C(t)});return n._zod.check=e,n}function go(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&v(e,t,n[t]);return e}function _o(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??da,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function vo(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function I(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,I(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&go(o.schema,c),t.io===`input`&&L(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function yo(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function bo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${yo(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+yo(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
54
|
+
|
|
55
|
+
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}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function xo(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;xo(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var So=new Set([`type`,`properties`,`required`,`additionalProperties`]),Co=[`oneOf`,`anyOf`];function wo(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function To(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!So.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??wo(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}v(n,r,e.length===1?e[0]:To(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=wo(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Eo(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of So)if(t in e)return;let n=t.filter(e=>Co.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=To(t);else{let e=n[0],i=Co.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>To([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,go(e,r))}function Do(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)):go(i,s),go(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??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())xo(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Eo(e)}}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)}go(i,n.defId?n.schema: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??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,v(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),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:ko(t,`input`,e.processors),output:ko(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function L(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 L(r.element,n);if(r.type===`set`)return L(r.valueType,n);if(r.type===`lazy`)return L(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`||r.type===`catch`)return L(r.innerType,n);if(r.type===`intersection`)return L(r.left,n)||L(r.right,n);if(r.type===`record`||r.type===`map`)return L(r.keyType,n)||L(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:L(r.in,n)||L(r.out,n);if(r.type===`object`){for(let e in r.shape)if(L(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(L(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(L(e,n))return!0;return!!(r.rest&&L(r.rest,n))}return!1}var Oo=(e,t={})=>n=>{let r=_o({...n,processors:t});return I(e,r),bo(r,e),Do(r,e)},ko=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=_o({...i??{},target:a,io:t,processors:n});return I(e,o),bo(o,e),Do(o,e)},Ao=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},jo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Mo=(e,t)=>{Ao(e,`minimum`,t),jo(e,`maximum`,t)},No=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Po=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Fo=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Io=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Lo=(e,t)=>Ao(e,`minimum`,t.minimum),Ro=(e,t)=>jo(e,`maximum`,t.maximum),zo=e=>(t,n)=>{Io(t,n.format);let[r,i]=e[n.format];Ao(t,`minimum`,r),jo(t,`maximum`,i)},Bo={greater_than:(e,t)=>Ao(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>jo(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>No(e,t.value),number_format:zo(ct),bigint_format:zo(lt),min_length:Lo,max_length:Ro,length_equals:(e,t)=>Mo(e,t.length),min_size:Lo,max_size:Ro,size_equals:(e,t)=>Mo(e,t.size),string_format:(e,t)=>{Io(e,t.format),t.pattern&&Po(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Fo(e,t.mime)};function R(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Bo[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Ao(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Ao(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&jo(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&jo(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&No(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Fo(t,i.mime);for(let e of i.patterns??[])Po(t,e);return t}var Vo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Ho=new Map([[Zr,In],[$r,Ln]]),Uo=e=>Ho.get(e)??e,Wo=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=R(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Vo[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Uo);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}))])}},Go=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=R(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):vo(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Ko=(e,t,n,r)=>{n.type=`boolean`},qo=(e,t,n,r)=>{n.not={}},Jo=(e,t,n,r)=>{let i=e._zod.def,a=ze(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Yo=(e,t,n,r)=>{vo(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Xo=(e,t,n,r)=>{vo(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Zo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=R(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=I(a.element,t,{...r,path:[...r.path,`items`]})};function Qo(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Qo(t.out):t.type===`catch`?Qo(t.innerType):e._zod.optin}var $o=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&vo(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)v(i.properties,e,I(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Qo(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=I(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},es=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>I(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ts=(e,t,n,r)=>{let i=e._zod.def,a=I(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=I(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function ns(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=ns(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>ns(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Jn:qn).source),p):p}var rs=new WeakMap;function is(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of rs.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=ns(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var as=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=R(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=I(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)v(i.patternProperties,Uo(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=I(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=rs.get(t);n||(n=[],rs.set(t,n),t.deferred.push(()=>is(t))),n.push(e)}i.additionalProperties=I(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Qo(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},os=(e,t,n,r)=>{let i=e._zod.def,a=I(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`}]},ss=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},cs=Symbol();function ls(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(vo(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),cs):JSON.parse(o)}var us=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=ls(i.defaultValue,e,t,n,r);o!==cs&&(n.default=o)},ds=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=ls(i.defaultValue,e,t,n,r);o!==cs&&(n._prefault=o)},fs=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{vo(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},ps=(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;I(o,t,r);let s=t.seen.get(e);s.ref=o},ms=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},hs=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},gs=new WeakSet([Object.prototype,Error.prototype]);function _s(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var z=k(`ZodError`,(e,t)=>{Yt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);gs.has(n)||(gs.add(n),_s(n,`format`,e=>t=>Qt(e,t)),_s(n,`flatten`,e=>t=>Zt(e,t)),_s(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ve,2)}),_s(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ve,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),vs=en(z),ys=tn(z),bs=nn(z),xs=an(z),Ss=dn(z),Cs=fn(z),ws=pn(z),Ts=mn(z),Es=hn(z),Ds=gn(z),Os=_n(z),ks=vn(z);function As(){j.localeError||M(sa())}function js(){j.memoizer||M({memoizer:ia()})}var B=k(`ZodType`,(e,t)=>(As(),P.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(x(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 S(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Bc(e,t))},superRefine(e,t){return this.check(Vc(e,t))},overwrite(e){return this.check(ao(e))},optional(){return Sc(this)},exactOptional(){return wc(this)},nullable(){return Ec(this)},nullish(){return Sc(Ec(this))},nonoptional(e){return Mc(this,e)},array(){return G(this)},or(e){return mc([this,e])},and(e){return gc(this,e)},transform(e){return Ic(this,bc(e))},default(e){return Oc(this,e)},prefault(e){return Ac(this,e)},catch(e){return Pc(this,e)},pipe(e){return Ic(this,e)},readonly(){return Rc(this)},describe(e){let t=this.clone();return da.add(t,{description:e}),t},meta(...e){if(e.length===0)return da.get(this);let t=this.clone();return da.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return kt(this,`~standard`,{...yr(this),jsonSchema:{input:ko(this,`input`),output:ko(this,`output`)}})},set"~standard"(e){E(this,`~standard`,e)},parse:function e(t,n){return vs(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ys(this,t,n,{callee:e})},safeParse(e,t){return bs(this,e,t)},async safeParseAsync(e,t){return xs(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){E(this,`spa`,e)},validate(e,t){return cn(this,e,t)},validateAsync(e,t){return un(this,e,t)},encode:function e(t,n){return Ss(this,t,n,{callee:e})},decode:function e(t,n){return Cs(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await ws(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Ts(this,t,n,{callee:e})},safeEncode(e,t){return Es(this,e,t)},safeDecode(e,t){return Ds(this,e,t)},async safeEncodeAsync(e,t){return Os(this,e,t)},async safeDecodeAsync(e,t){return ks(this,e,t)},toJSONSchema(e){return Oo(this,{})(e)},get description(){return da.get(this)?.description},get _def(){return this._zod.def}}),Ms=k(`_ZodString`,(e,t)=>{br.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r)},At({format:e=>R(e).format??null,minLength:e=>R(e).minimum??null,maxLength:e=>R(e).maximum??null},{regex(...e){return this.check($a(...e))},includes(...e){return this.check(no(...e))},startsWith(...e){return this.check(ro(...e))},endsWith(...e){return this.check(io(...e))},min(...e){return this.check(Za(...e))},max(...e){return this.check(Xa(...e))},length(...e){return this.check(Qa(...e))},nonempty(...e){return this.check(Za(1,...e))},lowercase(e){return this.check(eo(e))},uppercase(e){return this.check(to(e))},trim(){return this.check(so())},normalize(...e){return this.check(oo(...e))},toLowerCase(){return this.check(co())},toUpperCase(){return this.check(lo())},slugify(){return this.check(uo())}})),Ns=k(`ZodString`,(e,t)=>{br.init(e,t),Ms.init(e,t)},{email(e){return this.check(ma(Rs,e))},url(e){return this.check(ba(Vs,e))},jwt(e){return this.check(Fa(nc,e))},emoji(e){return this.check(xa(Hs,e))},guid(e){return this.check(ha(zs,e))},uuid(e){return this.check(ga(Bs,e))},uuidv4(e){return this.check(_a(Bs,e))},uuidv6(e){return this.check(va(Bs,e))},uuidv7(e){return this.check(ya(Bs,e))},nanoid(e){return this.check(Sa(Us,e))},cuid(e){return this.check(Ca(Ws,e))},cuid2(e){return this.check(wa(Gs,e))},ulid(e){return this.check(Ta(Ks,e))},base64(e){return this.check(Ma($s,e))},base64url(e){return this.check(Na(ec,e))},xid(e){return this.check(Ea(qs,e))},ksuid(e){return this.check(Da(Js,e))},ipv4(e){return this.check(Oa(Ys,e))},ipv6(e){return this.check(ka(Xs,e))},cidrv4(e){return this.check(Aa(Zs,e))},cidrv6(e){return this.check(ja(Qs,e))},e164(e){return this.check(Pa(tc,e))},datetime(e){return this.check(Ia(Ps,e))},date(e){return this.check(La(Fs,e))},time(e){return this.check(Ra(Is,e))},duration(e){return this.check(za(Ls,e))}});function V(e){return pa(Ns,e)}var H=k(`ZodStringFormat`,(e,t)=>{F.init(e,t),Ms.init(e,t)}),Ps=k(`ZodISODateTime`,(e,t)=>{zr.init(e,t),H.init(e,t)}),Fs=k(`ZodISODate`,(e,t)=>{Br.init(e,t),H.init(e,t)}),Is=k(`ZodISOTime`,(e,t)=>{Vr.init(e,t),H.init(e,t)}),Ls=k(`ZodISODuration`,(e,t)=>{Hr.init(e,t),H.init(e,t)}),Rs=k(`ZodEmail`,(e,t)=>{Cr.init(e,t),H.init(e,t)}),zs=k(`ZodGUID`,(e,t)=>{xr.init(e,t),H.init(e,t)}),Bs=k(`ZodUUID`,(e,t)=>{Sr.init(e,t),H.init(e,t)}),Vs=k(`ZodURL`,(e,t)=>{jr.init(e,t),H.init(e,t)}),Hs=k(`ZodEmoji`,(e,t)=>{Mr.init(e,t),H.init(e,t)}),Us=k(`ZodNanoID`,(e,t)=>{Nr.init(e,t),H.init(e,t)}),Ws=k(`ZodCUID`,(e,t)=>{Pr.init(e,t),H.init(e,t)}),Gs=k(`ZodCUID2`,(e,t)=>{Fr.init(e,t),H.init(e,t)}),Ks=k(`ZodULID`,(e,t)=>{Ir.init(e,t),H.init(e,t)}),qs=k(`ZodXID`,(e,t)=>{Lr.init(e,t),H.init(e,t)}),Js=k(`ZodKSUID`,(e,t)=>{Rr.init(e,t),H.init(e,t)}),Ys=k(`ZodIPv4`,(e,t)=>{Ur.init(e,t),H.init(e,t)}),Xs=k(`ZodIPv6`,(e,t)=>{Kr.init(e,t),H.init(e,t)}),Zs=k(`ZodCIDRv4`,(e,t)=>{qr.init(e,t),H.init(e,t)}),Qs=k(`ZodCIDRv6`,(e,t)=>{Yr.init(e,t),H.init(e,t)}),$s=k(`ZodBase64`,(e,t)=>{Qr.init(e,t),H.init(e,t)}),ec=k(`ZodBase64URL`,(e,t)=>{ti.init(e,t),H.init(e,t)}),tc=k(`ZodE164`,(e,t)=>{ni.init(e,t),H.init(e,t)}),nc=k(`ZodJWT`,(e,t)=>{ii.init(e,t),H.init(e,t)}),rc=k(`ZodNumber`,(e,t)=>{ai.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Go(e,t,n,r),e.isFinite=!0},At({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=R(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=R(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=R(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>R(e).format??null},{gt(e,t){return this.check(qa(e,t))},gte(e,t){return this.check(Ja(e,t))},min(e,t){return this.check(Ja(e,t))},lt(e,t){return this.check(Ga(e,t))},lte(e,t){return this.check(Ka(e,t))},max(e,t){return this.check(Ka(e,t))},int(e){return this.check(ac(e))},safe(e){return this.check(ac(e))},positive(e){return this.check(qa(0,e))},nonnegative(e){return this.check(Ja(0,e))},negative(e){return this.check(Ga(0,e))},nonpositive(e){return this.check(Ka(0,e))},multipleOf(e,t){return this.check(Ya(e,t))},step(e,t){return this.check(Ya(e,t))},finite(){return this}}));function U(e){return Ba(rc,e)}var ic=k(`ZodNumberFormat`,(e,t)=>{oi.init(e,t),rc.init(e,t)});function ac(e){return Va(ic,e)}var oc=k(`ZodBoolean`,(e,t)=>{si.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ko(e,t,n,r)});function sc(e){return Ha(oc,e)}var cc=k(`ZodUnknown`,(e,t)=>{ci.init(e,t),B.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function W(){return Ua(cc)}var lc=k(`ZodNever`,(e,t)=>{li.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r)});function uc(e){return Wa(lc,e)}var dc=k(`ZodArray`,(e,t)=>{js(),di.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zo(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Za(e,t))},nonempty(e){return this.check(Za(1,e))},max(e,t){return this.check(Xa(e,t))},length(e,t){return this.check(Qa(e,t))},unwrap(){return this.element}});function G(e,t){return fo(dc,e,t)}var fc=k(`ZodObject`,(e,t)=>{js(),_i.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$o(e,t,n,r),Ft(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Y(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(x(this._zod.def,{catchall:e}))},passthrough(){return this.clone(x(this._zod.def,{catchall:W()}))},loose(){return this.clone(x(this._zod.def,{catchall:W()}))},strict(){return this.clone(x(this._zod.def,{catchall:uc()}))},strip(){return this.clone(x(this._zod.def,{catchall:void 0}))},extend(e){return pt(this,e)},safeExtend(e){return ht(this,e)},merge(e){return gt(this,e)},pick(e){return ut(this,e)},omit(e){return ft(this,e)},partial(...e){return _t(xc,this,e[0])},exactPartial(...e){return _t(Cc,this,e[0],`exactPartial`)},required(...e){return vt(jc,this,e[0])}});function K(e,t){return new fc({type:`object`,shape:e??{},...C(t)})}function q(e,t){return new fc({type:`object`,shape:e,catchall:uc(),...C(t)})}var pc=k(`ZodUnion`,(e,t)=>{yi.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.options=t.options});function mc(e,t){return new pc({type:`union`,options:e,...C(t)})}var hc=k(`ZodIntersection`,(e,t)=>{bi.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r)});function gc(e,t){return new hc({type:`intersection`,left:e,right:t})}var _c=k(`ZodRecord`,(e,t)=>{js(),Ci.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>as(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function J(e,t,n){return!t||!t._zod?new _c({type:`record`,keyType:V(),valueType:e,...C(t)}):new _c({type:`record`,keyType:e,valueType:t,...C(n)})}var vc=k(`ZodEnum`,(e,t)=>{wi.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jo(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];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 vc({...t,checks:[],...C(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 vc({...t,checks:[],...C(r),entries:i})}});function Y(e,t){return new vc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...C(t)})}var yc=k(`ZodTransform`,(e,t)=>{js(),Ti.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ht(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Dt(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Dt(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function bc(e){return new yc({type:`transform`,transform:e})}var xc=k(`ZodOptional`,(e,t)=>{Di.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Sc(e){return new xc({type:`optional`,innerType:e})}var Cc=k(`ZodExactOptional`,(e,t)=>{Oi.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wc(e){return new Cc({type:`optional`,innerType:e})}var Tc=k(`ZodNullable`,(e,t)=>{ki.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>os(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ec(e){return new Tc({type:`nullable`,innerType:e})}var Dc=k(`ZodDefault`,(e,t)=>{Ai.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>us(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Oc(e,t){return new Dc({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():rt(t)}})}var kc=k(`ZodPrefault`,(e,t)=>{Mi.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ds(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ac(e,t){return new kc({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():rt(t)}})}var jc=k(`ZodNonOptional`,(e,t)=>{Ni.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ss(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Mc(e,t){return new jc({type:`nonoptional`,innerType:e,...C(t)})}var Nc=k(`ZodCatch`,(e,t)=>{Ii.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Pc(e,t){return new Nc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Lt(t)})}var Fc=k(`ZodPipe`,(e,t)=>{Li.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ps(e,t,n,r),e.in=t.in,e.out=t.out});function Ic(e,t){return new Fc({type:`pipe`,in:e,out:t})}var Lc=k(`ZodReadonly`,(e,t)=>{zi.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ms(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Rc(e){return new Lc({type:`readonly`,innerType:e})}var zc=k(`ZodCustom`,(e,t)=>{Vi.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yo(e,t,n,r)});function Bc(e,t={}){return po(zc,e,t)}function Vc(e,t){return mo(e,t)}function Hc(e){return Ia(Ps,e)}new Intl.Segmenter(void 0,{granularity:`grapheme`});var Uc=V().min(1).describe(`A field of the frontmatter, by its name.`);q({});function Wc(e){try{return new RegExp(e,`u`),!0}catch{return!1}}q({words:G(V().min(1)).min(1).max(200),reason:V().min(1).max(200).optional().describe(`Why, for the fix.`)}),q({field:Uc,min:U().int().min(0).optional(),max:U().int().min(0).optional(),unless:Uc.optional()}).refine(e=>e.min!==void 0||e.max!==void 0,{message:`Give min, max or both.`}).refine(e=>e.min===void 0||e.max===void 0||e.min<=e.max,{message:`min is more than max.`}),q({field:Uc,pattern:V().min(1).max(500).refine(Wc,{message:`Not a regular expression.`}),description:V().min(1).max(200).describe(`What the pattern asks for, in words.`)}),q({fields:G(Uc).min(1)}),new Set(Re);var Gc=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function Kc(e){return typeof e==`string`&&e.length<=64&&Gc.test(e)}var qc=J(V(),W()).describe(`A JSON Schema, draft 2020-12, of an object.`),Jc=Y([`error`,`warning`]),Yc=q({rule:V().min(1).describe(`The name of a rule of the catalog that describe_site lists.`),severity:Jc.default(`error`),params:J(V(),W()).default({}).describe(`The parameters of the rule, as the catalog describes them.`),id:V().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional().describe(`The id of the contract, when a collection lists one rule twice; its name otherwise.`)}),Xc=q({props:qc.describe(`The JSON Schema of the props.`),description:V().min(1).optional(),example:V().min(1).optional()}),Zc=q({schema:qc.describe(`The JSON Schema of the frontmatter.`),routes:J(V(),V()).describe(`The public path of an entry in each locale, with :slug: { "en": "/blog/:slug/" }.`),translationGroupField:V().min(1).nullable().default(null),tagsField:V().min(1).nullable().default(null),sortByField:V().min(1).nullable().default(null),components:J(V(),Xc).default({}),rules:G(Yc).default([]),maxMarkdownBytes:U().int().positive().nullable().default(null),styleGuide:V().nullable().default(null)}),Qc=q({name:V().min(1),url:V().min(1).describe(`The https URL that receives each event, signed.`),secret:V().min(1).optional().describe(`The Worker secret that signs the deliveries. Leave it out for Hollware to make one with make_webhook_secret and keep it sealed.`)}),$c=q({locales:G(V().min(1)).min(1),defaultLocale:V().min(1),url:V().min(1).nullable().default(null),styleGuide:V().nullable().default(null),cors:q({origins:G(V().min(1))}).default({origins:[]}),events:q({webhooks:G(Qc).default([]),indexNow:q({key:V().min(1)}).nullable().default(null)}).default({webhooks:[],indexNow:null}),collections:J(V(),Zc)}),X=V().min(1).describe(`A collection of the site, as describe_site lists it.`),el=V().min(1).describe(`A locale of the site, as describe_site lists it.`),tl=V().max(200).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).describe(`The entry's path segment: lowercase letters and digits joined by hyphens, such as edge-caching-guide.`),Z=V().regex(/^ent_[0-9A-HJKMNP-TV-Z]{26}$/).describe(`The id of an entry (ent_…), as the other operations return it.`),nl=V().regex(/^rev_[0-9A-HJKMNP-TV-Z]{26}$/).describe(`The id of a revision (rev_…).`),rl=U().int().min(1).describe(`The version of the entry you read. A change against an older version answers conflict.`),il=V().describe(`The whole Markdown file: the YAML frontmatter between two --- lines, then the body. The collection schema in describe_site says what the frontmatter needs.`),al=Y([`draft`,`scheduled`,`published`]),ol=Y([`error`,`warning`]),sl=Y([`write`,`publish`]),cl=K({contract:V().describe(`The id of the contract.`),severity:ol,path:V().describe(`A JSON Pointer into { frontmatter, body }: /frontmatter/title, or /body with a line.`),message:V(),fix:V().describe(`What to change so that the problem goes away.`),line:U().int().min(1).optional()}),Q=K({ok:sc().describe(`Whether there are no errors. Warnings do not count, but publish asks about them.`),phase:sl,errors:G(cl),warnings:G(cl),contractsHash:V().describe(`A hash of the rules the content was checked against.`)}),ll=K({contract:V(),path:V()}),$=K({id:Z,collection:V(),locale:V(),slug:V(),translationGroup:V().nullable(),status:al,version:U().int().min(1),frontmatter:J(V(),W()),tags:G(V()),hasUnpublishedChanges:sc().describe(`Whether the latest revision differs from the published one.`),publishedAt:V().nullable().describe(`When the entry was first published, or null.`),scheduledAt:V().nullable().describe(`When a scheduled entry will be published, or null for one that is not scheduled.`),updatedAt:V()}),ul=K({revision:nl,verdict:Q.describe(`The verdict of the publish phase.`),acknowledged:G(ll).describe(`The warnings acknowledged to publish.`),at:V()}),dl=K({nodes:G(W()),frontmatter:J(V(),W()),meta:J(V(),W())}),fl=$.extend({revision:nl.describe(`The revision this view shows.`),verdict:Q.describe(`The verdict of the contracts when this revision was written.`),lastPublication:ul.nullable(),markdown:V().optional(),document:dl.optional(),html:V().optional()}),pl=V().regex(/^rvw_[0-9A-HJKMNP-TV-Z]{26}$/).describe(`The id of a review (rvw_…), as publish and list_reviews return it.`),ml=Y([`pending`,`approved`,`changes_requested`,`cancelled`]),hl=K({id:pl,entryId:Z,revision:nl.describe(`The revision asked for.`),status:ml.describe(`pending until someone decides; cancelled when a new revision of the entry is saved.`),requestedBy:V().describe(`The user who asked.`),requestedByName:V().nullable().describe(`The name of the user who asked, if they gave one.`),requestedAt:V(),decidedBy:V().nullable(),decidedAt:V().nullable(),note:V().nullable().describe(`What the reviewer asked to change, or null.`)}),gl=K({id:V(),author:V().describe(`The user who wrote it, or whose token their agent used.`),authorName:V().nullable(),client:V().nullable().describe(`The name the client gave, such as hollware-agents for the agents; null for none.`),body:V(),at:V()}),_l=K({currentVersion:U().int().min(1),headRevision:nl}),vl=Y([`markdown`,`document`,`html`]),yl=Y([`fulltext`,`semantic`,`hybrid`]),bl=K({name:V(),description:V().nullable(),example:V().nullable(),props:J(V(),W()).describe(`The JSON Schema of the props.`)}),xl=K({id:V(),severity:ol,phases:G(sl),description:V()}),Sl=K({name:V(),schema:J(V(),W()).describe(`The JSON Schema of the frontmatter.`),routes:J(V(),V()).describe(`The public path of an entry, per locale.`),translationGroupField:V().nullable().describe(`The frontmatter field that the translations of an entry share, or null.`),tagsField:V().nullable().describe(`The frontmatter field with the tags, or null.`),sortByField:V().nullable().describe(`The frontmatter field, a date, that orders published listings, newest first; null when they follow the date of first publication.`),components:G(bl),contracts:G(xl),maxMarkdownBytes:U().int(),styleGuide:V().nullable()}),Cl=K({key:V(),locales:G(V()),defaultLocale:V(),url:V().nullable().describe(`The public origin of the site, which starts the URL of each entry, or null.`),styleGuide:V().nullable(),collections:G(Sl)});q({}),K({outcome:Y([`ok`]),site:Cl}),q({collection:X,locale:el.optional(),tag:V().min(1).optional(),status:al.optional(),limit:U().int().min(1).max(100).default(20),cursor:V().min(1).optional()}),K({outcome:Y([`ok`]),entries:G($),nextCursor:V().nullable().describe(`The cursor of the next page, or null.`)}),q({query:V().trim().min(1).max(200).describe(`The words to find, or a question; punctuation is ignored by full text.`),collection:X.optional(),locale:el.optional(),limit:U().int().min(1).max(50).default(10),mode:yl.optional().describe(`fulltext, semantic or hybrid; hybrid when not given. Semantic and hybrid need the semantic search of the deployment: without it the search is full text, and mode in the answer says so.`)}),K({outcome:Y([`ok`]),mode:yl.describe(`How the search was made.`),results:G(K({entry:$,snippet:V().describe(`The words around the match, the words found between [ and ]; for a match by meaning, the start of the closest part.`),score:U().describe(`How well it matches: higher is better.`)}))}),q({collection:X,locale:el,slug:tl,formats:G(vl).min(1).default([`markdown`]).describe(`What to return of the revision: markdown, the Comark document, or html.`),published:sc().default(!1).describe(`Read the revision that is live instead of the latest one: not_found when the entry is not published.`),related:sc().default(!1).describe(`Also return the published entries closest to this one by meaning, in its collection and locale, closest first. Needs the semantic search of the deployment; empty without it.`)}),K({outcome:Y([`ok`,`not_found`]),entry:fl.optional(),related:G($).optional().describe(`When related was asked for.`)}),q({collection:X,translationGroup:V().min(1)}),K({outcome:Y([`ok`,`not_found`]),entries:G($).optional()}),q({collection:X,locale:el,slug:tl,markdown:il}),K({outcome:Y([`saved`,`refused`]),entry:$.optional(),verdict:Q.optional()}),q({id:Z,version:rl,markdown:il}),K({outcome:Y([`saved`,`unchanged`,`conflict`,`not_found`,`refused`]),entry:$.optional(),verdict:Q.optional(),conflict:_l.optional()}),q({collection:X,locale:el,slug:tl,markdown:il}),K({outcome:Y([`ok`]),verdict:Q}),q({id:Z,version:rl,acknowledgeWarnings:G(ll).default([]).describe(`The warnings you accept, as needs_acknowledgement listed them.`),group:G(q({id:Z,version:rl})).max(99).default([]).describe(`Other entries to publish in the same step, each with the version you read: all of them are published, or none. A link between two of them counts as published, and an acknowledged warning holds for every entry that reports it.`),publishAt:Hc({offset:!0}).optional().describe(`Publish at this time instead of now, as an ISO 8601 date and time: the entry is checked now and waits as scheduled, and it is published within a minute of the time, if nobody changes it before. One entry at a time, never with group.`)}),K({outcome:Y([`published`,`scheduled`,`blocked`,`needs_acknowledgement`,`pending_review`,`conflict`,`not_found`]),entry:$.optional(),verdict:Q.optional(),conflict:_l.optional(),review:hl.optional().describe(`With pending_review: the request, as list_reviews shows it.`),failedEntry:Z.optional().describe(`In a group, the entry that kept the group from being published: blocked, stale, missing, or with a warning to acknowledge.`)}),q({id:Z}),K({outcome:Y([`unpublished`,`not_found`]),entry:$.optional()}),q({status:ml.default(`pending`),limit:U().int().min(1).max(100).default(50)}),K({outcome:Y([`ok`]),reviews:G(hl.extend({entry:$,comments:G(gl).describe(`What was said about it, oldest first.`)}))}),q({id:pl,acknowledgeWarnings:G(ll).default([]).describe(`Warnings you accept besides those the request acknowledged.`)}),K({outcome:Y([`published`,`blocked`,`needs_acknowledgement`,`not_pending`,`not_found`]),review:hl.optional(),entry:$.optional(),verdict:Q.optional()}),q({id:Z,version:rl,acknowledgeWarnings:G(ll).default([]).describe(`The warnings you accept, as needs_acknowledgement listed them.`)}),K({outcome:Y([`pending_review`,`blocked`,`needs_acknowledgement`,`conflict`,`not_found`]),entry:$.optional(),verdict:Q.optional(),conflict:_l.optional(),review:hl.optional().describe(`With pending_review: the request, as list_reviews shows it.`)}),q({id:pl,body:V().trim().min(1).max(4e3).describe(`The comment, in Markdown.`)}),K({outcome:Y([`commented`,`not_pending`,`not_found`]),comment:gl.optional()}),q({id:pl,note:V().trim().min(1).max(4e3).describe(`What to change, for the author.`)}),K({outcome:Y([`changes_requested`,`not_pending`,`not_found`]),review:hl.optional()}),q({days:U().int().min(1).max(90).default(30).describe(`How many days back to count.`),limit:U().int().min(1).max(50).default(10)}),K({outcome:Y([`ok`,`unavailable`]),since:V().optional().describe(`The start of the count, in ISO 8601.`),pages:G(K({path:V(),views:U().describe(`Page views, sampling accounted for.`),entry:$.nullable().describe(`The published entry at that path, or null.`)})).optional()});var wl=V().refine(Kc,{message:`Not a site key: lowercase words joined by hyphens, such as my-site.`}).describe(`The key of a site: lowercase letters and digits joined by hyphens, such as my-site.`),Tl=U().int().min(0).describe(`The version of the structure you read with get_structure. Another one answers conflict.`),El=sc().default(!1).describe(`true to go ahead when needs_confirmation listed what the change does to existing entries.`),Dl=K({path:V().describe(`Where, from the root: sites.<key>.collections.<name>.schema.`),message:V(),fix:V()}),Ol=K({removedCollections:G(K({name:V(),entries:U().int()})).describe(`Collections the change removes, with how many entries each holds.`),removedLocales:G(K({locale:V(),entries:U().int()})).describe(`Locales the change removes, with how many entries each holds.`),refused:G(K({collection:V(),entries:U().int().describe(`Entries whose latest frontmatter the new schema refuses.`),examples:G(V()).describe(`A few of their slugs.`)})).describe(`Collections whose new schema refuses entries they hold; they stay, and their next write is checked against it.`)}),kl=K({outcome:Y([`updated`,`unchanged`,`invalid`,`needs_confirmation`,`conflict`]),version:U().int().optional().describe(`The version of the structure now.`),problems:G(Dl).optional().describe(`With invalid: every problem, each with its fix.`),impact:Ol.optional().describe(`With needs_confirmation: what the change would do.`),currentVersion:U().int().optional().describe(`With conflict: the version to read again.`)});q({}),K({outcome:Y([`ok`]),site:V(),version:U().int(),definition:$c,catalog:G(K({name:V(),description:V(),params:J(V(),W()).describe(`The JSON Schema of its parameters.`)}))}),q({version:Tl,definition:$c,confirm:El}),kl.describe(`What became of the definition.`),q({version:Tl,name:V().regex(/^[a-z][a-z0-9-]*$/).describe(`The name of the collection: lowercase letters, digits and hyphens, such as blog.`),collection:Zc.nullable().describe(`The collection, or null to remove it.`),confirm:El}),kl.describe(`What became of the collection.`),q({key:wl,definition:$c}),K({outcome:Y([`created`,`taken`,`invalid`]),version:U().int().optional(),problems:G(Dl).optional().describe(`With invalid: every problem, each with its fix.`)}),q({key:wl,confirm:El}),K({outcome:Y([`trashed`,`needs_confirmation`,`not_found`]),entries:U().int().optional().describe(`With needs_confirmation: the entries the site holds.`)}),q({key:wl}),K({outcome:Y([`restored`,`not_found`])}),q({webhook:V().min(1).describe(`The name of the webhook, as the definition of the site has it.`)}),K({outcome:Y([`made`,`not_found`,`unavailable`]),secret:V().optional().describe(`With made: the secret, shown this once.`)}),new TextEncoder;export{h as n,ae as r,Zc as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fn as e,Qr as t,Xt as n}from"./session-CzMvpLSp.js";var r=[`INPUT`,`TEXTAREA`];function i(e,t,n,i={}){if(!t||i.enableIgnoredElement&&r.includes(t.nodeName))return null;let{arrowKeyOptions:o=`both`,attributeName:s=`[data-reka-collection-item]`,itemsArray:c=[],loop:l=!0,dir:u=`ltr`,preventScroll:d=!0,focus:f=!1}=i,[p,m,h,g,_,v]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],y=h||g,b=p||m;if(!_&&!v&&(!y&&!b||o===`vertical`&&b||o===`horizontal`&&y))return null;let x=n?Array.from(n.querySelectorAll(s)):c;if(!x.length)return null;d&&e.preventDefault();let S=null;return b||y?S=a(x,t,{goForward:y?g:u===`ltr`?p:m,loop:l}):_?S=x.at(0)||null:v&&(S=x.at(-1)||null),f&&S?.focus(),S}function a(e,t,n,r=e.includes(t)?e.length:e.length+1){if(--r===0)return null;let i=e.indexOf(t),o;if(o=i===-1?n.goForward?0:e.length-1:n.goForward?i+1:i-1,!n.loop&&(o<0||o>=e.length))return null;let s=e[(o+e.length)%e.length];return s?s.hasAttribute(`disabled`)&&s.getAttribute(`disabled`)!==`false`?a(e,s,n,r):s:null}var o=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Bopomofo}]/u,s=/android/i;function c(){return typeof navigator<`u`&&s.test(navigator.userAgent)}function l(r){let i=t(!1),a=t(!0),s=t(!1),l=n(()=>i.value&&a.value);function u(){i.value=!0,a.value=!0,s.value=!1}function d(e){e.data&&(o.test(e.data)?(a.value=!0,s.value=!0):c()&&!s.value&&(a.value=!1))}function f(t){e(()=>{i.value=!1,r?.(t)})}return{isComposing:i,shouldDeferInput:l,handleCompositionStart:u,handleCompositionUpdate:d,handleCompositionEnd:f}}export{i as n,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{W as e,Xt as t,ci as n}from"./session-CzMvpLSp.js";function r(e){let r=t(()=>n(e)),i=t(()=>new Intl.Collator(`en`,{usage:`search`,...r.value}));return{startsWith:(e,t)=>t.length===0||(e=e.normalize(`NFC`),t=t.normalize(`NFC`),i.value.compare(e.slice(0,t.length),t)===0),endsWith:(e,t)=>t.length===0||(e=e.normalize(`NFC`),t=t.normalize(`NFC`),i.value.compare(e.slice(-t.length),t)===0),contains:(e,t)=>{if(t.length===0)return!0;if(e=e.normalize(`NFC`),t=t.normalize(`NFC`),t.length>e.length)return!1;let n=i.value.compare;if(e.includes(t))return!0;let r=t.length;for(let i=0;i+r<=e.length;i++)if(n(t,e.slice(i,i+r))===0)return!0;return!1}}}function i(){let{contains:t,startsWith:n}=r({sensitivity:`base`});function i(e,r){return t(e,r)?t(r,e)?0:n(e,r)?1:2:null}function a(t,n,r){if(typeof t!=`object`||!t)return i(String(t),n);let a=null;for(let o of r){let r=e(t,o);if(r==null)continue;let s=Array.isArray(r)?r.map(String):[String(r)];for(let e of s){let t=i(e,n);if(t!==null&&(a===null||t<a)&&(a=t),a===0)return 0}}return a}function o(e,t,n){if(!t)return e;let r=[];for(let i of e){let e=a(i,t,n);e!==null&&r.push({item:i,score:e})}return r.sort((e,t)=>e.score-t.score),r.map(({item:e})=>e)}function s(e,t,n){return t?e.map(e=>{let r=[];for(let i of e){if(i==null)continue;if(n.isStructural?.(i)){r.push({item:i,score:-1});continue}let e=a(i,t,n.fields);e!==null&&r.push({item:i,score:e})}let i=0;for(let e=0;e<=r.length;e++)(e===r.length||r[e].score===-1)&&(r.splice(i,e-i,...r.slice(i,e).sort((e,t)=>e.score-t.score)),i=e+1);return r.map(({item:e})=>e)}).filter(e=>e.some(e=>!n.isStructural?.(e))):e}return{score:i,scoreItem:a,filter:o,filterGroups:s}}export{r as n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_n as e}from"./session-CzMvpLSp.js";function t(){let t=e()?.vnode?.scopeId;return t?{[t]:``}:{}}export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Hn as e,Xr as t,Xt as n,ot as r}from"./session-CzMvpLSp.js";var i={meta:``,ctrl:``,alt:``,win:`⊞`,command:`⌘`,shift:`⇧`,control:`⌃`,option:`⌥`,enter:`↵`,delete:`⌦`,backspace:`⌫`,escape:`Esc`,tab:`⇥`,capslock:`⇪`,arrowup:`↑`,arrowright:`→`,arrowdown:`↓`,arrowleft:`←`,pageup:`⇞`,pagedown:`⇟`,home:`↖`,end:`↘`},a=r(()=>{let r=n(()=>navigator&&navigator.userAgent&&navigator.userAgent.match(/Macintosh;/)),a=t({meta:` `,alt:` `,ctrl:` `});e(()=>{a.meta=r.value?i.command:`Ctrl`,a.ctrl=r.value?i.control:`Ctrl`,a.alt=r.value?i.option:`Alt`});function o(e){if(e)return[`meta`,`alt`,`ctrl`].includes(e)?a[e]:i[e]||e}return{macOS:r,getKbdKey:o}});export{a as t};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{$n as e,$r as t,$t as n,A as r,Ai as i,An as a,Ar as o,Bn as s,Br as c,Bt as l,Ci as u,Cn as d,Cr as f,Di as p,Dn as m,Dr as h,Ei as g,En as ee,Er as te,F as ne,Fi as re,Fn as _,Fr as ie,Ft as ae,Gn as oe,Gr as se,Gt as ce,Hn as le,Hr as ue,Ht as de,Ii as fe,In as pe,Ir as me,It as he,Jn as ge,Jr as _e,Jt as ve,Kn as ye,Kr as be,Kt as xe,Li as Se,Ln as Ce,Lr as we,Lt as Te,Mi as Ee,Mn as De,Mr as Oe,Ni as ke,Nn as Ae,Nr as je,Oi as v,On as Me,Or as Ne,P as Pe,Pi as Fe,Pn as Ie,Pr as Le,Q as Re,Qn as ze,Qr as y,Qt as b,Rn as Be,Rr as Ve,Rt as He,Si as Ue,Sn as We,Sr as x,Ti as Ge,Tn as Ke,Tr as qe,Tt as Je,Un as Ye,Ur as Xe,Ut as Ze,Vn as Qe,Vr as $e,Vt as et,Wn as tt,Wr as nt,Wt as rt,Xn as it,Xr as at,Xt as S,Yn as ot,Yr as st,Yt as ct,Zn as lt,Zr as ut,Zt as dt,_i as ft,_n as C,_r as pt,ai as mt,an as ht,ar as gt,bi as _t,bn as w,br as vt,ci as T,cn as yt,cr as bt,ct as E,di as D,dn as xt,dr as St,ei as Ct,en as wt,er as Tt,fi as Et,fn as Dt,fr as Ot,gi as kt,gn as At,gr as jt,hi as O,hn as Mt,hr as Nt,ii as Pt,in as Ft,ir as It,it as Lt,j as Rt,ji as zt,jn as Bt,jr as Vt,ki as Ht,kn as Ut,kr as Wt,li as Gt,ln as k,lr as Kt,mi as qt,mn as Jt,mr as Yt,ni as Xt,nn as Zt,nr as Qt,oi as A,on as $t,or as en,ot as tn,pi as j,pn as nn,pr as rn,qn as an,qr as on,qt as sn,ri as cn,rn as ln,rr as un,si as dn,sn as fn,sr as pn,ti as mn,tn as hn,tr as M,ui as gn,un as _n,ur as vn,ut as yn,vi as N,vn as bn,vr as xn,wi as P,wn as Sn,wr as Cn,xi as wn,xn as Tn,xr as En,yi as Dn,yn as On,yr as kn,zn as An,zr as jn,zt as Mn}from"./session-CzMvpLSp.js";import{f as Nn,g as Pn,m as F,p as Fn,v as In}from"./DashboardSidebarToggle-DiLFyMk8.js";var Ln=Object.defineProperty,Rn=(e,t)=>{let n={};for(var r in e)Ln(n,r,{get:e[r],enumerable:!0});return t||Ln(n,Symbol.toStringTag,{value:`Module`}),n},zn=void 0,Bn=typeof window<`u`&&window.trustedTypes;if(Bn)try{zn=Bn.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Vn=zn?e=>zn.createHTML(e):e=>e,Hn=`http://www.w3.org/2000/svg`,Un=`http://www.w3.org/1998/Math/MathML`,I=typeof document<`u`?document:null,Wn=I&&I.createElement(`template`),Gn={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?I.createElementNS(Hn,e):t===`mathml`?I.createElementNS(Un,e):n?I.createElement(e,{is:n}):I.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>I.createTextNode(e),createComment:e=>I.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>I.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{Wn.innerHTML=Vn(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=Wn.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},L=`transition`,R=`animation`,z=Symbol(`_vtc`),Kn={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},qn=j({},he,Kn),Jn=(e=>(e.displayName=`Transition`,e.props=qn,e))((e,{slots:t})=>w(ae,Xn(e),t)),B=(e,t=[])=>{N(e)?e.forEach(e=>e(...t)):e&&e(...t)},Yn=e=>e?N(e)?e.some(e=>e.length>1):e.length>1:!1;function Xn(e){let t={};for(let n in e)n in Kn||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=Zn(i),h=m&&m[0],g=m&&m[1],{onBeforeEnter:ee,onEnter:te,onEnterCancelled:ne,onLeave:re,onLeaveCancelled:_,onBeforeAppear:ie=ee,onAppear:ae=te,onAppearCancelled:oe=ne}=t,se=(e,t,n,r)=>{e._enterCancelled=r,H(e,t?u:s),H(e,t?l:o),n&&n()},ce=(e,t)=>{e._isLeaving=!1,H(e,d),H(e,p),H(e,f),t&&t()},le=e=>(t,n)=>{let i=e?ae:te,o=()=>se(t,e,n);B(i,[t,o]),$n(()=>{H(t,e?c:a),V(t,e?u:s),Yn(i)||tr(t,r,h,o)})};return j(t,{onBeforeEnter(e){B(ee,[e]),V(e,a),V(e,o)},onBeforeAppear(e){B(ie,[e]),V(e,c),V(e,l)},onEnter:le(!1),onAppear:le(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>ce(e,t);V(e,d),e._enterCancelled?(V(e,f),ar(e)):(ar(e),V(e,f)),$n(()=>{e._isLeaving&&(H(e,d),V(e,p),Yn(re)||tr(e,r,g,n))}),B(re,[e,n])},onEnterCancelled(e){se(e,!1,void 0,!0),B(ne,[e])},onAppearCancelled(e){se(e,!0,void 0,!0),B(oe,[e])},onLeaveCancelled(e){ce(e),B(_,[e])}})}function Zn(e){if(e==null)return null;if(wn(e))return[Qn(e.enter),Qn(e.leave)];{let t=Qn(e);return[t,t]}}function Qn(e){return Se(e)}function V(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[z]||(e[z]=new Set)).add(t)}function H(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[z];n&&(n.delete(t),n.size||(e[z]=void 0))}function $n(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var er=0;function tr(e,t,n,r){let i=e._endId=++er,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=nr(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},s+1),e.addEventListener(l,f)}function nr(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||``).split(`, `),i=r(`${L}Delay`),a=r(`${L}Duration`),o=rr(i,a),s=r(`${R}Delay`),c=r(`${R}Duration`),l=rr(s,c),u=null,d=0,f=0;t===L?o>0&&(u=L,d=o,f=a.length):t===R?l>0&&(u=R,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?L:R:null,f=u?u===L?a.length:c.length:0);let p=u===L&&/\b(?:transform|all)(?:,|$)/.test(r(`${L}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function rr(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>ir(t)+ir(e[n])))}function ir(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function ar(e){return(e?e.ownerDocument:document).body.offsetHeight}function or(e,t,n){let r=e[z];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var sr=Symbol(`_vod`),cr=Symbol(`_vsh`),lr={name:`show`,beforeMount(e,{value:t},{transition:n}){e[sr]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):U(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),U(e,!0),r.enter(e)):r.leave(e,()=>{U(e,!1)}):U(e,t))},beforeUnmount(e,{value:t}){U(e,t)}};function U(e,t){e.style.display=t?e[sr]:`none`,e[cr]=!t}function ur(){lr.getSSRProps=({value:e})=>{if(!e)return{style:{display:`none`}}}}var dr=Symbol(``);function fr(e){let t=C();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>mr(e,n))},r=()=>{let r=e(t.proxy);t.ce?mr(t.ce,r):pr(t.subTree,r),n(r)};An(()=>{ze(r)}),le(()=>{x(r,gn,{flush:`post`});let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),ye(()=>e.disconnect())})}function pr(e,t){if(e.shapeFlag&128){let n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{pr(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)mr(e.el,t);else if(e.type===l)e.children.forEach(e=>pr(e,t));else if(e.type===de){let{el:n,anchor:r}=e;for(;n&&(mr(n,t),n!==r);)n=n.nextSibling}}function mr(e,t){if(e.nodeType===1){let n=e.style,r=``;for(let e in t){let i=Ee(t[e]);n.setProperty(`--${e}`,i),r+=`--${e}: ${i};`}n[dr]=r}}var hr=/(?:^|;)\s*display\s*:/;function gr(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t){if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??W(r,t,``)}else for(let e in t)n[e]??W(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?W(r,i,``):xr(e,i,!g(t)&&t?t[i]:void 0,o)||W(r,i,o)}}else if(i){if(t!==n){let e=r[dr];e&&(n+=`;`+e),r.cssText=n,a=hr.test(n)}}else t&&e.removeAttribute(`style`);sr in e&&((!i||t!==n)&&(e[sr]=a?r.display:``),e[cr]&&(r.display=`none`))}var _r=/\s*!important$/;function W(e,t,n){if(N(n))n.forEach(n=>W(e,t,n));else if(n??=``,t.startsWith(`--`))_r.test(n)?e.setProperty(t,n.replace(_r,``),`important`):e.setProperty(t,n);else{let r=br(e,t);_r.test(n)?e.setProperty(O(r),n.replace(_r,``),`important`):e[r]=n}}var vr=[`Webkit`,`Moz`,`ms`],yr={};function br(e,t){let n=yr[t];if(n)return n;let r=D(t);if(r!==`filter`&&r in e)return yr[t]=r;r=Et(r);for(let n=0;n<vr.length;n++){let i=vr[n]+r;if(i in e)return yr[t]=i}return t}function xr(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&g(r)&&n===r}var Sr=`http://www.w3.org/1999/xlink`;function Cr(e,t,n,r,i,a=Ge(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Sr,t.slice(6,t.length)):e.setAttributeNS(Sr,t,n):n==null||a&&!kt(n)?e.removeAttribute(t):e.setAttribute(t,a?``:p(n)?String(n):n)}function wr(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Vn(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=kt(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function G(e,t,n,r){e.addEventListener(t,n,r)}function Tr(e,t,n,r){e.removeEventListener(t,n,r)}var Er=Symbol(`_vei`);function Dr(e,t,n,r,i=null){let a=e[Er]||(e[Er]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=Ar(t);r?G(e,n,a[t]=Pr(r,i),s):o&&(Tr(e,n,o,s),a[t]=void 0)}}var Or=/(Once|Passive|Capture)$/,kr=/^on:?(?:Once|Passive|Capture)$/;function Ar(e){let t,n;for(;(n=e.match(Or))&&!kr.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):O(e.slice(2)),t]}var jr=0,Mr=Promise.resolve(),Nr=()=>jr||=(Mr.then(()=>jr=0),Date.now());function Pr(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(N(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&sn(e,t,5,a)}}else sn(r,t,5,[e])};return n.value=e,n.attached=Nr(),n}var Fr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ir=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?or(e,r,o):t===`style`?gr(e,n,r):Ue(t)?_t(t)||Dr(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):Lr(e,t,r,o))?(wr(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Cr(e,t,r,o,a,t!==`value`)):e._isVueCE&&(Rr(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?wr(e,D(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Cr(e,t,r,o))};function Lr(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Fr(t)&&Dn(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Fr(t)&&g(n)?!1:t in e}function Rr(e,t){let n=e._def.props;if(!n)return!1;let r=D(t);return Array.isArray(n)?n.some(e=>D(e)===r):Object.keys(n).some(e=>D(e)===r)}var zr={};function Br(e,t,n){let r=k(e,t);u(r)&&(r=j({},r,t));class i extends Ur{constructor(e){super(r,e,n)}}return i.def=r,i}var Vr=((e,t)=>Br(e,t,Li)),Hr=typeof HTMLElement<`u`?HTMLElement:class{},Ur=class e extends Hr{constructor(e,t={},n=Ii){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==Ii?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(j({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{if(this._pendingResolve=void 0,this.isConnected)return this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,_(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return this._pendingResolve;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!N(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=Se(this._props[e])),(i||=Object.create(null))[D(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._connected&&this._mount(e)},t=this._def.__asyncLoader;if(t)return this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}),this._pendingResolve;e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)qt(this,e)||Object.defineProperty(this,e,{get:()=>T(t[e])})}_resolveProps(e){let{props:t}=e,n=N(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(D))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):zr,r=D(e);t&&this._numberProps&&this._numberProps[r]&&(n=Se(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===zr?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(O(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(O(e),t+``):t||this.removeAttribute(O(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),Pi(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=fn(this._def,j(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,u(t[0])?j({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),O(e)!==e&&t(O(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if(!(n instanceof HTMLStyleElement))return n}return null}_parseSlots(){let e=this._slots={},t;for(;t=this.firstChild;){let n=t.nodeType===1&&t.getAttribute(`slot`)||`default`;(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){let e=this._getSlots(),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let r=e[n],i=r.getAttribute(`name`)||`default`,a=this._slots[i],o=r.parentNode;if(a)for(let e of a){if(t&&e.nodeType===1){let n=t+`-s`,r=document.createTreeWalker(e,1);e.setAttribute(n,``);let i;for(;i=r.nextNode();)i.setAttribute(n,``)}o.insertBefore(e,r)}else for(;r.firstChild;)o.insertBefore(r.firstChild,r);o.removeChild(r)}}_getSlots(){let e=[this];this._teleportTargets&&e.push(...this._teleportTargets);let t=new Set;for(let n of e){let e=n.querySelectorAll(`slot`);for(let n=0;n<e.length;n++)t.add(e[n])}return Array.from(t)}_injectChildStyle(e,t){this._applyStyles(e.styles,e,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(e){}};function Wr(e){let t=C();return t&&t.ce||null}function Gr(){let e=Wr();return e&&e.shadowRoot}function Kr(e=`$style`){{let t=C();if(!t)return Gt;let n=t.type.__cssModules;return n&&n[e]||Gt}}var qr=new WeakMap,Jr=new WeakMap,Yr=Symbol(`_moveCb`),Xr=Symbol(`_enterCb`),Zr=new WeakMap,Qr=(e=>(delete e.props.mode,e))({name:`TransitionGroup`,props:j({},qn,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=C(),r=kn(),i,a,o,s,c=()=>(s===void 0&&(s=i.length>0&&si(i[0].el,n.vnode.el,ei(e))),s);return an(()=>{if(Zr.delete(n),!c()){i=[],o=void 0;return}let t=ei(e);i.forEach($r);let r=o&&oi(o,n.vnode.el);o=void 0,i.forEach(e=>ti(e,r));let a=i.filter(ni);ar(n.vnode.el),a.forEach(e=>{let n=e.el,r=n.style;V(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[Yr]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[Yr]=null,H(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let u=cn(e),d=Xn(u),f=u.tag||l;if(i=[],s=void 0,a)for(let e=0;e<a.length;e++){let t=a[e];t.el&&t.el instanceof Element&&!t.el[cr]&&(i.push(t),bt(t,gt(t,d,r,n)),qr.set(t,ri(t.el)))}a=t.default?bn(t.default()):[];for(let e=0;e<a.length;e++){let t=a[e];t.key!=null&&bt(t,gt(t,d,r,n))}return i.length&&(o=ii(n),Zr.set(n,c)),fn(f,null,a)}}});function $r(e){let t=e.el;t[Yr]&&t[Yr](),t[Xr]&&t[Xr]()}function ei(e){return e.moveClass||`${e.name||`v`}-move`}function ti(e,t){Jr.set(e,ri(e.el,t))}function ni(e){let t=qr.get(e),n=Jr.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){let t=e.el,n=t.style,a=t.getBoundingClientRect(),o=1,s=1;return t.offsetWidth&&(o=a.width/t.offsetWidth),t.offsetHeight&&(s=a.height/t.offsetHeight),(!Number.isFinite(o)||o===0)&&(o=1),(!Number.isFinite(s)||s===0)&&(s=1),Math.abs(o-1)<.01&&(o=1),Math.abs(s-1)<.01&&(s=1),n.transform=n.webkitTransform=`translate(${r/o}px,${i/s}px)`,n.transitionDuration=`0s`,e}}function ri(e,t){let n=e.getBoundingClientRect();return{left:n.left-(t?t.left:0),top:n.top-(t?t.top:0)}}function ii(e){let t;for(let n=e.parent;n;n=n.parent){let r=Zr.get(n);if(r){let i=ai(n.vnode.el,e.vnode.el);i&&(t||=[]).push(j(ri(i),{item:i,willMove:r}))}}return t}function ai(e,t){let n=e.nodeType===1?e:e.parentNode;for(;t&&t.parentNode!==n;)t=t.parentNode;if(t&&t.nodeType===1)return t}function oi(e,t){let n=e.find(e=>e.willMove()&&e.item.contains(t));return n&&ri(n.item,n)}function si(e,t,n){let r=e.cloneNode(),i=e[z];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=nr(r);return a.removeChild(r),o}var K=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return N(t)?e=>ft(t,e):t};function ci(e){e.target.composing=!0}function li(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var q=Symbol(`_assign`),ui=Symbol(`_initialValue`);function di(e,t,n){return t&&(e=e.trim()),n&&(e=i(e)),e}var fi={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[ui]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[ui]=e.defaultValue.replace(/\r\n?/g,`
|
|
2
|
+
`))),e[q]=K(i);let a=r||i.props&&i.props.type===`number`;G(e,t?`change`:`input`,t=>{t.target.composing||e[q](di(e.value,n,a))}),(n||a)&&G(e,`change`,()=>{e.value=di(e.value,n,a)}),t||(G(e,`compositionstart`,ci),G(e,`compositionend`,li),G(e,`change`,li))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[ui];delete e[ui],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[q](di(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:a,number:o}},s){if(e[q]=K(s),e.composing)return;let c=(o||e.type===`number`)&&!/^0\d/.test(e.value)?i(e.value):e.value,l=t??``;if(c===l)return;let u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!==`range`&&(r&&t===n||a&&e.value.trim()===l)||(e.value=l)}},pi={deep:!0,created(e,t,n){e[q]=K(n),G(e,`change`,()=>{let t=e._modelValue,n=J(e),r=e.checked,i=e[q];if(N(t)){let e=Ht(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(P(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(yi(e,r))})},mounted:mi,beforeUpdate(e,t,n){e[q]=K(n),mi(e,t,n)}};function mi(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(N(t))i=Ht(t,r.props.value)>-1;else if(P(t))i=t.has(r.props.value);else{if(t===n)return;i=v(t,yi(e,!0))}e.checked!==i&&(e.checked=i)}var hi={created(e,{value:t},n){e.checked=v(t,n.props.value),e[q]=K(n),G(e,`change`,()=>{e[q](J(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[q]=K(r),t!==n&&(e.checked=v(t,r.props.value))}},gi={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,G(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?i(J(e)):J(e)),r=e.multiple,a=r?P(e._modelValue)?new Set(t):t:t[0],o=e._pendingValue=[r,r?N(a)?t.slice():t:a];try{e[q](a)}finally{_(()=>{e._pendingValue===o&&(e._pendingValue=void 0)})}}),e[q]=K(r)},mounted(e,{value:t}){vi(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[q]=K(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!_i(t,n[1],n[0]))&&vi(e,t)}};function _i(e,t,n){if(!n||N(e))return v(e,t);if(P(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function vi(e,t){let n=e.multiple,r=N(t);if(!n||r||P(t)){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=J(a);if(n){if(r){let e=typeof o;a.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(o)):Ht(t,o)>-1}else a.selected=t.has(o)}else if(v(J(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function J(e){return`_value`in e?e._value:e.value}function yi(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var bi={created(e,t,n){Si(e,t,n,null,`created`)},mounted(e,t,n){Si(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){Si(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){Si(e,t,n,r,`updated`)}};function xi(e,t){switch(e){case`SELECT`:return gi;case`TEXTAREA`:return fi;default:switch(t){case`checkbox`:return pi;case`radio`:return hi;default:return fi}}}function Si(e,t,n,r,i){let a=xi(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function Ci(){fi.getSSRProps=({value:e})=>({value:e}),hi.getSSRProps=({value:e},t)=>{if(t.props&&v(t.props.value,e))return{checked:!0}},pi.getSSRProps=({value:e},t)=>{if(N(e)){if(t.props&&Ht(e,t.props.value)>-1)return{checked:!0}}else if(P(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},bi.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=xi(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var wi=[`ctrl`,`shift`,`alt`,`meta`],Ti={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>wi.some(n=>e[`${n}Key`]&&!t.includes(n))},Ei=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=Ti[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},Di={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},Oi=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=O(n.key);if(t.some(e=>e===r||Di[e]===r))return e(n)}))},ki=j({patchProp:Ir},Gn),Ai,ji=!1;function Mi(){return Ai||=ln(ki)}function Ni(){return Ai=ji?Ai:hn(ki),ji=!0,Ai}var Pi=((...e)=>{Mi().render(...e)}),Fi=((...e)=>{Ni().hydrate(...e)}),Ii=((...e)=>{let t=Mi().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=zi(e);if(!r)return;let i=t._component;!Dn(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Ri(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t}),Li=((...e)=>{let t=Ni().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=zi(e);if(t)return n(t,!0,Ri(t))},t});function Ri(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function zi(e){return g(e)?document.querySelector(e):e}var Bi=!1,Vi=()=>{Bi||(Bi=!0,Ci(),ur())},Hi=Rn({BaseTransition:()=>ae,BaseTransitionPropsValidators:()=>he,Comment:()=>Te,DeprecationTypes:()=>null,EffectScope:()=>Oe,ErrorCodes:()=>He,ErrorTypeStrings:()=>Mn,Fragment:()=>l,KeepAlive:()=>et,ReactiveEffect:()=>je,Static:()=>de,Suspense:()=>Ze,Teleport:()=>rt,Text:()=>ce,TrackOpTypes:()=>Le,Transition:()=>Jn,TransitionGroup:()=>Qr,TriggerOpTypes:()=>ie,VueElement:()=>Ur,assertNumber:()=>xe,callWithAsyncErrorHandling:()=>sn,callWithErrorHandling:()=>ve,camelize:()=>D,capitalize:()=>Et,cloneVNode:()=>ct,compatUtils:()=>null,compile:()=>Ui,computed:()=>S,createApp:()=>Ii,createBlock:()=>b,createCommentVNode:()=>n,createElementBlock:()=>wt,createElementVNode:()=>dt,createHydrationRenderer:()=>hn,createPropsRestProxy:()=>Zt,createRenderer:()=>ln,createSSRApp:()=>Li,createSlots:()=>Ft,createStaticVNode:()=>ht,createTextVNode:()=>$t,createVNode:()=>fn,customRef:()=>me,defineAsyncComponent:()=>yt,defineComponent:()=>k,defineCustomElement:()=>Br,defineEmits:()=>_n,defineExpose:()=>xt,defineModel:()=>Dt,defineOptions:()=>nn,defineProps:()=>Jt,defineSSRCustomElement:()=>Vr,defineSlots:()=>Mt,devtools:()=>At,effect:()=>we,effectScope:()=>Ve,getCurrentInstance:()=>C,getCurrentScope:()=>jn,getCurrentWatcher:()=>c,getTransitionRawChildren:()=>bn,guardReactiveProps:()=>On,h:()=>w,handleError:()=>Tn,hasInjectionContext:()=>We,hydrate:()=>Fi,hydrateOnIdle:()=>d,hydrateOnInteraction:()=>Sn,hydrateOnMediaQuery:()=>Ke,hydrateOnVisible:()=>ee,initCustomFormatter:()=>m,initDirectivesForSSR:()=>Vi,inject:()=>Me,isMemoSame:()=>Ut,isProxy:()=>$e,isReactive:()=>ue,isReadonly:()=>Xe,isRef:()=>nt,isRuntimeOnly:()=>a,isShallow:()=>se,isVNode:()=>Bt,markRaw:()=>be,mergeDefaults:()=>De,mergeModels:()=>Ae,mergeProps:()=>Ie,nextTick:()=>_,nodeOps:()=>Gn,normalizeClass:()=>zt,normalizeProps:()=>ke,normalizeStyle:()=>Fe,onActivated:()=>pe,onBeforeMount:()=>Ce,onBeforeUnmount:()=>Be,onBeforeUpdate:()=>An,onDeactivated:()=>s,onErrorCaptured:()=>Qe,onMounted:()=>le,onRenderTracked:()=>Ye,onRenderTriggered:()=>tt,onScopeDispose:()=>on,onServerPrefetch:()=>oe,onUnmounted:()=>ye,onUpdated:()=>an,onWatcherCleanup:()=>_e,openBlock:()=>ge,patchProp:()=>Ir,popScopeId:()=>ot,provide:()=>it,proxyRefs:()=>st,pushScopeId:()=>lt,queuePostFlushCb:()=>ze,reactive:()=>at,readonly:()=>ut,ref:()=>y,registerRuntimeCompiler:()=>e,render:()=>Pi,renderList:()=>Tt,renderSlot:()=>M,resolveComponent:()=>Qt,resolveDirective:()=>un,resolveDynamicComponent:()=>It,resolveFilter:()=>null,resolveTransitionHooks:()=>gt,setBlockTracking:()=>en,setDevtoolsHook:()=>pn,setTransitionHooks:()=>bt,shallowReactive:()=>t,shallowReadonly:()=>Ct,shallowRef:()=>mn,ssrContextKey:()=>Kt,ssrUtils:()=>vn,stop:()=>Xt,toDisplayString:()=>re,toHandlerKey:()=>fe,toHandlers:()=>St,toRaw:()=>cn,toRef:()=>Pt,toRefs:()=>mt,toValue:()=>A,transformVNodeArgs:()=>Ot,triggerRef:()=>dn,unref:()=>T,useAttrs:()=>rn,useCssModule:()=>Kr,useCssVars:()=>fr,useHost:()=>Wr,useId:()=>Yt,useModel:()=>Nt,useSSRContext:()=>jt,useShadowRoot:()=>Gr,useSlots:()=>pt,useTemplateRef:()=>xn,useTransitionState:()=>kn,vModelCheckbox:()=>pi,vModelDynamic:()=>bi,vModelRadio:()=>hi,vModelSelect:()=>gi,vModelText:()=>fi,vShow:()=>lr,version:()=>vt,warn:()=>En,watch:()=>x,watchEffect:()=>f,watchPostEffect:()=>Cn,watchSyncEffect:()=>qe,withAsyncContext:()=>te,withCtx:()=>h,withDefaults:()=>Ne,withDirectives:()=>Wt,withKeys:()=>Oi,withMemo:()=>o,withModifiers:()=>Ei,withScopeId:()=>Vt}),Ui=()=>{};function Y(){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 Wi(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 Gi(e){return e==null}var[X,Ki]=ne(`ConfigProvider`),qi=k({inheritAttrs:!1,__name:`ConfigProvider`,props:{dir:{type:String,required:!1,default:`ltr`},locale:{type:String,required:!1,default:`en`},scrollBody:{type:[Boolean,Object],required:!1,default:!0},nonce:{type:String,required:!1,default:void 0},teleportTo:{type:null,required:!1,default:void 0},useId:{type:Function,required:!1,default:void 0}},setup(e){let t=e,{dir:n,locale:r,scrollBody:i,nonce:a,teleportTo:o}=mt(t);return Ki({dir:n,locale:r,scrollBody:i,nonce:a,teleportTo:o,useId:t.useId}),(e,t)=>M(e.$slots,`default`)}}),Z=at({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),Ji=tn(()=>{let e=y(new Map),t=y(),n=S(()=>{for(let t of e.value.values())if(t)return!0;return!1}),r=X({scrollBody:y(!0)}),i=null,a=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,Z.layersWithOutsidePointerEventsDisabled.size===0&&(document.body.style.pointerEvents=``),document.documentElement.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,yn&&i?.(),t.value=void 0};return x(n,(e,o)=>{if(!E)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`?Re({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`),yn&&(i=Pn(document,`touchmove`,e=>Zi(e),{passive:!1})),_(()=>{n.value&&(document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`)})},{immediate:!0,flush:`sync`}),e});function Yi(e){let t=Math.random().toString(36).substring(2,7),n=Ji();n.value.set(t,e??!1);let r=S({get:()=>n.value.get(t)??!1,set:e=>n.value.set(t,e)});return Je(()=>{n.value.delete(t)}),r}function Xi(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:Xi(t)}}function Zi(e){let t=e||window.event,n=t.target;return n instanceof Element&&Xi(n)?!1:t.touches.length>1||(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Qi(e){let t=X({dir:y(`ltr`)});return S(()=>e?.value||t.dir?.value||`ltr`)}function $i(e){return S(()=>!A(e)||!!F(e)?.closest(`form`))}function ea(){let e=C(),t=y(),n=S(()=>r());an(()=>{n.value!==r()&&dn(t)});function r(){return t.value&&`$el`in t.value&&[`#text`,`#comment`].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:F(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}}var ta=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Q=new WeakMap,na=new WeakMap,ra={},ia=0,aa=function(e){return e&&(e.host||aa(e.parentNode))},oa=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=aa(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})},sa=function(e,t,n,r){var i=oa(t,Array.isArray(e)?e:[e]);ra[n]||(ra[n]=new WeakMap);var a=ra[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=(Q.get(e)||0)+1,l=(a.get(e)||0)+1;Q.set(e,c),a.set(e,l),o.push(e),c===1&&i&&na.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(),ia++,function(){o.forEach(function(e){var t=Q.get(e)-1,i=a.get(e)-1;Q.set(e,t),a.set(e,i),t||(na.has(e)||e.removeAttribute(r),na.delete(e)),i||e.removeAttribute(n)}),ia--,ia||(Q=new WeakMap,Q=new WeakMap,na=new WeakMap,ra={})}},ca=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||ta(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),sa(r,i,n,`aria-hidden`)):function(){return null}};function la(e){let t;x(()=>F(e),e=>{let n=!1;try{n=!!e?.closest(`[popover]:not(:popover-open)`)}catch{}e&&!n?t=ca(e):t&&t()}),ye(()=>{t&&t()})}var ua=0;function da(e,t=`reka`){if(e)return e;let n,r=X({useId:void 0});return n=r.useId?r.useId():`useId`in Hi?Yt?.():`${++ua}`,t?`${t}-${n}`:n}function fa(e,t){let n=y(e);function r(e){return t[n.value][e]??n.value}return{state:n,dispatch:e=>{n.value=r(e)}}}function pa(e,t){let n=y({}),r=y(`none`),i=y(e),a=e.value?`mounted`:`unmounted`,o,s=t.value?.ownerDocument.defaultView??Nn,{state:c,dispatch:l}=fa(a,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),u=e=>{if(E){let n=new CustomEvent(e,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(n)}};x(e,async(e,i)=>{let a=i!==e;if(await _(),a){let a=r.value,o=ma(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=>{if(e.target!==t.value)return;let n=ma(t.value),r=n.includes(CSS.escape(e.animationName)),a=c.value===`mounted`?`enter`:`leave`;if(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)})}n===`none`&&l(`ANIMATION_END`)},f=e=>{e.target===t.value&&(r.value=ma(t.value))},p=x(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=x(c,()=>{let e=ma(t.value);r.value=c.value===`mounted`?e:`none`});return ye(()=>{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:S(()=>[`mounted`,`unmountSuspended`].includes(c.value))}}function ma(e){return e&&getComputedStyle(e).animationName||`none`}var ha=k({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){let{present:r,forceMount:i}=mt(e),a=y(),{isPresent:o}=pa(r,a);n({present:o});let s=t.default({present:o.value});s=Pe(s||[]);let c=C();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(`
|
|
3
|
+
`)].join(`
|
|
4
|
+
`))}return()=>i.value||r.value||o.value?w(t.default({present:o.value})[0],{ref:e=>{let t=F(e);return t?.hasAttribute===void 0||(t?.hasAttribute(`data-reka-popper-content-wrapper`)?a.value=t.firstElementChild:a.value=t),t}}):null}});function ga(){let e=y();return{primitiveElement:e,currentElement:S(()=>[`#text`,`#comment`].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:F(e))}}var _a=`dismissableLayer.pointerDownOutside`,va=`dismissableLayer.focusOutside`;function ya(e,t){if(!(t instanceof Element))return!1;if(e.contains(t))return!0;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 ba(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=y(!1),a=y(()=>{});return f(o=>{if(!E||!A(n))return;let s=async n=>{let o=n.target;if(t?.value&&o){if(ya(t.value,o)){r.removeEventListener(`click`,a.value),i.value=!1;return}if(n.target&&!i.value){let t={originalEvent:n};function i(){Wi(_a,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:()=>{A(n)&&(i.value=!0)}}}function xa(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=y(!1);return f(a=>{if(!E||!A(n))return;let o=async n=>{if(!t?.value)return;await _(),await _();let r=n.target;t.value&&r&&!ya(t.value,r)&&n.target&&!i.value&&Wi(va,e,{originalEvent:n})};r.addEventListener(`focusin`,o),a(()=>r.removeEventListener(`focusin`,o))}),{onFocusCapture:()=>{A(n)&&(i.value=!0)},onBlurCapture:()=>{A(n)&&(i.value=!1)}}}var Sa=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,i=t,{forwardRef:a,currentElement:o}=ea(),s=S(()=>o.value?.ownerDocument??globalThis.document),c=S(()=>Z.layersRoot),l=S(()=>o.value?Array.from(c.value).indexOf(o.value):-1),u=S(()=>Z.layersWithOutsidePointerEventsDisabled.size>0),d=S(()=>{let e=Array.from(c.value),[t]=[...Z.layersWithOutsidePointerEventsDisabled].slice(-1),n=e.indexOf(t);return l.value>=n}),p=ba(async e=>{let t=[...Z.branches].some(t=>t?.contains(e.target));n.present&&d.value&&!t&&(i(`pointerDownOutside`,e),i(`interactOutside`,e),await _(),e.defaultPrevented||i(`dismiss`))},o,()=>n.present),m=xa(e=>{let t=[...Z.branches].some(t=>t?.contains(e.target));n.present&&!t&&(i(`focusOutside`,e),i(`interactOutside`,e),e.defaultPrevented||i(`dismiss`))},o);return Fn(`Escape`,e=>{n.present&&l.value===c.value.size-1&&(i(`escapeKeyDown`,e),e.defaultPrevented||i(`dismiss`))}),x([o,()=>n.disableOutsidePointerEvents,()=>n.present],([e,t,n],r,i)=>{e&&n&&t&&(Z.layersWithOutsidePointerEventsDisabled.size===0&&(Z.originalBodyPointerEvents=s.value.body.style.pointerEvents,s.value.body.style.pointerEvents=`none`),Z.layersWithOutsidePointerEventsDisabled.add(e),i(()=>{Z.layersWithOutsidePointerEventsDisabled.delete(e),Z.layersWithOutsidePointerEventsDisabled.size===0&&!Gi(Z.originalBodyPointerEvents)&&(s.value.body.style.pointerEvents=Z.originalBodyPointerEvents)}))},{immediate:!0}),x([o,()=>n.present],([e,t],n,r)=>{e&&t&&(c.value.add(e),r(()=>{c.value.delete(e)}))},{immediate:!0}),f(e=>{e(()=>{o.value&&(c.value.delete(o.value),Z.layersWithOutsidePointerEventsDisabled.delete(o.value))})}),(e,t)=>(ge(),b(T(r),{ref:T(a),"as-child":e.asChild,as:e.as,"data-dismissable-layer":``,style:Fe({pointerEvents:u.value?d.value?`auto`:`none`:void 0}),onFocusCapture:T(m).onFocusCapture,onBlurCapture:T(m).onBlurCapture,onPointerdownCapture:T(p).onPointerDownCapture},{default:h(()=>[M(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`style`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),Ca=Lt(()=>y([]));function wa(){let e=Ca();return{add(t){let n=e.value[0];t!==n&&n?.pause(),e.value=Ta(e.value,t),e.value.unshift(t)},remove(t){e.value=Ta(e.value,t),e.value[0]?.resume()}}}function Ta(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}var Ea=`focusScope.autoFocusOnMount`,Da=`focusScope.autoFocusOnUnmount`,Oa={bubbles:!1,cancelable:!0};function ka(e,{select:t=!1}={}){let n=Y();for(let r of e)if($(r,{select:t}),Y()!==n)return!0}function Aa(e){let t=ja(e);return[Ma(t,e),Ma(t.reverse(),e)]}function ja(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 Ma(e,t){for(let n of e)if(!Na(n,{upTo:t}))return n}function Na(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 Pa(e){return e instanceof HTMLInputElement&&`select`in e}function $(e,{select:t=!1}={}){if(e&&e.focus){let n=Y();e.focus({preventScroll:!0}),e!==n&&Pa(e)&&t&&e.select()}}var Fa=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,i=t,{currentRef:a,currentElement:o}=ea(),s=y(null),c=wa(),l=at({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});f(e=>{if(!E)return;let t=o.value;if(!n.trapped)return;function r(e){if(l.paused||!t)return;let n=e.target;t.contains(n)?s.value=n:$(s.value,{select:!0})}function i(e){if(l.paused||!t)return;let n=e.relatedTarget;n!==null&&(t.contains(n)||$(s.value,{select:!0}))}function a(e){let n=s.value;if(n===null||!e.some(e=>e.removedNodes.length>0))return;let r=Y();r&&t.contains(r)||t.contains(n)||$(t)}document.addEventListener(`focusin`,r),document.addEventListener(`focusout`,i);let c=new MutationObserver(a);t&&c.observe(t,{childList:!0,subtree:!0}),e(()=>{document.removeEventListener(`focusin`,r),document.removeEventListener(`focusout`,i),c.disconnect()})});function u(e,t){let n=new CustomEvent(Ea,Oa),r=e=>i(`mountAutoFocus`,e);e.addEventListener(Ea,r),e.dispatchEvent(n),e.removeEventListener(Ea,r),n.defaultPrevented||(ka(ja(e),{select:!0}),Y()===t&&$(e))}f(async e=>{let t=o.value;if(await _(),!t)return;n.present!==!1&&c.add(l);let r=Y();!t.contains(r)&&n.present!==!1&&u(t,r),e(()=>{let e=new CustomEvent(Da,Oa),n=e=>{i(`unmountAutoFocus`,e)};t.addEventListener(Da,n),t.dispatchEvent(e),t.setAttribute(`data-focus-scope-unmounting`,``),setTimeout(()=>{e.defaultPrevented||$(r??document.body,{select:!0}),t.removeEventListener(Da,n),c.remove(l),t.removeAttribute(`data-focus-scope-unmounting`)},0)})}),x(()=>n.present,async(e,t)=>{if(!E)return;if(e===!1&&t===!0){c.remove(l);return}if(e!==!0||t!==!1)return;c.add(l),await _();let n=o.value;if(!n)return;let r=Y();n.contains(r)||u(n,r)});function d(e){if(!n.loop&&!n.trapped||l.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=Y();if(t&&r){let t=e.currentTarget,[i,a]=Aa(t);i&&a?!e.shiftKey&&r===a?(e.preventDefault(),n.loop&&$(i,{select:!0})):e.shiftKey&&r===i&&(e.preventDefault(),n.loop&&$(a,{select:!0})):r===t&&e.preventDefault()}}return(e,t)=>(ge(),b(T(r),{ref_key:`currentRef`,ref:a,tabindex:`-1`,"as-child":e.asChild,as:e.as,onKeydown:d},{default:h(()=>[M(e.$slots,`default`)]),_:3},8,[`as-child`,`as`]))}}),Ia=`menu.itemSelect`,La=[`Enter`,` `],Ra=[`ArrowDown`,`PageUp`,`Home`],za=[`ArrowUp`,`PageDown`,`End`],Ba=[...Ra,...za],Va={ltr:[...La,`ArrowRight`],rtl:[...La,`ArrowLeft`]},Ha={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]};function Ua(e){return e?`open`:`closed`}function Wa(e){return e===`indeterminate`}function Ga(e){return Wa(e)?`indeterminate`:e?`checked`:`unchecked`}function Ka(e){let t=Y();for(let n of e)if(n===t||(n.focus(),Y()!==t))return}function qa(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 Ja(e,t){return t?qa({x:e.clientX,y:e.clientY},t):!1}function Ya(e){return e.pointerType===`mouse`}var Xa=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,r=X({}),i=S(()=>t.to??r.teleportTo?.value??`body`),a=In();return(e,t)=>T(a)||e.forceMount?(ge(),b(rt,{key:0,to:i.value,disabled:e.disabled,defer:e.defer},[M(e.$slots,`default`)],8,[`to`,`disabled`,`defer`])):n(`v-if`,!0)}}),Za=`data-reka-collection-item`;function Qa(e={}){let{key:t=``,isProvider:n=!1}=e,r=`${t}CollectionProvider`,i;if(n){let e=y(new Map);i={collectionRef:y(),itemMap:e},it(r,i)}else i=Me(r);let a=(e,t=!1)=>{if(!i.collectionRef.value)return;let n=i.itemMap.value.get(e);return n&&(t||n.ref.dataset.disabled!==``)?n:void 0},o=(e=!1)=>{let t=i.collectionRef.value;if(!t)return[];let n=Array.from(t.querySelectorAll(`[${Za}]`)),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!==``)},s=k({name:`CollectionSlot`,inheritAttrs:!1,setup(e,{slots:t,attrs:n}){let{primitiveElement:r,currentElement:a}=ga();return x(a,()=>{i.collectionRef.value=a.value}),()=>w(Rt,{ref:r,...n},t)}}),c=k({name:`CollectionItem`,inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(e,{slots:t,attrs:n}){let{primitiveElement:r,currentElement:a}=ga();return f(t=>{if(a.value){let n=be(a.value);i.itemMap.value.set(n,{ref:a.value,value:e.value}),t(()=>i.itemMap.value.delete(n))}}),()=>w(Rt,{...n,[Za]:``,ref:r},t)}});return{getItems:o,getItem:a,reactiveItems:S(()=>Array.from(i.itemMap.value.values())),itemMapSize:S(()=>i.itemMap.value.size),CollectionSlot:s,CollectionItem:c}}var $a=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)=>(ge(),b(T(r),{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:h(()=>[M(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}}),eo=Symbol(`nuxt-ui.portal-target`);function to(e){let t=Me(eo,void 0),n=S(()=>e.value===!0?t?.value:e.value),r=S(()=>typeof n.value==`boolean`&&!n.value),i=S(()=>typeof n.value==`boolean`?`body`:n.value);return S(()=>({to:i.value,disabled:r.value}))}export{Z as A,ha as C,$i as D,ea as E,Y as F,Ii as I,lr as L,X as M,Gi as N,Qi as O,Wi as P,Oi as R,ga as S,la as T,Ja as _,Xa as a,ja as b,za as c,Va as d,Ka as f,Ya as g,Wa as h,Qa as i,qi as j,Yi as k,La as l,Ua as m,to as n,Ba as o,Ga as p,$a as r,Ia as s,eo as t,Ha as u,Fa as v,da as w,Sa as x,ka as y,Ei as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as e}from"./usePortal-C0d2q6c8.js";var t=`rovingFocusGroup.onEntryFocus`,n={bubbles:!1,cancelable:!0},r={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function i(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function a(e,t,n){let a=i(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(a))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(a)))return r[a]}function o(t,n=!1){let r=e();for(let i of t)if(i===r||(i.focus({preventScroll:n}),e()!==r))return}function s(e,t){return e.map((n,r)=>e[(t+r)%e.length])}export{a,o as i,n,s as o,r,t};
|
|
@@ -4,11 +4,16 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<title>Hollware</title>
|
|
7
|
-
<script type="module" crossorigin src="/admin/assets/index-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="/admin/assets/session-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/admin/assets/
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/admin/assets/
|
|
11
|
-
<link rel="
|
|
7
|
+
<script type="module" crossorigin src="/admin/assets/index-BFUeS7ic.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="/admin/assets/session-CzMvpLSp.js">
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/admin/assets/DashboardSidebarToggle-DiLFyMk8.js">
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/admin/assets/usePortal-C0d2q6c8.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/admin/assets/useKbd-CEpT28wF.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/admin/assets/useComposing-ELkCVDQg.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/admin/assets/useFilter-CbKhrFc4.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/admin/assets/PopperArrow-BS1pa-ZI.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/admin/assets/utils-C5Ac3kcY.js">
|
|
16
|
+
<link rel="stylesheet" crossorigin href="/admin/assets/index-CsZc4d_V.css">
|
|
12
17
|
</head>
|
|
13
18
|
<body>
|
|
14
19
|
<div id="app"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hollware/admin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "The Hollware admin, prebuilt for the user's Worker.",
|
|
5
5
|
"homepage": "https://hollware.com",
|
|
6
6
|
"bugs": {
|
|
@@ -38,12 +38,13 @@
|
|
|
38
38
|
"@comark/vue": "0.7.0",
|
|
39
39
|
"@fontsource-variable/inter": "5.3.0",
|
|
40
40
|
"@fontsource-variable/jetbrains-mono": "5.3.0",
|
|
41
|
-
"@hollware/core": "0.
|
|
41
|
+
"@hollware/core": "0.9.1",
|
|
42
42
|
"@iconify-json/lucide": "1.2.143",
|
|
43
43
|
"@iconify/utils": "3.1.7",
|
|
44
44
|
"@iconify/vue": "5.0.3",
|
|
45
45
|
"@lezer/highlight": "1.2.5",
|
|
46
46
|
"@nuxt/ui": "4.11.3",
|
|
47
|
+
"@tanstack/vue-table": "8.21.3",
|
|
47
48
|
"@types/node": "24.19.2",
|
|
48
49
|
"@vitejs/plugin-vue": "6.0.10",
|
|
49
50
|
"codemirror": "6.0.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ar as e,D as t,Er as n,F as r,G as i,J as a,K as o,Sn as s,Ut as c,Xt as l,Y as u,Yt as d,d as f,f as p,fn as m,kt as h,l as g,q as _,rr as v,s as y,tt as b,u as x}from"./session-D_7iusJi.js";import{t as S}from"./Button-gYrKAAPg.js";import{T as C}from"./index-Bw9PriKb.js";var w={slots:{root:`relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5`,wrapper:`min-w-0 flex-1 flex flex-col`,title:`text-sm font-medium`,description:`text-sm opacity-90`,icon:`shrink-0 size-5`,avatar:`shrink-0`,avatarSize:`2xl`,actions:`flex flex-wrap gap-1.5 shrink-0`,close:`p-0`},variants:{color:{primary:``,secondary:``,success:``,info:``,warning:``,error:``,neutral:``},variant:{solid:``,outline:``,soft:``,subtle:``},orientation:{horizontal:{root:`items-center`,actions:`items-center`},vertical:{root:`items-start`,actions:`items-start mt-2.5`}},title:{true:{description:`mt-1`}}},compoundVariants:[{color:`primary`,variant:`solid`,class:{root:`bg-primary text-inverted`}},{color:`secondary`,variant:`solid`,class:{root:`bg-secondary text-inverted`}},{color:`success`,variant:`solid`,class:{root:`bg-success text-inverted`}},{color:`info`,variant:`solid`,class:{root:`bg-info text-inverted`}},{color:`warning`,variant:`solid`,class:{root:`bg-warning text-inverted`}},{color:`error`,variant:`solid`,class:{root:`bg-error text-inverted`}},{color:`primary`,variant:`outline`,class:{root:`text-primary ring ring-inset ring-primary/25`}},{color:`secondary`,variant:`outline`,class:{root:`text-secondary ring ring-inset ring-secondary/25`}},{color:`success`,variant:`outline`,class:{root:`text-success ring ring-inset ring-success/25`}},{color:`info`,variant:`outline`,class:{root:`text-info ring ring-inset ring-info/25`}},{color:`warning`,variant:`outline`,class:{root:`text-warning ring ring-inset ring-warning/25`}},{color:`error`,variant:`outline`,class:{root:`text-error ring ring-inset ring-error/25`}},{color:`primary`,variant:`soft`,class:{root:`bg-primary/10 text-primary`}},{color:`secondary`,variant:`soft`,class:{root:`bg-secondary/10 text-secondary`}},{color:`success`,variant:`soft`,class:{root:`bg-success/10 text-success`}},{color:`info`,variant:`soft`,class:{root:`bg-info/10 text-info`}},{color:`warning`,variant:`soft`,class:{root:`bg-warning/10 text-warning`}},{color:`error`,variant:`soft`,class:{root:`bg-error/10 text-error`}},{color:`primary`,variant:`subtle`,class:{root:`bg-primary/10 text-primary ring ring-inset ring-primary/25`}},{color:`secondary`,variant:`subtle`,class:{root:`bg-secondary/10 text-secondary ring ring-inset ring-secondary/25`}},{color:`success`,variant:`subtle`,class:{root:`bg-success/10 text-success ring ring-inset ring-success/25`}},{color:`info`,variant:`subtle`,class:{root:`bg-info/10 text-info ring ring-inset ring-info/25`}},{color:`warning`,variant:`subtle`,class:{root:`bg-warning/10 text-warning ring ring-inset ring-warning/25`}},{color:`error`,variant:`subtle`,class:{root:`bg-error/10 text-error ring ring-inset ring-error/25`}},{color:`neutral`,variant:`solid`,class:{root:`text-inverted bg-inverted`}},{color:`neutral`,variant:`outline`,class:{root:`text-highlighted bg-default ring ring-inset ring-default`}},{color:`neutral`,variant:`soft`,class:{root:`text-highlighted bg-elevated/50`}},{color:`neutral`,variant:`subtle`,class:{root:`text-highlighted bg-elevated/50 ring ring-inset ring-accented`}}],defaultVariants:{color:`primary`,variant:`solid`}},T={__name:`Alert`,props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},orientation:{type:null,required:!1,default:`vertical`},actions:{type:Array,required:!1},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},emits:[`update:open`],setup(T,{emit:E}){let D=T,O=E,k=m(),A=f(`alert`,D),{t:j}=C(),M=t(),N=i(()=>x({extend:w,...M.ui?.alert||{}})({color:A.color,variant:A.variant,orientation:A.orientation,title:!!A.title||!!k.title}));return(t,i)=>(c(),_(v(p),{as:v(A).as,"data-orientation":v(A).orientation,"data-slot":`root`,class:n(N.value.root({class:[v(A).ui?.root,v(A).class]}))},{default:s(()=>[l(t.$slots,`leading`,{ui:N.value},()=>[v(A).avatar?(c(),_(y,h({key:0,size:v(A).ui?.avatarSize||N.value.avatarSize()},v(A).avatar,{"data-slot":`avatar`,class:N.value.avatar({class:v(A).ui?.avatar})}),null,16,[`size`,`class`])):v(A).icon?(c(),_(g,{key:1,name:v(A).icon,"data-slot":`icon`,class:n(N.value.icon({class:v(A).ui?.icon}))},null,8,[`name`,`class`])):a(``,!0)]),o(`div`,{"data-slot":`wrapper`,class:n(N.value.wrapper({class:v(A).ui?.wrapper}))},[v(A).title||k.title?(c(),u(`div`,{key:0,"data-slot":`title`,class:n(N.value.title({class:v(A).ui?.title}))},[l(t.$slots,`title`,{},()=>[b(e(v(A).title),1)])],2)):a(``,!0),v(A).description||k.description?(c(),u(`div`,{key:1,"data-slot":`description`,class:n(N.value.description({class:v(A).ui?.description}))},[l(t.$slots,`description`,{},()=>[b(e(v(A).description),1)])],2)):a(``,!0),v(A).orientation===`vertical`&&(v(A).actions?.length||k.actions)?(c(),u(`div`,{key:2,"data-slot":`actions`,class:n(N.value.actions({class:v(A).ui?.actions}))},[l(t.$slots,`actions`,{},()=>[(c(!0),u(r,null,d(v(A).actions,(e,t)=>(c(),_(S,h({key:t,size:`xs`},{ref_for:!0},e),null,16))),128))])],2)):a(``,!0)],2),v(A).orientation===`horizontal`&&(v(A).actions?.length||k.actions)||v(A).close?(c(),u(`div`,{key:0,"data-slot":`actions`,class:n(N.value.actions({class:v(A).ui?.actions,orientation:`horizontal`}))},[v(A).orientation===`horizontal`&&(v(A).actions?.length||k.actions)?l(t.$slots,`actions`,{},()=>[(c(!0),u(r,null,d(v(A).actions,(e,t)=>(c(),_(S,h({key:t,size:`xs`},{ref_for:!0},e),null,16))),128))],void 0,0):a(``,!0),l(t.$slots,`close`,{ui:N.value},()=>[v(A).close?(c(),_(S,h({key:0,icon:v(A).closeIcon||v(M).ui.icons.close,color:`neutral`,variant:`link`,"aria-label":v(j)(`alert.close`)},typeof v(A).close==`object`?v(A).close:{},{"data-slot":`close`,class:N.value.close({class:v(A).ui?.close}),onClick:i[0]||=e=>O(`update:open`,!1)}),null,16,[`icon`,`aria-label`,`class`])):a(``,!0)])],2)):a(``,!0)]),_:3},8,[`as`,`data-orientation`,`class`]))}};export{T as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ar as e,D as t,Er as n,G as r,J as i,Sn as a,Ut as o,Xt as s,Y as c,a as l,d as u,f as d,fn as f,kt as p,l as m,o as h,q as g,rr as _,s as v,u as y}from"./session-D_7iusJi.js";var b={slots:{base:`font-medium inline-flex items-center`,label:`truncate`,leadingIcon:`shrink-0`,leadingAvatar:`shrink-0`,leadingAvatarSize:``,trailingIcon:`shrink-0`},variants:{fieldGroup:{horizontal:`not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]`,vertical:`not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]`},color:{primary:``,secondary:``,success:``,info:``,warning:``,error:``,neutral:``},variant:{solid:``,outline:``,soft:``,subtle:``},size:{xs:{base:`text-[8px]/3 px-1 py-0.5 gap-1 rounded-sm`,leadingIcon:`size-3`,leadingAvatarSize:`3xs`,trailingIcon:`size-3`},sm:{base:`text-[10px]/3 px-1.5 py-1 gap-1 rounded-sm`,leadingIcon:`size-3`,leadingAvatarSize:`3xs`,trailingIcon:`size-3`},md:{base:`text-xs px-2 py-1 gap-1 rounded-md`,leadingIcon:`size-4`,leadingAvatarSize:`3xs`,trailingIcon:`size-4`},lg:{base:`text-sm px-2 py-1 gap-1.5 rounded-md`,leadingIcon:`size-5`,leadingAvatarSize:`2xs`,trailingIcon:`size-5`},xl:{base:`text-base px-2.5 py-1 gap-1.5 rounded-md`,leadingIcon:`size-6`,leadingAvatarSize:`2xs`,trailingIcon:`size-6`}},square:{true:``}},compoundVariants:[{color:`primary`,variant:`solid`,class:`bg-primary text-inverted`},{color:`secondary`,variant:`solid`,class:`bg-secondary text-inverted`},{color:`success`,variant:`solid`,class:`bg-success text-inverted`},{color:`info`,variant:`solid`,class:`bg-info text-inverted`},{color:`warning`,variant:`solid`,class:`bg-warning text-inverted`},{color:`error`,variant:`solid`,class:`bg-error text-inverted`},{color:`primary`,variant:`outline`,class:`text-primary ring ring-inset ring-primary/50`},{color:`secondary`,variant:`outline`,class:`text-secondary ring ring-inset ring-secondary/50`},{color:`success`,variant:`outline`,class:`text-success ring ring-inset ring-success/50`},{color:`info`,variant:`outline`,class:`text-info ring ring-inset ring-info/50`},{color:`warning`,variant:`outline`,class:`text-warning ring ring-inset ring-warning/50`},{color:`error`,variant:`outline`,class:`text-error ring ring-inset ring-error/50`},{color:`primary`,variant:`soft`,class:`bg-primary/10 text-primary`},{color:`secondary`,variant:`soft`,class:`bg-secondary/10 text-secondary`},{color:`success`,variant:`soft`,class:`bg-success/10 text-success`},{color:`info`,variant:`soft`,class:`bg-info/10 text-info`},{color:`warning`,variant:`soft`,class:`bg-warning/10 text-warning`},{color:`error`,variant:`soft`,class:`bg-error/10 text-error`},{color:`primary`,variant:`subtle`,class:`bg-primary/10 text-primary ring ring-inset ring-primary/25`},{color:`secondary`,variant:`subtle`,class:`bg-secondary/10 text-secondary ring ring-inset ring-secondary/25`},{color:`success`,variant:`subtle`,class:`bg-success/10 text-success ring ring-inset ring-success/25`},{color:`info`,variant:`subtle`,class:`bg-info/10 text-info ring ring-inset ring-info/25`},{color:`warning`,variant:`subtle`,class:`bg-warning/10 text-warning ring ring-inset ring-warning/25`},{color:`error`,variant:`subtle`,class:`bg-error/10 text-error ring ring-inset ring-error/25`},{color:`neutral`,variant:`solid`,class:`text-inverted bg-inverted`},{color:`neutral`,variant:`outline`,class:`ring ring-inset ring-accented text-default bg-default`},{color:`neutral`,variant:`soft`,class:`text-default bg-elevated`},{color:`neutral`,variant:`subtle`,class:`ring ring-inset ring-accented text-default bg-elevated`},{size:`xs`,square:!0,class:`p-0.5`},{size:`sm`,square:!0,class:`p-1`},{size:`md`,square:!0,class:`p-1`},{size:`lg`,square:!0,class:`p-1`},{size:`xl`,square:!0,class:`p-1`}],defaultVariants:{color:`primary`,variant:`solid`,size:`md`}},x={__name:`Badge`,props:{as:{type:null,required:!1,default:`span`},label:{type:[String,Number],required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1}},setup(x){let S=x,C=f(),w=u(`badge`,S),T=t(),{orientation:E,size:D}=l(S),{isLeading:O,isTrailing:k,leadingIconName:A,trailingIconName:j}=h(w),M=r(()=>y({extend:b,...T.ui?.badge||{}})({color:w.color,variant:w.variant,size:D.value??w.size,square:w.square||!C.default&&!w.label,fieldGroup:E.value}));return(t,r)=>(o(),g(_(d),{as:_(w).as,"data-slot":`base`,class:n(M.value.base({class:[_(w).ui?.base,_(w).class]}))},{default:a(()=>[s(t.$slots,`leading`,{ui:M.value},()=>[_(O)&&_(A)?(o(),g(m,{key:0,name:_(A),"data-slot":`leadingIcon`,class:n(M.value.leadingIcon({class:_(w).ui?.leadingIcon}))},null,8,[`name`,`class`])):_(w).avatar?(o(),g(v,p({key:1,size:_(w).ui?.leadingAvatarSize||M.value.leadingAvatarSize()},_(w).avatar,{"data-slot":`leadingAvatar`,class:M.value.leadingAvatar({class:_(w).ui?.leadingAvatar})}),null,16,[`size`,`class`])):i(``,!0)]),s(t.$slots,`default`,{ui:M.value},()=>[_(w).label!==void 0&&_(w).label!==null?(o(),c(`span`,{key:0,"data-slot":`label`,class:n(M.value.label({class:_(w).ui?.label}))},e(_(w).label),3)):i(``,!0)]),s(t.$slots,`trailing`,{ui:M.value},()=>[_(k)&&_(j)?(o(),g(m,{key:0,name:_(j),"data-slot":`trailingIcon`,class:n(M.value.trailingIcon({class:_(w).ui?.trailingIcon}))},null,8,[`name`,`class`])):i(``,!0)])]),_:3},8,[`as`,`class`]))}};export{x as t};
|