astronaut-cms 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +84 -3
- package/dist/admin/THIRD_PARTY_LICENSES.md +7598 -0
- package/dist/admin/assets/assistant-DkS355co.js +201 -0
- package/dist/admin/assets/badge-BXsOvOPX.js +1 -0
- package/dist/admin/assets/changes-Ba0G_GN1.js +1 -0
- package/dist/admin/assets/client-VKp75fDU.js +5 -0
- package/dist/admin/assets/clsx-DB0hHKMi.js +1 -0
- package/dist/admin/assets/collapsible-B6P_J0Bg.js +1 -0
- package/dist/admin/assets/collapsible-item-UaoJaaPw.js +1 -0
- package/dist/admin/assets/collections._collection-BE1enDCq.js +1 -0
- package/dist/admin/assets/collections._collection._entry-D3UksnCo.js +52 -0
- package/dist/admin/assets/collections._collection.index-BN5d8UIY.js +1 -0
- package/dist/admin/assets/component-lookup-CUCiK8Xh.js +4 -0
- package/dist/admin/assets/config-Pm_BHLNT.js +1 -0
- package/dist/admin/assets/copy-DezZzPMV.js +1 -0
- package/dist/admin/assets/css-BGIxQoYs.js +1 -0
- package/dist/admin/assets/css-DgaLhXQH.js +1 -0
- package/dist/admin/assets/diff-woXpYk--.js +1 -0
- package/dist/admin/assets/dist-DzkcSBZl.js +1 -0
- package/dist/admin/assets/dist-UbA1s2kM.js +1 -0
- package/dist/admin/assets/docx-BctAmX91.js +56 -0
- package/dist/admin/assets/editor-FGqMznBK.js +2 -0
- package/dist/admin/assets/empty-DSBYiI_7.js +1 -0
- package/dist/admin/assets/entry-link-CQLN2Zpf.js +158 -0
- package/dist/admin/assets/error-banner-yskeRXe8.js +159 -0
- package/dist/admin/assets/errors-DkJ5E_ak.js +1 -0
- package/dist/admin/assets/field-BDK5tt3J.js +41 -0
- package/dist/admin/assets/field-schema-CacrjSYw.js +1 -0
- package/dist/admin/assets/file-text-BzBif8ui.js +1 -0
- package/dist/admin/assets/github-dark-C-LZuMrd.js +1 -0
- package/dist/admin/assets/github-light-EUqPIrTm.js +1 -0
- package/dist/admin/assets/highlighted-body-JLMTFACH-CIQujGv2.js +1 -0
- package/dist/admin/assets/html-CvFb5cGI.js +1 -0
- package/dist/admin/assets/javascript-BzbQS41l.js +1 -0
- package/dist/admin/assets/javascript-CpIGwZ_Y.js +1 -0
- package/dist/admin/assets/json-qhed-kSA.js +1 -0
- package/dist/admin/assets/jsx-Bz0zcwM4.js +1 -0
- package/dist/admin/assets/lib-CMURo-7A.js +21 -0
- package/dist/admin/assets/library-Cr3f75Es.js +1 -0
- package/dist/admin/assets/list-skeleton-BdTNfVXs.js +1 -0
- package/dist/admin/assets/markdown-BYOwaDjH.js +1 -0
- package/dist/admin/assets/matchContext-Bq5Es9aD.js +2 -0
- package/dist/admin/assets/media-browser-9-CPTCks.js +1 -0
- package/dist/admin/assets/media._library-BfFaEZLR.js +1 -0
- package/dist/admin/assets/mermaid-WFAXDIZX-CJ3hhA0i.js +1 -0
- package/dist/admin/assets/page-header-B4nvAsVA.js +1 -0
- package/dist/admin/assets/pdf-DgessaF0.js +106 -0
- package/dist/admin/assets/python-gzcpVVnB.js +1 -0
- package/dist/admin/assets/react-kbcsfQYH.js +1 -0
- package/dist/admin/assets/rolldown-runtime-BWaJ3C7D.js +1 -0
- package/dist/admin/assets/routes-CBt04sNR.js +1 -0
- package/dist/admin/assets/routes-D7tEdYGV.js +1 -0
- package/dist/admin/assets/save-actions-Cz0TkpcP.js +32 -0
- package/dist/admin/assets/select-Bv2EoLhN.js +1 -0
- package/dist/admin/assets/separator-DlYj_PoQ.js +3 -0
- package/dist/admin/assets/shell-DBEiq06l.js +1 -0
- package/dist/admin/assets/shellscript-CLZ0U2zV.js +1 -0
- package/dist/admin/assets/skeleton-CKiqTaRh.js +1 -0
- package/dist/admin/assets/sql-CEbI0hMM.js +1 -0
- package/dist/admin/assets/syntax-BAXqRKRO.js +8 -0
- package/dist/admin/assets/toggle-Y2UpJZyU.js +1 -0
- package/dist/admin/assets/toml-BPTmHmyx.js +1 -0
- package/dist/admin/assets/tsx-udAQXfEw.js +1 -0
- package/dist/admin/assets/typescript-bsJCZSQ-.js +1 -0
- package/dist/admin/assets/ui.module.css-WaO_77ml.js +56 -0
- package/dist/admin/assets/use-entries-B2lsaiK9.js +1 -0
- package/dist/admin/assets/useSelector-CWr3iU9K.js +1 -0
- package/dist/admin/assets/yaml-rwi0_p6S.js +1 -0
- package/dist/admin/assets/zwitch-Wwuax-dJ.js +1 -0
- package/dist/admin/bootstrap.d.ts +1 -0
- package/dist/admin/bootstrap.js +1 -0
- package/dist/admin/editor.d.ts +57 -0
- package/dist/admin/editor.js +1 -0
- package/dist/server/assets.d.ts +2 -0
- package/dist/server/assets.js +30 -0
- package/dist/server/chunks/anchors-DuZ1fokt.js +86 -0
- package/dist/server/chunks/auth-DJP9ryVd.js +44 -0
- package/dist/server/chunks/cms-markers-CUqrOnfA.js +78 -0
- package/dist/server/chunks/component-lookup-DAFg_Qg8.js +128 -0
- package/dist/server/chunks/config-WQqG4mNH.d.ts +193 -0
- package/dist/server/chunks/digest-BYzWNJea.js +753 -0
- package/dist/server/chunks/entry-checks-CKMag1G4.js +608 -0
- package/dist/server/chunks/field-schema-CfdN75jT.js +48 -0
- package/dist/server/chunks/http-BnsNh57m.d.ts +35 -0
- package/dist/server/chunks/i18n-BPmx7ESy.d.ts +15 -0
- package/dist/server/chunks/index-CYbkNvu5.d.ts +22 -0
- package/dist/server/chunks/media-BhqUVVYY.js +223 -0
- package/dist/server/chunks/paths-CEW9fvg8.js +17 -0
- package/dist/server/chunks/paths-Dztx2eUw.js +13 -0
- package/dist/server/chunks/types-DOR5XaJO.js +397 -0
- package/dist/server/chunks/types-Dkx4Xovf.d.ts +359 -0
- package/dist/server/chunks/types-DwA-C6Br.d.ts +266 -0
- package/dist/server/chunks/user-config-DoypbpQf.js +283 -0
- package/dist/server/chunks/xml-D8qPILJU.js +81 -0
- package/dist/server/config.d.ts +3 -0
- package/dist/server/config.js +18 -0
- package/dist/server/content.d.ts +48 -0
- package/dist/server/content.js +89 -0
- package/dist/server/endpoint.d.ts +11 -0
- package/dist/server/endpoint.js +2712 -0
- package/dist/server/integration.d.ts +7 -0
- package/dist/server/integration.js +1174 -0
- package/dist/server/internal.d.ts +65 -0
- package/dist/server/internal.js +30 -0
- package/dist/server/server-local.d.ts +453 -0
- package/dist/server/server-local.js +336 -0
- package/dist/styles/THIRD_PARTY_LICENSES.md +193 -0
- package/dist/styles/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/styles/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/styles/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/styles/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/styles/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/styles/styles.css +3 -0
- package/package.json +151 -5
- package/src/astro/Image.astro +28 -0
- package/src/astro/Video.astro +44 -0
- package/src/astro/admin.astro +137 -0
- package/src/astro/licenses.ts +5 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import{a as e,t}from"./rolldown-runtime-BWaJ3C7D.js";import{a as n,d as r,i,l as a,n as o,o as s,t as c}from"./routes-D7tEdYGV.js";import{t as l}from"./config-Pm_BHLNT.js";import{i as u,m as d,n as f,r as p}from"./separator-DlYj_PoQ.js";import*as m from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var _=globalThis?.document?m.useLayoutEffect:()=>{},v=Object.defineProperty,y=(e,t)=>v(e,`name`,{value:t,configurable:!0}),b=!!(typeof window<`u`&&window.document&&window.document.createElement);function x(e,t,{checkForDefaultPrevented:n=!0}={}){return/* @__PURE__ */ y(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}y(x,`composeEventHandlers`);function S(e){if(!b)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}y(S,`getOwnerWindow`);function C(e){if(!b)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}y(C,`getOwnerDocument`);function w(e,t=!1){let{activeElement:n}=C(e);if(!n?.nodeName)return null;if(ee(n)&&n.contentDocument)return w(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=C(n).getElementById(e);if(t)return t}}return n}y(w,`getActiveElement`);function ee(e){return e.tagName===`IFRAME`}y(ee,`isFrame`);var te=Object.defineProperty,T=(e,t)=>te(e,`name`,{value:t,configurable:!0});// @__NO_SIDE_EFFECTS__
|
|
2
|
+
function E(e,t){let n=m.createContext(t);n.displayName=e+`Context`;let r=/* @__PURE__ */ T(e=>{let{children:t,...r}=e,i=m.useMemo(()=>r,Object.values(r));return/* @__PURE__ */ h(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=m.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return T(i,`useContext`),[r,i]}T(E,`createContext`);// @__NO_SIDE_EFFECTS__
|
|
3
|
+
function ne(e,t=[]){let n=[];function r(t,r){let i=m.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=/* @__PURE__ */ T(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=m.useMemo(()=>o,Object.values(o));return/* @__PURE__ */ h(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=m.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return T(s,`useContext`),[o,s]}T(r,`createContext`);let i=/* @__PURE__ */ T(()=>{let t=n.map(e=>m.createContext(e));return/* @__PURE__ */ T(function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,re(i,...t)]}T(ne,`createContextScope`);function re(...e){let t=e[0];if(e.length===1)return t;let n=/* @__PURE__ */ T(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return/* @__PURE__ */ T(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}T(re,`composeContextScopes`);var ie=Object.defineProperty,ae=(e,t)=>ie(e,`name`,{value:t,configurable:!0}),oe=m.useId||(()=>void 0),se=0;function ce(e){let[t,n]=m.useState(oe());return _(()=>{e||n(e=>e??String(se++))},[e]),e||(t?`radix-${t}`:``)}ae(ce,`useId`);var D=Object.defineProperty,O=(e,t)=>D(e,`name`,{value:t,configurable:!0});function k(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}O(k,`useStateMachine`);var A=/* @__PURE__ */ O(e=>{let{present:t,children:n}=e,r=le(t),i=typeof n==`function`?n({present:r.isPresent}):m.Children.only(n),a=M(r.ref,P(i));return typeof n==`function`||r.isPresent?m.cloneElement(i,{ref:a}):null},`Presence`);function le(e){let[t,n]=m.useState(),r=m.useRef(null),i=m.useRef(e),a=m.useRef(`none`),o=m.useRef(void 0),[s,c]=k(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return m.useEffect(()=>{s===`mounted`?(a.current=o.current??N(r.current),o.current=void 0):a.current=`none`},[s]),_(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=N(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),_(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=/* @__PURE__ */ O(a=>{let o=N(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=/* @__PURE__ */ O(e=>{e.target===t&&(a.current=N(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:m.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=N(t)}else r.current=null;n(e)},[])}}O(le,`usePresence`);function j(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}O(j,`setRef`);function M(...e){let t=m.useRef(e);return t.current=e,m.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=j(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():j(n[e],null)}}},[])}O(M,`useStableComposedRefs`);function N(e){return e?.animationName||`none`}O(N,`getAnimationName`);function P(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}O(P,`getElementRef`);var ue=Object.defineProperty,F=(e,t)=>ue(e,`name`,{value:t,configurable:!0}),I=m.useEffectEvent,de=m.useInsertionEffect;function fe(e){if(typeof I==`function`)return I(e);let t=m.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof de==`function`?de(()=>{t.current=e}):_(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}F(fe,`useEffectEvent`);var pe=Object.defineProperty,me=(e,t)=>pe(e,`name`,{value:t,configurable:!0}),L=m.useInsertionEffect||_;function he({prop:e,defaultProp:t,onChange:n=/* @__PURE__ */ me(()=>{},`onChange`),caller:r}){let[i,a,o]=ge({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,m.useCallback(t=>{if(s){let n=_e(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}me(he,`useControllableState`);function ge({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),i=m.useRef(n),a=m.useRef(t);return L(()=>{a.current=t},[t]),m.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}me(ge,`useUncontrolledState`);function _e(e){return typeof e==`function`}me(_e,`isFunction`);var ve=Symbol(`RADIX:SYNC_STATE`);function ye(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=fe(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=m.useReducer((t,n)=>{if(n.type===ve)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,h=m.useRef(p);m.useEffect(()=>{h.current!==p&&(h.current=p,c||l(p))},[p,h,c]);let g=m.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return m.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:ve,state:i})},[i,d.state,c]),[g,f]}me(ye,`useControllableStateReducer`);function be(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 xe(e,t=`|`){return e.map(e=>Je(e)).join(t)}function Se(e,t){return typeof t==`bigint`?t.toString():t}var Ce=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 we(e){return new Ce(e)}function Te(e){return e==null}function Ee(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function De(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}var Oe=/* @__PURE__*/ Symbol(`evaluating`);function ke(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Oe)return r===void 0&&(r=Oe,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ae(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function je(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function Me(e){return je(e._zod.def)??e._zod.def.shape}function Ne(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return Ae(this,t,e),e},enumerable:!0,configurable:!0})}function Pe(e,t,n){t in e?Ae(e,t,n):e[t]=n}function Fe(e,t,n,r){let i=Me(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Ne(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Pe(e,a,r?r(n.value,a):n.value))}}function Ie(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Ne(e,n,()=>t[n]):Pe(e,n,r.value))}}function Le(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Re(e){return JSON.stringify(e)}function ze(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Be=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ve(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var He=/* @__PURE__*/ we(()=>{if(Lt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Ue(e){if(Ve(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Ve(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function We(e){return Ue(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Ge=/* @__PURE__*/ new Set([`string`,`number`,`symbol`]);function Ke(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function qe(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function R(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 Je(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Ye(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Xe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ze={int64:[/* @__PURE__*/ BigInt(`-9223372036854775808`),/* @__PURE__*/ BigInt(`9223372036854775807`)],uint64:[/* @__PURE__*/ BigInt(0),/* @__PURE__*/ BigInt(`18446744073709551615`)]};function Qe(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 Fe(i,e,$e(e,t)),qe(e,Le(n,{shape:i,checks:[]}))}function $e(e,t){let n=Me(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 et(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($e(e,t)),a={};return Fe(a,e,Reflect.ownKeys(Me(e)).filter(e=>!i.has(e))),qe(e,Le(n,{shape:a,checks:[]}))}function tt(e,t){if(!Ue(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=Me(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 qe(e,Le(e._zod.def,{shape:nt(e,t)}))}function nt(e,t){let n={};return Fe(n,e,Reflect.ownKeys(Me(e))),Ie(n,t),n}function rt(e,t){if(!Ue(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return qe(e,Le(e._zod.def,{shape:nt(e,t)}))}function it(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 Fe(n,e,Reflect.ownKeys(Me(e))),Fe(n,t,Reflect.ownKeys(Me(t))),qe(e,Le(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function at(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($e(t,n)):void 0,o={};return Fe(o,t,Reflect.ownKeys(Me(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),qe(t,Le(t._zod.def,{shape:o,checks:[]}))}function ot(e,t,n){let r=n?new Set($e(t,n)):void 0,i={};return Fe(i,t,Reflect.ownKeys(Me(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),qe(t,Le(t._zod.def,{shape:i}))}function st(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 ct(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 lt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ut(e){return typeof e==`string`?e:e?.message}function dt(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function ft(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function pt(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:ut(e.inst?._zod.def?.error?.(e))??ut(a?.(e))??ut(t?.error?.(e))??ut(n.customError?.(e))??ut(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 mt=/[\uD800-\uDBFF]/;function ht(e){let t=e.length;if(!mt.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 gt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function _t(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 vt(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function yt(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ct(e,n,r.value)}}function bt(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function xt(e,t,n){return bt(e,t,n,!1)}/* @__NO_SIDE_EFFECTS__ */
|
|
4
|
+
function St(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return bt(this,n,r(this))},set(e){bt(this,n,e)}})}return t}function Ct(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:bt(this,t,n.bind(this))},set(e){bt(this,t,e)}})}function wt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Tt,Et=!1,Dt={configurable:!0,get(){Et=!0}};function z(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Tt!==e._zod?Tt=void 0:(Tt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Dt);let e=Et;Et=!1;try{let r=n(this);return Et?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Et||=e,r}catch(n){throw delete this[t],Et||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Ot(e,t,n,r){let i=wt(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 kt=`~constantCatch`;function At(e){let t=()=>e;return t[kt]=!0,t}var jt,Mt={value:void 0,enumerable:!1},Nt=`captureStackTrace`in Error?Error:null;function Pt(e){let t=Nt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Nt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}/* @__NO_SIDE_EFFECTS__ */
|
|
5
|
+
function B(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=/* @__PURE__ */ new Set}a.prototype=i;let o=n,s=o&&/* @__PURE__ */ new WeakSet;function c(n,r){if(!n._zod){Mt.value=new a(r);try{Object.defineProperty(n,"_zod",Mt)}finally{Mt.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),yt(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?Pt(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 Ft=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},It=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(jt=globalThis).__zod_globalConfig??(jt.__zod_globalConfig={});var Lt=globalThis.__zod_globalConfig;function Rt(e){return e&&Object.assign(Lt,e),Lt}function zt(){let e=this._zod;return e.message??=JSON.stringify(e.def,Se,2),e.message}function Bt(e){this._zod.message=e}var Vt={get:zt,set:Bt,enumerable:!0,configurable:!0},Ht={value:void 0,enumerable:!1},Ut=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]),Wt=/* @__PURE__ */ B(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Ht.value=t,Object.defineProperty(e,"issues",Ht),Ht.value=void 0,Object.defineProperty(e,"message",Vt);let n=Object.getPrototypeOf(e);Ut.has(n)||(Ut.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})}}))});function Gt(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 Kt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Gt(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 Jt(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Yt(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${Jt(e.path)}`);return t.join(`
|
|
6
|
+
`)}function Xt(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Zt=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 Ft;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>pt(e,o,Rt())));throw Be(n,a?.callee??t),n}return s.value};return t},Qt=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=>pt(e,o,Rt())));throw Be(n,a?.callee??t),n}return s.value};return t},$t=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 Ft;return a.issues.length?en(e,a.issues,i):{success:!0,data:a.value}};function en(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>pt(e,n,Rt()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var tn=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?en(e,a.issues,i):{success:!0,data:a.value}},nn=/* @__PURE__ */ Symbol.for(`zod.compile.invalid`),rn=/* @__PURE__ */ Symbol.for(`zod.compile.fallback`),an=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==nn)return!0;if(r.definite===!0&&n===void 0)return!1}return on(e,t,n)});function on(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[rn]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Ft;return a.issues.length===0}var sn=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},cn=e=>{let t=Zt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Xt(n,a))};return n},ln=e=>{let t=Zt(e),n=(e,r,i,a)=>t(e,r,i,Xt(n,a));return n},un=e=>{let t=Qt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Xt(n,a))};return n},dn=e=>{let t=Qt(e),n=async(e,r,i,a)=>await t(e,r,i,Xt(n,a));return n},fn=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return $t(e)(t,n,i)},pn=e=>(t,n,r)=>$t(e)(t,n,r),mn=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return tn(e)(t,n,i)},hn=e=>async(t,n,r)=>tn(e)(t,n,r),gn=/^[cC][0-9a-z]{6,}$/,_n=/^[0-9a-z]+$/,vn=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,yn=/^[0-9a-vA-V]{20}$/,bn=/^[A-Za-z0-9]{27}$/,xn=/^[a-zA-Z0-9_-]{21}$/;function Sn(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Cn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,wn=/^([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})$/,Tn=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)$/,En=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Dn=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function On(){return new RegExp(Dn,`u`)}var kn=/^(?:(?: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])$/,An=/^(([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}|:))$/,jn=/^((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])$/,Mn=/^(([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])$/,Nn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Pn=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Fn=/^https?$/,In=/^\+[1-9]\d{6,14}$/,Ln=`(?:(?:\\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 Rn(e){return RegExp(`^${e}$`)}var zn=/*@__PURE__*/ Rn(Ln);function Bn(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 Vn(e){return RegExp(`^${Bn(e)}$`)}function Hn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Bn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Bn({precision:e.precision})}`:n;return RegExp(`^${Ln}T(?:${r})$`)}var Un=/^[\s\S]{0,}$/,Wn=/^-?\d+n?$/,Gn=/^-?\d+$/,Kn=/^-?\d+(?:\.\d+)?$/,qn=/^(?:true|false)$/i,Jn=/^null$/i,Yn=/^[^A-Z]*$/,Xn=/^[^a-z]*$/,Zn=/*@__PURE__*/ B(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Qn=e=>{let t=e.value;return!Te(t)&&t.length!==void 0},$n={number:`number`,bigint:`bigint`,object:`date`},er=/*@__PURE__*/ B(`$ZodCheckLessThan`,(e,t)=>{Zn.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=/*@__PURE__*/ B(`$ZodCheckGreaterThan`,(e,t)=>{Zn.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=/*@__PURE__*/ B(`$ZodCheckMultipleOf`,(e,t)=>{Zn.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):De(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=/*@__PURE__*/ B(`$ZodCheckNumberFormat`,(e,t)=>{Zn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Xe[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=/*@__PURE__*/ B(`$ZodCheckMaxLength`,(e,t)=>{var n;Zn.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?ht(r):i)<=t.maximum)return;let a=gt(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ar=/*@__PURE__*/ B(`$ZodCheckMinLength`,(e,t)=>{var n;Zn.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?ht(r):i)>=t.minimum)return;let a=gt(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),or=/*@__PURE__*/ B(`$ZodCheckLengthEquals`,(e,t)=>{var n;Zn.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?ht(r):i;if(a===t.length)return;let o=gt(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=/*@__PURE__*/ B(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Zn.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=/*@__PURE__*/ B(`$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=/*@__PURE__*/ B(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Yn,sr.init(e,t)}),ur=/*@__PURE__*/ B(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Xn,sr.init(e,t)}),dr=/*@__PURE__*/ B(`$ZodCheckIncludes`,(e,t)=>{Zn.init(e,t);let n=Ke(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=/*@__PURE__*/ B(`$ZodCheckStartsWith`,(e,t)=>{Zn.init(e,t);let n=RegExp(`^${Ke(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=/*@__PURE__*/ B(`$ZodCheckEndsWith`,(e,t)=>{Zn.init(e,t);let n=RegExp(`.*${Ke(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})}});function mr(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues))}var hr=/*@__PURE__*/ B(`$ZodCheckProperties`,(e,t)=>{Zn.init(e,t),xt(e,Symbol.iterator,function*(){yield e});let n;e._zod.check=r=>{if(r.value==null){r.issues.push({expected:`object`,code:`invalid_type`,input:r.value,inst:e});return}n??=Reflect.ownKeys(t.shape).map(e=>[e,t.shape[e]]);let i=r.value,a;for(let[e,t]of n){let n=t._zod.run({value:i[e],issues:[]},{});n instanceof Promise?(a??=[],a.push(n.then(t=>mr(t,r,e)))):mr(n,r,e)}if(a)return Promise.all(a).then(()=>void 0)}}),gr=/*@__PURE__*/ B(`$ZodCheckOverwrite`,(e,t)=>{Zn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),_r=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(`
|
|
7
|
+
`).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(`
|
|
8
|
+
`)}\n};`)(...Object.values(this.closed))}},vr={major:4,minor:6,patch:7},V=/*@__PURE__*/ B(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=vr;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=st(t),a;for(let o of n){if(o._zod.def.when){if(ct(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 Ft;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(ft(t.issues,n,e),i||=st(t,n))});else{if(t.issues.length===n)continue;ft(t.issues,n,e),i||=st(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(st(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Ft;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 Ft;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return xt(this,`~standard`,xr(this))},set"~standard"(e){bt(this,`~standard`,e)}}),yr=(e,t)=>e.issues.length?{issues:e.issues.map(e=>pt(e,t,Rt()))}:{value:e.value};async function br(e,t){let n={async:!0};return yr(await e._zod.run({value:t,issues:[]},n),n)}function xr(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return yr(r,n)}catch{}return br(e,t)},vendor:`zod`,version:1}}var Sr=/*@__PURE__*/ B(`$ZodString`,(e,t)=>{V.init(e,t),e._zod.pattern=t.pattern??Un,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}}),H=/*@__PURE__*/ B(`$ZodStringFormat`,(e,t)=>{sr.init(e,t),Sr.init(e,t)}),Cr=/*@__PURE__*/ B(`$ZodGUID`,(e,t)=>{t.pattern??=wn,H.init(e,t)}),wr=/*@__PURE__*/ B(`$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??=Tn(e)}else t.pattern??=Tn();H.init(e,t)}),Tr=/*@__PURE__*/ B(`$ZodEmail`,(e,t)=>{t.pattern??=En,H.init(e,t)});function Er(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Dr(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Er(e)||2:Or(e,t)}function Or(e,t){if(!t.normalize&&t.protocol?.source===Fn.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 kr=/[\t\n\r]/g;function Ar(e){return e.replace(kr,``)}function jr(e,t){return t.lastIndex=0,t.test(e.hostname)}function Mr(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Nr=/*@__PURE__*/ B(`$ZodURL`,(e,t)=>{H.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Dr(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=Ar(r);return}t.hostname&&!jr(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&&!Mr(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:Ar(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Pr=/*@__PURE__*/ B(`$ZodEmoji`,(e,t)=>{t.pattern??=On(),H.init(e,t)}),Fr=/*@__PURE__*/ B(`$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?xn:Sn(t.length),H.init(e,t)}),Ir=/*@__PURE__*/ B(`$ZodCUID`,(e,t)=>{t.pattern??=gn,H.init(e,t)}),Lr=/*@__PURE__*/ B(`$ZodCUID2`,(e,t)=>{t.pattern??=_n,H.init(e,t)}),Rr=/*@__PURE__*/ B(`$ZodULID`,(e,t)=>{t.pattern??=vn,H.init(e,t)}),zr=/*@__PURE__*/ B(`$ZodXID`,(e,t)=>{t.pattern??=yn,H.init(e,t)}),Br=/*@__PURE__*/ B(`$ZodKSUID`,(e,t)=>{t.pattern??=bn,H.init(e,t)}),Vr=/*@__PURE__*/ B(`$ZodISODateTime`,(e,t)=>{t.pattern??=Hn(t),H.init(e,t)}),Hr=/*@__PURE__*/ B(`$ZodISODate`,(e,t)=>{t.pattern??=zn,H.init(e,t)}),Ur=/*@__PURE__*/ B(`$ZodISOTime`,(e,t)=>{t.pattern??=Vn(t),H.init(e,t)}),Wr=/*@__PURE__*/ B(`$ZodISODuration`,(e,t)=>{t.pattern??=Cn,H.init(e,t)}),Gr=/*@__PURE__*/ B(`$ZodIPv4`,(e,t)=>{t.pattern??=kn,H.init(e,t)}),Kr=/^[0-9a-fA-F:.]+$/;function qr(e){return Kr.test(e)?Er(`http://[${e}]`):!1}var Jr=/*@__PURE__*/ B(`$ZodIPv6`,(e,t)=>{t.pattern??=An,H.init(e,t),e._zod.check=n=>{qr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Yr=/*@__PURE__*/ B(`$ZodCIDRv4`,(e,t)=>{t.pattern??=jn,H.init(e,t)});function Xr(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:qr(n)}var Zr=/*@__PURE__*/ B(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Mn,H.init(e,t),e._zod.check=n=>{Xr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Qr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var $r=/^[0-9a-zA-Z+/]*={0,2}$/,ei=/*@__PURE__*/ B(`$ZodBase64`,(e,t)=>{t.pattern??=$r,H.init(e,t),e._zod.check=n=>{Qr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),ti=/^[A-Za-z0-9_-]*$/;function ni(e){if(!ti.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Qr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var ri=/*@__PURE__*/ B(`$ZodBase64URL`,(e,t)=>{t.pattern??=ti,H.init(e,t),e._zod.check=n=>{ni(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),ii=/*@__PURE__*/ B(`$ZodE164`,(e,t)=>{t.pattern??=In,H.init(e,t)});function ai(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 oi=/*@__PURE__*/ B(`$ZodJWT`,(e,t)=>{H.init(e,t),e._zod.check=n=>{ai(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),si=/*@__PURE__*/ B(`$ZodNumber`,(e,t)=>{V.init(e,t),e._zod.pattern=Kn,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}}),ci=/*@__PURE__*/ B(`$ZodNumberFormat`,(e,t)=>{rr.init(e,t),si.init(e,t)}),li=/*@__PURE__*/ B(`$ZodBoolean`,(e,t)=>{V.init(e,t),e._zod.pattern=qn,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}}),ui=/*@__PURE__*/ B(`$ZodBigInt`,(e,t)=>{V.init(e,t),e._zod.pattern=Wn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),di=/*@__PURE__*/ B(`$ZodNull`,(e,t)=>{V.init(e,t),e._zod.pattern=Jn,e._zod.values=/* @__PURE__ */ new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),fi=/*@__PURE__*/ B(`$ZodAny`,(e,t)=>{V.init(e,t),e._zod.parse=e=>e}),pi=/*@__PURE__*/ B(`$ZodUnknown`,(e,t)=>{V.init(e,t),e._zod.parse=e=>e}),mi=/*@__PURE__*/ B(`$ZodNever`,(e,t)=>{V.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function hi(e,t){let n=dt(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of dt(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,ft(n.issues,t,e),n}}return i(n,a)}}var gi=e=>Array.isArray(e)?e.length:-1;function _i(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues)),t.value[n]=e.value}var vi=/*@__PURE__*/ B(`$ZodArray`,(e,t)=>{V.init(e,t);let n=Lt.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=>_i(t,r,e)));else if(_i(c,r,e),s&&c.issues.length!==0&&st(c))break}return o.length?Promise.all(o).then(()=>r):r},hi(e,gi)});function yi(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(...lt(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var bi=[];function xi(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:bi,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=Ye(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Si(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(st(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=>yi(e,n,i,t,d,f))):yi(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 Ci=/*@__PURE__*/ B(`$ZodObject`,(e,t)=>{V.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=we(()=>xi(t));z(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)||Ae(n,e,/* @__PURE__ */ 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=Ve,o=t.catchall,s,c=Lt.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(st(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=>yi(n,t,e,r,a,o))):yi(s,t,e,r,a,o)}return o?Si(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),wi=/*@__PURE__*/ B(`$ZodObjectJIT`,(e,t)=>{Ci.init(e,t);let n=e._zod.parse,r=we(()=>xi(t)),i=Lt.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new _r([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
9
|
+
let ${e}_ab = false;
|
|
10
|
+
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
11
|
+
const iss = ${e}.issues[i];
|
|
12
|
+
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
13
|
+
payload.issues.push(iss);
|
|
14
|
+
if (iss.continue !== true) ${e}_ab = true;
|
|
15
|
+
}
|
|
16
|
+
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
17
|
+
payload.value = newResult;
|
|
18
|
+
return payload;
|
|
19
|
+
}`;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)}]`:Re(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(`
|
|
20
|
+
const ${n}_present = ${i};
|
|
21
|
+
if (!${n}.issues.length || ${n}_present) {
|
|
22
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (${e}) {
|
|
26
|
+
newResult[${r}] = ${n}.value;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
`)}else f?(o.write(`
|
|
31
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
32
|
+
}
|
|
33
|
+
`),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
|
|
34
|
+
if (${n}.value !== undefined || ${i}) {
|
|
35
|
+
newResult[${r}] = ${n}.value;
|
|
36
|
+
}
|
|
37
|
+
`)):o.write(`
|
|
38
|
+
const ${n}_present = ${i};
|
|
39
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
40
|
+
}
|
|
41
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
42
|
+
payload.issues.push({
|
|
43
|
+
code: "invalid_type",
|
|
44
|
+
expected: "nonoptional",
|
|
45
|
+
input: undefined,
|
|
46
|
+
path: [${r}]
|
|
47
|
+
});
|
|
48
|
+
if (ctx && ctx.abortEarly) {
|
|
49
|
+
payload.value = newResult;
|
|
50
|
+
return payload;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (${n}_present) {
|
|
55
|
+
newResult[${r}] = ${n}.value;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Ve,c=!Lt.jitless,l=c&&He.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?Si([],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 Ti(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=>!st(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=>pt(e,r,Rt())))}),t)}var Ei=/*@__PURE__*/ B(`$ZodUnion`,(e,t)=>{V.init(e,t),z(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),z(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),z(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)))}),z(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=>Ee(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=>Ti(t,r,e,i)):Ti(o,r,e,i)}});function Di(e){let t=/* @__PURE__ */ new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var Oi=/*@__PURE__*/ B(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Ei.init(e,t);let n=e._zod.parse;z(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||Ae(t,e,/* @__PURE__ */ new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=je(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=we(()=>Di(t));e._zod.parse=(i,a)=>{let o=i.value;if(!Ve(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),ki=/*@__PURE__*/ B(`$ZodIntersection`,(e,t)=>{V.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])=>ji(e,t,n)):ji(e,i,a)}});function Ai(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ue(e)&&Ue(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=Ai(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=Ai(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 ji(e,t,n){let r=/* @__PURE__ */ new Map,i,a=/* @__PURE__ */ 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=Ai(t.value,n.value);if(!c.valid){if(st(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Mi=/*@__PURE__*/ B(`$ZodTuple`,(e,t)=>{V.init(e,t);let n=t.items,r=Lt.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=Ni(n,`optin`),l=Ni(n,`optout`);if(!t.rest){if(o.length<c)return i.issues.push({code:`too_small`,minimum:c,inclusive:!0,input:o,inst:e,origin:`array`}),i;o.length>n.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length),d=t.rest?a?.abortEarly:void 0,f=!1;for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:o[e],issues:[]},a);t instanceof Promise?s.push(t.then(t=>{u[e]=t})):(u[e]=t,d&&!f&&t.issues.length&&(f=st(t)))}if(t.rest&&!f){let e=n.length-1,r=o.slice(n.length),c=i.issues.length;for(let n of r){if(d&&i.issues.length!==c){if(st(i,c))break;c=i.issues.length}e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>Pi(t,i,e))):Pi(r,i,e)}}return s.length?Promise.all(s).then(()=>Fi(u,i,n,o,l)):Fi(u,i,n,o,l)}});function Ni(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function Pi(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues)),t.value[n]=e.value}function Fi(e,t,n,r,i){for(let a=0;a<n.length;a++){let o=e[a],s=a<r.length;if(!s&&a>=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...lt(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}var Ii=/*@__PURE__*/ B(`$ZodRecord`,(e,t)=>{V.init(e,t);let n=Lt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Ue(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=/* @__PURE__ */ 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=>pt(e,i,Rt())),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(...lt(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...lt(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`&&Kn.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=>pt(e,i,Rt())),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(...lt(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...lt(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}}),Li=/*@__PURE__*/ B(`$ZodEnum`,(e,t)=>{V.init(e,t);let n=be(t.entries),r=new Set(n);e._zod.values=r,z(e,`pattern`,e=>{let t=be(e.def.entries).filter(e=>Ge.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Ke(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}}),Ri=/*@__PURE__*/ B(`$ZodLiteral`,(e,t)=>{V.init(e,t);let n=new Set(t.values);e._zod.values=n,z(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Ke(e):e?Ke(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),zi=/*@__PURE__*/ B(`$ZodTransform`,(e,t)=>{V.init(e,t),e._zod.optin=`optional`,Lt.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new It(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 Ft;return n.value=i,n}});function Bi(e,t){return e.value=t.issues.length?void 0:t.value,e}var Vi=/*@__PURE__*/ B(`$ZodOptional`,(e,t)=>{V.init(e,t),z(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,z(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?/* @__PURE__ */ new Set([...t,void 0]):void 0}),z(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Ee(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=>Bi(e,t)):Bi(e,r)}return t.innerType._zod.run(e,n)}}),Hi=/*@__PURE__*/ B(`$ZodExactOptional`,(e,t)=>{Vi.init(e,t),z(e,`values`,e=>e.def.innerType._zod.values),z(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ui=/*@__PURE__*/ B(`$ZodNullable`,(e,t)=>{V.init(e,t),z(e,`optin`,e=>e.def.innerType._zod.optin),z(e,`optout`,e=>e.def.innerType._zod.optout),z(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Ee(t.source)}|null)$`):void 0}),z(e,`values`,e=>e.def.innerType._zod.values?/* @__PURE__ */ 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)}),Wi=/*@__PURE__*/ B(`$ZodDefault`,(e,t)=>{V.init(e,t),e._zod.optin=`defaulted`,z(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=>Gi(e,t)):Gi(r,t)}});function Gi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Ki=/*@__PURE__*/ B(`$ZodPrefault`,(e,t)=>{V.init(e,t),e._zod.optin=`defaulted`,z(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))}),qi=/*@__PURE__*/ B(`$ZodNonOptional`,(e,t)=>{V.init(e,t),z(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=>Ji(t,e)):Ji(i,e)}});function Ji(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 Yi(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>pt(e,r,Rt()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Xi=/*@__PURE__*/ B(`$ZodCatch`,(e,t)=>{V.init(e,t),z(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),z(e,`optout`,e=>e.def.innerType._zod.optout),z(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=>Yi(e,r,t,n)):Yi(e,r,t,n)}}),Zi=/*@__PURE__*/ B(`$ZodPipe`,(e,t)=>{V.init(e,t),z(e,`values`,e=>e.def.in._zod.values),z(e,`optin`,e=>e.def.in._zod.optin),z(e,`optout`,e=>e.def.out._zod.optout),z(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=>Qi(e,t.in,n)):Qi(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Qi(e,t.out,n)):Qi(r,t.out,n)}});function Qi(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 $i=/*@__PURE__*/ B(`$ZodReadonly`,(e,t)=>{V.init(e,t),z(e,`propValues`,e=>e.def.innerType._zod.propValues),z(e,`values`,e=>e.def.innerType._zod.values),z(e,`optin`,e=>e.def.innerType?._zod?.optin),z(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(ea):ea(r)}});function ea(e){return e.memo||(e.value=Object.freeze(e.value)),e}var ta=/*@__PURE__*/ B(`$ZodLazy`,(e,t)=>{V.init(e,t),ke(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),z(e,`pattern`,e=>e.innerType?._zod?.pattern),z(e,`propValues`,e=>e.innerType?._zod?.propValues),z(e,`optin`,e=>e.innerType?._zod?.optin??void 0),z(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),na=/*@__PURE__*/ B(`$ZodCustom`,(e,t)=>{Zn.init(e,t),V.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=>ra(t,n,r,e));ra(i,n,r,e)}});function ra(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(vt(e))}}var ia=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},aa=`~memo`,oa=[];function sa(e){return typeof e==`object`&&!!e}function ca(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var la=/*@__PURE__*/ new WeakMap,ua=0,da=1,fa=2;function pa(e,t,n){let r=la.get(e);if(r!==void 0)return r?fa:ua;if(t.has(e))return fa;t.add(e);let i=ua,a=e=>{if(i!==fa&&e?._zod){let r=pa(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=ua;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?da:o.value?._zod?pa(o.value,t,n):ua;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=je(c);s(e?o(e,!0):da),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?pa(r,t,!1):da);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),ma(e,i)}function ma(e,t){return t!==da&&la.set(e,t===fa),t}function ha(e,t){let n=e.buckets.get(t);return n||(n=/* @__PURE__ */ new WeakMap,e.buckets.set(t,n)),n}var ga,_a=[],va={alloc(e,t,n){let r=ga;if(!r)return n;ga=void 0;let i={value:n,issues:null};return r.set(t.value,i),_a.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`&&ba(n,e.value))throw new ia;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=pa(e,/* @__PURE__ */ new Set,!1);if(i===ua)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===fa||r?n=!0:r=!0}let l=s.value;if(!sa(l))return t(s,c);let u=c[aa];u||(u={buckets:/* @__PURE__ */ new WeakMap,backEdges:void 0},c[aa]=u);let d;i===c?d=a:(d=ha(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(...ca(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=/* @__PURE__ */ new WeakSet),u.backEdges.add(f.value)),s;ga=d;let p=_a.length,m=t(s,c);ga=void 0;let h=_a.length>p?_a.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?ca(e.issues):oa),e)):(h&&(h.issues=m.issues.length?ca(m.issues):oa),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function ya(){return va}function ba(e,t){let n=e[aa]?.backEdges;return n!==void 0&&sa(t)&&n.has(t)}var xa=()=>{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(_t(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Je(e.values[0])}`:`Invalid option: expected one of ${xe(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`:``}: ${xe(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:xa()}}var Ca,wa=class{constructor(){this._map=/* @__PURE__ */ new WeakMap,this._idmap=/* @__PURE__ */ 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=/* @__PURE__ */ new WeakMap,this._idmap=/* @__PURE__ */ 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 Ta(){return new wa}(Ca=globalThis).__zod_globalRegistry??(Ca.__zod_globalRegistry=Ta());var Ea=globalThis.__zod_globalRegistry;function Da(e){return e.checks&&=[...e.checks],e}// @__NO_SIDE_EFFECTS__
|
|
59
|
+
function Oa(e,t){return new e(Da({type:`string`,...R(t)}))}// @__NO_SIDE_EFFECTS__
|
|
60
|
+
function ka(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
61
|
+
function Aa(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
62
|
+
function ja(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
63
|
+
function Ma(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
64
|
+
function Na(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
65
|
+
function Pa(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
66
|
+
function Fa(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
67
|
+
function Ia(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
68
|
+
function La(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
69
|
+
function Ra(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
70
|
+
function za(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
71
|
+
function Ba(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
72
|
+
function Va(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
73
|
+
function Ha(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
74
|
+
function Ua(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
75
|
+
function Wa(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
76
|
+
function Ga(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
77
|
+
function Ka(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
78
|
+
function qa(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
79
|
+
function Ja(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
80
|
+
function Ya(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
81
|
+
function Xa(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
82
|
+
function Za(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
83
|
+
function Qa(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
84
|
+
function $a(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
85
|
+
function eo(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
86
|
+
function to(e,t){return new e(Da({type:`number`,checks:[],...R(t)}))}// @__NO_SIDE_EFFECTS__
|
|
87
|
+
function no(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
88
|
+
function ro(e,t){return new e({type:`boolean`,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
89
|
+
function io(e,t){return new e({type:`bigint`,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
90
|
+
function ao(e,t){return new e({type:`null`,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
91
|
+
function oo(e){return new e({type:`any`})}// @__NO_SIDE_EFFECTS__
|
|
92
|
+
function so(e){return new e({type:`unknown`})}// @__NO_SIDE_EFFECTS__
|
|
93
|
+
function co(e,t){return new e({type:`never`,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
94
|
+
function lo(e,t){return new er({check:`less_than`,...R(t),value:e,inclusive:!1})}// @__NO_SIDE_EFFECTS__
|
|
95
|
+
function uo(e,t){return new er({check:`less_than`,...R(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
|
|
96
|
+
function fo(e,t){return new tr({check:`greater_than`,...R(t),value:e,inclusive:!1})}// @__NO_SIDE_EFFECTS__
|
|
97
|
+
function po(e,t){return new tr({check:`greater_than`,...R(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
|
|
98
|
+
function mo(e,t){return new nr({check:`multiple_of`,...R(t),value:e})}// @__NO_SIDE_EFFECTS__
|
|
99
|
+
function ho(e,t){return new ir({check:`max_length`,...R(t),maximum:e})}// @__NO_SIDE_EFFECTS__
|
|
100
|
+
function go(e,t){return new ar({check:`min_length`,...R(t),minimum:e})}// @__NO_SIDE_EFFECTS__
|
|
101
|
+
function _o(e,t){return new or({check:`length_equals`,...R(t),length:e})}// @__NO_SIDE_EFFECTS__
|
|
102
|
+
function vo(e,t){return new cr({check:`string_format`,format:`regex`,...R(t),pattern:e})}// @__NO_SIDE_EFFECTS__
|
|
103
|
+
function yo(e){return new lr({check:`string_format`,format:`lowercase`,...R(e)})}// @__NO_SIDE_EFFECTS__
|
|
104
|
+
function bo(e){return new ur({check:`string_format`,format:`uppercase`,...R(e)})}// @__NO_SIDE_EFFECTS__
|
|
105
|
+
function xo(e,t){return new dr({check:`string_format`,format:`includes`,...R(t),includes:e})}// @__NO_SIDE_EFFECTS__
|
|
106
|
+
function So(e,t){return new fr({check:`string_format`,format:`starts_with`,...R(t),prefix:e})}// @__NO_SIDE_EFFECTS__
|
|
107
|
+
function Co(e,t){return new pr({check:`string_format`,format:`ends_with`,...R(t),suffix:e})}// @__NO_SIDE_EFFECTS__
|
|
108
|
+
function wo(e,t){return new hr({check:`properties`,shape:e,...R(t)})}// @__NO_SIDE_EFFECTS__
|
|
109
|
+
function To(e){return new gr({check:`overwrite`,tx:e})}// @__NO_SIDE_EFFECTS__
|
|
110
|
+
function Eo(e){return/* @__PURE__ */ To(t=>t.normalize(e))}// @__NO_SIDE_EFFECTS__
|
|
111
|
+
function Do(){return/* @__PURE__ */ To(e=>e.trim())}// @__NO_SIDE_EFFECTS__
|
|
112
|
+
function Oo(){return/* @__PURE__ */ To(e=>e.toLowerCase())}// @__NO_SIDE_EFFECTS__
|
|
113
|
+
function ko(){return/* @__PURE__ */ To(e=>e.toUpperCase())}// @__NO_SIDE_EFFECTS__
|
|
114
|
+
function Ao(){return/* @__PURE__ */ To(e=>ze(e))}// @__NO_SIDE_EFFECTS__
|
|
115
|
+
function jo(e,t,n){return new e({type:`array`,element:t,...R(n)})}// @__NO_SIDE_EFFECTS__
|
|
116
|
+
function Mo(e,t,n){let r=R(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}// @__NO_SIDE_EFFECTS__
|
|
117
|
+
function No(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...R(n)})}// @__NO_SIDE_EFFECTS__
|
|
118
|
+
function Po(e,t){let n=/* @__PURE__ */ Fo(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(vt(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(vt(r))}},e(t.value,t)),t);return n}// @__NO_SIDE_EFFECTS__
|
|
119
|
+
function Fo(e,t){let n=new Zn({check:`custom`,...R(t)});return n._zod.check=e,n}function Io(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&Ae(e,t,n[t]);return e}function Lo(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??Ea,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:/* @__PURE__ */ new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function U(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 W(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,W(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Io(o.schema,c),t.io===`input`&&qo(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 Ro(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function zo(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=/* @__PURE__ */ 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}/${Ro(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+Ro(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>
|
|
120
|
+
|
|
121
|
+
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);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Bo(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;Bo(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 Vo=/* @__PURE__ */ new Set([`type`,`properties`,`required`,`additionalProperties`]),Ho=[`oneOf`,`anyOf`];function Uo(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Wo(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Vo.has(e))return null;t.push(n)}let n={},r=/* @__PURE__ */ 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]??Uo(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Ae(n,r,e.length===1?e[0]:Wo(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=Uo(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 Go(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Vo)if(t in e)return;let n=t.filter(e=>Ho.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Wo(t);else{let e=n[0],i=Ho.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=>Wo([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Io(e,r))}function Ko(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)):Io(i,s),Io(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())Bo(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=/* @__PURE__ */ 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)??[])Go(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)}Io(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,Ae(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:Yo(t,`input`,e.processors),output:Yo(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function qo(e,t){let n=t??{seen:/* @__PURE__ */ 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 qo(r.element,n);if(r.type===`set`)return qo(r.valueType,n);if(r.type===`lazy`)return qo(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 qo(r.innerType,n);if(r.type===`intersection`)return qo(r.left,n)||qo(r.right,n);if(r.type===`record`||r.type===`map`)return qo(r.keyType,n)||qo(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:qo(r.in,n)||qo(r.out,n);if(r.type===`object`){for(let e in r.shape)if(qo(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(qo(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(qo(e,n))return!0;return!!(r.rest&&qo(r.rest,n))}return!1}var Jo=(e,t={})=>n=>{let r=Lo({...n,processors:t});return W(e,r),zo(r,e),Ko(r,e)},Yo=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Lo({...i??{},target:a,io:t,processors:n});return W(e,o),zo(o,e),Ko(o,e)},Xo=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Zo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Qo=(e,t)=>{Xo(e,`minimum`,t),Zo(e,`maximum`,t)},$o=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},es=(e,t)=>{e.patterns??=/* @__PURE__ */ new Set,e.patterns.add(t)},ts=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},ns=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},rs=(e,t)=>Xo(e,`minimum`,t.minimum),is=(e,t)=>Zo(e,`maximum`,t.maximum),as=e=>(t,n)=>{ns(t,n.format);let[r,i]=e[n.format];Xo(t,`minimum`,r),Zo(t,`maximum`,i)},os={greater_than:(e,t)=>Xo(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Zo(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>$o(e,t.value),number_format:as(Xe),bigint_format:as(Ze),min_length:rs,max_length:is,length_equals:(e,t)=>Qo(e,t.length),min_size:rs,max_size:is,size_equals:(e,t)=>Qo(e,t.size),string_format:(e,t)=>{ns(e,t.format),t.pattern&&es(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)=>ts(e,t.mime)};function G(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)os[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Xo(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Xo(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Zo(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Zo(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&$o(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&ts(t,i.mime);for(let e of i.patterns??[])es(t,e);return t}var ss={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},cs=/* @__PURE__ */ new Map([[$r,Nn],[ti,Pn]]),ls=e=>cs.get(e)??e,us=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=G(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=ss[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(ls);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}))])}},ds=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=G(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=/* @__PURE__ */ new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):U(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}))])}},fs=(e,t,n,r)=>{n.type=`boolean`},ps=(e,t,n,r)=>{U(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},ms=(e,t,n,r)=>{U(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},hs=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},gs=(e,t,n,r)=>{U(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},_s=(e,t,n,r)=>{U(e,t,n,r,`Void cannot be represented in JSON Schema`)},vs=(e,t,n,r)=>{n.not={}},ys=(e,t,n,r)=>{},bs=(e,t,n,r)=>{},xs=(e,t,n,r)=>{U(e,t,n,r,`Date cannot be represented in JSON Schema`)},Ss=(e,t,n,r)=>{let i=e._zod.def,a=be(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},Cs=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(U(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(U(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},ws=(e,t,n,r)=>{U(e,t,n,r,`NaN cannot be represented in JSON Schema`)},Ts=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Es=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=G(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},Ds=(e,t,n,r)=>{n.type=`boolean`},Os=(e,t,n,r)=>{U(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},ks=(e,t,n,r)=>{U(e,t,n,r,`Function types cannot be represented in JSON Schema`)},As=(e,t,n,r)=>{U(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},js=(e,t,n,r)=>{U(e,t,n,r,`Map cannot be represented in JSON Schema`)},Ms=(e,t,n,r)=>{U(e,t,n,r,`Set cannot be represented in JSON Schema`)},Ns=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=G(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=W(a.element,t,{...r,path:[...r.path,`items`]})};function Ps(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Ps(t.out):t.type===`catch`?Ps(t.innerType):e._zod.optin}var Fs=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&U(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)Ae(i.properties,e,W(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`?Ps(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=W(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Is=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>W(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ls=(e,t,n,r)=>{let i=e._zod.def,a=W(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=W(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)},Rs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>W(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?W(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?Ps(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=G(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function zs(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=zs(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=>zs(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`)?Kn:Gn).source)),p}var Bs=/* @__PURE__ */ new WeakMap;function Vs(e){let t=/* @__PURE__ */ new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=/* @__PURE__ */ new Map;for(let r of Bs.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=zs(t,a,/* @__PURE__ */ 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 Hs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=G(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=W(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)Ae(i.patternProperties,ls(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=W(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=Bs.get(t);n||(n=[],Bs.set(t,n),t.deferred.push(()=>Vs(t))),n.push(e)}i.additionalProperties=W(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Ps(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))}},Us=(e,t,n,r)=>{let i=e._zod.def,a=W(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`}]},Ws=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Gs=Symbol();function Ks(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(U(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Gs):JSON.parse(o)}var qs=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Ks(i.defaultValue,e,t,n,r);o!==Gs&&(n.default=o)},Js=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Ks(i.defaultValue,e,t,n,r);o!==Gs&&(n._prefault=o)},Ys=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{U(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Xs=(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;W(o,t,r);let s=t.seen.get(e);s.ref=o},Zs=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Qs=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},$s=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ec=(e,t,n,r)=>{let i=e._zod.innerType;W(i,t,r);let a=t.seen.get(e);a.ref=i},tc={string:us,number:ds,boolean:fs,bigint:ps,symbol:ms,null:hs,undefined:gs,void:_s,never:vs,any:ys,unknown:bs,date:xs,enum:Ss,literal:Cs,nan:ws,template_literal:Ts,file:Es,success:Ds,custom:Os,function:ks,transform:As,map:js,set:Ms,array:Ns,object:Fs,union:Is,intersection:Ls,tuple:Rs,record:Hs,nullable:Us,nonoptional:Ws,default:qs,prefault:Js,catch:Ys,pipe:Xs,readonly:Zs,promise:Qs,optional:$s,lazy:ec};function nc(e,t){if(`_idmap`in e){let n=e,r=Lo({...t,processors:tc}),i={};for(let e of n._idmap.entries()){let[t,n]=e;W(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;zo(r,n),Ae(a,t,Ko(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=Lo({...t,processors:tc});return W(e,n),zo(n,e),Ko(n,e)}var rc=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]);function ic(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 ac=/*@__PURE__*/ B(`ZodError`,(e,t)=>{Wt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);rc.has(n)||(rc.add(n),ic(n,`format`,e=>t=>qt(e,t)),ic(n,`flatten`,e=>t=>Kt(e,t)),ic(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Se,2)}),ic(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Se,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),oc=/* @__PURE__ */ Zt(ac),sc=/* @__PURE__ */ Qt(ac),cc=/* @__PURE__ */ $t(ac),lc=/* @__PURE__ */ tn(ac),uc=/* @__PURE__ */ cn(ac),dc=/* @__PURE__ */ ln(ac),fc=/* @__PURE__ */ un(ac),pc=/* @__PURE__ */ dn(ac),mc=/* @__PURE__ */ fn(ac),hc=/* @__PURE__ */ pn(ac),gc=/* @__PURE__ */ mn(ac),_c=/* @__PURE__ */ hn(ac);function vc(){Lt.localeError||Rt(Sa())}function yc(){Lt.memoizer||Rt({memoizer:ya()})}var K=/*@__PURE__*/ B(`ZodType`,(e,t)=>(vc(),V.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Le(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 qe(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(eu(e,t))},superRefine(e,t){return this.check(tu(e,t))},overwrite(e){return this.check(/* @__PURE__ */ To(e))},optional(){return Nl(this)},exactOptional(){return Fl(this)},nullable(){return Ll(this)},nullish(){return Nl(Ll(this))},nonoptional(e){return Ul(this,e)},array(){return dl(this)},or(e){return _l([this,e])},and(e){return xl(this,e)},transform(e){return ql(this,jl(e))},default(e){return zl(this,e)},prefault(e){return Vl(this,e)},catch(e){return Gl(this,e)},pipe(e){return ql(this,e)},readonly(){return Yl(this)},describe(e){let t=this.clone();return Ea.add(t,{description:e}),t},meta(...e){if(e.length===0)return Ea.get(this);let t=this.clone();return Ea.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 xt(this,`~standard`,{...xr(this),jsonSchema:{input:Yo(this,`input`),output:Yo(this,`output`)}})},set"~standard"(e){bt(this,`~standard`,e)},parse:function e(t,n){return oc(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await sc(this,t,n,{callee:e})},safeParse(e,t){return cc(this,e,t)},async safeParseAsync(e,t){return lc(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){bt(this,`spa`,e)},validate(e,t){return an(this,e,t)},validateAsync(e,t){return sn(this,e,t)},encode:function e(t,n){return uc(this,t,n,{callee:e})},decode:function e(t,n){return dc(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await fc(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await pc(this,t,n,{callee:e})},safeEncode(e,t){return mc(this,e,t)},safeDecode(e,t){return hc(this,e,t)},async safeEncodeAsync(e,t){return gc(this,e,t)},async safeDecodeAsync(e,t){return _c(this,e,t)},toJSONSchema(e){return Jo(this,{})(e)},get description(){return Ea.get(this)?.description},get _def(){return this._zod.def}}),bc=/*@__PURE__*/ B(`_ZodString`,(e,t)=>{Sr.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>us(e,t,n,r)},/*@__PURE__*/ St({format:e=>G(e).format??null,minLength:e=>G(e).minimum??null,maxLength:e=>G(e).maximum??null},{regex(...e){return this.check(/* @__PURE__ */ vo(...e))},includes(...e){return this.check(/* @__PURE__ */ xo(...e))},startsWith(...e){return this.check(/* @__PURE__ */ So(...e))},endsWith(...e){return this.check(/* @__PURE__ */ Co(...e))},min(...e){return this.check(/* @__PURE__ */ go(...e))},max(...e){return this.check(/* @__PURE__ */ ho(...e))},length(...e){return this.check(/* @__PURE__ */ _o(...e))},nonempty(...e){return this.check(/* @__PURE__ */ go(1,...e))},lowercase(e){return this.check(/* @__PURE__ */ yo(e))},uppercase(e){return this.check(/* @__PURE__ */ bo(e))},trim(){return this.check(/* @__PURE__ */ Do())},normalize(...e){return this.check(/* @__PURE__ */ Eo(...e))},toLowerCase(){return this.check(/* @__PURE__ */ Oo())},toUpperCase(){return this.check(/* @__PURE__ */ ko())},slugify(){return this.check(/* @__PURE__ */ Ao())}})),xc=/*@__PURE__*/ B(`ZodString`,(e,t)=>{Sr.init(e,t),bc.init(e,t)},{email(e){return this.check(/* @__PURE__ */ ka(Dc,e))},url(e){return this.check(/* @__PURE__ */ Fa(jc,e))},jwt(e){return this.check(/* @__PURE__ */ Xa(qc,e))},emoji(e){return this.check(/* @__PURE__ */ Ia(Nc,e))},guid(e){return this.check(/* @__PURE__ */ Aa(kc,e))},uuid(e){return this.check(/* @__PURE__ */ ja(Ac,e))},uuidv4(e){return this.check(/* @__PURE__ */ Ma(Ac,e))},uuidv6(e){return this.check(/* @__PURE__ */ Na(Ac,e))},uuidv7(e){return this.check(/* @__PURE__ */ Pa(Ac,e))},nanoid(e){return this.check(/* @__PURE__ */ La(Pc,e))},cuid(e){return this.check(/* @__PURE__ */ Ra(Fc,e))},cuid2(e){return this.check(/* @__PURE__ */ za(Ic,e))},ulid(e){return this.check(/* @__PURE__ */ Ba(Lc,e))},base64(e){return this.check(/* @__PURE__ */ qa(Wc,e))},base64url(e){return this.check(/* @__PURE__ */ Ja(Gc,e))},xid(e){return this.check(/* @__PURE__ */ Va(Rc,e))},ksuid(e){return this.check(/* @__PURE__ */ Ha(zc,e))},ipv4(e){return this.check(/* @__PURE__ */ Ua(Bc,e))},ipv6(e){return this.check(/* @__PURE__ */ Wa(Vc,e))},cidrv4(e){return this.check(/* @__PURE__ */ Ga(Hc,e))},cidrv6(e){return this.check(/* @__PURE__ */ Ka(Uc,e))},e164(e){return this.check(/* @__PURE__ */ Ya(Kc,e))},datetime(e){return this.check(/* @__PURE__ */ Za(Cc,e))},date(e){return this.check(/* @__PURE__ */ Qa(wc,e))},time(e){return this.check(/* @__PURE__ */ $a(Tc,e))},duration(e){return this.check(/* @__PURE__ */ eo(Ec,e))}});function Sc(e){return/* @__PURE__ */ Oa(xc,e)}var q=/*@__PURE__*/ B(`ZodStringFormat`,(e,t)=>{H.init(e,t),bc.init(e,t)}),Cc=/*@__PURE__*/ B(`ZodISODateTime`,(e,t)=>{Vr.init(e,t),q.init(e,t)}),wc=/*@__PURE__*/ B(`ZodISODate`,(e,t)=>{Hr.init(e,t),q.init(e,t)}),Tc=/*@__PURE__*/ B(`ZodISOTime`,(e,t)=>{Ur.init(e,t),q.init(e,t)}),Ec=/*@__PURE__*/ B(`ZodISODuration`,(e,t)=>{Wr.init(e,t),q.init(e,t)}),Dc=/*@__PURE__*/ B(`ZodEmail`,(e,t)=>{Tr.init(e,t),q.init(e,t)});function Oc(e){return/* @__PURE__ */ ka(Dc,e)}var kc=/*@__PURE__*/ B(`ZodGUID`,(e,t)=>{Cr.init(e,t),q.init(e,t)}),Ac=/*@__PURE__*/ B(`ZodUUID`,(e,t)=>{wr.init(e,t),q.init(e,t)}),jc=/*@__PURE__*/ B(`ZodURL`,(e,t)=>{Nr.init(e,t),q.init(e,t)});function Mc(e){return/* @__PURE__ */ Fa(jc,e)}var Nc=/*@__PURE__*/ B(`ZodEmoji`,(e,t)=>{Pr.init(e,t),q.init(e,t)}),Pc=/*@__PURE__*/ B(`ZodNanoID`,(e,t)=>{Fr.init(e,t),q.init(e,t)}),Fc=/*@__PURE__*/ B(`ZodCUID`,(e,t)=>{Ir.init(e,t),q.init(e,t)}),Ic=/*@__PURE__*/ B(`ZodCUID2`,(e,t)=>{Lr.init(e,t),q.init(e,t)}),Lc=/*@__PURE__*/ B(`ZodULID`,(e,t)=>{Rr.init(e,t),q.init(e,t)}),Rc=/*@__PURE__*/ B(`ZodXID`,(e,t)=>{zr.init(e,t),q.init(e,t)}),zc=/*@__PURE__*/ B(`ZodKSUID`,(e,t)=>{Br.init(e,t),q.init(e,t)}),Bc=/*@__PURE__*/ B(`ZodIPv4`,(e,t)=>{Gr.init(e,t),q.init(e,t)}),Vc=/*@__PURE__*/ B(`ZodIPv6`,(e,t)=>{Jr.init(e,t),q.init(e,t)}),Hc=/*@__PURE__*/ B(`ZodCIDRv4`,(e,t)=>{Yr.init(e,t),q.init(e,t)}),Uc=/*@__PURE__*/ B(`ZodCIDRv6`,(e,t)=>{Zr.init(e,t),q.init(e,t)}),Wc=/*@__PURE__*/ B(`ZodBase64`,(e,t)=>{ei.init(e,t),q.init(e,t)}),Gc=/*@__PURE__*/ B(`ZodBase64URL`,(e,t)=>{ri.init(e,t),q.init(e,t)}),Kc=/*@__PURE__*/ B(`ZodE164`,(e,t)=>{ii.init(e,t),q.init(e,t)}),qc=/*@__PURE__*/ B(`ZodJWT`,(e,t)=>{oi.init(e,t),q.init(e,t)}),Jc=/*@__PURE__*/ B(`ZodNumber`,(e,t)=>{si.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ds(e,t,n,r),e.isFinite=!0},/*@__PURE__*/ St({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=G(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=G(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=G(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>G(e).format??null},{gt(e,t){return this.check(/* @__PURE__ */ fo(e,t))},gte(e,t){return this.check(/* @__PURE__ */ po(e,t))},min(e,t){return this.check(/* @__PURE__ */ po(e,t))},lt(e,t){return this.check(/* @__PURE__ */ lo(e,t))},lte(e,t){return this.check(/* @__PURE__ */ uo(e,t))},max(e,t){return this.check(/* @__PURE__ */ uo(e,t))},int(e){return this.check(Zc(e))},safe(e){return this.check(Zc(e))},positive(e){return this.check(/* @__PURE__ */ fo(0,e))},nonnegative(e){return this.check(/* @__PURE__ */ po(0,e))},negative(e){return this.check(/* @__PURE__ */ lo(0,e))},nonpositive(e){return this.check(/* @__PURE__ */ uo(0,e))},multipleOf(e,t){return this.check(/* @__PURE__ */ mo(e,t))},step(e,t){return this.check(/* @__PURE__ */ mo(e,t))},finite(){return this}}));function Yc(e){return/* @__PURE__ */ to(Jc,e)}var Xc=/*@__PURE__*/ B(`ZodNumberFormat`,(e,t)=>{ci.init(e,t),Jc.init(e,t)});function Zc(e){return/* @__PURE__ */ no(Xc,e)}var Qc=/*@__PURE__*/ B(`ZodBoolean`,(e,t)=>{li.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fs(e,t,n,r)});function $c(e){return/* @__PURE__ */ ro(Qc,e)}var el=/*@__PURE__*/ B(`ZodBigInt`,(e,t)=>{ui.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ps(e,t,n,r)},/*@__PURE__*/ St({minValue:e=>G(e).minimum??null,maxValue:e=>G(e).maximum??null,format:e=>G(e).format??null},{gte(e,t){return this.check(/* @__PURE__ */ po(e,t))},min(e,t){return this.check(/* @__PURE__ */ po(e,t))},gt(e,t){return this.check(/* @__PURE__ */ fo(e,t))},lt(e,t){return this.check(/* @__PURE__ */ lo(e,t))},lte(e,t){return this.check(/* @__PURE__ */ uo(e,t))},max(e,t){return this.check(/* @__PURE__ */ uo(e,t))},positive(e){return this.check(/* @__PURE__ */ fo(BigInt(0),e))},negative(e){return this.check(/* @__PURE__ */ lo(BigInt(0),e))},nonpositive(e){return this.check(/* @__PURE__ */ uo(BigInt(0),e))},nonnegative(e){return this.check(/* @__PURE__ */ po(BigInt(0),e))},multipleOf(e,t){return this.check(/* @__PURE__ */ mo(e,t))}}));function tl(e){return/* @__PURE__ */ io(el,e)}var nl=/*@__PURE__*/ B(`ZodNull`,(e,t)=>{di.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hs(e,t,n,r)});function rl(e){return/* @__PURE__ */ ao(nl,e)}var il=/*@__PURE__*/ B(`ZodAny`,(e,t)=>{fi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function al(){return/* @__PURE__ */ oo(il)}var ol=/*@__PURE__*/ B(`ZodUnknown`,(e,t)=>{pi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function sl(){return/* @__PURE__ */ so(ol)}var cl=/*@__PURE__*/ B(`ZodNever`,(e,t)=>{mi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vs(e,t,n,r)});function ll(e){return/* @__PURE__ */ co(cl,e)}var ul=/*@__PURE__*/ B(`ZodArray`,(e,t)=>{yc(),vi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ns(e,t,n,r),e.element=t.element},{min(e,t){return this.check(/* @__PURE__ */ go(e,t))},nonempty(e){return this.check(/* @__PURE__ */ go(1,e))},max(e,t){return this.check(/* @__PURE__ */ ho(e,t))},length(e,t){return this.check(/* @__PURE__ */ _o(e,t))},unwrap(){return this.element}});function dl(e,t){return/* @__PURE__ */ jo(ul,e,t)}var fl=/*@__PURE__*/ B(`ZodObject`,(e,t)=>{yc(),wi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fs(e,t,n,r),Ot(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Dl(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Le(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Le(this._zod.def,{catchall:sl()}))},loose(){return this.clone(Le(this._zod.def,{catchall:sl()}))},strict(){return this.clone(Le(this._zod.def,{catchall:ll()}))},strip(){return this.clone(Le(this._zod.def,{catchall:void 0}))},extend(e){return tt(this,e)},safeExtend(e){return rt(this,e)},merge(e){return it(this,e)},pick(e){return Qe(this,e)},omit(e){return et(this,e)},partial(...e){return at(Ml,this,e[0])},exactPartial(...e){return at(Pl,this,e[0],`exactPartial`)},required(...e){return ot(Hl,this,e[0])}});function pl(e,t){return new fl({type:`object`,shape:e??{},...R(t)})}function ml(e,t){return new fl({type:`object`,shape:e,catchall:ll(),...R(t)})}function hl(e,t){return new fl({type:`object`,shape:e,catchall:sl(),...R(t)})}var gl=/*@__PURE__*/ B(`ZodUnion`,(e,t)=>{Ei.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Is(e,t,n,r),e.options=t.options});function _l(e,t){return new gl({type:`union`,options:e,...R(t)})}var vl=/*@__PURE__*/ B(`ZodDiscriminatedUnion`,(e,t)=>{gl.init(e,t),Oi.init(e,t)});function yl(e,t,n){return new vl({type:`union`,options:t,discriminator:e,...R(n)})}var bl=/*@__PURE__*/ B(`ZodIntersection`,(e,t)=>{ki.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ls(e,t,n,r)});function xl(e,t){return new bl({type:`intersection`,left:e,right:t})}var Sl=/*@__PURE__*/ B(`ZodTuple`,(e,t)=>{yc(),Mi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rs(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new Ml({type:`optional`,innerType:e}))})}});function Cl(e,t,n){let r=t instanceof V;return new Sl({type:`tuple`,items:e,rest:r?t:null,...R(r?n:t)})}var wl=/*@__PURE__*/ B(`ZodRecord`,(e,t)=>{yc(),Ii.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hs(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Tl(e,t,n){return!t||!t._zod?new wl({type:`record`,keyType:Sc(),valueType:e,...R(t)}):new wl({type:`record`,keyType:e,valueType:t,...R(n)})}var El=/*@__PURE__*/ B(`ZodEnum`,(e,t)=>{Li.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ss(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 El({...t,checks:[],...R(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 El({...t,checks:[],...R(r),entries:i})}});function Dl(e,t){return new El({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...R(t)})}var Ol=/*@__PURE__*/ B(`ZodLiteral`,(e,t)=>{Ri.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cs(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function kl(e,t){return new Ol({type:`literal`,values:Array.isArray(e)?e:[e],...R(t)})}var Al=/*@__PURE__*/ B(`ZodTransform`,(e,t)=>{yc(),zi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>As(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new It(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(vt(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(vt(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function jl(e){return new Al({type:`transform`,transform:e})}var Ml=/*@__PURE__*/ B(`ZodOptional`,(e,t)=>{Vi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$s(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Nl(e){return new Ml({type:`optional`,innerType:e})}var Pl=/*@__PURE__*/ B(`ZodExactOptional`,(e,t)=>{Hi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$s(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Fl(e){return new Pl({type:`optional`,innerType:e})}var Il=/*@__PURE__*/ B(`ZodNullable`,(e,t)=>{Ui.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Us(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ll(e){return new Il({type:`nullable`,innerType:e})}var Rl=/*@__PURE__*/ B(`ZodDefault`,(e,t)=>{Wi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function zl(e,t){return new Rl({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():We(t)}})}var Bl=/*@__PURE__*/ B(`ZodPrefault`,(e,t)=>{Ki.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Js(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Vl(e,t){return new Bl({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():We(t)}})}var Hl=/*@__PURE__*/ B(`ZodNonOptional`,(e,t)=>{qi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ws(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ul(e,t){return new Hl({type:`nonoptional`,innerType:e,...R(t)})}var Wl=/*@__PURE__*/ B(`ZodCatch`,(e,t)=>{Xi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ys(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Gl(e,t){return new Wl({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:At(t)})}var Kl=/*@__PURE__*/ B(`ZodPipe`,(e,t)=>{Zi.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xs(e,t,n,r),e.in=t.in,e.out=t.out});function ql(e,t){return new Kl({type:`pipe`,in:e,out:t})}var Jl=/*@__PURE__*/ B(`ZodReadonly`,(e,t)=>{$i.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yl(e){return new Jl({type:`readonly`,innerType:e})}var Xl=/*@__PURE__*/ B(`ZodLazy`,(e,t)=>{ta.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ec(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Zl(e){return new Xl({type:`lazy`,getter:e})}var Ql=/*@__PURE__*/ B(`ZodCustom`,(e,t)=>{na.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Os(e,t,n,r)});function $l(e,t){return/* @__PURE__ */ Mo(Ql,e??(()=>!0),t)}function eu(e,t={}){return/* @__PURE__ */ No(Ql,e,t)}function tu(e,t){return/* @__PURE__ */ Po(e,t)}var nu=/*@__PURE__*/ B(`ZodInstanceOf`,(e,t)=>{Ql.init(e,t)},{properties(e,t){return this.check(/* @__PURE__ */ wo(e,t))}});function ru(e,t={}){let n=new nu({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...R(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function iu(e){let t=Zl(()=>_l([Sc(e),Yc(),$c(),rl(),dl(t),Tl(Sc(),t)]));return t}var au=m.createContext(void 0),ou=e=>{let t=m.useContext(au);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},su=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),/* @__PURE__ */ h(au.Provider,{value:e,children:t})),cu={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},lu=new class{#e=cu;#t=!1;setTimeoutProvider(e){process.env.NODE_ENV!==`production`&&this.#t&&e!==this.#e&&console.error(`[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,{previous:this.#e,provider:e}),this.#e=e,process.env.NODE_ENV!==`production`&&(this.#t=!1)}setTimeout(e,t){return process.env.NODE_ENV!==`production`&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!==`production`&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function uu(e){setTimeout(e,0)}var du=typeof window>`u`||`Deno`in globalThis;function fu(){}function pu(e,t){return typeof e==`function`?e(t):e}function mu(e){return typeof e==`number`&&e>=0&&e!==1/0}function hu(e,t){return Math.max(e+(t||0)-Date.now(),0)}function J(e,t){return typeof e==`function`?e(t):e}function gu(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==vu(o,t.options))return!1}else if(!bu(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function _u(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(yu(t.options.mutationKey)!==yu(a))return!1}else if(!bu(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function vu(e,t){return(t?.queryKeyHashFn||yu)(e)}function yu(e){return JSON.stringify(e,(e,t)=>Tu(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function bu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!bu(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!bu(e[r],t[r]))return!1;return!0}return!1}var xu=Object.prototype.hasOwnProperty;function Su(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=wu(e)&&wu(t);if(!r&&!(Tu(e)&&Tu(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:xu.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Su(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Cu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function wu(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Tu(e){if(!Eu(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!Eu(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function Eu(e){return Object.prototype.toString.call(e)===`[object Object]`}function Du(e){return new Promise(t=>{lu.setTimeout(t,e)})}function Ou(e,t,n){if(typeof n.structuralSharing==`function`)return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!==`production`)try{return Su(e,t)}catch(e){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`),e}return Su(e,t)}return t}function ku(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Au(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ju=Symbol();function Mu(e,t){return process.env.NODE_ENV!==`production`&&e.queryFn===ju&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ju?()=>Promise.reject(/* @__PURE__ */ Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Nu(e,t){return typeof e==`function`?e(...t):!!e}function Pu(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var Fu=()=>du,Iu=()=>Fu(),Lu=class{constructor(){this.listeners=/* @__PURE__ */ new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ru=new class extends Lu{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},zu=uu;function Bu(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=zu,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Y=Bu(),Vu=new class extends Lu{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Hu(e){return Math.min(1e3*2**e,3e4)}function Uu(e){return(e??`online`)!==`online`||Vu.isOnline()}var Wu=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Gu(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(fu);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new Wu(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Ru.isFocused()&&(e.networkMode===`always`||Vu.isOnline())&&e.canRun(),p=()=>Uu(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Iu()?0:3),a=e.retryDelay??Hu,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),Du(o).then(()=>f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var Ku=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mu(this.gcTime)&&(this.#e=lu.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Iu()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(lu.clearTimeout(this.#e),this.#e=void 0)}};function qu(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Pu(e,()=>t.signal,()=>n=!0)},u=Mu(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Au:ku;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Yu:Ju,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:Ju(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Ju(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Yu(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Xu=class extends Ku{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=$u(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=$u(this.options);e.data!==void 0&&(this.setState(Qu(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Ou(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(fu).catch(fu):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>J(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ju||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>J(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!hu(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}process.env.NODE_ENV!==`production`&&(Array.isArray(this.options.queryKey)||console.error(`As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`));let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Mu(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?qu(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=Gu({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Wu&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw process.env.NODE_ENV!==`production`&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Wu){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Zu(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Qu(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Y.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Zu(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Uu(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Qu(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function $u(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ed=class extends Lu{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=/* @__PURE__ */ new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),nd(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return rd(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return rd(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=/* @__PURE__ */ new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof J(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Cu(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&id(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||J(this.options.enabled,this.#t)!==J(t.enabled,this.#t)||J(this.options.staleTime,this.#t)!==J(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||J(this.options.enabled,this.#t)!==J(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Cu(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(fu)),t}#h(e){return!Iu()&&J(this.options.enabled,this.#t)!==!1&&mu(e)}#g(){this.#b();let e=J(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=hu(this.#r.dataUpdatedAt,e)+1;this.#u=lu.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return J(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=lu.setInterval(()=>{(this.options.refetchIntervalInBackground||Ru.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(lu.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(lu.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&nd(e,t),o=i&&id(e,n,t,r);(a||o)&&(l={...l,...Zu(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Ou(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Ou(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:ad(e,t),refetch:this.refetch,isEnabled:J(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Cu(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();Y.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function td(e,t){return J(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||J(t.retryOnMount,e)!==!1)}function nd(e,t){return td(e,t)||e.state.data!==void 0&&rd(e,t,t.refetchOnMount)}function rd(e,t,n){if(J(t.enabled,e)!==!1&&J(t.staleTime,e)!==`static`){let r=J(n,e);return r===`always`||r!==!1&&ad(e,t)}return!1}function id(e,t,n,r){return(e!==t||J(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&ad(e,n)}function ad(e,t){return J(t.enabled,e)!==!1&&e.isStaleByTime(J(t.staleTime,e))}var od=class extends Ku{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||sd(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=Gu({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(/* @__PURE__ */ Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Y.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function sd(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var cd=class extends Lu{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=/* @__PURE__ */ new Set,this.#t=/* @__PURE__ */ new Map,this.#n=0}build(e,t,n){let r=new od({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ld(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ld(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ld(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=ld(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Y.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>_u(t,e))}findAll(e={}){return this.getAll().filter(t=>_u(e,t))}notify(e){Y.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Y.batch(()=>Promise.all(e.map(e=>e.continue().catch(fu))))}};function ld(e){return e.options.scope?.id}var ud=class extends Lu{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Cu(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&yu(t.mutationKey)!==yu(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??sd();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Y.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},dd=class extends Lu{#e;constructor(e={}){super(),this.config=e,this.#e=/* @__PURE__ */ new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??vu(r,t),a=this.get(i);return a||(a=new Xu({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Y.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>gu(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>gu(e,t)):t}notify(e){Y.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Y.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Y.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},fd=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new dd,this.#t=e.mutationCache||new cd,this.#n=e.defaultOptions||{},this.#r=/* @__PURE__ */ new Map,this.#i=/* @__PURE__ */ new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Ru.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Vu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(J(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=pu(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Y.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Y.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Y.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=Y.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(fu).catch(fu)}invalidateQueries(e,t={}){return Y.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Y.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(fu)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(fu)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(J(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(J(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(fu).catch(fu)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(fu).catch(fu)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Vu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(yu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{bu(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(yu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{bu(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=vu(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===ju&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},pd=m.createContext(!1),md=()=>m.useContext(pd);pd.Provider;function hd(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var gd=m.createContext(hd()),_d=()=>m.useContext(gd),vd=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?Nu(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},yd=e=>{m.useEffect(()=>{e.clearReset()},[e])},bd=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Nu(n,[e.error,r])),xd=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Sd=(e,t)=>e?.suspense&&t.isPending,Cd=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function wd(e,t,n){if(process.env.NODE_ENV!==`production`&&(typeof e!=`object`||Array.isArray(e)))throw Error(`Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object`);let r=md(),i=_d(),a=ou(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash);process.env.NODE_ENV!==`production`&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`));let c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,xd(o),vd(o,i,s),yd(i);let[l]=m.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(m.useSyncExternalStore(m.useCallback(e=>{let t=d?l.subscribe(Y.batchCalls(e)):fu;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setOptions(o)},[o,l]),Sd(o,u))throw Cd(o,l,i);if(bd({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Td(e,t){return wd(e,ed,t)}function Ed(e){return e}function Dd(e,t){let n=ou(t),[r]=m.useState(()=>new ud(n,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);let i=m.useSyncExternalStore(m.useCallback(e=>r.subscribe(Y.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=m.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(fu)},[r]);if(i.error&&Nu(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Od=new fd({defaultOptions:{queries:{staleTime:3e4,retry:1}}});async function kd(e){await Od.ensureQueryData(e).catch(()=>void 0)}var Ad=e=>e.path?`${e.path}: ${e.message}`:e.message;function jd(e){return`Validation failed:\n${e.map(e=>`- ${Ad(e)}`).join(`
|
|
122
|
+
`)}`}var Md=class extends Error{diagnostics;constructor(e){super(jd(e)),this.name=`ContentValidationError`,this.diagnostics=e}},Nd=/* @__PURE__ */ new Set([`listEntries`,`getEntry`,`getFileLayout`,`getStatus`,`getChanges`,`listMedia`,`getReferences`,`listTrash`]),Pd=e=>!Nd.has(e),Fd={"application/andrew-inset":[`ez`],"application/appinstaller":[`appinstaller`],"application/applixware":[`aw`],"application/appx":[`appx`],"application/appxbundle":[`appxbundle`],"application/atom+xml":[`atom`],"application/atomcat+xml":[`atomcat`],"application/atomdeleted+xml":[`atomdeleted`],"application/atomsvc+xml":[`atomsvc`],"application/atsc-dwd+xml":[`dwd`],"application/atsc-held+xml":[`held`],"application/atsc-rsat+xml":[`rsat`],"application/automationml-aml+xml":[`aml`],"application/automationml-amlx+zip":[`amlx`],"application/bdoc":[`bdoc`],"application/calendar+xml":[`xcs`],"application/ccxml+xml":[`ccxml`],"application/cdfx+xml":[`cdfx`],"application/cdmi-capability":[`cdmia`],"application/cdmi-container":[`cdmic`],"application/cdmi-domain":[`cdmid`],"application/cdmi-object":[`cdmio`],"application/cdmi-queue":[`cdmiq`],"application/cpl+xml":[`cpl`],"application/cu-seeme":[`cu`],"application/cwl":[`cwl`],"application/dash+xml":[`mpd`],"application/dash-patch+xml":[`mpp`],"application/davmount+xml":[`davmount`],"application/dicom":[`dcm`],"application/docbook+xml":[`dbk`],"application/dssc+der":[`dssc`],"application/dssc+xml":[`xdssc`],"application/ecmascript":[`ecma`],"application/emma+xml":[`emma`],"application/emotionml+xml":[`emotionml`],"application/epub+zip":[`epub`],"application/exi":[`exi`],"application/express":[`exp`],"application/fdf":[`fdf`],"application/fdt+xml":[`fdt`],"application/font-tdpfr":[`pfr`],"application/geo+json":[`geojson`],"application/gml+xml":[`gml`],"application/gpx+xml":[`gpx`],"application/gxf":[`gxf`],"application/gzip":[`gz`],"application/hjson":[`hjson`],"application/hyperstudio":[`stk`],"application/inkml+xml":[`ink`,`inkml`],"application/ipfix":[`ipfix`],"application/its+xml":[`its`],"application/java-archive":[`jar`,`war`,`ear`],"application/java-serialized-object":[`ser`],"application/java-vm":[`class`],"application/javascript":[`*js`],"application/json":[`json`,`map`],"application/json5":[`json5`],"application/jsonml+json":[`jsonml`],"application/ld+json":[`jsonld`],"application/lgr+xml":[`lgr`],"application/lost+xml":[`lostxml`],"application/mac-binhex40":[`hqx`],"application/mac-compactpro":[`cpt`],"application/mads+xml":[`mads`],"application/manifest+json":[`webmanifest`],"application/marc":[`mrc`],"application/marcxml+xml":[`mrcx`],"application/mathematica":[`ma`,`nb`,`mb`],"application/mathml+xml":[`mathml`],"application/mbox":[`mbox`],"application/media-policy-dataset+xml":[`mpf`],"application/mediaservercontrol+xml":[`mscml`],"application/metalink+xml":[`metalink`],"application/metalink4+xml":[`meta4`],"application/mets+xml":[`mets`],"application/mmt-aei+xml":[`maei`],"application/mmt-usd+xml":[`musd`],"application/mods+xml":[`mods`],"application/mp21":[`m21`,`mp21`],"application/mp4":[`*mp4`,`*mpg4`,`mp4s`,`m4p`],"application/msix":[`msix`],"application/msixbundle":[`msixbundle`],"application/msword":[`doc`,`dot`],"application/mxf":[`mxf`],"application/n-quads":[`nq`],"application/n-triples":[`nt`],"application/node":[`cjs`],"application/octet-stream":[`bin`,`dms`,`lrf`,`mar`,`so`,`dist`,`distz`,`pkg`,`bpk`,`dump`,`elc`,`deploy`,`exe`,`dll`,`deb`,`dmg`,`iso`,`img`,`msi`,`msp`,`msm`,`buffer`],"application/oda":[`oda`],"application/oebps-package+xml":[`opf`],"application/ogg":[`ogx`],"application/omdoc+xml":[`omdoc`],"application/onenote":[`onetoc`,`onetoc2`,`onetmp`,`onepkg`,`one`,`onea`],"application/oxps":[`oxps`],"application/p2p-overlay+xml":[`relo`],"application/patch-ops-error+xml":[`xer`],"application/pdf":[`pdf`],"application/pgp-encrypted":[`pgp`],"application/pgp-keys":[`asc`],"application/pgp-signature":[`sig`,`*asc`],"application/pics-rules":[`prf`],"application/pkcs10":[`p10`],"application/pkcs7-mime":[`p7m`,`p7c`],"application/pkcs7-signature":[`p7s`],"application/pkcs8":[`p8`],"application/pkix-attr-cert":[`ac`],"application/pkix-cert":[`cer`],"application/pkix-crl":[`crl`],"application/pkix-pkipath":[`pkipath`],"application/pkixcmp":[`pki`],"application/pls+xml":[`pls`],"application/postscript":[`ai`,`eps`,`ps`],"application/provenance+xml":[`provx`],"application/pskc+xml":[`pskcxml`],"application/raml+yaml":[`raml`],"application/rdf+xml":[`rdf`,`owl`],"application/reginfo+xml":[`rif`],"application/relax-ng-compact-syntax":[`rnc`],"application/resource-lists+xml":[`rl`],"application/resource-lists-diff+xml":[`rld`],"application/rls-services+xml":[`rs`],"application/route-apd+xml":[`rapd`],"application/route-s-tsid+xml":[`sls`],"application/route-usd+xml":[`rusd`],"application/rpki-ghostbusters":[`gbr`],"application/rpki-manifest":[`mft`],"application/rpki-roa":[`roa`],"application/rsd+xml":[`rsd`],"application/rss+xml":[`rss`],"application/rtf":[`rtf`],"application/sbml+xml":[`sbml`],"application/scvp-cv-request":[`scq`],"application/scvp-cv-response":[`scs`],"application/scvp-vp-request":[`spq`],"application/scvp-vp-response":[`spp`],"application/sdp":[`sdp`],"application/senml+xml":[`senmlx`],"application/sensml+xml":[`sensmlx`],"application/set-payment-initiation":[`setpay`],"application/set-registration-initiation":[`setreg`],"application/shf+xml":[`shf`],"application/sieve":[`siv`,`sieve`],"application/smil+xml":[`smi`,`smil`],"application/sparql-query":[`rq`],"application/sparql-results+xml":[`srx`],"application/sql":[`sql`],"application/srgs":[`gram`],"application/srgs+xml":[`grxml`],"application/sru+xml":[`sru`],"application/ssdl+xml":[`ssdl`],"application/ssml+xml":[`ssml`],"application/swid+xml":[`swidtag`],"application/tei+xml":[`tei`,`teicorpus`],"application/thraud+xml":[`tfi`],"application/timestamped-data":[`tsd`],"application/toml":[`toml`],"application/trig":[`trig`],"application/ttml+xml":[`ttml`],"application/ubjson":[`ubj`],"application/urc-ressheet+xml":[`rsheet`],"application/urc-targetdesc+xml":[`td`],"application/voicexml+xml":[`vxml`],"application/wasm":[`wasm`],"application/watcherinfo+xml":[`wif`],"application/widget":[`wgt`],"application/winhlp":[`hlp`],"application/wsdl+xml":[`wsdl`],"application/wspolicy+xml":[`wspolicy`],"application/xaml+xml":[`xaml`],"application/xcap-att+xml":[`xav`],"application/xcap-caps+xml":[`xca`],"application/xcap-diff+xml":[`xdf`],"application/xcap-el+xml":[`xel`],"application/xcap-ns+xml":[`xns`],"application/xenc+xml":[`xenc`],"application/xfdf":[`xfdf`],"application/xhtml+xml":[`xhtml`,`xht`],"application/xliff+xml":[`xlf`],"application/xml":[`xml`,`xsl`,`xsd`,`rng`],"application/xml-dtd":[`dtd`],"application/xop+xml":[`xop`],"application/xproc+xml":[`xpl`],"application/xslt+xml":[`*xsl`,`xslt`],"application/xspf+xml":[`xspf`],"application/xv+xml":[`mxml`,`xhvml`,`xvml`,`xvm`],"application/yang":[`yang`],"application/yin+xml":[`yin`],"application/zip":[`zip`],"application/zip+dotlottie":[`lottie`],"audio/3gpp":[`*3gpp`],"audio/aac":[`adts`,`aac`],"audio/adpcm":[`adp`],"audio/amr":[`amr`],"audio/basic":[`au`,`snd`],"audio/midi":[`mid`,`midi`,`kar`,`rmi`],"audio/mobile-xmf":[`mxmf`],"audio/mp3":[`*mp3`],"audio/mp4":[`m4a`,`mp4a`,`m4b`],"audio/mpeg":[`mpga`,`mp2`,`mp2a`,`mp3`,`m2a`,`m3a`],"audio/ogg":[`oga`,`ogg`,`spx`,`opus`],"audio/s3m":[`s3m`],"audio/silk":[`sil`],"audio/wav":[`wav`],"audio/wave":[`*wav`],"audio/webm":[`weba`],"audio/xm":[`xm`],"font/collection":[`ttc`],"font/otf":[`otf`],"font/ttf":[`ttf`],"font/woff":[`woff`],"font/woff2":[`woff2`],"image/aces":[`exr`],"image/apng":[`apng`],"image/avci":[`avci`],"image/avcs":[`avcs`],"image/avif":[`avif`],"image/bmp":[`bmp`,`dib`],"image/cgm":[`cgm`],"image/dicom-rle":[`drle`],"image/dpx":[`dpx`],"image/emf":[`emf`],"image/fits":[`fits`],"image/g3fax":[`g3`],"image/gif":[`gif`],"image/heic":[`heic`],"image/heic-sequence":[`heics`],"image/heif":[`heif`],"image/heif-sequence":[`heifs`],"image/hej2k":[`hej2`],"image/ief":[`ief`],"image/jaii":[`jaii`],"image/jais":[`jais`],"image/jls":[`jls`],"image/jp2":[`jp2`,`jpg2`],"image/jpeg":[`jpg`,`jpeg`,`jpe`],"image/jph":[`jph`],"image/jphc":[`jhc`],"image/jpm":[`jpm`,`jpgm`],"image/jpx":[`jpx`,`jpf`],"image/jxl":[`jxl`],"image/jxr":[`jxr`],"image/jxra":[`jxra`],"image/jxrs":[`jxrs`],"image/jxs":[`jxs`],"image/jxsc":[`jxsc`],"image/jxsi":[`jxsi`],"image/jxss":[`jxss`],"image/ktx":[`ktx`],"image/ktx2":[`ktx2`],"image/pjpeg":[`jfif`],"image/png":[`png`],"image/sgi":[`sgi`],"image/svg+xml":[`svg`,`svgz`],"image/t38":[`t38`],"image/tiff":[`tif`,`tiff`],"image/tiff-fx":[`tfx`],"image/webp":[`webp`],"image/wmf":[`wmf`],"message/disposition-notification":[`disposition-notification`],"message/global":[`u8msg`],"message/global-delivery-status":[`u8dsn`],"message/global-disposition-notification":[`u8mdn`],"message/global-headers":[`u8hdr`],"message/rfc822":[`eml`,`mime`,`mht`,`mhtml`],"model/3mf":[`3mf`],"model/gltf+json":[`gltf`],"model/gltf-binary":[`glb`],"model/iges":[`igs`,`iges`],"model/jt":[`jt`],"model/mesh":[`msh`,`mesh`,`silo`],"model/mtl":[`mtl`],"model/obj":[`obj`],"model/prc":[`prc`],"model/step":[`step`,`stp`,`stpnc`,`p21`,`210`],"model/step+xml":[`stpx`],"model/step+zip":[`stpz`],"model/step-xml+zip":[`stpxz`],"model/stl":[`stl`],"model/u3d":[`u3d`],"model/vrml":[`wrl`,`vrml`],"model/x3d+binary":[`*x3db`,`x3dbz`],"model/x3d+fastinfoset":[`x3db`],"model/x3d+vrml":[`*x3dv`,`x3dvz`],"model/x3d+xml":[`x3d`,`x3dz`],"model/x3d-vrml":[`x3dv`],"text/cache-manifest":[`appcache`,`manifest`],"text/calendar":[`ics`,`ifb`],"text/coffeescript":[`coffee`,`litcoffee`],"text/css":[`css`],"text/csv":[`csv`],"text/html":[`html`,`htm`,`shtml`],"text/jade":[`jade`],"text/javascript":[`js`,`mjs`],"text/jsx":[`jsx`],"text/less":[`less`],"text/markdown":[`md`,`markdown`],"text/mathml":[`mml`],"text/mdx":[`mdx`],"text/n3":[`n3`],"text/plain":[`txt`,`text`,`conf`,`def`,`list`,`log`,`in`,`ini`],"text/richtext":[`rtx`],"text/rtf":[`*rtf`],"text/sgml":[`sgml`,`sgm`],"text/shex":[`shex`],"text/slim":[`slim`,`slm`],"text/spdx":[`spdx`],"text/stylus":[`stylus`,`styl`],"text/tab-separated-values":[`tsv`],"text/troff":[`t`,`tr`,`roff`,`man`,`me`,`ms`],"text/turtle":[`ttl`],"text/uri-list":[`uri`,`uris`,`urls`],"text/vcard":[`vcard`],"text/vtt":[`vtt`],"text/wgsl":[`wgsl`],"text/xml":[`*xml`],"text/yaml":[`yaml`,`yml`],"video/3gpp":[`3gp`,`3gpp`],"video/3gpp2":[`3g2`],"video/h261":[`h261`],"video/h263":[`h263`],"video/h264":[`h264`],"video/iso.segment":[`m4s`],"video/jpeg":[`jpgv`],"video/jpm":[`*jpm`,`*jpgm`],"video/mj2":[`mj2`,`mjp2`],"video/mp2t":[`ts`,`m2t`,`m2ts`,`mts`],"video/mp4":[`mp4`,`mp4v`,`mpg4`],"video/mpeg":[`mpeg`,`mpg`,`mpe`,`m1v`,`m2v`],"video/ogg":[`ogv`],"video/quicktime":[`qt`,`mov`],"video/webm":[`webm`]};Object.freeze(Fd);var Id=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},Ld,Rd,zd,Bd=class{constructor(...e){Ld.set(this,/* @__PURE__ */ new Map),Rd.set(this,/* @__PURE__ */ new Map),zd.set(this,/* @__PURE__ */ new Map);for(let t of e)this.define(t)}define(e,t=!1){for(let[n,r]of Object.entries(e)){n=n.toLowerCase(),r=r.map(e=>e.toLowerCase());let e=Id(this,zd,`f`).get(n);e||(e=/* @__PURE__ */ new Set,Id(this,zd,`f`).set(n,e));let i=!0;for(let a of r){let r=a.startsWith(`*`);if(a=r?a.slice(1):a,e.add(a),i&&Id(this,Rd,`f`).set(n,a),i=!1,r)continue;let o=Id(this,Ld,`f`).get(a);if(o&&o!=n&&!t)throw Error(`"${n} -> ${a}" conflicts with "${o} -> ${a}". Pass \`force=true\` to override this definition.`);Id(this,Ld,`f`).set(a,n)}}return this}getType(e){if(typeof e!=`string`)return null;let t=e.replace(/^.*[/\\]/s,``).toLowerCase(),n=t.replace(/^.*\./s,``).toLowerCase(),r=t.length<e.length;return!(n.length<t.length-1)&&r?null:Id(this,Ld,`f`).get(n)??null}getExtension(e){return typeof e==`string`?(e=e?.split?.(`;`)[0],(e&&Id(this,Rd,`f`).get(e.trim().toLowerCase()))??null):null}getAllExtensions(e){if(typeof e!=`string`)return null;e=e.split(`;`)[0].trim().toLowerCase();let t=Id(this,zd,`f`).get(e);return t?new Set(t):null}_freeze(){return this.define=()=>{throw Error(`define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances`)},Object.freeze(this),this}_getTestState(){return{types:Id(this,Ld,`f`),extensions:Id(this,Rd,`f`)}}};Ld=/* @__PURE__ */ new WeakMap,Rd=/* @__PURE__ */ new WeakMap,zd=/* @__PURE__ */ new WeakMap;var Vd=new Bd(Fd)._freeze(),Hd=/^[A-Za-z]:\//;function Ud(e=``){return e&&e.replace(/\\/g,`/`).replace(Hd,e=>e.toUpperCase())}var Wd=/^[/\\]{2}/,Gd=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Kd=/^[A-Za-z]:$/,qd=/^\/([A-Za-z]:)?$/,Jd=/.(\.[^./]+|\.)$/,Yd=function(e){if(e.length===0)return`.`;e=Ud(e);let t=e.match(Wd),n=ef(e),r=e[e.length-1]===`/`;return e=$d(e,!n),e.length===0?n?`/`:r?`./`:`.`:(r&&(e+=`/`),Kd.test(e)&&(e+=`/`),t?n?`//${e}`:`//./${e}`:n&&!ef(e)?`/${e}`:e)},Xd=function(...e){let t=``;for(let n of e)if(n){if(t.length>0){let e=t[t.length-1]===`/`,r=n[0]===`/`;t+=e&&r?n.slice(1):e||r?n:`/${n}`}else t+=n}return Yd(t)};function Zd(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}var Qd=function(...e){e=e.map(e=>Ud(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:Zd();i&&i.length!==0&&(t=`${i}/${t}`,n=ef(i))}return t=$d(t,!n),n&&!ef(t)?`/${t}`:t.length>0?t:`.`};function $d(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(i!==s-1&&a!==1){if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1}i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}var ef=function(e){return Gd.test(e)},tf=function(e){if(e===`..`)return``;let t=Jd.exec(Ud(e));return t&&t[1]||``},nf=function(e,t){let n=Qd(e).replace(qd,`$1`).split(`/`),r=Qd(t).replace(qd,`$1`).split(`/`);if(r[0][1]===`:`&&n[0][1]===`:`&&n[0]!==r[0])return r.join(`/`);let i=[...n];for(let e of i){if(r[0]!==e)break;n.shift(),r.shift()}return[...n.map(()=>`..`),...r].join(`/`)},rf=function(e){let t=Ud(e).replace(/\/$/,``).split(`/`).slice(0,-1);return t.length===1&&Kd.test(t[0])&&(t[0]+=`/`),t.join(`/`)||(ef(e)?`/`:`.`)},af=function(e,t){let n=Ud(e).split(`/`),r=``;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t){r=t;break}}return t&&r.endsWith(t)?r.slice(0,-t.length):r};function of(e,t){if(e.startsWith(`/`))return e;if(!t)throw Error(`Relative CMS asset path requires a base: ${e}`);return Xd(rf(Xd(`/`,t)),e)}function sf(...e){let t=Xd(...e);return t===`.`?``:t}function cf(e,t){let n=nf(t,e);return n.startsWith(`..`)?null:n}function lf(e,t){let n=e;for(let r=2;t(n);r++)n=`${e}-${r}`;return n}function uf(e){return e.s3?[`repo`,`s3`]:[`repo`]}function df(e,t){return uf(e).find(e=>e===t)??null}function ff(e){if(!e.s3)throw Error(`No object-store media library is configured.`);return e.s3}function pf(e,t){return t===`repo`?e.repo:ff(e)}function mf(e){return uf(e).flatMap(t=>pf(e,t).directory??[])}function hf(e,t){return pf(e,t).directory!=null}function gf(e,t){return t.maxFileSize!=null&&e>t.maxFileSize?`tooLarge`:t.minFileSize!=null&&e<t.minFileSize?`tooSmall`:null}function _f(e,t,n){return yf(t,e.extensions)?gf(n,e):`type`}var vf=/(?:^|\/)\.[^./]/;function yf(e,t){return vf.test(e)?!1:t==null||bf(e,t)}function bf(e,t){let n=e.toLowerCase();return t.some(e=>n.endsWith(e))}var xf=e=>s(e).split(`/`).map(encodeURIComponent).join(`/`);function Sf(e){let t=`a path under the media directory ("/${s(e.repo.directory)}/...")`;return e.s3?`${t} or a URL under "${e.s3.publicUrl}/"`:t}function Cf({library:e,path:t},n){return e===`s3`?Of(t,ff(n).publicUrl):`/${s(n.repo.directory)}/${s(t)}`}function wf(e,t,n){if(i(e)){let n=t.s3&&Tf(e,t.s3.publicUrl);return n?{library:`s3`,path:n}:null}let r=n&&!e.startsWith(`/`)?of(e,n):e,a=`${s(t.repo.directory)}/`,o=r.replace(/^\//,``);return o.startsWith(a)?{library:`repo`,path:o.slice(a.length)}:null}function Tf(e,t){let n=URL.parse(e),r=URL.parse(`${t}/`);if(!n||!r||n.origin!==r.origin||!n.pathname.startsWith(r.pathname))return null;try{return decodeURIComponent(n.pathname.slice(r.pathname.length))||null}catch{return null}}function Ef(e,t,n){let r=Cf(e,t);return e.library===`repo`&&n?nf(rf(n),r.slice(1)):r}function Df(e,t){let n=tf(e);return lf(e.slice(0,e.length-n.length),e=>t.has(`${e}${n}`))+n}function Of(e,t){return n(t,xf(e))}function kf(e){return Vd.getType(e)??`application/octet-stream`}function Af(e){let[t]=kf(e).split(`/`);return t===`image`||t===`video`||t===`audio`?t:`file`}var jf=[`cms`],Mf={all:jf,entries:e=>[...jf,`entries`,e],entry:(e,t)=>t===void 0?[...jf,`entry`,e]:[...jf,`entry`,e,t],fileLayout:e=>[...jf,`file-layout`,e],branchStatus:[...jf,`branch-status`],changes:[...jf,`changes`],media:e=>[...jf,`media`,e],trash:e=>[...jf,`trash`,e],references:[...jf,`references`]},Nf=[Mf.branchStatus,Mf.changes],Pf=({library:e})=>[Mf.media(e),Mf.trash(e),...hf(l.media,e)?Nf:[]],Ff=({collection:e})=>[Mf.entries(e),Mf.entry(e),Mf.fileLayout(e),Mf.references,...Nf],If={saveEntry:Ff,deleteEntry:Ff,renameEntry:Ff,duplicateEntry:Ff,reorderEntries:Ff,publish:()=>Nf,update:()=>[Mf.all],discard:()=>[Mf.all],renameMedia:Pf,deleteMedia:Pf,restoreMedia:Pf,purgeTrash:Pf,beginUpload:()=>[]};function Lf(e,t){return If[e]?.(t)??[]}function Rf(e){for(let t of new Map(e.map(e=>[JSON.stringify(e),e])).values())Od.invalidateQueries({queryKey:t})}var zf=e=>Rf(Pf({library:e})),Bf=class extends Error{status;constructor(e,t){super(e),this.name=`CmsError`,this.status=t}},Vf=e=>e instanceof Bf&&e.status===409,Hf=e=>e instanceof Bf&&e.status===412,Uf=class extends Error{constructor(){super(`Your session has expired. Sign in again.`),this.name=`UnauthenticatedError`}},Wf=!1;function Gf(){Wf||(Wf=!0,window.location.reload())}function Kf(e,t,n){return e===401?(Gf(),new Uf):n?.length?new Md(n):new Bf(t??`Request failed (${e})`,e)}async function qf(e){if(e.ok)return e.json();let{error:t}=await e.json().catch(()=>({}));throw Kf(e.status,t?.message,t?.validation)}var Jf=[];function Yf(){Jf.length===1&&setTimeout(Xf)}function Xf(){let e=Jf.splice(0,20);Jf.length&&setTimeout(Xf),Zf(e)}async function Zf(e){try{let t=await c(o(r),{method:`POST`,headers:{"content-type":`application/json`,...e.some(({op:e})=>Pd(e))&&{"x-astronaut-cms-write":`1`}},body:JSON.stringify(e.map(({op:e,input:t})=>({op:e,input:t})))});if(!t.ok){let{error:e}=await t.json().catch(()=>({}));throw Kf(t.status,e?.message,e?.validation)}let n=await t.json(),i=[];e.forEach((e,t)=>{let r=n[t];r?r.ok?(e.resolve(r.data),i.push(...e.keys)):e.reject(Kf(r.error.status,r.error.message,r.error.validation)):e.reject(new Bf(`The server answered with fewer results than operations.`,500))}),Rf(i)}catch(t){for(let n of e)n.reject(t)}}async function Qf(e,t){let{promise:n,resolve:r,reject:i}=Promise.withResolvers();return Jf.push({op:e,input:t,keys:Lf(e,t),resolve:r,reject:i}),Yf(),n}async function $f(){await c(o(a),{method:`POST`})}var ep=/* @__PURE__ */ t(((e,t)=>{var n=`\\\\/`,r=`[^${n}]`,i=0,a=`\\.`,o=`\\+`,s=`\\?`,c=`\\/`,l=`(?=.)`,u=`[^/]`,d=`(?:${c}|$)`,f=`(?:^|${c})`,p=`${a}{1,2}${d}`,m={DOT_LITERAL:a,PLUS_LITERAL:o,QMARK_LITERAL:s,SLASH_LITERAL:c,ONE_CHAR:l,QMARK:u,END_ANCHOR:d,DOTS_SLASH:p,NO_DOT:`(?!${a})`,NO_DOTS:`(?!${f}${p})`,NO_DOT_SLASH:`(?!${a}{0,1}${d})`,NO_DOTS_SLASH:`(?!${p})`,QMARK_NO_DOT:`[^.${c}]`,STAR:`${u}*?`,START_ANCHOR:f,SEP:`/`},h={...m,SLASH_LITERAL:`[${n}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${a}{1,2}(?:[${n}]|$)`,NO_DOT:`(?!${a})`,NO_DOTS:`(?!(?:^|[${n}])${a}{1,2}(?:[${n}]|$))`,NO_DOT_SLASH:`(?!${a}{0,1}(?:[${n}]|$))`,NO_DOTS_SLASH:`(?!${a}{1,2}(?:[${n}]|$))`,QMARK_NO_DOT:`[^.${n}]`,START_ANCHOR:`(?:^|[${n}])`,END_ANCHOR:`(?:[${n}]|$)`,SEP:`\\`};t.exports={DEFAULT_MAX_EXTGLOB_RECURSION:i,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?h:m}}})),tp=/* @__PURE__ */ t((e=>{var{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=ep();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),np=/* @__PURE__ */ t(((e,t)=>{var n=tp(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:_}=ep(),v=e=>e===l||e===a,y=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let b=t||{},x=e.length-1,S=b.parts===!0||b.tokens===!0||b.scanToEnd===!0,C=[],w=[],ee=[],te=e,T=-1,E=0,ne=0,re=!1,ie=!1,ae=!1,oe=!1,se=!1,ce=!1,D=!1,O=!1,k=!1,A=!1,le=0,j,M,N={value:``,depth:0,isGlob:!1},P=()=>T>=x,ue=()=>te.charCodeAt(T+1),F=()=>(j=M,te.charCodeAt(++T));for(;T<x;){M=F();let e;if(M===a)D=N.backslashes=!0,M=F(),M===u&&(ce=!0);else{if(ce===!0||M===u){for(le++;P()!==!0&&(M=F());)if(M===a)D=N.backslashes=!0,F();else if(M===u)le++;else{if(ce!==!0&&M===s&&(M=F())===s||ce!==!0&&M===o){if(re=N.isBrace=!0,ae=N.isGlob=!0,A=!0,S===!0)continue;break}if(M===h&&(le--,le===0)){ce=!1,re=N.isBrace=!0,A=!0;break}}if(S===!0)continue;break}if(M===l){if(C.push(T),w.push(N),N={value:``,depth:0,isGlob:!1},A===!0)continue;if(j===s&&T===E+1){E+=2;continue}ne=T+1}else{if(b.noext!==!0&&(M===p||M===i||M===r||M===m||M===c)&&ue()===d){if(ae=N.isGlob=!0,oe=N.isExtglob=!0,A=!0,M===c&&T===E&&(k=!0),S===!0){let e=0;for(;P()!==!0&&(M=F());)if(M===a)D=N.backslashes=!0,F();else if(M===d)e++;else if(M===g&&--e===0){A=!0;break}continue}break}if(M===r){if(j===r&&(se=N.isGlobstar=!0),ae=N.isGlob=!0,A=!0,S===!0)continue;break}if(M===m){if(ae=N.isGlob=!0,A=!0,S===!0)continue;break}if(M===f){for(;P()!==!0&&(e=F());)if(e===a)D=N.backslashes=!0,F();else if(e===_){ie=N.isBracket=!0,ae=N.isGlob=!0,A=!0;break}if(S===!0)continue;break}if(b.nonegate!==!0&&M===c&&T===E)O=N.negated=!0,E++;else{if(b.noparen!==!0&&M===d){if(ae=N.isGlob=!0,S===!0){let e=1;for(;P()!==!0&&(M=F());)if(M===a)D=N.backslashes=!0,F();else if(M===d)e++;else if(M===g&&--e===0){A=!0;break}continue}break}if(ae===!0){if(A=!0,S===!0)continue;break}}}}}b.noext===!0&&(oe=!1,ae=!1);let I=te,de=``,fe=``;E>0&&(de=te.slice(0,E),te=te.slice(E),ne-=E),I&&ae===!0&&ne>0?(I=te.slice(0,ne),fe=te.slice(ne)):ae===!0?(I=``,fe=te):I=te,I&&I!==``&&I!==`/`&&I!==te&&v(I.charCodeAt(I.length-1))&&(I=I.slice(0,-1)),b.unescape===!0&&(fe&&=n.removeBackslashes(fe),I&&D===!0&&(I=n.removeBackslashes(I)));let pe={prefix:de,input:e,start:E,base:I,glob:fe,isBrace:re,isBracket:ie,isGlob:ae,isExtglob:oe,isGlobstar:se,negated:O,negatedExtglob:k};if(b.tokens===!0&&(pe.maxDepth=0,v(M)||w.push(N),pe.tokens=w),b.parts===!0||b.tokens===!0){let t;for(let n=0;n<C.length;n++){let r=t===void 0?E:t+1,i=C[n],a=e.slice(r,i);b.tokens&&(n===0&&E!==0?(w[n].isPrefix=!0,w[n].value=de):w[n].value=a,y(w[n]),pe.maxDepth+=w[n].depth),i>=E&&(ee.push(a),t=i)}let n=t===void 0?E:t+1,r=e.slice(n);ee.push(r),b.tokens&&t&&t+1<e.length&&(w[w.length-1].value=r,y(w[w.length-1]),pe.maxDepth+=w[w.length-1].depth),pe.slashes=C,pe.parts=ee}return pe}})),rp=/* @__PURE__ */ t(((e,t)=>{var n=ep(),r=tp(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=e=>{let t=[],n=0,r=0,i=0,a=``,o=!1;for(let s of e)if(o===!0)a+=s,o=!1;else if(s===`\\`)a+=s,o=!0;else if(s===`"`)i=i===1?0:1,a+=s;else{if(i===0){if(s===`[`)n++;else if(s===`]`&&n>0)n--;else if(n===0){if(s===`(`)r++;else if(s===`)`&&r>0)r--;else if(s===`|`&&r===0){t.push(a),a=``;continue}}}a+=s}return t.push(a),t},f=e=>{let t=!1;for(let n of e)if(t===!0)t=!1;else if(n===`\\`)t=!0;else if(/[?*+@!()[\]{}]/.test(n))return!1;return!0},p=e=>{let t=e.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if(f(t))return t.replace(/\\(.)/g,`$1`)},m=e=>{let t=e.map(p).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let r=t[e],i=t[n],a=r[0];if(a&&r===a.repeat(r.length)&&i===a.repeat(i.length)&&(r===i||r.startsWith(i)||i.startsWith(r)))return!0}return!1},h=(e,t=!0)=>{if(e[0]!==`+`&&e[0]!==`*`||e[1]!==`(`)return;let n=0,r=0,i=0,a=!1;for(let o=1;o<e.length;o++){let s=e[o];if(a===!0)a=!1;else if(s===`\\`)a=!0;else if(s===`"`)i=i===1?0:1;else if(i!==1){if(s===`[`)n++;else if(s===`]`&&n>0)n--;else if(!(n>0)){if(s===`(`)r++;else if(s===`)`&&(r--,r===0))return t===!0&&o!==e.length-1?void 0:{type:e[0],body:e.slice(2,o),end:o}}}}},g=e=>`${e.length===1?r.escapeRegex(e[0]):`[${e.map(e=>r.escapeRegex(e)).join(``)}]`}*`,_=e=>{let t=0,n=[];for(;t<e.length;){let r=h(e.slice(t),!1);if(!r||r.type!==`*`)return;let i=d(r.body).map(e=>e.trim());if(i.length!==1)return;let a=p(i[0]);if(!a||a.length!==1)return;n.push(a),t+=r.end+1}if(!(n.length<1))return n},v=e=>{let t=0,n=e.trim(),r=h(n);for(;r;)t++,n=r.body.trim(),r=h(n);return t},y=(e,t)=>{if(t.maxExtglobRecursion===!1)return{risky:!1};let r=typeof t.maxExtglobRecursion==`number`?t.maxExtglobRecursion:n.DEFAULT_MAX_EXTGLOB_RECURSION,i=d(e).map(e=>e.trim());if(i.length>1&&(i.some(e=>e===``)||i.some(e=>/^[*?]+$/.test(e))||m(i)))return{risky:!0};let a=[],o=!1,s=!0;for(let e of i){let t=_(e);if(t){o=!0,a.push(...t);continue}let n=p(e);if(n&&n.length===1)a.push(n);else if(s=!1,v(e)>r)return{risky:!0}}return o?s?{risky:!0,safeOutput:g([...new Set(a)])}:{risky:!0}:{risky:!1}},b=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let d={...t},f=typeof d.maxLength==`number`?Math.min(i,d.maxLength):i,p=e.length;if(p>f)throw SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${f}`);let m={type:`bos`,value:``,output:d.prepend||``},h=[m],g=d.capture?``:`?:`,_=n.globChars(d.windows),v=n.extglobChars(_),{DOT_LITERAL:x,PLUS_LITERAL:S,SLASH_LITERAL:C,ONE_CHAR:w,DOTS_SLASH:ee,NO_DOT:te,NO_DOT_SLASH:T,NO_DOTS_SLASH:E,QMARK:ne,QMARK_NO_DOT:re,STAR:ie,START_ANCHOR:ae}=_,oe=e=>`(${g}(?:(?!${ae}${e.dot?ee:x}).)*?)`,se=d.dot?``:te,ce=d.dot?ne:re,D=d.bash===!0?oe(d):ie;d.capture&&(D=`(${D})`),typeof d.noext==`boolean`&&(d.noextglob=d.noext);let O={input:e,index:-1,start:0,dot:d.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:h};e=r.removePrefix(e,O),p=e.length;let k=[],A=[],le=[],j=m,M,N=()=>O.index===p-1,P=O.peek=(t=1)=>e[O.index+t],ue=O.advance=()=>e[++O.index]||``,F=()=>e.slice(O.index+1),I=(e=``,t=0)=>{O.consumed+=e,O.index+=t},de=e=>{O.output+=e.output==null?e.value:e.output,I(e.value)},fe=()=>{let e=1;for(;P()===`!`&&(P(2)!==`(`||P(3)===`?`);)ue(),O.start++,e++;return e%2!=0&&(O.negated=!0,O.start++,!0)},pe=e=>{O[e]++,le.push(e)},me=e=>{O[e]--,le.pop()},L=e=>{if(j.type===`globstar`){let t=O.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||k.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(O.output=O.output.slice(0,-j.output.length),j.type=`star`,j.value=`*`,j.output=D,O.output+=j.output)}k.length&&e.type!==`paren`&&(k[k.length-1].inner+=e.value),(e.value||e.output)&&de(e),j&&j.type===`text`&&e.type===`text`?(j.output=(j.output||j.value)+e.value,j.value+=e.value):(e.prev=j,h.push(e),j=e)},he=(e,t)=>{let n={...v[t],conditions:1,inner:``};n.prev=j,n.parens=O.parens,n.output=O.output,n.startIndex=O.index,n.tokensIndex=h.length;let r=(d.capture?`(`:``)+n.open;pe(`parens`),L({type:e,value:t,output:O.output?``:w}),L({type:`paren`,extglob:!0,value:ue(),output:r}),k.push(n)},ge=n=>{let i=e.slice(n.startIndex,O.index+1),a=y(e.slice(n.startIndex+2,O.index),d);if((n.type===`plus`||n.type===`star`)&&a.risky){let e=a.safeOutput?(n.output?``:w)+(d.capture?`(${a.safeOutput})`:a.safeOutput):void 0,t=h[n.tokensIndex];t.type=`text`,t.value=i,t.output=e||r.escapeRegex(i);for(let e=n.tokensIndex+1;e<h.length;e++)h[e].value=``,h[e].output=``,delete h[e].suffix;O.output=n.output+t.output,O.backtrack=!0,L({type:`paren`,extglob:!0,value:M,output:``}),me(`parens`);return}let o=n.close+(d.capture?`)`:``),s;if(n.type===`negate`){let e=D;n.inner&&n.inner.length>1&&n.inner.includes(`/`)&&(e=oe(d)),(e!==D||N()||/^\)+$/.test(F()))&&(o=n.close=`)$))${e}`),n.inner.includes(`*`)&&(s=F())&&/^\.[^\\/.]+$/.test(s)&&(o=n.close=`)${b(s,{...t,fastpaths:!1}).output})${e})`),n.prev.type===`bos`&&(O.negatedExtglob=!0)}L({type:`paren`,extglob:!0,value:M,output:o}),me(`parens`)};if(d.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?ne.repeat(a.length):``):o===0?ce+(a?ne.repeat(a.length):``):ne.repeat(r.length):i===`.`?x.repeat(r.length):i===`*`?t?t+i+(a?D:``):D:t?e:`\\${e}`);return n===!0&&(i=d.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&d.contains===!0?(O.output=e,O):(O.output=r.wrapOutput(i,O,t),O)}for(;!N();){if(M=ue(),M===`\0`)continue;if(M===`\\`){let e=P();if(e===`/`&&d.bash!==!0||e===`.`||e===`;`)continue;if(!e){M+=`\\`,L({type:`text`,value:M});continue}let t=/^\\+/.exec(F()),n=0;if(t&&t[0].length>2&&(n=t[0].length,O.index+=n,n%2!=0&&(M+=`\\`)),d.unescape===!0?M=ue():M+=ue(),O.brackets===0){L({type:`text`,value:M});continue}}if(O.brackets>0&&(M!==`]`||j.value===`[`||j.value===`[^`)){if(d.posix!==!1&&M===`:`){let e=j.value.slice(1);if(e.includes(`[`)&&(j.posix=!0,e.includes(`:`))){let e=j.value.lastIndexOf(`[`),t=j.value.slice(0,e),n=a[j.value.slice(e+2)];if(n){j.value=t+n,O.backtrack=!0,ue(),!m.output&&h.indexOf(j)===1&&(m.output=w);continue}}}(M===`[`&&P()!==`:`||M===`-`&&P()===`]`)&&(M=`\\${M}`),M===`]`&&(j.value===`[`||j.value===`[^`)&&(M=`\\${M}`),d.posix===!0&&M===`!`&&j.value===`[`&&(M=`^`),j.value+=M,de({value:M});continue}if(O.quotes===1&&M!==`"`){M=r.escapeRegex(M),j.value+=M,de({value:M});continue}if(M===`"`){O.quotes=O.quotes===1?0:1,d.keepQuotes===!0&&L({type:`text`,value:M});continue}if(M===`(`){pe(`parens`),L({type:`paren`,value:M});continue}if(M===`)`){if(O.parens===0&&d.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=k[k.length-1];if(e&&O.parens===e.parens+1){ge(k.pop());continue}L({type:`paren`,value:M,output:O.parens?`)`:`\\)`}),me(`parens`);continue}if(M===`[`){if(d.nobracket===!0||!F().includes(`]`)){if(d.nobracket!==!0&&d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));M=`\\${M}`}else pe(`brackets`);L({type:`bracket`,value:M});continue}if(M===`]`){if(d.nobracket===!0||j&&j.type===`bracket`&&j.value.length===1){L({type:`text`,value:M,output:`\\${M}`});continue}if(O.brackets===0){if(d.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));L({type:`text`,value:M,output:`\\${M}`});continue}me(`brackets`);let e=j.value.slice(1);if(j.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(M=`/${M}`),j.value+=M,de({value:M}),d.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(j.value);if(O.output=O.output.slice(0,-j.value.length),d.literalBrackets===!0){O.output+=t,j.value=t;continue}j.value=`(${g}${t}|${j.value})`,O.output+=j.value;continue}if(M===`{`&&d.nobrace!==!0){pe(`braces`);let e={type:`brace`,value:M,output:`(`,outputIndex:O.output.length,tokensIndex:O.tokens.length};A.push(e),L(e);continue}if(M===`}`){let e=A[A.length-1];if(d.nobrace===!0||!e){L({type:`text`,value:M,output:M});continue}let t=`)`;if(e.dots===!0){let e=h.slice(),n=[];for(let t=e.length-1;t>=0&&(h.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,d),O.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=O.output.slice(0,e.outputIndex),r=O.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,M=t=`\\}`,O.output=n;for(let e of r)O.output+=e.output||e.value}L({type:`brace`,value:M,output:t}),me(`braces`),A.pop();continue}if(M===`|`){k.length>0&&k[k.length-1].conditions++,L({type:`text`,value:M});continue}if(M===`,`){let e=M,t=A[A.length-1];t&&le[le.length-1]===`braces`&&(t.comma=!0,e=`|`),L({type:`comma`,value:M,output:e});continue}if(M===`/`){if(j.type===`dot`&&O.index===O.start+1){O.start=O.index+1,O.consumed=``,O.output=``,h.pop(),j=m;continue}L({type:`slash`,value:M,output:C});continue}if(M===`.`){if(O.braces>0&&j.type===`dot`){j.value===`.`&&(j.output=x);let e=A[A.length-1];j.type=`dots`,j.output+=M,j.value+=M,e.dots=!0;continue}if(O.braces+O.parens===0&&j.type!==`bos`&&j.type!==`slash`){L({type:`text`,value:M,output:x});continue}L({type:`dot`,value:M,output:x});continue}if(M===`?`){if(!(j&&j.value===`(`)&&d.noextglob!==!0&&P()===`(`&&P(2)!==`?`){he(`qmark`,M);continue}if(j&&j.type===`paren`){let e=P(),t=M;(j.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(F()))&&(t=`\\${M}`),L({type:`text`,value:M,output:t});continue}if(d.dot!==!0&&(j.type===`slash`||j.type===`bos`)){L({type:`qmark`,value:M,output:re});continue}L({type:`qmark`,value:M,output:ne});continue}if(M===`!`){if(d.noextglob!==!0&&P()===`(`&&(P(2)!==`?`||!/[!=<:]/.test(P(3)))){he(`negate`,M);continue}if(d.nonegate!==!0&&O.index===0){fe();continue}}if(M===`+`){if(d.noextglob!==!0&&P()===`(`&&P(2)!==`?`){he(`plus`,M);continue}if(j&&j.value===`(`||d.regex===!1){L({type:`plus`,value:M,output:S});continue}if(j&&(j.type===`bracket`||j.type===`paren`||j.type===`brace`)||O.parens>0){L({type:`plus`,value:M});continue}L({type:`plus`,value:S});continue}if(M===`@`){if(d.noextglob!==!0&&P()===`(`&&P(2)!==`?`){L({type:`at`,extglob:!0,value:M,output:``});continue}L({type:`text`,value:M});continue}if(M!==`*`){(M===`$`||M===`^`)&&(M=`\\${M}`);let e=o.exec(F());e&&(M+=e[0],O.index+=e[0].length),L({type:`text`,value:M});continue}if(j&&(j.type===`globstar`||j.star===!0)){j.type=`star`,j.star=!0,j.value+=M,j.output=D,O.backtrack=!0,O.globstar=!0,I(M);continue}let t=F();if(d.noextglob!==!0&&/^\([^?]/.test(t)){he(`star`,M);continue}if(j.type===`star`){if(d.noglobstar===!0){I(M);continue}let n=j.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(d.bash===!0&&(!i||t[0]&&t[0]!==`/`)){L({type:`star`,value:M,output:``});continue}let o=O.braces>0&&(n.type===`comma`||n.type===`brace`),s=k.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){L({type:`star`,value:M,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[O.index+4];if(n&&n!==`/`)break;t=t.slice(3),I(`/**`,3)}let c=N()||O.parens>0&&t===`)`.repeat(O.parens)&&!k.some(e=>e.type===`negate`);if(n.type===`bos`&&N()){j.type=`globstar`,j.value+=M,j.output=oe(d),O.output=j.output,O.globstar=!0,I(M);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&c){O.output=O.output.slice(0,-(n.output+j.output).length),n.output=`(?:${n.output}`,j.type=`globstar`,j.output=oe(d)+(d.strictSlashes?`)`:`|$)`),j.value+=M,O.globstar=!0,O.output+=n.output+j.output,I(M);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;O.output=O.output.slice(0,-(n.output+j.output).length),n.output=`(?:${n.output}`,j.type=`globstar`,j.output=`${oe(d)}${C}|${C}${e})`,j.value+=M,O.output+=n.output+j.output,O.globstar=!0,I(M+ue()),L({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){j.type=`globstar`,j.value+=M,j.output=`(?:^|${C}|${oe(d)}${C})`,O.output=j.output,O.globstar=!0,I(M+ue()),L({type:`slash`,value:`/`,output:``});continue}O.output=O.output.slice(0,-j.output.length),j.type=`globstar`,j.output=oe(d),j.value+=M,O.output+=j.output,O.globstar=!0,I(M);continue}let n={type:`star`,value:M,output:D};d.bash===!0?(n.output=`.*?`,(j.type===`bos`||j.type===`slash`)&&(n.output=se+n.output),L(n)):j&&(j.type===`bracket`||j.type===`paren`)&&d.regex===!0?(n.output=M,L(n)):((O.index===O.start||j.type===`slash`||j.type===`dot`)&&(j.type===`dot`?(O.output+=T,j.output+=T):d.dot===!0?(O.output+=E,j.output+=E):(O.output+=se,j.output+=se),P()!==`*`&&(O.output+=w,j.output+=w)),L(n))}for(;O.brackets>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));O.output=r.escapeLast(O.output,`[`),me(`brackets`)}for(;O.parens>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));O.output=r.escapeLast(O.output,`(`),me(`parens`)}for(;O.braces>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));O.output=r.escapeLast(O.output,`{`),me(`braces`)}if(d.strictSlashes!==!0&&(j.type===`star`||j.type===`bracket`)&&L({type:`maybe_slash`,value:``,output:`${C}?`}),O.backtrack===!0){O.output=``;for(let e of O.tokens)O.output+=e.output==null?e.value:e.output,e.suffix&&(O.output+=e.suffix)}return O};b.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:_}=n.globChars(a.windows),v=a.dot?m:p,y=a.dot?h:p,b=a.capture?``:`?:`,x={negated:!1,prefix:``},S=a.bash===!0?`.*?`:g;a.capture&&(S=`(${S})`);let C=e=>e.noglobstar===!0?S:`(${b}(?:(?!${_}${e.dot?f:l}).)*?)`,w=e=>{switch(e){case`*`:return`${v}${d}${S}`;case`.*`:return`${l}${d}${S}`;case`*.*`:return`${v}${S}${l}${d}${S}`;case`*/*`:return`${v}${S}${u}${d}${y}${S}`;case`**`:return v+C(a);case`**/*`:return`(?:${v}${C(a)}${u})?${y}${d}${S}`;case`**/*.*`:return`(?:${v}${C(a)}${u})?${y}${S}${l}${d}${S}`;case`**/.*`:return`(?:${v}${C(a)}${u})?${l}${d}${S}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=w(t[1]);return n?n+l+t[2]:void 0}}},ee=w(r.removePrefix(e,x));return ee&&a.strictSlashes!==!0&&(ee+=`${u}?`),ee},t.exports=b})),ip=/* @__PURE__ */ t(((e,t)=>{var n=np(),r=rp(),i=tp(),a=ep(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),!r||p)};return n&&(d.state=l),d};s.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n,r=n&&n.windows)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e,{windows:r})),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),s.compileRe(a,t,n,i)},s.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},s.constants=a,t.exports=s})),ap=/* @__PURE__ */ e((/* @__PURE__ */ t(((e,t)=>{t.exports=ip()})))(),1),op=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g;Object.hasOwnProperty;function sp(e,t){return typeof e==`string`?(t||(e=e.toLowerCase()),e.replace(op,``).replace(/ /g,`-`)):``}var cp=Symbol.for(`yaml.alias`),lp=Symbol.for(`yaml.document`),up=Symbol.for(`yaml.map`),dp=Symbol.for(`yaml.pair`),fp=Symbol.for(`yaml.scalar`),pp=Symbol.for(`yaml.seq`),mp=Symbol.for(`yaml.node.type`),hp=e=>!!e&&typeof e==`object`&&e[mp]===cp,gp=e=>!!e&&typeof e==`object`&&e[mp]===lp,_p=e=>!!e&&typeof e==`object`&&e[mp]===up,X=e=>!!e&&typeof e==`object`&&e[mp]===dp,Z=e=>!!e&&typeof e==`object`&&e[mp]===fp,vp=e=>!!e&&typeof e==`object`&&e[mp]===pp;function yp(e){if(e&&typeof e==`object`)switch(e[mp]){case up:case pp:return!0}return!1}function Q(e){if(e&&typeof e==`object`)switch(e[mp]){case cp:case up:case fp:case pp:return!0}return!1}var bp=e=>(Z(e)||yp(e))&&!!e.anchor,xp=Symbol(`break visit`),Sp=Symbol(`skip children`),Cp=Symbol(`remove node`);function wp(e,t){let n=Ep(t);gp(e)?Tp(null,e.contents,n,Object.freeze([e]))===Cp&&(e.contents=null):Tp(null,e,n,Object.freeze([]))}wp.BREAK=xp,wp.SKIP=Sp,wp.REMOVE=Cp;function Tp(e,t,n,r){let i=Dp(e,t,n,r);if(Q(i)||X(i))return Op(e,r,i),Tp(e,i,n,r);if(typeof i!=`symbol`){if(yp(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Tp(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===xp)return xp;else i===Cp&&(t.items.splice(e,1),--e)}}else if(X(t)){r=Object.freeze(r.concat(t));let e=Tp(`key`,t.key,n,r);if(e===xp)return xp;e===Cp&&(t.key=null);let i=Tp(`value`,t.value,n,r);if(i===xp)return xp;i===Cp&&(t.value=null)}}return i}function Ep(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Dp(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(_p(t))return n.Map?.(e,t,r);if(vp(t))return n.Seq?.(e,t,r);if(X(t))return n.Pair?.(e,t,r);if(Z(t))return n.Scalar?.(e,t,r);if(hp(t))return n.Alias?.(e,t,r)}function Op(e,t,n){let r=t[t.length-1];if(yp(r))r.items[e]=n;else if(X(r))e===`key`?r.key=n:r.value=n;else if(gp(r))r.contents=n;else{let e=hp(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}function kp(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function Ap(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=Ap(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=Ap(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=Ap(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=Ap(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function jp(e,t,n){if(Array.isArray(e))return e.map((e,t)=>jp(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!bp(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var Mp=class{constructor(e){Object.defineProperty(this,mp,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!gp(e))throw TypeError(`A document argument is required`);let a={anchors:/* @__PURE__ */ new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=jp(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?Ap(i,{"":o},``,o):o}},Np=class extends Mp{constructor(e){super(cp),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],wp(e,{Node:(e,t)=>{(hp(t)||bp(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);
|
|
123
|
+
/* istanbul ignore if */
|
|
124
|
+
if(a||=(jp(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Pp(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`)}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(kp(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function Pp(e,t,n){if(hp(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(yp(t)){let r=0;for(let i of t.items){let t=Pp(e,i,n);t>r&&(r=t)}return r}if(X(t)){let r=Pp(e,t.key,n),i=Pp(e,t.value,n);return Math.max(r,i)}return 1}var Fp=e=>!e||typeof e!=`function`&&typeof e!=`object`,$=class extends Mp{constructor(e){super(fp),this.value=e}toJSON(e,t){return t?.keep?this.value:jp(this.value,e,t)}toString(){return String(this.value)}};$.BLOCK_FOLDED=`BLOCK_FOLDED`,$.BLOCK_LITERAL=`BLOCK_LITERAL`,$.PLAIN=`PLAIN`,$.QUOTE_DOUBLE=`QUOTE_DOUBLE`,$.QUOTE_SINGLE=`QUOTE_SINGLE`;var Ip=`tag:yaml.org,2002:`;function Lp(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function Rp(e,t,n){if(gp(e)&&(e=e.contents),Q(e))return e;if(X(e)){let t=n.schema[up].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new Np(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=Ip+t.slice(2));let l=Lp(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new $(e);return c&&(c.node=t),t}l=e instanceof Map?o[up]:Symbol.iterator in Object(e)?o[pp]:o[up]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new $(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function zp(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=/* @__PURE__ */ new Map([[n,r]])}return Rp(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:/* @__PURE__ */ new Map})}var Bp=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,Vp=class extends Mp{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>Q(t)||X(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Bp(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(yp(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,zp(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(yp(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&Z(i)?i.value:i:yp(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!X(t))return!1;let n=t.value;return n==null||e&&Z(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return yp(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(yp(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,zp(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Hp=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Up(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Wp=(e,t,n)=>e.endsWith(`
|
|
125
|
+
`)?Up(n,t):n.includes(`
|
|
126
|
+
`)?`
|
|
127
|
+
`+Up(n,t):(e.endsWith(` `)?``:` `)+n,Gp=`flow`,Kp=`block`,qp=`quoted`;function Jp(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=Yp(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
|
128
|
+
`)n===`block`&&(h=Yp(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
|
129
|
+
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
|
130
|
+
`&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function Yp(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
|
131
|
+
`);r=t,i=t+1,a=e[i]}return r}var Xp=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Zp=e=>/^(%|---|\.\.\.)/m.test(e);function Qp(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
|
132
|
+
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function $p(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Zp(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
|
133
|
+
|
|
134
|
+
`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
|
|
135
|
+
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:Jp(o,a,qp,Xp(t,!1))}function em(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
136
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return $p(e,t);let n=t.indent||(Zp(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:Jp(r,n,Gp,Xp(t,!1))}function tm(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=$p;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?em:i&&!t?$p:n?em:$p}return r(e,t)}var nm;try{nm=/* @__PURE__ */ RegExp(`(^|(?<!
|
|
137
|
+
))
|
|
138
|
+
+(?!
|
|
139
|
+
|$)`,`g`)}catch{nm=/\n+(?!\n|$)/g}function rm({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return tm(n,r);let l=r.indent||(r.forceBlockIndent||Zp(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===$.BLOCK_FOLDED?!1:t===$.BLOCK_LITERAL||!Qp(n,c,l.length);if(!n)return u?`|
|
|
140
|
+
`:`>
|
|
141
|
+
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
|
|
142
|
+
`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
|
|
143
|
+
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
|
|
144
|
+
`&&(p=p.slice(0,-1)),p.replace(nm,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
|
145
|
+
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
|
|
146
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=Xp(r,!0);o!==`folded`&&t!==$.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=Jp(`${v}${e}${p}`,l,Kp,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function im(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
|
147
|
+
`)||u&&/[[\]{},]/.test(a))return tm(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
|
148
|
+
`)?tm(a,t):rm(e,t,n,r);if(!s&&!u&&i!==$.PLAIN&&a.includes(`
|
|
149
|
+
`))return rm(e,t,n,r);if(Zp(a)){if(c===``)return t.forceBlockIndent=!0,rm(e,t,n,r);if(s&&c===l)return tm(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return tm(a,t)}return s?d:Jp(d,c,Gp,Xp(t,!1))}function am(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==$.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=$.QUOTE_DOUBLE);let c=e=>{switch(e){case $.BLOCK_FOLDED:case $.BLOCK_LITERAL:return i||a?tm(o.value,t):rm(o,t,n,r);case $.QUOTE_DOUBLE:return $p(o.value,t);case $.QUOTE_SINGLE:return em(o.value,t);case $.PLAIN:return im(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function om(e,t){let n=Object.assign({blockQuote:!0,commentString:Hp,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:/* @__PURE__ */ new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function sm(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(Z(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function cm(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(Z(e)||yp(e))&&e.anchor;a&&kp(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function lm(e,t,n,r){if(X(e))return e.toString(t,n,r);if(hp(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=/* @__PURE__ */ new Set([e]),e=e.resolve(t.doc)}let i,a=Q(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=sm(t.doc.schema.tags,a);let o=cm(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):Z(a)?am(a,t,n,r):a.toString(t,n,r);return o?Z(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function um({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=Q(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(yp(e)||!Q(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||yp(e)||(Z(e)?e.type===$.BLOCK_FOLDED||e.type===$.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=lm(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=Wp(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=Wp(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=Wp(g,n.indent,l(f))));let _,v,y;Q(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&Z(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&vp(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=lm(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
|
150
|
+
`:``,v){let e=l(v);S+=`\n${Up(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
|
151
|
+
`&&y&&(S=`
|
|
152
|
+
|
|
153
|
+
`):S+=`\n${n.indent}`}else if(!p&&yp(t)){let e=x[0],r=x.indexOf(`
|
|
154
|
+
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
|
|
155
|
+
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=Wp(g,n.indent,l(y)):h&&i&&i(),g}function dm(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var fm=`<<`,pm={identify:e=>e===fm||typeof e==`symbol`&&e.description===fm,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new $(Symbol(fm)),{addToJSMap:hm}),stringify:()=>fm},mm=(e,t)=>(pm.identify(t)||Z(t)&&(!t.type||t.type===$.PLAIN)&&pm.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===pm.tag&&e.default);function hm(e,t,n){let r=_m(e,n);if(vp(r))for(let n of r.items)gm(e,t,n);else if(Array.isArray(r))for(let n of r)gm(e,t,n);else gm(e,t,r)}function gm(e,t,n){let r=_m(e,n);if(!_p(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function _m(e,t){return e&&hp(t)?t.resolve(e.doc,e):t}function vm(e,t,{key:n,value:r}){if(Q(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(mm(e,n))hm(e,t,r);else{let i=jp(n,``,e);if(t instanceof Map)t.set(i,jp(r,i,e));else if(t instanceof Set)t.add(i);else{let a=ym(n,i,e),o=jp(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function ym(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(Q(e)&&n?.doc){let t=om(n.doc,{});t.anchors=/* @__PURE__ */ new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),dm(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function bm(e,t,n){return new xm(Rp(e,void 0,n),Rp(t,void 0,n))}var xm=class e{constructor(e,t=null){Object.defineProperty(this,mp,{value:dp}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return Q(n)&&(n=n.clone(t)),Q(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return vm(t,t?.mapAsMap?/* @__PURE__ */ new Map:{},this)}toString(e,t,n){return e?.doc?um(this,e,t,n):JSON.stringify(this)}};function Sm(e,t,n){return(t.inFlow??e.flow?wm:Cm)(e,t,n)}function Cm({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(Q(i))!d&&i.spaceBefore&&f.push(``),Tm(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(X(i)){let e=Q(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),Tm(n,f,e.commentBefore,d))}d=!1;let s=lm(i,u,()=>o=null,()=>d=!0);o&&(s+=Wp(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
|
|
156
|
+
`}}return e?(p+=`
|
|
157
|
+
`+Up(l(e),c),s&&s()):d&&o&&o(),p}function wm({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(Q(i))i.spaceBefore&&d.push(``),Tm(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(X(i)){let e=Q(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),Tm(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=Q(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=lm(i,c,()=>a=null);l||=d.length>u||o.includes(`
|
|
158
|
+
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=Wp(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
|
159
|
+
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function Tm({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=Up(t(r),e);n.push(i.trimStart())}}function Em(e,t){let n=Z(t)?t.value:t;for(let r of e)if(X(r)&&(r.key===t||r.key===n||Z(r.key)&&r.key.value===n))return r}var Dm=class extends Vp{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(up,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(bm(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=X(e)?e:!e||typeof e!=`object`||!(`key`in e)?new xm(e,e?.value):new xm(e.key,e.value);let r=Em(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);Z(r.value)&&Fp(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=Em(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=Em(this.items,e)?.value;return(!t&&Z(n)?n.value:n)??void 0}has(e){return!!Em(this.items,e)}set(e,t){this.add(new xm(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?/* @__PURE__ */ new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)vm(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!X(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Sm(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},Om={collection:`map`,default:!0,nodeClass:Dm,tag:`tag:yaml.org,2002:map`,resolve(e,t){return _p(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>Dm.from(e,t,n)},km=class extends Vp{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(pp,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Am(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=Am(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&Z(r)?r.value:r}has(e){let t=Am(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=Am(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];Z(r)&&Fp(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(jp(e,String(r++),t));return n}toString(e,t,n){return e?Sm(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(Rp(a,void 0,n))}}return i}};function Am(e){let t=Z(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var jm={collection:`seq`,default:!0,nodeClass:km,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return vp(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>km.from(e,t,n)};function Mm(e){return typeof e==`bigint`||Number.isInteger(e)}var Nm=({value:e})=>JSON.stringify(e),Pm=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:Nm},{identify:e=>e==null,createNode:()=>new $(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:Nm},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:Nm},{identify:Mm,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Mm(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Nm}];[Om,jm].concat(Pm,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}});function Fm(e,t,n){let{replacer:r}=n,i=new km(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(bm(o,s,n))}return i}var Im=class e extends km{constructor(){super(),this.add=Dm.prototype.add.bind(this),this.delete=Dm.prototype.delete.bind(this),this.get=Dm.prototype.get.bind(this),this.has=Dm.prototype.has.bind(this),this.set=Dm.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=/* @__PURE__ */ new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(X(e)?(r=jp(e.key,``,t),i=jp(e.value,r,t)):r=jp(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=Fm(e,t,n),i=new this;return i.items=r.items,i}};Im.tag=`tag:yaml.org,2002:omap`;var Lm=class e extends Dm{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=X(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new xm(e.key,null):new xm(e,null),Em(this.items,t.key)||this.items.push(t)}get(e,t){let n=Em(this.items,e);return!t&&X(n)?Z(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=Em(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new xm(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(bm(e,null,n));return i}};Lm.tag=`tag:yaml.org,2002:set`;var Rm=Symbol(`break visit`),zm=Symbol(`skip children`),Bm=Symbol(`remove item`);function Vm(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),Hm(Object.freeze([]),e,t)}Vm.BREAK=Rm,Vm.SKIP=zm,Vm.REMOVE=Bm,Vm.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},Vm.parentCollection=(e,t)=>{let n=Vm.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function Hm(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=Hm(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===Rm)return Rm;else r===Bm&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}``.isWellFormed;var Um=e=>tf(e).slice(1),Wm=Zl(()=>_l([Sc(),$l(e=>typeof e==`number`),tl(),$c(),ru(Date),dl(Wm),Tl(Sc(),Wm)]));Tl(Sc(),Wm);var Gm=[`md`,`mdx`,`mdoc`],Km=[`json`,`yaml`,`yml`,`toml`],qm=[...Gm,...Km];function Jm(e){return qm.includes(e)?e:null}var Ym=new Intl.Collator(void 0,{numeric:!0});function Xm(e){return e===`natural`?(e,t)=>Ym.compare(e,t):(e,t)=>e.localeCompare(t)}function Zm(e,t){if(t===`file`)return[...e];let n=Xm(t);return e.toSorted((e,t)=>n(e.id,t.id))}function Qm(e){let t=/* @__PURE__ */ new WeakMap;return n=>{let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i}}var $m=({singleton:e})=>e?[e.main,...e.translations].map(e=>e.id):[],eh=new Set([`js`,`ts`,`mjs`].map(e=>`src/content/config.${e}`));function th(e){return[e.loaderPattern??[]].flat()}var nh=Qm(e=>{let t=th(e),n=t.filter(e=>e.startsWith(`!`)).map(e=>e.slice(1)),r=(0,ap.default)(t.filter(e=>!e.startsWith(`!`)),n.length>0?{ignore:n}:void 0),i=ch(e);return e=>{let t=nf(i,e);return!t.startsWith(`../`)&&!eh.has(e)&&r(t)}});function rh(e){let t=th(e).filter(e=>!e.startsWith(`!`)).map(t=>{let{base:n,isGlob:r}=ap.default.scan(t,{unescape:!0});return{path:sf(ch(e),n),file:!r}});return t.filter((e,n)=>t.findIndex(t=>t.path===e.path)===n&&!t.some(t=>t.path!==e.path&&ih(e.path,t)))}function ih(e,t){return t.file?e===t.path:t.path===``||e.startsWith(`${t.path}/`)}function ah(e,t){return t?.slug?String(t.slug):e.slice(0,e.length-tf(e).length).split(`/`).map(e=>sp(e)).join(`/`).replace(/\/index$/,``)}function oh(e,t,n){return ah(nf(ch(e),t),n)}function sh(e,t){let n=Jm(Um(t));return n&&nh(e)(t)?{id:oh(e,t),format:n,path:t}:null}function ch(e){return e.loaderBase??``}function lh(e,t,n){return e.loaderType===`file`&&e.loaderFileName?e.loaderFileName:rh(e).find(r=>r.file&&Um(r.path)===n&&oh(e,r.path)===t)?.path??Xd(ch(e),`${t}.${n}`)}function uh(e,t){if(t!=null){let e=Um(t);return e?[e]:null}let n=new Set(th({loaderPattern:e}).flatMap(e=>{let t=Um(e.trim());return t.startsWith(`{`)&&t.endsWith(`}`)?t.slice(1,-1).split(`,`):[t]}).map(e=>e.trim()).filter(Boolean));return n.size>0?[...n]:null}var dh={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};dh.node;var fh=p(dh),ph={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};ph.node;var mh=p(ph),hh={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};hh.node;var gh=p(hh),_h=f(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function vh({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return/* @__PURE__ */ h(r?d:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:u(_h({variant:t,size:n,className:e})),...i})}var yh=f(`group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function bh({className:e,variant:t,...n}){return/* @__PURE__ */ h(`div`,{"data-slot":`alert`,role:`alert`,className:u(yh({variant:t}),e),...n})}function xh({className:e,...t}){return/* @__PURE__ */ h(`div`,{"data-slot":`alert-title`,className:u(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,e),...t})}function Sh({className:e,...t}){return/* @__PURE__ */ h(`div`,{"data-slot":`alert-description`,className:u(`text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),...t})}function Ch({className:e,...t}){return/* @__PURE__ */ h(`div`,{"data-slot":`alert-action`,className:u(`absolute top-2 right-2`,e),...t})}function wh({title:e,action:t,className:n,children:r}){return/* @__PURE__ */ g(bh,{variant:`destructive`,className:n,children:[/* @__PURE__ */ h(mh,{}),e&&/* @__PURE__ */ h(xh,{children:e}),/* @__PURE__ */ h(Sh,{children:r}),t&&/* @__PURE__ */ h(Ch,{children:t})]})}export{Dl as $,kf as A,ne as At,lf as B,Sf as C,lc as Ct,mf as D,he as Dt,hf as E,Rt as Et,Cf as F,Md as G,rf as H,df as I,Dd as J,kd as K,Of as L,uf as M,_ as Mt,pf as N,_f as O,A as Ot,wf as P,ou as Q,Df as R,zf as S,Mc as St,bf as T,Yt as Tt,tf as U,af as V,Xd as W,Td as X,Ed as Y,su as Z,Vf as _,ml as _t,fh as a,$l as at,qf as b,_l as bt,Jm as c,Zc as ct,uh as d,kl as dt,ru as et,sh as f,hl as ft,Qf as g,Tl as gt,Um as h,pl as ht,mh as i,$c as it,Af as j,x as jt,Ef as k,ce as kt,Xm as l,iu as lt,Zm as m,Yc as mt,vh as n,al as nt,Gm as o,yl as ot,$m as p,ll as pt,Od as q,gh as r,dl as rt,Km as s,Oc as st,wh as t,rl as tt,lh as u,Zl as ut,Hf as v,Sc as vt,xf as w,nc as wt,Mf as x,sl as xt,$f as y,Cl as yt,cf as z};
|