@noxickon/onyx 1.0.5 → 1.1.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.
@@ -1,27 +0,0 @@
1
- "use strict";const k=require("react");require("graphql");const $r=require("@apollo/client");function Si(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const z=Si(k);function ki(e){return e[0]}function Ai(e,t){const n=[],r=[];for(let o=0;o<e.length;o++){const i=e[o];t(i)?n.push(i):r.push(i)}return[n,r]}function Oi(e){const t=Math.floor(Math.random()*e.length);return e[t]}function xr(e){return typeof e=="symbol"||e instanceof Symbol}function zi(e){return xr(e)?NaN:Number(e)}function $i(e){return e?(e=zi(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function xi(e){const t=$i(e),n=t%1;return n?t-n:t}function Ri(e,t,n){return t=t===void 0?1:xi(t),e.slice(0,t)}function Ii(e){return Array.from(new Set(e))}function Pi(e,t){return Ii(e.concat(t))}function Jt(e){return e}function Zi(){}function ji(e,t,n){return n==null?Math.min(e,t):Math.min(Math.max(e,t),n)}function Rr(e){return e==null||typeof e!="object"&&typeof e!="function"}function Ir(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Pt(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Qe(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Pr="[object RegExp]",Gt="[object String]",Xt="[object Number]",Yt="[object Boolean]",et="[object Arguments]",Zr="[object Symbol]",jr="[object Date]",Tr="[object Map]",Nr="[object Set]",Fr="[object Array]",Ti="[object Function]",Cr="[object ArrayBuffer]",He="[object Object]",Ni="[object Error]",Dr="[object DataView]",Ur="[object Uint8Array]",Mr="[object Uint8ClampedArray]",Lr="[object Uint16Array]",Br="[object Uint32Array]",Fi="[object BigUint64Array]",qr="[object Int8Array]",Wr="[object Int16Array]",Vr="[object Int32Array]",Ci="[object BigInt64Array]",Hr="[object Float32Array]",Kr="[object Float64Array]";function Di(e,t){return ne(e,void 0,e,new Map,t)}function ne(e,t,n,r=new Map,o=void 0){const i=o?.(e,t,n,r);if(i!==void 0)return i;if(Rr(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){const s=new Array(e.length);r.set(e,s);for(let c=0;c<e.length;c++)s[c]=ne(e[c],c,n,r,o);return Object.hasOwn(e,"index")&&(s.index=e.index),Object.hasOwn(e,"input")&&(s.input=e.input),s}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const s=new RegExp(e.source,e.flags);return s.lastIndex=e.lastIndex,s}if(e instanceof Map){const s=new Map;r.set(e,s);for(const[c,u]of e)s.set(c,ne(u,c,n,r,o));return s}if(e instanceof Set){const s=new Set;r.set(e,s);for(const c of e)s.add(ne(c,void 0,n,r,o));return s}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(Ir(e)){const s=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,s);for(let c=0;c<e.length;c++)s[c]=ne(e[c],c,n,r,o);return s}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const s=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,s),ee(s,e,n,r,o),s}if(typeof File<"u"&&e instanceof File){const s=new File([e],e.name,{type:e.type});return r.set(e,s),ee(s,e,n,r,o),s}if(e instanceof Blob){const s=new Blob([e],{type:e.type});return r.set(e,s),ee(s,e,n,r,o),s}if(e instanceof Error){const s=new e.constructor;return r.set(e,s),s.message=e.message,s.name=e.name,s.stack=e.stack,s.cause=e.cause,ee(s,e,n,r,o),s}if(typeof e=="object"&&Ui(e)){const s=Object.create(Object.getPrototypeOf(e));return r.set(e,s),ee(s,e,n,r,o),s}return e}function ee(e,t,n=e,r,o){const i=[...Object.keys(t),...Pt(t)];for(let s=0;s<i.length;s++){const c=i[s],u=Object.getOwnPropertyDescriptor(e,c);(u==null||u.writable)&&(e[c]=ne(t[c],c,n,r,o))}}function Ui(e){switch(Qe(e)){case et:case Fr:case Cr:case Dr:case Yt:case jr:case Hr:case Kr:case qr:case Wr:case Vr:case Tr:case Xt:case He:case Pr:case Nr:case Gt:case Zr:case Ur:case Mr:case Lr:case Br:return!0;default:return!1}}function Jr(e){return ne(e,void 0,e,new Map,void 0)}function Oe(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}function Mi(e,t){const n={},r=Object.keys(e);for(let o=0;o<r.length;o++){const i=r[o],s=e[i];n[i]=t(s,i,e)}return n}function ze(e){return e==="__proto__"}function Ee(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r++){const o=n[r];if(ze(o))continue;const i=t[o],s=e[o];Array.isArray(i)?Array.isArray(s)?e[o]=Ee(s,i):e[o]=Ee([],i):Oe(i)?Oe(s)?e[o]=Ee(s,i):e[o]=Ee({},i):(s===void 0||i!==void 0)&&(e[o]=i)}return e}function Li(e,t){const n={...e};for(let r=0;r<t.length;r++){const o=t[r];delete n[o]}return n}function Bi(e,t){const n={},r=Object.keys(e);for(let o=0;o<r.length;o++){const i=r[o],s=e[i];t(s,i)||(n[i]=s)}return n}function qi(e,t){const n={};for(let r=0;r<t.length;r++){const o=t[r];Object.hasOwn(e,o)&&(n[o]=e[o])}return n}function tt(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Wi(e,t,n){return Se(e,t,void 0,void 0,void 0,void 0,n)}function Se(e,t,n,r,o,i,s){const c=s(e,t,n,r,o,i);if(c!==void 0)return c;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return e===t;case"number":return e===t||Object.is(e,t);case"function":return e===t;case"object":return Ae(e,t,i,s)}return Ae(e,t,i,s)}function Ae(e,t,n,r){if(Object.is(e,t))return!0;let o=Qe(e),i=Qe(t);if(o===et&&(o=He),i===et&&(i=He),o!==i)return!1;switch(o){case Gt:return e.toString()===t.toString();case Xt:{const u=e.valueOf(),a=t.valueOf();return tt(u,a)}case Yt:case jr:case Zr:return Object.is(e.valueOf(),t.valueOf());case Pr:return e.source===t.source&&e.flags===t.flags;case Ti:return e===t}n=n??new Map;const s=n.get(e),c=n.get(t);if(s!=null&&c!=null)return s===t;n.set(e,t),n.set(t,e);try{switch(o){case Tr:{if(e.size!==t.size)return!1;for(const[u,a]of e.entries())if(!t.has(u)||!Se(a,t.get(u),u,e,t,n,r))return!1;return!0}case Nr:{if(e.size!==t.size)return!1;const u=Array.from(e.values()),a=Array.from(t.values());for(let l=0;l<u.length;l++){const p=u[l],y=a.findIndex(b=>Se(p,b,void 0,e,t,n,r));if(y===-1)return!1;a.splice(y,1)}return!0}case Fr:case Ur:case Mr:case Lr:case Br:case Fi:case qr:case Wr:case Vr:case Ci:case Hr:case Kr:{if(typeof Buffer<"u"&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let u=0;u<e.length;u++)if(!Se(e[u],t[u],u,e,t,n,r))return!1;return!0}case Cr:return e.byteLength!==t.byteLength?!1:Ae(new Uint8Array(e),new Uint8Array(t),n,r);case Dr:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:Ae(new Uint8Array(e),new Uint8Array(t),n,r);case Ni:return e.name===t.name&&e.message===t.message;case He:{if(!(Ae(e.constructor,t.constructor,n,r)||Oe(e)&&Oe(t)))return!1;const a=[...Object.keys(e),...Pt(e)],l=[...Object.keys(t),...Pt(t)];if(a.length!==l.length)return!1;for(let p=0;p<a.length;p++){const y=a[p],b=e[y];if(!Object.hasOwn(t,y))return!1;const d=t[y];if(!Se(b,d,y,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function Vi(e,t){return Wi(e,t,Zi)}function Gr(e){return typeof e=="function"}function Hi(e){return Number.isSafeInteger(e)&&e>=0}function Ki(e){return e==null}function Xr(e){return typeof e=="string"}function Ji(e){return Array.isArray(e)?e:Array.from(e)}function Qt(e){return e!=null&&typeof e!="function"&&Hi(e.length)}function Yr(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function en(e){return typeof e=="string"||typeof e=="symbol"?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}function tn(e){const t=[],n=e.length;if(n===0)return t;let r=0,o="",i="",s=!1;for(e.charCodeAt(0)===46&&(t.push(""),r++);r<n;){const c=e[r];i?c==="\\"&&r+1<n?(r++,o+=e[r]):c===i?i="":o+=c:s?c==='"'||c==="'"?i=c:c==="]"?(s=!1,t.push(o),o=""):o+=c:c==="["?(s=!0,o&&(t.push(o),o="")):c==="."?o&&(t.push(o),o=""):o+=c,r++}return o&&t.push(o),t}function ct(e,t,n){if(e==null)return n;switch(typeof t){case"string":{if(ze(t))return n;const r=e[t];return r===void 0?Yr(t)?ct(e,tn(t),n):n:r}case"number":case"symbol":{typeof t=="number"&&(t=en(t));const r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Gi(e,t,n);if(Object.is(t?.valueOf(),-0)?t="-0":t=String(t),ze(t))return n;const r=e[t];return r===void 0?n:r}}}function Gi(e,t,n){if(t.length===0)return n;let r=e;for(let o=0;o<t.length;o++){if(r==null||ze(t[o]))return n;r=r[t[o]]}return r===void 0?n:r}function Xi(e){return function(t){return ct(t,e)}}function nt(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function Yi(e,t,n){return typeof n!="function"?nn(e,t):Zt(e,t,function r(o,i,s,c,u,a){const l=n(o,i,s,c,u,a);return l!==void 0?!!l:Zt(o,i,r,a)},new Map)}function Zt(e,t,n,r){if(t===e)return!0;switch(typeof t){case"object":return Qi(e,t,n,r);case"function":return Object.keys(t).length>0?Zt(e,{...t},n,r):tt(e,t);default:return nt(e)?typeof t=="string"?t==="":!0:tt(e,t)}}function Qi(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return Qr(e,t,n,r);if(t instanceof Map)return es(e,t,n,r);if(t instanceof Set)return ts(e,t,n,r);const o=Object.keys(t);if(e==null)return o.length===0;if(o.length===0)return!0;if(r&&r.has(t))return r.get(t)===e;r&&r.set(t,e);try{for(let i=0;i<o.length;i++){const s=o[i];if(!Rr(e)&&!(s in e)||t[s]===void 0&&e[s]!==void 0||t[s]===null&&e[s]!==null||!n(e[s],t[s],s,e,t,r))return!1}return!0}finally{r&&r.delete(t)}}function es(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[o,i]of t.entries()){const s=e.get(o);if(n(s,i,o,e,t,r)===!1)return!1}return!0}function Qr(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const o=new Set;for(let i=0;i<t.length;i++){const s=t[i];let c=!1;for(let u=0;u<e.length;u++){if(o.has(u))continue;const a=e[u];let l=!1;if(n(a,s,i,e,t,r)&&(l=!0),l){o.add(u),c=!0;break}}if(!c)return!1}return!0}function ts(e,t,n,r){return t.size===0?!0:e instanceof Set?Qr([...e],[...t],n,r):!1}function nn(e,t){return Yi(e,t,()=>{})}function ns(e){return e=Jr(e),t=>nn(t,e)}function rs(e,t){return Di(e,(n,r,o,i)=>{if(typeof e=="object")switch(Object.prototype.toString.call(e)){case Xt:case Gt:case Yt:{const s=new e.constructor(e?.valueOf());return ee(s,e),s}case et:{const s={};return ee(s,e),s.length=e.length,s[Symbol.iterator]=e[Symbol.iterator],s}default:return}})}function os(e){return rs(e)}const is=/^(?:0|[1-9]\d*)$/;function eo(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return is.test(e)}}function to(e){return e!==null&&typeof e=="object"&&Qe(e)==="[object Arguments]"}function ke(e,t){let n;if(Array.isArray(t)?n=t:typeof t=="string"&&Yr(t)&&e?.[t]==null?n=tn(t):n=[t],n.length===0)return!1;let r=e;for(let o=0;o<n.length;o++){const i=n[o];if((r==null||!Object.hasOwn(r,i))&&!((Array.isArray(r)||to(r))&&eo(i)&&i<r.length))return!1;r=r[i]}return!0}function ss(e,t){switch(typeof e){case"object":{Object.is(e?.valueOf(),-0)&&(e="-0");break}case"number":{e=en(e);break}}return t=os(t),function(n){const r=ct(n,e);return r===void 0?ke(n,e):t===void 0?r===void 0:nn(r,t)}}function no(e){if(e==null)return Jt;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?ss(e[0],e[1]):ns(e);case"string":case"symbol":case"number":return Xi(e)}}function cs(e,t=Jt){if(!e)return[];if(t=no(t),!Array.isArray(e)){const o=[],i=Object.keys(e),s=Qt(e)?e.length:i.length;for(let c=0;c<s;c++){const u=i[c],a=e[u];t(a,u,e)&&o.push(a)}return o}const n=[],r=e.length;for(let o=0;o<r;o++){const i=e[o];t(i,o,e)&&n.push(i)}return n}function us(e){if(Qt(e))return ki(Ji(e))}const as=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ls=/^\w*$/;function fs(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||xr(e)?!0:typeof e=="string"&&(ls.test(e)||!as.test(e))||t!=null&&Object.hasOwn(t,e)}function ds(e){if(typeof e!="function")throw new TypeError("Expected a function");return function(...t){return!e.apply(this,t)}}function hs(e,t=Jt){return cs(e,ds(no(t)))}function vn(e){return e==null}const ps=(e,t,n)=>{const r=e[t];(!(Object.hasOwn(e,t)&&tt(r,n))||n===void 0&&!(t in e))&&(e[t]=n)};function ms(e,t,n,r){if(e==null&&!nt(e))return e;const o=fs(t,e)?[t]:Array.isArray(t)?t:typeof t=="string"?tn(t):[t];let i=e;for(let s=0;s<o.length&&i!=null;s++){const c=en(o[s]);if(ze(c))continue;let u;if(s===o.length-1)u=n(i[c]);else{const a=i[c],l=r?.(a,c,e);u=l!==void 0?l:nt(a)?a:eo(o[s+1])?[]:{}}ps(i,c,u),i=i[c]}return e}function ys(e,t,n){return ms(e,t,()=>n,()=>{})}function gs(e){const t=e?.constructor,n=typeof t=="function"?t.prototype:Object.prototype;return e===n}function bs(e){return Ir(e)}function ut(e){if(e==null)return!0;if(Qt(e))return typeof e.splice!="function"&&typeof e!="string"&&(typeof Buffer>"u"||!Buffer.isBuffer(e))&&!bs(e)&&!to(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return gs(e)?t.filter(n=>n!=="constructor").length===0:t.length===0}return!0}let ws=0;function _s(e=""){const t=++ws;return`${e}${t}`}function vs({defaultValue:e,name:t="Component",onChange:n,value:r}){const[o,i]=k.useState(e),s=r!==void 0,c=s?r:o,u=k.useRef(n);if(u.current=n,process.env.NODE_ENV!=="production"){const l=k.useRef(s);k.useEffect(()=>{const p=l.current;p!==s&&console.warn(`${t} is switching from ${p?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should maintain consistent control throughout their lifecycle.`),l.current=s},[s,t])}const a=k.useCallback(l=>{const p=Gr(l)?l(c):l;s?p!==r&&u.current?.(p):(i(p),u.current?.(p))},[s,r,c]);return[c,a]}const Es='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',Ss=({containerRef:e,options:t={}})=>{const{autoFocus:n=!1,enabled:r=!0,restoreFocus:o=!1,trapFocus:i=!1}=t,s=k.useRef(null),c=k.useCallback(()=>{if(!e.current)return[];const p=e.current.querySelectorAll(Es);return Array.from(p)},[e]),u=k.useCallback(()=>{const y=c()[0];y?y.focus():e.current&&e.current.focus()},[c,e]),a=k.useCallback(()=>{const p=c(),y=p[p.length-1];y&&y.focus()},[c]),l=k.useCallback(()=>document.activeElement,[]);return k.useEffect(()=>{if(!(!r||!e.current))return o&&(s.current=document.activeElement),n&&requestAnimationFrame(()=>{u()}),()=>{o&&s.current&&(s.current.focus(),s.current=null)}},[r,o,n,u,e]),k.useEffect(()=>{if(!r||!i||!e.current)return;const p=y=>{if(y.key!=="Tab")return;const b=c();if(b.length===0)return;const d=b[0],m=b[b.length-1],g=document.activeElement;y.shiftKey?g===d&&(y.preventDefault(),m.focus()):g===m&&(y.preventDefault(),d.focus())};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[r,i,c,e]),{focusFirst:u,focusLast:a,getCurrentFocus:l,getFocusableElements:c}};function h(e,t,n){function r(c,u){var a;Object.defineProperty(c,"_zod",{value:c._zod??{},enumerable:!1}),(a=c._zod).traits??(a.traits=new Set),c._zod.traits.add(e),t(c,u);for(const l in s.prototype)l in c||Object.defineProperty(c,l,{value:s.prototype[l].bind(c)});c._zod.constr=s,c._zod.def=u}const o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(c){var u;const a=n?.Parent?new i:this;r(a,c),(u=a._zod).deferred??(u.deferred=[]);for(const l of a._zod.deferred)l();return a}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class me extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ro extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const oo={};function ue(e){return oo}function ks(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function jt(e,t){return typeof t=="bigint"?t.toString():t}function rn(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Pe(e){return e==null}function on(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function As(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const u=r.match(/\d?e-(\d?)/);u?.[1]&&(o=Number.parseInt(u[1]))}const i=n>o?n:o,s=Number.parseInt(e.toFixed(i).replace(".","")),c=Number.parseInt(t.toFixed(i).replace(".",""));return s%c/10**i}const En=Symbol("evaluating");function $(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==En)return r===void 0&&(r=En,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function fe(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function de(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Sn(e){return JSON.stringify(e)}const io="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function rt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Os=rn(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function $e(e){if(rt(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(rt(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function so(e){return $e(e)?{...e}:Array.isArray(e)?[...e]:e}const zs=new Set(["string","number","symbol"]);function at(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function X(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function _(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new 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 $s(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const xs={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Rs(e,t){const n=e._zod.def,r=de(e._zod.def,{get shape(){const o={};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(o[i]=n.shape[i])}return fe(this,"shape",o),o},checks:[]});return X(e,r)}function Is(e,t){const n=e._zod.def,r=de(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete o[i]}return fe(this,"shape",o),o},checks:[]});return X(e,r)}function Ps(e,t){if(!$e(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=de(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return fe(this,"shape",i),i},checks:[]});return X(e,o)}function Zs(e,t){if(!$e(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const r={...e._zod.def.shape,...t};return fe(this,"shape",r),r},checks:e._zod.def.checks};return X(e,n)}function js(e,t){const n=de(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return fe(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return X(e,n)}function Ts(e,t,n){const r=de(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const s in n){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=e?new e({type:"optional",innerType:o[s]}):o[s])}else for(const s in o)i[s]=e?new e({type:"optional",innerType:o[s]}):o[s];return fe(this,"shape",i),i},checks:[]});return X(t,r)}function Ns(e,t,n){const r=de(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return fe(this,"shape",i),i},checks:[]});return X(t,r)}function pe(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 co(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Me(e){return typeof e=="string"?e:e?.message}function ae(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Me(e.inst?._zod.def?.error?.(e))??Me(t?.error?.(e))??Me(n.customError?.(e))??Me(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function uo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function sn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function xe(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const ao=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,jt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},lo=h("$ZodError",ao),fo=h("$ZodError",ao,{Parent:Error});function Fs(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Cs(e,t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>o({issues:c}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)r._errors.push(n(s));else{let c=r,u=0;for(;u<s.path.length;){const a=s.path[u];u===s.path.length-1?(c[a]=c[a]||{_errors:[]},c[a]._errors.push(n(s))):c[a]=c[a]||{_errors:[]},c=c[a],u++}}};return o(e),r}const cn=e=>(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new me;if(s.issues.length){const c=new(o?.Err??e)(s.issues.map(u=>ae(u,i,ue())));throw io(c,o?.callee),c}return s.value},un=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const c=new(o?.Err??e)(s.issues.map(u=>ae(u,i,ue())));throw io(c,o?.callee),c}return s.value},lt=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new me;return i.issues.length?{success:!1,error:new(e??lo)(i.issues.map(s=>ae(s,o,ue())))}:{success:!0,data:i.value}},Ds=lt(fo),ft=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>ae(s,o,ue())))}:{success:!0,data:i.value}},Us=ft(fo),Ms=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return cn(e)(t,n,o)},Ls=e=>(t,n,r)=>cn(e)(t,n,r),Bs=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return un(e)(t,n,o)},qs=e=>async(t,n,r)=>un(e)(t,n,r),Ws=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return lt(e)(t,n,o)},Vs=e=>(t,n,r)=>lt(e)(t,n,r),Hs=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ft(e)(t,n,o)},Ks=e=>async(t,n,r)=>ft(e)(t,n,r),Js=/^[cC][^\s-]{8,}$/,Gs=/^[0-9a-z]+$/,Xs=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ys=/^[0-9a-vA-V]{20}$/,Qs=/^[A-Za-z0-9]{27}$/,ec=/^[a-zA-Z0-9_-]{21}$/,tc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,nc=/^([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})$/,kn=e=>e?new 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)$/,rc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,oc="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ic(){return new RegExp(oc,"u")}const sc=/^(?:(?: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])$/,cc=/^(([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}|:))$/,uc=/^((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])$/,ac=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ho=/^[A-Za-z0-9_-]*$/,fc=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,dc=/^\+(?:[0-9]){6,14}[0-9]$/,po="(?:(?:\\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])))",hc=new RegExp(`^${po}$`);function mo(e){const 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}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function pc(e){return new RegExp(`^${mo(e)}$`)}function mc(e){const t=mo({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${po}T(?:${r})$`)}const yc=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},gc=/^-?\d+$/,bc=/^-?\d+(?:\.\d+)?/,wc=/^(?:true|false)$/i,_c=/^[^A-Z]*$/,vc=/^[^a-z]*$/,j=h("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),yo={number:"number",bigint:"bigint",object:"date"},go=h("$ZodCheckLessThan",(e,t)=>{j.init(e,t);const n=yo[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bo=h("$ZodCheckGreaterThan",(e,t)=>{j.init(e,t);const n=yo[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ec=h("$ZodCheckMultipleOf",(e,t)=>{j.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):As(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})}}),Sc=h("$ZodCheckNumberFormat",(e,t)=>{j.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=xs[t.format];e._zod.onattach.push(s=>{const c=s._zod.bag;c.format=t.format,c.minimum=o,c.maximum=i,n&&(c.pattern=gc)}),e._zod.check=s=>{const c=s.value;if(n){if(!Number.isInteger(c)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort});return}}c<o&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inst:e})}}),kc=h("$ZodCheckMaxSize",(e,t)=>{var n;j.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Pe(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;o.size<=t.maximum||r.issues.push({origin:uo(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ac=h("$ZodCheckMinSize",(e,t)=>{var n;j.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Pe(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;o.size>=t.minimum||r.issues.push({origin:uo(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Oc=h("$ZodCheckMaxLength",(e,t)=>{var n;j.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Pe(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const s=sn(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),zc=h("$ZodCheckMinLength",(e,t)=>{var n;j.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Pe(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const s=sn(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),$c=h("$ZodCheckLengthEquals",(e,t)=>{var n;j.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Pe(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const s=sn(o),c=i>t.length;r.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),dt=h("$ZodCheckStringFormat",(e,t)=>{var n,r;j.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),xc=h("$ZodCheckRegex",(e,t)=>{dt.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})}}),Rc=h("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=_c),dt.init(e,t)}),Ic=h("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=vc),dt.init(e,t)}),Pc=h("$ZodCheckIncludes",(e,t)=>{j.init(e,t);const n=at(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Zc=h("$ZodCheckStartsWith",(e,t)=>{j.init(e,t);const n=new RegExp(`^${at(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),jc=h("$ZodCheckEndsWith",(e,t)=>{j.init(e,t);const n=new RegExp(`.*${at(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Tc=h("$ZodCheckMimeType",(e,t)=>{j.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Nc=h("$ZodCheckOverwrite",(e,t)=>{j.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Fc{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
2
- `).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,o.join(`
3
- `))}}const Cc={major:4,minor:1,patch:11},x=h("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Cc;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const i of o._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,c,u)=>{let a=pe(s),l;for(const p of c){if(p._zod.def.when){if(!p._zod.def.when(s))continue}else if(a)continue;const y=s.issues.length,b=p._zod.check(s);if(b instanceof Promise&&u?.async===!1)throw new me;if(l||b instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await b,s.issues.length!==y&&(a||(a=pe(s,y)))});else{if(s.issues.length===y)continue;a||(a=pe(s,y))}}return l?l.then(()=>s):s},i=(s,c,u)=>{if(pe(s))return s.aborted=!0,s;const a=o(c,r,u);if(a instanceof Promise){if(u.async===!1)throw new me;return a.then(l=>e._zod.parse(l,u))}return e._zod.parse(a,u)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){const a=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return a instanceof Promise?a.then(l=>i(l,s,c)):i(a,s,c)}const u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new me;return u.then(a=>o(a,r,c))}return o(u,r,c)}}e["~standard"]={validate:o=>{try{const i=Ds(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Us(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),an=h("$ZodString",(e,t)=>{x.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??yc(e._zod.bag),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}}),R=h("$ZodStringFormat",(e,t)=>{dt.init(e,t),an.init(e,t)}),Dc=h("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=nc),R.init(e,t)}),Uc=h("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=kn(r))}else t.pattern??(t.pattern=kn());R.init(e,t)}),Mc=h("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=rc),R.init(e,t)}),Lc=h("$ZodURL",(e,t)=>{R.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:fc.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Bc=h("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ic()),R.init(e,t)}),qc=h("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ec),R.init(e,t)}),Wc=h("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Js),R.init(e,t)}),Vc=h("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Gs),R.init(e,t)}),Hc=h("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Xs),R.init(e,t)}),Kc=h("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ys),R.init(e,t)}),Jc=h("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Qs),R.init(e,t)}),Gc=h("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=mc(t)),R.init(e,t)}),Xc=h("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=hc),R.init(e,t)}),Yc=h("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=pc(t)),R.init(e,t)}),Qc=h("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=tc),R.init(e,t)}),eu=h("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=sc),R.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),tu=h("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=cc),R.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),nu=h("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=uc),R.init(e,t)}),ru=h("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ac),R.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,i]=r;if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function wo(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const ou=h("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=lc),R.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{wo(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function iu(e){if(!ho.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return wo(n)}const su=h("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ho),R.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{iu(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),cu=h("$ZodE164",(e,t)=>{t.pattern??(t.pattern=dc),R.init(e,t)});function uu(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const au=h("$ZodJWT",(e,t)=>{R.init(e,t),e._zod.check=n=>{uu(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),_o=h("$ZodNumber",(e,t)=>{x.init(e,t),e._zod.pattern=e._zod.bag.pattern??bc,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),lu=h("$ZodNumber",(e,t)=>{Sc.init(e,t),_o.init(e,t)}),fu=h("$ZodBoolean",(e,t)=>{x.init(e,t),e._zod.pattern=wc,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),du=h("$ZodAny",(e,t)=>{x.init(e,t),e._zod.parse=n=>n}),hu=h("$ZodUnknown",(e,t)=>{x.init(e,t),e._zod.parse=n=>n}),pu=h("$ZodNever",(e,t)=>{x.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),mu=h("$ZodDate",(e,t)=>{x.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}const o=n.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),n}});function An(e,t,n){e.issues.length&&t.issues.push(...co(n,e.issues)),t.value[n]=e.value}const yu=h("$ZodArray",(e,t)=>{x.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let s=0;s<o.length;s++){const c=o[s],u=t.element._zod.run({value:c,issues:[]},r);u instanceof Promise?i.push(u.then(a=>An(a,n,s))):An(u,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function ot(e,t,n,r){e.issues.length&&t.issues.push(...co(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function vo(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=$s(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Eo(e,t,n,r,o,i){const s=[],c=o.keySet,u=o.catchall._zod,a=u.def.type;for(const l of Object.keys(t)){if(c.has(l))continue;if(a==="never"){s.push(l);continue}const p=u.run({value:t[l],issues:[]},r);p instanceof Promise?e.push(p.then(y=>ot(y,n,l,t))):ot(p,n,l,t)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const gu=h("$ZodObject",(e,t)=>{if(x.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}const r=rn(()=>vo(t));$(e._zod,"propValues",()=>{const c=t.shape,u={};for(const a in c){const l=c[a]._zod;if(l.values){u[a]??(u[a]=new Set);for(const p of l.values)u[a].add(p)}}return u});const o=rt,i=t.catchall;let s;e._zod.parse=(c,u)=>{s??(s=r.value);const a=c.value;if(!o(a))return c.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),c;c.value={};const l=[],p=s.shape;for(const y of s.keys){const d=p[y]._zod.run({value:a[y],issues:[]},u);d instanceof Promise?l.push(d.then(m=>ot(m,c,y,a))):ot(d,c,y,a)}return i?Eo(l,a,c,u,r.value,e):l.length?Promise.all(l).then(()=>c):c}}),bu=h("$ZodObjectJIT",(e,t)=>{gu.init(e,t);const n=e._zod.parse,r=rn(()=>vo(t)),o=y=>{const b=new Fc(["shape","payload","ctx"]),d=r.value,m=w=>{const v=Sn(w);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};b.write("const input = payload.value;");const g=Object.create(null);let E=0;for(const w of d.keys)g[w]=`key_${E++}`;b.write("const newResult = {};");for(const w of d.keys){const v=g[w],A=Sn(w);b.write(`const ${v} = ${m(w)};`),b.write(`
4
- if (${v}.issues.length) {
5
- payload.issues = payload.issues.concat(${v}.issues.map(iss => ({
6
- ...iss,
7
- path: iss.path ? [${A}, ...iss.path] : [${A}]
8
- })));
9
- }
10
-
11
-
12
- if (${v}.value === undefined) {
13
- if (${A} in input) {
14
- newResult[${A}] = undefined;
15
- }
16
- } else {
17
- newResult[${A}] = ${v}.value;
18
- }
19
-
20
- `)}b.write("payload.value = newResult;"),b.write("return payload;");const O=b.compile();return(w,v)=>O(y,w,v)};let i;const s=rt,c=!oo.jitless,a=c&&Os.value,l=t.catchall;let p;e._zod.parse=(y,b)=>{p??(p=r.value);const d=y.value;return s(d)?c&&a&&b?.async===!1&&b.jitless!==!0?(i||(i=o(t.shape)),y=i(y,b),l?Eo([],d,y,b,p,e):y):n(y,b):(y.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),y)}});function On(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!pe(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>ae(s,r,ue())))}),t)}const wu=h("$ZodUnion",(e,t)=>{x.init(e,t),$(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),$(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),$(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),$(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>on(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1;const c=[];for(const u of t.options){const a=u._zod.run({value:o.value,issues:[]},i);if(a instanceof Promise)c.push(a),s=!0;else{if(a.issues.length===0)return a;c.push(a)}}return s?Promise.all(c).then(u=>On(u,o,e,i)):On(c,o,e,i)}}),_u=h("$ZodIntersection",(e,t)=>{x.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([u,a])=>zn(n,u,a)):zn(n,i,s)}});function Tt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($e(e)&&$e(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const s=Tt(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],s=Tt(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function zn(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),pe(e))return e;const r=Tt(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const vu=h("$ZodEnum",(e,t)=>{x.init(e,t);const n=ks(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>zs.has(typeof o)).map(o=>typeof o=="string"?at(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),Eu=h("$ZodFile",(e,t)=>{x.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;return o instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),n}}),Su=h("$ZodTransform",(e,t)=>{x.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ro(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new me;return n.value=o,n}});function $n(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ku=h("$ZodOptional",(e,t)=>{x.init(e,t),e._zod.optin="optional",e._zod.optout="optional",$(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),$(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${on(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>$n(i,n.value)):$n(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),Au=h("$ZodNullable",(e,t)=>{x.init(e,t),$(e._zod,"optin",()=>t.innerType._zod.optin),$(e._zod,"optout",()=>t.innerType._zod.optout),$(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${on(n.source)}|null)$`):void 0}),$(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Ou=h("$ZodDefault",(e,t)=>{x.init(e,t),e._zod.optin="optional",$(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>xn(i,t)):xn(o,t)}});function xn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const zu=h("$ZodPrefault",(e,t)=>{x.init(e,t),e._zod.optin="optional",$(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),$u=h("$ZodNonOptional",(e,t)=>{x.init(e,t),$(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Rn(i,e)):Rn(o,e)}});function Rn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const xu=h("$ZodCatch",(e,t)=>{x.init(e,t),$(e._zod,"optin",()=>t.innerType._zod.optin),$(e._zod,"optout",()=>t.innerType._zod.optout),$(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>ae(s,r,ue()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>ae(i,r,ue()))},input:n.value}),n.issues=[]),n)}}),Ru=h("$ZodPipe",(e,t)=>{x.init(e,t),$(e._zod,"values",()=>t.in._zod.values),$(e._zod,"optin",()=>t.in._zod.optin),$(e._zod,"optout",()=>t.out._zod.optout),$(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>Le(s,t.in,r)):Le(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>Le(i,t.out,r)):Le(o,t.out,r)}});function Le(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Iu=h("$ZodReadonly",(e,t)=>{x.init(e,t),$(e._zod,"propValues",()=>t.innerType._zod.propValues),$(e._zod,"values",()=>t.innerType._zod.values),$(e._zod,"optin",()=>t.innerType._zod.optin),$(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(In):In(o)}});function In(e){return e.value=Object.freeze(e.value),e}const Pu=h("$ZodCustom",(e,t)=>{j.init(e,t),x.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>Pn(i,n,r,e));Pn(o,n,r,e)}});function Pn(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(xe(o))}}class Zu{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function ju(){return new Zu}const Be=ju();function Tu(e,t){return new e({type:"string",..._(t)})}function So(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,..._(t)})}function Zn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,..._(t)})}function Nu(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,..._(t)})}function Fu(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._(t)})}function Cu(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._(t)})}function Du(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._(t)})}function ko(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,..._(t)})}function Uu(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,..._(t)})}function Mu(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,..._(t)})}function Lu(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,..._(t)})}function Bu(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,..._(t)})}function qu(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,..._(t)})}function Wu(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,..._(t)})}function Vu(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,..._(t)})}function Ao(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,..._(t)})}function Hu(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,..._(t)})}function Ku(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._(t)})}function Ju(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._(t)})}function Gu(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,..._(t)})}function Xu(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,..._(t)})}function Yu(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,..._(t)})}function Qu(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,..._(t)})}function ea(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._(t)})}function ta(e,t){return new e({type:"string",format:"date",check:"string_format",..._(t)})}function na(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,..._(t)})}function ra(e,t){return new e({type:"string",format:"duration",check:"string_format",..._(t)})}function oa(e,t){return new e({type:"number",checks:[],..._(t)})}function ia(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",..._(t)})}function sa(e,t){return new e({type:"boolean",..._(t)})}function ca(e){return new e({type:"any"})}function ua(e){return new e({type:"unknown"})}function aa(e,t){return new e({type:"never",..._(t)})}function la(e,t){return new e({type:"date",..._(t)})}function jn(e,t){return new go({check:"less_than",..._(t),value:e,inclusive:!1})}function Ke(e,t){return new go({check:"less_than",..._(t),value:e,inclusive:!0})}function Tn(e,t){return new bo({check:"greater_than",..._(t),value:e,inclusive:!1})}function Je(e,t){return new bo({check:"greater_than",..._(t),value:e,inclusive:!0})}function Nn(e,t){return new Ec({check:"multiple_of",..._(t),value:e})}function fa(e,t){return new kc({check:"max_size",..._(t),maximum:e})}function da(e,t){return new Ac({check:"min_size",..._(t),minimum:e})}function Oo(e,t){return new Oc({check:"max_length",..._(t),maximum:e})}function it(e,t){return new zc({check:"min_length",..._(t),minimum:e})}function zo(e,t){return new $c({check:"length_equals",..._(t),length:e})}function ha(e,t){return new xc({check:"string_format",format:"regex",..._(t),pattern:e})}function pa(e){return new Rc({check:"string_format",format:"lowercase",..._(e)})}function ma(e){return new Ic({check:"string_format",format:"uppercase",..._(e)})}function ya(e,t){return new Pc({check:"string_format",format:"includes",..._(t),includes:e})}function ga(e,t){return new Zc({check:"string_format",format:"starts_with",..._(t),prefix:e})}function ba(e,t){return new jc({check:"string_format",format:"ends_with",..._(t),suffix:e})}function wa(e,t){return new Tc({check:"mime_type",mime:e,..._(t)})}function Ze(e){return new Nc({check:"overwrite",tx:e})}function _a(e){return Ze(t=>t.normalize(e))}function va(){return Ze(e=>e.trim())}function Ea(){return Ze(e=>e.toLowerCase())}function Sa(){return Ze(e=>e.toUpperCase())}function ka(e,t,n){return new e({type:"array",element:t,..._(n)})}function Aa(e,t){return new e({type:"file",..._(t)})}function Oa(e,t,n){return new e({type:"custom",check:"custom",fn:t,..._(n)})}function za(e){const t=$a(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(xe(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(xe(o))}},e(n.value,n)));return t}function $a(e,t){const n=new j({check:"custom",..._(t)});return n._zod.check=e,n}const xa=h("ZodISODateTime",(e,t)=>{Gc.init(e,t),P.init(e,t)});function Ra(e){return ea(xa,e)}const Ia=h("ZodISODate",(e,t)=>{Xc.init(e,t),P.init(e,t)});function Pa(e){return ta(Ia,e)}const Za=h("ZodISOTime",(e,t)=>{Yc.init(e,t),P.init(e,t)});function ja(e){return na(Za,e)}const Ta=h("ZodISODuration",(e,t)=>{Qc.init(e,t),P.init(e,t)});function Na(e){return ra(Ta,e)}const Fa=(e,t)=>{lo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Cs(e,n)},flatten:{value:n=>Fs(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,jt,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,jt,2)}},isEmpty:{get(){return e.issues.length===0}}})},M=h("ZodError",Fa,{Parent:Error}),Ca=cn(M),Da=un(M),Ua=lt(M),Ma=ft(M),La=Ms(M),Ba=Ls(M),qa=Bs(M),Wa=qs(M),Va=Ws(M),Ha=Vs(M),Ka=Hs(M),Ja=Ks(M),I=h("ZodType",(e,t)=>(x.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(de(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),e.clone=(n,r)=>X(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>Ca(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Ua(e,n,r),e.parseAsync=async(n,r)=>Da(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Ma(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>La(e,n,r),e.decode=(n,r)=>Ba(e,n,r),e.encodeAsync=async(n,r)=>qa(e,n,r),e.decodeAsync=async(n,r)=>Wa(e,n,r),e.safeEncode=(n,r)=>Va(e,n,r),e.safeDecode=(n,r)=>Ha(e,n,r),e.safeEncodeAsync=async(n,r)=>Ka(e,n,r),e.safeDecodeAsync=async(n,r)=>Ja(e,n,r),e.refine=(n,r)=>e.check(Ll(n,r)),e.superRefine=n=>e.check(Bl(n)),e.overwrite=n=>e.check(Ze(n)),e.optional=()=>Un(e),e.nullable=()=>Mn(e),e.nullish=()=>Un(Mn(e)),e.nonoptional=n=>Tl(e,n),e.array=()=>U(e),e.or=n=>To([e,n]),e.and=n=>No(e,n),e.transform=n=>Ln(e,xl(n)),e.default=n=>Pl(e,n),e.prefault=n=>jl(e,n),e.catch=n=>Fl(e,n),e.pipe=n=>Ln(e,n),e.readonly=()=>Ul(e),e.describe=n=>{const r=e.clone();return Be.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Be.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Be.get(e);const r=e.clone();return Be.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),$o=h("_ZodString",(e,t)=>{an.init(e,t),I.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(ha(...r)),e.includes=(...r)=>e.check(ya(...r)),e.startsWith=(...r)=>e.check(ga(...r)),e.endsWith=(...r)=>e.check(ba(...r)),e.min=(...r)=>e.check(it(...r)),e.max=(...r)=>e.check(Oo(...r)),e.length=(...r)=>e.check(zo(...r)),e.nonempty=(...r)=>e.check(it(1,...r)),e.lowercase=r=>e.check(pa(r)),e.uppercase=r=>e.check(ma(r)),e.trim=()=>e.check(va()),e.normalize=(...r)=>e.check(_a(...r)),e.toLowerCase=()=>e.check(Ea()),e.toUpperCase=()=>e.check(Sa())}),Ga=h("ZodString",(e,t)=>{an.init(e,t),$o.init(e,t),e.email=n=>e.check(So(xo,n)),e.url=n=>e.check(ko(Io,n)),e.jwt=n=>e.check(Qu(fl,n)),e.emoji=n=>e.check(Uu(Xa,n)),e.guid=n=>e.check(Zn(Fn,n)),e.uuid=n=>e.check(Nu(qe,n)),e.uuidv4=n=>e.check(Fu(qe,n)),e.uuidv6=n=>e.check(Cu(qe,n)),e.uuidv7=n=>e.check(Du(qe,n)),e.nanoid=n=>e.check(Mu(Ya,n)),e.guid=n=>e.check(Zn(Fn,n)),e.cuid=n=>e.check(Lu(Qa,n)),e.cuid2=n=>e.check(Bu(el,n)),e.ulid=n=>e.check(qu(tl,n)),e.base64=n=>e.check(Gu(ul,n)),e.base64url=n=>e.check(Xu(al,n)),e.xid=n=>e.check(Wu(nl,n)),e.ksuid=n=>e.check(Vu(rl,n)),e.ipv4=n=>e.check(Ao(Zo,n)),e.ipv6=n=>e.check(Hu(il,n)),e.cidrv4=n=>e.check(Ku(sl,n)),e.cidrv6=n=>e.check(Ju(cl,n)),e.e164=n=>e.check(Yu(ll,n)),e.datetime=n=>e.check(Ra(n)),e.date=n=>e.check(Pa(n)),e.time=n=>e.check(ja(n)),e.duration=n=>e.check(Na(n))});function ie(e){return Tu(Ga,e)}const P=h("ZodStringFormat",(e,t)=>{R.init(e,t),$o.init(e,t)}),xo=h("ZodEmail",(e,t)=>{Mc.init(e,t),P.init(e,t)});function Ro(e){return So(xo,e)}const Fn=h("ZodGUID",(e,t)=>{Dc.init(e,t),P.init(e,t)}),qe=h("ZodUUID",(e,t)=>{Uc.init(e,t),P.init(e,t)}),Io=h("ZodURL",(e,t)=>{Lc.init(e,t),P.init(e,t)});function Po(e){return ko(Io,e)}const Xa=h("ZodEmoji",(e,t)=>{Bc.init(e,t),P.init(e,t)}),Ya=h("ZodNanoID",(e,t)=>{qc.init(e,t),P.init(e,t)}),Qa=h("ZodCUID",(e,t)=>{Wc.init(e,t),P.init(e,t)}),el=h("ZodCUID2",(e,t)=>{Vc.init(e,t),P.init(e,t)}),tl=h("ZodULID",(e,t)=>{Hc.init(e,t),P.init(e,t)}),nl=h("ZodXID",(e,t)=>{Kc.init(e,t),P.init(e,t)}),rl=h("ZodKSUID",(e,t)=>{Jc.init(e,t),P.init(e,t)}),Zo=h("ZodIPv4",(e,t)=>{eu.init(e,t),P.init(e,t)});function ol(e){return Ao(Zo,e)}const il=h("ZodIPv6",(e,t)=>{tu.init(e,t),P.init(e,t)}),sl=h("ZodCIDRv4",(e,t)=>{nu.init(e,t),P.init(e,t)}),cl=h("ZodCIDRv6",(e,t)=>{ru.init(e,t),P.init(e,t)}),ul=h("ZodBase64",(e,t)=>{ou.init(e,t),P.init(e,t)}),al=h("ZodBase64URL",(e,t)=>{su.init(e,t),P.init(e,t)}),ll=h("ZodE164",(e,t)=>{cu.init(e,t),P.init(e,t)}),fl=h("ZodJWT",(e,t)=>{au.init(e,t),P.init(e,t)}),jo=h("ZodNumber",(e,t)=>{_o.init(e,t),I.init(e,t),e.gt=(r,o)=>e.check(Tn(r,o)),e.gte=(r,o)=>e.check(Je(r,o)),e.min=(r,o)=>e.check(Je(r,o)),e.lt=(r,o)=>e.check(jn(r,o)),e.lte=(r,o)=>e.check(Ke(r,o)),e.max=(r,o)=>e.check(Ke(r,o)),e.int=r=>e.check(Cn(r)),e.safe=r=>e.check(Cn(r)),e.positive=r=>e.check(Tn(0,r)),e.nonnegative=r=>e.check(Je(0,r)),e.negative=r=>e.check(jn(0,r)),e.nonpositive=r=>e.check(Ke(0,r)),e.multipleOf=(r,o)=>e.check(Nn(r,o)),e.step=(r,o)=>e.check(Nn(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function re(e){return oa(jo,e)}const dl=h("ZodNumberFormat",(e,t)=>{lu.init(e,t),jo.init(e,t)});function Cn(e){return ia(dl,e)}const hl=h("ZodBoolean",(e,t)=>{fu.init(e,t),I.init(e,t)});function pl(e){return sa(hl,e)}const ml=h("ZodAny",(e,t)=>{du.init(e,t),I.init(e,t)});function te(){return ca(ml)}const yl=h("ZodUnknown",(e,t)=>{hu.init(e,t),I.init(e,t)});function Dn(){return ua(yl)}const gl=h("ZodNever",(e,t)=>{pu.init(e,t),I.init(e,t)});function bl(e){return aa(gl,e)}const wl=h("ZodDate",(e,t)=>{mu.init(e,t),I.init(e,t),e.min=(r,o)=>e.check(Je(r,o)),e.max=(r,o)=>e.check(Ke(r,o));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function _l(e){return la(wl,e)}const vl=h("ZodArray",(e,t)=>{yu.init(e,t),I.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(it(n,r)),e.nonempty=n=>e.check(it(1,n)),e.max=(n,r)=>e.check(Oo(n,r)),e.length=(n,r)=>e.check(zo(n,r)),e.unwrap=()=>e.element});function U(e,t){return ka(vl,e,t)}const El=h("ZodObject",(e,t)=>{bu.init(e,t),I.init(e,t),$(e,"shape",()=>t.shape),e.keyof=()=>Ol(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Dn()}),e.loose=()=>e.clone({...e._zod.def,catchall:Dn()}),e.strict=()=>e.clone({...e._zod.def,catchall:bl()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Ps(e,n),e.safeExtend=n=>Zs(e,n),e.merge=n=>js(e,n),e.pick=n=>Rs(e,n),e.omit=n=>Is(e,n),e.partial=(...n)=>Ts(Fo,e,n[0]),e.required=(...n)=>Ns(Co,e,n[0])});function Sl(e,t){const n={type:"object",shape:e??{},..._(t)};return new El(n)}const kl=h("ZodUnion",(e,t)=>{wu.init(e,t),I.init(e,t),e.options=t.options});function To(e,t){return new kl({type:"union",options:e,..._(t)})}const Al=h("ZodIntersection",(e,t)=>{_u.init(e,t),I.init(e,t)});function No(e,t){return new Al({type:"intersection",left:e,right:t})}const Nt=h("ZodEnum",(e,t)=>{vu.init(e,t),I.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Nt({...t,checks:[],..._(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Nt({...t,checks:[],..._(o),entries:i})}});function Ol(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Nt({type:"enum",entries:n,..._(t)})}const zl=h("ZodFile",(e,t)=>{Eu.init(e,t),I.init(e,t),e.min=(n,r)=>e.check(da(n,r)),e.max=(n,r)=>e.check(fa(n,r)),e.mime=(n,r)=>e.check(wa(Array.isArray(n)?n:[n],r))});function J(e){return Aa(zl,e)}const $l=h("ZodTransform",(e,t)=>{Su.init(e,t),I.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ro(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(xe(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(xe(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function xl(e){return new $l({type:"transform",transform:e})}const Fo=h("ZodOptional",(e,t)=>{ku.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Un(e){return new Fo({type:"optional",innerType:e})}const Rl=h("ZodNullable",(e,t)=>{Au.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Mn(e){return new Rl({type:"nullable",innerType:e})}const Il=h("ZodDefault",(e,t)=>{Ou.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Pl(e,t){return new Il({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():so(t)}})}const Zl=h("ZodPrefault",(e,t)=>{zu.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function jl(e,t){return new Zl({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():so(t)}})}const Co=h("ZodNonOptional",(e,t)=>{$u.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Tl(e,t){return new Co({type:"nonoptional",innerType:e,..._(t)})}const Nl=h("ZodCatch",(e,t)=>{xu.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Fl(e,t){return new Nl({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Cl=h("ZodPipe",(e,t)=>{Ru.init(e,t),I.init(e,t),e.in=t.in,e.out=t.out});function Ln(e,t){return new Cl({type:"pipe",in:e,out:t})}const Dl=h("ZodReadonly",(e,t)=>{Iu.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ul(e){return new Dl({type:"readonly",innerType:e})}const Ml=h("ZodCustom",(e,t)=>{Pu.init(e,t),I.init(e,t)});function Ll(e,t={}){return Oa(Ml,e,t)}function Bl(e){return za(e)}const Bn={"arrayEach:string":()=>U(ie({error:"Each item must be a string"})),"arrayEach:number":()=>U(re({error:"Each item must be a number"})),"arrayEach:email":()=>U(Ro({error:"Each item must be a valid email"})),"arrayEach:url":()=>U(Po({error:"Each item must be a valid URL"})),"arrayEach:file":()=>U(J({error:"Each item must be a file"}))},qn={nullable:()=>ie().nullable().optional(),required:()=>To([ie().min(1,{error:"This field is required"}),J({error:"This field is required"}),U(te()).min(1,{error:"This field is required"})]),string:()=>ie({error:"Must be a string"}),email:()=>Ro({error:"Invalid email format"}),url:()=>Po({error:"Invalid URL format"}),number:()=>re({error:"Must be a number"}),integer:()=>re().int({error:"Must be an integer"}),positive:()=>re().positive({error:"Must be positive"}),negative:()=>re().negative({error:"Must be negative"}),ipv4:()=>ol({error:"Must be valid IPv4"}),boolean:()=>pl({error:"Must be a boolean"}),date:()=>_l({error:"Must be a valid date"}),array:()=>U(te(),{error:"Must be an array"}),object:()=>Sl({},{error:"Must be an object"}),file:()=>J({error:"Must be a file"})},Wn=e=>{const t={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776},n=e.match(/^(\d+(?:\.\d+)?)\s*(B|KB|MB|GB|TB)$/i);if(!n)throw new Error(`Invalid size format: ${e}`);const[,r,o]=n;return Math.round(Number(r)*t[o.toUpperCase()])},Vn=e=>{if(e.includes(",")){const t=e.split(",").map(n=>n.trim());return J().refine(n=>t.some(r=>r.endsWith("/*")?n.type.startsWith(r.slice(0,-1)):n.type===r),{error:`Must be one of: ${t.join(", ")}`})}else if(e.endsWith("/*")){const t=e.slice(0,-1);return J().refine(n=>n.type.startsWith(t),{error:`Must be ${e} file`})}else return J().mime(e,{error:`Must be ${e} file`})},Do=e=>{const[t,n]=Ai(e,o=>typeof o=="function");return[...t.map(o=>{const i=o;return te().refine(o,{message:i.message||"Validation failed"})}),...n.map(o=>{if(!Xr(o))return te();if(o in qn)return qn[o]();if(o in Bn)return Bn[o]();if(o.startsWith("min:")){const i=parseInt(o.split(":")[1]);return re().min(i,{error:`Must be at least ${i}`})}if(o.startsWith("max:")){const i=parseInt(o.split(":")[1]);return re().max(i,{error:`Must be at most ${i}`})}if(o.startsWith("minLength:")){const i=parseInt(o.split(":")[1]);return ie().min(i,{error:`Must be at least ${i} characters`})}if(o.startsWith("maxLength:")){const i=parseInt(o.split(":")[1]);return ie().max(i,{error:`Must be at most ${i} characters`})}if(o.startsWith("arrayMinLength:")){const i=parseInt(o.split(":")[1]);return U(te()).min(i,{error:`Must have at least ${i} items`})}if(o.startsWith("arrayMaxLength:")){const i=parseInt(o.split(":")[1]);return U(te()).max(i,{error:`Must have at most ${i} items`})}if(o.startsWith("pattern:")){const i=o.split(":")[1];return ie().regex(new RegExp(i),{error:"Invalid format"})}if(o.startsWith("fileSize:")){const i=o.split(":")[1],s=Wn(i);return J().max(s,{error:`File too large (max ${i})`})}if(o.startsWith("arrayEach:fileSize:")){const i=o.split(":")[2],s=Wn(i);return U(J().max(s,{error:`Each file must be smaller than ${i}`}))}if(o.startsWith("fileType:")){const i=o.split(":")[1];return Vn(i)}if(o.startsWith("arrayEach:fileType:")){const i=o.split(":")[2],s=Vn(i);return U(s)}return te()})].reduce((o,i)=>No(o,i))},ht=({initialData:e,validationRules:t})=>{const[n,r]=k.useState(e),[o,i]=k.useState({}),s=k.useMemo(()=>!ut(o),[o]),c=k.useMemo(()=>!Vi(n,e),[n,e]),u=k.useCallback(((m,g)=>{if(typeof m=="string"){if(!ke(e,m))throw new Error(`Invalid path: '${m}'`);r(E=>ys(Jr(E),m,g))}else r(E=>({...E,...m}))}),[e]),a=k.useCallback(((m,g)=>{if(m!=="root"&&!ke(e,m))throw new Error(`Invalid path: '${m}'`);i(E=>({...E,[m]:g}))}),[e]),l=k.useCallback((m=>{if(!ke(e,m))throw new Error(`Invalid path: '${m}'`);return!!o[m]}),[o,e]),p=k.useCallback((m=>{if(!ke(e,m))throw new Error(`Invalid path: '${m}'`);i(g=>Li(g,[m]))}),[e]),y=k.useCallback((()=>{i({})}),[]),b=k.useCallback((()=>{r(e),i({})}),[e]),d=k.useCallback(()=>{let m=!0;return t&&Mi(t,(g,E)=>{const O=ct(n,E),v=Do(g).safeParse(O);if(v.success)p(E);else{const A=v.error.issues.map(T=>T.message);a(E,A),m=v.success}}),m},[n,t,p,a]);return{data:n,setData:u,errors:o,hasErrors:s,clearErrors:y,clearError:p,setError:a,hasError:l,reset:b,isDirty:c,validate:d}},ql=(e,t)=>{const n=r=>e(r);return Object.defineProperty(n,"message",{value:t}),n};function V(e){try{return e()}catch{}}const Hn=V(()=>globalThis)||V(()=>window)||V(()=>self)||V(()=>global)||V(function(){return V.constructor("return this")()}),Uo="4.0.7",Kn=new Map;function Wl(e){const t=Kn.get(e)||1;return Kn.set(e,t+1),`${e}:${t}:${Math.random().toString(36).slice(2)}`}function Vl(e,t=0){const n=Wl("stringifyForDisplay");return JSON.stringify(e,(r,o)=>o===void 0?n:o,t).split(JSON.stringify(n)).join("<undefined>")}const Jn="Invariant Violation";class ln extends Error{constructor(t=Jn){super(t),this.name=Jn,Object.setPrototypeOf(this,ln.prototype)}}const Mo=["debug","log","warn","error","silent"];let Hl=Mo.indexOf("silent");function G(e,...t){if(!e)throw Kl(...t)}function pt(e){return function(t,...n){if(Mo.indexOf(e)>=Hl){const r=console[e]||console.log;if(typeof t=="number"){const o=t;t=Lo(o),t||(t=Bo(o,n),n=[])}r(t,...n)}}}G.debug=pt("debug");G.log=pt("log");G.warn=pt("warn");G.error=pt("error");function Kl(e,...t){return new ln(Lo(e,t)||Bo(e,t))}const Gn=Symbol.for("ApolloErrorMessageHandler_"+Uo);function Ft(e){if(typeof e=="string")return e;try{return Vl(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function Lo(e,t=[]){if(e)return Hn[Gn]&&Hn[Gn](e,t.map(Ft))}function Bo(e,t=[]){if(e)return typeof e=="string"?t.reduce((n,r)=>n.replace(/%[sdfo]/,Ft(r)),e):`An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({version:Uo,message:e,args:t.map(Ft)}))}`}const Xn=Symbol.for("__APOLLO_CONTEXT__");function qo(){G("createContext"in z,37);let e=z.createContext[Xn];return e||(Object.defineProperty(z.createContext,Xn,{value:e=z.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}function mt(e){const t=z.useContext(qo()),n=e||t.client;return G(!!n,28),n}const{toString:Yn,hasOwnProperty:Jl}=Object.prototype,Qn=Function.prototype.toString,Ct=new Map;function L(e,t){try{return Dt(e,t)}finally{Ct.clear()}}function Dt(e,t){if(e===t)return!0;const n=Yn.call(e),r=Yn.call(t);if(n!==r)return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(tr(e,t))return!0;const o=er(e),i=er(t),s=o.length;if(s!==i.length)return!1;for(let c=0;c<s;++c)if(!Jl.call(t,o[c]))return!1;for(let c=0;c<s;++c){const u=o[c];if(!Dt(e[u],t[u]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!==e)return t!==t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(tr(e,t))return!0;const o=e.entries(),i=n==="[object Map]";for(;;){const s=o.next();if(s.done)break;const[c,u]=s.value;if(!t.has(c)||i&&!Dt(u,t.get(c)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let o=e.byteLength;if(o===t.byteLength)for(;o--&&e[o]===t[o];);return o===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const o=Qn.call(e);return o!==Qn.call(t)?!1:!Yl(o,Xl)}}return!1}function er(e){return Object.keys(e).filter(Gl,e)}function Gl(e){return this[e]!==void 0}const Xl="{ [native code] }";function Yl(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}function tr(e,t){let n=Ct.get(e);if(n){if(n.has(t))return!0}else Ct.set(e,n=new Set);return n.add(t),!1}const Wo=typeof V(()=>window.document.createElement)=="function";function nr(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{const o=n[r];o!==void 0&&(t[r]=o)})}),t}function Ut(e,t){return nr(e,t,t.variables&&{variables:nr({...e&&e.variables,...t.variables})})}function Ql(e){return e.catch(()=>{}),e}var Mt=function(e,t){return Mt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Mt(e,t)};function Y(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Mt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function rr(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Re(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(c){s={error:c}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function Ie(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function se(e){return typeof e=="function"}function ef(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var kt=ef(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
21
- `+n.map(function(r,o){return o+1+") "+r.toString()}).join(`
22
- `):"",this.name="UnsubscriptionError",this.errors=n}});function Lt(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var yt=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,o,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var c=rr(s),u=c.next();!u.done;u=c.next()){var a=u.value;a.remove(this)}}catch(m){t={error:m}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}else s.remove(this);var l=this.initialTeardown;if(se(l))try{l()}catch(m){i=m instanceof kt?m.errors:[m]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var y=rr(p),b=y.next();!b.done;b=y.next()){var d=b.value;try{or(d)}catch(m){i=i??[],m instanceof kt?i=Ie(Ie([],Re(i)),Re(m.errors)):i.push(m)}}}catch(m){r={error:m}}finally{try{b&&!b.done&&(o=y.return)&&o.call(y)}finally{if(r)throw r.error}}}if(i)throw new kt(i)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)or(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Lt(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Lt(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})();yt.EMPTY;function tf(e){return e instanceof yt||e&&"closed"in e&&se(e.remove)&&se(e.add)&&se(e.unsubscribe)}function or(e){se(e)?e():e.unsubscribe()}var nf={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ie([e,t],Re(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function rf(e){nf.setTimeout(function(){throw e})}function ir(){}var Vo=(function(e){Y(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,tf(n)&&n.add(r)):r.destination=uf,r}return t.create=function(n,r,o){return new sf(n,r,o)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(yt),of=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){We(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){We(r)}else We(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){We(n)}},e})(),sf=(function(e){Y(t,e);function t(n,r,o){var i=e.call(this)||this,s;return se(n)||!n?s={next:n??void 0,error:r??void 0,complete:o??void 0}:s=n,i.destination=new of(s),i}return t})(Vo);function We(e){rf(e)}function cf(e){throw e}var uf={closed:!0,next:ir,error:cf,complete:ir};function af(e){return se(e?.lift)}function lf(e){return function(t){if(af(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function ff(e,t,n,r,o){return new df(e,t,n,r,o)}var df=(function(e){Y(t,e);function t(n,r,o,i,s,c){var u=e.call(this,n)||this;return u.onFinalize=s,u.shouldUnsubscribe=c,u._next=r?function(a){try{r(a)}catch(l){n.error(l)}}:e.prototype._next,u._error=i?function(a){try{i(a)}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=o?function(){try{o()}catch(a){n.error(a)}finally{this.unsubscribe()}}:e.prototype._complete,u}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(Vo),hf={now:function(){return Date.now()}},pf=(function(e){Y(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t})(yt),sr={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Ie([e,t],Re(n)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},mf=(function(e){Y(t,e);function t(n,r){var o=e.call(this,n,r)||this;return o.scheduler=n,o.work=r,o.pending=!1,o}return t.prototype.schedule=function(n,r){var o;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var i=this.id,s=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(s,i,r)),this.pending=!0,this.delay=r,this.id=(o=this.id)!==null&&o!==void 0?o:this.requestAsyncId(s,this.id,r),this},t.prototype.requestAsyncId=function(n,r,o){return o===void 0&&(o=0),sr.setInterval(n.flush.bind(n,this),o)},t.prototype.recycleAsyncId=function(n,r,o){if(o===void 0&&(o=0),o!=null&&this.delay===o&&this.pending===!1)return r;r!=null&&sr.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var o=this._execute(n,r);if(o)return o;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var o=!1,i;try{this.work(n)}catch(s){o=!0,i=s||new Error("Scheduled action threw falsy error")}if(o)return this.unsubscribe(),i},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,o=n.scheduler,i=o.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Lt(i,this),r!=null&&(this.id=this.recycleAsyncId(o,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(pf),yf=1,At,Bt={};function cr(e){return e in Bt?(delete Bt[e],!0):!1}var Ho={setImmediate:function(e){var t=yf++;return Bt[t]=!0,At||(At=Promise.resolve()),At.then(function(){return cr(t)&&e()}),t},clearImmediate:function(e){cr(e)}},gf=Ho.setImmediate,bf=Ho.clearImmediate,ur={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return gf.apply(void 0,Ie([],Re(e)))},clearImmediate:function(e){return bf(e)},delegate:void 0},wf=(function(e){Y(t,e);function t(n,r){var o=e.call(this,n,r)||this;return o.scheduler=n,o.work=r,o}return t.prototype.requestAsyncId=function(n,r,o){return o===void 0&&(o=0),o!==null&&o>0?e.prototype.requestAsyncId.call(this,n,r,o):(n.actions.push(this),n._scheduled||(n._scheduled=ur.setImmediate(n.flush.bind(n,void 0))))},t.prototype.recycleAsyncId=function(n,r,o){var i;if(o===void 0&&(o=0),o!=null?o>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,n,r,o);var s=n.actions;r!=null&&((i=s[s.length-1])===null||i===void 0?void 0:i.id)!==r&&(ur.clearImmediate(r),n._scheduled===r&&(n._scheduled=void 0))},t})(mf),ar=(function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=hf.now,e})(),_f=(function(e){Y(t,e);function t(n,r){r===void 0&&(r=ar.now);var o=e.call(this,n,r)||this;return o.actions=[],o._active=!1,o}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var o;this._active=!0;do if(o=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,o){for(;n=r.shift();)n.unsubscribe();throw o}},t})(ar),vf=(function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(n){this._active=!0;var r=this._scheduled;this._scheduled=void 0;var o=this.actions,i;n=n||o.shift();do if(i=n.execute(n.state,n.delay))break;while((n=o[0])&&n.id===r&&o.shift());if(this._active=!1,i){for(;(n=o[0])&&n.id===r&&o.shift();)n.unsubscribe();throw i}},t})(_f),Ef=new vf(wf);function Ot(e,t,n,r,o){r===void 0&&(r=0),o===void 0&&(o=!1);var i=t.schedule(function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(i),!o)return i}function Sf(e,t){return t===void 0&&(t=0),lf(function(n,r){n.subscribe(ff(r,function(o){return Ot(r,e,function(){return r.next(o)},t)},function(){return Ot(r,e,function(){return r.complete()},t)},function(o){return Ot(r,e,function(){return r.error(o)},t)}))})}function Ko(e,t){const n=z.useRef(void 0);return(!n.current||!L(n.current.deps,t))&&(n.current={value:e(),deps:t}),n.current.value}let zt;function kf(){}function Af(){return zt||(zt=z.createContext(null)),z.useCallback(()=>{const e=console.error;try{return console.error=kf,z.useContext(zt),!0}catch{return!1}finally{console.error=e}},[])}const Of=Symbol.for("apollo.hook.wrappers");function zf(e,t,n){const r=[n.queryManager,e.startsWith("use")?z.useContext(qo()):void 0];let o=t;for(const i of r){const s=i?.[Of]?.[e];s&&(o=s(o))}return o}const Jo=Wo?z.useLayoutEffect:z.useEffect,$f="useSyncExternalStore",xf=z[$f],Rf=V(()=>navigator.product)=="ReactNative",If=V(()=>navigator.userAgent.indexOf("jsdom")>=0)||!1,Pf=(Wo||Rf)&&!If,Go=xf||((e,t,n)=>{const r=t(),[{inst:o},i]=z.useState({inst:{value:r,getSnapshot:t}});return Pf?z.useLayoutEffect(()=>{Object.assign(o,{value:r,getSnapshot:t}),$t(o)&&i({inst:o})},[e,r,t]):Object.assign(o,{value:r,getSnapshot:t}),z.useEffect(()=>($t(o)&&i({inst:o}),e(function(){$t(o)&&i({inst:o})})),[e]),r});function $t({value:e,getSnapshot:t}){try{return e!==t()}catch{return!0}}const Zf=["refetch","fetchMore","updateQuery","startPolling","stopPolling","subscribeToMore"];function jf(e,t){const n=mt(t?.client),r=z.useRef(void 0),o=z.useRef(void 0),i=Ko(()=>t,[t]),s=Af();function c(){return n.watchQuery({...t,query:e,initialFetchPolicy:t?.fetchPolicy,fetchPolicy:"standby"})}const[u,a]=z.useState(n),[l,p]=z.useState(c);u!==n&&(a(n),p(c()));const y=z.useCallback((w,v)=>{const A=o.current?.data;A&&!L(A,w.data)&&(r.current=A),o.current=w,v()},[]),b=Go(z.useCallback(w=>{const v=l.subscribe(A=>{L(o.current,A)||y(A,w)});return()=>{v.unsubscribe()}},[l,y]),()=>o.current||lr,()=>lr),d=z.useMemo(()=>{const w={};for(const v of Zf)w[v]=function(...A){return G(o.current,29,v),l[v](...A)};return w},[l]);z.useEffect(()=>{const w={query:e,errorPolicy:i?.errorPolicy,refetchWritePolicy:i?.refetchWritePolicy,returnPartialData:i?.returnPartialData,notifyOnNetworkStatusChange:i?.notifyOnNetworkStatusChange,nextFetchPolicy:t?.nextFetchPolicy,skipPollAttempt:t?.skipPollAttempt};l.options.fetchPolicy!=="standby"&&i?.fetchPolicy&&(w.fetchPolicy=i.fetchPolicy),l.applyOptions(w)},[e,l,i,t?.nextFetchPolicy,t?.skipPollAttempt]);const m=z.useCallback((...w)=>{G(!s(),30);const[v]=w;let A=l.options.fetchPolicy;return A==="standby"&&(A=l.options.initialFetchPolicy),l.reobserve({fetchPolicy:A,variables:v?.variables,context:v?.context??{}})},[l,s]),g=z.useRef(m);Jo(()=>{g.current=m});const E=z.useCallback((...w)=>g.current(...w),[]),O=z.useMemo(()=>{const{partial:w,...v}=b;return{...d,...v,client:n,previousData:r.current,variables:l.variables,observable:l,called:!!o.current}},[n,b,d,l]);return[E,O]}const lr={data:void 0,dataState:"empty",loading:!1,networkStatus:$r.NetworkStatus.ready,partial:!0};function Tf(e,t){const n=mt(t?.client),[r,o]=z.useState(()=>fr(n)),i=z.useRef({result:r,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Jo(()=>{Object.assign(i.current,{client:n,options:t,mutation:e})});const s=z.useCallback((u={})=>{const{options:a,mutation:l}=i.current,p={...a,mutation:l},y=u.client||i.current.client;!i.current.result.loading&&i.current.isMounted&&o(i.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:y});const b=++i.current.mutationId,d=Ut(p,u);return Ql(y.mutate(d).then(m=>{const{data:g,error:E}=m,O=u.onError||i.current.options?.onError;if(E&&O&&O(E,d),b===i.current.mutationId){const v={called:!0,loading:!1,data:g,error:E,client:y};i.current.isMounted&&!L(i.current.result,v)&&o(i.current.result=v)}const w=u.onCompleted||i.current.options?.onCompleted;return E||w?.(m.data,d),m},m=>{if(b===i.current.mutationId&&i.current.isMounted){const E={loading:!1,error:m,data:void 0,called:!0,client:y};L(i.current.result,E)||o(i.current.result=E)}const g=u.onError||i.current.options?.onError;throw g&&g(m,d),m}))},[]),c=z.useCallback(()=>{if(i.current.isMounted){const u=fr(i.current.client);Object.assign(i.current,{mutationId:0,result:u}),o(u)}},[]);return z.useEffect(()=>{const u=i.current;return u.isMounted=!0,()=>{u.isMounted=!1}},[]),[s,{reset:c,...r}]}function fr(e){return{data:void 0,error:void 0,called:!1,loading:!1,client:e}}const Nf=Symbol.for("apollo.skipToken"),_e=Symbol();function fn(e,...[t]){"use no memo";return zf("useQuery",Ff,mt(typeof t=="object"?t.client:void 0))(e,t)}function Ff(e,t={}){const n=mt(typeof t=="object"?t.client:void 0),{ssr:r}=typeof t=="object"?t:{},o=Cf(e,t,n.defaultOptions.watchQuery);function i(b){const d=n.watchQuery(o);return{client:n,query:e,observable:d,resultData:{current:d.getCurrentResult(),previousData:b?.resultData.current.data,variables:d.variables}}}let[s,c]=z.useState(i);(n!==s.client||e!==s.query)&&c(s=i(s));const{observable:u,resultData:a}=s;Df(o,u),Mf(a,u,o);const l=Uf(u,a,r),p=z.useMemo(()=>({refetch:u.refetch.bind(u),fetchMore:u.fetchMore.bind(u),updateQuery:u.updateQuery.bind(u),startPolling:u.startPolling.bind(u),stopPolling:u.stopPolling.bind(u),subscribeToMore:u.subscribeToMore.bind(u)}),[u]),y=a.previousData;return z.useMemo(()=>{const{partial:b,...d}=l;return{...d,client:n,observable:u,variables:u.variables,previousData:y,...p}},[l,n,u,y,p])}const Xo=Symbol();function Cf(e,t,n){return Ko(()=>{if(t===Nf){const o=Ut(n,{query:e,fetchPolicy:"standby"});return o[Xo]=!0,o}const r=Ut(n,{...t,query:e});return t.skip&&(r.initialFetchPolicy=t.initialFetchPolicy||t.fetchPolicy,r.fetchPolicy="standby"),r},[e,t,n])}function Df(e,t){"use no memo";e.fetchPolicy||(e.fetchPolicy=t.options.initialFetchPolicy)}function Uf(e,t,n){"use no memo";return Go(z.useCallback(r=>{const o=e.pipe(Sf(Ef)).subscribe(i=>{const s=t.current;L(s,i)&&L(t.variables,e.variables)||(t.variables=e.variables,s.data&&!L(s.data,i.data)&&(t.previousData=s.data),t.current=i,r())});return()=>{setTimeout(()=>o.unsubscribe())}},[e,t]),()=>t.current,()=>n===!1?fn.ssrDisabledResult:t.current)}function Mf(e,t,n){"use no memo";if(t[_e]&&!L(t[_e],n)){t[_e][Xo]&&!n.initialFetchPolicy&&(n.initialFetchPolicy=n.fetchPolicy),Lf(t[_e],n)?t.reobserve(n):t.applyOptions(n);const r=t.getCurrentResult();L(r.data,e.current.data)||(e.previousData=e.current.data||e.previousData),e.current=r,e.variables=t.variables}t[_e]=n}function Lf(e,t){return e.query!==t.query||!L(e.variables,t.variables)||e.fetchPolicy!==t.fetchPolicy&&(t.fetchPolicy==="standby"||e.fetchPolicy==="standby")}fn.ssrDisabledResult={loading:!0,data:void 0,dataState:"empty",error:void 0,networkStatus:$r.NetworkStatus.loading,partial:!0};const Bf=({headers:e={},initialData:t,operation:n,options:r={},validationRules:o})=>{const i=ht({initialData:t,validationRules:o}),s=k.useRef(null),[c,{loading:u}]=Tf(n,{errorPolicy:"all",...r}),a=k.useCallback((p={})=>{const{onBefore:y=()=>{},onError:b=()=>{},onFinish:d=()=>{},onSuccess:m=()=>{},skipValidation:g=!1}=p;if(!g&&!i.validate())return;const E=s.current?s.current(i.data):i.data;y?.(),c({variables:{input:E},...!ut(e)&&{context:{headers:e}}}).then(O=>{O.error?b?.(O.error?.errors):m?.(O)}).catch(O=>{b?.(O)}).finally(()=>{d?.()})},[i,c,e]),l=k.useCallback(p=>(s.current=p,{...i,isLoading:u,submit:a}),[u,i,a]);return{...i,isLoading:u,submit:a,transform:l}};function Yo(e,t){return function(){return e.apply(t,arguments)}}const{toString:qf}=Object.prototype,{getPrototypeOf:dn}=Object,{iterator:gt,toStringTag:Qo}=Symbol,bt=(e=>t=>{const n=qf.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),B=e=>(e=e.toLowerCase(),t=>bt(t)===e),wt=e=>t=>typeof t===e,{isArray:ge}=Array,ye=wt("undefined");function je(e){return e!==null&&!ye(e)&&e.constructor!==null&&!ye(e.constructor)&&F(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ei=B("ArrayBuffer");function Wf(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ei(e.buffer),t}const Vf=wt("string"),F=wt("function"),ti=wt("number"),Te=e=>e!==null&&typeof e=="object",Hf=e=>e===!0||e===!1,Ge=e=>{if(bt(e)!=="object")return!1;const t=dn(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Qo in e)&&!(gt in e)},Kf=e=>{if(!Te(e)||je(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Jf=B("Date"),Gf=B("File"),Xf=B("Blob"),Yf=B("FileList"),Qf=e=>Te(e)&&F(e.pipe),ed=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||F(e.append)&&((t=bt(e))==="formdata"||t==="object"&&F(e.toString)&&e.toString()==="[object FormData]"))},td=B("URLSearchParams"),[nd,rd,od,id]=["ReadableStream","Request","Response","Headers"].map(B),sd=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ne(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ge(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(je(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let c;for(r=0;r<s;r++)c=i[r],t.call(null,e[c],c,e)}}function ni(e,t){if(je(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const oe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ri=e=>!ye(e)&&e!==oe;function qt(){const{caseless:e,skipUndefined:t}=ri(this)&&this||{},n={},r=(o,i)=>{const s=e&&ni(n,i)||i;Ge(n[s])&&Ge(o)?n[s]=qt(n[s],o):Ge(o)?n[s]=qt({},o):ge(o)?n[s]=o.slice():(!t||!ye(o))&&(n[s]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&Ne(arguments[o],r);return n}const cd=(e,t,n,{allOwnKeys:r}={})=>(Ne(t,(o,i)=>{n&&F(o)?e[i]=Yo(o,n):e[i]=o},{allOwnKeys:r}),e),ud=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ad=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ld=(e,t,n,r)=>{let o,i,s;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=n!==!1&&dn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},fd=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},dd=e=>{if(!e)return null;if(ge(e))return e;let t=e.length;if(!ti(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},hd=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&dn(Uint8Array)),pd=(e,t)=>{const r=(e&&e[gt]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},md=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},yd=B("HTMLFormElement"),gd=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),dr=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),bd=B("RegExp"),oi=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ne(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},wd=e=>{oi(e,(t,n)=>{if(F(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(F(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},_d=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return ge(e)?r(e):r(String(e).split(t)),n},vd=()=>{},Ed=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Sd(e){return!!(e&&F(e.append)&&e[Qo]==="FormData"&&e[gt])}const kd=e=>{const t=new Array(10),n=(r,o)=>{if(Te(r)){if(t.indexOf(r)>=0)return;if(je(r))return r;if(!("toJSON"in r)){t[o]=r;const i=ge(r)?[]:{};return Ne(r,(s,c)=>{const u=n(s,o+1);!ye(u)&&(i[c]=u)}),t[o]=void 0,i}}return r};return n(e,0)},Ad=B("AsyncFunction"),Od=e=>e&&(Te(e)||F(e))&&F(e.then)&&F(e.catch),ii=((e,t)=>e?setImmediate:t?((n,r)=>(oe.addEventListener("message",({source:o,data:i})=>{o===oe&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),oe.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",F(oe.postMessage)),zd=typeof queueMicrotask<"u"?queueMicrotask.bind(oe):typeof process<"u"&&process.nextTick||ii,$d=e=>e!=null&&F(e[gt]),f={isArray:ge,isArrayBuffer:ei,isBuffer:je,isFormData:ed,isArrayBufferView:Wf,isString:Vf,isNumber:ti,isBoolean:Hf,isObject:Te,isPlainObject:Ge,isEmptyObject:Kf,isReadableStream:nd,isRequest:rd,isResponse:od,isHeaders:id,isUndefined:ye,isDate:Jf,isFile:Gf,isBlob:Xf,isRegExp:bd,isFunction:F,isStream:Qf,isURLSearchParams:td,isTypedArray:hd,isFileList:Yf,forEach:Ne,merge:qt,extend:cd,trim:sd,stripBOM:ud,inherits:ad,toFlatObject:ld,kindOf:bt,kindOfTest:B,endsWith:fd,toArray:dd,forEachEntry:pd,matchAll:md,isHTMLForm:yd,hasOwnProperty:dr,hasOwnProp:dr,reduceDescriptors:oi,freezeMethods:wd,toObjectSet:_d,toCamelCase:gd,noop:vd,toFiniteNumber:Ed,findKey:ni,global:oe,isContextDefined:ri,isSpecCompliantForm:Sd,toJSONObject:kd,isAsyncFn:Ad,isThenable:Od,setImmediate:ii,asap:zd,isIterable:$d};function S(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}f.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const si=S.prototype,ci={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ci[e]={value:e}});Object.defineProperties(S,ci);Object.defineProperty(si,"isAxiosError",{value:!0});S.from=(e,t,n,r,o,i)=>{const s=Object.create(si);f.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError");const c=e&&e.message?e.message:"Error",u=t==null&&e?e.code:t;return S.call(s,c,u,n,r,o),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};const xd=null;function Wt(e){return f.isPlainObject(e)||f.isArray(e)}function ui(e){return f.endsWith(e,"[]")?e.slice(0,-2):e}function hr(e,t,n){return e?e.concat(t).map(function(o,i){return o=ui(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Rd(e){return f.isArray(e)&&!e.some(Wt)}const Id=f.toFlatObject(f,{},null,function(t){return/^is[A-Z]/.test(t)});function _t(e,t,n){if(!f.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!f.isUndefined(g[m])});const r=n.metaTokens,o=n.visitor||l,i=n.dots,s=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(t);if(!f.isFunction(o))throw new TypeError("visitor must be a function");function a(d){if(d===null)return"";if(f.isDate(d))return d.toISOString();if(f.isBoolean(d))return d.toString();if(!u&&f.isBlob(d))throw new S("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(d)||f.isTypedArray(d)?u&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function l(d,m,g){let E=d;if(d&&!g&&typeof d=="object"){if(f.endsWith(m,"{}"))m=r?m:m.slice(0,-2),d=JSON.stringify(d);else if(f.isArray(d)&&Rd(d)||(f.isFileList(d)||f.endsWith(m,"[]"))&&(E=f.toArray(d)))return m=ui(m),E.forEach(function(w,v){!(f.isUndefined(w)||w===null)&&t.append(s===!0?hr([m],v,i):s===null?m:m+"[]",a(w))}),!1}return Wt(d)?!0:(t.append(hr(g,m,i),a(d)),!1)}const p=[],y=Object.assign(Id,{defaultVisitor:l,convertValue:a,isVisitable:Wt});function b(d,m){if(!f.isUndefined(d)){if(p.indexOf(d)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(d),f.forEach(d,function(E,O){(!(f.isUndefined(E)||E===null)&&o.call(t,E,f.isString(O)?O.trim():O,m,y))===!0&&b(E,m?m.concat(O):[O])}),p.pop()}}if(!f.isObject(e))throw new TypeError("data must be an object");return b(e),t}function pr(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function hn(e,t){this._pairs=[],e&&_t(e,this,t)}const ai=hn.prototype;ai.append=function(t,n){this._pairs.push([t,n])};ai.toString=function(t){const n=t?function(r){return t.call(this,r,pr)}:pr;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Pd(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function li(e,t,n){if(!t)return e;const r=n&&n.encode||Pd;f.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=f.isURLSearchParams(t)?t.toString():new hn(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class mr{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){f.forEach(this.handlers,function(r){r!==null&&t(r)})}}const fi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zd=typeof URLSearchParams<"u"?URLSearchParams:hn,jd=typeof FormData<"u"?FormData:null,Td=typeof Blob<"u"?Blob:null,Nd={isBrowser:!0,classes:{URLSearchParams:Zd,FormData:jd,Blob:Td},protocols:["http","https","file","blob","url","data"]},pn=typeof window<"u"&&typeof document<"u",Vt=typeof navigator=="object"&&navigator||void 0,Fd=pn&&(!Vt||["ReactNative","NativeScript","NS"].indexOf(Vt.product)<0),Cd=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dd=pn&&window.location.href||"http://localhost",Ud=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pn,hasStandardBrowserEnv:Fd,hasStandardBrowserWebWorkerEnv:Cd,navigator:Vt,origin:Dd},Symbol.toStringTag,{value:"Module"})),N={...Ud,...Nd};function Md(e,t){return _t(e,new N.classes.URLSearchParams,{visitor:function(n,r,o,i){return N.isNode&&f.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function Ld(e){return f.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Bd(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function di(e){function t(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const c=Number.isFinite(+s),u=i>=n.length;return s=!s&&f.isArray(o)?o.length:s,u?(f.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!c):((!o[s]||!f.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&f.isArray(o[s])&&(o[s]=Bd(o[s])),!c)}if(f.isFormData(e)&&f.isFunction(e.entries)){const n={};return f.forEachEntry(e,(r,o)=>{t(Ld(r),o,n,0)}),n}return null}function qd(e,t,n){if(f.isString(e))try{return(t||JSON.parse)(e),f.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Fe={transitional:fi,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=f.isObject(t);if(i&&f.isHTMLForm(t)&&(t=new FormData(t)),f.isFormData(t))return o?JSON.stringify(di(t)):t;if(f.isArrayBuffer(t)||f.isBuffer(t)||f.isStream(t)||f.isFile(t)||f.isBlob(t)||f.isReadableStream(t))return t;if(f.isArrayBufferView(t))return t.buffer;if(f.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Md(t,this.formSerializer).toString();if((c=f.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return _t(c?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),qd(t)):t}],transformResponse:[function(t){const n=this.transitional||Fe.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(f.isResponse(t)||f.isReadableStream(t))return t;if(t&&f.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(s)throw c.name==="SyntaxError"?S.from(c,S.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:N.classes.FormData,Blob:N.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],e=>{Fe.headers[e]={}});const Wd=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Vd=e=>{const t={};let n,r,o;return e&&e.split(`
23
- `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&Wd[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},yr=Symbol("internals");function ve(e){return e&&String(e).trim().toLowerCase()}function Xe(e){return e===!1||e==null?e:f.isArray(e)?e.map(Xe):String(e)}function Hd(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Kd=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function xt(e,t,n,r,o){if(f.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!f.isString(t)){if(f.isString(r))return t.indexOf(r)!==-1;if(f.isRegExp(r))return r.test(t)}}function Jd(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Gd(e,t){const n=f.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,s){return this[r].call(this,t,o,i,s)},configurable:!0})})}let C=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(c,u,a){const l=ve(u);if(!l)throw new Error("header name must be a non-empty string");const p=f.findKey(o,l);(!p||o[p]===void 0||a===!0||a===void 0&&o[p]!==!1)&&(o[p||u]=Xe(c))}const s=(c,u)=>f.forEach(c,(a,l)=>i(a,l,u));if(f.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(f.isString(t)&&(t=t.trim())&&!Kd(t))s(Vd(t),n);else if(f.isObject(t)&&f.isIterable(t)){let c={},u,a;for(const l of t){if(!f.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[a=l[0]]=(u=c[a])?f.isArray(u)?[...u,l[1]]:[u,l[1]]:l[1]}s(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ve(t),t){const r=f.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Hd(o);if(f.isFunction(n))return n.call(this,o,r);if(f.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ve(t),t){const r=f.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||xt(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=ve(s),s){const c=f.findKey(r,s);c&&(!n||xt(r,r[c],c,n))&&(delete r[c],o=!0)}}return f.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||xt(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return f.forEach(this,(o,i)=>{const s=f.findKey(r,i);if(s){n[s]=Xe(o),delete n[i];return}const c=t?Jd(i):String(i).trim();c!==i&&delete n[i],n[c]=Xe(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return f.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&f.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
24
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[yr]=this[yr]={accessors:{}}).accessors,o=this.prototype;function i(s){const c=ve(s);r[c]||(Gd(o,s),r[c]=!0)}return f.isArray(t)?t.forEach(i):i(t),this}};C.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(C.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});f.freezeMethods(C);function Rt(e,t){const n=this||Fe,r=t||n,o=C.from(r.headers);let i=r.data;return f.forEach(e,function(c){i=c.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function hi(e){return!!(e&&e.__CANCEL__)}function be(e,t,n){S.call(this,e??"canceled",S.ERR_CANCELED,t,n),this.name="CanceledError"}f.inherits(be,S,{__CANCEL__:!0});function pi(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Xd(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Yd(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(u){const a=Date.now(),l=r[i];s||(s=a),n[o]=u,r[o]=a;let p=i,y=0;for(;p!==o;)y+=n[p++],p=p%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),a-s<t)return;const b=l&&a-l;return b?Math.round(y*1e3/b):void 0}}function Qd(e,t){let n=0,r=1e3/t,o,i;const s=(a,l=Date.now())=>{n=l,o=null,i&&(clearTimeout(i),i=null),e(...a)};return[(...a)=>{const l=Date.now(),p=l-n;p>=r?s(a,l):(o=a,i||(i=setTimeout(()=>{i=null,s(o)},r-p)))},()=>o&&s(o)]}const st=(e,t,n=3)=>{let r=0;const o=Yd(50,250);return Qd(i=>{const s=i.loaded,c=i.lengthComputable?i.total:void 0,u=s-r,a=o(u),l=s<=c;r=s;const p={loaded:s,total:c,progress:c?s/c:void 0,bytes:u,rate:a||void 0,estimated:a&&c&&l?(c-s)/a:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},gr=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},br=e=>(...t)=>f.asap(()=>e(...t)),eh=N.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,N.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(N.origin),N.navigator&&/(msie|trident)/i.test(N.navigator.userAgent)):()=>!0,th=N.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];f.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),f.isString(r)&&s.push("path="+r),f.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function nh(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function rh(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function mi(e,t,n){let r=!nh(t);return e&&(r||n==!1)?rh(e,t):t}const wr=e=>e instanceof C?{...e}:e;function le(e,t){t=t||{};const n={};function r(a,l,p,y){return f.isPlainObject(a)&&f.isPlainObject(l)?f.merge.call({caseless:y},a,l):f.isPlainObject(l)?f.merge({},l):f.isArray(l)?l.slice():l}function o(a,l,p,y){if(f.isUndefined(l)){if(!f.isUndefined(a))return r(void 0,a,p,y)}else return r(a,l,p,y)}function i(a,l){if(!f.isUndefined(l))return r(void 0,l)}function s(a,l){if(f.isUndefined(l)){if(!f.isUndefined(a))return r(void 0,a)}else return r(void 0,l)}function c(a,l,p){if(p in t)return r(a,l);if(p in e)return r(void 0,a)}const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(a,l,p)=>o(wr(a),wr(l),p,!0)};return f.forEach(Object.keys({...e,...t}),function(l){const p=u[l]||o,y=p(e[l],t[l],l);f.isUndefined(y)&&p!==c||(n[l]=y)}),n}const yi=e=>{const t=le({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:c}=t;if(t.headers=s=C.from(s),t.url=li(mi(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),f.isFormData(n)){if(N.hasStandardBrowserEnv||N.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(f.isFunction(n.getHeaders)){const u=n.getHeaders(),a=["content-type","content-length"];Object.entries(u).forEach(([l,p])=>{a.includes(l.toLowerCase())&&s.set(l,p)})}}if(N.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(t)),r||r!==!1&&eh(t.url))){const u=o&&i&&th.read(i);u&&s.set(o,u)}return t},oh=typeof XMLHttpRequest<"u",ih=oh&&function(e){return new Promise(function(n,r){const o=yi(e);let i=o.data;const s=C.from(o.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:a}=o,l,p,y,b,d;function m(){b&&b(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let g=new XMLHttpRequest;g.open(o.method.toUpperCase(),o.url,!0),g.timeout=o.timeout;function E(){if(!g)return;const w=C.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),A={data:!c||c==="text"||c==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:w,config:e,request:g};pi(function(D){n(D),m()},function(D){r(D),m()},A),g=null}"onloadend"in g?g.onloadend=E:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(E)},g.onabort=function(){g&&(r(new S("Request aborted",S.ECONNABORTED,e,g)),g=null)},g.onerror=function(v){const A=v&&v.message?v.message:"Network Error",T=new S(A,S.ERR_NETWORK,e,g);T.event=v||null,r(T),g=null},g.ontimeout=function(){let v=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||fi;o.timeoutErrorMessage&&(v=o.timeoutErrorMessage),r(new S(v,A.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,e,g)),g=null},i===void 0&&s.setContentType(null),"setRequestHeader"in g&&f.forEach(s.toJSON(),function(v,A){g.setRequestHeader(A,v)}),f.isUndefined(o.withCredentials)||(g.withCredentials=!!o.withCredentials),c&&c!=="json"&&(g.responseType=o.responseType),a&&([y,d]=st(a,!0),g.addEventListener("progress",y)),u&&g.upload&&([p,b]=st(u),g.upload.addEventListener("progress",p),g.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(l=w=>{g&&(r(!w||w.type?new be(null,e,g):w),g.abort(),g=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const O=Xd(o.url);if(O&&N.protocols.indexOf(O)===-1){r(new S("Unsupported protocol "+O+":",S.ERR_BAD_REQUEST,e));return}g.send(i||null)})},sh=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(a){if(!o){o=!0,c();const l=a instanceof Error?a:this.reason;r.abort(l instanceof S?l:new be(l instanceof Error?l.message:l))}};let s=t&&setTimeout(()=>{s=null,i(new S(`timeout ${t} of ms exceeded`,S.ETIMEDOUT))},t);const c=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(a=>{a.unsubscribe?a.unsubscribe(i):a.removeEventListener("abort",i)}),e=null)};e.forEach(a=>a.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>f.asap(c),u}},ch=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},uh=async function*(e,t){for await(const n of ah(e))yield*ch(n,t)},ah=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},_r=(e,t,n,r)=>{const o=uh(e,t);let i=0,s,c=u=>{s||(s=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:a,value:l}=await o.next();if(a){c(),u.close();return}let p=l.byteLength;if(n){let y=i+=p;n(y)}u.enqueue(new Uint8Array(l))}catch(a){throw c(a),a}},cancel(u){return c(u),o.return()}},{highWaterMark:2})},vr=64*1024,{isFunction:Ve}=f,lh=(({Request:e,Response:t})=>({Request:e,Response:t}))(f.global),{ReadableStream:Er,TextEncoder:Sr}=f.global,kr=(e,...t)=>{try{return!!e(...t)}catch{return!1}},fh=e=>{e=f.merge.call({skipUndefined:!0},lh,e);const{fetch:t,Request:n,Response:r}=e,o=t?Ve(t):typeof fetch=="function",i=Ve(n),s=Ve(r);if(!o)return!1;const c=o&&Ve(Er),u=o&&(typeof Sr=="function"?(d=>m=>d.encode(m))(new Sr):async d=>new Uint8Array(await new n(d).arrayBuffer())),a=i&&c&&kr(()=>{let d=!1;const m=new n(N.origin,{body:new Er,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!m}),l=s&&c&&kr(()=>f.isReadableStream(new r("").body)),p={stream:l&&(d=>d.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!p[d]&&(p[d]=(m,g)=>{let E=m&&m[d];if(E)return E.call(m);throw new S(`Response type '${d}' is not supported`,S.ERR_NOT_SUPPORT,g)})});const y=async d=>{if(d==null)return 0;if(f.isBlob(d))return d.size;if(f.isSpecCompliantForm(d))return(await new n(N.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(f.isArrayBufferView(d)||f.isArrayBuffer(d))return d.byteLength;if(f.isURLSearchParams(d)&&(d=d+""),f.isString(d))return(await u(d)).byteLength},b=async(d,m)=>{const g=f.toFiniteNumber(d.getContentLength());return g??y(m)};return async d=>{let{url:m,method:g,data:E,signal:O,cancelToken:w,timeout:v,onDownloadProgress:A,onUploadProgress:T,responseType:D,headers:Et,withCredentials:Ce="same-origin",fetchOptions:mn}=yi(d),yn=t||fetch;D=D?(D+"").toLowerCase():"text";let De=sh([O,w&&w.toAbortSignal()],v),we=null;const Q=De&&De.unsubscribe&&(()=>{De.unsubscribe()});let gn;try{if(T&&a&&g!=="get"&&g!=="head"&&(gn=await b(Et,E))!==0){let K=new n(m,{method:"POST",body:E,duplex:"half"}),he;if(f.isFormData(E)&&(he=K.headers.get("content-type"))&&Et.setContentType(he),K.body){const[St,Ue]=gr(gn,st(br(T)));E=_r(K.body,vr,St,Ue)}}f.isString(Ce)||(Ce=Ce?"include":"omit");const q=i&&"credentials"in n.prototype,bn={...mn,signal:De,method:g.toUpperCase(),headers:Et.normalize().toJSON(),body:E,duplex:"half",credentials:q?Ce:void 0};we=i&&new n(m,bn);let H=await(i?yn(we,mn):yn(m,bn));const wn=l&&(D==="stream"||D==="response");if(l&&(A||wn&&Q)){const K={};["status","statusText","headers"].forEach(_n=>{K[_n]=H[_n]});const he=f.toFiniteNumber(H.headers.get("content-length")),[St,Ue]=A&&gr(he,st(br(A),!0))||[];H=new r(_r(H.body,vr,St,()=>{Ue&&Ue(),Q&&Q()}),K)}D=D||"text";let Ei=await p[f.findKey(p,D)||"text"](H,d);return!wn&&Q&&Q(),await new Promise((K,he)=>{pi(K,he,{data:Ei,headers:C.from(H.headers),status:H.status,statusText:H.statusText,config:d,request:we})})}catch(q){throw Q&&Q(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,d,we),{cause:q.cause||q}):S.from(q,q&&q.code,d,we)}}},dh=new Map,gi=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let s=i.length,c=s,u,a,l=dh;for(;c--;)u=i[c],a=l.get(u),a===void 0&&l.set(u,a=c?new Map:fh(t)),l=a;return a};gi();const Ht={http:xd,xhr:ih,fetch:{get:gi}};f.forEach(Ht,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ar=e=>`- ${e}`,hh=e=>f.isFunction(e)||e===null||e===!1,bi={getAdapter:(e,t)=>{e=f.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let s=0;s<n;s++){r=e[s];let c;if(o=r,!hh(r)&&(o=Ht[(c=String(r)).toLowerCase()],o===void 0))throw new S(`Unknown adapter '${c}'`);if(o&&(f.isFunction(o)||(o=o.get(t))))break;i[c||"#"+s]=o}if(!o){const s=Object.entries(i).map(([u,a])=>`adapter ${u} `+(a===!1?"is not supported by the environment":"is not available in the build"));let c=n?s.length>1?`since :
25
- `+s.map(Ar).join(`
26
- `):" "+Ar(s[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o},adapters:Ht};function It(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new be(null,e)}function Or(e){return It(e),e.headers=C.from(e.headers),e.data=Rt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),bi.getAdapter(e.adapter||Fe.adapter,e)(e).then(function(r){return It(e),r.data=Rt.call(e,e.transformResponse,r),r.headers=C.from(r.headers),r},function(r){return hi(r)||(It(e),r&&r.response&&(r.response.data=Rt.call(e,e.transformResponse,r.response),r.response.headers=C.from(r.response.headers))),Promise.reject(r)})}const wi="1.12.2",vt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const zr={};vt.transitional=function(t,n,r){function o(i,s){return"[Axios v"+wi+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,c)=>{if(t===!1)throw new S(o(s," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!zr[s]&&(zr[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,c):!0}};vt.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ph(e,t,n){if(typeof e!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const c=e[i],u=c===void 0||s(c,i,e);if(u!==!0)throw new S("option "+i+" must be "+u,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+i,S.ERR_BAD_OPTION)}}const Ye={assertOptions:ph,validators:vt},W=Ye.validators;let ce=class{constructor(t){this.defaults=t||{},this.interceptors={request:new mr,response:new mr}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
27
- `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=le(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Ye.assertOptions(r,{silentJSONParsing:W.transitional(W.boolean),forcedJSONParsing:W.transitional(W.boolean),clarifyTimeoutError:W.transitional(W.boolean)},!1),o!=null&&(f.isFunction(o)?n.paramsSerializer={serialize:o}:Ye.assertOptions(o,{encode:W.function,serialize:W.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ye.assertOptions(n,{baseUrl:W.spelling("baseURL"),withXsrfToken:W.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&f.merge(i.common,i[n.method]);i&&f.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),n.headers=C.concat(s,i);const c=[];let u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(u=u&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const a=[];this.interceptors.response.forEach(function(m){a.push(m.fulfilled,m.rejected)});let l,p=0,y;if(!u){const d=[Or.bind(this),void 0];for(d.unshift(...c),d.push(...a),y=d.length,l=Promise.resolve(n);p<y;)l=l.then(d[p++],d[p++]);return l}y=c.length;let b=n;for(;p<y;){const d=c[p++],m=c[p++];try{b=d(b)}catch(g){m.call(this,g);break}}try{l=Or.call(this,b)}catch(d){return Promise.reject(d)}for(p=0,y=a.length;p<y;)l=l.then(a[p++],a[p++]);return l}getUri(t){t=le(this.defaults,t);const n=mi(t.baseURL,t.url,t.allowAbsoluteUrls);return li(n,t.params,t.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(t){ce.prototype[t]=function(n,r){return this.request(le(r||{},{method:t,url:n,data:(r||{}).data}))}});f.forEach(["post","put","patch"],function(t){function n(r){return function(i,s,c){return this.request(le(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}ce.prototype[t]=n(),ce.prototype[t+"Form"]=n(!0)});let mh=class _i{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(c=>{r.subscribe(c),i=c}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,c){r.reason||(r.reason=new be(i,s,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new _i(function(o){t=o}),cancel:t}}};function yh(e){return function(n){return e.apply(null,n)}}function gh(e){return f.isObject(e)&&e.isAxiosError===!0}const Kt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Kt).forEach(([e,t])=>{Kt[t]=e});function vi(e){const t=new ce(e),n=Yo(ce.prototype.request,t);return f.extend(n,ce.prototype,t,{allOwnKeys:!0}),f.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return vi(le(e,o))},n}const Z=vi(Fe);Z.Axios=ce;Z.CanceledError=be;Z.CancelToken=mh;Z.isCancel=hi;Z.VERSION=wi;Z.toFormData=_t;Z.AxiosError=S;Z.Cancel=Z.CanceledError;Z.all=function(t){return Promise.all(t)};Z.spread=yh;Z.isAxiosError=gh;Z.mergeConfig=le;Z.AxiosHeaders=C;Z.formToJSON=e=>di(f.isHTMLForm(e)?new FormData(e):e);Z.getAdapter=bi.getAdapter;Z.HttpStatusCode=Kt;Z.default=Z;const{Axios:kh,AxiosError:Ah,CanceledError:Oh,isCancel:zh,CancelToken:$h,VERSION:xh,all:Rh,Cancel:Ih,isAxiosError:Ph,spread:Zh,toFormData:jh,AxiosHeaders:Th,HttpStatusCode:Nh,formToJSON:Fh,getAdapter:Ch,mergeConfig:Dh}=Z,bh=({endpoint:e,headers:t={},initialData:n,validationRules:r})=>{const o=ht({initialData:n,validationRules:r}),[i,s]=k.useState(!1),c=k.useRef(null),u=k.useCallback((l={})=>{const{onBefore:p=()=>{},onCancel:y=()=>{},onError:b=()=>{},onFinish:d=()=>{},onSuccess:m=()=>{},onUpload:g=()=>{},skipValidation:E=!1}=l;if(!E&&!o.validate())return;const O=new FormData;Object.entries(o.data).forEach(([w,v])=>{Array.isArray(v)?v.forEach(A=>{A instanceof File?O.append(w,A):O.append(w,String(A))}):v instanceof File?O.append(w,v):O.append(w,String(v))}),p?.(),s(!0),c.current=new AbortController,Z.post(e,O,{headers:{"Content-Type":"multipart/form-data",...t},signal:c.current.signal,onUploadProgress:w=>{g?.(w)}}).then(w=>{m?.(w)}).catch(w=>{Z.isCancel(w)?y?.(w):b?.(w)}).finally(()=>{d?.(),s(!1),c.current=null})},[e,t,o]),a=k.useCallback(()=>{c.current&&c.current.abort("Upload cancelled by user")},[]);return{...o,upload:u,isUploading:i,cancel:a}},wh=({headers:e={},initialData:t,options:n={},query:r,validationRules:o})=>{const{data:i,setData:s,validate:c,...u}=ht({initialData:t,validationRules:o}),[a,{data:l,error:p,loading:y,refetch:b}]=jf(r,{fetchPolicy:"network-only",errorPolicy:"all",notifyOnNetworkStatusChange:!0,...n}),d=k.useCallback((g={})=>{const{onBefore:E=()=>{},onError:O=()=>{},onFinish:w=()=>{},onSuccess:v=()=>{},skipValidation:A=!1}=g;!A&&!c()||(E?.(),a({variables:{filters:i},...!ut(e)&&{context:{headers:e}}}).then(T=>{T.error?O?.(T.error?.errors):v?.(T)}).catch(T=>{O?.(T)}).finally(()=>{w?.()}))},[i,a,e,c]),m=k.useCallback(()=>{b&&b({filters:i})},[b,i]);return{...u,validate:c,filter:i,setFilter:s,isLoading:y,query:d,refetch:m,data:l,error:p}},_h=({allowRepeat:e=!1,enabled:t=!0,onArrowDown:n,onArrowUp:r,onEnter:o,onEscape:i,onTab:s})=>{const c=k.useRef({onArrowDown:n,onArrowUp:r,onEnter:o,onEscape:i,onTab:s});c.current={onArrowDown:n,onArrowUp:r,onEnter:o,onEscape:i,onTab:s},k.useEffect(()=>{if(!t)return;const u=a=>{if(a.repeat&&!e)return;const{onArrowDown:l,onArrowUp:p,onEnter:y,onEscape:b,onTab:d}=c.current;switch(a.key){case"ArrowDown":l&&(a.preventDefault(),l());break;case"ArrowUp":p&&(a.preventDefault(),p());break;case"Enter":y&&(a.preventDefault(),y());break;case"Escape":b&&(a.preventDefault(),b());break;case"Tab":d&&d();break}};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[t,e])},vh=({selector:e='[data-ox-state="selected"]'}={})=>{const[t,n]=k.useState(0),r=k.useRef(null),o=k.useCallback(()=>{if(vn(r.current))return;const s=r.current,c=s.querySelectorAll(e);c.forEach(a=>a.style.removeProperty("display"));let u=0;for(let a=c.length-1;a>=0;a--){const l=c[a];if(s.scrollWidth<=s.clientWidth)break;u=c.length-a,l.style.display="none"}n(u)},[e]),i=k.useCallback(s=>{if(r.current=s,vn(s))return()=>{};const c=new ResizeObserver(o);return c.observe(s),()=>{c.disconnect(),r.current=null}},[o]);return{overflowAmount:t,checkOverflow:o,handleResize:i}};exports.clamp=ji;exports.handleRules=Do;exports.head=us;exports.isEmpty=ut;exports.isFunction=Gr;exports.isNil=Ki;exports.isObject=nt;exports.isPlainObject=Oe;exports.isString=Xr;exports.merge=Ee;exports.omitBy=Bi;exports.pick=qi;exports.reject=hs;exports.sample=Oi;exports.take=Ri;exports.union=Pi;exports.uniqueId=_s;exports.useControllableState=vs;exports.useFileUpload=bh;exports.useFilter=wh;exports.useFocus=Ss;exports.useForm=Bf;exports.useFormState=ht;exports.useKeyboard=_h;exports.useOverflowDetection=vh;exports.useQuery=fn;exports.validator=ql;