@isardsat/editorial-admin 6.0.3 → 6.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{authSlice-5XZo_yNS.js → authSlice-B3Tyl-Nw.js} +181 -181
- package/build/client/assets/button-Da66T3Bb.js +1 -0
- package/build/client/assets/{chevron-down-BMtosYlL.js → chevron-down-D_Gla76b.js} +1 -1
- package/build/client/assets/chunk-KNED5TY2-DAA_sFzt.js +51 -0
- package/build/client/assets/{createLucideIcon-TQsNVzYU.js → createLucideIcon-R2-3a7hN.js} +1 -1
- package/build/client/assets/dashboard-BTu7-8Ba.js +1 -0
- package/build/client/assets/dashboard._collection-MtSHvYYW.js +16 -0
- package/build/client/assets/dashboard._collection._document-CRkC98aa.js +1 -0
- package/build/client/assets/dashboard._collection.new-BFe8yV0Z.js +1 -0
- package/build/client/assets/dashboard._layout-BjRnQPQr.js +66 -0
- package/build/client/assets/dashboard.files-DKh39mcB.js +36 -0
- package/build/client/assets/editorialApi-fQchmMa9.js +1 -0
- package/build/client/assets/entry.client-BGu2H8xv.js +34 -0
- package/build/client/assets/home-C2nWtN4c.js +11 -0
- package/build/client/assets/index-Bd1u2_LZ.js +45 -0
- package/build/client/assets/{index-D4Mj6Lef.js → index-BvKqmqc2.js} +1 -1
- package/build/client/assets/index-C-vcF2DZ.js +9 -0
- package/build/client/assets/{index-DZxX-xes.js → index-DeO5nu0f.js} +2 -2
- package/build/client/assets/{input-D-kT9R-x.js → input-BmmdOdbj.js} +2 -2
- package/build/client/assets/itemForm-CDbHkFXh.css +1 -0
- package/build/client/assets/itemForm-DlRBjBsd.js +90 -0
- package/build/client/assets/manifest-2ff77582.js +1 -0
- package/build/client/assets/react-redux-kbMjYGuQ.js +9 -0
- package/build/client/assets/root-DS7N36v7.css +1 -0
- package/build/client/assets/root-wKvfXBjk.js +1 -0
- package/build/client/assets/{trash-B3lfbu-5.js → trash-wq_ppIxP.js} +1 -1
- package/build/client/assets/{tslib.es6-De9GV7Vy.js → tslib.es6-CDuPK5Eb.js} +1 -1
- package/build/client/assets/utils-DslUJpbf.js +1 -0
- package/build/client/index.html +10 -18
- package/package.json +13 -11
- package/build/client/__spa-fallback.html +0 -13
- package/build/client/admin/index.html +0 -22
- package/build/client/assets/button-V-1j5t4f.js +0 -1
- package/build/client/assets/chunk-KNED5TY2-CXj9yqcQ.js +0 -51
- package/build/client/assets/dashboard-Be6nTcTN.js +0 -1
- package/build/client/assets/dashboard._collection-DppEZSog.js +0 -16
- package/build/client/assets/dashboard._collection._document-DX_V-XK4.js +0 -1
- package/build/client/assets/dashboard._collection.new-CocdSIiG.js +0 -1
- package/build/client/assets/dashboard._layout-Df-C65Il.js +0 -65
- package/build/client/assets/dashboard.files-Doq5nv7_.js +0 -36
- package/build/client/assets/editorialApi-CykQGjTu.js +0 -1
- package/build/client/assets/entry.client-B5Ca3clj.js +0 -34
- package/build/client/assets/home-ZtJfV8P0.js +0 -11
- package/build/client/assets/index-B7e3fQ32.js +0 -9
- package/build/client/assets/index-CMEgjExU.js +0 -46
- package/build/client/assets/itemForm-CcPfHU2b.css +0 -1
- package/build/client/assets/itemForm-ChV6tjGl.js +0 -99
- package/build/client/assets/manifest-a1ca6f8e.js +0 -1
- package/build/client/assets/react-redux-D9l7ZD4q.js +0 -9
- package/build/client/assets/root-BvXgIVX7.js +0 -1
- package/build/client/assets/root-DhulzpWQ.css +0 -1
- package/build/client/assets/utils-BJX_0rcU.js +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{w as et}from"./react-redux-kbMjYGuQ.js";import{a as Re,n as x,q as tt}from"./chunk-KNED5TY2-DAA_sFzt.js";import{B as rt}from"./button-Da66T3Bb.js";import{g as Ne,s as ke,a as st,u as nt,F as at,b as be,c as we,d as $e,e as Te,I as Ve,f as Ze,C as it}from"./input-BmmdOdbj.js";import{c as ot}from"./utils-DslUJpbf.js";import{c as De}from"./createLucideIcon-R2-3a7hN.js";import{u as dt,d as je,l as ct}from"./authSlice-B3Tyl-Nw.js";import"./index-BvKqmqc2.js";import"./index-C-vcF2DZ.js";import"./tslib.es6-CDuPK5Eb.js";/**
|
|
2
|
+
* @license lucide-react v0.487.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const ut=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],lt=De("loader-circle",ut);/**
|
|
7
|
+
* @license lucide-react v0.487.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const ft=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],ht=De("loader",ft),Ue=Re.forwardRef(({className:r,...e},t)=>x.jsx(lt,{ref:t,className:ot(r,"animate-spin"),...e}));Ue.displayName=ht.displayName;const Pe=(r,e,t)=>{if(r&&"reportValidity"in r){const s=Ne(t,e);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},Fe=(r,e)=>{for(const t in e.fields){const s=e.fields[t];s&&s.ref&&"reportValidity"in s.ref?Pe(s.ref,t,r):s.refs&&s.refs.forEach(n=>Pe(n,t,r))}},mt=(r,e)=>{e.shouldUseNativeValidation&&Fe(r,e);const t={};for(const s in r){const n=Ne(e.fields,s),a=Object.assign(r[s]||{},{ref:n&&n.ref});if(pt(e.names||Object.keys(r),s)){const i=Object.assign({},Ne(t,s));ke(i,"root",a),ke(t,s,i)}else ke(t,s,a)}return t},pt=(r,e)=>r.some(t=>t.startsWith(e+"."));var yt=function(r,e){for(var t={};r.length;){var s=r[0],n=s.code,a=s.message,i=s.path.join(".");if(!t[i])if("unionErrors"in s){var o=s.unionErrors[0].errors[0];t[i]={message:o.message,type:o.code}}else t[i]={message:a,type:n};if("unionErrors"in s&&s.unionErrors.forEach(function(p){return p.errors.forEach(function(T){return r.push(T)})}),e){var u=t[i].types,c=u&&u[s.code];t[i]=st(i,e,t,n,c?[].concat(c,s.message):s.message)}r.shift()}return t},vt=function(r,e,t){return t===void 0&&(t={}),function(s,n,a){try{return Promise.resolve(function(i,o){try{var u=Promise.resolve(r[t.mode==="sync"?"parse":"parseAsync"](s,e)).then(function(c){return a.shouldUseNativeValidation&&Fe({},a),{errors:{},values:t.raw?s:c}})}catch(c){return o(c)}return u&&u.then?u.then(void 0,o):u}(0,function(i){if(function(o){return Array.isArray(o==null?void 0:o.errors)}(i))return{values:{},errors:mt(yt(i.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}}},_;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},r.getValidEnumValues=n=>{const a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(const i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(_||(_={}));var Se;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Se||(Se={}));const f=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),R=r=>{switch(typeof r){case"undefined":return f.undefined;case"string":return f.string;case"number":return isNaN(r)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(r)?f.array:r===null?f.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?f.promise:typeof Map<"u"&&r instanceof Map?f.map:typeof Set<"u"&&r instanceof Set?f.set:typeof Date<"u"&&r instanceof Date?f.date:f.object;default:return f.unknown}},d=_.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),gt=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class Z extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,u=0;for(;u<i.path.length;){const c=i.path[u];u===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(i))):o[c]=o[c]||{_errors:[]},o=o[c],u++}}};return n(this),s}static assert(e){if(!(e instanceof Z))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,_.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}Z.create=r=>new Z(r);const q=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===f.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,_.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${_.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${_.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${_.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:_.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case d.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,_.assertNever(r)}return{message:t}};let Be=q;function _t(r){Be=r}function fe(){return Be}const he=r=>{const{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const u=s.filter(c=>!!c).slice().reverse();for(const c of u)o=c(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}},xt=[];function l(r,e){const t=fe(),s=he({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===q?void 0:q].filter(n=>!!n)});r.common.issues.push(s)}class b{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return y;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t){const a=await n.key,i=await n.value;s.push({key:a,value:i})}return b.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return y;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}}const y=Object.freeze({status:"aborted"}),B=r=>({status:"dirty",value:r}),w=r=>({status:"valid",value:r}),Ee=r=>r.status==="aborted",Ae=r=>r.status==="dirty",z=r=>r.status==="valid",X=r=>typeof Promise<"u"&&r instanceof Promise;function me(r,e,t,s){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function We(r,e,t,s,n){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));var H,G;class E{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Le=(r,e)=>{if(z(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Z(r.common.issues);return this._error=t,this._error}}};function v(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{var u,c;const{message:p}=r;return i.code==="invalid_enum_value"?{message:p??o.defaultError}:typeof o.data>"u"?{message:(u=p??s)!==null&&u!==void 0?u:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(c=p??t)!==null&&c!==void 0?c:o.defaultError}},description:n}}class g{get description(){return this._def.description}_getType(e){return R(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:R(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:R(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(X(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:R(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Le(n,a)}"~validate"(e){var t,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:R(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:n});return z(a)?{value:a.value}:{issues:n.common.issues}}catch(a){!((s=(t=a==null?void 0:a.message)===null||t===void 0?void 0:t.toLowerCase())===null||s===void 0)&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(a=>z(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:R(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(X(n)?n:Promise.resolve(n));return Le(s,a)}refine(e,t){const s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:d.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new j({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return S.create(this,this._def)}nullable(){return P.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return Y.create(this,this._def)}or(e){return te.create([this,e],this._def)}and(e){return re.create(this,e,this._def)}transform(e){return new j({...v(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new oe({...v(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new Ie({typeName:m.ZodBranded,type:this,...v(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new de({...v(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ue.create(this,e)}readonly(){return ce.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const kt=/^c[^\s-]{8,}$/i,bt=/^[0-9a-z]+$/,wt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Tt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Zt=/^[a-z0-9_-]{21}$/i,Ct=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Nt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,jt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,St="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ce;const Et=/^(?:(?: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])$/,At=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Ot=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Rt=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,It=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Mt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,qe="((\\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])))",$t=new RegExp(`^${qe}$`);function Je(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Vt(r){return new RegExp(`^${Je(r)}$`)}function Ye(r){let e=`${qe}T${Je(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Pt(r,e){return!!((e==="v4"||!e)&&Et.test(r)||(e==="v6"||!e)&&Ot.test(r))}function Lt(r,e){if(!Ct.test(r))return!1;try{const[t]=r.split("."),s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(s));return!(typeof n!="object"||n===null||!n.typ||!n.alg||e&&n.alg!==e)}catch{return!1}}function zt(r,e){return!!((e==="v4"||!e)&&At.test(r)||(e==="v6"||!e)&&Rt.test(r))}class C extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.string,received:a.parsedType}),y}const s=new b;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?l(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")jt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"email",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")Ce||(Ce=new RegExp(St,"u")),Ce.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"emoji",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Tt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"uuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")Zt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"nanoid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")kt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")bt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid2",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")wt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ulid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),l(n,{validation:"url",code:d.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"regex",code:d.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Ye(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?$t.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?Vt(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?Nt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"duration",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?Pt(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ip",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?Lt(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"jwt",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?zt(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cidr",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?It.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"base64",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?Mt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"base64url",code:d.invalid_string,message:a.message}),s.dirty()):_.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,...h.errToObj(s)})}_addCheck(e){return new C({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){var t,s;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new C({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new C({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new C({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}C.create=r=>{var e;return new C({checks:[],typeName:m.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...v(r)})};function Dt(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}class M extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==f.number){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.number,received:a.parsedType}),y}let s;const n=new b;for(const a of this._def.checks)a.kind==="int"?_.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Dt(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.not_finite,message:a.message}),n.dirty()):_.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&_.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}M.create=r=>new M({checks:[],typeName:m.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...v(r)});class $ extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==f.bigint)return this._getInvalidInput(e);let s;const n=new b;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):_.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:f.bigint,received:t.parsedType}),y}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}$.create=r=>{var e;return new $({checks:[],typeName:m.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...v(r)})};class Q extends g{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){const s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.boolean,received:s.parsedType}),y}return w(e.data)}}Q.create=r=>new Q({typeName:m.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...v(r)});class D extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.date,received:a.parsedType}),y}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_date}),y}const s=new b;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):_.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}D.create=r=>new D({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:m.ZodDate,...v(r)});class pe extends g{_parse(e){if(this._getType(e)!==f.symbol){const s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.symbol,received:s.parsedType}),y}return w(e.data)}}pe.create=r=>new pe({typeName:m.ZodSymbol,...v(r)});class K extends g{_parse(e){if(this._getType(e)!==f.undefined){const s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.undefined,received:s.parsedType}),y}return w(e.data)}}K.create=r=>new K({typeName:m.ZodUndefined,...v(r)});class ee extends g{_parse(e){if(this._getType(e)!==f.null){const s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.null,received:s.parsedType}),y}return w(e.data)}}ee.create=r=>new ee({typeName:m.ZodNull,...v(r)});class J extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}}J.create=r=>new J({typeName:m.ZodAny,...v(r)});class L extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}}L.create=r=>new L({typeName:m.ZodUnknown,...v(r)});class I extends g{_parse(e){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:f.never,received:t.parsedType}),y}}I.create=r=>new I({typeName:m.ZodNever,...v(r)});class ye extends g{_parse(e){if(this._getType(e)!==f.undefined){const s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.void,received:s.parsedType}),y}return w(e.data)}}ye.create=r=>new ye({typeName:m.ZodVoid,...v(r)});class N extends g{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==f.array)return l(t,{code:d.invalid_type,expected:f.array,received:t.parsedType}),y;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(l(t,{code:i?d.too_big:d.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(l(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(l(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new E(t,i,t.path,o)))).then(i=>b.mergeArray(s,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new E(t,i,t.path,o)));return b.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}N.create=(r,e)=>new N({type:r,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...v(e)});function F(r){if(r instanceof k){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=S.create(F(s))}return new k({...r._def,shape:()=>e})}else return r instanceof N?new N({...r._def,type:F(r.element)}):r instanceof S?S.create(F(r.unwrap())):r instanceof P?P.create(F(r.unwrap())):r instanceof A?A.create(r.items.map(e=>F(e))):r}class k extends g{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=_.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==f.object){const c=this._getOrReturnCtx(e);return l(c,{code:d.invalid_type,expected:f.object,received:c.parsedType}),y}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof I&&this._def.unknownKeys==="strip"))for(const c in n.data)i.includes(c)||o.push(c);const u=[];for(const c of i){const p=a[c],T=n.data[c];u.push({key:{status:"valid",value:c},value:p._parse(new E(n,T,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof I){const c=this._def.unknownKeys;if(c==="passthrough")for(const p of o)u.push({key:{status:"valid",value:p},value:{status:"valid",value:n.data[p]}});else if(c==="strict")o.length>0&&(l(n,{code:d.unrecognized_keys,keys:o}),s.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const p of o){const T=n.data[p];u.push({key:{status:"valid",value:p},value:c._parse(new E(n,T,n.path,p)),alwaysSet:p in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const p of u){const T=await p.key,Me=await p.value;c.push({key:T,value:Me,alwaysSet:p.alwaysSet})}return c}).then(c=>b.mergeObjectSync(s,c)):b.mergeObjectSync(s,u)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new k({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;const u=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:u}:{message:u}}}:{}})}strip(){return new k({...this._def,unknownKeys:"strip"})}passthrough(){return new k({...this._def,unknownKeys:"passthrough"})}extend(e){return new k({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new k({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new k({...this._def,catchall:e})}pick(e){const t={};return _.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new k({...this._def,shape:()=>t})}omit(e){const t={};return _.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new k({...this._def,shape:()=>t})}deepPartial(){return F(this)}partial(e){const t={};return _.objectKeys(this.shape).forEach(s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new k({...this._def,shape:()=>t})}required(e){const t={};return _.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof S;)a=a._def.innerType;t[s]=a}}),new k({...this._def,shape:()=>t})}keyof(){return He(_.objectKeys(this.shape))}}k.create=(r,e)=>new k({shape:()=>r,unknownKeys:"strip",catchall:I.create(),typeName:m.ZodObject,...v(e)});k.strictCreate=(r,e)=>new k({shape:()=>r,unknownKeys:"strict",catchall:I.create(),typeName:m.ZodObject,...v(e)});k.lazycreate=(r,e)=>new k({shape:r,unknownKeys:"strip",catchall:I.create(),typeName:m.ZodObject,...v(e)});class te extends g{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new Z(o.ctx.common.issues));return l(t,{code:d.invalid_union,unionErrors:i}),y}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const u of s){const c={...t,common:{...t.common,issues:[]},parent:null},p=u._parseSync({data:t.data,path:t.path,parent:c});if(p.status==="valid")return p;p.status==="dirty"&&!a&&(a={result:p,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(u=>new Z(u));return l(t,{code:d.invalid_union,unionErrors:o}),y}}get options(){return this._def.options}}te.create=(r,e)=>new te({options:r,typeName:m.ZodUnion,...v(e)});const O=r=>r instanceof ne?O(r.schema):r instanceof j?O(r.innerType()):r instanceof ae?[r.value]:r instanceof V?r.options:r instanceof ie?_.objectValues(r.enum):r instanceof oe?O(r._def.innerType):r instanceof K?[void 0]:r instanceof ee?[null]:r instanceof S?[void 0,...O(r.unwrap())]:r instanceof P?[null,...O(r.unwrap())]:r instanceof Ie||r instanceof ce?O(r.unwrap()):r instanceof de?O(r._def.innerType):[];class _e extends g{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.object)return l(t,{code:d.invalid_type,expected:f.object,received:t.parsedType}),y;const s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const a of t){const i=O(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new _e({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...v(s)})}}function Oe(r,e){const t=R(r),s=R(e);if(r===e)return{valid:!0,data:r};if(t===f.object&&s===f.object){const n=_.objectKeys(e),a=_.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(const o of a){const u=Oe(r[o],e[o]);if(!u.valid)return{valid:!1};i[o]=u.data}return{valid:!0,data:i}}else if(t===f.array&&s===f.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],u=Oe(i,o);if(!u.valid)return{valid:!1};n.push(u.data)}return{valid:!0,data:n}}else return t===f.date&&s===f.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class re extends g{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(Ee(a)||Ee(i))return y;const o=Oe(a.value,i.value);return o.valid?((Ae(a)||Ae(i))&&t.dirty(),{status:t.value,value:o.data}):(l(s,{code:d.invalid_intersection_types}),y)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}re.create=(r,e,t)=>new re({left:r,right:e,typeName:m.ZodIntersection,...v(t)});class A extends g{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.array)return l(s,{code:d.invalid_type,expected:f.array,received:s.parsedType}),y;if(s.data.length<this._def.items.length)return l(s,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),y;!this._def.rest&&s.data.length>this._def.items.length&&(l(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,o)=>{const u=this._def.items[o]||this._def.rest;return u?u._parse(new E(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>b.mergeArray(t,i)):b.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new A({...this._def,rest:e})}}A.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new A({items:r,typeName:m.ZodTuple,rest:null,...v(e)})};class se extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.object)return l(s,{code:d.invalid_type,expected:f.object,received:s.parsedType}),y;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)n.push({key:a._parse(new E(s,o,s.path,o)),value:i._parse(new E(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?b.mergeObjectAsync(t,n):b.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof g?new se({keyType:e,valueType:t,typeName:m.ZodRecord,...v(s)}):new se({keyType:C.create(),valueType:e,typeName:m.ZodRecord,...v(t)})}}class ve extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.map)return l(s,{code:d.invalid_type,expected:f.map,received:s.parsedType}),y;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,u],c)=>({key:n._parse(new E(s,o,s.path,[c,"key"])),value:a._parse(new E(s,u,s.path,[c,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const u of i){const c=await u.key,p=await u.value;if(c.status==="aborted"||p.status==="aborted")return y;(c.status==="dirty"||p.status==="dirty")&&t.dirty(),o.set(c.value,p.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const u of i){const c=u.key,p=u.value;if(c.status==="aborted"||p.status==="aborted")return y;(c.status==="dirty"||p.status==="dirty")&&t.dirty(),o.set(c.value,p.value)}return{status:t.value,value:o}}}}ve.create=(r,e,t)=>new ve({valueType:e,keyType:r,typeName:m.ZodMap,...v(t)});class U extends g{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.set)return l(s,{code:d.invalid_type,expected:f.set,received:s.parsedType}),y;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(l(s,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(l(s,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(u){const c=new Set;for(const p of u){if(p.status==="aborted")return y;p.status==="dirty"&&t.dirty(),c.add(p.value)}return{status:t.value,value:c}}const o=[...s.data.values()].map((u,c)=>a._parse(new E(s,u,s.path,c)));return s.common.async?Promise.all(o).then(u=>i(u)):i(o)}min(e,t){return new U({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new U({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}U.create=(r,e)=>new U({valueType:r,minSize:null,maxSize:null,typeName:m.ZodSet,...v(e)});class W extends g{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.function)return l(t,{code:d.invalid_type,expected:f.function,received:t.parsedType}),y;function s(o,u){return he({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,fe(),q].filter(c=>!!c),issueData:{code:d.invalid_arguments,argumentsError:u}})}function n(o,u){return he({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,fe(),q].filter(c=>!!c),issueData:{code:d.invalid_return_type,returnTypeError:u}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Y){const o=this;return w(async function(...u){const c=new Z([]),p=await o._def.args.parseAsync(u,a).catch(xe=>{throw c.addIssue(s(u,xe)),c}),T=await Reflect.apply(i,this,p);return await o._def.returns._def.type.parseAsync(T,a).catch(xe=>{throw c.addIssue(n(T,xe)),c})})}else{const o=this;return w(function(...u){const c=o._def.args.safeParse(u,a);if(!c.success)throw new Z([s(u,c.error)]);const p=Reflect.apply(i,this,c.data),T=o._def.returns.safeParse(p,a);if(!T.success)throw new Z([n(p,T.error)]);return T.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new W({...this._def,args:A.create(e).rest(L.create())})}returns(e){return new W({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new W({args:e||A.create([]).rest(L.create()),returns:t||L.create(),typeName:m.ZodFunction,...v(s)})}}class ne extends g{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ne.create=(r,e)=>new ne({getter:r,typeName:m.ZodLazy,...v(e)});class ae extends g{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),y}return{status:"valid",value:e.data}}get value(){return this._def.value}}ae.create=(r,e)=>new ae({value:r,typeName:m.ZodLiteral,...v(e)});function He(r,e){return new V({values:r,typeName:m.ZodEnum,...v(e)})}class V extends g{constructor(){super(...arguments),H.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{expected:_.joinValues(s),received:t.parsedType,code:d.invalid_type}),y}if(me(this,H)||We(this,H,new Set(this._def.values)),!me(this,H).has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{received:t.data,code:d.invalid_enum_value,options:s}),y}return w(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return V.create(e,{...this._def,...t})}exclude(e,t=this._def){return V.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}}H=new WeakMap;V.create=He;class ie extends g{constructor(){super(...arguments),G.set(this,void 0)}_parse(e){const t=_.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==f.string&&s.parsedType!==f.number){const n=_.objectValues(t);return l(s,{expected:_.joinValues(n),received:s.parsedType,code:d.invalid_type}),y}if(me(this,G)||We(this,G,new Set(_.getValidEnumValues(this._def.values))),!me(this,G).has(e.data)){const n=_.objectValues(t);return l(s,{received:s.data,code:d.invalid_enum_value,options:n}),y}return w(e.data)}get enum(){return this._def.values}}G=new WeakMap;ie.create=(r,e)=>new ie({values:r,typeName:m.ZodNativeEnum,...v(e)});class Y extends g{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.promise&&t.common.async===!1)return l(t,{code:d.invalid_type,expected:f.promise,received:t.parsedType}),y;const s=t.parsedType===f.promise?t.data:Promise.resolve(t.data);return w(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Y.create=(r,e)=>new Y({type:r,typeName:m.ZodPromise,...v(e)});class j extends g{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{l(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(s.data,a);if(s.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return y;const u=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return u.status==="aborted"?y:u.status==="dirty"||t.value==="dirty"?B(u.value):u});{if(t.value==="aborted")return y;const o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?y:o.status==="dirty"||t.value==="dirty"?B(o.value):o}}if(n.type==="refinement"){const i=o=>{const u=n.refinement(o,a);if(s.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!z(i))return i;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>z(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);_.assertNever(n)}}j.create=(r,e,t)=>new j({schema:r,typeName:m.ZodEffects,effect:e,...v(t)});j.createWithPreprocess=(r,e,t)=>new j({schema:e,effect:{type:"preprocess",transform:r},typeName:m.ZodEffects,...v(t)});class S extends g{_parse(e){return this._getType(e)===f.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}S.create=(r,e)=>new S({innerType:r,typeName:m.ZodOptional,...v(e)});class P extends g{_parse(e){return this._getType(e)===f.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}P.create=(r,e)=>new P({innerType:r,typeName:m.ZodNullable,...v(e)});class oe extends g{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===f.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}oe.create=(r,e)=>new oe({innerType:r,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});class de extends g{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return X(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Z(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Z(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}de.create=(r,e)=>new de({innerType:r,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});class ge extends g{_parse(e){if(this._getType(e)!==f.nan){const s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.nan,received:s.parsedType}),y}return{status:"valid",value:e.data}}}ge.create=r=>new ge({typeName:m.ZodNaN,...v(r)});const Ut=Symbol("zod_brand");class Ie extends g{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class ue extends g{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?y:a.status==="dirty"?(t.dirty(),B(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?y:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new ue({in:e,out:t,typeName:m.ZodPipeline})}}class ce extends g{_parse(e){const t=this._def.innerType._parse(e),s=n=>(z(n)&&(n.value=Object.freeze(n.value)),n);return X(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}}ce.create=(r,e)=>new ce({innerType:r,typeName:m.ZodReadonly,...v(e)});function Ge(r,e={},t){return r?J.create().superRefine((s,n)=>{var a,i;if(!r(s)){const o=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,u=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,c=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...c,fatal:u})}}):J.create()}const Ft={object:k.lazycreate};var m;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(m||(m={}));const Bt=(r,e={message:`Input not instance of ${r.name}`})=>Ge(t=>t instanceof r,e),Xe=C.create,Qe=M.create,Wt=ge.create,qt=$.create,Ke=Q.create,Jt=D.create,Yt=pe.create,Ht=K.create,Gt=ee.create,Xt=J.create,Qt=L.create,Kt=I.create,er=ye.create,tr=N.create,rr=k.create,sr=k.strictCreate,nr=te.create,ar=_e.create,ir=re.create,or=A.create,dr=se.create,cr=ve.create,ur=U.create,lr=W.create,fr=ne.create,hr=ae.create,mr=V.create,pr=ie.create,yr=Y.create,ze=j.create,vr=S.create,gr=P.create,_r=j.createWithPreprocess,xr=ue.create,kr=()=>Xe().optional(),br=()=>Qe().optional(),wr=()=>Ke().optional(),Tr={string:r=>C.create({...r,coerce:!0}),number:r=>M.create({...r,coerce:!0}),boolean:r=>Q.create({...r,coerce:!0}),bigint:r=>$.create({...r,coerce:!0}),date:r=>D.create({...r,coerce:!0})},Zr=y;var le=Object.freeze({__proto__:null,defaultErrorMap:q,setErrorMap:_t,getErrorMap:fe,makeIssue:he,EMPTY_PATH:xt,addIssueToContext:l,ParseStatus:b,INVALID:y,DIRTY:B,OK:w,isAborted:Ee,isDirty:Ae,isValid:z,isAsync:X,get util(){return _},get objectUtil(){return Se},ZodParsedType:f,getParsedType:R,ZodType:g,datetimeRegex:Ye,ZodString:C,ZodNumber:M,ZodBigInt:$,ZodBoolean:Q,ZodDate:D,ZodSymbol:pe,ZodUndefined:K,ZodNull:ee,ZodAny:J,ZodUnknown:L,ZodNever:I,ZodVoid:ye,ZodArray:N,ZodObject:k,ZodUnion:te,ZodDiscriminatedUnion:_e,ZodIntersection:re,ZodTuple:A,ZodRecord:se,ZodMap:ve,ZodSet:U,ZodFunction:W,ZodLazy:ne,ZodLiteral:ae,ZodEnum:V,ZodNativeEnum:ie,ZodPromise:Y,ZodEffects:j,ZodTransformer:j,ZodOptional:S,ZodNullable:P,ZodDefault:oe,ZodCatch:de,ZodNaN:ge,BRAND:Ut,ZodBranded:Ie,ZodPipeline:ue,ZodReadonly:ce,custom:Ge,Schema:g,ZodSchema:g,late:Ft,get ZodFirstPartyTypeKind(){return m},coerce:Tr,any:Xt,array:tr,bigint:qt,boolean:Ke,date:Jt,discriminatedUnion:ar,effect:ze,enum:mr,function:lr,instanceof:Bt,intersection:ir,lazy:fr,literal:hr,map:cr,nan:Wt,nativeEnum:pr,never:Kt,null:Gt,nullable:gr,number:Qe,object:rr,oboolean:wr,onumber:br,optional:vr,ostring:kr,pipeline:xr,preprocess:_r,promise:yr,record:dr,set:ur,strictObject:sr,string:Xe,symbol:Yt,transformer:ze,tuple:or,undefined:Ht,union:nr,unknown:Qt,void:er,NEVER:Zr,ZodIssueCode:d,quotelessJson:gt,ZodError:Z});const Cr=le.object({email:le.string().nonempty("Please enter your email").email(),password:le.string().nonempty("Please enter your password"),remember:le.boolean()});function Nr(){"use no memo";const r=dt(),e=je(n=>n.auth.isLoading),t=nt({resolver:vt(Cr),defaultValues:{email:"",password:"",remember:!1}}),s=Re.useCallback(({email:n,password:a,remember:i})=>{r(ct({email:n,password:a,remember:i}))},[r]);return x.jsx("div",{className:"flex flex-col",children:x.jsx(at,{...t,children:x.jsxs("form",{onSubmit:t.handleSubmit(s),className:"space-y-4",children:[x.jsx(be,{control:t.control,name:"email",rules:{required:!0},render:({field:n})=>x.jsxs(we,{children:[x.jsx($e,{className:"flex gap-1 items-baseline",children:"Email"}),x.jsx(Te,{children:x.jsx(Ve,{placeholder:"callasmaria@example.com",...n})}),x.jsx(Ze,{})]})}),x.jsx(be,{name:"password",control:t.control,rules:{required:!0},render:({field:n})=>x.jsxs(we,{children:[x.jsx($e,{className:"flex gap-1 items-baseline",children:"Password"}),x.jsx(Te,{children:x.jsx(Ve,{type:"password",...n})}),x.jsx(Ze,{})]})}),x.jsx(be,{name:"remember",control:t.control,render:({field:n})=>x.jsxs(we,{children:[x.jsx(Te,{children:x.jsxs("div",{className:"flex items-center space-x-2",children:[x.jsx(it,{id:"remember",checked:n.value,onCheckedChange:n.onChange}),x.jsx("label",{htmlFor:"remember",className:"text-sm leading-none",children:"Remember me"})]})}),x.jsx(Ze,{})]})}),x.jsx(rt,{type:"submit",disabled:!t.formState.isValid||e,className:"w-full",children:e?x.jsx(Ue,{className:"absolute"}):"Login"})]})})})}const Pr=et(function(){const e=tt(),t=je(n=>n.auth.user),s=je(n=>n.auth.isLoading);return Re.useEffect(()=>{t&&e("/admin/dashboard")},[e,t]),s||t?null:x.jsx("div",{className:"flex w-full h-full",children:x.jsxs("div",{className:"self-center space-y-8 w-72 mx-auto",children:[x.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[x.jsx("h1",{className:"text-2xl font-semibold tracking-tight leading-none",children:"Editorial Admin"}),x.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your details below to login"})]}),x.jsx(Nr,{})]})})});export{Pr as default};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import{a as c,y as hr,n as C}from"./chunk-KNED5TY2-DAA_sFzt.js";import{d as Ne,e as ue,P as W,a as I,g as mr,u as Qt,c as at,b as ye,h as vr,f as gr}from"./index-BvKqmqc2.js";import{u as G,a as yr,b as wr}from"./button-Da66T3Bb.js";import{a as J,_ as Jt,b as xr}from"./tslib.es6-CDuPK5Eb.js";import{R as br,a as Er}from"./index-C-vcF2DZ.js";var Cr=hr[" useId ".trim().toString()]||(()=>{}),Rr=0;function Te(e){const[t,n]=c.useState(Cr());return Ne(()=>{n(r=>r??String(Rr++))},[e]),e||(t?`radix-${t}`:"")}function Ar(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Pr="DismissableLayer",et="dismissableLayer.update",Sr="dismissableLayer.pointerDownOutside",Tr="dismissableLayer.focusOutside",Nt,en=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ct=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=c.useContext(en),[f,p]=c.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=c.useState({}),g=G(t,R=>p(R)),d=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=d.indexOf(v),w=f?d.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=w>=y,E=Lr(R=>{const S=R.target,D=[...u.branches].some(T=>T.contains(S));!x||D||(o==null||o(R),s==null||s(R),R.defaultPrevented||a==null||a())},m),A=Nr(R=>{const S=R.target;[...u.branches].some(T=>T.contains(S))||(i==null||i(R),s==null||s(R),R.defaultPrevented||a==null||a())},m);return Ar(R=>{w===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Nt=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Mt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Nt)}},[f,m,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Mt())},[f,u]),c.useEffect(()=>{const R=()=>h({});return document.addEventListener(et,R),()=>document.removeEventListener(et,R)},[]),C.jsx(W.div,{...l,ref:g,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,A.onFocusCapture),onBlurCapture:I(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,E.onPointerDownCapture)})});ct.displayName=Pr;var Or="DismissableLayerBranch",Dr=c.forwardRef((e,t)=>{const n=c.useContext(en),r=c.useRef(null),o=G(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx(W.div,{...e,ref:o})});Dr.displayName=Or;function Lr(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){tn(Sr,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Nr(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&tn(Tr,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Mt(){const e=new CustomEvent(et);document.dispatchEvent(e)}function tn(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mr(o,i):o.dispatchEvent(i)}var Ue="focusScope.autoFocusOnMount",ze="focusScope.autoFocusOnUnmount",kt={bubbles:!1,cancelable:!0},Mr="FocusScope",nn=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=c.useState(null),u=ue(o),f=ue(i),p=c.useRef(null),m=G(t,d=>l(d)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let d=function(b){if(h.paused||!a)return;const x=b.target;a.contains(x)?p.current=x:Q(p.current,{select:!0})},v=function(b){if(h.paused||!a)return;const x=b.relatedTarget;x!==null&&(a.contains(x)||Q(p.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&Q(a)};document.addEventListener("focusin",d),document.addEventListener("focusout",v);const w=new MutationObserver(y);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",v),w.disconnect()}}},[r,a,h.paused]),c.useEffect(()=>{if(a){Ft.add(h);const d=document.activeElement;if(!a.contains(d)){const y=new CustomEvent(Ue,kt);a.addEventListener(Ue,u),a.dispatchEvent(y),y.defaultPrevented||(kr(jr(rn(a)),{select:!0}),document.activeElement===d&&Q(a))}return()=>{a.removeEventListener(Ue,u),setTimeout(()=>{const y=new CustomEvent(ze,kt);a.addEventListener(ze,f),a.dispatchEvent(y),y.defaultPrevented||Q(d??document.body,{select:!0}),a.removeEventListener(ze,f),Ft.remove(h)},0)}}},[a,u,f,h]);const g=c.useCallback(d=>{if(!n&&!r||h.paused)return;const v=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,y=document.activeElement;if(v&&y){const w=d.currentTarget,[b,x]=_r(w);b&&x?!d.shiftKey&&y===x?(d.preventDefault(),n&&Q(b,{select:!0})):d.shiftKey&&y===b&&(d.preventDefault(),n&&Q(x,{select:!0})):y===w&&d.preventDefault()}},[n,r,h.paused]);return C.jsx(W.div,{tabIndex:-1,...s,ref:m,onKeyDown:g})});nn.displayName=Mr;function kr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Q(r,{select:t}),document.activeElement!==n)return}function _r(e){const t=rn(e),n=_t(t,e),r=_t(t.reverse(),e);return[n,r]}function rn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _t(e,t){for(const n of e)if(!Fr(n,{upTo:t}))return n}function Fr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ir(e){return e instanceof HTMLInputElement&&"select"in e}function Q(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ir(e)&&t&&e.select()}}var Ft=Wr();function Wr(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=It(e,t),e.unshift(t)},remove(t){var n;e=It(e,t),(n=e[0])==null||n.resume()}}}function It(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jr(e){return e.filter(t=>t.tagName!=="A")}var Br="Portal",lt=c.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=c.useState(!1);Ne(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?br.createPortal(C.jsx(W.div,{...r,ref:t}),s):null});lt.displayName=Br;var Xe=0;function Hr(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Wt()),document.body.insertAdjacentElement("beforeend",e[1]??Wt()),Xe++,()=>{Xe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xe--}},[])}function Wt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Oe="right-scroll-bar-position",De="width-before-scroll-bar",$r="with-scroll-bars-hidden",Vr="--removed-body-scroll-bar-size";function Ge(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yr(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Ur=typeof window<"u"?c.useLayoutEffect:c.useEffect,jt=new WeakMap;function zr(e,t){var n=Yr(null,function(r){return e.forEach(function(o){return Ge(o,r)})});return Ur(function(){var r=jt.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Ge(a,null)}),i.forEach(function(a){o.has(a)||Ge(a,s)})}jt.set(n,e)},[e]),n}function Xr(e){return e}function Gr(e,t){t===void 0&&(t=Xr);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var f=s;s=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),n}}}};return o}function Kr(e){e===void 0&&(e={});var t=Gr(null);return t.options=J({async:!0,ssr:!1},e),t}var on=function(e){var t=e.sideCar,n=Jt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,J({},n))};on.isSideCarExport=!0;function qr(e,t){return e.useMedium(t),on}var sn=Kr(),Ke=function(){},We=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Ke,onWheelCapture:Ke,onTouchMoveCapture:Ke}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,h=e.noIsolation,g=e.inert,d=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,w=e.gapMode,b=Jt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=m,E=zr([n,t]),A=J(J({},b),o);return c.createElement(c.Fragment,null,f&&c.createElement(x,{sideCar:sn,removeScrollBar:u,shards:p,noIsolation:h,inert:g,setCallbacks:i,allowPinchZoom:!!d,lockRef:n,gapMode:w}),s?c.cloneElement(c.Children.only(a),J(J({},A),{ref:E})):c.createElement(y,J({},A,{className:l,ref:E}),a))});We.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};We.classNames={fullWidth:De,zeroRight:Oe};var Zr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Qr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Zr();return t&&e.setAttribute("nonce",t),e}function Jr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eo(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var to=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Qr())&&(Jr(t,n),eo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},no=function(){var e=to();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},an=function(){var e=no(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ro={left:0,top:0,right:0,gap:0},qe=function(e){return parseInt(e||"",10)||0},oo=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qe(n),qe(r),qe(o)]},io=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ro;var t=oo(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},so=an(),ce="data-scroll-locked",ao=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat($r,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(ce,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(o,`px;
|
|
11
|
+
padding-top: `).concat(i,`px;
|
|
12
|
+
padding-right: `).concat(s,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(Oe,` {
|
|
20
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(De,` {
|
|
24
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(Oe," .").concat(Oe,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(De," .").concat(De,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(ce,`] {
|
|
36
|
+
`).concat(Vr,": ").concat(a,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},Bt=function(){var e=parseInt(document.body.getAttribute(ce)||"0",10);return isFinite(e)?e:0},co=function(){c.useEffect(function(){return document.body.setAttribute(ce,(Bt()+1).toString()),function(){var e=Bt()-1;e<=0?document.body.removeAttribute(ce):document.body.setAttribute(ce,e.toString())}},[])},lo=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;co();var i=c.useMemo(function(){return io(o)},[o]);return c.createElement(so,{styles:ao(i,!t,o,n?"":"!important")})},tt=!1;if(typeof window<"u")try{var Ce=Object.defineProperty({},"passive",{get:function(){return tt=!0,!0}});window.addEventListener("test",Ce,Ce),window.removeEventListener("test",Ce,Ce)}catch{tt=!1}var ie=tt?{passive:!1}:!1,uo=function(e){return e.tagName==="TEXTAREA"},cn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!uo(e)&&n[t]==="visible")},fo=function(e){return cn(e,"overflowY")},po=function(e){return cn(e,"overflowX")},Ht=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ln(e,r);if(o){var i=un(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ho=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},mo=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ln=function(e,t){return e==="v"?fo(t):po(t)},un=function(e,t){return e==="v"?ho(t):mo(t)},vo=function(e,t){return e==="h"&&t==="rtl"?-1:1},go=function(e,t,n,r,o){var i=vo(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,f=s>0,p=0,m=0;do{var h=un(e,a),g=h[0],d=h[1],v=h[2],y=d-v-i*g;(g||y)&&ln(e,a)&&(p+=y,m+=g),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&Math.abs(p)<1||!f&&Math.abs(m)<1)&&(u=!0),u},Re=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$t=function(e){return[e.deltaX,e.deltaY]},Vt=function(e){return e&&"current"in e?e.current:e},yo=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wo=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},xo=0,se=[];function bo(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(xo++)[0],i=c.useState(an)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var d=xr([e.lockRef.current],(e.shards||[]).map(Vt),!0).filter(Boolean);return d.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),d.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(d,v){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!s.current.allowPinchZoom;var y=Re(d),w=n.current,b="deltaX"in d?d.deltaX:w[0]-y[0],x="deltaY"in d?d.deltaY:w[1]-y[1],E,A=d.target,R=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in d&&R==="h"&&A.type==="range")return!1;var S=Ht(R,A);if(!S)return!0;if(S?E=R:(E=R==="v"?"h":"v",S=Ht(R,A)),!S)return!1;if(!r.current&&"changedTouches"in d&&(b||x)&&(r.current=E),!E)return!0;var D=r.current||E;return go(D,v,d,D==="h"?b:x)},[]),l=c.useCallback(function(d){var v=d;if(!(!se.length||se[se.length-1]!==i)){var y="deltaY"in v?$t(v):Re(v),w=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&yo(E.delta,y)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var b=(s.current.shards||[]).map(Vt).filter(Boolean).filter(function(E){return E.contains(v.target)}),x=b.length>0?a(v,b[0]):!s.current.noIsolation;x&&v.cancelable&&v.preventDefault()}}},[]),u=c.useCallback(function(d,v,y,w){var b={name:d,delta:v,target:y,should:w,shadowParent:Eo(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),f=c.useCallback(function(d){n.current=Re(d),r.current=void 0},[]),p=c.useCallback(function(d){u(d.type,$t(d),d.target,a(d,e.lockRef.current))},[]),m=c.useCallback(function(d){u(d.type,Re(d),d.target,a(d,e.lockRef.current))},[]);c.useEffect(function(){return se.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,ie),document.addEventListener("touchmove",l,ie),document.addEventListener("touchstart",f,ie),function(){se=se.filter(function(d){return d!==i}),document.removeEventListener("wheel",l,ie),document.removeEventListener("touchmove",l,ie),document.removeEventListener("touchstart",f,ie)}},[]);var h=e.removeScrollBar,g=e.inert;return c.createElement(c.Fragment,null,g?c.createElement(i,{styles:wo(o)}):null,h?c.createElement(lo,{gapMode:e.gapMode}):null)}function Eo(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Co=qr(sn,bo);var fn=c.forwardRef(function(e,t){return c.createElement(We,J({},e,{ref:t,sideCar:Co}))});fn.classNames=We.classNames;var Ro=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ae=new WeakMap,Ae=new WeakMap,Pe={},Ze=0,dn=function(e){return e&&(e.host||dn(e.parentNode))},Ao=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=dn(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Po=function(e,t,n,r){var o=Ao(t,Array.isArray(e)?e:[e]);Pe[n]||(Pe[n]=new WeakMap);var i=Pe[n],s=[],a=new Set,l=new Set(o),u=function(p){!p||a.has(p)||(a.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(a.has(m))f(m);else try{var h=m.getAttribute(r),g=h!==null&&h!=="false",d=(ae.get(m)||0)+1,v=(i.get(m)||0)+1;ae.set(m,d),i.set(m,v),s.push(m),d===1&&g&&Ae.set(m,!0),v===1&&m.setAttribute(n,"true"),g||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return f(t),a.clear(),Ze++,function(){s.forEach(function(p){var m=ae.get(p)-1,h=i.get(p)-1;ae.set(p,m),i.set(p,h),m||(Ae.has(p)||p.removeAttribute(r),Ae.delete(p)),h||p.removeAttribute(n)}),Ze--,Ze||(ae=new WeakMap,ae=new WeakMap,Ae=new WeakMap,Pe={})}},So=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ro(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Po(r,o,n,"aria-hidden")):function(){return null}},ut="Dialog",[pn,ms]=at(ut),[To,Y]=pn(ut),hn=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=c.useRef(null),l=c.useRef(null),[u=!1,f]=Qt({prop:r,defaultProp:o,onChange:i});return C.jsx(To,{scope:t,triggerRef:a,contentRef:l,contentId:Te(),titleId:Te(),descriptionId:Te(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:s,children:n})};hn.displayName=ut;var mn="DialogTrigger",Oo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Y(mn,n),i=G(t,o.triggerRef);return C.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":pt(o.open),...r,ref:i,onClick:I(e.onClick,o.onOpenToggle)})});Oo.displayName=mn;var ft="DialogPortal",[Do,vn]=pn(ft,{forceMount:void 0}),gn=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Y(ft,t);return C.jsx(Do,{scope:t,forceMount:n,children:c.Children.map(r,s=>C.jsx(ye,{present:n||i.open,children:C.jsx(lt,{asChild:!0,container:o,children:s})}))})};gn.displayName=ft;var Me="DialogOverlay",yn=c.forwardRef((e,t)=>{const n=vn(Me,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Y(Me,e.__scopeDialog);return i.modal?C.jsx(ye,{present:r||i.open,children:C.jsx(No,{...o,ref:t})}):null});yn.displayName=Me;var Lo=yr("DialogOverlay.RemoveScroll"),No=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Y(Me,n);return C.jsx(fn,{as:Lo,allowPinchZoom:!0,shards:[o.contentRef],children:C.jsx(W.div,{"data-state":pt(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),re="DialogContent",wn=c.forwardRef((e,t)=>{const n=vn(re,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Y(re,e.__scopeDialog);return C.jsx(ye,{present:r||i.open,children:i.modal?C.jsx(Mo,{...o,ref:t}):C.jsx(ko,{...o,ref:t})})});wn.displayName=re;var Mo=c.forwardRef((e,t)=>{const n=Y(re,e.__scopeDialog),r=c.useRef(null),o=G(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return So(i)},[]),C.jsx(xn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:I(e.onFocusOutside,i=>i.preventDefault())})}),ko=c.forwardRef((e,t)=>{const n=Y(re,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return C.jsx(xn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),xn=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=Y(re,n),l=c.useRef(null),u=G(t,l);return Hr(),C.jsxs(C.Fragment,{children:[C.jsx(nn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:C.jsx(ct,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":pt(a.open),...s,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),C.jsxs(C.Fragment,{children:[C.jsx(_o,{titleId:a.titleId}),C.jsx(Io,{contentRef:l,descriptionId:a.descriptionId})]})]})}),dt="DialogTitle",bn=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Y(dt,n);return C.jsx(W.h2,{id:o.titleId,...r,ref:t})});bn.displayName=dt;var En="DialogDescription",Cn=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Y(En,n);return C.jsx(W.p,{id:o.descriptionId,...r,ref:t})});Cn.displayName=En;var Rn="DialogClose",An=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Y(Rn,n);return C.jsx(W.button,{type:"button",...r,ref:t,onClick:I(e.onClick,()=>o.onOpenChange(!1))})});An.displayName=Rn;function pt(e){return e?"open":"closed"}var Pn="DialogTitleWarning",[vs,Sn]=vr(Pn,{contentName:re,titleName:dt,docsSlug:"dialog"}),_o=({titleId:e})=>{const t=Sn(Pn),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
+
|
|
43
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
+
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Fo="DialogDescriptionWarning",Io=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Sn(Fo).contentName}}.`;return c.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},gs=hn,ys=gn,ws=yn,xs=wn,bs=bn,Es=Cn,Cs=An;const Wo=["top","right","bottom","left"],ee=Math.min,j=Math.max,ke=Math.round,Se=Math.floor,z=e=>({x:e,y:e}),jo={left:"right",right:"left",bottom:"top",top:"bottom"},Bo={start:"end",end:"start"};function nt(e,t,n){return j(e,ee(t,n))}function q(e,t){return typeof e=="function"?e(t):e}function Z(e){return e.split("-")[0]}function pe(e){return e.split("-")[1]}function ht(e){return e==="x"?"y":"x"}function mt(e){return e==="y"?"height":"width"}function te(e){return["top","bottom"].includes(Z(e))?"y":"x"}function vt(e){return ht(te(e))}function Ho(e,t,n){n===void 0&&(n=!1);const r=pe(e),o=vt(e),i=mt(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=_e(s)),[s,_e(s)]}function $o(e){const t=_e(e);return[rt(e),t,rt(t)]}function rt(e){return e.replace(/start|end/g,t=>Bo[t])}function Vo(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function Yo(e,t,n,r){const o=pe(e);let i=Vo(Z(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(rt)))),i}function _e(e){return e.replace(/left|right|bottom|top/g,t=>jo[t])}function Uo(e){return{top:0,right:0,bottom:0,left:0,...e}}function Tn(e){return typeof e!="number"?Uo(e):{top:e,right:e,bottom:e,left:e}}function Fe(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Yt(e,t,n){let{reference:r,floating:o}=e;const i=te(t),s=vt(t),a=mt(s),l=Z(t),u=i==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-o.width,y:p};break;default:h={x:r.x,y:r.y}}switch(pe(t)){case"start":h[s]-=m*(n&&u?-1:1);break;case"end":h[s]+=m*(n&&u?-1:1);break}return h}const zo=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Yt(u,r,l),m=r,h={},g=0;for(let d=0;d<a.length;d++){const{name:v,fn:y}=a[d],{x:w,y:b,data:x,reset:E}=await y({x:f,y:p,initialPlacement:r,placement:m,strategy:o,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});f=w??f,p=b??p,h={...h,[v]:{...h[v],...x}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:p}=Yt(u,m,l)),d=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:h}};async function ve(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:h=0}=q(t,e),g=Tn(h),v=a[m?p==="floating"?"reference":"floating":p],y=Fe(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),w=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=Fe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:l}):w);return{top:(y.top-E.top+g.top)/x.y,bottom:(E.bottom-y.bottom+g.bottom)/x.y,left:(y.left-E.left+g.left)/x.x,right:(E.right-y.right+g.right)/x.x}}const Xo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=q(e,t)||{};if(u==null)return{};const p=Tn(f),m={x:n,y:r},h=vt(o),g=mt(h),d=await s.getDimensions(u),v=h==="y",y=v?"top":"left",w=v?"bottom":"right",b=v?"clientHeight":"clientWidth",x=i.reference[g]+i.reference[h]-m[h]-i.floating[g],E=m[h]-i.reference[h],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let R=A?A[b]:0;(!R||!await(s.isElement==null?void 0:s.isElement(A)))&&(R=a.floating[b]||i.floating[g]);const S=x/2-E/2,D=R/2-d[g]/2-1,T=ee(p[y],D),_=ee(p[w],D),F=T,L=R-d[g]-_,O=R/2-d[g]/2+S,H=nt(F,O,L),N=!l.arrow&&pe(o)!=null&&O!==H&&i.reference[g]/2-(O<F?T:_)-d[g]/2<0,M=N?O<F?O-F:O-L:0;return{[h]:m[h]+M,data:{[h]:H,centerOffset:O-H-M,...N&&{alignmentOffset:M}},reset:N}}}),Go=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:d=!0,...v}=q(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Z(o),w=te(a),b=Z(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=m||(b||!d?[_e(a)]:$o(a)),A=g!=="none";!m&&A&&E.push(...Yo(a,d,g,x));const R=[a,...E],S=await ve(t,v),D=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&D.push(S[y]),p){const O=Ho(o,s,x);D.push(S[O[0]],S[O[1]])}if(T=[...T,{placement:o,overflows:D}],!D.every(O=>O<=0)){var _,F;const O=(((_=i.flip)==null?void 0:_.index)||0)+1,H=R[O];if(H)return{data:{index:O,overflows:T},reset:{placement:H}};let N=(F=T.filter(M=>M.overflows[0]<=0).sort((M,P)=>M.overflows[1]-P.overflows[1])[0])==null?void 0:F.placement;if(!N)switch(h){case"bestFit":{var L;const M=(L=T.filter(P=>{if(A){const k=te(P.placement);return k===w||k==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(k=>k>0).reduce((k,U)=>k+U,0)]).sort((P,k)=>P[1]-k[1])[0])==null?void 0:L[0];M&&(N=M);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function Ut(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zt(e){return Wo.some(t=>e[t]>=0)}const Ko=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=q(e,t);switch(r){case"referenceHidden":{const i=await ve(t,{...o,elementContext:"reference"}),s=Ut(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:zt(s)}}}case"escaped":{const i=await ve(t,{...o,altBoundary:!0}),s=Ut(i,n.floating);return{data:{escapedOffsets:s,escaped:zt(s)}}}default:return{}}}}};async function qo(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Z(n),a=pe(n),l=te(n)==="y",u=["left","top"].includes(s)?-1:1,f=i&&l?-1:1,p=q(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*f,y:m*u}:{x:m*u,y:h*f}}const Zo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await qo(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Qo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:y,y:w}=v;return{x:y,y:w}}},...l}=q(e,t),u={x:n,y:r},f=await ve(t,l),p=te(Z(o)),m=ht(p);let h=u[m],g=u[p];if(i){const v=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=h+f[v],b=h-f[y];h=nt(w,h,b)}if(s){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=g+f[v],b=g-f[y];g=nt(w,g,b)}const d=a.fn({...t,[m]:h,[p]:g});return{...d,data:{x:d.x-n,y:d.y-r,enabled:{[m]:i,[p]:s}}}}}},Jo=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=q(e,t),f={x:n,y:r},p=te(o),m=ht(p);let h=f[m],g=f[p];const d=q(a,t),v=typeof d=="number"?{mainAxis:d,crossAxis:0}:{mainAxis:0,crossAxis:0,...d};if(l){const b=m==="y"?"height":"width",x=i.reference[m]-i.floating[b]+v.mainAxis,E=i.reference[m]+i.reference[b]-v.mainAxis;h<x?h=x:h>E&&(h=E)}if(u){var y,w;const b=m==="y"?"width":"height",x=["top","left"].includes(Z(o)),E=i.reference[p]-i.floating[b]+(x&&((y=s.offset)==null?void 0:y[p])||0)+(x?0:v.crossAxis),A=i.reference[p]+i.reference[b]+(x?0:((w=s.offset)==null?void 0:w[p])||0)-(x?v.crossAxis:0);g<E?g=E:g>A&&(g=A)}return{[m]:h,[p]:g}}}},ei=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=q(e,t),f=await ve(t,u),p=Z(o),m=pe(o),h=te(o)==="y",{width:g,height:d}=i.floating;let v,y;p==="top"||p==="bottom"?(v=p,y=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=p,v=m==="end"?"top":"bottom");const w=d-f.top-f.bottom,b=g-f.left-f.right,x=ee(d-f[v],w),E=ee(g-f[y],b),A=!t.middlewareData.shift;let R=x,S=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=w),A&&!m){const T=j(f.left,0),_=j(f.right,0),F=j(f.top,0),L=j(f.bottom,0);h?S=g-2*(T!==0||_!==0?T+_:j(f.left,f.right)):R=d-2*(F!==0||L!==0?F+L:j(f.top,f.bottom))}await l({...t,availableWidth:S,availableHeight:R});const D=await s.getDimensions(a.floating);return g!==D.width||d!==D.height?{reset:{rects:!0}}:{}}}};function je(){return typeof window<"u"}function he(e){return On(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function K(e){var t;return(t=(On(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function On(e){return je()?e instanceof Node||e instanceof B(e).Node:!1}function $(e){return je()?e instanceof Element||e instanceof B(e).Element:!1}function X(e){return je()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function Xt(e){return!je()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}function we(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ti(e){return["table","td","th"].includes(he(e))}function Be(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function gt(e){const t=yt(),n=$(e)?V(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function ni(e){let t=ne(e);for(;X(t)&&!fe(t);){if(gt(t))return t;if(Be(t))return null;t=ne(t)}return null}function yt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fe(e){return["html","body","#document"].includes(he(e))}function V(e){return B(e).getComputedStyle(e)}function He(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ne(e){if(he(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xt(e)&&e.host||K(e);return Xt(t)?t.host:t}function Dn(e){const t=ne(e);return fe(t)?e.ownerDocument?e.ownerDocument.body:e.body:X(t)&&we(t)?t:Dn(t)}function ge(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Dn(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=B(o);if(i){const a=ot(s);return t.concat(s,s.visualViewport||[],we(o)?o:[],a&&n?ge(a):[])}return t.concat(o,ge(o,[],n))}function ot(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ln(e){const t=V(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=X(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ke(n)!==i||ke(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function wt(e){return $(e)?e:e.contextElement}function le(e){const t=wt(e);if(!X(t))return z(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ln(t);let s=(i?ke(n.width):n.width)/r,a=(i?ke(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const ri=z(0);function Nn(e){const t=B(e);return!yt()||!t.visualViewport?ri:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oi(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function oe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=wt(e);let s=z(1);t&&(r?$(r)&&(s=le(r)):s=le(e));const a=oi(i,n,r)?Nn(i):z(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(i){const m=B(i),h=r&&$(r)?B(r):r;let g=m,d=ot(g);for(;d&&r&&h!==g;){const v=le(d),y=d.getBoundingClientRect(),w=V(d),b=y.left+(d.clientLeft+parseFloat(w.paddingLeft))*v.x,x=y.top+(d.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,u*=v.y,f*=v.x,p*=v.y,l+=b,u+=x,g=B(d),d=ot(g)}}return Fe({width:f,height:p,x:l,y:u})}function xt(e,t){const n=He(e).scrollLeft;return t?t.left+n:oe(K(e)).left+n}function Mn(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:xt(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function ii(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=K(r),a=t?Be(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=z(1);const f=z(0),p=X(r);if((p||!p&&!i)&&((he(r)!=="body"||we(s))&&(l=He(r)),X(r))){const h=oe(r);u=le(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const m=s&&!p&&!i?Mn(s,l,!0):z(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-l.scrollTop*u.y+f.y+m.y}}function si(e){return Array.from(e.getClientRects())}function ai(e){const t=K(e),n=He(e),r=e.ownerDocument.body,o=j(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=j(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+xt(e);const a=-n.scrollTop;return V(r).direction==="rtl"&&(s+=j(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function ci(e,t){const n=B(e),r=K(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=yt();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function li(e,t){const n=oe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=X(e)?le(e):z(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function Gt(e,t,n){let r;if(t==="viewport")r=ci(e,n);else if(t==="document")r=ai(K(e));else if($(t))r=li(t,n);else{const o=Nn(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Fe(r)}function kn(e,t){const n=ne(e);return n===t||!$(n)||fe(n)?!1:V(n).position==="fixed"||kn(n,t)}function ui(e,t){const n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(a=>$(a)&&he(a)!=="body"),o=null;const i=V(e).position==="fixed";let s=i?ne(e):e;for(;$(s)&&!fe(s);){const a=V(s),l=gt(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||we(s)&&!l&&kn(e,s))?r=r.filter(f=>f!==s):o=a,s=ne(s)}return t.set(e,r),r}function fi(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Be(t)?[]:ui(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,f)=>{const p=Gt(t,f,o);return u.top=j(p.top,u.top),u.right=ee(p.right,u.right),u.bottom=ee(p.bottom,u.bottom),u.left=j(p.left,u.left),u},Gt(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function di(e){const{width:t,height:n}=Ln(e);return{width:t,height:n}}function pi(e,t,n){const r=X(t),o=K(t),i=n==="fixed",s=oe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=z(0);if(r||!r&&!i)if((he(t)!=="body"||we(o))&&(a=He(t)),r){const m=oe(t,!0,i,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else o&&(l.x=xt(o));const u=o&&!r&&!i?Mn(o,a):z(0),f=s.left+a.scrollLeft-l.x-u.x,p=s.top+a.scrollTop-l.y-u.y;return{x:f,y:p,width:s.width,height:s.height}}function Qe(e){return V(e).position==="static"}function Kt(e,t){if(!X(e)||V(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return K(e)===n&&(n=n.ownerDocument.body),n}function _n(e,t){const n=B(e);if(Be(e))return n;if(!X(e)){let o=ne(e);for(;o&&!fe(o);){if($(o)&&!Qe(o))return o;o=ne(o)}return n}let r=Kt(e,t);for(;r&&ti(r)&&Qe(r);)r=Kt(r,t);return r&&fe(r)&&Qe(r)&&!gt(r)?n:r||ni(e)||n}const hi=async function(e){const t=this.getOffsetParent||_n,n=this.getDimensions,r=await n(e.floating);return{reference:pi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mi(e){return V(e).direction==="rtl"}const vi={convertOffsetParentRelativeRectToViewportRelativeRect:ii,getDocumentElement:K,getClippingRect:fi,getOffsetParent:_n,getElementRects:hi,getClientRects:si,getDimensions:di,getScale:le,isElement:$,isRTL:mi};function Fn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gi(e,t){let n=null,r;const o=K(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:f,top:p,width:m,height:h}=u;if(a||t(),!m||!h)return;const g=Se(p),d=Se(o.clientWidth-(f+m)),v=Se(o.clientHeight-(p+h)),y=Se(f),b={rootMargin:-g+"px "+-d+"px "+-v+"px "+-y+"px",threshold:j(0,ee(1,l))||1};let x=!0;function E(A){const R=A[0].intersectionRatio;if(R!==l){if(!x)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!Fn(u,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return s(!0),i}function yi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=wt(e),f=o||i?[...u?ge(u):[],...ge(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const p=u&&a?gi(u,n):null;let m=-1,h=null;s&&(h=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let g,d=l?oe(e):null;l&&v();function v(){const y=oe(e);d&&!Fn(d,y)&&n(),d=y,g=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),p==null||p(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const wi=Zo,xi=Qo,bi=Go,Ei=ei,Ci=Ko,qt=Xo,Ri=Jo,Ai=(e,t,n)=>{const r=new Map,o={platform:vi,...n},i={...o.platform,_c:r};return zo(e,t,{...o,platform:i})};var Le=typeof document<"u"?c.useLayoutEffect:c.useEffect;function Ie(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ie(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ie(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function In(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zt(e,t){const n=In(e);return Math.round(t*n)/n}function Je(e){const t=c.useRef(e);return Le(()=>{t.current=e}),t}function Pi(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=c.useState(r);Ie(m,r)||h(r);const[g,d]=c.useState(null),[v,y]=c.useState(null),w=c.useCallback(P=>{P!==A.current&&(A.current=P,d(P))},[]),b=c.useCallback(P=>{P!==R.current&&(R.current=P,y(P))},[]),x=i||g,E=s||v,A=c.useRef(null),R=c.useRef(null),S=c.useRef(f),D=l!=null,T=Je(l),_=Je(o),F=Je(u),L=c.useCallback(()=>{if(!A.current||!R.current)return;const P={placement:t,strategy:n,middleware:m};_.current&&(P.platform=_.current),Ai(A.current,R.current,P).then(k=>{const U={...k,isPositioned:F.current!==!1};O.current&&!Ie(S.current,U)&&(S.current=U,Er.flushSync(()=>{p(U)}))})},[m,t,n,_,F]);Le(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,p(P=>({...P,isPositioned:!1})))},[u]);const O=c.useRef(!1);Le(()=>(O.current=!0,()=>{O.current=!1}),[]),Le(()=>{if(x&&(A.current=x),E&&(R.current=E),x&&E){if(T.current)return T.current(x,E,L);L()}},[x,E,L,T,D]);const H=c.useMemo(()=>({reference:A,floating:R,setReference:w,setFloating:b}),[w,b]),N=c.useMemo(()=>({reference:x,floating:E}),[x,E]),M=c.useMemo(()=>{const P={position:n,left:0,top:0};if(!N.floating)return P;const k=Zt(N.floating,f.x),U=Zt(N.floating,f.y);return a?{...P,transform:"translate("+k+"px, "+U+"px)",...In(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:U}},[n,a,N.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:L,refs:H,elements:N,floatingStyles:M}),[f,L,H,N,M])}const Si=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qt({element:r.current,padding:o}).fn(n):{}:r?qt({element:r,padding:o}).fn(n):{}}}},Ti=(e,t)=>({...wi(e),options:[e,t]}),Oi=(e,t)=>({...xi(e),options:[e,t]}),Di=(e,t)=>({...Ri(e),options:[e,t]}),Li=(e,t)=>({...bi(e),options:[e,t]}),Ni=(e,t)=>({...Ei(e),options:[e,t]}),Mi=(e,t)=>({...Ci(e),options:[e,t]}),ki=(e,t)=>({...Si(e),options:[e,t]});var _i="Arrow",Wn=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return C.jsx(W.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});Wn.displayName=_i;var Fi=Wn,bt="Popper",[jn,Bn]=at(bt),[Ii,Hn]=jn(bt),$n=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return C.jsx(Ii,{scope:t,anchor:r,onAnchorChange:o,children:n})};$n.displayName=bt;var Vn="PopperAnchor",Yn=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Hn(Vn,n),s=c.useRef(null),a=G(t,s);return c.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:C.jsx(W.div,{...o,ref:a})});Yn.displayName=Vn;var Et="PopperContent",[Wi,ji]=jn(Et),Un=c.forwardRef((e,t)=>{var At,Pt,St,Tt,Ot,Dt;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:g,...d}=e,v=Hn(Et,n),[y,w]=c.useState(null),b=G(t,me=>w(me)),[x,E]=c.useState(null),A=gr(x),R=(A==null?void 0:A.width)??0,S=(A==null?void 0:A.height)??0,D=r+(i!=="center"?"-"+i:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},_=Array.isArray(u)?u:[u],F=_.length>0,L={padding:T,boundary:_.filter(Hi),altBoundary:F},{refs:O,floatingStyles:H,placement:N,isPositioned:M,middlewareData:P}=Pi({strategy:"fixed",placement:D,whileElementsMounted:(...me)=>yi(...me,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Ti({mainAxis:o+S,alignmentAxis:s}),l&&Oi({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Di():void 0,...L}),l&&Li({...L}),Ni({...L,apply:({elements:me,rects:Lt,availableWidth:ur,availableHeight:fr})=>{const{width:dr,height:pr}=Lt.reference,Ee=me.floating.style;Ee.setProperty("--radix-popper-available-width",`${ur}px`),Ee.setProperty("--radix-popper-available-height",`${fr}px`),Ee.setProperty("--radix-popper-anchor-width",`${dr}px`),Ee.setProperty("--radix-popper-anchor-height",`${pr}px`)}}),x&&ki({element:x,padding:a}),$i({arrowWidth:R,arrowHeight:S}),m&&Mi({strategy:"referenceHidden",...L})]}),[k,U]=Gn(N),be=ue(g);Ne(()=>{M&&(be==null||be())},[M,be]);const ir=(At=P.arrow)==null?void 0:At.x,sr=(Pt=P.arrow)==null?void 0:Pt.y,ar=((St=P.arrow)==null?void 0:St.centerOffset)!==0,[cr,lr]=c.useState();return Ne(()=>{y&&lr(window.getComputedStyle(y).zIndex)},[y]),C.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:M?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:cr,"--radix-popper-transform-origin":[(Tt=P.transformOrigin)==null?void 0:Tt.x,(Ot=P.transformOrigin)==null?void 0:Ot.y].join(" "),...((Dt=P.hide)==null?void 0:Dt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(Wi,{scope:n,placedSide:k,onArrowChange:E,arrowX:ir,arrowY:sr,shouldHideArrow:ar,children:C.jsx(W.div,{"data-side":k,"data-align":U,...d,ref:b,style:{...d.style,animation:M?void 0:"none"}})})})});Un.displayName=Et;var zn="PopperArrow",Bi={top:"bottom",right:"left",bottom:"top",left:"right"},Xn=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=ji(zn,r),s=Bi[i.placedSide];return C.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:C.jsx(Fi,{...o,ref:n,style:{...o.style,display:"block"}})})});Xn.displayName=zn;function Hi(e){return e!==null}var $i=e=>({name:"transformOrigin",options:e,fn(t){var v,y,w;const{placement:n,rects:r,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,f]=Gn(n),p={start:"0%",center:"50%",end:"100%"}[f],m=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,h=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let g="",d="";return u==="bottom"?(g=s?p:`${m}px`,d=`${-l}px`):u==="top"?(g=s?p:`${m}px`,d=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,d=s?p:`${h}px`):u==="left"&&(g=`${r.floating.width+l}px`,d=s?p:`${h}px`),{data:{x:g,y:d}}}});function Gn(e){const[t,n="center"]=e.split("-");return[t,n]}var Vi=$n,Yi=Yn,Ui=Un,zi=Xn,Xi="VisuallyHidden",Kn=c.forwardRef((e,t)=>C.jsx(W.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Kn.displayName=Xi;var Gi=Kn,[$e,Rs]=at("Tooltip",[Bn]),Ve=Bn(),qn="TooltipProvider",Ki=700,it="tooltip.open",[qi,Ct]=$e(qn),Zn=e=>{const{__scopeTooltip:t,delayDuration:n=Ki,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=c.useRef(!0),a=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),C.jsx(qi,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:i})};Zn.displayName=qn;var Ye="Tooltip",[Zi,xe]=$e(Ye),Qn=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=Ct(Ye,e.__scopeTooltip),u=Ve(t),[f,p]=c.useState(null),m=Te(),h=c.useRef(0),g=s??l.disableHoverableContent,d=a??l.delayDuration,v=c.useRef(!1),[y=!1,w]=Qt({prop:r,defaultProp:o,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(it))):l.onClose(),i==null||i(R)}}),b=c.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),x=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,w(!0)},[w]),E=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),A=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,w(!0),h.current=0},d)},[d,w]);return c.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),C.jsx(Vi,{...u,children:C.jsx(Zi,{scope:t,contentId:m,open:y,stateAttribute:b,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?A():x()},[l.isOpenDelayedRef,A,x]),onTriggerLeave:c.useCallback(()=>{g?E():(window.clearTimeout(h.current),h.current=0)},[E,g]),onOpen:x,onClose:E,disableHoverableContent:g,children:n})})};Qn.displayName=Ye;var st="TooltipTrigger",Jn=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=xe(st,n),i=Ct(st,n),s=Ve(n),a=c.useRef(null),l=G(t,a,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),C.jsx(Yi,{asChild:!0,...s,children:C.jsx(W.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:I(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:I(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:I(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:I(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:I(e.onBlur,o.onClose),onClick:I(e.onClick,o.onClose)})})});Jn.displayName=st;var Rt="TooltipPortal",[Qi,Ji]=$e(Rt,{forceMount:void 0}),er=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=xe(Rt,t);return C.jsx(Qi,{scope:t,forceMount:n,children:C.jsx(ye,{present:n||i.open,children:C.jsx(lt,{asChild:!0,container:o,children:r})})})};er.displayName=Rt;var de="TooltipContent",tr=c.forwardRef((e,t)=>{const n=Ji(de,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=xe(de,e.__scopeTooltip);return C.jsx(ye,{present:r||s.open,children:s.disableHoverableContent?C.jsx(nr,{side:o,...i,ref:t}):C.jsx(es,{side:o,...i,ref:t})})}),es=c.forwardRef((e,t)=>{const n=xe(de,e.__scopeTooltip),r=Ct(de,e.__scopeTooltip),o=c.useRef(null),i=G(t,o),[s,a]=c.useState(null),{trigger:l,onClose:u}=n,f=o.current,{onPointerInTransitChange:p}=r,m=c.useCallback(()=>{a(null),p(!1)},[p]),h=c.useCallback((g,d)=>{const v=g.currentTarget,y={x:g.clientX,y:g.clientY},w=os(y,v.getBoundingClientRect()),b=is(y,w),x=ss(d.getBoundingClientRect()),E=cs([...b,...x]);a(E),p(!0)},[p]);return c.useEffect(()=>()=>m(),[m]),c.useEffect(()=>{if(l&&f){const g=v=>h(v,f),d=v=>h(v,l);return l.addEventListener("pointerleave",g),f.addEventListener("pointerleave",d),()=>{l.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",d)}}},[l,f,h,m]),c.useEffect(()=>{if(s){const g=d=>{const v=d.target,y={x:d.clientX,y:d.clientY},w=(l==null?void 0:l.contains(v))||(f==null?void 0:f.contains(v)),b=!as(y,s);w?m():b&&(m(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,f,s,u,m]),C.jsx(nr,{...e,ref:i})}),[ts,ns]=$e(Ye,{isInside:!1}),rs=wr("TooltipContent"),nr=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=xe(de,n),u=Ve(n),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(it,f),()=>document.removeEventListener(it,f)),[f]),c.useEffect(()=>{if(l.trigger){const p=m=>{const h=m.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,f]),C.jsx(ct,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:C.jsxs(Ui,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[C.jsx(rs,{children:r}),C.jsx(ts,{scope:n,isInside:!0,children:C.jsx(Gi,{id:l.contentId,role:"tooltip",children:o||r})})]})})});tr.displayName=de;var rr="TooltipArrow",or=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ve(n);return ns(rr,n).isInside?null:C.jsx(zi,{...o,...r,ref:t})});or.displayName=rr;function os(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function is(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ss(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function as(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i].x,l=t[i].y,u=t[s].x,f=t[s].y;l>r!=f>r&&n<(u-a)*(r-l)/(f-l)+a&&(o=!o)}return o}function cs(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ls(t)}function ls(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var As=Zn,Ps=Qn,Ss=Jn,Ts=er,Os=tr,Ds=or;export{Ds as A,xs as C,Es as D,nn as F,ws as O,ys as P,gs as R,bs as T,Kn as V,Cs as a,As as b,Ps as c,Ss as d,Ts as e,Os as f,Bn as g,Vi as h,Yi as i,lt as j,zi as k,So as l,fn as m,Hr as n,ct as o,Ui as p,Te as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as i,n as P}from"./chunk-KNED5TY2-DAA_sFzt.js";import{u as C,a as g}from"./button-Da66T3Bb.js";import{a as w}from"./index-C-vcF2DZ.js";function D(e,t){const n=i.createContext(t),r=s=>{const{children:c,...u}=s,a=i.useMemo(()=>u,Object.values(u));return P.jsx(n.Provider,{value:a,children:c})};r.displayName=e+"Provider";function o(s){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function $(e,t=[]){let n=[];function r(s,c){const u=i.createContext(c),a=n.length;n=[...n,c];const f=d=>{var b;const{scope:m,children:l,...h}=d,v=((b=m==null?void 0:m[e])==null?void 0:b[a])||u,S=i.useMemo(()=>h,Object.values(h));return P.jsx(v.Provider,{value:S,children:l})};f.displayName=s+"Provider";function p(d,m){var v;const l=((v=m==null?void 0:m[e])==null?void 0:v[a])||u,h=i.useContext(l);if(h)return h;if(c!==void 0)return c;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[f,p]}const o=()=>{const s=n.map(c=>i.createContext(c));return function(u){const a=(u==null?void 0:u[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...u,[e]:a}}),[u,a])}};return o.scopeName=e,[r,y(o,...t)]}function y(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=r.reduce((u,{useScope:a,scopeName:f})=>{const d=a(s)[`__scope${f}`];return{...u,...d}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function j(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function A(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function L({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=M({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:r,u=A(n),a=i.useCallback(f=>{if(s){const d=typeof f=="function"?f(e):f;d!==e&&u(d)}else o(f)},[s,e,o,u]);return[c,a]}function M({defaultProp:e,onChange:t}){const n=i.useState(e),[r]=n,o=i.useRef(r),s=A(t);return i.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var x=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{};function W(e){const[t,n]=i.useState(void 0);return x(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let c,u;if("borderBoxSize"in s){const a=s.borderBoxSize,f=Array.isArray(a)?a[0]:a;c=f.inlineSize,u=f.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function O(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var E=e=>{const{present:t,children:n}=e,r=R(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=C(r.ref,T(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null};E.displayName="Presence";function R(e){const[t,n]=i.useState(),r=i.useRef({}),o=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[u,a]=O(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const f=N(r.current);s.current=u==="mounted"?f:"none"},[u]),x(()=>{const f=r.current,p=o.current;if(p!==e){const m=s.current,l=N(f);e?a("MOUNT"):l==="none"||(f==null?void 0:f.display)==="none"?a("UNMOUNT"):a(p&&m!==l?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),x(()=>{if(t){let f;const p=t.ownerDocument.defaultView??window,d=l=>{const v=N(r.current).includes(l.animationName);if(l.target===t&&v&&(a("ANIMATION_END"),!o.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},m=l=>{l.target===t&&(s.current=N(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:i.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function N(e){return(e==null?void 0:e.animationName)||"none"}function T(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var U=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],F=U.reduce((e,t)=>{const n=g(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:c,...u}=o,a=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(a,{...u,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function k(e,t){e&&w.flushSync(()=>e.dispatchEvent(t))}export{F as P,j as a,E as b,$ as c,x as d,A as e,W as f,k as g,D as h,L as u};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as O,x as S}from"./chunk-KNED5TY2-DAA_sFzt.js";var d={exports:{}},n={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-dom.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var l;function R(){if(l)return n;l=1;var u=O();function g(e){var r="https://react.dev/errors/"+e;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var t=2;t<arguments.length;t++)r+="&args[]="+encodeURIComponent(arguments[t])}return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var i={d:{f:a,r:function(){throw Error(g(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},m=Symbol.for("react.portal");function v(e,r,t){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:c==null?null:""+c,children:e,containerInfo:r,implementation:t}}var f=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(e,r){if(e==="font")return"";if(typeof r=="string")return r==="use-credentials"?r:""}return n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,n.createPortal=function(e,r){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)throw Error(g(299));return v(e,r,null,t)},n.flushSync=function(e){var r=f.T,t=i.p;try{if(f.T=null,i.p=2,e)return e()}finally{f.T=r,i.p=t,i.d.f()}},n.preconnect=function(e,r){typeof e=="string"&&(r?(r=r.crossOrigin,r=typeof r=="string"?r==="use-credentials"?r:"":void 0):r=null,i.d.C(e,r))},n.prefetchDNS=function(e){typeof e=="string"&&i.d.D(e)},n.preinit=function(e,r){if(typeof e=="string"&&r&&typeof r.as=="string"){var t=r.as,c=s(t,r.crossOrigin),y=typeof r.integrity=="string"?r.integrity:void 0,o=typeof r.fetchPriority=="string"?r.fetchPriority:void 0;t==="style"?i.d.S(e,typeof r.precedence=="string"?r.precedence:void 0,{crossOrigin:c,integrity:y,fetchPriority:o}):t==="script"&&i.d.X(e,{crossOrigin:c,integrity:y,fetchPriority:o,nonce:typeof r.nonce=="string"?r.nonce:void 0})}},n.preinitModule=function(e,r){if(typeof e=="string")if(typeof r=="object"&&r!==null){if(r.as==null||r.as==="script"){var t=s(r.as,r.crossOrigin);i.d.M(e,{crossOrigin:t,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0})}}else r==null&&i.d.M(e)},n.preload=function(e,r){if(typeof e=="string"&&typeof r=="object"&&r!==null&&typeof r.as=="string"){var t=r.as,c=s(t,r.crossOrigin);i.d.L(e,t,{crossOrigin:c,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0,type:typeof r.type=="string"?r.type:void 0,fetchPriority:typeof r.fetchPriority=="string"?r.fetchPriority:void 0,referrerPolicy:typeof r.referrerPolicy=="string"?r.referrerPolicy:void 0,imageSrcSet:typeof r.imageSrcSet=="string"?r.imageSrcSet:void 0,imageSizes:typeof r.imageSizes=="string"?r.imageSizes:void 0,media:typeof r.media=="string"?r.media:void 0})}},n.preloadModule=function(e,r){if(typeof e=="string")if(r){var t=s(r.as,r.crossOrigin);i.d.m(e,{as:typeof r.as=="string"&&r.as!=="script"?r.as:void 0,crossOrigin:t,integrity:typeof r.integrity=="string"?r.integrity:void 0})}else i.d.m(e)},n.requestFormReset=function(e){i.d.r(e)},n.unstable_batchedUpdates=function(e,r){return e(r)},n.useFormState=function(e,r,t){return f.H.useFormState(e,r,t)},n.useFormStatus=function(){return f.H.useHostTransitionStatus()},n.version="19.0.0",n}var _;function E(){if(_)return d.exports;_=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(g){console.error(g)}}return u(),d.exports=R(),d.exports}var T=E();const h=S(T);export{h as R,T as a,E as r};
|